tata-ui
Version:
塔塔NG-基于VUE3开发支持Clodop打印的模板设计器
9 lines • 76.6 kB
JavaScript
(function(t,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(t=typeof globalThis<"u"?globalThis:t||self,a(t["tata-ui"]={},t.Vue))})(this,function(exports,vue){"use strict";const _sfc_main$d=vue.defineComponent({name:"tata-button",__name:"index",props:{type:{},size:{}},setup(t){return console.log(t),(r,o)=>(vue.openBlock(),vue.createElementBlock("button",{class:vue.normalizeClass(["tata-btn",[r.size,r.type]])},[vue.renderSlot(r.$slots,"default",{},void 0,!0)],2))}}),_export_sfc=(t,a)=>{const r=t.__vccOpts||t;for(const[o,s]of a)r[o]=s;return r},Button=_export_sfc(_sfc_main$d,[["__scopeId","data-v-6c87ce6b"]]);var isVue2=!1;function set(t,a,r){return Array.isArray(t)?(t.length=Math.max(t.length,a),t.splice(a,1,r),r):(t[a]=r,r)}function del(t,a){if(Array.isArray(t)){t.splice(a,1);return}delete t[a]}/*!
* pinia v2.1.7
* (c) 2023 Eduardo San Martin Morote
* @license MIT
*/let activePinia;const setActivePinia=t=>activePinia=t,piniaSymbol=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function isPlainObject(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var MutationType;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(MutationType||(MutationType={}));const IS_CLIENT=typeof window<"u",USE_DEVTOOLS=(process.env.NODE_ENV!=="production"||!1)&&process.env.NODE_ENV!=="test"&&IS_CLIENT;function patchObject(t,a){for(const r in a){const o=a[r];if(!(r in t))continue;const s=t[r];isPlainObject(s)&&isPlainObject(o)&&!vue.isRef(o)&&!vue.isReactive(o)?t[r]=patchObject(s,o):t[r]=o}return t}const noop=()=>{};function addSubscription(t,a,r,o=noop){t.push(a);const s=()=>{const n=t.indexOf(a);n>-1&&(t.splice(n,1),o())};return!r&&vue.getCurrentScope()&&vue.onScopeDispose(s),s}function triggerSubscriptions(t,...a){t.slice().forEach(r=>{r(...a)})}const fallbackRunWithContext=t=>t();function mergeReactiveObjects(t,a){t instanceof Map&&a instanceof Map&&a.forEach((r,o)=>t.set(o,r)),t instanceof Set&&a instanceof Set&&a.forEach(t.add,t);for(const r in a){if(!a.hasOwnProperty(r))continue;const o=a[r],s=t[r];isPlainObject(s)&&isPlainObject(o)&&t.hasOwnProperty(r)&&!vue.isRef(o)&&!vue.isReactive(o)?t[r]=mergeReactiveObjects(s,o):t[r]=o}return t}const skipHydrateSymbol=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function shouldHydrate(t){return!isPlainObject(t)||!t.hasOwnProperty(skipHydrateSymbol)}const{assign}=Object;function isComputed(t){return!!(vue.isRef(t)&&t.effect)}function createOptionsStore(t,a,r,o){const{state:s,actions:n,getters:i}=a,l=r.state.value[t];let c;function d(){!l&&(process.env.NODE_ENV==="production"||!o)&&(r.state.value[t]=s?s():{});const m=process.env.NODE_ENV!=="production"&&o?vue.toRefs(vue.ref(s?s():{}).value):vue.toRefs(r.state.value[t]);return assign(m,n,Object.keys(i||{}).reduce((_,g)=>(process.env.NODE_ENV!=="production"&&g in m&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${t}".`),_[g]=vue.markRaw(vue.computed(()=>{setActivePinia(r);const $=r._s.get(t);return i[g].call($,$)})),_),{}))}return c=createSetupStore(t,d,a,r,o,!0),c}function createSetupStore(t,a,r={},o,s,n){let i;const l=assign({actions:{}},r);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const c={deep:!0};process.env.NODE_ENV!=="production"&&!isVue2&&(c.onTrigger=v=>{d?$=v:d==!1&&!f._hotUpdating&&(Array.isArray($)?$.push(v):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let d,m,_=[],g=[],$;const h=o.state.value[t];!n&&!h&&(process.env.NODE_ENV==="production"||!s)&&(o.state.value[t]={});const E=vue.ref({});let T;function p(v){let u;d=m=!1,process.env.NODE_ENV!=="production"&&($=[]),typeof v=="function"?(v(o.state.value[t]),u={type:MutationType.patchFunction,storeId:t,events:$}):(mergeReactiveObjects(o.state.value[t],v),u={type:MutationType.patchObject,payload:v,storeId:t,events:$});const b=T=Symbol();vue.nextTick().then(()=>{T===b&&(d=!0)}),m=!0,triggerSubscriptions(_,u,o.state.value[t])}const y=n?function(){const{state:u}=r,b=u?u():{};this.$patch(S=>{assign(S,b)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`)}:noop;function I(){i.stop(),_=[],g=[],o._s.delete(t)}function N(v,u){return function(){setActivePinia(o);const b=Array.from(arguments),S=[],V=[];function L(C){S.push(C)}function P(C){V.push(C)}triggerSubscriptions(g,{args:b,name:v,store:f,after:L,onError:P});let O;try{O=u.apply(this&&this.$id===t?this:f,b)}catch(C){throw triggerSubscriptions(V,C),C}return O instanceof Promise?O.then(C=>(triggerSubscriptions(S,C),C)).catch(C=>(triggerSubscriptions(V,C),Promise.reject(C))):(triggerSubscriptions(S,O),O)}}const w=vue.markRaw({actions:{},getters:{},state:[],hotState:E}),x={_p:o,$id:t,$onAction:addSubscription.bind(null,g),$patch:p,$reset:y,$subscribe(v,u={}){const b=addSubscription(_,v,u.detached,()=>S()),S=i.run(()=>vue.watch(()=>o.state.value[t],V=>{(u.flush==="sync"?m:d)&&v({storeId:t,type:MutationType.direct,events:$},V)},assign({},c,u)));return b},$dispose:I},f=vue.reactive(process.env.NODE_ENV!=="production"||USE_DEVTOOLS?assign({_hmrPayload:w,_customProperties:vue.markRaw(new Set)},x):x);o._s.set(t,f);const A=(o._a&&o._a.runWithContext||fallbackRunWithContext)(()=>o._e.run(()=>(i=vue.effectScope()).run(a)));for(const v in A){const u=A[v];if(vue.isRef(u)&&!isComputed(u)||vue.isReactive(u))process.env.NODE_ENV!=="production"&&s?set(E.value,v,vue.toRef(A,v)):n||(h&&shouldHydrate(u)&&(vue.isRef(u)?u.value=h[v]:mergeReactiveObjects(u,h[v])),o.state.value[t][v]=u),process.env.NODE_ENV!=="production"&&w.state.push(v);else if(typeof u=="function"){const b=process.env.NODE_ENV!=="production"&&s?u:N(v,u);A[v]=b,process.env.NODE_ENV!=="production"&&(w.actions[v]=u),l.actions[v]=u}else process.env.NODE_ENV!=="production"&&isComputed(u)&&(w.getters[v]=n?r.getters[v]:u,IS_CLIENT&&(A._getters||(A._getters=vue.markRaw([]))).push(v))}if(assign(f,A),assign(vue.toRaw(f),A),Object.defineProperty(f,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?E.value:o.state.value[t],set:v=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");p(u=>{assign(u,v)})}}),process.env.NODE_ENV!=="production"&&(f._hotUpdate=vue.markRaw(v=>{f._hotUpdating=!0,v._hmrPayload.state.forEach(u=>{if(u in f.$state){const b=v.$state[u],S=f.$state[u];typeof b=="object"&&isPlainObject(b)&&isPlainObject(S)?patchObject(b,S):v.$state[u]=S}set(f,u,vue.toRef(v.$state,u))}),Object.keys(f.$state).forEach(u=>{u in v.$state||del(f,u)}),d=!1,m=!1,o.state.value[t]=vue.toRef(v._hmrPayload,"hotState"),m=!0,vue.nextTick().then(()=>{d=!0});for(const u in v._hmrPayload.actions){const b=v[u];set(f,u,N(u,b))}for(const u in v._hmrPayload.getters){const b=v._hmrPayload.getters[u],S=n?vue.computed(()=>(setActivePinia(o),b.call(f,f))):b;set(f,u,S)}Object.keys(f._hmrPayload.getters).forEach(u=>{u in v._hmrPayload.getters||del(f,u)}),Object.keys(f._hmrPayload.actions).forEach(u=>{u in v._hmrPayload.actions||del(f,u)}),f._hmrPayload=v._hmrPayload,f._getters=v._getters,f._hotUpdating=!1})),USE_DEVTOOLS){const v={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(u=>{Object.defineProperty(f,u,assign({value:f[u]},v))})}return o._p.forEach(v=>{if(USE_DEVTOOLS){const u=i.run(()=>v({store:f,app:o._a,pinia:o,options:l}));Object.keys(u||{}).forEach(b=>f._customProperties.add(b)),assign(f,u)}else assign(f,i.run(()=>v({store:f,app:o._a,pinia:o,options:l})))}),process.env.NODE_ENV!=="production"&&f.$state&&typeof f.$state=="object"&&typeof f.$state.constructor=="function"&&!f.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
state: () => new MyClass()
Found in store "${f.$id}".`),h&&n&&r.hydrate&&r.hydrate(f.$state,h),d=!0,m=!0,f}function defineStore(t,a,r){let o,s;const n=typeof a=="function";if(typeof t=="string")o=t,s=n?r:a;else if(s=t,o=t.id,process.env.NODE_ENV!=="production"&&typeof o!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function i(l,c){const d=vue.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&activePinia&&activePinia._testing?null:l)||(d?vue.inject(piniaSymbol,null):null),l&&setActivePinia(l),process.env.NODE_ENV!=="production"&&!activePinia)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
This will fail in production.`);l=activePinia,l._s.has(o)||(n?createSetupStore(o,a,s,l):createOptionsStore(o,s,l),process.env.NODE_ENV!=="production"&&(i._pinia=l));const m=l._s.get(o);if(process.env.NODE_ENV!=="production"&&c){const _="__hot:"+o,g=n?createSetupStore(_,a,s,l,!0):createOptionsStore(_,assign({},s),l,!0);c._hotUpdate(g),delete l.state.value[_],l._s.delete(_)}if(process.env.NODE_ENV!=="production"&&IS_CLIENT){const _=vue.getCurrentInstance();if(_&&_.proxy&&!c){const g=_.proxy,$="_pStores"in g?g._pStores:g._pStores={};$[o]=m}}return m}return i.$id=o,i}let random=t=>crypto.getRandomValues(new Uint8Array(t)),customRandom=(t,a,r)=>{let o=(2<<Math.log(t.length-1)/Math.LN2)-1,s=-~(1.6*o*a/t.length);return(n=a)=>{let i="";for(;;){let l=r(s),c=s;for(;c--;)if(i+=t[l[c]&o]||"",i.length===n)return i}}},customAlphabet=(t,a=21)=>customRandom(t,a,random);const getDefaultProps=()=>({uuid:"",type:"braid-txt",name:"",isEdit:!0,dragable:!0,resizable:!0,width:120,height:40,left:50,top:0,value:"自定义文本",title:"自定义文本",defaultValue:"自定义文本",style:{zIndex:1}}),getCodeTypeArray=()=>["128A","128B","128C","128Auto","EAN8","EAN13","EAN128A","EAN128B","EAN128C","Code39","39Extended","2_5interleaved","2_5industrial","2_5matrix","UPC_A","UPC_E0","UPC_E1","UPCsupp2","UPCsupp5","Code93","93Extended","MSI","PostNet","Codabar","QRCode","PDF417"],getItemTypeArray=()=>[{label:"普通项",value:0},{label:"页眉页脚",value:1},{label:"页号项",value:2},{label:"页数项",value:3},{label:"多页项",value:4}],actions={addTempItem(t,a){this.addTempItems(t,a),this.select(t,{uuid:t.page.tempItems[t.page.tempItems.length-1].uuid})},async designerInit(t,a){this.initOptionItems(t,a.options),this.initPage(t,a.tempValue)},initPage(t,a){t.page=a;let r=a.tempItems?a.tempItems.map(o=>({...t.widgetSetting[o.type],...o,style:{...t.widgetSetting[o.type].style,...o.style||{}}})):[];t.page.tempItems=r},initOptionItems(t,a){let r=a?a.map(o=>({...t.widgetSetting[o.type],...o,style:{...t.widgetSetting[o.type].style,...o.style||{}}})):[];t.optionItems=r},initActive(t){t.activeElement=getDefaultProps()},initmove(t,a){t.startX=a.startX,t.startY=a.startY,t.originX=a.originX,t.originY=a.originY,t.moving=!0},select(t,a){if(t.uuid=a.uuid,a.uuid===-1)t.activeElement=getDefaultProps(),t.type="page";else{let r=t.page.tempItems.find(o=>o.uuid===a.uuid);r&&(t.activeElement=r,t.type=r.type)}},stopmove(t){t.moving=!1},move(t,a){var r=t.activeElement,o=a.x-t.startX,s=a.y-t.startY,n=t.originX+Math.floor(o*100/t.zoom),i=t.originY+Math.floor(s*100/t.zoom);r.left=n>0?n:0,r.top=i>0?i:0},resize(t,a){var r=a.x-t.startX,o=a.y-t.startY,s;if(a.type==="right"){s=t.originX+Math.floor(r*100/t.zoom),t.activeElement.width=s>10?s:10;return}if(a.type==="down"){s=t.originX+Math.floor(o*100/t.zoom),t.activeElement.height=s>10?s:10;return}if(a.type==="left"){var n=t.originX+Math.floor(r*100/t.zoom),i=t.originY-Math.floor(r*100/t.zoom);t.activeElement.left=n>0?n:0,t.activeElement.width=i>10?i:10;return}if(a.type==="up"){var l=t.originX+Math.floor(o*100/t.zoom),c=t.originY-Math.floor(o*100/t.zoom);t.activeElement.top=l>0?l:0,t.activeElement.height=c>10?c:10}},updateSrollTop(t,a){t.top=a},zoom(t,a){t.zoom=a},delete(t,a){var r=t.type;if(r==="page")return;let o=0;t.page.tempItems.forEach((s,n)=>{s.uuid===a&&(o=n)}),t.page.tempItems.splice(o,1),t.activeElement=getDefaultProps(),t.type="page",t.uuid=-1},addTempItems(t,a){let r={uuid:customAlphabet("1234567890abcdef",10)},o=JSON.parse(JSON.stringify(a));t.page.tempItems.push(Object.assign(o,r))},updateData(t,{uuid:a,value:r}){let o=t.page.tempItems.find(s=>s.uuid===a);o&&(o.value=r)},setTempId(t,a){t.tempId=a},setLoading(t,a){t.loading=a},setWidgetSetting(t,a){t.widgetSetting=a}},WIDGET_NAME$4="braid-txt",_sfc_main$c={name:WIDGET_NAME$4,setting:{type:WIDGET_NAME$4,isEdit:!0,dragable:!0,resizable:!0,width:120,height:40,left:50,top:0,title:"自定义文本",value:"自定义文本",defaultValue:"自定义文本",name:"",style:{zIndex:0,FontSize:9,FontColor:"#000000",Bold:!1,Italic:!1,Underline:!1,Alignment:"left",ItemType:0}},props:["val"],methods:{updateText(t,a){let r=t.target.innerHTML;useStore().updateData(useStore().state,{uuid:a,key:"value",value:r})}}},_hoisted_1$b=["innerHTML","contenteditable"];function _sfc_render$b(t,a,r,o,s,n){return vue.openBlock(),vue.createElementBlock("div",{class:"widgets",innerHTML:r.val.value,contenteditable:!!r.val.isEdit,onBlur:a[0]||(a[0]=i=>n.updateText(i,r.val.uuid)),style:vue.normalizeStyle({position:"absolute",left:r.val.left+"px",top:r.val.top+"px",width:r.val.width+"px",minHeight:r.val.height+"px",zIndex:r.val.style.zIndex,fontSize:r.val.style.FontSize+"pt",color:r.val.style.FontColor,textAlign:r.val.style.Alignment,fontWeight:r.val.style.Bold?"bold":"normal"})},null,44,_hoisted_1$b)}const braidTxt=_export_sfc(_sfc_main$c,[["render",_sfc_render$b]]),WIDGET_NAME$3="bar-code",_sfc_main$b={name:WIDGET_NAME$3,setting:{type:WIDGET_NAME$3,isEdit:!1,dragable:!0,resizable:!0,width:120,height:40,left:50,top:0,title:"条码",value:"1234567890",defaultValue:"1234567890",name:"",style:{zIndex:0,FontSize:9,ShowBarText:!1,codeType:"Code39",ItemType:0}},props:["val"],data(){return{}},computed:{codeUrl(){return this.val.style.codeType==="QRCode"?require("./QRCode.png"):this.val.style.codeType==="PDF417"?require("./PDF417.png"):require("./barCode.png")}}},_hoisted_1$a=["src"];function _sfc_render$a(t,a,r,o,s,n){return vue.openBlock(),vue.createElementBlock("div",{class:"bar-code",style:vue.normalizeStyle({position:"absolute",width:r.val.width+"px",height:r.val.height+"px",left:r.val.left+"px",top:r.val.top+"px",zIndex:r.val.zIndex})},[vue.createElementVNode("img",{src:n.codeUrl},null,8,_hoisted_1$a),vue.createElementVNode("div",{class:"text",style:vue.normalizeStyle({display:r.val.style.ShowBarText?"":"none",fontSize:r.val.style.FontSize+"pt",fontWeight:r.val.style.Bold?"bold":"normal"})},"1234567890",4)],4)}const barCode=_export_sfc(_sfc_main$b,[["render",_sfc_render$a],["__scopeId","data-v-6c5b651d"]]),WIDGET_NAME$2="braid-table",_sfc_main$a={name:WIDGET_NAME$2,setting:{type:WIDGET_NAME$2,isEdit:!1,dragable:!0,resizable:!0,width:240,height:60,left:50,top:10,title:"表格",value:[],defaultValue:[],tabelHtml:"",columnsAttr:[],columns:[],selectCol:[],name:"",style:{zIndex:0,Alignment:"left",FontSize:9,FontColor:"#000000",BorderColor:"#000000",AutoHeight:!1,BottomMargin:0}},props:["val"],computed:{columns(){return this.val.columns||[]}},methods:{}},_hoisted_1$9={border:"1",width:"100%",cellspacing:"0",cellpadding:"2",style:{"border-collapse":"collapse","font-size":"12px"},bordercolor:"#000000"},_hoisted_2$4=["width"];function _sfc_render$9(t,a,r,o,s,n){return vue.openBlock(),vue.createElementBlock("div",{class:"widgets",style:vue.normalizeStyle([{left:r.val.left+"px",top:r.val.top+"px",width:r.val.width+"px",height:r.val.height+"px",textAlign:r.val.style.Alignment,fontSize:r.val.style.FontSize+"pt",color:r.val.style.FontColor},{position:"absolute",overflow:"hidden"}])},[vue.createElementVNode("table",_hoisted_1$9,[vue.createElementVNode("tr",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.columns,i=>(vue.openBlock(),vue.createElementBlock("th",{key:i.name,width:i.name==="_seq"?40:""},vue.toDisplayString(i.title),9,_hoisted_2$4))),128))]),vue.createElementVNode("tr",null,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.columns,i=>(vue.openBlock(),vue.createElementBlock("td",{key:i.name},vue.toDisplayString(i.value),1))),128))])])],4)}const table=_export_sfc(_sfc_main$a,[["render",_sfc_render$9]]),WIDGET_NAME$1="braid-image",_sfc_main$9={name:WIDGET_NAME$1,setting:{type:WIDGET_NAME$1,title:"图片",isEdit:!1,dragable:!0,resizable:!0,width:120,height:40,left:50,top:0,value:"",defaultValue:"",name:"",style:{zIndex:0,ItemType:0}},props:["val"],data(){return{}},computed:{imageUrl(){return this.val.value}},watch:{val(t){this.imageUrl=t.value}}},_hoisted_1$8=["title","src"];function _sfc_render$8(t,a,r,o,s,n){return vue.openBlock(),vue.createElementBlock("div",{class:"widgets",style:vue.normalizeStyle({position:"absolute",width:r.val.width+"px",height:r.val.height+"px",left:r.val.left+"px",top:r.val.top+"px",zIndex:r.val.zIndex})},[vue.createElementVNode("img",{class:"braid-image",title:r.val.title,src:r.val.value||r.val.defaultValue},null,8,_hoisted_1$8)],4)}const image=_export_sfc(_sfc_main$9,[["render",_sfc_render$8],["__scopeId","data-v-0839a766"]]),WIDGET_NAME="braid-html",_sfc_main$8={name:WIDGET_NAME,setting:{type:WIDGET_NAME,isEdit:!1,dragable:!0,resizable:!0,width:120,height:40,left:50,top:0,title:"html",value:"<div>html<div>",defaultValue:"<div>html<div>",name:"",style:{zIndex:0,ItemType:0,AutoHeight:!1,BottomMargin:0}},props:["val"],methods:{updateText(t,a){let r=t.target.innerHTML;useStore().updateData(useStore().state,{uuid:a,key:"value",value:r})}}},_hoisted_1$7=["innerHTML","contenteditable"];function _sfc_render$7(t,a,r,o,s,n){return vue.openBlock(),vue.createElementBlock("div",{class:"widgets",innerHTML:r.val.value,contenteditable:!!r.val.isEdit,onBlur:a[0]||(a[0]=i=>n.updateText(i,r.val.uuid)),style:vue.normalizeStyle({position:"absolute",left:r.val.left+"px",top:r.val.top+"px",width:r.val.width+"px",minHeight:r.val.height+"px",zIndex:r.val.style.zIndex,fontSize:r.val.style.FontSize+"pt",color:r.val.style.FontColor})},null,44,_hoisted_1$7)}const html=_export_sfc(_sfc_main$8,[["render",_sfc_render$7]]),install=function(t){t.component(braidTxt.name,braidTxt),t.component(barCode.name,barCode),t.component(table.name,table),t.component(image.name,image),t.component(html.name,html)},getWidgetsSetting=function(){return{[braidTxt.name]:braidTxt.setting,[barCode.name]:barCode.setting,[table.name]:table.setting,[image.name]:image.setting,[html.name]:html.setting}},widgets={install,getWidgetsSetting},state={zoom:100,type:"page",index:-1,uuid:-1,originX:0,originY:0,startX:0,startY:0,moving:!1,activeElement:getDefaultProps(),page:{title:"demo",width:750,height:550,pageWidth:750,pageHeight:550,tempItems:[]},optionItems:[],tempId:"",loading:!1,widgetSetting:widgets.getWidgetsSetting()},useStore=defineStore("main",{state:()=>({state}),getters:{},actions}),_sfc_main$7={data(){return{type:""}},computed:{optionsType(){return useStore().state.type},elm(){let t=useStore().state.activeElement;return t.resizable?t:""}},methods:{handlemousedown(t,a,r,o){t.stopPropagation(),this.type=a,useStore().initmove(useStore().state,{startX:t.pageX,startY:t.pageY,originX:this.elm[r],originY:this.elm[o]}),document.addEventListener("mousemove",this.handlemousemove,!0),document.addEventListener("mouseup",this.handlemouseup,!0)},handlemousemove(t){t.stopPropagation(),t.preventDefault(),useStore().resize(useStore().state,{x:t.pageX,y:t.pageY,type:this.type})},handlemouseup(){document.removeEventListener("mousemove",this.handlemousemove,!0),document.removeEventListener("mouseup",this.handlemouseup,!0),useStore().stopmove(useStore().state)}}},_withScopeId=t=>(vue.pushScopeId("data-v-0b37bca1"),t=t(),vue.popScopeId(),t),_hoisted_1$6=_withScopeId(()=>vue.createElementVNode("div",{class:"square"},null,-1)),_hoisted_2$3=[_hoisted_1$6],_hoisted_3$2=_withScopeId(()=>vue.createElementVNode("div",{class:"square"},null,-1)),_hoisted_4$1=[_hoisted_3$2],_hoisted_5$1=_withScopeId(()=>vue.createElementVNode("div",{class:"square"},null,-1)),_hoisted_6=[_hoisted_5$1],_hoisted_7=_withScopeId(()=>vue.createElementVNode("div",{class:"square"},null,-1)),_hoisted_8=[_hoisted_7];function _sfc_render$6(t,a,r,o,s,n){return vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",{style:vue.normalizeStyle({height:n.elm.height+"px",top:n.elm.top+"px",left:n.elm.left+"px"}),class:"verti",onMousedown:a[0]||(a[0]=i=>n.handlemousedown(i,"left","left","width"))},_hoisted_2$3,36),vue.createElementVNode("div",{style:vue.normalizeStyle({height:n.elm.height+"px",top:n.elm.top+"px",left:n.elm.left+n.elm.width+"px"}),class:"verti",onMousedown:a[1]||(a[1]=i=>n.handlemousedown(i,"right","width"))},_hoisted_4$1,36),vue.createElementVNode("div",{style:vue.normalizeStyle({width:n.elm.width+"px",top:n.elm.top+"px",left:n.elm.left+"px"}),class:"horiz",onMousedown:a[2]||(a[2]=i=>n.handlemousedown(i,"up","top","height"))},_hoisted_6,36),vue.createElementVNode("div",{style:vue.normalizeStyle({width:n.elm.width+"px",top:n.elm.top+n.elm.height+"px",left:n.elm.left+"px"}),class:"horiz",onMousedown:a[3]||(a[3]=i=>n.handlemousedown(i,"down","height"))},_hoisted_8,36)],512)),[[vue.vShow,n.optionsType!=="page"]])}const control=_export_sfc(_sfc_main$7,[["render",_sfc_render$6],["__scopeId","data-v-0b37bca1"]]),move={methods:{initmovement(t){var a=useStore().state.activeElement;useStore().initmove(useStore().state,{startX:t.pageX,startY:t.pageY,originX:a.left,originY:a.top}),document.addEventListener("mousemove",this.handlemousemove,!0),document.addEventListener("mouseup",this.handlemouseup,!0)},handlemousemove(t){t.stopPropagation(),t.preventDefault(),useStore().move(useStore().state,{x:t.pageX,y:t.pageY})},handlemouseup(){document.removeEventListener("mousemove",this.handlemousemove,!0),document.removeEventListener("mouseup",this.handlemouseup,!0),useStore().stopmove(useStore().state)}}},_sfc_main$6={components:{control},mixins:[move],data(){return{}},computed:{widgetStore(){return useStore().state.page.tempItems},backImg(){return useStore().state.page.imageUrl?useStore().state.page.imageUrl:""},page(){return useStore().state.page},widgetId(){return useStore().state.uuid}},mounted(){let t=document.getElementById("viewport");t?t.addEventListener("mousedown",this.handleSelection,!1):console.error("未找的‘viewport’节点"),document.addEventListener("keydown",a=>{a.stopPropagation();var r=useStore().state.activeElement;if(a.keyCode===37&&r.left){r.left-=1;return}if(a.keyCode===38&&r.top){a.preventDefault(),r.top-=1;return}if(a.keyCode===39&&r.left){r.left+=1;return}a.keyCode===40&&r.top&&(a.preventDefault(),r.top+=1)},!0)},methods:{handleSelection(t){var a=this.selectTarget(t.target);if(a){var r=a.getAttribute("data-uuid");useStore().select(useStore().state,{uuid:r||-1}),a=useStore().state.activeElement,a.dragable&&this.initmovement(t)}else useStore().select(useStore().state,{uuid:-1})},selectTarget(t){let a=t.getAttribute("data-type");return a?a==="viewport"?!1:t:this.selectTarget(t.parentNode)}}},_hoisted_1$5={id:"viewport","data-type":"viewport",class:"holder"};function _sfc_render$5(t,a,r,o,s,n){const i=vue.resolveComponent("control");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$5,[vue.createElementVNode("div",{style:vue.normalizeStyle({height:n.page.height+"px",width:n.page.width+"px",backgroundImage:"url("+n.backImg+")"}),class:"screen"},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.widgetStore,l=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(l.type),{"data-title":l.type,class:vue.normalizeClass([{active:n.widgetId===l.uuid},"layer"]),key:l.uuid,val:l,"data-type":l.type,"data-uuid":l.uuid},null,8,["data-title","class","val","data-type","data-uuid"]))),128)),vue.createVNode(i)],4)])}const Viewport=_export_sfc(_sfc_main$6,[["render",_sfc_render$5],["__scopeId","data-v-fba8105c"]]),_sfc_main$5={computed:{pageInfo(){return useStore().state.page}}},_hoisted_1$4=vue.createElementVNode("span",{class:"unit-text"},"(mm)",-1),_hoisted_2$2=vue.createElementVNode("span",{class:"unit-text"},"(mm)",-1);function _sfc_render$4(t,a,r,o,s,n){const i=vue.resolveComponent("el-input"),l=vue.resolveComponent("el-form-item"),c=vue.resolveComponent("el-row"),d=vue.resolveComponent("el-input-number"),m=vue.resolveComponent("el-col"),_=vue.resolveComponent("el-form");return vue.openBlock(),vue.createElementBlock("div",null,[vue.createVNode(_,{"label-width":"80px",model:n.pageInfo,size:"mini",class:"kr-form"},{default:vue.withCtx(()=>[vue.createVNode(c,null,{default:vue.withCtx(()=>[vue.createVNode(l,{label:"模板名称"},{default:vue.withCtx(()=>[vue.createVNode(i,{modelValue:n.pageInfo.title,"onUpdate:modelValue":a[0]||(a[0]=g=>n.pageInfo.title=g),class:"full-w"},null,8,["modelValue"])]),_:1})]),_:1}),vue.createVNode(c,null,{default:vue.withCtx(()=>[vue.createVNode(m,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"模板宽度"},{default:vue.withCtx(()=>[vue.createVNode(d,{modelValue:n.pageInfo.width,"onUpdate:modelValue":a[1]||(a[1]=g=>n.pageInfo.width=g),"controls-position":"right",min:0,class:"min-input"},null,8,["modelValue"])]),_:1})]),_:1}),vue.createVNode(m,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"模板高度"},{default:vue.withCtx(()=>[vue.createVNode(d,{modelValue:n.pageInfo.height,"onUpdate:modelValue":a[2]||(a[2]=g=>n.pageInfo.height=g),"controls-position":"right",min:0,class:"min-input"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),vue.createVNode(c,null,{default:vue.withCtx(()=>[vue.createVNode(l,{label:"纸张宽度"},{default:vue.withCtx(()=>[vue.createVNode(d,{modelValue:n.pageInfo.pageWidth,"onUpdate:modelValue":a[3]||(a[3]=g=>n.pageInfo.pageWidth=g),"controls-position":"right",min:0,class:"min-input"},null,8,["modelValue"]),_hoisted_1$4]),_:1})]),_:1}),vue.createVNode(c,null,{default:vue.withCtx(()=>[vue.createVNode(l,{label:"纸张高度"},{default:vue.withCtx(()=>[vue.createVNode(d,{modelValue:n.pageInfo.pageHeight,"onUpdate:modelValue":a[4]||(a[4]=g=>n.pageInfo.pageHeight=g),"controls-position":"right",min:0,class:"min-input"},null,8,["modelValue"]),_hoisted_2$2]),_:1})]),_:1})]),_:1},8,["model"])])}const page=_export_sfc(_sfc_main$5,[["render",_sfc_render$4]]),_sfc_main$4={data(){return{codeTypeArray:getCodeTypeArray(),itemTypeArray:getItemTypeArray()}},computed:{activeElement(){return useStore().state.activeElement},height(){return useStore().state.page.height}}};function _sfc_render$3(t,a,r,o,s,n){const i=vue.resolveComponent("el-input-number"),l=vue.resolveComponent("el-form-item"),c=vue.resolveComponent("el-col"),d=vue.resolveComponent("el-row"),m=vue.resolveComponent("el-switch"),_=vue.resolveComponent("el-color-picker"),g=vue.resolveComponent("el-radio"),$=vue.resolveComponent("el-radio-group"),h=vue.resolveComponent("el-option"),E=vue.resolveComponent("el-select"),T=vue.resolveComponent("el-form");return vue.openBlock(),vue.createElementBlock("div",null,[vue.createVNode(T,{"label-width":"80px",model:n.activeElement,size:"mini",class:"kr-form"},{default:vue.withCtx(()=>[vue.createVNode(d,null,{default:vue.withCtx(()=>[vue.createVNode(c,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"宽度"},{default:vue.withCtx(()=>[vue.createVNode(i,{modelValue:n.activeElement.width,"onUpdate:modelValue":a[0]||(a[0]=p=>n.activeElement.width=p),"controls-position":"right",min:1,class:"min-input"},null,8,["modelValue"])]),_:1})]),_:1}),vue.createVNode(c,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"高度"},{default:vue.withCtx(()=>[vue.createVNode(i,{modelValue:n.activeElement.height,"onUpdate:modelValue":a[1]||(a[1]=p=>n.activeElement.height=p),"controls-position":"right",min:1,class:"min-input"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),vue.createVNode(d,null,{default:vue.withCtx(()=>[vue.createVNode(c,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"横坐标"},{default:vue.withCtx(()=>[vue.createVNode(i,{modelValue:n.activeElement.left,"onUpdate:modelValue":a[2]||(a[2]=p=>n.activeElement.left=p),"controls-position":"right",min:0,class:"min-input"},null,8,["modelValue"])]),_:1})]),_:1}),vue.createVNode(c,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"纵坐标"},{default:vue.withCtx(()=>[vue.createVNode(i,{modelValue:n.activeElement.top,"onUpdate:modelValue":a[3]||(a[3]=p=>n.activeElement.top=p),"controls-position":"right",min:0,class:"min-input"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),vue.createVNode(d,null,{default:vue.withCtx(()=>[vue.createVNode(c,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"字号"},{default:vue.withCtx(()=>[vue.createVNode(i,{disabled:n.activeElement.style.FontSize===void 0,modelValue:n.activeElement.style.FontSize,"onUpdate:modelValue":a[4]||(a[4]=p=>n.activeElement.style.FontSize=p),"controls-position":"right",min:0,class:"min-input"},null,8,["disabled","modelValue"])]),_:1})]),_:1}),vue.createVNode(c,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"加粗"},{default:vue.withCtx(()=>[vue.createVNode(m,{disabled:n.activeElement.style.Bold===void 0,modelValue:n.activeElement.style.Bold,"onUpdate:modelValue":a[5]||(a[5]=p=>n.activeElement.style.Bold=p),"active-value":!0,"inactive-value":!1},null,8,["disabled","modelValue"])]),_:1})]),_:1})]),_:1}),vue.createVNode(d,null,{default:vue.withCtx(()=>[vue.createVNode(c,{span:8},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"字体颜色"},{default:vue.withCtx(()=>[vue.createVNode(_,{disabled:n.activeElement.style.FontColor===void 0,modelValue:n.activeElement.style.FontColor,"onUpdate:modelValue":a[6]||(a[6]=p=>n.activeElement.style.FontColor=p)},null,8,["disabled","modelValue"])]),_:1})]),_:1}),vue.createVNode(c,{span:8},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"边框颜色"},{default:vue.withCtx(()=>[vue.createVNode(_,{disabled:n.activeElement.style.BorderColor===void 0,modelValue:n.activeElement.style.BorderColor,"onUpdate:modelValue":a[7]||(a[7]=p=>n.activeElement.style.BorderColor=p)},null,8,["disabled","modelValue"])]),_:1})]),_:1}),vue.createVNode(c,{span:8},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"条码值"},{default:vue.withCtx(()=>[vue.createVNode(m,{disabled:n.activeElement.style.ShowBarText===void 0,modelValue:n.activeElement.style.ShowBarText,"onUpdate:modelValue":a[8]||(a[8]=p=>n.activeElement.style.ShowBarText=p),"active-value":!0,"inactive-value":!1},null,8,["disabled","modelValue"])]),_:1})]),_:1})]),_:1}),vue.createVNode(d,null,{default:vue.withCtx(()=>[vue.createVNode(l,{label:"对齐方式"},{default:vue.withCtx(()=>[vue.createVNode($,{disabled:n.activeElement.style.Alignment===void 0,modelValue:n.activeElement.style.Alignment,"onUpdate:modelValue":a[9]||(a[9]=p=>n.activeElement.style.Alignment=p)},{default:vue.withCtx(()=>[vue.createVNode(g,{label:"left"},{default:vue.withCtx(()=>[vue.createTextVNode("左对齐")]),_:1}),vue.createVNode(g,{label:"center"},{default:vue.withCtx(()=>[vue.createTextVNode("居中")]),_:1}),vue.createVNode(g,{label:"right"},{default:vue.withCtx(()=>[vue.createTextVNode("右对齐")]),_:1})]),_:1},8,["disabled","modelValue"])]),_:1})]),_:1}),vue.createVNode(d,null,{default:vue.withCtx(()=>[vue.createVNode(c,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"条码类型"},{default:vue.withCtx(()=>[vue.createVNode(E,{disabled:n.activeElement.style.codeType===void 0,modelValue:n.activeElement.style.codeType,"onUpdate:modelValue":a[10]||(a[10]=p=>n.activeElement.style.codeType=p),class:"min-input"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(s.codeTypeArray,p=>(vue.openBlock(),vue.createBlock(h,{key:p,label:p,value:p},null,8,["label","value"]))),128))]),_:1},8,["disabled","modelValue"])]),_:1})]),_:1}),vue.createVNode(c,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"打印类型"},{default:vue.withCtx(()=>[vue.createVNode(E,{disabled:n.activeElement.style.ItemType===void 0,modelValue:n.activeElement.style.ItemType,"onUpdate:modelValue":a[11]||(a[11]=p=>n.activeElement.style.ItemType=p),class:"min-input"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(s.itemTypeArray,p=>(vue.openBlock(),vue.createBlock(h,{key:p.value,label:p.label,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["disabled","modelValue"])]),_:1})]),_:1}),vue.createVNode(c,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"高度自动"},{default:vue.withCtx(()=>[vue.createVNode(m,{disabled:n.activeElement.style.AutoHeight===void 0,modelValue:n.activeElement.style.AutoHeight,"onUpdate:modelValue":a[12]||(a[12]=p=>n.activeElement.style.AutoHeight=p),"active-value":!0,"inactive-value":!1},null,8,["disabled","modelValue"])]),_:1})]),_:1}),vue.createVNode(c,{span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:"下边距"},{default:vue.withCtx(()=>[vue.createVNode(i,{disabled:n.activeElement.style.BottomMargin===void 0||!n.activeElement.style.AutoHeight,modelValue:n.activeElement.style.BottomMargin,"onUpdate:modelValue":a[13]||(a[13]=p=>n.activeElement.style.BottomMargin=p),"controls-position":"right",min:0,class:"min-input"},null,8,["disabled","modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])])}const style=_export_sfc(_sfc_main$4,[["render",_sfc_render$3],["__scopeId","data-v-102d12e4"]]),_sfc_main$3={data(){return{tablePopover:!1}},computed:{optionItems(){return useStore().state.optionItems}},methods:{addTempItem(t,a){switch(a.type){case"braid-table":{let r=[];a.selectCol.forEach(o=>{let s=a.columnsAttr.find(n=>n.name===o);s&&r.push(s)}),a.columns=r,useStore().addTempItem(useStore().state,a),this.tablePopover=!1;break}default:useStore().addTempItem(useStore().state,a)}}}},_hoisted_1$3={class:"options-box"};function _sfc_render$2(t,a,r,o,s,n){const i=vue.resolveComponent("el-button"),l=vue.resolveComponent("el-checkbox"),c=vue.resolveComponent("el-col"),d=vue.resolveComponent("el-row"),m=vue.resolveComponent("el-checkbox-group"),_=vue.resolveComponent("el-popover");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$3,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.optionItems,(g,$)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:$},[g.type=="braid-table"?(vue.openBlock(),vue.createBlock(_,{key:0,placement:"right",width:400,trigger:"click"},{reference:vue.withCtx(()=>[vue.createVNode(i,{size:"mini"},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(g.title),1)]),_:2},1024)]),default:vue.withCtx(()=>[vue.createElementVNode("div",null,[vue.createVNode(m,{modelValue:g.selectCol,"onUpdate:modelValue":h=>g.selectCol=h},{default:vue.withCtx(()=>[vue.createVNode(d,null,{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(g.columnsAttr,h=>(vue.openBlock(),vue.createBlock(c,{key:h.name,span:12},{default:vue.withCtx(()=>[vue.createVNode(l,{label:h.name},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(h.title),1)]),_:2},1032,["label"])]),_:2},1024))),128))]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue"]),vue.createVNode(i,{size:"mini",type:"primary",onClick:h=>{n.addTempItem(h,g)}},{default:vue.withCtx(()=>[vue.createTextVNode("确定")]),_:2},1032,["onClick"])])]),_:2},1024)):(vue.openBlock(),vue.createBlock(i,{key:1,size:"mini",onClick:h=>{n.addTempItem(h,g)}},{default:vue.withCtx(()=>[vue.createTextVNode("222"+vue.toDisplayString(g.title),1)]),_:2},1032,["onClick"]))],64))),128))])}const options=_export_sfc(_sfc_main$3,[["render",_sfc_render$2],["__scopeId","data-v-84736db2"]]);function cumulativeOffset(t){let a=t.offsetTop,r=t.offsetLeft;return{top:a,left:r}}function checkInView(t){let a=t.getBoundingClientRect();return a.top>0&&a.top<window.innerHeight&&a.left<window.innerWidth&&a.right>0}const _sfc_main$2={computed:{layers(){return useStore().state.page.tempItems},activeElement(){return useStore().state.activeElement}},methods:{activeLayer(t,a){useStore().select(useStore().state,{uuid:a.uuid});let r=document.querySelector("#viewport");if(r){let o=r.querySelector(`[data-uuid='${a.uuid}']`);o&&!checkInView(o)&&(r.scrollTop=cumulativeOffset(o).top-50)}else console.error('未找到 "#viewport" 的节点')},dele(t,a){useStore().delete(useStore().state,a.uuid)}}},_hoisted_1$2={class:"tag-box"};function _sfc_render$1(t,a,r,o,s,n){const i=vue.resolveComponent("el-tag");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$2,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.layers,(l,c)=>(vue.openBlock(),vue.createBlock(i,{key:c,closable:l===n.activeElement,size:"small",type:l===n.activeElement?"":"info",onClick:d=>{n.activeLayer(d,l)},onClose:d=>{n.dele(d,l)}},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(l.title),1)]),_:2},1032,["closable","type","onClick","onClose"]))),128))])}const layers=_export_sfc(_sfc_main$2,[["render",_sfc_render$1],["__scopeId","data-v-1b2ea45d"]]),_sfc_main$1={components:{page,appearance:style,options,layers},data(){return{activeNames:["1","2","3","4"]}}},_hoisted_1$1={class:"kr-collapse"},_hoisted_2$1=vue.createElementVNode("span",null,"页面参数",-1),_hoisted_3$1=vue.createElementVNode("span",null,"样式",-1),_hoisted_4=vue.createElementVNode("span",null,"组件",-1),_hoisted_5=vue.createElementVNode("span",null,"已加组件",-1);function _sfc_render(t,a,r,o,s,n){const i=vue.resolveComponent("page"),l=vue.resolveComponent("el-collapse-item"),c=vue.resolveComponent("appearance"),d=vue.resolveComponent("options"),m=vue.resolveComponent("layers"),_=vue.resolveComponent("el-collapse");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1,[vue.createVNode(_,{modelValue:s.activeNames,"onUpdate:modelValue":a[0]||(a[0]=g=>s.activeNames=g)},{default:vue.withCtx(()=>[vue.createVNode(l,{title:"",name:"1"},{title:vue.withCtx(()=>[_hoisted_2$1]),default:vue.withCtx(()=>[vue.createVNode(i)]),_:1}),vue.createVNode(l,{name:"2"},{title:vue.withCtx(()=>[_hoisted_3$1]),default:vue.withCtx(()=>[vue.createVNode(c,{class:"pd-l-10"})]),_:1}),vue.createVNode(l,{name:"3"},{title:vue.withCtx(()=>[_hoisted_4]),default:vue.withCtx(()=>[vue.createVNode(d)]),_:1}),vue.createVNode(l,{name:"4"},{title:vue.withCtx(()=>[_hoisted_5]),default:vue.withCtx(()=>[vue.createVNode(m)]),_:1})]),_:1},8,["modelValue"])])}const Panel=_export_sfc(_sfc_main$1,[["render",_sfc_render]]);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$2(t,a){return t===a||t!==t&&a!==a}var eq_1=eq$2,eq$1=eq_1;function assocIndexOf$4(t,a){for(var r=t.length;r--;)if(eq$1(t[r][0],a))return r;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(t){var a=this.__data__,r=assocIndexOf$3(a,t);if(r<0)return!1;var o=a.length-1;return r==o?a.pop():splice.call(a,r,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(t){var a=this.__data__,r=assocIndexOf$2(a,t);return r<0?void 0:a[r][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(t){return assocIndexOf$1(this.__data__,t)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(t,a){var r=this.__data__,o=assocIndexOf(r,t);return o<0?(++this.size,r.push([t,a])):r[o][1]=a,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(t){var a=-1,r=t==null?0:t.length;for(this.clear();++a<r;){var o=t[a];this.set(o[0],o[1])}}ListCache$4.prototype.clear=listCacheClear,ListCache$4.prototype.delete=listCacheDelete,ListCache$4.prototype.get=listCacheGet,ListCache$4.prototype.has=listCacheHas,ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4,ListCache$3=_ListCache;function stackClear$1(){this.__data__=new ListCache$3,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(t){var a=this.__data__,r=a.delete(t);return this.size=a.size,r}var _stackDelete=stackDelete$1;function stackGet$1(t){return this.__data__.get(t)}var _stackGet=stackGet$1;function stackHas$1(t){return this.__data__.has(t)}var _stackHas=stackHas$1,freeGlobal$1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$8=freeGlobal||freeSelf||Function("return this")(),_root=root$8,root$7=_root,Symbol$4=root$7.Symbol,_Symbol=Symbol$4,Symbol$3=_Symbol,objectProto$c=Object.prototype,hasOwnProperty$9=objectProto$c.hasOwnProperty,nativeObjectToString$1=objectProto$c.toString,symToStringTag$1=Symbol$3?Symbol$3.toStringTag:void 0;function getRawTag$1(t){var a=hasOwnProperty$9.call(t,symToStringTag$1),r=t[symToStringTag$1];try{t[symToStringTag$1]=void 0;var o=!0}catch{}var s=nativeObjectToString$1.call(t);return o&&(a?t[symToStringTag$1]=r:delete t[symToStringTag$1]),s}var _getRawTag=getRawTag$1,objectProto$b=Object.prototype,nativeObjectToString=objectProto$b.toString;function objectToString$1(t){return nativeObjectToString.call(t)}var _objectToString=objectToString$1,Symbol$2=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$2?Symbol$2.toStringTag:void 0;function baseGetTag$4(t){return t==null?t===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(t)?getRawTag(t):objectToString(t)}var _baseGetTag=baseGetTag$4;function isObject$5(t){var a=typeof t;return t!=null&&(a=="object"||a=="function")}var isObject_1=isObject$5,baseGetTag$3=_baseGetTag,isObject$4=isObject_1,asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$2(t){if(!isObject$4(t))return!1;var a=baseGetTag$3(t);return a==funcTag$2||a==genTag$1||a==asyncTag||a==proxyTag}var isFunction_1=isFunction$2,root$6=_root,coreJsData$1=root$6["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=function(){var t=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function isMasked$1(t){return!!maskSrcKey&&maskSrcKey in t}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$2(t){if(t!=null){try{return funcToString$1.call(t)}catch{}try{return t+""}catch{}}return""}var _toSource=toSource$2,isFunction$1=isFunction_1,isMasked=_isMasked,isObject$3=isObject_1,toSource$1=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$a=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$8=objectProto$a.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$8).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(t){if(!isObject$3(t)||isMasked(t))return!1;var a=isFunction$1(t)?reIsNative:reIsHostCtor;return a.test(toSource$1(t))}var _baseIsNative=baseIsNative$1;function getValue$1(t,a){return t==null?void 0:t[a]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$7(t,a){var r=getValue(t,a);return baseIsNative(r)?r:void 0}var _getNative=getNative$7,getNative$6=_getNative,root$5=_root,Map$4=getNative$6(root$5,"Map"),_Map=Map$4,getNative$5=_getNative,nativeCreate$4=getNative$5(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(t){var a=this.has(t)&&delete this.__data__[t];return this.size-=a?1:0,a}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__",objectProto$9=Object.prototype,hasOwnProperty$7=objectProto$9.hasOwnProperty;function hashGet$1(t){var a=this.__data__;if(nativeCreate$2){var r=a[t];return r===HASH_UNDEFINED$1?void 0:r}return hasOwnProperty$7.call(a,t)?a[t]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function hashHas$1(t){var a=this.__data__;return nativeCreate$1?a[t]!==void 0:hasOwnProperty$6.call(a,t)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(t,a){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=nativeCreate&&a===void 0?HASH_UNDEFINED:a,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(t){var a=-1,r=t==null?0:t.length;for(this.clear();++a<r;){var o=t[a];this.set(o[0],o[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1,Hash=_Hash,ListCache$2=_ListCache,Map$3=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache$2),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(t){var a=typeof t;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?t!=="__proto__":t===null}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(t,a){var r=t.__data__;return isKeyable(a)?r[typeof a=="string"?"string":"hash"]:r.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(t){var a=getMapData$3(this,t).delete(t);return this.size-=a?1:0,a}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(t){return getMapData$2(this,t).get(t)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(t){return getMapData$1(this,t).has(t)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(t,a){var r=getMapData(this,t),o=r.size;return r.set(t,a),this.size+=r.size==o?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(t){var a=-1,r=t==null?0:t.length;for(this.clear();++a<r;){var o=t[a];this.set(o[0],o[1])}}MapCache$1.prototype.clear=mapCacheClear,MapCache$1.prototype.delete=mapCacheDelete,MapCache$1.prototype.get=mapCacheGet,MapCache$1.prototype.has=mapCacheHas,MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1,ListCache$1=_ListCache,Map$2=_Map,MapCache=_MapCache,LARGE_ARRAY_SIZE=200;function stackSet$1(t,a){var r=this.__data__;if(r instanceof ListCache$1){var o=r.__data__;if(!Map$2||o.length<LARGE_ARRAY_SIZE-1)return o.push([t,a]),this.size=++r.size,this;r=this.__data__=new MapCache(o)}return r.set(t,a),this.size=r.size,this}var _stackSet=stackSet$1,ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$1(t){var a=this.__data__=new ListCache(t);this.size=a.size}Stack$1.prototype.clear=stackClear,Stack$1.prototype.delete=stackDelete,Stack$1.prototype.get=stackGet,Stack$1.prototype.has=stackHas,Stack$1.prototype.set=stackSet;var _Stack=Stack$1;function arrayEach$1(t,a){for(var r=-1,o=t==null?0:t.length;++r<o&&a(t[r],r,t)!==!1;);return t}var _arrayEach=arrayEach$1,getNative$4=_getNative,defineProperty$1=function(){try{var t=getNative$4(Object,"defineProperty");return t({},"",{}),t}catch{}}(),_defineProperty=defineProperty$1,defineProperty=_defineProperty;function baseAssignValue$2(t,a,r){a=="__proto__"&&defineProperty?defineProperty(t,a,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[a]=r}var _baseAssignValue=baseAssignValue$2,baseAssignValue$1=_baseAssignValue,eq=eq_1,objectProto$7=Object.prototype,hasOwnProperty$5=objectProto$7.hasOwnProperty;function assignValue$2(t,a,r){var o=t[a];(!(hasOwnProperty$5.call(t,a)&&eq(o,r))||r===void 0&&!(a in t))&&baseAssignValue$1(t,a,r)}var _assignValue=assignValue$2,assignValue$1=_assignValue,baseAssignValue=_baseAssignValue;function copyObject$4(t,a,r,o){var s=!r;r||(r={});for(var n=-1,i=a.length;++n<i;){var l=a[n],c=o?o(r[l],t[l],l,r,t):void 0;c===void 0&&(c=t[l]),s?baseAssignValue(r,l,c):assignValue$1(r,l,c)}return r}var _copyObject=copyObject$4;function baseTimes$1(t,a){for(var r=-1,o=Array(t);++r<t;)o[r]=a(r);return o}var _baseTimes=baseTimes$1;function isObjectLike$5(t){return t!=null&&typeof t=="object"}var isObjectLike_1=isObjectLike$5,baseGetTag$2=_baseGetTag,isObjectLike$4=isObjectLike_1,argsTag$2="[object Arguments]";function baseIsArguments$1(t){return isObjectLike$4(t)&&baseGetTag$2(t)==argsTag$2}var _baseIsArguments=baseIsArguments$1,baseIsArguments=_baseIsArguments,isObjectLike$3=isObjectLike_1,objectProto$6=Object.prototype,hasOwnProperty$4=objectProto$6.hasOwnProperty,propertyIsEnumerable$1=objectProto$6.propertyIsEnumerable,isArguments$1=baseIsArguments(function(){return arguments}())?baseIsArguments:function(t){return isObjectLike$3(t)&&hasOwnProperty$4.call(t,"callee")&&!propertyIsEnumerable$1.call(t,"callee")},isArguments_1=isArguments$1,isArray$3=Array.isArray,isArray_1=isArray$3,isBuffer$2={exports:{}};function stubFalse(){return!1}var stubFalse_1=stubFalse;isBuffer$2.exports,function(t,a){var r=_root,o=stubFalse_1,s=a&&!a.nodeType&&a,n=s&&!0&&t&&!t.nodeType&&t,i=n&&n.exports===s,l=i?r.Buffer:void 0,c=l?l.isBuffer:void 0,d=c||o;t.exports=d}(isBuffer$2,isBuffer$2.exports);var isBufferExports=isBuffer$2.exports,MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$1(t,a){var r=typeof