vue-spear-tip 0.5.21 → 0.5.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +37 -37
- package/dist/{Button-BsyAkwI4.cjs → Button-BGHALdZm.cjs} +1 -1
- package/dist/{Button-D7Qnedx4.js → Button-CCvy-cy_.js} +1 -1
- package/dist/{CodeHighlight-CsL_-VPg.cjs → CodeHighlight-C35U05E2.cjs} +1 -1
- package/dist/{CodeHighlight-BR51DfYR.js → CodeHighlight-th8_Yxdg.js} +1 -1
- package/dist/{DateField-DPDpfhfy.js → DateField-2X17prqy.js} +2 -2
- package/dist/{DateField-HT8ugca4.cjs → DateField-CqvX2C4r.cjs} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-x1KgzKHr.cjs → FieldComponent.vue_vue_type_script_lang-BsagC47A.cjs} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-BYq38Had.js → FieldComponent.vue_vue_type_script_lang-doAG-SHI.js} +1 -1
- package/dist/{FilesArea-DkQyEtk9.cjs → FilesArea-BJOZroeG.cjs} +1 -1
- package/dist/{FilesArea-CcXoi5UY.js → FilesArea-BwyHkqOV.js} +2 -2
- package/dist/{Scrollbar-Dr76VrNq.js → Scrollbar-BNrJnrNd.js} +1 -1
- package/dist/{Scrollbar-CMit0yAX.cjs → Scrollbar-Nh8PrA7U.cjs} +1 -1
- package/dist/{SelectField-DmBcTq0Y.cjs → SelectField-B12PuiuH.cjs} +2 -2
- package/dist/{SelectField-XBspwBC6.js → SelectField-Dc7OzO0a.js} +11 -11
- package/dist/{StringField-DDG5_e5O.js → StringField-BReWU9a3.js} +2 -2
- package/dist/{StringField-DO9JogeG.cjs → StringField-CFWsCaBO.cjs} +1 -1
- package/dist/{SwitchField-BtwwuiLa.cjs → SwitchField-DEFP2JIL.cjs} +1 -1
- package/dist/{SwitchField-B1fRr692.js → SwitchField-gG22KtSx.js} +2 -2
- package/dist/{Tabs-DFlsXjJD.cjs → Tabs-DA-hMEnD.cjs} +1 -1
- package/dist/{Tabs-DR_tkoGS.js → Tabs-DWHQAU96.js} +1 -1
- package/dist/{TextField-Dl0J6VOU.js → TextField-HMJ9gBFi.js} +2 -2
- package/dist/{TextField-Brbqd4g1.cjs → TextField-xYgH3sbg.cjs} +1 -1
- package/dist/{index-BbcNgwWy.cjs → index-OLIPwsTz.cjs} +2 -2
- package/dist/{index-BfGl0dSS.js → index-SCGYUD41.js} +473 -467
- package/dist/replaceable/FieldComponent.vue +4 -0
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.es.js +1 -1
- package/docs/index.html +1 -1
- package/docs/static/{Button-DGqZ9zCY.js → Button-BChbxctm.js} +1 -1
- package/docs/static/{CodeHighlight-DRj80VIM.js → CodeHighlight-BIr_DhoA.js} +1 -1
- package/docs/static/{DateField-C6opq1eQ.js → DateField-BWQfUdXQ.js} +1 -1
- package/docs/static/{FieldComponent.vue_vue_type_script_lang-DO-YwttE.js → FieldComponent.vue_vue_type_script_lang-BQ3HqhNB.js} +1 -1
- package/docs/static/{FilesArea-CsmriGY9.js → FilesArea-CtfpjC2W.js} +1 -1
- package/docs/static/{NoSymbolIcon-DQdB4x0O.js → NoSymbolIcon-BCd2LQDd.js} +1 -1
- package/docs/static/{Scrollbar-Bu-XpWpS.js → Scrollbar-BsPNzhdW.js} +1 -1
- package/docs/static/{SelectField-BdlLyWlb.js → SelectField-CytEKVed.js} +2 -2
- package/docs/static/{StringField-Cltn4NHE.js → StringField-BWDIGven.js} +1 -1
- package/docs/static/{SwitchField-DSV32Cmi.js → SwitchField-CBp0C5l7.js} +1 -1
- package/docs/static/{Tabs-NGejgxPX.js → Tabs-BRAn2Nwi.js} +1 -1
- package/docs/static/{TextField-DscA-sQf.js → TextField-BPSVsCNm.js} +1 -1
- package/docs/static/index-C0632Xro.js +2 -0
- package/docs/static/{main-DSxgLdL7.js → main-DiGis_dK.js} +8 -8
- package/package.json +1 -1
- package/docs/static/index-C7IOCZuw.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var st=Object.defineProperty;var y=(s,h)=>st(s,"name",{value:h,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const te=require("./index-BbcNgwWy.cjs"),lt=require("./FieldComponent.vue_vue_type_script_lang-x1KgzKHr.cjs"),t=require("vue"),Ee=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs"),xe=require("./_commonjsHelpers-BB06FEA1.cjs");var dt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,ke=y((s,h,d,z)=>{for(var a=z>1?void 0:z?ht(h,d):h,l=s.length-1,i;l>=0;l--)(i=s[l])&&(a=(z?i(h,d,a):i(a))||a);return z&&a&&dt(h,d,a),a},"__decorateClass$6"),ze;let be=(ze=class extends te.BaseComponent{components={VSTButton:te.VSTButton};emits=["delete","restore","download","view","sort","rename"];file={};fileName="";fileUri="";fileHash=null;canChange=!0;onlyImages=!1;hasDeleted=!1;isDroppable=!1;fileCanView=!0;fileExt="";created(){this.fileExt=this.fileName?.split?.(".")?.pop()?.trim()??"",this.registerReactiveEvent("tap",".file-view-text",()=>this.$emit("view",this.fileName)),this.registerReactiveEvent("tap",".file-title > div",()=>this.canChange?this.$emit("rename",this.file):null)}mounted(){}get fileType(){return["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"].includes(this.file.ext)?"image":["mp4","avi","mkv","mov","wmv","flv","webm","m4v","mpg","mpeg","3gp","ogv","ts","mts"].includes(this.file.ext)?"video":["zip","rar","tar","gz","7z","bz2","xz","tgz","z","arc","cab"].includes(this.file.ext)?"archive":["xls","xlsx","ods","xlsm","xlsb","csv"].includes(this.file.ext)?"excel":["doc","docx","odt","ods","odp","md","rtf","txt"].includes(this.file.ext)?"doc":"file"}startDrag(h){if(!this.canChange)return h.preventDefault();h.dataTransfer.dropEffect="move",h.dataTransfer.effectAllowed="move",h.dataTransfer.setData("itemID",JSON.stringify({name:this.fileName,hash:this.fileHash}))}dragOver(h){h.preventDefault(),this.isDroppable=!0}dragLeave(h){h.preventDefault(),this.isDroppable=!1}onDrop(h){this.isDroppable=!1;const d=decodeURI(h.target?.closest(".file-item")?.getAttribute("data-id")??"").split("|"),z=h.dataTransfer.getData("itemID"),a={name:d[0],hash:d[1]?d[1]:null};z!=JSON.stringify(a)&&this.$emit("sort",JSON.parse(z),a)}eURI(h){return encodeURI(h)}viewHover(h,d){let z=h.target;d&&z?.querySelector?.("img")?.getAttribute?.("src")?.split("/").slice(-1)[0]!=="file.png"?(z.querySelector(".file-view-text").style.display="block",z.querySelector(".file-view-text").style.cursor="zoom-in"):(z.querySelector(".file-view-text").style.display="none",z.querySelector(".file-view-text").style.cursor="auto")}},y(ze,"FileItem"),ze);ke([te.Prop(Object)],be.prototype,"file",2);ke([te.Prop(String)],be.prototype,"fileName",2);ke([te.Prop(String)],be.prototype,"fileUri",2);ke([te.Prop(String,null)],be.prototype,"fileHash",2);ke([te.Prop(Boolean)],be.prototype,"canChange",2);ke([te.Prop(Boolean)],be.prototype,"onlyImages",2);ke([te.Prop(Boolean)],be.prototype,"hasDeleted",2);be=ke([te.VST],be);const ut=["data-id","title"],ft={class:"file-deleted"},ct={class:"file-deleted",style:{"padding-top":"20px"}},pt={class:"file-deleted file-download"},mt={key:0,class:"file-title"},vt=["title"],gt={class:"absolute right--15px top-0 py0 uppercase px8px fw-bold fs-0.7rem rounded-xl bg-amber-100 z1"},wt={key:0,class:"scale-225 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#c4277a","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},bt={key:1,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#28a930","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},yt={key:2,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#1f4dd6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_t={key:3,class:"scale-250 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#a74ede","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},kt={key:4,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#d61f1f","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},xt={key:5,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#737373","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Et={key:6,class:"file-view-text z2",title:"Посмотреть содержимое","data-theme":"yellow","data-placement":"bottom"},zt={class:"file-buttons absolute flex flex w100% bottom-5px"},Nt={class:"file-loading-indicator"},Ct={class:"text-center mt-2"},St={class:"progress rounded-xl mt7px b-solid border-1px b-emerald/20"},Ft=["data-value"],Bt={class:"text-center text-9px mt-2 pt3px"},Vt={key:0,class:"p-0 text-center"},Dt={key:1};function It(s,h,d,z,a,l){const i=t.resolveComponent("VSTButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["file-item",{"file-item-drop":s.isDroppable,"file-view-mode":!s.canChange,"only-images":s.onlyImages,"border-1px border-solid border-#e5e15e":!s.file?.new,"border-1px border-solid border-lightblue-300":s.file?.new}]),ref:"draggable",draggable:"true",onDrop:h[5]||(h[5]=o=>s.hasDeleted||!s.canChange?null:s.onDrop(o)),onDragstart:h[6]||(h[6]=o=>s.hasDeleted||!s.canChange?null:s.startDrag(o)),onDragover:h[7]||(h[7]=o=>s.hasDeleted||!s.canChange?null:s.dragOver(o)),onDragleave:h[8]||(h[8]=o=>s.hasDeleted||!s.canChange?null:s.dragLeave(o)),"data-id":s.eURI(s.fileName+"|"+(s.fileHash?s.fileHash:"")),title:!s.onlyImages&&!s.VST.$reactive.isIphone&&!s.file.deleted?s.fileName:null},[s.file.loaded==100?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["file-container relative min-h92px",{"only-images":s.onlyImages}])},[t.withDirectives(t.createElementVNode("div",ft,[h[10]||(h[10]=t.createElementVNode("div",{class:"mb8px"},"Будет удалён при сохранении",-1)),t.createVNode(i,{size:"sm",theme:"empty",onClickTap:h[0]||(h[0]=o=>s.$emit("restore",s.fileName,s.file.deleted=!0)),title:"Восстановить","data-placement":"bottom"},{default:t.withCtx(()=>[...h[9]||(h[9]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#ffffff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087"}),t.createElementVNode("path",{d:"M3 4.001v5h5"}),t.createElementVNode("path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})],-1)])]),_:1})],512),[[t.vShow,s.file.deleted]]),t.withDirectives(t.createElementVNode("div",ct,[h[11]||(h[11]=t.createTextVNode("Файл не найден на сервере. Будет удалён из списка, после сохранеdния.",-1)),h[12]||(h[12]=t.createElementVNode("br",null,null,-1)),h[13]||(h[13]=t.createTextVNode()),t.createElementVNode("b",null,t.toDisplayString(s.fileName),1)],512),[[t.vShow,!s.file.found]]),t.withDirectives(t.createElementVNode("div",pt,[...h[14]||(h[14]=[t.createElementVNode("i",{class:"fa fa-duotone fa-sync spin fa-4x"},null,-1)])],512),[[t.vShow,s.file.spin]]),s.onlyImages?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",mt,[t.createElementVNode("div",{class:"cursor-text text-center",title:s.canChange&&!s.file.deleted?"<i class='text-lime'><b>Клик</b>: переименовать</i>":null,"data-placement":"left"},[t.createElementVNode("b",null,t.toDisplayString(s.fileName.split(".").slice(0,-1).join(".")),1)],8,vt)])),t.createElementVNode("div",{class:"file-content",onMouseenter:h[1]||(h[1]=o=>s.viewHover(o,!0)),onMouseleave:h[2]||(h[2]=o=>s.viewHover(o,!1))},[t.createVNode(i,{size:"md",theme:"empty"},{default:t.withCtx(()=>[t.createElementVNode("div",gt,t.toDisplayString(s.file.ext),1),s.fileType=="image"?(t.openBlock(),t.createElementBlock("svg",wt,[...h[15]||(h[15]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12"},null,-1),t.createElementVNode("path",{d:"M4 16l16 0"},null,-1),t.createElementVNode("path",{d:"M4 12l3 -3c.928 -.893 2.072 -.893 3 0l4 4"},null,-1),t.createElementVNode("path",{d:"M13 12l2 -2c.928 -.893 2.072 -.893 3 0l2 2"},null,-1),t.createElementVNode("path",{d:"M14 7l.01 0"},null,-1)])])):s.fileType=="excel"?(t.openBlock(),t.createElementBlock("svg",bt,[...h[16]||(h[16]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M8 11h8v7h-8l0 -7"},null,-1),t.createElementVNode("path",{d:"M8 15h8"},null,-1),t.createElementVNode("path",{d:"M11 11v7"},null,-1)])])):s.fileType=="doc"?(t.openBlock(),t.createElementBlock("svg",yt,[...h[17]||(h[17]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M9 12l1.333 5l1.667 -4l1.667 4l1.333 -5"},null,-1)])])):s.fileType=="video"?(t.openBlock(),t.createElementBlock("svg",_t,[...h[18]||(h[18]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4"},null,-1),t.createElementVNode("path",{d:"M3 8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -8"},null,-1)])])):s.fileExt=="pdf"?(t.openBlock(),t.createElementBlock("svg",kt,[...h[19]||(h[19]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},null,-1),t.createElementVNode("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"},null,-1),t.createElementVNode("path",{d:"M17 18h2"},null,-1),t.createElementVNode("path",{d:"M20 15h-3v6"},null,-1),t.createElementVNode("path",{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"},null,-1)])])):(t.openBlock(),t.createElementBlock("svg",xt,[...h[20]||(h[20]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M12 17v.01"},null,-1),t.createElementVNode("path",{d:"M12 14a1.5 1.5 0 1 0 -1.14 -2.474"},null,-1)])])),s.VST.$reactive.isIphone?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Et,[...h[21]||(h[21]=[t.createElementVNode("svg",{class:"scale-150 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#56565e","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),t.createElementVNode("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),t.createElementVNode("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),t.createElementVNode("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"}),t.createElementVNode("path",{d:"M7 12c3.333 -4.667 6.667 -4.667 10 0"}),t.createElementVNode("path",{d:"M7 12c3.333 4.667 6.667 4.667 10 0"}),t.createElementVNode("path",{d:"M12 12h-.01"})],-1)])]))]),_:1})],32),t.createElementVNode("div",zt,[t.createVNode(i,{class:"text-#37ad00 bg-transparent",size:"sm",theme:"empty",title:"Скачать файл","data-theme":"yellow","data-placement":"left",onClickTap:h[3]||(h[3]=o=>s.$emit("download",s.fileName))},{default:t.withCtx(()=>[...h[22]||(h[22]=[t.createElementVNode("svg",{class:"scale-80 text-stone hover:text-#5187d7",xmlns:"http://www.w3.org/2000/svg",viewbox:"0 0 24 24",fill:"none",width:"24",height:"24",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M19 18a3.5 3.5 0 0 0 0 -7h-1a5 4.5 0 0 0 -11 -2a4.6 4.4 0 0 0 -2.1 8.4"}),t.createElementVNode("path",{d:"M12 13l0 9"}),t.createElementVNode("path",{d:"M9 19l3 3l3 -3"})],-1)])]),_:1}),s.canChange?(t.openBlock(),t.createBlock(i,{key:0,class:"ml-auto",size:"sm",theme:"empty",title:"Пометить на удаление","data-theme":"danger","data-placement":"right",onClickTap:h[4]||(h[4]=o=>s.$emit("delete",s.fileName,s.file.deleted=!0))},{default:t.withCtx(()=>[...h[23]||(h[23]=[t.createElementVNode("svg",{class:"scale-80 text-stone hover:text-#e2273d",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"currentColor"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M4 7h16"}),t.createElementVNode("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),t.createElementVNode("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"}),t.createElementVNode("path",{d:"M10 12l4 4m0 -4l-4 4"})],-1)])]),_:1})):t.createCommentVNode("",!0)])],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["file-loading",{"only-images":s.onlyImages}])},[t.createElementVNode("div",Nt,[t.createElementVNode("div",Ct,[t.createElementVNode("b",null,t.toDisplayString(s.file.loaded)+"%",1)]),t.createElementVNode("div",St,[t.createElementVNode("div",{class:"progress-bar progress-bar-striped","data-animation":"width","data-value":`${s.file.loaded}%`,style:t.normalizeStyle(`width: ${s.file.loaded}%`)},null,12,Ft)]),t.createElementVNode("div",Bt,[t.createElementVNode("b",null,t.toDisplayString(s.file.loadedSize)+" / "+t.toDisplayString(s.file.sizeNamed),1)])])],2)),s.file.loaded==100?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["file-info relative",{"text-center":s.canChange&&!s.onlyImages,"bg-#e2df4463":!s.file?.new,"bg-lightblue-200/60":s.file.new}])},[s.onlyImages?(t.openBlock(),t.createElementBlock("div",Vt,[t.createElementVNode("b",null," "+t.toDisplayString(s.file.sizeNamed),1)])):(t.openBlock(),t.createElementBlock("div",Dt,[h[24]||(h[24]=t.createTextVNode("Размер ",-1)),t.createElementVNode("b",null,t.toDisplayString(s.file.sizeNamed),1)]))],2)):t.createCommentVNode("",!0)],42,ut)}y(It,"render$6");const Ot=Ee._export_sfc(be,[["render",It],["__scopeId","data-v-252bfffe"]]),At={class:"controll"},Pt={class:"controll__item controll__item--circle"},Tt={class:"controll__pan controll__item--circle__inner"},Rt={class:"controll__pan__up controll__item--circle__inner__up"},Mt={class:"controll__pan__right controll__item--circle__inner__right"},jt={class:"controll__pan__down controll__item--circle__inner__down"},Ut={class:"controll__pan__left controll__item--circle__inner__left"},$t={class:"controll__home controll__item controll__item--list-item"},Lt={class:"controll__zoom-in controll__item controll__item--list-item"},Zt={class:"controll__zoom-in controll__item controll__item--list-item"},Ht=t.defineComponent({__name:"ControlButtons",emits:["buttondown","buttonup"],setup(s,{emit:h}){const d=h;function z(l,i){d("buttondown",{key:i})}y(z,"u");function a(l,i){d("buttonup",{key:i})}return y(a,"n"),(l,i)=>(t.openBlock(),t.createElementBlock("div",{id:"v-zoomable-control-btns",class:"controll__buttons",onDblclick:i[31]||(i[31]=t.withModifiers(()=>{},["stop"])),onMousedown:i[32]||(i[32]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("ul",At,[t.createElementVNode("li",Pt,[t.createElementVNode("ul",Tt,[t.createElementVNode("li",Rt,[t.createElementVNode("a",{onPointerdown:i[0]||(i[0]=o=>z(o,"pan-up")),onPointerup:i[1]||(i[1]=o=>a(o,"pan-up")),onPointercancel:i[2]||(i[2]=o=>a(o,"pan-up")),onPointerleave:i[3]||(i[3]=o=>a(o,"pan-up")),onContextmenu:i[4]||(i[4]=t.withModifiers(()=>{},["prevent"]))},i[33]||(i[33]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-up"},[t.createElementVNode("polyline",{points:"18 15 12 9 6 15"})],-1)]),32)]),t.createElementVNode("li",Mt,[t.createElementVNode("a",{onPointerdown:i[5]||(i[5]=o=>z(o,"pan-right")),onPointerup:i[6]||(i[6]=o=>a(o,"pan-right")),onPointercancel:i[7]||(i[7]=o=>a(o,"pan-right")),onPointerleave:i[8]||(i[8]=o=>a(o,"pan-right")),onContextmenu:i[9]||(i[9]=t.withModifiers(()=>{},["prevent"]))},i[34]||(i[34]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-right"},[t.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1)]),32)]),t.createElementVNode("li",jt,[t.createElementVNode("a",{onPointerdown:i[10]||(i[10]=o=>z(o,"pan-down")),onPointerup:i[11]||(i[11]=o=>a(o,"pan-down")),onPointercancel:i[12]||(i[12]=o=>a(o,"pan-down")),onPointerleave:i[13]||(i[13]=o=>a(o,"pan-down")),onContextmenu:i[14]||(i[14]=t.withModifiers(()=>{},["prevent"]))},i[35]||(i[35]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-down"},[t.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1)]),32)]),t.createElementVNode("li",Ut,[t.createElementVNode("a",{onPointerdown:i[15]||(i[15]=o=>z(o,"pan-left")),onPointercancel:i[16]||(i[16]=o=>a(o,"pan-left")),onPointerup:i[17]||(i[17]=o=>a(o,"pan-left")),onPointerleave:i[18]||(i[18]=o=>a(o,"pan-left")),onContextmenu:i[19]||(i[19]=t.withModifiers(()=>{},["prevent"]))},i[36]||(i[36]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-left"},[t.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)]),32)])])]),t.createElementVNode("li",$t,[t.createElementVNode("a",{onPointerdown:i[20]||(i[20]=o=>z(o,"home"))},i[37]||(i[37]=[t.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minimize-2" data-v-3ba139de><polyline points="4 14 10 14 10 20" data-v-3ba139de></polyline><polyline points="20 10 14 10 14 4" data-v-3ba139de></polyline><line x1="14" y1="10" x2="21" y2="3" data-v-3ba139de></line><line x1="3" y1="21" x2="10" y2="14" data-v-3ba139de></line></svg>',1)]),32)]),t.createElementVNode("li",Lt,[t.createElementVNode("a",{onPointerdown:i[21]||(i[21]=o=>z(o,"zoom-in")),onPointerup:i[22]||(i[22]=o=>a(o,"zoom-in")),onPointercancel:i[23]||(i[23]=o=>a(o,"zoom-in")),onPointerleave:i[24]||(i[24]=o=>a(o,"zoom-in")),onContextmenu:i[25]||(i[25]=t.withModifiers(()=>{},["prevent"]))},i[38]||(i[38]=[t.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zoom-in" data-v-3ba139de><circle cx="11" cy="11" r="8" data-v-3ba139de></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-3ba139de></line><line x1="11" y1="8" x2="11" y2="14" data-v-3ba139de></line><line x1="8" y1="11" x2="14" y2="11" data-v-3ba139de></line></svg>',1)]),32)]),t.createElementVNode("li",Zt,[t.createElementVNode("a",{onPointerdown:i[26]||(i[26]=o=>z(o,"zoom-out")),onPointerup:i[27]||(i[27]=o=>a(o,"zoom-out")),onPointercancel:i[28]||(i[28]=o=>a(o,"zoom-out")),onPointerleave:i[29]||(i[29]=o=>a(o,"zoom-out")),onContextmenu:i[30]||(i[30]=t.withModifiers(()=>{},["prevent"]))},i[39]||(i[39]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-zoom-out"},[t.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),t.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),t.createElementVNode("line",{x1:"8",y1:"11",x2:"14",y2:"11"})],-1)]),32)])])],32))}}),tt=y((s,h)=>{const d=s.__vccOpts||s;for(const[z,a]of h)d[z]=a;return d},"C"),Wt=tt(Ht,[["__scopeId","data-v-3ba139de"]]);function Kt(){let s=0;function h(z,a,l,i){z(),s=window.setTimeout(()=>{s=window.setInterval(()=>{a()},i)},l)}y(h,"i");function d(){s&&(window.clearInterval(s),s=0)}return y(d,"l"),{startHold:h,clearHold:d}}y(Kt,"R");const Re="control-btn";function Gt({props:s,transform:h}){let d=Kt();function z(m){d.startHold(()=>{h.changeZoom(m*s.buttonZoomStep*.5,Re)},()=>{h.changeZoom(m*s.buttonZoomStep*.5,Re)},300,50)}y(z,"u");function a(m){if(!s.disabled)switch(m.key){case"home":o();break;case"zoom-in":z(1);break;case"zoom-out":z(-1);break;case"pan-left":i({x:1,y:0});break;case"pan-right":i({x:-1,y:0});break;case"pan-up":i({x:0,y:1});break;case"pan-down":i({x:0,y:-1});break}}y(a,"n");function l(m){d.clearHold()}y(l,"a");function i(m){d.startHold(()=>{h.changePan(m.x*s.buttonPanStep,m.y*s.buttonPanStep,Re)},()=>{h.changePan(m.x*s.buttonPanStep,m.y*s.buttonPanStep,Re)},300,50)}y(i,"e");function o(){h.goHome(Re)}return y(o,"o"),{onButtonDown:a,onButtonUp:l}}y(Gt,"A");function Yt({props:s,transform:h}){let d={x:0,y:0};function z(i){s.disabled||i.pointerType!=="mouse"||!s.mouseEnabled||(d={x:i.clientX,y:i.clientY},document.addEventListener("pointermove",l,{passive:!1}),document.addEventListener("pointerup",function(o){document.removeEventListener("pointermove",l)}),document.addEventListener("pointerleave",function(o){document.removeEventListener("pointermove",l)}),document.addEventListener("pointercancel",function(o){document.removeEventListener("pointermove",l)}))}y(z,"u");function a(i){if(s.disabled||!s.dblClickEnabled||!s.zoomEnabled)return;const o={x:i.clientX,y:i.clientY};h.changeZoom(s.dblClickZoomStep,"dblClick",o)}y(a,"n");function l(i){if(s.disabled||!s.panEnabled||i.pointerType!=="mouse"||!s.mouseEnabled)return;let o={x:i.clientX-d.x,y:i.clientY-d.y};h.changePan(o.x,o.y,i.pointerType),d={x:i.clientX,y:i.clientY},i.preventDefault()}return y(l,"a"),{onPointerDown:z,onDblClick:a}}y(Yt,"F");function Xt({props:s,transform:h}){let d=t.ref({}),z=t.ref(0),a=null;function l(m){if(s.disabled||!s.touchEnabled||!s.panEnabled&&!s.zoomEnabled||(m.preventDefault(),m.touches.length<1))return;const w=m.touches.item(0);if(!w)return;let x=0,k={x:w.clientX,y:w.clientY};if(m.touches.length===2){const c=m.touches.item(1);let g=i({x:w?w.clientX:0,y:w?w.clientY:0},{x:c?c.clientX:0,y:c?c.clientY:0});z.value<=0?(z.value=g.distance,x=0):(x=g.distance/z.value*h.zoom.value-h.zoom.value,z.value=g.distance),k=g.center}if(s.zoomEnabled&&h.changeZoom(x,"touch",k),a===null){a={x:k.x,y:k.y};return}const C={x:k.x-a.x,y:k.y-a.y};s.panEnabled&&h.changePan(C.x,C.y,"touch"),a={x:k.x,y:k.y}}y(l,"a");function i(m,w){let x=Math.sqrt(Math.pow(m.x-w.x,2)+Math.pow(m.y-w.y,2)),k={x:(m.x+w.x)/2,y:(m.y+w.y)/2};return{distance:x,center:k}}y(i,"e");function o(m){s.disabled||!s.touchEnabled||(a=null,document.addEventListener("touchmove",l,{passive:!1}),document.addEventListener("touchend",function(w){m.touches.length<2&&(z.value=-1),document.removeEventListener("touchmove",l)}))}return y(o,"o"),{onTouchStart:o,touchCount:t.computed(()=>Object.keys(d.value).length)}}y(Xt,"G");function qt({props:s,onChange:h,container:d,target:z}){const a=t.ref({x:0,y:0}),l=t.ref(0);t.onMounted(()=>{l.value=s.minZoom,a.value={x:s.pan!=null?s.pan.x:s.initialPanX,y:s.pan!=null?s.pan.y:s.initialPanY},s.zoom?l.value=s.zoom:s.initialZoom>=s.minZoom&&s.initialZoom<=s.maxZoom&&(l.value=s.initialZoom)}),t.watch(()=>s.zoom,()=>{isNaN(s.zoom)||(l.value=s.zoom)}),t.watch(()=>s.pan,()=>{s.pan&&(a.value.x=s.pan.x,a.value.y=s.pan.y)},{deep:!0});function i(w,x,k){if(isNaN(w)||w===0)return;const C=l.value;let c=l.value+w;if(c>s.maxZoom?c=s.maxZoom:c<s.minZoom&&(c=s.minZoom),Math.abs(C-c)<1e-4)return;if(l.value=c,s.zoomOrigin==="center"&&(k=Ye(d.value)),s.zoomOrigin!=="content-center"){k||(k=Ye(d.value));const u=Jt(d.value,a.value),b={x:(c-C)*((u.x-k.x)/C),y:(c-C)*((u.y-k.y)/C)};o(b.x,b.y,"zoom")}let g={zoom:c,delta:{zoom:w,pan:{x:0,y:0}},pan:{x:a.value.x,y:a.value.y,deltaX:0,deltaY:0},type:x};h("zoom",g)}y(i,"e");function o(w,x,k){isNaN(w)&&(w=0),isNaN(x)&&(x=0),a.value={x:a.value.x+w,y:a.value.y+x};let C={zoom:l.value,delta:{zoom:0,pan:{x:w,y:x}},pan:{x:a.value.x,y:a.value.y,deltaX:w,deltaY:x},type:k};h("panned",C)}y(o,"o");function m(w){l.value=s.initialZoom,h("zoom",{zoom:l.value,pan:{x:a.value.x,y:a.value.y,deltaX:0,deltaY:0},type:w});let x={x:s.initialPanX-a.value.x,y:s.initialPanY-a.value.y};a.value={x:s.initialPanX,y:s.initialPanY},h("panned",{zoom:l.value,pan:{x:a.value.x,y:a.value.y,deltaX:x.x,deltaY:x.y},type:w})}return y(m,"d"),{zoom:t.computed(()=>l.value),pan:t.computed(()=>a.value),setZoom:y(w=>{l.value=w},"setZoom"),setPan:y(w=>{a.value=w},"setPan"),changeZoom:i,changePan:o,goHome:m}}y(qt,"J");function Ye(s){const h=s.getBoundingClientRect();return{x:h.left+h.width/2,y:h.top+h.height/2}}y(Ye,"B");function Jt(s,h){const d=Ye(s);return{x:d.x+h.x,y:d.y+h.y}}y(Jt,"Q");function Qt({props:s,transform:h}){function d(z){if(s.disabled||!s.wheelEnabled||!s.zoomEnabled)return;const a=Math.abs(z.deltaY)>0?z.deltaY:z.deltaX,l=s.wheelZoomStep*-1*a/Math.abs(a),i={x:z.clientX,y:z.clientY};h.changeZoom(l,"wheel",i),z.preventDefault()}return y(d,"l"),{onWheel:d}}y(Qt,"ee");function en({props:s,onChange:h,container:d,target:z}){const a=qt({props:s,onChange:h,container:d,target:z}),l=Xt({props:s,transform:a}),i=Qt({props:s,transform:a}),o=Yt({props:s,transform:a}),m=Gt({props:s,transform:a});return{zoom:a.zoom,pan:a.pan,setZoom:a.setZoom,setPan:a.setPan,onWheel:i.onWheel,onTouchStart:l.onTouchStart,onButtonUp:m.onButtonUp,onButtonDown:m.onButtonDown,onPointerDown:o.onPointerDown,onDblClick:o.onDblClick}}y(en,"te");const tn=t.defineComponent({__name:"VueZoomable",props:{zoom:{type:Number,default:null},pan:{type:Object,default:null},selector:{type:String,default:"* > *"},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.5},initialPanX:{type:Number,default:0},initialPanY:{type:Number,default:0},initialZoom:{type:Number,default:.5},dblClickZoomStep:{type:Number,default:.4},wheelZoomStep:{type:Number,default:.4},panEnabled:{type:Boolean,default:!0},zoomEnabled:{type:Boolean,default:!0},mouseEnabled:{type:Boolean,default:!0},touchEnabled:{type:Boolean,default:!0},dblClickEnabled:{type:Boolean,default:!0},wheelEnabled:{type:Boolean,default:!0},enableControlButton:{type:Boolean,default:!0},buttonPanStep:{type:Number,default:15},buttonZoomStep:{type:Number,default:.1},disabled:{type:Boolean,default:!1},zoomOrigin:{type:String,default:"pointer"}},emits:["panned","zoom","update:zoom","update:pan"],setup(s,{emit:h}){let d=h,z=s,a=t.ref(),l=t.computed(()=>{var x;return(x=a.value)==null?void 0:x.querySelector(z.selector)}),i=en({props:z,onChange:o,container:a,target:l});function o(x,k){x==="zoom"?d("update:zoom",k.zoom):x==="panned"&&d("update:pan",k.pan),d(x,k)}y(o,"o");let m=t.computed(()=>`translate(${i.pan.value.x}px, ${i.pan.value.y}px) scale(${i.zoom.value})`);function w(){l.value&&(l.value.style.transform=m.value,l.value.style.transformOrigin="center center",l.value.style.transition="transform 0.07s ease-out",l.value.style.transformBox="fill-box")}return y(w,"s"),t.watch(m,()=>{w()},{flush:"post"}),t.onMounted(()=>{w()}),(x,k)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:a,class:t.normalizeClass(x.$style.container),onDblclick:k[0]||(k[0]=(...C)=>t.unref(i).onDblClick&&t.unref(i).onDblClick(...C)),onPointerdown:k[1]||(k[1]=(...C)=>t.unref(i).onPointerDown&&t.unref(i).onPointerDown(...C)),onWheel:k[2]||(k[2]=(...C)=>t.unref(i).onWheel&&t.unref(i).onWheel(...C)),onTouchstart:k[3]||(k[3]=(...C)=>t.unref(i).onTouchStart&&t.unref(i).onTouchStart(...C))},[t.renderSlot(x.$slots,"default",{},void 0,!0),t.renderSlot(x.$slots,"buttons",{},()=>[t.unref(z).enableControlButton?(t.openBlock(),t.createBlock(Wt,{key:0,onButtondown:t.unref(i).onButtonDown,onButtonup:t.unref(i).onButtonUp},null,8,["onButtondown","onButtonup"])):t.createCommentVNode("",!0)],!0)],34))}}),nn="_container_irdvc_2",rn="_buttons_irdvc_11",on={container:nn,buttons:rn},an={$style:on},sn=tt(tn,[["__cssModules",an],["__scopeId","data-v-fce7d501"]]);var ln=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,Ze=y((s,h,d,z)=>{for(var a=z>1?void 0:z?dn(h,d):h,l=s.length-1,i;l>=0;l--)(i=s[l])&&(a=(z?i(h,d,a):i(a))||a);return z&&a&&ln(h,d,a),a},"__decorateClass$5"),Ne;let De=(Ne=class extends te.BaseComponent{components={Zoomable:sn};uri="";ext="";fileName="";beforeMount(){const h=window?.top?.document?.getElementById?.("OIElement")?.querySelector?.("div");h&&(h.style.display="none",this.hookWhenComponentDestroy(()=>h.style.display="flex"))}},y(Ne,"ImageViewerFilesField"),Ne);Ze([te.Prop(String)],De.prototype,"uri",2);Ze([te.Prop(String)],De.prototype,"ext",2);Ze([te.Prop(String)],De.prototype,"fileName",2);De=Ze([te.VST],De);const hn={class:"image-file-preview top-50px bg-white b-t-solid b-t-1px b-t-amber-300",style:{"user-drag":"element","-webkit-user-drag":"element"}},un={class:"w100% h100% flex justify-center bg-[conic-gradient(#e5e7eb_25%,transparent_25%_50%,#e5e7eb_50%_75%,transparent_75%)] bg-[length:20px_20px] bg-[position:0_0,0_10px,10px_-10px,-10px_0px]"},fn=["src"];function cn(s,h,d,z,a,l){const i=t.resolveComponent("Zoomable");return t.openBlock(),t.createElementBlock("div",hn,[t.createElementVNode("div",un,[t.createVNode(i,{class:"cursor-move",initialZoom:.5,wheelZoomStep:2,initialPanY:90,wheelEnabled:!0,pan:{x:-(s.VST.viewPortHeight/2),y:0,deltaX:0,deltaY:0},typ:"mouse"},{default:t.withCtx(()=>[t.createElementVNode("img",{class:"w100%",src:s.uri},null,8,fn)]),_:1},8,["pan"])]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent("style"),null,{default:t.withCtx(()=>[...h[0]||(h[0]=[t.createTextVNode(".simplebar-track.simplebar-vertical { display: none; }",-1)])]),_:1}))])}y(cn,"render$5");const pn=Ee._export_sfc(De,[["render",cn]]);var mn=Object.defineProperty,vn=Object.getOwnPropertyDescriptor,nt=y((s,h,d,z)=>{for(var a=z>1?void 0:z?vn(h,d):h,l=s.length-1,i;l>=0;l--)(i=s[l])&&(a=(z?i(h,d,a):i(a))||a);return z&&a&&mn(h,d,a),a},"__decorateClass$4"),Ce;let $e=(Ce=class extends te.BaseComponent{file={};mounted(){}},y(Ce,"ExcelViewerFilesField"),Ce);nt([te.Prop(Object,null)],$e.prototype,"file",2);$e=nt([te.VST],$e);const gn={class:"mt150px",id:"excelView",ref:"excelView"};function wn(s,h,d,z,a,l){return t.openBlock(),t.createElementBlock("div",gn,"Скоро будет!",512)}y(wn,"render$4");const bn=Ee._export_sfc($e,[["render",wn]]);var yn=Object.defineProperty,_n=Object.getOwnPropertyDescriptor,rt=y((s,h,d,z)=>{for(var a=z>1?void 0:z?_n(h,d):h,l=s.length-1,i;l>=0;l--)(i=s[l])&&(a=(z?i(h,d,a):i(a))||a);return z&&a&&yn(h,d,a),a},"__decorateClass$3"),Se;let Le=(Se=class extends te.BaseComponent{file={}},y(Se,"DocxViewerFilesField"),Se);rt([te.Prop(Object,null)],Le.prototype,"file",2);Le=rt([te.VST],Le);const kn={class:"p15px mt150px"};function xn(s,h,d,z,a,l){return t.openBlock(),t.createElementBlock("div",kn,"Скоро")}y(xn,"render$3");const En=Ee._export_sfc(Le,[["render",xn]]);var zn=Object.defineProperty,Nn=Object.getOwnPropertyDescriptor,He=y((s,h,d,z)=>{for(var a=z>1?void 0:z?Nn(h,d):h,l=s.length-1,i;l>=0;l--)(i=s[l])&&(a=(z?i(h,d,a):i(a))||a);return z&&a&&zn(h,d,a),a},"__decorateClass$2"),Fe;let Ie=(Fe=class extends te.BaseComponent{uri="";ext="";fileName="";pdfUrl=null;loading=!0;async mounted(){await this.loadAndShowPdf()}async fetchPdfFile(){try{const h=await fetch(this.uri);if(!h.ok)throw new Error(`HTTP error ${h.status}`);const d=await h.blob(),z="application/pdf",a=this.fileName||this.uri.split("/").pop()||"document.pdf";return new File([d],a,{type:z})}catch(h){console.error("Failed to fetch the file:",h)}}async loadAndShowPdf(){const h=await this.fetchPdfFile();if(h){const z=`
|
|
1
|
+
"use strict";var st=Object.defineProperty;var y=(s,h)=>st(s,"name",{value:h,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const te=require("./index-OLIPwsTz.cjs"),lt=require("./FieldComponent.vue_vue_type_script_lang-BsagC47A.cjs"),t=require("vue"),Ee=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs"),xe=require("./_commonjsHelpers-BB06FEA1.cjs");var dt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,ke=y((s,h,d,z)=>{for(var a=z>1?void 0:z?ht(h,d):h,l=s.length-1,i;l>=0;l--)(i=s[l])&&(a=(z?i(h,d,a):i(a))||a);return z&&a&&dt(h,d,a),a},"__decorateClass$6"),ze;let be=(ze=class extends te.BaseComponent{components={VSTButton:te.VSTButton};emits=["delete","restore","download","view","sort","rename"];file={};fileName="";fileUri="";fileHash=null;canChange=!0;onlyImages=!1;hasDeleted=!1;isDroppable=!1;fileCanView=!0;fileExt="";created(){this.fileExt=this.fileName?.split?.(".")?.pop()?.trim()??"",this.registerReactiveEvent("tap",".file-view-text",()=>this.$emit("view",this.fileName)),this.registerReactiveEvent("tap",".file-title > div",()=>this.canChange?this.$emit("rename",this.file):null)}mounted(){}get fileType(){return["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"].includes(this.file.ext)?"image":["mp4","avi","mkv","mov","wmv","flv","webm","m4v","mpg","mpeg","3gp","ogv","ts","mts"].includes(this.file.ext)?"video":["zip","rar","tar","gz","7z","bz2","xz","tgz","z","arc","cab"].includes(this.file.ext)?"archive":["xls","xlsx","ods","xlsm","xlsb","csv"].includes(this.file.ext)?"excel":["doc","docx","odt","ods","odp","md","rtf","txt"].includes(this.file.ext)?"doc":"file"}startDrag(h){if(!this.canChange)return h.preventDefault();h.dataTransfer.dropEffect="move",h.dataTransfer.effectAllowed="move",h.dataTransfer.setData("itemID",JSON.stringify({name:this.fileName,hash:this.fileHash}))}dragOver(h){h.preventDefault(),this.isDroppable=!0}dragLeave(h){h.preventDefault(),this.isDroppable=!1}onDrop(h){this.isDroppable=!1;const d=decodeURI(h.target?.closest(".file-item")?.getAttribute("data-id")??"").split("|"),z=h.dataTransfer.getData("itemID"),a={name:d[0],hash:d[1]?d[1]:null};z!=JSON.stringify(a)&&this.$emit("sort",JSON.parse(z),a)}eURI(h){return encodeURI(h)}viewHover(h,d){let z=h.target;d&&z?.querySelector?.("img")?.getAttribute?.("src")?.split("/").slice(-1)[0]!=="file.png"?(z.querySelector(".file-view-text").style.display="block",z.querySelector(".file-view-text").style.cursor="zoom-in"):(z.querySelector(".file-view-text").style.display="none",z.querySelector(".file-view-text").style.cursor="auto")}},y(ze,"FileItem"),ze);ke([te.Prop(Object)],be.prototype,"file",2);ke([te.Prop(String)],be.prototype,"fileName",2);ke([te.Prop(String)],be.prototype,"fileUri",2);ke([te.Prop(String,null)],be.prototype,"fileHash",2);ke([te.Prop(Boolean)],be.prototype,"canChange",2);ke([te.Prop(Boolean)],be.prototype,"onlyImages",2);ke([te.Prop(Boolean)],be.prototype,"hasDeleted",2);be=ke([te.VST],be);const ut=["data-id","title"],ft={class:"file-deleted"},ct={class:"file-deleted",style:{"padding-top":"20px"}},pt={class:"file-deleted file-download"},mt={key:0,class:"file-title"},vt=["title"],gt={class:"absolute right--15px top-0 py0 uppercase px8px fw-bold fs-0.7rem rounded-xl bg-amber-100 z1"},wt={key:0,class:"scale-225 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#c4277a","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},bt={key:1,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#28a930","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},yt={key:2,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#1f4dd6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_t={key:3,class:"scale-250 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#a74ede","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},kt={key:4,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#d61f1f","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},xt={key:5,class:"scale-220 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#737373","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Et={key:6,class:"file-view-text z2",title:"Посмотреть содержимое","data-theme":"yellow","data-placement":"bottom"},zt={class:"file-buttons absolute flex flex w100% bottom-5px"},Nt={class:"file-loading-indicator"},Ct={class:"text-center mt-2"},St={class:"progress rounded-xl mt7px b-solid border-1px b-emerald/20"},Ft=["data-value"],Bt={class:"text-center text-9px mt-2 pt3px"},Vt={key:0,class:"p-0 text-center"},Dt={key:1};function It(s,h,d,z,a,l){const i=t.resolveComponent("VSTButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["file-item",{"file-item-drop":s.isDroppable,"file-view-mode":!s.canChange,"only-images":s.onlyImages,"border-1px border-solid border-#e5e15e":!s.file?.new,"border-1px border-solid border-lightblue-300":s.file?.new}]),ref:"draggable",draggable:"true",onDrop:h[5]||(h[5]=o=>s.hasDeleted||!s.canChange?null:s.onDrop(o)),onDragstart:h[6]||(h[6]=o=>s.hasDeleted||!s.canChange?null:s.startDrag(o)),onDragover:h[7]||(h[7]=o=>s.hasDeleted||!s.canChange?null:s.dragOver(o)),onDragleave:h[8]||(h[8]=o=>s.hasDeleted||!s.canChange?null:s.dragLeave(o)),"data-id":s.eURI(s.fileName+"|"+(s.fileHash?s.fileHash:"")),title:!s.onlyImages&&!s.VST.$reactive.isIphone&&!s.file.deleted?s.fileName:null},[s.file.loaded==100?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["file-container relative min-h92px",{"only-images":s.onlyImages}])},[t.withDirectives(t.createElementVNode("div",ft,[h[10]||(h[10]=t.createElementVNode("div",{class:"mb8px"},"Будет удалён при сохранении",-1)),t.createVNode(i,{size:"sm",theme:"empty",onClickTap:h[0]||(h[0]=o=>s.$emit("restore",s.fileName,s.file.deleted=!0)),title:"Восстановить","data-placement":"bottom"},{default:t.withCtx(()=>[...h[9]||(h[9]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#ffffff","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087"}),t.createElementVNode("path",{d:"M3 4.001v5h5"}),t.createElementVNode("path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})],-1)])]),_:1})],512),[[t.vShow,s.file.deleted]]),t.withDirectives(t.createElementVNode("div",ct,[h[11]||(h[11]=t.createTextVNode("Файл не найден на сервере. Будет удалён из списка, после сохранеdния.",-1)),h[12]||(h[12]=t.createElementVNode("br",null,null,-1)),h[13]||(h[13]=t.createTextVNode()),t.createElementVNode("b",null,t.toDisplayString(s.fileName),1)],512),[[t.vShow,!s.file.found]]),t.withDirectives(t.createElementVNode("div",pt,[...h[14]||(h[14]=[t.createElementVNode("i",{class:"fa fa-duotone fa-sync spin fa-4x"},null,-1)])],512),[[t.vShow,s.file.spin]]),s.onlyImages?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",mt,[t.createElementVNode("div",{class:"cursor-text text-center",title:s.canChange&&!s.file.deleted?"<i class='text-lime'><b>Клик</b>: переименовать</i>":null,"data-placement":"left"},[t.createElementVNode("b",null,t.toDisplayString(s.fileName.split(".").slice(0,-1).join(".")),1)],8,vt)])),t.createElementVNode("div",{class:"file-content",onMouseenter:h[1]||(h[1]=o=>s.viewHover(o,!0)),onMouseleave:h[2]||(h[2]=o=>s.viewHover(o,!1))},[t.createVNode(i,{size:"md",theme:"empty"},{default:t.withCtx(()=>[t.createElementVNode("div",gt,t.toDisplayString(s.file.ext),1),s.fileType=="image"?(t.openBlock(),t.createElementBlock("svg",wt,[...h[15]||(h[15]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12"},null,-1),t.createElementVNode("path",{d:"M4 16l16 0"},null,-1),t.createElementVNode("path",{d:"M4 12l3 -3c.928 -.893 2.072 -.893 3 0l4 4"},null,-1),t.createElementVNode("path",{d:"M13 12l2 -2c.928 -.893 2.072 -.893 3 0l2 2"},null,-1),t.createElementVNode("path",{d:"M14 7l.01 0"},null,-1)])])):s.fileType=="excel"?(t.openBlock(),t.createElementBlock("svg",bt,[...h[16]||(h[16]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M8 11h8v7h-8l0 -7"},null,-1),t.createElementVNode("path",{d:"M8 15h8"},null,-1),t.createElementVNode("path",{d:"M11 11v7"},null,-1)])])):s.fileType=="doc"?(t.openBlock(),t.createElementBlock("svg",yt,[...h[17]||(h[17]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M9 12l1.333 5l1.667 -4l1.667 4l1.333 -5"},null,-1)])])):s.fileType=="video"?(t.openBlock(),t.createElementBlock("svg",_t,[...h[18]||(h[18]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4"},null,-1),t.createElementVNode("path",{d:"M3 8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -8"},null,-1)])])):s.fileExt=="pdf"?(t.openBlock(),t.createElementBlock("svg",kt,[...h[19]||(h[19]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},null,-1),t.createElementVNode("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"},null,-1),t.createElementVNode("path",{d:"M17 18h2"},null,-1),t.createElementVNode("path",{d:"M20 15h-3v6"},null,-1),t.createElementVNode("path",{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"},null,-1)])])):(t.openBlock(),t.createElementBlock("svg",xt,[...h[20]||(h[20]=[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),t.createElementVNode("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"},null,-1),t.createElementVNode("path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2"},null,-1),t.createElementVNode("path",{d:"M12 17v.01"},null,-1),t.createElementVNode("path",{d:"M12 14a1.5 1.5 0 1 0 -1.14 -2.474"},null,-1)])])),s.VST.$reactive.isIphone?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Et,[...h[21]||(h[21]=[t.createElementVNode("svg",{class:"scale-150 mt7px",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"#56565e","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),t.createElementVNode("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),t.createElementVNode("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),t.createElementVNode("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"}),t.createElementVNode("path",{d:"M7 12c3.333 -4.667 6.667 -4.667 10 0"}),t.createElementVNode("path",{d:"M7 12c3.333 4.667 6.667 4.667 10 0"}),t.createElementVNode("path",{d:"M12 12h-.01"})],-1)])]))]),_:1})],32),t.createElementVNode("div",zt,[t.createVNode(i,{class:"text-#37ad00 bg-transparent",size:"sm",theme:"empty",title:"Скачать файл","data-theme":"yellow","data-placement":"left",onClickTap:h[3]||(h[3]=o=>s.$emit("download",s.fileName))},{default:t.withCtx(()=>[...h[22]||(h[22]=[t.createElementVNode("svg",{class:"scale-80 text-stone hover:text-#5187d7",xmlns:"http://www.w3.org/2000/svg",viewbox:"0 0 24 24",fill:"none",width:"24",height:"24",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M19 18a3.5 3.5 0 0 0 0 -7h-1a5 4.5 0 0 0 -11 -2a4.6 4.4 0 0 0 -2.1 8.4"}),t.createElementVNode("path",{d:"M12 13l0 9"}),t.createElementVNode("path",{d:"M9 19l3 3l3 -3"})],-1)])]),_:1}),s.canChange?(t.openBlock(),t.createBlock(i,{key:0,class:"ml-auto",size:"sm",theme:"empty",title:"Пометить на удаление","data-theme":"danger","data-placement":"right",onClickTap:h[4]||(h[4]=o=>s.$emit("delete",s.fileName,s.file.deleted=!0))},{default:t.withCtx(()=>[...h[23]||(h[23]=[t.createElementVNode("svg",{class:"scale-80 text-stone hover:text-#e2273d",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",width:"24",height:"24",viewbox:"0 0 24 24",fill:"none",stroke:"currentColor"},[t.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t.createElementVNode("path",{d:"M4 7h16"}),t.createElementVNode("path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"}),t.createElementVNode("path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"}),t.createElementVNode("path",{d:"M10 12l4 4m0 -4l-4 4"})],-1)])]),_:1})):t.createCommentVNode("",!0)])],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["file-loading",{"only-images":s.onlyImages}])},[t.createElementVNode("div",Nt,[t.createElementVNode("div",Ct,[t.createElementVNode("b",null,t.toDisplayString(s.file.loaded)+"%",1)]),t.createElementVNode("div",St,[t.createElementVNode("div",{class:"progress-bar progress-bar-striped","data-animation":"width","data-value":`${s.file.loaded}%`,style:t.normalizeStyle(`width: ${s.file.loaded}%`)},null,12,Ft)]),t.createElementVNode("div",Bt,[t.createElementVNode("b",null,t.toDisplayString(s.file.loadedSize)+" / "+t.toDisplayString(s.file.sizeNamed),1)])])],2)),s.file.loaded==100?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["file-info relative",{"text-center":s.canChange&&!s.onlyImages,"bg-#e2df4463":!s.file?.new,"bg-lightblue-200/60":s.file.new}])},[s.onlyImages?(t.openBlock(),t.createElementBlock("div",Vt,[t.createElementVNode("b",null," "+t.toDisplayString(s.file.sizeNamed),1)])):(t.openBlock(),t.createElementBlock("div",Dt,[h[24]||(h[24]=t.createTextVNode("Размер ",-1)),t.createElementVNode("b",null,t.toDisplayString(s.file.sizeNamed),1)]))],2)):t.createCommentVNode("",!0)],42,ut)}y(It,"render$6");const Ot=Ee._export_sfc(be,[["render",It],["__scopeId","data-v-252bfffe"]]),At={class:"controll"},Pt={class:"controll__item controll__item--circle"},Tt={class:"controll__pan controll__item--circle__inner"},Rt={class:"controll__pan__up controll__item--circle__inner__up"},Mt={class:"controll__pan__right controll__item--circle__inner__right"},jt={class:"controll__pan__down controll__item--circle__inner__down"},Ut={class:"controll__pan__left controll__item--circle__inner__left"},$t={class:"controll__home controll__item controll__item--list-item"},Lt={class:"controll__zoom-in controll__item controll__item--list-item"},Zt={class:"controll__zoom-in controll__item controll__item--list-item"},Ht=t.defineComponent({__name:"ControlButtons",emits:["buttondown","buttonup"],setup(s,{emit:h}){const d=h;function z(l,i){d("buttondown",{key:i})}y(z,"u");function a(l,i){d("buttonup",{key:i})}return y(a,"n"),(l,i)=>(t.openBlock(),t.createElementBlock("div",{id:"v-zoomable-control-btns",class:"controll__buttons",onDblclick:i[31]||(i[31]=t.withModifiers(()=>{},["stop"])),onMousedown:i[32]||(i[32]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("ul",At,[t.createElementVNode("li",Pt,[t.createElementVNode("ul",Tt,[t.createElementVNode("li",Rt,[t.createElementVNode("a",{onPointerdown:i[0]||(i[0]=o=>z(o,"pan-up")),onPointerup:i[1]||(i[1]=o=>a(o,"pan-up")),onPointercancel:i[2]||(i[2]=o=>a(o,"pan-up")),onPointerleave:i[3]||(i[3]=o=>a(o,"pan-up")),onContextmenu:i[4]||(i[4]=t.withModifiers(()=>{},["prevent"]))},i[33]||(i[33]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-up"},[t.createElementVNode("polyline",{points:"18 15 12 9 6 15"})],-1)]),32)]),t.createElementVNode("li",Mt,[t.createElementVNode("a",{onPointerdown:i[5]||(i[5]=o=>z(o,"pan-right")),onPointerup:i[6]||(i[6]=o=>a(o,"pan-right")),onPointercancel:i[7]||(i[7]=o=>a(o,"pan-right")),onPointerleave:i[8]||(i[8]=o=>a(o,"pan-right")),onContextmenu:i[9]||(i[9]=t.withModifiers(()=>{},["prevent"]))},i[34]||(i[34]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-right"},[t.createElementVNode("polyline",{points:"9 18 15 12 9 6"})],-1)]),32)]),t.createElementVNode("li",jt,[t.createElementVNode("a",{onPointerdown:i[10]||(i[10]=o=>z(o,"pan-down")),onPointerup:i[11]||(i[11]=o=>a(o,"pan-down")),onPointercancel:i[12]||(i[12]=o=>a(o,"pan-down")),onPointerleave:i[13]||(i[13]=o=>a(o,"pan-down")),onContextmenu:i[14]||(i[14]=t.withModifiers(()=>{},["prevent"]))},i[35]||(i[35]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-down"},[t.createElementVNode("polyline",{points:"6 9 12 15 18 9"})],-1)]),32)]),t.createElementVNode("li",Ut,[t.createElementVNode("a",{onPointerdown:i[15]||(i[15]=o=>z(o,"pan-left")),onPointercancel:i[16]||(i[16]=o=>a(o,"pan-left")),onPointerup:i[17]||(i[17]=o=>a(o,"pan-left")),onPointerleave:i[18]||(i[18]=o=>a(o,"pan-left")),onContextmenu:i[19]||(i[19]=t.withModifiers(()=>{},["prevent"]))},i[36]||(i[36]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-chevron-left"},[t.createElementVNode("polyline",{points:"15 18 9 12 15 6"})],-1)]),32)])])]),t.createElementVNode("li",$t,[t.createElementVNode("a",{onPointerdown:i[20]||(i[20]=o=>z(o,"home"))},i[37]||(i[37]=[t.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minimize-2" data-v-3ba139de><polyline points="4 14 10 14 10 20" data-v-3ba139de></polyline><polyline points="20 10 14 10 14 4" data-v-3ba139de></polyline><line x1="14" y1="10" x2="21" y2="3" data-v-3ba139de></line><line x1="3" y1="21" x2="10" y2="14" data-v-3ba139de></line></svg>',1)]),32)]),t.createElementVNode("li",Lt,[t.createElementVNode("a",{onPointerdown:i[21]||(i[21]=o=>z(o,"zoom-in")),onPointerup:i[22]||(i[22]=o=>a(o,"zoom-in")),onPointercancel:i[23]||(i[23]=o=>a(o,"zoom-in")),onPointerleave:i[24]||(i[24]=o=>a(o,"zoom-in")),onContextmenu:i[25]||(i[25]=t.withModifiers(()=>{},["prevent"]))},i[38]||(i[38]=[t.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zoom-in" data-v-3ba139de><circle cx="11" cy="11" r="8" data-v-3ba139de></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-3ba139de></line><line x1="11" y1="8" x2="11" y2="14" data-v-3ba139de></line><line x1="8" y1="11" x2="14" y2="11" data-v-3ba139de></line></svg>',1)]),32)]),t.createElementVNode("li",Zt,[t.createElementVNode("a",{onPointerdown:i[26]||(i[26]=o=>z(o,"zoom-out")),onPointerup:i[27]||(i[27]=o=>a(o,"zoom-out")),onPointercancel:i[28]||(i[28]=o=>a(o,"zoom-out")),onPointerleave:i[29]||(i[29]=o=>a(o,"zoom-out")),onContextmenu:i[30]||(i[30]=t.withModifiers(()=>{},["prevent"]))},i[39]||(i[39]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-zoom-out"},[t.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),t.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),t.createElementVNode("line",{x1:"8",y1:"11",x2:"14",y2:"11"})],-1)]),32)])])],32))}}),tt=y((s,h)=>{const d=s.__vccOpts||s;for(const[z,a]of h)d[z]=a;return d},"C"),Wt=tt(Ht,[["__scopeId","data-v-3ba139de"]]);function Kt(){let s=0;function h(z,a,l,i){z(),s=window.setTimeout(()=>{s=window.setInterval(()=>{a()},i)},l)}y(h,"i");function d(){s&&(window.clearInterval(s),s=0)}return y(d,"l"),{startHold:h,clearHold:d}}y(Kt,"R");const Re="control-btn";function Gt({props:s,transform:h}){let d=Kt();function z(m){d.startHold(()=>{h.changeZoom(m*s.buttonZoomStep*.5,Re)},()=>{h.changeZoom(m*s.buttonZoomStep*.5,Re)},300,50)}y(z,"u");function a(m){if(!s.disabled)switch(m.key){case"home":o();break;case"zoom-in":z(1);break;case"zoom-out":z(-1);break;case"pan-left":i({x:1,y:0});break;case"pan-right":i({x:-1,y:0});break;case"pan-up":i({x:0,y:1});break;case"pan-down":i({x:0,y:-1});break}}y(a,"n");function l(m){d.clearHold()}y(l,"a");function i(m){d.startHold(()=>{h.changePan(m.x*s.buttonPanStep,m.y*s.buttonPanStep,Re)},()=>{h.changePan(m.x*s.buttonPanStep,m.y*s.buttonPanStep,Re)},300,50)}y(i,"e");function o(){h.goHome(Re)}return y(o,"o"),{onButtonDown:a,onButtonUp:l}}y(Gt,"A");function Yt({props:s,transform:h}){let d={x:0,y:0};function z(i){s.disabled||i.pointerType!=="mouse"||!s.mouseEnabled||(d={x:i.clientX,y:i.clientY},document.addEventListener("pointermove",l,{passive:!1}),document.addEventListener("pointerup",function(o){document.removeEventListener("pointermove",l)}),document.addEventListener("pointerleave",function(o){document.removeEventListener("pointermove",l)}),document.addEventListener("pointercancel",function(o){document.removeEventListener("pointermove",l)}))}y(z,"u");function a(i){if(s.disabled||!s.dblClickEnabled||!s.zoomEnabled)return;const o={x:i.clientX,y:i.clientY};h.changeZoom(s.dblClickZoomStep,"dblClick",o)}y(a,"n");function l(i){if(s.disabled||!s.panEnabled||i.pointerType!=="mouse"||!s.mouseEnabled)return;let o={x:i.clientX-d.x,y:i.clientY-d.y};h.changePan(o.x,o.y,i.pointerType),d={x:i.clientX,y:i.clientY},i.preventDefault()}return y(l,"a"),{onPointerDown:z,onDblClick:a}}y(Yt,"F");function Xt({props:s,transform:h}){let d=t.ref({}),z=t.ref(0),a=null;function l(m){if(s.disabled||!s.touchEnabled||!s.panEnabled&&!s.zoomEnabled||(m.preventDefault(),m.touches.length<1))return;const w=m.touches.item(0);if(!w)return;let x=0,k={x:w.clientX,y:w.clientY};if(m.touches.length===2){const c=m.touches.item(1);let g=i({x:w?w.clientX:0,y:w?w.clientY:0},{x:c?c.clientX:0,y:c?c.clientY:0});z.value<=0?(z.value=g.distance,x=0):(x=g.distance/z.value*h.zoom.value-h.zoom.value,z.value=g.distance),k=g.center}if(s.zoomEnabled&&h.changeZoom(x,"touch",k),a===null){a={x:k.x,y:k.y};return}const C={x:k.x-a.x,y:k.y-a.y};s.panEnabled&&h.changePan(C.x,C.y,"touch"),a={x:k.x,y:k.y}}y(l,"a");function i(m,w){let x=Math.sqrt(Math.pow(m.x-w.x,2)+Math.pow(m.y-w.y,2)),k={x:(m.x+w.x)/2,y:(m.y+w.y)/2};return{distance:x,center:k}}y(i,"e");function o(m){s.disabled||!s.touchEnabled||(a=null,document.addEventListener("touchmove",l,{passive:!1}),document.addEventListener("touchend",function(w){m.touches.length<2&&(z.value=-1),document.removeEventListener("touchmove",l)}))}return y(o,"o"),{onTouchStart:o,touchCount:t.computed(()=>Object.keys(d.value).length)}}y(Xt,"G");function qt({props:s,onChange:h,container:d,target:z}){const a=t.ref({x:0,y:0}),l=t.ref(0);t.onMounted(()=>{l.value=s.minZoom,a.value={x:s.pan!=null?s.pan.x:s.initialPanX,y:s.pan!=null?s.pan.y:s.initialPanY},s.zoom?l.value=s.zoom:s.initialZoom>=s.minZoom&&s.initialZoom<=s.maxZoom&&(l.value=s.initialZoom)}),t.watch(()=>s.zoom,()=>{isNaN(s.zoom)||(l.value=s.zoom)}),t.watch(()=>s.pan,()=>{s.pan&&(a.value.x=s.pan.x,a.value.y=s.pan.y)},{deep:!0});function i(w,x,k){if(isNaN(w)||w===0)return;const C=l.value;let c=l.value+w;if(c>s.maxZoom?c=s.maxZoom:c<s.minZoom&&(c=s.minZoom),Math.abs(C-c)<1e-4)return;if(l.value=c,s.zoomOrigin==="center"&&(k=Ye(d.value)),s.zoomOrigin!=="content-center"){k||(k=Ye(d.value));const u=Jt(d.value,a.value),b={x:(c-C)*((u.x-k.x)/C),y:(c-C)*((u.y-k.y)/C)};o(b.x,b.y,"zoom")}let g={zoom:c,delta:{zoom:w,pan:{x:0,y:0}},pan:{x:a.value.x,y:a.value.y,deltaX:0,deltaY:0},type:x};h("zoom",g)}y(i,"e");function o(w,x,k){isNaN(w)&&(w=0),isNaN(x)&&(x=0),a.value={x:a.value.x+w,y:a.value.y+x};let C={zoom:l.value,delta:{zoom:0,pan:{x:w,y:x}},pan:{x:a.value.x,y:a.value.y,deltaX:w,deltaY:x},type:k};h("panned",C)}y(o,"o");function m(w){l.value=s.initialZoom,h("zoom",{zoom:l.value,pan:{x:a.value.x,y:a.value.y,deltaX:0,deltaY:0},type:w});let x={x:s.initialPanX-a.value.x,y:s.initialPanY-a.value.y};a.value={x:s.initialPanX,y:s.initialPanY},h("panned",{zoom:l.value,pan:{x:a.value.x,y:a.value.y,deltaX:x.x,deltaY:x.y},type:w})}return y(m,"d"),{zoom:t.computed(()=>l.value),pan:t.computed(()=>a.value),setZoom:y(w=>{l.value=w},"setZoom"),setPan:y(w=>{a.value=w},"setPan"),changeZoom:i,changePan:o,goHome:m}}y(qt,"J");function Ye(s){const h=s.getBoundingClientRect();return{x:h.left+h.width/2,y:h.top+h.height/2}}y(Ye,"B");function Jt(s,h){const d=Ye(s);return{x:d.x+h.x,y:d.y+h.y}}y(Jt,"Q");function Qt({props:s,transform:h}){function d(z){if(s.disabled||!s.wheelEnabled||!s.zoomEnabled)return;const a=Math.abs(z.deltaY)>0?z.deltaY:z.deltaX,l=s.wheelZoomStep*-1*a/Math.abs(a),i={x:z.clientX,y:z.clientY};h.changeZoom(l,"wheel",i),z.preventDefault()}return y(d,"l"),{onWheel:d}}y(Qt,"ee");function en({props:s,onChange:h,container:d,target:z}){const a=qt({props:s,onChange:h,container:d,target:z}),l=Xt({props:s,transform:a}),i=Qt({props:s,transform:a}),o=Yt({props:s,transform:a}),m=Gt({props:s,transform:a});return{zoom:a.zoom,pan:a.pan,setZoom:a.setZoom,setPan:a.setPan,onWheel:i.onWheel,onTouchStart:l.onTouchStart,onButtonUp:m.onButtonUp,onButtonDown:m.onButtonDown,onPointerDown:o.onPointerDown,onDblClick:o.onDblClick}}y(en,"te");const tn=t.defineComponent({__name:"VueZoomable",props:{zoom:{type:Number,default:null},pan:{type:Object,default:null},selector:{type:String,default:"* > *"},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.5},initialPanX:{type:Number,default:0},initialPanY:{type:Number,default:0},initialZoom:{type:Number,default:.5},dblClickZoomStep:{type:Number,default:.4},wheelZoomStep:{type:Number,default:.4},panEnabled:{type:Boolean,default:!0},zoomEnabled:{type:Boolean,default:!0},mouseEnabled:{type:Boolean,default:!0},touchEnabled:{type:Boolean,default:!0},dblClickEnabled:{type:Boolean,default:!0},wheelEnabled:{type:Boolean,default:!0},enableControlButton:{type:Boolean,default:!0},buttonPanStep:{type:Number,default:15},buttonZoomStep:{type:Number,default:.1},disabled:{type:Boolean,default:!1},zoomOrigin:{type:String,default:"pointer"}},emits:["panned","zoom","update:zoom","update:pan"],setup(s,{emit:h}){let d=h,z=s,a=t.ref(),l=t.computed(()=>{var x;return(x=a.value)==null?void 0:x.querySelector(z.selector)}),i=en({props:z,onChange:o,container:a,target:l});function o(x,k){x==="zoom"?d("update:zoom",k.zoom):x==="panned"&&d("update:pan",k.pan),d(x,k)}y(o,"o");let m=t.computed(()=>`translate(${i.pan.value.x}px, ${i.pan.value.y}px) scale(${i.zoom.value})`);function w(){l.value&&(l.value.style.transform=m.value,l.value.style.transformOrigin="center center",l.value.style.transition="transform 0.07s ease-out",l.value.style.transformBox="fill-box")}return y(w,"s"),t.watch(m,()=>{w()},{flush:"post"}),t.onMounted(()=>{w()}),(x,k)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:a,class:t.normalizeClass(x.$style.container),onDblclick:k[0]||(k[0]=(...C)=>t.unref(i).onDblClick&&t.unref(i).onDblClick(...C)),onPointerdown:k[1]||(k[1]=(...C)=>t.unref(i).onPointerDown&&t.unref(i).onPointerDown(...C)),onWheel:k[2]||(k[2]=(...C)=>t.unref(i).onWheel&&t.unref(i).onWheel(...C)),onTouchstart:k[3]||(k[3]=(...C)=>t.unref(i).onTouchStart&&t.unref(i).onTouchStart(...C))},[t.renderSlot(x.$slots,"default",{},void 0,!0),t.renderSlot(x.$slots,"buttons",{},()=>[t.unref(z).enableControlButton?(t.openBlock(),t.createBlock(Wt,{key:0,onButtondown:t.unref(i).onButtonDown,onButtonup:t.unref(i).onButtonUp},null,8,["onButtondown","onButtonup"])):t.createCommentVNode("",!0)],!0)],34))}}),nn="_container_irdvc_2",rn="_buttons_irdvc_11",on={container:nn,buttons:rn},an={$style:on},sn=tt(tn,[["__cssModules",an],["__scopeId","data-v-fce7d501"]]);var ln=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,Ze=y((s,h,d,z)=>{for(var a=z>1?void 0:z?dn(h,d):h,l=s.length-1,i;l>=0;l--)(i=s[l])&&(a=(z?i(h,d,a):i(a))||a);return z&&a&&ln(h,d,a),a},"__decorateClass$5"),Ne;let De=(Ne=class extends te.BaseComponent{components={Zoomable:sn};uri="";ext="";fileName="";beforeMount(){const h=window?.top?.document?.getElementById?.("OIElement")?.querySelector?.("div");h&&(h.style.display="none",this.hookWhenComponentDestroy(()=>h.style.display="flex"))}},y(Ne,"ImageViewerFilesField"),Ne);Ze([te.Prop(String)],De.prototype,"uri",2);Ze([te.Prop(String)],De.prototype,"ext",2);Ze([te.Prop(String)],De.prototype,"fileName",2);De=Ze([te.VST],De);const hn={class:"image-file-preview top-50px bg-white b-t-solid b-t-1px b-t-amber-300",style:{"user-drag":"element","-webkit-user-drag":"element"}},un={class:"w100% h100% flex justify-center bg-[conic-gradient(#e5e7eb_25%,transparent_25%_50%,#e5e7eb_50%_75%,transparent_75%)] bg-[length:20px_20px] bg-[position:0_0,0_10px,10px_-10px,-10px_0px]"},fn=["src"];function cn(s,h,d,z,a,l){const i=t.resolveComponent("Zoomable");return t.openBlock(),t.createElementBlock("div",hn,[t.createElementVNode("div",un,[t.createVNode(i,{class:"cursor-move",initialZoom:.5,wheelZoomStep:2,initialPanY:90,wheelEnabled:!0,pan:{x:-(s.VST.viewPortHeight/2),y:0,deltaX:0,deltaY:0},typ:"mouse"},{default:t.withCtx(()=>[t.createElementVNode("img",{class:"w100%",src:s.uri},null,8,fn)]),_:1},8,["pan"])]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent("style"),null,{default:t.withCtx(()=>[...h[0]||(h[0]=[t.createTextVNode(".simplebar-track.simplebar-vertical { display: none; }",-1)])]),_:1}))])}y(cn,"render$5");const pn=Ee._export_sfc(De,[["render",cn]]);var mn=Object.defineProperty,vn=Object.getOwnPropertyDescriptor,nt=y((s,h,d,z)=>{for(var a=z>1?void 0:z?vn(h,d):h,l=s.length-1,i;l>=0;l--)(i=s[l])&&(a=(z?i(h,d,a):i(a))||a);return z&&a&&mn(h,d,a),a},"__decorateClass$4"),Ce;let $e=(Ce=class extends te.BaseComponent{file={};mounted(){}},y(Ce,"ExcelViewerFilesField"),Ce);nt([te.Prop(Object,null)],$e.prototype,"file",2);$e=nt([te.VST],$e);const gn={class:"mt150px",id:"excelView",ref:"excelView"};function wn(s,h,d,z,a,l){return t.openBlock(),t.createElementBlock("div",gn,"Скоро будет!",512)}y(wn,"render$4");const bn=Ee._export_sfc($e,[["render",wn]]);var yn=Object.defineProperty,_n=Object.getOwnPropertyDescriptor,rt=y((s,h,d,z)=>{for(var a=z>1?void 0:z?_n(h,d):h,l=s.length-1,i;l>=0;l--)(i=s[l])&&(a=(z?i(h,d,a):i(a))||a);return z&&a&&yn(h,d,a),a},"__decorateClass$3"),Se;let Le=(Se=class extends te.BaseComponent{file={}},y(Se,"DocxViewerFilesField"),Se);rt([te.Prop(Object,null)],Le.prototype,"file",2);Le=rt([te.VST],Le);const kn={class:"p15px mt150px"};function xn(s,h,d,z,a,l){return t.openBlock(),t.createElementBlock("div",kn,"Скоро")}y(xn,"render$3");const En=Ee._export_sfc(Le,[["render",xn]]);var zn=Object.defineProperty,Nn=Object.getOwnPropertyDescriptor,He=y((s,h,d,z)=>{for(var a=z>1?void 0:z?Nn(h,d):h,l=s.length-1,i;l>=0;l--)(i=s[l])&&(a=(z?i(h,d,a):i(a))||a);return z&&a&&zn(h,d,a),a},"__decorateClass$2"),Fe;let Ie=(Fe=class extends te.BaseComponent{uri="";ext="";fileName="";pdfUrl=null;loading=!0;async mounted(){await this.loadAndShowPdf()}async fetchPdfFile(){try{const h=await fetch(this.uri);if(!h.ok)throw new Error(`HTTP error ${h.status}`);const d=await h.blob(),z="application/pdf",a=this.fileName||this.uri.split("/").pop()||"document.pdf";return new File([d],a,{type:z})}catch(h){console.error("Failed to fetch the file:",h)}}async loadAndShowPdf(){const h=await this.fetchPdfFile();if(h){const z=`
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Tt = Object.defineProperty;
|
|
2
2
|
var b = (a, d) => Tt(a, "name", { value: d, configurable: !0 });
|
|
3
|
-
import { a as Ge, d as vt, P as se, V as Re, W as St, c as Nt } from "./index-
|
|
4
|
-
import { F as Pt } from "./FieldComponent.vue_vue_type_script_lang-
|
|
3
|
+
import { a as Ge, d as vt, P as se, V as Re, W as St, c as Nt } from "./index-SCGYUD41.js";
|
|
4
|
+
import { F as Pt } from "./FieldComponent.vue_vue_type_script_lang-doAG-SHI.js";
|
|
5
5
|
import { resolveComponent as Ae, createElementBlock as ie, openBlock as ee, normalizeClass as xe, createCommentVNode as ge, withDirectives as Ne, createElementVNode as F, createVNode as ye, withCtx as be, vShow as Pe, createTextVNode as ke, toDisplayString as we, createBlock as ze, normalizeStyle as Rt, defineComponent as Ct, ref as nt, computed as rt, watch as pt, onMounted as Ft, unref as Ce, renderSlot as bt, withModifiers as De, createStaticVNode as yt, resolveDynamicComponent as tt, Fragment as Mt, renderList as Ut, withKeys as _t } from "vue";
|
|
6
6
|
import { _ as Me } from "./_plugin-vue_export-helper-B9nE8o7z.js";
|
|
7
7
|
import { c as et, g as jt, a as $t } from "./_commonjsHelpers-CO8R3Anj.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var ue = Object.defineProperty;
|
|
2
2
|
var a = (i, t) => ue(i, "name", { value: t, configurable: !0 });
|
|
3
|
-
import { a as de, P as R, V as fe } from "./index-
|
|
3
|
+
import { a as de, P as R, V as fe } from "./index-SCGYUD41.js";
|
|
4
4
|
import { createElementBlock as pe, openBlock as Z, normalizeClass as ve, renderSlot as me, createBlock as ge, resolveDynamicComponent as be, withCtx as ye, createTextVNode as Ee, toDisplayString as w } from "vue";
|
|
5
5
|
import { _ as Se } from "./_plugin-vue_export-helper-B9nE8o7z.js";
|
|
6
6
|
function P(i) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var he=Object.defineProperty;var a=(i,t)=>he(i,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./index-BbcNgwWy.cjs"),f=require("vue"),ue=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");function V(i){var t=typeof i;return i!=null&&(t=="object"||t=="function")}a(V,"isObject");var de=typeof global=="object"&&global&&global.Object===Object&&global,fe=typeof self=="object"&&self&&self.Object===Object&&self,ie=de||fe||Function("return this")(),I=a(function(){return ie.Date.now()},"now"),pe=/\s/;function ve(i){for(var t=i.length;t--&&pe.test(i.charAt(t)););return t}a(ve,"trimmedEndIndex");var me=/^\s+/;function ge(i){return i&&i.slice(0,ve(i)+1).replace(me,"")}a(ge,"baseTrim");var j=ie.Symbol,re=Object.prototype,be=re.hasOwnProperty,ye=re.toString,R=j?j.toStringTag:void 0;function Ee(i){var t=be.call(i,R),r=i[R];try{i[R]=void 0;var e=!0}catch{}var s=ye.call(i);return e&&(t?i[R]=r:delete i[R]),s}a(Ee,"getRawTag");var Se=Object.prototype,Oe=Se.toString;function xe(i){return Oe.call(i)}a(xe,"objectToString");var we="[object Null]",Ae="[object Undefined]",Z=j?j.toStringTag:void 0;function We(i){return i==null?i===void 0?Ae:we:Z&&Z in Object(i)?Ee(i):xe(i)}a(We,"baseGetTag");function ke(i){return i!=null&&typeof i=="object"}a(ke,"isObjectLike");var Me="[object Symbol]";function Ce(i){return typeof i=="symbol"||ke(i)&&We(i)==Me}a(Ce,"isSymbol");var K=NaN,Te=/^[-+]0x[0-9a-f]+$/i,ze=/^0b[01]+$/i,Le=/^0o[0-7]+$/i,_e=parseInt;function J(i){if(typeof i=="number")return i;if(Ce(i))return K;if(V(i)){var t=typeof i.valueOf=="function"?i.valueOf():i;i=V(t)?t+"":t}if(typeof i!="string")return i===0?i:+i;i=ge(i);var r=ze.test(i);return r||Le.test(i)?_e(i.slice(2),r?2:8):Te.test(i)?K:+i}a(J,"toNumber");var Ne="Expected a function",De=Math.max,Re=Math.min;function H(i,t,r){var e,s,l,o,n,c,h=0,m=!1,d=!1,g=!0;if(typeof i!="function")throw new TypeError(Ne);t=J(t)||0,V(r)&&(m=!!r.leading,d="maxWait"in r,l=d?De(J(r.maxWait)||0,t):l,g="trailing"in r?!!r.trailing:g);function p(u){var E=e,S=s;return e=s=void 0,h=u,o=i.apply(S,E),o}a(p,"invokeFunc");function C(u){return h=u,n=setTimeout(y,t),m?p(u):o}a(C,"leadingEdge");function x(u){var E=u-c,S=u-h,G=t-E;return d?Re(G,l-S):G}a(x,"remainingWait");function O(u){var E=u-c,S=u-h;return c===void 0||E>=t||E<0||d&&S>=l}a(O,"shouldInvoke");function y(){var u=I();if(O(u))return w(u);n=setTimeout(y,x(u))}a(y,"timerExpired");function w(u){return n=void 0,g&&e?p(u):(e=s=void 0,o)}a(w,"trailingEdge");function P(){n!==void 0&&clearTimeout(n),h=0,e=c=s=n=void 0}a(P,"cancel");function $(){return n===void 0?o:w(I())}a($,"flush");function D(){var u=I(),E=O(u);if(e=arguments,s=this,c=u,E){if(n===void 0)return C(c);if(d)return clearTimeout(n),n=setTimeout(y,t),p(c)}return n===void 0&&(n=setTimeout(y,t)),o}return a(D,"debounced"),D.cancel=P,D.flush=$,D}a(H,"debounce");var Pe="Expected a function";function He(i,t,r){var e=!0,s=!0;if(typeof i!="function")throw new TypeError(Pe);return V(r)&&(e="leading"in r?!!r.leading:e,s="trailing"in r?!!r.trailing:s),H(i,t,{leading:e,maxWait:t,trailing:s})}a(He,"throttle");var L=a(function(){return L=Object.assign||a(function(t){for(var r,e=1,s=arguments.length;e<s;e++){r=arguments[e];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},"__assign"),L.apply(this,arguments)},"__assign");function se(i){return!i||!i.ownerDocument||!i.ownerDocument.defaultView?window:i.ownerDocument.defaultView}a(se,"getElementWindow$1");function le(i){return!i||!i.ownerDocument?document:i.ownerDocument}a(le,"getElementDocument$1");var oe=a(function(i){var t={},r=Array.prototype.reduce.call(i,function(e,s){var l=s.name.match(/data-simplebar-(.+)/);if(l){var o=l[1].replace(/\W+(.)/g,function(n,c){return c.toUpperCase()});switch(s.value){case"true":e[o]=!0;break;case"false":e[o]=!1;break;case void 0:e[o]=!0;break;default:e[o]=s.value}}return e},t);return r},"getOptions$1");function ne(i,t){var r;i&&(r=i.classList).add.apply(r,t.split(" "))}a(ne,"addClasses$1");function ae(i,t){i&&t.split(" ").forEach(function(r){i.classList.remove(r)})}a(ae,"removeClasses$1");function ce(i){return".".concat(i.split(" ").join("."))}a(ce,"classNamesToQuery$1");var U=!!(typeof window<"u"&&window.document&&window.document.createElement),Be=Object.freeze({__proto__:null,addClasses:ne,canUseDOM:U,classNamesToQuery:ce,getElementDocument:le,getElementWindow:se,getOptions:oe,removeClasses:ae}),z=null,ee=null;U&&window.addEventListener("resize",function(){ee!==window.devicePixelRatio&&(ee=window.devicePixelRatio,z=null)});function te(){if(z===null){if(typeof document>"u")return z=0,z;var i=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),i.appendChild(t);var r=t.getBoundingClientRect().right;i.removeChild(t),z=r}return z}a(te,"scrollbarWidth");var A=se,X=le,Ve=oe,W=ne,k=ae,v=ce,B=(function(){function i(t,r){r===void 0&&(r={});var e=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var s=A(e.el);e.scrollXTicking||(s.requestAnimationFrame(e.scrollX),e.scrollXTicking=!0),e.scrollYTicking||(s.requestAnimationFrame(e.scrollY),e.scrollYTicking=!0),e.isScrolling||(e.isScrolling=!0,W(e.el,e.classNames.scrolling)),e.showScrollbar("x"),e.showScrollbar("y"),e.onStopScrolling()},this.scrollX=function(){e.axis.x.isOverflowing&&e.positionScrollbar("x"),e.scrollXTicking=!1},this.scrollY=function(){e.axis.y.isOverflowing&&e.positionScrollbar("y"),e.scrollYTicking=!1},this._onStopScrolling=function(){k(e.el,e.classNames.scrolling),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isScrolling=!1},this.onMouseEnter=function(){e.isMouseEntering||(W(e.el,e.classNames.mouseEntered),e.showScrollbar("x"),e.showScrollbar("y"),e.isMouseEntering=!0),e.onMouseEntered()},this._onMouseEntered=function(){k(e.el,e.classNames.mouseEntered),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isMouseEntering=!1},this._onMouseMove=function(s){e.mouseX=s.clientX,e.mouseY=s.clientY,(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseMoveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseMoveForAxis("y")},this.onMouseLeave=function(){e.onMouseMove.cancel(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseLeaveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseLeaveForAxis("y"),e.mouseX=-1,e.mouseY=-1},this._onWindowResize=function(){e.scrollbarWidth=e.getScrollbarWidth(),e.hideNativeScrollbar()},this.onPointerEvent=function(s){if(!(!e.axis.x.track.el||!e.axis.y.track.el||!e.axis.x.scrollbar.el||!e.axis.y.scrollbar.el)){var l,o;e.axis.x.track.rect=e.axis.x.track.el.getBoundingClientRect(),e.axis.y.track.rect=e.axis.y.track.el.getBoundingClientRect(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&(l=e.isWithinBounds(e.axis.x.track.rect)),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&(o=e.isWithinBounds(e.axis.y.track.rect)),(l||o)&&(s.stopPropagation(),s.type==="pointerdown"&&s.pointerType!=="touch"&&(l&&(e.axis.x.scrollbar.rect=e.axis.x.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.x.scrollbar.rect)?e.onDragStart(s,"x"):e.onTrackClick(s,"x")),o&&(e.axis.y.scrollbar.rect=e.axis.y.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.y.scrollbar.rect)?e.onDragStart(s,"y"):e.onTrackClick(s,"y"))))}},this.drag=function(s){var l,o,n,c,h,m,d,g,p,C,x;if(!(!e.draggedAxis||!e.contentWrapperEl)){var O,y=e.axis[e.draggedAxis].track,w=(o=(l=y.rect)===null||l===void 0?void 0:l[e.axis[e.draggedAxis].sizeAttr])!==null&&o!==void 0?o:0,P=e.axis[e.draggedAxis].scrollbar,$=(c=(n=e.contentWrapperEl)===null||n===void 0?void 0:n[e.axis[e.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,D=parseInt((m=(h=e.elStyles)===null||h===void 0?void 0:h[e.axis[e.draggedAxis].sizeAttr])!==null&&m!==void 0?m:"0px",10);s.preventDefault(),s.stopPropagation(),e.draggedAxis==="y"?O=s.pageY:O=s.pageX;var u=O-((g=(d=y.rect)===null||d===void 0?void 0:d[e.axis[e.draggedAxis].offsetAttr])!==null&&g!==void 0?g:0)-e.axis[e.draggedAxis].dragOffset;u=e.draggedAxis==="x"&&e.isRtl?((C=(p=y.rect)===null||p===void 0?void 0:p[e.axis[e.draggedAxis].sizeAttr])!==null&&C!==void 0?C:0)-P.size-u:u;var E=u/(w-P.size),S=E*($-D);e.draggedAxis==="x"&&e.isRtl&&(S=!((x=i.getRtlHelpers())===null||x===void 0)&&x.isScrollingToNegative?-S:S),e.contentWrapperEl[e.axis[e.draggedAxis].scrollOffsetAttr]=S}},this.onEndDrag=function(s){e.isDragging=!1;var l=X(e.el),o=A(e.el);s.preventDefault(),s.stopPropagation(),k(e.el,e.classNames.dragging),e.onStopScrolling(),l.removeEventListener("mousemove",e.drag,!0),l.removeEventListener("mouseup",e.onEndDrag,!0),e.removePreventClickId=o.setTimeout(function(){l.removeEventListener("click",e.preventClick,!0),l.removeEventListener("dblclick",e.preventClick,!0),e.removePreventClickId=null})},this.preventClick=function(s){s.preventDefault(),s.stopPropagation()},this.el=t,this.options=L(L({},i.defaultOptions),r),this.classNames=L(L({},i.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=He(this._onMouseMove,64),this.onWindowResize=H(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=H(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=H(this._onMouseEntered,this.stopScrollDelay),this.init()}return a(i,"SimpleBarCore"),i.getRtlHelpers=function(){if(i.rtlHelpers)return i.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=t.firstElementChild,e=r?.firstElementChild;if(!e)return null;document.body.appendChild(r),r.scrollLeft=0;var s=i.getOffset(r),l=i.getOffset(e);r.scrollLeft=-999;var o=i.getOffset(e);return document.body.removeChild(r),i.rtlHelpers={isScrollOriginAtZero:s.left!==l.left,isScrollingToNegative:l.left!==o.left},i.rtlHelpers},i.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:te()}catch{return te()}},i.getOffset=function(t){var r=t.getBoundingClientRect(),e=X(t),s=A(t);return{top:r.top+(s.pageYOffset||e.documentElement.scrollTop),left:r.left+(s.pageXOffset||e.documentElement.scrollLeft)}},i.prototype.init=function(){U&&(this.initDOM(),this.rtlHelpers=i.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},i.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(v(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(v(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(v(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(v(this.classNames.offset)),this.maskEl=this.el.querySelector(v(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,v(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(v(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(v(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(v(this.classNames.track)).concat(v(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(v(this.classNames.track)).concat(v(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(v(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(v(this.classNames.scrollbar)))||null,this.options.autoHide||(W(this.axis.x.scrollbar.el,this.classNames.visible),W(this.axis.y.scrollbar.el,this.classNames.visible))},i.prototype.initListeners=function(){var t=this,r,e=A(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var s=!1,l=e.ResizeObserver||ResizeObserver;this.resizeObserver=new l(function(){s&&e.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame(function(){s=!0})}this.mutationObserver=new e.MutationObserver(function(){e.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},i.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=A(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,e=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1||r>0,l=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,n=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=s?"".concat(r||h,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var m=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&h>r,this.axis.y.isOverflowing=c>m,this.axis.x.isOverflowing=o==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=n==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var d=this.axis.x.isOverflowing?this.scrollbarWidth:0,g=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>l-g,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>m-d,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},i.prototype.getScrollbarSize=function(t){var r,e;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var s=this.contentEl[this.axis[t].scrollSizeAttr],l=(e=(r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])!==null&&e!==void 0?e:0,o=l/s,n;return n=Math.max(~~(o*l),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(n=Math.min(n,this.options.scrollbarMaxSize)),n},i.prototype.positionScrollbar=function(t){var r,e,s;t===void 0&&(t="y");var l=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!l.el||!this.elStyles)){var o=this.contentWrapperEl[this.axis[t].scrollSizeAttr],n=((r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[t].sizeAttr],10),h=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];h=t==="x"&&this.isRtl&&(!((e=i.getRtlHelpers())===null||e===void 0)&&e.isScrollOriginAtZero)?-h:h,t==="x"&&this.isRtl&&(h=!((s=i.getRtlHelpers())===null||s===void 0)&&s.isScrollingToNegative?h:-h);var m=h/(o-c),d=~~((n-l.size)*m);d=t==="x"&&this.isRtl?-d+(n-l.size):d,l.el.style.transform=t==="x"?"translate3d(".concat(d,"px, 0, 0)"):"translate3d(0, ".concat(d,"px, 0)")}},i.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var r=this.axis[t].track.el,e=this.axis[t].scrollbar.el;!r||!e||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?e.style.display="block":e.style.display="none")},i.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(W(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},i.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(k(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},i.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},i.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var r=this.axis[t];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(t),W(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?W(r.scrollbar.el,this.classNames.hover):k(r.scrollbar.el,this.classNames.hover)):(k(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},i.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),k(this.axis[t].track.el,this.classNames.hover),k(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},i.prototype.onDragStart=function(t,r){var e;r===void 0&&(r="y"),this.isDragging=!0;var s=X(this.el),l=A(this.el),o=this.axis[r].scrollbar,n=r==="y"?t.pageY:t.pageX;this.axis[r].dragOffset=n-(((e=o.rect)===null||e===void 0?void 0:e[this.axis[r].offsetAttr])||0),this.draggedAxis=r,W(this.el,this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(l.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},i.prototype.onTrackClick=function(t,r){var e=this,s,l,o,n;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var h=A(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var m=this.axis[r].scrollbar,d=(l=(s=m.rect)===null||s===void 0?void 0:s[this.axis[r].offsetAttr])!==null&&l!==void 0?l:0,g=parseInt((n=(o=this.elStyles)===null||o===void 0?void 0:o[this.axis[r].sizeAttr])!==null&&n!==void 0?n:"0px",10),p=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],C=r==="y"?this.mouseY-d:this.mouseX-d,x=C<0?-1:1,O=x===-1?p-g:p+g,y=40,w=a(function(){e.contentWrapperEl&&(x===-1?p>O&&(p-=y,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=p,h.requestAnimationFrame(w)):p<O&&(p+=y,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=p,h.requestAnimationFrame(w)))},"scrollTo");w()}},i.prototype.getContentElement=function(){return this.contentEl},i.prototype.getScrollElement=function(){return this.contentWrapperEl},i.prototype.removeListeners=function(){var t=A(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},i.prototype.unMount=function(){this.removeListeners()},i.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},i.prototype.findChild=function(t,r){var e=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(s){return e.call(s,r)})[0]},i.rtlHelpers=null,i.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},i.getOptions=Ve,i.helpers=Be,i})(),Y=a(function(i,t){return Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])},Y(i,t)},"extendStatics");function je(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Y(i,t);function r(){this.constructor=i}a(r,"__"),i.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}a(je,"__extends");var Q=B.helpers,q=Q.getOptions,b=Q.addClasses,$e=Q.canUseDOM,F=(function(i){je(t,i);function t(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var s=i.apply(this,r)||this;return t.instances.set(r[0],s),s}return a(t,"SimpleBar"),t.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(r){r.getAttribute("data-simplebar")!=="init"&&!t.instances.has(r)&&new t(r,q(r.attributes))})},t.removeObserver=function(){var r;(r=t.globalObserver)===null||r===void 0||r.disconnect()},t.prototype.initDOM=function(){var r=this,e,s,l;if(!Array.prototype.filter.call(this.el.children,function(c){return c.classList.contains(r.classNames.wrapper)}).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),b(this.wrapperEl,this.classNames.wrapper),b(this.contentWrapperEl,this.classNames.contentWrapper),b(this.offsetEl,this.classNames.offset),b(this.maskEl,this.classNames.mask),b(this.contentEl,this.classNames.contentEl),b(this.placeholderEl,this.classNames.placeholder),b(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),b(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),(e=this.contentWrapperEl)===null||e===void 0||e.setAttribute("tabindex",this.options.tabIndex.toString()),(s=this.contentWrapperEl)===null||s===void 0||s.setAttribute("role","region"),(l=this.contentWrapperEl)===null||l===void 0||l.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var o=document.createElement("div"),n=document.createElement("div");b(o,this.classNames.track),b(n,this.classNames.scrollbar),o.appendChild(n),this.axis.x.track.el=o.cloneNode(!0),b(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=o.cloneNode(!0),b(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}B.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},t.prototype.unMount=function(){B.prototype.unMount.call(this),t.instances.delete(this.el)},t.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver<"u"&&(this.globalObserver=new MutationObserver(t.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},t.handleMutations=function(r){r.forEach(function(e){e.addedNodes.forEach(function(s){s.nodeType===1&&(s.hasAttribute("data-simplebar")?!t.instances.has(s)&&document.documentElement.contains(s)&&new t(s,q(s.attributes)):s.querySelectorAll("[data-simplebar]").forEach(function(l){l.getAttribute("data-simplebar")!=="init"&&!t.instances.has(l)&&document.documentElement.contains(l)&&new t(l,q(l.attributes))}))}),e.removedNodes.forEach(function(s){var l;s.nodeType===1&&(s.getAttribute("data-simplebar")==="init"?!document.documentElement.contains(s)&&((l=t.instances.get(s))===null||l===void 0||l.unMount()):Array.prototype.forEach.call(s.querySelectorAll('[data-simplebar="init"]'),function(o){var n;!document.documentElement.contains(o)&&((n=t.instances.get(o))===null||n===void 0||n.unMount())}))})})},t.instances=new WeakMap,t})(B);$e&&F.initHtmlApi();var Ie=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,N=a((i,t,r,e)=>{for(var s=e>1?void 0:e?Xe(t,r):t,l=i.length-1,o;l>=0;l--)(o=i[l])&&(s=(e?o(t,r,s):o(s))||s);return e&&s&&Ie(t,r,s),s},"__decorateClass"),_;let M=(_=class extends T.BaseComponent{autoHide=!1;color="#494747";margin="auto";width="7px";direction="ltr";randomClass="";simpleBar=null;mounted(){this.randomClass="scrollbar-c"+this.VST.generateRandomKey(),this.simpleBar=new F(this.$refs.scrollContainer,{autoHide:this.autoHide,direction:this.direction})}beforeMount(){F.removeObserver()}},a(_,"Scrollbar"),_);N([T.Prop(Boolean)],M.prototype,"autoHide",2);N([T.Prop(String)],M.prototype,"color",2);N([T.Prop(String)],M.prototype,"margin",2);N([T.Prop(String)],M.prototype,"width",2);N([T.Prop(String)],M.prototype,"direction",2);M=N([T.VST],M);const qe=["data-simplebar-auto-hide","data-simplebar-direction"];function Ye(i,t,r,e,s,l){return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["user-select-auto!",{[i.randomClass]:!0}]),"data-simplebar-auto-hide":i.VST.$reactive.isMobile||i.autoHide?"true":"false","data-simplebar-direction":i.direction,"data-simplebar":"",ref:"scrollContainer"},[f.renderSlot(i.$slots,"default"),(f.openBlock(),f.createBlock(f.resolveDynamicComponent("style"),null,{default:f.withCtx(()=>[f.createTextVNode("."+f.toDisplayString(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar::before { background-color: "+f.toDisplayString(i.color)+" !important; margin: "+f.toDisplayString(i.margin)+" !important; cursor: grabbing !important; width: "+f.toDisplayString(i.width)+" !important; } ."+f.toDisplayString(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar:hover::before { background-color: "+f.toDisplayString(i.color)+" !important; margin: "+f.toDisplayString(i.margin)+" !important; cursor: grab !important; width: "+f.toDisplayString(i.width)+" !important; }",1)]),_:1}))],10,qe)}a(Ye,"render");const Fe=ue._export_sfc(M,[["render",Ye]]);exports.default=Fe;
|
|
1
|
+
"use strict";var he=Object.defineProperty;var a=(i,t)=>he(i,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./index-OLIPwsTz.cjs"),f=require("vue"),ue=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");function V(i){var t=typeof i;return i!=null&&(t=="object"||t=="function")}a(V,"isObject");var de=typeof global=="object"&&global&&global.Object===Object&&global,fe=typeof self=="object"&&self&&self.Object===Object&&self,ie=de||fe||Function("return this")(),I=a(function(){return ie.Date.now()},"now"),pe=/\s/;function ve(i){for(var t=i.length;t--&&pe.test(i.charAt(t)););return t}a(ve,"trimmedEndIndex");var me=/^\s+/;function ge(i){return i&&i.slice(0,ve(i)+1).replace(me,"")}a(ge,"baseTrim");var j=ie.Symbol,re=Object.prototype,be=re.hasOwnProperty,ye=re.toString,R=j?j.toStringTag:void 0;function Ee(i){var t=be.call(i,R),r=i[R];try{i[R]=void 0;var e=!0}catch{}var s=ye.call(i);return e&&(t?i[R]=r:delete i[R]),s}a(Ee,"getRawTag");var Se=Object.prototype,Oe=Se.toString;function xe(i){return Oe.call(i)}a(xe,"objectToString");var we="[object Null]",Ae="[object Undefined]",Z=j?j.toStringTag:void 0;function We(i){return i==null?i===void 0?Ae:we:Z&&Z in Object(i)?Ee(i):xe(i)}a(We,"baseGetTag");function ke(i){return i!=null&&typeof i=="object"}a(ke,"isObjectLike");var Me="[object Symbol]";function Ce(i){return typeof i=="symbol"||ke(i)&&We(i)==Me}a(Ce,"isSymbol");var K=NaN,Te=/^[-+]0x[0-9a-f]+$/i,ze=/^0b[01]+$/i,Le=/^0o[0-7]+$/i,_e=parseInt;function J(i){if(typeof i=="number")return i;if(Ce(i))return K;if(V(i)){var t=typeof i.valueOf=="function"?i.valueOf():i;i=V(t)?t+"":t}if(typeof i!="string")return i===0?i:+i;i=ge(i);var r=ze.test(i);return r||Le.test(i)?_e(i.slice(2),r?2:8):Te.test(i)?K:+i}a(J,"toNumber");var Ne="Expected a function",De=Math.max,Re=Math.min;function H(i,t,r){var e,s,l,o,n,c,h=0,m=!1,d=!1,g=!0;if(typeof i!="function")throw new TypeError(Ne);t=J(t)||0,V(r)&&(m=!!r.leading,d="maxWait"in r,l=d?De(J(r.maxWait)||0,t):l,g="trailing"in r?!!r.trailing:g);function p(u){var E=e,S=s;return e=s=void 0,h=u,o=i.apply(S,E),o}a(p,"invokeFunc");function C(u){return h=u,n=setTimeout(y,t),m?p(u):o}a(C,"leadingEdge");function x(u){var E=u-c,S=u-h,G=t-E;return d?Re(G,l-S):G}a(x,"remainingWait");function O(u){var E=u-c,S=u-h;return c===void 0||E>=t||E<0||d&&S>=l}a(O,"shouldInvoke");function y(){var u=I();if(O(u))return w(u);n=setTimeout(y,x(u))}a(y,"timerExpired");function w(u){return n=void 0,g&&e?p(u):(e=s=void 0,o)}a(w,"trailingEdge");function P(){n!==void 0&&clearTimeout(n),h=0,e=c=s=n=void 0}a(P,"cancel");function $(){return n===void 0?o:w(I())}a($,"flush");function D(){var u=I(),E=O(u);if(e=arguments,s=this,c=u,E){if(n===void 0)return C(c);if(d)return clearTimeout(n),n=setTimeout(y,t),p(c)}return n===void 0&&(n=setTimeout(y,t)),o}return a(D,"debounced"),D.cancel=P,D.flush=$,D}a(H,"debounce");var Pe="Expected a function";function He(i,t,r){var e=!0,s=!0;if(typeof i!="function")throw new TypeError(Pe);return V(r)&&(e="leading"in r?!!r.leading:e,s="trailing"in r?!!r.trailing:s),H(i,t,{leading:e,maxWait:t,trailing:s})}a(He,"throttle");var L=a(function(){return L=Object.assign||a(function(t){for(var r,e=1,s=arguments.length;e<s;e++){r=arguments[e];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},"__assign"),L.apply(this,arguments)},"__assign");function se(i){return!i||!i.ownerDocument||!i.ownerDocument.defaultView?window:i.ownerDocument.defaultView}a(se,"getElementWindow$1");function le(i){return!i||!i.ownerDocument?document:i.ownerDocument}a(le,"getElementDocument$1");var oe=a(function(i){var t={},r=Array.prototype.reduce.call(i,function(e,s){var l=s.name.match(/data-simplebar-(.+)/);if(l){var o=l[1].replace(/\W+(.)/g,function(n,c){return c.toUpperCase()});switch(s.value){case"true":e[o]=!0;break;case"false":e[o]=!1;break;case void 0:e[o]=!0;break;default:e[o]=s.value}}return e},t);return r},"getOptions$1");function ne(i,t){var r;i&&(r=i.classList).add.apply(r,t.split(" "))}a(ne,"addClasses$1");function ae(i,t){i&&t.split(" ").forEach(function(r){i.classList.remove(r)})}a(ae,"removeClasses$1");function ce(i){return".".concat(i.split(" ").join("."))}a(ce,"classNamesToQuery$1");var U=!!(typeof window<"u"&&window.document&&window.document.createElement),Be=Object.freeze({__proto__:null,addClasses:ne,canUseDOM:U,classNamesToQuery:ce,getElementDocument:le,getElementWindow:se,getOptions:oe,removeClasses:ae}),z=null,ee=null;U&&window.addEventListener("resize",function(){ee!==window.devicePixelRatio&&(ee=window.devicePixelRatio,z=null)});function te(){if(z===null){if(typeof document>"u")return z=0,z;var i=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),i.appendChild(t);var r=t.getBoundingClientRect().right;i.removeChild(t),z=r}return z}a(te,"scrollbarWidth");var A=se,X=le,Ve=oe,W=ne,k=ae,v=ce,B=(function(){function i(t,r){r===void 0&&(r={});var e=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var s=A(e.el);e.scrollXTicking||(s.requestAnimationFrame(e.scrollX),e.scrollXTicking=!0),e.scrollYTicking||(s.requestAnimationFrame(e.scrollY),e.scrollYTicking=!0),e.isScrolling||(e.isScrolling=!0,W(e.el,e.classNames.scrolling)),e.showScrollbar("x"),e.showScrollbar("y"),e.onStopScrolling()},this.scrollX=function(){e.axis.x.isOverflowing&&e.positionScrollbar("x"),e.scrollXTicking=!1},this.scrollY=function(){e.axis.y.isOverflowing&&e.positionScrollbar("y"),e.scrollYTicking=!1},this._onStopScrolling=function(){k(e.el,e.classNames.scrolling),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isScrolling=!1},this.onMouseEnter=function(){e.isMouseEntering||(W(e.el,e.classNames.mouseEntered),e.showScrollbar("x"),e.showScrollbar("y"),e.isMouseEntering=!0),e.onMouseEntered()},this._onMouseEntered=function(){k(e.el,e.classNames.mouseEntered),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isMouseEntering=!1},this._onMouseMove=function(s){e.mouseX=s.clientX,e.mouseY=s.clientY,(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseMoveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseMoveForAxis("y")},this.onMouseLeave=function(){e.onMouseMove.cancel(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseLeaveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseLeaveForAxis("y"),e.mouseX=-1,e.mouseY=-1},this._onWindowResize=function(){e.scrollbarWidth=e.getScrollbarWidth(),e.hideNativeScrollbar()},this.onPointerEvent=function(s){if(!(!e.axis.x.track.el||!e.axis.y.track.el||!e.axis.x.scrollbar.el||!e.axis.y.scrollbar.el)){var l,o;e.axis.x.track.rect=e.axis.x.track.el.getBoundingClientRect(),e.axis.y.track.rect=e.axis.y.track.el.getBoundingClientRect(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&(l=e.isWithinBounds(e.axis.x.track.rect)),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&(o=e.isWithinBounds(e.axis.y.track.rect)),(l||o)&&(s.stopPropagation(),s.type==="pointerdown"&&s.pointerType!=="touch"&&(l&&(e.axis.x.scrollbar.rect=e.axis.x.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.x.scrollbar.rect)?e.onDragStart(s,"x"):e.onTrackClick(s,"x")),o&&(e.axis.y.scrollbar.rect=e.axis.y.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.y.scrollbar.rect)?e.onDragStart(s,"y"):e.onTrackClick(s,"y"))))}},this.drag=function(s){var l,o,n,c,h,m,d,g,p,C,x;if(!(!e.draggedAxis||!e.contentWrapperEl)){var O,y=e.axis[e.draggedAxis].track,w=(o=(l=y.rect)===null||l===void 0?void 0:l[e.axis[e.draggedAxis].sizeAttr])!==null&&o!==void 0?o:0,P=e.axis[e.draggedAxis].scrollbar,$=(c=(n=e.contentWrapperEl)===null||n===void 0?void 0:n[e.axis[e.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,D=parseInt((m=(h=e.elStyles)===null||h===void 0?void 0:h[e.axis[e.draggedAxis].sizeAttr])!==null&&m!==void 0?m:"0px",10);s.preventDefault(),s.stopPropagation(),e.draggedAxis==="y"?O=s.pageY:O=s.pageX;var u=O-((g=(d=y.rect)===null||d===void 0?void 0:d[e.axis[e.draggedAxis].offsetAttr])!==null&&g!==void 0?g:0)-e.axis[e.draggedAxis].dragOffset;u=e.draggedAxis==="x"&&e.isRtl?((C=(p=y.rect)===null||p===void 0?void 0:p[e.axis[e.draggedAxis].sizeAttr])!==null&&C!==void 0?C:0)-P.size-u:u;var E=u/(w-P.size),S=E*($-D);e.draggedAxis==="x"&&e.isRtl&&(S=!((x=i.getRtlHelpers())===null||x===void 0)&&x.isScrollingToNegative?-S:S),e.contentWrapperEl[e.axis[e.draggedAxis].scrollOffsetAttr]=S}},this.onEndDrag=function(s){e.isDragging=!1;var l=X(e.el),o=A(e.el);s.preventDefault(),s.stopPropagation(),k(e.el,e.classNames.dragging),e.onStopScrolling(),l.removeEventListener("mousemove",e.drag,!0),l.removeEventListener("mouseup",e.onEndDrag,!0),e.removePreventClickId=o.setTimeout(function(){l.removeEventListener("click",e.preventClick,!0),l.removeEventListener("dblclick",e.preventClick,!0),e.removePreventClickId=null})},this.preventClick=function(s){s.preventDefault(),s.stopPropagation()},this.el=t,this.options=L(L({},i.defaultOptions),r),this.classNames=L(L({},i.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=He(this._onMouseMove,64),this.onWindowResize=H(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=H(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=H(this._onMouseEntered,this.stopScrollDelay),this.init()}return a(i,"SimpleBarCore"),i.getRtlHelpers=function(){if(i.rtlHelpers)return i.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=t.firstElementChild,e=r?.firstElementChild;if(!e)return null;document.body.appendChild(r),r.scrollLeft=0;var s=i.getOffset(r),l=i.getOffset(e);r.scrollLeft=-999;var o=i.getOffset(e);return document.body.removeChild(r),i.rtlHelpers={isScrollOriginAtZero:s.left!==l.left,isScrollingToNegative:l.left!==o.left},i.rtlHelpers},i.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:te()}catch{return te()}},i.getOffset=function(t){var r=t.getBoundingClientRect(),e=X(t),s=A(t);return{top:r.top+(s.pageYOffset||e.documentElement.scrollTop),left:r.left+(s.pageXOffset||e.documentElement.scrollLeft)}},i.prototype.init=function(){U&&(this.initDOM(),this.rtlHelpers=i.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},i.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(v(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(v(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(v(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(v(this.classNames.offset)),this.maskEl=this.el.querySelector(v(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,v(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(v(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(v(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(v(this.classNames.track)).concat(v(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(v(this.classNames.track)).concat(v(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(v(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(v(this.classNames.scrollbar)))||null,this.options.autoHide||(W(this.axis.x.scrollbar.el,this.classNames.visible),W(this.axis.y.scrollbar.el,this.classNames.visible))},i.prototype.initListeners=function(){var t=this,r,e=A(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var s=!1,l=e.ResizeObserver||ResizeObserver;this.resizeObserver=new l(function(){s&&e.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame(function(){s=!0})}this.mutationObserver=new e.MutationObserver(function(){e.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},i.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=A(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,e=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1||r>0,l=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,n=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=s?"".concat(r||h,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var m=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&h>r,this.axis.y.isOverflowing=c>m,this.axis.x.isOverflowing=o==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=n==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var d=this.axis.x.isOverflowing?this.scrollbarWidth:0,g=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>l-g,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>m-d,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},i.prototype.getScrollbarSize=function(t){var r,e;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var s=this.contentEl[this.axis[t].scrollSizeAttr],l=(e=(r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])!==null&&e!==void 0?e:0,o=l/s,n;return n=Math.max(~~(o*l),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(n=Math.min(n,this.options.scrollbarMaxSize)),n},i.prototype.positionScrollbar=function(t){var r,e,s;t===void 0&&(t="y");var l=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!l.el||!this.elStyles)){var o=this.contentWrapperEl[this.axis[t].scrollSizeAttr],n=((r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[t].sizeAttr],10),h=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];h=t==="x"&&this.isRtl&&(!((e=i.getRtlHelpers())===null||e===void 0)&&e.isScrollOriginAtZero)?-h:h,t==="x"&&this.isRtl&&(h=!((s=i.getRtlHelpers())===null||s===void 0)&&s.isScrollingToNegative?h:-h);var m=h/(o-c),d=~~((n-l.size)*m);d=t==="x"&&this.isRtl?-d+(n-l.size):d,l.el.style.transform=t==="x"?"translate3d(".concat(d,"px, 0, 0)"):"translate3d(0, ".concat(d,"px, 0)")}},i.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var r=this.axis[t].track.el,e=this.axis[t].scrollbar.el;!r||!e||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?e.style.display="block":e.style.display="none")},i.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(W(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},i.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(k(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},i.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},i.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var r=this.axis[t];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(t),W(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?W(r.scrollbar.el,this.classNames.hover):k(r.scrollbar.el,this.classNames.hover)):(k(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},i.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),k(this.axis[t].track.el,this.classNames.hover),k(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},i.prototype.onDragStart=function(t,r){var e;r===void 0&&(r="y"),this.isDragging=!0;var s=X(this.el),l=A(this.el),o=this.axis[r].scrollbar,n=r==="y"?t.pageY:t.pageX;this.axis[r].dragOffset=n-(((e=o.rect)===null||e===void 0?void 0:e[this.axis[r].offsetAttr])||0),this.draggedAxis=r,W(this.el,this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(l.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},i.prototype.onTrackClick=function(t,r){var e=this,s,l,o,n;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var h=A(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var m=this.axis[r].scrollbar,d=(l=(s=m.rect)===null||s===void 0?void 0:s[this.axis[r].offsetAttr])!==null&&l!==void 0?l:0,g=parseInt((n=(o=this.elStyles)===null||o===void 0?void 0:o[this.axis[r].sizeAttr])!==null&&n!==void 0?n:"0px",10),p=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],C=r==="y"?this.mouseY-d:this.mouseX-d,x=C<0?-1:1,O=x===-1?p-g:p+g,y=40,w=a(function(){e.contentWrapperEl&&(x===-1?p>O&&(p-=y,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=p,h.requestAnimationFrame(w)):p<O&&(p+=y,e.contentWrapperEl[e.axis[r].scrollOffsetAttr]=p,h.requestAnimationFrame(w)))},"scrollTo");w()}},i.prototype.getContentElement=function(){return this.contentEl},i.prototype.getScrollElement=function(){return this.contentWrapperEl},i.prototype.removeListeners=function(){var t=A(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},i.prototype.unMount=function(){this.removeListeners()},i.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},i.prototype.findChild=function(t,r){var e=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(s){return e.call(s,r)})[0]},i.rtlHelpers=null,i.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},i.getOptions=Ve,i.helpers=Be,i})(),Y=a(function(i,t){return Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])},Y(i,t)},"extendStatics");function je(i,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Y(i,t);function r(){this.constructor=i}a(r,"__"),i.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}a(je,"__extends");var Q=B.helpers,q=Q.getOptions,b=Q.addClasses,$e=Q.canUseDOM,F=(function(i){je(t,i);function t(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var s=i.apply(this,r)||this;return t.instances.set(r[0],s),s}return a(t,"SimpleBar"),t.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(r){r.getAttribute("data-simplebar")!=="init"&&!t.instances.has(r)&&new t(r,q(r.attributes))})},t.removeObserver=function(){var r;(r=t.globalObserver)===null||r===void 0||r.disconnect()},t.prototype.initDOM=function(){var r=this,e,s,l;if(!Array.prototype.filter.call(this.el.children,function(c){return c.classList.contains(r.classNames.wrapper)}).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),b(this.wrapperEl,this.classNames.wrapper),b(this.contentWrapperEl,this.classNames.contentWrapper),b(this.offsetEl,this.classNames.offset),b(this.maskEl,this.classNames.mask),b(this.contentEl,this.classNames.contentEl),b(this.placeholderEl,this.classNames.placeholder),b(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),b(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),(e=this.contentWrapperEl)===null||e===void 0||e.setAttribute("tabindex",this.options.tabIndex.toString()),(s=this.contentWrapperEl)===null||s===void 0||s.setAttribute("role","region"),(l=this.contentWrapperEl)===null||l===void 0||l.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var o=document.createElement("div"),n=document.createElement("div");b(o,this.classNames.track),b(n,this.classNames.scrollbar),o.appendChild(n),this.axis.x.track.el=o.cloneNode(!0),b(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=o.cloneNode(!0),b(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}B.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},t.prototype.unMount=function(){B.prototype.unMount.call(this),t.instances.delete(this.el)},t.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver<"u"&&(this.globalObserver=new MutationObserver(t.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},t.handleMutations=function(r){r.forEach(function(e){e.addedNodes.forEach(function(s){s.nodeType===1&&(s.hasAttribute("data-simplebar")?!t.instances.has(s)&&document.documentElement.contains(s)&&new t(s,q(s.attributes)):s.querySelectorAll("[data-simplebar]").forEach(function(l){l.getAttribute("data-simplebar")!=="init"&&!t.instances.has(l)&&document.documentElement.contains(l)&&new t(l,q(l.attributes))}))}),e.removedNodes.forEach(function(s){var l;s.nodeType===1&&(s.getAttribute("data-simplebar")==="init"?!document.documentElement.contains(s)&&((l=t.instances.get(s))===null||l===void 0||l.unMount()):Array.prototype.forEach.call(s.querySelectorAll('[data-simplebar="init"]'),function(o){var n;!document.documentElement.contains(o)&&((n=t.instances.get(o))===null||n===void 0||n.unMount())}))})})},t.instances=new WeakMap,t})(B);$e&&F.initHtmlApi();var Ie=Object.defineProperty,Xe=Object.getOwnPropertyDescriptor,N=a((i,t,r,e)=>{for(var s=e>1?void 0:e?Xe(t,r):t,l=i.length-1,o;l>=0;l--)(o=i[l])&&(s=(e?o(t,r,s):o(s))||s);return e&&s&&Ie(t,r,s),s},"__decorateClass"),_;let M=(_=class extends T.BaseComponent{autoHide=!1;color="#494747";margin="auto";width="7px";direction="ltr";randomClass="";simpleBar=null;mounted(){this.randomClass="scrollbar-c"+this.VST.generateRandomKey(),this.simpleBar=new F(this.$refs.scrollContainer,{autoHide:this.autoHide,direction:this.direction})}beforeMount(){F.removeObserver()}},a(_,"Scrollbar"),_);N([T.Prop(Boolean)],M.prototype,"autoHide",2);N([T.Prop(String)],M.prototype,"color",2);N([T.Prop(String)],M.prototype,"margin",2);N([T.Prop(String)],M.prototype,"width",2);N([T.Prop(String)],M.prototype,"direction",2);M=N([T.VST],M);const qe=["data-simplebar-auto-hide","data-simplebar-direction"];function Ye(i,t,r,e,s,l){return f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["user-select-auto!",{[i.randomClass]:!0}]),"data-simplebar-auto-hide":i.VST.$reactive.isMobile||i.autoHide?"true":"false","data-simplebar-direction":i.direction,"data-simplebar":"",ref:"scrollContainer"},[f.renderSlot(i.$slots,"default"),(f.openBlock(),f.createBlock(f.resolveDynamicComponent("style"),null,{default:f.withCtx(()=>[f.createTextVNode("."+f.toDisplayString(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar::before { background-color: "+f.toDisplayString(i.color)+" !important; margin: "+f.toDisplayString(i.margin)+" !important; cursor: grabbing !important; width: "+f.toDisplayString(i.width)+" !important; } ."+f.toDisplayString(i.randomClass)+" > .simplebar-track > .simplebar-scrollbar:hover::before { background-color: "+f.toDisplayString(i.color)+" !important; margin: "+f.toDisplayString(i.margin)+" !important; cursor: grab !important; width: "+f.toDisplayString(i.width)+" !important; }",1)]),_:1}))],10,qe)}a(Ye,"render");const Fe=ue._export_sfc(M,[["render",Ye]]);exports.default=Fe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var It=Object.defineProperty;var r=(t,e)=>It(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-BbcNgwWy.cjs"),Nt=require("./FieldComponent.vue_vue_type_script_lang-x1KgzKHr.cjs"),T=require("vue"),Et=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");var gt="​";function it(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(it,"e");function ht(t){return(function(e){if(Array.isArray(e))return it(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return it(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);return s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set"?Array.from(s):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?it(e,i):void 0}})(t)||(function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(ht,"i");var K={isEnabled:r(function(){var t;return(t=window.TAGIFY_DEBUG)===null||t===void 0||t},"isEnabled"),log:r(function(){for(var t,e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];this.isEnabled()&&(t=console).log.apply(t,["[Tagify]:"].concat(ht(i)))},"log"),warn:r(function(){for(var t,e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];this.isEnabled()&&(t=console).warn.apply(t,["[Tagify]:"].concat(ht(i)))},"warn")},Q=r(function(t,e,i,s){return t=""+t,e=""+e,s&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase()},"a"),pt=r(function(t,e){return t&&Array.isArray(t)&&t.map(function(i){return ut(i,e)})},"s");function ut(t,e){var i,s={};for(i in t)0>e.indexOf(i)&&(s[i]=t[i]);return s}r(ut,"o");function st(t){return new DOMParser().parseFromString(t.trim(),"text/html").body.firstElementChild}r(st,"r");function ft(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(t.nodeType==3)return t}r(ft,"l");function $(t){return typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/`|'/g,"'"):t}r($,"d");function L(t){var e=Object.prototype.toString.call(t).split(" ")[1].slice(0,-1);return t===Object(t)&&e!="Array"&&e!="Function"&&e!="RegExp"&&e!="HTMLUnknownElement"}r(L,"c");function I(t,e,i){var s,a;function n(o,l){for(var d in l)if(l.hasOwnProperty(d)){if(L(l[d])){L(o[d])?n(o[d],l[d]):o[d]=Object.assign({},l[d]);continue}if(Array.isArray(l[d])){o[d]=Object.assign([],l[d]);continue}o[d]=l[d]}}return r(n,"ts"),s=t,((a=Object)!=null&&typeof Symbol<"u"&&a[Symbol.hasInstance]?a[Symbol.hasInstance](s):s instanceof a)||(t={}),n(t,e),i&&n(t,i),t}r(I,"u");function mt(){var t=[],e={},i=!0,s=!1,a=void 0;try{for(var n,o=arguments[Symbol.iterator]();!(i=(n=o.next()).done);i=!0){var l=n.value,d=!0,u=!1,h=void 0;try{for(var g,c=l[Symbol.iterator]();!(d=(g=c.next()).done);d=!0){var f=g.value;L(f)?e[f.value]||(t.push(f),e[f.value]=1):t.includes(f)||t.push(f)}}catch(p){u=!0,h=p}finally{try{d||c.return==null||c.return()}finally{if(u)throw h}}}}catch(p){s=!0,a=p}finally{try{i||o.return==null||o.return()}finally{if(s)throw a}}return t}r(mt,"g");function Y(t){return String.prototype.normalize?typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}r(Y,"h");var vt=r(function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)},"p");function yt(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)})}r(yt,"f");function z(t){var e,i=St.call(this,t),s=t==null||(e=t.classList)===null||e===void 0?void 0:e.contains(this.settings.classNames.tag);return i&&s}r(z,"v");function bt(t){return St.call(this,t)&&t?.closest(this.settings.classNames.tagSelector)}r(bt,"m");function St(t){var e;return(t==null||(e=t.closest)===null||e===void 0?void 0:e.call(t,this.settings.classNames.namespaceSelector))===this.DOM.scope}r(St,"b");function xt(t,e){var i=window.getSelection();return e=e||i.getRangeAt(0),typeof t=="string"&&(t=document.createTextNode(t)),e&&(e.deleteContents(),e.insertNode(t)),t}r(xt,"y");function w(t,e,i){return t?(e&&(t.__tagifyTagData=i?e:I({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(K.warn("tag element doesn't exist",{tagElm:t,data:e}),e)}r(w,"w");function F(t){if(t&&t.parentNode){var e=window.getSelection(),i=e.getRangeAt(0);e.rangeCount&&(i.setStartAfter(t),i.collapse(!0),e.removeAllRanges(),e.addRange(i))}}r(F,"T");function ct(t,e){t.forEach(function(i){if(w(i.previousSibling)||!i.previousSibling){var s=document.createTextNode("");i.before(s),e&&F(s)}})}r(ct,"O");var at={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,addTagOn:["blur","tab","enter"],onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,focusable:!0,focusInputOnRemove:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:r(function(){},"transformTag"),trim:!0,a11y:{focusableTags:!1,inputAriaLabel:"Tags input field"},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1,tabKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownItemSelected:"tagify__dropdown__item--selected",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,escapeHTML:!0,highlightFirst:!0,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:r(function(){return Promise.resolve()},"beforeRemoveTag"),beforePaste:r(function(){return Promise.resolve()},"beforePaste"),suggestionClick:r(function(){return Promise.resolve()},"suggestionClick"),beforeKeyDown:r(function(){return Promise.resolve()},"beforeKeyDown")}};function Mt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Mt,"D");function At(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},s=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),s.forEach(function(a){Mt(t,a,i[a])})}return t}r(At,"S");function _t(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);a.push.apply(a,n)}return a})(Object(e)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}r(_t,"I");function nt(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(nt,"E");function Ct(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Ct,"M");function kt(t){return(function(e){if(Array.isArray(e))return nt(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return nt(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);return s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set"?Array.from(s):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?nt(e,i):void 0}})(t)||(function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(kt,"N");function Vt(){for(var t in this.dropdown={},this._dropdown)this.dropdown[t]=typeof this._dropdown[t]=="function"?this._dropdown[t].bind(this):this._dropdown[t];this.dropdown.refs(),this.DOM.dropdown.__tagify=this}r(Vt,"A");var Z,X,Lt=(Z=(function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},s=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),s.forEach(function(a){Ct(t,a,i[a])})}return t})({},{events:{binding:r(function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],e=this.dropdown.events.callbacks,i=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:e.onKeyDown.bind(this),onMouseOver:e.onMouseOver.bind(this),onMouseLeave:e.onMouseLeave.bind(this),onClick:e.onClick.bind(this),onScroll:e.onScroll.bind(this)},s=t?"addEventListener":"removeEventListener";this.settings.dropdown.position!="manual"&&(document[s]("scroll",i.position,!0),window[s]("resize",i.position),window[s]("keydown",i.onKeyDown)),this.DOM.dropdown[s]("mouseover",i.onMouseOver),this.DOM.dropdown[s]("mouseleave",i.onMouseLeave),this.DOM.dropdown[s]("mousedown",i.onClick),this.DOM.dropdown.content[s]("scroll",i.onScroll)},"binding"),callbacks:{onKeyDown:r(function(t){var e=this;if(this.state.hasFocus&&!this.state.composing){var i=this.settings,s=i.dropdown.includeSelectedTags,a=this.DOM.dropdown.querySelector(i.classNames.dropdownItemActiveSelector),n=this.dropdown.getSuggestionDataByNode(a),o=i.mode=="mix",l=i.mode=="select";i.hooks.beforeKeyDown(t,{tagify:this}).then(function(d){switch(t.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":t.preventDefault();var u=e.dropdown.getAllSuggestionsRefs(),h=t.key=="ArrowUp"||t.key=="Up";a&&(a=e.dropdown.getNextOrPrevOption(a,!h)),a&&a.matches(i.classNames.dropdownItemSelector)||(a=u[h?u.length-1:0]),e.dropdown.highlightOption(a,!0);break;case"PageUp":case"PageDown":t.preventDefault();var g,c=e.dropdown.getAllSuggestionsRefs(),f=Math.floor(e.DOM.dropdown.content.clientHeight/((g=c[0])===null||g===void 0?void 0:g.offsetHeight))||1,p=t.key==="PageUp";if(a){var m=c.indexOf(a);a=c[p?Math.max(0,m-f):Math.min(c.length-1,m+f)]}else a=c[0];e.dropdown.highlightOption(a,!0);break;case"Home":case"End":t.preventDefault();var v=e.dropdown.getAllSuggestionsRefs();a=v[t.key==="Home"?0:v.length-1],e.dropdown.highlightOption(a,!0);break;case"Escape":case"Esc":e.dropdown.hide();break;case"ArrowRight":if(e.state.actions.ArrowLeft||i.autoComplete.rightKey)return;case"Tab":var y=!i.autoComplete.rightKey||!i.autoComplete.tabKey;if(!o&&!l&&a&&y&&!e.state.editing&&n){t.preventDefault();var x=e.dropdown.getMappedValue(n);return e.state.autoCompleteData=n,e.input.autocomplete.set.call(e,x),!1}return!0;case"Enter":t.preventDefault(),e.state.actions.selectOption=!0,setTimeout(function(){return e.state.actions.selectOption=!1},100),i.hooks.suggestionClick(t,{tagify:e,tagData:n,suggestionElm:a}).then(function(){if(a){var b=s?a:e.dropdown.getNextOrPrevOption(a,!h);e.dropdown.selectOption(a,t,function(){if(b){var D=b.getAttribute("value");b=e.dropdown.getSuggestionNodeByValue(D),e.dropdown.highlightOption(b)}})}else e.dropdown.hide(),o||e.addTags(e.state.inputText.trim(),!0)}).catch(function(b){return K.warn(b)});break;case"Backspace":if(o||e.state.editing.scope)return;var O=e.input.raw.call(e);O!=""&&O.charCodeAt(0)!=8203||(i.backspace===!0?e.removeTags():i.backspace=="edit"&&setTimeout(e.editTag.bind(e),0))}})}},"onKeyDown"),onMouseOver:r(function(t){var e=t.target.closest(this.settings.classNames.dropdownItemSelector);this.dropdown.highlightOption(e)},"onMouseOver"),onMouseLeave:r(function(t){this.dropdown.highlightOption()},"onMouseLeave"),onClick:r(function(t){var e=this;if(t.button==0&&t.target!=this.DOM.dropdown&&t.target!=this.DOM.dropdown.content){var i=t.target.closest(this.settings.classNames.dropdownItemSelector),s=this.dropdown.getSuggestionDataByNode(i);this.state.actions.selectOption=!0,setTimeout(function(){return e.state.actions.selectOption=!1},100),this.settings.hooks.suggestionClick(t,{tagify:this,tagData:s,suggestionElm:i}).then(function(){i?e.dropdown.selectOption(i,t):e.dropdown.hide()}).catch(function(a){return K.warn(a)})}},"onClick"),onScroll:r(function(t){var e=t.target,i=e.scrollTop/(e.scrollHeight-e.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(i)})},"onScroll")}},refilter:r(function(t){t=t||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(t),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},"refilter"),getSuggestionDataByNode:r(function(t){for(var e,i=t&&t.getAttribute("value"),s=this.suggestedListItems.length;s--;){if(L(e=this.suggestedListItems[s])&&e.value==i)return e;if(e==i)return{value:e}}},"getSuggestionDataByNode"),getSuggestionNodeByValue:r(function(t){return this.dropdown.getAllSuggestionsRefs().find(function(e){return e.getAttribute("value")===t})},"getSuggestionNodeByValue"),getNextOrPrevOption:r(function(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.dropdown.getAllSuggestionsRefs(),s=i.findIndex(function(a){return a===t});return e?i[s+1]:i[s-1]},"getNextOrPrevOption"),highlightOption:r(function(t,e){var i,s=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(s),this.state.ddItemElm.removeAttribute("aria-selected")),!t)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);i=this.dropdown.getSuggestionDataByNode(t),this.state.ddItemData=i,this.state.ddItemElm=t,t.classList.add(s),t.setAttribute("aria-selected",!0),e&&(t.parentNode.scrollTop=t.clientHeight+t.offsetTop-t.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,i),this.dropdown.position())},"highlightOption"),selectOption:r(function(t,e,i){var s=this,a=this.settings,n=a.dropdown.includeSelectedTags,o=a.dropdown,l=o.clearOnSelect,d=o.closeOnSelect;if(!t)return this.addTags(this.state.inputText,!0),void(d&&this.dropdown.hide());e=e||{};var u=t.getAttribute("value"),h=a.mode=="mix",g=this.suggestedListItems.find(function(f){var p;return((p=f.value)!==null&&p!==void 0?p:f)==u});if(this.trigger("dropdown:select",{data:g,elm:t,event:e}),g||u=="noMatch"){if(this.state.editing){var c=this.normalizeTags([g])[0];g=a.transformTag.call(this,c)||c,this.onEditTagDone(null,I({__isValid:!0},g))}else this[h?"addMixTags":"addTags"]([g||this.input.raw.call(this)],l);(h||this.DOM.input.parentNode)&&(setTimeout(function(){s.DOM.input.focus(),s.toggleFocusClass(!0)}),d&&setTimeout(this.dropdown.hide.bind(this)),n?i&&i():(t.addEventListener("transitionend",function(){s.dropdown.fillHeaderFooter(),setTimeout(function(){t.remove(),s.dropdown.refilter(),i&&i()},100)},{once:!0}),t.classList.add(this.settings.classNames.dropdownItemHidden)))}else d&&setTimeout(this.dropdown.hide.bind(this))},"selectOption"),selectAll:r(function(t){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var e=this.dropdown.filterListItems("");return t||(e=this.state.dropdown.suggestions),this.addTags(e,!0),this},"selectAll"),filterListItems:r(function(t,e){var i,s,a,n,o,l,d=r(function(){var D,P,_=void 0,j=void 0;D=p[O];var S,N=Object.keys(s=((P=Object)!=null&&typeof Symbol<"u"&&P[Symbol.hasInstance]?P[Symbol.hasInstance](D):D instanceof P)?p[O]:{value:p[O]}).some(function(E){return x.includes(E)})?x:["value"];g.fuzzySearch&&!e.exact?(n=N.reduce(function(E,M){return E+" "+(s[M]||"")},"").toLowerCase().trim(),g.accentedSearch&&(n=Y(n),l=Y(l)),_=n.indexOf(l)==0,j=n===l,S=n,a=l.toLowerCase().split(" ").every(function(E){return S.includes(E.toLowerCase())})):(_=!0,a=N.some(function(E){var M=""+(s[E]||"");return g.accentedSearch&&(M=Y(M),l=Y(l)),g.caseSensitive||(M=M.toLowerCase()),j=M===l,e.exact?M===l:M.indexOf(l)==0})),o=!g.includeSelectedTags&&i.isTagDuplicate(L(s)?s.value:s),a&&!o&&(j&&_?f.push(s):g.sortby=="startsWith"&&_?c.unshift(s):c.push(s))},"tr"),u=this,h=this.settings,g=h.dropdown,c=(e=e||{},[]),f=[],p=h.whitelist,m=g.maxItems>=0?g.maxItems:1/0,v=g.includeSelectedTags,y=typeof g.sortby=="function",x=g.searchKeys,O=0;if(!(t=h.mode=="select"&&this.value.length&&this.value[0][h.tagTextProp]==t?"":t)||!x.length){c=v?p:p.filter(function(D){return!u.isTagDuplicate(L(D)?D.value:D)});var b=y?g.sortby(c,l):c.slice(0,m);return this.state.dropdown.suggestions=b,b}for(l=g.caseSensitive?""+t:(""+t).toLowerCase();O<p.length;O++)i=this,d();return this.state.dropdown.suggestions=f.concat(c),b=y?g.sortby(f.concat(c),l):f.concat(c).slice(0,m),this.state.dropdown.suggestions=b,b},"filterListItems"),getMappedValue:r(function(t){var e=this.settings.dropdown.mapValueTo;return e?typeof e=="function"?e(t):t[e]||t.value:t.value},"getMappedValue"),createListHTML:r(function(t){var e=this;return I([],t).map(function(i,s){typeof i!="string"&&typeof i!="number"||(i={value:i});var a=e.dropdown.getMappedValue(i);return a=typeof a=="string"&&e.settings.dropdown.escapeHTML?$(a):a,e.settings.templates.dropdownItem.apply(e,[_t(At({},i),{mappedValue:a}),e])}).join("")},"createListHTML")}),X=X={refs:r(function(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},"refs"),getHeaderRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},"getHeaderRef"),getFooterRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},"getFooterRef"),getAllSuggestionsRefs:r(function(){return kt(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},"getAllSuggestionsRefs"),show:r(function(t){var e,i,s,a=this,n=this.settings,o=n.mode=="mix"&&!n.enforceWhitelist,l=!n.whitelist||!n.whitelist.length,d=n.dropdown.position=="manual";if(t=t===void 0?this.state.inputText:t,!(l&&!o&&!n.templates.dropdownItemNoMatch||n.dropdown.enabled===!1||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(t),t&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",t),n.templates.dropdownItemNoMatch&&(s=n.templates.dropdownItemNoMatch.call(this,{value:t}))),!s){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!Q(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!o||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:t}]}i=""+(L(e=this.suggestedListItems[0])?e.value:e),n.autoComplete&&i&&i.indexOf(t)==0&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(s),n.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(n.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=t||!0,this.state.dropdown.query=t,this.setStateSelection(),d||setTimeout(function(){a.dropdown.position(),a.dropdown.render()}),setTimeout(function(){a.trigger("dropdown:show",a.DOM.dropdown)})}},"show"),hide:r(function(t){var e=this,i=this.DOM,s=i.scope,a=i.dropdown,n=this.settings.dropdown.position=="manual"&&!t;if(a&&document.body.contains(a)&&!n)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),s.setAttribute("aria-expanded",!1),a.parentNode.removeChild(a),setTimeout(function(){e.state.dropdown.visible=!1},100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",a),this},"hide"),toggle:r(function(t){this.dropdown[this.state.dropdown.visible&&!t?"hide":"show"]()},"toggle"),getAppendTarget:r(function(){var t=this.settings.dropdown;return typeof t.appendTarget=="function"?t.appendTarget():t.appendTarget},"getAppendTarget"),render:r(function(){var t,e,i=this,s=((e=this.DOM.dropdown.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(e),t=e.clientHeight,e.parentNode.removeChild(e),t),a=this.settings,n=this.dropdown.getAppendTarget();return a.dropdown.enabled===!1||(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(a.classNames.dropdownInital),this.dropdown.position(s),n.appendChild(this.DOM.dropdown),setTimeout(function(){return i.DOM.dropdown.classList.remove(a.classNames.dropdownInital)}))),this},"render"),fill:r(function(t){t=typeof t=="string"?t:this.dropdown.createListHTML(t||this.suggestedListItems);var e,i=this.settings.templates.dropdownContent.call(this,t);this.DOM.dropdown.content.innerHTML=(e=i)?e.replace(/\>[\r\n ]+\</g,"><").split(/>\s+</).join("><").trim():""},"fill"),fillHeaderFooter:r(function(){var t=this.dropdown.filterListItems(this.state.dropdown.query),e=this.parseTemplate("dropdownHeader",[t]),i=this.parseTemplate("dropdownFooter",[t]),s=this.dropdown.getHeaderRef(),a=this.dropdown.getFooterRef();e&&s?.parentNode.replaceChild(e,s),i&&a?.parentNode.replaceChild(i,a)},"fillHeaderFooter"),position:r(function(t){var e=this.settings.dropdown,i=this.dropdown.getAppendTarget();if(e.position!="manual"&&i){var s,a,n,o,l,d,u,h,g,c,f=this.DOM.dropdown,p=e.RTL,m=i===document.body,v=i===this.DOM.scope,y=m?window.pageYOffset:i.scrollTop,x=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,O=x.clientHeight,b=Math.max(x.clientWidth||0,window.innerWidth||0),D=b>480?e.position:"all",P=this.DOM[D=="input"?"input":"scope"];if(t=t||f.clientHeight,this.state.dropdown.visible){if(D=="text"?(n=(s=(function(){var S=document.getSelection();if(S.rangeCount){var N,E,M=S.getRangeAt(0),R=M.startContainer,V=M.startOffset;if(V>0)return(E=document.createRange()).setStart(R,V-1),E.setEnd(R,V),{left:(N=E.getBoundingClientRect()).right,top:N.top,bottom:N.bottom};if(R.getBoundingClientRect)return R.getBoundingClientRect()}return{left:-9999,top:-9999}})()).bottom,a=s.top,o=s.left,l="auto"):(d=(function(S){var N=0,E=0;for(S=S.parentNode;S&&S!=x;)N+=S.offsetTop||0,E+=S.offsetLeft||0,S=S.parentNode;return{top:N,left:E}})(i),s=P.getBoundingClientRect(),a=v?-1:s.top-d.top,n=(v?s.height:s.bottom-d.top)-1,o=v?-1:s.left-d.left,l=s.width+"px"),!m){var _,j=(function(){for(var S=0,N=e.appendTarget.parentNode;N;)S+=N.scrollTop||0,N=N.parentNode;return S})();a+=j,n+=j}a=Math.floor(a),n=Math.ceil(n),h=b-o<120,g=((u=(_=e.placeAbove)!==null&&_!==void 0?_:O-s.bottom<t)?a:n)+y,c=o+(p&&s.width||0)+window.pageXOffset,c=D=="text"&&h?"right: 0;":"left: ".concat(c,"px;"),f.style.cssText="".concat(c," top: ").concat(g,"px; min-width: ").concat(l,"; max-width: ").concat(l),f.setAttribute("placement",u?"top":"bottom"),f.setAttribute("position",D)}}},"position")},Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(X)):(function(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);i.push.apply(i,s)}return i})(Object(X)).forEach(function(t){Object.defineProperty(Z,t,Object.getOwnPropertyDescriptor(X,t))}),Z),G="@yaireo/tagify/",Pt={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},jt={wrapper:r(function(t,e){return'<tags class="'.concat(e.classNames.namespace," ").concat(e.mode?"".concat(e.classNames[e.mode+"Mode"]):""," ").concat(t.className,`"
|
|
1
|
+
"use strict";var It=Object.defineProperty;var r=(t,e)=>It(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-OLIPwsTz.cjs"),Nt=require("./FieldComponent.vue_vue_type_script_lang-BsagC47A.cjs"),T=require("vue"),Et=require("./_plugin-vue_export-helper-BaHX9ZKS.cjs");var gt="​";function it(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(it,"e");function ht(t){return(function(e){if(Array.isArray(e))return it(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return it(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);return s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set"?Array.from(s):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?it(e,i):void 0}})(t)||(function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(ht,"i");var K={isEnabled:r(function(){var t;return(t=window.TAGIFY_DEBUG)===null||t===void 0||t},"isEnabled"),log:r(function(){for(var t,e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];this.isEnabled()&&(t=console).log.apply(t,["[Tagify]:"].concat(ht(i)))},"log"),warn:r(function(){for(var t,e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];this.isEnabled()&&(t=console).warn.apply(t,["[Tagify]:"].concat(ht(i)))},"warn")},Q=r(function(t,e,i,s){return t=""+t,e=""+e,s&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase()},"a"),pt=r(function(t,e){return t&&Array.isArray(t)&&t.map(function(i){return ut(i,e)})},"s");function ut(t,e){var i,s={};for(i in t)0>e.indexOf(i)&&(s[i]=t[i]);return s}r(ut,"o");function st(t){return new DOMParser().parseFromString(t.trim(),"text/html").body.firstElementChild}r(st,"r");function ft(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(t.nodeType==3)return t}r(ft,"l");function $(t){return typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/`|'/g,"'"):t}r($,"d");function L(t){var e=Object.prototype.toString.call(t).split(" ")[1].slice(0,-1);return t===Object(t)&&e!="Array"&&e!="Function"&&e!="RegExp"&&e!="HTMLUnknownElement"}r(L,"c");function I(t,e,i){var s,a;function n(o,l){for(var d in l)if(l.hasOwnProperty(d)){if(L(l[d])){L(o[d])?n(o[d],l[d]):o[d]=Object.assign({},l[d]);continue}if(Array.isArray(l[d])){o[d]=Object.assign([],l[d]);continue}o[d]=l[d]}}return r(n,"ts"),s=t,((a=Object)!=null&&typeof Symbol<"u"&&a[Symbol.hasInstance]?a[Symbol.hasInstance](s):s instanceof a)||(t={}),n(t,e),i&&n(t,i),t}r(I,"u");function mt(){var t=[],e={},i=!0,s=!1,a=void 0;try{for(var n,o=arguments[Symbol.iterator]();!(i=(n=o.next()).done);i=!0){var l=n.value,d=!0,u=!1,h=void 0;try{for(var g,c=l[Symbol.iterator]();!(d=(g=c.next()).done);d=!0){var f=g.value;L(f)?e[f.value]||(t.push(f),e[f.value]=1):t.includes(f)||t.push(f)}}catch(p){u=!0,h=p}finally{try{d||c.return==null||c.return()}finally{if(u)throw h}}}}catch(p){s=!0,a=p}finally{try{i||o.return==null||o.return()}finally{if(s)throw a}}return t}r(mt,"g");function Y(t){return String.prototype.normalize?typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}r(Y,"h");var vt=r(function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)},"p");function yt(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)})}r(yt,"f");function z(t){var e,i=St.call(this,t),s=t==null||(e=t.classList)===null||e===void 0?void 0:e.contains(this.settings.classNames.tag);return i&&s}r(z,"v");function bt(t){return St.call(this,t)&&t?.closest(this.settings.classNames.tagSelector)}r(bt,"m");function St(t){var e;return(t==null||(e=t.closest)===null||e===void 0?void 0:e.call(t,this.settings.classNames.namespaceSelector))===this.DOM.scope}r(St,"b");function xt(t,e){var i=window.getSelection();return e=e||i.getRangeAt(0),typeof t=="string"&&(t=document.createTextNode(t)),e&&(e.deleteContents(),e.insertNode(t)),t}r(xt,"y");function w(t,e,i){return t?(e&&(t.__tagifyTagData=i?e:I({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(K.warn("tag element doesn't exist",{tagElm:t,data:e}),e)}r(w,"w");function F(t){if(t&&t.parentNode){var e=window.getSelection(),i=e.getRangeAt(0);e.rangeCount&&(i.setStartAfter(t),i.collapse(!0),e.removeAllRanges(),e.addRange(i))}}r(F,"T");function ct(t,e){t.forEach(function(i){if(w(i.previousSibling)||!i.previousSibling){var s=document.createTextNode("");i.before(s),e&&F(s)}})}r(ct,"O");var at={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,addTagOn:["blur","tab","enter"],onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,focusable:!0,focusInputOnRemove:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:r(function(){},"transformTag"),trim:!0,a11y:{focusableTags:!1,inputAriaLabel:"Tags input field"},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1,tabKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownItemSelected:"tagify__dropdown__item--selected",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,escapeHTML:!0,highlightFirst:!0,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:r(function(){return Promise.resolve()},"beforeRemoveTag"),beforePaste:r(function(){return Promise.resolve()},"beforePaste"),suggestionClick:r(function(){return Promise.resolve()},"suggestionClick"),beforeKeyDown:r(function(){return Promise.resolve()},"beforeKeyDown")}};function Mt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Mt,"D");function At(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},s=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),s.forEach(function(a){Mt(t,a,i[a])})}return t}r(At,"S");function _t(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);a.push.apply(a,n)}return a})(Object(e)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}r(_t,"I");function nt(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}r(nt,"E");function Ct(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Ct,"M");function kt(t){return(function(e){if(Array.isArray(e))return nt(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return nt(e,i);var s=Object.prototype.toString.call(e).slice(8,-1);return s==="Object"&&e.constructor&&(s=e.constructor.name),s==="Map"||s==="Set"?Array.from(s):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?nt(e,i):void 0}})(t)||(function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(kt,"N");function Vt(){for(var t in this.dropdown={},this._dropdown)this.dropdown[t]=typeof this._dropdown[t]=="function"?this._dropdown[t].bind(this):this._dropdown[t];this.dropdown.refs(),this.DOM.dropdown.__tagify=this}r(Vt,"A");var Z,X,Lt=(Z=(function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},s=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(i).filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),s.forEach(function(a){Ct(t,a,i[a])})}return t})({},{events:{binding:r(function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],e=this.dropdown.events.callbacks,i=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:e.onKeyDown.bind(this),onMouseOver:e.onMouseOver.bind(this),onMouseLeave:e.onMouseLeave.bind(this),onClick:e.onClick.bind(this),onScroll:e.onScroll.bind(this)},s=t?"addEventListener":"removeEventListener";this.settings.dropdown.position!="manual"&&(document[s]("scroll",i.position,!0),window[s]("resize",i.position),window[s]("keydown",i.onKeyDown)),this.DOM.dropdown[s]("mouseover",i.onMouseOver),this.DOM.dropdown[s]("mouseleave",i.onMouseLeave),this.DOM.dropdown[s]("mousedown",i.onClick),this.DOM.dropdown.content[s]("scroll",i.onScroll)},"binding"),callbacks:{onKeyDown:r(function(t){var e=this;if(this.state.hasFocus&&!this.state.composing){var i=this.settings,s=i.dropdown.includeSelectedTags,a=this.DOM.dropdown.querySelector(i.classNames.dropdownItemActiveSelector),n=this.dropdown.getSuggestionDataByNode(a),o=i.mode=="mix",l=i.mode=="select";i.hooks.beforeKeyDown(t,{tagify:this}).then(function(d){switch(t.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":t.preventDefault();var u=e.dropdown.getAllSuggestionsRefs(),h=t.key=="ArrowUp"||t.key=="Up";a&&(a=e.dropdown.getNextOrPrevOption(a,!h)),a&&a.matches(i.classNames.dropdownItemSelector)||(a=u[h?u.length-1:0]),e.dropdown.highlightOption(a,!0);break;case"PageUp":case"PageDown":t.preventDefault();var g,c=e.dropdown.getAllSuggestionsRefs(),f=Math.floor(e.DOM.dropdown.content.clientHeight/((g=c[0])===null||g===void 0?void 0:g.offsetHeight))||1,p=t.key==="PageUp";if(a){var m=c.indexOf(a);a=c[p?Math.max(0,m-f):Math.min(c.length-1,m+f)]}else a=c[0];e.dropdown.highlightOption(a,!0);break;case"Home":case"End":t.preventDefault();var v=e.dropdown.getAllSuggestionsRefs();a=v[t.key==="Home"?0:v.length-1],e.dropdown.highlightOption(a,!0);break;case"Escape":case"Esc":e.dropdown.hide();break;case"ArrowRight":if(e.state.actions.ArrowLeft||i.autoComplete.rightKey)return;case"Tab":var y=!i.autoComplete.rightKey||!i.autoComplete.tabKey;if(!o&&!l&&a&&y&&!e.state.editing&&n){t.preventDefault();var x=e.dropdown.getMappedValue(n);return e.state.autoCompleteData=n,e.input.autocomplete.set.call(e,x),!1}return!0;case"Enter":t.preventDefault(),e.state.actions.selectOption=!0,setTimeout(function(){return e.state.actions.selectOption=!1},100),i.hooks.suggestionClick(t,{tagify:e,tagData:n,suggestionElm:a}).then(function(){if(a){var b=s?a:e.dropdown.getNextOrPrevOption(a,!h);e.dropdown.selectOption(a,t,function(){if(b){var D=b.getAttribute("value");b=e.dropdown.getSuggestionNodeByValue(D),e.dropdown.highlightOption(b)}})}else e.dropdown.hide(),o||e.addTags(e.state.inputText.trim(),!0)}).catch(function(b){return K.warn(b)});break;case"Backspace":if(o||e.state.editing.scope)return;var O=e.input.raw.call(e);O!=""&&O.charCodeAt(0)!=8203||(i.backspace===!0?e.removeTags():i.backspace=="edit"&&setTimeout(e.editTag.bind(e),0))}})}},"onKeyDown"),onMouseOver:r(function(t){var e=t.target.closest(this.settings.classNames.dropdownItemSelector);this.dropdown.highlightOption(e)},"onMouseOver"),onMouseLeave:r(function(t){this.dropdown.highlightOption()},"onMouseLeave"),onClick:r(function(t){var e=this;if(t.button==0&&t.target!=this.DOM.dropdown&&t.target!=this.DOM.dropdown.content){var i=t.target.closest(this.settings.classNames.dropdownItemSelector),s=this.dropdown.getSuggestionDataByNode(i);this.state.actions.selectOption=!0,setTimeout(function(){return e.state.actions.selectOption=!1},100),this.settings.hooks.suggestionClick(t,{tagify:this,tagData:s,suggestionElm:i}).then(function(){i?e.dropdown.selectOption(i,t):e.dropdown.hide()}).catch(function(a){return K.warn(a)})}},"onClick"),onScroll:r(function(t){var e=t.target,i=e.scrollTop/(e.scrollHeight-e.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(i)})},"onScroll")}},refilter:r(function(t){t=t||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(t),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},"refilter"),getSuggestionDataByNode:r(function(t){for(var e,i=t&&t.getAttribute("value"),s=this.suggestedListItems.length;s--;){if(L(e=this.suggestedListItems[s])&&e.value==i)return e;if(e==i)return{value:e}}},"getSuggestionDataByNode"),getSuggestionNodeByValue:r(function(t){return this.dropdown.getAllSuggestionsRefs().find(function(e){return e.getAttribute("value")===t})},"getSuggestionNodeByValue"),getNextOrPrevOption:r(function(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.dropdown.getAllSuggestionsRefs(),s=i.findIndex(function(a){return a===t});return e?i[s+1]:i[s-1]},"getNextOrPrevOption"),highlightOption:r(function(t,e){var i,s=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(s),this.state.ddItemElm.removeAttribute("aria-selected")),!t)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);i=this.dropdown.getSuggestionDataByNode(t),this.state.ddItemData=i,this.state.ddItemElm=t,t.classList.add(s),t.setAttribute("aria-selected",!0),e&&(t.parentNode.scrollTop=t.clientHeight+t.offsetTop-t.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,i),this.dropdown.position())},"highlightOption"),selectOption:r(function(t,e,i){var s=this,a=this.settings,n=a.dropdown.includeSelectedTags,o=a.dropdown,l=o.clearOnSelect,d=o.closeOnSelect;if(!t)return this.addTags(this.state.inputText,!0),void(d&&this.dropdown.hide());e=e||{};var u=t.getAttribute("value"),h=a.mode=="mix",g=this.suggestedListItems.find(function(f){var p;return((p=f.value)!==null&&p!==void 0?p:f)==u});if(this.trigger("dropdown:select",{data:g,elm:t,event:e}),g||u=="noMatch"){if(this.state.editing){var c=this.normalizeTags([g])[0];g=a.transformTag.call(this,c)||c,this.onEditTagDone(null,I({__isValid:!0},g))}else this[h?"addMixTags":"addTags"]([g||this.input.raw.call(this)],l);(h||this.DOM.input.parentNode)&&(setTimeout(function(){s.DOM.input.focus(),s.toggleFocusClass(!0)}),d&&setTimeout(this.dropdown.hide.bind(this)),n?i&&i():(t.addEventListener("transitionend",function(){s.dropdown.fillHeaderFooter(),setTimeout(function(){t.remove(),s.dropdown.refilter(),i&&i()},100)},{once:!0}),t.classList.add(this.settings.classNames.dropdownItemHidden)))}else d&&setTimeout(this.dropdown.hide.bind(this))},"selectOption"),selectAll:r(function(t){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var e=this.dropdown.filterListItems("");return t||(e=this.state.dropdown.suggestions),this.addTags(e,!0),this},"selectAll"),filterListItems:r(function(t,e){var i,s,a,n,o,l,d=r(function(){var D,P,_=void 0,j=void 0;D=p[O];var S,N=Object.keys(s=((P=Object)!=null&&typeof Symbol<"u"&&P[Symbol.hasInstance]?P[Symbol.hasInstance](D):D instanceof P)?p[O]:{value:p[O]}).some(function(E){return x.includes(E)})?x:["value"];g.fuzzySearch&&!e.exact?(n=N.reduce(function(E,M){return E+" "+(s[M]||"")},"").toLowerCase().trim(),g.accentedSearch&&(n=Y(n),l=Y(l)),_=n.indexOf(l)==0,j=n===l,S=n,a=l.toLowerCase().split(" ").every(function(E){return S.includes(E.toLowerCase())})):(_=!0,a=N.some(function(E){var M=""+(s[E]||"");return g.accentedSearch&&(M=Y(M),l=Y(l)),g.caseSensitive||(M=M.toLowerCase()),j=M===l,e.exact?M===l:M.indexOf(l)==0})),o=!g.includeSelectedTags&&i.isTagDuplicate(L(s)?s.value:s),a&&!o&&(j&&_?f.push(s):g.sortby=="startsWith"&&_?c.unshift(s):c.push(s))},"tr"),u=this,h=this.settings,g=h.dropdown,c=(e=e||{},[]),f=[],p=h.whitelist,m=g.maxItems>=0?g.maxItems:1/0,v=g.includeSelectedTags,y=typeof g.sortby=="function",x=g.searchKeys,O=0;if(!(t=h.mode=="select"&&this.value.length&&this.value[0][h.tagTextProp]==t?"":t)||!x.length){c=v?p:p.filter(function(D){return!u.isTagDuplicate(L(D)?D.value:D)});var b=y?g.sortby(c,l):c.slice(0,m);return this.state.dropdown.suggestions=b,b}for(l=g.caseSensitive?""+t:(""+t).toLowerCase();O<p.length;O++)i=this,d();return this.state.dropdown.suggestions=f.concat(c),b=y?g.sortby(f.concat(c),l):f.concat(c).slice(0,m),this.state.dropdown.suggestions=b,b},"filterListItems"),getMappedValue:r(function(t){var e=this.settings.dropdown.mapValueTo;return e?typeof e=="function"?e(t):t[e]||t.value:t.value},"getMappedValue"),createListHTML:r(function(t){var e=this;return I([],t).map(function(i,s){typeof i!="string"&&typeof i!="number"||(i={value:i});var a=e.dropdown.getMappedValue(i);return a=typeof a=="string"&&e.settings.dropdown.escapeHTML?$(a):a,e.settings.templates.dropdownItem.apply(e,[_t(At({},i),{mappedValue:a}),e])}).join("")},"createListHTML")}),X=X={refs:r(function(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},"refs"),getHeaderRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},"getHeaderRef"),getFooterRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},"getFooterRef"),getAllSuggestionsRefs:r(function(){return kt(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},"getAllSuggestionsRefs"),show:r(function(t){var e,i,s,a=this,n=this.settings,o=n.mode=="mix"&&!n.enforceWhitelist,l=!n.whitelist||!n.whitelist.length,d=n.dropdown.position=="manual";if(t=t===void 0?this.state.inputText:t,!(l&&!o&&!n.templates.dropdownItemNoMatch||n.dropdown.enabled===!1||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(t),t&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",t),n.templates.dropdownItemNoMatch&&(s=n.templates.dropdownItemNoMatch.call(this,{value:t}))),!s){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!Q(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!o||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:t}]}i=""+(L(e=this.suggestedListItems[0])?e.value:e),n.autoComplete&&i&&i.indexOf(t)==0&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(s),n.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(n.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=t||!0,this.state.dropdown.query=t,this.setStateSelection(),d||setTimeout(function(){a.dropdown.position(),a.dropdown.render()}),setTimeout(function(){a.trigger("dropdown:show",a.DOM.dropdown)})}},"show"),hide:r(function(t){var e=this,i=this.DOM,s=i.scope,a=i.dropdown,n=this.settings.dropdown.position=="manual"&&!t;if(a&&document.body.contains(a)&&!n)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),s.setAttribute("aria-expanded",!1),a.parentNode.removeChild(a),setTimeout(function(){e.state.dropdown.visible=!1},100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",a),this},"hide"),toggle:r(function(t){this.dropdown[this.state.dropdown.visible&&!t?"hide":"show"]()},"toggle"),getAppendTarget:r(function(){var t=this.settings.dropdown;return typeof t.appendTarget=="function"?t.appendTarget():t.appendTarget},"getAppendTarget"),render:r(function(){var t,e,i=this,s=((e=this.DOM.dropdown.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(e),t=e.clientHeight,e.parentNode.removeChild(e),t),a=this.settings,n=this.dropdown.getAppendTarget();return a.dropdown.enabled===!1||(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(a.classNames.dropdownInital),this.dropdown.position(s),n.appendChild(this.DOM.dropdown),setTimeout(function(){return i.DOM.dropdown.classList.remove(a.classNames.dropdownInital)}))),this},"render"),fill:r(function(t){t=typeof t=="string"?t:this.dropdown.createListHTML(t||this.suggestedListItems);var e,i=this.settings.templates.dropdownContent.call(this,t);this.DOM.dropdown.content.innerHTML=(e=i)?e.replace(/\>[\r\n ]+\</g,"><").split(/>\s+</).join("><").trim():""},"fill"),fillHeaderFooter:r(function(){var t=this.dropdown.filterListItems(this.state.dropdown.query),e=this.parseTemplate("dropdownHeader",[t]),i=this.parseTemplate("dropdownFooter",[t]),s=this.dropdown.getHeaderRef(),a=this.dropdown.getFooterRef();e&&s?.parentNode.replaceChild(e,s),i&&a?.parentNode.replaceChild(i,a)},"fillHeaderFooter"),position:r(function(t){var e=this.settings.dropdown,i=this.dropdown.getAppendTarget();if(e.position!="manual"&&i){var s,a,n,o,l,d,u,h,g,c,f=this.DOM.dropdown,p=e.RTL,m=i===document.body,v=i===this.DOM.scope,y=m?window.pageYOffset:i.scrollTop,x=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,O=x.clientHeight,b=Math.max(x.clientWidth||0,window.innerWidth||0),D=b>480?e.position:"all",P=this.DOM[D=="input"?"input":"scope"];if(t=t||f.clientHeight,this.state.dropdown.visible){if(D=="text"?(n=(s=(function(){var S=document.getSelection();if(S.rangeCount){var N,E,M=S.getRangeAt(0),R=M.startContainer,V=M.startOffset;if(V>0)return(E=document.createRange()).setStart(R,V-1),E.setEnd(R,V),{left:(N=E.getBoundingClientRect()).right,top:N.top,bottom:N.bottom};if(R.getBoundingClientRect)return R.getBoundingClientRect()}return{left:-9999,top:-9999}})()).bottom,a=s.top,o=s.left,l="auto"):(d=(function(S){var N=0,E=0;for(S=S.parentNode;S&&S!=x;)N+=S.offsetTop||0,E+=S.offsetLeft||0,S=S.parentNode;return{top:N,left:E}})(i),s=P.getBoundingClientRect(),a=v?-1:s.top-d.top,n=(v?s.height:s.bottom-d.top)-1,o=v?-1:s.left-d.left,l=s.width+"px"),!m){var _,j=(function(){for(var S=0,N=e.appendTarget.parentNode;N;)S+=N.scrollTop||0,N=N.parentNode;return S})();a+=j,n+=j}a=Math.floor(a),n=Math.ceil(n),h=b-o<120,g=((u=(_=e.placeAbove)!==null&&_!==void 0?_:O-s.bottom<t)?a:n)+y,c=o+(p&&s.width||0)+window.pageXOffset,c=D=="text"&&h?"right: 0;":"left: ".concat(c,"px;"),f.style.cssText="".concat(c," top: ").concat(g,"px; min-width: ").concat(l,"; max-width: ").concat(l),f.setAttribute("placement",u?"top":"bottom"),f.setAttribute("position",D)}}},"position")},Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(X)):(function(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);i.push.apply(i,s)}return i})(Object(X)).forEach(function(t){Object.defineProperty(Z,t,Object.getOwnPropertyDescriptor(X,t))}),Z),G="@yaireo/tagify/",Pt={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},jt={wrapper:r(function(t,e){return'<tags class="'.concat(e.classNames.namespace," ").concat(e.mode?"".concat(e.classNames[e.mode+"Mode"]):""," ").concat(t.className,`"
|
|
2
2
|
`).concat(e.readonly?"readonly":"",`
|
|
3
3
|
`).concat(e.disabled?"disabled":"",`
|
|
4
4
|
`).concat(e.required?"required":"",`
|
|
@@ -96,4 +96,4 @@
|
|
|
96
96
|
${i.mappedValue||i.value}
|
|
97
97
|
</div>`.replace(/\s+/g," ").trim()},dropdownHeader(i){return`<header data-selector="tagify-suggestions-header" class="${this.settings.classNames.dropdownHeader}"></header>`.replace(/\s+/g," ").trim()},dropdownFooter(i){const s=i.length-this.settings.dropdown.maxItems;return s>0?`<footer data-selector="tagify-suggestions-footer" class="${this.settings.classNames.dropdownFooter}">
|
|
98
98
|
${s} more items. Refine your search.
|
|
99
|
-
</footer>`.replace(/\s+/g," ").trim():""}}};this.mode!=="tags"?e.editTags=!1:this.inputValidatePattern?.trim?.()&&(e.pattern=new RegExp(this.inputValidatePattern.trim(),"i"),e.editTags={clicks:1,keepInvalid:!0}),this.nextTick(()=>{this.tagify=new et(this.$el.querySelector(`#vst-s-${this.randKey}`),e),this.tagify.setDisabled(this.disabled),this.tagify.loading(this.loading),this.tagify.on("input",i=>{this.$emit("input",this.currentSearchValue=i?.detail?.value??"")}),this.tagify.on("blur",i=>{this.nextTick(()=>{this.tagify?.loading?.(this.loading),this.tagify?.setDisabled?.(this.disabled)})}),this.setTags()})}beforeUpdate(){this.$el.__vst_select=this;const e=this.$el.querySelector?.(".tagify__input")?.closest?.(".vst-select-field")?.offsetWidth??0;e&&(this.maxPlaceholderWidth=e-e*.25)}reset(e){this.mode=="select"&&this.tagify?.removeAllTags?.(),this.nextTick(()=>this.$el?.querySelector?.(".tagify__input").focus?.(),3),this.nextTick(()=>this.$emit("update:modelValue",this.reactiveValue=null),4)}onViewPortResize(){this.setTags()}setTags(){this.beforeUpdate(),this.nextTick(()=>{if(this.tagify?.removeAllTags?.(),this.mode=="select"){const
|
|
99
|
+
</footer>`.replace(/\s+/g," ").trim():""}}};this.mode!=="tags"?e.editTags=!1:this.inputValidatePattern?.trim?.()&&(e.pattern=new RegExp(this.inputValidatePattern.trim(),"i"),e.editTags={clicks:1,keepInvalid:!0}),this.nextTick(()=>{this.tagify=new et(this.$el.querySelector(`#vst-s-${this.randKey}`),e),this.tagify.setDisabled(this.disabled),this.tagify.loading(this.loading),this.tagify.on("input",i=>{this.$emit("input",this.currentSearchValue=i?.detail?.value??"")}),this.tagify.on("blur",i=>{this.nextTick(()=>{this.tagify?.loading?.(this.loading),this.tagify?.setDisabled?.(this.disabled)})}),this.setTags()})}beforeUpdate(){this.$el.__vst_select=this;const e=this.$el.querySelector?.(".tagify__input")?.closest?.(".vst-select-field")?.offsetWidth??0;e&&(this.maxPlaceholderWidth=e-e*.25)}reset(e){this.mode=="select"&&this.tagify?.removeAllTags?.(),this.nextTick(()=>this.$el?.querySelector?.(".tagify__input").focus?.(),3),this.nextTick(()=>this.$emit("update:modelValue",this.reactiveValue=null),4)}onViewPortResize(){this.setTags()}setTags(e){this.beforeUpdate(),this.nextTick(()=>{if(this.tagify?.removeAllTags?.(),this.mode=="select"){const i=this.itemsInner.find(s=>(s?.key===0?s?.key:s?.key||s?.value)===(e??(this.inputValue||this.modelValue)))?.value??null;(i||i===0)&&(this.isFirstValueSet=!0,this.value=i,this.tagify?.addTags(this.value??""))}else if(this.mode=="multi"){const i=e??(this.inputValue||this.modelValue);Array.isArray(i)&&(this.isFirstValueSet=!0,this.value=JSON.parse(JSON.stringify(this.itemsInner))?.filter(s=>i.includes(s?.key)),this.tagify?.addTags(this.value??""))}else if(this.mode=="tags"){const i=e??(this.inputValue||this.modelValue);Array.isArray(i)&&(this.isFirstValueSet=!0,this.value=JSON.parse(JSON.stringify(this.itemsInner))?.filter(s=>i?.some(a=>(a?.key||a?.value)==(s?.key||s?.value))),this.tagify?.addTags(this.value??""))}})}itemsWatch(e){this.itemsInner=JSON.parse(JSON.stringify(e)),this.tagify&&(this.tagify.whitelist=this.itemsInner)}watchValue(e){if(this.isFirstValueSet)return this.isFirstValueSet=!1;this.$emit("update:modelValue",e)}modelValueWatch(e){if(this.isIgnoreSetTags)return this.isIgnoreSetTags=!1;this.nextTick(()=>this.setTags(e),2)}disabledWatch(e){this.tagify?.setDisabled?.(e),e&&!this.value&&(this.inputValue||this.modelValue)&&(this.value=this.inputValue||this.modelValue)&&this.nextTick(()=>this.tagify?.addTags(this.mode=="select"?this.itemsInner?.find?.(i=>i.key==this.value)?.value??"":this.itemsInner?.filter?.(i=>this.value?.includes(i.key))))}watchLoading(e){this.tagify?.loading?.(e),!e&&this.items?.length&&this.nextTick(()=>this.tagify?.dropdown.show(this.currentSearchValue))}},r(J,"SelectField"),J);k([C.Prop(Boolean)],A.prototype,"loading",2);k([C.Prop(Boolean)],A.prototype,"autofocus",2);k([C.Prop(String)],A.prototype,"inputValidatePattern",2);k([C.Prop(String)],A.prototype,"mode",2);k([C.Prop(Array)],A.prototype,"items",2);k([C.Prop(String,Object)],A.prototype,"placeholder",2);k([C.Watch("items",!0,!0)],A.prototype,"itemsWatch",1);k([C.Watch({deep:!0})],A.prototype,"watchValue",1);k([C.Watch("modelValue",!0)],A.prototype,"modelValueWatch",1);k([C.Watch("disabled",!0,!0)],A.prototype,"disabledWatch",1);k([C.Watch],A.prototype,"watchLoading",1);A=k([C.VST],A);const Kt=["id","value","autofocus"];function qt(t,e,i,s,a,n){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(["vst-select-field d-inline-block mx2px my1px w100%",{"vst-select-multi":t.mode=="multi"||t.mode=="tags",h45px:t.size=="lg",h24px:t.size=="sm",h35px:t.size=="md",["vst-select-"+t.randKey]:!0}])},[T.createElementVNode("input",{ref:"selectInput",id:`vst-s-${t.randKey}`,value:t.reactiveValue,autofocus:t.autofocus},null,8,Kt),(t.size=="md"||t.size=="sm")&&t.mode=="select"?(T.openBlock(),T.createBlock(T.resolveDynamicComponent("style"),{key:0},{default:T.withCtx(()=>[T.createTextVNode(".vst-select-field.vst-select-"+T.toDisplayString(t.randKey)+" .tagify { height: 35px !important; min-height: auto !important; padding-left: 12px !important; padding-top: 2px !important; border-color: #a8a29e99 !important; } .vst-select-field.vst-select-"+T.toDisplayString(t.randKey)+" .tagify__tag { height: 28px !important; } .vst-select-field.vst-select-"+T.toDisplayString(t.randKey)+" .tagify__input { height: 20px !important; padding: 0 !important; } .vst-select-field.vst-select-"+T.toDisplayString(t.randKey)+" .tagify__tag-text { padding: 0 0 0 0 !important; } .vst-select-dropdown-"+T.toDisplayString(t.randKey)+" .tagify__dropdown__item { height: 32px !important; line-height: 29px !important; padding: 1px 7px 3px !important; } .vst-select-field.vst-select-"+T.toDisplayString(t.randKey)+" .tagify--select tag > div, .vst-select-field.vst-select-"+T.toDisplayString(t.randKey)+" .tagify--select tag, .vst-select-field.vst-select-"+T.toDisplayString(t.randKey)+" .tagify__tag, { padding: 0 !important; margin: 0 !important; height: 20px !important; }",1)]),_:1})):T.createCommentVNode("",!0),(T.openBlock(),T.createBlock(T.resolveDynamicComponent("style"),null,{default:T.withCtx(()=>[T.createTextVNode(".vst-select-field.vst-select-"+T.toDisplayString(t.randKey)+" .tagify--empty .tagify__input:before { max-width: "+T.toDisplayString(t.maxPlaceholderWidth?t.maxPlaceholderWidth+"px":"auto")+"; }",1)]),_:1}))],2)}r(qt,"render");const zt=Et._export_sfc(A,[["render",qt]]);exports.default=zt;
|