template-designer 0.6.4 → 0.6.5
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.
- package/dist/{index-f89b553f.mjs → index-356ac50f.mjs} +6 -6
- package/dist/{index.es-ac8471fb.mjs → index.es-a20ed9f1.mjs} +1 -1
- package/dist/{lodop-36c7898b.mjs → lodop-d990e845.mjs} +1 -1
- package/dist/{rfid-c68cc65f.mjs → rfid-b0c598a7.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/template-designer.es.js +1 -1
- package/dist/template-designer.umd.js +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
7112
|
+
return (await gm(/* @__PURE__ */ Object.assign({ "./props/lodop.js": () => import("./lodop-d990e845.mjs"), "./props/rfid.js": () => import("./rfid-b0c598a7.mjs") }), `./props/${e}.js`)).default;
|
|
7113
7113
|
} catch {
|
|
7114
|
-
return console.warn(`配置文件 ./props/${e}.js 不存在,使用默认配置`), (await import("./lodop-
|
|
7114
|
+
return console.warn(`配置文件 ./props/${e}.js 不存在,使用默认配置`), (await import("./lodop-d990e845.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
|
|
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-
|
|
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-
|
|
22744
|
+
return (de.canvg ? Promise.resolve(de.canvg) : import("./index.es-a20ed9f1.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;
|
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}
|
|
@@ -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
|