@quoreadmin/ui 1.1.8 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -61387,7 +61387,8 @@ function moe(n, e, t, r, i, s) {
61387
61387
  "onUpdate:modelValue": e[0] || (e[0] = (f) => n.showFilterPopover = f),
61388
61388
  position: "bottom",
61389
61389
  align: "right",
61390
- trigger: "click"
61390
+ trigger: "click",
61391
+ size: "lg"
61391
61392
  }, {
61392
61393
  trigger: ne(({ onClick: f }) => [
61393
61394
  _(u, { class: "z-[45] ml-2" }, {
@@ -61465,7 +61466,7 @@ function moe(n, e, t, r, i, s) {
61465
61466
  ])) : L("", !0)
61466
61467
  ], 8, soe);
61467
61468
  }
61468
- const goe = /* @__PURE__ */ Ve(ioe, [["render", moe], ["__scopeId", "data-v-b63d103b"]]), yoe = Oe({
61469
+ const goe = /* @__PURE__ */ Ve(ioe, [["render", moe], ["__scopeId", "data-v-f156f45e"]]), yoe = Oe({
61469
61470
  name: "QDataList",
61470
61471
  components: {
61471
61472
  QBadge: U0,
@@ -248,7 +248,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
248
248
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,l;return{s:function(){t=t.call(n)},n:function(){var d=t.next();return o=d.done,d},e:function(d){s=!0,l=d},f:function(){try{!o&&t.return!=null&&t.return()}finally{if(s)throw l}}}}function aI(n,e){if(n){if(typeof n=="string")return K8(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return K8(n,e)}}function K8(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}var lI={name:"FileUpload",extends:Kne,inheritAttrs:!1,emits:["select","uploader","before-upload","progress","upload","error","before-send","clear","remove","remove-uploaded-file"],duplicateIEEvent:!1,data:function(){return{uploadedFileCount:0,files:[],messages:[],focused:!1,progress:null,uploadedFiles:[]}},methods:{onFileSelect:function(e){if(e.type!=="drop"&&this.isIE11()&&this.duplicateIEEvent){this.duplicateIEEvent=!1;return}this.messages=[],this.files=this.files||[];var t=e.dataTransfer?e.dataTransfer.files:e.target.files,r=U3(t),i;try{for(r.s();!(i=r.n()).done;){var o=i.value;this.isFileSelected(o)||this.validate(o)&&(this.isImage(o)&&(o.objectURL=window.URL.createObjectURL(o)),this.files.push(o))}}catch(s){r.e(s)}finally{r.f()}this.$emit("select",{originalEvent:e,files:this.files}),this.fileLimit&&this.checkFileLimit(),this.auto&&this.hasFiles&&!this.isFileLimitExceeded()&&this.upload(),e.type!=="drop"&&this.isIE11()?this.clearIEInput():this.clearInputElement()},choose:function(){this.$refs.fileInput.click()},upload:function(){var e=this;if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.$emit("uploader",{files:this.files}),this.clear();else{var t=new XMLHttpRequest,r=new FormData;this.$emit("before-upload",{xhr:t,formData:r});var i=U3(this.files),o;try{for(i.s();!(o=i.n()).done;){var s=o.value;r.append(this.name,s,s.name)}}catch(l){i.e(l)}finally{i.f()}t.upload.addEventListener("progress",function(l){l.lengthComputable&&(e.progress=Math.round(l.loaded*100/l.total)),e.$emit("progress",{originalEvent:l,progress:e.progress})}),t.onreadystatechange=function(){if(t.readyState===4){var l;e.progress=0,t.status>=200&&t.status<300?(e.fileLimit&&(e.uploadedFileCount+=e.files.length),e.$emit("upload",{xhr:t,files:e.files})):e.$emit("error",{xhr:t,files:e.files}),(l=e.uploadedFiles).push.apply(l,G8(e.files)),e.clear()}},t.open("POST",this.url,!0),this.$emit("before-send",{xhr:t,formData:r}),t.withCredentials=this.withCredentials,t.send(r)}},clear:function(){this.files=[],this.messages=null,this.$emit("clear"),this.isAdvanced&&this.clearInputElement()},onFocus:function(){this.focused=!0},onBlur:function(){this.focused=!1},isFileSelected:function(e){if(this.files&&this.files.length){var t=U3(this.files),r;try{for(t.s();!(r=t.n()).done;){var i=r.value;if(i.name+i.type+i.size===e.name+e.type+e.size)return!0}}catch(o){t.e(o)}finally{t.f()}}return!1},isIE11:function(){return!!window.MSInputMethodContext&&!!document.documentMode},validate:function(e){return this.accept&&!this.isFileTypeValid(e)?(this.messages.push(this.invalidFileTypeMessage.replace("{0}",e.name).replace("{1}",this.accept)),!1):this.maxFileSize&&e.size>this.maxFileSize?(this.messages.push(this.invalidFileSizeMessage.replace("{0}",e.name).replace("{1}",this.formatSize(this.maxFileSize))),!1):!0},isFileTypeValid:function(e){var t=this.accept.split(",").map(function(l){return l.trim()}),r=U3(t),i;try{for(r.s();!(i=r.n()).done;){var o=i.value,s=this.isWildcard(o)?this.getTypeClass(e.type)===this.getTypeClass(o):e.type==o||this.getFileExtension(e).toLowerCase()===o.toLowerCase();if(s)return!0}}catch(l){r.e(l)}finally{r.f()}return!1},getTypeClass:function(e){return e.substring(0,e.indexOf("/"))},isWildcard:function(e){return e.indexOf("*")!==-1},getFileExtension:function(e){return"."+e.name.split(".").pop()},isImage:function(e){return/^image\//.test(e.type)},onDragEnter:function(e){this.disabled||(e.stopPropagation(),e.preventDefault())},onDragOver:function(e){this.disabled||(!this.isUnstyled&&L.addClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!0),e.stopPropagation(),e.preventDefault())},onDragLeave:function(){this.disabled||(!this.isUnstyled&&L.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1))},onDrop:function(e){if(!this.disabled){!this.isUnstyled&&L.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1),e.stopPropagation(),e.preventDefault();var t=e.dataTransfer?e.dataTransfer.files:e.target.files,r=this.multiple||t&&t.length===1;r&&this.onFileSelect(e)}},onBasicUploaderClick:function(e){this.hasFiles?this.upload():e.button===0&&this.$refs.fileInput.click()},remove:function(e){this.clearInputElement();var t=this.files.splice(e,1)[0];this.files=G8(this.files),this.$emit("remove",{file:t,files:this.files})},removeUploadedFile:function(e){var t=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=G8(this.uploadedFiles),this.$emit("remove-uploaded-file",{file:t,files:this.uploadedFiles})},clearInputElement:function(){this.$refs.fileInput.value=""},clearIEInput:function(){this.$refs.fileInput&&(this.duplicateIEEvent=!0,this.$refs.fileInput.value="")},formatSize:function(e){var t,r=1024,i=3,o=((t=this.$primevue.config.locale)===null||t===void 0?void 0:t.fileSizeTypes)||["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e===0)return"0 ".concat(o[0]);var s=Math.floor(Math.log(e)/Math.log(r)),l=parseFloat((e/Math.pow(r,s)).toFixed(i));return"".concat(l," ").concat(o[s])},isFileLimitExceeded:function(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focused&&(this.focused=!1),this.fileLimit&&this.fileLimit<this.files.length+this.uploadedFileCount},checkFileLimit:function(){this.isFileLimitExceeded()&&this.messages.push(this.invalidFileLimitMessage.replace("{0}",this.fileLimit.toString()))},onMessageClose:function(){this.messages=null}},computed:{isAdvanced:function(){return this.mode==="advanced"},isBasic:function(){return this.mode==="basic"},chooseButtonClass:function(){return[this.cx("chooseButton"),this.class]},basicChooseButtonLabel:function(){return this.auto?this.chooseButtonLabel:this.hasFiles?this.files.map(function(e){return e.name}).join(", "):this.chooseButtonLabel},hasFiles:function(){return this.files&&this.files.length>0},hasUploadedFiles:function(){return this.uploadedFiles&&this.uploadedFiles.length>0},chooseDisabled:function(){return this.disabled||this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount},uploadDisabled:function(){return this.disabled||!this.hasFiles||this.fileLimit&&this.fileLimit<this.files.length},cancelDisabled:function(){return this.disabled||!this.hasFiles},chooseButtonLabel:function(){return this.chooseLabel||this.$primevue.config.locale.choose},uploadButtonLabel:function(){return this.uploadLabel||this.$primevue.config.locale.upload},cancelButtonLabel:function(){return this.cancelLabel||this.$primevue.config.locale.cancel},completedLabel:function(){return this.$primevue.config.locale.completed},pendingLabel:function(){return this.$primevue.config.locale.pending}},components:{FileUploadButton:Pu,FileUploadProgressBar:oI,FileUploadMessage:rI,FileContent:sI,PlusIcon:U8,UploadIcon:nI,TimesIcon:Pl},directives:{ripple:lr}},tre=["multiple","accept","disabled"],nre=["accept","disabled","multiple"];function rre(n,e,t,r,i,o){var s=a.resolveComponent("FileUploadButton"),l=a.resolveComponent("FileUploadProgressBar"),c=a.resolveComponent("FileUploadMessage"),d=a.resolveComponent("FileContent"),u=a.resolveDirective("ripple");return o.isAdvanced?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:n.cx("root")},n.ptmi("root")),[a.createElementVNode("input",a.mergeProps({ref:"fileInput",type:"file",onChange:e[0]||(e[0]=function(){return o.onFileSelect&&o.onFileSelect.apply(o,arguments)}),multiple:n.multiple,accept:n.accept,disabled:o.chooseDisabled},n.ptm("input")),null,16,tre),a.createElementVNode("div",a.mergeProps({class:n.cx("buttonbar")},n.ptm("buttonbar")),[a.renderSlot(n.$slots,"header",{files:i.files,uploadedFiles:i.uploadedFiles,chooseCallback:o.choose,uploadCallback:o.upload,clearCallback:o.clear},function(){return[a.withDirectives((a.openBlock(),a.createElementBlock("span",a.mergeProps({class:o.chooseButtonClass,style:n.style,onClick:e[1]||(e[1]=function(){return o.choose&&o.choose.apply(o,arguments)}),onKeydown:e[2]||(e[2]=a.withKeys(function(){return o.choose&&o.choose.apply(o,arguments)},["enter"])),onFocus:e[3]||(e[3]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[4]||(e[4]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),tabindex:"0"},n.ptm("chooseButton")),[a.renderSlot(n.$slots,"chooseicon",{class:a.normalizeClass(n.cx("chooseIcon"))},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.chooseIcon?"span":"PlusIcon"),a.mergeProps({class:[n.cx("chooseIcon"),n.chooseIcon],"aria-hidden":"true"},n.ptm("chooseIcon")),null,16,["class"]))]}),a.createElementVNode("span",a.mergeProps({class:n.cx("chooseButtonLabel")},n.ptm("chooseButtonLabel")),a.toDisplayString(o.chooseButtonLabel),17)],16)),[[u]]),n.showUploadButton?(a.openBlock(),a.createBlock(s,{key:0,label:o.uploadButtonLabel,onClick:o.upload,disabled:o.uploadDisabled,unstyled:n.unstyled,pt:n.ptm("uploadButton")},{icon:a.withCtx(function(f){return[a.renderSlot(n.$slots,"uploadicon",{},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.uploadIcon?"span":"UploadIcon"),a.mergeProps({class:[f.class,n.uploadIcon],"aria-hidden":"true"},n.ptm("uploadButton").icon,{"data-pc-section":"uploadbuttonicon"}),null,16,["class"]))]})]}),_:3},8,["label","onClick","disabled","unstyled","pt"])):a.createCommentVNode("",!0),n.showCancelButton?(a.openBlock(),a.createBlock(s,{key:1,label:o.cancelButtonLabel,onClick:o.clear,disabled:o.cancelDisabled,unstyled:n.unstyled,pt:n.ptm("cancelButton")},{icon:a.withCtx(function(f){return[a.renderSlot(n.$slots,"cancelicon",{},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.cancelIcon?"span":"TimesIcon"),a.mergeProps({class:[f.class,n.cancelIcon],"aria-hidden":"true"},n.ptm("cancelButton").icon,{"data-pc-section":"cancelbuttonicon"}),null,16,["class"]))]})]}),_:3},8,["label","onClick","disabled","unstyled","pt"])):a.createCommentVNode("",!0)]})],16),a.createElementVNode("div",a.mergeProps({ref:"content",class:n.cx("content"),onDragenter:e[5]||(e[5]=function(){return o.onDragEnter&&o.onDragEnter.apply(o,arguments)}),onDragover:e[6]||(e[6]=function(){return o.onDragOver&&o.onDragOver.apply(o,arguments)}),onDragleave:e[7]||(e[7]=function(){return o.onDragLeave&&o.onDragLeave.apply(o,arguments)}),onDrop:e[8]||(e[8]=function(){return o.onDrop&&o.onDrop.apply(o,arguments)})},n.ptm("content"),{"data-p-highlight":!1}),[a.renderSlot(n.$slots,"content",{files:i.files,uploadedFiles:i.uploadedFiles,removeUploadedFileCallback:o.removeUploadedFile,removeFileCallback:o.remove,progress:i.progress,messages:i.messages},function(){return[o.hasFiles?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(l,{value:i.progress,showValue:!1,unstyled:n.unstyled,pt:n.ptm("progressbar")},null,8,["value","unstyled","pt"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.messages,function(f){return a.openBlock(),a.createBlock(c,{key:f,severity:"error",onClose:o.onMessageClose,unstyled:n.unstyled,pt:n.ptm("message")},{default:a.withCtx(function(){return[a.createTextVNode(a.toDisplayString(f),1)]}),_:2},1032,["onClose","unstyled","pt"])}),128)),a.createVNode(d,{files:i.files,onRemove:o.remove,badgeValue:o.pendingLabel,previewWidth:n.previewWidth,templates:n.$slots,unstyled:n.unstyled,pt:n.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])],64)):a.createCommentVNode("",!0),a.createVNode(d,{files:i.uploadedFiles,onRemove:o.removeUploadedFile,badgeValue:o.completedLabel,badgeSeverity:"success",previewWidth:n.previewWidth,templates:n.$slots,unstyled:n.unstyled,pt:n.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])]}),n.$slots.empty&&!o.hasFiles&&!o.hasUploadedFiles?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:n.cx("empty")},n.ptm("empty")),[a.renderSlot(n.$slots,"empty")],16)):a.createCommentVNode("",!0)],16)],16)):o.isBasic?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:1,class:n.cx("root")},n.ptmi("root")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.messages,function(f){return a.openBlock(),a.createBlock(c,{key:f,severity:"error",onClose:o.onMessageClose,unstyled:n.unstyled,pt:n.ptm("messages")},{default:a.withCtx(function(){return[a.createTextVNode(a.toDisplayString(f),1)]}),_:2},1032,["onClose","unstyled","pt"])}),128)),a.withDirectives((a.openBlock(),a.createElementBlock("span",a.mergeProps({class:o.chooseButtonClass,style:n.style,onMouseup:e[12]||(e[12]=function(){return o.onBasicUploaderClick&&o.onBasicUploaderClick.apply(o,arguments)}),onKeydown:e[13]||(e[13]=a.withKeys(function(){return o.choose&&o.choose.apply(o,arguments)},["enter"])),onFocus:e[14]||(e[14]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[15]||(e[15]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),tabindex:"0"},n.ptm("chooseButton")),[!o.hasFiles||n.auto?a.renderSlot(n.$slots,"uploadicon",{key:0,class:a.normalizeClass(n.cx("uploadIcon"))},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.uploadIcon?"span":"UploadIcon"),a.mergeProps({class:[n.cx("uploadIcon"),n.uploadIcon],"aria-hidden":"true"},n.ptm("uploadIcon")),null,16,["class"]))]}):a.renderSlot(n.$slots,"chooseicon",{key:1,class:a.normalizeClass(n.cx("chooseIcon"))},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.chooseIcon?"span":"PlusIcon"),a.mergeProps({class:[n.cx("chooseIcon"),n.chooseIcon],"aria-hidden":"true"},n.ptm("chooseIcon")),null,16,["class"]))]}),a.createElementVNode("span",a.mergeProps({class:n.cx("label")},n.ptm("label")),a.toDisplayString(o.basicChooseButtonLabel),17),o.hasFiles?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("input",a.mergeProps({key:2,ref:"fileInput",type:"file",accept:n.accept,disabled:n.disabled,multiple:n.multiple,onChange:e[9]||(e[9]=function(){return o.onFileSelect&&o.onFileSelect.apply(o,arguments)}),onFocus:e[10]||(e[10]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[11]||(e[11]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)})},n.ptm("input")),null,16,nre))],16)),[[u]])],16)):a.createCommentVNode("",!0)}lI.render=rre;const ire=a.defineComponent({name:"QModalContent",props:{useFlex:{type:Boolean,default:!1},contentClass:{type:String,default:""},footerClass:{type:String,default:""}},setup(n,{slots:e}){const t=a.inject("size"),r=a.computed(()=>!!e.header),i=a.computed(()=>!!e.footer);return{modalSize:t,hasHeader:r,hasFooter:i}}}),ore={key:0,class:"modal-title mb-2"},sre={class:"text-lg pb-4 font-bold leading-6"};function are(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["modal-content",n.useFlex?"flex flex-col min-h-full":"","modal-"+n.modalSize])},[n.hasHeader?(a.openBlock(),a.createElementBlock("div",ore,[a.createElementVNode("h2",sre,[a.renderSlot(n.$slots,"header",{},void 0,!0)])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["modal-body",n.useFlex?"flex-grow":"",n.contentClass])},[a.renderSlot(n.$slots,"body",{},void 0,!0)],2),n.hasFooter?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["modal-actions",n.footerClass])},[a.renderSlot(n.$slots,"footer",{},void 0,!0)],2)):a.createCommentVNode("",!0)],2)}const cI=ke(ire,[["render",are],["__scopeId","data-v-01edcc7b"]]),lre=a.defineComponent({name:"QFileUpload",components:{FileUpload:lI,QBadge:Ho,QImageGallery:N6,QModal:zp,QModalContent:cI},props:{name:{type:Array,default:null},files:{type:Array,default:()=>[]},url:{type:String,default:""},multiple:{type:Boolean,default:!0},filesAllowed:{type:String,default:"image/*,.pdf"},maxFileSize:{type:Number,default:33554432},autoUpload:{type:Boolean,default:!1},customUpload:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},expands:{type:Boolean,default:!1},processing:{type:Boolean,default:!1}},emits:["file-list","upload-error","uploading"],setup(n,{emit:e}){const t=a.ref(null),r=a.ref(),i=a.ref([]),o=a.ref([]),s=a.computed(()=>n.files),l=a.computed(()=>n.filesAllowed.replace(/,/g,", ")),c=()=>{t.value&&t.value.clear()},d=()=>{i.value=[],o.value=[]},u=A=>{const S=n.filesAllowed.split(",").map(E=>E.trim());for(const E of S)if(f(E)?p(A.type)===p(E):A.type==E||h(A).toLowerCase()===E.toLowerCase())return!0;return!1},f=A=>A.indexOf("*")!==-1,h=A=>"."+A.name.split(".").pop(),p=A=>A.substring(0,A.indexOf("/")),g=A=>{var O;const S=A.originalEvent;let E=[];S.type==="drop"?E=(O=S.dataTransfer)==null?void 0:O.files:E=S.target.files;for(const x of E)x.size>n.maxFileSize&&i.value.push(x.name),u(x)||o.value.push(x.name)},b=A=>{e("upload-error",A)},y=()=>{t.value&&t.value.upload()},w=A=>{e("uploading",A)},v=A=>{const S=s.value,E=S.findIndex(O=>O.lastModified===A.lastModified);E!==-1&&(S.splice(E,1),e("file-list",S)),t.value.messages=null},k=A=>{g(A),e("file-list",A.files)},{isOverDropZone:C}=UP(r);return{fileUpload:t,dropZoneRef:r,allFiles:s,sizeErrors:i,typeErrors:o,isOverDropZone:C,displayAllowedTypes:l,clear:c,clearErrors:d,getFileExtension:h,getTypeClass:p,isValidFileType:u,isWildcard:f,onBeforeSelect:g,onUpload:y,onUploadError:b,onUploading:w,onRemoveFile:v,onSelectedFiles:k,mq:Ht}}}),cre={class:"file-upload-container w-full"},dre={ref:"dropZoneRef",class:"flex flex-col relative"},ure={class:"mt-2 mb-0 text-inkwell-0 text-sm"},fre={key:1,class:"image-gallery-container"},hre={id:"add-file-label",class:"text-inkwell-20 leading-[1.25rem] text-xs"},pre={id:"file-upload-error-message",class:"flex flex-col gap-2 text-center"},mre={class:"font-bold md:leading-6 text-center text-[1.25rem] md:text-lg text-inkwell-30"},gre={key:0,class:"sm-down:text-sm text-center text-inkwell-0"},yre={key:1,id:"file-size-errors",class:"mb-2 md:mb-6 sm-down:text-sm text-center text-inkwell-0 text-left"},bre={key:2,class:"sm-down:text-sm text-center text-inkwell-0"},wre={key:3,id:"file-type-errors",class:"mb-2 md:mb-6 sm-down:text-sm text-center text-inkwell-0 text-left"};function vre(n,e,t,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("q-image-gallery"),c=a.resolveComponent("FileUpload",!0),d=a.resolveComponent("q-button"),u=a.resolveComponent("q-modal-content"),f=a.resolveComponent("q-modal");return a.openBlock(),a.createElementBlock("div",cre,[a.createVNode(c,{ref:"fileUpload",name:n.name,url:n.url,multiple:n.multiple,accept:n.filesAllowed,maxFileSize:n.maxFileSize,auto:n.autoUpload,"custom-upload":n.customUpload,disabled:n.disabled,onError:e[3]||(e[3]=h=>n.onUploadError(h)),onUpload:n.onUpload,onUploader:e[4]||(e[4]=h=>n.onUploading(h)),onSelect:n.onSelectedFiles,pt:{root:{class:"flex flex-col"},content:`!py-0 !px-0 !border-none ${n.expands?"md:!rounded-lg !rounded-2xl":"!rounded-lg"}`,buttonbar:{class:"order-last hidden"}},ptOptions:{mergeProps:!0}},{content:a.withCtx(h=>{var p,g,b;return[a.createElementVNode("div",dre,[n.isOverDropZone&&n.mq.md?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["flex flex-col items-center justify-center","bg-gray-0 border border-blue-20 border-dashed","rounded-lg h-[calc(100%+2px)] w-[calc(100%+2px)] -m-px","absolute top-0 left-0 z-30",{"cursor-pointer":!n.disabled,"border-red-30":h.messages&&h.messages.length>0}]),style:a.normalizeStyle(`
249
249
  height: ${(((g=(p=n.dropZoneRef)==null?void 0:p.closest(".editor-container"))==null?void 0:g.clientHeight)||0)+2}px;
250
250
  top: ${(b=n.dropZoneRef)!=null&&b.closest(".show-formatting-menu")?-36:0}px;
251
- `)},[a.createVNode(s,{icon:"paperclip",size:"lg",type:"line",color:"gray-40"}),a.createElementVNode("div",ure,a.toDisplayString(n.$t("HC_CLICK_DRAG_FILES_HERE")),1)],6)):a.createCommentVNode("",!0),a.renderSlot(n.$slots,"default"),n.allFiles.length?(a.openBlock(),a.createElementBlock("div",fre,[a.createVNode(l,{files:n.allFiles,"show-remove":!0,processing:n.processing,class:"px-4 mt-2 mb-2","onUpdate:modelValue":n.onRemoveFile},{actions:a.withCtx(()=>[a.createElementVNode("div",a.mergeProps({"aria-labelledby":"add-file-label",class:"p-0 relative rounded-lg shrink-0 my-2 bg-gray-7 hover:bg-gray-20 focus:bg-gray-20 outline-none cursor-pointer py-2 size-16 md:py-[1.125rem] md:size-20 rounded-lg flex align-center items-center flex-col",role:"button",tabindex:"0"},{[a.toHandlerKey(!n.processing&&"click")]:e[0]||(e[0]=y=>n.fileUpload.choose())},{[a.toHandlerKey(!n.processing&&"keydown.enter")]:e[1]||(e[1]=y=>n.fileUpload.choose())},{[a.toHandlerKey(!n.processing&&"keydown.space.prevent")]:e[2]||(e[2]=y=>n.fileUpload.choose())}),[a.createVNode(s,{icon:"circle-plus",color:"inkwell-0",class:"shrink-0",size:"md"}),a.createElementVNode("div",hre,a.toDisplayString(n.$t("HC_ADD")),1)],16)]),_:1},8,["files","processing","onUpdate:modelValue"])])):a.createCommentVNode("",!0)],512)]}),_:3},8,["name","url","multiple","accept","maxFileSize","auto","custom-upload","disabled","onUpload","onSelect","pt"]),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[n.sizeErrors.length||n.typeErrors.length?(a.openBlock(),a.createBlock(f,{key:0,id:"file-upload-error-modal",dismissible:!1,overlay:n.mq.md?"white-transparent":"black-transparent","container-class":"h-fit min-h-fit"},{default:a.withCtx(()=>[a.createVNode(u,null,{body:a.withCtx(()=>[a.createElementVNode("div",pre,[a.createElementVNode("h2",mre,a.toDisplayString(n.typeErrors.length?n.$t("HC_INVALID_FILES"):n.$t("HC_FILE_TOO_LARGE")),1),n.sizeErrors.length?(a.openBlock(),a.createElementBlock("p",gre,a.toDisplayString(n.$t("HC_UPLOAD_FILE_SIZE_ERROR",{size:n.maxFileSize/1024/1024})),1)):a.createCommentVNode("",!0),n.sizeErrors.length?(a.openBlock(),a.createElementBlock("ul",yre,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.sizeErrors,h=>(a.openBlock(),a.createElementBlock("li",{key:h},a.toDisplayString(h),1))),128))])):a.createCommentVNode("",!0),n.typeErrors.length?(a.openBlock(),a.createElementBlock("p",bre,a.toDisplayString(n.$t("HC_INVALID_FILE_TYPES",{types:n.displayAllowedTypes})+":"),1)):a.createCommentVNode("",!0),n.typeErrors.length?(a.openBlock(),a.createElementBlock("ul",wre,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.typeErrors,h=>(a.openBlock(),a.createElementBlock("li",{key:h},a.toDisplayString(h),1))),128))])):a.createCommentVNode("",!0)])]),footer:a.withCtx(()=>[a.createVNode(d,{class:a.normalizeClass([n.mq.md?"mx-3":"w-full"]),status:n.mq.md?"primary":"primary-blue",size:"lg",onClick:e[5]||(e[5]=h=>n.clearErrors())},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_OK")),1)]),_:1},8,["class","status"])]),_:1})]),_:1},8,["overlay"])):a.createCommentVNode("",!0)]))]),_:1})])}const dI=ke(lre,[["render",vre]]),Cre=a.defineComponent({components:{EditorContent:oX,EmojiPicker:Tee,QFileUpload:dI},props:{modelValue:{type:String,default:""},attachments:{type:Object,default:()=>[]},allowEmojis:{type:Boolean,default:!1},allowAttachments:{type:Boolean,default:!1},allowFormatting:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},filesAllowed:{type:String,default:"image/*,.pdf"},expands:{type:Boolean,default:!1},isStacked:{type:Boolean,default:!0},isStandalone:{type:Boolean,default:!1},placeholder:{type:String,default:""},processing:{type:Boolean,default:!1}},emits:["update:model-value","update:attachments","keyboard-open"],setup(n,{emit:e}){const t=a.ref(),r=a.ref(!1),i=a.ref(""),o=a.ref(),s=a.ref(),l=a.ref(!1),c=a.ref(!1),d=a.ref(!1),u=a.ref([]),f=a.ref(),h=a.ref(),p=a.ref(),g=a.ref(!1),b=a.ref(window.innerHeight),y=a.computed(()=>Z.value.getAttributes("textStyle").color||"#121517"),w=a.computed(()=>n.attachments),v=a.computed(()=>n.isStacked||n.expands&&(w.value.length>0||d.value||!Z.value.isEmpty)||c.value),C=Cb(zP).greaterOrEqual("md"),A=()=>{const R=window.prompt("URL");Z.value.chain().focus().extendMarkRange("link").setLink({href:R||""}).run()},S=R=>{Z.value.chain().focus().setColor(R).run(),O()},E=()=>{l.value=!l.value},O=()=>{l.value=!1},x=()=>{var R,Y;(Y=(R=f.value)==null?void 0:R.fileUpload)==null||Y.choose()},N=R=>{Z.value.chain().focus().insertContent(R).run(),o.value.$el.click()},D=async()=>{if(await a.nextTick(),d.value){const R=g.value,Y=(visualViewport==null?void 0:visualViewport.height)||window.innerHeight;g.value=b.value-Y>0,R!==g.value&&(d.value=g.value,e("keyboard-open",g.value))}},B=()=>{d.value&&n.expands&&(g.value=!1,e("keyboard-open",g.value)),d.value=!1},H=R=>{Z.value.chain().focus().insertContent(R.i).run(),r.value=!1},V=R=>{u.value=R,U()},U=()=>{let R="";Z.value.isEmpty||(R=n.allowFormatting?Z.value.getHTML():Z.value.getText()),u.value!==n.attachments&&e("update:attachments",u.value),e("update:model-value",R)},Z=a.ref(sX({extensions:[Ate.configure({heading:{levels:[1,2]}}),Tte,Ite,xte,Xte.configure({openOnClick:!1}),Jte.configure({placeholder:n.placeholder})],content:n.modelValue,onUpdate:U,editable:!n.disabled}));return a.watch(()=>n.modelValue,R=>{Z.value&&!R&&Z.value.commands.clearContent()}),a.watch(()=>n.disabled,R=>{Z.value&&(Z.value.options.editable=!R,Z.value.view.update(Z.value.view.props))}),a.onBeforeUnmount(()=>{var R;(R=Z.value)==null||R.destroy()}),a.onMounted(()=>{visualViewport&&n.expands&&visualViewport.addEventListener("resize",D)}),a.onUnmounted(()=>{visualViewport&&n.expands&&visualViewport.removeEventListener("resize",D)}),Yh(t,()=>{r.value=!1}),Yh(p,()=>{d.value&&n.expands&&(g.value=!1,e("keyboard-open",g.value)),d.value=!1}),{colors:CC.theme.colors,colorExclusions:["success","success-light","error","error-light","warning","warning-light","info","info-light","transparent","current","green-quore","blue-sky","blue-quore","complaint","recurring","workorder"],editor:Z,editorRef:h,emojiPickerElement:t,showEmojiPicker:r,emojiSearch:i,invoker:o,isExpanded:v,multiUploader:s,showColorMenu:l,focused:d,files:w,showFormatOptions:c,uploadedfiles:u,fileUploadRef:f,wysiwygRef:p,setColor:y,mdAndLarger:C,setLink:A,selectColor:S,showColors:E,onClickAction:B,onClickOutColors:O,attachFiles:x,appendEmoji:N,onSelectEmoji:H,onSelectFiles:V}}}),kre={key:0,class:"menu flex items-center justify-between !pb-0 !pr-0"},Sre={class:"toolbar flex items-center md:gap-x-4"},Mre={class:"flex items-center gap-x-1"},Ere={class:"toolbar flex items-center md:gap-x-4"},Are={name:"fade-zoom",class:"flex items-center items-center"};function Tre(n,e,t,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("editor-content"),c=a.resolveComponent("q-file-upload"),d=a.resolveComponent("emoji-picker");return n.editor?(a.openBlock(),a.createElementBlock("div",{key:0,ref:"wysiwygRef",class:a.normalizeClass(["editor-container rounded-lg",{"has-placeholder":!!n.placeholder,"is-focused":n.focused,"is-stacked":n.isExpanded,"is-standalone":n.isStandalone,"show-formatting-menu":n.showFormatOptions,"!rounded-2xl md:!rounded-lg expands":n.expands}]),onMousedown:e[11]||(e[11]=u=>{n.focused=!0})},[a.createElementVNode("div",{class:a.normalizeClass(["wysiwyg-layout flex justify-between",{"flex-wrap":n.isExpanded}])},[n.showFormatOptions?(a.openBlock(),a.createElementBlock("div",kre,[a.createElementVNode("div",Sre,[a.createElementVNode("div",Mre,[a.createVNode(s,{icon:"bold",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("bold")}),onClick:e[0]||(e[0]=u=>n.editor.chain().focus().toggleBold().run())},null,8,["class"]),a.createVNode(s,{icon:"italic",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("italic")}),onClick:e[1]||(e[1]=u=>n.editor.chain().focus().toggleItalic().run())},null,8,["class"]),a.createVNode(s,{icon:"underline",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("underline")}),onClick:e[2]||(e[2]=u=>n.editor.chain().focus().toggleUnderline().run())},null,8,["class"]),a.createVNode(s,{icon:"strikethrough",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("strike")}),onClick:e[3]||(e[3]=u=>n.editor.chain().focus().toggleStrike().run())},null,8,["class"]),a.createVNode(s,{icon:"link",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("link")}),onClick:n.setLink},null,8,["class","onClick"]),n.editor.isActive("link")?(a.openBlock(),a.createBlock(s,{key:0,icon:"link",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("link")}),onClick:e[4]||(e[4]=u=>n.editor.chain().focus().unsetLink().run())},null,8,["class"])):a.createCommentVNode("",!0),a.createVNode(s,{icon:"list",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("bulletList")}),onClick:e[5]||(e[5]=u=>n.editor.chain().focus().toggleBulletList().run())},null,8,["class"]),a.createVNode(s,{icon:"numberlist",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("orderedList")}),onClick:e[6]||(e[6]=u=>n.editor.chain().focus().toggleOrderedList().run())},null,8,["class"])])])])):a.createCommentVNode("",!0),n.allowAttachments?(a.openBlock(),a.createBlock(c,{key:1,ref:"fileUploadRef",disabled:n.disabled,expands:n.expands,files:n.files,"files-allowed":n.filesAllowed,processing:n.processing,class:a.normalizeClass(["grow",n.expands&&"rounded-t-2xl md:rounded-t-lg",!n.isExpanded&&!n.mdAndLarger?"order-2 -ml-2":"order-1"]),onFileList:n.onSelectFiles},{default:a.withCtx(()=>[a.createVNode(l,{ref:"editorRef",editor:n.editor,class:"grow"},null,8,["editor"])]),_:1},8,["disabled","expands","files","files-allowed","processing","class","onFileList"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["grow w-full",n.expands?"rounded-t-2xl md:rounded-t-lg":"rounded-t-lg",!n.isExpanded&&!n.mdAndLarger?"order-2 -ml-2":"order-1"])},[a.createVNode(l,{ref:"editorRef",editor:n.editor,class:"grow"},null,8,["editor"])],2)),n.showEmojiPicker?(a.openBlock(),a.createBlock(d,{key:3,ref:"emojiPickerElement",class:"absolute top-2 left-2 z-[9999]",onSelect:n.onSelectEmoji},null,8,["onSelect"])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["menu flex items-center justify-between",!n.isExpanded&&!n.mdAndLarger?"order-1":"order-2"])},[a.createElementVNode("div",Ere,[a.createElementVNode("div",Are,[a.createVNode(a.TransitionGroup,{name:"fade-zoom"},{default:a.withCtx(()=>[n.allowFormatting&&n.showFormatOptions?(a.openBlock(),a.createBlock(s,{icon:"close",key:"close",size:"lg",type:"",color:"inkwell-0",class:"md:!hidden bg-gray-7 !p-2 !rounded-full",onClick:e[7]||(e[7]=u=>n.showFormatOptions=!n.showFormatOptions)})):a.createCommentVNode("",!0),n.allowEmojis&&(!n.showFormatOptions||n.mdAndLarger)?(a.openBlock(),a.createBlock(s,{icon:"face-smile",key:"face-smile",size:"lg",type:"outline",color:"inkwell-0",class:a.normalizeClass({"is-active":n.showEmojiPicker}),onClick:e[8]||(e[8]=u=>n.showEmojiPicker=!n.showEmojiPicker)},null,8,["class"])):a.createCommentVNode("",!0),n.allowAttachments&&(!n.showFormatOptions||n.mdAndLarger)?(a.openBlock(),a.createBlock(s,{icon:"paperclip",key:"paperclip",size:"lg",type:"line",class:a.normalizeClass(n.disabled&&"!cursor-not-allowed hover:!text-inkwell-0"),color:"inkwell-0",onClick:n.attachFiles},null,8,["class","onClick"])):a.createCommentVNode("",!0),n.allowFormatting&&(!n.showFormatOptions||n.mdAndLarger)?(a.openBlock(),a.createBlock(s,{icon:"text-format",key:"text-format",size:"lg",type:"outline",color:"inkwell-0",class:a.normalizeClass({"is-active":n.showFormatOptions}),onClick:e[9]||(e[9]=u=>n.showFormatOptions=!n.showFormatOptions)},null,8,["class"])):a.createCommentVNode("",!0)]),_:1})])])],2),a.createElementVNode("div",{class:"flex items-center px-2 py-1 pr-4 order-3",onClick:e[10]||(e[10]=(...u)=>n.onClickAction&&n.onClickAction(...u))},[a.renderSlot(n.$slots,"action",{},void 0,!0)])],2)],34)):a.createCommentVNode("",!0)}const Y8=ke(Cre,[["render",Tre],["__scopeId","data-v-6c7a3a19"]]),Ire={id:{type:[Number,String],default:null},attachments:{type:Array,default:[]},attachmentClickEvent:{type:Function,default:()=>{}},attachmentRemoveEvent:{type:Function,default:()=>{}},canCopyLink:{type:Boolean,default:!1},canDelete:{type:[Boolean,Number],default:!1},canEdit:{type:[Boolean,Number],default:!1},canPin:{type:Boolean,default:!1},user:{type:Object,default:null},comment:{type:String,default:""},dateUtc:{type:String,default:null},dateLocal:{type:String,default:""},onDownloadFile:{type:Function,default:()=>{}},onUpdateComment:{type:Function,default:()=>{}},pinned:{type:Boolean,default:!1},processing:{type:Boolean,default:!1},showAvatar:{type:Boolean,default:!0},showRemoveButton:{type:Object,default:()=>{}}},xre=a.defineComponent({name:"QComment",components:{QAvatar:$9,QImageGallery:N6,QMenu:Z4,QPopover:P6,QWarningModal:NS,QWysiwyg:Y8},props:Ire,emits:["update:model-value"],setup(n){const{t:e}=ro(),t=[{text:e("HC_CANCEL")}],r=a.ref(null),i=a.ref(!1),o=a.ref(""),s=a.ref(!1),l=a.ref(!1),c=a.ref(!1),d=a.ref(""),u=a.ref(),f=a.computed(()=>{const D=[];return n.canCopyLink&&D.push({text:e("HC_COPY_LINK"),classes:"!text-blue-20 md:!text-inkwell-0",event:y}),n.canPin&&D.push({text:e(n.pinned?"HC_UNPIN_COMMENT":"HC_PIN_COMMENT"),classes:"!text-blue-20 md:!text-inkwell-0",event:x}),n.canEdit&&D.push({text:e("HC_EDIT_COMMENT"),classes:"!text-blue-20 md:!text-inkwell-0",event:S}),n.canDelete&&D.push({text:e("HC_DELETE_COMMENT"),classes:"!text-red-20",event:k}),D}),h=a.computed(()=>n.user.firstName+" "+n.user.lastName.substring(0,1)),p=a.computed(()=>wt.fromISO(n.dateUtc).toLocaleString(wt.DATETIME_MED)),g=a.computed(()=>n.user.name.split(" ").map(D=>D.trim().charAt(0)).join("").toUpperCase()),b=()=>{i.value=!1,o.value=""},y=()=>{navigator.clipboard.writeText(`${window.location.href}#comment-${n.id}`),s.value=!1},w=D=>{r.value=D,d.value="attachment",c.value=!0,s.value=!1},v=async()=>{r.value&&await n.onUpdateComment({event:"delete-attachment",value:r.value.id}),c.value=!1},k=()=>{d.value="comment",c.value=!0,s.value=!1},C=async()=>{await n.onUpdateComment({event:"delete-comment",value:n.id}),c.value=!1},A=()=>{d.value==="comment"?C():v()},S=async()=>{var B,H;i.value=!0,o.value=n.comment,await a.nextTick(),(H=(B=u.value)==null?void 0:B.editor)==null||H.chain().focus("end").run(),s.value=!1;const D=document.getElementById(`comment-${n.id}`);D&&!Ht.md&&D.scrollIntoView({block:"center",behavior:"smooth"})},E=()=>{s.value=!s.value},O=D=>{D.event()},x=async()=>{s.value=!1,await n.onUpdateComment({event:"update-pin",value:!n.pinned})},N=async()=>{await n.onUpdateComment({event:"update-comment",value:o.value})};return a.watch(()=>n.processing,D=>{var B,H,V;D||(i.value=!1,o.value="",c.value=!1,u.value&&u.value.allowAttachments&&((V=(H=(B=u.value)==null?void 0:B.fileUploadRef)==null?void 0:H.fileUpload)==null||V.clear(),u.value.uploadedfiles=[]))}),{menuActions:t,activeAttachment:r,editMode:i,editText:o,showControls:s,warningAction:l,warningModal:c,warningType:d,wysiwygRef:u,allowedActions:f,displayName:h,formatDate:p,userInitials:g,onClickCancel:b,onClickCopyLink:y,onClickDeleteAttachment:w,onClickDeleteAttachmentConfirm:v,onClickDeleteComment:k,onClickDeleteCommentConfirm:C,onClickDeleteConfirm:A,onClickEditComment:S,onClickMenu:E,onClickMobileMenuLink:O,onClickSave:N,mq:Ht}}}),Ore=["id"],Dre={class:"flex items-start mb-1"},Nre={class:"grow"},Pre={class:"w-full block text-sm leading-4 font-bold"},Lre={class:"text-inkwell-0 text-xs leading-4 block"},Bre={class:"w-full py-1"},_re=["onClick"],Rre={key:2},Vre={key:1,class:"pl-[3rem]"},$re={class:"h-8 flex items-center"},Fre={key:2};function jre(n,e,t,r,i,o){const s=a.resolveComponent("q-avatar"),l=a.resolveComponent("q-icon"),c=a.resolveComponent("q-popover"),d=a.resolveComponent("q-menu"),u=a.resolveComponent("q-button"),f=a.resolveComponent("q-wysiwyg"),h=a.resolveComponent("q-image-gallery"),p=a.resolveComponent("q-warning-modal");return n.comment||n.attachments.length?(a.openBlock(),a.createElementBlock("div",{key:0,id:`comment-${n.id}`,class:a.normalizeClass(["comment-container flex flex-col mb-3 py-2",{"-mx-2 px-2 rounded-lg bg-yellow-0":n.pinned}])},[a.createElementVNode("div",Dre,[n.showAvatar?(a.openBlock(),a.createBlock(s,{key:0,src:n.user.profileImg,text:n.userInitials,class:"mr-4"},null,8,["src","text"])):a.createCommentVNode("",!0),a.createElementVNode("div",Nre,[a.createElementVNode("span",Pre,a.toDisplayString(n.user.name),1),a.createElementVNode("span",Lre,a.toDisplayString(n.dateLocal||n.formatDate),1)]),n.allowedActions.length&&n.mq.md?(a.openBlock(),a.createBlock(c,{key:1,modelValue:n.showControls,"onUpdate:modelValue":e[0]||(e[0]=g=>n.showControls=g),align:"right",position:"bottom",size:"sm"},{trigger:a.withCtx(()=>[a.createVNode(l,{icon:"ellipsis-h",type:"fill",class:a.normalizeClass(["shrink-0 cursor-pointer",n.showControls&&"!text-blue-20"]),color:"gray-40",onClick:n.onClickMenu},null,8,["class","onClick"])]),content:a.withCtx(()=>[a.createElementVNode("ul",Bre,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.allowedActions,(g,b)=>(a.openBlock(),a.createElementBlock("li",{key:b,class:a.normalizeClass(g.classes),onClick:y=>g.event(y)},a.toDisplayString(g.text),11,_re))),128))])]),_:1},8,["modelValue"])):a.createCommentVNode("",!0),n.allowedActions.length&&!n.mq.md?(a.openBlock(),a.createElementBlock("div",Rre,[a.createVNode(l,{icon:"ellipsis-h",type:"fill",class:"shrink-0 cursor-pointer",color:"gray-40",onClick:n.onClickMenu},null,8,["onClick"]),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[n.showControls?(a.openBlock(),a.createBlock(d,{key:0,modelValue:n.showControls,"onUpdate:modelValue":e[1]||(e[1]=g=>n.showControls=g),actions:n.menuActions,links:n.allowedActions,"links-background":"light-gray","onClick:link":n.onClickMobileMenuLink,"onClick:action":n.onClickMenu},null,8,["modelValue","actions","links","onClick:link","onClick:action"])):a.createCommentVNode("",!0)]),_:1})])):a.createCommentVNode("",!0)]),n.editMode?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["leading-normal text-sm",{"ml-12":n.showAvatar}])},[a.createElementVNode("p",null,a.toDisplayString(n.comment),1)],2)),n.editMode?(a.openBlock(),a.createElementBlock("div",Vre,[a.createVNode(f,{ref:"wysiwygRef",modelValue:n.editText,"onUpdate:modelValue":e[2]||(e[2]=g=>n.editText=g),"is-stacked":!0},{action:a.withCtx(()=>[a.createElementVNode("div",$re,[a.createVNode(u,{disabled:n.processing,status:"link",class:"!text-gray-40 mr-4 hover:!text-inkwell-0 hover:!no-underline",onClick:n.onClickCancel},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_CANCEL")),1)]),_:1},8,["disabled","onClick"]),a.createVNode(u,{disabled:n.processing,loading:n.processing,class:"text-xs hover:!text-blue-40 hover:!no-underline",status:"link",onClick:n.onClickSave},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_SAVE")),1)]),_:1},8,["disabled","loading","onClick"])])]),_:1},8,["modelValue"])])):(a.openBlock(),a.createElementBlock("div",Fre,[n.attachments.length?(a.openBlock(),a.createBlock(h,{key:0,class:a.normalizeClass(["mt-3",{"ml-12":n.showAvatar}]),files:n.attachments,"onClick:file":n.attachmentClickEvent,"onDownload:file":n.onDownloadFile,"onUpdate:modelValue":n.onClickDeleteAttachment},null,8,["class","files","onClick:file","onDownload:file","onUpdate:modelValue"])):a.createCommentVNode("",!0)])),a.createVNode(p,{id:"warning-modal",action:n.onClickDeleteConfirm,"onUpdate:action":e[3]||(e[3]=g=>n.onClickDeleteConfirm=g),toggle:n.warningModal,"onUpdate:toggle":[e[4]||(e[4]=g=>n.warningModal=g),e[5]||(e[5]=g=>n.warningModal=!1)],processing:n.processing},{desktopHeader:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t(n.warningType==="comment"?"HC_WARNING_CONFIRM_DELETE_COMMENT":"HC_ARE_YOU_SURE_DELETE_ATTACHMENT")),1)]),desktopMessage:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t(n.warningType==="comment"?"HC_CLICK_DELETE_COMMENT_NO_LONGER_SEE":"HC_CLICK_DELETE_ATTACHMENT_NO_LONGER_SEE")),1)]),mobileHeader:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t(n.warningType==="comment"?"HC_DELETE_COMMENT":"HC_ARE_YOU_SURE_DELETE_ATTACHMENT")),1)]),mobileMessage:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t(n.warningType==="comment"?"HC_WARNING_CONFIRM_DELETE_COMMENT":"HC_CLICK_DELETE_ATTACHMENT_NO_LONGER_SEE")),1)]),buttonText:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t(n.warningType==="comment"?"HC_DELETE_COMMENT":"HC_DELETE_ATTACHMENT")),1)]),_:1},8,["action","toggle","processing"])],10,Ore)):a.createCommentVNode("",!0)}const uI=ke(xre,[["render",jre],["__scopeId","data-v-8f8b7386"]]),zre=a.defineComponent({name:"QCommentSection",components:{QComment:uI,QWysiwyg:Y8},props:{comments:{type:Array,default:()=>[]},allowAttachments:{type:Boolean,default:!1},allowEmojis:{type:Boolean,default:!1},allowFormatting:{type:Boolean,default:!1},addCommentEvent:{type:Function,default:()=>{}},disabled:{type:Boolean,default:!1},filesAllowed:{type:String,default:"image/*,.pdf"},updateCommentEvent:{type:Function,default:()=>{}},placeholder:{type:String,default:""},processing:{type:Boolean,default:!1},showRemoveButton:{type:Object,default:()=>{}},onDownloadFile:{type:Function,default:()=>{}}},setup(n){const{t:e}=ro(),t=a.ref([]),r=a.ref(""),i=a.ref(n.placeholder||e("HC_ADD_A_COMMENT")),o=a.ref(),s=async()=>{await n.addCommentEvent({text:r.value,attachments:t.value})},l=async(c,d)=>{await n.updateCommentEvent({comment:c,...d})};return a.watch(()=>n.processing,c=>{var d,u;c||(t.value=[],r.value="",o.value&&o.value.allowAttachments&&((u=(d=o.value.fileUploadRef)==null?void 0:d.fileUpload)==null||u.clear(),o.value.uploadedfiles=[]))}),{files:t,placeholderText:i,textareaValue:r,wysiwygRef:o,onClickPost:s,onUpdateComment:l}}}),Hre={class:"comment-section"},Ure={key:0,class:"comments"},Zre={key:1,class:"no-comments text-center mb-6 mt-4"},Wre={class:"text-md mb-2 leading-6 font-bold text-inkwell-30"},qre={class:"text-sm text-inkwell-0"};function Gre(n,e,t,r,i,o){const s=a.resolveComponent("q-comment"),l=a.resolveComponent("q-button"),c=a.resolveComponent("q-wysiwyg");return a.openBlock(),a.createElementBlock("div",Hre,[n.comments&&n.comments.length?(a.openBlock(),a.createElementBlock("div",Ure,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.comments,(d,u)=>(a.openBlock(),a.createBlock(s,a.mergeProps({ref_for:!0},d,{key:u,"on-update-comment":f=>n.onUpdateComment(d,f),"on-download-file":n.onDownloadFile}),null,16,["on-update-comment","on-download-file"]))),128))])):(a.openBlock(),a.createElementBlock("div",Zre,[a.createElementVNode("h4",Wre,a.toDisplayString(n.$t("HC_NO_COMMENTS_YET")),1),a.createElementVNode("p",qre,a.toDisplayString(n.$t("HC_START_THE_CONVERSATION")),1)])),a.renderSlot(n.$slots,"default",{},()=>[a.createVNode(c,{ref:"wysiwygRef",modelValue:n.textareaValue,"onUpdate:modelValue":[e[0]||(e[0]=d=>n.textareaValue=d),e[2]||(e[2]=d=>n.textareaValue=d)],attachments:n.files,disabled:n.disabled,"is-stacked":!0,"allow-attachments":n.allowAttachments,"allow-emojis":n.allowEmojis,"allow-formatting":n.allowFormatting,"files-allowed":n.filesAllowed,placeholder:n.placeholderText,processing:n.processing,"onUpdate:attachments":e[1]||(e[1]=d=>n.files=d)},{action:a.withCtx(()=>[a.createVNode(l,{loading:n.processing,disabled:n.processing||!n.files.length&&!n.textareaValue||n.disabled,status:"link",class:"hover:text-blue-40 hover:no-underline",onClick:n.onClickPost},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_POST")),1)]),_:1},8,["loading","disabled","onClick"])]),_:1},8,["modelValue","attachments","disabled","allow-attachments","allow-emojis","allow-formatting","files-allowed","placeholder","processing"])],!0)])}const Kre=ke(zre,[["render",Gre],["__scopeId","data-v-8e57dc76"]]),Yre=a.defineComponent({name:"QCounter",props:{modelValue:{type:Number,default:0},min:{type:Number,default:0},max:{type:Number,default:100},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:e}){return{updateCount:r=>{let o=n.modelValue+r;return o>n.max?o=n.max:o<n.min&&(o=n.min),e("update:modelValue",o),o}}}}),Qre={class:"counter flex items-center"},Xre={class:"grow text-center"};function Jre(n,e,t,r,i,o){const s=a.resolveComponent("q-icon");return a.openBlock(),a.createElementBlock("div",Qre,[a.createVNode(s,a.mergeProps({icon:"minus-circle",type:"outline",size:"sm",color:"inkwell-30",class:"cursor-pointer mr-1"},{[a.toHandlerKey(!n.disabled&&"click")]:e[0]||(e[0]=l=>n.updateCount(-1))}),null,16),a.createElementVNode("span",Xre,a.toDisplayString(n.modelValue),1),a.createVNode(s,a.mergeProps({icon:"circle-plus",type:"outline",size:"sm",color:"inkwell-30",class:"cursor-pointer ml-1"},{[a.toHandlerKey(!n.disabled&&"click")]:e[1]||(e[1]=l=>n.updateCount(1))}),null,16)])}const eie=ke(Yre,[["render",Jre]]),fI="eye",hI="eye-slash",tie=a.defineComponent({name:"QInput",inheritAttrs:!1,props:{modelValue:{type:[Number,Object,String],default:""},type:{type:String,default:"text",validator:n=>["email","number","password","phone","search","text"].includes(n)},placeholder:{type:String,default:""},maxlength:{type:Number,default:null},size:{type:String,default:"md"},status:{type:String,default:""},controlClass:{type:String,default:""},inputClass:{type:String,default:""},disabled:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},hideClear:{type:Boolean,default:!1},iconPosition:{type:String,default:"right"}},emits:["update:model-value","update-type"],setup(n,{emit:e}){const t=a.useSlots(),r=a.ref(null),i=a.ref(!1),o=a.ref(n.type==="password"?fI:""),s=a.computed(()=>!!n.disabled),l=a.computed(()=>{const g=o.value;return!!n.modelValue&&!s.value&&(u.value&&n.iconPosition==="left"||!g)}),c=a.computed(()=>["control flex items-center",{focused:!!i.value},{disabled:s.value},{[n.status]:n.status&&!s.value},{[`has-icon-${n.iconPosition}`]:!!n.iconPosition},n.controlClass,{["size-"+n.size]:n.size}]),d=a.computed(()=>["input",{[n.status]:n.status&&!s.value},{[n.inputClass]:!!n.inputClass},{populated:!!n.modelValue}]),u=a.computed(()=>!!(t!=null&&t.default)),f=()=>{const g=n.type==="password",b=n.type==="text"&&o.value===hI;(g||b)&&h()},h=()=>{const g=n.type==="text"?"password":"text";o.value=g==="text"?hI:fI,e("update-type",g)};return{currentInput:r,focused:i,icon:o,rootClasses:c,inputClasses:d,isDisabled:s,showClearIcon:l,isSlotAvailable:u,onClickIcon:f,togglePasswordVisibility:h,updateValue:g=>{e("update:model-value",g.target.value)},mq:Ht}}}),nie=["id","type","disabled","autocomplete","maxlength","value","placeholder"];function rie(n,e,t,r,i,o){const s=a.resolveComponent("q-icon");return a.openBlock(),a.createElementBlock("div",{ref:"currentInput",class:a.normalizeClass(n.rootClasses)},[a.createElementVNode("input",a.mergeProps({id:String(n.$attrs.id),ref:String(n.$attrs.id),type:n.type,disabled:n.isDisabled,class:n.inputClasses,autocomplete:n.autocomplete,maxlength:n.maxlength,value:n.modelValue,placeholder:n.placeholder},n.$attrs,{onInput:e[0]||(e[0]=l=>n.updateValue(l)),onFocusin:e[1]||(e[1]=l=>n.focused=!n.focused),onFocusout:e[2]||(e[2]=l=>n.focused=!n.focused),onBlur:e[3]||(e[3]=l=>n.focused=!0)}),null,16,nie),n.isSlotAvailable||n.icon?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["flex",{"order-first pr-2":n.iconPosition==="left"}])},[a.renderSlot(n.$slots,"default",a.normalizeProps(a.guardReactiveProps({icon:n.icon,onClickIcon:n.onClickIcon})),()=>[a.createVNode(s,{icon:n.icon,size:"md",class:"cursor-pointer",onClick:n.onClickIcon},null,8,["icon","onClick"])],!0)],2)):a.createCommentVNode("",!0),n.showClearIcon&&!n.hideClear?(a.openBlock(),a.createElementBlock("div",{key:1,class:"close cursor-pointer flex order-3",onClick:e[4]||(e[4]=l=>n.$emit("update:model-value","")),onMousedown:e[5]||(e[5]=a.withModifiers(()=>{},["prevent"]))},[n.mq.md?(a.openBlock(),a.createBlock(s,{key:0,icon:"close",size:"sm",type:"line"})):(a.openBlock(),a.createBlock(s,{key:1,icon:"delete-circle",color:"inkwell-0",size:"md",type:"fill"}))],32)):a.createCommentVNode("",!0)],2)}const pI=ke(tie,[["render",rie],["__scopeId","data-v-320db1d7"]]),yc=(n,e,t,r,i,o=[],s=!0)=>{const l=t;if(e||l&&l.length){let c=s;n=n.filter(d=>{if(l&&l.length){const u=[];l.forEach(h=>{let p=h.selected;if(!p||!p.length){u.push(s);return}const g=h.key,b=h.attribute||"id";Array.isArray(p)||(p=[p]);let y=!1;p.forEach(w=>{const v=w&&w.key?w.key:g;if(w&&v){const C=v.split(/\./),A=C[0],S=C[1]||null,E=w[b],O=d[A];!S&&(typeof E!="boolean"&&Array.isArray(O)&&!O.find(x=>x[b]===E)||typeof E!="boolean"&&!Array.isArray(O)&&O!==E||typeof E=="boolean"&&typeof O!="boolean"&&!!O!==E||typeof E=="boolean"&&typeof O=="boolean"&&O!==E)||S&&(typeof E=="object"&&Array.isArray(O[S])&&!O[S].find(x=>x[b]===E)||typeof E!="boolean"&&!Array.isArray(O[S])&&O[S]!==E||typeof E=="boolean"&&typeof O[S]!="boolean"&&!!O[S]!==E||typeof E=="boolean"&&typeof O[S]=="boolean"&&O[S]!==E)||(y=!0)}}),u.push(y)});const f=u.filter(h=>!!h).length;if(u.length===0||f!==u.length)return!1}if(e){if(typeof d=="string")return String(d).toLocaleLowerCase().includes(e.toLocaleLowerCase());c=Object.keys(d).some(u=>o.includes(u)?!1:typeof d[u]=="object"&&d[u]?Object.keys(d[u]).some(f=>o.includes(f)?!1:String(d[u][f]).toLocaleLowerCase().includes(e.toLocaleLowerCase())):String(d[u]).toLocaleLowerCase().includes(e.toLocaleLowerCase()))}return c})}return r&&(n=n.sort((c,d)=>{if(c===null||c==="")return 1;if(d===null||d==="")return-1;if(r.includes(".")){const u=r.split(".")[0],f=r.split(".")[1];if(c[u]===null||c[u]==="")return 1;if(d[u]===null||d[u]==="")return-1;c=c[u][f],d=d[u][f]}else c=c[r],d=d[r];return typeof c=="string"&&typeof d=="string"&&(c=c.toLowerCase(),d=d.toLowerCase()),typeof c!="string"&&typeof d!="string"&&(c=parseInt(c),d=parseInt(d)),typeof c=="number"&&typeof d=="string"?-1*i:typeof d=="number"&&typeof c=="string"?1*i:(c===d?0:c>d?1:-1)*i})),n},iie=a.defineComponent({name:"QDataFilter",components:{QBadge:Ho,QIcon:kl,QInput:pI,QTooltip:V2,QPopover:P6},props:{data:{type:Array,default:()=>[]},id:{type:String,default:""},excludedFields:{type:Array,default:()=>[]},filters:{type:Array,default:()=>[]},hasSearch:{type:Boolean,default:!0},orderBy:{type:String,default:"asc"},search:{type:String,default:""},searchDelay:{type:Number,default:300},searchPlaceholder:{type:String,default:""},showResultsCount:{type:Boolean,default:!1},sortBy:{type:String,default:"name"},noneEqualsAll:{type:Boolean,default:!0}},emits:["update:data","update:search","click:filters"],setup(n,{emit:e}){const t=y5(d=>{e("update:search",d)},n.searchDelay),r=$l(),i=a.ref(0),o=a.ref(!1),s=a.computed(()=>{let d=0;return n.filters.forEach(u=>{(typeof u.selected=="string"&&u.selected||typeof u.selected!="string"&&u.selected.length)&&d++}),d}),l=()=>{o.value=!1},c=d=>{d(),e("click:filters")};return a.watch(n,()=>{const d=yc(n.data,n.search,n.filters,n.sortBy,n.orderBy==="desc"?-1:1,n.excludedFields,n.noneEqualsAll);i.value=d.length,e("update:data",d)},{deep:!0}),{debouncedSearch:t,filteredCount:i,showFilterPopover:o,closePopover:l,onFilterClick:c,filtersCount:s,deviceType:r,filterData:yc,mq:Ht}}}),oie=["id"],sie={class:"search grow"},aie={class:"search-label flex items-center",for:"search"},lie={class:"results-count mx-1 shrink-0 text-xs text-gray-40 capitalize"},cie={key:1,class:"filters shrink-0 h-6"},die={class:"flex relative"},uie={class:"!text-blue-20 text-tiny font-bold"},fie={class:"flex relative"},hie={class:"!text-blue-20 text-tiny font-bold"},pie={key:2,class:"actions shrink-0 flex items-center h-6"};function mie(n,e,t,r,i,o){var f;const s=a.resolveComponent("q-icon"),l=a.resolveComponent("q-input"),c=a.resolveComponent("q-badge"),d=a.resolveComponent("q-tooltip"),u=a.resolveComponent("q-popover");return a.openBlock(),a.createElementBlock("div",{id:n.id,class:"data-filter flex items-center p-4 bg-white"},[a.createElementVNode("div",sie,[n.hasSearch?a.renderSlot(n.$slots,"search",{key:0},()=>[a.createElementVNode("label",aie,[a.createVNode(s,{class:"mr-2 shrink-0",color:"gray-40",icon:"search",size:"md",type:""}),a.createVNode(l,{id:"search","model-value":n.search,"hide-clear":n.mq.md,placeholder:n.searchPlaceholder||n.$t("HC_SEARCH"),class:"text-base grow","control-class":"!border-0 !px-0",size:"xxs","onUpdate:modelValue":n.debouncedSearch},null,8,["model-value","hide-clear","placeholder","onUpdate:modelValue"])])],!0):a.createCommentVNode("",!0)]),n.showResultsCount?a.renderSlot(n.$slots,"resultsCount",{key:0},()=>[a.createElementVNode("div",lie,a.toDisplayString(n.filteredCount===1?"1 "+n.$t("HC_RESULT"):n.$t("HC_X_RESULTS",{count:n.filteredCount})),1)],!0):a.createCommentVNode("",!0),a.renderSlot(n.$slots,"beforeFilters",{},void 0,!0),(f=n.filters)!=null&&f.length?(a.openBlock(),a.createElementBlock("div",cie,[a.renderSlot(n.$slots,"filters",a.normalizeProps(a.guardReactiveProps({filtersCount:n.filtersCount})),()=>[n.$slots.filterContent?(a.openBlock(),a.createBlock(u,{key:0,modelValue:n.showFilterPopover,"onUpdate:modelValue":e[0]||(e[0]=h=>n.showFilterPopover=h),position:"bottom",align:"right",trigger:"click"},{trigger:a.withCtx(({onClick:h})=>[a.createVNode(d,{class:"z-[45] ml-2"},{trigger:a.withCtx(()=>[a.createElementVNode("div",die,[a.createVNode(s,{class:"filters-icon ml-0 cursor-pointer",color:"gray-40",icon:"filter",size:"md",onClick:p=>n.onFilterClick(h)},null,8,["onClick"]),n.filtersCount?(a.openBlock(),a.createBlock(c,{key:0,class:a.normalizeClass(["filters-count absolute !h-4 !w-4","-top-[0.3125rem] -right-[0.375rem]"]),color:"white"},{text:a.withCtx(()=>[a.createElementVNode("span",uie,a.toDisplayString(n.filtersCount),1)]),_:1})):a.createCommentVNode("",!0)])]),content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_FILTERS")),1)]),_:2},1024)]),content:a.withCtx(()=>[a.renderSlot(n.$slots,"filterContent",a.normalizeProps(a.guardReactiveProps({closePopover:n.closePopover})),void 0,!0)]),_:3},8,["modelValue"])):(a.openBlock(),a.createBlock(d,{key:1,class:"z-[45] ml-2"},{trigger:a.withCtx(()=>[a.createElementVNode("div",fie,[a.createVNode(s,{class:"filters-icon ml-0 cursor-pointer",color:"gray-40",icon:"filter",size:"md",onClick:e[1]||(e[1]=h=>n.$emit("click:filters"))}),n.filtersCount?(a.openBlock(),a.createBlock(c,{key:0,class:a.normalizeClass(["filters-count absolute !h-4 !w-4","-top-[0.3125rem] -right-[0.375rem]"]),color:"white"},{text:a.withCtx(()=>[a.createElementVNode("span",hie,a.toDisplayString(n.filtersCount),1)]),_:1})):a.createCommentVNode("",!0)])]),content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_FILTERS")),1)]),_:1}))],!0)])):a.createCommentVNode("",!0),n.$slots.actions?(a.openBlock(),a.createElementBlock("div",pie,[a.renderSlot(n.$slots,"actions",{},void 0,!0)])):a.createCommentVNode("",!0)],8,oie)}const mI=ke(iie,[["render",mie],["__scopeId","data-v-b63d103b"]]),gie=a.defineComponent({name:"QDataList",components:{QBadge:Ho,QDataFilter:mI},props:{id:{type:String,default:"data-list"},modelValue:{type:Array,default:()=>[]},hideSearch:{type:Boolean,default:!1},hasSearch:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!1},itemsPerPage:{type:Number,default:50},loading:{type:Boolean,default:!1},noResultMessage:{type:String,default:""},skeletonRows:{type:Number,default:6},type:{type:String,default:"row"}},emits:["filters-action","page-updated","click:list-item"],setup(n,{emit:e}){const{deviceType:t}=$l(),{y:r}=b5(),{y:i}=Xh(window,{behavior:"smooth"}),o=a.ref(0),s=a.ref("down"),l=a.ref(null),c=a.ref(0),d=a.ref(!1),u=a.ref(!0),f=a.ref(Ht.md?!1:n.hideSearch),h=a.ref(!f.value),p={type:"keyframe",ease:"linear",duration:0,delay:0},g=a.ref(null),b=a.ref(1),y=a.ref(null),w=a.ref(window.innerHeight),{motionProperties:v}=lp(g),{push:k}=ap(),C=a.computed(()=>t.value==="desktop"),A=a.computed(()=>b.value*n.itemsPerPage-1),S=a.computed(()=>r.value<=0?70:r.value>70?0:70-r.value),E=a.computed(()=>{var V;return Math.ceil(((V=n.modelValue)==null?void 0:V.length)/n.itemsPerPage)||1}),O=V=>{!V.dragging&&r.value<=24&&r.value>=0&&(i.value=0),!V.dragging&&r.value>24&&r.value<70&&(i.value=70),!(r.value>0)&&(d.value?N(V):x(V))};f.value&&l5(O,{domTarget:g,filterTaps:!0,useTouch:!0,delay:100});const x=V=>{V.tap||V.axis==="x"||(d.value=!0)},N=V=>{if(V.tap||V.axis==="x")return;const U=V.direction[1],Z=U>=0,R=U<=0&&r.value<=0;!h.value&&(Z||R)&&B(!R,"drag"),d.value=!1},D=async()=>{const V=r.value+w.value,U=l.value.offsetTop+l.value.offsetHeight;V>U-400&&b.value<E.value&&(b.value++,e("page-updated"))},B=async(V,U)=>{if(h.value=V,await a.nextTick(),u.value&&s.value==="up"&&r.value<=0||U==="drag"){const Z=S.value?S.value:0;k("y",Z,v,p),u.value=!1}},H=()=>{const V=Math.max(0,r.value)>o.value?"down":"up";V!==s.value&&(s.value=V),r.value<70&&B(!0,"scroll"),o.value=Math.max(0,r.value),D()};return a.onMounted(()=>{f.value?(c.value=g.value.offsetTop-16,window.addEventListener("scroll",H)):window.addEventListener("scroll",D),window.addEventListener("resize",async()=>{w.value=window.innerHeight,await a.nextTick()})}),a.onUnmounted(()=>{f.value?window.removeEventListener("scroll",H):window.removeEventListener("scroll",D)}),{dataListRef:l,defaultSearchTop:c,isDragging:d,isSearchVisible:h,hiddenSearch:f,listRef:g,page:b,prevScrollY:o,scrollY:r,scrollToY:i,searchRef:y,windowHeight:w,direction:s,isDesktop:C,lastOnPage:A,searchHeight:S,totalPages:E,onScroll:H,scrollWatcher:D,toggleSearch:B,deviceType:t,mq:Ht}}}),yie=["id"],bie=["id"],wie=["id"],vie=["id"],Cie=["id"],kie=["id"],Sie=["id"],Mie=["id","onClick"],Eie={key:1,class:"list ordered-list"},Aie=["id","onClick"],Tie=["id"],Iie={key:1,class:"list-wrapper"},xie=["id"],Oie=["id"];function Die(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{id:n.id,class:a.normalizeClass(["q-data-list",{"has-data-filter":!!n.$slots.dataFilter,"has-no-results":!n.modelValue.length,"is-device":!n.isDesktop,"is-fixed":n.isFixed,"is-loading":n.loading}]),ref:"dataListRef"},[n.hasSearch?a.renderSlot(n.$slots,"search-and-filters",{key:0},()=>[a.createElementVNode("div",{ref:"searchRef",id:`${n.id?n.id+"-":""}search-and-filters`,class:a.normalizeClass(["data-filter-wrapper search-and-filters",{"fixed right-0 left-0 top-0 pt-4 pl-4 pr-4 z-10 bg-white overflow-hidden":n.hiddenSearch},{"is-shown border-b border-gray-20":n.hiddenSearch&&n.isSearchVisible},{"!hidden h-px":n.hiddenSearch&&n.searchHeight<=16}]),style:a.normalizeStyle([n.hiddenSearch&&n.searchHeight>=0?`height: ${n.searchHeight}px;`:"",`top: ${n.defaultSearchTop}px;`])},[n.$slots.dataFilter?(a.openBlock(),a.createElementBlock("div",{key:0,id:`${n.id?n.id+"-":""}data-filter-container`,class:"data-filter-container mb-4"},[a.renderSlot(n.$slots,"dataFilter",{},void 0,!0)],8,wie)):(a.openBlock(),a.createElementBlock("div",{key:1,id:`${n.id?n.id+"-":""}data-filter-loading`,class:"data-filter-container loading-state"},e[0]||(e[0]=[a.createElementVNode("div",{class:"loading-search animate-shimmer bg-gray-10"},null,-1),a.createElementVNode("div",{class:"loading-filters animate-shimmer bg-gray-30"},null,-1)]),8,vie)),a.renderSlot(n.$slots,"search-separator",{},()=>[a.createElementVNode("hr",{class:a.normalizeClass(["search-separator",{"!mb-0 hidden":n.hiddenSearch}])},null,2)],!0)],14,bie)],!0):a.createCommentVNode("",!0),a.createElementVNode("div",{ref:"listRef",id:`${n.id?n.id+"-":""}outer-wrapper`,class:"outer-list-wrapper select-none"},[n.loading?(a.openBlock(),a.createElementBlock("div",Iie,[a.createElementVNode("ul",{id:`${n.id?n.id+"-":""}loading-list`,class:"list loading-list"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.skeletonRows,s=>(a.openBlock(),a.createElementBlock("li",{key:s,id:`${n.id?n.id+"-":""}loading-list-li-${s}`,class:"list-item"},e[1]||(e[1]=[a.createElementVNode("div",{class:"animate-shimmer bg-gray-30 loading-top mb-3"},null,-1),a.createElementVNode("div",{class:"animate-shimmer bg-gray-10 loading-bottom"},null,-1)]),8,Oie))),128))],8,xie)])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[n.modelValue.length?(a.openBlock(),a.createElementBlock("div",{key:0,id:`${n.id?n.id+"-":""}wrapper`,class:"list-wrapper"},[n.type!=="ordered"?(a.openBlock(),a.createElementBlock("ul",{key:0,id:`${n.id?n.id+"-":""}ul`,class:a.normalizeClass(["list",`${n.type}-list`])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.totalPages,s=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:s},[s<=n.page?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(n.modelValue.slice((s-1)*n.itemsPerPage,(s-1)*n.itemsPerPage+n.itemsPerPage),(l,c)=>(a.openBlock(),a.createElementBlock("li",{id:`${n.id?n.id+"-":""}li-${(s-1)*n.itemsPerPage+c}`,key:c,class:"list-item",onClick:d=>n.$emit("click:list-item",l)},[a.renderSlot(n.$slots,"listItem",a.mergeProps({ref_for:!0},{data:l}),()=>[a.createTextVNode(a.toDisplayString(l),1)],!0)],8,Mie))),128)):a.createCommentVNode("",!0)],64))),128))],10,Sie)):(a.openBlock(),a.createElementBlock("ol",Eie,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.totalPages,s=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:s},[s<=n.page?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(n.modelValue.slice((s-1)*n.itemsPerPage,(s-1)*n.itemsPerPage+n.itemsPerPage),(l,c)=>(a.openBlock(),a.createElementBlock("li",{id:`${n.id?n.id+"-":""}li-${(s-1)*n.itemsPerPage+c}`,key:c,class:"list-item",onClick:d=>n.$emit("click:list-item",l)},[a.renderSlot(n.$slots,"listItem",a.mergeProps({ref_for:!0},{data:l}),()=>[a.createTextVNode(a.toDisplayString(l),1)],!0)],8,Aie))),128)):a.createCommentVNode("",!0)],64))),128))]))],8,kie)):(a.openBlock(),a.createElementBlock("div",{key:1,id:`${n.id?n.id+"-":""}no-results`,class:"no-results"},[a.renderSlot(n.$slots,"no-results",{},()=>[a.createElementVNode("p",null,a.toDisplayString(n.noResultMessage||n.$t("HC_NO_RESULTS_FOUND")),1)],!0)],8,Tie))],64))],8,Cie)],10,yie)}const Nie=ke(gie,[["render",Die],["__scopeId","data-v-aedd5d55"]]),Pie=a.defineComponent({name:"QTableCell",props:{id:{type:String,default:""},align:{type:String,default:"left"},isColumnHeader:{type:Boolean,default:!1},sortable:{Boolean,default:!1}},setup(){return{}}}),Lie=["id","align"],Bie=["id","align"];function _ie(n,e,t,r,i,o){return n.isColumnHeader?(a.openBlock(),a.createElementBlock("th",{key:0,id:n.id?`${n.id.toString().toLowerCase()}-th`:"",align:n.align,class:a.normalizeClass({"cursor-pointer":n.sortable})},[a.renderSlot(n.$slots,"default",{},void 0,!0)],10,Lie)):(a.openBlock(),a.createElementBlock("td",{key:1,id:n.id?`${n.id.toString().toLowerCase()}-td`:"",align:n.align},[a.renderSlot(n.$slots,"default",{},void 0,!0)],8,Bie))}const Q8=ke(Pie,[["render",_ie],["__scopeId","data-v-b1f22bf6"]]),Rie=a.defineComponent({name:"QTableHead",components:{QTableCell:Q8},props:{id:{type:String,default:""},columns:{type:Array,default:()=>[]},rowCount:{type:Number,default:0},scrollable:{type:Boolean,default:!1},scrollableContainerX:{type:Number,default:0},scrollMax:{type:Number,default:0},thClasses:{type:String,default:""}},setup(){return{}}}),Vie=["id"],$ie=["id"];function Fie(n,e,t,r,i,o){const s=a.resolveComponent("q-table-cell");return a.openBlock(),a.createElementBlock("thead",{id:`${n.id?n.id+"-":""}thead`},[a.createElementVNode("tr",{id:`${n.id?n.id+"-":""}thead-tr`,class:"bg-gray-7"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.columns,(l,c)=>(a.openBlock(),a.createBlock(s,{id:l.key?(n.id?n.id+"-":"")+l.key:l?(n.id?n.id+"-":"")+l:(n.id?n.id+"-":"")+c,"is-column-header":!0,key:c,class:a.normalizeClass([l.key,n.thClasses,`cell-${l.size||"md"}`,{"sticky left-0 bg-gray-7 z-20":l.frozen,"text-right":l.key==="actions","left-auto right-0":l.key==="actions"&&l.frozen,"shadow-right":l.frozen&&n.rowCount&&c===0&&n.scrollable&&n.scrollableContainerX>0,"shadow-left":l.frozen&&n.rowCount&&c===n.columns.length-1&&n.scrollable&&n.scrollableContainerX<n.scrollMax}]),sortable:l.sortable,onClick:d=>n.$emit("click:th",l)},{default:a.withCtx(()=>[a.renderSlot(n.$slots,`head(${l.key||l})`,{},()=>[a.createTextVNode(a.toDisplayString(typeof l=="string"?l:l.name),1)],!0)]),_:2},1032,["id","class","sortable","onClick"]))),128))],8,$ie)],8,Vie)}const gI=ke(Rie,[["render",Fie],["__scopeId","data-v-f3272e4a"]]),yI="data:image/svg+xml,%3csvg%20width='118'%20height='99'%20viewBox='0%200%20118%2099'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M104.165%2059.815C107.107%2062.7762%20108.893%2066.692%20109.201%2070.8549C109.508%2075.0179%20108.317%2079.1536%20105.842%2082.515L105.642%2082.782L105.412%2083.082L117.521%2095.245C117.828%2095.5546%20118%2095.973%20118%2096.409C118%2096.845%20117.828%2097.2634%20117.521%2097.573C117.232%2097.8651%20116.844%2098.0376%20116.434%2098.0561C116.023%2098.0746%20115.621%2097.9378%20115.307%2097.673L115.207%2097.573L103.122%2085.438L102.822%2085.682C99.4939%2088.3942%2095.2763%2089.772%2090.9889%2089.5476C86.7016%2089.3233%2082.6508%2087.5127%2079.624%2084.468C76.3686%2081.1921%2074.5414%2076.7614%2074.5414%2072.143C74.5414%2067.5247%2076.3686%2063.0939%2079.624%2059.818C81.2316%2058.2001%2083.1433%2056.916%2085.2491%2056.0397C87.3548%2055.1634%2089.6131%2054.7121%2091.8939%2054.7118C94.1747%2054.7115%2096.4331%2055.1622%2098.539%2056.0381C100.645%2056.9139%20102.557%2058.1975%20104.165%2059.815ZM81.935%2062.131C79.2951%2064.7964%2077.8142%2068.3961%2077.8142%2072.1475C77.8142%2075.8989%2079.2951%2079.4986%2081.935%2082.164C83.2368%2083.4792%2084.7865%2084.5233%2086.4944%2085.2358C88.2022%2085.9484%2090.0344%2086.3153%2091.885%2086.3153C93.7355%2086.3153%2095.5678%2085.9484%2097.2756%2085.2358C98.9835%2084.5233%20100.533%2083.4792%20101.835%2082.164C104.475%2079.4986%20105.956%2075.8989%20105.956%2072.1475C105.956%2068.3961%20104.475%2064.7964%20101.835%2062.131C100.533%2060.8158%2098.9835%2059.7717%2097.2756%2059.0592C95.5678%2058.3466%2093.7355%2057.9797%2091.885%2057.9797C90.0344%2057.9797%2088.2022%2058.3466%2086.4944%2059.0592C84.7865%2059.7717%2083.2368%2060.8158%2081.935%2062.131ZM31.4%2075.042V76.442C31.4001%2076.5544%2031.4224%2076.6656%2031.4656%2076.7694C31.5087%2076.8731%2031.5719%2076.9673%2031.6515%2077.0466C31.7311%2077.126%2031.8255%2077.1888%2031.9294%2077.2316C32.0333%2077.2744%2032.1446%2077.2963%2032.257%2077.296H72.357C72.5818%2078.1673%2072.8638%2079.0228%2073.201%2079.857H32.258C31.3506%2079.8589%2030.4796%2079.5003%2029.8366%2078.86C29.1935%2078.2198%2028.8311%2077.3504%2028.829%2076.443V75.043L31.4%2075.042ZM86.162%2022C87.0694%2021.9981%2087.9404%2022.3568%2088.5834%2022.997C89.2265%2023.6372%2089.5889%2024.5066%2089.591%2025.414V51.808C88.7243%2051.9101%2087.8652%2052.0684%2087.019%2052.282V25.414C87.0189%2025.3016%2086.9966%2025.1904%2086.9534%2025.0867C86.9103%2024.9829%2086.8471%2024.8887%2086.7675%2024.8094C86.6879%2024.7301%2086.5935%2024.6672%2086.4896%2024.6244C86.3857%2024.5816%2086.2744%2024.5597%2086.162%2024.56H25.429C25.3166%2024.5597%2025.2053%2024.5816%2025.1014%2024.6244C24.9975%2024.6672%2024.9031%2024.7301%2024.8235%2024.8094C24.7439%2024.8887%2024.6807%2024.9829%2024.6376%2025.0867C24.5944%2025.1904%2024.5721%2025.3016%2024.572%2025.414V69.587C24.5721%2069.6994%2024.5944%2069.8106%2024.6376%2069.9144C24.6807%2070.0181%2024.7439%2070.1123%2024.8235%2070.1916C24.9031%2070.271%2024.9975%2070.3338%2025.1014%2070.3766C25.2053%2070.4194%2025.3166%2070.4413%2025.429%2070.441H71.766C71.697%2071.2932%2071.6806%2072.1488%2071.717%2073.003H25.429C24.5216%2073.0049%2023.6506%2072.6463%2023.0076%2072.006C22.3645%2071.3658%2022.0021%2070.4964%2022%2069.589V25.414C22.0021%2024.5066%2022.3645%2023.6372%2023.0076%2022.997C23.6506%2022.3568%2024.5216%2021.9981%2025.429%2022H86.162ZM77.701%2054.948C77.8695%2054.9484%2078.0362%2054.982%2078.1918%2055.0468C78.3473%2055.1117%2078.4885%2055.2065%2078.6073%2055.3259C78.7262%2055.4453%2078.8204%2055.587%2078.8845%2055.7428C78.9486%2055.8986%2078.9814%2056.0655%2078.981%2056.234C78.9811%2056.2983%2078.9764%2056.3624%2078.967%2056.426C78.557%2056.7693%2078.159%2057.1327%2077.773%2057.516H77.701H34.374C34.0329%2057.516%2033.7058%2057.3805%2033.4647%2057.1393C33.2235%2056.8982%2033.088%2056.5711%2033.088%2056.23C33.088%2055.8889%2033.2235%2055.5618%2033.4647%2055.3207C33.7058%2055.0795%2034.0329%2054.944%2034.374%2054.944L77.701%2054.948ZM92.991%2028.859C93.8984%2028.8571%2094.7694%2029.2158%2095.4124%2029.856C96.0555%2030.4962%2096.4179%2031.3656%2096.42%2032.273V52.168C95.5725%2051.9753%2094.7133%2051.8377%2093.848%2051.756V32.273C93.8479%2032.1606%2093.8256%2032.0494%2093.7824%2031.9457C93.7393%2031.8419%2093.6761%2031.7477%2093.5965%2031.6684C93.5169%2031.5891%2093.4225%2031.5262%2093.3186%2031.4834C93.2147%2031.4406%2093.1034%2031.4187%2092.991%2031.419H91.291V28.858L92.991%2028.859ZM77.701%2046.375C78.0421%2046.375%2078.3692%2046.5105%2078.6103%2046.7517C78.8515%2046.9928%2078.987%2047.3199%2078.987%2047.661C78.987%2048.0021%2078.8515%2048.3292%2078.6103%2048.5703C78.3692%2048.8115%2078.0421%2048.947%2077.701%2048.947H34.374C34.0329%2048.947%2033.7058%2048.8115%2033.4647%2048.5703C33.2235%2048.3292%2033.088%2048.0021%2033.088%2047.661C33.088%2047.3199%2033.2235%2046.9928%2033.4647%2046.7517C33.7058%2046.5105%2034.0329%2046.375%2034.374%2046.375H77.701ZM59.983%2037.801C60.3241%2037.801%2060.6512%2037.9365%2060.8923%2038.1777C61.1335%2038.4188%2061.269%2038.7459%2061.269%2039.087C61.269%2039.4281%2061.1335%2039.7552%2060.8923%2039.9963C60.6512%2040.2375%2060.3241%2040.373%2059.983%2040.373H34.374C34.0329%2040.373%2033.7058%2040.2375%2033.4647%2039.9963C33.2235%2039.7552%2033.088%2039.4281%2033.088%2039.087C33.088%2038.7459%2033.2235%2038.4188%2033.4647%2038.1777C33.7058%2037.9365%2034.0329%2037.801%2034.374%2037.801H59.983Z'%20fill='%238D9AA5'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%200C4.2066%200%204.40475%200.0820729%204.55084%200.228164C4.69693%200.374255%204.779%200.572397%204.779%200.779V3.221H7.221C7.41393%203.221%207.6%203.29258%207.74317%203.4219C7.88634%203.55122%207.97643%203.72907%207.996%203.921V4.001C7.996%204.2076%207.91393%204.40575%207.76784%204.55184C7.62175%204.69793%207.4236%204.78%207.217%204.78H4.779V7.222C4.779%207.41493%204.70742%207.601%204.5781%207.74417C4.44878%207.88734%204.27093%207.97744%204.079%207.997H3.999C3.7924%207.997%203.59425%207.91493%203.44816%207.76884C3.30207%207.62275%203.22%207.4246%203.22%207.218V4.779H0.779C0.585538%204.78002%200.398617%204.70902%200.254623%204.57981C0.110629%204.45061%200.0198653%204.27244%200%204.08V4C0%203.7934%200.082073%203.59526%200.228164%203.44916C0.374255%203.30307%200.572396%203.221%200.779%203.221H3.221V0.779C3.221%200.586071%203.29258%200.400004%203.4219%200.256831C3.55122%200.113658%203.72907%200.023565%203.921%200.00399971L4%200Z'%20fill='%238D9AA5'/%3e%3cpath%20d='M11%2099C11.5304%2099%2012.0391%2098.7893%2012.4142%2098.4142C12.7893%2098.0391%2013%2097.5304%2013%2097C13%2096.4696%2012.7893%2095.9609%2012.4142%2095.5858C12.0391%2095.2107%2011.5304%2095%2011%2095C10.4696%2095%209.96086%2095.2107%209.58579%2095.5858C9.21071%2095.9609%209%2096.4696%209%2097C9%2097.5304%209.21071%2098.0391%209.58579%2098.4142C9.96086%2098.7893%2010.4696%2099%2011%2099Z'%20fill='%238D9AA5'/%3e%3cpath%20d='M104.518%2015.035C103.055%2015.035%20101.651%2014.4538%20100.617%2013.4192C99.5817%2012.3846%2099.0003%2010.9813%2099%209.518C99%208.05454%2099.5814%206.65101%20100.616%205.61619C101.651%204.58136%20103.055%204%20104.518%204C105.981%204%20107.385%204.58136%20108.42%205.61619C109.455%206.65101%20110.036%208.05454%20110.036%209.518C110.036%2010.9813%20109.454%2012.3846%20108.419%2013.4192C107.385%2014.4538%20105.981%2015.035%20104.518%2015.035ZM104.518%2013.035C105.451%2013.035%20106.346%2012.6645%20107.005%2012.005C107.665%2011.3454%20108.036%2010.4509%20108.036%209.518C108.036%209.05601%20107.945%208.59854%20107.768%208.17172C107.591%207.7449%20107.332%207.35707%20107.006%207.0304C106.679%206.70372%20106.291%206.44459%20105.864%206.26779C105.437%206.091%20104.98%206%20104.518%206C103.585%206%20102.69%206.37065%20102.03%207.0304C101.371%207.69015%20101%208.58497%20101%209.518C101%2010.4509%20101.371%2011.3454%20102.031%2012.005C102.69%2012.6645%20103.585%2013.035%20104.518%2013.035Z'%20fill='%238D9AA5'/%3e%3c/svg%3e",jie=a.defineComponent({name:"QDataTable",components:{QDataTableCell:Q8,QDataTableHead:gI,QTooltip:V2},props:{id:{type:String,default:"table"},modelValue:{type:Array,default:()=>[]},canClickRow:{type:Boolean,default:!1},columns:{type:Array,default:()=>[]},currentPage:{type:Number,default:1},fixedTopOffset:{type:Number,default:0},hasSearch:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!1},isMultiSort:{type:Boolean,default:!1},isMultiSelect:{type:Boolean,default:!1},itemsPerPage:{type:Number,default:50},leftScrollAmount:{type:Number,default:200},loading:{type:Boolean,default:!1},orderBy:{type:String,default:""},rightScrollAmount:{type:Number,default:200},searchDelay:{type:Number,default:300},searchPlaceholder:{type:String,default:""},skeletonRows:{type:Number,default:6},sortBy:{type:String,default:""},tdClasses:{type:String,default:"text-sm"},thClasses:{type:String,default:"text-xs cursor-pointer"},thHeight:{type:Number,default:48}},emits:["click:row","deselect:row","select:row","update:order-by","update:selected","update:sort-by"],setup(n,{emit:e}){const{deviceType:t}=$l(),r=a.ref(),i=a.ref(),o=a.ref(),s=a.ref(),l=a.ref(),c=a.ref(0),{x:d}=Xh(o,{behavior:"auto"}),{x:u}=Xh(i,{behavior:"auto"}),{y:f}=b5(),{bottom:h,top:p,width:g,height:b}=WP(o),y=a.ref(0),w=a.ref(0),v=a.ref(0),k=a.ref(window.innerHeight),C=a.ref(0),A=a.ref(!1),S=a.ref(1),E=a.ref([]),O=a.ref(!1),x=a.ref(0),N=a.computed(()=>t.value==="desktop"),D=a.computed(()=>S.value*n.itemsPerPage-1),B=a.computed(()=>n.isFixed&&f.value>=v.value),H=a.computed(()=>V.value>0),V=a.computed(()=>o.value?c.value-g.value:0),U=a.computed(()=>(!N.value||A.value)&&d.value>0&&n.modelValue.length&&!n.loading),Z=a.computed(()=>(!N.value||A.value)&&d.value<V.value&&n.modelValue.length&&!n.loading),R=a.computed(()=>{const X=[],te={};let me=0;return n.columns.forEach(Ie=>{te[Ie.key]=""}),[...Array(n.skeletonRows)].forEach(()=>{X.push({...te,shimmer:me%2?"bg-gray-10":"bg-gray-30"}),me++}),X}),Y=a.computed(()=>{var X;return Math.ceil(((X=n.modelValue)==null?void 0:X.length)/n.itemsPerPage)||1}),_=()=>{var te;let X=0;if(H.value){const me=(((te=r.value)==null?void 0:te.clientHeight)||0)+n.thHeight,Ie=s.value.clientHeight+s.value.offsetTop;k.value<Ie?X=(k.value-(s.value.offsetTop+me))/2:X=(s.value.clientHeight-me)/2}C.value=X},q=()=>{d.value=o.value.scrollLeft,u.value=o.value.scrollLeft},re=()=>{u.value=i.value.scrollLeft,d.value=i.value.scrollLeft},Q=async()=>{const X=f.value+k.value-n.fixedTopOffset,te=v.value+b.value;X>te-400&&S.value<Y.value&&S.value++,_()},j=(X,te,me)=>{const Ie=X.scrollLeft,Ue=te-Ie,Kt=performance.now(),Rn=()=>{const Vn=performance.now()-Kt,Qi=Math.min(Vn/me,1);X.scrollLeft=Ie+Ue*Qi,Qi<1&&requestAnimationFrame(Rn)};requestAnimationFrame(Rn)},$=()=>{j(o.value,d.value-n.leftScrollAmount,250)},F=()=>{j(o.value,d.value+n.leftScrollAmount,250)},P=(X,te)=>{const me=E.value.indexOf(te);me<0&&X&&(E.value.push(te),e("select:row",te)),me>=0&&!X&&(E.value.splice(me,1),e("deselect:row",te)),e("update:selected",E.value)},K=X=>{const te=[];X&&n.modelValue.forEach(me=>{te.push(me.id)}),E.value=te,e("update:selected",E.value)},oe=X=>{const te=X.key,me=n.orderBy===""||n.sortBy!==te?"asc":n.orderBy==="asc"?"desc":"";e("update:sort-by",te),e("update:order-by",me)};return a.watch(()=>n.modelValue,()=>{_()}),a.watch(()=>n.loading,async()=>{await a.nextTick(),_()}),a.onMounted(()=>{var X,te,me,Ie,Ue;v.value=s.value.offsetTop-n.fixedTopOffset,c.value=(X=o.value)==null?void 0:X.scrollWidth,x.value=s.value.offsetLeft+1,y.value=(me=(te=s.value)==null?void 0:te.querySelector("table > thead > tr > th:first-child"))==null?void 0:me.clientWidth,w.value=(Ue=(Ie=s.value)==null?void 0:Ie.querySelector("table > thead > tr > th:last-child"))==null?void 0:Ue.clientWidth,window.addEventListener("resize",async()=>{var Kt;c.value=(Kt=o.value)==null?void 0:Kt.scrollWidth,k.value=window.innerHeight,_(),await a.nextTick()}),window.addEventListener("scroll",Q),o.value.addEventListener("scroll",q),i.value.addEventListener("scroll",re)}),a.onUnmounted(()=>{window.removeEventListener("resize",async()=>await a.nextTick()),window.removeEventListener("scroll",async()=>await a.nextTick())}),{deviceType:t,mq:Ht,noResults:yI,allCheckboxSelected:O,dataFilterContainer:r,fixedScrollableContainer:i,fixedScrollableContainerX:u,hovered:A,leftScrollButtonX:y,page:S,rightScrollButtonX:w,scrollButtonTop:C,scrollableContainer:o,scrollableContainerBottom:h,scrollableContainerHeight:b,scrollableContainerTop:p,scrollableContainerWidth:g,scrollableContainerX:d,scrollWidth:c,selected:E,tableContainer:s,tableLeftOffset:x,tbodyContainer:l,totalOffset:v,windowHeight:k,windowY:f,isDesktop:N,lastOnPage:D,pinHeaders:B,scrollable:H,scrollMax:V,showLeftScrollButton:U,showRightScrollButton:Z,skeletonData:R,totalPages:Y,handleScroll:q,handleFixedScroll:re,onClickColumnHeader:oe,onUpdateCheckbox:P,onUpdateAllCheckboxes:K,getScrollButtonTop:_,scrollWatcher:Q,smoothScroll:j,triggerScrollLeft:$,triggerScrollRight:F}}}),zie=["id"],Hie=["id"],Uie={class:a.normalizeClass(["fixed-scrollable overflow-x-auto overflow-y-hidden z-20"]),ref:"fixedScrollableContainer"},Zie={class:"min-w-full"},Wie={class:"flex items-center"},qie={key:0},Gie=["id"],Kie={class:"min-w-full"},Yie={class:"flex items-center"},Qie={key:0},Xie=["id"],Jie=["id","onClick"],eoe={key:0},toe={key:1,id:"no-results",class:a.normalizeClass(["flex flex-col items-center justify-center","bg-white rounded-b-lg p-12"])},noe=["src"],roe={class:"font-bold text-inkwell-0 text-base"};function ioe(n,e,t,r,i,o){var u,f,h;const s=a.resolveComponent("q-checkbox"),l=a.resolveComponent("q-data-table-head"),c=a.resolveComponent("q-data-table-cell"),d=a.resolveComponent("q-icon");return a.openBlock(),a.createElementBlock("div",a.mergeProps({id:n.id,class:["table-container relative border border-gray-20 rounded-lg",{"has-data-filter":!!n.$slots.dataFilter,"has-no-results":!n.modelValue.length,"has-pinned-headers":n.pinHeaders,"is-device":!n.isDesktop,"is-fixed":n.isFixed,"is-loading":n.loading,scrollable:n.scrollable}],style:`
251
+ `)},[a.createVNode(s,{icon:"paperclip",size:"lg",type:"line",color:"gray-40"}),a.createElementVNode("div",ure,a.toDisplayString(n.$t("HC_CLICK_DRAG_FILES_HERE")),1)],6)):a.createCommentVNode("",!0),a.renderSlot(n.$slots,"default"),n.allFiles.length?(a.openBlock(),a.createElementBlock("div",fre,[a.createVNode(l,{files:n.allFiles,"show-remove":!0,processing:n.processing,class:"px-4 mt-2 mb-2","onUpdate:modelValue":n.onRemoveFile},{actions:a.withCtx(()=>[a.createElementVNode("div",a.mergeProps({"aria-labelledby":"add-file-label",class:"p-0 relative rounded-lg shrink-0 my-2 bg-gray-7 hover:bg-gray-20 focus:bg-gray-20 outline-none cursor-pointer py-2 size-16 md:py-[1.125rem] md:size-20 rounded-lg flex align-center items-center flex-col",role:"button",tabindex:"0"},{[a.toHandlerKey(!n.processing&&"click")]:e[0]||(e[0]=y=>n.fileUpload.choose())},{[a.toHandlerKey(!n.processing&&"keydown.enter")]:e[1]||(e[1]=y=>n.fileUpload.choose())},{[a.toHandlerKey(!n.processing&&"keydown.space.prevent")]:e[2]||(e[2]=y=>n.fileUpload.choose())}),[a.createVNode(s,{icon:"circle-plus",color:"inkwell-0",class:"shrink-0",size:"md"}),a.createElementVNode("div",hre,a.toDisplayString(n.$t("HC_ADD")),1)],16)]),_:1},8,["files","processing","onUpdate:modelValue"])])):a.createCommentVNode("",!0)],512)]}),_:3},8,["name","url","multiple","accept","maxFileSize","auto","custom-upload","disabled","onUpload","onSelect","pt"]),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[n.sizeErrors.length||n.typeErrors.length?(a.openBlock(),a.createBlock(f,{key:0,id:"file-upload-error-modal",dismissible:!1,overlay:n.mq.md?"white-transparent":"black-transparent","container-class":"h-fit min-h-fit"},{default:a.withCtx(()=>[a.createVNode(u,null,{body:a.withCtx(()=>[a.createElementVNode("div",pre,[a.createElementVNode("h2",mre,a.toDisplayString(n.typeErrors.length?n.$t("HC_INVALID_FILES"):n.$t("HC_FILE_TOO_LARGE")),1),n.sizeErrors.length?(a.openBlock(),a.createElementBlock("p",gre,a.toDisplayString(n.$t("HC_UPLOAD_FILE_SIZE_ERROR",{size:n.maxFileSize/1024/1024})),1)):a.createCommentVNode("",!0),n.sizeErrors.length?(a.openBlock(),a.createElementBlock("ul",yre,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.sizeErrors,h=>(a.openBlock(),a.createElementBlock("li",{key:h},a.toDisplayString(h),1))),128))])):a.createCommentVNode("",!0),n.typeErrors.length?(a.openBlock(),a.createElementBlock("p",bre,a.toDisplayString(n.$t("HC_INVALID_FILE_TYPES",{types:n.displayAllowedTypes})+":"),1)):a.createCommentVNode("",!0),n.typeErrors.length?(a.openBlock(),a.createElementBlock("ul",wre,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.typeErrors,h=>(a.openBlock(),a.createElementBlock("li",{key:h},a.toDisplayString(h),1))),128))])):a.createCommentVNode("",!0)])]),footer:a.withCtx(()=>[a.createVNode(d,{class:a.normalizeClass([n.mq.md?"mx-3":"w-full"]),status:n.mq.md?"primary":"primary-blue",size:"lg",onClick:e[5]||(e[5]=h=>n.clearErrors())},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_OK")),1)]),_:1},8,["class","status"])]),_:1})]),_:1},8,["overlay"])):a.createCommentVNode("",!0)]))]),_:1})])}const dI=ke(lre,[["render",vre]]),Cre=a.defineComponent({components:{EditorContent:oX,EmojiPicker:Tee,QFileUpload:dI},props:{modelValue:{type:String,default:""},attachments:{type:Object,default:()=>[]},allowEmojis:{type:Boolean,default:!1},allowAttachments:{type:Boolean,default:!1},allowFormatting:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},filesAllowed:{type:String,default:"image/*,.pdf"},expands:{type:Boolean,default:!1},isStacked:{type:Boolean,default:!0},isStandalone:{type:Boolean,default:!1},placeholder:{type:String,default:""},processing:{type:Boolean,default:!1}},emits:["update:model-value","update:attachments","keyboard-open"],setup(n,{emit:e}){const t=a.ref(),r=a.ref(!1),i=a.ref(""),o=a.ref(),s=a.ref(),l=a.ref(!1),c=a.ref(!1),d=a.ref(!1),u=a.ref([]),f=a.ref(),h=a.ref(),p=a.ref(),g=a.ref(!1),b=a.ref(window.innerHeight),y=a.computed(()=>Z.value.getAttributes("textStyle").color||"#121517"),w=a.computed(()=>n.attachments),v=a.computed(()=>n.isStacked||n.expands&&(w.value.length>0||d.value||!Z.value.isEmpty)||c.value),C=Cb(zP).greaterOrEqual("md"),A=()=>{const R=window.prompt("URL");Z.value.chain().focus().extendMarkRange("link").setLink({href:R||""}).run()},S=R=>{Z.value.chain().focus().setColor(R).run(),O()},E=()=>{l.value=!l.value},O=()=>{l.value=!1},x=()=>{var R,Y;(Y=(R=f.value)==null?void 0:R.fileUpload)==null||Y.choose()},N=R=>{Z.value.chain().focus().insertContent(R).run(),o.value.$el.click()},D=async()=>{if(await a.nextTick(),d.value){const R=g.value,Y=(visualViewport==null?void 0:visualViewport.height)||window.innerHeight;g.value=b.value-Y>0,R!==g.value&&(d.value=g.value,e("keyboard-open",g.value))}},B=()=>{d.value&&n.expands&&(g.value=!1,e("keyboard-open",g.value)),d.value=!1},H=R=>{Z.value.chain().focus().insertContent(R.i).run(),r.value=!1},V=R=>{u.value=R,U()},U=()=>{let R="";Z.value.isEmpty||(R=n.allowFormatting?Z.value.getHTML():Z.value.getText()),u.value!==n.attachments&&e("update:attachments",u.value),e("update:model-value",R)},Z=a.ref(sX({extensions:[Ate.configure({heading:{levels:[1,2]}}),Tte,Ite,xte,Xte.configure({openOnClick:!1}),Jte.configure({placeholder:n.placeholder})],content:n.modelValue,onUpdate:U,editable:!n.disabled}));return a.watch(()=>n.modelValue,R=>{Z.value&&!R&&Z.value.commands.clearContent()}),a.watch(()=>n.disabled,R=>{Z.value&&(Z.value.options.editable=!R,Z.value.view.update(Z.value.view.props))}),a.onBeforeUnmount(()=>{var R;(R=Z.value)==null||R.destroy()}),a.onMounted(()=>{visualViewport&&n.expands&&visualViewport.addEventListener("resize",D)}),a.onUnmounted(()=>{visualViewport&&n.expands&&visualViewport.removeEventListener("resize",D)}),Yh(t,()=>{r.value=!1}),Yh(p,()=>{d.value&&n.expands&&(g.value=!1,e("keyboard-open",g.value)),d.value=!1}),{colors:CC.theme.colors,colorExclusions:["success","success-light","error","error-light","warning","warning-light","info","info-light","transparent","current","green-quore","blue-sky","blue-quore","complaint","recurring","workorder"],editor:Z,editorRef:h,emojiPickerElement:t,showEmojiPicker:r,emojiSearch:i,invoker:o,isExpanded:v,multiUploader:s,showColorMenu:l,focused:d,files:w,showFormatOptions:c,uploadedfiles:u,fileUploadRef:f,wysiwygRef:p,setColor:y,mdAndLarger:C,setLink:A,selectColor:S,showColors:E,onClickAction:B,onClickOutColors:O,attachFiles:x,appendEmoji:N,onSelectEmoji:H,onSelectFiles:V}}}),kre={key:0,class:"menu flex items-center justify-between !pb-0 !pr-0"},Sre={class:"toolbar flex items-center md:gap-x-4"},Mre={class:"flex items-center gap-x-1"},Ere={class:"toolbar flex items-center md:gap-x-4"},Are={name:"fade-zoom",class:"flex items-center items-center"};function Tre(n,e,t,r,i,o){const s=a.resolveComponent("q-icon"),l=a.resolveComponent("editor-content"),c=a.resolveComponent("q-file-upload"),d=a.resolveComponent("emoji-picker");return n.editor?(a.openBlock(),a.createElementBlock("div",{key:0,ref:"wysiwygRef",class:a.normalizeClass(["editor-container rounded-lg",{"has-placeholder":!!n.placeholder,"is-focused":n.focused,"is-stacked":n.isExpanded,"is-standalone":n.isStandalone,"show-formatting-menu":n.showFormatOptions,"!rounded-2xl md:!rounded-lg expands":n.expands}]),onMousedown:e[11]||(e[11]=u=>{n.focused=!0})},[a.createElementVNode("div",{class:a.normalizeClass(["wysiwyg-layout flex justify-between",{"flex-wrap":n.isExpanded}])},[n.showFormatOptions?(a.openBlock(),a.createElementBlock("div",kre,[a.createElementVNode("div",Sre,[a.createElementVNode("div",Mre,[a.createVNode(s,{icon:"bold",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("bold")}),onClick:e[0]||(e[0]=u=>n.editor.chain().focus().toggleBold().run())},null,8,["class"]),a.createVNode(s,{icon:"italic",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("italic")}),onClick:e[1]||(e[1]=u=>n.editor.chain().focus().toggleItalic().run())},null,8,["class"]),a.createVNode(s,{icon:"underline",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("underline")}),onClick:e[2]||(e[2]=u=>n.editor.chain().focus().toggleUnderline().run())},null,8,["class"]),a.createVNode(s,{icon:"strikethrough",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("strike")}),onClick:e[3]||(e[3]=u=>n.editor.chain().focus().toggleStrike().run())},null,8,["class"]),a.createVNode(s,{icon:"link",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("link")}),onClick:n.setLink},null,8,["class","onClick"]),n.editor.isActive("link")?(a.openBlock(),a.createBlock(s,{key:0,icon:"link",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("link")}),onClick:e[4]||(e[4]=u=>n.editor.chain().focus().unsetLink().run())},null,8,["class"])):a.createCommentVNode("",!0),a.createVNode(s,{icon:"list",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("bulletList")}),onClick:e[5]||(e[5]=u=>n.editor.chain().focus().toggleBulletList().run())},null,8,["class"]),a.createVNode(s,{icon:"numberlist",size:"lg",color:"inkwell-0",class:a.normalizeClass({"is-active":n.editor.isActive("orderedList")}),onClick:e[6]||(e[6]=u=>n.editor.chain().focus().toggleOrderedList().run())},null,8,["class"])])])])):a.createCommentVNode("",!0),n.allowAttachments?(a.openBlock(),a.createBlock(c,{key:1,ref:"fileUploadRef",disabled:n.disabled,expands:n.expands,files:n.files,"files-allowed":n.filesAllowed,processing:n.processing,class:a.normalizeClass(["grow",n.expands&&"rounded-t-2xl md:rounded-t-lg",!n.isExpanded&&!n.mdAndLarger?"order-2 -ml-2":"order-1"]),onFileList:n.onSelectFiles},{default:a.withCtx(()=>[a.createVNode(l,{ref:"editorRef",editor:n.editor,class:"grow"},null,8,["editor"])]),_:1},8,["disabled","expands","files","files-allowed","processing","class","onFileList"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["grow w-full",n.expands?"rounded-t-2xl md:rounded-t-lg":"rounded-t-lg",!n.isExpanded&&!n.mdAndLarger?"order-2 -ml-2":"order-1"])},[a.createVNode(l,{ref:"editorRef",editor:n.editor,class:"grow"},null,8,["editor"])],2)),n.showEmojiPicker?(a.openBlock(),a.createBlock(d,{key:3,ref:"emojiPickerElement",class:"absolute top-2 left-2 z-[9999]",onSelect:n.onSelectEmoji},null,8,["onSelect"])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["menu flex items-center justify-between",!n.isExpanded&&!n.mdAndLarger?"order-1":"order-2"])},[a.createElementVNode("div",Ere,[a.createElementVNode("div",Are,[a.createVNode(a.TransitionGroup,{name:"fade-zoom"},{default:a.withCtx(()=>[n.allowFormatting&&n.showFormatOptions?(a.openBlock(),a.createBlock(s,{icon:"close",key:"close",size:"lg",type:"",color:"inkwell-0",class:"md:!hidden bg-gray-7 !p-2 !rounded-full",onClick:e[7]||(e[7]=u=>n.showFormatOptions=!n.showFormatOptions)})):a.createCommentVNode("",!0),n.allowEmojis&&(!n.showFormatOptions||n.mdAndLarger)?(a.openBlock(),a.createBlock(s,{icon:"face-smile",key:"face-smile",size:"lg",type:"outline",color:"inkwell-0",class:a.normalizeClass({"is-active":n.showEmojiPicker}),onClick:e[8]||(e[8]=u=>n.showEmojiPicker=!n.showEmojiPicker)},null,8,["class"])):a.createCommentVNode("",!0),n.allowAttachments&&(!n.showFormatOptions||n.mdAndLarger)?(a.openBlock(),a.createBlock(s,{icon:"paperclip",key:"paperclip",size:"lg",type:"line",class:a.normalizeClass(n.disabled&&"!cursor-not-allowed hover:!text-inkwell-0"),color:"inkwell-0",onClick:n.attachFiles},null,8,["class","onClick"])):a.createCommentVNode("",!0),n.allowFormatting&&(!n.showFormatOptions||n.mdAndLarger)?(a.openBlock(),a.createBlock(s,{icon:"text-format",key:"text-format",size:"lg",type:"outline",color:"inkwell-0",class:a.normalizeClass({"is-active":n.showFormatOptions}),onClick:e[9]||(e[9]=u=>n.showFormatOptions=!n.showFormatOptions)},null,8,["class"])):a.createCommentVNode("",!0)]),_:1})])])],2),a.createElementVNode("div",{class:"flex items-center px-2 py-1 pr-4 order-3",onClick:e[10]||(e[10]=(...u)=>n.onClickAction&&n.onClickAction(...u))},[a.renderSlot(n.$slots,"action",{},void 0,!0)])],2)],34)):a.createCommentVNode("",!0)}const Y8=ke(Cre,[["render",Tre],["__scopeId","data-v-6c7a3a19"]]),Ire={id:{type:[Number,String],default:null},attachments:{type:Array,default:[]},attachmentClickEvent:{type:Function,default:()=>{}},attachmentRemoveEvent:{type:Function,default:()=>{}},canCopyLink:{type:Boolean,default:!1},canDelete:{type:[Boolean,Number],default:!1},canEdit:{type:[Boolean,Number],default:!1},canPin:{type:Boolean,default:!1},user:{type:Object,default:null},comment:{type:String,default:""},dateUtc:{type:String,default:null},dateLocal:{type:String,default:""},onDownloadFile:{type:Function,default:()=>{}},onUpdateComment:{type:Function,default:()=>{}},pinned:{type:Boolean,default:!1},processing:{type:Boolean,default:!1},showAvatar:{type:Boolean,default:!0},showRemoveButton:{type:Object,default:()=>{}}},xre=a.defineComponent({name:"QComment",components:{QAvatar:$9,QImageGallery:N6,QMenu:Z4,QPopover:P6,QWarningModal:NS,QWysiwyg:Y8},props:Ire,emits:["update:model-value"],setup(n){const{t:e}=ro(),t=[{text:e("HC_CANCEL")}],r=a.ref(null),i=a.ref(!1),o=a.ref(""),s=a.ref(!1),l=a.ref(!1),c=a.ref(!1),d=a.ref(""),u=a.ref(),f=a.computed(()=>{const D=[];return n.canCopyLink&&D.push({text:e("HC_COPY_LINK"),classes:"!text-blue-20 md:!text-inkwell-0",event:y}),n.canPin&&D.push({text:e(n.pinned?"HC_UNPIN_COMMENT":"HC_PIN_COMMENT"),classes:"!text-blue-20 md:!text-inkwell-0",event:x}),n.canEdit&&D.push({text:e("HC_EDIT_COMMENT"),classes:"!text-blue-20 md:!text-inkwell-0",event:S}),n.canDelete&&D.push({text:e("HC_DELETE_COMMENT"),classes:"!text-red-20",event:k}),D}),h=a.computed(()=>n.user.firstName+" "+n.user.lastName.substring(0,1)),p=a.computed(()=>wt.fromISO(n.dateUtc).toLocaleString(wt.DATETIME_MED)),g=a.computed(()=>n.user.name.split(" ").map(D=>D.trim().charAt(0)).join("").toUpperCase()),b=()=>{i.value=!1,o.value=""},y=()=>{navigator.clipboard.writeText(`${window.location.href}#comment-${n.id}`),s.value=!1},w=D=>{r.value=D,d.value="attachment",c.value=!0,s.value=!1},v=async()=>{r.value&&await n.onUpdateComment({event:"delete-attachment",value:r.value.id}),c.value=!1},k=()=>{d.value="comment",c.value=!0,s.value=!1},C=async()=>{await n.onUpdateComment({event:"delete-comment",value:n.id}),c.value=!1},A=()=>{d.value==="comment"?C():v()},S=async()=>{var B,H;i.value=!0,o.value=n.comment,await a.nextTick(),(H=(B=u.value)==null?void 0:B.editor)==null||H.chain().focus("end").run(),s.value=!1;const D=document.getElementById(`comment-${n.id}`);D&&!Ht.md&&D.scrollIntoView({block:"center",behavior:"smooth"})},E=()=>{s.value=!s.value},O=D=>{D.event()},x=async()=>{s.value=!1,await n.onUpdateComment({event:"update-pin",value:!n.pinned})},N=async()=>{await n.onUpdateComment({event:"update-comment",value:o.value})};return a.watch(()=>n.processing,D=>{var B,H,V;D||(i.value=!1,o.value="",c.value=!1,u.value&&u.value.allowAttachments&&((V=(H=(B=u.value)==null?void 0:B.fileUploadRef)==null?void 0:H.fileUpload)==null||V.clear(),u.value.uploadedfiles=[]))}),{menuActions:t,activeAttachment:r,editMode:i,editText:o,showControls:s,warningAction:l,warningModal:c,warningType:d,wysiwygRef:u,allowedActions:f,displayName:h,formatDate:p,userInitials:g,onClickCancel:b,onClickCopyLink:y,onClickDeleteAttachment:w,onClickDeleteAttachmentConfirm:v,onClickDeleteComment:k,onClickDeleteCommentConfirm:C,onClickDeleteConfirm:A,onClickEditComment:S,onClickMenu:E,onClickMobileMenuLink:O,onClickSave:N,mq:Ht}}}),Ore=["id"],Dre={class:"flex items-start mb-1"},Nre={class:"grow"},Pre={class:"w-full block text-sm leading-4 font-bold"},Lre={class:"text-inkwell-0 text-xs leading-4 block"},Bre={class:"w-full py-1"},_re=["onClick"],Rre={key:2},Vre={key:1,class:"pl-[3rem]"},$re={class:"h-8 flex items-center"},Fre={key:2};function jre(n,e,t,r,i,o){const s=a.resolveComponent("q-avatar"),l=a.resolveComponent("q-icon"),c=a.resolveComponent("q-popover"),d=a.resolveComponent("q-menu"),u=a.resolveComponent("q-button"),f=a.resolveComponent("q-wysiwyg"),h=a.resolveComponent("q-image-gallery"),p=a.resolveComponent("q-warning-modal");return n.comment||n.attachments.length?(a.openBlock(),a.createElementBlock("div",{key:0,id:`comment-${n.id}`,class:a.normalizeClass(["comment-container flex flex-col mb-3 py-2",{"-mx-2 px-2 rounded-lg bg-yellow-0":n.pinned}])},[a.createElementVNode("div",Dre,[n.showAvatar?(a.openBlock(),a.createBlock(s,{key:0,src:n.user.profileImg,text:n.userInitials,class:"mr-4"},null,8,["src","text"])):a.createCommentVNode("",!0),a.createElementVNode("div",Nre,[a.createElementVNode("span",Pre,a.toDisplayString(n.user.name),1),a.createElementVNode("span",Lre,a.toDisplayString(n.dateLocal||n.formatDate),1)]),n.allowedActions.length&&n.mq.md?(a.openBlock(),a.createBlock(c,{key:1,modelValue:n.showControls,"onUpdate:modelValue":e[0]||(e[0]=g=>n.showControls=g),align:"right",position:"bottom",size:"sm"},{trigger:a.withCtx(()=>[a.createVNode(l,{icon:"ellipsis-h",type:"fill",class:a.normalizeClass(["shrink-0 cursor-pointer",n.showControls&&"!text-blue-20"]),color:"gray-40",onClick:n.onClickMenu},null,8,["class","onClick"])]),content:a.withCtx(()=>[a.createElementVNode("ul",Bre,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.allowedActions,(g,b)=>(a.openBlock(),a.createElementBlock("li",{key:b,class:a.normalizeClass(g.classes),onClick:y=>g.event(y)},a.toDisplayString(g.text),11,_re))),128))])]),_:1},8,["modelValue"])):a.createCommentVNode("",!0),n.allowedActions.length&&!n.mq.md?(a.openBlock(),a.createElementBlock("div",Rre,[a.createVNode(l,{icon:"ellipsis-h",type:"fill",class:"shrink-0 cursor-pointer",color:"gray-40",onClick:n.onClickMenu},null,8,["onClick"]),a.createVNode(a.Transition,{name:"fade"},{default:a.withCtx(()=>[n.showControls?(a.openBlock(),a.createBlock(d,{key:0,modelValue:n.showControls,"onUpdate:modelValue":e[1]||(e[1]=g=>n.showControls=g),actions:n.menuActions,links:n.allowedActions,"links-background":"light-gray","onClick:link":n.onClickMobileMenuLink,"onClick:action":n.onClickMenu},null,8,["modelValue","actions","links","onClick:link","onClick:action"])):a.createCommentVNode("",!0)]),_:1})])):a.createCommentVNode("",!0)]),n.editMode?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["leading-normal text-sm",{"ml-12":n.showAvatar}])},[a.createElementVNode("p",null,a.toDisplayString(n.comment),1)],2)),n.editMode?(a.openBlock(),a.createElementBlock("div",Vre,[a.createVNode(f,{ref:"wysiwygRef",modelValue:n.editText,"onUpdate:modelValue":e[2]||(e[2]=g=>n.editText=g),"is-stacked":!0},{action:a.withCtx(()=>[a.createElementVNode("div",$re,[a.createVNode(u,{disabled:n.processing,status:"link",class:"!text-gray-40 mr-4 hover:!text-inkwell-0 hover:!no-underline",onClick:n.onClickCancel},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_CANCEL")),1)]),_:1},8,["disabled","onClick"]),a.createVNode(u,{disabled:n.processing,loading:n.processing,class:"text-xs hover:!text-blue-40 hover:!no-underline",status:"link",onClick:n.onClickSave},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_SAVE")),1)]),_:1},8,["disabled","loading","onClick"])])]),_:1},8,["modelValue"])])):(a.openBlock(),a.createElementBlock("div",Fre,[n.attachments.length?(a.openBlock(),a.createBlock(h,{key:0,class:a.normalizeClass(["mt-3",{"ml-12":n.showAvatar}]),files:n.attachments,"onClick:file":n.attachmentClickEvent,"onDownload:file":n.onDownloadFile,"onUpdate:modelValue":n.onClickDeleteAttachment},null,8,["class","files","onClick:file","onDownload:file","onUpdate:modelValue"])):a.createCommentVNode("",!0)])),a.createVNode(p,{id:"warning-modal",action:n.onClickDeleteConfirm,"onUpdate:action":e[3]||(e[3]=g=>n.onClickDeleteConfirm=g),toggle:n.warningModal,"onUpdate:toggle":[e[4]||(e[4]=g=>n.warningModal=g),e[5]||(e[5]=g=>n.warningModal=!1)],processing:n.processing},{desktopHeader:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t(n.warningType==="comment"?"HC_WARNING_CONFIRM_DELETE_COMMENT":"HC_ARE_YOU_SURE_DELETE_ATTACHMENT")),1)]),desktopMessage:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t(n.warningType==="comment"?"HC_CLICK_DELETE_COMMENT_NO_LONGER_SEE":"HC_CLICK_DELETE_ATTACHMENT_NO_LONGER_SEE")),1)]),mobileHeader:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t(n.warningType==="comment"?"HC_DELETE_COMMENT":"HC_ARE_YOU_SURE_DELETE_ATTACHMENT")),1)]),mobileMessage:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t(n.warningType==="comment"?"HC_WARNING_CONFIRM_DELETE_COMMENT":"HC_CLICK_DELETE_ATTACHMENT_NO_LONGER_SEE")),1)]),buttonText:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t(n.warningType==="comment"?"HC_DELETE_COMMENT":"HC_DELETE_ATTACHMENT")),1)]),_:1},8,["action","toggle","processing"])],10,Ore)):a.createCommentVNode("",!0)}const uI=ke(xre,[["render",jre],["__scopeId","data-v-8f8b7386"]]),zre=a.defineComponent({name:"QCommentSection",components:{QComment:uI,QWysiwyg:Y8},props:{comments:{type:Array,default:()=>[]},allowAttachments:{type:Boolean,default:!1},allowEmojis:{type:Boolean,default:!1},allowFormatting:{type:Boolean,default:!1},addCommentEvent:{type:Function,default:()=>{}},disabled:{type:Boolean,default:!1},filesAllowed:{type:String,default:"image/*,.pdf"},updateCommentEvent:{type:Function,default:()=>{}},placeholder:{type:String,default:""},processing:{type:Boolean,default:!1},showRemoveButton:{type:Object,default:()=>{}},onDownloadFile:{type:Function,default:()=>{}}},setup(n){const{t:e}=ro(),t=a.ref([]),r=a.ref(""),i=a.ref(n.placeholder||e("HC_ADD_A_COMMENT")),o=a.ref(),s=async()=>{await n.addCommentEvent({text:r.value,attachments:t.value})},l=async(c,d)=>{await n.updateCommentEvent({comment:c,...d})};return a.watch(()=>n.processing,c=>{var d,u;c||(t.value=[],r.value="",o.value&&o.value.allowAttachments&&((u=(d=o.value.fileUploadRef)==null?void 0:d.fileUpload)==null||u.clear(),o.value.uploadedfiles=[]))}),{files:t,placeholderText:i,textareaValue:r,wysiwygRef:o,onClickPost:s,onUpdateComment:l}}}),Hre={class:"comment-section"},Ure={key:0,class:"comments"},Zre={key:1,class:"no-comments text-center mb-6 mt-4"},Wre={class:"text-md mb-2 leading-6 font-bold text-inkwell-30"},qre={class:"text-sm text-inkwell-0"};function Gre(n,e,t,r,i,o){const s=a.resolveComponent("q-comment"),l=a.resolveComponent("q-button"),c=a.resolveComponent("q-wysiwyg");return a.openBlock(),a.createElementBlock("div",Hre,[n.comments&&n.comments.length?(a.openBlock(),a.createElementBlock("div",Ure,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.comments,(d,u)=>(a.openBlock(),a.createBlock(s,a.mergeProps({ref_for:!0},d,{key:u,"on-update-comment":f=>n.onUpdateComment(d,f),"on-download-file":n.onDownloadFile}),null,16,["on-update-comment","on-download-file"]))),128))])):(a.openBlock(),a.createElementBlock("div",Zre,[a.createElementVNode("h4",Wre,a.toDisplayString(n.$t("HC_NO_COMMENTS_YET")),1),a.createElementVNode("p",qre,a.toDisplayString(n.$t("HC_START_THE_CONVERSATION")),1)])),a.renderSlot(n.$slots,"default",{},()=>[a.createVNode(c,{ref:"wysiwygRef",modelValue:n.textareaValue,"onUpdate:modelValue":[e[0]||(e[0]=d=>n.textareaValue=d),e[2]||(e[2]=d=>n.textareaValue=d)],attachments:n.files,disabled:n.disabled,"is-stacked":!0,"allow-attachments":n.allowAttachments,"allow-emojis":n.allowEmojis,"allow-formatting":n.allowFormatting,"files-allowed":n.filesAllowed,placeholder:n.placeholderText,processing:n.processing,"onUpdate:attachments":e[1]||(e[1]=d=>n.files=d)},{action:a.withCtx(()=>[a.createVNode(l,{loading:n.processing,disabled:n.processing||!n.files.length&&!n.textareaValue||n.disabled,status:"link",class:"hover:text-blue-40 hover:no-underline",onClick:n.onClickPost},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_POST")),1)]),_:1},8,["loading","disabled","onClick"])]),_:1},8,["modelValue","attachments","disabled","allow-attachments","allow-emojis","allow-formatting","files-allowed","placeholder","processing"])],!0)])}const Kre=ke(zre,[["render",Gre],["__scopeId","data-v-8e57dc76"]]),Yre=a.defineComponent({name:"QCounter",props:{modelValue:{type:Number,default:0},min:{type:Number,default:0},max:{type:Number,default:100},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:e}){return{updateCount:r=>{let o=n.modelValue+r;return o>n.max?o=n.max:o<n.min&&(o=n.min),e("update:modelValue",o),o}}}}),Qre={class:"counter flex items-center"},Xre={class:"grow text-center"};function Jre(n,e,t,r,i,o){const s=a.resolveComponent("q-icon");return a.openBlock(),a.createElementBlock("div",Qre,[a.createVNode(s,a.mergeProps({icon:"minus-circle",type:"outline",size:"sm",color:"inkwell-30",class:"cursor-pointer mr-1"},{[a.toHandlerKey(!n.disabled&&"click")]:e[0]||(e[0]=l=>n.updateCount(-1))}),null,16),a.createElementVNode("span",Xre,a.toDisplayString(n.modelValue),1),a.createVNode(s,a.mergeProps({icon:"circle-plus",type:"outline",size:"sm",color:"inkwell-30",class:"cursor-pointer ml-1"},{[a.toHandlerKey(!n.disabled&&"click")]:e[1]||(e[1]=l=>n.updateCount(1))}),null,16)])}const eie=ke(Yre,[["render",Jre]]),fI="eye",hI="eye-slash",tie=a.defineComponent({name:"QInput",inheritAttrs:!1,props:{modelValue:{type:[Number,Object,String],default:""},type:{type:String,default:"text",validator:n=>["email","number","password","phone","search","text"].includes(n)},placeholder:{type:String,default:""},maxlength:{type:Number,default:null},size:{type:String,default:"md"},status:{type:String,default:""},controlClass:{type:String,default:""},inputClass:{type:String,default:""},disabled:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},hideClear:{type:Boolean,default:!1},iconPosition:{type:String,default:"right"}},emits:["update:model-value","update-type"],setup(n,{emit:e}){const t=a.useSlots(),r=a.ref(null),i=a.ref(!1),o=a.ref(n.type==="password"?fI:""),s=a.computed(()=>!!n.disabled),l=a.computed(()=>{const g=o.value;return!!n.modelValue&&!s.value&&(u.value&&n.iconPosition==="left"||!g)}),c=a.computed(()=>["control flex items-center",{focused:!!i.value},{disabled:s.value},{[n.status]:n.status&&!s.value},{[`has-icon-${n.iconPosition}`]:!!n.iconPosition},n.controlClass,{["size-"+n.size]:n.size}]),d=a.computed(()=>["input",{[n.status]:n.status&&!s.value},{[n.inputClass]:!!n.inputClass},{populated:!!n.modelValue}]),u=a.computed(()=>!!(t!=null&&t.default)),f=()=>{const g=n.type==="password",b=n.type==="text"&&o.value===hI;(g||b)&&h()},h=()=>{const g=n.type==="text"?"password":"text";o.value=g==="text"?hI:fI,e("update-type",g)};return{currentInput:r,focused:i,icon:o,rootClasses:c,inputClasses:d,isDisabled:s,showClearIcon:l,isSlotAvailable:u,onClickIcon:f,togglePasswordVisibility:h,updateValue:g=>{e("update:model-value",g.target.value)},mq:Ht}}}),nie=["id","type","disabled","autocomplete","maxlength","value","placeholder"];function rie(n,e,t,r,i,o){const s=a.resolveComponent("q-icon");return a.openBlock(),a.createElementBlock("div",{ref:"currentInput",class:a.normalizeClass(n.rootClasses)},[a.createElementVNode("input",a.mergeProps({id:String(n.$attrs.id),ref:String(n.$attrs.id),type:n.type,disabled:n.isDisabled,class:n.inputClasses,autocomplete:n.autocomplete,maxlength:n.maxlength,value:n.modelValue,placeholder:n.placeholder},n.$attrs,{onInput:e[0]||(e[0]=l=>n.updateValue(l)),onFocusin:e[1]||(e[1]=l=>n.focused=!n.focused),onFocusout:e[2]||(e[2]=l=>n.focused=!n.focused),onBlur:e[3]||(e[3]=l=>n.focused=!0)}),null,16,nie),n.isSlotAvailable||n.icon?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["flex",{"order-first pr-2":n.iconPosition==="left"}])},[a.renderSlot(n.$slots,"default",a.normalizeProps(a.guardReactiveProps({icon:n.icon,onClickIcon:n.onClickIcon})),()=>[a.createVNode(s,{icon:n.icon,size:"md",class:"cursor-pointer",onClick:n.onClickIcon},null,8,["icon","onClick"])],!0)],2)):a.createCommentVNode("",!0),n.showClearIcon&&!n.hideClear?(a.openBlock(),a.createElementBlock("div",{key:1,class:"close cursor-pointer flex order-3",onClick:e[4]||(e[4]=l=>n.$emit("update:model-value","")),onMousedown:e[5]||(e[5]=a.withModifiers(()=>{},["prevent"]))},[n.mq.md?(a.openBlock(),a.createBlock(s,{key:0,icon:"close",size:"sm",type:"line"})):(a.openBlock(),a.createBlock(s,{key:1,icon:"delete-circle",color:"inkwell-0",size:"md",type:"fill"}))],32)):a.createCommentVNode("",!0)],2)}const pI=ke(tie,[["render",rie],["__scopeId","data-v-320db1d7"]]),yc=(n,e,t,r,i,o=[],s=!0)=>{const l=t;if(e||l&&l.length){let c=s;n=n.filter(d=>{if(l&&l.length){const u=[];l.forEach(h=>{let p=h.selected;if(!p||!p.length){u.push(s);return}const g=h.key,b=h.attribute||"id";Array.isArray(p)||(p=[p]);let y=!1;p.forEach(w=>{const v=w&&w.key?w.key:g;if(w&&v){const C=v.split(/\./),A=C[0],S=C[1]||null,E=w[b],O=d[A];!S&&(typeof E!="boolean"&&Array.isArray(O)&&!O.find(x=>x[b]===E)||typeof E!="boolean"&&!Array.isArray(O)&&O!==E||typeof E=="boolean"&&typeof O!="boolean"&&!!O!==E||typeof E=="boolean"&&typeof O=="boolean"&&O!==E)||S&&(typeof E=="object"&&Array.isArray(O[S])&&!O[S].find(x=>x[b]===E)||typeof E!="boolean"&&!Array.isArray(O[S])&&O[S]!==E||typeof E=="boolean"&&typeof O[S]!="boolean"&&!!O[S]!==E||typeof E=="boolean"&&typeof O[S]=="boolean"&&O[S]!==E)||(y=!0)}}),u.push(y)});const f=u.filter(h=>!!h).length;if(u.length===0||f!==u.length)return!1}if(e){if(typeof d=="string")return String(d).toLocaleLowerCase().includes(e.toLocaleLowerCase());c=Object.keys(d).some(u=>o.includes(u)?!1:typeof d[u]=="object"&&d[u]?Object.keys(d[u]).some(f=>o.includes(f)?!1:String(d[u][f]).toLocaleLowerCase().includes(e.toLocaleLowerCase())):String(d[u]).toLocaleLowerCase().includes(e.toLocaleLowerCase()))}return c})}return r&&(n=n.sort((c,d)=>{if(c===null||c==="")return 1;if(d===null||d==="")return-1;if(r.includes(".")){const u=r.split(".")[0],f=r.split(".")[1];if(c[u]===null||c[u]==="")return 1;if(d[u]===null||d[u]==="")return-1;c=c[u][f],d=d[u][f]}else c=c[r],d=d[r];return typeof c=="string"&&typeof d=="string"&&(c=c.toLowerCase(),d=d.toLowerCase()),typeof c!="string"&&typeof d!="string"&&(c=parseInt(c),d=parseInt(d)),typeof c=="number"&&typeof d=="string"?-1*i:typeof d=="number"&&typeof c=="string"?1*i:(c===d?0:c>d?1:-1)*i})),n},iie=a.defineComponent({name:"QDataFilter",components:{QBadge:Ho,QIcon:kl,QInput:pI,QTooltip:V2,QPopover:P6},props:{data:{type:Array,default:()=>[]},id:{type:String,default:""},excludedFields:{type:Array,default:()=>[]},filters:{type:Array,default:()=>[]},hasSearch:{type:Boolean,default:!0},orderBy:{type:String,default:"asc"},search:{type:String,default:""},searchDelay:{type:Number,default:300},searchPlaceholder:{type:String,default:""},showResultsCount:{type:Boolean,default:!1},sortBy:{type:String,default:"name"},noneEqualsAll:{type:Boolean,default:!0}},emits:["update:data","update:search","click:filters"],setup(n,{emit:e}){const t=y5(d=>{e("update:search",d)},n.searchDelay),r=$l(),i=a.ref(0),o=a.ref(!1),s=a.computed(()=>{let d=0;return n.filters.forEach(u=>{(typeof u.selected=="string"&&u.selected||typeof u.selected!="string"&&u.selected.length)&&d++}),d}),l=()=>{o.value=!1},c=d=>{d(),e("click:filters")};return a.watch(n,()=>{const d=yc(n.data,n.search,n.filters,n.sortBy,n.orderBy==="desc"?-1:1,n.excludedFields,n.noneEqualsAll);i.value=d.length,e("update:data",d)},{deep:!0}),{debouncedSearch:t,filteredCount:i,showFilterPopover:o,closePopover:l,onFilterClick:c,filtersCount:s,deviceType:r,filterData:yc,mq:Ht}}}),oie=["id"],sie={class:"search grow"},aie={class:"search-label flex items-center",for:"search"},lie={class:"results-count mx-1 shrink-0 text-xs text-gray-40 capitalize"},cie={key:1,class:"filters shrink-0 h-6"},die={class:"flex relative"},uie={class:"!text-blue-20 text-tiny font-bold"},fie={class:"flex relative"},hie={class:"!text-blue-20 text-tiny font-bold"},pie={key:2,class:"actions shrink-0 flex items-center h-6"};function mie(n,e,t,r,i,o){var f;const s=a.resolveComponent("q-icon"),l=a.resolveComponent("q-input"),c=a.resolveComponent("q-badge"),d=a.resolveComponent("q-tooltip"),u=a.resolveComponent("q-popover");return a.openBlock(),a.createElementBlock("div",{id:n.id,class:"data-filter flex items-center p-4 bg-white"},[a.createElementVNode("div",sie,[n.hasSearch?a.renderSlot(n.$slots,"search",{key:0},()=>[a.createElementVNode("label",aie,[a.createVNode(s,{class:"mr-2 shrink-0",color:"gray-40",icon:"search",size:"md",type:""}),a.createVNode(l,{id:"search","model-value":n.search,"hide-clear":n.mq.md,placeholder:n.searchPlaceholder||n.$t("HC_SEARCH"),class:"text-base grow","control-class":"!border-0 !px-0",size:"xxs","onUpdate:modelValue":n.debouncedSearch},null,8,["model-value","hide-clear","placeholder","onUpdate:modelValue"])])],!0):a.createCommentVNode("",!0)]),n.showResultsCount?a.renderSlot(n.$slots,"resultsCount",{key:0},()=>[a.createElementVNode("div",lie,a.toDisplayString(n.filteredCount===1?"1 "+n.$t("HC_RESULT"):n.$t("HC_X_RESULTS",{count:n.filteredCount})),1)],!0):a.createCommentVNode("",!0),a.renderSlot(n.$slots,"beforeFilters",{},void 0,!0),(f=n.filters)!=null&&f.length?(a.openBlock(),a.createElementBlock("div",cie,[a.renderSlot(n.$slots,"filters",a.normalizeProps(a.guardReactiveProps({filtersCount:n.filtersCount})),()=>[n.$slots.filterContent?(a.openBlock(),a.createBlock(u,{key:0,modelValue:n.showFilterPopover,"onUpdate:modelValue":e[0]||(e[0]=h=>n.showFilterPopover=h),position:"bottom",align:"right",trigger:"click",size:"lg"},{trigger:a.withCtx(({onClick:h})=>[a.createVNode(d,{class:"z-[45] ml-2"},{trigger:a.withCtx(()=>[a.createElementVNode("div",die,[a.createVNode(s,{class:"filters-icon ml-0 cursor-pointer",color:"gray-40",icon:"filter",size:"md",onClick:p=>n.onFilterClick(h)},null,8,["onClick"]),n.filtersCount?(a.openBlock(),a.createBlock(c,{key:0,class:a.normalizeClass(["filters-count absolute !h-4 !w-4","-top-[0.3125rem] -right-[0.375rem]"]),color:"white"},{text:a.withCtx(()=>[a.createElementVNode("span",uie,a.toDisplayString(n.filtersCount),1)]),_:1})):a.createCommentVNode("",!0)])]),content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_FILTERS")),1)]),_:2},1024)]),content:a.withCtx(()=>[a.renderSlot(n.$slots,"filterContent",a.normalizeProps(a.guardReactiveProps({closePopover:n.closePopover})),void 0,!0)]),_:3},8,["modelValue"])):(a.openBlock(),a.createBlock(d,{key:1,class:"z-[45] ml-2"},{trigger:a.withCtx(()=>[a.createElementVNode("div",fie,[a.createVNode(s,{class:"filters-icon ml-0 cursor-pointer",color:"gray-40",icon:"filter",size:"md",onClick:e[1]||(e[1]=h=>n.$emit("click:filters"))}),n.filtersCount?(a.openBlock(),a.createBlock(c,{key:0,class:a.normalizeClass(["filters-count absolute !h-4 !w-4","-top-[0.3125rem] -right-[0.375rem]"]),color:"white"},{text:a.withCtx(()=>[a.createElementVNode("span",hie,a.toDisplayString(n.filtersCount),1)]),_:1})):a.createCommentVNode("",!0)])]),content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(n.$t("HC_FILTERS")),1)]),_:1}))],!0)])):a.createCommentVNode("",!0),n.$slots.actions?(a.openBlock(),a.createElementBlock("div",pie,[a.renderSlot(n.$slots,"actions",{},void 0,!0)])):a.createCommentVNode("",!0)],8,oie)}const mI=ke(iie,[["render",mie],["__scopeId","data-v-f156f45e"]]),gie=a.defineComponent({name:"QDataList",components:{QBadge:Ho,QDataFilter:mI},props:{id:{type:String,default:"data-list"},modelValue:{type:Array,default:()=>[]},hideSearch:{type:Boolean,default:!1},hasSearch:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!1},itemsPerPage:{type:Number,default:50},loading:{type:Boolean,default:!1},noResultMessage:{type:String,default:""},skeletonRows:{type:Number,default:6},type:{type:String,default:"row"}},emits:["filters-action","page-updated","click:list-item"],setup(n,{emit:e}){const{deviceType:t}=$l(),{y:r}=b5(),{y:i}=Xh(window,{behavior:"smooth"}),o=a.ref(0),s=a.ref("down"),l=a.ref(null),c=a.ref(0),d=a.ref(!1),u=a.ref(!0),f=a.ref(Ht.md?!1:n.hideSearch),h=a.ref(!f.value),p={type:"keyframe",ease:"linear",duration:0,delay:0},g=a.ref(null),b=a.ref(1),y=a.ref(null),w=a.ref(window.innerHeight),{motionProperties:v}=lp(g),{push:k}=ap(),C=a.computed(()=>t.value==="desktop"),A=a.computed(()=>b.value*n.itemsPerPage-1),S=a.computed(()=>r.value<=0?70:r.value>70?0:70-r.value),E=a.computed(()=>{var V;return Math.ceil(((V=n.modelValue)==null?void 0:V.length)/n.itemsPerPage)||1}),O=V=>{!V.dragging&&r.value<=24&&r.value>=0&&(i.value=0),!V.dragging&&r.value>24&&r.value<70&&(i.value=70),!(r.value>0)&&(d.value?N(V):x(V))};f.value&&l5(O,{domTarget:g,filterTaps:!0,useTouch:!0,delay:100});const x=V=>{V.tap||V.axis==="x"||(d.value=!0)},N=V=>{if(V.tap||V.axis==="x")return;const U=V.direction[1],Z=U>=0,R=U<=0&&r.value<=0;!h.value&&(Z||R)&&B(!R,"drag"),d.value=!1},D=async()=>{const V=r.value+w.value,U=l.value.offsetTop+l.value.offsetHeight;V>U-400&&b.value<E.value&&(b.value++,e("page-updated"))},B=async(V,U)=>{if(h.value=V,await a.nextTick(),u.value&&s.value==="up"&&r.value<=0||U==="drag"){const Z=S.value?S.value:0;k("y",Z,v,p),u.value=!1}},H=()=>{const V=Math.max(0,r.value)>o.value?"down":"up";V!==s.value&&(s.value=V),r.value<70&&B(!0,"scroll"),o.value=Math.max(0,r.value),D()};return a.onMounted(()=>{f.value?(c.value=g.value.offsetTop-16,window.addEventListener("scroll",H)):window.addEventListener("scroll",D),window.addEventListener("resize",async()=>{w.value=window.innerHeight,await a.nextTick()})}),a.onUnmounted(()=>{f.value?window.removeEventListener("scroll",H):window.removeEventListener("scroll",D)}),{dataListRef:l,defaultSearchTop:c,isDragging:d,isSearchVisible:h,hiddenSearch:f,listRef:g,page:b,prevScrollY:o,scrollY:r,scrollToY:i,searchRef:y,windowHeight:w,direction:s,isDesktop:C,lastOnPage:A,searchHeight:S,totalPages:E,onScroll:H,scrollWatcher:D,toggleSearch:B,deviceType:t,mq:Ht}}}),yie=["id"],bie=["id"],wie=["id"],vie=["id"],Cie=["id"],kie=["id"],Sie=["id"],Mie=["id","onClick"],Eie={key:1,class:"list ordered-list"},Aie=["id","onClick"],Tie=["id"],Iie={key:1,class:"list-wrapper"},xie=["id"],Oie=["id"];function Die(n,e,t,r,i,o){return a.openBlock(),a.createElementBlock("div",{id:n.id,class:a.normalizeClass(["q-data-list",{"has-data-filter":!!n.$slots.dataFilter,"has-no-results":!n.modelValue.length,"is-device":!n.isDesktop,"is-fixed":n.isFixed,"is-loading":n.loading}]),ref:"dataListRef"},[n.hasSearch?a.renderSlot(n.$slots,"search-and-filters",{key:0},()=>[a.createElementVNode("div",{ref:"searchRef",id:`${n.id?n.id+"-":""}search-and-filters`,class:a.normalizeClass(["data-filter-wrapper search-and-filters",{"fixed right-0 left-0 top-0 pt-4 pl-4 pr-4 z-10 bg-white overflow-hidden":n.hiddenSearch},{"is-shown border-b border-gray-20":n.hiddenSearch&&n.isSearchVisible},{"!hidden h-px":n.hiddenSearch&&n.searchHeight<=16}]),style:a.normalizeStyle([n.hiddenSearch&&n.searchHeight>=0?`height: ${n.searchHeight}px;`:"",`top: ${n.defaultSearchTop}px;`])},[n.$slots.dataFilter?(a.openBlock(),a.createElementBlock("div",{key:0,id:`${n.id?n.id+"-":""}data-filter-container`,class:"data-filter-container mb-4"},[a.renderSlot(n.$slots,"dataFilter",{},void 0,!0)],8,wie)):(a.openBlock(),a.createElementBlock("div",{key:1,id:`${n.id?n.id+"-":""}data-filter-loading`,class:"data-filter-container loading-state"},e[0]||(e[0]=[a.createElementVNode("div",{class:"loading-search animate-shimmer bg-gray-10"},null,-1),a.createElementVNode("div",{class:"loading-filters animate-shimmer bg-gray-30"},null,-1)]),8,vie)),a.renderSlot(n.$slots,"search-separator",{},()=>[a.createElementVNode("hr",{class:a.normalizeClass(["search-separator",{"!mb-0 hidden":n.hiddenSearch}])},null,2)],!0)],14,bie)],!0):a.createCommentVNode("",!0),a.createElementVNode("div",{ref:"listRef",id:`${n.id?n.id+"-":""}outer-wrapper`,class:"outer-list-wrapper select-none"},[n.loading?(a.openBlock(),a.createElementBlock("div",Iie,[a.createElementVNode("ul",{id:`${n.id?n.id+"-":""}loading-list`,class:"list loading-list"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.skeletonRows,s=>(a.openBlock(),a.createElementBlock("li",{key:s,id:`${n.id?n.id+"-":""}loading-list-li-${s}`,class:"list-item"},e[1]||(e[1]=[a.createElementVNode("div",{class:"animate-shimmer bg-gray-30 loading-top mb-3"},null,-1),a.createElementVNode("div",{class:"animate-shimmer bg-gray-10 loading-bottom"},null,-1)]),8,Oie))),128))],8,xie)])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[n.modelValue.length?(a.openBlock(),a.createElementBlock("div",{key:0,id:`${n.id?n.id+"-":""}wrapper`,class:"list-wrapper"},[n.type!=="ordered"?(a.openBlock(),a.createElementBlock("ul",{key:0,id:`${n.id?n.id+"-":""}ul`,class:a.normalizeClass(["list",`${n.type}-list`])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.totalPages,s=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:s},[s<=n.page?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(n.modelValue.slice((s-1)*n.itemsPerPage,(s-1)*n.itemsPerPage+n.itemsPerPage),(l,c)=>(a.openBlock(),a.createElementBlock("li",{id:`${n.id?n.id+"-":""}li-${(s-1)*n.itemsPerPage+c}`,key:c,class:"list-item",onClick:d=>n.$emit("click:list-item",l)},[a.renderSlot(n.$slots,"listItem",a.mergeProps({ref_for:!0},{data:l}),()=>[a.createTextVNode(a.toDisplayString(l),1)],!0)],8,Mie))),128)):a.createCommentVNode("",!0)],64))),128))],10,Sie)):(a.openBlock(),a.createElementBlock("ol",Eie,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.totalPages,s=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:s},[s<=n.page?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(n.modelValue.slice((s-1)*n.itemsPerPage,(s-1)*n.itemsPerPage+n.itemsPerPage),(l,c)=>(a.openBlock(),a.createElementBlock("li",{id:`${n.id?n.id+"-":""}li-${(s-1)*n.itemsPerPage+c}`,key:c,class:"list-item",onClick:d=>n.$emit("click:list-item",l)},[a.renderSlot(n.$slots,"listItem",a.mergeProps({ref_for:!0},{data:l}),()=>[a.createTextVNode(a.toDisplayString(l),1)],!0)],8,Aie))),128)):a.createCommentVNode("",!0)],64))),128))]))],8,kie)):(a.openBlock(),a.createElementBlock("div",{key:1,id:`${n.id?n.id+"-":""}no-results`,class:"no-results"},[a.renderSlot(n.$slots,"no-results",{},()=>[a.createElementVNode("p",null,a.toDisplayString(n.noResultMessage||n.$t("HC_NO_RESULTS_FOUND")),1)],!0)],8,Tie))],64))],8,Cie)],10,yie)}const Nie=ke(gie,[["render",Die],["__scopeId","data-v-aedd5d55"]]),Pie=a.defineComponent({name:"QTableCell",props:{id:{type:String,default:""},align:{type:String,default:"left"},isColumnHeader:{type:Boolean,default:!1},sortable:{Boolean,default:!1}},setup(){return{}}}),Lie=["id","align"],Bie=["id","align"];function _ie(n,e,t,r,i,o){return n.isColumnHeader?(a.openBlock(),a.createElementBlock("th",{key:0,id:n.id?`${n.id.toString().toLowerCase()}-th`:"",align:n.align,class:a.normalizeClass({"cursor-pointer":n.sortable})},[a.renderSlot(n.$slots,"default",{},void 0,!0)],10,Lie)):(a.openBlock(),a.createElementBlock("td",{key:1,id:n.id?`${n.id.toString().toLowerCase()}-td`:"",align:n.align},[a.renderSlot(n.$slots,"default",{},void 0,!0)],8,Bie))}const Q8=ke(Pie,[["render",_ie],["__scopeId","data-v-b1f22bf6"]]),Rie=a.defineComponent({name:"QTableHead",components:{QTableCell:Q8},props:{id:{type:String,default:""},columns:{type:Array,default:()=>[]},rowCount:{type:Number,default:0},scrollable:{type:Boolean,default:!1},scrollableContainerX:{type:Number,default:0},scrollMax:{type:Number,default:0},thClasses:{type:String,default:""}},setup(){return{}}}),Vie=["id"],$ie=["id"];function Fie(n,e,t,r,i,o){const s=a.resolveComponent("q-table-cell");return a.openBlock(),a.createElementBlock("thead",{id:`${n.id?n.id+"-":""}thead`},[a.createElementVNode("tr",{id:`${n.id?n.id+"-":""}thead-tr`,class:"bg-gray-7"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.columns,(l,c)=>(a.openBlock(),a.createBlock(s,{id:l.key?(n.id?n.id+"-":"")+l.key:l?(n.id?n.id+"-":"")+l:(n.id?n.id+"-":"")+c,"is-column-header":!0,key:c,class:a.normalizeClass([l.key,n.thClasses,`cell-${l.size||"md"}`,{"sticky left-0 bg-gray-7 z-20":l.frozen,"text-right":l.key==="actions","left-auto right-0":l.key==="actions"&&l.frozen,"shadow-right":l.frozen&&n.rowCount&&c===0&&n.scrollable&&n.scrollableContainerX>0,"shadow-left":l.frozen&&n.rowCount&&c===n.columns.length-1&&n.scrollable&&n.scrollableContainerX<n.scrollMax}]),sortable:l.sortable,onClick:d=>n.$emit("click:th",l)},{default:a.withCtx(()=>[a.renderSlot(n.$slots,`head(${l.key||l})`,{},()=>[a.createTextVNode(a.toDisplayString(typeof l=="string"?l:l.name),1)],!0)]),_:2},1032,["id","class","sortable","onClick"]))),128))],8,$ie)],8,Vie)}const gI=ke(Rie,[["render",Fie],["__scopeId","data-v-f3272e4a"]]),yI="data:image/svg+xml,%3csvg%20width='118'%20height='99'%20viewBox='0%200%20118%2099'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M104.165%2059.815C107.107%2062.7762%20108.893%2066.692%20109.201%2070.8549C109.508%2075.0179%20108.317%2079.1536%20105.842%2082.515L105.642%2082.782L105.412%2083.082L117.521%2095.245C117.828%2095.5546%20118%2095.973%20118%2096.409C118%2096.845%20117.828%2097.2634%20117.521%2097.573C117.232%2097.8651%20116.844%2098.0376%20116.434%2098.0561C116.023%2098.0746%20115.621%2097.9378%20115.307%2097.673L115.207%2097.573L103.122%2085.438L102.822%2085.682C99.4939%2088.3942%2095.2763%2089.772%2090.9889%2089.5476C86.7016%2089.3233%2082.6508%2087.5127%2079.624%2084.468C76.3686%2081.1921%2074.5414%2076.7614%2074.5414%2072.143C74.5414%2067.5247%2076.3686%2063.0939%2079.624%2059.818C81.2316%2058.2001%2083.1433%2056.916%2085.2491%2056.0397C87.3548%2055.1634%2089.6131%2054.7121%2091.8939%2054.7118C94.1747%2054.7115%2096.4331%2055.1622%2098.539%2056.0381C100.645%2056.9139%20102.557%2058.1975%20104.165%2059.815ZM81.935%2062.131C79.2951%2064.7964%2077.8142%2068.3961%2077.8142%2072.1475C77.8142%2075.8989%2079.2951%2079.4986%2081.935%2082.164C83.2368%2083.4792%2084.7865%2084.5233%2086.4944%2085.2358C88.2022%2085.9484%2090.0344%2086.3153%2091.885%2086.3153C93.7355%2086.3153%2095.5678%2085.9484%2097.2756%2085.2358C98.9835%2084.5233%20100.533%2083.4792%20101.835%2082.164C104.475%2079.4986%20105.956%2075.8989%20105.956%2072.1475C105.956%2068.3961%20104.475%2064.7964%20101.835%2062.131C100.533%2060.8158%2098.9835%2059.7717%2097.2756%2059.0592C95.5678%2058.3466%2093.7355%2057.9797%2091.885%2057.9797C90.0344%2057.9797%2088.2022%2058.3466%2086.4944%2059.0592C84.7865%2059.7717%2083.2368%2060.8158%2081.935%2062.131ZM31.4%2075.042V76.442C31.4001%2076.5544%2031.4224%2076.6656%2031.4656%2076.7694C31.5087%2076.8731%2031.5719%2076.9673%2031.6515%2077.0466C31.7311%2077.126%2031.8255%2077.1888%2031.9294%2077.2316C32.0333%2077.2744%2032.1446%2077.2963%2032.257%2077.296H72.357C72.5818%2078.1673%2072.8638%2079.0228%2073.201%2079.857H32.258C31.3506%2079.8589%2030.4796%2079.5003%2029.8366%2078.86C29.1935%2078.2198%2028.8311%2077.3504%2028.829%2076.443V75.043L31.4%2075.042ZM86.162%2022C87.0694%2021.9981%2087.9404%2022.3568%2088.5834%2022.997C89.2265%2023.6372%2089.5889%2024.5066%2089.591%2025.414V51.808C88.7243%2051.9101%2087.8652%2052.0684%2087.019%2052.282V25.414C87.0189%2025.3016%2086.9966%2025.1904%2086.9534%2025.0867C86.9103%2024.9829%2086.8471%2024.8887%2086.7675%2024.8094C86.6879%2024.7301%2086.5935%2024.6672%2086.4896%2024.6244C86.3857%2024.5816%2086.2744%2024.5597%2086.162%2024.56H25.429C25.3166%2024.5597%2025.2053%2024.5816%2025.1014%2024.6244C24.9975%2024.6672%2024.9031%2024.7301%2024.8235%2024.8094C24.7439%2024.8887%2024.6807%2024.9829%2024.6376%2025.0867C24.5944%2025.1904%2024.5721%2025.3016%2024.572%2025.414V69.587C24.5721%2069.6994%2024.5944%2069.8106%2024.6376%2069.9144C24.6807%2070.0181%2024.7439%2070.1123%2024.8235%2070.1916C24.9031%2070.271%2024.9975%2070.3338%2025.1014%2070.3766C25.2053%2070.4194%2025.3166%2070.4413%2025.429%2070.441H71.766C71.697%2071.2932%2071.6806%2072.1488%2071.717%2073.003H25.429C24.5216%2073.0049%2023.6506%2072.6463%2023.0076%2072.006C22.3645%2071.3658%2022.0021%2070.4964%2022%2069.589V25.414C22.0021%2024.5066%2022.3645%2023.6372%2023.0076%2022.997C23.6506%2022.3568%2024.5216%2021.9981%2025.429%2022H86.162ZM77.701%2054.948C77.8695%2054.9484%2078.0362%2054.982%2078.1918%2055.0468C78.3473%2055.1117%2078.4885%2055.2065%2078.6073%2055.3259C78.7262%2055.4453%2078.8204%2055.587%2078.8845%2055.7428C78.9486%2055.8986%2078.9814%2056.0655%2078.981%2056.234C78.9811%2056.2983%2078.9764%2056.3624%2078.967%2056.426C78.557%2056.7693%2078.159%2057.1327%2077.773%2057.516H77.701H34.374C34.0329%2057.516%2033.7058%2057.3805%2033.4647%2057.1393C33.2235%2056.8982%2033.088%2056.5711%2033.088%2056.23C33.088%2055.8889%2033.2235%2055.5618%2033.4647%2055.3207C33.7058%2055.0795%2034.0329%2054.944%2034.374%2054.944L77.701%2054.948ZM92.991%2028.859C93.8984%2028.8571%2094.7694%2029.2158%2095.4124%2029.856C96.0555%2030.4962%2096.4179%2031.3656%2096.42%2032.273V52.168C95.5725%2051.9753%2094.7133%2051.8377%2093.848%2051.756V32.273C93.8479%2032.1606%2093.8256%2032.0494%2093.7824%2031.9457C93.7393%2031.8419%2093.6761%2031.7477%2093.5965%2031.6684C93.5169%2031.5891%2093.4225%2031.5262%2093.3186%2031.4834C93.2147%2031.4406%2093.1034%2031.4187%2092.991%2031.419H91.291V28.858L92.991%2028.859ZM77.701%2046.375C78.0421%2046.375%2078.3692%2046.5105%2078.6103%2046.7517C78.8515%2046.9928%2078.987%2047.3199%2078.987%2047.661C78.987%2048.0021%2078.8515%2048.3292%2078.6103%2048.5703C78.3692%2048.8115%2078.0421%2048.947%2077.701%2048.947H34.374C34.0329%2048.947%2033.7058%2048.8115%2033.4647%2048.5703C33.2235%2048.3292%2033.088%2048.0021%2033.088%2047.661C33.088%2047.3199%2033.2235%2046.9928%2033.4647%2046.7517C33.7058%2046.5105%2034.0329%2046.375%2034.374%2046.375H77.701ZM59.983%2037.801C60.3241%2037.801%2060.6512%2037.9365%2060.8923%2038.1777C61.1335%2038.4188%2061.269%2038.7459%2061.269%2039.087C61.269%2039.4281%2061.1335%2039.7552%2060.8923%2039.9963C60.6512%2040.2375%2060.3241%2040.373%2059.983%2040.373H34.374C34.0329%2040.373%2033.7058%2040.2375%2033.4647%2039.9963C33.2235%2039.7552%2033.088%2039.4281%2033.088%2039.087C33.088%2038.7459%2033.2235%2038.4188%2033.4647%2038.1777C33.7058%2037.9365%2034.0329%2037.801%2034.374%2037.801H59.983Z'%20fill='%238D9AA5'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4%200C4.2066%200%204.40475%200.0820729%204.55084%200.228164C4.69693%200.374255%204.779%200.572397%204.779%200.779V3.221H7.221C7.41393%203.221%207.6%203.29258%207.74317%203.4219C7.88634%203.55122%207.97643%203.72907%207.996%203.921V4.001C7.996%204.2076%207.91393%204.40575%207.76784%204.55184C7.62175%204.69793%207.4236%204.78%207.217%204.78H4.779V7.222C4.779%207.41493%204.70742%207.601%204.5781%207.74417C4.44878%207.88734%204.27093%207.97744%204.079%207.997H3.999C3.7924%207.997%203.59425%207.91493%203.44816%207.76884C3.30207%207.62275%203.22%207.4246%203.22%207.218V4.779H0.779C0.585538%204.78002%200.398617%204.70902%200.254623%204.57981C0.110629%204.45061%200.0198653%204.27244%200%204.08V4C0%203.7934%200.082073%203.59526%200.228164%203.44916C0.374255%203.30307%200.572396%203.221%200.779%203.221H3.221V0.779C3.221%200.586071%203.29258%200.400004%203.4219%200.256831C3.55122%200.113658%203.72907%200.023565%203.921%200.00399971L4%200Z'%20fill='%238D9AA5'/%3e%3cpath%20d='M11%2099C11.5304%2099%2012.0391%2098.7893%2012.4142%2098.4142C12.7893%2098.0391%2013%2097.5304%2013%2097C13%2096.4696%2012.7893%2095.9609%2012.4142%2095.5858C12.0391%2095.2107%2011.5304%2095%2011%2095C10.4696%2095%209.96086%2095.2107%209.58579%2095.5858C9.21071%2095.9609%209%2096.4696%209%2097C9%2097.5304%209.21071%2098.0391%209.58579%2098.4142C9.96086%2098.7893%2010.4696%2099%2011%2099Z'%20fill='%238D9AA5'/%3e%3cpath%20d='M104.518%2015.035C103.055%2015.035%20101.651%2014.4538%20100.617%2013.4192C99.5817%2012.3846%2099.0003%2010.9813%2099%209.518C99%208.05454%2099.5814%206.65101%20100.616%205.61619C101.651%204.58136%20103.055%204%20104.518%204C105.981%204%20107.385%204.58136%20108.42%205.61619C109.455%206.65101%20110.036%208.05454%20110.036%209.518C110.036%2010.9813%20109.454%2012.3846%20108.419%2013.4192C107.385%2014.4538%20105.981%2015.035%20104.518%2015.035ZM104.518%2013.035C105.451%2013.035%20106.346%2012.6645%20107.005%2012.005C107.665%2011.3454%20108.036%2010.4509%20108.036%209.518C108.036%209.05601%20107.945%208.59854%20107.768%208.17172C107.591%207.7449%20107.332%207.35707%20107.006%207.0304C106.679%206.70372%20106.291%206.44459%20105.864%206.26779C105.437%206.091%20104.98%206%20104.518%206C103.585%206%20102.69%206.37065%20102.03%207.0304C101.371%207.69015%20101%208.58497%20101%209.518C101%2010.4509%20101.371%2011.3454%20102.031%2012.005C102.69%2012.6645%20103.585%2013.035%20104.518%2013.035Z'%20fill='%238D9AA5'/%3e%3c/svg%3e",jie=a.defineComponent({name:"QDataTable",components:{QDataTableCell:Q8,QDataTableHead:gI,QTooltip:V2},props:{id:{type:String,default:"table"},modelValue:{type:Array,default:()=>[]},canClickRow:{type:Boolean,default:!1},columns:{type:Array,default:()=>[]},currentPage:{type:Number,default:1},fixedTopOffset:{type:Number,default:0},hasSearch:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!1},isMultiSort:{type:Boolean,default:!1},isMultiSelect:{type:Boolean,default:!1},itemsPerPage:{type:Number,default:50},leftScrollAmount:{type:Number,default:200},loading:{type:Boolean,default:!1},orderBy:{type:String,default:""},rightScrollAmount:{type:Number,default:200},searchDelay:{type:Number,default:300},searchPlaceholder:{type:String,default:""},skeletonRows:{type:Number,default:6},sortBy:{type:String,default:""},tdClasses:{type:String,default:"text-sm"},thClasses:{type:String,default:"text-xs cursor-pointer"},thHeight:{type:Number,default:48}},emits:["click:row","deselect:row","select:row","update:order-by","update:selected","update:sort-by"],setup(n,{emit:e}){const{deviceType:t}=$l(),r=a.ref(),i=a.ref(),o=a.ref(),s=a.ref(),l=a.ref(),c=a.ref(0),{x:d}=Xh(o,{behavior:"auto"}),{x:u}=Xh(i,{behavior:"auto"}),{y:f}=b5(),{bottom:h,top:p,width:g,height:b}=WP(o),y=a.ref(0),w=a.ref(0),v=a.ref(0),k=a.ref(window.innerHeight),C=a.ref(0),A=a.ref(!1),S=a.ref(1),E=a.ref([]),O=a.ref(!1),x=a.ref(0),N=a.computed(()=>t.value==="desktop"),D=a.computed(()=>S.value*n.itemsPerPage-1),B=a.computed(()=>n.isFixed&&f.value>=v.value),H=a.computed(()=>V.value>0),V=a.computed(()=>o.value?c.value-g.value:0),U=a.computed(()=>(!N.value||A.value)&&d.value>0&&n.modelValue.length&&!n.loading),Z=a.computed(()=>(!N.value||A.value)&&d.value<V.value&&n.modelValue.length&&!n.loading),R=a.computed(()=>{const X=[],te={};let me=0;return n.columns.forEach(Ie=>{te[Ie.key]=""}),[...Array(n.skeletonRows)].forEach(()=>{X.push({...te,shimmer:me%2?"bg-gray-10":"bg-gray-30"}),me++}),X}),Y=a.computed(()=>{var X;return Math.ceil(((X=n.modelValue)==null?void 0:X.length)/n.itemsPerPage)||1}),_=()=>{var te;let X=0;if(H.value){const me=(((te=r.value)==null?void 0:te.clientHeight)||0)+n.thHeight,Ie=s.value.clientHeight+s.value.offsetTop;k.value<Ie?X=(k.value-(s.value.offsetTop+me))/2:X=(s.value.clientHeight-me)/2}C.value=X},q=()=>{d.value=o.value.scrollLeft,u.value=o.value.scrollLeft},re=()=>{u.value=i.value.scrollLeft,d.value=i.value.scrollLeft},Q=async()=>{const X=f.value+k.value-n.fixedTopOffset,te=v.value+b.value;X>te-400&&S.value<Y.value&&S.value++,_()},j=(X,te,me)=>{const Ie=X.scrollLeft,Ue=te-Ie,Kt=performance.now(),Rn=()=>{const Vn=performance.now()-Kt,Qi=Math.min(Vn/me,1);X.scrollLeft=Ie+Ue*Qi,Qi<1&&requestAnimationFrame(Rn)};requestAnimationFrame(Rn)},$=()=>{j(o.value,d.value-n.leftScrollAmount,250)},F=()=>{j(o.value,d.value+n.leftScrollAmount,250)},P=(X,te)=>{const me=E.value.indexOf(te);me<0&&X&&(E.value.push(te),e("select:row",te)),me>=0&&!X&&(E.value.splice(me,1),e("deselect:row",te)),e("update:selected",E.value)},K=X=>{const te=[];X&&n.modelValue.forEach(me=>{te.push(me.id)}),E.value=te,e("update:selected",E.value)},oe=X=>{const te=X.key,me=n.orderBy===""||n.sortBy!==te?"asc":n.orderBy==="asc"?"desc":"";e("update:sort-by",te),e("update:order-by",me)};return a.watch(()=>n.modelValue,()=>{_()}),a.watch(()=>n.loading,async()=>{await a.nextTick(),_()}),a.onMounted(()=>{var X,te,me,Ie,Ue;v.value=s.value.offsetTop-n.fixedTopOffset,c.value=(X=o.value)==null?void 0:X.scrollWidth,x.value=s.value.offsetLeft+1,y.value=(me=(te=s.value)==null?void 0:te.querySelector("table > thead > tr > th:first-child"))==null?void 0:me.clientWidth,w.value=(Ue=(Ie=s.value)==null?void 0:Ie.querySelector("table > thead > tr > th:last-child"))==null?void 0:Ue.clientWidth,window.addEventListener("resize",async()=>{var Kt;c.value=(Kt=o.value)==null?void 0:Kt.scrollWidth,k.value=window.innerHeight,_(),await a.nextTick()}),window.addEventListener("scroll",Q),o.value.addEventListener("scroll",q),i.value.addEventListener("scroll",re)}),a.onUnmounted(()=>{window.removeEventListener("resize",async()=>await a.nextTick()),window.removeEventListener("scroll",async()=>await a.nextTick())}),{deviceType:t,mq:Ht,noResults:yI,allCheckboxSelected:O,dataFilterContainer:r,fixedScrollableContainer:i,fixedScrollableContainerX:u,hovered:A,leftScrollButtonX:y,page:S,rightScrollButtonX:w,scrollButtonTop:C,scrollableContainer:o,scrollableContainerBottom:h,scrollableContainerHeight:b,scrollableContainerTop:p,scrollableContainerWidth:g,scrollableContainerX:d,scrollWidth:c,selected:E,tableContainer:s,tableLeftOffset:x,tbodyContainer:l,totalOffset:v,windowHeight:k,windowY:f,isDesktop:N,lastOnPage:D,pinHeaders:B,scrollable:H,scrollMax:V,showLeftScrollButton:U,showRightScrollButton:Z,skeletonData:R,totalPages:Y,handleScroll:q,handleFixedScroll:re,onClickColumnHeader:oe,onUpdateCheckbox:P,onUpdateAllCheckboxes:K,getScrollButtonTop:_,scrollWatcher:Q,smoothScroll:j,triggerScrollLeft:$,triggerScrollRight:F}}}),zie=["id"],Hie=["id"],Uie={class:a.normalizeClass(["fixed-scrollable overflow-x-auto overflow-y-hidden z-20"]),ref:"fixedScrollableContainer"},Zie={class:"min-w-full"},Wie={class:"flex items-center"},qie={key:0},Gie=["id"],Kie={class:"min-w-full"},Yie={class:"flex items-center"},Qie={key:0},Xie=["id"],Jie=["id","onClick"],eoe={key:0},toe={key:1,id:"no-results",class:a.normalizeClass(["flex flex-col items-center justify-center","bg-white rounded-b-lg p-12"])},noe=["src"],roe={class:"font-bold text-inkwell-0 text-base"};function ioe(n,e,t,r,i,o){var u,f,h;const s=a.resolveComponent("q-checkbox"),l=a.resolveComponent("q-data-table-head"),c=a.resolveComponent("q-data-table-cell"),d=a.resolveComponent("q-icon");return a.openBlock(),a.createElementBlock("div",a.mergeProps({id:n.id,class:["table-container relative border border-gray-20 rounded-lg",{"has-data-filter":!!n.$slots.dataFilter,"has-no-results":!n.modelValue.length,"has-pinned-headers":n.pinHeaders,"is-device":!n.isDesktop,"is-fixed":n.isFixed,"is-loading":n.loading,scrollable:n.scrollable}],style:`
252
252
  padding-top: ${n.isFixed&&n.pinHeaders&&((u=n.dataFilterContainer)==null?void 0:u.clientHeight)||0}px;
253
253
  `,ref:"tableContainer"},{[a.toHandlerKey(n.isDesktop&&"mouseenter")]:e[6]||(e[6]=p=>{n.hovered=!0,n.getScrollButtonTop()})},{[a.toHandlerKey(n.isDesktop&&"mouseleave")]:e[7]||(e[7]=p=>n.hovered=!1)}),[n.$slots.dataFilter?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["data-filter-container rounded-t-lg z-30",{"fixed z-20 border border-b-0 border-gray-20 -ml-px -mt-px":n.isFixed&&n.pinHeaders}]),style:a.normalizeStyle(`
254
254
  top: ${n.isFixed&&n.pinHeaders?n.fixedTopOffset:0}px;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@quoreadmin/ui",
3
3
  "private": false,
4
- "version": "1.1.8",
4
+ "version": "1.1.9",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",