golden-logic-ui 1.2.231 → 1.2.233

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.
@@ -1,4 +1,4 @@
1
- (function(qo,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],p):(qo=typeof globalThis<"u"?globalThis:qo||self,p(qo.GoldenLogicUi={},qo.Vue))})(this,function(qo,p){"use strict";const vi=(r,t)=>{const o=r.__vccOpts||r;for(const[a,c]of t)o[a]=c;return o},Mfe={props:{classes:{type:String,default:""},button_type:{type:String,default:"default"},is_submit:{type:Boolean,default:!1},icon:{type:String,default:""},icon:{type:String,default:""},svg_icon:{type:String,default:""},is_loading:{type:Boolean,default:!1},is_disabled:{type:Boolean,default:!1},has_border_reduced:{type:Boolean,default:!0},tag:{type:String,default:"button"},href:{type:String,default:""},form_id:{type:String,default:""}},data(){return{internal_loading:!1}},mounted(){this.form_id&&this.attachFormListener()},beforeUnmount(){this.form_id&&this.detachFormListener()},computed:{buttonTypeClass(){switch(this.button_type){case"default":return"text-white bg-blue-700 hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700";case"alternative":return" text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700";case"dark":return"text-white bg-gray-800 hover:bg-gray-900 dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-700";case"light":return"text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600";case"green":return" text-white bg-green-700 hover:bg-green-800 dark:bg-green-600 dark:hover:bg-green-700";case"red":return" text-white bg-red-700 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700";case"yellow":return" text-white bg-yellow-400 hover:bg-yellow-500";case"purple":return" text-white bg-purple-700 hover:bg-purple-800 dark:bg-purple-600 dark:hover:bg-purple-700";case"primary":return"text-white gl-btn-primary";default:return""}},actualLoading(){return this.is_loading||this.internal_loading}},methods:{attachFormListener(){const r=document.getElementById(this.form_id);r&&r.addEventListener("submit",this.handleFormSubmit)},detachFormListener(){const r=document.getElementById(this.form_id);r&&r.removeEventListener("submit",this.handleFormSubmit)},handleFormSubmit(){this.internal_loading=!0}}},Ffe=["innerHTML"];function Lfe(r,t,o,a,c,f){return f.actualLoading?(p.openBlock(),p.createBlock(p.resolveDynamicComponent("button"),{key:1,disabled:"",class:p.normalizeClass(` opacity-50 h-[2.5rem] flex items-center justify-center focus:outline-hidden text-sm px-6 py-2 font-medium ${o.has_border_reduced?"rounded-lg":""} ${f.buttonTypeClass} ${o.classes}`)},{default:p.withCtx(()=>t[0]||(t[0]=[p.createElementVNode("svg",{"aria-hidden":"true",role:"status",class:"inline w-5 h-5 animate-spin fill-primary dark:fill-primaryDark",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),p.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)])),_:1},8,["class"])):(p.openBlock(),p.createBlock(p.resolveDynamicComponent(o.tag),p.mergeProps({key:0,type:o.is_submit,disabled:o.is_disabled},{type:o.is_submit?"submit":void 0},{href:o.tag==="a"?o.href:void 0,class:` ${o.is_disabled?"cursor-not-allowed opacity-50":""} ${o.icon||o.svg_icon?"flex":""} h-[2.5rem] items-center gap-2 focus:outline-hidden text-sm px-3 py-2 font-medium ${o.has_border_reduced?"rounded-lg":""} ${f.buttonTypeClass} ${o.classes}`}),{default:p.withCtx(()=>[o.icon?(p.openBlock(),p.createElementBlock("i",{key:0,class:p.normalizeClass([o.icon,"text-base"])},null,2)):o.svg_icon?(p.openBlock(),p.createElementBlock("span",{key:1,innerHTML:o.svg_icon,class:"w-4 h-4"},null,8,Ffe)):p.createCommentVNode("",!0),p.renderSlot(r.$slots,"default")]),_:3},16,["type","disabled","href","class"]))}const o6=vi(Mfe,[["render",Lfe]]),Ife={components:{GlButton:o6},props:{isOpen:{type:Boolean,default:!1},language:{type:Object,default:()=>{}}},methods:{confirmDeletion(){this.$emit("confirm-delete")},cancelDeletion(){this.$emit("cancel-delete")}}},Vfe={key:0,class:"fixed inset-0 z-50 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true"},Qfe={class:"flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:p-0"},zfe={class:"inline-block relative overflow-hidden text-left align-bottom transition-all transform bg-white dark:bg-gray-800 rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},Hfe={class:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Zfe={class:"sm:flex sm:items-start"},Ufe={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},Wfe={class:"text-lg font-medium leading-6",id:"modal-title"},Xfe={class:"mt-2"},qfe={class:"text-sm"},jfe={class:"border-t border-gray-200 rounded-b dark:border-gray-600 px-4 py-3 sm:px-6 flex gap-2"};function Gfe(r,t,o,a,c,f){var y,w;const h=p.resolveComponent("gl-button");return o.isOpen?(p.openBlock(),p.createElementBlock("div",Vfe,[p.createElementVNode("div",Qfe,[t[0]||(t[0]=p.createElementVNode("div",{class:"fixed inset-0 transition-opacity bg-gray-500/75","aria-hidden":"true"},null,-1)),t[1]||(t[1]=p.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1)),p.createElementVNode("div",zfe,[p.createElementVNode("div",Hfe,[p.createElementVNode("div",Zfe,[p.createElementVNode("div",Ufe,[p.createElementVNode("h3",Wfe,p.toDisplayString(((y=o.language)==null?void 0:y.title_delete_confirmation)??"Confirm Deletion"),1),p.createElementVNode("div",Xfe,[p.createElementVNode("p",qfe,p.toDisplayString(((w=o.language)==null?void 0:w.message_delete_confirmation)??"Are you sure you want to delete this item? This action cannot be undone."),1)])])])]),p.createElementVNode("div",jfe,[p.createVNode(h,{onClick:f.confirmDeletion,tag:"button",button_type:"red"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.okbutton_delete_confirmation)??"Delete"),1)]}),_:1},8,["onClick"]),p.createVNode(h,{onClick:f.cancelDeletion,tag:"button",button_type:"light"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.cancelbutton_delete_confirmation)??"Cancel"),1)]}),_:1},8,["onClick"])])])])])):p.createCommentVNode("",!0)}const lA=vi(Ife,[["render",Gfe]]),pH=p.reactive({items:[]}),rb={state:pH,methods:{add(r){pH.items.unshift({key:Symbol(),message:r.message,type:r.type,duration:r.duration})},remove(r){pH.items.splice(r,1)}}},Yfe={components:{DeleteConfirmationModal:lA},props:{is_required:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""},show:{type:Boolean,default:!1},has_multiple_file:{show:Boolean,default:!1},field_name:{type:String,default:""},label_name:{type:String,default:""},route_url:{type:String,default:""},modelValue:{type:Array,default:[]},file_config:{type:Object,default:{}},is_enable_delete:{type:Boolean,default:!0},accepts_file_types:{type:String,default:""},max_file_size:{type:Number,default:0}},emits:["update:modelValue","uploaded"],data(){return{media_id:"",error_message_data:"",open_delete_modal:!1,files:[],uploadFileList:[],isDragging:!1}},methods:{inintUploadFileList(){this.uploadFileList.length<=0&&(this.uploadFileList=[...new Set([...this.uploadFileList,...this.modelValue])])},closeDeleteModal(){this.open_delete_modal=!1},deleteAction(){axios.delete(this.route_url+"/destroyMedia/"+this.media_id).then(r=>{this.inintUploadFileList();let t=this.uploadFileList.findIndex(o=>o.id===this.media_id);t!==-1&&this.uploadFileList.splice(t,1),this.closeDeleteModal(),rb.methods.add({message:"Item deleted successfully.",type:"success",duration:5e3}),this.$emit("uploaded"),this.$emit("update:modelValue",this.uploadFileList)}).catch(r=>{console.error(r),this.is_loading=!1})},getFileName(r){return r.length>12?r.substring(0,13)+"... ."+r.split(".")[1]:r},formatFileSize(r){if(r===0)return"0 Bytes";const t=1024,o=["Bytes","KB","MB","GB","TB"],a=Math.floor(Math.log(r)/Math.log(t));return parseFloat((r/Math.pow(t,a)).toFixed(2))+" "+o[a]},onDragOver(r){r.preventDefault(),this.isDragging=!0,r.dataTransfer.dropEffect="copy"},onDragLeave(r){r.preventDefault(),this.isDragging=!1},onDrop(r){r.preventDefault(),this.isDragging=!1;const t=r.dataTransfer.files;Array.from(t).forEach(o=>{this.uploadFile(o)})},async uploadFiles(r){this.inintUploadFileList();const t=r.target.files,o=Array.from(t).map(a=>this.uploadFile(a));await Promise.all(o),this.$emit("uploaded"),this.$emit("update:modelValue",this.uploadFileList)},getFirstError(r,t){return r.hasOwnProperty(t)?r[t][0]:""},async uploadFile(r){return new Promise((t,o)=>{r||t();const a=new FormData;a.append(this.field_name,r),a.append("accepts_file_types",this.accepts_file_types),a.append("max_file_size",this.max_file_size),a.append("field_name",this.field_name),Object.entries(this.file_config).forEach(([c,f])=>{a.append(c,f)}),this.files.push({file_name:r.name,loading:0}),axios.post(this.route_url+"/media",a,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:c=>{this.files[this.files.length-1].loading=Math.floor(c.loaded/c.total*100)}}).then(c=>{let f=this.files.findIndex(h=>h.file_name===r.name);f!==-1&&this.files.splice(f,1),this.has_multiple_file||(this.uploadFileList=[]),this.uploadFileList.push({file_name:c.data.file_name,size:c.data.size,id:c.data.id,url:c.data.url}),this.error_message_data="",t()}).catch(c=>{c.response.status===422?this.error_message_data=this.getFirstError(c.response.data.errors,this.field_name):console.error("An error occurred:",c);let f=this.files.findIndex(h=>h.file_name===r.name);f!==-1&&this.files.splice(f,1),console.log(c),t()})})}},computed:{uploadFileListFinal(){return this.uploadFileList.length>0?this.uploadFileList:[...new Set([...this.uploadFileList,...this.modelValue])]}},mounted(){this.error_message_data=this.error_message},watch:{error_message(r,t){this.error_message_data=r}}},Kfe={class:"flex flex-col items-center justify-center pt-5 pb-6"},Jfe=["multiple"],ehe=["name","value"],the={key:1},nhe={class:"mt-2 gl-span-form-error"},ohe={class:"block mt-2 mb-3 text-sm font-normal leading-5 text-gray-500"},she={key:0,class:""},rhe={class:"flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow-sm dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white"},ihe={class:"w-full ml-3"},ahe={class:"flex items-center justify-between mb-1"},lhe={class:"text-xs text-black dark:text-white"},che={class:"text-xs text-black dark:text-white"},uhe={class:"w-full h-1 mb-1 bg-white rounded-full dark:bg-gray-800"},dhe={class:"overflow-x-scroll max-h-56"},fhe={class:"flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow-sm dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white"},hhe={class:"flex items-center"},mhe={class:"flex flex-col ml-3"},ghe={class:"text-xs"},phe={class:"text-xs"},bhe={class:"flex gap-2"},yhe=["href"],Ohe=["onClick"];function xhe(r,t,o,a,c,f){const h=p.resolveComponent("DeleteConfirmationModal");return p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(h,{isOpen:c.open_delete_modal,onConfirmDelete:f.deleteAction,onCancelDelete:f.closeDeleteModal},null,8,["isOpen","onConfirmDelete","onCancelDelete"]),p.createElementVNode("div",{class:p.normalizeClass([{"border-red-500 dark:border-red-500":c.error_message_data!=="","border-gray-200 dark:border-gray-700":c.error_message_data==""},"w-full p-4 bg-white border rounded-lg shadow-sm dark:bg-gray-800"])},[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-form":c.error_message_data=="","gl-label-form-invalid":c.error_message_data!=="",required:o.is_required})},p.toDisplayString(o.label_name),3),p.createElementVNode("div",{onDragover:t[2]||(t[2]=p.withModifiers((...y)=>f.onDragOver&&f.onDragOver(...y),["prevent"])),onDragleave:t[3]||(t[3]=p.withModifiers((...y)=>f.onDragLeave&&f.onDragLeave(...y),["prevent"])),onDrop:t[4]||(t[4]=p.withModifiers((...y)=>f.onDrop&&f.onDrop(...y),["prevent"])),class:"flex flex-col items-center justify-center w-full h-40 mt-3 mb-3 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"},[p.createElementVNode("div",Kfe,[p.createElementVNode("input",{type:"file",ref:"file_input"+o.field_name,hidden:"",multiple:o.has_multiple_file,onChange:t[0]||(t[0]=(...y)=>f.uploadFiles&&f.uploadFiles(...y))},null,40,Jfe),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.uploadFileListFinal,(y,w)=>(p.openBlock(),p.createElementBlock("input",{type:"hidden",name:o.field_name+"[]",key:w,value:y.id},null,8,ehe))),128)),c.isDragging?(p.openBlock(),p.createElementBlock("div",the,t[6]||(t[6]=[p.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-gray-400"}," Drop files here ",-1)]))):(p.openBlock(),p.createElementBlock("div",{key:0,class:"flex flex-col items-center justify-center",onClick:t[1]||(t[1]=y=>r.$refs["file_input"+this.field_name].click())},t[5]||(t[5]=[p.createElementVNode("svg",{class:"w-8 h-8 mb-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})],-1),p.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-gray-400"}," Drag & drop files or browse ",-1)])))])],32),p.createElementVNode("span",nhe,p.toDisplayString(c.error_message_data),1),p.createElementVNode("small",ohe,p.toDisplayString(o.description),1),c.files.length>0?(p.openBlock(),p.createElementBlock("section",she,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c.files,(y,w)=>(p.openBlock(),p.createElementBlock("li",rhe,[t[7]||(t[7]=p.createElementVNode("i",{class:"text-3xl fas fa-file-alt"},null,-1)),p.createElementVNode("div",ihe,[p.createElementVNode("div",ahe,[p.createElementVNode("span",lhe,p.toDisplayString(f.getFileName(y.file_name)),1),p.createElementVNode("span",che,p.toDisplayString(y.loading),1)]),p.createElementVNode("div",uhe,[p.createElementVNode("div",{class:"h-full bg-gray-500 rounded-full dark:bg-gray-400",style:p.normalizeStyle({width:y.loading+"%"})},null,4)])])]))),256))])):p.createCommentVNode("",!0),p.createElementVNode("section",dhe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.uploadFileListFinal,(y,w)=>(p.openBlock(),p.createElementBlock("li",fhe,[p.createElementVNode("div",hhe,[t[8]||(t[8]=p.createElementVNode("i",{class:"text-3xl fas fa-file-alt","aria-hidden":"true"},null,-1)),p.createElementVNode("div",mhe,[p.createElementVNode("span",ghe,p.toDisplayString(f.getFileName(y.file_name)),1),p.createElementVNode("span",phe,p.toDisplayString(f.formatFileSize(y.size)),1)])]),p.createElementVNode("div",bhe,[p.createElementVNode("a",{href:y.url,target:"_blank",class:"text-lg text-blue-600 cursor-pointer dark:text-blue-400 fas fa-download"},null,8,yhe),o.is_enable_delete?(p.openBlock(),p.createElementBlock("i",{key:0,onClick:C=>{c.media_id=y.id,c.open_delete_modal=!0},class:"text-lg text-red-600 cursor-pointer dark:text-red-400 fas fa-x"},null,8,Ohe)):p.createCommentVNode("",!0)])]))),256))])],2)],64)}const vhe=vi(Yfe,[["render",xhe]]),whe={components:{},props:{field_name:{type:String,default:""},trans_selector_name:{type:String,default:"i18n_selector"}},data(){return{locals:[],default_language:""}},methods:{getLocals(){const r={id:this.menu_id};axios.get("/admin/get_locals",{params:r}).then(t=>{this.locals=t.data.locals,this.default_language=t.data.default_language,this.$refs.language_selector.classList.add("gl-multilanguage")}).catch(t=>{console.error(t)})}},created(){this.getLocals()},mounted(){}},She={class:"grid w-full gap-1 mt-5 mb-5 md:gap-0 md:grid-cols-10 language-selector",ref:"language_selector"},khe=["name","value","id","checked"],Che=["for"];function Ehe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("ul",She,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c.locals,(h,y)=>(p.openBlock(),p.createElementBlock("li",null,[p.createElementVNode("input",{type:"radio",name:o.trans_selector_name,value:h,class:"hidden! peer",id:h+"_"+o.field_name,autocomplete:"off",checked:h===c.default_language},null,8,khe),p.createElementVNode("label",{for:h+"_"+o.field_name,class:p.normalizeClass([{"border md:rounded-s-lg!":y===0,"border md:rounded-e-lg!":y===c.locals.length-1,"border-t border-b":y!==0&&y!==c.locals.length-1},"block w-full p-1 font-bold text-center text-gray-500 uppercase bg-white border-gray-200 rounded-lg cursor-pointer md:rounded-none dark:hover:text-gray-300 dark:border-gray-700 dark:peer-checked:text-blue-500 peer-checked:border-blue-600 peer-checked:text-blue-600 hover:text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:bg-gray-800 dark:hover:bg-gray-700"])},p.toDisplayString(h),11,Che)]))),256))],512)}const _he=vi(whe,[["render",Ehe]]),The={class:"bg-white border rounded-lg shadow-default dark:bg-gray-900 dark:border-gray-700"},Ahe={class:"px-3 py-4 border-b dark:border-gray-700"},Phe={class:"font-semibold text-black dark:text-white"},Dhe={__name:"GlCard",props:{class:{type:String,default:""},body_class:{type:String,default:""}},setup(r){const t=r,o=p.computed(()=>t.class),a=p.computed(()=>t.body_class);return(c,f)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["flex flex-col gap-9",o.value])},[p.createElementVNode("div",The,[p.createElementVNode("div",Ahe,[p.createElementVNode("h3",Phe,[p.renderSlot(c.$slots,"header")])]),c.$slots.body?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["p-6",a.value])},[p.renderSlot(c.$slots,"body")],2)):p.createCommentVNode("",!0)])],2))}},Nhe={class:"font-bold ptext-lg dark:text-white"},$he={class:"mt-3 mb-4"},Rhe={class:"px-3 py-1 mt-2 mb-2 text-sm font-medium text-blue-800 bg-blue-100 rounded-sm me-2 dark:bg-blue-900 dark:text-blue-300"},Bhe=["name","value"],Mhe={key:0,class:"dropdown"},Fhe={class:"inline-flex ml-2 rounded-md shadow-xs",role:"group"},Lhe={class:"relative"},Ihe=["onClick"],Vhe={class:"text-gray-700 bg-white border dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 absolute w-full z-999999999 rounded-md mt-1 pt-1 showOptions"},Qhe={class:"border-b border-gray-200 dark:border-gray-700"},zhe={class:"relative"},Hhe=["id","placeholder"],Zhe={class:"overflow-y-auto max-h-64 px-1 py-1"},Uhe=["onClick","onMousedown","id"],Whe={class:"flex items-center py-2 pr-4"},Xhe={key:0,class:"absolute flex items-center shrink-0 w-4 h-4 text-green-500 ltr:right-2 rtl:left-2 dark:text-green-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},qhe=["innerHTML"],jhe={__name:"GlMultiSelectDropdown",props:{language:{type:Object,default:()=>{}},modelValue:{type:Array,default:[]},defaultValue:{type:Array,default:[]},field_name:{type:String,default:""},is_required:{type:Boolean,default:!1},has_cancel:{type:Boolean,default:!0},label_name:{type:String,default:""},options:{type:Array,required:!0,default:()=>[],note:"Options of dropdown. An array of options with id and name"},placeholder:{type:String,required:!1,default:"Please select an option",note:"Placeholder of dropdown"},search_input_placeholder:{type:String,required:!1,default:"Search",note:"Placeholder of search input"},maxItem:{type:Number,required:!1,default:1e4,note:"Max items showing"},show:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""},options_top_size:{type:Number,default:22}},emits:["update:modelValue","selected","selectionChanged"],setup(r,{emit:t}){const o=r,a=t,c=p.ref(null),f=p.ref([]),h=p.ref([]),y=p.ref([]),w=p.ref(0),C=p.ref(!1),T=p.ref(""),R=p.ref(""),B=p.ref(null),V=L=>{L.key==="Enter"&&L.target.form&&L.preventDefault()};p.onMounted(()=>{R.value=Y(),o.show||(document.body.addEventListener("click",j),document.addEventListener("keypress",V))}),p.onBeforeUnmount(()=>{document.body.removeEventListener("click",j),document.removeEventListener("keypress",V)});const q=p.computed(()=>{const L=[],Yt=new RegExp(T.value,"ig");for(const pt of h.value){const Wt=String(pt.name);(T.value.length<1||Wt.match(Yt))&&L.length<o.maxItem&&L.push(pt)}return L});function X(L){if(["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Enter"].includes(L.key)){if(["ArrowUp","ArrowDown"].includes(L.key)&&L.preventDefault(),L.key==="ArrowDown"&&o.posts==="")return;wt(L.key)}}function Y(){let L=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(pt){const Wt=(L+Math.random()*16)%16|0;return L=Math.floor(L/16),(pt==="x"?Wt:Wt&3|8).toString(16)})}function he(L){return Array.isArray(L)&&L.length>0&&L.every(Yt=>typeof Yt=="object"&&Yt!==null)}function Se(L){return L.every(Yt=>typeof Yt=="object"&&Yt!==null)}function te(L){return f.value.findIndex(Yt=>Yt.id===L)!==-1}function de(){f.value=Re()}function xt(){f.value=[],a("update:modelValue",[]),a("selected",[]),a("selectionChanged",[])}function je(L){let Yt=f.value.findIndex(pt=>pt.id===L.id);Yt!==-1&&f.value.splice(Yt,1),y.value=f.value.map(pt=>pt.id),a("update:modelValue",y.value),a("selected",f.value),a("selectionChanged",f.value)}function j(L){L.target.id!=o.field_name+"search"+R.value&&L.target.id!=o.field_name&&!L.target.classList.contains("showOptions")&&(St(),w.value=0,C.value=!1)}function tt(L){const Yt=`${L}${R.value}`,pt=document.getElementById(Yt);pt&&pt.scrollIntoView()}function st(L){const Yt=`${L}${R.value}`,pt=document.getElementById(Yt);pt&&pt.click()}function wt(L){L==="ArrowDown"&&w.value<q.value.length&&(w.value++,tt(w.value)),L==="ArrowUp"&&w.value>1&&(w.value--,tt(w.value)),L==="Enter"&&st(w.value)}function Re(){return o.options.map((L,Yt)=>typeof L=="object"?L:{id:L,name:L})}function ue(){if(he(f.value))return Se(f.value)?h.value.filter(L=>f.value.some(Yt=>String(Yt.id)===String(L.id)))||[]:h.value.filter(L=>f.value.some(Yt=>String(Yt)===String(L.id)))||[];if(o.modelValue)return Se(o.modelValue)?h.value.filter(L=>o.modelValue.some(Yt=>String(Yt.id)===String(L.id)))||[]:h.value.filter(L=>o.modelValue.some(Yt=>String(Yt)===String(L.id)))||[]}function qt(L){let Yt=f.value.findIndex(pt=>pt.id===L.id);Yt!==-1?f.value.splice(Yt,1):f.value.push(L),C.value=!1,y.value=f.value.map(pt=>pt.id),a("update:modelValue",y.value),a("selected",f.value),a("selectionChanged",f.value)}function vt(){if(!o.show){if(C.value){C.value=!1;return}T.value="",C.value=!0,p.nextTick(()=>{var L=document.getElementById(`${o.field_name}search${R.value}`);L&&L.focus()})}}function St(){T.value=""}return p.watch(T,()=>{q.value.length===0&&(f.value=[])}),p.watch(f,L=>{if(he(L)){y.value=L.map(Wt=>Wt.id);const Yt=Array.isArray(y.value)?y.value:[],pt=Array.isArray(o.modelValue)?o.modelValue:[];JSON.stringify(Yt)!==JSON.stringify(pt)&&a("update:modelValue",y.value)}}),p.watch(()=>o.modelValue,L=>{T.value="",L?(f.value=o.modelValue,f.value=ue()):f.value={}},{immediate:!0,deep:!0}),p.watch(()=>o.options,()=>{h.value=Re(),f.value=ue()},{immediate:!0,deep:!0}),(L,Yt)=>{var pt,Wt;return p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",Nhe,p.toDisplayString(r.label_name),1),p.createElementVNode("p",$he,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.value,(at,Ne)=>(p.openBlock(),p.createElementBlock("span",Rhe,p.toDisplayString(at==null?void 0:at.name),1))),256))]),Yt[4]||(Yt[4]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(r.field_name)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(y.value,(at,Ne)=>(p.openBlock(),p.createElementBlock("input",{type:"hidden",name:r.field_name+"[]",key:Ne,value:at},null,8,Bhe))),128)),r.options?(p.openBlock(),p.createElementBlock("div",Mhe,[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required})},p.toDisplayString(r.label_name),3),p.createElementVNode("div",Fhe,[p.createElementVNode("button",{onClick:de,type:"button",class:"px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 ltr:rounded-tl-lg rtl:rounded-tr-lg hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"},p.toDisplayString(((pt=r.language)==null?void 0:pt.select_all)??"Select all"),1),p.createElementVNode("button",{onClick:xt,type:"button",class:"ltr:rounded-tr-lg rtl:rounded-tl-lg! px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"},p.toDisplayString(((Wt=r.language)==null?void 0:Wt.deselect_all)??"Deselect all"),1)]),p.createElementVNode("div",{ref_key:"myDivDropDown",ref:B,class:"relative border border-gray-200 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"},[p.createElementVNode("div",Lhe,[p.createElementVNode("div",{class:"flex flex-wrap gap-2 pr-2 gl-multi-dropdown showOptions",onClick:Yt[0]||(Yt[0]=at=>vt())},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.value,(at,Ne)=>(p.openBlock(),p.createElementBlock("span",{key:Ne,class:"flex gap-2 px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm pointer-events-none dark:bg-blue-900 dark:text-blue-300"},[p.createTextVNode(p.toDisplayString(at==null?void 0:at.name)+" ",1),p.createElementVNode("i",{onClick:p.withModifiers(Oe=>je(at),["stop"]),class:"cursor-pointer pointer-events-auto hover:text-red-600 dark:hover:text-red-400"},Yt[5]||(Yt[5]=[p.createElementVNode("svg",{class:"w-[9px] h-[16px]","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})],-1)]),8,Ihe)]))),128))]),p.createElementVNode("i",{onClick:Yt[1]||(Yt[1]=p.withModifiers(at=>vt(),["stop"])),class:"absolute text-xl text-gray-500 cursor-pointer fas ltr:right-2 rtl:left-2 hover:text-gray-700 dark:hover:text-gray-800 showOptions",style:{top:"14px"}},[(p.openBlock(),p.createElementBlock("svg",{class:p.normalizeClass([C.value?"":"rotate-180","w-3 h-3 shrink-0"]),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 6"},Yt[6]||(Yt[6]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5 5 1 1 5"},null,-1)]),2))]),p.withDirectives(p.createElementVNode("div",Vhe,[p.createElementVNode("div",Qhe,[Yt[8]||(Yt[8]=p.createElementVNode("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),p.createElementVNode("div",zhe,[Yt[7]||(Yt[7]=p.createElementVNode("div",{class:"absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3"},null,-1)),p.withDirectives(p.createElementVNode("input",{type:"search","onUpdate:modelValue":Yt[2]||(Yt[2]=at=>T.value=at),ref:c.value,id:`${r.field_name}search${R.value}`,onKeydown:X,onBlur:Yt[3]||(Yt[3]=at=>St()),autocomplete:"off",class:"block w-full p-2 text-sm text-gray-900 outline-hidden dark:bg-gray-800 dark:text-white",placeholder:r.search_input_placeholder},null,40,Hhe),[[p.vModelText,T.value]])])]),p.createElementVNode("div",Zhe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(q.value,(at,Ne)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["block px-2 py-0.5 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-white hover:rounded-sm",Ne+1==w.value?"bg-gray-100 dark:bg-gray-700 rounded-sm":""]),onClick:Oe=>qt(at),onMousedown:Oe=>qt(at),key:Ne,id:`${Ne+1}${R.value}`},[p.createElementVNode("div",Whe,[te(at.id)?(p.openBlock(),p.createElementBlock("svg",Xhe,Yt[9]||(Yt[9]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"},null,-1)]))):p.createCommentVNode("",!0),p.createElementVNode("span",{innerHTML:at.name||at.id||"-"},null,8,qhe)])],42,Uhe))),128))])],512),[[p.vShow,C.value]])])],512)])):p.createCommentVNode("",!0)],2))],64)}}},Ghe={class:"font-bold ptext-lg dark:text-white"},Yhe=["name","id"],Khe=["id"],Jhe=["for"],eme=["name","id"],tme=["required","name","id","type"],nme={class:"gl-span-form-error"},ome={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},sme={__name:"GlTextareaTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:[String,Number],default:""},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(r,{expose:t,emit:o}){const a=r,c=o,f=p.ref(null),h=p.ref(null),y=()=>{h.value&&c("update:modelValueTranslate",h.value.value)};return p.onMounted(()=>{f.value!==null&&f.value.hasAttribute("autofocus")&&f.value.focus(),a.modelValue&&(c("update:modelValue",a.modelValue),f.value.value=a.modelValue),a.modelValueTranslate&&(c("update:modelValueTranslate",a.modelValueTranslate),h.value.value=a.modelValueTranslate),f.value.classList.add("gl-multilanguage")}),t({focus:()=>f.value.focus()}),(w,C)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",Ghe,p.toDisplayString(r.label_name),1),p.withDirectives(p.createElementVNode("input",{type:"hidden","data-i18n":"true",name:r.field_name+"_i18n",id:r.field_name+"_i18n",ref_key:"input_translate",ref:h,"onUpdate:modelValue":C[0]||(C[0]=T=>w.inputTranslateValue=T)},null,8,Yhe),[[p.vModelText,w.inputTranslateValue]]),p.createElementVNode("p",{id:r.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},p.toDisplayString(w.model_value),9,Khe),C[3]||(C[3]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["mb-4",r.field_name])},[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-translation-form":r.error_message=="","gl-label-translation-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,Jhe),C[4]||(C[4]=p.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300"},null,-1)),p.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:r.field_name+"_i18n",id:r.field_name+"_i18n",onChange:y,ref_key:"input_translate",ref:h},null,40,eme),p.createElementVNode("textarea",{class:p.normalizeClass(["mt-4 form-input-translation",{" gl-textarea-form":r.error_message==""," gl-textarea-form-invalid":r.error_message!==""}]),required:r.is_required,name:r.field_name,id:r.field_name,type:r.type,onInput:C[1]||(C[1]=T=>w.$emit("update:modelValue",T.target.value)),onKeydown:C[2]||(C[2]=T=>w.$emit("keydown",T)),ref_key:"input",ref:f,rows:"4"}," ",42,tme),p.createElementVNode("span",nme,p.toDisplayString(r.error_message),1),p.createElementVNode("small",ome,p.toDisplayString(r.description),1)],2))],64))}},rme={class:"font-bold ptext-lg dark:text-white"},ime=["name","id"],ame=["id"],lme=["for"],cme=["name","id"],ume=["required","name","id","type"],dme={class:"gl-span-form-error"},fme={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},hme={__name:"GlTextTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:[String,Number],default:""},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(r,{expose:t,emit:o}){const a=r,c=o,f=p.ref(null),h=p.ref(null),y=()=>{h.value&&c("update:modelValueTranslate",h.value.value)};return p.onMounted(()=>{f.value!==null&&f.value.hasAttribute("autofocus")&&f.value.focus(),a.modelValue&&(c("update:modelValue",a.modelValue),f.value.value=a.modelValue),a.modelValueTranslate&&(c("update:modelValueTranslate",a.modelValueTranslate),h.value.value=a.modelValueTranslate),f.value.classList.add("gl-multilanguage")}),t({focus:()=>f.value.focus()}),(w,C)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",rme,p.toDisplayString(r.label_name),1),p.withDirectives(p.createElementVNode("input",{type:"hidden","data-i18n":"true",name:r.field_name+"_i18n",id:r.field_name+"_i18n",ref_key:"input_translate",ref:h,"onUpdate:modelValue":C[0]||(C[0]=T=>w.inputTranslateValue=T)},null,8,ime),[[p.vModelText,w.inputTranslateValue]]),p.createElementVNode("p",{id:r.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},p.toDisplayString(w.model_value),9,ame),C[3]||(C[3]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["mb-4",r.field_name])},[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-translation-form":r.error_message=="","gl-label-translation-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,lme),C[4]||(C[4]=p.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300"},null,-1)),p.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:r.field_name+"_i18n",id:r.field_name+"_i18n",onChange:y,ref_key:"input_translate",ref:h},null,40,cme),p.createElementVNode("input",{required:r.is_required,name:r.field_name,id:r.field_name,class:p.normalizeClass(["mt-2 form-input-translation",{" gl-input-form":r.error_message==""," gl-input-form-invalid":r.error_message!==""}]),type:r.type,onInput:C[1]||(C[1]=T=>w.$emit("update:modelValue",T.target.value)),onKeydown:C[2]||(C[2]=T=>w.$emit("keydown",T)),ref_key:"input",ref:f},null,42,ume),p.createElementVNode("span",dme,p.toDisplayString(r.error_message),1),p.createElementVNode("small",fme,p.toDisplayString(r.description),1)],2))],64))}},mme={key:0,class:"gl-label-form"},gme={class:"mt-1 text-gray-900 dark:text-white"},pme=["for"],bme={key:1,class:"flex items-center"},yme=["innerHTML"],Ome={class:"relative w-full"},xme=["minlength","maxlength","required","name","id","type","placeholder"],vme=["innerHTML"],wme=["minlength","maxlength","required","name","id","type","placeholder"],Sme={class:"gl-span-form-error"},kme={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Wne={__name:"GlTextInput",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:""},minlength:{type:String,default:null},maxlength:{type:String,default:null},input_class:{type:String,default:""},container_class:{type:String,default:""},inputGroupType:{type:String,default:""},inputGroupText:{type:String,default:""}},emits:["update:modelValue","keydown","blur-sm","keyup"],setup(r,{expose:t,emit:o}){const a=r,c=o,f=p.ref(null);p.onMounted(()=>{f.value!==null&&f.value.hasAttribute("autofocus")&&f.value.focus()});const h=p.computed({get(){return a.modelValue},set(y){c("update:modelValue",y)}});return t({focus:()=>f.value.focus()}),(y,w)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[r.label_name?(p.openBlock(),p.createElementBlock("label",mme,p.toDisplayString(r.label_name),1)):p.createCommentVNode("",!0),p.createElementVNode("p",gme,p.toDisplayString(r.type=="password"?r.modelValue.replace(/./g,"*"):r.modelValue),1),w[8]||(w[8]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass({[r.field_name]:r.field_name&&r.field_name!=="",[r.container_class]:r.container_class&&r.container_class!==""})},[r.label_name?(p.openBlock(),p.createElementBlock("label",{key:0,class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,pme)):p.createCommentVNode("",!0),r.inputGroupType?(p.openBlock(),p.createElementBlock("div",bme,[r.inputGroupType=="prepend"?(p.openBlock(),p.createElementBlock("label",{key:0,innerHTML:r.inputGroupText,class:"h-10 z-10 inline-flex items-center shrink-0 px-4 text-sm font-medium text-center text-gray-500 bg-gray-100 border border-gray-300 dark:text-gray-400 rounded-s-lg focus:outline-hidden dark:bg-gray-700 dark:border-gray-600"},null,8,yme)):p.createCommentVNode("",!0),p.createElementVNode("div",Ome,[p.withDirectives(p.createElementVNode("input",{minlength:r.minlength,maxlength:r.maxlength,class:p.normalizeClass(["rtl:text-right rounded-none!",{"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!=="",[r.input_class]:r.input_class&&r.input_class!=="","border-e-0! rounded-s-lg!":r.inputGroupType=="append","border-s-0! rounded-e-lg!":r.inputGroupType=="prepend"}]),required:r.is_required,name:r.field_name,id:r.field_name,type:r.type,"onUpdate:modelValue":w[0]||(w[0]=C=>h.value=C),onKeydown:w[1]||(w[1]=C=>y.$emit("keydown",C)),onKeyup:w[2]||(w[2]=C=>y.$emit("keyup",C)),onBlur:w[3]||(w[3]=C=>y.$emit("blur-sm",C)),ref_key:"input",ref:f,placeholder:r.placeholder},null,42,xme),[[p.vModelDynamic,h.value]])]),r.inputGroupType=="append"?(p.openBlock(),p.createElementBlock("label",{key:1,innerHTML:r.inputGroupText,class:"h-10 z-10 inline-flex items-center shrink-0 px-4 text-sm font-medium text-center text-gray-500 bg-gray-100 border border-gray-300 dark:text-gray-400 rounded-e-lg focus:outline-hidden dark:bg-gray-700 dark:border-gray-600"},null,8,vme)):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0),r.inputGroupType==""?p.withDirectives((p.openBlock(),p.createElementBlock("input",{key:2,minlength:r.minlength,maxlength:r.maxlength,class:p.normalizeClass(["rtl:text-right",{"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!=="",[r.input_class]:r.input_class&&r.input_class!==""}]),required:r.is_required,name:r.field_name,id:r.field_name,type:r.type,"onUpdate:modelValue":w[4]||(w[4]=C=>h.value=C),onKeydown:w[5]||(w[5]=C=>y.$emit("keydown",C)),onKeyup:w[6]||(w[6]=C=>y.$emit("keyup",C)),onBlur:w[7]||(w[7]=C=>y.$emit("blur-sm",C)),ref_key:"input",ref:f,placeholder:r.placeholder},null,42,wme)),[[p.vModelDynamic,h.value]]):p.createCommentVNode("",!0),p.createElementVNode("span",Sme,p.toDisplayString(r.error_message),1),p.createElementVNode("small",kme,p.toDisplayString(r.description),1)],2))],64))}},Cme={key:0,class:"gl-label-form"},Eme={class:"mt-1 text-gray-900 dark:text-white"},_me=["for"],Tme={class:"relative"},Ame={key:0,class:"flex items-center"},Pme=["innerHTML"],Dme={class:"relative w-full"},Nme=["required","name","id","value","placeholder"],$me=["innerHTML"],Rme={key:1,class:"relative"},Bme=["required","name","id","value","placeholder"],Mme={class:"absolute z-50 mt-1 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 p-4 max-w-72"},Fme={class:"flex items-center justify-between mb-4"},Lme={class:"text-sm font-semibold text-gray-900 dark:text-white"},Ime={class:"grid grid-cols-7 gap-1 mb-2"},Vme={class:"grid grid-cols-7 gap-1"},Qme=["onClick","disabled"],zme={class:"flex items-center justify-between mt-4 pt-3 border-t border-gray-200 dark:border-gray-700"},Hme={class:"gl-span-form-error"},Zme={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},bH={__name:"GlDatePicker",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:[String,Date],default:""},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:"Select date"},input_class:{type:String,default:""},container_class:{type:String,default:""},date_format:{type:String,default:"YYYY-MM-DD"},min_date:{type:String,default:null},max_date:{type:String,default:null},disabled_days:{type:Array,default:()=>[]},disabled_dates:{type:Array,default:()=>[]},locale:{type:String,default:"en"},inputGroupType:{type:String,default:""},inputGroupText:{type:String,default:""}},emits:["update:modelValue","change","blur-sm"],setup(r,{expose:t,emit:o}){const a=r,c=o,f=p.ref(null),h=p.ref(null),y=p.ref(!1),w=p.ref(new Date().getMonth()),C=p.ref(new Date().getFullYear()),T=pt=>{if(!pt)return null;if(pt.toLowerCase()==="today")return new Date;const Wt=pt.match(/^([+-]?)(\d+)([dmy])$/i);if(Wt){const Ne=Wt[1]==="-"?-1:1,Oe=parseInt(Wt[2])*Ne,it=Wt[3].toLowerCase(),_e=new Date;return it==="d"?_e.setDate(_e.getDate()+Oe):it==="m"?_e.setMonth(_e.getMonth()+Oe):it==="y"&&_e.setFullYear(_e.getFullYear()+Oe),_e}const at=new Date(pt);return isNaN(at.getTime())?null:at},R=p.computed(()=>{const pt=[];for(let Wt=0;Wt<12;Wt++){const at=new Date(2e3,Wt,1);pt.push(at.toLocaleDateString(a.locale,{month:"long"}))}return pt}),B=p.computed(()=>{const pt=[];for(let Wt=0;Wt<7;Wt++){const at=new Date(2e3,0,2+Wt);pt.push(at.toLocaleDateString(a.locale,{weekday:"short"}))}return pt}),V=pt=>{if(!pt)return"";let Wt;if(typeof pt=="string"&&(Wt=q(pt)),(!Wt||isNaN(Wt.getTime()))&&(Wt=new Date(pt)),isNaN(Wt.getTime()))return"";const at=Wt.getFullYear(),Ne=String(Wt.getMonth()+1).padStart(2,"0"),Oe=String(Wt.getDate()).padStart(2,"0");switch(a.date_format){case"DD-MM-YYYY":return`${Oe}-${Ne}-${at}`;case"MM-DD-YYYY":return`${Ne}-${Oe}-${at}`;case"DD/MM/YYYY":return`${Oe}/${Ne}/${at}`;case"MM/DD/YYYY":return`${Ne}/${Oe}/${at}`;case"YYYY/MM/DD":return`${at}/${Ne}/${Oe}`;case"YYYY-MM-DD":default:return`${at}-${Ne}-${Oe}`}},q=pt=>{if(!pt)return null;let Wt,at,Ne;const Oe=pt.split(/[-/]/);if(Oe.length!==3)return null;switch(a.date_format){case"DD-MM-YYYY":case"DD/MM/YYYY":Ne=parseInt(Oe[0]),at=parseInt(Oe[1])-1,Wt=parseInt(Oe[2]);break;case"MM-DD-YYYY":case"MM/DD/YYYY":at=parseInt(Oe[0])-1,Ne=parseInt(Oe[1]),Wt=parseInt(Oe[2]);break;case"YYYY/MM/DD":case"YYYY-MM-DD":default:Wt=parseInt(Oe[0]),at=parseInt(Oe[1])-1,Ne=parseInt(Oe[2]);break}const it=new Date(Wt,at,Ne);return isNaN(it.getTime())?null:it},X=p.ref("");p.watch(()=>a.modelValue,pt=>{X.value=V(pt)},{immediate:!0});const Y=pt=>{const Wt=pt.target.value;X.value=Wt;const at=q(Wt);if(at&&!isNaN(at.getTime())&&!te(at)){const Ne=V(at);c("update:modelValue",Ne),c("change",Ne)}else Wt===""&&(c("update:modelValue",""),c("change",""))},he=pt=>{const Wt=X.value,at=q(Wt);at&&!isNaN(at.getTime())&&!te(at)?X.value=V(at):Wt!==""&&(X.value=V(a.modelValue)),c("blur-sm",pt)},Se=p.computed(()=>{const pt=new Date(C.value,w.value,1),Wt=new Date(C.value,w.value+1,0),at=pt.getDay(),Ne=Wt.getDate(),Oe=[],it=new Date(C.value,w.value,0).getDate();for(let Ve=at-1;Ve>=0;Ve--)Oe.push({day:it-Ve,currentMonth:!1,date:new Date(C.value,w.value-1,it-Ve)});for(let Ve=1;Ve<=Ne;Ve++)Oe.push({day:Ve,currentMonth:!0,date:new Date(C.value,w.value,Ve)});const _e=42-Oe.length;for(let Ve=1;Ve<=_e;Ve++)Oe.push({day:Ve,currentMonth:!1,date:new Date(C.value,w.value+1,Ve)});return Oe}),te=pt=>{if(a.disabled_days.includes(pt.getDay()))return!0;if(a.disabled_dates&&a.disabled_dates.length>0){const Wt=new Date(pt);Wt.setHours(0,0,0,0);for(const at of a.disabled_dates){let Ne;if(typeof at=="string"?(Ne=q(at),(!Ne||isNaN(Ne.getTime()))&&(Ne=new Date(at))):at instanceof Date&&(Ne=at),Ne&&!isNaN(Ne.getTime())&&(Ne.setHours(0,0,0,0),Wt.getTime()===Ne.getTime()))return!0}}if(a.min_date){const Wt=T(a.min_date);if(Wt&&(Wt.setHours(0,0,0,0),pt<Wt))return!0}if(a.max_date){const Wt=T(a.max_date);if(Wt&&(Wt.setHours(0,0,0,0),pt>Wt))return!0}return!1},de=pt=>{if(!a.modelValue)return!1;const Wt=q(a.modelValue)||new Date(a.modelValue);return pt.toDateString()===Wt.toDateString()},xt=pt=>pt.toDateString()===new Date().toDateString(),je=pt=>{if(te(pt.date))return;const Wt=V(pt.date);c("update:modelValue",Wt),c("change",Wt),y.value=!1},j=()=>{w.value===0?(w.value=11,C.value--):w.value--},tt=()=>{w.value===11?(w.value=0,C.value++):w.value++},st=()=>{C.value--},wt=()=>{C.value++},Re={en:{clear:"Clear",today:"Today"},ar:{clear:"مسح",today:"اليوم"}},ue=()=>a.locale&&a.locale.startsWith("ar")?"ar":"en",qt=pt=>{const Wt=ue();return Re[Wt][pt]||Re.en[pt]||pt},vt=()=>{const pt=new Date;w.value=pt.getMonth(),C.value=pt.getFullYear(),je({date:pt})},St=()=>{c("update:modelValue",""),c("change",""),y.value=!1},L=()=>{if(y.value=!y.value,y.value&&a.modelValue){const pt=q(a.modelValue)||new Date(a.modelValue);isNaN(pt.getTime())||(w.value=pt.getMonth(),C.value=pt.getFullYear())}},Yt=pt=>{h.value&&!h.value.contains(pt.target)&&(y.value=!1)};return p.onMounted(()=>{document.addEventListener("click",Yt),f.value!==null&&f.value.hasAttribute("autofocus")&&f.value.focus()}),p.onUnmounted(()=>{document.removeEventListener("click",Yt)}),t({focus:()=>{var pt;return(pt=f.value)==null?void 0:pt.focus()}}),(pt,Wt)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[r.label_name?(p.openBlock(),p.createElementBlock("label",Cme,p.toDisplayString(r.label_name),1)):p.createCommentVNode("",!0),p.createElementVNode("p",Eme,p.toDisplayString(X.value),1),Wt[0]||(Wt[0]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass({[r.field_name]:r.field_name&&r.field_name!=="",[r.container_class]:r.container_class&&r.container_class!==""}),ref_key:"datepickerContainer",ref:h},[r.label_name?(p.openBlock(),p.createElementBlock("label",{key:0,class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,_me)):p.createCommentVNode("",!0),p.createElementVNode("div",Tme,[r.inputGroupType?(p.openBlock(),p.createElementBlock("div",Ame,[r.inputGroupType=="prepend"?(p.openBlock(),p.createElementBlock("label",{key:0,innerHTML:r.inputGroupText,class:"h-10 z-10 inline-flex items-center shrink-0 px-4 text-sm font-medium text-center text-gray-500 bg-gray-100 border border-gray-300 dark:text-gray-400 rounded-s-lg focus:outline-hidden dark:bg-gray-700 dark:border-gray-600"},null,8,Pme)):p.createCommentVNode("",!0),p.createElementVNode("div",Dme,[p.createElementVNode("input",{type:"text",class:p.normalizeClass(["rtl:text-right rounded-none!",{"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!=="",[r.input_class]:r.input_class&&r.input_class!=="","border-e-0! rounded-s-lg!":r.inputGroupType=="append","border-s-0! rounded-e-lg!":r.inputGroupType=="prepend"}]),required:r.is_required,name:r.field_name,id:r.field_name,value:X.value,onInput:Y,onBlur:he,ref_key:"input",ref:f,placeholder:r.placeholder},null,42,Nme),p.createElementVNode("div",{class:"absolute inset-y-0 end-0 flex items-center pe-3 cursor-pointer",onClick:L},Wt[1]||(Wt[1]=[p.createElementVNode("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"})],-1)]))]),r.inputGroupType=="append"?(p.openBlock(),p.createElementBlock("label",{key:1,innerHTML:r.inputGroupText,class:"h-10 z-10 inline-flex items-center shrink-0 px-4 text-sm font-medium text-center text-gray-500 bg-gray-100 border border-gray-300 dark:text-gray-400 rounded-e-lg focus:outline-hidden dark:bg-gray-700 dark:border-gray-600"},null,8,$me)):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0),r.inputGroupType==""?(p.openBlock(),p.createElementBlock("div",Rme,[p.createElementVNode("input",{type:"text",class:p.normalizeClass(["rtl:text-right pe-10",{"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!=="",[r.input_class]:r.input_class&&r.input_class!==""}]),required:r.is_required,name:r.field_name,id:r.field_name,value:X.value,onInput:Y,onBlur:he,ref_key:"input",ref:f,placeholder:r.placeholder},null,42,Bme),p.createElementVNode("div",{class:"absolute inset-y-0 end-0 flex items-center pe-3 cursor-pointer",onClick:L},Wt[2]||(Wt[2]=[p.createElementVNode("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"})],-1)]))])):p.createCommentVNode("",!0),p.withDirectives(p.createElementVNode("div",Mme,[p.createElementVNode("div",Fme,[p.createElementVNode("button",{type:"button",onClick:st,class:"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded text-gray-500 dark:text-gray-400"},Wt[3]||(Wt[3]=[p.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"})],-1)])),p.createElementVNode("button",{type:"button",onClick:j,class:"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded text-gray-500 dark:text-gray-400"},Wt[4]||(Wt[4]=[p.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])),p.createElementVNode("span",Lme,p.toDisplayString(R.value[w.value])+" "+p.toDisplayString(C.value),1),p.createElementVNode("button",{type:"button",onClick:tt,class:"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded text-gray-500 dark:text-gray-400"},Wt[5]||(Wt[5]=[p.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])),p.createElementVNode("button",{type:"button",onClick:wt,class:"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded text-gray-500 dark:text-gray-400"},Wt[6]||(Wt[6]=[p.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 5l7 7-7 7m-8-14l7 7-7 7"})],-1)]))]),p.createElementVNode("div",Ime,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(B.value,at=>(p.openBlock(),p.createElementBlock("div",{key:at,class:"text-center text-xs font-medium text-gray-500 dark:text-gray-400 py-1"},p.toDisplayString(at),1))),128))]),p.createElementVNode("div",Vme,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Se.value,(at,Ne)=>(p.openBlock(),p.createElementBlock("button",{key:Ne,type:"button",onClick:Oe=>je(at),disabled:te(at.date),class:p.normalizeClass(["w-8 h-8 text-sm rounded-full flex items-center justify-center transition-colors",{"text-gray-400 dark:text-gray-600":!at.currentMonth,"text-gray-900 dark:text-white":at.currentMonth&&!de(at.date)&&!te(at.date),"bg-blue-600 text-white hover:bg-blue-700":de(at.date),"ring-2 ring-blue-600 ring-offset-1 dark:ring-offset-gray-800":xt(at.date)&&!de(at.date),"hover:bg-gray-100 dark:hover:bg-gray-700":!de(at.date)&&!te(at.date),"opacity-50 cursor-not-allowed":te(at.date)}])},p.toDisplayString(at.day),11,Qme))),128))]),p.createElementVNode("div",zme,[p.createElementVNode("button",{type:"button",onClick:St,class:"text-sm text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"},p.toDisplayString(qt("clear")),1),p.createElementVNode("button",{type:"button",onClick:vt,class:"text-sm text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium"},p.toDisplayString(qt("today")),1)])],512),[[p.vShow,y.value]])]),p.createElementVNode("span",Hme,p.toDisplayString(r.error_message),1),p.createElementVNode("small",Zme,p.toDisplayString(r.description),1)],2))],64))}},Ume={key:0,class:"gl-label-form"},Wme={class:"mt-1 text-gray-900 dark:text-white"},Xme=["for"],qme={class:"flex justify-between gap-2 flex-col md:flex-row items-center"},jme={class:"w-full md:flex-1"},Gme={class:"text-gray-500 dark:text-gray-400 font-medium shrink-0 py-2 md:py-0"},Yme={class:"w-full md:flex-1"},Kme={key:1,class:"text-center mt-1"},Jme={class:"gl-span-form-error"},ege={key:2,class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Xne={__name:"GlDateRangePicker",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:Object,default:()=>({start:"",end:""})},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder_start:{type:String,default:"Start date"},placeholder_end:{type:String,default:"End date"},date_format:{type:String,default:"YYYY-MM-DD"},min_date_start:{type:String,default:null},max_date_start:{type:String,default:null},min_date_end:{type:String,default:null},max_date_end:{type:String,default:null},disabled_days:{type:Array,default:()=>[]},disabled_dates:{type:Array,default:()=>[]},locale:{type:String,default:"en"},separator:{type:String,default:"to"},container_class:{type:String,default:""}},emits:["update:modelValue","change"],setup(r,{emit:t}){const o=r,a=t,c=p.ref(""),f=p.ref({start:o.modelValue.start,end:o.modelValue.end});p.watch(()=>o.modelValue,X=>{X&&(f.value.start=X.start,f.value.end=X.end)},{immediate:!0,deep:!0});const h=X=>{if(!X)return null;let Y,he,Se;const te=X.split(/[-/]/);if(te.length!==3)return new Date(X);switch(o.date_format){case"DD-MM-YYYY":case"DD/MM/YYYY":Se=parseInt(te[0]),he=parseInt(te[1])-1,Y=parseInt(te[2]);break;case"MM-DD-YYYY":case"MM/DD/YYYY":he=parseInt(te[0])-1,Se=parseInt(te[1]),Y=parseInt(te[2]);break;case"YYYY/MM/DD":case"YYYY-MM-DD":default:Y=parseInt(te[0]),he=parseInt(te[1])-1,Se=parseInt(te[2]);break}const de=new Date(Y,he,Se);return isNaN(de.getTime())?null:de},y=p.computed(()=>f.value.start?f.value.start:o.min_date_end),w=p.computed(()=>f.value.end?f.value.end:o.max_date_start),C=(X,Y)=>{if(X&&Y){const he=h(X),Se=h(Y);if(he&&Se&&he>Se)return c.value="Start date cannot be after end date.",!1}return c.value="",!0},T=X=>{if(f.value.start=X,f.value.end){const Y=h(X),he=h(f.value.end);Y&&he&&Y>he&&(f.value.end="")}C(f.value.start,f.value.end),B()},R=X=>{if(f.value.end=X,f.value.start){const Y=h(f.value.start),he=h(X);Y&&he&&Y>he&&(f.value.start="")}C(f.value.start,f.value.end),B()},B=()=>{const X={start:f.value.start,end:f.value.end};a("update:modelValue",X),a("change",X)},V=p.computed(()=>o.error_message?o.error_message:""),q=p.computed(()=>"");return(X,Y)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[r.label_name?(p.openBlock(),p.createElementBlock("label",Ume,p.toDisplayString(r.label_name),1)):p.createCommentVNode("",!0),p.createElementVNode("p",Wme,p.toDisplayString(r.modelValue.start)+" "+p.toDisplayString(r.separator)+" "+p.toDisplayString(r.modelValue.end),1),Y[2]||(Y[2]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass({[r.field_name]:r.field_name&&r.field_name!=="",[r.container_class]:r.container_class&&r.container_class!==""})},[r.label_name?(p.openBlock(),p.createElementBlock("label",{key:0,class:p.normalizeClass({"gl-label-form":r.error_message==""&&c.value=="","gl-label-form-invalid":r.error_message!==""||c.value!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,Xme)):p.createCommentVNode("",!0),p.createElementVNode("div",qme,[p.createElementVNode("div",jme,[p.createVNode(bH,{modelValue:f.value.start,"onUpdate:modelValue":Y[0]||(Y[0]=he=>f.value.start=he),field_name:r.field_name+"_start",is_required:r.is_required,placeholder:r.placeholder_start,date_format:r.date_format,min_date:r.min_date_start,max_date:w.value,disabled_days:r.disabled_days,disabled_dates:r.disabled_dates,locale:r.locale,error_message:V.value,onChange:T},null,8,["modelValue","field_name","is_required","placeholder","date_format","min_date","max_date","disabled_days","disabled_dates","locale","error_message"])]),p.createElementVNode("span",Gme,p.toDisplayString(r.separator),1),p.createElementVNode("div",Yme,[p.createVNode(bH,{modelValue:f.value.end,"onUpdate:modelValue":Y[1]||(Y[1]=he=>f.value.end=he),field_name:r.field_name+"_end",is_required:r.is_required,placeholder:r.placeholder_end,date_format:r.date_format,min_date:y.value,max_date:r.max_date_end,disabled_days:r.disabled_days,disabled_dates:r.disabled_dates,locale:r.locale,error_message:q.value,onChange:R},null,8,["modelValue","field_name","is_required","placeholder","date_format","min_date","max_date","disabled_days","disabled_dates","locale","error_message"])])]),c.value||r.error_message?(p.openBlock(),p.createElementBlock("div",Kme,[p.createElementVNode("span",Jme,p.toDisplayString(r.error_message||c.value),1)])):p.createCommentVNode("",!0),r.description?(p.openBlock(),p.createElementBlock("small",ege,p.toDisplayString(r.description),1)):p.createCommentVNode("",!0)],2))],64))}},tge={class:"font-bold ptext-lg dark:text-white"},nge={class:"mb-4 text-base text-gray-900 dark:text-white"},oge=["for"],sge=["required","name","id","placeholder"],rge={class:"gl-span-form-error"},ige={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},age={__name:"GlTextInputFile",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:File,default:null},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:""}},emits:["update:modelValue","keydown"],setup(r,{emit:t}){const o=t,a=p.ref(null),c=f=>{const h=f.target.files[0];console.log(h),o("keydown",f),h&&o("update:modelValue",h)};return(f,h)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",tge,p.toDisplayString(r.label_name),1),p.createElementVNode("p",nge,p.toDisplayString(r.type=="password"?r.modelValue.replace(/./g,"*"):r.modelValue),1),h[0]||(h[0]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(r.field_name)},[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,oge),p.createElementVNode("input",{required:r.is_required,name:r.field_name,id:r.field_name,class:p.normalizeClass({"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!==""}),type:"file",onChange:c,ref_key:"input",ref:a,placeholder:r.placeholder},null,42,sge),p.createElementVNode("span",rge,p.toDisplayString(r.error_message),1),p.createElementVNode("small",ige,p.toDisplayString(r.description),1)],2))],64))}},lge=["onClick"],cge={class:"relative flex flex-col w-full min-w-0 mb-6 break-words rounded-[20px] border border-gray-200 dark:border-gray-800"},uge={class:"flex-auto px-4 py-5"},dge={class:"tab-content tab-space"},fge={__name:"GlTabsWrapper",props:{autoFlexTabs:{type:Boolean,default:!0},tabsWrapperClass:{type:String,default:""}},emits:["TabChange"],setup(r,{expose:t,emit:o}){const a=o,c=p.useSlots(),f=p.ref(c.default().map(R=>R.props)),h=p.ref("");p.provide("selectedTitle",h);const y=R=>R.trim().toLowerCase().replace(/\s+/g,"-"),w=R=>{const B=y(R);window.location.hash=encodeURIComponent(B),a("TabChange",R)};t({setActiveTab:R=>{f.value.find(V=>V.title===R)&&(h.value=R)}});const T=()=>{const R=decodeURIComponent(window.location.hash.replace("#","")),B=f.value.find(V=>y(V.title)===R);B&&(h.value=B.title)};return p.watch(h,R=>{w(R)}),p.onMounted(()=>{T(),window.addEventListener("hashchange",T)}),p.onBeforeUnmount(()=>{window.removeEventListener("hashchange",T)}),(R,B)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createElementVNode("ul",{class:p.normalizeClass(["flex flex-row flex-wrap gap-2 pt-3 pb-4 mb-0 list-none text-gray-500 dark:text-gray-400",r.tabsWrapperClass])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.value,V=>(p.openBlock(),p.createElementBlock("li",{key:V.title,onClick:q=>h.value=V.title,class:p.normalizeClass(["-mb-px text-center",{"flex-auto ":r.autoFlexTabs}])},[p.createElementVNode("a",{class:p.normalizeClass([{" bg-gray-50 dark:bg-gray-900 hover:text-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-white border border-gray-300 dark:border-gray-800":h.value!=V.title,"text-white bg-primary dark:bg-primaryDark":h.value===V.title},"block px-5 py-3 text-xs font-bold leading-normal rounded-lg tabs_buttons"])},[V.icon?(p.openBlock(),p.createElementBlock("i",{key:0,class:p.normalizeClass([V.icon,"me-2 text-sm"])},null,2)):p.createCommentVNode("",!0),p.createTextVNode(p.toDisplayString(V.title),1)],2)],10,lge))),128))],2),p.withDirectives(p.createElementVNode("div",cge,[p.createElementVNode("div",uge,[p.createElementVNode("div",dge,[p.renderSlot(R.$slots,"default")])])],512),[[p.vShow,h.value]])],64))}},hge={props:["title"],setup(){return{selectedTitle:p.inject("selectedTitle")}}},mge={key:0,class:"block"};function gge(r,t,o,a,c,f){return o.title==a.selectedTitle?(p.openBlock(),p.createElementBlock("div",mge,[p.renderSlot(r.$slots,"default")])):p.createCommentVNode("",!0)}const pge=vi(hge,[["render",gge]]),bge={props:["title"],setup(){return{selectedTitle:p.inject("selectedTitle")}}},yge={class:"block"};function Oge(r,t,o,a,c,f){return p.withDirectives((p.openBlock(),p.createElementBlock("div",yge,[p.renderSlot(r.$slots,"default")],512)),[[p.vShow,o.title==a.selectedTitle]])}const xge=vi(bge,[["render",Oge]]),vge={props:{elements_to_show_prop:{type:Number,default:3},hide_arrow:{type:Boolean,default:!1},disable_touch:{type:Boolean,default:!1},direction_property:{type:String,default:"ltr"},slider_arrows_indicators_position:{type:String,default:"arrows_outside_slider"},auto_play:{type:Boolean,default:!1},auto_play_interval:{type:Number,default:3}},data(){return{mutationObserver:null,elementsToShow:this.elements_to_show_prop,dotsNum:0,currentDot:1,dotsNavigation:[],touchStartX:0,isMoving:!1,initialX:0,initialY:0,Random_string:this.generateRandomString(6),autoPlayTimer:null}},mounted(){this.$nextTick(()=>{this.observeSlotChanges(),this.initSlider(),this.disable_touch||this.movingActions(),window.addEventListener("resize",this.resizeHandler),this.auto_play&&this.startAutoPlay()})},beforeDestroy(){window.removeEventListener("resize",this.resizeHandler),this.stopAutoPlay()},beforeUnmount(){this.mutationObserver&&this.mutationObserver.disconnect(),this.stopAutoPlay()},methods:{observeSlotChanges(){const r=this.$refs.slotContainer;r&&(this.mutationObserver=new MutationObserver(t=>{t.forEach(o=>{this.initSlider()})}),this.mutationObserver.observe(r,{childList:!0,subtree:!0}))},resizeHandler(){this.initSlider()},sliderIndicatorsAction(){let r="";return this.direction_property==="rtl"&&(r+=" space-x-reverse "),this.slider_arrows_indicators_position==="arrows_indicators_inside_slider"&&(r+=" slider_indicators "),r},sliderContainerAction(){let r="";return!this.hide_arrow&&this.slider_arrows_indicators_position==="arrows_outside_slider"?r+=" w-12/12 xl:w-8/12 xxl:w-8/12 md:w-8/12 sm:w-8/12":this.slider_arrows_indicators_position!=="arrows_outside_slider"&&(r+=" w-12/12 "),r},generateRandomString(r){let t="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=o.length;for(let c=0;c<r;c++)t+=o.charAt(Math.floor(Math.random()*a));return t},movingActions(){},next(){this.currentDot<this.dotsNavigation.length?(this.currentDot++,this.setDot(this.currentDot)):this.auto_play&&(this.currentDot=1,this.setDot(this.currentDot))},prev(){this.currentDot>1&&(this.currentDot--,this.setDot(this.currentDot))},startAutoPlay(){this.stopAutoPlay(),this.autoPlayTimer=setInterval(()=>{this.next()},this.auto_play_interval*1e3)},stopAutoPlay(){this.autoPlayTimer&&(clearInterval(this.autoPlayTimer),this.autoPlayTimer=null)},pauseAutoPlay(){this.stopAutoPlay()},resumeAutoPlay(){this.auto_play&&this.startAutoPlay()},initSlider(){let r=document.getElementById("sliderContainer_"+this.Random_string),t=document.getElementById("mainSliderContainer_"+this.Random_string),o=document.getElementById("slider_"+this.Random_string),a=Array.from(o.querySelectorAll("li")).filter(h=>h.parentNode===o),c=r.clientWidth,f=c/this.elementsToShow;if(this.elementsToShow>1?document.body.clientWidth<1e3?(this.elementsToShow=1,f=this.hide_arrow?t.clientWidth:c):document.body.clientWidth<1500&&(this.elementsToShow=2):(this.elementsToShow=1,f=this.hide_arrow?t.clientWidth:c),a.length>1){this.dotsNum=this.elementsToShow===1?a.length:a.length-this.elementsToShow+1;let h=this.elementsToShow===1?f*a.length/this.dotsNum:f*(a.length-this.elementsToShow)/(this.dotsNum-1);this.dotsNavigation=Array.from({length:this.dotsNum},(y,w)=>h*w)}o.style.width=`${a.length*f}px`,a.forEach(h=>h.style.width=`${f}px`)},setDot(r){let t=document.getElementById("slider_"+this.Random_string);this.direction_property==="rtl"?t.style.marginRight=-this.dotsNavigation[r-1]+"px":t.style.marginLeft=-this.dotsNavigation[r-1]+"px",this.currentDot=r,this.auto_play&&this.startAutoPlay()}}},wge=["id"],Sge={key:0,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},kge={class:"w-full"},Cge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Ege={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},_ge=["id"],Tge=["id"],Age={class:"w-full"},Pge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Dge={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Nge={class:"w-full"},$ge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Rge={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Bge=["onClick"],Mge={key:1,class:"flex justify-between pl-5 pr-5"},Fge=["onClick"],Lge={key:0,class:"flex"},Ige={class:"flex items-center"},Vge={class:"w-full"},Qge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},zge={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Hge={class:"flex items-center"},Zge={class:"w-full"},Uge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Wge={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Xge={key:1,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},qge={class:"w-full"},jge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Gge={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"};function Yge(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",null,[p.createElementVNode("div",{class:p.normalizeClass(["",!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?"flex":"relative block"]),id:"mainSliderContainer_"+c.Random_string},[c.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(p.openBlock(),p.createElementBlock("div",Sge,[p.createElementVNode("div",kge,[p.createElementVNode("button",{class:"p-3 mr-5 rounded-full shadow-lg arrow_button_styles",onClick:t[0]||(t[0]=h=>f.prev())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Cge,t[6]||(t[6]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Ege,t[7]||(t[7]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)])])])):p.createCommentVNode("",!0),p.createElementVNode("div",{ref:"slotContainer",class:p.normalizeClass(["overflow-hidden flex flex-col gap-3",f.sliderContainerAction()]),id:"sliderContainer_"+c.Random_string},[p.createElementVNode("ul",{class:p.normalizeClass(["flex duration-700 ease-in-out",o.elements_to_show_prop==1||this.elementsToShow==1?"":"gap-7"]),id:"slider_"+c.Random_string},[c.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["items-center justify-center hidden arrow_button xl:flex xxl:flex md:flex sm:flex",o.direction_property=="rtl"?"arrow_button_next":"arrow_button_prev"])},[p.createElementVNode("div",Age,[p.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:t[1]||(t[1]=p.withModifiers(h=>f.prev(),["stop"]))},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Pge,t[8]||(t[8]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Dge,t[9]||(t[9]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)])])],2)):p.createCommentVNode("",!0),p.renderSlot(r.$slots,"default",{},void 0,!0),c.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["items-center justify-center hidden xl:flex xxl:flex md:flex sm:flex arrow_button",o.direction_property=="rtl"?"arrow_button_prev":"arrow_button_next"])},[p.createElementVNode("div",Nge,[p.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:t[2]||(t[2]=p.withModifiers(h=>f.next(),["stop"]))},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",$ge,t[10]||(t[10]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Rge,t[11]||(t[11]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])],2)):p.createCommentVNode("",!0)],10,Tge),o.slider_arrows_indicators_position!="arrows_indicators_below_slider"?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["flex justify-center mb-1 space-x-1",f.sliderIndicatorsAction()])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c.dotsNum,h=>(p.openBlock(),p.createElementBlock("button",{role:"button",class:p.normalizeClass(["gl-dot",{active:c.currentDot==h}]),key:h,onClick:y=>f.setDot(h)},t[12]||(t[12]=[p.createElementVNode("span",null,null,-1)]),10,Bge))),128))],2)):p.createCommentVNode("",!0),o.slider_arrows_indicators_position=="arrows_indicators_below_slider"?(p.openBlock(),p.createElementBlock("div",Mge,[p.createElementVNode("div",{class:p.normalizeClass(["flex justify-center mb-1 space-x-1",f.sliderIndicatorsAction()])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c.dotsNum,h=>(p.openBlock(),p.createElementBlock("button",{role:"button",class:p.normalizeClass(["gl-dot",{active:c.currentDot==h}]),key:h,onClick:y=>f.setDot(h)},t[13]||(t[13]=[p.createElementVNode("span",null,null,-1)]),10,Fge))),128))],2),c.dotsNum>0?(p.openBlock(),p.createElementBlock("div",Lge,[p.createElementVNode("div",Ige,[p.createElementVNode("div",Vge,[p.createElementVNode("button",{class:p.normalizeClass(["p-3 rounded-full arrow_button_styles",o.direction_property=="rtl"?"ml-3":"mr-3"]),onClick:t[3]||(t[3]=h=>f.prev())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Qge,t[14]||(t[14]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",zge,t[15]||(t[15]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)],2)])]),p.createElementVNode("div",Hge,[p.createElementVNode("div",Zge,[p.createElementVNode("button",{class:"p-3 rounded-full arrow_button_styles",onClick:t[4]||(t[4]=h=>f.next())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Uge,t[16]||(t[16]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Wge,t[17]||(t[17]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])])])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)],10,_ge),c.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(p.openBlock(),p.createElementBlock("div",Xge,[p.createElementVNode("div",qge,[p.createElementVNode("button",{class:"p-3 ml-5 rounded-full shadow-lg arrow_button_styles",onClick:t[5]||(t[5]=h=>f.next())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",jge,t[18]||(t[18]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Gge,t[19]||(t[19]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])])):p.createCommentVNode("",!0)],10,wge)])}const Kge=vi(vge,[["render",Yge],["__scopeId","data-v-f05f6689"]]),Jge={props:{elements_to_show_prop:{type:Number,default:3},element_size:{type:Number,default:80},hide_arrow:{type:Boolean,default:!1},hide_indicators:{type:Boolean,default:!1},disable_touch:{type:Boolean,default:!1},direction_property:{type:String,default:"ltr"},slider_arrows_indicators_position:{type:String,default:"arrows_outside_slider"}},data:function(){return{mutationObserver:null,elementsToShow:3,dotsNum:0,currentDot:1,dotsNavigation:[],touchStartX:0,isMoving:!1,initialX:0,initialY:0,slide_size:0,Random_string:this.generateRandomString(6)}},mounted(){this.elementsToShow=this.elements_to_show_prop,this.observeSlotChanges(),this.initSlider(),this.disable_touch||this.movingActions()},beforeUnmount(){this.mutationObserver&&this.mutationObserver.disconnect()},methods:{observeSlotChanges(){const r=this.$refs.slotContainer;r&&(this.mutationObserver=new MutationObserver(t=>{t.forEach(o=>{this.initSlider()})}),this.mutationObserver.observe(r,{childList:!0,subtree:!0}))},sliderIndicatorsAction(){var r="";return this.direction_property=="rtl"&&(r+=" space-x-reverse "),this.slider_arrows_indicators_position=="arrows_indicators_inside_slider"&&(r+=" slider_indicators "),r},sliderContainerAction(){var r="";return!this.hide_arrow&&this.slider_arrows_indicators_position=="arrows_outside_slider"||this.slider_arrows_indicators_position!="arrows_outside_slider",r},generateRandomString(r){let t="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=o.length;for(let c=0;c<r;c++)t+=o.charAt(Math.floor(Math.random()*a));return t},movingActions(){let r=this,t=document.getElementById("slider_"+this.Random_string);const o=c=>{t.style.cursor="grabbing";const f=y=>{const w=y.clientX||y.touches&&y.touches[0]&&y.touches[0].clientX,C=y.clientY||y.touches&&y.touches[0]&&y.touches[0].clientY,T=w-r.initialX,R=C-r.initialY;Math.abs(T)>Math.abs(R)?(y.preventDefault(),Math.abs(T)>=70&&(T<0?r.next():r.prev(),r.initialX=w)):t.style.cursor="grab",Math.abs(R)>Math.abs(T)&&(t.style.cursor="grab")},h=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("touchmove",f),document.removeEventListener("mouseup",h),document.removeEventListener("touchend",h),t.style.cursor="grab"};document.addEventListener("mousemove",f),document.addEventListener("touchmove",f,{passive:!1}),document.addEventListener("mouseup",h),document.addEventListener("touchend",h),r.initialX=c.clientX||c.touches&&c.touches[0]&&c.touches[0].clientX,r.initialY=c.clientY||c.touches&&c.touches[0]&&c.touches[0].clientY},a=c=>{c.key==="ArrowLeft"?r.prev():c.key==="ArrowRight"&&r.next()};t.addEventListener("mousedown",o),t.addEventListener("touchstart",o),document.addEventListener("keydown",a)},next(){this.currentDot<this.dotsNavigation.length&&(this.currentDot++,this.setDot(this.currentDot))},prev(){this.currentDot>1&&(this.currentDot--,this.setDot(this.currentDot))},initSlider(){let r=document.getElementById("sliderContainer_"+this.Random_string),t=document.getElementById("mainSliderContainer_"+this.Random_string),o=document.getElementById("slider_"+this.Random_string),a=o.querySelectorAll("li"),c=Array.from(a).filter(y=>y.parentNode===o);c[0];let f=this.element_size+28,h=r.clientWidth;if(this.elementsToShow=Math.floor(this.hide_arrow?t.clientWidth/f:h/f),f=(this.hide_arrow?t.clientWidth:h)/this.elementsToShow-28,c.length>1){this.dotsNum=Math.ceil(c.length/this.elementsToShow);let y=this.hide_arrow?t.clientWidth:h;this.dotsNavigation=[];for(let w=0;w<this.dotsNum;w++)this.dotsNavigation.push(y*w)}o.style.transition="margin",o.style.transitionDuration="1s";for(let y=0;y<c.length;y++){const w=c[y];w.style.width=f+"px",w.style.minWidth=f+"px"}},setDot(r){let t=document.getElementById("slider_"+this.Random_string);this.direction_property=="rtl"?t.style.marginRight=-this.dotsNavigation[r-1]+"px":t.style.marginLeft=-this.dotsNavigation[r-1]+"px",this.currentDot=r}}},epe=["id"],tpe={key:0,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},npe={class:"w-full"},ope={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},spe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},rpe=["id"],ipe=["id"],ape={class:"w-full"},lpe={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},cpe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},upe={class:"w-full"},dpe={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},fpe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},hpe=["onClick"],mpe={key:1,class:"flex justify-between pl-5 pr-5"},gpe=["onClick"],ppe={key:0,class:"flex"},bpe={class:"flex items-center"},ype={class:"w-full"},Ope={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},xpe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},vpe={class:"flex items-center"},wpe={class:"w-full"},Spe={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},kpe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Cpe={key:1,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},Epe={class:"w-full"},_pe={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Tpe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"};function Ape(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",null,[p.createElementVNode("div",{class:p.normalizeClass(["w-full",!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?"flex":"relative block"]),id:"mainSliderContainer_"+r.Random_string},[r.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(p.openBlock(),p.createElementBlock("div",tpe,[p.createElementVNode("div",npe,[p.createElementVNode("button",{class:"p-3 mr-5 rounded-full shadow-lg arrow_button_styles",onClick:t[0]||(t[0]=h=>f.prev())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",ope,t[6]||(t[6]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",spe,t[7]||(t[7]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)])])])):p.createCommentVNode("",!0),p.createElementVNode("div",{class:p.normalizeClass(["overflow-hidden flex flex-col gap-3 w-full w-12/12",f.sliderContainerAction()]),id:"sliderContainer_"+r.Random_string},[p.createElementVNode("ul",{ref:"slotContainer",class:p.normalizeClass(["flex w-full",o.elements_to_show_prop==1?"":"gap-7"]),id:"slider_"+r.Random_string},[r.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["items-center justify-center hidden arrow_button xl:flex xxl:flex md:flex sm:flex",o.direction_property=="rtl"?"arrow_button_next":"arrow_button_prev"])},[p.createElementVNode("div",ape,[p.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:t[1]||(t[1]=p.withModifiers(h=>f.prev(),["stop"]))},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",lpe,t[8]||(t[8]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",cpe,t[9]||(t[9]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)])])],2)):p.createCommentVNode("",!0),p.renderSlot(r.$slots,"default",{},void 0,!0),r.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["items-center justify-center hidden xl:flex xxl:flex md:flex sm:flex arrow_button",o.direction_property=="rtl"?"arrow_button_prev":"arrow_button_next"])},[p.createElementVNode("div",upe,[p.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:t[2]||(t[2]=p.withModifiers(h=>f.next(),["stop"]))},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",dpe,t[10]||(t[10]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",fpe,t[11]||(t[11]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])],2)):p.createCommentVNode("",!0)],10,ipe),!o.hide_indicators&&o.slider_arrows_indicators_position!="arrows_indicators_below_slider"?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["flex justify-center mb-1 space-x-1",f.sliderIndicatorsAction()])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.dotsNum,h=>(p.openBlock(),p.createElementBlock("button",{role:"button",class:p.normalizeClass(["gl-dot",{active:r.currentDot==h}]),key:h,onClick:y=>f.setDot(h)},t[12]||(t[12]=[p.createElementVNode("span",null,null,-1)]),10,hpe))),128))],2)):p.createCommentVNode("",!0),!o.hide_indicators&&o.slider_arrows_indicators_position=="arrows_indicators_below_slider"?(p.openBlock(),p.createElementBlock("div",mpe,[p.createElementVNode("div",{class:p.normalizeClass(["flex justify-center mb-1 space-x-1",f.sliderIndicatorsAction()])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.dotsNum,h=>(p.openBlock(),p.createElementBlock("button",{role:"button",class:p.normalizeClass(["gl-dot",{active:r.currentDot==h}]),key:h,onClick:y=>f.setDot(h)},t[13]||(t[13]=[p.createElementVNode("span",null,null,-1)]),10,gpe))),128))],2),r.dotsNum>0?(p.openBlock(),p.createElementBlock("div",ppe,[p.createElementVNode("div",bpe,[p.createElementVNode("div",ype,[p.createElementVNode("button",{class:p.normalizeClass(["p-3 rounded-full arrow_button_styles",o.direction_property=="rtl"?"ml-3":"mr-3"]),onClick:t[3]||(t[3]=h=>f.prev())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Ope,t[14]||(t[14]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",xpe,t[15]||(t[15]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)],2)])]),p.createElementVNode("div",vpe,[p.createElementVNode("div",wpe,[p.createElementVNode("button",{class:"p-3 rounded-full arrow_button_styles",onClick:t[4]||(t[4]=h=>f.next())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Spe,t[16]||(t[16]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",kpe,t[17]||(t[17]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])])])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)],10,rpe),r.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(p.openBlock(),p.createElementBlock("div",Cpe,[p.createElementVNode("div",Epe,[p.createElementVNode("button",{class:"p-3 ml-5 rounded-full shadow-lg arrow_button_styles",onClick:t[5]||(t[5]=h=>f.next())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",_pe,t[18]||(t[18]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Tpe,t[19]||(t[19]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])])):p.createCommentVNode("",!0)],10,epe)])}const Ppe=vi(Jge,[["render",Ape],["__scopeId","data-v-4c7f63bd"]]),Dpe={class:"w-full bg-white rounded-[20px] shadow-sm dark:border md:mt-0 p-2 dark:bg-gray-900 dark:border-gray-800"},Npe={class:"pointer-events-auto relative flex max-h-[100%] w-full flex-col text-current shadow-4 outline-hidden bg-white border rounded-xl dark:bg-gray-900 dark:border-gray-800"},$pe={class:"flex items-center justify-between shrink-0 pt-3 pb-3 pl-3 pr-3"},Rpe={class:"text-xl font-medium leading-normal text-surface dark:text-white"},Bpe={key:0,role:"status",class:"max-w-full p-4 border border-gray-200 rounded-sm shadow-sm animate-pulse md:p-6 dark:border-gray-700"},Mpe={class:"flex flex-wrap items-center justify-end shrink-0 p-4 rounded-b-md gap-2"},Fpe={__name:"GlModal",props:{language:{type:Object,required:!1,default:()=>{}},is_open:{type:Boolean,default:!1},hide_model_footer:{type:Boolean,default:!1},is_loading:{type:Boolean,default:!1},has_large_z_index:{type:Boolean,default:!1},title:{type:String,default:""},max_width:{type:String,default:"max-w-2xl"},bodyClass:{type:String,default:"p-4"}},emits:["closeModal"],setup(r,{emit:t}){const o=r,a=t,c=()=>{document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight="0px"},f=()=>{document.documentElement.style.overflow="",document.documentElement.style.paddingRight=""},h=()=>{a("closeModal"),f()},y=p.computed(()=>o.is_loading);return p.watch(()=>o.is_open,(w,C)=>{w?c():f()},{immediate:!0,deep:!0}),(w,C)=>{var T;return r.is_open?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["fixed h-full w-full overflow-y-auto overflow-x-hidden outline-hidden inset-0 bg-black/80! min-w-full",r.has_large_z_index?"z-9999":"z-1055"]),tabindex:"-1"},[p.createElementVNode("div",{class:p.normalizeClass(["pointer-events-none relative w-auto transition-all duration-300 ease-in-out min-[576px]:mx-auto mt-2",r.max_width])},[p.createElementVNode("div",Dpe,[p.createElementVNode("div",Npe,[p.createElementVNode("div",$pe,[p.createElementVNode("h5",Rpe,p.toDisplayString(r.title),1),p.createElementVNode("button",{type:"button",class:"box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-hidden dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",onClick:h,"aria-label":"Close"},C[0]||(C[0]=[p.createElementVNode("span",{class:"[&>svg]:h-6 [&>svg]:w-6"},[p.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1)]))]),y.value?(p.openBlock(),p.createElementBlock("div",Bpe,C[1]||(C[1]=[p.createStaticVNode('<div class="flex items-center justify-center h-48 mb-4 bg-gray-300 rounded-sm dark:bg-gray-700"><svg class="w-10 h-10 text-gray-200 dark:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 20"><path d="M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"></path><path d="M5 5V.13a2.96 2.96 0 0 0-1.293.749L.879 3.707A2.98 2.98 0 0 0 .13 5H5Z"></path></svg></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div><div class="flex items-center mt-4"><svg class="w-10 h-10 text-gray-200 me-3 dark:text-gray-700" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"></div><div class="w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div></div></div><span class="sr-only">Loading...</span>',7)]))):p.createCommentVNode("",!0),p.withDirectives(p.createElementVNode("div",{class:p.normalizeClass(["relative gl_modal_body",r.bodyClass])},[p.renderSlot(w.$slots,"body")],2),[[p.vShow,!y.value]]),p.withDirectives(p.createElementVNode("div",Mpe,[p.renderSlot(w.$slots,"buttons"),p.createElementVNode("button",{onClick:h,type:"button",class:"px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-hidden focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-700"},p.toDisplayString(((T=r.language)==null?void 0:T.close)??"Close"),1)],512),[[p.vShow,!y.value&&!r.hide_model_footer]])])])],2)],2)):p.createCommentVNode("",!0)}}},Lpe={class:"w-full bg-white rounded-[20px] shadow-sm dark:border md:mt-0 p-2 dark:bg-gray-900 dark:border-gray-800"},Ipe={class:"relative flex flex-col w-full text-current bg-white border outline-hidden pointer-events-auto shadow-4 border-stroke rounded-xl dark:bg-gray-900 dark:border-gray-800"},Vpe={key:0,class:"flex items-center justify-between shrink-0 pt-10 pb-3 pl-3 pr-3 border-b-2 dark:border-gray-600"},Qpe={class:"text-xl font-medium leading-normal text-surface dark:text-white"},zpe={key:1,role:"status",class:"max-w-full p-4 border border-gray-200 rounded-sm shadow-sm animate-pulse md:p-6 dark:border-gray-700"},Hpe={key:2,class:"flex flex-wrap items-center justify-end shrink-0 p-4 border-t-2 rounded-b-md border-neutral-100 dark:border-gray-600 gap-2"},Zpe={__name:"GlModalWithoutOverflow",props:{is_open:{type:Boolean,default:!1},is_loading:{type:Boolean,default:!1},has_large_z_index:{type:Boolean,default:!1},has_header:{type:Boolean,default:!0},has_footer:{type:Boolean,default:!0},title:{type:String,default:""},max_width:{type:String,default:"max-w-2xl"},bodyClass:{type:String,default:"p-4"}},emits:["closeModal"],setup(r,{emit:t}){const o=r,a=t,c=()=>{document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight="0px"},f=()=>{document.documentElement.style.overflow="",document.documentElement.style.paddingRight=""},h=()=>{a("closeModal"),f()};return p.watch(()=>o.is_open,(y,w)=>{y?c():f()},{immediate:!0,deep:!0}),p.onBeforeUnmount(()=>{f()}),(y,w)=>r.is_open?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["fixed h-full w-full overflow-y-auto outline-hidden inset-0 bg-black/80!",r.has_large_z_index?"z-9999":"z-1055"]),tabindex:"-1","aria-hidden":"true"},[p.createElementVNode("div",{class:p.normalizeClass(["pointer-events-none relative w-auto translate-y-[-50px] transition-all duration-300 ease-in-out min-[576px]:mx-auto mt-7",r.max_width])},[p.createElementVNode("div",Lpe,[p.createElementVNode("div",Ipe,[r.has_header?(p.openBlock(),p.createElementBlock("div",Vpe,[p.createElementVNode("h5",Qpe,p.toDisplayString(r.title),1),p.createElementVNode("button",{type:"button",class:"box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-hidden dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",onClick:h,"aria-label":"Close"},w[0]||(w[0]=[p.createElementVNode("span",{class:"[&>svg]:h-6 [&>svg]:w-6"},[p.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1)]))])):p.createCommentVNode("",!0),r.is_loading?(p.openBlock(),p.createElementBlock("div",zpe,w[1]||(w[1]=[p.createStaticVNode('<div class="flex items-center justify-center h-48 mb-4 bg-gray-300 rounded-sm dark:bg-gray-700"><svg class="w-10 h-10 text-gray-200 dark:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 20"><path d="M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"></path><path d="M5 5V.13a2.96 2.96 0 0 0-1.293.749L.879 3.707A2.98 2.98 0 0 0 .13 5H5Z"></path></svg></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div><div class="flex items-center mt-4"><svg class="w-10 h-10 text-gray-200 me-3 dark:text-gray-700" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"></div><div class="w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div></div></div><span class="sr-only">Loading...</span>',7)]))):p.createCommentVNode("",!0),p.withDirectives(p.createElementVNode("div",{class:p.normalizeClass(["relative gl_modal_body",r.bodyClass])},[p.renderSlot(y.$slots,"body")],2),[[p.vShow,!r.is_loading]]),r.has_footer?p.withDirectives((p.openBlock(),p.createElementBlock("div",Hpe,[p.renderSlot(y.$slots,"buttons"),p.createElementVNode("button",{onClick:h,type:"button",class:"px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-hidden focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Close ")],512)),[[p.vShow,!r.is_loading]]):p.createCommentVNode("",!0)])])],2)],2)):p.createCommentVNode("",!0)}},Upe={class:"w-full bg-white rounded-[20px] shadow-sm dark:border md:mt-0 p-2 dark:bg-gray-900 dark:border-gray-800"},Wpe={class:"pointer-events-auto relative flex max-h-[100%] w-full flex-col overflow-hidden text-current shadow-4 outline-hidden bg-white border rounded-xl dark:bg-gray-900 dark:border-gray-800"},Xpe={class:"flex items-center justify-between shrink-0 pt-3 pb-3 pl-3 pr-3"},qpe={class:"text-xl font-medium leading-normal text-surface dark:text-white"},jpe={key:0,role:"status",class:"max-w-full p-4 border border-gray-200 rounded-sm shadow-sm animate-pulse md:p-6 dark:border-gray-700"},Gpe={class:"flex flex-wrap items-center justify-end shrink-0 p-4 rounded-b-md gap-2"},Ype={__name:"GlModalShow",props:{language:{type:Object,required:!1,default:()=>{}},is_open:{type:Boolean,default:!1},is_loading:{type:Boolean,default:!1},has_large_z_index:{type:Boolean,default:!1},title:{type:String,default:""},max_width:{type:String,default:"max-w-2xl"},bodyClass:{type:String,default:"p-4"}},emits:["closeModal"],setup(r,{emit:t}){const o=r,a=t,c=()=>{document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight="0px"},f=()=>{document.documentElement.style.overflow="",document.documentElement.style.paddingRight=""},h=()=>{a("closeModal"),f()};return p.watch(()=>o.is_open,(y,w)=>{y?c():f()},{immediate:!0,deep:!0}),(y,w)=>{var C;return p.withDirectives((p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["fixed h-full w-full overflow-y-auto overflow-x-hidden outline-hidden inset-0 bg-black/80!",r.has_large_z_index?"z-9999":"z-1055"]),tabindex:"-1"},[p.createElementVNode("div",{class:p.normalizeClass(["pointer-events-none relative h-[calc(100%-1rem)] w-auto transition-all duration-300 ease-in-out min-[576px]:mx-auto mt-7 min-[576px]:h-[calc(100%-3.5rem)]",r.max_width])},[p.createElementVNode("div",Upe,[p.createElementVNode("div",Wpe,[p.createElementVNode("div",Xpe,[p.createElementVNode("h5",qpe,p.toDisplayString(r.title),1),p.createElementVNode("button",{type:"button",class:"box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-hidden dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",onClick:h,"aria-label":"Close"},w[0]||(w[0]=[p.createElementVNode("span",{class:"[&>svg]:h-6 [&>svg]:w-6"},[p.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1)]))]),r.is_loading?(p.openBlock(),p.createElementBlock("div",jpe,w[1]||(w[1]=[p.createStaticVNode('<div class="flex items-center justify-center h-48 mb-4 bg-gray-300 rounded-sm dark:bg-gray-700"><svg class="w-10 h-10 text-gray-200 dark:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 20"><path d="M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"></path><path d="M5 5V.13a2.96 2.96 0 0 0-1.293.749L.879 3.707A2.98 2.98 0 0 0 .13 5H5Z"></path></svg></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div><div class="flex items-center mt-4"><svg class="w-10 h-10 text-gray-200 me-3 dark:text-gray-700" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"></div><div class="w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div></div></div><span class="sr-only">Loading...</span>',7)]))):p.createCommentVNode("",!0),p.withDirectives(p.createElementVNode("div",{class:p.normalizeClass(["relative overflow-y-auto gl_modal_body",r.bodyClass])},[p.renderSlot(y.$slots,"body")],2),[[p.vShow,!r.is_loading]]),p.withDirectives(p.createElementVNode("div",Gpe,[p.renderSlot(y.$slots,"buttons"),p.createElementVNode("button",{onClick:h,type:"button",class:"px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-hidden focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"},p.toDisplayString(((C=r.language)==null?void 0:C.close)??"Close"),1)],512),[[p.vShow,!r.is_loading]])])])],2)],2)),[[p.vShow,r.is_open]])}}},Kpe={class:"flex justify-between p-2 -mb-px border border-gray-300 no-underlin"},Jpe={class:"relative inline-flex items-center cursor-pointer"},e0e=["name","id","checked"],t0e={key:0,class:"flex justify-between items-center"},n0e={class:"gl-label-form"},o0e={class:"flex justify-between p-2 -mb-px border rounded-lg no-underlin bg-gray-50 focus:border-primary dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:focus:border-primaryDark border-gray-200"},s0e={class:"relative inline-flex items-center cursor-pointer"},r0e=["name","id"],i0e={class:"gl-span-form-error"},a0e={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},l0e={__name:"GlToggleBox",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:String,required:!0},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},has_label_up:{type:Boolean,default:!1},description:{type:String,default:""}},emits:["update:modelValue"],setup(r,{emit:t}){const o=r,a=t,c=p.ref(null),f=p.computed({get(){return o.modelValue},set(h){a("update:modelValue",h)}});return(h,y)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("div",null,[p.createElementVNode("li",Kpe,[p.createTextVNode(p.toDisplayString(r.label_name)+" ",1),p.createElementVNode("label",Jpe,[p.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:r.field_name,id:r.field_name,checked:r.modelValue,"true-value":1,"false-value":0,ref_key:"input",ref:c,disabled:""},null,8,e0e),y[1]||(y[1]=p.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),y[2]||(y[2]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(r.field_name)},[r.has_label_up?(p.openBlock(),p.createElementBlock("div",t0e,[p.createElementVNode("label",n0e,p.toDisplayString(r.label_name),1)])):p.createCommentVNode("",!0),p.createElementVNode("li",o0e,[p.createTextVNode(p.toDisplayString(r.label_name)+" ",1),p.createElementVNode("label",s0e,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:r.field_name,id:r.field_name,"true-value":1,"false-value":0,ref_key:"input",ref:c,"onUpdate:modelValue":y[0]||(y[0]=w=>f.value=w)},null,8,r0e),[[p.vModelCheckbox,f.value]]),y[3]||(y[3]=p.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-hidden rounded-full peer dark:bg-gray-500 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-400 peer-checked:bg-primary dark:peer-checked:bg-primaryDark"},null,-1))])]),p.createElementVNode("span",i0e,p.toDisplayString(r.error_message),1),p.createElementVNode("small",a0e,p.toDisplayString(r.description),1)],2))],64))}},c0e={class:"flex justify-between p-2 -mb-px border border-gray-300 no-underlin"},u0e={class:"relative inline-flex items-center cursor-pointer"},d0e=["name","id","checked"],f0e={key:0,class:"flex justify-between items-center"},h0e={class:"gl-label-form"},m0e={class:"flex justify-between p-2 -mb-px border border-gray-200 rounded-lg no-underlin dark:border-gray-600 dark:focus:border-primaryDark"},g0e={class:"relative inline-flex items-center cursor-pointer"},p0e=["name","id"],b0e={class:"gl-span-form-error"},y0e={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},O0e={__name:"GlToggleBoxTrueFalse",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:Boolean,default:!1},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},has_label_up:{type:Boolean,default:!1},description:{type:String,default:""}},emits:["update:modelValue"],setup(r,{emit:t}){const o=r,a=t,c=p.ref(null),f=p.computed({get(){return o.modelValue},set(h){a("update:modelValue",h)}});return(h,y)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("div",null,[p.createElementVNode("li",c0e,[p.createTextVNode(p.toDisplayString(r.label_name)+" ",1),p.createElementVNode("label",u0e,[p.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:r.field_name,id:r.field_name,checked:r.modelValue,ref_key:"input",ref:c,disabled:""},null,8,d0e),y[1]||(y[1]=p.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),y[2]||(y[2]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(r.field_name)},[r.has_label_up?(p.openBlock(),p.createElementBlock("div",f0e,[p.createElementVNode("label",h0e,p.toDisplayString(r.label_name),1)])):p.createCommentVNode("",!0),p.createElementVNode("li",m0e,[p.createTextVNode(p.toDisplayString(r.label_name)+" ",1),p.createElementVNode("label",g0e,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:r.field_name,id:r.field_name,ref_key:"input",ref:c,"onUpdate:modelValue":y[0]||(y[0]=w=>f.value=w)},null,8,p0e),[[p.vModelCheckbox,f.value]]),y[3]||(y[3]=p.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),p.createElementVNode("span",b0e,p.toDisplayString(r.error_message),1),p.createElementVNode("small",y0e,p.toDisplayString(r.description),1)],2))],64))}},x0e={class:"font-bold ptext-lg dark:text-white"},v0e={class:"mt-3 mb-4"},w0e={class:"bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300"},S0e=["name","id","value"],k0e={key:0,class:"dropdown"},C0e={class:"relative focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"},E0e={class:"relative showOptions"},_0e=["value","placeholder"],T0e={class:"text-gray-700 bg-white border dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 absolute w-full z-999999999 rounded-md mt-1 pt-1"},A0e={key:0,class:"border-b border-gray-200 dark:border-gray-700"},P0e={class:"relative"},D0e=["id","placeholder"],N0e=["onClick","onMousedown","id"],$0e={class:"flex items-center py-2 pr-4"},R0e={key:0,class:"absolute flex items-center shrink-0 w-4 h-4 text-green-500 ltr:right-2 rtl:left-2 dark:text-green-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},B0e=["innerHTML"],M0e={key:1,class:"p-2 text-center text-gray-500"},F0e={key:2,class:"p-2 text-gray-500"},L0e={class:"block mt-1 text-sm font-normal leading-5 text-red-500"},I0e={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},qne={__name:"GlDropdown",props:{modelValue:{type:[String,Number],default:""},defaultValue:{type:[String,Number],default:""},field_name:{type:String,default:""},is_required:{type:Boolean,default:!1},has_cancel:{type:Boolean,default:!0},label_name:{type:String,default:""},options:{type:Array,required:!0,default:()=>[],note:"Options of dropdown. An array of options with id and name"},placeholder:{type:String,required:!1,default:"Please select an option",note:"Placeholder of dropdown"},search_input_placeholder:{type:String,required:!1,default:"Search ...",note:"Placeholder of search input"},no_results_found_placeholder:{type:String,required:!1,default:"No results found",note:"Placeholder of no results found"},maxItem:{type:Number,required:!1,default:1e4,note:"Max items showing"},show:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""},api_url:{type:String,default:"",required:!1},hide_search:{type:Boolean,default:!1},options_top_size:{type:Number,default:22}},emits:["update:modelValue","selected","selectionChanged"],setup(r,{emit:t}){const o=r,a=t;p.ref(null);const c=p.ref({}),f=p.ref(!1),h=p.ref(0),y=p.ref(!1),w=p.ref(""),C=p.ref(""),T=p.ref(!1),R=p.ref(1),B=p.ref(null),V=p.ref(1),q=p.ref([]),X=p.ref([]),Y=p.ref(null),he=p.ref(null),Se=async(at="down")=>{if(!T.value){T.value=!0;try{const Ne=at==="up"?Math.max(R.value-1,V):R.value,{data:Oe}=await axios.get(o.api_url,{params:{search:w.value,page:Ne,per_page:20}});if(!Oe||!Oe.data){T.value=!1,q.value=[];return}let it=St(Oe.data);at==="down"&&(q.value.push(...it),R.value++,B.value=Oe.last_page),B.value||(B.value=Oe.last_page),V.value||(V.value=1);const _e=je();_e&&(q.value.some(Fe=>Fe.value===_e.value)||q.value.unshift(_e),c.value=_e)}catch(Ne){console.error("Error fetching data:",Ne)}T.value=!1}},te=at=>{if(!at.target)return;const Ne=at.target.scrollTop,Oe=at.target.scrollHeight-at.target.clientHeight<=Ne+10,it=Ne<=10;Oe&&R.value<=B.value&&Se("down"),it&&R.value>V.value},de=at=>{at.target&&(document.activeElement.classList.contains("showOptions"+C.value)?y.value||xt():at.target.id!=o.field_name+"search"+C.value&&at.target.id!=o.field_name&&!at.target.classList.contains("showOptions"+C.value)&&(Wt(),h.value=0,y.value=!1))},xt=()=>{if(!o.show){if(y.value){y.value=!1;return}w.value="",y.value=!0,o.api_url&&q.value.length===0&&Se("down"),p.nextTick(()=>{var at=document.getElementById(`${o.field_name}search${C.value}`);at&&at.focus()})}},je=()=>wt(c.value)?typeof c.value=="object"?q.value.find(at=>String(at.id)===String(c.value.id))||{}:q.value.find(at=>String(at.id)===String(c.value))||{}:o.modelValue?typeof o.modelValue=="object"?q.value.find(at=>String(at.id)===String(o.modelValue.id))||{}:q.value.find(at=>String(at.id)===String(o.modelValue))||{}:{};p.onMounted(()=>{C.value=st(),o.show||(document.body.addEventListener("click",Re),document.addEventListener("focusin",de))}),p.onBeforeUnmount(()=>{document.body.removeEventListener("click",Re),document.removeEventListener("focusin",de)});function j(){const at=[],Ne=w.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Oe=new RegExp(Ne,"ig");for(const it of X.value){const _e=String(it.name);(w.value.length<1||_e.match(Oe))&&at.length<o.maxItem&&at.push(it)}return at}function tt(at){if(["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Enter"].includes(at.key)){if(["ArrowUp","ArrowDown"].includes(at.key)&&at.preventDefault(),at.key==="ArrowDown"&&o.posts==="")return;vt(at.key)}}function st(){let at=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(Oe){const it=(at+Math.random()*16)%16|0;return at=Math.floor(at/16),(Oe==="x"?it:it&3|8).toString(16)})}function wt(at){return at&&typeof at=="object"&&Object.keys(at).length>0}function Re(at){at.target.id!=o.field_name+"search"+C.value&&at.target.id!=o.field_name&&!at.target.classList.contains("showOptions"+C.value)&&(Wt(),h.value=0,y.value=!1)}function ue(at){const Ne=`${at}${C.value}`,Oe=document.getElementById(Ne),it=he.value;if(Oe&&it){const _e=Oe.getBoundingClientRect(),Ve=it.getBoundingClientRect();_e.top<Ve.top?it.scrollTop-=Ve.top-_e.top:_e.bottom>Ve.bottom&&(it.scrollTop+=_e.bottom-Ve.bottom)}}function qt(at){const Ne=`${at}${C.value}`,Oe=document.getElementById(Ne);Oe&&Oe.click()}function vt(at){at==="ArrowDown"&&h.value<q.value.length&&(h.value++,ue(h.value)),at==="ArrowUp"&&h.value>1&&(h.value--,ue(h.value)),at==="Enter"&&qt(h.value)}function St(at){return at.map((Ne,Oe)=>typeof Ne=="object"?Ne:{id:Ne,name:Ne})}function L(){return o.options.map((at,Ne)=>typeof at=="object"?at:{id:at,name:at})}function Yt(at){f.value=!0,c.value=at,y.value=!1,a("update:modelValue",c.value.id),a("selected",c.value),a("selectionChanged",c.value)}function pt(){o.show||(c.value={},w.value="",a("update:modelValue",""),a("selected",c.value),a("selectionChanged",c.value),xt())}function Wt(){(!c.value||!c.value.id)&&(c.value={},w.value="")}return p.watch(w,at=>{o.api_url?(R.value=1,B.value=null,V.value=1,q.value=[],Se("down")):q.value=j(),q.value.length===0&&(c.value={})}),p.watch(c,at=>{wt(at)&&at&&at.id!==o.modelValue&&a("update:modelValue",at.id)}),p.watch(()=>o.api_url,at=>{at&&(R.value=1,B.value=null,V.value=1,q.value=[],Se("down"))},{immediate:!0,deep:!0}),p.watch(()=>o.modelValue,at=>{at?(c.value=o.modelValue,o.api_url&&f.value===!1?Se("down"):c.value=je()):c.value={}},{immediate:!0,deep:!0}),p.watch(()=>o.options,()=>{o.api_url||(q.value=X.value=L()),c.value=je()},{immediate:!0,deep:!0}),(at,Ne)=>{var Oe,it,_e;return p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",x0e,p.toDisplayString(r.label_name),1),p.createElementVNode("p",v0e,[p.createElementVNode("span",w0e,p.toDisplayString((Oe=c.value)==null?void 0:Oe.name),1)]),Ne[4]||(Ne[4]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(r.field_name)},[p.createElementVNode("input",{type:"hidden",name:r.field_name,id:r.field_name,value:(it=c.value)==null?void 0:it.id},null,8,S0e),r.options?(p.openBlock(),p.createElementBlock("div",k0e,[r.label_name?(p.openBlock(),p.createElementBlock("label",{key:0,class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required})},p.toDisplayString(r.label_name),3)):p.createCommentVNode("",!0),p.createElementVNode("div",C0e,[p.createElementVNode("div",E0e,[p.createElementVNode("input",{ref_key:"myDivDropDown",ref:Y,class:p.normalizeClass([{"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!=="",[`showOptions${C.value}`]:!0},"pr-2 showOptions1"]),value:(_e=c.value)==null?void 0:_e.name,placeholder:r.placeholder,autocomplete:"off",readonly:""},null,10,_0e),p.withDirectives(p.createElementVNode("i",{onClick:Ne[0]||(Ne[0]=p.withModifiers(Ve=>pt(),["stop"])),class:"absolute text-gray-500 cursor-pointer pointer-events-auto ltr:right-8 rtl:left-8 hover:text-red-600 dark:hover:text-red-400",style:{top:"13px"}},Ne[5]||(Ne[5]=[p.createElementVNode("svg",{class:"w-[10px] h-[16px]","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})],-1)]),512),[[p.vShow,wt(c.value)&&r.has_cancel]]),p.createElementVNode("i",{onClick:Ne[1]||(Ne[1]=p.withModifiers(Ve=>xt(),["stop"])),class:"absolute text-xl text-gray-500 cursor-pointer ltr:right-2 rtl:left-2 hover:text-gray-700 dark:hover:text-gray-700 showOptions",style:{top:"14px"}},[(p.openBlock(),p.createElementBlock("svg",{class:p.normalizeClass([y.value?"":"rotate-180","w-3 h-3 shrink-0"]),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 6"},Ne[6]||(Ne[6]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5 5 1 1 5"},null,-1)]),2))]),p.withDirectives(p.createElementVNode("div",T0e,[r.hide_search?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",A0e,[Ne[8]||(Ne[8]=p.createElementVNode("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),p.createElementVNode("div",P0e,[Ne[7]||(Ne[7]=p.createElementVNode("div",{class:"absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3"},null,-1)),p.withDirectives(p.createElementVNode("input",{type:"search","onUpdate:modelValue":Ne[2]||(Ne[2]=Ve=>w.value=Ve),id:`${r.field_name}search${C.value}`,onKeydown:tt,onBlur:Ne[3]||(Ne[3]=Ve=>Wt()),autocomplete:"off",class:"block w-full p-2 text-sm text-gray-900 outline-hidden dark:bg-gray-800 dark:text-white",placeholder:r.search_input_placeholder},null,40,D0e),[[p.vModelText,w.value]])])])),p.createElementVNode("div",{class:"overflow-y-auto max-h-64 px-1 py-1",onScroll:te,ref_key:"dropdownRef",ref:he},[q.value.length?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:0},p.renderList(q.value,(Ve,Fe)=>{var bt;return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["relative px-2 py-0.5 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-white hover:rounded-sm",Fe+1==h.value?"bg-gray-100 dark:bg-gray-700 rounded-sm":""]),onClick:ne=>Yt(Ve),onMousedown:ne=>Yt(Ve),key:Fe,id:`${Fe+1}${C.value}`},[p.createElementVNode("div",$0e,[((bt=c.value)==null?void 0:bt.id)===Ve.id?(p.openBlock(),p.createElementBlock("svg",R0e,Ne[9]||(Ne[9]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"},null,-1)]))):p.createCommentVNode("",!0),p.createElementVNode("span",{innerHTML:Ve.name||Ve.id||"-"},null,8,B0e)])],42,N0e)}),128)):p.createCommentVNode("",!0),T.value?(p.openBlock(),p.createElementBlock("div",M0e," Loading... ")):p.createCommentVNode("",!0),!T.value&&q.value.length===0?(p.openBlock(),p.createElementBlock("div",F0e,p.toDisplayString(r.no_results_found_placeholder),1)):p.createCommentVNode("",!0)],544)],512),[[p.vShow,y.value]])])])])):p.createCommentVNode("",!0),p.createElementVNode("span",L0e,p.toDisplayString(r.error_message),1),p.createElementVNode("small",I0e,p.toDisplayString(r.description),1)],2))],64)}}},V0e={class:"font-bold ptext-lg dark:text-white"},Q0e=["id"],z0e=["for"],H0e=["required","name","id","type","placeholder"],Z0e={class:"gl-span-form-error"},U0e={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},W0e={__name:"GLTextarea",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:""}},emits:["update:modelValue","keydown"],setup(r,{expose:t,emit:o}){const a=r,c=o,f=p.ref(null);p.onMounted(()=>{f.value!==null&&f.value.hasAttribute("autofocus")&&f.value.focus()});const h=p.computed({get(){return a.modelValue},set(y){c("update:modelValue",y)}});return t({focus:()=>f.value.focus()}),(y,w)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",V0e,p.toDisplayString(r.label_name),1),p.createElementVNode("p",{id:r.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},p.toDisplayString(r.model_value),9,Q0e),w[2]||(w[2]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["mb-4",r.field_name])},[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,z0e),p.withDirectives(p.createElementVNode("textarea",{required:r.is_required,name:r.field_name,id:r.field_name,class:p.normalizeClass({" gl-textarea-form mt-4 ":r.error_message==""," gl-textarea-form-invalid mt-4 ":r.error_message!==""}),type:r.type,"onUpdate:modelValue":w[0]||(w[0]=C=>h.value=C),onKeydown:w[1]||(w[1]=C=>y.$emit("keydown",C)),ref_key:"input",ref:f,rows:"4",placeholder:r.placeholder},null,42,H0e),[[p.vModelText,h.value]]),p.createElementVNode("span",Z0e,p.toDisplayString(r.error_message),1),p.createElementVNode("small",U0e,p.toDisplayString(r.description),1)],2))],64))}};function X0e(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var yH={exports:{}},jne;function q0e(){return jne||(jne=1,function(r){(function(){var t=function(e){if(e===null)return"null";if(e===void 0)return"undefined";var s=typeof e;return s==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":s==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":s},o=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},a=function(e,s){var i=Array.prototype.slice.call(e);return i.sort(s)},c=function(e,s){return f(function(i,u){return e.eq(s(i),s(u))})},f=function(e){return{eq:e}},h=f(function(e,s){return e===s}),y=h,w=function(e){return f(function(s,i){if(s.length!==i.length)return!1;for(var u=s.length,m=0;m<u;m++)if(!e.eq(s[m],i[m]))return!1;return!0})},C=function(e,s){return c(w(e),function(i){return a(i,s)})},T=function(e){return f(function(s,i){var u=Object.keys(s),m=Object.keys(i);if(!C(y).eq(u,m))return!1;for(var O=u.length,S=0;S<O;S++){var A=u[S];if(!e.eq(s[A],i[A]))return!1}return!0})},R=f(function(e,s){if(e===s)return!0;var i=t(e),u=t(s);return i!==u?!1:o(i)?e===s:i==="array"?w(R).eq(e,s):i==="object"?T(R).eq(e,s):!1});const B=Object.getPrototypeOf,V=(e,s,i)=>{var u;return i(e,s.prototype)?!0:((u=e.constructor)===null||u===void 0?void 0:u.name)===s.name},q=e=>{const s=typeof e;return e===null?"null":s==="object"&&Array.isArray(e)?"array":s==="object"&&V(e,String,(i,u)=>u.isPrototypeOf(i))?"string":s},X=e=>s=>q(s)===e,Y=e=>s=>typeof s===e,he=e=>s=>e===s,Se=(e,s)=>de(e)&&V(e,s,(i,u)=>B(i)===u),te=X("string"),de=X("object"),xt=e=>Se(e,Object),je=X("array"),j=he(null),tt=Y("boolean"),st=he(void 0),wt=e=>e==null,Re=e=>!wt(e),ue=Y("function"),qt=Y("number"),vt=(e,s)=>{if(je(e)){for(let i=0,u=e.length;i<u;++i)if(!s(e[i]))return!1;return!0}return!1},St=()=>{},L=(e,s)=>(...i)=>e(s.apply(null,i)),Yt=(e,s)=>i=>e(s(i)),pt=e=>()=>e,Wt=e=>e,at=(e,s)=>e===s;function Ne(e,...s){return(...i)=>{const u=s.concat(i);return e.apply(null,u)}}const Oe=e=>s=>!e(s),it=e=>()=>{throw new Error(e)},_e=e=>e(),Ve=e=>{e()},Fe=pt(!1),bt=pt(!0);class ne{constructor(s,i){this.tag=s,this.value=i}static some(s){return new ne(!0,s)}static none(){return ne.singletonNone}fold(s,i){return this.tag?i(this.value):s()}isSome(){return this.tag}isNone(){return!this.tag}map(s){return this.tag?ne.some(s(this.value)):ne.none()}bind(s){return this.tag?s(this.value):ne.none()}exists(s){return this.tag&&s(this.value)}forall(s){return!this.tag||s(this.value)}filter(s){return!this.tag||s(this.value)?this:ne.none()}getOr(s){return this.tag?this.value:s}or(s){return this.tag?this:s}getOrThunk(s){return this.tag?this.value:s()}orThunk(s){return this.tag?this:s()}getOrDie(s){if(this.tag)return this.value;throw new Error(s??"Called getOrDie on None")}static from(s){return Re(s)?ne.some(s):ne.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(s){this.tag&&s(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}ne.singletonNone=new ne(!1);const _n=Array.prototype.slice,nn=Array.prototype.indexOf,Kn=Array.prototype.push,so=(e,s)=>nn.call(e,s),Ks=(e,s)=>{const i=so(e,s);return i===-1?ne.none():ne.some(i)},He=(e,s)=>so(e,s)>-1,lt=(e,s)=>{for(let i=0,u=e.length;i<u;i++){const m=e[i];if(s(m,i))return!0}return!1},mt=(e,s)=>{const i=e.length,u=new Array(i);for(let m=0;m<i;m++){const O=e[m];u[m]=s(O,m)}return u},Ce=(e,s)=>{for(let i=0,u=e.length;i<u;i++){const m=e[i];s(m,i)}},Vn=(e,s)=>{for(let i=e.length-1;i>=0;i--){const u=e[i];s(u,i)}},_o=(e,s)=>{const i=[],u=[];for(let m=0,O=e.length;m<O;m++){const S=e[m];(s(S,m)?i:u).push(S)}return{pass:i,fail:u}},vn=(e,s)=>{const i=[];for(let u=0,m=e.length;u<m;u++){const O=e[u];s(O,u)&&i.push(O)}return i},vs=(e,s,i)=>(Vn(e,(u,m)=>{i=s(i,u,m)}),i),No=(e,s,i)=>(Ce(e,(u,m)=>{i=s(i,u,m)}),i),Js=(e,s,i)=>{for(let u=0,m=e.length;u<m;u++){const O=e[u];if(s(O,u))return ne.some(O);if(i(O,u))break}return ne.none()},Uo=(e,s)=>Js(e,s,Fe),Ns=(e,s)=>{for(let i=0,u=e.length;i<u;i++){const m=e[i];if(s(m,i))return ne.some(i)}return ne.none()},ei=e=>{const s=[];for(let i=0,u=e.length;i<u;++i){if(!je(e[i]))throw new Error("Arr.flatten item "+i+" was not an array, input: "+e);Kn.apply(s,e[i])}return s},or=(e,s)=>ei(mt(e,s)),Xo=(e,s)=>{for(let i=0,u=e.length;i<u;++i){const m=e[i];if(s(m,i)!==!0)return!1}return!0},os=e=>{const s=_n.call(e,0);return s.reverse(),s},br=(e,s)=>vn(e,i=>!He(s,i)),Bs=(e,s)=>{const i={};for(let u=0,m=e.length;u<m;u++){const O=e[u];i[String(O)]=s(O,u)}return i},Qt=(e,s)=>{const i=_n.call(e,0);return i.sort(s),i},Pn=(e,s)=>s>=0&&s<e.length?ne.some(e[s]):ne.none(),Cn=e=>Pn(e,0),Rn=e=>Pn(e,e.length-1),jo=ue(Array.from)?Array.from:e=>_n.call(e),zs=(e,s)=>{for(let i=0;i<e.length;i++){const u=s(e[i],i);if(u.isSome())return u}return ne.none()},yr=(e,s)=>{const i=[],u=ue(s)?m=>lt(i,O=>s(O,m)):m=>He(i,m);for(let m=0,O=e.length;m<O;m++){const S=e[m];u(S)||i.push(S)}return i},Mo=Object.keys,Pr=Object.hasOwnProperty,fn=(e,s)=>{const i=Mo(e);for(let u=0,m=i.length;u<m;u++){const O=i[u],S=e[O];s(S,O)}},Go=(e,s)=>lr(e,(i,u)=>({k:u,v:s(i,u)})),lr=(e,s)=>{const i={};return fn(e,(u,m)=>{const O=s(u,m);i[O.k]=O.v}),i},Dr=e=>(s,i)=>{e[i]=s},hi=(e,s,i,u)=>{fn(e,(m,O)=>{(s(m,O)?i:u)(m,O)})},Ni=(e,s)=>{const i={},u={};return hi(e,s,Dr(i),Dr(u)),{t:i,f:u}},Ls=(e,s)=>{const i={};return hi(e,s,Dr(i),St),i},ti=(e,s)=>{const i=[];return fn(e,(u,m)=>{i.push(s(u,m))}),i},mi=e=>ti(e,Wt),Ms=(e,s)=>ro(e,s)?ne.from(e[s]):ne.none(),ro=(e,s)=>Pr.call(e,s),er=(e,s)=>ro(e,s)&&e[s]!==void 0&&e[s]!==null,ni=(e,s,i=R)=>T(i).eq(e,s),ka=e=>{const s={};return Ce(e,i=>{s[i]={}}),Mo(s)},ll=e=>e.length!==void 0,we=Array.isArray,We=e=>{if(we(e))return e;{const s=[];for(let i=0,u=e.length;i<u;i++)s[i]=e[i];return s}},Me=(e,s,i)=>{if(!e)return!1;if(i=i||e,ll(e)){for(let u=0,m=e.length;u<m;u++)if(s.call(i,e[u],u,e)===!1)return!1}else for(const u in e)if(ro(e,u)&&s.call(i,e[u],u,e)===!1)return!1;return!0},Ze=(e,s)=>{const i=[];return Me(e,(u,m)=>{i.push(s(u,m,e))}),i},Je=(e,s)=>{const i=[];return Me(e,(u,m)=>{(!s||s(u,m,e))&&i.push(u)}),i},Ke=(e,s)=>{if(e){for(let i=0,u=e.length;i<u;i++)if(e[i]===s)return i}return-1},ce=(e,s,i,u)=>{let m=st(i)?e[0]:i;for(let O=0;O<e.length;O++)m=s.call(u,m,e[O],O);return m},fe=(e,s,i)=>{for(let u=0,m=e.length;u<m;u++)if(s.call(i,e[u],u,e))return u;return-1},Be=e=>e[e.length-1],Ie=e=>{let s=!1,i;return(...u)=>(s||(s=!0,i=e.apply(null,u)),i)},Ot=(e,s,i,u)=>{const m=e.isiOS()&&/ipad/i.test(i)===!0,O=e.isiOS()&&!m,S=e.isiOS()||e.isAndroid(),A=S||u("(pointer:coarse)"),D=m||!O&&S&&u("(min-device-width:768px)"),I=O||S&&!D,G=s.isSafari()&&e.isiOS()&&/safari/i.test(i)===!1,ee=!I&&!D&&!G;return{isiPad:pt(m),isiPhone:pt(O),isTablet:pt(D),isPhone:pt(I),isTouch:pt(A),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:pt(G),isDesktop:pt(ee)}},It=(e,s)=>{for(let i=0;i<e.length;i++){const u=e[i];if(u.test(s))return u}},rn=(e,s)=>{const i=It(e,s);if(!i)return{major:0,minor:0};const u=m=>Number(s.replace(i,"$"+m));return ut(u(1),u(2))},Nn=(e,s)=>{const i=String(s).toLowerCase();return e.length===0?gt():rn(e,i)},gt=()=>ut(0,0),ut=(e,s)=>({major:e,minor:s}),Le={nu:ut,detect:Nn,unknown:gt},qe=(e,s)=>zs(s.brands,i=>{const u=i.brand.toLowerCase();return Uo(e,m=>{var O;return u===((O=m.brand)===null||O===void 0?void 0:O.toLowerCase())}).map(m=>({current:m.name,version:Le.nu(parseInt(i.version,10),0)}))}),Lt=(e,s)=>{const i=String(s).toLowerCase();return Uo(e,u=>u.search(i))},jt=(e,s)=>Lt(e,s).map(i=>{const u=Le.detect(i.versionRegexes,s);return{current:i.name,version:u}}),Sn=(e,s)=>Lt(e,s).map(i=>{const u=Le.detect(i.versionRegexes,s);return{current:i.name,version:u}}),jn=(e,s)=>e.substring(s),Jn=(e,s,i)=>s===""||e.length>=s.length&&e.substr(i,i+s.length)===s,Bn=(e,s)=>ho(e,s)?jn(e,s.length):e,fo=(e,s,i=0,u)=>{const m=e.indexOf(s,i);return m!==-1?st(u)?!0:m+s.length<=u:!1},ho=(e,s)=>Jn(e,s,0),hs=(e,s)=>Jn(e,s,e.length-s.length),cr=e=>s=>s.replace(e,""),Is=cr(/^\s+|\s+$/g),za=cr(/^\s+/g),Xi=cr(/\s+$/g),Ho=e=>e.length>0,ss=e=>!Ho(e),as=(e,s)=>s<=0?"":new Array(s+1).join(e),Si=(e,s=10)=>{const i=parseInt(e,s);return isNaN(i)?ne.none():ne.some(i)},ki=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,qi=e=>s=>fo(s,e),sr=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>fo(e,"edge/")&&fo(e,"chrome")&&fo(e,"safari")&&fo(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ki],search:e=>fo(e,"chrome")&&!fo(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>fo(e,"msie")||fo(e,"trident")},{name:"Opera",versionRegexes:[ki,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:qi("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:qi("firefox")},{name:"Safari",versionRegexes:[ki,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(fo(e,"safari")||fo(e,"mobile/"))&&fo(e,"applewebkit")}],Dd=[{name:"Windows",search:qi("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>fo(e,"iphone")||fo(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:qi("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:qi("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:qi("linux"),versionRegexes:[]},{name:"Solaris",search:qi("sunos"),versionRegexes:[]},{name:"FreeBSD",search:qi("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:qi("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],cl={browsers:pt(sr),oses:pt(Dd)},Su="Edge",us="Chromium",Zl="IE",vr="Opera",ku="Firefox",ul="Safari",Ul=()=>Ci({current:void 0,version:Le.unknown()}),Ci=e=>{const s=e.current,i=e.version,u=m=>()=>s===m;return{current:s,version:i,isEdge:u(Su),isChromium:u(us),isIE:u(Zl),isOpera:u(vr),isFirefox:u(ku),isSafari:u(ul)}},Xc={unknown:Ul,nu:Ci},dl="Windows",qc="iOS",Cc="Android",Nd="Linux",ii="macOS",Wl="Solaris",Ec="FreeBSD",jc="ChromeOS",Cu=()=>fl({current:void 0,version:Le.unknown()}),fl=e=>{const s=e.current,i=e.version,u=m=>()=>s===m;return{current:s,version:i,isWindows:u(dl),isiOS:u(qc),isAndroid:u(Cc),isMacOS:u(ii),isLinux:u(Nd),isSolaris:u(Wl),isFreeBSD:u(Ec),isChromeOS:u(jc)}},Hr={unknown:Cu,nu:fl},Ca={detect:(e,s,i)=>{const u=cl.browsers(),m=cl.oses(),O=s.bind(D=>qe(u,D)).orThunk(()=>jt(u,e)).fold(Xc.unknown,Xc.nu),S=Sn(m,e).fold(Hr.unknown,Hr.nu),A=Ot(S,O,e,i);return{browser:O,os:S,deviceType:A}}},Gc=e=>window.matchMedia(e).matches;let Yc=Ie(()=>Ca.detect(window.navigator.userAgent,ne.from(window.navigator.userAgentData),Gc));const ji=()=>Yc(),pe=window.navigator.userAgent,Qe=ji(),ft=Qe.browser,zt=Qe.os,hn=Qe.deviceType,Ut=pe.indexOf("Windows Phone")!==-1,Gn={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:ft.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!ft.isIE(),windowsPhone:Ut,browser:{current:ft.current,version:ft.version,isChromium:ft.isChromium,isEdge:ft.isEdge,isFirefox:ft.isFirefox,isIE:ft.isIE,isOpera:ft.isOpera,isSafari:ft.isSafari},os:{current:zt.current,version:zt.version,isAndroid:zt.isAndroid,isChromeOS:zt.isChromeOS,isFreeBSD:zt.isFreeBSD,isiOS:zt.isiOS,isLinux:zt.isLinux,isMacOS:zt.isMacOS,isSolaris:zt.isSolaris,isWindows:zt.isWindows},deviceType:{isDesktop:hn.isDesktop,isiPad:hn.isiPad,isiPhone:hn.isiPhone,isPhone:hn.isPhone,isTablet:hn.isTablet,isTouch:hn.isTouch,isWebView:hn.isWebView}},es=/^\s*|\s*$/g,Io=e=>wt(e)?"":(""+e).replace(es,""),se=(e,s)=>s?s==="array"&&we(e)?!0:typeof e===s:e!==void 0,ge=(e,s,i={})=>{const u=te(e)?e.split(s||","):e||[];let m=u.length;for(;m--;)i[u[m]]={};return i},Ge=ro,_t=(e,...s)=>{for(let i=0;i<s.length;i++){const u=s[i];for(const m in u)if(ro(u,m)){const O=u[m];O!==void 0&&(e[m]=O)}}return e},Zn=function(e,s,i,u){u=u||this,e&&(i&&(e=e[i]),Me(e,(m,O)=>s.call(u,m,O,i)===!1?!1:(Zn(m,s,i,u),!0)))},Kt={trim:Io,isArray:we,is:se,toArray:We,makeMap:ge,each:Me,map:Ze,grep:Je,inArray:Ke,hasOwn:Ge,extend:_t,walk:Zn,resolve:(e,s=window)=>{const i=e.split(".");for(let u=0,m=i.length;u<m&&(s=s[i[u]],!!s);u++);return s},explode:(e,s)=>je(e)?e:e===""?[]:Ze(e.split(s||","),Io),_addCacheSuffix:e=>{const s=Gn.cacheSuffix;return s&&(e+=(e.indexOf("?")===-1?"?":"&")+s),e}},pa=(e,s,i=at)=>e.exists(u=>i(u,s)),js=(e,s,i=at)=>Vr(e,s,i).getOr(e.isNone()&&s.isNone()),cc=e=>{const s=[],i=u=>{s.push(u)};for(let u=0;u<e.length;u++)e[u].each(i);return s},Vr=(e,s,i)=>e.isSome()&&s.isSome()?ne.some(i(e.getOrDie(),s.getOrDie())):ne.none(),is=(e,s,i,u)=>e.isSome()&&s.isSome()&&i.isSome()?ne.some(u(e.getOrDie(),s.getOrDie(),i.getOrDie())):ne.none(),Ea=(e,s)=>e?ne.some(s):ne.none(),Ei=typeof window<"u"?window:Function("return this;")(),_a=(e,s)=>{let i=s??Ei;for(let u=0;u<e.length&&i!==void 0&&i!==null;++u)i=i[e[u]];return i},oi=(e,s)=>{const i=e.split(".");return _a(i,s)},Kc=(e,s)=>oi(e,s),Jh=(e,s)=>{const i=Kc(e,s);if(i==null)throw new Error(e+" not available on this browser");return i},Jm=Object.getPrototypeOf,fr=e=>Jh("HTMLElement",e),Jc=e=>{const s=oi("ownerDocument.defaultView",e);return de(e)&&(fr(s).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Jm(e).constructor.name))},_i=8,Gi=9,Ha=11,Eu=1,Ee=3,De=e=>e.dom.nodeName.toLowerCase(),Ct=e=>e.dom.nodeType,Xt=e=>s=>Ct(s)===e,lo=e=>Ct(e)===_i||De(e)==="#comment",ms=e=>ts(e)&&Jc(e.dom),ts=Xt(Eu),rr=Xt(Ee),li=Xt(Gi),Ka=Xt(Ha),Ta=e=>s=>ts(s)&&De(s)===e,Nr=(e,s,i)=>{if(te(i)||tt(i)||qt(i))e.setAttribute(s,i+"");else throw console.error("Invalid call to Attribute.set. Key ",s,":: Value ",i,":: Element ",e),new Error("Attribute value was not simple")},Gr=(e,s,i)=>{Nr(e.dom,s,i)},gi=(e,s)=>{const i=e.dom;fn(s,(u,m)=>{Nr(i,m,u)})},ba=(e,s)=>{const i=e.dom.getAttribute(s);return i===null?void 0:i},Zr=(e,s)=>ne.from(ba(e,s)),Yi=(e,s)=>{const i=e.dom;return i&&i.hasAttribute?i.hasAttribute(s):!1},Gs=(e,s)=>{e.dom.removeAttribute(s)},eu=e=>{const s=e.dom.attributes;return s==null||s.length===0},em=e=>No(e.dom.attributes,(s,i)=>(s[i.name]=i.value,s),{}),rd=(e,s)=>{const i=ba(e,s);return i===void 0||i===""?[]:i.split(" ")},Yf=(e,s,i)=>{const m=rd(e,s).concat([i]);return Gr(e,s,m.join(" ")),!0},Kf=(e,s,i)=>{const u=vn(rd(e,s),m=>m!==i);return u.length>0?Gr(e,s,u.join(" ")):Gs(e,s),!1},yf=e=>e.dom.classList!==void 0,Of=e=>rd(e,"class"),uc=(e,s)=>Yf(e,"class",s),Ja=(e,s)=>Kf(e,"class",s),w0=(e,s)=>He(Of(e),s)?Ja(e,s):uc(e,s),_u=(e,s)=>{yf(e)?e.dom.classList.add(s):uc(e,s)},eg=e=>{(yf(e)?e.dom.classList:Of(e)).length===0&&Gs(e,"class")},Jf=(e,s)=>{yf(e)?e.dom.classList.remove(s):Ja(e,s),eg(e)},rp=(e,s)=>{const i=yf(e)?e.dom.classList.toggle(s):w0(e,s);return eg(e),i},tg=(e,s)=>yf(e)&&e.dom.classList.contains(s),eh=(e,s)=>{const u=(s||document).createElement("div");if(u.innerHTML=e,!u.hasChildNodes()||u.childNodes.length>1){const m="HTML does not have a single root node";throw console.error(m,e),new Error(m)}return xf(u.childNodes[0])},ng=(e,s)=>{const u=(s||document).createElement(e);return xf(u)},ip=(e,s)=>{const u=(s||document).createTextNode(e);return xf(u)},xf=e=>{if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},Ye={fromHtml:eh,fromTag:ng,fromText:ip,fromDom:xf,fromPoint:(e,s,i)=>ne.from(e.dom.elementFromPoint(s,i)).map(xf)},vf=(e,s)=>{const i=[],u=O=>(i.push(O),s(O));let m=s(e);do m=m.bind(u);while(m.isSome());return i},hl=(e,s)=>{const i=e.dom;if(i.nodeType!==Eu)return!1;{const u=i;if(u.matches!==void 0)return u.matches(s);if(u.msMatchesSelector!==void 0)return u.msMatchesSelector(s);if(u.webkitMatchesSelector!==void 0)return u.webkitMatchesSelector(s);if(u.mozMatchesSelector!==void 0)return u.mozMatchesSelector(s);throw new Error("Browser lacks native selectors")}},wb=e=>e.nodeType!==Eu&&e.nodeType!==Gi&&e.nodeType!==Ha||e.childElementCount===0,S0=(e,s)=>{const i=s===void 0?document:s.dom;return wb(i)?[]:mt(i.querySelectorAll(e),Ye.fromDom)},$d=(e,s)=>{const i=s===void 0?document:s.dom;return wb(i)?ne.none():ne.from(i.querySelector(e)).map(Ye.fromDom)},Fs=(e,s)=>e.dom===s.dom,Yr=(e,s)=>{const i=e.dom,u=s.dom;return i===u?!1:i.contains(u)},Aa=e=>Ye.fromDom(e.dom.ownerDocument),id=e=>li(e)?e:Aa(e),lp=e=>Ye.fromDom(id(e).dom.documentElement),wf=e=>Ye.fromDom(id(e).dom.defaultView),ml=e=>ne.from(e.dom.parentNode).map(Ye.fromDom),tm=e=>ne.from(e.dom.parentElement).map(Ye.fromDom),og=(e,s)=>{const i=ue(s)?s:Fe;let u=e.dom;const m=[];for(;u.parentNode!==null&&u.parentNode!==void 0;){const O=u.parentNode,S=Ye.fromDom(O);if(m.push(S),i(S)===!0)break;u=O}return m},Rd=e=>{const s=i=>vn(i,u=>!Fs(e,u));return ml(e).map(ya).map(s).getOr([])},Bd=e=>ne.from(e.dom.previousSibling).map(Ye.fromDom),nm=e=>ne.from(e.dom.nextSibling).map(Ye.fromDom),Xl=e=>os(vf(e,Bd)),om=e=>vf(e,nm),ya=e=>mt(e.dom.childNodes,Ye.fromDom),Md=(e,s)=>{const i=e.dom.childNodes;return ne.from(i[s]).map(Ye.fromDom)},_c=e=>Md(e,0),el=e=>Md(e,e.dom.childNodes.length-1),Sf=e=>e.dom.childNodes.length,Sb=e=>{const s=e.dom.head;if(s==null)throw new Error("Head is not available yet");return Ye.fromDom(s)},sg=e=>Ka(e)&&Re(e.dom.host),Tu=e=>Ye.fromDom(e.dom.getRootNode()),th=e=>sg(e)?e:Sb(id(e)),k0=e=>sg(e)?e:Ye.fromDom(id(e).dom.body),rg=e=>{const s=Tu(e);return sg(s)?ne.some(s):ne.none()},C0=e=>Ye.fromDom(e.dom.host),E0=e=>{if(Re(e.target)){const s=Ye.fromDom(e.target);if(ts(s)&&_0(s)&&e.composed&&e.composedPath){const i=e.composedPath();if(i)return Cn(i)}}return ne.from(e.target)},_0=e=>Re(e.dom.shadowRoot),Au=e=>{const s=rr(e)?e.dom.parentNode:e.dom;if(s==null||s.ownerDocument===null)return!1;const i=s.ownerDocument;return rg(Ye.fromDom(s)).fold(()=>i.body.contains(s),Yt(Au,C0))};var cp=(e,s,i,u,m)=>e(i,u)?ne.some(i):ue(m)&&m(i)?ne.none():s(i,u,m);const tu=(e,s,i)=>{let u=e.dom;const m=ue(i)?i:Fe;for(;u.parentNode;){u=u.parentNode;const O=Ye.fromDom(u);if(s(O))return ne.some(O);if(m(O))break}return ne.none()},Ur=(e,s,i)=>cp((m,O)=>O(m),tu,e,s,i),Ti=(e,s)=>{const i=e.dom;return i.parentNode?ql(Ye.fromDom(i.parentNode),u=>!Fs(e,u)&&s(u)):ne.none()},ql=(e,s)=>{const i=m=>s(Ye.fromDom(m));return Uo(e.dom.childNodes,i).map(Ye.fromDom)},nh=(e,s)=>{const i=u=>{for(let m=0;m<u.childNodes.length;m++){const O=Ye.fromDom(u.childNodes[m]);if(s(O))return ne.some(O);const S=i(u.childNodes[m]);if(S.isSome())return S}return ne.none()};return i(e.dom)},oh=(e,s,i)=>tu(e,u=>hl(u,s),i),Ki=(e,s)=>$d(s,e),oo=(e,s,i)=>cp((m,O)=>hl(m,O),oh,e,s,i),up=e=>oo(e,"[contenteditable]"),nu=(e,s=!1)=>Au(e)?e.dom.isContentEditable:up(e).fold(pt(s),i=>jl(i)==="true"),jl=e=>e.dom.contentEditable,Us=(e,s)=>{e.dom.contentEditable=s?"true":"false"},Fd=e=>e.style!==void 0&&ue(e.style.getPropertyValue),sm=(e,s,i)=>{if(!te(i))throw console.error("Invalid call to CSS.set. Property ",s,":: Value ",i,":: Element ",e),new Error("CSS value must be a string: "+i);Fd(e)&&e.style.setProperty(s,i)},rm=(e,s)=>{Fd(e)&&e.style.removeProperty(s)},dp=(e,s,i)=>{const u=e.dom;sm(u,s,i)},ou=(e,s)=>{const i=e.dom;fn(s,(u,m)=>{sm(i,m,u)})},Gl=(e,s)=>{const i=e.dom,m=window.getComputedStyle(i).getPropertyValue(s);return m===""&&!Au(e)?ig(i,s):m},ig=(e,s)=>Fd(e)?e.style.getPropertyValue(s):"",pi=(e,s)=>{const i=e.dom,u=ig(i,s);return ne.from(u).filter(m=>m.length>0)},tl=e=>{const s={},i=e.dom;if(Fd(i))for(let u=0;u<i.style.length;u++){const m=i.style.item(u);s[m]=i.style[m]}return s},gl=(e,s)=>{const i=e.dom;rm(i,s),pa(Zr(e,"style").map(Is),"")&&Gs(e,"style")},rs=e=>e.dom.offsetWidth,bi=(e,s)=>{ml(e).each(u=>{u.dom.insertBefore(s.dom,e.dom)})},Tc=(e,s)=>{nm(e).fold(()=>{ml(e).each(m=>{$r(m,s)})},u=>{bi(u,s)})},sh=(e,s)=>{_c(e).fold(()=>{$r(e,s)},u=>{e.dom.insertBefore(s.dom,u.dom)})},$r=(e,s)=>{e.dom.appendChild(s.dom)},ag=(e,s)=>{bi(e,s),$r(s,e)},cs=(e,s)=>{Ce(s,(i,u)=>{const m=u===0?e:s[u-1];Tc(m,i)})},ua=(e,s)=>{Ce(s,i=>{$r(e,i)})},Ac=e=>{e.dom.textContent="",Ce(ya(e),s=>{Or(s)})},Or=e=>{const s=e.dom;s.parentNode!==null&&s.parentNode.removeChild(s)},Nl=e=>{const s=ya(e);s.length>0&&cs(e,s),Or(e)},im=(e,s)=>{const u=(s||document).createElement("div");return u.innerHTML=e,ya(Ye.fromDom(u))},rh=e=>mt(e,Ye.fromDom),am=e=>e.dom.innerHTML,Ld=(e,s)=>{const u=Aa(e).dom,m=Ye.fromDom(u.createDocumentFragment()),O=im(s,u);ua(m,O),Ac(e),$r(e,m)},T0=e=>{const s=Ye.fromTag("div"),i=Ye.fromDom(e.dom.cloneNode(!0));return $r(s,i),am(s)},Cs=(e,s,i,u,m,O,S)=>({target:e,x:s,y:i,stop:u,prevent:m,kill:O,raw:S}),A0=e=>{const s=Ye.fromDom(E0(e).getOr(e.target)),i=()=>e.stopPropagation(),u=()=>e.preventDefault(),m=L(u,i);return Cs(s,e.clientX,e.clientY,i,u,m,e)},ci=(e,s)=>i=>{e(i)&&s(A0(i))},Q=(e,s,i,u,m)=>{const O=ci(i,u);return e.dom.addEventListener(s,O,m),{unbind:Ne(le,e,s,O,m)}},K=(e,s,i,u)=>Q(e,s,i,u,!1),le=(e,s,i,u)=>{e.dom.removeEventListener(s,i,u)},Xe=(e,s)=>({left:e,top:s,translate:(u,m)=>Xe(e+u,s+m)}),rt=Xe,sn=e=>{const s=e.getBoundingClientRect();return rt(s.left,s.top)},Mn=(e,s)=>e!==void 0?e:s!==void 0?s:0,ns=e=>{const s=e.dom.ownerDocument,i=s.body,u=s.defaultView,m=s.documentElement;if(i===e.dom)return rt(i.offsetLeft,i.offsetTop);const O=Mn(u==null?void 0:u.pageYOffset,m.scrollTop),S=Mn(u==null?void 0:u.pageXOffset,m.scrollLeft),A=Mn(m.clientTop,i.clientTop),D=Mn(m.clientLeft,i.clientLeft);return $o(e).translate(S-D,O-A)},$o=e=>{const s=e.dom,u=s.ownerDocument.body;return u===s?rt(u.offsetLeft,u.offsetTop):Au(e)?sn(s):rt(0,0)},ao=e=>{const s=e!==void 0?e.dom:document,i=s.body.scrollLeft||s.documentElement.scrollLeft,u=s.body.scrollTop||s.documentElement.scrollTop;return rt(i,u)},hr=(e,s,i)=>{const m=(i!==void 0?i.dom:document).defaultView;m&&m.scrollTo(e,s)},Wr=(e,s)=>{ji().browser.isSafari()&&ue(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(s)},$l=e=>{const s=e===void 0?window:e;return ji().browser.isFirefox()?ne.none():ne.from(s.visualViewport)},Yl=(e,s,i,u)=>({x:e,y:s,width:i,height:u,right:e+i,bottom:s+u}),P0=e=>{const s=e===void 0?window:e,i=s.document,u=ao(Ye.fromDom(i));return $l(s).fold(()=>{const m=s.document.documentElement,O=m.clientWidth,S=m.clientHeight;return Yl(u.left,u.top,O,S)},m=>Yl(Math.max(m.pageLeft,u.left),Math.max(m.pageTop,u.top),m.width,m.height))},kb=(e,s)=>vn(ya(e),s),Cb=(e,s)=>{let i=[];return Ce(ya(e),u=>{s(u)&&(i=i.concat([u])),i=i.concat(Cb(u,s))}),i},pl=(e,s)=>S0(s,e),D0=(e,s,i)=>tu(e,s,i).isSome(),Eb=(e,s)=>Ti(e,s).isSome(),N0=(e,s)=>nh(e,s).isSome();class Ji{constructor(s,i){this.node=s,this.rootNode=i,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(s){return this.node=this.findSibling(this.node,"firstChild","nextSibling",s),this.node}prev(s){return this.node=this.findSibling(this.node,"lastChild","previousSibling",s),this.node}prev2(s){return this.node=this.findPreviousNode(this.node,s),this.node}findSibling(s,i,u,m){if(s){if(!m&&s[i])return s[i];if(s!==this.rootNode){let O=s[u];if(O)return O;for(let S=s.parentNode;S&&S!==this.rootNode;S=S.parentNode)if(O=S[u],O)return O}}}findPreviousNode(s,i){if(s){const u=s.previousSibling;if(this.rootNode&&u===this.rootNode)return;if(u){if(!i){for(let O=u.lastChild;O;O=O.lastChild)if(!O.lastChild)return O}return u}const m=s.parentNode;if(m&&m!==this.rootNode)return m}}}const $0="\uFEFF",ea=" ",lg=e=>e===$0,cg=e=>e.replace(/\uFEFF/g,""),R2=/^[ \t\r\n]*$/,ad=e=>R2.test(e),ug=e=>{for(const s of e)if(!lg(s))return!1;return!0},R0=e=>" \f \v".indexOf(e)!==-1,_b=e=>e===`
1
+ (function(qo,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],p):(qo=typeof globalThis<"u"?globalThis:qo||self,p(qo.GoldenLogicUi={},qo.Vue))})(this,function(qo,p){"use strict";const vi=(r,t)=>{const o=r.__vccOpts||r;for(const[a,c]of t)o[a]=c;return o},Mfe={props:{classes:{type:String,default:""},button_type:{type:String,default:"default"},is_submit:{type:Boolean,default:!1},icon:{type:String,default:""},icon:{type:String,default:""},svg_icon:{type:String,default:""},is_loading:{type:Boolean,default:!1},is_disabled:{type:Boolean,default:!1},has_border_reduced:{type:Boolean,default:!0},tag:{type:String,default:"button"},href:{type:String,default:""},form_id:{type:String,default:""}},data(){return{internal_loading:!1}},mounted(){this.form_id&&this.attachFormListener()},beforeUnmount(){this.form_id&&this.detachFormListener()},computed:{buttonTypeClass(){switch(this.button_type){case"default":return"text-white bg-blue-700 hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700";case"alternative":return" text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700";case"dark":return"text-white bg-gray-800 hover:bg-gray-900 dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-700";case"light":return"text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600";case"green":return" text-white bg-green-700 hover:bg-green-800 dark:bg-green-600 dark:hover:bg-green-700";case"red":return" text-white bg-red-700 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700";case"yellow":return" text-white bg-yellow-400 hover:bg-yellow-500";case"purple":return" text-white bg-purple-700 hover:bg-purple-800 dark:bg-purple-600 dark:hover:bg-purple-700";case"primary":return"text-white gl-btn-primary";default:return""}},actualLoading(){return this.is_loading||this.internal_loading}},methods:{attachFormListener(){const r=document.getElementById(this.form_id);r&&r.addEventListener("submit",this.handleFormSubmit)},detachFormListener(){const r=document.getElementById(this.form_id);r&&r.removeEventListener("submit",this.handleFormSubmit)},handleFormSubmit(){this.internal_loading=!0}}},Ffe=["innerHTML"];function Lfe(r,t,o,a,c,f){return f.actualLoading?(p.openBlock(),p.createBlock(p.resolveDynamicComponent("button"),{key:1,disabled:"",class:p.normalizeClass(` opacity-50 h-[2.5rem] flex items-center justify-center focus:outline-hidden text-sm px-6 py-2 font-medium ${o.has_border_reduced?"rounded-lg":""} ${f.buttonTypeClass} ${o.classes}`)},{default:p.withCtx(()=>t[0]||(t[0]=[p.createElementVNode("svg",{"aria-hidden":"true",role:"status",class:"inline w-5 h-5 animate-spin fill-primary dark:fill-primaryDark",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),p.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)])),_:1},8,["class"])):(p.openBlock(),p.createBlock(p.resolveDynamicComponent(o.tag),p.mergeProps({key:0,type:o.is_submit,disabled:o.is_disabled},{type:o.is_submit?"submit":void 0},{href:o.tag==="a"?o.href:void 0,class:` ${o.is_disabled?"cursor-not-allowed opacity-50":""} ${o.icon||o.svg_icon?"flex":""} h-[2.5rem] items-center gap-2 focus:outline-hidden text-sm px-3 py-2 font-medium ${o.has_border_reduced?"rounded-lg":""} ${f.buttonTypeClass} ${o.classes}`}),{default:p.withCtx(()=>[o.icon?(p.openBlock(),p.createElementBlock("i",{key:0,class:p.normalizeClass([o.icon,"text-base"])},null,2)):o.svg_icon?(p.openBlock(),p.createElementBlock("span",{key:1,innerHTML:o.svg_icon,class:"w-4 h-4"},null,8,Ffe)):p.createCommentVNode("",!0),p.renderSlot(r.$slots,"default")]),_:3},16,["type","disabled","href","class"]))}const o6=vi(Mfe,[["render",Lfe]]),Ife={components:{GlButton:o6},props:{isOpen:{type:Boolean,default:!1},language:{type:Object,default:()=>{}}},methods:{confirmDeletion(){this.$emit("confirm-delete")},cancelDeletion(){this.$emit("cancel-delete")}}},Vfe={key:0,class:"fixed inset-0 z-50 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true"},Qfe={class:"flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:p-0"},zfe={class:"inline-block relative overflow-hidden text-left align-bottom transition-all transform bg-white dark:bg-gray-800 rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},Hfe={class:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Zfe={class:"sm:flex sm:items-start"},Ufe={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},Wfe={class:"text-lg font-medium leading-6",id:"modal-title"},Xfe={class:"mt-2"},qfe={class:"text-sm"},jfe={class:"border-t border-gray-200 rounded-b dark:border-gray-600 px-4 py-3 sm:px-6 flex gap-2"};function Gfe(r,t,o,a,c,f){var y,w;const h=p.resolveComponent("gl-button");return o.isOpen?(p.openBlock(),p.createElementBlock("div",Vfe,[p.createElementVNode("div",Qfe,[t[0]||(t[0]=p.createElementVNode("div",{class:"fixed inset-0 transition-opacity bg-gray-500/75","aria-hidden":"true"},null,-1)),t[1]||(t[1]=p.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1)),p.createElementVNode("div",zfe,[p.createElementVNode("div",Hfe,[p.createElementVNode("div",Zfe,[p.createElementVNode("div",Ufe,[p.createElementVNode("h3",Wfe,p.toDisplayString(((y=o.language)==null?void 0:y.title_delete_confirmation)??"Confirm Deletion"),1),p.createElementVNode("div",Xfe,[p.createElementVNode("p",qfe,p.toDisplayString(((w=o.language)==null?void 0:w.message_delete_confirmation)??"Are you sure you want to delete this item? This action cannot be undone."),1)])])])]),p.createElementVNode("div",jfe,[p.createVNode(h,{onClick:f.confirmDeletion,tag:"button",button_type:"red"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.okbutton_delete_confirmation)??"Delete"),1)]}),_:1},8,["onClick"]),p.createVNode(h,{onClick:f.cancelDeletion,tag:"button",button_type:"light"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.cancelbutton_delete_confirmation)??"Cancel"),1)]}),_:1},8,["onClick"])])])])])):p.createCommentVNode("",!0)}const lA=vi(Ife,[["render",Gfe]]),pH=p.reactive({items:[]}),rb={state:pH,methods:{add(r){pH.items.unshift({key:Symbol(),message:r.message,type:r.type,duration:r.duration})},remove(r){pH.items.splice(r,1)}}},Yfe={components:{DeleteConfirmationModal:lA},props:{is_required:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""},show:{type:Boolean,default:!1},has_multiple_file:{show:Boolean,default:!1},field_name:{type:String,default:""},label_name:{type:String,default:""},route_url:{type:String,default:""},modelValue:{type:Array,default:[]},file_config:{type:Object,default:{}},is_enable_delete:{type:Boolean,default:!0},accepts_file_types:{type:String,default:""},max_file_size:{type:Number,default:0}},emits:["update:modelValue","uploaded"],data(){return{media_id:"",error_message_data:"",open_delete_modal:!1,files:[],uploadFileList:[],isDragging:!1}},methods:{inintUploadFileList(){this.uploadFileList.length<=0&&(this.uploadFileList=[...new Set([...this.uploadFileList,...this.modelValue])])},closeDeleteModal(){this.open_delete_modal=!1},deleteAction(){axios.delete(this.route_url+"/destroyMedia/"+this.media_id).then(r=>{this.inintUploadFileList();let t=this.uploadFileList.findIndex(o=>o.id===this.media_id);t!==-1&&this.uploadFileList.splice(t,1),this.closeDeleteModal(),rb.methods.add({message:"Item deleted successfully.",type:"success",duration:5e3}),this.$emit("uploaded"),this.$emit("update:modelValue",this.uploadFileList)}).catch(r=>{console.error(r),this.is_loading=!1})},getFileName(r){return r.length>12?r.substring(0,13)+"... ."+r.split(".")[1]:r},formatFileSize(r){if(r===0)return"0 Bytes";const t=1024,o=["Bytes","KB","MB","GB","TB"],a=Math.floor(Math.log(r)/Math.log(t));return parseFloat((r/Math.pow(t,a)).toFixed(2))+" "+o[a]},onDragOver(r){r.preventDefault(),this.isDragging=!0,r.dataTransfer.dropEffect="copy"},onDragLeave(r){r.preventDefault(),this.isDragging=!1},onDrop(r){r.preventDefault(),this.isDragging=!1;const t=r.dataTransfer.files;Array.from(t).forEach(o=>{this.uploadFile(o)})},async uploadFiles(r){this.inintUploadFileList();const t=r.target.files,o=Array.from(t).map(a=>this.uploadFile(a));await Promise.all(o),this.$emit("uploaded"),this.$emit("update:modelValue",this.uploadFileList)},getFirstError(r,t){return r.hasOwnProperty(t)?r[t][0]:""},async uploadFile(r){return new Promise((t,o)=>{r||t();const a=new FormData;a.append(this.field_name,r),a.append("accepts_file_types",this.accepts_file_types),a.append("max_file_size",this.max_file_size),a.append("field_name",this.field_name),Object.entries(this.file_config).forEach(([c,f])=>{a.append(c,f)}),this.files.push({file_name:r.name,loading:0}),axios.post(this.route_url+"/media",a,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:c=>{this.files[this.files.length-1].loading=Math.floor(c.loaded/c.total*100)}}).then(c=>{let f=this.files.findIndex(h=>h.file_name===r.name);f!==-1&&this.files.splice(f,1),this.has_multiple_file||(this.uploadFileList=[]),this.uploadFileList.push({file_name:c.data.file_name,size:c.data.size,id:c.data.id,url:c.data.url}),this.error_message_data="",t()}).catch(c=>{c.response.status===422?this.error_message_data=this.getFirstError(c.response.data.errors,this.field_name):console.error("An error occurred:",c);let f=this.files.findIndex(h=>h.file_name===r.name);f!==-1&&this.files.splice(f,1),console.log(c),t()})})}},computed:{uploadFileListFinal(){return this.uploadFileList.length>0?this.uploadFileList:[...new Set([...this.uploadFileList,...this.modelValue])]}},mounted(){this.error_message_data=this.error_message},watch:{error_message(r,t){this.error_message_data=r}}},Kfe={class:"flex flex-col items-center justify-center pt-5 pb-6"},Jfe=["multiple"],ehe=["name","value"],the={key:1},nhe={class:"mt-2 gl-span-form-error"},ohe={class:"block mt-2 mb-3 text-sm font-normal leading-5 text-gray-500"},she={key:0,class:""},rhe={class:"flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow-sm dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white"},ihe={class:"w-full ml-3"},ahe={class:"flex items-center justify-between mb-1"},lhe={class:"text-xs text-black dark:text-white"},che={class:"text-xs text-black dark:text-white"},uhe={class:"w-full h-1 mb-1 bg-white rounded-full dark:bg-gray-800"},dhe={class:"overflow-x-scroll max-h-56"},fhe={class:"flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow-sm dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white"},hhe={class:"flex items-center"},mhe={class:"flex flex-col ml-3"},ghe={class:"text-xs"},phe={class:"text-xs"},bhe={class:"flex gap-2"},yhe=["href"],Ohe=["onClick"];function xhe(r,t,o,a,c,f){const h=p.resolveComponent("DeleteConfirmationModal");return p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(h,{isOpen:c.open_delete_modal,onConfirmDelete:f.deleteAction,onCancelDelete:f.closeDeleteModal},null,8,["isOpen","onConfirmDelete","onCancelDelete"]),p.createElementVNode("div",{class:p.normalizeClass([{"border-red-500 dark:border-red-500":c.error_message_data!=="","border-gray-200 dark:border-gray-700":c.error_message_data==""},"w-full p-4 bg-white border rounded-lg shadow-sm dark:bg-gray-800"])},[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-form":c.error_message_data=="","gl-label-form-invalid":c.error_message_data!=="",required:o.is_required})},p.toDisplayString(o.label_name),3),p.createElementVNode("div",{onDragover:t[2]||(t[2]=p.withModifiers((...y)=>f.onDragOver&&f.onDragOver(...y),["prevent"])),onDragleave:t[3]||(t[3]=p.withModifiers((...y)=>f.onDragLeave&&f.onDragLeave(...y),["prevent"])),onDrop:t[4]||(t[4]=p.withModifiers((...y)=>f.onDrop&&f.onDrop(...y),["prevent"])),class:"flex flex-col items-center justify-center w-full h-40 mt-3 mb-3 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"},[p.createElementVNode("div",Kfe,[p.createElementVNode("input",{type:"file",ref:"file_input"+o.field_name,hidden:"",multiple:o.has_multiple_file,onChange:t[0]||(t[0]=(...y)=>f.uploadFiles&&f.uploadFiles(...y))},null,40,Jfe),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.uploadFileListFinal,(y,w)=>(p.openBlock(),p.createElementBlock("input",{type:"hidden",name:o.field_name+"[]",key:w,value:y.id},null,8,ehe))),128)),c.isDragging?(p.openBlock(),p.createElementBlock("div",the,t[6]||(t[6]=[p.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-gray-400"}," Drop files here ",-1)]))):(p.openBlock(),p.createElementBlock("div",{key:0,class:"flex flex-col items-center justify-center",onClick:t[1]||(t[1]=y=>r.$refs["file_input"+this.field_name].click())},t[5]||(t[5]=[p.createElementVNode("svg",{class:"w-8 h-8 mb-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})],-1),p.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-gray-400"}," Drag & drop files or browse ",-1)])))])],32),p.createElementVNode("span",nhe,p.toDisplayString(c.error_message_data),1),p.createElementVNode("small",ohe,p.toDisplayString(o.description),1),c.files.length>0?(p.openBlock(),p.createElementBlock("section",she,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c.files,(y,w)=>(p.openBlock(),p.createElementBlock("li",rhe,[t[7]||(t[7]=p.createElementVNode("i",{class:"text-3xl fas fa-file-alt"},null,-1)),p.createElementVNode("div",ihe,[p.createElementVNode("div",ahe,[p.createElementVNode("span",lhe,p.toDisplayString(f.getFileName(y.file_name)),1),p.createElementVNode("span",che,p.toDisplayString(y.loading),1)]),p.createElementVNode("div",uhe,[p.createElementVNode("div",{class:"h-full bg-gray-500 rounded-full dark:bg-gray-400",style:p.normalizeStyle({width:y.loading+"%"})},null,4)])])]))),256))])):p.createCommentVNode("",!0),p.createElementVNode("section",dhe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.uploadFileListFinal,(y,w)=>(p.openBlock(),p.createElementBlock("li",fhe,[p.createElementVNode("div",hhe,[t[8]||(t[8]=p.createElementVNode("i",{class:"text-3xl fas fa-file-alt","aria-hidden":"true"},null,-1)),p.createElementVNode("div",mhe,[p.createElementVNode("span",ghe,p.toDisplayString(f.getFileName(y.file_name)),1),p.createElementVNode("span",phe,p.toDisplayString(f.formatFileSize(y.size)),1)])]),p.createElementVNode("div",bhe,[p.createElementVNode("a",{href:y.url,target:"_blank",class:"text-lg text-blue-600 cursor-pointer dark:text-blue-400 fas fa-download"},null,8,yhe),o.is_enable_delete?(p.openBlock(),p.createElementBlock("i",{key:0,onClick:C=>{c.media_id=y.id,c.open_delete_modal=!0},class:"text-lg text-red-600 cursor-pointer dark:text-red-400 fas fa-x"},null,8,Ohe)):p.createCommentVNode("",!0)])]))),256))])],2)],64)}const vhe=vi(Yfe,[["render",xhe]]),whe={components:{},props:{field_name:{type:String,default:""},trans_selector_name:{type:String,default:"i18n_selector"}},data(){return{locals:[],default_language:""}},methods:{getLocals(){const r={id:this.menu_id};axios.get("/admin/get_locals",{params:r}).then(t=>{this.locals=t.data.locals,this.default_language=t.data.default_language,this.$refs.language_selector.classList.add("gl-multilanguage")}).catch(t=>{console.error(t)})}},created(){this.getLocals()},mounted(){}},She={class:"grid w-full gap-1 mt-5 mb-5 md:gap-0 md:grid-cols-10 language-selector",ref:"language_selector"},khe=["name","value","id","checked"],Che=["for"];function Ehe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("ul",She,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c.locals,(h,y)=>(p.openBlock(),p.createElementBlock("li",null,[p.createElementVNode("input",{type:"radio",name:o.trans_selector_name,value:h,class:"hidden! peer",id:h+"_"+o.field_name,autocomplete:"off",checked:h===c.default_language},null,8,khe),p.createElementVNode("label",{for:h+"_"+o.field_name,class:p.normalizeClass([{"border md:rounded-s-lg!":y===0,"border md:rounded-e-lg!":y===c.locals.length-1,"border-t border-b":y!==0&&y!==c.locals.length-1},"block w-full p-1 font-bold text-center text-gray-500 uppercase bg-white border-gray-200 rounded-lg cursor-pointer md:rounded-none dark:hover:text-gray-300 dark:border-gray-700 dark:peer-checked:text-blue-500 peer-checked:border-blue-600 peer-checked:text-blue-600 hover:text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:bg-gray-800 dark:hover:bg-gray-700"])},p.toDisplayString(h),11,Che)]))),256))],512)}const _he=vi(whe,[["render",Ehe]]),The={class:"bg-white border rounded-lg shadow-default dark:bg-gray-900 dark:border-gray-700"},Ahe={class:"px-3 py-4 border-b dark:border-gray-700"},Phe={class:"font-semibold text-black dark:text-white"},Dhe={__name:"GlCard",props:{class:{type:String,default:""},body_class:{type:String,default:""}},setup(r){const t=r,o=p.computed(()=>t.class),a=p.computed(()=>t.body_class);return(c,f)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["flex flex-col gap-9",o.value])},[p.createElementVNode("div",The,[p.createElementVNode("div",Ahe,[p.createElementVNode("h3",Phe,[p.renderSlot(c.$slots,"header")])]),c.$slots.body?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["p-6",a.value])},[p.renderSlot(c.$slots,"body")],2)):p.createCommentVNode("",!0)])],2))}},Nhe={class:"font-bold ptext-lg dark:text-white"},$he={class:"mt-3 mb-4"},Rhe={class:"px-3 py-1 mt-2 mb-2 text-sm font-medium text-blue-800 bg-blue-100 rounded-sm me-2 dark:bg-blue-900 dark:text-blue-300"},Bhe=["name","value"],Mhe={key:0,class:"dropdown"},Fhe={class:"inline-flex ml-2 rounded-md shadow-xs",role:"group"},Lhe={class:"relative"},Ihe=["onClick"],Vhe={class:"text-gray-700 bg-white border dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 absolute w-full z-999999999 rounded-md mt-1 pt-1 showOptions"},Qhe={class:"border-b border-gray-200 dark:border-gray-700"},zhe={class:"relative"},Hhe=["id","placeholder"],Zhe={class:"overflow-y-auto max-h-64 px-1 py-1"},Uhe=["onClick","onMousedown","id"],Whe={class:"flex items-center py-2 pr-4"},Xhe={key:0,class:"absolute flex items-center shrink-0 w-4 h-4 text-green-500 ltr:right-2 rtl:left-2 dark:text-green-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},qhe=["innerHTML"],jhe={__name:"GlMultiSelectDropdown",props:{language:{type:Object,default:()=>{}},modelValue:{type:Array,default:[]},defaultValue:{type:Array,default:[]},field_name:{type:String,default:""},is_required:{type:Boolean,default:!1},has_cancel:{type:Boolean,default:!0},label_name:{type:String,default:""},options:{type:Array,required:!0,default:()=>[],note:"Options of dropdown. An array of options with id and name"},placeholder:{type:String,required:!1,default:"Please select an option",note:"Placeholder of dropdown"},search_input_placeholder:{type:String,required:!1,default:"Search",note:"Placeholder of search input"},maxItem:{type:Number,required:!1,default:1e4,note:"Max items showing"},show:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""},options_top_size:{type:Number,default:22}},emits:["update:modelValue","selected","selectionChanged"],setup(r,{emit:t}){const o=r,a=t,c=p.ref(null),f=p.ref([]),h=p.ref([]),y=p.ref([]),w=p.ref(0),C=p.ref(!1),T=p.ref(""),R=p.ref(""),B=p.ref(null),V=L=>{L.key==="Enter"&&L.target.form&&L.preventDefault()};p.onMounted(()=>{R.value=Y(),o.show||(document.body.addEventListener("click",j),document.addEventListener("keypress",V))}),p.onBeforeUnmount(()=>{document.body.removeEventListener("click",j),document.removeEventListener("keypress",V)});const q=p.computed(()=>{const L=[],Yt=new RegExp(T.value,"ig");for(const pt of h.value){const Wt=String(pt.name);(T.value.length<1||Wt.match(Yt))&&L.length<o.maxItem&&L.push(pt)}return L});function X(L){if(["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Enter"].includes(L.key)){if(["ArrowUp","ArrowDown"].includes(L.key)&&L.preventDefault(),L.key==="ArrowDown"&&o.posts==="")return;wt(L.key)}}function Y(){let L=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(pt){const Wt=(L+Math.random()*16)%16|0;return L=Math.floor(L/16),(pt==="x"?Wt:Wt&3|8).toString(16)})}function he(L){return Array.isArray(L)&&L.length>0&&L.every(Yt=>typeof Yt=="object"&&Yt!==null)}function Se(L){return L.every(Yt=>typeof Yt=="object"&&Yt!==null)}function te(L){return f.value.findIndex(Yt=>Yt.id===L)!==-1}function de(){f.value=Re()}function xt(){f.value=[],a("update:modelValue",[]),a("selected",[]),a("selectionChanged",[])}function je(L){let Yt=f.value.findIndex(pt=>pt.id===L.id);Yt!==-1&&f.value.splice(Yt,1),y.value=f.value.map(pt=>pt.id),a("update:modelValue",y.value),a("selected",f.value),a("selectionChanged",f.value)}function j(L){L.target.id!=o.field_name+"search"+R.value&&L.target.id!=o.field_name&&!L.target.classList.contains("showOptions")&&(St(),w.value=0,C.value=!1)}function tt(L){const Yt=`${L}${R.value}`,pt=document.getElementById(Yt);pt&&pt.scrollIntoView()}function st(L){const Yt=`${L}${R.value}`,pt=document.getElementById(Yt);pt&&pt.click()}function wt(L){L==="ArrowDown"&&w.value<q.value.length&&(w.value++,tt(w.value)),L==="ArrowUp"&&w.value>1&&(w.value--,tt(w.value)),L==="Enter"&&st(w.value)}function Re(){return o.options.map((L,Yt)=>typeof L=="object"?L:{id:L,name:L})}function ue(){if(he(f.value))return Se(f.value)?h.value.filter(L=>f.value.some(Yt=>String(Yt.id)===String(L.id)))||[]:h.value.filter(L=>f.value.some(Yt=>String(Yt)===String(L.id)))||[];if(o.modelValue)return Se(o.modelValue)?h.value.filter(L=>o.modelValue.some(Yt=>String(Yt.id)===String(L.id)))||[]:h.value.filter(L=>o.modelValue.some(Yt=>String(Yt)===String(L.id)))||[]}function qt(L){let Yt=f.value.findIndex(pt=>pt.id===L.id);Yt!==-1?f.value.splice(Yt,1):f.value.push(L),C.value=!1,y.value=f.value.map(pt=>pt.id),a("update:modelValue",y.value),a("selected",f.value),a("selectionChanged",f.value)}function vt(){if(!o.show){if(C.value){C.value=!1;return}T.value="",C.value=!0,p.nextTick(()=>{var L=document.getElementById(`${o.field_name}search${R.value}`);L&&L.focus()})}}function St(){T.value=""}return p.watch(T,()=>{q.value.length===0&&(f.value=[])}),p.watch(f,L=>{if(he(L)){y.value=L.map(Wt=>Wt.id);const Yt=Array.isArray(y.value)?y.value:[],pt=Array.isArray(o.modelValue)?o.modelValue:[];JSON.stringify(Yt)!==JSON.stringify(pt)&&a("update:modelValue",y.value)}}),p.watch(()=>o.modelValue,L=>{T.value="",L?(f.value=o.modelValue,f.value=ue()):f.value={}},{immediate:!0,deep:!0}),p.watch(()=>o.options,()=>{h.value=Re(),f.value=ue()},{immediate:!0,deep:!0}),(L,Yt)=>{var pt,Wt;return p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",Nhe,p.toDisplayString(r.label_name),1),p.createElementVNode("p",$he,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.value,(at,Ne)=>(p.openBlock(),p.createElementBlock("span",Rhe,p.toDisplayString(at==null?void 0:at.name),1))),256))]),Yt[4]||(Yt[4]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(r.field_name)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(y.value,(at,Ne)=>(p.openBlock(),p.createElementBlock("input",{type:"hidden",name:r.field_name+"[]",key:Ne,value:at},null,8,Bhe))),128)),r.options?(p.openBlock(),p.createElementBlock("div",Mhe,[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required})},p.toDisplayString(r.label_name),3),p.createElementVNode("div",Fhe,[p.createElementVNode("button",{onClick:de,type:"button",class:"px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 ltr:rounded-tl-lg rtl:rounded-tr-lg hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"},p.toDisplayString(((pt=r.language)==null?void 0:pt.select_all)??"Select all"),1),p.createElementVNode("button",{onClick:xt,type:"button",class:"ltr:rounded-tr-lg rtl:rounded-tl-lg! px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"},p.toDisplayString(((Wt=r.language)==null?void 0:Wt.deselect_all)??"Deselect all"),1)]),p.createElementVNode("div",{ref_key:"myDivDropDown",ref:B,class:"relative border border-gray-200 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"},[p.createElementVNode("div",Lhe,[p.createElementVNode("div",{class:"flex flex-wrap gap-2 pr-2 gl-multi-dropdown showOptions",onClick:Yt[0]||(Yt[0]=at=>vt())},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.value,(at,Ne)=>(p.openBlock(),p.createElementBlock("span",{key:Ne,class:"flex gap-2 px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm pointer-events-none dark:bg-blue-900 dark:text-blue-300"},[p.createTextVNode(p.toDisplayString(at==null?void 0:at.name)+" ",1),p.createElementVNode("i",{onClick:p.withModifiers(Oe=>je(at),["stop"]),class:"cursor-pointer pointer-events-auto hover:text-red-600 dark:hover:text-red-400"},Yt[5]||(Yt[5]=[p.createElementVNode("svg",{class:"w-[9px] h-[16px]","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})],-1)]),8,Ihe)]))),128))]),p.createElementVNode("i",{onClick:Yt[1]||(Yt[1]=p.withModifiers(at=>vt(),["stop"])),class:"absolute text-xl text-gray-500 cursor-pointer fas ltr:right-2 rtl:left-2 hover:text-gray-700 dark:hover:text-gray-800 showOptions",style:{top:"14px"}},[(p.openBlock(),p.createElementBlock("svg",{class:p.normalizeClass([C.value?"":"rotate-180","w-3 h-3 shrink-0"]),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 6"},Yt[6]||(Yt[6]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5 5 1 1 5"},null,-1)]),2))]),p.withDirectives(p.createElementVNode("div",Vhe,[p.createElementVNode("div",Qhe,[Yt[8]||(Yt[8]=p.createElementVNode("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),p.createElementVNode("div",zhe,[Yt[7]||(Yt[7]=p.createElementVNode("div",{class:"absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3"},null,-1)),p.withDirectives(p.createElementVNode("input",{type:"search","onUpdate:modelValue":Yt[2]||(Yt[2]=at=>T.value=at),ref:c.value,id:`${r.field_name}search${R.value}`,onKeydown:X,onBlur:Yt[3]||(Yt[3]=at=>St()),autocomplete:"off",class:"block w-full p-2 text-sm text-gray-900 outline-hidden dark:bg-gray-800 dark:text-white",placeholder:r.search_input_placeholder},null,40,Hhe),[[p.vModelText,T.value]])])]),p.createElementVNode("div",Zhe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(q.value,(at,Ne)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["block px-2 py-0.5 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-white hover:rounded-sm",Ne+1==w.value?"bg-gray-100 dark:bg-gray-700 rounded-sm":""]),onClick:Oe=>qt(at),onMousedown:Oe=>qt(at),key:Ne,id:`${Ne+1}${R.value}`},[p.createElementVNode("div",Whe,[te(at.id)?(p.openBlock(),p.createElementBlock("svg",Xhe,Yt[9]||(Yt[9]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"},null,-1)]))):p.createCommentVNode("",!0),p.createElementVNode("span",{innerHTML:at.name||at.id||"-"},null,8,qhe)])],42,Uhe))),128))])],512),[[p.vShow,C.value]])])],512)])):p.createCommentVNode("",!0)],2))],64)}}},Ghe={class:"font-bold ptext-lg dark:text-white"},Yhe=["name","id"],Khe=["id"],Jhe=["for"],eme=["name","id"],tme=["required","name","id","type"],nme={class:"gl-span-form-error"},ome={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},sme={__name:"GlTextareaTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:[String,Number],default:""},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(r,{expose:t,emit:o}){const a=r,c=o,f=p.ref(null),h=p.ref(null),y=()=>{h.value&&c("update:modelValueTranslate",h.value.value)};return p.onMounted(()=>{f.value!==null&&f.value.hasAttribute("autofocus")&&f.value.focus(),a.modelValue&&(c("update:modelValue",a.modelValue),f.value.value=a.modelValue),a.modelValueTranslate&&(c("update:modelValueTranslate",a.modelValueTranslate),h.value.value=a.modelValueTranslate),f.value.classList.add("gl-multilanguage")}),t({focus:()=>f.value.focus()}),(w,C)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",Ghe,p.toDisplayString(r.label_name),1),p.withDirectives(p.createElementVNode("input",{type:"hidden","data-i18n":"true",name:r.field_name+"_i18n",id:r.field_name+"_i18n",ref_key:"input_translate",ref:h,"onUpdate:modelValue":C[0]||(C[0]=T=>w.inputTranslateValue=T)},null,8,Yhe),[[p.vModelText,w.inputTranslateValue]]),p.createElementVNode("p",{id:r.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},p.toDisplayString(w.model_value),9,Khe),C[3]||(C[3]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["mb-4",r.field_name])},[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-translation-form":r.error_message=="","gl-label-translation-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,Jhe),C[4]||(C[4]=p.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300"},null,-1)),p.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:r.field_name+"_i18n",id:r.field_name+"_i18n",onChange:y,ref_key:"input_translate",ref:h},null,40,eme),p.createElementVNode("textarea",{class:p.normalizeClass(["mt-4 form-input-translation",{" gl-textarea-form":r.error_message==""," gl-textarea-form-invalid":r.error_message!==""}]),required:r.is_required,name:r.field_name,id:r.field_name,type:r.type,onInput:C[1]||(C[1]=T=>w.$emit("update:modelValue",T.target.value)),onKeydown:C[2]||(C[2]=T=>w.$emit("keydown",T)),ref_key:"input",ref:f,rows:"4"}," ",42,tme),p.createElementVNode("span",nme,p.toDisplayString(r.error_message),1),p.createElementVNode("small",ome,p.toDisplayString(r.description),1)],2))],64))}},rme={class:"font-bold ptext-lg dark:text-white"},ime=["name","id"],ame=["id"],lme=["for"],cme=["name","id"],ume=["required","name","id","type"],dme={class:"gl-span-form-error"},fme={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},hme={__name:"GlTextTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:[String,Number],default:""},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(r,{expose:t,emit:o}){const a=r,c=o,f=p.ref(null),h=p.ref(null),y=()=>{h.value&&c("update:modelValueTranslate",h.value.value)};return p.onMounted(()=>{f.value!==null&&f.value.hasAttribute("autofocus")&&f.value.focus(),a.modelValue&&(c("update:modelValue",a.modelValue),f.value.value=a.modelValue),a.modelValueTranslate&&(c("update:modelValueTranslate",a.modelValueTranslate),h.value.value=a.modelValueTranslate),f.value.classList.add("gl-multilanguage")}),t({focus:()=>f.value.focus()}),(w,C)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",rme,p.toDisplayString(r.label_name),1),p.withDirectives(p.createElementVNode("input",{type:"hidden","data-i18n":"true",name:r.field_name+"_i18n",id:r.field_name+"_i18n",ref_key:"input_translate",ref:h,"onUpdate:modelValue":C[0]||(C[0]=T=>w.inputTranslateValue=T)},null,8,ime),[[p.vModelText,w.inputTranslateValue]]),p.createElementVNode("p",{id:r.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},p.toDisplayString(w.model_value),9,ame),C[3]||(C[3]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["mb-4",r.field_name])},[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-translation-form":r.error_message=="","gl-label-translation-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,lme),C[4]||(C[4]=p.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300"},null,-1)),p.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:r.field_name+"_i18n",id:r.field_name+"_i18n",onChange:y,ref_key:"input_translate",ref:h},null,40,cme),p.createElementVNode("input",{required:r.is_required,name:r.field_name,id:r.field_name,class:p.normalizeClass(["mt-2 form-input-translation",{" gl-input-form":r.error_message==""," gl-input-form-invalid":r.error_message!==""}]),type:r.type,onInput:C[1]||(C[1]=T=>w.$emit("update:modelValue",T.target.value)),onKeydown:C[2]||(C[2]=T=>w.$emit("keydown",T)),ref_key:"input",ref:f},null,42,ume),p.createElementVNode("span",dme,p.toDisplayString(r.error_message),1),p.createElementVNode("small",fme,p.toDisplayString(r.description),1)],2))],64))}},mme={key:0,class:"gl-label-form"},gme={class:"mt-1 text-gray-900 dark:text-white"},pme=["for"],bme={key:1,class:"flex items-center"},yme=["innerHTML"],Ome={class:"relative w-full"},xme=["minlength","maxlength","required","name","id","type","placeholder"],vme=["innerHTML"],wme=["minlength","maxlength","required","name","id","type","placeholder"],Sme={class:"gl-span-form-error"},kme={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Wne={__name:"GlTextInput",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:""},minlength:{type:String,default:null},maxlength:{type:String,default:null},input_class:{type:String,default:""},container_class:{type:String,default:""},inputGroupType:{type:String,default:""},inputGroupText:{type:String,default:""}},emits:["update:modelValue","keydown","blur-sm","keyup"],setup(r,{expose:t,emit:o}){const a=r,c=o,f=p.ref(null);p.onMounted(()=>{f.value!==null&&f.value.hasAttribute("autofocus")&&f.value.focus()});const h=p.computed({get(){return a.modelValue},set(y){c("update:modelValue",y)}});return t({focus:()=>f.value.focus()}),(y,w)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[r.label_name?(p.openBlock(),p.createElementBlock("label",mme,p.toDisplayString(r.label_name),1)):p.createCommentVNode("",!0),p.createElementVNode("p",gme,p.toDisplayString(r.type=="password"?r.modelValue.replace(/./g,"*"):r.modelValue),1),w[8]||(w[8]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass({[r.field_name]:r.field_name&&r.field_name!=="",[r.container_class]:r.container_class&&r.container_class!==""})},[r.label_name?(p.openBlock(),p.createElementBlock("label",{key:0,class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,pme)):p.createCommentVNode("",!0),r.inputGroupType?(p.openBlock(),p.createElementBlock("div",bme,[r.inputGroupType=="prepend"?(p.openBlock(),p.createElementBlock("label",{key:0,innerHTML:r.inputGroupText,class:"h-10 z-10 inline-flex items-center shrink-0 px-4 text-sm font-medium text-center text-gray-500 bg-gray-100 border border-gray-300 dark:text-gray-400 rounded-s-lg focus:outline-hidden dark:bg-gray-700 dark:border-gray-600"},null,8,yme)):p.createCommentVNode("",!0),p.createElementVNode("div",Ome,[p.withDirectives(p.createElementVNode("input",{minlength:r.minlength,maxlength:r.maxlength,class:p.normalizeClass(["rtl:text-right rounded-none!",{"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!=="",[r.input_class]:r.input_class&&r.input_class!=="","border-e-0! rounded-s-lg!":r.inputGroupType=="append","border-s-0! rounded-e-lg!":r.inputGroupType=="prepend"}]),required:r.is_required,name:r.field_name,id:r.field_name,type:r.type,"onUpdate:modelValue":w[0]||(w[0]=C=>h.value=C),onKeydown:w[1]||(w[1]=C=>y.$emit("keydown",C)),onKeyup:w[2]||(w[2]=C=>y.$emit("keyup",C)),onBlur:w[3]||(w[3]=C=>y.$emit("blur-sm",C)),ref_key:"input",ref:f,placeholder:r.placeholder},null,42,xme),[[p.vModelDynamic,h.value]])]),r.inputGroupType=="append"?(p.openBlock(),p.createElementBlock("label",{key:1,innerHTML:r.inputGroupText,class:"h-10 z-10 inline-flex items-center shrink-0 px-4 text-sm font-medium text-center text-gray-500 bg-gray-100 border border-gray-300 dark:text-gray-400 rounded-e-lg focus:outline-hidden dark:bg-gray-700 dark:border-gray-600"},null,8,vme)):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0),r.inputGroupType==""?p.withDirectives((p.openBlock(),p.createElementBlock("input",{key:2,minlength:r.minlength,maxlength:r.maxlength,class:p.normalizeClass(["rtl:text-right",{"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!=="",[r.input_class]:r.input_class&&r.input_class!==""}]),required:r.is_required,name:r.field_name,id:r.field_name,type:r.type,"onUpdate:modelValue":w[4]||(w[4]=C=>h.value=C),onKeydown:w[5]||(w[5]=C=>y.$emit("keydown",C)),onKeyup:w[6]||(w[6]=C=>y.$emit("keyup",C)),onBlur:w[7]||(w[7]=C=>y.$emit("blur-sm",C)),ref_key:"input",ref:f,placeholder:r.placeholder},null,42,wme)),[[p.vModelDynamic,h.value]]):p.createCommentVNode("",!0),p.createElementVNode("span",Sme,p.toDisplayString(r.error_message),1),p.createElementVNode("small",kme,p.toDisplayString(r.description),1)],2))],64))}},Cme={key:0,class:"gl-label-form"},Eme={class:"mt-1 text-gray-900 dark:text-white"},_me=["for"],Tme={class:"relative"},Ame={key:0,class:"flex items-center"},Pme=["innerHTML"],Dme={class:"relative w-full"},Nme=["required","name","id","value","placeholder"],$me=["innerHTML"],Rme={key:1,class:"relative"},Bme=["required","name","id","value","placeholder"],Mme={class:"absolute z-50 mt-1 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 p-4 max-w-72"},Fme={class:"flex items-center justify-between mb-4"},Lme={class:"text-sm font-semibold text-gray-900 dark:text-white"},Ime={class:"grid grid-cols-7 gap-1 mb-2"},Vme={class:"grid grid-cols-7 gap-1"},Qme=["onClick","disabled"],zme={class:"flex items-center justify-between mt-4 pt-3 border-t border-gray-200 dark:border-gray-700"},Hme={class:"gl-span-form-error"},Zme={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},bH={__name:"GlDatePicker",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:[String,Date],default:""},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:"Select date"},input_class:{type:String,default:""},container_class:{type:String,default:""},date_format:{type:String,default:"YYYY-MM-DD"},min_date:{type:String,default:null},max_date:{type:String,default:null},disabled_days:{type:Array,default:()=>[]},disabled_dates:{type:Array,default:()=>[]},locale:{type:String,default:"en"},inputGroupType:{type:String,default:""},inputGroupText:{type:String,default:""}},emits:["update:modelValue","change","blur-sm"],setup(r,{expose:t,emit:o}){const a=r,c=o,f=p.ref(null),h=p.ref(null),y=p.ref(!1),w=p.ref(new Date().getMonth()),C=p.ref(new Date().getFullYear()),T=pt=>{if(!pt)return null;if(pt.toLowerCase()==="today")return new Date;const Wt=pt.match(/^([+-]?)(\d+)([dmy])$/i);if(Wt){const Ne=Wt[1]==="-"?-1:1,Oe=parseInt(Wt[2])*Ne,it=Wt[3].toLowerCase(),_e=new Date;return it==="d"?_e.setDate(_e.getDate()+Oe):it==="m"?_e.setMonth(_e.getMonth()+Oe):it==="y"&&_e.setFullYear(_e.getFullYear()+Oe),_e}const at=new Date(pt);return isNaN(at.getTime())?null:at},R=p.computed(()=>{const pt=[];for(let Wt=0;Wt<12;Wt++){const at=new Date(2e3,Wt,1);pt.push(at.toLocaleDateString(a.locale,{month:"long"}))}return pt}),B=p.computed(()=>{const pt=[];for(let Wt=0;Wt<7;Wt++){const at=new Date(2e3,0,2+Wt);pt.push(at.toLocaleDateString(a.locale,{weekday:"short"}))}return pt}),V=pt=>{if(!pt)return"";let Wt;if(typeof pt=="string"&&(Wt=q(pt)),(!Wt||isNaN(Wt.getTime()))&&(Wt=new Date(pt)),isNaN(Wt.getTime()))return"";const at=Wt.getFullYear(),Ne=String(Wt.getMonth()+1).padStart(2,"0"),Oe=String(Wt.getDate()).padStart(2,"0");switch(a.date_format){case"DD-MM-YYYY":return`${Oe}-${Ne}-${at}`;case"MM-DD-YYYY":return`${Ne}-${Oe}-${at}`;case"DD/MM/YYYY":return`${Oe}/${Ne}/${at}`;case"MM/DD/YYYY":return`${Ne}/${Oe}/${at}`;case"YYYY/MM/DD":return`${at}/${Ne}/${Oe}`;case"YYYY-MM-DD":default:return`${at}-${Ne}-${Oe}`}},q=pt=>{if(!pt)return null;let Wt,at,Ne;const Oe=pt.split(/[-/]/);if(Oe.length!==3)return null;switch(a.date_format){case"DD-MM-YYYY":case"DD/MM/YYYY":Ne=parseInt(Oe[0]),at=parseInt(Oe[1])-1,Wt=parseInt(Oe[2]);break;case"MM-DD-YYYY":case"MM/DD/YYYY":at=parseInt(Oe[0])-1,Ne=parseInt(Oe[1]),Wt=parseInt(Oe[2]);break;case"YYYY/MM/DD":case"YYYY-MM-DD":default:Wt=parseInt(Oe[0]),at=parseInt(Oe[1])-1,Ne=parseInt(Oe[2]);break}const it=new Date(Wt,at,Ne);return isNaN(it.getTime())?null:it},X=p.ref("");p.watch(()=>a.modelValue,pt=>{X.value=V(pt)},{immediate:!0});const Y=pt=>{const Wt=pt.target.value;X.value=Wt;const at=q(Wt);if(at&&!isNaN(at.getTime())&&!te(at)){const Ne=V(at);c("update:modelValue",Ne),c("change",Ne)}else Wt===""&&(c("update:modelValue",""),c("change",""))},he=pt=>{const Wt=X.value,at=q(Wt);at&&!isNaN(at.getTime())&&!te(at)?X.value=V(at):Wt!==""&&(X.value=V(a.modelValue)),c("blur-sm",pt)},Se=p.computed(()=>{const pt=new Date(C.value,w.value,1),Wt=new Date(C.value,w.value+1,0),at=pt.getDay(),Ne=Wt.getDate(),Oe=[],it=new Date(C.value,w.value,0).getDate();for(let Ve=at-1;Ve>=0;Ve--)Oe.push({day:it-Ve,currentMonth:!1,date:new Date(C.value,w.value-1,it-Ve)});for(let Ve=1;Ve<=Ne;Ve++)Oe.push({day:Ve,currentMonth:!0,date:new Date(C.value,w.value,Ve)});const _e=42-Oe.length;for(let Ve=1;Ve<=_e;Ve++)Oe.push({day:Ve,currentMonth:!1,date:new Date(C.value,w.value+1,Ve)});return Oe}),te=pt=>{if(a.disabled_days.includes(pt.getDay()))return!0;if(a.disabled_dates&&a.disabled_dates.length>0){const Wt=new Date(pt);Wt.setHours(0,0,0,0);for(const at of a.disabled_dates){let Ne;if(typeof at=="string"?(Ne=q(at),(!Ne||isNaN(Ne.getTime()))&&(Ne=new Date(at))):at instanceof Date&&(Ne=at),Ne&&!isNaN(Ne.getTime())&&(Ne.setHours(0,0,0,0),Wt.getTime()===Ne.getTime()))return!0}}if(a.min_date){const Wt=T(a.min_date);if(Wt&&(Wt.setHours(0,0,0,0),pt<Wt))return!0}if(a.max_date){const Wt=T(a.max_date);if(Wt&&(Wt.setHours(0,0,0,0),pt>Wt))return!0}return!1},de=pt=>{if(!a.modelValue)return!1;const Wt=q(a.modelValue)||new Date(a.modelValue);return pt.toDateString()===Wt.toDateString()},xt=pt=>pt.toDateString()===new Date().toDateString(),je=pt=>{if(te(pt.date))return;const Wt=V(pt.date);c("update:modelValue",Wt),c("change",Wt),y.value=!1},j=()=>{w.value===0?(w.value=11,C.value--):w.value--},tt=()=>{w.value===11?(w.value=0,C.value++):w.value++},st=()=>{C.value--},wt=()=>{C.value++},Re={en:{clear:"Clear",today:"Today"},ar:{clear:"مسح",today:"اليوم"}},ue=()=>a.locale&&a.locale.startsWith("ar")?"ar":"en",qt=pt=>{const Wt=ue();return Re[Wt][pt]||Re.en[pt]||pt},vt=()=>{const pt=new Date;w.value=pt.getMonth(),C.value=pt.getFullYear(),je({date:pt})},St=()=>{c("update:modelValue",""),c("change",""),y.value=!1},L=()=>{if(y.value=!y.value,y.value&&a.modelValue){const pt=q(a.modelValue)||new Date(a.modelValue);isNaN(pt.getTime())||(w.value=pt.getMonth(),C.value=pt.getFullYear())}},Yt=pt=>{h.value&&!h.value.contains(pt.target)&&(y.value=!1)};return p.onMounted(()=>{document.addEventListener("click",Yt),f.value!==null&&f.value.hasAttribute("autofocus")&&f.value.focus()}),p.onUnmounted(()=>{document.removeEventListener("click",Yt)}),t({focus:()=>{var pt;return(pt=f.value)==null?void 0:pt.focus()}}),(pt,Wt)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[r.label_name?(p.openBlock(),p.createElementBlock("label",Cme,p.toDisplayString(r.label_name),1)):p.createCommentVNode("",!0),p.createElementVNode("p",Eme,p.toDisplayString(X.value),1),Wt[0]||(Wt[0]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass({[r.field_name]:r.field_name&&r.field_name!=="",[r.container_class]:r.container_class&&r.container_class!==""}),ref_key:"datepickerContainer",ref:h},[r.label_name?(p.openBlock(),p.createElementBlock("label",{key:0,class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,_me)):p.createCommentVNode("",!0),p.createElementVNode("div",Tme,[r.inputGroupType?(p.openBlock(),p.createElementBlock("div",Ame,[r.inputGroupType=="prepend"?(p.openBlock(),p.createElementBlock("label",{key:0,innerHTML:r.inputGroupText,class:"h-10 z-10 inline-flex items-center shrink-0 px-4 text-sm font-medium text-center text-gray-500 bg-gray-100 border border-gray-300 dark:text-gray-400 rounded-s-lg focus:outline-hidden dark:bg-gray-700 dark:border-gray-600"},null,8,Pme)):p.createCommentVNode("",!0),p.createElementVNode("div",Dme,[p.createElementVNode("input",{type:"text",class:p.normalizeClass(["rtl:text-right rounded-none!",{"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!=="",[r.input_class]:r.input_class&&r.input_class!=="","border-e-0! rounded-s-lg!":r.inputGroupType=="append","border-s-0! rounded-e-lg!":r.inputGroupType=="prepend"}]),required:r.is_required,name:r.field_name,id:r.field_name,value:X.value,onInput:Y,onBlur:he,ref_key:"input",ref:f,placeholder:r.placeholder},null,42,Nme),p.createElementVNode("div",{class:"absolute inset-y-0 end-0 flex items-center pe-3 cursor-pointer",onClick:L},Wt[1]||(Wt[1]=[p.createElementVNode("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"})],-1)]))]),r.inputGroupType=="append"?(p.openBlock(),p.createElementBlock("label",{key:1,innerHTML:r.inputGroupText,class:"h-10 z-10 inline-flex items-center shrink-0 px-4 text-sm font-medium text-center text-gray-500 bg-gray-100 border border-gray-300 dark:text-gray-400 rounded-e-lg focus:outline-hidden dark:bg-gray-700 dark:border-gray-600"},null,8,$me)):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0),r.inputGroupType==""?(p.openBlock(),p.createElementBlock("div",Rme,[p.createElementVNode("input",{type:"text",class:p.normalizeClass(["rtl:text-right pe-10",{"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!=="",[r.input_class]:r.input_class&&r.input_class!==""}]),required:r.is_required,name:r.field_name,id:r.field_name,value:X.value,onInput:Y,onBlur:he,ref_key:"input",ref:f,placeholder:r.placeholder},null,42,Bme),p.createElementVNode("div",{class:"absolute inset-y-0 end-0 flex items-center pe-3 cursor-pointer",onClick:L},Wt[2]||(Wt[2]=[p.createElementVNode("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M20 4a2 2 0 0 0-2-2h-2V1a1 1 0 0 0-2 0v1h-3V1a1 1 0 0 0-2 0v1H6V1a1 1 0 0 0-2 0v1H2a2 2 0 0 0-2 2v2h20V4ZM0 18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8H0v10Zm5-8h10a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Z"})],-1)]))])):p.createCommentVNode("",!0),p.withDirectives(p.createElementVNode("div",Mme,[p.createElementVNode("div",Fme,[p.createElementVNode("button",{type:"button",onClick:st,class:"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded text-gray-500 dark:text-gray-400"},Wt[3]||(Wt[3]=[p.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"})],-1)])),p.createElementVNode("button",{type:"button",onClick:j,class:"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded text-gray-500 dark:text-gray-400"},Wt[4]||(Wt[4]=[p.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])),p.createElementVNode("span",Lme,p.toDisplayString(R.value[w.value])+" "+p.toDisplayString(C.value),1),p.createElementVNode("button",{type:"button",onClick:tt,class:"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded text-gray-500 dark:text-gray-400"},Wt[5]||(Wt[5]=[p.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])),p.createElementVNode("button",{type:"button",onClick:wt,class:"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded text-gray-500 dark:text-gray-400"},Wt[6]||(Wt[6]=[p.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 5l7 7-7 7m-8-14l7 7-7 7"})],-1)]))]),p.createElementVNode("div",Ime,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(B.value,at=>(p.openBlock(),p.createElementBlock("div",{key:at,class:"text-center text-xs font-medium text-gray-500 dark:text-gray-400 py-1"},p.toDisplayString(at),1))),128))]),p.createElementVNode("div",Vme,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(Se.value,(at,Ne)=>(p.openBlock(),p.createElementBlock("button",{key:Ne,type:"button",onClick:Oe=>je(at),disabled:te(at.date),class:p.normalizeClass(["w-8 h-8 text-sm rounded-full flex items-center justify-center transition-colors",{"text-gray-400 dark:text-gray-600":!at.currentMonth,"text-gray-900 dark:text-white":at.currentMonth&&!de(at.date)&&!te(at.date),"bg-primary dark:bg-primaryDark text-white hover:bg-primary/90 dark:hover:bg-primaryDark/90":de(at.date),"ring-2 ring-primary dark:ring-primaryDark ring-offset-1 dark:ring-offset-gray-800":xt(at.date)&&!de(at.date),"hover:bg-gray-100 dark:hover:bg-gray-700":!de(at.date)&&!te(at.date),"opacity-50 cursor-not-allowed":te(at.date)}])},p.toDisplayString(at.day),11,Qme))),128))]),p.createElementVNode("div",zme,[p.createElementVNode("button",{type:"button",onClick:St,class:"text-sm text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"},p.toDisplayString(qt("clear")),1),p.createElementVNode("button",{type:"button",onClick:vt,class:"text-sm text-primary dark:text-primaryDark hover:text-primary/80 dark:hover:text-primaryDark/80 font-medium"},p.toDisplayString(qt("today")),1)])],512),[[p.vShow,y.value]])]),p.createElementVNode("span",Hme,p.toDisplayString(r.error_message),1),p.createElementVNode("small",Zme,p.toDisplayString(r.description),1)],2))],64))}},Ume={key:0,class:"gl-label-form"},Wme={class:"mt-1 text-gray-900 dark:text-white"},Xme=["for"],qme={class:"flex justify-between gap-2 flex-col md:flex-row items-center"},jme={class:"w-full md:flex-1"},Gme={class:"text-gray-500 dark:text-gray-400 font-medium shrink-0 py-2 md:py-0"},Yme={class:"w-full md:flex-1"},Kme={key:1,class:"text-center mt-1"},Jme={class:"gl-span-form-error"},ege={key:2,class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Xne={__name:"GlDateRangePicker",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:Object,default:()=>({start:"",end:""})},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder_start:{type:String,default:"Start date"},placeholder_end:{type:String,default:"End date"},date_format:{type:String,default:"YYYY-MM-DD"},min_date_start:{type:String,default:null},max_date_start:{type:String,default:null},min_date_end:{type:String,default:null},max_date_end:{type:String,default:null},disabled_days:{type:Array,default:()=>[]},disabled_dates:{type:Array,default:()=>[]},locale:{type:String,default:"en"},separator:{type:String,default:"to"},container_class:{type:String,default:""}},emits:["update:modelValue","change"],setup(r,{emit:t}){const o=r,a=t,c=p.ref(""),f=p.ref({start:o.modelValue.start,end:o.modelValue.end});p.watch(()=>o.modelValue,X=>{X&&(f.value.start=X.start,f.value.end=X.end)},{immediate:!0,deep:!0});const h=X=>{if(!X)return null;let Y,he,Se;const te=X.split(/[-/]/);if(te.length!==3)return new Date(X);switch(o.date_format){case"DD-MM-YYYY":case"DD/MM/YYYY":Se=parseInt(te[0]),he=parseInt(te[1])-1,Y=parseInt(te[2]);break;case"MM-DD-YYYY":case"MM/DD/YYYY":he=parseInt(te[0])-1,Se=parseInt(te[1]),Y=parseInt(te[2]);break;case"YYYY/MM/DD":case"YYYY-MM-DD":default:Y=parseInt(te[0]),he=parseInt(te[1])-1,Se=parseInt(te[2]);break}const de=new Date(Y,he,Se);return isNaN(de.getTime())?null:de},y=p.computed(()=>f.value.start?f.value.start:o.min_date_end),w=p.computed(()=>f.value.end?f.value.end:o.max_date_start),C=(X,Y)=>{if(X&&Y){const he=h(X),Se=h(Y);if(he&&Se&&he>Se)return c.value="Start date cannot be after end date.",!1}return c.value="",!0},T=X=>{if(f.value.start=X,f.value.end){const Y=h(X),he=h(f.value.end);Y&&he&&Y>he&&(f.value.end="")}C(f.value.start,f.value.end),B()},R=X=>{if(f.value.end=X,f.value.start){const Y=h(f.value.start),he=h(X);Y&&he&&Y>he&&(f.value.start="")}C(f.value.start,f.value.end),B()},B=()=>{const X={start:f.value.start,end:f.value.end};a("update:modelValue",X),a("change",X)},V=p.computed(()=>o.error_message?o.error_message:""),q=p.computed(()=>"");return(X,Y)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[r.label_name?(p.openBlock(),p.createElementBlock("label",Ume,p.toDisplayString(r.label_name),1)):p.createCommentVNode("",!0),p.createElementVNode("p",Wme,p.toDisplayString(r.modelValue.start)+" "+p.toDisplayString(r.separator)+" "+p.toDisplayString(r.modelValue.end),1),Y[2]||(Y[2]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass({[r.field_name]:r.field_name&&r.field_name!=="",[r.container_class]:r.container_class&&r.container_class!==""})},[r.label_name?(p.openBlock(),p.createElementBlock("label",{key:0,class:p.normalizeClass({"gl-label-form":r.error_message==""&&c.value=="","gl-label-form-invalid":r.error_message!==""||c.value!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,Xme)):p.createCommentVNode("",!0),p.createElementVNode("div",qme,[p.createElementVNode("div",jme,[p.createVNode(bH,{modelValue:f.value.start,"onUpdate:modelValue":Y[0]||(Y[0]=he=>f.value.start=he),field_name:r.field_name+"_start",is_required:r.is_required,placeholder:r.placeholder_start,date_format:r.date_format,min_date:r.min_date_start,max_date:w.value,disabled_days:r.disabled_days,disabled_dates:r.disabled_dates,locale:r.locale,error_message:V.value,onChange:T},null,8,["modelValue","field_name","is_required","placeholder","date_format","min_date","max_date","disabled_days","disabled_dates","locale","error_message"])]),p.createElementVNode("span",Gme,p.toDisplayString(r.separator),1),p.createElementVNode("div",Yme,[p.createVNode(bH,{modelValue:f.value.end,"onUpdate:modelValue":Y[1]||(Y[1]=he=>f.value.end=he),field_name:r.field_name+"_end",is_required:r.is_required,placeholder:r.placeholder_end,date_format:r.date_format,min_date:y.value,max_date:r.max_date_end,disabled_days:r.disabled_days,disabled_dates:r.disabled_dates,locale:r.locale,error_message:q.value,onChange:R},null,8,["modelValue","field_name","is_required","placeholder","date_format","min_date","max_date","disabled_days","disabled_dates","locale","error_message"])])]),c.value||r.error_message?(p.openBlock(),p.createElementBlock("div",Kme,[p.createElementVNode("span",Jme,p.toDisplayString(r.error_message||c.value),1)])):p.createCommentVNode("",!0),r.description?(p.openBlock(),p.createElementBlock("small",ege,p.toDisplayString(r.description),1)):p.createCommentVNode("",!0)],2))],64))}},tge={class:"font-bold ptext-lg dark:text-white"},nge={class:"mb-4 text-base text-gray-900 dark:text-white"},oge=["for"],sge=["required","name","id","placeholder"],rge={class:"gl-span-form-error"},ige={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},age={__name:"GlTextInputFile",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:File,default:null},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:""}},emits:["update:modelValue","keydown"],setup(r,{emit:t}){const o=t,a=p.ref(null),c=f=>{const h=f.target.files[0];console.log(h),o("keydown",f),h&&o("update:modelValue",h)};return(f,h)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",tge,p.toDisplayString(r.label_name),1),p.createElementVNode("p",nge,p.toDisplayString(r.type=="password"?r.modelValue.replace(/./g,"*"):r.modelValue),1),h[0]||(h[0]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(r.field_name)},[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,oge),p.createElementVNode("input",{required:r.is_required,name:r.field_name,id:r.field_name,class:p.normalizeClass({"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!==""}),type:"file",onChange:c,ref_key:"input",ref:a,placeholder:r.placeholder},null,42,sge),p.createElementVNode("span",rge,p.toDisplayString(r.error_message),1),p.createElementVNode("small",ige,p.toDisplayString(r.description),1)],2))],64))}},lge=["onClick"],cge={class:"relative flex flex-col w-full min-w-0 mb-6 break-words rounded-[20px] border border-gray-200 dark:border-gray-800"},uge={class:"flex-auto px-4 py-5"},dge={class:"tab-content tab-space"},fge={__name:"GlTabsWrapper",props:{autoFlexTabs:{type:Boolean,default:!0},tabsWrapperClass:{type:String,default:""}},emits:["TabChange"],setup(r,{expose:t,emit:o}){const a=o,c=p.useSlots(),f=p.ref(c.default().map(R=>R.props)),h=p.ref("");p.provide("selectedTitle",h);const y=R=>R.trim().toLowerCase().replace(/\s+/g,"-"),w=R=>{const B=y(R);window.location.hash=encodeURIComponent(B),a("TabChange",R)};t({setActiveTab:R=>{f.value.find(V=>V.title===R)&&(h.value=R)}});const T=()=>{const R=decodeURIComponent(window.location.hash.replace("#","")),B=f.value.find(V=>y(V.title)===R);B&&(h.value=B.title)};return p.watch(h,R=>{w(R)}),p.onMounted(()=>{T(),window.addEventListener("hashchange",T)}),p.onBeforeUnmount(()=>{window.removeEventListener("hashchange",T)}),(R,B)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createElementVNode("ul",{class:p.normalizeClass(["flex flex-row flex-wrap gap-2 pt-3 pb-4 mb-0 list-none text-gray-500 dark:text-gray-400",r.tabsWrapperClass])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.value,V=>(p.openBlock(),p.createElementBlock("li",{key:V.title,onClick:q=>h.value=V.title,class:p.normalizeClass(["-mb-px text-center",{"flex-auto ":r.autoFlexTabs}])},[p.createElementVNode("a",{class:p.normalizeClass([{" bg-gray-50 dark:bg-gray-900 hover:text-gray-900 hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-white border border-gray-300 dark:border-gray-800":h.value!=V.title,"text-white bg-primary dark:bg-primaryDark":h.value===V.title},"block px-5 py-3 text-xs font-bold leading-normal rounded-lg tabs_buttons"])},[V.icon?(p.openBlock(),p.createElementBlock("i",{key:0,class:p.normalizeClass([V.icon,"me-2 text-sm"])},null,2)):p.createCommentVNode("",!0),p.createTextVNode(p.toDisplayString(V.title),1)],2)],10,lge))),128))],2),p.withDirectives(p.createElementVNode("div",cge,[p.createElementVNode("div",uge,[p.createElementVNode("div",dge,[p.renderSlot(R.$slots,"default")])])],512),[[p.vShow,h.value]])],64))}},hge={props:["title"],setup(){return{selectedTitle:p.inject("selectedTitle")}}},mge={key:0,class:"block"};function gge(r,t,o,a,c,f){return o.title==a.selectedTitle?(p.openBlock(),p.createElementBlock("div",mge,[p.renderSlot(r.$slots,"default")])):p.createCommentVNode("",!0)}const pge=vi(hge,[["render",gge]]),bge={props:["title"],setup(){return{selectedTitle:p.inject("selectedTitle")}}},yge={class:"block"};function Oge(r,t,o,a,c,f){return p.withDirectives((p.openBlock(),p.createElementBlock("div",yge,[p.renderSlot(r.$slots,"default")],512)),[[p.vShow,o.title==a.selectedTitle]])}const xge=vi(bge,[["render",Oge]]),vge={props:{elements_to_show_prop:{type:Number,default:3},hide_arrow:{type:Boolean,default:!1},disable_touch:{type:Boolean,default:!1},direction_property:{type:String,default:"ltr"},slider_arrows_indicators_position:{type:String,default:"arrows_outside_slider"},auto_play:{type:Boolean,default:!1},auto_play_interval:{type:Number,default:3}},data(){return{mutationObserver:null,elementsToShow:this.elements_to_show_prop,dotsNum:0,currentDot:1,dotsNavigation:[],touchStartX:0,isMoving:!1,initialX:0,initialY:0,Random_string:this.generateRandomString(6),autoPlayTimer:null}},mounted(){this.$nextTick(()=>{this.observeSlotChanges(),this.initSlider(),this.disable_touch||this.movingActions(),window.addEventListener("resize",this.resizeHandler),this.auto_play&&this.startAutoPlay()})},beforeDestroy(){window.removeEventListener("resize",this.resizeHandler),this.stopAutoPlay()},beforeUnmount(){this.mutationObserver&&this.mutationObserver.disconnect(),this.stopAutoPlay()},methods:{observeSlotChanges(){const r=this.$refs.slotContainer;r&&(this.mutationObserver=new MutationObserver(t=>{t.forEach(o=>{this.initSlider()})}),this.mutationObserver.observe(r,{childList:!0,subtree:!0}))},resizeHandler(){this.initSlider()},sliderIndicatorsAction(){let r="";return this.direction_property==="rtl"&&(r+=" space-x-reverse "),this.slider_arrows_indicators_position==="arrows_indicators_inside_slider"&&(r+=" slider_indicators "),r},sliderContainerAction(){let r="";return!this.hide_arrow&&this.slider_arrows_indicators_position==="arrows_outside_slider"?r+=" w-12/12 xl:w-8/12 xxl:w-8/12 md:w-8/12 sm:w-8/12":this.slider_arrows_indicators_position!=="arrows_outside_slider"&&(r+=" w-12/12 "),r},generateRandomString(r){let t="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=o.length;for(let c=0;c<r;c++)t+=o.charAt(Math.floor(Math.random()*a));return t},movingActions(){},next(){this.currentDot<this.dotsNavigation.length?(this.currentDot++,this.setDot(this.currentDot)):this.auto_play&&(this.currentDot=1,this.setDot(this.currentDot))},prev(){this.currentDot>1&&(this.currentDot--,this.setDot(this.currentDot))},startAutoPlay(){this.stopAutoPlay(),this.autoPlayTimer=setInterval(()=>{this.next()},this.auto_play_interval*1e3)},stopAutoPlay(){this.autoPlayTimer&&(clearInterval(this.autoPlayTimer),this.autoPlayTimer=null)},pauseAutoPlay(){this.stopAutoPlay()},resumeAutoPlay(){this.auto_play&&this.startAutoPlay()},initSlider(){let r=document.getElementById("sliderContainer_"+this.Random_string),t=document.getElementById("mainSliderContainer_"+this.Random_string),o=document.getElementById("slider_"+this.Random_string),a=Array.from(o.querySelectorAll("li")).filter(h=>h.parentNode===o),c=r.clientWidth,f=c/this.elementsToShow;if(this.elementsToShow>1?document.body.clientWidth<1e3?(this.elementsToShow=1,f=this.hide_arrow?t.clientWidth:c):document.body.clientWidth<1500&&(this.elementsToShow=2):(this.elementsToShow=1,f=this.hide_arrow?t.clientWidth:c),a.length>1){this.dotsNum=this.elementsToShow===1?a.length:a.length-this.elementsToShow+1;let h=this.elementsToShow===1?f*a.length/this.dotsNum:f*(a.length-this.elementsToShow)/(this.dotsNum-1);this.dotsNavigation=Array.from({length:this.dotsNum},(y,w)=>h*w)}o.style.width=`${a.length*f}px`,a.forEach(h=>h.style.width=`${f}px`)},setDot(r){let t=document.getElementById("slider_"+this.Random_string);this.direction_property==="rtl"?t.style.marginRight=-this.dotsNavigation[r-1]+"px":t.style.marginLeft=-this.dotsNavigation[r-1]+"px",this.currentDot=r,this.auto_play&&this.startAutoPlay()}}},wge=["id"],Sge={key:0,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},kge={class:"w-full"},Cge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Ege={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},_ge=["id"],Tge=["id"],Age={class:"w-full"},Pge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Dge={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Nge={class:"w-full"},$ge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Rge={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Bge=["onClick"],Mge={key:1,class:"flex justify-between pl-5 pr-5"},Fge=["onClick"],Lge={key:0,class:"flex"},Ige={class:"flex items-center"},Vge={class:"w-full"},Qge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},zge={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Hge={class:"flex items-center"},Zge={class:"w-full"},Uge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Wge={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Xge={key:1,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},qge={class:"w-full"},jge={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Gge={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"};function Yge(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",null,[p.createElementVNode("div",{class:p.normalizeClass(["",!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?"flex":"relative block"]),id:"mainSliderContainer_"+c.Random_string},[c.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(p.openBlock(),p.createElementBlock("div",Sge,[p.createElementVNode("div",kge,[p.createElementVNode("button",{class:"p-3 mr-5 rounded-full shadow-lg arrow_button_styles",onClick:t[0]||(t[0]=h=>f.prev())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Cge,t[6]||(t[6]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Ege,t[7]||(t[7]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)])])])):p.createCommentVNode("",!0),p.createElementVNode("div",{ref:"slotContainer",class:p.normalizeClass(["overflow-hidden flex flex-col gap-3",f.sliderContainerAction()]),id:"sliderContainer_"+c.Random_string},[p.createElementVNode("ul",{class:p.normalizeClass(["flex duration-700 ease-in-out",o.elements_to_show_prop==1||this.elementsToShow==1?"":"gap-7"]),id:"slider_"+c.Random_string},[c.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["items-center justify-center hidden arrow_button xl:flex xxl:flex md:flex sm:flex",o.direction_property=="rtl"?"arrow_button_next":"arrow_button_prev"])},[p.createElementVNode("div",Age,[p.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:t[1]||(t[1]=p.withModifiers(h=>f.prev(),["stop"]))},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Pge,t[8]||(t[8]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Dge,t[9]||(t[9]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)])])],2)):p.createCommentVNode("",!0),p.renderSlot(r.$slots,"default",{},void 0,!0),c.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["items-center justify-center hidden xl:flex xxl:flex md:flex sm:flex arrow_button",o.direction_property=="rtl"?"arrow_button_prev":"arrow_button_next"])},[p.createElementVNode("div",Nge,[p.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:t[2]||(t[2]=p.withModifiers(h=>f.next(),["stop"]))},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",$ge,t[10]||(t[10]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Rge,t[11]||(t[11]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])],2)):p.createCommentVNode("",!0)],10,Tge),o.slider_arrows_indicators_position!="arrows_indicators_below_slider"?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["flex justify-center mb-1 space-x-1",f.sliderIndicatorsAction()])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c.dotsNum,h=>(p.openBlock(),p.createElementBlock("button",{role:"button",class:p.normalizeClass(["gl-dot",{active:c.currentDot==h}]),key:h,onClick:y=>f.setDot(h)},t[12]||(t[12]=[p.createElementVNode("span",null,null,-1)]),10,Bge))),128))],2)):p.createCommentVNode("",!0),o.slider_arrows_indicators_position=="arrows_indicators_below_slider"?(p.openBlock(),p.createElementBlock("div",Mge,[p.createElementVNode("div",{class:p.normalizeClass(["flex justify-center mb-1 space-x-1",f.sliderIndicatorsAction()])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(c.dotsNum,h=>(p.openBlock(),p.createElementBlock("button",{role:"button",class:p.normalizeClass(["gl-dot",{active:c.currentDot==h}]),key:h,onClick:y=>f.setDot(h)},t[13]||(t[13]=[p.createElementVNode("span",null,null,-1)]),10,Fge))),128))],2),c.dotsNum>0?(p.openBlock(),p.createElementBlock("div",Lge,[p.createElementVNode("div",Ige,[p.createElementVNode("div",Vge,[p.createElementVNode("button",{class:p.normalizeClass(["p-3 rounded-full arrow_button_styles",o.direction_property=="rtl"?"ml-3":"mr-3"]),onClick:t[3]||(t[3]=h=>f.prev())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Qge,t[14]||(t[14]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",zge,t[15]||(t[15]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)],2)])]),p.createElementVNode("div",Hge,[p.createElementVNode("div",Zge,[p.createElementVNode("button",{class:"p-3 rounded-full arrow_button_styles",onClick:t[4]||(t[4]=h=>f.next())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Uge,t[16]||(t[16]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Wge,t[17]||(t[17]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])])])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)],10,_ge),c.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(p.openBlock(),p.createElementBlock("div",Xge,[p.createElementVNode("div",qge,[p.createElementVNode("button",{class:"p-3 ml-5 rounded-full shadow-lg arrow_button_styles",onClick:t[5]||(t[5]=h=>f.next())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",jge,t[18]||(t[18]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Gge,t[19]||(t[19]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])])):p.createCommentVNode("",!0)],10,wge)])}const Kge=vi(vge,[["render",Yge],["__scopeId","data-v-f05f6689"]]),Jge={props:{elements_to_show_prop:{type:Number,default:3},element_size:{type:Number,default:80},hide_arrow:{type:Boolean,default:!1},hide_indicators:{type:Boolean,default:!1},disable_touch:{type:Boolean,default:!1},direction_property:{type:String,default:"ltr"},slider_arrows_indicators_position:{type:String,default:"arrows_outside_slider"}},data:function(){return{mutationObserver:null,elementsToShow:3,dotsNum:0,currentDot:1,dotsNavigation:[],touchStartX:0,isMoving:!1,initialX:0,initialY:0,slide_size:0,Random_string:this.generateRandomString(6)}},mounted(){this.elementsToShow=this.elements_to_show_prop,this.observeSlotChanges(),this.initSlider(),this.disable_touch||this.movingActions()},beforeUnmount(){this.mutationObserver&&this.mutationObserver.disconnect()},methods:{observeSlotChanges(){const r=this.$refs.slotContainer;r&&(this.mutationObserver=new MutationObserver(t=>{t.forEach(o=>{this.initSlider()})}),this.mutationObserver.observe(r,{childList:!0,subtree:!0}))},sliderIndicatorsAction(){var r="";return this.direction_property=="rtl"&&(r+=" space-x-reverse "),this.slider_arrows_indicators_position=="arrows_indicators_inside_slider"&&(r+=" slider_indicators "),r},sliderContainerAction(){var r="";return!this.hide_arrow&&this.slider_arrows_indicators_position=="arrows_outside_slider"||this.slider_arrows_indicators_position!="arrows_outside_slider",r},generateRandomString(r){let t="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=o.length;for(let c=0;c<r;c++)t+=o.charAt(Math.floor(Math.random()*a));return t},movingActions(){let r=this,t=document.getElementById("slider_"+this.Random_string);const o=c=>{t.style.cursor="grabbing";const f=y=>{const w=y.clientX||y.touches&&y.touches[0]&&y.touches[0].clientX,C=y.clientY||y.touches&&y.touches[0]&&y.touches[0].clientY,T=w-r.initialX,R=C-r.initialY;Math.abs(T)>Math.abs(R)?(y.preventDefault(),Math.abs(T)>=70&&(T<0?r.next():r.prev(),r.initialX=w)):t.style.cursor="grab",Math.abs(R)>Math.abs(T)&&(t.style.cursor="grab")},h=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("touchmove",f),document.removeEventListener("mouseup",h),document.removeEventListener("touchend",h),t.style.cursor="grab"};document.addEventListener("mousemove",f),document.addEventListener("touchmove",f,{passive:!1}),document.addEventListener("mouseup",h),document.addEventListener("touchend",h),r.initialX=c.clientX||c.touches&&c.touches[0]&&c.touches[0].clientX,r.initialY=c.clientY||c.touches&&c.touches[0]&&c.touches[0].clientY},a=c=>{c.key==="ArrowLeft"?r.prev():c.key==="ArrowRight"&&r.next()};t.addEventListener("mousedown",o),t.addEventListener("touchstart",o),document.addEventListener("keydown",a)},next(){this.currentDot<this.dotsNavigation.length&&(this.currentDot++,this.setDot(this.currentDot))},prev(){this.currentDot>1&&(this.currentDot--,this.setDot(this.currentDot))},initSlider(){let r=document.getElementById("sliderContainer_"+this.Random_string),t=document.getElementById("mainSliderContainer_"+this.Random_string),o=document.getElementById("slider_"+this.Random_string),a=o.querySelectorAll("li"),c=Array.from(a).filter(y=>y.parentNode===o);c[0];let f=this.element_size+28,h=r.clientWidth;if(this.elementsToShow=Math.floor(this.hide_arrow?t.clientWidth/f:h/f),f=(this.hide_arrow?t.clientWidth:h)/this.elementsToShow-28,c.length>1){this.dotsNum=Math.ceil(c.length/this.elementsToShow);let y=this.hide_arrow?t.clientWidth:h;this.dotsNavigation=[];for(let w=0;w<this.dotsNum;w++)this.dotsNavigation.push(y*w)}o.style.transition="margin",o.style.transitionDuration="1s";for(let y=0;y<c.length;y++){const w=c[y];w.style.width=f+"px",w.style.minWidth=f+"px"}},setDot(r){let t=document.getElementById("slider_"+this.Random_string);this.direction_property=="rtl"?t.style.marginRight=-this.dotsNavigation[r-1]+"px":t.style.marginLeft=-this.dotsNavigation[r-1]+"px",this.currentDot=r}}},epe=["id"],tpe={key:0,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},npe={class:"w-full"},ope={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},spe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},rpe=["id"],ipe=["id"],ape={class:"w-full"},lpe={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},cpe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},upe={class:"w-full"},dpe={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},fpe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},hpe=["onClick"],mpe={key:1,class:"flex justify-between pl-5 pr-5"},gpe=["onClick"],ppe={key:0,class:"flex"},bpe={class:"flex items-center"},ype={class:"w-full"},Ope={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},xpe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},vpe={class:"flex items-center"},wpe={class:"w-full"},Spe={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},kpe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Cpe={key:1,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},Epe={class:"w-full"},_pe={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Tpe={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"};function Ape(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",null,[p.createElementVNode("div",{class:p.normalizeClass(["w-full",!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?"flex":"relative block"]),id:"mainSliderContainer_"+r.Random_string},[r.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(p.openBlock(),p.createElementBlock("div",tpe,[p.createElementVNode("div",npe,[p.createElementVNode("button",{class:"p-3 mr-5 rounded-full shadow-lg arrow_button_styles",onClick:t[0]||(t[0]=h=>f.prev())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",ope,t[6]||(t[6]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",spe,t[7]||(t[7]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)])])])):p.createCommentVNode("",!0),p.createElementVNode("div",{class:p.normalizeClass(["overflow-hidden flex flex-col gap-3 w-full w-12/12",f.sliderContainerAction()]),id:"sliderContainer_"+r.Random_string},[p.createElementVNode("ul",{ref:"slotContainer",class:p.normalizeClass(["flex w-full",o.elements_to_show_prop==1?"":"gap-7"]),id:"slider_"+r.Random_string},[r.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["items-center justify-center hidden arrow_button xl:flex xxl:flex md:flex sm:flex",o.direction_property=="rtl"?"arrow_button_next":"arrow_button_prev"])},[p.createElementVNode("div",ape,[p.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:t[1]||(t[1]=p.withModifiers(h=>f.prev(),["stop"]))},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",lpe,t[8]||(t[8]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",cpe,t[9]||(t[9]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)])])],2)):p.createCommentVNode("",!0),p.renderSlot(r.$slots,"default",{},void 0,!0),r.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["items-center justify-center hidden xl:flex xxl:flex md:flex sm:flex arrow_button",o.direction_property=="rtl"?"arrow_button_prev":"arrow_button_next"])},[p.createElementVNode("div",upe,[p.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:t[2]||(t[2]=p.withModifiers(h=>f.next(),["stop"]))},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",dpe,t[10]||(t[10]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",fpe,t[11]||(t[11]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])],2)):p.createCommentVNode("",!0)],10,ipe),!o.hide_indicators&&o.slider_arrows_indicators_position!="arrows_indicators_below_slider"?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["flex justify-center mb-1 space-x-1",f.sliderIndicatorsAction()])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.dotsNum,h=>(p.openBlock(),p.createElementBlock("button",{role:"button",class:p.normalizeClass(["gl-dot",{active:r.currentDot==h}]),key:h,onClick:y=>f.setDot(h)},t[12]||(t[12]=[p.createElementVNode("span",null,null,-1)]),10,hpe))),128))],2)):p.createCommentVNode("",!0),!o.hide_indicators&&o.slider_arrows_indicators_position=="arrows_indicators_below_slider"?(p.openBlock(),p.createElementBlock("div",mpe,[p.createElementVNode("div",{class:p.normalizeClass(["flex justify-center mb-1 space-x-1",f.sliderIndicatorsAction()])},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.dotsNum,h=>(p.openBlock(),p.createElementBlock("button",{role:"button",class:p.normalizeClass(["gl-dot",{active:r.currentDot==h}]),key:h,onClick:y=>f.setDot(h)},t[13]||(t[13]=[p.createElementVNode("span",null,null,-1)]),10,gpe))),128))],2),r.dotsNum>0?(p.openBlock(),p.createElementBlock("div",ppe,[p.createElementVNode("div",bpe,[p.createElementVNode("div",ype,[p.createElementVNode("button",{class:p.normalizeClass(["p-3 rounded-full arrow_button_styles",o.direction_property=="rtl"?"ml-3":"mr-3"]),onClick:t[3]||(t[3]=h=>f.prev())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Ope,t[14]||(t[14]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",xpe,t[15]||(t[15]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0)],2)])]),p.createElementVNode("div",vpe,[p.createElementVNode("div",wpe,[p.createElementVNode("button",{class:"p-3 rounded-full arrow_button_styles",onClick:t[4]||(t[4]=h=>f.next())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",Spe,t[16]||(t[16]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",kpe,t[17]||(t[17]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])])])):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)],10,rpe),r.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(p.openBlock(),p.createElementBlock("div",Cpe,[p.createElementVNode("div",Epe,[p.createElementVNode("button",{class:"p-3 ml-5 rounded-full shadow-lg arrow_button_styles",onClick:t[5]||(t[5]=h=>f.next())},[o.direction_property=="ltr"?(p.openBlock(),p.createElementBlock("svg",_pe,t[18]||(t[18]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1)]))):p.createCommentVNode("",!0),o.direction_property=="rtl"?(p.openBlock(),p.createElementBlock("svg",Tpe,t[19]||(t[19]=[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1)]))):p.createCommentVNode("",!0)])])])):p.createCommentVNode("",!0)],10,epe)])}const Ppe=vi(Jge,[["render",Ape],["__scopeId","data-v-4c7f63bd"]]),Dpe={class:"w-full bg-white rounded-[20px] shadow-sm dark:border md:mt-0 p-2 dark:bg-gray-900 dark:border-gray-800"},Npe={class:"pointer-events-auto relative flex max-h-[100%] w-full flex-col text-current shadow-4 outline-hidden bg-white border rounded-xl dark:bg-gray-900 dark:border-gray-800"},$pe={class:"flex items-center justify-between shrink-0 pt-3 pb-3 pl-3 pr-3"},Rpe={class:"text-xl font-medium leading-normal text-surface dark:text-white"},Bpe={key:0,role:"status",class:"max-w-full p-4 border border-gray-200 rounded-sm shadow-sm animate-pulse md:p-6 dark:border-gray-700"},Mpe={class:"flex flex-wrap items-center justify-end shrink-0 p-4 rounded-b-md gap-2"},Fpe={__name:"GlModal",props:{language:{type:Object,required:!1,default:()=>{}},is_open:{type:Boolean,default:!1},hide_model_footer:{type:Boolean,default:!1},is_loading:{type:Boolean,default:!1},has_large_z_index:{type:Boolean,default:!1},title:{type:String,default:""},max_width:{type:String,default:"max-w-2xl"},bodyClass:{type:String,default:"p-4"}},emits:["closeModal"],setup(r,{emit:t}){const o=r,a=t,c=()=>{document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight="0px"},f=()=>{document.documentElement.style.overflow="",document.documentElement.style.paddingRight=""},h=()=>{a("closeModal"),f()},y=p.computed(()=>o.is_loading);return p.watch(()=>o.is_open,(w,C)=>{w?c():f()},{immediate:!0,deep:!0}),(w,C)=>{var T;return r.is_open?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["fixed h-full w-full overflow-y-auto overflow-x-hidden outline-hidden inset-0 bg-black/80! min-w-full",r.has_large_z_index?"z-9999":"z-1055"]),tabindex:"-1"},[p.createElementVNode("div",{class:p.normalizeClass(["pointer-events-none relative w-auto transition-all duration-300 ease-in-out min-[576px]:mx-auto mt-2",r.max_width])},[p.createElementVNode("div",Dpe,[p.createElementVNode("div",Npe,[p.createElementVNode("div",$pe,[p.createElementVNode("h5",Rpe,p.toDisplayString(r.title),1),p.createElementVNode("button",{type:"button",class:"box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-hidden dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",onClick:h,"aria-label":"Close"},C[0]||(C[0]=[p.createElementVNode("span",{class:"[&>svg]:h-6 [&>svg]:w-6"},[p.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1)]))]),y.value?(p.openBlock(),p.createElementBlock("div",Bpe,C[1]||(C[1]=[p.createStaticVNode('<div class="flex items-center justify-center h-48 mb-4 bg-gray-300 rounded-sm dark:bg-gray-700"><svg class="w-10 h-10 text-gray-200 dark:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 20"><path d="M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"></path><path d="M5 5V.13a2.96 2.96 0 0 0-1.293.749L.879 3.707A2.98 2.98 0 0 0 .13 5H5Z"></path></svg></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div><div class="flex items-center mt-4"><svg class="w-10 h-10 text-gray-200 me-3 dark:text-gray-700" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"></div><div class="w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div></div></div><span class="sr-only">Loading...</span>',7)]))):p.createCommentVNode("",!0),p.withDirectives(p.createElementVNode("div",{class:p.normalizeClass(["relative gl_modal_body",r.bodyClass])},[p.renderSlot(w.$slots,"body")],2),[[p.vShow,!y.value]]),p.withDirectives(p.createElementVNode("div",Mpe,[p.renderSlot(w.$slots,"buttons"),p.createElementVNode("button",{onClick:h,type:"button",class:"px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-hidden focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-700"},p.toDisplayString(((T=r.language)==null?void 0:T.close)??"Close"),1)],512),[[p.vShow,!y.value&&!r.hide_model_footer]])])])],2)],2)):p.createCommentVNode("",!0)}}},Lpe={class:"w-full bg-white rounded-[20px] shadow-sm dark:border md:mt-0 p-2 dark:bg-gray-900 dark:border-gray-800"},Ipe={class:"relative flex flex-col w-full text-current bg-white border outline-hidden pointer-events-auto shadow-4 border-stroke rounded-xl dark:bg-gray-900 dark:border-gray-800"},Vpe={key:0,class:"flex items-center justify-between shrink-0 pt-10 pb-3 pl-3 pr-3 border-b-2 dark:border-gray-600"},Qpe={class:"text-xl font-medium leading-normal text-surface dark:text-white"},zpe={key:1,role:"status",class:"max-w-full p-4 border border-gray-200 rounded-sm shadow-sm animate-pulse md:p-6 dark:border-gray-700"},Hpe={key:2,class:"flex flex-wrap items-center justify-end shrink-0 p-4 border-t-2 rounded-b-md border-neutral-100 dark:border-gray-600 gap-2"},Zpe={__name:"GlModalWithoutOverflow",props:{is_open:{type:Boolean,default:!1},is_loading:{type:Boolean,default:!1},has_large_z_index:{type:Boolean,default:!1},has_header:{type:Boolean,default:!0},has_footer:{type:Boolean,default:!0},title:{type:String,default:""},max_width:{type:String,default:"max-w-2xl"},bodyClass:{type:String,default:"p-4"}},emits:["closeModal"],setup(r,{emit:t}){const o=r,a=t,c=()=>{document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight="0px"},f=()=>{document.documentElement.style.overflow="",document.documentElement.style.paddingRight=""},h=()=>{a("closeModal"),f()};return p.watch(()=>o.is_open,(y,w)=>{y?c():f()},{immediate:!0,deep:!0}),p.onBeforeUnmount(()=>{f()}),(y,w)=>r.is_open?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(["fixed h-full w-full overflow-y-auto outline-hidden inset-0 bg-black/80!",r.has_large_z_index?"z-9999":"z-1055"]),tabindex:"-1","aria-hidden":"true"},[p.createElementVNode("div",{class:p.normalizeClass(["pointer-events-none relative w-auto translate-y-[-50px] transition-all duration-300 ease-in-out min-[576px]:mx-auto mt-7",r.max_width])},[p.createElementVNode("div",Lpe,[p.createElementVNode("div",Ipe,[r.has_header?(p.openBlock(),p.createElementBlock("div",Vpe,[p.createElementVNode("h5",Qpe,p.toDisplayString(r.title),1),p.createElementVNode("button",{type:"button",class:"box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-hidden dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",onClick:h,"aria-label":"Close"},w[0]||(w[0]=[p.createElementVNode("span",{class:"[&>svg]:h-6 [&>svg]:w-6"},[p.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1)]))])):p.createCommentVNode("",!0),r.is_loading?(p.openBlock(),p.createElementBlock("div",zpe,w[1]||(w[1]=[p.createStaticVNode('<div class="flex items-center justify-center h-48 mb-4 bg-gray-300 rounded-sm dark:bg-gray-700"><svg class="w-10 h-10 text-gray-200 dark:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 20"><path d="M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"></path><path d="M5 5V.13a2.96 2.96 0 0 0-1.293.749L.879 3.707A2.98 2.98 0 0 0 .13 5H5Z"></path></svg></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div><div class="flex items-center mt-4"><svg class="w-10 h-10 text-gray-200 me-3 dark:text-gray-700" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"></div><div class="w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div></div></div><span class="sr-only">Loading...</span>',7)]))):p.createCommentVNode("",!0),p.withDirectives(p.createElementVNode("div",{class:p.normalizeClass(["relative gl_modal_body",r.bodyClass])},[p.renderSlot(y.$slots,"body")],2),[[p.vShow,!r.is_loading]]),r.has_footer?p.withDirectives((p.openBlock(),p.createElementBlock("div",Hpe,[p.renderSlot(y.$slots,"buttons"),p.createElementVNode("button",{onClick:h,type:"button",class:"px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-hidden focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Close ")],512)),[[p.vShow,!r.is_loading]]):p.createCommentVNode("",!0)])])],2)],2)):p.createCommentVNode("",!0)}},Upe={class:"w-full bg-white rounded-[20px] shadow-sm dark:border md:mt-0 p-2 dark:bg-gray-900 dark:border-gray-800"},Wpe={class:"pointer-events-auto relative flex max-h-[100%] w-full flex-col overflow-hidden text-current shadow-4 outline-hidden bg-white border rounded-xl dark:bg-gray-900 dark:border-gray-800"},Xpe={class:"flex items-center justify-between shrink-0 pt-3 pb-3 pl-3 pr-3"},qpe={class:"text-xl font-medium leading-normal text-surface dark:text-white"},jpe={key:0,role:"status",class:"max-w-full p-4 border border-gray-200 rounded-sm shadow-sm animate-pulse md:p-6 dark:border-gray-700"},Gpe={class:"flex flex-wrap items-center justify-end shrink-0 p-4 rounded-b-md gap-2"},Ype={__name:"GlModalShow",props:{language:{type:Object,required:!1,default:()=>{}},is_open:{type:Boolean,default:!1},is_loading:{type:Boolean,default:!1},has_large_z_index:{type:Boolean,default:!1},title:{type:String,default:""},max_width:{type:String,default:"max-w-2xl"},bodyClass:{type:String,default:"p-4"}},emits:["closeModal"],setup(r,{emit:t}){const o=r,a=t,c=()=>{document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight="0px"},f=()=>{document.documentElement.style.overflow="",document.documentElement.style.paddingRight=""},h=()=>{a("closeModal"),f()};return p.watch(()=>o.is_open,(y,w)=>{y?c():f()},{immediate:!0,deep:!0}),(y,w)=>{var C;return p.withDirectives((p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["fixed h-full w-full overflow-y-auto overflow-x-hidden outline-hidden inset-0 bg-black/80!",r.has_large_z_index?"z-9999":"z-1055"]),tabindex:"-1"},[p.createElementVNode("div",{class:p.normalizeClass(["pointer-events-none relative h-[calc(100%-1rem)] w-auto transition-all duration-300 ease-in-out min-[576px]:mx-auto mt-7 min-[576px]:h-[calc(100%-3.5rem)]",r.max_width])},[p.createElementVNode("div",Upe,[p.createElementVNode("div",Wpe,[p.createElementVNode("div",Xpe,[p.createElementVNode("h5",qpe,p.toDisplayString(r.title),1),p.createElementVNode("button",{type:"button",class:"box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-hidden dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",onClick:h,"aria-label":"Close"},w[0]||(w[0]=[p.createElementVNode("span",{class:"[&>svg]:h-6 [&>svg]:w-6"},[p.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[p.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1)]))]),r.is_loading?(p.openBlock(),p.createElementBlock("div",jpe,w[1]||(w[1]=[p.createStaticVNode('<div class="flex items-center justify-center h-48 mb-4 bg-gray-300 rounded-sm dark:bg-gray-700"><svg class="w-10 h-10 text-gray-200 dark:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 20"><path d="M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"></path><path d="M5 5V.13a2.96 2.96 0 0 0-1.293.749L.879 3.707A2.98 2.98 0 0 0 .13 5H5Z"></path></svg></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-48 mb-4"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700 mb-2.5"></div><div class="h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div><div class="flex items-center mt-4"><svg class="w-10 h-10 text-gray-200 me-3 dark:text-gray-700" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"></path></svg><div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-700 w-32 mb-2"></div><div class="w-48 h-2 bg-gray-200 rounded-full dark:bg-gray-700"></div></div></div><span class="sr-only">Loading...</span>',7)]))):p.createCommentVNode("",!0),p.withDirectives(p.createElementVNode("div",{class:p.normalizeClass(["relative overflow-y-auto gl_modal_body",r.bodyClass])},[p.renderSlot(y.$slots,"body")],2),[[p.vShow,!r.is_loading]]),p.withDirectives(p.createElementVNode("div",Gpe,[p.renderSlot(y.$slots,"buttons"),p.createElementVNode("button",{onClick:h,type:"button",class:"px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-hidden focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"},p.toDisplayString(((C=r.language)==null?void 0:C.close)??"Close"),1)],512),[[p.vShow,!r.is_loading]])])])],2)],2)),[[p.vShow,r.is_open]])}}},Kpe={class:"flex justify-between p-2 -mb-px border border-gray-300 no-underlin"},Jpe={class:"relative inline-flex items-center cursor-pointer"},e0e=["name","id","checked"],t0e={key:0,class:"flex justify-between items-center"},n0e={class:"gl-label-form"},o0e={class:"flex justify-between p-2 -mb-px border rounded-lg no-underlin bg-gray-50 focus:border-primary dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:focus:border-primaryDark border-gray-200"},s0e={class:"relative inline-flex items-center cursor-pointer"},r0e=["name","id"],i0e={class:"gl-span-form-error"},a0e={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},l0e={__name:"GlToggleBox",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:String,required:!0},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},has_label_up:{type:Boolean,default:!1},description:{type:String,default:""}},emits:["update:modelValue"],setup(r,{emit:t}){const o=r,a=t,c=p.ref(null),f=p.computed({get(){return o.modelValue},set(h){a("update:modelValue",h)}});return(h,y)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("div",null,[p.createElementVNode("li",Kpe,[p.createTextVNode(p.toDisplayString(r.label_name)+" ",1),p.createElementVNode("label",Jpe,[p.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:r.field_name,id:r.field_name,checked:r.modelValue,"true-value":1,"false-value":0,ref_key:"input",ref:c,disabled:""},null,8,e0e),y[1]||(y[1]=p.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),y[2]||(y[2]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(r.field_name)},[r.has_label_up?(p.openBlock(),p.createElementBlock("div",t0e,[p.createElementVNode("label",n0e,p.toDisplayString(r.label_name),1)])):p.createCommentVNode("",!0),p.createElementVNode("li",o0e,[p.createTextVNode(p.toDisplayString(r.label_name)+" ",1),p.createElementVNode("label",s0e,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:r.field_name,id:r.field_name,"true-value":1,"false-value":0,ref_key:"input",ref:c,"onUpdate:modelValue":y[0]||(y[0]=w=>f.value=w)},null,8,r0e),[[p.vModelCheckbox,f.value]]),y[3]||(y[3]=p.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-hidden rounded-full peer dark:bg-gray-500 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-400 peer-checked:bg-primary dark:peer-checked:bg-primaryDark"},null,-1))])]),p.createElementVNode("span",i0e,p.toDisplayString(r.error_message),1),p.createElementVNode("small",a0e,p.toDisplayString(r.description),1)],2))],64))}},c0e={class:"flex justify-between p-2 -mb-px border border-gray-300 no-underlin"},u0e={class:"relative inline-flex items-center cursor-pointer"},d0e=["name","id","checked"],f0e={key:0,class:"flex justify-between items-center"},h0e={class:"gl-label-form"},m0e={class:"flex justify-between p-2 -mb-px border border-gray-200 rounded-lg no-underlin dark:border-gray-600 dark:focus:border-primaryDark"},g0e={class:"relative inline-flex items-center cursor-pointer"},p0e=["name","id"],b0e={class:"gl-span-form-error"},y0e={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},O0e={__name:"GlToggleBoxTrueFalse",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},modelValue:{type:Boolean,default:!1},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},has_label_up:{type:Boolean,default:!1},description:{type:String,default:""}},emits:["update:modelValue"],setup(r,{emit:t}){const o=r,a=t,c=p.ref(null),f=p.computed({get(){return o.modelValue},set(h){a("update:modelValue",h)}});return(h,y)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("div",null,[p.createElementVNode("li",c0e,[p.createTextVNode(p.toDisplayString(r.label_name)+" ",1),p.createElementVNode("label",u0e,[p.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:r.field_name,id:r.field_name,checked:r.modelValue,ref_key:"input",ref:c,disabled:""},null,8,d0e),y[1]||(y[1]=p.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),y[2]||(y[2]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(r.field_name)},[r.has_label_up?(p.openBlock(),p.createElementBlock("div",f0e,[p.createElementVNode("label",h0e,p.toDisplayString(r.label_name),1)])):p.createCommentVNode("",!0),p.createElementVNode("li",m0e,[p.createTextVNode(p.toDisplayString(r.label_name)+" ",1),p.createElementVNode("label",g0e,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:r.field_name,id:r.field_name,ref_key:"input",ref:c,"onUpdate:modelValue":y[0]||(y[0]=w=>f.value=w)},null,8,p0e),[[p.vModelCheckbox,f.value]]),y[3]||(y[3]=p.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),p.createElementVNode("span",b0e,p.toDisplayString(r.error_message),1),p.createElementVNode("small",y0e,p.toDisplayString(r.description),1)],2))],64))}},x0e={class:"font-bold ptext-lg dark:text-white"},v0e={class:"mt-3 mb-4"},w0e={class:"bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300"},S0e=["name","id","value"],k0e={key:0,class:"dropdown"},C0e={class:"relative focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"},E0e={class:"relative showOptions"},_0e=["value","placeholder"],T0e={class:"text-gray-700 bg-white border dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 absolute w-full z-999999999 rounded-md mt-1 pt-1"},A0e={key:0,class:"border-b border-gray-200 dark:border-gray-700"},P0e={class:"relative"},D0e=["id","placeholder"],N0e=["onClick","onMousedown","id"],$0e={class:"flex items-center py-2 pr-4"},R0e={key:0,class:"absolute flex items-center shrink-0 w-4 h-4 text-green-500 ltr:right-2 rtl:left-2 dark:text-green-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},B0e=["innerHTML"],M0e={key:1,class:"p-2 text-center text-gray-500"},F0e={key:2,class:"p-2 text-gray-500"},L0e={class:"block mt-1 text-sm font-normal leading-5 text-red-500"},I0e={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},qne={__name:"GlDropdown",props:{modelValue:{type:[String,Number],default:""},defaultValue:{type:[String,Number],default:""},field_name:{type:String,default:""},is_required:{type:Boolean,default:!1},has_cancel:{type:Boolean,default:!0},label_name:{type:String,default:""},options:{type:Array,required:!0,default:()=>[],note:"Options of dropdown. An array of options with id and name"},placeholder:{type:String,required:!1,default:"Please select an option",note:"Placeholder of dropdown"},search_input_placeholder:{type:String,required:!1,default:"Search ...",note:"Placeholder of search input"},no_results_found_placeholder:{type:String,required:!1,default:"No results found",note:"Placeholder of no results found"},maxItem:{type:Number,required:!1,default:1e4,note:"Max items showing"},show:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""},api_url:{type:String,default:"",required:!1},hide_search:{type:Boolean,default:!1},options_top_size:{type:Number,default:22}},emits:["update:modelValue","selected","selectionChanged"],setup(r,{emit:t}){const o=r,a=t;p.ref(null);const c=p.ref({}),f=p.ref(!1),h=p.ref(0),y=p.ref(!1),w=p.ref(""),C=p.ref(""),T=p.ref(!1),R=p.ref(1),B=p.ref(null),V=p.ref(1),q=p.ref([]),X=p.ref([]),Y=p.ref(null),he=p.ref(null),Se=async(at="down")=>{if(!T.value){T.value=!0;try{const Ne=at==="up"?Math.max(R.value-1,V):R.value,{data:Oe}=await axios.get(o.api_url,{params:{search:w.value,page:Ne,per_page:20}});if(!Oe||!Oe.data){T.value=!1,q.value=[];return}let it=St(Oe.data);at==="down"&&(q.value.push(...it),R.value++,B.value=Oe.last_page),B.value||(B.value=Oe.last_page),V.value||(V.value=1);const _e=je();_e&&(q.value.some(Fe=>Fe.value===_e.value)||q.value.unshift(_e),c.value=_e)}catch(Ne){console.error("Error fetching data:",Ne)}T.value=!1}},te=at=>{if(!at.target)return;const Ne=at.target.scrollTop,Oe=at.target.scrollHeight-at.target.clientHeight<=Ne+10,it=Ne<=10;Oe&&R.value<=B.value&&Se("down"),it&&R.value>V.value},de=at=>{at.target&&(document.activeElement.classList.contains("showOptions"+C.value)?y.value||xt():at.target.id!=o.field_name+"search"+C.value&&at.target.id!=o.field_name&&!at.target.classList.contains("showOptions"+C.value)&&(Wt(),h.value=0,y.value=!1))},xt=()=>{if(!o.show){if(y.value){y.value=!1;return}w.value="",y.value=!0,o.api_url&&q.value.length===0&&Se("down"),p.nextTick(()=>{var at=document.getElementById(`${o.field_name}search${C.value}`);at&&at.focus()})}},je=()=>wt(c.value)?typeof c.value=="object"?q.value.find(at=>String(at.id)===String(c.value.id))||{}:q.value.find(at=>String(at.id)===String(c.value))||{}:o.modelValue?typeof o.modelValue=="object"?q.value.find(at=>String(at.id)===String(o.modelValue.id))||{}:q.value.find(at=>String(at.id)===String(o.modelValue))||{}:{};p.onMounted(()=>{C.value=st(),o.show||(document.body.addEventListener("click",Re),document.addEventListener("focusin",de))}),p.onBeforeUnmount(()=>{document.body.removeEventListener("click",Re),document.removeEventListener("focusin",de)});function j(){const at=[],Ne=w.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Oe=new RegExp(Ne,"ig");for(const it of X.value){const _e=String(it.name);(w.value.length<1||_e.match(Oe))&&at.length<o.maxItem&&at.push(it)}return at}function tt(at){if(["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Enter"].includes(at.key)){if(["ArrowUp","ArrowDown"].includes(at.key)&&at.preventDefault(),at.key==="ArrowDown"&&o.posts==="")return;vt(at.key)}}function st(){let at=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(Oe){const it=(at+Math.random()*16)%16|0;return at=Math.floor(at/16),(Oe==="x"?it:it&3|8).toString(16)})}function wt(at){return at&&typeof at=="object"&&Object.keys(at).length>0}function Re(at){at.target.id!=o.field_name+"search"+C.value&&at.target.id!=o.field_name&&!at.target.classList.contains("showOptions"+C.value)&&(Wt(),h.value=0,y.value=!1)}function ue(at){const Ne=`${at}${C.value}`,Oe=document.getElementById(Ne),it=he.value;if(Oe&&it){const _e=Oe.getBoundingClientRect(),Ve=it.getBoundingClientRect();_e.top<Ve.top?it.scrollTop-=Ve.top-_e.top:_e.bottom>Ve.bottom&&(it.scrollTop+=_e.bottom-Ve.bottom)}}function qt(at){const Ne=`${at}${C.value}`,Oe=document.getElementById(Ne);Oe&&Oe.click()}function vt(at){at==="ArrowDown"&&h.value<q.value.length&&(h.value++,ue(h.value)),at==="ArrowUp"&&h.value>1&&(h.value--,ue(h.value)),at==="Enter"&&qt(h.value)}function St(at){return at.map((Ne,Oe)=>typeof Ne=="object"?Ne:{id:Ne,name:Ne})}function L(){return o.options.map((at,Ne)=>typeof at=="object"?at:{id:at,name:at})}function Yt(at){f.value=!0,c.value=at,y.value=!1,a("update:modelValue",c.value.id),a("selected",c.value),a("selectionChanged",c.value)}function pt(){o.show||(c.value={},w.value="",a("update:modelValue",""),a("selected",c.value),a("selectionChanged",c.value),xt())}function Wt(){(!c.value||!c.value.id)&&(c.value={},w.value="")}return p.watch(w,at=>{o.api_url?(R.value=1,B.value=null,V.value=1,q.value=[],Se("down")):q.value=j(),q.value.length===0&&(c.value={})}),p.watch(c,at=>{wt(at)&&at&&at.id!==o.modelValue&&a("update:modelValue",at.id)}),p.watch(()=>o.api_url,at=>{at&&(R.value=1,B.value=null,V.value=1,q.value=[],Se("down"))},{immediate:!0,deep:!0}),p.watch(()=>o.modelValue,at=>{at?(c.value=o.modelValue,o.api_url&&f.value===!1?Se("down"):c.value=je()):c.value={}},{immediate:!0,deep:!0}),p.watch(()=>o.options,()=>{o.api_url||(q.value=X.value=L()),c.value=je()},{immediate:!0,deep:!0}),(at,Ne)=>{var Oe,it,_e;return p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",x0e,p.toDisplayString(r.label_name),1),p.createElementVNode("p",v0e,[p.createElementVNode("span",w0e,p.toDisplayString((Oe=c.value)==null?void 0:Oe.name),1)]),Ne[4]||(Ne[4]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(r.field_name)},[p.createElementVNode("input",{type:"hidden",name:r.field_name,id:r.field_name,value:(it=c.value)==null?void 0:it.id},null,8,S0e),r.options?(p.openBlock(),p.createElementBlock("div",k0e,[r.label_name?(p.openBlock(),p.createElementBlock("label",{key:0,class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required})},p.toDisplayString(r.label_name),3)):p.createCommentVNode("",!0),p.createElementVNode("div",C0e,[p.createElementVNode("div",E0e,[p.createElementVNode("input",{ref_key:"myDivDropDown",ref:Y,class:p.normalizeClass([{"gl-input-form":r.error_message=="","gl-input-form-invalid":r.error_message!=="",[`showOptions${C.value}`]:!0},"pr-2 showOptions1"]),value:(_e=c.value)==null?void 0:_e.name,placeholder:r.placeholder,autocomplete:"off",readonly:""},null,10,_0e),p.withDirectives(p.createElementVNode("i",{onClick:Ne[0]||(Ne[0]=p.withModifiers(Ve=>pt(),["stop"])),class:"absolute text-gray-500 cursor-pointer pointer-events-auto ltr:right-8 rtl:left-8 hover:text-red-600 dark:hover:text-red-400",style:{top:"13px"}},Ne[5]||(Ne[5]=[p.createElementVNode("svg",{class:"w-[10px] h-[16px]","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})],-1)]),512),[[p.vShow,wt(c.value)&&r.has_cancel]]),p.createElementVNode("i",{onClick:Ne[1]||(Ne[1]=p.withModifiers(Ve=>xt(),["stop"])),class:"absolute text-xl text-gray-500 cursor-pointer ltr:right-2 rtl:left-2 hover:text-gray-700 dark:hover:text-gray-700 showOptions",style:{top:"14px"}},[(p.openBlock(),p.createElementBlock("svg",{class:p.normalizeClass([y.value?"":"rotate-180","w-3 h-3 shrink-0"]),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 6"},Ne[6]||(Ne[6]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5 5 1 1 5"},null,-1)]),2))]),p.withDirectives(p.createElementVNode("div",T0e,[r.hide_search?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",A0e,[Ne[8]||(Ne[8]=p.createElementVNode("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),p.createElementVNode("div",P0e,[Ne[7]||(Ne[7]=p.createElementVNode("div",{class:"absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3"},null,-1)),p.withDirectives(p.createElementVNode("input",{type:"search","onUpdate:modelValue":Ne[2]||(Ne[2]=Ve=>w.value=Ve),id:`${r.field_name}search${C.value}`,onKeydown:tt,onBlur:Ne[3]||(Ne[3]=Ve=>Wt()),autocomplete:"off",class:"block w-full p-2 text-sm text-gray-900 outline-hidden dark:bg-gray-800 dark:text-white",placeholder:r.search_input_placeholder},null,40,D0e),[[p.vModelText,w.value]])])])),p.createElementVNode("div",{class:"overflow-y-auto max-h-64 px-1 py-1",onScroll:te,ref_key:"dropdownRef",ref:he},[q.value.length?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:0},p.renderList(q.value,(Ve,Fe)=>{var bt;return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["relative px-2 py-0.5 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-white hover:rounded-sm",Fe+1==h.value?"bg-gray-100 dark:bg-gray-700 rounded-sm":""]),onClick:ne=>Yt(Ve),onMousedown:ne=>Yt(Ve),key:Fe,id:`${Fe+1}${C.value}`},[p.createElementVNode("div",$0e,[((bt=c.value)==null?void 0:bt.id)===Ve.id?(p.openBlock(),p.createElementBlock("svg",R0e,Ne[9]||(Ne[9]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"},null,-1)]))):p.createCommentVNode("",!0),p.createElementVNode("span",{innerHTML:Ve.name||Ve.id||"-"},null,8,B0e)])],42,N0e)}),128)):p.createCommentVNode("",!0),T.value?(p.openBlock(),p.createElementBlock("div",M0e," Loading... ")):p.createCommentVNode("",!0),!T.value&&q.value.length===0?(p.openBlock(),p.createElementBlock("div",F0e,p.toDisplayString(r.no_results_found_placeholder),1)):p.createCommentVNode("",!0)],544)],512),[[p.vShow,y.value]])])])])):p.createCommentVNode("",!0),p.createElementVNode("span",L0e,p.toDisplayString(r.error_message),1),p.createElementVNode("small",I0e,p.toDisplayString(r.description),1)],2))],64)}}},V0e={class:"font-bold ptext-lg dark:text-white"},Q0e=["id"],z0e=["for"],H0e=["required","name","id","type","placeholder"],Z0e={class:"gl-span-form-error"},U0e={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},W0e={__name:"GLTextarea",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},placeholder:{type:String,default:""}},emits:["update:modelValue","keydown"],setup(r,{expose:t,emit:o}){const a=r,c=o,f=p.ref(null);p.onMounted(()=>{f.value!==null&&f.value.hasAttribute("autofocus")&&f.value.focus()});const h=p.computed({get(){return a.modelValue},set(y){c("update:modelValue",y)}});return t({focus:()=>f.value.focus()}),(y,w)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[r.show?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(r.field_name)},[p.createElementVNode("h3",V0e,p.toDisplayString(r.label_name),1),p.createElementVNode("p",{id:r.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},p.toDisplayString(r.model_value),9,Q0e),w[2]||(w[2]=p.createElementVNode("hr",{class:"opacity-100! bg-gray-200 border-0 dark:bg-gray-700"},null,-1))],2)):p.createCommentVNode("",!0),r.show?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(["mb-4",r.field_name])},[p.createElementVNode("label",{class:p.normalizeClass({"gl-label-form":r.error_message=="","gl-label-form-invalid":r.error_message!=="",required:r.is_required}),for:r.field_name},p.toDisplayString(r.label_name),11,z0e),p.withDirectives(p.createElementVNode("textarea",{required:r.is_required,name:r.field_name,id:r.field_name,class:p.normalizeClass({" gl-textarea-form mt-4 ":r.error_message==""," gl-textarea-form-invalid mt-4 ":r.error_message!==""}),type:r.type,"onUpdate:modelValue":w[0]||(w[0]=C=>h.value=C),onKeydown:w[1]||(w[1]=C=>y.$emit("keydown",C)),ref_key:"input",ref:f,rows:"4",placeholder:r.placeholder},null,42,H0e),[[p.vModelText,h.value]]),p.createElementVNode("span",Z0e,p.toDisplayString(r.error_message),1),p.createElementVNode("small",U0e,p.toDisplayString(r.description),1)],2))],64))}};function X0e(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var yH={exports:{}},jne;function q0e(){return jne||(jne=1,function(r){(function(){var t=function(e){if(e===null)return"null";if(e===void 0)return"undefined";var s=typeof e;return s==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":s==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":s},o=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},a=function(e,s){var i=Array.prototype.slice.call(e);return i.sort(s)},c=function(e,s){return f(function(i,u){return e.eq(s(i),s(u))})},f=function(e){return{eq:e}},h=f(function(e,s){return e===s}),y=h,w=function(e){return f(function(s,i){if(s.length!==i.length)return!1;for(var u=s.length,m=0;m<u;m++)if(!e.eq(s[m],i[m]))return!1;return!0})},C=function(e,s){return c(w(e),function(i){return a(i,s)})},T=function(e){return f(function(s,i){var u=Object.keys(s),m=Object.keys(i);if(!C(y).eq(u,m))return!1;for(var O=u.length,S=0;S<O;S++){var A=u[S];if(!e.eq(s[A],i[A]))return!1}return!0})},R=f(function(e,s){if(e===s)return!0;var i=t(e),u=t(s);return i!==u?!1:o(i)?e===s:i==="array"?w(R).eq(e,s):i==="object"?T(R).eq(e,s):!1});const B=Object.getPrototypeOf,V=(e,s,i)=>{var u;return i(e,s.prototype)?!0:((u=e.constructor)===null||u===void 0?void 0:u.name)===s.name},q=e=>{const s=typeof e;return e===null?"null":s==="object"&&Array.isArray(e)?"array":s==="object"&&V(e,String,(i,u)=>u.isPrototypeOf(i))?"string":s},X=e=>s=>q(s)===e,Y=e=>s=>typeof s===e,he=e=>s=>e===s,Se=(e,s)=>de(e)&&V(e,s,(i,u)=>B(i)===u),te=X("string"),de=X("object"),xt=e=>Se(e,Object),je=X("array"),j=he(null),tt=Y("boolean"),st=he(void 0),wt=e=>e==null,Re=e=>!wt(e),ue=Y("function"),qt=Y("number"),vt=(e,s)=>{if(je(e)){for(let i=0,u=e.length;i<u;++i)if(!s(e[i]))return!1;return!0}return!1},St=()=>{},L=(e,s)=>(...i)=>e(s.apply(null,i)),Yt=(e,s)=>i=>e(s(i)),pt=e=>()=>e,Wt=e=>e,at=(e,s)=>e===s;function Ne(e,...s){return(...i)=>{const u=s.concat(i);return e.apply(null,u)}}const Oe=e=>s=>!e(s),it=e=>()=>{throw new Error(e)},_e=e=>e(),Ve=e=>{e()},Fe=pt(!1),bt=pt(!0);class ne{constructor(s,i){this.tag=s,this.value=i}static some(s){return new ne(!0,s)}static none(){return ne.singletonNone}fold(s,i){return this.tag?i(this.value):s()}isSome(){return this.tag}isNone(){return!this.tag}map(s){return this.tag?ne.some(s(this.value)):ne.none()}bind(s){return this.tag?s(this.value):ne.none()}exists(s){return this.tag&&s(this.value)}forall(s){return!this.tag||s(this.value)}filter(s){return!this.tag||s(this.value)?this:ne.none()}getOr(s){return this.tag?this.value:s}or(s){return this.tag?this:s}getOrThunk(s){return this.tag?this.value:s()}orThunk(s){return this.tag?this:s()}getOrDie(s){if(this.tag)return this.value;throw new Error(s??"Called getOrDie on None")}static from(s){return Re(s)?ne.some(s):ne.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(s){this.tag&&s(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}ne.singletonNone=new ne(!1);const _n=Array.prototype.slice,nn=Array.prototype.indexOf,Kn=Array.prototype.push,so=(e,s)=>nn.call(e,s),Ks=(e,s)=>{const i=so(e,s);return i===-1?ne.none():ne.some(i)},He=(e,s)=>so(e,s)>-1,lt=(e,s)=>{for(let i=0,u=e.length;i<u;i++){const m=e[i];if(s(m,i))return!0}return!1},mt=(e,s)=>{const i=e.length,u=new Array(i);for(let m=0;m<i;m++){const O=e[m];u[m]=s(O,m)}return u},Ce=(e,s)=>{for(let i=0,u=e.length;i<u;i++){const m=e[i];s(m,i)}},Vn=(e,s)=>{for(let i=e.length-1;i>=0;i--){const u=e[i];s(u,i)}},_o=(e,s)=>{const i=[],u=[];for(let m=0,O=e.length;m<O;m++){const S=e[m];(s(S,m)?i:u).push(S)}return{pass:i,fail:u}},vn=(e,s)=>{const i=[];for(let u=0,m=e.length;u<m;u++){const O=e[u];s(O,u)&&i.push(O)}return i},vs=(e,s,i)=>(Vn(e,(u,m)=>{i=s(i,u,m)}),i),No=(e,s,i)=>(Ce(e,(u,m)=>{i=s(i,u,m)}),i),Js=(e,s,i)=>{for(let u=0,m=e.length;u<m;u++){const O=e[u];if(s(O,u))return ne.some(O);if(i(O,u))break}return ne.none()},Uo=(e,s)=>Js(e,s,Fe),Ns=(e,s)=>{for(let i=0,u=e.length;i<u;i++){const m=e[i];if(s(m,i))return ne.some(i)}return ne.none()},ei=e=>{const s=[];for(let i=0,u=e.length;i<u;++i){if(!je(e[i]))throw new Error("Arr.flatten item "+i+" was not an array, input: "+e);Kn.apply(s,e[i])}return s},or=(e,s)=>ei(mt(e,s)),Xo=(e,s)=>{for(let i=0,u=e.length;i<u;++i){const m=e[i];if(s(m,i)!==!0)return!1}return!0},os=e=>{const s=_n.call(e,0);return s.reverse(),s},br=(e,s)=>vn(e,i=>!He(s,i)),Bs=(e,s)=>{const i={};for(let u=0,m=e.length;u<m;u++){const O=e[u];i[String(O)]=s(O,u)}return i},Qt=(e,s)=>{const i=_n.call(e,0);return i.sort(s),i},Pn=(e,s)=>s>=0&&s<e.length?ne.some(e[s]):ne.none(),Cn=e=>Pn(e,0),Rn=e=>Pn(e,e.length-1),jo=ue(Array.from)?Array.from:e=>_n.call(e),zs=(e,s)=>{for(let i=0;i<e.length;i++){const u=s(e[i],i);if(u.isSome())return u}return ne.none()},yr=(e,s)=>{const i=[],u=ue(s)?m=>lt(i,O=>s(O,m)):m=>He(i,m);for(let m=0,O=e.length;m<O;m++){const S=e[m];u(S)||i.push(S)}return i},Mo=Object.keys,Pr=Object.hasOwnProperty,fn=(e,s)=>{const i=Mo(e);for(let u=0,m=i.length;u<m;u++){const O=i[u],S=e[O];s(S,O)}},Go=(e,s)=>lr(e,(i,u)=>({k:u,v:s(i,u)})),lr=(e,s)=>{const i={};return fn(e,(u,m)=>{const O=s(u,m);i[O.k]=O.v}),i},Dr=e=>(s,i)=>{e[i]=s},hi=(e,s,i,u)=>{fn(e,(m,O)=>{(s(m,O)?i:u)(m,O)})},Ni=(e,s)=>{const i={},u={};return hi(e,s,Dr(i),Dr(u)),{t:i,f:u}},Ls=(e,s)=>{const i={};return hi(e,s,Dr(i),St),i},ti=(e,s)=>{const i=[];return fn(e,(u,m)=>{i.push(s(u,m))}),i},mi=e=>ti(e,Wt),Ms=(e,s)=>ro(e,s)?ne.from(e[s]):ne.none(),ro=(e,s)=>Pr.call(e,s),er=(e,s)=>ro(e,s)&&e[s]!==void 0&&e[s]!==null,ni=(e,s,i=R)=>T(i).eq(e,s),ka=e=>{const s={};return Ce(e,i=>{s[i]={}}),Mo(s)},ll=e=>e.length!==void 0,we=Array.isArray,We=e=>{if(we(e))return e;{const s=[];for(let i=0,u=e.length;i<u;i++)s[i]=e[i];return s}},Me=(e,s,i)=>{if(!e)return!1;if(i=i||e,ll(e)){for(let u=0,m=e.length;u<m;u++)if(s.call(i,e[u],u,e)===!1)return!1}else for(const u in e)if(ro(e,u)&&s.call(i,e[u],u,e)===!1)return!1;return!0},Ze=(e,s)=>{const i=[];return Me(e,(u,m)=>{i.push(s(u,m,e))}),i},Je=(e,s)=>{const i=[];return Me(e,(u,m)=>{(!s||s(u,m,e))&&i.push(u)}),i},Ke=(e,s)=>{if(e){for(let i=0,u=e.length;i<u;i++)if(e[i]===s)return i}return-1},ce=(e,s,i,u)=>{let m=st(i)?e[0]:i;for(let O=0;O<e.length;O++)m=s.call(u,m,e[O],O);return m},fe=(e,s,i)=>{for(let u=0,m=e.length;u<m;u++)if(s.call(i,e[u],u,e))return u;return-1},Be=e=>e[e.length-1],Ie=e=>{let s=!1,i;return(...u)=>(s||(s=!0,i=e.apply(null,u)),i)},Ot=(e,s,i,u)=>{const m=e.isiOS()&&/ipad/i.test(i)===!0,O=e.isiOS()&&!m,S=e.isiOS()||e.isAndroid(),A=S||u("(pointer:coarse)"),D=m||!O&&S&&u("(min-device-width:768px)"),I=O||S&&!D,G=s.isSafari()&&e.isiOS()&&/safari/i.test(i)===!1,ee=!I&&!D&&!G;return{isiPad:pt(m),isiPhone:pt(O),isTablet:pt(D),isPhone:pt(I),isTouch:pt(A),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:pt(G),isDesktop:pt(ee)}},It=(e,s)=>{for(let i=0;i<e.length;i++){const u=e[i];if(u.test(s))return u}},rn=(e,s)=>{const i=It(e,s);if(!i)return{major:0,minor:0};const u=m=>Number(s.replace(i,"$"+m));return ut(u(1),u(2))},Nn=(e,s)=>{const i=String(s).toLowerCase();return e.length===0?gt():rn(e,i)},gt=()=>ut(0,0),ut=(e,s)=>({major:e,minor:s}),Le={nu:ut,detect:Nn,unknown:gt},qe=(e,s)=>zs(s.brands,i=>{const u=i.brand.toLowerCase();return Uo(e,m=>{var O;return u===((O=m.brand)===null||O===void 0?void 0:O.toLowerCase())}).map(m=>({current:m.name,version:Le.nu(parseInt(i.version,10),0)}))}),Lt=(e,s)=>{const i=String(s).toLowerCase();return Uo(e,u=>u.search(i))},jt=(e,s)=>Lt(e,s).map(i=>{const u=Le.detect(i.versionRegexes,s);return{current:i.name,version:u}}),Sn=(e,s)=>Lt(e,s).map(i=>{const u=Le.detect(i.versionRegexes,s);return{current:i.name,version:u}}),jn=(e,s)=>e.substring(s),Jn=(e,s,i)=>s===""||e.length>=s.length&&e.substr(i,i+s.length)===s,Bn=(e,s)=>ho(e,s)?jn(e,s.length):e,fo=(e,s,i=0,u)=>{const m=e.indexOf(s,i);return m!==-1?st(u)?!0:m+s.length<=u:!1},ho=(e,s)=>Jn(e,s,0),hs=(e,s)=>Jn(e,s,e.length-s.length),cr=e=>s=>s.replace(e,""),Is=cr(/^\s+|\s+$/g),za=cr(/^\s+/g),Xi=cr(/\s+$/g),Ho=e=>e.length>0,ss=e=>!Ho(e),as=(e,s)=>s<=0?"":new Array(s+1).join(e),Si=(e,s=10)=>{const i=parseInt(e,s);return isNaN(i)?ne.none():ne.some(i)},ki=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,qi=e=>s=>fo(s,e),sr=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>fo(e,"edge/")&&fo(e,"chrome")&&fo(e,"safari")&&fo(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ki],search:e=>fo(e,"chrome")&&!fo(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>fo(e,"msie")||fo(e,"trident")},{name:"Opera",versionRegexes:[ki,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:qi("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:qi("firefox")},{name:"Safari",versionRegexes:[ki,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(fo(e,"safari")||fo(e,"mobile/"))&&fo(e,"applewebkit")}],Dd=[{name:"Windows",search:qi("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>fo(e,"iphone")||fo(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:qi("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:qi("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:qi("linux"),versionRegexes:[]},{name:"Solaris",search:qi("sunos"),versionRegexes:[]},{name:"FreeBSD",search:qi("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:qi("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],cl={browsers:pt(sr),oses:pt(Dd)},Su="Edge",us="Chromium",Zl="IE",vr="Opera",ku="Firefox",ul="Safari",Ul=()=>Ci({current:void 0,version:Le.unknown()}),Ci=e=>{const s=e.current,i=e.version,u=m=>()=>s===m;return{current:s,version:i,isEdge:u(Su),isChromium:u(us),isIE:u(Zl),isOpera:u(vr),isFirefox:u(ku),isSafari:u(ul)}},Xc={unknown:Ul,nu:Ci},dl="Windows",qc="iOS",Cc="Android",Nd="Linux",ii="macOS",Wl="Solaris",Ec="FreeBSD",jc="ChromeOS",Cu=()=>fl({current:void 0,version:Le.unknown()}),fl=e=>{const s=e.current,i=e.version,u=m=>()=>s===m;return{current:s,version:i,isWindows:u(dl),isiOS:u(qc),isAndroid:u(Cc),isMacOS:u(ii),isLinux:u(Nd),isSolaris:u(Wl),isFreeBSD:u(Ec),isChromeOS:u(jc)}},Hr={unknown:Cu,nu:fl},Ca={detect:(e,s,i)=>{const u=cl.browsers(),m=cl.oses(),O=s.bind(D=>qe(u,D)).orThunk(()=>jt(u,e)).fold(Xc.unknown,Xc.nu),S=Sn(m,e).fold(Hr.unknown,Hr.nu),A=Ot(S,O,e,i);return{browser:O,os:S,deviceType:A}}},Gc=e=>window.matchMedia(e).matches;let Yc=Ie(()=>Ca.detect(window.navigator.userAgent,ne.from(window.navigator.userAgentData),Gc));const ji=()=>Yc(),pe=window.navigator.userAgent,Qe=ji(),ft=Qe.browser,zt=Qe.os,hn=Qe.deviceType,Ut=pe.indexOf("Windows Phone")!==-1,Gn={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:ft.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!ft.isIE(),windowsPhone:Ut,browser:{current:ft.current,version:ft.version,isChromium:ft.isChromium,isEdge:ft.isEdge,isFirefox:ft.isFirefox,isIE:ft.isIE,isOpera:ft.isOpera,isSafari:ft.isSafari},os:{current:zt.current,version:zt.version,isAndroid:zt.isAndroid,isChromeOS:zt.isChromeOS,isFreeBSD:zt.isFreeBSD,isiOS:zt.isiOS,isLinux:zt.isLinux,isMacOS:zt.isMacOS,isSolaris:zt.isSolaris,isWindows:zt.isWindows},deviceType:{isDesktop:hn.isDesktop,isiPad:hn.isiPad,isiPhone:hn.isiPhone,isPhone:hn.isPhone,isTablet:hn.isTablet,isTouch:hn.isTouch,isWebView:hn.isWebView}},es=/^\s*|\s*$/g,Io=e=>wt(e)?"":(""+e).replace(es,""),se=(e,s)=>s?s==="array"&&we(e)?!0:typeof e===s:e!==void 0,ge=(e,s,i={})=>{const u=te(e)?e.split(s||","):e||[];let m=u.length;for(;m--;)i[u[m]]={};return i},Ge=ro,_t=(e,...s)=>{for(let i=0;i<s.length;i++){const u=s[i];for(const m in u)if(ro(u,m)){const O=u[m];O!==void 0&&(e[m]=O)}}return e},Zn=function(e,s,i,u){u=u||this,e&&(i&&(e=e[i]),Me(e,(m,O)=>s.call(u,m,O,i)===!1?!1:(Zn(m,s,i,u),!0)))},Kt={trim:Io,isArray:we,is:se,toArray:We,makeMap:ge,each:Me,map:Ze,grep:Je,inArray:Ke,hasOwn:Ge,extend:_t,walk:Zn,resolve:(e,s=window)=>{const i=e.split(".");for(let u=0,m=i.length;u<m&&(s=s[i[u]],!!s);u++);return s},explode:(e,s)=>je(e)?e:e===""?[]:Ze(e.split(s||","),Io),_addCacheSuffix:e=>{const s=Gn.cacheSuffix;return s&&(e+=(e.indexOf("?")===-1?"?":"&")+s),e}},pa=(e,s,i=at)=>e.exists(u=>i(u,s)),js=(e,s,i=at)=>Vr(e,s,i).getOr(e.isNone()&&s.isNone()),cc=e=>{const s=[],i=u=>{s.push(u)};for(let u=0;u<e.length;u++)e[u].each(i);return s},Vr=(e,s,i)=>e.isSome()&&s.isSome()?ne.some(i(e.getOrDie(),s.getOrDie())):ne.none(),is=(e,s,i,u)=>e.isSome()&&s.isSome()&&i.isSome()?ne.some(u(e.getOrDie(),s.getOrDie(),i.getOrDie())):ne.none(),Ea=(e,s)=>e?ne.some(s):ne.none(),Ei=typeof window<"u"?window:Function("return this;")(),_a=(e,s)=>{let i=s??Ei;for(let u=0;u<e.length&&i!==void 0&&i!==null;++u)i=i[e[u]];return i},oi=(e,s)=>{const i=e.split(".");return _a(i,s)},Kc=(e,s)=>oi(e,s),Jh=(e,s)=>{const i=Kc(e,s);if(i==null)throw new Error(e+" not available on this browser");return i},Jm=Object.getPrototypeOf,fr=e=>Jh("HTMLElement",e),Jc=e=>{const s=oi("ownerDocument.defaultView",e);return de(e)&&(fr(s).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Jm(e).constructor.name))},_i=8,Gi=9,Ha=11,Eu=1,Ee=3,De=e=>e.dom.nodeName.toLowerCase(),Ct=e=>e.dom.nodeType,Xt=e=>s=>Ct(s)===e,lo=e=>Ct(e)===_i||De(e)==="#comment",ms=e=>ts(e)&&Jc(e.dom),ts=Xt(Eu),rr=Xt(Ee),li=Xt(Gi),Ka=Xt(Ha),Ta=e=>s=>ts(s)&&De(s)===e,Nr=(e,s,i)=>{if(te(i)||tt(i)||qt(i))e.setAttribute(s,i+"");else throw console.error("Invalid call to Attribute.set. Key ",s,":: Value ",i,":: Element ",e),new Error("Attribute value was not simple")},Gr=(e,s,i)=>{Nr(e.dom,s,i)},gi=(e,s)=>{const i=e.dom;fn(s,(u,m)=>{Nr(i,m,u)})},ba=(e,s)=>{const i=e.dom.getAttribute(s);return i===null?void 0:i},Zr=(e,s)=>ne.from(ba(e,s)),Yi=(e,s)=>{const i=e.dom;return i&&i.hasAttribute?i.hasAttribute(s):!1},Gs=(e,s)=>{e.dom.removeAttribute(s)},eu=e=>{const s=e.dom.attributes;return s==null||s.length===0},em=e=>No(e.dom.attributes,(s,i)=>(s[i.name]=i.value,s),{}),rd=(e,s)=>{const i=ba(e,s);return i===void 0||i===""?[]:i.split(" ")},Yf=(e,s,i)=>{const m=rd(e,s).concat([i]);return Gr(e,s,m.join(" ")),!0},Kf=(e,s,i)=>{const u=vn(rd(e,s),m=>m!==i);return u.length>0?Gr(e,s,u.join(" ")):Gs(e,s),!1},yf=e=>e.dom.classList!==void 0,Of=e=>rd(e,"class"),uc=(e,s)=>Yf(e,"class",s),Ja=(e,s)=>Kf(e,"class",s),w0=(e,s)=>He(Of(e),s)?Ja(e,s):uc(e,s),_u=(e,s)=>{yf(e)?e.dom.classList.add(s):uc(e,s)},eg=e=>{(yf(e)?e.dom.classList:Of(e)).length===0&&Gs(e,"class")},Jf=(e,s)=>{yf(e)?e.dom.classList.remove(s):Ja(e,s),eg(e)},rp=(e,s)=>{const i=yf(e)?e.dom.classList.toggle(s):w0(e,s);return eg(e),i},tg=(e,s)=>yf(e)&&e.dom.classList.contains(s),eh=(e,s)=>{const u=(s||document).createElement("div");if(u.innerHTML=e,!u.hasChildNodes()||u.childNodes.length>1){const m="HTML does not have a single root node";throw console.error(m,e),new Error(m)}return xf(u.childNodes[0])},ng=(e,s)=>{const u=(s||document).createElement(e);return xf(u)},ip=(e,s)=>{const u=(s||document).createTextNode(e);return xf(u)},xf=e=>{if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},Ye={fromHtml:eh,fromTag:ng,fromText:ip,fromDom:xf,fromPoint:(e,s,i)=>ne.from(e.dom.elementFromPoint(s,i)).map(xf)},vf=(e,s)=>{const i=[],u=O=>(i.push(O),s(O));let m=s(e);do m=m.bind(u);while(m.isSome());return i},hl=(e,s)=>{const i=e.dom;if(i.nodeType!==Eu)return!1;{const u=i;if(u.matches!==void 0)return u.matches(s);if(u.msMatchesSelector!==void 0)return u.msMatchesSelector(s);if(u.webkitMatchesSelector!==void 0)return u.webkitMatchesSelector(s);if(u.mozMatchesSelector!==void 0)return u.mozMatchesSelector(s);throw new Error("Browser lacks native selectors")}},wb=e=>e.nodeType!==Eu&&e.nodeType!==Gi&&e.nodeType!==Ha||e.childElementCount===0,S0=(e,s)=>{const i=s===void 0?document:s.dom;return wb(i)?[]:mt(i.querySelectorAll(e),Ye.fromDom)},$d=(e,s)=>{const i=s===void 0?document:s.dom;return wb(i)?ne.none():ne.from(i.querySelector(e)).map(Ye.fromDom)},Fs=(e,s)=>e.dom===s.dom,Yr=(e,s)=>{const i=e.dom,u=s.dom;return i===u?!1:i.contains(u)},Aa=e=>Ye.fromDom(e.dom.ownerDocument),id=e=>li(e)?e:Aa(e),lp=e=>Ye.fromDom(id(e).dom.documentElement),wf=e=>Ye.fromDom(id(e).dom.defaultView),ml=e=>ne.from(e.dom.parentNode).map(Ye.fromDom),tm=e=>ne.from(e.dom.parentElement).map(Ye.fromDom),og=(e,s)=>{const i=ue(s)?s:Fe;let u=e.dom;const m=[];for(;u.parentNode!==null&&u.parentNode!==void 0;){const O=u.parentNode,S=Ye.fromDom(O);if(m.push(S),i(S)===!0)break;u=O}return m},Rd=e=>{const s=i=>vn(i,u=>!Fs(e,u));return ml(e).map(ya).map(s).getOr([])},Bd=e=>ne.from(e.dom.previousSibling).map(Ye.fromDom),nm=e=>ne.from(e.dom.nextSibling).map(Ye.fromDom),Xl=e=>os(vf(e,Bd)),om=e=>vf(e,nm),ya=e=>mt(e.dom.childNodes,Ye.fromDom),Md=(e,s)=>{const i=e.dom.childNodes;return ne.from(i[s]).map(Ye.fromDom)},_c=e=>Md(e,0),el=e=>Md(e,e.dom.childNodes.length-1),Sf=e=>e.dom.childNodes.length,Sb=e=>{const s=e.dom.head;if(s==null)throw new Error("Head is not available yet");return Ye.fromDom(s)},sg=e=>Ka(e)&&Re(e.dom.host),Tu=e=>Ye.fromDom(e.dom.getRootNode()),th=e=>sg(e)?e:Sb(id(e)),k0=e=>sg(e)?e:Ye.fromDom(id(e).dom.body),rg=e=>{const s=Tu(e);return sg(s)?ne.some(s):ne.none()},C0=e=>Ye.fromDom(e.dom.host),E0=e=>{if(Re(e.target)){const s=Ye.fromDom(e.target);if(ts(s)&&_0(s)&&e.composed&&e.composedPath){const i=e.composedPath();if(i)return Cn(i)}}return ne.from(e.target)},_0=e=>Re(e.dom.shadowRoot),Au=e=>{const s=rr(e)?e.dom.parentNode:e.dom;if(s==null||s.ownerDocument===null)return!1;const i=s.ownerDocument;return rg(Ye.fromDom(s)).fold(()=>i.body.contains(s),Yt(Au,C0))};var cp=(e,s,i,u,m)=>e(i,u)?ne.some(i):ue(m)&&m(i)?ne.none():s(i,u,m);const tu=(e,s,i)=>{let u=e.dom;const m=ue(i)?i:Fe;for(;u.parentNode;){u=u.parentNode;const O=Ye.fromDom(u);if(s(O))return ne.some(O);if(m(O))break}return ne.none()},Ur=(e,s,i)=>cp((m,O)=>O(m),tu,e,s,i),Ti=(e,s)=>{const i=e.dom;return i.parentNode?ql(Ye.fromDom(i.parentNode),u=>!Fs(e,u)&&s(u)):ne.none()},ql=(e,s)=>{const i=m=>s(Ye.fromDom(m));return Uo(e.dom.childNodes,i).map(Ye.fromDom)},nh=(e,s)=>{const i=u=>{for(let m=0;m<u.childNodes.length;m++){const O=Ye.fromDom(u.childNodes[m]);if(s(O))return ne.some(O);const S=i(u.childNodes[m]);if(S.isSome())return S}return ne.none()};return i(e.dom)},oh=(e,s,i)=>tu(e,u=>hl(u,s),i),Ki=(e,s)=>$d(s,e),oo=(e,s,i)=>cp((m,O)=>hl(m,O),oh,e,s,i),up=e=>oo(e,"[contenteditable]"),nu=(e,s=!1)=>Au(e)?e.dom.isContentEditable:up(e).fold(pt(s),i=>jl(i)==="true"),jl=e=>e.dom.contentEditable,Us=(e,s)=>{e.dom.contentEditable=s?"true":"false"},Fd=e=>e.style!==void 0&&ue(e.style.getPropertyValue),sm=(e,s,i)=>{if(!te(i))throw console.error("Invalid call to CSS.set. Property ",s,":: Value ",i,":: Element ",e),new Error("CSS value must be a string: "+i);Fd(e)&&e.style.setProperty(s,i)},rm=(e,s)=>{Fd(e)&&e.style.removeProperty(s)},dp=(e,s,i)=>{const u=e.dom;sm(u,s,i)},ou=(e,s)=>{const i=e.dom;fn(s,(u,m)=>{sm(i,m,u)})},Gl=(e,s)=>{const i=e.dom,m=window.getComputedStyle(i).getPropertyValue(s);return m===""&&!Au(e)?ig(i,s):m},ig=(e,s)=>Fd(e)?e.style.getPropertyValue(s):"",pi=(e,s)=>{const i=e.dom,u=ig(i,s);return ne.from(u).filter(m=>m.length>0)},tl=e=>{const s={},i=e.dom;if(Fd(i))for(let u=0;u<i.style.length;u++){const m=i.style.item(u);s[m]=i.style[m]}return s},gl=(e,s)=>{const i=e.dom;rm(i,s),pa(Zr(e,"style").map(Is),"")&&Gs(e,"style")},rs=e=>e.dom.offsetWidth,bi=(e,s)=>{ml(e).each(u=>{u.dom.insertBefore(s.dom,e.dom)})},Tc=(e,s)=>{nm(e).fold(()=>{ml(e).each(m=>{$r(m,s)})},u=>{bi(u,s)})},sh=(e,s)=>{_c(e).fold(()=>{$r(e,s)},u=>{e.dom.insertBefore(s.dom,u.dom)})},$r=(e,s)=>{e.dom.appendChild(s.dom)},ag=(e,s)=>{bi(e,s),$r(s,e)},cs=(e,s)=>{Ce(s,(i,u)=>{const m=u===0?e:s[u-1];Tc(m,i)})},ua=(e,s)=>{Ce(s,i=>{$r(e,i)})},Ac=e=>{e.dom.textContent="",Ce(ya(e),s=>{Or(s)})},Or=e=>{const s=e.dom;s.parentNode!==null&&s.parentNode.removeChild(s)},Nl=e=>{const s=ya(e);s.length>0&&cs(e,s),Or(e)},im=(e,s)=>{const u=(s||document).createElement("div");return u.innerHTML=e,ya(Ye.fromDom(u))},rh=e=>mt(e,Ye.fromDom),am=e=>e.dom.innerHTML,Ld=(e,s)=>{const u=Aa(e).dom,m=Ye.fromDom(u.createDocumentFragment()),O=im(s,u);ua(m,O),Ac(e),$r(e,m)},T0=e=>{const s=Ye.fromTag("div"),i=Ye.fromDom(e.dom.cloneNode(!0));return $r(s,i),am(s)},Cs=(e,s,i,u,m,O,S)=>({target:e,x:s,y:i,stop:u,prevent:m,kill:O,raw:S}),A0=e=>{const s=Ye.fromDom(E0(e).getOr(e.target)),i=()=>e.stopPropagation(),u=()=>e.preventDefault(),m=L(u,i);return Cs(s,e.clientX,e.clientY,i,u,m,e)},ci=(e,s)=>i=>{e(i)&&s(A0(i))},Q=(e,s,i,u,m)=>{const O=ci(i,u);return e.dom.addEventListener(s,O,m),{unbind:Ne(le,e,s,O,m)}},K=(e,s,i,u)=>Q(e,s,i,u,!1),le=(e,s,i,u)=>{e.dom.removeEventListener(s,i,u)},Xe=(e,s)=>({left:e,top:s,translate:(u,m)=>Xe(e+u,s+m)}),rt=Xe,sn=e=>{const s=e.getBoundingClientRect();return rt(s.left,s.top)},Mn=(e,s)=>e!==void 0?e:s!==void 0?s:0,ns=e=>{const s=e.dom.ownerDocument,i=s.body,u=s.defaultView,m=s.documentElement;if(i===e.dom)return rt(i.offsetLeft,i.offsetTop);const O=Mn(u==null?void 0:u.pageYOffset,m.scrollTop),S=Mn(u==null?void 0:u.pageXOffset,m.scrollLeft),A=Mn(m.clientTop,i.clientTop),D=Mn(m.clientLeft,i.clientLeft);return $o(e).translate(S-D,O-A)},$o=e=>{const s=e.dom,u=s.ownerDocument.body;return u===s?rt(u.offsetLeft,u.offsetTop):Au(e)?sn(s):rt(0,0)},ao=e=>{const s=e!==void 0?e.dom:document,i=s.body.scrollLeft||s.documentElement.scrollLeft,u=s.body.scrollTop||s.documentElement.scrollTop;return rt(i,u)},hr=(e,s,i)=>{const m=(i!==void 0?i.dom:document).defaultView;m&&m.scrollTo(e,s)},Wr=(e,s)=>{ji().browser.isSafari()&&ue(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(s)},$l=e=>{const s=e===void 0?window:e;return ji().browser.isFirefox()?ne.none():ne.from(s.visualViewport)},Yl=(e,s,i,u)=>({x:e,y:s,width:i,height:u,right:e+i,bottom:s+u}),P0=e=>{const s=e===void 0?window:e,i=s.document,u=ao(Ye.fromDom(i));return $l(s).fold(()=>{const m=s.document.documentElement,O=m.clientWidth,S=m.clientHeight;return Yl(u.left,u.top,O,S)},m=>Yl(Math.max(m.pageLeft,u.left),Math.max(m.pageTop,u.top),m.width,m.height))},kb=(e,s)=>vn(ya(e),s),Cb=(e,s)=>{let i=[];return Ce(ya(e),u=>{s(u)&&(i=i.concat([u])),i=i.concat(Cb(u,s))}),i},pl=(e,s)=>S0(s,e),D0=(e,s,i)=>tu(e,s,i).isSome(),Eb=(e,s)=>Ti(e,s).isSome(),N0=(e,s)=>nh(e,s).isSome();class Ji{constructor(s,i){this.node=s,this.rootNode=i,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(s){return this.node=this.findSibling(this.node,"firstChild","nextSibling",s),this.node}prev(s){return this.node=this.findSibling(this.node,"lastChild","previousSibling",s),this.node}prev2(s){return this.node=this.findPreviousNode(this.node,s),this.node}findSibling(s,i,u,m){if(s){if(!m&&s[i])return s[i];if(s!==this.rootNode){let O=s[u];if(O)return O;for(let S=s.parentNode;S&&S!==this.rootNode;S=S.parentNode)if(O=S[u],O)return O}}}findPreviousNode(s,i){if(s){const u=s.previousSibling;if(this.rootNode&&u===this.rootNode)return;if(u){if(!i){for(let O=u.lastChild;O;O=O.lastChild)if(!O.lastChild)return O}return u}const m=s.parentNode;if(m&&m!==this.rootNode)return m}}}const $0="\uFEFF",ea=" ",lg=e=>e===$0,cg=e=>e.replace(/\uFEFF/g,""),R2=/^[ \t\r\n]*$/,ad=e=>R2.test(e),ug=e=>{for(const s of e)if(!lg(s))return!1;return!0},R0=e=>" \f \v".indexOf(e)!==-1,_b=e=>e===`
2
2
  `||e==="\r",B2=(e,s)=>s<e.length&&s>=0?_b(e[s]):!1,LO=(e,s=4,i=!0,u=!0)=>{const m=as(" ",s),O=e.replace(/\t/g,m);return No(O,(A,D)=>R0(D)||D===ea?A.pcIsSpace||A.str===""&&i||A.str.length===O.length-1&&u||B2(O,A.str.length+1)?{pcIsSpace:!1,str:A.str+ea}:{pcIsSpace:!0,str:A.str+" "}:{pcIsSpace:_b(D),str:A.str+D},{pcIsSpace:!1,str:""}).str},lm=e=>s=>!!s&&s.nodeType===e,fp=e=>!!e&&!Object.getPrototypeOf(e),io=lm(1),Id=e=>io(e)&&ms(Ye.fromDom(e)),Pc=e=>io(e)&&e.namespaceURI==="http://www.w3.org/2000/svg",Co=e=>{const s=e.toLowerCase();return i=>Re(i)&&i.nodeName.toLowerCase()===s},nl=e=>{const s=e.map(i=>i.toLowerCase());return i=>{if(i&&i.nodeName){const u=i.nodeName.toLowerCase();return He(s,u)}return!1}},ih=(e,s)=>{const i=s.toLowerCase().split(" ");return u=>{if(io(u)){const m=u.ownerDocument.defaultView;if(m)for(let O=0;O<i.length;O++){const S=m.getComputedStyle(u,null);if((S?S.getPropertyValue(e):null)===i[O])return!0}}return!1}},Tb=e=>s=>io(s)&&s.hasAttribute(e),cm=e=>io(e)&&e.hasAttribute("data-mce-bogus"),B0=e=>io(e)&&e.getAttribute("data-mce-bogus")==="all",Pa=e=>io(e)&&e.tagName==="TABLE",hp=e=>s=>!!(Id(s)&&(s.contentEditable===e||s.getAttribute("data-mce-contenteditable")===e)),um=nl(["textarea","input"]),Jt=lm(3),mp=lm(4),ah=lm(7),kf=lm(8),gp=lm(9),M0=lm(11),wr=Co("br"),IO=Co("img"),bl=hp("true"),Mr=hp("false"),Ab=e=>Id(e)&&e.isContentEditable&&Re(e.parentElement)&&!e.parentElement.isContentEditable,Sr=nl(["td","th"]),Pu=nl(["td","th","caption"]),$i=nl(["video","audio","object","embed"]),dg=Co("li"),yl=Co("details"),VO=Co("summary"),Da={skipBogus:!0,includeZwsp:!1,checkRootAsContent:!1},Rl=(e,s,i)=>{const u=Ye.fromDom(s),m=Ye.fromDom(e),O=i.getWhitespaceElements();return D0(m,A=>ro(O,De(A)),Ne(Fs,u))},Pb=e=>io(e)&&e.nodeName==="A"&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")),en=(e,s)=>io(e)&&ro(s.getNonEmptyElements(),e.nodeName),Bl=Tb("data-mce-bookmark"),F0=e=>tm(Ye.fromDom(e)).exists(s=>!nu(s)),ta=(e,s,i)=>ad(e.data)&&!Rl(e,s,i),su=(e,s,i,u)=>Jt(e)&&!ta(e,s,i)&&(!u.includeZwsp||!ug(e.data)),Ml=(e,s,i,u)=>ue(u.isContent)&&u.isContent(s)||en(s,e)||Bl(s)||Pb(s)||su(s,i,e,u)||Mr(s)||bl(s)&&F0(s),Dc=(e,s,i)=>{const u={...Da,...i};if(u.checkRootAsContent&&Ml(e,s,s,u))return!1;let m=s.firstChild,O=0;if(!m)return!0;const S=new Ji(m,s);do{if(u.skipBogus&&io(m)){const A=m.getAttribute("data-mce-bogus");if(A){m=S.next(A==="all");continue}}if(kf(m)){m=S.next(!0);continue}if(wr(m)){O++,m=S.next();continue}if(Ml(e,m,s,u))return!1;m=S.next()}while(m);return O<=1},ui=(e,s,i)=>Dc(e,s.dom,{checkRootAsContent:!0,...i}),Db=(e,s,i)=>Ml(e,s,s,{includeZwsp:Da.includeZwsp,...i}),kr=e=>{let s=e;return{get:()=>s,set:m=>{s=m}}},Ps=e=>{const s=kr(ne.none()),i=()=>s.get().each(e);return{clear:()=>{i(),s.set(ne.none())},isSet:()=>s.get().isSome(),get:()=>s.get(),set:A=>{i(),s.set(ne.some(A))}}},ld=e=>{const s=kr(ne.none()),i=()=>s.get().each(A=>clearInterval(A));return{clear:()=>{i(),s.set(ne.none())},isSet:()=>s.get().isSome(),get:()=>s.get(),set:A=>{i(),s.set(ne.some(setInterval(A,e)))}}},Nc=()=>{const e=Ps(St);return{...e,on:i=>e.get().each(i)}},di=e=>{const s=e.toLowerCase();return s==="svg"?"svg":s==="math"?"math":"html"},F=e=>di(e)!=="html",Z=e=>F(e.nodeName),ie=e=>di(e.nodeName),ke=["svg","math"],ct=()=>{const e=Nc(),s=()=>e.get().map(ie).getOr("html");return{track:m=>(Z(m)?e.set(m):e.get().exists(O=>!O.contains(m))&&e.clear(),s()),current:s,reset:()=>{e.clear()}}},Ae="data-mce-block",mn=e=>vn(Mo(e),s=>!/[A-Z]/.test(s)),Yn=e=>mt(mn(e),s=>{const i=CSS.escape(s);return`${i}:`+mt(ke,u=>`not(${u} ${i})`).join(":")}).join(","),eo=(e,s)=>Re(s.querySelector(e))?(s.setAttribute(Ae,"true"),s.getAttribute("data-mce-selected")==="inline-boundary"&&s.removeAttribute("data-mce-selected"),!0):(s.removeAttribute(Ae),!1),Zo=(e,s)=>{const i=Yn(e.getTransparentElements()),u=Yn(e.getBlockElements());return vn(s.querySelectorAll(i),m=>eo(u,m))},bs=(e,s,i)=>{var u;const m=i?"lastChild":"firstChild";for(let O=s[m];O;O=O[m])if(Dc(e,O,{checkRootAsContent:!0})){(u=O.parentNode)===null||u===void 0||u.removeChild(O);return}},Fo=(e,s,i)=>{const u=document.createRange(),m=s.parentNode;if(m){u.setStartBefore(s),u.setEndBefore(i);const O=u.extractContents();bs(e,O,!0),u.setStartAfter(i),u.setEndAfter(s);const S=u.extractContents();bs(e,S,!1),Dc(e,O,{checkRootAsContent:!0})||m.insertBefore(O,s),Dc(e,i,{checkRootAsContent:!0})||m.insertBefore(i,s),Dc(e,S,{checkRootAsContent:!0})||m.insertBefore(S,s),m.removeChild(s)}},Qr=(e,s,i)=>{const u=e.getBlockElements(),m=Ye.fromDom(s),O=A=>De(A)in u,S=A=>Fs(A,m);Ce(rh(i),A=>{tu(A,O,S).each(D=>{const I=kb(A,G=>O(G)&&!e.isValidChild(De(D),De(G)));if(I.length>0){const G=tm(D);Ce(I,ee=>{tu(ee,O,S).each(oe=>{Fo(e,oe.dom,ee.dom)})}),G.each(ee=>Zo(e,ee.dom))}})})},da=(e,s,i)=>{Ce([...i,...Du(e,s)?[s]:[]],u=>Ce(pl(Ye.fromDom(u),u.nodeName.toLowerCase()),m=>{L0(e,m.dom)&&Nl(m)}))},dc=(e,s)=>{const i=Zo(e,s);Qr(e,s,i),da(e,s,i)},dm=(e,s)=>{if(fm(e,s)){const i=Yn(e.getBlockElements());eo(i,s)}},Ri=(e,s,i)=>{const u=O=>Fs(O,Ye.fromDom(s)),m=og(Ye.fromDom(i),u);Pn(m,m.length-2).filter(ts).fold(()=>dc(e,s),O=>dc(e,O.dom))},pp=e=>e.hasAttribute(Ae),fg=(e,s)=>ro(e.getTransparentElements(),s),fm=(e,s)=>io(s)&&fg(e,s.nodeName),Du=(e,s)=>fm(e,s)&&pp(s),L0=(e,s)=>fm(e,s)&&!pp(s),ru=(e,s)=>s.type===1&&fg(e,s.name)&&te(s.attr(Ae)),Cf=ji().browser,QO=e=>Uo(e,ts),Nb=e=>Cf.isFirefox()&&De(e)==="table"?QO(ya(e)).filter(s=>De(s)==="caption").bind(s=>QO(om(s)).map(i=>{const u=i.dom.offsetTop,m=s.dom.offsetTop,O=s.dom.offsetHeight;return u<=m?-O:0})).getOr(0):0,Hs=(e,s)=>e.children&&He(e.children,s),Kr=(e,s,i)=>{let u=0,m=0;const O=e.ownerDocument;if(i=i||e,s){if(i===e&&s.getBoundingClientRect&&Gl(Ye.fromDom(e),"position")==="static"){const A=s.getBoundingClientRect();return u=A.left+(O.documentElement.scrollLeft||e.scrollLeft)-O.documentElement.clientLeft,m=A.top+(O.documentElement.scrollTop||e.scrollTop)-O.documentElement.clientTop,{x:u,y:m}}let S=s;for(;S&&S!==i&&S.nodeType&&!Hs(S,i);){const A=S;u+=A.offsetLeft||0,m+=A.offsetTop||0,S=A.offsetParent}for(S=s.parentNode;S&&S!==i&&S.nodeType&&!Hs(S,i);)u-=S.scrollLeft||0,m-=S.scrollTop||0,S=S.parentNode;m+=Nb(Ye.fromDom(s))}return{x:u,y:m}},ol=(e,s={})=>{let i=0;const u={},m=Ye.fromDom(e),O=id(m),S=et=>{s.referrerPolicy=et},A=et=>{s.contentCssCors=et},D=et=>{$r(th(m),et)},I=et=>{const yt=th(m);Ki(yt,"#"+et).each(Or)},G=et=>Ms(u,et).getOrThunk(()=>({id:"mce-u"+i++,passed:[],failed:[],count:0})),ee=et=>new Promise((yt,kt)=>{let Pt;const tn=Kt._addCacheSuffix(et),yn=G(tn);u[tn]=yn,yn.count++;const Wn=(Fn,go)=>{Ce(Fn,Ve),yn.status=go,yn.passed=[],yn.failed=[],Pt&&(Pt.onload=null,Pt.onerror=null,Pt=null)},Ht=()=>Wn(yn.passed,2),Bt=()=>Wn(yn.failed,3);if(yt&&yn.passed.push(yt),kt&&yn.failed.push(kt),yn.status===1)return;if(yn.status===2){Ht();return}if(yn.status===3){Bt();return}yn.status=1;const on=Ye.fromTag("link",O.dom);gi(on,{rel:"stylesheet",type:"text/css",id:yn.id}),s.contentCssCors&&Gr(on,"crossOrigin","anonymous"),s.referrerPolicy&&Gr(on,"referrerpolicy",s.referrerPolicy),Pt=on.dom,Pt.onload=Ht,Pt.onerror=Bt,D(on),Gr(on,"href",tn)}),oe=(et,yt)=>{const kt=G(et);u[et]=kt,kt.count++;const Pt=Ye.fromTag("style",O.dom);gi(Pt,{rel:"stylesheet",type:"text/css",id:kt.id,"data-mce-key":et}),Pt.dom.innerHTML=yt,D(Pt)},me=et=>Promise.allSettled(mt(et,kt=>ee(kt).then(pt(kt)))).then(kt=>{const Pt=_o(kt,tn=>tn.status==="fulfilled");return Pt.fail.length>0?Promise.reject(mt(Pt.fail,tn=>tn.reason)):mt(Pt.pass,tn=>tn.value)}),Te=et=>{const yt=Kt._addCacheSuffix(et);Ms(u,yt).each(kt=>{--kt.count===0&&(delete u[yt],I(kt.id))})};return{load:ee,loadRawCss:oe,loadAll:me,unload:Te,unloadRawCss:et=>{Ms(u,et).each(yt=>{--yt.count===0&&(delete u[et],I(yt.id))})},unloadAll:et=>{Ce(et,yt=>{Te(yt)})},_setReferrerPolicy:S,_setContentCssCors:A}},$b=(()=>{const e=new WeakMap;return{forElement:(i,u)=>{const O=Tu(i).dom;return ne.from(e.get(O)).getOrThunk(()=>{const S=ol(O,u);return e.set(O,S),S})}}})(),M2=e=>e.nodeName.toLowerCase()==="span",Vd=(e,s)=>Re(e)&&(Db(s,e)||s.isInline(e.nodeName.toLowerCase())),hg=(e,s,i)=>{const u=new Ji(e,s).prev(!1),m=new Ji(e,s).next(!1),O=st(u)||Vd(u,i),S=st(m)||Vd(m,i);return O&&S},F2=e=>M2(e)&&e.getAttribute("data-mce-type")==="bookmark",c5=(e,s,i)=>Jt(e)&&e.data.length>0&&hg(e,s,i),u5=e=>io(e)?e.childNodes.length>0:!1,yi=e=>M0(e)||gp(e),Qd=(e,s,i,u)=>{var m;const O=u||s;if(io(s)&&F2(s))return s;const S=s.childNodes;for(let A=S.length-1;A>=0;A--)Qd(e,S[A],i,O);if(io(s)){const A=s.childNodes;A.length===1&&F2(A[0])&&((m=s.parentNode)===null||m===void 0||m.insertBefore(A[0],s))}return!yi(s)&&!Db(i,s)&&!u5(s)&&!c5(s,O,i)&&e.remove(s),s},I0=Kt.makeMap,lh=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Rb=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Nu=/[<>&\"\']/g,Bb=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,zO={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},ch={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},zd={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},cd=e=>{const s=Ye.fromTag("div").dom;return s.innerHTML=e,s.textContent||s.innerText||e},HO=(e,s)=>{const i={};if(e){const u=e.split(",");s=s||10;for(let m=0;m<u.length;m+=2){const O=String.fromCharCode(parseInt(u[m],s));if(!ch[O]){const S="&"+u[m+1]+";";i[O]=S,i[S]=O}}return i}else return},iu=HO("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),Mb=(e,s)=>e.replace(s?lh:Rb,i=>ch[i]||i),$u=e=>(""+e).replace(Nu,s=>ch[s]||s),Ef=(e,s)=>e.replace(s?lh:Rb,i=>i.length>1?"&#"+((i.charCodeAt(0)-55296)*1024+(i.charCodeAt(1)-56320)+65536)+";":ch[i]||"&#"+i.charCodeAt(0)+";"),hm=(e,s,i)=>{const u=i||iu;return e.replace(s?lh:Rb,m=>ch[m]||u[m]||m)},bp={encodeRaw:Mb,encodeAllRaw:$u,encodeNumeric:Ef,encodeNamed:hm,getEncodeFunc:(e,s)=>{const i=HO(s)||iu,u=(S,A)=>S.replace(A?lh:Rb,D=>ch[D]!==void 0?ch[D]:i[D]!==void 0?i[D]:D.length>1?"&#"+((D.charCodeAt(0)-55296)*1024+(D.charCodeAt(1)-56320)+65536)+";":"&#"+D.charCodeAt(0)+";"),m=(S,A)=>hm(S,A,i),O=I0(e.replace(/\+/g,","));return O.named&&O.numeric?u:O.named?s?m:hm:O.numeric?Ef:Mb},decode:e=>e.replace(Bb,(s,i)=>i?(i.charAt(0).toLowerCase()==="x"?i=parseInt(i.substr(1),16):i=parseInt(i,10),i>65535?(i-=65536,String.fromCharCode(55296+(i>>10),56320+(i&1023))):zO[i]||String.fromCharCode(i)):zd[s]||iu[s]||cd(s))},Fl=(e,s)=>(e=Kt.trim(e),e?e.split(s||" "):[]),Bi=e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$"),f5=e=>de(e)&&e.source&&Object.prototype.toString.call(e)==="[object RegExp]",mg=e=>{const s=i=>je(i)?mt(i,s):f5(i)?new RegExp(i.source,i.flags):de(i)?Go(i,s):i;return s(e)},Fb=e=>{const s=/^(~)?(.+)$/;return or(Fl(e,","),i=>{const u=s.exec(i);if(u){const O=u[1]==="~"?"span":"div",S=u[2];return[{cloneName:O,name:S}]}else return[]})},UO=e=>Object.freeze(["id","accesskey","class","dir","lang","style","tabindex","title","role",...e!=="html4"?["contenteditable","contextmenu","draggable","dropzone","hidden","spellcheck","translate","itemprop","itemscope","itemtype"]:[],...e!=="html5-strict"?["xml:lang"]:[]]),gg=e=>{let s,i;s="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",i="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment",e!=="html4"&&(s+=" article aside details dialog figure main header footer hgroup section nav "+"a ins del canvas map",i+=" audio canvas command data datalist mark meter output picture progress time wbr video ruby bdi keygen svg"),e!=="html5-strict"&&(i=[i,"acronym applet basefont big font strike tt"].join(" "),s=[s,"center dir isindex noframes"].join(" "));const u=[s,i].join(" ");return{blockContent:s,phrasingContent:i,flowContent:u}},$c=e=>{const{blockContent:s,phrasingContent:i,flowContent:u}=gg(e),m=O=>Object.freeze(O.split(" "));return Object.freeze({blockContent:m(s),phrasingContent:m(i),flowContent:m(u)})},V0={html4:Ie(()=>$c("html4")),html5:Ie(()=>$c("html5")),"html5-strict":Ie(()=>$c("html5-strict"))},uh=(e,s)=>{const{blockContent:i,phrasingContent:u,flowContent:m}=V0[e]();return s==="blocks"?ne.some(i):s==="phrasing"?ne.some(u):s==="flow"?ne.some(m):ne.none()},bE=e=>{const s=UO(e),{phrasingContent:i,flowContent:u}=gg(e),m={},O=(D,I,G)=>{m[D]={attributes:Bs(I,pt({})),attributesOrder:I,children:Bs(G,pt({}))}},S=(D,I="",G="")=>{const ee=Fl(G),oe=Fl(D);let me=oe.length;const Te=[...s,...Fl(I)];for(;me--;)O(oe[me],Te.slice(),ee)},A=(D,I)=>{const G=Fl(D),ee=Fl(I);let oe=G.length;for(;oe--;){const me=m[G[oe]];for(let Te=0,xe=ee.length;Te<xe;Te++)me.attributes[ee[Te]]={},me.attributesOrder.push(ee[Te])}};return e!=="html5-strict"&&(Ce(Fl("acronym applet basefont big font strike tt"),G=>{S(G,"",i)}),Ce(Fl("center dir isindex noframes"),G=>{S(G,"",u)})),S("html","manifest","head body"),S("head","","base command link meta noscript script style title"),S("title hr noscript br"),S("base","href target"),S("link","href rel media hreflang type sizes hreflang"),S("meta","name http-equiv content charset"),S("style","media type scoped"),S("script","src async defer type charset"),S("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",u),S("dd div","",u),S("address dt caption","",e==="html4"?i:u),S("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",i),S("blockquote","cite",u),S("ol","reversed start type","li"),S("ul","","li"),S("li","value",u),S("dl","","dt dd"),S("a","href target rel media hreflang type",e==="html4"?i:u),S("q","cite",i),S("ins del","cite datetime",u),S("img","src sizes srcset alt usemap ismap width height"),S("iframe","src name width height",u),S("embed","src type width height"),S("object","data type typemustmatch name usemap form width height",[u,"param"].join(" ")),S("param","name value"),S("map","name",[u,"area"].join(" ")),S("area","alt coords shape href target rel media hreflang type"),S("table","border","caption colgroup thead tfoot tbody tr"+(e==="html4"?" col":"")),S("colgroup","span","col"),S("col","span"),S("tbody thead tfoot","","tr"),S("tr","","td th"),S("td","colspan rowspan headers",u),S("th","colspan rowspan headers scope abbr",u),S("form","accept-charset action autocomplete enctype method name novalidate target",u),S("fieldset","disabled form name",[u,"legend"].join(" ")),S("label","form for",i),S("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),S("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value",e==="html4"?u:i),S("select","disabled form multiple name required size","option optgroup"),S("optgroup","disabled label","option"),S("option","disabled label selected value"),S("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),S("menu","type label",[u,"li"].join(" ")),S("noscript","",u),e!=="html4"&&(S("wbr"),S("ruby","",[i,"rt rp"].join(" ")),S("figcaption","",u),S("mark rt rp bdi","",i),S("summary","",[i,"h1 h2 h3 h4 h5 h6"].join(" ")),S("canvas","width height",u),S("data","value",i),S("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[u,"track source"].join(" ")),S("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[u,"track source"].join(" ")),S("picture","","img source"),S("source","src srcset type media sizes"),S("track","kind src srclang label default"),S("datalist","",[i,"option"].join(" ")),S("article section nav aside main header footer","",u),S("hgroup","","h1 h2 h3 h4 h5 h6"),S("figure","",[u,"figcaption"].join(" ")),S("time","datetime",i),S("dialog","open",u),S("command","type label icon disabled checked radiogroup command"),S("output","for form name",i),S("progress","value max",i),S("meter","value min max low high optimum",i),S("details","open",[u,"summary"].join(" ")),S("keygen","autofocus challenge disabled form keytype name"),O("svg","id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform".split(" "),[])),e!=="html5-strict"&&(A("script","language xml:space"),A("style","xml:space"),A("object","declare classid code codebase codetype archive standby align border hspace vspace"),A("embed","align name hspace vspace"),A("param","valuetype type"),A("a","charset name rev shape coords"),A("br","clear"),A("applet","codebase archive code object alt name width height align hspace vspace"),A("img","name longdesc align border hspace vspace"),A("iframe","longdesc frameborder marginwidth marginheight scrolling align"),A("font basefont","size color face"),A("input","usemap align"),A("select"),A("textarea"),A("h1 h2 h3 h4 h5 h6 div p legend caption","align"),A("ul","type compact"),A("li","type"),A("ol dl menu dir","compact"),A("pre","width xml:space"),A("hr","align noshade size width"),A("isindex","prompt"),A("table","summary width frame rules cellspacing cellpadding align bgcolor"),A("col","width align char charoff valign"),A("colgroup","width align char charoff valign"),A("thead","align char charoff valign"),A("tr","align char charoff valign bgcolor"),A("th","axis align char charoff valign nowrap bgcolor width height"),A("form","accept"),A("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),A("tfoot","align char charoff valign"),A("tbody","align char charoff valign"),A("area","nohref"),A("body","background bgcolor text link vlink alink")),e!=="html4"&&(A("input button select textarea","autofocus"),A("input textarea","placeholder"),A("a","download"),A("link script img","crossorigin"),A("img","loading"),A("iframe","sandbox seamless allow allowfullscreen loading referrerpolicy")),e!=="html4"&&Ce([m.video,m.audio],D=>{delete D.children.audio,delete D.children.video}),Ce(Fl("a form meter progress dfn"),D=>{m[D]&&delete m[D].children[D]}),delete m.caption.children.table,delete m.script,m},yp=e=>e==="-"?"remove":"add",dh=e=>{const s=/^(@?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)$/;return ne.from(s.exec(e)).map(i=>({preset:i[1]==="@",name:i[2]}))},fh=e=>{const s=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;return or(Fl(e,","),i=>{const u=s.exec(i);if(u){const m=u[1],O=m?yp(m):"replace",S=u[2],A=or(Fl(u[3],"|"),D=>dh(D).toArray());return[{operation:O,name:S,validChildren:A}]}else return[]})},WO=(e,s)=>{const i=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,u=/[*?+]/,{attributes:m,attributesOrder:O}=s;return Ce(Fl(e,"|"),S=>{const A=i.exec(S);if(A){const D={},I=A[1],G=A[2].replace(/[\\:]:/g,":"),ee=A[3],oe=A[4];if(I==="!"&&(s.attributesRequired=s.attributesRequired||[],s.attributesRequired.push(G),D.required=!0),I==="-"){delete m[G],O.splice(Kt.inArray(O,G),1);return}if(ee&&(ee==="="?(s.attributesDefault=s.attributesDefault||[],s.attributesDefault.push({name:G,value:oe}),D.defaultValue=oe):ee==="~"?(s.attributesForced=s.attributesForced||[],s.attributesForced.push({name:G,value:oe}),D.forcedValue=oe):ee==="<"&&(D.validValues=Kt.makeMap(oe,"?"))),u.test(G)){const me=D;s.attributePatterns=s.attributePatterns||[],me.pattern=Bi(G),s.attributePatterns.push(me)}else m[G]||O.push(G),m[G]=D}})},yE=(e,s)=>{fn(e.attributes,(i,u)=>{s.attributes[u]=i}),s.attributesOrder.push(...e.attributesOrder)},XO=(e,s)=>{const i=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return or(Fl(s,","),u=>{const m=i.exec(u);if(m){const O=m[1],S=m[2],A=m[3],D=m[4],I=m[5],G={attributes:{},attributesOrder:[]};if(e.each(ee=>yE(ee,G)),O==="#"?G.paddEmpty=!0:O==="-"&&(G.removeEmpty=!0),D==="!"&&(G.removeEmptyAttrs=!0),I&&WO(I,G),A&&(G.outputName=S),S==="@")if(e.isNone())e=ne.some(G);else return[];return[A?{name:S,element:G,aliasName:A}:{name:S,element:G}]}else return[]})},mm={},au=Kt.makeMap,Ol=Kt.each,pg=Kt.extend,L2=Kt.explode,Op=(e,s={})=>{const i=au(e," ",au(e.toUpperCase()," "));return pg(i,s)},qO=e=>Op("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),jO=(e,s)=>{if(e){const i={};return te(e)&&(e={"*":e}),Ol(e,(u,m)=>{i[m]=i[m.toUpperCase()]=s==="map"?au(u,/[, ]/):L2(u,/[, ]/)}),i}else return},gm=(e={})=>{var s;const i={},u={};let m=[];const O={},S={},A=(vo,Qs,Zi)=>{const qa=e[vo];if(qa)return au(qa,/[, ]/,au(qa.toUpperCase(),/[, ]/));{let ra=mm[vo];return ra||(ra=Op(Qs,Zi),mm[vo]=ra),ra}},D=(s=e.schema)!==null&&s!==void 0?s:"html5",I=bE(D);e.verify_html===!1&&(e.valid_elements="*[*]");const G=jO(e.valid_styles),ee=jO(e.invalid_styles,"map"),oe=jO(e.valid_classes,"map"),me=A("whitespace_elements","pre script noscript style textarea video audio iframe object code"),Te=A("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),xe=A("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),$e=A("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),et="td th iframe video audio object script code",yt=A("non_empty_elements",et+" pre svg textarea summary",xe),kt=A("move_caret_before_on_enter_elements",et+" table",xe),Pt="h1 h2 h3 h4 h5 h6",tn=A("text_block_elements",Pt+" p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),yn=A("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary html body multicol listing",tn),Wn=A("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),Ht=A("transparent_elements","a ins del canvas map"),Bt=A("wrap_block_elements","pre "+Pt);Ol("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),vo=>{S[vo]=new RegExp("</"+vo+"[^>]*>","gi")});const on=vo=>{const Qs=ne.from(i["@"]),Zi=/[*?+]/;Ce(XO(Qs,vo??""),({name:qa,element:ra,aliasName:Va})=>{if(Va&&(i[Va]=ra),Zi.test(qa)){const Oi=ra;Oi.pattern=Bi(qa),m.push(Oi)}else i[qa]=ra})},Fn=vo=>{m=[],Ce(Mo(i),Qs=>{delete i[Qs]}),on(vo)},go=(vo,Qs)=>{var Zi,qa;delete mm.text_block_elements,delete mm.block_elements;const ra=Qs.extends?!xc(Qs.extends):!1,Va=Qs.extends;if(u[vo]=Va?u[Va]:{},O[vo]=Va??vo,yt[vo.toUpperCase()]={},yt[vo]={},ra||(yn[vo.toUpperCase()]={},yn[vo]={}),Va&&!i[vo]&&i[Va]){const Oi=mg(i[Va]);delete Oi.removeEmptyAttrs,delete Oi.removeEmpty,i[vo]=Oi}else i[vo]={attributesOrder:[],attributes:{}};if(je(Qs.attributes)){const Oi=pu=>{xi.attributesOrder.push(pu),xi.attributes[pu]={}},xi=(Zi=i[vo])!==null&&Zi!==void 0?Zi:{};delete xi.attributesDefault,delete xi.attributesForced,delete xi.attributePatterns,delete xi.attributesRequired,xi.attributesOrder=[],xi.attributes={},Ce(Qs.attributes,pu=>{const Vf=UO(D);dh(pu).each(({preset:Qf,name:zf})=>{Qf?zf==="global"&&Ce(Vf,Oi):Oi(zf)})}),i[vo]=xi}if(tt(Qs.padEmpty)){const Oi=(qa=i[vo])!==null&&qa!==void 0?qa:{};Oi.paddEmpty=Qs.padEmpty,i[vo]=Oi}if(je(Qs.children)){const Oi={},xi=Vf=>{Oi[Vf]={}},pu=Vf=>{uh(D,Vf).each(Qf=>{Ce(Qf,xi)})};Ce(Qs.children,Vf=>{dh(Vf).each(({preset:Qf,name:zf})=>{Qf?pu(zf):xi(zf)})}),u[vo]=Oi}Va&&fn(u,(Oi,xi)=>{Oi[Va]&&(u[xi]=Oi=pg({},u[xi]),Oi[vo]=Oi[Va])})},ds=vo=>{Ce(Fb(vo??""),({name:Qs,cloneName:Zi})=>{go(Qs,{extends:Zi})})},gs=vo=>{de(vo)?fn(vo,(Qs,Zi)=>go(Zi,Qs)):te(vo)&&ds(vo)},Ys=vo=>{Ce(fh(vo??""),({operation:Qs,name:Zi,validChildren:qa})=>{const ra=Qs==="replace"?{"#comment":{}}:u[Zi],Va=xi=>{Qs==="remove"?delete ra[xi]:ra[xi]={}},Oi=xi=>{uh(D,xi).each(pu=>{Ce(pu,Va)})};Ce(qa,({preset:xi,name:pu})=>{xi?Oi(pu):Va(pu)}),u[Zi]=ra})},gr=vo=>{const Qs=i[vo];if(Qs)return Qs;let Zi=m.length;for(;Zi--;){const qa=m[Zi];if(qa.pattern.test(vo))return qa}},zi=()=>{e.valid_elements?(Fn(e.valid_elements),Ol(I,(vo,Qs)=>{u[Qs]=vo.children})):(Ol(I,(vo,Qs)=>{i[Qs]={attributes:vo.attributes,attributesOrder:vo.attributesOrder},u[Qs]=vo.children}),Ol(Fl("strong/b em/i"),vo=>{const Qs=Fl(vo,"/");i[Qs[1]].outputName=Qs[0]}),Ol(Wn,(vo,Qs)=>{i[Qs]&&(e.padd_empty_block_inline_children&&(i[Qs].paddInEmptyBlock=!0),i[Qs].removeEmpty=!0)}),Ol(Fl("ol ul blockquote a table tbody"),vo=>{i[vo]&&(i[vo].removeEmpty=!0)}),Ol(Fl("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),vo=>{i[vo]&&(i[vo].paddEmpty=!0)}),Ol(Fl("span"),vo=>{i[vo].removeEmptyAttrs=!0})),delete i.svg,gs(e.custom_elements),Ys(e.valid_children),on(e.extended_valid_elements),Ys("+ol[ul|ol],+ul[ul|ol]"),Ol({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(vo,Qs)=>{i[Qs]&&(i[Qs].parentsRequired=Fl(vo))}),e.invalid_elements&&Ol(L2(e.invalid_elements),vo=>{i[vo]&&delete i[vo]}),gr("span")||on("span[!data-mce-type|*]")},Hi=pt(G),Al=pt(ee),Tn=pt(oe),po=pt($e),qs=pt(yn),Hn=pt(tn),cn=pt(Wn),Ln=pt(Object.seal(xe)),Oo=pt(Te),pr=pt(yt),_s=pt(kt),Ql=pt(me),Lf=pt(Ht),Xg=pt(Bt),mu=pt(Object.seal(S)),Ih=(vo,Qs)=>{const Zi=u[vo.toLowerCase()];return!!(Zi&&Zi[Qs.toLowerCase()])},rf=(vo,Qs)=>{const Zi=gr(vo);if(Zi)if(Qs){if(Zi.attributes[Qs])return!0;const qa=Zi.attributePatterns;if(qa){let ra=qa.length;for(;ra--;)if(qa[ra].pattern.test(Qs))return!0}}else return!0;return!1},xc=vo=>ro(qs(),vo),gu=vo=>!ho(vo,"#")&&rf(vo)&&!xc(vo),If=vo=>ro(Xg(),vo)||gu(vo),tb=pt(O);return zi(),{type:D,children:u,elements:i,getValidStyles:Hi,getValidClasses:Tn,getBlockElements:qs,getInvalidStyles:Al,getVoidElements:Ln,getTextBlockElements:Hn,getTextInlineElements:cn,getBoolAttrs:po,getElementRule:gr,getSelfClosingElements:Oo,getNonEmptyElements:pr,getMoveCaretBeforeOnEnterElements:_s,getWhitespaceElements:Ql,getTransparentElements:Lf,getSpecialElements:mu,isValidChild:Ih,isValid:rf,isBlock:xc,isInline:gu,isWrapper:If,getCustomElements:tb,addValidElements:on,setValidElements:Fn,addCustomElements:gs,addValidChildren:Ys}},OE=e=>({value:GO(e)}),GO=e=>Bn(e,"#").toUpperCase(),Lb=e=>{const s=e.toString(16);return(s.length===1?"0"+s:s).toUpperCase()},Ss=e=>{const s=Lb(e.red)+Lb(e.green)+Lb(e.blue);return OE(s)},mo=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,pm=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,I2=(e,s,i,u)=>({red:e,green:s,blue:i,alpha:u}),YO=(e,s,i,u)=>{const m=parseInt(e,10),O=parseInt(s,10),S=parseInt(i,10),A=parseFloat(u);return I2(m,O,S,A)},V2=e=>mo.test(e)?"rgb":pm.test(e)?"rgba":"other",Q2=e=>{const s=mo.exec(e);if(s!==null)return ne.some(YO(s[1],s[2],s[3],"1"));const i=pm.exec(e);return i!==null?ne.some(YO(i[1],i[2],i[3],i[4])):ne.none()},Cr=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,Q0=e=>Q2(e).map(Ss).map(s=>"#"+s.value).getOr(e),z0=(e={},s)=>{const i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,u=/\s*([^:]+):\s*([^;]+);?/g,m=/\s+$/,O={};let S,A;const D=$0;s&&(S=s.getValidStyles(),A=s.getInvalidStyles());const I=(`\\" \\' \\; \\: ; : `+D).split(" ");for(let ee=0;ee<I.length;ee++)O[I[ee]]=D+ee,O[D+ee]=I[ee];const G={parse:ee=>{const oe={};let me=!1;const Te=e.url_converter,xe=e.url_converter_scope||G,$e=(Ht,Bt,on)=>{const Fn=oe[Ht+"-top"+Bt];if(!Fn)return;const go=oe[Ht+"-right"+Bt];if(!go)return;const ds=oe[Ht+"-bottom"+Bt];if(!ds)return;const gs=oe[Ht+"-left"+Bt];if(!gs)return;const Ys=[Fn,go,ds,gs];let gr=Ys.length-1;for(;gr--&&Ys[gr]===Ys[gr+1];);gr>-1&&on||(oe[Ht+Bt]=gr===-1?Ys[0]:Ys.join(" "),delete oe[Ht+"-top"+Bt],delete oe[Ht+"-right"+Bt],delete oe[Ht+"-bottom"+Bt],delete oe[Ht+"-left"+Bt])},et=Ht=>{const Bt=oe[Ht];if(!Bt)return;const on=Bt.indexOf(",")>-1?[Bt]:Bt.split(" ");let Fn=on.length;for(;Fn--;)if(on[Fn]!==on[0])return!1;return oe[Ht]=on[0],!0},yt=(Ht,Bt,on,Fn)=>{et(Bt)&&et(on)&&et(Fn)&&(oe[Ht]=oe[Bt]+" "+oe[on]+" "+oe[Fn],delete oe[Bt],delete oe[on],delete oe[Fn])},kt=Ht=>(me=!0,O[Ht]),Pt=(Ht,Bt)=>(me&&(Ht=Ht.replace(/\uFEFF[0-9]/g,on=>O[on])),Bt||(Ht=Ht.replace(/\\([\'\";:])/g,"$1")),Ht),tn=Ht=>String.fromCharCode(parseInt(Ht.slice(1),16)),yn=Ht=>Ht.replace(/\\[0-9a-f]+/gi,tn),Wn=(Ht,Bt,on,Fn,go,ds)=>{if(go=go||ds,go)return go=Pt(go),"'"+go.replace(/\'/g,"\\'")+"'";if(Bt=Pt(Bt||on||Fn||""),!e.allow_script_urls){const gs=Bt.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(gs)||!e.allow_svg_data_urls&&/^data:image\/svg/i.test(gs))return""}return Te&&(Bt=Te.call(xe,Bt,"style")),"url('"+Bt.replace(/\'/g,"\\'")+"')"};if(ee){ee=ee.replace(/[\u0000-\u001F]/g,""),ee=ee.replace(/\\[\"\';:\uFEFF]/g,kt).replace(/\"[^\"]+\"|\'[^\']+\'/g,Bt=>Bt.replace(/[;:]/g,kt));let Ht;for(;Ht=u.exec(ee);){u.lastIndex=Ht.index+Ht[0].length;let Bt=Ht[1].replace(m,"").toLowerCase(),on=Ht[2].replace(m,"");if(Bt&&on){if(Bt=yn(Bt),on=yn(on),Bt.indexOf(D)!==-1||Bt.indexOf('"')!==-1||!e.allow_script_urls&&(Bt==="behavior"||/expression\s*\(|\/\*|\*\//.test(on)))continue;Bt==="font-weight"&&on==="700"?on="bold":(Bt==="color"||Bt==="background-color")&&(on=on.toLowerCase()),V2(on)==="rgb"&&Q2(on).each(Fn=>{on=Q0(Cr(Fn)).toLowerCase()}),on=on.replace(i,Wn),oe[Bt]=me?Pt(on,!0):on}}$e("border","",!0),$e("border","-width"),$e("border","-color"),$e("border","-style"),$e("padding",""),$e("margin",""),yt("border","border-width","border-style","border-color"),oe.border==="medium none"&&delete oe.border,oe["border-image"]==="none"&&delete oe["border-image"]}return oe},serialize:(ee,oe)=>{let me="";const Te=($e,et)=>{const yt=et[$e];if(yt)for(let kt=0,Pt=yt.length;kt<Pt;kt++){const tn=yt[kt],yn=ee[tn];yn&&(me+=(me.length>0?" ":"")+tn+": "+yn+";")}},xe=($e,et)=>{if(!A||!et)return!0;let yt=A["*"];return yt&&yt[$e]?!1:(yt=A[et],!(yt&&yt[$e]))};return oe&&S?(Te("*",S),Te(oe,S)):fn(ee,($e,et)=>{$e&&xe(et,oe)&&(me+=(me.length>0?" ":"")+et+": "+$e+";")}),me}};return G},h5={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Zt=e=>e instanceof Event||ue(e.initEvent),z2=e=>e.isDefaultPrevented===bt||e.isDefaultPrevented===Fe,m5=e=>wt(e.preventDefault)||Zt(e),Ib=(e,s)=>{const i=s??{};for(const u in e)ro(h5,u)||(i[u]=e[u]);return Re(e.composedPath)&&(i.composedPath=()=>e.composedPath()),Re(e.getModifierState)&&(i.getModifierState=u=>e.getModifierState(u)),Re(e.getTargetRanges)&&(i.getTargetRanges=()=>e.getTargetRanges()),i},H2=(e,s,i,u)=>{var m;const O=Ib(s,u);return O.type=e,wt(O.target)&&(O.target=(m=O.srcElement)!==null&&m!==void 0?m:i),m5(s)&&(O.preventDefault=()=>{O.defaultPrevented=!0,O.isDefaultPrevented=bt,ue(s.preventDefault)&&s.preventDefault()},O.stopPropagation=()=>{O.cancelBubble=!0,O.isPropagationStopped=bt,ue(s.stopPropagation)&&s.stopPropagation()},O.stopImmediatePropagation=()=>{O.isImmediatePropagationStopped=bt,O.stopPropagation()},z2(O)||(O.isDefaultPrevented=O.defaultPrevented===!0?bt:Fe,O.isPropagationStopped=O.cancelBubble===!0?bt:Fe,O.isImmediatePropagationStopped=Fe)),O},H0="mce-data-",Z2=/^(?:mouse|contextmenu)|click/,hh=(e,s,i,u)=>{e.addEventListener(s,i,u||!1)},Z0=(e,s,i,u)=>{e.removeEventListener(s,i,u||!1)},U0=e=>Re(e)&&Z2.test(e.type),ir=(e,s)=>{const i=H2(e.type,e,document,s);if(U0(e)&&st(e.pageX)&&!st(e.clientX)){const u=i.target.ownerDocument||document,m=u.documentElement,O=u.body,S=i;S.pageX=e.clientX+(m&&m.scrollLeft||O&&O.scrollLeft||0)-(m&&m.clientLeft||O&&O.clientLeft||0),S.pageY=e.clientY+(m&&m.scrollTop||O&&O.scrollTop||0)-(m&&m.clientTop||O&&O.clientTop||0)}return i},Ru=(e,s,i)=>{const u=e.document,m={type:"ready"};if(i.domLoaded){s(m);return}const O=()=>u.readyState==="complete"||u.readyState==="interactive"&&u.body,S=()=>{Z0(e,"DOMContentLoaded",S),Z0(e,"load",S),i.domLoaded||(i.domLoaded=!0,s(m)),e=null};O()?S():hh(e,"DOMContentLoaded",S),i.domLoaded||hh(e,"load",S)};class mh{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando=H0+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(s,i,u,m){const O=this;let S;const A=window,D=oe=>{O.executeHandlers(ir(oe||A.event),I)};if(!s||Jt(s)||kf(s))return u;let I;s[O.expando]?I=s[O.expando]:(I=O.count++,s[O.expando]=I,O.events[I]={}),m=m||s;const G=i.split(" ");let ee=G.length;for(;ee--;){let oe=G[ee],me=D,Te=!1,xe=!1;if(oe==="DOMContentLoaded"&&(oe="ready"),O.domLoaded&&oe==="ready"&&s.readyState==="complete"){u.call(m,ir({type:oe}));continue}!O.hasFocusIn&&(oe==="focusin"||oe==="focusout")&&(Te=!0,xe=oe==="focusin"?"focus":"blur",me=$e=>{const et=ir($e||A.event);et.type=et.type==="focus"?"focusin":"focusout",O.executeHandlers(et,I)}),S=O.events[I][oe],S?oe==="ready"&&O.domLoaded?u(ir({type:oe})):S.push({func:u,scope:m}):(O.events[I][oe]=S=[{func:u,scope:m}],S.fakeName=xe,S.capture=Te,S.nativeHandler=me,oe==="ready"?Ru(s,me,O):hh(s,xe||oe,me,Te))}return s=S=null,u}unbind(s,i,u){if(!s||Jt(s)||kf(s))return this;const m=s[this.expando];if(m){let O=this.events[m];if(i){const S=i.split(" ");let A=S.length;for(;A--;){const D=S[A],I=O[D];if(I){if(u){let G=I.length;for(;G--;)if(I[G].func===u){const ee=I.nativeHandler,oe=I.fakeName,me=I.capture,Te=I.slice(0,G).concat(I.slice(G+1));Te.nativeHandler=ee,Te.fakeName=oe,Te.capture=me,O[D]=Te}}(!u||I.length===0)&&(delete O[D],Z0(s,I.fakeName||D,I.nativeHandler,I.capture))}}}else fn(O,(S,A)=>{Z0(s,S.fakeName||A,S.nativeHandler,S.capture)}),O={};for(const S in O)if(ro(O,S))return this;delete this.events[m];try{delete s[this.expando]}catch{s[this.expando]=null}}return this}fire(s,i,u){return this.dispatch(s,i,u)}dispatch(s,i,u){if(!s||Jt(s)||kf(s))return this;const m=ir({type:i,target:s},u);do{const O=s[this.expando];O&&this.executeHandlers(m,O),s=s.parentNode||s.ownerDocument||s.defaultView||s.parentWindow}while(s&&!m.isPropagationStopped());return this}clean(s){if(!s||Jt(s)||kf(s))return this;if(s[this.expando]&&this.unbind(s),s.getElementsByTagName||(s=s.document),s&&s.getElementsByTagName){this.unbind(s);const i=s.getElementsByTagName("*");let u=i.length;for(;u--;)s=i[u],s[this.expando]&&this.unbind(s)}return this}destroy(){this.events={}}cancel(s){return s&&(s.preventDefault(),s.stopImmediatePropagation()),!1}executeHandlers(s,i){const u=this.events[i],m=u&&u[s.type];if(m)for(let O=0,S=m.length;O<S;O++){const A=m[O];if(A&&A.func.call(A.scope,s)===!1&&s.preventDefault(),s.isImmediatePropagationStopped())return}}}mh.Event=new mh;const _f=Kt.each,xE=Kt.grep,Vb="data-mce-style",U2=Kt.makeMap("fill-opacity font-weight line-height opacity orphans widows z-index zoom"," "),W0=(e,s,i)=>{wt(i)||i===""?Gs(e,s):Gr(e,s,i)},ud=e=>e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),xp=(e,s)=>{let i=0;if(e)for(let u=e.nodeType,m=e.previousSibling;m;m=m.previousSibling){const O=m.nodeType;s&&Jt(m)&&(O===u||!m.data.length)||(i++,u=O)}return i},vE=(e,s)=>{const i=ba(s,"style"),u=e.serialize(e.parse(i),De(s));W0(s,Vb,u)},W2=(e,s)=>qt(e)?ro(U2,s)?e+"":e+"px":e,Qb=(e,s,i)=>{const u=ud(s);wt(i)||i===""?gl(e,u):dp(e,u,W2(i,u))},g5=(e,s,i)=>{const u=s.keep_values,m={set:(S,A,D)=>{const I=Ye.fromDom(S);ue(s.url_converter)&&Re(A)&&(A=s.url_converter.call(s.url_converter_scope||i(),String(A),D,S));const G="data-mce-"+D;W0(I,G,A),W0(I,D,A)},get:(S,A)=>{const D=Ye.fromDom(S);return ba(D,"data-mce-"+A)||ba(D,A)}},O={style:{set:(S,A)=>{const D=Ye.fromDom(S);u&&W0(D,Vb,A),Gs(D,"style"),te(A)&&ou(D,e.parse(A))},get:S=>{const A=Ye.fromDom(S),D=ba(A,Vb)||ba(A,"style");return e.serialize(e.parse(D),De(A))}}};return u&&(O.href=O.src=m),O},zr=(e,s={})=>{const i={},u=window,m={};let O=0;const S=!0,A=!0,D=$b.forElement(Ye.fromDom(e),{contentCssCors:s.contentCssCors,referrerPolicy:s.referrerPolicy}),I=[],G=s.schema?s.schema:gm({}),ee=z0({url_converter:s.url_converter,url_converter_scope:s.url_converter_scope},s.schema),oe=s.ownEvents?new mh:mh.Event,me=G.getBlockElements(),Te=Tt=>te(Tt)?ro(me,Tt):io(Tt)&&(ro(me,Tt.nodeName)||Du(G,Tt)),xe=Tt=>Tt&&e&&te(Tt)?e.getElementById(Tt):Tt,$e=Tt=>{const Nt=xe(Tt);return Re(Nt)?Ye.fromDom(Nt):null},et=(Tt,Nt,kn="")=>{let On;const Po=$e(Tt);if(Re(Po)&&ts(Po)){const Zs=_C[Nt];Zs&&Zs.get?On=Zs.get(Po.dom,Nt):On=ba(Po,Nt)}return Re(On)?On:kn},yt=Tt=>{const Nt=xe(Tt);return wt(Nt)?[]:Nt.attributes},kt=(Tt,Nt,kn)=>{po(Tt,On=>{if(io(On)){const Po=Ye.fromDom(On),Zs=kn===""?null:kn,Ui=ba(Po,Nt),Qh=_C[Nt];Qh&&Qh.set?Qh.set(Po.dom,Zs,Nt):W0(Po,Nt,Zs),Ui!==Zs&&s.onSetAttrib&&s.onSetAttrib({attrElm:Po.dom,attrName:Nt,attrValue:Zs})}})},Pt=(Tt,Nt)=>Tt.cloneNode(Nt),tn=()=>s.root_element||e.body,yn=Tt=>{const Nt=P0(Tt);return{x:Nt.x,y:Nt.y,w:Nt.width,h:Nt.height}},Wn=(Tt,Nt)=>Kr(e.body,xe(Tt),Nt),Ht=(Tt,Nt,kn)=>{po(Tt,On=>{const Po=Ye.fromDom(On);Qb(Po,Nt,kn),s.update_styles&&vE(ee,Po)})},Bt=(Tt,Nt)=>{po(Tt,kn=>{const On=Ye.fromDom(kn);fn(Nt,(Po,Zs)=>{Qb(On,Zs,Po)}),s.update_styles&&vE(ee,On)})},on=(Tt,Nt,kn)=>{const On=xe(Tt);if(!(wt(On)||!Id(On)&&!Pc(On)))return kn?Gl(Ye.fromDom(On),ud(Nt)):(Nt=Nt.replace(/-(\D)/g,(Po,Zs)=>Zs.toUpperCase()),Nt==="float"&&(Nt="cssFloat"),On.style?On.style[Nt]:void 0)},Fn=Tt=>{const Nt=xe(Tt);if(!Nt)return{w:0,h:0};let kn=on(Nt,"width"),On=on(Nt,"height");return(!kn||kn.indexOf("px")===-1)&&(kn="0"),(!On||On.indexOf("px")===-1)&&(On="0"),{w:parseInt(kn,10)||Nt.offsetWidth||Nt.clientWidth,h:parseInt(On,10)||Nt.offsetHeight||Nt.clientHeight}},go=Tt=>{const Nt=xe(Tt),kn=Wn(Nt),On=Fn(Nt);return{x:kn.x,y:kn.y,w:On.w,h:On.h}},ds=(Tt,Nt)=>{if(!Tt)return!1;const kn=je(Tt)?Tt:[Tt];return lt(kn,On=>hl(Ye.fromDom(On),Nt))},gs=(Tt,Nt,kn,On)=>{const Po=[];let Zs=xe(Tt);On=On===void 0;const Ui=kn||(tn().nodeName!=="BODY"?tn().parentNode:null);if(te(Nt))if(Nt==="*")Nt=io;else{const Qh=Nt;Nt=Hf=>ds(Hf,Qh)}for(;Zs&&!(Zs===Ui||wt(Zs.nodeType)||gp(Zs)||M0(Zs));){if(!Nt||Nt(Zs))if(On)Po.push(Zs);else return[Zs];Zs=Zs.parentNode}return On?Po:null},Ys=(Tt,Nt,kn)=>{const On=gs(Tt,Nt,kn,!1);return On&&On.length>0?On[0]:null},gr=(Tt,Nt,kn)=>{let On=Nt;if(Tt){te(Nt)&&(On=Po=>ds(Po,Nt));for(let Po=Tt[kn];Po;Po=Po[kn])if(ue(On)&&On(Po))return Po}return null},zi=(Tt,Nt)=>gr(Tt,Nt,"nextSibling"),Hi=(Tt,Nt)=>gr(Tt,Nt,"previousSibling"),Al=Tt=>ue(Tt.querySelectorAll),Tn=(Tt,Nt)=>{var kn,On;const Po=(On=(kn=xe(Nt))!==null&&kn!==void 0?kn:s.root_element)!==null&&On!==void 0?On:e;return Al(Po)?jo(Po.querySelectorAll(Tt)):[]},po=function(Tt,Nt,kn){const On=kn??this;if(je(Tt)){const Po=[];return _f(Tt,(Zs,Ui)=>{const Qh=xe(Zs);Qh&&Po.push(Nt.call(On,Qh,Ui))}),Po}else{const Po=xe(Tt);return Po?Nt.call(On,Po):!1}},qs=(Tt,Nt)=>{po(Tt,kn=>{fn(Nt,(On,Po)=>{kt(kn,Po,On)})})},Hn=(Tt,Nt)=>{po(Tt,kn=>{const On=Ye.fromDom(kn);Ld(On,Nt)})},cn=(Tt,Nt,kn,On,Po)=>po(Tt,Zs=>{const Ui=te(Nt)?e.createElement(Nt):Nt;return Re(kn)&&qs(Ui,kn),On&&(!te(On)&&On.nodeType?Ui.appendChild(On):te(On)&&Hn(Ui,On)),Po?Ui:Zs.appendChild(Ui)}),Ln=(Tt,Nt,kn)=>cn(e.createElement(Tt),Tt,Nt,kn,!0),Oo=bp.decode,pr=bp.encodeAllRaw,_s=(Tt,Nt,kn="")=>{let On="<"+Tt;for(const Po in Nt)er(Nt,Po)&&(On+=" "+Po+'="'+pr(Nt[Po])+'"');return ss(kn)&&ro(G.getVoidElements(),Tt)?On+" />":On+">"+kn+"</"+Tt+">"},Ql=Tt=>{const Nt=e.createElement("div"),kn=e.createDocumentFragment();kn.appendChild(Nt),Tt&&(Nt.innerHTML=Tt);let On;for(;On=Nt.firstChild;)kn.appendChild(On);return kn.removeChild(Nt),kn},Lf=(Tt,Nt)=>po(Tt,kn=>{const On=Ye.fromDom(kn);return Nt&&Ce(ya(On),Po=>{rr(Po)&&Po.dom.length===0?Or(Po):bi(On,Po)}),Or(On),On.dom}),Xg=Tt=>po(Tt,Nt=>{const kn=Nt.attributes;for(let On=kn.length-1;On>=0;On--)Nt.removeAttributeNode(kn.item(On))}),mu=Tt=>ee.parse(Tt),Ih=(Tt,Nt)=>ee.serialize(Tt,Nt),rf=Tt=>{if(a0!==zr.DOM&&e===document){if(i[Tt])return;i[Tt]=!0}let Nt=e.getElementById("mceDefaultStyles");if(!Nt){Nt=e.createElement("style"),Nt.id="mceDefaultStyles",Nt.type="text/css";const kn=e.head;kn.firstChild?kn.insertBefore(Nt,kn.firstChild):kn.appendChild(Nt)}Nt.styleSheet?Nt.styleSheet.cssText+=Tt:Nt.appendChild(e.createTextNode(Tt))},xc=Tt=>{Tt||(Tt=""),Ce(Tt.split(","),Nt=>{m[Nt]=!0,D.load(Nt).catch(St)})},gu=(Tt,Nt,kn)=>{po(Tt,On=>{if(io(On)){const Po=Ye.fromDom(On),Zs=Nt.split(" ");Ce(Zs,Ui=>{Re(kn)?(kn?_u:Jf)(Po,Ui):rp(Po,Ui)})}})},If=(Tt,Nt)=>{gu(Tt,Nt,!0)},tb=(Tt,Nt)=>{gu(Tt,Nt,!1)},vo=(Tt,Nt)=>{const kn=$e(Tt),On=Nt.split(" ");return Re(kn)&&Xo(On,Po=>tg(kn,Po))},Qs=Tt=>{po(Tt,Nt=>gl(Ye.fromDom(Nt),"display"))},Zi=Tt=>{po(Tt,Nt=>dp(Ye.fromDom(Nt),"display","none"))},qa=Tt=>{const Nt=$e(Tt);return Re(Nt)&&pa(pi(Nt,"display"),"none")},ra=Tt=>(Tt||"mce_")+O++,Va=Tt=>{const Nt=$e(Tt);return Re(Nt)?io(Nt.dom)?Nt.dom.outerHTML:T0(Nt):""},Oi=(Tt,Nt)=>{po(Tt,kn=>{io(kn)&&(kn.outerHTML=Nt)})},xi=(Tt,Nt)=>{const kn=xe(Nt);return po(Tt,On=>{const Po=kn==null?void 0:kn.parentNode,Zs=kn==null?void 0:kn.nextSibling;return Po&&(Zs?Po.insertBefore(On,Zs):Po.appendChild(On)),On})},pu=(Tt,Nt,kn)=>po(Nt,On=>{var Po;const Zs=je(Nt)?Tt.cloneNode(!0):Tt;return kn&&_f(xE(On.childNodes),Ui=>{Zs.appendChild(Ui)}),(Po=On.parentNode)===null||Po===void 0||Po.replaceChild(Zs,On),On}),Vf=(Tt,Nt)=>{if(Tt.nodeName!==Nt.toUpperCase()){const kn=Ln(Nt);return _f(yt(Tt),On=>{kt(kn,On.nodeName,et(Tt,On.nodeName))}),pu(kn,Tt,!0),kn}else return Tt},Qf=(Tt,Nt)=>{let kn=Tt;for(;kn;){let On=Nt;for(;On&&kn!==On;)On=On.parentNode;if(kn===On)break;kn=kn.parentNode}return!kn&&Tt.ownerDocument?Tt.ownerDocument.documentElement:kn},zf=(Tt,Nt,kn)=>xt(Nt)?Dc(G,Tt,{...kn,isContent:Po=>{const Zs=Po.nodeName.toLowerCase();return!!Nt[Zs]}}):Dc(G,Tt,kn),l2=()=>e.createRange(),gO=(Tt,Nt,kn)=>{let On=l2(),Po,Zs;if(Tt&&Nt&&Tt.parentNode&&Nt.parentNode){const Ui=Tt.parentNode;return On.setStart(Ui,xp(Tt)),On.setEnd(Nt.parentNode,xp(Nt)),Po=On.extractContents(),On=l2(),On.setStart(Nt.parentNode,xp(Nt)+1),On.setEnd(Ui,xp(Tt)+1),Zs=On.extractContents(),Ui.insertBefore(Qd(a0,Po,G),Tt),kn?Ui.insertBefore(kn,Tt):Ui.insertBefore(Nt,Tt),Ui.insertBefore(Qd(a0,Zs,G),Tt),Lf(Tt),kn||Nt}else return},nb=(Tt,Nt,kn,On)=>{if(je(Tt)){let Po=Tt.length;const Zs=[];for(;Po--;)Zs[Po]=nb(Tt[Po],Nt,kn,On);return Zs}else return s.collect&&(Tt===e||Tt===u)&&I.push([Tt,Nt,kn,On]),oe.bind(Tt,Nt,kn,On||a0)},Vh=(Tt,Nt,kn)=>{if(je(Tt)){let On=Tt.length;const Po=[];for(;On--;)Po[On]=Vh(Tt[On],Nt,kn);return Po}else{if(I.length>0&&(Tt===e||Tt===u)){let On=I.length;for(;On--;){const[Po,Zs,Ui]=I[On];Tt===Po&&(!Nt||Nt===Zs)&&(!kn||kn===Ui)&&oe.unbind(Po,Zs,Ui)}}return oe.unbind(Tt,Nt,kn)}},i0=(Tt,Nt,kn)=>oe.dispatch(Tt,Nt,kn),CC=(Tt,Nt,kn)=>oe.dispatch(Tt,Nt,kn),c2=Tt=>{if(Tt&&Id(Tt)){const Nt=Tt.getAttribute("data-mce-contenteditable");return Nt&&Nt!=="inherit"?Nt:Tt.contentEditable!=="inherit"?Tt.contentEditable:null}else return null},a0={doc:e,settings:s,win:u,files:m,stdMode:S,boxModel:A,styleSheetLoader:D,boundEvents:I,styles:ee,schema:G,events:oe,isBlock:Te,root:null,clone:Pt,getRoot:tn,getViewPort:yn,getRect:go,getSize:Fn,getParent:Ys,getParents:gs,get:xe,getNext:zi,getPrev:Hi,select:Tn,is:ds,add:cn,create:Ln,createHTML:_s,createFragment:Ql,remove:Lf,setStyle:Ht,getStyle:on,setStyles:Bt,removeAllAttribs:Xg,setAttrib:kt,setAttribs:qs,getAttrib:et,getPos:Wn,parseStyle:mu,serializeStyle:Ih,addStyle:rf,loadCSS:xc,addClass:If,removeClass:tb,hasClass:vo,toggleClass:gu,show:Qs,hide:Zi,isHidden:qa,uniqueId:ra,setHTML:Hn,getOuterHTML:Va,setOuterHTML:Oi,decode:Oo,encode:pr,insertAfter:xi,replace:pu,rename:Vf,findCommonAncestor:Qf,run:po,getAttribs:yt,isEmpty:zf,createRng:l2,nodeIndex:xp,split:gO,bind:nb,unbind:Vh,fire:CC,dispatch:i0,getContentEditable:c2,getContentEditableParent:Tt=>{const Nt=tn();let kn=null;for(let On=Tt;On&&On!==Nt&&(kn=c2(On),kn===null);On=On.parentNode);return kn},isEditable:Tt=>{if(Re(Tt)){const Nt=io(Tt)?Tt:Tt.parentElement;return Re(Nt)&&Id(Nt)&&nu(Ye.fromDom(Nt))}else return!1},destroy:()=>{if(I.length>0){let Tt=I.length;for(;Tt--;){const[Nt,kn,On]=I[Tt];oe.unbind(Nt,kn,On)}}fn(m,(Tt,Nt)=>{D.unload(Nt),delete m[Nt]})},isChildOf:(Tt,Nt)=>Tt===Nt||Nt.contains(Tt),dumpRng:Tt=>"startContainer: "+Tt.startContainer.nodeName+", startOffset: "+Tt.startOffset+", endContainer: "+Tt.endContainer.nodeName+", endOffset: "+Tt.endOffset},_C=g5(ee,s,pt(a0));return a0};zr.DOM=zr(document),zr.nodeIndex=xp;const X2=zr.DOM,wE=0,dd=1,hc=2,gn=3;class lu{constructor(s={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=s}_setReferrerPolicy(s){this.settings.referrerPolicy=s}loadScript(s){return new Promise((i,u)=>{const m=X2;let O;const S=()=>{m.remove(I),O&&(O.onerror=O.onload=O=null)},A=()=>{S(),i()},D=()=>{S(),u("Failed to load script: "+s)},I=m.uniqueId();O=document.createElement("script"),O.id=I,O.type="text/javascript",O.src=Kt._addCacheSuffix(s),this.settings.referrerPolicy&&m.setAttrib(O,"referrerpolicy",this.settings.referrerPolicy),O.onload=A,O.onerror=D,(document.getElementsByTagName("head")[0]||document.body).appendChild(O)})}isDone(s){return this.states[s]===hc}markDone(s){this.states[s]=hc}add(s){const i=this;return i.queue.push(s),i.states[s]===void 0&&(i.states[s]=wE),new Promise((m,O)=>{i.scriptLoadedCallbacks[s]||(i.scriptLoadedCallbacks[s]=[]),i.scriptLoadedCallbacks[s].push({resolve:m,reject:O})})}load(s){return this.add(s)}remove(s){delete this.states[s],delete this.scriptLoadedCallbacks[s]}loadQueue(){const s=this.queue;return this.queue=[],this.loadScripts(s)}loadScripts(s){const i=this,u=(D,I)=>{Ms(i.scriptLoadedCallbacks,I).each(G=>{Ce(G,ee=>ee[D](I))}),delete i.scriptLoadedCallbacks[I]},m=D=>{const I=vn(D,G=>G.status==="rejected");return I.length>0?Promise.reject(or(I,({reason:G})=>je(G)?G:[G])):Promise.resolve()},O=D=>Promise.allSettled(mt(D,I=>i.states[I]===hc?(u("resolve",I),Promise.resolve()):i.states[I]===gn?(u("reject",I),Promise.reject(I)):(i.states[I]=dd,i.loadScript(I).then(()=>{i.states[I]=hc,u("resolve",I);const G=i.queue;return G.length>0?(i.queue=[],O(G).then(m)):Promise.resolve()},()=>(i.states[I]=gn,u("reject",I),Promise.reject(I)))))),S=D=>(i.loading=!0,O(D).then(I=>{i.loading=!1;const G=i.queueLoadedCallbacks.shift();return ne.from(G).each(Ve),m(I)})),A=ka(s);return i.loading?new Promise((D,I)=>{i.queueLoadedCallbacks.push(()=>{S(A).then(D,I)})}):S(A)}}lu.ScriptLoader=new lu;const Oa=(e,s)=>{const i=e.indexOf(s);return i!==-1&&e.indexOf(s,i+1)>i},p5=e=>de(e)&&ro(e,"raw"),SE=e=>je(e)&&e.length>1,zb={},X0=kr("en"),kE=()=>Ms(zb,X0.get()),Rc={getData:()=>Go(zb,e=>({...e})),setCode:e=>{e&&X0.set(e)},getCode:()=>X0.get(),add:(e,s)=>{let i=zb[e];i||(zb[e]=i={});const u=mt(Mo(s),m=>m.toLowerCase());fn(s,(m,O)=>{const S=O.toLowerCase();S!==O&&Oa(u,S)?(ro(s,S)||(i[S]=m),i[O]=m):i[S]=m})},translate:e=>{const s=kE().getOr({}),i=S=>ue(S)?Object.prototype.toString.call(S):u(S)?"":""+S,u=S=>S===""||S===null||S===void 0,m=S=>{const A=i(S);return ro(s,A)?i(s[A]):Ms(s,A.toLowerCase()).map(i).getOr(A)},O=S=>S.replace(/{context:\w+}$/,"");if(u(e))return"";if(p5(e))return i(e.raw);if(SE(e)){const S=e.slice(1),A=m(e[0]).replace(/\{([0-9]+)\}/g,(D,I)=>ro(S,I)?i(S[I]):D);return O(A)}return O(m(e))},isRtl:()=>kE().bind(e=>Ms(e,"_dir")).exists(e=>e==="rtl"),hasCode:e=>ro(zb,e)},Ws=()=>{const e=[],s={},i={},u=[],m=(xe,$e)=>{const et=vn(u,yt=>yt.name===xe&&yt.state===$e);Ce(et,yt=>yt.resolve())},O=xe=>ro(s,xe),S=xe=>ro(i,xe),A=xe=>{if(i[xe])return i[xe].instance},D=(xe,$e)=>{const et=Rc.getCode(),yt=","+($e||"")+",";!et||$e&&yt.indexOf(","+et+",")===-1||lu.ScriptLoader.add(s[xe]+"/langs/"+et+".js")},I=(xe,$e)=>{Ws.languageLoad!==!1&&(O(xe)?D(xe,$e):Te(xe,"loaded").then(()=>D(xe,$e)))},G=(xe,$e)=>(e.push($e),i[xe]={instance:$e},m(xe,"added"),$e),ee=xe=>{delete s[xe],delete i[xe]},oe=(xe,$e)=>te($e)?te(xe)?{prefix:"",resource:$e,suffix:""}:{prefix:xe.prefix,resource:$e,suffix:xe.suffix}:$e,me=(xe,$e)=>{if(s[xe])return Promise.resolve();let et=te($e)?$e:$e.prefix+$e.resource+$e.suffix;et.indexOf("/")!==0&&et.indexOf("://")===-1&&(et=Ws.baseURL+"/"+et),s[xe]=et.substring(0,et.lastIndexOf("/"));const yt=()=>(m(xe,"loaded"),Promise.resolve());return i[xe]?yt():lu.ScriptLoader.add(et).then(yt)},Te=(xe,$e="added")=>$e==="added"&&S(xe)||$e==="loaded"&&O(xe)?Promise.resolve():new Promise(et=>{u.push({name:xe,state:$e,resolve:et})});return{items:e,urls:s,lookup:i,get:A,requireLangPack:I,add:G,remove:ee,createUrl:oe,load:me,waitFor:Te}};Ws.languageLoad=!0,Ws.baseURL="",Ws.PluginManager=Ws(),Ws.ThemeManager=Ws(),Ws.ModelManager=Ws();const Hb=(e,s)=>{let i=null;return{cancel:()=>{j(i)||(clearTimeout(i),i=null)},throttle:(...O)=>{j(i)&&(i=setTimeout(()=>{i=null,e.apply(null,O)},s))}}},Ll=(e,s)=>{let i=null;const u=()=>{j(i)||(clearTimeout(i),i=null)};return{cancel:u,throttle:(...O)=>{u(),i=setTimeout(()=>{i=null,e.apply(null,O)},s)}}},vp=(e,s,i)=>oh(e,s,i).isSome(),Bc=pt("mce-annotation"),wp=pt("data-mce-annotation"),q0=pt("data-mce-annotation-uid"),bg=pt("data-mce-annotation-active"),Sp=pt("data-mce-annotation-classes"),mc=pt("data-mce-annotation-attrs"),Zb=e=>s=>Fs(s,e),q2=(e,s)=>{const i=e.selection.getRng(),u=Ye.fromDom(i.startContainer),m=Ye.fromDom(e.getBody()),O=s.fold(()=>"."+Bc(),D=>`[${wp()}="${D}"]`),S=Md(u,i.startOffset).getOr(u);return oo(S,O,Zb(m)).bind(D=>Zr(D,`${q0()}`).bind(I=>Zr(D,`${wp()}`).map(G=>{const ee=Wb(e,I);return{uid:I,name:G,elements:ee}})))},KO=e=>ts(e)&&tg(e,Bc()),Ub=(e,s)=>Yi(e,"data-mce-bogus")||vp(e,'[data-mce-bogus="all"]',Zb(s)),Wb=(e,s)=>{const i=Ye.fromDom(e.getBody()),u=pl(i,`[${q0()}="${s}"]`);return vn(u,m=>!Ub(m,i))},Xb=(e,s)=>{const i=Ye.fromDom(e.getBody()),u=pl(i,`[${wp()}="${s}"]`),m={};return Ce(u,O=>{if(!Ub(O,i)){const S=ba(O,q0()),A=Ms(m,S).getOr([]);m[S]=A.concat([O])}}),m},JO=(e,s)=>{const i=kr({}),u=()=>({listeners:[],previous:Nc()}),m=(ee,oe)=>{O(ee,me=>(oe(me),me))},O=(ee,oe)=>{const me=i.get(),Te=Ms(me,ee).getOrThunk(u),xe=oe(Te);me[ee]=xe,i.set(me)},S=(ee,oe,me)=>{m(ee,Te=>{Ce(Te.listeners,xe=>xe(!0,ee,{uid:oe,nodes:mt(me,$e=>$e.dom)}))})},A=ee=>{m(ee,oe=>{Ce(oe.listeners,me=>me(!1,ee))})},D=(ee,oe)=>{Ce(Wb(e,ee),me=>{oe?Gr(me,bg(),"true"):Gs(me,bg())})},I=Ll(()=>{const ee=Qt(s.getNames());Ce(ee,oe=>{O(oe,me=>{const Te=me.previous.get();return q2(e,ne.some(oe)).fold(()=>{Te.each(xe=>{A(oe),me.previous.clear(),D(xe,!1)})},({uid:xe,name:$e,elements:et})=>{pa(Te,xe)||(Te.each(yt=>D(yt,!1)),S($e,xe,et),me.previous.set(xe),D(xe,!0))}),{previous:me.previous,listeners:me.listeners}})})},30);return e.on("remove",()=>{I.cancel()}),e.on("NodeChange",()=>{I.throttle()}),{addListener:(ee,oe)=>{O(ee,me=>({previous:me.previous,listeners:me.listeners.concat([oe])}))}}},_E=(e,s)=>{const i=wp(),u=O=>ne.from(O.attr(i)).bind(s.lookup),m=O=>{var S,A;O.attr(q0(),null),O.attr(wp(),null),O.attr(bg(),null);const D=ne.from(O.attr(mc())).map(oe=>oe.split(",")).getOr([]),I=ne.from(O.attr(Sp())).map(oe=>oe.split(",")).getOr([]);Ce(D,oe=>O.attr(oe,null));const G=(A=(S=O.attr("class"))===null||S===void 0?void 0:S.split(" "))!==null&&A!==void 0?A:[],ee=br(G,[Bc()].concat(I));O.attr("class",ee.length>0?ee.join(" "):null),O.attr(Sp(),null),O.attr(mc(),null)};e.serializer.addTempAttr(bg()),e.serializer.addAttributeFilter(i,O=>{for(const S of O)u(S).each(A=>{A.persistent===!1&&(S.name==="span"?S.unwrap():m(S))})})},j2=()=>{const e={};return{register:(m,O)=>{e[m]={name:m,settings:O}},lookup:m=>Ms(e,m).map(O=>O.settings),getNames:()=>Mo(e)}},qb=(e,s,i)=>Math.min(Math.max(e,s),i),ex=()=>window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295;let tx=0;const kp=e=>{const i=new Date().getTime(),u=Math.floor(ex()*1e9);return tx++,e+"_"+u+tx+String(i)},G2=(e,s)=>{Ce(s,i=>{_u(e,i)})},TE=(e,s)=>{Ce(s,i=>{Jf(e,i)})},Y2=(e,s)=>Ye.fromDom(e.dom.cloneNode(s)),gh=e=>Y2(e,!1),AE=e=>Y2(e,!0),KB=(e,s)=>{const i=Ye.fromTag(s),u=em(e);return gi(i,u),i},j0=(e,s)=>{const i=KB(e,s);Tc(e,i);const u=ya(e);return ua(i,u),Or(e),i},G0=(e,s,i=Fe)=>{const u=new Ji(e,s),m=O=>{let S;do S=u[O]();while(S&&!Jt(S)&&!i(S));return ne.from(S).filter(Jt)};return{current:()=>ne.from(u.current()).filter(Jt),next:()=>m("next"),prev:()=>m("prev"),prev2:()=>m("prev2")}},ph=(e,s)=>{const i=s||(S=>e.isBlock(S)||wr(S)||Mr(S)),u=(S,A,D,I)=>{if(Jt(S)){const G=I(S,A,S.data);if(G!==-1)return ne.some({container:S,offset:G})}return D().bind(G=>u(G.container,G.offset,D,I))};return{backwards:(S,A,D,I)=>{const G=G0(S,I??e.getRoot(),i);return u(S,A,()=>G.prev().map(ee=>({container:ee,offset:ee.length})),D).getOrNull()},forwards:(S,A,D,I)=>{const G=G0(S,I??e.getRoot(),i);return u(S,A,()=>G.next().map(ee=>({container:ee,offset:0})),D).getOrNull()}}},K2=((e,s)=>{const i=O=>{if(!e(O))throw new Error("Can only get "+s+" value of a "+s+" node");return u(O).getOr("")},u=O=>e(O)?ne.from(O.dom.nodeValue):ne.none();return{get:i,getOption:u,set:(O,S)=>{if(!e(O))throw new Error("Can only set raw "+s+" value of a "+s+" node");O.dom.nodeValue=S}}})(rr,"text"),jb=e=>K2.get(e),O5=e=>K2.getOption(e),PE=(e,s)=>K2.set(e,s),J2=["td","th"],ew=["thead","tbody","tfoot"],DE=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],Y0=["li","dd","dt"],x5=["ul","ol","dl"],nx=["pre","script","textarea","style"],yg=e=>{let s;return i=>(s=s||Bs(e,bt),ro(s,De(i)))},K0=e=>De(e)==="table",Fi=e=>ts(e)&&De(e)==="br",tw=yg(DE),Gb=yg(x5),J0=yg(Y0),eM=yg(ew),cu=yg(J2),Og=yg(nx),v5=e=>{const s=[];let i=e.dom;for(;i;)s.push(Ye.fromDom(i)),i=i.lastChild;return s},w5=e=>{const s=pl(e,"br"),i=vn(v5(e).slice(-1),Fi);s.length===i.length&&Ce(i,Or)},e1=()=>{const e=Ye.fromTag("br");return Gr(e,"data-mce-bogus","1"),e},xg=e=>{Ac(e),$r(e,e1())},nw=(e,s)=>{el(e).each(i=>{Bd(i).each(u=>{s.isBlock(De(e))&&Fi(i)&&s.isBlock(De(u))&&Or(i)})})},Ai=$0,ox=lg,uu=cg,S5=e=>e.insertContent(Ai,{preserve_zwsp:!0}),NE=io,Cp=Jt,Hd=e=>(Cp(e)&&(e=e.parentNode),NE(e)&&e.hasAttribute("data-mce-caret")),Zd=e=>Cp(e)&&ox(e.data),Kl=e=>Hd(e)||Zd(e),Yb=e=>e.firstChild!==e.lastChild||!wr(e.firstChild),$E=(e,s)=>{var i;const m=((i=e.ownerDocument)!==null&&i!==void 0?i:document).createTextNode(Ai),O=e.parentNode;if(s){const S=e.previousSibling;if(Cp(S)){if(Kl(S))return S;if(bh(S))return S.splitText(S.data.length-1)}O==null||O.insertBefore(m,e)}else{const S=e.nextSibling;if(Cp(S)){if(Kl(S))return S;if(sx(S))return S.splitText(1),S}e.nextSibling?O==null||O.insertBefore(m,e.nextSibling):O==null||O.appendChild(m)}return m},Kb=e=>{const s=e.container();return Jt(s)?s.data.charAt(e.offset())===Ai||e.isAtStart()&&Zd(s.previousSibling):!1},ow=e=>{const s=e.container();return Jt(s)?s.data.charAt(e.offset()-1)===Ai||e.isAtEnd()&&Zd(s.nextSibling):!1},k5=(e,s,i)=>{var u;const O=((u=s.ownerDocument)!==null&&u!==void 0?u:document).createElement(e);O.setAttribute("data-mce-caret",i?"before":"after"),O.setAttribute("data-mce-bogus","all"),O.appendChild(e1().dom);const S=s.parentNode;return i?S==null||S.insertBefore(O,s):s.nextSibling?S==null||S.insertBefore(O,s.nextSibling):S==null||S.appendChild(O),O},sx=e=>Cp(e)&&e.data[0]===Ai,bh=e=>Cp(e)&&e.data[e.data.length-1]===Ai,C5=e=>{var s;const i=e.getElementsByTagName("br"),u=i[i.length-1];cm(u)&&((s=u.parentNode)===null||s===void 0||s.removeChild(u))},rx=e=>e&&e.hasAttribute("data-mce-caret")?(C5(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("data-mce-style"),e.removeAttribute("_moz_abspos"),e):null,ix=e=>Hd(e.startContainer),Ep=Math.round,_p=e=>e?{left:Ep(e.left),top:Ep(e.top),bottom:Ep(e.bottom),right:Ep(e.right),width:Ep(e.width),height:Ep(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},sw=(e,s)=>(e=_p(e),s||(e.left=e.left+e.width),e.right=e.left,e.width=0,e),Jb=(e,s)=>e.left===s.left&&e.top===s.top&&e.bottom===s.bottom&&e.right===s.right,vg=(e,s,i)=>e>=0&&e<=Math.min(s.height,i.height)/2,bm=(e,s)=>{const i=Math.min(s.height/2,e.height/2);return e.bottom-i<s.top?!0:e.top>s.bottom?!1:vg(s.top-e.bottom,e,s)},Es=(e,s)=>e.top>s.bottom?!0:e.bottom<s.top?!1:vg(s.bottom-e.top,e,s),Mc=(e,s,i)=>s>=e.left&&s<=e.right&&i>=e.top&&i<=e.bottom,Tp=e=>No(e,(s,i)=>s.fold(()=>ne.some(i),u=>{const m=Math.min(i.left,u.left),O=Math.min(i.top,u.top),S=Math.max(i.right,u.right),A=Math.max(i.bottom,u.bottom);return ne.some({top:O,right:S,bottom:A,left:m,width:S-m,height:A-O})}),ne.none()),ax=(e,s,i)=>{const u=Math.max(Math.min(s,e.left+e.width),e.left),m=Math.max(Math.min(i,e.top+e.height),e.top);return Math.sqrt((s-u)*(s-u)+(i-m)*(i-m))},Xr=(e,s)=>Math.max(0,Math.min(e.bottom,s.bottom)-Math.max(e.top,s.top)),ey=e=>{const s=e.startContainer,i=e.startOffset;return s===e.endContainer&&s.hasChildNodes()&&e.endOffset===i+1?s.childNodes[i]:null},yh=(e,s)=>{if(io(e)&&e.hasChildNodes()){const i=e.childNodes,u=qb(s,0,i.length-1);return i[u]}else return e},E5=(e,s)=>{if(!(s<0&&io(e)&&e.hasChildNodes()))return yh(e,s)},tM=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),rw=e=>te(e)&&e.charCodeAt(0)>=768&&tM.test(e),qr=(...e)=>s=>{for(let i=0;i<e.length;i++)if(e[i](s))return!0;return!1},_5=(...e)=>s=>{for(let i=0;i<e.length;i++)if(!e[i](s))return!1;return!0},iw=bl,aw=Mr,Ap=wr,Ud=Jt,RE=nl(["script","style","textarea"]),lw=nl(["img","input","textarea","hr","iframe","video","audio","object","embed"]),zn=nl(["table"]),nM=Kl,gc=e=>nM(e)?!1:Ud(e)?!RE(e.parentNode):lw(e)||Ap(e)||zn(e)||ym(e),oM=e=>io(e)&&e.getAttribute("unselectable")==="true",ym=e=>!oM(e)&&aw(e),T5=(e,s)=>{for(let i=e.parentNode;i&&i!==s;i=i.parentNode){if(ym(i))return!1;if(iw(i))return!0}return!0},cw=e=>ym(e)?!No(jo(e.getElementsByTagName("*")),(s,i)=>s||iw(i),!1):!1,ty=e=>lw(e)||cw(e),Pp=(e,s)=>gc(e)&&T5(e,s),BE=io,lx=gc,ME=ih("display","block table"),cx=ih("float","left right"),wg=_5(BE,lx,Oe(cx)),FE=Oe(ih("white-space","pre pre-line pre-wrap")),Dp=Jt,t1=wr,LE=zr.nodeIndex,Om=E5,ux=e=>e?e.createRange():zr.DOM.createRng(),ny=e=>te(e)&&/[\r\n\t ]/.test(e),uw=e=>!!e.setStart&&!!e.setEnd,dw=e=>{const s=e.startContainer,i=e.startOffset;if(ny(e.toString())&&FE(s.parentNode)&&Jt(s)){const u=s.data;if(ny(u[i-1])||ny(u[i+1]))return!0}return!1},A5=e=>{const s=e.ownerDocument,i=ux(s),u=s.createTextNode(ea),m=e.parentNode;m.insertBefore(u,e),i.setStart(u,0),i.setEnd(u,1);const O=_p(i.getBoundingClientRect());return m.removeChild(u),O},P5=e=>{const s=e.startContainer,i=e.endContainer,u=e.startOffset,m=e.endOffset;if(s===i&&Jt(i)&&u===0&&m===1){const O=e.cloneRange();return O.setEndAfter(i),xm(O)}else return null},fw=e=>e.left===0&&e.right===0&&e.top===0&&e.bottom===0,xm=e=>{var s;let i;const u=e.getClientRects();return u.length>0?i=_p(u[0]):i=_p(e.getBoundingClientRect()),!uw(e)&&t1(e)&&fw(i)?A5(e):fw(i)&&uw(e)&&(s=P5(e))!==null&&s!==void 0?s:i},sl=(e,s)=>{const i=sw(e,s);return i.width=1,i.right=i.left+1,i},D5=e=>{const s=[],i=S=>{S.height!==0&&(s.length>0&&Jb(S,s[s.length-1])||s.push(S))},u=(S,A)=>{const D=ux(S.ownerDocument);if(A<S.data.length){if(rw(S.data[A]))return;if(rw(S.data[A-1])&&(D.setStart(S,A),D.setEnd(S,A+1),!dw(D))){i(sl(xm(D),!1));return}}A>0&&(D.setStart(S,A-1),D.setEnd(S,A),dw(D)||i(sl(xm(D),!1))),A<S.data.length&&(D.setStart(S,A),D.setEnd(S,A+1),dw(D)||i(sl(xm(D),!0)))},m=e.container(),O=e.offset();if(Dp(m))return u(m,O),s;if(BE(m))if(e.isAtEnd()){const S=Om(m,O);Dp(S)&&u(S,S.data.length),wg(S)&&!t1(S)&&i(sl(xm(S),!1))}else{const S=Om(m,O);if(Dp(S)&&u(S,0),wg(S)&&e.isAtEnd())return i(sl(xm(S),!1)),s;const A=Om(e.container(),e.offset()-1);wg(A)&&!t1(A)&&(ME(A)||ME(S)||!wg(S))&&i(sl(xm(A),!1)),wg(S)&&i(sl(xm(S),!0))}return s},Vt=(e,s,i)=>{const u=()=>(Dp(e),s===0),m=()=>Dp(e)?s>=e.data.length:s>=e.childNodes.length,O=()=>{const G=ux(e.ownerDocument);return G.setStart(e,s),G.setEnd(e,s),G},S=()=>(i||(i=D5(Vt(e,s))),i),A=()=>S().length>0,D=G=>G&&e===G.container()&&s===G.offset(),I=G=>Om(e,G?s-1:s);return{container:pt(e),offset:pt(s),toRange:O,getClientRects:S,isVisible:A,isAtStart:u,isAtEnd:m,isEqual:D,getNode:I}};Vt.fromRangeStart=e=>Vt(e.startContainer,e.startOffset),Vt.fromRangeEnd=e=>Vt(e.endContainer,e.endOffset),Vt.after=e=>Vt(e.parentNode,LE(e)+1),Vt.before=e=>Vt(e.parentNode,LE(e)),Vt.isAbove=(e,s)=>Vr(Cn(s.getClientRects()),Rn(e.getClientRects()),bm).getOr(!1),Vt.isBelow=(e,s)=>Vr(Rn(s.getClientRects()),Cn(e.getClientRects()),Es).getOr(!1),Vt.isAtStart=e=>e?e.isAtStart():!1,Vt.isAtEnd=e=>e?e.isAtEnd():!1,Vt.isTextPosition=e=>e?Jt(e.container()):!1,Vt.isElementPosition=e=>!Vt.isTextPosition(e);const dx=(e,s)=>{Jt(s)&&s.data.length===0&&e.remove(s)},N5=(e,s,i)=>{s.insertNode(i),dx(e,i.previousSibling),dx(e,i.nextSibling)},hw=(e,s,i)=>{const u=ne.from(i.firstChild),m=ne.from(i.lastChild);s.insertNode(i),u.each(O=>dx(e,O.previousSibling)),m.each(O=>dx(e,O.nextSibling))},oy=(e,s,i)=>{M0(i)?hw(e,s,i):N5(e,s,i)},Tf=Jt,Sg=cm,IE=zr.nodeIndex,mw=e=>{const s=e.parentNode;return Sg(s)?mw(s):s},fx=e=>e?ce(e.childNodes,(s,i)=>(Sg(i)&&i.nodeName!=="BR"?s=s.concat(fx(i)):s.push(i),s),[]):[],hx=(e,s)=>{let i=e;for(;(i=i.previousSibling)&&Tf(i);)s+=i.data.length;return s},VE=e=>s=>e===s,vm=e=>{let s,i;s=fx(mw(e)),i=fe(s,VE(e),e),s=s.slice(0,i+1);const u=ce(s,(m,O,S)=>(Tf(O)&&Tf(s[S-1])&&m++,m),0);return s=Je(s,nl([e.nodeName])),i=fe(s,VE(e),e),i-u},Na=e=>(Tf(e)?"text()":e.nodeName.toLowerCase())+"["+vm(e)+"]",mx=(e,s,i)=>{const u=[];for(let m=s.parentNode;m&&m!==e;m=m.parentNode)u.push(m);return u},gw=(e,s)=>{let i=[],u=s.container(),m=s.offset(),O;if(Tf(u))O=hx(u,m);else{const A=u.childNodes;m>=A.length?(O="after",m=A.length-1):O="before",u=A[m]}i.push(Na(u));let S=mx(e,u);return S=Je(S,Oe(cm)),i=i.concat(Ze(S,A=>Na(A))),i.reverse().join("/")+","+O},QE=(e,s,i)=>{let u=fx(e);return u=Je(u,(m,O)=>!Tf(m)||!Tf(u[O-1])),u=Je(u,nl([s])),u[i]},zE=(e,s)=>{let i=e,u=0;for(;Tf(i);){const m=i.data.length;if(s>=u&&s<=u+m){e=i,s=s-u;break}if(!Tf(i.nextSibling)){e=i,s=m;break}u+=m,i=i.nextSibling}return Tf(e)&&s>e.data.length&&(s=e.data.length),Vt(e,s)},HE=(e,s)=>{if(!s)return null;const i=s.split(","),u=i[0].split("/"),m=i.length>1?i[1]:"before",O=ce(u,(S,A)=>{const D=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(A);return D?(D[1]==="text()"&&(D[1]="#text"),QE(S,D[1],parseInt(D[2],10))):null},e);if(!O)return null;if(!Tf(O)&&O.parentNode){let S;return m==="after"?S=IE(O)+1:S=IE(O),Vt(O.parentNode,S)}return zE(O,parseInt(m,10))},gx=Mr,ZE=(e,s,i)=>{let u=e(s.data.slice(0,i)).length;for(let m=s.previousSibling;m&&Jt(m);m=m.previousSibling)u+=e(m.data).length;return u},UE=(e,s,i,u,m)=>{const O=m?u.startContainer:u.endContainer;let S=m?u.startOffset:u.endOffset;const A=[],D=e.getRoot();if(Jt(O))A.push(i?ZE(s,O,S):S);else{let I=0;const G=O.childNodes;S>=G.length&&G.length&&(I=1,S=Math.max(0,G.length-1)),A.push(e.nodeIndex(G[S],i)+I)}for(let I=O;I&&I!==D;I=I.parentNode)A.push(e.nodeIndex(I,i));return A},$5=(e,s,i,u)=>{const m=s.dom,O=UE(m,e,i,u,!0),S=s.isForward(),A=ix(u)?{isFakeCaret:!0}:{};if(s.isCollapsed())return{start:O,forward:S,...A};{const D=UE(m,e,i,u,!1);return{start:O,end:D,forward:S,...A}}},sy=(e,s,i)=>{let u=0;return Kt.each(e.select(s),m=>{if(m.getAttribute("data-mce-bogus")!=="all"){if(m===i)return!1;u++;return}}),u},WE=(e,s)=>{let i=s?e.startContainer:e.endContainer,u=s?e.startOffset:e.endOffset;if(io(i)&&i.nodeName==="TR"){const m=i.childNodes;i=m[Math.min(s?u:u-1,m.length-1)],i&&(u=s?0:i.childNodes.length,s?e.setStart(i,u):e.setEnd(i,u))}},XE=e=>(WE(e,!0),WE(e,!1),e),qE=(e,s)=>{if(io(e)&&(e=yh(e,s),gx(e)))return e;if(Kl(e)){Jt(e)&&Hd(e)&&(e=e.parentNode);let i=e.previousSibling;if(gx(i)||(i=e.nextSibling,gx(i)))return i}},R5=e=>qE(e.startContainer,e.startOffset)||qE(e.endContainer,e.endOffset),jE=(e,s,i)=>{const u=i.getNode(),m=i.getRng();if(u.nodeName==="IMG"||gx(u)){const S=u.nodeName;return{name:S,index:sy(i.dom,S,u)}}const O=R5(m);if(O){const S=O.tagName;return{name:S,index:sy(i.dom,S,O)}}return $5(e,i,s,m)},B5=e=>{const s=e.getRng();return{start:gw(e.dom.getRoot(),Vt.fromRangeStart(s)),end:gw(e.dom.getRoot(),Vt.fromRangeEnd(s)),forward:e.isForward()}},M5=e=>({rng:e.getRng(),forward:e.isForward()}),GE=(e,s,i)=>{const u={"data-mce-type":"bookmark",id:s,style:"overflow:hidden;line-height:0px"};return i?e.create("span",u,"&#xFEFF;"):e.create("span",u)},ry=(e,s)=>{const i=e.dom;let u=e.getRng();const m=i.uniqueId(),O=e.isCollapsed(),S=e.getNode(),A=S.nodeName,D=e.isForward();if(A==="IMG")return{name:A,index:sy(i,A,S)};const I=XE(u.cloneRange());if(!O){I.collapse(!1);const ee=GE(i,m+"_end",s);oy(i,I,ee)}u=XE(u),u.collapse(!0);const G=GE(i,m+"_start",s);return oy(i,u,G),e.moveToBookmark({id:m,keep:!0,forward:D}),{id:m,forward:D}},F5=(e,s,i=!1)=>s===2?jE(uu,i,e):s===3?B5(e):s?M5(e):ry(e,!1),Rr=Ne(jE,Wt,!0),pw=e=>{const s=O=>O(e),i=pt(e),u=()=>m,m={tag:!0,inner:e,fold:(O,S)=>S(e),isValue:bt,isError:Fe,map:O=>Jl.value(O(e)),mapError:u,bind:s,exists:s,forall:s,getOr:i,or:u,getOrThunk:i,orThunk:u,getOrDie:i,each:O=>{O(e)},toOptional:()=>ne.some(e)};return m},YE=e=>{const s=()=>i,i={tag:!1,inner:e,fold:(u,m)=>u(e),isValue:Fe,isError:bt,map:s,mapError:u=>Jl.error(u(e)),bind:s,exists:Fe,forall:bt,getOr:Wt,or:Wt,getOrThunk:_e,orThunk:_e,getOrDie:it(String(e)),each:St,toOptional:ne.none};return i},Jl={value:pw,error:YE,fromOption:(e,s)=>e.fold(()=>YE(s),pw)},fa={generate:e=>{if(!je(e))throw new Error("cases must be an array");if(e.length===0)throw new Error("there must be at least one case");const s=[],i={};return Ce(e,(u,m)=>{const O=Mo(u);if(O.length!==1)throw new Error("one and only one name per case");const S=O[0],A=u[S];if(i[S]!==void 0)throw new Error("duplicate key detected:"+S);if(S==="cata")throw new Error("cannot have a case named cata (sorry)");if(!je(A))throw new Error("case arguments must be an array");s.push(S),i[S]=(...D)=>{const I=D.length;if(I!==A.length)throw new Error("Wrong number of arguments to case "+S+". Expected "+A.length+" ("+A+"), got "+I);return{fold:(...ee)=>{if(ee.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+ee.length);return ee[m].apply(null,D)},match:ee=>{const oe=Mo(ee);if(s.length!==oe.length)throw new Error("Wrong number of arguments to match. Expected: "+s.join(",")+`
3
3
  Actual: `+oe.join(","));if(!Xo(s,Te=>He(oe,Te)))throw new Error("Not all branches were specified when using match. Specified: "+oe.join(", ")+`
4
4
  Required: `+s.join(", "));return ee[S].apply(null,D)},log:ee=>{console.log(ee,{constructors:s,constructor:S,params:D})}}}}),i}};fa.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const px=e=>{const s=[],i=[];return Ce(e,u=>{u.fold(m=>{s.push(m)},m=>{i.push(m)})}),{errors:s,values:i}},n1=e=>e.type==="inline-command"||e.type==="inline-format",KE=e=>e.type==="block-command"||e.type==="block-format",bw=(e,s)=>(e.type==="block-command"||e.type==="block-format")&&e.trigger===s,JE=e=>{var s;const i=m=>Jl.error({message:m,pattern:e}),u=(m,O,S)=>{if(e.format!==void 0){let A;if(je(e.format)){if(!Xo(e.format,te))return i(m+" pattern has non-string items in the `format` array");A=e.format}else if(te(e.format))A=[e.format];else return i(m+" pattern has non-string `format` parameter");return Jl.value(O(A))}else return e.cmd!==void 0?te(e.cmd)?Jl.value(S(e.cmd,e.value)):i(m+" pattern has non-string `cmd` parameter"):i(m+" pattern is missing both `format` and `cmd` parameters")};if(!de(e))return i("Raw pattern is not an object");if(!te(e.start))return i("Raw pattern is missing `start` parameter");if(e.end!==void 0){if(!te(e.end))return i("Inline pattern has non-string `end` parameter");if(e.start.length===0&&e.end.length===0)return i("Inline pattern has empty `start` and `end` parameters");let m=e.start,O=e.end;return O.length===0&&(O=m,m=""),u("Inline",S=>({type:"inline-format",start:m,end:O,format:S}),(S,A)=>({type:"inline-command",start:m,end:O,cmd:S,value:A}))}else{if(e.replacement!==void 0)return te(e.replacement)?e.start.length===0?i("Replacement pattern has empty `start` parameter"):Jl.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement}):i("Replacement pattern has non-string `replacement` parameter");{const m=(s=e.trigger)!==null&&s!==void 0?s:"space";return e.start.length===0?i("Block pattern has empty `start` parameter"):u("Block",O=>({type:"block-format",start:e.start,format:O[0],trigger:m}),(O,S)=>({type:"block-command",start:e.start,cmd:O,value:S,trigger:m}))}}},kg=e=>vn(e,KE),Za=e=>vn(e,n1),Oh=(e,s)=>({inlinePatterns:Za(e),blockPatterns:kg(e),dynamicPatternsLookup:s}),o1=(e,s)=>({...e,blockPatterns:vn(e.blockPatterns,i=>bw(i,s))}),e_=e=>{const s=px(mt(e,JE));return Ce(s.errors,i=>console.error(i.message,i.pattern)),s.values},L5=e=>s=>{const i=e(s);return e_(i)},bx=(e,s)=>e.dispatch("PreProcess",s),yw=(e,s)=>e.dispatch("PostProcess",s),Ow=e=>{e.dispatch("remove")},xw=e=>{e.dispatch("detach")},t_=(e,s)=>{e.dispatch("SwitchMode",{mode:s})},n_=(e,s,i,u,m)=>{e.dispatch("ObjectResizeStart",{target:s,width:i,height:u,origin:m})},o_=(e,s,i,u,m)=>{e.dispatch("ObjectResized",{target:s,width:i,height:u,origin:m})},s_=e=>{e.dispatch("PreInit")},I5=e=>{e.dispatch("PostRender")},xl=e=>{e.dispatch("Init")},V5=(e,s)=>{e.dispatch("PlaceholderToggle",{state:s})},wm=(e,s,i)=>{e.dispatch(s,i)},vw=(e,s,i,u)=>{e.dispatch("FormatApply",{format:s,node:i,vars:u})},ww=(e,s,i,u)=>{e.dispatch("FormatRemove",{format:s,node:i,vars:u})},r_=(e,s)=>e.dispatch("BeforeSetContent",s),yx=(e,s)=>e.dispatch("SetContent",s),Sw=(e,s)=>e.dispatch("BeforeGetContent",s),kw=(e,s)=>e.dispatch("GetContent",s),Q5=(e,s)=>{e.dispatch("AutocompleterStart",s)},z5=(e,s)=>{e.dispatch("AutocompleterUpdate",s)},na=(e,s)=>{e.dispatch("AutocompleterUpdateActiveRange",s)},ha=e=>{e.dispatch("AutocompleterEnd")},rl=(e,s,i)=>e.dispatch("PastePreProcess",{content:s,internal:i}),oa=(e,s,i)=>e.dispatch("PastePostProcess",{node:s,internal:i}),$a=(e,s)=>e.dispatch("PastePlainTextToggle",{state:s}),xa=(e,s)=>e.dispatch("EditableRootStateChange",{state:s}),Cw=(e,s)=>e.dispatch("DisabledStateChange",{state:s}),iy=ji().deviceType,ay=iy.isTouch(),Ua=zr.DOM,i_=e=>{const s=e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(",");return No(s,(i,u)=>{const m=u.split("="),O=m[0],S=m.length>1?m[1]:O;return i[Is(O)]=Is(S),i},{})},Ox=e=>Se(e,RegExp),qn=e=>s=>s.options.get(e),Np=e=>te(e)||de(e),Ew=(e,s="")=>i=>{const u=te(i);if(u)if(i.indexOf("=")!==-1){const m=i_(i);return{value:Ms(m,e.id).getOr(s),valid:u}}else return{value:i,valid:u};else return{valid:!1,message:"Must be a string."}},rM=e=>{const s=e.options.register;s("id",{processor:"string",default:e.id}),s("selector",{processor:"string"}),s("target",{processor:"object"}),s("suffix",{processor:"string"}),s("cache_suffix",{processor:"string"}),s("base_url",{processor:"string"}),s("referrer_policy",{processor:"string",default:""}),s("language_load",{processor:"boolean",default:!0}),s("inline",{processor:"boolean",default:!1}),s("iframe_attrs",{processor:"object",default:{}}),s("doctype",{processor:"string",default:"<!DOCTYPE html>"}),s("document_base_url",{processor:"string",default:e.documentBaseUrl}),s("body_id",{processor:Ew(e,"tinymce"),default:"tinymce"}),s("body_class",{processor:Ew(e),default:""}),s("content_security_policy",{processor:"string",default:""}),s("br_in_pre",{processor:"boolean",default:!0}),s("forced_root_block",{processor:i=>{const u=te(i)&&Ho(i);return u?{value:i,valid:u}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),s("forced_root_block_attrs",{processor:"object",default:{}}),s("newline_behavior",{processor:i=>{const u=He(["block","linebreak","invert","default"],i);return u?{value:i,valid:u}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),s("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),s("no_newline_selector",{processor:"string",default:""}),s("keep_styles",{processor:"boolean",default:!0}),s("end_container_on_empty_block",{processor:i=>tt(i)?{valid:!0,value:i}:te(i)?{valid:!0,value:i}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),s("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),s("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),s("font_size_classes",{processor:"string",default:""}),s("automatic_uploads",{processor:"boolean",default:!0}),s("images_reuse_filename",{processor:"boolean",default:!1}),s("images_replace_blob_uris",{processor:"boolean",default:!0}),s("icons",{processor:"string",default:""}),s("icons_url",{processor:"string",default:""}),s("images_upload_url",{processor:"string",default:""}),s("images_upload_base_path",{processor:"string",default:""}),s("images_upload_credentials",{processor:"boolean",default:!1}),s("images_upload_handler",{processor:"function"}),s("language",{processor:"string",default:"en"}),s("language_url",{processor:"string",default:""}),s("entity_encoding",{processor:"string",default:"named"}),s("indent",{processor:"boolean",default:!0}),s("indent_before",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),s("indent_after",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),s("indent_use_margin",{processor:"boolean",default:!1}),s("indentation",{processor:"string",default:"40px"}),s("content_css",{processor:i=>{const u=i===!1||te(i)||vt(i,te);return u?te(i)?{value:mt(i.split(","),Is),valid:u}:je(i)?{value:i,valid:u}:i===!1?{value:[],valid:u}:{value:i,valid:u}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:dy(e)?[]:["default"]}),s("content_style",{processor:"string"}),s("content_css_cors",{processor:"boolean",default:!1}),s("font_css",{processor:i=>{const u=te(i)||vt(i,te);return u?{value:je(i)?i:mt(i.split(","),Is),valid:u}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),s("extended_mathml_attributes",{processor:"string[]"}),s("extended_mathml_elements",{processor:"string[]"}),s("inline_boundaries",{processor:"boolean",default:!0}),s("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),s("object_resizing",{processor:i=>{const u=tt(i)||te(i);return u?i===!1||iy.isiPhone()||iy.isiPad()?{value:"",valid:u}:{value:i===!0?"table,img,figure.image,div,video,iframe":i,valid:u}:{valid:!1,message:"Must be boolean or a string"}},default:!ay}),s("resize_img_proportional",{processor:"boolean",default:!0}),s("event_root",{processor:"string"}),s("service_message",{processor:"string"}),s("onboarding",{processor:"boolean",default:!0}),s("tiny_cloud_entry_url",{processor:"string"}),s("theme",{processor:i=>i===!1||te(i)||ue(i),default:"silver"}),s("theme_url",{processor:"string"}),s("formats",{processor:"object"}),s("format_empty_lines",{processor:"boolean",default:!1}),s("format_noneditable_selector",{processor:"string",default:""}),s("preview_styles",{processor:i=>{const u=i===!1||te(i);return u?{value:i===!1?"":i,valid:u}:{valid:!1,message:"Must be false or a string"}},default:"font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"}),s("custom_ui_selector",{processor:"string",default:""}),s("hidden_input",{processor:"boolean",default:!0}),s("submit_patch",{processor:"boolean",default:!0}),s("encoding",{processor:"string"}),s("add_form_submit_trigger",{processor:"boolean",default:!0}),s("add_unload_trigger",{processor:"boolean",default:!0}),s("custom_undo_redo_levels",{processor:"number",default:0}),s("disable_nodechange",{processor:"boolean",default:!1}),s("disabled",{processor:i=>tt(i)?(e.initialized&&_g(e)!==i&&Promise.resolve().then(()=>{Cw(e,i)}),{valid:!0,value:i}):{valid:!1,message:"The value must be a boolean."},default:!1}),s("readonly",{processor:"boolean",default:!1}),s("editable_root",{processor:"boolean",default:!0}),s("plugins",{processor:"string[]",default:[]}),s("external_plugins",{processor:"object"}),s("forced_plugins",{processor:"string[]"}),s("model",{processor:"string",default:e.hasPlugin("rtc")?"plugin":"dom"}),s("model_url",{processor:"string"}),s("block_unsupported_drop",{processor:"boolean",default:!0}),s("visual",{processor:"boolean",default:!0}),s("visual_table_class",{processor:"string",default:"mce-item-table"}),s("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),s("iframe_aria_text",{processor:"string",default:"Rich Text Area".concat(e.hasPlugin("help")?". Press ALT-0 for help.":"")}),s("setup",{processor:"function"}),s("init_instance_callback",{processor:"function"}),s("url_converter",{processor:"function",default:e.convertURL}),s("url_converter_scope",{processor:"object",default:e}),s("urlconverter_callback",{processor:"function"}),s("allow_conditional_comments",{processor:"boolean",default:!1}),s("allow_html_data_urls",{processor:"boolean",default:!1}),s("allow_svg_data_urls",{processor:"boolean"}),s("allow_html_in_named_anchor",{processor:"boolean",default:!1}),s("allow_script_urls",{processor:"boolean",default:!1}),s("allow_unsafe_link_target",{processor:"boolean",default:!1}),s("allow_mathml_annotation_encodings",{processor:i=>{const u=vt(i,te);return u?{value:i,valid:u}:{valid:!1,message:"Must be an array of strings."}},default:[]}),s("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),s("fix_list_elements",{processor:"boolean",default:!1}),s("preserve_cdata",{processor:"boolean",default:!1}),s("remove_trailing_brs",{processor:"boolean",default:!0}),s("pad_empty_with_br",{processor:"boolean",default:!1}),s("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),s("element_format",{processor:"string",default:"html"}),s("entities",{processor:"string"}),s("schema",{processor:"string",default:"html5"}),s("convert_urls",{processor:"boolean",default:!0}),s("relative_urls",{processor:"boolean",default:!0}),s("remove_script_host",{processor:"boolean",default:!0}),s("custom_elements",{processor:Np}),s("extended_valid_elements",{processor:"string"}),s("invalid_elements",{processor:"string"}),s("invalid_styles",{processor:Np}),s("valid_children",{processor:"string"}),s("valid_classes",{processor:Np}),s("valid_elements",{processor:"string"}),s("valid_styles",{processor:Np}),s("verify_html",{processor:"boolean",default:!0}),s("auto_focus",{processor:i=>te(i)||i===!0}),s("browser_spellcheck",{processor:"boolean",default:!1}),s("protect",{processor:"array"}),s("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),s("deprecation_warnings",{processor:"boolean",default:!0}),s("a11y_advanced_options",{processor:"boolean",default:!1}),s("api_key",{processor:"string"}),s("license_key",{processor:"string"}),s("paste_block_drop",{processor:"boolean",default:!1}),s("paste_data_images",{processor:"boolean",default:!0}),s("paste_preprocess",{processor:"function"}),s("paste_postprocess",{processor:"function"}),s("paste_webkit_styles",{processor:"string",default:"none"}),s("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),s("paste_merge_formats",{processor:"boolean",default:!0}),s("smart_paste",{processor:"boolean",default:!0}),s("paste_as_text",{processor:"boolean",default:!1}),s("paste_tab_spaces",{processor:"number",default:4}),s("text_patterns",{processor:i=>vt(i,de)||i===!1?{value:e_(i===!1?[]:i),valid:!0}:{valid:!1,message:"Must be an array of objects or false."},default:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1",trigger:"space"},{start:"##",format:"h2",trigger:"space"},{start:"###",format:"h3",trigger:"space"},{start:"####",format:"h4",trigger:"space"},{start:"#####",format:"h5",trigger:"space"},{start:"######",format:"h6",trigger:"space"},{start:"1.",cmd:"InsertOrderedList",trigger:"space"},{start:"*",cmd:"InsertUnorderedList",trigger:"space"},{start:"-",cmd:"InsertUnorderedList",trigger:"space"},{start:">",cmd:"mceBlockQuote",trigger:"space"},{start:"---",cmd:"InsertHorizontalRule",trigger:"space"}]}),s("text_patterns_lookup",{processor:i=>ue(i)?{value:L5(i),valid:!0}:{valid:!1,message:"Must be a single function"},default:i=>[]}),s("noneditable_class",{processor:"string",default:"mceNonEditable"}),s("editable_class",{processor:"string",default:"mceEditable"}),s("noneditable_regexp",{processor:i=>vt(i,Ox)?{value:i,valid:!0}:Ox(i)?{value:[i],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),s("table_tab_navigation",{processor:"boolean",default:!0}),s("highlight_on_focus",{processor:"boolean",default:!0}),s("xss_sanitization",{processor:"boolean",default:!0}),s("details_initial_state",{processor:i=>{const u=He(["inherited","collapsed","expanded"],i);return u?{value:i,valid:u}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),s("details_serialized_state",{processor:i=>{const u=He(["inherited","collapsed","expanded"],i);return u?{value:i,valid:u}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),s("init_content_sync",{processor:"boolean",default:!1}),s("newdocument_content",{processor:"string",default:""}),s("sandbox_iframes",{processor:"boolean",default:!0}),s("sandbox_iframes_exclusions",{processor:"string[]",default:["youtube.com","youtu.be","vimeo.com","player.vimeo.com","dailymotion.com","embed.music.apple.com","open.spotify.com","giphy.com","dai.ly","codepen.io"]}),s("convert_unsafe_embeds",{processor:"boolean",default:!0}),e.on("ScriptsLoaded",()=>{s("directionality",{processor:"string",default:Rc.isRtl()?"rtl":void 0}),s("placeholder",{processor:"string",default:Ua.getAttrib(e.getElement(),"placeholder")})})},H5=qn("iframe_attrs"),Z5=qn("doctype"),Fc=qn("document_base_url"),xx=qn("body_id"),a_=qn("body_class"),vl=qn("content_security_policy"),xh=qn("br_in_pre"),Ra=qn("forced_root_block"),Mu=qn("forced_root_block_attrs"),tc=qn("newline_behavior"),_w=qn("br_newline_selector"),vx=qn("no_newline_selector"),Tw=qn("keep_styles"),l_=qn("end_container_on_empty_block"),wx=qn("automatic_uploads"),c_=qn("images_reuse_filename"),u_=qn("images_replace_blob_uris"),d_=qn("icons"),U5=qn("icons_url"),W5=qn("images_upload_url"),X5=qn("images_upload_base_path"),Aw=qn("images_upload_credentials"),Sx=qn("images_upload_handler"),f_=qn("content_css_cors"),ly=qn("referrer_policy"),s1=qn("language"),Cg=qn("language_url"),kx=qn("indent_use_margin"),q5=qn("indentation"),h_=qn("content_css"),j5=qn("content_style"),m_=qn("font_css"),g_=qn("directionality"),pc=qn("inline_boundaries_selector"),Cx=qn("object_resizing"),p_=qn("resize_img_proportional"),Pw=qn("placeholder"),cy=qn("event_root"),G5=qn("service_message"),r1=qn("theme"),Y5=qn("theme_url"),Dw=qn("model"),K5=qn("model_url"),uy=qn("inline_boundaries"),J5=qn("formats"),eP=qn("preview_styles"),Ex=qn("format_empty_lines"),b_=qn("format_noneditable_selector"),Nw=qn("custom_ui_selector"),dy=qn("inline"),y_=qn("hidden_input"),$w=qn("submit_patch"),Rw=qn("add_form_submit_trigger"),Bw=qn("add_unload_trigger"),$p=qn("custom_undo_redo_levels"),O_=qn("disable_nodechange"),Mw=qn("readonly"),x_=qn("editable_root"),v_=qn("content_css_cors"),bc=qn("plugins"),_x=qn("external_plugins"),Tx=qn("block_unsupported_drop"),Fw=qn("visual"),Lw=qn("visual_table_class"),vh=qn("visual_anchor_class"),Ax=qn("iframe_aria_text"),tP=qn("setup"),Eg=qn("init_instance_callback"),Px=qn("urlconverter_callback"),yc=qn("auto_focus"),iM=qn("browser_spellcheck"),i1=qn("protect"),nP=qn("paste_block_drop"),fy=qn("paste_data_images"),oP=qn("paste_preprocess"),sP=qn("paste_postprocess"),w_=qn("newdocument_content"),S_=qn("paste_webkit_styles"),Dx=qn("paste_remove_styles_if_webkit"),rP=qn("paste_merge_formats"),iP=qn("smart_paste"),hy=qn("paste_as_text"),Iw=qn("paste_tab_spaces"),Vw=qn("allow_html_data_urls"),k_=qn("text_patterns"),C_=qn("text_patterns_lookup"),Nx=qn("noneditable_class"),aM=qn("editable_class"),a1=qn("noneditable_regexp"),tW=qn("preserve_cdata"),my=qn("highlight_on_focus"),gy=qn("xss_sanitization"),$x=qn("init_content_sync"),aP=e=>e.options.isSet("text_patterns_lookup"),E_=e=>Kt.explode(e.options.get("font_size_style_values")),lP=e=>Kt.explode(e.options.get("font_size_classes")),Qw=e=>e.options.get("encoding")==="xml",zw=e=>Kt.explode(e.options.get("images_file_types")),Sm=qn("table_tab_navigation"),py=qn("details_initial_state"),cP=qn("details_serialized_state"),Hw=qn("sandbox_iframes"),__=e=>e.options.get("sandbox_iframes_exclusions"),lM=qn("convert_unsafe_embeds"),T_=qn("license_key"),Zw=qn("api_key"),_g=qn("disabled"),uP=io,Uw=Jt,Ww=e=>{const s=e.parentNode;s&&s.removeChild(e)},Xw=e=>{const s=uu(e);return{count:e.length-s.length,text:s}},Rx=e=>{let s;for(;(s=e.data.lastIndexOf(Ai))!==-1;)e.deleteData(s,1)},qw=(e,s)=>(Rp(e),s),Bx=(e,s)=>{const i=Xw(e.data.substr(0,s.offset())),u=Xw(e.data.substr(s.offset()));return(i.text+u.text).length>0?(Rx(e),Vt(e,s.offset()-i.count)):s},l1=(e,s)=>{const i=s.container(),u=Ks(jo(i.childNodes),e).map(m=>m<s.offset()?Vt(i,s.offset()-1):s).getOr(s);return Rp(e),u},jw=(e,s)=>Uw(e)&&s.container()===e?Bx(e,s):qw(e,s),dP=(e,s)=>s.container()===e.parentNode?l1(e,s):qw(e,s),fP=(e,s)=>Vt.isTextPosition(s)?jw(e,s):dP(e,s),Rp=e=>{uP(e)&&Kl(e)&&(Yb(e)?e.removeAttribute("data-mce-caret"):Ww(e)),Uw(e)&&(Rx(e),e.data.length===0&&Ww(e))},by=Mr,A_=$i,Oc=Sr,cM="*[contentEditable=false],video,audio,embed,object",hP=(e,s,i)=>{const u=sw(s.getBoundingClientRect(),i);let m,O;if(e.tagName==="BODY"){const A=e.ownerDocument.documentElement;m=e.scrollLeft||A.scrollLeft,O=e.scrollTop||A.scrollTop}else{const A=e.getBoundingClientRect();m=e.scrollLeft-A.left,O=e.scrollTop-A.top}u.left+=m,u.right+=m,u.top+=O,u.bottom+=O,u.width=1;let S=s.offsetWidth-s.clientWidth;return S>0&&(i&&(S*=-1),u.left+=S,u.right+=S),u},c1=e=>{var s,i;const u=pl(Ye.fromDom(e),cM);for(let m=0;m<u.length;m++){const O=u[m].dom;let S=O.previousSibling;if(bh(S)){const A=S.data;A.length===1?(s=S.parentNode)===null||s===void 0||s.removeChild(S):S.deleteData(A.length-1,1)}S=O.nextSibling,sx(S)&&(S.data.length===1?(i=S.parentNode)===null||i===void 0||i.removeChild(S):S.deleteData(0,1))}},P_=(e,s,i,u)=>{const m=Nc();let O,S;const A=Ra(e),D=e.dom,I=(xe,$e)=>{let et;if(G(),Oc($e))return null;if(i($e)){const yt=k5(A,$e,xe),kt=hP(s,$e,xe);D.setStyle(yt,"top",kt.top),D.setStyle(yt,"caret-color","transparent"),S=yt;const Pt=D.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});D.setStyles(Pt,{...kt}),D.add(s,Pt),m.set({caret:Pt,element:$e,before:xe}),xe&&D.addClass(Pt,"mce-visual-caret-before"),ee(),et=$e.ownerDocument.createRange(),et.setStart(yt,0),et.setEnd(yt,0)}else return S=$E($e,xe),et=$e.ownerDocument.createRange(),yy(S.nextSibling)?(et.setStart(S,0),et.setEnd(S,0)):(et.setStart(S,1),et.setEnd(S,1)),et;return et},G=()=>{c1(s),S&&(Rp(S),S=null),m.on(xe=>{D.remove(xe.caret),m.clear()}),O&&(clearInterval(O),O=void 0)},ee=()=>{O=window.setInterval(()=>{m.on(xe=>{u()?D.toggleClass(xe.caret,"mce-visual-caret-hidden"):D.addClass(xe.caret,"mce-visual-caret-hidden")})},500)};return{show:I,hide:G,getCss:()=>".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}",reposition:()=>{m.on(xe=>{const $e=hP(s,xe.element,xe.before);D.setStyles(xe.caret,{...$e})})},destroy:()=>clearInterval(O)}},D_=()=>Gn.browser.isFirefox(),yy=e=>by(e)||A_(e),Tg=e=>(yy(e)||Pa(e)&&D_())&&tm(Ye.fromDom(e)).exists(nu),Gw=bl,N_=Mr,mP=$i,$_=ih("display","block table table-cell table-row table-caption list-item"),Oy=Kl,R_=Hd,xy=io,u1=Jt,Yw=gc,d1=e=>e===1,Bp=e=>e===-1,Mp=(e,s)=>{let i;for(;i=e(s);)if(!R_(i))return i;return null},km=(e,s,i,u,m)=>{const O=new Ji(e,u),S=N_(e)||R_(e);let A;if(Bp(s)){if(S&&(A=Mp(O.prev.bind(O),!0),i(A)))return A;for(;A=Mp(O.prev.bind(O),m);)if(i(A))return A}if(d1(s)){if(S&&(A=Mp(O.next.bind(O),!0),i(A)))return A;for(;A=Mp(O.next.bind(O),m);)if(i(A))return A}return null},Kw=(e,s)=>{const i=m=>Gw(m.dom),u=m=>m.dom===s;return tu(Ye.fromDom(e),i,u).map(m=>m.dom).getOr(s)},wh=(e,s)=>{for(;e&&e!==s;){if($_(e))return e;e=e.parentNode}return null},Wd=(e,s,i)=>wh(e.container(),i)===wh(s.container(),i),Sh=(e,s)=>{if(!s)return ne.none();const i=s.container(),u=s.offset();return xy(i)?ne.from(i.childNodes[u+e]):ne.none()},Jw=(e,s)=>{var i;const m=((i=s.ownerDocument)!==null&&i!==void 0?i:document).createRange();return e?(m.setStartBefore(s),m.setEndBefore(s)):(m.setStartAfter(s),m.setEndAfter(s)),m},Af=(e,s,i)=>wh(s,e)===wh(i,e),eS=(e,s,i)=>{const u=e?"previousSibling":"nextSibling";let m=i;for(;m&&m!==s;){let O=m[u];if(O&&Oy(O)&&(O=O[u]),N_(O)||mP(O)){if(Af(s,O,m))return O;break}if(Yw(O))break;m=m.parentNode}return null},Fp=Ne(Jw,!0),f1=Ne(Jw,!1),B_=(e,s,i)=>{let u;const m=Ne(eS,!0,s),O=Ne(eS,!1,s),S=i.startContainer,A=i.startOffset;if(Hd(S)){const D=u1(S)?S.parentNode:S,I=D.getAttribute("data-mce-caret");if(I==="before"&&(u=D.nextSibling,Tg(u)))return Fp(u);if(I==="after"&&(u=D.previousSibling,Tg(u)))return f1(u)}if(!i.collapsed)return i;if(Jt(S)){if(Oy(S)){if(e===1){if(u=O(S),u)return Fp(u);if(u=m(S),u)return f1(u)}if(e===-1){if(u=m(S),u)return f1(u);if(u=O(S),u)return Fp(u)}return i}if(bh(S)&&A>=S.data.length-1)return e===1&&(u=O(S),u)?Fp(u):i;if(sx(S)&&A<=1)return e===-1&&(u=m(S),u)?f1(u):i;if(A===S.data.length)return u=O(S),u?Fp(u):i;if(A===0)return u=m(S),u?f1(u):i}return i},M_=(e,s)=>Sh(e?0:-1,s).filter(N_),vy=(e,s,i)=>{const u=B_(e,s,i);return e===-1?Vt.fromRangeStart(u):Vt.fromRangeEnd(u)},Mx=e=>ne.from(e.getNode()).map(Ye.fromDom),gP=e=>ne.from(e.getNode(!0)).map(Ye.fromDom),wy=(e,s)=>{let i=s;for(;i=e(i);)if(i.isVisible())return i;return i},Fx=(e,s)=>{const i=Wd(e,s);return!i&&wr(e.getNode())?!0:i},F_=Mr,Xd=Jt,L_=io,Lx=wr,Lp=gc,I_=ty,Sy=Pp,uM=(e,s)=>{const i=[];let u=e;for(;u&&u!==s;)i.push(u),u=u.parentNode;return i},V_=(e,s)=>e.hasChildNodes()&&s<e.childNodes.length?e.childNodes[s]:null,wl=(e,s)=>{if(d1(e)){if(Lp(s.previousSibling)&&!Xd(s.previousSibling))return Vt.before(s);if(Xd(s))return Vt(s,0)}if(Bp(e)){if(Lp(s.nextSibling)&&!Xd(s.nextSibling))return Vt.after(s);if(Xd(s))return Vt(s,s.data.length)}return Bp(e)?Lx(s)?Vt.before(s):Vt.after(s):Vt.before(s)},Ix=(e,s)=>{const i=s.nextSibling;return i&&Lp(i)?Xd(i)?Vt(i,0):Vt.before(i):Ag(1,Vt.after(s),e)},Ag=(e,s,i)=>{let u,m,O,S;if(!L_(i)||!s)return null;if(s.isEqual(Vt.after(i))&&i.lastChild){if(S=Vt.after(i.lastChild),Bp(e)&&Lp(i.lastChild)&&L_(i.lastChild))return Lx(i.lastChild)?Vt.before(i.lastChild):S}else S=s;const A=S.container();let D=S.offset();if(Xd(A)){if(Bp(e)&&D>0)return Vt(A,--D);if(d1(e)&&D<A.length)return Vt(A,++D);u=A}else{if(Bp(e)&&D>0&&(m=V_(A,D-1),Lp(m)))return!I_(m)&&(O=km(m,e,Sy,m),O)?Xd(O)?Vt(O,O.data.length):Vt.after(O):Xd(m)?Vt(m,m.data.length):Vt.before(m);if(d1(e)&&D<A.childNodes.length&&(m=V_(A,D),Lp(m)))return Lx(m)?Ix(i,m):!I_(m)&&(O=km(m,e,Sy,m),O)?Xd(O)?Vt(O,0):Vt.before(O):Xd(m)?Vt(m,0):Vt.after(m);u=m||S.getNode()}if(u&&(d1(e)&&S.isAtEnd()||Bp(e)&&S.isAtStart())&&(u=km(u,e,bt,i,!0),Sy(u,i)))return wl(e,u);m=u&&km(u,e,Sy,i);const I=Be(vn(uM(A,i),F_));return I&&(!m||!I.contains(m))?(d1(e)?S=Vt.after(I):S=Vt.before(I),S):m?wl(e,m):null},Fu=e=>({next:s=>Ag(1,s,e),prev:s=>Ag(-1,s,e)}),Q_=(e,s,i)=>{const u=e?Vt.before(i):Vt.after(i);return Lu(e,s,u)},Vx=e=>wr(e)?Vt.before(e):Vt.after(e),ky=e=>Vt.isTextPosition(e)?e.offset()===0:gc(e.getNode()),z_=e=>{if(Vt.isTextPosition(e)){const s=e.container();return e.offset()===s.data.length}else return gc(e.getNode(!0))},Cy=(e,s)=>!Vt.isTextPosition(e)&&!Vt.isTextPosition(s)&&e.getNode()===s.getNode(!0),H_=e=>!Vt.isTextPosition(e)&&wr(e.getNode()),Ip=(e,s,i)=>e?!Cy(s,i)&&!H_(s)&&z_(s)&&ky(i):!Cy(i,s)&&ky(s)&&z_(i),Lu=(e,s,i)=>{const u=Fu(s);return ne.from(e?u.next(i):u.prev(i))},Pg=(e,s,i)=>Lu(e,s,i).bind(u=>Wd(i,u,s)&&Ip(e,i,u)?Lu(e,s,u):ne.some(u)),Pf=(e,s,i,u)=>Pg(e,s,i).bind(m=>u(m)?Pf(e,s,m,u):ne.some(m)),qd=(e,s)=>{const i=e?s.firstChild:s.lastChild;return Jt(i)?ne.some(Vt(i,e?0:i.data.length)):i?gc(i)?ne.some(e?Vt.before(i):Vx(i)):Q_(e,s,i):ne.none()},Sl=Ne(Lu,!0),il=Ne(Lu,!1),va=Ne(qd,!0),jd=Ne(qd,!1),Qx="_mce_caret",Iu=e=>io(e)&&e.id===Qx,Vp=(e,s)=>{let i=s;for(;i&&i!==e;){if(Iu(i))return i;i=i.parentNode}return null},zx=e=>te(e.start),Z_=e=>ro(e,"rng"),U_=e=>ro(e,"id"),W_=e=>ro(e,"name"),X_=e=>Kt.isArray(e.start),Hx=e=>!W_(e)&&tt(e.forward)?e.forward:!0,q_=(e,s)=>(io(s)&&e.isBlock(s)&&!s.innerHTML&&(s.innerHTML='<br data-mce-bogus="1" />'),s),j_=(e,s)=>{const i=ne.from(HE(e.getRoot(),s.start)),u=ne.from(HE(e.getRoot(),s.end));return Vr(i,u,(m,O)=>{const S=e.createRng();return S.setStart(m.container(),m.offset()),S.setEnd(O.container(),O.offset()),{range:S,forward:Hx(s)}})},h1=(e,s)=>{var i;const m=((i=e.ownerDocument)!==null&&i!==void 0?i:document).createTextNode(Ai);e.appendChild(m),s.setStart(m,0),s.setEnd(m,0)},G_=e=>!e.hasChildNodes(),pP=(e,s)=>jd(e).fold(Fe,i=>(s.setStart(i.container(),i.offset()),s.setEnd(i.container(),i.offset()),!0)),bP=(e,s,i)=>G_(s)&&Vp(e,s)?(h1(s,i),!0):!1,Y_=(e,s,i,u)=>{const m=i[s?"start":"end"],O=e.getRoot();if(m){let S=O,A=m[0];for(let D=m.length-1;S&&D>=1;D--){const I=S.childNodes;if(bP(O,S,u))return!0;if(m[D]>I.length-1)return bP(O,S,u)?!0:pP(S,u);S=I[m[D]]}Jt(S)&&(A=Math.min(m[0],S.data.length)),io(S)&&(A=Math.min(m[0],S.childNodes.length)),s?u.setStart(S,A):u.setEnd(S,A)}return!0},m1=e=>Jt(e)&&e.data.length>0,yP=(e,s,i)=>{const u=e.get(i.id+"_"+s),m=u==null?void 0:u.parentNode,O=i.keep;if(u&&m){let S,A;if(s==="start"?O?u.hasChildNodes()?(S=u.firstChild,A=1):m1(u.nextSibling)?(S=u.nextSibling,A=0):m1(u.previousSibling)?(S=u.previousSibling,A=u.previousSibling.data.length):(S=m,A=e.nodeIndex(u)+1):(S=m,A=e.nodeIndex(u)):O?u.hasChildNodes()?(S=u.firstChild,A=1):m1(u.previousSibling)?(S=u.previousSibling,A=u.previousSibling.data.length):(S=m,A=e.nodeIndex(u)):(S=m,A=e.nodeIndex(u)),!O){const D=u.previousSibling,I=u.nextSibling;Kt.each(Kt.grep(u.childNodes),ee=>{Jt(ee)&&(ee.data=ee.data.replace(/\uFEFF/g,""))});let G;for(;G=e.get(i.id+"_"+s);)e.remove(G,!0);if(Jt(I)&&Jt(D)&&!Gn.browser.isOpera()){const ee=D.data.length;D.appendData(I.data),e.remove(I),S=D,A=ee}}return ne.some(Vt(S,A))}else return ne.none()},OP=(e,s)=>{const i=e.createRng();return Y_(e,!0,s,i)&&Y_(e,!1,s,i)?ne.some({range:i,forward:Hx(s)}):ne.none()},Vs=(e,s)=>{const i=yP(e,"start",s),u=yP(e,"end",s);return Vr(i,u.or(i),(m,O)=>{const S=e.createRng();return S.setStart(q_(e,m.container()),m.offset()),S.setEnd(q_(e,O.container()),O.offset()),{range:S,forward:Hx(s)}})},Cm=(e,s)=>ne.from(e.select(s.name)[s.index]).map(i=>{const u=e.createRng();return u.selectNode(i),{range:u,forward:!0}}),Em=(e,s)=>{const i=e.dom;if(s){if(X_(s))return OP(i,s);if(zx(s))return j_(i,s);if(U_(s))return Vs(i,s);if(W_(s))return Cm(i,s);if(Z_(s))return ne.some({range:s.rng,forward:Hx(s)})}return ne.none()},Zx=(e,s,i)=>F5(e,s,i),tS=(e,s)=>{Em(e,s).each(({range:i,forward:u})=>{e.setRng(i,u)})},du=e=>io(e)&&e.tagName==="SPAN"&&e.getAttribute("data-mce-type")==="bookmark",Qp=(e=>s=>e===s)(ea),kh=e=>e!==""&&` \f
@@ -209,5 +209,5 @@ Required: `+Z.join(", "));return Fo[mn].apply(null,eo)},log:Fo=>{console.log(Fo,
209
209
  </svg>\r
210
210
  `},{default:p.withCtx(()=>{var de;return[p.createTextVNode(p.toDisplayString(((de=o.language)==null?void 0:de.excel)??"Excel"),1)]}),_:1},8,["onClick","classes"]),o.enable_select_deselect_delete?(p.openBlock(),p.createBlock(R,{key:0,onClick:f.toggleSelectAll,tag:"button",button_type:"light",has_border_reduced:!1,classes:"rounded-lg lg:rounded-none!"},{default:p.withCtx(()=>{var de;return[p.createTextVNode(p.toDisplayString(((de=o.language)==null?void 0:de.select_all)??"Select all"),1)]}),_:1},8,["onClick"])):p.createCommentVNode("",!0),o.enable_select_deselect_delete?(p.openBlock(),p.createBlock(R,{key:1,onClick:f.toggleDeselectAll,tag:"button",button_type:"light",has_border_reduced:!1,classes:"rounded-lg lg:rounded-none!"},{default:p.withCtx(()=>{var de;return[p.createTextVNode(p.toDisplayString(((de=o.language)==null?void 0:de.deselect_all)??"Deselect all"),1)]}),_:1},8,["onClick"])):p.createCommentVNode("",!0),p.withDirectives((p.openBlock(),p.createElementBlock("div",null,[p.createElementVNode("button",{onClick:t[3]||(t[3]=(...de)=>f.toggleColumnVisibilityDropdown&&f.toggleColumnVisibilityDropdown(...de)),class:"h-[2.5rem] text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700 focus:outline-none font-medium text-sm px-3 py-2 text-center inline-flex items-center rounded-lg lg:rounded-none!",type:"button"},t[7]||(t[7]=[p.createStaticVNode('<svg class="w-4 h-4 me-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" data-v-a51321e7><path stroke="currentColor" stroke-width="2" d="M21 12c0 1.2-4.03 6-9 6s-9-4.8-9-6c0-1.2 4.03-6 9-6s9 4.8 9 6Z" data-v-a51321e7></path><path stroke="currentColor" stroke-width="2" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" data-v-a51321e7></path></svg> Column visibility <svg class="w-2.5 h-2.5 ms-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6" data-v-a51321e7><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4" data-v-a51321e7></path></svg>',3)])),p.withDirectives(p.createElementVNode("div",{id:"db_"+c.Random_string,class:"z-10 absolute w-42 bg-white rounded-lg shadow-sm dark:bg-gray-700"},[p.createElementVNode("ul",{class:"p-3 space-y-1 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"db_"+c.Random_string},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(de,xt)=>(p.openBlock(),p.createElementBlock("li",null,[p.createElementVNode("div",_Ae,[p.withDirectives(p.createElementVNode("input",{id:"cb_"+de.field_name,type:"checkbox","onUpdate:modelValue":je=>c.columnVisibility[de.field_name]=je,class:"w-4 h-4 rounded-sm"},null,8,TAe),[[p.vModelCheckbox,c.columnVisibility[de.field_name]]]),p.createElementVNode("label",{for:"cb_"+de.field_name,class:"w-full ms-2 text-sm font-medium text-gray-900 rounded-sm dark:text-gray-300"},p.toDisplayString(de.field_name),9,AAe)])]))),256))],8,EAe)],8,CAe),[[p.vShow,c.isOpenColumnVisibility]])])),[[q,f.closeColumnVisibilityDropdown]]),o.enable_select_deselect_delete?(p.openBlock(),p.createBlock(R,{key:2,tag:"button",onClick:f.deleteSelected,button_type:"red",has_border_reduced:!1,classes:"rounded-lg lg:rounded-none lg:rounded-e-lg!",is_disabled:c.checkedIds.length<=0,svg_icon:`<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">\r
211
211
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 7h14m-9 3v8m4-8v8M10 3h4a1 1 0 0 1 1 1v3H9V4a1 1 0 0 1 1-1ZM6 7h12v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7Z"/>\r
212
- </svg>`},{default:p.withCtx(()=>{var de;return[p.createTextVNode(p.toDisplayString(((de=o.language)==null?void 0:de.delete_selected)??"Delete selected")+" "+p.toDisplayString(c.checkedIds.length>0?`(${c.checkedIds.length})`:""),1)]}),_:1},8,["onClick","is_disabled"])):p.createCommentVNode("",!0)]),p.createElementVNode("div",{id:"print_"+c.Random_string,class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},[p.createElementVNode("table",{id:"table"+c.Random_string,class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse print:border-collapse! border-spacing-y-5 lg:border-spacing-y-0 print:border-spacing-y-0! dark:border-gray-800 dark:bg-gray-900"},[p.createElementVNode("thead",NAe,[p.createElementVNode("tr",null,[o.enable_select_deselect_delete?(p.openBlock(),p.createElementBlock("th",$Ae)):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.visibleColumns,(de,xt)=>(p.openBlock(),p.createElementBlock("th",{key:xt,onClick:je=>f.updateSortColumn(de.field_name,de.sortable),class:"w-full px-4 py-2 lg:w-2/12 print:w-2/12! print:border-[1px]!"},[p.createElementVNode("div",BAe,[p.createElementVNode("span",null,p.toDisplayString(de.field_label),1),c.sortField===de.field_name?(p.openBlock(),p.createElementBlock("span",MAe,t[8]||(t[8]=[p.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 20V7m0 13-4-4m4 4 4-4m4-12v13m0-13 4 4m-4-4-4 4"})],-1)]))):p.createCommentVNode("",!0)])],8,RAe))),128))])]),p.createElementVNode("tbody",FAe,[c.isLoading?(p.openBlock(),p.createElementBlock("tr",LAe,[p.createElementVNode("td",{colspan:o.columns.length+(o.enable_select_deselect_delete?1:0)},t[9]||(t[9]=[p.createElementVNode("div",{role:"status",class:"w-full p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded-sm shadow-sm animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700"},[p.createElementVNode("div",{class:"flex items-center justify-between"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("span",{class:"sr-only"},"Loading...")],-1)]),8,IAe)])):p.createCommentVNode("",!0),c.isLoading?p.createCommentVNode("",!0):(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:1},p.renderList(c.itemLists.data,(de,xt)=>(p.openBlock(),p.createElementBlock("tr",{key:xt,class:"text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"},[o.enable_select_deselect_delete?(p.openBlock(),p.createElementBlock("td",VAe,[p.createElementVNode("input",{checked:c.checkedIds.includes(de.id),onChange:je=>f.toggleCheck(de.id),type:"checkbox",value:"",class:"w-4 h-4 rounded-sm"},null,40,QAe)])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.visibleColumns,(je,j)=>(p.openBlock(),p.createElementBlock("td",{style:p.normalizeStyle(je==null?void 0:je.style),key:j,"data-label":je.field_label,class:p.normalizeClass(["text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none print:before:content-none! flex flex-col justify-between gap-2 lg:table-cell print:table-cell! py-4 px-5 lg:py-3 lg:px-4 print:py-3! print:px-4! border-[1px]! dark:border-gray-700",{"rounded-b-lg lg:rounded-b-none!":j===o.columns.length-1}])},[p.createElementVNode("div",{class:p.normalizeClass([je.field_name==="action"?"":"overflow-auto","td_overflow_auto max-h-40 max-w-100"])},[je.tdComp?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(f.forDynCompIs(je.tdComp)),{key:0,language:o.language,row:de,field:je.field_name,xprops:o.xprops,tdProps:je.tdProps,onDeleteAction:t[4]||(t[4]=tt=>f.GetItemLists()),onEditAction:tt=>f.editAction(de),onGeneralAction:tt=>f.generalAction(de)},null,40,["language","row","field","xprops","tdProps","onEditAction","onGeneralAction"])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[p.createTextVNode(p.toDisplayString(de[je.field_name]),1)],64))],2)],14,zAe))),128))]))),128))])],8,DAe)],8,PAe),p.createElementVNode("div",HAe,[p.createVNode(B,{class:"mt-3 mb-0",classes:"px-4 py-3 sm:px-6",data:c.itemLists,limit:c.limit,size:c.size,align:c.align,onPaginationChangePage:f.GetItemLists},null,8,["data","limit","size","align","onPaginationChangePage"])])])],64)}const UAe=vi(mAe,[["render",ZAe],["__scopeId","data-v-a51321e7"]]);class WAe{constructor(t){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,t),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let t="";this.settings.url&&!this.settings.asyncUrl&&(t=this.settings.url);let o=this;if(this.settings.asyncUrl)return void o.settings.asyncUrl(function(c){let f=o.getPrintWindow(c);o.settings.preview?o.previewIfrmaeLoad():o.print(f)},o.settings.vue);let a=this.getPrintWindow(t);this.settings.url||this.write(a.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(a)}addEvent(t,o,a){t.addEventListener?t.addEventListener(o,a,!1):t.attachEvent?t.attachEvent("on"+o,a):t["on"+o]=a}previewIfrmaeLoad(){let t=document.getElementById("vue-pirnt-nb-previewBox");if(t){let o=this,a=t.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(a,"load",function(){o.previewBoxShow(),o.removeCanvasImg(),o.settings.previewOpenCallback()}),this.addEvent(t.querySelector(".previewBodyUtilPrintBtn"),"click",function(){o.settings.beforeOpenCallback(),o.settings.openCallback(),a.contentWindow.print(),o.settings.closeCallback()})}}removeCanvasImg(){let t=this;try{if(t.elsdom){let o=t.elsdom.querySelectorAll(".canvasImg");for(let a=0;a<o.length;a++)o[a].remove()}}catch(o){console.log(o)}}print(t){var o=this;let a=document.getElementById(this.settings.id)||t.f,c=document.getElementById(this.settings.id).contentWindow||t.f.contentWindow;o.settings.beforeOpenCallback(),o.addEvent(a,"load",function(){c.focus(),o.settings.openCallback(),c.print(),a.remove(),o.settings.closeCallback(),o.removeCanvasImg()})}write(t){t.open(),t.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),t.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let t="",o="",a="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,f=>{t+=f}),[].forEach.call(document.querySelectorAll("link"),function(f){f.href.indexOf(".css")>=0&&(o+=`<link type="text/css" rel="stylesheet" href="${f.href}" >`)});let c=document.styleSheets;if(c&&c.length>0)for(let f=0;f<c.length;f++)try{if(c[f].cssRules||c[f].rules){let h=c[f].cssRules||c[f].rules;for(let y=0;y<h.length;y++)a+=h[y].cssText}}catch(h){console.log(c[f].href+h)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,f=>{o+=`<link type="text/css" rel="stylesheet" href="${f}">`}),`<head><title>${this.settings.popTitle}</title>${t}${o}<style type="text/css">${a}</style></head>`}getBody(){let t=this.settings.ids;return t=t.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(t)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(t){let o=t.querySelectorAll("canvas");for(let a=0;a<o.length;a++)if(!o[a].style.display){let c=o[a].parentNode,f=o[a].toDataURL("image/png"),h=new Image;h.className="canvasImg",h.style.display="none",h.src=f,c.appendChild(h)}return t}getFormData(t){let o=t.cloneNode(!0),a=o.querySelectorAll("input,select,textarea"),c=o.querySelectorAll(".canvasImg,canvas"),f=-1;for(let h=0;h<c.length;h++){let y=c[h].parentNode,w=c[h];w.tagName.toLowerCase()==="canvas"?y.removeChild(w):w.style.display="block"}for(let h=0;h<a.length;h++){let y=a[h],w=y.getAttribute("type"),C=a[h];if(w||(w=y.tagName==="SELECT"?"select":y.tagName==="TEXTAREA"?"textarea":""),y.tagName==="INPUT")w==="radio"||w==="checkbox"?y.checked&&C.setAttribute("checked",y.checked):(C.value=y.value,C.setAttribute("value",y.value));else if(w==="select"){f++;for(let T=0;T<t.querySelectorAll("select").length;T++){let R=t.querySelectorAll("select")[T];if(!R.getAttribute("newbs")&&R.setAttribute("newbs",T),R.getAttribute("newbs")==f){let B=t.querySelectorAll("select")[f].selectedIndex;y.options[B].setAttribute("selected",!0)}}}else C.innerHTML=y.value,C.setAttribute("html",y.value)}return o}getPrintWindow(t){var o=this.Iframe(t);return{f:o,win:o.contentWindow||o,doc:o.doc}}previewBoxShow(){let t=document.getElementById("vue-pirnt-nb-previewBox");t&&(document.querySelector("html").setAttribute("style","overflow: hidden"),t.style.display="block")}previewBoxHide(){let t=document.getElementById("vue-pirnt-nb-previewBox");t&&(document.querySelector("html").setAttribute("style","overflow: visible;"),t.querySelector("iframe")&&t.querySelector("iframe").remove(),t.style.display="none")}previewBox(){let t=document.getElementById("vue-pirnt-nb-previewBox"),o="previewBody";if(t)return t.querySelector("iframe")&&t.querySelector("iframe").remove(),{close:t.querySelector(".previewClose"),previewBody:t.querySelector(".previewBody")};let a=document.createElement("div");a.setAttribute("id","vue-pirnt-nb-previewBox"),a.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),a.style.zIndex=this.settings.zIndex;let c=document.createElement("div");c.setAttribute("class","previewHeader"),c.setAttribute("style","padding: 5px 20px;"),c.innerHTML=this.settings.previewTitle,a.appendChild(c),this.close=document.createElement("div");let f=this.close;f.setAttribute("class","previewClose"),f.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let h=document.createElement("div"),y=document.createElement("div");h.setAttribute("class","closeBefore"),h.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),y.setAttribute("class","closeAfter"),y.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),f.appendChild(h),f.appendChild(y),c.appendChild(f),this.previewBody=document.createElement("div");let w=this.previewBody;w.setAttribute("class",o),w.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),a.appendChild(w);let C=document.createElement("div");C.setAttribute("class","previewBodyUtil"),C.setAttribute("style","height: 32px;background: #474747;position: relative;"),w.appendChild(C),this.previewBodyUtilPrintBtn=document.createElement("div");let T=this.previewBodyUtilPrintBtn;return T.setAttribute("class","previewBodyUtilPrintBtn"),T.innerHTML=this.settings.previewPrintBtnLabel,T.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),C.appendChild(T),document.body.appendChild(a),{close:this.close,previewBody:this.previewBody}}iframeBox(t,o){let a=document.createElement("iframe");return a.style.border="0px",a.style.position="absolute",a.style.width="0px",a.style.height="0px",a.style.right="0px",a.style.top="0px",a.setAttribute("id",t),a.setAttribute("src",o),a}Iframe(t){let o=this.settings.id;t=t||new Date().getTime();let a=this,c=this.iframeBox(o,t);try{if(this.settings.preview){c.setAttribute("style","border: 0px;flex: 1;");let f=this.previewBox(),h=f.previewBody,y=f.close;h.appendChild(c),this.addEvent(y,"click",function(){a.previewBoxHide()})}else document.body.appendChild(c);c.doc=null,c.doc=c.contentDocument?c.contentDocument:c.contentWindow?c.contentWindow.document:c.document}catch(f){throw new Error(f+". iframes may not be supported in this browser.")}if(c.doc==null)throw new Error("Cannot find document.");return c}}var eW={directiveName:"print",mounted(r,t,o){let a=t.instance,c="";var f,h,y;h="click",y=()=>{if(typeof t.value=="string")c=t.value;else{if(typeof t.value!="object"||!t.value.id)return void window.print();{c=t.value.id;let C=c.replace(new RegExp("#","g"),"");document.getElementById(C)||(console.log("id in Error"),c="")}}w()},(f=r).addEventListener?f.addEventListener(h,y,!1):f.attachEvent?f.attachEvent("on"+h,y):f["on"+h]=y;const w=()=>{new WAe({ids:c,vue:a,url:t.value.url,standard:"",extraHead:t.value.extraHead,extraCss:t.value.extraCss,zIndex:t.value.zIndex||20002,previewTitle:t.value.previewTitle||"打印预览",previewPrintBtnLabel:t.value.previewPrintBtnLabel||"打印",popTitle:t.value.popTitle,preview:t.value.preview||!1,asyncUrl:t.value.asyncUrl,previewBeforeOpenCallback(){t.value.previewBeforeOpenCallback&&t.value.previewBeforeOpenCallback(a)},previewOpenCallback(){t.value.previewOpenCallback&&t.value.previewOpenCallback(a)},openCallback(){t.value.openCallback&&t.value.openCallback(a)},closeCallback(){t.value.closeCallback&&t.value.closeCallback(a)},beforeOpenCallback(){t.value.beforeOpenCallback&&t.value.beforeOpenCallback(a)}})}},install:function(r){r.directive("print",eW)}};const XAe={components:{},props:{data:Array,columns:Array,get_item_url:String,xprops:Object,language:{type:Object,required:!1,default:()=>{}}},data(){const r=this.generateRandomString(6);return{isLoadinPrint:!1,Random_string:r,printObj:{id:"print_"+r,popTitle:"",beforeOpenCallback(t){},openCallback(t){t.isLoadinPrint=!1},closeCallback(t){t.isLoadinPrint=!1}},isLoading:!1,showNoOfEntries:[5,10,20,50,100,200,300,400,500,600,700,800,900,1e3,2e3,3e3,4e3,5e3,6e3,7e3,8e3,9e3,1e4,11e3,12e3,13e3,14e3,15e3,16e3,17e3,18e3,19e3,2e4],search:"",sortKey:"",sortOrder:1,currentPage:1,itemsPerPage:10,jumpToPage:"",maxDisplayedPages:10}},emits:["editAction","generalAction","deleteAction"],computed:{itemLists(){return this.data},filteredData(){const r=this.search.toLowerCase(),t=this.sortData(this.itemLists);return r?t.filter(o=>this.columns.some(a=>{const c=o[a.field_name];return c!=null&&String(c).toLowerCase().includes(r)})):t},totalPages(){return Math.ceil(this.filteredData.length/this.itemsPerPage)},paginatedData(){const r=(this.currentPage-1)*this.itemsPerPage,t=r+this.itemsPerPage;return this.filteredData.slice(r,t)},displayedPageNumbers(){let r=Math.max(this.currentPage-Math.floor(this.maxDisplayedPages/2),1),t=r+this.maxDisplayedPages-1;return t>this.totalPages&&(t=this.totalPages,r=Math.max(t-this.maxDisplayedPages+1,1)),Array.from({length:t-r+1},(o,a)=>r+a)},firstItemIndex(){return this.itemsPerPage*(this.currentPage-1)+1},lastItemIndex(){const r=this.itemsPerPage*this.currentPage;return r>this.filteredData.length?this.filteredData.length:r}},methods:{exportToExcel(){const r=document.querySelector("#table"+this.Random_string),t=Array.from(r.querySelectorAll("thead th")).map(R=>R.innerText),a=["",...["action"]],c=t.map((R,B)=>a.includes(R)?B:-1).filter(R=>R!==-1),f=Array.from(r.querySelectorAll("tbody tr")).map(R=>Array.from(R.querySelectorAll("td")).map(V=>V.innerText).filter((V,q)=>!c.includes(q))),y=[t.filter((R,B)=>!c.includes(B)),...f],w=vb.aoa_to_sheet(y),C=vb.book_new();vb.book_append_sheet(C,w,"Sheet1"),KU(C,"exported-file.xlsx")},generateRandomString(r){let t="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=o.length;for(let c=0;c<r;c++)t+=o.charAt(Math.floor(Math.random()*a));return t},delayedPrint(){this.isLoadinPrint=!0,this.$nextTick(()=>{var r;(r=this.$refs.hiddenPrintBtn)==null||r.click(),this.isLoadinPrint=!1})},editAction(r){this.$emit("editAction",r)},deleteAction(){this.$emit("deleteAction")},generalAction(r){this.$emit("generalAction",r)},forDynCompIs(r){return typeof r=="object"?r:null},handleItemsPerPageChange(r){this.itemsPerPage=r},goToPage(r){r>=1&&r<=this.totalPages&&(this.currentPage=r)},sort(r){r===this.sortKey?this.sortOrder*=-1:(this.sortKey=r,this.sortOrder=1)},sortData(r){return this.sortKey?r.slice().sort((t,o)=>(t[this.sortKey]<o[this.sortKey]?-1:1)*this.sortOrder):r},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},firstPage(){this.currentPage=1},lastPage(){this.currentPage=this.totalPages},goToPage(r){r>=1&&r<=this.totalPages&&(this.currentPage=r)},GetItemLists(){this.isLoading=!0,axios.get(this.xprops.route_get_data).then(r=>{this.itemLists=r.data,this.isLoading=!1}).catch(r=>{console.error(r),this.isLoading=!1})}},mounted(){},directives:{print:eW}},qAe={class:"p-0"},jAe={ref:"hiddenPrintBtn",style:{display:"none"}},GAe={class:"flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between"},YAe={class:"flex items-center gap-2"},KAe={class:"mt-[9px]"},JAe={class:"relative"},e5e={class:"flex flex-wrap mb-3"},t5e=["id"],n5e=["id"],o5e={class:"hidden text-sm font-normal text-center text-gray-600 print:table-header-group! lg:table-header-group dark:border-gray-600 bg-gray-50 dark:bg-gray-800 dark:text-gray-400 print:border-[1px]!"},s5e=["onClick"],r5e={class:"inline-flex items-center justify-center gap-1"},i5e={key:0,class:"print:hidden!"},a5e={class:"bg-white dark:bg-gray-900"},l5e={key:0},c5e=["colspan"],u5e=["data-label"],d5e=["innerHTML"],f5e={key:0,class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"},h5e={class:"flex justify-between flex-1 sm:hidden"},m5e=["disabled"],g5e=["disabled"],p5e={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"},b5e={class:"text-sm text-gray-700 dark:text-gray-400"},y5e={class:"font-medium"},O5e={class:"font-medium"},x5e={class:"font-medium"},v5e={"aria-label":"Page navigation"},w5e={class:"flex items-center h-8 -space-x-px text-sm"},S5e=["disabled"],k5e=["onClick"],C5e=["onClick"],E5e=["disabled"];function _5e(r,t,o,a,c,f){const h=p.resolveComponent("dropdown"),y=p.resolveComponent("gl-button"),w=p.resolveDirective("print");return p.openBlock(),p.createElementBlock("div",qAe,[p.withDirectives(p.createElementVNode("button",jAe,null,512),[[w,c.printObj]]),p.createElementVNode("div",GAe,[p.createElementVNode("div",YAe,[t[6]||(t[6]=p.createElementVNode("span",{class:"font-medium"}," Show ",-1)),p.createElementVNode("div",KAe,[p.createVNode(h,{has_cancel:!1,options:c.showNoOfEntries,modelValue:c.itemsPerPage,"onUpdate:modelValue":t[0]||(t[0]=C=>c.itemsPerPage=C),is_required:!1,field_name:"NoOfEntries",label_name:"",default_value:10,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),t[7]||(t[7]=p.createElementVNode("span",{class:"font-medium"}," Entries ",-1))]),t[9]||(t[9]=p.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),p.createElementVNode("div",JAe,[t[8]||(t[8]=p.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},null,-1)),p.withDirectives(p.createElementVNode("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=C=>c.search=C),class:"gl-input-form",placeholder:"Search ..."},null,512),[[p.vModelText,c.search]])])]),p.createElementVNode("div",e5e,[p.createVNode(y,{onClick:f.delayedPrint,tag:"button",is_loading:c.isLoadinPrint,button_type:"default",has_border_reduced:!1,classes:"rounded-s-lg"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.print)??"Print"),1)]}),_:1},8,["onClick","is_loading"]),p.createVNode(y,{onClick:f.exportToExcel,tag:"button",button_type:"default",has_border_reduced:!1,classes:"rounded-e-lg"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.excel)??"Excel"),1)]}),_:1},8,["onClick"])]),p.createElementVNode("div",{id:"print_"+c.Random_string,class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},[p.createElementVNode("table",{id:"table"+c.Random_string,class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse print:border-collapse! border-spacing-y-5 lg:border-spacing-y-0 print:border-spacing-y-0! dark:border-gray-800 dark:bg-gray-900"},[p.createElementVNode("thead",o5e,[p.createElementVNode("tr",null,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(C,T)=>(p.openBlock(),p.createElementBlock("th",{key:T,onClick:R=>f.sort(C.field_name,C.sortable),class:"w-full px-4 py-2 lg:w-2/12 print:w-2/12! print:border-[1px]!"},[p.createElementVNode("div",r5e,[p.createElementVNode("span",null,p.toDisplayString(C.field_label),1),c.sortKey===C.field_name?(p.openBlock(),p.createElementBlock("span",i5e,t[10]||(t[10]=[p.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 20V7m0 13-4-4m4 4 4-4m4-12v13m0-13 4 4m-4-4-4 4"})],-1)]))):p.createCommentVNode("",!0)])],8,s5e))),128))])]),p.createElementVNode("tbody",a5e,[c.isLoading?(p.openBlock(),p.createElementBlock("tr",l5e,[p.createElementVNode("td",{colspan:o.columns.length},t[11]||(t[11]=[p.createElementVNode("div",{role:"status",class:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded-sm shadow-sm animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700"},[p.createElementVNode("div",{class:"flex items-center justify-between"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),p.createElementVNode("span",{class:"sr-only"},"Loading...")],-1)]),8,c5e)])):p.createCommentVNode("",!0),c.isLoading?p.createCommentVNode("",!0):(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:1},p.renderList(f.paginatedData,(C,T)=>(p.openBlock(),p.createElementBlock("tr",{key:T,class:"text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(R,B)=>(p.openBlock(),p.createElementBlock("td",{key:B,"data-label":R.field_label,class:p.normalizeClass(["text-pretty before:content-[attr(data-label)] before:font-bold dark:before:text-gray-400 lg:before:content-[''] print:before:content-['']! flex flex-col justify-between gap-2 lg:table-cell print:table-cell! py-4 px-5 lg:py-3 lg:px-4 print:py-3! print:px-4! border-[1px]! dark:border-gray-700",{"rounded-t-lg lg:rounded-t-none!":B===0,"rounded-b-lg lg:rounded-b-none!":B===o.columns.length-1}])},[p.createElementVNode("div",{class:p.normalizeClass([R.field_name==="action"?"":"overflow-auto","td_overflow_auto max-h-40 max-w-100"])},[R.tdComp?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(f.forDynCompIs(R.tdComp)),{key:0,row:C,field:R.field_name,xprops:o.xprops,tdProps:R.tdProps,onEditAction:V=>f.editAction(C),onGeneralAction:V=>f.generalAction(C)},null,40,["row","field","xprops","tdProps","onEditAction","onGeneralAction"])):(p.openBlock(),p.createElementBlock("p",{key:1,class:"text-pretty",innerHTML:C[R.field_name]},null,8,d5e))],2)],10,u5e))),128))]))),128))])],8,n5e)],8,t5e),f.paginatedData.length>0?(p.openBlock(),p.createElementBlock("div",f5e,[p.createElementVNode("div",h5e,[p.createElementVNode("a",{href:"#",onClick:t[2]||(t[2]=p.withModifiers((...C)=>f.previousPage&&f.previousPage(...C),["prevent"])),disabled:c.currentPage===1,class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Previous",8,m5e),p.createElementVNode("a",{href:"#",onClick:t[3]||(t[3]=p.withModifiers((...C)=>f.nextPage&&f.nextPage(...C),["prevent"])),disabled:c.currentPage===f.totalPages,class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Next",8,g5e)]),p.createElementVNode("div",p5e,[p.createElementVNode("div",null,[p.createElementVNode("p",b5e,[t[12]||(t[12]=p.createTextVNode(" Showing ")),p.createElementVNode("span",y5e,p.toDisplayString(f.firstItemIndex),1),t[13]||(t[13]=p.createTextVNode(" to ")),p.createElementVNode("span",O5e,p.toDisplayString(f.lastItemIndex),1),t[14]||(t[14]=p.createTextVNode(" of ")),p.createElementVNode("span",x5e,p.toDisplayString(f.filteredData.length),1),t[15]||(t[15]=p.createTextVNode(" entries "))])]),p.createElementVNode("div",null,[p.createElementVNode("nav",v5e,[p.createElementVNode("ul",w5e,[p.createElementVNode("li",null,[p.createElementVNode("a",{href:"#",onClick:t[4]||(t[4]=p.withModifiers((...C)=>f.previousPage&&f.previousPage(...C),["prevent"])),disabled:c.currentPage===1,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},t[16]||(t[16]=[p.createElementVNode("span",{class:"sr-only"},"Previous",-1),p.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1)]),8,S5e)]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.displayedPageNumbers,C=>(p.openBlock(),p.createElementBlock(p.Fragment,{key:C},[p.createElementVNode("li",null,[c.currentPage!==C?(p.openBlock(),p.createElementBlock("a",{key:0,href:"#",onClick:p.withModifiers(T=>f.goToPage(C),["prevent"]),class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},p.toDisplayString(C),9,k5e)):p.createCommentVNode("",!0)]),p.createElementVNode("li",null,[c.currentPage===C?(p.openBlock(),p.createElementBlock("a",{key:0,href:"#",onClick:p.withModifiers(T=>f.goToPage(C),["prevent"]),"aria-current":"page",class:"z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"},p.toDisplayString(C),9,C5e)):p.createCommentVNode("",!0)])],64))),128)),p.createElementVNode("li",null,[p.createElementVNode("a",{href:"#",onClick:t[5]||(t[5]=p.withModifiers((...C)=>f.nextPage&&f.nextPage(...C),["prevent"])),disabled:c.currentPage===f.totalPages,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},t[17]||(t[17]=[p.createElementVNode("span",{class:"sr-only"},"Next",-1),p.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1)]),8,E5e)])])])])])])):p.createCommentVNode("",!0)])}const T5e=vi(XAe,[["render",_5e],["__scopeId","data-v-6d5541af"]]),A5e={components:{TailwindPagination:OU},props:{data:Array,columns:Array,get_item_url:String,xprops:Object,refreshData:Boolean,groupField:String},data(){return{isLoading:!1,isMounted:!1,limit:5,showDisabled:!1,size:"default",align:"left",search:"",isDropdownOpen:!1,itemLists:[],tableData:[],sortField:this.columns[0].field_name,sortOrder:"desc",pageOptions:[5,10,20,50],perPage:5,page:1}},emits:["editAction"],computed:{filteredData(){const r=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(a=>a.toString().toLowerCase().includes(r)))},groupedItems(){return this.groupBy(this.groupField)}},methods:{groupBy(r){return this.itemLists.data?this.itemLists.data.reduce((t,o)=>{const a=o[r];t[a]||(t[a]=[]);const c={...o};return delete c[r],t[a].push(c),t},{}):[]},editAction(r){this.$emit("editAction",r)},forDynCompIs(r){return typeof r=="object"?r:null},GetItemLists(r=1){this.isLoading=!0,this.page=r;const t={sort:this.sortField,order:this.sortOrder,s:this.search,limit:this.perPage,page:this.page};axios.get(this.xprops.route_get_data,{params:t}).then(o=>{this.itemLists=o.data,this.isLoading=!1}).catch(o=>{console.error(o),this.isLoading=!1})},updateSortColumn(r,t){t&&(r===this.sortField?this.sortOrder=this.sortOrder==="asc"?"desc":"asc":(this.sortField=r,this.sortOrder="asc"),this.GetItemLists(this.page))},handleSearch(){this.sortField=this.columns[0].field_name,this.sortOrder="asc",this.page=1,this.GetItemLists(this.page)}},mounted(){this.GetItemLists(),this.isMounted=!0},watch:{searchFilter(){this.filteredOptions.length===0?this.selected={}:this.selected=this.filteredOptions[0]},perPage(r){this.page=1,this.perPage=r,this.GetItemLists(this.page)},refreshData(r,t){this.isMounted&&r!==t&&this.GetItemLists()}}},P5e={class:"p-0"},D5e={class:"flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between"},N5e={class:"flex items-center gap-2"},$5e={class:"font-medium"},R5e={class:"mt-[3px]"},B5e={class:"font-medium"},M5e={class:"relative"},F5e=["placeholder"],L5e={class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},I5e={class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse print:border-collapse! border-spacing-y-5 lg:border-spacing-y-0 print:border-spacing-y-0! dark:border-gray-800 dark:bg-gray-900"},V5e={class:"hidden text-sm font-normal text-center text-gray-600 print:table-header-group! lg:table-header-group dark:border-gray-600 bg-gray-50 dark:bg-gray-800 dark:text-gray-400 print:border-[1px]!"},Q5e=["onClick"],z5e={class:"inline-flex items-center justify-center gap-1"},H5e={key:0,class:"print:hidden!"},Z5e={class:"bg-white dark:bg-gray-900"},U5e={key:0},W5e=["colspan"],X5e={class:"text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"},q5e=["colspan"],j5e=["data-label"],G5e={class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"};function Y5e(r,t,o,a,c,f){var w,C,T,R;const h=p.resolveComponent("dropdown"),y=p.resolveComponent("TailwindPagination");return p.openBlock(),p.createElementBlock("div",P5e,[p.createElementVNode("div",D5e,[p.createElementVNode("div",N5e,[p.createElementVNode("span",$5e,p.toDisplayString(((w=r.language)==null?void 0:w.show)??"Show"),1),p.createElementVNode("div",R5e,[p.createVNode(h,{options_top_size:0,has_cancel:!1,options:c.pageOptions,modelValue:c.perPage,"onUpdate:modelValue":t[0]||(t[0]=B=>c.perPage=B),is_required:!1,field_name:"perPage",label_name:"",default_value:5,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),p.createElementVNode("span",B5e,p.toDisplayString(((C=r.language)==null?void 0:C.entries)??"Entries"),1)]),t[5]||(t[5]=p.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),p.createElementVNode("div",M5e,[t[4]||(t[4]=p.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},null,-1)),p.withDirectives(p.createElementVNode("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=B=>c.search=B),onInput:t[2]||(t[2]=B=>f.handleSearch()),class:"gl-input-form",placeholder:(T=r.language)!=null&&T.search?((R=r.language)==null?void 0:R.search)+" ...":"Search ..."},null,40,F5e),[[p.vModelText,c.search]])])]),p.createElementVNode("div",L5e,[p.createElementVNode("table",I5e,[p.createElementVNode("thead",V5e,[p.createElementVNode("tr",null,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(B,V)=>(p.openBlock(),p.createElementBlock("th",{key:V,onClick:q=>f.updateSortColumn(B.field_name,B.sortable),class:"w-full px-4 py-2 lg:w-2/12"},[p.createElementVNode("div",z5e,[p.createElementVNode("span",null,p.toDisplayString(B.field_label),1),c.sortField===B.field_name?(p.openBlock(),p.createElementBlock("span",H5e,t[6]||(t[6]=[p.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 20V7m0 13-4-4m4 4 4-4m4-12v13m0-13 4 4m-4-4-4 4"})],-1)]))):p.createCommentVNode("",!0)])],8,Q5e))),128))])]),p.createElementVNode("tbody",Z5e,[c.isLoading?(p.openBlock(),p.createElementBlock("tr",U5e,[p.createElementVNode("td",{colspan:o.columns.length},t[7]||(t[7]=[p.createElementVNode("div",{role:"status",class:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded-sm shadow-sm animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700"},[p.createElementVNode("div",{class:"flex items-center justify-between"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("span",{class:"sr-only"},"Loading...")],-1)]),8,W5e)])):p.createCommentVNode("",!0),c.isLoading?p.createCommentVNode("",!0):(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:1},p.renderList(f.groupedItems,(B,V)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createElementVNode("tr",X5e,[p.createElementVNode("td",{colspan:o.columns.length,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-3 lg:px-4 border dark:border-gray-700"},p.toDisplayString(V),9,q5e)]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(B,(q,X)=>(p.openBlock(),p.createElementBlock("tr",{key:X,class:"text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(Y,he)=>(p.openBlock(),p.createElementBlock("td",{key:he,"data-label":Y.field_label,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-3 lg:px-4 border-[1px]! dark:border-gray-700"},[p.createElementVNode("div",{class:p.normalizeClass([Y.field_name==="action"?"":"overflow-auto","td_overflow_auto max-h-40 max-w-100"])},[Y.tdComp?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(f.forDynCompIs(Y.tdComp)),{key:0,row:q,field:Y.field_name,xprops:o.xprops,tdProps:Y.tdProps,onDeleteAction:t[3]||(t[3]=Se=>f.GetItemLists()),onEditAction:Se=>f.editAction(q)},null,40,["row","field","xprops","tdProps","onEditAction"])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[p.createTextVNode(p.toDisplayString(q[Y.field_name]),1)],64))],2)],8,j5e))),128))]))),128))],64))),256))])])]),p.createElementVNode("div",G5e,[p.createVNode(y,{class:"mt-3 mb-0",data:c.itemLists,limit:c.limit,size:c.size,align:c.align,onPaginationChangePage:f.GetItemLists},null,8,["data","limit","size","align","onPaginationChangePage"])])])}const K5e=vi(A5e,[["render",Y5e],["__scopeId","data-v-1995ac95"]]),J5e={components:{},props:{data:Array,columns:Array,language:{type:Object,required:!1,default:()=>{}}},data(){const r=this.generateRandomString(6);return{isLoadinPrint:!1,Random_string:r,printObj:{id:"print_"+r,popTitle:"",beforeOpenCallback(t){},openCallback(t){t.isLoadinPrint=!1},closeCallback(t){t.isLoadinPrint=!1}},showNoOfEntries:[5,10,20,50,100,200,300,400,500,600,700,800,900,1e3,2e3,3e3,4e3,5e3,6e3,7e3,8e3,9e3,1e4,11e3,12e3,13e3,14e3,15e3,16e3,17e3,18e3,19e3,2e4],search:"",sortKey:"",sortOrder:1,currentPage:1,itemsPerPage:10,jumpToPage:"",maxDisplayedPages:10}},computed:{filteredData(){const r=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(a=>a!=null&&a.toString().toLowerCase().includes(r)))},totalPages(){return Math.ceil(this.filteredData.length/this.itemsPerPage)},paginatedData(){const r=(this.currentPage-1)*this.itemsPerPage,t=r+this.itemsPerPage;return this.filteredData.slice(r,t)},displayedPageNumbers(){let r=Math.max(this.currentPage-Math.floor(this.maxDisplayedPages/2),1),t=r+this.maxDisplayedPages-1;return t>this.totalPages&&(t=this.totalPages,r=Math.max(t-this.maxDisplayedPages+1,1)),Array.from({length:t-r+1},(o,a)=>r+a)},firstItemIndex(){return this.itemsPerPage*(this.currentPage-1)+1},lastItemIndex(){const r=this.itemsPerPage*this.currentPage;return r>this.filteredData.length?this.filteredData.length:r}},methods:{exportToExcel(){const r=document.querySelector("#table"+this.Random_string),t=Array.from(r.querySelectorAll("thead th")).map(R=>R.innerText),a=["",...["action"]],c=t.map((R,B)=>a.includes(R)?B:-1).filter(R=>R!==-1),f=Array.from(r.querySelectorAll("tbody tr")).map(R=>Array.from(R.querySelectorAll("td")).map(V=>V.innerText).filter((V,q)=>!c.includes(q))),y=[t.filter((R,B)=>!c.includes(B)),...f],w=vb.aoa_to_sheet(y),C=vb.book_new();vb.book_append_sheet(C,w,"Sheet1"),KU(C,"exported-file.xlsx")},generateRandomString(r){let t="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=o.length;for(let c=0;c<r;c++)t+=o.charAt(Math.floor(Math.random()*a));return t},delayedPrint(){this.isLoadinPrint=!0,this.$nextTick(()=>{var r;(r=this.$refs.hiddenPrintBtn)==null||r.click(),this.isLoadinPrint=!1})},handleItemsPerPageChange(r){this.itemsPerPage=r},goToPage(r){r>=1&&r<=this.totalPages&&(this.currentPage=r)},sort(r){r===this.sortKey?this.sortOrder*=-1:(this.sortKey=r,this.sortOrder=1)},sortData(r){return this.sortKey?r.slice().sort((t,o)=>(t[this.sortKey]<o[this.sortKey]?-1:1)*this.sortOrder):r},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},firstPage(){this.currentPage=1},lastPage(){this.currentPage=this.totalPages},goToPage(r){r>=1&&r<=this.totalPages&&(this.currentPage=r)}},directives:{print:eW}},ePe={class:"p-0"},tPe={ref:"hiddenPrintBtn",style:{display:"none"}},nPe={class:"flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between"},oPe={class:"flex items-center gap-2"},sPe={class:"mt-[9px]"},rPe={class:"relative"},iPe={class:"flex flex-wrap mb-3"},aPe=["id"],lPe=["id"],cPe={class:"hidden text-sm font-normal text-center text-gray-600 print:table-header-group! lg:table-header-group dark:border-gray-600 bg-gray-50 dark:bg-gray-800 dark:text-gray-400 print:border-[1px]!"},uPe=["onClick"],dPe={class:"inline-flex items-center justify-center gap-1"},fPe={key:0,class:"print:hidden!"},hPe={class:"bg-white dark:bg-gray-900"},mPe=["data-label"],gPe=["innerHTML"],pPe={key:0,class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"},bPe={class:"flex justify-between flex-1 sm:hidden"},yPe=["disabled"],OPe=["disabled"],xPe={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"},vPe={class:"text-sm text-gray-700 dark:text-gray-400"},wPe={class:"font-medium"},SPe={class:"font-medium"},kPe={class:"font-medium"},CPe={"aria-label":"Page navigation"},EPe={class:"flex items-center h-8 -space-x-px text-sm"},_Pe=["disabled"],TPe=["onClick"],APe=["onClick"],PPe=["disabled"];function DPe(r,t,o,a,c,f){const h=p.resolveComponent("dropdown"),y=p.resolveComponent("gl-button"),w=p.resolveDirective("print");return p.openBlock(),p.createElementBlock("div",ePe,[p.withDirectives(p.createElementVNode("button",tPe,null,512),[[w,c.printObj]]),p.createElementVNode("div",nPe,[p.createElementVNode("div",oPe,[t[6]||(t[6]=p.createElementVNode("span",{class:"font-medium"}," Show ",-1)),p.createElementVNode("div",sPe,[p.createVNode(h,{has_cancel:!1,options:c.showNoOfEntries,modelValue:c.itemsPerPage,"onUpdate:modelValue":t[0]||(t[0]=C=>c.itemsPerPage=C),is_required:!1,field_name:"NoOfEntries",label_name:"",default_value:10,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),t[7]||(t[7]=p.createElementVNode("span",{class:"font-medium"}," Entries ",-1))]),t[9]||(t[9]=p.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),p.createElementVNode("div",rPe,[t[8]||(t[8]=p.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},null,-1)),p.withDirectives(p.createElementVNode("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=C=>c.search=C),class:"gl-input-form",placeholder:"Search ..."},null,512),[[p.vModelText,c.search]])])]),p.createElementVNode("div",iPe,[p.createVNode(y,{onClick:f.delayedPrint,tag:"button",is_loading:c.isLoadinPrint,button_type:"default",has_border_reduced:!1,classes:"rounded-s-lg"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.print)??"Print"),1)]}),_:1},8,["onClick","is_loading"]),p.createVNode(y,{onClick:f.exportToExcel,tag:"button",button_type:"default",has_border_reduced:!1,classes:"rounded-e-lg"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.excel)??"Excel"),1)]}),_:1},8,["onClick"])]),p.createElementVNode("div",{id:"print_"+c.Random_string,class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},[p.createElementVNode("table",{id:"table"+c.Random_string,class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse print:border-collapse! border-spacing-y-5 lg:border-spacing-y-0 print:border-spacing-y-0! dark:border-gray-800 dark:bg-gray-900"},[p.createElementVNode("thead",cPe,[p.createElementVNode("tr",null,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(C,T)=>(p.openBlock(),p.createElementBlock("th",{key:T,onClick:p.withModifiers(R=>f.sort(C),["prevent"]),class:"w-full px-4 py-2 lg:w-2/12 print:w-2/12! print:border-[1px]!"},[p.createElementVNode("div",dPe,[p.createElementVNode("span",null,p.toDisplayString(C),1),c.sortKey===C?(p.openBlock(),p.createElementBlock("span",fPe,t[10]||(t[10]=[p.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 20V7m0 13-4-4m4 4 4-4m4-12v13m0-13 4 4m-4-4-4 4"})],-1)]))):p.createCommentVNode("",!0)])],8,uPe))),128))])]),p.createElementVNode("tbody",hPe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.paginatedData,(C,T)=>(p.openBlock(),p.createElementBlock("tr",{key:T,class:"text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(R,B)=>(p.openBlock(),p.createElementBlock("td",{key:B,"data-label":R,class:p.normalizeClass(["text-pretty before:content-[attr(data-label)] before:font-bold dark:before:text-gray-400 lg:before:content-[''] print:before:content-['']! flex flex-col justify-between gap-2 lg:table-cell print:table-cell! py-4 px-5 lg:py-3 lg:px-4 print:py-3! print:px-4! border-[1px]! dark:border-gray-700",{"rounded-t-lg lg:rounded-t-none!":B===0,"rounded-b-lg lg:rounded-b-none!":B===o.columns.length-1}])},[p.createElementVNode("p",{class:"text-pretty",innerHTML:C[B]},null,8,gPe)],10,mPe))),128))]))),128))])],8,lPe)],8,aPe),f.paginatedData.length>0?(p.openBlock(),p.createElementBlock("div",pPe,[p.createElementVNode("div",bPe,[p.createElementVNode("a",{href:"#",onClick:t[2]||(t[2]=p.withModifiers((...C)=>f.previousPage&&f.previousPage(...C),["prevent"])),disabled:c.currentPage===1,class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Previous",8,yPe),p.createElementVNode("a",{href:"#",onClick:t[3]||(t[3]=p.withModifiers((...C)=>f.nextPage&&f.nextPage(...C),["prevent"])),disabled:c.currentPage===f.totalPages,class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Next",8,OPe)]),p.createElementVNode("div",xPe,[p.createElementVNode("div",null,[p.createElementVNode("p",vPe,[t[11]||(t[11]=p.createTextVNode(" Showing ")),p.createElementVNode("span",wPe,p.toDisplayString(f.firstItemIndex),1),t[12]||(t[12]=p.createTextVNode(" to ")),p.createElementVNode("span",SPe,p.toDisplayString(f.lastItemIndex),1),t[13]||(t[13]=p.createTextVNode(" of ")),p.createElementVNode("span",kPe,p.toDisplayString(f.filteredData.length),1),t[14]||(t[14]=p.createTextVNode(" entries "))])]),p.createElementVNode("div",null,[p.createElementVNode("nav",CPe,[p.createElementVNode("ul",EPe,[p.createElementVNode("li",null,[p.createElementVNode("a",{href:"#",onClick:t[4]||(t[4]=p.withModifiers((...C)=>f.previousPage&&f.previousPage(...C),["prevent"])),disabled:c.currentPage===1,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},t[15]||(t[15]=[p.createElementVNode("span",{class:"sr-only"},"Previous",-1),p.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1)]),8,_Pe)]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.displayedPageNumbers,C=>(p.openBlock(),p.createElementBlock(p.Fragment,{key:C},[p.createElementVNode("li",null,[c.currentPage!==C?(p.openBlock(),p.createElementBlock("a",{key:0,href:"#",onClick:p.withModifiers(T=>f.goToPage(C),["prevent"]),class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},p.toDisplayString(C),9,TPe)):p.createCommentVNode("",!0)]),p.createElementVNode("li",null,[c.currentPage===C?(p.openBlock(),p.createElementBlock("a",{key:0,href:"#",onClick:p.withModifiers(T=>f.goToPage(C),["prevent"]),"aria-current":"page",class:"z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"},p.toDisplayString(C),9,APe)):p.createCommentVNode("",!0)])],64))),128)),p.createElementVNode("li",null,[p.createElementVNode("a",{href:"#",onClick:t[5]||(t[5]=p.withModifiers((...C)=>f.nextPage&&f.nextPage(...C),["prevent"])),disabled:c.currentPage===f.totalPages,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},t[16]||(t[16]=[p.createElementVNode("span",{class:"sr-only"},"Next",-1),p.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1)]),8,PPe)])])])])])])):p.createCommentVNode("",!0)])}const NPe=vi(J5e,[["render",DPe],["__scopeId","data-v-c18f6d65"]]),$Pe={props:["field","row","tdProps"],methods:{convertCronToHuman(r){const[t,o,a,c,f]=r.split(" ");if(t==="*"&&o==="*"&&a==="*"&&c==="*"&&f==="*")return"Runs every minute.";if(t==="0"&&o==="0"&&a==="*"&&c==="*"&&f!=="*")return`Runs at 12:00 AM every ${this.convertDayOfWeek(f)}.`;const h={0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday","*":"every day"},y={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December","*":"every month"},w=this.convertField(t,"minute",59),C=this.convertField(o,"hour",23),T=this.convertField(a,"day of the month",31),R=this.convertField(c,"month",12,y),B=this.convertField(f,"day",6,h);return`Runs ${w} ${C} ${T} ${R} on ${B}.`},convertField(r,t,o,a={}){if(r==="*")return`every ${t}`;if(r.includes("/")){const[c,f]=r.split("/");return`every ${f} ${t}${f>1?"s":""} starting at ${c}`}if(r.includes("-")){const[c,f]=r.split("-");return`${t}s from ${c} to ${f}`}if(r.includes(",")){const c=r.split(",").map(f=>a[f]||f);return`${t}s on ${c.join(", ")}`}return a[r]||`${t} ${r}`},convertDayOfWeek(r){return{0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"}[r]||"Invalid day"},formatHour(r){const t=parseInt(r,10),o=t>=12?"PM":"AM";return`${(t%12||12).toString().padStart(2,"0")}:00 ${o}`}}},RPe={key:0,class:"flex flex-wrap gap-2"},BPe={class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm dark:bg-blue-900 dark:text-blue-300"};function MPe(r,t,o,a,c,f){return o.row[o.field]?(p.openBlock(),p.createElementBlock("div",RPe,[p.createElementVNode("span",BPe,p.toDisplayString(f.convertCronToHuman(o.row[o.field])),1)])):p.createCommentVNode("",!0)}const FPe=vi($Pe,[["render",MPe]]),LPe={setup(){const r=p.ref([]),t=c=>{r.value.push(c)},o=c=>{const f=r.value.indexOf(c);f>-1&&r.value.splice(f,1)},a=c=>{r.value.forEach(f=>{f!==c&&f.isOpen&&f.isOpen.value!==void 0&&(f.isOpen.value=!1)}),c.isOpen&&c.isOpen.value!==void 0&&(c.isOpen.value=!c.isOpen.value)};return p.provide("accordionsWrapper",{registerAccordion:t,unregisterAccordion:o,toggleAccordion:a,accordions:r}),{}}};function IPe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",null,[p.renderSlot(r.$slots,"default")])}const VPe=vi(LPe,[["render",IPe]]),QPe={props:{title:{type:String,required:!0}},setup(){const r=p.ref(!1),t=p.inject("accordionsWrapper"),a=(()=>{var C=new Date().getTime();typeof performance<"u"&&typeof performance.now=="function"&&(C+=performance.now());var T="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(R){var B=(C+Math.random()*16)%16|0;return C=Math.floor(C/16),(R==="x"?B:B&3|8).toString(16)});return T})(),c={isOpen:r,id:a},f=p.computed(()=>t.accordions.value),h=p.computed(()=>f.value.length>0&&f.value[0].id===a),y=p.computed(()=>f.value.length>0&&f.value[f.value.length-1].id===a);return p.onMounted(()=>{t.registerAccordion(c)}),p.onUnmounted(()=>{t.unregisterAccordion(c)}),{isOpen:r,isFirstAccordion:h,isLastAccordion:y,toggle:()=>{t.toggleAccordion(c)}}}},zPe={class:"flex items-center"},HPe={key:0,class:"w-3 h-3 rotate-180 shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 6"},ZPe={key:1,class:"w-3 h-3 shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 6"};function UPe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",null,[p.createElementVNode("h2",null,[p.createElementVNode("button",{onClick:t[0]||(t[0]=(...h)=>a.toggle&&a.toggle(...h)),type:"button",class:p.normalizeClass(["flex items-center justify-between w-full gap-3 p-5 font-medium text-gray-500 border border-gray-200 rtl:text-right dark:border-gray-700 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800",{"rounded-t-xl":a.isFirstAccordion,"border-b-0":!a.isLastAccordion,"bg-gray-100 dark:bg-gray-800":a.isOpen}]),"aria-expanded":"true"},[p.createElementVNode("span",zPe,p.toDisplayString(o.title),1),a.isOpen?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("svg",HPe,t[1]||(t[1]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5 5 1 1 5"},null,-1)]))),a.isOpen?(p.openBlock(),p.createElementBlock("svg",ZPe,t[2]||(t[2]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5 5 1 1 5"},null,-1)]))):p.createCommentVNode("",!0)],2)]),a.isOpen?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass([{"border-b-0":!a.isLastAccordion,"border-t-0":a.isLastAccordion},"p-5 border border-gray-200 dark:border-gray-700 dark:bg-gray-900"])},[p.renderSlot(r.$slots,"default")],2)):p.createCommentVNode("",!0)])}const WPe=vi(QPe,[["render",UPe]]),XPe={class:"flex items-center p-4 text-gray-500 bg-white rounded-lg shadow-sm dark:bg-gray-800 dark:text-gray-400",role:"alert"},qPe={key:0,class:"inline-flex items-center justify-center shrink-0 w-8 h-8 text-blue-500 bg-blue-100 rounded-lg dark:bg-blue-800 dark:text-blue-200"},jPe={key:1,class:"inline-flex items-center justify-center shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"},GPe={key:2,class:"inline-flex items-center justify-center shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200"},YPe={key:3,class:"inline-flex items-center justify-center shrink-0 w-8 h-8 text-orange-500 bg-orange-100 rounded-lg dark:bg-orange-700 dark:text-orange-200"},KPe={class:"ml-3 text-sm font-normal"},JPe={__name:"ToastListItem",props:{message:String,duration:{type:Number,default:2e3},type:{type:String,default:"success"}},emits:["remove"],setup(r,{emit:t}){const o=r;p.onMounted(()=>{setTimeout(()=>a("remove"),o.duration)});const a=t;return(c,f)=>(p.openBlock(),p.createElementBlock("div",XPe,[o.type==="info"?(p.openBlock(),p.createElementBlock("div",qPe,f[1]||(f[1]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"})],-1),p.createElementVNode("span",{class:"sr-only"},"info icon",-1)]))):p.createCommentVNode("",!0),o.type==="success"?(p.openBlock(),p.createElementBlock("div",jPe,f[2]||(f[2]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})],-1),p.createElementVNode("span",{class:"sr-only"},"success icon",-1)]))):p.createCommentVNode("",!0),o.type==="error"?(p.openBlock(),p.createElementBlock("div",GPe,f[3]||(f[3]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z"})],-1),p.createElementVNode("span",{class:"sr-only"},"Error icon",-1)]))):p.createCommentVNode("",!0),o.type==="warning"?(p.openBlock(),p.createElementBlock("div",YPe,f[4]||(f[4]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"})],-1),p.createElementVNode("span",{class:"sr-only"},"Warning icon",-1)]))):p.createCommentVNode("",!0),p.createElementVNode("div",KPe,p.toDisplayString(o.message),1),p.createElementVNode("button",{onClick:f[0]||(f[0]=h=>a("remove")),type:"button",class:"-mx-1.5 -my-1.5 ml-auto inline-flex h-8 w-8 rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white","data-dismiss-target":"#toast-default","aria-label":"Close"},f[5]||(f[5]=[p.createElementVNode("span",{class:"sr-only"},"Close",-1),p.createElementVNode("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))]))}},eDe={__name:"GlToastList",setup(r){function t(o){rb.methods.remove(o)}return(o,a)=>(p.openBlock(),p.createBlock(p.TransitionGroup,{tag:"div","enter-from-class":"translate-x-full opacity-0","enter-active-class":"duration-500","leave-active-class":"duration-500","leave-to-class":"translate-x-full opacity-0",class:"fixed z-1060 w-full max-w-xs space-y-4 top-4 right-4"},{default:p.withCtx(()=>[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(p.unref(rb).state.items,(c,f)=>(p.openBlock(),p.createBlock(JPe,{key:c.key,message:c.message,type:c.type,duration:c.duration,onRemove:h=>t(f)},null,8,["message","type","duration","onRemove"]))),128))]),_:1}))}},tDe={key:0,class:"flex lg:justify-center"},nDe={class:"xs:right-[unset] ltr:lg:right-[30px] rtl:lg:left-[30px] absolute z-10 mt-11 origin-top-right bg-white rounded-lg w-44 dark:bg-gray-800 shadow-lg border dark:border-gray-700"},oDe={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},sDe={key:0},rDe=["href"],iDe={key:1},aDe={__name:"DatatableAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(r,{emit:t}){const o=r,a=p.ref(!1),c=p.ref(!1),f=()=>{a.value=!1},h=()=>{a.value=!0},y=()=>{c.value=!1},w=()=>{c.value=!0},C=t,T=()=>{axios.delete(`${o.xprops.route}/${o.row.id}`).then(()=>{y(),C("deleteAction"),rb.methods.add({message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(R=>{console.log(R)})};return(R,B)=>{const V=p.resolveDirective("click-outside");return p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(lA,{isOpen:c.value,onConfirmDelete:T,onCancelDelete:y},null,8,["isOpen"]),r.row&&R.can(`edit_${r.xprops.permission} || delete_${r.xprops.permission}`)?p.withDirectives((p.openBlock(),p.createElementBlock("div",tDe,[p.createElementVNode("button",{onClick:h,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-hidden dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},B[0]||(B[0]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[p.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)])),p.withDirectives(p.createElementVNode("div",nDe,[p.createElementVNode("ul",oDe,[R.can(`edit_${r.xprops.permission}`)?(p.openBlock(),p.createElementBlock("li",sDe,[p.createElementVNode("a",{href:r.xprops.route+"/"+r.row.id+"/edit",class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},B[1]||(B[1]=[p.createElementVNode("i",{class:"mr-2 fa-solid fa-list-ul opacity-80"},null,-1),p.createTextVNode(" Edit")]),8,rDe)])):p.createCommentVNode("",!0),R.can(`delete_${r.xprops.permission}`)?(p.openBlock(),p.createElementBlock("li",iDe,[p.createElementVNode("a",{href:"#",onClick:p.withModifiers(w,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},B[2]||(B[2]=[p.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),p.createTextVNode(" Remove")]))])):p.createCommentVNode("",!0)])],512),[[p.vShow,a.value]])])),[[V,f]]):p.createCommentVNode("",!0)],64)}}},lDe={key:0,class:"flex lg:justify-center"},cDe={class:"absolute z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow-sm w-44 dark:bg-gray-700 dark:divide-gray-600"},uDe={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},dDe={key:0},fDe={__name:"DatatableDeleteAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(r,{emit:t}){const o=r,a=p.ref(!1),c=p.ref(!1),f=()=>{a.value=!1},h=()=>{a.value=!0},y=()=>{c.value=!1},w=()=>{c.value=!0},C=t,T=()=>{axios.delete(`${o.xprops.route}/${o.row.id}`).then(()=>{y(),C("deleteAction"),rb.methods.add({message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(R=>{console.log(R)})};return(R,B)=>{const V=p.resolveDirective("click-outside");return p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(lA,{isOpen:c.value,onConfirmDelete:T,onCancelDelete:y},null,8,["isOpen"]),r.row&&R.can(`delete_${r.xprops.permission}`)?p.withDirectives((p.openBlock(),p.createElementBlock("div",lDe,[p.createElementVNode("button",{onClick:h,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-hidden dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},B[0]||(B[0]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[p.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)])),p.withDirectives(p.createElementVNode("div",cDe,[p.createElementVNode("ul",uDe,[R.can(`delete_${r.xprops.permission}`)?(p.openBlock(),p.createElementBlock("li",dDe,[p.createElementVNode("a",{href:"#",onClick:p.withModifiers(w,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},B[1]||(B[1]=[p.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),p.createTextVNode(" Remove")]))])):p.createCommentVNode("",!0)])],512),[[p.vShow,a.value]])])),[[V,f]]):p.createCommentVNode("",!0)],64)}}},hDe={key:0,class:"flex lg:justify-center"},mDe={class:"xs:right-[unset] ltr:lg:right-[30px] rtl:lg:left-[30px] absolute z-10 mt-11 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow-sm w-44 dark:bg-gray-700 dark:divide-gray-600"},gDe={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},pDe={key:0},bDe={key:1},yDe={__name:"DatatableDeleteEditAction",props:{language:{type:Object,required:!1,default:()=>{}},field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:()=>({})},xprops:{type:Object,default:()=>({})},tdProps:{type:Object,default:()=>({})}},emits:["deleteAction","editAction"],setup(r,{emit:t}){const o=r,a=p.ref(!1),c=p.ref(!1),f=()=>{c.value=!1},h=()=>{c.value=!0},y=()=>{a.value=!1},w=()=>{a.value=!0},C=t,T=B=>{C("editAction",B)},R=()=>{axios.delete(`${o.xprops.route}/${o.row.id}`).then(()=>{var B;f(),C("deleteAction"),rb.methods.add({message:((B=o.language)==null?void 0:B.item_deleted_successfully)??"Item deleted successfully.",type:"success",duration:5e3})}).catch(B=>{console.log(B)})};return(B,V)=>{var X,Y;const q=p.resolveDirective("click-outside");return p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(lA,{language:r.language,isOpen:c.value,onConfirmDelete:R,onCancelDelete:f},null,8,["language","isOpen"]),r.row&&(B.can(`delete_${r.xprops.permission}`)||B.can(`access_${r.xprops.permission}`))?p.withDirectives((p.openBlock(),p.createElementBlock("div",hDe,[p.createElementVNode("button",{onClick:w,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-hidden dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},V[1]||(V[1]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[p.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)])),p.withDirectives(p.createElementVNode("div",mDe,[p.createElementVNode("ul",gDe,[B.can(`access_${r.xprops.permission}`)?(p.openBlock(),p.createElementBlock("li",pDe,[p.createElementVNode("a",{href:"#",onClick:V[0]||(V[0]=p.withModifiers(he=>T(r.row),["prevent"])),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[V[2]||(V[2]=p.createElementVNode("i",{class:"mr-1 fa-solid fa-pen-to-square opacity-80"},null,-1)),p.createTextVNode(" "+p.toDisplayString(((X=r.language)==null?void 0:X.edit)??"Edit"),1)])])):p.createCommentVNode("",!0),B.can(`delete_${r.xprops.permission}`)?(p.openBlock(),p.createElementBlock("li",bDe,[p.createElementVNode("a",{href:"#",onClick:p.withModifiers(h,["prevent"]),class:"block px-4 py-2 text-red-600 hover:text-white hover:bg-red-600 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600"},[V[3]||(V[3]=p.createElementVNode("i",{class:"mr-1 fa-solid fa-trash-can opacity-80"},null,-1)),p.createTextVNode(" "+p.toDisplayString(((Y=r.language)==null?void 0:Y.remove)??"Remove"),1)])])):p.createCommentVNode("",!0)])],512),[[p.vShow,a.value]])])),[[q,y]]):p.createCommentVNode("",!0)],64)}}},ODe={props:["field","row"],computed:{isArray(){return Array.isArray(this.row)},isObject(){return typeof this.row=="object"},isString(){return typeof this.row=="string"}},mounted(){}},xDe=["href","title"],vDe={key:1,class:"m-1 d-inline-block"},wDe=["href","title"];function SDe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",null,[f.isArray?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:0},p.renderList(o.row,(h,y)=>(p.openBlock(),p.createElementBlock("div",{key:y,class:"m-1 d-inline-block"},[p.createElementVNode("a",{href:h,title:h,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},t[0]||(t[0]=[p.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),p.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),p.createTextVNode(" Download ")]),8,xDe)]))),128)):f.isString?(p.openBlock(),p.createElementBlock("div",vDe,[p.createElementVNode("a",{href:o.row,title:o.row,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},t[1]||(t[1]=[p.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),p.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),p.createTextVNode(" Download ")]),8,wDe)])):p.createCommentVNode("",!0)])}const kDe=vi(ODe,[["render",SDe]]),CDe={props:["field","row"],computed:{isArray(){return Array.isArray(this.row[this.field])},isObject(){return typeof this.row[this.field]=="object"}}},EDe=["href","title"],_De={key:1,class:"m-1 d-inline-block"},TDe=["href","title"];function ADe(r,t,o,a,c,f){return f.isArray?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:0},p.renderList(o.row[o.field],h=>(p.openBlock(),p.createElementBlock("div",{key:h.id,class:"m-1 d-inline-block"},[p.createElementVNode("a",{href:h.url,title:h.name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},t[0]||(t[0]=[p.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),p.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),p.createTextVNode(" Download ")]),8,EDe)]))),128)):f.isObject?(p.openBlock(),p.createElementBlock("div",_De,[p.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},t[1]||(t[1]=[p.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),p.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),p.createTextVNode(" Download ")]),8,TDe)])):p.createCommentVNode("",!0)}const PDe=vi(CDe,[["render",ADe]]),DDe={props:["field","row","tdProps"]},NDe={key:0},$De=["innerHTML"];function RDe(r,t,o,a,c,f){return o.row[o.field]?(p.openBlock(),p.createElementBlock("div",NDe,[p.createElementVNode("div",{class:"w-full",innerHTML:o.row[o.field]},null,8,$De)])):p.createCommentVNode("",!0)}const BDe=vi(DDe,[["render",RDe]]),MDe={props:["field","row","tdProps"],computed:{entry(){const[r,t]=this.field.split(".");return p.markRaw({key:r,field:t})},isArray(){return Array.isArray(this.row[this.entry.key])},isObject(){return typeof this.row[this.entry.key]=="object"}}},FDe={key:0,class:"flex flex-wrap gap-2"},LDe={key:1,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm dark:bg-blue-900 dark:text-blue-300"};function IDe(r,t,o,a,c,f){return this.row[this.entry.key]?(p.openBlock(),p.createElementBlock("div",FDe,[f.isArray?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:0},p.renderList(o.row[f.entry.key],(h,y)=>(p.openBlock(),p.createElementBlock("span",{key:y,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm dark:bg-blue-900 dark:text-blue-300"},p.toDisplayString(h[f.entry.field]),1))),128)):f.isObject?(p.openBlock(),p.createElementBlock("span",LDe,p.toDisplayString(o.row[f.entry.key][f.entry.field]),1)):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)}const VDe=vi(MDe,[["render",IDe]]),QDe={props:["field","row","tdProps"],computed:{entry(){const r=this.field.split("."),t=r.pop();return{keys:r,field:t}},isArray(){return Array.isArray(this.getNestedValue(this.row,this.entry.keys))},isObject(){return typeof this.getNestedValue(this.row,this.entry.keys)=="object"}},methods:{getNestedValue(r,t){return t.reduce((o,a)=>(o||{})[a],r)}}},zDe={class:"flex flex-wrap gap-2"},HDe={key:1,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm dark:bg-blue-900 dark:text-blue-300"};function ZDe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",zDe,[f.isArray?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:0},p.renderList(f.getNestedValue(o.row,f.entry.keys),(h,y)=>(p.openBlock(),p.createElementBlock("span",{key:y,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm dark:bg-blue-900 dark:text-blue-300"},p.toDisplayString(h[f.entry.field]),1))),128)):f.isObject?(p.openBlock(),p.createElementBlock("span",HDe,p.toDisplayString(f.getNestedValue(o.row,f.entry.keys)[f.entry.field]),1)):p.createCommentVNode("",!0)])}const UDe=vi(QDe,[["render",ZDe]]),WDe={props:["field","row","tdProps"]},XDe={key:0},qDe={class:"m-1 d-inline-block"},jDe=["href","title"],GDe=["src","alt","title"];function YDe(r,t,o,a,c,f){return o.row[o.field]?(p.openBlock(),p.createElementBlock("div",XDe,[p.createElementVNode("div",qDe,[p.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank"},[p.createElementVNode("img",{src:o.row[o.field].thumbnail,alt:o.row[o.field].name,title:o.row[o.field].name},null,8,GDe)],8,jDe)])])):p.createCommentVNode("",!0)}const KDe=vi(WDe,[["render",YDe],["__scopeId","data-v-18c4893e"]]),JDe={props:["field","row","tdProps"],computed:{isArray(){return Array.isArray(this.row[this.field])},isObject(){return typeof this.row[this.field]=="object"}}},eNe={key:0,class:"grid grid-cols-2 gap-4"},tNe=["src","alt"],nNe={key:1},oNe=["src","alt"];function sNe(r,t,o,a,c,f){return f.isArray?(p.openBlock(),p.createElementBlock("div",eNe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.row[o.field],h=>(p.openBlock(),p.createElementBlock("div",{key:h.id},[p.createElementVNode("img",{class:"h-auto max-w-full rounded-lg",src:h.thumbnail,alt:h.file_name},null,8,tNe)]))),128))])):f.isObject?(p.openBlock(),p.createElementBlock("div",nNe,[p.createElementVNode("img",{class:"h-auto max-w-full rounded-lg",src:o.row[o.field].thumbnail,alt:o.row[o.field].file_name},null,8,oNe)])):p.createCommentVNode("",!0)}const rNe=vi(JDe,[["render",sNe]]),iNe={props:["field","row","tdProps"],computed:{isActive(){return this.row[this.field]===1}}},aNe={class:"flex flex-wrap gap-2 text-nowrap"},lNe={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},cNe={key:1,class:"inline-flex items-center px-2 py-1 bg-red-100 text-red-800 text-xs font-medium rounded-full dark:bg-red-900 dark:text-red-300"};function uNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",aNe,[f.isActive?(p.openBlock(),p.createElementBlock("span",lNe,t[0]||(t[0]=[p.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),p.createTextVNode(" Active ")]))):f.isActive?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("span",cNe,t[1]||(t[1]=[p.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1),p.createTextVNode(" Inactive ")])))])}const dNe=vi(iNe,[["render",uNe]]),fNe={props:["field","row","tdProps"],computed:{hasLabelColor(r){const t=this.tdProps.status_general_labels_color.find(o=>o.label===this.row[this.field]);return t?t.class:""}}},hNe={class:"flex flex-wrap gap-2 text-nowrap"},mNe={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},gNe={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-red-800 bg-red-100 rounded-full dark:bg-red-900 dark:text-red-300"},pNe={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},bNe={key:3,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-gray-700 dark:text-blue-400"},yNe={key:4,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"};function ONe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",hNe,[f.hasLabelColor=="green"?(p.openBlock(),p.createElementBlock("span",mNe,[t[0]||(t[0]=p.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(this.row[this.field]),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="red"?(p.openBlock(),p.createElementBlock("span",gNe,[t[1]||(t[1]=p.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(this.row[this.field]),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="yellow"?(p.openBlock(),p.createElementBlock("span",pNe,[t[2]||(t[2]=p.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(this.row[this.field]),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="default"?(p.openBlock(),p.createElementBlock("span",bNe,[t[3]||(t[3]=p.createElementVNode("span",{class:"w-2 h-2 bg-blue-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(this.row[this.field]),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="animate"?(p.openBlock(),p.createElementBlock("span",yNe,[t[4]||(t[4]=p.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[p.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),p.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1)),p.createTextVNode(" "+p.toDisplayString(this.row[this.field]),1)])):p.createCommentVNode("",!0)])}const xNe=vi(fNe,[["render",ONe]]),vNe={props:["field","row","tdProps"],computed:{hasLabelColor(){return this.tdProps.specfic_color??""},badgeType(){switch(this.tdProps.badge_type){case"Default":return"rounded-sm text-xs";case"Large":return"rounded-sm text-sm ";case"Bordered":return"rounded-sm text-xs border";case"Pills":return"rounded-full text-xs";default:return""}}}},wNe={class:"flex flex-wrap gap-2 text-nowrap lg:justify-center"};function SNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",wNe,[f.hasLabelColor=="Default"?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["bg-blue-100 text-blue-800 font-medium me-2 px-2.5 py-0.5 dark:bg-blue-900 dark:text-blue-300 border-blue-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Dark"?(p.openBlock(),p.createElementBlock("span",{key:1,class:p.normalizeClass(["bg-gray-100 text-gray-800 font-medium me-2 px-2.5 py-0.5 dark:bg-gray-700 dark:text-gray-300 border-gray-500",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Red"?(p.openBlock(),p.createElementBlock("span",{key:2,class:p.normalizeClass(["bg-red-100 text-red-800 font-medium me-2 px-2.5 py-0.5 dark:bg-red-900 dark:text-red-300 border-red-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Green"?(p.openBlock(),p.createElementBlock("span",{key:3,class:p.normalizeClass(["bg-green-100 text-green-800 font-medium me-2 px-2.5 py-0.5 dark:bg-green-900 dark:text-green-300 border-green-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Yellow"?(p.openBlock(),p.createElementBlock("span",{key:4,class:p.normalizeClass(["bg-yellow-100 text-yellow-800 font-medium me-2 px-2.5 py-0.5 dark:bg-yellow-900 dark:text-yellow-300 border-yellow-300",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Indigo"?(p.openBlock(),p.createElementBlock("span",{key:5,class:p.normalizeClass(["bg-indigo-100 text-indigo-800 font-medium me-2 px-2.5 py-0.5 dark:bg-indigo-900 dark:text-indigo-300 border-indigo-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Purple"?(p.openBlock(),p.createElementBlock("span",{key:6,class:p.normalizeClass(["bg-purple-100 text-purple-800 font-medium me-2 px-2.5 py-0.5 dark:bg-purple-900 dark:text-purple-300 border-purple-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Pink"?(p.openBlock(),p.createElementBlock("span",{key:7,class:p.normalizeClass(["bg-pink-100 text-pink-800 font-medium me-2 px-2.5 py-0.5 dark:bg-pink-900 dark:text-pink-300 border-pink-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0)])}const kNe=vi(vNe,[["render",SNe]]),CNe={props:["field","row","tdProps"],computed:{entry(){const r=this.field.split("."),t=r.pop();return{keys:r,field:t}},isArray(){return Array.isArray(this.getNestedValue(this.row,this.entry.keys))},isObject(){return typeof this.getNestedValue(this.row,this.entry.keys)=="object"},hasLabelColor(r){const t=this.tdProps.status_general_labels_color.find(o=>o.text===this.getValue());return t?t.class:""},getLabel(){const r=this.tdProps.status_general_labels_color.find(t=>t.text===this.getValue());return r?r.label:""}},methods:{getValue(){return this.isObject?this.getNestedValue(this.row,this.entry.keys)[this.entry.field]:this.row[this.field]},getNestedValue(r,t){return t.reduce((o,a)=>(o||{})[a],r)}}},ENe={class:"flex flex-wrap gap-2 text-nowrap"},_Ne={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},TNe={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-red-800 bg-red-100 rounded-full dark:bg-red-900 dark:text-red-300"},ANe={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},PNe={key:3,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-gray-700 dark:text-blue-400"},DNe={key:4,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"};function NNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",ENe,[f.hasLabelColor=="green"?(p.openBlock(),p.createElementBlock("span",_Ne,[t[0]||(t[0]=p.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(f.getLabel),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="red"?(p.openBlock(),p.createElementBlock("span",TNe,[t[1]||(t[1]=p.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(f.getLabel),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="yellow"?(p.openBlock(),p.createElementBlock("span",ANe,[t[2]||(t[2]=p.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(f.getLabel),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="default"?(p.openBlock(),p.createElementBlock("span",PNe,[t[3]||(t[3]=p.createElementVNode("span",{class:"w-2 h-2 bg-blue-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(f.getLabel),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="animate"?(p.openBlock(),p.createElementBlock("span",DNe,[t[4]||(t[4]=p.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[p.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),p.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1)),p.createTextVNode(" "+p.toDisplayString(f.getLabel),1)])):p.createCommentVNode("",!0)])}const $Ne=vi(CNe,[["render",NNe]]),RNe={props:["field","row","tdProps"],computed:{formattedDate(){if(!this.row[this.field])return"";const r=new Date(this.row[this.field]),t=r.getFullYear(),o=r.toLocaleString("default",{month:"long"}),a=r.getDate();let c=r.getHours();const f=r.getMinutes(),h=r.getSeconds(),y=c>=12?"pm":"am";return c=c%12,c=c||12,`${o} ${a}, ${t}, ${c}:${f}:${h} ${y}`}}},BNe={class:"w-full"};function MNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",BNe,p.toDisplayString(f.formattedDate),1)}const FNe=vi(RNe,[["render",MNe]]),LNe={props:["field","row","tdProps"],computed:{formattedDate(){if(!this.row[this.field])return"";const r=new Date(this.row[this.field]),t=r.getFullYear(),o=r.toLocaleString("default",{month:"long"}),a=r.getDate();return`${o} ${a}, ${t}`}}},INe={class:"w-full"};function VNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",INe,p.toDisplayString(f.formattedDate),1)}const QNe=vi(LNe,[["render",VNe]]),zNe={props:["field","row","tdProps"]},HNe={class:"flex flex-wrap gap-2 text-nowrap"},ZNe={key:0,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"},UNe={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},WNe={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"};function XNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",HNe,[o.row[o.field]===0?(p.openBlock(),p.createElementBlock("span",ZNe,t[0]||(t[0]=[p.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[p.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),p.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1),p.createTextVNode(" Provisioning")]))):p.createCommentVNode("",!0),o.row[o.field]===2?(p.openBlock(),p.createElementBlock("span",UNe,t[1]||(t[1]=[p.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1),p.createTextVNode(" Paused ")]))):p.createCommentVNode("",!0),o.row[o.field]===1?(p.openBlock(),p.createElementBlock("span",WNe,t[2]||(t[2]=[p.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),p.createTextVNode(" Active ")]))):p.createCommentVNode("",!0)])}const qNe=vi(zNe,[["render",XNe]]),jNe={props:["field","row","tdProps"]},GNe={key:0,class:"text-nowrap w-full"},YNe={class:"w-full h-full p-3 mx-0 mt-0 overflow-auto font-mono text-left break-words rounded-sm cursor-default whitespace-nowrap console_styles"};function KNe(r,t,o,a,c,f){return o.row[o.field]?(p.openBlock(),p.createElementBlock("div",GNe,[p.createElementVNode("pre",YNe," "+p.toDisplayString(o.row[o.field])+`
212
+ </svg>`},{default:p.withCtx(()=>{var de;return[p.createTextVNode(p.toDisplayString(((de=o.language)==null?void 0:de.delete_selected)??"Delete selected")+" "+p.toDisplayString(c.checkedIds.length>0?`(${c.checkedIds.length})`:""),1)]}),_:1},8,["onClick","is_disabled"])):p.createCommentVNode("",!0)]),p.createElementVNode("div",{id:"print_"+c.Random_string,class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},[p.createElementVNode("table",{id:"table"+c.Random_string,class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse print:border-collapse! border-spacing-y-5 lg:border-spacing-y-0 print:border-spacing-y-0! dark:border-gray-800 dark:bg-gray-900"},[p.createElementVNode("thead",NAe,[p.createElementVNode("tr",null,[o.enable_select_deselect_delete?(p.openBlock(),p.createElementBlock("th",$Ae)):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.visibleColumns,(de,xt)=>(p.openBlock(),p.createElementBlock("th",{key:xt,onClick:je=>f.updateSortColumn(de.field_name,de.sortable),class:"w-full px-4 py-2 lg:w-2/12 print:w-2/12! print:border-[1px]!"},[p.createElementVNode("div",BAe,[p.createElementVNode("span",null,p.toDisplayString(de.field_label),1),c.sortField===de.field_name?(p.openBlock(),p.createElementBlock("span",MAe,t[8]||(t[8]=[p.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 20V7m0 13-4-4m4 4 4-4m4-12v13m0-13 4 4m-4-4-4 4"})],-1)]))):p.createCommentVNode("",!0)])],8,RAe))),128))])]),p.createElementVNode("tbody",FAe,[c.isLoading?(p.openBlock(),p.createElementBlock("tr",LAe,[p.createElementVNode("td",{colspan:o.columns.length+(o.enable_select_deselect_delete?1:0)},t[9]||(t[9]=[p.createElementVNode("div",{role:"status",class:"w-full p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded-sm shadow-sm animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700"},[p.createElementVNode("div",{class:"flex items-center justify-between"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("span",{class:"sr-only"},"Loading...")],-1)]),8,IAe)])):p.createCommentVNode("",!0),c.isLoading?p.createCommentVNode("",!0):(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:1},p.renderList(c.itemLists.data,(de,xt)=>(p.openBlock(),p.createElementBlock("tr",{key:xt,class:"text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"},[o.enable_select_deselect_delete?(p.openBlock(),p.createElementBlock("td",VAe,[p.createElementVNode("input",{checked:c.checkedIds.includes(de.id),onChange:je=>f.toggleCheck(de.id),type:"checkbox",value:"",class:"w-4 h-4 rounded-sm"},null,40,QAe)])):p.createCommentVNode("",!0),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.visibleColumns,(je,j)=>(p.openBlock(),p.createElementBlock("td",{style:p.normalizeStyle(je==null?void 0:je.style),key:j,"data-label":je.field_label,class:p.normalizeClass(["text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none print:before:content-none! flex flex-col justify-between gap-2 lg:table-cell print:table-cell! py-4 px-5 lg:py-3 lg:px-4 print:py-3! print:px-4! border-[1px]! dark:border-gray-700",{"rounded-b-lg lg:rounded-b-none!":j===o.columns.length-1}])},[p.createElementVNode("div",{class:p.normalizeClass([je.field_name==="action"?"":"overflow-auto","td_overflow_auto max-h-40 max-w-100"])},[je.tdComp?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(f.forDynCompIs(je.tdComp)),{key:0,language:o.language,row:de,field:je.field_name,xprops:o.xprops,tdProps:je.tdProps,onDeleteAction:t[4]||(t[4]=tt=>f.GetItemLists()),onEditAction:tt=>f.editAction(de),onGeneralAction:tt=>f.generalAction(de)},null,40,["language","row","field","xprops","tdProps","onEditAction","onGeneralAction"])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[p.createTextVNode(p.toDisplayString(de[je.field_name]),1)],64))],2)],14,zAe))),128))]))),128))])],8,DAe)],8,PAe),p.createElementVNode("div",HAe,[p.createVNode(B,{class:"mt-3 mb-0",classes:"px-4 py-3 sm:px-6",data:c.itemLists,limit:c.limit,size:c.size,align:c.align,onPaginationChangePage:f.GetItemLists},null,8,["data","limit","size","align","onPaginationChangePage"])])])],64)}const UAe=vi(mAe,[["render",ZAe],["__scopeId","data-v-a51321e7"]]);class WAe{constructor(t){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,t),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let t="";this.settings.url&&!this.settings.asyncUrl&&(t=this.settings.url);let o=this;if(this.settings.asyncUrl)return void o.settings.asyncUrl(function(c){let f=o.getPrintWindow(c);o.settings.preview?o.previewIfrmaeLoad():o.print(f)},o.settings.vue);let a=this.getPrintWindow(t);this.settings.url||this.write(a.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(a)}addEvent(t,o,a){t.addEventListener?t.addEventListener(o,a,!1):t.attachEvent?t.attachEvent("on"+o,a):t["on"+o]=a}previewIfrmaeLoad(){let t=document.getElementById("vue-pirnt-nb-previewBox");if(t){let o=this,a=t.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(a,"load",function(){o.previewBoxShow(),o.removeCanvasImg(),o.settings.previewOpenCallback()}),this.addEvent(t.querySelector(".previewBodyUtilPrintBtn"),"click",function(){o.settings.beforeOpenCallback(),o.settings.openCallback(),a.contentWindow.print(),o.settings.closeCallback()})}}removeCanvasImg(){let t=this;try{if(t.elsdom){let o=t.elsdom.querySelectorAll(".canvasImg");for(let a=0;a<o.length;a++)o[a].remove()}}catch(o){console.log(o)}}print(t){var o=this;let a=document.getElementById(this.settings.id)||t.f,c=document.getElementById(this.settings.id).contentWindow||t.f.contentWindow;o.settings.beforeOpenCallback(),o.addEvent(a,"load",function(){c.focus(),o.settings.openCallback(),c.print(),a.remove(),o.settings.closeCallback(),o.removeCanvasImg()})}write(t){t.open(),t.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),t.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let t="",o="",a="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,f=>{t+=f}),[].forEach.call(document.querySelectorAll("link"),function(f){f.href.indexOf(".css")>=0&&(o+=`<link type="text/css" rel="stylesheet" href="${f.href}" >`)});let c=document.styleSheets;if(c&&c.length>0)for(let f=0;f<c.length;f++)try{if(c[f].cssRules||c[f].rules){let h=c[f].cssRules||c[f].rules;for(let y=0;y<h.length;y++)a+=h[y].cssText}}catch(h){console.log(c[f].href+h)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,f=>{o+=`<link type="text/css" rel="stylesheet" href="${f}">`}),`<head><title>${this.settings.popTitle}</title>${t}${o}<style type="text/css">${a}</style></head>`}getBody(){let t=this.settings.ids;return t=t.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(t)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(t){let o=t.querySelectorAll("canvas");for(let a=0;a<o.length;a++)if(!o[a].style.display){let c=o[a].parentNode,f=o[a].toDataURL("image/png"),h=new Image;h.className="canvasImg",h.style.display="none",h.src=f,c.appendChild(h)}return t}getFormData(t){let o=t.cloneNode(!0),a=o.querySelectorAll("input,select,textarea"),c=o.querySelectorAll(".canvasImg,canvas"),f=-1;for(let h=0;h<c.length;h++){let y=c[h].parentNode,w=c[h];w.tagName.toLowerCase()==="canvas"?y.removeChild(w):w.style.display="block"}for(let h=0;h<a.length;h++){let y=a[h],w=y.getAttribute("type"),C=a[h];if(w||(w=y.tagName==="SELECT"?"select":y.tagName==="TEXTAREA"?"textarea":""),y.tagName==="INPUT")w==="radio"||w==="checkbox"?y.checked&&C.setAttribute("checked",y.checked):(C.value=y.value,C.setAttribute("value",y.value));else if(w==="select"){f++;for(let T=0;T<t.querySelectorAll("select").length;T++){let R=t.querySelectorAll("select")[T];if(!R.getAttribute("newbs")&&R.setAttribute("newbs",T),R.getAttribute("newbs")==f){let B=t.querySelectorAll("select")[f].selectedIndex;y.options[B].setAttribute("selected",!0)}}}else C.innerHTML=y.value,C.setAttribute("html",y.value)}return o}getPrintWindow(t){var o=this.Iframe(t);return{f:o,win:o.contentWindow||o,doc:o.doc}}previewBoxShow(){let t=document.getElementById("vue-pirnt-nb-previewBox");t&&(document.querySelector("html").setAttribute("style","overflow: hidden"),t.style.display="block")}previewBoxHide(){let t=document.getElementById("vue-pirnt-nb-previewBox");t&&(document.querySelector("html").setAttribute("style","overflow: visible;"),t.querySelector("iframe")&&t.querySelector("iframe").remove(),t.style.display="none")}previewBox(){let t=document.getElementById("vue-pirnt-nb-previewBox"),o="previewBody";if(t)return t.querySelector("iframe")&&t.querySelector("iframe").remove(),{close:t.querySelector(".previewClose"),previewBody:t.querySelector(".previewBody")};let a=document.createElement("div");a.setAttribute("id","vue-pirnt-nb-previewBox"),a.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),a.style.zIndex=this.settings.zIndex;let c=document.createElement("div");c.setAttribute("class","previewHeader"),c.setAttribute("style","padding: 5px 20px;"),c.innerHTML=this.settings.previewTitle,a.appendChild(c),this.close=document.createElement("div");let f=this.close;f.setAttribute("class","previewClose"),f.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let h=document.createElement("div"),y=document.createElement("div");h.setAttribute("class","closeBefore"),h.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),y.setAttribute("class","closeAfter"),y.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),f.appendChild(h),f.appendChild(y),c.appendChild(f),this.previewBody=document.createElement("div");let w=this.previewBody;w.setAttribute("class",o),w.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),a.appendChild(w);let C=document.createElement("div");C.setAttribute("class","previewBodyUtil"),C.setAttribute("style","height: 32px;background: #474747;position: relative;"),w.appendChild(C),this.previewBodyUtilPrintBtn=document.createElement("div");let T=this.previewBodyUtilPrintBtn;return T.setAttribute("class","previewBodyUtilPrintBtn"),T.innerHTML=this.settings.previewPrintBtnLabel,T.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),C.appendChild(T),document.body.appendChild(a),{close:this.close,previewBody:this.previewBody}}iframeBox(t,o){let a=document.createElement("iframe");return a.style.border="0px",a.style.position="absolute",a.style.width="0px",a.style.height="0px",a.style.right="0px",a.style.top="0px",a.setAttribute("id",t),a.setAttribute("src",o),a}Iframe(t){let o=this.settings.id;t=t||new Date().getTime();let a=this,c=this.iframeBox(o,t);try{if(this.settings.preview){c.setAttribute("style","border: 0px;flex: 1;");let f=this.previewBox(),h=f.previewBody,y=f.close;h.appendChild(c),this.addEvent(y,"click",function(){a.previewBoxHide()})}else document.body.appendChild(c);c.doc=null,c.doc=c.contentDocument?c.contentDocument:c.contentWindow?c.contentWindow.document:c.document}catch(f){throw new Error(f+". iframes may not be supported in this browser.")}if(c.doc==null)throw new Error("Cannot find document.");return c}}var eW={directiveName:"print",mounted(r,t,o){let a=t.instance,c="";var f,h,y;h="click",y=()=>{if(typeof t.value=="string")c=t.value;else{if(typeof t.value!="object"||!t.value.id)return void window.print();{c=t.value.id;let C=c.replace(new RegExp("#","g"),"");document.getElementById(C)||(console.log("id in Error"),c="")}}w()},(f=r).addEventListener?f.addEventListener(h,y,!1):f.attachEvent?f.attachEvent("on"+h,y):f["on"+h]=y;const w=()=>{new WAe({ids:c,vue:a,url:t.value.url,standard:"",extraHead:t.value.extraHead,extraCss:t.value.extraCss,zIndex:t.value.zIndex||20002,previewTitle:t.value.previewTitle||"打印预览",previewPrintBtnLabel:t.value.previewPrintBtnLabel||"打印",popTitle:t.value.popTitle,preview:t.value.preview||!1,asyncUrl:t.value.asyncUrl,previewBeforeOpenCallback(){t.value.previewBeforeOpenCallback&&t.value.previewBeforeOpenCallback(a)},previewOpenCallback(){t.value.previewOpenCallback&&t.value.previewOpenCallback(a)},openCallback(){t.value.openCallback&&t.value.openCallback(a)},closeCallback(){t.value.closeCallback&&t.value.closeCallback(a)},beforeOpenCallback(){t.value.beforeOpenCallback&&t.value.beforeOpenCallback(a)}})}},install:function(r){r.directive("print",eW)}};const XAe={components:{},props:{data:Array,columns:Array,get_item_url:String,xprops:Object,language:{type:Object,required:!1,default:()=>{}}},data(){const r=this.generateRandomString(6);return{isLoadinPrint:!1,Random_string:r,printObj:{id:"print_"+r,popTitle:"",beforeOpenCallback(t){},openCallback(t){t.isLoadinPrint=!1},closeCallback(t){t.isLoadinPrint=!1}},isLoading:!1,showNoOfEntries:[5,10,20,50,100,200,300,400,500,600,700,800,900,1e3,2e3,3e3,4e3,5e3,6e3,7e3,8e3,9e3,1e4,11e3,12e3,13e3,14e3,15e3,16e3,17e3,18e3,19e3,2e4],search:"",sortKey:"",sortOrder:1,currentPage:1,itemsPerPage:10,jumpToPage:"",maxDisplayedPages:10}},emits:["editAction","generalAction","deleteAction"],computed:{itemLists(){return this.data},filteredData(){const r=this.search.toLowerCase(),t=this.sortData(this.itemLists);return r?t.filter(o=>this.columns.some(a=>{const c=o[a.field_name];return c!=null&&String(c).toLowerCase().includes(r)})):t},totalPages(){return Math.ceil(this.filteredData.length/this.itemsPerPage)},paginatedData(){const r=(this.currentPage-1)*this.itemsPerPage,t=r+this.itemsPerPage;return this.filteredData.slice(r,t)},displayedPageNumbers(){let r=Math.max(this.currentPage-Math.floor(this.maxDisplayedPages/2),1),t=r+this.maxDisplayedPages-1;return t>this.totalPages&&(t=this.totalPages,r=Math.max(t-this.maxDisplayedPages+1,1)),Array.from({length:t-r+1},(o,a)=>r+a)},firstItemIndex(){return this.itemsPerPage*(this.currentPage-1)+1},lastItemIndex(){const r=this.itemsPerPage*this.currentPage;return r>this.filteredData.length?this.filteredData.length:r}},methods:{exportToExcel(){const r=document.querySelector("#table"+this.Random_string),t=Array.from(r.querySelectorAll("thead th")).map(R=>R.innerText),a=["",...["action"]],c=t.map((R,B)=>a.includes(R)?B:-1).filter(R=>R!==-1),f=Array.from(r.querySelectorAll("tbody tr")).map(R=>Array.from(R.querySelectorAll("td")).map(V=>V.innerText).filter((V,q)=>!c.includes(q))),y=[t.filter((R,B)=>!c.includes(B)),...f],w=vb.aoa_to_sheet(y),C=vb.book_new();vb.book_append_sheet(C,w,"Sheet1"),KU(C,"exported-file.xlsx")},generateRandomString(r){let t="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=o.length;for(let c=0;c<r;c++)t+=o.charAt(Math.floor(Math.random()*a));return t},delayedPrint(){this.isLoadinPrint=!0,this.$nextTick(()=>{var r;(r=this.$refs.hiddenPrintBtn)==null||r.click(),this.isLoadinPrint=!1})},editAction(r){this.$emit("editAction",r)},deleteAction(){this.$emit("deleteAction")},generalAction(r){this.$emit("generalAction",r)},forDynCompIs(r){return typeof r=="object"?r:null},handleItemsPerPageChange(r){this.itemsPerPage=r},goToPage(r){r>=1&&r<=this.totalPages&&(this.currentPage=r)},sort(r){r===this.sortKey?this.sortOrder*=-1:(this.sortKey=r,this.sortOrder=1)},sortData(r){return this.sortKey?r.slice().sort((t,o)=>(t[this.sortKey]<o[this.sortKey]?-1:1)*this.sortOrder):r},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},firstPage(){this.currentPage=1},lastPage(){this.currentPage=this.totalPages},goToPage(r){r>=1&&r<=this.totalPages&&(this.currentPage=r)},GetItemLists(){this.isLoading=!0,axios.get(this.xprops.route_get_data).then(r=>{this.itemLists=r.data,this.isLoading=!1}).catch(r=>{console.error(r),this.isLoading=!1})}},mounted(){},directives:{print:eW}},qAe={class:"p-0"},jAe={ref:"hiddenPrintBtn",style:{display:"none"}},GAe={class:"flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between"},YAe={class:"flex items-center gap-2"},KAe={class:"mt-[9px]"},JAe={class:"relative"},e5e={class:"flex flex-wrap mb-3"},t5e=["id"],n5e=["id"],o5e={class:"hidden text-sm font-normal text-center text-gray-600 print:table-header-group! lg:table-header-group dark:border-gray-600 bg-gray-50 dark:bg-gray-800 dark:text-gray-400 print:border-[1px]!"},s5e=["onClick"],r5e={class:"inline-flex items-center justify-center gap-1"},i5e={key:0,class:"print:hidden!"},a5e={class:"bg-white dark:bg-gray-900"},l5e={key:0},c5e=["colspan"],u5e=["data-label"],d5e=["innerHTML"],f5e={key:0,class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"},h5e={class:"flex justify-between flex-1 sm:hidden"},m5e=["disabled"],g5e=["disabled"],p5e={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"},b5e={class:"text-sm text-gray-700 dark:text-gray-400"},y5e={class:"font-medium"},O5e={class:"font-medium"},x5e={class:"font-medium"},v5e={"aria-label":"Page navigation"},w5e={class:"flex items-center h-8 -space-x-px text-sm"},S5e=["disabled"],k5e=["onClick"],C5e=["onClick"],E5e=["disabled"];function _5e(r,t,o,a,c,f){const h=p.resolveComponent("dropdown"),y=p.resolveComponent("gl-button"),w=p.resolveDirective("print");return p.openBlock(),p.createElementBlock("div",qAe,[p.withDirectives(p.createElementVNode("button",jAe,null,512),[[w,c.printObj]]),p.createElementVNode("div",GAe,[p.createElementVNode("div",YAe,[t[6]||(t[6]=p.createElementVNode("span",{class:"font-medium"}," Show ",-1)),p.createElementVNode("div",KAe,[p.createVNode(h,{has_cancel:!1,options:c.showNoOfEntries,modelValue:c.itemsPerPage,"onUpdate:modelValue":t[0]||(t[0]=C=>c.itemsPerPage=C),is_required:!1,field_name:"NoOfEntries",label_name:"",default_value:10,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),t[7]||(t[7]=p.createElementVNode("span",{class:"font-medium"}," Entries ",-1))]),t[9]||(t[9]=p.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),p.createElementVNode("div",JAe,[t[8]||(t[8]=p.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},null,-1)),p.withDirectives(p.createElementVNode("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=C=>c.search=C),class:"gl-input-form",placeholder:"Search ..."},null,512),[[p.vModelText,c.search]])])]),p.createElementVNode("div",e5e,[p.createVNode(y,{onClick:f.delayedPrint,tag:"button",is_loading:c.isLoadinPrint,button_type:"default",has_border_reduced:!1,classes:"rounded-s-lg"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.print)??"Print"),1)]}),_:1},8,["onClick","is_loading"]),p.createVNode(y,{onClick:f.exportToExcel,tag:"button",button_type:"default",has_border_reduced:!1,classes:"rounded-e-lg"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.excel)??"Excel"),1)]}),_:1},8,["onClick"])]),p.createElementVNode("div",{id:"print_"+c.Random_string,class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},[p.createElementVNode("table",{id:"table"+c.Random_string,class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse print:border-collapse! border-spacing-y-5 lg:border-spacing-y-0 print:border-spacing-y-0! dark:border-gray-800 dark:bg-gray-900"},[p.createElementVNode("thead",o5e,[p.createElementVNode("tr",null,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(C,T)=>(p.openBlock(),p.createElementBlock("th",{key:T,onClick:R=>f.sort(C.field_name,C.sortable),class:"w-full px-4 py-2 lg:w-2/12 print:w-2/12! print:border-[1px]!"},[p.createElementVNode("div",r5e,[p.createElementVNode("span",null,p.toDisplayString(C.field_label),1),c.sortKey===C.field_name?(p.openBlock(),p.createElementBlock("span",i5e,t[10]||(t[10]=[p.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 20V7m0 13-4-4m4 4 4-4m4-12v13m0-13 4 4m-4-4-4 4"})],-1)]))):p.createCommentVNode("",!0)])],8,s5e))),128))])]),p.createElementVNode("tbody",a5e,[c.isLoading?(p.openBlock(),p.createElementBlock("tr",l5e,[p.createElementVNode("td",{colspan:o.columns.length},t[11]||(t[11]=[p.createElementVNode("div",{role:"status",class:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded-sm shadow-sm animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700"},[p.createElementVNode("div",{class:"flex items-center justify-between"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-600 w-24 mb-3"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"h-3 bg-gray-300 rounded-full dark:bg-gray-700 w-12"})]),p.createElementVNode("span",{class:"sr-only"},"Loading...")],-1)]),8,c5e)])):p.createCommentVNode("",!0),c.isLoading?p.createCommentVNode("",!0):(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:1},p.renderList(f.paginatedData,(C,T)=>(p.openBlock(),p.createElementBlock("tr",{key:T,class:"text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(R,B)=>(p.openBlock(),p.createElementBlock("td",{key:B,"data-label":R.field_label,class:p.normalizeClass(["text-pretty before:content-[attr(data-label)] before:font-bold dark:before:text-gray-400 lg:before:content-[''] print:before:content-['']! flex flex-col justify-between gap-2 lg:table-cell print:table-cell! py-4 px-5 lg:py-3 lg:px-4 print:py-3! print:px-4! border-[1px]! dark:border-gray-700",{"rounded-t-lg lg:rounded-t-none!":B===0,"rounded-b-lg lg:rounded-b-none!":B===o.columns.length-1}])},[p.createElementVNode("div",{class:p.normalizeClass([R.field_name==="action"?"":"overflow-auto","td_overflow_auto max-h-40 max-w-100"])},[R.tdComp?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(f.forDynCompIs(R.tdComp)),{key:0,row:C,field:R.field_name,xprops:o.xprops,tdProps:R.tdProps,onEditAction:V=>f.editAction(C),onGeneralAction:V=>f.generalAction(C)},null,40,["row","field","xprops","tdProps","onEditAction","onGeneralAction"])):(p.openBlock(),p.createElementBlock("p",{key:1,class:"text-pretty",innerHTML:C[R.field_name]},null,8,d5e))],2)],10,u5e))),128))]))),128))])],8,n5e)],8,t5e),f.paginatedData.length>0?(p.openBlock(),p.createElementBlock("div",f5e,[p.createElementVNode("div",h5e,[p.createElementVNode("a",{href:"#",onClick:t[2]||(t[2]=p.withModifiers((...C)=>f.previousPage&&f.previousPage(...C),["prevent"])),disabled:c.currentPage===1,class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Previous",8,m5e),p.createElementVNode("a",{href:"#",onClick:t[3]||(t[3]=p.withModifiers((...C)=>f.nextPage&&f.nextPage(...C),["prevent"])),disabled:c.currentPage===f.totalPages,class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Next",8,g5e)]),p.createElementVNode("div",p5e,[p.createElementVNode("div",null,[p.createElementVNode("p",b5e,[t[12]||(t[12]=p.createTextVNode(" Showing ")),p.createElementVNode("span",y5e,p.toDisplayString(f.firstItemIndex),1),t[13]||(t[13]=p.createTextVNode(" to ")),p.createElementVNode("span",O5e,p.toDisplayString(f.lastItemIndex),1),t[14]||(t[14]=p.createTextVNode(" of ")),p.createElementVNode("span",x5e,p.toDisplayString(f.filteredData.length),1),t[15]||(t[15]=p.createTextVNode(" entries "))])]),p.createElementVNode("div",null,[p.createElementVNode("nav",v5e,[p.createElementVNode("ul",w5e,[p.createElementVNode("li",null,[p.createElementVNode("a",{href:"#",onClick:t[4]||(t[4]=p.withModifiers((...C)=>f.previousPage&&f.previousPage(...C),["prevent"])),disabled:c.currentPage===1,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},t[16]||(t[16]=[p.createElementVNode("span",{class:"sr-only"},"Previous",-1),p.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1)]),8,S5e)]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.displayedPageNumbers,C=>(p.openBlock(),p.createElementBlock(p.Fragment,{key:C},[p.createElementVNode("li",null,[c.currentPage!==C?(p.openBlock(),p.createElementBlock("a",{key:0,href:"#",onClick:p.withModifiers(T=>f.goToPage(C),["prevent"]),class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},p.toDisplayString(C),9,k5e)):p.createCommentVNode("",!0)]),p.createElementVNode("li",null,[c.currentPage===C?(p.openBlock(),p.createElementBlock("a",{key:0,href:"#",onClick:p.withModifiers(T=>f.goToPage(C),["prevent"]),"aria-current":"page",class:"z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"},p.toDisplayString(C),9,C5e)):p.createCommentVNode("",!0)])],64))),128)),p.createElementVNode("li",null,[p.createElementVNode("a",{href:"#",onClick:t[5]||(t[5]=p.withModifiers((...C)=>f.nextPage&&f.nextPage(...C),["prevent"])),disabled:c.currentPage===f.totalPages,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},t[17]||(t[17]=[p.createElementVNode("span",{class:"sr-only"},"Next",-1),p.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1)]),8,E5e)])])])])])])):p.createCommentVNode("",!0)])}const T5e=vi(XAe,[["render",_5e],["__scopeId","data-v-6d5541af"]]),A5e={components:{TailwindPagination:OU},props:{data:Array,columns:Array,get_item_url:String,xprops:Object,refreshData:Boolean,groupField:String},data(){return{isLoading:!1,isMounted:!1,limit:5,showDisabled:!1,size:"default",align:"left",search:"",isDropdownOpen:!1,itemLists:[],tableData:[],sortField:this.columns[0].field_name,sortOrder:"desc",pageOptions:[5,10,20,50],perPage:5,page:1}},emits:["editAction"],computed:{filteredData(){const r=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(a=>a.toString().toLowerCase().includes(r)))},groupedItems(){return this.groupBy(this.groupField)}},methods:{groupBy(r){return this.itemLists.data?this.itemLists.data.reduce((t,o)=>{const a=o[r];t[a]||(t[a]=[]);const c={...o};return delete c[r],t[a].push(c),t},{}):[]},editAction(r){this.$emit("editAction",r)},forDynCompIs(r){return typeof r=="object"?r:null},GetItemLists(r=1){this.isLoading=!0,this.page=r;const t={sort:this.sortField,order:this.sortOrder,s:this.search,limit:this.perPage,page:this.page};axios.get(this.xprops.route_get_data,{params:t}).then(o=>{this.itemLists=o.data,this.isLoading=!1}).catch(o=>{console.error(o),this.isLoading=!1})},updateSortColumn(r,t){t&&(r===this.sortField?this.sortOrder=this.sortOrder==="asc"?"desc":"asc":(this.sortField=r,this.sortOrder="asc"),this.GetItemLists(this.page))},handleSearch(){this.sortField=this.columns[0].field_name,this.sortOrder="asc",this.page=1,this.GetItemLists(this.page)}},mounted(){this.GetItemLists(),this.isMounted=!0},watch:{searchFilter(){this.filteredOptions.length===0?this.selected={}:this.selected=this.filteredOptions[0]},perPage(r){this.page=1,this.perPage=r,this.GetItemLists(this.page)},refreshData(r,t){this.isMounted&&r!==t&&this.GetItemLists()}}},P5e={class:"p-0"},D5e={class:"flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between"},N5e={class:"flex items-center gap-2"},$5e={class:"font-medium"},R5e={class:"mt-[3px]"},B5e={class:"font-medium"},M5e={class:"relative"},F5e=["placeholder"],L5e={class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},I5e={class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse print:border-collapse! border-spacing-y-5 lg:border-spacing-y-0 print:border-spacing-y-0! dark:border-gray-800 dark:bg-gray-900"},V5e={class:"hidden text-sm font-normal text-center text-gray-600 print:table-header-group! lg:table-header-group dark:border-gray-600 bg-gray-50 dark:bg-gray-800 dark:text-gray-400 print:border-[1px]!"},Q5e=["onClick"],z5e={class:"inline-flex items-center justify-center gap-1"},H5e={key:0,class:"print:hidden!"},Z5e={class:"bg-white dark:bg-gray-900"},U5e={key:0},W5e=["colspan"],X5e={class:"text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"},q5e=["colspan"],j5e=["data-label"],G5e={class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"};function Y5e(r,t,o,a,c,f){var w,C,T,R;const h=p.resolveComponent("dropdown"),y=p.resolveComponent("TailwindPagination");return p.openBlock(),p.createElementBlock("div",P5e,[p.createElementVNode("div",D5e,[p.createElementVNode("div",N5e,[p.createElementVNode("span",$5e,p.toDisplayString(((w=r.language)==null?void 0:w.show)??"Show"),1),p.createElementVNode("div",R5e,[p.createVNode(h,{options_top_size:0,has_cancel:!1,options:c.pageOptions,modelValue:c.perPage,"onUpdate:modelValue":t[0]||(t[0]=B=>c.perPage=B),is_required:!1,field_name:"perPage",label_name:"",default_value:5,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),p.createElementVNode("span",B5e,p.toDisplayString(((C=r.language)==null?void 0:C.entries)??"Entries"),1)]),t[5]||(t[5]=p.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),p.createElementVNode("div",M5e,[t[4]||(t[4]=p.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},null,-1)),p.withDirectives(p.createElementVNode("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=B=>c.search=B),onInput:t[2]||(t[2]=B=>f.handleSearch()),class:"gl-input-form",placeholder:(T=r.language)!=null&&T.search?((R=r.language)==null?void 0:R.search)+" ...":"Search ..."},null,40,F5e),[[p.vModelText,c.search]])])]),p.createElementVNode("div",L5e,[p.createElementVNode("table",I5e,[p.createElementVNode("thead",V5e,[p.createElementVNode("tr",null,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(B,V)=>(p.openBlock(),p.createElementBlock("th",{key:V,onClick:q=>f.updateSortColumn(B.field_name,B.sortable),class:"w-full px-4 py-2 lg:w-2/12"},[p.createElementVNode("div",z5e,[p.createElementVNode("span",null,p.toDisplayString(B.field_label),1),c.sortField===B.field_name?(p.openBlock(),p.createElementBlock("span",H5e,t[6]||(t[6]=[p.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 20V7m0 13-4-4m4 4 4-4m4-12v13m0-13 4 4m-4-4-4 4"})],-1)]))):p.createCommentVNode("",!0)])],8,Q5e))),128))])]),p.createElementVNode("tbody",Z5e,[c.isLoading?(p.openBlock(),p.createElementBlock("tr",U5e,[p.createElementVNode("td",{colspan:o.columns.length},t[7]||(t[7]=[p.createElementVNode("div",{role:"status",class:"p-4 space-y-4 border border-gray-200 divide-y divide-gray-200 rounded-sm shadow-sm animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700"},[p.createElementVNode("div",{class:"flex items-center justify-between"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"flex items-center justify-between pt-4"},[p.createElementVNode("div",null,[p.createElementVNode("div",{class:"w-24 h-3 mb-3 bg-gray-300 rounded-full dark:bg-gray-600"}),p.createElementVNode("div",{class:"w-32 h-2 bg-gray-200 rounded-full dark:bg-gray-700"})]),p.createElementVNode("div",{class:"w-12 h-3 bg-gray-300 rounded-full dark:bg-gray-700"})]),p.createElementVNode("span",{class:"sr-only"},"Loading...")],-1)]),8,W5e)])):p.createCommentVNode("",!0),c.isLoading?p.createCommentVNode("",!0):(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:1},p.renderList(f.groupedItems,(B,V)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createElementVNode("tr",X5e,[p.createElementVNode("td",{colspan:o.columns.length,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-3 lg:px-4 border dark:border-gray-700"},p.toDisplayString(V),9,q5e)]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(B,(q,X)=>(p.openBlock(),p.createElementBlock("tr",{key:X,class:"text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(Y,he)=>(p.openBlock(),p.createElementBlock("td",{key:he,"data-label":Y.field_label,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-3 lg:px-4 border-[1px]! dark:border-gray-700"},[p.createElementVNode("div",{class:p.normalizeClass([Y.field_name==="action"?"":"overflow-auto","td_overflow_auto max-h-40 max-w-100"])},[Y.tdComp?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(f.forDynCompIs(Y.tdComp)),{key:0,row:q,field:Y.field_name,xprops:o.xprops,tdProps:Y.tdProps,onDeleteAction:t[3]||(t[3]=Se=>f.GetItemLists()),onEditAction:Se=>f.editAction(q)},null,40,["row","field","xprops","tdProps","onEditAction"])):(p.openBlock(),p.createElementBlock(p.Fragment,{key:1},[p.createTextVNode(p.toDisplayString(q[Y.field_name]),1)],64))],2)],8,j5e))),128))]))),128))],64))),256))])])]),p.createElementVNode("div",G5e,[p.createVNode(y,{class:"mt-3 mb-0",data:c.itemLists,limit:c.limit,size:c.size,align:c.align,onPaginationChangePage:f.GetItemLists},null,8,["data","limit","size","align","onPaginationChangePage"])])])}const K5e=vi(A5e,[["render",Y5e],["__scopeId","data-v-1995ac95"]]),J5e={components:{},props:{data:Array,columns:Array,language:{type:Object,required:!1,default:()=>{}}},data(){const r=this.generateRandomString(6);return{isLoadinPrint:!1,Random_string:r,printObj:{id:"print_"+r,popTitle:"",beforeOpenCallback(t){},openCallback(t){t.isLoadinPrint=!1},closeCallback(t){t.isLoadinPrint=!1}},showNoOfEntries:[5,10,20,50,100,200,300,400,500,600,700,800,900,1e3,2e3,3e3,4e3,5e3,6e3,7e3,8e3,9e3,1e4,11e3,12e3,13e3,14e3,15e3,16e3,17e3,18e3,19e3,2e4],search:"",sortKey:"",sortOrder:1,currentPage:1,itemsPerPage:10,jumpToPage:"",maxDisplayedPages:10}},computed:{filteredData(){const r=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(a=>a!=null&&a.toString().toLowerCase().includes(r)))},totalPages(){return Math.ceil(this.filteredData.length/this.itemsPerPage)},paginatedData(){const r=(this.currentPage-1)*this.itemsPerPage,t=r+this.itemsPerPage;return this.filteredData.slice(r,t)},displayedPageNumbers(){let r=Math.max(this.currentPage-Math.floor(this.maxDisplayedPages/2),1),t=r+this.maxDisplayedPages-1;return t>this.totalPages&&(t=this.totalPages,r=Math.max(t-this.maxDisplayedPages+1,1)),Array.from({length:t-r+1},(o,a)=>r+a)},firstItemIndex(){return this.itemsPerPage*(this.currentPage-1)+1},lastItemIndex(){const r=this.itemsPerPage*this.currentPage;return r>this.filteredData.length?this.filteredData.length:r}},methods:{exportToExcel(){const r=document.querySelector("#table"+this.Random_string),t=Array.from(r.querySelectorAll("thead th")).map(R=>R.innerText),a=["",...["action"]],c=t.map((R,B)=>a.includes(R)?B:-1).filter(R=>R!==-1),f=Array.from(r.querySelectorAll("tbody tr")).map(R=>Array.from(R.querySelectorAll("td")).map(V=>V.innerText).filter((V,q)=>!c.includes(q))),y=[t.filter((R,B)=>!c.includes(B)),...f],w=vb.aoa_to_sheet(y),C=vb.book_new();vb.book_append_sheet(C,w,"Sheet1"),KU(C,"exported-file.xlsx")},generateRandomString(r){let t="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=o.length;for(let c=0;c<r;c++)t+=o.charAt(Math.floor(Math.random()*a));return t},delayedPrint(){this.isLoadinPrint=!0,this.$nextTick(()=>{var r;(r=this.$refs.hiddenPrintBtn)==null||r.click(),this.isLoadinPrint=!1})},handleItemsPerPageChange(r){this.itemsPerPage=r},goToPage(r){r>=1&&r<=this.totalPages&&(this.currentPage=r)},sort(r){r===this.sortKey?this.sortOrder*=-1:(this.sortKey=r,this.sortOrder=1)},sortData(r){return this.sortKey?r.slice().sort((t,o)=>(t[this.sortKey]<o[this.sortKey]?-1:1)*this.sortOrder):r},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},firstPage(){this.currentPage=1},lastPage(){this.currentPage=this.totalPages},goToPage(r){r>=1&&r<=this.totalPages&&(this.currentPage=r)}},directives:{print:eW}},ePe={class:"p-0"},tPe={ref:"hiddenPrintBtn",style:{display:"none"}},nPe={class:"flex flex-col flex-wrap gap-4 pb-4 xl:flex-row xl:items-center xl:justify-between"},oPe={class:"flex items-center gap-2"},sPe={class:"mt-[9px]"},rPe={class:"relative"},iPe={class:"flex flex-wrap mb-3"},aPe=["id"],lPe=["id"],cPe={class:"hidden text-sm font-normal text-center text-gray-600 print:table-header-group! lg:table-header-group dark:border-gray-600 bg-gray-50 dark:bg-gray-800 dark:text-gray-400 print:border-[1px]!"},uPe=["onClick"],dPe={class:"inline-flex items-center justify-center gap-1"},fPe={key:0,class:"print:hidden!"},hPe={class:"bg-white dark:bg-gray-900"},mPe=["data-label"],gPe=["innerHTML"],pPe={key:0,class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"},bPe={class:"flex justify-between flex-1 sm:hidden"},yPe=["disabled"],OPe=["disabled"],xPe={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"},vPe={class:"text-sm text-gray-700 dark:text-gray-400"},wPe={class:"font-medium"},SPe={class:"font-medium"},kPe={class:"font-medium"},CPe={"aria-label":"Page navigation"},EPe={class:"flex items-center h-8 -space-x-px text-sm"},_Pe=["disabled"],TPe=["onClick"],APe=["onClick"],PPe=["disabled"];function DPe(r,t,o,a,c,f){const h=p.resolveComponent("dropdown"),y=p.resolveComponent("gl-button"),w=p.resolveDirective("print");return p.openBlock(),p.createElementBlock("div",ePe,[p.withDirectives(p.createElementVNode("button",tPe,null,512),[[w,c.printObj]]),p.createElementVNode("div",nPe,[p.createElementVNode("div",oPe,[t[6]||(t[6]=p.createElementVNode("span",{class:"font-medium"}," Show ",-1)),p.createElementVNode("div",sPe,[p.createVNode(h,{has_cancel:!1,options:c.showNoOfEntries,modelValue:c.itemsPerPage,"onUpdate:modelValue":t[0]||(t[0]=C=>c.itemsPerPage=C),is_required:!1,field_name:"NoOfEntries",label_name:"",default_value:10,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),t[7]||(t[7]=p.createElementVNode("span",{class:"font-medium"}," Entries ",-1))]),t[9]||(t[9]=p.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),p.createElementVNode("div",rPe,[t[8]||(t[8]=p.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},null,-1)),p.withDirectives(p.createElementVNode("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=C=>c.search=C),class:"gl-input-form",placeholder:"Search ..."},null,512),[[p.vModelText,c.search]])])]),p.createElementVNode("div",iPe,[p.createVNode(y,{onClick:f.delayedPrint,tag:"button",is_loading:c.isLoadinPrint,button_type:"default",has_border_reduced:!1,classes:"rounded-s-lg"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.print)??"Print"),1)]}),_:1},8,["onClick","is_loading"]),p.createVNode(y,{onClick:f.exportToExcel,tag:"button",button_type:"default",has_border_reduced:!1,classes:"rounded-e-lg"},{default:p.withCtx(()=>{var C;return[p.createTextVNode(p.toDisplayString(((C=o.language)==null?void 0:C.excel)??"Excel"),1)]}),_:1},8,["onClick"])]),p.createElementVNode("div",{id:"print_"+c.Random_string,class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},[p.createElementVNode("table",{id:"table"+c.Random_string,class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse print:border-collapse! border-spacing-y-5 lg:border-spacing-y-0 print:border-spacing-y-0! dark:border-gray-800 dark:bg-gray-900"},[p.createElementVNode("thead",cPe,[p.createElementVNode("tr",null,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(C,T)=>(p.openBlock(),p.createElementBlock("th",{key:T,onClick:p.withModifiers(R=>f.sort(C),["prevent"]),class:"w-full px-4 py-2 lg:w-2/12 print:w-2/12! print:border-[1px]!"},[p.createElementVNode("div",dPe,[p.createElementVNode("span",null,p.toDisplayString(C),1),c.sortKey===C?(p.openBlock(),p.createElementBlock("span",fPe,t[10]||(t[10]=[p.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 20V7m0 13-4-4m4 4 4-4m4-12v13m0-13 4 4m-4-4-4 4"})],-1)]))):p.createCommentVNode("",!0)])],8,uPe))),128))])]),p.createElementVNode("tbody",hPe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.paginatedData,(C,T)=>(p.openBlock(),p.createElementBlock("tr",{key:T,class:"text-gray-500 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800 dark:hover:text-gray-200"},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.columns,(R,B)=>(p.openBlock(),p.createElementBlock("td",{key:B,"data-label":R,class:p.normalizeClass(["text-pretty before:content-[attr(data-label)] before:font-bold dark:before:text-gray-400 lg:before:content-[''] print:before:content-['']! flex flex-col justify-between gap-2 lg:table-cell print:table-cell! py-4 px-5 lg:py-3 lg:px-4 print:py-3! print:px-4! border-[1px]! dark:border-gray-700",{"rounded-t-lg lg:rounded-t-none!":B===0,"rounded-b-lg lg:rounded-b-none!":B===o.columns.length-1}])},[p.createElementVNode("p",{class:"text-pretty",innerHTML:C[B]},null,8,gPe)],10,mPe))),128))]))),128))])],8,lPe)],8,aPe),f.paginatedData.length>0?(p.openBlock(),p.createElementBlock("div",pPe,[p.createElementVNode("div",bPe,[p.createElementVNode("a",{href:"#",onClick:t[2]||(t[2]=p.withModifiers((...C)=>f.previousPage&&f.previousPage(...C),["prevent"])),disabled:c.currentPage===1,class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Previous",8,yPe),p.createElementVNode("a",{href:"#",onClick:t[3]||(t[3]=p.withModifiers((...C)=>f.nextPage&&f.nextPage(...C),["prevent"])),disabled:c.currentPage===f.totalPages,class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Next",8,OPe)]),p.createElementVNode("div",xPe,[p.createElementVNode("div",null,[p.createElementVNode("p",vPe,[t[11]||(t[11]=p.createTextVNode(" Showing ")),p.createElementVNode("span",wPe,p.toDisplayString(f.firstItemIndex),1),t[12]||(t[12]=p.createTextVNode(" to ")),p.createElementVNode("span",SPe,p.toDisplayString(f.lastItemIndex),1),t[13]||(t[13]=p.createTextVNode(" of ")),p.createElementVNode("span",kPe,p.toDisplayString(f.filteredData.length),1),t[14]||(t[14]=p.createTextVNode(" entries "))])]),p.createElementVNode("div",null,[p.createElementVNode("nav",CPe,[p.createElementVNode("ul",EPe,[p.createElementVNode("li",null,[p.createElementVNode("a",{href:"#",onClick:t[4]||(t[4]=p.withModifiers((...C)=>f.previousPage&&f.previousPage(...C),["prevent"])),disabled:c.currentPage===1,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},t[15]||(t[15]=[p.createElementVNode("span",{class:"sr-only"},"Previous",-1),p.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1)]),8,_Pe)]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.displayedPageNumbers,C=>(p.openBlock(),p.createElementBlock(p.Fragment,{key:C},[p.createElementVNode("li",null,[c.currentPage!==C?(p.openBlock(),p.createElementBlock("a",{key:0,href:"#",onClick:p.withModifiers(T=>f.goToPage(C),["prevent"]),class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},p.toDisplayString(C),9,TPe)):p.createCommentVNode("",!0)]),p.createElementVNode("li",null,[c.currentPage===C?(p.openBlock(),p.createElementBlock("a",{key:0,href:"#",onClick:p.withModifiers(T=>f.goToPage(C),["prevent"]),"aria-current":"page",class:"z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"},p.toDisplayString(C),9,APe)):p.createCommentVNode("",!0)])],64))),128)),p.createElementVNode("li",null,[p.createElementVNode("a",{href:"#",onClick:t[5]||(t[5]=p.withModifiers((...C)=>f.nextPage&&f.nextPage(...C),["prevent"])),disabled:c.currentPage===f.totalPages,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},t[16]||(t[16]=[p.createElementVNode("span",{class:"sr-only"},"Next",-1),p.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1)]),8,PPe)])])])])])])):p.createCommentVNode("",!0)])}const NPe=vi(J5e,[["render",DPe],["__scopeId","data-v-c18f6d65"]]),$Pe={props:["field","row","tdProps"],methods:{convertCronToHuman(r){const[t,o,a,c,f]=r.split(" ");if(t==="*"&&o==="*"&&a==="*"&&c==="*"&&f==="*")return"Runs every minute.";if(t==="0"&&o==="0"&&a==="*"&&c==="*"&&f!=="*")return`Runs at 12:00 AM every ${this.convertDayOfWeek(f)}.`;const h={0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday","*":"every day"},y={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December","*":"every month"},w=this.convertField(t,"minute",59),C=this.convertField(o,"hour",23),T=this.convertField(a,"day of the month",31),R=this.convertField(c,"month",12,y),B=this.convertField(f,"day",6,h);return`Runs ${w} ${C} ${T} ${R} on ${B}.`},convertField(r,t,o,a={}){if(r==="*")return`every ${t}`;if(r.includes("/")){const[c,f]=r.split("/");return`every ${f} ${t}${f>1?"s":""} starting at ${c}`}if(r.includes("-")){const[c,f]=r.split("-");return`${t}s from ${c} to ${f}`}if(r.includes(",")){const c=r.split(",").map(f=>a[f]||f);return`${t}s on ${c.join(", ")}`}return a[r]||`${t} ${r}`},convertDayOfWeek(r){return{0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"}[r]||"Invalid day"},formatHour(r){const t=parseInt(r,10),o=t>=12?"PM":"AM";return`${(t%12||12).toString().padStart(2,"0")}:00 ${o}`}}},RPe={key:0,class:"flex flex-wrap gap-2"},BPe={class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm dark:bg-blue-900 dark:text-blue-300"};function MPe(r,t,o,a,c,f){return o.row[o.field]?(p.openBlock(),p.createElementBlock("div",RPe,[p.createElementVNode("span",BPe,p.toDisplayString(f.convertCronToHuman(o.row[o.field])),1)])):p.createCommentVNode("",!0)}const FPe=vi($Pe,[["render",MPe]]),LPe={setup(){const r=p.ref([]),t=c=>{r.value.push(c)},o=c=>{const f=r.value.indexOf(c);f>-1&&r.value.splice(f,1)},a=c=>{r.value.forEach(f=>{f!==c&&f.isOpen&&f.isOpen.value!==void 0&&(f.isOpen.value=!1)}),c.isOpen&&c.isOpen.value!==void 0&&(c.isOpen.value=!c.isOpen.value)};return p.provide("accordionsWrapper",{registerAccordion:t,unregisterAccordion:o,toggleAccordion:a,accordions:r}),{}}};function IPe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",null,[p.renderSlot(r.$slots,"default")])}const VPe=vi(LPe,[["render",IPe]]),QPe={props:{title:{type:String,required:!0}},setup(){const r=p.ref(!1),t=p.inject("accordionsWrapper"),a=(()=>{var C=new Date().getTime();typeof performance<"u"&&typeof performance.now=="function"&&(C+=performance.now());var T="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(R){var B=(C+Math.random()*16)%16|0;return C=Math.floor(C/16),(R==="x"?B:B&3|8).toString(16)});return T})(),c={isOpen:r,id:a},f=p.computed(()=>t.accordions.value),h=p.computed(()=>f.value.length>0&&f.value[0].id===a),y=p.computed(()=>f.value.length>0&&f.value[f.value.length-1].id===a);return p.onMounted(()=>{t.registerAccordion(c)}),p.onUnmounted(()=>{t.unregisterAccordion(c)}),{isOpen:r,isFirstAccordion:h,isLastAccordion:y,toggle:()=>{t.toggleAccordion(c)}}}},zPe={class:"flex items-center"},HPe={key:0,class:"w-3 h-3 rotate-180 shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 6"},ZPe={key:1,class:"w-3 h-3 shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 10 6"};function UPe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",null,[p.createElementVNode("h2",null,[p.createElementVNode("button",{onClick:t[0]||(t[0]=(...h)=>a.toggle&&a.toggle(...h)),type:"button",class:p.normalizeClass(["flex items-center justify-between w-full gap-3 p-5 font-medium text-gray-500 border border-gray-200 rtl:text-right dark:border-gray-700 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800",{"rounded-t-xl":a.isFirstAccordion,"border-b-0":!a.isLastAccordion,"bg-gray-100 dark:bg-gray-800":a.isOpen}]),"aria-expanded":"true"},[p.createElementVNode("span",zPe,p.toDisplayString(o.title),1),a.isOpen?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("svg",HPe,t[1]||(t[1]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5 5 1 1 5"},null,-1)]))),a.isOpen?(p.openBlock(),p.createElementBlock("svg",ZPe,t[2]||(t[2]=[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5 5 1 1 5"},null,-1)]))):p.createCommentVNode("",!0)],2)]),a.isOpen?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass([{"border-b-0":!a.isLastAccordion,"border-t-0":a.isLastAccordion},"p-5 border border-gray-200 dark:border-gray-700 dark:bg-gray-900"])},[p.renderSlot(r.$slots,"default")],2)):p.createCommentVNode("",!0)])}const WPe=vi(QPe,[["render",UPe]]),XPe={class:"flex items-center p-4 text-gray-500 bg-white rounded-lg shadow-sm dark:bg-gray-800 dark:text-gray-400",role:"alert"},qPe={key:0,class:"inline-flex items-center justify-center shrink-0 w-8 h-8 text-blue-500 bg-blue-100 rounded-lg dark:bg-blue-800 dark:text-blue-200"},jPe={key:1,class:"inline-flex items-center justify-center shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"},GPe={key:2,class:"inline-flex items-center justify-center shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200"},YPe={key:3,class:"inline-flex items-center justify-center shrink-0 w-8 h-8 text-orange-500 bg-orange-100 rounded-lg dark:bg-orange-700 dark:text-orange-200"},KPe={class:"ml-3 text-sm font-normal"},JPe={__name:"ToastListItem",props:{message:String,duration:{type:Number,default:2e3},type:{type:String,default:"success"}},emits:["remove"],setup(r,{emit:t}){const o=r;p.onMounted(()=>{setTimeout(()=>a("remove"),o.duration)});const a=t;return(c,f)=>(p.openBlock(),p.createElementBlock("div",XPe,[o.type==="info"?(p.openBlock(),p.createElementBlock("div",qPe,f[1]||(f[1]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"})],-1),p.createElementVNode("span",{class:"sr-only"},"info icon",-1)]))):p.createCommentVNode("",!0),o.type==="success"?(p.openBlock(),p.createElementBlock("div",jPe,f[2]||(f[2]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})],-1),p.createElementVNode("span",{class:"sr-only"},"success icon",-1)]))):p.createCommentVNode("",!0),o.type==="error"?(p.openBlock(),p.createElementBlock("div",GPe,f[3]||(f[3]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z"})],-1),p.createElementVNode("span",{class:"sr-only"},"Error icon",-1)]))):p.createCommentVNode("",!0),o.type==="warning"?(p.openBlock(),p.createElementBlock("div",YPe,f[4]||(f[4]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[p.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"})],-1),p.createElementVNode("span",{class:"sr-only"},"Warning icon",-1)]))):p.createCommentVNode("",!0),p.createElementVNode("div",KPe,p.toDisplayString(o.message),1),p.createElementVNode("button",{onClick:f[0]||(f[0]=h=>a("remove")),type:"button",class:"-mx-1.5 -my-1.5 ml-auto inline-flex h-8 w-8 rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white","data-dismiss-target":"#toast-default","aria-label":"Close"},f[5]||(f[5]=[p.createElementVNode("span",{class:"sr-only"},"Close",-1),p.createElementVNode("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))]))}},eDe={__name:"GlToastList",setup(r){function t(o){rb.methods.remove(o)}return(o,a)=>(p.openBlock(),p.createBlock(p.TransitionGroup,{tag:"div","enter-from-class":"translate-x-full opacity-0","enter-active-class":"duration-500","leave-active-class":"duration-500","leave-to-class":"translate-x-full opacity-0",class:"fixed z-1060 w-full max-w-xs space-y-4 top-4 right-4"},{default:p.withCtx(()=>[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(p.unref(rb).state.items,(c,f)=>(p.openBlock(),p.createBlock(JPe,{key:c.key,message:c.message,type:c.type,duration:c.duration,onRemove:h=>t(f)},null,8,["message","type","duration","onRemove"]))),128))]),_:1}))}},tDe={key:0,class:"flex lg:justify-center"},nDe={class:"xs:right-[unset] ltr:lg:right-[30px] rtl:lg:left-[30px] absolute z-10 mt-11 origin-top-right bg-white rounded-lg w-44 dark:bg-gray-800 shadow-lg border dark:border-gray-700"},oDe={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},sDe={key:0},rDe=["href"],iDe={key:1},aDe={__name:"DatatableAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(r,{emit:t}){const o=r,a=p.ref(!1),c=p.ref(!1),f=()=>{a.value=!1},h=()=>{a.value=!0},y=()=>{c.value=!1},w=()=>{c.value=!0},C=t,T=()=>{axios.delete(`${o.xprops.route}/${o.row.id}`).then(()=>{y(),C("deleteAction"),rb.methods.add({message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(R=>{console.log(R)})};return(R,B)=>{const V=p.resolveDirective("click-outside");return p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(lA,{isOpen:c.value,onConfirmDelete:T,onCancelDelete:y},null,8,["isOpen"]),r.row&&R.can(`edit_${r.xprops.permission} || delete_${r.xprops.permission}`)?p.withDirectives((p.openBlock(),p.createElementBlock("div",tDe,[p.createElementVNode("button",{onClick:h,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-hidden dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},B[0]||(B[0]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[p.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)])),p.withDirectives(p.createElementVNode("div",nDe,[p.createElementVNode("ul",oDe,[R.can(`edit_${r.xprops.permission}`)?(p.openBlock(),p.createElementBlock("li",sDe,[p.createElementVNode("a",{href:r.xprops.route+"/"+r.row.id+"/edit",class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},B[1]||(B[1]=[p.createElementVNode("i",{class:"mr-2 fa-solid fa-list-ul opacity-80"},null,-1),p.createTextVNode(" Edit")]),8,rDe)])):p.createCommentVNode("",!0),R.can(`delete_${r.xprops.permission}`)?(p.openBlock(),p.createElementBlock("li",iDe,[p.createElementVNode("a",{href:"#",onClick:p.withModifiers(w,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},B[2]||(B[2]=[p.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),p.createTextVNode(" Remove")]))])):p.createCommentVNode("",!0)])],512),[[p.vShow,a.value]])])),[[V,f]]):p.createCommentVNode("",!0)],64)}}},lDe={key:0,class:"flex lg:justify-center"},cDe={class:"absolute z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow-sm w-44 dark:bg-gray-700 dark:divide-gray-600"},uDe={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},dDe={key:0},fDe={__name:"DatatableDeleteAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(r,{emit:t}){const o=r,a=p.ref(!1),c=p.ref(!1),f=()=>{a.value=!1},h=()=>{a.value=!0},y=()=>{c.value=!1},w=()=>{c.value=!0},C=t,T=()=>{axios.delete(`${o.xprops.route}/${o.row.id}`).then(()=>{y(),C("deleteAction"),rb.methods.add({message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(R=>{console.log(R)})};return(R,B)=>{const V=p.resolveDirective("click-outside");return p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(lA,{isOpen:c.value,onConfirmDelete:T,onCancelDelete:y},null,8,["isOpen"]),r.row&&R.can(`delete_${r.xprops.permission}`)?p.withDirectives((p.openBlock(),p.createElementBlock("div",lDe,[p.createElementVNode("button",{onClick:h,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-hidden dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},B[0]||(B[0]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[p.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)])),p.withDirectives(p.createElementVNode("div",cDe,[p.createElementVNode("ul",uDe,[R.can(`delete_${r.xprops.permission}`)?(p.openBlock(),p.createElementBlock("li",dDe,[p.createElementVNode("a",{href:"#",onClick:p.withModifiers(w,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},B[1]||(B[1]=[p.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),p.createTextVNode(" Remove")]))])):p.createCommentVNode("",!0)])],512),[[p.vShow,a.value]])])),[[V,f]]):p.createCommentVNode("",!0)],64)}}},hDe={key:0,class:"flex lg:justify-center"},mDe={class:"xs:right-[unset] ltr:lg:right-[30px] rtl:lg:left-[30px] absolute z-10 mt-11 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow-sm w-44 dark:bg-gray-700 dark:divide-gray-600"},gDe={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},pDe={key:0},bDe={key:1},yDe={__name:"DatatableDeleteEditAction",props:{language:{type:Object,required:!1,default:()=>{}},field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:()=>({})},xprops:{type:Object,default:()=>({})},tdProps:{type:Object,default:()=>({})}},emits:["deleteAction","editAction"],setup(r,{emit:t}){const o=r,a=p.ref(!1),c=p.ref(!1),f=()=>{c.value=!1},h=()=>{c.value=!0},y=()=>{a.value=!1},w=()=>{a.value=!0},C=t,T=B=>{C("editAction",B)},R=()=>{axios.delete(`${o.xprops.route}/${o.row.id}`).then(()=>{var B;f(),C("deleteAction"),rb.methods.add({message:((B=o.language)==null?void 0:B.item_deleted_successfully)??"Item deleted successfully.",type:"success",duration:5e3})}).catch(B=>{console.log(B)})};return(B,V)=>{var X,Y;const q=p.resolveDirective("click-outside");return p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createVNode(lA,{language:r.language,isOpen:c.value,onConfirmDelete:R,onCancelDelete:f},null,8,["language","isOpen"]),r.row&&(B.can(`delete_${r.xprops.permission}`)||B.can(`access_${r.xprops.permission}`))?p.withDirectives((p.openBlock(),p.createElementBlock("div",hDe,[p.createElementVNode("button",{onClick:w,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-hidden dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},V[1]||(V[1]=[p.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[p.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)])),p.withDirectives(p.createElementVNode("div",mDe,[p.createElementVNode("ul",gDe,[B.can(`access_${r.xprops.permission}`)?(p.openBlock(),p.createElementBlock("li",pDe,[p.createElementVNode("a",{href:"#",onClick:V[0]||(V[0]=p.withModifiers(he=>T(r.row),["prevent"])),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[V[2]||(V[2]=p.createElementVNode("i",{class:"mr-1 fa-solid fa-pen-to-square opacity-80"},null,-1)),p.createTextVNode(" "+p.toDisplayString(((X=r.language)==null?void 0:X.edit)??"Edit"),1)])])):p.createCommentVNode("",!0),B.can(`delete_${r.xprops.permission}`)?(p.openBlock(),p.createElementBlock("li",bDe,[p.createElementVNode("a",{href:"#",onClick:p.withModifiers(h,["prevent"]),class:"block px-4 py-2 text-red-600 hover:text-white hover:bg-red-600 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600"},[V[3]||(V[3]=p.createElementVNode("i",{class:"mr-1 fa-solid fa-trash-can opacity-80"},null,-1)),p.createTextVNode(" "+p.toDisplayString(((Y=r.language)==null?void 0:Y.remove)??"Remove"),1)])])):p.createCommentVNode("",!0)])],512),[[p.vShow,a.value]])])),[[q,y]]):p.createCommentVNode("",!0)],64)}}},ODe={props:["field","row"],computed:{isArray(){return Array.isArray(this.row)},isObject(){return typeof this.row=="object"},isString(){return typeof this.row=="string"}},mounted(){}},xDe=["href","title"],vDe={key:1,class:"m-1 d-inline-block"},wDe=["href","title"];function SDe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",null,[f.isArray?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:0},p.renderList(o.row,(h,y)=>(p.openBlock(),p.createElementBlock("div",{key:y,class:"m-1 d-inline-block"},[p.createElementVNode("a",{href:h,title:h,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},t[0]||(t[0]=[p.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),p.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),p.createTextVNode(" Download ")]),8,xDe)]))),128)):f.isString?(p.openBlock(),p.createElementBlock("div",vDe,[p.createElementVNode("a",{href:o.row,title:o.row,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},t[1]||(t[1]=[p.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),p.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),p.createTextVNode(" Download ")]),8,wDe)])):p.createCommentVNode("",!0)])}const kDe=vi(ODe,[["render",SDe]]),CDe={props:["field","row"],computed:{isArray(){return Array.isArray(this.row[this.field])},isObject(){return typeof this.row[this.field]=="object"}}},EDe=["href","title"],_De={key:1,class:"m-1 d-inline-block"},TDe=["href","title"];function ADe(r,t,o,a,c,f){return f.isArray?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:0},p.renderList(o.row[o.field],h=>(p.openBlock(),p.createElementBlock("div",{key:h.id,class:"m-1 d-inline-block"},[p.createElementVNode("a",{href:h.url,title:h.name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},t[0]||(t[0]=[p.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),p.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),p.createTextVNode(" Download ")]),8,EDe)]))),128)):f.isObject?(p.openBlock(),p.createElementBlock("div",_De,[p.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},t[1]||(t[1]=[p.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),p.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),p.createTextVNode(" Download ")]),8,TDe)])):p.createCommentVNode("",!0)}const PDe=vi(CDe,[["render",ADe]]),DDe={props:["field","row","tdProps"]},NDe={key:0},$De=["innerHTML"];function RDe(r,t,o,a,c,f){return o.row[o.field]?(p.openBlock(),p.createElementBlock("div",NDe,[p.createElementVNode("div",{class:"w-full",innerHTML:o.row[o.field]},null,8,$De)])):p.createCommentVNode("",!0)}const BDe=vi(DDe,[["render",RDe]]),MDe={props:["field","row","tdProps"],computed:{entry(){const[r,t]=this.field.split(".");return p.markRaw({key:r,field:t})},isArray(){return Array.isArray(this.row[this.entry.key])},isObject(){return typeof this.row[this.entry.key]=="object"}}},FDe={key:0,class:"flex flex-wrap gap-2"},LDe={key:1,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm dark:bg-blue-900 dark:text-blue-300"};function IDe(r,t,o,a,c,f){return this.row[this.entry.key]?(p.openBlock(),p.createElementBlock("div",FDe,[f.isArray?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:0},p.renderList(o.row[f.entry.key],(h,y)=>(p.openBlock(),p.createElementBlock("span",{key:y,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm dark:bg-blue-900 dark:text-blue-300"},p.toDisplayString(h[f.entry.field]),1))),128)):f.isObject?(p.openBlock(),p.createElementBlock("span",LDe,p.toDisplayString(o.row[f.entry.key][f.entry.field]),1)):p.createCommentVNode("",!0)])):p.createCommentVNode("",!0)}const VDe=vi(MDe,[["render",IDe]]),QDe={props:["field","row","tdProps"],computed:{entry(){const r=this.field.split("."),t=r.pop();return{keys:r,field:t}},isArray(){return Array.isArray(this.getNestedValue(this.row,this.entry.keys))},isObject(){return typeof this.getNestedValue(this.row,this.entry.keys)=="object"}},methods:{getNestedValue(r,t){return t.reduce((o,a)=>(o||{})[a],r)}}},zDe={class:"flex flex-wrap gap-2"},HDe={key:1,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm dark:bg-blue-900 dark:text-blue-300"};function ZDe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",zDe,[f.isArray?(p.openBlock(!0),p.createElementBlock(p.Fragment,{key:0},p.renderList(f.getNestedValue(o.row,f.entry.keys),(h,y)=>(p.openBlock(),p.createElementBlock("span",{key:y,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-sm dark:bg-blue-900 dark:text-blue-300"},p.toDisplayString(h[f.entry.field]),1))),128)):f.isObject?(p.openBlock(),p.createElementBlock("span",HDe,p.toDisplayString(f.getNestedValue(o.row,f.entry.keys)[f.entry.field]),1)):p.createCommentVNode("",!0)])}const UDe=vi(QDe,[["render",ZDe]]),WDe={props:["field","row","tdProps"]},XDe={key:0},qDe={class:"m-1 d-inline-block"},jDe=["href","title"],GDe=["src","alt","title"];function YDe(r,t,o,a,c,f){return o.row[o.field]?(p.openBlock(),p.createElementBlock("div",XDe,[p.createElementVNode("div",qDe,[p.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank"},[p.createElementVNode("img",{src:o.row[o.field].thumbnail,alt:o.row[o.field].name,title:o.row[o.field].name},null,8,GDe)],8,jDe)])])):p.createCommentVNode("",!0)}const KDe=vi(WDe,[["render",YDe],["__scopeId","data-v-18c4893e"]]),JDe={props:["field","row","tdProps"],computed:{isArray(){return Array.isArray(this.row[this.field])},isObject(){return typeof this.row[this.field]=="object"}}},eNe={key:0,class:"grid grid-cols-2 gap-4"},tNe=["src","alt"],nNe={key:1},oNe=["src","alt"];function sNe(r,t,o,a,c,f){return f.isArray?(p.openBlock(),p.createElementBlock("div",eNe,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(o.row[o.field],h=>(p.openBlock(),p.createElementBlock("div",{key:h.id},[p.createElementVNode("img",{class:"h-auto max-w-full rounded-lg",src:h.thumbnail,alt:h.file_name},null,8,tNe)]))),128))])):f.isObject?(p.openBlock(),p.createElementBlock("div",nNe,[p.createElementVNode("img",{class:"h-auto max-w-full rounded-lg",src:o.row[o.field].thumbnail,alt:o.row[o.field].file_name},null,8,oNe)])):p.createCommentVNode("",!0)}const rNe=vi(JDe,[["render",sNe]]),iNe={props:["field","row","tdProps"],computed:{isActive(){return this.row[this.field]===1}}},aNe={class:"flex flex-wrap gap-2 text-nowrap"},lNe={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},cNe={key:1,class:"inline-flex items-center px-2 py-1 bg-red-100 text-red-800 text-xs font-medium rounded-full dark:bg-red-900 dark:text-red-300"};function uNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",aNe,[f.isActive?(p.openBlock(),p.createElementBlock("span",lNe,t[0]||(t[0]=[p.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),p.createTextVNode(" Active ")]))):f.isActive?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("span",cNe,t[1]||(t[1]=[p.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1),p.createTextVNode(" Inactive ")])))])}const dNe=vi(iNe,[["render",uNe]]),fNe={props:["field","row","tdProps"],computed:{hasLabelColor(r){const t=this.tdProps.status_general_labels_color.find(o=>o.label===this.row[this.field]);return t?t.class:""}}},hNe={class:"flex flex-wrap gap-2 text-nowrap"},mNe={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},gNe={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-red-800 bg-red-100 rounded-full dark:bg-red-900 dark:text-red-300"},pNe={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},bNe={key:3,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-gray-700 dark:text-blue-400"},yNe={key:4,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"};function ONe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",hNe,[f.hasLabelColor=="green"?(p.openBlock(),p.createElementBlock("span",mNe,[t[0]||(t[0]=p.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(this.row[this.field]),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="red"?(p.openBlock(),p.createElementBlock("span",gNe,[t[1]||(t[1]=p.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(this.row[this.field]),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="yellow"?(p.openBlock(),p.createElementBlock("span",pNe,[t[2]||(t[2]=p.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(this.row[this.field]),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="default"?(p.openBlock(),p.createElementBlock("span",bNe,[t[3]||(t[3]=p.createElementVNode("span",{class:"w-2 h-2 bg-blue-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(this.row[this.field]),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="animate"?(p.openBlock(),p.createElementBlock("span",yNe,[t[4]||(t[4]=p.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[p.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),p.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1)),p.createTextVNode(" "+p.toDisplayString(this.row[this.field]),1)])):p.createCommentVNode("",!0)])}const xNe=vi(fNe,[["render",ONe]]),vNe={props:["field","row","tdProps"],computed:{hasLabelColor(){return this.tdProps.specfic_color??""},badgeType(){switch(this.tdProps.badge_type){case"Default":return"rounded-sm text-xs";case"Large":return"rounded-sm text-sm ";case"Bordered":return"rounded-sm text-xs border";case"Pills":return"rounded-full text-xs";default:return""}}}},wNe={class:"flex flex-wrap gap-2 text-nowrap lg:justify-center"};function SNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",wNe,[f.hasLabelColor=="Default"?(p.openBlock(),p.createElementBlock("span",{key:0,class:p.normalizeClass(["bg-blue-100 text-blue-800 font-medium me-2 px-2.5 py-0.5 dark:bg-blue-900 dark:text-blue-300 border-blue-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Dark"?(p.openBlock(),p.createElementBlock("span",{key:1,class:p.normalizeClass(["bg-gray-100 text-gray-800 font-medium me-2 px-2.5 py-0.5 dark:bg-gray-700 dark:text-gray-300 border-gray-500",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Red"?(p.openBlock(),p.createElementBlock("span",{key:2,class:p.normalizeClass(["bg-red-100 text-red-800 font-medium me-2 px-2.5 py-0.5 dark:bg-red-900 dark:text-red-300 border-red-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Green"?(p.openBlock(),p.createElementBlock("span",{key:3,class:p.normalizeClass(["bg-green-100 text-green-800 font-medium me-2 px-2.5 py-0.5 dark:bg-green-900 dark:text-green-300 border-green-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Yellow"?(p.openBlock(),p.createElementBlock("span",{key:4,class:p.normalizeClass(["bg-yellow-100 text-yellow-800 font-medium me-2 px-2.5 py-0.5 dark:bg-yellow-900 dark:text-yellow-300 border-yellow-300",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Indigo"?(p.openBlock(),p.createElementBlock("span",{key:5,class:p.normalizeClass(["bg-indigo-100 text-indigo-800 font-medium me-2 px-2.5 py-0.5 dark:bg-indigo-900 dark:text-indigo-300 border-indigo-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Purple"?(p.openBlock(),p.createElementBlock("span",{key:6,class:p.normalizeClass(["bg-purple-100 text-purple-800 font-medium me-2 px-2.5 py-0.5 dark:bg-purple-900 dark:text-purple-300 border-purple-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0),f.hasLabelColor=="Pink"?(p.openBlock(),p.createElementBlock("span",{key:7,class:p.normalizeClass(["bg-pink-100 text-pink-800 font-medium me-2 px-2.5 py-0.5 dark:bg-pink-900 dark:text-pink-300 border-pink-400",f.badgeType])},p.toDisplayString(this.row[this.field]),3)):p.createCommentVNode("",!0)])}const kNe=vi(vNe,[["render",SNe]]),CNe={props:["field","row","tdProps"],computed:{entry(){const r=this.field.split("."),t=r.pop();return{keys:r,field:t}},isArray(){return Array.isArray(this.getNestedValue(this.row,this.entry.keys))},isObject(){return typeof this.getNestedValue(this.row,this.entry.keys)=="object"},hasLabelColor(r){const t=this.tdProps.status_general_labels_color.find(o=>o.text===this.getValue());return t?t.class:""},getLabel(){const r=this.tdProps.status_general_labels_color.find(t=>t.text===this.getValue());return r?r.label:""}},methods:{getValue(){return this.isObject?this.getNestedValue(this.row,this.entry.keys)[this.entry.field]:this.row[this.field]},getNestedValue(r,t){return t.reduce((o,a)=>(o||{})[a],r)}}},ENe={class:"flex flex-wrap gap-2 text-nowrap"},_Ne={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},TNe={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-red-800 bg-red-100 rounded-full dark:bg-red-900 dark:text-red-300"},ANe={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},PNe={key:3,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-gray-700 dark:text-blue-400"},DNe={key:4,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"};function NNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",ENe,[f.hasLabelColor=="green"?(p.openBlock(),p.createElementBlock("span",_Ne,[t[0]||(t[0]=p.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(f.getLabel),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="red"?(p.openBlock(),p.createElementBlock("span",TNe,[t[1]||(t[1]=p.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(f.getLabel),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="yellow"?(p.openBlock(),p.createElementBlock("span",ANe,[t[2]||(t[2]=p.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(f.getLabel),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="default"?(p.openBlock(),p.createElementBlock("span",PNe,[t[3]||(t[3]=p.createElementVNode("span",{class:"w-2 h-2 bg-blue-500 rounded-full me-1"},null,-1)),p.createTextVNode(" "+p.toDisplayString(f.getLabel),1)])):p.createCommentVNode("",!0),f.hasLabelColor=="animate"?(p.openBlock(),p.createElementBlock("span",DNe,[t[4]||(t[4]=p.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[p.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),p.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1)),p.createTextVNode(" "+p.toDisplayString(f.getLabel),1)])):p.createCommentVNode("",!0)])}const $Ne=vi(CNe,[["render",NNe]]),RNe={props:["field","row","tdProps"],computed:{formattedDate(){if(!this.row[this.field])return"";const r=new Date(this.row[this.field]),t=r.getFullYear(),o=r.toLocaleString("default",{month:"2-digit"}),a=r.getDate();let c=r.getHours();const f=r.getMinutes(),h=r.getSeconds(),y=c>=12?"pm":"am";return c=c%12,c=c||12,`${a}-${o}-${t}, ${c}:${f}:${h} ${y}`}}},BNe={class:"w-full"};function MNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",BNe,p.toDisplayString(f.formattedDate),1)}const FNe=vi(RNe,[["render",MNe]]),LNe={props:["field","row","tdProps"],computed:{formattedDate(){if(!this.row[this.field])return"";const r=new Date(this.row[this.field]),t=r.getFullYear(),o=r.toLocaleString("default",{month:"long"}),a=r.getDate();return`${o} ${a}, ${t}`}}},INe={class:"w-full"};function VNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",INe,p.toDisplayString(f.formattedDate),1)}const QNe=vi(LNe,[["render",VNe]]),zNe={props:["field","row","tdProps"]},HNe={class:"flex flex-wrap gap-2 text-nowrap"},ZNe={key:0,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"},UNe={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},WNe={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"};function XNe(r,t,o,a,c,f){return p.openBlock(),p.createElementBlock("div",HNe,[o.row[o.field]===0?(p.openBlock(),p.createElementBlock("span",ZNe,t[0]||(t[0]=[p.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[p.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),p.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1),p.createTextVNode(" Provisioning")]))):p.createCommentVNode("",!0),o.row[o.field]===2?(p.openBlock(),p.createElementBlock("span",UNe,t[1]||(t[1]=[p.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1),p.createTextVNode(" Paused ")]))):p.createCommentVNode("",!0),o.row[o.field]===1?(p.openBlock(),p.createElementBlock("span",WNe,t[2]||(t[2]=[p.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),p.createTextVNode(" Active ")]))):p.createCommentVNode("",!0)])}const qNe=vi(zNe,[["render",XNe]]),jNe={props:["field","row","tdProps"]},GNe={key:0,class:"text-nowrap w-full"},YNe={class:"w-full h-full p-3 mx-0 mt-0 overflow-auto font-mono text-left break-words rounded-sm cursor-default whitespace-nowrap console_styles"};function KNe(r,t,o,a,c,f){return o.row[o.field]?(p.openBlock(),p.createElementBlock("div",GNe,[p.createElementVNode("pre",YNe," "+p.toDisplayString(o.row[o.field])+`
213
213
  `,1)])):p.createCommentVNode("",!0)}const JNe=vi(jNe,[["render",KNe]]),e$e={components:{GlButton:o6},props:["isOpen","title","button_text"],methods:{confirmAction(){this.$emit("confirm-action")},cancelAction(){this.$emit("cancel-action")}}},t$e={key:0,class:"fixed inset-0 z-50 overflow-y-auto",role:"dialog","aria-modal":"true"},n$e={class:"flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:p-0"},o$e={class:"inline-block relative overflow-hidden text-left align-bottom transition-all transform bg-white dark:bg-gray-800 rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},s$e={class:"px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},r$e={class:"sm:flex sm:items-start"},i$e={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},a$e={class:"text-lg font-medium leading-6"},l$e={class:"mt-2"},c$e={class:"border-t border-gray-200 rounded-b dark:border-gray-600 px-4 py-3 sm:px-6 flex gap-2"};function u$e(r,t,o,a,c,f){const h=p.resolveComponent("gl-button");return o.isOpen?(p.openBlock(),p.createElementBlock("div",t$e,[p.createElementVNode("div",n$e,[t[1]||(t[1]=p.createElementVNode("div",{class:"fixed inset-0 transition-opacity bg-gray-500/75","aria-hidden":"true"},null,-1)),t[2]||(t[2]=p.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1)),p.createElementVNode("div",o$e,[p.createElementVNode("div",s$e,[p.createElementVNode("div",r$e,[p.createElementVNode("div",i$e,[p.createElementVNode("h3",a$e,p.toDisplayString(o.title),1),p.createElementVNode("div",l$e,[p.renderSlot(r.$slots,"default")])])])]),p.createElementVNode("div",c$e,[p.createVNode(h,{onClick:f.confirmAction,tag:"button",button_type:"red"},{default:p.withCtx(()=>[p.createTextVNode(p.toDisplayString(o.button_text),1)]),_:1},8,["onClick"]),p.createVNode(h,{onClick:f.cancelAction,tag:"button",button_type:"light"},{default:p.withCtx(()=>t[0]||(t[0]=[p.createTextVNode(" Cancel ")])),_:1},8,["onClick"])])])])])):p.createCommentVNode("",!0)}const d$e=vi(e$e,[["render",u$e]]),f$e={class:"w-full"},h$e={class:"mb-2 flex justify-between items-center"},m$e={class:"text-sm font-medium text-gray-900 dark:text-white"},g$e={class:"relative bg-gray-50 rounded-lg dark:bg-gray-700 p-4 h-auto"},p$e={class:"overflow-auto max-h-32"},b$e=["innerHTML"],y$e={key:1,class:"text-sm text-gray-500 dark:text-gray-400"},O$e={class:"absolute top-2 end-2 bg-gray-50 dark:bg-gray-700"},x$e={key:0,class:"inline-flex items-center"},v$e={key:1,class:"inline-flex items-center"},w$e={class:"mt-2 text-sm text-gray-500 dark:text-gray-400"},S$e={__name:"GlCodeCopy",props:{label_name:{type:String,default:""},code:{type:String,default:""},description:{type:String,default:""},isPre:{type:Boolean,default:!1}},setup(r){const t=r,o=p.ref(!1),a=f=>{navigator.clipboard.writeText(f).then(function(){o.value=!0,setTimeout(()=>{o.value=!1},2e3)}).catch(function(h){console.error("Error copying to clipboard: ",h)})},c=p.computed(()=>t.code);return(f,h)=>(p.openBlock(),p.createElementBlock("div",f$e,[p.createElementVNode("div",h$e,[p.createElementVNode("p",m$e,p.toDisplayString(r.label_name),1)]),p.createElementVNode("div",g$e,[p.createElementVNode("div",p$e,[r.isPre?(p.openBlock(),p.createElementBlock("pre",{key:0,class:"text-sm text-gray-500 dark:text-gray-400",innerHTML:c.value},null,8,b$e)):(p.openBlock(),p.createElementBlock("code",y$e,p.toDisplayString(c.value),1))]),p.createElementVNode("div",O$e,[p.createElementVNode("button",{onClick:h[0]||(h[0]=y=>a(c.value)),class:"text-gray-900 dark:text-gray-400 m-1 hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 rounded-lg py-2 px-3 inline-flex items-center justify-center bg-white border-gray-200 border"},[o.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("span",x$e,h[1]||(h[1]=[p.createElementVNode("svg",{class:"w-3 h-3 me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 18 20"},[p.createElementVNode("path",{d:"M16 1h-3.278A1.992 1.992 0 0 0 11 0H7a1.993 1.993 0 0 0-1.722 1H2a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2Zm-3 14H5a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2Zm0-4H5a1 1 0 0 1 0-2h8a1 1 0 1 1 0 2Zm0-5H5a1 1 0 0 1 0-2h2V2h4v2h2a1 1 0 1 1 0 2Z"})],-1),p.createElementVNode("span",{class:"text-xs font-semibold"},"Copy",-1)]))),o.value?(p.openBlock(),p.createElementBlock("span",v$e,h[2]||(h[2]=[p.createElementVNode("svg",{class:"w-3 h-3 text-blue-700 dark:text-blue-500 me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"})],-1),p.createElementVNode("span",{class:"text-xs font-semibold text-blue-700 dark:text-blue-500"},"Copied",-1)]))):p.createCommentVNode("",!0)])])]),p.createElementVNode("p",w$e,p.toDisplayString(r.description),1)]))}},k$e={class:"w-full"},C$e={class:"flex justify-between items-center"},E$e={class:"gl-label-form"},_$e={class:"flex items-center"},T$e={class:"shrink-0 z-10 inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-s-lg dark:bg-gray-600 dark:text-white dark:border-gray-600"},A$e={class:"relative w-full"},P$e=["value"],D$e={key:0},N$e={key:1,class:"inline-flex items-center"},$$e={class:"mt-2 text-sm text-gray-500 dark:text-gray-400"},R$e={__name:"GlTextCopy",props:{label_name:{type:String,default:""},text_name:{type:String,default:""},code:{type:String,default:""},description:{type:String,default:""}},setup(r){const t=r,o=p.ref(!1),a=f=>{navigator.clipboard.writeText(f).then(function(){o.value=!0,setTimeout(()=>{o.value=!1},2e3)}).catch(function(h){console.error("Error copying to clipboard: ",h)})},c=p.computed(()=>t.code);return(f,h)=>(p.openBlock(),p.createElementBlock("div",k$e,[p.createElementVNode("div",C$e,[p.createElementVNode("label",E$e,p.toDisplayString(r.label_name),1)]),p.createElementVNode("div",_$e,[p.createElementVNode("span",T$e,p.toDisplayString(r.text_name),1),p.createElementVNode("div",A$e,[p.createElementVNode("input",{type:"text","aria-describedby":"helper-text-explanation",class:"bg-gray-50 border border-e-0 border-gray-300 text-gray-500 dark:text-gray-400 text-sm border-s-0 focus:ring-blue-500 focus:border-blue-500 block w-full p-2 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500",value:c.value,readonly:"",disabled:""},null,8,P$e)]),p.createElementVNode("button",{style:{padding:".61rem"},onClick:h[0]||(h[0]=y=>a(c.value)),class:"shrink-0 z-10 inline-flex items-center px-4 text-sm font-medium text-center text-white bg-blue-700 rounded-e-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 border border-blue-700 dark:border-blue-600 hover:border-blue-800 dark:hover:border-blue-700",type:"button"},[o.value?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("span",D$e,h[1]||(h[1]=[p.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 18 20"},[p.createElementVNode("path",{d:"M16 1h-3.278A1.992 1.992 0 0 0 11 0H7a1.993 1.993 0 0 0-1.722 1H2a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2Zm-3 14H5a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2Zm0-4H5a1 1 0 0 1 0-2h8a1 1 0 1 1 0 2Zm0-5H5a1 1 0 0 1 0-2h2V2h4v2h2a1 1 0 1 1 0 2Z"})],-1)]))),o.value?(p.openBlock(),p.createElementBlock("span",N$e,h[2]||(h[2]=[p.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},[p.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"})],-1)]))):p.createCommentVNode("",!0)])]),p.createElementVNode("p",$$e,p.toDisplayString(r.description),1)]))}},B$e={class:"flex flex-wrap gap-2 text-nowrap"},M$e={key:0,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"},F$e={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},L$e={key:2,class:"inline-flex items-center px-2 py-1 bg-red-100 text-red-800 text-xs font-medium rounded-full dark:bg-red-900 dark:text-red-300"},I$e={__name:"StatusRunningSuccessFailed",props:{status:{type:Number,default:!1}},setup(r){return(t,o)=>(p.openBlock(),p.createElementBlock("div",B$e,[r.status===0?(p.openBlock(),p.createElementBlock("span",M$e,o[0]||(o[0]=[p.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[p.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),p.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1),p.createTextVNode(" Running")]))):p.createCommentVNode("",!0),r.status===1?(p.openBlock(),p.createElementBlock("span",F$e,o[1]||(o[1]=[p.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),p.createTextVNode(" Success ")]))):p.createCommentVNode("",!0),r.status===2?(p.openBlock(),p.createElementBlock("span",L$e,o[2]||(o[2]=[p.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1),p.createTextVNode(" Failed ")]))):p.createCommentVNode("",!0)]))}},V$e={class:"flex flex-wrap text-nowrap"},Q$e={key:0,class:"inline-flex items-center px-2 py-1 text-sm text-blue-800 bg-blue-100 rounded-full dark:bg-blue-900 dark:text-blue-300"},z$e={key:1,class:"inline-flex items-center px-2 py-1 text-sm font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},H$e={key:2,class:"inline-flex items-center px-2 py-1 bg-red-100 text-red-800 text-sm font-medium rounded-full dark:bg-red-900 dark:text-red-300"},Z$e={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"none",class:"w-5 h-5",style:{"animation-direction":"reverse"}},U$e={__name:"StatusConnectingConnectedDisconnected",props:{status:{type:Number,default:!1}},emits:["reconnect"],setup(r,{emit:t}){const o=t,a=()=>{o("reconnect")};return(c,f)=>(p.openBlock(),p.createElementBlock("div",V$e,[r.status===0?(p.openBlock(),p.createElementBlock("span",Q$e,f[0]||(f[0]=[p.createElementVNode("span",{class:"relative flex w-2 h-2 mr-1"},[p.createElementVNode("span",{class:"absolute inline-flex w-full h-full bg-blue-500 rounded-full animate-ping"}),p.createElementVNode("span",{class:"relative inline-flex w-2 h-2 bg-blue-500 rounded-full"})],-1),p.createTextVNode(" Connecting")]))):p.createCommentVNode("",!0),r.status===1?(p.openBlock(),p.createElementBlock("span",z$e,f[1]||(f[1]=[p.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),p.createTextVNode(" Connected ")]))):p.createCommentVNode("",!0),r.status===2?(p.openBlock(),p.createElementBlock("span",H$e,f[2]||(f[2]=[p.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1),p.createTextVNode(" Disconnected ")]))):p.createCommentVNode("",!0),p.createElementVNode("button",{onClick:a,class:"ml-1"},[(p.openBlock(),p.createElementBlock("svg",Z$e,f[3]||(f[3]=[p.createElementVNode("path",{"fill-rule":"evenodd",d:"M10 1.425c.002-.113-.044-.222-.125-.3L9.708.958C9.63.879 9.523.835 9.412.835s-.218.044-.296.123L6.163 3.9c-.16.165-.16.427 0 .592l2.953 2.942c.078.079.185.123.296.123s.218-.044.296-.123l.167-.167c.081-.078.127-.187.125-.3V5c2.764 0 5.005 2.239 5.005 5 0 .808-.197 1.603-.575 2.317-.086.162-.056.362.075.492l.609.608c.092.091.222.134.35.117s.241-.091.309-.2a6.66 6.66 0 0 0 .002-6.664C14.584 4.607 12.383 3.336 10 3.333V1.425zm.588 11.018c.111 0 .218.044.296.123l2.953 2.942c.16.165.16.427 0 .592l-2.953 2.942c-.078.079-.185.123-.296.123s-.218-.044-.296-.123l-.167-.167c-.082-.078-.127-.187-.125-.3v-1.908c-2.383-.002-4.584-1.274-5.774-3.336a6.66 6.66 0 0 1 .002-6.664c.064-.115.178-.195.309-.217s.258.025.35.117l.617.617c.128.131.159.329.075.492-.386.714-.587 1.513-.584 2.325 0 2.761 2.241 5 5.005 5v-1.967c-.002-.113.044-.222.125-.3l.167-.167c.078-.079.185-.123.296-.123z",fill:"currentColor"},null,-1)])))])]))}},W$e={beforeMount:(r,t)=>{r.clickOutsideEvent=o=>{r==o.target||r.contains(o.target)||t.value(o,r)},document.addEventListener("click",r.clickOutsideEvent)},unmounted:r=>{document.removeEventListener("click",r.clickOutsideEvent)}};class X$e{constructor(){this.errors={}}all(){return this.errors}has(t){return this.errors.hasOwnProperty(t)}any(){return Object.keys(this.errors).length>0}get(t){if(this.errors[t])return this.errors[t][0]}record(t){this.errors=t}clear(t){if(t){delete this.errors[t];return}this.errors={}}}class q$e{constructor(t){this.originalData=t;for(let o in t)this[o]=t[o];this.errors=new X$e}data(){let t={};for(let o in this.originalData)t[o]=this[o];return t}reset(){for(let t in this.originalData)this[t]="";this.errors.clear()}post(t){return this.submit("post",t)}put(t){return this.submit("put",t)}patch(t){return this.submit("patch",t)}delete(t){return this.submit("delete",t)}submit(t,o){return new Promise((a,c)=>{axios[t](o,this.data()).then(f=>{this.onSuccess(f.data),a(f.data)}).catch(f=>{this.onFail(f.response.data),c(f.response.data)})})}onSuccess(t){alert(t.message),this.reset()}onFail(t){this.errors.record(t)}}(function(r,t){var o="multilingual",a={type:"normal",editing:!1,transInputs:"input[data-i18n=true]",trans_selector_name:"i18n_selector",langSelectors:".language-selector"};function c(f,h){this.container=f,this.element=t.querySelector(f),this.settings=Object.assign({},a,h),this._defaults=a,this._name=o,this.init()}Object.assign(c.prototype,{init:function(){var f=this.element.querySelector(this.settings.langSelectors);if(this.transInputs=this.element.querySelectorAll(this.settings.transInputs),this.langSelectors=f.querySelectorAll("input"),this.transInputs.length===0||this.langSelectors.length===0)return!1;this.setup(),this.refresh()},setup:function(){var f=this;this.locale=this.returnLocale(),this._languageChangeHandler=this.selectLanguage.bind(this);var h=this.element.querySelectorAll(".js-language-label");h&&h.forEach(function(y){y.textContent=this.locale},this),this.langSelectors.forEach(function(y){y.addEventListener("change",f._languageChangeHandler)})},destroy:function(){this.langSelectors&&this._languageChangeHandler&&this.langSelectors.forEach(function(f){f.removeEventListener("change",this._languageChangeHandler)},this),this._languageChangeHandler=null,this.element=null,this.container=null,this.transInputs=null,this.langSelectors=null,this.settings=Object.assign({},this._defaults)},refresh:function(){var f=this;this.transInputs.forEach(function(h){var y=h,w=y.nextElementSibling.classList.contains(f.settings.editing?"form-input-translation":"input_tr_show")?y.nextElementSibling:null;w&&(w.dataset.inp=y.id,y.dataset.inpUsr=w.id);var C=f.loadJsonField(y.value);f.settings.editing&&(y.value=JSON.stringify(C)),f.langSelectors.forEach(function(T){y.dataset[T.value]=C[T.value],T.value===f.locale&&f.loadLang(y,T.value)})})},findNextSibling:function(f,h){for(var y=f.nextElementSibling;y&&!y.matches(h);)y=y.nextElementSibling;return y},loadJsonField:function(f){var h={};return this.isJsonValid(f)?(h=JSON.parse(f),this.langSelectors.forEach(function(y){h[y.value]=h[y.value]||""}),h):(this.langSelectors.forEach(function(y){h[y.value]=""}),h)},isJsonValid:function(f){try{JSON.parse(f)}catch{return!1}return!0},returnLocale:function(){var f=this.element.querySelector('input[name="'+this.settings.trans_selector_name+'"]:checked');return f?f.value:""},selectLanguage:function(f){var h=this,y=f.target.value;this.transInputs.forEach(function(C){if(h.settings.editing){h.updateInputCache(C);var T=new Event("change");C.dispatchEvent(T)}h.loadLang(C,y)}),this.locale=y;var w=this.element.querySelectorAll(".js-language-label");w&&w.forEach(function(C){C.textContent=y},this)},prepareData:function(){var f=this;this.transInputs.forEach(function(h){f.updateInputCache(h);var y=new Event("change");h.dispatchEvent(y)})},updateInputCache:function(f){var h=this,y=f.dataset.inpUsr,w=t.getElementById(y).value,C={};if(t.getElementById(y).classList.contains("tiny")){var T=tinymce.get(t.getElementById(y).name);w=T.getContent()}t.getElementById(y).classList.contains("CodeEditor")&&(w=t.getElementById(y).querySelector(".cm-content").cmView.view.state.doc.toString()),h.langSelectors.forEach(function(R){var B=R.value;C[B]=h.locale==B?w:f.dataset[B]}),f.value=JSON.stringify(C),f.dataset[h.locale]=w},loadLang:function(f,h){var y=f.dataset.inpUsr,w=f.dataset[h];if(!this.settings.editing)this.settings.type==="tiny"?t.getElementById(y).innerHTML=w:t.getElementById(y).textContent=w;else{var C=tinymce.get(y);if(t.getElementById(y).classList.contains("tiny")&&C&&C.initialized)C.setContent(w);else if(t.getElementById(y).classList.contains("CodeEditor")){let R=t.getElementById(y).querySelector(".cm-content").cmView.view;R.dispatch({changes:{from:0,to:R.state.doc.length,insert:w}})}else t.getElementById(y).value=w}}}),r.multilingual=c})(window,document);const j$e=window.multilingual;qo.ClickOutsideDirective=W$e,qo.DatatableStatusTextLabelGeneral=$Ne,qo.Form=q$e,qo.GLDatatableCommand=JNe,qo.GLDatatableDate=QNe,qo.GLDatatableDateTime=FNe,qo.GLDatatableStatusServer=qNe,qo.GlAccordion=WPe,qo.GlAccordionsWrapper=VPe,qo.GlButton=o6,qo.GlCard=Dhe,qo.GlCodeCopy=S$e,qo.GlCodeMirror=x2e,qo.GlCodeMirrorTranslate=jwe,qo.GlConfirmationModal=d$e,qo.GlDataTable=NPe,qo.GlDataTableComponent=T5e,qo.GlDataTableServerSide=UAe,qo.GlDataTableServerSideGroupBy=K5e,qo.GlDatatableAction=aDe,qo.GlDatatableConvertCronToHuman=FPe,qo.GlDatatableDeleteAction=fDe,qo.GlDatatableDeleteEditAction=yDe,qo.GlDatatableFileDownload=kDe,qo.GlDatatableFiles=PDe,qo.GlDatatableHtml=BDe,qo.GlDatatableList=VDe,qo.GlDatatableListNested=UDe,qo.GlDatatablePicture=KDe,qo.GlDatatablePictures=rNe,qo.GlDatatableStatus=dNe,qo.GlDatatableStatusGeneral=xNe,qo.GlDatatableStatusSpecficColor=kNe,qo.GlDatePicker=bH,qo.GlDateRangePicker=Xne,qo.GlDeleteConfirmationModal=lA,qo.GlDropdown=qne,qo.GlDynamicConfirmation=Dle,qo.GlFilesUpload=vhe,qo.GlLanguageSelector=_he,qo.GlModal=Fpe,qo.GlModalShow=Ype,qo.GlModalWithoutOverflow=Zpe,qo.GlMultiItemSlide=Kge,qo.GlMultiItemSlideDynamic=Ppe,qo.GlMultiSelectDropdown=jhe,qo.GlStatusConnectingConnectedDisconnected=U$e,qo.GlStatusRunningSuccessFailed=I$e,qo.GlTab=pge,qo.GlTabShow=xge,qo.GlTabsWrapper=fge,qo.GlTailwindPagination=OU,qo.GlTextCopy=R$e,qo.GlTextInput=Wne,qo.GlTextInputFile=age,qo.GlTextTranslate=hme,qo.GlTextarea=W0e,qo.GlTextareaTranslate=sme,qo.GlTinymce=x1e,qo.GlTinymceTranslate=sSe,qo.GlToast=rb,qo.GlToastList=eDe,qo.GlToggleBox=l0e,qo.GlToggleBoxTrueFalse=O0e,qo.multilingual=j$e,Object.defineProperty(qo,Symbol.toStringTag,{value:"Module"})});