iking-web-ui-pro 1.0.32 → 1.0.33

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.
@@ -13373,7 +13373,7 @@ const e_e = { class: "demo-app" }, t_e = { class: "demo-app-main" }, n_e = { cla
13373
13373
  }, M = async () => {
13374
13374
  try {
13375
13375
  h.value = !0, i("beforePrint", { ...S });
13376
- const B = (await import("./html2canvas.esm-DgdJBc_o.mjs")).default, X = (await import("./jspdf.es.min-DBh6AXQ8.mjs").then((Qt) => Qt.j)).default;
13376
+ const B = (await import("./html2canvas.esm-DgdJBc_o.mjs")).default, X = (await import("./jspdf.es.min-XzfyGVex.mjs").then((Qt) => Qt.j)).default;
13377
13377
  if (!w.value)
13378
13378
  throw new Error("打印内容不存在");
13379
13379
  const Y = w.value.style.display;
@@ -14874,7 +14874,7 @@ const e_e = { class: "demo-app" }, t_e = { class: "demo-app-main" }, n_e = { cla
14874
14874
  );
14875
14875
  };
14876
14876
  }
14877
- }), kSe = /* @__PURE__ */ fr(ESe, [["__scopeId", "data-v-6045f82f"]]), V9e = Sr(kSe), ASe = {}, TSe = {
14877
+ }), kSe = /* @__PURE__ */ fr(ESe, [["__scopeId", "data-v-40223d12"]]), V9e = Sr(kSe), ASe = {}, TSe = {
14878
14878
  t: "1686214149488",
14879
14879
  class: "icon",
14880
14880
  viewBox: "0 0 1024 1024",
@@ -1,5 +1,5 @@
1
- import { c as Ma, g as Zu } from "./index-_HuTXX1W.mjs";
2
- import { _ as qa } from "./jspdf.es.min-DBh6AXQ8.mjs";
1
+ import { c as Ma, g as Zu } from "./index-CAKmb_Mu.mjs";
2
+ import { _ as qa } from "./jspdf.es.min-XzfyGVex.mjs";
3
3
  var un = {}, ln = {}, lr, hn;
4
4
  function Z() {
5
5
  if (hn) return lr;
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { d as e, b as I, E as k, i, h as r, T as o, G as t, L as l, x as n, D as p, j as c, P as g, U as P, R as d, N as C, F as S, Q as T, M as f, I as m, p as v, H as u, s as y, X as D, K as E, V as B, u as F, t as w, Z as O, k as A, l as U, o as x, m as V, n as h, Y as H, J as b, a as z, e as G, W as L, z as M, y as R, A as j, v as q, S as J, O as K, B as N, C as Q, q as W, r as X, f as Y, w as Z } from "./index-_HuTXX1W.mjs";
1
+ import { d as e, b as I, E as k, i, h as r, T as o, G as t, L as l, x as n, D as p, j as c, P as g, U as P, R as d, N as C, F as S, Q as T, M as f, I as m, p as v, H as u, s as y, X as D, K as E, V as B, u as F, t as w, Z as O, k as A, l as U, o as x, m as V, n as h, Y as H, J as b, a as z, e as G, W as L, z as M, y as R, A as j, v as q, S as J, O as K, B as N, C as Q, q as W, r as X, f as Y, w as Z } from "./index-CAKmb_Mu.mjs";
2
2
  export {
3
3
  e as EAlign,
4
4
  I as EDateType,
package/dist/index.umd.js CHANGED
@@ -167,7 +167,7 @@
167
167
  page-break-inside: avoid;
168
168
  }
169
169
  }
170
- `;M.textContent=P,o("configChange",{...m})})},x=async()=>{try{c.value=!0,o("beforePrint",{...m}),_(),await g.nextTick(),await new Promise(D=>setTimeout(D,100)),window.print(),o("afterPrint",!0),An.ElMessage.success("打印任务已发送")}catch(D){console.error("打印失败:",D),o("afterPrint",!1),An.ElMessage.error("打印失败,请重试")}finally{c.value=!1}},E=async()=>{try{c.value=!0,o("beforePrint",{...m});const D=(await Promise.resolve().then(()=>NCe)).default,M=(await Promise.resolve().then(()=>Sst)).default;if(!h.value)throw new Error("打印内容不存在");const V=h.value.style.display;h.value.style.display="block";const P=await D(h.value,{scale:2,useCORS:!0,allowTaint:!0,backgroundColor:"#ffffff",width:h.value.scrollWidth,height:h.value.scrollHeight});h.value.style.display=V;const q=P.toDataURL("image/png"),fe=m.paperSize==="Custom"?{width:parseFloat(m.customWidth),height:parseFloat(m.customHeight)}:b[m.paperSize],te=new M({orientation:m.orientation,unit:"mm",format:m.paperSize==="Custom"?[parseFloat(m.customWidth),parseFloat(m.customHeight)]:m.paperSize.toLowerCase()}),j=te.internal.pageSize.getWidth(),le=te.internal.pageSize.getHeight(),pe=P.width,be=P.height,re=Math.min(j/pe,le/be),ne=(j-pe*re)/2;te.addImage(q,"PNG",ne,0,pe*re,be*re),te.autoPrint(),window.open(te.output("bloburl"),"_blank"),o("afterPrint",!0),An.ElMessage.success("PDF 打印任务已生成")}catch(D){console.error("高级打印失败:",D),o("afterPrint",!1),An.ElMessage.error("高级打印失败,请重试")}finally{c.value=!1}},F=()=>{f.value=!f.value,_(),An.ElMessage.info(f.value?"已切换到预览模式":"已退出预览模式")},N=()=>{Object.assign(m,{paperSize:"A4",orientation:"portrait",fontSize:14,fontFamily:"Microsoft YaHei, sans-serif",margin:{top:"20mm",right:"20mm",bottom:"20mm",left:"20mm"},showHeader:!1,showFooter:!1,headerText:"",footerText:"",customWidth:"210mm",customHeight:"297mm",...r.defaultConfig}),_(),An.ElMessage.success("配置已重置")};return e({print:x,printToPDF:E,preview:F,resetConfig:N,updateStyles:_,getConfig:()=>({...m})}),g.onMounted(()=>{_()}),(D,M)=>{const V=g.resolveComponent("el-icon"),P=g.resolveComponent("el-button"),q=g.resolveComponent("el-option"),fe=g.resolveComponent("el-select"),te=g.resolveComponent("el-form-item"),j=g.resolveComponent("el-input"),le=g.resolveComponent("el-input-group"),pe=g.resolveComponent("el-radio"),be=g.resolveComponent("el-radio-group"),re=g.resolveComponent("el-slider"),ne=g.resolveComponent("el-col"),Oe=g.resolveComponent("el-switch"),Be=g.resolveComponent("el-row"),Ke=g.resolveComponent("el-form"),W=g.resolveComponent("el-card");return g.openBlock(),g.createElementBlock("div",_Le,[g.createCommentVNode(" 打印配置面板 "),l.value?(g.openBlock(),g.createElementBlock("div",SLe,[g.createVNode(W,{class:"config-card"},{header:g.withCtx(()=>[g.createElementVNode("div",ELe,[M[16]||(M[16]=g.createElementVNode("span",null,"打印配置",-1)),g.createVNode(P,{type:"text",onClick:M[0]||(M[0]=Ue=>l.value=!1),class:"close-btn"},{default:g.withCtx(()=>[g.createVNode(V,null,{default:g.withCtx(()=>[g.createVNode(g.unref(yL))]),_:1})]),_:1})])]),default:g.withCtx(()=>[g.createVNode(Ke,{model:m,"label-width":"100px",size:"small"},{default:g.withCtx(()=>[g.createVNode(Be,{gutter:20},{default:g.withCtx(()=>[g.createVNode(ne,{span:12},{default:g.withCtx(()=>[g.createVNode(te,{label:"纸张大小"},{default:g.withCtx(()=>[g.createVNode(fe,{modelValue:m.paperSize,"onUpdate:modelValue":M[1]||(M[1]=Ue=>m.paperSize=Ue),onChange:_},{default:g.withCtx(()=>[g.createVNode(q,{label:"A4",value:"A4"}),g.createVNode(q,{label:"A3",value:"A3"}),g.createVNode(q,{label:"A5",value:"A5"}),g.createVNode(q,{label:"Letter",value:"Letter"}),g.createVNode(q,{label:"Legal",value:"Legal"}),g.createVNode(q,{label:"自定义",value:"Custom"})]),_:1},8,["modelValue"])]),_:1}),m.paperSize==="Custom"?(g.openBlock(),g.createBlock(te,{key:0,label:"自定义尺寸"},{default:g.withCtx(()=>[g.createVNode(le,null,{default:g.withCtx(()=>[g.createVNode(j,{modelValue:m.customWidth,"onUpdate:modelValue":M[2]||(M[2]=Ue=>m.customWidth=Ue),placeholder:"宽度",style:{width:"45%"}},null,8,["modelValue"]),g.createVNode(j,{placeholder:"×",disabled:"",style:{width:"10%","text-align":"center"}}),g.createVNode(j,{modelValue:m.customHeight,"onUpdate:modelValue":M[3]||(M[3]=Ue=>m.customHeight=Ue),placeholder:"高度",style:{width:"45%"}},null,8,["modelValue"])]),_:1})]),_:1})):g.createCommentVNode("v-if",!0),g.createVNode(te,{label:"页面方向"},{default:g.withCtx(()=>[g.createVNode(be,{modelValue:m.orientation,"onUpdate:modelValue":M[4]||(M[4]=Ue=>m.orientation=Ue),onChange:_},{default:g.withCtx(()=>[g.createVNode(pe,{label:"portrait"},{default:g.withCtx(()=>M[17]||(M[17]=[g.createTextVNode("纵向")])),_:1}),g.createVNode(pe,{label:"landscape"},{default:g.withCtx(()=>M[18]||(M[18]=[g.createTextVNode("横向")])),_:1})]),_:1},8,["modelValue"])]),_:1}),g.createVNode(te,{label:"字体大小"},{default:g.withCtx(()=>[g.createVNode(re,{modelValue:m.fontSize,"onUpdate:modelValue":M[5]||(M[5]=Ue=>m.fontSize=Ue),min:8,max:24,step:1,"show-input":"",onChange:_},null,8,["modelValue"])]),_:1})]),_:1}),g.createVNode(ne,{span:12},{default:g.withCtx(()=>[g.createVNode(te,{label:"页边距"},{default:g.withCtx(()=>[g.createVNode(le,null,{default:g.withCtx(()=>[g.createVNode(j,{modelValue:m.margin.top,"onUpdate:modelValue":M[6]||(M[6]=Ue=>m.margin.top=Ue),placeholder:"上",onChange:_},null,8,["modelValue"]),g.createVNode(j,{modelValue:m.margin.right,"onUpdate:modelValue":M[7]||(M[7]=Ue=>m.margin.right=Ue),placeholder:"右",onChange:_},null,8,["modelValue"]),g.createVNode(j,{modelValue:m.margin.bottom,"onUpdate:modelValue":M[8]||(M[8]=Ue=>m.margin.bottom=Ue),placeholder:"下",onChange:_},null,8,["modelValue"]),g.createVNode(j,{modelValue:m.margin.left,"onUpdate:modelValue":M[9]||(M[9]=Ue=>m.margin.left=Ue),placeholder:"左",onChange:_},null,8,["modelValue"])]),_:1})]),_:1}),g.createVNode(te,{label:"页头页尾"},{default:g.withCtx(()=>[g.createVNode(Oe,{modelValue:m.showHeader,"onUpdate:modelValue":M[10]||(M[10]=Ue=>m.showHeader=Ue),"active-text":"显示页头",onChange:_},null,8,["modelValue"]),g.createVNode(Oe,{modelValue:m.showFooter,"onUpdate:modelValue":M[11]||(M[11]=Ue=>m.showFooter=Ue),"active-text":"显示页尾",onChange:_},null,8,["modelValue"])]),_:1}),m.showHeader?(g.openBlock(),g.createBlock(te,{key:0,label:"页头内容"},{default:g.withCtx(()=>[g.createVNode(j,{modelValue:m.headerText,"onUpdate:modelValue":M[12]||(M[12]=Ue=>m.headerText=Ue),placeholder:"请输入页头内容",onChange:_},null,8,["modelValue"])]),_:1})):g.createCommentVNode("v-if",!0),m.showFooter?(g.openBlock(),g.createBlock(te,{key:1,label:"页尾内容"},{default:g.withCtx(()=>[g.createVNode(j,{modelValue:m.footerText,"onUpdate:modelValue":M[13]||(M[13]=Ue=>m.footerText=Ue),placeholder:"请输入页尾内容",onChange:_},null,8,["modelValue"])]),_:1})):g.createCommentVNode("v-if",!0),g.createVNode(te,{label:"字体系列"},{default:g.withCtx(()=>[g.createVNode(fe,{modelValue:m.fontFamily,"onUpdate:modelValue":M[14]||(M[14]=Ue=>m.fontFamily=Ue),onChange:_},{default:g.withCtx(()=>[g.createVNode(q,{label:"宋体",value:"SimSun, serif"}),g.createVNode(q,{label:"黑体",value:"SimHei, sans-serif"}),g.createVNode(q,{label:"微软雅黑",value:"Microsoft YaHei, sans-serif"}),g.createVNode(q,{label:"Arial",value:"Arial, sans-serif"}),g.createVNode(q,{label:"Times New Roman",value:"Times New Roman, serif"})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),g.createVNode(te,null,{default:g.withCtx(()=>[g.createVNode(P,{type:"primary",onClick:x,loading:c.value},{default:g.withCtx(()=>[g.createVNode(V,null,{default:g.withCtx(()=>[g.createVNode(g.unref(sTe))]),_:1}),M[19]||(M[19]=g.createTextVNode(" 浏览器打印 "))]),_:1},8,["loading"]),g.createVNode(P,{type:"success",onClick:E,loading:c.value},{default:g.withCtx(()=>[g.createVNode(V,null,{default:g.withCtx(()=>[g.createVNode(g.unref(Y6e))]),_:1}),M[20]||(M[20]=g.createTextVNode(" PDF 打印 "))]),_:1},8,["loading"]),g.createVNode(P,{onClick:F},{default:g.withCtx(()=>[g.createVNode(V,null,{default:g.withCtx(()=>[g.createVNode(g.unref(ghe))]),_:1}),M[21]||(M[21]=g.createTextVNode(" 打印预览 "))]),_:1}),g.createVNode(P,{onClick:N},{default:g.withCtx(()=>[g.createVNode(V,null,{default:g.withCtx(()=>[g.createVNode(g.unref(hhe))]),_:1}),M[22]||(M[22]=g.createTextVNode(" 重置配置 "))]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})])):g.createCommentVNode("v-if",!0),g.createCommentVNode(" 打印内容区域 "),g.createElementVNode("div",{ref_key:"printContentRef",ref:h,class:g.normalizeClass(["print-content",{"print-preview":f.value}])},[g.createCommentVNode(" 页头 "),m.showHeader?(g.openBlock(),g.createElementBlock("div",BLe,g.toDisplayString(m.headerText||"页头内容"),1)):g.createCommentVNode("v-if",!0),g.createCommentVNode(" 主要内容 "),g.createElementVNode("div",xLe,[g.renderSlot(D.$slots,"default",{},void 0,!0)]),g.createCommentVNode(" 页尾 "),m.showFooter?(g.openBlock(),g.createElementBlock("div",kLe,g.toDisplayString(m.footerText||"页尾内容"),1)):g.createCommentVNode("v-if",!0)],2),g.createCommentVNode(" 操作按钮 "),D.hideControls?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",TLe,[g.createVNode(P,{type:"primary",onClick:M[15]||(M[15]=Ue=>l.value=!l.value),icon:l.value?"Close":"Setting"},{default:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(l.value?"关闭配置":"打印配置"),1)]),_:1},8,["icon"]),g.createVNode(P,{type:"success",onClick:x,loading:c.value,icon:"Printer"},{default:g.withCtx(()=>M[23]||(M[23]=[g.createTextVNode(" 快速打印 ")])),_:1},8,["loading"])]))])}}}),[["__scopeId","data-v-e9aeab6c"]]),ILe={class:"ik-hor-step-content"},DLe=["onClick"],NLe={class:"ik-hor-step_main"},OLe=["id","onClick"],RLe=["id","onClick"],LLe=Fi(gi(g.defineComponent({__name:"IkHorizontalStepBar",props:{spaceNum:{type:String,default:"58px"},active:{type:Number,default:null},activeColor:{type:String,default:""},needClick:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},alignCenter:{type:Boolean,default:!1},propsField:{type:Object,default:()=>({title:"title",description:"description",value:"value"})}},emits:["click","update:active"],setup(n,{emit:e}){const t=n,r=e,o=g.ref(!1),l=g.ref(),c=g.ref(),f=g.ref(!1);g.watch(()=>t.active,N=>{let D=document.getElementById("stepItemContent"),M=document.getElementById(`stepItem${N}`),V=document.getElementById("stepItem0");const P=M&&V?(M==null?void 0:M.offsetLeft)-(V==null?void 0:V.offsetLeft):0;D&&M&&(D.scrollLeft=P>(D==null?void 0:D.clientWidth)?P-(D==null?void 0:D.offsetLeft):0)}),g.watch(()=>t.list,()=>{g.nextTick(()=>{let D=document.getElementById("stepItemContent"),M=(D==null?void 0:D.scrollWidth)>(D==null?void 0:D.clientWidth);o.value=M,window.addEventListener("resize",N,!0)});const N=()=>{let D=document.getElementById("stepItemContent"),M=(D==null?void 0:D.scrollWidth)>(D==null?void 0:D.clientWidth);o.value=M}},{deep:!0}),g.onMounted(()=>{g.nextTick(()=>{let D=document.getElementById("stepItemContent"),M=(D==null?void 0:D.scrollWidth)>(D==null?void 0:D.clientWidth);o.value=M,window.addEventListener("resize",N,!0)});const N=()=>{let D=document.getElementById("stepItemContent"),M=(D==null?void 0:D.scrollWidth)>(D==null?void 0:D.clientWidth);o.value=M}});const h=(N,D)=>{if(!t.needClick)return;r("update:active",D),r("click",N);let M=document.getElementById("stepItemContent"),V=document.getElementById(`stepItem${D}`),P=document.getElementById("stepItem0");const q=V&&P?(V==null?void 0:V.offsetLeft)-(P==null?void 0:P.offsetLeft):0;M&&V&&(M.scrollLeft=q>(M==null?void 0:M.clientWidth)?q-(M==null?void 0:M.offsetLeft):0)},m=()=>{let N=document.getElementById("stepItemContent");N&&(N.scrollLeft=N.scrollLeft-20)},b=()=>{let N=document.getElementById("stepItemContent");N&&(N.scrollLeft=N.scrollLeft+20)},_=()=>{clearInterval(c.value);let N=document.getElementById("stepItemContent");f.value=!1,c.value=setInterval(()=>{f.value=!0,N&&(N.scrollLeft=N.scrollLeft-20)},100)},x=()=>{clearInterval(c.value),f.value||m()},E=()=>{clearInterval(l.value);let N=document.getElementById("stepItemContent");f.value=!1,l.value=setInterval(()=>{f.value=!0,N&&(N.scrollLeft=N.scrollLeft+20)},100)},F=()=>{clearInterval(l.value),f.value||b()};return(N,D)=>{const M=g.resolveComponent("el-icon");return g.openBlock(),g.createElementBlock("div",ILe,[o.value?(g.openBlock(),g.createElementBlock("div",{key:0,class:"icon-left",onMousedown:_,onMouseup:x,onClick:m},[g.createVNode(M,{class:"operation-icon"},{default:g.withCtx(()=>[g.createVNode(g.unref(lhe),{size:"26px"})]),_:1})],32)):g.createCommentVNode("v-if",!0),g.createElementVNode("div",{class:"step-item-content",id:"stepItemContent",style:g.normalizeStyle({justifyContent:o.value?"flex-start":"center"})},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(n.list,(V,P)=>{var q;return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(`${n.alignCenter?"ik-hor-step-item":""} step-item ${P<=n.active?"step-item-active":""}`),style:g.normalizeStyle({width:n.alignCenter?`calc(100%/${(q=n.list)==null?void 0:q.length})`:""}),key:P},[g.createElementVNode("div",{class:g.normalizeClass(`${n.alignCenter?"ik-hor-step_head":""} `)},[P!==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(`ik-hor-step_line step-border ${P<=n.active?"step-border-greater-than":""}`),style:g.normalizeStyle({width:`${n.spaceNum.indexOf("px")!=-1?n.spaceNum:`${n.spaceNum}px`}`})},D[0]||(D[0]=[g.createElementVNode("i",{class:"ik-hor-step_line_inner"},null,-1)]),6)):g.createCommentVNode("v-if",!0),g.createElementVNode("div",{class:g.normalizeClass(`step-num ${P===n.active?"step-num-active":P<n.active?"step-num-greater-than":""}`),onClick:fe=>h(V,P),style:g.normalizeStyle({backgroundColor:P===n.active&&n.activeColor?n.activeColor:"",cursor:V&&V.disabled?"not-allowed":n.needClick?"pointer":"context-menu"})},[g.renderSlot(N.$slots,"icon",{data:{item:V,index:P}},()=>[g.createTextVNode(g.toDisplayString(P+1),1)],!0)],14,DLe)],2),g.createElementVNode("div",NLe,[g.createElementVNode("div",{id:`stepItem${P}`,class:g.normalizeClass(`step-label ${n.active===P?"step-label-active":P<n.active?"step-label-greater-than":""} step-item-${P}`),style:g.normalizeStyle({color:P===n.active&&n.activeColor?n.activeColor:"",cursor:V&&V.disabled?"not-allowed":n.needClick?"pointer":"context-menu"}),onClick:fe=>h(V,P)},g.toDisplayString(V[n.propsField.title]),15,OLe),g.createElementVNode("div",{id:`stepItemDesc${P}`,class:g.normalizeClass(`step-description step-label ${n.active===P?"step-label-active":P<n.active?"step-label-greater-than":""} step-item-${P}`),style:g.normalizeStyle({color:P===n.active&&n.activeColor?n.activeColor:"",cursor:V&&V.disabled?"not-allowed":n.needClick?"pointer":"context-menu"}),onClick:fe=>h(V,P)},g.toDisplayString(V[n.propsField.description]),15,RLe)])],6)}),128))],4),o.value?(g.openBlock(),g.createElementBlock("div",{key:1,class:"icon-right",onMousedown:E,onMouseup:F,onClick:b},[g.createVNode(M,{class:"operation-icon"},{default:g.withCtx(()=>[g.createVNode(g.unref(che))]),_:1})],32)):g.createCommentVNode("v-if",!0)])}}}),[["__scopeId","data-v-95f77eab"]])),PLe="data:image/webp;base64,UklGRnoEAABXRUJQVlA4WAoAAAAwAAAALwAALwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBImAAAAA2AYm3bsuhFm7u72wZoTrbGIcoKaKyAROJQbQmW2IVb/WkW3ZmPd3ymRMQEwJfV56QRo5pHErkUkFdQWRJpeGW6SoL9EvaWxAdbAeiVd5gyAK5NAdOtv4uNfsT21TUukBVjgFubBOQS+Ip7G/k2LpatkF2hAuBI5siAdsL2j3DHQrJ7NKDbUIyOj3bhqADBsgNPUqUlgncLVlA4IOwBAABwDQCdASowADAAPm0yk0ckIyGhJzgMkIANiWwArDM9tzexcZ3vwYZdKHIB749Ap5gP1E/YD34/QB6AH+A9F//S+w1z2/sz/5DzdDABM7ldHg1iMkeWX8LH9T1VzicAWGJgnNq4e/5P/NObJOBUhFC8dPnhmAD+9wGzP9Zfeg5ENi90xn4awZvrlCLnfwvZX//s4u6n2Pa2TF/r8wh0GtdNNJIBMRbrMaCBwyl6z86DqQgvpixbIdOVbwZFf/7KjC+uzJ5nNRyJ1Rpab8pIf2m1+SBOfX9w7EFXUErK8NSCsePMPazMXKH5y9Wl+nfiSrmsv079Fk6NkDF3Dxr+C+Rp4UdG/f3kP8PZfd/FyRupWURiDOrAjLamuF4OPo2BylwD7ulmdgDn4BEMXuvpYCACy4yCVjgsOzqToG2rSfJOtxy6Hh1/B2gu7X1MdJpHsdHdUrlRzTLKyV3wZG5a64SKKB2/QGk8IRZT0veUdDeo579/WyTU3ujQZeKNBS9ANlv1muyN9Kf5bm1f3UoPm/KnDkqf/1f2jf6aQJ7IYNod25fVfhRX+l1u9qBzs/bVezF7ZgC2LOuuJl1Tvwgeujpg9Uc/m0A9X878DzEkgxP/sPGviOfCElM1J/Kr3TTCwCkfW+K3oZuMB7HAAAA=",MLe={class:"ik-flie-list"},ULe={class:"name"},HLe={key:1},VLe=["src"],$Le={class:"file-icon"},QLe={class:"file-name-loading"},zLe={class:"file-name"},jLe={class:"file-name__content"},WLe={key:0},GLe={key:0,class:"file-size"},qLe={class:"operate-btn"},KLe={class:"name"},ZLe={class:"file-name-loading"},YLe={class:"file-name"},XLe={class:"file-size"},JLe={class:"operate-btn"},ePe={class:"card"},tPe={class:"title"},nPe={key:0,class:"tip-slot"},rPe={class:"ik-flie-list"},oPe={class:"name"},sPe={key:1},iPe=["src"],aPe={class:"file-icon"},lPe={class:"file-name-loading"},cPe={class:"file-name"},uPe={key:0},dPe={key:0,class:"file-size"},fPe={key:0,class:"operate-btn"},APe=Fi(gi(g.defineComponent({__name:"index",props:g.mergeModels({showIcon:{type:Boolean,default:!0},title:{type:String,default:"上传文件"},action:{type:String,default:""},type:{type:String,default:"button"},headers:{type:Object,default:()=>({})},loadUrl:{type:String,default:""},limit:{type:Number,default:1},size:{type:Number,default:50},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""},limitText:{type:String,default:""},defaultFileds:{type:Object,default:()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize"})},preview:{type:Boolean,default:!1},customIconData:{type:Object,default:()=>({})},customIconFields:{type:Object,default:()=>({type:"type",icon:"icon"})},disabled:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},imageMode:{type:Boolean,default:!1},isOnlyOfficePreview:{type:Boolean,default:!0},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},jwtToken:{type:String,default:""},trueDelete:{type:Boolean,default:!1}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:g.mergeModels(["delete","exceed","handPreview","success","error","outSize","change","progress","progressEnd"],["update:modelValue"]),setup(n,{emit:e}){const t=n,r=e,o=g.useModel(n,"modelValue"),c={...{name:"name",url:"url",suffix:"suffix",size:"size"},...t.defaultFileds},{cLoadUrl:f,cUploadUrl:h,cOnlyofficeConfig:m,cOnlyofficePreviewType:b}=Z1(t),_=g.computed(()=>t.size),x=g.ref(null),E=g.ref([]),F=g.ref({}),N=g.ref(!1),D=Ue=>{const Se=Ue.size/1024/1024;return Se<_.value?!0:(r("outSize"),An.ElMessage({message:`上传文件大小(${Se.toFixed(4)}MB)超出允许最大值(${t.size}MB),请重新选择`,type:"warning",showClose:!0,duration:5e3}),!1)},M=g.computed(()=>{const{accept:Ue}=t;return Ue==="*"?"*":`${Ue.toLowerCase()},${Ue.toUpperCase()}`}),V=(Ue,Se)=>{var Fe,ce,Ie,_e,Me;if(r("change",Ue),Ue.size/1024/1024<_.value||g.nextTick(()=>{o.value.pop()}),t.accept!=="*"){let Ee=!1;M.value.includes("/")&&(Ee=((ce=(Fe=Ue==null?void 0:Ue.raw)==null?void 0:Fe.type)==null?void 0:ce.split("/").shift())===((Ie=M.value)==null?void 0:Ie.split("/").shift()));const We=(_e=M.value)==null?void 0:_e.split(",");!We.includes((Me=Ue==null?void 0:Ue.raw)==null?void 0:Me.type)&&!We.includes(`.${Ue.name.split(".").pop()}`)&&!Ee&&(An.ElMessage({message:`不允许的文件格式(${Ue.name}),请重新选择`,type:"warning",showClose:!0,duration:5e3}),g.nextTick(()=>{o.value.pop()}))}},P=()=>!1,q=(Ue,Se)=>{var ot,je;Ue.status="ready",Se!==void 0&&E.value.splice(Se,1),(ot=x.value)==null||ot.handleStart(Ue.raw),(je=x.value)==null||je.submit()},fe=(Ue,Se)=>{var ot;Ue.splice(t.limit===1?1:t.limit),Ue.forEach(je=>{var Fe;(Fe=x.value)==null||Fe.handleStart(je)}),(ot=x.value)==null||ot.submit(),An.ElMessage({message:(t==null?void 0:t.limitText)||`最大可上传${t.limit}个文件,已忽略超出文件`,type:"warning",showClose:!0,duration:5e3}),r("exceed",Ue)},te=(Ue,Se,ot)=>{Ue.success?r("success",Ue,Se,ot):(r("error",Ue,Se,ot),ne(Se),E.value.push(Se))},j=(Ue,Se,ot)=>{E.value.push(Se),r("error",Ue,Se,ot)},le=Ue=>{var Se,ot;F.value={...Ue,name:Ue[c.name],url:l2(f.value,Ue[c.url]||((ot=(Se=Ue==null?void 0:Ue.response)==null?void 0:Se.data)==null?void 0:ot.id))},t.isOnlyOfficePreview&&(N.value=!0),r("handPreview",F.value)},pe=Ue=>{ts.ikFile.downloadByOnlineUrl(Ue[c.url],Ue[c.name])},be=(Ue,Se=!1)=>{var ot;(ot=x.value)==null||ot.abort(Ue)},re={Authorization:"Bearer iking","X-Tenant":"sys","Content-Type":"application/x-www-form-urlencoded"},ne=Ue=>{var Se,ot,je,Fe,ce;try{Ue.status!=="success"&&be(Ue),(Se=x.value)==null||Se.handleRemove(Ue),o.value=o.value.filter(Ie=>Ie.uid!==Ue.uid),r("delete",Ue),t.trueDelete&&NE.post(h.value.replace("/oss/upload","/oss/delete"),{fileUrl:((je=(ot=Ue==null?void 0:Ue.response)==null?void 0:ot.data)==null?void 0:je.id)||((Fe=Ue==null?void 0:Ue.data)==null?void 0:Fe.id)||(Ue==null?void 0:Ue.id)||Ue[c.url]},{headers:re})}catch(Ie){(ce=x.value)==null||ce.handleRemove(Ue),o.value=o.value.filter(_e=>_e.uid!==Ue.uid),r("delete",Ue),console.error(Ie)}},Oe=(Ue,Se,ot)=>{r("progress",Ue,Se,ot),Ue.percent>=100&&r("progressEnd",Ue,Se,ot)},Be=(Ue,Se)=>{E.value.splice(Se,1)},Ke=g.computed(()=>o.value.length>=t.limit||t.disabled),W=Ue=>{var ot,je,Fe;const Se=((je=(ot=Ue==null?void 0:Ue.response)==null?void 0:ot.data)==null?void 0:je[c.suffix])||((Fe=Ue==null?void 0:Ue.data)==null?void 0:Fe[c.suffix])||(Ue==null?void 0:Ue[c.suffix]);return b.includes(Se)};return(Ue,Se)=>{var ot;return g.openBlock(),g.createElementBlock(g.Fragment,null,[n.preview?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[n.type==="button"?(g.openBlock(),g.createBlock(g.unref(An.ElUpload),g.mergeProps({key:0,class:"ik-file-upload"},Ue.$attrs,{accept:n.accept,action:g.unref(h),"file-list":o.value,"onUpdate:fileList":Se[0]||(Se[0]=je=>o.value=je),ref_key:"refUpload",ref:x,"auto-upload":!0,"before-upload":D,"before-remove":P,"on-exceed":fe,"on-change":V,multiple:n.multiple,headers:n.headers,limit:n.limit,"on-progress":Oe,"on-success":te,"on-error":j}),{trigger:g.withCtx(()=>[Ue.$slots.trigger?g.renderSlot(Ue.$slots,"trigger",{key:0},void 0,!0):(g.openBlock(),g.createBlock(g.unref(An.ElButton),{key:1,disabled:Ke.value},g.createSlots({default:g.withCtx(()=>[g.createTextVNode(" "+g.toDisplayString(n.title),1)]),_:2},[n.showIcon?{name:"icon",fn:g.withCtx(()=>[g.createVNode(g.unref(Ii),{name:"iksvg_daoru",disabled:Ke.value},null,8,["disabled"])]),key:"0"}:void 0]),1032,["disabled"]))]),file:g.withCtx(({file:je})=>[g.createElementVNode("div",MLe,[g.createElementVNode("div",ULe,[!Ue.$slots.fileIcon&&(!n.customIconData[g.unref(Wd)(je,c)]||!n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon])?(g.openBlock(),g.createBlock(g.unref(xT),{key:0,type:g.unref(Wd)(je,c)},null,8,["type"])):!Ue.$slots.fileIcon&&n.customIconData[g.unref(Wd)(je,c)]&&n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon]?(g.openBlock(),g.createElementBlock("div",HLe,[n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.type]==="img"?(g.openBlock(),g.createElementBlock("img",{key:0,src:n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon],alt:"",class:"file-img-icon"},null,8,VLe)):(g.openBlock(),g.createElementBlock("span",{key:1,class:g.normalizeClass([n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon],"file-icon-size"])},null,2))])):g.createCommentVNode("v-if",!0),g.createElementVNode("div",$Le,[g.renderSlot(Ue.$slots,"fileIcon",{file:je},void 0,!0)]),g.createElementVNode("div",QLe,[g.createElementVNode("p",zLe,[g.createElementVNode("p",jLe,g.toDisplayString(je[c.name]||je.name),1),je.percentage&&je.status==="uploading"?(g.openBlock(),g.createElementBlock("span",WLe,"("+g.toDisplayString(je.percentage)+"%)",1)):g.createCommentVNode("v-if",!0)]),je.status==="success"?(g.openBlock(),g.createElementBlock("p",GLe,g.toDisplayString(g.unref(mG)((je[c.size]||je.size)/1024/1024))+"MB ",1)):g.createCommentVNode("v-if",!0),je.percentage&&je.status==="uploading"?(g.openBlock(),g.createBlock(g.unref(An.ElProgress),{key:1,"text-inside":"",percentage:je.percentage,color:"var(--el-color-primary)","show-text":!1},null,8,["percentage"])):g.createCommentVNode("v-if",!0)])]),g.createElementVNode("div",qLe,[je.status==="success"?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[W(je)?(g.openBlock(),g.createBlock(g.unref(Ii),{key:0,onClick:Fe=>le(je),name:"iksvg_yulan",title:"预览",bg:"",size:"default"},null,8,["onClick"])):g.createCommentVNode("v-if",!0),g.createVNode(g.unref(Ii),{onClick:g.withModifiers(Fe=>ne(je),["stop"]),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])],64)):(g.openBlock(),g.createBlock(g.unref(Ii),{key:1,onClick:g.withModifiers(Fe=>ne(je),["stop"]),error:"",name:"iksvg_guanbi",size:"default",bg:"",title:"取消上传"},null,8,["onClick"]))])])]),default:g.withCtx(()=>{var je;return[!n.preview&&n.tip?(g.openBlock(),g.createBlock(g.unref(An.ElTooltip),{key:0,effect:"dark",content:t.tipText||"","popper-class":"_ik_web_ui_file-help-tooltip"},{default:g.withCtx(()=>[g.createVNode(g.unref(An.ElIcon),{size:23,class:"_ik_web_ui_file_help_icon"},{default:g.withCtx(()=>[g.createVNode(g.unref(Ahe))]),_:1})]),_:1},8,["content"])):g.createCommentVNode("v-if",!0),(je=E.value)!=null&&je.length?(g.openBlock(!0),g.createElementBlock(g.Fragment,{key:1},g.renderList(E.value,(Fe,ce)=>(g.openBlock(),g.createElementBlock("div",{class:"ik-error-flie-list",key:Fe.uid},[g.createElementVNode("div",KLe,[g.createVNode(g.unref(An.ElIcon),{size:32,class:"info",style:{"vertical-align":"middle"}},{default:g.withCtx(()=>[g.createVNode(g.unref(wTe))]),_:1}),g.createElementVNode("div",ZLe,[g.createElementVNode("p",YLe,g.toDisplayString(Fe[c.name]||Fe.name),1),g.createElementVNode("p",XLe,g.toDisplayString(g.unref(mG)(Fe.size/1024/1024))+"MB ",1)])]),g.createElementVNode("div",JLe,[g.createVNode(g.unref(Ii),{onClick:g.withModifiers(Ie=>q(Fe,ce),["stop"]),name:"iksvg_zhongzhi",title:"重新上传",bg:"",size:"default"},null,8,["onClick"]),g.createVNode(g.unref(Ii),{onClick:g.withModifiers(Ie=>Be(Fe,ce),["stop"]),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])])]))),128)):g.createCommentVNode("v-if",!0)]}),_:3},16,["accept","action","file-list","multiple","headers","limit"])):(g.openBlock(),g.createBlock(g.unref(An.ElUpload),g.mergeProps({key:1,"file-list":o.value,"onUpdate:fileList":Se[1]||(Se[1]=je=>o.value=je),class:["ik-file-pload-card",{plain:n.plain}],"auto-upload":!0},Ue.$attrs,{accept:n.accept,action:g.unref(h),disabled:Ke.value,ref_key:"refUpload",ref:x,"before-upload":D,"before-remove":P,"on-exceed":fe,multiple:n.multiple,headers:n.headers,limit:n.limit,"on-success":te,"on-error":j,"on-change":V}),{file:g.withCtx(({file:je})=>[g.createElementVNode("div",rPe,[g.createElementVNode("div",oPe,[!Ue.$slots.fileIcon&&(!n.customIconData[g.unref(Wd)(je,c)]||!n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon])?(g.openBlock(),g.createBlock(g.unref(xT),{key:0,type:g.unref(Wd)(je,c)},null,8,["type"])):!Ue.$slots.fileIcon&&n.customIconData[g.unref(Wd)(je,c)]&&n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon]?(g.openBlock(),g.createElementBlock("div",sPe,[n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.type]==="img"?(g.openBlock(),g.createElementBlock("img",{key:0,src:n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon],alt:"",class:"file-img-icon"},null,8,iPe)):(g.openBlock(),g.createElementBlock("span",{key:1,class:g.normalizeClass([n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon],"file-icon-size"])},null,2))])):g.createCommentVNode("v-if",!0),g.createElementVNode("div",aPe,[g.renderSlot(Ue.$slots,"fileIcon",{file:je},void 0,!0)]),g.createElementVNode("div",lPe,[g.createElementVNode("p",cPe,[g.createTextVNode(g.toDisplayString(je[c.name]||je.name)+" ",1),je.percentage&&je.status==="uploading"?(g.openBlock(),g.createElementBlock("span",uPe,"("+g.toDisplayString(je.percentage)+"%)",1)):g.createCommentVNode("v-if",!0)]),je.status==="success"?(g.openBlock(),g.createElementBlock("p",dPe,g.toDisplayString(g.unref(mG)((je[c.size]||je.size)/1024/1024))+"MB ",1)):g.createCommentVNode("v-if",!0),je.percentage&&je.status==="uploading"?(g.openBlock(),g.createBlock(g.unref(An.ElProgress),{key:1,"text-inside":"",percentage:je.percentage,color:"var(--el-color-primary)","show-text":!1},null,8,["percentage"])):g.createCommentVNode("v-if",!0)])]),n.preview?(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[(n.preview||je.percentage===100)&&W(je)?(g.openBlock(),g.createBlock(g.unref(An.ElIcon),{key:0,title:"预览",class:"primary"},{default:g.withCtx(()=>[g.createVNode(g.unref(ghe),{onClick:Fe=>le(je)},null,8,["onClick"])]),_:2},1024)):g.createCommentVNode("v-if",!0),g.createVNode(g.unref(An.ElIcon),{title:"下载",class:"primary"},{default:g.withCtx(()=>[g.createVNode(g.unref(dhe),{onClick:Fe=>pe(je)},null,8,["onClick"])]),_:2},1024)],64)):(g.openBlock(),g.createElementBlock("div",fPe,[je.status==="success"?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[W(je)?(g.openBlock(),g.createBlock(g.unref(Ii),{key:0,onClick:Fe=>le(je),name:"iksvg_yulan",title:"预览",bg:"",size:"default"},null,8,["onClick"])):g.createCommentVNode("v-if",!0),g.createVNode(g.unref(Ii),{onClick:Fe=>ne(je),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])],64)):(g.openBlock(),g.createBlock(g.unref(Ii),{key:1,onClick:Fe=>ne(je),error:"",name:"iksvg_guanbi",size:"default",bg:"",title:"取消上传"},null,8,["onClick"]))]))])]),default:g.withCtx(()=>[g.createElementVNode("div",ePe,[g.createElementVNode("div",tPe,[n.imageMode?g.renderSlot(Ue.$slots,"image",{key:0},()=>[Se[3]||(Se[3]=g.createElementVNode("img",{src:PLe,class:"w-[48px] h-[48px]"},null,-1))],!0):n.showIcon?(g.openBlock(),g.createBlock(g.unref(Ii),{key:1,name:"iksvg_img_shangchuanhetongfujianbeifen",type:"primary",bg:"",size:40})):g.createCommentVNode("v-if",!0),g.createElementVNode("span",null,[g.createTextVNode(g.toDisplayString(n.title)+" ",1),!n.preview&&n.tip&&!Ue.$slots.tip?(g.openBlock(),g.createBlock(g.unref(An.ElTooltip),{key:0,effect:"dark",content:t.tipText||"","popper-class":"_ik_web_ui_file-help-tooltip"},{default:g.withCtx(()=>[g.createVNode(g.unref(An.ElIcon),{size:23,class:"_ik_web_ui_file_help_icon"},{default:g.withCtx(()=>[g.createVNode(g.unref(Ahe))]),_:1})]),_:1},8,["content"])):g.createCommentVNode("v-if",!0)])]),g.createVNode(g.unref(Ii),{name:"iksvg_daoru",bg:"",size:24,width:40,padding:"0"})]),Ue.$slots.tip?(g.openBlock(),g.createElementBlock("div",nPe,[g.renderSlot(Ue.$slots,"tip",{},void 0,!0)])):g.createCommentVNode("v-if",!0)]),_:3},16,["file-list","class","accept","action","disabled","multiple","headers","limit"]))],64)),g.createVNode(g.unref(Fq),{show:N.value,"onUpdate:show":Se[2]||(Se[2]=je=>N.value=je),loadUrl:g.unref(f),file:F.value,onlyofficeServer:((ot=g.unref(m))==null?void 0:ot.serverUrl)||n.onlyofficeServer,onlyOfficeConfig:g.unref(m)||n.onlyOfficeConfig},null,8,["show","loadUrl","file","onlyofficeServer","onlyOfficeConfig"])],64)}}}),[["__scopeId","data-v-6045f82f"]])),hPe={},pPe={t:"1686214149488",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8490",width:"200",height:"200"};function gPe(n,e){return g.openBlock(),g.createElementBlock("svg",pPe,e[0]||(e[0]=[g.createElementVNode("path",{d:"M369.569592 512.011256c0-14.328333-11.010775-25.945929-24.591071-25.945929L86.980515 486.065328c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.998005 0C358.55984 537.959232 369.569592 526.341636 369.569592 512.011256z","p-id":"8491"},null,-1),g.createElementVNode("path",{d:"M937.019485 486.064304 679.020456 486.064304c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.999029 0c13.580297 0 24.590048-11.618619 24.590048-25.947975C961.609533 497.682923 950.598758 486.064304 937.019485 486.064304z","p-id":"8492"},null,-1),g.createElementVNode("path",{d:"M512.011768 62.389956c-13.580297 0-24.590048 11.618619-24.590048 25.945929l0 257.170151c0 14.329357 11.010775 25.946952 24.590048 25.946952s24.591071-11.618619 24.591071-25.946952L536.602839 88.335884C536.602839 74.008574 525.591041 62.389956 512.011768 62.389956z","p-id":"8493"},null,-1),g.createElementVNode("path",{d:"M512.011768 652.544967c-13.580297 0-24.590048 11.618619-24.590048 25.946952l0 257.169127c0 14.33038 11.010775 25.947975 24.590048 25.947975s24.591071-11.618619 24.591071-25.947975L536.602839 678.491918C536.602839 664.162562 525.591041 652.544967 512.011768 652.544967z","p-id":"8494"},null,-1),g.createElementVNode("path",{d:"M377.001865 413.125085c4.744048 4.737908 10.818393 7.082302 16.882506 7.082302 6.519484 0 13.039991-2.724041 17.879206-8.134261 9.317203-10.414187 8.885368-26.834158-0.9967-36.678364L228.341057 193.559391c-9.832949-9.830903-25.406646-9.388834-34.760688 1.050935-9.317203 10.414187-8.885368 26.834158 0.9967 36.678364L377.001865 413.125085z","p-id":"8495"},null,-1),g.createElementVNode("path",{d:"M646.997112 610.873892c-9.846252-9.831926-25.419949-9.388834-34.761712 1.051959-9.317203 10.414187-8.885368 26.834158 0.997724 36.678364l182.41354 181.834348c4.743024 4.738931 10.818393 7.083326 16.881482 7.083326 6.520507 0 13.039991-2.723018 17.879206-8.134261 9.317203-10.41521 8.886391-26.834158-0.9967-36.678364L646.997112 610.873892z","p-id":"8496"},null,-1),g.createElementVNode("path",{d:"M630.114606 420.207387c6.064113 0 12.139481-2.344395 16.882506-7.082302l182.425819-181.836395c9.882068-9.844206 10.313903-26.264177 0.9967-36.678364-9.341762-10.43977-24.915459-10.882861-34.760688-1.050935L613.233124 375.394762c-9.882068 9.844206-10.314926 26.264177-0.997724 36.678364C617.074615 417.483346 623.595123 420.207387 630.114606 420.207387z","p-id":"8497"},null,-1),g.createElementVNode("path",{d:"M377.025401 610.873892 194.600605 792.710286c-9.881045 9.844206-10.313903 26.263154-0.9967 36.678364 4.839215 5.411243 11.358699 8.134261 17.879206 8.134261 6.064113 0 12.138458-2.344395 16.881482-7.083326l182.425819-181.834348c9.881045-9.844206 10.313903-26.264177 0.9967-36.678364C402.469909 601.485057 386.872676 601.041966 377.025401 610.873892z","p-id":"8498"},null,-1)]))}const mPe=gi(hPe,[["render",gPe]]),vPe={key:1,class:"upload-btn"},yPe={class:"tip"},bPe={class:"loading-statu"},wPe={class:"operate-btn"},CPe={key:0},_Pe={class:"el-upload-list el-upload-list--picture-card"},SPe=["onClick"],EPe=["src"],BPe={class:"demo-image__preview"},xPe=Fi(gi(g.defineComponent({__name:"index",props:g.mergeModels({title:{type:String,default:"上传图片"},loadUrl:{type:String,default:""},action:{type:String,default:""},headers:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},limit:{type:Number,default:50},size:{type:Number,default:50},accept:{type:String,default:"image/*"},fit:{type:String,default:"contain"},preview:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""},disabled:{type:Boolean,default:!1},width:{type:Number,default:106},height:{type:Number,default:106}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:g.mergeModels(["delete","success","change"],["update:modelValue"]),setup(n,{emit:e}){g.useCssVars(Se=>({"39ec9d0e":m.value,"2c4fea42":b.value,"7f29be00":Ue.value,c0e26468:W.value}));const t=n,r=g.useModel(n,"modelValue"),{formItem:o}=An.useFormItem(),l=Se=>Array.isArray(Se)?Se.map(ot=>{var ce,Ie;const je=((ce=ot.url)==null?void 0:ce.startsWith("http"))||((Ie=ot.url)==null?void 0:Ie.startsWith("blob")),Fe=(ot==null?void 0:ot.url)||ot;return{...ot.url?ot:{url:Fe},__url:je?Fe:`${f.value}${Fe}`}}):Se?[{url:Se,__url:Se!=null&&Se.startsWith("http")||Se!=null&&Se.startsWith("blob")?Se:`${f.value}${Se}`}]:[];g.watch(()=>r.value,Se=>{!Se||!Se.length?E.value=[]:E.value=ts._.cloneDeep(l(Se)),o==null||o.validate("change")},{deep:!0});const c=e,{cLoadUrl:f,cUploadUrl:h}=Z1(t),m=g.computed(()=>`${t.width}px`),b=g.computed(()=>`${t.height}px`),_=g.computed(()=>t.size),x=g.ref(null),E=g.ref(l(r.value)),F=g.ref([]),N=g.ref(!1),D=g.ref(0),M=g.computed(()=>t.tipText||`最多可上传${t.limit}张图片, 每张图片不能超过${t.size}MB`),V=(Se,ot)=>{c("change",Se)},P=Se=>{if(!Se.type.includes("image")){An.ElMessage.warning("只允许上传图片!");try{E.value.pop()}catch{}return!1}if(!(Se.size/1024/1024<_.value)){An.ElMessage.warning(`图片大小超出系统限制的${t.size}MB!`);try{E.value.pop()}catch{}return!1}return!0},q=()=>!1,fe=(Se,ot)=>{var je,Fe;Se.status="ready",ot!==void 0&&F.value.splice(ot,1),(je=x.value)==null||je.handleStart(Se.raw),(Fe=x.value)==null||Fe.submit()},te=(Se,ot)=>{var Ie,_e;const je=r.value.length,Fe=t.limit-je;let ce=0;for(;ce<Fe&&ce<(Se==null?void 0:Se.length);)(Ie=x.value)==null||Ie.handleStart(Se==null?void 0:Se[ce]),(_e=x.value)==null||_e.submit(),ce++},j=(Se,ot,je)=>{c("success",Se,ot,je),r.value=E.value,o==null||o.validate("change")},le=(Se,ot,je)=>{F.value.push({...ot,__url:ot.url})},pe=Se=>{var ot;N.value=!0,D.value=Array.isArray(r==null?void 0:r.value)?(ot=r==null?void 0:r.value)==null?void 0:ot.findIndex(je=>je.url===Se.url):0},be=Se=>{ts.ikFile.downloadFile(Se.__url||Se.url,Se.name||Se.url)},re=Se=>{var ot;(ot=x.value)==null||ot.abort(Se)},ne=Se=>{var ot;Se.status!=="success"&&re(Se),r.value=(ot=E.value)==null?void 0:ot.filter(je=>je.uid!==Se.uid),c("delete",Se)},Oe=(Se,ot)=>{F.value.splice(ot,1)},Be=g.computed(()=>E.value.length+F.value.length<t.limit),Ke=g.computed(()=>r.value.length>=t.limit||t.disabled),W=g.computed(()=>{var Se;return!((Se=r.value)!=null&&Se.length)&&!F.value.length||t.limit===1||typeof r.value=="string"?"0":`${t.width+8}px`}),Ue=g.computed(()=>{var Se;return!((Se=r.value)!=null&&Se.length)&&!F.value.length&&typeof r.value!="string"||t.limit===1?"none":"absolute"});return(Se,ot)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createVNode(g.unref(An.ElUpload),g.mergeProps({class:["ik-image-upload",{preview:n.preview,"hide-upload":!Be.value&&n.limit===1,disabled:Ke.value}],ref_key:"refUpload",ref:x,"list-type":"picture-card",accept:n.accept,action:g.unref(h),headers:n.headers,data:n.data,"file-list":E.value,"onUpdate:fileList":ot[0]||(ot[0]=je=>E.value=je),multiple:n.multiple,limit:n.limit,"on-change":V,"before-upload":P,"before-remove":q,"on-exceed":te,"on-success":j,"on-error":le,drag:""},Se.$attrs,{disabled:Ke.value}),g.createSlots({trigger:g.withCtx(()=>[Se.$slots.trigger?g.renderSlot(Se.$slots,"trigger",{key:0},void 0,!0):(g.openBlock(),g.createElementBlock("div",vPe,[g.createVNode(g.unref(Ii),{size:20,name:"iksvg_guanbibeifen",disabled:Ke.value},null,8,["disabled"]),g.createElementVNode("span",null,g.toDisplayString(n.title),1)]))]),file:g.withCtx(({file:je,index:Fe})=>[g.createElementVNode("div",{class:g.normalizeClass(["load-list",{loading:je.status==="uploading"}]),"element-loading-background":"var(--ik-upload-bg)"},[g.withDirectives(g.createElementVNode("div",bPe,[g.createVNode(mPe),g.createTextVNode(" 上传"+g.toDisplayString(je.percentage)+"% ",1)],512),[[g.vShow,je.status==="uploading"]]),g.createCommentVNode(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),g.createVNode(g.unref(An.ElImage),{style:{width:"100%",height:"100%"},src:je.__url||je.url,"zoom-rate":1.2,"initial-index":0,fit:"contain"},null,8,["src"]),g.createElementVNode("span",wPe,[g.createElementVNode("span",null,[g.createVNode(g.unref(An.ElIcon),{onClick:ce=>pe(je)},{default:g.withCtx(()=>[g.createVNode(g.unref(mhe))]),_:2},1032,["onClick"])]),g.createElementVNode("span",null,[g.createVNode(g.unref(An.ElIcon),{onClick:ce=>be(je)},{default:g.withCtx(()=>[g.createVNode(g.unref(dhe))]),_:2},1032,["onClick"])]),n.preview?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("span",CPe,[g.createVNode(g.unref(An.ElIcon),{type:"warning",onClick:ce=>ne(je)},{default:g.withCtx(()=>[g.createVNode(g.unref(uhe))]),_:2},1032,["onClick"])]))])],2)]),default:g.withCtx(()=>[g.createElementVNode("ul",_Pe,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(F.value,(je,Fe)=>(g.openBlock(),g.createElementBlock("li",{class:"el-upload-list__item",key:je.uid},[g.createElementVNode("span",null,[g.createVNode(g.unref(Ii),{name:"iksvg_guanbi",error:"",onClick:ce=>Oe(je,Fe)},null,8,["onClick"])]),g.createElementVNode("div",{class:g.normalizeClass(["load-list",{loading:je.status==="uploading",fail:je.status==="fail"}]),"element-loading-background":"var(--ik-upload-bg)"},[g.withDirectives(g.createElementVNode("div",{class:"loading-statu",onClick:ce=>fe(je,Fe)},[g.createVNode(g.unref(Ii),{name:"iksvg_shuaxin-daohang",size:24}),ot[2]||(ot[2]=g.createElementVNode("span",{class:"error"},"上传错误",-1)),ot[3]||(ot[3]=g.createElementVNode("p",null,"点击重新上传",-1))],8,SPe),[[g.vShow,je.status==="fail"]]),g.createElementVNode("img",{src:je.__url,alt:"",style:g.normalizeStyle({"object-fit":n.fit})},null,12,EPe)],2)]))),128))])]),_:2},[n.tip?{name:"tip",fn:g.withCtx(()=>[g.createElementVNode("span",yPe,g.toDisplayString(M.value),1)]),key:"0"}:void 0]),1040,["class","accept","action","headers","data","file-list","multiple","limit","disabled"]),g.createCommentVNode(" 文件预览 "),g.createElementVNode("div",BPe,[N.value?(g.openBlock(),g.createBlock(g.unref(AZ),{key:0,"lock-scroll":"","hide-on-click-modal":"",onClose:ot[1]||(ot[1]=()=>{N.value=!1}),"url-list":l(E.value).map(je=>je.__url),"initial-index":D.value},null,8,["url-list","initial-index"])):g.createCommentVNode("v-if",!0)])],64))}}),[["__scopeId","data-v-16e28cae"]]));function kPe(n,e){return Object.hasOwn(n,e)}function TPe(n,e,t){return new Promise(r=>{n.toBlob(r,e,t)})}const FPe=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;function IPe(n,e,t){const r=FPe.exec(n),o=e.mimeType??(r==null?void 0:r[1])??"plain/text";let l;if((r==null?void 0:r[2])!=null){const c=atob(decodeURIComponent(r[3])),f=new Uint8Array(c.length);for(let h=0;h<c.length;h++)f[h]=c.charCodeAt(h);l=[f]}else(r==null?void 0:r[3])!=null&&(l=[decodeURIComponent(r[3])]);return new Blob(l,{type:o})}class DPe extends Error{constructor(t,r){super(t);Wt(this,"isNetworkError");Wt(this,"cause");this.cause=r==null?void 0:r.cause,this.cause&&kPe(this.cause,"isNetworkError")?this.isNetworkError=this.cause.isNetworkError:this.isNetworkError=!1}}function bme(n,e,t,r){return n===e?n:r===0?e:n+(e-n)*2**(-r/t)}const wme=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'];class oP extends Error{constructor(t,r=null){super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.");Wt(this,"cause");Wt(this,"isNetworkError");Wt(this,"request");this.cause=t,this.isNetworkError=!0,this.request=r}}class NPe{constructor(e,t){ms(this,y5);ms(this,RB,!1);ms(this,kF);ms(this,LB);Li(this,LB,e),Li(this,kF,()=>t(e))}progress(){Qn(this,RB)||Qn(this,LB)>0&&(clearTimeout(Qn(this,y5)),Li(this,y5,setTimeout(Qn(this,kF),Qn(this,LB))))}done(){Qn(this,RB)||(clearTimeout(Qn(this,y5)),Li(this,y5,void 0),Li(this,RB,!0))}}y5=new WeakMap,RB=new WeakMap,kF=new WeakMap,LB=new WeakMap;const sP=()=>{};function OPe(n,e={}){const{body:t=null,headers:r={},method:o="GET",onBeforeRequest:l=sP,onUploadProgress:c=sP,shouldRetry:f=()=>!0,onAfterResponse:h=sP,onTimeout:m=sP,responseType:b,retries:_=3,signal:x=null,timeout:E=3e4,withCredentials:F=!1}=e,N=V=>.3*2**(V-1)*1e3,D=new NPe(E,m);function M(V=0){return new Promise(async(P,q)=>{const fe=new XMLHttpRequest,te=j=>{f(fe)&&V<_?setTimeout(()=>{M(V+1).then(P,q)},N(V)):(D.done(),q(j))};fe.open(o,n,!0),fe.withCredentials=F,b&&(fe.responseType=b),x==null||x.addEventListener("abort",()=>{fe.abort(),q(new DOMException("Aborted","AbortError"))}),fe.onload=async()=>{try{await h(fe,V)}catch(j){j.request=fe,te(j);return}fe.status>=200&&fe.status<300?(D.done(),P(fe)):f(fe)&&V<_?setTimeout(()=>{M(V+1).then(P,q)},N(V)):(D.done(),q(new oP(fe.statusText,fe)))},fe.onerror=()=>te(new oP(fe.statusText,fe)),fe.upload.onprogress=j=>{D.progress(),c(j)},r&&Object.keys(r).forEach(j=>{fe.setRequestHeader(j,r[j])}),await l(fe,V),fe.send(t)})}return M()}function RPe(...n){return fetch(...n).catch(e=>{throw e.name==="AbortError"?e:new oP(e)})}function LPe(n){const e=t=>"error"in t&&!!t.error;return n.filter(t=>!e(t))}function PPe(n){return n.filter(e=>{var t;return!((t=e.progress)!=null&&t.uploadStarted)||!e.isRestored})}function Cme(n){return typeof n!="object"||n===null||!("nodeType"in n)?!1:n.nodeType===Node.ELEMENT_NODE}function _me(n){if(typeof n=="string"){const e=document.querySelectorAll(n);return e.length===0?null:Array.from(e)}return typeof n=="object"&&Cme(n)?[n]:null}function MPe(n,e=document){return typeof n=="string"?e.querySelector(n):Cme(n)?n:null}function Sme(n){const e=n.lastIndexOf(".");return e===-1||e===n.length-1?{name:n,extension:void 0}:{name:n.slice(0,e),extension:n.slice(e+1)}}const Iq={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",msg:"application/vnd.ms-outlook",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function Eme(n){var t;if(n.type)return n.type;const e=n.name?(t=Sme(n.name).extension)==null?void 0:t.toLowerCase():null;return e&&e in Iq?Iq[e]:"application/octet-stream"}function UPe(n){return n.charCodeAt(0).toString(32)}function Bme(n){let e="";return n.replace(/[^A-Z0-9]/gi,t=>(e+=`-${UPe(t)}`,"/"))+e}function HPe(n,e){let t=e||"uppy";return typeof n.name=="string"&&(t+=`-${Bme(n.name.toLowerCase())}`),n.type!==void 0&&(t+=`-${n.type}`),n.meta&&typeof n.meta.relativePath=="string"&&(t+=`-${Bme(n.meta.relativePath.toLowerCase())}`),n.data.size!==void 0&&(t+=`-${n.data.size}`),n.data.lastModified!==void 0&&(t+=`-${n.data.lastModified}`),t}function VPe(n){return!n.isRemote||!n.remote?!1:new Set(["box","dropbox","drive","facebook","unsplash"]).has(n.remote.provider)}function $Pe(n,e){if(VPe(n))return n.id;const t=Eme(n);return HPe({...n,type:t},e)}function xme(n,e){return n===!0?Object.keys(e):Array.isArray(n)?n:[]}const T_=Array.from;function QPe(n){const e=T_(n.files);return Promise.resolve(e)}function kme(n,e,t,{onSuccess:r}){n.readEntries(o=>{const l=[...e,...o];o.length?queueMicrotask(()=>{kme(n,l,t,{onSuccess:r})}):r(l)},o=>{t(o),r(e)})}function Tme(n,e){return n==null?n:{kind:n.isFile?"file":n.isDirectory?"directory":void 0,name:n.name,getFile(){return new Promise((t,r)=>n.file(t,r))},async*values(){const t=n.createReader();yield*await new Promise(o=>{kme(t,[],e,{onSuccess:l=>o(l.map(c=>Tme(c,e)))})})},isSameEntry:void 0}}async function*Fme(n,e,t=void 0){const r=()=>`${e}/${n.name}`;if(n.kind==="file"){const o=await n.getFile();o!=null?(o.relativePath=e?r():null,yield o):t!=null&&(yield t)}else if(n.kind==="directory")for await(const o of n.values())yield*Fme(o,e?r():n.name);else t!=null&&(yield t)}async function*zPe(n,e){const t=await Promise.all(Array.from(n.items,async r=>{let o;return o??(o=Tme(typeof r.getAsEntry=="function"?r.getAsEntry():r.webkitGetAsEntry(),e)),{fileSystemHandle:o,lastResortFile:r.getAsFile()}}));for(const{lastResortFile:r,fileSystemHandle:o}of t)if(o!=null)try{yield*Fme(o,"",r)}catch(l){r!=null?yield r:e(l)}else r!=null&&(yield r)}async function jPe(n,e){const t=e==null?void 0:e.logDropError;try{const r=[];for await(const o of zPe(n,t))r.push(o);return r}catch{return QPe(n)}}const WPe={__proto__:null,"audio/mp3":"mp3","audio/mp4":"mp4","audio/ogg":"ogg","audio/webm":"webm","image/gif":"gif","image/heic":"heic","image/heif":"heif","image/jpeg":"jpg","image/webp":"webp","image/png":"png","image/svg+xml":"svg","video/mp4":"mp4","video/ogg":"ogv","video/quicktime":"mov","video/webm":"webm","video/x-matroska":"mkv","video/x-msvideo":"avi"};function QE(n){return[n]=n.split(";",1),WPe[n]||null}function GPe(n){var o;const t=(o=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?([^\n]+)/i.exec(n))==null?void 0:o[1];return`${/^http:\/\//i.test(n)?"ws":"wss"}://${t}`}function qPe(n){for(;n&&!n.dir;)n=n.parentNode;return n==null?void 0:n.dir}function Dq(n){return n<10?`0${n}`:n.toString()}function iP(){const n=new Date,e=Dq(n.getHours()),t=Dq(n.getMinutes()),r=Dq(n.getSeconds());return`${e}:${t}:${r}`}function KPe(){const n=document.body;return!(!("draggable"in n)||!("ondragstart"in n&&"ondrop"in n)||!("FormData"in window)||!("FileReader"in window))}function ZPe(n){return n?n.readyState!==0&&n.readyState!==4||n.status===0:!1}function Ime(n){return n.startsWith("blob:")}function Dme(n){return n?/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(n):!1}function YPe(n){const e=Math.floor(n/3600)%24,t=Math.floor(n/60)%60,r=Math.floor(n%60);return{hours:e,minutes:t,seconds:r}}function XPe(n){const e=YPe(n),t=e.hours===0?"":`${e.hours}h`,r=e.minutes===0?"":`${e.hours===0?e.minutes:` ${e.minutes.toString(10).padStart(2,"0")}`}m`,o=e.hours!==0?"":`${e.minutes===0?e.seconds:` ${e.seconds.toString(10).padStart(2,"0")}`}s`;return`${t}${r}${o}`}function JPe(n){return new Error("Cancelled",{cause:n})}function Nme(n){var e;if(n!=null){const t=()=>this.abort(n.reason);n.addEventListener("abort",t,{once:!0});const r=()=>{n.removeEventListener("abort",t)};(e=this.then)==null||e.call(this,r,r)}return this}class eMe{constructor(e){ms(this,xA);ms(this,by,0);ms(this,b0,[]);ms(this,wy,!1);ms(this,PB);ms(this,w0,1);ms(this,MB);ms(this,b5);Wt(this,"limit");ms(this,VU,()=>this.resume());ms(this,UB,()=>{if(Qn(this,wy)){Li(this,b5,setTimeout(Qn(this,UB),0));return}Li(this,w0,this.limit),this.limit=Math.ceil((Qn(this,MB)+Qn(this,w0))/2);for(let e=Qn(this,w0);e<=this.limit;e++)us(this,xA,gL).call(this);Qn(this,MB)-Qn(this,w0)>3?Li(this,b5,setTimeout(Qn(this,UB),2e3)):Li(this,w0,Math.floor(Qn(this,w0)/2))});typeof e!="number"||e===0?this.limit=1/0:this.limit=e}run(e,t){return!Qn(this,wy)&&Qn(this,by)<this.limit?us(this,xA,GAe).call(this,e):us(this,xA,i6e).call(this,e,t)}wrapSyncFunction(e,t){return(...r)=>{const o=this.run(()=>(e(...r),queueMicrotask(()=>o.done()),()=>{}),t);return{abortOn:Nme,abort(){o.abort()}}}}wrapPromiseFunction(e,t){return(...r)=>{let o;const l=new Promise((c,f)=>{o=this.run(()=>{let h,m;try{m=Promise.resolve(e(...r))}catch(b){m=Promise.reject(b)}return m.then(b=>{h?f(h):(o.done(),c(b))},b=>{h?f(h):(o.done(),f(b))}),b=>{h=JPe(b)}},t)});return l.abort=c=>{o.abort(c)},l.abortOn=Nme,l}}resume(){Li(this,wy,!1),clearTimeout(Qn(this,PB));for(let e=0;e<this.limit;e++)us(this,xA,gL).call(this)}pause(e=null){Li(this,wy,!0),clearTimeout(Qn(this,PB)),e!=null&&Li(this,PB,setTimeout(Qn(this,VU),e))}rateLimit(e){clearTimeout(Qn(this,b5)),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(Li(this,MB,this.limit-1),this.limit=Qn(this,w0),Li(this,b5,setTimeout(Qn(this,UB),e)))}get isPaused(){return Qn(this,wy)}}by=new WeakMap,b0=new WeakMap,wy=new WeakMap,PB=new WeakMap,w0=new WeakMap,MB=new WeakMap,b5=new WeakMap,xA=new WeakSet,GAe=function(e){Li(this,by,Qn(this,by)+1);let t=!1,r;try{r=e()}catch(o){throw Li(this,by,Qn(this,by)-1),o}return{abort:o=>{t||(t=!0,Li(this,by,Qn(this,by)-1),r==null||r(o),us(this,xA,gL).call(this))},done:()=>{t||(t=!0,Li(this,by,Qn(this,by)-1),us(this,xA,gL).call(this))}}},gL=function(){queueMicrotask(()=>us(this,xA,s6e).call(this))},s6e=function(){if(Qn(this,wy)||Qn(this,by)>=this.limit||Qn(this,b0).length===0)return;const e=Qn(this,b0).shift();if(e==null)throw new Error("Invariant violation: next is null");const t=us(this,xA,GAe).call(this,e.fn);e.abort=t.abort,e.done=t.done},i6e=function(e,t){const r={fn:e,priority:(t==null?void 0:t.priority)||0,abort:()=>{us(this,xA,a6e).call(this,r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},o=Qn(this,b0).findIndex(l=>r.priority>l.priority);return o===-1?Qn(this,b0).push(r):Qn(this,b0).splice(o,0,r),r},a6e=function(e){const t=Qn(this,b0).indexOf(e);t!==-1&&Qn(this,b0).splice(t,1)},VU=new WeakMap,UB=new WeakMap;const Nq=Symbol("__queue");function tMe(n,e,t){const r=[];return n.forEach(o=>typeof o!="string"?r.push(o):e[Symbol.split](o).forEach((l,c,f)=>{l!==""&&r.push(l),c<f.length-1&&r.push(t)})),r}/**
170
+ `;M.textContent=P,o("configChange",{...m})})},x=async()=>{try{c.value=!0,o("beforePrint",{...m}),_(),await g.nextTick(),await new Promise(D=>setTimeout(D,100)),window.print(),o("afterPrint",!0),An.ElMessage.success("打印任务已发送")}catch(D){console.error("打印失败:",D),o("afterPrint",!1),An.ElMessage.error("打印失败,请重试")}finally{c.value=!1}},E=async()=>{try{c.value=!0,o("beforePrint",{...m});const D=(await Promise.resolve().then(()=>NCe)).default,M=(await Promise.resolve().then(()=>Sst)).default;if(!h.value)throw new Error("打印内容不存在");const V=h.value.style.display;h.value.style.display="block";const P=await D(h.value,{scale:2,useCORS:!0,allowTaint:!0,backgroundColor:"#ffffff",width:h.value.scrollWidth,height:h.value.scrollHeight});h.value.style.display=V;const q=P.toDataURL("image/png"),fe=m.paperSize==="Custom"?{width:parseFloat(m.customWidth),height:parseFloat(m.customHeight)}:b[m.paperSize],te=new M({orientation:m.orientation,unit:"mm",format:m.paperSize==="Custom"?[parseFloat(m.customWidth),parseFloat(m.customHeight)]:m.paperSize.toLowerCase()}),j=te.internal.pageSize.getWidth(),le=te.internal.pageSize.getHeight(),pe=P.width,be=P.height,re=Math.min(j/pe,le/be),ne=(j-pe*re)/2;te.addImage(q,"PNG",ne,0,pe*re,be*re),te.autoPrint(),window.open(te.output("bloburl"),"_blank"),o("afterPrint",!0),An.ElMessage.success("PDF 打印任务已生成")}catch(D){console.error("高级打印失败:",D),o("afterPrint",!1),An.ElMessage.error("高级打印失败,请重试")}finally{c.value=!1}},F=()=>{f.value=!f.value,_(),An.ElMessage.info(f.value?"已切换到预览模式":"已退出预览模式")},N=()=>{Object.assign(m,{paperSize:"A4",orientation:"portrait",fontSize:14,fontFamily:"Microsoft YaHei, sans-serif",margin:{top:"20mm",right:"20mm",bottom:"20mm",left:"20mm"},showHeader:!1,showFooter:!1,headerText:"",footerText:"",customWidth:"210mm",customHeight:"297mm",...r.defaultConfig}),_(),An.ElMessage.success("配置已重置")};return e({print:x,printToPDF:E,preview:F,resetConfig:N,updateStyles:_,getConfig:()=>({...m})}),g.onMounted(()=>{_()}),(D,M)=>{const V=g.resolveComponent("el-icon"),P=g.resolveComponent("el-button"),q=g.resolveComponent("el-option"),fe=g.resolveComponent("el-select"),te=g.resolveComponent("el-form-item"),j=g.resolveComponent("el-input"),le=g.resolveComponent("el-input-group"),pe=g.resolveComponent("el-radio"),be=g.resolveComponent("el-radio-group"),re=g.resolveComponent("el-slider"),ne=g.resolveComponent("el-col"),Oe=g.resolveComponent("el-switch"),Be=g.resolveComponent("el-row"),Ke=g.resolveComponent("el-form"),W=g.resolveComponent("el-card");return g.openBlock(),g.createElementBlock("div",_Le,[g.createCommentVNode(" 打印配置面板 "),l.value?(g.openBlock(),g.createElementBlock("div",SLe,[g.createVNode(W,{class:"config-card"},{header:g.withCtx(()=>[g.createElementVNode("div",ELe,[M[16]||(M[16]=g.createElementVNode("span",null,"打印配置",-1)),g.createVNode(P,{type:"text",onClick:M[0]||(M[0]=Ue=>l.value=!1),class:"close-btn"},{default:g.withCtx(()=>[g.createVNode(V,null,{default:g.withCtx(()=>[g.createVNode(g.unref(yL))]),_:1})]),_:1})])]),default:g.withCtx(()=>[g.createVNode(Ke,{model:m,"label-width":"100px",size:"small"},{default:g.withCtx(()=>[g.createVNode(Be,{gutter:20},{default:g.withCtx(()=>[g.createVNode(ne,{span:12},{default:g.withCtx(()=>[g.createVNode(te,{label:"纸张大小"},{default:g.withCtx(()=>[g.createVNode(fe,{modelValue:m.paperSize,"onUpdate:modelValue":M[1]||(M[1]=Ue=>m.paperSize=Ue),onChange:_},{default:g.withCtx(()=>[g.createVNode(q,{label:"A4",value:"A4"}),g.createVNode(q,{label:"A3",value:"A3"}),g.createVNode(q,{label:"A5",value:"A5"}),g.createVNode(q,{label:"Letter",value:"Letter"}),g.createVNode(q,{label:"Legal",value:"Legal"}),g.createVNode(q,{label:"自定义",value:"Custom"})]),_:1},8,["modelValue"])]),_:1}),m.paperSize==="Custom"?(g.openBlock(),g.createBlock(te,{key:0,label:"自定义尺寸"},{default:g.withCtx(()=>[g.createVNode(le,null,{default:g.withCtx(()=>[g.createVNode(j,{modelValue:m.customWidth,"onUpdate:modelValue":M[2]||(M[2]=Ue=>m.customWidth=Ue),placeholder:"宽度",style:{width:"45%"}},null,8,["modelValue"]),g.createVNode(j,{placeholder:"×",disabled:"",style:{width:"10%","text-align":"center"}}),g.createVNode(j,{modelValue:m.customHeight,"onUpdate:modelValue":M[3]||(M[3]=Ue=>m.customHeight=Ue),placeholder:"高度",style:{width:"45%"}},null,8,["modelValue"])]),_:1})]),_:1})):g.createCommentVNode("v-if",!0),g.createVNode(te,{label:"页面方向"},{default:g.withCtx(()=>[g.createVNode(be,{modelValue:m.orientation,"onUpdate:modelValue":M[4]||(M[4]=Ue=>m.orientation=Ue),onChange:_},{default:g.withCtx(()=>[g.createVNode(pe,{label:"portrait"},{default:g.withCtx(()=>M[17]||(M[17]=[g.createTextVNode("纵向")])),_:1}),g.createVNode(pe,{label:"landscape"},{default:g.withCtx(()=>M[18]||(M[18]=[g.createTextVNode("横向")])),_:1})]),_:1},8,["modelValue"])]),_:1}),g.createVNode(te,{label:"字体大小"},{default:g.withCtx(()=>[g.createVNode(re,{modelValue:m.fontSize,"onUpdate:modelValue":M[5]||(M[5]=Ue=>m.fontSize=Ue),min:8,max:24,step:1,"show-input":"",onChange:_},null,8,["modelValue"])]),_:1})]),_:1}),g.createVNode(ne,{span:12},{default:g.withCtx(()=>[g.createVNode(te,{label:"页边距"},{default:g.withCtx(()=>[g.createVNode(le,null,{default:g.withCtx(()=>[g.createVNode(j,{modelValue:m.margin.top,"onUpdate:modelValue":M[6]||(M[6]=Ue=>m.margin.top=Ue),placeholder:"上",onChange:_},null,8,["modelValue"]),g.createVNode(j,{modelValue:m.margin.right,"onUpdate:modelValue":M[7]||(M[7]=Ue=>m.margin.right=Ue),placeholder:"右",onChange:_},null,8,["modelValue"]),g.createVNode(j,{modelValue:m.margin.bottom,"onUpdate:modelValue":M[8]||(M[8]=Ue=>m.margin.bottom=Ue),placeholder:"下",onChange:_},null,8,["modelValue"]),g.createVNode(j,{modelValue:m.margin.left,"onUpdate:modelValue":M[9]||(M[9]=Ue=>m.margin.left=Ue),placeholder:"左",onChange:_},null,8,["modelValue"])]),_:1})]),_:1}),g.createVNode(te,{label:"页头页尾"},{default:g.withCtx(()=>[g.createVNode(Oe,{modelValue:m.showHeader,"onUpdate:modelValue":M[10]||(M[10]=Ue=>m.showHeader=Ue),"active-text":"显示页头",onChange:_},null,8,["modelValue"]),g.createVNode(Oe,{modelValue:m.showFooter,"onUpdate:modelValue":M[11]||(M[11]=Ue=>m.showFooter=Ue),"active-text":"显示页尾",onChange:_},null,8,["modelValue"])]),_:1}),m.showHeader?(g.openBlock(),g.createBlock(te,{key:0,label:"页头内容"},{default:g.withCtx(()=>[g.createVNode(j,{modelValue:m.headerText,"onUpdate:modelValue":M[12]||(M[12]=Ue=>m.headerText=Ue),placeholder:"请输入页头内容",onChange:_},null,8,["modelValue"])]),_:1})):g.createCommentVNode("v-if",!0),m.showFooter?(g.openBlock(),g.createBlock(te,{key:1,label:"页尾内容"},{default:g.withCtx(()=>[g.createVNode(j,{modelValue:m.footerText,"onUpdate:modelValue":M[13]||(M[13]=Ue=>m.footerText=Ue),placeholder:"请输入页尾内容",onChange:_},null,8,["modelValue"])]),_:1})):g.createCommentVNode("v-if",!0),g.createVNode(te,{label:"字体系列"},{default:g.withCtx(()=>[g.createVNode(fe,{modelValue:m.fontFamily,"onUpdate:modelValue":M[14]||(M[14]=Ue=>m.fontFamily=Ue),onChange:_},{default:g.withCtx(()=>[g.createVNode(q,{label:"宋体",value:"SimSun, serif"}),g.createVNode(q,{label:"黑体",value:"SimHei, sans-serif"}),g.createVNode(q,{label:"微软雅黑",value:"Microsoft YaHei, sans-serif"}),g.createVNode(q,{label:"Arial",value:"Arial, sans-serif"}),g.createVNode(q,{label:"Times New Roman",value:"Times New Roman, serif"})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),g.createVNode(te,null,{default:g.withCtx(()=>[g.createVNode(P,{type:"primary",onClick:x,loading:c.value},{default:g.withCtx(()=>[g.createVNode(V,null,{default:g.withCtx(()=>[g.createVNode(g.unref(sTe))]),_:1}),M[19]||(M[19]=g.createTextVNode(" 浏览器打印 "))]),_:1},8,["loading"]),g.createVNode(P,{type:"success",onClick:E,loading:c.value},{default:g.withCtx(()=>[g.createVNode(V,null,{default:g.withCtx(()=>[g.createVNode(g.unref(Y6e))]),_:1}),M[20]||(M[20]=g.createTextVNode(" PDF 打印 "))]),_:1},8,["loading"]),g.createVNode(P,{onClick:F},{default:g.withCtx(()=>[g.createVNode(V,null,{default:g.withCtx(()=>[g.createVNode(g.unref(ghe))]),_:1}),M[21]||(M[21]=g.createTextVNode(" 打印预览 "))]),_:1}),g.createVNode(P,{onClick:N},{default:g.withCtx(()=>[g.createVNode(V,null,{default:g.withCtx(()=>[g.createVNode(g.unref(hhe))]),_:1}),M[22]||(M[22]=g.createTextVNode(" 重置配置 "))]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})])):g.createCommentVNode("v-if",!0),g.createCommentVNode(" 打印内容区域 "),g.createElementVNode("div",{ref_key:"printContentRef",ref:h,class:g.normalizeClass(["print-content",{"print-preview":f.value}])},[g.createCommentVNode(" 页头 "),m.showHeader?(g.openBlock(),g.createElementBlock("div",BLe,g.toDisplayString(m.headerText||"页头内容"),1)):g.createCommentVNode("v-if",!0),g.createCommentVNode(" 主要内容 "),g.createElementVNode("div",xLe,[g.renderSlot(D.$slots,"default",{},void 0,!0)]),g.createCommentVNode(" 页尾 "),m.showFooter?(g.openBlock(),g.createElementBlock("div",kLe,g.toDisplayString(m.footerText||"页尾内容"),1)):g.createCommentVNode("v-if",!0)],2),g.createCommentVNode(" 操作按钮 "),D.hideControls?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",TLe,[g.createVNode(P,{type:"primary",onClick:M[15]||(M[15]=Ue=>l.value=!l.value),icon:l.value?"Close":"Setting"},{default:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(l.value?"关闭配置":"打印配置"),1)]),_:1},8,["icon"]),g.createVNode(P,{type:"success",onClick:x,loading:c.value,icon:"Printer"},{default:g.withCtx(()=>M[23]||(M[23]=[g.createTextVNode(" 快速打印 ")])),_:1},8,["loading"])]))])}}}),[["__scopeId","data-v-e9aeab6c"]]),ILe={class:"ik-hor-step-content"},DLe=["onClick"],NLe={class:"ik-hor-step_main"},OLe=["id","onClick"],RLe=["id","onClick"],LLe=Fi(gi(g.defineComponent({__name:"IkHorizontalStepBar",props:{spaceNum:{type:String,default:"58px"},active:{type:Number,default:null},activeColor:{type:String,default:""},needClick:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},alignCenter:{type:Boolean,default:!1},propsField:{type:Object,default:()=>({title:"title",description:"description",value:"value"})}},emits:["click","update:active"],setup(n,{emit:e}){const t=n,r=e,o=g.ref(!1),l=g.ref(),c=g.ref(),f=g.ref(!1);g.watch(()=>t.active,N=>{let D=document.getElementById("stepItemContent"),M=document.getElementById(`stepItem${N}`),V=document.getElementById("stepItem0");const P=M&&V?(M==null?void 0:M.offsetLeft)-(V==null?void 0:V.offsetLeft):0;D&&M&&(D.scrollLeft=P>(D==null?void 0:D.clientWidth)?P-(D==null?void 0:D.offsetLeft):0)}),g.watch(()=>t.list,()=>{g.nextTick(()=>{let D=document.getElementById("stepItemContent"),M=(D==null?void 0:D.scrollWidth)>(D==null?void 0:D.clientWidth);o.value=M,window.addEventListener("resize",N,!0)});const N=()=>{let D=document.getElementById("stepItemContent"),M=(D==null?void 0:D.scrollWidth)>(D==null?void 0:D.clientWidth);o.value=M}},{deep:!0}),g.onMounted(()=>{g.nextTick(()=>{let D=document.getElementById("stepItemContent"),M=(D==null?void 0:D.scrollWidth)>(D==null?void 0:D.clientWidth);o.value=M,window.addEventListener("resize",N,!0)});const N=()=>{let D=document.getElementById("stepItemContent"),M=(D==null?void 0:D.scrollWidth)>(D==null?void 0:D.clientWidth);o.value=M}});const h=(N,D)=>{if(!t.needClick)return;r("update:active",D),r("click",N);let M=document.getElementById("stepItemContent"),V=document.getElementById(`stepItem${D}`),P=document.getElementById("stepItem0");const q=V&&P?(V==null?void 0:V.offsetLeft)-(P==null?void 0:P.offsetLeft):0;M&&V&&(M.scrollLeft=q>(M==null?void 0:M.clientWidth)?q-(M==null?void 0:M.offsetLeft):0)},m=()=>{let N=document.getElementById("stepItemContent");N&&(N.scrollLeft=N.scrollLeft-20)},b=()=>{let N=document.getElementById("stepItemContent");N&&(N.scrollLeft=N.scrollLeft+20)},_=()=>{clearInterval(c.value);let N=document.getElementById("stepItemContent");f.value=!1,c.value=setInterval(()=>{f.value=!0,N&&(N.scrollLeft=N.scrollLeft-20)},100)},x=()=>{clearInterval(c.value),f.value||m()},E=()=>{clearInterval(l.value);let N=document.getElementById("stepItemContent");f.value=!1,l.value=setInterval(()=>{f.value=!0,N&&(N.scrollLeft=N.scrollLeft+20)},100)},F=()=>{clearInterval(l.value),f.value||b()};return(N,D)=>{const M=g.resolveComponent("el-icon");return g.openBlock(),g.createElementBlock("div",ILe,[o.value?(g.openBlock(),g.createElementBlock("div",{key:0,class:"icon-left",onMousedown:_,onMouseup:x,onClick:m},[g.createVNode(M,{class:"operation-icon"},{default:g.withCtx(()=>[g.createVNode(g.unref(lhe),{size:"26px"})]),_:1})],32)):g.createCommentVNode("v-if",!0),g.createElementVNode("div",{class:"step-item-content",id:"stepItemContent",style:g.normalizeStyle({justifyContent:o.value?"flex-start":"center"})},[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(n.list,(V,P)=>{var q;return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(`${n.alignCenter?"ik-hor-step-item":""} step-item ${P<=n.active?"step-item-active":""}`),style:g.normalizeStyle({width:n.alignCenter?`calc(100%/${(q=n.list)==null?void 0:q.length})`:""}),key:P},[g.createElementVNode("div",{class:g.normalizeClass(`${n.alignCenter?"ik-hor-step_head":""} `)},[P!==0?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(`ik-hor-step_line step-border ${P<=n.active?"step-border-greater-than":""}`),style:g.normalizeStyle({width:`${n.spaceNum.indexOf("px")!=-1?n.spaceNum:`${n.spaceNum}px`}`})},D[0]||(D[0]=[g.createElementVNode("i",{class:"ik-hor-step_line_inner"},null,-1)]),6)):g.createCommentVNode("v-if",!0),g.createElementVNode("div",{class:g.normalizeClass(`step-num ${P===n.active?"step-num-active":P<n.active?"step-num-greater-than":""}`),onClick:fe=>h(V,P),style:g.normalizeStyle({backgroundColor:P===n.active&&n.activeColor?n.activeColor:"",cursor:V&&V.disabled?"not-allowed":n.needClick?"pointer":"context-menu"})},[g.renderSlot(N.$slots,"icon",{data:{item:V,index:P}},()=>[g.createTextVNode(g.toDisplayString(P+1),1)],!0)],14,DLe)],2),g.createElementVNode("div",NLe,[g.createElementVNode("div",{id:`stepItem${P}`,class:g.normalizeClass(`step-label ${n.active===P?"step-label-active":P<n.active?"step-label-greater-than":""} step-item-${P}`),style:g.normalizeStyle({color:P===n.active&&n.activeColor?n.activeColor:"",cursor:V&&V.disabled?"not-allowed":n.needClick?"pointer":"context-menu"}),onClick:fe=>h(V,P)},g.toDisplayString(V[n.propsField.title]),15,OLe),g.createElementVNode("div",{id:`stepItemDesc${P}`,class:g.normalizeClass(`step-description step-label ${n.active===P?"step-label-active":P<n.active?"step-label-greater-than":""} step-item-${P}`),style:g.normalizeStyle({color:P===n.active&&n.activeColor?n.activeColor:"",cursor:V&&V.disabled?"not-allowed":n.needClick?"pointer":"context-menu"}),onClick:fe=>h(V,P)},g.toDisplayString(V[n.propsField.description]),15,RLe)])],6)}),128))],4),o.value?(g.openBlock(),g.createElementBlock("div",{key:1,class:"icon-right",onMousedown:E,onMouseup:F,onClick:b},[g.createVNode(M,{class:"operation-icon"},{default:g.withCtx(()=>[g.createVNode(g.unref(che))]),_:1})],32)):g.createCommentVNode("v-if",!0)])}}}),[["__scopeId","data-v-95f77eab"]])),PLe="data:image/webp;base64,UklGRnoEAABXRUJQVlA4WAoAAAAwAAAALwAALwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBImAAAAA2AYm3bsuhFm7u72wZoTrbGIcoKaKyAROJQbQmW2IVb/WkW3ZmPd3ymRMQEwJfV56QRo5pHErkUkFdQWRJpeGW6SoL9EvaWxAdbAeiVd5gyAK5NAdOtv4uNfsT21TUukBVjgFubBOQS+Ip7G/k2LpatkF2hAuBI5siAdsL2j3DHQrJ7NKDbUIyOj3bhqADBsgNPUqUlgncLVlA4IOwBAABwDQCdASowADAAPm0yk0ckIyGhJzgMkIANiWwArDM9tzexcZ3vwYZdKHIB749Ap5gP1E/YD34/QB6AH+A9F//S+w1z2/sz/5DzdDABM7ldHg1iMkeWX8LH9T1VzicAWGJgnNq4e/5P/NObJOBUhFC8dPnhmAD+9wGzP9Zfeg5ENi90xn4awZvrlCLnfwvZX//s4u6n2Pa2TF/r8wh0GtdNNJIBMRbrMaCBwyl6z86DqQgvpixbIdOVbwZFf/7KjC+uzJ5nNRyJ1Rpab8pIf2m1+SBOfX9w7EFXUErK8NSCsePMPazMXKH5y9Wl+nfiSrmsv079Fk6NkDF3Dxr+C+Rp4UdG/f3kP8PZfd/FyRupWURiDOrAjLamuF4OPo2BylwD7ulmdgDn4BEMXuvpYCACy4yCVjgsOzqToG2rSfJOtxy6Hh1/B2gu7X1MdJpHsdHdUrlRzTLKyV3wZG5a64SKKB2/QGk8IRZT0veUdDeo579/WyTU3ujQZeKNBS9ANlv1muyN9Kf5bm1f3UoPm/KnDkqf/1f2jf6aQJ7IYNod25fVfhRX+l1u9qBzs/bVezF7ZgC2LOuuJl1Tvwgeujpg9Uc/m0A9X878DzEkgxP/sPGviOfCElM1J/Kr3TTCwCkfW+K3oZuMB7HAAAA=",MLe={class:"ik-flie-list"},ULe={class:"name"},HLe={key:1},VLe=["src"],$Le={class:"file-icon"},QLe={class:"file-name-loading"},zLe={class:"file-name"},jLe={class:"file-name__content"},WLe={key:0},GLe={key:0,class:"file-size"},qLe={class:"operate-btn"},KLe={class:"name"},ZLe={class:"file-name-loading"},YLe={class:"file-name"},XLe={class:"file-size"},JLe={class:"operate-btn"},ePe={class:"card"},tPe={class:"title"},nPe={key:0,class:"tip-slot"},rPe={class:"ik-flie-list"},oPe={class:"name"},sPe={key:1},iPe=["src"],aPe={class:"file-icon"},lPe={class:"file-name-loading"},cPe={class:"file-name"},uPe={key:0},dPe={key:0,class:"file-size"},fPe={key:0,class:"operate-btn"},APe=Fi(gi(g.defineComponent({__name:"index",props:g.mergeModels({showIcon:{type:Boolean,default:!0},title:{type:String,default:"上传文件"},action:{type:String,default:""},type:{type:String,default:"button"},headers:{type:Object,default:()=>({})},loadUrl:{type:String,default:""},limit:{type:Number,default:1},size:{type:Number,default:50},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""},limitText:{type:String,default:""},defaultFileds:{type:Object,default:()=>({name:"name",url:"url",suffix:"suffix",size:"fileSize"})},preview:{type:Boolean,default:!1},customIconData:{type:Object,default:()=>({})},customIconFields:{type:Object,default:()=>({type:"type",icon:"icon"})},disabled:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},imageMode:{type:Boolean,default:!1},isOnlyOfficePreview:{type:Boolean,default:!0},onlyOfficeAccept:{type:String,default:".pdf,.docx,.doc.ppt,.pptx,.xlsx,.xls,"},onlyofficeServer:{type:String,default:""},onlyOfficeConfig:{type:Object,default:()=>({})},jwtToken:{type:String,default:""},trueDelete:{type:Boolean,default:!1}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:g.mergeModels(["delete","exceed","handPreview","success","error","outSize","change","progress","progressEnd"],["update:modelValue"]),setup(n,{emit:e}){const t=n,r=e,o=g.useModel(n,"modelValue"),c={...{name:"name",url:"url",suffix:"suffix",size:"size"},...t.defaultFileds},{cLoadUrl:f,cUploadUrl:h,cOnlyofficeConfig:m,cOnlyofficePreviewType:b}=Z1(t),_=g.computed(()=>t.size),x=g.ref(null),E=g.ref([]),F=g.ref({}),N=g.ref(!1),D=Ue=>{const Se=Ue.size/1024/1024;return Se<_.value?!0:(r("outSize"),An.ElMessage({message:`上传文件大小(${Se.toFixed(4)}MB)超出允许最大值(${t.size}MB),请重新选择`,type:"warning",showClose:!0,duration:5e3}),!1)},M=g.computed(()=>{const{accept:Ue}=t;return Ue==="*"?"*":`${Ue.toLowerCase()},${Ue.toUpperCase()}`}),V=(Ue,Se)=>{var Fe,ce,Ie,_e,Me;if(r("change",Ue),Ue.size/1024/1024<_.value||g.nextTick(()=>{o.value.pop()}),t.accept!=="*"){let Ee=!1;M.value.includes("/")&&(Ee=((ce=(Fe=Ue==null?void 0:Ue.raw)==null?void 0:Fe.type)==null?void 0:ce.split("/").shift())===((Ie=M.value)==null?void 0:Ie.split("/").shift()));const We=(_e=M.value)==null?void 0:_e.split(",");!We.includes((Me=Ue==null?void 0:Ue.raw)==null?void 0:Me.type)&&!We.includes(`.${Ue.name.split(".").pop()}`)&&!Ee&&(An.ElMessage({message:`不允许的文件格式(${Ue.name}),请重新选择`,type:"warning",showClose:!0,duration:5e3}),g.nextTick(()=>{o.value.pop()}))}},P=()=>!1,q=(Ue,Se)=>{var ot,je;Ue.status="ready",Se!==void 0&&E.value.splice(Se,1),(ot=x.value)==null||ot.handleStart(Ue.raw),(je=x.value)==null||je.submit()},fe=(Ue,Se)=>{var ot;Ue.splice(t.limit===1?1:t.limit),Ue.forEach(je=>{var Fe;(Fe=x.value)==null||Fe.handleStart(je)}),(ot=x.value)==null||ot.submit(),An.ElMessage({message:(t==null?void 0:t.limitText)||`最大可上传${t.limit}个文件,已忽略超出文件`,type:"warning",showClose:!0,duration:5e3}),r("exceed",Ue)},te=(Ue,Se,ot)=>{Ue.success?r("success",Ue,Se,ot):(r("error",Ue,Se,ot),ne(Se),E.value.push(Se))},j=(Ue,Se,ot)=>{E.value.push(Se),r("error",Ue,Se,ot)},le=Ue=>{var Se,ot;F.value={...Ue,name:Ue[c.name],url:l2(f.value,Ue[c.url]||((ot=(Se=Ue==null?void 0:Ue.response)==null?void 0:Se.data)==null?void 0:ot.id))},t.isOnlyOfficePreview&&(N.value=!0),r("handPreview",F.value)},pe=Ue=>{ts.ikFile.downloadByOnlineUrl(Ue[c.url],Ue[c.name])},be=(Ue,Se=!1)=>{var ot;(ot=x.value)==null||ot.abort(Ue)},re={Authorization:"Bearer iking","X-Tenant":"sys","Content-Type":"application/x-www-form-urlencoded"},ne=Ue=>{var Se,ot,je,Fe,ce;try{Ue.status!=="success"&&be(Ue),(Se=x.value)==null||Se.handleRemove(Ue),o.value=o.value.filter(Ie=>Ie.uid!==Ue.uid),r("delete",Ue),t.trueDelete&&NE.post(h.value.replace("/oss/upload","/oss/delete"),{fileUrl:((je=(ot=Ue==null?void 0:Ue.response)==null?void 0:ot.data)==null?void 0:je.id)||((Fe=Ue==null?void 0:Ue.data)==null?void 0:Fe.id)||(Ue==null?void 0:Ue.id)||Ue[c.url]},{headers:re})}catch(Ie){(ce=x.value)==null||ce.handleRemove(Ue),o.value=o.value.filter(_e=>_e.uid!==Ue.uid),r("delete",Ue),console.error(Ie)}},Oe=(Ue,Se,ot)=>{r("progress",Ue,Se,ot),Ue.percent>=100&&r("progressEnd",Ue,Se,ot)},Be=(Ue,Se)=>{E.value.splice(Se,1)},Ke=g.computed(()=>o.value.length>=t.limit||t.disabled),W=Ue=>{var ot,je,Fe;const Se=((je=(ot=Ue==null?void 0:Ue.response)==null?void 0:ot.data)==null?void 0:je[c.suffix])||((Fe=Ue==null?void 0:Ue.data)==null?void 0:Fe[c.suffix])||(Ue==null?void 0:Ue[c.suffix]);return b.includes(Se)};return(Ue,Se)=>{var ot;return g.openBlock(),g.createElementBlock(g.Fragment,null,[n.preview?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[n.type==="button"?(g.openBlock(),g.createBlock(g.unref(An.ElUpload),g.mergeProps({key:0,class:"ik-file-upload"},Ue.$attrs,{accept:n.accept,action:g.unref(h),"file-list":o.value,"onUpdate:fileList":Se[0]||(Se[0]=je=>o.value=je),ref_key:"refUpload",ref:x,"auto-upload":!0,"before-upload":D,"before-remove":P,"on-exceed":fe,"on-change":V,multiple:n.multiple,headers:n.headers,limit:n.limit,"on-progress":Oe,"on-success":te,"on-error":j}),{trigger:g.withCtx(()=>[Ue.$slots.trigger?g.renderSlot(Ue.$slots,"trigger",{key:0},void 0,!0):(g.openBlock(),g.createBlock(g.unref(An.ElButton),{key:1,disabled:Ke.value},g.createSlots({default:g.withCtx(()=>[g.createTextVNode(" "+g.toDisplayString(n.title),1)]),_:2},[n.showIcon?{name:"icon",fn:g.withCtx(()=>[g.createVNode(g.unref(Ii),{name:"iksvg_daoru",disabled:Ke.value},null,8,["disabled"])]),key:"0"}:void 0]),1032,["disabled"]))]),file:g.withCtx(({file:je})=>[g.createElementVNode("div",MLe,[g.createElementVNode("div",ULe,[!Ue.$slots.fileIcon&&(!n.customIconData[g.unref(Wd)(je,c)]||!n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon])?(g.openBlock(),g.createBlock(g.unref(xT),{key:0,type:g.unref(Wd)(je,c)},null,8,["type"])):!Ue.$slots.fileIcon&&n.customIconData[g.unref(Wd)(je,c)]&&n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon]?(g.openBlock(),g.createElementBlock("div",HLe,[n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.type]==="img"?(g.openBlock(),g.createElementBlock("img",{key:0,src:n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon],alt:"",class:"file-img-icon"},null,8,VLe)):(g.openBlock(),g.createElementBlock("span",{key:1,class:g.normalizeClass([n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon],"file-icon-size"])},null,2))])):g.createCommentVNode("v-if",!0),g.createElementVNode("div",$Le,[g.renderSlot(Ue.$slots,"fileIcon",{file:je},void 0,!0)]),g.createElementVNode("div",QLe,[g.createElementVNode("p",zLe,[g.createElementVNode("p",jLe,g.toDisplayString(je[c.name]||je.name),1),je.percentage&&je.status==="uploading"?(g.openBlock(),g.createElementBlock("span",WLe,"("+g.toDisplayString(je.percentage)+"%)",1)):g.createCommentVNode("v-if",!0)]),je.status==="success"?(g.openBlock(),g.createElementBlock("p",GLe,g.toDisplayString(g.unref(mG)((je[c.size]||je.size)/1024/1024))+"MB ",1)):g.createCommentVNode("v-if",!0),je.percentage&&je.status==="uploading"?(g.openBlock(),g.createBlock(g.unref(An.ElProgress),{key:1,"text-inside":"",percentage:je.percentage,color:"var(--el-color-primary)","show-text":!1},null,8,["percentage"])):g.createCommentVNode("v-if",!0)])]),g.createElementVNode("div",qLe,[je.status==="success"?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[W(je)?(g.openBlock(),g.createBlock(g.unref(Ii),{key:0,onClick:Fe=>le(je),name:"iksvg_yulan",title:"预览",bg:"",size:"default"},null,8,["onClick"])):g.createCommentVNode("v-if",!0),g.createVNode(g.unref(Ii),{onClick:g.withModifiers(Fe=>ne(je),["stop"]),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])],64)):(g.openBlock(),g.createBlock(g.unref(Ii),{key:1,onClick:g.withModifiers(Fe=>ne(je),["stop"]),error:"",name:"iksvg_guanbi",size:"default",bg:"",title:"取消上传"},null,8,["onClick"]))])])]),default:g.withCtx(()=>{var je;return[!n.preview&&n.tip?(g.openBlock(),g.createBlock(g.unref(An.ElTooltip),{key:0,effect:"dark",content:t.tipText||"","popper-class":"_ik_web_ui_file-help-tooltip"},{default:g.withCtx(()=>[g.createVNode(g.unref(An.ElIcon),{size:23,class:"_ik_web_ui_file_help_icon"},{default:g.withCtx(()=>[g.createVNode(g.unref(Ahe))]),_:1})]),_:1},8,["content"])):g.createCommentVNode("v-if",!0),(je=E.value)!=null&&je.length?(g.openBlock(!0),g.createElementBlock(g.Fragment,{key:1},g.renderList(E.value,(Fe,ce)=>(g.openBlock(),g.createElementBlock("div",{class:"ik-error-flie-list",key:Fe.uid},[g.createElementVNode("div",KLe,[g.createVNode(g.unref(An.ElIcon),{size:32,class:"info",style:{"vertical-align":"middle"}},{default:g.withCtx(()=>[g.createVNode(g.unref(wTe))]),_:1}),g.createElementVNode("div",ZLe,[g.createElementVNode("p",YLe,g.toDisplayString(Fe[c.name]||Fe.name),1),g.createElementVNode("p",XLe,g.toDisplayString(g.unref(mG)(Fe.size/1024/1024))+"MB ",1)])]),g.createElementVNode("div",JLe,[g.createVNode(g.unref(Ii),{onClick:g.withModifiers(Ie=>q(Fe,ce),["stop"]),name:"iksvg_zhongzhi",title:"重新上传",bg:"",size:"default"},null,8,["onClick"]),g.createVNode(g.unref(Ii),{onClick:g.withModifiers(Ie=>Be(Fe,ce),["stop"]),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])])]))),128)):g.createCommentVNode("v-if",!0)]}),_:3},16,["accept","action","file-list","multiple","headers","limit"])):(g.openBlock(),g.createBlock(g.unref(An.ElUpload),g.mergeProps({key:1,"file-list":o.value,"onUpdate:fileList":Se[1]||(Se[1]=je=>o.value=je),class:["ik-file-pload-card",{plain:n.plain}],"auto-upload":!0},Ue.$attrs,{accept:n.accept,action:g.unref(h),disabled:Ke.value,ref_key:"refUpload",ref:x,"before-upload":D,"before-remove":P,"on-exceed":fe,multiple:n.multiple,headers:n.headers,limit:n.limit,"on-success":te,"on-error":j,"on-change":V}),{file:g.withCtx(({file:je})=>[g.createElementVNode("div",rPe,[g.createElementVNode("div",oPe,[!Ue.$slots.fileIcon&&(!n.customIconData[g.unref(Wd)(je,c)]||!n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon])?(g.openBlock(),g.createBlock(g.unref(xT),{key:0,type:g.unref(Wd)(je,c)},null,8,["type"])):!Ue.$slots.fileIcon&&n.customIconData[g.unref(Wd)(je,c)]&&n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon]?(g.openBlock(),g.createElementBlock("div",sPe,[n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.type]==="img"?(g.openBlock(),g.createElementBlock("img",{key:0,src:n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon],alt:"",class:"file-img-icon"},null,8,iPe)):(g.openBlock(),g.createElementBlock("span",{key:1,class:g.normalizeClass([n.customIconData[g.unref(Wd)(je,c)][n.customIconFields.icon],"file-icon-size"])},null,2))])):g.createCommentVNode("v-if",!0),g.createElementVNode("div",aPe,[g.renderSlot(Ue.$slots,"fileIcon",{file:je},void 0,!0)]),g.createElementVNode("div",lPe,[g.createElementVNode("p",cPe,[g.createTextVNode(g.toDisplayString(je[c.name]||je.name)+" ",1),je.percentage&&je.status==="uploading"?(g.openBlock(),g.createElementBlock("span",uPe,"("+g.toDisplayString(je.percentage)+"%)",1)):g.createCommentVNode("v-if",!0)]),je.status==="success"?(g.openBlock(),g.createElementBlock("p",dPe,g.toDisplayString(g.unref(mG)((je[c.size]||je.size)/1024/1024))+"MB ",1)):g.createCommentVNode("v-if",!0),je.percentage&&je.status==="uploading"?(g.openBlock(),g.createBlock(g.unref(An.ElProgress),{key:1,"text-inside":"",percentage:je.percentage,color:"var(--el-color-primary)","show-text":!1},null,8,["percentage"])):g.createCommentVNode("v-if",!0)])]),n.preview?(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[(n.preview||je.percentage===100)&&W(je)?(g.openBlock(),g.createBlock(g.unref(An.ElIcon),{key:0,title:"预览",class:"primary"},{default:g.withCtx(()=>[g.createVNode(g.unref(ghe),{onClick:Fe=>le(je)},null,8,["onClick"])]),_:2},1024)):g.createCommentVNode("v-if",!0),g.createVNode(g.unref(An.ElIcon),{title:"下载",class:"primary"},{default:g.withCtx(()=>[g.createVNode(g.unref(dhe),{onClick:Fe=>pe(je)},null,8,["onClick"])]),_:2},1024)],64)):(g.openBlock(),g.createElementBlock("div",fPe,[je.status==="success"?(g.openBlock(),g.createElementBlock(g.Fragment,{key:0},[W(je)?(g.openBlock(),g.createBlock(g.unref(Ii),{key:0,onClick:Fe=>le(je),name:"iksvg_yulan",title:"预览",bg:"",size:"default"},null,8,["onClick"])):g.createCommentVNode("v-if",!0),g.createVNode(g.unref(Ii),{onClick:Fe=>ne(je),error:"",name:"iksvg_shanchu",title:"删除",bg:"",size:"default"},null,8,["onClick"])],64)):(g.openBlock(),g.createBlock(g.unref(Ii),{key:1,onClick:Fe=>ne(je),error:"",name:"iksvg_guanbi",size:"default",bg:"",title:"取消上传"},null,8,["onClick"]))]))])]),default:g.withCtx(()=>[g.createElementVNode("div",ePe,[g.createElementVNode("div",tPe,[n.imageMode?g.renderSlot(Ue.$slots,"image",{key:0},()=>[Se[3]||(Se[3]=g.createElementVNode("img",{src:PLe,class:"w-[48px] h-[48px]"},null,-1))],!0):n.showIcon?(g.openBlock(),g.createBlock(g.unref(Ii),{key:1,name:"iksvg_img_shangchuanhetongfujianbeifen",type:"primary",bg:"",size:40})):g.createCommentVNode("v-if",!0),g.createElementVNode("span",null,[g.createTextVNode(g.toDisplayString(n.title)+" ",1),!n.preview&&n.tip&&!Ue.$slots.tip?(g.openBlock(),g.createBlock(g.unref(An.ElTooltip),{key:0,effect:"dark",content:t.tipText||"","popper-class":"_ik_web_ui_file-help-tooltip"},{default:g.withCtx(()=>[g.createVNode(g.unref(An.ElIcon),{size:23,class:"_ik_web_ui_file_help_icon"},{default:g.withCtx(()=>[g.createVNode(g.unref(Ahe))]),_:1})]),_:1},8,["content"])):g.createCommentVNode("v-if",!0)])]),g.createVNode(g.unref(Ii),{name:"iksvg_daoru",bg:"",size:24,width:40,padding:"0"})]),Ue.$slots.tip?(g.openBlock(),g.createElementBlock("div",nPe,[g.renderSlot(Ue.$slots,"tip",{},void 0,!0)])):g.createCommentVNode("v-if",!0)]),_:3},16,["file-list","class","accept","action","disabled","multiple","headers","limit"]))],64)),g.createVNode(g.unref(Fq),{show:N.value,"onUpdate:show":Se[2]||(Se[2]=je=>N.value=je),loadUrl:g.unref(f),file:F.value,onlyofficeServer:((ot=g.unref(m))==null?void 0:ot.serverUrl)||n.onlyofficeServer,onlyOfficeConfig:g.unref(m)||n.onlyOfficeConfig},null,8,["show","loadUrl","file","onlyofficeServer","onlyOfficeConfig"])],64)}}}),[["__scopeId","data-v-40223d12"]])),hPe={},pPe={t:"1686214149488",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8490",width:"200",height:"200"};function gPe(n,e){return g.openBlock(),g.createElementBlock("svg",pPe,e[0]||(e[0]=[g.createElementVNode("path",{d:"M369.569592 512.011256c0-14.328333-11.010775-25.945929-24.591071-25.945929L86.980515 486.065328c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.998005 0C358.55984 537.959232 369.569592 526.341636 369.569592 512.011256z","p-id":"8491"},null,-1),g.createElementVNode("path",{d:"M937.019485 486.064304 679.020456 486.064304c-13.580297 0-24.591071 11.618619-24.591071 25.945929 0 14.33038 11.010775 25.947975 24.591071 25.947975l257.999029 0c13.580297 0 24.590048-11.618619 24.590048-25.947975C961.609533 497.682923 950.598758 486.064304 937.019485 486.064304z","p-id":"8492"},null,-1),g.createElementVNode("path",{d:"M512.011768 62.389956c-13.580297 0-24.590048 11.618619-24.590048 25.945929l0 257.170151c0 14.329357 11.010775 25.946952 24.590048 25.946952s24.591071-11.618619 24.591071-25.946952L536.602839 88.335884C536.602839 74.008574 525.591041 62.389956 512.011768 62.389956z","p-id":"8493"},null,-1),g.createElementVNode("path",{d:"M512.011768 652.544967c-13.580297 0-24.590048 11.618619-24.590048 25.946952l0 257.169127c0 14.33038 11.010775 25.947975 24.590048 25.947975s24.591071-11.618619 24.591071-25.947975L536.602839 678.491918C536.602839 664.162562 525.591041 652.544967 512.011768 652.544967z","p-id":"8494"},null,-1),g.createElementVNode("path",{d:"M377.001865 413.125085c4.744048 4.737908 10.818393 7.082302 16.882506 7.082302 6.519484 0 13.039991-2.724041 17.879206-8.134261 9.317203-10.414187 8.885368-26.834158-0.9967-36.678364L228.341057 193.559391c-9.832949-9.830903-25.406646-9.388834-34.760688 1.050935-9.317203 10.414187-8.885368 26.834158 0.9967 36.678364L377.001865 413.125085z","p-id":"8495"},null,-1),g.createElementVNode("path",{d:"M646.997112 610.873892c-9.846252-9.831926-25.419949-9.388834-34.761712 1.051959-9.317203 10.414187-8.885368 26.834158 0.997724 36.678364l182.41354 181.834348c4.743024 4.738931 10.818393 7.083326 16.881482 7.083326 6.520507 0 13.039991-2.723018 17.879206-8.134261 9.317203-10.41521 8.886391-26.834158-0.9967-36.678364L646.997112 610.873892z","p-id":"8496"},null,-1),g.createElementVNode("path",{d:"M630.114606 420.207387c6.064113 0 12.139481-2.344395 16.882506-7.082302l182.425819-181.836395c9.882068-9.844206 10.313903-26.264177 0.9967-36.678364-9.341762-10.43977-24.915459-10.882861-34.760688-1.050935L613.233124 375.394762c-9.882068 9.844206-10.314926 26.264177-0.997724 36.678364C617.074615 417.483346 623.595123 420.207387 630.114606 420.207387z","p-id":"8497"},null,-1),g.createElementVNode("path",{d:"M377.025401 610.873892 194.600605 792.710286c-9.881045 9.844206-10.313903 26.263154-0.9967 36.678364 4.839215 5.411243 11.358699 8.134261 17.879206 8.134261 6.064113 0 12.138458-2.344395 16.881482-7.083326l182.425819-181.834348c9.881045-9.844206 10.313903-26.264177 0.9967-36.678364C402.469909 601.485057 386.872676 601.041966 377.025401 610.873892z","p-id":"8498"},null,-1)]))}const mPe=gi(hPe,[["render",gPe]]),vPe={key:1,class:"upload-btn"},yPe={class:"tip"},bPe={class:"loading-statu"},wPe={class:"operate-btn"},CPe={key:0},_Pe={class:"el-upload-list el-upload-list--picture-card"},SPe=["onClick"],EPe=["src"],BPe={class:"demo-image__preview"},xPe=Fi(gi(g.defineComponent({__name:"index",props:g.mergeModels({title:{type:String,default:"上传图片"},loadUrl:{type:String,default:""},action:{type:String,default:""},headers:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}},limit:{type:Number,default:50},size:{type:Number,default:50},accept:{type:String,default:"image/*"},fit:{type:String,default:"contain"},preview:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0},tip:{type:Boolean,default:!1},tipText:{type:String,default:""},disabled:{type:Boolean,default:!1},width:{type:Number,default:106},height:{type:Number,default:106}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:g.mergeModels(["delete","success","change"],["update:modelValue"]),setup(n,{emit:e}){g.useCssVars(Se=>({"39ec9d0e":m.value,"2c4fea42":b.value,"7f29be00":Ue.value,c0e26468:W.value}));const t=n,r=g.useModel(n,"modelValue"),{formItem:o}=An.useFormItem(),l=Se=>Array.isArray(Se)?Se.map(ot=>{var ce,Ie;const je=((ce=ot.url)==null?void 0:ce.startsWith("http"))||((Ie=ot.url)==null?void 0:Ie.startsWith("blob")),Fe=(ot==null?void 0:ot.url)||ot;return{...ot.url?ot:{url:Fe},__url:je?Fe:`${f.value}${Fe}`}}):Se?[{url:Se,__url:Se!=null&&Se.startsWith("http")||Se!=null&&Se.startsWith("blob")?Se:`${f.value}${Se}`}]:[];g.watch(()=>r.value,Se=>{!Se||!Se.length?E.value=[]:E.value=ts._.cloneDeep(l(Se)),o==null||o.validate("change")},{deep:!0});const c=e,{cLoadUrl:f,cUploadUrl:h}=Z1(t),m=g.computed(()=>`${t.width}px`),b=g.computed(()=>`${t.height}px`),_=g.computed(()=>t.size),x=g.ref(null),E=g.ref(l(r.value)),F=g.ref([]),N=g.ref(!1),D=g.ref(0),M=g.computed(()=>t.tipText||`最多可上传${t.limit}张图片, 每张图片不能超过${t.size}MB`),V=(Se,ot)=>{c("change",Se)},P=Se=>{if(!Se.type.includes("image")){An.ElMessage.warning("只允许上传图片!");try{E.value.pop()}catch{}return!1}if(!(Se.size/1024/1024<_.value)){An.ElMessage.warning(`图片大小超出系统限制的${t.size}MB!`);try{E.value.pop()}catch{}return!1}return!0},q=()=>!1,fe=(Se,ot)=>{var je,Fe;Se.status="ready",ot!==void 0&&F.value.splice(ot,1),(je=x.value)==null||je.handleStart(Se.raw),(Fe=x.value)==null||Fe.submit()},te=(Se,ot)=>{var Ie,_e;const je=r.value.length,Fe=t.limit-je;let ce=0;for(;ce<Fe&&ce<(Se==null?void 0:Se.length);)(Ie=x.value)==null||Ie.handleStart(Se==null?void 0:Se[ce]),(_e=x.value)==null||_e.submit(),ce++},j=(Se,ot,je)=>{c("success",Se,ot,je),r.value=E.value,o==null||o.validate("change")},le=(Se,ot,je)=>{F.value.push({...ot,__url:ot.url})},pe=Se=>{var ot;N.value=!0,D.value=Array.isArray(r==null?void 0:r.value)?(ot=r==null?void 0:r.value)==null?void 0:ot.findIndex(je=>je.url===Se.url):0},be=Se=>{ts.ikFile.downloadFile(Se.__url||Se.url,Se.name||Se.url)},re=Se=>{var ot;(ot=x.value)==null||ot.abort(Se)},ne=Se=>{var ot;Se.status!=="success"&&re(Se),r.value=(ot=E.value)==null?void 0:ot.filter(je=>je.uid!==Se.uid),c("delete",Se)},Oe=(Se,ot)=>{F.value.splice(ot,1)},Be=g.computed(()=>E.value.length+F.value.length<t.limit),Ke=g.computed(()=>r.value.length>=t.limit||t.disabled),W=g.computed(()=>{var Se;return!((Se=r.value)!=null&&Se.length)&&!F.value.length||t.limit===1||typeof r.value=="string"?"0":`${t.width+8}px`}),Ue=g.computed(()=>{var Se;return!((Se=r.value)!=null&&Se.length)&&!F.value.length&&typeof r.value!="string"||t.limit===1?"none":"absolute"});return(Se,ot)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createVNode(g.unref(An.ElUpload),g.mergeProps({class:["ik-image-upload",{preview:n.preview,"hide-upload":!Be.value&&n.limit===1,disabled:Ke.value}],ref_key:"refUpload",ref:x,"list-type":"picture-card",accept:n.accept,action:g.unref(h),headers:n.headers,data:n.data,"file-list":E.value,"onUpdate:fileList":ot[0]||(ot[0]=je=>E.value=je),multiple:n.multiple,limit:n.limit,"on-change":V,"before-upload":P,"before-remove":q,"on-exceed":te,"on-success":j,"on-error":le,drag:""},Se.$attrs,{disabled:Ke.value}),g.createSlots({trigger:g.withCtx(()=>[Se.$slots.trigger?g.renderSlot(Se.$slots,"trigger",{key:0},void 0,!0):(g.openBlock(),g.createElementBlock("div",vPe,[g.createVNode(g.unref(Ii),{size:20,name:"iksvg_guanbibeifen",disabled:Ke.value},null,8,["disabled"]),g.createElementVNode("span",null,g.toDisplayString(n.title),1)]))]),file:g.withCtx(({file:je,index:Fe})=>[g.createElementVNode("div",{class:g.normalizeClass(["load-list",{loading:je.status==="uploading"}]),"element-loading-background":"var(--ik-upload-bg)"},[g.withDirectives(g.createElementVNode("div",bPe,[g.createVNode(mPe),g.createTextVNode(" 上传"+g.toDisplayString(je.percentage)+"% ",1)],512),[[g.vShow,je.status==="uploading"]]),g.createCommentVNode(` <img :src="file.url" alt="" :style="{ 'object-fit': fit }" /> `),g.createVNode(g.unref(An.ElImage),{style:{width:"100%",height:"100%"},src:je.__url||je.url,"zoom-rate":1.2,"initial-index":0,fit:"contain"},null,8,["src"]),g.createElementVNode("span",wPe,[g.createElementVNode("span",null,[g.createVNode(g.unref(An.ElIcon),{onClick:ce=>pe(je)},{default:g.withCtx(()=>[g.createVNode(g.unref(mhe))]),_:2},1032,["onClick"])]),g.createElementVNode("span",null,[g.createVNode(g.unref(An.ElIcon),{onClick:ce=>be(je)},{default:g.withCtx(()=>[g.createVNode(g.unref(dhe))]),_:2},1032,["onClick"])]),n.preview?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("span",CPe,[g.createVNode(g.unref(An.ElIcon),{type:"warning",onClick:ce=>ne(je)},{default:g.withCtx(()=>[g.createVNode(g.unref(uhe))]),_:2},1032,["onClick"])]))])],2)]),default:g.withCtx(()=>[g.createElementVNode("ul",_Pe,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(F.value,(je,Fe)=>(g.openBlock(),g.createElementBlock("li",{class:"el-upload-list__item",key:je.uid},[g.createElementVNode("span",null,[g.createVNode(g.unref(Ii),{name:"iksvg_guanbi",error:"",onClick:ce=>Oe(je,Fe)},null,8,["onClick"])]),g.createElementVNode("div",{class:g.normalizeClass(["load-list",{loading:je.status==="uploading",fail:je.status==="fail"}]),"element-loading-background":"var(--ik-upload-bg)"},[g.withDirectives(g.createElementVNode("div",{class:"loading-statu",onClick:ce=>fe(je,Fe)},[g.createVNode(g.unref(Ii),{name:"iksvg_shuaxin-daohang",size:24}),ot[2]||(ot[2]=g.createElementVNode("span",{class:"error"},"上传错误",-1)),ot[3]||(ot[3]=g.createElementVNode("p",null,"点击重新上传",-1))],8,SPe),[[g.vShow,je.status==="fail"]]),g.createElementVNode("img",{src:je.__url,alt:"",style:g.normalizeStyle({"object-fit":n.fit})},null,12,EPe)],2)]))),128))])]),_:2},[n.tip?{name:"tip",fn:g.withCtx(()=>[g.createElementVNode("span",yPe,g.toDisplayString(M.value),1)]),key:"0"}:void 0]),1040,["class","accept","action","headers","data","file-list","multiple","limit","disabled"]),g.createCommentVNode(" 文件预览 "),g.createElementVNode("div",BPe,[N.value?(g.openBlock(),g.createBlock(g.unref(AZ),{key:0,"lock-scroll":"","hide-on-click-modal":"",onClose:ot[1]||(ot[1]=()=>{N.value=!1}),"url-list":l(E.value).map(je=>je.__url),"initial-index":D.value},null,8,["url-list","initial-index"])):g.createCommentVNode("v-if",!0)])],64))}}),[["__scopeId","data-v-16e28cae"]]));function kPe(n,e){return Object.hasOwn(n,e)}function TPe(n,e,t){return new Promise(r=>{n.toBlob(r,e,t)})}const FPe=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;function IPe(n,e,t){const r=FPe.exec(n),o=e.mimeType??(r==null?void 0:r[1])??"plain/text";let l;if((r==null?void 0:r[2])!=null){const c=atob(decodeURIComponent(r[3])),f=new Uint8Array(c.length);for(let h=0;h<c.length;h++)f[h]=c.charCodeAt(h);l=[f]}else(r==null?void 0:r[3])!=null&&(l=[decodeURIComponent(r[3])]);return new Blob(l,{type:o})}class DPe extends Error{constructor(t,r){super(t);Wt(this,"isNetworkError");Wt(this,"cause");this.cause=r==null?void 0:r.cause,this.cause&&kPe(this.cause,"isNetworkError")?this.isNetworkError=this.cause.isNetworkError:this.isNetworkError=!1}}function bme(n,e,t,r){return n===e?n:r===0?e:n+(e-n)*2**(-r/t)}const wme=['a[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^="-"]):not([inert]):not([aria-hidden])',"input:not([disabled]):not([inert]):not([aria-hidden])","select:not([disabled]):not([inert]):not([aria-hidden])","textarea:not([disabled]):not([inert]):not([aria-hidden])","button:not([disabled]):not([inert]):not([aria-hidden])",'iframe:not([tabindex^="-"]):not([inert]):not([aria-hidden])','object:not([tabindex^="-"]):not([inert]):not([aria-hidden])','embed:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^="-"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^="-"]):not([inert]):not([aria-hidden])'];class oP extends Error{constructor(t,r=null){super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.");Wt(this,"cause");Wt(this,"isNetworkError");Wt(this,"request");this.cause=t,this.isNetworkError=!0,this.request=r}}class NPe{constructor(e,t){ms(this,y5);ms(this,RB,!1);ms(this,kF);ms(this,LB);Li(this,LB,e),Li(this,kF,()=>t(e))}progress(){Qn(this,RB)||Qn(this,LB)>0&&(clearTimeout(Qn(this,y5)),Li(this,y5,setTimeout(Qn(this,kF),Qn(this,LB))))}done(){Qn(this,RB)||(clearTimeout(Qn(this,y5)),Li(this,y5,void 0),Li(this,RB,!0))}}y5=new WeakMap,RB=new WeakMap,kF=new WeakMap,LB=new WeakMap;const sP=()=>{};function OPe(n,e={}){const{body:t=null,headers:r={},method:o="GET",onBeforeRequest:l=sP,onUploadProgress:c=sP,shouldRetry:f=()=>!0,onAfterResponse:h=sP,onTimeout:m=sP,responseType:b,retries:_=3,signal:x=null,timeout:E=3e4,withCredentials:F=!1}=e,N=V=>.3*2**(V-1)*1e3,D=new NPe(E,m);function M(V=0){return new Promise(async(P,q)=>{const fe=new XMLHttpRequest,te=j=>{f(fe)&&V<_?setTimeout(()=>{M(V+1).then(P,q)},N(V)):(D.done(),q(j))};fe.open(o,n,!0),fe.withCredentials=F,b&&(fe.responseType=b),x==null||x.addEventListener("abort",()=>{fe.abort(),q(new DOMException("Aborted","AbortError"))}),fe.onload=async()=>{try{await h(fe,V)}catch(j){j.request=fe,te(j);return}fe.status>=200&&fe.status<300?(D.done(),P(fe)):f(fe)&&V<_?setTimeout(()=>{M(V+1).then(P,q)},N(V)):(D.done(),q(new oP(fe.statusText,fe)))},fe.onerror=()=>te(new oP(fe.statusText,fe)),fe.upload.onprogress=j=>{D.progress(),c(j)},r&&Object.keys(r).forEach(j=>{fe.setRequestHeader(j,r[j])}),await l(fe,V),fe.send(t)})}return M()}function RPe(...n){return fetch(...n).catch(e=>{throw e.name==="AbortError"?e:new oP(e)})}function LPe(n){const e=t=>"error"in t&&!!t.error;return n.filter(t=>!e(t))}function PPe(n){return n.filter(e=>{var t;return!((t=e.progress)!=null&&t.uploadStarted)||!e.isRestored})}function Cme(n){return typeof n!="object"||n===null||!("nodeType"in n)?!1:n.nodeType===Node.ELEMENT_NODE}function _me(n){if(typeof n=="string"){const e=document.querySelectorAll(n);return e.length===0?null:Array.from(e)}return typeof n=="object"&&Cme(n)?[n]:null}function MPe(n,e=document){return typeof n=="string"?e.querySelector(n):Cme(n)?n:null}function Sme(n){const e=n.lastIndexOf(".");return e===-1||e===n.length-1?{name:n,extension:void 0}:{name:n.slice(0,e),extension:n.slice(e+1)}}const Iq={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",msg:"application/vnd.ms-outlook",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function Eme(n){var t;if(n.type)return n.type;const e=n.name?(t=Sme(n.name).extension)==null?void 0:t.toLowerCase():null;return e&&e in Iq?Iq[e]:"application/octet-stream"}function UPe(n){return n.charCodeAt(0).toString(32)}function Bme(n){let e="";return n.replace(/[^A-Z0-9]/gi,t=>(e+=`-${UPe(t)}`,"/"))+e}function HPe(n,e){let t=e||"uppy";return typeof n.name=="string"&&(t+=`-${Bme(n.name.toLowerCase())}`),n.type!==void 0&&(t+=`-${n.type}`),n.meta&&typeof n.meta.relativePath=="string"&&(t+=`-${Bme(n.meta.relativePath.toLowerCase())}`),n.data.size!==void 0&&(t+=`-${n.data.size}`),n.data.lastModified!==void 0&&(t+=`-${n.data.lastModified}`),t}function VPe(n){return!n.isRemote||!n.remote?!1:new Set(["box","dropbox","drive","facebook","unsplash"]).has(n.remote.provider)}function $Pe(n,e){if(VPe(n))return n.id;const t=Eme(n);return HPe({...n,type:t},e)}function xme(n,e){return n===!0?Object.keys(e):Array.isArray(n)?n:[]}const T_=Array.from;function QPe(n){const e=T_(n.files);return Promise.resolve(e)}function kme(n,e,t,{onSuccess:r}){n.readEntries(o=>{const l=[...e,...o];o.length?queueMicrotask(()=>{kme(n,l,t,{onSuccess:r})}):r(l)},o=>{t(o),r(e)})}function Tme(n,e){return n==null?n:{kind:n.isFile?"file":n.isDirectory?"directory":void 0,name:n.name,getFile(){return new Promise((t,r)=>n.file(t,r))},async*values(){const t=n.createReader();yield*await new Promise(o=>{kme(t,[],e,{onSuccess:l=>o(l.map(c=>Tme(c,e)))})})},isSameEntry:void 0}}async function*Fme(n,e,t=void 0){const r=()=>`${e}/${n.name}`;if(n.kind==="file"){const o=await n.getFile();o!=null?(o.relativePath=e?r():null,yield o):t!=null&&(yield t)}else if(n.kind==="directory")for await(const o of n.values())yield*Fme(o,e?r():n.name);else t!=null&&(yield t)}async function*zPe(n,e){const t=await Promise.all(Array.from(n.items,async r=>{let o;return o??(o=Tme(typeof r.getAsEntry=="function"?r.getAsEntry():r.webkitGetAsEntry(),e)),{fileSystemHandle:o,lastResortFile:r.getAsFile()}}));for(const{lastResortFile:r,fileSystemHandle:o}of t)if(o!=null)try{yield*Fme(o,"",r)}catch(l){r!=null?yield r:e(l)}else r!=null&&(yield r)}async function jPe(n,e){const t=e==null?void 0:e.logDropError;try{const r=[];for await(const o of zPe(n,t))r.push(o);return r}catch{return QPe(n)}}const WPe={__proto__:null,"audio/mp3":"mp3","audio/mp4":"mp4","audio/ogg":"ogg","audio/webm":"webm","image/gif":"gif","image/heic":"heic","image/heif":"heif","image/jpeg":"jpg","image/webp":"webp","image/png":"png","image/svg+xml":"svg","video/mp4":"mp4","video/ogg":"ogv","video/quicktime":"mov","video/webm":"webm","video/x-matroska":"mkv","video/x-msvideo":"avi"};function QE(n){return[n]=n.split(";",1),WPe[n]||null}function GPe(n){var o;const t=(o=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?([^\n]+)/i.exec(n))==null?void 0:o[1];return`${/^http:\/\//i.test(n)?"ws":"wss"}://${t}`}function qPe(n){for(;n&&!n.dir;)n=n.parentNode;return n==null?void 0:n.dir}function Dq(n){return n<10?`0${n}`:n.toString()}function iP(){const n=new Date,e=Dq(n.getHours()),t=Dq(n.getMinutes()),r=Dq(n.getSeconds());return`${e}:${t}:${r}`}function KPe(){const n=document.body;return!(!("draggable"in n)||!("ondragstart"in n&&"ondrop"in n)||!("FormData"in window)||!("FileReader"in window))}function ZPe(n){return n?n.readyState!==0&&n.readyState!==4||n.status===0:!1}function Ime(n){return n.startsWith("blob:")}function Dme(n){return n?/^[^/]+\/(jpe?g|gif|png|svg|svg\+xml|bmp|webp|avif)$/.test(n):!1}function YPe(n){const e=Math.floor(n/3600)%24,t=Math.floor(n/60)%60,r=Math.floor(n%60);return{hours:e,minutes:t,seconds:r}}function XPe(n){const e=YPe(n),t=e.hours===0?"":`${e.hours}h`,r=e.minutes===0?"":`${e.hours===0?e.minutes:` ${e.minutes.toString(10).padStart(2,"0")}`}m`,o=e.hours!==0?"":`${e.minutes===0?e.seconds:` ${e.seconds.toString(10).padStart(2,"0")}`}s`;return`${t}${r}${o}`}function JPe(n){return new Error("Cancelled",{cause:n})}function Nme(n){var e;if(n!=null){const t=()=>this.abort(n.reason);n.addEventListener("abort",t,{once:!0});const r=()=>{n.removeEventListener("abort",t)};(e=this.then)==null||e.call(this,r,r)}return this}class eMe{constructor(e){ms(this,xA);ms(this,by,0);ms(this,b0,[]);ms(this,wy,!1);ms(this,PB);ms(this,w0,1);ms(this,MB);ms(this,b5);Wt(this,"limit");ms(this,VU,()=>this.resume());ms(this,UB,()=>{if(Qn(this,wy)){Li(this,b5,setTimeout(Qn(this,UB),0));return}Li(this,w0,this.limit),this.limit=Math.ceil((Qn(this,MB)+Qn(this,w0))/2);for(let e=Qn(this,w0);e<=this.limit;e++)us(this,xA,gL).call(this);Qn(this,MB)-Qn(this,w0)>3?Li(this,b5,setTimeout(Qn(this,UB),2e3)):Li(this,w0,Math.floor(Qn(this,w0)/2))});typeof e!="number"||e===0?this.limit=1/0:this.limit=e}run(e,t){return!Qn(this,wy)&&Qn(this,by)<this.limit?us(this,xA,GAe).call(this,e):us(this,xA,i6e).call(this,e,t)}wrapSyncFunction(e,t){return(...r)=>{const o=this.run(()=>(e(...r),queueMicrotask(()=>o.done()),()=>{}),t);return{abortOn:Nme,abort(){o.abort()}}}}wrapPromiseFunction(e,t){return(...r)=>{let o;const l=new Promise((c,f)=>{o=this.run(()=>{let h,m;try{m=Promise.resolve(e(...r))}catch(b){m=Promise.reject(b)}return m.then(b=>{h?f(h):(o.done(),c(b))},b=>{h?f(h):(o.done(),f(b))}),b=>{h=JPe(b)}},t)});return l.abort=c=>{o.abort(c)},l.abortOn=Nme,l}}resume(){Li(this,wy,!1),clearTimeout(Qn(this,PB));for(let e=0;e<this.limit;e++)us(this,xA,gL).call(this)}pause(e=null){Li(this,wy,!0),clearTimeout(Qn(this,PB)),e!=null&&Li(this,PB,setTimeout(Qn(this,VU),e))}rateLimit(e){clearTimeout(Qn(this,b5)),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(Li(this,MB,this.limit-1),this.limit=Qn(this,w0),Li(this,b5,setTimeout(Qn(this,UB),e)))}get isPaused(){return Qn(this,wy)}}by=new WeakMap,b0=new WeakMap,wy=new WeakMap,PB=new WeakMap,w0=new WeakMap,MB=new WeakMap,b5=new WeakMap,xA=new WeakSet,GAe=function(e){Li(this,by,Qn(this,by)+1);let t=!1,r;try{r=e()}catch(o){throw Li(this,by,Qn(this,by)-1),o}return{abort:o=>{t||(t=!0,Li(this,by,Qn(this,by)-1),r==null||r(o),us(this,xA,gL).call(this))},done:()=>{t||(t=!0,Li(this,by,Qn(this,by)-1),us(this,xA,gL).call(this))}}},gL=function(){queueMicrotask(()=>us(this,xA,s6e).call(this))},s6e=function(){if(Qn(this,wy)||Qn(this,by)>=this.limit||Qn(this,b0).length===0)return;const e=Qn(this,b0).shift();if(e==null)throw new Error("Invariant violation: next is null");const t=us(this,xA,GAe).call(this,e.fn);e.abort=t.abort,e.done=t.done},i6e=function(e,t){const r={fn:e,priority:(t==null?void 0:t.priority)||0,abort:()=>{us(this,xA,a6e).call(this,r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},o=Qn(this,b0).findIndex(l=>r.priority>l.priority);return o===-1?Qn(this,b0).push(r):Qn(this,b0).splice(o,0,r),r},a6e=function(e){const t=Qn(this,b0).indexOf(e);t!==-1&&Qn(this,b0).splice(t,1)},VU=new WeakMap,UB=new WeakMap;const Nq=Symbol("__queue");function tMe(n,e,t){const r=[];return n.forEach(o=>typeof o!="string"?r.push(o):e[Symbol.split](o).forEach((l,c,f)=>{l!==""&&r.push(l),c<f.length-1&&r.push(t)})),r}/**
171
171
  * Takes a string with placeholder variables like `%{smart_count} file selected`
172
172
  * and replaces it with values from options `{smart_count: 5}`
173
173
  *
@@ -9802,7 +9802,7 @@ function(t) {
9802
9802
  var d = f.getContext("2d");
9803
9803
  d.fillStyle = "#fff", d.fillRect(0, 0, f.width, f.height);
9804
9804
  var g = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, x = this;
9805
- return (Zt.canvg ? Promise.resolve(Zt.canvg) : import("./index.es-CMpmx28Y.mjs")).catch(function(N) {
9805
+ return (Zt.canvg ? Promise.resolve(Zt.canvg) : import("./index.es-CGVvoq4d.mjs")).catch(function(N) {
9806
9806
  return Promise.reject(new Error("Could not load canvg: " + N));
9807
9807
  }).then(function(N) {
9808
9808
  return N.default ? N.default : N;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iking-web-ui-pro",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "description": "iking-web-ui-pro",
5
5
  "keywords": [
6
6
  "iking-web-ui-pro",