{"version":3,"sources":["jsdelivr-header.js","/npm/dev-dialog@1.0.0/dialog.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACAA,MAAM,OACJ,WAAA,CAAY,GACV,KAAK,KAAO,EACZ,QAAQ,IAAI,KAAK,MACjB,KAAK,QACP,CACA,MAAA,GACE,SAAS,KAAK,UAAY,wHAIV,KAAK,KAAK,6BAExB,KAAK,KAAK,KAAO,KAAK,KAAK,KAAK,KAAI,GAAiB,WAAW,EAAK,mBAAoB,KAAK,IAAM,+CAKtG,KAAK,WACP,CAEA,SAAA,GACe,IAAI,SAAS,iBAAiB,WACtC,SAAQ,CAAC,EAAM,KAClB,EAAK,QAAU,KAEb,OAAQ,GACN,KAAK,EACH,KAAK,KAAK,SAAW,KAAK,KAAK,UAC/B,MACF,KAAK,EACH,KAAK,KAAK,OAAS,KAAK,KAAK,QAEjC,CACF,GAEJ,EAGF,MAAM,oBAAoB,OACxB,WAAA,CAAY,GACV,MAAM,GACN,KAAK,IAAM,UACb","file":"/npm/dev-dialog@1.0.0/dialog.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/dev-dialog@1.0.0/dialog.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\n/**\n * @function 【 Diolog  】\n * \n * @param { 确定 取消 title  content 回调函数 }\n */\nclass Dialog {\n  constructor(opt) {\n    this.opts = opt\n    console.log(this.opts)\n    this.render()\n  }\n  render() {\n    document.body.innerHTML = `\n          <div class=\"dialog\">\n          <div class=\"mask\"></div>\n          <div class=\"tip\">\n             <h1> ${this.opts.title} </h1>\n             ${\n      this.opts.btns ? this.opts.btns.map(item => { return `<button>${item.name} </button>` }).join('') : null\n      }\n          </div>\n        </div>\n    `\n    this.dialogBtn()\n  }\n\n  dialogBtn() {\n    const btns = [...document.querySelectorAll('button')];\n    btns.forEach((item, index) => {\n      item.onclick = () => {\n\n        switch (index) {\n          case 0:\n            this.opts.success && this.opts.success()\n            break;\n          case 1:\n            this.opts.error && this.opts.error()\n            break;\n        }\n      }\n    })\n  }\n}\n\nclass childDiolog extends Dialog {\n  constructor(opt) {\n    super(opt)\n    this.msg = '我是继承的子函数'\n  }\n}\n"]}