/*! * FormCreate商业版可视化表单设计器-让表单设计更简单 * fc-designer-pro v5.6.0 * (c) 2018-2025 FormCreate Team https://form-create.com/ * license 仅限于被授权主体(个人、企业或组织)使用 */ (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('._fc-data-table{width:100%}._fc-data-table .ant-pagination{display:flex;margin-top:10px}._fc-data-table .ant-pagination.left{justify-content:flex-start}._fc-data-table .ant-pagination.center{justify-content:center}._fc-data-table .ant-pagination.right{justify-content:flex-end}._fc-data-table ._fc-data-table-img-list .ant-image{height:60px;max-width:150px}._fc-data-table ._fc-data-table-img-list .ant-image img{height:100%;object-fit:cover;width:100%}._fc-data-table .ant-btn+.ant-btn{margin-left:12px}._fc-table{overflow:auto}._fc-table>table{border-bottom:1px solid #ebeef5;border-right:1px solid #ebeef5;border-color:#ebeef5 currentcolor currentcolor #ebeef5;border-style:solid none none solid;border-width:1px 0 0 1px;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-table td,._fc-table tr{min-height:50px}._fc-table td{border-bottom:0;border-right:0;border-color:currentcolor #ebeef5 #ebeef5 currentcolor;border-style:none solid solid none;border-width:0 1px 1px 0;box-sizing:border-box;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:5px;position:relative}._fc-step-form{width:100%}._fc-step-form>.ant-steps{margin-bottom:20px}._fc-line-form{display:flex;flex-wrap:wrap;width:100%}._fc-line-form .ant-form-item{flex:none;flex-wrap:nowrap;margin-inline-end:16px;margin-bottom:0}.form-create ._fc-line-form ._fc-line-form,.form-create ._fc-line-form ._fd-drag-item,.form-create ._fc-line-form ._fd-drag-tool,.form-create ._fc-line-form .ant-col-24{display:inline-flex;flex:initial;flex:unset!important;flex-wrap:wrap;max-width:100%;width:auto!important}._fc-m-con .form-create ._fc-line-form>.ant-col-24{width:100%!important}._fc-line-form .ant-select,._fc-line-form .ant-slider{width:220px}._fc-nested-table-form{color:var(--fc-text-color-2);overflow:auto}._fc-nested-table-form .form-create .ant-form-item{margin-bottom:1px!important}._fc-nested-table-form .ant-form-item-label,._fc-nested-table-form .van-field__label{display:none!important}._fc-ntf-table ._fc-ntf-head-idx,._fc-ntf-table ._fc-ntf-idx{font-weight:500;min-width:40px;padding:0;text-align:center;width:40px}._fc-ntf-idx div{border:1px solid #bfbfbf;border-radius:6px;cursor:pointer;display:inline-flex;height:18px;justify-content:center;line-height:16px;width:18px}._fc-ntf-sub-idx{width:30px}._fc-ntf-btn,._fc-ntf-edit{min-width:70px;text-align:center;width:70px}._fc-ntf-btn .fc-icon{cursor:pointer}._fc-nested-table-form>.ant-btn{align-items:center;display:flex;padding:2px}._fc-nested-table-form._fc-disabled ._fc-ntf-btn .fc-icon,._fc-nested-table-form._fc-disabled>.ant-btn{cursor:not-allowed}._fc-ntf-table{border:1px solid #ebeef5;border-bottom:0;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-ntf-table>thead>tr>th{border:0;border-bottom:1px solid #ebeef5;font-weight:500;height:40px}._fc-ntf-table>thead>tr>th+th{border-left:1px solid #ebeef5}._fc-ntf-table tr{min-height:50px}._fc-ntf-table ._fc-read-view{text-align:center;width:100%}._fc-ntf-table td{border:0;border-bottom:1px solid #ebeef5;box-sizing:border-box;min-height:50px;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:10px;position:relative}._fc-ntf-table td+td{border-left:1px solid #ebeef5}._fc-ntf-table .ant-cascader,._fc-ntf-table .ant-input-number,._fc-ntf-table .ant-picker,._fc-ntf-table .ant-select,._fc-ntf-table .ant-slider{width:100%}._fc-nested-table-form ._fc-ntf-sub{background-color:#fafafa}._fc-ntf-sub ._fc-table-form{background-color:var(--fc-bg-color-1)}._fc-ntf-sub ._fc-tf-table{border:0}._fc-ntf-idx+._fc-ntf-idx,._fc-ntf-sub-idx+._fc-ntf-head-idx{border-left:0}._fc-ntf-head-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-infinite-table-form{color:var(--fc-text-color-2);overflow:auto}._fc-infinite-table-form .form-create .ant-form-item{margin-bottom:1px}._fc-infinite-table-form .ant-form-item-label,._fc-infinite-table-form .van-field__label{display:none!important}._fc-itf-table ._fc-itf-head-idx,._fc-itf-table ._fc-itf-idx{font-weight:500;min-width:40px;padding:0;text-align:center;width:40px}._fc-itf-idx div{border:1px solid #bfbfbf;border-radius:6px;cursor:pointer;display:inline-flex;height:18px;justify-content:center;line-height:16px;width:18px}._fc-itf-sub-idx{width:30px}._fc-itf-btn,._fc-itf-edit{min-width:70px;text-align:center;width:70px}._fc-itf-btn .fc-icon{cursor:pointer}._fc-infinite-table-form>.ant-btn{align-items:center;display:flex;padding:2px}._fc-infinite-table-form._fc-disabled ._fc-itf-btn .fc-icon,._fc-infinite-table-form._fc-disabled>.ant-btn{cursor:not-allowed}._fc-itf-table{border:1px solid #ebeef5;border-bottom:0;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-itf-table>thead>tr>th{border:0;border-bottom:1px solid #ebeef5;font-weight:500;height:40px}._fc-itf-table ._fc-itf-table>thead{display:none}._fc-itf-table ._fc-itf-table{border-right:0}._fc-itf-table>thead>tr>th+th{border-left:1px solid #ebeef5}._fc-itf-table tr{min-height:50px}._fc-itf-table ._fc-read-view{text-align:center;width:100%}._fc-itf-table td{border:0;border-bottom:1px solid #ebeef5;box-sizing:border-box;min-height:50px;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:10px;position:relative}._fc-itf-table td+td{border-left:1px solid #ebeef5}._fc-itf-table .ant-cascader,._fc-itf-table .ant-input-number,._fc-itf-table .ant-picker,._fc-itf-table .ant-select,._fc-itf-table .ant-slider{width:100%}._fc-infinite-table-form ._fc-itf-sub{padding:5px 0 5px 10px}._fc-itf-sub ._fc-table-form{background-color:var(--fc-bg-color-1)}._fc-itf-sub ._fc-tf-table{border:0}._fc-itf-idx+._fc-itf-idx,._fc-itf-sub-idx+._fc-itf-head-idx{border-left:0}._fc-itf-head-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-table-form{color:var(--fc-text-color-2);overflow:auto}._fc-table-form .form-create .ant-form-item{margin-bottom:1px!important}._fc-table-form .ant-form-item-label,._fc-table-form .van-field__label{display:none!important}._fc-tf-head-idx,._fc-tf-idx{font-weight:500;min-width:40px;text-align:center;width:40px}._fc-tf-btn,._fc-tf-edit{min-width:70px;text-align:center;width:70px}._fc-tf-btn .fc-icon{cursor:pointer}._fc-table-form>.ant-btn{align-items:center;display:flex;padding:2px}._fc-table-form._fc-disabled ._fc-tf-btn .fc-icon,._fc-table-form._fc-disabled>.ant-btn{cursor:not-allowed}._fc-tf-table{border:1px solid #ebeef5;border-bottom:0;height:100%;overflow:hidden;table-layout:fixed;width:100%}._fc-table-form ._fc-tf-table>thead>tr>th{border:0;border-bottom:1px solid #ebeef5;font-weight:500;height:40px}._fc-table-form ._fc-tf-table>thead>tr>th+th{border-left:1px solid #ebeef5}._fc-table-form tr{min-height:50px}._fc-table-form ._fc-read-view{text-align:center;width:100%}._fc-table-form td{border:0;border-bottom:1px solid #ebeef5;box-sizing:border-box;min-height:50px;min-width:80px;overflow:hidden;overflow-wrap:break-word;padding:5px;position:relative}._fc-table-form td+td{border-left:1px solid #ebeef5}._fc-tf-table .ant-cascader,._fc-tf-table .ant-input-number,._fc-tf-table .ant-picker,._fc-tf-table .ant-select,._fc-tf-table .ant-slider{width:100%}._fc-tf-head-required:before{color:#f56c6c;content:"*";margin-right:4px}._fc-dialog-fullscreen .ant-modal{margin:0;max-width:100%;padding-bottom:0;top:0;width:100%!important}._fc-dialog-fullscreen .ant-modal-content{display:flex;flex-direction:column;height:100vh}._fc-dialog-fullscreen .ant-modal-body{flex:1}._fc-drawer .ant-drawer-close{background:transparent;border:0;color:#00000073;cursor:pointer;display:inline-block;font-size:16px;font-style:normal;font-weight:600;line-height:1;margin-inline-end:12px;outline:0;text-align:center;text-decoration:none;text-rendering:auto;text-transform:none;transition:color .2s}._fc-echarts{height:300px;width:100%}._fc-signature{width:100%}._fc-signature-btn,._fc-signature-preview{background:#fff;border:1px dashed #d4d7e0;border-radius:4px;box-sizing:border-box;color:#c9ccd8;font-size:14px;height:88px;line-height:88px;min-width:160px;position:relative;text-align:center;width:100%}._fc-signature-btn{cursor:pointer}._fc-signature-preview>img{display:inline-block;height:88px}._fc-signature-preview .icon-delete2{cursor:pointer;display:inline-block;font-size:14px;line-height:14px;position:absolute;right:9px;top:9px}._fc-signature-btn i{font-size:14px}._fc-signature-pad{background-image:linear-gradient(#fff 14px,transparent 0),linear-gradient(90deg,#fff 14px,#d4d7e0 0);background-size:15px 15px;border:1px dashed #d4d7e0;border-radius:4px}._fc-title{font-size:16px;font-weight:600;margin-bottom:16px;margin-top:1em;width:100%}._fc-title.h1,._fc-title.h2{border-bottom:1px solid #eee;padding-bottom:.3em}._fc-title.h1{font-size:32px;line-height:1.2}._fc-title.h2{font-size:24px;line-height:1.225}._fc-title.h3{font-size:20px;line-height:1.43}._fc-title.h4{font-size:16px}._fc-title.h5{font-size:14px}._fc-title.h6{font-size:12px}._fc-iframe-box,._fc-video-box{width:100%}._fc-cell{display:inline-block}._fc-cell .ant-cascader,._fc-cell .ant-input-number,._fc-cell .ant-picker,._fc-cell .ant-select,._fc-cell .ant-slider{width:100%}._fc-upload-preview{border-radius:5px;display:inline-block;height:120px;overflow:hidden;width:120px}._fc-upload-preview>.ant-image{height:100%}.form-create.is-preview .ant-upload,.form-create.is-preview .ant-upload-list-item-action{display:none!important}@font-face{font-family:fc-icon;src:url(data:font/woff;base64,d09GRgABAAAAAE6gAAsAAAAAm8AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAARAAAAGA8V0nTY21hcAAAAYgAAAPZAAAJyrF9uXtnbHlmAAAFZAAAQeoAAIOYSQ6LLmhlYWQAAEdQAAAALwAAADYquA6laGhlYQAAR4AAAAAeAAAAJAfeBJlobXR4AABHoAAAAFsAAAJkexAAAGxvY2EAAEf8AAABNAAAATSML64ebWF4cAAASTAAAAAfAAAAIAG9APxuYW1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WqoMyKckSpF2434x6PHfpmQH5KVCaqqIz1Pb5YU3PRdm8BYCAcHRWaGVKeCpc5b8nn44NLQ037zEKcjynfjUTtTZoLzSvCLttwfqbpyGIi5ESUOcnlZmVN5TZYDvKU5crmmvrrh6bJfHZMKkt5ICuzZmqZG+toTSpXMakNjEhaMVpfrgzYD7uRZN1iksr3o/AMQmcsxtaySpValdTULhFOuDv+jCJppuXG4cIWzajD/yzXxlG7YhiKpr1we1YyKlElQ6NZpF7js3kDnWY7bEZhtdNsBfYixVfGqhAj2lwqE2rZhdZvLFfy4BR75F/p5hrEDGe3HxeqrF3MLqr7UWEsReE11ax6zae2KiGTwgyUprTieVaIfS6bLGeqTLmFLDhstcqjsNhe2DmxQqra9ZyYsCmU1iTTvZpckzCXW6N1GFTl2468b9LApYkbC+YtnQirgp9aM3Jr8zWmkCuDItQNj4U3WQ0tKsdfThX3xRkbBIJ63CYjY+lzH7MkNQdYk/VRLqxMG7cNzD57zeUihGJQe2/KcLDIGifHI45E1ZYqJNhGgdc1SXPI3IOLxr7QSTCFsXETvyhQysw4NzVWxoEA02KvJXPtI8ugY4ZrbDLHFe04JqOsiwHZuIlU978QHchTPwpZjLiiTD3ts7ok2t4Y7VUVOW186pkLNyTL6R91pnyPLYTdjQIHcXNOpzHuWGkZ8Vu/xY+tAykMQQ0Yu01Z47rNA9tzC62s/APehQ0CAA==) format("woff")}.fc-icon{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:fc-icon!important;font-size:16px;font-style:normal}.icon-location:before{content:"\\e6d4"}.icon-qrcode:before{content:"\\e6ce"}.icon-input-id:before{content:"\\e6d1"}.icon-iframe:before{content:"\\e6d2"}.icon-audio:before{content:"\\e6d3"}.icon-form-model:before{content:"\\e6d5"}.icon-title:before{content:"\\e6d6"}.icon-sign:before{content:"\\e6d7"}.icon-address:before{content:"\\e6d8"}.icon-statistic:before{content:"\\e6d9"}.icon-barcode:before{content:"\\e6da"}.icon-video:before{content:"\\e6db"}.icon-avatar:before{content:"\\e6dc"}.icon-suspend:before{content:"\\e6cf"}.icon-warning:before{content:"\\e6d0"}.icon-send:before{content:"\\e6cc"}.icon-refresh2:before{content:"\\e6cd"}.icon-ai:before{content:"\\e6cb"}.icon-ai.bright{-webkit-text-fill-color:transparent;background:linear-gradient(90deg,#328ff7,#62e3a3);-webkit-background-clip:text}.icon-column4:before{content:"\\e6c7"}.icon-column3:before{content:"\\e6c6"}.icon-column2:before{content:"\\e6c8"}.icon-column1:before{content:"\\e6c9"}.icon-layout:before{content:"\\e6ca"}.icon-segmented:before{content:"\\e682"}.icon-mention:before{content:"\\e6c5"}.icon-input-tag:before{content:"\\e6c4"}.icon-up:before{content:"\\e697";display:inline-block;transform:rotate(180deg)}.icon-alignitems-flexstart:before{content:"\\e67f";display:inline-block;transform:rotate(180deg)}.icon-align-center:before{content:"\\e6a5";display:inline-block;transform:rotate(90deg)}.icon-align-flexstart:before{content:"\\e6a4";display:inline-block;transform:rotate(90deg)}.icon-align-spacearound:before{content:"\\e670";display:inline-block;transform:rotate(-90deg)}.icon-align-spacebetween:before{content:"\\e695";display:inline-block;transform:rotate(-90deg)}.icon-align-stretch:before{content:"\\e6a7";display:inline-block;transform:rotate(-90deg)}.icon-align-flexend:before{content:"\\e6a4";display:inline-block;transform:rotate(-90deg)}.icon-justify-flexend:before{content:"\\e6a4";display:inline-block;transform:rotate(180deg)}.icon-direction-row:before{content:"\\e68b";display:inline-block;transform:rotate(180deg)}.icon-direction-column:before{content:"\\e68b";display:inline-block;transform:rotate(-90deg)}.icon-direction-columnreverse:before{content:"\\e68b";display:inline-block;transform:rotate(90deg)}.icon-arrow:before{content:"\\e697";display:inline-block;transform:rotate(180deg)}.icon-cell:before{content:"\\e654"}.icon-table:before{content:"\\eb0a"}.icon-next-step:before{content:"\\e6b4";display:inline-block;transform:rotateY(180deg)}.icon-grid:before{content:"\\e65c";display:inline-block;transform:rotate(90deg)}.icon-alignitems-stretch:before{content:"\\e67e"}.icon-alignitems-flexend:before{content:"\\e67f"}.icon-check:before{content:"\\e680"}.icon-auto:before{content:"\\e681"}.icon-config-event:before{content:"\\e66e"}.icon-calendar:before{content:"\\e683"}.icon-config-style:before{content:"\\e684"}.icon-copy:before{content:"\\e676"}.icon-config-advanced:before{content:"\\e686"}.icon-config-props:before{content:"\\e687"}.icon-delete-circle2:before{content:"\\e688"}.icon-delete-circle:before,.icon-delete2:before{content:"\\e689"}.icon-delete:before{content:"\\e68a"}.icon-direction-rowreverse:before{content:"\\e68b"}.icon-display-flex:before{content:"\\e68c"}.icon-dialog:before{content:"\\e66f"}.icon-drag:before{content:"\\e68e"}.icon-display-block:before{content:"\\e68f"}.icon-data:before{content:"\\e690"}.icon-edit2:before{content:"\\e691"}.icon-edit:before{content:"\\e692"}.icon-add-col:before{content:"\\e693"}.icon-display-inlineblock:before{content:"\\e694"}.icon-config-base:before{content:"\\e6bf"}.icon-config-validate:before{content:"\\e696"}.icon-down:before{content:"\\e697"}.icon-display-inline:before{content:"\\e698"}.icon-eye:before{content:"\\e699"}.icon-eye-close:before{content:"\\e69a"}.icon-import:before{content:"\\e6a6"}.icon-preview:before{content:"\\e69b"}.icon-flex-nowrap:before{content:"\\e69c"}.icon-folder:before{content:"\\e69d"}.icon-form-circle:before{content:"\\e69e"}.icon-flex-wrap:before{content:"\\e69f"}.icon-form:before{content:"\\e6a0"}.icon-form-item:before{content:"\\e6a1"}.icon-icon:before{content:"\\e6a2"}.icon-image:before{content:"\\e6a3"}.icon-justify-flexstart:before{content:"\\e6a4"}.icon-justify-center:before{content:"\\e6a5"}.icon-justify-spacearound:before{content:"\\e670"}.icon-justify-stretch:before{content:"\\e6a7"}.icon-link2:before{content:"\\e6a8"}.icon-justify-spacebetween:before{content:"\\e695"}.icon-minus:before{content:"\\e6aa"}.icon-menu2:before{content:"\\e6ab"}.icon-more:before{content:"\\e6ac"}.icon-menu:before{content:"\\e6ad"}.icon-language:before{content:"\\e6ae"}.icon-pad:before{content:"\\e6af"}.icon-mobile:before{content:"\\e6b0"}.icon-page-max:before{content:"\\e6b1"}.icon-move:before{content:"\\e6b2"}.icon-page-min:before{content:"\\e6b3"}.icon-pre-step:before{content:"\\e6b4"}.icon-pc:before{content:"\\e6b5"}.icon-page:before{content:"\\e6b6"}.icon-refresh:before{content:"\\e6b7"}.icon-radius:before{content:"\\e6b8"}.icon-save-filled:before{content:"\\e6b9"}.icon-question:before{content:"\\e6ba"}.icon-scroll:before{content:"\\e6bb"}.icon-script:before{content:"\\e6bc"}.icon-setting:before{content:"\\e6bd"}.icon-save-online:before,.icon-save:before{content:"\\e6be"}.icon-task-add:before{content:"\\e68d"}.icon-shadow:before{content:"\\e6c0"}.icon-variable:before{content:"\\e6c1"}.icon-yes:before{content:"\\e6c2"}.icon-shadow-inset:before{content:"\\e6c3"}.icon-date:before{content:"\\e642"}.icon-date-range:before{content:"\\e643"}.icon-collapse:before{content:"\\e644"}.icon-slider:before{content:"\\e665"}.icon-switch:before{content:"\\e646"}.icon-subform:before{content:"\\e647"}.icon-time-range:before{content:"\\e685"}.icon-tree-select:before{content:"\\e649"}.icon-value:before{content:"\\e64a"}.icon-table-form3:before{content:"\\e6a9"}.icon-alert:before{content:"\\e64c"}.icon-card:before{content:"\\e64d"}.icon-checkbox:before{content:"\\e64e"}.icon-cascader:before{content:"\\e64f"}.icon-button:before{content:"\\e650"}.icon-data-table:before{content:"\\e651"}.icon-group:before{content:"\\e652"}.icon-divider:before{content:"\\e653"}.icon-flex:before{content:"\\e654"}.icon-descriptions:before{content:"\\e655"}.icon-html:before{content:"\\e656"}.icon-editor:before{content:"\\e657"}.icon-input:before{content:"\\e658"}.icon-link:before{content:"\\e659"}.icon-password:before{content:"\\e65a"}.icon-radio:before{content:"\\e65b"}.icon-row:before{content:"\\e65c"}.icon-inline:before{content:"\\e65d"}.icon-rate:before{content:"\\e65e"}.icon-color:before{content:"\\e65f"}.icon-select:before{content:"\\e660"}.icon-json:before{content:"\\e661"}.icon-number:before{content:"\\e662"}.icon-space:before{content:"\\e664"}.icon-step-form:before{content:"\\e663"}.icon-table-form:before{content:"\\e666"}.icon-table-form2:before{content:"\\e667"}.icon-time:before{content:"\\e668"}.icon-span:before{content:"\\e669"}.icon-textarea:before{content:"\\e66a"}.icon-tooltip:before{content:"\\e66b"}.icon-slot:before{content:"\\e66c"}.icon-transfer:before{content:"\\e66d"}.icon-upload:before{content:"\\e673"}.icon-tag:before{content:"\\e671"}.icon-watermark:before{content:"\\e672"}.icon-tab:before{content:"\\e674"}.icon-tree:before{content:"\\e675"}.icon-table:before{content:"\\e677"}.icon-add-child:before{content:"\\e678"}.icon-add2:before{content:"\\e679"}.icon-add:before{content:"\\e67a"}.icon-alignitems-baseline:before{content:"\\e67b"}.icon-add-circle:before{content:"\\e67c"}.icon-alignitems-center:before{content:"\\e67d"}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})(); import { defineComponent as $e, resolveComponent as fe, createVNode as W, Fragment as ht, mergeProps as it, nextTick as Ee, markRaw as De, watch as Ve, reactive as ke, computed as kt, toRef as mn, openBlock as J, createElementBlock as ae, isVNode as No, getCurrentInstance as Wn, ref as zo, createElementVNode as he, provide as Uo, inject as qo, toRefs as Wr, onBeforeMount as Go, watchEffect as Ho, onMounted as Xo, onBeforeUnmount as Wo, onUpdated as Jo, withDirectives as Yo, createApp as Qo, h as Ze, resolveDirective as Ko, createBlock as Pe, withCtx as we, normalizeStyle as Fi, renderList as cn, renderSlot as gn, createCommentVNode as ut, toDisplayString as Me, shallowRef as Jr, resolveDynamicComponent as Tt, createTextVNode as Ie, normalizeClass as $n, onUnmounted as ki, createSlots as Zo } from "vue"; import { message as Mi } from "ant-design-vue"; /*! * @form-create/ant-design-vue v3.2.18 * (c) 2018-2025 xaboy * Github https://github.com/xaboy/form-create * Released under the MIT License. */ function Yr(t, e) { var n = Object.keys(t); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(t); e && (r = r.filter(function(i) { return Object.getOwnPropertyDescriptor(t, i).enumerable; })), n.push.apply(n, r); } return n; } function z(t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e] != null ? arguments[e] : {}; e % 2 ? Yr(Object(n), !0).forEach(function(r) { Ae(t, r, n[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Yr(Object(n)).forEach(function(r) { Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r)); }); } return t; } function _e(t) { return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? _e = function(e) { return typeof e; } : _e = function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, _e(t); } function ea(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Ae(t, e, n) { return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t; } function ta(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), e && Jn(t, e); } function vn(t) { return vn = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) { return n.__proto__ || Object.getPrototypeOf(n); }, vn(t); } function Jn(t, e) { return Jn = Object.setPrototypeOf || function(r, i) { return r.__proto__ = i, r; }, Jn(t, e); } function na() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), !0; } catch { return !1; } } function ra(t) { if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t; } function ia(t, e) { if (e && (typeof e == "object" || typeof e == "function")) return e; if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); return ra(t); } function oa(t) { var e = na(); return function() { var r = vn(t), i; if (e) { var a = vn(this).constructor; i = Reflect.construct(r, arguments, a); } else i = r.apply(this, arguments); return ia(this, i); }; } function oe(t) { return aa(t) || sa(t) || ua(t) || la(); } function aa(t) { if (Array.isArray(t)) return Yn(t); } function sa(t) { if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t); } function ua(t, e) { if (!!t) { if (typeof t == "string") return Yn(t, e); var n = Object.prototype.toString.call(t).slice(8, -1); if (n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set") return Array.from(t); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Yn(t, e); } } function Yn(t, e) { (e == null || e > t.length) && (e = t.length); for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n]; return r; } function la() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function gt(t) { return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t]; } function fa(t, e) { return Object.keys(t).reduce(function(n, r) { return (!e || e.indexOf(r) === -1) && (n[r] = t[r]), n; }, {}); } var Ti = { name: "PlusOutlined" }, ca = { class: "anticon" }, da = /* @__PURE__ */ he("svg", { height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [/* @__PURE__ */ he("defs"), /* @__PURE__ */ he("path", { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z", fill: "currentColor" }), /* @__PURE__ */ he("path", { d: "M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z", fill: "currentColor" })], -1), ha = [da]; function pa(t, e, n, r, i, a) { return J(), ae("span", ca, ha); } Ti.render = pa; var ji = { name: "UploadOutlined" }, ma = { class: "anticon" }, ga = /* @__PURE__ */ he("svg", { focusable: "false", "data-icon": "upload", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, [/* @__PURE__ */ he("path", { d: "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" })], -1), va = [ga]; function _a(t, e, n, r, i, a) { return J(), ae("span", ma, va); } ji.render = _a; var Qr = function(e, n) { return _e(e) === "object" ? e : { url: e, is_string: !0, name: ya(e), status: "done", uid: -1 * (n + 1) }; }, ya = function(e) { return ("" + e).split("/").pop(); }, Kr = function(e) { return z(z({}, e), {}, { file: e, value: e }); }, ba = "fcUpload", wa = $e({ name: ba, inheritAttrs: !1, formCreateParser: { toFormValue: function(e) { return gt(e); }, toValue: function(e, n) { return n.prop.props.limit === 1 ? e[0] || "" : e; } }, props: { limit: { type: Number, default: 0 }, modelValue: { type: [Array, String, Object], default: function() { return []; } }, onSuccess: { type: Function, required: !0 }, onPreview: Function, listType: String, modalTitle: String, customRequest: Function, formCreateInject: Object, previewMask: void 0 }, emits: ["update:modelValue", "change", "fc.el"], data: function() { return { previewImage: "", previewVisible: !1, uploadList: this.modelValue.map(Qr).map(Kr) }; }, watch: { modelValue: function(e) { this.uploadList = e.map(Qr).map(Kr); } }, methods: { handlePreview: function(e) { this.onPreview ? this.onPreview.apply(this, arguments) : (this.previewImage = e.url, this.previewVisible = !0); }, handleChange: function(e) { var n = e.file, r = e.fileList; this.$emit.apply(this, ["change"].concat(Array.prototype.slice.call(arguments))), this.uploadList = r, n.status === "done" ? (this.onSuccess(n, r), this.input()) : n.status === "removed" && (r.forEach(function(i, a) { i.file === n && r.splice(a, 1); }), this.input()); }, input: function() { this.$emit("update:modelValue", this.uploadList.map(function(e) { return e.is_string ? e.url : e.value || e.url; })); }, doCustomRequest: function(e) { if (this.customRequest) return this.customRequest(e); e.source = "upload", this.formCreateInject.api.fetch(e); } }, render: function() { var e, n, r = this, i = !this.limit || this.limit > this.uploadList.length, a = fe("AModal"), o = Ae({}, a.props.open ? "open" : "visible", this.previewVisible); return W(ht, null, [W(fe("AUpload"), it({ maxCount: this.limit, listType: this.listType || "picture-card" }, this.$attrs, { onPreview: this.handlePreview, onChange: this.handleChange, fileList: this.uploadList, customRequest: this.doCustomRequest, ref: "upload" }), z({ default: function() { return [i ? (e = (n = r.$slots).default) !== null && e !== void 0 && e.call(n) || ["text", "picture"].indexOf(r.listType) === -1 ? W(Ti, { style: "font-size: 16px; width: 16px;" }, null) : W(fe("AButton"), null, { default: function() { return [W(ji, null, null), r.formCreateInject.t("clickToUpload") || "\u70B9\u51FB\u4E0A\u4F20"]; } }) : null]; } }, fa(this.$slots, ["default"]))), W(a, it({ mask: this.previewMask, title: this.modalTitle }, o, { onCancel: function() { return r.previewVisible = !1; }, footer: null }), { default: function() { return [W("img", { style: "width: 100%", src: r.previewImage }, null)]; } })]); }, mounted: function() { this.$emit("fc.el", this.$refs.upload); } }); function Ii(t) { t = t || /* @__PURE__ */ new Map(); var e = { $on: function(r, i) { var a = t.get(r), o = a && a.push(i); o || t.set(r, [i]); }, $once: function(r, i) { i._once = !0, e.$on(r, i); }, $off: function(r, i) { var a = t.get(r); a && a.splice(a.indexOf(i) >>> 0, 1); }, $emit: function(r) { for (var i = arguments.length, a = new Array(i > 1 ? i - 1 : 0), o = 1; o < i; o++) a[o - 1] = arguments[o]; (t.get(r) || []).slice().map(function(s) { s._once && (e.$off(r, s), delete s._once), s.apply(void 0, a); }), (t.get("*") || []).slice().map(function(s) { s(r, a); }); } }; return e; } var Bi = { name: "CloseCircleOutlined" }, $a = { class: "anticon" }, Oa = /* @__PURE__ */ he("svg", { height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [/* @__PURE__ */ he("path", { d: "M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4l-66.1-.3c-4.4 0-8 3.5-8 8c0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 0 0-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4l66 .3c4.4 0 8-3.5 8-8c0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z", fill: "currentColor" }), /* @__PURE__ */ he("path", { d: "M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448s448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372z", fill: "currentColor" })], -1), Sa = [Oa]; function Ea(t, e, n, r, i, a) { return J(), ae("span", $a, Sa); } Bi.render = Ea; var Vi = { name: "FolderOutlined" }, Ca = { class: "anticon" }, xa = /* @__PURE__ */ he("svg", { height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [/* @__PURE__ */ he("path", { d: "M880 298.4H521L403.7 186.2a8.15 8.15 0 0 0-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z", fill: "currentColor" })], -1), Aa = [xa]; function Ra(t, e, n, r, i, a) { return J(), ae("span", Ca, Aa); } Vi.render = Ra; var Li = { name: "FileOutlined" }, Pa = { class: "anticon" }, Da = /* @__PURE__ */ he("svg", { height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [/* @__PURE__ */ he("path", { d: "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z", fill: "currentColor" })], -1), Fa = [Da]; function ka(t, e, n, r, i, a) { return J(), ae("span", Pa, Fa); } Li.render = ka; var Ni = { name: "DeleteOutlined" }, Ma = { class: "anticon" }, Ta = /* @__PURE__ */ he("svg", { height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [/* @__PURE__ */ he("path", { d: "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z", fill: "currentColor" })], -1), ja = [Ta]; function Ia(t, e, n, r, i, a) { return J(), ae("span", Ma, ja); } Ni.render = Ia; var zi = { name: "EyeOutlined" }, Ba = { class: "anticon" }, Va = /* @__PURE__ */ he("svg", { height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [/* @__PURE__ */ he("path", { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3c7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176s-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112s112 50.1 112 112s-50.1 112-112 112z", fill: "currentColor" })], -1), La = [Va]; function Na(t, e, n, r, i, a) { return J(), ae("span", Ba, La); } zi.render = Na; function lr(t, e) { e === void 0 && (e = {}); var n = e.insertAt; if (!(!t || typeof document > "u")) { var r = document.head || document.getElementsByTagName("head")[0], i = document.createElement("style"); i.type = "text/css", n === "top" && r.firstChild ? r.insertBefore(i, r.firstChild) : r.appendChild(i), i.styleSheet ? i.styleSheet.cssText = t : i.appendChild(document.createTextNode(t)); } } var za = "._fc-frame ._fc-files img{display:inline-block;height:100%;vertical-align:top;width:100%}._fc-frame ._fc-upload-cover{background:rgba(0,0,0,.6);bottom:0;left:0;opacity:0;position:absolute;right:0;top:0;transition:opacity .3s}._fc-frame ._fc-upload-cover ._fc-frame-icon{color:#fff;font-size:16px;margin:0 2px}._fc-frame ._fc-files:hover ._fc-upload-cover{opacity:1}._fc-frame .anticon{font-size:16px;width:16px}._fc-frame .ant-upload{display:block}._fc-frame ._fc-frame-icon,._fc-frame ._fc-upload-btn{cursor:pointer}._fc-frame._fc-disabled ._fc-frame-icon,._fc-frame._fc-disabled ._fc-upload-btn{color:#999;cursor:not-allowed!important}._fc-files,._fc-frame ._fc-upload-btn{background:#fff;border:1px solid #c0ccda;border-radius:4px;box-shadow:2px 2px 5px rgba(0,0,0,.1);box-sizing:border-box;display:inline-block;height:104px;line-height:104px;margin-right:4px;overflow:hidden;position:relative;text-align:center;width:104px}"; lr(za); var Ua = "fcFrame", qa = $e({ name: Ua, props: { type: { type: String, default: "input" }, field: String, helper: { type: Boolean, default: !0 }, disabled: { type: Boolean, default: !1 }, src: { type: String, required: !0 }, icon: { type: String, default: "FolderOutlined" }, width: { type: [Number, String], default: 500 }, height: { type: String, default: "370px" }, maxLength: { type: Number, default: 0 }, okBtnText: { type: String, default: "" }, closeBtnText: { type: String, default: "" }, modalTitle: String, handleIcon: { type: [String, Boolean], default: void 0 }, title: String, allowRemove: { type: Boolean, default: !0 }, onOpen: { type: Function, default: function() { } }, onOk: { type: Function, default: function() { } }, onCancel: { type: Function, default: function() { } }, onLoad: { type: Function, default: function() { } }, onBeforeRemove: { type: Function, default: function() { } }, onRemove: { type: Function, default: function() { } }, onHandle: Function, modal: { type: Object, default: function() { return {}; } }, srcKey: [String, Number], modelValue: [Array, String, Number, Object], previewMask: void 0, footer: { type: Boolean, default: !0 }, reload: { type: Boolean, default: !0 }, closeBtn: { type: Boolean, default: !0 }, okBtn: { type: Boolean, default: !0 }, formCreateInject: Object }, emits: ["update:modelValue", "change"], components: { FolderOutlined: Vi, EyeOutlined: zi }, data: function() { return { fileList: gt(this.modelValue), previewVisible: !1, frameVisible: !1, previewImage: "", bus: new Ii() }; }, watch: { modelValue: function(e) { this.fileList = gt(e); } }, methods: { close: function() { this.closeModal(!0); }, closeModal: function(e) { this.bus.$emit(e ? "$close" : "$ok"), this.reload && (this.bus.$off("$ok"), this.bus.$off("$close")), this.frameVisible = !1; }, handleCancel: function() { this.previewVisible = !1; }, showModal: function() { this.disabled || this.onOpen() === !1 || (this.frameVisible = !0); }, input: function() { var e = this.fileList, n = this.maxLength === 1 ? e[0] || "" : e; this.$emit("update:modelValue", n), this.$emit("change", n); }, makeInput: function() { var e = this, n = fe(this.icon), r = { addonAfter: function() { return W(n, { class: "_fc-frame-icon", onClick: e.showModal }, null); } }; return this.fileList.length && !this.disabled && (r.suffix = function() { return W(Bi, { class: "_fc-frame-icon", onClick: function() { e.fileList = [], e.input(); } }, null); }), W(fe("AInput"), { readonly: !0, value: this.fileList.map(function(i) { return e.getSrc(i); }).toString(), key: 1 }, r); }, makeGroup: function(e) { return (!this.maxLength || this.fileList.length < this.maxLength) && e.push(this.makeBtn()), W("div", { key: 2 }, [e]); }, makeItem: function(e, n) { return W("div", { class: "_fc-files", key: "3" + e }, [n]); }, valid: function(e) { var n = this.formCreateInject.field || this.field; if (n && e !== n) throw new Error("[frame]\u65E0\u6548\u7684\u5B57\u6BB5\u503C"); }, makeIcons: function(e, n) { if (this.handleIcon !== !1 || this.allowRemove === !0) { var r = []; return (this.type !== "file" && this.handleIcon !== !1 || this.type === "file" && this.handleIcon) && r.push(this.makeHandleIcon(e, n)), this.allowRemove && r.push(this.makeRemoveIcon(e, n)), W("div", { class: "_fc-upload-cover", key: 4 }, [r]); } }, makeHandleIcon: function(e, n) { var r = this, i = fe(this.handleIcon === !0 || this.handleIcon === void 0 ? "EyeOutlined" : this.handleIcon); return W(i, { class: "_fc-frame-icon", onClick: function() { return r.handleClick(e); }, key: "5" + n }, null); }, makeRemoveIcon: function(e, n) { var r = this; return W(Ni, { class: "_fc-frame-icon", onClick: function() { return r.handleRemove(e); }, key: "6" + n }, null); }, makeFiles: function() { var e = this; return this.makeGroup(this.fileList.map(function(n, r) { return e.makeItem(r, [W(Li, { class: "_fc-frame-icon", onClick: function() { return e.handleClick(n); } }, null), e.makeIcons(n, r)]); })); }, makeImages: function() { var e = this; return this.makeGroup(this.fileList.map(function(n, r) { return e.makeItem(r, [W("img", { src: e.getSrc(n) }, null), e.makeIcons(n, r)]); })); }, makeBtn: function() { var e = this, n = fe(this.icon); return W("div", { class: "_fc-upload-btn", onClick: function() { return e.showModal(); }, key: 7 }, [W(n, { class: "_fc-frame-icon" }, null)]); }, handleClick: function(e) { if (this.onHandle) return this.onHandle(e); this.previewImage = this.getSrc(e), this.previewVisible = !0; }, handleRemove: function(e) { this.disabled || this.onBeforeRemove(e) !== !1 && (this.fileList.splice(this.fileList.indexOf(e), 1), this.input(), this.onRemove(e)); }, getSrc: function(e) { return this.srcKey ? e[this.srcKey] : e; }, frameLoad: function(e) { var n = this; this.onLoad(e); try { this.helper === !0 && (e.form_create_helper = { api: this.formCreateInject.api, close: function(i) { n.valid(i), n.closeModal(); }, set: function(i, a) { n.valid(i), n.disabled || n.$emit("update:modelValue", a); }, get: function(i) { return n.valid(i), n.modelValue; }, onOk: function(i) { return n.bus.$on("$ok", i); }, onClose: function(i) { return n.bus.$on("$close", i); } }); } catch (r) { console.error(r); } }, makeFooter: function() { var e = this, n = this.$props, r = n.okBtnText, i = n.closeBtnText, a = n.closeBtn, o = n.okBtn, s = n.footer, u = []; return s && (a && u.push(W(fe("AButton"), { onClick: function() { return e.onCancel() !== !1 && e.closeModal(!0); } }, { default: function() { return [i || e.formCreateInject.t("close") || "\u5173\u95ED"]; } })), o && u.push(W(fe("AButton"), { type: "primary", onClick: function() { return e.onOk() !== !1 && e.closeModal(); } }, { default: function() { return [r || e.formCreateInject.t("ok") || "\u786E\u5B9A"]; } }))), u; } }, render: function() { var e = this, n = this.type, r; n === "input" ? r = this.makeInput() : n === "image" ? r = this.makeImages() : r = this.makeFiles(); var i = this.$props, a = i.width, o = a === void 0 ? "30%" : a, s = i.height, u = i.src, c = i.title, d = i.modalTitle; Ee(function() { e.$refs.frame && e.frameLoad(e.$refs.frame.contentWindow || {}); }); var v = fe("AModal"); return W("div", { class: { "_fc-frame": !0, "_fc-disabled": this.disabled } }, [r, W(v, it({ mask: this.previewMask, title: d }, Ae({}, v && v.props.open ? "open" : "visible", this.previewVisible), { onCancel: function() { return e.previewVisible = !1; }, footer: null }), { default: function() { return [W("img", { style: "width: 100%", src: e.previewImage }, null)]; } }), W(v, it(z({ width: o, title: c }, this.modal), Ae({}, v && v.props.open ? "open" : "visible", this.frameVisible), { onCancel: function() { return e.closeModal(!0); } }), { default: function() { return [e.frameVisible || !e.reload ? W("iframe", { ref: "frame", src: u, frameborder: "0", style: { height: s, border: "0 none", width: "100%" } }, null) : null]; }, footer: function() { return e.makeFooter(); } })]); }, beforeMount: function() { var e = this.formCreateInject, n = e.name, r = e.field, i = e.api; n && i.on("fc:closeModal:" + n, this.close), r && i.on("fc:closeModal:" + r, this.close); }, beforeUnmount: function() { var e = this.formCreateInject, n = e.name, r = e.field, i = e.api; n && i.off("fc:closeModal:" + n, this.close), r && i.off("fc:closeModal:" + r, this.close); } }), T = { type: function(e, n) { return Object.prototype.toString.call(e) === "[object " + n + "]"; }, Undef: function(e) { return e == null; }, Element: function(e) { return _e(e) === "object" && e !== null && e.nodeType === 1 && !T.Object(e); }, trueArray: function(e) { return Array.isArray(e) && e.length > 0; }, Function: function(e) { var n = this.getType(e); return n === "Function" || n === "AsyncFunction"; }, getType: function(e) { var n = Object.prototype.toString.call(e); return /^\[object (.*)\]$/.exec(n)[1]; }, empty: function(e) { return e == null || Array.isArray(e) && Array.isArray(e) && !e.length ? !0 : typeof e == "string" && !e; } }; ["Date", "Object", "String", "Boolean", "Array", "Number"].forEach(function(t) { T[t] = function(e) { return T.type(e, t); }; }); function Se(t, e) { return {}.hasOwnProperty.call(t, e); } function Xe(t, e, n) { t[e] = n; } function yt(t, e) { delete t[e]; } function Jt(t) { var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0, r = !1; for (var i in e) if (Object.prototype.hasOwnProperty.call(e, i)) { var a = e[i]; if ((r = Array.isArray(a)) || T.Object(a)) { var o = t[i] === void 0; if (r) r = !1, o && Xe(t, i, []); else if (a._clone && n !== void 0) if (n) a = a.getRule(), o && Xe(t, i, {}); else { Xe(t, i, a._clone()); continue; } else o && Xe(t, i, {}); t[i] = Jt(t[i], a, n); } else Xe(t, i, a), T.Undef(a) || (T.Undef(a.__json) || (t[i].__json = a.__json), T.Undef(a.__origin) || (t[i].__origin = a.__origin)); } return n !== void 0 && Array.isArray(t) ? t.filter(function(s) { return !s || !s.__ctrl; }) : t; } function tt(t) { return Jt({}, { value: t }).value; } var Ga = Object.assign || function(t) { for (var e, n = 1; n < arguments.length; n++) for (var r in e = arguments[n], e) Object.prototype.hasOwnProperty.call(e, r) && Xe(t, r, e[r]); return t; }; function Q() { return Ga.apply(this, arguments); } function Qn(t) { return _e(t) !== "object" || t === null ? t : t instanceof Array ? oe(t) : z({}, t); } var Ha = '._fc-group{display:flex;flex-direction:column;justify-content:center;min-height:38px;width:100%}._fc-group-disabled ._fc-group-add,._fc-group-disabled ._fc-group-btn{cursor:not-allowed}._fc-group-handle{background-color:#fff;border:1px dashed #d9d9d9;border-radius:15px;bottom:-15px;display:flex;flex-direction:row;padding:3px 8px;position:absolute;right:30px}._fc-group-btn{cursor:pointer}._fc-group-idx{align-items:center;background:#eee;border-radius:15px;bottom:-15px;display:flex;font-weight:700;height:30px;justify-content:center;left:10px;position:absolute;width:30px}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{border:1px dashed #d9d9d9;border-radius:5px;display:flex;flex-direction:column;margin:5px 5px 25px;padding:20px 20px 25px;position:relative}._fc-group-arrow{height:20px;position:relative;width:20px}._fc-group-arrow:before{border-left:2px solid #999;border-top:2px solid #999;content:"";height:9px;left:5px;position:absolute;top:8px;transform:rotate(45deg);width:9px}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{cursor:pointer;height:20px;position:relative;width:20px}._fc-group-plus-minus:after,._fc-group-plus-minus:before{background-color:#409eff;content:"";height:2px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:60%}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{border:1px solid rgba(64,158,255,.5);border-radius:15px;cursor:pointer;height:25px;width:25px}._fc-group-add._fc-group-plus-minus:after,._fc-group-add._fc-group-plus-minus:before{width:50%}'; lr(Ha); var Xa = "fcGroup", Wa = $e({ name: Xa, props: { field: String, rule: Array, expand: Number, options: Object, button: { type: Boolean, default: !0 }, max: { type: Number, default: 0 }, min: { type: Number, default: 0 }, modelValue: { type: Array, default: function() { return []; } }, defaultValue: Object, sortBtn: { type: Boolean, default: !0 }, disabled: { type: Boolean, default: !1 }, syncDisabled: { type: Boolean, default: !0 }, onBeforeRemove: { type: Function, default: function() { } }, onBeforeAdd: { type: Function, default: function() { } }, formCreateInject: Object, parse: Function }, data: function() { return { len: 0, cacheRule: {}, cacheValue: {}, sort: [], form: De(this.formCreateInject.form.$form()) }; }, emits: ["update:modelValue", "change", "itemMounted", "remove", "add"], watch: { rule: { handler: function(e, n) { var r = this; Object.keys(this.cacheRule).forEach(function(i) { var a = r.cacheRule[i]; if (a.$f) { var o = a.$f.formData(); if (e === n) a.$f.deferSyncValue(function() { Jt(a.rule, e), a.$f.setValue(o); }, !0); else { var s = a.$f.formData(); a.$f.once("reloading", function() { a.$f.setValue(s); }), a.rule = tt(e); } } }); }, deep: !0 }, expand: function(e) { var n = e - this.modelValue.length; n > 0 && this.expandRule(n); }, modelValue: { handler: function(e) { var n = this; e = e || []; var r = this.sort, i = r.length, a = i - e.length; if (a < 0) { for (var o = a; o < 0; o++) this.addRule(e.length + o, !0); for (var s = 0; s < i; s++) this.setValue(r[s], e[s]); } else { if (a > 0) for (var u = 0; u < a; u++) this.removeRule(r[i - u - 1]); e.forEach(function(c, d) { n.setValue(r[d], e[d]); }); } }, deep: !0 } }, methods: { _value: function(e) { return e && Se(e, this.field) ? e[this.field] : e; }, cache: function(e, n) { this.cacheValue[e] = JSON.stringify(n); }, input: function(e) { this.$emit("update:modelValue", e), this.$emit("change", e); }, formData: function(e, n) { var r = this, i = this.cacheRule, a = this.sort; if (a.filter(function(s) { return i[s].$f; }).length === a.length) { var o = a.map(function(s) { var u = e === s ? n : z({}, r.cacheRule[s].$f.form), c = r.field ? u[r.field] || null : u; return r.cache(s, c), c; }); this.input(o); } }, setValue: function(e, n) { var r = this.field; r && (n = Ae({}, r, this._value(n))), this.cacheValue[e] !== JSON.stringify(r ? n[r] : n) && (this.cacheRule[e].$f && this.cacheRule[e].$f.setValue(n), this.cache(e, n)); }, addRule: function(e, n) { var r = this, i = this.formCreateInject.form.copyRules(this.rule || []), a = this.options ? z({}, this.options) : { submitBtn: !1, resetBtn: !1 }; if (this.defaultValue) { a.formData || (a.formData = {}); var o = tt(this.defaultValue); Q(a.formData, this.field ? Ae({}, this.field, o) : o); } this.parse && this.parse({ rule: i, options: a, index: this.sort.length }), this.cacheRule[++this.len] = { rule: i, options: a }, n && Ee(function() { return r.$emit("add", i, Object.keys(r.cacheRule).length - 1); }); }, add$f: function(e, n, r) { var i = this; this.cacheRule[n].$f = r, Ee(function() { i.$emit("itemMounted", r, Object.keys(i.cacheRule).indexOf(n)); }); }, removeRule: function(e, n) { var r = this, i = Object.keys(this.cacheRule).indexOf(e); delete this.cacheRule[e], delete this.cacheValue[e], n && Ee(function() { return r.$emit("remove", i); }); }, add: function(e) { if (!(this.disabled || this.onBeforeAdd(this.modelValue) === !1)) { var n = oe(this.modelValue); n.push(this.defaultValue ? tt(this.defaultValue) : this.field ? null : {}), this.input(n); } }, del: function(e, n) { if (!(this.disabled || this.onBeforeRemove(this.modelValue, e) === !1)) { this.removeRule(n, !0); var r = oe(this.modelValue); r.splice(e, 1), this.input(r); } }, addIcon: function(e) { return W("div", { class: "_fc-group-btn _fc-group-plus-minus", onClick: this.add }, null); }, delIcon: function(e, n) { var r = this; return W("div", { class: "_fc-group-btn _fc-group-plus-minus _fc-group-minus", onClick: function() { return r.del(e, n); } }, null); }, sortUpIcon: function(e) { var n = this; return W("div", { class: "_fc-group-btn _fc-group-arrow _fc-group-up", onClick: function() { return n.changeSort(e, -1); } }, null); }, sortDownIcon: function(e) { var n = this; return W("div", { class: "_fc-group-btn _fc-group-arrow _fc-group-down", onClick: function() { return n.changeSort(e, 1); } }, null); }, changeSort: function(e, n) { var r = this, i = this.sort[e]; this.sort[e] = this.sort[e + n], this.sort[e + n] = i, this.formCreateInject.subForm(this.sort.map(function(a) { return r.cacheRule[a].$f; })), this.formData(0); }, makeIcon: function(e, n, r) { var i = this; if (this.$slots.button) return this.$slots.button({ total: e, index: n, vm: this, key: r, del: function() { return i.del(n, r); }, add: this.add }); var a = []; return (!this.max || e < this.max) && e === n + 1 && a.push(this.addIcon(r)), e > this.min && a.push(this.delIcon(n, r)), this.sortBtn && n && a.push(this.sortUpIcon(n)), this.sortBtn && n !== e - 1 && a.push(this.sortDownIcon(n)), a; }, emitEvent: function(e, n, r, i) { this.$emit.apply(this, [e].concat(oe(n), [this.cacheRule[i].$f, r])); }, expandRule: function(e) { for (var n = 0; n < e; n++) this.addRule(n); } }, created: function() { var e = this; Ve(function() { return z({}, e.cacheRule); }, function(i) { e.sort = Object.keys(i); }, { immediate: !0 }); for (var n = (this.expand || 0) - this.modelValue.length, r = 0; r < this.modelValue.length; r++) this.addRule(r); n > 0 && this.expandRule(n); }, render: function() { var e = this, n = this.sort, r = this.button, i = this.form, a = this.disabled, o = n.length === 0 ? this.$slots.default ? this.$slots.default({ vm: this, add: this.add }) : W("div", { key: "a_def", class: "_fc-group-plus-minus _fc-group-add fc-clock", onClick: this.add }, null) : n.map(function(s, u) { var c = e.cacheRule[s], d = c.rule, v = c.options, m = r && !a ? e.makeIcon(n.length, u, s) : []; return W("div", { class: "_fc-group-container", key: s }, [W(i, it({ key: s }, { disabled: a, "onUpdate:modelValue": function(x) { return e.formData(s, x); }, "onEmit-event": function(x) { for (var E = arguments.length, M = new Array(E > 1 ? E - 1 : 0), U = 1; U < E; U++) M[U - 1] = arguments[U]; return e.emitEvent(x, M, u, s); }, "onUpdate:api": function(x) { return e.add$f(u, s, x); }, inFor: !0, modelValue: e.field ? Ae({}, e.field, e._value(e.modelValue[u])) : e.modelValue[u], rule: d, option: v, extendOption: !0 }), null), W("div", { class: "_fc-group-idx" }, [u + 1]), m.length ? W("div", { class: "_fc-group-handle fc-clock" }, [m]) : null]); }); return W("div", { key: "con", class: "_fc-group " + (a ? "_fc-group-disabled" : "") }, [o]); } }), Ja = "fcSubForm", Ya = $e({ name: Ja, props: { rule: Array, options: { type: Object, default: function() { return ke({ submitBtn: !1, resetBtn: !1 }); } }, modelValue: { type: Object, default: function() { return {}; } }, disabled: { type: Boolean, default: !1 }, syncDisabled: { type: Boolean, default: !0 }, formCreateInject: Object }, data: function() { return { cacheValue: {}, subApi: {}, form: De(this.formCreateInject.form.$form()) }; }, emits: ["fc:subform", "update:modelValue", "change", "itemMounted"], watch: { modelValue: function(e) { this.setValue(e); } }, methods: { formData: function(e) { this.cacheValue = JSON.stringify(e), this.$emit("update:modelValue", e), this.$emit("change", e); }, setValue: function(e) { var n = JSON.stringify(e); this.cacheValue !== n && (this.cacheValue = n, this.subApi.coverValue(e || {})); }, add$f: function(e) { var n = this; this.subApi = e, Ee(function() { n.$emit("itemMounted", e); }); } }, render: function() { var e = this.form; return W(e, { disabled: this.disabled, "onUpdate:modelValue": this.formData, modelValue: this.modelValue, "onEmit-event": this.$emit, "onUpdate:api": this.add$f, rule: this.rule, option: this.options, extendOption: !0 }, null); } }), Ui = { name: "QuestionCircleOutlined" }, Qa = { class: "anticon" }, Ka = /* @__PURE__ */ he("svg", { height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" }, [/* @__PURE__ */ he("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448s448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372s372 166.6 372 372s-166.6 372-372 372z", fill: "currentColor" }), /* @__PURE__ */ he("path", { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7c-21.2 8.1-39.2 22.3-52.1 40.9c-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0 1 30.9-44.8c59-22.7 97.1-74.7 97.1-132.5c.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1 0 80 0a40 40 0 1 0-80 0z", fill: "currentColor" })], -1), Za = [Ka]; function es(t, e, n, r, i, a) { return J(), ae("span", Qa, Za); } Ui.render = es; var ts = [wa, qa, Wa, Ya, Ui], fr = { name: "checkbox", modelField: "value", mergeProp: function(e) { var n = e.prop.props; Se(n, "options") || (n.options = e.prop.options || []); } }, ns = z(z({}, fr), {}, { name: "radio" }), rs = z(z({}, fr), {}, { name: "select" }); function Ot(t, e) { var n = null; return function() { for (var r = this, i = arguments.length, a = new Array(i), o = 0; o < i; o++) a[o] = arguments[o]; n !== null && clearTimeout(n), n = setTimeout(function() { return t.call.apply(t, [r].concat(a)); }, e); }; } function Wt(t) { var e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase(); return e.indexOf("-") === 0 && (e = e.substr(1)), e; } function is(t) { return t.replace(t[0], t[0].toLocaleUpperCase()); } var dn = function(e, n) { if (!(!e || e === n)) { if (e.props.formCreateInject) return e.props.formCreateInject; if (e.parent) return dn(e.parent, n); } }; function os(t, e, n) { return $e({ name: "FormCreate" + (t.isMobile ? "Mobile" : ""), components: e, directives: n, props: { rule: { type: Array, required: !0, default: function() { return []; } }, option: { type: Object, default: function() { return {}; } }, extendOption: Boolean, driver: [String, Object], modelValue: Object, disabled: { type: Boolean, default: void 0 }, preview: { type: Boolean, default: void 0 }, index: [String, Number], api: Object, locale: [String, Object], name: String, subForm: { type: Boolean, default: !0 }, inFor: Boolean }, emits: ["update:api", "update:modelValue", "mounted", "submit", "reset", "change", "emit-event", "control", "remove-rule", "remove-field", "sync", "reload", "repeat-field", "update", "validate-field-fail", "validate-fail", "created"], render: function() { return this.fc.render(); }, setup: function(i) { var a = Wn(); Uo("parentFC", a); var o = qo("parentFC", null), s = o; if (o) for (; s.setupState.parent; ) s = s.setupState.parent; else s = a; var u = Wr(i), c = u.rule, d = u.modelValue, v = u.subForm, m = u.inFor, C = ke({ ctxInject: {}, destroyed: !1, isShow: !0, unique: 1, renderRule: oe(c.value || []), updateValue: JSON.stringify(d.value || {}) }), x = new t(a), E = x.api(), M = m.value, U = function() { if (o) { var X = dn(a, o); if (X) { var pe; M ? (pe = gt(X.getSubForm()), pe.push(E)) : pe = E, X.subForm(pe); } } }, B = function() { var X = dn(a, o); if (X) if (M) { var pe = gt(X.getSubForm()), Ce = pe.indexOf(E); Ce > -1 && pe.splice(Ce, 1); } else X.subForm(); }, V = null; Go(function() { Ho(function() { var ee = "", X = i.option && i.option.globalClass || {}; Object.keys(X).forEach(function(pe) { var Ce = ""; X[pe].style && Object.keys(X[pe].style).forEach(function(Qe) { Ce += Wt(Qe) + ":" + X[pe].style[Qe] + ";"; }), X[pe].content && (Ce += X[pe].content + ";"), Ce && (ee += ".".concat(pe, "{").concat(Ce, "}")); }), i.option && i.option.style && (ee += i.option.style), V || (V = document.createElement("style"), V.type = "text/css", document.head.appendChild(V)), V.innerHTML = ee || ""; }); }); var Y = Ot(function() { x.bus.$emit("$loadData.$topForm"); }, 100), le = Ot(function() { x.bus.$emit("$loadData.$form"); }, 100), ie = function(X) { x.bus.$emit("change-$form." + X); }; return Xo(function() { o && (E.top.bus.$on("$loadData.$form", Y), E.top.bus.$on("change", ie)), x.mounted(); }), Wo(function() { o && (E.top.bus.$off("$loadData.$form", Y), E.top.bus.$off("change", ie)), V && document.head.removeChild(V), B(), C.destroyed = !0, x.unmount(); }), Jo(function() { x.updated(); }), Ve(v, function(ee) { ee ? U() : B(); }, { immediate: !0 }), Ve(function() { return oe(c.value); }, function(ee) { x.$handle.isBreakWatch() || ee.length === C.renderRule.length && ee.every(function(X) { return C.renderRule.indexOf(X) > -1; }) || (x.$handle.updateAppendData(), x.$handle.reloadRule(c.value), a.setupState.renderRule()); }), Ve(function() { return i.option; }, function() { x.initOptions(), E.refresh(); }, { deep: !0 }), Ve(function() { return [i.disabled, i.preview]; }, function() { E.refresh(); }), Ve(d, function(ee) { JSON.stringify(ee || {}) !== C.updateValue && (E.config.forceCoverValue ? E.coverValue(ee || {}) : E.setValue(ee || {})); }, { deep: !0, flush: "post" }), Ve(function() { return i.index; }, function() { E.coverValue({}), x.$handle.updateAppendData(), Ee(function() { Ee(function() { E.clearValidateState(); }); }); }, { flush: "sync" }), z(z({ fc: De(x), parent: o && De(o), top: De(s), fapi: De(E) }, Wr(C)), {}, { getGroupInject: function() { return dn(a, o); }, refresh: function() { ++C.unique; }, renderRule: function() { C.renderRule = oe(c.value || []); }, updateValue: function(X) { if (!C.destroyed) { var pe = JSON.stringify(X); C.updateValue !== pe && (C.updateValue = pe, a.emit("update:modelValue", X), Ee(function() { le(), o || Y(); })); } } }); }, created: function() { var i = Wn(); i.emit("update:api", i.setupState.fapi), i.setupState.fc.init(); } }); } var qi = ["props"], Gi = ["class", "style", "directives"], Hi = ["on", "hook"], pt = function t(e) { var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = [].concat(qi, oe(r.normal || [])), a = [].concat(Gi, oe(r.array || [])), o = [].concat(Hi, oe(r.functional || [])), s = r.props || []; return e.reduce(function(u, c) { for (var d in c) if (u[d]) if (s.indexOf(d) > -1) u[d] = t([c[d]], u[d]); else if (i.indexOf(d) > -1) u[d] = z(z({}, u[d]), c[d]); else if (a.indexOf(d) > -1) { var v = u[d] instanceof Array ? u[d] : [u[d]], m = c[d] instanceof Array ? c[d] : [c[d]]; u[d] = [].concat(oe(v), oe(m)); } else if (o.indexOf(d) > -1) for (var C in c[d]) if (u[d][C]) { var x = u[d][C] instanceof Array ? u[d][C] : [u[d][C]], E = c[d][C] instanceof Array ? c[d][C] : [c[d][C]]; u[d][C] = [].concat(oe(x), oe(E)); } else u[d][C] = c[d][C]; else if (d === "hook") for (var M in c[d]) u[d][M] ? u[d][M] = as(u[d][M], c[d][M]) : u[d][M] = c[d][M]; else u[d] = c[d]; else i.indexOf(d) > -1 || o.indexOf(d) > -1 || s.indexOf(d) > -1 ? u[d] = z({}, c[d]) : a.indexOf(d) > -1 ? u[d] = c[d] instanceof Array ? oe(c[d]) : _e(c[d]) === "object" ? z({}, c[d]) : c[d] : u[d] = c[d]; return u; }, n); }, as = function(e, n) { return function() { e && e.apply(this, arguments), n && n.apply(this, arguments); }; }, Kn = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache", "modelEmit"], _n = ["validate", "children", "control"], yn = ["effect", "deep", "renderSlots"]; function Xi() { return [].concat(Kn, oe(qi), oe(Gi), oe(Hi), _n, yn); } function Wi(t, e, n) { return "[form-create ".concat(t, "]: ").concat(e) + (n ? ` rule: ` + JSON.stringify(n.getRule ? n.getRule() : n) : ""); } function cr(t, e) { console.error(Wi("err", t, e)); } function ss(t) { cr(t.toString()), console.error(t); } function et(t) { var e = t.replace(/(-[a-z])/g, function(n) { return n.replace("-", "").toLocaleUpperCase(); }); return Ji(e); } function Ji(t) { return t.replace(t[0], t[0].toLowerCase()); } var Zn = "[[FORM-CREATE-PREFIX-", er = "-FORM-CREATE-SUFFIX]]"; function dr(t, e) { return JSON.stringify(Jt(Array.isArray(t) ? [] : {}, t, !0), function(n, r) { if (!(r && r._isVue === !0)) { if (typeof r != "function") return r; if (r.__json) return r.__json; if (r.__origin && (r = r.__origin), !r.__emit) return Zn + r + er; } }, e); } function Mn(t) { return new Function("return " + t)(); } function ot(t, e) { if (t && T.String(t) && t.length > 4) { var n = t.trim(), r = !1; try { if (n.indexOf(er) > 0 && n.indexOf(Zn) === 0) n = n.replace(er, "").replace(Zn, ""), r = !0; else if (n.indexOf("$FN:") === 0) n = n.substring(4), r = !0; else if (n.indexOf("$EXEC:") === 0) n = n.substring(6), r = !0; else if (n.indexOf("$GLOBAL:") === 0) { var i = n.substring(8); return n = function() { for (var s = arguments.length, u = new Array(s), c = 0; c < s; c++) u[c] = arguments[c]; var d = u[0].api.getGlobalEvent(i); if (d) return d.call.apply(d, [this].concat(u)); }, n.__json = t, n.__inject = !0, n; } else { if (n.indexOf("$FNX:") === 0) return n = Mn("function($inject){" + n.substring(5) + "}"), n.__json = t, n.__inject = !0, n; (!e && n.indexOf("function ") === 0 && n !== "function " || !e && n.indexOf("function(") === 0 && n !== "function(") && (r = !0); } if (!r) return t; var a; try { a = Mn(n); } catch { a = Mn("function " + n); } return a.__json = t, a; } catch (o) { cr("\u89E3\u6790\u5931\u8D25:".concat(n, ` err: `).concat(o)); return; } } return t; } function Yi(t, e) { return JSON.parse(t, function(n, r) { return T.Undef(r) || !r.indexOf ? r : ot(r, e); }); } function tr(t, e) { return { value: t, enumerable: !1, configurable: !1, writable: !!e }; } function Qi(t, e) { return Ki([t], e || !1)[0]; } function Ki(t, e) { return Jt([], oe(t), e || !1); } function lt(t, e) { return pt(Array.isArray(e) ? e : [e], t, { array: _n, normal: yn }), t; } function Zr(t) { var e = T.Function(t.getRule) ? t.getRule() : t; return e.type || (e.type = "input"), e; } function us(t, e) { return t ? (Object.keys(e || {}).forEach(function(n) { e[n] && (t[n] = lt(t[n] || {}, e[n])); }), t) : e; } function Zi(t, e) { Object.defineProperties(t, Object.keys(e).reduce(function(n, r) { return n[r] = { get: function() { return e[r](); } }, n; }, {})); } function bt(t) { return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null); } function de(t, e) { try { e = t(); } catch (n) { ss(n); } return e; } function Tn() { var t = {}, e = function(r) { return r || "default"; }; return { setSlot: function(r, i) { r = e(r), !(!i || Array.isArray(i) && i.length) && (t[r] || (t[r] = []), t[r].push(i)); }, getSlot: function(r, i) { r = e(r); var a = []; return (t[r] || []).forEach(function(o) { if (Array.isArray(o)) a.push.apply(a, oe(o)); else if (T.Function(o)) { var s = o.apply(void 0, oe(i || [])); Array.isArray(s) ? a.push.apply(a, oe(s)) : a.push(s); } else T.Undef(o) || a.push(o); }), a; }, getSlots: function() { var r = this, i = {}; return Object.keys(t).forEach(function(a) { i[a] = function() { for (var o = arguments.length, s = new Array(o), u = 0; u < o; u++) s[u] = arguments[u]; return r.getSlot(a, s); }; }), i; }, slotLen: function(r) { return r = e(r), t[r] ? t[r].length : 0; }, mergeBag: function(r) { var i = this; if (!r) return this; var a = T.Function(r.getSlots) ? r.getSlots() : r; return Array.isArray(r) || No(r) ? this.setSlot(void 0, function() { return r; }) : Object.keys(a).forEach(function(o) { i.setSlot(o, a[o]); }), this; } }; } function ei(t) { var e = z({}, t.props || {}); return Object.keys(t.on || {}).forEach(function(n) { n.indexOf("-") > 0 && (n = et(n)); var r = "on".concat(is(n)); Array.isArray(e[r]) ? e[r] = [].concat(oe(e[r]), [t.on[n]]) : e[r] ? e[r] = [e[r], t.on[n]] : e[r] = t.on[n]; }), e.key = t.key, e.ref = t.ref, e.class = t.class, e.id = t.id, e.style = t.style, e.slot && delete e.slot, e; } function tn(t, e) { return Object.setPrototypeOf(t, e), t; } var ti = function(e, n) { return typeof e == "string" ? String(n) : typeof e == "number" ? Number(n) : n; }, wt = { "==": function(e, n) { return JSON.stringify(e) === JSON.stringify(ti(e, n)); }, "!=": function(e, n) { return !wt["=="](e, n); }, ">": function(e, n) { return e > n; }, ">=": function(e, n) { return e >= n; }, "<": function(e, n) { return e < n; }, "<=": function(e, n) { return e <= n; }, on: function(e, n) { return e && e.indexOf && e.indexOf(ti(e[0], n)) > -1; }, notOn: function(e, n) { return !wt.on(e, n); }, in: function(e, n) { return n && n.indexOf && n.indexOf(e) > -1; }, notIn: function(e, n) { return !wt.in(e, n); }, between: function(e, n) { return e > n[0] && e < n[1]; }, notBetween: function(e, n) { return e < n[0] || e > n[1]; }, empty: function(e) { return T.empty(e); }, notEmpty: function(e) { return !T.empty(e); }, pattern: function(e, n) { return new RegExp(n, "g").test(e); } }; function He(t, e) { return (Array.isArray(e) ? e : (e || "").split(".")).forEach(function(n) { t != null && (t = t[n]); }), t; } function ls(t) { for (var e = /{{\s*(.*?)\s*}}/g, n, r = {}; (n = e.exec(t)) !== null; ) n[1] && (r[n[1]] = !0); return Object.keys(r); } function ni(t) { var e = t.split("."), n = [], r = ""; return e.forEach(function(i, a) { a === 0 ? r = i : r += "." + i, n.push(r); }), n.join(" && "); } function eo() { return { props: {}, on: {}, options: [], children: [], hidden: !1, display: !0, value: void 0 }; } function Te(t, e) { return function(n, r, i) { var a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, o = new hr(t, n, r, i, a); return e && (T.Function(e) ? e(o) : o.props(e)), o; }; } function hr(t, e, n, r, i) { this._data = Q(eo(), { type: t, title: e, field: n, value: r, props: i || {} }), this.event = this.on; } Q(hr.prototype, { getRule: function() { return this._data; }, setProp: function(e, n) { return Xe(this._data, e, n), this; }, modelField: function(e) { return this._data.modelField = e, this; }, _clone: function() { var e = new this.constructor(); return e._data = Qi(this._data), e; } }); function to(t) { t.forEach(function(e) { hr.prototype[e] = function(n) { return lt(this._data, Ae({}, e, arguments.length < 2 ? n : Ae({}, n, arguments[1]))), this; }; }); } to(Xi()); var fs = Te(""); function cs(t, e, n) { var r = fs("", e); return r._data.type = t, r._data.title = n, r; } function ds() { return { create: cs, factory: Te }; } function hs(t, e, n) { var r = "fail to ".concat(t, " ").concat(n.status, "'"), i = new Error(r); return i.status = n.status, i.url = t, i; } function ri(t) { var e = t.responseText || t.response; if (!e) return e; try { return JSON.parse(e); } catch { return e; } } function no(t) { if (!(typeof XMLHttpRequest > "u")) { var e = new XMLHttpRequest(), n = t.action || ""; if (e.upload && t.onProgress && e.upload.addEventListener("progress", function(o) { o.percent = o.total > 0 ? o.loaded / o.total * 100 : 0, t.onProgress(o); }), t.query) { var r = new URLSearchParams(t.query).toString(); n.includes("?") ? n += "&".concat(r) : n += "?".concat(r); } e.onerror = function(s) { t.onError(s); }, e.onload = function() { if (e.status < 200 || e.status >= 300) return t.onError(hs(n, t, e), ri(e)); t.onSuccess(ri(e)); }, e.open(t.method || "get", n, !0); var i; (t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data || {}).map(function(o) { i.append(o, t.data[o]); })) : (i = JSON.stringify(t.data || {}), e.setRequestHeader("content-type", "application/json"))), t.file && i.append(t.filename, t.file, t.file.name), t.withCredentials && "withCredentials" in e && (e.withCredentials = !0); var a = t.headers || {}; Object.keys(a).forEach(function(o) { a[o] != null && e.setRequestHeader(o, a[o]); }), e.send(i); } } function ii(t, e, n) { return new Promise(function(r, i) { (e || no)(z(z({}, t), {}, { onSuccess: function(o) { var s = function(d) { return d; }, u = ot(t.parse); T.Function(u) ? s = u : u && T.String(u) && (s = function(d) { return He(d, u); }), r(s(o, void 0, n)); }, onError: function(o) { i(o); } })); }); } function Nt(t) { return tt(t); } function ps(t) { function e(a) { return T.Undef(a) ? a = t.fields() : Array.isArray(a) || (a = [a]), a; } function n(a, o, s) { e(a).forEach(function(u) { t.getCtxs(u).forEach(function(c) { Xe(c.rule, o, s), t.$render.clearCache(c); }); }); } function r() { var a = t.subForm; return Object.keys(a).reduce(function(o, s) { var u = a[s]; return u && (Array.isArray(u) ? o.push.apply(o, oe(u)) : o.push(u)), o; }, []); } var i = { get config() { return t.options; }, set config(a) { t.fc.options.value = a; }, get options() { return t.options; }, set options(a) { t.fc.options.value = a; }, get form() { return t.form; }, get rule() { return t.rules; }, get parent() { return t.vm.setupState.parent && t.vm.setupState.parent.setupState.fapi; }, get top() { return i.parent ? i.parent.top : i; }, get children() { return r(); }, get siblings() { var a = t.vm.setupState.getGroupInject(); if (a) { var o = a.getSubForm(); if (Array.isArray(o)) return oe(o); } }, get index() { var a = i.siblings; if (a) { var o = a.indexOf(i); return o > -1 ? o : void 0; } }, formData: function(o) { if (o == null) { var s = {}; return Object.keys(t.form).forEach(function(u) { t.ignoreFields.indexOf(u) === -1 && (s[u] = Nt(t.form[u])); }), s; } else return e(o).reduce(function(u, c) { return u[c] = i.getValue(c), u; }, {}); }, getValue: function(o) { var s = t.getFieldCtx(o); return s ? Nt(s.rule.value) : t.options.appendValue !== !1 && Se(t.appendData, o) ? Nt(t.appendData[o]) : void 0; }, coverValue: function(o) { var s = z({}, o || {}); t.deferSyncValue(function() { t.appendData = {}, i.fields().forEach(function(u) { var c = t.fieldCtx[u]; if (c) { var d = Se(o, u); c.forEach(function(v) { v.rule.value = d ? o[u] : void 0; }), delete s[u]; } }), Q(t.appendData, s); }, !0); }, setValue: function(o) { var s = o; arguments.length >= 2 && (s = Ae({}, o, arguments[1])), t.deferSyncValue(function() { Object.keys(s).forEach(function(u) { var c = t.fieldCtx[u]; if (!c) return t.appendData[u] = s[u]; c.forEach(function(d) { d.rule.value = s[u]; }); }); }, !0); }, removeField: function(o) { var s = t.getCtx(o); return t.deferSyncValue(function() { t.getCtxs(o).forEach(function(u) { u.rm(); }); }, !0), s ? s.origin : void 0; }, removeRule: function(o) { var s = o && bt(o); if (!!s) return s.rm(), s.origin; }, fields: function() { return t.fields(); }, append: function(o, s, u) { var c = t.sort.length - 1, d, v = t.getCtx(s); if (v) if (u) { if (d = v.getPending("children", v.rule.children), !Array.isArray(d)) return; c = v.rule.children.length - 1; } else c = v.root.indexOf(v.origin), d = v.root; else d = t.rules; d.splice(c + 1, 0, o); }, prepend: function(o, s, u) { var c = 0, d, v = t.getCtx(s); if (v) if (u) { if (d = v.getPending("children", v.rule.children), !Array.isArray(d)) return; } else c = v.root.indexOf(v.origin), d = v.root; else d = t.rules; d.splice(c, 0, o); }, hidden: function(o, s) { n(s, "hidden", !!o), t.refresh(); }, hiddenStatus: function(o) { var s = t.getCtx(o); if (!!s) return !!s.rule.hidden; }, display: function(o, s) { n(s, "display", !!o), t.refresh(); }, displayStatus: function(o) { var s = t.getCtx(o); if (!!s) return !!s.rule.display; }, disabled: function(o, s) { e(s).forEach(function(u) { t.getCtxs(u).forEach(function(c) { Xe(c.rule.props, "disabled", !!o); }); }), t.refresh(); }, all: function(o) { return Object.keys(t.ctxs).map(function(s) { var u = t.ctxs[s]; return o ? u.origin : u.rule; }); }, model: function(o) { return t.fields().reduce(function(s, u) { var c = t.fieldCtx[u][0]; return s[u] = o ? c.origin : c.rule, s; }, {}); }, component: function(o) { return Object.keys(t.nameCtx).reduce(function(s, u) { var c = t.nameCtx[u].map(function(d) { return o ? d.origin : d.rule; }); return s[u] = c.length === 1 ? c[0] : c, s; }, {}); }, bind: function() { return i.form; }, reload: function(o) { t.reloadRule(o); }, updateOptions: function(o) { t.fc.updateOptions(o), i.refresh(); }, onSubmit: function(o) { i.updateOptions({ onSubmit: o }); }, sync: function(o) { if (Array.isArray(o)) { o.forEach(function(u) { return i.sync(u); }); return; } var s = T.Object(o) ? bt(o) : t.getCtxs(o); !s || (s = Array.isArray(s) ? s : [s], s.forEach(function(u) { if (!u.deleted) { var c = t.subForm[u.id]; c && (Array.isArray(c) ? c.forEach(function(d) { d.refresh(); }) : c && c.refresh()), t.$render.clearCache(u); } }), t.refresh()); }, refresh: function() { r().forEach(function(o) { o.refresh(); }), t.$render.clearCacheAll(), t.refresh(); }, refreshOptions: function() { t.$manager.updateOptions(t.options), i.refresh(); }, hideForm: function(o) { t.vm.setupState.isShow = !o; }, changeStatus: function() { return t.changeStatus; }, clearChangeStatus: function() { t.changeStatus = !1; }, updateRule: function(o, s) { t.getCtxs(o).forEach(function(u) { Q(u.rule, s); }); }, updateRules: function(o) { Object.keys(o).forEach(function(s) { i.updateRule(s, o[s]); }); }, mergeRule: function(o, s) { t.getCtxs(o).forEach(function(u) { lt(u.rule, s); }); }, mergeRules: function(o) { Object.keys(o).forEach(function(s) { i.mergeRule(s, o[s]); }); }, getRule: function(o, s) { var u = t.getCtx(o); if (u) return s ? u.origin : u.rule; }, getRenderRule: function(o) { var s = t.getCtx(o); if (s) return s.prop; }, getRefRule: function(o) { var s = t.getCtxs(o); if (s) { var u = s.map(function(c) { return c.rule; }); return u.length === 1 ? u[0] : u; } }, setEffect: function(o, s, u) { var c = t.getCtx(o); c && s && (s[0] === "$" && (s = s.substr(1)), Se(c.rule, "$" + s) && Xe(c.rule, "$" + s, u), Se(c.rule, "effect") || (c.rule.effect = {}), Xe(c.rule.effect, s, u)); }, clearEffectData: function(o, s) { var u = t.getCtx(o); u && (s && s[0] === "$" && (s = s.substr(1)), u.clearEffectData(s), i.sync(o)); }, updateValidate: function(o, s, u) { u ? i.mergeRule(o, { validate: s }) : n(o, "validate", s); }, updateValidates: function(o, s) { Object.keys(o).forEach(function(u) { i.updateValidate(u, o[u], s); }); }, refreshValidate: function() { i.refresh(); }, resetFields: function(o) { e(o).forEach(function(s) { t.getCtxs(s).forEach(function(u) { t.$render.clearCache(u), u.rule.value = Nt(u.defaultValue); }); }), Ee(function() { Ee(function() { Ee(function() { i.clearValidateState(o); }); }); }), o == null && (T.Function(t.options.onReset) && de(function() { return t.options.onReset(i); }), t.vm.emit("reset", i)); }, method: function(o, s) { var u = i.el(o); if (!u || !u[s]) throw new Error(Wi("err", "".concat(s, " \u65B9\u6CD5\u4E0D\u5B58\u5728"))); return function() { return u[s].apply(u, arguments); }; }, exec: function(o, s) { for (var u = arguments.length, c = new Array(u > 2 ? u - 2 : 0), d = 2; d < u; d++) c[d - 2] = arguments[d]; return de(function() { return i.method(o, s).apply(void 0, c); }); }, toJson: function(o) { return dr(i.rule, o); }, trigger: function(o, s) { for (var u = i.el(o), c = arguments.length, d = new Array(c > 2 ? c - 2 : 0), v = 2; v < c; v++) d[v - 2] = arguments[v]; u && u.$emit.apply(u, [s].concat(d)); }, el: function(o) { var s = t.getCtx(o); if (s) return s.el || t.vm.refs[s.ref]; }, closeModal: function(o) { t.bus.$emit("fc:closeModal:" + o); }, getSubForm: function(o) { var s = t.getCtx(o); return s ? t.subForm[s.id] : void 0; }, getChildrenRuleList: function(o) { var s = _e(o) === "object", u = s ? bt(o) : t.getCtx(o), c = u ? u.rule : s ? o : i.getRule(o); if (!c) return []; var d = [], v = function(C) { C && C.forEach(function(x) { _e(x) === "object" && (x.field && d.push(x), d.push.apply(d, oe(i.getChildrenRuleList(x)))); }); }; return v(u ? u.loadChildrenPending() : c.children), d; }, getParentRule: function(o) { var s = _e(o) === "object", u = s ? bt(o) : t.getCtx(o); return u.parent.rule; }, getParentSubRule: function(o) { var s = _e(o) === "object", u = s ? bt(o) : t.getCtx(o); if (u) { var c = u.getParentGroup(); if (c) return c.rule; } }, getChildrenFormData: function(o) { var s = i.getChildrenRuleList(o); return s.reduce(function(u, c) { return u[c.field] = Nt(c.value), u; }, {}); }, setChildrenFormData: function(o, s, u) { var c = i.getChildrenRuleList(o); t.deferSyncValue(function() { c.forEach(function(d) { Se(s, d.field) ? d.value = s[d.field] : u && (d.value = void 0); }); }); }, getGlobalEvent: function(o) { var s = i.options.globalEvent[o]; if (s) return _e(s) === "object" && (s = s.handle), ot(s); }, getGlobalData: function(o) { return new Promise(function(s, u) { var c = i.options.globalData[o]; c || s(t.fc.loadData[o]), c.type === "fetch" ? i.fetch(c).then(function(d) { s(d); }).catch(u) : s(c.data); }); }, nextTick: function(o) { t.bus.$once("next-tick", o), t.refresh(); }, nextRefresh: function(o) { t.nextRefresh(), o && de(o); }, deferSyncValue: function(o, s) { t.deferSyncValue(o, s); }, emit: function(o) { for (var s, u = arguments.length, c = new Array(u > 1 ? u - 1 : 0), d = 1; d < u; d++) c[d - 1] = arguments[d]; (s = t.vm).emit.apply(s, [o].concat(c)); }, bus: t.bus, fetch: function(o) { return new Promise(function(s, u) { o = tt(o), o = t.loadFetchVar(o), t.beforeFetch(o).then(function() { return ii(o, t.fc.create.fetch, i).then(function(c) { de(function() { return o.onSuccess && o.onSuccess(c); }), s(c); }).catch(function(c) { de(function() { return o.onError && o.onError(c); }), u(c); }); }); }); }, watchFetch: function(o, s, u, c) { return t.fc.watchLoadData(function(d, v) { var m = tt(o); m = t.loadFetchVar(m, d), !(c && c(m, v) === !1) && t.beforeFetch(m).then(function() { return ii(m, t.fc.create.fetch, i).then(function(C) { de(function() { return m.onSuccess && m.onSuccess(C); }), s && s(C, v); }).catch(function(C) { de(function() { return m.onError && m.onError(C); }), u && u(C); }); }); }, o.wait == null ? 1e3 : o.wait); }, getData: function(o, s) { return t.fc.getLoadData(o, s); }, watchData: function(o) { return t.fc.watchLoadData(function(s, u) { de(function() { return o(s, u); }); }); }, setData: function(o, s, u) { return t.fc.setData(o, s, u); }, refreshData: function(o) { return t.fc.refreshData(o); }, t: function(o, s) { return t.fc.t(o, s); }, getLocale: function() { return t.fc.getLocale(); }, helper: { tidyFields: e, props: n } }; return ["on", "once", "off"].forEach(function(a) { i[a] = function() { var o; (o = t.bus)["$".concat(a)].apply(o, arguments); }; }), i.changeValue = i.changeField = i.setValue, i; } function ms(t) { Q(t.prototype, { initCache: function() { this.clearCacheAll(); }, clearCache: function(n) { if (!n.rule.cache) { if (!this.cache[n.id]) { n.parent && this.clearCache(n.parent); return; } (this.cache[n.id].use === !0 || this.cache[n.id].parent) && this.$handle.refresh(), this.cache[n.id].parent && this.clearCache(this.cache[n.id].parent), this.cache[n.id] = null; } }, clearCacheAll: function() { this.cache = {}; }, setCache: function(n, r, i) { this.cache[n.id] = { vnode: r, use: !1, parent: i, slot: n.rule.slot }; }, getCache: function(n) { var r = this.cache[n.id]; if (r) return r.use = !0, r.vnode; } }); } function gs(t) { return t == null ? "" : _e(t) === "object" ? JSON.stringify(t, null, 2) : String(t); } var vs = 0; function On() { var t = 370 + ++vs; return "F" + Math.random().toString(36).substr(3, 3) + Number("".concat(Date.now())).toString(36) + t.toString(36) + "c"; } function vt(t, e, n) { var r = t, i; return (e || "").split(".").forEach(function(a) { i && ((!r[i] || _e(r[i]) != "object") && (r[i] = {}), r = r[i]), i = a; }), r[i] = n, r; } function _s(t) { Q(t.prototype, { initRender: function() { this.cacheConfig = {}; }, getTypeSlot: function(n) { var r = function i(a) { if (a) { var o = void 0; return n.rule.field && (o = a.slots["field-" + Wt(n.rule.field)] || a.slots["field-" + n.rule.field]), o || (o = a.slots["type-" + Wt(n.type)] || a.slots["type-" + n.type]), o || i(a.setupState.parent); } }; return r(this.vm); }, render: function() { var n = this; if (!!this.vm.setupState.isShow) { this.$manager.beforeRender(); var r = Tn(); return this.sort.forEach(function(i) { n.renderSlot(r, n.$handle.ctxs[i]); }), this.$manager.render(r); } }, renderSlot: function(n, r, i) { if (this.isFragment(r)) { r.initProp(), this.mergeGlobal(r), r.initNone(); var a = this.renderChildren(r.loadChildrenPending(), r), o = a.default; o && n.setSlot(r.rule.slot, function() { return o(); }), delete a.default, n.mergeBag(a); } else n.setSlot(r.rule.slot, this.renderCtx(r, i)); }, mergeGlobal: function(n) { var r = this, i = this.$handle.options.global; !i || (this.cacheConfig[n.trueType] || (this.cacheConfig[n.trueType] = kt(function() { var a = r.$handle.options.global; return lt({}, [a["*"] || a.default || {}, a[n.originType] || a[n.type] || a[n.type] || {}]); })), n.prop = lt({}, [this.cacheConfig[n.trueType].value, n.prop])); }, setOptions: function(n) { var r = n.loadPending({ key: "options", origin: n.prop.options, def: [] }); n.prop.options = r, n.prop.optionsTo && r && vt(n.prop, n.prop.optionsTo, r); }, deepSet: function(n) { var r = n.rule.deep; r && Object.keys(r).sort(function(i, a) { return i.length < a.length ? -1 : 1; }).forEach(function(i) { vt(n.prop, i, r[i]); }); }, parseSide: function(n, r) { return T.Object(n) ? lt({ props: { formCreateInject: r.prop.props.formCreateInject } }, n) : n; }, renderSides: function(n, r, i) { var a = r[i ? "rule" : "prop"]; return [this.renderRule(this.parseSide(a.prefix, r)), n, this.renderRule(this.parseSide(a.suffix, r))]; }, renderId: function(n, r) { var i = this, a = this.$handle[r === "field" ? "fieldCtx" : "nameCtx"][n]; return a ? a.map(function(o) { return i.renderCtx(o, o.parent); }) : void 0; }, renderCtx: function(n, r) { var i = this; try { if (n.type === "hidden") return; var a = n.rule; if (!this.cache[n.id] || this.cache[n.id].slot !== a.slot) { var o; n.initProp(), this.mergeGlobal(n), n.initNone(), this.$manager.tidyRule(n), this.deepSet(n), this.setOptions(n), this.ctxProp(n); var s = n.prop; s.preview = !!(s.preview != null ? s.preview : this.$handle.preview), s.props.formCreateInject = this.injectProp(n); var u = s.cache !== !1, c = s.preview; if (s.hidden) { this.setCache(n, void 0, r); return; } o = function() { for (var v = arguments.length, m = new Array(v), C = 0; C < v; C++) m[C] = arguments[C]; var x = { rule: a, prop: s, preview: c, api: i.$handle.api, model: s.model || {}, slotValue: m }; m.length && a.slotUpdate && de(function() { return a.slotUpdate(x); }); var E = {}, M = n.loadChildrenPending(); n.parser.renderChildren ? E = n.parser.renderChildren(M, n) : n.parser.loadChildren !== !1 && (E = i.renderChildren(M, n)), Object.keys(s.renderSlots || {}).forEach(function(V) { E[V] = function() { var Y = i.parseSide(s.renderSlots[V], n); return i.renderRule(Y); }; }); var U = i.getTypeSlot(n), B; return U ? (x.children = E, B = U(x)) : B = c ? n.parser.preview(Qn(E), n) : n.parser.render(Qn(E), n), B = i.renderSides(B, n), !(!n.input && T.Undef(s.native)) && s.native !== !0 && (i.fc.targetFormDriver("updateWrap", n), B = i.$manager.makeWrap(n, B)), n.none && (Array.isArray(B) ? B = B.map(function(V) { return !V || !V.__v_isVNode ? V : i.none(V); }) : B = i.none(B)), u && i.setCache(n, function() { return i.stable(B); }, r), B; }, this.setCache(n, o, r); } return function() { var d = i.getCache(n); if (d) return d.apply(void 0, arguments); if (i.cache[n.id]) return; var v = i.renderCtx(n, n.parent); if (v) return v(); }; } catch (d) { console.error(d); return; } }, none: function(n) { if (n) return n.props.class = this.mergeClass(n.props.class, "fc-none"), n; }, mergeClass: function(n, r) { if (Array.isArray(n)) n.push(r); else return n ? [n, r] : r; return n; }, stable: function(n) { var r = this, i = Array.isArray(n) ? n : [n]; return i.forEach(function(a) { a && a.__v_isVNode && a.children && _e(a.children) === "object" && (a.children.$stable = !0, r.stable(a.children)); }), n; }, getModelField: function(n) { return n.prop.modelField || n.parser.modelField || this.fc.modelFields[this.vNode.aliasMap[n.type]] || this.fc.modelFields[n.type] || this.fc.modelFields[n.originType] || "modelValue"; }, isFragment: function(n) { return n.type === "fragment" || n.type === "template"; }, injectProp: function(n) { var r = this, i = this.vm.setupState; i.ctxInject[n.id] || (i.ctxInject[n.id] = { api: this.$handle.api, form: this.fc.create, subForm: function(s) { r.$handle.addSubForm(n, s); }, getSubForm: function() { return r.$handle.subForm[n.id]; }, slots: function() { return r.vm.setupState.top.slots; }, options: [], children: [], preview: !1, id: n.id, field: n.field, rule: n.rule, input: n.input, t: function() { var s; return (s = r.$handle.api).t.apply(s, arguments); }, updateValue: function(s) { r.$handle.onUpdateValue(n, s); } }); var a = i.ctxInject[n.id]; return Q(a, { preview: n.prop.preview, options: n.prop.options, children: n.loadChildrenPending() }), a; }, ctxProp: function(n) { var r = this, i = n.ref, a = n.key, o = n.rule; this.$manager.mergeProp(n), n.parser.mergeProp(n); var s = [{ ref: i, key: o.key || "".concat(a, "fc"), slot: void 0, on: { vnodeMounted: function(v) { v.el.__rule__ = n.rule, r.onMounted(n, v.el); }, "fc.updateValue": function(v) { r.$handle.onUpdateValue(n, v); }, "fc.el": function(v) { n.exportEl = v, v && ((v.$el || v).__rule__ = n.rule); } } }]; if (n.input) { this.vm.props.disabled === !0 && (n.prop.props.disabled = !0); var u = this.getModelField(n), c = { callback: function(v) { r.onInput(n, v); }, modelField: u, value: this.$handle.getFormData(n) }; s.push({ on: z(Ae({}, "update:".concat(u), c.callback), n.prop.modelEmit ? Ae({}, n.prop.modelEmit, function() { return r.onEmitInput(n); }) : {}), props: Ae({}, u, c.value) }), n.prop.model = c; } return pt(s, n.prop), n.prop; }, onMounted: function(n, r) { n.el = this.vm.refs[n.ref] || r, n.parser.mounted(n), this.$handle.effect(n, "mounted"), this.$handle.targetHook(n, "mounted"); }, onInput: function(n, r) { if (n.prop.modelEmit) { this.$handle.onBaseInput(n, r); return; } this.$handle.onInput(n, r); }, onEmitInput: function(n) { this.$handle.setValue(n, n.parser.toValue(n.modelValue, n), n.modelValue); }, renderChildren: function(n, r) { var i = this; if (!T.trueArray(n)) return {}; var a = Tn(); return n.map(function(o) { if (!!o) { if (T.String(o)) return a.setSlot(null, o); if (o.__fc__) return i.renderSlot(a, o.__fc__, r); o.type && Ee(function() { i.$handle.loadChildren(n, r), i.$handle.refresh(); }); } }), a.getSlots(); }, defaultRender: function(n, r) { var i = n.prop; return i.component ? typeof i.component == "string" ? this.vNode.make(i.component, i, r) : this.vNode.makeComponent(i.component, i, r) : this.vNode[n.type] ? this.vNode[n.type](i, r) : this.vNode[n.originType] ? this.vNode[n.originType](i, r) : this.vNode.make(Ji(i.type), i, r); }, renderRule: function(n, r, i) { var a = this; if (!!n) { if (T.String(n)) return n; var o; if (i) o = n.type; else if (o = n.is, n.type) { o = et(n.type); var s = this.vNode.aliasMap[o]; s && (o = et(s)); } if (!!o) { var u = Tn(); T.trueArray(n.children) && n.children.forEach(function(d) { d && u.setSlot(d == null ? void 0 : d.slot, function() { return a.renderRule(d); }); }); var c = z({}, n); return delete c.type, delete c.is, this.vNode.make(o, c, u.mergeBag(r).getSlots()); } } } }); } var ys = 1; function pr(t) { Q(this, { $handle: t, fc: t.fc, vm: t.vm, $manager: t.$manager, vNode: new t.fc.CreateNode(t.vm), id: ys++ }), Zi(this, { options: function() { return t.options; }, sort: function() { return t.sort; } }), this.initCache(), this.initRender(); } ms(pr); _s(pr); function bs(t) { Q(t.prototype, { parseInjectEvent: function(n, r) { var i = n.inject || this.options.injectEvent; return this.parseEventLst(n, r, i); }, parseEventLst: function(n, r, i, a) { var o = this; return Object.keys(r).forEach(function(s) { var u = o.parseEvent(n, r[s], i, a); u && (r[s] = u); }), r; }, parseEvent: function(n, r, i, a) { if (T.Function(r) && (i !== !1 && !T.Undef(i) || r.__inject)) return this.inject(n, r, i); if (!a && Array.isArray(r) && r[0] && (T.String(r[0]) || T.Function(r[0]))) return this.parseEventLst(n, r, i, !0); if (T.String(r)) { var o = ot(r); if (o && r !== o) return o.__inject ? this.parseEvent(n, o, i, !0) : o; } }, parseEmit: function(n) { var r = this, i = {}, a = n.rule, o = a.emitPrefix, s = a.field, u = a.name, c = a.inject, d = a.emit || []; return T.trueArray(d) && d.forEach(function(v) { if (!!v) { var m, C = o || s || u; if (T.Object(v) && (m = v.inject, v = v.name, C = v.prefix || C), C) { var x = Wt("".concat(C, "-").concat(v)), E = function() { var B, V, Y; r.vm.emitsOptions && (r.vm.emitsOptions[x] = null); for (var le = arguments.length, ie = new Array(le), ee = 0; ee < le; ee++) ie[ee] = arguments[ee]; (B = r.vm).emit.apply(B, [x].concat(ie)), (V = r.vm).emit.apply(V, ["emit-event", x].concat(ie)), (Y = r.bus).$emit.apply(Y, [x].concat(ie)); }; if (E.__emit = !0, !m && c === !1) i[v] = E; else { var M = m || c || r.options.injectEvent; i[v] = T.Undef(M) ? E : r.inject(a, E, M); } } } }), n.computed.on = i, i; }, getInjectData: function(n, r) { var i = n.__fc__ && n.__fc__.$api, a = n.__fc__ && n.__fc__.$handle.vm || this.vm, o = a.props, s = o.option, u = o.rule; return { $f: i || this.api, api: i || this.api, rule: u, self: n.__origin__, option: s, inject: r }; }, inject: function(n, r, i) { if (r.__origin) { if (this.watching && !this.loading) return r; r = r.__origin; } var a = this, o = function() { for (var u = a.getInjectData(n, i), c = arguments.length, d = new Array(c), v = 0; v < c; v++) d[v] = arguments[v]; return u.args = [].concat(d), d.unshift(u), r.apply(this, d); }; return o.__origin = r, o.__json = r.__json, o; }, loadStrVar: function(n, r) { var i = this; if (n && typeof n == "string" && n.indexOf("{{") > -1 && n.indexOf("}}") > -1) { var a = n, o = ls(n), s; if (o.forEach(function(u) { var c = u.split("||"), d = c[0].trim(); if (d) { var v = (c[1] || "").trim(), m = r ? r(d, v) : i.fc.getLoadData(d, v); s = m, n = n.replaceAll("{{".concat(u, "}}"), m == null ? "" : m); } }), o.length === 1 && a === "{{".concat(o[0], "}}")) return s; } return n; }, loadFetchVar: function(n, r) { var i = this, a = function(s) { return i.loadStrVar(s, r); }; return n.action = a(n.action || ""), ["headers", "data", "query"].forEach(function(o) { if (n[o]) { var s = {}; Object.keys(n[o]).forEach(function(u) { s[a(u)] = a(n[o][u]); }), n[o] = s; } }), n; } }); } var oi = ["hook:updated", "hook:mounted"]; function ws(t) { Q(t.prototype, { usePage: function() { var n = this, r = this.options.page; if (!!r) { var i = 25, a = $s(this.rules); T.Object(r) && (r.first && (i = parseInt(r.first, 10) || i), r.limit && (a = parseInt(r.limit, 10) || a)), Q(this, { first: i, limit: a, pageEnd: this.rules.length <= i }), this.bus.$on("page-end", function() { return n.vm.emit("page-end", n.api); }), this.pageLoad(); } }, pageLoad: function() { var n = this, r = function i() { n.pageEnd ? (n.bus.$off(oi, i), n.bus.$emit("page-end")) : (n.first += n.limit, n.pageEnd = n.rules.length <= n.first, n.loadRule(), n.refresh()); }; this.bus.$on(oi, r); } }); } function $s(t) { return t.length < 31 ? 31 : Math.ceil(t.length / 3); } function Os(t) { Q(t.prototype, { clearNextTick: function() { this.nextTick && clearTimeout(this.nextTick), this.nextTick = null; }, bindNextTick: function(n) { var r = this; this.clearNextTick(), this.nextTick = setTimeout(function() { n(), r.nextTick = null; }, 10); }, render: function() { return ++this.loadedId, this.vm.setupState.unique > 0 ? this.$render.render() : (this.vm.setupState.unique = 1, []); } }); } function Ss(t) { Object.defineProperties(t.origin, { __fc__: tr(De(t), !0) }), t.rule !== t.origin && Object.defineProperties(t.rule, { __fc__: tr(De(t), !0) }); } function ro(t, e, n) { var r = On(), i = !!e.field; Q(this, { id: r, ref: r, wrapRef: r + "fi", rule: e, origin: e.__origin__ || e, name: e.name, pending: {}, none: !1, watch: [], linkOn: [], root: [], ctrlRule: [], children: [], parent: null, group: e.subRule ? this : null, cacheConfig: null, prop: z({}, e), computed: {}, payload: {}, refRule: {}, input: i, el: void 0, exportEl: void 0, defaultValue: i ? tt(n) : void 0, field: e.field || void 0 }), this.updateKey(), Ss(this), this.update(t, !0); } Q(ro.prototype, { getParentGroup: function() { for (var e = this.parent; e; ) { if (e.group) return e; e = e.parent; } }, loadChildrenPending: function() { var e = this, n = this.rule.children || []; return Array.isArray(n) ? n : this.loadPending({ key: "children", origin: n, def: [], onLoad: function(i) { e.$handle && e.$handle.loadChildren(i, e); }, onUpdate: function(i, a) { e.$handle && (i === a ? e.$handle.loadChildren(i, e) : e.$handle.updateChildren(e, i, a)); }, onReload: function(i) { e.$handle ? e.$handle.updateChildren(e, [], i) : delete e.pending.children; } }); }, loadPending: function(e) { var n = this, r = e.key, i = e.origin, a = e.def, o = e.onLoad, s = e.onReload, u = e.onUpdate; if (this.pending[r] && this.pending[r].origin === i) return this.getPending(r, a); delete this.pending[r]; var c = i; if (T.Function(i)) { var d = de(function() { return i({ rule: n.rule, api: n.$api, update: function(m) { var C = m || a, x = n.getPending(r, a); n.setPending(r, i, C), u && u(C, x); }, reload: function() { var m = n.getPending(r, a); delete n.pending[r], s && s(m), n.$api && n.$api.sync(n.rule); } }); }); d && T.Function(d.then) ? (d.then(function(v) { var m = v || a; n.setPending(r, i, m), o && o(m), n.$api && n.$api.sync(n.rule); }).catch(function(v) { console.error(v); }), c = a, this.setPending(r, i, c)) : (c = d || a, this.setPending(r, i, c), o && o(c)); } return c; }, getPending: function(e, n) { return this.pending[e] && this.pending[e].value || n; }, setPending: function(e, n, r) { this.pending[e] = { origin: n, value: ke(r) }; }, effectData: function(e) { return this.payload[e] || (this.payload[e] = {}), this.payload[e]; }, clearEffectData: function(e) { e === void 0 ? this.payload = {} : delete this.payload[e]; }, updateKey: function(e) { this.key = On(), e && this.parent && this.parent.updateKey(e); }, updateType: function() { this.originType = this.rule.type, this.type = et(this.rule.type), this.trueType = this.$handle.getType(this.originType); }, setParser: function(e) { this.parser = e, e.init(this); }, initProp: function() { var e = this, n, r, i = z({}, this.rule); delete i.children, delete i.validate, this.prop = lt({}, [i].concat(oe(Object.keys(this.payload).map(function(a) { return e.payload[a]; })), [this.computed])), this.prop.validate = [].concat(oe(((n = this.refRule) === null || n === void 0 || (r = n.__$validate) === null || r === void 0 ? void 0 : r.value) || []), oe(this.prop.validate || [])); }, initNone: function() { this.none = !(T.Undef(this.prop.display) || !!this.prop.display); }, injectValidate: function() { return this.prop.validate; }, check: function(e) { return this.vm === e.vm; }, unwatch: function() { this.watch.forEach(function(e) { return e(); }), this.watch = [], this.refRule = {}; }, unlink: function() { this.linkOn.forEach(function(e) { return e(); }), this.linkOn = []; }, link: function() { this.unlink(), this.$handle.appendLink(this); }, watchTo: function() { this.$handle.watchCtx(this); }, delete: function() { this.unwatch(), this.unlink(), this.rmCtrl(), this.parent && this.parent.children.splice(this.parent.children.indexOf(this) >>> 0, 1), Q(this, { deleted: !0, computed: {}, parent: null, children: [], cacheConfig: null, none: !1 }); }, rmCtrl: function() { this.ctrlRule.forEach(function(e) { return e.__fc__ && e.__fc__.rm(); }), this.ctrlRule = []; }, rm: function() { var e = this, n = function() { var i = e.root.indexOf(e.origin); i > -1 && (e.root.splice(i, 1), e.$handle && e.$handle.refresh()); }; if (this.deleted) { n(); return; } this.$handle.noWatch(function() { e.$handle.deferSyncValue(function() { e.rmCtrl(), n(), e.$handle.rmCtx(e), Q(e, { root: [] }); }, e.input); }); }, update: function(e, n) { Q(this, { deleted: !1, $handle: e, $render: e.$render, $api: e.api, vm: e.vm, vNode: e.$render.vNode, updated: !1, cacheValue: this.rule.value }), !n && this.unwatch(), this.watchTo(), this.link(), this.updateType(); } }); function Es(t) { Q(t.prototype, { nextRefresh: function(n) { var r = this, i = this.loadedId; Ee(function() { i === r.loadedId && (n ? n() : r.refresh()); }); }, parseRule: function(n) { var r = this, i = Zr(n); return Object.defineProperties(i, { __origin__: tr(n, !0) }), Cs(i), this.appendValue(i), [i, i.prefix, i.suffix].forEach(function(a) { !a || r.loadFn(a, i); }), this.loadCtrl(i), i.update && (i.update = ot(i.update)), i; }, loadFn: function(n, r) { var i = this; ["on", "props", "deep"].forEach(function(a) { n[a] && i.parseInjectEvent(r, n[a]); }); }, loadCtrl: function(n) { n.control && n.control.forEach(function(r) { r.handle && (r.handle = ot(r.handle)); }); }, syncProp: function(n) { var r = this, i = n.rule; T.trueArray(i.sync) && pt([{ on: i.sync.reduce(function(a, o) { return a[_e(o) === "object" && o.event || "update:".concat(o)] = function(s) { i.props[_e(o) === "object" && o.prop || o] = s, r.vm.emit("sync", o, s, i, r.fapi); }, a; }, {}) }], n.computed); }, loadRule: function() { var n = this; this.cycleLoad = !1, this.loading = !0, this.pageEnd && this.bus.$emit("load-start"), this.deferSyncValue(function() { if (n._loadRule(n.rules), n.loading = !1, n.cycleLoad && n.pageEnd) return n.loadRule(); n.syncForm(), n.pageEnd && n.bus.$emit("load-end"), n.vm.setupState.renderRule(); }); }, loadChildren: function(n, r) { if (this.cycleLoad = !1, this.loading = !0, this.bus.$emit("load-start"), this._loadRule(n, r), this.loading = !1, this.cycleLoad) return this.loadRule(); this.syncForm(), this.bus.$emit("load-end"), this.$render.clearCache(r); }, _loadRule: function(n, r) { var i = this, a = function u(c) { var d = n[c - 1]; if (!d || !d.__fc__) return c > 0 ? u(c - 1) : -1; var v = i.sort.indexOf(d.__fc__.id); return v > -1 ? v : u(c - 1); }, o = function(c, d) { T.trueArray(c) && i._loadRule(c, d); }, s = n.map(function(u, c) { if (!(r && !T.Object(u)) && !(!i.pageEnd && !r && c >= i.first)) { if (u.__fc__ && u.__fc__.root === n && i.ctxs[u.__fc__.id]) return o(u.__fc__.loadChildrenPending(), u.__fc__), u.__fc__; var d = Zr(u), v = function() { return !!(d.field && i.fieldCtx[d.field] && i.fieldCtx[d.field][0] !== u.__fc__); }; i.fc.targetFormDriver("loadRule", { rule: d, api: i.api }, i.fc), i.ruleEffect(d, "init", { repeat: v() }), v() && i.vm.emit("repeat-field", u, i.api); var m, C = !1, x = !!u.__fc__, E = d.value; if (x) { if (m = u.__fc__, E = m.defaultValue, m.deleted) { if (ai(m)) return; m.update(i); } else if (!m.check(i)) { if (ai(m)) return; n[c] = u = u._clone ? u._clone() : Yi(dr(u)), m = null, C = !0; } } if (m) m.originType !== m.rule.type && m.updateType(), i.bindParser(m), i.appendValue(m.rule), m.parent && m.parent !== r && i.rmSubRuleData(m); else { var M = i.parseRule(u); m = new ro(i, M, E), i.bindParser(m); } i.parseEmit(m), i.syncProp(m), m.parent = r || null, m.root = n, i.setCtx(m), !C && !x && (i.effect(m, "load"), i.targetHook(m, "load")), i.effect(m, "created"); var U = m.loadChildrenPending(); if (m.parser.loadChildren === !1 || o(U, m), !r) { var B = a(c); B > -1 || !c ? i.sort.splice(B + 1, 0, m.id) : i.sort.push(m.id); } var V = m.rule; return m.updated || (m.updated = !0, T.Function(V.update) && i.bus.$once("load-end", function() { i.refreshUpdate(m, V.value, "init"); }), i.effect(m, "loaded")), i.refreshControl(m) && (i.cycleLoad = !0), m; } }).filter(function(u) { return !!u; }); r && (r.children = s); }, refreshControl: function(n) { return n.input && n.rule.control && this.useCtrl(n); }, useCtrl: function(n) { var r = this, i = xs(n), a = [], o = this.api; if (!i.length) return !1; for (var s = function(C) { var x = i[C], E = x.handle || function(U) { return (wt[x.condition || "=="] || wt["=="])(U, x.value); }; if (!T.trueArray(x.rule)) return "continue"; var M = z(z({}, x), {}, { valid: de(function() { return E(n.rule.value, o); }), ctrl: As(n, x.rule), isHidden: T.String(x.rule[0]) }); if (M.valid && M.ctrl || !M.valid && !M.ctrl && !M.isHidden) return "continue"; a.push(M); }, u = 0; u < i.length; u++) var c = s(u); if (!a.length) return !1; var d = [], v = !1; return this.deferSyncValue(function() { a.reverse().forEach(function(m) { var C = m.isHidden, x = m.valid, E = m.rule, M = m.prepend, U = m.append, B = m.child, V = m.ctrl, Y = m.method; if (C) { x ? n.ctrlRule.push({ __ctrl: !0, children: E, valid: x }) : V && n.ctrlRule.splice(n.ctrlRule.indexOf(V) >>> 0, 1), d[x ? "push" : "unshift"](function() { Y === "disabled" || Y === "enabled" ? r.api.disabled(!x, E) : Y === "display" ? r.api.display(x, E) : Y === "required" ? (E.forEach(function(ee) { r.api.setEffect(ee, "required", x); }), x || r.api.clearValidateState(E)) : r.api.hidden(!x, E); }); return; } if (x) { v = !0; var le = { type: "fragment", native: !0, __ctrl: !0, children: E }; n.ctrlRule.push(le), r.bus.$once("load-start", function() { M ? o.prepend(le, M, B) : U || B ? o.append(le, U || n.id, B) : n.root.splice(n.root.indexOf(n.origin) + 1, 0, le); }); } else { n.ctrlRule.splice(n.ctrlRule.indexOf(V), 1); var ie = bt(V); ie && ie.rm(); } }); }), d.length && (this.loading ? d.length && this.bus.$once("load-end", function() { d.forEach(function(m) { return m(); }); }) : d.length && Ee(function() { d.forEach(function(m) { return m(); }); })), this.vm.emit("control", n.origin, this.api), this.effect(n, "control"), v; }, reloadRule: function(n) { return this._reloadRule(n); }, _reloadRule: function(n) { var r = this; n || (n = this.rules); var i = z({}, this.ctxs); this.clearNextTick(), this.initData(n), this.fc.rules = n, this.deferSyncValue(function() { r.bus.$once("load-end", function() { Object.keys(i).filter(function(a) { return r.ctxs[a] === void 0; }).forEach(function(a) { return r.rmCtx(i[a]); }), r.$render.clearCacheAll(); }), r.reloading = !0, r.loadRule(), r.reloading = !1, r.refresh(), r.bus.$emit("reloading", r.api); }), this.bus.$off("next-tick", this.nextReload), this.bus.$once("next-tick", this.nextReload), this.bus.$emit("update", this.api); }, refresh: function() { this.vm.setupState.refresh(); } }); } function Cs(t) { var e = eo(); return Object.keys(e).forEach(function(n) { Se(t, n) || (t[n] = e[n]); }), t; } function xs(t) { var e = t.rule.control || []; return T.Object(e) ? [e] : e; } function As(t, e) { for (var n = 0; n < t.ctrlRule.length; n++) { var r = t.ctrlRule[n]; if (r.children === e) return r; } } function ai(t) { return !!t.rule.__ctrl; } function Rs(t) { Q(t.prototype, { setValue: function(n, r, i, a) { var o = this; n.deleted || (n.rule.value = r, this.changeStatus = !0, this.nextRefresh(), this.$render.clearCache(n), this.setFormData(n, i), this.syncValue(), this.valueChange(n, r), this.vm.emit("change", n.field, r, n.origin, this.api, a || !1), this.effect(n, "value"), this.targetHook(n, "value", { value: r }), this.emitEvent("change", n.field, r, { rule: n.origin, api: this.api, setFlag: a || !1 }), a && Ee(function() { Ee(function() { Ee(function() { o.api.clearValidateState(n.id); }); }); })); }, onInput: function(n, r) { var i; n.input && (this.isQuote(n, i = n.parser.toValue(r, n)) || this.isChange(n, r)) && this.setValue(n, i, r); }, onUpdateValue: function(n, r) { var i = this; this.deferSyncValue(function() { var a = n.getParentGroup(), o = a ? i.subRuleData[a.id] : null, s = {}; Object.keys(r || {}).forEach(function(u) { o && Se(o, u) ? s[u] = r[u] : Se(i.api.form, u) ? i.api.form[u] = r[u] : i.api.top !== i.api && Se(i.api.top.form, u) && (i.api.top.form[u] = r[u]); }), Object.keys(s).length && i.api.setChildrenFormData(a.rule, s); }); }, onBaseInput: function(n, r) { this.setFormData(n, r), n.modelValue = r, this.nextRefresh(), this.$render.clearCache(n); }, setFormData: function(n, r) { n.modelValue = r; var i = n.getParentGroup(); i && (this.subRuleData[i.id] || (this.subRuleData[i.id] = {}), this.subRuleData[i.id][n.field] = n.rule.value), Xe(this.formData, n.id, r); }, rmSubRuleData: function(n) { var r = n.getParentGroup(); r && this.subRuleData[r.id] && delete this.subRuleData[r.id][n.field]; }, getFormData: function(n) { return this.formData[n.id]; }, syncForm: function() { var n = this, r = ke({}), i = this.fields(), a = []; this.options.appendValue !== !1 && Object.keys(this.appendData).reduce(function(o, s) { return i.indexOf(s) === -1 && (o[s] = mn(n.appendData, s)), o; }, r), i.reduce(function(o, s) { var u = (n.fieldCtx[s] || []).filter(function(c) { return !n.isIgnore(c.rule); })[0] || n.fieldCtx[s][0]; return n.isIgnore(u.rule) && a.push(s), o[s] = mn(u.rule, "value"), o; }, r), this.form = r, this.ignoreFields = a, this.syncValue(); }, isIgnore: function(n) { return n.ignore === !0 || n.ignore === "hidden" && n.hidden || this.options.ignoreHiddenFields && n.hidden; }, appendValue: function(n) { (!n.field || !Se(this.appendData, n.field)) && !this.options.forceCoverValue || (n.value = this.appendData[n.field], delete this.appendData[n.field]); }, addSubForm: function(n, r) { this.subForm[n.id] = r; }, deferSyncValue: function(n, r) { this.deferSyncFn || (this.deferSyncFn = n), this.deferSyncFn.sync || (this.deferSyncFn.sync = r), de(n), this.deferSyncFn === n && (this.deferSyncFn = null, n.sync && this.syncForm()); }, syncValue: function() { var n = this; if (this.deferSyncFn) return this.deferSyncFn.sync = !0; var r = {}; Object.keys(this.form).forEach(function(i) { n.ignoreFields.indexOf(i) === -1 && (r[i] = n.form[i]); }), this.vm.setupState.updateValue(r); }, isChange: function(n, r) { return JSON.stringify(this.getFormData(n), si) !== JSON.stringify(r, si); }, isQuote: function(n, r) { return (T.Object(r) || Array.isArray(r)) && r === n.rule.value; }, refreshUpdate: function(n, r, i, a) { var o = this; if (T.Function(n.rule.update)) { var s = de(function() { return n.rule.update(r, n.origin, o.api, { origin: i || "change", linkField: a }); }); if (s === void 0) return; n.rule.hidden = s === !0; } }, valueChange: function(n, r) { this.refreshRule(n, r), this.bus.$emit("change-" + n.field, r); }, refreshRule: function(n, r, i, a) { this.refreshControl(n) && (this.$render.clearCacheAll(), this.loadRule(), this.bus.$emit("update", this.api), this.refresh()), this.refreshUpdate(n, r, i, a); }, appendLink: function(n) { var r = this, i = n.rule.link; T.trueArray(i) && i.forEach(function(a) { var o = function() { return r.refreshRule(n, n.rule.value, "link", a); }; r.bus.$on("change-" + a, o), n.linkOn.push(function() { return r.bus.$off("change-" + a, o); }); }); }, fields: function() { return Object.keys(this.fieldCtx); } }); } function si(t, e) { return typeof e == "function" ? "" + e : e; } var hn = { init: function(e) { }, toFormValue: function(e, n) { return e; }, toValue: function(e, n) { return e; }, mounted: function(e) { }, render: function(e, n) { return n.$handle.fc.renderDriver && n.$handle.fc.renderDriver.defaultRender ? n.$handle.fc.renderDriver.defaultRender(n, e) : n.$render.defaultRender(n, e); }, preview: function(e, n) { return n.$handle.fc.renderDriver && n.$handle.fc.renderDriver.defaultPreview ? n.$handle.fc.renderDriver.defaultPreview(n, e) : this.render(e, n); }, mergeProp: function(e) { } }, Ps = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], ui = Symbol("oldValue"); function Ds(t) { Q(t.prototype, { getCtx: function(n) { return this.getFieldCtx(n) || this.getNameCtx(n)[0] || this.ctxs[n]; }, getCtxs: function(n) { return this.fieldCtx[n] || this.nameCtx[n] || (this.ctxs[n] ? [this.ctxs[n]] : []); }, setIdCtx: function(n, r, i) { var a = "".concat(i, "Ctx"); this[a][r] ? this[a][r].push(n) : this[a][r] = [n]; }, rmIdCtx: function(n, r, i) { var a = "".concat(i, "Ctx"), o = this[a][r]; if (!o) return !1; var s = o.splice(o.indexOf(n) >>> 0, 1).length > 0; return o.length || delete this[a][r], s; }, getFieldCtx: function(n) { return (this.fieldCtx[n] || [])[0]; }, getNameCtx: function(n) { return this.nameCtx[n] || []; }, setCtx: function(n) { var r = n.id, i = n.field, a = n.name, o = n.rule; this.ctxs[r] = n, a && this.setIdCtx(n, a, "name"), n.input && (this.setIdCtx(n, i, "field"), this.setFormData(n, n.parser.toFormValue(o.value, n)), this.isMounted && !this.reloading && this.vm.emit("change", n.field, o.value, n.origin, this.api)); }, getParser: function(n) { var r = this.fc.parsers, i = this.fc.renderDriver; if (i) { var a = i.parsers || {}, o = a[n.originType] || a[et(n.type)] || a[n.trueType]; if (o) return o; } return r[n.originType] || r[et(n.type)] || r[n.trueType] || hn; }, bindParser: function(n) { n.setParser(this.getParser(n)); }, getType: function(n) { var r = this.fc.CreateNode.aliasMap, i = r[n] || r[et(n)] || n; return et(i); }, noWatch: function(n) { this.noWatchFn || (this.noWatchFn = n), de(n), this.noWatchFn === n && (this.noWatchFn = null); }, watchCtx: function(n) { var r = this, i = Xi(); if (i.filter(function(o) { return o[0] !== "_" && o[0] !== "$" && Ps.indexOf(o) === -1; }).forEach(function(o) { var s = mn(n.rule, o), u = o === "children"; n.refRule[o] = s, n.watch.push(Ve(u ? function() { return T.Function(s.value) ? s.value : oe(s.value || []); } : function() { return s.value; }, function(c, d) { var v = s.value; if (!r.isBreakWatch()) { if (u && n.parser.loadChildren === !1) { r.$render.clearCache(n), r.nextRefresh(); return; } if (r.watching = !0, Ee(function() { r.targetHook(n, "watch", { key: o, oldValue: d, newValue: v }); }), o === "hidden" && Boolean(v) !== Boolean(d) && (r.$render.clearCacheAll(), Ee(function() { r.targetHook(n, "hidden", { value: v }); })), o === "ignore" && n.input || o === "hidden" && n.input && (n.rule.ignore === "hidden" || r.options.ignoreHiddenFields)) r.syncForm(); else if (o === "link") { n.link(); return; } else ["props", "on", "deep"].indexOf(o) > -1 ? (r.parseInjectEvent(n.rule, v || {}), o === "props" && n.input && r.setFormData(n, n.parser.toFormValue(n.rule.value, n))) : o === "emit" ? r.parseEmit(n) : ["prefix", "suffix"].indexOf(o) > -1 ? v && r.loadFn(v, n.rule) : o === "type" ? (n.updateType(), r.bindParser(n)) : u && (T.Function(d) && (d = n.getPending("children", [])), T.Function(v) && (v = n.loadChildrenPending()), r.updateChildren(n, v, d)); r.$render.clearCache(n), r.refresh(), r.watching = !1; } }, { deep: !u, sync: u })); }), n.refRule.__$title = kt(function() { var o = (_e(n.rule.title) === "object" ? n.rule.title.title : n.rule.title) || ""; if (o) { var s = o.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/); s && (o = r.api.t(s[1])); } return o; }), n.refRule.__$info = kt(function() { var o = (_e(n.rule.info) === "object" ? n.rule.info.info : n.rule.info) || ""; if (o) { var s = o.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/); s && (o = r.api.t(s[1])); } return o; }), n.refRule.__$validate = kt(function() { return gt(n.rule.validate).map(function(o) { var s = z({}, o); if (s.message) { var u = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/); u && (s.message = r.api.t(u[1], { title: n.refRule.__$title.value })); } if (T.Function(s.validator)) { var c = n; return s.validator = function() { for (var d, v = arguments.length, m = new Array(v), C = 0; C < v; C++) m[C] = arguments[C]; return (d = o.validator).call.apply(d, [{ that: this, id: c.id, field: c.field, rule: c.rule, api: c.$handle.api }].concat(m)); }, s; } return s; }); }), n.input) { var a = mn(n.rule, "value"); n.watch.push(Ve(function() { return a.value; }, function() { var o = n.parser.toFormValue(a.value, n); r.isChange(n, o) && r.setValue(n, a.value, o, !0); })); } this.bus.$once("load-end", function() { var o = n.rule.computed; !o || (_e(o) !== "object" && (o = { value: o }), Object.keys(o).forEach(function(s) { var u = void 0, c = kt(function() { var v = o[s]; if (!!v) { var m = r.compute(n, v); return v.linkage && m === ui ? u : m; } }), d = function(m) { s === "value" ? r.onInput(n, m) : s[0] === "$" ? r.api.setEffect(n.id, s, m) : vt(n.rule, s, m); }; (s === "value" ? [void 0, null, ""].indexOf(n.rule.value) > -1 : c.value !== He(n.rule, s)) && d(c.value), n.watch.push(Ve(c, function(v) { u = v, setTimeout(function() { d(v); }); })); })); }), this.watchEffect(n); }, compute: function(n, r) { var i = this, a; if (_e(r) === "object") { var o = n.getParentGroup(), s = function d(v) { if (v = Array.isArray(v) ? { mode: "AND", group: v } : v, !T.trueArray(v.group)) return !0; for (var m = v.mode === "OR", C = !0, x = function(B) { var V = v.group[B], Y = void 0, le = null; if (V.variable) le = JSON.stringify(i.fc.getLoadData(V.variable) || ""); else if (V.field) le = ni(V.field || ""); else return { v: !0 }; var ie = V.compare; if (ie && (ie = ni(ie || "")), V.mode ? Y = d(V) : wt[V.condition] ? T.Function(V.handler) ? Y = de(function() { return V.handler(i.api, n.rule); }) : Y = new Function("$condition", "$val", "$form", "$group", "$rule", "with($form){with(this){with($group){ return $condition['".concat(V.condition, "'](").concat(le, ", ").concat(ie || "$val", "); }}}")).call(i.api.form, wt, V.value, i.api.top.form, o ? i.subRuleData[o.id] || {} : {}, n.rule) : Y = !1, m && Y) return { v: !0 }; m || (C = C && Y); }, E = 0; E < v.group.length; E++) { var M = x(E); if (_e(M) === "object") return M.v; } return m ? !1 : C; }, u = s(r); return u = r.invert === !0 ? !u : u, r.linkage ? u ? de(function() { return i.computeValue(r.linkage, n, o); }, void 0) : ui : u; } else if (T.Function(r)) a = function() { return r(i.api.form, i.api); }; else { var c = n.getParentGroup(); a = function() { return i.computeValue(r, n, c); }; } return de(a, void 0); }, computeValue: function(n, r, i) { var a = this, o = Object.keys(this.fc.formulas).reduce(function(s, u) { return s[u] = function() { for (var c, d = arguments.length, v = new Array(d), m = 0; m < d; m++) v[m] = arguments[m]; return (c = a.fc.formulas[u]).call.apply(c, [{ that: this, rule: r.rule, api: a.api, fc: a.fc }].concat(v)); }, s; }, {}); return new Function("$formulas", "$form", "$group", "$rule", "$api", "with($form){with(this){with($group){with($formulas){ return ".concat(n, " }}}}")).call(this.api.form, o, this.api.top.form, i ? this.subRuleData[i.id] || {} : {}, r.rule, this.api); }, updateChildren: function(n, r, i) { var a = this; this.deferSyncValue(function() { i && i.forEach(function(o) { (r || []).indexOf(o) === -1 && o && !T.String(o) && o.__fc__ && o.__fc__.parent === n && a.rmCtx(o.__fc__); }), T.trueArray(r) && (a.loadChildren(r, n), a.bus.$emit("update", a.api)); }); }, rmSub: function(n) { var r = this; T.trueArray(n) && n.forEach(function(i) { i && i.__fc__ && r.rmCtx(i.__fc__); }); }, rmCtx: function(n) { var r = this; if (!n.deleted) { var i = n.id, a = n.field, o = n.input, s = n.name; yt(this.ctxs, i), yt(this.formData, i), yt(this.subForm, i), yt(this.vm.setupState.ctxInject, i); var u = n.getParentGroup(); u && this.subRuleData[u.id] && yt(this.subRuleData[u.id], a), n.group && yt(this.subRuleData, i), o && this.rmIdCtx(n, a, "field"), s && this.rmIdCtx(n, s, "name"), o && !Se(this.fieldCtx, a) && yt(this.form, a), this.deferSyncValue(function() { if (!r.reloading) { if (n.parser.loadChildren !== !1) { var d = n.getPending("children", n.rule.children); T.trueArray(d) && d.forEach(function(v) { return v.__fc__ && r.rmCtx(v.__fc__); }); } n.root === r.rules && r.vm.setupState.renderRule(); } }, o); var c = this.sort.indexOf(i); return c > -1 && this.sort.splice(c, 1), this.$render.clearCache(n), n.delete(), this.effect(n, "deleted"), this.targetHook(n, "deleted"), o && !this.fieldCtx[a] && this.vm.emit("remove-field", a, n.rule, this.api), n.rule.__ctrl || this.vm.emit("remove-rule", n.rule, this.api), n; } } }); } function Fs(t) { Q(t.prototype, { mounted: function() { var n = this, r = function() { n.isMounted = !0, n.lifecycle("mounted"); }; this.pageEnd ? r() : this.bus.$once("page-end", r); }, lifecycle: function(n) { this.fc.targetFormDriver(n, this.api, this.fc), this.vm.emit(n, this.api), this.emitEvent(n, this.api); }, emitEvent: function(n) { for (var r, i = arguments.length, a = new Array(i > 1 ? i - 1 : 0), o = 1; o < i; o++) a[o - 1] = arguments[o]; var s = this.options[n] || this.options[et("on-" + n)]; if (s) { var u = ot(s); T.Function(u) && de(function() { return u.apply(void 0, a); }); } (r = this.bus).$emit.apply(r, [n].concat(a)); }, targetHook: function(n, r, i) { var a, o, s = this, u = (a = n.prop) === null || a === void 0 || (o = a.hook) === null || o === void 0 ? void 0 : o[r]; u && (u = Array.isArray(u) ? u : [u], u.forEach(function(c) { de(function() { return c(z(z({}, i || {}), {}, { rule: n.rule, api: s.api })); }); })); } }); } function ks(t) { Q(t.prototype, { useProvider: function() { var n = this, r = this.fc.providers; Object.keys(r).forEach(function(i) { var a = r[i]; T.Function(a) && (a = a(n.fc)), a._c = Ts(a), n.onEffect(a), n.providers[i] = a; }); }, onEffect: function(n) { var r = this, i = []; (n._c || ["*"]).forEach(function(a) { var o = a === "*" ? "*" : r.getType(a); i.indexOf(o) > -1 || (i.push(o), r.bus.$on("p:".concat(n.name, ":").concat(o, ":").concat(n.input ? 1 : 0), function(s, u) { n[s] && n[s].apply(n, oe(u)); })); }), n._used = i; }, watchEffect: function(n) { var r = this, i = { required: function() { var o, s; return (Se(n.rule, "$required") ? n.rule.$required : (o = n.rule) === null || o === void 0 || (s = o.effect) === null || s === void 0 ? void 0 : s.required) || !1; } }; Object.keys(n.rule.effect || {}).forEach(function(a) { i[a] = function() { return n.rule.effect[a]; }; }), Object.keys(n.rule).forEach(function(a) { a[0] === "$" && (i[a.substr(1)] = function() { return n.rule[a]; }); }), Object.keys(i).forEach(function(a) { n.watch.push(Ve(i[a], function(o) { r.effect(n, "watch", Ae({}, a, o)); }, { deep: !0 })); }); }, ruleEffect: function(n, r, i) { this.emitEffect({ rule: n, input: !!n.field, type: this.getType(n.type) }, r, i); }, effect: function(n, r, i) { this.emitEffect({ rule: n.rule, input: n.input, type: n.trueType, ctx: n, custom: i }, r); }, getEffect: function(n, r) { if (Se(n, "$" + r)) return n["$" + r]; if (Se(n, "effect") && Se(n.effect, r)) return n.effect[r]; }, emitEffect: function(n, r, i) { var a = this, o = n.ctx, s = n.rule, u = n.input, c = n.type, d = n.custom; if (!(!c || ["fcFragment", "fragment"].indexOf(c) > -1)) { var v = d || Object.keys(s).reduce(function(m, C) { return C[0] === "$" && (m[C.substr(1)] = s[C]), m; }, z({}, s.effect || {})); Object.keys(v).forEach(function(m) { var C = a.providers[m]; if (!(!C || C.input && !u)) { var x; if (!C._c) x = "*"; else if (C._used.indexOf(c) > -1) x = c; else return; var E = z({ value: v[m], getValue: function() { return a.getEffect(s, m); } }, i || {}); o && (E.getProp = function() { return o.effectData(m); }, E.clearProp = function() { return o.clearEffectData(m); }, E.mergeProp = function(M) { return lt(E.getProp(), [M]); }, E.id = o.id), a.bus.$emit("p:".concat(m, ":").concat(x, ":").concat(C.input ? 1 : 0), r, [E, s, a.api]); } }); } } }); } function Ms(t) { return t.filter(function(e, n, r) { return r.indexOf(e, 0) === n; }); } function Ts(t) { var e = t.components; if (Array.isArray(e)) { var n = Ms(e.filter(function(r) { return r !== "*"; })); return n.length ? n : !1; } else return T.String(e) ? [e] : !1; } function at(t) { var e = this; Zi(this, { options: function() { return t.options.value || {}; }, bus: function() { return t.bus; }, preview: function() { return t.vm.props.preview != null ? t.vm.props.preview : t.options.value.preview || !1; } }), Q(this, { fc: t, vm: t.vm, watching: !1, loading: !1, reloading: !1, noWatchFn: null, deferSyncFn: null, isMounted: !1, formData: ke({}), subRuleData: ke({}), subForm: {}, form: ke({}), appendData: {}, ignoreFields: [], providers: {}, cycleLoad: null, loadedId: 1, nextTick: null, changeStatus: !1, pageEnd: !0, nextReload: function() { e.lifecycle("reload"); } }), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new pr(this), this.api = t.extendApiFn.reduce(function(n, r) { var i = de(function() { return r(n, e); }); return i && i !== n && Q(n, i), n; }, ps(this)); } Q(at.prototype, { initData: function(e) { Q(this, { ctxs: {}, fieldCtx: {}, nameCtx: {}, sort: [], rules: e }); }, init: function() { this.updateAppendData(), this.useProvider(), this.usePage(), this.loadRule(), this.$manager.__init(), this.lifecycle("created"); }, updateAppendData: function() { this.appendData = z(z(z({}, this.options.formData || {}), this.fc.vm.props.modelValue || {}), this.appendData); }, isBreakWatch: function() { return this.loading || this.noWatchFn || this.reloading; }, beforeFetch: function(e) { var n = this; return new Promise(function(r) { var i = n.options.beforeFetch && de(function() { return n.options.beforeFetch(e, { api: n.api }); }); i && T.Function(i.then) ? i.then(r) : r(); }); } }); bs(at); ws(at); Os(at); Es(at); Rs(at); Ds(at); Fs(at); ks(at); var js = "fcFragment", jn = $e({ name: js, inheritAttrs: !1, props: ["vnode"], render: function() { return this.vnode; } }); function Is(t) { return Object.keys(t).map(function(e) { var n = t[e], r = Ko(e); if (!!r) return [r, n.value, n.arg, n.modifiers]; }).filter(function(e) { return !!e; }); } function li(t, e) { var n = t.directives; return n ? (Array.isArray(n) || (n = [n]), Yo(e, n.reduce(function(r, i) { return r.concat(Is(i)); }, []))) : e; } function Bs() { var t = {}; function e() { } return Q(e.prototype, { make: function(r, i, a) { return li(i, this.h(r, ei(i), a)); }, makeComponent: function(r, i, a) { try { return li(i, W(r, ei(i), a)); } catch (o) { return console.error(o), W(""); } }, h: function(r, i, a) { var o = Wn().appContext.config.isNativeTag(r); o && delete i.formCreateInject; try { return W(o ? r : fe(r), i, a); } catch (s) { return console.error(s), W(""); } }, aliasMap: t }), Q(e, { aliasMap: t, alias: function(r, i) { t[r] = i; }, use: function(r) { Object.keys(r).forEach(function(i) { var a = Wt(i), o = gs(i).toLocaleLowerCase(), s = r[i]; [i, a, o].forEach(function(u) { e.alias(i, s), e.prototype[u] = function(c, d) { return this.make(s, c, d); }; }); }); } }), e; } function Vs(t) { var e = /* @__PURE__ */ function(n) { ta(i, n); var r = oa(i); function i() { return ea(this, i), r.apply(this, arguments); } return i; }(io); return Object.assign(e.prototype, t), e; } function io(t) { Q(this, { $handle: t, vm: t.vm, options: {}, ref: "fcForm", mergeOptionsRule: { normal: ["form", "row", "info", "submitBtn", "resetBtn"] } }), this.updateKey(), this.init(); } Q(io.prototype, { __init: function() { var e = this; this.$render = this.$handle.$render, this.$r = function() { var n; return (n = e.$render).renderRule.apply(n, arguments); }; }, updateKey: function() { this.key = On(); }, init: function() { }, update: function() { }, beforeRender: function() { }, form: function() { return this.vm.refs[this.ref]; }, getSlot: function(e) { var n = function r(i) { if (i) { var a = i.slots[e]; return a || r(i.setupState.parent); } }; return n(this.vm); }, mergeOptions: function(e, n) { var r = this; return pt(e.map(function(i) { return r.tidyOptions(i); }), n, this.mergeOptionsRule); }, updateOptions: function(e) { this.$handle.fc.targetFormDriver("updateOptions", e, { handle: this.$handle, api: this.$handle.api }), this.options = this.mergeOptions([e], this.getDefaultOptions()), this.update(); }, tidyOptions: function(e) { return e; }, tidyRule: function(e) { }, mergeProp: function(e) { }, getDefaultOptions: function() { return {}; }, render: function(e) { } }); var Ls = function(e) { var n = { name: "loadData", _fn: [], loaded: function(i, a, o) { this.deleted(i); var s = gt(i.getValue()), u = []; s.forEach(function(c) { if (c && (c.attr || c.template)) { var d = function(x) { var E; c.template ? E = e.$handle.loadStrVar(c.template, x) : c.handler && T.Function(c.handler) ? E = c.handler(x, a, o) : E = x(c.attr, c.default), c.copy !== !1 && (E = tt(E)); var M = c.modify ? a : i.getProp(); c.to === "child" ? M.children ? M.children[0] = E : M.children = [E] : vt(M, c.to || "options", E), o.sync(a); }, v = function(x) { return d(x); }, m = e.watchLoadData(v); d = Ot(d, c.wait || 300), c.watch !== !1 ? u.push(m) : m(); } }), this._fn[i.id] = u; }, deleted: function(i) { this._fn[i.id] && (this._fn[i.id].forEach(function(a) { a(); }), delete this._fn[i.id]), i.clearProp(); } }; return n.watch = n.mounted, n; }, Ns = function(e) { var n = { name: "t", _fn: [], loaded: function(i, a, o) { this.deleted(i); var s = i.getValue() || {}, u = []; Object.keys(s).forEach(function(c) { var d = s[c]; if (d) { var v = _e(d) === "object", m = function(M) { var U = e.t(v ? d.attr : d, v ? d.params : null, M), B = v && d.modify ? a : i.getProp(); c === "child" ? B.children ? B.children[0] = U : B.children = [U] : vt(B, c, U), o.sync(a); }, C = function(M) { return m(M); }, x = e.watchLoadData(C); m = Ot(m, d.wait || 300), d.watch !== !1 ? u.push(x) : x(); } }), this._fn[i.id] = u; }, deleted: function(i) { this._fn[i.id] && (this._fn[i.id].forEach(function(a) { a(); }), delete this._fn[i.id]), i.clearProp(); } }; return n.watch = n.loaded, n; }, nr = { name: "componentValidate", load: function(e, n, r) { var i = e.getValue(); if (!i || i.method === !1) e.clearProp(), r.clearValidateState([n.field]); else { T.Object(i) || (i = { method: i }); var a = i.method; delete i.method, e.getProp().validate = [z(z({}, i), {}, { validator: function() { var s = bt(n); if (s) { for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++) c[d] = arguments[d]; return r.exec.apply(r, [s.id, T.String(a) ? a : "formCreateValidate"].concat(c, [{ attr: e, rule: n, api: r }])); } } })]; } }, watch: function() { nr.load.apply(nr, arguments); } }, zs = function(e) { function n(a) { return T.String(a) && (a = { action: a, to: "options" }), a; } function r(a, o, s) { var u = a.value; i.deleted(a), T.Function(u) && (u = u(o, s)), u = n(u); var c = function(x) { x === void 0 ? a.clearProp() : vt(a.getProp(), u.to || "options", x), x != null && u && u.key && e.$handle.options.globalData[u.key] && e.fetchCache.set(e.$handle.options.globalData[u.key], { status: !0, data: x }), s.sync(o); }; if (!u || !u.action && !u.key) { c(void 0); return; } if (u = tt(u), u.to || (u.to = "options"), u.key) { var d = e.$handle.options.globalData[u.key]; if (!d) { c(void 0); return; } if (d.type === "static") { c(d.data); return; } else u = z(z({}, u), d); } var v = u.onError, m = function() { if (!a.getValue()) return a.clearProp(), s.sync(o), !0; }; i._fn[a.id] = e.watchLoadData(Ot(function(C, x) { if (x && u.watch === !1) return i._fn[a.id](); var E = e.$handle.loadFetchVar(tt(u), C), M = z(z({ headers: {} }, E), {}, { onSuccess: function(B, V) { if (!m()) { var Y = function(ee) { return V ? ee : Se(ee, "data") ? ee.data : ee; }, le = ot(E.parse); T.Function(le) ? Y = le : le && T.String(le) && (Y = function(ee) { return He(ee, le); }), c(Y(B, o, s)), s.sync(o); } }, onError: function(B) { c(void 0), !m() && (v || function(V) { return cr(V.message || "fetch fail " + E.action); })(B, o, s); } }); e.$handle.beforeFetch(M, { rule: o, api: s }).then(function() { if (T.Function(E.action)) { E.action(o, s).then(function(U) { M.onSuccess(U, !0); }).catch(function(U) { M.onError(U); }); return; } de(function() { return e.create.fetch(M, { inject: a, rule: o, api: s }); }); }); }, u.wait || 600)); } var i = { name: "fetch", _fn: [], loaded: function() { r.apply(void 0, arguments); }, watch: function() { r.apply(void 0, arguments); }, deleted: function(o) { this._fn[o.id] && (this._fn[o.id](), delete this._fn[o.id]), o.clearProp(); } }; return i; }, Us = { fetch: zs, loadData: Ls, t: Ns, componentValidate: nr }, qs = "html", Gs = { name: qs, loadChildren: !1, render: function(e, n) { return n.prop.props.innerHTML = e.default(), n.vNode.make(n.prop.props.tag || "div", n.prop); }, renderChildren: function(e) { return { default: function() { return e.filter(function(r) { return T.String(r); }).join(""); } }; } }; function Hs(t) { t = t + "="; for (var e = decodeURIComponent(document.cookie), n = e.split(";"), r = 0; r < n.length; r++) { for (var i = n[r]; i.charAt(0) === " "; ) i = i.substring(1); if (i.indexOf(t) === 0) { i = i.substring(t.length, i.length); try { return JSON.parse(i); } catch { return i; } } } return null; } function Xs(t) { var e = localStorage.getItem(t); if (e) try { return JSON.parse(e); } catch { return e; } return null; } function Ws(t) { var e = sessionStorage.getItem(t); if (e) try { return JSON.parse(e); } catch { return e; } return null; } function mr(t, e) { if (!e) return null; var n = e.split("."), r = t(n.shift()); return n.length ? r == null ? null : He(r, n) : r; } function Js(t) { return mr(Hs, t); } function Ys(t) { return mr(Xs, t); } function Qs(t) { return mr(Ws, t); } function Ks(t, e) { var n; return arguments.length === 2 ? (n = arguments[1], e = n[t]) : n = arguments[2], { id: e, prop: n }; } function In() { return Ks.apply(void 0, ["name"].concat(Array.prototype.slice.call(arguments))); } function Zs(t) { var e = t.key || [], n = t.array || [], r = t.normal || []; Kn.push.apply(Kn, oe(e)), _n.push.apply(_n, oe(n)), yn.push.apply(yn, oe(r)), to([].concat(oe(e), oe(n), oe(r))); } var eu = 1, Ge = {}, nn = Symbol("defValue"); function oo(t) { var e = Ae({}, jn.name, jn), n = {}, r = {}, i = {}, a = {}, o = [], s = [], u = [t.extendApi], c = z({}, Us), d = ds(), v = { global: {} }, m = ke({}), C = Bs(), x = {}, E = t.isMobile === !0, M = {}; Zs(t.attrs || {}); function U($) { var w = Ge[$]; if (Array.isArray(w)) return w.map(function(R) { return R.api(); }); if (w) return w.api(); } function B($) { o.push($); } function V() { var $ = In.apply(void 0, arguments); $.id && $.prop && (r[$.id] = $.prop); } function Y() { var $ = In.apply(void 0, arguments); $.id && $.prop && (c[$.id] = T.Function($.prop) ? $.prop : z(z({}, $.prop), {}, { name: $.id })); } function le($) { C.use($); } function ie() { var $ = In.apply(void 0, arguments); if (!$.id || !$.prop) return hn; var w = et($.id), R = $.prop, p = R.merge === !0 ? n[w] : void 0; n[w] = tn(R, p || hn), d[w] = Te(w), R.maker && Q(d, R.maker); } function ee($, w) { var R; if (T.String($)) { if (R = $, w === void 0) return e[R]; } else R = $.displayName || $.name, w = $; if (!(!R || !w)) { var p = et(R); e[R] = w, e[p] = w, delete C.aliasMap[R], delete C.aliasMap[p], delete n[R], delete n[p], w.formCreateParser && ie(R, w.formCreateParser); } } function X() { return os(k, e, r); } function pe($, w) { var R = X(); return Qo({ data: function() { return ke({ rule: $, option: w }); }, render: function() { return Ze(R, z({ ref: "fc" }, this.$data)); } }); } function Ce() { return jn; } function Qe($, w) { return T.Function($.install) ? $.install(qe, w) : T.Function($) && $(qe, w), this; } function qe($, w) { var R = pe($, w || {}); o.forEach(function(y) { de(function() { return y(qe, R); }); }); var p = document.createElement("div"); ((w == null ? void 0 : w.el) || document.body).appendChild(p); var b = R.mount(p); return b.$refs.fc.fapi; } tn(qe, M); function dt($) { var w = z({}, t); return $ ? w.inherit = { components: e, parsers: n, directives: r, modelFields: i, providers: c, useApps: o, maker: d, formulas: x, loadData: m } : delete w.inherit, oo(w); } function F($, w) { i[$] = w; } function D($, w) { x[$] = w; } function A($, w) { var R = a[$] || {}, p = R.parsers || {}; w.parsers && Object.keys(w.parsers).forEach(function(b) { p[b] = tn(w.parsers[b], hn); }), w.name = $, a[$] = z(z(z({}, R), w), {}, { parsers: p }); } function f($) { $ && Object.keys(Ge).forEach(function(w) { var R = Array.isArray(Ge[w]) ? Ge[w] : [Ge[w]]; R.forEach(function(p) { p.bus.$emit("$loadData." + $); }); }); } function l($, w) { vt(m, $, w), f($); } function g($, w) { var R = function() { for (var b = arguments.length, y = new Array(b), O = 0; O < b; O++) y[O] = arguments[O]; return de(function() { return w.apply(void 0, y); }); }; R._driver = !0, l($, R); } function _($, w) { var R = ($ || "").split("."); $ = R.shift(); var p = R.join("."); if (Se(m, $) || (m[$] = nn), m[$] !== nn) { var b = m[$]; return b && b._driver ? b = b(p) : R.length && (b = He(b, R)), b == null || b === "" ? w : b; } else return w; } function h($) { u.push($); } function S($) { delete m[$], f($); } function j($, w) { s.push({ name: $, callback: w }); } function k($) { var w = this; Q(this, { id: eu++, create: qe, vm: $, manager: Vs(t.manager), parsers: n, providers: c, modelFields: i, formulas: x, isMobile: E, rules: $.props.rule, name: $.props.name || On(), inFor: $.props.inFor, prop: { components: e, directives: r }, drivers: a, renderDriver: null, get: null, refreshData: f, loadData: m, CreateNode: C, bus: new Ii(), unwatch: [], options: zo({}), extendApiFn: u, fetchCache: /* @__PURE__ */ new WeakMap(), tmpData: ke({}) }), s.forEach(function(R) { w.bus.$on(R.name, R.callback); }), Ee(function() { Ve(w.options, function() { w.$handle.$manager.updateOptions(w.options.value), w.api().refresh(); }, { deep: !0 }); }), Q($.appContext.components, e), Q($.appContext.directives, r), this.$handle = new at(this), this.name && (this.inFor ? (Ge[this.name] || (Ge[this.name] = []), Ge[this.name].push(this)) : Ge[this.name] = this); } k.isMobile = E, Q(k.prototype, { init: function() { var w = this; this.isSub() && this.unwatch.push(Ve(function() { return w.vm.setupState.parent.setupState.fc.options.value; }, function() { w.initOptions(), w.$handle.api.refresh(); }, { deep: !0 })), this.vm.props.driver && (this.renderDriver = _e(this.vm.props.driver) === "object" ? this.vm.props.driver : this.drivers[this.vm.props.driver]), !this.renderDriver && this.vm.setupState.parent && (this.renderDriver = this.vm.setupState.parent.setupState.fc.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init(); }, targetFormDriver: function(w) { for (var R = this, p = arguments.length, b = new Array(p > 1 ? p - 1 : 0), y = 1; y < p; y++) b[y - 1] = arguments[y]; if (this.renderDriver && this.renderDriver[w]) return de(function() { var O; return (O = R.renderDriver)[w].apply(O, b); }); }, t: function(w, R, p) { var b = p ? p("$t." + w) : this.globalLanguageDriver(w); return b == null && (b = ""), b && R && Object.keys(R).forEach(function(y) { var O = new RegExp("{".concat(y, "}"), "g"); b = b.replace(O, R[y]); }), b; }, globalDataDriver: function(w) { var R = this, p = w.split("."), b = p.shift(), y = this.options.value.globalData && this.options.value.globalData[b]; if (y) { if (y.type === "static") return He(y.data, p); var O, P = this.fetchCache.get(y); if (P) { if (P.status && (O = He(P.data, p)), !P.loading) return O; P.loading = !1, this.fetchCache.set(y, P); } else this.fetchCache.set(y, { status: !1 }); var q = Ot(function() { re(); var ne = R.fetchCache.get(y); R.options.value.globalData && Object.values(R.options.value.globalData).indexOf(y) !== -1 ? (ne && (ne.loading = !0, R.fetchCache.set(y, ne)), R.bus.$emit("$loadData.$globalData." + b)) : R.fetchCache.delete(y); }, y.wait || 600), H = function(se) { R.fetchCache.set(y, { status: !0, data: se }), R.bus.$emit("$loadData.$globalData." + b); }, Z = function(se, ye) { if (ye && y.watch === !1) return re(); if (ye) { q(); return; } var me = R.$handle.loadFetchVar(Qn(y), se); R.$handle.api.fetch(me).then(function(ce) { H(ce); }).catch(function(ce) { H(null); }); }, re = this.watchLoadData(Z); return this.unwatch.push(re), O; } }, getLocale: function() { var w = this.vm.setupState.top.props.locale; return w && _e(w) === "object" ? w.name : typeof w == "string" ? w : "zh-cn"; }, globalLanguageDriver: function(w) { var R = this.vm.setupState.top.props.locale, p = void 0; if (R && _e(R) === "object" && (p = He(R, w)), p == null) { var b = this.options.value.language || {}, y = this.getLocale(); p = He(b[y], w); } return p; }, globalVarDriver: function(w) { var R = this, p = w.split("."), b = p.shift(), y = this.options.value.globalVariable && this.options.value.globalVariable[b]; if (y) { var O = T.Function(y) ? y : ot(y.handle); if (O) return He(de(function() { return O(R.get || function() { return R.getLoadData.apply(R, arguments); }, R.$handle.api); }), p); } }, setData: function(w, R, p) { p ? l(w, R) : (vt(this.vm.setupState.top.setupState.fc.tmpData, w, R), this.bus.$emit("$loadData." + w)); }, getLoadData: function(w, R) { var p = null; if (w != null) { var b = w.split("."), y = b.shift(); if (y === "$topForm") p = this.$handle.api.top.formData(); else if (y === "$form") p = this.$handle.api.formData(); else if (y === "$options") p = this.options.value; else if (y === "$globalData") p = this.globalDataDriver(b.join(".")), b = []; else if (y === "$var") p = this.globalVarDriver(b.join(".")), b = []; else if (y === "$locale") p = this.getLocale(), b = []; else if (y === "$t") p = this.globalLanguageDriver(b.join(".")), b = []; else { var O = this.vm.setupState.top.setupState.fc.tmpData; Se(O, y) || (O[y] = nn), p = O[y] !== nn ? He(O, w) : _(w), b = []; } p && b.length && (p = He(p, b)); } return p == null || p === "" ? R : p; }, watchLoadData: function(w, R) { var p = this, b = {}, y = function(H) { p.get || (p.get = O), de(function() { w(O, H); }), p.get === O && (p.get = void 0); }, O = function(H, Z) { if (b[H]) return b[H].val; var re = kt(function() { return p.getLoadData(H, Z); }), ne = H.split("."), se = ne.shift(), ye = ne.shift() || "", me = Ot(function() { var ue = p.getLoadData(H, Z); if (b[H]) JSON.stringify(ue) !== JSON.stringify(b[H].val) && (b[H].val = ue, y(!0)); else return; }, R || 0), ce = Ve(re, function(ue) { me(); }); return p.bus.$on("$loadData." + se, me), ye && p.bus.$on("$loadData." + se + "." + ye, me), b[H] = { fn: function() { p.bus.$off("$loadData." + se, me), ye && p.bus.$off("$loadData." + se + "." + ye, me), ce(); }, val: re.value }, re.value; }; y(!1); var P = function() { Object.keys(b).forEach(function(H) { return b[H].fn(); }), b = {}; }; return this.unwatch.push(P), P; }, isSub: function() { return this.vm.setupState.parent && this.vm.props.extendOption; }, initOptions: function() { this.options.value = {}; var w = z({ formData: {}, submitBtn: {}, resetBtn: {}, globalEvent: {}, globalData: {} }, tt(v)); this.isSub() && (w = this.mergeOptions(w, this.vm.setupState.parent.setupState.fc.options.value || {}, !0)), w = this.mergeOptions(w, this.vm.props.option), this.updateOptions(w); }, mergeOptions: function(w, R, p) { return R = z({}, R || {}), p && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach(function(b) { delete R[b]; }), R.global && (w.global = us(w.global, R.global), delete R.global), this.$handle.$manager.mergeOptions([R], w), w; }, updateOptions: function(w) { this.options.value = this.mergeOptions(this.options.value, w), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options"); }, api: function() { return this.$handle.api; }, render: function() { return this.$handle.render(); }, mounted: function() { this.$handle.mounted(); }, unmount: function() { var w = this; if (this.name) if (this.inFor) { var R = Ge[this.name].indexOf(this); Ge[this.name].splice(R, 1); } else delete Ge[this.name]; s.forEach(function(p) { w.bus.$off(p.name, p.callback); }), this.tmpData = {}, this.unwatch.forEach(function(p) { return p(); }), this.unwatch = [], this.$handle.reloadRule([]); }, updated: function() { var w = this; this.$handle.bindNextTick(function() { return w.bus.$emit("next-tick", w.$handle.api); }); } }); function G($) { Q($, { version: t.version, ui: t.ui, isMobile: E, extendApi: h, getData: _, setDataDriver: g, setData: l, removeData: S, refreshData: f, maker: d, component: ee, directive: V, setModelField: F, setFormula: D, setDriver: A, register: Y, $vnode: Ce, parser: ie, use: Qe, factory: dt, componentAlias: le, copyRule: Qi, copyRules: Ki, mergeRule: lt, fetch: no, $form: X, parseFn: ot, parseJson: Yi, toJson: dr, useApp: B, getApi: U, on: j }); } function L($) { Q($, { create: qe, install: function(R, p) { v = z(z({}, v), p || {}); var b = "_installedFormCreate_" + t.ui; if (R[b] !== !0) { R[b] = !0; var y = function(q) { var H = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; return qe(q, H); }; G(y), R.config.globalProperties.$formCreate = y; var O = X(); R.component(O.name, O), o.forEach(function(P) { de(function() { return P($, R); }); }); } } }); } if (G(M), L(M), g("$cookie", Js), g("$localStorage", Ys), g("$sessionStorage", Qs), C.use({ fragment: "fcFragment" }), t.install && qe.use(t), B(function($, w) { w.mixin({ props: ["formCreateInject"] }); }), ie(Gs), t.inherit) { var I = t.inherit; I.components && Q(e, I.components), I.parsers && Q(n, I.parsers), I.directives && Q(r, I.directives), I.modelFields && Q(i, I.modelFields), I.providers && Q(c, I.providers), I.useApps && Q(o, I.useApps), I.maker && Q(d, I.maker), I.loadData && Q(m, I.loadData), I.formulas && Q(x, I.formulas); } var N = X(); return tn(N, M), Object.defineProperties(N, { fetch: { get: function() { return M.fetch; }, set: function(w) { M.fetch = w; } } }), N.util = M, N; } var fi = { date: "YYYY-MM-DD", month: "YYYY-MM", week: "YYYY-wo", quarter: "YYYY-qQ", year: "YYYY" }, rn = "datePicker", ao = { name: rn, maker: function() { return ["date", "month", "week"].reduce(function(t, e) { return t[e] = Te(rn, { type: e }), t; }, { dateRange: Te(rn, { type: "range" }), datetimeRange: Te(rn, function(t) { return t.props({ type: "range", showTime: !0 }); }) }); }(), modelField: "value", mergeProp: function(e) { var n = e.prop.props, r = n.type || n.picker; n.valueFormat || (n.valueFormat = (fi[r] || fi.date) + (n.showTime && (!r || r === "date") ? " HH:mm:ss" : "")); }, render: function(e, n) { return n.$render.vNode[(n.prop.props.range === !0 ? "range" : "date") + "Picker"](n.prop, e); } }, Bn = "hidden", tu = { name: Bn, maker: Ae({}, Bn, function(t, e) { return Te(Bn)("", t, e); }), render: function() { return []; } }, Vn = "input", nu = { name: Vn, maker: function() { return ["password", "url", "email", "text", "textarea", "search"].reduce(function(t, e) { return t[e] = Te(Vn, { type: e }), t; }, { idate: Te(Vn, { type: "date" }) }); }(), modelField: "value", render: function(e, n) { var r = n.prop.props.type; return ["textarea", "search", "password"].indexOf(r) === -1 && (r = "input"), r = { textarea: "ATextarea", search: "AInputSearch", password: "AInputPassword" }[r] || "AInput", n.$render.vNode.make(r, n.prop, e); } }, so = { name: "timePicker", modelField: "value", mergeProp: function(e) { var n = e.prop.props; n.valueFormat || (n.valueFormat = "HH:mm:ss"); }, render: function(e, n) { return n.$render.vNode["time" + (n.prop.props.range === !0 ? "Range" : "") + "Picker"](n.prop, e); } }, ru = { name: "tree", modelField: "checkedKeys", mergeProp: function(e) { var n = e.prop.props; n.fieldNames ? n.fieldNames.key || (n.fieldNames.key = "id") : n.fieldNames = { key: "id" }, n.checkedKeys = e.rule.value, n.checkable = !0; } }, iu = { name: "FcRow", render: function(e, n) { return n.vNode.col({ props: { span: 24 } }, { default: function() { return [n.vNode.row(n.prop, e)]; } }); } }, ou = "rangePicker", au = z(z({}, ao), {}, { name: ou, maker: {}, render: function(e, n) { return n.$render.vNode.rangePicker(n.prop, e); } }), su = "timeRangePicker", uu = z(z({}, so), {}, { name: su, render: function(e, n) { return n.$render.vNode.timeRangePicker(n.prop, e); } }), lu = [fr, ao, au, tu, nu, so, uu, ru, ns, rs, iu], ge = "a", fu = { tooltip: ge + "Tooltip", popover: ge + "Popover", button: ge + "Button", icon: ge + "Icon", slider: ge + "Slider", rate: ge + "Rate", upload: "fcUpload", cascader: ge + "Cascader", timePicker: ge + "TimePicker", timeRangePicker: ge + "TimeRangePicker", datePicker: ge + "DatePicker", rangePicker: ge + "RangePicker", switch: ge + "Switch", select: ge + "Select", checkbox: ge + "CheckboxGroup", radio: ge + "RadioGroup", input: ge + "Input", inputNumber: ge + "InputNumber", treeSelect: ge + "TreeSelect", search: ge + "InputSearch", inputPassword: ge + "InputPassword", textarea: ge + "Textarea", formItem: ge + "FormItem", form: ge + "Form", frame: "fcFrame", col: ge + "Col", row: ge + "Row", tree: ge + "Tree", autoComplete: ge + "AutoComplete", group: "fcGroup", array: "fcGroup", subForm: "fcSubForm", object: "fcSubForm" }, on = void 0; function cu() { return { form: { hideRequiredMark: !1, layout: "horizontal", labelAlign: "right", labelCol: { span: 3 }, wrapperCol: { span: 21 }, validateOnRuleChange: !0 }, row: { gutter: 0 }, submitBtn: { disabled: !1, loading: !1, type: "primary", innerText: "", show: !0, col: on, click: on }, resetBtn: { disabled: !1, loading: !1, type: "default", innerText: "", show: !1, col: on, click: on } }; } function du(t) { return t.type === "tooltip"; } function ci(t, e) { if (!!Se(t, e) && T.String(t[e])) { var n; t[e] = (n = {}, Ae(n, e, t[e]), Ae(n, "show", !0), n); } } function nt(t) { return t === !1; } function hu(t, e) { Se(t, e) && !T.Object(t[e]) && (t[e] = { show: !!t[e] }); } function Ln(t) { var e = z({}, t); return delete e.children, e; } var pu = { validate: function() { var e = this.form(); return e ? e.validate() : new Promise(function(n) { return n(); }); }, validateField: function(e) { var n = this.form(); return n ? n.validateFields(e) : new Promise(function(r) { return r(); }); }, clearValidateState: function(e) { var n = this.vm.refs[e.wrapRef]; n && n.clearValidate(); }, tidyOptions: function(e) { return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach(function(n) { hu(e, n); }), e; }, tidyRule: function(e) { var n = e.prop; return ci(n, "title"), ci(n, "info"), n; }, mergeProp: function(e) { var n = this, r = { info: { type: "popover", placement: "topLeft", icon: "QuestionCircleOutlined" }, title: {}, col: { span: 24 }, wrap: {} }; ["info", "wrap", "col", "title"].forEach(function(i) { e.prop[i] = pt([n.options[i] || {}, e.prop[i] || {}], r[i]); }); }, getDefaultOptions: function() { return cu(); }, update: function() { var e = this.options.form; this.rule = { props: z({}, e), on: { submit: function(r) { r.preventDefault(); } }, class: [e.className, e.class, "form-create", this.$handle.preview ? "is-preview" : ""], style: e.style, type: "form" }; }, beforeRender: function() { var e = this.key, n = this.ref, r = this.$handle; Q(this.rule, { key: e, ref: n }), Q(this.rule.props, { model: r.formData }); }, render: function(e) { var n = this; return e.slotLen() && !this.$handle.preview && e.setSlot(void 0, function() { return n.makeFormBtn(); }), this.$r(this.rule, nt(this.options.row.show) ? e.getSlots() : [this.makeRow(e)]); }, makeWrap: function(e, n) { var r = this, i = e.prop, a = "".concat(this.key).concat(e.key), o = i.col, s = this.isTitle(i) && i.wrap.title !== !1, u = this.rule.props, c = u.layout, d = u.col; delete i.wrap.title; var v = nt(i.wrap.show) ? n : this.$r(pt([i.wrap, { props: z(z({}, Ln(i.wrap || {})), {}, { name: e.id, rules: e.injectValidate() }, c !== "horizontal" ? { labelCol: {}, wrapperCol: {} } : {}), class: this.$render.mergeClass(i.className, "fc-form-item"), key: "".concat(a, "fi"), ref: e.wrapRef, type: "formItem" }]), z({ default: function() { return n; } }, s ? { label: function() { return r.makeInfo(i, a, e); } } : {})); return c === "inline" || nt(d) || nt(o.show) ? v : this.makeCol(i, a, [v]); }, isTitle: function(e) { if (this.options.form.title === !1) return !1; var n = e.title; return !(!n.title && !n.native || nt(n.show)); }, makeInfo: function(e, n, r) { var i, a, o = this, s = z({}, e.title), u = z({}, e.info); if (this.options.form.title === !1) return !1; if (!(!s.title && !s.native || nt(s.show))) { var c = du(u), d = this.getSlot("title"), v = [d ? d({ title: (i = r.refRule) === null || i === void 0 ? void 0 : i.__$title.value, rule: r.rule, options: this.options }) : (a = r.refRule) === null || a === void 0 ? void 0 : a.__$title.value]; if (!nt(u.show) && (u.info || u.native) && !nt(u.icon)) { var m = { type: u.type || "popover", props: Ln(u), key: "".concat(n, "pop") }; delete m.props.icon, delete m.props.show, delete m.props.info, delete m.props.align, delete m.props.native; var C = c ? "title" : "content"; if (u.info && !Se(m.props, C)) { var x; m.props[C] = (x = r.refRule) === null || x === void 0 ? void 0 : x.__$info.value; } v[u.align !== "left" ? "unshift" : "push"](this.$r(pt([u, m]), Ae({}, s.slot || "default", function() { return o.$r({ type: u.icon === !0 ? "QuestionCircleOutlined" : u.icon || "", props: { type: u.icon === !0 ? "QuestionCircleOutlined" : u.icon }, key: "".concat(n, "i") }); }))); } var E = pt([s, { props: Ln(s), key: "".concat(n, "tit"), class: "fc-form-title", type: s.type || "span" }]); return delete E.props.show, delete E.props.title, delete E.props.native, this.$r(E, v); } }, makeCol: function(e, n, r) { var i = e.col; return this.$r({ class: this.$render.mergeClass(i.class, "fc-form-col"), type: "col", props: i || { span: 24 }, key: "".concat(n, "col") }, r); }, makeRow: function(e) { var n = this.options.row || {}; return this.$r({ type: "row", props: n, class: this.$render.mergeClass(n.class, "fc-form-row"), key: "".concat(this.key, "row") }, e); }, makeFormBtn: function() { var e = []; if (nt(this.options.submitBtn.show) || e.push(this.makeSubmitBtn()), nt(this.options.resetBtn.show) || e.push(this.makeResetBtn()), !!e.length) { var n = this.rule.props, r = n.labelCol, i = n.wrapperCol, a = n.layout; a !== "horizontal" && (r = i = {}); var o = this.$r({ type: "formItem", class: "fc-form-item fc-form-footer", key: "".concat(this.key, "fb"), props: { labelCol: r, wrapperCol: i, label: " ", colon: !1 } }, e); return a === "inline" ? o : this.$r({ type: "col", class: "fc-form-col", props: { span: 24 }, key: "".concat(this.key, "fc") }, [o]); } }, makeResetBtn: function() { var e = this, n = z({}, this.options.resetBtn), r = n.innerText || this.$handle.api.t("reset") || "\u91CD\u7F6E"; return delete n.innerText, delete n.click, delete n.col, delete n.show, this.$r({ type: "button", props: n, class: "fc-reset-btn", style: { width: n.width, marginLeft: "10px" }, on: { click: function() { var a = e.$handle.api; e.options.resetBtn.click ? e.options.resetBtn.click(a) : a.resetFields(); } }, key: "".concat(this.key, "b2") }, [r]); }, makeSubmitBtn: function() { var e = this, n = z({}, this.options.submitBtn), r = n.innerText || this.$handle.api.t("submit") || "\u63D0\u4EA4"; return delete n.innerText, delete n.click, delete n.col, delete n.show, this.$r({ type: "button", props: n, class: "fc-submit-btn", style: { width: n.width }, on: { click: function() { var a = e.$handle.api; e.options.submitBtn.click ? e.options.submitBtn.click(a) : a.submit().catch(function() { }); } }, key: "".concat(this.key, "b1") }, [r]); } }, St = {}; function mu(t) { ["treeSelect", "upload", "frame", "autoComplete", "cascader", "datePicker", "frame", "inputNumber", "inputPassword", "radio", "rate", "switch", "rate", "slider", "timePicker"].reduce(function(e, n) { return e[n] = Te(n), e; }, t), t.auto = t.autoComplete, t.number = t.inputNumber, t.time = t.timePicker, t.password = t.inputPassword; } function gu(t) { var e = { frameInputs: ["input", 0], frameFiles: ["file", 0], frameImages: ["image", 0], frameInputOne: ["input", 1], frameFileOne: ["file", 1], frameImageOne: ["image", 1] }; Object.keys(e).reduce(function(n, r) { return n[r] = Te("frame", function(i) { return i.props({ type: e[r][0], maxLength: e[r][1] }); }), n; }, t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages; } function vu(t) { t.sliderRange = Te("slider", { range: !0 }); } function _u(t) { var e = "select"; t.selectMultiple = Te(e, { mode: "multiple" }), t.selectTags = Te(e, { mode: "tags" }), t.selectCombobox = Te(e, { mode: "combobox" }); } function yu(t) { var e = { image: ["image", 0], file: ["file", 0], uploadFileOne: ["file", 1], uploadImageOne: ["image", 1] }; Object.keys(e).reduce(function(n, r) { return n[r] = Te("upload", function(i) { return i.props({ uploadType: e[r][0], maxLength: e[r][1] }); }), n; }, t), t.uploadImage = t.image, t.uploadFile = t.file; } mu(St); vu(St); gu(St); yu(St); _u(St); var bu = ".form-create .form-create .ant-form-item{margin-bottom:22px}.form-create .form-create .ant-form-item.ant-form-item-with-help{margin-bottom:3px}.form-create .form-create .ant-form-item .ant-form-item.ant-form-item-with-help{margin-bottom:-22px}.form-create{width:100%}.form-create .fc-none,.form-create.is-preview .ant-form-item .ant-form-item-label>label.ant-form-item-required:before,.form-create.is-preview .fc-clock{display:none!important}.fc-form-footer{margin-top:12px}"; lr(bu); function di(t, e) { return T.Boolean(t) ? t = { show: t } : !T.Undef(t) && !T.Object(t) && (t = { show: e }), t; } function wu(t, e) { return { formEl: function() { return e.$manager.form(); }, wrapEl: function(r) { var i = e.getFieldCtx(r); if (!!i) return e.vm.refs[i.wrapRef]; }, validate: function(r) { return new Promise(function(i, a) { var o = t.children, s = [e.$manager.validate()]; o.forEach(function(u) { s.push(u.validate()); }), Promise.all(s).then(function() { i(!0), r && r(!0); }).catch(function(u) { a(u), r && r(u), e.vm.emit("validate-fail", u, { api: t }); }); }); }, validateField: function(r, i) { return new Promise(function(a, o) { var s = e.getFieldCtx(r); if (!!s) { var u = e.subForm[s.id], c = [e.$manager.validateField(s.id)]; gt(u).forEach(function(d) { c.push(d.validate()); }), Promise.all(c).then(function() { a(null), i && i(null); }).catch(function(d) { o(d), i && i(d), e.vm.emit("validate-field-fail", d, { field: r, api: t }); }); } }); }, clearValidateState: function(r) { var i = this, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; t.helper.tidyFields(r).forEach(function(o) { a && i.clearSubValidateState(o), e.getCtxs(o).forEach(function(s) { e.$manager.clearValidateState(s); }); }); }, clearSubValidateState: function(r) { t.helper.tidyFields(r).forEach(function(i) { e.getCtxs(i).forEach(function(a) { var o = e.subForm[a.id]; !o || (Array.isArray(o) ? o.forEach(function(s) { s.clearValidateState(); }) : o && o.clearValidateState()); }); }); }, btn: { loading: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; t.submitBtnProps({ loading: !!r }); }, disabled: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; t.submitBtnProps({ disabled: !!r }); }, show: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; t.submitBtnProps({ show: !!r }); } }, resetBtn: { loading: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; t.resetBtnProps({ loading: !!r }); }, disabled: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; t.resetBtnProps({ disabled: !!r }); }, show: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; t.resetBtnProps({ show: !!r }); } }, submitBtnProps: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = di(e.options.submitBtn, !0); Q(i, r), e.options.submitBtn = i, t.refreshOptions(); }, resetBtnProps: function() { var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = di(e.options.resetBtn, !1); Q(i, r), e.options.resetBtn = i, t.refreshOptions(); }, submit: function(r, i) { return new Promise(function(a, o) { t.validate().then(function() { var s = t.formData(); T.Function(r) && de(function() { return r(s, t); }), T.Function(e.options.onSubmit) && de(function() { return e.options.onSubmit(s, t); }), e.vm.emit("submit", s, t), a(s); }).catch(function() { for (var s = arguments.length, u = new Array(s), c = 0; c < s; c++) u[c] = arguments[c]; T.Function(i) && de(function() { return i.apply(void 0, [t].concat(u)); }), o.apply(void 0, u); }); }); } }; } var hi = { autoComplete: "value", cascader: "value", inputNumber: "value", inputPassword: "value", rate: "value", slider: "value", treeSelect: "value", switch: "checked" }, rr = { name: "required", load: function(e, n, r) { var i = $u(e.getValue()); if (i.required === !1) e.clearProp(), r.clearValidateState([n.field]); else { var a = z({ required: !0, validator: function(c, d) { return new Promise(function(v, m) { T.empty(d) ? m(a.message) : v(); }); } }, i), o = n.__fc__.refRule.__$title.value; if (!a.message) a.message = r.t("required", { title: o }) || o + (r.getLocale() === "en" ? " is required" : "\u4E0D\u80FD\u4E3A\u7A7A"); else { var s = a.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/); s && (a.message = r.t(s[1], { title: o })); } e.getProp().validate = [a]; } r.sync(n); }, watch: function() { rr.load.apply(rr, arguments); } }; function $u(t) { return T.Boolean(t) ? { required: t } : T.String(t) ? { message: t } : T.Undef(t) ? { required: !1 } : T.Function(t) ? { validator: t } : T.Object(t) ? t : {}; } function Ou(t) { t.componentAlias(fu), Object.keys(hi).forEach(function(e) { t.setModelField(e, hi[e]); }), ts.forEach(function(e) { t.component(e.name, e); }), t.register(rr), lu.forEach(function(e) { t.parser(e); }), Object.keys(St).forEach(function(e) { t.maker[e] = St[e]; }), typeof window < "u" && window.antd && t.useApp(function(e, n) { n.use(window.antd); }); } function Su() { return oo({ ui: "ant-design-vue", version: "3.2.18", manager: pu, install: Ou, extendApi: wu, attrs: { normal: ["col", "wrap"], array: ["className"], key: ["title", "info"] } }); } var ve = Su(); typeof window < "u" && (window.formCreate = ve); ve.maker; function Ft(t, e, n) { t[e] = n; } const Je = { type(t, e) { return Object.prototype.toString.call(t) === "[object " + e + "]"; }, Undef(t) { return t == null; }, Element(t) { return typeof t == "object" && t !== null && t.nodeType === 1 && !Je.Object(t); }, trueArray(t) { return Array.isArray(t) && t.length > 0; }, Function(t) { const e = this.getType(t); return e === "Function" || e === "AsyncFunction"; }, getType(t) { const e = Object.prototype.toString.call(t); return /^\[object (.*)\]$/.exec(e)[1]; }, empty(t) { return t == null || Array.isArray(t) && Array.isArray(t) && !t.length ? !0 : typeof t == "string" && !t; } }; ["Date", "Object", "String", "Boolean", "Array", "Number"].forEach((t) => { Je[t] = function(e) { return Je.type(e, t); }; }); function uo(t, e) { return {}.hasOwnProperty.call(t, e); } function lo(t, e = {}, n) { let r = !1; for (let i in e) if (Object.prototype.hasOwnProperty.call(e, i)) { let a = e[i]; if ((r = Array.isArray(a)) || Je.Object(a)) { let o = t[i] === void 0; if (r) r = !1, o && Ft(t, i, []); else if (a._clone && n !== void 0) if (n) a = a.getRule(), o && Ft(t, i, {}); else { Ft(t, i, a._clone()); continue; } else o && Ft(t, i, {}); t[i] = lo(t[i], a, n); } else Ft(t, i, a), Je.Undef(a) || (Je.Undef(a.__json) || (t[i].__json = a.__json), Je.Undef(a.__origin) || (t[i].__origin = a.__origin)); } return n !== void 0 && Array.isArray(t) ? t.filter((i) => !i || !i.__ctrl) : t; } function ct(t) { return lo({}, { value: t }).value; } function Eu(t, e, n) { return `[form-create ${t}]: ${e}` + (n ? ` rule: ` + JSON.stringify(n.getRule ? n.getRule() : n) : ""); } function Cu(t, e) { console.error(Eu("err", t, e)); } const pi = "[[FORM-CREATE-PREFIX-", mi = "-FORM-CREATE-SUFFIX]]"; function Nn(t) { return new Function("return " + t)(); } function gi(t, e) { if (t && Je.String(t) && t.length > 4) { let n = t.trim(), r = !1; try { if (n.indexOf(mi) > 0 && n.indexOf(pi) === 0) n = n.replace(mi, "").replace(pi, ""), r = !0; else if (n.indexOf("$FN:") === 0) n = n.substring(4), r = !0; else if (n.indexOf("$EXEC:") === 0) n = n.substring(6), r = !0; else if (n.indexOf("$GLOBAL:") === 0) { const a = n.substring(8); return n = function(...o) { const s = o[0].api.getGlobalEvent(a); if (s) return s.call(this, ...o); }, n.__json = t, n.__inject = !0, n; } else { if (n.indexOf("$FNX:") === 0) return n = Nn("function($inject){" + n.substring(5) + "}"), n.__json = t, n.__inject = !0, n; (!e && n.indexOf("function ") === 0 && n !== "function " || !e && n.indexOf("function(") === 0 && n !== "function(") && (r = !0); } if (!r) return t; let i; try { i = Nn(n); } catch { i = Nn("function " + n); } return i.__json = t, i; } catch (i) { Cu(`\u89E3\u6790\u5931\u8D25:${n} err: ${i}`); return; } } return t; } const xu = $e({ name: "DataTable", emits: ["change", "handleClick", "rowSelectionChange"], props: { column: { type: Array, default: () => [] }, globalDataKey: [String, Object], fetch: Object, data: { type: Array, default: () => [] }, button: Object, index: Boolean, selection: Boolean, page: Object, formCreateInject: Object }, data() { return { total: 0, loading: !1, unwatch: null, list: [], currentPage: 1, id: 1, order: "", orderBy: "" }; }, watch: { globalDataKey() { this.initPage(); }, fetch() { this.globalDataKey || this.initPage(); }, data() { !this.globalDataKey && !this.fetch && this.initPage(); }, selection() { this.id++; }, index() { this.id++; }, page: { handler() { this.initPage(), this.id++; }, deep: !0 }, button: { handler() { this.id++; }, deep: !0 } }, computed: { filterList() { let t = this.list || []; const e = []; return this.column.forEach((n) => { n.prop && Array.isArray(n.filter) && n.filter.length > 0 && e.push((r) => n.filter.indexOf(r[n.prop]) > -1); }), e.forEach((n) => { t = t.filter(n); }), t; }, tableColumns() { const t = []; return this.column.forEach((e) => { t.push({ dataIndex: e.prop, title: e.label, width: e.width, fixed: e.fixed, className: e.className, align: e.align, sorter: e.sorter === "custom" ? !0 : e.sorter ? (n, r) => n[e.prop] > r[e.prop] : !1, customRender: (n) => this.makeTd(e, n) }); }), this.button && this.button.open === !0 && this.button.column && t.push({ dataIndex: "_handle", label: this.button.label || this.formCreateInject.t("operation") || "\u64CD\u4F5C", fixed: this.button.fixed === void 0 ? "right" : this.button.fixed, width: this.button.width || "125px", customRender: (e) => (this.button.column || []).filter((n) => n.hidden !== !0).map((n) => Ze(fe("a-button"), this.btnProps(n, e), () => [n.name])) }), t; } }, render() { return Ze("div", { class: "_fc-data-table" }, [ Ze(fe("a-spin"), { spinning: this.loading }, () => [ Ze(fe("a-table"), { dataSource: this.filterList, columns: this.tableColumns, pagination: !1, rowSelection: this.selection ? { onChange: (...t) => { this.$emit("rowSelectionChange", ...t); } } : void 0, ...this.$attrs, key: this.id, ref: "table", onChange: (...t) => { const e = t[2]; this.$emit("change", ...t), e.order && e.field ? (this.orderBy = e.order === "descend" ? "DESC" : "ASC", this.order = e.field) : (this.orderBy = "", this.order = ""), this.initPage(); } }), this.makePage() ]) ]); }, methods: { getEl() { return this.$refs.table; }, deepGet(t, e, n) { e = (e || "").split("."); let r = 0, i = e.length; for (; t != null && r < i; ) t = t[e[r++]]; return r && r === i && t !== void 0 ? t : n; }, initPage() { this.loading = !1, this.page && this.page.open ? (this.currentPage = 1, this.nextList()) : this.globalDataKey || this.fetch ? this.fetchData().then(({ list: t }) => { this.list = t; }) : this.list = this.data; }, btnProps(t, e) { const n = { type: t.type, size: t.size, onClick: (i) => { i.stopPropagation(); const a = gi(t.click); try { a && a(e, this.formCreateInject.api); } catch (o) { console.error(o); } this.$emit("handleClick", { name: t.name, scope: e, column: e.record }); } }, r = gi(t.handle); try { const i = r && r(n, e, this.formCreateInject.api); typeof i == "boolean" && (n.disabled = i); } catch (i) { console.error(i); } return n; }, getLimit() { return this.page.props && this.page.props.pageSize || 20; }, nextList() { if (this.globalDataKey || this.fetch) this.fetchData(!0).then(({ list: t, total: e }) => { this.list = t, this.total = e; }); else { const t = this.data, e = this.getLimit(), n = this.currentPage * e; this.list = t.slice(n - e, n), this.total = t.length; } }, fetchData(t) { return this.unwatch && this.unwatch(), new Promise((e) => { let n = this.fetch; if (this.globalDataKey) { const r = typeof this.globalDataKey == "string" ? this.globalDataKey : this.globalDataKey.key; n = this.formCreateInject.api.options.globalData[r]; } if (n) if (n.type === "fetch" || !this.globalDataKey) { n = { ...n }; let r = {}; if (t) { const a = this.page.props && this.page.props.pageSize || 20, o = this.page.pageField || "page", s = this.page.pageSizeField || "limit"; r = { [o]: this.currentPage, [s]: a }; } if (this.order) { const a = this.page.orderField || "order", o = this.page.orderByField || "orderBy"; r[a] = this.order, r[o] = this.orderBy; } const i = Object.keys(r).map((a) => encodeURIComponent(a) + "=" + encodeURIComponent(r[a]), "").join("&"); i && (n.action += (n.action.indexOf("?") !== -1 ? "&" : "?") + i), this.loading = !0, n.wait = 1e3, this.unwatch = this.formCreateInject.api.watchFetch(n, (a, o) => { this.loading = !1; const s = this.page.totalField, u = this.page.dataField, c = u ? this.deepGet(a, u, []) : a; let d = s ? this.deepGet(a, s) : 0; d || (d = c.length || 0), e({ list: c, total: d }); }, (a) => { console.error(a), this.loading = !1; }, (a, o) => { if (o) return this.unwatch && this.unwatch(), this.unwatch = null, setTimeout(() => { this.changePage(1); }), !1; }); } else { let r = n.data || [], i = n.data.length; if (t) { const a = this.getLimit(), o = this.currentPage * a; r = r.slice(o - a, o), i = r.length; } e({ list: r, total: i }); } else e({ list: [], total: 0 }); }); }, changePage(t) { this.currentPage = t, this.nextList(); }, makePage() { if (this.page && this.page.open === !0) return Ze(fe("a-pagination"), { total: this.total, current: this.currentPage, showSizeChanger: !1, "onUpdate:current": (t) => { this.currentPage !== t && this.changePage(t); }, class: this.page.position || "right", ...this.page.props || {}, pageSize: this.page.props && this.page.props.pageSize || 20 }); }, makeTd(t, e) { return t.format === "custom" && t.render ? t.render(e, Ze, fe, this.formCreateInject.api) : t.format === "tag" ? Ze(fe("a-tag"), { color: "green" }, () => [this.deepGet(e.record, t.prop, "")]) : t.format === "image" ? Ze("div", { class: "_fc-data-table-img-list" }, [Ze(fe("a-image-preview-group"), {}, () => { let n = this.deepGet(e.record, t.prop, ""); return n = (Array.isArray(n) ? n : [n]).filter((r) => !!r), n.map((r, i) => Ze(fe("a-image"), { src: r })); })]) : "" + this.deepGet(e.record, t.prop, ""); } }, created() { this.initPage(), this.$watch(() => this.data && this.data.length, () => { !this.globalDataKey && !this.fetch && this.initPage(); }); } }); const Re = (t, e) => { const n = t.__vccOpts || t; for (const [r, i] of e) n[r] = i; return n; }, Au = { name: "FcTable", props: { label: String, width: [Number, String], border: { type: Boolean, default: !0 }, borderWidth: String, borderColor: String, rule: { type: Object, default: () => ({ row: 1, col: 1 }) } }, watch: { rule: { handler() { this.initRule(), this.loadRule(), this.tdStyle = this.rule.style || {}, this.tdClass = this.rule.class || {}; }, immediate: !0, deep: !0 } }, data() { return { tdStyle: {}, tdClass: {}, lattice: {} }; }, computed: { tableColor() { const t = {}; return this.border === !1 ? t.border = "0 none" : (this.borderColor && (t.borderColor = this.borderColor), this.borderWidth && (t.borderWidth = this.borderWidth)), t; } }, methods: { initRule() { const t = this.rule; t.style || (t.style = {}), t.layout || (t.layout = []), t.row || (t.row = 1), t.col || (t.col = 1); }, loadRule() { const t = [], e = this.rule || { row: 1, col: 1 }; for (let r = 0; r < e.row; r++) { const i = []; t.push(i); for (let a = 0; a < e.col; a++) i.push({ rowspan: 1, colspan: 1, slot: [], show: !0 }); } [...e.layout || []].forEach((r, i) => { if ((!r.row || r.row <= 0) && (!r.col || r.col <= 0) || !t[r.top] || !t[r.top][r.left] || !t[r.top][r.left].show) { e.layout.splice(i, 1); return; } const a = t[r.top][r.left]; a.layout = r; let o = 1, s = 1; if (r.col && (o = r.col + r.left > e.col ? e.col - r.left : r.col, a.colspan = o), r.row && (s = r.row + r.top > e.row ? e.row - r.top : r.row, a.rowspan = s), s && o) for (let u = 0; u < s; u++) { const c = t[r.top + u]; if (c) for (let d = 0; d < o; d++) !d && !u || (c[r.left + d] && (c[r.left + d].show = !1), a.slot.push(`${r.top + u}:${r.left + d}`)); } }); const n = (r) => !!(!r || r.layout || !r.show); t.forEach((r, i) => { r.forEach((a, o) => { let s = !1, u = !1; if (a.layout) { const c = a.layout.col || 1, d = a.layout.row || 1; for (let v = 0; v < c; v++) if (!t[i + d] || n(t[i + d][o + v])) { u = !0; continue; } for (let v = 0; v < d; v++) if (!t[i + v] || n(t[i + v][o + c])) { s = !0; continue; } } else s = n(r[o + 1]), u = t[i + 1] ? n(t[i + 1][o]) : !0; a.right = s, a.bottom = u; }); }), this.lattice = t; } } }, Ru = { class: "_fc-table" }; function Pu(t, e, n, r, i, a) { const o = fe("a-col"); return J(), Pe(o, { span: 24 }, { default: we(() => [ he("div", Ru, [ he("table", { border: "1", cellspacing: "0", cellpadding: "0", style: Fi(a.tableColor) }, [ (J(!0), ae(ht, null, cn(n.rule.row, (s, u) => (J(), ae("tr", { key: u }, [ (J(!0), ae(ht, null, cn(n.rule.col, (c, d) => (J(), ae(ht, { key: `${u}${d}` }, [ i.lattice[u][d].show ? (J(), ae("td", it({ key: 0, ref_for: !0 }, i.lattice[u][d] ? { colspan: i.lattice[u][d].colspan, rowspan: i.lattice[u][d].rowspan } : {}, { valign: "top", class: i.tdClass && i.tdClass[`${u}:${d}`] || "", style: [a.tableColor, i.tdStyle && i.tdStyle[`${u}:${d}`] || {}] }), [ gn(t.$slots, `${u}:${d}`), (J(!0), ae(ht, null, cn(i.lattice[u][d].slot, (v) => gn(t.$slots, `${v}`)), 256)) ], 16)) : ut("", !0) ], 64))), 128)) ]))), 128)) ], 4) ]) ]), _: 3 }); } const Du = /* @__PURE__ */ Re(Au, [["render", Pu]]), Fu = $e({ name: "FcValue", props: ["modelValue"], watch: { modelValue(t) { this.$emit("change", t); } } }), ku = { class: "_fc-value" }; function Mu(t, e, n, r, i, a) { return J(), ae("div", ku, Me(t.modelValue), 1); } const Tu = /* @__PURE__ */ Re(Fu, [["render", Mu]]), ju = $e({ name: "FcSlot", inheritAttrs: !1, inject: ["parentFC"], props: { name: String, formCreateInject: Object }, computed: { slotName() { return this.name || "block_default"; }, slotArg() { const { rule: t, preview: e, api: n } = this.formCreateInject, r = t.__fc__.prop; return { rule: t, prop: r, preview: e, api: n, model: r.model || {} }; } }, render() { const t = this.getSlot(); return W(ht, {}, t ? [t(this.slotArg)] : []); }, methods: { getSlot() { const t = (e) => { if (e) { let n = e.slots[this.slotName]; return n || t(e.setupState.parent); } }; return t(this.parentFC); } } }), Iu = $e({ name: "FcJson", inheritAttrs: !1, props: { rule: [Array, String, Object], type: String, disabled: Boolean, expand: Number, button: { type: Boolean, default: !0 }, max: { type: Number, default: 0 }, min: { type: Number, default: 0 }, sortBtn: { type: Boolean, default: !0 }, modelValue: [Object, Array], formCreateInject: Object }, data() { return { fcSubForm: Jr(this.formCreateInject.form.component("fcSubForm")), fcGroup: Jr(this.formCreateInject.form.component("fcGroup")), uni: 0, formRule: [], formOptions: { submitBtn: !1, resetBtn: !1 } }; }, watch: { rule() { this.uni++, this.loadRule(); }, type() { this.loadRule(); } }, render() { var t, e; if (this.rule) return this.type === "object" ? W(this.fcSubForm, { key: 2, ...this.$attrs, modelValue: this.modelValue, "onUpdate:modelValue": (n) => { this.$emit("update:modelValue", n); }, disabled: this.disabled, formCreateInject: this.formCreateInject, rule: this.formRule, options: this.formOptions }) : this.type === "array" ? W(this.fcGroup, { key: 3, ...this.$attrs, modelValue: this.modelValue, "onUpdate:modelValue": (n) => { this.$emit("update:modelValue", n); }, sortBtn: this.sortBtn, min: this.min, max: this.max, expand: this.expand, button: this.button, disabled: this.disabled, formCreateInject: this.formCreateInject, rule: this.formRule, options: this.formOptions }) : W(ht, { key: this.uni }, [(e = (t = this.$slots).default) == null ? void 0 : e.call(t)]); }, methods: { loadRule() { let t = ct(this.rule); typeof t == "string" && (t = this.formCreateInject.form.parseJson(t)), Array.isArray(t) ? this.formRule = t : typeof t == "object" && (this.formRule = t.rule || [], this.formOptions = { submitBtn: !1, resetBtn: !1, ...t.options || {} }), t != null ? ["array", "object"].indexOf(this.type) === -1 && (this.formCreateInject.rule.children = [ { type: "template", _fc_drag_skip: !0, children: this.formRule } ]) : this.formCreateInject.rule.children = []; } }, created() { this.rule && this.loadRule(); } }); const fo = (t) => { const e = []; return t.forEach((n) => { n.field && e.push(n.field), n.children && e.push(...fo(n.children)); }), e; }, Bu = $e({ name: "StepForm", props: { stepsProps: Object, modelValue: Object, formCreateInject: Object, autoValidate: Boolean, steps: { type: Array, required: !0, default: () => [] }, options: { type: Object, default: () => ke({ submitBtn: !1, resetBtn: !1 }) } }, emits: ["update:modelValue", "change", "itemMounted", "submit", "next", "validateFail"], data() { return { active: 0, cacheRule: [], cacheValue: {}, subApi: {}, Form: De(this.formCreateInject.form.$form()) }; }, watch: { active() { this.init(); }, modelValue(t) { this.setValue(t); } }, methods: { init() { this.steps.forEach((t, e) => { this.cacheRule[e] ? this.cacheRule[e].display = e === this.active : this.cacheRule[e] = { type: "FcRow", native: !0, display: e === this.active, children: t.rule }; }); }, onPrev() { this.active--; }, validate() { return new Promise((t, e) => { const n = fo(this.cacheRule[this.active].children); n.length > 0 ? Promise.all(n.map((r) => this.subApi.validateField(r))).then(() => { t(); }).catch((r) => { e(r); }) : t(); }); }, onNext() { this.autoValidate ? this.validate().then(() => { this.active++; }).catch((t) => { this.$emit("validateFail", this.subApi); }) : this.active++, this.$emit("next", { active: this.active, api: this.subApi }); }, submit() { const t = () => { this.$emit("submit", this.subApi.formData(), this.subApi); }; this.autoValidate ? this.validate().then(() => { t(); }).catch((e) => { this.$emit("validateFail", this.subApi); }) : t(); }, addSubApi(t) { this.subApi = t, this.$emit("itemMounted", t); }, formData(t) { this.cacheValue = JSON.stringify(t), this.$emit("update:modelValue", t), this.$emit("change", t); }, setValue(t) { const e = JSON.stringify(t); this.cacheValue !== e && (this.cacheValue = e, this.subApi.coverValue(t || {})); } }, created() { this.init(); } }), Vu = { class: "_fc-step-form" }; function Lu(t, e, n, r, i, a) { const o = fe("a-step"), s = fe("a-steps"), u = fe("a-button"), c = fe("a-col"), d = fe("a-row"); return J(), ae("div", Vu, [ W(s, it({ current: t.active }, t.stepsProps), { default: we(() => [ (J(!0), ae(ht, null, cn(t.steps, (v) => (J(), Pe(o, it({ ref_for: !0 }, v.props), null, 16))), 256)) ]), _: 1 }, 16, ["current"]), (J(), Pe(Tt(t.Form), { option: t.options, rule: t.cacheRule, extendOption: !0, modelValue: t.modelValue, "onUpdate:api": t.addSubApi, onEmitEvent: t.$emit, "onUpdate:modelValue": t.formData }, null, 40, ["option", "rule", "modelValue", "onUpdate:api", "onEmitEvent", "onUpdate:modelValue"])), W(d, null, { default: we(() => [ W(c, { span: 24, style: { display: "flex", "justify-content": "flex-end", "margin-top": "15px" } }, { default: we(() => [ t.active > 0 ? (J(), Pe(u, { key: 0, onClick: t.onPrev }, { default: we(() => [ Ie(Me(t.formCreateInject.t("prevStep") || "\u4E0A\u4E00\u6B65"), 1) ]), _: 1 }, 8, ["onClick"])) : ut("", !0), t.active < t.cacheRule.length - 1 ? (J(), Pe(u, { key: 1, style: { "margin-left": "12px" }, type: "primary", onClick: t.onNext }, { default: we(() => [ Ie(Me(t.formCreateInject.t("nextStep") || "\u4E0B\u4E00\u6B65"), 1) ]), _: 1 }, 8, ["onClick"])) : ut("", !0), t.active === t.cacheRule.length - 1 ? (J(), Pe(u, { key: 2, style: { "margin-left": "12px" }, class: "fc-clock", type: "primary", onClick: t.submit }, { default: we(() => [ Ie(Me(t.formCreateInject.t("submit") || "\u63D0\u4EA4"), 1) ]), _: 1 }, 8, ["onClick"])) : ut("", !0) ]), _: 1 }) ]), _: 1 }) ]); } const Nu = /* @__PURE__ */ Re(Bu, [["render", Lu]]); const zu = $e({ name: "fcInlineForm" }), Uu = { class: "_fc-line-form" }; function qu(t, e, n, r, i, a) { return J(), ae("div", Uu, [ gn(t.$slots, "default") ]); } const Gu = /* @__PURE__ */ Re(zu, [["render", qu]]); const Hu = { name: "NestedTableForm", emits: ["change", "add", "delete", "update:modelValue"], props: { formCreateInject: Object, modelValue: { type: Array, default: () => [] }, nested: Array, nestedField: String, columns: { type: Array, required: !0, default: () => [] }, options: { type: Object, default: () => ke({ submitBtn: !1, resetBtn: !1 }) }, max: Number, nestedMax: Number, disabled: Boolean }, computed: { preview() { return this.formCreateInject.preview; } }, watch: { modelValue() { this.updateTable(); }, "formCreateInject.preview"(t) { this.trs.forEach((e) => { const n = e.children[1].children[0].props.colspan; e.children[1].children[0].props.colspan = t ? n - 1 : n + 1; }); } }, data() { return { rule: [], trs: [], fapi: {}, Form: De(this.formCreateInject.form.$form()), copyTrs: "", oldValue: "" }; }, methods: { formChange(t, e, n, r, i) { i === !1 && this.updateValue(); }, updateValue() { const t = this.trs.map((n, r) => ({ ...this.modelValue[r] || {}, ...this.fapi.getChildrenFormData(n) })).filter((n) => { if (n == null) return !1; let r = !1; return Object.keys(n).forEach((i) => { r || (r = r || n[i] !== void 0 && n[i] !== "" && n[i] !== null && (Array.isArray(n[i]) ? !!n[i].length : !0)); }), r; }), e = JSON.stringify(t); e !== this.oldValue && (this.oldValue = e, this.$emit("update:modelValue", t), this.$emit("change", t)); }, setRawData(t, e) { const n = this.trs[t]; this.fapi.setChildrenFormData(n, e, !0); }, updateTable() { const t = JSON.stringify(this.modelValue); this.oldValue !== t && (this.oldValue = t, this.trs = this.trs.splice(0, this.modelValue.length), this.modelValue.length || this.addRaw(), this.modelValue.forEach((e, n) => { this.trs[n] || this.addRaw(), this.setRawData(n, e || {}); }), this.rule[0].children[1].children = this.trs); }, delRaw(t) { this.disabled || (this.trs.splice(t, 1), this.updateValue(), this.trs.length ? this.trs.forEach((e) => this.updateRaw(e)) : this.addRaw(), this.$emit("delete", t)); }, addRaw(t) { if (t && this.disabled) return; const e = this.formCreateInject.form.parseJson(this.copyTrs)[0], n = { type: "template", subRule: !0, children: [] }; n.children.push(e), n.children.push({ type: "tr", native: !0, display: !1, children: [{ type: "td", native: !0, props: { colspan: e.children.length - (this.preview ? 1 : 0) }, class: "_fc-ntf-sub", children: [{ type: "TableForm", field: this.nestedField, value: [], props: { disabled: this.disabled, max: this.nestedMax || 0, columns: ct(this.nested), options: ct(this.options) } }] }] }), this.trs.push(n), this.updateRaw(n), t && this.$emit("add", this.trs); }, updateRaw(t) { const e = this.trs.indexOf(t), n = t.children[0]; n.children[0].children[0].props.onClick = (r) => { const i = r.self.children[0] === "-" ? "+" : "-"; r.self.children = [i], this.trs[e].children[1].display = i === "-"; }, n.children[1].props.innerText = e + 1, n.children[n.children.length - 1].children[0].props.onClick = () => { this.delRaw(e); }; }, loadRule() { const t = [{ type: "th", native: !0, class: "_fc-ntf-sub-idx" }, { type: "th", native: !0, class: "_fc-ntf-head-idx", props: { innerText: "#" } }]; let e = [{ type: "td", class: "_fc-ntf-idx", native: !0, children: [ { type: "div", hidden: !1, children: ["+"], inject: !0, props: {} } ] }, { type: "td", class: "_fc-ntf-idx", native: !0, props: { innerText: "0" } }]; this.columns.forEach((n) => { t.push({ type: "th", native: !0, style: n.style, class: n.required ? "_fc-ntf-head-required" : "", props: { innerText: n.label || "" } }), e.push({ type: "td", native: !0, children: [...n.rule || []] }); }), t.push({ type: "th", native: !0, class: "_fc-ntf-edit fc-clock", props: { innerText: this.formCreateInject.t("operation") || "\u64CD\u4F5C" } }), e.push({ type: "td", native: !0, class: "_fc-ntf-btn fc-clock", children: [ { type: "i", native: !0, class: "fc-icon icon-delete", props: {} } ] }), this.copyTrs = this.formCreateInject.form.toJson([ { type: "tr", native: !0, children: e } ]), this.rule = [ { type: "table", native: !0, class: "_fc-ntf-table", props: { border: "1", cellspacing: "0", cellpadding: "0" }, children: [ { type: "thead", native: !0, children: [ { type: "tr", native: !0, children: t } ] }, { type: "tbody", native: !0, children: this.trs } ] } ]; } }, created() { this.loadRule(); }, mounted() { this.updateTable(); } }; function Xu(t, e, n, r, i, a) { const o = fe("a-button"); return J(), ae("div", { class: $n(["_fc-nested-table-form", { "_fc-disabled": n.disabled }]) }, [ (J(), Pe(Tt(i.Form), { option: n.options, rule: i.rule, extendOption: !0, onChange: a.formChange, disabled: n.disabled, api: i.fapi, "onUpdate:api": e[0] || (e[0] = (s) => i.fapi = s), onEmitEvent: t.$emit }, null, 40, ["option", "rule", "onChange", "disabled", "api", "onEmitEvent"])), !n.max || n.max > this.trs.length ? (J(), Pe(o, { key: 0, type: "link", class: "fc-clock", disabled: n.disabled, onClick: e[1] || (e[1] = (s) => a.addRaw(!0)) }, { default: we(() => [ e[2] || (e[2] = he("i", { class: "fc-icon icon-add-circle", style: { "font-weight": "700" } }, null, -1)), Ie(" " + Me(n.formCreateInject.t("add") || "\u6DFB\u52A0"), 1) ]), _: 1 }, 8, ["disabled"])) : ut("", !0) ], 2); } const Wu = /* @__PURE__ */ Re(Hu, [["render", Xu]]); const Ju = { name: "InfiniteTableForm", emits: ["change", "add", "delete", "update:modelValue"], props: { formCreateInject: Object, modelValue: { type: Array, default: () => [] }, columns: { type: Array, required: !0, default: () => [] }, options: { type: Object, default: () => ke({ submitBtn: !1, resetBtn: !1 }) }, max: Number, layerMax: { type: Number, default: 0 }, childrenField: String, disabled: Boolean }, computed: { preview() { return this.formCreateInject.preview; }, subField() { return this.childrenField || "children"; } }, watch: { modelValue() { this.updateTable(); }, "formCreateInject.preview"(t) { this.trs.forEach((e, n) => { e.children[1] && (e.children[1].children[0].props.colspan = this.rule[0].children[0].children[0].children.length - (t ? 1 : 0)), e.children[0].children[0].children[0].hidden = this.layerMax === 1 || t && !(this.modelValue && this.modelValue[n] && Array.isArray(this.modelValue[n][this.subField]) && this.modelValue[n][this.subField].length > 0); }); } }, data() { return { rule: [], trs: [], fapi: {}, Form: De(this.formCreateInject.form.$form()), copyTrs: "", oldValue: "" }; }, methods: { formChange(t, e, n, r, i) { i === !1 && this.updateValue(); }, updateValue() { const t = this.trs.map((n, r) => { const i = { ...this.modelValue[r] || {}, ...this.fapi.getChildrenFormData(n) }; return !uo(i, this.subField) && this.modelValue[r] && (i[this.subField] = this.modelValue[r][this.subField]), i[this.subField] == null && delete i[this.subField], i; }), e = JSON.stringify(t); e !== this.oldValue && (this.oldValue = e, this.$emit("update:modelValue", t), this.$emit("change", t)); }, setRawData(t, e) { const n = this.trs[t]; this.fapi.setChildrenFormData(n, e, !0); }, updateTable() { const t = JSON.stringify(this.modelValue); this.oldValue !== t && (this.oldValue = t, this.trs = this.trs.splice(0, this.modelValue.length), this.modelValue.length || this.addRaw(), this.modelValue.forEach((e, n) => { this.trs[n] || this.addRaw(), this.setRawData(n, e || {}); }), this.rule[0].children[1].children = this.trs); }, delRaw(t) { this.disabled || (this.trs.splice(t, 1), this.updateValue(), this.trs.length ? this.trs.forEach((e) => this.updateRaw(e)) : this.addRaw(), this.$emit("delete", t)); }, addRaw(t) { if (t && this.disabled) return; const e = this.formCreateInject.form.parseJson(this.copyTrs)[0], n = { type: "template", subRule: !0, children: [] }; n.children.push(e), this.trs.push(n), this.trs.forEach((r) => this.updateRaw(r)), t && this.$emit("add", this.trs); }, updateRaw(t) { const e = this.trs.indexOf(t), n = t.children[0]; n.children[0].children[0].hidden = this.layerMax === 1 || this.preview && !(this.modelValue && this.modelValue[e] && Array.isArray(this.modelValue[e][this.subField]) && this.modelValue[e][this.subField].length > 0), n.children[0].children[0].props.onClick = (r) => { if (this.trs[e].children.length === 1) { if (this.disabled && !(this.modelValue && this.modelValue[e] && Array.isArray(this.modelValue[e][this.subField]) && this.modelValue[e][this.subField].length > 0)) return; this.trs[e].children.push({ type: "tr", native: !0, display: !0, children: [{ type: "td", native: !0, props: { colspan: this.rule[0].children[0].children[0].children.length - (this.preview ? 1 : 0) }, class: "_fc-itf-sub", children: [{ type: "infiniteTableForm", field: this.subField, value: [...this.modelValue[e] && this.modelValue[e][this.subField] || []], props: { disabled: this.disabled, layerMax: this.layerMax === 0 ? 0 : this.layerMax > 1 ? this.layerMax - 1 : 1, max: this.max || 0, columns: ct(this.columns), options: ct(this.options) } }] }] }); } const i = r.self.children[0] === "-" ? "+" : "-"; r.self.children = [i], this.trs[e].children[1].display = i === "-"; }, n.children[1].props.innerText = e + 1, n.children[n.children.length - 1].children[0].props.onClick = () => { this.delRaw(e); }; }, loadRule() { const t = [{ type: "th", native: !0, class: "_fc-itf-sub-idx" }, { type: "th", native: !0, class: "_fc-itf-head-idx", props: { innerText: "#" } }]; let e = [{ type: "td", class: "_fc-itf-idx", native: !0, children: [ { type: "div", hidden: !1, children: ["+"], inject: !0, props: {} } ] }, { type: "td", class: "_fc-itf-idx", native: !0, props: { innerText: "0" } }]; this.columns.forEach((n) => { t.push({ type: "th", native: !0, class: n.required ? "_fc-itf-head-required" : "", style: n.style, props: { innerText: n.label || "" } }), e.push({ type: "td", native: !0, children: [...n.rule || []] }); }), t.push({ type: "th", native: !0, class: "_fc-itf-edit fc-clock", props: { innerText: this.formCreateInject.t("operation") || "\u64CD\u4F5C" } }), e.push({ type: "td", native: !0, class: "_fc-itf-btn fc-clock", children: [ { type: "i", native: !0, class: "fc-icon icon-delete", props: {} } ] }), this.copyTrs = this.formCreateInject.form.toJson([ { type: "tr", native: !0, children: e } ]), this.rule = [ { type: "table", native: !0, class: "_fc-itf-table", props: { border: "1", cellspacing: "0", cellpadding: "0" }, children: [ { type: "thead", native: !0, children: [ { type: "tr", native: !0, children: t } ] }, { type: "tbody", native: !0, children: this.trs } ] } ]; } }, created() { this.loadRule(); }, mounted() { this.updateTable(); } }; function Yu(t, e, n, r, i, a) { const o = fe("a-button"); return J(), ae("div", { class: $n(["_fc-infinite-table-form", { "_fc-disabled": n.disabled }]) }, [ (J(), Pe(Tt(i.Form), { option: n.options, rule: i.rule, extendOption: !0, onChange: a.formChange, disabled: n.disabled, api: i.fapi, "onUpdate:api": e[0] || (e[0] = (s) => i.fapi = s), onEmitEvent: t.$emit }, null, 40, ["option", "rule", "onChange", "disabled", "api", "onEmitEvent"])), !n.max || n.max > this.trs.length ? (J(), Pe(o, { key: 0, type: "link", class: "fc-clock", disabled: n.disabled, onClick: e[1] || (e[1] = (s) => a.addRaw(!0)) }, { default: we(() => [ e[2] || (e[2] = he("i", { class: "fc-icon icon-add-circle", style: { "font-weight": "700" } }, null, -1)), Ie(" " + Me(n.formCreateInject.t("add") || "\u6DFB\u52A0"), 1) ]), _: 1 }, 8, ["disabled"])) : ut("", !0) ], 2); } const Qu = /* @__PURE__ */ Re(Ju, [["render", Yu]]); const Ku = { name: "TableForm", emits: ["change", "add", "delete", "update:modelValue"], props: { formCreateInject: Object, modelValue: { type: Array, default: () => [] }, columns: { type: Array, required: !0, default: () => [] }, filterEmptyColumn: { type: Boolean, default: !0 }, options: { type: Object, default: () => ke({ submitBtn: !1, resetBtn: !1 }) }, max: Number, disabled: Boolean }, watch: { modelValue: { handler() { this.updateTable(); }, deep: !0 }, "formCreateInject.preview": function(t) { this.emptyRule.children[0].props.colspan = this.columns.length + (t ? 1 : 2); } }, data() { return { rule: [], trs: [], fapi: {}, Form: De(this.formCreateInject.form.$form()), copyTrs: "", oldValue: "", emptyRule: { type: "tr", _isEmpty: !0, native: !0, subRule: !0, children: [ { type: "td", style: { textAlign: "center" }, native: !0, subRule: !0, props: { colspan: this.columns.length + (this.formCreateInject.preview ? 1 : 2) }, children: [this.formCreateInject.t("dataEmpty") || "\u6682\u65E0\u6570\u636E"] } ] } }; }, methods: { formChange() { this.updateValue(); }, updateValue() { const t = this.trs.map((n, r) => ({ ...this.modelValue[r] || {}, ...this.fapi.getChildrenFormData(n) })).filter((n) => { if (!this.filterEmptyColumn) return !0; if (n == null) return !1; let r = !1; return Object.keys(n).forEach((i) => { r = r || n[i] !== void 0 && n[i] !== "" && n[i] !== null; }), r; }), e = JSON.stringify(t); e !== this.oldValue && (this.oldValue = e, this.$emit("update:modelValue", t), this.$emit("change", t)); }, setRawData(t, e) { const n = this.trs[t]; this.fapi.setChildrenFormData(n, e, !0); }, updateTable() { const t = JSON.stringify(this.modelValue); this.oldValue !== t && (this.oldValue = t, this.trs = this.trs.splice(0, this.modelValue.length), this.modelValue.length || this.addEmpty(), this.modelValue.forEach((e, n) => { this.trs[n] || this.addRaw(), this.setRawData(n, e || {}); }), this.rule[0].children[1].children = this.trs); }, addEmpty() { this.trs.push(this.emptyRule); }, delRaw(t) { this.disabled || (this.trs.splice(t, 1), this.updateValue(), this.trs.length ? this.trs.forEach((e) => this.updateRaw(e)) : this.addEmpty(), this.$emit("delete", t)); }, addRaw(t) { if (t && this.disabled) return; const e = this.formCreateInject.form.parseJson(this.copyTrs)[0]; this.trs.length === 1 && this.trs[0]._isEmpty && this.trs.splice(0, 1), this.trs.push(e), this.updateRaw(e), t && (this.$emit("add", this.trs.length), this.updateValue()); }, updateRaw(t) { const e = this.trs.indexOf(t); t.children[0].props.innerText = e + 1, t.children[t.children.length - 1].children[0].props.onClick = () => { this.delRaw(e); }; }, loadRule() { const t = [{ type: "th", native: !0, class: "_fc-tf-head-idx", props: { innerText: "#" } }]; let e = [{ type: "td", class: "_fc-tf-idx", native: !0, props: { innerText: "0" } }]; this.columns.forEach((n) => { t.push({ type: "th", native: !0, style: n.style, class: n.required ? "_fc-tf-head-required" : "", props: { innerText: n.label || "" } }), e.push({ type: "td", native: !0, children: [...n.rule || []] }); }), t.push({ type: "th", native: !0, class: "_fc-tf-edit fc-clock", props: { innerText: this.formCreateInject.t("operation") || "\u64CD\u4F5C" } }), e.push({ type: "td", native: !0, class: "_fc-tf-btn fc-clock", children: [ { type: "i", native: !0, class: "fc-icon icon-delete", props: {} } ] }), this.copyTrs = this.formCreateInject.form.toJson([ { type: "tr", native: !0, subRule: !0, children: e } ]), this.rule = [ { type: "table", native: !0, class: "_fc-tf-table", props: { border: "1", cellspacing: "0", cellpadding: "0" }, children: [ { type: "thead", native: !0, children: [ { type: "tr", native: !0, children: t } ] }, { type: "tbody", native: !0, children: this.trs } ] } ]; } }, created() { this.loadRule(); }, mounted() { this.updateTable(); } }; function Zu(t, e, n, r, i, a) { const o = fe("a-button"); return J(), ae("div", { class: $n(["_fc-table-form", { "_fc-disabled": n.disabled }]) }, [ (J(), Pe(Tt(i.Form), { option: n.options, rule: i.rule, extendOption: !0, disabled: n.disabled, onChange: a.formChange, api: i.fapi, "onUpdate:api": e[0] || (e[0] = (s) => i.fapi = s), onEmitEvent: t.$emit }, null, 40, ["option", "rule", "disabled", "onChange", "api", "onEmitEvent"])), !n.max || n.max > this.trs.length ? (J(), Pe(o, { key: 0, type: "link", class: "fc-clock", onClick: e[1] || (e[1] = (s) => a.addRaw(!0)), disabled: n.disabled }, { default: we(() => [ e[2] || (e[2] = he("i", { class: "fc-icon icon-add-circle", style: { "font-weight": "700" } }, null, -1)), Ie(" " + Me(n.formCreateInject.t("add") || "\u6DFB\u52A0"), 1) ]), _: 1 }, 8, ["disabled"])) : ut("", !0) ], 2); } const el = /* @__PURE__ */ Re(Ku, [["render", Zu]]); const tl = $e({ name: "FcDialog", emits: ["confirm", "submit", "validateFail"], props: { formData: Object, options: { type: Object, default: () => ke({ submitBtn: !1, resetBtn: !1 }) }, rule: Array, autoClose: { type: Boolean, default: !0 }, footer: { type: Boolean, default: !0 }, fullscreen: Boolean, formCreateInject: Object }, data() { return { visible: !1, max: this.fullscreen || !1, fapi: {}, value: {}, formRule: [], Form: De(this.formCreateInject.form.$form()) }; }, methods: { open(t) { this.$nextTick(() => { this.visible = !0, this.value = ct(t || this.formData || {}), this.formRule = ct(this.rule || []); }); }, close() { this.visible = !1; }, handleConfirm() { this.$emit("confirm", this.fapi), this.fapi.submit().then((t) => { this.$emit("submit", t, this.fapi, this.close), this.autoClose && this.close(); }).catch((t) => { this.$emit("validateFail", t, this.fapi); }); } }, mounted() { this.formCreateInject.api.top.bus.$on("fc.closeDialog", this.close), ki(() => { this.formCreateInject.api.top.bus.$off("fc.closeDialog", this.close); }); } }), nl = { key: 0, class: "fc-icon icon-page-min" }, rl = { key: 1, class: "fc-icon icon-page-max" }; function il(t, e, n, r, i, a) { const o = fe("a-button"), s = fe("a-modal"); return J(), Pe(s, it({ class: "_fc-dialog", "wrap-class-name": t.max ? "_fc-dialog-fullscreen" : "" }, t.$attrs, { open: t.visible, "onUpdate:open": e[2] || (e[2] = (u) => t.visible = u), destroyOnClose: "", footer: t.footer ? void 0 : t.footer }), { footer: we(() => [ W(o, { onClick: t.close }, { default: we(() => [ Ie(Me(t.formCreateInject.t("close") || "\u5173\u95ED"), 1) ]), _: 1 }, 8, ["onClick"]), W(o, { type: "primary", onClick: t.handleConfirm }, { default: we(() => [ Ie(Me(t.formCreateInject.t("ok") || "\u786E\u5B9A"), 1) ]), _: 1 }, 8, ["onClick"]) ]), default: we(() => [ t.$attrs.fullscreen ? ut("", !0) : (J(), Pe(o, { key: 0, class: "ant-modal-close", style: { right: "48px" }, onClick: e[0] || (e[0] = (u) => t.max = !t.max) }, { default: we(() => [ t.max ? (J(), ae("i", nl)) : (J(), ae("i", rl)) ]), _: 1 })), (J(), Pe(Tt(t.Form), { option: t.options, rule: t.formRule, extendOption: !0, api: t.fapi, "onUpdate:api": e[1] || (e[1] = (u) => t.fapi = u), "model-value": t.value, onEmitEvent: t.$emit }, null, 40, ["option", "rule", "api", "model-value", "onEmitEvent"])) ]), _: 1 }, 16, ["wrap-class-name", "open", "footer"]); } const ol = /* @__PURE__ */ Re(tl, [["render", il]]); const al = $e({ name: "FcDialog", emits: ["confirm", "submit", "validateFail"], props: { formData: Object, options: { type: Object, default: () => ke({ submitBtn: !1, resetBtn: !1 }) }, width: [Number, String], title: String, rule: Array, autoClose: { type: Boolean, default: !0 }, footer: { type: Boolean, default: !0 }, formCreateInject: Object }, data() { return { visible: !1, max: this.width === "100%", fapi: {}, value: {}, formRule: [], Form: De(this.formCreateInject.form.$form()) }; }, methods: { open(t) { this.$nextTick(() => { this.visible = !0, this.value = ct(t || this.formData || {}), this.formRule = ct(this.rule || []); }); }, close() { this.visible = !1; }, handleConfirm() { this.$emit("confirm", this.fapi), this.fapi.submit().then((t) => { this.$emit("submit", t, this.fapi, this.close), this.autoClose && this.close(); }).catch((t) => { this.$emit("validateFail", t, this.fapi); }); } }, mounted() { this.formCreateInject.api.top.bus.$on("fc.closeDialog", this.close), ki(() => { this.formCreateInject.api.top.bus.$off("fc.closeDialog", this.close); }); } }), sl = { key: 0, class: "fc-icon icon-page-min" }, ul = { key: 1, class: "fc-icon icon-page-max" }; function ll(t, e, n, r, i, a) { const o = fe("a-button"), s = fe("a-drawer"); return J(), Pe(s, it({ class: "_fc-drawer" }, t.$attrs, { width: t.max ? "100%" : t.width, open: t.visible, "onUpdate:open": e[2] || (e[2] = (u) => t.visible = u), destroyOnClose: "" }), Zo({ title: we(() => [ t.width !== "100%" ? (J(), ae("button", { key: 0, class: "ant-drawer-close", onClick: e[0] || (e[0] = (u) => t.max = !t.max) }, [ t.max ? (J(), ae("i", sl)) : (J(), ae("i", ul)) ])) : ut("", !0), Ie(" " + Me(t.title), 1) ]), default: we(() => [ (J(), Pe(Tt(t.Form), { option: t.options, rule: t.formRule, extendOption: !0, api: t.fapi, "onUpdate:api": e[1] || (e[1] = (u) => t.fapi = u), "model-value": t.value, onEmitEvent: t.$emit }, null, 40, ["option", "rule", "api", "model-value", "onEmitEvent"])) ]), _: 2 }, [ t.footer !== !1 ? { name: "extra", fn: we(() => [ W(o, { onClick: t.close }, { default: we(() => [ Ie(Me(t.formCreateInject.t("close") || "\u5173\u95ED"), 1) ]), _: 1 }, 8, ["onClick"]), W(o, { type: "primary", onClick: t.handleConfirm, style: { "margin-left": "12px" } }, { default: we(() => [ Ie(Me(t.formCreateInject.t("ok") || "\u786E\u5B9A"), 1) ]), _: 1 }, 8, ["onClick"]) ]), key: "0" } : void 0 ]), 1040, ["width", "open"]); } const fl = /* @__PURE__ */ Re(al, [["render", ll]]); var co = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function cl(t) { return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; } var ho = { exports: {} }; (function(t, e) { (function(n, r) { t.exports = r(); })(co, function() { var n = function() { }, r = {}, i = {}, a = {}; function o(m, C) { m = m.push ? m : [m]; var x = [], E = m.length, M = E, U, B, V, Y; for (U = function(le, ie) { ie.length && x.push(le), M--, M || C(x); }; E--; ) { if (B = m[E], V = i[B], V) { U(B, V); continue; } Y = a[B] = a[B] || [], Y.push(U); } } function s(m, C) { if (!!m) { var x = a[m]; if (i[m] = C, !!x) for (; x.length; ) x[0](m, C), x.splice(0, 1); } } function u(m, C) { m.call && (m = { success: m }), C.length ? (m.error || n)(C) : (m.success || n)(m); } function c(m, C, x, E) { var M = document, U = x.async, B = (x.numRetries || 0) + 1, V = x.before || n, Y = m.replace(/[\?|#].*$/, ""), le = m.replace(/^(css|img|module|nomodule)!/, ""), ie, ee, X; if (E = E || 0, /(^css!|\.css$)/.test(Y)) X = M.createElement("link"), X.rel = "stylesheet", X.href = le, ie = "hideFocus" in X, ie && X.relList && (ie = 0, X.rel = "preload", X.as = "style"); else if (/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(Y)) X = M.createElement("img"), X.src = le; else if (X = M.createElement("script"), X.src = le, X.async = U === void 0 ? !0 : U, ee = "noModule" in X, /^module!/.test(Y)) { if (!ee) return C(m, "l"); X.type = "module"; } else if (/^nomodule!/.test(Y) && ee) return C(m, "l"); X.onload = X.onerror = X.onbeforeload = function(pe) { var Ce = pe.type[0]; if (ie) try { X.sheet.cssText.length || (Ce = "e"); } catch (Qe) { Qe.code != 18 && (Ce = "e"); } if (Ce == "e") { if (E += 1, E < B) return c(m, C, x, E); } else if (X.rel == "preload" && X.as == "style") return X.rel = "stylesheet"; C(m, Ce, pe.defaultPrevented); }, V(m, X) !== !1 && M.head.appendChild(X); } function d(m, C, x) { m = m.push ? m : [m]; var E = m.length, M = E, U = [], B, V; for (B = function(Y, le, ie) { if (le == "e" && U.push(Y), le == "b") if (ie) U.push(Y); else return; E--, E || C(U); }, V = 0; V < M; V++) c(m[V], B, x); } function v(m, C, x) { var E, M; if (C && C.trim && (E = C), M = (E ? x : C) || {}, E) { if (E in r) throw "LoadJS"; r[E] = !0; } function U(B, V) { d(m, function(Y) { u(M, Y), B && u({ success: B, error: V }, Y), s(E, Y); }, M); } if (M.returnPromise) return new Promise(U); U(); } return v.ready = function(C, x) { return o(C, function(E) { u(x, E); }), v; }, v.done = function(C) { s(C, []); }, v.reset = function() { r = {}, i = {}, a = {}; }, v.isDefined = function(C) { return C in r; }, v; }); })(ho); const st = ho.exports; function dl(t, e) { var n = null; return function(...r) { n !== null && clearTimeout(n), n = setTimeout(() => t.call(this, ...r), e); }; } const hl = $e({ name: "FcEcharts", data() { return { chart: null }; }, emits: ["beforeLoad", "loaded"], props: { title: String, value: Number, min: Number, max: Number, name: String, valueFormat: String, subtitle: String, funnelSort: String, config: Object, data: Array, indicator: Array, smooth: Boolean, stripe: Boolean, showLegend: { type: Boolean, default: !0 }, loadOptions: { type: Function, default: () => { } }, showSeriesLabel: Boolean, type: String, pieType: String, stack: Boolean, barBackgroundColor: String }, watch: { $props: { handler: dl(function() { this.load(); }, 600), deep: !0 } }, methods: { getSeries() { var n; const t = { type: "line", stack: this.stack ? "Total" : "", smooth: this.smooth, showBackground: !1, label: { show: this.showSeriesLabel, position: this.stripe ? "inside" : "top" } }; this.type === "area" ? (t.areaStyle = {}, t.emphasis = { focus: "series" }) : this.type === "bar" && (t.type = "bar", this.barBackgroundColor && (t.showBackground = !0, t.backgroundStyle = { color: this.barBackgroundColor })); let e = ((n = this.config) == null ? void 0 : n.series) || []; return e.length ? (typeof e[0] != "object" && (e = [{ data: e }]), e = e.map((r) => ({ ...t, ...r })), e) : []; }, getTooltip() { const t = { trigger: "axis", valueFormat: void 0 }; return this.valueFormat && (t.valueFormatter = (e) => this.valueFormat ? this.valueFormat.replaceAll("{value}", e) : e), this.type === "bar" && (t.axisPointer = { type: "shadow" }), t; }, getAxis() { var t, e; return this.stripe ? { yAxis: { type: "category", boundaryGap: this.type === "bar", data: ((e = this.config) == null ? void 0 : e.category) || [] }, xAxis: { type: "value" } } : { xAxis: { type: "category", boundaryGap: this.type === "bar", data: (t = this.config) == null ? void 0 : t.category }, yAxis: { type: "value" } }; }, getDefOptions() { return { title: { text: this.title, subtext: this.subtitle }, tooltip: this.getTooltip(), legend: { left: "right", show: this.showLegend }, grid: { left: "20px", right: "20px", bottom: "20px", containLabel: !0 }, ...this.getAxis(), series: this.getSeries() }; }, getPieOptions() { const t = { radius: "50%", center: "50%", startAngle: 0, avoidLabelOverlap: !0, labelLine: { show: !0 }, emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: "rgba(0, 0, 0, 0.5)" } } }; return this.pieType === "doughnut" ? (t.radius = ["40%", "70%"], t.avoidLabelOverlap = !1) : this.pieType === "half-doughnut" && (t.radius = ["40%", "70%"], t.center = ["50%", "70%"], t.startAngle = 180, t.endAngle = 360), { title: { text: this.title, subtext: this.subtitle, left: "left" }, tooltip: { trigger: "item" }, legend: { left: "right", show: this.showLegend }, series: [ { type: "pie", data: this.data, ...t } ] }; }, getGaugeOptions() { return { title: { text: this.title, subtext: this.subtitle, left: "center" }, series: [ { name: "Pressure", type: "gauge", min: this.min || 0, max: this.max || 60, progress: { show: !0 }, detail: { valueAnimation: !0, formatter: "{value}" }, data: [ { value: this.value, name: this.name } ] } ] }; }, getRadarOptions() { return { title: { text: this.title, subtext: this.subtitle, left: "left" }, tooltip: { trigger: "axis" }, legend: { left: "right", show: this.showLegend }, radar: { indicator: this.indicator }, series: [ { type: "radar", tooltip: { trigger: "item" }, data: this.data } ] }; }, getScatterOptions() { return { title: { text: this.title, subtext: this.subtitle, left: "left" }, tooltip: { trigger: "axis" }, legend: { left: "right", show: !0 }, xAxis: { scale: !0 }, yAxis: { scale: !0 }, grid: { left: "20px", right: "20px", bottom: "20px", containLabel: !0 }, series: (this.data || []).map((t) => Array.isArray(t) ? { type: "scatter", data: t } : { type: "scatter", ...t }) }; }, getFunnelOptions() { return { title: { text: this.title, subtext: this.subtitle, left: "left" }, tooltip: { trigger: "item" }, legend: { left: "right", show: this.showLegend }, series: [ { name: "Funnel", type: "funnel", left: "10%", top: "40px", bottom: "20px", width: "80%", min: 0, max: Math.max(...(this.data || []).map((t) => t.value)), minSize: "0%", maxSize: "100%", sort: this.funnelSort || "descending", gap: 2, label: { show: !0, position: "inside" }, labelLine: { length: 10, lineStyle: { width: 1, type: "solid" } }, itemStyle: { borderColor: "#fff", borderWidth: 1 }, emphasis: { label: {} }, data: this.data } ] }; }, load() { this.$nextTick(() => { st.ready("echarts", () => { this.chart = De(window.echarts.init(this.$refs.chart)); let t; if (this.type === "pie") t = this.getPieOptions(); else if (this.type === "funnel") t = this.getFunnelOptions(); else if (this.type === "gauge") t = this.getGaugeOptions(); else if (this.type === "radar") t = this.getRadarOptions(); else if (this.type === "scatter") t = this.getScatterOptions(); else if (this.type === "custom") { if (t = this.loadOptions(this.config, this.chart) || {}, typeof t.then == "function") { t.then((e) => { this.$emit("beforeLoad", this.chart, e), this.chart.setOption(e), this.$emit("loaded", this.chart, e); }); return; } } else t = this.getDefOptions(); this.$emit("beforeLoad", this.chart, t), this.chart.setOption(t), this.$emit("loaded", this.chart, t); }); }); } }, created() { window.echarts ? st.done("echarts") : st.isDefined("echarts") || st(["https://static.form-create.com/res/echarts.min.js"], "echarts"); }, mounted() { this.load(); } }), pl = { class: "_fc-echarts", ref: "chart" }; function ml(t, e, n, r, i, a) { return J(), ae("div", pl, null, 512); } const gl = /* @__PURE__ */ Re(hl, [["render", ml]]); /*! * Signature Pad v5.0.4 | https://github.com/szimek/signature_pad * (c) 2024 Szymon Nowak | Released under the MIT license */ class bn { constructor(e, n, r, i) { if (isNaN(e) || isNaN(n)) throw new Error(`Point is invalid: (${e}, ${n})`); this.x = +e, this.y = +n, this.pressure = r || 0, this.time = i || Date.now(); } distanceTo(e) { return Math.sqrt(Math.pow(this.x - e.x, 2) + Math.pow(this.y - e.y, 2)); } equals(e) { return this.x === e.x && this.y === e.y && this.pressure === e.pressure && this.time === e.time; } velocityFrom(e) { return this.time !== e.time ? this.distanceTo(e) / (this.time - e.time) : 0; } } class gr { static fromPoints(e, n) { const r = this.calculateControlPoints(e[0], e[1], e[2]).c2, i = this.calculateControlPoints(e[1], e[2], e[3]).c1; return new gr(e[1], r, i, e[2], n.start, n.end); } static calculateControlPoints(e, n, r) { const i = e.x - n.x, a = e.y - n.y, o = n.x - r.x, s = n.y - r.y, u = { x: (e.x + n.x) / 2, y: (e.y + n.y) / 2 }, c = { x: (n.x + r.x) / 2, y: (n.y + r.y) / 2 }, d = Math.sqrt(i * i + a * a), v = Math.sqrt(o * o + s * s), m = u.x - c.x, C = u.y - c.y, x = d + v == 0 ? 0 : v / (d + v), E = { x: c.x + m * x, y: c.y + C * x }, M = n.x - E.x, U = n.y - E.y; return { c1: new bn(u.x + M, u.y + U), c2: new bn(c.x + M, c.y + U) }; } constructor(e, n, r, i, a, o) { this.startPoint = e, this.control2 = n, this.control1 = r, this.endPoint = i, this.startWidth = a, this.endWidth = o; } length() { let n = 0, r, i; for (let a = 0; a <= 10; a += 1) { const o = a / 10, s = this.point(o, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x), u = this.point(o, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y); if (a > 0) { const c = s - r, d = u - i; n += Math.sqrt(c * c + d * d); } r = s, i = u; } return n; } point(e, n, r, i, a) { return n * (1 - e) * (1 - e) * (1 - e) + 3 * r * (1 - e) * (1 - e) * e + 3 * i * (1 - e) * e * e + a * e * e * e; } } class vl { constructor() { try { this._et = new EventTarget(); } catch { this._et = document; } } addEventListener(e, n, r) { this._et.addEventListener(e, n, r); } dispatchEvent(e) { return this._et.dispatchEvent(e); } removeEventListener(e, n, r) { this._et.removeEventListener(e, n, r); } } function _l(t, e = 250) { let n = 0, r = null, i, a, o; const s = () => { n = Date.now(), r = null, i = t.apply(a, o), r || (a = null, o = []); }; return function(...c) { const d = Date.now(), v = e - (d - n); return a = this, o = c, v <= 0 || v > e ? (r && (clearTimeout(r), r = null), n = d, i = t.apply(a, o), r || (a = null, o = [])) : r || (r = window.setTimeout(s, v)), i; }; } class wn extends vl { constructor(e, n = {}) { var r, i, a; super(), this.canvas = e, this._drawingStroke = !1, this._isEmpty = !0, this._lastPoints = [], this._data = [], this._lastVelocity = 0, this._lastWidth = 0, this._handleMouseDown = (o) => { !this._isLeftButtonPressed(o, !0) || this._drawingStroke || this._strokeBegin(this._pointerEventToSignatureEvent(o)); }, this._handleMouseMove = (o) => { if (!this._isLeftButtonPressed(o, !0) || !this._drawingStroke) { this._strokeEnd(this._pointerEventToSignatureEvent(o), !1); return; } this._strokeMoveUpdate(this._pointerEventToSignatureEvent(o)); }, this._handleMouseUp = (o) => { this._isLeftButtonPressed(o) || this._strokeEnd(this._pointerEventToSignatureEvent(o)); }, this._handleTouchStart = (o) => { o.targetTouches.length !== 1 || this._drawingStroke || (o.cancelable && o.preventDefault(), this._strokeBegin(this._touchEventToSignatureEvent(o))); }, this._handleTouchMove = (o) => { if (o.targetTouches.length === 1) { if (o.cancelable && o.preventDefault(), !this._drawingStroke) { this._strokeEnd(this._touchEventToSignatureEvent(o), !1); return; } this._strokeMoveUpdate(this._touchEventToSignatureEvent(o)); } }, this._handleTouchEnd = (o) => { o.targetTouches.length === 0 && (o.cancelable && o.preventDefault(), this.canvas.removeEventListener("touchmove", this._handleTouchMove), this._strokeEnd(this._touchEventToSignatureEvent(o))); }, this._handlePointerDown = (o) => { !o.isPrimary || !this._isLeftButtonPressed(o) || this._drawingStroke || (o.preventDefault(), this._strokeBegin(this._pointerEventToSignatureEvent(o))); }, this._handlePointerMove = (o) => { if (!!o.isPrimary) { if (!this._isLeftButtonPressed(o, !0) || !this._drawingStroke) { this._strokeEnd(this._pointerEventToSignatureEvent(o), !1); return; } o.preventDefault(), this._strokeMoveUpdate(this._pointerEventToSignatureEvent(o)); } }, this._handlePointerUp = (o) => { !o.isPrimary || this._isLeftButtonPressed(o) || (o.preventDefault(), this._strokeEnd(this._pointerEventToSignatureEvent(o))); }, this.velocityFilterWeight = n.velocityFilterWeight || 0.7, this.minWidth = n.minWidth || 0.5, this.maxWidth = n.maxWidth || 2.5, this.throttle = (r = n.throttle) !== null && r !== void 0 ? r : 16, this.minDistance = (i = n.minDistance) !== null && i !== void 0 ? i : 5, this.dotSize = n.dotSize || 0, this.penColor = n.penColor || "black", this.backgroundColor = n.backgroundColor || "rgba(0,0,0,0)", this.compositeOperation = n.compositeOperation || "source-over", this.canvasContextOptions = (a = n.canvasContextOptions) !== null && a !== void 0 ? a : {}, this._strokeMoveUpdate = this.throttle ? _l(wn.prototype._strokeUpdate, this.throttle) : wn.prototype._strokeUpdate, this._ctx = e.getContext("2d", this.canvasContextOptions), this.clear(), this.on(); } clear() { const { _ctx: e, canvas: n } = this; e.fillStyle = this.backgroundColor, e.clearRect(0, 0, n.width, n.height), e.fillRect(0, 0, n.width, n.height), this._data = [], this._reset(this._getPointGroupOptions()), this._isEmpty = !0; } fromDataURL(e, n = {}) { return new Promise((r, i) => { const a = new Image(), o = n.ratio || window.devicePixelRatio || 1, s = n.width || this.canvas.width / o, u = n.height || this.canvas.height / o, c = n.xOffset || 0, d = n.yOffset || 0; this._reset(this._getPointGroupOptions()), a.onload = () => { this._ctx.drawImage(a, c, d, s, u), r(); }, a.onerror = (v) => { i(v); }, a.crossOrigin = "anonymous", a.src = e, this._isEmpty = !1; }); } toDataURL(e = "image/png", n) { switch (e) { case "image/svg+xml": return typeof n != "object" && (n = void 0), `data:image/svg+xml;base64,${btoa(this.toSVG(n))}`; default: return typeof n != "number" && (n = void 0), this.canvas.toDataURL(e, n); } } on() { this.canvas.style.touchAction = "none", this.canvas.style.msTouchAction = "none", this.canvas.style.userSelect = "none"; const e = /Macintosh/.test(navigator.userAgent) && "ontouchstart" in document; window.PointerEvent && !e ? this._handlePointerEvents() : (this._handleMouseEvents(), "ontouchstart" in window && this._handleTouchEvents()); } off() { this.canvas.style.touchAction = "auto", this.canvas.style.msTouchAction = "auto", this.canvas.style.userSelect = "auto", this.canvas.removeEventListener("pointerdown", this._handlePointerDown), this.canvas.removeEventListener("mousedown", this._handleMouseDown), this.canvas.removeEventListener("touchstart", this._handleTouchStart), this._removeMoveUpEventListeners(); } _getListenerFunctions() { var e; const n = window.document === this.canvas.ownerDocument ? window : (e = this.canvas.ownerDocument.defaultView) !== null && e !== void 0 ? e : this.canvas.ownerDocument; return { addEventListener: n.addEventListener.bind(n), removeEventListener: n.removeEventListener.bind(n) }; } _removeMoveUpEventListeners() { const { removeEventListener: e } = this._getListenerFunctions(); e("pointermove", this._handlePointerMove), e("pointerup", this._handlePointerUp), e("mousemove", this._handleMouseMove), e("mouseup", this._handleMouseUp), e("touchmove", this._handleTouchMove), e("touchend", this._handleTouchEnd); } isEmpty() { return this._isEmpty; } fromData(e, { clear: n = !0 } = {}) { n && this.clear(), this._fromData(e, this._drawCurve.bind(this), this._drawDot.bind(this)), this._data = this._data.concat(e); } toData() { return this._data; } _isLeftButtonPressed(e, n) { return n ? e.buttons === 1 : (e.buttons & 1) === 1; } _pointerEventToSignatureEvent(e) { return { event: e, type: e.type, x: e.clientX, y: e.clientY, pressure: "pressure" in e ? e.pressure : 0 }; } _touchEventToSignatureEvent(e) { const n = e.changedTouches[0]; return { event: e, type: e.type, x: n.clientX, y: n.clientY, pressure: n.force }; } _getPointGroupOptions(e) { return { penColor: e && "penColor" in e ? e.penColor : this.penColor, dotSize: e && "dotSize" in e ? e.dotSize : this.dotSize, minWidth: e && "minWidth" in e ? e.minWidth : this.minWidth, maxWidth: e && "maxWidth" in e ? e.maxWidth : this.maxWidth, velocityFilterWeight: e && "velocityFilterWeight" in e ? e.velocityFilterWeight : this.velocityFilterWeight, compositeOperation: e && "compositeOperation" in e ? e.compositeOperation : this.compositeOperation }; } _strokeBegin(e) { if (!this.dispatchEvent(new CustomEvent("beginStroke", { detail: e, cancelable: !0 }))) return; const { addEventListener: r } = this._getListenerFunctions(); switch (e.event.type) { case "mousedown": r("mousemove", this._handleMouseMove), r("mouseup", this._handleMouseUp); break; case "touchstart": r("touchmove", this._handleTouchMove), r("touchend", this._handleTouchEnd); break; case "pointerdown": r("pointermove", this._handlePointerMove), r("pointerup", this._handlePointerUp); break; } this._drawingStroke = !0; const i = this._getPointGroupOptions(), a = Object.assign(Object.assign({}, i), { points: [] }); this._data.push(a), this._reset(i), this._strokeUpdate(e); } _strokeUpdate(e) { if (!this._drawingStroke) return; if (this._data.length === 0) { this._strokeBegin(e); return; } this.dispatchEvent(new CustomEvent("beforeUpdateStroke", { detail: e })); const n = this._createPoint(e.x, e.y, e.pressure), r = this._data[this._data.length - 1], i = r.points, a = i.length > 0 && i[i.length - 1], o = a ? n.distanceTo(a) <= this.minDistance : !1, s = this._getPointGroupOptions(r); if (!a || !(a && o)) { const u = this._addPoint(n, s); a ? u && this._drawCurve(u, s) : this._drawDot(n, s), i.push({ time: n.time, x: n.x, y: n.y, pressure: n.pressure }); } this.dispatchEvent(new CustomEvent("afterUpdateStroke", { detail: e })); } _strokeEnd(e, n = !0) { this._removeMoveUpEventListeners(), this._drawingStroke && (n && this._strokeUpdate(e), this._drawingStroke = !1, this.dispatchEvent(new CustomEvent("endStroke", { detail: e }))); } _handlePointerEvents() { this._drawingStroke = !1, this.canvas.addEventListener("pointerdown", this._handlePointerDown); } _handleMouseEvents() { this._drawingStroke = !1, this.canvas.addEventListener("mousedown", this._handleMouseDown); } _handleTouchEvents() { this.canvas.addEventListener("touchstart", this._handleTouchStart); } _reset(e) { this._lastPoints = [], this._lastVelocity = 0, this._lastWidth = (e.minWidth + e.maxWidth) / 2, this._ctx.fillStyle = e.penColor, this._ctx.globalCompositeOperation = e.compositeOperation; } _createPoint(e, n, r) { const i = this.canvas.getBoundingClientRect(); return new bn(e - i.left, n - i.top, r, new Date().getTime()); } _addPoint(e, n) { const { _lastPoints: r } = this; if (r.push(e), r.length > 2) { r.length === 3 && r.unshift(r[0]); const i = this._calculateCurveWidths(r[1], r[2], n), a = gr.fromPoints(r, i); return r.shift(), a; } return null; } _calculateCurveWidths(e, n, r) { const i = r.velocityFilterWeight * n.velocityFrom(e) + (1 - r.velocityFilterWeight) * this._lastVelocity, a = this._strokeWidth(i, r), o = { end: a, start: this._lastWidth }; return this._lastVelocity = i, this._lastWidth = a, o; } _strokeWidth(e, n) { return Math.max(n.maxWidth / (e + 1), n.minWidth); } _drawCurveSegment(e, n, r) { const i = this._ctx; i.moveTo(e, n), i.arc(e, n, r, 0, 2 * Math.PI, !1), this._isEmpty = !1; } _drawCurve(e, n) { const r = this._ctx, i = e.endWidth - e.startWidth, a = Math.ceil(e.length()) * 2; r.beginPath(), r.fillStyle = n.penColor; for (let o = 0; o < a; o += 1) { const s = o / a, u = s * s, c = u * s, d = 1 - s, v = d * d, m = v * d; let C = m * e.startPoint.x; C += 3 * v * s * e.control1.x, C += 3 * d * u * e.control2.x, C += c * e.endPoint.x; let x = m * e.startPoint.y; x += 3 * v * s * e.control1.y, x += 3 * d * u * e.control2.y, x += c * e.endPoint.y; const E = Math.min(e.startWidth + c * i, n.maxWidth); this._drawCurveSegment(C, x, E); } r.closePath(), r.fill(); } _drawDot(e, n) { const r = this._ctx, i = n.dotSize > 0 ? n.dotSize : (n.minWidth + n.maxWidth) / 2; r.beginPath(), this._drawCurveSegment(e.x, e.y, i), r.closePath(), r.fillStyle = n.penColor, r.fill(); } _fromData(e, n, r) { for (const i of e) { const { points: a } = i, o = this._getPointGroupOptions(i); if (a.length > 1) for (let s = 0; s < a.length; s += 1) { const u = a[s], c = new bn(u.x, u.y, u.pressure, u.time); s === 0 && this._reset(o); const d = this._addPoint(c, o); d && n(d, o); } else this._reset(o), r(a[0], o); } } toSVG({ includeBackgroundColor: e = !1 } = {}) { const n = this._data, r = Math.max(window.devicePixelRatio || 1, 1), i = 0, a = 0, o = this.canvas.width / r, s = this.canvas.height / r, u = document.createElementNS("http://www.w3.org/2000/svg", "svg"); if (u.setAttribute("xmlns", "http://www.w3.org/2000/svg"), u.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), u.setAttribute("viewBox", `${i} ${a} ${o} ${s}`), u.setAttribute("width", o.toString()), u.setAttribute("height", s.toString()), e && this.backgroundColor) { const c = document.createElement("rect"); c.setAttribute("width", "100%"), c.setAttribute("height", "100%"), c.setAttribute("fill", this.backgroundColor), u.appendChild(c); } return this._fromData(n, (c, { penColor: d }) => { const v = document.createElement("path"); if (!isNaN(c.control1.x) && !isNaN(c.control1.y) && !isNaN(c.control2.x) && !isNaN(c.control2.y)) { const m = `M ${c.startPoint.x.toFixed(3)},${c.startPoint.y.toFixed(3)} C ${c.control1.x.toFixed(3)},${c.control1.y.toFixed(3)} ${c.control2.x.toFixed(3)},${c.control2.y.toFixed(3)} ${c.endPoint.x.toFixed(3)},${c.endPoint.y.toFixed(3)}`; v.setAttribute("d", m), v.setAttribute("stroke-width", (c.endWidth * 2.25).toFixed(3)), v.setAttribute("stroke", d), v.setAttribute("fill", "none"), v.setAttribute("stroke-linecap", "round"), u.appendChild(v); } }, (c, { penColor: d, dotSize: v, minWidth: m, maxWidth: C }) => { const x = document.createElement("circle"), E = v > 0 ? v : (m + C) / 2; x.setAttribute("r", E.toString()), x.setAttribute("cx", c.x.toString()), x.setAttribute("cy", c.y.toString()), x.setAttribute("fill", d), u.appendChild(x); }), u.outerHTML; } } const yl = $e({ name: "SignaturePad", emits: ["update:modelValue", "change", "remove"], data() { return { visible: !1, isEmpty: !0, signaturePad: null }; }, props: { modelValue: String, penColor: String, formCreateInject: Object }, watch: { visible(t) { t ? (this.isEmpty = !0, this.$nextTick(() => { this.signaturePad = De(new wn(this.$refs.pad, { penColor: this.penColor })), this.signaturePad.addEventListener("endStroke", () => { this.isEmpty = this.signaturePad.isEmpty(); }); })) : (this.signaturePad.off(), this.signaturePad = null); } }, methods: { clear() { this.signaturePad.clear(), this.isEmpty = !0; }, submit() { const t = this.signaturePad.toDataURL(); this.updateValue(t), this.visible = !1; }, updateValue(t) { this.$emit("update:modelValue", t), this.$emit("change", t); }, remove() { this.updateValue(""), this.$emit("remove"); } } }), bl = { class: "_fc-signature" }, wl = { key: 0, class: "_fc-signature-preview" }, $l = ["src"], Ol = { class: "_fc-signature-pad", ref: "pad", width: "600px", height: "270px" }; function Sl(t, e, n, r, i, a) { const o = fe("a-button"), s = fe("a-modal"); return J(), ae("div", bl, [ t.modelValue ? (J(), ae("div", wl, [ he("i", { class: "fc-icon icon-delete2", onClick: e[0] || (e[0] = (...u) => t.remove && t.remove(...u)) }), he("img", { src: t.modelValue, alt: "signature" }, null, 8, $l) ])) : (J(), ae("div", { key: 1, class: "_fc-signature-btn", onClick: e[1] || (e[1] = (u) => t.visible = !0) }, [ e[4] || (e[4] = he("i", { class: "fc-icon icon-edit2" }, null, -1)), Ie(" " + Me(t.formCreateInject.t("signaturePadTip") || "\u70B9\u51FB\u6DFB\u52A0\u624B\u5199\u7B7E\u540D"), 1) ])), W(s, { class: "_fc-signature-dialog", title: t.formCreateInject.t("signaturePadTitle") || "\u8BF7\u5728\u865A\u7EBF\u6846\u5185\u4E66\u5199", open: t.visible, "onUpdate:open": e[3] || (e[3] = (u) => t.visible = u), centered: "", maskClosable: !1, destroyOnClose: !0, width: "640px" }, { footer: we(() => [ he("div", null, [ W(o, { onClick: e[2] || (e[2] = (u) => t.clear()) }, { default: we(() => [ Ie(Me(t.formCreateInject.t("reset") || "\u91CD\u7F6E"), 1) ]), _: 1 }), W(o, { type: "primary", disabled: t.isEmpty, onClick: t.submit }, { default: we(() => [ Ie(Me(t.formCreateInject.t("ok") || "\u786E\u5B9A"), 1) ]), _: 1 }, 8, ["disabled", "onClick"]) ]) ]), default: we(() => [ he("canvas", Ol, null, 512) ]), _: 1 }, 8, ["title", "open"]) ]); } const El = /* @__PURE__ */ Re(yl, [["render", Sl]]); function ir(t, e, n) { for (var r = [], i = Math.max(t.length, e.length), a = 0, o = 0; o < i || a; ) { var s = o < t.length ? t[o] : 0, u = o < e.length ? e[o] : 0, c = a + s + u; r.push(c % n), a = Math.floor(c / n), o++; } return r; } function vi(t, e, n) { if (t < 0) return null; if (t == 0) return []; for (var r = [], i = e; t & 1 && (r = ir(r, i, n)), t = t >> 1, t !== 0; ) i = ir(i, i, n); return r; } function Cl(t, e) { for (var n = t.split(""), r = [], i = n.length - 1; i >= 0; i--) { var a = parseInt(n[i], e); if (isNaN(a)) return null; r.push(a); } return r; } function xl(t, e, n) { var r = Cl(t, e); if (r === null) return null; for (var i = [], a = [1], o = 0; o < r.length; o++) r[o] && (i = ir( i, vi(r[o], a, n), n )), a = vi(e, a, n); for (var s = "", o = i.length - 1; o >= 0; o--) s += i[o].toString(n); return s; } function Al(t) { return t.substring(0, 2) === "0x" && (t = t.substring(2)), t = t.toLowerCase(), xl(t, 16, 10); } class Rl { constructor(e) { e = e || {}, this.seq = 0, this.mid = (e.mid || 1) % 1023, this.offset = e.offset || 0, this.lastTime = 0; } generate() { const e = Date.now(), n = (e - this.offset).toString(2); this.lastTime == e ? (this.seq++, this.seq > 4095 && (this.seq = 0)) : this.seq = 0, this.lastTime = e; let r = this.seq.toString(2), i = this.mid.toString(2); for (; r.length < 12; ) r = "0" + r; for (; i.length < 10; ) i = "0" + i; const a = n + i + r; let o = ""; for (let s = a.length; s > 0; s -= 4) o = parseInt(a.substring(s - 4, s), 2).toString(16) + o; return Al(o); } } const Pl = $e({ name: "FcId", props: ["modelValue", "prefix"], emits: ["update:modelValue"], inject: { designer: { default: null } }, data() { return { preview: "7379787000000000" }; }, watch: { modelValue: { handler: function(t) { if (!t) { const e = new Rl({ mid: 42, offset: 173448e7 }); this.$emit("update:modelValue", "" + (this.prefix || "") + e.generate()); } }, immediate: !0 } } }); function Dl(t, e, n, r, i, a) { const o = fe("a-input"); return J(), Pe(o, { value: t.designer ? "" + (t.prefix || "") + t.preview : t.modelValue, readonly: "", disabled: "" }, null, 8, ["value"]); } const Fl = /* @__PURE__ */ Re(Pl, [["render", Dl]]); const kl = $e({ name: "FcTitle", data() { return {}; }, props: { title: String, size: String, align: String }, computed: { textStyle() { return { textAlign: this.align || "left" }; } } }); function Ml(t, e, n, r, i, a) { return J(), ae("div", { class: $n(["_fc-title", t.size || "h2"]), style: Fi(t.textStyle) }, Me(t.title), 7); } const Tl = /* @__PURE__ */ Re(kl, [["render", Ml]]), jl = $e({ name: "AudioBox", emits: ["pause", "play", "ended"], data() { return {}; }, props: { src: String, type: String, controls: { type: Boolean, default: !0 }, autoplay: Boolean, loop: Boolean, preload: { type: String, default: "auto" }, muted: Boolean } }), Il = ["controls", "autoplay", "loop", "preload", "muted"], Bl = ["src", "type"]; function Vl(t, e, n, r, i, a) { return J(), ae("audio", { key: t.src, controls: t.controls, autoplay: t.autoplay, loop: t.loop, preload: t.preload, muted: t.muted, onPause: e[0] || (e[0] = (o) => t.$emit("pause", o)), onPlay: e[1] || (e[1] = (o) => t.$emit("play", o)), onEnded: e[2] || (e[2] = (o) => t.$emit("ended", o)) }, [ he("source", { src: t.src, type: t.type }, null, 8, Bl), e[3] || (e[3] = Ie(" Your browser does not support the audio element. ")) ], 40, Il); } const Ll = /* @__PURE__ */ Re(jl, [["render", Vl]]); const Nl = $e({ name: "IframeBox", emits: ["load"], data() { return {}; }, props: { src: String, loading: String } }), zl = ["src"]; function Ul(t, e, n, r, i, a) { return J(), ae("iframe", { class: "_fc-iframe-box", src: t.src, frameborder: "0", onLoad: e[0] || (e[0] = (o) => t.$emit("load", o)) }, null, 40, zl); } const ql = /* @__PURE__ */ Re(Nl, [["render", Ul]]); var vr = {}, Sn = {}, Ne = {}; Object.defineProperty(Ne, "__esModule", { value: !0 }); function Gl(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } var Hl = function t(e, n) { Gl(this, t), this.data = e, this.text = n.text || e, this.options = n; }; Ne.default = Hl; Object.defineProperty(Sn, "__esModule", { value: !0 }); Sn.CODE39 = void 0; var Xl = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Wl = Ne, Jl = Yl(Wl); function Yl(t) { return t && t.__esModule ? t : { default: t }; } function Ql(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Kl(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Zl(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var ef = function(t) { Zl(e, t); function e(n, r) { return Ql(this, e), n = n.toUpperCase(), r.mod43 && (n += rf(of(n))), Kl(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); } return Xl(e, [{ key: "encode", value: function() { for (var r = zn("*"), i = 0; i < this.data.length; i++) r += zn(this.data[i]) + "0"; return r += zn("*"), { data: r, text: this.text }; } }, { key: "valid", value: function() { return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1; } }]), e; }(Jl.default), po = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "-", ".", " ", "$", "/", "+", "%", "*"], tf = [20957, 29783, 23639, 30485, 20951, 29813, 23669, 20855, 29789, 23645, 29975, 23831, 30533, 22295, 30149, 24005, 21623, 29981, 23837, 22301, 30023, 23879, 30545, 22343, 30161, 24017, 21959, 30065, 23921, 22385, 29015, 18263, 29141, 17879, 29045, 18293, 17783, 29021, 18269, 17477, 17489, 17681, 20753, 35770]; function zn(t) { return nf(mo(t)); } function nf(t) { return tf[t].toString(2); } function rf(t) { return po[t]; } function mo(t) { return po.indexOf(t); } function of(t) { for (var e = 0, n = 0; n < t.length; n++) e += mo(t[n]); return e = e % 43, e; } Sn.CODE39 = ef; var rt = {}, _r = {}, jt = {}, be = {}; Object.defineProperty(be, "__esModule", { value: !0 }); var zt; function Un(t, e, n) { return e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t; } var go = be.SET_A = 0, vo = be.SET_B = 1, _o = be.SET_C = 2; be.SHIFT = 98; var af = be.START_A = 103, sf = be.START_B = 104, uf = be.START_C = 105; be.MODULO = 103; be.STOP = 106; be.FNC1 = 207; be.SET_BY_CODE = (zt = {}, Un(zt, af, go), Un(zt, sf, vo), Un(zt, uf, _o), zt); be.SWAP = { 101: go, 100: vo, 99: _o }; be.A_START_CHAR = String.fromCharCode(208); be.B_START_CHAR = String.fromCharCode(209); be.C_START_CHAR = String.fromCharCode(210); be.A_CHARS = "[\0-_\xC8-\xCF]"; be.B_CHARS = "[ -\x7F\xC8-\xCF]"; be.C_CHARS = "(\xCF*[0-9]{2}\xCF*)"; be.BARS = [11011001100, 11001101100, 11001100110, 10010011e3, 10010001100, 10001001100, 10011001e3, 10011000100, 10001100100, 11001001e3, 11001000100, 11000100100, 10110011100, 10011011100, 10011001110, 10111001100, 10011101100, 10011100110, 11001110010, 11001011100, 11001001110, 11011100100, 11001110100, 11101101110, 11101001100, 11100101100, 11100100110, 11101100100, 11100110100, 11100110010, 11011011e3, 11011000110, 11000110110, 10100011e3, 10001011e3, 10001000110, 10110001e3, 10001101e3, 10001100010, 11010001e3, 11000101e3, 11000100010, 10110111e3, 10110001110, 10001101110, 10111011e3, 10111000110, 10001110110, 11101110110, 11010001110, 11000101110, 11011101e3, 11011100010, 11011101110, 11101011e3, 11101000110, 11100010110, 11101101e3, 11101100010, 11100011010, 11101111010, 11001000010, 11110001010, 1010011e4, 10100001100, 1001011e4, 10010000110, 10000101100, 10000100110, 1011001e4, 10110000100, 1001101e4, 10011000010, 10000110100, 10000110010, 11000010010, 1100101e4, 11110111010, 11000010100, 10001111010, 10100111100, 10010111100, 10010011110, 10111100100, 10011110100, 10011110010, 11110100100, 11110010100, 11110010010, 11011011110, 11011110110, 11110110110, 10101111e3, 10100011110, 10001011110, 10111101e3, 10111100010, 11110101e3, 11110100010, 10111011110, 10111101110, 11101011110, 11110101110, 11010000100, 1101001e4, 11010011100, 1100011101011]; Object.defineProperty(jt, "__esModule", { value: !0 }); var lf = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), ff = Ne, cf = df(ff), ze = be; function df(t) { return t && t.__esModule ? t : { default: t }; } function hf(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function pf(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function mf(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var gf = function(t) { mf(e, t); function e(n, r) { hf(this, e); var i = pf(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n.substring(1), r)); return i.bytes = n.split("").map(function(a) { return a.charCodeAt(0); }), i; } return lf(e, [{ key: "valid", value: function() { return /^[\x00-\x7F\xC8-\xD3]+$/.test(this.data); } }, { key: "encode", value: function() { var r = this.bytes, i = r.shift() - 105, a = ze.SET_BY_CODE[i]; if (a === void 0) throw new RangeError("The encoding does not start with a start character."); this.shouldEncodeAsEan128() === !0 && r.unshift(ze.FNC1); var o = e.next(r, 1, a); return { text: this.text === this.data ? this.text.replace(/[^\x20-\x7E]/g, "") : this.text, data: e.getBar(i) + o.result + e.getBar((o.checksum + i) % ze.MODULO) + e.getBar(ze.STOP) }; } }, { key: "shouldEncodeAsEan128", value: function() { var r = this.options.ean128 || !1; return typeof r == "string" && (r = r.toLowerCase() === "true"), r; } }], [{ key: "getBar", value: function(r) { return ze.BARS[r] ? ze.BARS[r].toString() : ""; } }, { key: "correctIndex", value: function(r, i) { if (i === ze.SET_A) { var a = r.shift(); return a < 32 ? a + 64 : a - 32; } else return i === ze.SET_B ? r.shift() - 32 : (r.shift() - 48) * 10 + r.shift() - 48; } }, { key: "next", value: function(r, i, a) { if (!r.length) return { result: "", checksum: 0 }; var o = void 0, s = void 0; if (r[0] >= 200) { s = r.shift() - 105; var u = ze.SWAP[s]; u !== void 0 ? o = e.next(r, i + 1, u) : ((a === ze.SET_A || a === ze.SET_B) && s === ze.SHIFT && (r[0] = a === ze.SET_A ? r[0] > 95 ? r[0] - 96 : r[0] : r[0] < 32 ? r[0] + 96 : r[0]), o = e.next(r, i + 1, a)); } else s = e.correctIndex(r, a), o = e.next(r, i + 1, a); var c = e.getBar(s), d = s * i; return { result: c + o.result, checksum: d + o.checksum }; } }]), e; }(cf.default); jt.default = gf; var yr = {}; Object.defineProperty(yr, "__esModule", { value: !0 }); var mt = be, yo = function(e) { return e.match(new RegExp("^" + mt.A_CHARS + "*"))[0].length; }, bo = function(e) { return e.match(new RegExp("^" + mt.B_CHARS + "*"))[0].length; }, wo = function(e) { return e.match(new RegExp("^" + mt.C_CHARS + "*"))[0]; }; function br(t, e) { var n = e ? mt.A_CHARS : mt.B_CHARS, r = t.match(new RegExp("^(" + n + "+?)(([0-9]{2}){2,})([^0-9]|$)")); if (r) return r[1] + String.fromCharCode(204) + $o(t.substring(r[1].length)); var i = t.match(new RegExp("^" + n + "+"))[0]; return i.length === t.length ? t : i + String.fromCharCode(e ? 205 : 206) + br(t.substring(i.length), !e); } function $o(t) { var e = wo(t), n = e.length; if (n === t.length) return t; t = t.substring(n); var r = yo(t) >= bo(t); return e + String.fromCharCode(r ? 206 : 205) + br(t, r); } yr.default = function(t) { var e = void 0, n = wo(t).length; if (n >= 2) e = mt.C_START_CHAR + $o(t); else { var r = yo(t) > bo(t); e = (r ? mt.A_START_CHAR : mt.B_START_CHAR) + br(t, r); } return e.replace( /[\xCD\xCE]([^])[\xCD\xCE]/, function(i, a) { return String.fromCharCode(203) + a; } ); }; Object.defineProperty(_r, "__esModule", { value: !0 }); var vf = jt, _f = Oo(vf), yf = yr, bf = Oo(yf); function Oo(t) { return t && t.__esModule ? t : { default: t }; } function wf(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function qn(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function $f(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Of = function(t) { $f(e, t); function e(n, r) { if (wf(this, e), /^[\x00-\x7F\xC8-\xD3]+$/.test(n)) var i = qn(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, (0, bf.default)(n), r)); else var i = qn(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); return qn(i); } return e; }(_f.default); _r.default = Of; var wr = {}; Object.defineProperty(wr, "__esModule", { value: !0 }); var Sf = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Ef = jt, Cf = xf(Ef), _i = be; function xf(t) { return t && t.__esModule ? t : { default: t }; } function Af(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Rf(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Pf(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Df = function(t) { Pf(e, t); function e(n, r) { return Af(this, e), Rf(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, _i.A_START_CHAR + n, r)); } return Sf(e, [{ key: "valid", value: function() { return new RegExp("^" + _i.A_CHARS + "+$").test(this.data); } }]), e; }(Cf.default); wr.default = Df; var $r = {}; Object.defineProperty($r, "__esModule", { value: !0 }); var Ff = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), kf = jt, Mf = Tf(kf), yi = be; function Tf(t) { return t && t.__esModule ? t : { default: t }; } function jf(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function If(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Bf(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Vf = function(t) { Bf(e, t); function e(n, r) { return jf(this, e), If(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, yi.B_START_CHAR + n, r)); } return Ff(e, [{ key: "valid", value: function() { return new RegExp("^" + yi.B_CHARS + "+$").test(this.data); } }]), e; }(Mf.default); $r.default = Vf; var Or = {}; Object.defineProperty(Or, "__esModule", { value: !0 }); var Lf = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Nf = jt, zf = Uf(Nf), bi = be; function Uf(t) { return t && t.__esModule ? t : { default: t }; } function qf(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Gf(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Hf(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Xf = function(t) { Hf(e, t); function e(n, r) { return qf(this, e), Gf(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, bi.C_START_CHAR + n, r)); } return Lf(e, [{ key: "valid", value: function() { return new RegExp("^" + bi.C_CHARS + "+$").test(this.data); } }]), e; }(zf.default); Or.default = Xf; Object.defineProperty(rt, "__esModule", { value: !0 }); rt.CODE128C = rt.CODE128B = rt.CODE128A = rt.CODE128 = void 0; var Wf = _r, Jf = En(Wf), Yf = wr, Qf = En(Yf), Kf = $r, Zf = En(Kf), ec = Or, tc = En(ec); function En(t) { return t && t.__esModule ? t : { default: t }; } rt.CODE128 = Jf.default; rt.CODE128A = Qf.default; rt.CODE128B = Zf.default; rt.CODE128C = tc.default; var Le = {}, Sr = {}, Ye = {}; Object.defineProperty(Ye, "__esModule", { value: !0 }); Ye.SIDE_BIN = "101"; Ye.MIDDLE_BIN = "01010"; Ye.BINARIES = { L: [ "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" ], G: [ "0100111", "0110011", "0011011", "0100001", "0011101", "0111001", "0000101", "0010001", "0001001", "0010111" ], R: [ "1110010", "1100110", "1101100", "1000010", "1011100", "1001110", "1010000", "1000100", "1001000", "1110100" ], O: [ "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" ], E: [ "0100111", "0110011", "0011011", "0100001", "0011101", "0111001", "0000101", "0010001", "0001001", "0010111" ] }; Ye.EAN2_STRUCTURE = ["LL", "LG", "GL", "GG"]; Ye.EAN5_STRUCTURE = ["GGLLL", "GLGLL", "GLLGL", "GLLLG", "LGGLL", "LLGGL", "LLLGG", "LGLGL", "LGLLG", "LLGLG"]; Ye.EAN13_STRUCTURE = ["LLLLLL", "LLGLGG", "LLGGLG", "LLGGGL", "LGLLGG", "LGGLLG", "LGGGLL", "LGLGLG", "LGLGGL", "LGGLGL"]; var Cn = {}, Et = {}; Object.defineProperty(Et, "__esModule", { value: !0 }); var nc = Ye, rc = function(e, n, r) { var i = e.split("").map(function(o, s) { return nc.BINARIES[n[s]]; }).map(function(o, s) { return o ? o[e[s]] : ""; }); if (r) { var a = e.length - 1; i = i.map(function(o, s) { return s < a ? o + r : o; }); } return i.join(""); }; Et.default = rc; Object.defineProperty(Cn, "__esModule", { value: !0 }); var ic = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), At = Ye, oc = Et, wi = So(oc), ac = Ne, sc = So(ac); function So(t) { return t && t.__esModule ? t : { default: t }; } function uc(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function lc(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function fc(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var cc = function(t) { fc(e, t); function e(n, r) { uc(this, e); var i = lc(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); return i.fontSize = !r.flat && r.fontSize > r.width * 10 ? r.width * 10 : r.fontSize, i.guardHeight = r.height + i.fontSize / 2 + r.textMargin, i; } return ic(e, [{ key: "encode", value: function() { return this.options.flat ? this.encodeFlat() : this.encodeGuarded(); } }, { key: "leftText", value: function(r, i) { return this.text.substr(r, i); } }, { key: "leftEncode", value: function(r, i) { return (0, wi.default)(r, i); } }, { key: "rightText", value: function(r, i) { return this.text.substr(r, i); } }, { key: "rightEncode", value: function(r, i) { return (0, wi.default)(r, i); } }, { key: "encodeGuarded", value: function() { var r = { fontSize: this.fontSize }, i = { height: this.guardHeight }; return [{ data: At.SIDE_BIN, options: i }, { data: this.leftEncode(), text: this.leftText(), options: r }, { data: At.MIDDLE_BIN, options: i }, { data: this.rightEncode(), text: this.rightText(), options: r }, { data: At.SIDE_BIN, options: i }]; } }, { key: "encodeFlat", value: function() { var r = [At.SIDE_BIN, this.leftEncode(), At.MIDDLE_BIN, this.rightEncode(), At.SIDE_BIN]; return { data: r.join(""), text: this.text }; } }]), e; }(sc.default); Cn.default = cc; Object.defineProperty(Sr, "__esModule", { value: !0 }); var dc = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Ut = function t(e, n, r) { e === null && (e = Function.prototype); var i = Object.getOwnPropertyDescriptor(e, n); if (i === void 0) { var a = Object.getPrototypeOf(e); return a === null ? void 0 : t(a, n, r); } else { if ("value" in i) return i.value; var o = i.get; return o === void 0 ? void 0 : o.call(r); } }, hc = Ye, pc = Cn, mc = gc(pc); function gc(t) { return t && t.__esModule ? t : { default: t }; } function vc(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function _c(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function yc(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var $i = function(e) { var n = e.substr(0, 12).split("").map(function(r) { return +r; }).reduce(function(r, i, a) { return a % 2 ? r + i * 3 : r + i; }, 0); return (10 - n % 10) % 10; }, bc = function(t) { yc(e, t); function e(n, r) { vc(this, e), n.search(/^[0-9]{12}$/) !== -1 && (n += $i(n)); var i = _c(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); return i.lastChar = r.lastChar, i; } return dc(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{13}$/) !== -1 && +this.data[12] === $i(this.data); } }, { key: "leftText", value: function() { return Ut(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftText", this).call(this, 1, 6); } }, { key: "leftEncode", value: function() { var r = this.data.substr(1, 6), i = hc.EAN13_STRUCTURE[this.data[0]]; return Ut(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftEncode", this).call(this, r, i); } }, { key: "rightText", value: function() { return Ut(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightText", this).call(this, 7, 6); } }, { key: "rightEncode", value: function() { var r = this.data.substr(7, 6); return Ut(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightEncode", this).call(this, r, "RRRRRR"); } }, { key: "encodeGuarded", value: function() { var r = Ut(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "encodeGuarded", this).call(this); return this.options.displayValue && (r.unshift({ data: "000000000000", text: this.text.substr(0, 1), options: { textAlign: "left", fontSize: this.fontSize } }), this.options.lastChar && (r.push({ data: "00" }), r.push({ data: "00000", text: this.options.lastChar, options: { fontSize: this.fontSize } }))), r; } }]), e; }(mc.default); Sr.default = bc; var Er = {}; Object.defineProperty(Er, "__esModule", { value: !0 }); var wc = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), an = function t(e, n, r) { e === null && (e = Function.prototype); var i = Object.getOwnPropertyDescriptor(e, n); if (i === void 0) { var a = Object.getPrototypeOf(e); return a === null ? void 0 : t(a, n, r); } else { if ("value" in i) return i.value; var o = i.get; return o === void 0 ? void 0 : o.call(r); } }, $c = Cn, Oc = Sc($c); function Sc(t) { return t && t.__esModule ? t : { default: t }; } function Ec(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Cc(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function xc(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Oi = function(e) { var n = e.substr(0, 7).split("").map(function(r) { return +r; }).reduce(function(r, i, a) { return a % 2 ? r + i : r + i * 3; }, 0); return (10 - n % 10) % 10; }, Ac = function(t) { xc(e, t); function e(n, r) { return Ec(this, e), n.search(/^[0-9]{7}$/) !== -1 && (n += Oi(n)), Cc(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); } return wc(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{8}$/) !== -1 && +this.data[7] === Oi(this.data); } }, { key: "leftText", value: function() { return an(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftText", this).call(this, 0, 4); } }, { key: "leftEncode", value: function() { var r = this.data.substr(0, 4); return an(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "leftEncode", this).call(this, r, "LLLL"); } }, { key: "rightText", value: function() { return an(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightText", this).call(this, 4, 4); } }, { key: "rightEncode", value: function() { var r = this.data.substr(4, 4); return an(e.prototype.__proto__ || Object.getPrototypeOf(e.prototype), "rightEncode", this).call(this, r, "RRRR"); } }]), e; }(Oc.default); Er.default = Ac; var Cr = {}; Object.defineProperty(Cr, "__esModule", { value: !0 }); var Rc = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Pc = Ye, Dc = Et, Fc = Eo(Dc), kc = Ne, Mc = Eo(kc); function Eo(t) { return t && t.__esModule ? t : { default: t }; } function Tc(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function jc(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Ic(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Bc = function(e) { var n = e.split("").map(function(r) { return +r; }).reduce(function(r, i, a) { return a % 2 ? r + i * 9 : r + i * 3; }, 0); return n % 10; }, Vc = function(t) { Ic(e, t); function e(n, r) { return Tc(this, e), jc(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); } return Rc(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{5}$/) !== -1; } }, { key: "encode", value: function() { var r = Pc.EAN5_STRUCTURE[Bc(this.data)]; return { data: "1011" + (0, Fc.default)(this.data, r, "01"), text: this.text }; } }]), e; }(Mc.default); Cr.default = Vc; var xr = {}; Object.defineProperty(xr, "__esModule", { value: !0 }); var Lc = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Nc = Ye, zc = Et, Uc = Co(zc), qc = Ne, Gc = Co(qc); function Co(t) { return t && t.__esModule ? t : { default: t }; } function Hc(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Xc(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Wc(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Jc = function(t) { Wc(e, t); function e(n, r) { return Hc(this, e), Xc(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); } return Lc(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{2}$/) !== -1; } }, { key: "encode", value: function() { var r = Nc.EAN2_STRUCTURE[parseInt(this.data) % 4]; return { data: "1011" + (0, Uc.default)(this.data, r, "01"), text: this.text }; } }]), e; }(Gc.default); xr.default = Jc; var Yt = {}; Object.defineProperty(Yt, "__esModule", { value: !0 }); var Yc = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(); Yt.checksum = or; var Qc = Et, Rt = xo(Qc), Kc = Ne, Zc = xo(Kc); function xo(t) { return t && t.__esModule ? t : { default: t }; } function ed(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function td(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function nd(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var rd = function(t) { nd(e, t); function e(n, r) { ed(this, e), n.search(/^[0-9]{11}$/) !== -1 && (n += or(n)); var i = td(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); return i.displayValue = r.displayValue, r.fontSize > r.width * 10 ? i.fontSize = r.width * 10 : i.fontSize = r.fontSize, i.guardHeight = r.height + i.fontSize / 2 + r.textMargin, i; } return Yc(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{12}$/) !== -1 && this.data[11] == or(this.data); } }, { key: "encode", value: function() { return this.options.flat ? this.flatEncoding() : this.guardedEncoding(); } }, { key: "flatEncoding", value: function() { var r = ""; return r += "101", r += (0, Rt.default)(this.data.substr(0, 6), "LLLLLL"), r += "01010", r += (0, Rt.default)(this.data.substr(6, 6), "RRRRRR"), r += "101", { data: r, text: this.text }; } }, { key: "guardedEncoding", value: function() { var r = []; return this.displayValue && r.push({ data: "00000000", text: this.text.substr(0, 1), options: { textAlign: "left", fontSize: this.fontSize } }), r.push({ data: "101" + (0, Rt.default)(this.data[0], "L"), options: { height: this.guardHeight } }), r.push({ data: (0, Rt.default)(this.data.substr(1, 5), "LLLLL"), text: this.text.substr(1, 5), options: { fontSize: this.fontSize } }), r.push({ data: "01010", options: { height: this.guardHeight } }), r.push({ data: (0, Rt.default)(this.data.substr(6, 5), "RRRRR"), text: this.text.substr(6, 5), options: { fontSize: this.fontSize } }), r.push({ data: (0, Rt.default)(this.data[11], "R") + "101", options: { height: this.guardHeight } }), this.displayValue && r.push({ data: "00000000", text: this.text.substr(11, 1), options: { textAlign: "right", fontSize: this.fontSize } }), r; } }]), e; }(Zc.default); function or(t) { var e = 0, n; for (n = 1; n < 11; n += 2) e += parseInt(t[n]); for (n = 0; n < 11; n += 2) e += parseInt(t[n]) * 3; return (10 - e % 10) % 10; } Yt.default = rd; var Ar = {}; Object.defineProperty(Ar, "__esModule", { value: !0 }); var id = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), od = Et, ad = Ao(od), sd = Ne, ud = Ao(sd), ld = Yt; function Ao(t) { return t && t.__esModule ? t : { default: t }; } function fd(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Gn(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function cd(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var dd = ["XX00000XXX", "XX10000XXX", "XX20000XXX", "XXX00000XX", "XXXX00000X", "XXXXX00005", "XXXXX00006", "XXXXX00007", "XXXXX00008", "XXXXX00009"], hd = [["EEEOOO", "OOOEEE"], ["EEOEOO", "OOEOEE"], ["EEOOEO", "OOEEOE"], ["EEOOOE", "OOEEEO"], ["EOEEOO", "OEOOEE"], ["EOOEEO", "OEEOOE"], ["EOOOEE", "OEEEOO"], ["EOEOEO", "OEOEOE"], ["EOEOOE", "OEOEEO"], ["EOOEOE", "OEEOEO"]], pd = function(t) { cd(e, t); function e(n, r) { fd(this, e); var i = Gn(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); if (i.isValid = !1, n.search(/^[0-9]{6}$/) !== -1) i.middleDigits = n, i.upcA = Si(n, "0"), i.text = r.text || "" + i.upcA[0] + n + i.upcA[i.upcA.length - 1], i.isValid = !0; else if (n.search(/^[01][0-9]{7}$/) !== -1) if (i.middleDigits = n.substring(1, n.length - 1), i.upcA = Si(i.middleDigits, n[0]), i.upcA[i.upcA.length - 1] === n[n.length - 1]) i.isValid = !0; else return Gn(i); else return Gn(i); return i.displayValue = r.displayValue, r.fontSize > r.width * 10 ? i.fontSize = r.width * 10 : i.fontSize = r.fontSize, i.guardHeight = r.height + i.fontSize / 2 + r.textMargin, i; } return id(e, [{ key: "valid", value: function() { return this.isValid; } }, { key: "encode", value: function() { return this.options.flat ? this.flatEncoding() : this.guardedEncoding(); } }, { key: "flatEncoding", value: function() { var r = ""; return r += "101", r += this.encodeMiddleDigits(), r += "010101", { data: r, text: this.text }; } }, { key: "guardedEncoding", value: function() { var r = []; return this.displayValue && r.push({ data: "00000000", text: this.text[0], options: { textAlign: "left", fontSize: this.fontSize } }), r.push({ data: "101", options: { height: this.guardHeight } }), r.push({ data: this.encodeMiddleDigits(), text: this.text.substring(1, 7), options: { fontSize: this.fontSize } }), r.push({ data: "010101", options: { height: this.guardHeight } }), this.displayValue && r.push({ data: "00000000", text: this.text[7], options: { textAlign: "right", fontSize: this.fontSize } }), r; } }, { key: "encodeMiddleDigits", value: function() { var r = this.upcA[0], i = this.upcA[this.upcA.length - 1], a = hd[parseInt(i)][parseInt(r)]; return (0, ad.default)(this.middleDigits, a); } }]), e; }(ud.default); function Si(t, e) { for (var n = parseInt(t[t.length - 1]), r = dd[n], i = "", a = 0, o = 0; o < r.length; o++) { var s = r[o]; s === "X" ? i += t[a++] : i += s; } return i = "" + e + i, "" + i + (0, ld.checksum)(i); } Ar.default = pd; Object.defineProperty(Le, "__esModule", { value: !0 }); Le.UPCE = Le.UPC = Le.EAN2 = Le.EAN5 = Le.EAN8 = Le.EAN13 = void 0; var md = Sr, gd = It(md), vd = Er, _d = It(vd), yd = Cr, bd = It(yd), wd = xr, $d = It(wd), Od = Yt, Sd = It(Od), Ed = Ar, Cd = It(Ed); function It(t) { return t && t.__esModule ? t : { default: t }; } Le.EAN13 = gd.default; Le.EAN8 = _d.default; Le.EAN5 = bd.default; Le.EAN2 = $d.default; Le.UPC = Sd.default; Le.UPCE = Cd.default; var Mt = {}, xn = {}, Qt = {}; Object.defineProperty(Qt, "__esModule", { value: !0 }); Qt.START_BIN = "1010"; Qt.END_BIN = "11101"; Qt.BINARIES = ["00110", "10001", "01001", "11000", "00101", "10100", "01100", "00011", "10010", "01010"]; Object.defineProperty(xn, "__esModule", { value: !0 }); var xd = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), sn = Qt, Ad = Ne, Rd = Pd(Ad); function Pd(t) { return t && t.__esModule ? t : { default: t }; } function Dd(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Fd(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function kd(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Md = function(t) { kd(e, t); function e() { return Dd(this, e), Fd(this, (e.__proto__ || Object.getPrototypeOf(e)).apply(this, arguments)); } return xd(e, [{ key: "valid", value: function() { return this.data.search(/^([0-9]{2})+$/) !== -1; } }, { key: "encode", value: function() { var r = this, i = this.data.match(/.{2}/g).map(function(a) { return r.encodePair(a); }).join(""); return { data: sn.START_BIN + i + sn.END_BIN, text: this.text }; } }, { key: "encodePair", value: function(r) { var i = sn.BINARIES[r[1]]; return sn.BINARIES[r[0]].split("").map(function(a, o) { return (a === "1" ? "111" : "1") + (i[o] === "1" ? "000" : "0"); }).join(""); } }]), e; }(Rd.default); xn.default = Md; var Rr = {}; Object.defineProperty(Rr, "__esModule", { value: !0 }); var Td = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), jd = xn, Id = Bd(jd); function Bd(t) { return t && t.__esModule ? t : { default: t }; } function Vd(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Ld(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Nd(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Ei = function(e) { var n = e.substr(0, 13).split("").map(function(r) { return parseInt(r, 10); }).reduce(function(r, i, a) { return r + i * (3 - a % 2 * 2); }, 0); return Math.ceil(n / 10) * 10 - n; }, zd = function(t) { Nd(e, t); function e(n, r) { return Vd(this, e), n.search(/^[0-9]{13}$/) !== -1 && (n += Ei(n)), Ld(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); } return Td(e, [{ key: "valid", value: function() { return this.data.search(/^[0-9]{14}$/) !== -1 && +this.data[13] === Ei(this.data); } }]), e; }(Id.default); Rr.default = zd; Object.defineProperty(Mt, "__esModule", { value: !0 }); Mt.ITF14 = Mt.ITF = void 0; var Ud = xn, qd = Ro(Ud), Gd = Rr, Hd = Ro(Gd); function Ro(t) { return t && t.__esModule ? t : { default: t }; } Mt.ITF = qd.default; Mt.ITF14 = Hd.default; var We = {}, Ct = {}; Object.defineProperty(Ct, "__esModule", { value: !0 }); var Xd = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Wd = Ne, Jd = Yd(Wd); function Yd(t) { return t && t.__esModule ? t : { default: t }; } function Qd(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Kd(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Zd(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var eh = function(t) { Zd(e, t); function e(n, r) { return Qd(this, e), Kd(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); } return Xd(e, [{ key: "encode", value: function() { for (var r = "110", i = 0; i < this.data.length; i++) { var a = parseInt(this.data[i]), o = a.toString(2); o = th(o, 4 - o.length); for (var s = 0; s < o.length; s++) r += o[s] == "0" ? "100" : "110"; } return r += "1001", { data: r, text: this.text }; } }, { key: "valid", value: function() { return this.data.search(/^[0-9]+$/) !== -1; } }]), e; }(Jd.default); function th(t, e) { for (var n = 0; n < e; n++) t = "0" + t; return t; } Ct.default = eh; var Pr = {}, xt = {}; Object.defineProperty(xt, "__esModule", { value: !0 }); xt.mod10 = nh; xt.mod11 = rh; function nh(t) { for (var e = 0, n = 0; n < t.length; n++) { var r = parseInt(t[n]); (n + t.length) % 2 === 0 ? e += r : e += r * 2 % 10 + Math.floor(r * 2 / 10); } return (10 - e % 10) % 10; } function rh(t) { for (var e = 0, n = [2, 3, 4, 5, 6, 7], r = 0; r < t.length; r++) { var i = parseInt(t[t.length - 1 - r]); e += n[r % n.length] * i; } return (11 - e % 11) % 11; } Object.defineProperty(Pr, "__esModule", { value: !0 }); var ih = Ct, oh = sh(ih), ah = xt; function sh(t) { return t && t.__esModule ? t : { default: t }; } function uh(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function lh(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function fh(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var ch = function(t) { fh(e, t); function e(n, r) { return uh(this, e), lh(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n + (0, ah.mod10)(n), r)); } return e; }(oh.default); Pr.default = ch; var Dr = {}; Object.defineProperty(Dr, "__esModule", { value: !0 }); var dh = Ct, hh = mh(dh), ph = xt; function mh(t) { return t && t.__esModule ? t : { default: t }; } function gh(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function vh(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function _h(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var yh = function(t) { _h(e, t); function e(n, r) { return gh(this, e), vh(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n + (0, ph.mod11)(n), r)); } return e; }(hh.default); Dr.default = yh; var Fr = {}; Object.defineProperty(Fr, "__esModule", { value: !0 }); var bh = Ct, wh = $h(bh), Ci = xt; function $h(t) { return t && t.__esModule ? t : { default: t }; } function Oh(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Sh(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Eh(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Ch = function(t) { Eh(e, t); function e(n, r) { return Oh(this, e), n += (0, Ci.mod10)(n), n += (0, Ci.mod10)(n), Sh(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); } return e; }(wh.default); Fr.default = Ch; var kr = {}; Object.defineProperty(kr, "__esModule", { value: !0 }); var xh = Ct, Ah = Rh(xh), xi = xt; function Rh(t) { return t && t.__esModule ? t : { default: t }; } function Ph(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Dh(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Fh(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var kh = function(t) { Fh(e, t); function e(n, r) { return Ph(this, e), n += (0, xi.mod11)(n), n += (0, xi.mod10)(n), Dh(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); } return e; }(Ah.default); kr.default = kh; Object.defineProperty(We, "__esModule", { value: !0 }); We.MSI1110 = We.MSI1010 = We.MSI11 = We.MSI10 = We.MSI = void 0; var Mh = Ct, Th = Kt(Mh), jh = Pr, Ih = Kt(jh), Bh = Dr, Vh = Kt(Bh), Lh = Fr, Nh = Kt(Lh), zh = kr, Uh = Kt(zh); function Kt(t) { return t && t.__esModule ? t : { default: t }; } We.MSI = Th.default; We.MSI10 = Ih.default; We.MSI11 = Vh.default; We.MSI1010 = Nh.default; We.MSI1110 = Uh.default; var An = {}; Object.defineProperty(An, "__esModule", { value: !0 }); An.pharmacode = void 0; var qh = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Gh = Ne, Hh = Xh(Gh); function Xh(t) { return t && t.__esModule ? t : { default: t }; } function Wh(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function Jh(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Yh(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var Qh = function(t) { Yh(e, t); function e(n, r) { Wh(this, e); var i = Jh(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); return i.number = parseInt(n, 10), i; } return qh(e, [{ key: "encode", value: function() { for (var r = this.number, i = ""; !isNaN(r) && r != 0; ) r % 2 === 0 ? (i = "11100" + i, r = (r - 2) / 2) : (i = "100" + i, r = (r - 1) / 2); return i = i.slice(0, -2), { data: i, text: this.text }; } }, { key: "valid", value: function() { return this.number >= 3 && this.number <= 131070; } }]), e; }(Hh.default); An.pharmacode = Qh; var Rn = {}; Object.defineProperty(Rn, "__esModule", { value: !0 }); Rn.codabar = void 0; var Kh = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Zh = Ne, ep = tp(Zh); function tp(t) { return t && t.__esModule ? t : { default: t }; } function np(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function rp(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function ip(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var op = function(t) { ip(e, t); function e(n, r) { np(this, e), n.search(/^[0-9\-\$\:\.\+\/]+$/) === 0 && (n = "A" + n + "A"); var i = rp(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n.toUpperCase(), r)); return i.text = i.options.text || i.text.replace(/[A-D]/g, ""), i; } return Kh(e, [{ key: "valid", value: function() { return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/) !== -1; } }, { key: "encode", value: function() { for (var r = [], i = this.getEncodings(), a = 0; a < this.data.length; a++) r.push(i[this.data.charAt(a)]), a !== this.data.length - 1 && r.push("0"); return { text: this.text, data: r.join("") }; } }, { key: "getEncodings", value: function() { return { 0: "101010011", 1: "101011001", 2: "101001011", 3: "110010101", 4: "101101001", 5: "110101001", 6: "100101011", 7: "100101101", 8: "100110101", 9: "110100101", "-": "101001101", $: "101100101", ":": "1101011011", "/": "1101101011", ".": "1101101101", "+": "1011011011", A: "1011001001", B: "1001001011", C: "1010010011", D: "1010011001" }; } }]), e; }(ep.default); Rn.codabar = op; var Pn = {}; Object.defineProperty(Pn, "__esModule", { value: !0 }); Pn.GenericBarcode = void 0; var ap = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), sp = Ne, up = lp(sp); function lp(t) { return t && t.__esModule ? t : { default: t }; } function fp(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function cp(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function dp(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var hp = function(t) { dp(e, t); function e(n, r) { return fp(this, e), cp(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, n, r)); } return ap(e, [{ key: "encode", value: function() { return { data: "10101010101010101010101010101010101010101", text: this.text }; } }, { key: "valid", value: function() { return !0; } }]), e; }(up.default); Pn.GenericBarcode = hp; Object.defineProperty(vr, "__esModule", { value: !0 }); var pp = Sn, un = rt, Pt = Le, Ai = Mt, qt = We, mp = An, gp = Rn, vp = Pn; vr.default = { CODE39: pp.CODE39, CODE128: un.CODE128, CODE128A: un.CODE128A, CODE128B: un.CODE128B, CODE128C: un.CODE128C, EAN13: Pt.EAN13, EAN8: Pt.EAN8, EAN5: Pt.EAN5, EAN2: Pt.EAN2, UPC: Pt.UPC, UPCE: Pt.UPCE, ITF14: Ai.ITF14, ITF: Ai.ITF, MSI: qt.MSI, MSI10: qt.MSI10, MSI11: qt.MSI11, MSI1010: qt.MSI1010, MSI1110: qt.MSI1110, pharmacode: mp.pharmacode, codabar: gp.codabar, GenericBarcode: vp.GenericBarcode }; var Bt = {}; Object.defineProperty(Bt, "__esModule", { value: !0 }); var _p = Object.assign || function(t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e]; for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]); } return t; }; Bt.default = function(t, e) { return _p({}, t, e); }; var Mr = {}; Object.defineProperty(Mr, "__esModule", { value: !0 }); Mr.default = yp; function yp(t) { var e = []; function n(r) { if (Array.isArray(r)) for (var i = 0; i < r.length; i++) n(r[i]); else r.text = r.text || "", r.data = r.data || "", e.push(r); } return n(t), e; } var Tr = {}; Object.defineProperty(Tr, "__esModule", { value: !0 }); Tr.default = bp; function bp(t) { return t.marginTop = t.marginTop || t.margin, t.marginBottom = t.marginBottom || t.margin, t.marginRight = t.marginRight || t.margin, t.marginLeft = t.marginLeft || t.margin, t; } var jr = {}, Ir = {}, Dn = {}; Object.defineProperty(Dn, "__esModule", { value: !0 }); Dn.default = wp; function wp(t) { var e = ["width", "height", "textMargin", "fontSize", "margin", "marginTop", "marginBottom", "marginLeft", "marginRight"]; for (var n in e) e.hasOwnProperty(n) && (n = e[n], typeof t[n] == "string" && (t[n] = parseInt(t[n], 10))); return typeof t.displayValue == "string" && (t.displayValue = t.displayValue != "false"), t; } var Fn = {}; Object.defineProperty(Fn, "__esModule", { value: !0 }); var $p = { width: 2, height: 100, format: "auto", displayValue: !0, fontOptions: "", font: "monospace", text: void 0, textAlign: "center", textPosition: "bottom", textMargin: 2, fontSize: 20, background: "#ffffff", lineColor: "#000000", margin: 10, marginTop: void 0, marginBottom: void 0, marginLeft: void 0, marginRight: void 0, valid: function() { } }; Fn.default = $p; Object.defineProperty(Ir, "__esModule", { value: !0 }); var Op = Dn, Sp = Po(Op), Ep = Fn, Ri = Po(Ep); function Po(t) { return t && t.__esModule ? t : { default: t }; } function Cp(t) { var e = {}; for (var n in Ri.default) Ri.default.hasOwnProperty(n) && (t.hasAttribute("jsbarcode-" + n.toLowerCase()) && (e[n] = t.getAttribute("jsbarcode-" + n.toLowerCase())), t.hasAttribute("data-" + n.toLowerCase()) && (e[n] = t.getAttribute("data-" + n.toLowerCase()))); return e.value = t.getAttribute("jsbarcode-value") || t.getAttribute("data-value"), e = (0, Sp.default)(e), e; } Ir.default = Cp; var Br = {}, Vr = {}, Ue = {}; Object.defineProperty(Ue, "__esModule", { value: !0 }); Ue.getTotalWidthOfEncodings = Ue.calculateEncodingAttributes = Ue.getBarcodePadding = Ue.getEncodingHeight = Ue.getMaximumHeightOfEncodings = void 0; var xp = Bt, Ap = Rp(xp); function Rp(t) { return t && t.__esModule ? t : { default: t }; } function Do(t, e) { return e.height + (e.displayValue && t.text.length > 0 ? e.fontSize + e.textMargin : 0) + e.marginTop + e.marginBottom; } function Fo(t, e, n) { if (n.displayValue && e < t) { if (n.textAlign == "center") return Math.floor((t - e) / 2); if (n.textAlign == "left") return 0; if (n.textAlign == "right") return Math.floor(t - e); } return 0; } function Pp(t, e, n) { for (var r = 0; r < t.length; r++) { var i = t[r], a = (0, Ap.default)(e, i.options), o; a.displayValue ? o = kp(i.text, a, n) : o = 0; var s = i.data.length * a.width; i.width = Math.ceil(Math.max(o, s)), i.height = Do(i, a), i.barcodePadding = Fo(o, s, a); } } function Dp(t) { for (var e = 0, n = 0; n < t.length; n++) e += t[n].width; return e; } function Fp(t) { for (var e = 0, n = 0; n < t.length; n++) t[n].height > e && (e = t[n].height); return e; } function kp(t, e, n) { var r; if (n) r = n; else if (typeof document < "u") r = document.createElement("canvas").getContext("2d"); else return 0; r.font = e.fontOptions + " " + e.fontSize + "px " + e.font; var i = r.measureText(t); if (!i) return 0; var a = i.width; return a; } Ue.getMaximumHeightOfEncodings = Fp; Ue.getEncodingHeight = Do; Ue.getBarcodePadding = Fo; Ue.calculateEncodingAttributes = Pp; Ue.getTotalWidthOfEncodings = Dp; Object.defineProperty(Vr, "__esModule", { value: !0 }); var Mp = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Tp = Bt, jp = Ip(Tp), Hn = Ue; function Ip(t) { return t && t.__esModule ? t : { default: t }; } function Bp(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } var Vp = function() { function t(e, n, r) { Bp(this, t), this.canvas = e, this.encodings = n, this.options = r; } return Mp(t, [{ key: "render", value: function() { if (!this.canvas.getContext) throw new Error("The browser does not support canvas."); this.prepareCanvas(); for (var n = 0; n < this.encodings.length; n++) { var r = (0, jp.default)(this.options, this.encodings[n].options); this.drawCanvasBarcode(r, this.encodings[n]), this.drawCanvasText(r, this.encodings[n]), this.moveCanvasDrawing(this.encodings[n]); } this.restoreCanvas(); } }, { key: "prepareCanvas", value: function() { var n = this.canvas.getContext("2d"); n.save(), (0, Hn.calculateEncodingAttributes)(this.encodings, this.options, n); var r = (0, Hn.getTotalWidthOfEncodings)(this.encodings), i = (0, Hn.getMaximumHeightOfEncodings)(this.encodings); this.canvas.width = r + this.options.marginLeft + this.options.marginRight, this.canvas.height = i, n.clearRect(0, 0, this.canvas.width, this.canvas.height), this.options.background && (n.fillStyle = this.options.background, n.fillRect(0, 0, this.canvas.width, this.canvas.height)), n.translate(this.options.marginLeft, 0); } }, { key: "drawCanvasBarcode", value: function(n, r) { var i = this.canvas.getContext("2d"), a = r.data, o; n.textPosition == "top" ? o = n.marginTop + n.fontSize + n.textMargin : o = n.marginTop, i.fillStyle = n.lineColor; for (var s = 0; s < a.length; s++) { var u = s * n.width + r.barcodePadding; a[s] === "1" ? i.fillRect(u, o, n.width, n.height) : a[s] && i.fillRect(u, o, n.width, n.height * a[s]); } } }, { key: "drawCanvasText", value: function(n, r) { var i = this.canvas.getContext("2d"), a = n.fontOptions + " " + n.fontSize + "px " + n.font; if (n.displayValue) { var o, s; n.textPosition == "top" ? s = n.marginTop + n.fontSize - n.textMargin : s = n.height + n.textMargin + n.marginTop + n.fontSize, i.font = a, n.textAlign == "left" || r.barcodePadding > 0 ? (o = 0, i.textAlign = "left") : n.textAlign == "right" ? (o = r.width - 1, i.textAlign = "right") : (o = r.width / 2, i.textAlign = "center"), i.fillText(r.text, o, s); } } }, { key: "moveCanvasDrawing", value: function(n) { var r = this.canvas.getContext("2d"); r.translate(n.width, 0); } }, { key: "restoreCanvas", value: function() { var n = this.canvas.getContext("2d"); n.restore(); } }]), t; }(); Vr.default = Vp; var Lr = {}; Object.defineProperty(Lr, "__esModule", { value: !0 }); var Lp = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(), Np = Bt, zp = Up(Np), Xn = Ue; function Up(t) { return t && t.__esModule ? t : { default: t }; } function qp(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } var ln = "http://www.w3.org/2000/svg", Gp = function() { function t(e, n, r) { qp(this, t), this.svg = e, this.encodings = n, this.options = r, this.document = r.xmlDocument || document; } return Lp(t, [{ key: "render", value: function() { var n = this.options.marginLeft; this.prepareSVG(); for (var r = 0; r < this.encodings.length; r++) { var i = this.encodings[r], a = (0, zp.default)(this.options, i.options), o = this.createGroup(n, a.marginTop, this.svg); this.setGroupOptions(o, a), this.drawSvgBarcode(o, a, i), this.drawSVGText(o, a, i), n += i.width; } } }, { key: "prepareSVG", value: function() { for (; this.svg.firstChild; ) this.svg.removeChild(this.svg.firstChild); (0, Xn.calculateEncodingAttributes)(this.encodings, this.options); var n = (0, Xn.getTotalWidthOfEncodings)(this.encodings), r = (0, Xn.getMaximumHeightOfEncodings)(this.encodings), i = n + this.options.marginLeft + this.options.marginRight; this.setSvgAttributes(i, r), this.options.background && this.drawRect(0, 0, i, r, this.svg).setAttribute("style", "fill:" + this.options.background + ";"); } }, { key: "drawSvgBarcode", value: function(n, r, i) { var a = i.data, o; r.textPosition == "top" ? o = r.fontSize + r.textMargin : o = 0; for (var s = 0, u = 0, c = 0; c < a.length; c++) u = c * r.width + i.barcodePadding, a[c] === "1" ? s++ : s > 0 && (this.drawRect(u - r.width * s, o, r.width * s, r.height, n), s = 0); s > 0 && this.drawRect(u - r.width * (s - 1), o, r.width * s, r.height, n); } }, { key: "drawSVGText", value: function(n, r, i) { var a = this.document.createElementNS(ln, "text"); if (r.displayValue) { var o, s; a.setAttribute("style", "font:" + r.fontOptions + " " + r.fontSize + "px " + r.font), r.textPosition == "top" ? s = r.fontSize - r.textMargin : s = r.height + r.textMargin + r.fontSize, r.textAlign == "left" || i.barcodePadding > 0 ? (o = 0, a.setAttribute("text-anchor", "start")) : r.textAlign == "right" ? (o = i.width - 1, a.setAttribute("text-anchor", "end")) : (o = i.width / 2, a.setAttribute("text-anchor", "middle")), a.setAttribute("x", o), a.setAttribute("y", s), a.appendChild(this.document.createTextNode(i.text)), n.appendChild(a); } } }, { key: "setSvgAttributes", value: function(n, r) { var i = this.svg; i.setAttribute("width", n + "px"), i.setAttribute("height", r + "px"), i.setAttribute("x", "0px"), i.setAttribute("y", "0px"), i.setAttribute("viewBox", "0 0 " + n + " " + r), i.setAttribute("xmlns", ln), i.setAttribute("version", "1.1"), i.setAttribute("style", "transform: translate(0,0)"); } }, { key: "createGroup", value: function(n, r, i) { var a = this.document.createElementNS(ln, "g"); return a.setAttribute("transform", "translate(" + n + ", " + r + ")"), i.appendChild(a), a; } }, { key: "setGroupOptions", value: function(n, r) { n.setAttribute("style", "fill:" + r.lineColor + ";"); } }, { key: "drawRect", value: function(n, r, i, a, o) { var s = this.document.createElementNS(ln, "rect"); return s.setAttribute("x", n), s.setAttribute("y", r), s.setAttribute("width", i), s.setAttribute("height", a), o.appendChild(s), s; } }]), t; }(); Lr.default = Gp; var Nr = {}; Object.defineProperty(Nr, "__esModule", { value: !0 }); var Hp = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(); function Xp(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } var Wp = function() { function t(e, n, r) { Xp(this, t), this.object = e, this.encodings = n, this.options = r; } return Hp(t, [{ key: "render", value: function() { this.object.encodings = this.encodings; } }]), t; }(); Nr.default = Wp; Object.defineProperty(Br, "__esModule", { value: !0 }); var Jp = Vr, Yp = zr(Jp), Qp = Lr, Kp = zr(Qp), Zp = Nr, e0 = zr(Zp); function zr(t) { return t && t.__esModule ? t : { default: t }; } Br.default = { CanvasRenderer: Yp.default, SVGRenderer: Kp.default, ObjectRenderer: e0.default }; var Vt = {}; Object.defineProperty(Vt, "__esModule", { value: !0 }); function Ur(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } function qr(t, e) { if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e && (typeof e == "object" || typeof e == "function") ? e : t; } function Gr(t, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); } var t0 = function(t) { Gr(e, t); function e(n, r) { Ur(this, e); var i = qr(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this)); return i.name = "InvalidInputException", i.symbology = n, i.input = r, i.message = '"' + i.input + '" is not a valid input for ' + i.symbology, i; } return e; }(Error), n0 = function(t) { Gr(e, t); function e() { Ur(this, e); var n = qr(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this)); return n.name = "InvalidElementException", n.message = "Not supported type to render on", n; } return e; }(Error), r0 = function(t) { Gr(e, t); function e() { Ur(this, e); var n = qr(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this)); return n.name = "NoElementException", n.message = "No element to render on.", n; } return e; }(Error); Vt.InvalidInputException = t0; Vt.InvalidElementException = n0; Vt.NoElementException = r0; Object.defineProperty(jr, "__esModule", { value: !0 }); var i0 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) { return typeof t; } : function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, o0 = Ir, ar = ko(o0), a0 = Br, Ht = ko(a0), s0 = Vt; function ko(t) { return t && t.__esModule ? t : { default: t }; } function Hr(t) { if (typeof t == "string") return u0(t); if (Array.isArray(t)) { for (var e = [], n = 0; n < t.length; n++) e.push(Hr(t[n])); return e; } else { if (typeof HTMLCanvasElement < "u" && t instanceof HTMLImageElement) return l0(t); if (t && t.nodeName && t.nodeName.toLowerCase() === "svg" || typeof SVGElement < "u" && t instanceof SVGElement) return { element: t, options: (0, ar.default)(t), renderer: Ht.default.SVGRenderer }; if (typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement) return { element: t, options: (0, ar.default)(t), renderer: Ht.default.CanvasRenderer }; if (t && t.getContext) return { element: t, renderer: Ht.default.CanvasRenderer }; if (t && (typeof t > "u" ? "undefined" : i0(t)) === "object" && !t.nodeName) return { element: t, renderer: Ht.default.ObjectRenderer }; throw new s0.InvalidElementException(); } } function u0(t) { var e = document.querySelectorAll(t); if (e.length !== 0) { for (var n = [], r = 0; r < e.length; r++) n.push(Hr(e[r])); return n; } } function l0(t) { var e = document.createElement("canvas"); return { element: e, options: (0, ar.default)(t), renderer: Ht.default.CanvasRenderer, afterRender: function() { t.setAttribute("src", e.toDataURL()); } }; } jr.default = Hr; var Xr = {}; Object.defineProperty(Xr, "__esModule", { value: !0 }); var f0 = function() { function t(e, n) { for (var r = 0; r < n.length; r++) { var i = n[r]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i); } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e; }; }(); function c0(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); } var d0 = function() { function t(e) { c0(this, t), this.api = e; } return f0(t, [{ key: "handleCatch", value: function(n) { if (n.name === "InvalidInputException") if (this.api._options.valid !== this.api._defaults.valid) this.api._options.valid(!1); else throw n.message; else throw n; this.api.render = function() { }; } }, { key: "wrapBarcodeCall", value: function(n) { try { var r = n.apply(void 0, arguments); return this.api._options.valid(!0), r; } catch (i) { return this.handleCatch(i), this.api; } } }]), t; }(); Xr.default = d0; var h0 = vr, $t = _t(h0), p0 = Bt, Zt = _t(p0), m0 = Mr, Mo = _t(m0), g0 = Tr, Pi = _t(g0), v0 = jr, _0 = _t(v0), y0 = Dn, b0 = _t(y0), w0 = Xr, $0 = _t(w0), To = Vt, O0 = Fn, jo = _t(O0); function _t(t) { return t && t.__esModule ? t : { default: t }; } var ft = function() { }, kn = function(e, n, r) { var i = new ft(); if (typeof e > "u") throw Error("No element to render on was provided."); return i._renderProperties = (0, _0.default)(e), i._encodings = [], i._options = jo.default, i._errorHandler = new $0.default(i), typeof n < "u" && (r = r || {}, r.format || (r.format = Bo()), i.options(r)[r.format](n, r).render()), i; }; kn.getModule = function(t) { return $t.default[t]; }; for (var Di in $t.default) $t.default.hasOwnProperty(Di) && S0($t.default, Di); function S0(t, e) { ft.prototype[e] = ft.prototype[e.toUpperCase()] = ft.prototype[e.toLowerCase()] = function(n, r) { var i = this; return i._errorHandler.wrapBarcodeCall(function() { r.text = typeof r.text > "u" ? void 0 : "" + r.text; var a = (0, Zt.default)(i._options, r); a = (0, b0.default)(a); var o = t[e], s = Io(n, o, a); return i._encodings.push(s), i; }); }; } function Io(t, e, n) { t = "" + t; var r = new e(t, n); if (!r.valid()) throw new To.InvalidInputException(r.constructor.name, t); var i = r.encode(); i = (0, Mo.default)(i); for (var a = 0; a < i.length; a++) i[a].options = (0, Zt.default)(n, i[a].options); return i; } function Bo() { return $t.default.CODE128 ? "CODE128" : Object.keys($t.default)[0]; } ft.prototype.options = function(t) { return this._options = (0, Zt.default)(this._options, t), this; }; ft.prototype.blank = function(t) { var e = new Array(t + 1).join("0"); return this._encodings.push({ data: e }), this; }; ft.prototype.init = function() { if (!!this._renderProperties) { Array.isArray(this._renderProperties) || (this._renderProperties = [this._renderProperties]); var t; for (var e in this._renderProperties) { t = this._renderProperties[e]; var n = (0, Zt.default)(this._options, t.options); n.format == "auto" && (n.format = Bo()), this._errorHandler.wrapBarcodeCall(function() { var r = n.value, i = $t.default[n.format.toUpperCase()], a = Io(r, i, n); sr(t, a, n); }); } } }; ft.prototype.render = function() { if (!this._renderProperties) throw new To.NoElementException(); if (Array.isArray(this._renderProperties)) for (var t = 0; t < this._renderProperties.length; t++) sr(this._renderProperties[t], this._encodings, this._options); else sr(this._renderProperties, this._encodings, this._options); return this; }; ft.prototype._defaults = jo.default; function sr(t, e, n) { e = (0, Mo.default)(e); for (var r = 0; r < e.length; r++) e[r].options = (0, Zt.default)(n, e[r].options), (0, Pi.default)(e[r].options); (0, Pi.default)(n); var i = t.renderer, a = new i(t.element, e, n); a.render(), t.afterRender && t.afterRender(); } typeof window < "u" && (window.JsBarcode = kn); typeof jQuery < "u" && (jQuery.fn.JsBarcode = function(t, e) { var n = []; return jQuery(this).each(function() { n.push(this); }), kn(n, t, e); }); var E0 = kn; const C0 = $e({ name: "BarCodeBox", data() { return {}; }, props: { value: String, format: String, displayValue: { type: Boolean, default: !0 }, fontSize: Number, textPosition: String, textAlign: String, textMargin: Number, width: { type: Number, default: 2 }, height: { type: Number, default: 50 }, background: String, lineColor: String }, methods: {}, computed: {}, components: {}, watch: { $props: { handler() { const t = this.value, e = {}; Object.keys(this.$props).forEach((n) => { this.$props[n] != null && this.$props[n] !== "" && (e[n] = this.$props[n]); }), delete e.value, delete e.formCreateInject, this.$nextTick(() => { E0(this.$refs.bar, t || "", e); }); }, deep: !0, immediate: !0 } } }), x0 = { class: "_fc-barcode", ref: "bar" }; function A0(t, e, n, r, i, a) { return J(), ae("img", x0, null, 512); } const R0 = /* @__PURE__ */ Re(C0, [["render", A0]]); const P0 = $e({ name: "VideoBox", emits: ["pause", "play", "ended", "error"], data() { return { player: null }; }, props: { src: String, type: String, controls: { type: Boolean, default: !0 }, autoplay: Boolean, isLive: Boolean, withCredentials: Boolean, loop: Boolean }, watch: { src: { handler: function() { this.$nextTick(() => { st.ready("mpegts", () => { const t = this.$refs.video, e = window.mpegts.createPlayer({ isLive: this.isLive, type: this.type, url: this.src }); e.attachMediaElement(t), e.on("error", (n) => { this.$emit("error", n); }), e.load(), this.autoplay && e.play().catch((n) => { this.$emit("error", n); }), this.player = e; }); }); }, immediate: !0 } }, created() { window.mpegts ? st.done("mpegts") : st.isDefined("mpegts") || st(["https://static.form-create.com/res/mpegts.min.js"], "mpegts"); } }), D0 = ["controls", "loop"]; function F0(t, e, n, r, i, a) { return J(), ae("video", { ref: "video", class: "_fc-video-box", controls: t.controls, loop: t.loop, onPause: e[0] || (e[0] = (o) => t.$emit("pause", o)), onPlay: e[1] || (e[1] = (o) => t.$emit("play", o)), onEnded: e[2] || (e[2] = (o) => t.$emit("ended", o)) }, null, 40, D0); } const k0 = /* @__PURE__ */ Re(P0, [["render", F0]]); var Vo = { exports: {} }; (function(t, e) { (function(n, r) { t.exports = r(); })(co, () => (() => { var n = { 873: (o, s) => { var u, c, d = function() { var v = function(F, D) { var A = F, f = U[D], l = null, g = 0, _ = null, h = [], S = {}, j = function(p, b) { l = function(y) { for (var O = new Array(y), P = 0; P < y; P += 1) { O[P] = new Array(y); for (var q = 0; q < y; q += 1) O[P][q] = null; } return O; }(g = 4 * A + 17), k(0, 0), k(g - 7, 0), k(0, g - 7), L(), G(), N(p, b), A >= 7 && I(p), _ == null && (_ = w(A, f, h)), $(_, b); }, k = function(p, b) { for (var y = -1; y <= 7; y += 1) if (!(p + y <= -1 || g <= p + y)) for (var O = -1; O <= 7; O += 1) b + O <= -1 || g <= b + O || (l[p + y][b + O] = 0 <= y && y <= 6 && (O == 0 || O == 6) || 0 <= O && O <= 6 && (y == 0 || y == 6) || 2 <= y && y <= 4 && 2 <= O && O <= 4); }, G = function() { for (var p = 8; p < g - 8; p += 1) l[p][6] == null && (l[p][6] = p % 2 == 0); for (var b = 8; b < g - 8; b += 1) l[6][b] == null && (l[6][b] = b % 2 == 0); }, L = function() { for (var p = B.getPatternPosition(A), b = 0; b < p.length; b += 1) for (var y = 0; y < p.length; y += 1) { var O = p[b], P = p[y]; if (l[O][P] == null) for (var q = -2; q <= 2; q += 1) for (var H = -2; H <= 2; H += 1) l[O + q][P + H] = q == -2 || q == 2 || H == -2 || H == 2 || q == 0 && H == 0; } }, I = function(p) { for (var b = B.getBCHTypeNumber(A), y = 0; y < 18; y += 1) { var O = !p && (b >> y & 1) == 1; l[Math.floor(y / 3)][y % 3 + g - 8 - 3] = O; } for (y = 0; y < 18; y += 1) O = !p && (b >> y & 1) == 1, l[y % 3 + g - 8 - 3][Math.floor(y / 3)] = O; }, N = function(p, b) { for (var y = f << 3 | b, O = B.getBCHTypeInfo(y), P = 0; P < 15; P += 1) { var q = !p && (O >> P & 1) == 1; P < 6 ? l[P][8] = q : P < 8 ? l[P + 1][8] = q : l[g - 15 + P][8] = q; } for (P = 0; P < 15; P += 1) q = !p && (O >> P & 1) == 1, P < 8 ? l[8][g - P - 1] = q : P < 9 ? l[8][15 - P - 1 + 1] = q : l[8][15 - P - 1] = q; l[g - 8][8] = !p; }, $ = function(p, b) { for (var y = -1, O = g - 1, P = 7, q = 0, H = B.getMaskFunction(b), Z = g - 1; Z > 0; Z -= 2) for (Z == 6 && (Z -= 1); ; ) { for (var re = 0; re < 2; re += 1) if (l[O][Z - re] == null) { var ne = !1; q < p.length && (ne = (p[q] >>> P & 1) == 1), H(O, Z - re) && (ne = !ne), l[O][Z - re] = ne, (P -= 1) == -1 && (q += 1, P = 7); } if ((O += y) < 0 || g <= O) { O -= y, y = -y; break; } } }, w = function(p, b, y) { for (var O = le.getRSBlocks(p, b), P = ie(), q = 0; q < y.length; q += 1) { var H = y[q]; P.put(H.getMode(), 4), P.put(H.getLength(), B.getLengthInBits(H.getMode(), p)), H.write(P); } var Z = 0; for (q = 0; q < O.length; q += 1) Z += O[q].dataCount; if (P.getLengthInBits() > 8 * Z) throw "code length overflow. (" + P.getLengthInBits() + ">" + 8 * Z + ")"; for (P.getLengthInBits() + 4 <= 8 * Z && P.put(0, 4); P.getLengthInBits() % 8 != 0; ) P.putBit(!1); for (; !(P.getLengthInBits() >= 8 * Z || (P.put(236, 8), P.getLengthInBits() >= 8 * Z)); ) P.put(17, 8); return function(re, ne) { for (var se = 0, ye = 0, me = 0, ce = new Array(ne.length), ue = new Array(ne.length), K = 0; K < ne.length; K += 1) { var Oe = ne[K].dataCount, xe = ne[K].totalCount - Oe; ye = Math.max(ye, Oe), me = Math.max(me, xe), ce[K] = new Array(Oe); for (var te = 0; te < ce[K].length; te += 1) ce[K][te] = 255 & re.getBuffer()[te + se]; se += Oe; var Be = B.getErrorCorrectPolynomial(xe), je = Y(ce[K], Be.getLength() - 1).mod(Be); for (ue[K] = new Array(Be.getLength() - 1), te = 0; te < ue[K].length; te += 1) { var Fe = te + je.getLength() - ue[K].length; ue[K][te] = Fe >= 0 ? je.getAt(Fe) : 0; } } var en = 0; for (te = 0; te < ne.length; te += 1) en += ne[te].totalCount; var Lt = new Array(en), Ke = 0; for (te = 0; te < ye; te += 1) for (K = 0; K < ne.length; K += 1) te < ce[K].length && (Lt[Ke] = ce[K][te], Ke += 1); for (te = 0; te < me; te += 1) for (K = 0; K < ne.length; K += 1) te < ue[K].length && (Lt[Ke] = ue[K][te], Ke += 1); return Lt; }(P, O); }; S.addData = function(p, b) { var y = null; switch (b = b || "Byte") { case "Numeric": y = ee(p); break; case "Alphanumeric": y = X(p); break; case "Byte": y = pe(p); break; case "Kanji": y = Ce(p); break; default: throw "mode:" + b; } h.push(y), _ = null; }, S.isDark = function(p, b) { if (p < 0 || g <= p || b < 0 || g <= b) throw p + "," + b; return l[p][b]; }, S.getModuleCount = function() { return g; }, S.make = function() { if (A < 1) { for (var p = 1; p < 40; p++) { for (var b = le.getRSBlocks(p, f), y = ie(), O = 0; O < h.length; O++) { var P = h[O]; y.put(P.getMode(), 4), y.put(P.getLength(), B.getLengthInBits(P.getMode(), p)), P.write(y); } var q = 0; for (O = 0; O < b.length; O++) q += b[O].dataCount; if (y.getLengthInBits() <= 8 * q) break; } A = p; } j(!1, function() { for (var H = 0, Z = 0, re = 0; re < 8; re += 1) { j(!0, re); var ne = B.getLostPoint(S); (re == 0 || H > ne) && (H = ne, Z = re); } return Z; }()); }, S.createTableTag = function(p, b) { p = p || 2; var y = ""; y += '"; }, S.createSvgTag = function(p, b, y, O) { var P = {}; typeof arguments[0] == "object" && (p = (P = arguments[0]).cellSize, b = P.margin, y = P.alt, O = P.title), p = p || 2, b = b === void 0 ? 4 * p : b, (y = typeof y == "string" ? { text: y } : y || {}).text = y.text || null, y.id = y.text ? y.id || "qrcode-description" : null, (O = typeof O == "string" ? { text: O } : O || {}).text = O.text || null, O.id = O.text ? O.id || "qrcode-title" : null; var q, H, Z, re, ne = S.getModuleCount() * p + 2 * b, se = ""; for (re = "l" + p + ",0 0," + p + " -" + p + ",0 0,-" + p + "z ", se += '' + R(O.text) + "" : "", se += y.text ? '' + R(y.text) + "" : "", se += '', se += '"; }, S.createDataURL = function(p, b) { p = p || 2, b = b === void 0 ? 4 * p : b; var y = S.getModuleCount() * p + 2 * b, O = b, P = y - b; return dt(y, y, function(q, H) { if (O <= q && q < P && O <= H && H < P) { var Z = Math.floor((q - O) / p), re = Math.floor((H - O) / p); return S.isDark(re, Z) ? 0 : 1; } return 1; }); }, S.createImgTag = function(p, b, y) { p = p || 2, b = b === void 0 ? 4 * p : b; var O = S.getModuleCount() * p + 2 * b, P = ""; return P += ""; }; var R = function(p) { for (var b = "", y = 0; y < p.length; y += 1) { var O = p.charAt(y); switch (O) { case "<": b += "<"; break; case ">": b += ">"; break; case "&": b += "&"; break; case '"': b += """; break; default: b += O; } } return b; }; return S.createASCII = function(p, b) { if ((p = p || 1) < 2) return function(ce) { ce = ce === void 0 ? 2 : ce; var ue, K, Oe, xe, te, Be = 1 * S.getModuleCount() + 2 * ce, je = ce, Fe = Be - ce, en = { "\u2588\u2588": "\u2588", "\u2588 ": "\u2580", " \u2588": "\u2584", " ": " " }, Lt = { "\u2588\u2588": "\u2580", "\u2588 ": "\u2580", " \u2588": " ", " ": " " }, Ke = ""; for (ue = 0; ue < Be; ue += 2) { for (Oe = Math.floor((ue - je) / 1), xe = Math.floor((ue + 1 - je) / 1), K = 0; K < Be; K += 1) te = "\u2588", je <= K && K < Fe && je <= ue && ue < Fe && S.isDark(Oe, Math.floor((K - je) / 1)) && (te = " "), je <= K && K < Fe && je <= ue + 1 && ue + 1 < Fe && S.isDark(xe, Math.floor((K - je) / 1)) ? te += " " : te += "\u2588", Ke += ce < 1 && ue + 1 >= Fe ? Lt[te] : en[te]; Ke += ` `; } return Be % 2 && ce > 0 ? Ke.substring(0, Ke.length - Be - 1) + Array(Be + 1).join("\u2580") : Ke.substring(0, Ke.length - 1); }(b); p -= 1, b = b === void 0 ? 2 * p : b; var y, O, P, q, H = S.getModuleCount() * p + 2 * b, Z = b, re = H - b, ne = Array(p + 1).join("\u2588\u2588"), se = Array(p + 1).join(" "), ye = "", me = ""; for (y = 0; y < H; y += 1) { for (P = Math.floor((y - Z) / p), me = "", O = 0; O < H; O += 1) q = 1, Z <= O && O < re && Z <= y && y < re && S.isDark(P, Math.floor((O - Z) / p)) && (q = 0), me += q ? ne : se; for (P = 0; P < p; P += 1) ye += me + ` `; } return ye.substring(0, ye.length - 1); }, S.renderTo2dContext = function(p, b) { b = b || 2; for (var y = S.getModuleCount(), O = 0; O < y; O++) for (var P = 0; P < y; P++) p.fillStyle = S.isDark(O, P) ? "black" : "white", p.fillRect(O * b, P * b, b, b); }, S; }; v.stringToBytes = (v.stringToBytesFuncs = { default: function(F) { for (var D = [], A = 0; A < F.length; A += 1) { var f = F.charCodeAt(A); D.push(255 & f); } return D; } }).default, v.createStringToBytes = function(F, D) { var A = function() { for (var l = qe(F), g = function() { var G = l.read(); if (G == -1) throw "eof"; return G; }, _ = 0, h = {}; ; ) { var S = l.read(); if (S == -1) break; var j = g(), k = g() << 8 | g(); h[String.fromCharCode(S << 8 | j)] = k, _ += 1; } if (_ != D) throw _ + " != " + D; return h; }(), f = "?".charCodeAt(0); return function(l) { for (var g = [], _ = 0; _ < l.length; _ += 1) { var h = l.charCodeAt(_); if (h < 128) g.push(h); else { var S = A[l.charAt(_)]; typeof S == "number" ? (255 & S) == S ? g.push(S) : (g.push(S >>> 8), g.push(255 & S)) : g.push(f); } } return g; }; }; var m, C, x, E, M, U = { L: 1, M: 0, Q: 3, H: 2 }, B = (m = [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]], C = 1335, x = 7973, M = function(F) { for (var D = 0; F != 0; ) D += 1, F >>>= 1; return D; }, (E = {}).getBCHTypeInfo = function(F) { for (var D = F << 10; M(D) - M(C) >= 0; ) D ^= C << M(D) - M(C); return 21522 ^ (F << 10 | D); }, E.getBCHTypeNumber = function(F) { for (var D = F << 12; M(D) - M(x) >= 0; ) D ^= x << M(D) - M(x); return F << 12 | D; }, E.getPatternPosition = function(F) { return m[F - 1]; }, E.getMaskFunction = function(F) { switch (F) { case 0: return function(D, A) { return (D + A) % 2 == 0; }; case 1: return function(D, A) { return D % 2 == 0; }; case 2: return function(D, A) { return A % 3 == 0; }; case 3: return function(D, A) { return (D + A) % 3 == 0; }; case 4: return function(D, A) { return (Math.floor(D / 2) + Math.floor(A / 3)) % 2 == 0; }; case 5: return function(D, A) { return D * A % 2 + D * A % 3 == 0; }; case 6: return function(D, A) { return (D * A % 2 + D * A % 3) % 2 == 0; }; case 7: return function(D, A) { return (D * A % 3 + (D + A) % 2) % 2 == 0; }; default: throw "bad maskPattern:" + F; } }, E.getErrorCorrectPolynomial = function(F) { for (var D = Y([1], 0), A = 0; A < F; A += 1) D = D.multiply(Y([1, V.gexp(A)], 0)); return D; }, E.getLengthInBits = function(F, D) { if (1 <= D && D < 10) switch (F) { case 1: return 10; case 2: return 9; case 4: case 8: return 8; default: throw "mode:" + F; } else if (D < 27) switch (F) { case 1: return 12; case 2: return 11; case 4: return 16; case 8: return 10; default: throw "mode:" + F; } else { if (!(D < 41)) throw "type:" + D; switch (F) { case 1: return 14; case 2: return 13; case 4: return 16; case 8: return 12; default: throw "mode:" + F; } } }, E.getLostPoint = function(F) { for (var D = F.getModuleCount(), A = 0, f = 0; f < D; f += 1) for (var l = 0; l < D; l += 1) { for (var g = 0, _ = F.isDark(f, l), h = -1; h <= 1; h += 1) if (!(f + h < 0 || D <= f + h)) for (var S = -1; S <= 1; S += 1) l + S < 0 || D <= l + S || h == 0 && S == 0 || _ == F.isDark(f + h, l + S) && (g += 1); g > 5 && (A += 3 + g - 5); } for (f = 0; f < D - 1; f += 1) for (l = 0; l < D - 1; l += 1) { var j = 0; F.isDark(f, l) && (j += 1), F.isDark(f + 1, l) && (j += 1), F.isDark(f, l + 1) && (j += 1), F.isDark(f + 1, l + 1) && (j += 1), j != 0 && j != 4 || (A += 3); } for (f = 0; f < D; f += 1) for (l = 0; l < D - 6; l += 1) F.isDark(f, l) && !F.isDark(f, l + 1) && F.isDark(f, l + 2) && F.isDark(f, l + 3) && F.isDark(f, l + 4) && !F.isDark(f, l + 5) && F.isDark(f, l + 6) && (A += 40); for (l = 0; l < D; l += 1) for (f = 0; f < D - 6; f += 1) F.isDark(f, l) && !F.isDark(f + 1, l) && F.isDark(f + 2, l) && F.isDark(f + 3, l) && F.isDark(f + 4, l) && !F.isDark(f + 5, l) && F.isDark(f + 6, l) && (A += 40); var k = 0; for (l = 0; l < D; l += 1) for (f = 0; f < D; f += 1) F.isDark(f, l) && (k += 1); return A + Math.abs(100 * k / D / D - 50) / 5 * 10; }, E), V = function() { for (var F = new Array(256), D = new Array(256), A = 0; A < 8; A += 1) F[A] = 1 << A; for (A = 8; A < 256; A += 1) F[A] = F[A - 4] ^ F[A - 5] ^ F[A - 6] ^ F[A - 8]; for (A = 0; A < 255; A += 1) D[F[A]] = A; return { glog: function(f) { if (f < 1) throw "glog(" + f + ")"; return D[f]; }, gexp: function(f) { for (; f < 0; ) f += 255; for (; f >= 256; ) f -= 255; return F[f]; } }; }(); function Y(F, D) { if (F.length === void 0) throw F.length + "/" + D; var A = function() { for (var l = 0; l < F.length && F[l] == 0; ) l += 1; for (var g = new Array(F.length - l + D), _ = 0; _ < F.length - l; _ += 1) g[_] = F[_ + l]; return g; }(), f = { getAt: function(l) { return A[l]; }, getLength: function() { return A.length; }, multiply: function(l) { for (var g = new Array(f.getLength() + l.getLength() - 1), _ = 0; _ < f.getLength(); _ += 1) for (var h = 0; h < l.getLength(); h += 1) g[_ + h] ^= V.gexp(V.glog(f.getAt(_)) + V.glog(l.getAt(h))); return Y(g, 0); }, mod: function(l) { if (f.getLength() - l.getLength() < 0) return f; for (var g = V.glog(f.getAt(0)) - V.glog(l.getAt(0)), _ = new Array(f.getLength()), h = 0; h < f.getLength(); h += 1) _[h] = f.getAt(h); for (h = 0; h < l.getLength(); h += 1) _[h] ^= V.gexp(V.glog(l.getAt(h)) + g); return Y(_, 0).mod(l); } }; return f; } var le = function() { var F = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12, 7, 37, 13], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]], D = function(f, l) { var g = {}; return g.totalCount = f, g.dataCount = l, g; }, A = { getRSBlocks: function(f, l) { var g = function(I, N) { switch (N) { case U.L: return F[4 * (I - 1) + 0]; case U.M: return F[4 * (I - 1) + 1]; case U.Q: return F[4 * (I - 1) + 2]; case U.H: return F[4 * (I - 1) + 3]; default: return; } }(f, l); if (g === void 0) throw "bad rs block @ typeNumber:" + f + "/errorCorrectionLevel:" + l; for (var _ = g.length / 3, h = [], S = 0; S < _; S += 1) for (var j = g[3 * S + 0], k = g[3 * S + 1], G = g[3 * S + 2], L = 0; L < j; L += 1) h.push(D(k, G)); return h; } }; return A; }(), ie = function() { var F = [], D = 0, A = { getBuffer: function() { return F; }, getAt: function(f) { var l = Math.floor(f / 8); return (F[l] >>> 7 - f % 8 & 1) == 1; }, put: function(f, l) { for (var g = 0; g < l; g += 1) A.putBit((f >>> l - g - 1 & 1) == 1); }, getLengthInBits: function() { return D; }, putBit: function(f) { var l = Math.floor(D / 8); F.length <= l && F.push(0), f && (F[l] |= 128 >>> D % 8), D += 1; } }; return A; }, ee = function(F) { var D = F, A = { getMode: function() { return 1; }, getLength: function(g) { return D.length; }, write: function(g) { for (var _ = D, h = 0; h + 2 < _.length; ) g.put(f(_.substring(h, h + 3)), 10), h += 3; h < _.length && (_.length - h == 1 ? g.put(f(_.substring(h, h + 1)), 4) : _.length - h == 2 && g.put(f(_.substring(h, h + 2)), 7)); } }, f = function(g) { for (var _ = 0, h = 0; h < g.length; h += 1) _ = 10 * _ + l(g.charAt(h)); return _; }, l = function(g) { if ("0" <= g && g <= "9") return g.charCodeAt(0) - "0".charCodeAt(0); throw "illegal char :" + g; }; return A; }, X = function(F) { var D = F, A = { getMode: function() { return 2; }, getLength: function(l) { return D.length; }, write: function(l) { for (var g = D, _ = 0; _ + 1 < g.length; ) l.put(45 * f(g.charAt(_)) + f(g.charAt(_ + 1)), 11), _ += 2; _ < g.length && l.put(f(g.charAt(_)), 6); } }, f = function(l) { if ("0" <= l && l <= "9") return l.charCodeAt(0) - "0".charCodeAt(0); if ("A" <= l && l <= "Z") return l.charCodeAt(0) - "A".charCodeAt(0) + 10; switch (l) { case " ": return 36; case "$": return 37; case "%": return 38; case "*": return 39; case "+": return 40; case "-": return 41; case ".": return 42; case "/": return 43; case ":": return 44; default: throw "illegal char :" + l; } }; return A; }, pe = function(F) { var D = v.stringToBytes(F); return { getMode: function() { return 4; }, getLength: function(A) { return D.length; }, write: function(A) { for (var f = 0; f < D.length; f += 1) A.put(D[f], 8); } }; }, Ce = function(F) { var D = v.stringToBytesFuncs.SJIS; if (!D) throw "sjis not supported."; (function() { var l = D("\u53CB"); if (l.length != 2 || (l[0] << 8 | l[1]) != 38726) throw "sjis not supported."; })(); var A = D(F), f = { getMode: function() { return 8; }, getLength: function(l) { return ~~(A.length / 2); }, write: function(l) { for (var g = A, _ = 0; _ + 1 < g.length; ) { var h = (255 & g[_]) << 8 | 255 & g[_ + 1]; if (33088 <= h && h <= 40956) h -= 33088; else { if (!(57408 <= h && h <= 60351)) throw "illegal char at " + (_ + 1) + "/" + h; h -= 49472; } h = 192 * (h >>> 8 & 255) + (255 & h), l.put(h, 13), _ += 2; } if (_ < g.length) throw "illegal char at " + (_ + 1); } }; return f; }, Qe = function() { var F = [], D = { writeByte: function(A) { F.push(255 & A); }, writeShort: function(A) { D.writeByte(A), D.writeByte(A >>> 8); }, writeBytes: function(A, f, l) { f = f || 0, l = l || A.length; for (var g = 0; g < l; g += 1) D.writeByte(A[g + f]); }, writeString: function(A) { for (var f = 0; f < A.length; f += 1) D.writeByte(A.charCodeAt(f)); }, toByteArray: function() { return F; }, toString: function() { var A = ""; A += "["; for (var f = 0; f < F.length; f += 1) f > 0 && (A += ","), A += F[f]; return A + "]"; } }; return D; }, qe = function(F) { var D = F, A = 0, f = 0, l = 0, g = { read: function() { for (; l < 8; ) { if (A >= D.length) { if (l == 0) return -1; throw "unexpected end of file./" + l; } var h = D.charAt(A); if (A += 1, h == "=") return l = 0, -1; h.match(/^\s$/) || (f = f << 6 | _(h.charCodeAt(0)), l += 6); } var S = f >>> l - 8 & 255; return l -= 8, S; } }, _ = function(h) { if (65 <= h && h <= 90) return h - 65; if (97 <= h && h <= 122) return h - 97 + 26; if (48 <= h && h <= 57) return h - 48 + 52; if (h == 43) return 62; if (h == 47) return 63; throw "c:" + h; }; return g; }, dt = function(F, D, A) { for (var f = function(k, G) { var L = k, I = G, N = new Array(k * G), $ = { setPixel: function(p, b, y) { N[b * L + p] = y; }, write: function(p) { p.writeString("GIF87a"), p.writeShort(L), p.writeShort(I), p.writeByte(128), p.writeByte(0), p.writeByte(0), p.writeByte(0), p.writeByte(0), p.writeByte(0), p.writeByte(255), p.writeByte(255), p.writeByte(255), p.writeString(","), p.writeShort(0), p.writeShort(0), p.writeShort(L), p.writeShort(I), p.writeByte(0); var b = w(2); p.writeByte(2); for (var y = 0; b.length - y > 255; ) p.writeByte(255), p.writeBytes(b, y, 255), y += 255; p.writeByte(b.length - y), p.writeBytes(b, y, b.length - y), p.writeByte(0), p.writeString(";"); } }, w = function(p) { for (var b = 1 << p, y = 1 + (1 << p), O = p + 1, P = R(), q = 0; q < b; q += 1) P.add(String.fromCharCode(q)); P.add(String.fromCharCode(b)), P.add(String.fromCharCode(y)); var H, Z, re, ne = Qe(), se = (H = ne, Z = 0, re = 0, { write: function(ue, K) { if (ue >>> K != 0) throw "length over"; for (; Z + K >= 8; ) H.writeByte(255 & (ue << Z | re)), K -= 8 - Z, ue >>>= 8 - Z, re = 0, Z = 0; re |= ue << Z, Z += K; }, flush: function() { Z > 0 && H.writeByte(re); } }); se.write(b, O); var ye = 0, me = String.fromCharCode(N[ye]); for (ye += 1; ye < N.length; ) { var ce = String.fromCharCode(N[ye]); ye += 1, P.contains(me + ce) ? me += ce : (se.write(P.indexOf(me), O), P.size() < 4095 && (P.size() == 1 << O && (O += 1), P.add(me + ce)), me = ce); } return se.write(P.indexOf(me), O), se.write(y, O), se.flush(), ne.toByteArray(); }, R = function() { var p = {}, b = 0, y = { add: function(O) { if (y.contains(O)) throw "dup key:" + O; p[O] = b, b += 1; }, size: function() { return b; }, indexOf: function(O) { return p[O]; }, contains: function(O) { return p[O] !== void 0; } }; return y; }; return $; }(F, D), l = 0; l < D; l += 1) for (var g = 0; g < F; g += 1) f.setPixel(g, l, A(g, l)); var _ = Qe(); f.write(_); for (var h = function() { var k = 0, G = 0, L = 0, I = "", N = {}, $ = function(R) { I += String.fromCharCode(w(63 & R)); }, w = function(R) { if (!(R < 0)) { if (R < 26) return 65 + R; if (R < 52) return R - 26 + 97; if (R < 62) return R - 52 + 48; if (R == 62) return 43; if (R == 63) return 47; } throw "n:" + R; }; return N.writeByte = function(R) { for (k = k << 8 | 255 & R, G += 8, L += 1; G >= 6; ) $(k >>> G - 6), G -= 6; }, N.flush = function() { if (G > 0 && ($(k << 6 - G), k = 0, G = 0), L % 3 != 0) for (var R = 3 - L % 3, p = 0; p < R; p += 1) I += "="; }, N.toString = function() { return I; }, N; }(), S = _.toByteArray(), j = 0; j < S.length; j += 1) h.writeByte(S[j]); return h.flush(), "data:image/gif;base64," + h; }; return v; }(); d.stringToBytesFuncs["UTF-8"] = function(v) { return function(m) { for (var C = [], x = 0; x < m.length; x++) { var E = m.charCodeAt(x); E < 128 ? C.push(E) : E < 2048 ? C.push(192 | E >> 6, 128 | 63 & E) : E < 55296 || E >= 57344 ? C.push(224 | E >> 12, 128 | E >> 6 & 63, 128 | 63 & E) : (x++, E = 65536 + ((1023 & E) << 10 | 1023 & m.charCodeAt(x)), C.push(240 | E >> 18, 128 | E >> 12 & 63, 128 | E >> 6 & 63, 128 | 63 & E)); } return C; }(v); }, (c = typeof (u = function() { return d; }) == "function" ? u.apply(s, []) : u) === void 0 || (o.exports = c); } }, r = {}; function i(o) { var s = r[o]; if (s !== void 0) return s.exports; var u = r[o] = { exports: {} }; return n[o](u, u.exports, i), u.exports; } i.n = (o) => { var s = o && o.__esModule ? () => o.default : () => o; return i.d(s, { a: s }), s; }, i.d = (o, s) => { for (var u in s) i.o(s, u) && !i.o(o, u) && Object.defineProperty(o, u, { enumerable: !0, get: s[u] }); }, i.o = (o, s) => Object.prototype.hasOwnProperty.call(o, s); var a = {}; return (() => { i.d(a, { default: () => D }); const o = (A) => !!A && typeof A == "object" && !Array.isArray(A); function s(A, ...f) { if (!f.length) return A; const l = f.shift(); return l !== void 0 && o(A) && o(l) ? (A = Object.assign({}, A), Object.keys(l).forEach((g) => { const _ = A[g], h = l[g]; Array.isArray(_) && Array.isArray(h) ? A[g] = h : o(_) && o(h) ? A[g] = s(Object.assign({}, _), h) : A[g] = h; }), s(A, ...f)) : A; } function u(A, f) { const l = document.createElement("a"); l.download = f, l.href = A, document.body.appendChild(l), l.click(), document.body.removeChild(l); } const c = { L: 0.07, M: 0.15, Q: 0.25, H: 0.3 }; class d { constructor({ svg: f, type: l, window: g }) { this._svg = f, this._type = l, this._window = g; } draw(f, l, g, _) { let h; switch (this._type) { case "dots": h = this._drawDot; break; case "classy": h = this._drawClassy; break; case "classy-rounded": h = this._drawClassyRounded; break; case "rounded": h = this._drawRounded; break; case "extra-rounded": h = this._drawExtraRounded; break; default: h = this._drawSquare; } h.call(this, { x: f, y: l, size: g, getNeighbor: _ }); } _rotateFigure({ x: f, y: l, size: g, rotation: _ = 0, draw: h }) { var S; const j = f + g / 2, k = l + g / 2; h(), (S = this._element) === null || S === void 0 || S.setAttribute("transform", `rotate(${180 * _ / Math.PI},${j},${k})`); } _basicDot(f) { const { size: l, x: g, y: _ } = f; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "circle"), this._element.setAttribute("cx", String(g + l / 2)), this._element.setAttribute("cy", String(_ + l / 2)), this._element.setAttribute("r", String(l / 2)); } })); } _basicSquare(f) { const { size: l, x: g, y: _ } = f; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect"), this._element.setAttribute("x", String(g)), this._element.setAttribute("y", String(_)), this._element.setAttribute("width", String(l)), this._element.setAttribute("height", String(l)); } })); } _basicSideRounded(f) { const { size: l, x: g, y: _ } = f; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${g} ${_}v ${l}h ` + l / 2 + `a ${l / 2} ${l / 2}, 0, 0, 0, 0 ${-l}`); } })); } _basicCornerRounded(f) { const { size: l, x: g, y: _ } = f; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${g} ${_}v ${l}h ${l}v ` + -l / 2 + `a ${l / 2} ${l / 2}, 0, 0, 0, ${-l / 2} ${-l / 2}`); } })); } _basicCornerExtraRounded(f) { const { size: l, x: g, y: _ } = f; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${g} ${_}v ${l}h ${l}a ${l} ${l}, 0, 0, 0, ${-l} ${-l}`); } })); } _basicCornersRounded(f) { const { size: l, x: g, y: _ } = f; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("d", `M ${g} ${_}v ` + l / 2 + `a ${l / 2} ${l / 2}, 0, 0, 0, ${l / 2} ${l / 2}h ` + l / 2 + "v " + -l / 2 + `a ${l / 2} ${l / 2}, 0, 0, 0, ${-l / 2} ${-l / 2}`); } })); } _drawDot({ x: f, y: l, size: g }) { this._basicDot({ x: f, y: l, size: g, rotation: 0 }); } _drawSquare({ x: f, y: l, size: g }) { this._basicSquare({ x: f, y: l, size: g, rotation: 0 }); } _drawRounded({ x: f, y: l, size: g, getNeighbor: _ }) { const h = _ ? +_(-1, 0) : 0, S = _ ? +_(1, 0) : 0, j = _ ? +_(0, -1) : 0, k = _ ? +_(0, 1) : 0, G = h + S + j + k; if (G !== 0) if (G > 2 || h && S || j && k) this._basicSquare({ x: f, y: l, size: g, rotation: 0 }); else { if (G === 2) { let L = 0; return h && j ? L = Math.PI / 2 : j && S ? L = Math.PI : S && k && (L = -Math.PI / 2), void this._basicCornerRounded({ x: f, y: l, size: g, rotation: L }); } if (G === 1) { let L = 0; return j ? L = Math.PI / 2 : S ? L = Math.PI : k && (L = -Math.PI / 2), void this._basicSideRounded({ x: f, y: l, size: g, rotation: L }); } } else this._basicDot({ x: f, y: l, size: g, rotation: 0 }); } _drawExtraRounded({ x: f, y: l, size: g, getNeighbor: _ }) { const h = _ ? +_(-1, 0) : 0, S = _ ? +_(1, 0) : 0, j = _ ? +_(0, -1) : 0, k = _ ? +_(0, 1) : 0, G = h + S + j + k; if (G !== 0) if (G > 2 || h && S || j && k) this._basicSquare({ x: f, y: l, size: g, rotation: 0 }); else { if (G === 2) { let L = 0; return h && j ? L = Math.PI / 2 : j && S ? L = Math.PI : S && k && (L = -Math.PI / 2), void this._basicCornerExtraRounded({ x: f, y: l, size: g, rotation: L }); } if (G === 1) { let L = 0; return j ? L = Math.PI / 2 : S ? L = Math.PI : k && (L = -Math.PI / 2), void this._basicSideRounded({ x: f, y: l, size: g, rotation: L }); } } else this._basicDot({ x: f, y: l, size: g, rotation: 0 }); } _drawClassy({ x: f, y: l, size: g, getNeighbor: _ }) { const h = _ ? +_(-1, 0) : 0, S = _ ? +_(1, 0) : 0, j = _ ? +_(0, -1) : 0, k = _ ? +_(0, 1) : 0; h + S + j + k !== 0 ? h || j ? S || k ? this._basicSquare({ x: f, y: l, size: g, rotation: 0 }) : this._basicCornerRounded({ x: f, y: l, size: g, rotation: Math.PI / 2 }) : this._basicCornerRounded({ x: f, y: l, size: g, rotation: -Math.PI / 2 }) : this._basicCornersRounded({ x: f, y: l, size: g, rotation: Math.PI / 2 }); } _drawClassyRounded({ x: f, y: l, size: g, getNeighbor: _ }) { const h = _ ? +_(-1, 0) : 0, S = _ ? +_(1, 0) : 0, j = _ ? +_(0, -1) : 0, k = _ ? +_(0, 1) : 0; h + S + j + k !== 0 ? h || j ? S || k ? this._basicSquare({ x: f, y: l, size: g, rotation: 0 }) : this._basicCornerExtraRounded({ x: f, y: l, size: g, rotation: Math.PI / 2 }) : this._basicCornerExtraRounded({ x: f, y: l, size: g, rotation: -Math.PI / 2 }) : this._basicCornersRounded({ x: f, y: l, size: g, rotation: Math.PI / 2 }); } } const v = { dot: "dot", square: "square", extraRounded: "extra-rounded" }, m = Object.values(v); class C { constructor({ svg: f, type: l, window: g }) { this._svg = f, this._type = l, this._window = g; } draw(f, l, g, _) { let h; switch (this._type) { case v.square: h = this._drawSquare; break; case v.extraRounded: h = this._drawExtraRounded; break; default: h = this._drawDot; } h.call(this, { x: f, y: l, size: g, rotation: _ }); } _rotateFigure({ x: f, y: l, size: g, rotation: _ = 0, draw: h }) { var S; const j = f + g / 2, k = l + g / 2; h(), (S = this._element) === null || S === void 0 || S.setAttribute("transform", `rotate(${180 * _ / Math.PI},${j},${k})`); } _basicDot(f) { const { size: l, x: g, y: _ } = f, h = l / 7; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", `M ${g + l / 2} ${_}a ${l / 2} ${l / 2} 0 1 0 0.1 0zm 0 ${h}a ${l / 2 - h} ${l / 2 - h} 0 1 1 -0.1 0Z`); } })); } _basicSquare(f) { const { size: l, x: g, y: _ } = f, h = l / 7; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", `M ${g} ${_}v ${l}h ${l}v ` + -l + `zM ${g + h} ${_ + h}h ` + (l - 2 * h) + "v " + (l - 2 * h) + "h " + (2 * h - l) + "z"); } })); } _basicExtraRounded(f) { const { size: l, x: g, y: _ } = f, h = l / 7; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "path"), this._element.setAttribute("clip-rule", "evenodd"), this._element.setAttribute("d", `M ${g} ${_ + 2.5 * h}v ` + 2 * h + `a ${2.5 * h} ${2.5 * h}, 0, 0, 0, ${2.5 * h} ${2.5 * h}h ` + 2 * h + `a ${2.5 * h} ${2.5 * h}, 0, 0, 0, ${2.5 * h} ${2.5 * -h}v ` + -2 * h + `a ${2.5 * h} ${2.5 * h}, 0, 0, 0, ${2.5 * -h} ${2.5 * -h}h ` + -2 * h + `a ${2.5 * h} ${2.5 * h}, 0, 0, 0, ${2.5 * -h} ${2.5 * h}M ${g + 2.5 * h} ${_ + h}h ` + 2 * h + `a ${1.5 * h} ${1.5 * h}, 0, 0, 1, ${1.5 * h} ${1.5 * h}v ` + 2 * h + `a ${1.5 * h} ${1.5 * h}, 0, 0, 1, ${1.5 * -h} ${1.5 * h}h ` + -2 * h + `a ${1.5 * h} ${1.5 * h}, 0, 0, 1, ${1.5 * -h} ${1.5 * -h}v ` + -2 * h + `a ${1.5 * h} ${1.5 * h}, 0, 0, 1, ${1.5 * h} ${1.5 * -h}`); } })); } _drawDot({ x: f, y: l, size: g, rotation: _ }) { this._basicDot({ x: f, y: l, size: g, rotation: _ }); } _drawSquare({ x: f, y: l, size: g, rotation: _ }) { this._basicSquare({ x: f, y: l, size: g, rotation: _ }); } _drawExtraRounded({ x: f, y: l, size: g, rotation: _ }) { this._basicExtraRounded({ x: f, y: l, size: g, rotation: _ }); } } const x = { dot: "dot", square: "square" }, E = Object.values(x); class M { constructor({ svg: f, type: l, window: g }) { this._svg = f, this._type = l, this._window = g; } draw(f, l, g, _) { let h; h = this._type === x.square ? this._drawSquare : this._drawDot, h.call(this, { x: f, y: l, size: g, rotation: _ }); } _rotateFigure({ x: f, y: l, size: g, rotation: _ = 0, draw: h }) { var S; const j = f + g / 2, k = l + g / 2; h(), (S = this._element) === null || S === void 0 || S.setAttribute("transform", `rotate(${180 * _ / Math.PI},${j},${k})`); } _basicDot(f) { const { size: l, x: g, y: _ } = f; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "circle"), this._element.setAttribute("cx", String(g + l / 2)), this._element.setAttribute("cy", String(_ + l / 2)), this._element.setAttribute("r", String(l / 2)); } })); } _basicSquare(f) { const { size: l, x: g, y: _ } = f; this._rotateFigure(Object.assign(Object.assign({}, f), { draw: () => { this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect"), this._element.setAttribute("x", String(g)), this._element.setAttribute("y", String(_)), this._element.setAttribute("width", String(l)), this._element.setAttribute("height", String(l)); } })); } _drawDot({ x: f, y: l, size: g, rotation: _ }) { this._basicDot({ x: f, y: l, size: g, rotation: _ }); } _drawSquare({ x: f, y: l, size: g, rotation: _ }) { this._basicSquare({ x: f, y: l, size: g, rotation: _ }); } } const U = "circle", B = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]], V = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]; class Y { constructor(f, l) { this._roundSize = (g) => this._options.dotsOptions.roundSize ? Math.floor(g) : g, this._window = l, this._element = this._window.document.createElementNS("http://www.w3.org/2000/svg", "svg"), this._element.setAttribute("width", String(f.width)), this._element.setAttribute("height", String(f.height)), this._element.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"), f.dotsOptions.roundSize || this._element.setAttribute("shape-rendering", "crispEdges"), this._element.setAttribute("viewBox", `0 0 ${f.width} ${f.height}`), this._defs = this._window.document.createElementNS("http://www.w3.org/2000/svg", "defs"), this._element.appendChild(this._defs), this._imageUri = f.image, this._instanceId = Y.instanceCount++, this._options = f; } get width() { return this._options.width; } get height() { return this._options.height; } getElement() { return this._element; } async drawQR(f) { const l = f.getModuleCount(), g = Math.min(this._options.width, this._options.height) - 2 * this._options.margin, _ = this._options.shape === U ? g / Math.sqrt(2) : g, h = this._roundSize(_ / l); let S = { hideXDots: 0, hideYDots: 0, width: 0, height: 0 }; if (this._qr = f, this._options.image) { if (await this.loadImage(), !this._image) return; const { imageOptions: j, qrOptions: k } = this._options, G = j.imageSize * c[k.errorCorrectionLevel], L = Math.floor(G * l * l); S = function({ originalHeight: I, originalWidth: N, maxHiddenDots: $, maxHiddenAxisDots: w, dotSize: R }) { const p = { x: 0, y: 0 }, b = { x: 0, y: 0 }; if (I <= 0 || N <= 0 || $ <= 0 || R <= 0) return { height: 0, width: 0, hideYDots: 0, hideXDots: 0 }; const y = I / N; return p.x = Math.floor(Math.sqrt($ / y)), p.x <= 0 && (p.x = 1), w && w < p.x && (p.x = w), p.x % 2 == 0 && p.x--, b.x = p.x * R, p.y = 1 + 2 * Math.ceil((p.x * y - 1) / 2), b.y = Math.round(b.x * y), (p.y * p.x > $ || w && w < p.y) && (w && w < p.y ? (p.y = w, p.y % 2 == 0 && p.x--) : p.y -= 2, b.y = p.y * R, p.x = 1 + 2 * Math.ceil((p.y / y - 1) / 2), b.x = Math.round(b.y / y)), { height: b.y, width: b.x, hideYDots: p.y, hideXDots: p.x }; }({ originalWidth: this._image.width, originalHeight: this._image.height, maxHiddenDots: L, maxHiddenAxisDots: l - 14, dotSize: h }); } this.drawBackground(), this.drawDots((j, k) => { var G, L, I, N, $, w; return !(this._options.imageOptions.hideBackgroundDots && j >= (l - S.hideYDots) / 2 && j < (l + S.hideYDots) / 2 && k >= (l - S.hideXDots) / 2 && k < (l + S.hideXDots) / 2 || ((G = B[j]) === null || G === void 0 ? void 0 : G[k]) || ((L = B[j - l + 7]) === null || L === void 0 ? void 0 : L[k]) || ((I = B[j]) === null || I === void 0 ? void 0 : I[k - l + 7]) || ((N = V[j]) === null || N === void 0 ? void 0 : N[k]) || (($ = V[j - l + 7]) === null || $ === void 0 ? void 0 : $[k]) || ((w = V[j]) === null || w === void 0 ? void 0 : w[k - l + 7])); }), this.drawCorners(), this._options.image && await this.drawImage({ width: S.width, height: S.height, count: l, dotSize: h }); } drawBackground() { var f, l, g; const _ = this._element, h = this._options; if (_) { const S = (f = h.backgroundOptions) === null || f === void 0 ? void 0 : f.gradient, j = (l = h.backgroundOptions) === null || l === void 0 ? void 0 : l.color; let k = h.height, G = h.width; if (S || j) { const L = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect"); this._backgroundClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._backgroundClipPath.setAttribute("id", `clip-path-background-color-${this._instanceId}`), this._defs.appendChild(this._backgroundClipPath), !((g = h.backgroundOptions) === null || g === void 0) && g.round && (k = G = Math.min(h.width, h.height), L.setAttribute("rx", String(k / 2 * h.backgroundOptions.round))), L.setAttribute("x", String(this._roundSize((h.width - G) / 2))), L.setAttribute("y", String(this._roundSize((h.height - k) / 2))), L.setAttribute("width", String(G)), L.setAttribute("height", String(k)), this._backgroundClipPath.appendChild(L), this._createColor({ options: S, color: j, additionalRotation: 0, x: 0, y: 0, height: h.height, width: h.width, name: `background-color-${this._instanceId}` }); } } } drawDots(f) { var l, g; if (!this._qr) throw "QR code is not defined"; const _ = this._options, h = this._qr.getModuleCount(); if (h > _.width || h > _.height) throw "The canvas is too small."; const S = Math.min(_.width, _.height) - 2 * _.margin, j = _.shape === U ? S / Math.sqrt(2) : S, k = this._roundSize(j / h), G = this._roundSize((_.width - h * k) / 2), L = this._roundSize((_.height - h * k) / 2), I = new d({ svg: this._element, type: _.dotsOptions.type, window: this._window }); this._dotsClipPath = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), this._dotsClipPath.setAttribute("id", `clip-path-dot-color-${this._instanceId}`), this._defs.appendChild(this._dotsClipPath), this._createColor({ options: (l = _.dotsOptions) === null || l === void 0 ? void 0 : l.gradient, color: _.dotsOptions.color, additionalRotation: 0, x: 0, y: 0, height: _.height, width: _.width, name: `dot-color-${this._instanceId}` }); for (let N = 0; N < h; N++) for (let $ = 0; $ < h; $++) f && !f(N, $) || !((g = this._qr) === null || g === void 0) && g.isDark(N, $) && (I.draw(G + $ * k, L + N * k, k, (w, R) => !($ + w < 0 || N + R < 0 || $ + w >= h || N + R >= h) && !(f && !f(N + R, $ + w)) && !!this._qr && this._qr.isDark(N + R, $ + w)), I._element && this._dotsClipPath && this._dotsClipPath.appendChild(I._element)); if (_.shape === U) { const N = this._roundSize((S / k - h) / 2), $ = h + 2 * N, w = G - N * k, R = L - N * k, p = [], b = this._roundSize($ / 2); for (let y = 0; y < $; y++) { p[y] = []; for (let O = 0; O < $; O++) y >= N - 1 && y <= $ - N && O >= N - 1 && O <= $ - N || Math.sqrt((y - b) * (y - b) + (O - b) * (O - b)) > b ? p[y][O] = 0 : p[y][O] = this._qr.isDark(O - 2 * N < 0 ? O : O >= h ? O - 2 * N : O - N, y - 2 * N < 0 ? y : y >= h ? y - 2 * N : y - N) ? 1 : 0; } for (let y = 0; y < $; y++) for (let O = 0; O < $; O++) p[y][O] && (I.draw(w + O * k, R + y * k, k, (P, q) => { var H; return !!(!((H = p[y + q]) === null || H === void 0) && H[O + P]); }), I._element && this._dotsClipPath && this._dotsClipPath.appendChild(I._element)); } } drawCorners() { if (!this._qr) throw "QR code is not defined"; const f = this._element, l = this._options; if (!f) throw "Element code is not defined"; const g = this._qr.getModuleCount(), _ = Math.min(l.width, l.height) - 2 * l.margin, h = l.shape === U ? _ / Math.sqrt(2) : _, S = this._roundSize(h / g), j = 7 * S, k = 3 * S, G = this._roundSize((l.width - g * S) / 2), L = this._roundSize((l.height - g * S) / 2); [[0, 0, 0], [1, 0, Math.PI / 2], [0, 1, -Math.PI / 2]].forEach(([I, N, $]) => { var w, R, p, b, y, O, P, q, H, Z, re, ne, se, ye; const me = G + I * S * (g - 7), ce = L + N * S * (g - 7); let ue = this._dotsClipPath, K = this._dotsClipPath; if ((((w = l.cornersSquareOptions) === null || w === void 0 ? void 0 : w.gradient) || ((R = l.cornersSquareOptions) === null || R === void 0 ? void 0 : R.color)) && (ue = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), ue.setAttribute("id", `clip-path-corners-square-color-${I}-${N}-${this._instanceId}`), this._defs.appendChild(ue), this._cornersSquareClipPath = this._cornersDotClipPath = K = ue, this._createColor({ options: (p = l.cornersSquareOptions) === null || p === void 0 ? void 0 : p.gradient, color: (b = l.cornersSquareOptions) === null || b === void 0 ? void 0 : b.color, additionalRotation: $, x: me, y: ce, height: j, width: j, name: `corners-square-color-${I}-${N}-${this._instanceId}` })), ((y = l.cornersSquareOptions) === null || y === void 0 ? void 0 : y.type) && m.includes(l.cornersSquareOptions.type)) { const Oe = new C({ svg: this._element, type: l.cornersSquareOptions.type, window: this._window }); Oe.draw(me, ce, j, $), Oe._element && ue && ue.appendChild(Oe._element); } else { const Oe = new d({ svg: this._element, type: ((O = l.cornersSquareOptions) === null || O === void 0 ? void 0 : O.type) || l.dotsOptions.type, window: this._window }); for (let xe = 0; xe < B.length; xe++) for (let te = 0; te < B[xe].length; te++) !((P = B[xe]) === null || P === void 0) && P[te] && (Oe.draw(me + te * S, ce + xe * S, S, (Be, je) => { var Fe; return !!(!((Fe = B[xe + je]) === null || Fe === void 0) && Fe[te + Be]); }), Oe._element && ue && ue.appendChild(Oe._element)); } if ((((q = l.cornersDotOptions) === null || q === void 0 ? void 0 : q.gradient) || ((H = l.cornersDotOptions) === null || H === void 0 ? void 0 : H.color)) && (K = this._window.document.createElementNS("http://www.w3.org/2000/svg", "clipPath"), K.setAttribute("id", `clip-path-corners-dot-color-${I}-${N}-${this._instanceId}`), this._defs.appendChild(K), this._cornersDotClipPath = K, this._createColor({ options: (Z = l.cornersDotOptions) === null || Z === void 0 ? void 0 : Z.gradient, color: (re = l.cornersDotOptions) === null || re === void 0 ? void 0 : re.color, additionalRotation: $, x: me + 2 * S, y: ce + 2 * S, height: k, width: k, name: `corners-dot-color-${I}-${N}-${this._instanceId}` })), ((ne = l.cornersDotOptions) === null || ne === void 0 ? void 0 : ne.type) && E.includes(l.cornersDotOptions.type)) { const Oe = new M({ svg: this._element, type: l.cornersDotOptions.type, window: this._window }); Oe.draw(me + 2 * S, ce + 2 * S, k, $), Oe._element && K && K.appendChild(Oe._element); } else { const Oe = new d({ svg: this._element, type: ((se = l.cornersDotOptions) === null || se === void 0 ? void 0 : se.type) || l.dotsOptions.type, window: this._window }); for (let xe = 0; xe < V.length; xe++) for (let te = 0; te < V[xe].length; te++) !((ye = V[xe]) === null || ye === void 0) && ye[te] && (Oe.draw(me + te * S, ce + xe * S, S, (Be, je) => { var Fe; return !!(!((Fe = V[xe + je]) === null || Fe === void 0) && Fe[te + Be]); }), Oe._element && K && K.appendChild(Oe._element)); } }); } loadImage() { return new Promise((f, l) => { var g; const _ = this._options; if (!_.image) return l("Image is not defined"); if (!((g = _.nodeCanvas) === null || g === void 0) && g.loadImage) _.nodeCanvas.loadImage(_.image).then((h) => { var S, j; if (this._image = h, this._options.imageOptions.saveAsBlob) { const k = (S = _.nodeCanvas) === null || S === void 0 ? void 0 : S.createCanvas(this._image.width, this._image.height); (j = k == null ? void 0 : k.getContext("2d")) === null || j === void 0 || j.drawImage(h, 0, 0), this._imageUri = k == null ? void 0 : k.toDataURL(); } f(); }).catch(l); else { const h = new this._window.Image(); typeof _.imageOptions.crossOrigin == "string" && (h.crossOrigin = _.imageOptions.crossOrigin), this._image = h, h.onload = async () => { this._options.imageOptions.saveAsBlob && (this._imageUri = await async function(S, j) { return new Promise((k) => { const G = new j.XMLHttpRequest(); G.onload = function() { const L = new j.FileReader(); L.onloadend = function() { k(L.result); }, L.readAsDataURL(G.response); }, G.open("GET", S), G.responseType = "blob", G.send(); }); }(_.image || "", this._window)), f(); }, h.src = _.image; } }); } async drawImage({ width: f, height: l, count: g, dotSize: _ }) { const h = this._options, S = this._roundSize((h.width - g * _) / 2), j = this._roundSize((h.height - g * _) / 2), k = S + this._roundSize(h.imageOptions.margin + (g * _ - f) / 2), G = j + this._roundSize(h.imageOptions.margin + (g * _ - l) / 2), L = f - 2 * h.imageOptions.margin, I = l - 2 * h.imageOptions.margin, N = this._window.document.createElementNS("http://www.w3.org/2000/svg", "image"); N.setAttribute("href", this._imageUri || ""), N.setAttribute("x", String(k)), N.setAttribute("y", String(G)), N.setAttribute("width", `${L}px`), N.setAttribute("height", `${I}px`), this._element.appendChild(N); } _createColor({ options: f, color: l, additionalRotation: g, x: _, y: h, height: S, width: j, name: k }) { const G = j > S ? j : S, L = this._window.document.createElementNS("http://www.w3.org/2000/svg", "rect"); if (L.setAttribute("x", String(_)), L.setAttribute("y", String(h)), L.setAttribute("height", String(S)), L.setAttribute("width", String(j)), L.setAttribute("clip-path", `url('#clip-path-${k}')`), f) { let I; if (f.type === "radial") I = this._window.document.createElementNS("http://www.w3.org/2000/svg", "radialGradient"), I.setAttribute("id", k), I.setAttribute("gradientUnits", "userSpaceOnUse"), I.setAttribute("fx", String(_ + j / 2)), I.setAttribute("fy", String(h + S / 2)), I.setAttribute("cx", String(_ + j / 2)), I.setAttribute("cy", String(h + S / 2)), I.setAttribute("r", String(G / 2)); else { const N = ((f.rotation || 0) + g) % (2 * Math.PI), $ = (N + 2 * Math.PI) % (2 * Math.PI); let w = _ + j / 2, R = h + S / 2, p = _ + j / 2, b = h + S / 2; $ >= 0 && $ <= 0.25 * Math.PI || $ > 1.75 * Math.PI && $ <= 2 * Math.PI ? (w -= j / 2, R -= S / 2 * Math.tan(N), p += j / 2, b += S / 2 * Math.tan(N)) : $ > 0.25 * Math.PI && $ <= 0.75 * Math.PI ? (R -= S / 2, w -= j / 2 / Math.tan(N), b += S / 2, p += j / 2 / Math.tan(N)) : $ > 0.75 * Math.PI && $ <= 1.25 * Math.PI ? (w += j / 2, R += S / 2 * Math.tan(N), p -= j / 2, b -= S / 2 * Math.tan(N)) : $ > 1.25 * Math.PI && $ <= 1.75 * Math.PI && (R += S / 2, w += j / 2 / Math.tan(N), b -= S / 2, p -= j / 2 / Math.tan(N)), I = this._window.document.createElementNS("http://www.w3.org/2000/svg", "linearGradient"), I.setAttribute("id", k), I.setAttribute("gradientUnits", "userSpaceOnUse"), I.setAttribute("x1", String(Math.round(w))), I.setAttribute("y1", String(Math.round(R))), I.setAttribute("x2", String(Math.round(p))), I.setAttribute("y2", String(Math.round(b))); } f.colorStops.forEach(({ offset: N, color: $ }) => { const w = this._window.document.createElementNS("http://www.w3.org/2000/svg", "stop"); w.setAttribute("offset", 100 * N + "%"), w.setAttribute("stop-color", $), I.appendChild(w); }), L.setAttribute("fill", `url('#${k}')`), this._defs.appendChild(I); } else l && L.setAttribute("fill", l); this._element.appendChild(L); } } Y.instanceCount = 0; const le = Y, ie = "canvas", ee = {}; for (let A = 0; A <= 40; A++) ee[A] = A; const X = { type: ie, shape: "square", width: 300, height: 300, data: "", margin: 0, qrOptions: { typeNumber: ee[0], mode: void 0, errorCorrectionLevel: "Q" }, imageOptions: { saveAsBlob: !0, hideBackgroundDots: !0, imageSize: 0.4, crossOrigin: void 0, margin: 0 }, dotsOptions: { type: "square", color: "#000", roundSize: !0 }, backgroundOptions: { round: 0, color: "#fff" } }; function pe(A) { const f = Object.assign({}, A); if (!f.colorStops || !f.colorStops.length) throw "Field 'colorStops' is required in gradient"; return f.rotation ? f.rotation = Number(f.rotation) : f.rotation = 0, f.colorStops = f.colorStops.map((l) => Object.assign(Object.assign({}, l), { offset: Number(l.offset) })), f; } function Ce(A) { const f = Object.assign({}, A); return f.width = Number(f.width), f.height = Number(f.height), f.margin = Number(f.margin), f.imageOptions = Object.assign(Object.assign({}, f.imageOptions), { hideBackgroundDots: Boolean(f.imageOptions.hideBackgroundDots), imageSize: Number(f.imageOptions.imageSize), margin: Number(f.imageOptions.margin) }), f.margin > Math.min(f.width, f.height) && (f.margin = Math.min(f.width, f.height)), f.dotsOptions = Object.assign({}, f.dotsOptions), f.dotsOptions.gradient && (f.dotsOptions.gradient = pe(f.dotsOptions.gradient)), f.cornersSquareOptions && (f.cornersSquareOptions = Object.assign({}, f.cornersSquareOptions), f.cornersSquareOptions.gradient && (f.cornersSquareOptions.gradient = pe(f.cornersSquareOptions.gradient))), f.cornersDotOptions && (f.cornersDotOptions = Object.assign({}, f.cornersDotOptions), f.cornersDotOptions.gradient && (f.cornersDotOptions.gradient = pe(f.cornersDotOptions.gradient))), f.backgroundOptions && (f.backgroundOptions = Object.assign({}, f.backgroundOptions), f.backgroundOptions.gradient && (f.backgroundOptions.gradient = pe(f.backgroundOptions.gradient))), f; } var Qe = i(873), qe = i.n(Qe); function dt(A) { if (!A) throw new Error("Extension must be defined"); A[0] === "." && (A = A.substring(1)); const f = { bmp: "image/bmp", gif: "image/gif", ico: "image/vnd.microsoft.icon", jpeg: "image/jpeg", jpg: "image/jpeg", png: "image/png", svg: "image/svg+xml", tif: "image/tiff", tiff: "image/tiff", webp: "image/webp", pdf: "application/pdf" }[A.toLowerCase()]; if (!f) throw new Error(`Extension "${A}" is not supported`); return f; } class F { constructor(f) { f != null && f.jsdom ? this._window = new f.jsdom("", { resources: "usable" }).window : this._window = window, this._options = f ? Ce(s(X, f)) : X, this.update(); } static _clearContainer(f) { f && (f.innerHTML = ""); } _setupSvg() { if (!this._qr) return; const f = new le(this._options, this._window); this._svg = f.getElement(), this._svgDrawingPromise = f.drawQR(this._qr).then(() => { var l; this._svg && ((l = this._extension) === null || l === void 0 || l.call(this, f.getElement(), this._options)); }); } _setupCanvas() { var f, l; this._qr && (!((f = this._options.nodeCanvas) === null || f === void 0) && f.createCanvas ? (this._nodeCanvas = this._options.nodeCanvas.createCanvas(this._options.width, this._options.height), this._nodeCanvas.width = this._options.width, this._nodeCanvas.height = this._options.height) : (this._domCanvas = document.createElement("canvas"), this._domCanvas.width = this._options.width, this._domCanvas.height = this._options.height), this._setupSvg(), this._canvasDrawingPromise = (l = this._svgDrawingPromise) === null || l === void 0 ? void 0 : l.then(() => { var g; if (!this._svg) return; const _ = this._svg, h = new this._window.XMLSerializer().serializeToString(_), S = btoa(h), j = `data:${dt("svg")};base64,${S}`; if (!((g = this._options.nodeCanvas) === null || g === void 0) && g.loadImage) return this._options.nodeCanvas.loadImage(j).then((k) => { var G, L; k.width = this._options.width, k.height = this._options.height, (L = (G = this._nodeCanvas) === null || G === void 0 ? void 0 : G.getContext("2d")) === null || L === void 0 || L.drawImage(k, 0, 0); }); { const k = new this._window.Image(); return new Promise((G) => { k.onload = () => { var L, I; (I = (L = this._domCanvas) === null || L === void 0 ? void 0 : L.getContext("2d")) === null || I === void 0 || I.drawImage(k, 0, 0), G(); }, k.src = j; }); } })); } async _getElement(f = "png") { if (!this._qr) throw "QR code is empty"; return f.toLowerCase() === "svg" ? (this._svg && this._svgDrawingPromise || this._setupSvg(), await this._svgDrawingPromise, this._svg) : ((this._domCanvas || this._nodeCanvas) && this._canvasDrawingPromise || this._setupCanvas(), await this._canvasDrawingPromise, this._domCanvas || this._nodeCanvas); } update(f) { F._clearContainer(this._container), this._options = f ? Ce(s(this._options, f)) : this._options, this._options.data && (this._qr = qe()(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel), this._qr.addData(this._options.data, this._options.qrOptions.mode || function(l) { switch (!0) { case /^[0-9]*$/.test(l): return "Numeric"; case /^[0-9A-Z $%*+\-./:]*$/.test(l): return "Alphanumeric"; default: return "Byte"; } }(this._options.data)), this._qr.make(), this._options.type === ie ? this._setupCanvas() : this._setupSvg(), this.append(this._container)); } append(f) { if (f) { if (typeof f.appendChild != "function") throw "Container should be a single DOM node"; this._options.type === ie ? this._domCanvas && f.appendChild(this._domCanvas) : this._svg && f.appendChild(this._svg), this._container = f; } } applyExtension(f) { if (!f) throw "Extension function should be defined."; this._extension = f, this.update(); } deleteExtension() { this._extension = void 0, this.update(); } async getRawData(f = "png") { if (!this._qr) throw "QR code is empty"; const l = await this._getElement(f), g = dt(f); if (!l) return null; if (f.toLowerCase() === "svg") { const _ = `\r ${new this._window.XMLSerializer().serializeToString(l)}`; return typeof Blob > "u" || this._options.jsdom ? Buffer.from(_) : new Blob([_], { type: g }); } return new Promise((_) => { const h = l; if ("toBuffer" in h) if (g === "image/png") _(h.toBuffer(g)); else if (g === "image/jpeg") _(h.toBuffer(g)); else { if (g !== "application/pdf") throw Error("Unsupported extension"); _(h.toBuffer(g)); } else "toBlob" in h && h.toBlob(_, g, 1); }); } async download(f) { if (!this._qr) throw "QR code is empty"; if (typeof Blob > "u") throw "Cannot download in Node.js, call getRawData instead."; let l = "png", g = "qr"; typeof f == "string" ? (l = f, console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")) : typeof f == "object" && f !== null && (f.name && (g = f.name), f.extension && (l = f.extension)); const _ = await this._getElement(l); if (_) if (l.toLowerCase() === "svg") { let h = new XMLSerializer().serializeToString(_); h = `\r ` + h, u(`data:${dt(l)};charset=utf-8,${encodeURIComponent(h)}`, `${g}.svg`); } else u(_.toDataURL(dt(l)), `${g}.${l}`); } } const D = F; })(), a.default; })()); })(Vo); const M0 = /* @__PURE__ */ cl(Vo.exports), T0 = $e({ name: "QrCodeBox", data() { return { qrcode: null }; }, props: { data: String, image: String, width: Number, height: Number, circleType: String, circleColor: String }, methods: {}, computed: {}, components: {}, watch: { $props: { handler() { const t = { dotsOptions: {} }; Object.keys(this.$props).forEach((e) => { this.$props[e] != null && this.$props[e] !== "" && (t[e] = this.$props[e]); }), delete t.formCreateInject, t.circleType && (t.dotsOptions.type = t.circleType), t.circleColor && (t.dotsOptions.color = t.circleColor), delete t.circleColor, delete t.circleType, this.$nextTick(() => { this.qrcode ? this.qrcode.update(t) : (this.qrcode = De(new M0(t)), this.qrcode.append(this.$refs.qr)); }); }, deep: !0, immediate: !0 } } }), j0 = { class: "_fc-qrcode", ref: "qr" }; function I0(t, e, n, r, i, a) { return J(), ae("div", j0, null, 512); } const B0 = /* @__PURE__ */ Re(T0, [["render", I0]]); const V0 = $e({ name: "FcCell" }), L0 = { ref: "cell", class: "_fc-cell" }; function N0(t, e, n, r, i, a) { return J(), ae("div", L0, [ gn(t.$slots, "default") ], 512); } const z0 = /* @__PURE__ */ Re(V0, [["render", N0]]); const Dt = { Add: (t, e) => { let n, r, i; try { n = t.toString().split(".")[1].length; } catch { n = 0; } try { r = e.toString().split(".")[1].length; } catch { r = 0; } return i = Math.pow(10, Math.max(n, r)), (t * i + e * i) / i; }, Sub: (t, e) => { let n, r, i; try { n = t.toString().split(".")[1].length; } catch { n = 0; } try { r = e.toString().split(".")[1].length; } catch { r = 0; } i = Math.pow(10, Math.max(n, r)); let a = n >= r ? n : r; return Number(((t * i - e * i) / i).toFixed(a)); }, Mul: (t, e) => { let n = 0, r = t.toString(), i = e.toString(); try { n += r.split(".")[1].length; } catch { } try { n += i.split(".")[1].length; } catch { } return Number(r.replace(".", "")) * Number(i.replace(".", "")) / Math.pow(10, n); }, Div: (t, e) => { let n = 0, r = 0; try { n = t.toString().split(".")[1].length; } catch { } try { r = e.toString().split(".")[1].length; } catch { } let i = Number(t.toString().replace(".", "")), a = Number(e.toString().replace(".", "")); return i / a * Math.pow(10, r - n); } }, Xt = { ADD: function(t, e) { return Dt.Add(t, e); }, SUB: function(t, e) { return Dt.Sub(t, e); }, MUL: function(t, e) { return Dt.Mul(t, e); }, DIV: function(t, e) { return Dt.Div(t, e); }, SUM: function(...t) { return (t || []).reduce((e, n) => Dt.Add(e, Array.isArray(n) ? Xt.SUM(...n) : n || 0), 0); }, MAX: function(...t) { const e = Array.isArray(t[0]) ? t[0] : t; return Math.max(...e.map((n) => parseFloat(n)).filter((n) => !isNaN(n))); }, MIN: function(...t) { const e = Array.isArray(t[0]) ? t[0] : t; return Math.min(...e.map((n) => parseFloat(n)).filter((n) => !isNaN(n))); }, ABS: function(t) { return parseFloat(Math.abs(t)) || 0; }, AVG: function(...t) { const e = Array.isArray(t[0]) ? t[0] : t; return e.length ? Dt.Div(Xt.SUM(e), e.length) : 0; }, POWER: function(t, e) { return Math.pow(parseFloat(t), parseFloat(e)); }, RAND: function() { return Math.random(); }, CEIL: function(t) { return Math.ceil(parseFloat(t)) || 0; }, FLOOR: function(t) { return Math.floor(parseFloat(t) || 0); }, FIXED: function(t, e) { const n = Math.pow(10, e || 0); return (Math.floor(parseFloat(t) * n) / n).toFixed(e || 0); }, ISNUMBER: function(t) { return t === "" || t === null ? !1 : !isNaN(Number(t)); }, PI: function() { return Number(Math.PI); }, ROUND: function(t, e) { return t = parseFloat(t), isNaN(t) ? 0 : parseFloat(t.toFixed(parseFloat(e) || 0)); }, SQRT: function(t) { return Math.sqrt(parseFloat(t)) || 0; }, TONUMBER: function(t) { return parseFloat(t) || 0; }, NOW: function() { const t = new Date(), e = t.getFullYear(), n = ("0" + (t.getMonth() + 1)).slice(-2), r = ("0" + t.getDate()).slice(-2), i = ("0" + t.getHours()).slice(-2), a = ("0" + t.getMinutes()).slice(-2), o = ("0" + t.getSeconds()).slice(-2); return e + "-" + n + "-" + r + " " + i + ":" + a + ":" + o; }, TODAY: function() { const t = new Date(), e = t.getFullYear(), n = ("0" + (t.getMonth() + 1)).slice(-2), r = ("0" + t.getDate()).slice(-2); return e + "-" + n + "-" + r; }, YEAR: function(t) { return t ? new Date(t).getFullYear() : null; }, MONTH: function(t) { return t ? new Date(t).getMonth() + 1 : null; }, DAY: function(t) { return t ? new Date(t).getDate() : null; }, HOUR: function(t) { return t ? new Date(t).getHours() : null; }, MINUTE: function(t) { return t ? new Date(t).getMinutes() : null; }, SECOND: function(t) { return t ? new Date(t).getSeconds() : null; }, DIFFDAYS: function(t, e) { const n = new Date(t), r = new Date(e); return parseInt(Math.ceil(Math.abs(r.getTime() - n.getTime()) / (1e3 * 60 * 60 * 24))); }, DIFFHOURS: function(t, e) { const n = new Date(t), r = new Date(e); return parseFloat(Math.abs(r.getTime() - n.getTime()) / (1e3 * 60 * 60)).toFixed(2); }, DIFFMINUTES: function(t, e) { const n = new Date(t), r = new Date(e); return parseInt(Math.ceil(Math.abs(r.getTime() - n.getTime()) / (1e3 * 60))); }, TIMESTAMP: function(t) { return Date.parse(t); }, STARTSWITH: function(t, e) { return ("" + t).substring(0, ("" + e).length) === e; }, EMPTY: function(t) { return Je.empty(t); }, NOTEMPTY: function(t) { return !Je.empty(t); }, LEN: function(t) { return Array.isArray(t) ? t.length : 0; }, MOD: function(t, e) { return t = parseFloat(t), e = parseFloat(e), !t || !e || isNaN(t) || isNaN(e) ? 0 : t % e; }, SLICELEFT: function(t, e) { return ("" + t).slice(0, Number(e) || 0); }, SLICERIGHT: function(t, e) { return ("" + t).slice(Number(e) * -1); }, TOLOWER: function(t) { return ("" + t).toLowerCase(); }, TOUPPER: function(t) { return ("" + t).toUpperCase(); }, INCLUDES: function(t, e) { return (t || "").indexOf(e || ""); }, REPLACE: function(t, e, n) { return (t || "").replace(e || "", n || ""); }, REPLACEALL: function(t, e, n) { return (t || "").replaceAll(e || "", n || ""); }, TRIM: function(t) { return (t || "").trim(); }, TOCHINSESAMOUNT: function(t) { let e = ["\u96F6", "\u58F9", "\u8D30", "\u53C1", "\u8086", "\u4F0D", "\u9646", "\u67D2", "\u634C", "\u7396"], n = ["", "\u4E07", "\u4EBF", "\u4E07\u4EBF", "\u4EBF\u4EBF"], r = ["", "\u62FE", "\u4F70", "\u4EDF"], i = ["\u89D2", "\u5206"]; function a(m) { let C = "", x = "", E = 0, M = !0; for (; m > 0; ) { let U = m % 10; U === 0 ? M || (M = !0, x = e[U] + x) : (M = !1, C = e[U], C += r[E], x = C + x), E++, m = Math.floor(m / 10); } return x; } let o = 0, s = "", u = "", c = !1; if (t === 0) return e[0]; let d = Math.floor(t), v = Math.round((t - d) * 100); for (; d > 0; ) { let m = d % 1e4; c && (u = e[0] + u), s = a(m), s += m !== 0 ? n[o] : n[0], u = s + u, c = m < 1e3 && m > 0, d = Math.floor(d / 1e4), o++; } return u && (u += "\u5143"), v > 0 ? (u += e[Math.floor(v / 10)] + i[0], v % 10 !== 0 && (u += e[v % 10] + i[1])) : u && (u += "\u6574"), u; }, UNION: function(...t) { return (Array.isArray(t[0]) ? t[0] : t).filter((n, r, i) => i.indexOf(n) === r); }, AND: function(...t) { return !!t.reduce((e, n) => e && n, !0); }, OR: function(...t) { return !!t.reduce((e, n) => e || n, !1); }, IF: function(t, e = !0, n = !1) { return t ? e : n; }, DEFAULT: function(t, e) { return Je.Undef(t) ? e : t; }, CASE: function(...t) { for (let e = 0; e < t.length - 1; e += 2) if (t[e]) return t[e + 1]; return null; }, COLUMN: function(t, e) { const n = []; return Array.isArray(t) && t.forEach(function(r) { Array.isArray(r) ? n.push(...Xt.COLUMN(r, e)) : r && n.push(r[e]); }), n; }, VALUE: function(t, e, n) { const r = ("" + e).split("."); let i = t; for (let a = 0; a < r.length; a++) if (uo(i, r[a])) i = i[r[a]]; else return n; return i; }, CONCAT: function(...t) { return "".concat(...t); }, INTERSECTIONSET: function(t, e) { const n = []; for (let r = 0; r < t.length; r++) { const i = t[r]; e.indexOf(i) !== -1 && n.indexOf(i) === -1 && n.push(i); } return n; }, LIST: function(...t) { return t; }, IN: function(t, e) { return (t || []).indexOf(e) > -1; }, FALSE: function() { return !1; }, TRUE: function() { return !0; }, NOT: function(t) { return !t; }, EQ: function(t, e) { return t === e; }, GE: function(t, e) { return t >= e; }, GT: function(t, e) { return t > e; }, LE: function(t, e) { return t <= e; }, LT: function(t, e) { return t < e; }, NE: function(t, e) { return t !== e; } }, pn = function(t, e, n, r) { return e.forEach((i) => { t.indexOf(i[n || "id"]) > -1 && t.splice(t.indexOf(i[n || "id"]), 1, i[r || "label"]), Je.trueArray(i.children) && pn(t, i.children, n, r); }), t; }, U0 = function(t, e) { return e.forEach((n) => { t.indexOf(n.value) > -1 && (t[t.indexOf(n.value)] = n.label); }), t; }; function Gt(t) { if (t) { if (!Array.isArray(t)) return [t]; } else return []; return t; } function q0(t, e) { let n = e.rule.value; const r = e.$render.vNode.h, i = e.type, a = e.$handle.subForm[e.id], o = e.prop.readMode; if (e.prop.title.title && e.prop.title.title.trim() && (e.prop.title.title += "\uFF1A"), o === !1 || o === "custom" || !e.input || e.rule.subForm || (Array.isArray(a) ? a.length : a) || ["fcGroup", "fcSubForm", "tableForm", "stepForm", "nestedTableForm", "infiniteTableForm", "fcUpload"].indexOf(e.trueType) > -1) return e.parser.render(t, e); if (["radio", "select", "checkbox"].indexOf(i) > -1) n = U0([...Gt(n)], e.prop.props.options || e.prop.props.formCreateInject.options || []).join(", "); else if (["timePicker", "datePicker", "slider"].indexOf(i) > -1) n = Array.isArray(n) ? n.join(" - ") : n; else if (i === "cascader") n = [...Gt(n)], Array.isArray(n[0]) || (n = [n]), n = n.map((s) => pn(s, e.prop.props.options || e.prop.props.formCreateInject.options || [], "value").join("/")).join(", "); else if (i === "aTransfer") { const s = [...Gt(n)]; n = pn(s, e.prop.props.dataSource || e.prop.props.formCreateInject.options || [], "key").join(", "); } else if (["tree", "aTreeSelect"].indexOf(i) > -1) { const s = e.prop.props.treeData || e.prop.props.formCreateInject.options || []; n = pn([...Gt(n)], s, i === "aTreeSelect" ? "value" : "id").join(", "); } else { if (i === "fcEditor" || o === "html") return r("div", { innerHTML: n }); if (o === "image") return n = Gt(n), r("div", { class: "_fc-upload" }, [ r("a-image-preview-group", {}, { default: () => n.map(function(s) { return r("div", { class: "_fc-upload-preview" }, [ r("a-image", { style: { height: "100%" }, src: typeof s == "object" ? s.url : s }) ]); }) }) ]); if ((i === "switch" || i === "a-switch") && (e.prop.props.checkedValue != null || e.prop.props.unCheckedValue != null)) n = e.prop.props.checkedValue === n ? "\u662F" : "\u5426"; else { if (i === "signaturePad" && n) return r("a-image", { src: n, fit: "cover", style: { height: "90px" } }); typeof n == "boolean" && (n = n ? "\u662F" : "\u5426"); } } return r("span", { class: "_fc-read-view" }, ["" + (n == null ? "" : n)]); } const G0 = (t, e) => Mi[e || "info"]({ content: t }); function H0(t) { const e = document.createElement("textarea"); e.style.position = "fixed", e.style.top = 0, e.style.left = "-9999px", e.value = t, document.body.appendChild(e), e.focus(), e.select(); try { document.execCommand("copy"); } catch { console.log("Oops, unable to copy"); } G0("\u5DF2\u590D\u5236!", "success"), document.body.removeChild(e); } const X0 = (t, e) => { let n = [t]; const r = e.split("."); let i = 1; for (; r[i]; ) { let a = []; n.forEach((o) => { Object.values(o.ctxs).forEach((s) => { if (s.rule._fc_id === r[i - 1]) { const u = o.subForm[s.id]; a.push(...Array.isArray(u) ? u : [u]); } }); }), n = a.map((o) => o.rule[0].__fc__.$handle), i++; } return [n, r[i - 1]]; }, fn = (t, e, n) => { const r = t.vm.setupState.top.setupState.fc.$handle; let i = [t.$handle]; t.$handle !== r && i.push(r); let a = e; e.indexOf(".") > -1 && ([i, a] = X0(r, e)), i.forEach((o) => { Object.values(o.ctxs).forEach((s) => { s.rule._fc_id === a && n(s.rule, o.api); }); }); }, Lo = { openModel(t, e) { e.api.open(t.model); }, closeModel(t, e) { e.api.close(t.model); }, hidden(t, e, n) { const r = typeof t.id == "string" ? [t.id] : t.id || []; let i = !!t.status; t.compute && (i = !!n.$handle.compute(e.self.__fc__, t.formula)), r.forEach((a) => { fn(n, a, (o) => { o.hidden = i; }); }); }, disabled(t, e, n) { const r = typeof t.id == "string" ? [t.id] : t.id || []; let i = !!t.status; t.compute && (i = !!n.$handle.compute(e.self.__fc__, t.formula)), r.forEach((a) => { fn(n, a, (o) => { o.props || (o.props = {}), o.props.disabled = i; }); }); }, resetFields(t, e) { e.api.top.resetFields(); }, clearFields(t, e) { e.api.top.coverValue({}); }, validate(t, e) { return e.api.top.validate(); }, validateFields(t, e, n) { const r = typeof t.id == "string" ? [t.id] : t.id || [], i = []; return r.forEach((a) => { fn(n, a, (o, s) => { o.field && i.push(s.validateField(o.field)); }); }), i.length ? Promise.all(i) : void 0; }, submit(t, e) { return e.api.top.submit(); }, setValue(t, e, n) { (t.formData || []).forEach((r) => { let i = r.value; r.compute && (i = n.$handle.compute(e.self.__fc__, r.formula)), fn(n, r.id, (a) => { a.value = i; }); }); }, fetch(t, e) { const { append: n, response: r, fetch: i } = t; return n && (i.data = { ...e.api.formData(), ...i.data || {} }), new Promise((a, o) => { e.api.fetch(t.fetch).then((s) => { r && e.api.setData(r, s), a(s); }).catch((s) => { o(s); }); }); }, copy(t, e, n) { let r = t.content || ""; t.compute && (r = n.$handle.compute(e.self.__fc__, t.formula)), H0(r); }, callback(t, e) { return t.callback && t.callback(e); }, message(t) { Mi[t.type || "info"]({ content: t.message, duration: t.duration }); } }; function W0(t, e) { return t.reduce((n, r) => n.then(() => r(e)), Promise.resolve()); } const J0 = function(t) { return { name: "behavior", load(e, n) { const r = e.getValue(), i = {}, a = {}; r && Object.keys(r).forEach((o) => { if (Array.isArray(r[o])) { const s = []; if (r[o].forEach((u) => { const { method: c, config: d, expression: v, stopPropagation: m, ignoreError: C } = u; s.push((x) => new Promise((E) => { if (v && t.$handle.compute(n.__fc__, v) === !1) { E(); return; } const M = (...B) => { (!m || t.$handle.compute(n.__fc__, m) !== !0) && E(...B); }; let U; try { U = Lo[c](d || {}, x, t); } catch (B) { console.error(B), C !== !1 && M(); return; } U && U.then ? U.then(M).catch(() => { C !== !1 && M(); }) : M(U); })); }), s.length) { const u = t.$handle.inject(n, function(c) { W0(s, c); }, n.inject || t.$handle.options.injectEvent); o.indexOf("hook_") > -1 ? a[o.replace("hook_", "")] = u : i[o] = u; } } }), e.getProp().on = i, e.getProp().hook = a; } }; }, Y0 = Object.assign || function(t) { for (let e, n = 1; n < arguments.length; n++) for (let r in e = arguments[n], e) Object.prototype.hasOwnProperty.call(e, r) && Ft(t, r, e[r]); return t; }; function Q0() { return Y0.apply(this, arguments); } function K0(t) { t.__proto__.setBehavior = (e) => { Q0(Lo, e); }, t.extendApi((e) => ({ open(n, ...r) { (e.el(n) || e.top.el(n)).open(...r); }, close(n) { n ? (e.el(n) || e.top.el(n)).close() : (e.top.bus.$emit("fc.closeDialog"), e !== e.top && e.bus.$emit("fc.closeDialog")); } })); } const ur = { name: "easySlots", load(t) { const e = t.getValue(), n = {}; e && Object.keys(e).forEach((r) => { n[r] = e[r].type === "icon" ? { type: "i", class: "fc-icon iconfont " + e[r].value } : { type: "div", children: ["" + (e[r].value || "")] }; }), t.getProp().renderSlots = n; } }; ur.watch = ur.load; ve.parser().preview = q0; function Z0(t) { Object.keys(Xt).forEach((e) => { t.setFormula(e, Xt[e]); }), K0(t), t.register("behavior", J0), t.register("easySlots", ur); } Z0(ve); ve.component("FcSlot", ju); ve.component("FcJson", Iu); ve.component("DataTable", xu); ve.component("FcCell", z0); ve.component("TableForm", el); ve.component("StepForm", Nu); ve.component("FcValue", Tu); ve.component("FcTable", Du); ve.component("NestedTableForm", Wu); ve.component("InfiniteTableForm", Qu); ve.component("FcDialog", ol); ve.component("FcDrawer", fl); ve.component("FcInlineForm", Gu); ve.component("AudioBox", Ll); ve.component("VideoBox", k0); ve.component("BarCodeBox", R0); ve.component("IframeBox", ql); ve.component("QrCodeBox", B0); ve.component("SignaturePad", El); ve.component("FcEcharts", gl); ve.component("FcTitle", Tl); ve.component("FcId", Fl); ve.loadjs = st; export { ve as default, Z0 as useAdvanced };