template-designer 0.10.3 → 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-8ec81e88.mjs → index-7fbac48c.mjs} +7 -7
- package/dist/{index.es-d3d29322.mjs → index.es-4ad3b636.mjs} +1 -1
- package/dist/{lodop-4de1d1b7.mjs → lodop-f0ad7653.mjs} +2 -2
- package/dist/{rfid-d87396fc.mjs → rfid-1de0f7ca.mjs} +2 -2
- package/dist/style.css +1 -1
- package/dist/template-designer.es.js +1 -1
- package/dist/template-designer.umd.js +3 -3
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @vue/shared v3.5.20
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
|
-
**/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const CF=Object.prototype.hasOwnProperty,Xh=(t,e)=>CF.call(t,e),bc=t=>typeof t=="function",Ts=t=>typeof t=="string",em=t=>t!==null&&typeof t=="object";var EF=typeof global=="object"&&global&&global.Object===Object&&global;const UF=EF;var FF=typeof self=="object"&&self&&self.Object===Object&&self,NF=UF||FF||Function("return this")();const qh=NF;var SF=qh.Symbol;const Xi=SF;var tm=Object.prototype,QF=tm.hasOwnProperty,TF=tm.toString,xs=Xi?Xi.toStringTag:void 0;function xF(t){var e=QF.call(t,xs),A=t[xs];try{t[xs]=void 0;var r=!0}catch{}var n=TF.call(t);return r&&(e?t[xs]=A:delete t[xs]),n}var RF=Object.prototype,IF=RF.toString;function VF(t){return IF.call(t)}var MF="[object Null]",LF="[object Undefined]",Am=Xi?Xi.toStringTag:void 0;function rm(t){return t==null?t===void 0?LF:MF:Am&&Am in Object(t)?xF(t):VF(t)}function OF(t){return t!=null&&typeof t=="object"}var kF="[object Symbol]";function $h(t){return typeof t=="symbol"||OF(t)&&rm(t)==kF}function HF(t,e){for(var A=-1,r=t==null?0:t.length,n=Array(r);++A<r;)n[A]=e(t[A],A,t);return n}var DF=Array.isArray;const ed=DF;var PF=1/0,nm=Xi?Xi.prototype:void 0,am=nm?nm.toString:void 0;function im(t){if(typeof t=="string")return t;if(ed(t))return HF(t,im)+"";if($h(t))return am?am.call(t):"";var e=t+"";return e=="0"&&1/t==-PF?"-0":e}function om(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var WF="[object AsyncFunction]",_F="[object Function]",ZF="[object GeneratorFunction]",jF="[object Proxy]";function JF(t){if(!om(t))return!1;var e=rm(t);return e==_F||e==ZF||e==WF||e==jF}var KF=qh["__core-js_shared__"];const td=KF;var sm=function(){var t=/[^.]+$/.exec(td&&td.keys&&td.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function GF(t){return!!sm&&sm in t}var zF=Function.prototype,YF=zF.toString;function XF(t){if(t!=null){try{return YF.call(t)}catch{}try{return t+""}catch{}}return""}var qF=/[\\^$.*+?()[\]{}|]/g,$F=/^\[object .+?Constructor\]$/,e4=Function.prototype,t4=Object.prototype,A4=e4.toString,r4=t4.hasOwnProperty,n4=RegExp("^"+A4.call(r4).replace(qF,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function a4(t){if(!om(t)||GF(t))return!1;var e=JF(t)?n4:$F;return e.test(XF(t))}function i4(t,e){return t==null?void 0:t[e]}function lm(t,e){var A=i4(t,e);return a4(A)?A:void 0}function o4(t,e){return t===e||t!==t&&e!==e}var s4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l4=/^\w*$/;function c4(t,e){if(ed(t))return!1;var A=typeof t;return A=="number"||A=="symbol"||A=="boolean"||t==null||$h(t)?!0:l4.test(t)||!s4.test(t)||e!=null&&t in Object(e)}var u4=lm(Object,"create");const Rs=u4;function f4(){this.__data__=Rs?Rs(null):{},this.size=0}function h4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var d4="__lodash_hash_undefined__",p4=Object.prototype,g4=p4.hasOwnProperty;function m4(t){var e=this.__data__;if(Rs){var A=e[t];return A===d4?void 0:A}return g4.call(e,t)?e[t]:void 0}var v4=Object.prototype,B4=v4.hasOwnProperty;function w4(t){var e=this.__data__;return Rs?e[t]!==void 0:B4.call(e,t)}var y4="__lodash_hash_undefined__";function b4(t,e){var A=this.__data__;return this.size+=this.has(t)?0:1,A[t]=Rs&&e===void 0?y4:e,this}function ni(t){var e=-1,A=t==null?0:t.length;for(this.clear();++e<A;){var r=t[e];this.set(r[0],r[1])}}ni.prototype.clear=f4,ni.prototype.delete=h4,ni.prototype.get=m4,ni.prototype.has=w4,ni.prototype.set=b4;function C4(){this.__data__=[],this.size=0}function Cc(t,e){for(var A=t.length;A--;)if(o4(t[A][0],e))return A;return-1}var E4=Array.prototype,U4=E4.splice;function F4(t){var e=this.__data__,A=Cc(e,t);if(A<0)return!1;var r=e.length-1;return A==r?e.pop():U4.call(e,A,1),--this.size,!0}function N4(t){var e=this.__data__,A=Cc(e,t);return A<0?void 0:e[A][1]}function S4(t){return Cc(this.__data__,t)>-1}function Q4(t,e){var A=this.__data__,r=Cc(A,t);return r<0?(++this.size,A.push([t,e])):A[r][1]=e,this}function qi(t){var e=-1,A=t==null?0:t.length;for(this.clear();++e<A;){var r=t[e];this.set(r[0],r[1])}}qi.prototype.clear=C4,qi.prototype.delete=F4,qi.prototype.get=N4,qi.prototype.has=S4,qi.prototype.set=Q4;var T4=lm(qh,"Map");const x4=T4;function R4(){this.size=0,this.__data__={hash:new ni,map:new(x4||qi),string:new ni}}function I4(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Ec(t,e){var A=t.__data__;return I4(e)?A[typeof e=="string"?"string":"hash"]:A.map}function V4(t){var e=Ec(this,t).delete(t);return this.size-=e?1:0,e}function M4(t){return Ec(this,t).get(t)}function L4(t){return Ec(this,t).has(t)}function O4(t,e){var A=Ec(this,t),r=A.size;return A.set(t,e),this.size+=A.size==r?0:1,this}function ai(t){var e=-1,A=t==null?0:t.length;for(this.clear();++e<A;){var r=t[e];this.set(r[0],r[1])}}ai.prototype.clear=R4,ai.prototype.delete=V4,ai.prototype.get=M4,ai.prototype.has=L4,ai.prototype.set=O4;var k4="Expected a function";function Ad(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(k4);var A=function(){var r=arguments,n=e?e.apply(this,r):r[0],a=A.cache;if(a.has(n))return a.get(n);var i=t.apply(this,r);return A.cache=a.set(n,i)||a,i};return A.cache=new(Ad.Cache||ai),A}Ad.Cache=ai;var H4=500;function D4(t){var e=Ad(t,function(r){return A.size===H4&&A.clear(),r}),A=e.cache;return e}var P4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W4=/\\(\\)?/g,_4=D4(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(P4,function(A,r,n,a){e.push(n?a.replace(W4,"$1"):r||A)}),e});const Z4=_4;function j4(t){return t==null?"":im(t)}function J4(t,e){return ed(t)?t:c4(t,e)?[t]:Z4(j4(t))}var K4=1/0;function G4(t){if(typeof t=="string"||$h(t))return t;var e=t+"";return e=="0"&&1/t==-K4?"-0":e}function z4(t,e){e=J4(e,t);for(var A=0,r=e.length;t!=null&&A<r;)t=t[G4(e[A++])];return A&&A==r?t:void 0}function Y4(t,e,A){var r=t==null?void 0:z4(t,e);return r===void 0?A:r}function X4(t){for(var e=-1,A=t==null?0:t.length,r={};++e<A;){var n=t[e];r[n[0]]=n[1]}return r}const q4=t=>t===void 0,rd=t=>typeof t=="boolean",ii=t=>typeof t=="number",$4=t=>typeof Element>"u"?!1:t instanceof Element,eN=t=>Ts(t)?!Number.isNaN(Number(t)):!1;var cm;const $i=typeof window<"u",tN=t=>typeof t=="string",AN=()=>{};$i&&((cm=window==null?void 0:window.navigator)!=null&&cm.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function nd(t){return typeof t=="function"?t():f.unref(t)}function rN(t){return t}function ad(t){return f.getCurrentScope()?(f.onScopeDispose(t),!0):!1}function nN(t,e=!0){f.getCurrentInstance()?f.onMounted(t):e?t():f.nextTick(t)}function aN(t,e,A={}){const{immediate:r=!0}=A,n=f.ref(!1);let a=null;function i(){a&&(clearTimeout(a),a=null)}function o(){n.value=!1,i()}function s(...l){i(),n.value=!0,a=setTimeout(()=>{n.value=!1,a=null,t(...l)},nd(e))}return r&&(n.value=!0,$i&&s()),ad(o),{isPending:f.readonly(n),start:s,stop:o}}function um(t){var e;const A=nd(t);return(e=A==null?void 0:A.$el)!=null?e:A}const fm=$i?window:void 0;function iN(...t){let e,A,r,n;if(tN(t[0])||Array.isArray(t[0])?([A,r,n]=t,e=fm):[e,A,r,n]=t,!e)return AN;Array.isArray(A)||(A=[A]),Array.isArray(r)||(r=[r]);const a=[],i=()=>{a.forEach(u=>u()),a.length=0},o=(u,d,g,h)=>(u.addEventListener(d,g,h),()=>u.removeEventListener(d,g,h)),s=f.watch(()=>[um(e),nd(n)],([u,d])=>{i(),u&&a.push(...A.flatMap(g=>r.map(h=>o(u,g,h,d))))},{immediate:!0,flush:"post"}),l=()=>{s(),i()};return ad(l),l}function oN(t,e=!1){const A=f.ref(),r=()=>A.value=!!t();return r(),nN(r,e),A}const hm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},dm="__vueuse_ssr_handlers__";hm[dm]=hm[dm]||{};var pm=Object.getOwnPropertySymbols,sN=Object.prototype.hasOwnProperty,lN=Object.prototype.propertyIsEnumerable,cN=(t,e)=>{var A={};for(var r in t)sN.call(t,r)&&e.indexOf(r)<0&&(A[r]=t[r]);if(t!=null&&pm)for(var r of pm(t))e.indexOf(r)<0&&lN.call(t,r)&&(A[r]=t[r]);return A};function uN(t,e,A={}){const r=A,{window:n=fm}=r,a=cN(r,["window"]);let i;const o=oN(()=>n&&"ResizeObserver"in n),s=()=>{i&&(i.disconnect(),i=void 0)},l=f.watch(()=>um(t),d=>{s(),o.value&&n&&d&&(i=new ResizeObserver(e),i.observe(d,a))},{immediate:!0,flush:"post"}),u=()=>{s(),l()};return ad(u),{isSupported:o,stop:u}}var gm;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(gm||(gm={}));var fN=Object.defineProperty,mm=Object.getOwnPropertySymbols,hN=Object.prototype.hasOwnProperty,dN=Object.prototype.propertyIsEnumerable,vm=(t,e,A)=>e in t?fN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:A}):t[e]=A,pN=(t,e)=>{for(var A in e||(e={}))hN.call(e,A)&&vm(t,A,e[A]);if(mm)for(var A of mm(e))dN.call(e,A)&&vm(t,A,e[A]);return t};pN({linear:rN},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Bm={current:0},wm=f.ref(0),ym=2e3,bm=Symbol("elZIndexContextKey"),Cm=Symbol("zIndexContextKey"),gN=t=>{const e=f.getCurrentInstance()?f.inject(bm,Bm):Bm,A=t||(f.getCurrentInstance()?f.inject(Cm,void 0):void 0),r=f.computed(()=>{const i=f.unref(A);return ii(i)?i:ym}),n=f.computed(()=>r.value+wm.value),a=()=>(e.current++,wm.value=e.current,n.value);return!$i&&f.inject(bm),{initialZIndex:r,currentZIndex:n,nextZIndex:a}};var mN={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const vN=t=>(e,A)=>BN(e,A,f.unref(t)),BN=(t,e,A)=>Y4(A,t,t).replace(/\{(\w+)\}/g,(r,n)=>{var a;return`${(a=e==null?void 0:e[n])!=null?a:`{${n}}`}`}),wN=t=>{const e=f.computed(()=>f.unref(t).name),A=f.isRef(t)?t:f.ref(t);return{lang:e,locale:A,t:vN(t)}},Em=Symbol("localeContextKey"),yN=t=>{const e=t||f.inject(Em,f.ref());return wN(f.computed(()=>e.value||mN))},Um="__epPropKey",Fr=t=>t,bN=t=>em(t)&&!!t[Um],Fm=(t,e)=>{if(!em(t)||bN(t))return t;const{values:A,required:r,default:n,type:a,validator:i}=t,s={type:a,required:!!r,validator:A||i?l=>{let u=!1,d=[];if(A&&(d=Array.from(A),Xh(t,"default")&&d.push(n),u||(u=d.includes(l))),i&&(u||(u=i(l))),!u&&d.length>0){const g=[...new Set(d)].map(h=>JSON.stringify(h)).join(", ");f.warn(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${g}], got value ${JSON.stringify(l)}.`)}return u}:void 0,[Um]:!0};return Xh(t,"default")&&(s.default=n),s},Is=t=>X4(Object.entries(t).map(([e,A])=>[e,Fm(A,e)])),CN=Fm({type:String,values:["","default","small","large"],required:!1}),EN=Symbol("size"),UN=Symbol("emptyValuesContextKey"),FN=Is({emptyValues:Array,valueOnClear:{type:Fr([String,Number,Boolean,Function]),default:void 0,validator:t=>bc(t)?!t():!t}}),Nm=t=>Object.keys(t),Uc=f.ref();function Sm(t,e=void 0){const A=f.getCurrentInstance()?f.inject(q2,Uc):Uc;return t?f.computed(()=>{var r,n;return(n=(r=A.value)==null?void 0:r[t])!=null?n:e}):A}function NN(t,e){const A=Sm(),r=Yh(t,f.computed(()=>{var o;return((o=A.value)==null?void 0:o.namespace)||yc})),n=yN(f.computed(()=>{var o;return(o=A.value)==null?void 0:o.locale})),a=gN(f.computed(()=>{var o;return((o=A.value)==null?void 0:o.zIndex)||ym})),i=f.computed(()=>{var o;return f.unref(e)||((o=A.value)==null?void 0:o.size)||""});return Qm(f.computed(()=>f.unref(A)||{})),{ns:r,locale:n,zIndex:a,size:i}}const Qm=(t,e,A=!1)=>{var r;const n=!!f.getCurrentInstance(),a=n?Sm():void 0,i=(r=e==null?void 0:e.provide)!=null?r:n?f.provide:void 0;if(!i)return;const o=f.computed(()=>{const s=f.unref(t);return a!=null&&a.value?SN(a.value,s):s});return i(q2,o),i(Em,f.computed(()=>o.value.locale)),i($2,f.computed(()=>o.value.namespace)),i(Cm,f.computed(()=>o.value.zIndex)),i(EN,{size:f.computed(()=>o.value.size||"")}),i(UN,f.computed(()=>({emptyValues:o.value.emptyValues,valueOnClear:o.value.valueOnClear}))),(A||!Uc.value)&&(Uc.value=o.value),o},SN=(t,e)=>{const A=[...new Set([...Nm(t),...Nm(e)])],r={};for(const n of A)r[n]=e[n]!==void 0?e[n]:t[n];return r};var id=(t,e)=>{const A=t.__vccOpts||t;for(const[r,n]of e)A[r]=n;return A};function od(t,e="px"){if(!t)return"";if(ii(t)||eN(t))return`${t}${e}`;if(Ts(t))return t}function Mq(t,e){}const Tm=(t,e)=>{if(t.install=A=>{for(const r of[t,...Object.values(e??{})])A.component(r.name,r)},e)for(const[A,r]of Object.entries(e))t[A]=r;return t},QN=(t,e)=>(t.install=A=>{t._context=A._context,A.config.globalProperties[e]=t},t),TN=Is({size:{type:Fr([Number,String])},color:{type:String}}),xN=f.defineComponent({name:"ElIcon",inheritAttrs:!1}),RN=f.defineComponent({...xN,props:TN,setup(t){const e=t,A=Yh("icon"),r=f.computed(()=>{const{size:n,color:a}=e;return!n&&!a?{}:{fontSize:q4(n)?void 0:od(n),"--color":a}});return(n,a)=>(f.openBlock(),f.createElementBlock("i",f.mergeProps({class:f.unref(A).b(),style:f.unref(r)},n.$attrs),[f.renderSlot(n.$slots,"default")],16))}});var IN=id(RN,[["__file","icon.vue"]]);const xm=Tm(IN);/*! Element Plus Icons Vue v2.3.2 */var VN=f.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,A)=>(f.openBlock(),f.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Rm=VN,MN=f.defineComponent({name:"Close",__name:"close",setup(t){return(e,A)=>(f.openBlock(),f.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),LN=MN,ON=f.defineComponent({name:"InfoFilled",__name:"info-filled",setup(t){return(e,A)=>(f.openBlock(),f.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),sd=ON,kN=f.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,A)=>(f.openBlock(),f.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Im=kN,HN=f.defineComponent({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,A)=>(f.openBlock(),f.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),Vm=HN;const DN=Fr([String,Object,Function]),PN={Close:LN,SuccessFilled:Im,InfoFilled:sd,WarningFilled:Vm,CircleCloseFilled:Rm},Mm={primary:sd,success:Im,warning:Vm,error:Rm,info:sd},WN=t=>t,_N={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},ZN=Is({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:Fr([String,Object,Array])},offset:{type:Fr(Array),default:[0,0]},badgeClass:{type:String}}),jN=f.defineComponent({name:"ElBadge"}),JN=f.defineComponent({...jN,props:ZN,setup(t,{expose:e}){const A=t,r=Yh("badge"),n=f.computed(()=>A.isDot?"":ii(A.value)&&ii(A.max)?A.max<A.value?`${A.max}+`:`${A.value}`:`${A.value}`),a=f.computed(()=>{var i,o,s,l,u;return[{backgroundColor:A.color,marginRight:od(-((o=(i=A.offset)==null?void 0:i[0])!=null?o:0)),marginTop:od((l=(s=A.offset)==null?void 0:s[1])!=null?l:0)},(u=A.badgeStyle)!=null?u:{}]});return e({content:n}),(i,o)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(r).b())},[f.renderSlot(i.$slots,"default"),f.createVNode(f.Transition,{name:`${f.unref(r).namespace.value}-zoom-in-center`,persisted:""},{default:f.withCtx(()=>[f.withDirectives(f.createElementVNode("sup",{class:f.normalizeClass([f.unref(r).e("content"),f.unref(r).em("content",i.type),f.unref(r).is("fixed",!!i.$slots.default),f.unref(r).is("dot",i.isDot),f.unref(r).is("hide-zero",!i.showZero&&A.value===0),i.badgeClass]),style:f.normalizeStyle(f.unref(a))},[f.renderSlot(i.$slots,"content",{value:f.unref(n)},()=>[f.createTextVNode(f.toDisplayString(f.unref(n)),1)])],6),[[f.vShow,!i.hidden&&(f.unref(n)||i.isDot||i.$slots.content)]])]),_:3},8,["name"])],2))}});var KN=id(JN,[["__file","badge.vue"]]);const GN=Tm(KN);var eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ld(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}const zN=Is({a11y:{type:Boolean,default:!0},locale:{type:Fr(Object)},size:CN,button:{type:Fr(Object)},card:{type:Fr(Object)},dialog:{type:Fr(Object)},link:{type:Fr(Object)},experimentalFeatures:{type:Fr(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:Fr(Object)},zIndex:Number,namespace:{type:String,default:"el"},...FN}),nr={placement:"top"};f.defineComponent({name:"ElConfigProvider",props:zN,setup(t,{slots:e}){const A=Qm(t);return f.watch(()=>t.message,r=>{var n,a;Object.assign(nr,(a=(n=A==null?void 0:A.value)==null?void 0:n.message)!=null?a:{},r??{})},{immediate:!0,deep:!0}),()=>f.renderSlot(e,"default",{config:A==null?void 0:A.value})}});const Lm=["primary","success","info","warning","error"],Om=["top","top-left","top-right","bottom","bottom-left","bottom-right"],to="top",ar=WN({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:$i?document.body:void 0}),YN=Is({customClass:{type:String,default:ar.customClass},dangerouslyUseHTMLString:{type:Boolean,default:ar.dangerouslyUseHTMLString},duration:{type:Number,default:ar.duration},icon:{type:DN,default:ar.icon},id:{type:String,default:ar.id},message:{type:Fr([String,Object,Function]),default:ar.message},onClose:{type:Fr(Function),default:ar.onClose},showClose:{type:Boolean,default:ar.showClose},type:{type:String,values:Lm,default:ar.type},plain:{type:Boolean,default:ar.plain},offset:{type:Number,default:ar.offset},placement:{type:String,values:Om,default:ar.placement},zIndex:{type:Number,default:ar.zIndex},grouping:{type:Boolean,default:ar.grouping},repeatNum:{type:Number,default:ar.repeatNum}}),XN={destroy:()=>!0},fn=f.shallowReactive({}),qN=t=>(fn[t]||(fn[t]=f.shallowReactive([])),fn[t]),$N=(t,e)=>{const A=fn[e]||[],r=A.findIndex(i=>i.id===t),n=A[r];let a;return r>0&&(a=A[r-1]),{current:n,prev:a}},e3=(t,e)=>{const{prev:A}=$N(t,e);return A?A.vm.exposed.bottom.value:0},t3=(t,e,A)=>(fn[A]||[]).findIndex(a=>a.id===t)>0?16:e,A3=f.defineComponent({name:"ElMessage"}),r3=f.defineComponent({...A3,props:YN,emits:XN,setup(t,{expose:e,emit:A}){const r=t,{Close:n}=PN,a=f.ref(!1),{ns:i,zIndex:o}=NN("message"),{currentZIndex:s,nextZIndex:l}=o,u=f.ref(),d=f.ref(!1),g=f.ref(0);let h;const w=f.computed(()=>r.type?r.type==="error"?"danger":r.type:"info"),B=f.computed(()=>{const E=r.type;return{[i.bm("icon",E)]:E&&Mm[E]}}),C=f.computed(()=>r.icon||Mm[r.type]||""),v=f.computed(()=>r.placement||to),y=f.computed(()=>e3(r.id,v.value)),F=f.computed(()=>t3(r.id,r.offset,v.value)+y.value),Q=f.computed(()=>g.value+F.value),M=f.computed(()=>v.value.includes("left")?i.is("left"):v.value.includes("right")?i.is("right"):i.is("center")),L=f.computed(()=>v.value.startsWith("top")?"top":"bottom"),V=f.computed(()=>({[L.value]:`${F.value}px`,zIndex:s.value}));function k(){r.duration!==0&&({stop:h}=aN(()=>{T()},r.duration))}function W(){h==null||h()}function T(){d.value=!1,f.nextTick(()=>{var E;a.value||((E=r.onClose)==null||E.call(r),A("destroy"))})}function N({code:E}){E===_N.esc&&T()}return f.onMounted(()=>{k(),l(),d.value=!0}),f.watch(()=>r.repeatNum,()=>{W(),k()}),iN(document,"keydown",N),uN(u,()=>{g.value=u.value.getBoundingClientRect().height}),e({visible:d,bottom:Q,close:T}),(E,x)=>(f.openBlock(),f.createBlock(f.Transition,{name:f.unref(i).b("fade"),onBeforeEnter:O=>a.value=!0,onBeforeLeave:E.onClose,onAfterLeave:O=>E.$emit("destroy"),persisted:""},{default:f.withCtx(()=>[f.withDirectives(f.createElementVNode("div",{id:E.id,ref_key:"messageRef",ref:u,class:f.normalizeClass([f.unref(i).b(),{[f.unref(i).m(E.type)]:E.type},f.unref(i).is("closable",E.showClose),f.unref(i).is("plain",E.plain),f.unref(i).is("bottom",f.unref(L)==="bottom"),f.unref(M),E.customClass]),style:f.normalizeStyle(f.unref(V)),role:"alert",onMouseenter:W,onMouseleave:k},[E.repeatNum>1?(f.openBlock(),f.createBlock(f.unref(GN),{key:0,value:E.repeatNum,type:f.unref(w),class:f.normalizeClass(f.unref(i).e("badge"))},null,8,["value","type","class"])):f.createCommentVNode("v-if",!0),f.unref(C)?(f.openBlock(),f.createBlock(f.unref(xm),{key:1,class:f.normalizeClass([f.unref(i).e("icon"),f.unref(B)])},{default:f.withCtx(()=>[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.unref(C))))]),_:1},8,["class"])):f.createCommentVNode("v-if",!0),f.renderSlot(E.$slots,"default",{},()=>[E.dangerouslyUseHTMLString?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),f.createElementVNode("p",{class:f.normalizeClass(f.unref(i).e("content")),innerHTML:E.message},null,10,["innerHTML"])],2112)):(f.openBlock(),f.createElementBlock("p",{key:0,class:f.normalizeClass(f.unref(i).e("content"))},f.toDisplayString(E.message),3))]),E.showClose?(f.openBlock(),f.createBlock(f.unref(xm),{key:2,class:f.normalizeClass(f.unref(i).e("closeBtn")),onClick:f.withModifiers(T,["stop"])},{default:f.withCtx(()=>[f.createVNode(f.unref(n))]),_:1},8,["class","onClick"])):f.createCommentVNode("v-if",!0)],46,["id"]),[[f.vShow,d.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}});var n3=id(r3,[["__file","message.vue"]]);let a3=1;const i3=t=>{if(!t.appendTo)t.appendTo=document.body;else if(Ts(t.appendTo)){let A=document.querySelector(t.appendTo);$4(A)||(A=document.body),t.appendTo=A}},o3=t=>{!t.placement&&Ts(nr.placement)&&nr.placement&&(t.placement=nr.placement),t.placement||(t.placement=to),Om.includes(t.placement)||(`${t.placement}${to}`,t.placement=to)},km=t=>{const e=!t||Ts(t)||f.isVNode(t)||bc(t)?{message:t}:t,A={...ar,...e};return i3(A),o3(A),rd(nr.grouping)&&!A.grouping&&(A.grouping=nr.grouping),ii(nr.duration)&&A.duration===3e3&&(A.duration=nr.duration),ii(nr.offset)&&A.offset===16&&(A.offset=nr.offset),rd(nr.showClose)&&!A.showClose&&(A.showClose=nr.showClose),rd(nr.plain)&&!A.plain&&(A.plain=nr.plain),A},s3=t=>{const e=t.props.placement||to,A=fn[e],r=A.indexOf(t);if(r===-1)return;A.splice(r,1);const{handler:n}=t;n.close()},l3=({appendTo:t,...e},A)=>{const r=`message_${a3++}`,n=e.onClose,a=document.createElement("div"),i={...e,id:r,onClose:()=>{n==null||n(),s3(u)},onDestroy:()=>{f.render(null,a)}},o=f.createVNode(n3,i,bc(i.message)||f.isVNode(i.message)?{default:bc(i.message)?i.message:()=>i.message}:null);o.appContext=A||oi._context,f.render(o,a),t.appendChild(a.firstElementChild);const s=o.component,u={id:r,vnode:o,vm:s,handler:{close:()=>{s.exposed.close()}},props:o.component.props};return u},oi=(t={},e)=>{if(!$i)return{close:()=>{}};const A=km(t),r=qN(A.placement||to);if(A.grouping&&r.length){const a=r.find(({vnode:i})=>{var o;return((o=i.props)==null?void 0:o.message)===A.message});if(a)return a.props.repeatNum+=1,a.props.type=A.type,a.handler}if(ii(nr.max)&&r.length>=nr.max)return{close:()=>{}};const n=l3(A,e);return r.push(n),n.handler};Lm.forEach(t=>{oi[t]=(e={},A)=>{const r=km(e);return oi({...r,type:t},A)}});function c3(t){for(const e in fn)if(Xh(fn,e)){const A=[...fn[e]];for(const r of A)(!t||t===r.props.type)&&r.handler.close()}}function u3(t){if(!fn[t])return;[...fn[t]].forEach(A=>A.handler.close())}oi.closeAll=c3,oi.closeAllByPlacement=u3,oi._context=null;const Vs=QN(oi,"$message"),Lq="",jA=(t,e)=>{const A=t.__vccOpts||t;for(const[r,n]of e)A[r]=n;return A},f3={class:"property-item"},h3={key:0,class:"label"},d3=["innerHTML"],p3={key:4,class:"file-input-container"},g3=["disabled"],m3={key:1},v3=["accept"],B3=["type","min","max","step"],cd=jA({__name:"PropertyItem",props:{label:String,modelValue:[String,Number,Boolean],type:{type:String,default:"text"},options:{type:Array,default:()=>[]},min:Number,max:Number,step:Number,accept:String,desc:String,multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change","rotationChange"],setup(t,{emit:e}){const A=t,r=e,n=f.ref(null),a=f.ref(!1),i=f.ref(null),o=f.ref(null),s=f.inject("config",{}),l=(v="")=>{var y,F;return((F=(y=A.options)==null?void 0:y.find(Q=>(Q==null?void 0:Q.value)==v))==null?void 0:F.value)??" "},u=f.computed({get:()=>{const v=A.modelValue;if(A.type==="select"){if(!A.multiple)return l(v);if(typeof v=="string"){let y=l(v);return y=y&&y.trim()?[y]:[],y}return Array.isArray(v)?v.map(F=>l(F)):[]}return v},set:v=>{A.type==="select"&&A.multiple?Array.isArray(v)&&v.length===1?r("update:modelValue",v[0]):Array.isArray(v)&&v.length>1?r("update:modelValue",v):r("update:modelValue",""):r("update:modelValue",v)}}),d=v=>{r("change",v),A.label==="旋转角度"&&typeof v=="number"&&r("rotationChange",v)},g=f.computed({get:()=>u.value?typeof u.value=="object"&&u.value.fileSrc?u.value.fileSrc.startsWith("http://")||u.value.fileSrc.startsWith("https://")?u.value.fileSrc:u.value.fileSrc.startsWith("data:")?u.value.fileName||"已选择的图片":u.value.fileName||u.value.fileSrc:typeof u.value=="string"&&u.value.startsWith("data:")?"已选择的图片":u.value:"",set:v=>{u.value=v}}),h=()=>{n.value&&!a.value&&n.value.click()},w=v=>{const y=v.target.value.trim();y?y.startsWith("http://")||y.startsWith("https://")||y.startsWith("data:")?u.value=y:y.startsWith("data:")||(u.value=y):u.value=""},B=async v=>{var M;const y=v.target.files[0];if(!y)return;if(A.accept&&!y.type.match(A.accept.replace("*",".*"))){alert("请选择正确的文件类型");return}const F=(M=s==null?void 0:s.image)==null?void 0:M.request;if(!F||typeof F!="function"){handleFileAsBase64(y);return}o.value=y;let Q=null;try{a.value=!0,Q=F(y),i.value=Q;const L=await Q;if(i.value===Q&&o.value===y)if(L&&L.success!==!1){let k=L.url||L.data||L;try{const T=await C(y);T&&(k=T)}catch{}const W={fileName:y.name,fileSrc:k,uploadResult:L};r("update:modelValue",W),r("change",v),Vs.success("图片上传成功")}else throw new Error((L==null?void 0:L.message)||"上传失败")}catch(L){i.value===Q&&o.value===y&&(n.value&&(n.value.value=""),Vs.error(L.message||"上传失败,请重试"))}finally{i.value===Q&&(a.value=!1,i.value=null,o.value=null)}},C=v=>new Promise((y,F)=>{const M=v.size>5242880;if(v.type.startsWith("image/"))if(M){const L=new Image,V=document.createElement("canvas"),k=V.getContext("2d"),W=setTimeout(()=>{F(new Error("转换超时"))},8e3);L.onload=()=>{clearTimeout(W);try{let{width:E,height:x}=L;if(E>1920||x>1920){const j=Math.min(1920/E,1920/x);E=Math.floor(E*j),x=Math.floor(x*j)}V.width=E,V.height=x,k.drawImage(L,0,0,E,x);const O=V.toDataURL("image/jpeg",.8);y(O)}catch(N){F(N)}finally{URL.revokeObjectURL(L.src)}},L.onerror=()=>{clearTimeout(W),F(new Error("图片加载失败"))};const T=URL.createObjectURL(v);L.src=T}else{const L=new FileReader,V=setTimeout(()=>{F(new Error("转换超时"))},5e3);L.onload=k=>{clearTimeout(V),y(k.target.result)},L.onerror=()=>{clearTimeout(V),F(new Error("文件读取失败"))},L.readAsDataURL(v)}else{const L=new FileReader,V=setTimeout(()=>{F(new Error("转换超时"))},5e3);L.onload=k=>{clearTimeout(V),y(k.target.result)},L.onerror=()=>{clearTimeout(V),F(new Error("文件读取失败"))},L.readAsDataURL(v)}});return f.onUnmounted(()=>{i.value=null,o.value=null}),(v,y)=>{const F=f.resolveComponent("el-icon-question-filled"),Q=f.resolveComponent("el-icon"),M=f.resolveComponent("el-tooltip"),L=f.resolveComponent("el-option"),V=f.resolveComponent("el-select"),k=f.resolveComponent("el-icon-loading");return f.openBlock(),f.createElementBlock("div",f3,[t.label?(f.openBlock(),f.createElementBlock("label",h3,[f.createTextVNode(f.toDisplayString(t.label)+" ",1),t.desc?(f.openBlock(),f.createBlock(M,{key:0,placement:"top","show-arrow":!0},{content:f.withCtx(()=>[f.createElementVNode("p",{style:{"max-width":"260px",margin:"0","white-space":"pre-line"},innerHTML:t.desc},null,8,d3)]),default:f.withCtx(()=>[f.createVNode(Q,{class:"help-icon"},{default:f.withCtx(()=>[f.createVNode(F)]),_:1})]),_:1})):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0),t.type==="select"?(f.openBlock(),f.createBlock(V,{key:1,modelValue:u.value,"onUpdate:modelValue":y[0]||(y[0]=W=>u.value=W),multiple:t.multiple,placeholder:"请选择",style:{width:"100%"},size:"small",filterable:"",onChange:d},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.options,W=>(f.openBlock(),f.createBlock(L,{key:W.value,label:W.label,value:W.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):t.type==="color"?f.withDirectives((f.openBlock(),f.createElementBlock("input",{key:2,"onUpdate:modelValue":y[1]||(y[1]=W=>u.value=W),type:"color"},null,512)),[[f.vModelText,u.value]]):t.type==="checkbox"?f.withDirectives((f.openBlock(),f.createElementBlock("input",{key:3,"onUpdate:modelValue":y[2]||(y[2]=W=>u.value=W),type:"checkbox"},null,512)),[[f.vModelCheckbox,u.value]]):t.type==="file"?(f.openBlock(),f.createElementBlock("div",p3,[f.withDirectives(f.createElementVNode("input",{type:"text","onUpdate:modelValue":y[3]||(y[3]=W=>g.value=W),placeholder:"请选择图片",class:"file-url-input",onInput:w,disabled:""},null,544),[[f.vModelText,g.value]]),f.createElementVNode("button",{type:"button",onClick:h,class:"file-select-btn",disabled:a.value},[a.value?(f.openBlock(),f.createBlock(Q,{key:0,class:"is-loading"},{default:f.withCtx(()=>[f.createVNode(k)]),_:1})):(f.openBlock(),f.createElementBlock("span",m3,f.toDisplayString(a.value?"上传中...":"选择"),1))],8,g3),f.createElementVNode("input",{type:"file",accept:t.accept,onChange:B,ref_key:"fileInput",ref:n,class:"file-input"},null,40,v3)])):f.withDirectives((f.openBlock(),f.createElementBlock("input",{key:5,"onUpdate:modelValue":y[4]||(y[4]=W=>u.value=W),type:t.type,min:t.min,max:t.max,step:t.step,onWheel:y[5]||(y[5]=f.withModifiers(()=>{},["prevent"]))},null,40,B3)),[[f.vModelDynamic,u.value]])])}}},[["__scopeId","data-v-16072986"]]),kq="",w3={class:"property-layout-container"},y3={key:0,class:"property-item-wrapper full-width"},b3={key:1,class:"property-item-wrapper half-width"},C3={key:2,class:"property-item-wrapper default-width"},Ao=jA({__name:"BasePropertyPanel",props:{modelValue:{type:Object,required:!0},propsConfig:{type:Object,default:()=>({})},panelType:{type:String,default:"base",validator:t=>["text","barcode","qrcode","image","rectangle","line"].includes(t)},options:{type:Object,default:()=>({})}},emits:["update:modelValue","rotationChange"],setup(t,{emit:e}){const A=t,r=e,{propsConfig:n,panelType:a}=f.toRefs(A),i=f.computed(()=>`${a.value}-property-panel`),o=f.ref([]);function s(T,N,E=[],x="",O="FieldName"){const j=[];if(Array.isArray(N))return N.forEach(G=>{const Y=s(T,G,E,x,O);j.push(...Y)}),j;if(T&&T.propertyPanel){const G=T.propertyPanel;let Y=[];Array.isArray(G)?Y=G.map(K=>({...K,_dynamic:!0,_path:x||"FieldName",_parentProp:O})):typeof G=="object"&&G!==null&&(G.prop?Y=[{...G,_dynamic:!0,_path:x||"FieldName",_parentProp:O}]:Y=Object.keys(G).map(K=>({prop:K,...G[K],_dynamic:!0,_path:x||"FieldName",_parentProp:O}))),j.push(...Y)}return j}function l(T,N,E=[],x=""){const O=[];if(!N||N===" "||!E||E.length===0)return O;const j=E.find(G=>G.value==N);if(j&&j.propertyPanel){const G=j.propertyPanel;let Y=[];Array.isArray(G)?Y=G.map(K=>({...K,_dynamic:!0,_path:`${x||T}.${N}`,_parentProp:T})):typeof G=="object"&&G!==null&&(G.prop?Y=[{...G,_dynamic:!0,_path:`${x||T}.${N}`,_parentProp:T}]:Y=Object.keys(G).map(K=>({prop:K,...G[K],_dynamic:!0,_path:`${x||T}.${N}`,_parentProp:T}))),O.push(...Y)}return O}function u(T){var N;return T.options&&Array.isArray(T.options)?T.options:T.optionsKey&&((N=A.options)!=null&&N[T.optionsKey])?A.options[T.optionsKey]||[]:[]}function d(T,N=[],E=new Set,x=0){var Y;if(x>10)return[];const O=[],j=new Set;if(x===0){const K=T.FieldName;if(K){const q=((Y=A.options)==null?void 0:Y.fields)||[];if(Array.isArray(K))K.forEach(ee=>{const ie=q.find(S=>S.value==ee);if(ie){const S=`FieldName.${ee}`;E.has(S)||(E.add(S),s(ie,ee,q,S).forEach(z=>{z.prop&&!j.has(z.prop)&&(j.add(z.prop),O.push(z))}))}});else{const ee=q.find(ie=>ie.value==K);if(ee){const ie=`FieldName.${K}`;E.has(ie)||(E.add(ie),s(ee,K,q,ie).forEach(H=>{H.prop&&!j.has(H.prop)&&(j.add(H.prop),O.push(H))}))}}}}return N.forEach(K=>{if(K.type==="select"){const q=T[K.prop];if(q!=null&&q!==""&&q!==" "){const ee=u(K);if(ee&&ee.length>0){const ie=K.prop,S=`${ie}.${q}`;if(!E.has(S)){E.add(S);const H=l(K.prop,q,ee,ie);H.length>0&&(H.forEach(Z=>{Z.prop&&!j.has(Z.prop)&&(j.add(Z.prop),O.push(Z))}),d(T,[...N,...O],E,x+1).forEach(Z=>{Z.prop&&!j.has(Z.prop)&&(j.add(Z.prop),O.push(Z))}))}}}}}),[...O].forEach(K=>{if(K.type==="select"){const q=T[K.prop];if(q!=null&&q!==""&&q!==" "){const ee=u(K);if(ee&&ee.length>0){const ie=K._path||K.prop,S=`${ie}.${q}`;if(!E.has(S)){E.add(S);const H=l(K.prop,q,ee,ie);H.length>0&&(H.forEach(Z=>{Z.prop&&!j.has(Z.prop)&&(j.add(Z.prop),O.push(Z))}),d(T,[...N,...O],E,x+1).forEach(Z=>{Z.prop&&!j.has(Z.prop)&&(j.add(Z.prop),O.push(Z))}))}}}}}),O}const g=f.computed(()=>{const T=n.value.propertyPanel;let N=[];return T&&typeof T=="object"&&!Array.isArray(T)&&(N=Object.keys(T).map(E=>({prop:E,...T[E]})).filter(E=>!E.hide)),Array.isArray(T)&&(N=T.filter(E=>!E.hide)||[]),N}),h=f.ref([]),w=f.ref(""),B=f.ref(null),C=f.computed(()=>{const T=A.modelValue||{};let N="";if(T.FieldName!==void 0){const x=Array.isArray(T.FieldName)?T.FieldName.join(","):String(T.FieldName);N+=`FieldName:${x}|`}return g.value.filter(x=>x.type==="select").map(x=>x.prop).forEach(x=>{T[x]!==void 0&&(N+=`${x}:${T[x]}|`)}),o.value.length>0&&o.value.filter(O=>O.type==="select").map(O=>O.prop).forEach(O=>{T[O]!==void 0&&(N+=`${O}:${T[O]}|`)}),w.value===N&&B.value?B.value:(w.value=N,B.value=N,N)});f.watch(()=>[C.value,g.value],(T,N)=>{const[E,x]=T||[C.value,g.value],[O]=N||[void 0];if(O&&E===O)return;const j=A.modelValue||{},G=A.modelValue||{},K=d(j,x,new Set),q=new Set(K.map(Z=>Z.prop).filter(Boolean)),ee=new Set(h.value.map(Z=>Z.prop).filter(Boolean)),ie=[];ee.forEach(Z=>{q.has(Z)||ie.push(Z)});const S=[];K.forEach(Z=>{Z.prop&&"default"in Z&&j[Z.prop]===void 0&&S.push({prop:Z.prop,defaultValue:Z.default})});const H={...j};let z=!1;ie.length>0&&G&&ie.forEach(Z=>{H[Z]!==void 0&&(delete H[Z],z=!0)}),S.length>0&&S.forEach(({prop:Z,defaultValue:re})=>{H[Z]=re,z=!0}),z&&f.nextTick(()=>{r("update:modelValue",H)}),h.value=K,o.value=K},{deep:!0,immediate:!0});const v=f.ref(null),y=f.ref({baseItemsHash:"",dynamicItemsHash:""});function F(T,N){return T.length===0?"":T.map(N).join("|")}const Q=f.computed(()=>{var z;const T=F(g.value,Z=>Z.prop||""),N=F(o.value,Z=>`${Z.prop||""}:${Z._parentProp||""}`);if(v.value&&y.value.baseItemsHash===T&&y.value.dynamicItemsHash===N)return v.value;const E=g.value,x=E.length,O=o.value.length,j=new Array(x+O);for(let Z=0;Z<x;Z++)j[Z]=E[Z];let G=x;if(O===0)return v.value=j,y.value={baseItemsHash:T,dynamicItemsHash:N},j;const Y=[],K=[];let q=[];const ee=new Set,ie=new Map;for(let Z=0;Z<x;Z++){const re=E[Z].prop;re&&(ee.add(re),ie.set(re,Z))}for(let Z=0;Z<O;Z++){const re=o.value[Z],ne=re._parentProp;ne&&ee.has(ne)?K.push(re):q.push(re)}K.length>0&&Y.push(K);let S=K,H=[];for(;q.length>0&&S.length>0;){const Z=new Map;for(let ne=0;ne<S.length;ne++){const ue=S[ne].prop;ue&&Z.set(ue,!0)}const re=[];for(let ne=0;ne<q.length;ne++){const ue=q[ne];ue._parentProp&&Z.has(ue._parentProp)?H.push(ue):re.push(ue)}if(H.length>0)Y.push(H),S=H,H=[],q=re;else break}for(let Z=0;Z<Y.length;Z++){const re=Y[Z],ne=new Map;for(let Ue=0;Ue<G;Ue++){const Ee=(z=j[Ue])==null?void 0:z.prop;Ee&&ne.set(Ee,Ue)}const ue=new Map;for(let Ue=0;Ue<re.length;Ue++){const Ee=re[Ue],Oe=Ee._parentProp;Oe&&ne.has(Oe)&&(ue.has(Oe)||ue.set(Oe,[]),ue.get(Oe).push(Ee))}const ge=[];ue.forEach((Ue,Ee)=>{const Oe=ne.get(Ee);let Te=Oe;for(let Pe=Oe+1;Pe<G;Pe++){const pe=j[Pe];if(pe._dynamic&&pe._parentProp===Ee)Te=Pe;else if(!pe._dynamic)break}ge.push({index:Te+1,items:Ue})}),ge.sort((Ue,Ee)=>Ee.index-Ue.index);for(let Ue=0;Ue<ge.length;Ue++){const{index:Ee,items:Oe}=ge[Ue];for(let Te=Oe.length-1;Te>=0;Te--)j.splice(Ee,0,Oe[Te]),G++}}if(q.length>0)for(let Z=0;Z<q.length;Z++)j[G++]=q[Z];return j.length>G&&(j.length=G),v.value=j,y.value={baseItemsHash:T,dynamicItemsHash:N},j}),M=f.computed({get:()=>A.modelValue,set:T=>r("update:modelValue",T)}),L=f.computed(()=>Q.value.filter(T=>!T.showIf||M.value[T.showIf])),V=T=>{var E,x;if(T.options)return T.options||[];if(T.optionsKey&&((E=A.options)!=null&&E[T.optionsKey])){const O=JSON.parse(JSON.stringify(A.options[T.optionsKey]||[]))||[];return T!=null&&T.multiple||O.unshift({label:"无",value:" "}),O}const N=JSON.parse(JSON.stringify(((x=A.options)==null?void 0:x[T==null?void 0:T.optionsKey])||[]))||[];return T!=null&&T.multiple||N.unshift({label:"无",value:" "}),N},k=T=>T.layout?T.layout:["text","file","textarea"].includes(T.type)?"full":"half",W=T=>{r("rotationChange",T)};return f.provide("config",A.propsConfig),(T,N)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(i.value)},[f.createElementVNode("div",w3,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(L.value,E=>(f.openBlock(),f.createElementBlock(f.Fragment,{key:E.prop},[k(E)==="full"?(f.openBlock(),f.createElementBlock("div",y3,[f.createVNode(cd,{label:E.label,modelValue:M.value[E.prop],"onUpdate:modelValue":x=>M.value[E.prop]=x,type:E.type,options:V(E),min:E.min,max:E.max,step:E.step,accept:E.accept,desc:E.desc,multiple:E.multiple,onRotationChange:W},null,8,["label","modelValue","onUpdate:modelValue","type","options","min","max","step","accept","desc","multiple"])])):k(E)==="half"?(f.openBlock(),f.createElementBlock("div",b3,[f.createVNode(cd,{label:E.label,modelValue:M.value[E.prop],"onUpdate:modelValue":x=>M.value[E.prop]=x,type:E.type,options:V(E),min:E.min,max:E.max,step:E.step,accept:E.accept,desc:E.desc,multiple:E.multiple,onRotationChange:W},null,8,["label","modelValue","onUpdate:modelValue","type","options","min","max","step","accept","desc","multiple"])])):(f.openBlock(),f.createElementBlock("div",C3,[f.createVNode(cd,{label:E.label,modelValue:M.value[E.prop],"onUpdate:modelValue":x=>M.value[E.prop]=x,type:E.type,options:V(E),min:E.min,max:E.max,step:E.step,accept:E.accept,desc:E.desc,multiple:E.multiple,onRotationChange:W},null,8,["label","modelValue","onUpdate:modelValue","type","options","min","max","step","accept","desc","multiple"])]))],64))),128))])],2))}},[["__scopeId","data-v-4b4a18c5"]]),E3={__name:"TextPropertyPanel",props:{modelValue:{type:Object,required:!0},propsConfig:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(t){return(e,A)=>(f.openBlock(),f.createBlock(Ao,{"model-value":t.modelValue,"props-config":t.propsConfig,options:t.options,"panel-type":"text","onUpdate:modelValue":A[0]||(A[0]=r=>e.$emit("update:modelValue",r))},null,8,["model-value","props-config","options"]))}},U3={},F3={t:"1745910658205",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2602"};function N3(t,e){return f.openBlock(),f.createElementBlock("svg",F3,[...e[0]||(e[0]=[f.createElementVNode("path",{d:"M0 0m0 0l1024 0q0 0 0 0l0 1024q0 0 0 0l-1024 0q0 0 0 0l0-1024q0 0 0 0Z","fill-opacity":"0","p-id":"2603"},null,-1),f.createElementVNode("path",{d:"M798.88 96H257.12C177.088 96 112 161.088 112 241.12v541.76C112 862.928 177.088 928 257.12 928h541.76c80.032 0 145.12-65.088 145.12-145.12V241.12C944 161.088 878.912 96 798.88 96z m87.104 686.88a87.2 87.2 0 0 1-87.104 87.104H257.12a87.2 87.2 0 0 1-87.104-87.104V241.12a87.2 87.2 0 0 1 87.104-87.104h541.76a87.2 87.2 0 0 1 87.104 87.104v541.76z","p-id":"2604"},null,-1),f.createElementVNode("path",{d:"M686.304 710.336H369.696a29.04 29.04 0 0 0-29.216 28.832c0 15.904 13.104 28.832 29.216 28.832h316.608a29.04 29.04 0 0 0 29.2-28.832c0-15.904-13.088-28.832-29.2-28.832zM722.784 256H333.216A29.04 29.04 0 0 0 304 284.832v76.96c0 15.904 13.088 28.832 29.2 28.832a29.04 29.04 0 0 0 29.216-28.832v-48.048h136.384V640.64c0 15.92 13.088 28.832 29.2 28.832a29.04 29.04 0 0 0 29.2-28.832V313.76h136.384v48.048c0 15.904 13.088 28.832 29.216 28.832A29.04 29.04 0 0 0 752 361.792v-76.96c0.08-15.904-13.008-28.832-29.2-28.832z","p-id":"2605"},null,-1)])])}const S3=jA(U3,[["render",N3]]);var ud={},Fc={},vr={};Object.defineProperty(vr,"__esModule",{value:!0});function Q3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var T3=function t(e,A){Q3(this,t),this.data=e,this.text=A.text||e,this.options=A};vr.default=T3,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.CODE39=void 0;var x3=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),R3=vr,I3=V3(R3);function V3(t){return t&&t.__esModule?t:{default:t}}function M3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L3(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 O3(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 k3=function(t){O3(e,t);function e(A,r){return M3(this,e),A=A.toUpperCase(),r.mod43&&(A+=P3(W3(A))),L3(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return x3(e,[{key:"encode",value:function(){for(var r=fd("*"),n=0;n<this.data.length;n++)r+=fd(this.data[n])+"0";return r+=fd("*"),{data:r,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),e}(I3.default),Hm=["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","-","."," ","$","/","+","%","*"],H3=[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 fd(t){return D3(Dm(t))}function D3(t){return H3[t].toString(2)}function P3(t){return Hm[t]}function Dm(t){return Hm.indexOf(t)}function W3(t){for(var e=0,A=0;A<t.length;A++)e+=Dm(t[A]);return e=e%43,e}Fc.CODE39=k3;var In={},hd={},ro={},aA={};Object.defineProperty(aA,"__esModule",{value:!0});var Ms;function dd(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var Pm=aA.SET_A=0,Wm=aA.SET_B=1,_m=aA.SET_C=2;aA.SHIFT=98;var _3=aA.START_A=103,Z3=aA.START_B=104,j3=aA.START_C=105;aA.MODULO=103,aA.STOP=106,aA.FNC1=207,aA.SET_BY_CODE=(Ms={},dd(Ms,_3,Pm),dd(Ms,Z3,Wm),dd(Ms,j3,_m),Ms),aA.SWAP={101:Pm,100:Wm,99:_m},aA.A_START_CHAR=String.fromCharCode(208),aA.B_START_CHAR=String.fromCharCode(209),aA.C_START_CHAR=String.fromCharCode(210),aA.A_CHARS="[\0-_È-Ï]",aA.B_CHARS="[ -È-Ï]",aA.C_CHARS="(Ï*[0-9]{2}Ï*)",aA.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(ro,"__esModule",{value:!0});var J3=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),K3=vr,G3=z3(K3),kr=aA;function z3(t){return t&&t.__esModule?t:{default:t}}function Y3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X3(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 q3(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 $3=function(t){q3(e,t);function e(A,r){Y3(this,e);var n=X3(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A.substring(1),r));return n.bytes=A.split("").map(function(a){return a.charCodeAt(0)}),n}return J3(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.bytes,n=r.shift()-105,a=kr.SET_BY_CODE[n];if(a===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&r.unshift(kr.FNC1);var i=e.next(r,1,a);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(n)+i.result+e.getBar((i.checksum+n)%kr.MODULO)+e.getBar(kr.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 kr.BARS[r]?kr.BARS[r].toString():""}},{key:"correctIndex",value:function(r,n){if(n===kr.SET_A){var a=r.shift();return a<32?a+64:a-32}else return n===kr.SET_B?r.shift()-32:(r.shift()-48)*10+r.shift()-48}},{key:"next",value:function(r,n,a){if(!r.length)return{result:"",checksum:0};var i=void 0,o=void 0;if(r[0]>=200){o=r.shift()-105;var s=kr.SWAP[o];s!==void 0?i=e.next(r,n+1,s):((a===kr.SET_A||a===kr.SET_B)&&o===kr.SHIFT&&(r[0]=a===kr.SET_A?r[0]>95?r[0]-96:r[0]:r[0]<32?r[0]+96:r[0]),i=e.next(r,n+1,a))}else o=e.correctIndex(r,a),i=e.next(r,n+1,a);var l=e.getBar(o),u=o*n;return{result:l+i.result,checksum:u+i.checksum}}}]),e}(G3.default);ro.default=$3;var pd={};Object.defineProperty(pd,"__esModule",{value:!0});var ma=aA,Zm=function(e){return e.match(new RegExp("^"+ma.A_CHARS+"*"))[0].length},jm=function(e){return e.match(new RegExp("^"+ma.B_CHARS+"*"))[0].length},Jm=function(e){return e.match(new RegExp("^"+ma.C_CHARS+"*"))[0]};function gd(t,e){var A=e?ma.A_CHARS:ma.B_CHARS,r=t.match(new RegExp("^("+A+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(r)return r[1]+String.fromCharCode(204)+Km(t.substring(r[1].length));var n=t.match(new RegExp("^"+A+"+"))[0];return n.length===t.length?t:n+String.fromCharCode(e?205:206)+gd(t.substring(n.length),!e)}function Km(t){var e=Jm(t),A=e.length;if(A===t.length)return t;t=t.substring(A);var r=Zm(t)>=jm(t);return e+String.fromCharCode(r?206:205)+gd(t,r)}pd.default=function(t){var e=void 0,A=Jm(t).length;if(A>=2)e=ma.C_START_CHAR+Km(t);else{var r=Zm(t)>jm(t);e=(r?ma.A_START_CHAR:ma.B_START_CHAR)+gd(t,r)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(n,a){return String.fromCharCode(203)+a})},Object.defineProperty(hd,"__esModule",{value:!0});var eS=ro,tS=Gm(eS),AS=pd,rS=Gm(AS);function Gm(t){return t&&t.__esModule?t:{default:t}}function nS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function md(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 aS(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 iS=function(t){aS(e,t);function e(A,r){if(nS(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(A))var n=md(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,rS.default)(A),r));else var n=md(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));return md(n)}return e}(tS.default);hd.default=iS;var vd={};Object.defineProperty(vd,"__esModule",{value:!0});var oS=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),sS=ro,lS=cS(sS),zm=aA;function cS(t){return t&&t.__esModule?t:{default:t}}function uS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fS(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 hS(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 dS=function(t){hS(e,t);function e(A,r){return uS(this,e),fS(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,zm.A_START_CHAR+A,r))}return oS(e,[{key:"valid",value:function(){return new RegExp("^"+zm.A_CHARS+"+$").test(this.data)}}]),e}(lS.default);vd.default=dS;var Bd={};Object.defineProperty(Bd,"__esModule",{value:!0});var pS=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),gS=ro,mS=vS(gS),Ym=aA;function vS(t){return t&&t.__esModule?t:{default:t}}function BS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wS(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 yS(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 bS=function(t){yS(e,t);function e(A,r){return BS(this,e),wS(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Ym.B_START_CHAR+A,r))}return pS(e,[{key:"valid",value:function(){return new RegExp("^"+Ym.B_CHARS+"+$").test(this.data)}}]),e}(mS.default);Bd.default=bS;var wd={};Object.defineProperty(wd,"__esModule",{value:!0});var CS=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),ES=ro,US=FS(ES),Xm=aA;function FS(t){return t&&t.__esModule?t:{default:t}}function NS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SS(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 QS(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 TS=function(t){QS(e,t);function e(A,r){return NS(this,e),SS(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Xm.C_START_CHAR+A,r))}return CS(e,[{key:"valid",value:function(){return new RegExp("^"+Xm.C_CHARS+"+$").test(this.data)}}]),e}(US.default);wd.default=TS,Object.defineProperty(In,"__esModule",{value:!0}),In.CODE128C=In.CODE128B=In.CODE128A=In.CODE128=void 0;var xS=hd,RS=Nc(xS),IS=vd,VS=Nc(IS),MS=Bd,LS=Nc(MS),OS=wd,kS=Nc(OS);function Nc(t){return t&&t.__esModule?t:{default:t}}In.CODE128=RS.default,In.CODE128A=VS.default,In.CODE128B=LS.default,In.CODE128C=kS.default;var Nr={},yd={},zr={};Object.defineProperty(zr,"__esModule",{value:!0}),zr.SIDE_BIN="101",zr.MIDDLE_BIN="01010",zr.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"]},zr.EAN2_STRUCTURE=["LL","LG","GL","GG"],zr.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],zr.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"];var Sc={},si={};Object.defineProperty(si,"__esModule",{value:!0});var HS=zr,DS=function(e,A,r){var n=e.split("").map(function(i,o){return HS.BINARIES[A[o]]}).map(function(i,o){return i?i[e[o]]:""});if(r){var a=e.length-1;n=n.map(function(i,o){return o<a?i+r:i})}return n.join("")};si.default=DS,Object.defineProperty(Sc,"__esModule",{value:!0});var PS=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),no=zr,WS=si,qm=$m(WS),_S=vr,ZS=$m(_S);function $m(t){return t&&t.__esModule?t:{default:t}}function jS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JS(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 KS(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 GS=function(t){KS(e,t);function e(A,r){jS(this,e);var n=JS(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));return n.fontSize=!r.flat&&r.fontSize>r.width*10?r.width*10:r.fontSize,n.guardHeight=r.height+n.fontSize/2+r.textMargin,n}return PS(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(r,n){return this.text.substr(r,n)}},{key:"leftEncode",value:function(r,n){return(0,qm.default)(r,n)}},{key:"rightText",value:function(r,n){return this.text.substr(r,n)}},{key:"rightEncode",value:function(r,n){return(0,qm.default)(r,n)}},{key:"encodeGuarded",value:function(){var r={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:no.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:r},{data:no.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:r},{data:no.SIDE_BIN,options:n}]}},{key:"encodeFlat",value:function(){var r=[no.SIDE_BIN,this.leftEncode(),no.MIDDLE_BIN,this.rightEncode(),no.SIDE_BIN];return{data:r.join(""),text:this.text}}}]),e}(ZS.default);Sc.default=GS,Object.defineProperty(yd,"__esModule",{value:!0});var zS=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),Ls=function t(e,A,r){e===null&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,A);if(n===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:t(a,A,r)}else{if("value"in n)return n.value;var i=n.get;return i===void 0?void 0:i.call(r)}},YS=zr,XS=Sc,qS=$S(XS);function $S(t){return t&&t.__esModule?t:{default:t}}function eQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tQ(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 AQ(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 ev=function(e){var A=e.substr(0,12).split("").map(function(r){return+r}).reduce(function(r,n,a){return a%2?r+n*3:r+n},0);return(10-A%10)%10},rQ=function(t){AQ(e,t);function e(A,r){eQ(this,e),A.search(/^[0-9]{12}$/)!==-1&&(A+=ev(A));var n=tQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));return n.lastChar=r.lastChar,n}return zS(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===ev(this.data)}},{key:"leftText",value:function(){return Ls(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var r=this.data.substr(1,6),n=YS.EAN13_STRUCTURE[this.data[0]];return Ls(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,r,n)}},{key:"rightText",value:function(){return Ls(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 Ls(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,r,"RRRRRR")}},{key:"encodeGuarded",value:function(){var r=Ls(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}(qS.default);yd.default=rQ;var bd={};Object.defineProperty(bd,"__esModule",{value:!0});var nQ=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),Qc=function t(e,A,r){e===null&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,A);if(n===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:t(a,A,r)}else{if("value"in n)return n.value;var i=n.get;return i===void 0?void 0:i.call(r)}},aQ=Sc,iQ=oQ(aQ);function oQ(t){return t&&t.__esModule?t:{default:t}}function sQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lQ(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 cQ(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 tv=function(e){var A=e.substr(0,7).split("").map(function(r){return+r}).reduce(function(r,n,a){return a%2?r+n:r+n*3},0);return(10-A%10)%10},uQ=function(t){cQ(e,t);function e(A,r){return sQ(this,e),A.search(/^[0-9]{7}$/)!==-1&&(A+=tv(A)),lQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return nQ(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===tv(this.data)}},{key:"leftText",value:function(){return Qc(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 Qc(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,r,"LLLL")}},{key:"rightText",value:function(){return Qc(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 Qc(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,r,"RRRR")}}]),e}(iQ.default);bd.default=uQ;var Cd={};Object.defineProperty(Cd,"__esModule",{value:!0});var fQ=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),hQ=zr,dQ=si,pQ=Av(dQ),gQ=vr,mQ=Av(gQ);function Av(t){return t&&t.__esModule?t:{default:t}}function vQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BQ(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 wQ(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 yQ=function(e){var A=e.split("").map(function(r){return+r}).reduce(function(r,n,a){return a%2?r+n*9:r+n*3},0);return A%10},bQ=function(t){wQ(e,t);function e(A,r){return vQ(this,e),BQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return fQ(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var r=hQ.EAN5_STRUCTURE[yQ(this.data)];return{data:"1011"+(0,pQ.default)(this.data,r,"01"),text:this.text}}}]),e}(mQ.default);Cd.default=bQ;var Ed={};Object.defineProperty(Ed,"__esModule",{value:!0});var CQ=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),EQ=zr,UQ=si,FQ=rv(UQ),NQ=vr,SQ=rv(NQ);function rv(t){return t&&t.__esModule?t:{default:t}}function QQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TQ(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 xQ(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 RQ=function(t){xQ(e,t);function e(A,r){return QQ(this,e),TQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return CQ(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var r=EQ.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,FQ.default)(this.data,r,"01"),text:this.text}}}]),e}(SQ.default);Ed.default=RQ;var Os={};Object.defineProperty(Os,"__esModule",{value:!0});var IQ=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}();Os.checksum=Ud;var VQ=si,ao=nv(VQ),MQ=vr,LQ=nv(MQ);function nv(t){return t&&t.__esModule?t:{default:t}}function OQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kQ(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 HQ(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 DQ=function(t){HQ(e,t);function e(A,r){OQ(this,e),A.search(/^[0-9]{11}$/)!==-1&&(A+=Ud(A));var n=kQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));return n.displayValue=r.displayValue,r.fontSize>r.width*10?n.fontSize=r.width*10:n.fontSize=r.fontSize,n.guardHeight=r.height+n.fontSize/2+r.textMargin,n}return IQ(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==Ud(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,ao.default)(this.data.substr(0,6),"LLLLLL"),r+="01010",r+=(0,ao.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,ao.default)(this.data[0],"L"),options:{height:this.guardHeight}}),r.push({data:(0,ao.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,ao.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),r.push({data:(0,ao.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}(LQ.default);function Ud(t){var e=0,A;for(A=1;A<11;A+=2)e+=parseInt(t[A]);for(A=0;A<11;A+=2)e+=parseInt(t[A])*3;return(10-e%10)%10}Os.default=DQ;var Fd={};Object.defineProperty(Fd,"__esModule",{value:!0});var PQ=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),WQ=si,_Q=av(WQ),ZQ=vr,jQ=av(ZQ),JQ=Os;function av(t){return t&&t.__esModule?t:{default:t}}function KQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nd(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 GQ(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 zQ=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],YQ=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],XQ=function(t){GQ(e,t);function e(A,r){KQ(this,e);var n=Nd(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));if(n.isValid=!1,A.search(/^[0-9]{6}$/)!==-1)n.middleDigits=A,n.upcA=iv(A,"0"),n.text=r.text||""+n.upcA[0]+A+n.upcA[n.upcA.length-1],n.isValid=!0;else if(A.search(/^[01][0-9]{7}$/)!==-1)if(n.middleDigits=A.substring(1,A.length-1),n.upcA=iv(n.middleDigits,A[0]),n.upcA[n.upcA.length-1]===A[A.length-1])n.isValid=!0;else return Nd(n);else return Nd(n);return n.displayValue=r.displayValue,r.fontSize>r.width*10?n.fontSize=r.width*10:n.fontSize=r.fontSize,n.guardHeight=r.height+n.fontSize/2+r.textMargin,n}return PQ(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],n=this.upcA[this.upcA.length-1],a=YQ[parseInt(n)][parseInt(r)];return(0,_Q.default)(this.middleDigits,a)}}]),e}(jQ.default);function iv(t,e){for(var A=parseInt(t[t.length-1]),r=zQ[A],n="",a=0,i=0;i<r.length;i++){var o=r[i];o==="X"?n+=t[a++]:n+=o}return n=""+e+n,""+n+(0,JQ.checksum)(n)}Fd.default=XQ,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.UPCE=Nr.UPC=Nr.EAN2=Nr.EAN5=Nr.EAN8=Nr.EAN13=void 0;var qQ=yd,$Q=io(qQ),eT=bd,tT=io(eT),AT=Cd,rT=io(AT),nT=Ed,aT=io(nT),iT=Os,oT=io(iT),sT=Fd,lT=io(sT);function io(t){return t&&t.__esModule?t:{default:t}}Nr.EAN13=$Q.default,Nr.EAN8=tT.default,Nr.EAN5=rT.default,Nr.EAN2=aT.default,Nr.UPC=oT.default,Nr.UPCE=lT.default;var oo={},Tc={},ks={};Object.defineProperty(ks,"__esModule",{value:!0}),ks.START_BIN="1010",ks.END_BIN="11101",ks.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"],Object.defineProperty(Tc,"__esModule",{value:!0});var cT=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),xc=ks,uT=vr,fT=hT(uT);function hT(t){return t&&t.__esModule?t:{default:t}}function dT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pT(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 gT(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 mT=function(t){gT(e,t);function e(){return dT(this,e),pT(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return cT(e,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var r=this,n=this.data.match(/.{2}/g).map(function(a){return r.encodePair(a)}).join("");return{data:xc.START_BIN+n+xc.END_BIN,text:this.text}}},{key:"encodePair",value:function(r){var n=xc.BINARIES[r[1]];return xc.BINARIES[r[0]].split("").map(function(a,i){return(a==="1"?"111":"1")+(n[i]==="1"?"000":"0")}).join("")}}]),e}(fT.default);Tc.default=mT;var Sd={};Object.defineProperty(Sd,"__esModule",{value:!0});var vT=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),BT=Tc,wT=yT(BT);function yT(t){return t&&t.__esModule?t:{default:t}}function bT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CT(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 ET(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 ov=function(e){var A=e.substr(0,13).split("").map(function(r){return parseInt(r,10)}).reduce(function(r,n,a){return r+n*(3-a%2*2)},0);return Math.ceil(A/10)*10-A},UT=function(t){ET(e,t);function e(A,r){return bT(this,e),A.search(/^[0-9]{13}$/)!==-1&&(A+=ov(A)),CT(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return vT(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===ov(this.data)}}]),e}(wT.default);Sd.default=UT,Object.defineProperty(oo,"__esModule",{value:!0}),oo.ITF14=oo.ITF=void 0;var FT=Tc,NT=sv(FT),ST=Sd,QT=sv(ST);function sv(t){return t&&t.__esModule?t:{default:t}}oo.ITF=NT.default,oo.ITF14=QT.default;var Yr={},li={};Object.defineProperty(li,"__esModule",{value:!0});var TT=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),xT=vr,RT=IT(xT);function IT(t){return t&&t.__esModule?t:{default:t}}function VT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MT(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 LT(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 OT=function(t){LT(e,t);function e(A,r){return VT(this,e),MT(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return TT(e,[{key:"encode",value:function(){for(var r="110",n=0;n<this.data.length;n++){var a=parseInt(this.data[n]),i=a.toString(2);i=kT(i,4-i.length);for(var o=0;o<i.length;o++)r+=i[o]=="0"?"100":"110"}return r+="1001",{data:r,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),e}(RT.default);function kT(t,e){for(var A=0;A<e;A++)t="0"+t;return t}li.default=OT;var Qd={},ci={};Object.defineProperty(ci,"__esModule",{value:!0}),ci.mod10=HT,ci.mod11=DT;function HT(t){for(var e=0,A=0;A<t.length;A++){var r=parseInt(t[A]);(A+t.length)%2===0?e+=r:e+=r*2%10+Math.floor(r*2/10)}return(10-e%10)%10}function DT(t){for(var e=0,A=[2,3,4,5,6,7],r=0;r<t.length;r++){var n=parseInt(t[t.length-1-r]);e+=A[r%A.length]*n}return(11-e%11)%11}Object.defineProperty(Qd,"__esModule",{value:!0});var PT=li,WT=ZT(PT),_T=ci;function ZT(t){return t&&t.__esModule?t:{default:t}}function jT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JT(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 KT(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 GT=function(t){KT(e,t);function e(A,r){return jT(this,e),JT(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A+(0,_T.mod10)(A),r))}return e}(WT.default);Qd.default=GT;var Td={};Object.defineProperty(Td,"__esModule",{value:!0});var zT=li,YT=qT(zT),XT=ci;function qT(t){return t&&t.__esModule?t:{default:t}}function $T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ex(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 tx(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 Ax=function(t){tx(e,t);function e(A,r){return $T(this,e),ex(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A+(0,XT.mod11)(A),r))}return e}(YT.default);Td.default=Ax;var xd={};Object.defineProperty(xd,"__esModule",{value:!0});var rx=li,nx=ax(rx),lv=ci;function ax(t){return t&&t.__esModule?t:{default:t}}function ix(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ox(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 sx(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 lx=function(t){sx(e,t);function e(A,r){return ix(this,e),A+=(0,lv.mod10)(A),A+=(0,lv.mod10)(A),ox(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return e}(nx.default);xd.default=lx;var Rd={};Object.defineProperty(Rd,"__esModule",{value:!0});var cx=li,ux=fx(cx),cv=ci;function fx(t){return t&&t.__esModule?t:{default:t}}function hx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dx(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 px(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 gx=function(t){px(e,t);function e(A,r){return hx(this,e),A+=(0,cv.mod11)(A),A+=(0,cv.mod10)(A),dx(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return e}(ux.default);Rd.default=gx,Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.MSI1110=Yr.MSI1010=Yr.MSI11=Yr.MSI10=Yr.MSI=void 0;var mx=li,vx=Hs(mx),Bx=Qd,wx=Hs(Bx),yx=Td,bx=Hs(yx),Cx=xd,Ex=Hs(Cx),Ux=Rd,Fx=Hs(Ux);function Hs(t){return t&&t.__esModule?t:{default:t}}Yr.MSI=vx.default,Yr.MSI10=wx.default,Yr.MSI11=bx.default,Yr.MSI1010=Ex.default,Yr.MSI1110=Fx.default;var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.pharmacode=void 0;var Nx=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),Sx=vr,Qx=Tx(Sx);function Tx(t){return t&&t.__esModule?t:{default:t}}function xx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rx(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 Ix(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 Vx=function(t){Ix(e,t);function e(A,r){xx(this,e);var n=Rx(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));return n.number=parseInt(A,10),n}return Nx(e,[{key:"encode",value:function(){for(var r=this.number,n="";!isNaN(r)&&r!=0;)r%2===0?(n="11100"+n,r=(r-2)/2):(n="100"+n,r=(r-1)/2);return n=n.slice(0,-2),{data:n,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(Qx.default);Rc.pharmacode=Vx;var Ic={};Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.codabar=void 0;var Mx=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),Lx=vr,Ox=kx(Lx);function kx(t){return t&&t.__esModule?t:{default:t}}function Hx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dx(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 Px(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 Wx=function(t){Px(e,t);function e(A,r){Hx(this,e),A.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(A="A"+A+"A");var n=Dx(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A.toUpperCase(),r));return n.text=n.options.text||n.text.replace(/[A-D]/g,""),n}return Mx(e,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var r=[],n=this.getEncodings(),a=0;a<this.data.length;a++)r.push(n[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}(Ox.default);Ic.codabar=Wx;var so={},Vc={},Ds={};Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.SYMBOLS=["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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],Ds.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],Ds.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]},Object.defineProperty(Vc,"__esModule",{value:!0});var _x=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),Mc=Ds,Zx=vr,jx=Jx(Zx);function Jx(t){return t&&t.__esModule?t:{default:t}}function Kx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gx(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 zx(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 Yx=function(t){zx(e,t);function e(A,r){return Kx(this,e),Gx(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return _x(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.data.split("").flatMap(function(o){return Mc.MULTI_SYMBOLS[o]||o}),n=r.map(function(o){return e.getEncoding(o)}).join(""),a=e.checksum(r,20),i=e.checksum(r.concat(a),15);return{text:this.text,data:e.getEncoding("ÿ")+n+e.getEncoding(a)+e.getEncoding(i)+e.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(r){return Mc.BINARIES[e.symbolValue(r)]}},{key:"getSymbol",value:function(r){return Mc.SYMBOLS[r]}},{key:"symbolValue",value:function(r){return Mc.SYMBOLS.indexOf(r)}},{key:"checksum",value:function(r,n){var a=r.slice().reverse().reduce(function(i,o,s){var l=s%n+1;return i+e.symbolValue(o)*l},0);return e.getSymbol(a%47)}}]),e}(jx.default);Vc.default=Yx;var Id={};Object.defineProperty(Id,"__esModule",{value:!0});var Xx=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),qx=Vc,$x=eR(qx);function eR(t){return t&&t.__esModule?t:{default:t}}function tR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AR(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 rR(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 nR=function(t){rR(e,t);function e(A,r){return tR(this,e),AR(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return Xx(e,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),e}($x.default);Id.default=nR,Object.defineProperty(so,"__esModule",{value:!0}),so.CODE93FullASCII=so.CODE93=void 0;var aR=Vc,iR=uv(aR),oR=Id,sR=uv(oR);function uv(t){return t&&t.__esModule?t:{default:t}}so.CODE93=iR.default,so.CODE93FullASCII=sR.default;var Lc={};Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.GenericBarcode=void 0;var lR=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),cR=vr,uR=fR(cR);function fR(t){return t&&t.__esModule?t:{default:t}}function hR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dR(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 pR(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 gR=function(t){pR(e,t);function e(A,r){return hR(this,e),dR(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return lR(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(uR.default);Lc.GenericBarcode=gR,Object.defineProperty(ud,"__esModule",{value:!0});var mR=Fc,Oc=In,lo=Nr,fv=oo,Ps=Yr,vR=Rc,BR=Ic,hv=so,wR=Lc;ud.default={CODE39:mR.CODE39,CODE128:Oc.CODE128,CODE128A:Oc.CODE128A,CODE128B:Oc.CODE128B,CODE128C:Oc.CODE128C,EAN13:lo.EAN13,EAN8:lo.EAN8,EAN5:lo.EAN5,EAN2:lo.EAN2,UPC:lo.UPC,UPCE:lo.UPCE,ITF14:fv.ITF14,ITF:fv.ITF,MSI:Ps.MSI,MSI10:Ps.MSI10,MSI11:Ps.MSI11,MSI1010:Ps.MSI1010,MSI1110:Ps.MSI1110,pharmacode:vR.pharmacode,codabar:BR.codabar,CODE93:hv.CODE93,CODE93FullASCII:hv.CODE93FullASCII,GenericBarcode:wR.GenericBarcode};var co={};Object.defineProperty(co,"__esModule",{value:!0});var yR=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var r in A)Object.prototype.hasOwnProperty.call(A,r)&&(t[r]=A[r])}return t};co.default=function(t,e){return yR({},t,e)};var Vd={};Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.default=bR;function bR(t){var e=[];function A(r){if(Array.isArray(r))for(var n=0;n<r.length;n++)A(r[n]);else r.text=r.text||"",r.data=r.data||"",e.push(r)}return A(t),e}var Md={};Object.defineProperty(Md,"__esModule",{value:!0}),Md.default=CR;function CR(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 Ld={},Od={},kc={};Object.defineProperty(kc,"__esModule",{value:!0}),kc.default=ER;function ER(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var A in e)e.hasOwnProperty(A)&&(A=e[A],typeof t[A]=="string"&&(t[A]=parseInt(t[A],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});var UR={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(){}};Hc.default=UR,Object.defineProperty(Od,"__esModule",{value:!0});var FR=kc,NR=pv(FR),SR=Hc,dv=pv(SR);function pv(t){return t&&t.__esModule?t:{default:t}}function QR(t){var e={};for(var A in dv.default)dv.default.hasOwnProperty(A)&&(t.hasAttribute("jsbarcode-"+A.toLowerCase())&&(e[A]=t.getAttribute("jsbarcode-"+A.toLowerCase())),t.hasAttribute("data-"+A.toLowerCase())&&(e[A]=t.getAttribute("data-"+A.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,NR.default)(e),e}Od.default=QR;var kd={},Hd={},Hr={};Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.getTotalWidthOfEncodings=Hr.calculateEncodingAttributes=Hr.getBarcodePadding=Hr.getEncodingHeight=Hr.getMaximumHeightOfEncodings=void 0;var TR=co,xR=RR(TR);function RR(t){return t&&t.__esModule?t:{default:t}}function gv(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function mv(t,e,A){if(A.displayValue&&e<t){if(A.textAlign=="center")return Math.floor((t-e)/2);if(A.textAlign=="left")return 0;if(A.textAlign=="right")return Math.floor(t-e)}return 0}function IR(t,e,A){for(var r=0;r<t.length;r++){var n=t[r],a=(0,xR.default)(e,n.options),i;a.displayValue?i=LR(n.text,a,A):i=0;var o=n.data.length*a.width;n.width=Math.ceil(Math.max(i,o)),n.height=gv(n,a),n.barcodePadding=mv(i,o,a)}}function VR(t){for(var e=0,A=0;A<t.length;A++)e+=t[A].width;return e}function MR(t){for(var e=0,A=0;A<t.length;A++)t[A].height>e&&(e=t[A].height);return e}function LR(t,e,A){var r;if(A)r=A;else if(typeof document<"u")r=document.createElement("canvas").getContext("2d");else return 0;r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var n=r.measureText(t);if(!n)return 0;var a=n.width;return a}Hr.getMaximumHeightOfEncodings=MR,Hr.getEncodingHeight=gv,Hr.getBarcodePadding=mv,Hr.calculateEncodingAttributes=IR,Hr.getTotalWidthOfEncodings=VR,Object.defineProperty(Hd,"__esModule",{value:!0});var OR=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),kR=co,HR=DR(kR),Dd=Hr;function DR(t){return t&&t.__esModule?t:{default:t}}function PR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var WR=function(){function t(e,A,r){PR(this,t),this.canvas=e,this.encodings=A,this.options=r}return OR(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var A=0;A<this.encodings.length;A++){var r=(0,HR.default)(this.options,this.encodings[A].options);this.drawCanvasBarcode(r,this.encodings[A]),this.drawCanvasText(r,this.encodings[A]),this.moveCanvasDrawing(this.encodings[A])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var A=this.canvas.getContext("2d");A.save(),(0,Dd.calculateEncodingAttributes)(this.encodings,this.options,A);var r=(0,Dd.getTotalWidthOfEncodings)(this.encodings),n=(0,Dd.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=r+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,A.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(A.fillStyle=this.options.background,A.fillRect(0,0,this.canvas.width,this.canvas.height)),A.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(A,r){var n=this.canvas.getContext("2d"),a=r.data,i;A.textPosition=="top"?i=A.marginTop+A.fontSize+A.textMargin:i=A.marginTop,n.fillStyle=A.lineColor;for(var o=0;o<a.length;o++){var s=o*A.width+r.barcodePadding;a[o]==="1"?n.fillRect(s,i,A.width,A.height):a[o]&&n.fillRect(s,i,A.width,A.height*a[o])}}},{key:"drawCanvasText",value:function(A,r){var n=this.canvas.getContext("2d"),a=A.fontOptions+" "+A.fontSize+"px "+A.font;if(A.displayValue){var i,o;A.textPosition=="top"?o=A.marginTop+A.fontSize-A.textMargin:o=A.height+A.textMargin+A.marginTop+A.fontSize,n.font=a,A.textAlign=="left"||r.barcodePadding>0?(i=0,n.textAlign="left"):A.textAlign=="right"?(i=r.width-1,n.textAlign="right"):(i=r.width/2,n.textAlign="center"),n.fillText(r.text,i,o)}}},{key:"moveCanvasDrawing",value:function(A){var r=this.canvas.getContext("2d");r.translate(A.width,0)}},{key:"restoreCanvas",value:function(){var A=this.canvas.getContext("2d");A.restore()}}]),t}();Hd.default=WR;var Pd={};Object.defineProperty(Pd,"__esModule",{value:!0});var _R=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),ZR=co,jR=JR(ZR),Wd=Hr;function JR(t){return t&&t.__esModule?t:{default:t}}function KR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Dc="http://www.w3.org/2000/svg",GR=function(){function t(e,A,r){KR(this,t),this.svg=e,this.encodings=A,this.options=r,this.document=r.xmlDocument||document}return _R(t,[{key:"render",value:function(){var A=this.options.marginLeft;this.prepareSVG();for(var r=0;r<this.encodings.length;r++){var n=this.encodings[r],a=(0,jR.default)(this.options,n.options),i=this.createGroup(A,a.marginTop,this.svg);this.setGroupOptions(i,a),this.drawSvgBarcode(i,a,n),this.drawSVGText(i,a,n),A+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,Wd.calculateEncodingAttributes)(this.encodings,this.options);var A=(0,Wd.getTotalWidthOfEncodings)(this.encodings),r=(0,Wd.getMaximumHeightOfEncodings)(this.encodings),n=A+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,r),this.options.background&&this.drawRect(0,0,n,r,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(A,r,n){var a=n.data,i;r.textPosition=="top"?i=r.fontSize+r.textMargin:i=0;for(var o=0,s=0,l=0;l<a.length;l++)s=l*r.width+n.barcodePadding,a[l]==="1"?o++:o>0&&(this.drawRect(s-r.width*o,i,r.width*o,r.height,A),o=0);o>0&&this.drawRect(s-r.width*(o-1),i,r.width*o,r.height,A)}},{key:"drawSVGText",value:function(A,r,n){var a=this.document.createElementNS(Dc,"text");if(r.displayValue){var i,o;a.setAttribute("style","font:"+r.fontOptions+" "+r.fontSize+"px "+r.font),r.textPosition=="top"?o=r.fontSize-r.textMargin:o=r.height+r.textMargin+r.fontSize,r.textAlign=="left"||n.barcodePadding>0?(i=0,a.setAttribute("text-anchor","start")):r.textAlign=="right"?(i=n.width-1,a.setAttribute("text-anchor","end")):(i=n.width/2,a.setAttribute("text-anchor","middle")),a.setAttribute("x",i),a.setAttribute("y",o),a.appendChild(this.document.createTextNode(n.text)),A.appendChild(a)}}},{key:"setSvgAttributes",value:function(A,r){var n=this.svg;n.setAttribute("width",A+"px"),n.setAttribute("height",r+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+A+" "+r),n.setAttribute("xmlns",Dc),n.setAttribute("version","1.1"),n.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(A,r,n){var a=this.document.createElementNS(Dc,"g");return a.setAttribute("transform","translate("+A+", "+r+")"),n.appendChild(a),a}},{key:"setGroupOptions",value:function(A,r){A.setAttribute("style","fill:"+r.lineColor+";")}},{key:"drawRect",value:function(A,r,n,a,i){var o=this.document.createElementNS(Dc,"rect");return o.setAttribute("x",A),o.setAttribute("y",r),o.setAttribute("width",n),o.setAttribute("height",a),i.appendChild(o),o}}]),t}();Pd.default=GR;var _d={};Object.defineProperty(_d,"__esModule",{value:!0});var zR=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}();function YR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var XR=function(){function t(e,A,r){YR(this,t),this.object=e,this.encodings=A,this.options=r}return zR(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();_d.default=XR,Object.defineProperty(kd,"__esModule",{value:!0});var qR=Hd,$R=Zd(qR),eI=Pd,tI=Zd(eI),AI=_d,rI=Zd(AI);function Zd(t){return t&&t.__esModule?t:{default:t}}kd.default={CanvasRenderer:$R.default,SVGRenderer:tI.default,ObjectRenderer:rI.default};var uo={};Object.defineProperty(uo,"__esModule",{value:!0});function jd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jd(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 nI=function(t){Kd(e,t);function e(A,r){jd(this,e);var n=Jd(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.name="InvalidInputException",n.symbology=A,n.input=r,n.message='"'+n.input+'" is not a valid input for '+n.symbology,n}return e}(Error),aI=function(t){Kd(e,t);function e(){jd(this,e);var A=Jd(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return A.name="InvalidElementException",A.message="Not supported type to render on",A}return e}(Error),iI=function(t){Kd(e,t);function e(){jd(this,e);var A=Jd(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return A.name="NoElementException",A.message="No element to render on.",A}return e}(Error);uo.InvalidInputException=nI,uo.InvalidElementException=aI,uo.NoElementException=iI,Object.defineProperty(Ld,"__esModule",{value:!0});var oI=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},sI=Od,Gd=vv(sI),lI=kd,Ws=vv(lI),cI=uo;function vv(t){return t&&t.__esModule?t:{default:t}}function zd(t){if(typeof t=="string")return uI(t);if(Array.isArray(t)){for(var e=[],A=0;A<t.length;A++)e.push(zd(t[A]));return e}else{if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLImageElement)return fI(t);if(t&&t.nodeName&&t.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&t instanceof SVGElement)return{element:t,options:(0,Gd.default)(t),renderer:Ws.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)return{element:t,options:(0,Gd.default)(t),renderer:Ws.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:Ws.default.CanvasRenderer};if(t&&(typeof t>"u"?"undefined":oI(t))==="object"&&!t.nodeName)return{element:t,renderer:Ws.default.ObjectRenderer};throw new cI.InvalidElementException}}function uI(t){var e=document.querySelectorAll(t);if(e.length!==0){for(var A=[],r=0;r<e.length;r++)A.push(zd(e[r]));return A}}function fI(t){var e=document.createElement("canvas");return{element:e,options:(0,Gd.default)(t),renderer:Ws.default.CanvasRenderer,afterRender:function(){t.setAttribute("src",e.toDataURL())}}}Ld.default=zd;var Yd={};Object.defineProperty(Yd,"__esModule",{value:!0});var hI=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}();function dI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var pI=function(){function t(e){dI(this,t),this.api=e}return hI(t,[{key:"handleCatch",value:function(A){if(A.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw A.message;else throw A;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(A){try{var r=A.apply(void 0,arguments);return this.api._options.valid(!0),r}catch(n){return this.handleCatch(n),this.api}}}]),t}();Yd.default=pI;var gI=ud,ui=va(gI),mI=co,_s=va(mI),vI=Vd,Bv=va(vI),BI=Md,wv=va(BI),wI=Ld,yI=va(wI),bI=kc,CI=va(bI),EI=Yd,UI=va(EI),yv=uo,FI=Hc,bv=va(FI);function va(t){return t&&t.__esModule?t:{default:t}}var Gn=function(){},Pc=function(e,A,r){var n=new Gn;if(typeof e>"u")throw Error("No element to render on was provided.");return n._renderProperties=(0,yI.default)(e),n._encodings=[],n._options=bv.default,n._errorHandler=new UI.default(n),typeof A<"u"&&(r=r||{},r.format||(r.format=Uv()),n.options(r)[r.format](A,r).render()),n};Pc.getModule=function(t){return ui.default[t]};for(var Cv in ui.default)ui.default.hasOwnProperty(Cv)&&NI(ui.default,Cv);function NI(t,e){Gn.prototype[e]=Gn.prototype[e.toUpperCase()]=Gn.prototype[e.toLowerCase()]=function(A,r){var n=this;return n._errorHandler.wrapBarcodeCall(function(){r.text=typeof r.text>"u"?void 0:""+r.text;var a=(0,_s.default)(n._options,r);a=(0,CI.default)(a);var i=t[e],o=Ev(A,i,a);return n._encodings.push(o),n})}}function Ev(t,e,A){t=""+t;var r=new e(t,A);if(!r.valid())throw new yv.InvalidInputException(r.constructor.name,t);var n=r.encode();n=(0,Bv.default)(n);for(var a=0;a<n.length;a++)n[a].options=(0,_s.default)(A,n[a].options);return n}function Uv(){return ui.default.CODE128?"CODE128":Object.keys(ui.default)[0]}Gn.prototype.options=function(t){return this._options=(0,_s.default)(this._options,t),this},Gn.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},Gn.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 A=(0,_s.default)(this._options,t.options);A.format=="auto"&&(A.format=Uv()),this._errorHandler.wrapBarcodeCall(function(){var r=A.value,n=ui.default[A.format.toUpperCase()],a=Ev(r,n,A);Xd(t,a,A)})}}},Gn.prototype.render=function(){if(!this._renderProperties)throw new yv.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)Xd(this._renderProperties[t],this._encodings,this._options);else Xd(this._renderProperties,this._encodings,this._options);return this},Gn.prototype._defaults=bv.default;function Xd(t,e,A){e=(0,Bv.default)(e);for(var r=0;r<e.length;r++)e[r].options=(0,_s.default)(A,e[r].options),(0,wv.default)(e[r].options);(0,wv.default)(A);var n=t.renderer,a=new n(t.element,e,A);a.render(),t.afterRender&&t.afterRender()}typeof window<"u"&&(window.JsBarcode=Pc),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(t,e){var A=[];return jQuery(this).each(function(){A.push(this)}),Pc(A,t,e)});var SI=Pc;const qd=ld(SI),Dq="",QI={__name:"BarcodeComponent",props:{modelValue:{type:Object,required:!0,default:()=>({})},propsConfig:{type:Object,required:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const A=t,r=e,{watchCoordinates:n,initCoordinates:a}=Qs(A,r),i=f.ref(null);f.computed(()=>A.modelValue.__selected||!1);const o=f.computed(()=>({width:"100%",height:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",boxSizing:"border-box"})),s=(g,h)=>{let w;return function(...C){const v=()=>{clearTimeout(w),g(...C)};clearTimeout(w),w=setTimeout(v,h)}},l=f.ref({value:"",type:"",lineColor:"",codeType:""}),u=()=>{var F,Q,M,L,V,k,W,T,N,E,x,O,j,G,Y,K;if(!i.value)return;const g=di((Q=(F=A.propsConfig)==null?void 0:F.barcode)==null?void 0:Q.propertyPanel)||{};let h=((M=A.modelValue)==null?void 0:M.BarcodeValue)||g.BarcodeValue||"";if(!h&&((L=A.modelValue)!=null&&L.FieldName))if(Array.isArray(A.modelValue.FieldName)){const q=A.modelValue.FieldName.map(ee=>{var ie,S,H,z;return((z=(H=(S=(ie=A.modelValue)==null?void 0:ie.options)==null?void 0:S.fields)==null?void 0:H.find(Z=>Z.value==ee))==null?void 0:z.label)||ee}).filter(ee=>ee);if(q.length>0){const ee=A.modelValue.FieldConnector||" ";h=q.join(ee)}}else h=((T=(W=(k=(V=A.modelValue)==null?void 0:V.options)==null?void 0:k.fields)==null?void 0:W.find(q=>{var ee;return q.value==((ee=A.modelValue)==null?void 0:ee.FieldName)}))==null?void 0:T.label)||((N=A.modelValue)==null?void 0:N.FieldName)||"";const w=((E=A.modelValue)==null?void 0:E.CodeType)||g.CodeType||"",B=A.modelValue.LineColor||g.LineColor,C=((K=(Y=(G=(j=(O=(x=A.propsConfig)==null?void 0:x.barcode)==null?void 0:O.propertyPanel)==null?void 0:j.find(q=>q.prop==="CodeType"))==null?void 0:G.options)==null?void 0:Y.find(q=>q.value===w))==null?void 0:K.compValue)||"",v={value:h,type:w,lineColor:B,codeType:C};if(JSON.stringify(v)!==JSON.stringify(l.value)){l.value=v;try{const q=i.value;q.innerHTML="",qd(q,h,{format:C,width:2,displayValue:!1,margin:0,lineColor:B,height:50,background:"transparent"}),f.nextTick(()=>{if(q){const ee=q.getBBox();if(ee.width>0&&ee.height>0){const ie=`${ee.x} ${ee.y} ${ee.width} ${ee.height}`;q.setAttribute("viewBox",ie),q.style.width="100%",q.style.height="100%",q.setAttribute("preserveAspectRatio","none")}}})}catch{}}},d=s(u,100);return f.onMounted(()=>{u(),a(),n()}),f.watch(()=>A.modelValue,()=>d(),{deep:!0}),f.watch(()=>A.propsConfig,()=>d(),{deep:!0}),(g,h)=>(f.openBlock(),f.createElementBlock("div",{class:"barcode-component",style:f.normalizeStyle(o.value)},[(f.openBlock(),f.createElementBlock("svg",{ref_key:"barcodeRef",ref:i,width:"100%",height:"100%",preserveAspectRatio:"none",style:{width:"100%",height:"100%"}},null,512))],4))}},TI={__name:"BarcodePropertyPanel",props:{modelValue:{type:Object,required:!0},propsConfig:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(t){return(e,A)=>(f.openBlock(),f.createBlock(Ao,{"model-value":t.modelValue,"props-config":t.propsConfig,"panel-type":"barcode",options:t.options,"onUpdate:modelValue":A[0]||(A[0]=r=>e.$emit("update:modelValue",r))},null,8,["model-value","props-config","options"]))}},xI={},RI={t:"1745910558248",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1784"};function II(t,e){return f.openBlock(),f.createElementBlock("svg",RI,[...e[0]||(e[0]=[f.createElementVNode("path",{d:"M0 0m0 0l1024 0q0 0 0 0l0 1024q0 0 0 0l-1024 0q0 0 0 0l0-1024q0 0 0 0Z","fill-opacity":"0","p-id":"1785"},null,-1),f.createElementVNode("path",{d:"M388.592 912H195.92C150.24 912 112 871.696 112 823.44V642.848c0-15.92 11.424-28.368 26.816-28.368s26.816 11.952 26.816 28.368v180.592c0 17.92 13.408 32.336 30.288 32.336h192.16c15.408 0 26.832 11.952 26.832 28.368 0 15.424-11.424 27.856-26.32 27.856z m439.456 0h-192.16c-15.408 0-26.816-11.936-26.816-28.352 0-15.92 11.408-28.368 26.8-28.368h192.176c16.88 0 30.288-13.92 30.288-32.32V642.336c0-15.92 11.424-28.368 26.816-28.368s26.816 11.952 26.816 28.368v180.592c0 48.752-38.24 89.056-83.92 89.056zM138.816 409.504c-15.392 0-26.816-11.936-26.816-28.352V201.056C112 152.8 150.24 112.48 195.92 112.48h192.16c15.408 0 26.832 11.936 26.832 28.352 0 15.92-11.424 28.368-26.816 28.368H195.92c-16.88 0-30.288 15.92-30.288 34.32V384.16c0 13.44-11.424 25.36-26.816 25.36zM885.184 409.52c-15.392 0-26.816-11.952-26.816-28.368V201.056c0-17.92-13.408-32.336-30.288-32.336h-192.16c-15.408 0-26.832-11.936-26.832-28.368 0-15.92 11.424-28.352 26.816-28.352h192.176C873.76 112 912 152.304 912 200.56v180.592c0 16.416-13.408 28.368-26.816 28.368zM755.2 326v372c0 3.6 2.56 6 6.4 6 3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6-3.84 0-6.4 2.4-6.4 6zM672 698c0 3.6 2.56 6 6.4 6h38.4c3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6h-38.4c-3.84 0-6.4 2.4-6.4 6v372zM608 326v372c0 3.6 2.56 6 6.4 6h12.8c3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6h-12.8c-3.84 0-6.4 2.4-6.4 6zM560 326v372c0 3.6 2.56 6 6.4 6 3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6-3.84 0-6.4 2.4-6.4 6zM512 698c0 3.6 2.56 6 6.4 6 3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6-3.84 0-6.4 2.4-6.4 6v372zM336 698c0 3.6 2.56 6 6.4 6h12.8c3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6h-12.8c-3.84 0-6.4 2.4-6.4 6v372zM256 326v372c0 3.6 2.56 6 6.4 6h38.4c3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6h-38.4c-3.84 0-6.4 2.4-6.4 6zM400 698c0 3.6 2.56 6 6.4 6h64c3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6h-64c-3.84 0-6.4 2.4-6.4 6v372z","p-id":"1786"},null,-1)])])}const VI=jA(xI,[["render",II]]),Ba=t=>t*3.7795275591,fo=t=>t/3.7795275591;var wa={},MI=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Fv={},Dr={};let $d;const LI=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Dr.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17},Dr.getSymbolTotalCodewords=function(e){return LI[e]},Dr.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e},Dr.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');$d=e},Dr.isKanjiModeEnabled=function(){return typeof $d<"u"},Dr.toSJIS=function(e){return $d(e)};var Wc={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(A){if(typeof A!="string")throw new Error("Param is not a string");switch(A.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+A)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,n){if(t.isValid(r))return r;try{return e(r)}catch{return n}}})(Wc);function Nv(){this.buffer=[],this.length=0}Nv.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let A=0;A<e;A++)this.putBit((t>>>e-A-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var OI=Nv;function Zs(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Zs.prototype.set=function(t,e,A,r){const n=t*this.size+e;this.data[n]=A,r&&(this.reservedBit[n]=!0)},Zs.prototype.get=function(t,e){return this.data[t*this.size+e]},Zs.prototype.xor=function(t,e,A){this.data[t*this.size+e]^=A},Zs.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var kI=Zs,Sv={};(function(t){const e=Dr.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const n=Math.floor(r/7)+2,a=e(r),i=a===145?26:Math.ceil((a-13)/(2*n-2))*2,o=[a-7];for(let s=1;s<n-1;s++)o[s]=o[s-1]-i;return o.push(6),o.reverse()},t.getPositions=function(r){const n=[],a=t.getRowColCoords(r),i=a.length;for(let o=0;o<i;o++)for(let s=0;s<i;s++)o===0&&s===0||o===0&&s===i-1||o===i-1&&s===0||n.push([a[o],a[s]]);return n}})(Sv);var Qv={};const HI=Dr.getSymbolSize,Tv=7;Qv.getPositions=function(e){const A=HI(e);return[[0,0],[A-Tv,0],[0,A-Tv]]};var xv={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){const a=n.size;let i=0,o=0,s=0,l=null,u=null;for(let d=0;d<a;d++){o=s=0,l=u=null;for(let g=0;g<a;g++){let h=n.get(d,g);h===l?o++:(o>=5&&(i+=e.N1+(o-5)),l=h,o=1),h=n.get(g,d),h===u?s++:(s>=5&&(i+=e.N1+(s-5)),u=h,s=1)}o>=5&&(i+=e.N1+(o-5)),s>=5&&(i+=e.N1+(s-5))}return i},t.getPenaltyN2=function(n){const a=n.size;let i=0;for(let o=0;o<a-1;o++)for(let s=0;s<a-1;s++){const l=n.get(o,s)+n.get(o,s+1)+n.get(o+1,s)+n.get(o+1,s+1);(l===4||l===0)&&i++}return i*e.N2},t.getPenaltyN3=function(n){const a=n.size;let i=0,o=0,s=0;for(let l=0;l<a;l++){o=s=0;for(let u=0;u<a;u++)o=o<<1&2047|n.get(l,u),u>=10&&(o===1488||o===93)&&i++,s=s<<1&2047|n.get(u,l),u>=10&&(s===1488||s===93)&&i++}return i*e.N3},t.getPenaltyN4=function(n){let a=0;const i=n.data.length;for(let s=0;s<i;s++)a+=n.data[s];return Math.abs(Math.ceil(a*100/i/5)-10)*e.N4};function A(r,n,a){switch(r){case t.Patterns.PATTERN000:return(n+a)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return a%3===0;case t.Patterns.PATTERN011:return(n+a)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(a/3))%2===0;case t.Patterns.PATTERN101:return n*a%2+n*a%3===0;case t.Patterns.PATTERN110:return(n*a%2+n*a%3)%2===0;case t.Patterns.PATTERN111:return(n*a%3+(n+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(n,a){const i=a.size;for(let o=0;o<i;o++)for(let s=0;s<i;s++)a.isReserved(s,o)||a.xor(s,o,A(n,s,o))},t.getBestMask=function(n,a){const i=Object.keys(t.Patterns).length;let o=0,s=1/0;for(let l=0;l<i;l++){a(l),t.applyMask(l,n);const u=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(l,n),u<s&&(s=u,o=l)}return o}})(xv);var _c={};const ya=Wc,Zc=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],jc=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];_c.getBlocksCount=function(e,A){switch(A){case ya.L:return Zc[(e-1)*4+0];case ya.M:return Zc[(e-1)*4+1];case ya.Q:return Zc[(e-1)*4+2];case ya.H:return Zc[(e-1)*4+3];default:return}},_c.getTotalCodewordsCount=function(e,A){switch(A){case ya.L:return jc[(e-1)*4+0];case ya.M:return jc[(e-1)*4+1];case ya.Q:return jc[(e-1)*4+2];case ya.H:return jc[(e-1)*4+3];default:return}};var Rv={},Jc={};const js=new Uint8Array(512),Kc=new Uint8Array(256);(function(){let e=1;for(let A=0;A<255;A++)js[A]=e,Kc[e]=A,e<<=1,e&256&&(e^=285);for(let A=255;A<512;A++)js[A]=js[A-255]})(),Jc.log=function(e){if(e<1)throw new Error("log("+e+")");return Kc[e]},Jc.exp=function(e){return js[e]},Jc.mul=function(e,A){return e===0||A===0?0:js[Kc[e]+Kc[A]]},function(t){const e=Jc;t.mul=function(r,n){const a=new Uint8Array(r.length+n.length-1);for(let i=0;i<r.length;i++)for(let o=0;o<n.length;o++)a[i+o]^=e.mul(r[i],n[o]);return a},t.mod=function(r,n){let a=new Uint8Array(r);for(;a.length-n.length>=0;){const i=a[0];for(let s=0;s<n.length;s++)a[s]^=e.mul(n[s],i);let o=0;for(;o<a.length&&a[o]===0;)o++;a=a.slice(o)}return a},t.generateECPolynomial=function(r){let n=new Uint8Array([1]);for(let a=0;a<r;a++)n=t.mul(n,new Uint8Array([1,e.exp(a)]));return n}}(Rv);const Iv=Rv;function e0(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}e0.prototype.initialize=function(e){this.degree=e,this.genPoly=Iv.generateECPolynomial(this.degree)},e0.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const A=new Uint8Array(e.length+this.degree);A.set(e);const r=Iv.mod(A,this.genPoly),n=this.degree-r.length;if(n>0){const a=new Uint8Array(this.degree);return a.set(r,n),a}return r};var DI=e0,Vv={},ba={},t0={};t0.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Vn={};const Mv="[0-9]+",PI="[A-Z $%*+\\-./:]+";let Js="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Js=Js.replace(/u/g,"\\u");const WI="(?:(?![A-Z0-9 $%*+\\-./:]|"+Js+`)(?:.|[\r
|
|
5
|
+
**/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const CF=Object.prototype.hasOwnProperty,Xh=(t,e)=>CF.call(t,e),bc=t=>typeof t=="function",Ts=t=>typeof t=="string",em=t=>t!==null&&typeof t=="object";var EF=typeof global=="object"&&global&&global.Object===Object&&global;const UF=EF;var FF=typeof self=="object"&&self&&self.Object===Object&&self,NF=UF||FF||Function("return this")();const qh=NF;var SF=qh.Symbol;const Xi=SF;var tm=Object.prototype,QF=tm.hasOwnProperty,TF=tm.toString,xs=Xi?Xi.toStringTag:void 0;function xF(t){var e=QF.call(t,xs),A=t[xs];try{t[xs]=void 0;var r=!0}catch{}var n=TF.call(t);return r&&(e?t[xs]=A:delete t[xs]),n}var RF=Object.prototype,IF=RF.toString;function VF(t){return IF.call(t)}var MF="[object Null]",LF="[object Undefined]",Am=Xi?Xi.toStringTag:void 0;function rm(t){return t==null?t===void 0?LF:MF:Am&&Am in Object(t)?xF(t):VF(t)}function OF(t){return t!=null&&typeof t=="object"}var kF="[object Symbol]";function $h(t){return typeof t=="symbol"||OF(t)&&rm(t)==kF}function HF(t,e){for(var A=-1,r=t==null?0:t.length,n=Array(r);++A<r;)n[A]=e(t[A],A,t);return n}var DF=Array.isArray;const ed=DF;var PF=1/0,nm=Xi?Xi.prototype:void 0,am=nm?nm.toString:void 0;function im(t){if(typeof t=="string")return t;if(ed(t))return HF(t,im)+"";if($h(t))return am?am.call(t):"";var e=t+"";return e=="0"&&1/t==-PF?"-0":e}function om(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var WF="[object AsyncFunction]",_F="[object Function]",ZF="[object GeneratorFunction]",jF="[object Proxy]";function JF(t){if(!om(t))return!1;var e=rm(t);return e==_F||e==ZF||e==WF||e==jF}var KF=qh["__core-js_shared__"];const td=KF;var sm=function(){var t=/[^.]+$/.exec(td&&td.keys&&td.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function GF(t){return!!sm&&sm in t}var zF=Function.prototype,YF=zF.toString;function XF(t){if(t!=null){try{return YF.call(t)}catch{}try{return t+""}catch{}}return""}var qF=/[\\^$.*+?()[\]{}|]/g,$F=/^\[object .+?Constructor\]$/,e4=Function.prototype,t4=Object.prototype,A4=e4.toString,r4=t4.hasOwnProperty,n4=RegExp("^"+A4.call(r4).replace(qF,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function a4(t){if(!om(t)||GF(t))return!1;var e=JF(t)?n4:$F;return e.test(XF(t))}function i4(t,e){return t==null?void 0:t[e]}function lm(t,e){var A=i4(t,e);return a4(A)?A:void 0}function o4(t,e){return t===e||t!==t&&e!==e}var s4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l4=/^\w*$/;function c4(t,e){if(ed(t))return!1;var A=typeof t;return A=="number"||A=="symbol"||A=="boolean"||t==null||$h(t)?!0:l4.test(t)||!s4.test(t)||e!=null&&t in Object(e)}var u4=lm(Object,"create");const Rs=u4;function f4(){this.__data__=Rs?Rs(null):{},this.size=0}function h4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var d4="__lodash_hash_undefined__",p4=Object.prototype,g4=p4.hasOwnProperty;function m4(t){var e=this.__data__;if(Rs){var A=e[t];return A===d4?void 0:A}return g4.call(e,t)?e[t]:void 0}var v4=Object.prototype,B4=v4.hasOwnProperty;function w4(t){var e=this.__data__;return Rs?e[t]!==void 0:B4.call(e,t)}var y4="__lodash_hash_undefined__";function b4(t,e){var A=this.__data__;return this.size+=this.has(t)?0:1,A[t]=Rs&&e===void 0?y4:e,this}function ni(t){var e=-1,A=t==null?0:t.length;for(this.clear();++e<A;){var r=t[e];this.set(r[0],r[1])}}ni.prototype.clear=f4,ni.prototype.delete=h4,ni.prototype.get=m4,ni.prototype.has=w4,ni.prototype.set=b4;function C4(){this.__data__=[],this.size=0}function Cc(t,e){for(var A=t.length;A--;)if(o4(t[A][0],e))return A;return-1}var E4=Array.prototype,U4=E4.splice;function F4(t){var e=this.__data__,A=Cc(e,t);if(A<0)return!1;var r=e.length-1;return A==r?e.pop():U4.call(e,A,1),--this.size,!0}function N4(t){var e=this.__data__,A=Cc(e,t);return A<0?void 0:e[A][1]}function S4(t){return Cc(this.__data__,t)>-1}function Q4(t,e){var A=this.__data__,r=Cc(A,t);return r<0?(++this.size,A.push([t,e])):A[r][1]=e,this}function qi(t){var e=-1,A=t==null?0:t.length;for(this.clear();++e<A;){var r=t[e];this.set(r[0],r[1])}}qi.prototype.clear=C4,qi.prototype.delete=F4,qi.prototype.get=N4,qi.prototype.has=S4,qi.prototype.set=Q4;var T4=lm(qh,"Map");const x4=T4;function R4(){this.size=0,this.__data__={hash:new ni,map:new(x4||qi),string:new ni}}function I4(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Ec(t,e){var A=t.__data__;return I4(e)?A[typeof e=="string"?"string":"hash"]:A.map}function V4(t){var e=Ec(this,t).delete(t);return this.size-=e?1:0,e}function M4(t){return Ec(this,t).get(t)}function L4(t){return Ec(this,t).has(t)}function O4(t,e){var A=Ec(this,t),r=A.size;return A.set(t,e),this.size+=A.size==r?0:1,this}function ai(t){var e=-1,A=t==null?0:t.length;for(this.clear();++e<A;){var r=t[e];this.set(r[0],r[1])}}ai.prototype.clear=R4,ai.prototype.delete=V4,ai.prototype.get=M4,ai.prototype.has=L4,ai.prototype.set=O4;var k4="Expected a function";function Ad(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(k4);var A=function(){var r=arguments,n=e?e.apply(this,r):r[0],a=A.cache;if(a.has(n))return a.get(n);var i=t.apply(this,r);return A.cache=a.set(n,i)||a,i};return A.cache=new(Ad.Cache||ai),A}Ad.Cache=ai;var H4=500;function D4(t){var e=Ad(t,function(r){return A.size===H4&&A.clear(),r}),A=e.cache;return e}var P4=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W4=/\\(\\)?/g,_4=D4(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(P4,function(A,r,n,a){e.push(n?a.replace(W4,"$1"):r||A)}),e});const Z4=_4;function j4(t){return t==null?"":im(t)}function J4(t,e){return ed(t)?t:c4(t,e)?[t]:Z4(j4(t))}var K4=1/0;function G4(t){if(typeof t=="string"||$h(t))return t;var e=t+"";return e=="0"&&1/t==-K4?"-0":e}function z4(t,e){e=J4(e,t);for(var A=0,r=e.length;t!=null&&A<r;)t=t[G4(e[A++])];return A&&A==r?t:void 0}function Y4(t,e,A){var r=t==null?void 0:z4(t,e);return r===void 0?A:r}function X4(t){for(var e=-1,A=t==null?0:t.length,r={};++e<A;){var n=t[e];r[n[0]]=n[1]}return r}const q4=t=>t===void 0,rd=t=>typeof t=="boolean",ii=t=>typeof t=="number",$4=t=>typeof Element>"u"?!1:t instanceof Element,eN=t=>Ts(t)?!Number.isNaN(Number(t)):!1;var cm;const $i=typeof window<"u",tN=t=>typeof t=="string",AN=()=>{};$i&&((cm=window==null?void 0:window.navigator)!=null&&cm.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function nd(t){return typeof t=="function"?t():f.unref(t)}function rN(t){return t}function ad(t){return f.getCurrentScope()?(f.onScopeDispose(t),!0):!1}function nN(t,e=!0){f.getCurrentInstance()?f.onMounted(t):e?t():f.nextTick(t)}function aN(t,e,A={}){const{immediate:r=!0}=A,n=f.ref(!1);let a=null;function i(){a&&(clearTimeout(a),a=null)}function o(){n.value=!1,i()}function s(...l){i(),n.value=!0,a=setTimeout(()=>{n.value=!1,a=null,t(...l)},nd(e))}return r&&(n.value=!0,$i&&s()),ad(o),{isPending:f.readonly(n),start:s,stop:o}}function um(t){var e;const A=nd(t);return(e=A==null?void 0:A.$el)!=null?e:A}const fm=$i?window:void 0;function iN(...t){let e,A,r,n;if(tN(t[0])||Array.isArray(t[0])?([A,r,n]=t,e=fm):[e,A,r,n]=t,!e)return AN;Array.isArray(A)||(A=[A]),Array.isArray(r)||(r=[r]);const a=[],i=()=>{a.forEach(u=>u()),a.length=0},o=(u,d,g,h)=>(u.addEventListener(d,g,h),()=>u.removeEventListener(d,g,h)),s=f.watch(()=>[um(e),nd(n)],([u,d])=>{i(),u&&a.push(...A.flatMap(g=>r.map(h=>o(u,g,h,d))))},{immediate:!0,flush:"post"}),l=()=>{s(),i()};return ad(l),l}function oN(t,e=!1){const A=f.ref(),r=()=>A.value=!!t();return r(),nN(r,e),A}const hm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},dm="__vueuse_ssr_handlers__";hm[dm]=hm[dm]||{};var pm=Object.getOwnPropertySymbols,sN=Object.prototype.hasOwnProperty,lN=Object.prototype.propertyIsEnumerable,cN=(t,e)=>{var A={};for(var r in t)sN.call(t,r)&&e.indexOf(r)<0&&(A[r]=t[r]);if(t!=null&&pm)for(var r of pm(t))e.indexOf(r)<0&&lN.call(t,r)&&(A[r]=t[r]);return A};function uN(t,e,A={}){const r=A,{window:n=fm}=r,a=cN(r,["window"]);let i;const o=oN(()=>n&&"ResizeObserver"in n),s=()=>{i&&(i.disconnect(),i=void 0)},l=f.watch(()=>um(t),d=>{s(),o.value&&n&&d&&(i=new ResizeObserver(e),i.observe(d,a))},{immediate:!0,flush:"post"}),u=()=>{s(),l()};return ad(u),{isSupported:o,stop:u}}var gm;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(gm||(gm={}));var fN=Object.defineProperty,mm=Object.getOwnPropertySymbols,hN=Object.prototype.hasOwnProperty,dN=Object.prototype.propertyIsEnumerable,vm=(t,e,A)=>e in t?fN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:A}):t[e]=A,pN=(t,e)=>{for(var A in e||(e={}))hN.call(e,A)&&vm(t,A,e[A]);if(mm)for(var A of mm(e))dN.call(e,A)&&vm(t,A,e[A]);return t};pN({linear:rN},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Bm={current:0},wm=f.ref(0),ym=2e3,bm=Symbol("elZIndexContextKey"),Cm=Symbol("zIndexContextKey"),gN=t=>{const e=f.getCurrentInstance()?f.inject(bm,Bm):Bm,A=t||(f.getCurrentInstance()?f.inject(Cm,void 0):void 0),r=f.computed(()=>{const i=f.unref(A);return ii(i)?i:ym}),n=f.computed(()=>r.value+wm.value),a=()=>(e.current++,wm.value=e.current,n.value);return!$i&&f.inject(bm),{initialZIndex:r,currentZIndex:n,nextZIndex:a}};var mN={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const vN=t=>(e,A)=>BN(e,A,f.unref(t)),BN=(t,e,A)=>Y4(A,t,t).replace(/\{(\w+)\}/g,(r,n)=>{var a;return`${(a=e==null?void 0:e[n])!=null?a:`{${n}}`}`}),wN=t=>{const e=f.computed(()=>f.unref(t).name),A=f.isRef(t)?t:f.ref(t);return{lang:e,locale:A,t:vN(t)}},Em=Symbol("localeContextKey"),yN=t=>{const e=t||f.inject(Em,f.ref());return wN(f.computed(()=>e.value||mN))},Um="__epPropKey",Fr=t=>t,bN=t=>em(t)&&!!t[Um],Fm=(t,e)=>{if(!em(t)||bN(t))return t;const{values:A,required:r,default:n,type:a,validator:i}=t,s={type:a,required:!!r,validator:A||i?l=>{let u=!1,d=[];if(A&&(d=Array.from(A),Xh(t,"default")&&d.push(n),u||(u=d.includes(l))),i&&(u||(u=i(l))),!u&&d.length>0){const g=[...new Set(d)].map(h=>JSON.stringify(h)).join(", ");f.warn(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${g}], got value ${JSON.stringify(l)}.`)}return u}:void 0,[Um]:!0};return Xh(t,"default")&&(s.default=n),s},Is=t=>X4(Object.entries(t).map(([e,A])=>[e,Fm(A,e)])),CN=Fm({type:String,values:["","default","small","large"],required:!1}),EN=Symbol("size"),UN=Symbol("emptyValuesContextKey"),FN=Is({emptyValues:Array,valueOnClear:{type:Fr([String,Number,Boolean,Function]),default:void 0,validator:t=>bc(t)?!t():!t}}),Nm=t=>Object.keys(t),Uc=f.ref();function Sm(t,e=void 0){const A=f.getCurrentInstance()?f.inject(q2,Uc):Uc;return t?f.computed(()=>{var r,n;return(n=(r=A.value)==null?void 0:r[t])!=null?n:e}):A}function NN(t,e){const A=Sm(),r=Yh(t,f.computed(()=>{var o;return((o=A.value)==null?void 0:o.namespace)||yc})),n=yN(f.computed(()=>{var o;return(o=A.value)==null?void 0:o.locale})),a=gN(f.computed(()=>{var o;return((o=A.value)==null?void 0:o.zIndex)||ym})),i=f.computed(()=>{var o;return f.unref(e)||((o=A.value)==null?void 0:o.size)||""});return Qm(f.computed(()=>f.unref(A)||{})),{ns:r,locale:n,zIndex:a,size:i}}const Qm=(t,e,A=!1)=>{var r;const n=!!f.getCurrentInstance(),a=n?Sm():void 0,i=(r=e==null?void 0:e.provide)!=null?r:n?f.provide:void 0;if(!i)return;const o=f.computed(()=>{const s=f.unref(t);return a!=null&&a.value?SN(a.value,s):s});return i(q2,o),i(Em,f.computed(()=>o.value.locale)),i($2,f.computed(()=>o.value.namespace)),i(Cm,f.computed(()=>o.value.zIndex)),i(EN,{size:f.computed(()=>o.value.size||"")}),i(UN,f.computed(()=>({emptyValues:o.value.emptyValues,valueOnClear:o.value.valueOnClear}))),(A||!Uc.value)&&(Uc.value=o.value),o},SN=(t,e)=>{const A=[...new Set([...Nm(t),...Nm(e)])],r={};for(const n of A)r[n]=e[n]!==void 0?e[n]:t[n];return r};var id=(t,e)=>{const A=t.__vccOpts||t;for(const[r,n]of e)A[r]=n;return A};function od(t,e="px"){if(!t)return"";if(ii(t)||eN(t))return`${t}${e}`;if(Ts(t))return t}function Mq(t,e){}const Tm=(t,e)=>{if(t.install=A=>{for(const r of[t,...Object.values(e??{})])A.component(r.name,r)},e)for(const[A,r]of Object.entries(e))t[A]=r;return t},QN=(t,e)=>(t.install=A=>{t._context=A._context,A.config.globalProperties[e]=t},t),TN=Is({size:{type:Fr([Number,String])},color:{type:String}}),xN=f.defineComponent({name:"ElIcon",inheritAttrs:!1}),RN=f.defineComponent({...xN,props:TN,setup(t){const e=t,A=Yh("icon"),r=f.computed(()=>{const{size:n,color:a}=e;return!n&&!a?{}:{fontSize:q4(n)?void 0:od(n),"--color":a}});return(n,a)=>(f.openBlock(),f.createElementBlock("i",f.mergeProps({class:f.unref(A).b(),style:f.unref(r)},n.$attrs),[f.renderSlot(n.$slots,"default")],16))}});var IN=id(RN,[["__file","icon.vue"]]);const xm=Tm(IN);/*! Element Plus Icons Vue v2.3.2 */var VN=f.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,A)=>(f.openBlock(),f.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Rm=VN,MN=f.defineComponent({name:"Close",__name:"close",setup(t){return(e,A)=>(f.openBlock(),f.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),LN=MN,ON=f.defineComponent({name:"InfoFilled",__name:"info-filled",setup(t){return(e,A)=>(f.openBlock(),f.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),sd=ON,kN=f.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,A)=>(f.openBlock(),f.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Im=kN,HN=f.defineComponent({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,A)=>(f.openBlock(),f.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[f.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),Vm=HN;const DN=Fr([String,Object,Function]),PN={Close:LN,SuccessFilled:Im,InfoFilled:sd,WarningFilled:Vm,CircleCloseFilled:Rm},Mm={primary:sd,success:Im,warning:Vm,error:Rm,info:sd},WN=t=>t,_N={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},ZN=Is({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:Fr([String,Object,Array])},offset:{type:Fr(Array),default:[0,0]},badgeClass:{type:String}}),jN=f.defineComponent({name:"ElBadge"}),JN=f.defineComponent({...jN,props:ZN,setup(t,{expose:e}){const A=t,r=Yh("badge"),n=f.computed(()=>A.isDot?"":ii(A.value)&&ii(A.max)?A.max<A.value?`${A.max}+`:`${A.value}`:`${A.value}`),a=f.computed(()=>{var i,o,s,l,u;return[{backgroundColor:A.color,marginRight:od(-((o=(i=A.offset)==null?void 0:i[0])!=null?o:0)),marginTop:od((l=(s=A.offset)==null?void 0:s[1])!=null?l:0)},(u=A.badgeStyle)!=null?u:{}]});return e({content:n}),(i,o)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(f.unref(r).b())},[f.renderSlot(i.$slots,"default"),f.createVNode(f.Transition,{name:`${f.unref(r).namespace.value}-zoom-in-center`,persisted:""},{default:f.withCtx(()=>[f.withDirectives(f.createElementVNode("sup",{class:f.normalizeClass([f.unref(r).e("content"),f.unref(r).em("content",i.type),f.unref(r).is("fixed",!!i.$slots.default),f.unref(r).is("dot",i.isDot),f.unref(r).is("hide-zero",!i.showZero&&A.value===0),i.badgeClass]),style:f.normalizeStyle(f.unref(a))},[f.renderSlot(i.$slots,"content",{value:f.unref(n)},()=>[f.createTextVNode(f.toDisplayString(f.unref(n)),1)])],6),[[f.vShow,!i.hidden&&(f.unref(n)||i.isDot||i.$slots.content)]])]),_:3},8,["name"])],2))}});var KN=id(JN,[["__file","badge.vue"]]);const GN=Tm(KN);var eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ld(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}const zN=Is({a11y:{type:Boolean,default:!0},locale:{type:Fr(Object)},size:CN,button:{type:Fr(Object)},card:{type:Fr(Object)},dialog:{type:Fr(Object)},link:{type:Fr(Object)},experimentalFeatures:{type:Fr(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:Fr(Object)},zIndex:Number,namespace:{type:String,default:"el"},...FN}),nr={placement:"top"};f.defineComponent({name:"ElConfigProvider",props:zN,setup(t,{slots:e}){const A=Qm(t);return f.watch(()=>t.message,r=>{var n,a;Object.assign(nr,(a=(n=A==null?void 0:A.value)==null?void 0:n.message)!=null?a:{},r??{})},{immediate:!0,deep:!0}),()=>f.renderSlot(e,"default",{config:A==null?void 0:A.value})}});const Lm=["primary","success","info","warning","error"],Om=["top","top-left","top-right","bottom","bottom-left","bottom-right"],to="top",ar=WN({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:$i?document.body:void 0}),YN=Is({customClass:{type:String,default:ar.customClass},dangerouslyUseHTMLString:{type:Boolean,default:ar.dangerouslyUseHTMLString},duration:{type:Number,default:ar.duration},icon:{type:DN,default:ar.icon},id:{type:String,default:ar.id},message:{type:Fr([String,Object,Function]),default:ar.message},onClose:{type:Fr(Function),default:ar.onClose},showClose:{type:Boolean,default:ar.showClose},type:{type:String,values:Lm,default:ar.type},plain:{type:Boolean,default:ar.plain},offset:{type:Number,default:ar.offset},placement:{type:String,values:Om,default:ar.placement},zIndex:{type:Number,default:ar.zIndex},grouping:{type:Boolean,default:ar.grouping},repeatNum:{type:Number,default:ar.repeatNum}}),XN={destroy:()=>!0},fn=f.shallowReactive({}),qN=t=>(fn[t]||(fn[t]=f.shallowReactive([])),fn[t]),$N=(t,e)=>{const A=fn[e]||[],r=A.findIndex(i=>i.id===t),n=A[r];let a;return r>0&&(a=A[r-1]),{current:n,prev:a}},e3=(t,e)=>{const{prev:A}=$N(t,e);return A?A.vm.exposed.bottom.value:0},t3=(t,e,A)=>(fn[A]||[]).findIndex(a=>a.id===t)>0?16:e,A3=f.defineComponent({name:"ElMessage"}),r3=f.defineComponent({...A3,props:YN,emits:XN,setup(t,{expose:e,emit:A}){const r=t,{Close:n}=PN,a=f.ref(!1),{ns:i,zIndex:o}=NN("message"),{currentZIndex:s,nextZIndex:l}=o,u=f.ref(),d=f.ref(!1),g=f.ref(0);let h;const w=f.computed(()=>r.type?r.type==="error"?"danger":r.type:"info"),B=f.computed(()=>{const E=r.type;return{[i.bm("icon",E)]:E&&Mm[E]}}),C=f.computed(()=>r.icon||Mm[r.type]||""),v=f.computed(()=>r.placement||to),y=f.computed(()=>e3(r.id,v.value)),F=f.computed(()=>t3(r.id,r.offset,v.value)+y.value),Q=f.computed(()=>g.value+F.value),M=f.computed(()=>v.value.includes("left")?i.is("left"):v.value.includes("right")?i.is("right"):i.is("center")),L=f.computed(()=>v.value.startsWith("top")?"top":"bottom"),V=f.computed(()=>({[L.value]:`${F.value}px`,zIndex:s.value}));function k(){r.duration!==0&&({stop:h}=aN(()=>{T()},r.duration))}function W(){h==null||h()}function T(){d.value=!1,f.nextTick(()=>{var E;a.value||((E=r.onClose)==null||E.call(r),A("destroy"))})}function N({code:E}){E===_N.esc&&T()}return f.onMounted(()=>{k(),l(),d.value=!0}),f.watch(()=>r.repeatNum,()=>{W(),k()}),iN(document,"keydown",N),uN(u,()=>{g.value=u.value.getBoundingClientRect().height}),e({visible:d,bottom:Q,close:T}),(E,x)=>(f.openBlock(),f.createBlock(f.Transition,{name:f.unref(i).b("fade"),onBeforeEnter:O=>a.value=!0,onBeforeLeave:E.onClose,onAfterLeave:O=>E.$emit("destroy"),persisted:""},{default:f.withCtx(()=>[f.withDirectives(f.createElementVNode("div",{id:E.id,ref_key:"messageRef",ref:u,class:f.normalizeClass([f.unref(i).b(),{[f.unref(i).m(E.type)]:E.type},f.unref(i).is("closable",E.showClose),f.unref(i).is("plain",E.plain),f.unref(i).is("bottom",f.unref(L)==="bottom"),f.unref(M),E.customClass]),style:f.normalizeStyle(f.unref(V)),role:"alert",onMouseenter:W,onMouseleave:k},[E.repeatNum>1?(f.openBlock(),f.createBlock(f.unref(GN),{key:0,value:E.repeatNum,type:f.unref(w),class:f.normalizeClass(f.unref(i).e("badge"))},null,8,["value","type","class"])):f.createCommentVNode("v-if",!0),f.unref(C)?(f.openBlock(),f.createBlock(f.unref(xm),{key:1,class:f.normalizeClass([f.unref(i).e("icon"),f.unref(B)])},{default:f.withCtx(()=>[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.unref(C))))]),_:1},8,["class"])):f.createCommentVNode("v-if",!0),f.renderSlot(E.$slots,"default",{},()=>[E.dangerouslyUseHTMLString?(f.openBlock(),f.createElementBlock(f.Fragment,{key:1},[f.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),f.createElementVNode("p",{class:f.normalizeClass(f.unref(i).e("content")),innerHTML:E.message},null,10,["innerHTML"])],2112)):(f.openBlock(),f.createElementBlock("p",{key:0,class:f.normalizeClass(f.unref(i).e("content"))},f.toDisplayString(E.message),3))]),E.showClose?(f.openBlock(),f.createBlock(f.unref(xm),{key:2,class:f.normalizeClass(f.unref(i).e("closeBtn")),onClick:f.withModifiers(T,["stop"])},{default:f.withCtx(()=>[f.createVNode(f.unref(n))]),_:1},8,["class","onClick"])):f.createCommentVNode("v-if",!0)],46,["id"]),[[f.vShow,d.value]])]),_:3},8,["name","onBeforeEnter","onBeforeLeave","onAfterLeave"]))}});var n3=id(r3,[["__file","message.vue"]]);let a3=1;const i3=t=>{if(!t.appendTo)t.appendTo=document.body;else if(Ts(t.appendTo)){let A=document.querySelector(t.appendTo);$4(A)||(A=document.body),t.appendTo=A}},o3=t=>{!t.placement&&Ts(nr.placement)&&nr.placement&&(t.placement=nr.placement),t.placement||(t.placement=to),Om.includes(t.placement)||(`${t.placement}${to}`,t.placement=to)},km=t=>{const e=!t||Ts(t)||f.isVNode(t)||bc(t)?{message:t}:t,A={...ar,...e};return i3(A),o3(A),rd(nr.grouping)&&!A.grouping&&(A.grouping=nr.grouping),ii(nr.duration)&&A.duration===3e3&&(A.duration=nr.duration),ii(nr.offset)&&A.offset===16&&(A.offset=nr.offset),rd(nr.showClose)&&!A.showClose&&(A.showClose=nr.showClose),rd(nr.plain)&&!A.plain&&(A.plain=nr.plain),A},s3=t=>{const e=t.props.placement||to,A=fn[e],r=A.indexOf(t);if(r===-1)return;A.splice(r,1);const{handler:n}=t;n.close()},l3=({appendTo:t,...e},A)=>{const r=`message_${a3++}`,n=e.onClose,a=document.createElement("div"),i={...e,id:r,onClose:()=>{n==null||n(),s3(u)},onDestroy:()=>{f.render(null,a)}},o=f.createVNode(n3,i,bc(i.message)||f.isVNode(i.message)?{default:bc(i.message)?i.message:()=>i.message}:null);o.appContext=A||oi._context,f.render(o,a),t.appendChild(a.firstElementChild);const s=o.component,u={id:r,vnode:o,vm:s,handler:{close:()=>{s.exposed.close()}},props:o.component.props};return u},oi=(t={},e)=>{if(!$i)return{close:()=>{}};const A=km(t),r=qN(A.placement||to);if(A.grouping&&r.length){const a=r.find(({vnode:i})=>{var o;return((o=i.props)==null?void 0:o.message)===A.message});if(a)return a.props.repeatNum+=1,a.props.type=A.type,a.handler}if(ii(nr.max)&&r.length>=nr.max)return{close:()=>{}};const n=l3(A,e);return r.push(n),n.handler};Lm.forEach(t=>{oi[t]=(e={},A)=>{const r=km(e);return oi({...r,type:t},A)}});function c3(t){for(const e in fn)if(Xh(fn,e)){const A=[...fn[e]];for(const r of A)(!t||t===r.props.type)&&r.handler.close()}}function u3(t){if(!fn[t])return;[...fn[t]].forEach(A=>A.handler.close())}oi.closeAll=c3,oi.closeAllByPlacement=u3,oi._context=null;const Vs=QN(oi,"$message"),Lq="",jA=(t,e)=>{const A=t.__vccOpts||t;for(const[r,n]of e)A[r]=n;return A},f3={class:"property-item"},h3={key:0,class:"label"},d3=["innerHTML"],p3={key:4,class:"file-input-container"},g3=["disabled"],m3={key:1},v3=["accept"],B3=["type","min","max","step"],cd=jA({__name:"PropertyItem",props:{label:String,modelValue:[String,Number,Boolean],type:{type:String,default:"text"},options:{type:Array,default:()=>[]},min:Number,max:Number,step:Number,accept:String,desc:String,multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change","rotationChange"],setup(t,{emit:e}){const A=t,r=e,n=f.ref(null),a=f.ref(!1),i=f.ref(null),o=f.ref(null),s=f.inject("config",{}),l=(v="")=>{var y,F;return((F=(y=A.options)==null?void 0:y.find(Q=>(Q==null?void 0:Q.value)==v))==null?void 0:F.value)??" "},u=f.computed({get:()=>{const v=A.modelValue;if(A.type==="select"){if(!A.multiple)return l(v);if(typeof v=="string"){let y=l(v);return y=y&&y.trim()?[y]:[],y}return Array.isArray(v)?v.map(F=>l(F)):[]}return v},set:v=>{A.type==="select"&&A.multiple?Array.isArray(v)&&v.length===1?r("update:modelValue",v[0]):Array.isArray(v)&&v.length>1?r("update:modelValue",v):r("update:modelValue",""):r("update:modelValue",v)}}),d=v=>{r("change",v),A.label==="旋转角度"&&typeof v=="number"&&r("rotationChange",v)},g=f.computed({get:()=>u.value?typeof u.value=="object"&&u.value.fileSrc?u.value.fileSrc.startsWith("http://")||u.value.fileSrc.startsWith("https://")?u.value.fileSrc:u.value.fileSrc.startsWith("data:")?u.value.fileName||"已选择的图片":u.value.fileName||u.value.fileSrc:typeof u.value=="string"&&u.value.startsWith("data:")?"已选择的图片":u.value:"",set:v=>{u.value=v}}),h=()=>{n.value&&!a.value&&n.value.click()},w=v=>{const y=v.target.value.trim();y?y.startsWith("http://")||y.startsWith("https://")||y.startsWith("data:")?u.value=y:y.startsWith("data:")||(u.value=y):u.value=""},B=async v=>{var M;const y=v.target.files[0];if(!y)return;if(A.accept&&!y.type.match(A.accept.replace("*",".*"))){alert("请选择正确的文件类型");return}const F=(M=s==null?void 0:s.image)==null?void 0:M.request;if(!F||typeof F!="function"){handleFileAsBase64(y);return}o.value=y;let Q=null;try{a.value=!0,Q=F(y),i.value=Q;const L=await Q;if(i.value===Q&&o.value===y)if(L&&L.success!==!1){let k=L.url||L.data||L;try{const T=await C(y);T&&(k=T)}catch{}const W={fileName:y.name,fileSrc:k,uploadResult:L};r("update:modelValue",W),r("change",v),Vs.success("图片上传成功")}else throw new Error((L==null?void 0:L.message)||"上传失败")}catch(L){i.value===Q&&o.value===y&&(n.value&&(n.value.value=""),Vs.error(L.message||"上传失败,请重试"))}finally{i.value===Q&&(a.value=!1,i.value=null,o.value=null)}},C=v=>new Promise((y,F)=>{const M=v.size>5242880;if(v.type.startsWith("image/"))if(M){const L=new Image,V=document.createElement("canvas"),k=V.getContext("2d"),W=setTimeout(()=>{F(new Error("转换超时"))},8e3);L.onload=()=>{clearTimeout(W);try{let{width:E,height:x}=L;if(E>1920||x>1920){const j=Math.min(1920/E,1920/x);E=Math.floor(E*j),x=Math.floor(x*j)}V.width=E,V.height=x,k.drawImage(L,0,0,E,x);const O=V.toDataURL("image/jpeg",.8);y(O)}catch(N){F(N)}finally{URL.revokeObjectURL(L.src)}},L.onerror=()=>{clearTimeout(W),F(new Error("图片加载失败"))};const T=URL.createObjectURL(v);L.src=T}else{const L=new FileReader,V=setTimeout(()=>{F(new Error("转换超时"))},5e3);L.onload=k=>{clearTimeout(V),y(k.target.result)},L.onerror=()=>{clearTimeout(V),F(new Error("文件读取失败"))},L.readAsDataURL(v)}else{const L=new FileReader,V=setTimeout(()=>{F(new Error("转换超时"))},5e3);L.onload=k=>{clearTimeout(V),y(k.target.result)},L.onerror=()=>{clearTimeout(V),F(new Error("文件读取失败"))},L.readAsDataURL(v)}});return f.onUnmounted(()=>{i.value=null,o.value=null}),(v,y)=>{const F=f.resolveComponent("el-icon-question-filled"),Q=f.resolveComponent("el-icon"),M=f.resolveComponent("el-tooltip"),L=f.resolveComponent("el-option"),V=f.resolveComponent("el-select"),k=f.resolveComponent("el-icon-loading");return f.openBlock(),f.createElementBlock("div",f3,[t.label?(f.openBlock(),f.createElementBlock("label",h3,[f.createTextVNode(f.toDisplayString(t.label)+" ",1),t.desc?(f.openBlock(),f.createBlock(M,{key:0,placement:"top","show-arrow":!0},{content:f.withCtx(()=>[f.createElementVNode("p",{style:{"max-width":"260px",margin:"0","white-space":"pre-line"},innerHTML:t.desc},null,8,d3)]),default:f.withCtx(()=>[f.createVNode(Q,{class:"help-icon"},{default:f.withCtx(()=>[f.createVNode(F)]),_:1})]),_:1})):f.createCommentVNode("",!0)])):f.createCommentVNode("",!0),t.type==="select"?(f.openBlock(),f.createBlock(V,{key:1,modelValue:u.value,"onUpdate:modelValue":y[0]||(y[0]=W=>u.value=W),multiple:t.multiple,placeholder:"请选择",style:{width:"100%"},size:"small",filterable:"",onChange:d},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.options,W=>(f.openBlock(),f.createBlock(L,{key:W.value,label:W.label,value:W.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple"])):t.type==="color"?f.withDirectives((f.openBlock(),f.createElementBlock("input",{key:2,"onUpdate:modelValue":y[1]||(y[1]=W=>u.value=W),type:"color"},null,512)),[[f.vModelText,u.value]]):t.type==="checkbox"?f.withDirectives((f.openBlock(),f.createElementBlock("input",{key:3,"onUpdate:modelValue":y[2]||(y[2]=W=>u.value=W),type:"checkbox"},null,512)),[[f.vModelCheckbox,u.value]]):t.type==="file"?(f.openBlock(),f.createElementBlock("div",p3,[f.withDirectives(f.createElementVNode("input",{type:"text","onUpdate:modelValue":y[3]||(y[3]=W=>g.value=W),placeholder:"请选择图片",class:"file-url-input",onInput:w,disabled:""},null,544),[[f.vModelText,g.value]]),f.createElementVNode("button",{type:"button",onClick:h,class:"file-select-btn",disabled:a.value},[a.value?(f.openBlock(),f.createBlock(Q,{key:0,class:"is-loading"},{default:f.withCtx(()=>[f.createVNode(k)]),_:1})):(f.openBlock(),f.createElementBlock("span",m3,f.toDisplayString(a.value?"上传中...":"选择"),1))],8,g3),f.createElementVNode("input",{type:"file",accept:t.accept,onChange:B,ref_key:"fileInput",ref:n,class:"file-input"},null,40,v3)])):f.withDirectives((f.openBlock(),f.createElementBlock("input",{key:5,"onUpdate:modelValue":y[4]||(y[4]=W=>u.value=W),type:t.type,min:t.min,max:t.max,step:t.step,onWheel:y[5]||(y[5]=f.withModifiers(()=>{},["prevent"]))},null,40,B3)),[[f.vModelDynamic,u.value]])])}}},[["__scopeId","data-v-2556d9f8"]]),kq="",w3={class:"property-layout-container"},y3={key:0,class:"property-item-wrapper full-width"},b3={key:1,class:"property-item-wrapper half-width"},C3={key:2,class:"property-item-wrapper default-width"},Ao=jA({__name:"BasePropertyPanel",props:{modelValue:{type:Object,required:!0},propsConfig:{type:Object,default:()=>({})},panelType:{type:String,default:"base",validator:t=>["text","barcode","qrcode","image","rectangle","line"].includes(t)},options:{type:Object,default:()=>({})}},emits:["update:modelValue","rotationChange"],setup(t,{emit:e}){const A=t,r=e,{propsConfig:n,panelType:a}=f.toRefs(A),i=f.computed(()=>`${a.value}-property-panel`),o=f.ref([]);function s(T,N,E=[],x="",O="FieldName"){const j=[];if(Array.isArray(N))return N.forEach(G=>{const Y=s(T,G,E,x,O);j.push(...Y)}),j;if(T&&T.propertyPanel){const G=T.propertyPanel;let Y=[];Array.isArray(G)?Y=G.map(K=>({...K,_dynamic:!0,_path:x||"FieldName",_parentProp:O})):typeof G=="object"&&G!==null&&(G.prop?Y=[{...G,_dynamic:!0,_path:x||"FieldName",_parentProp:O}]:Y=Object.keys(G).map(K=>({prop:K,...G[K],_dynamic:!0,_path:x||"FieldName",_parentProp:O}))),j.push(...Y)}return j}function l(T,N,E=[],x=""){const O=[];if(!N||N===" "||!E||E.length===0)return O;const j=E.find(G=>G.value==N);if(j&&j.propertyPanel){const G=j.propertyPanel;let Y=[];Array.isArray(G)?Y=G.map(K=>({...K,_dynamic:!0,_path:`${x||T}.${N}`,_parentProp:T})):typeof G=="object"&&G!==null&&(G.prop?Y=[{...G,_dynamic:!0,_path:`${x||T}.${N}`,_parentProp:T}]:Y=Object.keys(G).map(K=>({prop:K,...G[K],_dynamic:!0,_path:`${x||T}.${N}`,_parentProp:T}))),O.push(...Y)}return O}function u(T){var N;return T.options&&Array.isArray(T.options)?T.options:T.optionsKey&&((N=A.options)!=null&&N[T.optionsKey])?A.options[T.optionsKey]||[]:[]}function d(T,N=[],E=new Set,x=0){var Y;if(x>10)return[];const O=[],j=new Set;if(x===0){const K=T.FieldName;if(K){const q=((Y=A.options)==null?void 0:Y.fields)||[];if(Array.isArray(K))K.forEach(ee=>{const ie=q.find(S=>S.value==ee);if(ie){const S=`FieldName.${ee}`;E.has(S)||(E.add(S),s(ie,ee,q,S).forEach(z=>{z.prop&&!j.has(z.prop)&&(j.add(z.prop),O.push(z))}))}});else{const ee=q.find(ie=>ie.value==K);if(ee){const ie=`FieldName.${K}`;E.has(ie)||(E.add(ie),s(ee,K,q,ie).forEach(H=>{H.prop&&!j.has(H.prop)&&(j.add(H.prop),O.push(H))}))}}}}return N.forEach(K=>{if(K.type==="select"){const q=T[K.prop];if(q!=null&&q!==""&&q!==" "){const ee=u(K);if(ee&&ee.length>0){const ie=K.prop,S=`${ie}.${q}`;if(!E.has(S)){E.add(S);const H=l(K.prop,q,ee,ie);H.length>0&&(H.forEach(Z=>{Z.prop&&!j.has(Z.prop)&&(j.add(Z.prop),O.push(Z))}),d(T,[...N,...O],E,x+1).forEach(Z=>{Z.prop&&!j.has(Z.prop)&&(j.add(Z.prop),O.push(Z))}))}}}}}),[...O].forEach(K=>{if(K.type==="select"){const q=T[K.prop];if(q!=null&&q!==""&&q!==" "){const ee=u(K);if(ee&&ee.length>0){const ie=K._path||K.prop,S=`${ie}.${q}`;if(!E.has(S)){E.add(S);const H=l(K.prop,q,ee,ie);H.length>0&&(H.forEach(Z=>{Z.prop&&!j.has(Z.prop)&&(j.add(Z.prop),O.push(Z))}),d(T,[...N,...O],E,x+1).forEach(Z=>{Z.prop&&!j.has(Z.prop)&&(j.add(Z.prop),O.push(Z))}))}}}}}),O}const g=f.computed(()=>{const T=n.value.propertyPanel;let N=[];return T&&typeof T=="object"&&!Array.isArray(T)&&(N=Object.keys(T).map(E=>({prop:E,...T[E]})).filter(E=>!E.hide)),Array.isArray(T)&&(N=T.filter(E=>!E.hide)||[]),N}),h=f.ref([]),w=f.ref(""),B=f.ref(null),C=f.computed(()=>{const T=A.modelValue||{};let N="";if(T.FieldName!==void 0){const x=Array.isArray(T.FieldName)?T.FieldName.join(","):String(T.FieldName);N+=`FieldName:${x}|`}return g.value.filter(x=>x.type==="select").map(x=>x.prop).forEach(x=>{T[x]!==void 0&&(N+=`${x}:${T[x]}|`)}),o.value.length>0&&o.value.filter(O=>O.type==="select").map(O=>O.prop).forEach(O=>{T[O]!==void 0&&(N+=`${O}:${T[O]}|`)}),w.value===N&&B.value?B.value:(w.value=N,B.value=N,N)});f.watch(()=>[C.value,g.value],(T,N)=>{const[E,x]=T||[C.value,g.value],[O]=N||[void 0];if(O&&E===O)return;const j=A.modelValue||{},G=A.modelValue||{},K=d(j,x,new Set),q=new Set(K.map(Z=>Z.prop).filter(Boolean)),ee=new Set(h.value.map(Z=>Z.prop).filter(Boolean)),ie=[];ee.forEach(Z=>{q.has(Z)||ie.push(Z)});const S=[];K.forEach(Z=>{Z.prop&&"default"in Z&&j[Z.prop]===void 0&&S.push({prop:Z.prop,defaultValue:Z.default})});const H={...j};let z=!1;ie.length>0&&G&&ie.forEach(Z=>{H[Z]!==void 0&&(delete H[Z],z=!0)}),S.length>0&&S.forEach(({prop:Z,defaultValue:re})=>{H[Z]=re,z=!0}),z&&f.nextTick(()=>{r("update:modelValue",H)}),h.value=K,o.value=K},{deep:!0,immediate:!0});const v=f.ref(null),y=f.ref({baseItemsHash:"",dynamicItemsHash:""});function F(T,N){return T.length===0?"":T.map(N).join("|")}const Q=f.computed(()=>{var z;const T=F(g.value,Z=>Z.prop||""),N=F(o.value,Z=>`${Z.prop||""}:${Z._parentProp||""}`);if(v.value&&y.value.baseItemsHash===T&&y.value.dynamicItemsHash===N)return v.value;const E=g.value,x=E.length,O=o.value.length,j=new Array(x+O);for(let Z=0;Z<x;Z++)j[Z]=E[Z];let G=x;if(O===0)return v.value=j,y.value={baseItemsHash:T,dynamicItemsHash:N},j;const Y=[],K=[];let q=[];const ee=new Set,ie=new Map;for(let Z=0;Z<x;Z++){const re=E[Z].prop;re&&(ee.add(re),ie.set(re,Z))}for(let Z=0;Z<O;Z++){const re=o.value[Z],ne=re._parentProp;ne&&ee.has(ne)?K.push(re):q.push(re)}K.length>0&&Y.push(K);let S=K,H=[];for(;q.length>0&&S.length>0;){const Z=new Map;for(let ne=0;ne<S.length;ne++){const ue=S[ne].prop;ue&&Z.set(ue,!0)}const re=[];for(let ne=0;ne<q.length;ne++){const ue=q[ne];ue._parentProp&&Z.has(ue._parentProp)?H.push(ue):re.push(ue)}if(H.length>0)Y.push(H),S=H,H=[],q=re;else break}for(let Z=0;Z<Y.length;Z++){const re=Y[Z],ne=new Map;for(let Ue=0;Ue<G;Ue++){const Ee=(z=j[Ue])==null?void 0:z.prop;Ee&&ne.set(Ee,Ue)}const ue=new Map;for(let Ue=0;Ue<re.length;Ue++){const Ee=re[Ue],Oe=Ee._parentProp;Oe&&ne.has(Oe)&&(ue.has(Oe)||ue.set(Oe,[]),ue.get(Oe).push(Ee))}const ge=[];ue.forEach((Ue,Ee)=>{const Oe=ne.get(Ee);let Te=Oe;for(let Pe=Oe+1;Pe<G;Pe++){const pe=j[Pe];if(pe._dynamic&&pe._parentProp===Ee)Te=Pe;else if(!pe._dynamic)break}ge.push({index:Te+1,items:Ue})}),ge.sort((Ue,Ee)=>Ee.index-Ue.index);for(let Ue=0;Ue<ge.length;Ue++){const{index:Ee,items:Oe}=ge[Ue];for(let Te=Oe.length-1;Te>=0;Te--)j.splice(Ee,0,Oe[Te]),G++}}if(q.length>0)for(let Z=0;Z<q.length;Z++)j[G++]=q[Z];return j.length>G&&(j.length=G),v.value=j,y.value={baseItemsHash:T,dynamicItemsHash:N},j}),M=f.computed({get:()=>A.modelValue,set:T=>r("update:modelValue",T)}),L=f.computed(()=>Q.value.filter(T=>!T.showIf||M.value[T.showIf])),V=T=>{var E,x;if(T.options)return T.options||[];if(T.optionsKey&&((E=A.options)!=null&&E[T.optionsKey])){const O=JSON.parse(JSON.stringify(A.options[T.optionsKey]||[]))||[];return T!=null&&T.multiple||O.unshift({label:"无",value:" "}),O}const N=JSON.parse(JSON.stringify(((x=A.options)==null?void 0:x[T==null?void 0:T.optionsKey])||[]))||[];return T!=null&&T.multiple||N.unshift({label:"无",value:" "}),N},k=T=>T.layout?T.layout:["text","file","textarea"].includes(T.type)?"full":"half",W=T=>{r("rotationChange",T)};return f.provide("config",A.propsConfig),(T,N)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(i.value)},[f.createElementVNode("div",w3,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(L.value,E=>(f.openBlock(),f.createElementBlock(f.Fragment,{key:E.prop},[k(E)==="full"?(f.openBlock(),f.createElementBlock("div",y3,[f.createVNode(cd,{label:E.label,modelValue:M.value[E.prop],"onUpdate:modelValue":x=>M.value[E.prop]=x,type:E.type,options:V(E),min:E.min,max:E.max,step:E.step,accept:E.accept,desc:E.desc,multiple:E.multiple,onRotationChange:W},null,8,["label","modelValue","onUpdate:modelValue","type","options","min","max","step","accept","desc","multiple"])])):k(E)==="half"?(f.openBlock(),f.createElementBlock("div",b3,[f.createVNode(cd,{label:E.label,modelValue:M.value[E.prop],"onUpdate:modelValue":x=>M.value[E.prop]=x,type:E.type,options:V(E),min:E.min,max:E.max,step:E.step,accept:E.accept,desc:E.desc,multiple:E.multiple,onRotationChange:W},null,8,["label","modelValue","onUpdate:modelValue","type","options","min","max","step","accept","desc","multiple"])])):(f.openBlock(),f.createElementBlock("div",C3,[f.createVNode(cd,{label:E.label,modelValue:M.value[E.prop],"onUpdate:modelValue":x=>M.value[E.prop]=x,type:E.type,options:V(E),min:E.min,max:E.max,step:E.step,accept:E.accept,desc:E.desc,multiple:E.multiple,onRotationChange:W},null,8,["label","modelValue","onUpdate:modelValue","type","options","min","max","step","accept","desc","multiple"])]))],64))),128))])],2))}},[["__scopeId","data-v-4b4a18c5"]]),E3={__name:"TextPropertyPanel",props:{modelValue:{type:Object,required:!0},propsConfig:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(t){return(e,A)=>(f.openBlock(),f.createBlock(Ao,{"model-value":t.modelValue,"props-config":t.propsConfig,options:t.options,"panel-type":"text","onUpdate:modelValue":A[0]||(A[0]=r=>e.$emit("update:modelValue",r))},null,8,["model-value","props-config","options"]))}},U3={},F3={t:"1745910658205",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2602"};function N3(t,e){return f.openBlock(),f.createElementBlock("svg",F3,[...e[0]||(e[0]=[f.createElementVNode("path",{d:"M0 0m0 0l1024 0q0 0 0 0l0 1024q0 0 0 0l-1024 0q0 0 0 0l0-1024q0 0 0 0Z","fill-opacity":"0","p-id":"2603"},null,-1),f.createElementVNode("path",{d:"M798.88 96H257.12C177.088 96 112 161.088 112 241.12v541.76C112 862.928 177.088 928 257.12 928h541.76c80.032 0 145.12-65.088 145.12-145.12V241.12C944 161.088 878.912 96 798.88 96z m87.104 686.88a87.2 87.2 0 0 1-87.104 87.104H257.12a87.2 87.2 0 0 1-87.104-87.104V241.12a87.2 87.2 0 0 1 87.104-87.104h541.76a87.2 87.2 0 0 1 87.104 87.104v541.76z","p-id":"2604"},null,-1),f.createElementVNode("path",{d:"M686.304 710.336H369.696a29.04 29.04 0 0 0-29.216 28.832c0 15.904 13.104 28.832 29.216 28.832h316.608a29.04 29.04 0 0 0 29.2-28.832c0-15.904-13.088-28.832-29.2-28.832zM722.784 256H333.216A29.04 29.04 0 0 0 304 284.832v76.96c0 15.904 13.088 28.832 29.2 28.832a29.04 29.04 0 0 0 29.216-28.832v-48.048h136.384V640.64c0 15.92 13.088 28.832 29.2 28.832a29.04 29.04 0 0 0 29.2-28.832V313.76h136.384v48.048c0 15.904 13.088 28.832 29.216 28.832A29.04 29.04 0 0 0 752 361.792v-76.96c0.08-15.904-13.008-28.832-29.2-28.832z","p-id":"2605"},null,-1)])])}const S3=jA(U3,[["render",N3]]);var ud={},Fc={},vr={};Object.defineProperty(vr,"__esModule",{value:!0});function Q3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var T3=function t(e,A){Q3(this,t),this.data=e,this.text=A.text||e,this.options=A};vr.default=T3,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.CODE39=void 0;var x3=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),R3=vr,I3=V3(R3);function V3(t){return t&&t.__esModule?t:{default:t}}function M3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L3(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 O3(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 k3=function(t){O3(e,t);function e(A,r){return M3(this,e),A=A.toUpperCase(),r.mod43&&(A+=P3(W3(A))),L3(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return x3(e,[{key:"encode",value:function(){for(var r=fd("*"),n=0;n<this.data.length;n++)r+=fd(this.data[n])+"0";return r+=fd("*"),{data:r,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),e}(I3.default),Hm=["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","-","."," ","$","/","+","%","*"],H3=[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 fd(t){return D3(Dm(t))}function D3(t){return H3[t].toString(2)}function P3(t){return Hm[t]}function Dm(t){return Hm.indexOf(t)}function W3(t){for(var e=0,A=0;A<t.length;A++)e+=Dm(t[A]);return e=e%43,e}Fc.CODE39=k3;var In={},hd={},ro={},aA={};Object.defineProperty(aA,"__esModule",{value:!0});var Ms;function dd(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var Pm=aA.SET_A=0,Wm=aA.SET_B=1,_m=aA.SET_C=2;aA.SHIFT=98;var _3=aA.START_A=103,Z3=aA.START_B=104,j3=aA.START_C=105;aA.MODULO=103,aA.STOP=106,aA.FNC1=207,aA.SET_BY_CODE=(Ms={},dd(Ms,_3,Pm),dd(Ms,Z3,Wm),dd(Ms,j3,_m),Ms),aA.SWAP={101:Pm,100:Wm,99:_m},aA.A_START_CHAR=String.fromCharCode(208),aA.B_START_CHAR=String.fromCharCode(209),aA.C_START_CHAR=String.fromCharCode(210),aA.A_CHARS="[\0-_È-Ï]",aA.B_CHARS="[ -È-Ï]",aA.C_CHARS="(Ï*[0-9]{2}Ï*)",aA.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(ro,"__esModule",{value:!0});var J3=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),K3=vr,G3=z3(K3),kr=aA;function z3(t){return t&&t.__esModule?t:{default:t}}function Y3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X3(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 q3(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 $3=function(t){q3(e,t);function e(A,r){Y3(this,e);var n=X3(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A.substring(1),r));return n.bytes=A.split("").map(function(a){return a.charCodeAt(0)}),n}return J3(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.bytes,n=r.shift()-105,a=kr.SET_BY_CODE[n];if(a===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&r.unshift(kr.FNC1);var i=e.next(r,1,a);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(n)+i.result+e.getBar((i.checksum+n)%kr.MODULO)+e.getBar(kr.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 kr.BARS[r]?kr.BARS[r].toString():""}},{key:"correctIndex",value:function(r,n){if(n===kr.SET_A){var a=r.shift();return a<32?a+64:a-32}else return n===kr.SET_B?r.shift()-32:(r.shift()-48)*10+r.shift()-48}},{key:"next",value:function(r,n,a){if(!r.length)return{result:"",checksum:0};var i=void 0,o=void 0;if(r[0]>=200){o=r.shift()-105;var s=kr.SWAP[o];s!==void 0?i=e.next(r,n+1,s):((a===kr.SET_A||a===kr.SET_B)&&o===kr.SHIFT&&(r[0]=a===kr.SET_A?r[0]>95?r[0]-96:r[0]:r[0]<32?r[0]+96:r[0]),i=e.next(r,n+1,a))}else o=e.correctIndex(r,a),i=e.next(r,n+1,a);var l=e.getBar(o),u=o*n;return{result:l+i.result,checksum:u+i.checksum}}}]),e}(G3.default);ro.default=$3;var pd={};Object.defineProperty(pd,"__esModule",{value:!0});var ma=aA,Zm=function(e){return e.match(new RegExp("^"+ma.A_CHARS+"*"))[0].length},jm=function(e){return e.match(new RegExp("^"+ma.B_CHARS+"*"))[0].length},Jm=function(e){return e.match(new RegExp("^"+ma.C_CHARS+"*"))[0]};function gd(t,e){var A=e?ma.A_CHARS:ma.B_CHARS,r=t.match(new RegExp("^("+A+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(r)return r[1]+String.fromCharCode(204)+Km(t.substring(r[1].length));var n=t.match(new RegExp("^"+A+"+"))[0];return n.length===t.length?t:n+String.fromCharCode(e?205:206)+gd(t.substring(n.length),!e)}function Km(t){var e=Jm(t),A=e.length;if(A===t.length)return t;t=t.substring(A);var r=Zm(t)>=jm(t);return e+String.fromCharCode(r?206:205)+gd(t,r)}pd.default=function(t){var e=void 0,A=Jm(t).length;if(A>=2)e=ma.C_START_CHAR+Km(t);else{var r=Zm(t)>jm(t);e=(r?ma.A_START_CHAR:ma.B_START_CHAR)+gd(t,r)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(n,a){return String.fromCharCode(203)+a})},Object.defineProperty(hd,"__esModule",{value:!0});var eS=ro,tS=Gm(eS),AS=pd,rS=Gm(AS);function Gm(t){return t&&t.__esModule?t:{default:t}}function nS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function md(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 aS(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 iS=function(t){aS(e,t);function e(A,r){if(nS(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(A))var n=md(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,rS.default)(A),r));else var n=md(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));return md(n)}return e}(tS.default);hd.default=iS;var vd={};Object.defineProperty(vd,"__esModule",{value:!0});var oS=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),sS=ro,lS=cS(sS),zm=aA;function cS(t){return t&&t.__esModule?t:{default:t}}function uS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fS(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 hS(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 dS=function(t){hS(e,t);function e(A,r){return uS(this,e),fS(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,zm.A_START_CHAR+A,r))}return oS(e,[{key:"valid",value:function(){return new RegExp("^"+zm.A_CHARS+"+$").test(this.data)}}]),e}(lS.default);vd.default=dS;var Bd={};Object.defineProperty(Bd,"__esModule",{value:!0});var pS=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),gS=ro,mS=vS(gS),Ym=aA;function vS(t){return t&&t.__esModule?t:{default:t}}function BS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wS(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 yS(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 bS=function(t){yS(e,t);function e(A,r){return BS(this,e),wS(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Ym.B_START_CHAR+A,r))}return pS(e,[{key:"valid",value:function(){return new RegExp("^"+Ym.B_CHARS+"+$").test(this.data)}}]),e}(mS.default);Bd.default=bS;var wd={};Object.defineProperty(wd,"__esModule",{value:!0});var CS=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),ES=ro,US=FS(ES),Xm=aA;function FS(t){return t&&t.__esModule?t:{default:t}}function NS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function SS(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 QS(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 TS=function(t){QS(e,t);function e(A,r){return NS(this,e),SS(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Xm.C_START_CHAR+A,r))}return CS(e,[{key:"valid",value:function(){return new RegExp("^"+Xm.C_CHARS+"+$").test(this.data)}}]),e}(US.default);wd.default=TS,Object.defineProperty(In,"__esModule",{value:!0}),In.CODE128C=In.CODE128B=In.CODE128A=In.CODE128=void 0;var xS=hd,RS=Nc(xS),IS=vd,VS=Nc(IS),MS=Bd,LS=Nc(MS),OS=wd,kS=Nc(OS);function Nc(t){return t&&t.__esModule?t:{default:t}}In.CODE128=RS.default,In.CODE128A=VS.default,In.CODE128B=LS.default,In.CODE128C=kS.default;var Nr={},yd={},zr={};Object.defineProperty(zr,"__esModule",{value:!0}),zr.SIDE_BIN="101",zr.MIDDLE_BIN="01010",zr.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"]},zr.EAN2_STRUCTURE=["LL","LG","GL","GG"],zr.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],zr.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"];var Sc={},si={};Object.defineProperty(si,"__esModule",{value:!0});var HS=zr,DS=function(e,A,r){var n=e.split("").map(function(i,o){return HS.BINARIES[A[o]]}).map(function(i,o){return i?i[e[o]]:""});if(r){var a=e.length-1;n=n.map(function(i,o){return o<a?i+r:i})}return n.join("")};si.default=DS,Object.defineProperty(Sc,"__esModule",{value:!0});var PS=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),no=zr,WS=si,qm=$m(WS),_S=vr,ZS=$m(_S);function $m(t){return t&&t.__esModule?t:{default:t}}function jS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JS(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 KS(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 GS=function(t){KS(e,t);function e(A,r){jS(this,e);var n=JS(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));return n.fontSize=!r.flat&&r.fontSize>r.width*10?r.width*10:r.fontSize,n.guardHeight=r.height+n.fontSize/2+r.textMargin,n}return PS(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(r,n){return this.text.substr(r,n)}},{key:"leftEncode",value:function(r,n){return(0,qm.default)(r,n)}},{key:"rightText",value:function(r,n){return this.text.substr(r,n)}},{key:"rightEncode",value:function(r,n){return(0,qm.default)(r,n)}},{key:"encodeGuarded",value:function(){var r={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:no.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:r},{data:no.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:r},{data:no.SIDE_BIN,options:n}]}},{key:"encodeFlat",value:function(){var r=[no.SIDE_BIN,this.leftEncode(),no.MIDDLE_BIN,this.rightEncode(),no.SIDE_BIN];return{data:r.join(""),text:this.text}}}]),e}(ZS.default);Sc.default=GS,Object.defineProperty(yd,"__esModule",{value:!0});var zS=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),Ls=function t(e,A,r){e===null&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,A);if(n===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:t(a,A,r)}else{if("value"in n)return n.value;var i=n.get;return i===void 0?void 0:i.call(r)}},YS=zr,XS=Sc,qS=$S(XS);function $S(t){return t&&t.__esModule?t:{default:t}}function eQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tQ(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 AQ(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 ev=function(e){var A=e.substr(0,12).split("").map(function(r){return+r}).reduce(function(r,n,a){return a%2?r+n*3:r+n},0);return(10-A%10)%10},rQ=function(t){AQ(e,t);function e(A,r){eQ(this,e),A.search(/^[0-9]{12}$/)!==-1&&(A+=ev(A));var n=tQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));return n.lastChar=r.lastChar,n}return zS(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===ev(this.data)}},{key:"leftText",value:function(){return Ls(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var r=this.data.substr(1,6),n=YS.EAN13_STRUCTURE[this.data[0]];return Ls(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,r,n)}},{key:"rightText",value:function(){return Ls(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 Ls(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,r,"RRRRRR")}},{key:"encodeGuarded",value:function(){var r=Ls(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}(qS.default);yd.default=rQ;var bd={};Object.defineProperty(bd,"__esModule",{value:!0});var nQ=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),Qc=function t(e,A,r){e===null&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,A);if(n===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:t(a,A,r)}else{if("value"in n)return n.value;var i=n.get;return i===void 0?void 0:i.call(r)}},aQ=Sc,iQ=oQ(aQ);function oQ(t){return t&&t.__esModule?t:{default:t}}function sQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lQ(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 cQ(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 tv=function(e){var A=e.substr(0,7).split("").map(function(r){return+r}).reduce(function(r,n,a){return a%2?r+n:r+n*3},0);return(10-A%10)%10},uQ=function(t){cQ(e,t);function e(A,r){return sQ(this,e),A.search(/^[0-9]{7}$/)!==-1&&(A+=tv(A)),lQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return nQ(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===tv(this.data)}},{key:"leftText",value:function(){return Qc(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 Qc(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,r,"LLLL")}},{key:"rightText",value:function(){return Qc(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 Qc(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,r,"RRRR")}}]),e}(iQ.default);bd.default=uQ;var Cd={};Object.defineProperty(Cd,"__esModule",{value:!0});var fQ=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),hQ=zr,dQ=si,pQ=Av(dQ),gQ=vr,mQ=Av(gQ);function Av(t){return t&&t.__esModule?t:{default:t}}function vQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BQ(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 wQ(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 yQ=function(e){var A=e.split("").map(function(r){return+r}).reduce(function(r,n,a){return a%2?r+n*9:r+n*3},0);return A%10},bQ=function(t){wQ(e,t);function e(A,r){return vQ(this,e),BQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return fQ(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var r=hQ.EAN5_STRUCTURE[yQ(this.data)];return{data:"1011"+(0,pQ.default)(this.data,r,"01"),text:this.text}}}]),e}(mQ.default);Cd.default=bQ;var Ed={};Object.defineProperty(Ed,"__esModule",{value:!0});var CQ=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),EQ=zr,UQ=si,FQ=rv(UQ),NQ=vr,SQ=rv(NQ);function rv(t){return t&&t.__esModule?t:{default:t}}function QQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TQ(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 xQ(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 RQ=function(t){xQ(e,t);function e(A,r){return QQ(this,e),TQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return CQ(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var r=EQ.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,FQ.default)(this.data,r,"01"),text:this.text}}}]),e}(SQ.default);Ed.default=RQ;var Os={};Object.defineProperty(Os,"__esModule",{value:!0});var IQ=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}();Os.checksum=Ud;var VQ=si,ao=nv(VQ),MQ=vr,LQ=nv(MQ);function nv(t){return t&&t.__esModule?t:{default:t}}function OQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kQ(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 HQ(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 DQ=function(t){HQ(e,t);function e(A,r){OQ(this,e),A.search(/^[0-9]{11}$/)!==-1&&(A+=Ud(A));var n=kQ(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));return n.displayValue=r.displayValue,r.fontSize>r.width*10?n.fontSize=r.width*10:n.fontSize=r.fontSize,n.guardHeight=r.height+n.fontSize/2+r.textMargin,n}return IQ(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==Ud(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,ao.default)(this.data.substr(0,6),"LLLLLL"),r+="01010",r+=(0,ao.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,ao.default)(this.data[0],"L"),options:{height:this.guardHeight}}),r.push({data:(0,ao.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,ao.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),r.push({data:(0,ao.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}(LQ.default);function Ud(t){var e=0,A;for(A=1;A<11;A+=2)e+=parseInt(t[A]);for(A=0;A<11;A+=2)e+=parseInt(t[A])*3;return(10-e%10)%10}Os.default=DQ;var Fd={};Object.defineProperty(Fd,"__esModule",{value:!0});var PQ=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),WQ=si,_Q=av(WQ),ZQ=vr,jQ=av(ZQ),JQ=Os;function av(t){return t&&t.__esModule?t:{default:t}}function KQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nd(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 GQ(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 zQ=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],YQ=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],XQ=function(t){GQ(e,t);function e(A,r){KQ(this,e);var n=Nd(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));if(n.isValid=!1,A.search(/^[0-9]{6}$/)!==-1)n.middleDigits=A,n.upcA=iv(A,"0"),n.text=r.text||""+n.upcA[0]+A+n.upcA[n.upcA.length-1],n.isValid=!0;else if(A.search(/^[01][0-9]{7}$/)!==-1)if(n.middleDigits=A.substring(1,A.length-1),n.upcA=iv(n.middleDigits,A[0]),n.upcA[n.upcA.length-1]===A[A.length-1])n.isValid=!0;else return Nd(n);else return Nd(n);return n.displayValue=r.displayValue,r.fontSize>r.width*10?n.fontSize=r.width*10:n.fontSize=r.fontSize,n.guardHeight=r.height+n.fontSize/2+r.textMargin,n}return PQ(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],n=this.upcA[this.upcA.length-1],a=YQ[parseInt(n)][parseInt(r)];return(0,_Q.default)(this.middleDigits,a)}}]),e}(jQ.default);function iv(t,e){for(var A=parseInt(t[t.length-1]),r=zQ[A],n="",a=0,i=0;i<r.length;i++){var o=r[i];o==="X"?n+=t[a++]:n+=o}return n=""+e+n,""+n+(0,JQ.checksum)(n)}Fd.default=XQ,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.UPCE=Nr.UPC=Nr.EAN2=Nr.EAN5=Nr.EAN8=Nr.EAN13=void 0;var qQ=yd,$Q=io(qQ),eT=bd,tT=io(eT),AT=Cd,rT=io(AT),nT=Ed,aT=io(nT),iT=Os,oT=io(iT),sT=Fd,lT=io(sT);function io(t){return t&&t.__esModule?t:{default:t}}Nr.EAN13=$Q.default,Nr.EAN8=tT.default,Nr.EAN5=rT.default,Nr.EAN2=aT.default,Nr.UPC=oT.default,Nr.UPCE=lT.default;var oo={},Tc={},ks={};Object.defineProperty(ks,"__esModule",{value:!0}),ks.START_BIN="1010",ks.END_BIN="11101",ks.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"],Object.defineProperty(Tc,"__esModule",{value:!0});var cT=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),xc=ks,uT=vr,fT=hT(uT);function hT(t){return t&&t.__esModule?t:{default:t}}function dT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pT(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 gT(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 mT=function(t){gT(e,t);function e(){return dT(this,e),pT(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return cT(e,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var r=this,n=this.data.match(/.{2}/g).map(function(a){return r.encodePair(a)}).join("");return{data:xc.START_BIN+n+xc.END_BIN,text:this.text}}},{key:"encodePair",value:function(r){var n=xc.BINARIES[r[1]];return xc.BINARIES[r[0]].split("").map(function(a,i){return(a==="1"?"111":"1")+(n[i]==="1"?"000":"0")}).join("")}}]),e}(fT.default);Tc.default=mT;var Sd={};Object.defineProperty(Sd,"__esModule",{value:!0});var vT=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),BT=Tc,wT=yT(BT);function yT(t){return t&&t.__esModule?t:{default:t}}function bT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CT(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 ET(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 ov=function(e){var A=e.substr(0,13).split("").map(function(r){return parseInt(r,10)}).reduce(function(r,n,a){return r+n*(3-a%2*2)},0);return Math.ceil(A/10)*10-A},UT=function(t){ET(e,t);function e(A,r){return bT(this,e),A.search(/^[0-9]{13}$/)!==-1&&(A+=ov(A)),CT(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return vT(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===ov(this.data)}}]),e}(wT.default);Sd.default=UT,Object.defineProperty(oo,"__esModule",{value:!0}),oo.ITF14=oo.ITF=void 0;var FT=Tc,NT=sv(FT),ST=Sd,QT=sv(ST);function sv(t){return t&&t.__esModule?t:{default:t}}oo.ITF=NT.default,oo.ITF14=QT.default;var Yr={},li={};Object.defineProperty(li,"__esModule",{value:!0});var TT=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),xT=vr,RT=IT(xT);function IT(t){return t&&t.__esModule?t:{default:t}}function VT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MT(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 LT(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 OT=function(t){LT(e,t);function e(A,r){return VT(this,e),MT(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return TT(e,[{key:"encode",value:function(){for(var r="110",n=0;n<this.data.length;n++){var a=parseInt(this.data[n]),i=a.toString(2);i=kT(i,4-i.length);for(var o=0;o<i.length;o++)r+=i[o]=="0"?"100":"110"}return r+="1001",{data:r,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),e}(RT.default);function kT(t,e){for(var A=0;A<e;A++)t="0"+t;return t}li.default=OT;var Qd={},ci={};Object.defineProperty(ci,"__esModule",{value:!0}),ci.mod10=HT,ci.mod11=DT;function HT(t){for(var e=0,A=0;A<t.length;A++){var r=parseInt(t[A]);(A+t.length)%2===0?e+=r:e+=r*2%10+Math.floor(r*2/10)}return(10-e%10)%10}function DT(t){for(var e=0,A=[2,3,4,5,6,7],r=0;r<t.length;r++){var n=parseInt(t[t.length-1-r]);e+=A[r%A.length]*n}return(11-e%11)%11}Object.defineProperty(Qd,"__esModule",{value:!0});var PT=li,WT=ZT(PT),_T=ci;function ZT(t){return t&&t.__esModule?t:{default:t}}function jT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JT(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 KT(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 GT=function(t){KT(e,t);function e(A,r){return jT(this,e),JT(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A+(0,_T.mod10)(A),r))}return e}(WT.default);Qd.default=GT;var Td={};Object.defineProperty(Td,"__esModule",{value:!0});var zT=li,YT=qT(zT),XT=ci;function qT(t){return t&&t.__esModule?t:{default:t}}function $T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ex(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 tx(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 Ax=function(t){tx(e,t);function e(A,r){return $T(this,e),ex(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A+(0,XT.mod11)(A),r))}return e}(YT.default);Td.default=Ax;var xd={};Object.defineProperty(xd,"__esModule",{value:!0});var rx=li,nx=ax(rx),lv=ci;function ax(t){return t&&t.__esModule?t:{default:t}}function ix(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ox(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 sx(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 lx=function(t){sx(e,t);function e(A,r){return ix(this,e),A+=(0,lv.mod10)(A),A+=(0,lv.mod10)(A),ox(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return e}(nx.default);xd.default=lx;var Rd={};Object.defineProperty(Rd,"__esModule",{value:!0});var cx=li,ux=fx(cx),cv=ci;function fx(t){return t&&t.__esModule?t:{default:t}}function hx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dx(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 px(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 gx=function(t){px(e,t);function e(A,r){return hx(this,e),A+=(0,cv.mod11)(A),A+=(0,cv.mod10)(A),dx(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return e}(ux.default);Rd.default=gx,Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.MSI1110=Yr.MSI1010=Yr.MSI11=Yr.MSI10=Yr.MSI=void 0;var mx=li,vx=Hs(mx),Bx=Qd,wx=Hs(Bx),yx=Td,bx=Hs(yx),Cx=xd,Ex=Hs(Cx),Ux=Rd,Fx=Hs(Ux);function Hs(t){return t&&t.__esModule?t:{default:t}}Yr.MSI=vx.default,Yr.MSI10=wx.default,Yr.MSI11=bx.default,Yr.MSI1010=Ex.default,Yr.MSI1110=Fx.default;var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.pharmacode=void 0;var Nx=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),Sx=vr,Qx=Tx(Sx);function Tx(t){return t&&t.__esModule?t:{default:t}}function xx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rx(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 Ix(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 Vx=function(t){Ix(e,t);function e(A,r){xx(this,e);var n=Rx(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r));return n.number=parseInt(A,10),n}return Nx(e,[{key:"encode",value:function(){for(var r=this.number,n="";!isNaN(r)&&r!=0;)r%2===0?(n="11100"+n,r=(r-2)/2):(n="100"+n,r=(r-1)/2);return n=n.slice(0,-2),{data:n,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(Qx.default);Rc.pharmacode=Vx;var Ic={};Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.codabar=void 0;var Mx=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),Lx=vr,Ox=kx(Lx);function kx(t){return t&&t.__esModule?t:{default:t}}function Hx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dx(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 Px(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 Wx=function(t){Px(e,t);function e(A,r){Hx(this,e),A.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(A="A"+A+"A");var n=Dx(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A.toUpperCase(),r));return n.text=n.options.text||n.text.replace(/[A-D]/g,""),n}return Mx(e,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var r=[],n=this.getEncodings(),a=0;a<this.data.length;a++)r.push(n[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}(Ox.default);Ic.codabar=Wx;var so={},Vc={},Ds={};Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.SYMBOLS=["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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],Ds.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],Ds.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]},Object.defineProperty(Vc,"__esModule",{value:!0});var _x=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),Mc=Ds,Zx=vr,jx=Jx(Zx);function Jx(t){return t&&t.__esModule?t:{default:t}}function Kx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gx(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 zx(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 Yx=function(t){zx(e,t);function e(A,r){return Kx(this,e),Gx(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return _x(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var r=this.data.split("").flatMap(function(o){return Mc.MULTI_SYMBOLS[o]||o}),n=r.map(function(o){return e.getEncoding(o)}).join(""),a=e.checksum(r,20),i=e.checksum(r.concat(a),15);return{text:this.text,data:e.getEncoding("ÿ")+n+e.getEncoding(a)+e.getEncoding(i)+e.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(r){return Mc.BINARIES[e.symbolValue(r)]}},{key:"getSymbol",value:function(r){return Mc.SYMBOLS[r]}},{key:"symbolValue",value:function(r){return Mc.SYMBOLS.indexOf(r)}},{key:"checksum",value:function(r,n){var a=r.slice().reverse().reduce(function(i,o,s){var l=s%n+1;return i+e.symbolValue(o)*l},0);return e.getSymbol(a%47)}}]),e}(jx.default);Vc.default=Yx;var Id={};Object.defineProperty(Id,"__esModule",{value:!0});var Xx=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),qx=Vc,$x=eR(qx);function eR(t){return t&&t.__esModule?t:{default:t}}function tR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AR(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 rR(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 nR=function(t){rR(e,t);function e(A,r){return tR(this,e),AR(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return Xx(e,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),e}($x.default);Id.default=nR,Object.defineProperty(so,"__esModule",{value:!0}),so.CODE93FullASCII=so.CODE93=void 0;var aR=Vc,iR=uv(aR),oR=Id,sR=uv(oR);function uv(t){return t&&t.__esModule?t:{default:t}}so.CODE93=iR.default,so.CODE93FullASCII=sR.default;var Lc={};Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.GenericBarcode=void 0;var lR=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),cR=vr,uR=fR(cR);function fR(t){return t&&t.__esModule?t:{default:t}}function hR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dR(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 pR(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 gR=function(t){pR(e,t);function e(A,r){return hR(this,e),dR(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,A,r))}return lR(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(uR.default);Lc.GenericBarcode=gR,Object.defineProperty(ud,"__esModule",{value:!0});var mR=Fc,Oc=In,lo=Nr,fv=oo,Ps=Yr,vR=Rc,BR=Ic,hv=so,wR=Lc;ud.default={CODE39:mR.CODE39,CODE128:Oc.CODE128,CODE128A:Oc.CODE128A,CODE128B:Oc.CODE128B,CODE128C:Oc.CODE128C,EAN13:lo.EAN13,EAN8:lo.EAN8,EAN5:lo.EAN5,EAN2:lo.EAN2,UPC:lo.UPC,UPCE:lo.UPCE,ITF14:fv.ITF14,ITF:fv.ITF,MSI:Ps.MSI,MSI10:Ps.MSI10,MSI11:Ps.MSI11,MSI1010:Ps.MSI1010,MSI1110:Ps.MSI1110,pharmacode:vR.pharmacode,codabar:BR.codabar,CODE93:hv.CODE93,CODE93FullASCII:hv.CODE93FullASCII,GenericBarcode:wR.GenericBarcode};var co={};Object.defineProperty(co,"__esModule",{value:!0});var yR=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var r in A)Object.prototype.hasOwnProperty.call(A,r)&&(t[r]=A[r])}return t};co.default=function(t,e){return yR({},t,e)};var Vd={};Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.default=bR;function bR(t){var e=[];function A(r){if(Array.isArray(r))for(var n=0;n<r.length;n++)A(r[n]);else r.text=r.text||"",r.data=r.data||"",e.push(r)}return A(t),e}var Md={};Object.defineProperty(Md,"__esModule",{value:!0}),Md.default=CR;function CR(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 Ld={},Od={},kc={};Object.defineProperty(kc,"__esModule",{value:!0}),kc.default=ER;function ER(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var A in e)e.hasOwnProperty(A)&&(A=e[A],typeof t[A]=="string"&&(t[A]=parseInt(t[A],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});var UR={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(){}};Hc.default=UR,Object.defineProperty(Od,"__esModule",{value:!0});var FR=kc,NR=pv(FR),SR=Hc,dv=pv(SR);function pv(t){return t&&t.__esModule?t:{default:t}}function QR(t){var e={};for(var A in dv.default)dv.default.hasOwnProperty(A)&&(t.hasAttribute("jsbarcode-"+A.toLowerCase())&&(e[A]=t.getAttribute("jsbarcode-"+A.toLowerCase())),t.hasAttribute("data-"+A.toLowerCase())&&(e[A]=t.getAttribute("data-"+A.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,NR.default)(e),e}Od.default=QR;var kd={},Hd={},Hr={};Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.getTotalWidthOfEncodings=Hr.calculateEncodingAttributes=Hr.getBarcodePadding=Hr.getEncodingHeight=Hr.getMaximumHeightOfEncodings=void 0;var TR=co,xR=RR(TR);function RR(t){return t&&t.__esModule?t:{default:t}}function gv(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function mv(t,e,A){if(A.displayValue&&e<t){if(A.textAlign=="center")return Math.floor((t-e)/2);if(A.textAlign=="left")return 0;if(A.textAlign=="right")return Math.floor(t-e)}return 0}function IR(t,e,A){for(var r=0;r<t.length;r++){var n=t[r],a=(0,xR.default)(e,n.options),i;a.displayValue?i=LR(n.text,a,A):i=0;var o=n.data.length*a.width;n.width=Math.ceil(Math.max(i,o)),n.height=gv(n,a),n.barcodePadding=mv(i,o,a)}}function VR(t){for(var e=0,A=0;A<t.length;A++)e+=t[A].width;return e}function MR(t){for(var e=0,A=0;A<t.length;A++)t[A].height>e&&(e=t[A].height);return e}function LR(t,e,A){var r;if(A)r=A;else if(typeof document<"u")r=document.createElement("canvas").getContext("2d");else return 0;r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var n=r.measureText(t);if(!n)return 0;var a=n.width;return a}Hr.getMaximumHeightOfEncodings=MR,Hr.getEncodingHeight=gv,Hr.getBarcodePadding=mv,Hr.calculateEncodingAttributes=IR,Hr.getTotalWidthOfEncodings=VR,Object.defineProperty(Hd,"__esModule",{value:!0});var OR=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),kR=co,HR=DR(kR),Dd=Hr;function DR(t){return t&&t.__esModule?t:{default:t}}function PR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var WR=function(){function t(e,A,r){PR(this,t),this.canvas=e,this.encodings=A,this.options=r}return OR(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var A=0;A<this.encodings.length;A++){var r=(0,HR.default)(this.options,this.encodings[A].options);this.drawCanvasBarcode(r,this.encodings[A]),this.drawCanvasText(r,this.encodings[A]),this.moveCanvasDrawing(this.encodings[A])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var A=this.canvas.getContext("2d");A.save(),(0,Dd.calculateEncodingAttributes)(this.encodings,this.options,A);var r=(0,Dd.getTotalWidthOfEncodings)(this.encodings),n=(0,Dd.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=r+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,A.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(A.fillStyle=this.options.background,A.fillRect(0,0,this.canvas.width,this.canvas.height)),A.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(A,r){var n=this.canvas.getContext("2d"),a=r.data,i;A.textPosition=="top"?i=A.marginTop+A.fontSize+A.textMargin:i=A.marginTop,n.fillStyle=A.lineColor;for(var o=0;o<a.length;o++){var s=o*A.width+r.barcodePadding;a[o]==="1"?n.fillRect(s,i,A.width,A.height):a[o]&&n.fillRect(s,i,A.width,A.height*a[o])}}},{key:"drawCanvasText",value:function(A,r){var n=this.canvas.getContext("2d"),a=A.fontOptions+" "+A.fontSize+"px "+A.font;if(A.displayValue){var i,o;A.textPosition=="top"?o=A.marginTop+A.fontSize-A.textMargin:o=A.height+A.textMargin+A.marginTop+A.fontSize,n.font=a,A.textAlign=="left"||r.barcodePadding>0?(i=0,n.textAlign="left"):A.textAlign=="right"?(i=r.width-1,n.textAlign="right"):(i=r.width/2,n.textAlign="center"),n.fillText(r.text,i,o)}}},{key:"moveCanvasDrawing",value:function(A){var r=this.canvas.getContext("2d");r.translate(A.width,0)}},{key:"restoreCanvas",value:function(){var A=this.canvas.getContext("2d");A.restore()}}]),t}();Hd.default=WR;var Pd={};Object.defineProperty(Pd,"__esModule",{value:!0});var _R=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}(),ZR=co,jR=JR(ZR),Wd=Hr;function JR(t){return t&&t.__esModule?t:{default:t}}function KR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Dc="http://www.w3.org/2000/svg",GR=function(){function t(e,A,r){KR(this,t),this.svg=e,this.encodings=A,this.options=r,this.document=r.xmlDocument||document}return _R(t,[{key:"render",value:function(){var A=this.options.marginLeft;this.prepareSVG();for(var r=0;r<this.encodings.length;r++){var n=this.encodings[r],a=(0,jR.default)(this.options,n.options),i=this.createGroup(A,a.marginTop,this.svg);this.setGroupOptions(i,a),this.drawSvgBarcode(i,a,n),this.drawSVGText(i,a,n),A+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,Wd.calculateEncodingAttributes)(this.encodings,this.options);var A=(0,Wd.getTotalWidthOfEncodings)(this.encodings),r=(0,Wd.getMaximumHeightOfEncodings)(this.encodings),n=A+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,r),this.options.background&&this.drawRect(0,0,n,r,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(A,r,n){var a=n.data,i;r.textPosition=="top"?i=r.fontSize+r.textMargin:i=0;for(var o=0,s=0,l=0;l<a.length;l++)s=l*r.width+n.barcodePadding,a[l]==="1"?o++:o>0&&(this.drawRect(s-r.width*o,i,r.width*o,r.height,A),o=0);o>0&&this.drawRect(s-r.width*(o-1),i,r.width*o,r.height,A)}},{key:"drawSVGText",value:function(A,r,n){var a=this.document.createElementNS(Dc,"text");if(r.displayValue){var i,o;a.setAttribute("style","font:"+r.fontOptions+" "+r.fontSize+"px "+r.font),r.textPosition=="top"?o=r.fontSize-r.textMargin:o=r.height+r.textMargin+r.fontSize,r.textAlign=="left"||n.barcodePadding>0?(i=0,a.setAttribute("text-anchor","start")):r.textAlign=="right"?(i=n.width-1,a.setAttribute("text-anchor","end")):(i=n.width/2,a.setAttribute("text-anchor","middle")),a.setAttribute("x",i),a.setAttribute("y",o),a.appendChild(this.document.createTextNode(n.text)),A.appendChild(a)}}},{key:"setSvgAttributes",value:function(A,r){var n=this.svg;n.setAttribute("width",A+"px"),n.setAttribute("height",r+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+A+" "+r),n.setAttribute("xmlns",Dc),n.setAttribute("version","1.1"),n.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(A,r,n){var a=this.document.createElementNS(Dc,"g");return a.setAttribute("transform","translate("+A+", "+r+")"),n.appendChild(a),a}},{key:"setGroupOptions",value:function(A,r){A.setAttribute("style","fill:"+r.lineColor+";")}},{key:"drawRect",value:function(A,r,n,a,i){var o=this.document.createElementNS(Dc,"rect");return o.setAttribute("x",A),o.setAttribute("y",r),o.setAttribute("width",n),o.setAttribute("height",a),i.appendChild(o),o}}]),t}();Pd.default=GR;var _d={};Object.defineProperty(_d,"__esModule",{value:!0});var zR=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}();function YR(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var XR=function(){function t(e,A,r){YR(this,t),this.object=e,this.encodings=A,this.options=r}return zR(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();_d.default=XR,Object.defineProperty(kd,"__esModule",{value:!0});var qR=Hd,$R=Zd(qR),eI=Pd,tI=Zd(eI),AI=_d,rI=Zd(AI);function Zd(t){return t&&t.__esModule?t:{default:t}}kd.default={CanvasRenderer:$R.default,SVGRenderer:tI.default,ObjectRenderer:rI.default};var uo={};Object.defineProperty(uo,"__esModule",{value:!0});function jd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jd(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 nI=function(t){Kd(e,t);function e(A,r){jd(this,e);var n=Jd(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.name="InvalidInputException",n.symbology=A,n.input=r,n.message='"'+n.input+'" is not a valid input for '+n.symbology,n}return e}(Error),aI=function(t){Kd(e,t);function e(){jd(this,e);var A=Jd(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return A.name="InvalidElementException",A.message="Not supported type to render on",A}return e}(Error),iI=function(t){Kd(e,t);function e(){jd(this,e);var A=Jd(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return A.name="NoElementException",A.message="No element to render on.",A}return e}(Error);uo.InvalidInputException=nI,uo.InvalidElementException=aI,uo.NoElementException=iI,Object.defineProperty(Ld,"__esModule",{value:!0});var oI=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},sI=Od,Gd=vv(sI),lI=kd,Ws=vv(lI),cI=uo;function vv(t){return t&&t.__esModule?t:{default:t}}function zd(t){if(typeof t=="string")return uI(t);if(Array.isArray(t)){for(var e=[],A=0;A<t.length;A++)e.push(zd(t[A]));return e}else{if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLImageElement)return fI(t);if(t&&t.nodeName&&t.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&t instanceof SVGElement)return{element:t,options:(0,Gd.default)(t),renderer:Ws.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)return{element:t,options:(0,Gd.default)(t),renderer:Ws.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:Ws.default.CanvasRenderer};if(t&&(typeof t>"u"?"undefined":oI(t))==="object"&&!t.nodeName)return{element:t,renderer:Ws.default.ObjectRenderer};throw new cI.InvalidElementException}}function uI(t){var e=document.querySelectorAll(t);if(e.length!==0){for(var A=[],r=0;r<e.length;r++)A.push(zd(e[r]));return A}}function fI(t){var e=document.createElement("canvas");return{element:e,options:(0,Gd.default)(t),renderer:Ws.default.CanvasRenderer,afterRender:function(){t.setAttribute("src",e.toDataURL())}}}Ld.default=zd;var Yd={};Object.defineProperty(Yd,"__esModule",{value:!0});var hI=function(){function t(e,A){for(var r=0;r<A.length;r++){var n=A[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,A,r){return A&&t(e.prototype,A),r&&t(e,r),e}}();function dI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var pI=function(){function t(e){dI(this,t),this.api=e}return hI(t,[{key:"handleCatch",value:function(A){if(A.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw A.message;else throw A;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(A){try{var r=A.apply(void 0,arguments);return this.api._options.valid(!0),r}catch(n){return this.handleCatch(n),this.api}}}]),t}();Yd.default=pI;var gI=ud,ui=va(gI),mI=co,_s=va(mI),vI=Vd,Bv=va(vI),BI=Md,wv=va(BI),wI=Ld,yI=va(wI),bI=kc,CI=va(bI),EI=Yd,UI=va(EI),yv=uo,FI=Hc,bv=va(FI);function va(t){return t&&t.__esModule?t:{default:t}}var Gn=function(){},Pc=function(e,A,r){var n=new Gn;if(typeof e>"u")throw Error("No element to render on was provided.");return n._renderProperties=(0,yI.default)(e),n._encodings=[],n._options=bv.default,n._errorHandler=new UI.default(n),typeof A<"u"&&(r=r||{},r.format||(r.format=Uv()),n.options(r)[r.format](A,r).render()),n};Pc.getModule=function(t){return ui.default[t]};for(var Cv in ui.default)ui.default.hasOwnProperty(Cv)&&NI(ui.default,Cv);function NI(t,e){Gn.prototype[e]=Gn.prototype[e.toUpperCase()]=Gn.prototype[e.toLowerCase()]=function(A,r){var n=this;return n._errorHandler.wrapBarcodeCall(function(){r.text=typeof r.text>"u"?void 0:""+r.text;var a=(0,_s.default)(n._options,r);a=(0,CI.default)(a);var i=t[e],o=Ev(A,i,a);return n._encodings.push(o),n})}}function Ev(t,e,A){t=""+t;var r=new e(t,A);if(!r.valid())throw new yv.InvalidInputException(r.constructor.name,t);var n=r.encode();n=(0,Bv.default)(n);for(var a=0;a<n.length;a++)n[a].options=(0,_s.default)(A,n[a].options);return n}function Uv(){return ui.default.CODE128?"CODE128":Object.keys(ui.default)[0]}Gn.prototype.options=function(t){return this._options=(0,_s.default)(this._options,t),this},Gn.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},Gn.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 A=(0,_s.default)(this._options,t.options);A.format=="auto"&&(A.format=Uv()),this._errorHandler.wrapBarcodeCall(function(){var r=A.value,n=ui.default[A.format.toUpperCase()],a=Ev(r,n,A);Xd(t,a,A)})}}},Gn.prototype.render=function(){if(!this._renderProperties)throw new yv.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)Xd(this._renderProperties[t],this._encodings,this._options);else Xd(this._renderProperties,this._encodings,this._options);return this},Gn.prototype._defaults=bv.default;function Xd(t,e,A){e=(0,Bv.default)(e);for(var r=0;r<e.length;r++)e[r].options=(0,_s.default)(A,e[r].options),(0,wv.default)(e[r].options);(0,wv.default)(A);var n=t.renderer,a=new n(t.element,e,A);a.render(),t.afterRender&&t.afterRender()}typeof window<"u"&&(window.JsBarcode=Pc),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(t,e){var A=[];return jQuery(this).each(function(){A.push(this)}),Pc(A,t,e)});var SI=Pc;const qd=ld(SI),Dq="",QI={__name:"BarcodeComponent",props:{modelValue:{type:Object,required:!0,default:()=>({})},propsConfig:{type:Object,required:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const A=t,r=e,{watchCoordinates:n,initCoordinates:a}=Qs(A,r),i=f.ref(null);f.computed(()=>A.modelValue.__selected||!1);const o=f.computed(()=>({width:"100%",height:"100%",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",boxSizing:"border-box"})),s=(g,h)=>{let w;return function(...C){const v=()=>{clearTimeout(w),g(...C)};clearTimeout(w),w=setTimeout(v,h)}},l=f.ref({value:"",type:"",lineColor:"",codeType:""}),u=()=>{var F,Q,M,L,V,k,W,T,N,E,x,O,j,G,Y,K;if(!i.value)return;const g=di((Q=(F=A.propsConfig)==null?void 0:F.barcode)==null?void 0:Q.propertyPanel)||{};let h=((M=A.modelValue)==null?void 0:M.BarcodeValue)||g.BarcodeValue||"";if(!h&&((L=A.modelValue)!=null&&L.FieldName))if(Array.isArray(A.modelValue.FieldName)){const q=A.modelValue.FieldName.map(ee=>{var ie,S,H,z;return((z=(H=(S=(ie=A.modelValue)==null?void 0:ie.options)==null?void 0:S.fields)==null?void 0:H.find(Z=>Z.value==ee))==null?void 0:z.label)||ee}).filter(ee=>ee);if(q.length>0){const ee=A.modelValue.FieldConnector||" ";h=q.join(ee)}}else h=((T=(W=(k=(V=A.modelValue)==null?void 0:V.options)==null?void 0:k.fields)==null?void 0:W.find(q=>{var ee;return q.value==((ee=A.modelValue)==null?void 0:ee.FieldName)}))==null?void 0:T.label)||((N=A.modelValue)==null?void 0:N.FieldName)||"";const w=((E=A.modelValue)==null?void 0:E.CodeType)||g.CodeType||"",B=A.modelValue.LineColor||g.LineColor,C=((K=(Y=(G=(j=(O=(x=A.propsConfig)==null?void 0:x.barcode)==null?void 0:O.propertyPanel)==null?void 0:j.find(q=>q.prop==="CodeType"))==null?void 0:G.options)==null?void 0:Y.find(q=>q.value===w))==null?void 0:K.compValue)||"",v={value:h,type:w,lineColor:B,codeType:C};if(JSON.stringify(v)!==JSON.stringify(l.value)){l.value=v;try{const q=i.value;q.innerHTML="",qd(q,h,{format:C,width:2,displayValue:!1,margin:0,lineColor:B,height:50,background:"transparent"}),f.nextTick(()=>{if(q){const ee=q.getBBox();if(ee.width>0&&ee.height>0){const ie=`${ee.x} ${ee.y} ${ee.width} ${ee.height}`;q.setAttribute("viewBox",ie),q.style.width="100%",q.style.height="100%",q.setAttribute("preserveAspectRatio","none")}}})}catch{}}},d=s(u,100);return f.onMounted(()=>{u(),a(),n()}),f.watch(()=>A.modelValue,()=>d(),{deep:!0}),f.watch(()=>A.propsConfig,()=>d(),{deep:!0}),(g,h)=>(f.openBlock(),f.createElementBlock("div",{class:"barcode-component",style:f.normalizeStyle(o.value)},[(f.openBlock(),f.createElementBlock("svg",{ref_key:"barcodeRef",ref:i,width:"100%",height:"100%",preserveAspectRatio:"none",style:{width:"100%",height:"100%"}},null,512))],4))}},TI={__name:"BarcodePropertyPanel",props:{modelValue:{type:Object,required:!0},propsConfig:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})}},emits:["update:modelValue"],setup(t){return(e,A)=>(f.openBlock(),f.createBlock(Ao,{"model-value":t.modelValue,"props-config":t.propsConfig,"panel-type":"barcode",options:t.options,"onUpdate:modelValue":A[0]||(A[0]=r=>e.$emit("update:modelValue",r))},null,8,["model-value","props-config","options"]))}},xI={},RI={t:"1745910558248",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1784"};function II(t,e){return f.openBlock(),f.createElementBlock("svg",RI,[...e[0]||(e[0]=[f.createElementVNode("path",{d:"M0 0m0 0l1024 0q0 0 0 0l0 1024q0 0 0 0l-1024 0q0 0 0 0l0-1024q0 0 0 0Z","fill-opacity":"0","p-id":"1785"},null,-1),f.createElementVNode("path",{d:"M388.592 912H195.92C150.24 912 112 871.696 112 823.44V642.848c0-15.92 11.424-28.368 26.816-28.368s26.816 11.952 26.816 28.368v180.592c0 17.92 13.408 32.336 30.288 32.336h192.16c15.408 0 26.832 11.952 26.832 28.368 0 15.424-11.424 27.856-26.32 27.856z m439.456 0h-192.16c-15.408 0-26.816-11.936-26.816-28.352 0-15.92 11.408-28.368 26.8-28.368h192.176c16.88 0 30.288-13.92 30.288-32.32V642.336c0-15.92 11.424-28.368 26.816-28.368s26.816 11.952 26.816 28.368v180.592c0 48.752-38.24 89.056-83.92 89.056zM138.816 409.504c-15.392 0-26.816-11.936-26.816-28.352V201.056C112 152.8 150.24 112.48 195.92 112.48h192.16c15.408 0 26.832 11.936 26.832 28.352 0 15.92-11.424 28.368-26.816 28.368H195.92c-16.88 0-30.288 15.92-30.288 34.32V384.16c0 13.44-11.424 25.36-26.816 25.36zM885.184 409.52c-15.392 0-26.816-11.952-26.816-28.368V201.056c0-17.92-13.408-32.336-30.288-32.336h-192.16c-15.408 0-26.832-11.936-26.832-28.368 0-15.92 11.424-28.352 26.816-28.352h192.176C873.76 112 912 152.304 912 200.56v180.592c0 16.416-13.408 28.368-26.816 28.368zM755.2 326v372c0 3.6 2.56 6 6.4 6 3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6-3.84 0-6.4 2.4-6.4 6zM672 698c0 3.6 2.56 6 6.4 6h38.4c3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6h-38.4c-3.84 0-6.4 2.4-6.4 6v372zM608 326v372c0 3.6 2.56 6 6.4 6h12.8c3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6h-12.8c-3.84 0-6.4 2.4-6.4 6zM560 326v372c0 3.6 2.56 6 6.4 6 3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6-3.84 0-6.4 2.4-6.4 6zM512 698c0 3.6 2.56 6 6.4 6 3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6-3.84 0-6.4 2.4-6.4 6v372zM336 698c0 3.6 2.56 6 6.4 6h12.8c3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6h-12.8c-3.84 0-6.4 2.4-6.4 6v372zM256 326v372c0 3.6 2.56 6 6.4 6h38.4c3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6h-38.4c-3.84 0-6.4 2.4-6.4 6zM400 698c0 3.6 2.56 6 6.4 6h64c3.84 0 6.4-2.4 6.4-6v-372c0-3.6-2.56-6-6.4-6h-64c-3.84 0-6.4 2.4-6.4 6v372z","p-id":"1786"},null,-1)])])}const VI=jA(xI,[["render",II]]),Ba=t=>t*3.7795275591,fo=t=>t/3.7795275591;var wa={},MI=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Fv={},Dr={};let $d;const LI=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Dr.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17},Dr.getSymbolTotalCodewords=function(e){return LI[e]},Dr.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e},Dr.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');$d=e},Dr.isKanjiModeEnabled=function(){return typeof $d<"u"},Dr.toSJIS=function(e){return $d(e)};var Wc={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(A){if(typeof A!="string")throw new Error("Param is not a string");switch(A.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+A)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,n){if(t.isValid(r))return r;try{return e(r)}catch{return n}}})(Wc);function Nv(){this.buffer=[],this.length=0}Nv.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let A=0;A<e;A++)this.putBit((t>>>e-A-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var OI=Nv;function Zs(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Zs.prototype.set=function(t,e,A,r){const n=t*this.size+e;this.data[n]=A,r&&(this.reservedBit[n]=!0)},Zs.prototype.get=function(t,e){return this.data[t*this.size+e]},Zs.prototype.xor=function(t,e,A){this.data[t*this.size+e]^=A},Zs.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var kI=Zs,Sv={};(function(t){const e=Dr.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const n=Math.floor(r/7)+2,a=e(r),i=a===145?26:Math.ceil((a-13)/(2*n-2))*2,o=[a-7];for(let s=1;s<n-1;s++)o[s]=o[s-1]-i;return o.push(6),o.reverse()},t.getPositions=function(r){const n=[],a=t.getRowColCoords(r),i=a.length;for(let o=0;o<i;o++)for(let s=0;s<i;s++)o===0&&s===0||o===0&&s===i-1||o===i-1&&s===0||n.push([a[o],a[s]]);return n}})(Sv);var Qv={};const HI=Dr.getSymbolSize,Tv=7;Qv.getPositions=function(e){const A=HI(e);return[[0,0],[A-Tv,0],[0,A-Tv]]};var xv={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){const a=n.size;let i=0,o=0,s=0,l=null,u=null;for(let d=0;d<a;d++){o=s=0,l=u=null;for(let g=0;g<a;g++){let h=n.get(d,g);h===l?o++:(o>=5&&(i+=e.N1+(o-5)),l=h,o=1),h=n.get(g,d),h===u?s++:(s>=5&&(i+=e.N1+(s-5)),u=h,s=1)}o>=5&&(i+=e.N1+(o-5)),s>=5&&(i+=e.N1+(s-5))}return i},t.getPenaltyN2=function(n){const a=n.size;let i=0;for(let o=0;o<a-1;o++)for(let s=0;s<a-1;s++){const l=n.get(o,s)+n.get(o,s+1)+n.get(o+1,s)+n.get(o+1,s+1);(l===4||l===0)&&i++}return i*e.N2},t.getPenaltyN3=function(n){const a=n.size;let i=0,o=0,s=0;for(let l=0;l<a;l++){o=s=0;for(let u=0;u<a;u++)o=o<<1&2047|n.get(l,u),u>=10&&(o===1488||o===93)&&i++,s=s<<1&2047|n.get(u,l),u>=10&&(s===1488||s===93)&&i++}return i*e.N3},t.getPenaltyN4=function(n){let a=0;const i=n.data.length;for(let s=0;s<i;s++)a+=n.data[s];return Math.abs(Math.ceil(a*100/i/5)-10)*e.N4};function A(r,n,a){switch(r){case t.Patterns.PATTERN000:return(n+a)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return a%3===0;case t.Patterns.PATTERN011:return(n+a)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(a/3))%2===0;case t.Patterns.PATTERN101:return n*a%2+n*a%3===0;case t.Patterns.PATTERN110:return(n*a%2+n*a%3)%2===0;case t.Patterns.PATTERN111:return(n*a%3+(n+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(n,a){const i=a.size;for(let o=0;o<i;o++)for(let s=0;s<i;s++)a.isReserved(s,o)||a.xor(s,o,A(n,s,o))},t.getBestMask=function(n,a){const i=Object.keys(t.Patterns).length;let o=0,s=1/0;for(let l=0;l<i;l++){a(l),t.applyMask(l,n);const u=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(l,n),u<s&&(s=u,o=l)}return o}})(xv);var _c={};const ya=Wc,Zc=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],jc=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];_c.getBlocksCount=function(e,A){switch(A){case ya.L:return Zc[(e-1)*4+0];case ya.M:return Zc[(e-1)*4+1];case ya.Q:return Zc[(e-1)*4+2];case ya.H:return Zc[(e-1)*4+3];default:return}},_c.getTotalCodewordsCount=function(e,A){switch(A){case ya.L:return jc[(e-1)*4+0];case ya.M:return jc[(e-1)*4+1];case ya.Q:return jc[(e-1)*4+2];case ya.H:return jc[(e-1)*4+3];default:return}};var Rv={},Jc={};const js=new Uint8Array(512),Kc=new Uint8Array(256);(function(){let e=1;for(let A=0;A<255;A++)js[A]=e,Kc[e]=A,e<<=1,e&256&&(e^=285);for(let A=255;A<512;A++)js[A]=js[A-255]})(),Jc.log=function(e){if(e<1)throw new Error("log("+e+")");return Kc[e]},Jc.exp=function(e){return js[e]},Jc.mul=function(e,A){return e===0||A===0?0:js[Kc[e]+Kc[A]]},function(t){const e=Jc;t.mul=function(r,n){const a=new Uint8Array(r.length+n.length-1);for(let i=0;i<r.length;i++)for(let o=0;o<n.length;o++)a[i+o]^=e.mul(r[i],n[o]);return a},t.mod=function(r,n){let a=new Uint8Array(r);for(;a.length-n.length>=0;){const i=a[0];for(let s=0;s<n.length;s++)a[s]^=e.mul(n[s],i);let o=0;for(;o<a.length&&a[o]===0;)o++;a=a.slice(o)}return a},t.generateECPolynomial=function(r){let n=new Uint8Array([1]);for(let a=0;a<r;a++)n=t.mul(n,new Uint8Array([1,e.exp(a)]));return n}}(Rv);const Iv=Rv;function e0(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}e0.prototype.initialize=function(e){this.degree=e,this.genPoly=Iv.generateECPolynomial(this.degree)},e0.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const A=new Uint8Array(e.length+this.degree);A.set(e);const r=Iv.mod(A,this.genPoly),n=this.degree-r.length;if(n>0){const a=new Uint8Array(this.degree);return a.set(r,n),a}return r};var DI=e0,Vv={},ba={},t0={};t0.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Vn={};const Mv="[0-9]+",PI="[A-Z $%*+\\-./:]+";let Js="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Js=Js.replace(/u/g,"\\u");const WI="(?:(?![A-Z0-9 $%*+\\-./:]|"+Js+`)(?:.|[\r
|
|
6
6
|
]))+`;Vn.KANJI=new RegExp(Js,"g"),Vn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Vn.BYTE=new RegExp(WI,"g"),Vn.NUMERIC=new RegExp(Mv,"g"),Vn.ALPHANUMERIC=new RegExp(PI,"g");const _I=new RegExp("^"+Js+"$"),ZI=new RegExp("^"+Mv+"$"),jI=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Vn.testKanji=function(e){return _I.test(e)},Vn.testNumeric=function(e){return ZI.test(e)},Vn.testAlphanumeric=function(e){return jI.test(e)},function(t){const e=t0,A=Vn;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(a,i){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!e.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?a.ccBits[0]:i<27?a.ccBits[1]:a.ccBits[2]},t.getBestModeForData=function(a){return A.testNumeric(a)?t.NUMERIC:A.testAlphanumeric(a)?t.ALPHANUMERIC:A.testKanji(a)?t.KANJI:t.BYTE},t.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},t.isValid=function(a){return a&&a.bit&&a.ccBits};function r(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}t.from=function(a,i){if(t.isValid(a))return a;try{return r(a)}catch{return i}}}(ba),function(t){const e=Dr,A=_c,r=Wc,n=ba,a=t0,i=7973,o=e.getBCHDigit(i);function s(g,h,w){for(let B=1;B<=40;B++)if(h<=t.getCapacity(B,w,g))return B}function l(g,h){return n.getCharCountIndicator(g,h)+4}function u(g,h){let w=0;return g.forEach(function(B){const C=l(B.mode,h);w+=C+B.getBitsLength()}),w}function d(g,h){for(let w=1;w<=40;w++)if(u(g,w)<=t.getCapacity(w,h,n.MIXED))return w}t.from=function(h,w){return a.isValid(h)?parseInt(h,10):w},t.getCapacity=function(h,w,B){if(!a.isValid(h))throw new Error("Invalid QR Code version");typeof B>"u"&&(B=n.BYTE);const C=e.getSymbolTotalCodewords(h),v=A.getTotalCodewordsCount(h,w),y=(C-v)*8;if(B===n.MIXED)return y;const F=y-l(B,h);switch(B){case n.NUMERIC:return Math.floor(F/10*3);case n.ALPHANUMERIC:return Math.floor(F/11*2);case n.KANJI:return Math.floor(F/13);case n.BYTE:default:return Math.floor(F/8)}},t.getBestVersionForData=function(h,w){let B;const C=r.from(w,r.M);if(Array.isArray(h)){if(h.length>1)return d(h,C);if(h.length===0)return 1;B=h[0]}else B=h;return s(B.mode,B.getLength(),C)},t.getEncodedBits=function(h){if(!a.isValid(h)||h<7)throw new Error("Invalid QR Code version");let w=h<<12;for(;e.getBCHDigit(w)-o>=0;)w^=i<<e.getBCHDigit(w)-o;return h<<12|w}}(Vv);var Lv={};const A0=Dr,Ov=1335,JI=21522,kv=A0.getBCHDigit(Ov);Lv.getEncodedBits=function(e,A){const r=e.bit<<3|A;let n=r<<10;for(;A0.getBCHDigit(n)-kv>=0;)n^=Ov<<A0.getBCHDigit(n)-kv;return(r<<10|n)^JI};var Hv={};const KI=ba;function ho(t){this.mode=KI.NUMERIC,this.data=t.toString()}ho.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},ho.prototype.getLength=function(){return this.data.length},ho.prototype.getBitsLength=function(){return ho.getBitsLength(this.data.length)},ho.prototype.write=function(e){let A,r,n;for(A=0;A+3<=this.data.length;A+=3)r=this.data.substr(A,3),n=parseInt(r,10),e.put(n,10);const a=this.data.length-A;a>0&&(r=this.data.substr(A),n=parseInt(r,10),e.put(n,a*3+1))};var GI=ho;const zI=ba,r0=["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"," ","$","%","*","+","-",".","/",":"];function po(t){this.mode=zI.ALPHANUMERIC,this.data=t}po.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},po.prototype.getLength=function(){return this.data.length},po.prototype.getBitsLength=function(){return po.getBitsLength(this.data.length)},po.prototype.write=function(e){let A;for(A=0;A+2<=this.data.length;A+=2){let r=r0.indexOf(this.data[A])*45;r+=r0.indexOf(this.data[A+1]),e.put(r,11)}this.data.length%2&&e.put(r0.indexOf(this.data[A]),6)};var YI=po;const XI=ba;function go(t){this.mode=XI.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}go.getBitsLength=function(e){return e*8},go.prototype.getLength=function(){return this.data.length},go.prototype.getBitsLength=function(){return go.getBitsLength(this.data.length)},go.prototype.write=function(t){for(let e=0,A=this.data.length;e<A;e++)t.put(this.data[e],8)};var qI=go;const $I=ba,eV=Dr;function mo(t){this.mode=$I.KANJI,this.data=t}mo.getBitsLength=function(e){return e*13},mo.prototype.getLength=function(){return this.data.length},mo.prototype.getBitsLength=function(){return mo.getBitsLength(this.data.length)},mo.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let A=eV.toSJIS(this.data[e]);if(A>=33088&&A<=40956)A-=33088;else if(A>=57408&&A<=60351)A-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
|
|
7
7
|
Make sure your charset is UTF-8`);A=(A>>>8&255)*192+(A&255),t.put(A,13)}};var tV=mo,Dv={exports:{}};(function(t){var e={single_source_shortest_paths:function(A,r,n){var a={},i={};i[r]=0;var o=e.PriorityQueue.make();o.push(r,0);for(var s,l,u,d,g,h,w,B,C;!o.empty();){s=o.pop(),l=s.value,d=s.cost,g=A[l]||{};for(u in g)g.hasOwnProperty(u)&&(h=g[u],w=d+h,B=i[u],C=typeof i[u]>"u",(C||B>w)&&(i[u]=w,o.push(u,w),a[u]=l))}if(typeof n<"u"&&typeof i[n]>"u"){var v=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(v)}return a},extract_shortest_path_from_predecessor_list:function(A,r){for(var n=[],a=r;a;)n.push(a),A[a],a=A[a];return n.reverse(),n},find_path:function(A,r,n){var a=e.single_source_shortest_paths(A,r,n);return e.extract_shortest_path_from_predecessor_list(a,n)},PriorityQueue:{make:function(A){var r=e.PriorityQueue,n={},a;A=A||{};for(a in r)r.hasOwnProperty(a)&&(n[a]=r[a]);return n.queue=[],n.sorter=A.sorter||r.default_sorter,n},default_sorter:function(A,r){return A.cost-r.cost},push:function(A,r){var n={value:A,cost:r};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(Dv);var AV=Dv.exports;(function(t){const e=ba,A=GI,r=YI,n=qI,a=tV,i=Vn,o=Dr,s=AV;function l(v){return unescape(encodeURIComponent(v)).length}function u(v,y,F){const Q=[];let M;for(;(M=v.exec(F))!==null;)Q.push({data:M[0],index:M.index,mode:y,length:M[0].length});return Q}function d(v){const y=u(i.NUMERIC,e.NUMERIC,v),F=u(i.ALPHANUMERIC,e.ALPHANUMERIC,v);let Q,M;return o.isKanjiModeEnabled()?(Q=u(i.BYTE,e.BYTE,v),M=u(i.KANJI,e.KANJI,v)):(Q=u(i.BYTE_KANJI,e.BYTE,v),M=[]),y.concat(F,Q,M).sort(function(V,k){return V.index-k.index}).map(function(V){return{data:V.data,mode:V.mode,length:V.length}})}function g(v,y){switch(y){case e.NUMERIC:return A.getBitsLength(v);case e.ALPHANUMERIC:return r.getBitsLength(v);case e.KANJI:return a.getBitsLength(v);case e.BYTE:return n.getBitsLength(v)}}function h(v){return v.reduce(function(y,F){const Q=y.length-1>=0?y[y.length-1]:null;return Q&&Q.mode===F.mode?(y[y.length-1].data+=F.data,y):(y.push(F),y)},[])}function w(v){const y=[];for(let F=0;F<v.length;F++){const Q=v[F];switch(Q.mode){case e.NUMERIC:y.push([Q,{data:Q.data,mode:e.ALPHANUMERIC,length:Q.length},{data:Q.data,mode:e.BYTE,length:Q.length}]);break;case e.ALPHANUMERIC:y.push([Q,{data:Q.data,mode:e.BYTE,length:Q.length}]);break;case e.KANJI:y.push([Q,{data:Q.data,mode:e.BYTE,length:l(Q.data)}]);break;case e.BYTE:y.push([{data:Q.data,mode:e.BYTE,length:l(Q.data)}])}}return y}function B(v,y){const F={},Q={start:{}};let M=["start"];for(let L=0;L<v.length;L++){const V=v[L],k=[];for(let W=0;W<V.length;W++){const T=V[W],N=""+L+W;k.push(N),F[N]={node:T,lastCount:0},Q[N]={};for(let E=0;E<M.length;E++){const x=M[E];F[x]&&F[x].node.mode===T.mode?(Q[x][N]=g(F[x].lastCount+T.length,T.mode)-g(F[x].lastCount,T.mode),F[x].lastCount+=T.length):(F[x]&&(F[x].lastCount=T.length),Q[x][N]=g(T.length,T.mode)+4+e.getCharCountIndicator(T.mode,y))}}M=k}for(let L=0;L<M.length;L++)Q[M[L]].end=0;return{map:Q,table:F}}function C(v,y){let F;const Q=e.getBestModeForData(v);if(F=e.from(y,Q),F!==e.BYTE&&F.bit<Q.bit)throw new Error('"'+v+'" cannot be encoded with mode '+e.toString(F)+`.
|
|
8
8
|
Suggested mode is: `+e.toString(Q));switch(F===e.KANJI&&!o.isKanjiModeEnabled()&&(F=e.BYTE),F){case e.NUMERIC:return new A(v);case e.ALPHANUMERIC:return new r(v);case e.KANJI:return new a(v);case e.BYTE:return new n(v)}}t.fromArray=function(y){return y.reduce(function(F,Q){return typeof Q=="string"?F.push(C(Q,null)):Q.data&&F.push(C(Q.data,Q.mode)),F},[])},t.fromString=function(y,F){const Q=d(y,o.isKanjiModeEnabled()),M=w(Q),L=B(M,F),V=s.find_path(L.map,"start","end"),k=[];for(let W=1;W<V.length-1;W++)k.push(L.table[V[W]].node);return t.fromArray(h(k))},t.rawSplit=function(y){return t.fromArray(d(y,o.isKanjiModeEnabled()))}})(Hv);const Gc=Dr,n0=Wc,rV=OI,nV=kI,aV=Sv,iV=Qv,a0=xv,i0=_c,oV=DI,zc=Vv,sV=Lv,lV=ba,o0=Hv;function cV(t,e){const A=t.size,r=iV.getPositions(e);for(let n=0;n<r.length;n++){const a=r[n][0],i=r[n][1];for(let o=-1;o<=7;o++)if(!(a+o<=-1||A<=a+o))for(let s=-1;s<=7;s++)i+s<=-1||A<=i+s||(o>=0&&o<=6&&(s===0||s===6)||s>=0&&s<=6&&(o===0||o===6)||o>=2&&o<=4&&s>=2&&s<=4?t.set(a+o,i+s,!0,!0):t.set(a+o,i+s,!1,!0))}}function uV(t){const e=t.size;for(let A=8;A<e-8;A++){const r=A%2===0;t.set(A,6,r,!0),t.set(6,A,r,!0)}}function fV(t,e){const A=aV.getPositions(e);for(let r=0;r<A.length;r++){const n=A[r][0],a=A[r][1];for(let i=-2;i<=2;i++)for(let o=-2;o<=2;o++)i===-2||i===2||o===-2||o===2||i===0&&o===0?t.set(n+i,a+o,!0,!0):t.set(n+i,a+o,!1,!0)}}function hV(t,e){const A=t.size,r=zc.getEncodedBits(e);let n,a,i;for(let o=0;o<18;o++)n=Math.floor(o/3),a=o%3+A-8-3,i=(r>>o&1)===1,t.set(n,a,i,!0),t.set(a,n,i,!0)}function s0(t,e,A){const r=t.size,n=sV.getEncodedBits(e,A);let a,i;for(a=0;a<15;a++)i=(n>>a&1)===1,a<6?t.set(a,8,i,!0):a<8?t.set(a+1,8,i,!0):t.set(r-15+a,8,i,!0),a<8?t.set(8,r-a-1,i,!0):a<9?t.set(8,15-a-1+1,i,!0):t.set(8,15-a-1,i,!0);t.set(r-8,8,1,!0)}function dV(t,e){const A=t.size;let r=-1,n=A-1,a=7,i=0;for(let o=A-1;o>0;o-=2)for(o===6&&o--;;){for(let s=0;s<2;s++)if(!t.isReserved(n,o-s)){let l=!1;i<e.length&&(l=(e[i]>>>a&1)===1),t.set(n,o-s,l),a--,a===-1&&(i++,a=7)}if(n+=r,n<0||A<=n){n-=r,r=-r;break}}}function pV(t,e,A){const r=new rV;A.forEach(function(s){r.put(s.mode.bit,4),r.put(s.getLength(),lV.getCharCountIndicator(s.mode,t)),s.write(r)});const n=Gc.getSymbolTotalCodewords(t),a=i0.getTotalCodewordsCount(t,e),i=(n-a)*8;for(r.getLengthInBits()+4<=i&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const o=(i-r.getLengthInBits())/8;for(let s=0;s<o;s++)r.put(s%2?17:236,8);return gV(r,t,e)}function gV(t,e,A){const r=Gc.getSymbolTotalCodewords(e),n=i0.getTotalCodewordsCount(e,A),a=r-n,i=i0.getBlocksCount(e,A),o=r%i,s=i-o,l=Math.floor(r/i),u=Math.floor(a/i),d=u+1,g=l-u,h=new oV(g);let w=0;const B=new Array(i),C=new Array(i);let v=0;const y=new Uint8Array(t.buffer);for(let V=0;V<i;V++){const k=V<s?u:d;B[V]=y.slice(w,w+k),C[V]=h.encode(B[V]),w+=k,v=Math.max(v,k)}const F=new Uint8Array(r);let Q=0,M,L;for(M=0;M<v;M++)for(L=0;L<i;L++)M<B[L].length&&(F[Q++]=B[L][M]);for(M=0;M<g;M++)for(L=0;L<i;L++)F[Q++]=C[L][M];return F}function mV(t,e,A,r){let n;if(Array.isArray(t))n=o0.fromArray(t);else if(typeof t=="string"){let l=e;if(!l){const u=o0.rawSplit(t);l=zc.getBestVersionForData(u,A)}n=o0.fromString(t,l||40)}else throw new Error("Invalid data");const a=zc.getBestVersionForData(n,A);if(!a)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=a;else if(e<a)throw new Error(`
|
|
@@ -56,7 +56,7 @@ Minimum version required to store current data is: `+a+`.
|
|
|
56
56
|
content: "" !important;
|
|
57
57
|
display: none !important;
|
|
58
58
|
}`,x8=function(t){R8(t,"."+sp+Q8+Xw+`
|
|
59
|
-
.`+lp+T8+Xw)},R8=function(t,e){var A=t.ownerDocument;if(A){var r=A.createElement("style");r.textContent=e,t.appendChild(r)}},qw=function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),I8=function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(up(e)||O8(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return Br(this,void 0,void 0,function(){var A,r,n,a,i=this;return ir(this,function(o){switch(o.label){case 0:return A=qw.isSameOrigin(e),r=!cp(e)&&this._options.useCORS===!0&&$A.SUPPORT_CORS_IMAGES&&!A,n=!cp(e)&&!A&&!up(e)&&typeof this._options.proxy=="string"&&$A.SUPPORT_CORS_XHR&&!r,!A&&this._options.allowTaint===!1&&!cp(e)&&!up(e)&&!n&&!r?[2]:(a=e,n?[4,this.proxy(a)]:[3,2]);case 1:a=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(s,l){var u=new Image;u.onload=function(){return s(u)},u.onerror=l,(k8(a)||r)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(function(){return s(u)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(a,i){var o=$A.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o==="text")a(s.response);else{var d=new FileReader;d.addEventListener("load",function(){return a(d.result)},!1),d.addEventListener("error",function(g){return i(g)},!1),d.readAsDataURL(s.response)}else i("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=i;var l=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=o),A._options.imageTimeout){var u=A._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return i("Timed out ("+u+"ms) proxying "+n)}}s.send()})},t}(),V8=/^data:image\/svg\+xml/i,M8=/^data:image\/.*;base64,/i,L8=/^data:image\/.*/i,O8=function(t){return $A.SUPPORT_SVG_DRAWING||!H8(t)},cp=function(t){return L8.test(t)},k8=function(t){return M8.test(t)},up=function(t){return t.substr(0,4)==="blob"},H8=function(t){return t.substr(-3).toLowerCase()==="svg"||V8.test(t)},Ge=function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t}(),xo=function(t,e,A){return new Ge(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},Lu=function(){function t(e,A,r,n){this.type=1,this.start=e,this.startControl=A,this.endControl=r,this.end=n}return t.prototype.subdivide=function(e,A){var r=xo(this.start,this.startControl,e),n=xo(this.startControl,this.endControl,e),a=xo(this.endControl,this.end,e),i=xo(r,n,e),o=xo(n,a,e),s=xo(i,o,e);return A?new t(this.start,r,i,s):new t(s,o,a,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),$r=function(t){return t.type===1},D8=function(){function t(e){var A=e.styles,r=e.bounds,n=sl(A.borderTopLeftRadius,r.width,r.height),a=n[0],i=n[1],o=sl(A.borderTopRightRadius,r.width,r.height),s=o[0],l=o[1],u=sl(A.borderBottomRightRadius,r.width,r.height),d=u[0],g=u[1],h=sl(A.borderBottomLeftRadius,r.width,r.height),w=h[0],B=h[1],C=[];C.push((a+s)/r.width),C.push((w+d)/r.width),C.push((i+B)/r.height),C.push((l+g)/r.height);var v=Math.max.apply(Math,C);v>1&&(a/=v,i/=v,s/=v,l/=v,d/=v,g/=v,w/=v,B/=v);var y=r.width-s,F=r.height-g,Q=r.width-d,M=r.height-B,L=A.borderTopWidth,V=A.borderRightWidth,k=A.borderBottomWidth,W=A.borderLeftWidth,T=tA(A.paddingTop,e.bounds.width),N=tA(A.paddingRight,e.bounds.width),E=tA(A.paddingBottom,e.bounds.width),x=tA(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||i>0?uA(r.left+W/3,r.top+L/3,a-W/3,i-L/3,Zt.TOP_LEFT):new Ge(r.left+W/3,r.top+L/3),this.topRightBorderDoubleOuterBox=a>0||i>0?uA(r.left+y,r.top+L/3,s-V/3,l-L/3,Zt.TOP_RIGHT):new Ge(r.left+r.width-V/3,r.top+L/3),this.bottomRightBorderDoubleOuterBox=d>0||g>0?uA(r.left+Q,r.top+F,d-V/3,g-k/3,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V/3,r.top+r.height-k/3),this.bottomLeftBorderDoubleOuterBox=w>0||B>0?uA(r.left+W/3,r.top+M,w-W/3,B-k/3,Zt.BOTTOM_LEFT):new Ge(r.left+W/3,r.top+r.height-k/3),this.topLeftBorderDoubleInnerBox=a>0||i>0?uA(r.left+W*2/3,r.top+L*2/3,a-W*2/3,i-L*2/3,Zt.TOP_LEFT):new Ge(r.left+W*2/3,r.top+L*2/3),this.topRightBorderDoubleInnerBox=a>0||i>0?uA(r.left+y,r.top+L*2/3,s-V*2/3,l-L*2/3,Zt.TOP_RIGHT):new Ge(r.left+r.width-V*2/3,r.top+L*2/3),this.bottomRightBorderDoubleInnerBox=d>0||g>0?uA(r.left+Q,r.top+F,d-V*2/3,g-k*2/3,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V*2/3,r.top+r.height-k*2/3),this.bottomLeftBorderDoubleInnerBox=w>0||B>0?uA(r.left+W*2/3,r.top+M,w-W*2/3,B-k*2/3,Zt.BOTTOM_LEFT):new Ge(r.left+W*2/3,r.top+r.height-k*2/3),this.topLeftBorderStroke=a>0||i>0?uA(r.left+W/2,r.top+L/2,a-W/2,i-L/2,Zt.TOP_LEFT):new Ge(r.left+W/2,r.top+L/2),this.topRightBorderStroke=a>0||i>0?uA(r.left+y,r.top+L/2,s-V/2,l-L/2,Zt.TOP_RIGHT):new Ge(r.left+r.width-V/2,r.top+L/2),this.bottomRightBorderStroke=d>0||g>0?uA(r.left+Q,r.top+F,d-V/2,g-k/2,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V/2,r.top+r.height-k/2),this.bottomLeftBorderStroke=w>0||B>0?uA(r.left+W/2,r.top+M,w-W/2,B-k/2,Zt.BOTTOM_LEFT):new Ge(r.left+W/2,r.top+r.height-k/2),this.topLeftBorderBox=a>0||i>0?uA(r.left,r.top,a,i,Zt.TOP_LEFT):new Ge(r.left,r.top),this.topRightBorderBox=s>0||l>0?uA(r.left+y,r.top,s,l,Zt.TOP_RIGHT):new Ge(r.left+r.width,r.top),this.bottomRightBorderBox=d>0||g>0?uA(r.left+Q,r.top+F,d,g,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=w>0||B>0?uA(r.left,r.top+M,w,B,Zt.BOTTOM_LEFT):new Ge(r.left,r.top+r.height),this.topLeftPaddingBox=a>0||i>0?uA(r.left+W,r.top+L,Math.max(0,a-W),Math.max(0,i-L),Zt.TOP_LEFT):new Ge(r.left+W,r.top+L),this.topRightPaddingBox=s>0||l>0?uA(r.left+Math.min(y,r.width-V),r.top+L,y>r.width+V?0:Math.max(0,s-V),Math.max(0,l-L),Zt.TOP_RIGHT):new Ge(r.left+r.width-V,r.top+L),this.bottomRightPaddingBox=d>0||g>0?uA(r.left+Math.min(Q,r.width-W),r.top+Math.min(F,r.height-k),Math.max(0,d-V),Math.max(0,g-k),Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V,r.top+r.height-k),this.bottomLeftPaddingBox=w>0||B>0?uA(r.left+W,r.top+Math.min(M,r.height-k),Math.max(0,w-W),Math.max(0,B-k),Zt.BOTTOM_LEFT):new Ge(r.left+W,r.top+r.height-k),this.topLeftContentBox=a>0||i>0?uA(r.left+W+x,r.top+L+T,Math.max(0,a-(W+x)),Math.max(0,i-(L+T)),Zt.TOP_LEFT):new Ge(r.left+W+x,r.top+L+T),this.topRightContentBox=s>0||l>0?uA(r.left+Math.min(y,r.width+W+x),r.top+L+T,y>r.width+W+x?0:s-W+x,l-(L+T),Zt.TOP_RIGHT):new Ge(r.left+r.width-(V+N),r.top+L+T),this.bottomRightContentBox=d>0||g>0?uA(r.left+Math.min(Q,r.width-(W+x)),r.top+Math.min(F,r.height+L+T),Math.max(0,d-(V+N)),g-(k+E),Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-(V+N),r.top+r.height-(k+E)),this.bottomLeftContentBox=w>0||B>0?uA(r.left+W+x,r.top+M,Math.max(0,w-(W+x)),B-(k+E),Zt.BOTTOM_LEFT):new Ge(r.left+W+x,r.top+r.height-(k+E))}return t}(),Zt;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Zt||(Zt={}));var uA=function(t,e,A,r,n){var a=4*((Math.sqrt(2)-1)/3),i=A*a,o=r*a,s=t+A,l=e+r;switch(n){case Zt.TOP_LEFT:return new Lu(new Ge(t,l),new Ge(t,l-o),new Ge(s-i,e),new Ge(s,e));case Zt.TOP_RIGHT:return new Lu(new Ge(t,e),new Ge(t+i,e),new Ge(s,l-o),new Ge(s,l));case Zt.BOTTOM_RIGHT:return new Lu(new Ge(s,e),new Ge(s,e+o),new Ge(t+i,l),new Ge(t,l));case Zt.BOTTOM_LEFT:default:return new Lu(new Ge(s,l),new Ge(s-i,l),new Ge(t,e+o),new Ge(t,e))}},Ou=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},P8=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},ku=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},W8=function(){function t(e,A,r){this.offsetX=e,this.offsetY=A,this.matrix=r,this.type=0,this.target=6}return t}(),Hu=function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t}(),_8=function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t}(),Z8=function(t){return t.type===0},$w=function(t){return t.type===1},j8=function(t){return t.type===2},ey=function(t,e){return t.length===e.length?t.some(function(A,r){return A===e[r]}):!1},J8=function(t,e,A,r,n){return t.map(function(a,i){switch(i){case 0:return a.add(e,A);case 1:return a.add(e+r,A);case 2:return a.add(e+r,A+n);case 3:return a.add(e,A+n)}return a})},ty=function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),Ay=function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new D8(this.container),this.container.styles.opacity<1&&this.effects.push(new _8(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new W8(r,n,a))}if(this.container.styles.overflowX!==0){var i=Ou(this.curves),o=ku(this.curves);ey(i,o)?this.effects.push(new Hu(i,6)):(this.effects.push(new Hu(i,2)),this.effects.push(new Hu(o,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var a=r.effects.filter(function(s){return!$w(s)});if(A||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,a),A=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var i=Ou(r.curves),o=ku(r.curves);ey(i,o)||n.unshift(new Hu(o,6))}}else n.unshift.apply(n,a);r=r.parent}return n.filter(function(s){return WA(s.target,e)})},t}(),fp=function(t,e,A,r){t.container.elements.forEach(function(n){var a=WA(n.flags,4),i=WA(n.flags,2),o=new Ay(n,t);WA(n.styles.display,2048)&&r.push(o);var s=WA(n.flags,8)?[]:r;if(a||i){var l=a||n.styles.isPositioned()?A:e,u=new ty(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var d=n.styles.zIndex.order;if(d<0){var g=0;l.negativeZIndex.some(function(w,B){return d>w.element.container.styles.zIndex.order?(g=B,!1):g>0}),l.negativeZIndex.splice(g,0,u)}else if(d>0){var h=0;l.positiveZIndex.some(function(w,B){return d>=w.element.container.styles.zIndex.order?(h=B+1,!1):h>0}),l.positiveZIndex.splice(h,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);fp(o,u,a?u:A,s)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),fp(o,e,A,s);WA(n.flags,8)&&ry(n,s)})},ry=function(t,e){for(var A=t instanceof tp?t.start:1,r=t instanceof tp?t.reversed:!1,n=0;n<e.length;n++){var a=e[n];a.container instanceof Sw&&typeof a.container.value=="number"&&a.container.value!==0&&(A=a.container.value),a.listValue=dl(A,a.container.styles.listStyleType,!0),A+=r?-1:1}},K8=function(t){var e=new Ay(t,null),A=new ty(e),r=[];return fp(e,A,A,r),ry(e.container,r),A},ny=function(t,e){switch(e){case 0:return en(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return en(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return en(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return en(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},G8=function(t,e){switch(e){case 0:return en(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return en(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return en(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return en(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},z8=function(t,e){switch(e){case 0:return en(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return en(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return en(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return en(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},Y8=function(t,e){switch(e){case 0:return Du(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Du(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Du(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return Du(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Du=function(t,e){var A=[];return $r(t)?A.push(t.subdivide(.5,!1)):A.push(t),$r(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},en=function(t,e,A,r){var n=[];return $r(t)?n.push(t.subdivide(.5,!1)):n.push(t),$r(A)?n.push(A.subdivide(.5,!0)):n.push(A),$r(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),$r(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},ay=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},Pu=function(t){var e=t.styles,A=t.bounds,r=tA(e.paddingLeft,A.width),n=tA(e.paddingRight,A.width),a=tA(e.paddingTop,A.width),i=tA(e.paddingBottom,A.width);return A.add(r+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+a+i))},X8=function(t,e){return t===0?e.bounds:t===2?Pu(e):ay(e)},q8=function(t,e){return t===0?e.bounds:t===2?Pu(e):ay(e)},hp=function(t,e,A){var r=X8(Io(t.styles.backgroundOrigin,e),t),n=q8(Io(t.styles.backgroundClip,e),t),a=$8(Io(t.styles.backgroundSize,e),A,r),i=a[0],o=a[1],s=sl(Io(t.styles.backgroundPosition,e),r.width-i,r.height-o),l=eH(Io(t.styles.backgroundRepeat,e),s,a,r,n),u=Math.round(r.left+s[0]),d=Math.round(r.top+s[1]);return[l,u,d,i,o]},Ro=function(t){return zt(t)&&t.value===No.AUTO},Wu=function(t){return typeof t=="number"},$8=function(t,e,A){var r=e[0],n=e[1],a=e[2],i=t[0],o=t[1];if(!i)return[0,0];if(LA(i)&&o&&LA(o))return[tA(i,A.width),tA(o,A.height)];var s=Wu(a);if(zt(i)&&(i.value===No.CONTAIN||i.value===No.COVER)){if(Wu(a)){var l=A.width/A.height;return l<a!=(i.value===No.COVER)?[A.width,A.width/a]:[A.height*a,A.height]}return[A.width,A.height]}var u=Wu(r),d=Wu(n),g=u||d;if(Ro(i)&&(!o||Ro(o))){if(u&&d)return[r,n];if(!s&&!g)return[A.width,A.height];if(g&&s){var h=u?r:n*a,w=d?n:r/a;return[h,w]}var B=u?r:A.width,C=d?n:A.height;return[B,C]}if(s){var v=0,y=0;return LA(i)?v=tA(i,A.width):LA(o)&&(y=tA(o,A.height)),Ro(i)?v=y*a:(!o||Ro(o))&&(y=v/a),[v,y]}var F=null,Q=null;if(LA(i)?F=tA(i,A.width):o&&LA(o)&&(Q=tA(o,A.height)),F!==null&&(!o||Ro(o))&&(Q=u&&d?F/r*n:A.height),Q!==null&&Ro(i)&&(F=u&&d?Q/n*r:A.width),F!==null&&Q!==null)return[F,Q];throw new Error("Unable to calculate background-size for element")},Io=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},eH=function(t,e,A,r,n){var a=e[0],i=e[1],o=A[0],s=A[1];switch(t){case 2:return[new Ge(Math.round(r.left),Math.round(r.top+i)),new Ge(Math.round(r.left+r.width),Math.round(r.top+i)),new Ge(Math.round(r.left+r.width),Math.round(s+r.top+i)),new Ge(Math.round(r.left),Math.round(s+r.top+i))];case 3:return[new Ge(Math.round(r.left+a),Math.round(r.top)),new Ge(Math.round(r.left+a+o),Math.round(r.top)),new Ge(Math.round(r.left+a+o),Math.round(r.height+r.top)),new Ge(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new Ge(Math.round(r.left+a),Math.round(r.top+i)),new Ge(Math.round(r.left+a+o),Math.round(r.top+i)),new Ge(Math.round(r.left+a+o),Math.round(r.top+i+s)),new Ge(Math.round(r.left+a),Math.round(r.top+i+s))];default:return[new Ge(Math.round(n.left),Math.round(n.top)),new Ge(Math.round(n.left+n.width),Math.round(n.top)),new Ge(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Ge(Math.round(n.left),Math.round(n.height+n.top))]}},tH="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",iy="Hidden Text",AH=function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var r=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),i=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=A,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",i.appendChild(r),n.src=tH,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=A,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(iy)),r.appendChild(a),r.appendChild(n);var o=n.offsetTop-a.offsetTop+2;r.removeChild(a),r.appendChild(this._document.createTextNode(iy)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return i.removeChild(r),{baseline:o,middle:s}},t.prototype.getMetrics=function(e,A){var r=e+" "+A;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,A)),this._data[r]},t}(),oy=function(){function t(e,A){this.context=e,this.options=A}return t}(),rH=1e4,nH=function(t){hn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new AH(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(A){for(var r=this;this._activeEffects.length;)this.popEffect();A.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(A){this.ctx.save(),j8(A)&&(this.ctx.globalAlpha=A.opacity),Z8(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),$w(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return Br(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return r=A.element.container.styles,r.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return Br(this,void 0,void 0,function(){return ir(this,function(r){switch(r.label){case 0:if(WA(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(A)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,r,n){var a=this;if(r===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+n);else{var i=ep(A.text);i.reduce(function(o,s){return a.ctx.fillText(s,o,A.bounds.top+n),o+a.ctx.measureText(s).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var r=A.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=lH(A.fontFamily).join(", "),a=ol(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,r,A.fontWeight,a,n].join(" "),n,a]},e.prototype.renderTextNode=function(A,r){return Br(this,void 0,void 0,function(){var n,a,i,o,s,l,u,d,g=this;return ir(this,function(h){return n=this.createFontStyle(r),a=n[0],i=n[1],o=n[2],this.ctx.font=a,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(i,o),l=s.baseline,u=s.middle,d=r.paintOrder,A.textBounds.forEach(function(w){d.forEach(function(B){switch(B){case 0:g.ctx.fillStyle=JA(r.color),g.renderTextWithLetterSpacing(w,r.letterSpacing,l);var C=r.textShadow;C.length&&w.text.trim().length&&(C.slice(0).reverse().forEach(function(v){g.ctx.shadowColor=JA(v.color),g.ctx.shadowOffsetX=v.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=v.offsetY.number*g.options.scale,g.ctx.shadowBlur=v.blur.number,g.renderTextWithLetterSpacing(w,r.letterSpacing,l)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),r.textDecorationLine.length&&(g.ctx.fillStyle=JA(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(v){switch(v){case 1:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top+l),w.bounds.width,1);break;case 2:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top),w.bounds.width,1);break;case 3:g.ctx.fillRect(w.bounds.left,Math.ceil(w.bounds.top+u),w.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&w.text.trim().length&&(g.ctx.strokeStyle=JA(r.webkitTextStrokeColor),g.ctx.lineWidth=r.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(w.text,w.bounds.left,w.bounds.top+l)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,r,n){if(n&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var a=Pu(A),i=ku(r);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,A.intrinsicWidth,A.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s,y,y,l,u,d,g,Q,h,w,M,B,C,v,y,F,Q,M;return ir(this,function(L){switch(L.label){case 0:this.applyEffects(A.getEffects(4)),r=A.container,n=A.curves,a=r.styles,i=0,o=r.textNodes,L.label=1;case 1:return i<o.length?(s=o[i],[4,this.renderTextNode(s,a)]):[3,4];case 2:L.sent(),L.label=3;case 3:return i++,[3,1];case 4:if(!(r instanceof Uw))return[3,8];L.label=5;case 5:return L.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return y=L.sent(),this.renderReplacedElement(r,n,y),[3,8];case 7:return L.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof Fw&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof Nw))return[3,12];L.label=9;case 9:return L.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return y=L.sent(),this.renderReplacedElement(r,n,y),[3,12];case 11:return L.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof Rw&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:u=L.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),L.label=14;case 14:if(r instanceof Ap&&(d=Math.min(r.bounds.width,r.bounds.height),r.type===Tu?r.checked&&(this.ctx.save(),this.path([new Ge(r.bounds.left+d*.39363,r.bounds.top+d*.79),new Ge(r.bounds.left+d*.16,r.bounds.top+d*.5549),new Ge(r.bounds.left+d*.27347,r.bounds.top+d*.44071),new Ge(r.bounds.left+d*.39694,r.bounds.top+d*.5649),new Ge(r.bounds.left+d*.72983,r.bounds.top+d*.23),new Ge(r.bounds.left+d*.84,r.bounds.top+d*.34085),new Ge(r.bounds.left+d*.39363,r.bounds.top+d*.79)]),this.ctx.fillStyle=JA(Qw),this.ctx.fill(),this.ctx.restore()):r.type===xu&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+d/2,r.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=JA(Qw),this.ctx.fill(),this.ctx.restore())),aH(r)&&r.value.length){switch(g=this.createFontStyle(a),Q=g[0],h=g[1],w=this.fontMetrics.getMetrics(Q,h).baseline,this.ctx.font=Q,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=oH(r.styles.textAlign),M=Pu(r),B=0,r.styles.textAlign){case 1:B+=M.width/2;break;case 2:B+=M.width;break}C=M.add(B,0,0,-M.height/2+1),this.ctx.save(),this.path([new Ge(M.left,M.top),new Ge(M.left+M.width,M.top),new Ge(M.left+M.width,M.top+M.height),new Ge(M.left,M.top+M.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new fl(r.value,C),a.letterSpacing,w),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!WA(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(v=r.styles.listStyleImage,v.type!==0)return[3,18];y=void 0,F=v.url,L.label=15;case 15:return L.trys.push([15,17,,18]),[4,this.context.cache.match(F)];case 16:return y=L.sent(),this.ctx.drawImage(y,r.bounds.left-(y.width+10),r.bounds.top),[3,18];case 17:return L.sent(),this.context.logger.error("Error loading list-style-image "+F),[3,18];case 18:return[3,20];case 19:A.listValue&&r.styles.listStyleType!==-1&&(Q=this.createFontStyle(a)[0],this.ctx.font=Q,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",M=new zn(r.bounds.left,r.bounds.top+tA(r.styles.paddingTop,r.bounds.width),r.bounds.width,iw(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new fl(A.listValue,M),a.letterSpacing,iw(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),L.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return Br(this,void 0,void 0,function(){var r,n,v,a,i,v,o,s,v,l,u,v,d,g,v,h,w,v,B,C,v;return ir(this,function(y){switch(y.label){case 0:if(WA(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:y.sent(),r=0,n=A.negativeZIndex,y.label=2;case 2:return r<n.length?(v=n[r],[4,this.renderStack(v)]):[3,5];case 3:y.sent(),y.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:y.sent(),a=0,i=A.nonInlineLevel,y.label=7;case 7:return a<i.length?(v=i[a],[4,this.renderNode(v)]):[3,10];case 8:y.sent(),y.label=9;case 9:return a++,[3,7];case 10:o=0,s=A.nonPositionedFloats,y.label=11;case 11:return o<s.length?(v=s[o],[4,this.renderStack(v)]):[3,14];case 12:y.sent(),y.label=13;case 13:return o++,[3,11];case 14:l=0,u=A.nonPositionedInlineLevel,y.label=15;case 15:return l<u.length?(v=u[l],[4,this.renderStack(v)]):[3,18];case 16:y.sent(),y.label=17;case 17:return l++,[3,15];case 18:d=0,g=A.inlineLevel,y.label=19;case 19:return d<g.length?(v=g[d],[4,this.renderNode(v)]):[3,22];case 20:y.sent(),y.label=21;case 21:return d++,[3,19];case 22:h=0,w=A.zeroOrAutoZIndexOrTransformedOrOpacity,y.label=23;case 23:return h<w.length?(v=w[h],[4,this.renderStack(v)]):[3,26];case 24:y.sent(),y.label=25;case 25:return h++,[3,23];case 26:B=0,C=A.positiveZIndex,y.label=27;case 27:return B<C.length?(v=C[B],[4,this.renderStack(v)]):[3,30];case 28:y.sent(),y.label=29;case 29:return B++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var r=this;A.forEach(function(n,a){var i=$r(n)?n.start:n;a===0?r.ctx.moveTo(i.x,i.y):r.ctx.lineTo(i.x,i.y),$r(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(A,r,n,a){this.path(A),this.ctx.fillStyle=r,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},e.prototype.resizeImage=function(A,r,n){var a;if(A.width===r&&A.height===n)return A;var i=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,o=i.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,n);var s=o.getContext("2d");return s.drawImage(A,0,0,A.width,A.height,0,0,r,n),o},e.prototype.renderBackgroundImage=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s;return ir(this,function(l){switch(l.label){case 0:r=A.styles.backgroundImage.length-1,n=function(u){var d,g,h,T,G,Y,x,O,k,w,T,G,Y,x,O,B,C,v,y,F,Q,M,L,V,k,W,T,N,E,x,O,j,G,Y,K,q,ee,ie,S,H,z,Z;return ir(this,function(re){switch(re.label){case 0:if(u.type!==0)return[3,5];d=void 0,g=u.url,re.label=1;case 1:return re.trys.push([1,3,,4]),[4,a.context.cache.match(g)];case 2:return d=re.sent(),[3,4];case 3:return re.sent(),a.context.logger.error("Error loading background-image "+g),[3,4];case 4:return d&&(h=hp(A,r,[d.width,d.height,d.width/d.height]),T=h[0],G=h[1],Y=h[2],x=h[3],O=h[4],k=a.ctx.createPattern(a.resizeImage(d,x,O),"repeat"),a.renderRepeat(T,k,G,Y)),[3,6];case 5:ZO(u)?(w=hp(A,r,[null,null,null]),T=w[0],G=w[1],Y=w[2],x=w[3],O=w[4],B=HO(u.angle,x,O),C=B[0],v=B[1],y=B[2],F=B[3],Q=B[4],M=document.createElement("canvas"),M.width=x,M.height=O,L=M.getContext("2d"),V=L.createLinearGradient(v,F,y,Q),zB(u.stops,C).forEach(function(ne){return V.addColorStop(ne.stop,JA(ne.color))}),L.fillStyle=V,L.fillRect(0,0,x,O),x>0&&O>0&&(k=a.ctx.createPattern(M,"repeat"),a.renderRepeat(T,k,G,Y))):jO(u)&&(W=hp(A,r,[null,null,null]),T=W[0],N=W[1],E=W[2],x=W[3],O=W[4],j=u.position.length===0?[H0]:u.position,G=tA(j[0],x),Y=tA(j[j.length-1],O),K=DO(u,G,Y,x,O),q=K[0],ee=K[1],q>0&&ee>0&&(ie=a.ctx.createRadialGradient(N+G,E+Y,0,N+G,E+Y,q),zB(u.stops,q*2).forEach(function(ne){return ie.addColorStop(ne.stop,JA(ne.color))}),a.path(T),a.ctx.fillStyle=ie,q!==ee?(S=A.bounds.left+.5*A.bounds.width,H=A.bounds.top+.5*A.bounds.height,z=ee/q,Z=1/z,a.ctx.save(),a.ctx.translate(S,H),a.ctx.transform(1,0,0,z,0,0),a.ctx.translate(-S,-H),a.ctx.fillRect(N,Z*(E-H)+H,x,O*Z),a.ctx.restore()):a.ctx.fill())),re.label=6;case 6:return r--,[2]}})},a=this,i=0,o=A.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(s=o[i],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,r,n){return Br(this,void 0,void 0,function(){return ir(this,function(a){return this.path(ny(n,r)),this.ctx.fillStyle=JA(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,r,n,a){return Br(this,void 0,void 0,function(){var i,o;return ir(this,function(s){switch(s.label){case 0:return r<3?[4,this.renderSolidBorder(A,n,a)]:[3,2];case 1:return s.sent(),[2];case 2:return i=G8(a,n),this.path(i),this.ctx.fillStyle=JA(A),this.ctx.fill(),o=z8(a,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s,l,u,d=this;return ir(this,function(g){switch(g.label){case 0:return this.applyEffects(A.getEffects(2)),r=A.container.styles,n=!Sa(r.backgroundColor)||r.backgroundImage.length,a=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],i=iH(Io(r.backgroundClip,0),A.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),Sa(r.backgroundColor)||(this.ctx.fillStyle=JA(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){d.ctx.save();var w=Ou(A.curves),B=h.inset?0:rH,C=J8(w,-B+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(d.path(w),d.ctx.clip(),d.mask(C)):(d.mask(w),d.ctx.clip(),d.path(C)),d.ctx.shadowOffsetX=h.offsetX.number+B,d.ctx.shadowOffsetY=h.offsetY.number,d.ctx.shadowColor=JA(h.color),d.ctx.shadowBlur=h.blur.number,d.ctx.fillStyle=h.inset?JA(h.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),g.label=2;case 2:o=0,s=0,l=a,g.label=3;case 3:return s<l.length?(u=l[s],u.style!==0&&!Sa(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,3)];case 6:return g.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,A.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,A.curves)];case 10:g.sent(),g.label=11;case 11:o++,g.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,r,n,a,i){return Br(this,void 0,void 0,function(){var o,s,l,u,d,g,h,w,B,C,v,y,F,Q,M,L,M,L;return ir(this,function(V){return this.ctx.save(),o=Y8(a,n),s=ny(a,n),i===2&&(this.path(s),this.ctx.clip()),$r(s[0])?(l=s[0].start.x,u=s[0].start.y):(l=s[0].x,u=s[0].y),$r(s[1])?(d=s[1].end.x,g=s[1].end.y):(d=s[1].x,g=s[1].y),n===0||n===2?h=Math.abs(l-d):h=Math.abs(u-g),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(s.slice(0,2)),w=r<3?r*3:r*2,B=r<3?r*2:r,i===3&&(w=r,B=r),C=!0,h<=w*2?C=!1:h<=w*2+B?(v=h/(2*w+B),w*=v,B*=v):(y=Math.floor((h+B)/(w+B)),F=(h-y*w)/(y-1),Q=(h-(y+1)*w)/y,B=Q<=0||Math.abs(B-F)<Math.abs(B-Q)?F:Q),C&&(i===3?this.ctx.setLineDash([0,w+B]):this.ctx.setLineDash([w,B])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=JA(A),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&($r(s[0])&&(M=s[3],L=s[0],this.ctx.beginPath(),this.formatPath([new Ge(M.end.x,M.end.y),new Ge(L.start.x,L.start.y)]),this.ctx.stroke()),$r(s[1])&&(M=s[1],L=s[2],this.ctx.beginPath(),this.formatPath([new Ge(M.end.x,M.end.y),new Ge(L.start.x,L.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return Br(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=K8(A),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(oy),aH=function(t){return t instanceof xw||t instanceof Tw?!0:t instanceof Ap&&t.type!==xu&&t.type!==Tu},iH=function(t,e){switch(t){case 0:return Ou(e);case 2:return P8(e);case 1:default:return ku(e)}},oH=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},sH=["-apple-system","system-ui"],lH=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return sH.indexOf(e)===-1}):t},cH=function(t){hn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(A){return Br(this,void 0,void 0,function(){var r,n;return ir(this,function(a){switch(a.label){case 0:return r=$0(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,uH(r)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(oy),uH=function(t){return new Promise(function(e,A){var r=new Image;r.onload=function(){e(r)},r.onerror=A,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},fH=function(){function t(e){var A=e.id,r=e.enabled;this.id=A,this.enabled=r,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Yc([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t}(),hH=function(){function t(e,A){var r;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new fH({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new I8(this,e)}return t.instanceCount=1,t}(),sy=function(t,e){return e===void 0&&(e={}),dH(t,e)};typeof window<"u"&&qw.setContext(window);var dH=function(t,e){return Br(void 0,void 0,void 0,function(){var A,r,n,a,i,o,s,l,u,d,g,h,w,B,C,v,y,F,Q,M,V,L,V,k,W,T,N,E,x,O,j,G,Y,K,q,ee,ie,S,H,z;return ir(this,function(Z){switch(Z.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(r=A.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(k=e.allowTaint)!==null&&k!==void 0?k:!1,imageTimeout:(W=e.imageTimeout)!==null&&W!==void 0?W:15e3,proxy:e.proxy,useCORS:(T=e.useCORS)!==null&&T!==void 0?T:!1},a=v0({logging:(N=e.logging)!==null&&N!==void 0?N:!0,cache:e.cache},n),i={windowWidth:(E=e.windowWidth)!==null&&E!==void 0?E:r.innerWidth,windowHeight:(x=e.windowHeight)!==null&&x!==void 0?x:r.innerHeight,scrollX:(O=e.scrollX)!==null&&O!==void 0?O:r.pageXOffset,scrollY:(j=e.scrollY)!==null&&j!==void 0?j:r.pageYOffset},o=new zn(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),s=new hH(a,o),l=(G=e.foreignObjectRendering)!==null&&G!==void 0?G:!1,u={allowTaint:(Y=e.allowTaint)!==null&&Y!==void 0?Y:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new Yw(s,t,u),g=d.clonedReferenceElement,g?[4,d.toIFrame(A,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=Z.sent(),w=np(g)||g8(g)?JM(g.ownerDocument):Xc(s,g),B=w.width,C=w.height,v=w.left,y=w.top,F=pH(s,g,e.backgroundColor),Q={canvas:e.canvas,backgroundColor:F,scale:(q=(K=e.scale)!==null&&K!==void 0?K:r.devicePixelRatio)!==null&&q!==void 0?q:1,x:((ee=e.x)!==null&&ee!==void 0?ee:0)+v,y:((ie=e.y)!==null&&ie!==void 0?ie:0)+y,width:(S=e.width)!==null&&S!==void 0?S:Math.ceil(B),height:(H=e.height)!==null&&H!==void 0?H:Math.ceil(C)},l?(s.logger.debug("Document cloned, using foreign object rendering"),V=new cH(s,Q),[4,V.render(g)]):[3,3];case 2:return M=Z.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+v+","+y+" with size "+B+"x"+C+" using computed rendering"),s.logger.debug("Starting DOM parsing"),L=Vw(s,g),F===L.styles.backgroundColor&&(L.styles.backgroundColor=Xn.TRANSPARENT),s.logger.debug("Starting renderer for element at "+Q.x+","+Q.y+" with size "+Q.width+"x"+Q.height),V=new nH(s,Q),[4,V.render(L)];case 4:M=Z.sent(),Z.label=5;case 5:return(!((z=e.removeContainer)!==null&&z!==void 0)||z)&&(Yw.destroy(h)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,M]}})})},pH=function(t,e,A){var r=e.ownerDocument,n=r.documentElement?ll(t,getComputedStyle(r.documentElement).backgroundColor):Xn.TRANSPARENT,a=r.body?ll(t,getComputedStyle(r.body).backgroundColor):Xn.TRANSPARENT,i=typeof A=="string"?ll(t,A):A===null?Xn.TRANSPARENT:4294967295;return e===r.documentElement?Sa(n)?Sa(a)?i:a:n:i};const ly=Object.freeze(Object.defineProperty({__proto__:null,default:sy},Symbol.toStringTag,{value:"Module"})),o$="",gH={class:"label-designer"},mH={class:"toolbar"},vH={class:"center-container"},BH={key:0,class:"loader-container"},wH={class:"zoom-controls"},yH=["disabled"],bH=["disabled"],CH={class:"ruler-horizontal"},EH={class:"ruler-vertical"},UH={key:0,class:"drag-extend-lines"},FH={key:1,class:"alignment-guides"},NH=["data-item-id","onMousedown"],SH=["onMousedown"],QH=["onMousedown"],TH=["onMousedown"],xH=["onMousedown"],RH=["onMousedown"],IH=["onMousedown"],VH=["onMousedown"],MH=["onMousedown"],LH=["onMousedown"],OH={class:"property-panel",tabindex:"0"},kH={class:"property-panel-header"},HH={class:"property-panel-operate"},DH={class:"property-panel-title"},PH=["innerHTML"],WH={class:"position-controls"},_H={class:"control-group"},ZH={class:"number-input"},jH=["value"],JH={class:"control-group"},KH={class:"number-input"},GH=["value"],zH={key:0,class:"control-group"},YH={class:"number-input"},XH=["value"],qH={key:1,class:"control-group"},$H={class:"number-input"},eD=["value"],tD={key:2,class:"control-group"},AD={class:"number-input"},rD={class:"rotation-display"},nD={key:3,class:"control-group"},aD={class:"switch-input"},_u=.05,iD=jA({__name:"panels",props:{templateInfo:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},options:{type:Object,default:()=>({})},showGraphConfig:{type:Boolean,default:!1},templateType:{type:String,default:"lodop"},config:{type:Object,default:()=>({})}},setup(t,{expose:e}){const A=t,r=f.ref({}),n=f.ref(0),a=f.ref(!0),i=f.ref([]),o=f.ref(1);let s=1;const l=f.computed(()=>{var ae;return((ae=r.value)==null?void 0:ae.printWidth)||0}),u=f.computed(()=>{var ae;return((ae=r.value)==null?void 0:ae.printHeight)||0});f.ref(!1);const d=f.ref(!1),g=f.ref(!1),h=new hi(dA.CACHE.STYLE_CACHE_SIZE),w=new hi(dA.CACHE.BOUNDING_BOX_CACHE_SIZE),B=new Map($v.map(ae=>[ae.type,ae])),{selectedItems:C,selectItem:v,getCurrentSelected:y,clearSelection:F}=LM(),{dragging:Q,dragItem:M,startDrag:L}=VM({scale:o,canvasWidth:l,canvasHeight:u,selectItem:v,onStartDrag:()=>{d.value=!0,f.nextTick(()=>{x()})},onStopDrag:()=>{d.value=!1,f.nextTick(()=>{g.value=!1}),O()},onDragUpdate:()=>{x()}}),{startResize:V,resizing:k,resizeDirection:W,resizeItem:T}=MM(l,u,o,C,()=>{const ae=y();K(ae)}),{alignmentGuides:N,showGuides:E,updateAlignmentGuides:x,clearAlignmentGuides:O}=ZM({items:i,dragItem:M,resizeItem:T,dragging:Q,resizing:k,resizeDirection:W,canvasWidth:l,canvasHeight:u}),{handleMouseWheel:j,adjustRotation:G,adjustComponentToFitCanvas:Y,updateAspectRatio:K}=WM(C,l,u);f.watch(()=>C.value,()=>{h.clear()},{deep:!0}),f.watch(()=>k.value,ae=>{ae?x():O()}),f.watch(()=>{var ae;return(ae=T.value)==null?void 0:ae.props},()=>{k.value&&x()},{deep:!0}),f.watch(()=>M.value,()=>{(Q.value||k.value)&&x()}),f.watch(()=>T.value,()=>{(Q.value||k.value)&&x()}),f.watch(()=>i.value,()=>{(Q.value||k.value)&&x()},{deep:!0});const q=(ae,Ae)=>{var Be;(!Ae||Number(Ae)<=0&&(ae==="width"||ae==="height"))&&ot((Be=y())==null?void 0:Be.id)},ee=ae=>{const Ae=`${ae.id}_${Ce(ae.props.x,1)}_${Ce(ae.props.y,1)}_${ae.props.width}_${ae.props.height}_${ae.props.rotation}`;if(w.has(Ae))return w.get(Ae);const Be=pi(ae.props.x,ae.props.y,ae.props.width,ae.props.height,ae.props.rotation||0);return w.set(Ae,Be),Be},ie=ae=>{const Ae=ee(ae),Be=Gs(Ae);return{minX:Ce(Be.minX,3),maxX:Ce(Be.maxX,3),minY:Ce(Be.minY,3),maxY:Ce(Be.maxY,3),width:Ce(Be.maxX-Be.minX,3),height:Ce(Be.maxY-Be.minY,3),centerX:Ce((Be.minX+Be.maxX)/2,3),centerY:Ce((Be.minY+Be.maxY)/2,3)}},S=(ae,Ae)=>{const Be=ie(ae),it=(lt=>lt.type==="rectangle"?parseFloat(lt.props.LineWidth||"0.5")/3.78:0)(ae),ze=(lt,xe,vt)=>(vt==="rectangle"&&it>0,lt);switch(Ae){case"left":return{left:Ce(ze(Be.minX,Ae,ae.type),3)+"mm"};case"right":return{left:Ce(ze(Be.maxX,Ae,ae.type),3)+"mm"};case"top":return{top:Ce(ze(Be.minY,Ae,ae.type),3)+"mm"};case"bottom":return{top:Ce(ze(Be.maxY,Ae,ae.type),3)+"mm"};default:return{}}},H=()=>{f.nextTick(()=>{const ae=document.querySelector(".canvas-container");if(!ae||!l.value||!u.value)return;const Ae=ae.getBoundingClientRect(),Be=Ba(l.value),At=Ba(u.value),it=16,ze=21,lt=21,xe=20,vt=24,je=24,we=Ae.width-it*2-ze-je,Bt=Ae.height-it-lt-xe-vt;let Ye=we/Be,Ft=Bt/At,Pt=Math.min(Ye,Ft);Pt=Pt*.95;const Wt=Math.min(4,Pt);s=Math.max(.8,Math.min(Wt,Pt)),s=Math.min(3,s),o.value=z(s,1),setTimeout(()=>{n.value=1,a.value=!1},500)})};function z(ae,Ae){ae=ae.toString();let Be=ae.indexOf(".");return Be!==-1?ae=ae.substring(0,Ae+Be+1):ae=ae.substring(0),Number(parseFloat(ae).toFixed(Ae))}const Z=ae=>B.get(ae)||null,re=ae=>{const Ae=C.value.indexOf(ae),Be=Ae===C.value.length-1,At=Ae!==-1,it=`${ae.id}_${Math.round(ae.props.x*10)}_${Math.round(ae.props.y*10)}_${ae.props.width}_${ae.props.height}_${ae.props.rotation}_${At}_${Be}`;if(h.has(it))return h.get(it);const ze={width:ae.props.width+"mm",height:ae.props.height+"mm","--item-width":ae.props.width+"mm","--item-height":ae.props.height+"mm",transform:`translate3d(${ae.props.x}mm, ${ae.props.y}mm, 0) rotate(${ae.props.rotation}deg)`,textRendering:"geometricPrecision",WebkitTextRendering:"geometricPrecision",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform",transformOrigin:"center center",WebkitTransformOrigin:"center center"};if(At)Be?ze.zIndex=1e3:ze.zIndex=999;else{const lt=i.value.findIndex(xe=>xe.id===ae.id);ze.zIndex=100+lt}return h.set(it,ze),ze},ne=ae=>{const Ae=C.value.some(At=>At.id===ae.id),Be=y()===ae;return{"component-selected":Ae,"component-current":Ae&&Be}},ue=(ae,Ae)=>{const At=((ae.props.rotation||0)%360+360)%360;if(ae.type==="line"&&(Ae==="left"||Ae==="right")){let xe;const je=((Ae==="left"?270:90)+At)%360;return je>=337.5||je<22.5?xe="n-resize":je>=22.5&&je<67.5?xe="ne-resize":je>=67.5&&je<112.5?xe="e-resize":je>=112.5&&je<157.5?xe="se-resize":je>=157.5&&je<202.5?xe="s-resize":je>=202.5&&je<247.5?xe="sw-resize":je>=247.5&&je<292.5?xe="w-resize":je>=292.5&&je<337.5&&(xe="nw-resize"),{cursor:xe,top:"50%",transform:"translateY(-50%)"}}if(ae.type==="verline"&&(Ae==="top"||Ae==="bottom")){let xe;const je=((Ae==="top"?0:180)+At)%360;return je>=337.5||je<22.5?xe="n-resize":je>=22.5&&je<67.5?xe="ne-resize":je>=67.5&&je<112.5?xe="e-resize":je>=112.5&&je<157.5?xe="se-resize":je>=157.5&&je<202.5?xe="s-resize":je>=202.5&&je<247.5?xe="sw-resize":je>=247.5&&je<292.5?xe="w-resize":je>=292.5&&je<337.5&&(xe="nw-resize"),{cursor:xe,left:"50%",transform:"translateX(-50%)"}}const ze=({top:0,"top-right":45,right:90,"bottom-right":135,bottom:180,"bottom-left":225,left:270,"top-left":315}[Ae]+At)%360;let lt="pointer";return ze>=337.5||ze<22.5?lt="n-resize":ze>=22.5&&ze<67.5?lt="ne-resize":ze>=67.5&&ze<112.5?lt="e-resize":ze>=112.5&&ze<157.5?lt="se-resize":ze>=157.5&&ze<202.5?lt="s-resize":ze>=202.5&&ze<247.5?lt="sw-resize":ze>=247.5&&ze<292.5?lt="w-resize":ze>=292.5&&ze<337.5&&(lt="nw-resize"),{cursor:lt,display:"block",visibility:"visible",opacity:"1"}},ge=()=>{o.value<4&&(o.value+=.1)},Ue=()=>{o.value>.8&&(o.value-=.1)},Ee=()=>{const ae=y();if(!ae)return 0;const{x1:Ae}=yo(ae);return Math.max(0,Number(Ae.toFixed(2)))},Oe=()=>{const ae=y();if(!ae)return 0;const{y1:Ae}=yo(ae);return Math.max(0,Number(Ae.toFixed(2)))},Te=()=>{const ae=y();return ae?Number((ae.props.width||0).toFixed(2)):0},Pe=()=>{const ae=y();return ae?Number((ae.props.height||0).toFixed(2)):0},pe=(ae,Ae,Be)=>{let At=0;ae==="x"?At=Ee():ae==="y"?At=Oe():ae==="width"?At=Te():ae==="height"&&(At=Pe());const it=Number(Ae)-Number(At);if(Math.abs(it)<.01){y().props[ae]="",y().props[ae]=Number(At);return}j(null,ae,it)};function $(ae){const Ae=document.activeElement.tagName.toLowerCase();if(Ae==="input"||Ae==="textarea"||!y())return;let At=!1,it=0,ze=0;ae.key==="ArrowLeft"?(it=-_u,At=!0):ae.key==="ArrowRight"?(it=_u,At=!0):ae.key==="ArrowUp"?(ze=-_u,At=!0):ae.key==="ArrowDown"&&(ze=_u,At=!0),At&&(it!==0&&j(null,"x",it),ze!==0&&j(null,"y",ze),ae.preventDefault())}const ut=({e:ae,comp:Ae,previewDiv:Be})=>{var At,it;(At=ae==null?void 0:ae.dataTransfer)==null||At.setData("comp",JSON.stringify(Ae)),document.body.appendChild(Be),(it=ae==null?void 0:ae.dataTransfer)==null||it.setDragImage(Be,0,0),setTimeout(()=>document.body.removeChild(Be),0)},Ke=async ae=>{var $t,sA,dr;ae.preventDefault();const Ae=JSON.parse(((sA=($t=ae==null?void 0:ae.dataTransfer)==null?void 0:$t.getData)==null?void 0:sA.call($t,"comp"))||"{}")||{},Be=(Ae==null?void 0:Ae.type)||"";if(!Be)return;const At=document.querySelector("#design").getBoundingClientRect(),it=(ae.clientX-At.left)/o.value,ze=(ae.clientY-At.top)/o.value,lt=De.value[Be]||{};let xe=fo(it),vt=fo(ze);const je=lt.width,we=lt.height;if(!lt.rotation||lt.rotation===0){const Yt=l.value-je,bA=u.value-we;xe=Math.max(0,Math.min(xe,Yt)),vt=Math.max(0,Math.min(vt,bA))}else xe=Math.max(0,xe),vt=Math.max(0,vt);const{propertyPanel:Bt,...Ye}=lt;let Ft={...Ye,x:Ce(xe),y:Ce(vt),width:Ce(je),height:Ce(we)};if((dr=De.value[Be])!=null&&dr.propertyPanel){const Yt=di(De.value[Be].propertyPanel)||{};if(Ft={...Ft,...Yt},Be==="line"&&Yt.LineWidth){const CA=parseFloat(Yt.LineWidth)*.3528;Ft.height=Ce(CA,3)}}const Ht=((Yt,bA)=>{const{width:CA,height:Zr,lockAspectRatio:nt}=Yt;let se=CA,Ve=Zr;const _e=l.value-2,Rt=u.value-2;let EA=!1;if(CA>_e&&(se=_e,EA=!0),Zr>Rt&&(Ve=Rt,EA=!0),nt&&EA){const lA=_e/CA,hA=Rt/Zr,Rr=Math.min(lA,hA);se=Ce(CA*Rr,2),Ve=Ce(Zr*Rr,2),se=Math.min(se,_e),Ve=Math.min(Ve,Rt)}return{width:se,height:Ve}})(Ft);if(Ft.width=Ht.width,Ft.height=Ht.height,Ht.width!==je||Ht.height!==we){const Yt=l.value-Ht.width,bA=u.value-Ht.height;xe=Math.max(0,Math.min(xe,Yt)),vt=Math.max(0,Math.min(vt,bA)),Ft.x=Ce(xe),Ft.y=Ce(vt)}const Wt={id:gA(),type:Be,props:Ft};if(Ft.rotation&&Ft.rotation!==0){const{x1:Yt,y1:bA}=yo(Wt),CA=checkAndAdjustBoundaries(Yt,bA,Ft.width,Ft.height,Ft.rotation,l.value,u.value);(CA.x1!==Yt||CA.y1!==bA)&&g0(Wt,CA.x1,CA.y1)}i.value.push(Wt),v(Wt)};function Se(ae){ae.target.id!=="design"&&(ae.target.closest("#design")||F())}function Re(ae){let Ae=null;try{Ae=He(ae.clientX,ae.clientY)}catch(ze){console.error("坐标检测出错:",ze)}if(Ae){v(Ae);return}let Be=ae.target,At=null;for(;Be&&Be!==document.querySelector("#design");){if(Be.classList&&(Be.classList.contains("canvas-item")||Be.classList.contains("resize-handle")||Be.classList.contains("delete-btn")||Be.classList.contains("rotate-handle")||Be.classList.contains("property-panel")||Be.tagName==="INPUT"||Be.tagName==="TEXTAREA"||Be.tagName==="BUTTON")){if(Be.classList.contains("resize-handle")||Be.classList.contains("delete-btn")||Be.classList.contains("rotate-handle"))return;if(Be.classList.contains("canvas-item")){const ze=Be.getAttribute("data-item-id");if(At=i.value.find(lt=>lt.id===ze),At){v(At);return}}if(Be.closest(".canvas-item")){const lt=Be.closest(".canvas-item").getAttribute("data-item-id"),xe=i.value.find(vt=>vt.id===lt);if(xe){v(xe);return}}if(Be.closest(".canvas-item")||Be.classList.contains("td-text-content")||Be.classList.contains("barcode-component")||Be.classList.contains("qr-code-component")||Be.classList.contains("image-component")||Be.classList.contains("rectangle-component")||Be.classList.contains("hor-line-component")){const ze=He(ae.clientX,ae.clientY);if(ze){v(ze);return}}break}Be=Be.parentElement}const it=document.querySelector("#design");if(it&&it.contains(ae.target)){const ze=it.getBoundingClientRect(),lt=o.value,xe=(ae.clientX-ze.left)/lt,vt=(ae.clientY-ze.top)/lt,je=fo(xe),we=fo(vt);for(let Bt=i.value.length-1;Bt>=0;Bt--){const Ye=i.value[Bt],Ft=parseFloat(Ye.props.x||0),Pt=parseFloat(Ye.props.y||0),Ht=parseFloat(Ye.props.width||0),Wt=parseFloat(Ye.props.height||0),$t=1;if(je>=Ft-$t&&je<=Ft+Ht+$t&&we>=Pt-$t&&we<=Pt+Wt+$t){v(Ye);return}}}F()}function He(ae,Ae){const Be=document.querySelector("#design");if(!Be)return null;const At=Be.getBoundingClientRect(),it=o.value,ze=(ae-At.left)/it,lt=(Ae-At.top)/it,xe=fo(ze),vt=fo(lt);for(let je=i.value.length-1;je>=0;je--){const we=i.value[je];if(ke(xe,vt,we)){if(we.type==="rectangle")for(let Ye=je-1;Ye>=0;Ye--){const Ft=i.value[Ye];if(ke(xe,vt,Ft))return Ft}return we}}for(let je=0;je<i.value.length;je++){const we=i.value[je];if(ke(xe,vt,we))return we}return null}function ke(ae,Ae,Be){const At=parseFloat(Be.props.x||0),it=parseFloat(Be.props.y||0),ze=parseFloat(Be.props.width||0),lt=parseFloat(Be.props.height||0),xe=parseFloat(Be.props.rotation||0),vt=AB(ae,Ae,At,it,ze,lt,xe);return vt||AB(ae,Ae,At-1,it-1,ze+2,lt+2,xe)}function We(ae){return ae.preventDefault(),!1}const qe=(ae,Ae)=>{if(ae.stopPropagation(),ae.target.classList.contains("resize-handle")||ae.target.classList.contains("rotate-handle")||ae.target.classList.contains("delete-btn"))return;const At=He(ae.clientX,ae.clientY)||Ae;v(At),f.nextTick(()=>{L(ae,At)})},ot=ae=>{if(h.clear(),w.clear(),i.value.find(Be=>Be.id===ae)&&(i.value=i.value.filter(Be=>Be.id!==ae)),C.value.some(Be=>Be.id===ae)){const Be=C.value.filter(At=>At.id!==ae);C.value=Be}f.nextTick(()=>{})},rt=ae=>{var Be;const Ae=document.activeElement.tagName.toLowerCase();Ae==="input"||Ae==="textarea"||(ae.key==="Delete"||ae.key==="Backspace")&&C.value.length>0&&ot((Be=y())==null?void 0:Be.id)},ft=ae=>{if(C.value.length>0){const Ae=C.value[C.value.length-1];Ae.props.rotation=ae,Y(Ae,ae)}},dt=()=>{setTimeout(()=>{const ae=document.querySelector(".center-container");if(!ae)return;const Ae=ae.getBoundingClientRect();ae.style.height=`calc(100vh - ${Ae==null?void 0:Ae.top}px)`,H()},200)};f.watch(()=>A.templateInfo,(ae,Ae)=>{ae&&Ae&&ae.id!==Ae.id?(r.value=ae||{},i.value=(ae==null?void 0:ae.items)||[]):ae&&!Ae?(r.value=ae||{},i.value=(ae==null?void 0:ae.items)||[]):ae&&(r.value=ae||{})},{deep:!0,immediate:!0});const{handleCopy:tt,handlePaste:pt}=_M(i,C,l,u,Y),De=f.ref({}),Mt=f.ref(!1),Et=async ae=>{try{Mt.value=!1,De.value=await rM(ae),Mt.value=!0}catch{De.value={},Mt.value=!0}};f.watch(()=>A.templateType,async ae=>{try{await Et(ae),F(),h.clear(),w.clear()}catch{}},{immediate:!0}),f.onMounted(async()=>{Mt.value||await Et(A.templateType),window.addEventListener("resize",dt),window.addEventListener("keydown",rt),window.addEventListener("keydown",tt),window.addEventListener("keydown",pt),window.addEventListener("keydown",$);const ae=document.querySelector(".canvas-wrapper");ae&&ae.addEventListener("contextmenu",We),dt(),_A()}),f.onBeforeUnmount(()=>{window.removeEventListener("resize",dt),window.removeEventListener("keydown",rt),window.removeEventListener("keydown",tt),window.removeEventListener("keydown",pt),window.removeEventListener("keydown",$);const ae=document.querySelector(".canvas-wrapper");ae&&ae.removeEventListener("contextmenu",We),h.clear(),w.clear()});function gA(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ae=>{const Ae=Math.random()*16|0;return(ae==="x"?Ae:Ae&3|8).toString(16)})}const Ut=ae=>{var Be;if(!De.value||!De.value[ae])return{};const Ae=De.value[ae]||{};return ae==="image"&&((Be=A.config)!=null&&Be.image)?{...Ae,image:{...Ae.image,...A.config.image}}:Ae},Tt=ae=>Ut(ae).allowRotation!==!1,AA=()=>OM(i,r.value),St=ae=>{r.value.graphData=ae||{},_A()},_A=()=>{var Ae;const ae=jM(r.value.graphData)||"";ae&&((Ae=document.querySelector("#design"))==null||Ae.appendChild(ae))},Dt=async ae=>{var Be;const Ae=JSON.parse(JSON.stringify(ae));for(const At of Ae)if(At.type==="image"&&((Be=At.props)!=null&&Be.ImageSrc)){const it=At.props.ImageSrc;typeof it=="object"&&it.fileSrc&&it.fileSrc}return Ae},oA=()=>new Promise(async(ae,Ae)=>{try{F();const Be=JSON.parse(JSON.stringify(i.value)),At=await Dt(Be),it=[...i.value];i.value=At;const ze=()=>{var vt;const lt=((vt=document.querySelector("#design"))==null?void 0:vt.querySelectorAll("img"))||[],xe=Array.from(lt).map(je=>je.complete?Promise.resolve():new Promise(we=>{je.onload=je.onerror=we}));return Promise.all(xe)};f.nextTick(async()=>{var je;await new Promise(we=>setTimeout(we,100)),await ze(),(((je=document.querySelector("#design"))==null?void 0:je.querySelectorAll("img"))||[]).forEach((we,Bt)=>{});const xe=document.querySelector("#design");if(!xe){Ae(new Error("找不到要转换的DOM元素"));return}const vt=o.value;ze().then(()=>{sy(xe,{scale:Math.max(window.devicePixelRatio*2,3),useCORS:!0,allowTaint:!0,backgroundColor:null,logging:!1,imageTimeout:15e3,onclone:we=>{const Bt=we.querySelector(".canvas-wrapper");if(Bt){const Ht=Bt.style.transform.replace(/scale\([^)]*\)/g,"").replace(/\s+/g," ").trim();Bt.style.transform=Ht||"none",Bt.style.opacity="1"}const Ye=we.querySelector("#design");if(Ye){const Pt=window.getComputedStyle(xe);for(let Ht=0;Ht<Pt.length;Ht++){const Wt=Pt[Ht];Ye.style[Wt]=Pt.getPropertyValue(Wt)}}we.querySelectorAll("img").forEach(Pt=>{Pt.style.imageRendering="high-quality",Pt.style.webkitImageRendering="high-quality",Pt.style.mozImageRendering="high-quality",Pt.style.objectFit="contain",Pt.style.objectPosition="center"})}}).then(we=>{i.value=it;const Bt=we.toDataURL("image/png");ae({data:AA(),image:Bt})}).catch(we=>{i.value=it,Ae(we)})}).catch(we=>{Ae(we)})})}catch(Be){Ae(Be)}}),Jt=()=>new Promise((ae,Ae)=>{i.value.forEach(At=>{if(At.type==="image"&&!At.props.ImageSrc)return Vs.warning("图片控件请选择图片!"),Ae("图片控件请选择图片!")}),ae(!0)});return e({getJson:()=>Jt().then(()=>AA()),clear:()=>{i.value=[],F()},snapshot:()=>Jt().then(()=>oA())}),(ae,Ae)=>{var xe,vt,je;const Be=f.resolveComponent("el-button"),At=f.resolveComponent("el-icon-info-filled"),it=f.resolveComponent("el-icon"),ze=f.resolveComponent("el-tooltip"),lt=f.resolveComponent("el-switch");return f.openBlock(),f.createElementBlock("div",gH,[f.createElementVNode("div",mH,[f.createVNode(uM,{onDragStart:ut,config:t.config,propsConfig:De.value},null,8,["config","propsConfig"])]),f.createElementVNode("div",vH,[a.value?(f.openBlock(),f.createElementBlock("div",BH,[...Ae[33]||(Ae[33]=[f.createElementVNode("div",{class:"loader-circle"},null,-1),f.createElementVNode("p",null,"设计画板加载中...",-1)])])):f.createCommentVNode("",!0),f.createElementVNode("div",{class:"center-toolbar",style:f.normalizeStyle(`background: ${t.config.designBackground||"rgba(0, 0, 0, .05)"}`)},[t.showGraphConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(TM,{"graph-data":(xe=r.value)==null?void 0:xe.graphData,onSuccess:St},null,8,["graph-data"]),Ae[34]||(Ae[34]=f.createElementVNode("div",{style:{width:"30px"}},null,-1))],64)):f.createCommentVNode("",!0),f.createElementVNode("div",wH,[f.createElementVNode("button",{onClick:Ue,disabled:o.value<=.8},"-",8,yH),f.createElementVNode("span",null,f.toDisplayString(Math.round(o.value*100))+"%",1),f.createElementVNode("button",{onClick:ge,disabled:o.value>=4},"+",8,bH)])],4),f.createElementVNode("div",{class:"canvas-container",style:f.normalizeStyle(`--scale: ${Math.max(0,1/(o.value||1))};background: ${t.config.designBackground||"rgba(0, 0, 0, .05)"}`),onClick:Se},[f.createElementVNode("div",{class:"canvas-wrapper",style:f.normalizeStyle(`transform: scale(${o.value});opacity: ${n.value};`)},[l.value&&u.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",CH,[f.createVNode(eB,{direction:"horizontal",length:l.value},null,8,["length"])]),f.createElementVNode("div",EH,[f.createVNode(eB,{direction:"vertical",length:u.value},null,8,["length"])])],64)):f.createCommentVNode("",!0),f.createElementVNode("div",{id:"design",class:"canvas",style:f.normalizeStyle(`width: ${l.value}mm; height: ${u.value}mm;`),onDrop:Ke,onDragover:Ae[0]||(Ae[0]=f.withModifiers(()=>{},["prevent"])),onPointerdown:Re,onContextmenu:Ae[1]||(Ae[1]=f.withModifiers(()=>{},["prevent"]))},[f.unref(Q)&&f.unref(M)?(f.openBlock(),f.createElementBlock("div",UH,[f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(S(f.unref(M),"left"))},null,4),f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(S(f.unref(M),"right"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(S(f.unref(M),"top"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(S(f.unref(M),"bottom"))},null,4)])):f.createCommentVNode("",!0),f.unref(E)?(f.openBlock(),f.createElementBlock("div",FH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(N).horizontal,(we,Bt)=>(f.openBlock(),f.createElementBlock("div",{key:`h-${Bt}`,class:f.normalizeClass(["alignment-guide horizontal",`guide-${we.type}`]),style:f.normalizeStyle({top:`${we.y}mm`,left:"0",right:"0"})},null,6))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(N).vertical,(we,Bt)=>(f.openBlock(),f.createElementBlock("div",{key:`v-${Bt}`,class:f.normalizeClass(["alignment-guide vertical",`guide-${we.type}`]),style:f.normalizeStyle({left:`${we.x}mm`,top:"0",bottom:"0"})},null,6))),128))])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.value,we=>{var Bt;return f.openBlock(),f.createElementBlock("div",{key:we.id,class:f.normalizeClass(["canvas-item",ne(we)]),style:f.normalizeStyle(re(we)),"data-item-id":we.id,onMousedown:Ye=>qe(Ye,we)},[f.unref(y)()===we?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[we.props.lockAspectRatio?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:0,class:"resize-handle top",style:f.normalizeStyle(ue(we,"top")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top"),["stop"])},null,44,SH)):f.createCommentVNode("",!0),we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle right",style:f.normalizeStyle(ue(we,"right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"right"),["stop"])},null,44,QH)):f.createCommentVNode("",!0),we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle bottom",style:f.normalizeStyle(ue(we,"bottom")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom"),["stop"])},null,44,TH)):f.createCommentVNode("",!0),we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:f.normalizeClass(["resize-handle left",{"line-anchor":we.type==="line"}]),style:f.normalizeStyle(ue(we,"left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"left"),["stop"])},null,46,xH)):f.createCommentVNode("",!0),we.type==="line"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle right line-anchor",style:f.normalizeStyle(ue(we,"right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"right"),["stop"])},null,44,RH)):f.createCommentVNode("",!0)],64)),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle top-left",style:f.normalizeStyle(ue(we,"top-left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top-left"),["stop"])},null,44,IH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle top-right",style:f.normalizeStyle(ue(we,"top-right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top-right"),["stop"])},null,44,VH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:"resize-handle bottom-right",style:f.normalizeStyle(ue(we,"bottom-right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom-right"),["stop"])},null,44,MH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle bottom-left",style:f.normalizeStyle(ue(we,"bottom-left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom-left"),["stop"])},null,44,LH)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),we.props&&Mt.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((Bt=Z(we.type))==null?void 0:Bt.component)||null),{key:`${we.id}-${we.type}`,modelValue:{...we.props,__selected:f.unref(y)()===we,options:A.options},propsConfig:De.value,"onUpdate:modelValue":Ye=>{const{__selected:Ft,options:Pt,...Ht}=Ye;Object.keys(Ht).forEach(Wt=>{Ht[Wt]!==void 0&&(we.props[Wt]=Ht[Wt])})}},null,8,["modelValue","propsConfig","onUpdate:modelValue"])):f.createCommentVNode("",!0)],46,NH)}),128))],36)],4)],4)]),f.createElementVNode("div",OH,[f.unref(C).length>0?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",kH,[f.createElementVNode("div",HH,[f.createVNode(Be,{type:"danger",onClick:Ae[2]||(Ae[2]=we=>ot(f.unref(y)().id))},{default:f.withCtx(()=>[...Ae[35]||(Ae[35]=[f.createTextVNode("删除",-1)])]),_:1})]),f.createElementVNode("h3",DH,[Ae[36]||(Ae[36]=f.createTextVNode(" 属性设置 ",-1)),(vt=Ut(f.unref(y)().type))!=null&&vt.desc?(f.openBlock(),f.createBlock(ze,{key:0,placement:"bottom","show-arrow":!0,"raw-content":""},{content:f.withCtx(()=>[f.createElementVNode("p",{style:{"max-width":"400px",margin:"0","white-space":"pre-line"},innerHTML:Ut(f.unref(y)().type).desc},null,8,PH)]),default:f.withCtx(()=>[f.createVNode(it,{class:"help-icon"},{default:f.withCtx(()=>[f.createVNode(At)]),_:1})]),_:1})):f.createCommentVNode("",!0)])]),f.createElementVNode("div",WH,[f.createElementVNode("div",_H,[f.createElementVNode("label",null,f.toDisplayString(f.unref(y)().type==="line"?"起点X:":"X坐标:"),1),f.createElementVNode("div",ZH,[f.createElementVNode("button",{onClick:Ae[3]||(Ae[3]=f.withModifiers(we=>f.unref(j)(we,"x",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Ee(),onInput:Ae[4]||(Ae[4]=we=>pe("x",we.target.value)),onClick:Ae[5]||(Ae[5]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[6]||(Ae[6]=f.withModifiers(()=>{},["stop"])),onWheel:Ae[7]||(Ae[7]=f.withModifiers(()=>{},["prevent"]))},null,40,jH),f.createElementVNode("button",{onClick:Ae[8]||(Ae[8]=f.withModifiers(we=>f.unref(j)(we,"x",.5),["stop"]))},"+")])]),f.createElementVNode("div",JH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(y)().type==="line"?"起点Y:":"Y坐标:"),1),f.createElementVNode("div",KH,[f.createElementVNode("button",{onClick:Ae[9]||(Ae[9]=f.withModifiers(we=>f.unref(j)(we,"y",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Oe(),onInput:Ae[10]||(Ae[10]=we=>pe("y",we.target.value)),onClick:Ae[11]||(Ae[11]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[12]||(Ae[12]=f.withModifiers(()=>{},["stop"])),onWheel:Ae[13]||(Ae[13]=f.withModifiers(()=>{},["prevent"]))},null,40,GH),f.createElementVNode("button",{onClick:Ae[14]||(Ae[14]=f.withModifiers(we=>f.unref(j)(we,"y",.5),["stop"]))},"+")])]),f.unref(y)().type!=="verline"?(f.openBlock(),f.createElementBlock("div",zH,[Ae[37]||(Ae[37]=f.createElementVNode("label",null,"宽度:",-1)),f.createElementVNode("div",YH,[f.createElementVNode("button",{onClick:Ae[15]||(Ae[15]=f.withModifiers(we=>f.unref(j)(we,"width",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Te(),onInput:Ae[16]||(Ae[16]=we=>pe("width",we.target.value)),onClick:Ae[17]||(Ae[17]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[18]||(Ae[18]=f.withModifiers(()=>{},["stop"])),onBlur:Ae[19]||(Ae[19]=we=>q("width",we.target.value)),onWheel:Ae[20]||(Ae[20]=f.withModifiers(()=>{},["prevent"]))},null,40,XH),f.createElementVNode("button",{onClick:Ae[21]||(Ae[21]=f.withModifiers(we=>f.unref(j)(we,"width",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(y)().type!=="line"?(f.openBlock(),f.createElementBlock("div",qH,[Ae[38]||(Ae[38]=f.createElementVNode("label",null,"高度:",-1)),f.createElementVNode("div",$H,[f.createElementVNode("button",{onClick:Ae[22]||(Ae[22]=f.withModifiers(we=>f.unref(j)(we,"height",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Pe(),onInput:Ae[23]||(Ae[23]=we=>pe("height",we.target.value)),onClick:Ae[24]||(Ae[24]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[25]||(Ae[25]=f.withModifiers(()=>{},["stop"])),onBlur:Ae[26]||(Ae[26]=we=>q("height",we.target.value)),onWheel:Ae[27]||(Ae[27]=f.withModifiers(()=>{},["prevent"]))},null,40,eD),f.createElementVNode("button",{onClick:Ae[28]||(Ae[28]=f.withModifiers(we=>f.unref(j)(we,"height",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),Tt(f.unref(y)().type)?(f.openBlock(),f.createElementBlock("div",tD,[Ae[39]||(Ae[39]=f.createElementVNode("label",null,"旋转:",-1)),f.createElementVNode("div",AD,[f.createElementVNode("button",{onClick:Ae[29]||(Ae[29]=f.withModifiers(we=>f.unref(G)(-1),["stop"]))},"-"),f.createElementVNode("span",rD,f.toDisplayString(f.unref(y)().props.rotation)+"°",1),f.createElementVNode("button",{onClick:Ae[30]||(Ae[30]=f.withModifiers(we=>f.unref(G)(1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(y)().type!=="line"?(f.openBlock(),f.createElementBlock("div",nD,[Ae[40]||(Ae[40]=f.createElementVNode("label",null,"锁定宽高比:",-1)),f.createElementVNode("div",aD,[f.createVNode(lt,{modelValue:f.unref(y)().props.lockAspectRatio,"onUpdate:modelValue":Ae[31]||(Ae[31]=we=>f.unref(y)().props.lockAspectRatio=we),"active-value":!0,"inactive-value":!1},null,8,["modelValue"])])])):f.createCommentVNode("",!0)]),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((je=Z(f.unref(y)().type))==null?void 0:je.propertyPanel)||null),{modelValue:f.unref(y)().props,"onUpdate:modelValue":Ae[32]||(Ae[32]=we=>f.unref(y)().props=we),options:t.options,"props-config":Ut(f.unref(y)().type),onRotationChange:ft},null,40,["modelValue","options","props-config"]))],64)):f.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-c2456fd2"]]),l$="",Vo=jA({__name:"index",props:{templateData:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},config:{type:Object,default:()=>({})}},setup(t){const e=f.getCurrentInstance(),A=t,r=f.ref(!1),n=f.ref({}),a=f.ref(),i=f.ref(0),o=f.ref(!1),s=(C,v)=>{let y;return function(...Q){const M=()=>{clearTimeout(y),C(...Q)};clearTimeout(y),y=setTimeout(M,v)}},l=f.ref({rectTop:0,isInModal:!1}),u=()=>{if(!a.value)return;const C=a.value.getBoundingClientRect(),v=g(a.value);let y=0;if(C.top>0)y=C.top;else if(v){const F=h(a.value);y=F>0?F:60}else{const F=a.value.offsetTop;F>0?y=F:y=60}(y!==l.value.rectTop||v!==l.value.isInModal)&&(i.value=y,o.value=v,l.value={rectTop:y,isInModal:v})},d=s(u,100),g=C=>{let v=C.parentElement;for(;v;){if(v.classList&&(v.classList.contains("el-dialog")||v.classList.contains("el-drawer")||v.classList.contains("sc-dialog")))return!0;v=v.parentElement}return!1},h=C=>{let v=C.parentElement;for(;v;){if(v.classList&&(v.classList.contains("el-dialog")||v.classList.contains("el-drawer")||v.classList.contains("sc-dialog"))){const y=v.getBoundingClientRect();return y.top>0?y.top:60}v=v.parentElement}return 60};f.onMounted(()=>{setTimeout(()=>u(),100),setTimeout(()=>u(),300),window.addEventListener("resize",d),f.onBeforeUnmount(()=>{window.removeEventListener("resize",d)})}),f.watch(()=>r.value,C=>{C&&f.nextTick(()=>setTimeout(()=>u(),50))}),f.watch(()=>A.templateData,C=>w(C),{deep:!0,immediate:!0});function w(C){if(r.value=(C==null?void 0:C.width)>0&&(C==null?void 0:C.height)>0,!r.value)return;const v={...C};v.printWidth||Object.assign(v,{printWidth:v.width}),v.printHeight||Object.assign(v,{printHeight:v.height}),v!=null&&v.graphData||Object.assign(v,{graphData:{printList:[{x:0,y:0,width:C.printWidth,height:C.printHeight,topLeftRadius:4,topRightRadius:4,bottomLeftRadius:4,bottomRightRadius:4}],punchingList:[]}}),v!=null&&v.items||Object.assign(v,{items:[]}),n.value=v}function B(C){e.exposed=C||{},e.exposeProxy=C||{}}return(C,v)=>{const y=f.resolveDirective("loading");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{ref_key:"templateDesignerRef",ref:a,class:f.normalizeClass(["template-designer",{"template-designer-border-top":o.value}]),style:f.normalizeStyle({height:"calc(100vh - "+(i.value+1)+"px)"})},[r.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.h(iD,{...C.$attrs,...A,ref:B},C.$slots)),{key:0,"template-info":n.value},null,8,["template-info"])):f.createCommentVNode("",!0)],6)),[[y,!r.value]])}}},[["__scopeId","data-v-a3d9b11f"]]);function kt(t){"@babel/helpers - typeof";return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(t)}var sr=Uint8Array,Wr=Uint16Array,dp=Int32Array,Zu=new sr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ju=new sr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),pp=new sr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cy=function(t,e){for(var A=new Wr(31),r=0;r<31;++r)A[r]=e+=1<<t[r-1];for(var n=new dp(A[30]),r=1;r<30;++r)for(var a=A[r];a<A[r+1];++a)n[a]=a-A[r]<<5|r;return{b:A,r:n}},uy=cy(Zu,2),fy=uy.b,gp=uy.r;fy[28]=258,gp[258]=28;for(var hy=cy(ju,0),oD=hy.b,dy=hy.r,mp=new Wr(32768),iA=0;iA<32768;++iA){var Ra=(iA&43690)>>1|(iA&21845)<<1;Ra=(Ra&52428)>>2|(Ra&13107)<<2,Ra=(Ra&61680)>>4|(Ra&3855)<<4,mp[iA]=((Ra&65280)>>8|(Ra&255)<<8)>>1}for(var kn=function(t,e,A){for(var r=t.length,n=0,a=new Wr(e);n<r;++n)t[n]&&++a[t[n]-1];var i=new Wr(e);for(n=1;n<e;++n)i[n]=i[n-1]+a[n-1]<<1;var o;if(A){o=new Wr(1<<e);var s=15-e;for(n=0;n<r;++n)if(t[n])for(var l=n<<4|t[n],u=e-t[n],d=i[t[n]-1]++<<u,g=d|(1<<u)-1;d<=g;++d)o[mp[d]>>s]=l}else for(o=new Wr(r),n=0;n<r;++n)t[n]&&(o[n]=mp[i[t[n]-1]++]>>15-t[n]);return o},Ia=new sr(288),iA=0;iA<144;++iA)Ia[iA]=8;for(var iA=144;iA<256;++iA)Ia[iA]=9;for(var iA=256;iA<280;++iA)Ia[iA]=7;for(var iA=280;iA<288;++iA)Ia[iA]=8;for(var gl=new sr(32),iA=0;iA<32;++iA)gl[iA]=5;var sD=kn(Ia,9,0),lD=kn(Ia,9,1),cD=kn(gl,5,0),uD=kn(gl,5,1),vp=function(t){for(var e=t[0],A=1;A<t.length;++A)t[A]>e&&(e=t[A]);return e},pn=function(t,e,A){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&A},Bp=function(t,e){var A=e/8|0;return(t[A]|t[A+1]<<8|t[A+2]<<16)>>(e&7)},wp=function(t){return(t+7)/8|0},py=function(t,e,A){return(e==null||e<0)&&(e=0),(A==null||A>t.length)&&(A=t.length),new sr(t.subarray(e,A))},fD=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],gn=function(t,e,A){var r=new Error(e||fD[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,gn),!A)throw r;return r},hD=function(t,e,A,r){var n=t.length,a=r?r.length:0;if(!n||e.f&&!e.l)return A||new sr(0);var i=!A,o=i||e.i!=2,s=e.i;i&&(A=new sr(n*3));var l=function(Ee){var Oe=A.length;if(Ee>Oe){var Te=new sr(Math.max(Oe*2,Ee));Te.set(A),A=Te}},u=e.f||0,d=e.p||0,g=e.b||0,h=e.l,w=e.d,B=e.m,C=e.n,v=n*8;do{if(!h){u=pn(t,d,1);var y=pn(t,d+1,3);if(d+=3,y)if(y==1)h=lD,w=uD,B=9,C=5;else if(y==2){var L=pn(t,d,31)+257,V=pn(t,d+10,15)+4,k=L+pn(t,d+5,31)+1;d+=14;for(var W=new sr(k),T=new sr(19),N=0;N<V;++N)T[pp[N]]=pn(t,d+N*3,7);d+=V*3;for(var E=vp(T),x=(1<<E)-1,O=kn(T,E,1),N=0;N<k;){var j=O[pn(t,d,x)];d+=j&15;var F=j>>4;if(F<16)W[N++]=F;else{var G=0,Y=0;for(F==16?(Y=3+pn(t,d,3),d+=2,G=W[N-1]):F==17?(Y=3+pn(t,d,7),d+=3):F==18&&(Y=11+pn(t,d,127),d+=7);Y--;)W[N++]=G}}var K=W.subarray(0,L),q=W.subarray(L);B=vp(K),C=vp(q),h=kn(K,B,1),w=kn(q,C,1)}else gn(1);else{var F=wp(d)+4,Q=t[F-4]|t[F-3]<<8,M=F+Q;if(M>n){s&&gn(0);break}o&&l(g+Q),A.set(t.subarray(F,M),g),e.b=g+=Q,e.p=d=M*8,e.f=u;continue}if(d>v){s&&gn(0);break}}o&&l(g+131072);for(var ee=(1<<B)-1,ie=(1<<C)-1,S=d;;S=d){var G=h[Bp(t,d)&ee],H=G>>4;if(d+=G&15,d>v){s&&gn(0);break}if(G||gn(2),H<256)A[g++]=H;else if(H==256){S=d,h=null;break}else{var z=H-254;if(H>264){var N=H-257,Z=Zu[N];z=pn(t,d,(1<<Z)-1)+fy[N],d+=Z}var re=w[Bp(t,d)&ie],ne=re>>4;re||gn(3),d+=re&15;var q=oD[ne];if(ne>3){var Z=ju[ne];q+=Bp(t,d)&(1<<Z)-1,d+=Z}if(d>v){s&&gn(0);break}o&&l(g+131072);var ue=g+z;if(g<q){var ge=a-q,Ue=Math.min(q,ue);for(ge+g<0&&gn(3);g<Ue;++g)A[g]=r[ge+g]}for(;g<ue;++g)A[g]=A[g-q]}}e.l=h,e.p=S,e.b=g,e.f=u,h&&(u=1,e.m=B,e.d=w,e.n=C)}while(!u);return g!=A.length&&i?py(A,0,g):A.subarray(0,g)},$n=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8},ml=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8,t[r+2]|=A>>16},yp=function(t,e){for(var A=[],r=0;r<t.length;++r)t[r]&&A.push({s:r,f:t[r]});var n=A.length,a=A.slice();if(!n)return{t:By,l:0};if(n==1){var i=new sr(A[0].s+1);return i[A[0].s]=1,{t:i,l:1}}A.sort(function(M,L){return M.f-L.f}),A.push({s:-1,f:25001});var o=A[0],s=A[1],l=0,u=1,d=2;for(A[0]={s:-1,f:o.f+s.f,l:o,r:s};u!=n-1;)o=A[A[l].f<A[d].f?l++:d++],s=A[l!=u&&A[l].f<A[d].f?l++:d++],A[u++]={s:-1,f:o.f+s.f,l:o,r:s};for(var g=a[0].s,r=1;r<n;++r)a[r].s>g&&(g=a[r].s);var h=new Wr(g+1),w=bp(A[u-1],h,0);if(w>e){var r=0,B=0,C=w-e,v=1<<C;for(a.sort(function(L,V){return h[V.s]-h[L.s]||L.f-V.f});r<n;++r){var y=a[r].s;if(h[y]>e)B+=v-(1<<w-h[y]),h[y]=e;else break}for(B>>=C;B>0;){var F=a[r].s;h[F]<e?B-=1<<e-h[F]++-1:++r}for(;r>=0&&B;--r){var Q=a[r].s;h[Q]==e&&(--h[Q],++B)}w=e}return{t:new sr(h),l:w}},bp=function(t,e,A){return t.s==-1?Math.max(bp(t.l,e,A+1),bp(t.r,e,A+1)):e[t.s]=A},gy=function(t){for(var e=t.length;e&&!t[--e];);for(var A=new Wr(++e),r=0,n=t[0],a=1,i=function(s){A[r++]=s},o=1;o<=e;++o)if(t[o]==n&&o!=e)++a;else{if(!n&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(n),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(n);a=1,n=t[o]}return{c:A.subarray(0,r),n:e}},vl=function(t,e){for(var A=0,r=0;r<e.length;++r)A+=t[r]*e[r];return A},my=function(t,e,A){var r=A.length,n=wp(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var a=0;a<r;++a)t[n+a+4]=A[a];return(n+4+r)*8},vy=function(t,e,A,r,n,a,i,o,s,l,u){$n(e,u++,A),++n[256];for(var d=yp(n,15),g=d.t,h=d.l,w=yp(a,15),B=w.t,C=w.l,v=gy(g),y=v.c,F=v.n,Q=gy(B),M=Q.c,L=Q.n,V=new Wr(19),k=0;k<y.length;++k)++V[y[k]&31];for(var k=0;k<M.length;++k)++V[M[k]&31];for(var W=yp(V,7),T=W.t,N=W.l,E=19;E>4&&!T[pp[E-1]];--E);var x=l+5<<3,O=vl(n,Ia)+vl(a,gl)+i,j=vl(n,g)+vl(a,B)+i+14+3*E+vl(V,T)+2*V[16]+3*V[17]+7*V[18];if(s>=0&&x<=O&&x<=j)return my(e,u,t.subarray(s,s+l));var G,Y,K,q;if($n(e,u,1+(j<O)),u+=2,j<O){G=kn(g,h,0),Y=g,K=kn(B,C,0),q=B;var ee=kn(T,N,0);$n(e,u,F-257),$n(e,u+5,L-1),$n(e,u+10,E-4),u+=14;for(var k=0;k<E;++k)$n(e,u+3*k,T[pp[k]]);u+=3*E;for(var ie=[y,M],S=0;S<2;++S)for(var H=ie[S],k=0;k<H.length;++k){var z=H[k]&31;$n(e,u,ee[z]),u+=T[z],z>15&&($n(e,u,H[k]>>5&127),u+=H[k]>>12)}}else G=sD,Y=Ia,K=cD,q=gl;for(var k=0;k<o;++k){var Z=r[k];if(Z>255){var z=Z>>18&31;ml(e,u,G[z+257]),u+=Y[z+257],z>7&&($n(e,u,Z>>23&31),u+=Zu[z]);var re=Z&31;ml(e,u,K[re]),u+=q[re],re>3&&(ml(e,u,Z>>5&8191),u+=ju[re])}else ml(e,u,G[Z]),u+=Y[Z]}return ml(e,u,G[256]),u+Y[256]},dD=new dp([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),By=new sr(0),pD=function(t,e,A,r,n,a){var i=a.z||t.length,o=new sr(r+i+5*(1+Math.ceil(i/7e3))+n),s=o.subarray(r,o.length-n),l=a.l,u=(a.r||0)&7;if(e){u&&(s[0]=a.r>>3);for(var d=dD[e-1],g=d>>13,h=d&8191,w=(1<<A)-1,B=a.p||new Wr(32768),C=a.h||new Wr(w+1),v=Math.ceil(A/3),y=2*v,F=function(Pe){return(t[Pe]^t[Pe+1]<<v^t[Pe+2]<<y)&w},Q=new dp(25e3),M=new Wr(288),L=new Wr(32),V=0,k=0,W=a.i||0,T=0,N=a.w||0,E=0;W+2<i;++W){var x=F(W),O=W&32767,j=C[x];if(B[O]=j,C[x]=O,N<=W){var G=i-W;if((V>7e3||T>24576)&&(G>423||!l)){u=vy(t,s,0,Q,M,L,k,T,E,W-E,u),T=V=k=0,E=W;for(var Y=0;Y<286;++Y)M[Y]=0;for(var Y=0;Y<30;++Y)L[Y]=0}var K=2,q=0,ee=h,ie=O-j&32767;if(G>2&&x==F(W-ie))for(var S=Math.min(g,G)-1,H=Math.min(32767,W),z=Math.min(258,G);ie<=H&&--ee&&O!=j;){if(t[W+K]==t[W+K-ie]){for(var Z=0;Z<z&&t[W+Z]==t[W+Z-ie];++Z);if(Z>K){if(K=Z,q=ie,Z>S)break;for(var re=Math.min(ie,Z-2),ne=0,Y=0;Y<re;++Y){var ue=W-ie+Y&32767,ge=B[ue],Ue=ue-ge&32767;Ue>ne&&(ne=Ue,j=ue)}}}O=j,j=B[O],ie+=O-j&32767}if(q){Q[T++]=268435456|gp[K]<<18|dy[q];var Ee=gp[K]&31,Oe=dy[q]&31;k+=Zu[Ee]+ju[Oe],++M[257+Ee],++L[Oe],N=W+K,++V}else Q[T++]=t[W],++M[t[W]]}}for(W=Math.max(W,N);W<i;++W)Q[T++]=t[W],++M[t[W]];u=vy(t,s,l,Q,M,L,k,T,E,W-E,u),l||(a.r=u&7|s[u/8|0]<<3,u-=7,a.h=C,a.p=B,a.i=W,a.w=N)}else{for(var W=a.w||0;W<i+l;W+=65535){var Te=W+65535;Te>=i&&(s[u/8|0]=l,Te=i),u=my(s,u+1,t.subarray(W,Te))}a.i=i}return py(o,0,r+wp(u)+n)},wy=function(){var t=1,e=0;return{p:function(A){for(var r=t,n=e,a=A.length|0,i=0;i!=a;){for(var o=Math.min(i+2655,a);i<o;++i)n+=r+=A[i];r=(r&65535)+15*(r>>16),n=(n&65535)+15*(n>>16)}t=r,e=n},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},gD=function(t,e,A,r,n){if(!n&&(n={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),i=new sr(a.length+t.length);i.set(a),i.set(t,a.length),t=i,n.w=a.length}return pD(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,A,r,n)},yy=function(t,e,A){for(;A;++e)t[e]=A,A>>>=8},mD=function(t,e){var A=e.level,r=A==0?0:A<6?1:A==9?3:2;if(t[0]=120,t[1]=r<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var n=wy();n.p(e.dictionary),yy(t,2,n.d())}},vD=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&gn(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&gn(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function Cp(t,e){e||(e={});var A=wy();A.p(t);var r=gD(t,e,e.dictionary?6:2,4);return mD(r,e),yy(r,r.length-4,A.d()),r}function BD(t,e){return hD(t.subarray(vD(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}var wD=typeof TextDecoder<"u"&&new TextDecoder,yD=0;try{wD.decode(By,{stream:!0}),yD=1}catch{}/** @license
|
|
59
|
+
.`+lp+T8+Xw)},R8=function(t,e){var A=t.ownerDocument;if(A){var r=A.createElement("style");r.textContent=e,t.appendChild(r)}},qw=function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),I8=function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(up(e)||O8(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return Br(this,void 0,void 0,function(){var A,r,n,a,i=this;return ir(this,function(o){switch(o.label){case 0:return A=qw.isSameOrigin(e),r=!cp(e)&&this._options.useCORS===!0&&$A.SUPPORT_CORS_IMAGES&&!A,n=!cp(e)&&!A&&!up(e)&&typeof this._options.proxy=="string"&&$A.SUPPORT_CORS_XHR&&!r,!A&&this._options.allowTaint===!1&&!cp(e)&&!up(e)&&!n&&!r?[2]:(a=e,n?[4,this.proxy(a)]:[3,2]);case 1:a=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(s,l){var u=new Image;u.onload=function(){return s(u)},u.onerror=l,(k8(a)||r)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(function(){return s(u)},500),i._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(a,i){var o=$A.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o==="text")a(s.response);else{var d=new FileReader;d.addEventListener("load",function(){return a(d.result)},!1),d.addEventListener("error",function(g){return i(g)},!1),d.readAsDataURL(s.response)}else i("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=i;var l=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&s instanceof XMLHttpRequest&&(s.responseType=o),A._options.imageTimeout){var u=A._options.imageTimeout;s.timeout=u,s.ontimeout=function(){return i("Timed out ("+u+"ms) proxying "+n)}}s.send()})},t}(),V8=/^data:image\/svg\+xml/i,M8=/^data:image\/.*;base64,/i,L8=/^data:image\/.*/i,O8=function(t){return $A.SUPPORT_SVG_DRAWING||!H8(t)},cp=function(t){return L8.test(t)},k8=function(t){return M8.test(t)},up=function(t){return t.substr(0,4)==="blob"},H8=function(t){return t.substr(-3).toLowerCase()==="svg"||V8.test(t)},Ge=function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t}(),xo=function(t,e,A){return new Ge(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},Lu=function(){function t(e,A,r,n){this.type=1,this.start=e,this.startControl=A,this.endControl=r,this.end=n}return t.prototype.subdivide=function(e,A){var r=xo(this.start,this.startControl,e),n=xo(this.startControl,this.endControl,e),a=xo(this.endControl,this.end,e),i=xo(r,n,e),o=xo(n,a,e),s=xo(i,o,e);return A?new t(this.start,r,i,s):new t(s,o,a,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),$r=function(t){return t.type===1},D8=function(){function t(e){var A=e.styles,r=e.bounds,n=sl(A.borderTopLeftRadius,r.width,r.height),a=n[0],i=n[1],o=sl(A.borderTopRightRadius,r.width,r.height),s=o[0],l=o[1],u=sl(A.borderBottomRightRadius,r.width,r.height),d=u[0],g=u[1],h=sl(A.borderBottomLeftRadius,r.width,r.height),w=h[0],B=h[1],C=[];C.push((a+s)/r.width),C.push((w+d)/r.width),C.push((i+B)/r.height),C.push((l+g)/r.height);var v=Math.max.apply(Math,C);v>1&&(a/=v,i/=v,s/=v,l/=v,d/=v,g/=v,w/=v,B/=v);var y=r.width-s,F=r.height-g,Q=r.width-d,M=r.height-B,L=A.borderTopWidth,V=A.borderRightWidth,k=A.borderBottomWidth,W=A.borderLeftWidth,T=tA(A.paddingTop,e.bounds.width),N=tA(A.paddingRight,e.bounds.width),E=tA(A.paddingBottom,e.bounds.width),x=tA(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||i>0?uA(r.left+W/3,r.top+L/3,a-W/3,i-L/3,Zt.TOP_LEFT):new Ge(r.left+W/3,r.top+L/3),this.topRightBorderDoubleOuterBox=a>0||i>0?uA(r.left+y,r.top+L/3,s-V/3,l-L/3,Zt.TOP_RIGHT):new Ge(r.left+r.width-V/3,r.top+L/3),this.bottomRightBorderDoubleOuterBox=d>0||g>0?uA(r.left+Q,r.top+F,d-V/3,g-k/3,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V/3,r.top+r.height-k/3),this.bottomLeftBorderDoubleOuterBox=w>0||B>0?uA(r.left+W/3,r.top+M,w-W/3,B-k/3,Zt.BOTTOM_LEFT):new Ge(r.left+W/3,r.top+r.height-k/3),this.topLeftBorderDoubleInnerBox=a>0||i>0?uA(r.left+W*2/3,r.top+L*2/3,a-W*2/3,i-L*2/3,Zt.TOP_LEFT):new Ge(r.left+W*2/3,r.top+L*2/3),this.topRightBorderDoubleInnerBox=a>0||i>0?uA(r.left+y,r.top+L*2/3,s-V*2/3,l-L*2/3,Zt.TOP_RIGHT):new Ge(r.left+r.width-V*2/3,r.top+L*2/3),this.bottomRightBorderDoubleInnerBox=d>0||g>0?uA(r.left+Q,r.top+F,d-V*2/3,g-k*2/3,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V*2/3,r.top+r.height-k*2/3),this.bottomLeftBorderDoubleInnerBox=w>0||B>0?uA(r.left+W*2/3,r.top+M,w-W*2/3,B-k*2/3,Zt.BOTTOM_LEFT):new Ge(r.left+W*2/3,r.top+r.height-k*2/3),this.topLeftBorderStroke=a>0||i>0?uA(r.left+W/2,r.top+L/2,a-W/2,i-L/2,Zt.TOP_LEFT):new Ge(r.left+W/2,r.top+L/2),this.topRightBorderStroke=a>0||i>0?uA(r.left+y,r.top+L/2,s-V/2,l-L/2,Zt.TOP_RIGHT):new Ge(r.left+r.width-V/2,r.top+L/2),this.bottomRightBorderStroke=d>0||g>0?uA(r.left+Q,r.top+F,d-V/2,g-k/2,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V/2,r.top+r.height-k/2),this.bottomLeftBorderStroke=w>0||B>0?uA(r.left+W/2,r.top+M,w-W/2,B-k/2,Zt.BOTTOM_LEFT):new Ge(r.left+W/2,r.top+r.height-k/2),this.topLeftBorderBox=a>0||i>0?uA(r.left,r.top,a,i,Zt.TOP_LEFT):new Ge(r.left,r.top),this.topRightBorderBox=s>0||l>0?uA(r.left+y,r.top,s,l,Zt.TOP_RIGHT):new Ge(r.left+r.width,r.top),this.bottomRightBorderBox=d>0||g>0?uA(r.left+Q,r.top+F,d,g,Zt.BOTTOM_RIGHT):new Ge(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=w>0||B>0?uA(r.left,r.top+M,w,B,Zt.BOTTOM_LEFT):new Ge(r.left,r.top+r.height),this.topLeftPaddingBox=a>0||i>0?uA(r.left+W,r.top+L,Math.max(0,a-W),Math.max(0,i-L),Zt.TOP_LEFT):new Ge(r.left+W,r.top+L),this.topRightPaddingBox=s>0||l>0?uA(r.left+Math.min(y,r.width-V),r.top+L,y>r.width+V?0:Math.max(0,s-V),Math.max(0,l-L),Zt.TOP_RIGHT):new Ge(r.left+r.width-V,r.top+L),this.bottomRightPaddingBox=d>0||g>0?uA(r.left+Math.min(Q,r.width-W),r.top+Math.min(F,r.height-k),Math.max(0,d-V),Math.max(0,g-k),Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-V,r.top+r.height-k),this.bottomLeftPaddingBox=w>0||B>0?uA(r.left+W,r.top+Math.min(M,r.height-k),Math.max(0,w-W),Math.max(0,B-k),Zt.BOTTOM_LEFT):new Ge(r.left+W,r.top+r.height-k),this.topLeftContentBox=a>0||i>0?uA(r.left+W+x,r.top+L+T,Math.max(0,a-(W+x)),Math.max(0,i-(L+T)),Zt.TOP_LEFT):new Ge(r.left+W+x,r.top+L+T),this.topRightContentBox=s>0||l>0?uA(r.left+Math.min(y,r.width+W+x),r.top+L+T,y>r.width+W+x?0:s-W+x,l-(L+T),Zt.TOP_RIGHT):new Ge(r.left+r.width-(V+N),r.top+L+T),this.bottomRightContentBox=d>0||g>0?uA(r.left+Math.min(Q,r.width-(W+x)),r.top+Math.min(F,r.height+L+T),Math.max(0,d-(V+N)),g-(k+E),Zt.BOTTOM_RIGHT):new Ge(r.left+r.width-(V+N),r.top+r.height-(k+E)),this.bottomLeftContentBox=w>0||B>0?uA(r.left+W+x,r.top+M,Math.max(0,w-(W+x)),B-(k+E),Zt.BOTTOM_LEFT):new Ge(r.left+W+x,r.top+r.height-(k+E))}return t}(),Zt;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Zt||(Zt={}));var uA=function(t,e,A,r,n){var a=4*((Math.sqrt(2)-1)/3),i=A*a,o=r*a,s=t+A,l=e+r;switch(n){case Zt.TOP_LEFT:return new Lu(new Ge(t,l),new Ge(t,l-o),new Ge(s-i,e),new Ge(s,e));case Zt.TOP_RIGHT:return new Lu(new Ge(t,e),new Ge(t+i,e),new Ge(s,l-o),new Ge(s,l));case Zt.BOTTOM_RIGHT:return new Lu(new Ge(s,e),new Ge(s,e+o),new Ge(t+i,l),new Ge(t,l));case Zt.BOTTOM_LEFT:default:return new Lu(new Ge(s,l),new Ge(s-i,l),new Ge(t,e+o),new Ge(t,e))}},Ou=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},P8=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},ku=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},W8=function(){function t(e,A,r){this.offsetX=e,this.offsetY=A,this.matrix=r,this.type=0,this.target=6}return t}(),Hu=function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t}(),_8=function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t}(),Z8=function(t){return t.type===0},$w=function(t){return t.type===1},j8=function(t){return t.type===2},ey=function(t,e){return t.length===e.length?t.some(function(A,r){return A===e[r]}):!1},J8=function(t,e,A,r,n){return t.map(function(a,i){switch(i){case 0:return a.add(e,A);case 1:return a.add(e+r,A);case 2:return a.add(e+r,A+n);case 3:return a.add(e,A+n)}return a})},ty=function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),Ay=function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new D8(this.container),this.container.styles.opacity<1&&this.effects.push(new _8(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new W8(r,n,a))}if(this.container.styles.overflowX!==0){var i=Ou(this.curves),o=ku(this.curves);ey(i,o)?this.effects.push(new Hu(i,6)):(this.effects.push(new Hu(i,2)),this.effects.push(new Hu(o,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var a=r.effects.filter(function(s){return!$w(s)});if(A||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,a),A=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var i=Ou(r.curves),o=ku(r.curves);ey(i,o)||n.unshift(new Hu(o,6))}}else n.unshift.apply(n,a);r=r.parent}return n.filter(function(s){return WA(s.target,e)})},t}(),fp=function(t,e,A,r){t.container.elements.forEach(function(n){var a=WA(n.flags,4),i=WA(n.flags,2),o=new Ay(n,t);WA(n.styles.display,2048)&&r.push(o);var s=WA(n.flags,8)?[]:r;if(a||i){var l=a||n.styles.isPositioned()?A:e,u=new ty(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var d=n.styles.zIndex.order;if(d<0){var g=0;l.negativeZIndex.some(function(w,B){return d>w.element.container.styles.zIndex.order?(g=B,!1):g>0}),l.negativeZIndex.splice(g,0,u)}else if(d>0){var h=0;l.positiveZIndex.some(function(w,B){return d>=w.element.container.styles.zIndex.order?(h=B+1,!1):h>0}),l.positiveZIndex.splice(h,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);fp(o,u,a?u:A,s)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),fp(o,e,A,s);WA(n.flags,8)&&ry(n,s)})},ry=function(t,e){for(var A=t instanceof tp?t.start:1,r=t instanceof tp?t.reversed:!1,n=0;n<e.length;n++){var a=e[n];a.container instanceof Sw&&typeof a.container.value=="number"&&a.container.value!==0&&(A=a.container.value),a.listValue=dl(A,a.container.styles.listStyleType,!0),A+=r?-1:1}},K8=function(t){var e=new Ay(t,null),A=new ty(e),r=[];return fp(e,A,A,r),ry(e.container,r),A},ny=function(t,e){switch(e){case 0:return en(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return en(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return en(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return en(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},G8=function(t,e){switch(e){case 0:return en(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return en(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return en(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return en(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},z8=function(t,e){switch(e){case 0:return en(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return en(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return en(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return en(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},Y8=function(t,e){switch(e){case 0:return Du(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Du(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Du(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return Du(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Du=function(t,e){var A=[];return $r(t)?A.push(t.subdivide(.5,!1)):A.push(t),$r(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},en=function(t,e,A,r){var n=[];return $r(t)?n.push(t.subdivide(.5,!1)):n.push(t),$r(A)?n.push(A.subdivide(.5,!0)):n.push(A),$r(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),$r(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},ay=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},Pu=function(t){var e=t.styles,A=t.bounds,r=tA(e.paddingLeft,A.width),n=tA(e.paddingRight,A.width),a=tA(e.paddingTop,A.width),i=tA(e.paddingBottom,A.width);return A.add(r+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+a+i))},X8=function(t,e){return t===0?e.bounds:t===2?Pu(e):ay(e)},q8=function(t,e){return t===0?e.bounds:t===2?Pu(e):ay(e)},hp=function(t,e,A){var r=X8(Io(t.styles.backgroundOrigin,e),t),n=q8(Io(t.styles.backgroundClip,e),t),a=$8(Io(t.styles.backgroundSize,e),A,r),i=a[0],o=a[1],s=sl(Io(t.styles.backgroundPosition,e),r.width-i,r.height-o),l=eH(Io(t.styles.backgroundRepeat,e),s,a,r,n),u=Math.round(r.left+s[0]),d=Math.round(r.top+s[1]);return[l,u,d,i,o]},Ro=function(t){return zt(t)&&t.value===No.AUTO},Wu=function(t){return typeof t=="number"},$8=function(t,e,A){var r=e[0],n=e[1],a=e[2],i=t[0],o=t[1];if(!i)return[0,0];if(LA(i)&&o&&LA(o))return[tA(i,A.width),tA(o,A.height)];var s=Wu(a);if(zt(i)&&(i.value===No.CONTAIN||i.value===No.COVER)){if(Wu(a)){var l=A.width/A.height;return l<a!=(i.value===No.COVER)?[A.width,A.width/a]:[A.height*a,A.height]}return[A.width,A.height]}var u=Wu(r),d=Wu(n),g=u||d;if(Ro(i)&&(!o||Ro(o))){if(u&&d)return[r,n];if(!s&&!g)return[A.width,A.height];if(g&&s){var h=u?r:n*a,w=d?n:r/a;return[h,w]}var B=u?r:A.width,C=d?n:A.height;return[B,C]}if(s){var v=0,y=0;return LA(i)?v=tA(i,A.width):LA(o)&&(y=tA(o,A.height)),Ro(i)?v=y*a:(!o||Ro(o))&&(y=v/a),[v,y]}var F=null,Q=null;if(LA(i)?F=tA(i,A.width):o&&LA(o)&&(Q=tA(o,A.height)),F!==null&&(!o||Ro(o))&&(Q=u&&d?F/r*n:A.height),Q!==null&&Ro(i)&&(F=u&&d?Q/n*r:A.width),F!==null&&Q!==null)return[F,Q];throw new Error("Unable to calculate background-size for element")},Io=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},eH=function(t,e,A,r,n){var a=e[0],i=e[1],o=A[0],s=A[1];switch(t){case 2:return[new Ge(Math.round(r.left),Math.round(r.top+i)),new Ge(Math.round(r.left+r.width),Math.round(r.top+i)),new Ge(Math.round(r.left+r.width),Math.round(s+r.top+i)),new Ge(Math.round(r.left),Math.round(s+r.top+i))];case 3:return[new Ge(Math.round(r.left+a),Math.round(r.top)),new Ge(Math.round(r.left+a+o),Math.round(r.top)),new Ge(Math.round(r.left+a+o),Math.round(r.height+r.top)),new Ge(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new Ge(Math.round(r.left+a),Math.round(r.top+i)),new Ge(Math.round(r.left+a+o),Math.round(r.top+i)),new Ge(Math.round(r.left+a+o),Math.round(r.top+i+s)),new Ge(Math.round(r.left+a),Math.round(r.top+i+s))];default:return[new Ge(Math.round(n.left),Math.round(n.top)),new Ge(Math.round(n.left+n.width),Math.round(n.top)),new Ge(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Ge(Math.round(n.left),Math.round(n.height+n.top))]}},tH="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",iy="Hidden Text",AH=function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var r=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),i=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=A,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",i.appendChild(r),n.src=tH,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=A,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(iy)),r.appendChild(a),r.appendChild(n);var o=n.offsetTop-a.offsetTop+2;r.removeChild(a),r.appendChild(this._document.createTextNode(iy)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return i.removeChild(r),{baseline:o,middle:s}},t.prototype.getMetrics=function(e,A){var r=e+" "+A;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,A)),this._data[r]},t}(),oy=function(){function t(e,A){this.context=e,this.options=A}return t}(),rH=1e4,nH=function(t){hn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new AH(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(A){for(var r=this;this._activeEffects.length;)this.popEffect();A.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(A){this.ctx.save(),j8(A)&&(this.ctx.globalAlpha=A.opacity),Z8(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),$w(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return Br(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return r=A.element.container.styles,r.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return Br(this,void 0,void 0,function(){return ir(this,function(r){switch(r.label){case 0:if(WA(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(A)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,r,n){var a=this;if(r===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+n);else{var i=ep(A.text);i.reduce(function(o,s){return a.ctx.fillText(s,o,A.bounds.top+n),o+a.ctx.measureText(s).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var r=A.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),n=lH(A.fontFamily).join(", "),a=ol(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,r,A.fontWeight,a,n].join(" "),n,a]},e.prototype.renderTextNode=function(A,r){return Br(this,void 0,void 0,function(){var n,a,i,o,s,l,u,d,g=this;return ir(this,function(h){return n=this.createFontStyle(r),a=n[0],i=n[1],o=n[2],this.ctx.font=a,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(i,o),l=s.baseline,u=s.middle,d=r.paintOrder,A.textBounds.forEach(function(w){d.forEach(function(B){switch(B){case 0:g.ctx.fillStyle=JA(r.color),g.renderTextWithLetterSpacing(w,r.letterSpacing,l);var C=r.textShadow;C.length&&w.text.trim().length&&(C.slice(0).reverse().forEach(function(v){g.ctx.shadowColor=JA(v.color),g.ctx.shadowOffsetX=v.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=v.offsetY.number*g.options.scale,g.ctx.shadowBlur=v.blur.number,g.renderTextWithLetterSpacing(w,r.letterSpacing,l)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),r.textDecorationLine.length&&(g.ctx.fillStyle=JA(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(v){switch(v){case 1:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top+l),w.bounds.width,1);break;case 2:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top),w.bounds.width,1);break;case 3:g.ctx.fillRect(w.bounds.left,Math.ceil(w.bounds.top+u),w.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&w.text.trim().length&&(g.ctx.strokeStyle=JA(r.webkitTextStrokeColor),g.ctx.lineWidth=r.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(w.text,w.bounds.left,w.bounds.top+l)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,r,n){if(n&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var a=Pu(A),i=ku(r);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,A.intrinsicWidth,A.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s,y,y,l,u,d,g,Q,h,w,M,B,C,v,y,F,Q,M;return ir(this,function(L){switch(L.label){case 0:this.applyEffects(A.getEffects(4)),r=A.container,n=A.curves,a=r.styles,i=0,o=r.textNodes,L.label=1;case 1:return i<o.length?(s=o[i],[4,this.renderTextNode(s,a)]):[3,4];case 2:L.sent(),L.label=3;case 3:return i++,[3,1];case 4:if(!(r instanceof Uw))return[3,8];L.label=5;case 5:return L.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return y=L.sent(),this.renderReplacedElement(r,n,y),[3,8];case 7:return L.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof Fw&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof Nw))return[3,12];L.label=9;case 9:return L.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return y=L.sent(),this.renderReplacedElement(r,n,y),[3,12];case 11:return L.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof Rw&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:u=L.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),L.label=14;case 14:if(r instanceof Ap&&(d=Math.min(r.bounds.width,r.bounds.height),r.type===Tu?r.checked&&(this.ctx.save(),this.path([new Ge(r.bounds.left+d*.39363,r.bounds.top+d*.79),new Ge(r.bounds.left+d*.16,r.bounds.top+d*.5549),new Ge(r.bounds.left+d*.27347,r.bounds.top+d*.44071),new Ge(r.bounds.left+d*.39694,r.bounds.top+d*.5649),new Ge(r.bounds.left+d*.72983,r.bounds.top+d*.23),new Ge(r.bounds.left+d*.84,r.bounds.top+d*.34085),new Ge(r.bounds.left+d*.39363,r.bounds.top+d*.79)]),this.ctx.fillStyle=JA(Qw),this.ctx.fill(),this.ctx.restore()):r.type===xu&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+d/2,r.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=JA(Qw),this.ctx.fill(),this.ctx.restore())),aH(r)&&r.value.length){switch(g=this.createFontStyle(a),Q=g[0],h=g[1],w=this.fontMetrics.getMetrics(Q,h).baseline,this.ctx.font=Q,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=oH(r.styles.textAlign),M=Pu(r),B=0,r.styles.textAlign){case 1:B+=M.width/2;break;case 2:B+=M.width;break}C=M.add(B,0,0,-M.height/2+1),this.ctx.save(),this.path([new Ge(M.left,M.top),new Ge(M.left+M.width,M.top),new Ge(M.left+M.width,M.top+M.height),new Ge(M.left,M.top+M.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new fl(r.value,C),a.letterSpacing,w),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!WA(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(v=r.styles.listStyleImage,v.type!==0)return[3,18];y=void 0,F=v.url,L.label=15;case 15:return L.trys.push([15,17,,18]),[4,this.context.cache.match(F)];case 16:return y=L.sent(),this.ctx.drawImage(y,r.bounds.left-(y.width+10),r.bounds.top),[3,18];case 17:return L.sent(),this.context.logger.error("Error loading list-style-image "+F),[3,18];case 18:return[3,20];case 19:A.listValue&&r.styles.listStyleType!==-1&&(Q=this.createFontStyle(a)[0],this.ctx.font=Q,this.ctx.fillStyle=JA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",M=new zn(r.bounds.left,r.bounds.top+tA(r.styles.paddingTop,r.bounds.width),r.bounds.width,iw(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new fl(A.listValue,M),a.letterSpacing,iw(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),L.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return Br(this,void 0,void 0,function(){var r,n,v,a,i,v,o,s,v,l,u,v,d,g,v,h,w,v,B,C,v;return ir(this,function(y){switch(y.label){case 0:if(WA(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:y.sent(),r=0,n=A.negativeZIndex,y.label=2;case 2:return r<n.length?(v=n[r],[4,this.renderStack(v)]):[3,5];case 3:y.sent(),y.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:y.sent(),a=0,i=A.nonInlineLevel,y.label=7;case 7:return a<i.length?(v=i[a],[4,this.renderNode(v)]):[3,10];case 8:y.sent(),y.label=9;case 9:return a++,[3,7];case 10:o=0,s=A.nonPositionedFloats,y.label=11;case 11:return o<s.length?(v=s[o],[4,this.renderStack(v)]):[3,14];case 12:y.sent(),y.label=13;case 13:return o++,[3,11];case 14:l=0,u=A.nonPositionedInlineLevel,y.label=15;case 15:return l<u.length?(v=u[l],[4,this.renderStack(v)]):[3,18];case 16:y.sent(),y.label=17;case 17:return l++,[3,15];case 18:d=0,g=A.inlineLevel,y.label=19;case 19:return d<g.length?(v=g[d],[4,this.renderNode(v)]):[3,22];case 20:y.sent(),y.label=21;case 21:return d++,[3,19];case 22:h=0,w=A.zeroOrAutoZIndexOrTransformedOrOpacity,y.label=23;case 23:return h<w.length?(v=w[h],[4,this.renderStack(v)]):[3,26];case 24:y.sent(),y.label=25;case 25:return h++,[3,23];case 26:B=0,C=A.positiveZIndex,y.label=27;case 27:return B<C.length?(v=C[B],[4,this.renderStack(v)]):[3,30];case 28:y.sent(),y.label=29;case 29:return B++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var r=this;A.forEach(function(n,a){var i=$r(n)?n.start:n;a===0?r.ctx.moveTo(i.x,i.y):r.ctx.lineTo(i.x,i.y),$r(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(A,r,n,a){this.path(A),this.ctx.fillStyle=r,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},e.prototype.resizeImage=function(A,r,n){var a;if(A.width===r&&A.height===n)return A;var i=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,o=i.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,n);var s=o.getContext("2d");return s.drawImage(A,0,0,A.width,A.height,0,0,r,n),o},e.prototype.renderBackgroundImage=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s;return ir(this,function(l){switch(l.label){case 0:r=A.styles.backgroundImage.length-1,n=function(u){var d,g,h,T,G,Y,x,O,k,w,T,G,Y,x,O,B,C,v,y,F,Q,M,L,V,k,W,T,N,E,x,O,j,G,Y,K,q,ee,ie,S,H,z,Z;return ir(this,function(re){switch(re.label){case 0:if(u.type!==0)return[3,5];d=void 0,g=u.url,re.label=1;case 1:return re.trys.push([1,3,,4]),[4,a.context.cache.match(g)];case 2:return d=re.sent(),[3,4];case 3:return re.sent(),a.context.logger.error("Error loading background-image "+g),[3,4];case 4:return d&&(h=hp(A,r,[d.width,d.height,d.width/d.height]),T=h[0],G=h[1],Y=h[2],x=h[3],O=h[4],k=a.ctx.createPattern(a.resizeImage(d,x,O),"repeat"),a.renderRepeat(T,k,G,Y)),[3,6];case 5:ZO(u)?(w=hp(A,r,[null,null,null]),T=w[0],G=w[1],Y=w[2],x=w[3],O=w[4],B=HO(u.angle,x,O),C=B[0],v=B[1],y=B[2],F=B[3],Q=B[4],M=document.createElement("canvas"),M.width=x,M.height=O,L=M.getContext("2d"),V=L.createLinearGradient(v,F,y,Q),zB(u.stops,C).forEach(function(ne){return V.addColorStop(ne.stop,JA(ne.color))}),L.fillStyle=V,L.fillRect(0,0,x,O),x>0&&O>0&&(k=a.ctx.createPattern(M,"repeat"),a.renderRepeat(T,k,G,Y))):jO(u)&&(W=hp(A,r,[null,null,null]),T=W[0],N=W[1],E=W[2],x=W[3],O=W[4],j=u.position.length===0?[H0]:u.position,G=tA(j[0],x),Y=tA(j[j.length-1],O),K=DO(u,G,Y,x,O),q=K[0],ee=K[1],q>0&&ee>0&&(ie=a.ctx.createRadialGradient(N+G,E+Y,0,N+G,E+Y,q),zB(u.stops,q*2).forEach(function(ne){return ie.addColorStop(ne.stop,JA(ne.color))}),a.path(T),a.ctx.fillStyle=ie,q!==ee?(S=A.bounds.left+.5*A.bounds.width,H=A.bounds.top+.5*A.bounds.height,z=ee/q,Z=1/z,a.ctx.save(),a.ctx.translate(S,H),a.ctx.transform(1,0,0,z,0,0),a.ctx.translate(-S,-H),a.ctx.fillRect(N,Z*(E-H)+H,x,O*Z),a.ctx.restore()):a.ctx.fill())),re.label=6;case 6:return r--,[2]}})},a=this,i=0,o=A.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return i<o.length?(s=o[i],[5,n(s)]):[3,4];case 2:l.sent(),l.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,r,n){return Br(this,void 0,void 0,function(){return ir(this,function(a){return this.path(ny(n,r)),this.ctx.fillStyle=JA(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,r,n,a){return Br(this,void 0,void 0,function(){var i,o;return ir(this,function(s){switch(s.label){case 0:return r<3?[4,this.renderSolidBorder(A,n,a)]:[3,2];case 1:return s.sent(),[2];case 2:return i=G8(a,n),this.path(i),this.ctx.fillStyle=JA(A),this.ctx.fill(),o=z8(a,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return Br(this,void 0,void 0,function(){var r,n,a,i,o,s,l,u,d=this;return ir(this,function(g){switch(g.label){case 0:return this.applyEffects(A.getEffects(2)),r=A.container.styles,n=!Sa(r.backgroundColor)||r.backgroundImage.length,a=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],i=iH(Io(r.backgroundClip,0),A.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),Sa(r.backgroundColor)||(this.ctx.fillStyle=JA(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(h){d.ctx.save();var w=Ou(A.curves),B=h.inset?0:rH,C=J8(w,-B+(h.inset?1:-1)*h.spread.number,(h.inset?1:-1)*h.spread.number,h.spread.number*(h.inset?-2:2),h.spread.number*(h.inset?-2:2));h.inset?(d.path(w),d.ctx.clip(),d.mask(C)):(d.mask(w),d.ctx.clip(),d.path(C)),d.ctx.shadowOffsetX=h.offsetX.number+B,d.ctx.shadowOffsetY=h.offsetY.number,d.ctx.shadowColor=JA(h.color),d.ctx.shadowBlur=h.blur.number,d.ctx.fillStyle=h.inset?JA(h.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),g.label=2;case 2:o=0,s=0,l=a,g.label=3;case 3:return s<l.length?(u=l[s],u.style!==0&&!Sa(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,3)];case 6:return g.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,A.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,A.curves)];case 10:g.sent(),g.label=11;case 11:o++,g.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,r,n,a,i){return Br(this,void 0,void 0,function(){var o,s,l,u,d,g,h,w,B,C,v,y,F,Q,M,L,M,L;return ir(this,function(V){return this.ctx.save(),o=Y8(a,n),s=ny(a,n),i===2&&(this.path(s),this.ctx.clip()),$r(s[0])?(l=s[0].start.x,u=s[0].start.y):(l=s[0].x,u=s[0].y),$r(s[1])?(d=s[1].end.x,g=s[1].end.y):(d=s[1].x,g=s[1].y),n===0||n===2?h=Math.abs(l-d):h=Math.abs(u-g),this.ctx.beginPath(),i===3?this.formatPath(o):this.formatPath(s.slice(0,2)),w=r<3?r*3:r*2,B=r<3?r*2:r,i===3&&(w=r,B=r),C=!0,h<=w*2?C=!1:h<=w*2+B?(v=h/(2*w+B),w*=v,B*=v):(y=Math.floor((h+B)/(w+B)),F=(h-y*w)/(y-1),Q=(h-(y+1)*w)/y,B=Q<=0||Math.abs(B-F)<Math.abs(B-Q)?F:Q),C&&(i===3?this.ctx.setLineDash([0,w+B]):this.ctx.setLineDash([w,B])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=JA(A),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&($r(s[0])&&(M=s[3],L=s[0],this.ctx.beginPath(),this.formatPath([new Ge(M.end.x,M.end.y),new Ge(L.start.x,L.start.y)]),this.ctx.stroke()),$r(s[1])&&(M=s[1],L=s[2],this.ctx.beginPath(),this.formatPath([new Ge(M.end.x,M.end.y),new Ge(L.start.x,L.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return Br(this,void 0,void 0,function(){var r;return ir(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=K8(A),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(oy),aH=function(t){return t instanceof xw||t instanceof Tw?!0:t instanceof Ap&&t.type!==xu&&t.type!==Tu},iH=function(t,e){switch(t){case 0:return Ou(e);case 2:return P8(e);case 1:default:return ku(e)}},oH=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},sH=["-apple-system","system-ui"],lH=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return sH.indexOf(e)===-1}):t},cH=function(t){hn(e,t);function e(A,r){var n=t.call(this,A,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(A){return Br(this,void 0,void 0,function(){var r,n;return ir(this,function(a){switch(a.label){case 0:return r=$0(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,uH(r)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=JA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(oy),uH=function(t){return new Promise(function(e,A){var r=new Image;r.onload=function(){e(r)},r.onerror=A,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},fH=function(){function t(e){var A=e.id,r=e.enabled;this.id=A,this.enabled=r,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Yc([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Yc([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t}(),hH=function(){function t(e,A){var r;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new fH({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new I8(this,e)}return t.instanceCount=1,t}(),sy=function(t,e){return e===void 0&&(e={}),dH(t,e)};typeof window<"u"&&qw.setContext(window);var dH=function(t,e){return Br(void 0,void 0,void 0,function(){var A,r,n,a,i,o,s,l,u,d,g,h,w,B,C,v,y,F,Q,M,V,L,V,k,W,T,N,E,x,O,j,G,Y,K,q,ee,ie,S,H,z;return ir(this,function(Z){switch(Z.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(r=A.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(k=e.allowTaint)!==null&&k!==void 0?k:!1,imageTimeout:(W=e.imageTimeout)!==null&&W!==void 0?W:15e3,proxy:e.proxy,useCORS:(T=e.useCORS)!==null&&T!==void 0?T:!1},a=v0({logging:(N=e.logging)!==null&&N!==void 0?N:!0,cache:e.cache},n),i={windowWidth:(E=e.windowWidth)!==null&&E!==void 0?E:r.innerWidth,windowHeight:(x=e.windowHeight)!==null&&x!==void 0?x:r.innerHeight,scrollX:(O=e.scrollX)!==null&&O!==void 0?O:r.pageXOffset,scrollY:(j=e.scrollY)!==null&&j!==void 0?j:r.pageYOffset},o=new zn(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),s=new hH(a,o),l=(G=e.foreignObjectRendering)!==null&&G!==void 0?G:!1,u={allowTaint:(Y=e.allowTaint)!==null&&Y!==void 0?Y:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new Yw(s,t,u),g=d.clonedReferenceElement,g?[4,d.toIFrame(A,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=Z.sent(),w=np(g)||g8(g)?JM(g.ownerDocument):Xc(s,g),B=w.width,C=w.height,v=w.left,y=w.top,F=pH(s,g,e.backgroundColor),Q={canvas:e.canvas,backgroundColor:F,scale:(q=(K=e.scale)!==null&&K!==void 0?K:r.devicePixelRatio)!==null&&q!==void 0?q:1,x:((ee=e.x)!==null&&ee!==void 0?ee:0)+v,y:((ie=e.y)!==null&&ie!==void 0?ie:0)+y,width:(S=e.width)!==null&&S!==void 0?S:Math.ceil(B),height:(H=e.height)!==null&&H!==void 0?H:Math.ceil(C)},l?(s.logger.debug("Document cloned, using foreign object rendering"),V=new cH(s,Q),[4,V.render(g)]):[3,3];case 2:return M=Z.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+v+","+y+" with size "+B+"x"+C+" using computed rendering"),s.logger.debug("Starting DOM parsing"),L=Vw(s,g),F===L.styles.backgroundColor&&(L.styles.backgroundColor=Xn.TRANSPARENT),s.logger.debug("Starting renderer for element at "+Q.x+","+Q.y+" with size "+Q.width+"x"+Q.height),V=new nH(s,Q),[4,V.render(L)];case 4:M=Z.sent(),Z.label=5;case 5:return(!((z=e.removeContainer)!==null&&z!==void 0)||z)&&(Yw.destroy(h)||s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),s.logger.debug("Finished rendering"),[2,M]}})})},pH=function(t,e,A){var r=e.ownerDocument,n=r.documentElement?ll(t,getComputedStyle(r.documentElement).backgroundColor):Xn.TRANSPARENT,a=r.body?ll(t,getComputedStyle(r.body).backgroundColor):Xn.TRANSPARENT,i=typeof A=="string"?ll(t,A):A===null?Xn.TRANSPARENT:4294967295;return e===r.documentElement?Sa(n)?Sa(a)?i:a:n:i};const ly=Object.freeze(Object.defineProperty({__proto__:null,default:sy},Symbol.toStringTag,{value:"Module"})),o$="",gH={class:"label-designer"},mH={class:"toolbar"},vH={class:"center-container"},BH={key:0,class:"loader-container"},wH={class:"zoom-controls"},yH=["disabled"],bH=["disabled"],CH={class:"ruler-horizontal"},EH={class:"ruler-vertical"},UH={key:0,class:"drag-extend-lines"},FH={key:1,class:"alignment-guides"},NH=["data-item-id","onMousedown"],SH=["onMousedown"],QH=["onMousedown"],TH=["onMousedown"],xH=["onMousedown"],RH=["onMousedown"],IH=["onMousedown"],VH=["onMousedown"],MH=["onMousedown"],LH=["onMousedown"],OH={class:"property-panel",tabindex:"0"},kH={class:"property-panel-header"},HH={class:"property-panel-operate"},DH={class:"property-panel-title"},PH=["innerHTML"],WH={class:"position-controls"},_H={class:"control-group"},ZH={class:"number-input"},jH=["value"],JH={class:"control-group"},KH={class:"number-input"},GH=["value"],zH={key:0,class:"control-group"},YH={class:"number-input"},XH=["value"],qH={key:1,class:"control-group"},$H={class:"number-input"},eD=["value"],tD={key:2,class:"control-group"},AD={class:"number-input"},rD={class:"rotation-display"},nD={key:3,class:"control-group"},aD={class:"switch-input"},_u=.05,iD=jA({__name:"panels",props:{templateInfo:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},options:{type:Object,default:()=>({})},showGraphConfig:{type:Boolean,default:!1},templateType:{type:String,default:"lodop"},config:{type:Object,default:()=>({})}},setup(t,{expose:e}){const A=t,r=f.ref({}),n=f.ref(0),a=f.ref(!0),i=f.ref([]),o=f.ref(1);let s=1;const l=f.computed(()=>{var ae;return((ae=r.value)==null?void 0:ae.printWidth)||0}),u=f.computed(()=>{var ae;return((ae=r.value)==null?void 0:ae.printHeight)||0});f.ref(!1);const d=f.ref(!1),g=f.ref(!1),h=new hi(dA.CACHE.STYLE_CACHE_SIZE),w=new hi(dA.CACHE.BOUNDING_BOX_CACHE_SIZE),B=new Map($v.map(ae=>[ae.type,ae])),{selectedItems:C,selectItem:v,getCurrentSelected:y,clearSelection:F}=LM(),{dragging:Q,dragItem:M,startDrag:L}=VM({scale:o,canvasWidth:l,canvasHeight:u,selectItem:v,onStartDrag:()=>{d.value=!0,f.nextTick(()=>{x()})},onStopDrag:()=>{d.value=!1,f.nextTick(()=>{g.value=!1}),O()},onDragUpdate:()=>{x()}}),{startResize:V,resizing:k,resizeDirection:W,resizeItem:T}=MM(l,u,o,C,()=>{const ae=y();K(ae)}),{alignmentGuides:N,showGuides:E,updateAlignmentGuides:x,clearAlignmentGuides:O}=ZM({items:i,dragItem:M,resizeItem:T,dragging:Q,resizing:k,resizeDirection:W,canvasWidth:l,canvasHeight:u}),{handleMouseWheel:j,adjustRotation:G,adjustComponentToFitCanvas:Y,updateAspectRatio:K}=WM(C,l,u);f.watch(()=>C.value,()=>{h.clear()},{deep:!0}),f.watch(()=>k.value,ae=>{ae?x():O()}),f.watch(()=>{var ae;return(ae=T.value)==null?void 0:ae.props},()=>{k.value&&x()},{deep:!0}),f.watch(()=>M.value,()=>{(Q.value||k.value)&&x()}),f.watch(()=>T.value,()=>{(Q.value||k.value)&&x()}),f.watch(()=>i.value,()=>{(Q.value||k.value)&&x()},{deep:!0});const q=(ae,Ae)=>{var Be;(!Ae||Number(Ae)<=0&&(ae==="width"||ae==="height"))&&ot((Be=y())==null?void 0:Be.id)},ee=ae=>{const Ae=`${ae.id}_${Ce(ae.props.x,1)}_${Ce(ae.props.y,1)}_${ae.props.width}_${ae.props.height}_${ae.props.rotation}`;if(w.has(Ae))return w.get(Ae);const Be=pi(ae.props.x,ae.props.y,ae.props.width,ae.props.height,ae.props.rotation||0);return w.set(Ae,Be),Be},ie=ae=>{const Ae=ee(ae),Be=Gs(Ae);return{minX:Ce(Be.minX,3),maxX:Ce(Be.maxX,3),minY:Ce(Be.minY,3),maxY:Ce(Be.maxY,3),width:Ce(Be.maxX-Be.minX,3),height:Ce(Be.maxY-Be.minY,3),centerX:Ce((Be.minX+Be.maxX)/2,3),centerY:Ce((Be.minY+Be.maxY)/2,3)}},S=(ae,Ae)=>{const Be=ie(ae),it=(lt=>lt.type==="rectangle"?parseFloat(lt.props.LineWidth||"0.5")/3.78:0)(ae),ze=(lt,xe,vt)=>(vt==="rectangle"&&it>0,lt);switch(Ae){case"left":return{left:Ce(ze(Be.minX,Ae,ae.type),3)+"mm"};case"right":return{left:Ce(ze(Be.maxX,Ae,ae.type),3)+"mm"};case"top":return{top:Ce(ze(Be.minY,Ae,ae.type),3)+"mm"};case"bottom":return{top:Ce(ze(Be.maxY,Ae,ae.type),3)+"mm"};default:return{}}},H=()=>{f.nextTick(()=>{const ae=document.querySelector(".canvas-container");if(!ae||!l.value||!u.value)return;const Ae=ae.getBoundingClientRect(),Be=Ba(l.value),At=Ba(u.value),it=16,ze=21,lt=21,xe=20,vt=24,je=24,we=Ae.width-it*2-ze-je,Bt=Ae.height-it-lt-xe-vt;let Ye=we/Be,Ft=Bt/At,Pt=Math.min(Ye,Ft);Pt=Pt*.95;const Wt=Math.min(4,Pt);s=Math.max(.8,Math.min(Wt,Pt)),s=Math.min(3,s),o.value=z(s,1),setTimeout(()=>{n.value=1,a.value=!1},500)})};function z(ae,Ae){ae=ae.toString();let Be=ae.indexOf(".");return Be!==-1?ae=ae.substring(0,Ae+Be+1):ae=ae.substring(0),Number(parseFloat(ae).toFixed(Ae))}const Z=ae=>B.get(ae)||null,re=ae=>{const Ae=C.value.indexOf(ae),Be=Ae===C.value.length-1,At=Ae!==-1,it=`${ae.id}_${Math.round(ae.props.x*10)}_${Math.round(ae.props.y*10)}_${ae.props.width}_${ae.props.height}_${ae.props.rotation}_${At}_${Be}`;if(h.has(it))return h.get(it);const ze={width:ae.props.width+"mm",height:ae.props.height+"mm","--item-width":ae.props.width+"mm","--item-height":ae.props.height+"mm",transform:`translate3d(${ae.props.x}mm, ${ae.props.y}mm, 0) rotate(${ae.props.rotation}deg)`,textRendering:"geometricPrecision",WebkitTextRendering:"geometricPrecision",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform",transformOrigin:"center center",WebkitTransformOrigin:"center center"};if(At)Be?ze.zIndex=1e3:ze.zIndex=999;else{const lt=i.value.findIndex(xe=>xe.id===ae.id);ze.zIndex=100+lt}return h.set(it,ze),ze},ne=ae=>{const Ae=C.value.some(At=>At.id===ae.id),Be=y()===ae;return{"component-selected":Ae,"component-current":Ae&&Be}},ue=(ae,Ae)=>{const At=((ae.props.rotation||0)%360+360)%360;if(ae.type==="line"&&(Ae==="left"||Ae==="right")){let xe;const je=((Ae==="left"?270:90)+At)%360;return je>=337.5||je<22.5?xe="n-resize":je>=22.5&&je<67.5?xe="ne-resize":je>=67.5&&je<112.5?xe="e-resize":je>=112.5&&je<157.5?xe="se-resize":je>=157.5&&je<202.5?xe="s-resize":je>=202.5&&je<247.5?xe="sw-resize":je>=247.5&&je<292.5?xe="w-resize":je>=292.5&&je<337.5&&(xe="nw-resize"),{cursor:xe,top:"50%",transform:"translateY(-50%)"}}if(ae.type==="verline"&&(Ae==="top"||Ae==="bottom")){let xe;const je=((Ae==="top"?0:180)+At)%360;return je>=337.5||je<22.5?xe="n-resize":je>=22.5&&je<67.5?xe="ne-resize":je>=67.5&&je<112.5?xe="e-resize":je>=112.5&&je<157.5?xe="se-resize":je>=157.5&&je<202.5?xe="s-resize":je>=202.5&&je<247.5?xe="sw-resize":je>=247.5&&je<292.5?xe="w-resize":je>=292.5&&je<337.5&&(xe="nw-resize"),{cursor:xe,left:"50%",transform:"translateX(-50%)"}}const ze=({top:0,"top-right":45,right:90,"bottom-right":135,bottom:180,"bottom-left":225,left:270,"top-left":315}[Ae]+At)%360;let lt="pointer";return ze>=337.5||ze<22.5?lt="n-resize":ze>=22.5&&ze<67.5?lt="ne-resize":ze>=67.5&&ze<112.5?lt="e-resize":ze>=112.5&&ze<157.5?lt="se-resize":ze>=157.5&&ze<202.5?lt="s-resize":ze>=202.5&&ze<247.5?lt="sw-resize":ze>=247.5&&ze<292.5?lt="w-resize":ze>=292.5&&ze<337.5&&(lt="nw-resize"),{cursor:lt,display:"block",visibility:"visible",opacity:"1"}},ge=()=>{o.value<4&&(o.value+=.1)},Ue=()=>{o.value>.8&&(o.value-=.1)},Ee=()=>{const ae=y();if(!ae)return 0;const{x1:Ae}=yo(ae);return Math.max(0,Number(Ae.toFixed(2)))},Oe=()=>{const ae=y();if(!ae)return 0;const{y1:Ae}=yo(ae);return Math.max(0,Number(Ae.toFixed(2)))},Te=()=>{const ae=y();return ae?Number((ae.props.width||0).toFixed(2)):0},Pe=()=>{const ae=y();return ae?Number((ae.props.height||0).toFixed(2)):0},pe=(ae,Ae,Be)=>{let At=0;ae==="x"?At=Ee():ae==="y"?At=Oe():ae==="width"?At=Te():ae==="height"&&(At=Pe());const it=Number(Ae)-Number(At);if(Math.abs(it)<.01){y().props[ae]="",y().props[ae]=Number(At);return}j(null,ae,it)};function $(ae){const Ae=document.activeElement.tagName.toLowerCase();if(Ae==="input"||Ae==="textarea"||!y())return;let At=!1,it=0,ze=0;ae.key==="ArrowLeft"?(it=-_u,At=!0):ae.key==="ArrowRight"?(it=_u,At=!0):ae.key==="ArrowUp"?(ze=-_u,At=!0):ae.key==="ArrowDown"&&(ze=_u,At=!0),At&&(it!==0&&j(null,"x",it),ze!==0&&j(null,"y",ze),ae.preventDefault())}const ut=({e:ae,comp:Ae,previewDiv:Be})=>{var At,it;(At=ae==null?void 0:ae.dataTransfer)==null||At.setData("comp",JSON.stringify(Ae)),document.body.appendChild(Be),(it=ae==null?void 0:ae.dataTransfer)==null||it.setDragImage(Be,0,0),setTimeout(()=>document.body.removeChild(Be),0)},Ke=async ae=>{var $t,sA,dr;ae.preventDefault();const Ae=JSON.parse(((sA=($t=ae==null?void 0:ae.dataTransfer)==null?void 0:$t.getData)==null?void 0:sA.call($t,"comp"))||"{}")||{},Be=(Ae==null?void 0:Ae.type)||"";if(!Be)return;const At=document.querySelector("#design").getBoundingClientRect(),it=(ae.clientX-At.left)/o.value,ze=(ae.clientY-At.top)/o.value,lt=De.value[Be]||{};let xe=fo(it),vt=fo(ze);const je=lt.width,we=lt.height;if(!lt.rotation||lt.rotation===0){const Yt=l.value-je,bA=u.value-we;xe=Math.max(0,Math.min(xe,Yt)),vt=Math.max(0,Math.min(vt,bA))}else xe=Math.max(0,xe),vt=Math.max(0,vt);const{propertyPanel:Bt,...Ye}=lt;let Ft={...Ye,x:Ce(xe),y:Ce(vt),width:Ce(je),height:Ce(we)};if((dr=De.value[Be])!=null&&dr.propertyPanel){const Yt=di(De.value[Be].propertyPanel)||{};if(Ft={...Ft,...Yt},Be==="line"&&Yt.LineWidth){const CA=parseFloat(Yt.LineWidth)*.3528;Ft.height=Ce(CA,3)}}const Ht=((Yt,bA)=>{const{width:CA,height:Zr,lockAspectRatio:nt}=Yt;let se=CA,Ve=Zr;const _e=l.value-2,Rt=u.value-2;let EA=!1;if(CA>_e&&(se=_e,EA=!0),Zr>Rt&&(Ve=Rt,EA=!0),nt&&EA){const lA=_e/CA,hA=Rt/Zr,Rr=Math.min(lA,hA);se=Ce(CA*Rr,2),Ve=Ce(Zr*Rr,2),se=Math.min(se,_e),Ve=Math.min(Ve,Rt)}return{width:se,height:Ve}})(Ft);if(Ft.width=Ht.width,Ft.height=Ht.height,Ht.width!==je||Ht.height!==we){const Yt=l.value-Ht.width,bA=u.value-Ht.height;xe=Math.max(0,Math.min(xe,Yt)),vt=Math.max(0,Math.min(vt,bA)),Ft.x=Ce(xe),Ft.y=Ce(vt)}const Wt={id:gA(),type:Be,props:Ft};if(Ft.rotation&&Ft.rotation!==0){const{x1:Yt,y1:bA}=yo(Wt),CA=checkAndAdjustBoundaries(Yt,bA,Ft.width,Ft.height,Ft.rotation,l.value,u.value);(CA.x1!==Yt||CA.y1!==bA)&&g0(Wt,CA.x1,CA.y1)}i.value.push(Wt),v(Wt)};function Se(ae){ae.target.id!=="design"&&(ae.target.closest("#design")||F())}function Re(ae){let Ae=null;try{Ae=He(ae.clientX,ae.clientY)}catch(ze){console.error("坐标检测出错:",ze)}if(Ae){v(Ae);return}let Be=ae.target,At=null;for(;Be&&Be!==document.querySelector("#design");){if(Be.classList&&(Be.classList.contains("canvas-item")||Be.classList.contains("resize-handle")||Be.classList.contains("delete-btn")||Be.classList.contains("rotate-handle")||Be.classList.contains("property-panel")||Be.tagName==="INPUT"||Be.tagName==="TEXTAREA"||Be.tagName==="BUTTON")){if(Be.classList.contains("resize-handle")||Be.classList.contains("delete-btn")||Be.classList.contains("rotate-handle"))return;if(Be.classList.contains("canvas-item")){const ze=Be.getAttribute("data-item-id");if(At=i.value.find(lt=>lt.id===ze),At){v(At);return}}if(Be.closest(".canvas-item")){const lt=Be.closest(".canvas-item").getAttribute("data-item-id"),xe=i.value.find(vt=>vt.id===lt);if(xe){v(xe);return}}if(Be.closest(".canvas-item")||Be.classList.contains("td-text-content")||Be.classList.contains("barcode-component")||Be.classList.contains("qr-code-component")||Be.classList.contains("image-component")||Be.classList.contains("rectangle-component")||Be.classList.contains("hor-line-component")){const ze=He(ae.clientX,ae.clientY);if(ze){v(ze);return}}break}Be=Be.parentElement}const it=document.querySelector("#design");if(it&&it.contains(ae.target)){const ze=it.getBoundingClientRect(),lt=o.value,xe=(ae.clientX-ze.left)/lt,vt=(ae.clientY-ze.top)/lt,je=fo(xe),we=fo(vt);for(let Bt=i.value.length-1;Bt>=0;Bt--){const Ye=i.value[Bt],Ft=parseFloat(Ye.props.x||0),Pt=parseFloat(Ye.props.y||0),Ht=parseFloat(Ye.props.width||0),Wt=parseFloat(Ye.props.height||0),$t=1;if(je>=Ft-$t&&je<=Ft+Ht+$t&&we>=Pt-$t&&we<=Pt+Wt+$t){v(Ye);return}}}F()}function He(ae,Ae){const Be=document.querySelector("#design");if(!Be)return null;const At=Be.getBoundingClientRect(),it=o.value,ze=(ae-At.left)/it,lt=(Ae-At.top)/it,xe=fo(ze),vt=fo(lt);for(let je=i.value.length-1;je>=0;je--){const we=i.value[je];if(ke(xe,vt,we)){if(we.type==="rectangle")for(let Ye=je-1;Ye>=0;Ye--){const Ft=i.value[Ye];if(ke(xe,vt,Ft))return Ft}return we}}for(let je=0;je<i.value.length;je++){const we=i.value[je];if(ke(xe,vt,we))return we}return null}function ke(ae,Ae,Be){const At=parseFloat(Be.props.x||0),it=parseFloat(Be.props.y||0),ze=parseFloat(Be.props.width||0),lt=parseFloat(Be.props.height||0),xe=parseFloat(Be.props.rotation||0),vt=AB(ae,Ae,At,it,ze,lt,xe);return vt||AB(ae,Ae,At-1,it-1,ze+2,lt+2,xe)}function We(ae){return ae.preventDefault(),!1}const qe=(ae,Ae)=>{if(ae.stopPropagation(),ae.target.classList.contains("resize-handle")||ae.target.classList.contains("rotate-handle")||ae.target.classList.contains("delete-btn"))return;const At=He(ae.clientX,ae.clientY)||Ae;v(At),f.nextTick(()=>{L(ae,At)})},ot=ae=>{if(h.clear(),w.clear(),i.value.find(Be=>Be.id===ae)&&(i.value=i.value.filter(Be=>Be.id!==ae)),C.value.some(Be=>Be.id===ae)){const Be=C.value.filter(At=>At.id!==ae);C.value=Be}f.nextTick(()=>{})},rt=ae=>{var Be;const Ae=document.activeElement.tagName.toLowerCase();Ae==="input"||Ae==="textarea"||(ae.key==="Delete"||ae.key==="Backspace")&&C.value.length>0&&ot((Be=y())==null?void 0:Be.id)},ft=ae=>{if(C.value.length>0){const Ae=C.value[C.value.length-1];Ae.props.rotation=ae,Y(Ae,ae)}},dt=()=>{setTimeout(()=>{const ae=document.querySelector(".center-container");if(!ae)return;const Ae=ae.getBoundingClientRect();ae.style.height=`calc(100vh - ${Ae==null?void 0:Ae.top}px)`,H()},200)};f.watch(()=>A.templateInfo,(ae,Ae)=>{ae&&Ae&&ae.id!==Ae.id?(r.value=ae||{},i.value=(ae==null?void 0:ae.items)||[]):ae&&!Ae?(r.value=ae||{},i.value=(ae==null?void 0:ae.items)||[]):ae&&(r.value=ae||{})},{deep:!0,immediate:!0});const{handleCopy:tt,handlePaste:pt}=_M(i,C,l,u,Y),De=f.ref({}),Mt=f.ref(!1),Et=async ae=>{try{Mt.value=!1,De.value=await rM(ae),Mt.value=!0}catch{De.value={},Mt.value=!0}};f.watch(()=>A.templateType,async ae=>{try{await Et(ae),F(),h.clear(),w.clear()}catch{}},{immediate:!0}),f.onMounted(async()=>{Mt.value||await Et(A.templateType),window.addEventListener("resize",dt),window.addEventListener("keydown",rt),window.addEventListener("keydown",tt),window.addEventListener("keydown",pt),window.addEventListener("keydown",$);const ae=document.querySelector(".canvas-wrapper");ae&&ae.addEventListener("contextmenu",We),dt(),_A()}),f.onBeforeUnmount(()=>{window.removeEventListener("resize",dt),window.removeEventListener("keydown",rt),window.removeEventListener("keydown",tt),window.removeEventListener("keydown",pt),window.removeEventListener("keydown",$);const ae=document.querySelector(".canvas-wrapper");ae&&ae.removeEventListener("contextmenu",We),h.clear(),w.clear()});function gA(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ae=>{const Ae=Math.random()*16|0;return(ae==="x"?Ae:Ae&3|8).toString(16)})}const Ut=ae=>{var Be;if(!De.value||!De.value[ae])return{};const Ae=De.value[ae]||{};return ae==="image"&&((Be=A.config)!=null&&Be.image)?{...Ae,image:{...Ae.image,...A.config.image}}:Ae},Tt=ae=>Ut(ae).allowRotation!==!1,AA=()=>OM(i,r.value),St=ae=>{r.value.graphData=ae||{},_A()},_A=()=>{var Ae;const ae=jM(r.value.graphData)||"";ae&&((Ae=document.querySelector("#design"))==null||Ae.appendChild(ae))},Dt=async ae=>{var Be;const Ae=JSON.parse(JSON.stringify(ae));for(const At of Ae)if(At.type==="image"&&((Be=At.props)!=null&&Be.ImageSrc)){const it=At.props.ImageSrc;typeof it=="object"&&it.fileSrc&&it.fileSrc}return Ae},oA=()=>new Promise(async(ae,Ae)=>{try{F();const Be=JSON.parse(JSON.stringify(i.value)),At=await Dt(Be),it=[...i.value];i.value=At;const ze=()=>{var vt;const lt=((vt=document.querySelector("#design"))==null?void 0:vt.querySelectorAll("img"))||[],xe=Array.from(lt).map(je=>je.complete?Promise.resolve():new Promise(we=>{je.onload=je.onerror=we}));return Promise.all(xe)};f.nextTick(async()=>{var je;await new Promise(we=>setTimeout(we,100)),await ze(),(((je=document.querySelector("#design"))==null?void 0:je.querySelectorAll("img"))||[]).forEach((we,Bt)=>{});const xe=document.querySelector("#design");if(!xe){Ae(new Error("找不到要转换的DOM元素"));return}const vt=o.value;ze().then(()=>{sy(xe,{scale:Math.max(window.devicePixelRatio*2,3),useCORS:!0,allowTaint:!0,backgroundColor:null,logging:!1,imageTimeout:15e3,onclone:we=>{const Bt=we.querySelector(".canvas-wrapper");if(Bt){const Ht=Bt.style.transform.replace(/scale\([^)]*\)/g,"").replace(/\s+/g," ").trim();Bt.style.transform=Ht||"none",Bt.style.opacity="1"}const Ye=we.querySelector("#design");if(Ye){const Pt=window.getComputedStyle(xe);for(let Ht=0;Ht<Pt.length;Ht++){const Wt=Pt[Ht];Ye.style[Wt]=Pt.getPropertyValue(Wt)}}we.querySelectorAll("img").forEach(Pt=>{Pt.style.imageRendering="high-quality",Pt.style.webkitImageRendering="high-quality",Pt.style.mozImageRendering="high-quality",Pt.style.objectFit="contain",Pt.style.objectPosition="center"})}}).then(we=>{i.value=it;const Bt=we.toDataURL("image/png");ae({data:AA(),image:Bt})}).catch(we=>{i.value=it,Ae(we)})}).catch(we=>{Ae(we)})})}catch(Be){Ae(Be)}}),Jt=()=>new Promise((ae,Ae)=>{i.value.forEach(At=>{if(At.type==="image"&&!At.props.ImageSrc)return Vs.warning("图片控件请选择图片!"),Ae("图片控件请选择图片!")}),ae(!0)});return e({getJson:()=>Jt().then(()=>AA()),clear:()=>{i.value=[],F()},snapshot:()=>Jt().then(()=>oA())}),(ae,Ae)=>{var xe,vt,je;const Be=f.resolveComponent("el-button"),At=f.resolveComponent("el-icon-info-filled"),it=f.resolveComponent("el-icon"),ze=f.resolveComponent("el-tooltip"),lt=f.resolveComponent("el-switch");return f.openBlock(),f.createElementBlock("div",gH,[f.createElementVNode("div",mH,[f.createVNode(uM,{onDragStart:ut,config:t.config,propsConfig:De.value},null,8,["config","propsConfig"])]),f.createElementVNode("div",vH,[a.value?(f.openBlock(),f.createElementBlock("div",BH,[...Ae[33]||(Ae[33]=[f.createElementVNode("div",{class:"loader-circle"},null,-1),f.createElementVNode("p",null,"设计画板加载中...",-1)])])):f.createCommentVNode("",!0),f.createElementVNode("div",{class:"center-toolbar",style:f.normalizeStyle(`background: ${t.config.designBackground||"rgba(0, 0, 0, .05)"}`)},[t.showGraphConfig?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createVNode(TM,{"graph-data":(xe=r.value)==null?void 0:xe.graphData,onSuccess:St},null,8,["graph-data"]),Ae[34]||(Ae[34]=f.createElementVNode("div",{style:{width:"30px"}},null,-1))],64)):f.createCommentVNode("",!0),f.createElementVNode("div",wH,[f.createElementVNode("button",{onClick:Ue,disabled:o.value<=.8},"-",8,yH),f.createElementVNode("span",null,f.toDisplayString(Math.round(o.value*100))+"%",1),f.createElementVNode("button",{onClick:ge,disabled:o.value>=4},"+",8,bH)])],4),f.createElementVNode("div",{class:"canvas-container",style:f.normalizeStyle(`--scale: ${Math.max(0,1/(o.value||1))};background: ${t.config.designBackground||"rgba(0, 0, 0, .05)"}`),onClick:Se},[f.createElementVNode("div",{class:"canvas-wrapper",style:f.normalizeStyle(`transform: scale(${o.value});opacity: ${n.value};`)},[l.value&&u.value?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",CH,[f.createVNode(eB,{direction:"horizontal",length:l.value},null,8,["length"])]),f.createElementVNode("div",EH,[f.createVNode(eB,{direction:"vertical",length:u.value},null,8,["length"])])],64)):f.createCommentVNode("",!0),f.createElementVNode("div",{id:"design",class:"canvas",style:f.normalizeStyle(`width: ${l.value}mm; height: ${u.value}mm;`),onDrop:Ke,onDragover:Ae[0]||(Ae[0]=f.withModifiers(()=>{},["prevent"])),onPointerdown:Re,onContextmenu:Ae[1]||(Ae[1]=f.withModifiers(()=>{},["prevent"]))},[f.unref(Q)&&f.unref(M)?(f.openBlock(),f.createElementBlock("div",UH,[f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(S(f.unref(M),"left"))},null,4),f.createElementVNode("div",{class:"drag-extend-line vertical",style:f.normalizeStyle(S(f.unref(M),"right"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(S(f.unref(M),"top"))},null,4),f.createElementVNode("div",{class:"drag-extend-line horizontal",style:f.normalizeStyle(S(f.unref(M),"bottom"))},null,4)])):f.createCommentVNode("",!0),f.unref(E)?(f.openBlock(),f.createElementBlock("div",FH,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(N).horizontal,(we,Bt)=>(f.openBlock(),f.createElementBlock("div",{key:`h-${Bt}`,class:f.normalizeClass(["alignment-guide horizontal",`guide-${we.type}`]),style:f.normalizeStyle({top:`${we.y}mm`,left:"0",right:"0"})},null,6))),128)),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(f.unref(N).vertical,(we,Bt)=>(f.openBlock(),f.createElementBlock("div",{key:`v-${Bt}`,class:f.normalizeClass(["alignment-guide vertical",`guide-${we.type}`]),style:f.normalizeStyle({left:`${we.x}mm`,top:"0",bottom:"0"})},null,6))),128))])):f.createCommentVNode("",!0),(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(i.value,we=>{var Bt;return f.openBlock(),f.createElementBlock("div",{key:we.id,class:f.normalizeClass(["canvas-item",ne(we)]),style:f.normalizeStyle(re(we)),"data-item-id":we.id,onMousedown:Ye=>qe(Ye,we)},[f.unref(y)()===we?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[we.props.lockAspectRatio?f.createCommentVNode("",!0):(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:0,class:"resize-handle top",style:f.normalizeStyle(ue(we,"top")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top"),["stop"])},null,44,SH)):f.createCommentVNode("",!0),we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle right",style:f.normalizeStyle(ue(we,"right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"right"),["stop"])},null,44,QH)):f.createCommentVNode("",!0),we.type!=="line"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle bottom",style:f.normalizeStyle(ue(we,"bottom")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom"),["stop"])},null,44,TH)):f.createCommentVNode("",!0),we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:f.normalizeClass(["resize-handle left",{"line-anchor":we.type==="line"}]),style:f.normalizeStyle(ue(we,"left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"left"),["stop"])},null,46,xH)):f.createCommentVNode("",!0),we.type==="line"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle right line-anchor",style:f.normalizeStyle(ue(we,"right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"right"),["stop"])},null,44,RH)):f.createCommentVNode("",!0)],64)),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:1,class:"resize-handle top-left",style:f.normalizeStyle(ue(we,"top-left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top-left"),["stop"])},null,44,IH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:2,class:"resize-handle top-right",style:f.normalizeStyle(ue(we,"top-right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"top-right"),["stop"])},null,44,VH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:3,class:"resize-handle bottom-right",style:f.normalizeStyle(ue(we,"bottom-right")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom-right"),["stop"])},null,44,MH)):f.createCommentVNode("",!0),we.type!=="line"&&we.type!=="verline"?(f.openBlock(),f.createElementBlock("div",{key:4,class:"resize-handle bottom-left",style:f.normalizeStyle(ue(we,"bottom-left")),onMousedown:f.withModifiers(Ye=>f.unref(V)(Ye,we,"bottom-left"),["stop"])},null,44,LH)):f.createCommentVNode("",!0)],64)):f.createCommentVNode("",!0),we.props&&Mt.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((Bt=Z(we.type))==null?void 0:Bt.component)||null),{key:`${we.id}-${we.type}`,modelValue:{...we.props,__selected:f.unref(y)()===we,options:A.options},propsConfig:De.value,"onUpdate:modelValue":Ye=>{const{__selected:Ft,options:Pt,...Ht}=Ye;Object.keys(Ht).forEach(Wt=>{Ht[Wt]!==void 0&&(we.props[Wt]=Ht[Wt])})}},null,8,["modelValue","propsConfig","onUpdate:modelValue"])):f.createCommentVNode("",!0)],46,NH)}),128))],36)],4)],4)]),f.createElementVNode("div",OH,[f.unref(C).length>0?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[f.createElementVNode("div",kH,[f.createElementVNode("div",HH,[f.createVNode(Be,{type:"danger",onClick:Ae[2]||(Ae[2]=we=>ot(f.unref(y)().id))},{default:f.withCtx(()=>[...Ae[35]||(Ae[35]=[f.createTextVNode("删除",-1)])]),_:1})]),f.createElementVNode("h3",DH,[Ae[36]||(Ae[36]=f.createTextVNode(" 属性设置 ",-1)),(vt=Ut(f.unref(y)().type))!=null&&vt.desc?(f.openBlock(),f.createBlock(ze,{key:0,placement:"bottom","show-arrow":!0,"raw-content":""},{content:f.withCtx(()=>[f.createElementVNode("p",{style:{"max-width":"400px",margin:"0","white-space":"pre-line"},innerHTML:Ut(f.unref(y)().type).desc},null,8,PH)]),default:f.withCtx(()=>[f.createVNode(it,{class:"help-icon"},{default:f.withCtx(()=>[f.createVNode(At)]),_:1})]),_:1})):f.createCommentVNode("",!0)])]),f.createElementVNode("div",WH,[f.createElementVNode("div",_H,[f.createElementVNode("label",null,f.toDisplayString(f.unref(y)().type==="line"?"起点横坐标:":"横坐标:"),1),f.createElementVNode("div",ZH,[f.createElementVNode("button",{onClick:Ae[3]||(Ae[3]=f.withModifiers(we=>f.unref(j)(we,"x",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Ee(),onInput:Ae[4]||(Ae[4]=we=>pe("x",we.target.value)),onClick:Ae[5]||(Ae[5]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[6]||(Ae[6]=f.withModifiers(()=>{},["stop"])),onWheel:Ae[7]||(Ae[7]=f.withModifiers(()=>{},["prevent"]))},null,40,jH),f.createElementVNode("button",{onClick:Ae[8]||(Ae[8]=f.withModifiers(we=>f.unref(j)(we,"x",.5),["stop"]))},"+")])]),f.createElementVNode("div",JH,[f.createElementVNode("label",null,f.toDisplayString(f.unref(y)().type==="line"?"起点纵坐标:":"纵坐标:"),1),f.createElementVNode("div",KH,[f.createElementVNode("button",{onClick:Ae[9]||(Ae[9]=f.withModifiers(we=>f.unref(j)(we,"y",-.5),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Oe(),onInput:Ae[10]||(Ae[10]=we=>pe("y",we.target.value)),onClick:Ae[11]||(Ae[11]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[12]||(Ae[12]=f.withModifiers(()=>{},["stop"])),onWheel:Ae[13]||(Ae[13]=f.withModifiers(()=>{},["prevent"]))},null,40,GH),f.createElementVNode("button",{onClick:Ae[14]||(Ae[14]=f.withModifiers(we=>f.unref(j)(we,"y",.5),["stop"]))},"+")])]),f.unref(y)().type!=="verline"?(f.openBlock(),f.createElementBlock("div",zH,[Ae[37]||(Ae[37]=f.createElementVNode("label",null,"宽度:",-1)),f.createElementVNode("div",YH,[f.createElementVNode("button",{onClick:Ae[15]||(Ae[15]=f.withModifiers(we=>f.unref(j)(we,"width",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Te(),onInput:Ae[16]||(Ae[16]=we=>pe("width",we.target.value)),onClick:Ae[17]||(Ae[17]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[18]||(Ae[18]=f.withModifiers(()=>{},["stop"])),onBlur:Ae[19]||(Ae[19]=we=>q("width",we.target.value)),onWheel:Ae[20]||(Ae[20]=f.withModifiers(()=>{},["prevent"]))},null,40,XH),f.createElementVNode("button",{onClick:Ae[21]||(Ae[21]=f.withModifiers(we=>f.unref(j)(we,"width",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(y)().type!=="line"?(f.openBlock(),f.createElementBlock("div",qH,[Ae[38]||(Ae[38]=f.createElementVNode("label",null,"高度:",-1)),f.createElementVNode("div",$H,[f.createElementVNode("button",{onClick:Ae[22]||(Ae[22]=f.withModifiers(we=>f.unref(j)(we,"height",-.5,1),["stop"]))},"-"),f.createElementVNode("input",{type:"number",value:Pe(),onInput:Ae[23]||(Ae[23]=we=>pe("height",we.target.value)),onClick:Ae[24]||(Ae[24]=f.withModifiers(()=>{},["stop"])),onMousedown:Ae[25]||(Ae[25]=f.withModifiers(()=>{},["stop"])),onBlur:Ae[26]||(Ae[26]=we=>q("height",we.target.value)),onWheel:Ae[27]||(Ae[27]=f.withModifiers(()=>{},["prevent"]))},null,40,eD),f.createElementVNode("button",{onClick:Ae[28]||(Ae[28]=f.withModifiers(we=>f.unref(j)(we,"height",.5,1),["stop"]))},"+")])])):f.createCommentVNode("",!0),Tt(f.unref(y)().type)?(f.openBlock(),f.createElementBlock("div",tD,[Ae[39]||(Ae[39]=f.createElementVNode("label",null,"旋转:",-1)),f.createElementVNode("div",AD,[f.createElementVNode("button",{onClick:Ae[29]||(Ae[29]=f.withModifiers(we=>f.unref(G)(-1),["stop"]))},"-"),f.createElementVNode("span",rD,f.toDisplayString(f.unref(y)().props.rotation)+"°",1),f.createElementVNode("button",{onClick:Ae[30]||(Ae[30]=f.withModifiers(we=>f.unref(G)(1),["stop"]))},"+")])])):f.createCommentVNode("",!0),f.unref(y)().type!=="line"?(f.openBlock(),f.createElementBlock("div",nD,[Ae[40]||(Ae[40]=f.createElementVNode("label",null,"锁定宽高比:",-1)),f.createElementVNode("div",aD,[f.createVNode(lt,{modelValue:f.unref(y)().props.lockAspectRatio,"onUpdate:modelValue":Ae[31]||(Ae[31]=we=>f.unref(y)().props.lockAspectRatio=we),"active-value":!0,"inactive-value":!1},null,8,["modelValue"])])])):f.createCommentVNode("",!0)]),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(((je=Z(f.unref(y)().type))==null?void 0:je.propertyPanel)||null),{modelValue:f.unref(y)().props,"onUpdate:modelValue":Ae[32]||(Ae[32]=we=>f.unref(y)().props=we),options:t.options,"props-config":Ut(f.unref(y)().type),onRotationChange:ft},null,40,["modelValue","options","props-config"]))],64)):f.createCommentVNode("",!0)])])}}},[["__scopeId","data-v-8c4767e5"]]),l$="",Vo=jA({__name:"index",props:{templateData:{type:Object,default:()=>({graphData:{},width:0,height:0,printWidth:0,printHeight:0,items:[]})},config:{type:Object,default:()=>({})}},setup(t){const e=f.getCurrentInstance(),A=t,r=f.ref(!1),n=f.ref({}),a=f.ref(),i=f.ref(0),o=f.ref(!1),s=(C,v)=>{let y;return function(...Q){const M=()=>{clearTimeout(y),C(...Q)};clearTimeout(y),y=setTimeout(M,v)}},l=f.ref({rectTop:0,isInModal:!1}),u=()=>{if(!a.value)return;const C=a.value.getBoundingClientRect(),v=g(a.value);let y=0;if(C.top>0)y=C.top;else if(v){const F=h(a.value);y=F>0?F:60}else{const F=a.value.offsetTop;F>0?y=F:y=60}(y!==l.value.rectTop||v!==l.value.isInModal)&&(i.value=y,o.value=v,l.value={rectTop:y,isInModal:v})},d=s(u,100),g=C=>{let v=C.parentElement;for(;v;){if(v.classList&&(v.classList.contains("el-dialog")||v.classList.contains("el-drawer")||v.classList.contains("sc-dialog")))return!0;v=v.parentElement}return!1},h=C=>{let v=C.parentElement;for(;v;){if(v.classList&&(v.classList.contains("el-dialog")||v.classList.contains("el-drawer")||v.classList.contains("sc-dialog"))){const y=v.getBoundingClientRect();return y.top>0?y.top:60}v=v.parentElement}return 60};f.onMounted(()=>{setTimeout(()=>u(),100),setTimeout(()=>u(),300),window.addEventListener("resize",d),f.onBeforeUnmount(()=>{window.removeEventListener("resize",d)})}),f.watch(()=>r.value,C=>{C&&f.nextTick(()=>setTimeout(()=>u(),50))}),f.watch(()=>A.templateData,C=>w(C),{deep:!0,immediate:!0});function w(C){if(r.value=(C==null?void 0:C.width)>0&&(C==null?void 0:C.height)>0,!r.value)return;const v={...C};v.printWidth||Object.assign(v,{printWidth:v.width}),v.printHeight||Object.assign(v,{printHeight:v.height}),v!=null&&v.graphData||Object.assign(v,{graphData:{printList:[{x:0,y:0,width:C.printWidth,height:C.printHeight,topLeftRadius:4,topRightRadius:4,bottomLeftRadius:4,bottomRightRadius:4}],punchingList:[]}}),v!=null&&v.items||Object.assign(v,{items:[]}),n.value=v}function B(C){e.exposed=C||{},e.exposeProxy=C||{}}return(C,v)=>{const y=f.resolveDirective("loading");return f.withDirectives((f.openBlock(),f.createElementBlock("div",{ref_key:"templateDesignerRef",ref:a,class:f.normalizeClass(["template-designer",{"template-designer-border-top":o.value}]),style:f.normalizeStyle({height:"calc(100vh - "+(i.value+1)+"px)"})},[r.value?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.h(iD,{...C.$attrs,...A,ref:B},C.$slots)),{key:0,"template-info":n.value},null,8,["template-info"])):f.createCommentVNode("",!0)],6)),[[y,!r.value]])}}},[["__scopeId","data-v-a3d9b11f"]]);function kt(t){"@babel/helpers - typeof";return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(t)}var sr=Uint8Array,Wr=Uint16Array,dp=Int32Array,Zu=new sr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ju=new sr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),pp=new sr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cy=function(t,e){for(var A=new Wr(31),r=0;r<31;++r)A[r]=e+=1<<t[r-1];for(var n=new dp(A[30]),r=1;r<30;++r)for(var a=A[r];a<A[r+1];++a)n[a]=a-A[r]<<5|r;return{b:A,r:n}},uy=cy(Zu,2),fy=uy.b,gp=uy.r;fy[28]=258,gp[258]=28;for(var hy=cy(ju,0),oD=hy.b,dy=hy.r,mp=new Wr(32768),iA=0;iA<32768;++iA){var Ra=(iA&43690)>>1|(iA&21845)<<1;Ra=(Ra&52428)>>2|(Ra&13107)<<2,Ra=(Ra&61680)>>4|(Ra&3855)<<4,mp[iA]=((Ra&65280)>>8|(Ra&255)<<8)>>1}for(var kn=function(t,e,A){for(var r=t.length,n=0,a=new Wr(e);n<r;++n)t[n]&&++a[t[n]-1];var i=new Wr(e);for(n=1;n<e;++n)i[n]=i[n-1]+a[n-1]<<1;var o;if(A){o=new Wr(1<<e);var s=15-e;for(n=0;n<r;++n)if(t[n])for(var l=n<<4|t[n],u=e-t[n],d=i[t[n]-1]++<<u,g=d|(1<<u)-1;d<=g;++d)o[mp[d]>>s]=l}else for(o=new Wr(r),n=0;n<r;++n)t[n]&&(o[n]=mp[i[t[n]-1]++]>>15-t[n]);return o},Ia=new sr(288),iA=0;iA<144;++iA)Ia[iA]=8;for(var iA=144;iA<256;++iA)Ia[iA]=9;for(var iA=256;iA<280;++iA)Ia[iA]=7;for(var iA=280;iA<288;++iA)Ia[iA]=8;for(var gl=new sr(32),iA=0;iA<32;++iA)gl[iA]=5;var sD=kn(Ia,9,0),lD=kn(Ia,9,1),cD=kn(gl,5,0),uD=kn(gl,5,1),vp=function(t){for(var e=t[0],A=1;A<t.length;++A)t[A]>e&&(e=t[A]);return e},pn=function(t,e,A){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&A},Bp=function(t,e){var A=e/8|0;return(t[A]|t[A+1]<<8|t[A+2]<<16)>>(e&7)},wp=function(t){return(t+7)/8|0},py=function(t,e,A){return(e==null||e<0)&&(e=0),(A==null||A>t.length)&&(A=t.length),new sr(t.subarray(e,A))},fD=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],gn=function(t,e,A){var r=new Error(e||fD[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,gn),!A)throw r;return r},hD=function(t,e,A,r){var n=t.length,a=r?r.length:0;if(!n||e.f&&!e.l)return A||new sr(0);var i=!A,o=i||e.i!=2,s=e.i;i&&(A=new sr(n*3));var l=function(Ee){var Oe=A.length;if(Ee>Oe){var Te=new sr(Math.max(Oe*2,Ee));Te.set(A),A=Te}},u=e.f||0,d=e.p||0,g=e.b||0,h=e.l,w=e.d,B=e.m,C=e.n,v=n*8;do{if(!h){u=pn(t,d,1);var y=pn(t,d+1,3);if(d+=3,y)if(y==1)h=lD,w=uD,B=9,C=5;else if(y==2){var L=pn(t,d,31)+257,V=pn(t,d+10,15)+4,k=L+pn(t,d+5,31)+1;d+=14;for(var W=new sr(k),T=new sr(19),N=0;N<V;++N)T[pp[N]]=pn(t,d+N*3,7);d+=V*3;for(var E=vp(T),x=(1<<E)-1,O=kn(T,E,1),N=0;N<k;){var j=O[pn(t,d,x)];d+=j&15;var F=j>>4;if(F<16)W[N++]=F;else{var G=0,Y=0;for(F==16?(Y=3+pn(t,d,3),d+=2,G=W[N-1]):F==17?(Y=3+pn(t,d,7),d+=3):F==18&&(Y=11+pn(t,d,127),d+=7);Y--;)W[N++]=G}}var K=W.subarray(0,L),q=W.subarray(L);B=vp(K),C=vp(q),h=kn(K,B,1),w=kn(q,C,1)}else gn(1);else{var F=wp(d)+4,Q=t[F-4]|t[F-3]<<8,M=F+Q;if(M>n){s&&gn(0);break}o&&l(g+Q),A.set(t.subarray(F,M),g),e.b=g+=Q,e.p=d=M*8,e.f=u;continue}if(d>v){s&&gn(0);break}}o&&l(g+131072);for(var ee=(1<<B)-1,ie=(1<<C)-1,S=d;;S=d){var G=h[Bp(t,d)&ee],H=G>>4;if(d+=G&15,d>v){s&&gn(0);break}if(G||gn(2),H<256)A[g++]=H;else if(H==256){S=d,h=null;break}else{var z=H-254;if(H>264){var N=H-257,Z=Zu[N];z=pn(t,d,(1<<Z)-1)+fy[N],d+=Z}var re=w[Bp(t,d)&ie],ne=re>>4;re||gn(3),d+=re&15;var q=oD[ne];if(ne>3){var Z=ju[ne];q+=Bp(t,d)&(1<<Z)-1,d+=Z}if(d>v){s&&gn(0);break}o&&l(g+131072);var ue=g+z;if(g<q){var ge=a-q,Ue=Math.min(q,ue);for(ge+g<0&&gn(3);g<Ue;++g)A[g]=r[ge+g]}for(;g<ue;++g)A[g]=A[g-q]}}e.l=h,e.p=S,e.b=g,e.f=u,h&&(u=1,e.m=B,e.d=w,e.n=C)}while(!u);return g!=A.length&&i?py(A,0,g):A.subarray(0,g)},$n=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8},ml=function(t,e,A){A<<=e&7;var r=e/8|0;t[r]|=A,t[r+1]|=A>>8,t[r+2]|=A>>16},yp=function(t,e){for(var A=[],r=0;r<t.length;++r)t[r]&&A.push({s:r,f:t[r]});var n=A.length,a=A.slice();if(!n)return{t:By,l:0};if(n==1){var i=new sr(A[0].s+1);return i[A[0].s]=1,{t:i,l:1}}A.sort(function(M,L){return M.f-L.f}),A.push({s:-1,f:25001});var o=A[0],s=A[1],l=0,u=1,d=2;for(A[0]={s:-1,f:o.f+s.f,l:o,r:s};u!=n-1;)o=A[A[l].f<A[d].f?l++:d++],s=A[l!=u&&A[l].f<A[d].f?l++:d++],A[u++]={s:-1,f:o.f+s.f,l:o,r:s};for(var g=a[0].s,r=1;r<n;++r)a[r].s>g&&(g=a[r].s);var h=new Wr(g+1),w=bp(A[u-1],h,0);if(w>e){var r=0,B=0,C=w-e,v=1<<C;for(a.sort(function(L,V){return h[V.s]-h[L.s]||L.f-V.f});r<n;++r){var y=a[r].s;if(h[y]>e)B+=v-(1<<w-h[y]),h[y]=e;else break}for(B>>=C;B>0;){var F=a[r].s;h[F]<e?B-=1<<e-h[F]++-1:++r}for(;r>=0&&B;--r){var Q=a[r].s;h[Q]==e&&(--h[Q],++B)}w=e}return{t:new sr(h),l:w}},bp=function(t,e,A){return t.s==-1?Math.max(bp(t.l,e,A+1),bp(t.r,e,A+1)):e[t.s]=A},gy=function(t){for(var e=t.length;e&&!t[--e];);for(var A=new Wr(++e),r=0,n=t[0],a=1,i=function(s){A[r++]=s},o=1;o<=e;++o)if(t[o]==n&&o!=e)++a;else{if(!n&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(n),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(n);a=1,n=t[o]}return{c:A.subarray(0,r),n:e}},vl=function(t,e){for(var A=0,r=0;r<e.length;++r)A+=t[r]*e[r];return A},my=function(t,e,A){var r=A.length,n=wp(e+2);t[n]=r&255,t[n+1]=r>>8,t[n+2]=t[n]^255,t[n+3]=t[n+1]^255;for(var a=0;a<r;++a)t[n+a+4]=A[a];return(n+4+r)*8},vy=function(t,e,A,r,n,a,i,o,s,l,u){$n(e,u++,A),++n[256];for(var d=yp(n,15),g=d.t,h=d.l,w=yp(a,15),B=w.t,C=w.l,v=gy(g),y=v.c,F=v.n,Q=gy(B),M=Q.c,L=Q.n,V=new Wr(19),k=0;k<y.length;++k)++V[y[k]&31];for(var k=0;k<M.length;++k)++V[M[k]&31];for(var W=yp(V,7),T=W.t,N=W.l,E=19;E>4&&!T[pp[E-1]];--E);var x=l+5<<3,O=vl(n,Ia)+vl(a,gl)+i,j=vl(n,g)+vl(a,B)+i+14+3*E+vl(V,T)+2*V[16]+3*V[17]+7*V[18];if(s>=0&&x<=O&&x<=j)return my(e,u,t.subarray(s,s+l));var G,Y,K,q;if($n(e,u,1+(j<O)),u+=2,j<O){G=kn(g,h,0),Y=g,K=kn(B,C,0),q=B;var ee=kn(T,N,0);$n(e,u,F-257),$n(e,u+5,L-1),$n(e,u+10,E-4),u+=14;for(var k=0;k<E;++k)$n(e,u+3*k,T[pp[k]]);u+=3*E;for(var ie=[y,M],S=0;S<2;++S)for(var H=ie[S],k=0;k<H.length;++k){var z=H[k]&31;$n(e,u,ee[z]),u+=T[z],z>15&&($n(e,u,H[k]>>5&127),u+=H[k]>>12)}}else G=sD,Y=Ia,K=cD,q=gl;for(var k=0;k<o;++k){var Z=r[k];if(Z>255){var z=Z>>18&31;ml(e,u,G[z+257]),u+=Y[z+257],z>7&&($n(e,u,Z>>23&31),u+=Zu[z]);var re=Z&31;ml(e,u,K[re]),u+=q[re],re>3&&(ml(e,u,Z>>5&8191),u+=ju[re])}else ml(e,u,G[Z]),u+=Y[Z]}return ml(e,u,G[256]),u+Y[256]},dD=new dp([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),By=new sr(0),pD=function(t,e,A,r,n,a){var i=a.z||t.length,o=new sr(r+i+5*(1+Math.ceil(i/7e3))+n),s=o.subarray(r,o.length-n),l=a.l,u=(a.r||0)&7;if(e){u&&(s[0]=a.r>>3);for(var d=dD[e-1],g=d>>13,h=d&8191,w=(1<<A)-1,B=a.p||new Wr(32768),C=a.h||new Wr(w+1),v=Math.ceil(A/3),y=2*v,F=function(Pe){return(t[Pe]^t[Pe+1]<<v^t[Pe+2]<<y)&w},Q=new dp(25e3),M=new Wr(288),L=new Wr(32),V=0,k=0,W=a.i||0,T=0,N=a.w||0,E=0;W+2<i;++W){var x=F(W),O=W&32767,j=C[x];if(B[O]=j,C[x]=O,N<=W){var G=i-W;if((V>7e3||T>24576)&&(G>423||!l)){u=vy(t,s,0,Q,M,L,k,T,E,W-E,u),T=V=k=0,E=W;for(var Y=0;Y<286;++Y)M[Y]=0;for(var Y=0;Y<30;++Y)L[Y]=0}var K=2,q=0,ee=h,ie=O-j&32767;if(G>2&&x==F(W-ie))for(var S=Math.min(g,G)-1,H=Math.min(32767,W),z=Math.min(258,G);ie<=H&&--ee&&O!=j;){if(t[W+K]==t[W+K-ie]){for(var Z=0;Z<z&&t[W+Z]==t[W+Z-ie];++Z);if(Z>K){if(K=Z,q=ie,Z>S)break;for(var re=Math.min(ie,Z-2),ne=0,Y=0;Y<re;++Y){var ue=W-ie+Y&32767,ge=B[ue],Ue=ue-ge&32767;Ue>ne&&(ne=Ue,j=ue)}}}O=j,j=B[O],ie+=O-j&32767}if(q){Q[T++]=268435456|gp[K]<<18|dy[q];var Ee=gp[K]&31,Oe=dy[q]&31;k+=Zu[Ee]+ju[Oe],++M[257+Ee],++L[Oe],N=W+K,++V}else Q[T++]=t[W],++M[t[W]]}}for(W=Math.max(W,N);W<i;++W)Q[T++]=t[W],++M[t[W]];u=vy(t,s,l,Q,M,L,k,T,E,W-E,u),l||(a.r=u&7|s[u/8|0]<<3,u-=7,a.h=C,a.p=B,a.i=W,a.w=N)}else{for(var W=a.w||0;W<i+l;W+=65535){var Te=W+65535;Te>=i&&(s[u/8|0]=l,Te=i),u=my(s,u+1,t.subarray(W,Te))}a.i=i}return py(o,0,r+wp(u)+n)},wy=function(){var t=1,e=0;return{p:function(A){for(var r=t,n=e,a=A.length|0,i=0;i!=a;){for(var o=Math.min(i+2655,a);i<o;++i)n+=r+=A[i];r=(r&65535)+15*(r>>16),n=(n&65535)+15*(n>>16)}t=r,e=n},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},gD=function(t,e,A,r,n){if(!n&&(n={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),i=new sr(a.length+t.length);i.set(a),i.set(t,a.length),t=i,n.w=a.length}return pD(t,e.level==null?6:e.level,e.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,A,r,n)},yy=function(t,e,A){for(;A;++e)t[e]=A,A>>>=8},mD=function(t,e){var A=e.level,r=A==0?0:A<6?1:A==9?3:2;if(t[0]=120,t[1]=r<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var n=wy();n.p(e.dictionary),yy(t,2,n.d())}},vD=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&gn(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&gn(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function Cp(t,e){e||(e={});var A=wy();A.p(t);var r=gD(t,e,e.dictionary?6:2,4);return mD(r,e),yy(r,r.length-4,A.d()),r}function BD(t,e){return hD(t.subarray(vD(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}var wD=typeof TextDecoder<"u"&&new TextDecoder,yD=0;try{wD.decode(By,{stream:!0}),yD=1}catch{}/** @license
|
|
60
60
|
*
|
|
61
61
|
* jsPDF - PDF Document creation from JavaScript
|
|
62
62
|
* Version 2.5.2 Built on 2024-09-17T13:29:57.859Z
|
|
@@ -311,7 +311,7 @@ end`};e.events.push(["putFont",function(a){(function(i){var o=i.font,s=i.out,l=i
|
|
|
311
311
|
`,r!==1){const F=document.createElement("div");for(F.style.cssText=`
|
|
312
312
|
width: ${s}mm; height: ${l}mm; position: relative;
|
|
313
313
|
transform: scale(${r}); transform-origin: top left;
|
|
314
|
-
`;C.firstChild;)F.appendChild(C.firstChild);C.appendChild(F)}return C.outerHTML}finally{if(!(i&&window[w])){try{h&&h.unmount&&h.unmount()}catch{}g&&g.parentNode&&g.parentNode.removeChild(g)}}}function wl(t,e=96){return Math.round(t*e/25.4)}async function qy(t,e={}){if(!t||typeof t!="string")throw new Error("文本内容不能为空且必须是字符串");const r={...{width:50,height:50,QRCodeForeground:"#000000",QRCodeBackground:"#ffffff",QRCodeErrorLevel:"M",margin:0,format:"png",quality:.9,returnDataUrl:!0,dpi:96},...e};if(r.width<=0||r.height<=0)throw new Error("宽度和高度必须大于0");const n=wl(r.width,r.dpi),a=wl(r.height,r.dpi),i=wl(r.margin,r.dpi);if(!["L","M","Q","H"].includes(r.QRCodeErrorLevel))throw new Error("错误纠正级别必须是 L、M、Q、H 之一");if(!["png","jpeg","svg"].includes(r.format))throw new Error("输出格式必须是 png、jpeg、svg 之一");if(r.quality<0||r.quality>1)throw new Error("图片质量必须在0-1之间");try{const o={L:"low",M:"medium",Q:"quartile",H:"high"},s={width:n,margin:i,color:{dark:r.QRCodeForeground,light:r.QRCodeBackground},errorCorrectionLevel:o[r.QRCodeErrorLevel]};let l;if(r.format==="svg"){l=await wa.toString(t,{...s,type:"svg"});const u=new DOMParser().parseFromString(l,"image/svg+xml").documentElement;u.setAttribute("width",n),u.setAttribute("height",a),u.setAttribute("viewBox",`0 0 ${n} ${a}`),u.setAttribute("preserveAspectRatio","none");const d=new XMLSerializer().serializeToString(u),g=btoa(decodeURIComponent(encodeURIComponent(d)));return r.returnDataUrl?`data:image/svg+xml;base64,${g}`:g}else{const u=r.format==="jpeg"?"image/jpeg":"image/png";if(l=await wa.toDataURL(t,{...s,type:u,quality:r.format==="jpeg"?r.quality:void 0}),r.returnDataUrl)return l;{const d=l.indexOf(",");return d!==-1?l.substring(d+1):l}}}catch(o){throw new Error(`二维码生成失败: ${o.message}`)}}async function hP(t,e={}){if(!Array.isArray(t))throw new Error("文本参数必须是数组");if(t.length===0)return[];const A=t.map(r=>qy(r,e));try{return await Promise.all(A)}catch(r){throw new Error(`批量生成二维码失败: ${r.message}`)}}async function dP(t,e={}){if(!t||typeof t!="string")throw new Error("文本内容不能为空且必须是字符串");const r={...{width:50,QRCodeForeground:"#000000",QRCodeBackground:"#ffffff",QRCodeErrorLevel:"M",margin:0,dpi:96},...e},n=wl(r.width,r.dpi),a=wl(r.margin,r.dpi);try{const i={L:"low",M:"medium",Q:"quartile",H:"high"};return await wa.toCanvas(t,{width:n,margin:a,color:{dark:r.QRCodeForeground,light:r.QRCodeBackground},errorCorrectionLevel:i[r.QRCodeErrorLevel]})}catch(i){throw new Error(`二维码Canvas生成失败: ${i.message}`)}}function Oa(t,e=96){return Math.round(t*e/25.4)}function $y(t,e,A){const r=e/96,n=Math.max(1,Math.round(r*1.5)),i={CODE128:1,CODE39:1,EAN13:1,EAN8:1,UPC:1,ITF14:2,MSI:1,pharmacode:1,codabar:1}[A]||1,o=Math.max(i,n);return o%2===0?o+1:o}async function e5(t,e={}){if(!t||typeof t!="string")throw new Error("文本内容不能为空且必须是字符串");const r={...{CodeType:"CODE128",width:50,height:15,LineColor:"#000000",background:"#ffffff",displayValue:!1,textAlign:"center",textPosition:"bottom",textMargin:2,font:"monospace",fontSize:5,outputFormat:"png",quality:.95,returnDataUrl:!0,dpi:300},...e};if(["CODE128","CODE39","EAN13","EAN8","UPC","ITF14","MSI","pharmacode","codabar"].includes(r.CodeType)||(r.CodeType="CODE128"),r.width<=0||r.height<=0)throw new Error("宽度和高度必须大于0");const a=Oa(r.width,r.dpi),i=Oa(r.height,r.dpi),o=Oa(r.textMargin,r.dpi),s=Oa(r.fontSize,r.dpi);if(!["png","jpeg","svg"].includes(r.outputFormat))throw new Error("输出格式必须是 png、jpeg、svg 之一");if(r.quality<0||r.quality>1)throw new Error("图片质量必须在0-1之间");try{const l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("width",a),l.setAttribute("height",i),l.setAttribute("viewBox",`0 0 ${a} ${i}`),r.outputFormat==="png"?(l.setAttribute("shape-rendering","crispEdges"),l.setAttribute("text-rendering","optimizeLegibility")):(l.setAttribute("shape-rendering","geometricPrecision"),l.setAttribute("text-rendering","geometricPrecision")),l.setAttribute("image-rendering","optimizeQuality");const u=$y(a,r.dpi,r.CodeType);if(qd(l,t,{format:r.CodeType,width:u,height:i-(r.displayValue?s+o:0),displayValue:r.displayValue,textAlign:r.textAlign,textPosition:r.textPosition,textMargin:o,font:r.font,fontSize:s,lineColor:r.LineColor,background:r.background,margin:0}),r.outputFormat==="svg"){const d=new XMLSerializer().serializeToString(l);return r.returnDataUrl?`data:image/svg+xml;base64,${btoa(decodeURIComponent(encodeURIComponent(d)))}`:d}else{const d=await pP(l,a,i,r.dpi),g=r.outputFormat==="jpeg"?"image/jpeg":"image/png",h=d.toDataURL(g,r.outputFormat==="jpeg"?r.quality:void 0);if(r.returnDataUrl)return h;{const w=h.indexOf(",");return w!==-1?h.substring(w+1):h}}}catch(l){throw new Error(`条形码生成失败: ${l.message}`)}}async function pP(t,e,A,r=300){return new Promise((n,a)=>{const i=Math.max(3,Math.round(r/96)),o=document.createElement("canvas"),s=o.getContext("2d",{willReadFrequently:!1,desynchronized:!1}),l=e*i,u=A*i;o.width=l,o.height=u,o.style.width=e+"px",o.style.height=A+"px",s.save(),s.scale(i,i),s.imageSmoothingEnabled=!1,s.textBaseline="top",s.textAlign="left";const d=new Image,g=new XMLSerializer().serializeToString(t),h=new Blob([g],{type:"image/svg+xml;charset=utf-8"}),w=URL.createObjectURL(h);d.onload=()=>{try{s.clearRect(0,0,e,A),s.drawImage(d,0,0,e,A),s.restore(),URL.revokeObjectURL(w),n(o)}catch(B){s.restore(),URL.revokeObjectURL(w),a(B)}},d.onerror=B=>{s.restore(),URL.revokeObjectURL(w),a(new Error("SVG转换为Canvas失败: "+(B.message||"未知错误")))},d.src=w})}async function gP(t,e={}){if(!Array.isArray(t))throw new Error("文本参数必须是数组");if(t.length===0)return[];const A=t.map(r=>e5(r,e));try{return await Promise.all(A)}catch(r){throw new Error(`批量生成条形码失败: ${r.message}`)}}function mP(t,e={}){if(!t||typeof t!="string")throw new Error("文本内容不能为空且必须是字符串");const r={...{CodeType:"CODE128",width:50,height:15,LineColor:"#000000",background:"#ffffff",displayValue:!1,textAlign:"center",textPosition:"bottom",textMargin:2,font:"monospace",fontSize:5,dpi:300},...e},n=Oa(r.width,r.dpi),a=Oa(r.height,r.dpi),i=Oa(r.textMargin,r.dpi),o=Oa(r.fontSize,r.dpi);try{const s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("width",n),s.setAttribute("height",a),s.setAttribute("viewBox",`0 0 ${n} ${a}`),s.setAttribute("shape-rendering","geometricPrecision"),s.setAttribute("text-rendering","geometricPrecision"),s.setAttribute("image-rendering","optimizeQuality");const l=$y(n,r.dpi,r.CodeType);return qd(s,t,{format:r.CodeType,width:l,height:a-(r.displayValue?o+i:0),displayValue:r.displayValue,textAlign:r.textAlign,textPosition:r.textPosition,textMargin:i,font:r.font,fontSize:o,lineColor:r.LineColor,background:r.background,margin:0}),new XMLSerializer().serializeToString(s)}catch(s){throw new Error(`条形码SVG生成失败: ${s.message}`)}}Vo.install=t=>{t.component(Vo.name||"TemplateDesigner",Vo)};const t5=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{width:20,height:2.8,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"Title",label:"标题",default:"",layout:"full",desc:"用于文本开头固定文案的打印,不需要则不填。示例:如果填写“价格:”,则打印时内容为“价格:【字段对应值】”"},{prop:"FieldName",label:"字段名称",type:"select",multiple:!0,optionsKey:"fields",default:"",layout:"full"},{prop:"FieldConnector",label:"字段连接符",type:"text",default:"",layout:"half",desc:"当选择多个字段时,用于连接字段之间的分隔符,如:-、|、空格等"},{prop:"EndMark",label:"结束符",default:"",layout:"half",desc:'用于文本结尾固定文案的打印,不需要则不填。示例:如果填写"元",则打印时内容为"【字段对应值】元"'},{prop:"Text",label:"测试数据(展示使用,无实际意义)",default:"测试文本",layout:"full"},{prop:"TemplateDisplay",label:"模板显示",type:"select",options:[{label:"测试数据",value:"text"},{label:"字段名称",value:"fieldName"}],default:"text",layout:"half",desc:"控制模板中显示的内容:字段名称显示字段名,测试数据显示测试值,仅用于模板展示,不会影响实际打印"},{prop:"FontName",label:"字体名称",type:"select",desc:"注意:选择的字体需要计算机中安装有对应字体才有效",options:[{label:"黑体",value:"黑体",cssValue:"SimHei"},{label:"楷体",value:"楷体",cssValue:"KaiTi"},{label:"宋体",value:"宋体",cssValue:"SimSun"},{label:"隶书",value:"隶书",cssValue:"LiSu"},{label:"缅语Arial",value:"Arial",cssValue:"Arial"},{label:"缅语Segoe UI",value:"Segoe UI",cssValue:"Segoe UI"}],default:"黑体",layout:"half"},{prop:"FontSize",label:"字体大小",type:"number",min:1,max:100,default:8,layout:"half"},{prop:"FontColor",label:"字体颜色",type:"color",hide:!0,default:"#000000",layout:"half"},{prop:"Bold",label:"字体加粗",type:"select",options:[{label:"加粗",value:1},{label:"不加粗",value:0}],default:0,layout:"half"},{prop:"Italic",label:"是否斜体",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,layout:"half"},{prop:"Underline",label:"下划线",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,hide:!0},{prop:"Alignment",label:"对齐方式",type:"select",options:[{label:"居左",value:1},{label:"居中",value:2},{label:"居右",value:3}],default:2},{prop:"TextWrap",label:"文本换行",type:"select",desc:"可预知的内容尽量不换行,避免因为换行导致打印效果不佳",options:[{label:"换行",value:1},{label:"不换行",value:2}],default:2},{prop:"HOrient",label:"水平锁定",type:"select",options:[{label:"无",value:0},{label:"左边距锁定",value:1},{label:"右边距锁定",value:2},{label:"水平居中",value:3}],hide:!0,default:0},{prop:"VOrient",label:"垂直锁定",type:"select",options:[{label:"无",value:0},{label:"上边距锁定",value:1},{label:"下边距锁定",value:2},{label:"垂直居中",value:3}],hide:!0,default:0},{prop:"PenWidth",label:"线宽",type:"number",min:0,hide:!0,default:0},{prop:"PenStyle",label:"线型",type:"select",hide:!0,options:[{label:"实线",value:0},{label:"破折线",value:1},{label:"点线",value:2},{label:"点划线",value:3},{label:"双点划线",value:4}],default:0},{prop:"Stretch",label:"缩放模式",type:"select",options:[{label:"扩展",value:1},{label:"缩放",value:2}],hide:!0,default:1},{prop:"PreviewOnly",label:"仅预览",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"ReadOnly",label:"只读",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]},barcode:{width:20,height:6,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"注:<br/>1、条码宽度需要根据实际打印数据的长短来适当设置;如果打印数据较长,条码宽度较短,条码打印出来会识别困难或无法识别。<br/>2、如果标签尺寸较小,就需要控制打印数据的长度,确保在有限的宽度打印出来能够正常识别。",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"BarcodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"1234567890"},{prop:"CodeType",label:"条码类型",type:"select",options:[{label:"CODE128",value:"128Auto",compValue:"CODE128"},{label:"CODE39",value:"Code39",compValue:"CODE39"},{label:"EAN13",value:"EAN13",compValue:"EAN13"}],hide:!0,default:"128Auto"},{prop:"AlignJustify",label:"对齐方式",type:"select",options:[{label:"两端对齐",value:0},{label:"左",value:1},{label:"中",value:2},{label:"右",value:3}],hide:!0,default:0},{prop:"LineColor",label:"条形码颜色",type:"color",hide:!0,default:"#000000"},{prop:"rotation",label:"旋转角度",type:"select",options:[{label:"0°",value:0},{label:"90°",value:90}],default:0,layout:"half"}]},qrcode:{width:10,height:10,rotation:0,lockAspectRatio:!0,allowRotation:!1,desc:"",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"QRCodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"FB-1234567890"},{prop:"QRCodeVersion",label:"二维码版本",type:"number",min:1,max:40,hide:!0,default:7},{prop:"QRCodeErrorLevel",label:"纠错级别",type:"select",options:[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}],hide:!0,default:"H"},{prop:"QRCodeEncodeMode",label:"编码模式",type:"select",options:[{label:"数字",value:"N"},{label:"二进制或汉语",value:"B"},{label:"英文字母",value:"A"}],hide:!0,default:"B"},{prop:"QRCodeForeground",label:"前景色",type:"color",hide:!0,default:"#000000"},{prop:"QRCodeBackground",label:"背景景色",type:"color",hide:!0,default:"transparent"}]},image:{width:12,height:12,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"ImageSrc",label:"图片地址",type:"file",accept:"image/*",default:""},{prop:"ScaleMode",label:"图片缩放",type:"select",options:[{label:"原始尺寸",value:1},{label:"居中裁剪",value:2},{label:"填充",value:3}],default:1},{prop:"IsPrint",label:"是否打印",type:"select",options:[{label:"是",value:!0},{label:"否",value:!1}],default:!0},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]},rectangle:{width:15,height:10,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.5",options:[{label:"默认",value:"0.5"},{label:"1px",value:"1"},{label:"2px",value:"2"},{label:"3px",value:"3"},{label:"4px",value:"4"},{label:"5px",value:"5"},{label:"6px",value:"6"},{label:"7px",value:"7"},{label:"8px",value:"8"},{label:"9px",value:"9"},{label:"10px",value:"10"}]},{prop:"LineStyle",type:"select",label:"样式",default:1,options:[{label:"实线",value:1},{label:"虚线",value:2}]},{prop:"BorderRadius",type:"number",label:"圆角",default:0,min:0,step:1,hide:!0},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half",hide:!0}]},line:{width:15,height:.5,rotation:0,lockAspectRatio:!1,allowRotation:!1,x1:0,y1:0,x2:15,y2:0,desc:"",propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.5",options:[{label:"默认",value:"0.5"},{label:"1px",value:"1"},{label:"2px",value:"2"},{label:"3px",value:"3"},{label:"4px",value:"4"},{label:"5px",value:"5"},{label:"6px",value:"6"},{label:"7px",value:"7"},{label:"8px",value:"8"},{label:"9px",value:"9"},{label:"10px",value:"10"}]},{prop:"LineStyle",type:"select",label:"样式",default:1,options:[{label:"实线",value:1},{label:"虚线",value:2}]},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]}}},Symbol.toStringTag,{value:"Module"})),vP=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{x:0,y:0,width:20,height:2.8,rotation:0,allowRotation:!1,Title:"",FieldName:"",Text:"测试文本",FontName:"黑体",FontSize:8,FontColor:"#000000",Bold:0,Italic:0,Underline:0,Alignment:2,TextWrap:1,HOrient:0,VOrient:0,PenWidth:0,PenStyle:0,Stretch:1,PreviewOnly:0,ReadOnly:0,desc:"",propertyPanel:[{prop:"Title",label:"标题",default:"",layout:"full",desc:"设置文本组件的标题内容,用于显示在组件上"},{prop:"FieldName",label:"字段名称",type:"select",multiple:!0,optionsKey:"fields",default:"",layout:"full"},{prop:"FieldConnector",label:"字段连接符",type:"text",default:"",layout:"half",desc:"当选择多个字段时,用于连接字段之间的分隔符,如:-、|、空格等"},{prop:"EndMark",label:"结束符",default:"",layout:"half",desc:'用于文本结尾固定文案的打印,不需要则不填。示例:如果填写"元",则打印时内容为"【字段对应值】元"'},{prop:"Text",label:"测试数据(展示使用,无实际意义)",default:"测试文本",layout:"full"},{prop:"TemplateDisplay",label:"模板显示",type:"select",options:[{label:"测试数据",value:"text"},{label:"字段名称",value:"fieldName"}],default:"text",layout:"half",desc:"控制模板中显示的内容:字段名称显示字段名,测试数据显示测试值,仅用于模板展示,不会影响实际打印"},{prop:"FontName",label:"字体名称",type:"select",desc:"注意:选择的字体需要计算机中安装有对应字体才有效",options:[{label:"黑体",value:"黑体",cssValue:"SimHei"},{label:"楷体",value:"楷体",cssValue:"KaiTi"},{label:"宋体",value:"宋体",cssValue:"SimSun"},{label:"隶书",value:"隶书",cssValue:"LiSu"}],default:"黑体",layout:"half"},{prop:"FontSize",label:"字体大小",type:"number",min:1,max:100,default:8,layout:"half"},{prop:"FontColor",label:"字体颜色",type:"color",hide:!0,default:"#000000",layout:"half"},{prop:"Bold",label:"字体加粗",type:"select",options:[{label:"加粗",value:1},{label:"不加粗",value:0}],default:0,layout:"half"},{prop:"Italic",label:"是否斜体",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,layout:"half"},{prop:"Alignment",label:"对齐方式",type:"select",options:[{label:"居左",value:1},{label:"居中",value:2},{label:"居右",value:3}],default:2,layout:"half"},{prop:"TextWrap",label:"文本换行",type:"select",desc:"换行需要文本高度空间足够,比如一行高度是4.5mm,比如实际打印内容要两行,那文本预设高度至少是9mm",options:[{label:"换行",value:1},{label:"不换行",value:2}],default:2,layout:"half"},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]},barcode:{x:0,y:0,width:20,height:6,rotation:0,allowRotation:!1,FieldName:"goodsSn",BarcodeValue:"1234567890",CodeType:"128Auto",AlignJustify:0,LineColor:"#000000",desc:"注:<br/>1、条码宽度需要根据实际打印数据的长短来适当设置;如果打印数据较长,条码宽度较短,条码打印出来会识别困难或无法识别。<br/>2、如果标签尺寸较小,就需要控制打印数据的长度,确保在有限的宽度打印出来能够正常识别。",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"BarcodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"1234567890"},{prop:"CodeType",label:"条码类型",type:"select",options:[{label:"CODE128",value:"128Auto",compValue:"CODE128"},{label:"CODE39",value:"Code39",compValue:"CODE39"},{label:"EAN13",value:"EAN13",compValue:"EAN13"}],hide:!0,default:"128Auto"},{prop:"AlignJustify",label:"对齐方式",type:"select",options:[{label:"两端对齐",value:0},{label:"左",value:1},{label:"中",value:2},{label:"右",value:3}],hide:!0,default:0},{prop:"LineColor",label:"条形码颜色",type:"color",hide:!0,default:"#000000"},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]},qrcode:{x:0,y:0,width:10,height:10,rotation:0,allowRotation:!1,FieldName:"",QRCodeValue:"FB-GOLD",QRCodeVersion:7,QRCodeErrorLevel:"Q",QRCodeEncodeMode:"B",QRCodeForeground:"#000000",QRCodeBackground:"transparent",lockAspectRatio:!0,desc:"",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"QRCodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"FB-1234567890"},{prop:"QRCodeVersion",label:"二维码版本",type:"number",min:1,max:40,hide:!0,default:7},{prop:"QRCodeErrorLevel",label:"纠错级别",type:"select",options:[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}],hide:!0,default:"Q"},{prop:"QRCodeEncodeMode",label:"编码模式",type:"select",options:[{label:"数字",value:"N"},{label:"二进制或汉语",value:"B"},{label:"英文字母",value:"A"}],hide:!0,default:"B"},{prop:"QRCodeForeground",label:"前景色",type:"color",hide:!0,default:"#000000"},{prop:"QRCodeBackground",label:"背景景色",type:"color",hide:!0,default:"transparent"}]},image:{width:12,height:12,rotation:0,allowRotation:!1,lockAspectRatio:!1,desc:"",propertyPanel:[{prop:"ImageSrc",label:"图片地址",type:"file",accept:"image/*",default:""},{prop:"ScaleMode",label:"图片缩放",type:"select",options:[{label:"原始尺寸",value:1},{label:"居中裁剪",value:2},{label:"填充",value:3}],default:1},{prop:"IsPrint",label:"是否打印",type:"select",options:[{label:"是",value:!0},{label:"否",value:!1}],default:!1},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]}}},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 2.5.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.8/LICENSE */function ka(t){"@babel/helpers - typeof";return ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ka(t)}function Op(t,e){return Op=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Op(t,e)}function BP(){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 rf(t,e,A){return BP()?rf=Reflect.construct:rf=function(n,a,i){var o=[null];o.push.apply(o,a);var s=Function.bind.apply(n,o),l=new s;return i&&Op(l,i.prototype),l},rf.apply(null,arguments)}function wn(t){return wP(t)||yP(t)||bP(t)||CP()}function wP(t){if(Array.isArray(t))return kp(t)}function yP(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function bP(t,e){if(t){if(typeof t=="string")return kp(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);if(A==="Object"&&t.constructor&&(A=t.constructor.name),A==="Map"||A==="Set")return Array.from(t);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return kp(t,e)}}function kp(t,e){(e==null||e>t.length)&&(e=t.length);for(var A=0,r=new Array(e);A<e;A++)r[A]=t[A];return r}function CP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
314
|
+
`;C.firstChild;)F.appendChild(C.firstChild);C.appendChild(F)}return C.outerHTML}finally{if(!(i&&window[w])){try{h&&h.unmount&&h.unmount()}catch{}g&&g.parentNode&&g.parentNode.removeChild(g)}}}function wl(t,e=96){return Math.round(t*e/25.4)}async function qy(t,e={}){if(!t||typeof t!="string")throw new Error("文本内容不能为空且必须是字符串");const r={...{width:50,height:50,QRCodeForeground:"#000000",QRCodeBackground:"#ffffff",QRCodeErrorLevel:"M",margin:0,format:"png",quality:.9,returnDataUrl:!0,dpi:96},...e};if(r.width<=0||r.height<=0)throw new Error("宽度和高度必须大于0");const n=wl(r.width,r.dpi),a=wl(r.height,r.dpi),i=wl(r.margin,r.dpi);if(!["L","M","Q","H"].includes(r.QRCodeErrorLevel))throw new Error("错误纠正级别必须是 L、M、Q、H 之一");if(!["png","jpeg","svg"].includes(r.format))throw new Error("输出格式必须是 png、jpeg、svg 之一");if(r.quality<0||r.quality>1)throw new Error("图片质量必须在0-1之间");try{const o={L:"low",M:"medium",Q:"quartile",H:"high"},s={width:n,margin:i,color:{dark:r.QRCodeForeground,light:r.QRCodeBackground},errorCorrectionLevel:o[r.QRCodeErrorLevel]};let l;if(r.format==="svg"){l=await wa.toString(t,{...s,type:"svg"});const u=new DOMParser().parseFromString(l,"image/svg+xml").documentElement;u.setAttribute("width",n),u.setAttribute("height",a),u.setAttribute("viewBox",`0 0 ${n} ${a}`),u.setAttribute("preserveAspectRatio","none");const d=new XMLSerializer().serializeToString(u),g=btoa(decodeURIComponent(encodeURIComponent(d)));return r.returnDataUrl?`data:image/svg+xml;base64,${g}`:g}else{const u=r.format==="jpeg"?"image/jpeg":"image/png";if(l=await wa.toDataURL(t,{...s,type:u,quality:r.format==="jpeg"?r.quality:void 0}),r.returnDataUrl)return l;{const d=l.indexOf(",");return d!==-1?l.substring(d+1):l}}}catch(o){throw new Error(`二维码生成失败: ${o.message}`)}}async function hP(t,e={}){if(!Array.isArray(t))throw new Error("文本参数必须是数组");if(t.length===0)return[];const A=t.map(r=>qy(r,e));try{return await Promise.all(A)}catch(r){throw new Error(`批量生成二维码失败: ${r.message}`)}}async function dP(t,e={}){if(!t||typeof t!="string")throw new Error("文本内容不能为空且必须是字符串");const r={...{width:50,QRCodeForeground:"#000000",QRCodeBackground:"#ffffff",QRCodeErrorLevel:"M",margin:0,dpi:96},...e},n=wl(r.width,r.dpi),a=wl(r.margin,r.dpi);try{const i={L:"low",M:"medium",Q:"quartile",H:"high"};return await wa.toCanvas(t,{width:n,margin:a,color:{dark:r.QRCodeForeground,light:r.QRCodeBackground},errorCorrectionLevel:i[r.QRCodeErrorLevel]})}catch(i){throw new Error(`二维码Canvas生成失败: ${i.message}`)}}function Oa(t,e=96){return Math.round(t*e/25.4)}function $y(t,e,A){const r=e/96,n=Math.max(1,Math.round(r*1.5)),i={CODE128:1,CODE39:1,EAN13:1,EAN8:1,UPC:1,ITF14:2,MSI:1,pharmacode:1,codabar:1}[A]||1,o=Math.max(i,n);return o%2===0?o+1:o}async function e5(t,e={}){if(!t||typeof t!="string")throw new Error("文本内容不能为空且必须是字符串");const r={...{CodeType:"CODE128",width:50,height:15,LineColor:"#000000",background:"#ffffff",displayValue:!1,textAlign:"center",textPosition:"bottom",textMargin:2,font:"monospace",fontSize:5,outputFormat:"png",quality:.95,returnDataUrl:!0,dpi:300},...e};if(["CODE128","CODE39","EAN13","EAN8","UPC","ITF14","MSI","pharmacode","codabar"].includes(r.CodeType)||(r.CodeType="CODE128"),r.width<=0||r.height<=0)throw new Error("宽度和高度必须大于0");const a=Oa(r.width,r.dpi),i=Oa(r.height,r.dpi),o=Oa(r.textMargin,r.dpi),s=Oa(r.fontSize,r.dpi);if(!["png","jpeg","svg"].includes(r.outputFormat))throw new Error("输出格式必须是 png、jpeg、svg 之一");if(r.quality<0||r.quality>1)throw new Error("图片质量必须在0-1之间");try{const l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("width",a),l.setAttribute("height",i),l.setAttribute("viewBox",`0 0 ${a} ${i}`),r.outputFormat==="png"?(l.setAttribute("shape-rendering","crispEdges"),l.setAttribute("text-rendering","optimizeLegibility")):(l.setAttribute("shape-rendering","geometricPrecision"),l.setAttribute("text-rendering","geometricPrecision")),l.setAttribute("image-rendering","optimizeQuality");const u=$y(a,r.dpi,r.CodeType);if(qd(l,t,{format:r.CodeType,width:u,height:i-(r.displayValue?s+o:0),displayValue:r.displayValue,textAlign:r.textAlign,textPosition:r.textPosition,textMargin:o,font:r.font,fontSize:s,lineColor:r.LineColor,background:r.background,margin:0}),r.outputFormat==="svg"){const d=new XMLSerializer().serializeToString(l);return r.returnDataUrl?`data:image/svg+xml;base64,${btoa(decodeURIComponent(encodeURIComponent(d)))}`:d}else{const d=await pP(l,a,i,r.dpi),g=r.outputFormat==="jpeg"?"image/jpeg":"image/png",h=d.toDataURL(g,r.outputFormat==="jpeg"?r.quality:void 0);if(r.returnDataUrl)return h;{const w=h.indexOf(",");return w!==-1?h.substring(w+1):h}}}catch(l){throw new Error(`条形码生成失败: ${l.message}`)}}async function pP(t,e,A,r=300){return new Promise((n,a)=>{const i=Math.max(3,Math.round(r/96)),o=document.createElement("canvas"),s=o.getContext("2d",{willReadFrequently:!1,desynchronized:!1}),l=e*i,u=A*i;o.width=l,o.height=u,o.style.width=e+"px",o.style.height=A+"px",s.save(),s.scale(i,i),s.imageSmoothingEnabled=!1,s.textBaseline="top",s.textAlign="left";const d=new Image,g=new XMLSerializer().serializeToString(t),h=new Blob([g],{type:"image/svg+xml;charset=utf-8"}),w=URL.createObjectURL(h);d.onload=()=>{try{s.clearRect(0,0,e,A),s.drawImage(d,0,0,e,A),s.restore(),URL.revokeObjectURL(w),n(o)}catch(B){s.restore(),URL.revokeObjectURL(w),a(B)}},d.onerror=B=>{s.restore(),URL.revokeObjectURL(w),a(new Error("SVG转换为Canvas失败: "+(B.message||"未知错误")))},d.src=w})}async function gP(t,e={}){if(!Array.isArray(t))throw new Error("文本参数必须是数组");if(t.length===0)return[];const A=t.map(r=>e5(r,e));try{return await Promise.all(A)}catch(r){throw new Error(`批量生成条形码失败: ${r.message}`)}}function mP(t,e={}){if(!t||typeof t!="string")throw new Error("文本内容不能为空且必须是字符串");const r={...{CodeType:"CODE128",width:50,height:15,LineColor:"#000000",background:"#ffffff",displayValue:!1,textAlign:"center",textPosition:"bottom",textMargin:2,font:"monospace",fontSize:5,dpi:300},...e},n=Oa(r.width,r.dpi),a=Oa(r.height,r.dpi),i=Oa(r.textMargin,r.dpi),o=Oa(r.fontSize,r.dpi);try{const s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("width",n),s.setAttribute("height",a),s.setAttribute("viewBox",`0 0 ${n} ${a}`),s.setAttribute("shape-rendering","geometricPrecision"),s.setAttribute("text-rendering","geometricPrecision"),s.setAttribute("image-rendering","optimizeQuality");const l=$y(n,r.dpi,r.CodeType);return qd(s,t,{format:r.CodeType,width:l,height:a-(r.displayValue?o+i:0),displayValue:r.displayValue,textAlign:r.textAlign,textPosition:r.textPosition,textMargin:i,font:r.font,fontSize:o,lineColor:r.LineColor,background:r.background,margin:0}),new XMLSerializer().serializeToString(s)}catch(s){throw new Error(`条形码SVG生成失败: ${s.message}`)}}Vo.install=t=>{t.component(Vo.name||"TemplateDesigner",Vo)};const t5=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{width:20,height:2.8,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"Title",label:"标题",default:"",layout:"full",desc:"用于文本开头固定文案的打印,不需要则不填。示例:如果填写“价格:”,则打印时内容为“价格:【字段对应值】”"},{prop:"FieldName",label:"字段名称",type:"select",multiple:!0,optionsKey:"fields",default:"",layout:"full"},{prop:"FieldConnector",label:"字段连接符",type:"text",default:"",layout:"half",desc:"当选择多个字段时,用于连接字段之间的分隔符,如:-、|、空格等"},{prop:"EndMark",label:"结束符",default:"",layout:"half",desc:'用于文本结尾固定文案的打印,不需要则不填。示例:如果填写"元",则打印时内容为"【字段对应值】元"'},{prop:"Text",label:"测试数据(仅展示使用,无实际意义)",default:"测试文本",layout:"full"},{prop:"TemplateDisplay",label:"模板显示",type:"select",options:[{label:"测试数据",value:"text"},{label:"字段名称",value:"fieldName"}],default:"text",layout:"half",desc:"控制模板中显示的内容:字段名称显示字段名,测试数据显示测试值,仅用于模板展示,不会影响实际打印"},{prop:"FontName",label:"字体名称",type:"select",desc:"注意:选择的字体需要计算机中安装有对应字体才有效",options:[{label:"黑体",value:"黑体",cssValue:"SimHei"},{label:"楷体",value:"楷体",cssValue:"KaiTi"},{label:"宋体",value:"宋体",cssValue:"SimSun"},{label:"隶书",value:"隶书",cssValue:"LiSu"},{label:"缅语Arial",value:"Arial",cssValue:"Arial"},{label:"缅语Segoe UI",value:"Segoe UI",cssValue:"Segoe UI"}],default:"黑体",layout:"half"},{prop:"FontSize",label:"字体大小",type:"number",min:1,max:100,default:8,layout:"half"},{prop:"FontColor",label:"字体颜色",type:"color",hide:!0,default:"#000000",layout:"half"},{prop:"Bold",label:"字体加粗",type:"select",options:[{label:"加粗",value:1},{label:"不加粗",value:0}],default:0,layout:"half"},{prop:"Italic",label:"是否斜体",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,layout:"half"},{prop:"Underline",label:"下划线",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,hide:!0},{prop:"Alignment",label:"对齐方式",type:"select",options:[{label:"居左",value:1},{label:"居中",value:2},{label:"居右",value:3}],default:2},{prop:"TextWrap",label:"文本换行",type:"select",desc:"可预知的内容尽量不换行,避免因为换行导致打印效果不佳",options:[{label:"换行",value:1},{label:"不换行",value:2}],default:2},{prop:"HOrient",label:"水平锁定",type:"select",options:[{label:"无",value:0},{label:"左边距锁定",value:1},{label:"右边距锁定",value:2},{label:"水平居中",value:3}],hide:!0,default:0},{prop:"VOrient",label:"垂直锁定",type:"select",options:[{label:"无",value:0},{label:"上边距锁定",value:1},{label:"下边距锁定",value:2},{label:"垂直居中",value:3}],hide:!0,default:0},{prop:"PenWidth",label:"线宽",type:"number",min:0,hide:!0,default:0},{prop:"PenStyle",label:"线型",type:"select",hide:!0,options:[{label:"实线",value:0},{label:"破折线",value:1},{label:"点线",value:2},{label:"点划线",value:3},{label:"双点划线",value:4}],default:0},{prop:"Stretch",label:"缩放模式",type:"select",options:[{label:"扩展",value:1},{label:"缩放",value:2}],hide:!0,default:1},{prop:"PreviewOnly",label:"仅预览",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"ReadOnly",label:"只读",type:"select",hide:!0,options:[{label:"是",value:1},{label:"否",value:0}],default:0},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]},barcode:{width:20,height:6,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"注:<br/>1、条码宽度需要根据实际打印数据的长短来适当设置;如果打印数据较长,条码宽度较短,条码打印出来会识别困难或无法识别。<br/>2、如果标签尺寸较小,就需要控制打印数据的长度,确保在有限的宽度打印出来能够正常识别。",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"BarcodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"1234567890"},{prop:"CodeType",label:"条码类型",type:"select",options:[{label:"CODE128",value:"128Auto",compValue:"CODE128"},{label:"CODE39",value:"Code39",compValue:"CODE39"},{label:"EAN13",value:"EAN13",compValue:"EAN13"}],hide:!0,default:"128Auto"},{prop:"AlignJustify",label:"对齐方式",type:"select",options:[{label:"两端对齐",value:0},{label:"左",value:1},{label:"中",value:2},{label:"右",value:3}],hide:!0,default:0},{prop:"LineColor",label:"条形码颜色",type:"color",hide:!0,default:"#000000"},{prop:"rotation",label:"旋转角度",type:"select",options:[{label:"0°",value:0},{label:"90°",value:90}],default:0,layout:"half"}]},qrcode:{width:10,height:10,rotation:0,lockAspectRatio:!0,allowRotation:!1,desc:"",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"QRCodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"FB-1234567890"},{prop:"QRCodeVersion",label:"二维码版本",type:"number",min:1,max:40,hide:!0,default:7},{prop:"QRCodeErrorLevel",label:"纠错级别",type:"select",options:[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}],hide:!0,default:"H"},{prop:"QRCodeEncodeMode",label:"编码模式",type:"select",options:[{label:"数字",value:"N"},{label:"二进制或汉语",value:"B"},{label:"英文字母",value:"A"}],hide:!0,default:"B"},{prop:"QRCodeForeground",label:"前景色",type:"color",hide:!0,default:"#000000"},{prop:"QRCodeBackground",label:"背景景色",type:"color",hide:!0,default:"transparent"}]},image:{width:12,height:12,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"ImageSrc",label:"图片地址",type:"file",accept:"image/*",default:""},{prop:"ScaleMode",label:"图片缩放",type:"select",options:[{label:"原始尺寸",value:1},{label:"居中裁剪",value:2},{label:"填充",value:3}],default:1},{prop:"IsPrint",label:"是否打印",type:"select",options:[{label:"是",value:!0},{label:"否",value:!1}],default:!0},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]},rectangle:{width:15,height:10,rotation:0,lockAspectRatio:!1,allowRotation:!1,desc:"",propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.5",options:[{label:"默认",value:"0.5"},{label:"1px",value:"1"},{label:"2px",value:"2"},{label:"3px",value:"3"},{label:"4px",value:"4"},{label:"5px",value:"5"},{label:"6px",value:"6"},{label:"7px",value:"7"},{label:"8px",value:"8"},{label:"9px",value:"9"},{label:"10px",value:"10"}]},{prop:"LineStyle",type:"select",label:"样式",default:1,options:[{label:"实线",value:1},{label:"虚线",value:2}]},{prop:"BorderRadius",type:"number",label:"圆角",default:0,min:0,step:1,hide:!0},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half",hide:!0}]},line:{width:15,height:.5,rotation:0,lockAspectRatio:!1,allowRotation:!1,x1:0,y1:0,x2:15,y2:0,desc:"",propertyPanel:[{prop:"LineWidth",type:"select",label:"线宽",default:"0.5",options:[{label:"默认",value:"0.5"},{label:"1px",value:"1"},{label:"2px",value:"2"},{label:"3px",value:"3"},{label:"4px",value:"4"},{label:"5px",value:"5"},{label:"6px",value:"6"},{label:"7px",value:"7"},{label:"8px",value:"8"},{label:"9px",value:"9"},{label:"10px",value:"10"}]},{prop:"LineStyle",type:"select",label:"样式",default:1,options:[{label:"实线",value:1},{label:"虚线",value:2}]},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]}}},Symbol.toStringTag,{value:"Module"})),vP=Object.freeze(Object.defineProperty({__proto__:null,default:{text:{x:0,y:0,width:20,height:2.8,rotation:0,allowRotation:!1,Title:"",FieldName:"",Text:"测试文本",FontName:"黑体",FontSize:8,FontColor:"#000000",Bold:0,Italic:0,Underline:0,Alignment:2,TextWrap:1,HOrient:0,VOrient:0,PenWidth:0,PenStyle:0,Stretch:1,PreviewOnly:0,ReadOnly:0,desc:"",propertyPanel:[{prop:"Title",label:"标题",default:"",layout:"full",desc:"设置文本组件的标题内容,用于显示在组件上"},{prop:"FieldName",label:"字段名称",type:"select",multiple:!0,optionsKey:"fields",default:"",layout:"full"},{prop:"FieldConnector",label:"字段连接符",type:"text",default:"",layout:"half",desc:"当选择多个字段时,用于连接字段之间的分隔符,如:-、|、空格等"},{prop:"EndMark",label:"结束符",default:"",layout:"half",desc:'用于文本结尾固定文案的打印,不需要则不填。示例:如果填写"元",则打印时内容为"【字段对应值】元"'},{prop:"Text",label:"测试数据(仅展示使用,无实际意义)",default:"测试文本",layout:"full"},{prop:"TemplateDisplay",label:"模板显示",type:"select",options:[{label:"测试数据",value:"text"},{label:"字段名称",value:"fieldName"}],default:"text",layout:"half",desc:"控制模板中显示的内容:字段名称显示字段名,测试数据显示测试值,仅用于模板展示,不会影响实际打印"},{prop:"FontName",label:"字体名称",type:"select",desc:"注意:选择的字体需要计算机中安装有对应字体才有效",options:[{label:"黑体",value:"黑体",cssValue:"SimHei"},{label:"楷体",value:"楷体",cssValue:"KaiTi"},{label:"宋体",value:"宋体",cssValue:"SimSun"},{label:"隶书",value:"隶书",cssValue:"LiSu"}],default:"黑体",layout:"half"},{prop:"FontSize",label:"字体大小",type:"number",min:1,max:100,default:8,layout:"half"},{prop:"FontColor",label:"字体颜色",type:"color",hide:!0,default:"#000000",layout:"half"},{prop:"Bold",label:"字体加粗",type:"select",options:[{label:"加粗",value:1},{label:"不加粗",value:0}],default:0,layout:"half"},{prop:"Italic",label:"是否斜体",type:"select",options:[{label:"是",value:1},{label:"否",value:0}],default:0,layout:"half"},{prop:"Alignment",label:"对齐方式",type:"select",options:[{label:"居左",value:1},{label:"居中",value:2},{label:"居右",value:3}],default:2,layout:"half"},{prop:"TextWrap",label:"文本换行",type:"select",desc:"换行需要文本高度空间足够,比如一行高度是4.5mm,比如实际打印内容要两行,那文本预设高度至少是9mm",options:[{label:"换行",value:1},{label:"不换行",value:2}],default:2,layout:"half"},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]},barcode:{x:0,y:0,width:20,height:6,rotation:0,allowRotation:!1,FieldName:"goodsSn",BarcodeValue:"1234567890",CodeType:"128Auto",AlignJustify:0,LineColor:"#000000",desc:"注:<br/>1、条码宽度需要根据实际打印数据的长短来适当设置;如果打印数据较长,条码宽度较短,条码打印出来会识别困难或无法识别。<br/>2、如果标签尺寸较小,就需要控制打印数据的长度,确保在有限的宽度打印出来能够正常识别。",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"BarcodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"1234567890"},{prop:"CodeType",label:"条码类型",type:"select",options:[{label:"CODE128",value:"128Auto",compValue:"CODE128"},{label:"CODE39",value:"Code39",compValue:"CODE39"},{label:"EAN13",value:"EAN13",compValue:"EAN13"}],hide:!0,default:"128Auto"},{prop:"AlignJustify",label:"对齐方式",type:"select",options:[{label:"两端对齐",value:0},{label:"左",value:1},{label:"中",value:2},{label:"右",value:3}],hide:!0,default:0},{prop:"LineColor",label:"条形码颜色",type:"color",hide:!0,default:"#000000"},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]},qrcode:{x:0,y:0,width:10,height:10,rotation:0,allowRotation:!1,FieldName:"",QRCodeValue:"FB-GOLD",QRCodeVersion:7,QRCodeErrorLevel:"Q",QRCodeEncodeMode:"B",QRCodeForeground:"#000000",QRCodeBackground:"transparent",lockAspectRatio:!0,desc:"",propertyPanel:[{prop:"FieldName",label:"字段名称",type:"select",optionsKey:"fields",default:"",layout:"full"},{prop:"QRCodeValue",label:"测试数据(展示使用,无实际意义)",type:"text",default:"FB-1234567890"},{prop:"QRCodeVersion",label:"二维码版本",type:"number",min:1,max:40,hide:!0,default:7},{prop:"QRCodeErrorLevel",label:"纠错级别",type:"select",options:[{label:"L (7%)",value:"L"},{label:"M (15%)",value:"M"},{label:"Q (25%)",value:"Q"},{label:"H (30%)",value:"H"}],hide:!0,default:"Q"},{prop:"QRCodeEncodeMode",label:"编码模式",type:"select",options:[{label:"数字",value:"N"},{label:"二进制或汉语",value:"B"},{label:"英文字母",value:"A"}],hide:!0,default:"B"},{prop:"QRCodeForeground",label:"前景色",type:"color",hide:!0,default:"#000000"},{prop:"QRCodeBackground",label:"背景景色",type:"color",hide:!0,default:"transparent"}]},image:{width:12,height:12,rotation:0,allowRotation:!1,lockAspectRatio:!1,desc:"",propertyPanel:[{prop:"ImageSrc",label:"图片地址",type:"file",accept:"image/*",default:""},{prop:"ScaleMode",label:"图片缩放",type:"select",options:[{label:"原始尺寸",value:1},{label:"居中裁剪",value:2},{label:"填充",value:3}],default:1},{prop:"IsPrint",label:"是否打印",type:"select",options:[{label:"是",value:!0},{label:"否",value:!1}],default:!1},{prop:"rotation",label:"旋转角度",type:"select",options:fi,default:0,layout:"half"}]}}},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 2.5.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.8/LICENSE */function ka(t){"@babel/helpers - typeof";return ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ka(t)}function Op(t,e){return Op=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},Op(t,e)}function BP(){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 rf(t,e,A){return BP()?rf=Reflect.construct:rf=function(n,a,i){var o=[null];o.push.apply(o,a);var s=Function.bind.apply(n,o),l=new s;return i&&Op(l,i.prototype),l},rf.apply(null,arguments)}function wn(t){return wP(t)||yP(t)||bP(t)||CP()}function wP(t){if(Array.isArray(t))return kp(t)}function yP(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function bP(t,e){if(t){if(typeof t=="string")return kp(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);if(A==="Object"&&t.constructor&&(A=t.constructor.name),A==="Map"||A==="Set")return Array.from(t);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return kp(t,e)}}function kp(t,e){(e==null||e>t.length)&&(e=t.length);for(var A=0,r=new Array(e);A<e;A++)r[A]=t[A];return r}function CP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
315
315
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var EP=Object.hasOwnProperty,A5=Object.setPrototypeOf,UP=Object.isFrozen,FP=Object.getPrototypeOf,NP=Object.getOwnPropertyDescriptor,wr=Object.freeze,tn=Object.seal,SP=Object.create,r5=typeof Reflect<"u"&&Reflect,nf=r5.apply,Hp=r5.construct;nf||(nf=function(e,A,r){return e.apply(A,r)}),wr||(wr=function(e){return e}),tn||(tn=function(e){return e}),Hp||(Hp=function(e,A){return rf(e,wn(A))});var QP=An(Array.prototype.forEach),n5=An(Array.prototype.pop),yl=An(Array.prototype.push),af=An(String.prototype.toLowerCase),Dp=An(String.prototype.toString),a5=An(String.prototype.match),yn=An(String.prototype.replace),TP=An(String.prototype.indexOf),xP=An(String.prototype.trim),er=An(RegExp.prototype.test),Pp=RP(TypeError);function An(t){return function(e){for(var A=arguments.length,r=new Array(A>1?A-1:0),n=1;n<A;n++)r[n-1]=arguments[n];return nf(t,e,r)}}function RP(t){return function(){for(var e=arguments.length,A=new Array(e),r=0;r<e;r++)A[r]=arguments[r];return Hp(t,A)}}function xt(t,e,A){var r;A=(r=A)!==null&&r!==void 0?r:af,A5&&A5(t,null);for(var n=e.length;n--;){var a=e[n];if(typeof a=="string"){var i=A(a);i!==a&&(UP(e)||(e[n]=i),a=i)}t[a]=!0}return t}function Ui(t){var e=SP(null),A;for(A in t)nf(EP,t,[A])===!0&&(e[A]=t[A]);return e}function of(t,e){for(;t!==null;){var A=NP(t,e);if(A){if(A.get)return An(A.get);if(typeof A.value=="function")return An(A.value)}t=FP(t)}function r(n){return console.warn("fallback value for",n),null}return r}var i5=wr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Wp=wr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_p=wr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),IP=wr(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Zp=wr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),VP=wr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),o5=wr(["#text"]),s5=wr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),jp=wr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),l5=wr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),sf=wr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MP=tn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),LP=tn(/<%[\w\W]*|[\w\W]*%>/gm),OP=tn(/\${[\w\W]*}/gm),kP=tn(/^data-[\-\w.\u00B7-\uFFFF]+$/),HP=tn(/^aria-[\-\w]+$/),DP=tn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PP=tn(/^(?:\w+script|data):/i),WP=tn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_P=tn(/^html$/i),ZP=tn(/^[a-z][.\w]*(-[.\w]+)+$/i),jP=function(){return typeof window>"u"?null:window},JP=function(e,A){if(ka(e)!=="object"||typeof e.createPolicy!="function")return null;var r=null,n="data-tt-policy-suffix";A.currentScript&&A.currentScript.hasAttribute(n)&&(r=A.currentScript.getAttribute(n));var a="dompurify"+(r?"#"+r:"");try{return e.createPolicy(a,{createHTML:function(o){return o},createScriptURL:function(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function c5(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jP(),e=function(se){return c5(se)};if(e.version="2.5.8",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var A=t.document,r=t.document,n=t.DocumentFragment,a=t.HTMLTemplateElement,i=t.Node,o=t.Element,s=t.NodeFilter,l=t.NamedNodeMap,u=l===void 0?t.NamedNodeMap||t.MozNamedAttrMap:l,d=t.HTMLFormElement,g=t.DOMParser,h=t.trustedTypes,w=o.prototype,B=of(w,"cloneNode"),C=of(w,"nextSibling"),v=of(w,"childNodes"),y=of(w,"parentNode");if(typeof a=="function"){var F=r.createElement("template");F.content&&F.content.ownerDocument&&(r=F.content.ownerDocument)}var Q=JP(h,A),M=Q?Q.createHTML(""):"",L=r,V=L.implementation,k=L.createNodeIterator,W=L.createDocumentFragment,T=L.getElementsByTagName,N=A.importNode,E={};try{E=Ui(r).documentMode?r.documentMode:{}}catch{}var x={};e.isSupported=typeof y=="function"&&V&&V.createHTMLDocument!==void 0&&E!==9;var O=MP,j=LP,G=OP,Y=kP,K=HP,q=PP,ee=WP,ie=ZP,S=DP,H=null,z=xt({},[].concat(wn(i5),wn(Wp),wn(_p),wn(Zp),wn(o5))),Z=null,re=xt({},[].concat(wn(s5),wn(jp),wn(l5),wn(sf))),ne=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ue=null,ge=null,Ue=!0,Ee=!0,Oe=!1,Te=!0,Pe=!1,pe=!0,$=!1,ut=!1,Ke=!1,Se=!1,Re=!1,He=!1,ke=!0,We=!1,qe="user-content-",ot=!0,rt=!1,ft={},dt=null,tt=xt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),pt=null,De=xt({},["audio","video","img","source","image","track"]),Mt=null,Et=xt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gA="http://www.w3.org/1998/Math/MathML",Ut="http://www.w3.org/2000/svg",Tt="http://www.w3.org/1999/xhtml",AA=Tt,St=!1,_A=null,Dt=xt({},[gA,Ut,Tt],Dp),oA,Jt=["application/xhtml+xml","text/html"],ae="text/html",Ae,Be=null,At=r.createElement("form"),it=function(se){return se instanceof RegExp||se instanceof Function},ze=function(se){Be&&Be===se||((!se||ka(se)!=="object")&&(se={}),se=Ui(se),oA=Jt.indexOf(se.PARSER_MEDIA_TYPE)===-1?oA=ae:oA=se.PARSER_MEDIA_TYPE,Ae=oA==="application/xhtml+xml"?Dp:af,H="ALLOWED_TAGS"in se?xt({},se.ALLOWED_TAGS,Ae):z,Z="ALLOWED_ATTR"in se?xt({},se.ALLOWED_ATTR,Ae):re,_A="ALLOWED_NAMESPACES"in se?xt({},se.ALLOWED_NAMESPACES,Dp):Dt,Mt="ADD_URI_SAFE_ATTR"in se?xt(Ui(Et),se.ADD_URI_SAFE_ATTR,Ae):Et,pt="ADD_DATA_URI_TAGS"in se?xt(Ui(De),se.ADD_DATA_URI_TAGS,Ae):De,dt="FORBID_CONTENTS"in se?xt({},se.FORBID_CONTENTS,Ae):tt,ue="FORBID_TAGS"in se?xt({},se.FORBID_TAGS,Ae):{},ge="FORBID_ATTR"in se?xt({},se.FORBID_ATTR,Ae):{},ft="USE_PROFILES"in se?se.USE_PROFILES:!1,Ue=se.ALLOW_ARIA_ATTR!==!1,Ee=se.ALLOW_DATA_ATTR!==!1,Oe=se.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=se.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Pe=se.SAFE_FOR_TEMPLATES||!1,pe=se.SAFE_FOR_XML!==!1,$=se.WHOLE_DOCUMENT||!1,Se=se.RETURN_DOM||!1,Re=se.RETURN_DOM_FRAGMENT||!1,He=se.RETURN_TRUSTED_TYPE||!1,Ke=se.FORCE_BODY||!1,ke=se.SANITIZE_DOM!==!1,We=se.SANITIZE_NAMED_PROPS||!1,ot=se.KEEP_CONTENT!==!1,rt=se.IN_PLACE||!1,S=se.ALLOWED_URI_REGEXP||S,AA=se.NAMESPACE||Tt,ne=se.CUSTOM_ELEMENT_HANDLING||{},se.CUSTOM_ELEMENT_HANDLING&&it(se.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ne.tagNameCheck=se.CUSTOM_ELEMENT_HANDLING.tagNameCheck),se.CUSTOM_ELEMENT_HANDLING&&it(se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ne.attributeNameCheck=se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),se.CUSTOM_ELEMENT_HANDLING&&typeof se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ne.allowCustomizedBuiltInElements=se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Pe&&(Ee=!1),Re&&(Se=!0),ft&&(H=xt({},wn(o5)),Z=[],ft.html===!0&&(xt(H,i5),xt(Z,s5)),ft.svg===!0&&(xt(H,Wp),xt(Z,jp),xt(Z,sf)),ft.svgFilters===!0&&(xt(H,_p),xt(Z,jp),xt(Z,sf)),ft.mathMl===!0&&(xt(H,Zp),xt(Z,l5),xt(Z,sf))),se.ADD_TAGS&&(H===z&&(H=Ui(H)),xt(H,se.ADD_TAGS,Ae)),se.ADD_ATTR&&(Z===re&&(Z=Ui(Z)),xt(Z,se.ADD_ATTR,Ae)),se.ADD_URI_SAFE_ATTR&&xt(Mt,se.ADD_URI_SAFE_ATTR,Ae),se.FORBID_CONTENTS&&(dt===tt&&(dt=Ui(dt)),xt(dt,se.FORBID_CONTENTS,Ae)),ot&&(H["#text"]=!0),$&&xt(H,["html","head","body"]),H.table&&(xt(H,["tbody"]),delete ue.tbody),wr&&wr(se),Be=se)},lt=xt({},["mi","mo","mn","ms","mtext"]),xe=xt({},["annotation-xml"]),vt=xt({},["title","style","font","a","script"]),je=xt({},Wp);xt(je,_p),xt(je,IP);var we=xt({},Zp);xt(we,VP);var Bt=function(se){var Ve=y(se);(!Ve||!Ve.tagName)&&(Ve={namespaceURI:AA,tagName:"template"});var _e=af(se.tagName),Rt=af(Ve.tagName);return _A[se.namespaceURI]?se.namespaceURI===Ut?Ve.namespaceURI===Tt?_e==="svg":Ve.namespaceURI===gA?_e==="svg"&&(Rt==="annotation-xml"||lt[Rt]):!!je[_e]:se.namespaceURI===gA?Ve.namespaceURI===Tt?_e==="math":Ve.namespaceURI===Ut?_e==="math"&&xe[Rt]:!!we[_e]:se.namespaceURI===Tt?Ve.namespaceURI===Ut&&!xe[Rt]||Ve.namespaceURI===gA&&!lt[Rt]?!1:!we[_e]&&(vt[_e]||!je[_e]):!!(oA==="application/xhtml+xml"&&_A[se.namespaceURI]):!1},Ye=function(se){yl(e.removed,{element:se});try{se.parentNode.removeChild(se)}catch{try{se.outerHTML=M}catch{se.remove()}}},Ft=function(se,Ve){try{yl(e.removed,{attribute:Ve.getAttributeNode(se),from:Ve})}catch{yl(e.removed,{attribute:null,from:Ve})}if(Ve.removeAttribute(se),se==="is"&&!Z[se])if(Se||Re)try{Ye(Ve)}catch{}else try{Ve.setAttribute(se,"")}catch{}},Pt=function(se){var Ve,_e;if(Ke)se="<remove></remove>"+se;else{var Rt=a5(se,/^[\r\n\t ]+/);_e=Rt&&Rt[0]}oA==="application/xhtml+xml"&&AA===Tt&&(se='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+se+"</body></html>");var EA=Q?Q.createHTML(se):se;if(AA===Tt)try{Ve=new g().parseFromString(EA,oA)}catch{}if(!Ve||!Ve.documentElement){Ve=V.createDocument(AA,"template",null);try{Ve.documentElement.innerHTML=St?M:EA}catch{}}var lA=Ve.body||Ve.documentElement;return se&&_e&&lA.insertBefore(r.createTextNode(_e),lA.childNodes[0]||null),AA===Tt?T.call(Ve,$?"html":"body")[0]:$?Ve.documentElement:lA},Ht=function(se){return k.call(se.ownerDocument||se,se,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null,!1)},Wt=function(se){return se instanceof d&&(typeof se.nodeName!="string"||typeof se.textContent!="string"||typeof se.removeChild!="function"||!(se.attributes instanceof u)||typeof se.removeAttribute!="function"||typeof se.setAttribute!="function"||typeof se.namespaceURI!="string"||typeof se.insertBefore!="function"||typeof se.hasChildNodes!="function")},$t=function(se){return ka(i)==="object"?se instanceof i:se&&ka(se)==="object"&&typeof se.nodeType=="number"&&typeof se.nodeName=="string"},sA=function(se,Ve,_e){x[se]&&QP(x[se],function(Rt){Rt.call(e,Ve,_e,Be)})},dr=function(se){var Ve;if(sA("beforeSanitizeElements",se,null),Wt(se)||er(/[\u0080-\uFFFF]/,se.nodeName))return Ye(se),!0;var _e=Ae(se.nodeName);if(sA("uponSanitizeElement",se,{tagName:_e,allowedTags:H}),se.hasChildNodes()&&!$t(se.firstElementChild)&&(!$t(se.content)||!$t(se.content.firstElementChild))&&er(/<[/\w]/g,se.innerHTML)&&er(/<[/\w]/g,se.textContent)||_e==="select"&&er(/<template/i,se.innerHTML)||se.nodeType===7||pe&&se.nodeType===8&&er(/<[/\w]/g,se.data))return Ye(se),!0;if(!H[_e]||ue[_e]){if(!ue[_e]&&bA(_e)&&(ne.tagNameCheck instanceof RegExp&&er(ne.tagNameCheck,_e)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(_e)))return!1;if(ot&&!dt[_e]){var Rt=y(se)||se.parentNode,EA=v(se)||se.childNodes;if(EA&&Rt)for(var lA=EA.length,hA=lA-1;hA>=0;--hA){var Rr=B(EA[hA],!0);Rr.__removalCount=(se.__removalCount||0)+1,Rt.insertBefore(Rr,C(se))}}return Ye(se),!0}return se instanceof o&&!Bt(se)||(_e==="noscript"||_e==="noembed"||_e==="noframes")&&er(/<\/no(script|embed|frames)/i,se.innerHTML)?(Ye(se),!0):(Pe&&se.nodeType===3&&(Ve=se.textContent,Ve=yn(Ve,O," "),Ve=yn(Ve,j," "),Ve=yn(Ve,G," "),se.textContent!==Ve&&(yl(e.removed,{element:se.cloneNode()}),se.textContent=Ve)),sA("afterSanitizeElements",se,null),!1)},Yt=function(se,Ve,_e){if(ke&&(Ve==="id"||Ve==="name")&&(_e in r||_e in At))return!1;if(!(Ee&&!ge[Ve]&&er(Y,Ve))){if(!(Ue&&er(K,Ve))){if(!Z[Ve]||ge[Ve]){if(!(bA(se)&&(ne.tagNameCheck instanceof RegExp&&er(ne.tagNameCheck,se)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(se))&&(ne.attributeNameCheck instanceof RegExp&&er(ne.attributeNameCheck,Ve)||ne.attributeNameCheck instanceof Function&&ne.attributeNameCheck(Ve))||Ve==="is"&&ne.allowCustomizedBuiltInElements&&(ne.tagNameCheck instanceof RegExp&&er(ne.tagNameCheck,_e)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(_e))))return!1}else if(!Mt[Ve]){if(!er(S,yn(_e,ee,""))){if(!((Ve==="src"||Ve==="xlink:href"||Ve==="href")&&se!=="script"&&TP(_e,"data:")===0&&pt[se])){if(!(Oe&&!er(q,yn(_e,ee,"")))){if(_e)return!1}}}}}}return!0},bA=function(se){return se!=="annotation-xml"&&a5(se,ie)},CA=function(se){var Ve,_e,Rt,EA;sA("beforeSanitizeAttributes",se,null);var lA=se.attributes;if(!(!lA||Wt(se))){var hA={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z};for(EA=lA.length;EA--;){Ve=lA[EA];var Rr=Ve,cA=Rr.name,Hi=Rr.namespaceURI;if(_e=cA==="value"?Ve.value:xP(Ve.value),Rt=Ae(cA),hA.attrName=Rt,hA.attrValue=_e,hA.keepAttr=!0,hA.forceKeepAttr=void 0,sA("uponSanitizeAttribute",se,hA),_e=hA.attrValue,!hA.forceKeepAttr&&(Ft(cA,se),!!hA.keepAttr)){if(!Te&&er(/\/>/i,_e)){Ft(cA,se);continue}Pe&&(_e=yn(_e,O," "),_e=yn(_e,j," "),_e=yn(_e,G," "));var Di=Ae(se.nodeName);if(Yt(Di,Rt,_e)){if(We&&(Rt==="id"||Rt==="name")&&(Ft(cA,se),_e=qe+_e),pe&&er(/((--!?|])>)|<\/(style|title)/i,_e)){Ft(cA,se);continue}if(Q&&ka(h)==="object"&&typeof h.getAttributeType=="function"&&!Hi)switch(h.getAttributeType(Di,Rt)){case"TrustedHTML":{_e=Q.createHTML(_e);break}case"TrustedScriptURL":{_e=Q.createScriptURL(_e);break}}try{Hi?se.setAttributeNS(Hi,cA,_e):se.setAttribute(cA,_e),Wt(se)?Ye(se):n5(e.removed)}catch{}}}}sA("afterSanitizeAttributes",se,null)}},Zr=function nt(se){var Ve,_e=Ht(se);for(sA("beforeSanitizeShadowDOM",se,null);Ve=_e.nextNode();)sA("uponSanitizeShadowNode",Ve,null),dr(Ve),CA(Ve),Ve.content instanceof n&&nt(Ve.content);sA("afterSanitizeShadowDOM",se,null)};return e.sanitize=function(nt){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ve,_e,Rt,EA,lA;if(St=!nt,St&&(nt="<!-->"),typeof nt!="string"&&!$t(nt))if(typeof nt.toString=="function"){if(nt=nt.toString(),typeof nt!="string")throw Pp("dirty is not a string, aborting")}else throw Pp("toString is not a function");if(!e.isSupported){if(ka(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof nt=="string")return t.toStaticHTML(nt);if($t(nt))return t.toStaticHTML(nt.outerHTML)}return nt}if(ut||ze(se),e.removed=[],typeof nt=="string"&&(rt=!1),rt){if(nt.nodeName){var hA=Ae(nt.nodeName);if(!H[hA]||ue[hA])throw Pp("root node is forbidden and cannot be sanitized in-place")}}else if(nt instanceof i)Ve=Pt("<!---->"),_e=Ve.ownerDocument.importNode(nt,!0),_e.nodeType===1&&_e.nodeName==="BODY"||_e.nodeName==="HTML"?Ve=_e:Ve.appendChild(_e);else{if(!Se&&!Pe&&!$&&nt.indexOf("<")===-1)return Q&&He?Q.createHTML(nt):nt;if(Ve=Pt(nt),!Ve)return Se?null:He?M:""}Ve&&Ke&&Ye(Ve.firstChild);for(var Rr=Ht(rt?nt:Ve);Rt=Rr.nextNode();)Rt.nodeType===3&&Rt===EA||(dr(Rt),CA(Rt),Rt.content instanceof n&&Zr(Rt.content),EA=Rt);if(EA=null,rt)return nt;if(Se){if(Re)for(lA=W.call(Ve.ownerDocument);Ve.firstChild;)lA.appendChild(Ve.firstChild);else lA=Ve;return(Z.shadowroot||Z.shadowrootmod)&&(lA=N.call(A,lA,!0)),lA}var cA=$?Ve.outerHTML:Ve.innerHTML;return $&&H["!doctype"]&&Ve.ownerDocument&&Ve.ownerDocument.doctype&&Ve.ownerDocument.doctype.name&&er(_P,Ve.ownerDocument.doctype.name)&&(cA="<!DOCTYPE "+Ve.ownerDocument.doctype.name+`>
|
|
316
316
|
`+cA),Pe&&(cA=yn(cA,O," "),cA=yn(cA,j," "),cA=yn(cA,G," ")),Q&&He?Q.createHTML(cA):cA},e.setConfig=function(nt){ze(nt),ut=!0},e.clearConfig=function(){Be=null,ut=!1},e.isValidAttribute=function(nt,se,Ve){Be||ze({});var _e=Ae(nt),Rt=Ae(se);return Yt(_e,Rt,Ve)},e.addHook=function(nt,se){typeof se=="function"&&(x[nt]=x[nt]||[],yl(x[nt],se))},e.removeHook=function(nt){if(x[nt])return n5(x[nt])},e.removeHooks=function(nt){x[nt]&&(x[nt]=[])},e.removeAllHooks=function(){x={}},e}var KP=c5();const GP=Object.freeze(Object.defineProperty({__proto__:null,default:KP},Symbol.toStringTag,{value:"Module"}));var bl=function(t){return t&&t.Math===Math&&t},fA=bl(typeof globalThis=="object"&&globalThis)||bl(typeof window=="object"&&window)||bl(typeof self=="object"&&self)||bl(typeof eo=="object"&&eo)||bl(typeof eo=="object"&&eo)||function(){return this}()||Function("return this")(),Cl={},BA=function(t){try{return!!t()}catch{return!0}},zP=BA,bn=!zP(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),YP=BA,lf=!YP(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),XP=lf,cf=Function.prototype.call,tr=XP?cf.bind(cf):function(){return cf.apply(cf,arguments)},u5={},f5={}.propertyIsEnumerable,h5=Object.getOwnPropertyDescriptor,qP=h5&&!f5.call({1:2},1);u5.f=qP?function(e){var A=h5(this,e);return!!A&&A.enumerable}:f5;var Jp=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},d5=lf,p5=Function.prototype,Kp=p5.call,$P=d5&&p5.bind.bind(Kp,Kp),wA=d5?$P:function(t){return function(){return Kp.apply(t,arguments)}},g5=wA,eW=g5({}.toString),tW=g5("".slice),Fi=function(t){return tW(eW(t),8,-1)},AW=wA,rW=BA,nW=Fi,Gp=Object,aW=AW("".split),m5=rW(function(){return!Gp("z").propertyIsEnumerable(0)})?function(t){return nW(t)==="String"?aW(t,""):Gp(t)}:Gp,uf=function(t){return t==null},iW=uf,oW=TypeError,Cn=function(t){if(iW(t))throw new oW("Can't call method on "+t);return t},sW=m5,lW=Cn,El=function(t){return sW(lW(t))},zp=typeof document=="object"&&document.all,RA=typeof zp>"u"&&zp!==void 0?function(t){return typeof t=="function"||t===zp}:function(t){return typeof t=="function"},cW=RA,Tr=function(t){return typeof t=="object"?t!==null:cW(t)},Yp=fA,uW=RA,fW=function(t){return uW(t)?t:void 0},Ni=function(t,e){return arguments.length<2?fW(Yp[t]):Yp[t]&&Yp[t][e]},hW=wA,ff=hW({}.isPrototypeOf),dW=fA,v5=dW.navigator,B5=v5&&v5.userAgent,Ul=B5?String(B5):"",w5=fA,Xp=Ul,y5=w5.process,b5=w5.Deno,C5=y5&&y5.versions||b5&&b5.version,E5=C5&&C5.v8,En,hf;E5&&(En=E5.split("."),hf=En[0]>0&&En[0]<4?1:+(En[0]+En[1])),!hf&&Xp&&(En=Xp.match(/Edge\/(\d+)/),(!En||En[1]>=74)&&(En=Xp.match(/Chrome\/(\d+)/),En&&(hf=+En[1])));var qp=hf,U5=qp,pW=BA,gW=fA,mW=gW.String,F5=!!Object.getOwnPropertySymbols&&!pW(function(){var t=Symbol("symbol detection");return!mW(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&U5&&U5<41}),vW=F5,N5=vW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",BW=Ni,wW=RA,yW=ff,bW=N5,CW=Object,S5=bW?function(t){return typeof t=="symbol"}:function(t){var e=BW("Symbol");return wW(e)&&yW(e.prototype,CW(t))},EW=String,df=function(t){try{return EW(t)}catch{return"Object"}},UW=RA,FW=df,NW=TypeError,ea=function(t){if(UW(t))return t;throw new NW(FW(t)+" is not a function")},SW=ea,QW=uf,Zo=function(t,e){var A=t[e];return QW(A)?void 0:SW(A)},$p=tr,e1=RA,t1=Tr,TW=TypeError,xW=function(t,e){var A,r;if(e==="string"&&e1(A=t.toString)&&!t1(r=$p(A,t))||e1(A=t.valueOf)&&!t1(r=$p(A,t))||e!=="string"&&e1(A=t.toString)&&!t1(r=$p(A,t)))return r;throw new TW("Can't convert object to primitive value")},Q5={exports:{}},T5=fA,RW=Object.defineProperty,A1=function(t,e){try{RW(T5,t,{value:e,configurable:!0,writable:!0})}catch{T5[t]=e}return e},IW=fA,VW=A1,x5="__core-js_shared__",R5=Q5.exports=IW[x5]||VW(x5,{});(R5.versions||(R5.versions=[])).push({version:"3.45.1",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"});var r1=Q5.exports,I5=r1,n1=function(t,e){return I5[t]||(I5[t]=e||{})},MW=Cn,LW=Object,pf=function(t){return LW(MW(t))},OW=wA,kW=pf,HW=OW({}.hasOwnProperty),Un=Object.hasOwn||function(e,A){return HW(kW(e),A)},DW=wA,PW=0,WW=Math.random(),_W=DW(1.1.toString),V5=function(t){return"Symbol("+(t===void 0?"":t)+")_"+_W(++PW+WW,36)},ZW=fA,jW=n1,M5=Un,JW=V5,KW=F5,GW=N5,jo=ZW.Symbol,a1=jW("wks"),zW=GW?jo.for||jo:jo&&jo.withoutSetter||JW,GA=function(t){return M5(a1,t)||(a1[t]=KW&&M5(jo,t)?jo[t]:zW("Symbol."+t)),a1[t]},YW=tr,L5=Tr,O5=S5,XW=Zo,qW=xW,$W=GA,e_=TypeError,t_=$W("toPrimitive"),A_=function(t,e){if(!L5(t)||O5(t))return t;var A=XW(t,t_),r;if(A){if(e===void 0&&(e="default"),r=YW(A,t,e),!L5(r)||O5(r))return r;throw new e_("Can't convert object to primitive value")}return e===void 0&&(e="number"),qW(t,e)},r_=A_,n_=S5,k5=function(t){var e=r_(t,"string");return n_(e)?e:e+""},a_=fA,H5=Tr,i1=a_.document,i_=H5(i1)&&H5(i1.createElement),gf=function(t){return i_?i1.createElement(t):{}},o_=bn,s_=BA,l_=gf,D5=!o_&&!s_(function(){return Object.defineProperty(l_("div"),"a",{get:function(){return 7}}).a!==7}),c_=bn,u_=tr,f_=u5,h_=Jp,d_=El,p_=k5,g_=Un,m_=D5,P5=Object.getOwnPropertyDescriptor;Cl.f=c_?P5:function(e,A){if(e=d_(e),A=p_(A),m_)try{return P5(e,A)}catch{}if(g_(e,A))return h_(!u_(f_.f,e,A),e[A])};var ta={},v_=bn,B_=BA,W5=v_&&B_(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),w_=Tr,y_=String,b_=TypeError,yr=function(t){if(w_(t))return t;throw new b_(y_(t)+" is not an object")},C_=bn,E_=D5,U_=W5,mf=yr,_5=k5,F_=TypeError,o1=Object.defineProperty,N_=Object.getOwnPropertyDescriptor,s1="enumerable",l1="configurable",c1="writable";ta.f=C_?U_?function(e,A,r){if(mf(e),A=_5(A),mf(r),typeof e=="function"&&A==="prototype"&&"value"in r&&c1 in r&&!r[c1]){var n=N_(e,A);n&&n[c1]&&(e[A]=r.value,r={configurable:l1 in r?r[l1]:n[l1],enumerable:s1 in r?r[s1]:n[s1],writable:!1})}return o1(e,A,r)}:o1:function(e,A,r){if(mf(e),A=_5(A),mf(r),E_)try{return o1(e,A,r)}catch{}if("get"in r||"set"in r)throw new F_("Accessors not supported");return"value"in r&&(e[A]=r.value),e};var S_=bn,Q_=ta,T_=Jp,Fl=S_?function(t,e,A){return Q_.f(t,e,T_(1,A))}:function(t,e,A){return t[e]=A,t},Z5={exports:{}},u1=bn,x_=Un,j5=Function.prototype,R_=u1&&Object.getOwnPropertyDescriptor,f1=x_(j5,"name"),I_=f1&&(function(){}).name==="something",V_=f1&&(!u1||u1&&R_(j5,"name").configurable),vf={EXISTS:f1,PROPER:I_,CONFIGURABLE:V_},M_=wA,L_=RA,h1=r1,O_=M_(Function.toString);L_(h1.inspectSource)||(h1.inspectSource=function(t){return O_(t)});var d1=h1.inspectSource,k_=fA,H_=RA,J5=k_.WeakMap,D_=H_(J5)&&/native code/.test(String(J5)),P_=n1,W_=V5,K5=P_("keys"),p1=function(t){return K5[t]||(K5[t]=W_(t))},g1={},__=D_,G5=fA,Z_=Tr,j_=Fl,m1=Un,v1=r1,J_=p1,K_=g1,z5="Object already initialized",B1=G5.TypeError,G_=G5.WeakMap,Bf,Nl,wf,z_=function(t){return wf(t)?Nl(t):Bf(t,{})},Y_=function(t){return function(e){var A;if(!Z_(e)||(A=Nl(e)).type!==t)throw new B1("Incompatible receiver, "+t+" required");return A}};if(__||v1.state){var Wn=v1.state||(v1.state=new G_);Wn.get=Wn.get,Wn.has=Wn.has,Wn.set=Wn.set,Bf=function(t,e){if(Wn.has(t))throw new B1(z5);return e.facade=t,Wn.set(t,e),e},Nl=function(t){return Wn.get(t)||{}},wf=function(t){return Wn.has(t)}}else{var Jo=J_("state");K_[Jo]=!0,Bf=function(t,e){if(m1(t,Jo))throw new B1(z5);return e.facade=t,j_(t,Jo,e),e},Nl=function(t){return m1(t,Jo)?t[Jo]:{}},wf=function(t){return m1(t,Jo)}}var yf={set:Bf,get:Nl,has:wf,enforce:z_,getterFor:Y_},w1=wA,X_=BA,q_=RA,bf=Un,y1=bn,$_=vf.CONFIGURABLE,e7=d1,Y5=yf,t7=Y5.enforce,A7=Y5.get,X5=String,Cf=Object.defineProperty,r7=w1("".slice),n7=w1("".replace),a7=w1([].join),i7=y1&&!X_(function(){return Cf(function(){},"length",{value:8}).length!==8}),o7=String(String).split("String"),s7=Z5.exports=function(t,e,A){r7(X5(e),0,7)==="Symbol("&&(e="["+n7(X5(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),A&&A.getter&&(e="get "+e),A&&A.setter&&(e="set "+e),(!bf(t,"name")||$_&&t.name!==e)&&(y1?Cf(t,"name",{value:e,configurable:!0}):t.name=e),i7&&A&&bf(A,"arity")&&t.length!==A.arity&&Cf(t,"length",{value:A.arity});try{A&&bf(A,"constructor")&&A.constructor?y1&&Cf(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var r=t7(t);return bf(r,"source")||(r.source=a7(o7,typeof e=="string"?e:"")),t};Function.prototype.toString=s7(function(){return q_(this)&&A7(this).source||e7(this)},"toString");var q5=Z5.exports,l7=RA,c7=ta,u7=q5,f7=A1,Si=function(t,e,A,r){r||(r={});var n=r.enumerable,a=r.name!==void 0?r.name:e;if(l7(A)&&u7(A,a,r),r.global)n?t[e]=A:f7(e,A);else{try{r.unsafe?t[e]&&(n=!0):delete t[e]}catch{}n?t[e]=A:c7.f(t,e,{value:A,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},$5={},h7=Math.ceil,d7=Math.floor,p7=Math.trunc||function(e){var A=+e;return(A>0?d7:h7)(A)},g7=p7,Ef=function(t){var e=+t;return e!==e||e===0?0:g7(e)},m7=Ef,v7=Math.max,B7=Math.min,w7=function(t,e){var A=m7(t);return A<0?v7(A+e,0):B7(A,e)},y7=Ef,b7=Math.min,Ko=function(t){var e=y7(t);return e>0?b7(e,9007199254740991):0},C7=Ko,b1=function(t){return C7(t.length)},E7=El,U7=w7,F7=b1,eb=function(t){return function(e,A,r){var n=E7(e),a=F7(n);if(a===0)return!t&&-1;var i=U7(r,a),o;if(t&&A!==A){for(;a>i;)if(o=n[i++],o!==o)return!0}else for(;a>i;i++)if((t||i in n)&&n[i]===A)return t||i||0;return!t&&-1}},tb={includes:eb(!0),indexOf:eb(!1)},N7=wA,C1=Un,S7=El,Q7=tb.indexOf,T7=g1,Ab=N7([].push),rb=function(t,e){var A=S7(t),r=0,n=[],a;for(a in A)!C1(T7,a)&&C1(A,a)&&Ab(n,a);for(;e.length>r;)C1(A,a=e[r++])&&(~Q7(n,a)||Ab(n,a));return n},E1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],x7=rb,R7=E1,I7=R7.concat("length","prototype");$5.f=Object.getOwnPropertyNames||function(e){return x7(e,I7)};var nb={};nb.f=Object.getOwnPropertySymbols;var V7=Ni,M7=wA,L7=$5,O7=nb,k7=yr,H7=M7([].concat),D7=V7("Reflect","ownKeys")||function(e){var A=L7.f(k7(e)),r=O7.f;return r?H7(A,r(e)):A},ab=Un,P7=D7,W7=Cl,_7=ta,Z7=function(t,e,A){for(var r=P7(e),n=_7.f,a=W7.f,i=0;i<r.length;i++){var o=r[i];!ab(t,o)&&!(A&&ab(A,o))&&n(t,o,a(e,o))}},j7=BA,J7=RA,K7=/#|\.prototype\./,Sl=function(t,e){var A=z7[G7(t)];return A===X7?!0:A===Y7?!1:J7(e)?j7(e):!!e},G7=Sl.normalize=function(t){return String(t).replace(K7,".").toLowerCase()},z7=Sl.data={},Y7=Sl.NATIVE="N",X7=Sl.POLYFILL="P",ib=Sl,Uf=fA,q7=Cl.f,$7=Fl,eZ=Si,tZ=A1,AZ=Z7,rZ=ib,br=function(t,e){var A=t.target,r=t.global,n=t.stat,a,i,o,s,l,u;if(r?i=Uf:n?i=Uf[A]||tZ(A,{}):i=Uf[A]&&Uf[A].prototype,i)for(o in e){if(l=e[o],t.dontCallGetSet?(u=q7(i,o),s=u&&u.value):s=i[o],a=rZ(r?o:A+(n?".":"#")+o,t.forced),!a&&s!==void 0){if(typeof l==typeof s)continue;AZ(l,s)}(t.sham||s&&s.sham)&&$7(l,"sham",!0),eZ(i,o,l,t)}},Ql=fA,nZ=Ul,aZ=Fi,Ff=function(t){return nZ.slice(0,t.length)===t},ob=function(){return Ff("Bun/")?"BUN":Ff("Cloudflare-Workers")?"CLOUDFLARE":Ff("Deno/")?"DENO":Ff("Node.js/")?"NODE":Ql.Bun&&typeof Bun.version=="string"?"BUN":Ql.Deno&&typeof Deno.version=="object"?"DENO":aZ(Ql.process)==="process"?"NODE":Ql.window&&Ql.document?"BROWSER":"REST"}(),iZ=ob,Nf=iZ==="NODE",oZ=fA,sZ=oZ,lZ=wA,cZ=ea,uZ=function(t,e,A){try{return lZ(cZ(Object.getOwnPropertyDescriptor(t,e)[A]))}catch{}},fZ=Tr,hZ=function(t){return fZ(t)||t===null},dZ=hZ,pZ=String,gZ=TypeError,mZ=function(t){if(dZ(t))return t;throw new gZ("Can't set "+pZ(t)+" as a prototype")},vZ=uZ,BZ=Tr,wZ=Cn,yZ=mZ,sb=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},A;try{A=vZ(Object.prototype,"__proto__","set"),A(e,[]),t=e instanceof Array}catch{}return function(n,a){return wZ(n),yZ(a),BZ(n)&&(t?A(n,a):n.__proto__=a),n}}():void 0),bZ=ta.f,CZ=Un,EZ=GA,lb=EZ("toStringTag"),Sf=function(t,e,A){t&&!A&&(t=t.prototype),t&&!CZ(t,lb)&&bZ(t,lb,{configurable:!0,value:e})},cb=q5,UZ=ta,FZ=function(t,e,A){return A.get&&cb(A.get,e,{getter:!0}),A.set&&cb(A.set,e,{setter:!0}),UZ.f(t,e,A)},NZ=Ni,SZ=FZ,QZ=GA,TZ=bn,ub=QZ("species"),xZ=function(t){var e=NZ(t);TZ&&e&&!e[ub]&&SZ(e,ub,{configurable:!0,get:function(){return this}})},RZ=ff,IZ=TypeError,VZ=function(t,e){if(RZ(e,t))return t;throw new IZ("Incorrect invocation")},MZ=GA,LZ=MZ("toStringTag"),fb={};fb[LZ]="z";var OZ=String(fb)==="[object z]",kZ=OZ,HZ=RA,Qf=Fi,DZ=GA,PZ=DZ("toStringTag"),WZ=Object,_Z=Qf(function(){return arguments}())==="Arguments",ZZ=function(t,e){try{return t[e]}catch{}},U1=kZ?Qf:function(t){var e,A,r;return t===void 0?"Undefined":t===null?"Null":typeof(A=ZZ(e=WZ(t),PZ))=="string"?A:_Z?Qf(e):(r=Qf(e))==="Object"&&HZ(e.callee)?"Arguments":r},jZ=wA,JZ=BA,hb=RA,KZ=U1,GZ=Ni,zZ=d1,db=function(){},pb=GZ("Reflect","construct"),F1=/^\s*(?:class|function)\b/,YZ=jZ(F1.exec),XZ=!F1.test(db),Tl=function(e){if(!hb(e))return!1;try{return pb(db,[],e),!0}catch{return!1}},gb=function(e){if(!hb(e))return!1;switch(KZ(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return XZ||!!YZ(F1,zZ(e))}catch{return!0}};gb.sham=!0;var qZ=!pb||JZ(function(){var t;return Tl(Tl.call)||!Tl(Object)||!Tl(function(){t=!0})||t})?gb:Tl,$Z=qZ,e9=df,t9=TypeError,A9=function(t){if($Z(t))return t;throw new t9(e9(t)+" is not a constructor")},mb=yr,r9=A9,n9=uf,a9=GA,i9=a9("species"),vb=function(t,e){var A=mb(t).constructor,r;return A===void 0||n9(r=mb(A)[i9])?e:r9(r)},o9=lf,Bb=Function.prototype,wb=Bb.apply,yb=Bb.call,bb=typeof Reflect=="object"&&Reflect.apply||(o9?yb.bind(wb):function(){return yb.apply(wb,arguments)}),s9=Fi,l9=wA,Tf=function(t){if(s9(t)==="Function")return l9(t)},Cb=Tf,c9=ea,u9=lf,f9=Cb(Cb.bind),N1=function(t,e){return c9(t),e===void 0?t:u9?f9(t,e):function(){return t.apply(e,arguments)}},h9=Ni,Eb=h9("document","documentElement"),d9=wA,p9=d9([].slice),g9=TypeError,m9=function(t,e){if(t<e)throw new g9("Not enough arguments");return t},v9=Ul,Ub=/(?:ipad|iphone|ipod).*applewebkit/i.test(v9),_r=fA,B9=bb,w9=N1,Fb=RA,y9=Un,Nb=BA,Sb=Eb,b9=p9,Qb=gf,C9=m9,E9=Ub,U9=Nf,S1=_r.setImmediate,Q1=_r.clearImmediate,F9=_r.process,T1=_r.Dispatch,N9=_r.Function,Tb=_r.MessageChannel,S9=_r.String,x1=0,xl={},xb="onreadystatechange",Rl,Qi,R1,I1;Nb(function(){Rl=_r.location});var V1=function(t){if(y9(xl,t)){var e=xl[t];delete xl[t],e()}},M1=function(t){return function(){V1(t)}},Rb=function(t){V1(t.data)},Ib=function(t){_r.postMessage(S9(t),Rl.protocol+"//"+Rl.host)};(!S1||!Q1)&&(S1=function(e){C9(arguments.length,1);var A=Fb(e)?e:N9(e),r=b9(arguments,1);return xl[++x1]=function(){B9(A,void 0,r)},Qi(x1),x1},Q1=function(e){delete xl[e]},U9?Qi=function(t){F9.nextTick(M1(t))}:T1&&T1.now?Qi=function(t){T1.now(M1(t))}:Tb&&!E9?(R1=new Tb,I1=R1.port2,R1.port1.onmessage=Rb,Qi=w9(I1.postMessage,I1)):_r.addEventListener&&Fb(_r.postMessage)&&!_r.importScripts&&Rl&&Rl.protocol!=="file:"&&!Nb(Ib)?(Qi=Ib,_r.addEventListener("message",Rb,!1)):xb in Qb("script")?Qi=function(t){Sb.appendChild(Qb("script"))[xb]=function(){Sb.removeChild(this),V1(t)}}:Qi=function(t){setTimeout(M1(t),0)});var Vb={set:S1,clear:Q1},Mb=fA,Q9=bn,T9=Object.getOwnPropertyDescriptor,x9=function(t){if(!Q9)return Mb[t];var e=T9(Mb,t);return e&&e.value},Lb=function(){this.head=null,this.tail=null};Lb.prototype={add:function(t){var e={item:t,next:null},A=this.tail;A?A.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var Ob=Lb,R9=Ul,I9=/ipad|iphone|ipod/i.test(R9)&&typeof Pebble<"u",V9=Ul,M9=/web0s(?!.*chrome)/i.test(V9),Go=fA,L9=x9,kb=N1,L1=Vb.set,O9=Ob,k9=Ub,H9=I9,D9=M9,O1=Nf,Hb=Go.MutationObserver||Go.WebKitMutationObserver,Db=Go.document,Pb=Go.process,xf=Go.Promise,k1=L9("queueMicrotask"),zo,H1,D1,Rf,Wb;if(!k1){var If=new O9,Vf=function(){var t,e;for(O1&&(t=Pb.domain)&&t.exit();e=If.get();)try{e()}catch(A){throw If.head&&zo(),A}t&&t.enter()};!k9&&!O1&&!D9&&Hb&&Db?(H1=!0,D1=Db.createTextNode(""),new Hb(Vf).observe(D1,{characterData:!0}),zo=function(){D1.data=H1=!H1}):!H9&&xf&&xf.resolve?(Rf=xf.resolve(void 0),Rf.constructor=xf,Wb=kb(Rf.then,Rf),zo=function(){Wb(Vf)}):O1?zo=function(){Pb.nextTick(Vf)}:(L1=kb(L1,Go),zo=function(){L1(Vf)}),k1=function(t){If.head||zo(),If.add(t)}}var P9=k1,W9=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch{}},P1=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},_9=fA,Mf=_9.Promise,Z9=fA,Il=Mf,j9=RA,J9=ib,K9=d1,G9=GA,_b=ob,W1=qp;Il&&Il.prototype;var z9=G9("species"),_1=!1,Zb=j9(Z9.PromiseRejectionEvent),Y9=J9("Promise",function(){var t=K9(Il),e=t!==String(Il);if(!e&&W1===66)return!0;if(!W1||W1<51||!/native code/.test(t)){var A=new Il(function(a){a(1)}),r=function(a){a(function(){},function(){})},n=A.constructor={};if(n[z9]=r,_1=A.then(function(){})instanceof r,!_1)return!0}return!e&&(_b==="BROWSER"||_b==="DENO")&&!Zb}),Vl={CONSTRUCTOR:Y9,REJECTION_EVENT:Zb,SUBCLASSING:_1},Yo={},jb=ea,X9=TypeError,q9=function(t){var e,A;this.promise=new t(function(r,n){if(e!==void 0||A!==void 0)throw new X9("Bad Promise constructor");e=r,A=n}),this.resolve=jb(e),this.reject=jb(A)};Yo.f=function(t){return new q9(t)};var $9=br,Lf=Nf,Ha=fA,ej=sZ,Xo=tr,Jb=Si,Kb=sb,tj=Sf,Aj=xZ,rj=ea,Of=RA,nj=Tr,aj=VZ,ij=vb,Gb=Vb.set,Z1=P9,oj=W9,sj=P1,lj=Ob,zb=yf,kf=Mf,j1=Vl,Yb=Yo,Hf="Promise",Xb=j1.CONSTRUCTOR,cj=j1.REJECTION_EVENT,uj=j1.SUBCLASSING,J1=zb.getterFor(Hf),fj=zb.set,qo=kf&&kf.prototype,Ti=kf,Df=qo,qb=Ha.TypeError,K1=Ha.document,G1=Ha.process,z1=Yb.f,hj=z1,dj=!!(K1&&K1.createEvent&&Ha.dispatchEvent),$b="unhandledrejection",pj="rejectionhandled",eC=0,tC=1,gj=2,Y1=1,AC=2,Pf,rC,nC,aC,iC=function(t){var e;return nj(t)&&Of(e=t.then)?e:!1},oC=function(t,e){var A=e.value,r=e.state===tC,n=r?t.ok:t.fail,a=t.resolve,i=t.reject,o=t.domain,s,l,u;try{n?(r||(e.rejection===AC&&vj(e),e.rejection=Y1),n===!0?s=A:(o&&o.enter(),s=n(A),o&&(o.exit(),u=!0)),s===t.promise?i(new qb("Promise-chain cycle")):(l=iC(s))?Xo(l,s,a,i):a(s)):i(A)}catch(d){o&&!u&&o.exit(),i(d)}},sC=function(t,e){t.notified||(t.notified=!0,Z1(function(){for(var A=t.reactions,r;r=A.get();)oC(r,t);t.notified=!1,e&&!t.rejection&&mj(t)}))},lC=function(t,e,A){var r,n;dj?(r=K1.createEvent("Event"),r.promise=e,r.reason=A,r.initEvent(t,!1,!0),Ha.dispatchEvent(r)):r={promise:e,reason:A},!cj&&(n=Ha["on"+t])?n(r):t===$b&&oj("Unhandled promise rejection",A)},mj=function(t){Xo(Gb,Ha,function(){var e=t.facade,A=t.value,r=cC(t),n;if(r&&(n=sj(function(){Lf?G1.emit("unhandledRejection",A,e):lC($b,e,A)}),t.rejection=Lf||cC(t)?AC:Y1,n.error))throw n.value})},cC=function(t){return t.rejection!==Y1&&!t.parent},vj=function(t){Xo(Gb,Ha,function(){var e=t.facade;Lf?G1.emit("rejectionHandled",e):lC(pj,e,t.value)})},$o=function(t,e,A){return function(r){t(e,r,A)}},es=function(t,e,A){t.done||(t.done=!0,A&&(t=A),t.value=e,t.state=gj,sC(t,!0))},X1=function(t,e,A){if(!t.done){t.done=!0,A&&(t=A);try{if(t.facade===e)throw new qb("Promise can't be resolved itself");var r=iC(e);r?Z1(function(){var n={done:!1};try{Xo(r,e,$o(X1,n,t),$o(es,n,t))}catch(a){es(n,a,t)}}):(t.value=e,t.state=tC,sC(t,!1))}catch(n){es({done:!1},n,t)}}};if(Xb&&(Ti=function(e){aj(this,Df),rj(e),Xo(Pf,this);var A=J1(this);try{e($o(X1,A),$o(es,A))}catch(r){es(A,r)}},Df=Ti.prototype,Pf=function(e){fj(this,{type:Hf,done:!1,notified:!1,parent:!1,reactions:new lj,rejection:!1,state:eC,value:null})},Pf.prototype=Jb(Df,"then",function(e,A){var r=J1(this),n=z1(ij(this,Ti));return r.parent=!0,n.ok=Of(e)?e:!0,n.fail=Of(A)&&A,n.domain=Lf?G1.domain:void 0,r.state===eC?r.reactions.add(n):Z1(function(){oC(n,r)}),n.promise}),rC=function(){var t=new Pf,e=J1(t);this.promise=t,this.resolve=$o(X1,e),this.reject=$o(es,e)},Yb.f=z1=function(t){return t===Ti||t===nC?new rC(t):hj(t)},Of(kf)&&qo!==Object.prototype)){aC=qo.then,uj||Jb(qo,"then",function(e,A){var r=this;return new Ti(function(n,a){Xo(aC,r,n,a)}).then(e,A)},{unsafe:!0});try{delete qo.constructor}catch{}Kb&&Kb(qo,Df)}$9({global:!0,constructor:!0,wrap:!0,forced:Xb},{Promise:Ti}),nC=ej.Promise,tj(Ti,Hf,!1),Aj(Hf);var Ml={},Bj=GA,wj=Ml,yj=Bj("iterator"),bj=Array.prototype,Cj=function(t){return t!==void 0&&(wj.Array===t||bj[yj]===t)},Ej=U1,uC=Zo,Uj=uf,Fj=Ml,Nj=GA,Sj=Nj("iterator"),fC=function(t){if(!Uj(t))return uC(t,Sj)||uC(t,"@@iterator")||Fj[Ej(t)]},Qj=tr,Tj=ea,xj=yr,Rj=df,Ij=fC,Vj=TypeError,Mj=function(t,e){var A=arguments.length<2?Ij(t):e;if(Tj(A))return xj(Qj(A,t));throw new Vj(Rj(t)+" is not iterable")},Lj=tr,hC=yr,Oj=Zo,kj=function(t,e,A){var r,n;hC(t);try{if(r=Oj(t,"return"),!r){if(e==="throw")throw A;return A}r=Lj(r,t)}catch(a){n=!0,r=a}if(e==="throw")throw A;if(n)throw r;return hC(r),A},Hj=N1,Dj=tr,Pj=yr,Wj=df,_j=Cj,Zj=b1,dC=ff,jj=Mj,Jj=fC,pC=kj,Kj=TypeError,Wf=function(t,e){this.stopped=t,this.result=e},gC=Wf.prototype,mC=function(t,e,A){var r=A&&A.that,n=!!(A&&A.AS_ENTRIES),a=!!(A&&A.IS_RECORD),i=!!(A&&A.IS_ITERATOR),o=!!(A&&A.INTERRUPTED),s=Hj(e,r),l,u,d,g,h,w,B,C=function(y){return l&&pC(l,"normal"),new Wf(!0,y)},v=function(y){return n?(Pj(y),o?s(y[0],y[1],C):s(y[0],y[1])):o?s(y,C):s(y)};if(a)l=t.iterator;else if(i)l=t;else{if(u=Jj(t),!u)throw new Kj(Wj(t)+" is not iterable");if(_j(u)){for(d=0,g=Zj(t);g>d;d++)if(h=v(t[d]),h&&dC(gC,h))return h;return new Wf(!1)}l=jj(t,u)}for(w=a?t.next:l.next;!(B=Dj(w,l)).done;){try{h=v(B.value)}catch(y){pC(l,"throw",y)}if(typeof h=="object"&&h&&dC(gC,h))return h}return new Wf(!1)},Gj=GA,vC=Gj("iterator"),BC=!1;try{var zj=0,wC={next:function(){return{done:!!zj++}},return:function(){BC=!0}};wC[vC]=function(){return this},Array.from(wC,function(){throw 2})}catch{}var Yj=function(t,e){try{if(!e&&!BC)return!1}catch{return!1}var A=!1;try{var r={};r[vC]=function(){return{next:function(){return{done:A=!0}}}},t(r)}catch{}return A},Xj=Mf,qj=Yj,$j=Vl.CONSTRUCTOR,yC=$j||!qj(function(t){Xj.all(t).then(void 0,function(){})}),eJ=br,tJ=tr,AJ=ea,rJ=Yo,nJ=P1,aJ=mC,iJ=yC;eJ({target:"Promise",stat:!0,forced:iJ},{all:function(e){var A=this,r=rJ.f(A),n=r.resolve,a=r.reject,i=nJ(function(){var o=AJ(A.resolve),s=[],l=0,u=1;aJ(e,function(d){var g=l++,h=!1;u++,tJ(o,A,d).then(function(w){h||(h=!0,s[g]=w,--u||n(s))},a)}),--u||n(s)});return i.error&&a(i.value),r.promise}});var oJ=br,sJ=Vl.CONSTRUCTOR,q1=Mf,lJ=Ni,cJ=RA,uJ=Si,bC=q1&&q1.prototype;if(oJ({target:"Promise",proto:!0,forced:sJ,real:!0},{catch:function(t){return this.then(void 0,t)}}),cJ(q1)){var CC=lJ("Promise").prototype.catch;bC.catch!==CC&&uJ(bC,"catch",CC,{unsafe:!0})}var fJ=br,hJ=tr,dJ=ea,pJ=Yo,gJ=P1,mJ=mC,vJ=yC;fJ({target:"Promise",stat:!0,forced:vJ},{race:function(e){var A=this,r=pJ.f(A),n=r.reject,a=gJ(function(){var i=dJ(A.resolve);mJ(e,function(o){hJ(i,A,o).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}});var BJ=br,wJ=Yo,yJ=Vl.CONSTRUCTOR;BJ({target:"Promise",stat:!0,forced:yJ},{reject:function(e){var A=wJ.f(this),r=A.reject;return r(e),A.promise}});var bJ=yr,CJ=Tr,EJ=Yo,UJ=function(t,e){if(bJ(t),CJ(e)&&e.constructor===t)return e;var A=EJ.f(t),r=A.resolve;return r(e),A.promise},FJ=br,NJ=Ni,SJ=Vl.CONSTRUCTOR,QJ=UJ;NJ("Promise"),FJ({target:"Promise",stat:!0,forced:SJ},{resolve:function(e){return QJ(this,e)}});function EC(t,e,A,r,n,a,i){try{var o=t[a](i),s=o.value}catch(l){return void A(l)}o.done?e(s):Promise.resolve(s).then(r,n)}function Aa(t){return function(){var e=this,A=arguments;return new Promise(function(r,n){var a=t.apply(e,A);function i(s){EC(a,r,n,i,o,"next",s)}function o(s){EC(a,r,n,i,o,"throw",s)}i(void 0)})}}var TJ=U1,xJ=String,_n=function(t){if(TJ(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return xJ(t)},RJ=yr,UC=function(){var t=RJ(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},$1=BA,IJ=fA,eg=IJ.RegExp,tg=$1(function(){var t=eg("a","y");return t.lastIndex=2,t.exec("abcd")!==null}),VJ=tg||$1(function(){return!eg("a","y").sticky}),MJ=tg||$1(function(){var t=eg("^r","gy");return t.lastIndex=2,t.exec("str")!==null}),FC={BROKEN_CARET:MJ,MISSED_STICKY:VJ,UNSUPPORTED_Y:tg},NC={},LJ=rb,OJ=E1,kJ=Object.keys||function(e){return LJ(e,OJ)},HJ=bn,DJ=W5,PJ=ta,WJ=yr,_J=El,ZJ=kJ;NC.f=HJ&&!DJ?Object.defineProperties:function(e,A){WJ(e);for(var r=_J(A),n=ZJ(A),a=n.length,i=0,o;a>i;)PJ.f(e,o=n[i++],r[o]);return e};var jJ=yr,JJ=NC,SC=E1,KJ=g1,GJ=Eb,zJ=gf,YJ=p1,QC=">",TC="<",Ag="prototype",rg="script",xC=YJ("IE_PROTO"),ng=function(){},RC=function(t){return TC+rg+QC+t+TC+"/"+rg+QC},IC=function(t){t.write(RC("")),t.close();var e=t.parentWindow.Object;return t=null,e},XJ=function(){var t=zJ("iframe"),e="java"+rg+":",A;return t.style.display="none",GJ.appendChild(t),t.src=String(e),A=t.contentWindow.document,A.open(),A.write(RC("document.F=Object")),A.close(),A.F},_f,Zf=function(){try{_f=new ActiveXObject("htmlfile")}catch{}Zf=typeof document<"u"?document.domain&&_f?IC(_f):XJ():IC(_f);for(var t=SC.length;t--;)delete Zf[Ag][SC[t]];return Zf()};KJ[xC]=!0;var ag=Object.create||function(e,A){var r;return e!==null?(ng[Ag]=jJ(e),r=new ng,ng[Ag]=null,r[xC]=e):r=Zf(),A===void 0?r:JJ.f(r,A)},qJ=BA,$J=fA,eK=$J.RegExp,tK=qJ(function(){var t=eK(".","s");return!(t.dotAll&&t.test(`
|
|
317
317
|
`)&&t.flags==="s")}),AK=BA,rK=fA,nK=rK.RegExp,aK=AK(function(){var t=nK("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"}),ts=tr,jf=wA,iK=_n,oK=UC,sK=FC,lK=n1,cK=ag,uK=yf.get,fK=tK,hK=aK,dK=lK("native-string-replace",String.prototype.replace),Jf=RegExp.prototype.exec,ig=Jf,pK=jf("".charAt),gK=jf("".indexOf),mK=jf("".replace),og=jf("".slice),sg=function(){var t=/a/,e=/b*/g;return ts(Jf,t,"a"),ts(Jf,e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),VC=sK.BROKEN_CARET,lg=/()??/.exec("")[1]!==void 0,vK=sg||lg||VC||fK||hK;vK&&(ig=function(e){var A=this,r=uK(A),n=iK(e),a=r.raw,i,o,s,l,u,d,g;if(a)return a.lastIndex=A.lastIndex,i=ts(ig,a,n),A.lastIndex=a.lastIndex,i;var h=r.groups,w=VC&&A.sticky,B=ts(oK,A),C=A.source,v=0,y=n;if(w&&(B=mK(B,"y",""),gK(B,"g")===-1&&(B+="g"),y=og(n,A.lastIndex),A.lastIndex>0&&(!A.multiline||A.multiline&&pK(n,A.lastIndex-1)!==`
|