template-designer 0.1.1 → 0.1.2
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/style.css +1 -1
- package/dist/template-designer.es.js +69 -69
- package/dist/template-designer.umd.js +1 -1
- package/package.json +1 -1
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-3290b48a]{display:flex;align-items:center;justify-content:flex-start}.property-item[data-v-3290b48a]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-3290b48a]{font-size:14px;color:#666}.property-item input[data-v-3290b48a],.property-item select[data-v-3290b48a]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-3290b48a]{height:32px;padding:2px}.property-item input[type=checkbox][data-v-3290b48a]{width:16px;height:16px}.file-input-container[data-v-3290b48a]{position:relative;display:flex;align-items:center;gap:8px}.file-input-container input[data-v-3290b48a]{height:100%!important}.file-url-input[data-v-3290b48a]{flex:1;padding:4px 8px;border:1px solid #ddd;border-radius:4px;font-size:12px}.file-input[data-v-3290b48a]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.file-select-btn[data-v-3290b48a]{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}.file-select-btn[data-v-3290b48a]:hover{background:var(--el-color-primary-dark-2);border-color:var(--el-color-primary-dark-2)}.file-info[data-v-3290b48a]{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-3290b48a]{font-size:12px;color:#666;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clear-btn[data-v-3290b48a]{background:none;border:none;color:#ff4d4f;cursor:pointer;font-size:12px;padding:2px 6px;border-radius:2px}.clear-btn[data-v-3290b48a]:hover{background-color:#fff2f0}.property-panel[data-v-aed193a8]{padding:16px;background:#fff;border-left:1px solid #e4e7ed;overflow-y:auto;height:100%}.property-group[data-v-aed193a8]{margin-bottom:16px}.property-group-title[data-v-aed193a8]{font-size:14px;font-weight:500;color:#303133;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #ebeef5}.property-item[data-v-aed193a8]{margin-bottom:12px}.text-property-panel .property-item[data-v-aed193a8]:last-child,.barcode-property-panel .property-item[data-v-aed193a8]:last-child,.qrcode-property-panel .property-item[data-v-aed193a8]:last-child,.image-property-panel .property-item[data-v-aed193a8]:last-child,.rectangle-property-panel .property-item[data-v-aed193a8]:last-child,.horline-property-panel .property-item[data-v-aed193a8]:last-child,.verline-property-panel .property-item[data-v-aed193a8]:last-child{margin-bottom:0}.barcode-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.qrcode-component[data-v-6e726fcb]{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-6e726fcb]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:0;margin:0}.qrcode-image[data-v-6e726fcb]{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-6e726fcb]{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-520d1f6a]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;background-color:#fafafa}.image-placeholder[data-v-520d1f6a]{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999;font-size:12px;gap:8px}.image-content[data-v-520d1f6a]{display:block;max-width:100%;max-height:100%;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;-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}.component-selection-overlay[data-v-520d1f6a]{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:hidden;box-sizing:border-box}.rectangle-content{width:100%;height:100%;box-sizing:border-box}.component-selection-overlay{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.rectangle-property-panel[data-v-e06ed44e]{display:flex;flex-direction:column;gap:12px}.horline-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-890c563f]{background:#fff;display:flex;flex-direction:column;gap:20px}.component-group[data-v-890c563f]{display:flex;flex-direction:column;gap:8px}.group-title[data-v-890c563f]{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-890c563f]{display:grid;grid-template-columns:1fr 1fr;grid-row-gap:8px;grid-column-gap:8px}.component-item[data-v-890c563f]{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-890c563f]: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-890c563f]{font-size:24px;margin-bottom:8px;color:var(--el-color-primary)}.component-item span[data-v-890c563f]{font-size:12px;text-align:center;color:#333}.component-item:hover i[data-v-890c563f],.component-item:hover span[data-v-890c563f]{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)}.add-btn[data-v-a4b90b63]{margin:10px 0}.tg-title[data-v-a4b90b63]{display:flex;align-items:center}.tg-title p[data-v-a4b90b63]{font-size:18px;font-weight:700}.tge-main[data-v-a4b90b63]{max-height:82vh;padding:0}.tge-text[data-v-a4b90b63]{font-size:14px;line-height:26px}.tge-content[data-v-a4b90b63]{display:flex;width:100%}.tge-block[data-v-a4b90b63]{display:flex;flex-direction:column;flex:1}.tge-title[data-v-a4b90b63]{padding:6px 0;font-size:14px;color:var(--el-color-primary)}.tge-img[data-v-a4b90b63]{width:100%;height:auto}.table-container[data-v-a4b90b63]{width:100%;border:1px dashed #ddd;border-radius:4px}.empty-placeholder[data-v-a4b90b63]{display:flex;align-items:center;justify-content:center;color:#999;padding:20px;border-radius:4px;min-height:80px}.graph-table[data-v-a4b90b63]{margin-top:10px}.tge-divider[data-v-a4b90b63]{width:1px;background:var(--el-border-color);margin:0 10px}.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-44fb302d]{display:flex;align-items:center;justify-content:center}.label-designer[data-v-44fb302d]{display:flex;height:100%}.toolbar[data-v-44fb302d]{width:200px;background:#fff;border-right:1px solid #e0e0e0;padding:16px;display:flex;flex-direction:column;gap:16px}.zoom-controls span[data-v-44fb302d]{width:44px;text-align:center}.zoom-controls[data-v-44fb302d]{display:flex;align-items:center;gap:8px;background:#f5f5f5;border-radius:4px;padding:4px 8px}.zoom-controls button[data-v-44fb302d]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.zoom-controls button[data-v-44fb302d]:disabled{opacity:.5;cursor:not-allowed}.center-container[data-v-44fb302d]{display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.center-toolbar[data-v-44fb302d]{display:flex;align-items:center;justify-content:flex-end;padding:16px 16px 0;background:rgba(0,0,0,.05)}.canvas-container[data-v-44fb302d]{width:100%;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-44fb302d]{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-44fb302d]{position:absolute;left:0;top:0;right:0;height:24px;z-index:10;pointer-events:none}.ruler-vertical[data-v-44fb302d]{position:absolute;left:0;top:0;bottom:0;width:24px;z-index:10;pointer-events:none}.canvas[data-v-44fb302d]{position:relative;overflow:hidden;z-index:1;position:absolute;left:21px;top:21px}.property-panel[data-v-44fb302d]{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-title[data-v-44fb302d]{position:sticky;top:0;left:0;right:0;background:#fff;z-index:100;display:flex;align-items:center;justify-content:flex-start;margin:10px 0 0}.position-controls[data-v-44fb302d]{display:flex;flex-direction:column;gap:12px;padding:12px;background:#f5f5f5;border-radius:4px}.control-group[data-v-44fb302d]{display:flex;align-items:center;justify-content:space-between;gap:4px}.control-group label[data-v-44fb302d]{width:80px;font-size:14px;color:#666;text-align:end}.number-input[data-v-44fb302d]{display:flex;align-items:center;gap:4px}.number-input input[data-v-44fb302d]{width:90px;padding:4px;border:1px solid #ddd;border-radius:4px;text-align:center}.number-input button[data-v-44fb302d]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.canvas-item[data-v-44fb302d]{position:absolute;cursor:move;-webkit-user-select:none;user-select:none;z-index:10;transform:translateZ(0);will-change:transform;left:0;top:0}.resize-handle[data-v-44fb302d]{position:absolute;width:6px;height:6px;background:#1890ff;border:1px solid #fff;box-shadow:0 0 3px #0000004d;cursor:pointer;z-index:1001;transition:all .2s ease;border-radius:1px;display:block!important;visibility:visible!important;opacity:1!important;transform:translateZ(0);will-change:transform;font-size:16px!important;line-height:1!important}.resize-handle[data-v-44fb302d]:hover{background:#40a9ff;box-shadow:0 0 4px #0006}.resize-handle.top-left[data-v-44fb302d]{top:-4px;left:-4px;background:#52c41a}.resize-handle.top-left[data-v-44fb302d]:hover{background:#73d13d}.resize-handle.top-left[data-v-44fb302d]:active{background:#389e0d}.resize-handle.top[data-v-44fb302d]{top:-4px;left:50%;transform:translate(-50%)}.resize-handle.top[data-v-44fb302d]:hover,.resize-handle.top[data-v-44fb302d]:active{transform:translate(-50%)}.resize-handle.top-right[data-v-44fb302d]{top:-4px;right:-4px;background:#52c41a}.resize-handle.top-right[data-v-44fb302d]:hover{background:#73d13d}.resize-handle.top-right[data-v-44fb302d]:active{background:#389e0d}.resize-handle.right[data-v-44fb302d]{top:50%;right:-4px;transform:translateY(-50%)}.resize-handle.right[data-v-44fb302d]:hover,.resize-handle.right[data-v-44fb302d]:active{transform:translateY(-50%)}.resize-handle.bottom-right[data-v-44fb302d]{bottom:-4px;right:-4px;background:#52c41a;z-index:1001}.resize-handle.bottom-right[data-v-44fb302d]:hover{background:#73d13d}.resize-handle.bottom-right[data-v-44fb302d]:active{background:#389e0d}.resize-handle.bottom[data-v-44fb302d]{bottom:-4px;left:50%;transform:translate(-50%)}.resize-handle.bottom[data-v-44fb302d]:hover,.resize-handle.bottom[data-v-44fb302d]:active{transform:translate(-50%)}.resize-handle.bottom-left[data-v-44fb302d]{bottom:-4px;left:-4px;background:#52c41a}.resize-handle.bottom-left[data-v-44fb302d]:hover{background:#73d13d}.resize-handle.bottom-left[data-v-44fb302d]:active{background:#389e0d}.resize-handle.left[data-v-44fb302d]{top:50%;left:-4px;transform:translateY(-50%)}.resize-handle.left[data-v-44fb302d]:hover,.resize-handle.left[data-v-44fb302d]:active{transform:translateY(-50%)}.rotate-handle[data-v-44fb302d]{position:absolute;top:-5px;left:50%;transform:translate(-50%);width:10px;height:10px;background:#1890ff;color:#fff;border-radius:50%;cursor:grab;z-index:1002;display:flex;align-items:center;justify-content:center}.size-label[data-v-44fb302d]{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-44fb302d]{position:absolute;top:-5px;right:-5px;width:10px;height:10px;background:#ff4d4f;color:#fff;border:none;border-radius:50%;cursor:pointer;z-index:1003;display:flex;align-items:center;justify-content:center}.drag-extend-lines[data-v-44fb302d]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.drag-extend-line[data-v-44fb302d]{position:absolute;pointer-events:none;z-index:998}.drag-extend-line.horizontal[data-v-44fb302d]{width:100%;height:0;left:0;border-top:1px dashed rgb(177,179,184)}.drag-extend-line.vertical[data-v-44fb302d]{width:0;height:100%;top:0;border-left:1px dashed rgb(177,179,184)}.drag-extend-line.rotated[data-v-44fb302d]{position:absolute;border:1px dashed #1890ff;pointer-events:none;z-index:998}.number-input input[type=number][data-v-44fb302d]::-webkit-inner-spin-button,.number-input input[type=number][data-v-44fb302d]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.switch-input[data-v-44fb302d]{display:flex;align-items:center}.switch-input input[type=checkbox][data-v-44fb302d]{width:20px;height:20px;cursor:pointer;accent-color:#1890ff}.component-selected[data-v-44fb302d],.component-current[data-v-44fb302d]{outline:1px dashed #1890ff!important;outline-offset:0!important}.component-selected[data-v-44fb302d],.component-current[data-v-44fb302d]{box-sizing:border-box}.no-outline.component-selected[data-v-44fb302d],.no-outline.component-current[data-v-44fb302d]{outline:none!important}.template-designer[data-v-9a302bda]{overflow-y:hidden}.template-designer-border-top[data-v-9a302bda]{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-3290b48a]{display:flex;align-items:center;justify-content:flex-start}.property-item[data-v-3290b48a]{display:flex;flex-direction:column;gap:4px}.property-item label[data-v-3290b48a]{font-size:14px;color:#666}.property-item input[data-v-3290b48a],.property-item select[data-v-3290b48a]{padding:4px 8px;border:1px solid #ddd;border-radius:4px}.property-item input[type=color][data-v-3290b48a]{height:32px;padding:2px}.property-item input[type=checkbox][data-v-3290b48a]{width:16px;height:16px}.file-input-container[data-v-3290b48a]{position:relative;display:flex;align-items:center;gap:8px}.file-input-container input[data-v-3290b48a]{height:100%!important}.file-url-input[data-v-3290b48a]{flex:1;padding:4px 8px;border:1px solid #ddd;border-radius:4px;font-size:12px}.file-input[data-v-3290b48a]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.file-select-btn[data-v-3290b48a]{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}.file-select-btn[data-v-3290b48a]:hover{background:var(--el-color-primary-dark-2);border-color:var(--el-color-primary-dark-2)}.file-info[data-v-3290b48a]{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-3290b48a]{font-size:12px;color:#666;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clear-btn[data-v-3290b48a]{background:none;border:none;color:#ff4d4f;cursor:pointer;font-size:12px;padding:2px 6px;border-radius:2px}.clear-btn[data-v-3290b48a]:hover{background-color:#fff2f0}.property-panel[data-v-aed193a8]{padding:16px;background:#fff;border-left:1px solid #e4e7ed;overflow-y:auto;height:100%}.property-group[data-v-aed193a8]{margin-bottom:16px}.property-group-title[data-v-aed193a8]{font-size:14px;font-weight:500;color:#303133;margin-bottom:8px;padding-bottom:4px;border-bottom:1px solid #ebeef5}.property-item[data-v-aed193a8]{margin-bottom:12px}.text-property-panel .property-item[data-v-aed193a8]:last-child,.barcode-property-panel .property-item[data-v-aed193a8]:last-child,.qrcode-property-panel .property-item[data-v-aed193a8]:last-child,.image-property-panel .property-item[data-v-aed193a8]:last-child,.rectangle-property-panel .property-item[data-v-aed193a8]:last-child,.horline-property-panel .property-item[data-v-aed193a8]:last-child,.verline-property-panel .property-item[data-v-aed193a8]:last-child{margin-bottom:0}.barcode-component{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.qrcode-component[data-v-6e726fcb]{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-6e726fcb]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:0;margin:0}.qrcode-image[data-v-6e726fcb]{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-6e726fcb]{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-520d1f6a]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;background-color:#fafafa}.image-placeholder[data-v-520d1f6a]{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999;font-size:12px;gap:8px}.image-content[data-v-520d1f6a]{display:block;max-width:100%;max-height:100%;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;-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}.component-selection-overlay[data-v-520d1f6a]{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:hidden;box-sizing:border-box}.rectangle-content{width:100%;height:100%;box-sizing:border-box}.component-selection-overlay{position:absolute;border:2px dashed #1890ff;pointer-events:none;box-sizing:border-box;z-index:1000}.rectangle-property-panel[data-v-e06ed44e]{display:flex;flex-direction:column;gap:12px}.horline-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-890c563f]{background:#fff;display:flex;flex-direction:column;gap:20px}.component-group[data-v-890c563f]{display:flex;flex-direction:column;gap:8px}.group-title[data-v-890c563f]{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-890c563f]{display:grid;grid-template-columns:1fr 1fr;grid-row-gap:8px;grid-column-gap:8px}.component-item[data-v-890c563f]{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-890c563f]: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-890c563f]{font-size:24px;margin-bottom:8px;color:var(--el-color-primary)}.component-item span[data-v-890c563f]{font-size:12px;text-align:center;color:#333}.component-item:hover i[data-v-890c563f],.component-item:hover span[data-v-890c563f]{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)}.add-btn[data-v-a4b90b63]{margin:10px 0}.tg-title[data-v-a4b90b63]{display:flex;align-items:center}.tg-title p[data-v-a4b90b63]{font-size:18px;font-weight:700}.tge-main[data-v-a4b90b63]{max-height:82vh;padding:0}.tge-text[data-v-a4b90b63]{font-size:14px;line-height:26px}.tge-content[data-v-a4b90b63]{display:flex;width:100%}.tge-block[data-v-a4b90b63]{display:flex;flex-direction:column;flex:1}.tge-title[data-v-a4b90b63]{padding:6px 0;font-size:14px;color:var(--el-color-primary)}.tge-img[data-v-a4b90b63]{width:100%;height:auto}.table-container[data-v-a4b90b63]{width:100%;border:1px dashed #ddd;border-radius:4px}.empty-placeholder[data-v-a4b90b63]{display:flex;align-items:center;justify-content:center;color:#999;padding:20px;border-radius:4px;min-height:80px}.graph-table[data-v-a4b90b63]{margin-top:10px}.tge-divider[data-v-a4b90b63]{width:1px;background:var(--el-border-color);margin:0 10px}.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-82147119]{display:flex;align-items:center;justify-content:center}.label-designer[data-v-82147119]{display:flex;height:100%}.toolbar[data-v-82147119]{width:200px;background:#fff;border-right:1px solid #e0e0e0;padding:16px;display:flex;flex-direction:column;gap:16px}.zoom-controls span[data-v-82147119]{width:44px;text-align:center}.zoom-controls[data-v-82147119]{display:flex;align-items:center;gap:8px;background:#f5f5f5;border-radius:4px;padding:4px 8px}.zoom-controls button[data-v-82147119]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.zoom-controls button[data-v-82147119]:disabled{opacity:.5;cursor:not-allowed}.center-container[data-v-82147119]{display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.center-toolbar[data-v-82147119]{display:flex;align-items:center;justify-content:flex-end;padding:16px 16px 0;background:rgba(0,0,0,.05)}.canvas-container[data-v-82147119]{width:100%;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-82147119]{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-82147119]{position:absolute;left:0;top:0;right:0;height:24px;z-index:10;pointer-events:none}.ruler-vertical[data-v-82147119]{position:absolute;left:0;top:0;bottom:0;width:24px;z-index:10;pointer-events:none}.canvas[data-v-82147119]{position:relative;overflow:hidden;z-index:1;position:absolute;left:21px;top:21px}.property-panel[data-v-82147119]{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-title[data-v-82147119]{position:sticky;top:0;left:0;right:0;background:#fff;z-index:100;display:flex;align-items:center;justify-content:flex-start;margin:10px 0 0}.position-controls[data-v-82147119]{display:flex;flex-direction:column;gap:12px;padding:12px;background:#f5f5f5;border-radius:4px}.control-group[data-v-82147119]{display:flex;align-items:center;justify-content:space-between;gap:4px}.control-group label[data-v-82147119]{width:80px;font-size:14px;color:#666;text-align:end}.number-input[data-v-82147119]{display:flex;align-items:center;gap:4px}.number-input input[data-v-82147119]{width:90px;padding:4px;border:1px solid #ddd;border-radius:4px;text-align:center}.number-input button[data-v-82147119]{width:24px;height:24px;border:1px solid #ddd;background:#fff;border-radius:4px;cursor:pointer}.canvas-item[data-v-82147119]{position:absolute;cursor:move;-webkit-user-select:none;user-select:none;z-index:10;transform:translateZ(0);will-change:transform;left:0;top:0}.resize-handle[data-v-82147119]{position:absolute;width:6px;height:6px;background:#1890ff;border:1px solid #fff;box-shadow:0 0 3px #0000004d;cursor:pointer;z-index:1001;transition:all .2s ease;border-radius:1px;display:block!important;visibility:visible!important;opacity:1!important;transform:translateZ(0);will-change:transform;font-size:16px!important;line-height:1!important}.resize-handle[data-v-82147119]:hover{background:#40a9ff;box-shadow:0 0 4px #0006}.resize-handle.top-left[data-v-82147119]{top:-4px;left:-4px;background:#52c41a}.resize-handle.top-left[data-v-82147119]:hover{background:#73d13d}.resize-handle.top-left[data-v-82147119]:active{background:#389e0d}.resize-handle.top[data-v-82147119]{top:-4px;left:50%;transform:translate(-50%)}.resize-handle.top[data-v-82147119]:hover,.resize-handle.top[data-v-82147119]:active{transform:translate(-50%)}.resize-handle.top-right[data-v-82147119]{top:-4px;right:-4px;background:#52c41a}.resize-handle.top-right[data-v-82147119]:hover{background:#73d13d}.resize-handle.top-right[data-v-82147119]:active{background:#389e0d}.resize-handle.right[data-v-82147119]{top:50%;right:-4px;transform:translateY(-50%)}.resize-handle.right[data-v-82147119]:hover,.resize-handle.right[data-v-82147119]:active{transform:translateY(-50%)}.resize-handle.bottom-right[data-v-82147119]{bottom:-4px;right:-4px;background:#52c41a;z-index:1001}.resize-handle.bottom-right[data-v-82147119]:hover{background:#73d13d}.resize-handle.bottom-right[data-v-82147119]:active{background:#389e0d}.resize-handle.bottom[data-v-82147119]{bottom:-4px;left:50%;transform:translate(-50%)}.resize-handle.bottom[data-v-82147119]:hover,.resize-handle.bottom[data-v-82147119]:active{transform:translate(-50%)}.resize-handle.bottom-left[data-v-82147119]{bottom:-4px;left:-4px;background:#52c41a}.resize-handle.bottom-left[data-v-82147119]:hover{background:#73d13d}.resize-handle.bottom-left[data-v-82147119]:active{background:#389e0d}.resize-handle.left[data-v-82147119]{top:50%;left:-4px;transform:translateY(-50%)}.resize-handle.left[data-v-82147119]:hover,.resize-handle.left[data-v-82147119]:active{transform:translateY(-50%)}.rotate-handle[data-v-82147119]{position:absolute;top:-5px;left:50%;transform:translate(-50%);width:10px;height:10px;background:#1890ff;color:#fff;border-radius:50%;cursor:grab;z-index:1002;display:flex;align-items:center;justify-content:center}.size-label[data-v-82147119]{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-82147119]{position:absolute;top:-5px;right:-5px;width:10px;height:10px;background:#ff4d4f;color:#fff;border:none;border-radius:50%;cursor:pointer;z-index:1003;display:flex;align-items:center;justify-content:center}.drag-extend-lines[data-v-82147119]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.drag-extend-line[data-v-82147119]{position:absolute;pointer-events:none;z-index:998}.drag-extend-line.horizontal[data-v-82147119]{width:100%;height:0;left:0;border-top:1px dashed rgb(177,179,184)}.drag-extend-line.vertical[data-v-82147119]{width:0;height:100%;top:0;border-left:1px dashed rgb(177,179,184)}.drag-extend-line.rotated[data-v-82147119]{position:absolute;border:1px dashed #1890ff;pointer-events:none;z-index:998}.number-input input[type=number][data-v-82147119]::-webkit-inner-spin-button,.number-input input[type=number][data-v-82147119]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.switch-input[data-v-82147119]{display:flex;align-items:center}.switch-input input[type=checkbox][data-v-82147119]{width:20px;height:20px;cursor:pointer;accent-color:#1890ff}.component-selected[data-v-82147119],.component-current[data-v-82147119]{outline:1px dashed #1890ff!important;outline-offset:0!important}.component-selected[data-v-82147119],.component-current[data-v-82147119]{box-sizing:border-box}.no-outline.component-selected[data-v-82147119],.no-outline.component-current[data-v-82147119]{outline:none!important}.template-designer[data-v-9a302bda]{overflow-y:hidden}.template-designer-border-top[data-v-9a302bda]{border-top:1px solid #e0e0e0}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as AA, ref as K, watch as HA, openBlock as T, createElementBlock as H, normalizeStyle as eA, createElementVNode as m, toDisplayString as ke, createCommentVNode as sA, withDirectives as $A, Fragment as GA, renderList as rt, vModelSelect as tc, vModelText as Se, vModelCheckbox as rc, vModelDynamic as nc, toRefs as ac, normalizeClass as $r, createBlock as DA, onMounted as ut, nextTick as
|
|
1
|
+
import { computed as AA, ref as K, watch as HA, openBlock as T, createElementBlock as H, normalizeStyle as eA, createElementVNode as m, toDisplayString as ke, createCommentVNode as sA, withDirectives as $A, Fragment as GA, renderList as rt, vModelSelect as tc, vModelText as Se, vModelCheckbox as rc, vModelDynamic as nc, toRefs as ac, normalizeClass as $r, createBlock as DA, onMounted as ut, nextTick as ge, onBeforeUnmount as Kt, withModifiers as SA, resolveComponent as mA, createVNode as W, withCtx as X, unref as D, resolveDynamicComponent as Wr, getCurrentInstance as nl, reactive as xo, createTextVNode as de, resolveDirective as oc, h as ic } from "vue";
|
|
2
2
|
const lc = {
|
|
3
3
|
__name: "TextComponent",
|
|
4
4
|
props: {
|
|
@@ -2858,9 +2858,9 @@ var Bh = Da, be = Re(Bh), dh = ht, zt = Re(dh), fh = ao, Rl = Re(fh), hh = oo, P
|
|
|
2858
2858
|
function Re(e) {
|
|
2859
2859
|
return e && e.__esModule ? e : { default: e };
|
|
2860
2860
|
}
|
|
2861
|
-
var
|
|
2861
|
+
var se = function() {
|
|
2862
2862
|
}, un = function(A, r, t) {
|
|
2863
|
-
var n = new
|
|
2863
|
+
var n = new se();
|
|
2864
2864
|
if (typeof A > "u")
|
|
2865
2865
|
throw Error("No element to render on was provided.");
|
|
2866
2866
|
return n._renderProperties = (0, gh.default)(A), n._encodings = [], n._options = Tl.default, n._errorHandler = new wh.default(n), typeof r < "u" && (t = t || {}, t.format || (t.format = Il()), n.options(t)[t.format](r, t).render()), n;
|
|
@@ -2871,7 +2871,7 @@ un.getModule = function(e) {
|
|
|
2871
2871
|
for (var _o in be.default)
|
|
2872
2872
|
be.default.hasOwnProperty(_o) && Ch(be.default, _o);
|
|
2873
2873
|
function Ch(e, A) {
|
|
2874
|
-
|
|
2874
|
+
se.prototype[A] = se.prototype[A.toUpperCase()] = se.prototype[A.toLowerCase()] = function(r, t) {
|
|
2875
2875
|
var n = this;
|
|
2876
2876
|
return n._errorHandler.wrapBarcodeCall(function() {
|
|
2877
2877
|
t.text = typeof t.text > "u" ? void 0 : "" + t.text;
|
|
@@ -2896,14 +2896,14 @@ function yl(e, A, r) {
|
|
|
2896
2896
|
function Il() {
|
|
2897
2897
|
return be.default.CODE128 ? "CODE128" : Object.keys(be.default)[0];
|
|
2898
2898
|
}
|
|
2899
|
-
|
|
2899
|
+
se.prototype.options = function(e) {
|
|
2900
2900
|
return this._options = (0, zt.default)(this._options, e), this;
|
|
2901
2901
|
};
|
|
2902
|
-
|
|
2902
|
+
se.prototype.blank = function(e) {
|
|
2903
2903
|
var A = new Array(e + 1).join("0");
|
|
2904
2904
|
return this._encodings.push({ data: A }), this;
|
|
2905
2905
|
};
|
|
2906
|
-
|
|
2906
|
+
se.prototype.init = function() {
|
|
2907
2907
|
if (this._renderProperties) {
|
|
2908
2908
|
Array.isArray(this._renderProperties) || (this._renderProperties = [this._renderProperties]);
|
|
2909
2909
|
var e;
|
|
@@ -2917,7 +2917,7 @@ ce.prototype.init = function() {
|
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
2919
|
};
|
|
2920
|
-
|
|
2920
|
+
se.prototype.render = function() {
|
|
2921
2921
|
if (!this._renderProperties)
|
|
2922
2922
|
throw new Vl.NoElementException();
|
|
2923
2923
|
if (Array.isArray(this._renderProperties))
|
|
@@ -2927,7 +2927,7 @@ ce.prototype.render = function() {
|
|
|
2927
2927
|
Ba(this._renderProperties, this._encodings, this._options);
|
|
2928
2928
|
return this;
|
|
2929
2929
|
};
|
|
2930
|
-
|
|
2930
|
+
se.prototype._defaults = Tl.default;
|
|
2931
2931
|
function Ba(e, A, r) {
|
|
2932
2932
|
A = (0, Rl.default)(A);
|
|
2933
2933
|
for (var t = 0; t < A.length; t++)
|
|
@@ -3009,7 +3009,7 @@ const Rh = {
|
|
|
3009
3009
|
margin: 0,
|
|
3010
3010
|
// 条形码的颜色
|
|
3011
3011
|
lineColor: d
|
|
3012
|
-
}),
|
|
3012
|
+
}), ge(() => {
|
|
3013
3013
|
const Z = r.value;
|
|
3014
3014
|
if (Z) {
|
|
3015
3015
|
const O = Z.getBBox();
|
|
@@ -4608,7 +4608,7 @@ const FU = { class: "qrcode-canvas-fixed" }, pU = ["src", "alt"], wU = 200, EU =
|
|
|
4608
4608
|
};
|
|
4609
4609
|
})();
|
|
4610
4610
|
return ut(() => {
|
|
4611
|
-
|
|
4611
|
+
ge(() => {
|
|
4612
4612
|
s();
|
|
4613
4613
|
});
|
|
4614
4614
|
}), HA(() => [
|
|
@@ -4789,7 +4789,7 @@ const IU = {
|
|
|
4789
4789
|
}, { deep: !0 }), HA(() => A.propsConfig, () => {
|
|
4790
4790
|
i.value = null, d();
|
|
4791
4791
|
}, { deep: !0 }), ut(() => {
|
|
4792
|
-
|
|
4792
|
+
ge(() => {
|
|
4793
4793
|
d();
|
|
4794
4794
|
});
|
|
4795
4795
|
}), (f, p) => {
|
|
@@ -5430,7 +5430,7 @@ const yg = { class: "tg-title" }, Ig = { class: "table-container" }, Ng = {
|
|
|
5430
5430
|
onClick: n.openSetting
|
|
5431
5431
|
}, {
|
|
5432
5432
|
default: X(() => c[5] || (c[5] = [
|
|
5433
|
-
|
|
5433
|
+
de("标签图像配置", -1)
|
|
5434
5434
|
])),
|
|
5435
5435
|
_: 1,
|
|
5436
5436
|
__: [5]
|
|
@@ -5452,7 +5452,7 @@ const yg = { class: "tg-title" }, Ig = { class: "table-container" }, Ng = {
|
|
|
5452
5452
|
onClick: c[0] || (c[0] = (g) => n.showExplain = !0)
|
|
5453
5453
|
}, {
|
|
5454
5454
|
default: X(() => c[6] || (c[6] = [
|
|
5455
|
-
|
|
5455
|
+
de("使用说明", -1)
|
|
5456
5456
|
])),
|
|
5457
5457
|
_: 1,
|
|
5458
5458
|
__: [6]
|
|
@@ -5464,7 +5464,7 @@ const yg = { class: "tg-title" }, Ig = { class: "table-container" }, Ng = {
|
|
|
5464
5464
|
onClick: c[1] || (c[1] = (g) => n.show = !1)
|
|
5465
5465
|
}, {
|
|
5466
5466
|
default: X(() => c[14] || (c[14] = [
|
|
5467
|
-
|
|
5467
|
+
de("取 消", -1)
|
|
5468
5468
|
])),
|
|
5469
5469
|
_: 1,
|
|
5470
5470
|
__: [14]
|
|
@@ -5474,7 +5474,7 @@ const yg = { class: "tg-title" }, Ig = { class: "table-container" }, Ng = {
|
|
|
5474
5474
|
onClick: c[2] || (c[2] = (g) => a.save())
|
|
5475
5475
|
}, {
|
|
5476
5476
|
default: X(() => c[15] || (c[15] = [
|
|
5477
|
-
|
|
5477
|
+
de("保 存", -1)
|
|
5478
5478
|
])),
|
|
5479
5479
|
_: 1,
|
|
5480
5480
|
__: [15]
|
|
@@ -5501,7 +5501,7 @@ const yg = { class: "tg-title" }, Ig = { class: "table-container" }, Ng = {
|
|
|
5501
5501
|
onClick: o
|
|
5502
5502
|
}, {
|
|
5503
5503
|
default: X(() => c[8] || (c[8] = [
|
|
5504
|
-
|
|
5504
|
+
de("+", -1)
|
|
5505
5505
|
])),
|
|
5506
5506
|
_: 1,
|
|
5507
5507
|
__: [8]
|
|
@@ -5645,7 +5645,7 @@ const yg = { class: "tg-title" }, Ig = { class: "table-container" }, Ng = {
|
|
|
5645
5645
|
onClick: (v) => i(g.$index)
|
|
5646
5646
|
}, {
|
|
5647
5647
|
default: X(() => c[10] || (c[10] = [
|
|
5648
|
-
|
|
5648
|
+
de("删除", -1)
|
|
5649
5649
|
])),
|
|
5650
5650
|
_: 2,
|
|
5651
5651
|
__: [10]
|
|
@@ -5670,7 +5670,7 @@ const yg = { class: "tg-title" }, Ig = { class: "table-container" }, Ng = {
|
|
|
5670
5670
|
onClick: l
|
|
5671
5671
|
}, {
|
|
5672
5672
|
default: X(() => c[11] || (c[11] = [
|
|
5673
|
-
|
|
5673
|
+
de("+", -1)
|
|
5674
5674
|
])),
|
|
5675
5675
|
_: 1,
|
|
5676
5676
|
__: [11]
|
|
@@ -5759,7 +5759,7 @@ const yg = { class: "tg-title" }, Ig = { class: "table-container" }, Ng = {
|
|
|
5759
5759
|
onClick: (v) => s(g.$index)
|
|
5760
5760
|
}, {
|
|
5761
5761
|
default: X(() => c[13] || (c[13] = [
|
|
5762
|
-
|
|
5762
|
+
de("删除", -1)
|
|
5763
5763
|
])),
|
|
5764
5764
|
_: 2,
|
|
5765
5765
|
__: [13]
|
|
@@ -6074,15 +6074,15 @@ function Zg(e, A, r, t) {
|
|
|
6074
6074
|
I
|
|
6075
6075
|
), Ar = B.value.x - ye.x, er = B.value.y - ye.y;
|
|
6076
6076
|
let yA = Number((iA + Ar).toFixed(2)), KA = Number((pA + er).toFixed(2));
|
|
6077
|
-
const Ie = e.value || 0,
|
|
6077
|
+
const Ie = e.value || 0, Be = A.value || 0, Rn = yA, tr = yA + z, Vn = KA, E = KA + G;
|
|
6078
6078
|
let F = !1;
|
|
6079
|
-
if ((I !== 0 || Rn < -0.5 || tr > Ie + 0.5 || Vn < -0.5 || E >
|
|
6080
|
-
const J = C(yA, KA, z, G, I, Ie,
|
|
6079
|
+
if ((I !== 0 || Rn < -0.5 || tr > Ie + 0.5 || Vn < -0.5 || E > Be + 0.5) && (F = !0), F) {
|
|
6080
|
+
const J = C(yA, KA, z, G, I, Ie, Be);
|
|
6081
6081
|
if (J.isOutOfBounds) {
|
|
6082
6082
|
let b = 0, j = 0;
|
|
6083
|
-
J.minX < -0.5 ? b = -J.minX + 0.5 : J.maxX > Ie + 0.5 && (b = Ie - J.maxX + 0.5), J.minY < -0.5 ? j = -J.minY + 0.5 : J.maxY >
|
|
6083
|
+
J.minX < -0.5 ? b = -J.minX + 0.5 : J.maxX > Ie + 0.5 && (b = Ie - J.maxX + 0.5), J.minY < -0.5 ? j = -J.minY + 0.5 : J.maxY > Be + 0.5 && (j = Be - J.maxY + 0.5);
|
|
6084
6084
|
const R = yA + b, lA = KA + j;
|
|
6085
|
-
if (!C(R, lA, z, G, I, Ie,
|
|
6085
|
+
if (!C(R, lA, z, G, I, Ie, Be).isOutOfBounds)
|
|
6086
6086
|
yA = R, KA = lA;
|
|
6087
6087
|
else
|
|
6088
6088
|
return;
|
|
@@ -6467,7 +6467,7 @@ function Br(e, A, r) {
|
|
|
6467
6467
|
(a || !(t in A)) && (a || (a = Array.prototype.slice.call(A, 0, t)), a[t] = A[t]);
|
|
6468
6468
|
return e.concat(a || A);
|
|
6469
6469
|
}
|
|
6470
|
-
var
|
|
6470
|
+
var ue = (
|
|
6471
6471
|
/** @class */
|
|
6472
6472
|
function() {
|
|
6473
6473
|
function e(A, r, t, n) {
|
|
@@ -6485,13 +6485,13 @@ var Be = (
|
|
|
6485
6485
|
}, e.EMPTY = new e(0, 0, 0, 0), e;
|
|
6486
6486
|
}()
|
|
6487
6487
|
), Un = function(e, A) {
|
|
6488
|
-
return
|
|
6488
|
+
return ue.fromClientRect(e, A.getBoundingClientRect());
|
|
6489
6489
|
}, Gg = function(e) {
|
|
6490
6490
|
var A = e.body, r = e.documentElement;
|
|
6491
6491
|
if (!A || !r)
|
|
6492
6492
|
throw new Error("Unable to get document size");
|
|
6493
6493
|
var t = Math.max(Math.max(A.scrollWidth, r.scrollWidth), Math.max(A.offsetWidth, r.offsetWidth), Math.max(A.clientWidth, r.clientWidth)), n = Math.max(Math.max(A.scrollHeight, r.scrollHeight), Math.max(A.offsetHeight, r.offsetHeight), Math.max(A.clientHeight, r.clientHeight));
|
|
6494
|
-
return new
|
|
6494
|
+
return new ue(0, 0, t, n);
|
|
6495
6495
|
}, gn = function(e) {
|
|
6496
6496
|
for (var A = [], r = 0, t = e.length; r < t; ) {
|
|
6497
6497
|
var n = e.charCodeAt(r++);
|
|
@@ -6739,10 +6739,10 @@ var cQ = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
6739
6739
|
return Lr(e) || NA(e) || e === xA;
|
|
6740
6740
|
}, u1 = function(e) {
|
|
6741
6741
|
return e >= XQ && e <= PQ || e === _Q || e >= qQ && e <= $Q || e === A1;
|
|
6742
|
-
},
|
|
6742
|
+
}, Ue = function(e, A) {
|
|
6743
6743
|
return e !== Ht ? !1 : A !== Kr;
|
|
6744
6744
|
}, vr = function(e, A, r) {
|
|
6745
|
-
return e === xA ? Lr(A) ||
|
|
6745
|
+
return e === xA ? Lr(A) || Ue(A, r) : Lr(e) ? !0 : !!(e === Ht && Ue(e, A));
|
|
6746
6746
|
}, zn = function(e, A, r) {
|
|
6747
6747
|
return e === He || e === xA ? NA(A) ? !0 : A === Dt && NA(r) : NA(e === Dt ? A : e);
|
|
6748
6748
|
}, B1 = function(e) {
|
|
@@ -6844,7 +6844,7 @@ var cQ = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
6844
6844
|
return this.consumeStringToken(pr);
|
|
6845
6845
|
case NQ:
|
|
6846
6846
|
var r = this.peekCodePoint(0), t = this.peekCodePoint(1), n = this.peekCodePoint(2);
|
|
6847
|
-
if (wi(r) ||
|
|
6847
|
+
if (wi(r) || Ue(t, n)) {
|
|
6848
6848
|
var a = vr(r, t, n) ? TQ : VQ, o = this.consumeName();
|
|
6849
6849
|
return { type: 5, value: o, flags: a };
|
|
6850
6850
|
}
|
|
@@ -6910,7 +6910,7 @@ var cQ = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
6910
6910
|
case WQ:
|
|
6911
6911
|
return y1;
|
|
6912
6912
|
case Ht:
|
|
6913
|
-
if (
|
|
6913
|
+
if (Ue(A, this.peekCodePoint(0)))
|
|
6914
6914
|
return this.reconsumeCodePoint(A), this.consumeIdentLikeToken();
|
|
6915
6915
|
break;
|
|
6916
6916
|
case OQ:
|
|
@@ -6991,7 +6991,7 @@ var cQ = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
6991
6991
|
if (n === pr || n === wr || n === Er || u1(n))
|
|
6992
6992
|
return this.consumeBadUrlRemnants(), Rr;
|
|
6993
6993
|
if (n === Ht)
|
|
6994
|
-
if (
|
|
6994
|
+
if (Ue(n, this.peekCodePoint(0)))
|
|
6995
6995
|
A.push(this.consumeEscapedCodePoint());
|
|
6996
6996
|
else
|
|
6997
6997
|
return this.consumeBadUrlRemnants(), Rr;
|
|
@@ -7006,7 +7006,7 @@ var cQ = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
7006
7006
|
var A = this.consumeCodePoint();
|
|
7007
7007
|
if (A === mt || A === ee)
|
|
7008
7008
|
return;
|
|
7009
|
-
|
|
7009
|
+
Ue(A, this.peekCodePoint(0)) && this.consumeEscapedCodePoint();
|
|
7010
7010
|
}
|
|
7011
7011
|
}, e.prototype.consumeStringSlice = function(A) {
|
|
7012
7012
|
for (var r = 5e4, t = ""; A > 0; ) {
|
|
@@ -7024,7 +7024,7 @@ var cQ = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
7024
7024
|
return this._value.splice(0, t), m1;
|
|
7025
7025
|
if (n === Ht) {
|
|
7026
7026
|
var a = this._value[t + 1];
|
|
7027
|
-
a !== ee && a !== void 0 && (a === Kr ? (r += this.consumeStringSlice(t), t = -1, this._value.shift()) :
|
|
7027
|
+
a !== ee && a !== void 0 && (a === Kr ? (r += this.consumeStringSlice(t), t = -1, this._value.shift()) : Ue(n, a) && (r += this.consumeStringSlice(t), r += UA(this.consumeEscapedCodePoint()), t = -1));
|
|
7028
7028
|
}
|
|
7029
7029
|
t++;
|
|
7030
7030
|
} while (!0);
|
|
@@ -7065,7 +7065,7 @@ var cQ = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
7065
7065
|
var r = this.consumeCodePoint();
|
|
7066
7066
|
if (wi(r))
|
|
7067
7067
|
A += UA(r);
|
|
7068
|
-
else if (
|
|
7068
|
+
else if (Ue(r, this.peekCodePoint(0)))
|
|
7069
7069
|
A += UA(this.consumeEscapedCodePoint());
|
|
7070
7070
|
else
|
|
7071
7071
|
return this.reconsumeCodePoint(r), A;
|
|
@@ -7289,11 +7289,11 @@ var cQ = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
7289
7289
|
}
|
|
7290
7290
|
}
|
|
7291
7291
|
if (A.type === 20) {
|
|
7292
|
-
var i =
|
|
7292
|
+
var i = ce[A.value.toUpperCase()];
|
|
7293
7293
|
if (typeof i < "u")
|
|
7294
7294
|
return i;
|
|
7295
7295
|
}
|
|
7296
|
-
return
|
|
7296
|
+
return ce.TRANSPARENT;
|
|
7297
7297
|
}
|
|
7298
7298
|
}, me = function(e) {
|
|
7299
7299
|
return (255 & e) === 0;
|
|
@@ -7338,7 +7338,7 @@ var mi = function(e, A) {
|
|
|
7338
7338
|
rgba: Ci
|
|
7339
7339
|
}, bt = function(e, A) {
|
|
7340
7340
|
return Ce.parse(e, us.create(A).parseComponentValue());
|
|
7341
|
-
},
|
|
7341
|
+
}, ce = {
|
|
7342
7342
|
ALICEBLUE: 4042850303,
|
|
7343
7343
|
ANTIQUEWHITE: 4209760255,
|
|
7344
7344
|
AQUA: 16777215,
|
|
@@ -8335,7 +8335,7 @@ var wF = {
|
|
|
8335
8335
|
parse: function(e, A) {
|
|
8336
8336
|
return A.length === 1 && Na(A[0], "none") ? [] : ne(A).map(function(r) {
|
|
8337
8337
|
for (var t = {
|
|
8338
|
-
color:
|
|
8338
|
+
color: ce.TRANSPARENT,
|
|
8339
8339
|
offsetX: RA,
|
|
8340
8340
|
offsetY: RA,
|
|
8341
8341
|
blur: RA
|
|
@@ -9114,10 +9114,10 @@ var Mp = 1, qn = 2, $n = 3, Hi = 4, bi = 5, Hp = 7, xi = 8, Aa = 9, ea = 10, Zi
|
|
|
9114
9114
|
if (l.length > 1) {
|
|
9115
9115
|
var s = Io(i), u = 0;
|
|
9116
9116
|
s.forEach(function(B) {
|
|
9117
|
-
a.push(new Zt(B,
|
|
9117
|
+
a.push(new Zt(B, ue.fromDOMRectList(e, Ki(t, u + o, B.length).getClientRects()))), u += B.length;
|
|
9118
9118
|
});
|
|
9119
9119
|
} else
|
|
9120
|
-
a.push(new Zt(i,
|
|
9120
|
+
a.push(new Zt(i, ue.fromDOMRectList(e, l)));
|
|
9121
9121
|
} else {
|
|
9122
9122
|
var c = t.splitText(i.length);
|
|
9123
9123
|
a.push(new Zt(i, Xp(e, t))), t = c;
|
|
@@ -9138,7 +9138,7 @@ var Mp = 1, qn = 2, $n = 3, Hi = 4, bi = 5, Hp = 7, xi = 8, Aa = 9, ea = 10, Zi
|
|
|
9138
9138
|
return t.firstChild && n.replaceChild(t.firstChild, t), a;
|
|
9139
9139
|
}
|
|
9140
9140
|
}
|
|
9141
|
-
return
|
|
9141
|
+
return ue.EMPTY;
|
|
9142
9142
|
}, Ki = function(e, A, r) {
|
|
9143
9143
|
var t = e.ownerDocument;
|
|
9144
9144
|
if (!t)
|
|
@@ -9264,7 +9264,7 @@ var Mp = 1, qn = 2, $n = 3, Hi = 4, bi = 5, Hp = 7, xi = 8, Aa = 9, ea = 10, Zi
|
|
|
9264
9264
|
number: 50
|
|
9265
9265
|
}
|
|
9266
9266
|
], ow = function(e) {
|
|
9267
|
-
return e.width > e.height ? new
|
|
9267
|
+
return e.width > e.height ? new ue(e.left + (e.width - e.height) / 2, e.top, e.height, e.height) : e.width < e.height ? new ue(e.left, e.top + (e.height - e.width) / 2, e.width, e.width) : e;
|
|
9268
9268
|
}, iw = function(e) {
|
|
9269
9269
|
var A = e.type === lw ? new Array(e.value.length + 1).join("•") : e.value;
|
|
9270
9270
|
return A.length === 0 ? e.placeholder || "" : A;
|
|
@@ -9322,7 +9322,7 @@ var Mp = 1, qn = 2, $n = 3, Hi = 4, bi = 5, Hp = 7, xi = 8, Aa = 9, ea = 10, Zi
|
|
|
9322
9322
|
try {
|
|
9323
9323
|
if (t.contentWindow && t.contentWindow.document && t.contentWindow.document.documentElement) {
|
|
9324
9324
|
n.tree = Ws(r, t.contentWindow.document.documentElement);
|
|
9325
|
-
var a = t.contentWindow.document.documentElement ? bt(r, getComputedStyle(t.contentWindow.document.documentElement).backgroundColor) :
|
|
9325
|
+
var a = t.contentWindow.document.documentElement ? bt(r, getComputedStyle(t.contentWindow.document.documentElement).backgroundColor) : ce.TRANSPARENT, o = t.contentWindow.document.body ? bt(r, getComputedStyle(t.contentWindow.document.body).backgroundColor) : ce.TRANSPARENT;
|
|
9326
9326
|
n.backgroundColor = me(a) ? me(o) ? n.styles.backgroundColor : o : a;
|
|
9327
9327
|
}
|
|
9328
9328
|
} catch {
|
|
@@ -9684,7 +9684,7 @@ var Mp = 1, qn = 2, $n = 3, Hi = 4, bi = 5, Hp = 7, xi = 8, Aa = 9, ea = 10, Zi
|
|
|
9684
9684
|
return Gs(Math.abs(e), t, !1, function(n) {
|
|
9685
9685
|
return A[Math.floor(n % t)];
|
|
9686
9686
|
}) + r;
|
|
9687
|
-
}, qe = 1,
|
|
9687
|
+
}, qe = 1, fe = 2, he = 4, St = 8, le = function(e, A, r, t, n, a) {
|
|
9688
9688
|
if (e < -9999 || e > 9999)
|
|
9689
9689
|
return Jt(e, 4, n.length > 0);
|
|
9690
9690
|
var o = Math.abs(e), i = n;
|
|
@@ -9692,7 +9692,7 @@ var Mp = 1, qn = 2, $n = 3, Hi = 4, bi = 5, Hp = 7, xi = 8, Aa = 9, ea = 10, Zi
|
|
|
9692
9692
|
return A[0] + i;
|
|
9693
9693
|
for (var l = 0; o > 0 && l <= 4; l++) {
|
|
9694
9694
|
var s = o % 10;
|
|
9695
|
-
s === 0 && FA(a, qe) && i !== "" ? i = A[s] + i : s > 1 || s === 1 && l === 0 || s === 1 && l === 1 && FA(a,
|
|
9695
|
+
s === 0 && FA(a, qe) && i !== "" ? i = A[s] + i : s > 1 || s === 1 && l === 0 || s === 1 && l === 1 && FA(a, fe) || s === 1 && l === 1 && FA(a, he) && e > 100 || s === 1 && l > 1 && FA(a, St) ? i = A[s] + (l > 0 ? r[l - 1] : "") + i : s === 1 && l > 0 && (i = r[l - 1] + i), o = Math.floor(o / 10);
|
|
9696
9696
|
}
|
|
9697
9697
|
return (e < 0 ? t : "") + i;
|
|
9698
9698
|
}, Pi = "十百千萬", _i = "拾佰仟萬", qi = "マイナス", na = "마이너스", Jt = function(e, A, r) {
|
|
@@ -9737,23 +9737,23 @@ var Mp = 1, qn = 2, $n = 3, Hi = 4, bi = 5, Hp = 7, xi = 8, Aa = 9, ea = 10, Zi
|
|
|
9737
9737
|
return Ne(e, "甲乙丙丁戊己庚辛壬癸", n);
|
|
9738
9738
|
case 17:
|
|
9739
9739
|
case 48:
|
|
9740
|
-
return le(e, "零一二三四五六七八九", Pi, "負", n,
|
|
9740
|
+
return le(e, "零一二三四五六七八九", Pi, "負", n, fe | he | St);
|
|
9741
9741
|
case 47:
|
|
9742
|
-
return le(e, "零壹貳參肆伍陸柒捌玖", _i, "負", n, qe |
|
|
9742
|
+
return le(e, "零壹貳參肆伍陸柒捌玖", _i, "負", n, qe | fe | he | St);
|
|
9743
9743
|
case 42:
|
|
9744
|
-
return le(e, "零一二三四五六七八九", Pi, "负", n,
|
|
9744
|
+
return le(e, "零一二三四五六七八九", Pi, "负", n, fe | he | St);
|
|
9745
9745
|
case 41:
|
|
9746
|
-
return le(e, "零壹贰叁肆伍陆柒捌玖", _i, "负", n, qe |
|
|
9746
|
+
return le(e, "零壹贰叁肆伍陆柒捌玖", _i, "负", n, qe | fe | he | St);
|
|
9747
9747
|
case 26:
|
|
9748
9748
|
return le(e, "〇一二三四五六七八九", "十百千万", qi, n, 0);
|
|
9749
9749
|
case 25:
|
|
9750
|
-
return le(e, "零壱弐参四伍六七八九", "拾百千万", qi, n, qe |
|
|
9750
|
+
return le(e, "零壱弐参四伍六七八九", "拾百千万", qi, n, qe | fe | he);
|
|
9751
9751
|
case 31:
|
|
9752
|
-
return le(e, "영일이삼사오육칠팔구", "십백천만", na, a, qe |
|
|
9752
|
+
return le(e, "영일이삼사오육칠팔구", "십백천만", na, a, qe | fe | he);
|
|
9753
9753
|
case 33:
|
|
9754
9754
|
return le(e, "零一二三四五六七八九", "十百千萬", na, a, 0);
|
|
9755
9755
|
case 32:
|
|
9756
|
-
return le(e, "零壹貳參四五六七八九", "拾百千", na, a, qe |
|
|
9756
|
+
return le(e, "零壹貳參四五六七八九", "拾百千", na, a, qe | fe | he);
|
|
9757
9757
|
case 18:
|
|
9758
9758
|
return hA(e, 2406, 2415, !0, t);
|
|
9759
9759
|
case 20:
|
|
@@ -10773,7 +10773,7 @@ var BA = function(e, A, r, t, n) {
|
|
|
10773
10773
|
case 18:
|
|
10774
10774
|
return [3, 20];
|
|
10775
10775
|
case 19:
|
|
10776
|
-
r.listValue && t.styles.listStyleType !== -1 && (C = this.createFontStyle(a)[0], this.ctx.font = C, this.ctx.fillStyle = EA(a.color), this.ctx.textBaseline = "middle", this.ctx.textAlign = "right", V = new
|
|
10776
|
+
r.listValue && t.styles.listStyleType !== -1 && (C = this.createFontStyle(a)[0], this.ctx.font = C, this.ctx.fillStyle = EA(a.color), this.ctx.textBaseline = "middle", this.ctx.textAlign = "right", V = new ue(t.bounds.left, t.bounds.top + cA(t.styles.paddingTop, t.bounds.width), t.bounds.width, Vi(a.lineHeight, a.fontSize.number) / 2 + 1), this.renderTextWithLetterSpacing(new Zt(r.listValue, V), a.letterSpacing, Vi(a.lineHeight, a.fontSize.number) / 2 + 2), this.ctx.textBaseline = "bottom", this.ctx.textAlign = "left"), g.label = 20;
|
|
10777
10777
|
case 20:
|
|
10778
10778
|
return [
|
|
10779
10779
|
2
|
|
@@ -11174,7 +11174,7 @@ var fE = function(e, A) {
|
|
|
11174
11174
|
windowHeight: (I = A.windowHeight) !== null && I !== void 0 ? I : t.innerHeight,
|
|
11175
11175
|
scrollX: (q = A.scrollX) !== null && q !== void 0 ? q : t.pageXOffset,
|
|
11176
11176
|
scrollY: (aA = A.scrollY) !== null && aA !== void 0 ? aA : t.pageYOffset
|
|
11177
|
-
}, i = new
|
|
11177
|
+
}, i = new ue(o.scrollX, o.scrollY, o.windowWidth, o.windowHeight), l = new BE(a, i), s = (L = A.foreignObjectRendering) !== null && L !== void 0 ? L : !1, u = {
|
|
11178
11178
|
allowTaint: (P = A.allowTaint) !== null && P !== void 0 ? P : !1,
|
|
11179
11179
|
onclone: A.onclone,
|
|
11180
11180
|
ignoreElements: A.ignoreElements,
|
|
@@ -11194,7 +11194,7 @@ var fE = function(e, A) {
|
|
|
11194
11194
|
case 2:
|
|
11195
11195
|
return V = gA.sent(), [3, 5];
|
|
11196
11196
|
case 3:
|
|
11197
|
-
return l.logger.debug("Document cloned, element located at " + U + "," + Q + " with size " + f + "x" + p + " using computed rendering"), l.logger.debug("Starting DOM parsing"), g = Ws(l, B), w === g.styles.backgroundColor && (g.styles.backgroundColor =
|
|
11197
|
+
return l.logger.debug("Document cloned, element located at " + U + "," + Q + " with size " + f + "x" + p + " using computed rendering"), l.logger.debug("Starting DOM parsing"), g = Ws(l, B), w === g.styles.backgroundColor && (g.styles.backgroundColor = ce.TRANSPARENT), l.logger.debug("Starting renderer for element at " + C.x + "," + C.y + " with size " + C.width + "x" + C.height), v = new rE(l, C), [4, v.render(g)];
|
|
11198
11198
|
case 4:
|
|
11199
11199
|
V = gA.sent(), gA.label = 5;
|
|
11200
11200
|
case 5:
|
|
@@ -11203,7 +11203,7 @@ var fE = function(e, A) {
|
|
|
11203
11203
|
});
|
|
11204
11204
|
});
|
|
11205
11205
|
}, hE = function(e, A, r) {
|
|
11206
|
-
var t = A.ownerDocument, n = t.documentElement ? bt(e, getComputedStyle(t.documentElement).backgroundColor) :
|
|
11206
|
+
var t = A.ownerDocument, n = t.documentElement ? bt(e, getComputedStyle(t.documentElement).backgroundColor) : ce.TRANSPARENT, a = t.body ? bt(e, getComputedStyle(t.body).backgroundColor) : ce.TRANSPARENT, o = typeof r == "string" ? bt(e, r) : r === null ? ce.TRANSPARENT : 4294967295;
|
|
11207
11207
|
return A === t.documentElement ? me(n) ? me(a) ? o : a : n : o;
|
|
11208
11208
|
};
|
|
11209
11209
|
const UE = { class: "label-designer" }, gE = { class: "toolbar" }, QE = { class: "center-container" }, FE = { class: "center-toolbar" }, pE = { class: "zoom-controls" }, wE = ["disabled"], EE = ["disabled"], CE = { class: "canvas-container" }, mE = { class: "ruler-horizontal" }, vE = { class: "ruler-vertical" }, RE = {
|
|
@@ -11269,7 +11269,7 @@ const UE = { class: "label-designer" }, gE = { class: "toolbar" }, QE = { class:
|
|
|
11269
11269
|
u.value = !0;
|
|
11270
11270
|
},
|
|
11271
11271
|
onStopDrag: () => {
|
|
11272
|
-
u.value = !1,
|
|
11272
|
+
u.value = !1, ge(() => {
|
|
11273
11273
|
c.value = !1;
|
|
11274
11274
|
});
|
|
11275
11275
|
}
|
|
@@ -11356,7 +11356,7 @@ const UE = { class: "label-designer" }, gE = { class: "toolbar" }, QE = { class:
|
|
|
11356
11356
|
return document.body.removeChild(E), F;
|
|
11357
11357
|
}
|
|
11358
11358
|
const I = 1 / Z(), q = () => {
|
|
11359
|
-
|
|
11359
|
+
ge(() => {
|
|
11360
11360
|
const E = document.querySelector(".canvas-container");
|
|
11361
11361
|
if (!E || !l.value || !s.value)
|
|
11362
11362
|
return;
|
|
@@ -11499,20 +11499,20 @@ const UE = { class: "label-designer" }, gE = { class: "toolbar" }, QE = { class:
|
|
|
11499
11499
|
const Y = f.value.filter((b) => b.id !== E);
|
|
11500
11500
|
f.value = Y;
|
|
11501
11501
|
}
|
|
11502
|
-
|
|
11502
|
+
ge(() => {
|
|
11503
11503
|
});
|
|
11504
11504
|
}, TA = (E) => {
|
|
11505
11505
|
var k;
|
|
11506
11506
|
const F = document.activeElement.tagName.toLowerCase();
|
|
11507
11507
|
F === "input" || F === "textarea" || (E.key === "Delete" || E.key === "Backspace") && f.value.length > 0 && dA((k = U()) == null ? void 0 : k.id);
|
|
11508
11508
|
}, { handleMouseWheel: wA, handleInputChange: Te, adjustRotation: $t } = Dg(f, l, s), ye = () => {
|
|
11509
|
-
|
|
11509
|
+
setTimeout(() => {
|
|
11510
11510
|
const E = document.querySelector(".center-container");
|
|
11511
11511
|
if (!E)
|
|
11512
11512
|
return;
|
|
11513
11513
|
const F = E.getBoundingClientRect();
|
|
11514
11514
|
E.style.height = `calc(100vh - ${F == null ? void 0 : F.top}px)`, q();
|
|
11515
|
-
});
|
|
11515
|
+
}, 200);
|
|
11516
11516
|
};
|
|
11517
11517
|
HA(() => r.templateData, (E, F) => {
|
|
11518
11518
|
E !== F && (t.value = E || {}, a.value = (E == null ? void 0 : E.items) || [], ye());
|
|
@@ -11534,7 +11534,7 @@ const UE = { class: "label-designer" }, gE = { class: "toolbar" }, QE = { class:
|
|
|
11534
11534
|
return (E === "x" ? F : F & 3 | 8).toString(16);
|
|
11535
11535
|
});
|
|
11536
11536
|
}
|
|
11537
|
-
const
|
|
11537
|
+
const Be = () => Og(a, t.value), Rn = (E) => {
|
|
11538
11538
|
t.value.graphData = E || {}, tr();
|
|
11539
11539
|
}, tr = () => {
|
|
11540
11540
|
var F;
|
|
@@ -11563,7 +11563,7 @@ const UE = { class: "label-designer" }, gE = { class: "toolbar" }, QE = { class:
|
|
|
11563
11563
|
}));
|
|
11564
11564
|
return Promise.all(j);
|
|
11565
11565
|
};
|
|
11566
|
-
|
|
11566
|
+
ge(() => {
|
|
11567
11567
|
const b = document.querySelector("#design");
|
|
11568
11568
|
if (!b) {
|
|
11569
11569
|
J(), F(new Error("找不到要转换的DOM元素"));
|
|
@@ -11594,7 +11594,7 @@ const UE = { class: "label-designer" }, gE = { class: "toolbar" }, QE = { class:
|
|
|
11594
11594
|
J();
|
|
11595
11595
|
const R = j.toDataURL("image/png");
|
|
11596
11596
|
E({
|
|
11597
|
-
data:
|
|
11597
|
+
data: Be(),
|
|
11598
11598
|
image: R
|
|
11599
11599
|
});
|
|
11600
11600
|
}).catch((j) => {
|
|
@@ -11608,7 +11608,7 @@ const UE = { class: "label-designer" }, gE = { class: "toolbar" }, QE = { class:
|
|
|
11608
11608
|
});
|
|
11609
11609
|
return A({
|
|
11610
11610
|
// 获取JSON数据
|
|
11611
|
-
getJson: () =>
|
|
11611
|
+
getJson: () => Be(),
|
|
11612
11612
|
// 清空画布
|
|
11613
11613
|
clear: () => {
|
|
11614
11614
|
a.value = [], Q();
|
|
@@ -11921,7 +11921,7 @@ const UE = { class: "label-designer" }, gE = { class: "toolbar" }, QE = { class:
|
|
|
11921
11921
|
]);
|
|
11922
11922
|
};
|
|
11923
11923
|
}
|
|
11924
|
-
}, _E = /* @__PURE__ */ CA(PE, [["__scopeId", "data-v-
|
|
11924
|
+
}, _E = /* @__PURE__ */ CA(PE, [["__scopeId", "data-v-82147119"]]);
|
|
11925
11925
|
const qE = {
|
|
11926
11926
|
__name: "index",
|
|
11927
11927
|
props: {
|
|
@@ -11991,7 +11991,7 @@ const qE = {
|
|
|
11991
11991
|
window.removeEventListener("resize", u);
|
|
11992
11992
|
});
|
|
11993
11993
|
}), HA(() => t.value, (h) => {
|
|
11994
|
-
h &&
|
|
11994
|
+
h && ge(() => setTimeout(() => s(), 50));
|
|
11995
11995
|
}), HA(() => r.templateData, async (h) => {
|
|
11996
11996
|
t.value = (h == null ? void 0 : h.width) > 0 && (h == null ? void 0 : h.height) > 0;
|
|
11997
11997
|
}, { deep: !0, immediate: !0 });
|
|
@@ -37,4 +37,4 @@ Minimum version required to store current data is: `+a+`.
|
|
|
37
37
|
content: "" !important;
|
|
38
38
|
display: none !important;
|
|
39
39
|
}`,OF=function(e){DF(e,"."+qa+ZF+hs+`
|
|
40
|
-
.`+$a+WF+hs)},DF=function(e,A){var r=e.ownerDocument;if(r){var t=r.createElement("style");t.textContent=A,e.appendChild(t)}},gs=function(){function e(){}return e.getOrigin=function(A){var r=e._link;return r?(r.href=A,r.href=r.href,r.protocol+r.hostname+r.port):"about:blank"},e.isSameOrigin=function(A){return e.getOrigin(A)===e._origin},e.setContext=function(A){e._link=A.document.createElement("a"),e._origin=e.getOrigin(A.location.href)},e._origin="about:blank",e}(),JF=function(){function e(A,r){this.context=A,this._options=r,this._cache={}}return e.prototype.addImage=function(A){var r=Promise.resolve();return this.has(A)||(eo(A)||YF(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),r},e.prototype.match=function(A){return this._cache[A]},e.prototype.loadImage=function(A){return CA(this,void 0,void 0,function(){var r,t,n,a,o=this;return UA(this,function(l){switch(l.label){case 0:return r=gs.isSameOrigin(A),t=!Ao(A)&&this._options.useCORS===!0&&gA.SUPPORT_CORS_IMAGES&&!r,n=!Ao(A)&&!r&&!eo(A)&&typeof this._options.proxy=="string"&&gA.SUPPORT_CORS_XHR&&!t,!r&&this._options.allowTaint===!1&&!Ao(A)&&!eo(A)&&!n&&!t?[2]:(a=A,n?[4,this.proxy(a)]:[3,2]);case 1:a=l.sent(),l.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(s,c){var d=new Image;d.onload=function(){return s(d)},d.onerror=c,(zF(a)||t)&&(d.crossOrigin="anonymous"),d.src=a,d.complete===!0&&setTimeout(function(){return s(d)},500),o._options.imageTimeout>0&&setTimeout(function(){return c("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,l.sent()]}})})},e.prototype.has=function(A){return typeof this._cache[A]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(A){var r=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var n=A.substring(0,256);return new Promise(function(a,o){var l=gA.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(l==="text")a(s.response);else{var B=new FileReader;B.addEventListener("load",function(){return a(B.result)},!1),B.addEventListener("error",function(u){return o(u)},!1),B.readAsDataURL(s.response)}else o("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=o;var c=t.indexOf("?")>-1?"&":"?";if(s.open("GET",""+t+c+"url="+encodeURIComponent(A)+"&responseType="+l),l!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=l),r._options.imageTimeout){var d=r._options.imageTimeout;s.timeout=d,s.ontimeout=function(){return o("Timed out ("+d+"ms) proxying "+n)}}s.send()})},e}(),KF=/^data:image\/svg\+xml/i,LF=/^data:image\/.*;base64,/i,GF=/^data:image\/.*/i,YF=function(e){return gA.SUPPORT_SVG_DRAWING||!jF(e)},Ao=function(e){return GF.test(e)},zF=function(e){return LF.test(e)},eo=function(e){return e.substr(0,4)==="blob"},jF=function(e){return e.substr(-3).toLowerCase()==="svg"||KF.test(e)},N=function(){function e(A,r){this.type=0,this.x=A,this.y=r}return e.prototype.add=function(A,r){return new e(this.x+A,this.y+r)},e}(),je=function(e,A,r){return new N(e.x+(A.x-e.x)*r,e.y+(A.y-e.y)*r)},Kr=function(){function e(A,r,t,n){this.type=1,this.start=A,this.startControl=r,this.endControl=t,this.end=n}return e.prototype.subdivide=function(A,r){var t=je(this.start,this.startControl,A),n=je(this.startControl,this.endControl,A),a=je(this.endControl,this.end,A),o=je(t,n,A),l=je(n,a,A),s=je(o,l,A);return r?new e(this.start,t,o,s):new e(s,l,a,this.end)},e.prototype.add=function(A,r){return new e(this.start.add(A,r),this.startControl.add(A,r),this.endControl.add(A,r),this.end.add(A,r))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),HA=function(e){return e.type===1},XF=function(){function e(A){var r=A.styles,t=A.bounds,n=Ct(r.borderTopLeftRadius,t.width,t.height),a=n[0],o=n[1],l=Ct(r.borderTopRightRadius,t.width,t.height),s=l[0],c=l[1],d=Ct(r.borderBottomRightRadius,t.width,t.height),B=d[0],u=d[1],f=Ct(r.borderBottomLeftRadius,t.width,t.height),g=f[0],h=f[1],w=[];w.push((a+s)/t.width),w.push((g+B)/t.width),w.push((o+h)/t.height),w.push((c+u)/t.height);var U=Math.max.apply(Math,w);U>1&&(a/=U,o/=U,s/=U,c/=U,B/=U,u/=U,g/=U,h/=U);var Q=t.width-s,E=t.height-u,m=t.width-B,y=t.height-h,p=r.borderTopWidth,V=r.borderRightWidth,S=r.borderBottomWidth,T=r.borderLeftWidth,H=eA(r.paddingTop,A.bounds.width),b=eA(r.paddingRight,A.bounds.width),k=eA(r.paddingBottom,A.bounds.width),I=eA(r.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||o>0?rA(t.left+T/3,t.top+p/3,a-T/3,o-p/3,j.TOP_LEFT):new N(t.left+T/3,t.top+p/3),this.topRightBorderDoubleOuterBox=a>0||o>0?rA(t.left+Q,t.top+p/3,s-V/3,c-p/3,j.TOP_RIGHT):new N(t.left+t.width-V/3,t.top+p/3),this.bottomRightBorderDoubleOuterBox=B>0||u>0?rA(t.left+m,t.top+E,B-V/3,u-S/3,j.BOTTOM_RIGHT):new N(t.left+t.width-V/3,t.top+t.height-S/3),this.bottomLeftBorderDoubleOuterBox=g>0||h>0?rA(t.left+T/3,t.top+y,g-T/3,h-S/3,j.BOTTOM_LEFT):new N(t.left+T/3,t.top+t.height-S/3),this.topLeftBorderDoubleInnerBox=a>0||o>0?rA(t.left+T*2/3,t.top+p*2/3,a-T*2/3,o-p*2/3,j.TOP_LEFT):new N(t.left+T*2/3,t.top+p*2/3),this.topRightBorderDoubleInnerBox=a>0||o>0?rA(t.left+Q,t.top+p*2/3,s-V*2/3,c-p*2/3,j.TOP_RIGHT):new N(t.left+t.width-V*2/3,t.top+p*2/3),this.bottomRightBorderDoubleInnerBox=B>0||u>0?rA(t.left+m,t.top+E,B-V*2/3,u-S*2/3,j.BOTTOM_RIGHT):new N(t.left+t.width-V*2/3,t.top+t.height-S*2/3),this.bottomLeftBorderDoubleInnerBox=g>0||h>0?rA(t.left+T*2/3,t.top+y,g-T*2/3,h-S*2/3,j.BOTTOM_LEFT):new N(t.left+T*2/3,t.top+t.height-S*2/3),this.topLeftBorderStroke=a>0||o>0?rA(t.left+T/2,t.top+p/2,a-T/2,o-p/2,j.TOP_LEFT):new N(t.left+T/2,t.top+p/2),this.topRightBorderStroke=a>0||o>0?rA(t.left+Q,t.top+p/2,s-V/2,c-p/2,j.TOP_RIGHT):new N(t.left+t.width-V/2,t.top+p/2),this.bottomRightBorderStroke=B>0||u>0?rA(t.left+m,t.top+E,B-V/2,u-S/2,j.BOTTOM_RIGHT):new N(t.left+t.width-V/2,t.top+t.height-S/2),this.bottomLeftBorderStroke=g>0||h>0?rA(t.left+T/2,t.top+y,g-T/2,h-S/2,j.BOTTOM_LEFT):new N(t.left+T/2,t.top+t.height-S/2),this.topLeftBorderBox=a>0||o>0?rA(t.left,t.top,a,o,j.TOP_LEFT):new N(t.left,t.top),this.topRightBorderBox=s>0||c>0?rA(t.left+Q,t.top,s,c,j.TOP_RIGHT):new N(t.left+t.width,t.top),this.bottomRightBorderBox=B>0||u>0?rA(t.left+m,t.top+E,B,u,j.BOTTOM_RIGHT):new N(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=g>0||h>0?rA(t.left,t.top+y,g,h,j.BOTTOM_LEFT):new N(t.left,t.top+t.height),this.topLeftPaddingBox=a>0||o>0?rA(t.left+T,t.top+p,Math.max(0,a-T),Math.max(0,o-p),j.TOP_LEFT):new N(t.left+T,t.top+p),this.topRightPaddingBox=s>0||c>0?rA(t.left+Math.min(Q,t.width-V),t.top+p,Q>t.width+V?0:Math.max(0,s-V),Math.max(0,c-p),j.TOP_RIGHT):new N(t.left+t.width-V,t.top+p),this.bottomRightPaddingBox=B>0||u>0?rA(t.left+Math.min(m,t.width-T),t.top+Math.min(E,t.height-S),Math.max(0,B-V),Math.max(0,u-S),j.BOTTOM_RIGHT):new N(t.left+t.width-V,t.top+t.height-S),this.bottomLeftPaddingBox=g>0||h>0?rA(t.left+T,t.top+Math.min(y,t.height-S),Math.max(0,g-T),Math.max(0,h-S),j.BOTTOM_LEFT):new N(t.left+T,t.top+t.height-S),this.topLeftContentBox=a>0||o>0?rA(t.left+T+I,t.top+p+H,Math.max(0,a-(T+I)),Math.max(0,o-(p+H)),j.TOP_LEFT):new N(t.left+T+I,t.top+p+H),this.topRightContentBox=s>0||c>0?rA(t.left+Math.min(Q,t.width+T+I),t.top+p+H,Q>t.width+T+I?0:s-T+I,c-(p+H),j.TOP_RIGHT):new N(t.left+t.width-(V+b),t.top+p+H),this.bottomRightContentBox=B>0||u>0?rA(t.left+Math.min(m,t.width-(T+I)),t.top+Math.min(E,t.height+p+H),Math.max(0,B-(V+b)),u-(S+k),j.BOTTOM_RIGHT):new N(t.left+t.width-(V+b),t.top+t.height-(S+k)),this.bottomLeftContentBox=g>0||h>0?rA(t.left+T+I,t.top+y,Math.max(0,g-(T+I)),h-(S+k),j.BOTTOM_LEFT):new N(t.left+T+I,t.top+t.height-(S+k))}return e}(),j;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(j||(j={}));var rA=function(e,A,r,t,n){var a=4*((Math.sqrt(2)-1)/3),o=r*a,l=t*a,s=e+r,c=A+t;switch(n){case j.TOP_LEFT:return new Kr(new N(e,c),new N(e,c-l),new N(s-o,A),new N(s,A));case j.TOP_RIGHT:return new Kr(new N(e,A),new N(e+o,A),new N(s,c-l),new N(s,c));case j.BOTTOM_RIGHT:return new Kr(new N(s,A),new N(s,A+l),new N(e+o,c),new N(e,c));case j.BOTTOM_LEFT:default:return new Kr(new N(s,c),new N(s-o,c),new N(e,A+l),new N(e,A))}},Lr=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},PF=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},Gr=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},_F=function(){function e(A,r,t){this.offsetX=A,this.offsetY=r,this.matrix=t,this.type=0,this.target=6}return e}(),Yr=function(){function e(A,r){this.path=A,this.target=r,this.type=1}return e}(),qF=function(){function e(A){this.opacity=A,this.type=2,this.target=6}return e}(),$F=function(e){return e.type===0},Us=function(e){return e.type===1},Aw=function(e){return e.type===2},ps=function(e,A){return e.length===A.length?e.some(function(r,t){return r===A[t]}):!1},ew=function(e,A,r,t,n){return e.map(function(a,o){switch(o){case 0:return a.add(A,r);case 1:return a.add(A+t,r);case 2:return a.add(A+t,r+n);case 3:return a.add(A,r+n)}return a})},Qs=function(){function e(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),Fs=function(){function e(A,r){if(this.container=A,this.parent=r,this.effects=[],this.curves=new XF(this.container),this.container.styles.opacity<1&&this.effects.push(new qF(this.container.styles.opacity)),this.container.styles.transform!==null){var t=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 _F(t,n,a))}if(this.container.styles.overflowX!==0){var o=Lr(this.curves),l=Gr(this.curves);ps(o,l)?this.effects.push(new Yr(o,6)):(this.effects.push(new Yr(o,2)),this.effects.push(new Yr(l,4)))}}return e.prototype.getEffects=function(A){for(var r=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,n=this.effects.slice(0);t;){var a=t.effects.filter(function(s){return!Us(s)});if(r||t.container.styles.position!==0||!t.parent){if(n.unshift.apply(n,a),r=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var o=Lr(t.curves),l=Gr(t.curves);ps(o,l)||n.unshift(new Yr(l,6))}}else n.unshift.apply(n,a);t=t.parent}return n.filter(function(s){return cA(s.target,A)})},e}(),to=function(e,A,r,t){e.container.elements.forEach(function(n){var a=cA(n.flags,4),o=cA(n.flags,2),l=new Fs(n,e);cA(n.styles.display,2048)&&t.push(l);var s=cA(n.flags,8)?[]:t;if(a||o){var c=a||n.styles.isPositioned()?r:A,d=new Qs(l);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var B=n.styles.zIndex.order;if(B<0){var u=0;c.negativeZIndex.some(function(g,h){return B>g.element.container.styles.zIndex.order?(u=h,!1):u>0}),c.negativeZIndex.splice(u,0,d)}else if(B>0){var f=0;c.positiveZIndex.some(function(g,h){return B>=g.element.container.styles.zIndex.order?(f=h+1,!1):f>0}),c.positiveZIndex.splice(f,0,d)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else n.styles.isFloating()?c.nonPositionedFloats.push(d):c.nonPositionedInlineLevel.push(d);to(l,d,a?d:r,s)}else n.styles.isInlineLevel()?A.inlineLevel.push(l):A.nonInlineLevel.push(l),to(l,A,r,s);cA(n.flags,8)&&ws(n,s)})},ws=function(e,A){for(var r=e instanceof Ga?e.start:1,t=e instanceof Ga?e.reversed:!1,n=0;n<A.length;n++){var a=A[n];a.container instanceof Yl&&typeof a.container.value=="number"&&a.container.value!==0&&(r=a.container.value),a.listValue=Nt(r,a.container.styles.listStyleType,!0),r+=t?-1:1}},tw=function(e){var A=new Fs(e,null),r=new Qs(A),t=[];return to(A,r,r,t),ws(A.container,t),r},Es=function(e,A){switch(A){case 0:return bA(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return bA(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return bA(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return bA(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},rw=function(e,A){switch(A){case 0:return bA(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return bA(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return bA(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return bA(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},nw=function(e,A){switch(A){case 0:return bA(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return bA(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return bA(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return bA(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},aw=function(e,A){switch(A){case 0:return zr(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return zr(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return zr(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return zr(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},zr=function(e,A){var r=[];return HA(e)?r.push(e.subdivide(.5,!1)):r.push(e),HA(A)?r.push(A.subdivide(.5,!0)):r.push(A),r},bA=function(e,A,r,t){var n=[];return HA(e)?n.push(e.subdivide(.5,!1)):n.push(e),HA(r)?n.push(r.subdivide(.5,!0)):n.push(r),HA(t)?n.push(t.subdivide(.5,!0).reverse()):n.push(t),HA(A)?n.push(A.subdivide(.5,!1).reverse()):n.push(A),n},Cs=function(e){var A=e.bounds,r=e.styles;return A.add(r.borderLeftWidth,r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth),-(r.borderTopWidth+r.borderBottomWidth))},jr=function(e){var A=e.styles,r=e.bounds,t=eA(A.paddingLeft,r.width),n=eA(A.paddingRight,r.width),a=eA(A.paddingTop,r.width),o=eA(A.paddingBottom,r.width);return r.add(t+A.borderLeftWidth,a+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+t+n),-(A.borderTopWidth+A.borderBottomWidth+a+o))},ow=function(e,A){return e===0?A.bounds:e===2?jr(A):Cs(A)},iw=function(e,A){return e===0?A.bounds:e===2?jr(A):Cs(A)},ro=function(e,A,r){var t=ow(Pe(e.styles.backgroundOrigin,A),e),n=iw(Pe(e.styles.backgroundClip,A),e),a=lw(Pe(e.styles.backgroundSize,A),r,t),o=a[0],l=a[1],s=Ct(Pe(e.styles.backgroundPosition,A),t.width-o,t.height-l),c=sw(Pe(e.styles.backgroundRepeat,A),s,a,t,n),d=Math.round(t.left+s[0]),B=Math.round(t.top+s[1]);return[c,d,B,o,l]},Xe=function(e){return _(e)&&e.value===Le.AUTO},Xr=function(e){return typeof e=="number"},lw=function(e,A,r){var t=A[0],n=A[1],a=A[2],o=e[0],l=e[1];if(!o)return[0,0];if(lA(o)&&l&&lA(l))return[eA(o,r.width),eA(l,r.height)];var s=Xr(a);if(_(o)&&(o.value===Le.CONTAIN||o.value===Le.COVER)){if(Xr(a)){var c=r.width/r.height;return c<a!=(o.value===Le.COVER)?[r.width,r.width/a]:[r.height*a,r.height]}return[r.width,r.height]}var d=Xr(t),B=Xr(n),u=d||B;if(Xe(o)&&(!l||Xe(l))){if(d&&B)return[t,n];if(!s&&!u)return[r.width,r.height];if(u&&s){var f=d?t:n*a,g=B?n:t/a;return[f,g]}var h=d?t:r.width,w=B?n:r.height;return[h,w]}if(s){var U=0,Q=0;return lA(o)?U=eA(o,r.width):lA(l)&&(Q=eA(l,r.height)),Xe(o)?U=Q*a:(!l||Xe(l))&&(Q=U/a),[U,Q]}var E=null,m=null;if(lA(o)?E=eA(o,r.width):l&&lA(l)&&(m=eA(l,r.height)),E!==null&&(!l||Xe(l))&&(m=d&&B?E/t*n:r.height),m!==null&&Xe(o)&&(E=d&&B?m/n*t:r.width),E!==null&&m!==null)return[E,m];throw new Error("Unable to calculate background-size for element")},Pe=function(e,A){var r=e[A];return typeof r>"u"?e[0]:r},sw=function(e,A,r,t,n){var a=A[0],o=A[1],l=r[0],s=r[1];switch(e){case 2:return[new N(Math.round(t.left),Math.round(t.top+o)),new N(Math.round(t.left+t.width),Math.round(t.top+o)),new N(Math.round(t.left+t.width),Math.round(s+t.top+o)),new N(Math.round(t.left),Math.round(s+t.top+o))];case 3:return[new N(Math.round(t.left+a),Math.round(t.top)),new N(Math.round(t.left+a+l),Math.round(t.top)),new N(Math.round(t.left+a+l),Math.round(t.height+t.top)),new N(Math.round(t.left+a),Math.round(t.height+t.top))];case 1:return[new N(Math.round(t.left+a),Math.round(t.top+o)),new N(Math.round(t.left+a+l),Math.round(t.top+o)),new N(Math.round(t.left+a+l),Math.round(t.top+o+s)),new N(Math.round(t.left+a),Math.round(t.top+o+s))];default:return[new N(Math.round(n.left),Math.round(n.top)),new N(Math.round(n.left+n.width),Math.round(n.top)),new N(Math.round(n.left+n.width),Math.round(n.height+n.top)),new N(Math.round(n.left),Math.round(n.height+n.top))]}},cw="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",ms="Hidden Text",Bw=function(){function e(A){this._data={},this._document=A}return e.prototype.parseMetrics=function(A,r){var t=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),o=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=r,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",o.appendChild(t),n.src=cw,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=A,a.style.fontSize=r,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(ms)),t.appendChild(a),t.appendChild(n);var l=n.offsetTop-a.offsetTop+2;t.removeChild(a),t.appendChild(this._document.createTextNode(ms)),t.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-t.offsetTop+2;return o.removeChild(t),{baseline:l,middle:s}},e.prototype.getMetrics=function(A,r){var t=A+" "+r;return typeof this._data[t]>"u"&&(this._data[t]=this.parseMetrics(A,r)),this._data[t]},e}(),Vs=function(){function e(A,r){this.context=A,this.options=r}return e}(),dw=1e4,uw=function(e){kA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n._activeEffects=[],n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),t.canvas||(n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px"),n.fontMetrics=new Bw(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),n}return A.prototype.applyEffects=function(r){for(var t=this;this._activeEffects.length;)this.popEffect();r.forEach(function(n){return t.applyEffect(n)})},A.prototype.applyEffect=function(r){this.ctx.save(),Aw(r)&&(this.ctx.globalAlpha=r.opacity),$F(r)&&(this.ctx.translate(r.offsetX,r.offsetY),this.ctx.transform(r.matrix[0],r.matrix[1],r.matrix[2],r.matrix[3],r.matrix[4],r.matrix[5]),this.ctx.translate(-r.offsetX,-r.offsetY)),Us(r)&&(this.path(r.path),this.ctx.clip()),this._activeEffects.push(r)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(r){return CA(this,void 0,void 0,function(){var t;return UA(this,function(n){switch(n.label){case 0:return t=r.element.container.styles,t.isVisible()?[4,this.renderStackContent(r)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(r){return CA(this,void 0,void 0,function(){return UA(this,function(t){switch(t.label){case 0:if(cA(r.container.flags,16))debugger;return r.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(r)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(r)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(r,t,n){var a=this;if(t===0)this.ctx.fillText(r.text,r.bounds.left,r.bounds.top+n);else{var o=La(r.text);o.reduce(function(l,s){return a.ctx.fillText(s,l,r.bounds.top+n),l+a.ctx.measureText(s).width},r.bounds.left)}},A.prototype.createFontStyle=function(r){var t=r.fontVariant.filter(function(o){return o==="normal"||o==="small-caps"}).join(""),n=pw(r.fontFamily).join(", "),a=Et(r.fontSize)?""+r.fontSize.number+r.fontSize.unit:r.fontSize.number+"px";return[[r.fontStyle,t,r.fontWeight,a,n].join(" "),n,a]},A.prototype.renderTextNode=function(r,t){return CA(this,void 0,void 0,function(){var n,a,o,l,s,c,d,B,u=this;return UA(this,function(f){return n=this.createFontStyle(t),a=n[0],o=n[1],l=n[2],this.ctx.font=a,this.ctx.direction=t.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(o,l),c=s.baseline,d=s.middle,B=t.paintOrder,r.textBounds.forEach(function(g){B.forEach(function(h){switch(h){case 0:u.ctx.fillStyle=dA(t.color),u.renderTextWithLetterSpacing(g,t.letterSpacing,c);var w=t.textShadow;w.length&&g.text.trim().length&&(w.slice(0).reverse().forEach(function(U){u.ctx.shadowColor=dA(U.color),u.ctx.shadowOffsetX=U.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=U.offsetY.number*u.options.scale,u.ctx.shadowBlur=U.blur.number,u.renderTextWithLetterSpacing(g,t.letterSpacing,c)}),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=dA(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(U){switch(U){case 1:u.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top+c),g.bounds.width,1);break;case 2:u.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top),g.bounds.width,1);break;case 3:u.ctx.fillRect(g.bounds.left,Math.ceil(g.bounds.top+d),g.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&g.text.trim().length&&(u.ctx.strokeStyle=dA(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(g.text,g.bounds.left,g.bounds.top+c)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(r,t,n){if(n&&r.intrinsicWidth>0&&r.intrinsicHeight>0){var a=jr(r),o=Gr(t);this.path(o),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,r.intrinsicWidth,r.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(r){return CA(this,void 0,void 0,function(){var t,n,a,o,l,s,Q,Q,c,d,B,u,m,f,g,y,h,w,U,Q,E,m,y;return UA(this,function(p){switch(p.label){case 0:this.applyEffects(r.getEffects(4)),t=r.container,n=r.curves,a=t.styles,o=0,l=t.textNodes,p.label=1;case 1:return o<l.length?(s=l[o],[4,this.renderTextNode(s,a)]):[3,4];case 2:p.sent(),p.label=3;case 3:return o++,[3,1];case 4:if(!(t instanceof Kl))return[3,8];p.label=5;case 5:return p.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return Q=p.sent(),this.renderReplacedElement(t,n,Q),[3,8];case 7:return p.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof Ll&&this.renderReplacedElement(t,n,t.canvas),!(t instanceof Gl))return[3,12];p.label=9;case 9:return p.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return Q=p.sent(),this.renderReplacedElement(t,n,Q),[3,12];case 11:return p.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof Pl&&t.tree?(c=new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,c.render(t.tree)]):[3,14];case 13:d=p.sent(),t.width&&t.height&&this.ctx.drawImage(d,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),p.label=14;case 14:if(t instanceof Ya&&(B=Math.min(t.bounds.width,t.bounds.height),t.type===kr?t.checked&&(this.ctx.save(),this.path([new N(t.bounds.left+B*.39363,t.bounds.top+B*.79),new N(t.bounds.left+B*.16,t.bounds.top+B*.5549),new N(t.bounds.left+B*.27347,t.bounds.top+B*.44071),new N(t.bounds.left+B*.39694,t.bounds.top+B*.5649),new N(t.bounds.left+B*.72983,t.bounds.top+B*.23),new N(t.bounds.left+B*.84,t.bounds.top+B*.34085),new N(t.bounds.left+B*.39363,t.bounds.top+B*.79)]),this.ctx.fillStyle=dA(zl),this.ctx.fill(),this.ctx.restore()):t.type===Zr&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+B/2,t.bounds.top+B/2,B/4,0,Math.PI*2,!0),this.ctx.fillStyle=dA(zl),this.ctx.fill(),this.ctx.restore())),fw(t)&&t.value.length){switch(u=this.createFontStyle(a),m=u[0],f=u[1],g=this.fontMetrics.getMetrics(m,f).baseline,this.ctx.font=m,this.ctx.fillStyle=dA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=gw(t.styles.textAlign),y=jr(t),h=0,t.styles.textAlign){case 1:h+=y.width/2;break;case 2:h+=y.width;break}w=y.add(h,0,0,-y.height/2+1),this.ctx.save(),this.path([new N(y.left,y.top),new N(y.left+y.width,y.top),new N(y.left+y.width,y.top+y.height),new N(y.left,y.top+y.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new yt(t.value,w),a.letterSpacing,g),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!cA(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if(U=t.styles.listStyleImage,U.type!==0)return[3,18];Q=void 0,E=U.url,p.label=15;case 15:return p.trys.push([15,17,,18]),[4,this.context.cache.match(E)];case 16:return Q=p.sent(),this.ctx.drawImage(Q,t.bounds.left-(Q.width+10),t.bounds.top),[3,18];case 17:return p.sent(),this.context.logger.error("Error loading list-style-image "+E),[3,18];case 18:return[3,20];case 19:r.listValue&&t.styles.listStyleType!==-1&&(m=this.createFontStyle(a)[0],this.ctx.font=m,this.ctx.fillStyle=dA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",y=new zA(t.bounds.left,t.bounds.top+eA(t.styles.paddingTop,t.bounds.width),t.bounds.width,ml(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new yt(r.listValue,y),a.letterSpacing,ml(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),p.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(r){return CA(this,void 0,void 0,function(){var t,n,U,a,o,U,l,s,U,c,d,U,B,u,U,f,g,U,h,w,U;return UA(this,function(Q){switch(Q.label){case 0:if(cA(r.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(r.element)];case 1:Q.sent(),t=0,n=r.negativeZIndex,Q.label=2;case 2:return t<n.length?(U=n[t],[4,this.renderStack(U)]):[3,5];case 3:Q.sent(),Q.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(r.element)];case 6:Q.sent(),a=0,o=r.nonInlineLevel,Q.label=7;case 7:return a<o.length?(U=o[a],[4,this.renderNode(U)]):[3,10];case 8:Q.sent(),Q.label=9;case 9:return a++,[3,7];case 10:l=0,s=r.nonPositionedFloats,Q.label=11;case 11:return l<s.length?(U=s[l],[4,this.renderStack(U)]):[3,14];case 12:Q.sent(),Q.label=13;case 13:return l++,[3,11];case 14:c=0,d=r.nonPositionedInlineLevel,Q.label=15;case 15:return c<d.length?(U=d[c],[4,this.renderStack(U)]):[3,18];case 16:Q.sent(),Q.label=17;case 17:return c++,[3,15];case 18:B=0,u=r.inlineLevel,Q.label=19;case 19:return B<u.length?(U=u[B],[4,this.renderNode(U)]):[3,22];case 20:Q.sent(),Q.label=21;case 21:return B++,[3,19];case 22:f=0,g=r.zeroOrAutoZIndexOrTransformedOrOpacity,Q.label=23;case 23:return f<g.length?(U=g[f],[4,this.renderStack(U)]):[3,26];case 24:Q.sent(),Q.label=25;case 25:return f++,[3,23];case 26:h=0,w=r.positiveZIndex,Q.label=27;case 27:return h<w.length?(U=w[h],[4,this.renderStack(U)]):[3,30];case 28:Q.sent(),Q.label=29;case 29:return h++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(r){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(r.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(r){this.ctx.beginPath(),this.formatPath(r),this.ctx.closePath()},A.prototype.formatPath=function(r){var t=this;r.forEach(function(n,a){var o=HA(n)?n.start:n;a===0?t.ctx.moveTo(o.x,o.y):t.ctx.lineTo(o.x,o.y),HA(n)&&t.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},A.prototype.renderRepeat=function(r,t,n,a){this.path(r),this.ctx.fillStyle=t,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},A.prototype.resizeImage=function(r,t,n){var a;if(r.width===t&&r.height===n)return r;var o=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,l=o.createElement("canvas");l.width=Math.max(1,t),l.height=Math.max(1,n);var s=l.getContext("2d");return s.drawImage(r,0,0,r.width,r.height,0,0,t,n),l},A.prototype.renderBackgroundImage=function(r){return CA(this,void 0,void 0,function(){var t,n,a,o,l,s;return UA(this,function(c){switch(c.label){case 0:t=r.styles.backgroundImage.length-1,n=function(d){var B,u,f,H,W,L,I,Y,S,g,H,W,L,I,Y,h,w,U,Q,E,m,y,p,V,S,T,H,b,k,I,Y,q,W,L,X,$,uA,P,K,O,QA,sA;return UA(this,function(iA){switch(iA.label){case 0:if(d.type!==0)return[3,5];B=void 0,u=d.url,iA.label=1;case 1:return iA.trys.push([1,3,,4]),[4,a.context.cache.match(u)];case 2:return B=iA.sent(),[3,4];case 3:return iA.sent(),a.context.logger.error("Error loading background-image "+u),[3,4];case 4:return B&&(f=ro(r,t,[B.width,B.height,B.width/B.height]),H=f[0],W=f[1],L=f[2],I=f[3],Y=f[4],S=a.ctx.createPattern(a.resizeImage(B,I,Y),"repeat"),a.renderRepeat(H,S,W,L)),[3,6];case 5:$p(d)?(g=ro(r,t,[null,null,null]),H=g[0],W=g[1],L=g[2],I=g[3],Y=g[4],h=jp(d.angle,I,Y),w=h[0],U=h[1],Q=h[2],E=h[3],m=h[4],y=document.createElement("canvas"),y.width=I,y.height=Y,p=y.getContext("2d"),V=p.createLinearGradient(U,E,Q,m),ul(d.stops,w).forEach(function(nA){return V.addColorStop(nA.stop,dA(nA.color))}),p.fillStyle=V,p.fillRect(0,0,I,Y),I>0&&Y>0&&(S=a.ctx.createPattern(y,"repeat"),a.renderRepeat(H,S,W,L))):AQ(d)&&(T=ro(r,t,[null,null,null]),H=T[0],b=T[1],k=T[2],I=T[3],Y=T[4],q=d.position.length===0?[Na]:d.position,W=eA(q[0],I),L=eA(q[q.length-1],Y),X=Xp(d,W,L,I,Y),$=X[0],uA=X[1],$>0&&uA>0&&(P=a.ctx.createRadialGradient(b+W,k+L,0,b+W,k+L,$),ul(d.stops,$*2).forEach(function(nA){return P.addColorStop(nA.stop,dA(nA.color))}),a.path(H),a.ctx.fillStyle=P,$!==uA?(K=r.bounds.left+.5*r.bounds.width,O=r.bounds.top+.5*r.bounds.height,QA=uA/$,sA=1/QA,a.ctx.save(),a.ctx.translate(K,O),a.ctx.transform(1,0,0,QA,0,0),a.ctx.translate(-K,-O),a.ctx.fillRect(b,sA*(k-O)+O,I,Y*sA),a.ctx.restore()):a.ctx.fill())),iA.label=6;case 6:return t--,[2]}})},a=this,o=0,l=r.styles.backgroundImage.slice(0).reverse(),c.label=1;case 1:return o<l.length?(s=l[o],[5,n(s)]):[3,4];case 2:c.sent(),c.label=3;case 3:return o++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(r,t,n){return CA(this,void 0,void 0,function(){return UA(this,function(a){return this.path(Es(n,t)),this.ctx.fillStyle=dA(r),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(r,t,n,a){return CA(this,void 0,void 0,function(){var o,l;return UA(this,function(s){switch(s.label){case 0:return t<3?[4,this.renderSolidBorder(r,n,a)]:[3,2];case 1:return s.sent(),[2];case 2:return o=rw(a,n),this.path(o),this.ctx.fillStyle=dA(r),this.ctx.fill(),l=nw(a,n),this.path(l),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(r){return CA(this,void 0,void 0,function(){var t,n,a,o,l,s,c,d,B=this;return UA(this,function(u){switch(u.label){case 0:return this.applyEffects(r.getEffects(2)),t=r.container.styles,n=!oe(t.backgroundColor)||t.backgroundImage.length,a=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],o=hw(Pe(t.backgroundClip,0),r.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),oe(t.backgroundColor)||(this.ctx.fillStyle=dA(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(r.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(f){B.ctx.save();var g=Lr(r.curves),h=f.inset?0:dw,w=ew(g,-h+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(B.path(g),B.ctx.clip(),B.mask(w)):(B.mask(g),B.ctx.clip(),B.path(w)),B.ctx.shadowOffsetX=f.offsetX.number+h,B.ctx.shadowOffsetY=f.offsetY.number,B.ctx.shadowColor=dA(f.color),B.ctx.shadowBlur=f.blur.number,B.ctx.fillStyle=f.inset?dA(f.color):"rgba(0,0,0,1)",B.ctx.fill(),B.ctx.restore()}),u.label=2;case 2:l=0,s=0,c=a,u.label=3;case 3:return s<c.length?(d=c[s],d.style!==0&&!oe(d.color)&&d.width>0?d.style!==2?[3,5]:[4,this.renderDashedDottedBorder(d.color,d.width,l,r.curves,2)]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return d.style!==3?[3,7]:[4,this.renderDashedDottedBorder(d.color,d.width,l,r.curves,3)];case 6:return u.sent(),[3,11];case 7:return d.style!==4?[3,9]:[4,this.renderDoubleBorder(d.color,d.width,l,r.curves)];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(d.color,l,r.curves)];case 10:u.sent(),u.label=11;case 11:l++,u.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(r,t,n,a,o){return CA(this,void 0,void 0,function(){var l,s,c,d,B,u,f,g,h,w,U,Q,E,m,y,p,y,p;return UA(this,function(V){return this.ctx.save(),l=aw(a,n),s=Es(a,n),o===2&&(this.path(s),this.ctx.clip()),HA(s[0])?(c=s[0].start.x,d=s[0].start.y):(c=s[0].x,d=s[0].y),HA(s[1])?(B=s[1].end.x,u=s[1].end.y):(B=s[1].x,u=s[1].y),n===0||n===2?f=Math.abs(c-B):f=Math.abs(d-u),this.ctx.beginPath(),o===3?this.formatPath(l):this.formatPath(s.slice(0,2)),g=t<3?t*3:t*2,h=t<3?t*2:t,o===3&&(g=t,h=t),w=!0,f<=g*2?w=!1:f<=g*2+h?(U=f/(2*g+h),g*=U,h*=U):(Q=Math.floor((f+h)/(g+h)),E=(f-Q*g)/(Q-1),m=(f-(Q+1)*g)/Q,h=m<=0||Math.abs(h-E)<Math.abs(h-m)?E:m),w&&(o===3?this.ctx.setLineDash([0,g+h]):this.ctx.setLineDash([g,h])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=dA(r),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(HA(s[0])&&(y=s[3],p=s[0],this.ctx.beginPath(),this.formatPath([new N(y.end.x,y.end.y),new N(p.start.x,p.start.y)]),this.ctx.stroke()),HA(s[1])&&(y=s[1],p=s[2],this.ctx.beginPath(),this.formatPath([new N(y.end.x,y.end.y),new N(p.start.x,p.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(r){return CA(this,void 0,void 0,function(){var t;return UA(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=dA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=tw(r),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(Vs),fw=function(e){return e instanceof Xl||e instanceof jl?!0:e instanceof Ya&&e.type!==Zr&&e.type!==kr},hw=function(e,A){switch(e){case 0:return Lr(A);case 2:return PF(A);case 1:default:return Gr(A)}},gw=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Uw=["-apple-system","system-ui"],pw=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(A){return Uw.indexOf(A)===-1}):e},Qw=function(e){kA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=t,n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),n}return A.prototype.render=function(r){return CA(this,void 0,void 0,function(){var t,n;return UA(this,function(a){switch(a.label){case 0:return t=Ka(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,r),[4,Fw(t)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=dA(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]}})})},A}(Vs),Fw=function(e){return new Promise(function(A,r){var t=new Image;t.onload=function(){A(t)},t.onerror=r,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},ww=function(){function e(A){var r=A.id,t=A.enabled;this.id=r,this.enabled=t,this.start=Date.now()}return e.prototype.debug=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,rr([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,rr([this.id,this.getTime()+"ms"],A))},e.prototype.warn=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,rr([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.prototype.error=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,rr([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.instances={},e}(),Ew=function(){function e(A,r){var t;this.windowBounds=r,this.instanceName="#"+e.instanceCount++,this.logger=new ww({id:this.instanceName,enabled:A.logging}),this.cache=(t=A.cache)!==null&&t!==void 0?t:new JF(this,A)}return e.instanceCount=1,e}(),Cw=function(e,A){return A===void 0&&(A={}),mw(e,A)};typeof window<"u"&&gs.setContext(window);var mw=function(e,A){return CA(void 0,void 0,void 0,function(){var r,t,n,a,o,l,s,c,d,B,u,f,g,h,w,U,Q,E,m,y,V,p,V,S,T,H,b,k,I,Y,q,W,L,X,$,uA,P,K,O,QA;return UA(this,function(sA){switch(sA.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(r=e.ownerDocument,!r)throw new Error("Element is not attached to a Document");if(t=r.defaultView,!t)throw new Error("Document is not attached to a Window");return n={allowTaint:(S=A.allowTaint)!==null&&S!==void 0?S:!1,imageTimeout:(T=A.imageTimeout)!==null&&T!==void 0?T:15e3,proxy:A.proxy,useCORS:(H=A.useCORS)!==null&&H!==void 0?H:!1},a=la({logging:(b=A.logging)!==null&&b!==void 0?b:!0,cache:A.cache},n),o={windowWidth:(k=A.windowWidth)!==null&&k!==void 0?k:t.innerWidth,windowHeight:(I=A.windowHeight)!==null&&I!==void 0?I:t.innerHeight,scrollX:(Y=A.scrollX)!==null&&Y!==void 0?Y:t.pageXOffset,scrollY:(q=A.scrollY)!==null&&q!==void 0?q:t.pageYOffset},l=new zA(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),s=new Ew(a,l),c=(W=A.foreignObjectRendering)!==null&&W!==void 0?W:!1,d={allowTaint:(L=A.allowTaint)!==null&&L!==void 0?L:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:c,copyStyles:c},s.logger.debug("Starting document clone with size "+l.width+"x"+l.height+" scrolled to "+-l.left+","+-l.top),B=new fs(s,e,d),u=B.clonedReferenceElement,u?[4,B.toIFrame(r,l)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=sA.sent(),g=ja(u)||VF(u)?eU(u.ownerDocument):nr(s,u),h=g.width,w=g.height,U=g.left,Q=g.top,E=Vw(s,u,A.backgroundColor),m={canvas:A.canvas,backgroundColor:E,scale:($=(X=A.scale)!==null&&X!==void 0?X:t.devicePixelRatio)!==null&&$!==void 0?$:1,x:((uA=A.x)!==null&&uA!==void 0?uA:0)+U,y:((P=A.y)!==null&&P!==void 0?P:0)+Q,width:(K=A.width)!==null&&K!==void 0?K:Math.ceil(h),height:(O=A.height)!==null&&O!==void 0?O:Math.ceil(w)},c?(s.logger.debug("Document cloned, using foreign object rendering"),V=new Qw(s,m),[4,V.render(u)]):[3,3];case 2:return y=sA.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+U+","+Q+" with size "+h+"x"+w+" using computed rendering"),s.logger.debug("Starting DOM parsing"),p=ql(s,u),E===p.styles.backgroundColor&&(p.styles.backgroundColor=XA.TRANSPARENT),s.logger.debug("Starting renderer for element at "+m.x+","+m.y+" with size "+m.width+"x"+m.height),V=new uw(s,m),[4,V.render(p)];case 4:y=sA.sent(),sA.label=5;case 5:return(!((QA=A.removeContainer)!==null&&QA!==void 0)||QA)&&(fs.destroy(f)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,y]}})})},Vw=function(e,A,r){var t=A.ownerDocument,n=t.documentElement?mt(e,getComputedStyle(t.documentElement).backgroundColor):XA.TRANSPARENT,a=t.body?mt(e,getComputedStyle(t.body).backgroundColor):XA.TRANSPARENT,o=typeof r=="string"?mt(e,r):r===null?XA.TRANSPARENT:4294967295;return A===t.documentElement?oe(n)?oe(a)?o:a:n:o};const xE="",Rw={class:"label-designer"},yw={class:"toolbar"},Tw={class:"center-container"},Nw={class:"center-toolbar"},Iw={class:"zoom-controls"},vw=["disabled"],Sw=["disabled"],Mw={class:"canvas-container"},Hw={class:"ruler-horizontal"},bw={class:"ruler-vertical"},xw={key:0,class:"drag-extend-lines"},kw=["data-item-id","onMousedown","onClick"],Zw=["onMousedown"],Ww=["onMousedown"],Ow=["onMousedown"],Dw=["onMousedown"],Jw=["onMousedown"],Kw=["onMousedown"],Lw=["onMousedown"],Gw=["onClick"],Yw={class:"property-panel",tabindex:"0"},zw={class:"position-controls"},jw={class:"control-group"},Xw={class:"number-input"},Pw={class:"control-group"},_w={class:"number-input"},qw={key:0,class:"control-group"},$w={class:"number-input"},AE={key:1,class:"control-group"},eE={class:"number-input"},tE={class:"control-group"},rE={class:"number-input"},nE={key:2,class:"control-group"},aE={class:"switch-input"},oE=BA({__name:"panels",props:{templateData:{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"}},setup(e,{expose:A}){const r=e,t=i.ref({}),n=i.ref(0),a=i.ref([]),o=i.ref(1);let l=1;const s=i.computed(()=>{var C;return((C=t.value)==null?void 0:C.printWidth)||0}),c=i.computed(()=>{var C;return((C=t.value)==null?void 0:C.printHeight)||0});i.ref(!1);const d=i.ref(!1),B=i.ref(!1),u=i.ref(new Map),f=i.ref(new Map),g=new Map(wi.map(C=>[C.type,C])),{selectedItems:h,selectItem:w,getCurrentSelected:U,clearSelection:Q}=jg(),{dragging:E,dragItem:m,startDrag:y}=Yg({scale:o,canvasWidth:s,canvasHeight:c,selectItem:w,onStartDrag:()=>{d.value=!0},onStopDrag:()=>{d.value=!1,i.nextTick(()=>{B.value=!1})}}),{startResize:p}=zg(s,c,o,h),{startRotate:V}=Xg();i.watch(()=>h.value,()=>{u.value.clear()},{deep:!0});const S=C=>{const F=`${C.id}_${C.props.x.toFixed(1)}_${C.props.y.toFixed(1)}_${C.props.width}_${C.props.height}_${C.props.rotation}`;if(f.value.has(F))return f.value.get(F);const Z=(C.props.rotation||0)*Math.PI/180,D=[{x:0,y:0},{x:C.props.width,y:0},{x:C.props.width,y:C.props.height},{x:0,y:C.props.height}],M=C.props.width/2,J=C.props.height/2,R=D.map(AA=>{const G=AA.x-M,WA=AA.y-J,oo=G*Math.cos(Z)-WA*Math.sin(Z),io=G*Math.sin(Z)+WA*Math.cos(Z);return{x:Number((oo+M+C.props.x).toFixed(2)),y:Number((io+J+C.props.y).toFixed(2))}});if(f.value.set(F,R),f.value.size>100){const AA=f.value.keys().next().value;f.value.delete(AA)}return R},T=C=>{const F=S(C),x=F.map(G=>G.x),Z=F.map(G=>G.y),D=Number(Math.min(...x).toFixed(2)),M=Number(Math.max(...x).toFixed(2)),J=Number(Math.min(...Z).toFixed(2)),R=Number(Math.max(...Z).toFixed(2));return{minX:D,maxX:M,minY:J,maxY:R,width:M-D,height:R-J,centerX:(D+M)/2,centerY:(J+R)/2}},H=(C,F)=>{const x=T(C);if(C.type==="horline"&&F==="bottom"){const M=parseFloat(C.props.LineWidth||"0.75")*1.333/3.78;return{top:x.minY+M+"mm"}}if(C.type==="verline"&&F==="right"){const M=parseFloat(C.props.LineWidth||"0.75")*1.333/3.78;return{left:x.minX+M+"mm"}}switch(F){case"left":return{left:x.minX+"mm"};case"right":return{left:x.maxX+"mm"};case"top":return{top:x.minY+"mm"};case"bottom":return{top:x.maxY+"mm"};default:return{}}};function b(){const C=document.createElement("div");C.style.width="1mm",C.style.position="absolute",C.style.visibility="hidden",document.body.appendChild(C);const F=C.offsetWidth;return document.body.removeChild(C),F}const I=1/b(),Y=()=>{i.nextTick(()=>{const C=document.querySelector(".canvas-container");if(!C||!s.value||!c.value)return;const F=C.getBoundingClientRect(),x=jt(s.value),Z=jt(c.value);let D=F.width/x,M=F.height/Z;D=D-40*D/x,M=M-40*M/Z;let J=Math.min(D,M);l=Math.max(.8,Math.min(4,J)),o.value=l=q(l,1),setTimeout(()=>n.value=1,100)})};function q(C,F){C=C.toString();let x=C.indexOf(".");return x!==-1?C=C.substring(0,F+x+1):C=C.substring(0),Number(parseFloat(C).toFixed(F))}const W=C=>g.get(C)||null,L=C=>{const F=h.value.indexOf(C),x=F===h.value.length-1,Z=F!==-1,D=`${C.id}_${Math.round(C.props.x*10)}_${Math.round(C.props.y*10)}_${C.props.width}_${C.props.height}_${C.props.rotation}_${Z}_${x}`;if(u.value.has(D))return u.value.get(D);const M={width:C.props.width+"mm",height:C.props.height+"mm",transform:`translate(${C.props.x}mm, ${C.props.y}mm) rotate(${C.props.rotation}deg)`};if(Z?x?M.zIndex=1e3:M.zIndex=999:M.zIndex=10,u.value.set(D,M),u.value.size>200){const J=u.value.keys().next().value;u.value.delete(J)}return M},X=C=>{const F=h.value.some(Z=>Z.id===C.id),x=U()===C;return{"component-selected":F,"component-current":F&&x,"no-outline":F&&(C.type==="horline"||C.type==="verline")}},$=(C,F)=>{const Z=((C.props.rotation||0)%360+360)%360;if(C.type==="horline"&&(F==="left"||F==="right"))return{cursor:F==="left"?"w-resize":"e-resize",top:"50%",transform:"translateY(-50%)"};if(C.type==="verline"&&(F==="top"||F==="bottom"))return{cursor:F==="top"?"n-resize":"s-resize",left:"50%",transform:"translateX(-50%)"};const M=({top:0,"top-right":45,right:90,"bottom-right":135,bottom:180,"bottom-left":225,left:270,"top-left":315}[F]+Z)%360;let J="pointer";return M>=337.5||M<22.5?J="n-resize":M>=22.5&&M<67.5?J="ne-resize":M>=67.5&&M<112.5?J="e-resize":M>=112.5&&M<157.5?J="se-resize":M>=157.5&&M<202.5?J="s-resize":M>=202.5&&M<247.5?J="sw-resize":M>=247.5&&M<292.5?J="w-resize":M>=292.5&&M<337.5&&(J="nw-resize"),{cursor:J}},uA=()=>{o.value<4&&(o.value+=.1)},P=()=>{o.value>.8&&(o.value-=.1)};function K(C){const F=document.activeElement.tagName.toLowerCase();if(F==="input"||F==="textarea")return;const x=U();if(!x)return;let Z=!1;C.key==="ArrowLeft"?(x.props.x=Number((x.props.x-I).toFixed(2)),Z=!0):C.key==="ArrowRight"?(x.props.x=Number((x.props.x+I).toFixed(2)),Z=!0):C.key==="ArrowUp"?(x.props.y=Number((x.props.y-I).toFixed(2)),Z=!0):C.key==="ArrowDown"&&(x.props.y=Number((x.props.y+I).toFixed(2)),Z=!0),Z&&C.preventDefault()}const O=({e:C,comp:F,previewDiv:x})=>{var Z,D;(Z=C==null?void 0:C.dataTransfer)==null||Z.setData("comp",JSON.stringify(F)),document.body.appendChild(x),(D=C==null?void 0:C.dataTransfer)==null||D.setDragImage(x,0,0),setTimeout(()=>document.body.removeChild(x),0)},QA=async C=>{var tn,ys,Ts;C.preventDefault();const F=JSON.parse(((ys=(tn=C==null?void 0:C.dataTransfer)==null?void 0:tn.getData)==null?void 0:ys.call(tn,"comp"))||"{}")||{},x=(F==null?void 0:F.type)||"";if(!x)return;const Z=document.querySelector("#design").getBoundingClientRect(),D=(C.clientX-Z.left)/o.value,M=(C.clientY-Z.top)/o.value,J=wA.value[x]||{};let R=_o(D),AA=_o(M);const G=J.width,WA=J.height,oo=s.value-G,io=c.value-WA;R=Math.max(0,Math.min(R,oo)),AA=Math.max(0,Math.min(AA,io));const{propertyPanel:JE,...sE}=J;let en={...sE,x:Number(R.toFixed(2)),y:Number(AA.toFixed(2)),width:Number(G.toFixed(2)),height:Number(WA.toFixed(2))};if((Ts=wA.value[x])!=null&&Ts.propertyPanel){const lo=he(wA.value[x].propertyPanel)||{};if(en={...en,...lo},x==="horline"&&lo.LineWidth){const cE=parseFloat(lo.LineWidth)*.3528;en.height=Number(cE.toFixed(3))}}const Rs={id:Ce(),type:x,props:en};a.value.push(Rs),w(Rs)};function sA(C){let F=C.target;for(;F&&F!==document.querySelector("#design");){if(F.classList&&(F.classList.contains("canvas-item")||F.classList.contains("resize-handle")||F.classList.contains("delete-btn")||F.classList.contains("rotate-handle")))return;F=F.parentElement}Q()}const iA=(C,F)=>{if(h.value.length===0){w(F),y(C,F);return}if(U()===F){y(C,F);return}w(F),y(C,F)},nA=C=>{const F=[];for(const D of u.value.keys())D.includes(C)&&F.push(D);F.forEach(D=>u.value.delete(D));const x=[];for(const D of f.value.keys())D.includes(C)&&x.push(D);if(x.forEach(D=>f.value.delete(D)),u.value.clear(),f.value.clear(),a.value.find(D=>D.id===C)&&(a.value=a.value.filter(D=>D.id!==C)),h.value.some(D=>D.id===C)){const D=h.value.filter(M=>M.id!==C);h.value=D}i.nextTick(()=>{})},FA=C=>{var x;const F=document.activeElement.tagName.toLowerCase();F==="input"||F==="textarea"||(C.key==="Delete"||C.key==="Backspace")&&h.value.length>0&&nA((x=U())==null?void 0:x.id)},{handleMouseWheel:fA,handleInputChange:we,adjustRotation:_r}=_g(h,s,c),Ee=()=>{i.nextTick(()=>{const C=document.querySelector(".center-container");if(!C)return;const F=C.getBoundingClientRect();C.style.height=`calc(100vh - ${F==null?void 0:F.top}px)`,Y()})};i.watch(()=>r.templateData,(C,F)=>{C!==F&&(t.value=C||{},a.value=(C==null?void 0:C.items)||[],Ee())},{deep:!0,immediate:!0});const{handleCopy:qr,handlePaste:$r}=qg(a,h,s,c),wA=i.ref({}),xA=i.ref(!1);i.onMounted(async()=>{try{wA.value=await wg(r.templateType),xA.value=!0}catch(C){console.error("Failed to load props config:",C),wA.value={},xA.value=!0}window.addEventListener("resize",Ee),window.addEventListener("keydown",FA),window.addEventListener("keydown",qr),window.addEventListener("keydown",$r),window.addEventListener("keydown",K),Ee(),An()}),i.onBeforeUnmount(()=>{window.removeEventListener("resize",Ee),window.removeEventListener("keydown",FA),window.removeEventListener("keydown",qr),window.removeEventListener("keydown",$r),window.removeEventListener("keydown",K)});function Ce(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,C=>{const F=Math.random()*16|0;return(C==="x"?F:F&3|8).toString(16)})}const ce=()=>Pg(a,t.value),no=C=>{t.value.graphData=C||{},An()},An=()=>{var F;const C=AU(t.value.graphData)||"";C&&((F=document.querySelector("#design"))==null||F.appendChild(C))},ao=()=>new Promise((C,F)=>{o.value=1,setTimeout(()=>{Q(),JSON.parse(JSON.stringify(a.value));const x=JSON.parse(JSON.stringify(a.value));x==null||x.forEach(M=>{var J,R;if(M.type=="text"){const AA=((R=(J=r.options)==null?void 0:J.fields)==null?void 0:R.find(G=>{var WA;return G.value==((WA=M==null?void 0:M.props)==null?void 0:WA.FieldName)}))||{};M.props.Text=M.props.Text||(AA==null?void 0:AA.label)}}),[...x];const Z=()=>{o.value=l},D=()=>{var R;const M=((R=document.querySelector("#design"))==null?void 0:R.querySelectorAll("img"))||[],J=Array.from(M).map(AA=>AA.complete?Promise.resolve():new Promise(G=>{AA.onload=AA.onerror=G}));return Promise.all(J)};i.nextTick(()=>{const M=document.querySelector("#design");if(!M){Z(),F(new Error("找不到要转换的DOM元素"));return}D().then(()=>{Cw(M,{scale:window.devicePixelRatio*(o.value<200?5:3),useCORS:!0,allowTaint:!0,backgroundColor:null,logging:!1,onclone:J=>{const R=J.querySelector("#design");if(R){const AA=window.getComputedStyle(M);for(let G=0;G<AA.length;G++){const WA=AA[G];R.style[WA]=AA.getPropertyValue(WA)}}}}).then(J=>{Z();const R=J.toDataURL("image/png");C({data:ce(),image:R})}).catch(J=>{Z(),F(J)})}).catch(J=>{Z(),F(J)})})},300)});return A({getJson:()=>ce(),clear:()=>{a.value=[],Q()},snapshot:()=>ao()}),(C,F)=>{var J;const x=i.resolveComponent("el-icon-refresh-left"),Z=i.resolveComponent("el-icon"),D=i.resolveComponent("el-icon-close"),M=i.resolveComponent("el-switch");return i.openBlock(),i.createElementBlock("div",Rw,[i.createElementVNode("div",yw,[i.createVNode(Tg,{onDragStart:O})]),i.createElementVNode("div",Tw,[i.createElementVNode("div",Nw,[e.showGraphConfig?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(Gg,{"graph-data":t.value.graphData,onSuccess:no},null,8,["graph-data"]),F[24]||(F[24]=i.createElementVNode("div",{style:{width:"30px"}},null,-1))],64)):i.createCommentVNode("",!0),i.createElementVNode("div",Iw,[i.createElementVNode("button",{onClick:P,disabled:o.value<=.8},"-",8,vw),i.createElementVNode("span",null,i.toDisplayString(Math.round(o.value*100))+"%",1),i.createElementVNode("button",{onClick:uA,disabled:o.value>=4},"+",8,Sw)])]),i.createElementVNode("div",Mw,[i.createElementVNode("div",{class:"canvas-wrapper",style:i.normalizeStyle(`transform: scale(${o.value});opacity: ${n.value};`)},[s.value&&c.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",Hw,[i.createVNode(Ei,{direction:"horizontal",length:s.value},null,8,["length"])]),i.createElementVNode("div",bw,[i.createVNode(Ei,{direction:"vertical",length:c.value},null,8,["length"])])],64)):i.createCommentVNode("",!0),i.createElementVNode("div",{id:"design",class:"canvas",style:i.normalizeStyle(`width: ${s.value}mm; height: ${c.value}mm;`),onDrop:QA,onDragover:F[1]||(F[1]=i.withModifiers(()=>{},["prevent"])),onPointerdown:sA},[i.unref(E)&&i.unref(m)?(i.openBlock(),i.createElementBlock("div",xw,[i.createElementVNode("div",{class:"drag-extend-line vertical",style:i.normalizeStyle(H(i.unref(m),"left"))},null,4),i.createElementVNode("div",{class:"drag-extend-line vertical",style:i.normalizeStyle(H(i.unref(m),"right"))},null,4),i.createElementVNode("div",{class:"drag-extend-line horizontal",style:i.normalizeStyle(H(i.unref(m),"top"))},null,4),i.createElementVNode("div",{class:"drag-extend-line horizontal",style:i.normalizeStyle(H(i.unref(m),"bottom"))},null,4)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,R=>{var AA;return i.openBlock(),i.createElementBlock("div",{key:R.id,class:i.normalizeClass(["canvas-item",X(R)]),style:i.normalizeStyle(L(R)),"data-item-id":R.id,onMousedown:i.withModifiers(G=>iA(G,R),["stop"]),onClick:i.withModifiers(G=>i.unref(w)(R),["stop"])},[i.unref(U)()===R?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[R.props.lockAspectRatio?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[R.type!=="verline"&&R.type!=="horline"?(i.openBlock(),i.createElementBlock("div",{key:0,class:"resize-handle right",style:i.normalizeStyle($(R,"right")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"right"),["stop"])},null,44,Zw)):i.createCommentVNode("",!0),R.type!=="horline"?(i.openBlock(),i.createElementBlock("div",{key:1,class:"resize-handle bottom",style:i.normalizeStyle($(R,"bottom")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"bottom"),["stop"])},null,44,Ww)):i.createCommentVNode("",!0),R.type!=="verline"?(i.openBlock(),i.createElementBlock("div",{key:2,class:"resize-handle left",style:i.normalizeStyle($(R,"left")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"left"),["stop"])},null,44,Ow)):i.createCommentVNode("",!0)],64)),R.type!=="horline"&&R.type!=="verline"?(i.openBlock(),i.createElementBlock("div",{key:1,class:"resize-handle top-left",style:i.normalizeStyle($(R,"top-left")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"top-left"),["stop"])},null,44,Dw)):i.createCommentVNode("",!0),R.type!=="horline"&&R.type!=="verline"?(i.openBlock(),i.createElementBlock("div",{key:2,class:"resize-handle bottom-right",style:i.normalizeStyle($(R,"bottom-right")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"bottom-right"),["stop"])},null,44,Jw)):i.createCommentVNode("",!0),R.type!=="horline"&&R.type!=="verline"?(i.openBlock(),i.createElementBlock("div",{key:3,class:"resize-handle bottom-left",style:i.normalizeStyle($(R,"bottom-left")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"bottom-left"),["stop"])},null,44,Kw)):i.createCommentVNode("",!0),R.type!=="verline"?(i.openBlock(),i.createElementBlock("div",{key:4,class:"rotate-handle",onMousedown:i.withModifiers(G=>i.unref(V)(G,R),["stop"])},[i.createVNode(Z,{size:"6"},{default:i.withCtx(()=>[i.createVNode(x)]),_:1})],40,Lw)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"delete-btn",onMousedown:F[0]||(F[0]=i.withModifiers(()=>{},["stop"])),onClick:i.withModifiers(G=>nA(R.id),["stop"]),title:"删除"},[i.createVNode(Z,{size:"6"},{default:i.withCtx(()=>[i.createVNode(D)]),_:1})],40,Gw)],64)):i.createCommentVNode("",!0),R.props&&xA.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(((AA=W(R.type))==null?void 0:AA.component)||null),{key:`${R.id}-${R.type}`,modelValue:{...R.props,__selected:i.unref(U)()===R},propsConfig:wA.value,"onUpdate:modelValue":G=>{Object.assign(R.props,G)}},null,8,["modelValue","propsConfig","onUpdate:modelValue"])):i.createCommentVNode("",!0)],46,kw)}),128))],36)],4)])]),i.createElementVNode("div",Yw,[i.unref(h).length>0?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[F[31]||(F[31]=i.createElementVNode("h3",{class:"property-panel-title"},"属性设置",-1)),i.createElementVNode("div",zw,[i.createElementVNode("div",jw,[F[25]||(F[25]=i.createElementVNode("label",null,"X坐标:",-1)),i.createElementVNode("div",Xw,[i.createElementVNode("button",{onClick:F[2]||(F[2]=R=>i.unref(fA)(R,"x",-.5))},"-"),i.withDirectives(i.createElementVNode("input",{type:"number","onUpdate:modelValue":F[3]||(F[3]=R=>i.unref(U)().props.x=R),onInput:F[4]||(F[4]=R=>i.unref(we)("x",R.target.value))},null,544),[[i.vModelText,i.unref(U)().props.x,void 0,{number:!0}]]),i.createElementVNode("button",{onClick:F[5]||(F[5]=R=>i.unref(fA)(R,"x",.5))},"+")])]),i.createElementVNode("div",Pw,[F[26]||(F[26]=i.createElementVNode("label",null,"Y坐标:",-1)),i.createElementVNode("div",_w,[i.createElementVNode("button",{onClick:F[6]||(F[6]=R=>i.unref(fA)(R,"y",-.5))},"-"),i.withDirectives(i.createElementVNode("input",{type:"number","onUpdate:modelValue":F[7]||(F[7]=R=>i.unref(U)().props.y=R),onInput:F[8]||(F[8]=R=>i.unref(we)("y",R.target.value))},null,544),[[i.vModelText,i.unref(U)().props.y,void 0,{number:!0}]]),i.createElementVNode("button",{onClick:F[9]||(F[9]=R=>i.unref(fA)(R,"y",.5))},"+")])]),i.unref(U)().type!=="verline"?(i.openBlock(),i.createElementBlock("div",qw,[F[27]||(F[27]=i.createElementVNode("label",null,"宽度:",-1)),i.createElementVNode("div",$w,[i.createElementVNode("button",{onClick:F[10]||(F[10]=R=>i.unref(fA)(R,"width",-.5,1))},"-"),i.withDirectives(i.createElementVNode("input",{type:"number","onUpdate:modelValue":F[11]||(F[11]=R=>i.unref(U)().props.width=R),onInput:F[12]||(F[12]=R=>i.unref(we)("width",R.target.value))},null,544),[[i.vModelText,i.unref(U)().props.width,void 0,{number:!0}]]),i.createElementVNode("button",{onClick:F[13]||(F[13]=R=>i.unref(fA)(R,"width",.5,1))},"+")])])):i.createCommentVNode("",!0),i.unref(U)().type!=="horline"?(i.openBlock(),i.createElementBlock("div",AE,[F[28]||(F[28]=i.createElementVNode("label",null,"高度:",-1)),i.createElementVNode("div",eE,[i.createElementVNode("button",{onClick:F[14]||(F[14]=R=>i.unref(fA)(R,"height",-.5,1))},"-"),i.withDirectives(i.createElementVNode("input",{type:"number","onUpdate:modelValue":F[15]||(F[15]=R=>i.unref(U)().props.height=R),onInput:F[16]||(F[16]=R=>i.unref(we)("height",R.target.value))},null,544),[[i.vModelText,i.unref(U)().props.height,void 0,{number:!0}]]),i.createElementVNode("button",{onClick:F[17]||(F[17]=R=>i.unref(fA)(R,"height",.5,1))},"+")])])):i.createCommentVNode("",!0),i.createElementVNode("div",tE,[F[29]||(F[29]=i.createElementVNode("label",null,"旋转:",-1)),i.createElementVNode("div",rE,[i.createElementVNode("button",{onClick:F[18]||(F[18]=R=>i.unref(_r)(-1))},"-"),i.withDirectives(i.createElementVNode("input",{type:"number","onUpdate:modelValue":F[19]||(F[19]=R=>i.unref(U)().props.rotation=R),onInput:F[20]||(F[20]=R=>i.unref(we)("rotation",R.target.value))},null,544),[[i.vModelText,i.unref(U)().props.rotation,void 0,{number:!0}]]),i.createElementVNode("button",{onClick:F[21]||(F[21]=R=>i.unref(_r)(1))},"+")])]),i.unref(U)().type!=="horline"?(i.openBlock(),i.createElementBlock("div",nE,[F[30]||(F[30]=i.createElementVNode("label",null,"锁定宽高比:",-1)),i.createElementVNode("div",aE,[i.createVNode(M,{modelValue:i.unref(U)().props.lockAspectRatio,"onUpdate:modelValue":F[22]||(F[22]=R=>i.unref(U)().props.lockAspectRatio=R),"active-value":!0,"inactive-value":!1},null,8,["modelValue"])])])):i.createCommentVNode("",!0)]),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(((J=W(i.unref(U)().type))==null?void 0:J.propertyPanel)||null),{modelValue:i.unref(U)().props,"onUpdate:modelValue":F[23]||(F[23]=R=>i.unref(U)().props=R),options:e.options,"props-config":wA.value[i.unref(U)().type]||{}},null,8,["modelValue","options","props-config"]))],64)):i.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-44fb302d"]]),ZE="",Pr=BA({__name:"index",props:{templateData:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})}},setup(e){const A=i.getCurrentInstance(),r=e,t=i.ref(!1),n=i.ref(),a=i.ref(0),o=i.ref(!1),l=(g,h)=>{let w;return function(...Q){const E=()=>{clearTimeout(w),g(...Q)};clearTimeout(w),w=setTimeout(E,h)}},s=i.ref({rectTop:0,isInModal:!1}),c=()=>{if(!n.value)return;const g=n.value.getBoundingClientRect(),h=B(n.value);let w=0;if(g.top>0)w=g.top;else if(h){const U=u(n.value);w=U>0?U:60}else{const U=n.value.offsetTop;U>0?w=U:w=60}(w!==s.value.rectTop||h!==s.value.isInModal)&&(a.value=w,o.value=h,s.value={rectTop:w,isInModal:h})},d=l(c,100),B=g=>{let h=g.parentElement;for(;h;){if(h.classList&&(h.classList.contains("el-dialog")||h.classList.contains("el-drawer")||h.classList.contains("sc-dialog")))return!0;h=h.parentElement}return!1},u=g=>{let h=g.parentElement;for(;h;){if(h.classList&&(h.classList.contains("el-dialog")||h.classList.contains("el-drawer")||h.classList.contains("sc-dialog"))){const w=h.getBoundingClientRect();return w.top>0?w.top:60}h=h.parentElement}return 60};i.onMounted(()=>{setTimeout(()=>c(),100),setTimeout(()=>c(),300),window.addEventListener("resize",d),i.onBeforeUnmount(()=>{window.removeEventListener("resize",d)})}),i.watch(()=>t.value,g=>{g&&i.nextTick(()=>setTimeout(()=>c(),50))}),i.watch(()=>r.templateData,async g=>{t.value=(g==null?void 0:g.width)>0&&(g==null?void 0:g.height)>0},{deep:!0,immediate:!0});function f(g){A.exposed=g||{},A.exposeProxy=g||{}}return(g,h)=>{const w=i.resolveDirective("loading");return i.withDirectives((i.openBlock(),i.createElementBlock("div",{ref_key:"templateDesignerRef",ref:n,class:i.normalizeClass(["template-designer",{"template-designer-border-top":o.value}]),style:i.normalizeStyle({height:"calc(100vh - "+a.value+"px)"})},[t.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.h(oE,{...g.$attrs,...r,ref:f},g.$slots)),{key:0})):i.createCommentVNode("",!0)],6)),[[w,!t.value]])}}},[["__scopeId","data-v-9a302bda"]]);Pr.install=e=>{e.component(Pr.name||"TemplateDesigner",Pr)};const iE=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{x:0,y:0,width:20,height:5,rotation:0,text:"测试文本",fontSize:12,fontFamily:"黑体",fontWeight:"normal",fontStyle:"normal",textAlign:"left",color:"#000000",propertyPanel:[{prop:"text",label:"文本内容",type:"text"},{prop:"fontSize",label:"字体大小",type:"number",min:1,max:100},{prop:"fontFamily",label:"字体",type:"select",optionsKey:"FONT_FAMILIES"},{prop:"fontWeight",label:"字体粗细",type:"select",optionsKey:"FONT_WEIGHTS"},{prop:"fontStyle",label:"字体样式",type:"select",optionsKey:"FONT_STYLES"},{prop:"textAlign",label:"对齐方式",type:"select",optionsKey:"TEXT_ALIGNS"},{prop:"color",label:"颜色",type:"color"}]},barcode:{x:0,y:0,width:40,height:20,rotation:0,barcodeType:"CODE128",barcodeValue:"123456789",fontSize:12,propertyPanel:[{prop:"barcodeValue",label:"条码内容",type:"text"},{prop:"barcodeType",label:"条码格式",type:"select",optionsKey:"BARCODE_FORMATS"},{prop:"width",label:"条码宽度",type:"number",min:1,max:200},{prop:"height",label:"条码高度",type:"number",min:1,max:200},{prop:"fontSize",label:"文本大小",type:"number",min:8,max:72}]},qrcode:{x:0,y:0,width:20,height:20,rotation:0,qrcodeValue:"FB-GOLD",margin:4,errorCorrectionLevel:"M",propertyPanel:[{prop:"qrcodeValue",label:"二维码内容",type:"text"},{prop:"width",label:"二维码尺寸",type:"number",min:1,max:1e3},{prop:"margin",label:"边距",type:"number",min:0,max:20},{prop:"errorCorrectionLevel",label:"纠错级别",type:"select",optionsKey:"QRCODE_ERROR_LEVELS"}]}}},Symbol.toStringTag,{value:"Module"})),lE=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{width:20,height:4.2,rotation:0,lockAspectRatio:!1,propertyPanel:[{prop:"Title",label:"标题",default:""},{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:""},{prop:"Text",label:"测试数据",default:"测试文本"},{prop:"FontName",label:"字体名称",type:"select",options:[{label:"黑体",value:"黑体",cssValue:"SimHei"},{label:"楷体",value:"楷体",cssValue:"KaiTi"},{label:"宋体",value:"宋体",cssValue:"SimSun"}],default:"黑体"},{prop:"FontSize",label:"字体大小",type:"number",min:1,max:100,default:10},{prop:"FontColor",label:"字体颜色",type:"color",hide:!0,default:"#000000"},{prop:"Bold",label:"字体加粗",type:"select",options:[{label:"加粗",value:1},{label:"不加粗",value:0}],default:0},{prop:"Italic",label:"是否斜体",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"Underline",label:"下划线",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,hide:!0},{prop:"Alignment",label:"对齐方式",type:"select",options:[{label:"居左",value:1},{label:"居中",value:2},{label:"居右",value:3}],default:2},{prop:"TextWrap",label:"文本换行",type:"select",options:[{label:"换行",value:1},{label:"不换行&省略",value:2},{label:"不换行&隐藏",value:3}],default:1},{prop:"HOrient",label:"水平锁定",type:"select",options:[{label:"无",value:0},{label:"左边距锁定",value:1},{label:"右边距锁定",value:2},{label:"水平居中",value:3}],hide:!0,default:0},{prop:"VOrient",label:"垂直锁定",type:"select",options:[{label:"无",value:0},{label:"上边距锁定",value:1},{label:"下边距锁定",value:2},{label:"垂直居中",value:3}],hide:!0,default:0},{prop:"PenWidth",label:"线宽",type:"number",min:0,hide:!0,default:0},{prop:"PenStyle",label:"线型",type:"select",hide:!0,options:[{label:"实线",value:0},{label:"破折线",value:1},{label:"点线",value:2},{label:"点划线",value:3},{label:"双点划线",value:4}],default:0},{prop:"Stretch",label:"缩放模式",type:"select",options:[{label:"扩展",value:1},{label:"缩放",value:2}],hide:!0,default:1},{prop:"PreviewOnly",label:"仅预览",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"ReadOnly",label:"只读",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0}]},barcode:{width:20,height:6,rotation:0,lockAspectRatio:!1,propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"goodsSn"},{prop:"BarcodeValue",label:"测试数据",type:"text",default:"1234567890"},{prop:"CodeType",label:"条码类型",type:"select",options:[{label:"CODE128",value:"128Auto",compValue:"CODE128"},{label:"CODE39",value:"Code39",compValue:"CODE39"},{label:"EAN13",value:"EAN13",compValue:"EAN13"}],hide:!0,default:"128Auto"},{prop:"AlignJustify",label:"对齐方式",type:"select",options:[{label:"两端对齐",value:0},{label:"左",value:1},{label:"中",value:2},{label:"右",value:3}],hide:!0,default:0},{prop:"LineColor",label:"条形码颜色",type:"color",hide:!0,default:"#000000"}]},qrcode:{width:10,height:10,rotation:0,lockAspectRatio:!0,propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:""},{prop:"QRCodeValue",label:"测试数据",type:"text",default:"FB-GOLD"},{prop:"QRCodeVersion",label:"二维码版本",type:"number",min:1,max:40,hide:!0,default:7},{prop:"QRCodeErrorLevel",label:"纠错级别",type:"select",options:[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}],hide:!0,default:"Q"},{prop:"QRCodeEncodeMode",label:"编码模式",type:"select",options:[{label:"数字",value:"N"},{label:"二进制或汉语",value:"B"},{label:"英文字母",value:"A"}],hide:!0,default:"B"},{prop:"QRCodeForeground",label:"前景色",type:"color",hide:!0,default:"#000000"},{prop:"QRCodeBackground",label:"背景景色",type:"color",hide:!0,default:"transparent"}]},image:{width:12,height:12,rotation:0,lockAspectRatio:!1,propertyPanel:[{prop:"ImageSrc",label:"图片地址",type:"file",accept:"image/*",default:""},{prop:"ScaleMode",label:"图片缩放",type:"select",options:[{label:"原始尺寸",value:1},{label:"居中裁剪",value:2},{label:"填充",value:3}],default:1}]},rectangle:{width:15,height:10,rotation:0,lockAspectRatio:!1,propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.75pt",options:[{label:"0.75pt",value:"0.75pt"},{label:"1.5pt",value:"1.5pt"},{label:"2.25pt",value:"2.25pt"},{label:"3pt",value:"3pt"},{label:"3.75pt",value:"3.75pt"},{label:"4.5pt",value:"4.5pt"},{label:"5.25pt",value:"5.25pt"},{label:"6pt",value:"6pt"},{label:"6.75pt",value:"6.75pt"}]},{prop:"LineStyle",type:"select",label:"样式",default:"实线",options:[{label:"实线",value:"实线"},{label:"虚线",value:"虚线"}]},{prop:"BorderRadius",type:"number",label:"圆角",default:0,min:0,step:1}]},horline:{width:15,height:.75,rotation:0,lockAspectRatio:!1,propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.75pt",options:[{label:"0.75pt",value:"0.75pt"},{label:"1.5pt",value:"1.5pt"},{label:"2.25pt",value:"2.25pt"},{label:"3pt",value:"3pt"},{label:"3.75pt",value:"3.75pt"},{label:"4.5pt",value:"4.5pt"},{label:"5.25pt",value:"5.25pt"},{label:"6pt",value:"6pt"},{label:"6.75pt",value:"6.75pt"}]},{prop:"LineStyle",type:"select",label:"样式",default:"实线",options:[{label:"实线",value:"实线"},{label:"虚线",value:"虚线"}]}]}}},Symbol.toStringTag,{value:"Module"}));return Pr});
|
|
40
|
+
.`+$a+WF+hs)},DF=function(e,A){var r=e.ownerDocument;if(r){var t=r.createElement("style");t.textContent=A,e.appendChild(t)}},gs=function(){function e(){}return e.getOrigin=function(A){var r=e._link;return r?(r.href=A,r.href=r.href,r.protocol+r.hostname+r.port):"about:blank"},e.isSameOrigin=function(A){return e.getOrigin(A)===e._origin},e.setContext=function(A){e._link=A.document.createElement("a"),e._origin=e.getOrigin(A.location.href)},e._origin="about:blank",e}(),JF=function(){function e(A,r){this.context=A,this._options=r,this._cache={}}return e.prototype.addImage=function(A){var r=Promise.resolve();return this.has(A)||(eo(A)||YF(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),r},e.prototype.match=function(A){return this._cache[A]},e.prototype.loadImage=function(A){return CA(this,void 0,void 0,function(){var r,t,n,a,o=this;return UA(this,function(l){switch(l.label){case 0:return r=gs.isSameOrigin(A),t=!Ao(A)&&this._options.useCORS===!0&&gA.SUPPORT_CORS_IMAGES&&!r,n=!Ao(A)&&!r&&!eo(A)&&typeof this._options.proxy=="string"&&gA.SUPPORT_CORS_XHR&&!t,!r&&this._options.allowTaint===!1&&!Ao(A)&&!eo(A)&&!n&&!t?[2]:(a=A,n?[4,this.proxy(a)]:[3,2]);case 1:a=l.sent(),l.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(s,c){var d=new Image;d.onload=function(){return s(d)},d.onerror=c,(zF(a)||t)&&(d.crossOrigin="anonymous"),d.src=a,d.complete===!0&&setTimeout(function(){return s(d)},500),o._options.imageTimeout>0&&setTimeout(function(){return c("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,l.sent()]}})})},e.prototype.has=function(A){return typeof this._cache[A]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(A){var r=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var n=A.substring(0,256);return new Promise(function(a,o){var l=gA.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(l==="text")a(s.response);else{var B=new FileReader;B.addEventListener("load",function(){return a(B.result)},!1),B.addEventListener("error",function(u){return o(u)},!1),B.readAsDataURL(s.response)}else o("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=o;var c=t.indexOf("?")>-1?"&":"?";if(s.open("GET",""+t+c+"url="+encodeURIComponent(A)+"&responseType="+l),l!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=l),r._options.imageTimeout){var d=r._options.imageTimeout;s.timeout=d,s.ontimeout=function(){return o("Timed out ("+d+"ms) proxying "+n)}}s.send()})},e}(),KF=/^data:image\/svg\+xml/i,LF=/^data:image\/.*;base64,/i,GF=/^data:image\/.*/i,YF=function(e){return gA.SUPPORT_SVG_DRAWING||!jF(e)},Ao=function(e){return GF.test(e)},zF=function(e){return LF.test(e)},eo=function(e){return e.substr(0,4)==="blob"},jF=function(e){return e.substr(-3).toLowerCase()==="svg"||KF.test(e)},N=function(){function e(A,r){this.type=0,this.x=A,this.y=r}return e.prototype.add=function(A,r){return new e(this.x+A,this.y+r)},e}(),je=function(e,A,r){return new N(e.x+(A.x-e.x)*r,e.y+(A.y-e.y)*r)},Kr=function(){function e(A,r,t,n){this.type=1,this.start=A,this.startControl=r,this.endControl=t,this.end=n}return e.prototype.subdivide=function(A,r){var t=je(this.start,this.startControl,A),n=je(this.startControl,this.endControl,A),a=je(this.endControl,this.end,A),o=je(t,n,A),l=je(n,a,A),s=je(o,l,A);return r?new e(this.start,t,o,s):new e(s,l,a,this.end)},e.prototype.add=function(A,r){return new e(this.start.add(A,r),this.startControl.add(A,r),this.endControl.add(A,r),this.end.add(A,r))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),HA=function(e){return e.type===1},XF=function(){function e(A){var r=A.styles,t=A.bounds,n=Ct(r.borderTopLeftRadius,t.width,t.height),a=n[0],o=n[1],l=Ct(r.borderTopRightRadius,t.width,t.height),s=l[0],c=l[1],d=Ct(r.borderBottomRightRadius,t.width,t.height),B=d[0],u=d[1],f=Ct(r.borderBottomLeftRadius,t.width,t.height),g=f[0],h=f[1],w=[];w.push((a+s)/t.width),w.push((g+B)/t.width),w.push((o+h)/t.height),w.push((c+u)/t.height);var U=Math.max.apply(Math,w);U>1&&(a/=U,o/=U,s/=U,c/=U,B/=U,u/=U,g/=U,h/=U);var Q=t.width-s,E=t.height-u,m=t.width-B,y=t.height-h,p=r.borderTopWidth,V=r.borderRightWidth,S=r.borderBottomWidth,T=r.borderLeftWidth,H=eA(r.paddingTop,A.bounds.width),b=eA(r.paddingRight,A.bounds.width),k=eA(r.paddingBottom,A.bounds.width),I=eA(r.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||o>0?rA(t.left+T/3,t.top+p/3,a-T/3,o-p/3,j.TOP_LEFT):new N(t.left+T/3,t.top+p/3),this.topRightBorderDoubleOuterBox=a>0||o>0?rA(t.left+Q,t.top+p/3,s-V/3,c-p/3,j.TOP_RIGHT):new N(t.left+t.width-V/3,t.top+p/3),this.bottomRightBorderDoubleOuterBox=B>0||u>0?rA(t.left+m,t.top+E,B-V/3,u-S/3,j.BOTTOM_RIGHT):new N(t.left+t.width-V/3,t.top+t.height-S/3),this.bottomLeftBorderDoubleOuterBox=g>0||h>0?rA(t.left+T/3,t.top+y,g-T/3,h-S/3,j.BOTTOM_LEFT):new N(t.left+T/3,t.top+t.height-S/3),this.topLeftBorderDoubleInnerBox=a>0||o>0?rA(t.left+T*2/3,t.top+p*2/3,a-T*2/3,o-p*2/3,j.TOP_LEFT):new N(t.left+T*2/3,t.top+p*2/3),this.topRightBorderDoubleInnerBox=a>0||o>0?rA(t.left+Q,t.top+p*2/3,s-V*2/3,c-p*2/3,j.TOP_RIGHT):new N(t.left+t.width-V*2/3,t.top+p*2/3),this.bottomRightBorderDoubleInnerBox=B>0||u>0?rA(t.left+m,t.top+E,B-V*2/3,u-S*2/3,j.BOTTOM_RIGHT):new N(t.left+t.width-V*2/3,t.top+t.height-S*2/3),this.bottomLeftBorderDoubleInnerBox=g>0||h>0?rA(t.left+T*2/3,t.top+y,g-T*2/3,h-S*2/3,j.BOTTOM_LEFT):new N(t.left+T*2/3,t.top+t.height-S*2/3),this.topLeftBorderStroke=a>0||o>0?rA(t.left+T/2,t.top+p/2,a-T/2,o-p/2,j.TOP_LEFT):new N(t.left+T/2,t.top+p/2),this.topRightBorderStroke=a>0||o>0?rA(t.left+Q,t.top+p/2,s-V/2,c-p/2,j.TOP_RIGHT):new N(t.left+t.width-V/2,t.top+p/2),this.bottomRightBorderStroke=B>0||u>0?rA(t.left+m,t.top+E,B-V/2,u-S/2,j.BOTTOM_RIGHT):new N(t.left+t.width-V/2,t.top+t.height-S/2),this.bottomLeftBorderStroke=g>0||h>0?rA(t.left+T/2,t.top+y,g-T/2,h-S/2,j.BOTTOM_LEFT):new N(t.left+T/2,t.top+t.height-S/2),this.topLeftBorderBox=a>0||o>0?rA(t.left,t.top,a,o,j.TOP_LEFT):new N(t.left,t.top),this.topRightBorderBox=s>0||c>0?rA(t.left+Q,t.top,s,c,j.TOP_RIGHT):new N(t.left+t.width,t.top),this.bottomRightBorderBox=B>0||u>0?rA(t.left+m,t.top+E,B,u,j.BOTTOM_RIGHT):new N(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=g>0||h>0?rA(t.left,t.top+y,g,h,j.BOTTOM_LEFT):new N(t.left,t.top+t.height),this.topLeftPaddingBox=a>0||o>0?rA(t.left+T,t.top+p,Math.max(0,a-T),Math.max(0,o-p),j.TOP_LEFT):new N(t.left+T,t.top+p),this.topRightPaddingBox=s>0||c>0?rA(t.left+Math.min(Q,t.width-V),t.top+p,Q>t.width+V?0:Math.max(0,s-V),Math.max(0,c-p),j.TOP_RIGHT):new N(t.left+t.width-V,t.top+p),this.bottomRightPaddingBox=B>0||u>0?rA(t.left+Math.min(m,t.width-T),t.top+Math.min(E,t.height-S),Math.max(0,B-V),Math.max(0,u-S),j.BOTTOM_RIGHT):new N(t.left+t.width-V,t.top+t.height-S),this.bottomLeftPaddingBox=g>0||h>0?rA(t.left+T,t.top+Math.min(y,t.height-S),Math.max(0,g-T),Math.max(0,h-S),j.BOTTOM_LEFT):new N(t.left+T,t.top+t.height-S),this.topLeftContentBox=a>0||o>0?rA(t.left+T+I,t.top+p+H,Math.max(0,a-(T+I)),Math.max(0,o-(p+H)),j.TOP_LEFT):new N(t.left+T+I,t.top+p+H),this.topRightContentBox=s>0||c>0?rA(t.left+Math.min(Q,t.width+T+I),t.top+p+H,Q>t.width+T+I?0:s-T+I,c-(p+H),j.TOP_RIGHT):new N(t.left+t.width-(V+b),t.top+p+H),this.bottomRightContentBox=B>0||u>0?rA(t.left+Math.min(m,t.width-(T+I)),t.top+Math.min(E,t.height+p+H),Math.max(0,B-(V+b)),u-(S+k),j.BOTTOM_RIGHT):new N(t.left+t.width-(V+b),t.top+t.height-(S+k)),this.bottomLeftContentBox=g>0||h>0?rA(t.left+T+I,t.top+y,Math.max(0,g-(T+I)),h-(S+k),j.BOTTOM_LEFT):new N(t.left+T+I,t.top+t.height-(S+k))}return e}(),j;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(j||(j={}));var rA=function(e,A,r,t,n){var a=4*((Math.sqrt(2)-1)/3),o=r*a,l=t*a,s=e+r,c=A+t;switch(n){case j.TOP_LEFT:return new Kr(new N(e,c),new N(e,c-l),new N(s-o,A),new N(s,A));case j.TOP_RIGHT:return new Kr(new N(e,A),new N(e+o,A),new N(s,c-l),new N(s,c));case j.BOTTOM_RIGHT:return new Kr(new N(s,A),new N(s,A+l),new N(e+o,c),new N(e,c));case j.BOTTOM_LEFT:default:return new Kr(new N(s,c),new N(s-o,c),new N(e,A+l),new N(e,A))}},Lr=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},PF=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},Gr=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},_F=function(){function e(A,r,t){this.offsetX=A,this.offsetY=r,this.matrix=t,this.type=0,this.target=6}return e}(),Yr=function(){function e(A,r){this.path=A,this.target=r,this.type=1}return e}(),qF=function(){function e(A){this.opacity=A,this.type=2,this.target=6}return e}(),$F=function(e){return e.type===0},Us=function(e){return e.type===1},Aw=function(e){return e.type===2},ps=function(e,A){return e.length===A.length?e.some(function(r,t){return r===A[t]}):!1},ew=function(e,A,r,t,n){return e.map(function(a,o){switch(o){case 0:return a.add(A,r);case 1:return a.add(A+t,r);case 2:return a.add(A+t,r+n);case 3:return a.add(A,r+n)}return a})},Qs=function(){function e(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),Fs=function(){function e(A,r){if(this.container=A,this.parent=r,this.effects=[],this.curves=new XF(this.container),this.container.styles.opacity<1&&this.effects.push(new qF(this.container.styles.opacity)),this.container.styles.transform!==null){var t=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 _F(t,n,a))}if(this.container.styles.overflowX!==0){var o=Lr(this.curves),l=Gr(this.curves);ps(o,l)?this.effects.push(new Yr(o,6)):(this.effects.push(new Yr(o,2)),this.effects.push(new Yr(l,4)))}}return e.prototype.getEffects=function(A){for(var r=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,n=this.effects.slice(0);t;){var a=t.effects.filter(function(s){return!Us(s)});if(r||t.container.styles.position!==0||!t.parent){if(n.unshift.apply(n,a),r=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var o=Lr(t.curves),l=Gr(t.curves);ps(o,l)||n.unshift(new Yr(l,6))}}else n.unshift.apply(n,a);t=t.parent}return n.filter(function(s){return cA(s.target,A)})},e}(),to=function(e,A,r,t){e.container.elements.forEach(function(n){var a=cA(n.flags,4),o=cA(n.flags,2),l=new Fs(n,e);cA(n.styles.display,2048)&&t.push(l);var s=cA(n.flags,8)?[]:t;if(a||o){var c=a||n.styles.isPositioned()?r:A,d=new Qs(l);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var B=n.styles.zIndex.order;if(B<0){var u=0;c.negativeZIndex.some(function(g,h){return B>g.element.container.styles.zIndex.order?(u=h,!1):u>0}),c.negativeZIndex.splice(u,0,d)}else if(B>0){var f=0;c.positiveZIndex.some(function(g,h){return B>=g.element.container.styles.zIndex.order?(f=h+1,!1):f>0}),c.positiveZIndex.splice(f,0,d)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else n.styles.isFloating()?c.nonPositionedFloats.push(d):c.nonPositionedInlineLevel.push(d);to(l,d,a?d:r,s)}else n.styles.isInlineLevel()?A.inlineLevel.push(l):A.nonInlineLevel.push(l),to(l,A,r,s);cA(n.flags,8)&&ws(n,s)})},ws=function(e,A){for(var r=e instanceof Ga?e.start:1,t=e instanceof Ga?e.reversed:!1,n=0;n<A.length;n++){var a=A[n];a.container instanceof Yl&&typeof a.container.value=="number"&&a.container.value!==0&&(r=a.container.value),a.listValue=Nt(r,a.container.styles.listStyleType,!0),r+=t?-1:1}},tw=function(e){var A=new Fs(e,null),r=new Qs(A),t=[];return to(A,r,r,t),ws(A.container,t),r},Es=function(e,A){switch(A){case 0:return bA(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return bA(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return bA(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return bA(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},rw=function(e,A){switch(A){case 0:return bA(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return bA(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return bA(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return bA(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},nw=function(e,A){switch(A){case 0:return bA(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return bA(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return bA(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return bA(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},aw=function(e,A){switch(A){case 0:return zr(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return zr(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return zr(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return zr(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},zr=function(e,A){var r=[];return HA(e)?r.push(e.subdivide(.5,!1)):r.push(e),HA(A)?r.push(A.subdivide(.5,!0)):r.push(A),r},bA=function(e,A,r,t){var n=[];return HA(e)?n.push(e.subdivide(.5,!1)):n.push(e),HA(r)?n.push(r.subdivide(.5,!0)):n.push(r),HA(t)?n.push(t.subdivide(.5,!0).reverse()):n.push(t),HA(A)?n.push(A.subdivide(.5,!1).reverse()):n.push(A),n},Cs=function(e){var A=e.bounds,r=e.styles;return A.add(r.borderLeftWidth,r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth),-(r.borderTopWidth+r.borderBottomWidth))},jr=function(e){var A=e.styles,r=e.bounds,t=eA(A.paddingLeft,r.width),n=eA(A.paddingRight,r.width),a=eA(A.paddingTop,r.width),o=eA(A.paddingBottom,r.width);return r.add(t+A.borderLeftWidth,a+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+t+n),-(A.borderTopWidth+A.borderBottomWidth+a+o))},ow=function(e,A){return e===0?A.bounds:e===2?jr(A):Cs(A)},iw=function(e,A){return e===0?A.bounds:e===2?jr(A):Cs(A)},ro=function(e,A,r){var t=ow(Pe(e.styles.backgroundOrigin,A),e),n=iw(Pe(e.styles.backgroundClip,A),e),a=lw(Pe(e.styles.backgroundSize,A),r,t),o=a[0],l=a[1],s=Ct(Pe(e.styles.backgroundPosition,A),t.width-o,t.height-l),c=sw(Pe(e.styles.backgroundRepeat,A),s,a,t,n),d=Math.round(t.left+s[0]),B=Math.round(t.top+s[1]);return[c,d,B,o,l]},Xe=function(e){return _(e)&&e.value===Le.AUTO},Xr=function(e){return typeof e=="number"},lw=function(e,A,r){var t=A[0],n=A[1],a=A[2],o=e[0],l=e[1];if(!o)return[0,0];if(lA(o)&&l&&lA(l))return[eA(o,r.width),eA(l,r.height)];var s=Xr(a);if(_(o)&&(o.value===Le.CONTAIN||o.value===Le.COVER)){if(Xr(a)){var c=r.width/r.height;return c<a!=(o.value===Le.COVER)?[r.width,r.width/a]:[r.height*a,r.height]}return[r.width,r.height]}var d=Xr(t),B=Xr(n),u=d||B;if(Xe(o)&&(!l||Xe(l))){if(d&&B)return[t,n];if(!s&&!u)return[r.width,r.height];if(u&&s){var f=d?t:n*a,g=B?n:t/a;return[f,g]}var h=d?t:r.width,w=B?n:r.height;return[h,w]}if(s){var U=0,Q=0;return lA(o)?U=eA(o,r.width):lA(l)&&(Q=eA(l,r.height)),Xe(o)?U=Q*a:(!l||Xe(l))&&(Q=U/a),[U,Q]}var E=null,m=null;if(lA(o)?E=eA(o,r.width):l&&lA(l)&&(m=eA(l,r.height)),E!==null&&(!l||Xe(l))&&(m=d&&B?E/t*n:r.height),m!==null&&Xe(o)&&(E=d&&B?m/n*t:r.width),E!==null&&m!==null)return[E,m];throw new Error("Unable to calculate background-size for element")},Pe=function(e,A){var r=e[A];return typeof r>"u"?e[0]:r},sw=function(e,A,r,t,n){var a=A[0],o=A[1],l=r[0],s=r[1];switch(e){case 2:return[new N(Math.round(t.left),Math.round(t.top+o)),new N(Math.round(t.left+t.width),Math.round(t.top+o)),new N(Math.round(t.left+t.width),Math.round(s+t.top+o)),new N(Math.round(t.left),Math.round(s+t.top+o))];case 3:return[new N(Math.round(t.left+a),Math.round(t.top)),new N(Math.round(t.left+a+l),Math.round(t.top)),new N(Math.round(t.left+a+l),Math.round(t.height+t.top)),new N(Math.round(t.left+a),Math.round(t.height+t.top))];case 1:return[new N(Math.round(t.left+a),Math.round(t.top+o)),new N(Math.round(t.left+a+l),Math.round(t.top+o)),new N(Math.round(t.left+a+l),Math.round(t.top+o+s)),new N(Math.round(t.left+a),Math.round(t.top+o+s))];default:return[new N(Math.round(n.left),Math.round(n.top)),new N(Math.round(n.left+n.width),Math.round(n.top)),new N(Math.round(n.left+n.width),Math.round(n.height+n.top)),new N(Math.round(n.left),Math.round(n.height+n.top))]}},cw="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",ms="Hidden Text",Bw=function(){function e(A){this._data={},this._document=A}return e.prototype.parseMetrics=function(A,r){var t=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),o=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=r,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",o.appendChild(t),n.src=cw,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=A,a.style.fontSize=r,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(ms)),t.appendChild(a),t.appendChild(n);var l=n.offsetTop-a.offsetTop+2;t.removeChild(a),t.appendChild(this._document.createTextNode(ms)),t.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-t.offsetTop+2;return o.removeChild(t),{baseline:l,middle:s}},e.prototype.getMetrics=function(A,r){var t=A+" "+r;return typeof this._data[t]>"u"&&(this._data[t]=this.parseMetrics(A,r)),this._data[t]},e}(),Vs=function(){function e(A,r){this.context=A,this.options=r}return e}(),dw=1e4,uw=function(e){kA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n._activeEffects=[],n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),t.canvas||(n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px"),n.fontMetrics=new Bw(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),n}return A.prototype.applyEffects=function(r){for(var t=this;this._activeEffects.length;)this.popEffect();r.forEach(function(n){return t.applyEffect(n)})},A.prototype.applyEffect=function(r){this.ctx.save(),Aw(r)&&(this.ctx.globalAlpha=r.opacity),$F(r)&&(this.ctx.translate(r.offsetX,r.offsetY),this.ctx.transform(r.matrix[0],r.matrix[1],r.matrix[2],r.matrix[3],r.matrix[4],r.matrix[5]),this.ctx.translate(-r.offsetX,-r.offsetY)),Us(r)&&(this.path(r.path),this.ctx.clip()),this._activeEffects.push(r)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(r){return CA(this,void 0,void 0,function(){var t;return UA(this,function(n){switch(n.label){case 0:return t=r.element.container.styles,t.isVisible()?[4,this.renderStackContent(r)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(r){return CA(this,void 0,void 0,function(){return UA(this,function(t){switch(t.label){case 0:if(cA(r.container.flags,16))debugger;return r.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(r)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(r)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(r,t,n){var a=this;if(t===0)this.ctx.fillText(r.text,r.bounds.left,r.bounds.top+n);else{var o=La(r.text);o.reduce(function(l,s){return a.ctx.fillText(s,l,r.bounds.top+n),l+a.ctx.measureText(s).width},r.bounds.left)}},A.prototype.createFontStyle=function(r){var t=r.fontVariant.filter(function(o){return o==="normal"||o==="small-caps"}).join(""),n=pw(r.fontFamily).join(", "),a=Et(r.fontSize)?""+r.fontSize.number+r.fontSize.unit:r.fontSize.number+"px";return[[r.fontStyle,t,r.fontWeight,a,n].join(" "),n,a]},A.prototype.renderTextNode=function(r,t){return CA(this,void 0,void 0,function(){var n,a,o,l,s,c,d,B,u=this;return UA(this,function(f){return n=this.createFontStyle(t),a=n[0],o=n[1],l=n[2],this.ctx.font=a,this.ctx.direction=t.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(o,l),c=s.baseline,d=s.middle,B=t.paintOrder,r.textBounds.forEach(function(g){B.forEach(function(h){switch(h){case 0:u.ctx.fillStyle=dA(t.color),u.renderTextWithLetterSpacing(g,t.letterSpacing,c);var w=t.textShadow;w.length&&g.text.trim().length&&(w.slice(0).reverse().forEach(function(U){u.ctx.shadowColor=dA(U.color),u.ctx.shadowOffsetX=U.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=U.offsetY.number*u.options.scale,u.ctx.shadowBlur=U.blur.number,u.renderTextWithLetterSpacing(g,t.letterSpacing,c)}),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=dA(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(U){switch(U){case 1:u.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top+c),g.bounds.width,1);break;case 2:u.ctx.fillRect(g.bounds.left,Math.round(g.bounds.top),g.bounds.width,1);break;case 3:u.ctx.fillRect(g.bounds.left,Math.ceil(g.bounds.top+d),g.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&g.text.trim().length&&(u.ctx.strokeStyle=dA(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(g.text,g.bounds.left,g.bounds.top+c)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(r,t,n){if(n&&r.intrinsicWidth>0&&r.intrinsicHeight>0){var a=jr(r),o=Gr(t);this.path(o),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,r.intrinsicWidth,r.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(r){return CA(this,void 0,void 0,function(){var t,n,a,o,l,s,Q,Q,c,d,B,u,m,f,g,y,h,w,U,Q,E,m,y;return UA(this,function(p){switch(p.label){case 0:this.applyEffects(r.getEffects(4)),t=r.container,n=r.curves,a=t.styles,o=0,l=t.textNodes,p.label=1;case 1:return o<l.length?(s=l[o],[4,this.renderTextNode(s,a)]):[3,4];case 2:p.sent(),p.label=3;case 3:return o++,[3,1];case 4:if(!(t instanceof Kl))return[3,8];p.label=5;case 5:return p.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return Q=p.sent(),this.renderReplacedElement(t,n,Q),[3,8];case 7:return p.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof Ll&&this.renderReplacedElement(t,n,t.canvas),!(t instanceof Gl))return[3,12];p.label=9;case 9:return p.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return Q=p.sent(),this.renderReplacedElement(t,n,Q),[3,12];case 11:return p.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof Pl&&t.tree?(c=new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,c.render(t.tree)]):[3,14];case 13:d=p.sent(),t.width&&t.height&&this.ctx.drawImage(d,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),p.label=14;case 14:if(t instanceof Ya&&(B=Math.min(t.bounds.width,t.bounds.height),t.type===kr?t.checked&&(this.ctx.save(),this.path([new N(t.bounds.left+B*.39363,t.bounds.top+B*.79),new N(t.bounds.left+B*.16,t.bounds.top+B*.5549),new N(t.bounds.left+B*.27347,t.bounds.top+B*.44071),new N(t.bounds.left+B*.39694,t.bounds.top+B*.5649),new N(t.bounds.left+B*.72983,t.bounds.top+B*.23),new N(t.bounds.left+B*.84,t.bounds.top+B*.34085),new N(t.bounds.left+B*.39363,t.bounds.top+B*.79)]),this.ctx.fillStyle=dA(zl),this.ctx.fill(),this.ctx.restore()):t.type===Zr&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+B/2,t.bounds.top+B/2,B/4,0,Math.PI*2,!0),this.ctx.fillStyle=dA(zl),this.ctx.fill(),this.ctx.restore())),fw(t)&&t.value.length){switch(u=this.createFontStyle(a),m=u[0],f=u[1],g=this.fontMetrics.getMetrics(m,f).baseline,this.ctx.font=m,this.ctx.fillStyle=dA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=gw(t.styles.textAlign),y=jr(t),h=0,t.styles.textAlign){case 1:h+=y.width/2;break;case 2:h+=y.width;break}w=y.add(h,0,0,-y.height/2+1),this.ctx.save(),this.path([new N(y.left,y.top),new N(y.left+y.width,y.top),new N(y.left+y.width,y.top+y.height),new N(y.left,y.top+y.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new yt(t.value,w),a.letterSpacing,g),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!cA(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if(U=t.styles.listStyleImage,U.type!==0)return[3,18];Q=void 0,E=U.url,p.label=15;case 15:return p.trys.push([15,17,,18]),[4,this.context.cache.match(E)];case 16:return Q=p.sent(),this.ctx.drawImage(Q,t.bounds.left-(Q.width+10),t.bounds.top),[3,18];case 17:return p.sent(),this.context.logger.error("Error loading list-style-image "+E),[3,18];case 18:return[3,20];case 19:r.listValue&&t.styles.listStyleType!==-1&&(m=this.createFontStyle(a)[0],this.ctx.font=m,this.ctx.fillStyle=dA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",y=new zA(t.bounds.left,t.bounds.top+eA(t.styles.paddingTop,t.bounds.width),t.bounds.width,ml(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new yt(r.listValue,y),a.letterSpacing,ml(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),p.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(r){return CA(this,void 0,void 0,function(){var t,n,U,a,o,U,l,s,U,c,d,U,B,u,U,f,g,U,h,w,U;return UA(this,function(Q){switch(Q.label){case 0:if(cA(r.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(r.element)];case 1:Q.sent(),t=0,n=r.negativeZIndex,Q.label=2;case 2:return t<n.length?(U=n[t],[4,this.renderStack(U)]):[3,5];case 3:Q.sent(),Q.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(r.element)];case 6:Q.sent(),a=0,o=r.nonInlineLevel,Q.label=7;case 7:return a<o.length?(U=o[a],[4,this.renderNode(U)]):[3,10];case 8:Q.sent(),Q.label=9;case 9:return a++,[3,7];case 10:l=0,s=r.nonPositionedFloats,Q.label=11;case 11:return l<s.length?(U=s[l],[4,this.renderStack(U)]):[3,14];case 12:Q.sent(),Q.label=13;case 13:return l++,[3,11];case 14:c=0,d=r.nonPositionedInlineLevel,Q.label=15;case 15:return c<d.length?(U=d[c],[4,this.renderStack(U)]):[3,18];case 16:Q.sent(),Q.label=17;case 17:return c++,[3,15];case 18:B=0,u=r.inlineLevel,Q.label=19;case 19:return B<u.length?(U=u[B],[4,this.renderNode(U)]):[3,22];case 20:Q.sent(),Q.label=21;case 21:return B++,[3,19];case 22:f=0,g=r.zeroOrAutoZIndexOrTransformedOrOpacity,Q.label=23;case 23:return f<g.length?(U=g[f],[4,this.renderStack(U)]):[3,26];case 24:Q.sent(),Q.label=25;case 25:return f++,[3,23];case 26:h=0,w=r.positiveZIndex,Q.label=27;case 27:return h<w.length?(U=w[h],[4,this.renderStack(U)]):[3,30];case 28:Q.sent(),Q.label=29;case 29:return h++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(r){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(r.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(r){this.ctx.beginPath(),this.formatPath(r),this.ctx.closePath()},A.prototype.formatPath=function(r){var t=this;r.forEach(function(n,a){var o=HA(n)?n.start:n;a===0?t.ctx.moveTo(o.x,o.y):t.ctx.lineTo(o.x,o.y),HA(n)&&t.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},A.prototype.renderRepeat=function(r,t,n,a){this.path(r),this.ctx.fillStyle=t,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},A.prototype.resizeImage=function(r,t,n){var a;if(r.width===t&&r.height===n)return r;var o=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,l=o.createElement("canvas");l.width=Math.max(1,t),l.height=Math.max(1,n);var s=l.getContext("2d");return s.drawImage(r,0,0,r.width,r.height,0,0,t,n),l},A.prototype.renderBackgroundImage=function(r){return CA(this,void 0,void 0,function(){var t,n,a,o,l,s;return UA(this,function(c){switch(c.label){case 0:t=r.styles.backgroundImage.length-1,n=function(d){var B,u,f,H,W,L,I,Y,S,g,H,W,L,I,Y,h,w,U,Q,E,m,y,p,V,S,T,H,b,k,I,Y,q,W,L,X,$,uA,P,K,O,QA,sA;return UA(this,function(iA){switch(iA.label){case 0:if(d.type!==0)return[3,5];B=void 0,u=d.url,iA.label=1;case 1:return iA.trys.push([1,3,,4]),[4,a.context.cache.match(u)];case 2:return B=iA.sent(),[3,4];case 3:return iA.sent(),a.context.logger.error("Error loading background-image "+u),[3,4];case 4:return B&&(f=ro(r,t,[B.width,B.height,B.width/B.height]),H=f[0],W=f[1],L=f[2],I=f[3],Y=f[4],S=a.ctx.createPattern(a.resizeImage(B,I,Y),"repeat"),a.renderRepeat(H,S,W,L)),[3,6];case 5:$p(d)?(g=ro(r,t,[null,null,null]),H=g[0],W=g[1],L=g[2],I=g[3],Y=g[4],h=jp(d.angle,I,Y),w=h[0],U=h[1],Q=h[2],E=h[3],m=h[4],y=document.createElement("canvas"),y.width=I,y.height=Y,p=y.getContext("2d"),V=p.createLinearGradient(U,E,Q,m),ul(d.stops,w).forEach(function(nA){return V.addColorStop(nA.stop,dA(nA.color))}),p.fillStyle=V,p.fillRect(0,0,I,Y),I>0&&Y>0&&(S=a.ctx.createPattern(y,"repeat"),a.renderRepeat(H,S,W,L))):AQ(d)&&(T=ro(r,t,[null,null,null]),H=T[0],b=T[1],k=T[2],I=T[3],Y=T[4],q=d.position.length===0?[Na]:d.position,W=eA(q[0],I),L=eA(q[q.length-1],Y),X=Xp(d,W,L,I,Y),$=X[0],uA=X[1],$>0&&uA>0&&(P=a.ctx.createRadialGradient(b+W,k+L,0,b+W,k+L,$),ul(d.stops,$*2).forEach(function(nA){return P.addColorStop(nA.stop,dA(nA.color))}),a.path(H),a.ctx.fillStyle=P,$!==uA?(K=r.bounds.left+.5*r.bounds.width,O=r.bounds.top+.5*r.bounds.height,QA=uA/$,sA=1/QA,a.ctx.save(),a.ctx.translate(K,O),a.ctx.transform(1,0,0,QA,0,0),a.ctx.translate(-K,-O),a.ctx.fillRect(b,sA*(k-O)+O,I,Y*sA),a.ctx.restore()):a.ctx.fill())),iA.label=6;case 6:return t--,[2]}})},a=this,o=0,l=r.styles.backgroundImage.slice(0).reverse(),c.label=1;case 1:return o<l.length?(s=l[o],[5,n(s)]):[3,4];case 2:c.sent(),c.label=3;case 3:return o++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(r,t,n){return CA(this,void 0,void 0,function(){return UA(this,function(a){return this.path(Es(n,t)),this.ctx.fillStyle=dA(r),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(r,t,n,a){return CA(this,void 0,void 0,function(){var o,l;return UA(this,function(s){switch(s.label){case 0:return t<3?[4,this.renderSolidBorder(r,n,a)]:[3,2];case 1:return s.sent(),[2];case 2:return o=rw(a,n),this.path(o),this.ctx.fillStyle=dA(r),this.ctx.fill(),l=nw(a,n),this.path(l),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(r){return CA(this,void 0,void 0,function(){var t,n,a,o,l,s,c,d,B=this;return UA(this,function(u){switch(u.label){case 0:return this.applyEffects(r.getEffects(2)),t=r.container.styles,n=!oe(t.backgroundColor)||t.backgroundImage.length,a=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],o=hw(Pe(t.backgroundClip,0),r.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),oe(t.backgroundColor)||(this.ctx.fillStyle=dA(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(r.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(f){B.ctx.save();var g=Lr(r.curves),h=f.inset?0:dw,w=ew(g,-h+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(B.path(g),B.ctx.clip(),B.mask(w)):(B.mask(g),B.ctx.clip(),B.path(w)),B.ctx.shadowOffsetX=f.offsetX.number+h,B.ctx.shadowOffsetY=f.offsetY.number,B.ctx.shadowColor=dA(f.color),B.ctx.shadowBlur=f.blur.number,B.ctx.fillStyle=f.inset?dA(f.color):"rgba(0,0,0,1)",B.ctx.fill(),B.ctx.restore()}),u.label=2;case 2:l=0,s=0,c=a,u.label=3;case 3:return s<c.length?(d=c[s],d.style!==0&&!oe(d.color)&&d.width>0?d.style!==2?[3,5]:[4,this.renderDashedDottedBorder(d.color,d.width,l,r.curves,2)]:[3,11]):[3,13];case 4:return u.sent(),[3,11];case 5:return d.style!==3?[3,7]:[4,this.renderDashedDottedBorder(d.color,d.width,l,r.curves,3)];case 6:return u.sent(),[3,11];case 7:return d.style!==4?[3,9]:[4,this.renderDoubleBorder(d.color,d.width,l,r.curves)];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(d.color,l,r.curves)];case 10:u.sent(),u.label=11;case 11:l++,u.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(r,t,n,a,o){return CA(this,void 0,void 0,function(){var l,s,c,d,B,u,f,g,h,w,U,Q,E,m,y,p,y,p;return UA(this,function(V){return this.ctx.save(),l=aw(a,n),s=Es(a,n),o===2&&(this.path(s),this.ctx.clip()),HA(s[0])?(c=s[0].start.x,d=s[0].start.y):(c=s[0].x,d=s[0].y),HA(s[1])?(B=s[1].end.x,u=s[1].end.y):(B=s[1].x,u=s[1].y),n===0||n===2?f=Math.abs(c-B):f=Math.abs(d-u),this.ctx.beginPath(),o===3?this.formatPath(l):this.formatPath(s.slice(0,2)),g=t<3?t*3:t*2,h=t<3?t*2:t,o===3&&(g=t,h=t),w=!0,f<=g*2?w=!1:f<=g*2+h?(U=f/(2*g+h),g*=U,h*=U):(Q=Math.floor((f+h)/(g+h)),E=(f-Q*g)/(Q-1),m=(f-(Q+1)*g)/Q,h=m<=0||Math.abs(h-E)<Math.abs(h-m)?E:m),w&&(o===3?this.ctx.setLineDash([0,g+h]):this.ctx.setLineDash([g,h])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=dA(r),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(HA(s[0])&&(y=s[3],p=s[0],this.ctx.beginPath(),this.formatPath([new N(y.end.x,y.end.y),new N(p.start.x,p.start.y)]),this.ctx.stroke()),HA(s[1])&&(y=s[1],p=s[2],this.ctx.beginPath(),this.formatPath([new N(y.end.x,y.end.y),new N(p.start.x,p.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(r){return CA(this,void 0,void 0,function(){var t;return UA(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=dA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=tw(r),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(Vs),fw=function(e){return e instanceof Xl||e instanceof jl?!0:e instanceof Ya&&e.type!==Zr&&e.type!==kr},hw=function(e,A){switch(e){case 0:return Lr(A);case 2:return PF(A);case 1:default:return Gr(A)}},gw=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Uw=["-apple-system","system-ui"],pw=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(A){return Uw.indexOf(A)===-1}):e},Qw=function(e){kA(A,e);function A(r,t){var n=e.call(this,r,t)||this;return n.canvas=t.canvas?t.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=t,n.canvas.width=Math.floor(t.width*t.scale),n.canvas.height=Math.floor(t.height*t.scale),n.canvas.style.width=t.width+"px",n.canvas.style.height=t.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-t.x,-t.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),n}return A.prototype.render=function(r){return CA(this,void 0,void 0,function(){var t,n;return UA(this,function(a){switch(a.label){case 0:return t=Ka(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,r),[4,Fw(t)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=dA(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]}})})},A}(Vs),Fw=function(e){return new Promise(function(A,r){var t=new Image;t.onload=function(){A(t)},t.onerror=r,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},ww=function(){function e(A){var r=A.id,t=A.enabled;this.id=r,this.enabled=t,this.start=Date.now()}return e.prototype.debug=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,rr([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,rr([this.id,this.getTime()+"ms"],A))},e.prototype.warn=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,rr([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.prototype.error=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,rr([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},e.instances={},e}(),Ew=function(){function e(A,r){var t;this.windowBounds=r,this.instanceName="#"+e.instanceCount++,this.logger=new ww({id:this.instanceName,enabled:A.logging}),this.cache=(t=A.cache)!==null&&t!==void 0?t:new JF(this,A)}return e.instanceCount=1,e}(),Cw=function(e,A){return A===void 0&&(A={}),mw(e,A)};typeof window<"u"&&gs.setContext(window);var mw=function(e,A){return CA(void 0,void 0,void 0,function(){var r,t,n,a,o,l,s,c,d,B,u,f,g,h,w,U,Q,E,m,y,V,p,V,S,T,H,b,k,I,Y,q,W,L,X,$,uA,P,K,O,QA;return UA(this,function(sA){switch(sA.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(r=e.ownerDocument,!r)throw new Error("Element is not attached to a Document");if(t=r.defaultView,!t)throw new Error("Document is not attached to a Window");return n={allowTaint:(S=A.allowTaint)!==null&&S!==void 0?S:!1,imageTimeout:(T=A.imageTimeout)!==null&&T!==void 0?T:15e3,proxy:A.proxy,useCORS:(H=A.useCORS)!==null&&H!==void 0?H:!1},a=la({logging:(b=A.logging)!==null&&b!==void 0?b:!0,cache:A.cache},n),o={windowWidth:(k=A.windowWidth)!==null&&k!==void 0?k:t.innerWidth,windowHeight:(I=A.windowHeight)!==null&&I!==void 0?I:t.innerHeight,scrollX:(Y=A.scrollX)!==null&&Y!==void 0?Y:t.pageXOffset,scrollY:(q=A.scrollY)!==null&&q!==void 0?q:t.pageYOffset},l=new zA(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),s=new Ew(a,l),c=(W=A.foreignObjectRendering)!==null&&W!==void 0?W:!1,d={allowTaint:(L=A.allowTaint)!==null&&L!==void 0?L:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:c,copyStyles:c},s.logger.debug("Starting document clone with size "+l.width+"x"+l.height+" scrolled to "+-l.left+","+-l.top),B=new fs(s,e,d),u=B.clonedReferenceElement,u?[4,B.toIFrame(r,l)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=sA.sent(),g=ja(u)||VF(u)?eU(u.ownerDocument):nr(s,u),h=g.width,w=g.height,U=g.left,Q=g.top,E=Vw(s,u,A.backgroundColor),m={canvas:A.canvas,backgroundColor:E,scale:($=(X=A.scale)!==null&&X!==void 0?X:t.devicePixelRatio)!==null&&$!==void 0?$:1,x:((uA=A.x)!==null&&uA!==void 0?uA:0)+U,y:((P=A.y)!==null&&P!==void 0?P:0)+Q,width:(K=A.width)!==null&&K!==void 0?K:Math.ceil(h),height:(O=A.height)!==null&&O!==void 0?O:Math.ceil(w)},c?(s.logger.debug("Document cloned, using foreign object rendering"),V=new Qw(s,m),[4,V.render(u)]):[3,3];case 2:return y=sA.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+U+","+Q+" with size "+h+"x"+w+" using computed rendering"),s.logger.debug("Starting DOM parsing"),p=ql(s,u),E===p.styles.backgroundColor&&(p.styles.backgroundColor=XA.TRANSPARENT),s.logger.debug("Starting renderer for element at "+m.x+","+m.y+" with size "+m.width+"x"+m.height),V=new uw(s,m),[4,V.render(p)];case 4:y=sA.sent(),sA.label=5;case 5:return(!((QA=A.removeContainer)!==null&&QA!==void 0)||QA)&&(fs.destroy(f)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,y]}})})},Vw=function(e,A,r){var t=A.ownerDocument,n=t.documentElement?mt(e,getComputedStyle(t.documentElement).backgroundColor):XA.TRANSPARENT,a=t.body?mt(e,getComputedStyle(t.body).backgroundColor):XA.TRANSPARENT,o=typeof r=="string"?mt(e,r):r===null?XA.TRANSPARENT:4294967295;return A===t.documentElement?oe(n)?oe(a)?o:a:n:o};const xE="",Rw={class:"label-designer"},yw={class:"toolbar"},Tw={class:"center-container"},Nw={class:"center-toolbar"},Iw={class:"zoom-controls"},vw=["disabled"],Sw=["disabled"],Mw={class:"canvas-container"},Hw={class:"ruler-horizontal"},bw={class:"ruler-vertical"},xw={key:0,class:"drag-extend-lines"},kw=["data-item-id","onMousedown","onClick"],Zw=["onMousedown"],Ww=["onMousedown"],Ow=["onMousedown"],Dw=["onMousedown"],Jw=["onMousedown"],Kw=["onMousedown"],Lw=["onMousedown"],Gw=["onClick"],Yw={class:"property-panel",tabindex:"0"},zw={class:"position-controls"},jw={class:"control-group"},Xw={class:"number-input"},Pw={class:"control-group"},_w={class:"number-input"},qw={key:0,class:"control-group"},$w={class:"number-input"},AE={key:1,class:"control-group"},eE={class:"number-input"},tE={class:"control-group"},rE={class:"number-input"},nE={key:2,class:"control-group"},aE={class:"switch-input"},oE=BA({__name:"panels",props:{templateData:{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"}},setup(e,{expose:A}){const r=e,t=i.ref({}),n=i.ref(0),a=i.ref([]),o=i.ref(1);let l=1;const s=i.computed(()=>{var C;return((C=t.value)==null?void 0:C.printWidth)||0}),c=i.computed(()=>{var C;return((C=t.value)==null?void 0:C.printHeight)||0});i.ref(!1);const d=i.ref(!1),B=i.ref(!1),u=i.ref(new Map),f=i.ref(new Map),g=new Map(wi.map(C=>[C.type,C])),{selectedItems:h,selectItem:w,getCurrentSelected:U,clearSelection:Q}=jg(),{dragging:E,dragItem:m,startDrag:y}=Yg({scale:o,canvasWidth:s,canvasHeight:c,selectItem:w,onStartDrag:()=>{d.value=!0},onStopDrag:()=>{d.value=!1,i.nextTick(()=>{B.value=!1})}}),{startResize:p}=zg(s,c,o,h),{startRotate:V}=Xg();i.watch(()=>h.value,()=>{u.value.clear()},{deep:!0});const S=C=>{const F=`${C.id}_${C.props.x.toFixed(1)}_${C.props.y.toFixed(1)}_${C.props.width}_${C.props.height}_${C.props.rotation}`;if(f.value.has(F))return f.value.get(F);const Z=(C.props.rotation||0)*Math.PI/180,D=[{x:0,y:0},{x:C.props.width,y:0},{x:C.props.width,y:C.props.height},{x:0,y:C.props.height}],M=C.props.width/2,J=C.props.height/2,R=D.map(AA=>{const G=AA.x-M,WA=AA.y-J,oo=G*Math.cos(Z)-WA*Math.sin(Z),io=G*Math.sin(Z)+WA*Math.cos(Z);return{x:Number((oo+M+C.props.x).toFixed(2)),y:Number((io+J+C.props.y).toFixed(2))}});if(f.value.set(F,R),f.value.size>100){const AA=f.value.keys().next().value;f.value.delete(AA)}return R},T=C=>{const F=S(C),x=F.map(G=>G.x),Z=F.map(G=>G.y),D=Number(Math.min(...x).toFixed(2)),M=Number(Math.max(...x).toFixed(2)),J=Number(Math.min(...Z).toFixed(2)),R=Number(Math.max(...Z).toFixed(2));return{minX:D,maxX:M,minY:J,maxY:R,width:M-D,height:R-J,centerX:(D+M)/2,centerY:(J+R)/2}},H=(C,F)=>{const x=T(C);if(C.type==="horline"&&F==="bottom"){const M=parseFloat(C.props.LineWidth||"0.75")*1.333/3.78;return{top:x.minY+M+"mm"}}if(C.type==="verline"&&F==="right"){const M=parseFloat(C.props.LineWidth||"0.75")*1.333/3.78;return{left:x.minX+M+"mm"}}switch(F){case"left":return{left:x.minX+"mm"};case"right":return{left:x.maxX+"mm"};case"top":return{top:x.minY+"mm"};case"bottom":return{top:x.maxY+"mm"};default:return{}}};function b(){const C=document.createElement("div");C.style.width="1mm",C.style.position="absolute",C.style.visibility="hidden",document.body.appendChild(C);const F=C.offsetWidth;return document.body.removeChild(C),F}const I=1/b(),Y=()=>{i.nextTick(()=>{const C=document.querySelector(".canvas-container");if(!C||!s.value||!c.value)return;const F=C.getBoundingClientRect(),x=jt(s.value),Z=jt(c.value);let D=F.width/x,M=F.height/Z;D=D-40*D/x,M=M-40*M/Z;let J=Math.min(D,M);l=Math.max(.8,Math.min(4,J)),o.value=l=q(l,1),setTimeout(()=>n.value=1,100)})};function q(C,F){C=C.toString();let x=C.indexOf(".");return x!==-1?C=C.substring(0,F+x+1):C=C.substring(0),Number(parseFloat(C).toFixed(F))}const W=C=>g.get(C)||null,L=C=>{const F=h.value.indexOf(C),x=F===h.value.length-1,Z=F!==-1,D=`${C.id}_${Math.round(C.props.x*10)}_${Math.round(C.props.y*10)}_${C.props.width}_${C.props.height}_${C.props.rotation}_${Z}_${x}`;if(u.value.has(D))return u.value.get(D);const M={width:C.props.width+"mm",height:C.props.height+"mm",transform:`translate(${C.props.x}mm, ${C.props.y}mm) rotate(${C.props.rotation}deg)`};if(Z?x?M.zIndex=1e3:M.zIndex=999:M.zIndex=10,u.value.set(D,M),u.value.size>200){const J=u.value.keys().next().value;u.value.delete(J)}return M},X=C=>{const F=h.value.some(Z=>Z.id===C.id),x=U()===C;return{"component-selected":F,"component-current":F&&x,"no-outline":F&&(C.type==="horline"||C.type==="verline")}},$=(C,F)=>{const Z=((C.props.rotation||0)%360+360)%360;if(C.type==="horline"&&(F==="left"||F==="right"))return{cursor:F==="left"?"w-resize":"e-resize",top:"50%",transform:"translateY(-50%)"};if(C.type==="verline"&&(F==="top"||F==="bottom"))return{cursor:F==="top"?"n-resize":"s-resize",left:"50%",transform:"translateX(-50%)"};const M=({top:0,"top-right":45,right:90,"bottom-right":135,bottom:180,"bottom-left":225,left:270,"top-left":315}[F]+Z)%360;let J="pointer";return M>=337.5||M<22.5?J="n-resize":M>=22.5&&M<67.5?J="ne-resize":M>=67.5&&M<112.5?J="e-resize":M>=112.5&&M<157.5?J="se-resize":M>=157.5&&M<202.5?J="s-resize":M>=202.5&&M<247.5?J="sw-resize":M>=247.5&&M<292.5?J="w-resize":M>=292.5&&M<337.5&&(J="nw-resize"),{cursor:J}},uA=()=>{o.value<4&&(o.value+=.1)},P=()=>{o.value>.8&&(o.value-=.1)};function K(C){const F=document.activeElement.tagName.toLowerCase();if(F==="input"||F==="textarea")return;const x=U();if(!x)return;let Z=!1;C.key==="ArrowLeft"?(x.props.x=Number((x.props.x-I).toFixed(2)),Z=!0):C.key==="ArrowRight"?(x.props.x=Number((x.props.x+I).toFixed(2)),Z=!0):C.key==="ArrowUp"?(x.props.y=Number((x.props.y-I).toFixed(2)),Z=!0):C.key==="ArrowDown"&&(x.props.y=Number((x.props.y+I).toFixed(2)),Z=!0),Z&&C.preventDefault()}const O=({e:C,comp:F,previewDiv:x})=>{var Z,D;(Z=C==null?void 0:C.dataTransfer)==null||Z.setData("comp",JSON.stringify(F)),document.body.appendChild(x),(D=C==null?void 0:C.dataTransfer)==null||D.setDragImage(x,0,0),setTimeout(()=>document.body.removeChild(x),0)},QA=async C=>{var tn,ys,Ts;C.preventDefault();const F=JSON.parse(((ys=(tn=C==null?void 0:C.dataTransfer)==null?void 0:tn.getData)==null?void 0:ys.call(tn,"comp"))||"{}")||{},x=(F==null?void 0:F.type)||"";if(!x)return;const Z=document.querySelector("#design").getBoundingClientRect(),D=(C.clientX-Z.left)/o.value,M=(C.clientY-Z.top)/o.value,J=wA.value[x]||{};let R=_o(D),AA=_o(M);const G=J.width,WA=J.height,oo=s.value-G,io=c.value-WA;R=Math.max(0,Math.min(R,oo)),AA=Math.max(0,Math.min(AA,io));const{propertyPanel:JE,...sE}=J;let en={...sE,x:Number(R.toFixed(2)),y:Number(AA.toFixed(2)),width:Number(G.toFixed(2)),height:Number(WA.toFixed(2))};if((Ts=wA.value[x])!=null&&Ts.propertyPanel){const lo=he(wA.value[x].propertyPanel)||{};if(en={...en,...lo},x==="horline"&&lo.LineWidth){const cE=parseFloat(lo.LineWidth)*.3528;en.height=Number(cE.toFixed(3))}}const Rs={id:Ce(),type:x,props:en};a.value.push(Rs),w(Rs)};function sA(C){let F=C.target;for(;F&&F!==document.querySelector("#design");){if(F.classList&&(F.classList.contains("canvas-item")||F.classList.contains("resize-handle")||F.classList.contains("delete-btn")||F.classList.contains("rotate-handle")))return;F=F.parentElement}Q()}const iA=(C,F)=>{if(h.value.length===0){w(F),y(C,F);return}if(U()===F){y(C,F);return}w(F),y(C,F)},nA=C=>{const F=[];for(const D of u.value.keys())D.includes(C)&&F.push(D);F.forEach(D=>u.value.delete(D));const x=[];for(const D of f.value.keys())D.includes(C)&&x.push(D);if(x.forEach(D=>f.value.delete(D)),u.value.clear(),f.value.clear(),a.value.find(D=>D.id===C)&&(a.value=a.value.filter(D=>D.id!==C)),h.value.some(D=>D.id===C)){const D=h.value.filter(M=>M.id!==C);h.value=D}i.nextTick(()=>{})},FA=C=>{var x;const F=document.activeElement.tagName.toLowerCase();F==="input"||F==="textarea"||(C.key==="Delete"||C.key==="Backspace")&&h.value.length>0&&nA((x=U())==null?void 0:x.id)},{handleMouseWheel:fA,handleInputChange:we,adjustRotation:_r}=_g(h,s,c),Ee=()=>{setTimeout(()=>{const C=document.querySelector(".center-container");if(!C)return;const F=C.getBoundingClientRect();C.style.height=`calc(100vh - ${F==null?void 0:F.top}px)`,Y()},200)};i.watch(()=>r.templateData,(C,F)=>{C!==F&&(t.value=C||{},a.value=(C==null?void 0:C.items)||[],Ee())},{deep:!0,immediate:!0});const{handleCopy:qr,handlePaste:$r}=qg(a,h,s,c),wA=i.ref({}),xA=i.ref(!1);i.onMounted(async()=>{try{wA.value=await wg(r.templateType),xA.value=!0}catch(C){console.error("Failed to load props config:",C),wA.value={},xA.value=!0}window.addEventListener("resize",Ee),window.addEventListener("keydown",FA),window.addEventListener("keydown",qr),window.addEventListener("keydown",$r),window.addEventListener("keydown",K),Ee(),An()}),i.onBeforeUnmount(()=>{window.removeEventListener("resize",Ee),window.removeEventListener("keydown",FA),window.removeEventListener("keydown",qr),window.removeEventListener("keydown",$r),window.removeEventListener("keydown",K)});function Ce(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,C=>{const F=Math.random()*16|0;return(C==="x"?F:F&3|8).toString(16)})}const ce=()=>Pg(a,t.value),no=C=>{t.value.graphData=C||{},An()},An=()=>{var F;const C=AU(t.value.graphData)||"";C&&((F=document.querySelector("#design"))==null||F.appendChild(C))},ao=()=>new Promise((C,F)=>{o.value=1,setTimeout(()=>{Q(),JSON.parse(JSON.stringify(a.value));const x=JSON.parse(JSON.stringify(a.value));x==null||x.forEach(M=>{var J,R;if(M.type=="text"){const AA=((R=(J=r.options)==null?void 0:J.fields)==null?void 0:R.find(G=>{var WA;return G.value==((WA=M==null?void 0:M.props)==null?void 0:WA.FieldName)}))||{};M.props.Text=M.props.Text||(AA==null?void 0:AA.label)}}),[...x];const Z=()=>{o.value=l},D=()=>{var R;const M=((R=document.querySelector("#design"))==null?void 0:R.querySelectorAll("img"))||[],J=Array.from(M).map(AA=>AA.complete?Promise.resolve():new Promise(G=>{AA.onload=AA.onerror=G}));return Promise.all(J)};i.nextTick(()=>{const M=document.querySelector("#design");if(!M){Z(),F(new Error("找不到要转换的DOM元素"));return}D().then(()=>{Cw(M,{scale:window.devicePixelRatio*(o.value<200?5:3),useCORS:!0,allowTaint:!0,backgroundColor:null,logging:!1,onclone:J=>{const R=J.querySelector("#design");if(R){const AA=window.getComputedStyle(M);for(let G=0;G<AA.length;G++){const WA=AA[G];R.style[WA]=AA.getPropertyValue(WA)}}}}).then(J=>{Z();const R=J.toDataURL("image/png");C({data:ce(),image:R})}).catch(J=>{Z(),F(J)})}).catch(J=>{Z(),F(J)})})},300)});return A({getJson:()=>ce(),clear:()=>{a.value=[],Q()},snapshot:()=>ao()}),(C,F)=>{var J;const x=i.resolveComponent("el-icon-refresh-left"),Z=i.resolveComponent("el-icon"),D=i.resolveComponent("el-icon-close"),M=i.resolveComponent("el-switch");return i.openBlock(),i.createElementBlock("div",Rw,[i.createElementVNode("div",yw,[i.createVNode(Tg,{onDragStart:O})]),i.createElementVNode("div",Tw,[i.createElementVNode("div",Nw,[e.showGraphConfig?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(Gg,{"graph-data":t.value.graphData,onSuccess:no},null,8,["graph-data"]),F[24]||(F[24]=i.createElementVNode("div",{style:{width:"30px"}},null,-1))],64)):i.createCommentVNode("",!0),i.createElementVNode("div",Iw,[i.createElementVNode("button",{onClick:P,disabled:o.value<=.8},"-",8,vw),i.createElementVNode("span",null,i.toDisplayString(Math.round(o.value*100))+"%",1),i.createElementVNode("button",{onClick:uA,disabled:o.value>=4},"+",8,Sw)])]),i.createElementVNode("div",Mw,[i.createElementVNode("div",{class:"canvas-wrapper",style:i.normalizeStyle(`transform: scale(${o.value});opacity: ${n.value};`)},[s.value&&c.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",Hw,[i.createVNode(Ei,{direction:"horizontal",length:s.value},null,8,["length"])]),i.createElementVNode("div",bw,[i.createVNode(Ei,{direction:"vertical",length:c.value},null,8,["length"])])],64)):i.createCommentVNode("",!0),i.createElementVNode("div",{id:"design",class:"canvas",style:i.normalizeStyle(`width: ${s.value}mm; height: ${c.value}mm;`),onDrop:QA,onDragover:F[1]||(F[1]=i.withModifiers(()=>{},["prevent"])),onPointerdown:sA},[i.unref(E)&&i.unref(m)?(i.openBlock(),i.createElementBlock("div",xw,[i.createElementVNode("div",{class:"drag-extend-line vertical",style:i.normalizeStyle(H(i.unref(m),"left"))},null,4),i.createElementVNode("div",{class:"drag-extend-line vertical",style:i.normalizeStyle(H(i.unref(m),"right"))},null,4),i.createElementVNode("div",{class:"drag-extend-line horizontal",style:i.normalizeStyle(H(i.unref(m),"top"))},null,4),i.createElementVNode("div",{class:"drag-extend-line horizontal",style:i.normalizeStyle(H(i.unref(m),"bottom"))},null,4)])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,R=>{var AA;return i.openBlock(),i.createElementBlock("div",{key:R.id,class:i.normalizeClass(["canvas-item",X(R)]),style:i.normalizeStyle(L(R)),"data-item-id":R.id,onMousedown:i.withModifiers(G=>iA(G,R),["stop"]),onClick:i.withModifiers(G=>i.unref(w)(R),["stop"])},[i.unref(U)()===R?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[R.props.lockAspectRatio?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[R.type!=="verline"&&R.type!=="horline"?(i.openBlock(),i.createElementBlock("div",{key:0,class:"resize-handle right",style:i.normalizeStyle($(R,"right")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"right"),["stop"])},null,44,Zw)):i.createCommentVNode("",!0),R.type!=="horline"?(i.openBlock(),i.createElementBlock("div",{key:1,class:"resize-handle bottom",style:i.normalizeStyle($(R,"bottom")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"bottom"),["stop"])},null,44,Ww)):i.createCommentVNode("",!0),R.type!=="verline"?(i.openBlock(),i.createElementBlock("div",{key:2,class:"resize-handle left",style:i.normalizeStyle($(R,"left")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"left"),["stop"])},null,44,Ow)):i.createCommentVNode("",!0)],64)),R.type!=="horline"&&R.type!=="verline"?(i.openBlock(),i.createElementBlock("div",{key:1,class:"resize-handle top-left",style:i.normalizeStyle($(R,"top-left")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"top-left"),["stop"])},null,44,Dw)):i.createCommentVNode("",!0),R.type!=="horline"&&R.type!=="verline"?(i.openBlock(),i.createElementBlock("div",{key:2,class:"resize-handle bottom-right",style:i.normalizeStyle($(R,"bottom-right")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"bottom-right"),["stop"])},null,44,Jw)):i.createCommentVNode("",!0),R.type!=="horline"&&R.type!=="verline"?(i.openBlock(),i.createElementBlock("div",{key:3,class:"resize-handle bottom-left",style:i.normalizeStyle($(R,"bottom-left")),onMousedown:i.withModifiers(G=>i.unref(p)(G,R,"bottom-left"),["stop"])},null,44,Kw)):i.createCommentVNode("",!0),R.type!=="verline"?(i.openBlock(),i.createElementBlock("div",{key:4,class:"rotate-handle",onMousedown:i.withModifiers(G=>i.unref(V)(G,R),["stop"])},[i.createVNode(Z,{size:"6"},{default:i.withCtx(()=>[i.createVNode(x)]),_:1})],40,Lw)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"delete-btn",onMousedown:F[0]||(F[0]=i.withModifiers(()=>{},["stop"])),onClick:i.withModifiers(G=>nA(R.id),["stop"]),title:"删除"},[i.createVNode(Z,{size:"6"},{default:i.withCtx(()=>[i.createVNode(D)]),_:1})],40,Gw)],64)):i.createCommentVNode("",!0),R.props&&xA.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(((AA=W(R.type))==null?void 0:AA.component)||null),{key:`${R.id}-${R.type}`,modelValue:{...R.props,__selected:i.unref(U)()===R},propsConfig:wA.value,"onUpdate:modelValue":G=>{Object.assign(R.props,G)}},null,8,["modelValue","propsConfig","onUpdate:modelValue"])):i.createCommentVNode("",!0)],46,kw)}),128))],36)],4)])]),i.createElementVNode("div",Yw,[i.unref(h).length>0?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[F[31]||(F[31]=i.createElementVNode("h3",{class:"property-panel-title"},"属性设置",-1)),i.createElementVNode("div",zw,[i.createElementVNode("div",jw,[F[25]||(F[25]=i.createElementVNode("label",null,"X坐标:",-1)),i.createElementVNode("div",Xw,[i.createElementVNode("button",{onClick:F[2]||(F[2]=R=>i.unref(fA)(R,"x",-.5))},"-"),i.withDirectives(i.createElementVNode("input",{type:"number","onUpdate:modelValue":F[3]||(F[3]=R=>i.unref(U)().props.x=R),onInput:F[4]||(F[4]=R=>i.unref(we)("x",R.target.value))},null,544),[[i.vModelText,i.unref(U)().props.x,void 0,{number:!0}]]),i.createElementVNode("button",{onClick:F[5]||(F[5]=R=>i.unref(fA)(R,"x",.5))},"+")])]),i.createElementVNode("div",Pw,[F[26]||(F[26]=i.createElementVNode("label",null,"Y坐标:",-1)),i.createElementVNode("div",_w,[i.createElementVNode("button",{onClick:F[6]||(F[6]=R=>i.unref(fA)(R,"y",-.5))},"-"),i.withDirectives(i.createElementVNode("input",{type:"number","onUpdate:modelValue":F[7]||(F[7]=R=>i.unref(U)().props.y=R),onInput:F[8]||(F[8]=R=>i.unref(we)("y",R.target.value))},null,544),[[i.vModelText,i.unref(U)().props.y,void 0,{number:!0}]]),i.createElementVNode("button",{onClick:F[9]||(F[9]=R=>i.unref(fA)(R,"y",.5))},"+")])]),i.unref(U)().type!=="verline"?(i.openBlock(),i.createElementBlock("div",qw,[F[27]||(F[27]=i.createElementVNode("label",null,"宽度:",-1)),i.createElementVNode("div",$w,[i.createElementVNode("button",{onClick:F[10]||(F[10]=R=>i.unref(fA)(R,"width",-.5,1))},"-"),i.withDirectives(i.createElementVNode("input",{type:"number","onUpdate:modelValue":F[11]||(F[11]=R=>i.unref(U)().props.width=R),onInput:F[12]||(F[12]=R=>i.unref(we)("width",R.target.value))},null,544),[[i.vModelText,i.unref(U)().props.width,void 0,{number:!0}]]),i.createElementVNode("button",{onClick:F[13]||(F[13]=R=>i.unref(fA)(R,"width",.5,1))},"+")])])):i.createCommentVNode("",!0),i.unref(U)().type!=="horline"?(i.openBlock(),i.createElementBlock("div",AE,[F[28]||(F[28]=i.createElementVNode("label",null,"高度:",-1)),i.createElementVNode("div",eE,[i.createElementVNode("button",{onClick:F[14]||(F[14]=R=>i.unref(fA)(R,"height",-.5,1))},"-"),i.withDirectives(i.createElementVNode("input",{type:"number","onUpdate:modelValue":F[15]||(F[15]=R=>i.unref(U)().props.height=R),onInput:F[16]||(F[16]=R=>i.unref(we)("height",R.target.value))},null,544),[[i.vModelText,i.unref(U)().props.height,void 0,{number:!0}]]),i.createElementVNode("button",{onClick:F[17]||(F[17]=R=>i.unref(fA)(R,"height",.5,1))},"+")])])):i.createCommentVNode("",!0),i.createElementVNode("div",tE,[F[29]||(F[29]=i.createElementVNode("label",null,"旋转:",-1)),i.createElementVNode("div",rE,[i.createElementVNode("button",{onClick:F[18]||(F[18]=R=>i.unref(_r)(-1))},"-"),i.withDirectives(i.createElementVNode("input",{type:"number","onUpdate:modelValue":F[19]||(F[19]=R=>i.unref(U)().props.rotation=R),onInput:F[20]||(F[20]=R=>i.unref(we)("rotation",R.target.value))},null,544),[[i.vModelText,i.unref(U)().props.rotation,void 0,{number:!0}]]),i.createElementVNode("button",{onClick:F[21]||(F[21]=R=>i.unref(_r)(1))},"+")])]),i.unref(U)().type!=="horline"?(i.openBlock(),i.createElementBlock("div",nE,[F[30]||(F[30]=i.createElementVNode("label",null,"锁定宽高比:",-1)),i.createElementVNode("div",aE,[i.createVNode(M,{modelValue:i.unref(U)().props.lockAspectRatio,"onUpdate:modelValue":F[22]||(F[22]=R=>i.unref(U)().props.lockAspectRatio=R),"active-value":!0,"inactive-value":!1},null,8,["modelValue"])])])):i.createCommentVNode("",!0)]),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(((J=W(i.unref(U)().type))==null?void 0:J.propertyPanel)||null),{modelValue:i.unref(U)().props,"onUpdate:modelValue":F[23]||(F[23]=R=>i.unref(U)().props=R),options:e.options,"props-config":wA.value[i.unref(U)().type]||{}},null,8,["modelValue","options","props-config"]))],64)):i.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-82147119"]]),ZE="",Pr=BA({__name:"index",props:{templateData:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})}},setup(e){const A=i.getCurrentInstance(),r=e,t=i.ref(!1),n=i.ref(),a=i.ref(0),o=i.ref(!1),l=(g,h)=>{let w;return function(...Q){const E=()=>{clearTimeout(w),g(...Q)};clearTimeout(w),w=setTimeout(E,h)}},s=i.ref({rectTop:0,isInModal:!1}),c=()=>{if(!n.value)return;const g=n.value.getBoundingClientRect(),h=B(n.value);let w=0;if(g.top>0)w=g.top;else if(h){const U=u(n.value);w=U>0?U:60}else{const U=n.value.offsetTop;U>0?w=U:w=60}(w!==s.value.rectTop||h!==s.value.isInModal)&&(a.value=w,o.value=h,s.value={rectTop:w,isInModal:h})},d=l(c,100),B=g=>{let h=g.parentElement;for(;h;){if(h.classList&&(h.classList.contains("el-dialog")||h.classList.contains("el-drawer")||h.classList.contains("sc-dialog")))return!0;h=h.parentElement}return!1},u=g=>{let h=g.parentElement;for(;h;){if(h.classList&&(h.classList.contains("el-dialog")||h.classList.contains("el-drawer")||h.classList.contains("sc-dialog"))){const w=h.getBoundingClientRect();return w.top>0?w.top:60}h=h.parentElement}return 60};i.onMounted(()=>{setTimeout(()=>c(),100),setTimeout(()=>c(),300),window.addEventListener("resize",d),i.onBeforeUnmount(()=>{window.removeEventListener("resize",d)})}),i.watch(()=>t.value,g=>{g&&i.nextTick(()=>setTimeout(()=>c(),50))}),i.watch(()=>r.templateData,async g=>{t.value=(g==null?void 0:g.width)>0&&(g==null?void 0:g.height)>0},{deep:!0,immediate:!0});function f(g){A.exposed=g||{},A.exposeProxy=g||{}}return(g,h)=>{const w=i.resolveDirective("loading");return i.withDirectives((i.openBlock(),i.createElementBlock("div",{ref_key:"templateDesignerRef",ref:n,class:i.normalizeClass(["template-designer",{"template-designer-border-top":o.value}]),style:i.normalizeStyle({height:"calc(100vh - "+a.value+"px)"})},[t.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.h(oE,{...g.$attrs,...r,ref:f},g.$slots)),{key:0})):i.createCommentVNode("",!0)],6)),[[w,!t.value]])}}},[["__scopeId","data-v-9a302bda"]]);Pr.install=e=>{e.component(Pr.name||"TemplateDesigner",Pr)};const iE=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{x:0,y:0,width:20,height:5,rotation:0,text:"测试文本",fontSize:12,fontFamily:"黑体",fontWeight:"normal",fontStyle:"normal",textAlign:"left",color:"#000000",propertyPanel:[{prop:"text",label:"文本内容",type:"text"},{prop:"fontSize",label:"字体大小",type:"number",min:1,max:100},{prop:"fontFamily",label:"字体",type:"select",optionsKey:"FONT_FAMILIES"},{prop:"fontWeight",label:"字体粗细",type:"select",optionsKey:"FONT_WEIGHTS"},{prop:"fontStyle",label:"字体样式",type:"select",optionsKey:"FONT_STYLES"},{prop:"textAlign",label:"对齐方式",type:"select",optionsKey:"TEXT_ALIGNS"},{prop:"color",label:"颜色",type:"color"}]},barcode:{x:0,y:0,width:40,height:20,rotation:0,barcodeType:"CODE128",barcodeValue:"123456789",fontSize:12,propertyPanel:[{prop:"barcodeValue",label:"条码内容",type:"text"},{prop:"barcodeType",label:"条码格式",type:"select",optionsKey:"BARCODE_FORMATS"},{prop:"width",label:"条码宽度",type:"number",min:1,max:200},{prop:"height",label:"条码高度",type:"number",min:1,max:200},{prop:"fontSize",label:"文本大小",type:"number",min:8,max:72}]},qrcode:{x:0,y:0,width:20,height:20,rotation:0,qrcodeValue:"FB-GOLD",margin:4,errorCorrectionLevel:"M",propertyPanel:[{prop:"qrcodeValue",label:"二维码内容",type:"text"},{prop:"width",label:"二维码尺寸",type:"number",min:1,max:1e3},{prop:"margin",label:"边距",type:"number",min:0,max:20},{prop:"errorCorrectionLevel",label:"纠错级别",type:"select",optionsKey:"QRCODE_ERROR_LEVELS"}]}}},Symbol.toStringTag,{value:"Module"})),lE=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{width:20,height:4.2,rotation:0,lockAspectRatio:!1,propertyPanel:[{prop:"Title",label:"标题",default:""},{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:""},{prop:"Text",label:"测试数据",default:"测试文本"},{prop:"FontName",label:"字体名称",type:"select",options:[{label:"黑体",value:"黑体",cssValue:"SimHei"},{label:"楷体",value:"楷体",cssValue:"KaiTi"},{label:"宋体",value:"宋体",cssValue:"SimSun"}],default:"黑体"},{prop:"FontSize",label:"字体大小",type:"number",min:1,max:100,default:10},{prop:"FontColor",label:"字体颜色",type:"color",hide:!0,default:"#000000"},{prop:"Bold",label:"字体加粗",type:"select",options:[{label:"加粗",value:1},{label:"不加粗",value:0}],default:0},{prop:"Italic",label:"是否斜体",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"Underline",label:"下划线",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,hide:!0},{prop:"Alignment",label:"对齐方式",type:"select",options:[{label:"居左",value:1},{label:"居中",value:2},{label:"居右",value:3}],default:2},{prop:"TextWrap",label:"文本换行",type:"select",options:[{label:"换行",value:1},{label:"不换行&省略",value:2},{label:"不换行&隐藏",value:3}],default:1},{prop:"HOrient",label:"水平锁定",type:"select",options:[{label:"无",value:0},{label:"左边距锁定",value:1},{label:"右边距锁定",value:2},{label:"水平居中",value:3}],hide:!0,default:0},{prop:"VOrient",label:"垂直锁定",type:"select",options:[{label:"无",value:0},{label:"上边距锁定",value:1},{label:"下边距锁定",value:2},{label:"垂直居中",value:3}],hide:!0,default:0},{prop:"PenWidth",label:"线宽",type:"number",min:0,hide:!0,default:0},{prop:"PenStyle",label:"线型",type:"select",hide:!0,options:[{label:"实线",value:0},{label:"破折线",value:1},{label:"点线",value:2},{label:"点划线",value:3},{label:"双点划线",value:4}],default:0},{prop:"Stretch",label:"缩放模式",type:"select",options:[{label:"扩展",value:1},{label:"缩放",value:2}],hide:!0,default:1},{prop:"PreviewOnly",label:"仅预览",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"ReadOnly",label:"只读",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0}]},barcode:{width:20,height:6,rotation:0,lockAspectRatio:!1,propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"goodsSn"},{prop:"BarcodeValue",label:"测试数据",type:"text",default:"1234567890"},{prop:"CodeType",label:"条码类型",type:"select",options:[{label:"CODE128",value:"128Auto",compValue:"CODE128"},{label:"CODE39",value:"Code39",compValue:"CODE39"},{label:"EAN13",value:"EAN13",compValue:"EAN13"}],hide:!0,default:"128Auto"},{prop:"AlignJustify",label:"对齐方式",type:"select",options:[{label:"两端对齐",value:0},{label:"左",value:1},{label:"中",value:2},{label:"右",value:3}],hide:!0,default:0},{prop:"LineColor",label:"条形码颜色",type:"color",hide:!0,default:"#000000"}]},qrcode:{width:10,height:10,rotation:0,lockAspectRatio:!0,propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:""},{prop:"QRCodeValue",label:"测试数据",type:"text",default:"FB-GOLD"},{prop:"QRCodeVersion",label:"二维码版本",type:"number",min:1,max:40,hide:!0,default:7},{prop:"QRCodeErrorLevel",label:"纠错级别",type:"select",options:[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}],hide:!0,default:"Q"},{prop:"QRCodeEncodeMode",label:"编码模式",type:"select",options:[{label:"数字",value:"N"},{label:"二进制或汉语",value:"B"},{label:"英文字母",value:"A"}],hide:!0,default:"B"},{prop:"QRCodeForeground",label:"前景色",type:"color",hide:!0,default:"#000000"},{prop:"QRCodeBackground",label:"背景景色",type:"color",hide:!0,default:"transparent"}]},image:{width:12,height:12,rotation:0,lockAspectRatio:!1,propertyPanel:[{prop:"ImageSrc",label:"图片地址",type:"file",accept:"image/*",default:""},{prop:"ScaleMode",label:"图片缩放",type:"select",options:[{label:"原始尺寸",value:1},{label:"居中裁剪",value:2},{label:"填充",value:3}],default:1}]},rectangle:{width:15,height:10,rotation:0,lockAspectRatio:!1,propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.75pt",options:[{label:"0.75pt",value:"0.75pt"},{label:"1.5pt",value:"1.5pt"},{label:"2.25pt",value:"2.25pt"},{label:"3pt",value:"3pt"},{label:"3.75pt",value:"3.75pt"},{label:"4.5pt",value:"4.5pt"},{label:"5.25pt",value:"5.25pt"},{label:"6pt",value:"6pt"},{label:"6.75pt",value:"6.75pt"}]},{prop:"LineStyle",type:"select",label:"样式",default:"实线",options:[{label:"实线",value:"实线"},{label:"虚线",value:"虚线"}]},{prop:"BorderRadius",type:"number",label:"圆角",default:0,min:0,step:1}]},horline:{width:15,height:.75,rotation:0,lockAspectRatio:!1,propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.75pt",options:[{label:"0.75pt",value:"0.75pt"},{label:"1.5pt",value:"1.5pt"},{label:"2.25pt",value:"2.25pt"},{label:"3pt",value:"3pt"},{label:"3.75pt",value:"3.75pt"},{label:"4.5pt",value:"4.5pt"},{label:"5.25pt",value:"5.25pt"},{label:"6pt",value:"6pt"},{label:"6.75pt",value:"6.75pt"}]},{prop:"LineStyle",type:"select",label:"样式",default:"实线",options:[{label:"实线",value:"实线"},{label:"虚线",value:"虚线"}]}]}}},Symbol.toStringTag,{value:"Module"}));return Pr});
|