template-designer 0.6.4 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7109,9 +7109,9 @@ const lb = /* @__PURE__ */ Mt(ab, [["render", sb]]), jg = [
7109
7109
  ], Kg = jg.flatMap((e) => e.components);
7110
7110
  async function cb(e) {
7111
7111
  try {
7112
- return (await gm(/* @__PURE__ */ Object.assign({ "./props/lodop.js": () => import("./lodop-36c7898b.mjs"), "./props/rfid.js": () => import("./rfid-c68cc65f.mjs") }), `./props/${e}.js`)).default;
7112
+ return (await gm(/* @__PURE__ */ Object.assign({ "./props/lodop.js": () => import("./lodop-c663347f.mjs"), "./props/rfid.js": () => import("./rfid-39a5cc44.mjs") }), `./props/${e}.js`)).default;
7113
7113
  } catch {
7114
- return console.warn(`配置文件 ./props/${e}.js 不存在,使用默认配置`), (await import("./lodop-36c7898b.mjs")).default;
7114
+ return console.warn(`配置文件 ./props/${e}.js 不存在,使用默认配置`), (await import("./lodop-c663347f.mjs")).default;
7115
7115
  }
7116
7116
  }
7117
7117
  function ub(e = {}, A = {}) {
@@ -13875,13 +13875,13 @@ const bI = { class: "label-designer" }, NI = { class: "toolbar" }, SI = { class:
13875
13875
  if (!q)
13876
13876
  return 0;
13877
13877
  const { x1: K } = za(q);
13878
- return Number(Number(K).toFixed(2));
13878
+ return Math.max(0, Number(K.toFixed(2)));
13879
13879
  }, OA = () => {
13880
13880
  const q = v();
13881
13881
  if (!q)
13882
13882
  return 0;
13883
13883
  const { y1: K } = za(q);
13884
- return Number(K.toFixed(2));
13884
+ return Math.max(0, Number(K.toFixed(2)));
13885
13885
  }, VA = () => {
13886
13886
  const q = v();
13887
13887
  return q ? Number((q.props.width || 0).toFixed(2)) : 0;
@@ -14632,7 +14632,7 @@ const bI = { class: "label-designer" }, NI = { class: "toolbar" }, SI = { class:
14632
14632
  ]);
14633
14633
  };
14634
14634
  }
14635
- }, wT = /* @__PURE__ */ Mt(mT, [["__scopeId", "data-v-47825360"]]);
14635
+ }, wT = /* @__PURE__ */ Mt(mT, [["__scopeId", "data-v-90993e0b"]]);
14636
14636
  const vT = {
14637
14637
  __name: "index",
14638
14638
  props: {
@@ -22741,7 +22741,7 @@ function(e) {
22741
22741
  */
22742
22742
  function(e) {
22743
22743
  function A() {
22744
- return (de.canvg ? Promise.resolve(de.canvg) : import("./index.es-ac8471fb.mjs")).catch(function(t) {
22744
+ return (de.canvg ? Promise.resolve(de.canvg) : import("./index.es-104e109d.mjs")).catch(function(t) {
22745
22745
  return Promise.reject(new Error("Could not load canvg: " + t));
22746
22746
  }).then(function(t) {
22747
22747
  return t.default ? t.default : t;
@@ -1,4 +1,4 @@
1
- import { c as Qe, _ as Ha, g as Lo } from "./index-f89b553f.mjs";
1
+ import { c as Qe, _ as Ha, g as Lo } from "./index-43df694a.mjs";
2
2
  import "vue";
3
3
  var ht = function(a) {
4
4
  return a && a.Math === Math && a;
@@ -1,4 +1,4 @@
1
- import { R as e } from "./index-f89b553f.mjs";
1
+ import { R as e } from "./index-43df694a.mjs";
2
2
  import "vue";
3
3
  const t = {
4
4
  text: {
@@ -477,7 +477,8 @@ const t = {
477
477
  type: "select",
478
478
  options: e,
479
479
  default: 0,
480
- layout: "half"
480
+ layout: "half",
481
+ hide: !0
481
482
  }
482
483
  ]
483
484
  },
@@ -1,4 +1,4 @@
1
- import { R as e } from "./index-f89b553f.mjs";
1
+ import { R as e } from "./index-43df694a.mjs";
2
2
  import "vue";
3
3
  const t = {
4
4
  text: {
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .td-text-component{width:100%;height:100%;position:relative;display:flex;align-items:center;overflow:hidden;box-sizing:border-box}.td-text-content{width:100%;min-width:0;box-sizing:border-box}.label[data-v-0a60c055]{display:flex;align-items:center;justify-content:flex-start;gap:4px}.help-icon[data-v-0a60c055]{font-size:14px;color:#999;cursor:help;transition:color .2s ease}.help-icon[data-v-0a60c055]:hover{color:var(--el-color-primary)}.property-item[data-v-0a60c055]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-0a60c055]{font-size:14px;color:#666}.property-item input[data-v-0a60c055],.property-item select[data-v-0a60c055]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-0a60c055]{height:32px;padding:2px}.property-item input[type=checkbox][data-v-0a60c055]{width:16px;height:16px}.file-input-container[data-v-0a60c055]{position:relative;display:flex;align-items:center;gap:8px}.file-input-container input[data-v-0a60c055]{height:100%!important}.file-url-input[data-v-0a60c055]{flex:1;padding:4px 8px;border:1px solid #ddd;border-radius:4px;font-size:12px}.file-url-input[data-v-0a60c055]:disabled{background-color:#f5f5f5;cursor:not-allowed}.file-input[data-v-0a60c055]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.file-select-btn[data-v-0a60c055]{padding:4px 12px;border:1px solid #ddd;border-radius:4px;background:var(--el-color-primary);color:#fff;cursor:pointer;font-size:12px;white-space:nowrap;display:flex;align-items:center;gap:4px}.file-select-btn[data-v-0a60c055]:hover:not(:disabled){background:var(--el-color-primary-dark-2);border-color:var(--el-color-primary-dark-2)}.file-select-btn[data-v-0a60c055]:disabled{background:#ccc;cursor:not-allowed}.file-info[data-v-0a60c055]{display:flex;align-items:center;justify-content:space-between;padding:4px 8px;background-color:#f5f5f5;border-radius:4px;margin-top:4px}.file-name[data-v-0a60c055]{font-size:12px;color:#666;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clear-btn[data-v-0a60c055]{background:none;border:none;color:#ff4d4f;cursor:pointer;font-size:12px;padding:2px 6px;border-radius:2px}.clear-btn[data-v-0a60c055]:hover{background-color:#fff2f0}.property-item .el-select[data-v-0a60c055]{width:100%}.property-item .el-select .el-input__wrapper[data-v-0a60c055]{height:32px;line-height:32px;font-size:14px;padding:0 8px}.property-item .el-select .el-input__inner[data-v-0a60c055]{font-size:14px;height:32px;line-height:32px}.property-item .el-select .el-select__tags[data-v-0a60c055]{font-size:12px}.property-item .el-select .el-select__tags .el-tag[data-v-0a60c055]{font-size:12px;height:20px;line-height:18px;margin:2px 4px 2px 0}.property-item .el-select--multiple .el-input__wrapper[data-v-0a60c055]{min-height:32px;height:auto;padding:2px 8px}.property-item .el-select--multiple .el-input__inner[data-v-0a60c055]{height:28px;line-height:28px}.property-panel[data-v-441c5885]{padding:16px;background:#fff;border-left:1px solid #e4e7ed;overflow-y:auto;height:100%}.property-group[data-v-441c5885]{margin-bottom:16px}.property-group-title[data-v-441c5885]{font-size:14px;font-weight:500;color:#303133;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #ebeef5}.property-item[data-v-441c5885]{margin-bottom:12px}.text-property-panel .property-item[data-v-441c5885]:last-child,.barcode-property-panel .property-item[data-v-441c5885]:last-child,.qrcode-property-panel .property-item[data-v-441c5885]:last-child,.image-property-panel .property-item[data-v-441c5885]:last-child,.rectangle-property-panel .property-item[data-v-441c5885]:last-child,.line-property-panel .property-item[data-v-441c5885]:last-child,.verline-property-panel .property-item[data-v-441c5885]:last-child{margin-bottom:0}.property-layout-container[data-v-441c5885]{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}.property-item-wrapper[data-v-441c5885]{margin-bottom:0}.property-item-wrapper.full-width[data-v-441c5885]{width:100%;flex-basis:100%}.property-item-wrapper.half-width[data-v-441c5885]{width:calc(50% - 6px);flex-basis:calc(50% - 6px)}.property-item-wrapper.default-width[data-v-441c5885]{width:100%;flex-basis:100%}.property-item-wrapper .property-item[data-v-441c5885]{margin-bottom:0;width:100%}.barcode-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.barcode-component svg{width:100%!important;height:100%!important;max-width:100%;max-height:100%;display:block}.component-selection-overlay{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-component[data-v-dfc5e037]{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.qrcode-canvas-fixed[data-v-dfc5e037]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:0;margin:0}.qrcode-image[data-v-dfc5e037]{display:block;width:100%!important;height:100%!important;padding:0;margin:0;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges;image-rendering:pixelated;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-crisp-edges;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;filter:none;-webkit-filter:none;object-fit:cover;object-position:center}.component-selection-overlay[data-v-dfc5e037]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-property-panel[data-v-cce393d5]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-cce393d5]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-cce393d5]{font-size:14px;color:#666}.property-item input[data-v-cce393d5],.property-item select[data-v-cce393d5]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-cce393d5]{height:32px;padding:2px}.image-component[data-v-13c8d13f]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;pointer-events:auto}.image-placeholder[data-v-13c8d13f]{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999;font-size:12px;gap:8px;pointer-events:auto}.image-loading-overlay[data-v-13c8d13f]{position:absolute;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.6);z-index:5;pointer-events:none}.image-content[data-v-13c8d13f]{display:block;max-width:100%;max-height:100%;image-rendering:-webkit-optimize-contrast;image-rendering:-webkit-crisp-edges;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:crisp-edges;image-rendering:high-quality;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:auto;object-fit:contain;object-position:center}.component-selection-overlay[data-v-13c8d13f]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.image-property-panel[data-v-462c8b63]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-462c8b63]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-462c8b63]{font-size:14px;color:#666}.property-item input[data-v-462c8b63],.property-item select[data-v-462c8b63]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-462c8b63]{height:32px;padding:2px}.rectangle-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.rectangle-content{width:100%;height:100%;box-sizing:border-box;position:relative}.hairline-edge{position:absolute;pointer-events:none}.rectangle-property-panel[data-v-e06ed44e]{display:flex;flex-direction:column;gap:12px}.line-component{position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.line-selection-outline{position:absolute;left:0;top:0;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.component-list[data-v-010ae52b]{background:#fff;display:flex;flex-direction:column;gap:20px}.component-group[data-v-010ae52b]{display:flex;flex-direction:column;gap:8px}.group-title[data-v-010ae52b]{font-size:14px;font-weight:600;color:#333;padding:8px 12px;border-left:4px solid var(--el-color-primary);background:linear-gradient(135deg,var(--el-color-primary-light-9) 0%,var(--el-color-primary-light-8) 100%);border-radius:0 6px 6px 0;margin-bottom:4px;box-shadow:0 1px 3px #0000001a}.group-content[data-v-010ae52b]{display:grid;grid-template-columns:1fr 1fr;grid-row-gap:8px;grid-column-gap:8px}.component-item[data-v-010ae52b]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px 0;border:1px solid #ddd;border-radius:4px;cursor:grab;font-size:13px;color:#555;transition:all .2s ease;width:100%;height:70px;background:#fff;box-shadow:0 1px 3px #0000001a}.component-item[data-v-010ae52b]:hover{background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary);color:var(--el-color-primary);box-shadow:0 2px 8px #00000014}.component-item i[data-v-010ae52b]{font-size:24px;margin-bottom:8px;color:var(--el-color-primary)}.component-item span[data-v-010ae52b]{font-size:12px;text-align:center;color:#333}.component-item:hover i[data-v-010ae52b],.component-item:hover span[data-v-010ae52b]{color:var(--el-color-primary)!important}.ruler[data-v-3635eba4]{position:absolute;z-index:1}.ruler.horizontal[data-v-3635eba4]{left:20px;top:0;width:calc(100% - 40px);height:20px;border-bottom:none}.ruler.vertical[data-v-3635eba4]{top:20px;left:0;width:20px;height:calc(100% - 40px);border-right:none}.ruler-unit[data-v-3635eba4]{position:absolute}.ruler.horizontal .ruler-unit[data-v-3635eba4]{height:100%}.ruler.vertical .ruler-unit[data-v-3635eba4]{width:100%}.ruler-mark[data-v-3635eba4]{position:absolute;background:#999}.ruler.horizontal .ruler-mark[data-v-3635eba4]{bottom:0}.ruler.vertical .ruler-mark[data-v-3635eba4]{right:0}.ruler-text[data-v-3635eba4]{position:absolute;font-size:8px;color:#666;white-space:nowrap}.ruler.horizontal .ruler-text[data-v-3635eba4]{bottom:8px;transform:translate(-50%)}.ruler.vertical .ruler-text[data-v-3635eba4]{right:8px;transform:translateY(-50%) rotate(-90deg)}.label-container[data-v-11f07674]{display:flex;flex-direction:column;align-items:flex-end}.tg-title[data-v-11f07674]{display:flex;align-items:center}.tg-title p[data-v-11f07674]{font-size:18px;font-weight:700}.tge-main[data-v-11f07674]{max-height:82vh;padding:0}.tge-text[data-v-11f07674]{font-size:14px;line-height:26px}.tge-content[data-v-11f07674]{display:flex;width:100%}.tge-block[data-v-11f07674]{display:flex;flex-direction:column;flex:1}.tge-title[data-v-11f07674]{padding:6px 0;font-size:14px;color:var(--el-color-primary)}.tge-img[data-v-11f07674]{width:100%;height:auto}.table-container[data-v-11f07674]{width:100%;border:1px dashed #ddd;border-radius:4px}.empty-placeholder[data-v-11f07674]{display:flex;align-items:center;justify-content:center;color:#999;padding:20px;border-radius:4px;min-height:80px}.graph-table[data-v-11f07674]{margin-top:10px}.tge-divider[data-v-11f07674]{width:1px;background:var(--el-border-color);margin:0 10px}.table-container .el-table .el-table__body-wrapper{background:transparent!important}.graph-table .el-table__header,.graph-table .el-table__body{width:100%!important}.graph-table .el-table__body{margin-bottom:10px!important}.graph-table .el-form-item__error{position:static!important;top:0!important}.graph-table .el-input-number{width:auto}.graph-table .el-input-number.is-without-controls .el-input__wrapper{padding-left:4px;padding-right:4px}button[data-v-47825360]{display:flex;align-items:center;justify-content:center}.label-designer[data-v-47825360]{display:flex;height:100%}.toolbar[data-v-47825360]{width:200px;background:#fff;border-right:1px solid #e0e0e0;padding:16px;display:flex;flex-direction:column;gap:16px}.zoom-controls span[data-v-47825360]{width:44px;text-align:center}.zoom-controls[data-v-47825360]{display:flex;align-items:center;gap:8px;background:#f5f5f5;border-radius:4px;padding:4px 8px}.zoom-controls button[data-v-47825360]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.zoom-controls button[data-v-47825360]:disabled{opacity:.5;cursor:not-allowed}.center-container[data-v-47825360]{display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.center-toolbar[data-v-47825360]{display:flex;align-items:center;justify-content:flex-end;padding:16px 16px 0;background:rgba(0,0,0,.05)}.canvas-container[data-v-47825360]{flex:1;padding:0 16px 16px;overflow:auto;background:rgba(0,0,0,.05);position:relative;display:flex;flex-direction:column}.canvas-wrapper[data-v-47825360]{position:relative;transform-origin:0 0;overflow:visible;width:fit-content;height:fit-content;margin-top:20px;transition:all .2s ease;transform:translateZ(0);will-change:transform}.ruler-horizontal[data-v-47825360]{position:absolute;left:0;top:0;right:0;height:24px;z-index:10;pointer-events:none}.ruler-vertical[data-v-47825360]{position:absolute;left:0;top:0;bottom:0;width:24px;z-index:10;pointer-events:none}.canvas[data-v-47825360]{position:relative;overflow:visible;z-index:1;position:absolute;left:21px;top:21px}.property-panel[data-v-47825360]{width:260px;background:#fff;border-left:1px solid #ddd;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px;position:relative;z-index:100;overflow-y:auto}.property-panel-operate[data-v-47825360]{display:flex;align-items:center;margin-top:10px}.property-panel-title[data-v-47825360]{position:sticky;top:0;left:0;right:0;background:#fff;z-index:100;display:flex;align-items:center;justify-content:flex-start;margin:0;gap:8px}.property-panel-title .help-icon[data-v-47825360]{font-size:18px;color:#999;transition:color .2s ease}.property-panel-title .help-icon[data-v-47825360]:hover{color:var(--el-color-primary)}.position-controls[data-v-47825360]{display:flex;flex-direction:column;gap:12px;padding:12px;background:#f5f5f5;border-radius:4px}.control-group[data-v-47825360]{display:flex;align-items:center;justify-content:space-between;gap:4px}.control-group label[data-v-47825360]{width:80px;font-size:14px;color:#666;text-align:end}.number-input[data-v-47825360]{display:flex;align-items:center;gap:4px}.number-input input[data-v-47825360]{width:90px;padding:4px;border:1px solid #ddd;border-radius:4px;text-align:center}.number-input button[data-v-47825360]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.rotation-display[data-v-47825360]{display:flex;align-items:center;justify-content:center;min-width:40px;height:24px;font-size:12px;color:#666;border:1px solid #ddd;background:#f9f9f9;border-radius:4px}.canvas-item[data-v-47825360]{position:absolute;cursor:move;-webkit-user-select:none;user-select:none;z-index:10;transform:translateZ(0);will-change:transform;left:0;top:0;pointer-events:auto}.resize-handle[data-v-47825360]{position:absolute;width:4px;height:4px;background:#ffffff;border:.5px solid var(--el-color-primary-light-3);z-index:1001;transition:all .2s ease;border-radius:50%;display:block!important;visibility:visible!important;opacity:1!important;transform:translateZ(0);will-change:transform;font-size:16px!important;line-height:1!important;cursor:pointer}.resize-handle.top-left[data-v-47825360]{top:-2px;left:-2px}.resize-handle.top[data-v-47825360]{top:-2px;left:calc(50% - 3.5px);width:7px;height:3px;border-radius:1.5px}.resize-handle.top-right[data-v-47825360]{top:-2px;right:-2px}.resize-handle.right[data-v-47825360]{top:50%;right:-2px;transform:translateY(-50%);width:3px;height:6px;border-radius:1.5px}.resize-handle.bottom-right[data-v-47825360]{bottom:-2px;right:-2px}.resize-handle.bottom[data-v-47825360]{bottom:-2px;left:calc(50% - 3.5px);width:7px;height:3px;border-radius:1.5px}.resize-handle.bottom-left[data-v-47825360]{bottom:-2px;left:-2px}.resize-handle.left[data-v-47825360]{top:50%;left:-2px;transform:translateY(-50%);width:3px;height:6px;border-radius:1.5px}.resize-handle.line-anchor[data-v-47825360]{width:4px;height:4px;border-radius:50%}.rotate-handle[data-v-47825360]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:-8px;width:12px;height:12px;background:#ffffff;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:grab;z-index:1002;display:flex;align-items:center;justify-content:center}.size-label[data-v-47825360]{display:flex;justify-content:center;flex-wrap:nowrap;white-space:nowrap;position:absolute;top:-14px;left:-4px;width:auto;min-width:70px;height:auto;background:rgba(255,34,34,.8);color:#fff;font-size:7px;border-radius:6px;z-index:20;line-height:1.2;box-shadow:0 2px 8px #00000014;pointer-events:none;padding:1px 8px 0}.delete-btn[data-v-47825360]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:8px;width:12px;height:12px;background:#ffffff;color:#ff4d4f;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:pointer;z-index:1003;display:flex;align-items:center;justify-content:center}.delete-btn.delete-btn-centered[data-v-47825360]{margin-left:0}.drag-extend-lines[data-v-47825360]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.drag-extend-line[data-v-47825360]{position:absolute;pointer-events:none;z-index:998}.drag-extend-line.horizontal[data-v-47825360]{width:100%;height:1px;left:0;background:linear-gradient(to right,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.drag-extend-line.vertical[data-v-47825360]{width:1px;height:100%;top:0;background:linear-gradient(to bottom,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.drag-extend-line.rotated[data-v-47825360]{position:absolute;border:1px dashed var(--el-color-primary-light-3);pointer-events:none;z-index:998}.alignment-guides[data-v-47825360]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:9999}.alignment-guide[data-v-47825360]{background-color:transparent;pointer-events:none;z-index:9999}.alignment-guide.horizontal[data-v-47825360]{position:absolute;left:0;right:0;height:1px;background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.alignment-guide.vertical[data-v-47825360]{position:absolute;top:0;bottom:0;width:1px;background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.alignment-guide.guide-center[data-v-47825360]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-center.vertical[data-v-47825360]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-resize-anchor[data-v-47825360]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-resize-anchor.vertical[data-v-47825360]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-canvas-center[data-v-47825360]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px}.alignment-guide.guide-canvas-center.vertical[data-v-47825360]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px}.number-input input[type=number][data-v-47825360]::-webkit-inner-spin-button,.number-input input[type=number][data-v-47825360]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.switch-input[data-v-47825360]{display:flex;align-items:center}.switch-input input[type=checkbox][data-v-47825360]{width:20px;height:20px;cursor:pointer;accent-color:var(--el-color-primary-light-3)}.component-selected[data-v-47825360],.component-current[data-v-47825360]{outline:1px dashed var(--el-color-primary-light-3)!important;outline-offset:0!important}.component-selected[data-v-47825360],.component-current[data-v-47825360]{box-sizing:border-box}.no-outline.component-selected[data-v-47825360],.no-outline.component-current[data-v-47825360]{outline:none!important}.component-config-missing[data-v-47825360]{display:flex;align-items:center;justify-content:center;background:#fff3cd;border:1px dashed #ffc107;border-radius:4px;color:#856404;font-size:12px}.missing-config-tip[data-v-47825360]{display:flex;align-items:center;gap:4px;padding:8px}.missing-config-tip .el-icon[data-v-47825360]{font-size:14px;color:#ffc107}.loader-container[data-v-47825360]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center}.loader-container p[data-v-47825360]{color:var(--el-color-primary-light-3);font-size:14px;margin-top:20px}.loader-circle[data-v-47825360]{width:70px;height:70px;display:inline-block;margin-right:10px;position:relative;vertical-align:top}.loader-circle[data-v-47825360]:before{border-radius:50%;border-top:5px solid var(--el-color-primary-light-3);content:" ";display:block;position:absolute;top:10%;left:10%;height:80%;width:80%;animation:loader-circle_rotation-47825360 1s linear infinite}.loader-circle[data-v-47825360]:after{border-radius:50%;border-bottom:5px solid var(--el-color-primary-light-3);content:" ";display:block;height:100%;width:100%;animation:loader-circle_rotation-reverse-47825360 1s linear infinite;position:absolute;top:0}@keyframes loader-circle_rotation-reverse-47825360{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}@keyframes loader-circle_rotation-47825360{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.template-designer[data-v-a3d9b11f]{overflow-y:hidden}.template-designer-border-top[data-v-a3d9b11f]{border-top:1px solid #e0e0e0}
1
+ .td-text-component{width:100%;height:100%;position:relative;display:flex;align-items:center;overflow:hidden;box-sizing:border-box}.td-text-content{width:100%;min-width:0;box-sizing:border-box}.label[data-v-0a60c055]{display:flex;align-items:center;justify-content:flex-start;gap:4px}.help-icon[data-v-0a60c055]{font-size:14px;color:#999;cursor:help;transition:color .2s ease}.help-icon[data-v-0a60c055]:hover{color:var(--el-color-primary)}.property-item[data-v-0a60c055]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-0a60c055]{font-size:14px;color:#666}.property-item input[data-v-0a60c055],.property-item select[data-v-0a60c055]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-0a60c055]{height:32px;padding:2px}.property-item input[type=checkbox][data-v-0a60c055]{width:16px;height:16px}.file-input-container[data-v-0a60c055]{position:relative;display:flex;align-items:center;gap:8px}.file-input-container input[data-v-0a60c055]{height:100%!important}.file-url-input[data-v-0a60c055]{flex:1;padding:4px 8px;border:1px solid #ddd;border-radius:4px;font-size:12px}.file-url-input[data-v-0a60c055]:disabled{background-color:#f5f5f5;cursor:not-allowed}.file-input[data-v-0a60c055]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.file-select-btn[data-v-0a60c055]{padding:4px 12px;border:1px solid #ddd;border-radius:4px;background:var(--el-color-primary);color:#fff;cursor:pointer;font-size:12px;white-space:nowrap;display:flex;align-items:center;gap:4px}.file-select-btn[data-v-0a60c055]:hover:not(:disabled){background:var(--el-color-primary-dark-2);border-color:var(--el-color-primary-dark-2)}.file-select-btn[data-v-0a60c055]:disabled{background:#ccc;cursor:not-allowed}.file-info[data-v-0a60c055]{display:flex;align-items:center;justify-content:space-between;padding:4px 8px;background-color:#f5f5f5;border-radius:4px;margin-top:4px}.file-name[data-v-0a60c055]{font-size:12px;color:#666;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clear-btn[data-v-0a60c055]{background:none;border:none;color:#ff4d4f;cursor:pointer;font-size:12px;padding:2px 6px;border-radius:2px}.clear-btn[data-v-0a60c055]:hover{background-color:#fff2f0}.property-item .el-select[data-v-0a60c055]{width:100%}.property-item .el-select .el-input__wrapper[data-v-0a60c055]{height:32px;line-height:32px;font-size:14px;padding:0 8px}.property-item .el-select .el-input__inner[data-v-0a60c055]{font-size:14px;height:32px;line-height:32px}.property-item .el-select .el-select__tags[data-v-0a60c055]{font-size:12px}.property-item .el-select .el-select__tags .el-tag[data-v-0a60c055]{font-size:12px;height:20px;line-height:18px;margin:2px 4px 2px 0}.property-item .el-select--multiple .el-input__wrapper[data-v-0a60c055]{min-height:32px;height:auto;padding:2px 8px}.property-item .el-select--multiple .el-input__inner[data-v-0a60c055]{height:28px;line-height:28px}.property-panel[data-v-441c5885]{padding:16px;background:#fff;border-left:1px solid #e4e7ed;overflow-y:auto;height:100%}.property-group[data-v-441c5885]{margin-bottom:16px}.property-group-title[data-v-441c5885]{font-size:14px;font-weight:500;color:#303133;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #ebeef5}.property-item[data-v-441c5885]{margin-bottom:12px}.text-property-panel .property-item[data-v-441c5885]:last-child,.barcode-property-panel .property-item[data-v-441c5885]:last-child,.qrcode-property-panel .property-item[data-v-441c5885]:last-child,.image-property-panel .property-item[data-v-441c5885]:last-child,.rectangle-property-panel .property-item[data-v-441c5885]:last-child,.line-property-panel .property-item[data-v-441c5885]:last-child,.verline-property-panel .property-item[data-v-441c5885]:last-child{margin-bottom:0}.property-layout-container[data-v-441c5885]{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}.property-item-wrapper[data-v-441c5885]{margin-bottom:0}.property-item-wrapper.full-width[data-v-441c5885]{width:100%;flex-basis:100%}.property-item-wrapper.half-width[data-v-441c5885]{width:calc(50% - 6px);flex-basis:calc(50% - 6px)}.property-item-wrapper.default-width[data-v-441c5885]{width:100%;flex-basis:100%}.property-item-wrapper .property-item[data-v-441c5885]{margin-bottom:0;width:100%}.barcode-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.barcode-component svg{width:100%!important;height:100%!important;max-width:100%;max-height:100%;display:block}.component-selection-overlay{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-component[data-v-dfc5e037]{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.qrcode-canvas-fixed[data-v-dfc5e037]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:0;margin:0}.qrcode-image[data-v-dfc5e037]{display:block;width:100%!important;height:100%!important;padding:0;margin:0;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges;image-rendering:pixelated;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:-webkit-crisp-edges;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;filter:none;-webkit-filter:none;object-fit:cover;object-position:center}.component-selection-overlay[data-v-dfc5e037]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.qrcode-property-panel[data-v-cce393d5]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-cce393d5]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-cce393d5]{font-size:14px;color:#666}.property-item input[data-v-cce393d5],.property-item select[data-v-cce393d5]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-cce393d5]{height:32px;padding:2px}.image-component[data-v-13c8d13f]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;pointer-events:auto}.image-placeholder[data-v-13c8d13f]{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999;font-size:12px;gap:8px;pointer-events:auto}.image-loading-overlay[data-v-13c8d13f]{position:absolute;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.6);z-index:5;pointer-events:none}.image-content[data-v-13c8d13f]{display:block;max-width:100%;max-height:100%;image-rendering:-webkit-optimize-contrast;image-rendering:-webkit-crisp-edges;image-rendering:-moz-crisp-edges;image-rendering:-o-crisp-edges;image-rendering:crisp-edges;image-rendering:high-quality;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:auto;object-fit:contain;object-position:center}.component-selection-overlay[data-v-13c8d13f]{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.image-property-panel[data-v-462c8b63]{display:flex;flex-direction:column;gap:12px}.property-item[data-v-462c8b63]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-462c8b63]{font-size:14px;color:#666}.property-item input[data-v-462c8b63],.property-item select[data-v-462c8b63]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-462c8b63]{height:32px;padding:2px}.rectangle-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.rectangle-content{width:100%;height:100%;box-sizing:border-box;position:relative}.hairline-edge{position:absolute;pointer-events:none}.rectangle-property-panel[data-v-e06ed44e]{display:flex;flex-direction:column;gap:12px}.line-component{position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;box-sizing:border-box}.line-selection-outline{position:absolute;left:0;top:0;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.component-list[data-v-010ae52b]{background:#fff;display:flex;flex-direction:column;gap:20px}.component-group[data-v-010ae52b]{display:flex;flex-direction:column;gap:8px}.group-title[data-v-010ae52b]{font-size:14px;font-weight:600;color:#333;padding:8px 12px;border-left:4px solid var(--el-color-primary);background:linear-gradient(135deg,var(--el-color-primary-light-9) 0%,var(--el-color-primary-light-8) 100%);border-radius:0 6px 6px 0;margin-bottom:4px;box-shadow:0 1px 3px #0000001a}.group-content[data-v-010ae52b]{display:grid;grid-template-columns:1fr 1fr;grid-row-gap:8px;grid-column-gap:8px}.component-item[data-v-010ae52b]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px 0;border:1px solid #ddd;border-radius:4px;cursor:grab;font-size:13px;color:#555;transition:all .2s ease;width:100%;height:70px;background:#fff;box-shadow:0 1px 3px #0000001a}.component-item[data-v-010ae52b]:hover{background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary);color:var(--el-color-primary);box-shadow:0 2px 8px #00000014}.component-item i[data-v-010ae52b]{font-size:24px;margin-bottom:8px;color:var(--el-color-primary)}.component-item span[data-v-010ae52b]{font-size:12px;text-align:center;color:#333}.component-item:hover i[data-v-010ae52b],.component-item:hover span[data-v-010ae52b]{color:var(--el-color-primary)!important}.ruler[data-v-3635eba4]{position:absolute;z-index:1}.ruler.horizontal[data-v-3635eba4]{left:20px;top:0;width:calc(100% - 40px);height:20px;border-bottom:none}.ruler.vertical[data-v-3635eba4]{top:20px;left:0;width:20px;height:calc(100% - 40px);border-right:none}.ruler-unit[data-v-3635eba4]{position:absolute}.ruler.horizontal .ruler-unit[data-v-3635eba4]{height:100%}.ruler.vertical .ruler-unit[data-v-3635eba4]{width:100%}.ruler-mark[data-v-3635eba4]{position:absolute;background:#999}.ruler.horizontal .ruler-mark[data-v-3635eba4]{bottom:0}.ruler.vertical .ruler-mark[data-v-3635eba4]{right:0}.ruler-text[data-v-3635eba4]{position:absolute;font-size:8px;color:#666;white-space:nowrap}.ruler.horizontal .ruler-text[data-v-3635eba4]{bottom:8px;transform:translate(-50%)}.ruler.vertical .ruler-text[data-v-3635eba4]{right:8px;transform:translateY(-50%) rotate(-90deg)}.label-container[data-v-11f07674]{display:flex;flex-direction:column;align-items:flex-end}.tg-title[data-v-11f07674]{display:flex;align-items:center}.tg-title p[data-v-11f07674]{font-size:18px;font-weight:700}.tge-main[data-v-11f07674]{max-height:82vh;padding:0}.tge-text[data-v-11f07674]{font-size:14px;line-height:26px}.tge-content[data-v-11f07674]{display:flex;width:100%}.tge-block[data-v-11f07674]{display:flex;flex-direction:column;flex:1}.tge-title[data-v-11f07674]{padding:6px 0;font-size:14px;color:var(--el-color-primary)}.tge-img[data-v-11f07674]{width:100%;height:auto}.table-container[data-v-11f07674]{width:100%;border:1px dashed #ddd;border-radius:4px}.empty-placeholder[data-v-11f07674]{display:flex;align-items:center;justify-content:center;color:#999;padding:20px;border-radius:4px;min-height:80px}.graph-table[data-v-11f07674]{margin-top:10px}.tge-divider[data-v-11f07674]{width:1px;background:var(--el-border-color);margin:0 10px}.table-container .el-table .el-table__body-wrapper{background:transparent!important}.graph-table .el-table__header,.graph-table .el-table__body{width:100%!important}.graph-table .el-table__body{margin-bottom:10px!important}.graph-table .el-form-item__error{position:static!important;top:0!important}.graph-table .el-input-number{width:auto}.graph-table .el-input-number.is-without-controls .el-input__wrapper{padding-left:4px;padding-right:4px}button[data-v-90993e0b]{display:flex;align-items:center;justify-content:center}.label-designer[data-v-90993e0b]{display:flex;height:100%}.toolbar[data-v-90993e0b]{width:200px;background:#fff;border-right:1px solid #e0e0e0;padding:16px;display:flex;flex-direction:column;gap:16px}.zoom-controls span[data-v-90993e0b]{width:44px;text-align:center}.zoom-controls[data-v-90993e0b]{display:flex;align-items:center;gap:8px;background:#f5f5f5;border-radius:4px;padding:4px 8px}.zoom-controls button[data-v-90993e0b]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.zoom-controls button[data-v-90993e0b]:disabled{opacity:.5;cursor:not-allowed}.center-container[data-v-90993e0b]{display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.center-toolbar[data-v-90993e0b]{display:flex;align-items:center;justify-content:flex-end;padding:16px 16px 0;background:rgba(0,0,0,.05)}.canvas-container[data-v-90993e0b]{flex:1;padding:0 16px 16px;overflow:auto;background:rgba(0,0,0,.05);position:relative;display:flex;flex-direction:column}.canvas-wrapper[data-v-90993e0b]{position:relative;transform-origin:0 0;overflow:visible;width:fit-content;height:fit-content;margin-top:20px;transition:all .2s ease;transform:translateZ(0);will-change:transform}.ruler-horizontal[data-v-90993e0b]{position:absolute;left:0;top:0;right:0;height:24px;z-index:10;pointer-events:none}.ruler-vertical[data-v-90993e0b]{position:absolute;left:0;top:0;bottom:0;width:24px;z-index:10;pointer-events:none}.canvas[data-v-90993e0b]{position:relative;overflow:visible;z-index:1;position:absolute;left:21px;top:21px}.property-panel[data-v-90993e0b]{width:260px;background:#fff;border-left:1px solid #ddd;padding:0 16px 16px;display:flex;flex-direction:column;gap:16px;position:relative;z-index:100;overflow-y:auto}.property-panel-operate[data-v-90993e0b]{display:flex;align-items:center;margin-top:10px}.property-panel-title[data-v-90993e0b]{position:sticky;top:0;left:0;right:0;background:#fff;z-index:100;display:flex;align-items:center;justify-content:flex-start;margin:0;gap:8px}.property-panel-title .help-icon[data-v-90993e0b]{font-size:18px;color:#999;transition:color .2s ease}.property-panel-title .help-icon[data-v-90993e0b]:hover{color:var(--el-color-primary)}.position-controls[data-v-90993e0b]{display:flex;flex-direction:column;gap:12px;padding:12px;background:#f5f5f5;border-radius:4px}.control-group[data-v-90993e0b]{display:flex;align-items:center;justify-content:space-between;gap:4px}.control-group label[data-v-90993e0b]{width:80px;font-size:14px;color:#666;text-align:end}.number-input[data-v-90993e0b]{display:flex;align-items:center;gap:4px}.number-input input[data-v-90993e0b]{width:90px;padding:4px;border:1px solid #ddd;border-radius:4px;text-align:center}.number-input button[data-v-90993e0b]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.rotation-display[data-v-90993e0b]{display:flex;align-items:center;justify-content:center;min-width:40px;height:24px;font-size:12px;color:#666;border:1px solid #ddd;background:#f9f9f9;border-radius:4px}.canvas-item[data-v-90993e0b]{position:absolute;cursor:move;-webkit-user-select:none;user-select:none;z-index:10;transform:translateZ(0);will-change:transform;left:0;top:0;pointer-events:auto}.resize-handle[data-v-90993e0b]{position:absolute;width:4px;height:4px;background:#ffffff;border:.5px solid var(--el-color-primary-light-3);z-index:1001;transition:all .2s ease;border-radius:50%;display:block!important;visibility:visible!important;opacity:1!important;transform:translateZ(0);will-change:transform;font-size:16px!important;line-height:1!important;cursor:pointer}.resize-handle.top-left[data-v-90993e0b]{top:-2px;left:-2px}.resize-handle.top[data-v-90993e0b]{top:-2px;left:calc(50% - 3.5px);width:7px;height:3px;border-radius:1.5px}.resize-handle.top-right[data-v-90993e0b]{top:-2px;right:-2px}.resize-handle.right[data-v-90993e0b]{top:50%;right:-2px;transform:translateY(-50%);width:3px;height:6px;border-radius:1.5px}.resize-handle.bottom-right[data-v-90993e0b]{bottom:-2px;right:-2px}.resize-handle.bottom[data-v-90993e0b]{bottom:-2px;left:calc(50% - 3.5px);width:7px;height:3px;border-radius:1.5px}.resize-handle.bottom-left[data-v-90993e0b]{bottom:-2px;left:-2px}.resize-handle.left[data-v-90993e0b]{top:50%;left:-2px;transform:translateY(-50%);width:3px;height:6px;border-radius:1.5px}.resize-handle.line-anchor[data-v-90993e0b]{width:4px;height:4px;border-radius:50%}.rotate-handle[data-v-90993e0b]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:-8px;width:12px;height:12px;background:#ffffff;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:grab;z-index:1002;display:flex;align-items:center;justify-content:center}.size-label[data-v-90993e0b]{display:flex;justify-content:center;flex-wrap:nowrap;white-space:nowrap;position:absolute;top:-14px;left:-4px;width:auto;min-width:70px;height:auto;background:rgba(255,34,34,.8);color:#fff;font-size:7px;border-radius:6px;z-index:20;line-height:1.2;box-shadow:0 2px 8px #00000014;pointer-events:none;padding:1px 8px 0}.delete-btn[data-v-90993e0b]{position:absolute;bottom:-20px;left:50%;transform:translate(-50%);margin-left:8px;width:12px;height:12px;background:#ffffff;color:#ff4d4f;border:.5px solid rgba(0,0,0,.1);border-radius:50%;cursor:pointer;z-index:1003;display:flex;align-items:center;justify-content:center}.delete-btn.delete-btn-centered[data-v-90993e0b]{margin-left:0}.drag-extend-lines[data-v-90993e0b]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.drag-extend-line[data-v-90993e0b]{position:absolute;pointer-events:none;z-index:998}.drag-extend-line.horizontal[data-v-90993e0b]{width:100%;height:1px;left:0;background:linear-gradient(to right,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.drag-extend-line.vertical[data-v-90993e0b]{width:1px;height:100%;top:0;background:linear-gradient(to bottom,rgb(177,179,184) 0%,rgb(177,179,184) 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.drag-extend-line.rotated[data-v-90993e0b]{position:absolute;border:1px dashed var(--el-color-primary-light-3);pointer-events:none;z-index:998}.alignment-guides[data-v-90993e0b]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:9999}.alignment-guide[data-v-90993e0b]{background-color:transparent;pointer-events:none;z-index:9999}.alignment-guide.horizontal[data-v-90993e0b]{position:absolute;left:0;right:0;height:1px;background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px;background-repeat:repeat-x;transform:translateZ(0);will-change:auto}.alignment-guide.vertical[data-v-90993e0b]{position:absolute;top:0;bottom:0;width:1px;background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px;background-repeat:repeat-y;transform:translateZ(0);will-change:auto}.alignment-guide.guide-center[data-v-90993e0b]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-center.vertical[data-v-90993e0b]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-resize-anchor[data-v-90993e0b]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:4px 1px}.alignment-guide.guide-resize-anchor.vertical[data-v-90993e0b]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 4px}.alignment-guide.guide-canvas-center[data-v-90993e0b]{background:linear-gradient(to right,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:6px 1px}.alignment-guide.guide-canvas-center.vertical[data-v-90993e0b]{background:linear-gradient(to bottom,#ff4d4f 0%,#ff4d4f 50%,transparent 50%,transparent 100%);background-size:1px 6px}.number-input input[type=number][data-v-90993e0b]::-webkit-inner-spin-button,.number-input input[type=number][data-v-90993e0b]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.switch-input[data-v-90993e0b]{display:flex;align-items:center}.switch-input input[type=checkbox][data-v-90993e0b]{width:20px;height:20px;cursor:pointer;accent-color:var(--el-color-primary-light-3)}.component-selected[data-v-90993e0b],.component-current[data-v-90993e0b]{outline:1px dashed var(--el-color-primary-light-3)!important;outline-offset:0!important}.component-selected[data-v-90993e0b],.component-current[data-v-90993e0b]{box-sizing:border-box}.no-outline.component-selected[data-v-90993e0b],.no-outline.component-current[data-v-90993e0b]{outline:none!important}.component-config-missing[data-v-90993e0b]{display:flex;align-items:center;justify-content:center;background:#fff3cd;border:1px dashed #ffc107;border-radius:4px;color:#856404;font-size:12px}.missing-config-tip[data-v-90993e0b]{display:flex;align-items:center;gap:4px;padding:8px}.missing-config-tip .el-icon[data-v-90993e0b]{font-size:14px;color:#ffc107}.loader-container[data-v-90993e0b]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center}.loader-container p[data-v-90993e0b]{color:var(--el-color-primary-light-3);font-size:14px;margin-top:20px}.loader-circle[data-v-90993e0b]{width:70px;height:70px;display:inline-block;margin-right:10px;position:relative;vertical-align:top}.loader-circle[data-v-90993e0b]:before{border-radius:50%;border-top:5px solid var(--el-color-primary-light-3);content:" ";display:block;position:absolute;top:10%;left:10%;height:80%;width:80%;animation:loader-circle_rotation-90993e0b 1s linear infinite}.loader-circle[data-v-90993e0b]:after{border-radius:50%;border-bottom:5px solid var(--el-color-primary-light-3);content:" ";display:block;height:100%;width:100%;animation:loader-circle_rotation-reverse-90993e0b 1s linear infinite;position:absolute;top:0}@keyframes loader-circle_rotation-reverse-90993e0b{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}@keyframes loader-circle_rotation-90993e0b{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.template-designer[data-v-a3d9b11f]{overflow-y:hidden}.template-designer-border-top[data-v-a3d9b11f]{border-top:1px solid #e0e0e0}
@@ -1,4 +1,4 @@
1
- import { T as o, r as t } from "./index-f89b553f.mjs";
1
+ import { T as o, r as t } from "./index-43df694a.mjs";
2
2
  import "vue";
3
3
  export {
4
4
  o as default,
@@ -56,7 +56,7 @@ Minimum version required to store current data is: `+a+`.
56
56
  content: "" !important;
57
57
  display: none !important;
58
58
  }`,E8=function(t){C8(t,"."+ap+y8+Kw+`
59
- .`+ip+b8+Kw)},C8=function(t,e){var A=t.ownerDocument;if(A){var r=A.createElement("style");r.textContent=e,t.appendChild(r)}},Gw=function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),U8=function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(sp(e)||S8(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return vr(this,void 0,void 0,function(){var A,r,n,a,i=this;return ir(this,function(o){switch(o.label){case 0:return A=Gw.isSameOrigin(e),r=!op(e)&&this._options.useCORS===!0&&$A.SUPPORT_CORS_IMAGES&&!A,n=!op(e)&&!A&&!sp(e)&&typeof this._options.proxy=="string"&&$A.SUPPORT_CORS_XHR&&!r,!A&&this._options.allowTaint===!1&&!op(e)&&!sp(e)&&!n&&!r?[2]:(a=e,n?[4,this.proxy(a)]:[3,2]);case 1:a=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(s,l){var u=new Image;u.onload=function(){return s(u)},u.onerror=l,(T8(a)||r)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(function(){return s(u)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(a,i){var o=$A.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o==="text")a(s.response);else{var d=new FileReader;d.addEventListener("load",function(){return a(d.result)},!1),d.addEventListener("error",function(g){return i(g)},!1),d.readAsDataURL(s.response)}else i("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=i;var l=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=o),A._options.imageTimeout){var u=A._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return i("Timed out ("+u+"ms) proxying "+n)}}s.send()})},t}(),F8=/^data:image\/svg\+xml/i,N8=/^data:image\/.*;base64,/i,Q8=/^data:image\/.*/i,S8=function(t){return $A.SUPPORT_SVG_DRAWING||!x8(t)},op=function(t){return Q8.test(t)},T8=function(t){return N8.test(t)},sp=function(t){return t.substr(0,4)==="blob"},x8=function(t){return t.substr(-3).toLowerCase()==="svg"||F8.test(t)},Ye=function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t}(),So=function(t,e,A){return new Ye(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},Vu=function(){function t(e,A,r,n){this.type=1,this.start=e,this.startControl=A,this.endControl=r,this.end=n}return t.prototype.subdivide=function(e,A){var r=So(this.start,this.startControl,e),n=So(this.startControl,this.endControl,e),a=So(this.endControl,this.end,e),i=So(r,n,e),o=So(n,a,e),s=So(i,o,e);return A?new t(this.start,r,i,s):new t(s,o,a,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),qr=function(t){return t.type===1},R8=function(){function t(e){var A=e.styles,r=e.bounds,n=il(A.borderTopLeftRadius,r.width,r.height),a=n[0],i=n[1],o=il(A.borderTopRightRadius,r.width,r.height),s=o[0],l=o[1],u=il(A.borderBottomRightRadius,r.width,r.height),d=u[0],g=u[1],h=il(A.borderBottomLeftRadius,r.width,r.height),y=h[0],m=h[1],E=[];E.push((a+s)/r.width),E.push((y+d)/r.width),E.push((i+m)/r.height),E.push((l+g)/r.height);var B=Math.max.apply(Math,E);B>1&&(a/=B,i/=B,s/=B,l/=B,d/=B,g/=B,y/=B,m/=B);var b=r.width-s,U=r.height-g,N=r.width-d,T=r.height-m,O=A.borderTopWidth,I=A.borderRightWidth,M=A.borderBottomWidth,V=A.borderLeftWidth,Z=AA(A.paddingTop,e.bounds.width),F=AA(A.paddingRight,e.bounds.width),S=AA(A.paddingBottom,e.bounds.width),H=AA(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||i>0?uA(r.left+V/3,r.top+O/3,a-V/3,i-O/3,Jt.TOP_LEFT):new Ye(r.left+V/3,r.top+O/3),this.topRightBorderDoubleOuterBox=a>0||i>0?uA(r.left+b,r.top+O/3,s-I/3,l-O/3,Jt.TOP_RIGHT):new Ye(r.left+r.width-I/3,r.top+O/3),this.bottomRightBorderDoubleOuterBox=d>0||g>0?uA(r.left+N,r.top+U,d-I/3,g-M/3,Jt.BOTTOM_RIGHT):new Ye(r.left+r.width-I/3,r.top+r.height-M/3),this.bottomLeftBorderDoubleOuterBox=y>0||m>0?uA(r.left+V/3,r.top+T,y-V/3,m-M/3,Jt.BOTTOM_LEFT):new Ye(r.left+V/3,r.top+r.height-M/3),this.topLeftBorderDoubleInnerBox=a>0||i>0?uA(r.left+V*2/3,r.top+O*2/3,a-V*2/3,i-O*2/3,Jt.TOP_LEFT):new Ye(r.left+V*2/3,r.top+O*2/3),this.topRightBorderDoubleInnerBox=a>0||i>0?uA(r.left+b,r.top+O*2/3,s-I*2/3,l-O*2/3,Jt.TOP_RIGHT):new Ye(r.left+r.width-I*2/3,r.top+O*2/3),this.bottomRightBorderDoubleInnerBox=d>0||g>0?uA(r.left+N,r.top+U,d-I*2/3,g-M*2/3,Jt.BOTTOM_RIGHT):new Ye(r.left+r.width-I*2/3,r.top+r.height-M*2/3),this.bottomLeftBorderDoubleInnerBox=y>0||m>0?uA(r.left+V*2/3,r.top+T,y-V*2/3,m-M*2/3,Jt.BOTTOM_LEFT):new Ye(r.left+V*2/3,r.top+r.height-M*2/3),this.topLeftBorderStroke=a>0||i>0?uA(r.left+V/2,r.top+O/2,a-V/2,i-O/2,Jt.TOP_LEFT):new Ye(r.left+V/2,r.top+O/2),this.topRightBorderStroke=a>0||i>0?uA(r.left+b,r.top+O/2,s-I/2,l-O/2,Jt.TOP_RIGHT):new Ye(r.left+r.width-I/2,r.top+O/2),this.bottomRightBorderStroke=d>0||g>0?uA(r.left+N,r.top+U,d-I/2,g-M/2,Jt.BOTTOM_RIGHT):new Ye(r.left+r.width-I/2,r.top+r.height-M/2),this.bottomLeftBorderStroke=y>0||m>0?uA(r.left+V/2,r.top+T,y-V/2,m-M/2,Jt.BOTTOM_LEFT):new Ye(r.left+V/2,r.top+r.height-M/2),this.topLeftBorderBox=a>0||i>0?uA(r.left,r.top,a,i,Jt.TOP_LEFT):new Ye(r.left,r.top),this.topRightBorderBox=s>0||l>0?uA(r.left+b,r.top,s,l,Jt.TOP_RIGHT):new Ye(r.left+r.width,r.top),this.bottomRightBorderBox=d>0||g>0?uA(r.left+N,r.top+U,d,g,Jt.BOTTOM_RIGHT):new Ye(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=y>0||m>0?uA(r.left,r.top+T,y,m,Jt.BOTTOM_LEFT):new Ye(r.left,r.top+r.height),this.topLeftPaddingBox=a>0||i>0?uA(r.left+V,r.top+O,Math.max(0,a-V),Math.max(0,i-O),Jt.TOP_LEFT):new Ye(r.left+V,r.top+O),this.topRightPaddingBox=s>0||l>0?uA(r.left+Math.min(b,r.width-I),r.top+O,b>r.width+I?0:Math.max(0,s-I),Math.max(0,l-O),Jt.TOP_RIGHT):new Ye(r.left+r.width-I,r.top+O),this.bottomRightPaddingBox=d>0||g>0?uA(r.left+Math.min(N,r.width-V),r.top+Math.min(U,r.height-M),Math.max(0,d-I),Math.max(0,g-M),Jt.BOTTOM_RIGHT):new Ye(r.left+r.width-I,r.top+r.height-M),this.bottomLeftPaddingBox=y>0||m>0?uA(r.left+V,r.top+Math.min(T,r.height-M),Math.max(0,y-V),Math.max(0,m-M),Jt.BOTTOM_LEFT):new Ye(r.left+V,r.top+r.height-M),this.topLeftContentBox=a>0||i>0?uA(r.left+V+H,r.top+O+Z,Math.max(0,a-(V+H)),Math.max(0,i-(O+Z)),Jt.TOP_LEFT):new Ye(r.left+V+H,r.top+O+Z),this.topRightContentBox=s>0||l>0?uA(r.left+Math.min(b,r.width+V+H),r.top+O+Z,b>r.width+V+H?0:s-V+H,l-(O+Z),Jt.TOP_RIGHT):new Ye(r.left+r.width-(I+F),r.top+O+Z),this.bottomRightContentBox=d>0||g>0?uA(r.left+Math.min(N,r.width-(V+H)),r.top+Math.min(U,r.height+O+Z),Math.max(0,d-(I+F)),g-(M+S),Jt.BOTTOM_RIGHT):new Ye(r.left+r.width-(I+F),r.top+r.height-(M+S)),this.bottomLeftContentBox=y>0||m>0?uA(r.left+V+H,r.top+T,Math.max(0,y-(V+H)),m-(M+S),Jt.BOTTOM_LEFT):new Ye(r.left+V+H,r.top+r.height-(M+S))}return t}(),Jt;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Jt||(Jt={}));var uA=function(t,e,A,r,n){var a=4*((Math.sqrt(2)-1)/3),i=A*a,o=r*a,s=t+A,l=e+r;switch(n){case Jt.TOP_LEFT:return new Vu(new Ye(t,l),new Ye(t,l-o),new Ye(s-i,e),new Ye(s,e));case Jt.TOP_RIGHT:return new Vu(new Ye(t,e),new Ye(t+i,e),new Ye(s,l-o),new Ye(s,l));case Jt.BOTTOM_RIGHT:return new Vu(new Ye(s,e),new Ye(s,e+o),new Ye(t+i,l),new Ye(t,l));case Jt.BOTTOM_LEFT:default:return new Vu(new Ye(s,l),new Ye(s-i,l),new Ye(t,e+o),new Ye(t,e))}},Mu=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},I8=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},Ou=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},V8=function(){function t(e,A,r){this.offsetX=e,this.offsetY=A,this.matrix=r,this.type=0,this.target=6}return t}(),Lu=function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t}(),M8=function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t}(),O8=function(t){return t.type===0},zw=function(t){return t.type===1},L8=function(t){return t.type===2},Yw=function(t,e){return t.length===e.length?t.some(function(A,r){return A===e[r]}):!1},k8=function(t,e,A,r,n){return t.map(function(a,i){switch(i){case 0:return a.add(e,A);case 1:return a.add(e+r,A);case 2:return a.add(e+r,A+n);case 3:return a.add(e,A+n)}return a})},Xw=function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),qw=function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new R8(this.container),this.container.styles.opacity<1&&this.effects.push(new M8(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new V8(r,n,a))}if(this.container.styles.overflowX!==0){var i=Mu(this.curves),o=Ou(this.curves);Yw(i,o)?this.effects.push(new Lu(i,6)):(this.effects.push(new Lu(i,2)),this.effects.push(new Lu(o,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var a=r.effects.filter(function(s){return!zw(s)});if(A||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,a),A=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var i=Mu(r.curves),o=Ou(r.curves);Yw(i,o)||n.unshift(new Lu(o,6))}}else n.unshift.apply(n,a);r=r.parent}return n.filter(function(s){return PA(s.target,e)})},t}(),lp=function(t,e,A,r){t.container.elements.forEach(function(n){var a=PA(n.flags,4),i=PA(n.flags,2),o=new qw(n,t);PA(n.styles.display,2048)&&r.push(o);var s=PA(n.flags,8)?[]:r;if(a||i){var l=a||n.styles.isPositioned()?A:e,u=new Xw(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var d=n.styles.zIndex.order;if(d<0){var g=0;l.negativeZIndex.some(function(y,m){return d>y.element.container.styles.zIndex.order?(g=m,!1):g>0}),l.negativeZIndex.splice(g,0,u)}else if(d>0){var h=0;l.positiveZIndex.some(function(y,m){return d>=y.element.container.styles.zIndex.order?(h=m+1,!1):h>0}),l.positiveZIndex.splice(h,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);lp(o,u,a?u:A,s)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),lp(o,e,A,s);PA(n.flags,8)&&$w(n,s)})},$w=function(t,e){for(var A=t instanceof q0?t.start:1,r=t instanceof q0?t.reversed:!1,n=0;n<e.length;n++){var a=e[n];a.container instanceof Cw&&typeof a.container.value=="number"&&a.container.value!==0&&(A=a.container.value),a.listValue=fl(A,a.container.styles.listStyleType,!0),A+=r?-1:1}},H8=function(t){var e=new qw(t,null),A=new Xw(e),r=[];return lp(e,A,A,r),$w(e.container,r),A},ey=function(t,e){switch(e){case 0:return $r(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return $r(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return $r(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return $r(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},D8=function(t,e){switch(e){case 0:return $r(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return $r(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return $r(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return $r(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},P8=function(t,e){switch(e){case 0:return $r(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return $r(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return $r(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return $r(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},W8=function(t,e){switch(e){case 0:return ku(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return ku(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return ku(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return ku(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},ku=function(t,e){var A=[];return qr(t)?A.push(t.subdivide(.5,!1)):A.push(t),qr(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},$r=function(t,e,A,r){var n=[];return qr(t)?n.push(t.subdivide(.5,!1)):n.push(t),qr(A)?n.push(A.subdivide(.5,!0)):n.push(A),qr(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),qr(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},ty=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},Hu=function(t){var e=t.styles,A=t.bounds,r=AA(e.paddingLeft,A.width),n=AA(e.paddingRight,A.width),a=AA(e.paddingTop,A.width),i=AA(e.paddingBottom,A.width);return A.add(r+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+a+i))},_8=function(t,e){return t===0?e.bounds:t===2?Hu(e):ty(e)},Z8=function(t,e){return t===0?e.bounds:t===2?Hu(e):ty(e)},cp=function(t,e,A){var r=_8(xo(t.styles.backgroundOrigin,e),t),n=Z8(xo(t.styles.backgroundClip,e),t),a=j8(xo(t.styles.backgroundSize,e),A,r),i=a[0],o=a[1],s=il(xo(t.styles.backgroundPosition,e),r.width-i,r.height-o),l=J8(xo(t.styles.backgroundRepeat,e),s,a,r,n),u=Math.round(r.left+s[0]),d=Math.round(r.top+s[1]);return[l,u,d,i,o]},To=function(t){return Xt(t)&&t.value===Uo.AUTO},Du=function(t){return typeof t=="number"},j8=function(t,e,A){var r=e[0],n=e[1],a=e[2],i=t[0],o=t[1];if(!i)return[0,0];if(MA(i)&&o&&MA(o))return[AA(i,A.width),AA(o,A.height)];var s=Du(a);if(Xt(i)&&(i.value===Uo.CONTAIN||i.value===Uo.COVER)){if(Du(a)){var l=A.width/A.height;return l<a!=(i.value===Uo.COVER)?[A.width,A.width/a]:[A.height*a,A.height]}return[A.width,A.height]}var u=Du(r),d=Du(n),g=u||d;if(To(i)&&(!o||To(o))){if(u&&d)return[r,n];if(!s&&!g)return[A.width,A.height];if(g&&s){var h=u?r:n*a,y=d?n:r/a;return[h,y]}var m=u?r:A.width,E=d?n:A.height;return[m,E]}if(s){var B=0,b=0;return MA(i)?B=AA(i,A.width):MA(o)&&(b=AA(o,A.height)),To(i)?B=b*a:(!o||To(o))&&(b=B/a),[B,b]}var U=null,N=null;if(MA(i)?U=AA(i,A.width):o&&MA(o)&&(N=AA(o,A.height)),U!==null&&(!o||To(o))&&(N=u&&d?U/r*n:A.height),N!==null&&To(i)&&(U=u&&d?N/n*r:A.width),U!==null&&N!==null)return[U,N];throw new Error("Unable to calculate background-size for element")},xo=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},J8=function(t,e,A,r,n){var a=e[0],i=e[1],o=A[0],s=A[1];switch(t){case 2:return[new Ye(Math.round(r.left),Math.round(r.top+i)),new Ye(Math.round(r.left+r.width),Math.round(r.top+i)),new Ye(Math.round(r.left+r.width),Math.round(s+r.top+i)),new Ye(Math.round(r.left),Math.round(s+r.top+i))];case 3:return[new Ye(Math.round(r.left+a),Math.round(r.top)),new Ye(Math.round(r.left+a+o),Math.round(r.top)),new Ye(Math.round(r.left+a+o),Math.round(r.height+r.top)),new Ye(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new Ye(Math.round(r.left+a),Math.round(r.top+i)),new Ye(Math.round(r.left+a+o),Math.round(r.top+i)),new Ye(Math.round(r.left+a+o),Math.round(r.top+i+s)),new Ye(Math.round(r.left+a),Math.round(r.top+i+s))];default:return[new Ye(Math.round(n.left),Math.round(n.top)),new Ye(Math.round(n.left+n.width),Math.round(n.top)),new Ye(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Ye(Math.round(n.left),Math.round(n.height+n.top))]}},K8="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ay="Hidden Text",G8=function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var r=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),i=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=A,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",i.appendChild(r),n.src=K8,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=A,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(Ay)),r.appendChild(a),r.appendChild(n);var o=n.offsetTop-a.offsetTop+2;r.removeChild(a),r.appendChild(this._document.createTextNode(Ay)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return i.removeChild(r),{baseline:o,middle:s}},t.prototype.getMetrics=function(e,A){var r=e+" "+A;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,A)),this._data[r]},t}(),ry=function(){function t(e,A){this.context=e,this.options=A}return t}(),z8=1e4,Y8=function(t){fn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new G8(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(A){for(var r=this;this._activeEffects.length;)this.popEffect();A.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(A){this.ctx.save(),L8(A)&&(this.ctx.globalAlpha=A.opacity),O8(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),zw(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return vr(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return r=A.element.container.styles,r.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return vr(this,void 0,void 0,function(){return ir(this,function(r){switch(r.label){case 0:if(PA(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(A)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,r,n){var a=this;if(r===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+n);else{var i=X0(A.text);i.reduce(function(o,s){return a.ctx.fillText(s,o,A.bounds.top+n),o+a.ctx.measureText(s).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var r=A.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=tH(A.fontFamily).join(", "),a=al(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,r,A.fontWeight,a,n].join(" "),n,a]},e.prototype.renderTextNode=function(A,r){return vr(this,void 0,void 0,function(){var n,a,i,o,s,l,u,d,g=this;return ir(this,function(h){return n=this.createFontStyle(r),a=n[0],i=n[1],o=n[2],this.ctx.font=a,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(i,o),l=s.baseline,u=s.middle,d=r.paintOrder,A.textBounds.forEach(function(y){d.forEach(function(m){switch(m){case 0:g.ctx.fillStyle=JA(r.color),g.renderTextWithLetterSpacing(y,r.letterSpacing,l);var E=r.textShadow;E.length&&y.text.trim().length&&(E.slice(0).reverse().forEach(function(B){g.ctx.shadowColor=JA(B.color),g.ctx.shadowOffsetX=B.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=B.offsetY.number*g.options.scale,g.ctx.shadowBlur=B.blur.number,g.renderTextWithLetterSpacing(y,r.letterSpacing,l)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),r.textDecorationLine.length&&(g.ctx.fillStyle=JA(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(B){switch(B){case 1:g.ctx.fillRect(y.bounds.left,Math.round(y.bounds.top+l),y.bounds.width,1);break;case 2:g.ctx.fillRect(y.bounds.left,Math.round(y.bounds.top),y.bounds.width,1);break;case 3:g.ctx.fillRect(y.bounds.left,Math.ceil(y.bounds.top+u),y.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&y.text.trim().length&&(g.ctx.strokeStyle=JA(r.webkitTextStrokeColor),g.ctx.lineWidth=r.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(y.text,y.bounds.left,y.bounds.top+l)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,r,n){if(n&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var a=Hu(A),i=Ou(r);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,A.intrinsicWidth,A.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return vr(this,void 0,void 0,function(){var r,n,a,i,o,s,b,b,l,u,d,g,N,h,y,T,m,E,B,b,U,N,T;return ir(this,function(O){switch(O.label){case 0:this.applyEffects(A.getEffects(4)),r=A.container,n=A.curves,a=r.styles,i=0,o=r.textNodes,O.label=1;case 1:return i<o.length?(s=o[i],[4,this.renderTextNode(s,a)]):[3,4];case 2:O.sent(),O.label=3;case 3:return i++,[3,1];case 4:if(!(r instanceof yw))return[3,8];O.label=5;case 5:return O.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return b=O.sent(),this.renderReplacedElement(r,n,b),[3,8];case 7:return O.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof bw&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof Ew))return[3,12];O.label=9;case 9:return O.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return b=O.sent(),this.renderReplacedElement(r,n,b),[3,12];case 11:return O.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof Qw&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:u=O.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),O.label=14;case 14:if(r instanceof $0&&(d=Math.min(r.bounds.width,r.bounds.height),r.type===Qu?r.checked&&(this.ctx.save(),this.path([new Ye(r.bounds.left+d*.39363,r.bounds.top+d*.79),new Ye(r.bounds.left+d*.16,r.bounds.top+d*.5549),new Ye(r.bounds.left+d*.27347,r.bounds.top+d*.44071),new Ye(r.bounds.left+d*.39694,r.bounds.top+d*.5649),new Ye(r.bounds.left+d*.72983,r.bounds.top+d*.23),new Ye(r.bounds.left+d*.84,r.bounds.top+d*.34085),new Ye(r.bounds.left+d*.39363,r.bounds.top+d*.79)]),this.ctx.fillStyle=JA(Uw),this.ctx.fill(),this.ctx.restore()):r.type===Su&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+d/2,r.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=JA(Uw),this.ctx.fill(),this.ctx.restore())),X8(r)&&r.value.length){switch(g=this.createFontStyle(a),N=g[0],h=g[1],y=this.fontMetrics.getMetrics(N,h).baseline,this.ctx.font=N,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=$8(r.styles.textAlign),T=Hu(r),m=0,r.styles.textAlign){case 1:m+=T.width/2;break;case 2:m+=T.width;break}E=T.add(m,0,0,-T.height/2+1),this.ctx.save(),this.path([new Ye(T.left,T.top),new Ye(T.left+T.width,T.top),new Ye(T.left+T.width,T.top+T.height),new Ye(T.left,T.top+T.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new cl(r.value,E),a.letterSpacing,y),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!PA(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(B=r.styles.listStyleImage,B.type!==0)return[3,18];b=void 0,U=B.url,O.label=15;case 15:return O.trys.push([15,17,,18]),[4,this.context.cache.match(U)];case 16:return b=O.sent(),this.ctx.drawImage(b,r.bounds.left-(b.width+10),r.bounds.top),[3,18];case 17:return O.sent(),this.context.logger.error("Error loading list-style-image "+U),[3,18];case 18:return[3,20];case 19:A.listValue&&r.styles.listStyleType!==-1&&(N=this.createFontStyle(a)[0],this.ctx.font=N,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",T=new Gn(r.bounds.left,r.bounds.top+AA(r.styles.paddingTop,r.bounds.width),r.bounds.width,Aw(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new cl(A.listValue,T),a.letterSpacing,Aw(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),O.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return vr(this,void 0,void 0,function(){var r,n,B,a,i,B,o,s,B,l,u,B,d,g,B,h,y,B,m,E,B;return ir(this,function(b){switch(b.label){case 0:if(PA(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:b.sent(),r=0,n=A.negativeZIndex,b.label=2;case 2:return r<n.length?(B=n[r],[4,this.renderStack(B)]):[3,5];case 3:b.sent(),b.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:b.sent(),a=0,i=A.nonInlineLevel,b.label=7;case 7:return a<i.length?(B=i[a],[4,this.renderNode(B)]):[3,10];case 8:b.sent(),b.label=9;case 9:return a++,[3,7];case 10:o=0,s=A.nonPositionedFloats,b.label=11;case 11:return o<s.length?(B=s[o],[4,this.renderStack(B)]):[3,14];case 12:b.sent(),b.label=13;case 13:return o++,[3,11];case 14:l=0,u=A.nonPositionedInlineLevel,b.label=15;case 15:return l<u.length?(B=u[l],[4,this.renderStack(B)]):[3,18];case 16:b.sent(),b.label=17;case 17:return l++,[3,15];case 18:d=0,g=A.inlineLevel,b.label=19;case 19:return d<g.length?(B=g[d],[4,this.renderNode(B)]):[3,22];case 20:b.sent(),b.label=21;case 21:return d++,[3,19];case 22:h=0,y=A.zeroOrAutoZIndexOrTransformedOrOpacity,b.label=23;case 23:return h<y.length?(B=y[h],[4,this.renderStack(B)]):[3,26];case 24:b.sent(),b.label=25;case 25:return h++,[3,23];case 26:m=0,E=A.positiveZIndex,b.label=27;case 27:return m<E.length?(B=E[m],[4,this.renderStack(B)]):[3,30];case 28:b.sent(),b.label=29;case 29:return m++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var r=this;A.forEach(function(n,a){var i=qr(n)?n.start:n;a===0?r.ctx.moveTo(i.x,i.y):r.ctx.lineTo(i.x,i.y),qr(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(A,r,n,a){this.path(A),this.ctx.fillStyle=r,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},e.prototype.resizeImage=function(A,r,n){var a;if(A.width===r&&A.height===n)return A;var i=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,o=i.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,n);var s=o.getContext("2d");return s.drawImage(A,0,0,A.width,A.height,0,0,r,n),o},e.prototype.renderBackgroundImage=function(A){return vr(this,void 0,void 0,function(){var r,n,a,i,o,s;return ir(this,function(l){switch(l.label){case 0:r=A.styles.backgroundImage.length-1,n=function(u){var d,g,h,Z,G,ne,H,P,M,y,Z,G,ne,H,P,m,E,B,b,U,N,T,O,I,M,V,Z,F,S,H,P,Y,G,ne,te,Ae,$,ce,Q,_,j,z;return ir(this,function(re){switch(re.label){case 0:if(u.type!==0)return[3,5];d=void 0,g=u.url,re.label=1;case 1:return re.trys.push([1,3,,4]),[4,a.context.cache.match(g)];case 2:return d=re.sent(),[3,4];case 3:return re.sent(),a.context.logger.error("Error loading background-image "+g),[3,4];case 4:return d&&(h=cp(A,r,[d.width,d.height,d.width/d.height]),Z=h[0],G=h[1],ne=h[2],H=h[3],P=h[4],M=a.ctx.createPattern(a.resizeImage(d,H,P),"repeat"),a.renderRepeat(Z,M,G,ne)),[3,6];case 5:OL(u)?(y=cp(A,r,[null,null,null]),Z=y[0],G=y[1],ne=y[2],H=y[3],P=y[4],m=xL(u.angle,H,P),E=m[0],B=m[1],b=m[2],U=m[3],N=m[4],T=document.createElement("canvas"),T.width=H,T.height=P,O=T.getContext("2d"),I=O.createLinearGradient(B,U,b,N),jB(u.stops,E).forEach(function(ie){return I.addColorStop(ie.stop,JA(ie.color))}),O.fillStyle=I,O.fillRect(0,0,H,P),H>0&&P>0&&(M=a.ctx.createPattern(T,"repeat"),a.renderRepeat(Z,M,G,ne))):LL(u)&&(V=cp(A,r,[null,null,null]),Z=V[0],F=V[1],S=V[2],H=V[3],P=V[4],Y=u.position.length===0?[O0]:u.position,G=AA(Y[0],H),ne=AA(Y[Y.length-1],P),te=RL(u,G,ne,H,P),Ae=te[0],$=te[1],Ae>0&&$>0&&(ce=a.ctx.createRadialGradient(F+G,S+ne,0,F+G,S+ne,Ae),jB(u.stops,Ae*2).forEach(function(ie){return ce.addColorStop(ie.stop,JA(ie.color))}),a.path(Z),a.ctx.fillStyle=ce,Ae!==$?(Q=A.bounds.left+.5*A.bounds.width,_=A.bounds.top+.5*A.bounds.height,j=$/Ae,z=1/j,a.ctx.save(),a.ctx.translate(Q,_),a.ctx.transform(1,0,0,j,0,0),a.ctx.translate(-Q,-_),a.ctx.fillRect(F,z*(S-_)+_,H,P*z),a.ctx.restore()):a.ctx.fill())),re.label=6;case 6:return r--,[2]}})},a=this,i=0,o=A.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(s=o[i],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,r,n){return vr(this,void 0,void 0,function(){return ir(this,function(a){return this.path(ey(n,r)),this.ctx.fillStyle=JA(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,r,n,a){return vr(this,void 0,void 0,function(){var i,o;return ir(this,function(s){switch(s.label){case 0:return r<3?[4,this.renderSolidBorder(A,n,a)]:[3,2];case 1:return s.sent(),[2];case 2:return i=D8(a,n),this.path(i),this.ctx.fillStyle=JA(A),this.ctx.fill(),o=P8(a,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return vr(this,void 0,void 0,function(){var r,n,a,i,o,s,l,u,d=this;return ir(this,function(g){switch(g.label){case 0:return this.applyEffects(A.getEffects(2)),r=A.container.styles,n=!Qa(r.backgroundColor)||r.backgroundImage.length,a=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],i=q8(xo(r.backgroundClip,0),A.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),Qa(r.backgroundColor)||(this.ctx.fillStyle=JA(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){d.ctx.save();var y=Mu(A.curves),m=h.inset?0:z8,E=k8(y,-m+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(d.path(y),d.ctx.clip(),d.mask(E)):(d.mask(y),d.ctx.clip(),d.path(E)),d.ctx.shadowOffsetX=h.offsetX.number+m,d.ctx.shadowOffsetY=h.offsetY.number,d.ctx.shadowColor=JA(h.color),d.ctx.shadowBlur=h.blur.number,d.ctx.fillStyle=h.inset?JA(h.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),g.label=2;case 2:o=0,s=0,l=a,g.label=3;case 3:return s<l.length?(u=l[s],u.style!==0&&!Qa(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,3)];case 6:return g.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,A.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,A.curves)];case 10:g.sent(),g.label=11;case 11:o++,g.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,r,n,a,i){return vr(this,void 0,void 0,function(){var o,s,l,u,d,g,h,y,m,E,B,b,U,N,T,O,T,O;return ir(this,function(I){return this.ctx.save(),o=W8(a,n),s=ey(a,n),i===2&&(this.path(s),this.ctx.clip()),qr(s[0])?(l=s[0].start.x,u=s[0].start.y):(l=s[0].x,u=s[0].y),qr(s[1])?(d=s[1].end.x,g=s[1].end.y):(d=s[1].x,g=s[1].y),n===0||n===2?h=Math.abs(l-d):h=Math.abs(u-g),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(s.slice(0,2)),y=r<3?r*3:r*2,m=r<3?r*2:r,i===3&&(y=r,m=r),E=!0,h<=y*2?E=!1:h<=y*2+m?(B=h/(2*y+m),y*=B,m*=B):(b=Math.floor((h+m)/(y+m)),U=(h-b*y)/(b-1),N=(h-(b+1)*y)/b,m=N<=0||Math.abs(m-U)<Math.abs(m-N)?U:N),E&&(i===3?this.ctx.setLineDash([0,y+m]):this.ctx.setLineDash([y,m])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=JA(A),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(qr(s[0])&&(T=s[3],O=s[0],this.ctx.beginPath(),this.formatPath([new Ye(T.end.x,T.end.y),new Ye(O.start.x,O.start.y)]),this.ctx.stroke()),qr(s[1])&&(T=s[1],O=s[2],this.ctx.beginPath(),this.formatPath([new Ye(T.end.x,T.end.y),new Ye(O.start.x,O.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return vr(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=H8(A),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(ry),X8=function(t){return t instanceof Nw||t instanceof Fw?!0:t instanceof $0&&t.type!==Su&&t.type!==Qu},q8=function(t,e){switch(t){case 0:return Mu(e);case 2:return I8(e);case 1:default:return Ou(e)}},$8=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},eH=["-apple-system","system-ui"],tH=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return eH.indexOf(e)===-1}):t},AH=function(t){fn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(A){return vr(this,void 0,void 0,function(){var r,n;return ir(this,function(a){switch(a.label){case 0:return r=Y0(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,rH(r)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(ry),rH=function(t){return new Promise(function(e,A){var r=new Image;r.onload=function(){e(r)},r.onerror=A,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},nH=function(){function t(e){var A=e.id,r=e.enabled;this.id=A,this.enabled=r,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Gc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Gc([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Gc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Gc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t}(),aH=function(){function t(e,A){var r;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new nH({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new U8(this,e)}return t.instanceCount=1,t}(),ny=function(t,e){return e===void 0&&(e={}),iH(t,e)};typeof window<"u"&&Gw.setContext(window);var iH=function(t,e){return vr(void 0,void 0,void 0,function(){var A,r,n,a,i,o,s,l,u,d,g,h,y,m,E,B,b,U,N,T,I,O,I,M,V,Z,F,S,H,P,Y,G,ne,te,Ae,$,ce,Q,_,j;return ir(this,function(z){switch(z.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(r=A.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(M=e.allowTaint)!==null&&M!==void 0?M:!1,imageTimeout:(V=e.imageTimeout)!==null&&V!==void 0?V:15e3,proxy:e.proxy,useCORS:(Z=e.useCORS)!==null&&Z!==void 0?Z:!1},a=p0({logging:(F=e.logging)!==null&&F!==void 0?F:!0,cache:e.cache},n),i={windowWidth:(S=e.windowWidth)!==null&&S!==void 0?S:r.innerWidth,windowHeight:(H=e.windowHeight)!==null&&H!==void 0?H:r.innerHeight,scrollX:(P=e.scrollX)!==null&&P!==void 0?P:r.pageXOffset,scrollY:(Y=e.scrollY)!==null&&Y!==void 0?Y:r.pageYOffset},o=new Gn(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),s=new aH(a,o),l=(G=e.foreignObjectRendering)!==null&&G!==void 0?G:!1,u={allowTaint:(ne=e.allowTaint)!==null&&ne!==void 0?ne:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new Jw(s,t,u),g=d.clonedReferenceElement,g?[4,d.toIFrame(A,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=z.sent(),y=tp(g)||s8(g)?kM(g.ownerDocument):zc(s,g),m=y.width,E=y.height,B=y.left,b=y.top,U=oH(s,g,e.backgroundColor),N={canvas:e.canvas,backgroundColor:U,scale:(Ae=(te=e.scale)!==null&&te!==void 0?te:r.devicePixelRatio)!==null&&Ae!==void 0?Ae:1,x:(($=e.x)!==null&&$!==void 0?$:0)+B,y:((ce=e.y)!==null&&ce!==void 0?ce:0)+b,width:(Q=e.width)!==null&&Q!==void 0?Q:Math.ceil(m),height:(_=e.height)!==null&&_!==void 0?_:Math.ceil(E)},l?(s.logger.debug("Document cloned, using foreign object rendering"),I=new AH(s,N),[4,I.render(g)]):[3,3];case 2:return T=z.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+B+","+b+" with size "+m+"x"+E+" using computed rendering"),s.logger.debug("Starting DOM parsing"),O=Tw(s,g),U===O.styles.backgroundColor&&(O.styles.backgroundColor=Yn.TRANSPARENT),s.logger.debug("Starting renderer for element at "+N.x+","+N.y+" with size "+N.width+"x"+N.height),I=new Y8(s,N),[4,I.render(O)];case 4:T=z.sent(),z.label=5;case 5:return(!((j=e.removeContainer)!==null&&j!==void 0)||j)&&(Jw.destroy(h)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,T]}})})},oH=function(t,e,A){var r=e.ownerDocument,n=r.documentElement?ol(t,getComputedStyle(r.documentElement).backgroundColor):Yn.TRANSPARENT,a=r.body?ol(t,getComputedStyle(r.body).backgroundColor):Yn.TRANSPARENT,i=typeof A=="string"?ol(t,A):A===null?Yn.TRANSPARENT:4294967295;return e===r.documentElement?Qa(n)?Qa(a)?i:a:n:i};const ay=Object.freeze(Object.defineProperty({__proto__:null,default:ny},Symbol.toStringTag,{value:"Module"})),_q="",sH={class:"label-designer"},lH={class:"toolbar"},cH={class:"center-container"},uH={key:0,class:"loader-container"},fH={class:"center-toolbar"},hH={class:"zoom-controls"},dH=["disabled"],pH=["disabled"],gH={class:"canvas-container"},mH={class:"ruler-horizontal"},vH={class:"ruler-vertical"},BH={key:0,class:"drag-extend-lines"},wH={key:1,class:"alignment-guides"},yH=["data-item-id","onMousedown"],bH=["onMousedown"],EH=["onMousedown"],CH=["onMousedown"],UH=["onMousedown"],FH=["onMousedown"],NH=["onMousedown"],QH=["onMousedown"],SH=["onMousedown"],TH=["onMousedown"],xH={class:"property-panel",tabindex:"0"},RH={class:"property-panel-operate"},IH={class:"property-panel-title"},VH=["innerHTML"],MH={class:"position-controls"},OH={class:"control-group"},LH={class:"number-input"},kH=["value"],HH={class:"control-group"},DH={class:"number-input"},PH=["value"],WH={key:0,class:"control-group"},_H={class:"number-input"},ZH=["value"],jH={key:1,class:"control-group"},JH={class:"number-input"},KH=["value"],GH={key:2,class:"control-group"},zH={class:"number-input"},YH={class:"rotation-display"},XH={key:3,class:"control-group"},qH={class:"switch-input"},Pu=.05,$H=jA({__name:"panels",props:{templateInfo:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},options:{type:Object,default:()=>({})},showGraphConfig:{type:Boolean,default:!1},templateType:{type:String,default:"lodop"},config:{type:Object,default:()=>({})}},setup(t,{expose:e}){const A=t,r=f.ref({}),n=f.ref(0),a=f.ref(!0),i=f.ref([]),o=f.ref(1);let s=1;const l=f.computed(()=>{var ee;return((ee=r.value)==null?void 0:ee.printWidth)||0}),u=f.computed(()=>{var ee;return((ee=r.value)==null?void 0:ee.printHeight)||0});f.ref(!1);const d=f.ref(!1),g=f.ref(!1),h=new ui(mr.CACHE.STYLE_CACHE_SIZE),y=new ui(mr.CACHE.BOUNDING_BOX_CACHE_SIZE),m=new Map(Gv.map(ee=>[ee.type,ee])),{selectedItems:E,selectItem:B,getCurrentSelected:b,clearSelection:U}=NM(),{dragging:N,dragItem:T,startDrag:O}=UM({scale:o,canvasWidth:l,canvasHeight:u,selectItem:B,onStartDrag:()=>{d.value=!0,f.nextTick(()=>{H()})},onStopDrag:()=>{d.value=!1,f.nextTick(()=>{g.value=!1}),P()},onDragUpdate:()=>{H()}}),{startResize:I,resizing:M,resizeDirection:V,resizeItem:Z}=FM(l,u,o,E,()=>{const ee=b();te(ee)}),{alignmentGuides:F,showGuides:S,updateAlignmentGuides:H,clearAlignmentGuides:P}=MM({items:i,dragItem:T,resizeItem:Z,dragging:N,resizing:M,resizeDirection:V,canvasWidth:l,canvasHeight:u}),{handleMouseWheel:Y,adjustRotation:G,adjustComponentToFitCanvas:ne,updateAspectRatio:te}=IM(E,l,u);f.watch(()=>E.value,()=>{h.clear()},{deep:!0}),f.watch(()=>M.value,ee=>{ee?H():P()}),f.watch(()=>{var ee;return(ee=Z.value)==null?void 0:ee.props},()=>{M.value&&H()},{deep:!0}),f.watch(()=>T.value,()=>{(N.value||M.value)&&H()}),f.watch(()=>Z.value,()=>{(N.value||M.value)&&H()}),f.watch(()=>i.value,()=>{(N.value||M.value)&&H()},{deep:!0});const Ae=(ee,K)=>{var we;(!K||Number(K)<=0&&(ee==="width"||ee==="height"))&&ot((we=b())==null?void 0:we.id)},$=ee=>{const K=`${ee.id}_${Ee(ee.props.x,1)}_${Ee(ee.props.y,1)}_${ee.props.width}_${ee.props.height}_${ee.props.rotation}`;if(y.has(K))return y.get(K);const we=hi(ee.props.x,ee.props.y,ee.props.width,ee.props.height,ee.props.rotation||0);return y.set(K,we),we},ce=ee=>{const K=$(ee),we=Js(K);return{minX:Ee(we.minX,3),maxX:Ee(we.maxX,3),minY:Ee(we.minY,3),maxY:Ee(we.maxY,3),width:Ee(we.maxX-we.minX,3),height:Ee(we.maxY-we.minY,3),centerX:Ee((we.minX+we.maxX)/2,3),centerY:Ee((we.minY+we.maxY)/2,3)}},Q=(ee,K)=>{const we=ce(ee),At=(at=>at.type==="rectangle"?parseFloat(at.props.LineWidth||"0.5")/3.78:0)(ee),_e=(at,Ne,it)=>{if(it==="rectangle"&&At>0){const je=At/2;if(Ne==="left"||Ne==="top")return at-je;if(Ne==="right"||Ne==="bottom")return at+je}return at};if(ee.type==="line")switch(K){case"left":return{left:Ee(_e(we.minX,K,ee.type),3)+"mm"};case"right":return{left:Ee(_e(we.maxX,K,ee.type),3)+"mm"};case"top":return{top:Ee(_e(we.minY,K,ee.type),3)+"mm"};case"bottom":return{top:Ee(_e(we.maxY,K,ee.type),3)+"mm"};default:return{}}if(ee.type==="verline"&&K==="right"){const Ne=parseFloat(ee.props.LineWidth||"0.5")/3.78;return{left:Ee(_e(we.minX+Ne,K,ee.type),3)+"mm"}}switch(K){case"left":return{left:Ee(_e(we.minX,K,ee.type),3)+"mm"};case"right":return{left:Ee(_e(we.maxX,K,ee.type),3)+"mm"};case"top":return{top:Ee(_e(we.minY,K,ee.type),3)+"mm"};case"bottom":return{top:Ee(_e(we.maxY,K,ee.type),3)+"mm"};default:return{}}},_=()=>{f.nextTick(()=>{const ee=document.querySelector(".canvas-container");if(!ee||!l.value||!u.value)return;const K=ee.getBoundingClientRect(),we=co(l.value),ze=co(u.value),At=16,_e=21,at=21,Ne=20,it=24,je=24,ye=K.width-At*2-_e-je,mt=K.height-At-at-Ne-it;let Pe=ye/we,ft=mt/ze,qt=Math.min(Pe,ft);qt=qt*.95;const vt=Math.min(4,qt);s=Math.max(.8,Math.min(vt,qt)),o.value=j(s,1),setTimeout(()=>{n.value=1,a.value=!1},500)})};function j(ee,K){ee=ee.toString();let we=ee.indexOf(".");return we!==-1?ee=ee.substring(0,K+we+1):ee=ee.substring(0),Number(parseFloat(ee).toFixed(K))}const z=ee=>m.get(ee)||null,re=ee=>{const K=E.value.indexOf(ee),we=K===E.value.length-1,ze=K!==-1,At=`${ee.id}_${Math.round(ee.props.x*10)}_${Math.round(ee.props.y*10)}_${ee.props.width}_${ee.props.height}_${ee.props.rotation}_${ze}_${we}`;if(h.has(At))return h.get(At);const _e={width:ee.props.width+"mm",height:ee.props.height+"mm",transform:`translate(${ee.props.x}mm, ${ee.props.y}mm) rotate(${ee.props.rotation}deg)`};return ze?we?_e.zIndex=1e3:_e.zIndex=999:_e.zIndex=10,h.set(At,_e),_e},ie=ee=>{const K=E.value.some(ze=>ze.id===ee.id),we=b()===ee;return{"component-selected":K,"component-current":K&&we,"no-outline":K&&(ee.type==="line"||ee.type==="verline")}},he=(ee,K)=>{const ze=((ee.props.rotation||0)%360+360)%360;if(ee.type==="line"&&(K==="left"||K==="right")){let Ne;const je=((K==="left"?270:90)+ze)%360;return je>=337.5||je<22.5?Ne="n-resize":je>=22.5&&je<67.5?Ne="ne-resize":je>=67.5&&je<112.5?Ne="e-resize":je>=112.5&&je<157.5?Ne="se-resize":je>=157.5&&je<202.5?Ne="s-resize":je>=202.5&&je<247.5?Ne="sw-resize":je>=247.5&&je<292.5?Ne="w-resize":je>=292.5&&je<337.5&&(Ne="nw-resize"),{cursor:Ne,top:"50%",transform:"translateY(-50%)"}}if(ee.type==="verline"&&(K==="top"||K==="bottom")){let Ne;const je=((K==="top"?0:180)+ze)%360;return je>=337.5||je<22.5?Ne="n-resize":je>=22.5&&je<67.5?Ne="ne-resize":je>=67.5&&je<112.5?Ne="e-resize":je>=112.5&&je<157.5?Ne="se-resize":je>=157.5&&je<202.5?Ne="s-resize":je>=202.5&&je<247.5?Ne="sw-resize":je>=247.5&&je<292.5?Ne="w-resize":je>=292.5&&je<337.5&&(Ne="nw-resize"),{cursor:Ne,left:"50%",transform:"translateX(-50%)"}}const _e=({top:0,"top-right":45,right:90,"bottom-right":135,bottom:180,"bottom-left":225,left:270,"top-left":315}[K]+ze)%360;let at="pointer";return _e>=337.5||_e<22.5?at="n-resize":_e>=22.5&&_e<67.5?at="ne-resize":_e>=67.5&&_e<112.5?at="e-resize":_e>=112.5&&_e<157.5?at="se-resize":_e>=157.5&&_e<202.5?at="s-resize":_e>=202.5&&_e<247.5?at="sw-resize":_e>=247.5&&_e<292.5?at="w-resize":_e>=292.5&&_e<337.5&&(at="nw-resize"),{cursor:at,display:"block",visibility:"visible",opacity:"1"}},me=()=>{o.value<4&&(o.value+=.1)},Ve=()=>{o.value>.8&&(o.value-=.1)},Te=()=>{const ee=b();if(!ee)return 0;const{x1:K}=Bo(ee);return Number(Number(K).toFixed(2))},De=()=>{const ee=b();if(!ee)return 0;const{y1:K}=Bo(ee);return Number(K.toFixed(2))},Oe=()=>{const ee=b();return ee?Number((ee.props.width||0).toFixed(2)):0},Ke=()=>{const ee=b();return ee?Number((ee.props.height||0).toFixed(2)):0},ve=(ee,K,we)=>{let ze=0;ee==="x"?ze=Te():ee==="y"?ze=De():ee==="width"?ze=Oe():ee==="height"&&(ze=Ke());const At=Number(K)-Number(ze);if(Math.abs(At)<.01){b().props[ee]="",b().props[ee]=Number(ze);return}Y(null,ee,At)};function q(ee){const K=document.activeElement.tagName.toLowerCase();if(K==="input"||K==="textarea"||!b())return;let ze=!1,At=0,_e=0;ee.key==="ArrowLeft"?(At=-Pu,ze=!0):ee.key==="ArrowRight"?(At=Pu,ze=!0):ee.key==="ArrowUp"?(_e=-Pu,ze=!0):ee.key==="ArrowDown"&&(_e=Pu,ze=!0),ze&&(At!==0&&Y(null,"x",At),_e!==0&&Y(null,"y",_e),ee.preventDefault())}const ut=({e:ee,comp:K,previewDiv:we})=>{var ze,At;(ze=ee==null?void 0:ee.dataTransfer)==null||ze.setData("comp",JSON.stringify(K)),document.body.appendChild(we),(At=ee==null?void 0:ee.dataTransfer)==null||At.setDragImage(we,0,0),setTimeout(()=>document.body.removeChild(we),0)},Xe=async ee=>{var Mt,Ht,_A;ee.preventDefault();const K=JSON.parse(((Ht=(Mt=ee==null?void 0:ee.dataTransfer)==null?void 0:Mt.getData)==null?void 0:Ht.call(Mt,"comp"))||"{}")||{},we=(K==null?void 0:K.type)||"";if(!we)return;const ze=document.querySelector("#design").getBoundingClientRect(),At=(ee.clientX-ze.left)/o.value,_e=(ee.clientY-ze.top)/o.value,at=ke.value[we]||{};let Ne=Ba(At),it=Ba(_e);const je=at.width,ye=at.height;if(!at.rotation||at.rotation===0){const Zt=l.value-je,sA=u.value-ye;Ne=Math.max(0,Math.min(Ne,Zt)),it=Math.max(0,Math.min(it,sA))}else Ne=Math.max(0,Ne),it=Math.max(0,it);const{propertyPanel:mt,...Pe}=at;let ft={...Pe,x:Ee(Ne),y:Ee(it),width:Ee(je),height:Ee(ye)};if((_A=ke.value[we])!=null&&_A.propertyPanel){const Zt=fi(ke.value[we].propertyPanel)||{};if(ft={...ft,...Zt},we==="line"&&Zt.LineWidth){const dA=parseFloat(Zt.LineWidth)*.3528;ft.height=Ee(dA,3)}}const Vt=((Zt,sA)=>{const{width:dA,height:_r,lockAspectRatio:rt}=Zt;let oe=dA,xe=_r;const We=l.value-2,It=u.value-2;let bA=!1;if(dA>We&&(oe=We,bA=!0),_r>It&&(xe=It,bA=!0),rt&&bA){const lA=We/dA,pA=It/_r,xr=Math.min(lA,pA);oe=Ee(dA*xr,2),xe=Ee(_r*xr,2),oe=Math.min(oe,We),xe=Math.min(xe,It)}return{width:oe,height:xe}})(ft);if(ft.width=Vt.width,ft.height=Vt.height,Vt.width!==je||Vt.height!==ye){const Zt=l.value-Vt.width,sA=u.value-Vt.height;Ne=Math.max(0,Math.min(Ne,Zt)),it=Math.max(0,Math.min(it,sA)),ft.x=Ee(Ne),ft.y=Ee(it)}const vt={id:xA(),type:we,props:ft};if(ft.rotation&&ft.rotation!==0){const{x1:Zt,y1:sA}=Bo(vt),dA=checkAndAdjustBoundaries(Zt,sA,ft.width,ft.height,ft.rotation,l.value,u.value);(dA.x1!==Zt||dA.y1!==sA)&&h0(vt,dA.x1,dA.y1)}i.value.push(vt),B(vt)};function Qe(ee){let K=ee.target,we=null;for(;K&&K!==document.querySelector("#design");){if(K.classList&&(K.classList.contains("canvas-item")||K.classList.contains("resize-handle")||K.classList.contains("delete-btn")||K.classList.contains("rotate-handle")||K.classList.contains("property-panel")||K.tagName==="INPUT"||K.tagName==="TEXTAREA"||K.tagName==="BUTTON")){if(K.classList.contains("resize-handle")||K.classList.contains("delete-btn")||K.classList.contains("rotate-handle"))return;if(K.classList.contains("canvas-item")){const _e=K.getAttribute("data-item-id");if(we=i.value.find(at=>at.id===_e),we){const at=Le(ee.clientX,ee.clientY,we);if(at){B(at);return}else{B(we);return}}}if(K.closest(".canvas-item")){const at=K.closest(".canvas-item").getAttribute("data-item-id"),Ne=i.value.find(it=>it.id===at);if(Ne){const it=Le(ee.clientX,ee.clientY,Ne);if(it){B(it);return}else{B(Ne);return}}}if(K.closest(".canvas-item")||K.classList.contains("td-text-content")||K.classList.contains("barcode-component")||K.classList.contains("qr-code-component")||K.classList.contains("image-component")||K.classList.contains("rectangle-component")||K.classList.contains("hor-line-component")){const _e=Me(ee.clientX,ee.clientY);if(_e){const at=Le(ee.clientX,ee.clientY,_e);if(at){B(at);return}else{B(_e);return}}}break}K=K.parentElement}let ze=null;try{ze=Me(ee.clientX,ee.clientY)}catch(_e){console.error("坐标检测出错:",_e)}if(ze){const _e=Le(ee.clientX,ee.clientY,ze);if(_e){B(_e);return}else{B(ze);return}}const At=document.querySelector("#design");if(At&&At.contains(ee.target)){const _e=At.getBoundingClientRect(),at=o.value,Ne=(ee.clientX-_e.left)/at,it=(ee.clientY-_e.top)/at,je=Ba(Ne),ye=Ba(it);for(let mt=i.value.length-1;mt>=0;mt--){const Pe=i.value[mt],ft=parseFloat(Pe.props.x||0),qt=parseFloat(Pe.props.y||0),Vt=parseFloat(Pe.props.width||0),vt=parseFloat(Pe.props.height||0),Mt=1;if(je>=ft-Mt&&je<=ft+Vt+Mt&&ye>=qt-Mt&&ye<=qt+vt+Mt){B(Pe);return}}}U()}function Me(ee,K){const we=document.querySelector("#design");if(!we)return null;const ze=we.getBoundingClientRect(),At=o.value,_e=(ee-ze.left)/At,at=(K-ze.top)/At,Ne=Ba(_e),it=Ba(at);for(let je=i.value.length-1;je>=0;je--){const ye=i.value[je];if(He(Ne,it,ye))return ye}return null}function Le(ee,K,we){var mt,Pe,ft,qt;const ze=document.querySelector("#design");if(!ze)return null;const At=ze.getBoundingClientRect(),_e=o.value,at=(ee-At.left)/_e,Ne=(K-At.top)/_e,it=Ba(at),je=Ba(Ne),ye=i.value.findIndex(Vt=>Vt.id===we.id);for(let Vt=ye-1;Vt>=0;Vt--){const vt=i.value[Vt];if((mt=vt.props)!=null&&mt.x,(Pe=vt.props)!=null&&Pe.y,(ft=vt.props)!=null&&ft.width,(qt=vt.props)!=null&&qt.height,He(it,je,vt))return vt}return null}function He(ee,K,we){const ze=parseFloat(we.props.x||0),At=parseFloat(we.props.y||0),_e=parseFloat(we.props.width||0),at=parseFloat(we.props.height||0),Ne=parseFloat(we.props.rotation||0),it=Xv(ee,K,ze,At,_e,at,Ne);return it||Xv(ee,K,ze-1,At-1,_e+2,at+2,Ne)}function Ze(ee){return ee.preventDefault(),!1}const tt=(ee,K)=>{if(ee.stopPropagation(),ee.target.classList.contains("resize-handle")||ee.target.classList.contains("rotate-handle")||ee.target.classList.contains("delete-btn"))return;const we=Le(ee.clientX,ee.clientY,K);if(we){B(we),O(ee,we);return}B(K),O(ee,K)},ot=ee=>{if(h.clear(),y.clear(),i.value.find(we=>we.id===ee)&&(i.value=i.value.filter(we=>we.id!==ee)),E.value.some(we=>we.id===ee)){const we=E.value.filter(ze=>ze.id!==ee);E.value=we}f.nextTick(()=>{})},dt=ee=>{var we;const K=document.activeElement.tagName.toLowerCase();K==="input"||K==="textarea"||(ee.key==="Delete"||ee.key==="Backspace")&&E.value.length>0&&ot((we=b())==null?void 0:we.id)},wt=ee=>{if(E.value.length>0){const K=E.value[E.value.length-1];K.props.rotation=ee,ne(K,ee)}},Ut=()=>{setTimeout(()=>{const ee=document.querySelector(".center-container");if(!ee)return;const K=ee.getBoundingClientRect();ee.style.height=`calc(100vh - ${K==null?void 0:K.top}px)`,_()},200)};f.watch(()=>A.templateInfo,(ee,K)=>{ee&&K&&ee.id!==K.id?(r.value=ee||{},i.value=(ee==null?void 0:ee.items)||[]):ee&&!K?(r.value=ee||{},i.value=(ee==null?void 0:ee.items)||[]):ee&&(r.value=ee||{})},{deep:!0,immediate:!0});const{handleCopy:st,handlePaste:Bt}=VM(i,E,l,u,ne),ke=f.ref({}),Wt=f.ref(!1),Qt=async ee=>{try{Wt.value=!1,ke.value=await GV(ee),Wt.value=!0}catch{ke.value={},Wt.value=!0}};f.watch(()=>A.templateType,async ee=>{try{await Qt(ee),U(),h.clear(),y.clear()}catch{}},{immediate:!0}),f.onMounted(async()=>{Wt.value||await Qt(A.templateType),window.addEventListener("resize",Ut),window.addEventListener("keydown",dt),window.addEventListener("keydown",st),window.addEventListener("keydown",Bt),window.addEventListener("keydown",q);const ee=document.querySelector(".canvas-wrapper");ee&&ee.addEventListener("contextmenu",Ze),Ut(),WA()}),f.onBeforeUnmount(()=>{window.removeEventListener("resize",Ut),window.removeEventListener("keydown",dt),window.removeEventListener("keydown",st),window.removeEventListener("keydown",Bt),window.removeEventListener("keydown",q);const ee=document.querySelector(".canvas-wrapper");ee&&ee.removeEventListener("contextmenu",Ze),h.clear(),y.clear()});function xA(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ee=>{const K=Math.random()*16|0;return(ee==="x"?K:K&3|8).toString(16)})}const St=ee=>{var we;if(!ke.value||!ke.value[ee])return{};const K=ke.value[ee]||{};return ee==="image"&&((we=A.config)!=null&&we.image)?{...K,image:{...K.image,...A.config.image}}:K},xt=ee=>St(ee).allowRotation!==!1,hA=()=>QM(i,r.value),Rt=ee=>{r.value.graphData=ee||{},WA()},WA=()=>{var K;const ee=LM(r.value.graphData)||"";ee&&((K=document.querySelector("#design"))==null||K.appendChild(ee))},_t=async ee=>{var we;const K=JSON.parse(JSON.stringify(ee));for(const ze of K)if(ze.type==="image"&&((we=ze.props)!=null&&we.ImageSrc)){const At=ze.props.ImageSrc;typeof At=="object"&&At.fileSrc&&At.fileSrc}return K},oA=()=>new Promise(async(ee,K)=>{var we;try{U();const ze=JSON.parse(JSON.stringify(i.value)),At=((we=A.config)==null?void 0:we.textDisplayPriority)||"text";ze==null||ze.forEach(it=>{var je,ye,mt,Pe,ft,qt;if(it.type=="text"){let Vt="";const vt=((je=it==null?void 0:it.props)==null?void 0:je.FieldName)||[];if(Array.isArray(vt)){const Mt=((ye=it==null?void 0:it.props)==null?void 0:ye.FieldConnector)||" ";Vt=((mt=vt.map(Ht=>{var _A,Zt,sA;return(sA=(Zt=(_A=A.options)==null?void 0:_A.fields)==null?void 0:Zt.find(dA=>dA.value==Ht))==null?void 0:sA.label}))==null?void 0:mt.join(Mt))||""}else Vt=((qt=(ft=(Pe=A.options)==null?void 0:Pe.fields)==null?void 0:ft.find(Mt=>{var Ht;return Mt.value==((Ht=it==null?void 0:it.props)==null?void 0:Ht.FieldName)}))==null?void 0:qt.label)||"";it.props.Text=At=="text"?it.props.Text||Vt:Vt||it.props.Text}});const _e=await _t(ze),at=[...i.value];i.value=_e;const Ne=()=>{var ye;const it=((ye=document.querySelector("#design"))==null?void 0:ye.querySelectorAll("img"))||[],je=Array.from(it).map(mt=>mt.complete?Promise.resolve():new Promise(Pe=>{mt.onload=mt.onerror=Pe}));return Promise.all(je)};f.nextTick(async()=>{var mt;await new Promise(Pe=>setTimeout(Pe,100)),await Ne(),(((mt=document.querySelector("#design"))==null?void 0:mt.querySelectorAll("img"))||[]).forEach((Pe,ft)=>{});const je=document.querySelector("#design");if(!je){K(new Error("找不到要转换的DOM元素"));return}const ye=o.value;Ne().then(()=>{ny(je,{scale:Math.max(window.devicePixelRatio*2,3),useCORS:!0,allowTaint:!0,backgroundColor:null,logging:!1,imageTimeout:15e3,onclone:Pe=>{const ft=Pe.querySelector(".canvas-wrapper");if(ft){const Mt=ft.style.transform.replace(/scale\([^)]*\)/g,"").replace(/\s+/g," ").trim();ft.style.transform=Mt||"none",ft.style.opacity="1"}const qt=Pe.querySelector("#design");if(qt){const vt=window.getComputedStyle(je);for(let Mt=0;Mt<vt.length;Mt++){const Ht=vt[Mt];qt.style[Ht]=vt.getPropertyValue(Ht)}}Pe.querySelectorAll("img").forEach(vt=>{vt.style.imageRendering="high-quality",vt.style.webkitImageRendering="high-quality",vt.style.mozImageRendering="high-quality",vt.style.objectFit="contain",vt.style.objectPosition="center"})}}).then(Pe=>{i.value=at;const ft=Pe.toDataURL("image/png");ee({data:hA(),image:ft})}).catch(Pe=>{i.value=at,K(Pe)})}).catch(Pe=>{K(Pe)})})}catch(ze){K(ze)}}),Gt=()=>new Promise((ee,K)=>{i.value.forEach(ze=>{if(ze.type==="image"&&!ze.props.ImageSrc)return xs.warning("图片控件请选择图片!"),K("图片控件请选择图片!")}),ee(!0)});return e({getJson:()=>Gt().then(()=>hA()),clear:()=>{i.value=[],U()},snapshot:()=>Gt().then(()=>oA())}),(ee,K)=>{var Ne,it,je;const we=f.resolveComponent("el-button"),ze=f.resolveComponent("el-icon-info-filled"),At=f.resolveComponent("el-icon"),_e=f.resolveComponent("el-tooltip"),at=f.resolveComponent("el-switch");return f.openBlock(),f.createElementBlock("div",sH,[f.createElementVNode("div",lH,[f.createVNode(AM,{onDragStart:ut,config:t.config,propsConfig:ke.value},null,8,["config","propsConfig"])]),f.createElementVNode("div",cH,[a.value?(f.openBlock(),f.createElementBlock("div",uH,[...K[33]||(K[33]=[f.createElementVNode("div",{class:"loader-circle"},null,-1),f.createElementVNode("p",null,"设计画板加载中...",-1)])])):f.createCommentVNode("",!0),f.createElementVNode("div",fH,[t.showGraphConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(yM,{"graph-data":(Ne=r.value)==null?void 0:Ne.graphData,onSuccess:Rt},null,8,["graph-data"]),K[34]||(K[34]=f.createElementVNode("div",{style:{width:"30px"}},null,-1))],64)):f.createCommentVNode("",!0),f.createElementVNode("div",hH,[f.createElementVNode("button",{onClick:Ve,disabled:o.value<=.8},"-",8,dH),f.createElementVNode("span",null,f.toDisplayString(Math.round(o.value*100))+"%",1),f.createElementVNode("button",{onClick:me,disabled:o.value>=4},"+",8,pH)])]),f.createElementVNode("div",gH,[f.createElementVNode("div",{class:"canvas-wrapper",style:f.normalizeStyle(`transform: scale(${o.value});opacity: ${n.value};`)},[l.value&&u.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",mH,[f.createVNode(zv,{direction:"horizontal",length:l.value},null,8,["length"])]),f.createElementVNode("div",vH,[f.createVNode(zv,{direction:"vertical",length:u.value},null,8,["length"])])],64)):f.createCommentVNode("",!0),f.createElementVNode("div",{id:"design",class:"canvas",style:f.normalizeStyle(`width: ${l.value}mm; height: ${u.value}mm;`),onDrop:Xe,onDragover:K[0]||(K[0]=f.withModifiers(()=>{},["prevent"])),onPointerdown:Qe,onContextmenu:K[1]||(K[1]=f.withModifiers(()=>{},["prevent"]))},[f.unref(N)&&f.unref(T)?(f.openBlock(),f.createElementBlock("div",BH,[f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(Q(f.unref(T),"left"))},null,4),f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(Q(f.unref(T),"right"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(Q(f.unref(T),"top"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(Q(f.unref(T),"bottom"))},null,4)])):f.createCommentVNode("",!0),f.unref(S)?(f.openBlock(),f.createElementBlock("div",wH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(F).horizontal,(ye,mt)=>(f.openBlock(),f.createElementBlock("div",{key:`h-${mt}`,class:f.normalizeClass(["alignment-guide horizontal",`guide-${ye.type}`]),style:f.normalizeStyle({top:`${ye.y}mm`,left:"0",right:"0"})},null,6))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(F).vertical,(ye,mt)=>(f.openBlock(),f.createElementBlock("div",{key:`v-${mt}`,class:f.normalizeClass(["alignment-guide vertical",`guide-${ye.type}`]),style:f.normalizeStyle({left:`${ye.x}mm`,top:"0",bottom:"0"})},null,6))),128))])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.value,ye=>{var mt;return f.openBlock(),f.createElementBlock("div",{key:ye.id,class:f.normalizeClass(["canvas-item",ie(ye)]),style:f.normalizeStyle(re(ye)),"data-item-id":ye.id,onMousedown:Pe=>tt(Pe,ye)},[f.unref(b)()===ye?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[ye.props.lockAspectRatio?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[ye.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:0,class:"resize-handle top",style:f.normalizeStyle(he(ye,"top")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"top"),["stop"])},null,44,bH)):f.createCommentVNode("",!0),ye.type!=="verline"&&ye.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle right",style:f.normalizeStyle(he(ye,"right")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"right"),["stop"])},null,44,EH)):f.createCommentVNode("",!0),ye.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle bottom",style:f.normalizeStyle(he(ye,"bottom")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"bottom"),["stop"])},null,44,CH)):f.createCommentVNode("",!0),ye.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:f.normalizeClass(["resize-handle left",{"line-anchor":ye.type==="line"}]),style:f.normalizeStyle(he(ye,"left")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"left"),["stop"])},null,46,UH)):f.createCommentVNode("",!0),ye.type==="line"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle right line-anchor",style:f.normalizeStyle(he(ye,"right")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"right"),["stop"])},null,44,FH)):f.createCommentVNode("",!0)],64)),ye.type!=="line"&&ye.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle top-left",style:f.normalizeStyle(he(ye,"top-left")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"top-left"),["stop"])},null,44,NH)):f.createCommentVNode("",!0),ye.type!=="line"&&ye.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle top-right",style:f.normalizeStyle(he(ye,"top-right")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"top-right"),["stop"])},null,44,QH)):f.createCommentVNode("",!0),ye.type!=="line"&&ye.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:"resize-handle bottom-right",style:f.normalizeStyle(he(ye,"bottom-right")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"bottom-right"),["stop"])},null,44,SH)):f.createCommentVNode("",!0),ye.type!=="line"&&ye.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle bottom-left",style:f.normalizeStyle(he(ye,"bottom-left")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"bottom-left"),["stop"])},null,44,TH)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),ye.props&&Wt.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((mt=z(ye.type))==null?void 0:mt.component)||null),{key:`${ye.id}-${ye.type}`,modelValue:{...ye.props,__selected:f.unref(b)()===ye,options:A.options},propsConfig:ke.value,"onUpdate:modelValue":Pe=>{const{__selected:ft,options:qt,...Vt}=Pe;Object.keys(Vt).forEach(vt=>{Vt[vt]!==void 0&&(ye.props[vt]=Vt[vt])})}},null,8,["modelValue","propsConfig","onUpdate:modelValue"])):f.createCommentVNode("",!0)],46,yH)}),128))],36)],4)])]),f.createElementVNode("div",xH,[f.unref(E).length>0?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",RH,[f.createVNode(we,{type:"danger",onClick:K[2]||(K[2]=ye=>ot(f.unref(b)().id))},{default:f.withCtx(()=>[...K[35]||(K[35]=[f.createTextVNode("删除",-1)])]),_:1})]),f.createElementVNode("h3",IH,[K[36]||(K[36]=f.createTextVNode(" 属性设置 ",-1)),(it=St(f.unref(b)().type))!=null&&it.desc?(f.openBlock(),f.createBlock(_e,{key:0,placement:"bottom","show-arrow":!0,"raw-content":""},{content:f.withCtx(()=>[f.createElementVNode("p",{style:{"max-width":"400px",margin:"0","white-space":"pre-line"},innerHTML:St(f.unref(b)().type).desc},null,8,VH)]),default:f.withCtx(()=>[f.createVNode(At,{class:"help-icon"},{default:f.withCtx(()=>[f.createVNode(ze)]),_:1})]),_:1})):f.createCommentVNode("",!0)]),f.createElementVNode("div",MH,[f.createElementVNode("div",OH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(b)().type==="line"?"起点X:":"X坐标:"),1),f.createElementVNode("div",LH,[f.createElementVNode("button",{onClick:K[3]||(K[3]=f.withModifiers(ye=>f.unref(Y)(ye,"x",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Te(),onInput:K[4]||(K[4]=ye=>ve("x",ye.target.value)),onClick:K[5]||(K[5]=f.withModifiers(()=>{},["stop"])),onMousedown:K[6]||(K[6]=f.withModifiers(()=>{},["stop"])),onWheel:K[7]||(K[7]=f.withModifiers(()=>{},["prevent"]))},null,40,kH),f.createElementVNode("button",{onClick:K[8]||(K[8]=f.withModifiers(ye=>f.unref(Y)(ye,"x",.5),["stop"]))},"+")])]),f.createElementVNode("div",HH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(b)().type==="line"?"起点Y:":"Y坐标:"),1),f.createElementVNode("div",DH,[f.createElementVNode("button",{onClick:K[9]||(K[9]=f.withModifiers(ye=>f.unref(Y)(ye,"y",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:De(),onInput:K[10]||(K[10]=ye=>ve("y",ye.target.value)),onClick:K[11]||(K[11]=f.withModifiers(()=>{},["stop"])),onMousedown:K[12]||(K[12]=f.withModifiers(()=>{},["stop"])),onWheel:K[13]||(K[13]=f.withModifiers(()=>{},["prevent"]))},null,40,PH),f.createElementVNode("button",{onClick:K[14]||(K[14]=f.withModifiers(ye=>f.unref(Y)(ye,"y",.5),["stop"]))},"+")])]),f.unref(b)().type!=="verline"?(f.openBlock(),f.createElementBlock("div",WH,[K[37]||(K[37]=f.createElementVNode("label",null,"宽度:",-1)),f.createElementVNode("div",_H,[f.createElementVNode("button",{onClick:K[15]||(K[15]=f.withModifiers(ye=>f.unref(Y)(ye,"width",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Oe(),onInput:K[16]||(K[16]=ye=>ve("width",ye.target.value)),onClick:K[17]||(K[17]=f.withModifiers(()=>{},["stop"])),onMousedown:K[18]||(K[18]=f.withModifiers(()=>{},["stop"])),onBlur:K[19]||(K[19]=ye=>Ae("width",ye.target.value)),onWheel:K[20]||(K[20]=f.withModifiers(()=>{},["prevent"]))},null,40,ZH),f.createElementVNode("button",{onClick:K[21]||(K[21]=f.withModifiers(ye=>f.unref(Y)(ye,"width",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(b)().type!=="line"?(f.openBlock(),f.createElementBlock("div",jH,[K[38]||(K[38]=f.createElementVNode("label",null,"高度:",-1)),f.createElementVNode("div",JH,[f.createElementVNode("button",{onClick:K[22]||(K[22]=f.withModifiers(ye=>f.unref(Y)(ye,"height",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Ke(),onInput:K[23]||(K[23]=ye=>ve("height",ye.target.value)),onClick:K[24]||(K[24]=f.withModifiers(()=>{},["stop"])),onMousedown:K[25]||(K[25]=f.withModifiers(()=>{},["stop"])),onBlur:K[26]||(K[26]=ye=>Ae("height",ye.target.value)),onWheel:K[27]||(K[27]=f.withModifiers(()=>{},["prevent"]))},null,40,KH),f.createElementVNode("button",{onClick:K[28]||(K[28]=f.withModifiers(ye=>f.unref(Y)(ye,"height",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),xt(f.unref(b)().type)?(f.openBlock(),f.createElementBlock("div",GH,[K[39]||(K[39]=f.createElementVNode("label",null,"旋转:",-1)),f.createElementVNode("div",zH,[f.createElementVNode("button",{onClick:K[29]||(K[29]=f.withModifiers(ye=>f.unref(G)(-1),["stop"]))},"-"),f.createElementVNode("span",YH,f.toDisplayString(f.unref(b)().props.rotation)+"°",1),f.createElementVNode("button",{onClick:K[30]||(K[30]=f.withModifiers(ye=>f.unref(G)(1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(b)().type!=="line"?(f.openBlock(),f.createElementBlock("div",XH,[K[40]||(K[40]=f.createElementVNode("label",null,"锁定宽高比:",-1)),f.createElementVNode("div",qH,[f.createVNode(at,{modelValue:f.unref(b)().props.lockAspectRatio,"onUpdate:modelValue":K[31]||(K[31]=ye=>f.unref(b)().props.lockAspectRatio=ye),"active-value":!0,"inactive-value":!1},null,8,["modelValue"])])])):f.createCommentVNode("",!0)]),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((je=z(f.unref(b)().type))==null?void 0:je.propertyPanel)||null),{modelValue:f.unref(b)().props,"onUpdate:modelValue":K[32]||(K[32]=ye=>f.unref(b)().props=ye),options:t.options,"props-config":St(f.unref(b)().type),onRotationChange:wt},null,40,["modelValue","options","props-config"]))],64)):f.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-47825360"]]),jq="",dl=jA({__name:"index",props:{templateData:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},config:{type:Object,default:()=>({})}},setup(t){const e=f.getCurrentInstance(),A=t,r=f.ref(!1),n=f.ref({}),a=f.ref(),i=f.ref(0),o=f.ref(!1),s=(E,B)=>{let b;return function(...N){const T=()=>{clearTimeout(b),E(...N)};clearTimeout(b),b=setTimeout(T,B)}},l=f.ref({rectTop:0,isInModal:!1}),u=()=>{if(!a.value)return;const E=a.value.getBoundingClientRect(),B=g(a.value);let b=0;if(E.top>0)b=E.top;else if(B){const U=h(a.value);b=U>0?U:60}else{const U=a.value.offsetTop;U>0?b=U:b=60}(b!==l.value.rectTop||B!==l.value.isInModal)&&(i.value=b,o.value=B,l.value={rectTop:b,isInModal:B})},d=s(u,100),g=E=>{let B=E.parentElement;for(;B;){if(B.classList&&(B.classList.contains("el-dialog")||B.classList.contains("el-drawer")||B.classList.contains("sc-dialog")))return!0;B=B.parentElement}return!1},h=E=>{let B=E.parentElement;for(;B;){if(B.classList&&(B.classList.contains("el-dialog")||B.classList.contains("el-drawer")||B.classList.contains("sc-dialog"))){const b=B.getBoundingClientRect();return b.top>0?b.top:60}B=B.parentElement}return 60};f.onMounted(()=>{setTimeout(()=>u(),100),setTimeout(()=>u(),300),window.addEventListener("resize",d),f.onBeforeUnmount(()=>{window.removeEventListener("resize",d)})}),f.watch(()=>r.value,E=>{E&&f.nextTick(()=>setTimeout(()=>u(),50))}),f.watch(()=>A.templateData,E=>y(E),{deep:!0,immediate:!0});function y(E){if(r.value=(E==null?void 0:E.width)>0&&(E==null?void 0:E.height)>0,!r.value)return;const B={...E};B.printWidth||Object.assign(B,{printWidth:B.width}),B.printHeight||Object.assign(B,{printHeight:B.height}),B!=null&&B.graphData||Object.assign(B,{graphData:{printList:[{x:0,y:0,width:E.printWidth,height:E.printHeight,topLeftRadius:4,topRightRadius:4,bottomLeftRadius:4,bottomRightRadius:4}],punchingList:[]}}),B!=null&&B.items||Object.assign(B,{items:[]}),n.value=B}function m(E){e.exposed=E||{},e.exposeProxy=E||{}}return(E,B)=>{const b=f.resolveDirective("loading");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{ref_key:"templateDesignerRef",ref:a,class:f.normalizeClass(["template-designer",{"template-designer-border-top":o.value}]),style:f.normalizeStyle({height:"calc(100vh - "+(i.value+1)+"px)"})},[r.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.h($H,{...E.$attrs,...A,ref:m},E.$slots)),{key:0,"template-info":n.value},null,8,["template-info"])):f.createCommentVNode("",!0)],6)),[[b,!r.value]])}}},[["__scopeId","data-v-a3d9b11f"]]);function Pt(t){"@babel/helpers - typeof";return Pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(t)}var sr=Uint8Array,Pr=Uint16Array,up=Int32Array,Wu=new sr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),_u=new sr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),fp=new sr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),iy=function(t,e){for(var A=new Pr(31),r=0;r<31;++r)A[r]=e+=1<<t[r-1];for(var n=new up(A[30]),r=1;r<30;++r)for(var a=A[r];a<A[r+1];++a)n[a]=a-A[r]<<5|r;return{b:A,r:n}},oy=iy(Wu,2),sy=oy.b,hp=oy.r;sy[28]=258,hp[258]=28;for(var ly=iy(_u,0),eD=ly.b,cy=ly.r,dp=new Pr(32768),iA=0;iA<32768;++iA){var Ra=(iA&43690)>>1|(iA&21845)<<1;Ra=(Ra&52428)>>2|(Ra&13107)<<2,Ra=(Ra&61680)>>4|(Ra&3855)<<4,dp[iA]=((Ra&65280)>>8|(Ra&255)<<8)>>1}for(var Ln=function(t,e,A){for(var r=t.length,n=0,a=new Pr(e);n<r;++n)t[n]&&++a[t[n]-1];var i=new Pr(e);for(n=1;n<e;++n)i[n]=i[n-1]+a[n-1]<<1;var o;if(A){o=new Pr(1<<e);var s=15-e;for(n=0;n<r;++n)if(t[n])for(var l=n<<4|t[n],u=e-t[n],d=i[t[n]-1]++<<u,g=d|(1<<u)-1;d<=g;++d)o[dp[d]>>s]=l}else for(o=new Pr(r),n=0;n<r;++n)t[n]&&(o[n]=dp[i[t[n]-1]++]>>15-t[n]);return o},Ia=new sr(288),iA=0;iA<144;++iA)Ia[iA]=8;for(var iA=144;iA<256;++iA)Ia[iA]=9;for(var iA=256;iA<280;++iA)Ia[iA]=7;for(var iA=280;iA<288;++iA)Ia[iA]=8;for(var pl=new sr(32),iA=0;iA<32;++iA)pl[iA]=5;var tD=Ln(Ia,9,0),AD=Ln(Ia,9,1),rD=Ln(pl,5,0),nD=Ln(pl,5,1),pp=function(t){for(var e=t[0],A=1;A<t.length;++A)t[A]>e&&(e=t[A]);return e},dn=function(t,e,A){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&A},gp=function(t,e){var A=e/8|0;return(t[A]|t[A+1]<<8|t[A+2]<<16)>>(e&7)},mp=function(t){return(t+7)/8|0},uy=function(t,e,A){return(e==null||e<0)&&(e=0),(A==null||A>t.length)&&(A=t.length),new sr(t.subarray(e,A))},aD=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],pn=function(t,e,A){var r=new Error(e||aD[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,pn),!A)throw r;return r},iD=function(t,e,A,r){var n=t.length,a=r?r.length:0;if(!n||e.f&&!e.l)return A||new sr(0);var i=!A,o=i||e.i!=2,s=e.i;i&&(A=new sr(n*3));var l=function(Te){var De=A.length;if(Te>De){var Oe=new sr(Math.max(De*2,Te));Oe.set(A),A=Oe}},u=e.f||0,d=e.p||0,g=e.b||0,h=e.l,y=e.d,m=e.m,E=e.n,B=n*8;do{if(!h){u=dn(t,d,1);var b=dn(t,d+1,3);if(d+=3,b)if(b==1)h=AD,y=nD,m=9,E=5;else if(b==2){var O=dn(t,d,31)+257,I=dn(t,d+10,15)+4,M=O+dn(t,d+5,31)+1;d+=14;for(var V=new sr(M),Z=new sr(19),F=0;F<I;++F)Z[fp[F]]=dn(t,d+F*3,7);d+=I*3;for(var S=pp(Z),H=(1<<S)-1,P=Ln(Z,S,1),F=0;F<M;){var Y=P[dn(t,d,H)];d+=Y&15;var U=Y>>4;if(U<16)V[F++]=U;else{var G=0,ne=0;for(U==16?(ne=3+dn(t,d,3),d+=2,G=V[F-1]):U==17?(ne=3+dn(t,d,7),d+=3):U==18&&(ne=11+dn(t,d,127),d+=7);ne--;)V[F++]=G}}var te=V.subarray(0,O),Ae=V.subarray(O);m=pp(te),E=pp(Ae),h=Ln(te,m,1),y=Ln(Ae,E,1)}else pn(1);else{var U=mp(d)+4,N=t[U-4]|t[U-3]<<8,T=U+N;if(T>n){s&&pn(0);break}o&&l(g+N),A.set(t.subarray(U,T),g),e.b=g+=N,e.p=d=T*8,e.f=u;continue}if(d>B){s&&pn(0);break}}o&&l(g+131072);for(var $=(1<<m)-1,ce=(1<<E)-1,Q=d;;Q=d){var G=h[gp(t,d)&$],_=G>>4;if(d+=G&15,d>B){s&&pn(0);break}if(G||pn(2),_<256)A[g++]=_;else if(_==256){Q=d,h=null;break}else{var j=_-254;if(_>264){var F=_-257,z=Wu[F];j=dn(t,d,(1<<z)-1)+sy[F],d+=z}var re=y[gp(t,d)&ce],ie=re>>4;re||pn(3),d+=re&15;var Ae=eD[ie];if(ie>3){var z=_u[ie];Ae+=gp(t,d)&(1<<z)-1,d+=z}if(d>B){s&&pn(0);break}o&&l(g+131072);var he=g+j;if(g<Ae){var me=a-Ae,Ve=Math.min(Ae,he);for(me+g<0&&pn(3);g<Ve;++g)A[g]=r[me+g]}for(;g<he;++g)A[g]=A[g-Ae]}}e.l=h,e.p=Q,e.b=g,e.f=u,h&&(u=1,e.m=m,e.d=y,e.n=E)}while(!u);return g!=A.length&&i?uy(A,0,g):A.subarray(0,g)},qn=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8},gl=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8,t[r+2]|=A>>16},vp=function(t,e){for(var A=[],r=0;r<t.length;++r)t[r]&&A.push({s:r,f:t[r]});var n=A.length,a=A.slice();if(!n)return{t:py,l:0};if(n==1){var i=new sr(A[0].s+1);return i[A[0].s]=1,{t:i,l:1}}A.sort(function(T,O){return T.f-O.f}),A.push({s:-1,f:25001});var o=A[0],s=A[1],l=0,u=1,d=2;for(A[0]={s:-1,f:o.f+s.f,l:o,r:s};u!=n-1;)o=A[A[l].f<A[d].f?l++:d++],s=A[l!=u&&A[l].f<A[d].f?l++:d++],A[u++]={s:-1,f:o.f+s.f,l:o,r:s};for(var g=a[0].s,r=1;r<n;++r)a[r].s>g&&(g=a[r].s);var h=new Pr(g+1),y=Bp(A[u-1],h,0);if(y>e){var r=0,m=0,E=y-e,B=1<<E;for(a.sort(function(O,I){return h[I.s]-h[O.s]||O.f-I.f});r<n;++r){var b=a[r].s;if(h[b]>e)m+=B-(1<<y-h[b]),h[b]=e;else break}for(m>>=E;m>0;){var U=a[r].s;h[U]<e?m-=1<<e-h[U]++-1:++r}for(;r>=0&&m;--r){var N=a[r].s;h[N]==e&&(--h[N],++m)}y=e}return{t:new sr(h),l:y}},Bp=function(t,e,A){return t.s==-1?Math.max(Bp(t.l,e,A+1),Bp(t.r,e,A+1)):e[t.s]=A},fy=function(t){for(var e=t.length;e&&!t[--e];);for(var A=new Pr(++e),r=0,n=t[0],a=1,i=function(s){A[r++]=s},o=1;o<=e;++o)if(t[o]==n&&o!=e)++a;else{if(!n&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(n),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(n);a=1,n=t[o]}return{c:A.subarray(0,r),n:e}},ml=function(t,e){for(var A=0,r=0;r<e.length;++r)A+=t[r]*e[r];return A},hy=function(t,e,A){var r=A.length,n=mp(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var a=0;a<r;++a)t[n+a+4]=A[a];return(n+4+r)*8},dy=function(t,e,A,r,n,a,i,o,s,l,u){qn(e,u++,A),++n[256];for(var d=vp(n,15),g=d.t,h=d.l,y=vp(a,15),m=y.t,E=y.l,B=fy(g),b=B.c,U=B.n,N=fy(m),T=N.c,O=N.n,I=new Pr(19),M=0;M<b.length;++M)++I[b[M]&31];for(var M=0;M<T.length;++M)++I[T[M]&31];for(var V=vp(I,7),Z=V.t,F=V.l,S=19;S>4&&!Z[fp[S-1]];--S);var H=l+5<<3,P=ml(n,Ia)+ml(a,pl)+i,Y=ml(n,g)+ml(a,m)+i+14+3*S+ml(I,Z)+2*I[16]+3*I[17]+7*I[18];if(s>=0&&H<=P&&H<=Y)return hy(e,u,t.subarray(s,s+l));var G,ne,te,Ae;if(qn(e,u,1+(Y<P)),u+=2,Y<P){G=Ln(g,h,0),ne=g,te=Ln(m,E,0),Ae=m;var $=Ln(Z,F,0);qn(e,u,U-257),qn(e,u+5,O-1),qn(e,u+10,S-4),u+=14;for(var M=0;M<S;++M)qn(e,u+3*M,Z[fp[M]]);u+=3*S;for(var ce=[b,T],Q=0;Q<2;++Q)for(var _=ce[Q],M=0;M<_.length;++M){var j=_[M]&31;qn(e,u,$[j]),u+=Z[j],j>15&&(qn(e,u,_[M]>>5&127),u+=_[M]>>12)}}else G=tD,ne=Ia,te=rD,Ae=pl;for(var M=0;M<o;++M){var z=r[M];if(z>255){var j=z>>18&31;gl(e,u,G[j+257]),u+=ne[j+257],j>7&&(qn(e,u,z>>23&31),u+=Wu[j]);var re=z&31;gl(e,u,te[re]),u+=Ae[re],re>3&&(gl(e,u,z>>5&8191),u+=_u[re])}else gl(e,u,G[z]),u+=ne[z]}return gl(e,u,G[256]),u+ne[256]},oD=new up([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),py=new sr(0),sD=function(t,e,A,r,n,a){var i=a.z||t.length,o=new sr(r+i+5*(1+Math.ceil(i/7e3))+n),s=o.subarray(r,o.length-n),l=a.l,u=(a.r||0)&7;if(e){u&&(s[0]=a.r>>3);for(var d=oD[e-1],g=d>>13,h=d&8191,y=(1<<A)-1,m=a.p||new Pr(32768),E=a.h||new Pr(y+1),B=Math.ceil(A/3),b=2*B,U=function(Ke){return(t[Ke]^t[Ke+1]<<B^t[Ke+2]<<b)&y},N=new up(25e3),T=new Pr(288),O=new Pr(32),I=0,M=0,V=a.i||0,Z=0,F=a.w||0,S=0;V+2<i;++V){var H=U(V),P=V&32767,Y=E[H];if(m[P]=Y,E[H]=P,F<=V){var G=i-V;if((I>7e3||Z>24576)&&(G>423||!l)){u=dy(t,s,0,N,T,O,M,Z,S,V-S,u),Z=I=M=0,S=V;for(var ne=0;ne<286;++ne)T[ne]=0;for(var ne=0;ne<30;++ne)O[ne]=0}var te=2,Ae=0,$=h,ce=P-Y&32767;if(G>2&&H==U(V-ce))for(var Q=Math.min(g,G)-1,_=Math.min(32767,V),j=Math.min(258,G);ce<=_&&--$&&P!=Y;){if(t[V+te]==t[V+te-ce]){for(var z=0;z<j&&t[V+z]==t[V+z-ce];++z);if(z>te){if(te=z,Ae=ce,z>Q)break;for(var re=Math.min(ce,z-2),ie=0,ne=0;ne<re;++ne){var he=V-ce+ne&32767,me=m[he],Ve=he-me&32767;Ve>ie&&(ie=Ve,Y=he)}}}P=Y,Y=m[P],ce+=P-Y&32767}if(Ae){N[Z++]=268435456|hp[te]<<18|cy[Ae];var Te=hp[te]&31,De=cy[Ae]&31;M+=Wu[Te]+_u[De],++T[257+Te],++O[De],F=V+te,++I}else N[Z++]=t[V],++T[t[V]]}}for(V=Math.max(V,F);V<i;++V)N[Z++]=t[V],++T[t[V]];u=dy(t,s,l,N,T,O,M,Z,S,V-S,u),l||(a.r=u&7|s[u/8|0]<<3,u-=7,a.h=E,a.p=m,a.i=V,a.w=F)}else{for(var V=a.w||0;V<i+l;V+=65535){var Oe=V+65535;Oe>=i&&(s[u/8|0]=l,Oe=i),u=hy(s,u+1,t.subarray(V,Oe))}a.i=i}return uy(o,0,r+mp(u)+n)},gy=function(){var t=1,e=0;return{p:function(A){for(var r=t,n=e,a=A.length|0,i=0;i!=a;){for(var o=Math.min(i+2655,a);i<o;++i)n+=r+=A[i];r=(r&65535)+15*(r>>16),n=(n&65535)+15*(n>>16)}t=r,e=n},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},lD=function(t,e,A,r,n){if(!n&&(n={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),i=new sr(a.length+t.length);i.set(a),i.set(t,a.length),t=i,n.w=a.length}return sD(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,A,r,n)},my=function(t,e,A){for(;A;++e)t[e]=A,A>>>=8},cD=function(t,e){var A=e.level,r=A==0?0:A<6?1:A==9?3:2;if(t[0]=120,t[1]=r<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var n=gy();n.p(e.dictionary),my(t,2,n.d())}},uD=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&pn(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&pn(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function wp(t,e){e||(e={});var A=gy();A.p(t);var r=lD(t,e,e.dictionary?6:2,4);return cD(r,e),my(r,r.length-4,A.d()),r}function fD(t,e){return iD(t.subarray(uD(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}var hD=typeof TextDecoder<"u"&&new TextDecoder,dD=0;try{hD.decode(py,{stream:!0}),dD=1}catch{}/** @license
59
+ .`+ip+b8+Kw)},C8=function(t,e){var A=t.ownerDocument;if(A){var r=A.createElement("style");r.textContent=e,t.appendChild(r)}},Gw=function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),U8=function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(sp(e)||S8(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return vr(this,void 0,void 0,function(){var A,r,n,a,i=this;return ir(this,function(o){switch(o.label){case 0:return A=Gw.isSameOrigin(e),r=!op(e)&&this._options.useCORS===!0&&$A.SUPPORT_CORS_IMAGES&&!A,n=!op(e)&&!A&&!sp(e)&&typeof this._options.proxy=="string"&&$A.SUPPORT_CORS_XHR&&!r,!A&&this._options.allowTaint===!1&&!op(e)&&!sp(e)&&!n&&!r?[2]:(a=e,n?[4,this.proxy(a)]:[3,2]);case 1:a=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(s,l){var u=new Image;u.onload=function(){return s(u)},u.onerror=l,(T8(a)||r)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(function(){return s(u)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(a,i){var o=$A.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o==="text")a(s.response);else{var d=new FileReader;d.addEventListener("load",function(){return a(d.result)},!1),d.addEventListener("error",function(g){return i(g)},!1),d.readAsDataURL(s.response)}else i("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=i;var l=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=o),A._options.imageTimeout){var u=A._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return i("Timed out ("+u+"ms) proxying "+n)}}s.send()})},t}(),F8=/^data:image\/svg\+xml/i,N8=/^data:image\/.*;base64,/i,Q8=/^data:image\/.*/i,S8=function(t){return $A.SUPPORT_SVG_DRAWING||!x8(t)},op=function(t){return Q8.test(t)},T8=function(t){return N8.test(t)},sp=function(t){return t.substr(0,4)==="blob"},x8=function(t){return t.substr(-3).toLowerCase()==="svg"||F8.test(t)},Ye=function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t}(),So=function(t,e,A){return new Ye(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},Vu=function(){function t(e,A,r,n){this.type=1,this.start=e,this.startControl=A,this.endControl=r,this.end=n}return t.prototype.subdivide=function(e,A){var r=So(this.start,this.startControl,e),n=So(this.startControl,this.endControl,e),a=So(this.endControl,this.end,e),i=So(r,n,e),o=So(n,a,e),s=So(i,o,e);return A?new t(this.start,r,i,s):new t(s,o,a,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),qr=function(t){return t.type===1},R8=function(){function t(e){var A=e.styles,r=e.bounds,n=il(A.borderTopLeftRadius,r.width,r.height),a=n[0],i=n[1],o=il(A.borderTopRightRadius,r.width,r.height),s=o[0],l=o[1],u=il(A.borderBottomRightRadius,r.width,r.height),d=u[0],g=u[1],h=il(A.borderBottomLeftRadius,r.width,r.height),y=h[0],m=h[1],E=[];E.push((a+s)/r.width),E.push((y+d)/r.width),E.push((i+m)/r.height),E.push((l+g)/r.height);var B=Math.max.apply(Math,E);B>1&&(a/=B,i/=B,s/=B,l/=B,d/=B,g/=B,y/=B,m/=B);var b=r.width-s,U=r.height-g,N=r.width-d,T=r.height-m,O=A.borderTopWidth,I=A.borderRightWidth,M=A.borderBottomWidth,V=A.borderLeftWidth,Z=AA(A.paddingTop,e.bounds.width),F=AA(A.paddingRight,e.bounds.width),S=AA(A.paddingBottom,e.bounds.width),H=AA(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||i>0?uA(r.left+V/3,r.top+O/3,a-V/3,i-O/3,Jt.TOP_LEFT):new Ye(r.left+V/3,r.top+O/3),this.topRightBorderDoubleOuterBox=a>0||i>0?uA(r.left+b,r.top+O/3,s-I/3,l-O/3,Jt.TOP_RIGHT):new Ye(r.left+r.width-I/3,r.top+O/3),this.bottomRightBorderDoubleOuterBox=d>0||g>0?uA(r.left+N,r.top+U,d-I/3,g-M/3,Jt.BOTTOM_RIGHT):new Ye(r.left+r.width-I/3,r.top+r.height-M/3),this.bottomLeftBorderDoubleOuterBox=y>0||m>0?uA(r.left+V/3,r.top+T,y-V/3,m-M/3,Jt.BOTTOM_LEFT):new Ye(r.left+V/3,r.top+r.height-M/3),this.topLeftBorderDoubleInnerBox=a>0||i>0?uA(r.left+V*2/3,r.top+O*2/3,a-V*2/3,i-O*2/3,Jt.TOP_LEFT):new Ye(r.left+V*2/3,r.top+O*2/3),this.topRightBorderDoubleInnerBox=a>0||i>0?uA(r.left+b,r.top+O*2/3,s-I*2/3,l-O*2/3,Jt.TOP_RIGHT):new Ye(r.left+r.width-I*2/3,r.top+O*2/3),this.bottomRightBorderDoubleInnerBox=d>0||g>0?uA(r.left+N,r.top+U,d-I*2/3,g-M*2/3,Jt.BOTTOM_RIGHT):new Ye(r.left+r.width-I*2/3,r.top+r.height-M*2/3),this.bottomLeftBorderDoubleInnerBox=y>0||m>0?uA(r.left+V*2/3,r.top+T,y-V*2/3,m-M*2/3,Jt.BOTTOM_LEFT):new Ye(r.left+V*2/3,r.top+r.height-M*2/3),this.topLeftBorderStroke=a>0||i>0?uA(r.left+V/2,r.top+O/2,a-V/2,i-O/2,Jt.TOP_LEFT):new Ye(r.left+V/2,r.top+O/2),this.topRightBorderStroke=a>0||i>0?uA(r.left+b,r.top+O/2,s-I/2,l-O/2,Jt.TOP_RIGHT):new Ye(r.left+r.width-I/2,r.top+O/2),this.bottomRightBorderStroke=d>0||g>0?uA(r.left+N,r.top+U,d-I/2,g-M/2,Jt.BOTTOM_RIGHT):new Ye(r.left+r.width-I/2,r.top+r.height-M/2),this.bottomLeftBorderStroke=y>0||m>0?uA(r.left+V/2,r.top+T,y-V/2,m-M/2,Jt.BOTTOM_LEFT):new Ye(r.left+V/2,r.top+r.height-M/2),this.topLeftBorderBox=a>0||i>0?uA(r.left,r.top,a,i,Jt.TOP_LEFT):new Ye(r.left,r.top),this.topRightBorderBox=s>0||l>0?uA(r.left+b,r.top,s,l,Jt.TOP_RIGHT):new Ye(r.left+r.width,r.top),this.bottomRightBorderBox=d>0||g>0?uA(r.left+N,r.top+U,d,g,Jt.BOTTOM_RIGHT):new Ye(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=y>0||m>0?uA(r.left,r.top+T,y,m,Jt.BOTTOM_LEFT):new Ye(r.left,r.top+r.height),this.topLeftPaddingBox=a>0||i>0?uA(r.left+V,r.top+O,Math.max(0,a-V),Math.max(0,i-O),Jt.TOP_LEFT):new Ye(r.left+V,r.top+O),this.topRightPaddingBox=s>0||l>0?uA(r.left+Math.min(b,r.width-I),r.top+O,b>r.width+I?0:Math.max(0,s-I),Math.max(0,l-O),Jt.TOP_RIGHT):new Ye(r.left+r.width-I,r.top+O),this.bottomRightPaddingBox=d>0||g>0?uA(r.left+Math.min(N,r.width-V),r.top+Math.min(U,r.height-M),Math.max(0,d-I),Math.max(0,g-M),Jt.BOTTOM_RIGHT):new Ye(r.left+r.width-I,r.top+r.height-M),this.bottomLeftPaddingBox=y>0||m>0?uA(r.left+V,r.top+Math.min(T,r.height-M),Math.max(0,y-V),Math.max(0,m-M),Jt.BOTTOM_LEFT):new Ye(r.left+V,r.top+r.height-M),this.topLeftContentBox=a>0||i>0?uA(r.left+V+H,r.top+O+Z,Math.max(0,a-(V+H)),Math.max(0,i-(O+Z)),Jt.TOP_LEFT):new Ye(r.left+V+H,r.top+O+Z),this.topRightContentBox=s>0||l>0?uA(r.left+Math.min(b,r.width+V+H),r.top+O+Z,b>r.width+V+H?0:s-V+H,l-(O+Z),Jt.TOP_RIGHT):new Ye(r.left+r.width-(I+F),r.top+O+Z),this.bottomRightContentBox=d>0||g>0?uA(r.left+Math.min(N,r.width-(V+H)),r.top+Math.min(U,r.height+O+Z),Math.max(0,d-(I+F)),g-(M+S),Jt.BOTTOM_RIGHT):new Ye(r.left+r.width-(I+F),r.top+r.height-(M+S)),this.bottomLeftContentBox=y>0||m>0?uA(r.left+V+H,r.top+T,Math.max(0,y-(V+H)),m-(M+S),Jt.BOTTOM_LEFT):new Ye(r.left+V+H,r.top+r.height-(M+S))}return t}(),Jt;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Jt||(Jt={}));var uA=function(t,e,A,r,n){var a=4*((Math.sqrt(2)-1)/3),i=A*a,o=r*a,s=t+A,l=e+r;switch(n){case Jt.TOP_LEFT:return new Vu(new Ye(t,l),new Ye(t,l-o),new Ye(s-i,e),new Ye(s,e));case Jt.TOP_RIGHT:return new Vu(new Ye(t,e),new Ye(t+i,e),new Ye(s,l-o),new Ye(s,l));case Jt.BOTTOM_RIGHT:return new Vu(new Ye(s,e),new Ye(s,e+o),new Ye(t+i,l),new Ye(t,l));case Jt.BOTTOM_LEFT:default:return new Vu(new Ye(s,l),new Ye(s-i,l),new Ye(t,e+o),new Ye(t,e))}},Mu=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},I8=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},Ou=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},V8=function(){function t(e,A,r){this.offsetX=e,this.offsetY=A,this.matrix=r,this.type=0,this.target=6}return t}(),Lu=function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t}(),M8=function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t}(),O8=function(t){return t.type===0},zw=function(t){return t.type===1},L8=function(t){return t.type===2},Yw=function(t,e){return t.length===e.length?t.some(function(A,r){return A===e[r]}):!1},k8=function(t,e,A,r,n){return t.map(function(a,i){switch(i){case 0:return a.add(e,A);case 1:return a.add(e+r,A);case 2:return a.add(e+r,A+n);case 3:return a.add(e,A+n)}return a})},Xw=function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),qw=function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new R8(this.container),this.container.styles.opacity<1&&this.effects.push(new M8(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new V8(r,n,a))}if(this.container.styles.overflowX!==0){var i=Mu(this.curves),o=Ou(this.curves);Yw(i,o)?this.effects.push(new Lu(i,6)):(this.effects.push(new Lu(i,2)),this.effects.push(new Lu(o,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var a=r.effects.filter(function(s){return!zw(s)});if(A||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,a),A=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var i=Mu(r.curves),o=Ou(r.curves);Yw(i,o)||n.unshift(new Lu(o,6))}}else n.unshift.apply(n,a);r=r.parent}return n.filter(function(s){return PA(s.target,e)})},t}(),lp=function(t,e,A,r){t.container.elements.forEach(function(n){var a=PA(n.flags,4),i=PA(n.flags,2),o=new qw(n,t);PA(n.styles.display,2048)&&r.push(o);var s=PA(n.flags,8)?[]:r;if(a||i){var l=a||n.styles.isPositioned()?A:e,u=new Xw(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var d=n.styles.zIndex.order;if(d<0){var g=0;l.negativeZIndex.some(function(y,m){return d>y.element.container.styles.zIndex.order?(g=m,!1):g>0}),l.negativeZIndex.splice(g,0,u)}else if(d>0){var h=0;l.positiveZIndex.some(function(y,m){return d>=y.element.container.styles.zIndex.order?(h=m+1,!1):h>0}),l.positiveZIndex.splice(h,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);lp(o,u,a?u:A,s)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),lp(o,e,A,s);PA(n.flags,8)&&$w(n,s)})},$w=function(t,e){for(var A=t instanceof q0?t.start:1,r=t instanceof q0?t.reversed:!1,n=0;n<e.length;n++){var a=e[n];a.container instanceof Cw&&typeof a.container.value=="number"&&a.container.value!==0&&(A=a.container.value),a.listValue=fl(A,a.container.styles.listStyleType,!0),A+=r?-1:1}},H8=function(t){var e=new qw(t,null),A=new Xw(e),r=[];return lp(e,A,A,r),$w(e.container,r),A},ey=function(t,e){switch(e){case 0:return $r(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return $r(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return $r(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return $r(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},D8=function(t,e){switch(e){case 0:return $r(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return $r(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return $r(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return $r(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},P8=function(t,e){switch(e){case 0:return $r(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return $r(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return $r(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return $r(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},W8=function(t,e){switch(e){case 0:return ku(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return ku(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return ku(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return ku(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},ku=function(t,e){var A=[];return qr(t)?A.push(t.subdivide(.5,!1)):A.push(t),qr(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},$r=function(t,e,A,r){var n=[];return qr(t)?n.push(t.subdivide(.5,!1)):n.push(t),qr(A)?n.push(A.subdivide(.5,!0)):n.push(A),qr(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),qr(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},ty=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},Hu=function(t){var e=t.styles,A=t.bounds,r=AA(e.paddingLeft,A.width),n=AA(e.paddingRight,A.width),a=AA(e.paddingTop,A.width),i=AA(e.paddingBottom,A.width);return A.add(r+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+a+i))},_8=function(t,e){return t===0?e.bounds:t===2?Hu(e):ty(e)},Z8=function(t,e){return t===0?e.bounds:t===2?Hu(e):ty(e)},cp=function(t,e,A){var r=_8(xo(t.styles.backgroundOrigin,e),t),n=Z8(xo(t.styles.backgroundClip,e),t),a=j8(xo(t.styles.backgroundSize,e),A,r),i=a[0],o=a[1],s=il(xo(t.styles.backgroundPosition,e),r.width-i,r.height-o),l=J8(xo(t.styles.backgroundRepeat,e),s,a,r,n),u=Math.round(r.left+s[0]),d=Math.round(r.top+s[1]);return[l,u,d,i,o]},To=function(t){return Xt(t)&&t.value===Uo.AUTO},Du=function(t){return typeof t=="number"},j8=function(t,e,A){var r=e[0],n=e[1],a=e[2],i=t[0],o=t[1];if(!i)return[0,0];if(MA(i)&&o&&MA(o))return[AA(i,A.width),AA(o,A.height)];var s=Du(a);if(Xt(i)&&(i.value===Uo.CONTAIN||i.value===Uo.COVER)){if(Du(a)){var l=A.width/A.height;return l<a!=(i.value===Uo.COVER)?[A.width,A.width/a]:[A.height*a,A.height]}return[A.width,A.height]}var u=Du(r),d=Du(n),g=u||d;if(To(i)&&(!o||To(o))){if(u&&d)return[r,n];if(!s&&!g)return[A.width,A.height];if(g&&s){var h=u?r:n*a,y=d?n:r/a;return[h,y]}var m=u?r:A.width,E=d?n:A.height;return[m,E]}if(s){var B=0,b=0;return MA(i)?B=AA(i,A.width):MA(o)&&(b=AA(o,A.height)),To(i)?B=b*a:(!o||To(o))&&(b=B/a),[B,b]}var U=null,N=null;if(MA(i)?U=AA(i,A.width):o&&MA(o)&&(N=AA(o,A.height)),U!==null&&(!o||To(o))&&(N=u&&d?U/r*n:A.height),N!==null&&To(i)&&(U=u&&d?N/n*r:A.width),U!==null&&N!==null)return[U,N];throw new Error("Unable to calculate background-size for element")},xo=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},J8=function(t,e,A,r,n){var a=e[0],i=e[1],o=A[0],s=A[1];switch(t){case 2:return[new Ye(Math.round(r.left),Math.round(r.top+i)),new Ye(Math.round(r.left+r.width),Math.round(r.top+i)),new Ye(Math.round(r.left+r.width),Math.round(s+r.top+i)),new Ye(Math.round(r.left),Math.round(s+r.top+i))];case 3:return[new Ye(Math.round(r.left+a),Math.round(r.top)),new Ye(Math.round(r.left+a+o),Math.round(r.top)),new Ye(Math.round(r.left+a+o),Math.round(r.height+r.top)),new Ye(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new Ye(Math.round(r.left+a),Math.round(r.top+i)),new Ye(Math.round(r.left+a+o),Math.round(r.top+i)),new Ye(Math.round(r.left+a+o),Math.round(r.top+i+s)),new Ye(Math.round(r.left+a),Math.round(r.top+i+s))];default:return[new Ye(Math.round(n.left),Math.round(n.top)),new Ye(Math.round(n.left+n.width),Math.round(n.top)),new Ye(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Ye(Math.round(n.left),Math.round(n.height+n.top))]}},K8="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ay="Hidden Text",G8=function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var r=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),i=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=A,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",i.appendChild(r),n.src=K8,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=A,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(Ay)),r.appendChild(a),r.appendChild(n);var o=n.offsetTop-a.offsetTop+2;r.removeChild(a),r.appendChild(this._document.createTextNode(Ay)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return i.removeChild(r),{baseline:o,middle:s}},t.prototype.getMetrics=function(e,A){var r=e+" "+A;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,A)),this._data[r]},t}(),ry=function(){function t(e,A){this.context=e,this.options=A}return t}(),z8=1e4,Y8=function(t){fn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new G8(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(A){for(var r=this;this._activeEffects.length;)this.popEffect();A.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(A){this.ctx.save(),L8(A)&&(this.ctx.globalAlpha=A.opacity),O8(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),zw(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return vr(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return r=A.element.container.styles,r.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return vr(this,void 0,void 0,function(){return ir(this,function(r){switch(r.label){case 0:if(PA(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(A)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,r,n){var a=this;if(r===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+n);else{var i=X0(A.text);i.reduce(function(o,s){return a.ctx.fillText(s,o,A.bounds.top+n),o+a.ctx.measureText(s).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var r=A.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=tH(A.fontFamily).join(", "),a=al(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,r,A.fontWeight,a,n].join(" "),n,a]},e.prototype.renderTextNode=function(A,r){return vr(this,void 0,void 0,function(){var n,a,i,o,s,l,u,d,g=this;return ir(this,function(h){return n=this.createFontStyle(r),a=n[0],i=n[1],o=n[2],this.ctx.font=a,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(i,o),l=s.baseline,u=s.middle,d=r.paintOrder,A.textBounds.forEach(function(y){d.forEach(function(m){switch(m){case 0:g.ctx.fillStyle=JA(r.color),g.renderTextWithLetterSpacing(y,r.letterSpacing,l);var E=r.textShadow;E.length&&y.text.trim().length&&(E.slice(0).reverse().forEach(function(B){g.ctx.shadowColor=JA(B.color),g.ctx.shadowOffsetX=B.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=B.offsetY.number*g.options.scale,g.ctx.shadowBlur=B.blur.number,g.renderTextWithLetterSpacing(y,r.letterSpacing,l)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),r.textDecorationLine.length&&(g.ctx.fillStyle=JA(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(B){switch(B){case 1:g.ctx.fillRect(y.bounds.left,Math.round(y.bounds.top+l),y.bounds.width,1);break;case 2:g.ctx.fillRect(y.bounds.left,Math.round(y.bounds.top),y.bounds.width,1);break;case 3:g.ctx.fillRect(y.bounds.left,Math.ceil(y.bounds.top+u),y.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&y.text.trim().length&&(g.ctx.strokeStyle=JA(r.webkitTextStrokeColor),g.ctx.lineWidth=r.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(y.text,y.bounds.left,y.bounds.top+l)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,r,n){if(n&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var a=Hu(A),i=Ou(r);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,A.intrinsicWidth,A.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return vr(this,void 0,void 0,function(){var r,n,a,i,o,s,b,b,l,u,d,g,N,h,y,T,m,E,B,b,U,N,T;return ir(this,function(O){switch(O.label){case 0:this.applyEffects(A.getEffects(4)),r=A.container,n=A.curves,a=r.styles,i=0,o=r.textNodes,O.label=1;case 1:return i<o.length?(s=o[i],[4,this.renderTextNode(s,a)]):[3,4];case 2:O.sent(),O.label=3;case 3:return i++,[3,1];case 4:if(!(r instanceof yw))return[3,8];O.label=5;case 5:return O.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return b=O.sent(),this.renderReplacedElement(r,n,b),[3,8];case 7:return O.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof bw&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof Ew))return[3,12];O.label=9;case 9:return O.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return b=O.sent(),this.renderReplacedElement(r,n,b),[3,12];case 11:return O.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof Qw&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:u=O.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),O.label=14;case 14:if(r instanceof $0&&(d=Math.min(r.bounds.width,r.bounds.height),r.type===Qu?r.checked&&(this.ctx.save(),this.path([new Ye(r.bounds.left+d*.39363,r.bounds.top+d*.79),new Ye(r.bounds.left+d*.16,r.bounds.top+d*.5549),new Ye(r.bounds.left+d*.27347,r.bounds.top+d*.44071),new Ye(r.bounds.left+d*.39694,r.bounds.top+d*.5649),new Ye(r.bounds.left+d*.72983,r.bounds.top+d*.23),new Ye(r.bounds.left+d*.84,r.bounds.top+d*.34085),new Ye(r.bounds.left+d*.39363,r.bounds.top+d*.79)]),this.ctx.fillStyle=JA(Uw),this.ctx.fill(),this.ctx.restore()):r.type===Su&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+d/2,r.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=JA(Uw),this.ctx.fill(),this.ctx.restore())),X8(r)&&r.value.length){switch(g=this.createFontStyle(a),N=g[0],h=g[1],y=this.fontMetrics.getMetrics(N,h).baseline,this.ctx.font=N,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=$8(r.styles.textAlign),T=Hu(r),m=0,r.styles.textAlign){case 1:m+=T.width/2;break;case 2:m+=T.width;break}E=T.add(m,0,0,-T.height/2+1),this.ctx.save(),this.path([new Ye(T.left,T.top),new Ye(T.left+T.width,T.top),new Ye(T.left+T.width,T.top+T.height),new Ye(T.left,T.top+T.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new cl(r.value,E),a.letterSpacing,y),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!PA(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(B=r.styles.listStyleImage,B.type!==0)return[3,18];b=void 0,U=B.url,O.label=15;case 15:return O.trys.push([15,17,,18]),[4,this.context.cache.match(U)];case 16:return b=O.sent(),this.ctx.drawImage(b,r.bounds.left-(b.width+10),r.bounds.top),[3,18];case 17:return O.sent(),this.context.logger.error("Error loading list-style-image "+U),[3,18];case 18:return[3,20];case 19:A.listValue&&r.styles.listStyleType!==-1&&(N=this.createFontStyle(a)[0],this.ctx.font=N,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",T=new Gn(r.bounds.left,r.bounds.top+AA(r.styles.paddingTop,r.bounds.width),r.bounds.width,Aw(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new cl(A.listValue,T),a.letterSpacing,Aw(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),O.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return vr(this,void 0,void 0,function(){var r,n,B,a,i,B,o,s,B,l,u,B,d,g,B,h,y,B,m,E,B;return ir(this,function(b){switch(b.label){case 0:if(PA(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:b.sent(),r=0,n=A.negativeZIndex,b.label=2;case 2:return r<n.length?(B=n[r],[4,this.renderStack(B)]):[3,5];case 3:b.sent(),b.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:b.sent(),a=0,i=A.nonInlineLevel,b.label=7;case 7:return a<i.length?(B=i[a],[4,this.renderNode(B)]):[3,10];case 8:b.sent(),b.label=9;case 9:return a++,[3,7];case 10:o=0,s=A.nonPositionedFloats,b.label=11;case 11:return o<s.length?(B=s[o],[4,this.renderStack(B)]):[3,14];case 12:b.sent(),b.label=13;case 13:return o++,[3,11];case 14:l=0,u=A.nonPositionedInlineLevel,b.label=15;case 15:return l<u.length?(B=u[l],[4,this.renderStack(B)]):[3,18];case 16:b.sent(),b.label=17;case 17:return l++,[3,15];case 18:d=0,g=A.inlineLevel,b.label=19;case 19:return d<g.length?(B=g[d],[4,this.renderNode(B)]):[3,22];case 20:b.sent(),b.label=21;case 21:return d++,[3,19];case 22:h=0,y=A.zeroOrAutoZIndexOrTransformedOrOpacity,b.label=23;case 23:return h<y.length?(B=y[h],[4,this.renderStack(B)]):[3,26];case 24:b.sent(),b.label=25;case 25:return h++,[3,23];case 26:m=0,E=A.positiveZIndex,b.label=27;case 27:return m<E.length?(B=E[m],[4,this.renderStack(B)]):[3,30];case 28:b.sent(),b.label=29;case 29:return m++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var r=this;A.forEach(function(n,a){var i=qr(n)?n.start:n;a===0?r.ctx.moveTo(i.x,i.y):r.ctx.lineTo(i.x,i.y),qr(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(A,r,n,a){this.path(A),this.ctx.fillStyle=r,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},e.prototype.resizeImage=function(A,r,n){var a;if(A.width===r&&A.height===n)return A;var i=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,o=i.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,n);var s=o.getContext("2d");return s.drawImage(A,0,0,A.width,A.height,0,0,r,n),o},e.prototype.renderBackgroundImage=function(A){return vr(this,void 0,void 0,function(){var r,n,a,i,o,s;return ir(this,function(l){switch(l.label){case 0:r=A.styles.backgroundImage.length-1,n=function(u){var d,g,h,Z,G,ne,H,P,M,y,Z,G,ne,H,P,m,E,B,b,U,N,T,O,I,M,V,Z,F,S,H,P,Y,G,ne,te,Ae,$,ce,Q,_,j,z;return ir(this,function(re){switch(re.label){case 0:if(u.type!==0)return[3,5];d=void 0,g=u.url,re.label=1;case 1:return re.trys.push([1,3,,4]),[4,a.context.cache.match(g)];case 2:return d=re.sent(),[3,4];case 3:return re.sent(),a.context.logger.error("Error loading background-image "+g),[3,4];case 4:return d&&(h=cp(A,r,[d.width,d.height,d.width/d.height]),Z=h[0],G=h[1],ne=h[2],H=h[3],P=h[4],M=a.ctx.createPattern(a.resizeImage(d,H,P),"repeat"),a.renderRepeat(Z,M,G,ne)),[3,6];case 5:OL(u)?(y=cp(A,r,[null,null,null]),Z=y[0],G=y[1],ne=y[2],H=y[3],P=y[4],m=xL(u.angle,H,P),E=m[0],B=m[1],b=m[2],U=m[3],N=m[4],T=document.createElement("canvas"),T.width=H,T.height=P,O=T.getContext("2d"),I=O.createLinearGradient(B,U,b,N),jB(u.stops,E).forEach(function(ie){return I.addColorStop(ie.stop,JA(ie.color))}),O.fillStyle=I,O.fillRect(0,0,H,P),H>0&&P>0&&(M=a.ctx.createPattern(T,"repeat"),a.renderRepeat(Z,M,G,ne))):LL(u)&&(V=cp(A,r,[null,null,null]),Z=V[0],F=V[1],S=V[2],H=V[3],P=V[4],Y=u.position.length===0?[O0]:u.position,G=AA(Y[0],H),ne=AA(Y[Y.length-1],P),te=RL(u,G,ne,H,P),Ae=te[0],$=te[1],Ae>0&&$>0&&(ce=a.ctx.createRadialGradient(F+G,S+ne,0,F+G,S+ne,Ae),jB(u.stops,Ae*2).forEach(function(ie){return ce.addColorStop(ie.stop,JA(ie.color))}),a.path(Z),a.ctx.fillStyle=ce,Ae!==$?(Q=A.bounds.left+.5*A.bounds.width,_=A.bounds.top+.5*A.bounds.height,j=$/Ae,z=1/j,a.ctx.save(),a.ctx.translate(Q,_),a.ctx.transform(1,0,0,j,0,0),a.ctx.translate(-Q,-_),a.ctx.fillRect(F,z*(S-_)+_,H,P*z),a.ctx.restore()):a.ctx.fill())),re.label=6;case 6:return r--,[2]}})},a=this,i=0,o=A.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(s=o[i],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,r,n){return vr(this,void 0,void 0,function(){return ir(this,function(a){return this.path(ey(n,r)),this.ctx.fillStyle=JA(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,r,n,a){return vr(this,void 0,void 0,function(){var i,o;return ir(this,function(s){switch(s.label){case 0:return r<3?[4,this.renderSolidBorder(A,n,a)]:[3,2];case 1:return s.sent(),[2];case 2:return i=D8(a,n),this.path(i),this.ctx.fillStyle=JA(A),this.ctx.fill(),o=P8(a,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return vr(this,void 0,void 0,function(){var r,n,a,i,o,s,l,u,d=this;return ir(this,function(g){switch(g.label){case 0:return this.applyEffects(A.getEffects(2)),r=A.container.styles,n=!Qa(r.backgroundColor)||r.backgroundImage.length,a=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],i=q8(xo(r.backgroundClip,0),A.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),Qa(r.backgroundColor)||(this.ctx.fillStyle=JA(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){d.ctx.save();var y=Mu(A.curves),m=h.inset?0:z8,E=k8(y,-m+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(d.path(y),d.ctx.clip(),d.mask(E)):(d.mask(y),d.ctx.clip(),d.path(E)),d.ctx.shadowOffsetX=h.offsetX.number+m,d.ctx.shadowOffsetY=h.offsetY.number,d.ctx.shadowColor=JA(h.color),d.ctx.shadowBlur=h.blur.number,d.ctx.fillStyle=h.inset?JA(h.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),g.label=2;case 2:o=0,s=0,l=a,g.label=3;case 3:return s<l.length?(u=l[s],u.style!==0&&!Qa(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,3)];case 6:return g.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,A.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,A.curves)];case 10:g.sent(),g.label=11;case 11:o++,g.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,r,n,a,i){return vr(this,void 0,void 0,function(){var o,s,l,u,d,g,h,y,m,E,B,b,U,N,T,O,T,O;return ir(this,function(I){return this.ctx.save(),o=W8(a,n),s=ey(a,n),i===2&&(this.path(s),this.ctx.clip()),qr(s[0])?(l=s[0].start.x,u=s[0].start.y):(l=s[0].x,u=s[0].y),qr(s[1])?(d=s[1].end.x,g=s[1].end.y):(d=s[1].x,g=s[1].y),n===0||n===2?h=Math.abs(l-d):h=Math.abs(u-g),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(s.slice(0,2)),y=r<3?r*3:r*2,m=r<3?r*2:r,i===3&&(y=r,m=r),E=!0,h<=y*2?E=!1:h<=y*2+m?(B=h/(2*y+m),y*=B,m*=B):(b=Math.floor((h+m)/(y+m)),U=(h-b*y)/(b-1),N=(h-(b+1)*y)/b,m=N<=0||Math.abs(m-U)<Math.abs(m-N)?U:N),E&&(i===3?this.ctx.setLineDash([0,y+m]):this.ctx.setLineDash([y,m])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=JA(A),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(qr(s[0])&&(T=s[3],O=s[0],this.ctx.beginPath(),this.formatPath([new Ye(T.end.x,T.end.y),new Ye(O.start.x,O.start.y)]),this.ctx.stroke()),qr(s[1])&&(T=s[1],O=s[2],this.ctx.beginPath(),this.formatPath([new Ye(T.end.x,T.end.y),new Ye(O.start.x,O.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return vr(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=H8(A),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(ry),X8=function(t){return t instanceof Nw||t instanceof Fw?!0:t instanceof $0&&t.type!==Su&&t.type!==Qu},q8=function(t,e){switch(t){case 0:return Mu(e);case 2:return I8(e);case 1:default:return Ou(e)}},$8=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},eH=["-apple-system","system-ui"],tH=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return eH.indexOf(e)===-1}):t},AH=function(t){fn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(A){return vr(this,void 0,void 0,function(){var r,n;return ir(this,function(a){switch(a.label){case 0:return r=Y0(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,rH(r)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(ry),rH=function(t){return new Promise(function(e,A){var r=new Image;r.onload=function(){e(r)},r.onerror=A,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},nH=function(){function t(e){var A=e.id,r=e.enabled;this.id=A,this.enabled=r,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Gc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Gc([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Gc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Gc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t}(),aH=function(){function t(e,A){var r;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new nH({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new U8(this,e)}return t.instanceCount=1,t}(),ny=function(t,e){return e===void 0&&(e={}),iH(t,e)};typeof window<"u"&&Gw.setContext(window);var iH=function(t,e){return vr(void 0,void 0,void 0,function(){var A,r,n,a,i,o,s,l,u,d,g,h,y,m,E,B,b,U,N,T,I,O,I,M,V,Z,F,S,H,P,Y,G,ne,te,Ae,$,ce,Q,_,j;return ir(this,function(z){switch(z.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(r=A.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(M=e.allowTaint)!==null&&M!==void 0?M:!1,imageTimeout:(V=e.imageTimeout)!==null&&V!==void 0?V:15e3,proxy:e.proxy,useCORS:(Z=e.useCORS)!==null&&Z!==void 0?Z:!1},a=p0({logging:(F=e.logging)!==null&&F!==void 0?F:!0,cache:e.cache},n),i={windowWidth:(S=e.windowWidth)!==null&&S!==void 0?S:r.innerWidth,windowHeight:(H=e.windowHeight)!==null&&H!==void 0?H:r.innerHeight,scrollX:(P=e.scrollX)!==null&&P!==void 0?P:r.pageXOffset,scrollY:(Y=e.scrollY)!==null&&Y!==void 0?Y:r.pageYOffset},o=new Gn(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),s=new aH(a,o),l=(G=e.foreignObjectRendering)!==null&&G!==void 0?G:!1,u={allowTaint:(ne=e.allowTaint)!==null&&ne!==void 0?ne:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new Jw(s,t,u),g=d.clonedReferenceElement,g?[4,d.toIFrame(A,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=z.sent(),y=tp(g)||s8(g)?kM(g.ownerDocument):zc(s,g),m=y.width,E=y.height,B=y.left,b=y.top,U=oH(s,g,e.backgroundColor),N={canvas:e.canvas,backgroundColor:U,scale:(Ae=(te=e.scale)!==null&&te!==void 0?te:r.devicePixelRatio)!==null&&Ae!==void 0?Ae:1,x:(($=e.x)!==null&&$!==void 0?$:0)+B,y:((ce=e.y)!==null&&ce!==void 0?ce:0)+b,width:(Q=e.width)!==null&&Q!==void 0?Q:Math.ceil(m),height:(_=e.height)!==null&&_!==void 0?_:Math.ceil(E)},l?(s.logger.debug("Document cloned, using foreign object rendering"),I=new AH(s,N),[4,I.render(g)]):[3,3];case 2:return T=z.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+B+","+b+" with size "+m+"x"+E+" using computed rendering"),s.logger.debug("Starting DOM parsing"),O=Tw(s,g),U===O.styles.backgroundColor&&(O.styles.backgroundColor=Yn.TRANSPARENT),s.logger.debug("Starting renderer for element at "+N.x+","+N.y+" with size "+N.width+"x"+N.height),I=new Y8(s,N),[4,I.render(O)];case 4:T=z.sent(),z.label=5;case 5:return(!((j=e.removeContainer)!==null&&j!==void 0)||j)&&(Jw.destroy(h)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,T]}})})},oH=function(t,e,A){var r=e.ownerDocument,n=r.documentElement?ol(t,getComputedStyle(r.documentElement).backgroundColor):Yn.TRANSPARENT,a=r.body?ol(t,getComputedStyle(r.body).backgroundColor):Yn.TRANSPARENT,i=typeof A=="string"?ol(t,A):A===null?Yn.TRANSPARENT:4294967295;return e===r.documentElement?Qa(n)?Qa(a)?i:a:n:i};const ay=Object.freeze(Object.defineProperty({__proto__:null,default:ny},Symbol.toStringTag,{value:"Module"})),_q="",sH={class:"label-designer"},lH={class:"toolbar"},cH={class:"center-container"},uH={key:0,class:"loader-container"},fH={class:"center-toolbar"},hH={class:"zoom-controls"},dH=["disabled"],pH=["disabled"],gH={class:"canvas-container"},mH={class:"ruler-horizontal"},vH={class:"ruler-vertical"},BH={key:0,class:"drag-extend-lines"},wH={key:1,class:"alignment-guides"},yH=["data-item-id","onMousedown"],bH=["onMousedown"],EH=["onMousedown"],CH=["onMousedown"],UH=["onMousedown"],FH=["onMousedown"],NH=["onMousedown"],QH=["onMousedown"],SH=["onMousedown"],TH=["onMousedown"],xH={class:"property-panel",tabindex:"0"},RH={class:"property-panel-operate"},IH={class:"property-panel-title"},VH=["innerHTML"],MH={class:"position-controls"},OH={class:"control-group"},LH={class:"number-input"},kH=["value"],HH={class:"control-group"},DH={class:"number-input"},PH=["value"],WH={key:0,class:"control-group"},_H={class:"number-input"},ZH=["value"],jH={key:1,class:"control-group"},JH={class:"number-input"},KH=["value"],GH={key:2,class:"control-group"},zH={class:"number-input"},YH={class:"rotation-display"},XH={key:3,class:"control-group"},qH={class:"switch-input"},Pu=.05,$H=jA({__name:"panels",props:{templateInfo:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},options:{type:Object,default:()=>({})},showGraphConfig:{type:Boolean,default:!1},templateType:{type:String,default:"lodop"},config:{type:Object,default:()=>({})}},setup(t,{expose:e}){const A=t,r=f.ref({}),n=f.ref(0),a=f.ref(!0),i=f.ref([]),o=f.ref(1);let s=1;const l=f.computed(()=>{var ee;return((ee=r.value)==null?void 0:ee.printWidth)||0}),u=f.computed(()=>{var ee;return((ee=r.value)==null?void 0:ee.printHeight)||0});f.ref(!1);const d=f.ref(!1),g=f.ref(!1),h=new ui(mr.CACHE.STYLE_CACHE_SIZE),y=new ui(mr.CACHE.BOUNDING_BOX_CACHE_SIZE),m=new Map(Gv.map(ee=>[ee.type,ee])),{selectedItems:E,selectItem:B,getCurrentSelected:b,clearSelection:U}=NM(),{dragging:N,dragItem:T,startDrag:O}=UM({scale:o,canvasWidth:l,canvasHeight:u,selectItem:B,onStartDrag:()=>{d.value=!0,f.nextTick(()=>{H()})},onStopDrag:()=>{d.value=!1,f.nextTick(()=>{g.value=!1}),P()},onDragUpdate:()=>{H()}}),{startResize:I,resizing:M,resizeDirection:V,resizeItem:Z}=FM(l,u,o,E,()=>{const ee=b();te(ee)}),{alignmentGuides:F,showGuides:S,updateAlignmentGuides:H,clearAlignmentGuides:P}=MM({items:i,dragItem:T,resizeItem:Z,dragging:N,resizing:M,resizeDirection:V,canvasWidth:l,canvasHeight:u}),{handleMouseWheel:Y,adjustRotation:G,adjustComponentToFitCanvas:ne,updateAspectRatio:te}=IM(E,l,u);f.watch(()=>E.value,()=>{h.clear()},{deep:!0}),f.watch(()=>M.value,ee=>{ee?H():P()}),f.watch(()=>{var ee;return(ee=Z.value)==null?void 0:ee.props},()=>{M.value&&H()},{deep:!0}),f.watch(()=>T.value,()=>{(N.value||M.value)&&H()}),f.watch(()=>Z.value,()=>{(N.value||M.value)&&H()}),f.watch(()=>i.value,()=>{(N.value||M.value)&&H()},{deep:!0});const Ae=(ee,K)=>{var we;(!K||Number(K)<=0&&(ee==="width"||ee==="height"))&&ot((we=b())==null?void 0:we.id)},$=ee=>{const K=`${ee.id}_${Ee(ee.props.x,1)}_${Ee(ee.props.y,1)}_${ee.props.width}_${ee.props.height}_${ee.props.rotation}`;if(y.has(K))return y.get(K);const we=hi(ee.props.x,ee.props.y,ee.props.width,ee.props.height,ee.props.rotation||0);return y.set(K,we),we},ce=ee=>{const K=$(ee),we=Js(K);return{minX:Ee(we.minX,3),maxX:Ee(we.maxX,3),minY:Ee(we.minY,3),maxY:Ee(we.maxY,3),width:Ee(we.maxX-we.minX,3),height:Ee(we.maxY-we.minY,3),centerX:Ee((we.minX+we.maxX)/2,3),centerY:Ee((we.minY+we.maxY)/2,3)}},Q=(ee,K)=>{const we=ce(ee),At=(at=>at.type==="rectangle"?parseFloat(at.props.LineWidth||"0.5")/3.78:0)(ee),_e=(at,Ne,it)=>{if(it==="rectangle"&&At>0){const je=At/2;if(Ne==="left"||Ne==="top")return at-je;if(Ne==="right"||Ne==="bottom")return at+je}return at};if(ee.type==="line")switch(K){case"left":return{left:Ee(_e(we.minX,K,ee.type),3)+"mm"};case"right":return{left:Ee(_e(we.maxX,K,ee.type),3)+"mm"};case"top":return{top:Ee(_e(we.minY,K,ee.type),3)+"mm"};case"bottom":return{top:Ee(_e(we.maxY,K,ee.type),3)+"mm"};default:return{}}if(ee.type==="verline"&&K==="right"){const Ne=parseFloat(ee.props.LineWidth||"0.5")/3.78;return{left:Ee(_e(we.minX+Ne,K,ee.type),3)+"mm"}}switch(K){case"left":return{left:Ee(_e(we.minX,K,ee.type),3)+"mm"};case"right":return{left:Ee(_e(we.maxX,K,ee.type),3)+"mm"};case"top":return{top:Ee(_e(we.minY,K,ee.type),3)+"mm"};case"bottom":return{top:Ee(_e(we.maxY,K,ee.type),3)+"mm"};default:return{}}},_=()=>{f.nextTick(()=>{const ee=document.querySelector(".canvas-container");if(!ee||!l.value||!u.value)return;const K=ee.getBoundingClientRect(),we=co(l.value),ze=co(u.value),At=16,_e=21,at=21,Ne=20,it=24,je=24,ye=K.width-At*2-_e-je,mt=K.height-At-at-Ne-it;let Pe=ye/we,ft=mt/ze,qt=Math.min(Pe,ft);qt=qt*.95;const vt=Math.min(4,qt);s=Math.max(.8,Math.min(vt,qt)),o.value=j(s,1),setTimeout(()=>{n.value=1,a.value=!1},500)})};function j(ee,K){ee=ee.toString();let we=ee.indexOf(".");return we!==-1?ee=ee.substring(0,K+we+1):ee=ee.substring(0),Number(parseFloat(ee).toFixed(K))}const z=ee=>m.get(ee)||null,re=ee=>{const K=E.value.indexOf(ee),we=K===E.value.length-1,ze=K!==-1,At=`${ee.id}_${Math.round(ee.props.x*10)}_${Math.round(ee.props.y*10)}_${ee.props.width}_${ee.props.height}_${ee.props.rotation}_${ze}_${we}`;if(h.has(At))return h.get(At);const _e={width:ee.props.width+"mm",height:ee.props.height+"mm",transform:`translate(${ee.props.x}mm, ${ee.props.y}mm) rotate(${ee.props.rotation}deg)`};return ze?we?_e.zIndex=1e3:_e.zIndex=999:_e.zIndex=10,h.set(At,_e),_e},ie=ee=>{const K=E.value.some(ze=>ze.id===ee.id),we=b()===ee;return{"component-selected":K,"component-current":K&&we,"no-outline":K&&(ee.type==="line"||ee.type==="verline")}},he=(ee,K)=>{const ze=((ee.props.rotation||0)%360+360)%360;if(ee.type==="line"&&(K==="left"||K==="right")){let Ne;const je=((K==="left"?270:90)+ze)%360;return je>=337.5||je<22.5?Ne="n-resize":je>=22.5&&je<67.5?Ne="ne-resize":je>=67.5&&je<112.5?Ne="e-resize":je>=112.5&&je<157.5?Ne="se-resize":je>=157.5&&je<202.5?Ne="s-resize":je>=202.5&&je<247.5?Ne="sw-resize":je>=247.5&&je<292.5?Ne="w-resize":je>=292.5&&je<337.5&&(Ne="nw-resize"),{cursor:Ne,top:"50%",transform:"translateY(-50%)"}}if(ee.type==="verline"&&(K==="top"||K==="bottom")){let Ne;const je=((K==="top"?0:180)+ze)%360;return je>=337.5||je<22.5?Ne="n-resize":je>=22.5&&je<67.5?Ne="ne-resize":je>=67.5&&je<112.5?Ne="e-resize":je>=112.5&&je<157.5?Ne="se-resize":je>=157.5&&je<202.5?Ne="s-resize":je>=202.5&&je<247.5?Ne="sw-resize":je>=247.5&&je<292.5?Ne="w-resize":je>=292.5&&je<337.5&&(Ne="nw-resize"),{cursor:Ne,left:"50%",transform:"translateX(-50%)"}}const _e=({top:0,"top-right":45,right:90,"bottom-right":135,bottom:180,"bottom-left":225,left:270,"top-left":315}[K]+ze)%360;let at="pointer";return _e>=337.5||_e<22.5?at="n-resize":_e>=22.5&&_e<67.5?at="ne-resize":_e>=67.5&&_e<112.5?at="e-resize":_e>=112.5&&_e<157.5?at="se-resize":_e>=157.5&&_e<202.5?at="s-resize":_e>=202.5&&_e<247.5?at="sw-resize":_e>=247.5&&_e<292.5?at="w-resize":_e>=292.5&&_e<337.5&&(at="nw-resize"),{cursor:at,display:"block",visibility:"visible",opacity:"1"}},me=()=>{o.value<4&&(o.value+=.1)},Ve=()=>{o.value>.8&&(o.value-=.1)},Te=()=>{const ee=b();if(!ee)return 0;const{x1:K}=Bo(ee);return Math.max(0,Number(K.toFixed(2)))},De=()=>{const ee=b();if(!ee)return 0;const{y1:K}=Bo(ee);return Math.max(0,Number(K.toFixed(2)))},Oe=()=>{const ee=b();return ee?Number((ee.props.width||0).toFixed(2)):0},Ke=()=>{const ee=b();return ee?Number((ee.props.height||0).toFixed(2)):0},ve=(ee,K,we)=>{let ze=0;ee==="x"?ze=Te():ee==="y"?ze=De():ee==="width"?ze=Oe():ee==="height"&&(ze=Ke());const At=Number(K)-Number(ze);if(Math.abs(At)<.01){b().props[ee]="",b().props[ee]=Number(ze);return}Y(null,ee,At)};function q(ee){const K=document.activeElement.tagName.toLowerCase();if(K==="input"||K==="textarea"||!b())return;let ze=!1,At=0,_e=0;ee.key==="ArrowLeft"?(At=-Pu,ze=!0):ee.key==="ArrowRight"?(At=Pu,ze=!0):ee.key==="ArrowUp"?(_e=-Pu,ze=!0):ee.key==="ArrowDown"&&(_e=Pu,ze=!0),ze&&(At!==0&&Y(null,"x",At),_e!==0&&Y(null,"y",_e),ee.preventDefault())}const ut=({e:ee,comp:K,previewDiv:we})=>{var ze,At;(ze=ee==null?void 0:ee.dataTransfer)==null||ze.setData("comp",JSON.stringify(K)),document.body.appendChild(we),(At=ee==null?void 0:ee.dataTransfer)==null||At.setDragImage(we,0,0),setTimeout(()=>document.body.removeChild(we),0)},Xe=async ee=>{var Mt,Ht,_A;ee.preventDefault();const K=JSON.parse(((Ht=(Mt=ee==null?void 0:ee.dataTransfer)==null?void 0:Mt.getData)==null?void 0:Ht.call(Mt,"comp"))||"{}")||{},we=(K==null?void 0:K.type)||"";if(!we)return;const ze=document.querySelector("#design").getBoundingClientRect(),At=(ee.clientX-ze.left)/o.value,_e=(ee.clientY-ze.top)/o.value,at=ke.value[we]||{};let Ne=Ba(At),it=Ba(_e);const je=at.width,ye=at.height;if(!at.rotation||at.rotation===0){const Zt=l.value-je,sA=u.value-ye;Ne=Math.max(0,Math.min(Ne,Zt)),it=Math.max(0,Math.min(it,sA))}else Ne=Math.max(0,Ne),it=Math.max(0,it);const{propertyPanel:mt,...Pe}=at;let ft={...Pe,x:Ee(Ne),y:Ee(it),width:Ee(je),height:Ee(ye)};if((_A=ke.value[we])!=null&&_A.propertyPanel){const Zt=fi(ke.value[we].propertyPanel)||{};if(ft={...ft,...Zt},we==="line"&&Zt.LineWidth){const dA=parseFloat(Zt.LineWidth)*.3528;ft.height=Ee(dA,3)}}const Vt=((Zt,sA)=>{const{width:dA,height:_r,lockAspectRatio:rt}=Zt;let oe=dA,xe=_r;const We=l.value-2,It=u.value-2;let bA=!1;if(dA>We&&(oe=We,bA=!0),_r>It&&(xe=It,bA=!0),rt&&bA){const lA=We/dA,pA=It/_r,xr=Math.min(lA,pA);oe=Ee(dA*xr,2),xe=Ee(_r*xr,2),oe=Math.min(oe,We),xe=Math.min(xe,It)}return{width:oe,height:xe}})(ft);if(ft.width=Vt.width,ft.height=Vt.height,Vt.width!==je||Vt.height!==ye){const Zt=l.value-Vt.width,sA=u.value-Vt.height;Ne=Math.max(0,Math.min(Ne,Zt)),it=Math.max(0,Math.min(it,sA)),ft.x=Ee(Ne),ft.y=Ee(it)}const vt={id:xA(),type:we,props:ft};if(ft.rotation&&ft.rotation!==0){const{x1:Zt,y1:sA}=Bo(vt),dA=checkAndAdjustBoundaries(Zt,sA,ft.width,ft.height,ft.rotation,l.value,u.value);(dA.x1!==Zt||dA.y1!==sA)&&h0(vt,dA.x1,dA.y1)}i.value.push(vt),B(vt)};function Qe(ee){let K=ee.target,we=null;for(;K&&K!==document.querySelector("#design");){if(K.classList&&(K.classList.contains("canvas-item")||K.classList.contains("resize-handle")||K.classList.contains("delete-btn")||K.classList.contains("rotate-handle")||K.classList.contains("property-panel")||K.tagName==="INPUT"||K.tagName==="TEXTAREA"||K.tagName==="BUTTON")){if(K.classList.contains("resize-handle")||K.classList.contains("delete-btn")||K.classList.contains("rotate-handle"))return;if(K.classList.contains("canvas-item")){const _e=K.getAttribute("data-item-id");if(we=i.value.find(at=>at.id===_e),we){const at=Le(ee.clientX,ee.clientY,we);if(at){B(at);return}else{B(we);return}}}if(K.closest(".canvas-item")){const at=K.closest(".canvas-item").getAttribute("data-item-id"),Ne=i.value.find(it=>it.id===at);if(Ne){const it=Le(ee.clientX,ee.clientY,Ne);if(it){B(it);return}else{B(Ne);return}}}if(K.closest(".canvas-item")||K.classList.contains("td-text-content")||K.classList.contains("barcode-component")||K.classList.contains("qr-code-component")||K.classList.contains("image-component")||K.classList.contains("rectangle-component")||K.classList.contains("hor-line-component")){const _e=Me(ee.clientX,ee.clientY);if(_e){const at=Le(ee.clientX,ee.clientY,_e);if(at){B(at);return}else{B(_e);return}}}break}K=K.parentElement}let ze=null;try{ze=Me(ee.clientX,ee.clientY)}catch(_e){console.error("坐标检测出错:",_e)}if(ze){const _e=Le(ee.clientX,ee.clientY,ze);if(_e){B(_e);return}else{B(ze);return}}const At=document.querySelector("#design");if(At&&At.contains(ee.target)){const _e=At.getBoundingClientRect(),at=o.value,Ne=(ee.clientX-_e.left)/at,it=(ee.clientY-_e.top)/at,je=Ba(Ne),ye=Ba(it);for(let mt=i.value.length-1;mt>=0;mt--){const Pe=i.value[mt],ft=parseFloat(Pe.props.x||0),qt=parseFloat(Pe.props.y||0),Vt=parseFloat(Pe.props.width||0),vt=parseFloat(Pe.props.height||0),Mt=1;if(je>=ft-Mt&&je<=ft+Vt+Mt&&ye>=qt-Mt&&ye<=qt+vt+Mt){B(Pe);return}}}U()}function Me(ee,K){const we=document.querySelector("#design");if(!we)return null;const ze=we.getBoundingClientRect(),At=o.value,_e=(ee-ze.left)/At,at=(K-ze.top)/At,Ne=Ba(_e),it=Ba(at);for(let je=i.value.length-1;je>=0;je--){const ye=i.value[je];if(He(Ne,it,ye))return ye}return null}function Le(ee,K,we){var mt,Pe,ft,qt;const ze=document.querySelector("#design");if(!ze)return null;const At=ze.getBoundingClientRect(),_e=o.value,at=(ee-At.left)/_e,Ne=(K-At.top)/_e,it=Ba(at),je=Ba(Ne),ye=i.value.findIndex(Vt=>Vt.id===we.id);for(let Vt=ye-1;Vt>=0;Vt--){const vt=i.value[Vt];if((mt=vt.props)!=null&&mt.x,(Pe=vt.props)!=null&&Pe.y,(ft=vt.props)!=null&&ft.width,(qt=vt.props)!=null&&qt.height,He(it,je,vt))return vt}return null}function He(ee,K,we){const ze=parseFloat(we.props.x||0),At=parseFloat(we.props.y||0),_e=parseFloat(we.props.width||0),at=parseFloat(we.props.height||0),Ne=parseFloat(we.props.rotation||0),it=Xv(ee,K,ze,At,_e,at,Ne);return it||Xv(ee,K,ze-1,At-1,_e+2,at+2,Ne)}function Ze(ee){return ee.preventDefault(),!1}const tt=(ee,K)=>{if(ee.stopPropagation(),ee.target.classList.contains("resize-handle")||ee.target.classList.contains("rotate-handle")||ee.target.classList.contains("delete-btn"))return;const we=Le(ee.clientX,ee.clientY,K);if(we){B(we),O(ee,we);return}B(K),O(ee,K)},ot=ee=>{if(h.clear(),y.clear(),i.value.find(we=>we.id===ee)&&(i.value=i.value.filter(we=>we.id!==ee)),E.value.some(we=>we.id===ee)){const we=E.value.filter(ze=>ze.id!==ee);E.value=we}f.nextTick(()=>{})},dt=ee=>{var we;const K=document.activeElement.tagName.toLowerCase();K==="input"||K==="textarea"||(ee.key==="Delete"||ee.key==="Backspace")&&E.value.length>0&&ot((we=b())==null?void 0:we.id)},wt=ee=>{if(E.value.length>0){const K=E.value[E.value.length-1];K.props.rotation=ee,ne(K,ee)}},Ut=()=>{setTimeout(()=>{const ee=document.querySelector(".center-container");if(!ee)return;const K=ee.getBoundingClientRect();ee.style.height=`calc(100vh - ${K==null?void 0:K.top}px)`,_()},200)};f.watch(()=>A.templateInfo,(ee,K)=>{ee&&K&&ee.id!==K.id?(r.value=ee||{},i.value=(ee==null?void 0:ee.items)||[]):ee&&!K?(r.value=ee||{},i.value=(ee==null?void 0:ee.items)||[]):ee&&(r.value=ee||{})},{deep:!0,immediate:!0});const{handleCopy:st,handlePaste:Bt}=VM(i,E,l,u,ne),ke=f.ref({}),Wt=f.ref(!1),Qt=async ee=>{try{Wt.value=!1,ke.value=await GV(ee),Wt.value=!0}catch{ke.value={},Wt.value=!0}};f.watch(()=>A.templateType,async ee=>{try{await Qt(ee),U(),h.clear(),y.clear()}catch{}},{immediate:!0}),f.onMounted(async()=>{Wt.value||await Qt(A.templateType),window.addEventListener("resize",Ut),window.addEventListener("keydown",dt),window.addEventListener("keydown",st),window.addEventListener("keydown",Bt),window.addEventListener("keydown",q);const ee=document.querySelector(".canvas-wrapper");ee&&ee.addEventListener("contextmenu",Ze),Ut(),WA()}),f.onBeforeUnmount(()=>{window.removeEventListener("resize",Ut),window.removeEventListener("keydown",dt),window.removeEventListener("keydown",st),window.removeEventListener("keydown",Bt),window.removeEventListener("keydown",q);const ee=document.querySelector(".canvas-wrapper");ee&&ee.removeEventListener("contextmenu",Ze),h.clear(),y.clear()});function xA(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ee=>{const K=Math.random()*16|0;return(ee==="x"?K:K&3|8).toString(16)})}const St=ee=>{var we;if(!ke.value||!ke.value[ee])return{};const K=ke.value[ee]||{};return ee==="image"&&((we=A.config)!=null&&we.image)?{...K,image:{...K.image,...A.config.image}}:K},xt=ee=>St(ee).allowRotation!==!1,hA=()=>QM(i,r.value),Rt=ee=>{r.value.graphData=ee||{},WA()},WA=()=>{var K;const ee=LM(r.value.graphData)||"";ee&&((K=document.querySelector("#design"))==null||K.appendChild(ee))},_t=async ee=>{var we;const K=JSON.parse(JSON.stringify(ee));for(const ze of K)if(ze.type==="image"&&((we=ze.props)!=null&&we.ImageSrc)){const At=ze.props.ImageSrc;typeof At=="object"&&At.fileSrc&&At.fileSrc}return K},oA=()=>new Promise(async(ee,K)=>{var we;try{U();const ze=JSON.parse(JSON.stringify(i.value)),At=((we=A.config)==null?void 0:we.textDisplayPriority)||"text";ze==null||ze.forEach(it=>{var je,ye,mt,Pe,ft,qt;if(it.type=="text"){let Vt="";const vt=((je=it==null?void 0:it.props)==null?void 0:je.FieldName)||[];if(Array.isArray(vt)){const Mt=((ye=it==null?void 0:it.props)==null?void 0:ye.FieldConnector)||" ";Vt=((mt=vt.map(Ht=>{var _A,Zt,sA;return(sA=(Zt=(_A=A.options)==null?void 0:_A.fields)==null?void 0:Zt.find(dA=>dA.value==Ht))==null?void 0:sA.label}))==null?void 0:mt.join(Mt))||""}else Vt=((qt=(ft=(Pe=A.options)==null?void 0:Pe.fields)==null?void 0:ft.find(Mt=>{var Ht;return Mt.value==((Ht=it==null?void 0:it.props)==null?void 0:Ht.FieldName)}))==null?void 0:qt.label)||"";it.props.Text=At=="text"?it.props.Text||Vt:Vt||it.props.Text}});const _e=await _t(ze),at=[...i.value];i.value=_e;const Ne=()=>{var ye;const it=((ye=document.querySelector("#design"))==null?void 0:ye.querySelectorAll("img"))||[],je=Array.from(it).map(mt=>mt.complete?Promise.resolve():new Promise(Pe=>{mt.onload=mt.onerror=Pe}));return Promise.all(je)};f.nextTick(async()=>{var mt;await new Promise(Pe=>setTimeout(Pe,100)),await Ne(),(((mt=document.querySelector("#design"))==null?void 0:mt.querySelectorAll("img"))||[]).forEach((Pe,ft)=>{});const je=document.querySelector("#design");if(!je){K(new Error("找不到要转换的DOM元素"));return}const ye=o.value;Ne().then(()=>{ny(je,{scale:Math.max(window.devicePixelRatio*2,3),useCORS:!0,allowTaint:!0,backgroundColor:null,logging:!1,imageTimeout:15e3,onclone:Pe=>{const ft=Pe.querySelector(".canvas-wrapper");if(ft){const Mt=ft.style.transform.replace(/scale\([^)]*\)/g,"").replace(/\s+/g," ").trim();ft.style.transform=Mt||"none",ft.style.opacity="1"}const qt=Pe.querySelector("#design");if(qt){const vt=window.getComputedStyle(je);for(let Mt=0;Mt<vt.length;Mt++){const Ht=vt[Mt];qt.style[Ht]=vt.getPropertyValue(Ht)}}Pe.querySelectorAll("img").forEach(vt=>{vt.style.imageRendering="high-quality",vt.style.webkitImageRendering="high-quality",vt.style.mozImageRendering="high-quality",vt.style.objectFit="contain",vt.style.objectPosition="center"})}}).then(Pe=>{i.value=at;const ft=Pe.toDataURL("image/png");ee({data:hA(),image:ft})}).catch(Pe=>{i.value=at,K(Pe)})}).catch(Pe=>{K(Pe)})})}catch(ze){K(ze)}}),Gt=()=>new Promise((ee,K)=>{i.value.forEach(ze=>{if(ze.type==="image"&&!ze.props.ImageSrc)return xs.warning("图片控件请选择图片!"),K("图片控件请选择图片!")}),ee(!0)});return e({getJson:()=>Gt().then(()=>hA()),clear:()=>{i.value=[],U()},snapshot:()=>Gt().then(()=>oA())}),(ee,K)=>{var Ne,it,je;const we=f.resolveComponent("el-button"),ze=f.resolveComponent("el-icon-info-filled"),At=f.resolveComponent("el-icon"),_e=f.resolveComponent("el-tooltip"),at=f.resolveComponent("el-switch");return f.openBlock(),f.createElementBlock("div",sH,[f.createElementVNode("div",lH,[f.createVNode(AM,{onDragStart:ut,config:t.config,propsConfig:ke.value},null,8,["config","propsConfig"])]),f.createElementVNode("div",cH,[a.value?(f.openBlock(),f.createElementBlock("div",uH,[...K[33]||(K[33]=[f.createElementVNode("div",{class:"loader-circle"},null,-1),f.createElementVNode("p",null,"设计画板加载中...",-1)])])):f.createCommentVNode("",!0),f.createElementVNode("div",fH,[t.showGraphConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(yM,{"graph-data":(Ne=r.value)==null?void 0:Ne.graphData,onSuccess:Rt},null,8,["graph-data"]),K[34]||(K[34]=f.createElementVNode("div",{style:{width:"30px"}},null,-1))],64)):f.createCommentVNode("",!0),f.createElementVNode("div",hH,[f.createElementVNode("button",{onClick:Ve,disabled:o.value<=.8},"-",8,dH),f.createElementVNode("span",null,f.toDisplayString(Math.round(o.value*100))+"%",1),f.createElementVNode("button",{onClick:me,disabled:o.value>=4},"+",8,pH)])]),f.createElementVNode("div",gH,[f.createElementVNode("div",{class:"canvas-wrapper",style:f.normalizeStyle(`transform: scale(${o.value});opacity: ${n.value};`)},[l.value&&u.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",mH,[f.createVNode(zv,{direction:"horizontal",length:l.value},null,8,["length"])]),f.createElementVNode("div",vH,[f.createVNode(zv,{direction:"vertical",length:u.value},null,8,["length"])])],64)):f.createCommentVNode("",!0),f.createElementVNode("div",{id:"design",class:"canvas",style:f.normalizeStyle(`width: ${l.value}mm; height: ${u.value}mm;`),onDrop:Xe,onDragover:K[0]||(K[0]=f.withModifiers(()=>{},["prevent"])),onPointerdown:Qe,onContextmenu:K[1]||(K[1]=f.withModifiers(()=>{},["prevent"]))},[f.unref(N)&&f.unref(T)?(f.openBlock(),f.createElementBlock("div",BH,[f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(Q(f.unref(T),"left"))},null,4),f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(Q(f.unref(T),"right"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(Q(f.unref(T),"top"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(Q(f.unref(T),"bottom"))},null,4)])):f.createCommentVNode("",!0),f.unref(S)?(f.openBlock(),f.createElementBlock("div",wH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(F).horizontal,(ye,mt)=>(f.openBlock(),f.createElementBlock("div",{key:`h-${mt}`,class:f.normalizeClass(["alignment-guide horizontal",`guide-${ye.type}`]),style:f.normalizeStyle({top:`${ye.y}mm`,left:"0",right:"0"})},null,6))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(F).vertical,(ye,mt)=>(f.openBlock(),f.createElementBlock("div",{key:`v-${mt}`,class:f.normalizeClass(["alignment-guide vertical",`guide-${ye.type}`]),style:f.normalizeStyle({left:`${ye.x}mm`,top:"0",bottom:"0"})},null,6))),128))])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.value,ye=>{var mt;return f.openBlock(),f.createElementBlock("div",{key:ye.id,class:f.normalizeClass(["canvas-item",ie(ye)]),style:f.normalizeStyle(re(ye)),"data-item-id":ye.id,onMousedown:Pe=>tt(Pe,ye)},[f.unref(b)()===ye?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[ye.props.lockAspectRatio?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[ye.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:0,class:"resize-handle top",style:f.normalizeStyle(he(ye,"top")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"top"),["stop"])},null,44,bH)):f.createCommentVNode("",!0),ye.type!=="verline"&&ye.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle right",style:f.normalizeStyle(he(ye,"right")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"right"),["stop"])},null,44,EH)):f.createCommentVNode("",!0),ye.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle bottom",style:f.normalizeStyle(he(ye,"bottom")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"bottom"),["stop"])},null,44,CH)):f.createCommentVNode("",!0),ye.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:f.normalizeClass(["resize-handle left",{"line-anchor":ye.type==="line"}]),style:f.normalizeStyle(he(ye,"left")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"left"),["stop"])},null,46,UH)):f.createCommentVNode("",!0),ye.type==="line"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle right line-anchor",style:f.normalizeStyle(he(ye,"right")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"right"),["stop"])},null,44,FH)):f.createCommentVNode("",!0)],64)),ye.type!=="line"&&ye.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle top-left",style:f.normalizeStyle(he(ye,"top-left")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"top-left"),["stop"])},null,44,NH)):f.createCommentVNode("",!0),ye.type!=="line"&&ye.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle top-right",style:f.normalizeStyle(he(ye,"top-right")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"top-right"),["stop"])},null,44,QH)):f.createCommentVNode("",!0),ye.type!=="line"&&ye.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:"resize-handle bottom-right",style:f.normalizeStyle(he(ye,"bottom-right")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"bottom-right"),["stop"])},null,44,SH)):f.createCommentVNode("",!0),ye.type!=="line"&&ye.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle bottom-left",style:f.normalizeStyle(he(ye,"bottom-left")),onMousedown:f.withModifiers(Pe=>f.unref(I)(Pe,ye,"bottom-left"),["stop"])},null,44,TH)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),ye.props&&Wt.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((mt=z(ye.type))==null?void 0:mt.component)||null),{key:`${ye.id}-${ye.type}`,modelValue:{...ye.props,__selected:f.unref(b)()===ye,options:A.options},propsConfig:ke.value,"onUpdate:modelValue":Pe=>{const{__selected:ft,options:qt,...Vt}=Pe;Object.keys(Vt).forEach(vt=>{Vt[vt]!==void 0&&(ye.props[vt]=Vt[vt])})}},null,8,["modelValue","propsConfig","onUpdate:modelValue"])):f.createCommentVNode("",!0)],46,yH)}),128))],36)],4)])]),f.createElementVNode("div",xH,[f.unref(E).length>0?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",RH,[f.createVNode(we,{type:"danger",onClick:K[2]||(K[2]=ye=>ot(f.unref(b)().id))},{default:f.withCtx(()=>[...K[35]||(K[35]=[f.createTextVNode("删除",-1)])]),_:1})]),f.createElementVNode("h3",IH,[K[36]||(K[36]=f.createTextVNode(" 属性设置 ",-1)),(it=St(f.unref(b)().type))!=null&&it.desc?(f.openBlock(),f.createBlock(_e,{key:0,placement:"bottom","show-arrow":!0,"raw-content":""},{content:f.withCtx(()=>[f.createElementVNode("p",{style:{"max-width":"400px",margin:"0","white-space":"pre-line"},innerHTML:St(f.unref(b)().type).desc},null,8,VH)]),default:f.withCtx(()=>[f.createVNode(At,{class:"help-icon"},{default:f.withCtx(()=>[f.createVNode(ze)]),_:1})]),_:1})):f.createCommentVNode("",!0)]),f.createElementVNode("div",MH,[f.createElementVNode("div",OH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(b)().type==="line"?"起点X:":"X坐标:"),1),f.createElementVNode("div",LH,[f.createElementVNode("button",{onClick:K[3]||(K[3]=f.withModifiers(ye=>f.unref(Y)(ye,"x",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Te(),onInput:K[4]||(K[4]=ye=>ve("x",ye.target.value)),onClick:K[5]||(K[5]=f.withModifiers(()=>{},["stop"])),onMousedown:K[6]||(K[6]=f.withModifiers(()=>{},["stop"])),onWheel:K[7]||(K[7]=f.withModifiers(()=>{},["prevent"]))},null,40,kH),f.createElementVNode("button",{onClick:K[8]||(K[8]=f.withModifiers(ye=>f.unref(Y)(ye,"x",.5),["stop"]))},"+")])]),f.createElementVNode("div",HH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(b)().type==="line"?"起点Y:":"Y坐标:"),1),f.createElementVNode("div",DH,[f.createElementVNode("button",{onClick:K[9]||(K[9]=f.withModifiers(ye=>f.unref(Y)(ye,"y",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:De(),onInput:K[10]||(K[10]=ye=>ve("y",ye.target.value)),onClick:K[11]||(K[11]=f.withModifiers(()=>{},["stop"])),onMousedown:K[12]||(K[12]=f.withModifiers(()=>{},["stop"])),onWheel:K[13]||(K[13]=f.withModifiers(()=>{},["prevent"]))},null,40,PH),f.createElementVNode("button",{onClick:K[14]||(K[14]=f.withModifiers(ye=>f.unref(Y)(ye,"y",.5),["stop"]))},"+")])]),f.unref(b)().type!=="verline"?(f.openBlock(),f.createElementBlock("div",WH,[K[37]||(K[37]=f.createElementVNode("label",null,"宽度:",-1)),f.createElementVNode("div",_H,[f.createElementVNode("button",{onClick:K[15]||(K[15]=f.withModifiers(ye=>f.unref(Y)(ye,"width",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Oe(),onInput:K[16]||(K[16]=ye=>ve("width",ye.target.value)),onClick:K[17]||(K[17]=f.withModifiers(()=>{},["stop"])),onMousedown:K[18]||(K[18]=f.withModifiers(()=>{},["stop"])),onBlur:K[19]||(K[19]=ye=>Ae("width",ye.target.value)),onWheel:K[20]||(K[20]=f.withModifiers(()=>{},["prevent"]))},null,40,ZH),f.createElementVNode("button",{onClick:K[21]||(K[21]=f.withModifiers(ye=>f.unref(Y)(ye,"width",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(b)().type!=="line"?(f.openBlock(),f.createElementBlock("div",jH,[K[38]||(K[38]=f.createElementVNode("label",null,"高度:",-1)),f.createElementVNode("div",JH,[f.createElementVNode("button",{onClick:K[22]||(K[22]=f.withModifiers(ye=>f.unref(Y)(ye,"height",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Ke(),onInput:K[23]||(K[23]=ye=>ve("height",ye.target.value)),onClick:K[24]||(K[24]=f.withModifiers(()=>{},["stop"])),onMousedown:K[25]||(K[25]=f.withModifiers(()=>{},["stop"])),onBlur:K[26]||(K[26]=ye=>Ae("height",ye.target.value)),onWheel:K[27]||(K[27]=f.withModifiers(()=>{},["prevent"]))},null,40,KH),f.createElementVNode("button",{onClick:K[28]||(K[28]=f.withModifiers(ye=>f.unref(Y)(ye,"height",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),xt(f.unref(b)().type)?(f.openBlock(),f.createElementBlock("div",GH,[K[39]||(K[39]=f.createElementVNode("label",null,"旋转:",-1)),f.createElementVNode("div",zH,[f.createElementVNode("button",{onClick:K[29]||(K[29]=f.withModifiers(ye=>f.unref(G)(-1),["stop"]))},"-"),f.createElementVNode("span",YH,f.toDisplayString(f.unref(b)().props.rotation)+"°",1),f.createElementVNode("button",{onClick:K[30]||(K[30]=f.withModifiers(ye=>f.unref(G)(1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(b)().type!=="line"?(f.openBlock(),f.createElementBlock("div",XH,[K[40]||(K[40]=f.createElementVNode("label",null,"锁定宽高比:",-1)),f.createElementVNode("div",qH,[f.createVNode(at,{modelValue:f.unref(b)().props.lockAspectRatio,"onUpdate:modelValue":K[31]||(K[31]=ye=>f.unref(b)().props.lockAspectRatio=ye),"active-value":!0,"inactive-value":!1},null,8,["modelValue"])])])):f.createCommentVNode("",!0)]),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((je=z(f.unref(b)().type))==null?void 0:je.propertyPanel)||null),{modelValue:f.unref(b)().props,"onUpdate:modelValue":K[32]||(K[32]=ye=>f.unref(b)().props=ye),options:t.options,"props-config":St(f.unref(b)().type),onRotationChange:wt},null,40,["modelValue","options","props-config"]))],64)):f.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-90993e0b"]]),jq="",dl=jA({__name:"index",props:{templateData:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},config:{type:Object,default:()=>({})}},setup(t){const e=f.getCurrentInstance(),A=t,r=f.ref(!1),n=f.ref({}),a=f.ref(),i=f.ref(0),o=f.ref(!1),s=(E,B)=>{let b;return function(...N){const T=()=>{clearTimeout(b),E(...N)};clearTimeout(b),b=setTimeout(T,B)}},l=f.ref({rectTop:0,isInModal:!1}),u=()=>{if(!a.value)return;const E=a.value.getBoundingClientRect(),B=g(a.value);let b=0;if(E.top>0)b=E.top;else if(B){const U=h(a.value);b=U>0?U:60}else{const U=a.value.offsetTop;U>0?b=U:b=60}(b!==l.value.rectTop||B!==l.value.isInModal)&&(i.value=b,o.value=B,l.value={rectTop:b,isInModal:B})},d=s(u,100),g=E=>{let B=E.parentElement;for(;B;){if(B.classList&&(B.classList.contains("el-dialog")||B.classList.contains("el-drawer")||B.classList.contains("sc-dialog")))return!0;B=B.parentElement}return!1},h=E=>{let B=E.parentElement;for(;B;){if(B.classList&&(B.classList.contains("el-dialog")||B.classList.contains("el-drawer")||B.classList.contains("sc-dialog"))){const b=B.getBoundingClientRect();return b.top>0?b.top:60}B=B.parentElement}return 60};f.onMounted(()=>{setTimeout(()=>u(),100),setTimeout(()=>u(),300),window.addEventListener("resize",d),f.onBeforeUnmount(()=>{window.removeEventListener("resize",d)})}),f.watch(()=>r.value,E=>{E&&f.nextTick(()=>setTimeout(()=>u(),50))}),f.watch(()=>A.templateData,E=>y(E),{deep:!0,immediate:!0});function y(E){if(r.value=(E==null?void 0:E.width)>0&&(E==null?void 0:E.height)>0,!r.value)return;const B={...E};B.printWidth||Object.assign(B,{printWidth:B.width}),B.printHeight||Object.assign(B,{printHeight:B.height}),B!=null&&B.graphData||Object.assign(B,{graphData:{printList:[{x:0,y:0,width:E.printWidth,height:E.printHeight,topLeftRadius:4,topRightRadius:4,bottomLeftRadius:4,bottomRightRadius:4}],punchingList:[]}}),B!=null&&B.items||Object.assign(B,{items:[]}),n.value=B}function m(E){e.exposed=E||{},e.exposeProxy=E||{}}return(E,B)=>{const b=f.resolveDirective("loading");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{ref_key:"templateDesignerRef",ref:a,class:f.normalizeClass(["template-designer",{"template-designer-border-top":o.value}]),style:f.normalizeStyle({height:"calc(100vh - "+(i.value+1)+"px)"})},[r.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.h($H,{...E.$attrs,...A,ref:m},E.$slots)),{key:0,"template-info":n.value},null,8,["template-info"])):f.createCommentVNode("",!0)],6)),[[b,!r.value]])}}},[["__scopeId","data-v-a3d9b11f"]]);function Pt(t){"@babel/helpers - typeof";return Pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(t)}var sr=Uint8Array,Pr=Uint16Array,up=Int32Array,Wu=new sr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),_u=new sr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),fp=new sr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),iy=function(t,e){for(var A=new Pr(31),r=0;r<31;++r)A[r]=e+=1<<t[r-1];for(var n=new up(A[30]),r=1;r<30;++r)for(var a=A[r];a<A[r+1];++a)n[a]=a-A[r]<<5|r;return{b:A,r:n}},oy=iy(Wu,2),sy=oy.b,hp=oy.r;sy[28]=258,hp[258]=28;for(var ly=iy(_u,0),eD=ly.b,cy=ly.r,dp=new Pr(32768),iA=0;iA<32768;++iA){var Ra=(iA&43690)>>1|(iA&21845)<<1;Ra=(Ra&52428)>>2|(Ra&13107)<<2,Ra=(Ra&61680)>>4|(Ra&3855)<<4,dp[iA]=((Ra&65280)>>8|(Ra&255)<<8)>>1}for(var Ln=function(t,e,A){for(var r=t.length,n=0,a=new Pr(e);n<r;++n)t[n]&&++a[t[n]-1];var i=new Pr(e);for(n=1;n<e;++n)i[n]=i[n-1]+a[n-1]<<1;var o;if(A){o=new Pr(1<<e);var s=15-e;for(n=0;n<r;++n)if(t[n])for(var l=n<<4|t[n],u=e-t[n],d=i[t[n]-1]++<<u,g=d|(1<<u)-1;d<=g;++d)o[dp[d]>>s]=l}else for(o=new Pr(r),n=0;n<r;++n)t[n]&&(o[n]=dp[i[t[n]-1]++]>>15-t[n]);return o},Ia=new sr(288),iA=0;iA<144;++iA)Ia[iA]=8;for(var iA=144;iA<256;++iA)Ia[iA]=9;for(var iA=256;iA<280;++iA)Ia[iA]=7;for(var iA=280;iA<288;++iA)Ia[iA]=8;for(var pl=new sr(32),iA=0;iA<32;++iA)pl[iA]=5;var tD=Ln(Ia,9,0),AD=Ln(Ia,9,1),rD=Ln(pl,5,0),nD=Ln(pl,5,1),pp=function(t){for(var e=t[0],A=1;A<t.length;++A)t[A]>e&&(e=t[A]);return e},dn=function(t,e,A){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&A},gp=function(t,e){var A=e/8|0;return(t[A]|t[A+1]<<8|t[A+2]<<16)>>(e&7)},mp=function(t){return(t+7)/8|0},uy=function(t,e,A){return(e==null||e<0)&&(e=0),(A==null||A>t.length)&&(A=t.length),new sr(t.subarray(e,A))},aD=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],pn=function(t,e,A){var r=new Error(e||aD[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,pn),!A)throw r;return r},iD=function(t,e,A,r){var n=t.length,a=r?r.length:0;if(!n||e.f&&!e.l)return A||new sr(0);var i=!A,o=i||e.i!=2,s=e.i;i&&(A=new sr(n*3));var l=function(Te){var De=A.length;if(Te>De){var Oe=new sr(Math.max(De*2,Te));Oe.set(A),A=Oe}},u=e.f||0,d=e.p||0,g=e.b||0,h=e.l,y=e.d,m=e.m,E=e.n,B=n*8;do{if(!h){u=dn(t,d,1);var b=dn(t,d+1,3);if(d+=3,b)if(b==1)h=AD,y=nD,m=9,E=5;else if(b==2){var O=dn(t,d,31)+257,I=dn(t,d+10,15)+4,M=O+dn(t,d+5,31)+1;d+=14;for(var V=new sr(M),Z=new sr(19),F=0;F<I;++F)Z[fp[F]]=dn(t,d+F*3,7);d+=I*3;for(var S=pp(Z),H=(1<<S)-1,P=Ln(Z,S,1),F=0;F<M;){var Y=P[dn(t,d,H)];d+=Y&15;var U=Y>>4;if(U<16)V[F++]=U;else{var G=0,ne=0;for(U==16?(ne=3+dn(t,d,3),d+=2,G=V[F-1]):U==17?(ne=3+dn(t,d,7),d+=3):U==18&&(ne=11+dn(t,d,127),d+=7);ne--;)V[F++]=G}}var te=V.subarray(0,O),Ae=V.subarray(O);m=pp(te),E=pp(Ae),h=Ln(te,m,1),y=Ln(Ae,E,1)}else pn(1);else{var U=mp(d)+4,N=t[U-4]|t[U-3]<<8,T=U+N;if(T>n){s&&pn(0);break}o&&l(g+N),A.set(t.subarray(U,T),g),e.b=g+=N,e.p=d=T*8,e.f=u;continue}if(d>B){s&&pn(0);break}}o&&l(g+131072);for(var $=(1<<m)-1,ce=(1<<E)-1,Q=d;;Q=d){var G=h[gp(t,d)&$],_=G>>4;if(d+=G&15,d>B){s&&pn(0);break}if(G||pn(2),_<256)A[g++]=_;else if(_==256){Q=d,h=null;break}else{var j=_-254;if(_>264){var F=_-257,z=Wu[F];j=dn(t,d,(1<<z)-1)+sy[F],d+=z}var re=y[gp(t,d)&ce],ie=re>>4;re||pn(3),d+=re&15;var Ae=eD[ie];if(ie>3){var z=_u[ie];Ae+=gp(t,d)&(1<<z)-1,d+=z}if(d>B){s&&pn(0);break}o&&l(g+131072);var he=g+j;if(g<Ae){var me=a-Ae,Ve=Math.min(Ae,he);for(me+g<0&&pn(3);g<Ve;++g)A[g]=r[me+g]}for(;g<he;++g)A[g]=A[g-Ae]}}e.l=h,e.p=Q,e.b=g,e.f=u,h&&(u=1,e.m=m,e.d=y,e.n=E)}while(!u);return g!=A.length&&i?uy(A,0,g):A.subarray(0,g)},qn=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8},gl=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8,t[r+2]|=A>>16},vp=function(t,e){for(var A=[],r=0;r<t.length;++r)t[r]&&A.push({s:r,f:t[r]});var n=A.length,a=A.slice();if(!n)return{t:py,l:0};if(n==1){var i=new sr(A[0].s+1);return i[A[0].s]=1,{t:i,l:1}}A.sort(function(T,O){return T.f-O.f}),A.push({s:-1,f:25001});var o=A[0],s=A[1],l=0,u=1,d=2;for(A[0]={s:-1,f:o.f+s.f,l:o,r:s};u!=n-1;)o=A[A[l].f<A[d].f?l++:d++],s=A[l!=u&&A[l].f<A[d].f?l++:d++],A[u++]={s:-1,f:o.f+s.f,l:o,r:s};for(var g=a[0].s,r=1;r<n;++r)a[r].s>g&&(g=a[r].s);var h=new Pr(g+1),y=Bp(A[u-1],h,0);if(y>e){var r=0,m=0,E=y-e,B=1<<E;for(a.sort(function(O,I){return h[I.s]-h[O.s]||O.f-I.f});r<n;++r){var b=a[r].s;if(h[b]>e)m+=B-(1<<y-h[b]),h[b]=e;else break}for(m>>=E;m>0;){var U=a[r].s;h[U]<e?m-=1<<e-h[U]++-1:++r}for(;r>=0&&m;--r){var N=a[r].s;h[N]==e&&(--h[N],++m)}y=e}return{t:new sr(h),l:y}},Bp=function(t,e,A){return t.s==-1?Math.max(Bp(t.l,e,A+1),Bp(t.r,e,A+1)):e[t.s]=A},fy=function(t){for(var e=t.length;e&&!t[--e];);for(var A=new Pr(++e),r=0,n=t[0],a=1,i=function(s){A[r++]=s},o=1;o<=e;++o)if(t[o]==n&&o!=e)++a;else{if(!n&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(n),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(n);a=1,n=t[o]}return{c:A.subarray(0,r),n:e}},ml=function(t,e){for(var A=0,r=0;r<e.length;++r)A+=t[r]*e[r];return A},hy=function(t,e,A){var r=A.length,n=mp(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var a=0;a<r;++a)t[n+a+4]=A[a];return(n+4+r)*8},dy=function(t,e,A,r,n,a,i,o,s,l,u){qn(e,u++,A),++n[256];for(var d=vp(n,15),g=d.t,h=d.l,y=vp(a,15),m=y.t,E=y.l,B=fy(g),b=B.c,U=B.n,N=fy(m),T=N.c,O=N.n,I=new Pr(19),M=0;M<b.length;++M)++I[b[M]&31];for(var M=0;M<T.length;++M)++I[T[M]&31];for(var V=vp(I,7),Z=V.t,F=V.l,S=19;S>4&&!Z[fp[S-1]];--S);var H=l+5<<3,P=ml(n,Ia)+ml(a,pl)+i,Y=ml(n,g)+ml(a,m)+i+14+3*S+ml(I,Z)+2*I[16]+3*I[17]+7*I[18];if(s>=0&&H<=P&&H<=Y)return hy(e,u,t.subarray(s,s+l));var G,ne,te,Ae;if(qn(e,u,1+(Y<P)),u+=2,Y<P){G=Ln(g,h,0),ne=g,te=Ln(m,E,0),Ae=m;var $=Ln(Z,F,0);qn(e,u,U-257),qn(e,u+5,O-1),qn(e,u+10,S-4),u+=14;for(var M=0;M<S;++M)qn(e,u+3*M,Z[fp[M]]);u+=3*S;for(var ce=[b,T],Q=0;Q<2;++Q)for(var _=ce[Q],M=0;M<_.length;++M){var j=_[M]&31;qn(e,u,$[j]),u+=Z[j],j>15&&(qn(e,u,_[M]>>5&127),u+=_[M]>>12)}}else G=tD,ne=Ia,te=rD,Ae=pl;for(var M=0;M<o;++M){var z=r[M];if(z>255){var j=z>>18&31;gl(e,u,G[j+257]),u+=ne[j+257],j>7&&(qn(e,u,z>>23&31),u+=Wu[j]);var re=z&31;gl(e,u,te[re]),u+=Ae[re],re>3&&(gl(e,u,z>>5&8191),u+=_u[re])}else gl(e,u,G[z]),u+=ne[z]}return gl(e,u,G[256]),u+ne[256]},oD=new up([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),py=new sr(0),sD=function(t,e,A,r,n,a){var i=a.z||t.length,o=new sr(r+i+5*(1+Math.ceil(i/7e3))+n),s=o.subarray(r,o.length-n),l=a.l,u=(a.r||0)&7;if(e){u&&(s[0]=a.r>>3);for(var d=oD[e-1],g=d>>13,h=d&8191,y=(1<<A)-1,m=a.p||new Pr(32768),E=a.h||new Pr(y+1),B=Math.ceil(A/3),b=2*B,U=function(Ke){return(t[Ke]^t[Ke+1]<<B^t[Ke+2]<<b)&y},N=new up(25e3),T=new Pr(288),O=new Pr(32),I=0,M=0,V=a.i||0,Z=0,F=a.w||0,S=0;V+2<i;++V){var H=U(V),P=V&32767,Y=E[H];if(m[P]=Y,E[H]=P,F<=V){var G=i-V;if((I>7e3||Z>24576)&&(G>423||!l)){u=dy(t,s,0,N,T,O,M,Z,S,V-S,u),Z=I=M=0,S=V;for(var ne=0;ne<286;++ne)T[ne]=0;for(var ne=0;ne<30;++ne)O[ne]=0}var te=2,Ae=0,$=h,ce=P-Y&32767;if(G>2&&H==U(V-ce))for(var Q=Math.min(g,G)-1,_=Math.min(32767,V),j=Math.min(258,G);ce<=_&&--$&&P!=Y;){if(t[V+te]==t[V+te-ce]){for(var z=0;z<j&&t[V+z]==t[V+z-ce];++z);if(z>te){if(te=z,Ae=ce,z>Q)break;for(var re=Math.min(ce,z-2),ie=0,ne=0;ne<re;++ne){var he=V-ce+ne&32767,me=m[he],Ve=he-me&32767;Ve>ie&&(ie=Ve,Y=he)}}}P=Y,Y=m[P],ce+=P-Y&32767}if(Ae){N[Z++]=268435456|hp[te]<<18|cy[Ae];var Te=hp[te]&31,De=cy[Ae]&31;M+=Wu[Te]+_u[De],++T[257+Te],++O[De],F=V+te,++I}else N[Z++]=t[V],++T[t[V]]}}for(V=Math.max(V,F);V<i;++V)N[Z++]=t[V],++T[t[V]];u=dy(t,s,l,N,T,O,M,Z,S,V-S,u),l||(a.r=u&7|s[u/8|0]<<3,u-=7,a.h=E,a.p=m,a.i=V,a.w=F)}else{for(var V=a.w||0;V<i+l;V+=65535){var Oe=V+65535;Oe>=i&&(s[u/8|0]=l,Oe=i),u=hy(s,u+1,t.subarray(V,Oe))}a.i=i}return uy(o,0,r+mp(u)+n)},gy=function(){var t=1,e=0;return{p:function(A){for(var r=t,n=e,a=A.length|0,i=0;i!=a;){for(var o=Math.min(i+2655,a);i<o;++i)n+=r+=A[i];r=(r&65535)+15*(r>>16),n=(n&65535)+15*(n>>16)}t=r,e=n},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},lD=function(t,e,A,r,n){if(!n&&(n={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),i=new sr(a.length+t.length);i.set(a),i.set(t,a.length),t=i,n.w=a.length}return sD(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,A,r,n)},my=function(t,e,A){for(;A;++e)t[e]=A,A>>>=8},cD=function(t,e){var A=e.level,r=A==0?0:A<6?1:A==9?3:2;if(t[0]=120,t[1]=r<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var n=gy();n.p(e.dictionary),my(t,2,n.d())}},uD=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&pn(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&pn(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function wp(t,e){e||(e={});var A=gy();A.p(t);var r=lD(t,e,e.dictionary?6:2,4);return cD(r,e),my(r,r.length-4,A.d()),r}function fD(t,e){return iD(t.subarray(uD(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}var hD=typeof TextDecoder<"u"&&new TextDecoder,dD=0;try{hD.decode(py,{stream:!0}),dD=1}catch{}/** @license
60
60
  *
61
61
  * jsPDF - PDF Document creation from JavaScript
62
62
  * Version 2.5.2 Built on 2024-09-17T13:29:57.859Z
@@ -298,7 +298,7 @@ endbfchar
298
298
  CMapName currentdict /CMap defineresource pop
299
299
  end
300
300
  end`};e.events.push(["putFont",function(a){(function(i){var o=i.font,s=i.out,l=i.newObject,u=i.putStream;if(o.metadata instanceof t.API.TTFFont&&o.encoding==="Identity-H"){for(var d=o.metadata.Unicode.widths,g=o.metadata.subset.encode(o.metadata.glyIdsUsed,1),h="",y=0;y<g.length;y++)h+=String.fromCharCode(g[y]);var m=l();u({data:h,addLength1:!0,objectId:m}),s("endobj");var E=l();u({data:r(o.metadata.toUnicode),addLength1:!0,objectId:E}),s("endobj");var B=l();s("<<"),s("/Type /FontDescriptor"),s("/FontName /"+Io(o.fontName)),s("/FontFile2 "+m+" 0 R"),s("/FontBBox "+t.API.PDFObject.convert(o.metadata.bbox)),s("/Flags "+o.metadata.flags),s("/StemV "+o.metadata.stemV),s("/ItalicAngle "+o.metadata.italicAngle),s("/Ascent "+o.metadata.ascender),s("/Descent "+o.metadata.decender),s("/CapHeight "+o.metadata.capHeight),s(">>"),s("endobj");var b=l();s("<<"),s("/Type /Font"),s("/BaseFont /"+Io(o.fontName)),s("/FontDescriptor "+B+" 0 R"),s("/W "+t.API.PDFObject.convert(d)),s("/CIDToGIDMap /Identity"),s("/DW 1000"),s("/Subtype /CIDFontType2"),s("/CIDSystemInfo"),s("<<"),s("/Supplement 0"),s("/Registry (Adobe)"),s("/Ordering ("+o.encoding+")"),s(">>"),s(">>"),s("endobj"),o.objectNumber=l(),s("<<"),s("/Type /Font"),s("/Subtype /Type0"),s("/ToUnicode "+E+" 0 R"),s("/BaseFont /"+Io(o.fontName)),s("/Encoding /"+o.encoding),s("/DescendantFonts ["+b+" 0 R]"),s(">>"),s("endobj"),o.isAlreadyPutted=!0}})(a)}]),e.events.push(["putFont",function(a){(function(i){var o=i.font,s=i.out,l=i.newObject,u=i.putStream;if(o.metadata instanceof t.API.TTFFont&&o.encoding==="WinAnsiEncoding"){for(var d=o.metadata.rawData,g="",h=0;h<d.length;h++)g+=String.fromCharCode(d[h]);var y=l();u({data:g,addLength1:!0,objectId:y}),s("endobj");var m=l();u({data:r(o.metadata.toUnicode),addLength1:!0,objectId:m}),s("endobj");var E=l();s("<<"),s("/Descent "+o.metadata.decender),s("/CapHeight "+o.metadata.capHeight),s("/StemV "+o.metadata.stemV),s("/Type /FontDescriptor"),s("/FontFile2 "+y+" 0 R"),s("/Flags 96"),s("/FontBBox "+t.API.PDFObject.convert(o.metadata.bbox)),s("/FontName /"+Io(o.fontName)),s("/ItalicAngle "+o.metadata.italicAngle),s("/Ascent "+o.metadata.ascender),s(">>"),s("endobj"),o.objectNumber=l();for(var B=0;B<o.metadata.hmtx.widths.length;B++)o.metadata.hmtx.widths[B]=parseInt(o.metadata.hmtx.widths[B]*(1e3/o.metadata.head.unitsPerEm));s("<</Subtype/TrueType/Type/Font/ToUnicode "+m+" 0 R/BaseFont/"+Io(o.fontName)+"/FontDescriptor "+E+" 0 R/Encoding/"+o.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(o.metadata.hmtx.widths)+">>"),s("endobj"),o.isAlreadyPutted=!0}})(a)}]);var n=function(a){var i,o=a.text||"",s=a.x,l=a.y,u=a.options||{},d=a.mutex||{},g=d.pdfEscape,h=d.activeFontKey,y=d.fonts,m=h,E="",B=0,b="",U=y[m].encoding;if(y[m].encoding!=="Identity-H")return{text:o,x:s,y:l,options:u,mutex:d};for(b=o,m=h,Array.isArray(o)&&(b=o[0]),B=0;B<b.length;B+=1)y[m].metadata.hasOwnProperty("cmap")&&(i=y[m].metadata.cmap.unicode.codeMap[b[B].charCodeAt(0)]),i||b[B].charCodeAt(0)<256&&y[m].metadata.hasOwnProperty("Unicode")?E+=b[B]:E+="";var N="";return parseInt(m.slice(1))<14||U==="WinAnsiEncoding"?N=g(E,m).split("").map(function(T){return T.charCodeAt(0).toString(16)}).join(""):U==="Identity-H"&&(N=A(E,y[m])),d.isHex=!0,{text:N,x:s,y:l,options:u,mutex:d}};e.events.push(["postProcessText",function(a){var i=a.text||"",o=[],s={text:i,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(i)){var l=0;for(l=0;l<i.length;l+=1)Array.isArray(i[l])&&i[l].length===3?o.push([n(Object.assign({},s,{text:i[l][0]})).text,i[l][1],i[l][2]]):o.push(n(Object.assign({},s,{text:i[l]})).text);a.text=o}else a.text=n(Object.assign({},s,{text:i})).text}])}(gt),function(t){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(A){return e.call(this),this.internal.vFS[A]!==void 0},t.addFileToVFS=function(A,r){return e.call(this),this.internal.vFS[A]=r,this},t.getFileFromVFS=function(A){return e.call(this),this.internal.vFS[A]!==void 0?this.internal.vFS[A]:null}}(gt.API),function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(r){var n,a,i,o,s,l,u,d=e,g=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],h=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],y={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},m={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},E=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],B=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),b=!1,U=0;this.__bidiEngine__={};var N=function(F){var S=F.charCodeAt(),H=S>>8,P=m[H];return P!==void 0?d[256*P+(255&S)]:H===252||H===253?"AL":B.test(H)?"L":H===8?"R":"N"},T=function(F){for(var S,H=0;H<F.length;H++){if((S=N(F.charAt(H)))==="L")return!1;if(S==="R")return!0}return!1},O=function(F,S,H,P){var Y,G,ne,te,Ae=S[P];switch(Ae){case"L":case"R":b=!1;break;case"N":case"AN":break;case"EN":b&&(Ae="AN");break;case"AL":b=!0,Ae="R";break;case"WS":Ae="N";break;case"CS":P<1||P+1>=S.length||(Y=H[P-1])!=="EN"&&Y!=="AN"||(G=S[P+1])!=="EN"&&G!=="AN"?Ae="N":b&&(G="AN"),Ae=G===Y?G:"N";break;case"ES":Ae=(Y=P>0?H[P-1]:"B")==="EN"&&P+1<S.length&&S[P+1]==="EN"?"EN":"N";break;case"ET":if(P>0&&H[P-1]==="EN"){Ae="EN";break}if(b){Ae="N";break}for(ne=P+1,te=S.length;ne<te&&S[ne]==="ET";)ne++;Ae=ne<te&&S[ne]==="EN"?"EN":"N";break;case"NSM":if(i&&!o){for(te=S.length,ne=P+1;ne<te&&S[ne]==="NSM";)ne++;if(ne<te){var $=F[P],ce=$>=1425&&$<=2303||$===64286;if(Y=S[ne],ce&&(Y==="R"||Y==="AL")){Ae="R";break}}}Ae=P<1||(Y=S[P-1])==="B"?"N":H[P-1];break;case"B":b=!1,n=!0,Ae=U;break;case"S":a=!0,Ae="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":b=!1;break;case"BN":Ae="N"}return Ae},I=function(F,S,H){var P=F.split("");return H&&M(P,H,{hiLevel:U}),P.reverse(),S&&S.reverse(),P.join("")},M=function(F,S,H){var P,Y,G,ne,te,Ae=-1,$=F.length,ce=0,Q=[],_=U?h:g,j=[];for(b=!1,n=!1,a=!1,Y=0;Y<$;Y++)j[Y]=N(F[Y]);for(G=0;G<$;G++){if(te=ce,Q[G]=O(F,j,Q,G),P=240&(ce=_[te][y[Q[G]]]),ce&=15,S[G]=ne=_[ce][5],P>0)if(P===16){for(Y=Ae;Y<G;Y++)S[Y]=1;Ae=-1}else Ae=-1;if(_[ce][6])Ae===-1&&(Ae=G);else if(Ae>-1){for(Y=Ae;Y<G;Y++)S[Y]=ne;Ae=-1}j[G]==="B"&&(S[G]=0),H.hiLevel|=ne}a&&function(z,re,ie){for(var he=0;he<ie;he++)if(z[he]==="S"){re[he]=U;for(var me=he-1;me>=0&&z[me]==="WS";me--)re[me]=U}}(j,S,$)},V=function(F,S,H,P,Y){if(!(Y.hiLevel<F)){if(F===1&&U===1&&!n)return S.reverse(),void(H&&H.reverse());for(var G,ne,te,Ae,$=S.length,ce=0;ce<$;){if(P[ce]>=F){for(te=ce+1;te<$&&P[te]>=F;)te++;for(Ae=ce,ne=te-1;Ae<ne;Ae++,ne--)G=S[Ae],S[Ae]=S[ne],S[ne]=G,H&&(G=H[Ae],H[Ae]=H[ne],H[ne]=G);ce=te}ce++}}},Z=function(F,S,H){var P=F.split(""),Y={hiLevel:U};return H||(H=[]),M(P,H,Y),function(G,ne,te){if(te.hiLevel!==0&&u)for(var Ae,$=0;$<G.length;$++)ne[$]===1&&(Ae=E.indexOf(G[$]))>=0&&(G[$]=E[Ae+1])}(P,H,Y),V(2,P,S,H,Y),V(1,P,S,H,Y),P.join("")};return this.__bidiEngine__.doBidiReorder=function(F,S,H){if(function(Y,G){if(G)for(var ne=0;ne<Y.length;ne++)G[ne]=ne;o===void 0&&(o=T(Y)),l===void 0&&(l=T(Y))}(F,S),i||!s||l)if(i&&s&&o^l)U=o?1:0,F=I(F,S,H);else if(!i&&s&&l)U=o?1:0,F=Z(F,S,H),F=I(F,S);else if(!i||o||s||l){if(i&&!s&&o^l)F=I(F,S),o?(U=0,F=Z(F,S,H)):(U=1,F=Z(F,S,H),F=I(F,S));else if(i&&o&&!s&&l)U=1,F=Z(F,S,H),F=I(F,S);else if(!i&&!s&&o^l){var P=u;o?(U=1,F=Z(F,S,H),U=0,u=!1,F=Z(F,S,H),u=P):(U=0,F=Z(F,S,H),F=I(F,S),U=1,u=!1,F=Z(F,S,H),u=P,F=I(F,S))}}else U=0,F=Z(F,S,H);else U=o?1:0,F=Z(F,S,H);return F},this.__bidiEngine__.setOptions=function(F){F&&(i=F.isInputVisual,s=F.isOutputVisual,o=F.isInputRtl,l=F.isOutputRtl,u=F.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],A=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(r){var n=r.text,a=(r.x,r.y,r.options||{}),i=(r.mutex,a.lang,[]);if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,A.setOptions(a),Object.prototype.toString.call(n)==="[object Array]"){var o=0;for(i=[],o=0;o<n.length;o+=1)Object.prototype.toString.call(n[o])==="[object Array]"?i.push([A.doBidiReorder(n[o][0]),n[o][1],n[o][2]]):i.push([A.doBidiReorder(n[o])]);r.text=i}else r.text=A.doBidiReorder(n);A.setOptions({isInputVisual:!0})}])}(gt),gt.API.TTFFont=function(){function t(e){var A;if(this.rawData=e,A=this.contents=new Oa(e),this.contents.pos=4,A.readString(4)==="ttcf")throw new Error("TTCF not supported.");A.pos=0,this.parse(),this.subset=new YD(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new OD(this.contents),this.head=new kD(this),this.name=new _D(this),this.cmap=new jy(this),this.toUnicode={},this.hhea=new HD(this),this.maxp=new ZD(this),this.hmtx=new jD(this),this.post=new PD(this),this.os2=new DD(this),this.loca=new zD(this),this.glyf=new JD(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var e,A,r,n,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var i,o,s,l;for(l=[],i=0,o=(s=this.bbox).length;i<o;i++)e=s[i],l.push(Math.round(e*this.scaleFactor));return l}).call(this),this.stemV=0,this.post.exists?(r=255&(n=this.post.italic_angle),32768&(A=n>>16)&&(A=-(1+(65535^A))),this.italicAngle=+(A+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(e){var A;return((A=this.cmap.unicode)!=null?A.codeMap[e]:void 0)||0},t.prototype.widthOfGlyph=function(e){var A;return A=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*A},t.prototype.widthOfString=function(e,A,r){var n,a,i,o;for(i=0,a=0,o=(e=""+e).length;0<=o?a<o:a>o;a=0<=o?++a:--a)n=e.charCodeAt(a),i+=this.widthOfGlyph(this.characterToGlyph(n))+r*(1e3/A)||0;return i*(A/1e3)},t.prototype.lineHeight=function(e,A){var r;return A==null&&(A=!1),r=A?this.lineGap:0,(this.ascender+r-this.decender)/1e3*e},t}();var vn,Oa=function(){function t(e){this.data=e??[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(e){return this.data[this.pos++]=e},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},t.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},t.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},t.prototype.readString=function(e){var A,r;for(r=[],A=0;0<=e?A<e:A>e;A=0<=e?++A:--A)r[A]=String.fromCharCode(this.readByte());return r.join("")},t.prototype.writeString=function(e){var A,r,n;for(n=[],A=0,r=e.length;0<=r?A<r:A>r;A=0<=r?++A:--A)n.push(this.writeByte(e.charCodeAt(A)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(e){return this.writeInt16(e)},t.prototype.readLongLong=function(){var e,A,r,n,a,i,o,s;return e=this.readByte(),A=this.readByte(),r=this.readByte(),n=this.readByte(),a=this.readByte(),i=this.readByte(),o=this.readByte(),s=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^A)+1099511627776*(255^r)+4294967296*(255^n)+16777216*(255^a)+65536*(255^i)+256*(255^o)+(255^s)+1):72057594037927940*e+281474976710656*A+1099511627776*r+4294967296*n+16777216*a+65536*i+256*o+s},t.prototype.writeLongLong=function(e){var A,r;return A=Math.floor(e/4294967296),r=4294967295&e,this.writeByte(A>>24&255),this.writeByte(A>>16&255),this.writeByte(A>>8&255),this.writeByte(255&A),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(e){return this.writeInt32(e)},t.prototype.read=function(e){var A,r;for(A=[],r=0;0<=e?r<e:r>e;r=0<=e?++r:--r)A.push(this.readByte());return A},t.prototype.write=function(e){var A,r,n,a;for(a=[],r=0,n=e.length;r<n;r++)A=e[r],a.push(this.writeByte(A));return a},t}(),OD=function(){var t;function e(A){var r,n,a;for(this.scalarType=A.readInt(),this.tableCount=A.readShort(),this.searchRange=A.readShort(),this.entrySelector=A.readShort(),this.rangeShift=A.readShort(),this.tables={},n=0,a=this.tableCount;0<=a?n<a:n>a;n=0<=a?++n:--n)r={tag:A.readString(4),checksum:A.readInt(),offset:A.readInt(),length:A.readInt()},this.tables[r.tag]=r}return e.prototype.encode=function(A){var r,n,a,i,o,s,l,u,d,g,h,y,m;for(m in h=Object.keys(A).length,s=Math.log(2),d=16*Math.floor(Math.log(h)/s),i=Math.floor(d/s),u=16*h-d,(n=new Oa).writeInt(this.scalarType),n.writeShort(h),n.writeShort(d),n.writeShort(i),n.writeShort(u),a=16*h,l=n.pos+a,o=null,y=[],A)for(g=A[m],n.writeString(m),n.writeInt(t(g)),n.writeInt(l),n.writeInt(g.length),y=y.concat(g),m==="head"&&(o=l),l+=g.length;l%4;)y.push(0),l++;return n.write(y),r=2981146554-t(n.data),n.pos=o+8,n.writeUInt32(r),n.data},t=function(A){var r,n,a,i;for(A=Jy.call(A);A.length%4;)A.push(0);for(a=new Oa(A),n=0,r=0,i=A.length;r<i;r=r+=4)n+=a.readUInt32();return 4294967295&n},e}(),LD={}.hasOwnProperty,Dn=function(t,e){for(var A in e)LD.call(e,A)&&(t[A]=e[A]);function r(){this.constructor=t}return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};vn=function(){function t(e){var A;this.file=e,A=this.file.directory.tables[this.tag],this.exists=!!A,A&&(this.offset=A.offset,this.length=A.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var kD=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Dn(e,vn),e.prototype.tag="head",e.prototype.parse=function(A){return A.pos=this.offset,this.version=A.readInt(),this.revision=A.readInt(),this.checkSumAdjustment=A.readInt(),this.magicNumber=A.readInt(),this.flags=A.readShort(),this.unitsPerEm=A.readShort(),this.created=A.readLongLong(),this.modified=A.readLongLong(),this.xMin=A.readShort(),this.yMin=A.readShort(),this.xMax=A.readShort(),this.yMax=A.readShort(),this.macStyle=A.readShort(),this.lowestRecPPEM=A.readShort(),this.fontDirectionHint=A.readShort(),this.indexToLocFormat=A.readShort(),this.glyphDataFormat=A.readShort()},e.prototype.encode=function(A){var r;return(r=new Oa).writeInt(this.version),r.writeInt(this.revision),r.writeInt(this.checkSumAdjustment),r.writeInt(this.magicNumber),r.writeShort(this.flags),r.writeShort(this.unitsPerEm),r.writeLongLong(this.created),r.writeLongLong(this.modified),r.writeShort(this.xMin),r.writeShort(this.yMin),r.writeShort(this.xMax),r.writeShort(this.yMax),r.writeShort(this.macStyle),r.writeShort(this.lowestRecPPEM),r.writeShort(this.fontDirectionHint),r.writeShort(A),r.writeShort(this.glyphDataFormat),r.data},e}(),Zy=function(){function t(e,A){var r,n,a,i,o,s,l,u,d,g,h,y,m,E,B,b,U;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=A+e.readInt(),d=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=e.readByte();break;case 4:for(h=e.readUInt16(),g=h/2,e.pos+=6,a=function(){var N,T;for(T=[],s=N=0;0<=g?N<g:N>g;s=0<=g?++N:--N)T.push(e.readUInt16());return T}(),e.pos+=2,m=function(){var N,T;for(T=[],s=N=0;0<=g?N<g:N>g;s=0<=g?++N:--N)T.push(e.readUInt16());return T}(),l=function(){var N,T;for(T=[],s=N=0;0<=g?N<g:N>g;s=0<=g?++N:--N)T.push(e.readUInt16());return T}(),u=function(){var N,T;for(T=[],s=N=0;0<=g?N<g:N>g;s=0<=g?++N:--N)T.push(e.readUInt16());return T}(),n=(this.length-e.pos+this.offset)/2,o=function(){var N,T;for(T=[],s=N=0;0<=n?N<n:N>n;s=0<=n?++N:--N)T.push(e.readUInt16());return T}(),s=B=0,U=a.length;B<U;s=++B)for(E=a[s],r=b=y=m[s];y<=E?b<=E:b>=E;r=y<=E?++b:--b)u[s]===0?i=r+l[s]:(i=o[u[s]/2+(r-y)-(g-s)]||0)!==0&&(i+=l[s]),this.codeMap[r]=65535&i}e.pos=d}return t.encode=function(e,A){var r,n,a,i,o,s,l,u,d,g,h,y,m,E,B,b,U,N,T,O,I,M,V,Z,F,S,H,P,Y,G,ne,te,Ae,$,ce,Q,_,j,z,re,ie,he,me,Ve,Te,De;switch(P=new Oa,i=Object.keys(e).sort(function(Oe,Ke){return Oe-Ke}),A){case"macroman":for(m=0,E=function(){var Oe=[];for(y=0;y<256;++y)Oe.push(0);return Oe}(),b={0:0},a={},Y=0,Ae=i.length;Y<Ae;Y++)b[me=e[n=i[Y]]]==null&&(b[me]=++m),a[n]={old:e[n],new:b[e[n]]},E[n]=b[e[n]];return P.writeUInt16(1),P.writeUInt16(0),P.writeUInt32(12),P.writeUInt16(0),P.writeUInt16(262),P.writeUInt16(0),P.write(E),{charMap:a,subtable:P.data,maxGlyphID:m+1};case"unicode":for(S=[],d=[],U=0,b={},r={},B=l=null,G=0,$=i.length;G<$;G++)b[T=e[n=i[G]]]==null&&(b[T]=++U),r[n]={old:T,new:b[T]},o=b[T]-n,B!=null&&o===l||(B&&d.push(B),S.push(n),l=o),B=n;for(B&&d.push(B),d.push(65535),S.push(65535),Z=2*(V=S.length),M=2*Math.pow(Math.log(V)/Math.LN2,2),g=Math.log(M/2)/Math.LN2,I=2*V-M,s=[],O=[],h=[],y=ne=0,ce=S.length;ne<ce;y=++ne){if(F=S[y],u=d[y],F===65535){s.push(0),O.push(0);break}if(F-(H=r[F].new)>=32768)for(s.push(0),O.push(2*(h.length+V-y)),n=te=F;F<=u?te<=u:te>=u;n=F<=u?++te:--te)h.push(r[n].new);else s.push(H-F),O.push(0)}for(P.writeUInt16(3),P.writeUInt16(1),P.writeUInt32(12),P.writeUInt16(4),P.writeUInt16(16+8*V+2*h.length),P.writeUInt16(0),P.writeUInt16(Z),P.writeUInt16(M),P.writeUInt16(g),P.writeUInt16(I),ie=0,Q=d.length;ie<Q;ie++)n=d[ie],P.writeUInt16(n);for(P.writeUInt16(0),he=0,_=S.length;he<_;he++)n=S[he],P.writeUInt16(n);for(Ve=0,j=s.length;Ve<j;Ve++)o=s[Ve],P.writeUInt16(o);for(Te=0,z=O.length;Te<z;Te++)N=O[Te],P.writeUInt16(N);for(De=0,re=h.length;De<re;De++)m=h[De],P.writeUInt16(m);return{charMap:r,subtable:P.data,maxGlyphID:U+1}}},t}(),jy=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Dn(e,vn),e.prototype.tag="cmap",e.prototype.parse=function(A){var r,n,a;for(A.pos=this.offset,this.version=A.readUInt16(),a=A.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=a?n<a:n>a;n=0<=a?++n:--n)r=new Zy(A,this.offset),this.tables.push(r),r.isUnicode&&this.unicode==null&&(this.unicode=r);return!0},e.encode=function(A,r){var n,a;return r==null&&(r="macroman"),n=Zy.encode(A,r),(a=new Oa).writeUInt16(0),a.writeUInt16(1),n.table=a.data.concat(n.subtable),n},e}(),HD=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Dn(e,vn),e.prototype.tag="hhea",e.prototype.parse=function(A){return A.pos=this.offset,this.version=A.readInt(),this.ascender=A.readShort(),this.decender=A.readShort(),this.lineGap=A.readShort(),this.advanceWidthMax=A.readShort(),this.minLeftSideBearing=A.readShort(),this.minRightSideBearing=A.readShort(),this.xMaxExtent=A.readShort(),this.caretSlopeRise=A.readShort(),this.caretSlopeRun=A.readShort(),this.caretOffset=A.readShort(),A.pos+=8,this.metricDataFormat=A.readShort(),this.numberOfMetrics=A.readUInt16()},e}(),DD=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Dn(e,vn),e.prototype.tag="OS/2",e.prototype.parse=function(A){if(A.pos=this.offset,this.version=A.readUInt16(),this.averageCharWidth=A.readShort(),this.weightClass=A.readUInt16(),this.widthClass=A.readUInt16(),this.type=A.readShort(),this.ySubscriptXSize=A.readShort(),this.ySubscriptYSize=A.readShort(),this.ySubscriptXOffset=A.readShort(),this.ySubscriptYOffset=A.readShort(),this.ySuperscriptXSize=A.readShort(),this.ySuperscriptYSize=A.readShort(),this.ySuperscriptXOffset=A.readShort(),this.ySuperscriptYOffset=A.readShort(),this.yStrikeoutSize=A.readShort(),this.yStrikeoutPosition=A.readShort(),this.familyClass=A.readShort(),this.panose=function(){var r,n;for(n=[],r=0;r<10;++r)n.push(A.readByte());return n}(),this.charRange=function(){var r,n;for(n=[],r=0;r<4;++r)n.push(A.readInt());return n}(),this.vendorID=A.readString(4),this.selection=A.readShort(),this.firstCharIndex=A.readShort(),this.lastCharIndex=A.readShort(),this.version>0&&(this.ascent=A.readShort(),this.descent=A.readShort(),this.lineGap=A.readShort(),this.winAscent=A.readShort(),this.winDescent=A.readShort(),this.codePageRange=function(){var r,n;for(n=[],r=0;r<2;r=++r)n.push(A.readInt());return n}(),this.version>1))return this.xHeight=A.readShort(),this.capHeight=A.readShort(),this.defaultChar=A.readShort(),this.breakChar=A.readShort(),this.maxContext=A.readShort()},e}(),PD=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Dn(e,vn),e.prototype.tag="post",e.prototype.parse=function(A){var r,n,a;switch(A.pos=this.offset,this.format=A.readInt(),this.italicAngle=A.readInt(),this.underlinePosition=A.readShort(),this.underlineThickness=A.readShort(),this.isFixedPitch=A.readInt(),this.minMemType42=A.readInt(),this.maxMemType42=A.readInt(),this.minMemType1=A.readInt(),this.maxMemType1=A.readInt(),this.format){case 65536:break;case 131072:var i;for(n=A.readUInt16(),this.glyphNameIndex=[],i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)this.glyphNameIndex.push(A.readUInt16());for(this.names=[],a=[];A.pos<this.offset+this.length;)r=A.readByte(),a.push(this.names.push(A.readString(r)));return a;case 151552:return n=A.readUInt16(),this.offsets=A.read(n);case 196608:break;case 262144:return this.map=(function(){var o,s,l;for(l=[],i=o=0,s=this.file.maxp.numGlyphs;0<=s?o<s:o>s;i=0<=s?++o:--o)l.push(A.readUInt32());return l}).call(this)}},e}(),WD=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},_D=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Dn(e,vn),e.prototype.tag="name",e.prototype.parse=function(A){var r,n,a,i,o,s,l,u,d,g,h;for(A.pos=this.offset,A.readShort(),r=A.readShort(),s=A.readShort(),n=[],i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)n.push({platformID:A.readShort(),encodingID:A.readShort(),languageID:A.readShort(),nameID:A.readShort(),length:A.readShort(),offset:this.offset+s+A.readShort()});for(l={},i=d=0,g=n.length;d<g;i=++d)a=n[i],A.pos=a.offset,u=A.readString(a.length),o=new WD(u,a),l[h=a.nameID]==null&&(l[h]=[]),l[a.nameID].push(o);this.strings=l,this.copyright=l[0],this.fontFamily=l[1],this.fontSubfamily=l[2],this.uniqueSubfamily=l[3],this.fontName=l[4],this.version=l[5];try{this.postscriptName=l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=l[7],this.manufacturer=l[8],this.designer=l[9],this.description=l[10],this.vendorUrl=l[11],this.designerUrl=l[12],this.license=l[13],this.licenseUrl=l[14],this.preferredFamily=l[15],this.preferredSubfamily=l[17],this.compatibleFull=l[18],this.sampleText=l[19]},e}(),ZD=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Dn(e,vn),e.prototype.tag="maxp",e.prototype.parse=function(A){return A.pos=this.offset,this.version=A.readInt(),this.numGlyphs=A.readUInt16(),this.maxPoints=A.readUInt16(),this.maxContours=A.readUInt16(),this.maxCompositePoints=A.readUInt16(),this.maxComponentContours=A.readUInt16(),this.maxZones=A.readUInt16(),this.maxTwilightPoints=A.readUInt16(),this.maxStorage=A.readUInt16(),this.maxFunctionDefs=A.readUInt16(),this.maxInstructionDefs=A.readUInt16(),this.maxStackElements=A.readUInt16(),this.maxSizeOfInstructions=A.readUInt16(),this.maxComponentElements=A.readUInt16(),this.maxComponentDepth=A.readUInt16()},e}(),jD=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Dn(e,vn),e.prototype.tag="hmtx",e.prototype.parse=function(A){var r,n,a,i,o,s,l;for(A.pos=this.offset,this.metrics=[],r=0,s=this.file.hhea.numberOfMetrics;0<=s?r<s:r>s;r=0<=s?++r:--r)this.metrics.push({advance:A.readUInt16(),lsb:A.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var u,d;for(d=[],r=u=0;0<=a?u<a:u>a;r=0<=a?++u:--u)d.push(A.readInt16());return d}(),this.widths=(function(){var u,d,g,h;for(h=[],u=0,d=(g=this.metrics).length;u<d;u++)i=g[u],h.push(i.advance);return h}).call(this),n=this.widths[this.widths.length-1],l=[],r=o=0;0<=a?o<a:o>a;r=0<=a?++o:--o)l.push(this.widths.push(n));return l},e.prototype.forGlyph=function(A){return A in this.metrics?this.metrics[A]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[A-this.metrics.length]}},e}(),Jy=[].slice,JD=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Dn(e,vn),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(A){var r,n,a,i,o,s,l,u,d,g;return A in this.cache?this.cache[A]:(i=this.file.loca,r=this.file.contents,n=i.indexOf(A),(a=i.lengthOf(A))===0?this.cache[A]=null:(r.pos=this.offset+n,o=(s=new Oa(r.read(a))).readShort(),u=s.readShort(),g=s.readShort(),l=s.readShort(),d=s.readShort(),this.cache[A]=o===-1?new GD(s,u,g,l,d):new KD(s,o,u,g,l,d),this.cache[A]))},e.prototype.encode=function(A,r,n){var a,i,o,s,l;for(o=[],i=[],s=0,l=r.length;s<l;s++)a=A[r[s]],i.push(o.length),a&&(o=o.concat(a.encode(n)));return i.push(o.length),{table:o,offsets:i}},e}(),KD=function(){function t(e,A,r,n,a,i){this.raw=e,this.numberOfContours=A,this.xMin=r,this.yMin=n,this.xMax=a,this.yMax=i,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),GD=function(){function t(e,A,r,n,a){var i,o;for(this.raw=e,this.xMin=A,this.yMin=r,this.xMax=n,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],i=this.raw;o=i.readShort(),this.glyphOffsets.push(i.pos),this.glyphIDs.push(i.readUInt16()),32&o;)i.pos+=1&o?4:2,128&o?i.pos+=8:64&o?i.pos+=4:8&o&&(i.pos+=2)}return t.prototype.encode=function(){var e,A,r;for(A=new Oa(Jy.call(this.raw.data)),e=0,r=this.glyphIDs.length;e<r;++e)A.pos=this.glyphOffsets[e];return A.data},t}(),zD=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Dn(e,vn),e.prototype.tag="loca",e.prototype.parse=function(A){var r,n;return A.pos=this.offset,r=this.file.head.indexToLocFormat,this.offsets=r===0?(function(){var a,i;for(i=[],n=0,a=this.length;n<a;n+=2)i.push(2*A.readUInt16());return i}).call(this):(function(){var a,i;for(i=[],n=0,a=this.length;n<a;n+=4)i.push(A.readUInt32());return i}).call(this)},e.prototype.indexOf=function(A){return this.offsets[A]},e.prototype.lengthOf=function(A){return this.offsets[A+1]-this.offsets[A]},e.prototype.encode=function(A,r){for(var n=new Uint32Array(this.offsets.length),a=0,i=0,o=0;o<n.length;++o)if(n[o]=a,i<r.length&&r[i]==o){++i,n[o]=a;var s=this.offsets[o],l=this.offsets[o+1]-s;l>0&&(a+=l)}for(var u=new Array(4*n.length),d=0;d<n.length;++d)u[4*d+3]=255&n[d],u[4*d+2]=(65280&n[d])>>8,u[4*d+1]=(16711680&n[d])>>16,u[4*d]=(4278190080&n[d])>>24;return u},e}(),YD=function(){function t(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var e,A,r,n,a;for(A in n=this.font.cmap.tables[0].codeMap,e={},a=this.subset)r=a[A],e[A]=n[r];return e},t.prototype.glyphsFor=function(e){var A,r,n,a,i,o,s;for(n={},i=0,o=e.length;i<o;i++)n[a=e[i]]=this.font.glyf.glyphFor(a);for(a in A=[],n)(r=n[a])!=null&&r.compound&&A.push.apply(A,r.glyphIDs);if(A.length>0)for(a in s=this.glyphsFor(A))r=s[a],n[a]=r;return n},t.prototype.encode=function(e,A){var r,n,a,i,o,s,l,u,d,g,h,y,m,E,B;for(n in r=jy.encode(this.generateCmap(),"unicode"),i=this.glyphsFor(e),h={0:0},B=r.charMap)h[(s=B[n]).old]=s.new;for(y in g=r.maxGlyphID,i)y in h||(h[y]=g++);return u=function(b){var U,N;for(U in N={},b)N[b[U]]=U;return N}(h),d=Object.keys(u).sort(function(b,U){return b-U}),m=function(){var b,U,N;for(N=[],b=0,U=d.length;b<U;b++)o=d[b],N.push(u[o]);return N}(),a=this.font.glyf.encode(i,m,h),l=this.font.loca.encode(a.offsets,m),E={cmap:this.font.cmap.raw(),glyf:a.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(A)},this.font.os2.exists&&(E["OS/2"]=this.font.os2.raw()),this.font.directory.encode(E)},t}();gt.API.PDFObject=function(){var t;function e(){}return t=function(A,r){return(Array(r+1).join("0")+A).slice(-r)},e.convert=function(A){var r,n,a,i;if(Array.isArray(A))return"["+function(){var o,s,l;for(l=[],o=0,s=A.length;o<s;o++)r=A[o],l.push(e.convert(r));return l}().join(" ")+"]";if(typeof A=="string")return"/"+A;if(A!=null&&A.isString)return"("+A+")";if(A instanceof Date)return"(D:"+t(A.getUTCFullYear(),4)+t(A.getUTCMonth(),2)+t(A.getUTCDate(),2)+t(A.getUTCHours(),2)+t(A.getUTCMinutes(),2)+t(A.getUTCSeconds(),2)+"Z)";if({}.toString.call(A)==="[object Object]"){for(n in a=["<<"],A)i=A[n],a.push("/"+n+" "+e.convert(i));return a.push(">>"),a.join(`
301
- `)}return""+A},e}();const XD=t=>{const e=(t==null?void 0:t.querySelectorAll("img"))||[],A=Array.from(e).map(r=>r.complete?Promise.resolve():new Promise(n=>{r.onload=r.onerror=n}));return Promise.all(A)},qD=(t,e)=>{const A=JSON.parse(JSON.stringify(t||{})),r=A.items||[],n=(a,i)=>{if(Array.isArray(a)){const s=typeof i=="string"?i:" ";return a.map(u=>e&&e[u]!=null?String(e[u]):"").filter(u=>u!=="").join(s)}const o=a;return o&&e&&e[o]!=null?String(e[o]):""};return r.forEach(a=>{const i=a.props||{},o=i.FieldName,s=i.FieldConnector;if(o)switch(a.type){case"text":{const l=n(o,s),u=i.Title||"";i.Text=u?`${u}${l}`:l;break}case"barcode":{i.BarcodeValue=n(o,s);break}case"qrcode":{i.QRCodeValue=n(o,s);break}}}),A.items=r,A.printWidth=A.print_width||A.printWidth||0,A.printHeight=A.print_height||A.printHeight||0,A};async function $D(t,e,A={}){const{page:r,scale:n,pdf:a,returnType:i="base64",format:o="pdf",cacheInstance:s=!0}=A,l=qD(t,e),{default:u}=await Promise.resolve().then(()=>ay),d=(r==null?void 0:r.widthMm)||l.printWidth||l.width||100,g=(r==null?void 0:r.heightMm)||l.printHeight||l.height||100,h=Math.max(1,Math.floor(co(d))),y=Math.max(1,Math.floor(co(g)));let m,E;const B="__td_renderer_singleton__";if(s&&window[B]){const b=window[B];m=b.container,b.templateRef.value=l,b.keyRef.value=(b.keyRef.value||0)+1,m.style.width=h+"px",m.style.height=y+"px"}else{m=document.createElement("div"),m.style.position="fixed",m.style.left="-10000px",m.style.top="0",m.style.width=h+"px",m.style.height=y+"px",m.style.overflow="hidden",m.style.opacity="1",m.style.pointerEvents="none",document.body.appendChild(m);const b=f.ref(l),U=f.ref(0);E=f.createApp({render(){return f.h(dl,{key:U.value,templateData:b.value})}}),E.mount(m),s&&(window[B]={container:m,templateRef:b,keyRef:U,app:E})}try{await f.nextTick(),await new Promise(ne=>setTimeout(ne,200));const b=m.querySelector("#design")||m;if(!b)throw new Error("未找到设计画布元素 #design");await XD(b);const U=Math.max(window.devicePixelRatio||1,2),N=Number(n)>0?Number(n):(a==null?void 0:a.scale)||U*2,T=Math.min(2.5,Math.max(1.5,N)),O=!!(a!=null&&a.transparent),I=await u(b,{scale:T,useCORS:!0,allowTaint:!0,backgroundColor:O?null:"#ffffff",imageTimeout:15e3,logging:!1,removeContainer:!1,windowWidth:h,windowHeight:y}),M=O?"image/png":"image/jpeg",V=typeof(a==null?void 0:a.quality)=="number"?a.quality:.85,Z=I.toDataURL(M,V);if(o==="png"){const ne=Z,te=ne.split(",")[1]||"";return i==="dataUrl"?ne:te}const F=(a==null?void 0:a.orientation)||(d>=g?"landscape":"portrait"),S=(a==null?void 0:a.compress)!==void 0?a.compress:!0,H=new gt({orientation:F,unit:"mm",format:[d,g],compress:S}),P=O?"PNG":"JPEG";H.addImage(Z,P,0,0,d,g);const Y=H.output("datauristring"),G=Y.split(",")[1]||"";return i==="dataUrl"?Y:G}finally{if(!(s&&window[B])){try{E&&E.unmount&&E.unmount()}catch{}m&&m.parentNode&&m.parentNode.removeChild(m)}}}dl.install=t=>{t.component(dl.name||"TemplateDesigner",dl)};const Ky=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{width:20,height:2.8,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"Title",label:"标题",default:"",layout:"full",desc:"用于固定文案的打印,不需要则不填。示例:如果填写“价格:”,则打印时内容为“价格:【字段对应值】”"},{prop:"FieldName",label:"字段名称",type:"select",multiple:!0,optionsKey:"fields",default:"",layout:"full"},{prop:"FieldConnector",label:"字段连接符",type:"text",default:"",layout:"full",desc:"当选择多个字段时,用于连接字段之间的分隔符,如:-、|、空格等,默认使用空格"},{prop:"Text",label:"测试数据(展示使用,无实际意义)",default:"测试文本",layout:"full"},{prop:"FontName",label:"字体名称",type:"select",desc:"注意:选择的字体需要计算机中安装有对应字体才有效",options:[{label:"黑体",value:"黑体",cssValue:"SimHei"},{label:"楷体",value:"楷体",cssValue:"KaiTi"},{label:"宋体",value:"宋体",cssValue:"SimSun"},{label:"隶书",value:"隶书",cssValue:"LiSu"},{label:"缅语Arial",value:"Arial",cssValue:"Arial"},{label:"缅语Segoe UI",value:"Segoe UI",cssValue:"Segoe UI"}],default:"黑体",layout:"half"},{prop:"FontSize",label:"字体大小",type:"number",min:1,max:100,default:8,layout:"half"},{prop:"FontColor",label:"字体颜色",type:"color",hide:!0,default:"#000000",layout:"half"},{prop:"Bold",label:"字体加粗",type:"select",options:[{label:"加粗",value:1},{label:"不加粗",value:0}],default:0,layout:"half"},{prop:"Italic",label:"是否斜体",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,layout:"half"},{prop:"Underline",label:"下划线",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,hide:!0},{prop:"Alignment",label:"对齐方式",type:"select",options:[{label:"居左",value:1},{label:"居中",value:2},{label:"居右",value:3}],default:2},{prop:"TextWrap",label:"文本换行",type:"select",options:[{label:"换行",value:1},{label:"不换行&省略",value:2},{label:"不换行&隐藏",value:3}],default:2,hide:!0},{prop:"HOrient",label:"水平锁定",type:"select",options:[{label:"无",value:0},{label:"左边距锁定",value:1},{label:"右边距锁定",value:2},{label:"水平居中",value:3}],hide:!0,default:0},{prop:"VOrient",label:"垂直锁定",type:"select",options:[{label:"无",value:0},{label:"上边距锁定",value:1},{label:"下边距锁定",value:2},{label:"垂直居中",value:3}],hide:!0,default:0},{prop:"PenWidth",label:"线宽",type:"number",min:0,hide:!0,default:0},{prop:"PenStyle",label:"线型",type:"select",hide:!0,options:[{label:"实线",value:0},{label:"破折线",value:1},{label:"点线",value:2},{label:"点划线",value:3},{label:"双点划线",value:4}],default:0},{prop:"Stretch",label:"缩放模式",type:"select",options:[{label:"扩展",value:1},{label:"缩放",value:2}],hide:!0,default:1},{prop:"PreviewOnly",label:"仅预览",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"ReadOnly",label:"只读",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},barcode:{width:20,height:6,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"注:<br/>1、条码宽度需要根据实际打印数据的长短来适当设置;如果打印数据较长,条码宽度较短,条码打印出来会识别困难或无法识别。<br/>2、如果标签尺寸较小,就需要控制打印数据的长度,确保在有限的宽度打印出来能够正常识别。",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"goods_sn",layout:"full"},{prop:"BarcodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"1234567890"},{prop:"CodeType",label:"条码类型",type:"select",options:[{label:"CODE128",value:"128Auto",compValue:"CODE128"},{label:"CODE39",value:"Code39",compValue:"CODE39"},{label:"EAN13",value:"EAN13",compValue:"EAN13"}],hide:!0,default:"128Auto"},{prop:"AlignJustify",label:"对齐方式",type:"select",options:[{label:"两端对齐",value:0},{label:"左",value:1},{label:"中",value:2},{label:"右",value:3}],hide:!0,default:0},{prop:"LineColor",label:"条形码颜色",type:"color",hide:!0,default:"#000000"},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},qrcode:{width:10,height:10,rotation:0,lockAspectRatio:!0,allowRotation:!1,desc:"",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"QRCodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"FB-1234567890"},{prop:"QRCodeVersion",label:"二维码版本",type:"number",min:1,max:40,hide:!0,default:7},{prop:"QRCodeErrorLevel",label:"纠错级别",type:"select",options:[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}],hide:!0,default:"H"},{prop:"QRCodeEncodeMode",label:"编码模式",type:"select",options:[{label:"数字",value:"N"},{label:"二进制或汉语",value:"B"},{label:"英文字母",value:"A"}],hide:!0,default:"B"},{prop:"QRCodeForeground",label:"前景色",type:"color",hide:!0,default:"#000000"},{prop:"QRCodeBackground",label:"背景景色",type:"color",hide:!0,default:"transparent"}]},image:{width:12,height:12,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"ImageSrc",label:"图片地址",type:"file",accept:"image/*",default:""},{prop:"ScaleMode",label:"图片缩放",type:"select",options:[{label:"原始尺寸",value:1},{label:"居中裁剪",value:2},{label:"填充",value:3}],default:1},{prop:"IsPrint",label:"是否打印",type:"select",options:[{label:"是",value:!0},{label:"否",value:!1}],default:!0},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},rectangle:{width:15,height:10,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.5",options:[{label:"默认",value:"0.5"},{label:"1px",value:"1"},{label:"2px",value:"2"},{label:"3px",value:"3"},{label:"4px",value:"4"},{label:"5px",value:"5"},{label:"6px",value:"6"},{label:"7px",value:"7"},{label:"8px",value:"8"},{label:"9px",value:"9"},{label:"10px",value:"10"}]},{prop:"LineStyle",type:"select",label:"样式",default:1,options:[{label:"实线",value:1},{label:"虚线",value:2}]},{prop:"BorderRadius",type:"number",label:"圆角",default:0,min:0,step:1,hide:!0},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},line:{width:15,height:.5,rotation:0,lockAspectRatio:!1,allowRotation:!1,x1:0,y1:0,x2:15,y2:0,desc:"",propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.5",options:[{label:"默认",value:"0.5"},{label:"1px",value:"1"},{label:"2px",value:"2"},{label:"3px",value:"3"},{label:"4px",value:"4"},{label:"5px",value:"5"},{label:"6px",value:"6"},{label:"7px",value:"7"},{label:"8px",value:"8"},{label:"9px",value:"9"},{label:"10px",value:"10"}]},{prop:"LineStyle",type:"select",label:"样式",default:1,options:[{label:"实线",value:1},{label:"虚线",value:2}]},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]}}},Symbol.toStringTag,{value:"Module"})),eP=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{x:0,y:0,width:20,height:2.8,rotation:0,allowRotation:!1,Title:"",FieldName:"",Text:"测试文本",FontName:"黑体",FontSize:8,FontColor:"#000000",Bold:0,Italic:0,Underline:0,Alignment:2,TextWrap:1,HOrient:0,VOrient:0,PenWidth:0,PenStyle:0,Stretch:1,PreviewOnly:0,ReadOnly:0,desc:"",propertyPanel:[{prop:"Title",label:"标题",default:"",layout:"full",desc:"设置文本组件的标题内容,用于显示在组件上"},{prop:"FieldName",label:"字段名称",type:"select",multiple:!0,optionsKey:"fields",default:"",layout:"full"},{prop:"FieldConnector",label:"字段连接符",type:"text",default:"",layout:"full",desc:"当选择多个字段时,用于连接字段之间的分隔符,如:-、|、空格等,默认使用空格"},{prop:"Text",label:"测试数据(展示使用,无实际意义)",default:"测试文本",layout:"full"},{prop:"FontName",label:"字体名称",type:"select",desc:"注意:选择的字体需要计算机中安装有对应字体才有效",options:[{label:"黑体",value:"黑体",cssValue:"SimHei"},{label:"楷体",value:"楷体",cssValue:"KaiTi"},{label:"宋体",value:"宋体",cssValue:"SimSun"},{label:"隶书",value:"隶书",cssValue:"LiSu"}],default:"黑体",layout:"half"},{prop:"FontSize",label:"字体大小",type:"number",min:1,max:100,default:8,layout:"half"},{prop:"FontColor",label:"字体颜色",type:"color",hide:!0,default:"#000000",layout:"half"},{prop:"Bold",label:"字体加粗",type:"select",options:[{label:"加粗",value:1},{label:"不加粗",value:0}],default:0,layout:"half"},{prop:"Italic",label:"是否斜体",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,layout:"half"},{prop:"Alignment",label:"对齐方式",type:"select",options:[{label:"居左",value:1},{label:"居中",value:2},{label:"居右",value:3}],default:2,layout:"half"},{prop:"TextWrap",label:"文本换行",type:"select",options:[{label:"换行",value:1},{label:"不换行",value:2}],default:2,hide:!0,layout:"half"},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},barcode:{x:0,y:0,width:20,height:6,rotation:0,allowRotation:!1,FieldName:"goodsSn",BarcodeValue:"1234567890",CodeType:"128Auto",AlignJustify:0,LineColor:"#000000",desc:"注:<br/>1、条码宽度需要根据实际打印数据的长短来适当设置;如果打印数据较长,条码宽度较短,条码打印出来会识别困难或无法识别。<br/>2、如果标签尺寸较小,就需要控制打印数据的长度,确保在有限的宽度打印出来能够正常识别。",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"goods_sn",layout:"full"},{prop:"BarcodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"1234567890"},{prop:"CodeType",label:"条码类型",type:"select",options:[{label:"CODE128",value:"128Auto",compValue:"CODE128"},{label:"CODE39",value:"Code39",compValue:"CODE39"},{label:"EAN13",value:"EAN13",compValue:"EAN13"}],hide:!0,default:"128Auto"},{prop:"AlignJustify",label:"对齐方式",type:"select",options:[{label:"两端对齐",value:0},{label:"左",value:1},{label:"中",value:2},{label:"右",value:3}],hide:!0,default:0},{prop:"LineColor",label:"条形码颜色",type:"color",hide:!0,default:"#000000"},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},qrcode:{x:0,y:0,width:10,height:10,rotation:0,allowRotation:!1,FieldName:"",QRCodeValue:"FB-GOLD",QRCodeVersion:7,QRCodeErrorLevel:"Q",QRCodeEncodeMode:"B",QRCodeForeground:"#000000",QRCodeBackground:"transparent",lockAspectRatio:!0,desc:"",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"QRCodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"FB-1234567890"},{prop:"QRCodeVersion",label:"二维码版本",type:"number",min:1,max:40,hide:!0,default:7},{prop:"QRCodeErrorLevel",label:"纠错级别",type:"select",options:[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}],hide:!0,default:"Q"},{prop:"QRCodeEncodeMode",label:"编码模式",type:"select",options:[{label:"数字",value:"N"},{label:"二进制或汉语",value:"B"},{label:"英文字母",value:"A"}],hide:!0,default:"B"},{prop:"QRCodeForeground",label:"前景色",type:"color",hide:!0,default:"#000000"},{prop:"QRCodeBackground",label:"背景景色",type:"color",hide:!0,default:"transparent"}]},image:{width:12,height:12,rotation:0,allowRotation:!1,lockAspectRatio:!1,desc:"",propertyPanel:[{prop:"ImageSrc",label:"图片地址",type:"file",accept:"image/*",default:""},{prop:"ScaleMode",label:"图片缩放",type:"select",options:[{label:"原始尺寸",value:1},{label:"居中裁剪",value:2},{label:"填充",value:3}],default:1},{prop:"IsPrint",label:"是否打印",type:"select",options:[{label:"是",value:!0},{label:"否",value:!1}],default:!1},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]}}},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 2.5.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.8/LICENSE */function La(t){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},La(t)}function Vp(t,e){return Vp=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Vp(t,e)}function tP(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tf(t,e,A){return tP()?tf=Reflect.construct:tf=function(n,a,i){var o=[null];o.push.apply(o,a);var s=Function.bind.apply(n,o),l=new s;return i&&Vp(l,i.prototype),l},tf.apply(null,arguments)}function Bn(t){return AP(t)||rP(t)||nP(t)||aP()}function AP(t){if(Array.isArray(t))return Mp(t)}function rP(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function nP(t,e){if(t){if(typeof t=="string")return Mp(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);if(A==="Object"&&t.constructor&&(A=t.constructor.name),A==="Map"||A==="Set")return Array.from(t);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Mp(t,e)}}function Mp(t,e){(e==null||e>t.length)&&(e=t.length);for(var A=0,r=new Array(e);A<e;A++)r[A]=t[A];return r}function aP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
301
+ `)}return""+A},e}();const XD=t=>{const e=(t==null?void 0:t.querySelectorAll("img"))||[],A=Array.from(e).map(r=>r.complete?Promise.resolve():new Promise(n=>{r.onload=r.onerror=n}));return Promise.all(A)},qD=(t,e)=>{const A=JSON.parse(JSON.stringify(t||{})),r=A.items||[],n=(a,i)=>{if(Array.isArray(a)){const s=typeof i=="string"?i:" ";return a.map(u=>e&&e[u]!=null?String(e[u]):"").filter(u=>u!=="").join(s)}const o=a;return o&&e&&e[o]!=null?String(e[o]):""};return r.forEach(a=>{const i=a.props||{},o=i.FieldName,s=i.FieldConnector;if(o)switch(a.type){case"text":{const l=n(o,s),u=i.Title||"";i.Text=u?`${u}${l}`:l;break}case"barcode":{i.BarcodeValue=n(o,s);break}case"qrcode":{i.QRCodeValue=n(o,s);break}}}),A.items=r,A.printWidth=A.print_width||A.printWidth||0,A.printHeight=A.print_height||A.printHeight||0,A};async function $D(t,e,A={}){const{page:r,scale:n,pdf:a,returnType:i="base64",format:o="pdf",cacheInstance:s=!0}=A,l=qD(t,e),{default:u}=await Promise.resolve().then(()=>ay),d=(r==null?void 0:r.widthMm)||l.printWidth||l.width||100,g=(r==null?void 0:r.heightMm)||l.printHeight||l.height||100,h=Math.max(1,Math.floor(co(d))),y=Math.max(1,Math.floor(co(g)));let m,E;const B="__td_renderer_singleton__";if(s&&window[B]){const b=window[B];m=b.container,b.templateRef.value=l,b.keyRef.value=(b.keyRef.value||0)+1,m.style.width=h+"px",m.style.height=y+"px"}else{m=document.createElement("div"),m.style.position="fixed",m.style.left="-10000px",m.style.top="0",m.style.width=h+"px",m.style.height=y+"px",m.style.overflow="hidden",m.style.opacity="1",m.style.pointerEvents="none",document.body.appendChild(m);const b=f.ref(l),U=f.ref(0);E=f.createApp({render(){return f.h(dl,{key:U.value,templateData:b.value})}}),E.mount(m),s&&(window[B]={container:m,templateRef:b,keyRef:U,app:E})}try{await f.nextTick(),await new Promise(ne=>setTimeout(ne,200));const b=m.querySelector("#design")||m;if(!b)throw new Error("未找到设计画布元素 #design");await XD(b);const U=Math.max(window.devicePixelRatio||1,2),N=Number(n)>0?Number(n):(a==null?void 0:a.scale)||U*2,T=Math.min(2.5,Math.max(1.5,N)),O=!!(a!=null&&a.transparent),I=await u(b,{scale:T,useCORS:!0,allowTaint:!0,backgroundColor:O?null:"#ffffff",imageTimeout:15e3,logging:!1,removeContainer:!1,windowWidth:h,windowHeight:y}),M=O?"image/png":"image/jpeg",V=typeof(a==null?void 0:a.quality)=="number"?a.quality:.85,Z=I.toDataURL(M,V);if(o==="png"){const ne=Z,te=ne.split(",")[1]||"";return i==="dataUrl"?ne:te}const F=(a==null?void 0:a.orientation)||(d>=g?"landscape":"portrait"),S=(a==null?void 0:a.compress)!==void 0?a.compress:!0,H=new gt({orientation:F,unit:"mm",format:[d,g],compress:S}),P=O?"PNG":"JPEG";H.addImage(Z,P,0,0,d,g);const Y=H.output("datauristring"),G=Y.split(",")[1]||"";return i==="dataUrl"?Y:G}finally{if(!(s&&window[B])){try{E&&E.unmount&&E.unmount()}catch{}m&&m.parentNode&&m.parentNode.removeChild(m)}}}dl.install=t=>{t.component(dl.name||"TemplateDesigner",dl)};const Ky=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{width:20,height:2.8,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"Title",label:"标题",default:"",layout:"full",desc:"用于固定文案的打印,不需要则不填。示例:如果填写“价格:”,则打印时内容为“价格:【字段对应值】”"},{prop:"FieldName",label:"字段名称",type:"select",multiple:!0,optionsKey:"fields",default:"",layout:"full"},{prop:"FieldConnector",label:"字段连接符",type:"text",default:"",layout:"full",desc:"当选择多个字段时,用于连接字段之间的分隔符,如:-、|、空格等,默认使用空格"},{prop:"Text",label:"测试数据(展示使用,无实际意义)",default:"测试文本",layout:"full"},{prop:"FontName",label:"字体名称",type:"select",desc:"注意:选择的字体需要计算机中安装有对应字体才有效",options:[{label:"黑体",value:"黑体",cssValue:"SimHei"},{label:"楷体",value:"楷体",cssValue:"KaiTi"},{label:"宋体",value:"宋体",cssValue:"SimSun"},{label:"隶书",value:"隶书",cssValue:"LiSu"},{label:"缅语Arial",value:"Arial",cssValue:"Arial"},{label:"缅语Segoe UI",value:"Segoe UI",cssValue:"Segoe UI"}],default:"黑体",layout:"half"},{prop:"FontSize",label:"字体大小",type:"number",min:1,max:100,default:8,layout:"half"},{prop:"FontColor",label:"字体颜色",type:"color",hide:!0,default:"#000000",layout:"half"},{prop:"Bold",label:"字体加粗",type:"select",options:[{label:"加粗",value:1},{label:"不加粗",value:0}],default:0,layout:"half"},{prop:"Italic",label:"是否斜体",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,layout:"half"},{prop:"Underline",label:"下划线",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,hide:!0},{prop:"Alignment",label:"对齐方式",type:"select",options:[{label:"居左",value:1},{label:"居中",value:2},{label:"居右",value:3}],default:2},{prop:"TextWrap",label:"文本换行",type:"select",options:[{label:"换行",value:1},{label:"不换行&省略",value:2},{label:"不换行&隐藏",value:3}],default:2,hide:!0},{prop:"HOrient",label:"水平锁定",type:"select",options:[{label:"无",value:0},{label:"左边距锁定",value:1},{label:"右边距锁定",value:2},{label:"水平居中",value:3}],hide:!0,default:0},{prop:"VOrient",label:"垂直锁定",type:"select",options:[{label:"无",value:0},{label:"上边距锁定",value:1},{label:"下边距锁定",value:2},{label:"垂直居中",value:3}],hide:!0,default:0},{prop:"PenWidth",label:"线宽",type:"number",min:0,hide:!0,default:0},{prop:"PenStyle",label:"线型",type:"select",hide:!0,options:[{label:"实线",value:0},{label:"破折线",value:1},{label:"点线",value:2},{label:"点划线",value:3},{label:"双点划线",value:4}],default:0},{prop:"Stretch",label:"缩放模式",type:"select",options:[{label:"扩展",value:1},{label:"缩放",value:2}],hide:!0,default:1},{prop:"PreviewOnly",label:"仅预览",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"ReadOnly",label:"只读",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},barcode:{width:20,height:6,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"注:<br/>1、条码宽度需要根据实际打印数据的长短来适当设置;如果打印数据较长,条码宽度较短,条码打印出来会识别困难或无法识别。<br/>2、如果标签尺寸较小,就需要控制打印数据的长度,确保在有限的宽度打印出来能够正常识别。",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"goods_sn",layout:"full"},{prop:"BarcodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"1234567890"},{prop:"CodeType",label:"条码类型",type:"select",options:[{label:"CODE128",value:"128Auto",compValue:"CODE128"},{label:"CODE39",value:"Code39",compValue:"CODE39"},{label:"EAN13",value:"EAN13",compValue:"EAN13"}],hide:!0,default:"128Auto"},{prop:"AlignJustify",label:"对齐方式",type:"select",options:[{label:"两端对齐",value:0},{label:"左",value:1},{label:"中",value:2},{label:"右",value:3}],hide:!0,default:0},{prop:"LineColor",label:"条形码颜色",type:"color",hide:!0,default:"#000000"},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},qrcode:{width:10,height:10,rotation:0,lockAspectRatio:!0,allowRotation:!1,desc:"",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"QRCodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"FB-1234567890"},{prop:"QRCodeVersion",label:"二维码版本",type:"number",min:1,max:40,hide:!0,default:7},{prop:"QRCodeErrorLevel",label:"纠错级别",type:"select",options:[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}],hide:!0,default:"H"},{prop:"QRCodeEncodeMode",label:"编码模式",type:"select",options:[{label:"数字",value:"N"},{label:"二进制或汉语",value:"B"},{label:"英文字母",value:"A"}],hide:!0,default:"B"},{prop:"QRCodeForeground",label:"前景色",type:"color",hide:!0,default:"#000000"},{prop:"QRCodeBackground",label:"背景景色",type:"color",hide:!0,default:"transparent"}]},image:{width:12,height:12,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"ImageSrc",label:"图片地址",type:"file",accept:"image/*",default:""},{prop:"ScaleMode",label:"图片缩放",type:"select",options:[{label:"原始尺寸",value:1},{label:"居中裁剪",value:2},{label:"填充",value:3}],default:1},{prop:"IsPrint",label:"是否打印",type:"select",options:[{label:"是",value:!0},{label:"否",value:!1}],default:!0},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},rectangle:{width:15,height:10,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.5",options:[{label:"默认",value:"0.5"},{label:"1px",value:"1"},{label:"2px",value:"2"},{label:"3px",value:"3"},{label:"4px",value:"4"},{label:"5px",value:"5"},{label:"6px",value:"6"},{label:"7px",value:"7"},{label:"8px",value:"8"},{label:"9px",value:"9"},{label:"10px",value:"10"}]},{prop:"LineStyle",type:"select",label:"样式",default:1,options:[{label:"实线",value:1},{label:"虚线",value:2}]},{prop:"BorderRadius",type:"number",label:"圆角",default:0,min:0,step:1,hide:!0},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half",hide:!0}]},line:{width:15,height:.5,rotation:0,lockAspectRatio:!1,allowRotation:!1,x1:0,y1:0,x2:15,y2:0,desc:"",propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.5",options:[{label:"默认",value:"0.5"},{label:"1px",value:"1"},{label:"2px",value:"2"},{label:"3px",value:"3"},{label:"4px",value:"4"},{label:"5px",value:"5"},{label:"6px",value:"6"},{label:"7px",value:"7"},{label:"8px",value:"8"},{label:"9px",value:"9"},{label:"10px",value:"10"}]},{prop:"LineStyle",type:"select",label:"样式",default:1,options:[{label:"实线",value:1},{label:"虚线",value:2}]},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]}}},Symbol.toStringTag,{value:"Module"})),eP=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{x:0,y:0,width:20,height:2.8,rotation:0,allowRotation:!1,Title:"",FieldName:"",Text:"测试文本",FontName:"黑体",FontSize:8,FontColor:"#000000",Bold:0,Italic:0,Underline:0,Alignment:2,TextWrap:1,HOrient:0,VOrient:0,PenWidth:0,PenStyle:0,Stretch:1,PreviewOnly:0,ReadOnly:0,desc:"",propertyPanel:[{prop:"Title",label:"标题",default:"",layout:"full",desc:"设置文本组件的标题内容,用于显示在组件上"},{prop:"FieldName",label:"字段名称",type:"select",multiple:!0,optionsKey:"fields",default:"",layout:"full"},{prop:"FieldConnector",label:"字段连接符",type:"text",default:"",layout:"full",desc:"当选择多个字段时,用于连接字段之间的分隔符,如:-、|、空格等,默认使用空格"},{prop:"Text",label:"测试数据(展示使用,无实际意义)",default:"测试文本",layout:"full"},{prop:"FontName",label:"字体名称",type:"select",desc:"注意:选择的字体需要计算机中安装有对应字体才有效",options:[{label:"黑体",value:"黑体",cssValue:"SimHei"},{label:"楷体",value:"楷体",cssValue:"KaiTi"},{label:"宋体",value:"宋体",cssValue:"SimSun"},{label:"隶书",value:"隶书",cssValue:"LiSu"}],default:"黑体",layout:"half"},{prop:"FontSize",label:"字体大小",type:"number",min:1,max:100,default:8,layout:"half"},{prop:"FontColor",label:"字体颜色",type:"color",hide:!0,default:"#000000",layout:"half"},{prop:"Bold",label:"字体加粗",type:"select",options:[{label:"加粗",value:1},{label:"不加粗",value:0}],default:0,layout:"half"},{prop:"Italic",label:"是否斜体",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,layout:"half"},{prop:"Alignment",label:"对齐方式",type:"select",options:[{label:"居左",value:1},{label:"居中",value:2},{label:"居右",value:3}],default:2,layout:"half"},{prop:"TextWrap",label:"文本换行",type:"select",options:[{label:"换行",value:1},{label:"不换行",value:2}],default:2,hide:!0,layout:"half"},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},barcode:{x:0,y:0,width:20,height:6,rotation:0,allowRotation:!1,FieldName:"goodsSn",BarcodeValue:"1234567890",CodeType:"128Auto",AlignJustify:0,LineColor:"#000000",desc:"注:<br/>1、条码宽度需要根据实际打印数据的长短来适当设置;如果打印数据较长,条码宽度较短,条码打印出来会识别困难或无法识别。<br/>2、如果标签尺寸较小,就需要控制打印数据的长度,确保在有限的宽度打印出来能够正常识别。",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"goods_sn",layout:"full"},{prop:"BarcodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"1234567890"},{prop:"CodeType",label:"条码类型",type:"select",options:[{label:"CODE128",value:"128Auto",compValue:"CODE128"},{label:"CODE39",value:"Code39",compValue:"CODE39"},{label:"EAN13",value:"EAN13",compValue:"EAN13"}],hide:!0,default:"128Auto"},{prop:"AlignJustify",label:"对齐方式",type:"select",options:[{label:"两端对齐",value:0},{label:"左",value:1},{label:"中",value:2},{label:"右",value:3}],hide:!0,default:0},{prop:"LineColor",label:"条形码颜色",type:"color",hide:!0,default:"#000000"},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]},qrcode:{x:0,y:0,width:10,height:10,rotation:0,allowRotation:!1,FieldName:"",QRCodeValue:"FB-GOLD",QRCodeVersion:7,QRCodeErrorLevel:"Q",QRCodeEncodeMode:"B",QRCodeForeground:"#000000",QRCodeBackground:"transparent",lockAspectRatio:!0,desc:"",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"QRCodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"FB-1234567890"},{prop:"QRCodeVersion",label:"二维码版本",type:"number",min:1,max:40,hide:!0,default:7},{prop:"QRCodeErrorLevel",label:"纠错级别",type:"select",options:[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}],hide:!0,default:"Q"},{prop:"QRCodeEncodeMode",label:"编码模式",type:"select",options:[{label:"数字",value:"N"},{label:"二进制或汉语",value:"B"},{label:"英文字母",value:"A"}],hide:!0,default:"B"},{prop:"QRCodeForeground",label:"前景色",type:"color",hide:!0,default:"#000000"},{prop:"QRCodeBackground",label:"背景景色",type:"color",hide:!0,default:"transparent"}]},image:{width:12,height:12,rotation:0,allowRotation:!1,lockAspectRatio:!1,desc:"",propertyPanel:[{prop:"ImageSrc",label:"图片地址",type:"file",accept:"image/*",default:""},{prop:"ScaleMode",label:"图片缩放",type:"select",options:[{label:"原始尺寸",value:1},{label:"居中裁剪",value:2},{label:"填充",value:3}],default:1},{prop:"IsPrint",label:"是否打印",type:"select",options:[{label:"是",value:!0},{label:"否",value:!1}],default:!1},{prop:"rotation",label:"旋转角度",type:"select",options:ba,default:0,layout:"half"}]}}},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 2.5.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.8/LICENSE */function La(t){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},La(t)}function Vp(t,e){return Vp=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Vp(t,e)}function tP(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tf(t,e,A){return tP()?tf=Reflect.construct:tf=function(n,a,i){var o=[null];o.push.apply(o,a);var s=Function.bind.apply(n,o),l=new s;return i&&Vp(l,i.prototype),l},tf.apply(null,arguments)}function Bn(t){return AP(t)||rP(t)||nP(t)||aP()}function AP(t){if(Array.isArray(t))return Mp(t)}function rP(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function nP(t,e){if(t){if(typeof t=="string")return Mp(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);if(A==="Object"&&t.constructor&&(A=t.constructor.name),A==="Map"||A==="Set")return Array.from(t);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Mp(t,e)}}function Mp(t,e){(e==null||e>t.length)&&(e=t.length);for(var A=0,r=new Array(e);A<e;A++)r[A]=t[A];return r}function aP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
302
302
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var iP=Object.hasOwnProperty,Gy=Object.setPrototypeOf,oP=Object.isFrozen,sP=Object.getPrototypeOf,lP=Object.getOwnPropertyDescriptor,Br=Object.freeze,en=Object.seal,cP=Object.create,zy=typeof Reflect<"u"&&Reflect,Af=zy.apply,Op=zy.construct;Af||(Af=function(e,A,r){return e.apply(A,r)}),Br||(Br=function(e){return e}),en||(en=function(e){return e}),Op||(Op=function(e,A){return tf(e,Bn(A))});var uP=tn(Array.prototype.forEach),Yy=tn(Array.prototype.pop),Bl=tn(Array.prototype.push),rf=tn(String.prototype.toLowerCase),Lp=tn(String.prototype.toString),Xy=tn(String.prototype.match),wn=tn(String.prototype.replace),fP=tn(String.prototype.indexOf),hP=tn(String.prototype.trim),er=tn(RegExp.prototype.test),kp=dP(TypeError);function tn(t){return function(e){for(var A=arguments.length,r=new Array(A>1?A-1:0),n=1;n<A;n++)r[n-1]=arguments[n];return Af(t,e,r)}}function dP(t){return function(){for(var e=arguments.length,A=new Array(e),r=0;r<e;r++)A[r]=arguments[r];return Op(t,A)}}function Tt(t,e,A){var r;A=(r=A)!==null&&r!==void 0?r:rf,Gy&&Gy(t,null);for(var n=e.length;n--;){var a=e[n];if(typeof a=="string"){var i=A(a);i!==a&&(oP(e)||(e[n]=i),a=i)}t[a]=!0}return t}function Ei(t){var e=cP(null),A;for(A in t)Af(iP,t,[A])===!0&&(e[A]=t[A]);return e}function nf(t,e){for(;t!==null;){var A=lP(t,e);if(A){if(A.get)return tn(A.get);if(typeof A.value=="function")return tn(A.value)}t=sP(t)}function r(n){return console.warn("fallback value for",n),null}return r}var qy=Br(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Hp=Br(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Dp=Br(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pP=Br(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Pp=Br(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),gP=Br(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$y=Br(["#text"]),e5=Br(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Wp=Br(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),t5=Br(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),af=Br(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mP=en(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vP=en(/<%[\w\W]*|[\w\W]*%>/gm),BP=en(/\${[\w\W]*}/gm),wP=en(/^data-[\-\w.\u00B7-\uFFFF]+$/),yP=en(/^aria-[\-\w]+$/),bP=en(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),EP=en(/^(?:\w+script|data):/i),CP=en(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),UP=en(/^html$/i),FP=en(/^[a-z][.\w]*(-[.\w]+)+$/i),NP=function(){return typeof window>"u"?null:window},QP=function(e,A){if(La(e)!=="object"||typeof e.createPolicy!="function")return null;var r=null,n="data-tt-policy-suffix";A.currentScript&&A.currentScript.hasAttribute(n)&&(r=A.currentScript.getAttribute(n));var a="dompurify"+(r?"#"+r:"");try{return e.createPolicy(a,{createHTML:function(o){return o},createScriptURL:function(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function A5(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NP(),e=function(oe){return A5(oe)};if(e.version="2.5.8",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var A=t.document,r=t.document,n=t.DocumentFragment,a=t.HTMLTemplateElement,i=t.Node,o=t.Element,s=t.NodeFilter,l=t.NamedNodeMap,u=l===void 0?t.NamedNodeMap||t.MozNamedAttrMap:l,d=t.HTMLFormElement,g=t.DOMParser,h=t.trustedTypes,y=o.prototype,m=nf(y,"cloneNode"),E=nf(y,"nextSibling"),B=nf(y,"childNodes"),b=nf(y,"parentNode");if(typeof a=="function"){var U=r.createElement("template");U.content&&U.content.ownerDocument&&(r=U.content.ownerDocument)}var N=QP(h,A),T=N?N.createHTML(""):"",O=r,I=O.implementation,M=O.createNodeIterator,V=O.createDocumentFragment,Z=O.getElementsByTagName,F=A.importNode,S={};try{S=Ei(r).documentMode?r.documentMode:{}}catch{}var H={};e.isSupported=typeof b=="function"&&I&&I.createHTMLDocument!==void 0&&S!==9;var P=mP,Y=vP,G=BP,ne=wP,te=yP,Ae=EP,$=CP,ce=FP,Q=bP,_=null,j=Tt({},[].concat(Bn(qy),Bn(Hp),Bn(Dp),Bn(Pp),Bn($y))),z=null,re=Tt({},[].concat(Bn(e5),Bn(Wp),Bn(t5),Bn(af))),ie=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),he=null,me=null,Ve=!0,Te=!0,De=!1,Oe=!0,Ke=!1,ve=!0,q=!1,ut=!1,Xe=!1,Qe=!1,Me=!1,Le=!1,He=!0,Ze=!1,tt="user-content-",ot=!0,dt=!1,wt={},Ut=null,st=Tt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Bt=null,ke=Tt({},["audio","video","img","source","image","track"]),Wt=null,Qt=Tt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xA="http://www.w3.org/1998/Math/MathML",St="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml",hA=xt,Rt=!1,WA=null,_t=Tt({},[xA,St,xt],Lp),oA,Gt=["application/xhtml+xml","text/html"],ee="text/html",K,we=null,ze=r.createElement("form"),At=function(oe){return oe instanceof RegExp||oe instanceof Function},_e=function(oe){we&&we===oe||((!oe||La(oe)!=="object")&&(oe={}),oe=Ei(oe),oA=Gt.indexOf(oe.PARSER_MEDIA_TYPE)===-1?oA=ee:oA=oe.PARSER_MEDIA_TYPE,K=oA==="application/xhtml+xml"?Lp:rf,_="ALLOWED_TAGS"in oe?Tt({},oe.ALLOWED_TAGS,K):j,z="ALLOWED_ATTR"in oe?Tt({},oe.ALLOWED_ATTR,K):re,WA="ALLOWED_NAMESPACES"in oe?Tt({},oe.ALLOWED_NAMESPACES,Lp):_t,Wt="ADD_URI_SAFE_ATTR"in oe?Tt(Ei(Qt),oe.ADD_URI_SAFE_ATTR,K):Qt,Bt="ADD_DATA_URI_TAGS"in oe?Tt(Ei(ke),oe.ADD_DATA_URI_TAGS,K):ke,Ut="FORBID_CONTENTS"in oe?Tt({},oe.FORBID_CONTENTS,K):st,he="FORBID_TAGS"in oe?Tt({},oe.FORBID_TAGS,K):{},me="FORBID_ATTR"in oe?Tt({},oe.FORBID_ATTR,K):{},wt="USE_PROFILES"in oe?oe.USE_PROFILES:!1,Ve=oe.ALLOW_ARIA_ATTR!==!1,Te=oe.ALLOW_DATA_ATTR!==!1,De=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=oe.SAFE_FOR_TEMPLATES||!1,ve=oe.SAFE_FOR_XML!==!1,q=oe.WHOLE_DOCUMENT||!1,Qe=oe.RETURN_DOM||!1,Me=oe.RETURN_DOM_FRAGMENT||!1,Le=oe.RETURN_TRUSTED_TYPE||!1,Xe=oe.FORCE_BODY||!1,He=oe.SANITIZE_DOM!==!1,Ze=oe.SANITIZE_NAMED_PROPS||!1,ot=oe.KEEP_CONTENT!==!1,dt=oe.IN_PLACE||!1,Q=oe.ALLOWED_URI_REGEXP||Q,hA=oe.NAMESPACE||xt,ie=oe.CUSTOM_ELEMENT_HANDLING||{},oe.CUSTOM_ELEMENT_HANDLING&&At(oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ie.tagNameCheck=oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&At(oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ie.attributeNameCheck=oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&typeof oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ie.allowCustomizedBuiltInElements=oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke&&(Te=!1),Me&&(Qe=!0),wt&&(_=Tt({},Bn($y)),z=[],wt.html===!0&&(Tt(_,qy),Tt(z,e5)),wt.svg===!0&&(Tt(_,Hp),Tt(z,Wp),Tt(z,af)),wt.svgFilters===!0&&(Tt(_,Dp),Tt(z,Wp),Tt(z,af)),wt.mathMl===!0&&(Tt(_,Pp),Tt(z,t5),Tt(z,af))),oe.ADD_TAGS&&(_===j&&(_=Ei(_)),Tt(_,oe.ADD_TAGS,K)),oe.ADD_ATTR&&(z===re&&(z=Ei(z)),Tt(z,oe.ADD_ATTR,K)),oe.ADD_URI_SAFE_ATTR&&Tt(Wt,oe.ADD_URI_SAFE_ATTR,K),oe.FORBID_CONTENTS&&(Ut===st&&(Ut=Ei(Ut)),Tt(Ut,oe.FORBID_CONTENTS,K)),ot&&(_["#text"]=!0),q&&Tt(_,["html","head","body"]),_.table&&(Tt(_,["tbody"]),delete he.tbody),Br&&Br(oe),we=oe)},at=Tt({},["mi","mo","mn","ms","mtext"]),Ne=Tt({},["annotation-xml"]),it=Tt({},["title","style","font","a","script"]),je=Tt({},Hp);Tt(je,Dp),Tt(je,pP);var ye=Tt({},Pp);Tt(ye,gP);var mt=function(oe){var xe=b(oe);(!xe||!xe.tagName)&&(xe={namespaceURI:hA,tagName:"template"});var We=rf(oe.tagName),It=rf(xe.tagName);return WA[oe.namespaceURI]?oe.namespaceURI===St?xe.namespaceURI===xt?We==="svg":xe.namespaceURI===xA?We==="svg"&&(It==="annotation-xml"||at[It]):!!je[We]:oe.namespaceURI===xA?xe.namespaceURI===xt?We==="math":xe.namespaceURI===St?We==="math"&&Ne[It]:!!ye[We]:oe.namespaceURI===xt?xe.namespaceURI===St&&!Ne[It]||xe.namespaceURI===xA&&!at[It]?!1:!ye[We]&&(it[We]||!je[We]):!!(oA==="application/xhtml+xml"&&WA[oe.namespaceURI]):!1},Pe=function(oe){Bl(e.removed,{element:oe});try{oe.parentNode.removeChild(oe)}catch{try{oe.outerHTML=T}catch{oe.remove()}}},ft=function(oe,xe){try{Bl(e.removed,{attribute:xe.getAttributeNode(oe),from:xe})}catch{Bl(e.removed,{attribute:null,from:xe})}if(xe.removeAttribute(oe),oe==="is"&&!z[oe])if(Qe||Me)try{Pe(xe)}catch{}else try{xe.setAttribute(oe,"")}catch{}},qt=function(oe){var xe,We;if(Xe)oe="<remove></remove>"+oe;else{var It=Xy(oe,/^[\r\n\t ]+/);We=It&&It[0]}oA==="application/xhtml+xml"&&hA===xt&&(oe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+oe+"</body></html>");var bA=N?N.createHTML(oe):oe;if(hA===xt)try{xe=new g().parseFromString(bA,oA)}catch{}if(!xe||!xe.documentElement){xe=I.createDocument(hA,"template",null);try{xe.documentElement.innerHTML=Rt?T:bA}catch{}}var lA=xe.body||xe.documentElement;return oe&&We&&lA.insertBefore(r.createTextNode(We),lA.childNodes[0]||null),hA===xt?Z.call(xe,q?"html":"body")[0]:q?xe.documentElement:lA},Vt=function(oe){return M.call(oe.ownerDocument||oe,oe,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null,!1)},vt=function(oe){return oe instanceof d&&(typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||!(oe.attributes instanceof u)||typeof oe.removeAttribute!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function")},Mt=function(oe){return La(i)==="object"?oe instanceof i:oe&&La(oe)==="object"&&typeof oe.nodeType=="number"&&typeof oe.nodeName=="string"},Ht=function(oe,xe,We){H[oe]&&uP(H[oe],function(It){It.call(e,xe,We,we)})},_A=function(oe){var xe;if(Ht("beforeSanitizeElements",oe,null),vt(oe)||er(/[\u0080-\uFFFF]/,oe.nodeName))return Pe(oe),!0;var We=K(oe.nodeName);if(Ht("uponSanitizeElement",oe,{tagName:We,allowedTags:_}),oe.hasChildNodes()&&!Mt(oe.firstElementChild)&&(!Mt(oe.content)||!Mt(oe.content.firstElementChild))&&er(/<[/\w]/g,oe.innerHTML)&&er(/<[/\w]/g,oe.textContent)||We==="select"&&er(/<template/i,oe.innerHTML)||oe.nodeType===7||ve&&oe.nodeType===8&&er(/<[/\w]/g,oe.data))return Pe(oe),!0;if(!_[We]||he[We]){if(!he[We]&&sA(We)&&(ie.tagNameCheck instanceof RegExp&&er(ie.tagNameCheck,We)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(We)))return!1;if(ot&&!Ut[We]){var It=b(oe)||oe.parentNode,bA=B(oe)||oe.childNodes;if(bA&&It)for(var lA=bA.length,pA=lA-1;pA>=0;--pA){var xr=m(bA[pA],!0);xr.__removalCount=(oe.__removalCount||0)+1,It.insertBefore(xr,E(oe))}}return Pe(oe),!0}return oe instanceof o&&!mt(oe)||(We==="noscript"||We==="noembed"||We==="noframes")&&er(/<\/no(script|embed|frames)/i,oe.innerHTML)?(Pe(oe),!0):(Ke&&oe.nodeType===3&&(xe=oe.textContent,xe=wn(xe,P," "),xe=wn(xe,Y," "),xe=wn(xe,G," "),oe.textContent!==xe&&(Bl(e.removed,{element:oe.cloneNode()}),oe.textContent=xe)),Ht("afterSanitizeElements",oe,null),!1)},Zt=function(oe,xe,We){if(He&&(xe==="id"||xe==="name")&&(We in r||We in ze))return!1;if(!(Te&&!me[xe]&&er(ne,xe))){if(!(Ve&&er(te,xe))){if(!z[xe]||me[xe]){if(!(sA(oe)&&(ie.tagNameCheck instanceof RegExp&&er(ie.tagNameCheck,oe)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(oe))&&(ie.attributeNameCheck instanceof RegExp&&er(ie.attributeNameCheck,xe)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(xe))||xe==="is"&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&er(ie.tagNameCheck,We)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(We))))return!1}else if(!Wt[xe]){if(!er(Q,wn(We,$,""))){if(!((xe==="src"||xe==="xlink:href"||xe==="href")&&oe!=="script"&&fP(We,"data:")===0&&Bt[oe])){if(!(De&&!er(Ae,wn(We,$,"")))){if(We)return!1}}}}}}return!0},sA=function(oe){return oe!=="annotation-xml"&&Xy(oe,ce)},dA=function(oe){var xe,We,It,bA;Ht("beforeSanitizeAttributes",oe,null);var lA=oe.attributes;if(!(!lA||vt(oe))){var pA={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z};for(bA=lA.length;bA--;){xe=lA[bA];var xr=xe,cA=xr.name,Li=xr.namespaceURI;if(We=cA==="value"?xe.value:hP(xe.value),It=K(cA),pA.attrName=It,pA.attrValue=We,pA.keepAttr=!0,pA.forceKeepAttr=void 0,Ht("uponSanitizeAttribute",oe,pA),We=pA.attrValue,!pA.forceKeepAttr&&(ft(cA,oe),!!pA.keepAttr)){if(!Oe&&er(/\/>/i,We)){ft(cA,oe);continue}Ke&&(We=wn(We,P," "),We=wn(We,Y," "),We=wn(We,G," "));var ki=K(oe.nodeName);if(Zt(ki,It,We)){if(Ze&&(It==="id"||It==="name")&&(ft(cA,oe),We=tt+We),ve&&er(/((--!?|])>)|<\/(style|title)/i,We)){ft(cA,oe);continue}if(N&&La(h)==="object"&&typeof h.getAttributeType=="function"&&!Li)switch(h.getAttributeType(ki,It)){case"TrustedHTML":{We=N.createHTML(We);break}case"TrustedScriptURL":{We=N.createScriptURL(We);break}}try{Li?oe.setAttributeNS(Li,cA,We):oe.setAttribute(cA,We),vt(oe)?Pe(oe):Yy(e.removed)}catch{}}}}Ht("afterSanitizeAttributes",oe,null)}},_r=function rt(oe){var xe,We=Vt(oe);for(Ht("beforeSanitizeShadowDOM",oe,null);xe=We.nextNode();)Ht("uponSanitizeShadowNode",xe,null),_A(xe),dA(xe),xe.content instanceof n&&rt(xe.content);Ht("afterSanitizeShadowDOM",oe,null)};return e.sanitize=function(rt){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xe,We,It,bA,lA;if(Rt=!rt,Rt&&(rt="<!-->"),typeof rt!="string"&&!Mt(rt))if(typeof rt.toString=="function"){if(rt=rt.toString(),typeof rt!="string")throw kp("dirty is not a string, aborting")}else throw kp("toString is not a function");if(!e.isSupported){if(La(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof rt=="string")return t.toStaticHTML(rt);if(Mt(rt))return t.toStaticHTML(rt.outerHTML)}return rt}if(ut||_e(oe),e.removed=[],typeof rt=="string"&&(dt=!1),dt){if(rt.nodeName){var pA=K(rt.nodeName);if(!_[pA]||he[pA])throw kp("root node is forbidden and cannot be sanitized in-place")}}else if(rt instanceof i)xe=qt("<!---->"),We=xe.ownerDocument.importNode(rt,!0),We.nodeType===1&&We.nodeName==="BODY"||We.nodeName==="HTML"?xe=We:xe.appendChild(We);else{if(!Qe&&!Ke&&!q&&rt.indexOf("<")===-1)return N&&Le?N.createHTML(rt):rt;if(xe=qt(rt),!xe)return Qe?null:Le?T:""}xe&&Xe&&Pe(xe.firstChild);for(var xr=Vt(dt?rt:xe);It=xr.nextNode();)It.nodeType===3&&It===bA||(_A(It),dA(It),It.content instanceof n&&_r(It.content),bA=It);if(bA=null,dt)return rt;if(Qe){if(Me)for(lA=V.call(xe.ownerDocument);xe.firstChild;)lA.appendChild(xe.firstChild);else lA=xe;return(z.shadowroot||z.shadowrootmod)&&(lA=F.call(A,lA,!0)),lA}var cA=q?xe.outerHTML:xe.innerHTML;return q&&_["!doctype"]&&xe.ownerDocument&&xe.ownerDocument.doctype&&xe.ownerDocument.doctype.name&&er(UP,xe.ownerDocument.doctype.name)&&(cA="<!DOCTYPE "+xe.ownerDocument.doctype.name+`>
303
303
  `+cA),Ke&&(cA=wn(cA,P," "),cA=wn(cA,Y," "),cA=wn(cA,G," ")),N&&Le?N.createHTML(cA):cA},e.setConfig=function(rt){_e(rt),ut=!0},e.clearConfig=function(){we=null,ut=!1},e.isValidAttribute=function(rt,oe,xe){we||_e({});var We=K(rt),It=K(oe);return Zt(We,It,xe)},e.addHook=function(rt,oe){typeof oe=="function"&&(H[rt]=H[rt]||[],Bl(H[rt],oe))},e.removeHook=function(rt){if(H[rt])return Yy(H[rt])},e.removeHooks=function(rt){H[rt]&&(H[rt]=[])},e.removeAllHooks=function(){H={}},e}var SP=A5();const TP=Object.freeze(Object.defineProperty({__proto__:null,default:SP},Symbol.toStringTag,{value:"Module"}));var wl=function(t){return t&&t.Math===Math&&t},fA=wl(typeof globalThis=="object"&&globalThis)||wl(typeof window=="object"&&window)||wl(typeof self=="object"&&self)||wl(typeof qi=="object"&&qi)||wl(typeof qi=="object"&&qi)||function(){return this}()||Function("return this")(),yl={},BA=function(t){try{return!!t()}catch{return!0}},xP=BA,yn=!xP(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),RP=BA,of=!RP(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),IP=of,sf=Function.prototype.call,tr=IP?sf.bind(sf):function(){return sf.apply(sf,arguments)},r5={},n5={}.propertyIsEnumerable,a5=Object.getOwnPropertyDescriptor,VP=a5&&!n5.call({1:2},1);r5.f=VP?function(e){var A=a5(this,e);return!!A&&A.enumerable}:n5;var _p=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},i5=of,o5=Function.prototype,Zp=o5.call,MP=i5&&o5.bind.bind(Zp,Zp),wA=i5?MP:function(t){return function(){return Zp.apply(t,arguments)}},s5=wA,OP=s5({}.toString),LP=s5("".slice),Ci=function(t){return LP(OP(t),8,-1)},kP=wA,HP=BA,DP=Ci,jp=Object,PP=kP("".split),l5=HP(function(){return!jp("z").propertyIsEnumerable(0)})?function(t){return DP(t)==="String"?PP(t,""):jp(t)}:jp,lf=function(t){return t==null},WP=lf,_P=TypeError,bn=function(t){if(WP(t))throw new _P("Can't call method on "+t);return t},ZP=l5,jP=bn,bl=function(t){return ZP(jP(t))},Jp=typeof document=="object"&&document.all,TA=typeof Jp>"u"&&Jp!==void 0?function(t){return typeof t=="function"||t===Jp}:function(t){return typeof t=="function"},JP=TA,Sr=function(t){return typeof t=="object"?t!==null:JP(t)},Kp=fA,KP=TA,GP=function(t){return KP(t)?t:void 0},Ui=function(t,e){return arguments.length<2?GP(Kp[t]):Kp[t]&&Kp[t][e]},zP=wA,cf=zP({}.isPrototypeOf),YP=fA,c5=YP.navigator,u5=c5&&c5.userAgent,El=u5?String(u5):"",f5=fA,Gp=El,h5=f5.process,d5=f5.Deno,p5=h5&&h5.versions||d5&&d5.version,g5=p5&&p5.v8,En,uf;g5&&(En=g5.split("."),uf=En[0]>0&&En[0]<4?1:+(En[0]+En[1])),!uf&&Gp&&(En=Gp.match(/Edge\/(\d+)/),(!En||En[1]>=74)&&(En=Gp.match(/Chrome\/(\d+)/),En&&(uf=+En[1])));var zp=uf,m5=zp,XP=BA,qP=fA,$P=qP.String,v5=!!Object.getOwnPropertySymbols&&!XP(function(){var t=Symbol("symbol detection");return!$P(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&m5&&m5<41}),eW=v5,B5=eW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",tW=Ui,AW=TA,rW=cf,nW=B5,aW=Object,w5=nW?function(t){return typeof t=="symbol"}:function(t){var e=tW("Symbol");return AW(e)&&rW(e.prototype,aW(t))},iW=String,ff=function(t){try{return iW(t)}catch{return"Object"}},oW=TA,sW=ff,lW=TypeError,$n=function(t){if(oW(t))return t;throw new lW(sW(t)+" is not a function")},cW=$n,uW=lf,Po=function(t,e){var A=t[e];return uW(A)?void 0:cW(A)},Yp=tr,Xp=TA,qp=Sr,fW=TypeError,hW=function(t,e){var A,r;if(e==="string"&&Xp(A=t.toString)&&!qp(r=Yp(A,t))||Xp(A=t.valueOf)&&!qp(r=Yp(A,t))||e!=="string"&&Xp(A=t.toString)&&!qp(r=Yp(A,t)))return r;throw new fW("Can't convert object to primitive value")},y5={exports:{}},b5=fA,dW=Object.defineProperty,$p=function(t,e){try{dW(b5,t,{value:e,configurable:!0,writable:!0})}catch{b5[t]=e}return e},pW=fA,gW=$p,E5="__core-js_shared__",C5=y5.exports=pW[E5]||gW(E5,{});(C5.versions||(C5.versions=[])).push({version:"3.45.1",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"});var e1=y5.exports,U5=e1,t1=function(t,e){return U5[t]||(U5[t]=e||{})},mW=bn,vW=Object,hf=function(t){return vW(mW(t))},BW=wA,wW=hf,yW=BW({}.hasOwnProperty),Cn=Object.hasOwn||function(e,A){return yW(wW(e),A)},bW=wA,EW=0,CW=Math.random(),UW=bW(1.1.toString),F5=function(t){return"Symbol("+(t===void 0?"":t)+")_"+UW(++EW+CW,36)},FW=fA,NW=t1,N5=Cn,QW=F5,SW=v5,TW=B5,Wo=FW.Symbol,A1=NW("wks"),xW=TW?Wo.for||Wo:Wo&&Wo.withoutSetter||QW,GA=function(t){return N5(A1,t)||(A1[t]=SW&&N5(Wo,t)?Wo[t]:xW("Symbol."+t)),A1[t]},RW=tr,Q5=Sr,S5=w5,IW=Po,VW=hW,MW=GA,OW=TypeError,LW=MW("toPrimitive"),kW=function(t,e){if(!Q5(t)||S5(t))return t;var A=IW(t,LW),r;if(A){if(e===void 0&&(e="default"),r=RW(A,t,e),!Q5(r)||S5(r))return r;throw new OW("Can't convert object to primitive value")}return e===void 0&&(e="number"),VW(t,e)},HW=kW,DW=w5,T5=function(t){var e=HW(t,"string");return DW(e)?e:e+""},PW=fA,x5=Sr,r1=PW.document,WW=x5(r1)&&x5(r1.createElement),df=function(t){return WW?r1.createElement(t):{}},_W=yn,ZW=BA,jW=df,R5=!_W&&!ZW(function(){return Object.defineProperty(jW("div"),"a",{get:function(){return 7}}).a!==7}),JW=yn,KW=tr,GW=r5,zW=_p,YW=bl,XW=T5,qW=Cn,$W=R5,I5=Object.getOwnPropertyDescriptor;yl.f=JW?I5:function(e,A){if(e=YW(e),A=XW(A),$W)try{return I5(e,A)}catch{}if(qW(e,A))return zW(!KW(GW.f,e,A),e[A])};var ea={},e_=yn,t_=BA,V5=e_&&t_(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),A_=Sr,r_=String,n_=TypeError,wr=function(t){if(A_(t))return t;throw new n_(r_(t)+" is not an object")},a_=yn,i_=R5,o_=V5,pf=wr,M5=T5,s_=TypeError,n1=Object.defineProperty,l_=Object.getOwnPropertyDescriptor,a1="enumerable",i1="configurable",o1="writable";ea.f=a_?o_?function(e,A,r){if(pf(e),A=M5(A),pf(r),typeof e=="function"&&A==="prototype"&&"value"in r&&o1 in r&&!r[o1]){var n=l_(e,A);n&&n[o1]&&(e[A]=r.value,r={configurable:i1 in r?r[i1]:n[i1],enumerable:a1 in r?r[a1]:n[a1],writable:!1})}return n1(e,A,r)}:n1:function(e,A,r){if(pf(e),A=M5(A),pf(r),i_)try{return n1(e,A,r)}catch{}if("get"in r||"set"in r)throw new s_("Accessors not supported");return"value"in r&&(e[A]=r.value),e};var c_=yn,u_=ea,f_=_p,Cl=c_?function(t,e,A){return u_.f(t,e,f_(1,A))}:function(t,e,A){return t[e]=A,t},O5={exports:{}},s1=yn,h_=Cn,L5=Function.prototype,d_=s1&&Object.getOwnPropertyDescriptor,l1=h_(L5,"name"),p_=l1&&(function(){}).name==="something",g_=l1&&(!s1||s1&&d_(L5,"name").configurable),gf={EXISTS:l1,PROPER:p_,CONFIGURABLE:g_},m_=wA,v_=TA,c1=e1,B_=m_(Function.toString);v_(c1.inspectSource)||(c1.inspectSource=function(t){return B_(t)});var u1=c1.inspectSource,w_=fA,y_=TA,k5=w_.WeakMap,b_=y_(k5)&&/native code/.test(String(k5)),E_=t1,C_=F5,H5=E_("keys"),f1=function(t){return H5[t]||(H5[t]=C_(t))},h1={},U_=b_,D5=fA,F_=Sr,N_=Cl,d1=Cn,p1=e1,Q_=f1,S_=h1,P5="Object already initialized",g1=D5.TypeError,T_=D5.WeakMap,mf,Ul,vf,x_=function(t){return vf(t)?Ul(t):mf(t,{})},R_=function(t){return function(e){var A;if(!F_(e)||(A=Ul(e)).type!==t)throw new g1("Incompatible receiver, "+t+" required");return A}};if(U_||p1.state){var Pn=p1.state||(p1.state=new T_);Pn.get=Pn.get,Pn.has=Pn.has,Pn.set=Pn.set,mf=function(t,e){if(Pn.has(t))throw new g1(P5);return e.facade=t,Pn.set(t,e),e},Ul=function(t){return Pn.get(t)||{}},vf=function(t){return Pn.has(t)}}else{var _o=Q_("state");S_[_o]=!0,mf=function(t,e){if(d1(t,_o))throw new g1(P5);return e.facade=t,N_(t,_o,e),e},Ul=function(t){return d1(t,_o)?t[_o]:{}},vf=function(t){return d1(t,_o)}}var Bf={set:mf,get:Ul,has:vf,enforce:x_,getterFor:R_},m1=wA,I_=BA,V_=TA,wf=Cn,v1=yn,M_=gf.CONFIGURABLE,O_=u1,W5=Bf,L_=W5.enforce,k_=W5.get,_5=String,yf=Object.defineProperty,H_=m1("".slice),D_=m1("".replace),P_=m1([].join),W_=v1&&!I_(function(){return yf(function(){},"length",{value:8}).length!==8}),__=String(String).split("String"),Z_=O5.exports=function(t,e,A){H_(_5(e),0,7)==="Symbol("&&(e="["+D_(_5(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),A&&A.getter&&(e="get "+e),A&&A.setter&&(e="set "+e),(!wf(t,"name")||M_&&t.name!==e)&&(v1?yf(t,"name",{value:e,configurable:!0}):t.name=e),W_&&A&&wf(A,"arity")&&t.length!==A.arity&&yf(t,"length",{value:A.arity});try{A&&wf(A,"constructor")&&A.constructor?v1&&yf(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var r=L_(t);return wf(r,"source")||(r.source=P_(__,typeof e=="string"?e:"")),t};Function.prototype.toString=Z_(function(){return V_(this)&&k_(this).source||O_(this)},"toString");var Z5=O5.exports,j_=TA,J_=ea,K_=Z5,G_=$p,Fi=function(t,e,A,r){r||(r={});var n=r.enumerable,a=r.name!==void 0?r.name:e;if(j_(A)&&K_(A,a,r),r.global)n?t[e]=A:G_(e,A);else{try{r.unsafe?t[e]&&(n=!0):delete t[e]}catch{}n?t[e]=A:J_.f(t,e,{value:A,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},j5={},z_=Math.ceil,Y_=Math.floor,X_=Math.trunc||function(e){var A=+e;return(A>0?Y_:z_)(A)},q_=X_,bf=function(t){var e=+t;return e!==e||e===0?0:q_(e)},$_=bf,e7=Math.max,t7=Math.min,A7=function(t,e){var A=$_(t);return A<0?e7(A+e,0):t7(A,e)},r7=bf,n7=Math.min,Zo=function(t){var e=r7(t);return e>0?n7(e,9007199254740991):0},a7=Zo,B1=function(t){return a7(t.length)},i7=bl,o7=A7,s7=B1,J5=function(t){return function(e,A,r){var n=i7(e),a=s7(n);if(a===0)return!t&&-1;var i=o7(r,a),o;if(t&&A!==A){for(;a>i;)if(o=n[i++],o!==o)return!0}else for(;a>i;i++)if((t||i in n)&&n[i]===A)return t||i||0;return!t&&-1}},K5={includes:J5(!0),indexOf:J5(!1)},l7=wA,w1=Cn,c7=bl,u7=K5.indexOf,f7=h1,G5=l7([].push),z5=function(t,e){var A=c7(t),r=0,n=[],a;for(a in A)!w1(f7,a)&&w1(A,a)&&G5(n,a);for(;e.length>r;)w1(A,a=e[r++])&&(~u7(n,a)||G5(n,a));return n},y1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],h7=z5,d7=y1,p7=d7.concat("length","prototype");j5.f=Object.getOwnPropertyNames||function(e){return h7(e,p7)};var Y5={};Y5.f=Object.getOwnPropertySymbols;var g7=Ui,m7=wA,v7=j5,B7=Y5,w7=wr,y7=m7([].concat),b7=g7("Reflect","ownKeys")||function(e){var A=v7.f(w7(e)),r=B7.f;return r?y7(A,r(e)):A},X5=Cn,E7=b7,C7=yl,U7=ea,F7=function(t,e,A){for(var r=E7(e),n=U7.f,a=C7.f,i=0;i<r.length;i++){var o=r[i];!X5(t,o)&&!(A&&X5(A,o))&&n(t,o,a(e,o))}},N7=BA,Q7=TA,S7=/#|\.prototype\./,Fl=function(t,e){var A=x7[T7(t)];return A===I7?!0:A===R7?!1:Q7(e)?N7(e):!!e},T7=Fl.normalize=function(t){return String(t).replace(S7,".").toLowerCase()},x7=Fl.data={},R7=Fl.NATIVE="N",I7=Fl.POLYFILL="P",q5=Fl,Ef=fA,V7=yl.f,M7=Cl,O7=Fi,L7=$p,k7=F7,H7=q5,yr=function(t,e){var A=t.target,r=t.global,n=t.stat,a,i,o,s,l,u;if(r?i=Ef:n?i=Ef[A]||L7(A,{}):i=Ef[A]&&Ef[A].prototype,i)for(o in e){if(l=e[o],t.dontCallGetSet?(u=V7(i,o),s=u&&u.value):s=i[o],a=H7(r?o:A+(n?".":"#")+o,t.forced),!a&&s!==void 0){if(typeof l==typeof s)continue;k7(l,s)}(t.sham||s&&s.sham)&&M7(l,"sham",!0),O7(i,o,l,t)}},Nl=fA,D7=El,P7=Ci,Cf=function(t){return D7.slice(0,t.length)===t},$5=function(){return Cf("Bun/")?"BUN":Cf("Cloudflare-Workers")?"CLOUDFLARE":Cf("Deno/")?"DENO":Cf("Node.js/")?"NODE":Nl.Bun&&typeof Bun.version=="string"?"BUN":Nl.Deno&&typeof Deno.version=="object"?"DENO":P7(Nl.process)==="process"?"NODE":Nl.window&&Nl.document?"BROWSER":"REST"}(),W7=$5,Uf=W7==="NODE",_7=fA,Z7=_7,j7=wA,J7=$n,K7=function(t,e,A){try{return j7(J7(Object.getOwnPropertyDescriptor(t,e)[A]))}catch{}},G7=Sr,z7=function(t){return G7(t)||t===null},Y7=z7,X7=String,q7=TypeError,$7=function(t){if(Y7(t))return t;throw new q7("Can't set "+X7(t)+" as a prototype")},eZ=K7,tZ=Sr,AZ=bn,rZ=$7,eb=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},A;try{A=eZ(Object.prototype,"__proto__","set"),A(e,[]),t=e instanceof Array}catch{}return function(n,a){return AZ(n),rZ(a),tZ(n)&&(t?A(n,a):n.__proto__=a),n}}():void 0),nZ=ea.f,aZ=Cn,iZ=GA,tb=iZ("toStringTag"),Ff=function(t,e,A){t&&!A&&(t=t.prototype),t&&!aZ(t,tb)&&nZ(t,tb,{configurable:!0,value:e})},Ab=Z5,oZ=ea,sZ=function(t,e,A){return A.get&&Ab(A.get,e,{getter:!0}),A.set&&Ab(A.set,e,{setter:!0}),oZ.f(t,e,A)},lZ=Ui,cZ=sZ,uZ=GA,fZ=yn,rb=uZ("species"),hZ=function(t){var e=lZ(t);fZ&&e&&!e[rb]&&cZ(e,rb,{configurable:!0,get:function(){return this}})},dZ=cf,pZ=TypeError,gZ=function(t,e){if(dZ(e,t))return t;throw new pZ("Incorrect invocation")},mZ=GA,vZ=mZ("toStringTag"),nb={};nb[vZ]="z";var BZ=String(nb)==="[object z]",wZ=BZ,yZ=TA,Nf=Ci,bZ=GA,EZ=bZ("toStringTag"),CZ=Object,UZ=Nf(function(){return arguments}())==="Arguments",FZ=function(t,e){try{return t[e]}catch{}},b1=wZ?Nf:function(t){var e,A,r;return t===void 0?"Undefined":t===null?"Null":typeof(A=FZ(e=CZ(t),EZ))=="string"?A:UZ?Nf(e):(r=Nf(e))==="Object"&&yZ(e.callee)?"Arguments":r},NZ=wA,QZ=BA,ab=TA,SZ=b1,TZ=Ui,xZ=u1,ib=function(){},ob=TZ("Reflect","construct"),E1=/^\s*(?:class|function)\b/,RZ=NZ(E1.exec),IZ=!E1.test(ib),Ql=function(e){if(!ab(e))return!1;try{return ob(ib,[],e),!0}catch{return!1}},sb=function(e){if(!ab(e))return!1;switch(SZ(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return IZ||!!RZ(E1,xZ(e))}catch{return!0}};sb.sham=!0;var VZ=!ob||QZ(function(){var t;return Ql(Ql.call)||!Ql(Object)||!Ql(function(){t=!0})||t})?sb:Ql,MZ=VZ,OZ=ff,LZ=TypeError,kZ=function(t){if(MZ(t))return t;throw new LZ(OZ(t)+" is not a constructor")},lb=wr,HZ=kZ,DZ=lf,PZ=GA,WZ=PZ("species"),cb=function(t,e){var A=lb(t).constructor,r;return A===void 0||DZ(r=lb(A)[WZ])?e:HZ(r)},_Z=of,ub=Function.prototype,fb=ub.apply,hb=ub.call,db=typeof Reflect=="object"&&Reflect.apply||(_Z?hb.bind(fb):function(){return hb.apply(fb,arguments)}),ZZ=Ci,jZ=wA,Qf=function(t){if(ZZ(t)==="Function")return jZ(t)},pb=Qf,JZ=$n,KZ=of,GZ=pb(pb.bind),C1=function(t,e){return JZ(t),e===void 0?t:KZ?GZ(t,e):function(){return t.apply(e,arguments)}},zZ=Ui,gb=zZ("document","documentElement"),YZ=wA,XZ=YZ([].slice),qZ=TypeError,$Z=function(t,e){if(t<e)throw new qZ("Not enough arguments");return t},e9=El,mb=/(?:ipad|iphone|ipod).*applewebkit/i.test(e9),Wr=fA,t9=db,A9=C1,vb=TA,r9=Cn,Bb=BA,wb=gb,n9=XZ,yb=df,a9=$Z,i9=mb,o9=Uf,U1=Wr.setImmediate,F1=Wr.clearImmediate,s9=Wr.process,N1=Wr.Dispatch,l9=Wr.Function,bb=Wr.MessageChannel,c9=Wr.String,Q1=0,Sl={},Eb="onreadystatechange",Tl,Ni,S1,T1;Bb(function(){Tl=Wr.location});var x1=function(t){if(r9(Sl,t)){var e=Sl[t];delete Sl[t],e()}},R1=function(t){return function(){x1(t)}},Cb=function(t){x1(t.data)},Ub=function(t){Wr.postMessage(c9(t),Tl.protocol+"//"+Tl.host)};(!U1||!F1)&&(U1=function(e){a9(arguments.length,1);var A=vb(e)?e:l9(e),r=n9(arguments,1);return Sl[++Q1]=function(){t9(A,void 0,r)},Ni(Q1),Q1},F1=function(e){delete Sl[e]},o9?Ni=function(t){s9.nextTick(R1(t))}:N1&&N1.now?Ni=function(t){N1.now(R1(t))}:bb&&!i9?(S1=new bb,T1=S1.port2,S1.port1.onmessage=Cb,Ni=A9(T1.postMessage,T1)):Wr.addEventListener&&vb(Wr.postMessage)&&!Wr.importScripts&&Tl&&Tl.protocol!=="file:"&&!Bb(Ub)?(Ni=Ub,Wr.addEventListener("message",Cb,!1)):Eb in yb("script")?Ni=function(t){wb.appendChild(yb("script"))[Eb]=function(){wb.removeChild(this),x1(t)}}:Ni=function(t){setTimeout(R1(t),0)});var Fb={set:U1,clear:F1},Nb=fA,u9=yn,f9=Object.getOwnPropertyDescriptor,h9=function(t){if(!u9)return Nb[t];var e=f9(Nb,t);return e&&e.value},Qb=function(){this.head=null,this.tail=null};Qb.prototype={add:function(t){var e={item:t,next:null},A=this.tail;A?A.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var Sb=Qb,d9=El,p9=/ipad|iphone|ipod/i.test(d9)&&typeof Pebble<"u",g9=El,m9=/web0s(?!.*chrome)/i.test(g9),jo=fA,v9=h9,Tb=C1,I1=Fb.set,B9=Sb,w9=mb,y9=p9,b9=m9,V1=Uf,xb=jo.MutationObserver||jo.WebKitMutationObserver,Rb=jo.document,Ib=jo.process,Sf=jo.Promise,M1=v9("queueMicrotask"),Jo,O1,L1,Tf,Vb;if(!M1){var xf=new B9,Rf=function(){var t,e;for(V1&&(t=Ib.domain)&&t.exit();e=xf.get();)try{e()}catch(A){throw xf.head&&Jo(),A}t&&t.enter()};!w9&&!V1&&!b9&&xb&&Rb?(O1=!0,L1=Rb.createTextNode(""),new xb(Rf).observe(L1,{characterData:!0}),Jo=function(){L1.data=O1=!O1}):!y9&&Sf&&Sf.resolve?(Tf=Sf.resolve(void 0),Tf.constructor=Sf,Vb=Tb(Tf.then,Tf),Jo=function(){Vb(Rf)}):V1?Jo=function(){Ib.nextTick(Rf)}:(I1=Tb(I1,jo),Jo=function(){I1(Rf)}),M1=function(t){xf.head||Jo(),xf.add(t)}}var E9=M1,C9=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch{}},k1=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},U9=fA,If=U9.Promise,F9=fA,xl=If,N9=TA,Q9=q5,S9=u1,T9=GA,Mb=$5,H1=zp;xl&&xl.prototype;var x9=T9("species"),D1=!1,Ob=N9(F9.PromiseRejectionEvent),R9=Q9("Promise",function(){var t=S9(xl),e=t!==String(xl);if(!e&&H1===66)return!0;if(!H1||H1<51||!/native code/.test(t)){var A=new xl(function(a){a(1)}),r=function(a){a(function(){},function(){})},n=A.constructor={};if(n[x9]=r,D1=A.then(function(){})instanceof r,!D1)return!0}return!e&&(Mb==="BROWSER"||Mb==="DENO")&&!Ob}),Rl={CONSTRUCTOR:R9,REJECTION_EVENT:Ob,SUBCLASSING:D1},Ko={},Lb=$n,I9=TypeError,V9=function(t){var e,A;this.promise=new t(function(r,n){if(e!==void 0||A!==void 0)throw new I9("Bad Promise constructor");e=r,A=n}),this.resolve=Lb(e),this.reject=Lb(A)};Ko.f=function(t){return new V9(t)};var M9=yr,Vf=Uf,ka=fA,O9=Z7,Go=tr,kb=Fi,Hb=eb,L9=Ff,k9=hZ,H9=$n,Mf=TA,D9=Sr,P9=gZ,W9=cb,Db=Fb.set,P1=E9,_9=C9,Z9=k1,j9=Sb,Pb=Bf,Of=If,W1=Rl,Wb=Ko,Lf="Promise",_b=W1.CONSTRUCTOR,J9=W1.REJECTION_EVENT,K9=W1.SUBCLASSING,_1=Pb.getterFor(Lf),G9=Pb.set,zo=Of&&Of.prototype,Qi=Of,kf=zo,Zb=ka.TypeError,Z1=ka.document,j1=ka.process,J1=Wb.f,z9=J1,Y9=!!(Z1&&Z1.createEvent&&ka.dispatchEvent),jb="unhandledrejection",X9="rejectionhandled",Jb=0,Kb=1,q9=2,K1=1,Gb=2,Hf,zb,Yb,Xb,qb=function(t){var e;return D9(t)&&Mf(e=t.then)?e:!1},$b=function(t,e){var A=e.value,r=e.state===Kb,n=r?t.ok:t.fail,a=t.resolve,i=t.reject,o=t.domain,s,l,u;try{n?(r||(e.rejection===Gb&&ej(e),e.rejection=K1),n===!0?s=A:(o&&o.enter(),s=n(A),o&&(o.exit(),u=!0)),s===t.promise?i(new Zb("Promise-chain cycle")):(l=qb(s))?Go(l,s,a,i):a(s)):i(A)}catch(d){o&&!u&&o.exit(),i(d)}},eE=function(t,e){t.notified||(t.notified=!0,P1(function(){for(var A=t.reactions,r;r=A.get();)$b(r,t);t.notified=!1,e&&!t.rejection&&$9(t)}))},tE=function(t,e,A){var r,n;Y9?(r=Z1.createEvent("Event"),r.promise=e,r.reason=A,r.initEvent(t,!1,!0),ka.dispatchEvent(r)):r={promise:e,reason:A},!J9&&(n=ka["on"+t])?n(r):t===jb&&_9("Unhandled promise rejection",A)},$9=function(t){Go(Db,ka,function(){var e=t.facade,A=t.value,r=AE(t),n;if(r&&(n=Z9(function(){Vf?j1.emit("unhandledRejection",A,e):tE(jb,e,A)}),t.rejection=Vf||AE(t)?Gb:K1,n.error))throw n.value})},AE=function(t){return t.rejection!==K1&&!t.parent},ej=function(t){Go(Db,ka,function(){var e=t.facade;Vf?j1.emit("rejectionHandled",e):tE(X9,e,t.value)})},Yo=function(t,e,A){return function(r){t(e,r,A)}},Xo=function(t,e,A){t.done||(t.done=!0,A&&(t=A),t.value=e,t.state=q9,eE(t,!0))},G1=function(t,e,A){if(!t.done){t.done=!0,A&&(t=A);try{if(t.facade===e)throw new Zb("Promise can't be resolved itself");var r=qb(e);r?P1(function(){var n={done:!1};try{Go(r,e,Yo(G1,n,t),Yo(Xo,n,t))}catch(a){Xo(n,a,t)}}):(t.value=e,t.state=Kb,eE(t,!1))}catch(n){Xo({done:!1},n,t)}}};if(_b&&(Qi=function(e){P9(this,kf),H9(e),Go(Hf,this);var A=_1(this);try{e(Yo(G1,A),Yo(Xo,A))}catch(r){Xo(A,r)}},kf=Qi.prototype,Hf=function(e){G9(this,{type:Lf,done:!1,notified:!1,parent:!1,reactions:new j9,rejection:!1,state:Jb,value:null})},Hf.prototype=kb(kf,"then",function(e,A){var r=_1(this),n=J1(W9(this,Qi));return r.parent=!0,n.ok=Mf(e)?e:!0,n.fail=Mf(A)&&A,n.domain=Vf?j1.domain:void 0,r.state===Jb?r.reactions.add(n):P1(function(){$b(n,r)}),n.promise}),zb=function(){var t=new Hf,e=_1(t);this.promise=t,this.resolve=Yo(G1,e),this.reject=Yo(Xo,e)},Wb.f=J1=function(t){return t===Qi||t===Yb?new zb(t):z9(t)},Mf(Of)&&zo!==Object.prototype)){Xb=zo.then,K9||kb(zo,"then",function(e,A){var r=this;return new Qi(function(n,a){Go(Xb,r,n,a)}).then(e,A)},{unsafe:!0});try{delete zo.constructor}catch{}Hb&&Hb(zo,kf)}M9({global:!0,constructor:!0,wrap:!0,forced:_b},{Promise:Qi}),Yb=O9.Promise,L9(Qi,Lf,!1),k9(Lf);var Il={},tj=GA,Aj=Il,rj=tj("iterator"),nj=Array.prototype,aj=function(t){return t!==void 0&&(Aj.Array===t||nj[rj]===t)},ij=b1,rE=Po,oj=lf,sj=Il,lj=GA,cj=lj("iterator"),nE=function(t){if(!oj(t))return rE(t,cj)||rE(t,"@@iterator")||sj[ij(t)]},uj=tr,fj=$n,hj=wr,dj=ff,pj=nE,gj=TypeError,mj=function(t,e){var A=arguments.length<2?pj(t):e;if(fj(A))return hj(uj(A,t));throw new gj(dj(t)+" is not iterable")},vj=tr,aE=wr,Bj=Po,wj=function(t,e,A){var r,n;aE(t);try{if(r=Bj(t,"return"),!r){if(e==="throw")throw A;return A}r=vj(r,t)}catch(a){n=!0,r=a}if(e==="throw")throw A;if(n)throw r;return aE(r),A},yj=C1,bj=tr,Ej=wr,Cj=ff,Uj=aj,Fj=B1,iE=cf,Nj=mj,Qj=nE,oE=wj,Sj=TypeError,Df=function(t,e){this.stopped=t,this.result=e},sE=Df.prototype,lE=function(t,e,A){var r=A&&A.that,n=!!(A&&A.AS_ENTRIES),a=!!(A&&A.IS_RECORD),i=!!(A&&A.IS_ITERATOR),o=!!(A&&A.INTERRUPTED),s=yj(e,r),l,u,d,g,h,y,m,E=function(b){return l&&oE(l,"normal"),new Df(!0,b)},B=function(b){return n?(Ej(b),o?s(b[0],b[1],E):s(b[0],b[1])):o?s(b,E):s(b)};if(a)l=t.iterator;else if(i)l=t;else{if(u=Qj(t),!u)throw new Sj(Cj(t)+" is not iterable");if(Uj(u)){for(d=0,g=Fj(t);g>d;d++)if(h=B(t[d]),h&&iE(sE,h))return h;return new Df(!1)}l=Nj(t,u)}for(y=a?t.next:l.next;!(m=bj(y,l)).done;){try{h=B(m.value)}catch(b){oE(l,"throw",b)}if(typeof h=="object"&&h&&iE(sE,h))return h}return new Df(!1)},Tj=GA,cE=Tj("iterator"),uE=!1;try{var xj=0,fE={next:function(){return{done:!!xj++}},return:function(){uE=!0}};fE[cE]=function(){return this},Array.from(fE,function(){throw 2})}catch{}var Rj=function(t,e){try{if(!e&&!uE)return!1}catch{return!1}var A=!1;try{var r={};r[cE]=function(){return{next:function(){return{done:A=!0}}}},t(r)}catch{}return A},Ij=If,Vj=Rj,Mj=Rl.CONSTRUCTOR,hE=Mj||!Vj(function(t){Ij.all(t).then(void 0,function(){})}),Oj=yr,Lj=tr,kj=$n,Hj=Ko,Dj=k1,Pj=lE,Wj=hE;Oj({target:"Promise",stat:!0,forced:Wj},{all:function(e){var A=this,r=Hj.f(A),n=r.resolve,a=r.reject,i=Dj(function(){var o=kj(A.resolve),s=[],l=0,u=1;Pj(e,function(d){var g=l++,h=!1;u++,Lj(o,A,d).then(function(y){h||(h=!0,s[g]=y,--u||n(s))},a)}),--u||n(s)});return i.error&&a(i.value),r.promise}});var _j=yr,Zj=Rl.CONSTRUCTOR,z1=If,jj=Ui,Jj=TA,Kj=Fi,dE=z1&&z1.prototype;if(_j({target:"Promise",proto:!0,forced:Zj,real:!0},{catch:function(t){return this.then(void 0,t)}}),Jj(z1)){var pE=jj("Promise").prototype.catch;dE.catch!==pE&&Kj(dE,"catch",pE,{unsafe:!0})}var Gj=yr,zj=tr,Yj=$n,Xj=Ko,qj=k1,$j=lE,eJ=hE;Gj({target:"Promise",stat:!0,forced:eJ},{race:function(e){var A=this,r=Xj.f(A),n=r.reject,a=qj(function(){var i=Yj(A.resolve);$j(e,function(o){zj(i,A,o).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}});var tJ=yr,AJ=Ko,rJ=Rl.CONSTRUCTOR;tJ({target:"Promise",stat:!0,forced:rJ},{reject:function(e){var A=AJ.f(this),r=A.reject;return r(e),A.promise}});var nJ=wr,aJ=Sr,iJ=Ko,oJ=function(t,e){if(nJ(t),aJ(e)&&e.constructor===t)return e;var A=iJ.f(t),r=A.resolve;return r(e),A.promise},sJ=yr,lJ=Ui,cJ=Rl.CONSTRUCTOR,uJ=oJ;lJ("Promise"),sJ({target:"Promise",stat:!0,forced:cJ},{resolve:function(e){return uJ(this,e)}});function gE(t,e,A,r,n,a,i){try{var o=t[a](i),s=o.value}catch(l){return void A(l)}o.done?e(s):Promise.resolve(s).then(r,n)}function ta(t){return function(){var e=this,A=arguments;return new Promise(function(r,n){var a=t.apply(e,A);function i(s){gE(a,r,n,i,o,"next",s)}function o(s){gE(a,r,n,i,o,"throw",s)}i(void 0)})}}var fJ=b1,hJ=String,Wn=function(t){if(fJ(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return hJ(t)},dJ=wr,mE=function(){var t=dJ(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Y1=BA,pJ=fA,X1=pJ.RegExp,q1=Y1(function(){var t=X1("a","y");return t.lastIndex=2,t.exec("abcd")!==null}),gJ=q1||Y1(function(){return!X1("a","y").sticky}),mJ=q1||Y1(function(){var t=X1("^r","gy");return t.lastIndex=2,t.exec("str")!==null}),vE={BROKEN_CARET:mJ,MISSED_STICKY:gJ,UNSUPPORTED_Y:q1},BE={},vJ=z5,BJ=y1,wJ=Object.keys||function(e){return vJ(e,BJ)},yJ=yn,bJ=V5,EJ=ea,CJ=wr,UJ=bl,FJ=wJ;BE.f=yJ&&!bJ?Object.defineProperties:function(e,A){CJ(e);for(var r=UJ(A),n=FJ(A),a=n.length,i=0,o;a>i;)EJ.f(e,o=n[i++],r[o]);return e};var NJ=wr,QJ=BE,wE=y1,SJ=h1,TJ=gb,xJ=df,RJ=f1,yE=">",bE="<",$1="prototype",eg="script",EE=RJ("IE_PROTO"),tg=function(){},CE=function(t){return bE+eg+yE+t+bE+"/"+eg+yE},UE=function(t){t.write(CE("")),t.close();var e=t.parentWindow.Object;return t=null,e},IJ=function(){var t=xJ("iframe"),e="java"+eg+":",A;return t.style.display="none",TJ.appendChild(t),t.src=String(e),A=t.contentWindow.document,A.open(),A.write(CE("document.F=Object")),A.close(),A.F},Pf,Wf=function(){try{Pf=new ActiveXObject("htmlfile")}catch{}Wf=typeof document<"u"?document.domain&&Pf?UE(Pf):IJ():UE(Pf);for(var t=wE.length;t--;)delete Wf[$1][wE[t]];return Wf()};SJ[EE]=!0;var Ag=Object.create||function(e,A){var r;return e!==null?(tg[$1]=NJ(e),r=new tg,tg[$1]=null,r[EE]=e):r=Wf(),A===void 0?r:QJ.f(r,A)},VJ=BA,MJ=fA,OJ=MJ.RegExp,LJ=VJ(function(){var t=OJ(".","s");return!(t.dotAll&&t.test(`
304
304
  `)&&t.flags==="s")}),kJ=BA,HJ=fA,DJ=HJ.RegExp,PJ=kJ(function(){var t=DJ("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),qo=tr,_f=wA,WJ=Wn,_J=mE,ZJ=vE,jJ=t1,JJ=Ag,KJ=Bf.get,GJ=LJ,zJ=PJ,YJ=jJ("native-string-replace",String.prototype.replace),Zf=RegExp.prototype.exec,rg=Zf,XJ=_f("".charAt),qJ=_f("".indexOf),$J=_f("".replace),ng=_f("".slice),ag=function(){var t=/a/,e=/b*/g;return qo(Zf,t,"a"),qo(Zf,e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),FE=ZJ.BROKEN_CARET,ig=/()??/.exec("")[1]!==void 0,eK=ag||ig||FE||GJ||zJ;eK&&(rg=function(e){var A=this,r=KJ(A),n=WJ(e),a=r.raw,i,o,s,l,u,d,g;if(a)return a.lastIndex=A.lastIndex,i=qo(rg,a,n),A.lastIndex=a.lastIndex,i;var h=r.groups,y=FE&&A.sticky,m=qo(_J,A),E=A.source,B=0,b=n;if(y&&(m=$J(m,"y",""),qJ(m,"g")===-1&&(m+="g"),b=ng(n,A.lastIndex),A.lastIndex>0&&(!A.multiline||A.multiline&&XJ(n,A.lastIndex-1)!==`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "template-designer",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "description": "模板拖拽设计器组件库",
5
5
  "main": "dist/template-designer.umd.js",
6
6
  "module": "dist/template-designer.esm.js",