@fewangsit/wangsvue-fats 1.0.0-alpha.153 → 1.0.0-alpha.154
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/loading-page-BrQattYE.js +1 -0
- package/loading-page-CgfbWppy.js +1 -0
- package/loading-page-DbLuqCHa.js +1 -0
- package/loading-plane-CgfbWppy.js +1 -0
- package/loading-table-Bdr9ZhtP.js +1 -0
- package/loading-table-BzrSQlA0.js +1 -0
- package/loading-table-chOgXi94.js +1 -0
- package/no-data-Cgze_Rvp.js +1 -0
- package/no-data-Dep79CBh.js +1 -0
- package/no-data-y1X5WtcQ.js +1 -0
- package/package.json +1 -1
- package/stats.html +1 -1
- package/wangsvue-fats.js +15307 -20446
- package/wangsvue-fats.system.js +427 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
var yX=Object.defineProperty;var bX=(ce,Gt,dt)=>Gt in ce?yX(ce,Gt,{enumerable:!0,configurable:!0,writable:!0,value:dt}):ce[Gt]=dt;var Ct=(ce,Gt,dt)=>bX(ce,typeof Gt!="symbol"?Gt+"":Gt,dt);System.register(["vue","single-spa","@tagsamurai/fats-api-services","vue-router","axios"],function(ce,Gt){"use strict";var dt,oe,re,Kd,Pr,wt,Et,$e,T,hn,X,x,ba,Ps,Nt,Bi,Aa,$g,Ae,Ji,ft,O,g,Q,ht,_,E,et,on,P,B,pe,ue,H,it,yu,L,Lr,yt,In,Je,wn,ni,kt,Ot,Fo,Xn,Yi,wa,Vg,Wd,Bn,Ho,qd,Xd,Gd,zg,Sa,Fg,Hg,jg,eo,Zd,_d,Jd,Yd,Qd,Ug,Kg,Wg,qg,Xg,Gg,Zg,_g,Jg,ef,Yg,Qg;return{setters:[Ve=>{dt=Ve.inject,oe=Ve.shallowRef,re=Ve.ref,Kd=Ve.readonly,Pr=Ve.getCurrentInstance,wt=Ve.onMounted,Et=Ve.nextTick,$e=Ve.watch,T=Ve.mergeProps,hn=Ve.reactive,X=Ve.computed,x=Ve.unref,ba=Ve.isRef,Ps=Ve.provide,Nt=Ve.toValue,Bi=Ve.onBeforeUnmount,Aa=Ve.watchEffect,$g=Ve.shallowReactive,Ae=Ve.defineComponent,Ji=Ve.h,ft=Ve.withDirectives,O=Ve.createElementBlock,g=Ve.openBlock,Q=Ve.renderSlot,ht=Ve.createTextVNode,_=Ve.toDisplayString,E=Ve.createElementVNode,et=Ve.resolveComponent,on=Ve.resolveDirective,P=Ve.createBlock,B=Ve.createCommentVNode,pe=Ve.normalizeClass,ue=Ve.Fragment,H=Ve.withCtx,it=Ve.normalizeProps,yu=Ve.Teleport,L=Ve.createVNode,Lr=Ve.Transition,yt=Ve.resolveDynamicComponent,In=Ve.createSlots,Je=Ve.renderList,wn=Ve.mergeModels,ni=Ve.useModel,kt=Ve.guardReactiveProps,Ot=Ve.withModifiers,Fo=Ve.onUnmounted,Xn=Ve.vShow,Yi=Ve.normalizeStyle,wa=Ve.useSlots,Vg=Ve.TransitionGroup,Wd=Ve.onBeforeMount,Bn=Ve.withKeys,Ho=Ve.toHandlers,qd=Ve.vModelText,Xd=Ve.markRaw,Gd=Ve.render,zg=Ve.customRef},Ve=>{Sa=Ve.navigateToUrl},Ve=>{Fg=Ve.I18nService,Hg=Ve.ChangelogServices,jg=Ve.AssetServicesGo,eo=Ve.AssetServices,Zd=Ve.DisposalServices,_d=Ve.getImageURL,Jd=Ve.TAGServices,Yd=Ve.AssetNameServices,Qd=Ve.DamageServicesGo,Ug=Ve.DamageServices,Kg=Ve.TrackingServices,Wg=Ve.MissingServicesGo,qg=Ve.MissingServices,Xg=Ve.TransferServicesGo,Gg=Ve.TransferServices,Zg=Ve.getImageURLGo,_g=Ve.GroupCategoryServicesGo,Jg=Ve.GroupCategoryServices},Ve=>{ef=Ve.isNavigationFailure},Ve=>{Yg=Ve.AxiosError,Qg=Ve.default}],execute:function(){var Yr;ce({getStatusSeverity:dv,mitt:Ve});function Ve(t){var n;t=t||((n=window.eventBus)==null?void 0:n.all)||new Map;const e={all:t,on(i,r){const o=t==null?void 0:t.get(i);o?o.push(r):t==null||t.set(i,[r])},off(i,r){const o=t==null?void 0:t.get(i);o&&(r?o.splice(o.indexOf(r)>>>0,1):t==null||t.set(i,[]))},emit(i,r){let o=t==null?void 0:t.get(i);o&&o.slice().map(s=>{s(r)}),o=t==null?void 0:t.get("*"),o&&o.slice().map(s=>{s(i,r)})}};return window.eventBus??(window.eventBus=e),window.eventBus}const Ye=ce("eventBus",Ve()),AX=ce("extendEventBus",()=>Ye);function tf(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=rf(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(u){throw u},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function O3(t){return E3(t)||M3(t)||rf(t)||x3()}function x3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M3(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function E3(t){if(Array.isArray(t))return of(t)}function Ca(t){"@babel/helpers - typeof";return Ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ca(t)}function nf(t,e){return L3(t)||P3(t,e)||rf(t,e)||I3()}function I3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rf(t,e){if(t){if(typeof t=="string")return of(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return of(t,e)}}function of(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function P3(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}function L3(t){if(Array.isArray(t))return t}var G={innerWidth:function(e){if(e){var n=e.offsetWidth,i=getComputedStyle(e);return n+=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),n}return 0},width:function(e){if(e){var n=e.offsetWidth,i=getComputedStyle(e);return n-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),n}return 0},getWindowScrollTop:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)},getWindowScrollLeft:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)},getOuterWidth:function(e,n){if(e){var i=e.offsetWidth;if(n){var r=getComputedStyle(e);i+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return i}return 0},getOuterHeight:function(e,n){if(e){var i=e.offsetHeight;if(n){var r=getComputedStyle(e);i+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return i}return 0},getClientHeight:function(e,n){if(e){var i=e.clientHeight;if(n){var r=getComputedStyle(e);i+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return i}return 0},getViewport:function(){var e=window,n=document,i=n.documentElement,r=n.getElementsByTagName("body")[0],o=e.innerWidth||i.clientWidth||r.clientWidth,s=e.innerHeight||i.clientHeight||r.clientHeight;return{width:o,height:s}},getOffset:function(e){if(e){var n=e.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index:function(e){if(e)for(var n,i=(n=this.getParentNode(e))===null||n===void 0?void 0:n.childNodes,r=0,o=0;o<i.length;o++){if(i[o]===e)return r;i[o].nodeType===1&&r++}return-1},addMultipleClasses:function(e,n){var i=this;e&&n&&[n].flat().filter(Boolean).forEach(function(r){return r.split(" ").forEach(function(o){return i.addClass(e,o)})})},removeMultipleClasses:function(e,n){var i=this;e&&n&&[n].flat().filter(Boolean).forEach(function(r){return r.split(" ").forEach(function(o){return i.removeClass(e,o)})})},addClass:function(e,n){e&&n&&!this.hasClass(e,n)&&(e.classList?e.classList.add(n):e.className+=" "+n)},removeClass:function(e,n){e&&n&&(e.classList?e.classList.remove(n):e.className=e.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:function(e,n){return e?e.classList?e.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(e.className):!1},addStyles:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e&&Object.entries(n).forEach(function(i){var r=nf(i,2),o=r[0],s=r[1];return e.style[o]=s})},find:function(e,n){return this.isElement(e)?e.querySelectorAll(n):[]},findSingle:function(e,n){return this.isElement(e)?e.querySelector(n):null},createElement:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e){var i=document.createElement(e);this.setAttributes(i,n);for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];return i.append.apply(i,o),i}},setAttribute:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0;this.isElement(e)&&i!==null&&i!==void 0&&e.setAttribute(n,i)},setAttributes:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.isElement(e)){var r=function o(s,a){var l,u,c=e!=null&&(l=e.$attrs)!==null&&l!==void 0&&l[s]?[e==null||(u=e.$attrs)===null||u===void 0?void 0:u[s]]:[];return[a].flat().reduce(function(d,f){if(f!=null){var p=Ca(f);if(p==="string"||p==="number")d.push(f);else if(p==="object"){var h=Array.isArray(f)?o(s,f):Object.entries(f).map(function(m){var v=nf(m,2),S=v[0],b=v[1];return s==="style"&&(b||b===0)?"".concat(S.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(b):b?S:void 0});d=h.length?d.concat(h.filter(function(m){return!!m})):d}}return d},c)};Object.entries(i).forEach(function(o){var s=nf(o,2),a=s[0],l=s[1];if(l!=null){var u=a.match(/^on(.+)/);u?e.addEventListener(u[1].toLowerCase(),l):a==="p-bind"?n.setAttributes(e,l):(l=a==="class"?O3(new Set(r("class",l))).join(" ").trim():a==="style"?r("style",l).join(";").trim():l,(e.$attrs=e.$attrs||{})&&(e.$attrs[a]=l),e.setAttribute(a,l))}})}},getAttribute:function(e,n){if(this.isElement(e)){var i=e.getAttribute(n);return isNaN(i)?i==="true"||i==="false"?i==="true":i:+i}},isAttributeEquals:function(e,n,i){return this.isElement(e)?this.getAttribute(e,n)===i:!1},isAttributeNotEquals:function(e,n,i){return!this.isAttributeEquals(e,n,i)},getHeight:function(e){if(e){var n=e.offsetHeight,i=getComputedStyle(e);return n-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),n}return 0},getWidth:function(e){if(e){var n=e.offsetWidth,i=getComputedStyle(e);return n-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)+parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),n}return 0},absolutePosition:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e){var r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=r.height,s=r.width,a=n.offsetHeight,l=n.offsetWidth,u=n.getBoundingClientRect(),c=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),f=this.getViewport(),p,h,m="top";u.top+a+o>f.height?(p=u.top+c-o,m="bottom",p<0&&(p=c)):p=a+u.top+c,u.left+s>f.width?h=Math.max(0,u.left+d+l-s):h=u.left+d,e.style.top=p+"px",e.style.left=h+"px",e.style.transformOrigin=m,i&&(e.style.marginTop=m==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}},relativePosition:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e){var r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=n.offsetHeight,s=n.getBoundingClientRect(),a=this.getViewport(),l,u,c="top";s.top+o+r.height>a.height?(l=-1*r.height,c="bottom",s.top+l<0&&(l=-1*s.top)):l=o,r.width>a.width?u=s.left*-1:s.left+r.width>a.width?u=(s.left+r.width-a.width)*-1:u=0,e.style.top=l+"px",e.style.left=u+"px",e.style.transformOrigin=c,i&&(e.style.marginTop=c==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}},nestedPosition:function(e,n){if(e){var i=e.parentElement,r=this.getOffset(i),o=this.getViewport(),s=e.offsetParent?e.offsetWidth:this.getHiddenElementOuterWidth(e),a=this.getOuterWidth(i.children[0]),l;parseInt(r.left,10)+a+s>o.width-this.calculateScrollbarWidth()?parseInt(r.left,10)<s?n%2===1?l=parseInt(r.left,10)?"-"+parseInt(r.left,10)+"px":"100%":n%2===0&&(l=o.width-s-this.calculateScrollbarWidth()+"px"):l="-100%":l="100%",e.style.top="0px",e.style.left=l}},getParentNode:function(e){var n=e==null?void 0:e.parentNode;return n&&n instanceof ShadowRoot&&n.host&&(n=n.host),n},getParents:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=this.getParentNode(e);return i===null?n:this.getParents(i,n.concat([i]))},getScrollableParents:function(e){var n=[];if(e){var i=this.getParents(e),r=/(auto|scroll)/,o=function(v){try{var S=window.getComputedStyle(v,null);return r.test(S.getPropertyValue("overflow"))||r.test(S.getPropertyValue("overflowX"))||r.test(S.getPropertyValue("overflowY"))}catch{return!1}},s=tf(i),a;try{for(s.s();!(a=s.n()).done;){var l=a.value,u=l.nodeType===1&&l.dataset.scrollselectors;if(u){var c=u.split(","),d=tf(c),f;try{for(d.s();!(f=d.n()).done;){var p=f.value,h=this.findSingle(l,p);h&&o(h)&&n.push(h)}}catch(m){d.e(m)}finally{d.f()}}l.nodeType!==9&&o(l)&&n.push(l)}}catch(m){s.e(m)}finally{s.f()}}return n},getHiddenElementOuterHeight:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var n=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",n}return 0},getHiddenElementOuterWidth:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var n=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",n}return 0},getHiddenElementDimensions:function(e){if(e){var n={};return e.style.visibility="hidden",e.style.display="block",n.width=e.offsetWidth,n.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",n}return 0},fadeIn:function(e,n){if(e){e.style.opacity=0;var i=+new Date,r=0,o=function s(){r=+e.style.opacity+(new Date().getTime()-i)/n,e.style.opacity=r,i=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};o()}},fadeOut:function(e,n){if(e)var i=1,r=50,o=n,s=r/o,a=setInterval(function(){i-=s,i<=0&&(i=0,clearInterval(a)),e.style.opacity=i},r)},getUserAgent:function(){return navigator.userAgent},appendChild:function(e,n){if(this.isElement(n))n.appendChild(e);else if(n.el&&n.elElement)n.elElement.appendChild(e);else throw new Error("Cannot append "+n+" to "+e)},isElement:function(e){return(typeof HTMLElement>"u"?"undefined":Ca(HTMLElement))==="object"?e instanceof HTMLElement:e&&Ca(e)==="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"},scrollInView:function(e,n){var i=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=i?parseFloat(i):0,o=getComputedStyle(e).getPropertyValue("paddingTop"),s=o?parseFloat(o):0,a=e.getBoundingClientRect(),l=n.getBoundingClientRect(),u=l.top+document.body.scrollTop-(a.top+document.body.scrollTop)-r-s,c=e.scrollTop,d=e.clientHeight,f=this.getOuterHeight(n);u<0?e.scrollTop=c+u:u+f>d&&(e.scrollTop=c+u-d+f)},clearSelection:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}},getSelection:function(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null},calculateScrollbarWidth:function(){if(this.calculatedScrollbarWidth!=null)return this.calculatedScrollbarWidth;var e=document.createElement("div");this.addStyles(e,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(e);var n=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),this.calculatedScrollbarWidth=n,n},calculateBodyScrollbarWidth:function(){return window.innerWidth-document.documentElement.offsetWidth},getBrowser:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent:function(){var e=navigator.userAgent.toLowerCase(),n=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:n[1]||"",version:n[2]||"0"}},isVisible:function(e){return e&&e.offsetParent!=null},invokeElementMethod:function(e,n,i){e[n].apply(e,i)},isExist:function(e){return!!(e!==null&&typeof e<"u"&&e.nodeName&&this.getParentNode(e))},isClient:function(){return!!(typeof window<"u"&&window.document&&window.document.createElement)},focus:function(e,n){e&&document.activeElement!==e&&e.focus(n)},isFocusableElement:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return this.isElement(e)?e.matches('button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(n,`,
|
|
5
|
+
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
6
|
+
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
7
|
+
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
8
|
+
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
9
|
+
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
10
|
+
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n)):!1},getFocusableElements:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=this.find(e,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(n,`,
|
|
11
|
+
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
12
|
+
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
13
|
+
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
14
|
+
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
15
|
+
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
16
|
+
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n)),r=[],o=tf(i),s;try{for(o.s();!(s=o.n()).done;){var a=s.value;getComputedStyle(a).display!="none"&&getComputedStyle(a).visibility!="hidden"&&r.push(a)}}catch(l){o.e(l)}finally{o.f()}return r},getFirstFocusableElement:function(e,n){var i=this.getFocusableElements(e,n);return i.length>0?i[0]:null},getLastFocusableElement:function(e,n){var i=this.getFocusableElements(e,n);return i.length>0?i[i.length-1]:null},getNextFocusableElement:function(e,n,i){var r=this.getFocusableElements(e,i),o=r.length>0?r.findIndex(function(a){return a===n}):-1,s=o>-1&&r.length>=o+1?o+1:-1;return s>-1?r[s]:null},getPreviousElementSibling:function(e,n){for(var i=e.previousElementSibling;i;){if(i.matches(n))return i;i=i.previousElementSibling}return null},getNextElementSibling:function(e,n){for(var i=e.nextElementSibling;i;){if(i.matches(n))return i;i=i.nextElementSibling}return null},isClickable:function(e){if(e){var n=e.nodeName,i=e.parentElement&&e.parentElement.nodeName;return n==="INPUT"||n==="TEXTAREA"||n==="BUTTON"||n==="A"||i==="INPUT"||i==="TEXTAREA"||i==="BUTTON"||i==="A"||!!e.closest(".p-button, .p-checkbox, .p-radiobutton")}return!1},applyStyle:function(e,n){if(typeof n=="string")e.style.cssText=n;else for(var i in n)e.style[i]=n[i]},isIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream},isAndroid:function(){return/(android)/i.test(navigator.userAgent)},isTouchDevice:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},hasCSSAnimation:function(e){if(e){var n=getComputedStyle(e),i=parseFloat(n.getPropertyValue("animation-duration")||"0");return i>0}return!1},hasCSSTransition:function(e){if(e){var n=getComputedStyle(e),i=parseFloat(n.getPropertyValue("transition-duration")||"0");return i>0}return!1},exportCSV:function(e,n){var i=new Blob([e],{type:"application/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(i,n+".csv");else{var r=document.createElement("a");r.download!==void 0?(r.setAttribute("href",URL.createObjectURL(i)),r.setAttribute("download",n+".csv"),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)):(e="data:text/csv;charset=utf-8,"+e,window.open(encodeURI(e)))}},blockBodyScroll:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"p-overflow-hidden";document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,e)},unblockBodyScroll:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"p-overflow-hidden";document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,e)}};function ka(t){"@babel/helpers - typeof";return ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ka(t)}function D3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R3(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,N3(i.key),i)}}function B3(t,e,n){return e&&R3(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function N3(t){var e=$3(t,"string");return ka(e)=="symbol"?e:String(e)}function $3(t,e){if(ka(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(ka(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Ls=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};D3(this,t),this.element=e,this.listener=n}return B3(t,[{key:"bindScrollListener",value:function(){this.scrollableParents=G.getScrollableParents(this.element);for(var n=0;n<this.scrollableParents.length;n++)this.scrollableParents[n].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var n=0;n<this.scrollableParents.length;n++)this.scrollableParents[n].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}]),t}();function ev(){var t=new Map;return{on:function(n,i){var r=t.get(n);r?r.push(i):r=[i],t.set(n,r)},off:function(n,i){var r=t.get(n);r&&r.splice(r.indexOf(i)>>>0,1)},emit:function(n,i){var r=t.get(n);r&&r.slice().map(function(o){o(i)})}}}function tv(t,e){return F3(t)||z3(t,e)||af(t,e)||V3()}function V3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
17
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z3(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}function F3(t){if(Array.isArray(t))return t}function nv(t){return U3(t)||j3(t)||af(t)||H3()}function H3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j3(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function U3(t){if(Array.isArray(t))return lf(t)}function sf(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=af(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(u){throw u},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
19
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function af(t,e){if(t){if(typeof t=="string")return lf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lf(t,e)}}function lf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Ta(t){"@babel/helpers - typeof";return Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ta(t)}var Ce={equals:function(e,n,i){return i?this.resolveFieldData(e,i)===this.resolveFieldData(n,i):this.deepEquals(e,n)},deepEquals:function(e,n){if(e===n)return!0;if(e&&n&&Ta(e)=="object"&&Ta(n)=="object"){var i=Array.isArray(e),r=Array.isArray(n),o,s,a;if(i&&r){if(s=e.length,s!=n.length)return!1;for(o=s;o--!==0;)if(!this.deepEquals(e[o],n[o]))return!1;return!0}if(i!=r)return!1;var l=e instanceof Date,u=n instanceof Date;if(l!=u)return!1;if(l&&u)return e.getTime()==n.getTime();var c=e instanceof RegExp,d=n instanceof RegExp;if(c!=d)return!1;if(c&&d)return e.toString()==n.toString();var f=Object.keys(e);if(s=f.length,s!==Object.keys(n).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,f[o]))return!1;for(o=s;o--!==0;)if(a=f[o],!this.deepEquals(e[a],n[a]))return!1;return!0}return e!==e&&n!==n},resolveFieldData:function(e,n){if(!e||!n)return null;try{var i=e[n];if(this.isNotEmpty(i))return i}catch{}if(Object.keys(e).length){if(this.isFunction(n))return n(e);if(n.indexOf(".")===-1)return e[n];for(var r=n.split("."),o=e,s=0,a=r.length;s<a;++s){if(o==null)return null;o=o[r[s]]}return o}return null},getItemValue:function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,i):e},filter:function(e,n,i){var r=[];if(e){var o=sf(e),s;try{for(o.s();!(s=o.n()).done;){var a=s.value,l=sf(n),u;try{for(l.s();!(u=l.n()).done;){var c=u.value;if(String(this.resolveFieldData(a,c)).toLowerCase().indexOf(i.toLowerCase())>-1){r.push(a);break}}}catch(d){l.e(d)}finally{l.f()}}}catch(d){o.e(d)}finally{o.f()}}return r},reorderArray:function(e,n,i){e&&n!==i&&(i>=e.length&&(i%=e.length,n%=e.length),e.splice(i,0,e.splice(n,1)[0]))},findIndexInList:function(e,n){var i=-1;if(n){for(var r=0;r<n.length;r++)if(n[r]===e){i=r;break}}return i},contains:function(e,n){if(e!=null&&n&&n.length){var i=sf(n),r;try{for(i.s();!(r=i.n()).done;){var o=r.value;if(this.equals(e,o))return!0}}catch(s){i.e(s)}finally{i.f()}}return!1},insertIntoOrderedArray:function(e,n,i,r){if(i.length>0){for(var o=!1,s=0;s<i.length;s++){var a=this.findIndexInList(i[s],r);if(a>n){i.splice(s,0,e),o=!0;break}}o||i.push(e)}else i.push(e)},removeAccents:function(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e},getVNodeProp:function(e,n){if(e){var i=e.props;if(i){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=Object.prototype.hasOwnProperty.call(i,r)?r:n;return e.type.extends.props[n].type===Boolean&&i[o]===""?!0:i[o]}}return null},toFlatCase:function(e){return this.isString(e)?e.replace(/(-|_)/g,"").toLowerCase():e},toKebabCase:function(e){return this.isString(e)?e.replace(/(_)/g,"-").replace(/[A-Z]/g,function(n,i){return i===0?n:"-"+n.toLowerCase()}).toLowerCase():e},toCapitalCase:function(e){return this.isString(e,{empty:!1})?e[0].toUpperCase()+e.slice(1):e},isEmpty:function(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&Ta(e)==="object"&&Object.keys(e).length===0},isNotEmpty:function(e){return!this.isEmpty(e)},isFunction:function(e){return!!(e&&e.constructor&&e.call&&e.apply)},isObject:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e instanceof Object&&e.constructor===Object&&(n||Object.keys(e).length!==0)},isDate:function(e){return e instanceof Date&&e.constructor===Date},isArray:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Array.isArray(e)&&(n||e.length!==0)},isString:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return typeof e=="string"&&(n||e!=="")},isPrintableCharacter:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.isNotEmpty(e)&&e.length===1&&e.match(/\S| /)},findLast:function(e,n){var i;if(this.isNotEmpty(e))try{i=e.findLast(n)}catch{i=nv(e).reverse().find(n)}return i},findLastIndex:function(e,n){var i=-1;if(this.isNotEmpty(e))try{i=e.findLastIndex(n)}catch{i=e.lastIndexOf(nv(e).reverse().find(n))}return i},sort:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1,s=this.compare(e,n,r,i),a=i;return(this.isEmpty(e)||this.isEmpty(n))&&(a=o===1?i:o),a*s},compare:function(e,n,i){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=-1,s=this.isEmpty(e),a=this.isEmpty(n);return s&&a?o=0:s?o=r:a?o=-r:typeof e=="string"&&typeof n=="string"?o=i(e,n):o=e<n?-1:e>n?1:0,o},localeComparator:function(){return new Intl.Collator(void 0,{numeric:!0}).compare},nestedKeys:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return Object.entries(n).reduce(function(r,o){var s=tv(o,2),a=s[0],l=s[1],u=i?"".concat(i,".").concat(a):a;return e.isObject(l)?r=r.concat(e.nestedKeys(l,u)):r.push(u),r},[])},stringify:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=" ".repeat(r),s=" ".repeat(r+i);return this.isArray(e)?"["+e.map(function(a){return n.stringify(a,i,r+i)}).join(", ")+"]":this.isDate(e)?e.toISOString():this.isFunction(e)?e.toString():this.isObject(e)?`{
|
|
20
|
+
`+Object.entries(e).map(function(a){var l=tv(a,2),u=l[0],c=l[1];return"".concat(s).concat(u,": ").concat(n.stringify(c,i,r+i))}).join(`,
|
|
21
|
+
`)+`
|
|
22
|
+
`.concat(o)+"}":JSON.stringify(e)}},iv=0;function Vn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"pv_id_";return iv++,"".concat(t).concat(iv)}function K3(t){return G3(t)||X3(t)||q3(t)||W3()}function W3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
23
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q3(t,e){if(t){if(typeof t=="string")return uf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uf(t,e)}}function X3(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function G3(t){if(Array.isArray(t))return uf(t)}function uf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Z3(){var t=[],e=function(a,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:999,c=r(a,l,u),d=c.value+(c.key===a?0:u)+1;return t.push({key:a,value:d}),d},n=function(a){t=t.filter(function(l){return l.value!==a})},i=function(a,l){return r(a,l).value},r=function(a,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return K3(t).reverse().find(function(c){return!0})||{key:a,value:u}},o=function(a){return a&&parseInt(a.style.zIndex,10)||0};return{get:o,set:function(a,l,u){l&&(l.style.zIndex=String(e(a,!0,u)))},clear:function(a){a&&(n(o(a)),a.style.zIndex="")},getCurrent:function(a){return i(a,!0)}}}var dn=Z3(),Ni=ev(),rv=Symbol();function _3(){var t=dt(rv);if(!t)throw new Error("No PrimeVue Toast provided!");return t}var wX=ce("ToastService",{install:function(e){var n={add:function(r){Ni.emit("add",r)},remove:function(r){Ni.emit("remove",r)},removeGroup:function(r){Ni.emit("remove-group",r)},removeAllGroups:function(){Ni.emit("remove-all-groups")}};e.config.globalProperties.$toast=n,e.provide(rv,n)}});const SX=ce("parseNodeKeys",(t,e=!1)=>Object.keys(ov(t,e)).map(Number)),ov=ce("filterNodeKeys",(t,e=!1)=>Object.fromEntries(Object.entries(t).filter(([n,i])=>{const r=i.checked&&!i.partialChecked,o=e||n!="-1";return r&&o}))),J3=ce("getUserPlan",()=>{const{plan:t}=JSON.parse(localStorage.getItem("user")??"{}");return t}),Ds=ce("getTransactionRole",t=>{const{transactionRoles:e}=JSON.parse(localStorage.getItem("user")??"{}");return(e==null?void 0:e[t])??{monitoringReport:!1,manager:!1,staff:!1,approver:!1}}),Y3=ce("getSystemRole",t=>{const{systemRoles:e}=JSON.parse(localStorage.getItem("user")??"{}");return(e==null?void 0:e[t])??{create:!1,view:!1,update:!1,delete:!1}}),CX=ce("hasSystemRole",t=>Y3(t).view),kX=ce("hasTransactionRole",t=>{const{manager:e,staff:n,monitoringReport:i}=Ds(t);return e||n||i}),TX=ce("hasManagerRole",t=>{const{manager:e}=Ds(t);return e}),OX=ce("hasAnyManagerRole",()=>{const{transactionRoles:t}=JSON.parse(localStorage.getItem("user")??"{}");return Object.entries(t).some(([,e])=>e.manager)}),xX=ce("hasAnyMonitoringReportRole",()=>{const{transactionRoles:t}=JSON.parse(localStorage.getItem("user")??"{}");return Object.entries(t).some(([,e])=>e.monitoringReport)}),MX=ce("hasStaffRole",t=>{const{staff:e}=Ds(t);return e}),EX=ce("hasMonitoringReportRole",t=>{const{monitoringReport:e}=Ds(t);return e}),IX=ce("hasApprovalRole",t=>{const{approver:e}=Ds(t);return e}),PX=ce("checkRouteAccess",(t,e,n)=>{const{userType:i}=JSON.parse(localStorage.getItem("user")??"{}"),{hasAccess:r}=t.meta;(i==="Admin"||t.path.includes("handover-confirmation"))&&r?n():Sa("/not-found")}),LX=ce("listenSidebarChanges",(t,e)=>{window.addEventListener(t==="group"?"groupSidebarChanged":"categorySidebarChanged",e)}),DX=ce("unListenSidebarChanges",(t,e)=>{window.removeEventListener(t==="group"?"groupSidebarChanged":"categorySidebarChanged",e)}),zn=ce("getNestedPropertyValue",(t,e)=>e.split(".").reduce((n,i)=>n?n[i]:void 0,t)),Rs=(t,e,n)=>{const i=e.split("."),r=i.pop(),o=i.reduce((s,a)=>s[a]=s[a]||{},t);r&&(o[r]=n)},sv=ce("isEmptyObject",t=>{if(!t)return!0;const e=Object.keys(t);return e.length?e.every(n=>{const i=t[n];return typeof i=="object"?Array.isArray(i)?!i.length||i.every(r=>typeof r=="object"?sv(r):r==null):sv(i):i==null}):!0}),cf=(t,e)=>{if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){const n=Array.isArray(t),i=Array.isArray(e);if(n&&i){if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!cf(t[o],e[o]))return!1;return!0}if(n!==i)return!1;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t instanceof RegExp&&e instanceof RegExp)return t.toString()===e.toString();const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(const o of r)if(!Object.prototype.hasOwnProperty.call(e,o)||!cf(t[o],e[o]))return!1;return!0}return t!==t&&e!==e},av=(t,e,n)=>cf(t,e),Q3=(t,e)=>{if(t!=null&&(e!=null&&e.length)){for(const n of e)if(av(t,n))return!0}return!1},lv=(t,e)=>{if(typeof t!="object"||t===null)return e;if(typeof e!="object"||e===null)return t;const n={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const r=t[i],o=e[i];typeof r=="object"&&r!==null&&typeof o=="object"&&o!==null?n[i]=lv(r,o):n[i]=o}return n},eC=()=>{const{consoleSettings:t,generalSetting:e}=JSON.parse(localStorage.getItem("user")??"{}"),{dateFormat:n,timeFormat:i,timezone:r}=t??e??{};let o={};return!n||!i||!r?{}:(typeof n=="string"?o={dateFormat:n,timeFormat:i,timezone:r}:o={formatPreset:{...n,weekday:n!=null&&n.weekday?n.weekday:void 0,hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:i,timezone:r}},o)},bu=ce("formatDate",(t,e={locale:"en-gb",dateFormat:"dd/mm/yy",timeFormat:"HH:mm",showDate:!0},n=!0)=>{const{showDate:i=!0}=e;let{locale:r="en-gb",dateFormat:o="dd/mm/yy",timezone:s,timeFormat:a,showTime:l}=e;const u=n?eC():{};if(u&&(r=u.locale??r,o=u.dateFormat??o,a=u.timeFormat??a,s=u.timezone??s,l=l??!1),u.formatPreset){const{locale:f,timezone:p,hour:h,minute:m,second:v,hour12:S,...b}=u.formatPreset,k=l?{hour:h,minute:m,second:v,hour12:S}:{};return t.toLocaleString(f,{...p?{timeZone:p}:{},...b,...k}).replace(/\b(am|pm)\b/g,w=>w.toUpperCase())}let c={...s?{timeZone:s}:{}};if(i)switch(o){case"d/m/yy":case"_2/_1/06":c={year:"2-digit",month:"numeric",day:"numeric"},r="id-id";break;case"m/d/yy":case"_1/_2/06":c={year:"2-digit",month:"numeric",day:"numeric"},r="en-us";break;case"d/mm/yy":c={year:"2-digit",month:"2-digit",day:"numeric"};break;case"dd/mm/yyyy":c={year:"numeric",month:"2-digit",day:"2-digit"};break;case"dd M yy":case"02 Jan 06":c={year:"2-digit",month:"short",day:"2-digit"};break;case"dd M yyyy":c={year:"numeric",month:"short",day:"2-digit"};break;case"dd MM yy":c={year:"2-digit",month:"long",day:"2-digit"};break;case"dd MM yyyy":c={year:"numeric",month:"long",day:"2-digit"};break;case"D dd M yy":case"D, dd M yy":case"Mon, 02 Jan 06":c={weekday:"short",year:"2-digit",month:"short",day:"2-digit"};break;case"D dd M yyyy":case"D, dd M yyyy":case"Mon, 02 Jan 2006":c={weekday:"short",year:"numeric",month:"short",day:"2-digit"};break;case"DD dd MM yy":case"DD, dd MM yy":c={weekday:"long",year:"2-digit",month:"long",day:"2-digit"};break;case"DD dd MM yyyy":case"DD, dd MM yyyy":c={weekday:"long",year:"numeric",month:"long",day:"2-digit"};break;case"02/01/06":default:c={year:"2-digit",month:"2-digit",day:"2-digit"};break}if(l&&!a&&(a="HH:mm"),l||a&&l!=!1)switch(a){case"HH:mm":case"HH:mm a":case"15:04":case"03:04 PM":c={...c,hour:"2-digit",minute:"2-digit",hour12:a.includes("a")||a.includes("PM")};break;case"HH:mm:ss":case"HH:mm:ss a":case"15:04:05":case"03:04:05 PM":c={...c,hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:a.includes("a")||a.includes("PM")};break}let d=o.includes(",")?t.toLocaleString(r,c):t.toLocaleString(r,c).replace(",","");return d=d.replace(/\./g,":"),d.replace(/\b(am|pm)\b/g,f=>f.toUpperCase())}),tC=t=>new Date(t).toLocaleString("sv"),RX=ce("formatDateReadable",(t,e)=>{const n=Math.floor((new Date().valueOf()-new Date(t).valueOf())/1e3);if(e&&n>e)return bu(t);const i=Math.floor(n/31536e3);if(i>=1)return i+" tahun lalu";const r=Math.floor(n/2628e3);if(r>=1)return r+" bulan lalu";const o=Math.floor(n/86400);if(o>=1)return o+" hari lalu";const s=Math.floor(n/3600);if(s>=1)return s+" jam lalu";const a=Math.floor(n/60);return a>=1?a+" menit lalu":"baru saja"}),nC=async()=>(window.XLSX||(System&&System.import?await System.import("https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js"):window.XLSX=await Gt.import("https://cdn.sheetjs.com/xlsx-0.20.3/package/xlsx.mjs")),window.XLSX),df=ce("exportToExcel",async t=>{const e=await nC(),n=e.utils.book_new(),i=e.utils.json_to_sheet([]);let r=0;t.tables.forEach(s=>{s.tableTitle&&(e.utils.sheet_add_aoa(i,[[s.tableTitle]],{origin:{r,c:0}}),r+=1),e.utils.sheet_add_aoa(i,[s.headers],{origin:{r,c:0}}),e.utils.sheet_add_json(i,s.data,{origin:{r:r+1,c:0},skipHeader:!0}),r+=s.data.length+3}),t.additionalTexts&&(r+=1,t.additionalTexts.forEach((s,a)=>{Array.isArray(s)?s.forEach((l,u)=>{e.utils.sheet_add_aoa(i,[[l]],{origin:{r:r+a,c:u}})}):e.utils.sheet_add_aoa(i,[[s]],{origin:{r:r+a,c:0}})})),e.utils.book_append_sheet(n,i,"Sheet1");const o=new Date().toLocaleDateString("en-gb",{day:"2-digit",month:"2-digit",year:"2-digit"}).replaceAll("/","");e.writeFile(n,`${t.fileName}-${o}.xlsx`)}),uv=(t,e,n)=>(t??[]).map(i=>{const r={};return e.forEach(o=>{const{field:s,exportField:a,dateFormatOptions:l}=o,u=a??s,c=zn(i,u),d=c===void 0||c===""?o.emptyText??"-":c;if(o.includeTruthyProperties){const f=d??{},p=Object.keys(f).map(h=>{if(f[h])return h}).filter(Boolean);r[u]=p.join(",")}else if(Array.isArray(d)){let f=d;o.arrayValueField&&(f=d.map(p=>{var h;return((h=zn(p,o.arrayValueField))==null?void 0:h.toString())||o.emptyText||"-"})),r[u]=f.join(f.length>1?",":"")}else l?r[u]=bu(new Date(d),l):o.booleanValue?r[u]=d?n.trueText:n.falseText:r[u]=d}),r}),cv=ce("flattenTreeNodeChildren",t=>t?t.flatMap(e=>[{...e},...cv(e.children)]):[]);function dv(t){switch(t){case"Available":case"Approved":case"Finished Approval":return"success";case"Damaged":case"Missing":case"Rejected":case"Reported Missing":case"Reported Damaged":case"TAG Reported":case"Not Paired Yet":case"Expired License":return"danger";case"Unassigned":case"Reported Disposal":case"On Disposal Process":case"Disposed":case"Non-Transactionable":return"dark";case"On Transfer":case"Waiting for Handover":case"Waiting for Approval":case"Need Approval":case"TAG Not Set":return"warning";default:return"primary"}}var fv=typeof global=="object"&&global&&global.Object===Object&&global,iC=typeof self=="object"&&self&&self.Object===Object&&self,Qi=fv||iC||Function("return this")(),to=Qi.Symbol,pv=Object.prototype,rC=pv.hasOwnProperty,oC=pv.toString,Oa=to?to.toStringTag:void 0;function sC(t){var e=rC.call(t,Oa),n=t[Oa];try{t[Oa]=void 0;var i=!0}catch{}var r=oC.call(t);return i&&(e?t[Oa]=n:delete t[Oa]),r}var aC=Object.prototype,lC=aC.toString;function uC(t){return lC.call(t)}var cC="[object Null]",dC="[object Undefined]",hv=to?to.toStringTag:void 0;function Bs(t){return t==null?t===void 0?dC:cC:hv&&hv in Object(t)?sC(t):uC(t)}function no(t){return t!=null&&typeof t=="object"}var fC="[object Symbol]";function pC(t){return typeof t=="symbol"||no(t)&&Bs(t)==fC}var xa=Array.isArray,hC=/\s/;function mC(t){for(var e=t.length;e--&&hC.test(t.charAt(e)););return e}var gC=/^\s+/;function vC(t){return t&&t.slice(0,mC(t)+1).replace(gC,"")}function jo(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var mv=NaN,yC=/^[-+]0x[0-9a-f]+$/i,bC=/^0b[01]+$/i,AC=/^0o[0-7]+$/i,wC=parseInt;function gv(t){if(typeof t=="number")return t;if(pC(t))return mv;if(jo(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=jo(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=vC(t);var n=bC.test(t);return n||AC.test(t)?wC(t.slice(2),n?2:8):yC.test(t)?mv:+t}var SC="[object AsyncFunction]",CC="[object Function]",kC="[object GeneratorFunction]",TC="[object Proxy]";function vv(t){if(!jo(t))return!1;var e=Bs(t);return e==CC||e==kC||e==SC||e==TC}var ff=Qi["__core-js_shared__"],yv=function(){var t=/[^.]+$/.exec(ff&&ff.keys&&ff.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function OC(t){return!!yv&&yv in t}var xC=Function.prototype,MC=xC.toString;function Uo(t){if(t!=null){try{return MC.call(t)}catch{}try{return t+""}catch{}}return""}var EC=/[\\^$.*+?()[\]{}|]/g,IC=/^\[object .+?Constructor\]$/,PC=Function.prototype,LC=Object.prototype,DC=PC.toString,RC=LC.hasOwnProperty,BC=RegExp("^"+DC.call(RC).replace(EC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function NC(t){if(!jo(t)||OC(t))return!1;var e=vv(t)?BC:IC;return e.test(Uo(t))}function $C(t,e){return t==null?void 0:t[e]}function Ko(t,e){var n=$C(t,e);return NC(n)?n:void 0}var pf=Ko(Qi,"WeakMap"),bv=Object.create,VC=function(){function t(){}return function(e){if(!jo(e))return{};if(bv)return bv(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),Av=function(){try{var t=Ko(Object,"defineProperty");return t({},"",{}),t}catch{}}();function zC(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}var FC=9007199254740991,HC=/^(?:0|[1-9]\d*)$/;function jC(t,e){var n=typeof t;return e=e??FC,!!e&&(n=="number"||n!="symbol"&&HC.test(t))&&t>-1&&t%1==0&&t<e}function UC(t,e,n){e=="__proto__"&&Av?Av(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function hf(t,e){return t===e||t!==t&&e!==e}var KC=Object.prototype,WC=KC.hasOwnProperty;function qC(t,e,n){var i=t[e];(!(WC.call(t,e)&&hf(i,n))||n===void 0&&!(e in t))&&UC(t,e,n)}var XC=9007199254740991;function wv(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=XC}function GC(t){return t!=null&&wv(t.length)&&!vv(t)}var ZC=Object.prototype;function Sv(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||ZC;return t===n}function _C(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var JC="[object Arguments]";function Cv(t){return no(t)&&Bs(t)==JC}var kv=Object.prototype,YC=kv.hasOwnProperty,QC=kv.propertyIsEnumerable,e4=Cv(function(){return arguments}())?Cv:function(t){return no(t)&&YC.call(t,"callee")&&!QC.call(t,"callee")};function t4(){return!1}var Tv=typeof ce=="object"&&ce&&!ce.nodeType&&ce,Ov=Tv&&typeof Gt=="object"&&Gt&&!Gt.nodeType&&Gt,n4=Ov&&Ov.exports===Tv,xv=n4?Qi.Buffer:void 0,i4=xv?xv.isBuffer:void 0,Au=i4||t4,r4="[object Arguments]",o4="[object Array]",s4="[object Boolean]",a4="[object Date]",l4="[object Error]",u4="[object Function]",c4="[object Map]",d4="[object Number]",f4="[object Object]",p4="[object RegExp]",h4="[object Set]",m4="[object String]",g4="[object WeakMap]",v4="[object ArrayBuffer]",y4="[object DataView]",b4="[object Float32Array]",A4="[object Float64Array]",w4="[object Int8Array]",S4="[object Int16Array]",C4="[object Int32Array]",k4="[object Uint8Array]",T4="[object Uint8ClampedArray]",O4="[object Uint16Array]",x4="[object Uint32Array]",mn={};mn[b4]=mn[A4]=mn[w4]=mn[S4]=mn[C4]=mn[k4]=mn[T4]=mn[O4]=mn[x4]=!0,mn[r4]=mn[o4]=mn[v4]=mn[s4]=mn[y4]=mn[a4]=mn[l4]=mn[u4]=mn[c4]=mn[d4]=mn[f4]=mn[p4]=mn[h4]=mn[m4]=mn[g4]=!1;function M4(t){return no(t)&&wv(t.length)&&!!mn[Bs(t)]}function mf(t){return function(e){return t(e)}}var Mv=typeof ce=="object"&&ce&&!ce.nodeType&&ce,Ma=Mv&&typeof Gt=="object"&&Gt&&!Gt.nodeType&&Gt,E4=Ma&&Ma.exports===Mv,gf=E4&&fv.process,Ns=function(){try{var t=Ma&&Ma.require&&Ma.require("util").types;return t||gf&&gf.binding&&gf.binding("util")}catch{}}(),Ev=Ns&&Ns.isTypedArray,Iv=Ev?mf(Ev):M4,I4=Object.prototype,P4=I4.hasOwnProperty;function L4(t,e){var n=xa(t),i=!n&&e4(t),r=!n&&!i&&Au(t),o=!n&&!i&&!r&&Iv(t),s=n||i||r||o,a=s?_C(t.length,String):[],l=a.length;for(var u in t)P4.call(t,u)&&!(s&&(u=="length"||r&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||jC(u,l)))&&a.push(u);return a}function Pv(t,e){return function(n){return t(e(n))}}var D4=Pv(Object.keys,Object),R4=Object.prototype,B4=R4.hasOwnProperty;function N4(t){if(!Sv(t))return D4(t);var e=[];for(var n in Object(t))B4.call(t,n)&&n!="constructor"&&e.push(n);return e}function $4(t){return GC(t)?L4(t):N4(t)}var Ea=Ko(Object,"create");function V4(){this.__data__=Ea?Ea(null):{},this.size=0}function z4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var F4="__lodash_hash_undefined__",H4=Object.prototype,j4=H4.hasOwnProperty;function U4(t){var e=this.__data__;if(Ea){var n=e[t];return n===F4?void 0:n}return j4.call(e,t)?e[t]:void 0}var K4=Object.prototype,W4=K4.hasOwnProperty;function q4(t){var e=this.__data__;return Ea?e[t]!==void 0:W4.call(e,t)}var X4="__lodash_hash_undefined__";function G4(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ea&&e===void 0?X4:e,this}function Wo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Wo.prototype.clear=V4,Wo.prototype.delete=z4,Wo.prototype.get=U4,Wo.prototype.has=q4,Wo.prototype.set=G4;function Z4(){this.__data__=[],this.size=0}function wu(t,e){for(var n=t.length;n--;)if(hf(t[n][0],e))return n;return-1}var _4=Array.prototype,J4=_4.splice;function Y4(t){var e=this.__data__,n=wu(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():J4.call(e,n,1),--this.size,!0}function Q4(t){var e=this.__data__,n=wu(e,t);return n<0?void 0:e[n][1]}function ek(t){return wu(this.__data__,t)>-1}function tk(t,e){var n=this.__data__,i=wu(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function Dr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Dr.prototype.clear=Z4,Dr.prototype.delete=Y4,Dr.prototype.get=Q4,Dr.prototype.has=ek,Dr.prototype.set=tk;var Ia=Ko(Qi,"Map");function nk(){this.size=0,this.__data__={hash:new Wo,map:new(Ia||Dr),string:new Wo}}function ik(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Su(t,e){var n=t.__data__;return ik(e)?n[typeof e=="string"?"string":"hash"]:n.map}function rk(t){var e=Su(this,t).delete(t);return this.size-=e?1:0,e}function ok(t){return Su(this,t).get(t)}function sk(t){return Su(this,t).has(t)}function ak(t,e){var n=Su(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}function qo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}qo.prototype.clear=nk,qo.prototype.delete=rk,qo.prototype.get=ok,qo.prototype.has=sk,qo.prototype.set=ak;function lk(t){return""}function uk(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}var ck=Pv(Object.getPrototypeOf,Object);function dk(){this.__data__=new Dr,this.size=0}function fk(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function pk(t){return this.__data__.get(t)}function hk(t){return this.__data__.has(t)}var mk=200;function gk(t,e){var n=this.__data__;if(n instanceof Dr){var i=n.__data__;if(!Ia||i.length<mk-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new qo(i)}return n.set(t,e),this.size=n.size,this}function Rr(t){var e=this.__data__=new Dr(t);this.size=e.size}Rr.prototype.clear=dk,Rr.prototype.delete=fk,Rr.prototype.get=pk,Rr.prototype.has=hk,Rr.prototype.set=gk;var Lv=typeof ce=="object"&&ce&&!ce.nodeType&&ce,Dv=Lv&&typeof Gt=="object"&&Gt&&!Gt.nodeType&&Gt,vk=Dv&&Dv.exports===Lv,Rv=vk?Qi.Buffer:void 0;Rv&&Rv.allocUnsafe;function yk(t,e){return t.slice()}function bk(t,e){for(var n=-1,i=t==null?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}function Ak(){return[]}var wk=Object.prototype,Sk=wk.propertyIsEnumerable,Bv=Object.getOwnPropertySymbols,Ck=Bv?function(t){return t==null?[]:(t=Object(t),bk(Bv(t),function(e){return Sk.call(t,e)}))}:Ak;function kk(t,e,n){var i=e(t);return xa(t)?i:uk(i,n(t))}function vf(t){return kk(t,$4,Ck)}var yf=Ko(Qi,"DataView"),bf=Ko(Qi,"Promise"),Af=Ko(Qi,"Set"),Nv="[object Map]",Tk="[object Object]",$v="[object Promise]",Vv="[object Set]",zv="[object WeakMap]",Fv="[object DataView]",Ok=Uo(yf),xk=Uo(Ia),Mk=Uo(bf),Ek=Uo(Af),Ik=Uo(pf),er=Bs;(yf&&er(new yf(new ArrayBuffer(1)))!=Fv||Ia&&er(new Ia)!=Nv||bf&&er(bf.resolve())!=$v||Af&&er(new Af)!=Vv||pf&&er(new pf)!=zv)&&(er=function(t){var e=Bs(t),n=e==Tk?t.constructor:void 0,i=n?Uo(n):"";if(i)switch(i){case Ok:return Fv;case xk:return Nv;case Mk:return $v;case Ek:return Vv;case Ik:return zv}return e});var Pk=Object.prototype,Lk=Pk.hasOwnProperty;function Dk(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&Lk.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Cu=Qi.Uint8Array;function wf(t){var e=new t.constructor(t.byteLength);return new Cu(e).set(new Cu(t)),e}function Rk(t,e){var n=wf(t.buffer);return new t.constructor(n,t.byteOffset,t.byteLength)}var Bk=/\w*$/;function Nk(t){var e=new t.constructor(t.source,Bk.exec(t));return e.lastIndex=t.lastIndex,e}var Hv=to?to.prototype:void 0,jv=Hv?Hv.valueOf:void 0;function $k(t){return jv?Object(jv.call(t)):{}}function Vk(t,e){var n=wf(t.buffer);return new t.constructor(n,t.byteOffset,t.length)}var zk="[object Boolean]",Fk="[object Date]",Hk="[object Map]",jk="[object Number]",Uk="[object RegExp]",Kk="[object Set]",Wk="[object String]",qk="[object Symbol]",Xk="[object ArrayBuffer]",Gk="[object DataView]",Zk="[object Float32Array]",_k="[object Float64Array]",Jk="[object Int8Array]",Yk="[object Int16Array]",Qk="[object Int32Array]",e8="[object Uint8Array]",t8="[object Uint8ClampedArray]",n8="[object Uint16Array]",i8="[object Uint32Array]";function r8(t,e,n){var i=t.constructor;switch(e){case Xk:return wf(t);case zk:case Fk:return new i(+t);case Gk:return Rk(t);case Zk:case _k:case Jk:case Yk:case Qk:case e8:case t8:case n8:case i8:return Vk(t);case Hk:return new i;case jk:case Wk:return new i(t);case Uk:return Nk(t);case Kk:return new i;case qk:return $k(t)}}function o8(t){return typeof t.constructor=="function"&&!Sv(t)?VC(ck(t)):{}}var s8="[object Map]";function a8(t){return no(t)&&er(t)==s8}var Uv=Ns&&Ns.isMap,l8=Uv?mf(Uv):a8,u8="[object Set]";function c8(t){return no(t)&&er(t)==u8}var Kv=Ns&&Ns.isSet,d8=Kv?mf(Kv):c8,Wv="[object Arguments]",f8="[object Array]",p8="[object Boolean]",h8="[object Date]",m8="[object Error]",qv="[object Function]",g8="[object GeneratorFunction]",v8="[object Map]",y8="[object Number]",Xv="[object Object]",b8="[object RegExp]",A8="[object Set]",w8="[object String]",S8="[object Symbol]",C8="[object WeakMap]",k8="[object ArrayBuffer]",T8="[object DataView]",O8="[object Float32Array]",x8="[object Float64Array]",M8="[object Int8Array]",E8="[object Int16Array]",I8="[object Int32Array]",P8="[object Uint8Array]",L8="[object Uint8ClampedArray]",D8="[object Uint16Array]",R8="[object Uint32Array]",fn={};fn[Wv]=fn[f8]=fn[k8]=fn[T8]=fn[p8]=fn[h8]=fn[O8]=fn[x8]=fn[M8]=fn[E8]=fn[I8]=fn[v8]=fn[y8]=fn[Xv]=fn[b8]=fn[A8]=fn[w8]=fn[S8]=fn[P8]=fn[L8]=fn[D8]=fn[R8]=!0,fn[m8]=fn[qv]=fn[C8]=!1;function ku(t,e,n,i,r,o){var s;if(s!==void 0)return s;if(!jo(t))return t;var a=xa(t);if(a)s=Dk(t);else{var l=er(t),u=l==qv||l==g8;if(Au(t))return yk(t);if(l==Xv||l==Wv||u&&!r)s=u?{}:o8(t);else{if(!fn[l])return r?t:{};s=r8(t,l)}}o||(o=new Rr);var c=o.get(t);if(c)return c;o.set(t,s),d8(t)?t.forEach(function(p){s.add(ku(p,e,n,p,t,o))}):l8(t)&&t.forEach(function(p,h){s.set(h,ku(p,e,n,h,t,o))});var d=vf,f=a?void 0:d(t);return zC(f||t,function(p,h){f&&(h=p,p=t[h]),qC(s,h,ku(p,e,n,h,t,o))}),s}var B8=1,N8=4;function io(t){return ku(t,B8|N8)}var $8="__lodash_hash_undefined__";function V8(t){return this.__data__.set(t,$8),this}function z8(t){return this.__data__.has(t)}function Tu(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new qo;++e<n;)this.add(t[e])}Tu.prototype.add=Tu.prototype.push=V8,Tu.prototype.has=z8;function F8(t,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function H8(t,e){return t.has(e)}var j8=1,U8=2;function Gv(t,e,n,i,r,o){var s=n&j8,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var d=-1,f=!0,p=n&U8?new Tu:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var h=t[d],m=e[d];if(i)var v=s?i(m,h,d,e,t,o):i(h,m,d,t,e,o);if(v!==void 0){if(v)continue;f=!1;break}if(p){if(!F8(e,function(S,b){if(!H8(p,b)&&(h===S||r(h,S,n,i,o)))return p.push(b)})){f=!1;break}}else if(!(h===m||r(h,m,n,i,o))){f=!1;break}}return o.delete(t),o.delete(e),f}function K8(t){var e=-1,n=Array(t.size);return t.forEach(function(i,r){n[++e]=[r,i]}),n}function W8(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var q8=1,X8=2,G8="[object Boolean]",Z8="[object Date]",_8="[object Error]",J8="[object Map]",Y8="[object Number]",Q8="[object RegExp]",e5="[object Set]",t5="[object String]",n5="[object Symbol]",i5="[object ArrayBuffer]",r5="[object DataView]",Zv=to?to.prototype:void 0,Sf=Zv?Zv.valueOf:void 0;function o5(t,e,n,i,r,o,s){switch(n){case r5:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case i5:return!(t.byteLength!=e.byteLength||!o(new Cu(t),new Cu(e)));case G8:case Z8:case Y8:return hf(+t,+e);case _8:return t.name==e.name&&t.message==e.message;case Q8:case t5:return t==e+"";case J8:var a=K8;case e5:var l=i&q8;if(a||(a=W8),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;i|=X8,s.set(t,e);var c=Gv(a(t),a(e),i,r,o,s);return s.delete(t),c;case n5:if(Sf)return Sf.call(t)==Sf.call(e)}return!1}var s5=1,a5=Object.prototype,l5=a5.hasOwnProperty;function u5(t,e,n,i,r,o){var s=n&s5,a=vf(t),l=a.length,u=vf(e),c=u.length;if(l!=c&&!s)return!1;for(var d=l;d--;){var f=a[d];if(!(s?f in e:l5.call(e,f)))return!1}var p=o.get(t),h=o.get(e);if(p&&h)return p==e&&h==t;var m=!0;o.set(t,e),o.set(e,t);for(var v=s;++d<l;){f=a[d];var S=t[f],b=e[f];if(i)var k=s?i(b,S,f,e,t,o):i(S,b,f,t,e,o);if(!(k===void 0?S===b||r(S,b,n,i,o):k)){m=!1;break}v||(v=f=="constructor")}if(m&&!v){var A=t.constructor,w=e.constructor;A!=w&&"constructor"in t&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof w=="function"&&w instanceof w)&&(m=!1)}return o.delete(t),o.delete(e),m}var c5=1,_v="[object Arguments]",Jv="[object Array]",Ou="[object Object]",d5=Object.prototype,Yv=d5.hasOwnProperty;function f5(t,e,n,i,r,o){var s=xa(t),a=xa(e),l=s?Jv:er(t),u=a?Jv:er(e);l=l==_v?Ou:l,u=u==_v?Ou:u;var c=l==Ou,d=u==Ou,f=l==u;if(f&&Au(t)){if(!Au(e))return!1;s=!0,c=!1}if(f&&!c)return o||(o=new Rr),s||Iv(t)?Gv(t,e,n,i,r,o):o5(t,e,l,n,i,r,o);if(!(n&c5)){var p=c&&Yv.call(t,"__wrapped__"),h=d&&Yv.call(e,"__wrapped__");if(p||h){var m=p?t.value():t,v=h?e.value():e;return o||(o=new Rr),r(m,v,n,i,o)}}return f?(o||(o=new Rr),u5(t,e,n,i,r,o)):!1}function Qv(t,e,n,i,r){return t===e?!0:t==null||e==null||!no(t)&&!no(e)?t!==t&&e!==e:f5(t,e,n,i,Qv,r)}var Cf=function(){return Qi.Date.now()},p5="Expected a function",h5=Math.max,m5=Math.min;function g5(t,e,n){var i,r,o,s,a,l,u=0,c=!1,d=!1,f=!0;if(typeof t!="function")throw new TypeError(p5);e=gv(e)||0,jo(n)&&(c=!!n.leading,d="maxWait"in n,o=d?h5(gv(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f);function p(y){var C=i,I=r;return i=r=void 0,u=y,s=t.apply(I,C),s}function h(y){return u=y,a=setTimeout(S,e),c?p(y):s}function m(y){var C=y-l,I=y-u,R=e-C;return d?m5(R,o-I):R}function v(y){var C=y-l,I=y-u;return l===void 0||C>=e||C<0||d&&I>=o}function S(){var y=Cf();if(v(y))return b(y);a=setTimeout(S,m(y))}function b(y){return a=void 0,f&&i?p(y):(i=r=void 0,s)}function k(){a!==void 0&&clearTimeout(a),u=0,i=l=r=a=void 0}function A(){return a===void 0?s:b(Cf())}function w(){var y=Cf(),C=v(y);if(i=arguments,r=this,l=y,C){if(a===void 0)return h(l);if(d)return clearTimeout(a),a=setTimeout(S,e),p(l)}return a===void 0&&(a=setTimeout(S,e)),s}return w.cancel=k,w.flush=A,w}function ey(t,e){return Qv(t,e)}var v5=0;function y5(t){var e=++v5;return lk()+e}const ro=({icons:t,template:e}={})=>{const n=_3();return{add:i=>{var m,v,S;const{message:r,customMessage:o,error:s,severity:a,life:l,group:u="default-toast",...c}=i;let d="";s instanceof Error&&s&&s.isAxiosError&&(d=s.code==="ERR_NETWORK"?(e==null?void 0:e.additionalMessage)??"":"");const f=s?"error":a??"success",p=((S=(v=(m=e==null?void 0:e.severity)==null?void 0:m[f])==null?void 0:v.replace("{message}",r))==null?void 0:S.replace("{additionalMessage}",d))||r,h=c.icon??(t==null?void 0:t[f]);n.add({severity:f,detail:o?r:p,life:l??3e3,group:u}),Ye.emit("toast:add",{messageId:y5(),...i,severity:f,group:u,icon:h})},removeGroup:i=>{n.removeGroup(i)},removeAllGroups:()=>{n.removeAllGroups()}}},ty={template:{severity:{success:"{message}",error:"{message} {additionalMessage}",info:"{message} {additionalMessage}"},additionalMessage:" Please check your connection and try again."}},tr=ce("useToast",()=>ro(ty)),ny=JSON.parse('[{"label":"؋ - Afghan Afghani","name":"Afghan Afghani","currency":"AFN","symbol":"؋","locale":"ps-AF"},{"label":"L - Albanian Lek","name":"Albanian Lek","currency":"ALL","symbol":"L","locale":"sq-AL"},{"label":"د.ج - Algerian Dinar","name":"Algerian Dinar","currency":"DZD","symbol":"د.ج","locale":"ar-DZ"},{"label":"Kz - Angolan Kwanza","name":"Angolan Kwanza","currency":"AOA","symbol":"Kz","locale":"pt-AO"},{"label":"$ - Argentine Peso","name":"Argentine Peso","currency":"ARS","symbol":"$","locale":"es-AR"},{"label":"֏ - Armenian Dram","name":"Armenian Dram","currency":"AMD","symbol":"֏","locale":"hy-AM"},{"label":"ƒ - Aruban Florin","name":"Aruban Florin","currency":"AWG","symbol":"ƒ","locale":"nl-AW"},{"label":"$ - Australian Dollar","name":"Australian Dollar","currency":"AUD","symbol":"$","locale":"en-AU"},{"label":"₼ - Azerbaijani Manat","name":"Azerbaijani Manat","currency":"AZN","symbol":"₼","locale":"az-AZ"},{"label":"$ - Bahamian Dollar","name":"Bahamian Dollar","currency":"BSD","symbol":"$","locale":"en-BS"},{"label":"ب.د - Bahraini Dinar","name":"Bahraini Dinar","currency":"BHD","symbol":"ب.د","locale":"ar-BH"},{"label":"৳ - Bangladeshi Taka","name":"Bangladeshi Taka","currency":"BDT","symbol":"৳","locale":"bn-BD"},{"label":"$ - Barbadian Dollar","name":"Barbadian Dollar","currency":"BBD","symbol":"$","locale":"en-BB"},{"label":"Br - Belarusian Ruble","name":"Belarusian Ruble","currency":"BYN","symbol":"Br","locale":"be-BY"},{"label":"$ - Belize Dollar","name":"Belize Dollar","currency":"BZD","symbol":"$","locale":"en-BZ"},{"label":"$ - Bermudian Dollar","name":"Bermudian Dollar","currency":"BMD","symbol":"$","locale":"en-BM"},{"label":"Nu. - Bhutanese Ngultrum","name":"Bhutanese Ngultrum","currency":"BTN","symbol":"Nu.","locale":"dz-BT"},{"label":"Bs. - Bolivian Boliviano","name":"Bolivian Boliviano","currency":"BOB","symbol":"Bs.","locale":"es-BO"},{"label":"KM - Bosnia-Herzegovina Convertible Mark","name":"Bosnia-Herzegovina Convertible Mark","currency":"BAM","symbol":"KM","locale":"bs-BA"},{"label":"P - Botswana Pula","name":"Botswana Pula","currency":"BWP","symbol":"P","locale":"en-BW"},{"label":"R$ - Brazilian Real","name":"Brazilian Real","currency":"BRL","symbol":"R$","locale":"pt-BR"},{"label":"$ - Brunei Dollar","name":"Brunei Dollar","currency":"BND","symbol":"$","locale":"ms-BN"},{"label":"лв - Bulgarian Lev","name":"Bulgarian Lev","currency":"BGN","symbol":"лв","locale":"bg-BG"},{"label":"FBu - Burundian Franc","name":"Burundian Franc","currency":"BIF","symbol":"FBu","locale":"fr-BI"},{"label":"$ - Cabo Verdean Escudo","name":"Cabo Verdean Escudo","currency":"CVE","symbol":"$","locale":"pt-CV"},{"label":"៛ - Cambodian Riel","name":"Cambodian Riel","currency":"KHR","symbol":"៛","locale":"km-KH"},{"label":"$ - Canadian Dollar","name":"Canadian Dollar","currency":"CAD","symbol":"$","locale":"en-CA"},{"label":"$ - Cayman Islands Dollar","name":"Cayman Islands Dollar","currency":"KYD","symbol":"$","locale":"en-KY"},{"label":"FCFA - Central African CFA Franc","name":"Central African CFA Franc","currency":"XAF","symbol":"FCFA","locale":"fr-CM"},{"label":"$ - Chilean Peso","name":"Chilean Peso","currency":"CLP","symbol":"$","locale":"es-CL"},{"label":"¥ - Chinese Yuan","name":"Chinese Yuan","currency":"CNY","symbol":"¥","locale":"zh-CN"},{"label":"$ - Colombian Peso","name":"Colombian Peso","currency":"COP","symbol":"$","locale":"es-CO"},{"label":"CF - Comorian Franc","name":"Comorian Franc","currency":"KMF","symbol":"CF","locale":"ar-KM"},{"label":"FC - Congolese Franc","name":"Congolese Franc","currency":"CDF","symbol":"FC","locale":"fr-CD"},{"label":"₡ - Costa Rican Colón","name":"Costa Rican Colón","currency":"CRC","symbol":"₡","locale":"es-CR"},{"label":"kn - Croatian Kuna","name":"Croatian Kuna","currency":"HRK","symbol":"kn","locale":"hr-HR"},{"label":"$ - Cuban Peso","name":"Cuban Peso","currency":"CUP","symbol":"$","locale":"es-CU"},{"label":"Kč - Czech Koruna","name":"Czech Koruna","currency":"CZK","symbol":"Kč","locale":"cs-CZ"},{"label":"kr - Danish Krone","name":"Danish Krone","currency":"DKK","symbol":"kr","locale":"da-DK"},{"label":"Fdj - Djiboutian Franc","name":"Djiboutian Franc","currency":"DJF","symbol":"Fdj","locale":"fr-DJ"},{"label":"$ - Dominican Peso","name":"Dominican Peso","currency":"DOP","symbol":"$","locale":"es-DO"},{"label":"$ - East Caribbean Dollar","name":"East Caribbean Dollar","currency":"XCD","symbol":"$","locale":"en-AI"},{"label":"£ - Egyptian Pound","name":"Egyptian Pound","currency":"EGP","symbol":"£","locale":"ar-EG"},{"label":"Nfk - Eritrean Nakfa","name":"Eritrean Nakfa","currency":"ERN","symbol":"Nfk","locale":"ti-ER"},{"label":"Br - Ethiopian Birr","name":"Ethiopian Birr","currency":"ETB","symbol":"Br","locale":"am-ET"},{"label":"€ - Euro","name":"Euro","currency":"EUR","symbol":"€","locale":"de-DE"},{"label":"$ - Fijian Dollar","name":"Fijian Dollar","currency":"FJD","symbol":"$","locale":"en-FJ"},{"label":"£ - Falkland Islands Pound","name":"Falkland Islands Pound","currency":"FKP","symbol":"£","locale":"en-FK"},{"label":"D - Gambian Dalasi","name":"Gambian Dalasi","currency":"GMD","symbol":"D","locale":"en-GM"},{"label":"₾ - Georgian Lari","name":"Georgian Lari","currency":"GEL","symbol":"₾","locale":"ka-GE"},{"label":"₵ - Ghanaian Cedi","name":"Ghanaian Cedi","currency":"GHS","symbol":"₵","locale":"en-GH"},{"label":"£ - Gibraltar Pound","name":"Gibraltar Pound","currency":"GIP","symbol":"£","locale":"en-GI"},{"label":"Q - Guatemalan Quetzal","name":"Guatemalan Quetzal","currency":"GTQ","symbol":"Q","locale":"es-GT"},{"label":"FG - Guinean Franc","name":"Guinean Franc","currency":"GNF","symbol":"FG","locale":"fr-GN"},{"label":"$ - Guyanese Dollar","name":"Guyanese Dollar","currency":"GYD","symbol":"$","locale":"en-GY"},{"label":"G - Haitian Gourde","name":"Haitian Gourde","currency":"HTG","symbol":"G","locale":"ht-HT"},{"label":"L - Honduran Lempira","name":"Honduran Lempira","currency":"HNL","symbol":"L","locale":"es-HN"},{"label":"$ - Hong Kong Dollar","name":"Hong Kong Dollar","currency":"HKD","symbol":"$","locale":"en-HK"},{"label":"Ft - Hungarian Forint","name":"Hungarian Forint","currency":"HUF","symbol":"Ft","locale":"hu-HU"},{"label":"kr - Icelandic Króna","name":"Icelandic Króna","currency":"ISK","symbol":"kr","locale":"is-IS"},{"label":"₹ - Indian Rupee","name":"Indian Rupee","currency":"INR","symbol":"₹","locale":"hi-IN"},{"label":"Rp - Indonesian Rupiah","name":"Indonesian Rupiah","currency":"IDR","symbol":"Rp","locale":"id-ID"},{"label":"﷼ - Iranian Rial","name":"Iranian Rial","currency":"IRR","symbol":"﷼","locale":"fa-IR"},{"label":"ع.د - Iraqi Dinar","name":"Iraqi Dinar","currency":"IQD","symbol":"ع.د","locale":"ar-IQ"},{"label":"₪ - Israeli Shekel","name":"Israeli Shekel","currency":"ILS","symbol":"₪","locale":"he-IL"},{"label":"$ - Jamaican Dollar","name":"Jamaican Dollar","currency":"JMD","symbol":"$","locale":"en-JM"},{"label":"¥ - Japanese Yen","name":"Japanese Yen","currency":"JPY","symbol":"¥","locale":"ja-JP"},{"label":"د.ا - Jordanian Dinar","name":"Jordanian Dinar","currency":"JOD","symbol":"د.ا","locale":"ar-JO"},{"label":"₸ - Kazakhstani Tenge","name":"Kazakhstani Tenge","currency":"KZT","symbol":"₸","locale":"kk-KZ"},{"label":"KSh - Kenyan Shilling","name":"Kenyan Shilling","currency":"KES","symbol":"KSh","locale":"en-KE"},{"label":"$ - Kiribati Dollar","name":"Kiribati Dollar","currency":"KID","symbol":"$","locale":"en-KI"},{"label":"د.ك - Kuwaiti Dinar","name":"Kuwaiti Dinar","currency":"KWD","symbol":"د.ك","locale":"ar-KW"},{"label":"лв - Kyrgyzstani Som","name":"Kyrgyzstani Som","currency":"KGS","symbol":"лв","locale":"ky-KG"},{"label":"₭ - Lao Kip","name":"Lao Kip","currency":"LAK","symbol":"₭","locale":"lo-LA"},{"label":"ل.ل - Lebanese Pound","name":"Lebanese Pound","currency":"LBP","symbol":"ل.ل","locale":"ar-LB"},{"label":"L - Lesotho Loti","name":"Lesotho Loti","currency":"LSL","symbol":"L","locale":"st-LS"},{"label":"$ - Liberian Dollar","name":"Liberian Dollar","currency":"LRD","symbol":"$","locale":"en-LR"},{"label":"ل.د - Libyan Dinar","name":"Libyan Dinar","currency":"LYD","symbol":"ل.د","locale":"ar-LY"},{"label":"MOP$ - Macanese Pataca","name":"Macanese Pataca","currency":"MOP","symbol":"MOP$","locale":"zh-MO"},{"label":"ден - Macedonian Denar","name":"Macedonian Denar","currency":"MKD","symbol":"ден","locale":"mk-MK"},{"label":"Ar - Malagasy Ariary","name":"Malagasy Ariary","currency":"MGA","symbol":"Ar","locale":"mg-MG"},{"label":"MK - Malawian Kwacha","name":"Malawian Kwacha","currency":"MWK","symbol":"MK","locale":"en-MW"},{"label":"RM - Malaysian Ringgit","name":"Malaysian Ringgit","currency":"MYR","symbol":"RM","locale":"ms-MY"},{"label":"ރ - Maldivian Rufiyaa","name":"Maldivian Rufiyaa","currency":"MVR","symbol":"ރ","locale":"dv-MV"},{"label":"UM - Mauritanian Ouguiya","name":"Mauritanian Ouguiya","currency":"MRU","symbol":"UM","locale":"ar-MR"},{"label":"₨ - Mauritian Rupee","name":"Mauritian Rupee","currency":"MUR","symbol":"₨","locale":"mfe-MU"},{"label":"$ - Mexican Peso","name":"Mexican Peso","currency":"MXN","symbol":"$","locale":"es-MX"},{"label":"L - Moldovan Leu","name":"Moldovan Leu","currency":"MDL","symbol":"L","locale":"ro-MD"},{"label":"₮ - Mongolian Tugrik","name":"Mongolian Tugrik","currency":"MNT","symbol":"₮","locale":"mn-MN"},{"label":"د.م. - Moroccan Dirham","name":"Moroccan Dirham","currency":"MAD","symbol":"د.م.","locale":"ar-MA"},{"label":"MT - Mozambican Metical","name":"Mozambican Metical","currency":"MZN","symbol":"MT","locale":"pt-MZ"},{"label":"K - Myanmar Kyat","name":"Myanmar Kyat","currency":"MMK","symbol":"K","locale":"my-MM"},{"label":"$ - Namibian Dollar","name":"Namibian Dollar","currency":"NAD","symbol":"$","locale":"en-NA"},{"label":"₨ - Nepalese Rupee","name":"Nepalese Rupee","currency":"NPR","symbol":"₨","locale":"ne-NP"},{"label":"ƒ - Netherlands Antillean Guilder","name":"Netherlands Antillean Guilder","currency":"ANG","symbol":"ƒ","locale":"nl-CW"},{"label":"$ - New Zealand Dollar","name":"New Zealand Dollar","currency":"NZD","symbol":"$","locale":"en-NZ"},{"label":"C$ - Nicaraguan Córdoba","name":"Nicaraguan Córdoba","currency":"NIO","symbol":"C$","locale":"es-NI"},{"label":"₦ - Nigerian Naira","name":"Nigerian Naira","currency":"NGN","symbol":"₦","locale":"en-NG"},{"label":"kr - Norwegian Krone","name":"Norwegian Krone","currency":"NOK","symbol":"kr","locale":"nb-NO"},{"label":"ر.ع. - Omani Rial","name":"Omani Rial","currency":"OMR","symbol":"ر.ع.","locale":"ar-OM"},{"label":"₨ - Pakistani Rupee","name":"Pakistani Rupee","currency":"PKR","symbol":"₨","locale":"ur-PK"},{"label":"B/. - Panamanian Balboa","name":"Panamanian Balboa","currency":"PAB","symbol":"B/.","locale":"es-PA"},{"label":"K - Papua New Guinean Kina","name":"Papua New Guinean Kina","currency":"PGK","symbol":"K","locale":"en-PG"},{"label":"₲ - Paraguayan Guarani","name":"Paraguayan Guarani","currency":"PYG","symbol":"₲","locale":"es-PY"},{"label":"S/ - Peruvian Sol","name":"Peruvian Sol","currency":"PEN","symbol":"S/","locale":"es-PE"},{"label":"₱ - Philippine Peso","name":"Philippine Peso","currency":"PHP","symbol":"₱","locale":"fil-PH"},{"label":"zł - Polish Zloty","name":"Polish Zloty","currency":"PLN","symbol":"zł","locale":"pl-PL"},{"label":"ر.ق - Qatari Riyal","name":"Qatari Riyal","currency":"QAR","symbol":"ر.ق","locale":"ar-QA"},{"label":"lei - Romanian Leu","name":"Romanian Leu","currency":"RON","symbol":"lei","locale":"ro-RO"},{"label":"₽ - Russian Ruble","name":"Russian Ruble","currency":"RUB","symbol":"₽","locale":"ru-RU"},{"label":"RF - Rwandan Franc","name":"Rwandan Franc","currency":"RWF","symbol":"RF","locale":"rw-RW"},{"label":"£ - Saint Helena Pound","name":"Saint Helena Pound","currency":"SHP","symbol":"£","locale":"en-SH"},{"label":"T - Samoan Tala","name":"Samoan Tala","currency":"WST","symbol":"T","locale":"sm-WS"},{"label":"Db - São Tomé and Príncipe Dobra","name":"São Tomé and Príncipe Dobra","currency":"STN","symbol":"Db","locale":"pt-ST"},{"label":"ر.س - Saudi Riyal","name":"Saudi Riyal","currency":"SAR","symbol":"ر.س","locale":"ar-SA"},{"label":"дин - Serbian Dinar","name":"Serbian Dinar","currency":"RSD","symbol":"дин","locale":"sr-RS"},{"label":"₨ - Seychellois Rupee","name":"Seychellois Rupee","currency":"SCR","symbol":"₨","locale":"fr-SC"},{"label":"Le - Sierra Leonean Leone","name":"Sierra Leonean Leone","currency":"SLE","symbol":"Le","locale":"en-SL"},{"label":"$ - Singapore Dollar","name":"Singapore Dollar","currency":"SGD","symbol":"$","locale":"en-SG"},{"label":"$ - Solomon Islands Dollar","name":"Solomon Islands Dollar","currency":"SBD","symbol":"$","locale":"en-SB"},{"label":"Sh - Somali Shilling","name":"Somali Shilling","currency":"SOS","symbol":"Sh","locale":"so-SO"},{"label":"R - South African Rand","name":"South African Rand","currency":"ZAR","symbol":"R","locale":"en-ZA"},{"label":"₩ - South Korean Won","name":"South Korean Won","currency":"KRW","symbol":"₩","locale":"ko-KR"},{"label":"£ - South Sudanese Pound","name":"South Sudanese Pound","currency":"SSP","symbol":"£","locale":"en-SS"},{"label":"₨ - Sri Lankan Rupee","name":"Sri Lankan Rupee","currency":"LKR","symbol":"₨","locale":"si-LK"},{"label":"£ - Sudanese Pound","name":"Sudanese Pound","currency":"SDG","symbol":"£","locale":"ar-SD"},{"label":"$ - Surinamese Dollar","name":"Surinamese Dollar","currency":"SRD","symbol":"$","locale":"nl-SR"},{"label":"E - Swazi Lilangeni","name":"Swazi Lilangeni","currency":"SZL","symbol":"E","locale":"en-SZ"},{"label":"kr - Swedish Krona","name":"Swedish Krona","currency":"SEK","symbol":"kr","locale":"sv-SE"},{"label":"Fr - Swiss Franc","name":"Swiss Franc","currency":"CHF","symbol":"Fr","locale":"fr-CH"},{"label":"£ - Syrian Pound","name":"Syrian Pound","currency":"SYP","symbol":"£","locale":"ar-SY"},{"label":"ЅМ - Tajikistani Somoni","name":"Tajikistani Somoni","currency":"TJS","symbol":"ЅМ","locale":"tg-TJ"},{"label":"Sh - Tanzanian Shilling","name":"Tanzanian Shilling","currency":"TZS","symbol":"Sh","locale":"sw-TZ"},{"label":"฿ - Thai Baht","name":"Thai Baht","currency":"THB","symbol":"฿","locale":"th-TH"},{"label":"T$ - Tongan Paʻanga","name":"Tongan Paʻanga","currency":"TOP","symbol":"T$","locale":"to-TO"},{"label":"$ - Trinidad and Tobago Dollar","name":"Trinidad and Tobago Dollar","currency":"TTD","symbol":"$","locale":"en-TT"},{"label":"د.ت - Tunisian Dinar","name":"Tunisian Dinar","currency":"TND","symbol":"د.ت","locale":"ar-TN"},{"label":"₺ - Turkish Lira","name":"Turkish Lira","currency":"TRY","symbol":"₺","locale":"tr-TR"},{"label":"T - Turkmenistani Manat","name":"Turkmenistani Manat","currency":"TMT","symbol":"T","locale":"tk-TM"},{"label":"USh - Ugandan Shilling","name":"Ugandan Shilling","currency":"UGX","symbol":"USh","locale":"en-UG"},{"label":"₴ - Ukrainian Hryvnia","name":"Ukrainian Hryvnia","currency":"UAH","symbol":"₴","locale":"uk-UA"},{"label":"د.إ - United Arab Emirates Dirham","name":"United Arab Emirates Dirham","currency":"AED","symbol":"د.إ","locale":"ar-AE"},{"label":"$ - United States Dollar","name":"United States Dollar","currency":"USD","symbol":"$","locale":"en-US"},{"label":"$ - Uruguayan Peso","name":"Uruguayan Peso","currency":"UYU","symbol":"$","locale":"es-UY"},{"label":"лв - Uzbekistani Som","name":"Uzbekistani Som","currency":"UZS","symbol":"лв","locale":"uz-UZ"},{"label":"VT - Vanuatu Vatu","name":"Vanuatu Vatu","currency":"VUV","symbol":"VT","locale":"bi-VU"},{"label":"Bs. - Venezuelan Bolívar","name":"Venezuelan Bolívar","currency":"VES","symbol":"Bs.","locale":"es-VE"},{"label":"₫ - Vietnamese Dong","name":"Vietnamese Dong","currency":"VND","symbol":"₫","locale":"vi-VN"},{"label":"CFA - West African CFA Franc","name":"West African CFA Franc","currency":"XOF","symbol":"CFA","locale":"fr-SN"},{"label":"﷼ - Yemeni Rial","name":"Yemeni Rial","currency":"YER","symbol":"﷼","locale":"ar-YE"},{"label":"ZK - Zambian Kwacha","name":"Zambian Kwacha","currency":"ZMW","symbol":"ZK","locale":"en-ZM"},{"label":"$ - Zimbabwean Dollar","name":"Zimbabwean Dollar","currency":"ZWL","symbol":"$","locale":"en-ZW"}]'),kf=(t="IDR")=>ny.find(e=>e.currency===t)??{label:"$ - United States Dollar",name:"United States Dollar",currency:"USD",symbol:"$",locale:"en-US"},BX=ce("formatCurrency",(t,e,n=!0)=>{const{locale:i,currency:r}=kf(e);return t==null?"-":Number(t).toLocaleString(i,{style:n?"currency":void 0,currency:r}).replace("Rp ","Rp")}),iy=oe(!1),ry=re(),$i=ce("useLoadingStore",()=>({loading:iy,message:ry,setLoading:(e,n)=>{iy.value=e,ry.value=n,document.body.classList[e?"add":"remove"]("loading")}}));function Pa(t){"@babel/helpers - typeof";return Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pa(t)}function oy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function sy(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?oy(Object(n),!0).forEach(function(i){b5(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oy(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function b5(t,e,n){return e=A5(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A5(t){var e=w5(t,"string");return Pa(e)=="symbol"?e:String(e)}function w5(t,e){if(Pa(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Pa(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function S5(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Pr()?wt(t):e?t():Et(t)}var C5=0;function ay(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=re(!1),i=re(t),r=re(null),o=G.isClient()?window.document:void 0,s=e.document,a=s===void 0?o:s,l=e.immediate,u=l===void 0?!0:l,c=e.manual,d=c===void 0?!1:c,f=e.name,p=f===void 0?"style_".concat(++C5):f,h=e.id,m=h===void 0?void 0:h,v=e.media,S=v===void 0?void 0:v,b=e.nonce,k=b===void 0?void 0:b,A=e.props,w=A===void 0?{}:A,y=function(){},C=function(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(a){var $=sy(sy({},w),D),W=$.name||p,ie=$.id||m,ve=$.nonce||k;r.value=a.querySelector('style[data-primevue-style-id="'.concat(W,'"]'))||a.getElementById(ie)||a.createElement("style"),r.value.isConnected||(i.value=M||t,G.setAttributes(r.value,{type:"text/css",id:ie,media:S,nonce:ve}),a.head.appendChild(r.value),G.setAttribute(r.value,"data-primevue-style-id",p),G.setAttributes(r.value,$)),!n.value&&(y=$e(i,function(ae){r.value.textContent=ae},{immediate:!0}),n.value=!0)}},I=function(){!a||!n.value||(y(),G.isExist(r.value)&&a.head.removeChild(r.value),n.value=!1)};return u&&!d&&S5(C),{id:m,name:p,css:i,unload:I,load:C,isLoaded:Kd(n)}}function La(t){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},La(t)}function k5(t,e){return M5(t)||x5(t,e)||O5(t,e)||T5()}function T5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
24
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O5(t,e){if(t){if(typeof t=="string")return ly(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ly(t,e)}}function ly(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function x5(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}function M5(t){if(Array.isArray(t))return t}function uy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Tf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?uy(Object(n),!0).forEach(function(i){E5(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):uy(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function E5(t,e,n){return e=I5(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function I5(t){var e=P5(t,"string");return La(e)=="symbol"?e:String(e)}function P5(t,e){if(La(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(La(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var L5=`
|
|
25
|
+
.p-hidden-accessible {
|
|
26
|
+
border: 0;
|
|
27
|
+
clip: rect(0 0 0 0);
|
|
28
|
+
height: 1px;
|
|
29
|
+
margin: -1px;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
padding: 0;
|
|
32
|
+
position: absolute;
|
|
33
|
+
width: 1px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.p-hidden-accessible input,
|
|
37
|
+
.p-hidden-accessible select {
|
|
38
|
+
transform: scale(0);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.p-overflow-hidden {
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
padding-right: var(--scrollbar-width);
|
|
44
|
+
}
|
|
45
|
+
`,D5={},R5={},Wt={name:"base",css:L5,classes:D5,inlineStyles:R5,loadStyle:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.css?ay(this.css,Tf({name:this.name},e)):{}},getStyleSheet:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.css){var i=Object.entries(n).reduce(function(r,o){var s=k5(o,2),a=s[0],l=s[1];return r.push("".concat(a,'="').concat(l,'"'))&&r},[]).join(" ");return'<style type="text/css" data-primevue-style-id="'.concat(this.name,'" ').concat(i,">").concat(this.css).concat(e,"</style>")}return""},extend:function(e){return Tf(Tf({},this),{},{css:void 0},e)}};function Da(t){"@babel/helpers - typeof";return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Da(t)}function cy(t,e){return V5(t)||$5(t,e)||N5(t,e)||B5()}function B5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
46
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N5(t,e){if(t){if(typeof t=="string")return dy(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dy(t,e)}}function dy(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function $5(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}function V5(t){if(Array.isArray(t))return t}function fy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Tn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fy(Object(n),!0).forEach(function(i){Of(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fy(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Of(t,e,n){return e=z5(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function z5(t){var e=F5(t,"string");return Da(e)=="symbol"?e:String(e)}function F5(t,e){if(Da(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Da(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ft={_getMeta:function(){return[Ce.isObject(arguments.length<=0?void 0:arguments[0])||arguments.length<=0?void 0:arguments[0],Ce.getItemValue(Ce.isObject(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1])]},_getConfig:function(e,n){var i,r,o;return(i=(e==null||(r=e.instance)===null||r===void 0?void 0:r.$primevue)||(n==null||(o=n.ctx)===null||o===void 0||(o=o.appContext)===null||o===void 0||(o=o.config)===null||o===void 0||(o=o.globalProperties)===null||o===void 0?void 0:o.$primevue))===null||i===void 0?void 0:i.config},_getOptionValue:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Ce.toFlatCase(n).split("."),o=r.shift();return o?Ce.isObject(e)?Ft._getOptionValue(Ce.getItemValue(e[Object.keys(e).find(function(s){return Ce.toFlatCase(s)===o})||""],i),r.join("."),i):void 0:Ce.getItemValue(e,i)},_getPTValue:function(){var e,n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=function(){var b=Ft._getOptionValue.apply(Ft,arguments);return Ce.isString(b)||Ce.isArray(b)?{class:b}:b},u=((e=i.binding)===null||e===void 0||(e=e.value)===null||e===void 0?void 0:e.ptOptions)||((n=i.$primevueConfig)===null||n===void 0?void 0:n.ptOptions)||{},c=u.mergeSections,d=c===void 0?!0:c,f=u.mergeProps,p=f===void 0?!1:f,h=a?Ft._useDefaultPT(i,i.defaultPT(),l,o,s):void 0,m=Ft._usePT(i,Ft._getPT(r,i.$name),l,o,Tn(Tn({},s),{},{global:h||{}})),v=Ft._getPTDatasets(i,o);return d||!d&&m?p?Ft._mergeProps(i,p,h,m,v):Tn(Tn(Tn({},h),m),v):Tn(Tn({},m),v)},_getPTDatasets:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i="data-pc-";return Tn(Tn({},n==="root"&&Of({},"".concat(i,"name"),Ce.toFlatCase(e.$name))),{},Of({},"".concat(i,"section"),Ce.toFlatCase(n)))},_getPT:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=function(s){var a,l=i?i(s):s,u=Ce.toFlatCase(n);return(a=l==null?void 0:l[u])!==null&&a!==void 0?a:l};return e!=null&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:r(e.originalValue),value:r(e.value)}:r(e)},_usePT:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=function(v){return i(v,r,o)};if(n!=null&&n.hasOwnProperty("_usept")){var a,l=n._usept||((a=e.$primevueConfig)===null||a===void 0?void 0:a.ptOptions)||{},u=l.mergeSections,c=u===void 0?!0:u,d=l.mergeProps,f=d===void 0?!1:d,p=s(n.originalValue),h=s(n.value);return p===void 0&&h===void 0?void 0:Ce.isString(h)?h:Ce.isString(p)?p:c||!c&&h?f?Ft._mergeProps(e,f,p,h):Tn(Tn({},p),h):h}return s(n)},_useDefaultPT:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return Ft._usePT(e,n,i,r,o)},_hook:function(e,n,i,r,o,s){var a,l,u="on".concat(Ce.toCapitalCase(n)),c=Ft._getConfig(r,o),d=i==null?void 0:i.$instance,f=Ft._usePT(d,Ft._getPT(r==null||(a=r.value)===null||a===void 0?void 0:a.pt,e),Ft._getOptionValue,"hooks.".concat(u)),p=Ft._useDefaultPT(d,c==null||(l=c.pt)===null||l===void 0||(l=l.directives)===null||l===void 0?void 0:l[e],Ft._getOptionValue,"hooks.".concat(u)),h={el:i,binding:r,vnode:o,prevVnode:s};f==null||f(d,h),p==null||p(d,h)},_mergeProps:function(){for(var e=arguments.length>1?arguments[1]:void 0,n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];return Ce.isFunction(e)?e.apply(void 0,i):T.apply(void 0,i)},_extend:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=function(o,s,a,l,u){var c,d;s._$instances=s._$instances||{};var f=Ft._getConfig(a,l),p=s._$instances[e]||{},h=Ce.isEmpty(p)?Tn(Tn({},n),n==null?void 0:n.methods):{};s._$instances[e]=Tn(Tn({},p),{},{$name:e,$host:s,$binding:a,$modifiers:a==null?void 0:a.modifiers,$value:a==null?void 0:a.value,$el:p.$el||s||void 0,$style:Tn({classes:void 0,inlineStyles:void 0,loadStyle:function(){}},n==null?void 0:n.style),$primevueConfig:f,defaultPT:function(){return Ft._getPT(f==null?void 0:f.pt,void 0,function(v){var S;return v==null||(S=v.directives)===null||S===void 0?void 0:S[e]})},isUnstyled:function(){var v,S;return((v=s.$instance)===null||v===void 0||(v=v.$binding)===null||v===void 0||(v=v.value)===null||v===void 0?void 0:v.unstyled)!==void 0?(S=s.$instance)===null||S===void 0||(S=S.$binding)===null||S===void 0||(S=S.value)===null||S===void 0?void 0:S.unstyled:f==null?void 0:f.unstyled},ptm:function(){var v,S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ft._getPTValue(s.$instance,(v=s.$instance)===null||v===void 0||(v=v.$binding)===null||v===void 0||(v=v.value)===null||v===void 0?void 0:v.pt,S,Tn({},b))},ptmo:function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ft._getPTValue(s.$instance,v,S,b,!1)},cx:function(){var v,S,b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(v=s.$instance)!==null&&v!==void 0&&v.isUnstyled()?void 0:Ft._getOptionValue((S=s.$instance)===null||S===void 0||(S=S.$style)===null||S===void 0?void 0:S.classes,b,Tn({},k))},sx:function(){var v,S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return b?Ft._getOptionValue((v=s.$instance)===null||v===void 0||(v=v.$style)===null||v===void 0?void 0:v.inlineStyles,S,Tn({},k)):void 0}},h),s.$instance=s._$instances[e],(c=(d=s.$instance)[o])===null||c===void 0||c.call(d,s,a,l,u),s["$".concat(e)]=s.$instance,Ft._hook(e,o,s,a,l,u)};return{created:function(o,s,a,l){i("created",o,s,a,l)},beforeMount:function(o,s,a,l){var u,c,d,f,p=Ft._getConfig(s,a);Wt.loadStyle({nonce:p==null||(u=p.csp)===null||u===void 0?void 0:u.nonce}),!((c=o.$instance)!==null&&c!==void 0&&c.isUnstyled())&&((d=o.$instance)===null||d===void 0||(d=d.$style)===null||d===void 0||d.loadStyle({nonce:p==null||(f=p.csp)===null||f===void 0?void 0:f.nonce})),i("beforeMount",o,s,a,l)},mounted:function(o,s,a,l){var u,c,d,f,p=Ft._getConfig(s,a);Wt.loadStyle({nonce:p==null||(u=p.csp)===null||u===void 0?void 0:u.nonce}),!((c=o.$instance)!==null&&c!==void 0&&c.isUnstyled())&&((d=o.$instance)===null||d===void 0||(d=d.$style)===null||d===void 0||d.loadStyle({nonce:p==null||(f=p.csp)===null||f===void 0?void 0:f.nonce})),i("mounted",o,s,a,l)},beforeUpdate:function(o,s,a,l){i("beforeUpdate",o,s,a,l)},updated:function(o,s,a,l){i("updated",o,s,a,l)},beforeUnmount:function(o,s,a,l){i("beforeUnmount",o,s,a,l)},unmounted:function(o,s,a,l){i("unmounted",o,s,a,l)}}},extend:function(){var e=Ft._getMeta.apply(Ft,arguments),n=cy(e,2),i=n[0],r=n[1];return Tn({extend:function(){var s=Ft._getMeta.apply(Ft,arguments),a=cy(s,2),l=a[0],u=a[1];return Ft.extend(l,Tn(Tn(Tn({},r),r==null?void 0:r.methods),u))}},Ft._extend(i,r))}},H5={root:"p-tooltip p-component",arrow:"p-tooltip-arrow",text:"p-tooltip-text"},j5=Wt.extend({name:"tooltip",classes:H5}),U5=Ft.extend({style:j5});function K5(t,e){return G5(t)||X5(t,e)||q5(t,e)||W5()}function W5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
47
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function q5(t,e){if(t){if(typeof t=="string")return py(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return py(t,e)}}function py(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function X5(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}function G5(t){if(Array.isArray(t))return t}function Ra(t){"@babel/helpers - typeof";return Ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ra(t)}var NX=ce("Tooltip",U5.extend("tooltip",{beforeMount:function(e,n){var i,r=this.getTarget(e);if(r.$_ptooltipModifiers=this.getModifiers(n),n.value){if(typeof n.value=="string")r.$_ptooltipValue=n.value,r.$_ptooltipDisabled=!1,r.$_ptooltipEscape=!0,r.$_ptooltipClass=null,r.$_ptooltipFitContent=!0,r.$_ptooltipIdAttr=Vn()+"_tooltip",r.$_ptooltipShowDelay=0,r.$_ptooltipHideDelay=0,r.$_ptooltipAutoHide=!0;else if(Ra(n.value)==="object"&&n.value){if(Ce.isEmpty(n.value.value)||n.value.value.trim()==="")return;r.$_ptooltipValue=n.value.value,r.$_ptooltipDisabled=!!n.value.disabled===n.value.disabled?n.value.disabled:!1,r.$_ptooltipEscape=!!n.value.escape===n.value.escape?n.value.escape:!0,r.$_ptooltipClass=n.value.class||"",r.$_ptooltipFitContent=!!n.value.fitContent===n.value.fitContent?n.value.fitContent:!0,r.$_ptooltipIdAttr=n.value.id||Vn()+"_tooltip",r.$_ptooltipShowDelay=n.value.showDelay||0,r.$_ptooltipHideDelay=n.value.hideDelay||0,r.$_ptooltipAutoHide=!!n.value.autoHide===n.value.autoHide?n.value.autoHide:!0}}else return;r.$_ptooltipZIndex=(i=n.instance.$primevue)===null||i===void 0||(i=i.config)===null||i===void 0||(i=i.zIndex)===null||i===void 0?void 0:i.tooltip,this.bindEvents(r,n),e.setAttribute("data-pd-tooltip",!0)},updated:function(e,n){var i=this.getTarget(e);if(i.$_ptooltipModifiers=this.getModifiers(n),this.unbindEvents(i),!!n.value){if(typeof n.value=="string")i.$_ptooltipValue=n.value,i.$_ptooltipDisabled=!1,i.$_ptooltipEscape=!0,i.$_ptooltipClass=null,i.$_ptooltipIdAttr=i.$_ptooltipIdAttr||Vn()+"_tooltip",i.$_ptooltipShowDelay=0,i.$_ptooltipHideDelay=0,i.$_ptooltipAutoHide=!0,this.bindEvents(i,n);else if(Ra(n.value)==="object"&&n.value)if(Ce.isEmpty(n.value.value)||n.value.value.trim()===""){this.unbindEvents(i,n);return}else i.$_ptooltipValue=n.value.value,i.$_ptooltipDisabled=!!n.value.disabled===n.value.disabled?n.value.disabled:!1,i.$_ptooltipEscape=!!n.value.escape===n.value.escape?n.value.escape:!0,i.$_ptooltipClass=n.value.class||"",i.$_ptooltipFitContent=!!n.value.fitContent===n.value.fitContent?n.value.fitContent:!0,i.$_ptooltipIdAttr=n.value.id||i.$_ptooltipIdAttr||Vn()+"_tooltip",i.$_ptooltipShowDelay=n.value.showDelay||0,i.$_ptooltipHideDelay=n.value.hideDelay||0,i.$_ptooltipAutoHide=!!n.value.autoHide===n.value.autoHide?n.value.autoHide:!0,this.bindEvents(i,n)}},unmounted:function(e,n){var i=this.getTarget(e);this.remove(i),this.unbindEvents(i,n),i.$_ptooltipScrollHandler&&(i.$_ptooltipScrollHandler.destroy(),i.$_ptooltipScrollHandler=null)},timer:void 0,methods:{bindEvents:function(e,n){var i=this,r=e.$_ptooltipModifiers;r.focus?(e.$_focusevent=function(o){return i.onFocus(o,n)},e.addEventListener("focus",e.$_focusevent),e.addEventListener("blur",this.onBlur.bind(this))):(e.$_mouseenterevent=function(o){return i.onMouseEnter(o,n)},e.addEventListener("mouseenter",e.$_mouseenterevent),e.addEventListener("mouseleave",this.onMouseLeave.bind(this)),e.addEventListener("click",this.onClick.bind(this))),e.addEventListener("keydown",this.onKeydown.bind(this))},unbindEvents:function(e){var n=e.$_ptooltipModifiers;n.focus?(e.removeEventListener("focus",e.$_focusevent),e.$_focusevent=null,e.removeEventListener("blur",this.onBlur.bind(this))):(e.removeEventListener("mouseenter",e.$_mouseenterevent),e.$_mouseenterevent=null,e.removeEventListener("mouseleave",this.onMouseLeave.bind(this)),e.removeEventListener("click",this.onClick.bind(this))),e.removeEventListener("keydown",this.onKeydown.bind(this))},bindScrollListener:function(e){var n=this;e.$_ptooltipScrollHandler||(e.$_ptooltipScrollHandler=new Ls(e,function(){n.hide(e)})),e.$_ptooltipScrollHandler.bindScrollListener()},unbindScrollListener:function(e){e.$_ptooltipScrollHandler&&e.$_ptooltipScrollHandler.unbindScrollListener()},onMouseEnter:function(e,n){var i=e.currentTarget,r=i.$_ptooltipShowDelay;this.show(i,n,r)},onMouseLeave:function(e){var n=e.currentTarget,i=n.$_ptooltipHideDelay,r=n.$_ptooltipAutoHide;if(r)this.hide(n,i);else{var o=G.getAttribute(e.target,"data-pc-name")==="tooltip"||G.getAttribute(e.target,"data-pc-section")==="arrow"||G.getAttribute(e.target,"data-pc-section")==="text"||G.getAttribute(e.relatedTarget,"data-pc-name")==="tooltip"||G.getAttribute(e.relatedTarget,"data-pc-section")==="arrow"||G.getAttribute(e.relatedTarget,"data-pc-section")==="text";!o&&this.hide(n,i)}},onFocus:function(e,n){var i=e.currentTarget,r=i.$_ptooltipShowDelay;this.show(i,n,r)},onBlur:function(e){var n=e.currentTarget,i=n.$_ptooltipHideDelay;this.hide(n,i)},onClick:function(e){var n=e.currentTarget,i=n.$_ptooltipHideDelay;this.hide(n,i)},onKeydown:function(e){var n=e.currentTarget,i=n.$_ptooltipHideDelay;e.code==="Escape"&&this.hide(e.currentTarget,i)},tooltipActions:function(e,n){if(!(e.$_ptooltipDisabled||!G.isExist(e))){var i=this.create(e,n);this.align(e),!this.isUnstyled()&&G.fadeIn(i,250);var r=this;window.addEventListener("resize",function o(){G.isTouchDevice()||r.hide(e),window.removeEventListener("resize",o)}),i.addEventListener("mouseleave",function o(){r.hide(e),i.removeEventListener("mouseleave",o)}),this.bindScrollListener(e),dn.set("tooltip",i,e.$_ptooltipZIndex)}},show:function(e,n,i){var r=this;i!==void 0?this.timer=setTimeout(function(){return r.tooltipActions(e,n)},i):this.tooltipActions(e,n)},tooltipRemoval:function(e){this.remove(e),this.unbindScrollListener(e)},hide:function(e,n){var i=this;clearTimeout(this.timer),n!==void 0?setTimeout(function(){return i.tooltipRemoval(e)},n):this.tooltipRemoval(e)},getTooltipElement:function(e){return document.getElementById(e.$_ptooltipId)},create:function(e){var n=e.$_ptooltipModifiers,i=G.createElement("div",{class:!this.isUnstyled()&&this.cx("arrow"),"p-bind":this.ptm("arrow",{context:n})}),r=G.createElement("div",{class:!this.isUnstyled()&&this.cx("text"),"p-bind":this.ptm("text",{context:n})});e.$_ptooltipEscape?(r.innerHTML="",r.appendChild(document.createTextNode(e.$_ptooltipValue))):r.innerHTML=e.$_ptooltipValue;var o=G.createElement("div",{id:e.$_ptooltipIdAttr,role:"tooltip",style:{display:"inline-block",width:e.$_ptooltipFitContent?"fit-content":void 0,pointerEvents:!this.isUnstyled()&&e.$_ptooltipAutoHide&&"none"},class:[!this.isUnstyled()&&this.cx("root"),e.$_ptooltipClass],"p-bind":this.ptm("root",{context:n})},i,r);return document.body.appendChild(o),e.$_ptooltipId=o.id,this.$el=o,o},remove:function(e){if(e){var n=this.getTooltipElement(e);n&&n.parentElement&&(dn.clear(n),document.body.removeChild(n)),e.$_ptooltipId=null}},align:function(e){var n=e.$_ptooltipModifiers;n.top?(this.alignTop(e),this.isOutOfBounds(e)&&(this.alignBottom(e),this.isOutOfBounds(e)&&this.alignTop(e))):n.left?(this.alignLeft(e),this.isOutOfBounds(e)&&(this.alignRight(e),this.isOutOfBounds(e)&&(this.alignTop(e),this.isOutOfBounds(e)&&(this.alignBottom(e),this.isOutOfBounds(e)&&this.alignLeft(e))))):n.bottom?(this.alignBottom(e),this.isOutOfBounds(e)&&(this.alignTop(e),this.isOutOfBounds(e)&&this.alignBottom(e))):(this.alignRight(e),this.isOutOfBounds(e)&&(this.alignLeft(e),this.isOutOfBounds(e)&&(this.alignTop(e),this.isOutOfBounds(e)&&(this.alignBottom(e),this.isOutOfBounds(e)&&this.alignRight(e)))))},getHostOffset:function(e){var n=e.getBoundingClientRect(),i=n.left+G.getWindowScrollLeft(),r=n.top+G.getWindowScrollTop();return{left:i,top:r}},alignRight:function(e){this.preAlign(e,"right");var n=this.getTooltipElement(e),i=this.getHostOffset(e),r=i.left+G.getOuterWidth(e),o=i.top+(G.getOuterHeight(e)-G.getOuterHeight(n))/2;n.style.left=r+"px",n.style.top=o+"px"},alignLeft:function(e){this.preAlign(e,"left");var n=this.getTooltipElement(e),i=this.getHostOffset(e),r=i.left-G.getOuterWidth(n),o=i.top+(G.getOuterHeight(e)-G.getOuterHeight(n))/2;n.style.left=r+"px",n.style.top=o+"px"},alignTop:function(e){this.preAlign(e,"top");var n=this.getTooltipElement(e),i=this.getHostOffset(e),r=i.left+(G.getOuterWidth(e)-G.getOuterWidth(n))/2,o=i.top-G.getOuterHeight(n);n.style.left=r+"px",n.style.top=o+"px"},alignBottom:function(e){this.preAlign(e,"bottom");var n=this.getTooltipElement(e),i=this.getHostOffset(e),r=i.left+(G.getOuterWidth(e)-G.getOuterWidth(n))/2,o=i.top+G.getOuterHeight(e);n.style.left=r+"px",n.style.top=o+"px"},preAlign:function(e,n){var i=this.getTooltipElement(e);i.style.left="-999px",i.style.top="-999px",G.removeClass(i,"p-tooltip-".concat(i.$_ptooltipPosition)),!this.isUnstyled()&&G.addClass(i,"p-tooltip-".concat(n)),i.$_ptooltipPosition=n,i.setAttribute("data-p-position",n);var r=G.findSingle(i,'[data-pc-section="arrow"]');r.style.top=n==="bottom"?"0":n==="right"||n==="left"||n!=="right"&&n!=="left"&&n!=="top"&&n!=="bottom"?"50%":null,r.style.bottom=n==="top"?"0":null,r.style.left=n==="right"||n!=="right"&&n!=="left"&&n!=="top"&&n!=="bottom"?"0":n==="top"||n==="bottom"?"50%":null,r.style.right=n==="left"?"0":null},isOutOfBounds:function(e){var n=this.getTooltipElement(e),i=n.getBoundingClientRect(),r=i.top,o=i.left,s=G.getOuterWidth(n),a=G.getOuterHeight(n),l=G.getViewport();return o+s>l.width||o<0||r<0||r+a>l.height},getTarget:function(e){return G.hasClass(e,"p-inputwrapper")?G.findSingle(e,"input"):e},getModifiers:function(e){return e.modifiers&&Object.keys(e.modifiers).length?e.modifiers:e.arg&&Ra(e.arg)==="object"?Object.entries(e.arg).reduce(function(n,i){var r=K5(i,2),o=r[0],s=r[1];return(o==="event"||o==="position")&&(n[s]=!0),n},{}):{}}}}));const $X=ce("Focus",{mounted:async t=>{const e=t.tagName.toLowerCase()==="input",n=t.tagName.toLowerCase()==="button";Et(()=>{var i;e||n?t.focus():(i=t.querySelector("input"))==null||i.focus()})}});/**
|
|
48
|
+
* vee-validate v4.13.2
|
|
49
|
+
* (c) 2024 Abdelrahman Awad
|
|
50
|
+
* @license MIT
|
|
51
|
+
*/function yi(t){return typeof t=="function"}function hy(t){return t==null}const Xo=t=>t!==null&&!!t&&typeof t=="object"&&!Array.isArray(t);function xf(t){return Number(t)>=0}function Z5(t){const e=parseFloat(t);return isNaN(e)?t:e}function _5(t){return typeof t=="object"&&t!==null}function J5(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function my(t){if(!_5(t)||J5(t)!=="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ba(t,e){return Object.keys(e).forEach(n=>{if(my(e[n])&&my(t[n])){t[n]||(t[n]={}),Ba(t[n],e[n]);return}t[n]=e[n]}),t}function Na(t){const e=t.split(".");if(!e.length)return"";let n=String(e[0]);for(let i=1;i<e.length;i++){if(xf(e[i])){n+=`[${e[i]}]`;continue}n+=`.${e[i]}`}return n}const Y5={};function Q5(t){return Y5[t]}function gy(t,e,n){typeof n.value=="object"&&(n.value=sn(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function sn(t){if(typeof t!="object")return t;var e=0,n,i,r,o=Object.prototype.toString.call(t);if(o==="[object Object]"?r=Object.create(t.__proto__||null):o==="[object Array]"?r=Array(t.length):o==="[object Set]"?(r=new Set,t.forEach(function(s){r.add(sn(s))})):o==="[object Map]"?(r=new Map,t.forEach(function(s,a){r.set(sn(a),sn(s))})):o==="[object Date]"?r=new Date(+t):o==="[object RegExp]"?r=new RegExp(t.source,t.flags):o==="[object DataView]"?r=new t.constructor(sn(t.buffer)):o==="[object ArrayBuffer]"?r=t.slice(0):o.slice(-6)==="Array]"&&(r=new t.constructor(t)),r){for(i=Object.getOwnPropertySymbols(t);e<i.length;e++)gy(r,i[e],Object.getOwnPropertyDescriptor(t,i[e]));for(e=0,i=Object.getOwnPropertyNames(t);e<i.length;e++)Object.hasOwnProperty.call(r,n=i[e])&&r[n]===t[n]||gy(r,n,Object.getOwnPropertyDescriptor(t,n))}return r||t}const Mf=Symbol("vee-validate-form"),e7=Symbol("vee-validate-field-instance"),vy=Symbol("Default empty value"),t7=typeof window<"u";function Ef(t){return yi(t)&&!!t.__locatorRef}function nr(t){return!!t&&yi(t.parse)&&t.__type==="VVTypedSchema"}function xu(t){return!!t&&yi(t.validate)}function yy(t){return t==="checkbox"||t==="radio"}function n7(t){return Xo(t)||Array.isArray(t)}function i7(t){return Array.isArray(t)?t.length===0:Xo(t)&&Object.keys(t).length===0}function Mu(t){return/^\[.+\]$/i.test(t)}function r7(t){return by(t)&&t.multiple}function by(t){return t.tagName==="SELECT"}function o7(t){return Ay(t)&&t.target&&"submit"in t.target}function Ay(t){return t?!!(typeof Event<"u"&&yi(Event)&&t instanceof Event||t&&t.srcElement):!1}function ui(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,i,r;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(i=n;i--!==0;)if(!ui(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!ui(i[1],e.get(i[0])))return!1;return!0}if(wy(t)&&wy(e))return!(t.size!==e.size||t.name!==e.name||t.lastModified!==e.lastModified||t.type!==e.type);if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(i=n;i--!==0;)if(t[i]!==e[i])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();for(r=Object.keys(t),n=r.length,i=n;i--!==0;){var o=r[i];if(!ui(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function wy(t){return t7?t instanceof File:!1}function If(t){return Mu(t)?t.replace(/\[|\]/gi,""):t}function bi(t,e,n){return t?Mu(e)?t[If(e)]:(e||"").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((r,o)=>n7(r)&&o in r?r[o]:n,t):n}function Br(t,e,n){if(Mu(e)){t[If(e)]=n;return}const i=e.split(/\.|\[(\d+)\]/).filter(Boolean);let r=t;for(let o=0;o<i.length;o++){if(o===i.length-1){r[i[o]]=n;return}(!(i[o]in r)||hy(r[i[o]]))&&(r[i[o]]=xf(i[o+1])?[]:{}),r=r[i[o]]}}function Pf(t,e){if(Array.isArray(t)&&xf(e)){t.splice(Number(e),1);return}Xo(t)&&delete t[e]}function Sy(t,e){if(Mu(e)){delete t[If(e)];return}const n=e.split(/\.|\[(\d+)\]/).filter(Boolean);let i=t;for(let o=0;o<n.length;o++){if(o===n.length-1){Pf(i,n[o]);break}if(!(n[o]in i)||hy(i[n[o]]))break;i=i[n[o]]}const r=n.map((o,s)=>bi(t,n.slice(0,s).join(".")));for(let o=r.length-1;o>=0;o--)if(i7(r[o])){if(o===0){Pf(t,n[0]);continue}Pf(r[o-1],n[o-1])}}function Ei(t){return Object.keys(t)}function Cy(t,e=void 0){const n=Pr();return(n==null?void 0:n.provides[t])||dt(t,e)}function ky(t,e,n){if(Array.isArray(t)){const i=[...t],r=i.findIndex(o=>ui(o,e));return r>=0?i.splice(r,1):i.push(e),i}return ui(t,e)?n:e}function Ty(t,e=0){let n=null,i=[];return function(...r){return n&&clearTimeout(n),n=setTimeout(()=>{const o=t(...r);i.forEach(s=>s(o)),i=[]},e),new Promise(o=>i.push(o))}}function s7(t,e){return Xo(e)&&e.number?Z5(t):t}function Lf(t,e){let n;return async function(...r){const o=t(...r);n=o;const s=await o;return o!==n?s:(n=void 0,e(s,r))}}function Df(t){return Array.isArray(t)?t:t?[t]:[]}function Eu(t,e){const n={};for(const i in t)e.includes(i)||(n[i]=t[i]);return n}function a7(t){let e=null,n=[];return function(...i){const r=Et(()=>{if(e!==r)return;const o=t(...i);n.forEach(s=>s(o)),n=[],e=null});return e=r,new Promise(o=>n.push(o))}}function Rf(t){if(Oy(t))return t._value}function Oy(t){return"_value"in t}function l7(t){return t.type==="number"||t.type==="range"?Number.isNaN(t.valueAsNumber)?t.value:t.valueAsNumber:t.value}function Iu(t){if(!Ay(t))return t;const e=t.target;if(yy(e.type)&&Oy(e))return Rf(e);if(e.type==="file"&&e.files){const n=Array.from(e.files);return e.multiple?n:n[0]}if(r7(e))return Array.from(e.options).filter(n=>n.selected&&!n.disabled).map(Rf);if(by(e)){const n=Array.from(e.options).find(i=>i.selected);return n?Rf(n):e.value}return l7(e)}function xy(t){const e={};return Object.defineProperty(e,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),t?Xo(t)&&t._$$isNormalized?t:Xo(t)?Object.keys(t).reduce((n,i)=>{const r=u7(t[i]);return t[i]!==!1&&(n[i]=My(r)),n},e):typeof t!="string"?e:t.split("|").reduce((n,i)=>{const r=c7(i);return r.name&&(n[r.name]=My(r.params)),n},e):e}function u7(t){return t===!0?[]:Array.isArray(t)||Xo(t)?t:[t]}function My(t){const e=n=>typeof n=="string"&&n[0]==="@"?d7(n.slice(1)):n;return Array.isArray(t)?t.map(e):t instanceof RegExp?[t]:Object.keys(t).reduce((n,i)=>(n[i]=e(t[i]),n),{})}const c7=t=>{let e=[];const n=t.split(":")[0];return t.includes(":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:n,params:e}};function d7(t){const e=n=>bi(n,t)||n[t];return e.__locatorRef=t,e}function f7(t){return Array.isArray(t)?t.filter(Ef):Ei(t).filter(e=>Ef(t[e])).map(e=>t[e])}let p7=Object.assign({},{generateMessage:({field:t})=>`${t} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0});const $a=()=>p7;async function Ey(t,e,n={}){const i=n==null?void 0:n.bails,r={name:(n==null?void 0:n.name)||"{field}",rules:e,label:n==null?void 0:n.label,bails:i??!0,formData:(n==null?void 0:n.values)||{}},o=await h7(r,t);return Object.assign(Object.assign({},o),{valid:!o.errors.length})}async function h7(t,e){const n=t.rules;if(nr(n)||xu(n))return g7(e,Object.assign(Object.assign({},t),{rules:n}));if(yi(n)||Array.isArray(n)){const a={field:t.label||t.name,name:t.name,label:t.label,form:t.formData,value:e},l=Array.isArray(n)?n:[n],u=l.length,c=[];for(let d=0;d<u;d++){const f=l[d],p=await f(e,a);if(!(typeof p!="string"&&!Array.isArray(p)&&p)){if(Array.isArray(p))c.push(...p);else{const m=typeof p=="string"?p:Py(a);c.push(m)}if(t.bails)return{errors:c}}}return{errors:c}}const i=Object.assign(Object.assign({},t),{rules:xy(n)}),r=[],o=Object.keys(i.rules),s=o.length;for(let a=0;a<s;a++){const l=o[a],u=await v7(i,e,{name:l,params:i.rules[l]});if(u.error&&(r.push(u.error),t.bails))return{errors:r}}return{errors:r}}function m7(t){return!!t&&t.name==="ValidationError"}function Iy(t){return{__type:"VVTypedSchema",async parse(n,i){var r;try{return{output:await t.validate(n,{abortEarly:!1,context:(i==null?void 0:i.formData)||{}}),errors:[]}}catch(o){if(!m7(o))throw o;if(!(!((r=o.inner)===null||r===void 0)&&r.length)&&o.errors.length)return{errors:[{path:o.path,errors:o.errors}]};const s=o.inner.reduce((a,l)=>{const u=l.path||"";return a[u]||(a[u]={errors:[],path:u}),a[u].errors.push(...l.errors),a},{});return{errors:Object.values(s)}}}}}async function g7(t,e){const i=await(nr(e.rules)?e.rules:Iy(e.rules)).parse(t,{formData:e.formData}),r=[];for(const o of i.errors)o.errors.length&&r.push(...o.errors);return{value:i.value,errors:r}}async function v7(t,e,n){const i=Q5(n.name);if(!i)throw new Error(`No such validator '${n.name}' exists.`);const r=y7(n.params,t.formData),o={field:t.label||t.name,name:t.name,label:t.label,value:e,form:t.formData,rule:Object.assign(Object.assign({},n),{params:r})},s=await i(e,r,o);return typeof s=="string"?{error:s}:{error:s?void 0:Py(o)}}function Py(t){const e=$a().generateMessage;return e?e(t):"Field is invalid"}function y7(t,e){const n=i=>Ef(i)?i(e):i;return Array.isArray(t)?t.map(n):Object.keys(t).reduce((i,r)=>(i[r]=n(t[r]),i),{})}async function b7(t,e){const i=await(nr(t)?t:Iy(t)).parse(sn(e)),r={},o={};for(const s of i.errors){const a=s.errors,l=(s.path||"").replace(/\["(\d+)"\]/g,(u,c)=>`[${c}]`);r[l]={valid:!a.length,errors:a},a.length&&(o[l]=a[0])}return{valid:!i.errors.length,results:r,errors:o,values:i.value,source:"schema"}}async function A7(t,e,n){const r=Ei(t).map(async u=>{var c,d,f;const p=(c=n==null?void 0:n.names)===null||c===void 0?void 0:c[u],h=await Ey(bi(e,u),t[u],{name:(p==null?void 0:p.name)||u,label:p==null?void 0:p.label,values:e,bails:(f=(d=n==null?void 0:n.bailsMap)===null||d===void 0?void 0:d[u])!==null&&f!==void 0?f:!0});return Object.assign(Object.assign({},h),{path:u})});let o=!0;const s=await Promise.all(r),a={},l={};for(const u of s)a[u.path]={valid:u.valid,errors:u.errors},u.valid||(o=!1,l[u.path]=u.errors[0]);return{valid:o,results:a,errors:l,source:"schema"}}let Ly=0;function w7(t,e){const{value:n,initialValue:i,setInitialValue:r}=S7(t,e.modelValue,e.form);if(!e.form){let l=function(p){var h;"value"in p&&(n.value=p.value),"errors"in p&&c(p.errors),"touched"in p&&(f.touched=(h=p.touched)!==null&&h!==void 0?h:f.touched),"initialValue"in p&&r(p.initialValue)};const{errors:u,setErrors:c}=T7(),d=Ly>=Number.MAX_SAFE_INTEGER?0:++Ly,f=k7(n,i,u,e.schema);return{id:d,path:t,value:n,initialValue:i,meta:f,flags:{pendingUnmount:{[d]:!1},pendingReset:!1},errors:u,setState:l}}const o=e.form.createPathState(t,{bails:e.bails,label:e.label,type:e.type,validate:e.validate,schema:e.schema}),s=X(()=>o.errors);function a(l){var u,c,d;"value"in l&&(n.value=l.value),"errors"in l&&((u=e.form)===null||u===void 0||u.setFieldError(x(t),l.errors)),"touched"in l&&((c=e.form)===null||c===void 0||c.setFieldTouched(x(t),(d=l.touched)!==null&&d!==void 0?d:!1)),"initialValue"in l&&r(l.initialValue)}return{id:Array.isArray(o.id)?o.id[o.id.length-1]:o.id,path:t,value:n,errors:s,meta:o,initialValue:i,flags:o.__flags,setState:a}}function S7(t,e,n){const i=re(x(e));function r(){return n?bi(n.initialValues.value,x(t),x(i)):x(i)}function o(u){if(!n){i.value=u;return}n.setFieldInitialValue(x(t),u,!0)}const s=X(r);if(!n)return{value:re(r()),initialValue:s,setInitialValue:o};const a=C7(e,n,s,t);return n.stageInitialValue(x(t),a,!0),{value:X({get(){return bi(n.values,x(t))},set(u){n.setFieldValue(x(t),u,!1)}}),initialValue:s,setInitialValue:o}}function C7(t,e,n,i){return ba(t)?x(t):t!==void 0?t:bi(e.values,x(i),x(n))}function k7(t,e,n,i){const r=X(()=>{var s,a,l;return(l=(a=(s=Nt(i))===null||s===void 0?void 0:s.describe)===null||a===void 0?void 0:a.call(s).required)!==null&&l!==void 0?l:!1}),o=hn({touched:!1,pending:!1,valid:!0,required:r,validated:!!x(n).length,initialValue:X(()=>x(e)),dirty:X(()=>!ui(x(t),x(e)))});return $e(n,s=>{o.valid=!s.length},{immediate:!0,flush:"sync"}),o}function T7(){const t=re([]);return{errors:t,setErrors:e=>{t.value=Df(e)}}}function Nn(t,e,n){return yy(n==null?void 0:n.type)?x7(t,e,n):Dy(t,e,n)}function Dy(t,e,n){const{initialValue:i,validateOnMount:r,bails:o,type:s,checkedValue:a,label:l,validateOnValueUpdate:u,uncheckedValue:c,controlled:d,keepValueOnUnmount:f,syncVModel:p,form:h}=O7(n),m=d?Cy(Mf):void 0,v=h||m,S=X(()=>Na(Nt(t))),b=X(()=>{if(Nt(v==null?void 0:v.schema))return;const Se=x(e);return xu(Se)||nr(Se)||yi(Se)||Array.isArray(Se)?Se:xy(Se)}),k=!yi(b.value)&&nr(Nt(e)),{id:A,value:w,initialValue:y,meta:C,setState:I,errors:R,flags:M}=w7(S,{modelValue:i,form:v,bails:o,label:l,type:s,validate:b.value?ae:void 0,schema:k?e:void 0}),D=X(()=>R.value[0]);p&&M7({value:w,prop:p,handleChange:me,shouldValidate:()=>u&&!M.pendingReset});const $=(le,Se=!1)=>{C.touched=!0,Se&&ie()};async function W(le){var Se,Z;if(v!=null&&v.validateSchema){const{results:q}=await v.validateSchema(le);return(Se=q[Nt(S)])!==null&&Se!==void 0?Se:{valid:!0,errors:[]}}return b.value?Ey(w.value,b.value,{name:Nt(S),label:Nt(l),values:(Z=v==null?void 0:v.values)!==null&&Z!==void 0?Z:{},bails:o}):{valid:!0,errors:[]}}const ie=Lf(async()=>(C.pending=!0,C.validated=!0,W("validated-only")),le=>(M.pendingUnmount[Ie.id]||(I({errors:le.errors}),C.pending=!1,C.valid=le.valid),le)),ve=Lf(async()=>W("silent"),le=>(C.valid=le.valid,le));function ae(le){return(le==null?void 0:le.mode)==="silent"?ve():ie()}function me(le,Se=!0){const Z=Iu(le);xe(Z,Se)}wt(()=>{if(r)return ie();(!v||!v.validateSchema)&&ve()});function se(le){C.touched=le}function Pe(le){var Se;const Z=le&&"value"in le?le.value:y.value;I({value:sn(Z),initialValue:sn(Z),touched:(Se=le==null?void 0:le.touched)!==null&&Se!==void 0?Se:!1,errors:(le==null?void 0:le.errors)||[]}),C.pending=!1,C.validated=!1,ve()}const Be=Pr();function xe(le,Se=!0){w.value=Be&&p?s7(le,Be.props.modelModifiers):le,(Se?ie:ve)()}function de(le){I({errors:Array.isArray(le)?le:[le]})}const ge=X({get(){return w.value},set(le){xe(le,u)}}),Ie={id:A,name:S,label:l,value:ge,meta:C,errors:R,errorMessage:D,type:s,checkedValue:a,uncheckedValue:c,bails:o,keepValueOnUnmount:f,resetField:Pe,handleReset:()=>Pe(),validate:ae,handleChange:me,handleBlur:$,setState:I,setTouched:se,setErrors:de,setValue:xe};if(Ps(e7,Ie),ba(e)&&typeof x(e)!="function"&&$e(e,(le,Se)=>{ui(le,Se)||(C.validated?ie():ve())},{deep:!0}),!v)return Ie;const Oe=X(()=>{const le=b.value;return!le||yi(le)||xu(le)||nr(le)||Array.isArray(le)?{}:Object.keys(le).reduce((Se,Z)=>{const q=f7(le[Z]).map(U=>U.__locatorRef).reduce((U,J)=>{const ke=bi(v.values,J)||v.values[J];return ke!==void 0&&(U[J]=ke),U},{});return Object.assign(Se,q),Se},{})});return $e(Oe,(le,Se)=>{if(!Object.keys(le).length)return;!ui(le,Se)&&(C.validated?ie():ve())}),Bi(()=>{var le;const Se=(le=Nt(Ie.keepValueOnUnmount))!==null&&le!==void 0?le:Nt(v.keepValuesOnUnmount),Z=Nt(S);if(Se||!v||M.pendingUnmount[Ie.id]){v==null||v.removePathState(Z,A);return}M.pendingUnmount[Ie.id]=!0;const q=v.getPathState(Z);if(Array.isArray(q==null?void 0:q.id)&&(q!=null&&q.multiple)?q!=null&&q.id.includes(Ie.id):(q==null?void 0:q.id)===Ie.id){if(q!=null&&q.multiple&&Array.isArray(q.value)){const J=q.value.findIndex(ke=>ui(ke,Nt(Ie.checkedValue)));if(J>-1){const ke=[...q.value];ke.splice(J,1),v.setFieldValue(Z,ke)}Array.isArray(q.id)&&q.id.splice(q.id.indexOf(Ie.id),1)}else v.unsetPathValue(Nt(S));v.removePathState(Z,A)}}),Ie}function O7(t){const e=()=>({initialValue:void 0,validateOnMount:!1,bails:!0,label:void 0,validateOnValueUpdate:!0,keepValueOnUnmount:void 0,syncVModel:!1,controlled:!0}),n=!!(t!=null&&t.syncVModel),i=typeof(t==null?void 0:t.syncVModel)=="string"?t.syncVModel:(t==null?void 0:t.modelPropName)||"modelValue",r=n&&!("initialValue"in(t||{}))?Bf(Pr(),i):t==null?void 0:t.initialValue;if(!t)return Object.assign(Object.assign({},e()),{initialValue:r});const o="valueProp"in t?t.valueProp:t.checkedValue,s="standalone"in t?!t.standalone:t.controlled,a=(t==null?void 0:t.modelPropName)||(t==null?void 0:t.syncVModel)||!1;return Object.assign(Object.assign(Object.assign({},e()),t||{}),{initialValue:r,controlled:s??!0,checkedValue:o,syncVModel:a})}function x7(t,e,n){const i=n!=null&&n.standalone?void 0:Cy(Mf),r=n==null?void 0:n.checkedValue,o=n==null?void 0:n.uncheckedValue;function s(a){const l=a.handleChange,u=X(()=>{const d=Nt(a.value),f=Nt(r);return Array.isArray(d)?d.findIndex(p=>ui(p,f))>=0:ui(f,d)});function c(d,f=!0){var p,h;if(u.value===((p=d==null?void 0:d.target)===null||p===void 0?void 0:p.checked)){f&&a.validate();return}const m=Nt(t),v=i==null?void 0:i.getPathState(m),S=Iu(d);let b=(h=Nt(r))!==null&&h!==void 0?h:S;i&&(v!=null&&v.multiple)&&v.type==="checkbox"?b=ky(bi(i.values,m)||[],b,void 0):(n==null?void 0:n.type)==="checkbox"&&(b=ky(Nt(a.value),b,Nt(o))),l(b,f)}return Object.assign(Object.assign({},a),{checked:u,checkedValue:r,uncheckedValue:o,handleChange:c})}return s(Dy(t,e,n))}function M7({prop:t,value:e,handleChange:n,shouldValidate:i}){const r=Pr();if(!r||!t)return;const o=typeof t=="string"?t:"modelValue",s=`update:${o}`;o in r.props&&($e(e,a=>{ui(a,Bf(r,o))||r.emit(s,a)}),$e(()=>Bf(r,o),a=>{if(a===vy&&e.value===void 0)return;const l=a===vy?void 0:a;ui(l,e.value)||n(l,i())}))}function Bf(t,e){if(t)return t.props[e]}let E7=0;const Pu=["bails","fieldsCount","id","multiple","type","validate"];function Ry(t){const n=Object.assign({},Nt({})),i=x(void 0);return i&&nr(i)&&yi(i.cast)?sn(i.cast(n)||{}):sn(n)}function Nf(t){var e;const n=E7++;let i=0;const r=re(!1),o=re(!1),s=re(0),a=[],l=hn(Ry()),u=re([]),c=re({}),d=re({}),f=a7(()=>{d.value=u.value.reduce((ee,Y)=>(ee[Na(Nt(Y.path))]=Y,ee),{})});function p(ee,Y){const we=ae(ee);if(!we){typeof ee=="string"&&(c.value[Na(ee)]=Df(Y));return}if(typeof ee=="string"){const je=Na(ee);c.value[je]&&delete c.value[je]}we.errors=Df(Y),we.valid=!we.errors.length}function h(ee){Ei(ee).forEach(Y=>{p(Y,ee[Y])})}const m=X(()=>{const ee=u.value.reduce((Y,we)=>(we.errors.length&&(Y[we.path]=we.errors),Y),{});return Object.assign(Object.assign({},c.value),ee)}),v=X(()=>Ei(m.value).reduce((ee,Y)=>{const we=m.value[Y];return we!=null&&we.length&&(ee[Y]=we[0]),ee},{})),S=X(()=>u.value.reduce((ee,Y)=>(ee[Y.path]={name:Y.path||"",label:Y.label||""},ee),{})),b=X(()=>u.value.reduce((ee,Y)=>{var we;return ee[Y.path]=(we=Y.bails)!==null&&we!==void 0?we:!0,ee},{})),k=Object.assign({},{}),A=(e=void 0)!==null&&e!==void 0?e:!1,{initialValues:w,originalInitialValues:y,setInitialValues:C}=P7(u,l),I=I7(u,l,y,v),R=X(()=>u.value.reduce((ee,Y)=>{const we=bi(l,Y.path);return Br(ee,Y.path,we),ee},{})),M=void 0;function D(ee,Y){var we,je;const st=X(()=>bi(w.value,Nt(ee))),ne=d.value[Nt(ee)],be=(Y==null?void 0:Y.type)==="checkbox"||(Y==null?void 0:Y.type)==="radio";if(ne&&be){ne.multiple=!0;const cn=i++;return Array.isArray(ne.id)?ne.id.push(cn):ne.id=[ne.id,cn],ne.fieldsCount++,ne.__flags.pendingUnmount[cn]=!1,ne}const Ue=X(()=>bi(l,Nt(ee))),ut=Nt(ee),rt=se.findIndex(cn=>cn===ut);rt!==-1&&se.splice(rt,1);const gt=X(()=>{var cn,pn,z,fe;const Re=Nt(M);if(nr(Re))return(pn=(cn=Re.describe)===null||cn===void 0?void 0:cn.call(Re,Nt(ee)).required)!==null&&pn!==void 0?pn:!1;const at=Nt(Y==null?void 0:Y.schema);return nr(at)&&(fe=(z=at.describe)===null||z===void 0?void 0:z.call(at).required)!==null&&fe!==void 0?fe:!1}),zt=i++,rn=hn({id:zt,path:ee,touched:!1,pending:!1,valid:!0,validated:!!(!((we=k[ut])===null||we===void 0)&&we.length),required:gt,initialValue:st,errors:oe([]),bails:(je=Y==null?void 0:Y.bails)!==null&&je!==void 0?je:!1,label:Y==null?void 0:Y.label,type:(Y==null?void 0:Y.type)||"default",value:Ue,multiple:!1,__flags:{pendingUnmount:{[zt]:!1},pendingReset:!1},fieldsCount:1,validate:Y==null?void 0:Y.validate,dirty:X(()=>!ui(x(Ue),x(st)))});return u.value.push(rn),d.value[ut]=rn,f(),v.value[ut]&&!k[ut]&&Et(()=>{lt(ut,{mode:"silent"})}),ba(ee)&&$e(ee,cn=>{f();const pn=sn(Ue.value);d.value[cn]=rn,Et(()=>{Br(l,cn,pn)})}),rn}const $=Ty(un,5),W=Ty(un,5),ie=Lf(async ee=>await(ee==="silent"?$():W()),(ee,[Y])=>{const we=Ei(le.errorBag.value),st=[...new Set([...Ei(ee.results),...u.value.map(ne=>ne.path),...we])].sort().reduce((ne,be)=>{var Ue;const ut=be,rt=ae(ut)||me(ut),gt=((Ue=ee.results[ut])===null||Ue===void 0?void 0:Ue.errors)||[],zt=Nt(rt==null?void 0:rt.path)||ut,rn=L7({errors:gt,valid:!gt.length},ne.results[zt]);return ne.results[zt]=rn,rn.valid||(ne.errors[zt]=rn.errors[0]),rt&&c.value[zt]&&delete c.value[zt],rt?(rt.valid=rn.valid,Y==="silent"||Y==="validated-only"&&!rt.validated||p(rt,rn.errors),ne):(p(zt,gt),ne)},{valid:ee.valid,results:{},errors:{},source:ee.source});return ee.values&&(st.values=ee.values,st.source=ee.source),Ei(st.results).forEach(ne=>{var be;const Ue=ae(ne);Ue&&Y!=="silent"&&(Y==="validated-only"&&!Ue.validated||p(Ue,(be=st.results[ne])===null||be===void 0?void 0:be.errors))}),st});function ve(ee){u.value.forEach(ee)}function ae(ee){const Y=typeof ee=="string"?Na(ee):ee;return typeof Y=="string"?d.value[Y]:Y}function me(ee){return u.value.filter(we=>ee.startsWith(we.path)).reduce((we,je)=>we?je.path.length>we.path.length?je:we:je,void 0)}let se=[],Pe;function Be(ee){return se.push(ee),Pe||(Pe=Et(()=>{[...se].sort().reverse().forEach(we=>{Sy(l,we)}),se=[],Pe=null})),Pe}function xe(ee){return function(we,je){return function(ne){return ne instanceof Event&&(ne.preventDefault(),ne.stopPropagation()),ve(be=>be.touched=!0),r.value=!0,s.value++,St().then(be=>{const Ue=sn(l);if(be.valid&&typeof we=="function"){const ut=sn(R.value);let rt=ee?ut:Ue;return be.values&&(rt=be.source==="schema"?be.values:Object.assign({},rt,be.values)),we(rt,{evt:ne,controlledValues:ut,setErrors:h,setFieldError:p,setTouched:he,setFieldTouched:J,setValues:q,setFieldValue:Se,resetForm:nt,resetField:De})}!be.valid&&typeof je=="function"&&je({values:Ue,evt:ne,errors:be.errors,results:be.results})}).then(be=>(r.value=!1,be),be=>{throw r.value=!1,be})}}}const ge=xe(!1);ge.withControlled=xe(!0);function Ie(ee,Y){const we=u.value.findIndex(st=>st.path===ee&&(Array.isArray(st.id)?st.id.includes(Y):st.id===Y)),je=u.value[we];if(!(we===-1||!je)){if(Et(()=>{lt(ee,{mode:"silent",warn:!1})}),je.multiple&&je.fieldsCount&&je.fieldsCount--,Array.isArray(je.id)){const st=je.id.indexOf(Y);st>=0&&je.id.splice(st,1),delete je.__flags.pendingUnmount[Y]}(!je.multiple||je.fieldsCount<=0)&&(u.value.splice(we,1),bt(ee),f(),delete d.value[ee])}}function Oe(ee){Ei(d.value).forEach(Y=>{Y.startsWith(ee)&&delete d.value[Y]}),u.value=u.value.filter(Y=>!Y.path.startsWith(ee)),Et(()=>{f()})}const le={formId:n,values:l,controlledValues:R,errorBag:m,errors:v,schema:M,submitCount:s,meta:I,isSubmitting:r,isValidating:o,fieldArrays:a,keepValuesOnUnmount:A,validateSchema:x(M)?ie:void 0,validate:St,setFieldError:p,validateField:lt,setFieldValue:Se,setValues:q,setErrors:h,setFieldTouched:J,setTouched:he,resetForm:nt,resetField:De,handleSubmit:ge,useFieldModel:Dt,defineInputBinds:Sn,defineComponentBinds:Jt,defineField:Vt,stageInitialValue:jt,unsetInitialValue:bt,setFieldInitialValue:ln,createPathState:D,getPathState:ae,unsetPathValue:Be,removePathState:Ie,initialValues:w,getAllPathStates:()=>u.value,destroyPath:Oe,isFieldTouched:ke,isFieldDirty:He,isFieldValid:j};function Se(ee,Y,we=!0){const je=sn(Y),st=typeof ee=="string"?ee:ee.path;ae(st)||D(st),Br(l,st,je),we&<(st)}function Z(ee,Y=!0){Ei(l).forEach(we=>{delete l[we]}),Ei(ee).forEach(we=>{Se(we,ee[we],!1)}),Y&&St()}function q(ee,Y=!0){Ba(l,ee),a.forEach(we=>we&&we.reset()),Y&&St()}function U(ee,Y){const we=ae(Nt(ee))||D(ee);return X({get(){return we.value},set(je){var st;const ne=Nt(ee);Se(ne,je,(st=Nt(Y))!==null&&st!==void 0?st:!1)}})}function J(ee,Y){const we=ae(ee);we&&(we.touched=Y)}function ke(ee){const Y=ae(ee);return Y?Y.touched:u.value.filter(we=>we.path.startsWith(ee)).some(we=>we.touched)}function He(ee){const Y=ae(ee);return Y?Y.dirty:u.value.filter(we=>we.path.startsWith(ee)).some(we=>we.dirty)}function j(ee){const Y=ae(ee);return Y?Y.valid:u.value.filter(we=>we.path.startsWith(ee)).every(we=>we.valid)}function he(ee){if(typeof ee=="boolean"){ve(Y=>{Y.touched=ee});return}Ei(ee).forEach(Y=>{J(Y,!!ee[Y])})}function De(ee,Y){var we;const je=Y&&"value"in Y?Y.value:bi(w.value,ee),st=ae(ee);st&&(st.__flags.pendingReset=!0),ln(ee,sn(je),!0),Se(ee,je,!1),J(ee,(we=Y==null?void 0:Y.touched)!==null&&we!==void 0?we:!1),p(ee,(Y==null?void 0:Y.errors)||[]),Et(()=>{st&&(st.__flags.pendingReset=!1)})}function nt(ee,Y){let we=sn(ee!=null&&ee.values?ee.values:y.value);we=Y!=null&&Y.force?we:Ba(y.value,we),we=nr(M)&&yi(M.cast)?M.cast(we):we,C(we,{force:Y==null?void 0:Y.force}),ve(je=>{var st;je.__flags.pendingReset=!0,je.validated=!1,je.touched=((st=ee==null?void 0:ee.touched)===null||st===void 0?void 0:st[je.path])||!1,Se(je.path,bi(we,je.path),!1),p(je.path,void 0)}),Y!=null&&Y.force?Z(we,!1):q(we,!1),h((ee==null?void 0:ee.errors)||{}),s.value=(ee==null?void 0:ee.submitCount)||0,Et(()=>{St({mode:"silent"}),ve(je=>{je.__flags.pendingReset=!1})})}async function St(ee){const Y=(ee==null?void 0:ee.mode)||"force";if(Y==="force"&&ve(be=>be.validated=!0),le.validateSchema)return le.validateSchema(Y);o.value=!0;const we=await Promise.all(u.value.map(be=>be.validate?be.validate(ee).then(Ue=>({key:be.path,valid:Ue.valid,errors:Ue.errors,value:Ue.value})):Promise.resolve({key:be.path,valid:!0,errors:[],value:void 0})));o.value=!1;const je={},st={},ne={};for(const be of we)je[be.key]={valid:be.valid,errors:be.errors},be.value&&Br(ne,be.key,be.value),be.errors.length&&(st[be.key]=be.errors[0]);return{valid:we.every(be=>be.valid),results:je,errors:st,values:ne,source:"fields"}}async function lt(ee,Y){var we;const je=ae(ee);return je&&(Y==null?void 0:Y.mode)!=="silent"&&(je.validated=!0),je!=null&&je.validate?je.validate(Y):(!je&&(we=Y==null?void 0:Y.warn),Promise.resolve({errors:[],valid:!0}))}function bt(ee){Sy(w.value,ee)}function jt(ee,Y,we=!1){ln(ee,Y),Br(l,ee,Y),we&&Br(y.value,ee,sn(Y))}function ln(ee,Y,we=!1){Br(w.value,ee,sn(Y)),we&&Br(y.value,ee,sn(Y))}async function un(){const ee=x(M);if(!ee)return{valid:!0,results:{},errors:{},source:"none"};o.value=!0;const Y=xu(ee)||nr(ee)?await b7(ee,l):await A7(ee,l,{names:S.value,bailsMap:b.value});return o.value=!1,Y}const en=ge((ee,{evt:Y})=>{o7(Y)&&Y.target.submit()});wt(()=>{le.validateSchema&&le.validateSchema("silent")}),ba(M)&&$e(M,()=>{var ee;(ee=le.validateSchema)===null||ee===void 0||ee.call(le,"validated-only")}),Ps(Mf,le);function Vt(ee,Y){const we=yi(Y)||Y==null?void 0:Y.label,je=ae(Nt(ee))||D(ee,{label:we}),st=()=>yi(Y)?Y(Eu(je,Pu)):Y||{};function ne(){var gt;je.touched=!0,((gt=st().validateOnBlur)!==null&>!==void 0?gt:$a().validateOnBlur)&<(je.path)}function be(){var gt;((gt=st().validateOnInput)!==null&>!==void 0?gt:$a().validateOnInput)&&Et(()=>{lt(je.path)})}function Ue(){var gt;((gt=st().validateOnChange)!==null&>!==void 0?gt:$a().validateOnChange)&&Et(()=>{lt(je.path)})}const ut=X(()=>{const gt={onChange:Ue,onInput:be,onBlur:ne};return yi(Y)?Object.assign(Object.assign({},gt),Y(Eu(je,Pu)).props||{}):Y!=null&&Y.props?Object.assign(Object.assign({},gt),Y.props(Eu(je,Pu))):gt});return[U(ee,()=>{var gt,zt,rn;return(rn=(gt=st().validateOnModelUpdate)!==null&>!==void 0?gt:(zt=$a())===null||zt===void 0?void 0:zt.validateOnModelUpdate)!==null&&rn!==void 0?rn:!0}),ut]}function Dt(ee){return Array.isArray(ee)?ee.map(Y=>U(Y,!0)):U(ee)}function Sn(ee,Y){const[we,je]=Vt(ee,Y);function st(){je.value.onBlur()}function ne(Ue){const ut=Iu(Ue);Se(Nt(ee),ut,!1),je.value.onInput()}function be(Ue){const ut=Iu(Ue);Se(Nt(ee),ut,!1),je.value.onChange()}return X(()=>Object.assign(Object.assign({},je.value),{onBlur:st,onInput:ne,onChange:be,value:we.value}))}function Jt(ee,Y){const[we,je]=Vt(ee,Y),st=ae(Nt(ee));function ne(be){we.value=be}return X(()=>{const be=yi(Y)?Y(Eu(st,Pu)):Y||{};return Object.assign({[be.model||"modelValue"]:we.value,[`onUpdate:${be.model||"modelValue"}`]:ne},je.value)})}return Object.assign(Object.assign({},le),{values:Kd(l),handleReset:()=>nt(),submitForm:en})}function I7(t,e,n,i){const r={touched:"some",pending:"some",valid:"every"},o=X(()=>!ui(e,x(n)));function s(){const l=t.value;return Ei(r).reduce((u,c)=>{const d=r[c];return u[c]=l[d](f=>f[c]),u},{})}const a=hn(s());return Aa(()=>{const l=s();a.touched=l.touched,a.valid=l.valid,a.pending=l.pending}),X(()=>Object.assign(Object.assign({initialValues:x(n)},a),{valid:a.valid&&!Ei(i.value).length,dirty:o.value}))}function P7(t,e,n){const i=Ry(),r=re(i),o=re(sn(i));function s(a,l){l!=null&&l.force?(r.value=sn(a),o.value=sn(a)):(r.value=Ba(sn(r.value)||{},sn(a)),o.value=Ba(sn(o.value)||{},sn(a))),l!=null&&l.updateFields&&t.value.forEach(u=>{if(u.touched)return;const d=bi(r.value,u.path);Br(e,u.path,sn(d))})}return{initialValues:r,originalInitialValues:o,setInitialValues:s}}function L7(t,e){return e?{valid:t.valid&&e.valid,errors:[...t.errors,...e.errors]}:t}const zX=ce("useForm",()=>{const{values:t,handleSubmit:e,setValues:n,setFieldValue:i,errors:r}=Nf();return{values:t,handleSubmit:e,setValues:n,setFieldValue:i,errors:r}}),FX=ce("useField",(t,e,n)=>Nn(t,e,n)),Vi=oe(),By="messages";let ir;const Ny=()=>{try{const t=localStorage.getItem(By);return t?JSON.parse(t):{}}catch{return{}}},Lu=$g(Ny()),oo=new Proxy(Lu,{get:(t,e)=>{const i=Ny()[e];return Lu[e]=i,i},set:(t,e,n)=>(Lu[e]=n,D7(Lu),!0)}),D7=t=>{localStorage.setItem(By,JSON.stringify(t))},R7=async t=>{var e;if(!(t in oo)){const{setLoading:n}=$i();n(!0,"Loading language package...");let i={};try{const{data:r}=await(((e=ir==null?void 0:ir.getMessages)==null?void 0:e.call(ir,t))??{});i=r.data}catch{}finally{n(!1)}return i}return oo[t]},$y=(t,...e)=>{var r;if(!Vi.value&&!localStorage.lang)return t;let n=(r=oo[Vi.value])==null?void 0:r[t];const i=n===t&&Vi.value!=="en";if((!n||i)&&(n=t,ir==null||ir.translateText(t,Vi.value).then(o=>{oo[Vi.value]?oo[Vi.value]={...oo[Vi.value],[t]:o}:oo[Vi.value]={[t]:o}}).catch(o=>{console.error("Translation error:",o)})),e.length===1&&typeof e[0]=="object"&&!Array.isArray(e[0])){const o=e[0];return Object.keys(o).reduce((s,a)=>s.replaceAll(`{${a}}`,o[a]),n)}if(e.length>0){let o=0;return n.replace(/%s/g,()=>String(e[o++]??""))}return n},Vy=async t=>{if(Vi.value!==t){const e=await R7(t);Vi.value=t,oo[t]=e,localStorage.lang=t}},Va=ce("useI18n",()=>(dt("i18n")||console.error("I18n Plugin not installed!"),{t:$y,locale:Vi,setLocale:Vy,service:ir})),B7=()=>{const t={t:$y,locale:Vi,setLocale:Vy,service:ir};return{install(e){e.config.globalProperties.$i18n=t,e.config.globalProperties.$t=t.t,e.provide("i18n",t)}}},N7=ce("createI18nWithExtension",t=>(ir=t,B7())),HX=ce("i18n",N7(Fg)),$7=(t,e)=>{e.forEach(n=>{const i=t.document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("href",n),t.document.head.appendChild(i)})},jX=ce("VueHtmlToPaper",{install(t,e={}){t.config.globalProperties.$htmlToPaper=(n,i,r=()=>{})=>{var p;const l={name:"_blank",specs:["fullscreen=yes","titlebar=yes","scrollbars=yes"],styles:[],...e,...i},u=((p=l.specs)==null?void 0:p.join(","))||"",c=document.getElementById(n);if(!c){alert(`Element to print #${n} not found!`);return}const f=window.open("",l.name,u);return f&&(f.document.write(`
|
|
52
|
+
<html>
|
|
53
|
+
<head>
|
|
54
|
+
<title>${document.title}</title>
|
|
55
|
+
</head>
|
|
56
|
+
<body>
|
|
57
|
+
${c.innerHTML}
|
|
58
|
+
</body>
|
|
59
|
+
</html>
|
|
60
|
+
`),$7(f,l.styles||[]),setTimeout(()=>{f.document.close(),f.focus(),f.print(),f.close(),r()},1e3)),!0}}}),V7="core",$s={hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,updatable:!0};var z7=Object.defineProperty,F7=(t,e)=>{for(var n in e)z7(t,n,{get:e[n],enumerable:!0})},H7=(t,e)=>{var n;const i=e.$cmpMeta$;Object.entries((n=i.$members$)!=null?n:{}).map(([o,[s]])=>{if(s&31||s&32){const a=t[o],l=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),o);Object.defineProperty(t,o,{get(){return l.get.call(this)},set(u){l.set.call(this,u)},configurable:!0,enumerable:!0}),t[o]=e.$instanceValues$.has(o)?e.$instanceValues$.get(o):a}})},Go=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},j7=(t,e)=>{const n={$flags$:0,$hostElement$:t,$cmpMeta$:e,$instanceValues$:new Map};n.$onReadyPromise$=new Promise(r=>n.$onReadyResolve$=r),t["s-p"]=[],t["s-rc"]=[];const i=n;return t.__stencil__getHostRef=()=>i,H7(t,n),i},zy=(t,e)=>e in t,za=(t,e)=>(0,console.error)(t,e),Fy="http://www.w3.org/1999/xlink",ci=typeof window<"u"?window:{},Du=ci.HTMLElement||class{},di={$flags$:0,$resourcesUrl$:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,i)=>t.addEventListener(e,n,i),rel:(t,e,n,i)=>t.removeEventListener(e,n,i),ce:(t,e)=>new CustomEvent(t,e)},U7=$s.shadowDom,K7=(()=>{var t;let e=!1;try{(t=ci.document)==null||t.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch{}return e})(),W7=t=>Promise.resolve(t),$f=!1,Hy=[],jy=[],q7=(t,e)=>n=>{t.push(n),$f||($f=!0,di.$flags$&4?Ru(Vf):di.raf(Vf))},Uy=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(n){za(n)}t.length=0},Vf=()=>{Uy(Hy),Uy(jy),($f=Hy.length>0)&&di.raf(Vf)},Ru=t=>W7().then(t),X7=q7(jy),zf=t=>(t=typeof t,t==="object"||t==="function"),G7=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Z7={};F7(Z7,{err:()=>Ky,map:()=>_7,ok:()=>Ff,unwrap:()=>J7,unwrapErr:()=>Y7});var Ff=t=>({isOk:!0,isErr:!1,value:t}),Ky=t=>({isOk:!1,isErr:!0,value:t});function _7(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then(i=>Ff(i)):Ff(n)}if(t.isErr){const n=t.value;return Ky(n)}throw"should never get here"}var J7=t=>{if(t.isOk)return t.value;throw t.value},Y7=t=>{if(t.isErr)return t.value;throw t.value},Wy=t=>{const e=Gy(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&t.tagName!=="SLOT-FB"&&qy(e,t.tagName).forEach(i=>{i.nodeType===1&&i.tagName==="SLOT-FB"&&(e9(i,Hf(i),!1).length?i.hidden=!0:i.hidden=!1)});let n=0;for(n=0;n<e.length;n++){const i=e[n];i.nodeType===1&&Gy(i,"childNodes").length&&Wy(i)}},Q7=t=>{const e=[];for(let n=0;n<t.length;n++){const i=t[n]["s-nr"]||void 0;i&&i.isConnected&&e.push(i)}return e};function qy(t,e,n){let i=0,r=[],o;for(;i<t.length;i++)o=t[i],o["s-sr"]&&(!e||o["s-hn"]===e)&&n===void 0&&r.push(o),r=[...r,...qy(o.childNodes,e,n)];return r}var e9=(t,e,n=!0)=>{const i=[];(n&&t["s-sr"]||!t["s-sr"])&&i.push(t);let r=t;for(;r=r.nextSibling;)Hf(r)===e&&(n||!r["s-sr"])&&i.push(r);return i},Xy=(t,e)=>t.nodeType===1?t.getAttribute("slot")===null&&e===""||t.getAttribute("slot")===e:t["s-sn"]===e?!0:e==="",Hf=t=>typeof t["s-sn"]=="string"?t["s-sn"]:t.nodeType===1&&t.getAttribute("slot")||void 0;function t9(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=n=>(function(i){const r=[],o=this["s-sn"];i!=null&&i.flatten&&console.error(`
|
|
61
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
62
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
63
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
64
|
+
`);const s=this["s-cr"].parentElement;return(s.__childNodes?s.childNodes:Q7(s.childNodes)).forEach(l=>{o===Hf(l)&&r.push(l)}),n?r.filter(l=>l.nodeType===1):r}).bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}function Gy(t,e){if("__"+e in t){const n=t["__"+e];return typeof n!="function"?n:n.bind(t)}else return typeof t[e]!="function"?t[e]:t[e].bind(t)}var Fa=(t,e="")=>()=>{},Ai=(t,e,...n)=>{let i=null,r=null,o=null,s=!1,a=!1;const l=[],u=d=>{for(let f=0;f<d.length;f++)i=d[f],Array.isArray(i)?u(i):i!=null&&typeof i!="boolean"&&((s=typeof t!="function"&&!zf(i))&&(i=String(i)),s&&a?l[l.length-1].$text$+=i:l.push(s?jf(null,i):i),a=s)};if(u(n),e){e.key&&(r=e.key),e.name&&(o=e.name);{const d=e.className||e.class;d&&(e.class=typeof d!="object"?d:Object.keys(d).filter(f=>d[f]).join(" "))}}const c=jf(t,null);return c.$attrs$=e,l.length>0&&(c.$children$=l),c.$key$=r,c.$name$=o,c},jf=(t,e)=>{const n={$flags$:0,$tag$:t,$text$:e,$elm$:null,$children$:null};return n.$attrs$=null,n.$key$=null,n.$name$=null,n},Ha={},n9=t=>t&&t.$tag$===Ha,Uf=t=>{const e=G7(t);return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};Uf("::slotted"),Uf(":host"),Uf(":host-context");var Zy=(t,e)=>t!=null&&!zf(t)?e&4?t==="false"?!1:t===""||!!t:e&2?typeof t=="string"?parseFloat(t):typeof t=="number"?t:NaN:e&1?String(t):t:t,i9=t=>t,Zo=(t,e,n)=>{const i=i9(t);return{emit:r=>_y(i,e,{bubbles:!0,composed:!0,cancelable:!0,detail:r})}},_y=(t,e,n)=>{const i=di.ce(e,n);return t.dispatchEvent(i),i},Bu=new WeakMap,Jy=(t,e,n,i,r,o,s)=>{if(n===i)return;let a=zy(t,e),l=e.toLowerCase();if(e==="class"){const u=t.classList,c=Yy(n);let d=Yy(i);u.remove(...c.filter(f=>f&&!d.includes(f))),u.add(...d.filter(f=>f&&!c.includes(f)))}else if(e==="style"){for(const u in n)(!i||i[u]==null)&&(u.includes("-")?t.style.removeProperty(u):t.style[u]="");for(const u in i)(!n||i[u]!==n[u])&&(u.includes("-")?t.style.setProperty(u,i[u]):t.style[u]=i[u])}else if(e!=="key")if(e==="ref")i&&i(t);else if(!t.__lookupSetter__(e)&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"?e=e.slice(3):zy(ci,l)?e=l.slice(2):e=l[2]+e.slice(3),n||i){const u=e.endsWith(Qy);e=e.replace(o9,""),n&&di.rel(t,e,n,u),i&&di.ael(t,e,i,u)}}else{const u=zf(i);if(a||u&&i!==null)try{if(t.tagName.includes("-"))t[e]!==i&&(t[e]=i);else{const d=i??"";e==="list"?a=!1:(n==null||t[e]!=d)&&(typeof t.__lookupSetter__(e)=="function"?t[e]=d:t.setAttribute(e,d))}}catch{}let c=!1;l!==(l=l.replace(/^xlink\:?/,""))&&(e=l,c=!0),i==null||i===!1?(i!==!1||t.getAttribute(e)==="")&&(c?t.removeAttributeNS(Fy,e):t.removeAttribute(e)):(!a||o&4||r)&&!u&&t.nodeType===1&&(i=i===!0?"":i,c?t.setAttributeNS(Fy,e,i):t.setAttribute(e,i))}},r9=/\s/,Yy=t=>(typeof t=="object"&&t&&"baseVal"in t&&(t=t.baseVal),!t||typeof t!="string"?[]:t.split(r9)),Qy="Capture",o9=new RegExp(Qy+"$"),Kf=(t,e,n,i)=>{const r=e.$elm$.nodeType===11&&e.$elm$.host?e.$elm$.host:e.$elm$,o=t&&t.$attrs$||{},s=e.$attrs$||{};for(const a of e1(Object.keys(o)))a in s||Jy(r,a,o[a],void 0,n,e.$flags$);for(const a of e1(Object.keys(s)))Jy(r,a,o[a],s[a],n,e.$flags$)};function e1(t){return t.includes("ref")?[...t.filter(e=>e!=="ref"),"ref"]:t}var Wf,qf,Xf=!1,Nu=!1,Gf=!1,Zf=!1,$u=(t,e,n)=>{var i;const r=e.$children$[n];let o=0,s,a,l;if(Xf||(Gf=!0,r.$tag$==="slot"&&(r.$flags$|=r.$children$?2:1)),r.$text$!==null)s=r.$elm$=ci.document.createTextNode(r.$text$);else if(r.$flags$&1)s=r.$elm$=ci.document.createTextNode(""),Kf(null,r,Zf);else{if(!ci.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(s=r.$elm$=ci.document.createElement(!Xf&&$s.slotRelocation&&r.$flags$&2?"slot-fb":r.$tag$),Kf(null,r,Zf),r.$children$)for(o=0;o<r.$children$.length;++o)a=$u(t,r,o),a&&s.appendChild(a)}return s["s-hn"]=qf,r.$flags$&3&&(s["s-sr"]=!0,s["s-cr"]=Wf,s["s-sn"]=r.$name$||"",s["s-rf"]=(i=r.$attrs$)==null?void 0:i.ref,t9(s),l=t&&t.$children$&&t.$children$[n],l&&l.$tag$===r.$tag$&&t.$elm$&&ja(t.$elm$,!1)),s},ja=(t,e)=>{di.$flags$|=1;const n=Array.from(t.__childNodes||t.childNodes);for(let i=n.length-1;i>=0;i--){const r=n[i];r["s-hn"]!==qf&&r["s-ol"]&&(so(Ua(r).parentNode,r,Ua(r)),r["s-ol"].remove(),r["s-ol"]=void 0,r["s-sh"]=void 0,Gf=!0),e&&ja(r,e)}di.$flags$&=-2},t1=(t,e,n,i,r,o)=>{let s=t["s-cr"]&&t["s-cr"].parentNode||t,a;for(;r<=o;++r)i[r]&&(a=$u(null,n,r),a&&(i[r].$elm$=a,so(s,a,Ua(e))))},n1=(t,e,n)=>{for(let i=e;i<=n;++i){const r=t[i];if(r){const o=r.$elm$;r1(r),o&&(Nu=!0,o["s-ol"]?o["s-ol"].remove():ja(o,!0),o.remove())}}},s9=(t,e,n,i,r=!1)=>{let o=0,s=0,a=0,l=0,u=e.length-1,c=e[0],d=e[u],f=i.length-1,p=i[0],h=i[f],m,v;for(;o<=u&&s<=f;)if(c==null)c=e[++o];else if(d==null)d=e[--u];else if(p==null)p=i[++s];else if(h==null)h=i[--f];else if(Vu(c,p,r))Vs(c,p,r),c=e[++o],p=i[++s];else if(Vu(d,h,r))Vs(d,h,r),d=e[--u],h=i[--f];else if(Vu(c,h,r))(c.$tag$==="slot"||h.$tag$==="slot")&&ja(c.$elm$.parentNode,!1),Vs(c,h,r),so(t,c.$elm$,d.$elm$.nextSibling),c=e[++o],h=i[--f];else if(Vu(d,p,r))(c.$tag$==="slot"||h.$tag$==="slot")&&ja(d.$elm$.parentNode,!1),Vs(d,p,r),so(t,d.$elm$,c.$elm$),d=e[--u],p=i[++s];else{for(a=-1,l=o;l<=u;++l)if(e[l]&&e[l].$key$!==null&&e[l].$key$===p.$key$){a=l;break}a>=0?(v=e[a],v.$tag$!==p.$tag$?m=$u(e&&e[s],n,a):(Vs(v,p,r),e[a]=void 0,m=v.$elm$),p=i[++s]):(m=$u(e&&e[s],n,s),p=i[++s]),m&&so(Ua(c.$elm$).parentNode,m,Ua(c.$elm$))}o>u?t1(t,i[f+1]==null?null:i[f+1].$elm$,n,i,s,f):s>f&&n1(e,o,u)},Vu=(t,e,n=!1)=>t.$tag$===e.$tag$?t.$tag$==="slot"?t.$name$===e.$name$:n?(n&&!t.$key$&&e.$key$&&(t.$key$=e.$key$),!0):t.$key$===e.$key$:!1,Ua=t=>t&&t["s-ol"]||t,Vs=(t,e,n=!1)=>{const i=e.$elm$=t.$elm$,r=t.$children$,o=e.$children$,s=e.$text$;let a;s===null?(Kf(t,e,Zf),r!==null&&o!==null?s9(i,r,e,o,n):o!==null?(t.$text$!==null&&(i.textContent=""),t1(i,null,e,o,0,o.length-1)):!n&&$s.updatable&&r!==null&&n1(r,0,r.length-1)):(a=i["s-cr"])?a.parentNode.textContent=s:t.$text$!==s&&(i.data=s)},Nr=[],i1=t=>{let e,n,i;const r=t.__childNodes||t.childNodes;for(const o of r){if(o["s-sr"]&&(e=o["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const s=o["s-sn"];for(i=n.length-1;i>=0;i--)if(e=n[i],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==o["s-hn"])if(Xy(e,s)){let a=Nr.find(l=>l.$nodeToRelocate$===e);Nu=!0,e["s-sn"]=e["s-sn"]||s,a?(a.$nodeToRelocate$["s-sh"]=o["s-hn"],a.$slotRefNode$=o):(e["s-sh"]=o["s-hn"],Nr.push({$slotRefNode$:o,$nodeToRelocate$:e})),e["s-sr"]&&Nr.map(l=>{Xy(l.$nodeToRelocate$,e["s-sn"])&&(a=Nr.find(u=>u.$nodeToRelocate$===e),a&&!l.$slotRefNode$&&(l.$slotRefNode$=a.$slotRefNode$))})}else Nr.some(a=>a.$nodeToRelocate$===e)||Nr.push({$nodeToRelocate$:e})}o.nodeType===1&&i1(o)}},r1=t=>{t.$attrs$&&t.$attrs$.ref&&t.$attrs$.ref(null),t.$children$&&t.$children$.map(r1)},so=(t,e,n)=>t==null?void 0:t.insertBefore(e,n),a9=(t,e,n=!1)=>{var i,r,o,s;const a=t.$hostElement$,l=t.$vnode$||jf(null,null),c=n9(e)?e:Ai(null,null,e);if(qf=a.tagName,n&&c.$attrs$)for(const d of Object.keys(c.$attrs$))a.hasAttribute(d)&&!["key","ref","style","class"].includes(d)&&(c.$attrs$[d]=a[d]);c.$tag$=null,c.$flags$|=4,t.$vnode$=c,c.$elm$=l.$elm$=a,Xf=U7,Wf=a["s-cr"],Nu=!1,Vs(l,c,n);{if(di.$flags$|=1,Gf){i1(c.$elm$);for(const d of Nr){const f=d.$nodeToRelocate$;if(!f["s-ol"]&&ci.document){const p=ci.document.createTextNode("");p["s-nr"]=f,so(f.parentNode,f["s-ol"]=p,f)}}for(const d of Nr){const f=d.$nodeToRelocate$,p=d.$slotRefNode$;if(p){const h=p.parentNode;let m=p.nextSibling;{let b=(i=f["s-ol"])==null?void 0:i.previousSibling;for(;b;){let k=(r=b["s-nr"])!=null?r:null;if(k&&k["s-sn"]===f["s-sn"]&&h===(k.__parentNode||k.parentNode)){for(k=k.nextSibling;k===f||k!=null&&k["s-sr"];)k=k==null?void 0:k.nextSibling;if(!k||!k["s-nr"]){m=k;break}}b=b.previousSibling}}const v=f.__parentNode||f.parentNode,S=f.__nextSibling||f.nextSibling;(!m&&h!==v||S!==m)&&f!==m&&(!f["s-hn"]&&f["s-ol"]&&(f["s-hn"]=f["s-ol"].parentNode.nodeName),so(h,f,m),f.nodeType===1&&f.tagName!=="SLOT-FB"&&(f.hidden=(o=f["s-ih"])!=null?o:!1)),f&&typeof p["s-rf"]=="function"&&p["s-rf"](p)}else f.nodeType===1&&(n&&(f["s-ih"]=(s=f.hidden)!=null?s:!1),f.hidden=!0)}}Nu&&Wy(c.$elm$),di.$flags$&=-2,Nr.length=0}Wf=void 0},o1=(t,e)=>{if(e&&!t.$onRenderResolve$&&e["s-p"]){const n=e["s-p"].push(new Promise(i=>t.$onRenderResolve$=()=>{e["s-p"].splice(n-1,1),i()}))}},_f=(t,e)=>{if(t.$flags$|=16,t.$flags$&4){t.$flags$|=512;return}return o1(t,t.$ancestorComponent$),X7(()=>l9(t,e))},l9=(t,e)=>{const n=t.$hostElement$,i=Fa("scheduleUpdate",t.$cmpMeta$.$tagName$),r=n;if(!r)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return e?o=zs(r,"componentWillLoad",void 0,n):o=zs(r,"componentWillUpdate",void 0,n),o=s1(o,()=>zs(r,"componentWillRender",void 0,n)),i(),s1(o,()=>c9(t,r,e))},s1=(t,e)=>u9(t)?t.then(e).catch(n=>{console.error(n),e()}):e(),u9=t=>t instanceof Promise||t&&t.then&&typeof t.then=="function",c9=async(t,e,n)=>{var i;const r=t.$hostElement$,o=Fa("update",t.$cmpMeta$.$tagName$),s=r["s-rc"],a=Fa("render",t.$cmpMeta$.$tagName$);d9(t,e,r,n),s&&(s.map(l=>l()),r["s-rc"]=void 0),a(),o();{const l=(i=r["s-p"])!=null?i:[],u=()=>f9(t);l.length===0?u():(Promise.all(l).then(u),t.$flags$|=4,l.length=0)}},d9=(t,e,n,i)=>{try{e=e.render(),t.$flags$&=-17,t.$flags$|=2,a9(t,e,i)}catch(r){za(r,t.$hostElement$)}return null},f9=t=>{const e=t.$cmpMeta$.$tagName$,n=t.$hostElement$,i=Fa("postUpdate",e),r=n,o=t.$ancestorComponent$;zs(r,"componentDidRender",void 0,n),t.$flags$&64?(zs(r,"componentDidUpdate",void 0,n),i()):(t.$flags$|=64,h9(n),zs(r,"componentDidLoad",void 0,n),i(),t.$onReadyResolve$(n),o||p9()),t.$onRenderResolve$&&(t.$onRenderResolve$(),t.$onRenderResolve$=void 0),t.$flags$&512&&Ru(()=>_f(t,!1)),t.$flags$&=-517},p9=t=>{Ru(()=>_y(ci,"appload",{detail:{namespace:V7}}))},zs=(t,e,n,i)=>{if(t&&t[e])try{return t[e](n)}catch(r){za(r,i)}},h9=t=>{var e;return t.classList.add((e=$s.hydratedSelectorName)!=null?e:"hydrated")},m9=(t,e)=>Go(t).$instanceValues$.get(e),a1=(t,e,n,i)=>{const r=Go(t),o=t,s=r.$instanceValues$.get(e),a=r.$flags$,l=o;n=Zy(n,i.$members$[e][0]);const u=Number.isNaN(s)&&Number.isNaN(n);if(n!==s&&!u){r.$instanceValues$.set(e,n);{if(i.$watchers$&&a&128){const d=i.$watchers$[e];d&&d.map(f=>{try{l[f](n,s,e)}catch(p){za(p,o)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(n,s,e)===!1)return;_f(r,!1)}}}},g9=(t,e,n)=>{var i,r;const o=t.prototype;if(e.$members$||e.$watchers$||t.watchers){t.watchers&&!e.$watchers$&&(e.$watchers$=t.watchers);const s=Object.entries((i=e.$members$)!=null?i:{});s.map(([a,[l]])=>{if(l&31||l&32){const{get:u,set:c}=Object.getOwnPropertyDescriptor(o,a)||{};u&&(e.$members$[a][0]|=2048),c&&(e.$members$[a][0]|=4096),Object.defineProperty(o,a,{get(){return u?u.apply(this):m9(this,a)},configurable:!0,enumerable:!0}),Object.defineProperty(o,a,{set(d){const f=Go(this);if(c){const p=l&32?this[a]:f.$hostElement$[a];typeof p>"u"&&f.$instanceValues$.get(a)?d=f.$instanceValues$.get(a):!f.$instanceValues$.get(a)&&p&&f.$instanceValues$.set(a,p),c.apply(this,[Zy(d,l)]),d=l&32?this[a]:f.$hostElement$[a],a1(this,a,d,e);return}{a1(this,a,d,e);return}}})}});{const a=new Map;o.attributeChangedCallback=function(l,u,c){di.jmp(()=>{var d;const f=a.get(l);if(!(this.hasOwnProperty(f)&&$s.lazyLoad)){if(o.hasOwnProperty(f)&&typeof this[f]=="number"&&this[f]==c)return;if(f==null){const h=Go(this),m=h==null?void 0:h.$flags$;if(m&&!(m&8)&&m&128&&c!==u){const S=this,b=(d=e.$watchers$)==null?void 0:d[l];b==null||b.forEach(k=>{S[k]!=null&&S[k].call(S,c,u,l)})}return}}const p=Object.getOwnPropertyDescriptor(o,f);c=c===null&&typeof this[f]=="boolean"?!1:c,c!==this[f]&&(!p.get||p.set)&&(this[f]=c)})},t.observedAttributes=Array.from(new Set([...Object.keys((r=e.$watchers$)!=null?r:{}),...s.filter(([l,u])=>u[0]&15).map(([l,u])=>{const c=u[1]||l;return a.set(c,l),c})]))}}return t},l1=async(t,e,n,i)=>{if((e.$flags$&32)===0){e.$flags$|=32;{const s=t.localName;customElements.whenDefined(s).then(()=>e.$flags$|=128)}}const r=e.$ancestorComponent$,o=()=>_f(e,!0);r&&r["s-rc"]?r["s-rc"].push(o):o()},v9=(t,e)=>{},y9=t=>{if((di.$flags$&1)===0){const e=Go(t),n=e.$cmpMeta$,i=Fa("connectedCallback",n.$tagName$);if(e.$flags$&1)u1(t,e,n.$listeners$),e!=null&&e.$lazyInstance$||e!=null&&e.$onReadyPromise$&&e.$onReadyPromise$.then(()=>v9());else{e.$flags$|=1,n.$flags$&12&&b9(t);{let r=t;for(;r=r.parentNode||r.host;)if(r["s-p"]){o1(e,e.$ancestorComponent$=r);break}}n.$members$&&Object.entries(n.$members$).map(([r,[o]])=>{if(o&31&&t.hasOwnProperty(r)){const s=t[r];delete t[r],t[r]=s}}),$s.initializeNextTick?Ru(()=>l1(t,e)):l1(t,e)}i()}},b9=t=>{if(!ci.document)return;const e=t["s-cr"]=ci.document.createComment("");e["s-cn"]=!0,so(t,e,t.firstChild)},A9=async t=>{if((di.$flags$&1)===0){const e=Go(t);e.$rmListeners$&&(e.$rmListeners$.map(n=>n()),e.$rmListeners$=void 0)}Bu.has(t)&&Bu.delete(t),t.shadowRoot&&Bu.has(t.shadowRoot)&&Bu.delete(t.shadowRoot)},zu=(t,e)=>{const n={$flags$:e[0],$tagName$:e[1]};n.$members$=e[2],n.$listeners$=e[3],n.$watchers$=t.$watchers$;const i=t.prototype.connectedCallback,r=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){j7(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){const o=Go(this);u1(this,o,n.$listeners$),this.__hasHostListenerAttached=!0}y9(this),i&&i.call(this)},disconnectedCallback(){A9(this),r&&r.call(this)},__attachShadow(){this.shadowRoot=this}}),t.is=n.$tagName$,g9(t,n)},u1=(t,e,n,i)=>{n&&ci.document&&n.map(([r,o,s])=>{const a=S9(ci.document,t,r),l=w9(e,s),u=C9(r);di.ael(a,o,l,u),(e.$rmListeners$=e.$rmListeners$||[]).push(()=>di.rel(a,o,l,u))})},w9=(t,e)=>n=>{try{t.$hostElement$[e](n)}catch(i){za(i,t.$hostElement$)}},S9=(t,e,n)=>n&8?ci:e,C9=t=>K7?{passive:(t&1)!==0,capture:(t&2)!==0}:(t&2)!==0;const k9=zu(class extends Du{constructor(){super();Ct(this,"label");this.__registerHost()}render(){return Ai(Ha,{key:"b38f4386d6fb33972469caffc9b7f95b7fb0e7c9"},Ai("slot",{key:"e1f130e8171a7ac985fc07612e3e8a693d6058ea",name:"icon"}),Ai("slot",{key:"f7395cc5ea9dc2d6125bf3e30a97e0303dab43e0"},this.label))}},[4,"wangs-button",{label:[1]}]);function T9(){if(typeof customElements>"u")return;["wangs-button"].forEach(e=>{switch(e){case"wangs-button":customElements.get(e)||customElements.define(e,k9);break}})}const O9=T9,x9=zu(class extends Du{constructor(){super();Ct(this,"icon");Ct(this,"severity");Ct(this,"class");Ct(this,"tooltipPos");Ct(this,"info");this.__registerHost()}getSeverityClass(){switch(this.severity){case"primary":return"text-primary-500";case"success":return"text-success-500";case"warning":return"text-warning-500";case"danger":return"text-danger-500";case"info":return"text-info-500";default:return"inherit"}}getIconClass(){return`icon ic-${this.icon} cursor-pointer !shrink-0`}render(){return Ai(Ha,{key:"5cab8f5fe45204596e7fa4a154bd03c23bf2b525",class:this.getIconClass()})}},[0,"wangs-icon",{icon:[1],severity:[1],class:[1],tooltipPos:[1,"tooltip-pos"],info:[1]}]);function c1(){if(typeof customElements>"u")return;["wangs-icon"].forEach(e=>{switch(e){case"wangs-icon":customElements.get(e)||customElements.define(e,x9);break}})}const M9=c1;function d1(){window.WangsUI||(window.WangsUI={presets:{"WANGS-TAB-MENU":{},"WANGS-INPUT-OTP":{}}})}function f1(t){return d1(),window.WangsUI.presets[t]}function E9(t,e){return{...f1(t),...e}}class p1{constructor({tag:e,pt:n}){Ct(this,"preset");d1(),this.preset=E9(e,n),this.cx=this.cx.bind(this),this.sx=this.sx.bind(this),this.ptm=this.ptm.bind(this),this.ptmo=this.ptmo.bind(this)}getSection(e,n,i){const r=e[n];return typeof r=="function"?r(i):r}getPT(e){return f1(e)}transformClasses(e){switch(!0){case typeof e=="string":return e;case Array.isArray(e):return e.map(n=>typeof n=="string"?n:typeof n=="object"&&n!==null?Object.entries(n).filter(([i,r])=>!!r).map(([i])=>i).join(" "):"").filter(Boolean).join(" ");case(typeof e=="object"&&e!==null):return Object.entries(e).filter(([n,i])=>!!i).map(([n])=>n).join(" ");default:return""}}transformStyles(e){var n;if(typeof e=="string"){const i={};return e.split(";").map(r=>r.trim()).filter(Boolean).forEach(r=>{const[o,s]=r.split(":").map(a=>a.trim());if(o&&s){const a=o.replace(/-([a-z])/g,(l,u)=>u.toUpperCase());i[a]=s}}),i}if(typeof e=="object"&&e!==null){const i={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r.replace(/-([a-z])/g,(s,a)=>a.toUpperCase());i[o]=(n=e[r])==null?void 0:n.toString()}return i}return{}}cx(e,n){var i;return this.transformClasses((i=this.getSection(this.preset,e,n))==null?void 0:i.class)}sx(e,n){var i;return this.transformStyles((i=this.getSection(this.preset,e,n))==null?void 0:i.style)}ptm(e,n){const i=this.getSection(this.preset,e,n);return i?{...i,class:this.transformClasses(i.class),style:this.transformStyles(i.style),"data-ui-section":e}:void 0}ptmo(e,n,i){const r=this.getSection(this.getPT(e),n,i);return r?{...r,class:this.transformClasses(r.class),style:this.transformStyles(r.style),"data-ui-section":n}:void 0}}function h1(t){setTimeout(t,0)}const I9=zu(class extends Du{constructor(){super();Ct(this,"base");Ct(this,"focused",!1);Ct(this,"pt");Ct(this,"modelValue","");Ct(this,"length",4);Ct(this,"invalid",!1);Ct(this,"disabled",!1);Ct(this,"readonly",!1);Ct(this,"variant","outlined");Ct(this,"mask",!1);Ct(this,"integerOnly",!1);Ct(this,"tokens",[]);Ct(this,"updateModelValue");Ct(this,"change");Ct(this,"focus");Ct(this,"blur");Ct(this,"completed");Ct(this,"onInput",(n,i)=>{const r=n.target,o=this.tokens;o[i]=r.value,this.tokens=[...o],this.updateModel(n),n.inputType==="deleteContentBackward"?this.moveToPrev(r):(n.inputType==="insertText"||n.inputType==="deleteContentForward")&&this.moveToNext(r)});Ct(this,"onFocus",n=>{n.target.select(),this.focus.emit(n),this.focused=!0});Ct(this,"onBlur",n=>{this.focused=!1,h1(()=>{this.focused||this.blur.emit(n)})});Ct(this,"onPaste",n=>{var o;if(this.readonly||this.disabled)return;const i=((o=n.clipboardData)==null?void 0:o.getData("text"))??"";if(!i)return;const r=i.substring(0,this.length);(!this.integerOnly||!isNaN(Number(r)))&&(this.tokens=r.split(""),this.updateModel(n)),n.preventDefault()});Ct(this,"onKeyDown",n=>{if(!(n.ctrlKey||n.metaKey))switch(n.code){case"ArrowLeft":this.moveToPrev(n.target),n.preventDefault();break;case"ArrowRight":this.moveToNext(n.target),n.preventDefault();break;case"Backspace":n.target.value===""&&(this.moveToPrev(n.target),n.preventDefault());break;default:this.integerOnly&&!/^\d$/.test(n.key)&&n.preventDefault();break}});this.__registerHost(),this.updateModelValue=Zo(this,"update:modelValue"),this.change=Zo(this,"change"),this.focus=Zo(this,"focus"),this.blur=Zo(this,"blur"),this.completed=Zo(this,"completed"),this.base=new p1({tag:"WANGS-INPUT-OTP",pt:this.pt})}get cx(){return this.base.cx}get ptm(){return this.base.ptm}get el(){return this}handleModelValueChange(n){this.tokens=n?n.split(""):Array(this.length).fill("")}onTokensChange(n){n.length===this.length&&n.every(i=>i&&i.length===1)&&h1(()=>this.completed.emit(n.join("")))}componentWillLoad(){this.handleModelValueChange(this.modelValue)}updateModel(n){const i=this.tokens.join("");this.updateModelValue.emit(i),this.change.emit({originalEvent:n,value:i})}moveToPrev(n){const i=this.findSiblingInput(n,"previousElementSibling");i&&(i.focus(),i.select())}moveToNext(n){const i=this.findSiblingInput(n,"nextElementSibling");i&&(i.focus(),i.select())}findSiblingInput(n,i){let r=n[i];for(;r&&r.tagName!=="INPUT";)r=r[i];return r}isInputFilledIn(n){return!!this.tokens[n]}getPtmo(n){const{invalid:i,mask:r,disabled:o,integerOnly:s,modelValue:a,readonly:l,length:u,variant:c,tokens:d}=this;return{props:{invalid:i,mask:r,disabled:o,integerOnly:s,modelValue:a,readonly:l,length:u,variant:c},state:{tokens:d},parent:this.el.parentElement,context:n!=null?{filled:this.isInputFilledIn(n),disabled:this.disabled}:void 0}}render(){return Ai(Ha,{key:"844b6b24ab1e9755147b855a1bfe18e13998eb26",class:this.cx("root",this.getPtmo())},Array.from({length:this.length}).map((n,i)=>Ai("input",{type:this.mask?"password":"text",class:this.cx("input",this.getPtmo(i)),value:this.tokens[i]||"",inputmode:this.integerOnly?"numeric":"text",disabled:this.disabled,readonly:this.readonly,onInput:r=>this.onInput(r,i),onFocus:this.onFocus,onBlur:this.onBlur,onPaste:this.onPaste,onKeyDown:this.onKeyDown,maxLength:1})))}static get watchers(){return{modelValue:["handleModelValueChange"],tokens:["onTokensChange"]}}},[0,"wangs-input-otp",{pt:[16],modelValue:[1,"model-value"],length:[2],invalid:[4],disabled:[4],readonly:[4],variant:[1],mask:[4],integerOnly:[4,"integer-only"],tokens:[32]},void 0,{modelValue:["handleModelValueChange"],tokens:["onTokensChange"]}]);function P9(){if(typeof customElements>"u")return;["wangs-input-otp"].forEach(e=>{switch(e){case"wangs-input-otp":customElements.get(e)||customElements.define(e,I9);break}})}const L9=P9;let D9=(Yr=class{constructor(){Ct(this,"_baseUrl","");if(globalThis[Yr.SINGLETON_KEY])return globalThis[Yr.SINGLETON_KEY];globalThis[Yr.SINGLETON_KEY]=this}setNavigationBaseUrl(e){this._baseUrl=this.normalizeBase(e)}getNavigationBaseUrl(){return this._baseUrl}normalizeBase(e){return e.replace(/\/+$/,"").concat("/")}normalizePath(e){const n=this.getNavigationBaseUrl();if(!n)return e;const i=e.startsWith("/")?e.slice(1):e;return`${n}${i}`}stripBase(e,n){return n||(n=this.getNavigationBaseUrl()),n!=="/"&&e.startsWith(n)?"/"+e.slice(n.length).replace(/^\/+/,""):e}push(e,n={},i=""){var o;const r={...n,...history.state??{},current:e,back:(o=history.state)==null?void 0:o.current,forward:void 0,replaced:!1,position:history.length+1};window.history.pushState(r,i,e)}replace(e,n={},i=""){const r={...n,...history.state??{},forward:void 0,current:e,replaced:!0};window.history.replaceState(r,i,e)}dispatchBeforeNavigationEvent(e,n,i){window.dispatchEvent(new CustomEvent("wangs-ui-core:before-navigation-event",{detail:{route:e,mode:n,state:i}}))}dispatchNavigationEvent(e,n,i){window.dispatchEvent(new CustomEvent("wangs-ui-core:navigation-event",{detail:{route:e,mode:n,state:i}}))}navigateToRoute(e,n="push",i={},r=""){if(!e)return;const o=typeof e=="string"?e:e.toString(),s=this.normalizePath(o);if(s===location.pathname)return console.warn("[WangsUIRouter] Navigation aborted: target route is the same as the current route.");this.dispatchBeforeNavigationEvent(s,n,i),n==="push"?this.push(s,i,r):this.replace(s,i,r),this.dispatchNavigationEvent(s,n,i)}},Ct(Yr,"SINGLETON_KEY","__WANGS_UI_ROUTER_INSTANCE__"),Yr);const Jf=new D9,R9=zu(class extends Du{constructor(){super();Ct(this,"base");Ct(this,"navRef");Ct(this,"inkbarRef");Ct(this,"pt");Ct(this,"type","tab");Ct(this,"model");Ct(this,"activeIndex",0);Ct(this,"useTrailingLine",!0);Ct(this,"currentActiveIndex",this.activeIndex);Ct(this,"tabChange");Ct(this,"updateActiveIndex");this.__registerHost(),this.tabChange=Zo(this,"tabChange"),this.updateActiveIndex=Zo(this,"update:activeIndex"),this.base=new p1({tag:"WANGS-TAB-MENU",pt:this.pt})}get cx(){return this.base.cx}get ptm(){return this.base.ptm}get el(){return this}componentWillLoad(){this.setActiveIndex()}componentDidRender(){this.updateInkBar()}onUpdateActiveIndex(n){this.updateActiveIndex.emit(n)}onRoutePathChanged(){this.setActiveIndex()}onItemClick(n,i,r){var o;if(this.disabled(i))return n.preventDefault();r!==this.currentActiveIndex&&(this.currentActiveIndex=r),i.route&&Jf.navigateToRoute(i.route),(o=i.command)==null||o.call(i,{originalEvent:n,item:i}),this.tabChange.emit({originalEvent:n,index:r})}label(n){return typeof n.label=="function"?n.label():n.label}visible(n){return typeof n.visible=="function"?n.visible():n.visible!==!1}disabled(n){return typeof n.disabled=="function"?n.disabled():n.disabled===!0}updateInkBar(){var r;const n=(r=this.navRef)==null?void 0:r.children;if(!n)return;let i=!1;for(let o=0;o<n.length;o++){const s=n[o];if(s.dataset.pHighlight==="true"){const a=s.getBoundingClientRect(),l=this.navRef.getBoundingClientRect();this.inkbarRef.style.width=`${a.width}px`,this.inkbarRef.style.left=`${a.left-l.left}px`,i=!0;break}}i||(this.inkbarRef.style.width="0px",this.inkbarRef.style.left="0px")}setActiveIndex(){const n=window.location.pathname,i=o=>{var a;let s=(a=this.model)==null?void 0:a.findIndex(l=>l.route&&o===l.route);if(s===-1&&o.includes("/")){const l=o.substring(0,o.lastIndexOf("/"));s=i(l)}return s},r=i(Jf.stripBase(n));this.currentActiveIndex=r===-1?this.currentActiveIndex:r}getPtmo(n,i){const{activeIndex:r,model:o,type:s,useTrailingLine:a}=this,l={item:n,index:i,active:i!=null&&this.currentActiveIndex===i,disabled:n!=null&&this.disabled(n)};return{props:{activeIndex:r,model:o,type:s,useTrailingLine:a},state:{currentActiveIndex:this.currentActiveIndex},context:n?l:void 0}}render(){return Ai(Ha,{key:"4a399a4b6412de58edb4f06df1ff9246654981a7",...this.ptm("root")},Ai("ul",{key:"37930281d1b0ec7d17a1eb9089edd5fbe89109f7",...this.ptm("menu",this.getPtmo()),role:"menubar",ref:n=>this.navRef=n},this.model.map((n,i)=>this.visible(n)?Ai("li",{key:this.label(n)+"_"+i,class:this.cx("menuitem",this.getPtmo(n,i)),role:"presentation","data-ui-highlight":(this.currentActiveIndex===i).toString(),"data-ui-disabled":this.disabled(n).toString(),onClick:r=>this.onItemClick(r,n,i)},Ai("a",{role:"menuitem",href:n.url??n.route?Jf.normalizePath(n.url??n.route):void 0,target:n.target,"aria-label":this.label(n),"aria-disabled":this.disabled(n)?"true":"false",tabIndex:-1,onClick:r=>n.route&&r.preventDefault(),...this.ptm("action",this.getPtmo(n,i))},n.icon&&Ai("wangs-icon",{icon:n.icon}),Ai("span",{class:this.cx("label")},this.label(n)))):null),Ai("li",{key:"2031b2abfd6285d4b513ad8bed9f522bd7413ecf",ref:n=>this.inkbarRef=n,class:this.cx("inkbar",this.getPtmo()),role:"none"})))}static get watchers(){return{currentActiveIndex:["onUpdateActiveIndex"]}}},[0,"wangs-tab-menu",{pt:[16],type:[1],model:[16],activeIndex:[2,"active-index"],useTrailingLine:[4,"use-trailing-line"],currentActiveIndex:[32]},[[8,"wangs-ui-core:navigation-event","onRoutePathChanged"]],{currentActiveIndex:["onUpdateActiveIndex"]}]);function B9(){if(typeof customElements>"u")return;["wangs-tab-menu","wangs-icon"].forEach(e=>{switch(e){case"wangs-tab-menu":customElements.get(e)||customElements.define(e,R9);break;case"wangs-icon":customElements.get(e)||c1();break}})}const N9=B9;function $9(){window.WangsUI||(window.WangsUI={presets:{"WANGS-TAB-MENU":{},"WANGS-INPUT-OTP":{}}})}function m1(t,e){$9(),window.WangsUI.presets[t]=e}function g1(t,e){return{[t]:e}[t]}g1("WANGS-TAB-MENU",{root:{class:"overflow-x-visible"},menu:({props:t})=>({class:["flex flex-1","list-none","p-0 m-0","text-general-100",{"w-max ring-1 ring-inset ring-general-100 rounded":t.type==="segmented"}]}),menuitem:{class:"mr-0"},action:({props:t,context:e})=>{var n,i;return{class:["relative","font-medium","text-xs leading-4 tracking-[0.02em]","flex items-center",{"rounded-xl py-1 px-3":t.type==="pill",rounded:t.type==="segmented","p-2 pb-1.5 pt-0.5 !h-6":t.type==="tab","py-[5px] px-3 !h-6":t.type==="segmented","ml-1":t.type==="pill"&&e.index!==0,"gap-1":e.item.icon},{"border-b-2":t.type==="tab","shadow-[-2px_2px_2px_rgba(0,0,0,0.25)] overflow-visible":t.type==="segmented"&&e.active},{"border-primary-700":e.active,"border-grayscale-400":!e.active,"text-grayscale-600":!e.active&&t.type==="tab","text-primary-700":e.active&&t.type==="tab","bg-primary-700 text-white":t.type==="pill"&&e.active,"bg-grayscale-100 text-grayscale-800":t.type==="pill"&&!e.active,"bg-primary-500 text-white":t.type==="segmented"&&e.active,"!text-general-800":t.type==="segmented"&&!e.active,"bg-transparent ":t.type!=="pill"&&!e.active},{"hover:bg-primary-50":t.type==="tab"},"focus-visible:outline-none focus-visible:outline-offset-0",{"focus-visible:border-primary-200 focus-visible:text-primary-400":!e.active},{"pointer-events-none":(n=e.item)==null?void 0:n.disabled,"opacity-60":(i=e.item)==null?void 0:i.disabled},"transition-all duration-200","cursor-pointer select-none text-decoration-none","overflow-hidden","user-select-none","!no-underline","whitespace-nowrap"]}},icon:{class:"mr-2"},inkbar:({props:t})=>({class:["grow border-b-2 border-grayscale-400",{hidden:t.type==="pill"||t.useTrailingLine===!1||t.type==="segmented"}]})}),g1("WANGS-INPUT-OTP",{root:{class:["flex items-center","gap-[6px]","w-max"]},input:({props:t,context:e,parent:n})=>({class:["text-[14px] leading-none font-medium",{"flex-1 w-[1%]":n.tagName=="WANGS-INPUT-GROUP"},"text-center","m-0","w-[42px] h-[42px]",{"rounded-md":n.tagName!=="WANGS-INPUT-GROUP"},{"first:rounded-l-md rounded-none last:rounded-r-md":n.tagName=="WANGS-INPUT-GROUP"},{"border-0 border-y border-l last:border-r":n.tagName=="WANGS-INPUT-GROUP"},"text-general-800 dark:text-general-800","placeholder:text-surface-400 dark:placeholder:text-surface-500","bg-white dark:bg-white",{"ring-1":navigator.userAgent.includes("Firefox"),"ring-[0.5px]":!navigator.userAgent.includes("Firefox")},{"ring-general-200 dark:ring-general-200":!t.invalid},{"ring-danger-500 dark:ring-danger-500":t.invalid},{"hover:bg-primary-50/50 hover:ring-primary-500 dark:hover:ring-primary-400":!e.disabled&&!t.invalid,"focus:bg-primary-50/50 focus:ring-primary-500 dark:focus:ring-primary-400":!e.disabled&&!t.invalid,"focus:outline-none focus:outline-offset-0":!e.disabled,"opacity-60 select-none pointer-events-none cursor-default":e.disabled},{filled:n.tagName=="WANGS-FLOAT-LABEL"&&e.filled},"appearance-none","transition-colors duration-200"]})});const va=class va{constructor(){Ct(this,"_baseUrl","");if(globalThis[va.SINGLETON_KEY])return globalThis[va.SINGLETON_KEY];globalThis[va.SINGLETON_KEY]=this}setNavigationBaseUrl(e){this._baseUrl=this.normalizeBase(e)}getNavigationBaseUrl(){return this._baseUrl}normalizeBase(e){return e.replace(/\/+$/,"").concat("/")}normalizePath(e){const n=this.getNavigationBaseUrl();if(!n)return e;const i=e.startsWith("/")?e.slice(1):e;return`${n}${i}`}stripBase(e,n){return n||(n=this.getNavigationBaseUrl()),n!=="/"&&e.startsWith(n)?"/"+e.slice(n.length).replace(/^\/+/,""):e}push(e,n={},i=""){var o;const r={...n,...history.state??{},current:e,back:(o=history.state)==null?void 0:o.current,forward:void 0,replaced:!1,position:history.length+1};window.history.pushState(r,i,e)}replace(e,n={},i=""){const r={...n,...history.state??{},forward:void 0,current:e,replaced:!0};window.history.replaceState(r,i,e)}dispatchBeforeNavigationEvent(e,n,i){window.dispatchEvent(new CustomEvent("wangs-ui-core:before-navigation-event",{detail:{route:e,mode:n,state:i}}))}dispatchNavigationEvent(e,n,i){window.dispatchEvent(new CustomEvent("wangs-ui-core:navigation-event",{detail:{route:e,mode:n,state:i}}))}navigateToRoute(e,n="push",i={},r=""){if(!e)return;const o=typeof e=="string"?e:e.toString(),s=this.normalizePath(o);if(s===location.pathname)return console.warn("[WangsUIRouter] Navigation aborted: target route is the same as the current route.");this.dispatchBeforeNavigationEvent(s,n,i),n==="push"?this.push(s,i,r):this.replace(s,i,r),this.dispatchNavigationEvent(s,n,i)}};Ct(va,"SINGLETON_KEY","__WANGS_UI_ROUTER_INSTANCE__");let Yf=va;const _o=new Yf,Fu="routerLink",v1="navManager",Ka=Symbol(),V9={default:Ka},y1=t=>(t==null?void 0:t.split(" "))||[],z9=(t,e,n=[])=>{var i;return[...Array.from(((i=t.value)==null?void 0:i.classList)||[]),...n].filter((r,o,s)=>!e.has(r)&&s.indexOf(r)===o)},b1=(t,e,n)=>{t.addEventListener(e,i=>{const r=i;r.target.tagName===t.tagName&&(i.stopImmediatePropagation(),n(e,r.detail))})},Hu=(t,e,n=[],i=[],r,o,s)=>{e!==void 0&&e();const a=i,l=[Fu,...n].reduce((u,c)=>(u[c]=V9,u),{});return Ae((u,{attrs:c,slots:d,emit:f})=>{var k;const p=re(),h=new Set(y1(c.class));wt(()=>{i.forEach(A=>{p.value&&b1(p.value,A,f)})});const m={created:A=>{(Array.isArray(o)?o:[o]).filter(Boolean).map(w=>w.replace(/-([a-z])/g,y=>y[1].toUpperCase())).forEach(w=>{A.addEventListener(w,y=>{y.target.tagName,A.tagName})}),s!=null&&s.length&&s.forEach(w=>{b1(A,w,f)})}},v=Pr(),S=(k=v==null?void 0:v.appContext)==null?void 0:k.provides[v1],b=S?dt(v1):void 0;return()=>{u[r],y1(c.class).forEach(C=>{h.add(C)});const A=u.onClick,w={ref:p,class:z9(p,h),onClick:C=>{A!==void 0&&A(C),C.defaultPrevented||(I=>{const{routerLink:R}=u;if(R!==Ka)if(b!==void 0){I.preventDefault();let M={event:I};for(const D in u){const $=u[D];u.hasOwnProperty(D)&&D.startsWith("router")&&$!==Ka&&(M[D]=$)}b.navigate(M)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")})(C)}};for(const C in u){const I=u[C];(u.hasOwnProperty(C)&&I!==Ka||C.startsWith("aria"))&&(w[C]=I);const R="on"+C.slice(0,1).toUpperCase()+C.slice(1),M=c[R];p.value&&c.hasOwnProperty(R)&&"addEventListener"in p.value&&p.value.addEventListener(C,M)}Fu in u&&u[Fu]!==Ka&&(w.href=u[Fu]);const y=Ji(t,w,d.default&&d.default());return s!=null&&s.length?ft(y,[[m]]):y}},{name:t,props:l,emits:a})};Hu("wangs-button",O9,["label"]),Hu("wangs-icon",M9,["icon","severity","class","tooltipPos","info"]);const F9=Hu("wangs-input-otp",L9,["pt","modelValue","length","invalid","disabled","readonly","variant","mask","integerOnly","update:modelValue","change","focus","blur","completed"],["update:modelValue","change","focus","blur","completed"],void 0,void 0,["update:modelValue"]),H9=Hu("wangs-tab-menu",N9,["pt","type","model","activeIndex","useTrailingLine","tabChange","update:activeIndex"],["tabChange","update:activeIndex"],void 0,void 0,["update:activeIndex"]);var j9={async install(t){var e;await Et();const n=t.config.globalProperties.$router;if(!n)return void console.warn("[Bridge] Vue Router is not installed or not found. Please ensure Vue Router is installed before this plugin.");const{dispose:i}=function(r){_o.setNavigationBaseUrl(_o.normalizeBase(r.options.history.base));const o=a=>{const{route:l,mode:u,state:c}=a.detail;if(!l||r.currentRoute.value.fullPath===l)return;const d={path:_o.stripBase(l),state:c};r[u](d).catch(()=>{})};window.addEventListener("wangs-ui-core:before-navigation-event",o);const s=r.afterEach((a,l,u)=>{const c=ef(u,16),d=ef(u,4),f=r.currentRoute.value.fullPath;(c||d)&&location.pathname!=r.currentRoute.value.path&&(_o.replace(_o.normalizePath(f),history.state),_o.dispatchNavigationEvent(f,"replace",history.state)),u||_o.dispatchNavigationEvent(f,"replace",history.state)});return{dispose(){window.removeEventListener("wangs-ui-core:before-navigation-event",o),s()}}}(n);(e=t.onUnmount)===null||e===void 0||e.call(t,i)}},ii={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"};function A1(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=U9(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(u){throw u},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
65
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function U9(t,e){if(t){if(typeof t=="string")return w1(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w1(t,e)}}function w1(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var S1={filter:function(e,n,i,r,o){var s=[];if(!e)return s;var a=A1(e),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;if(typeof u=="string"){if(this.filters[r](u,i,o)){s.push(u);continue}}else{var c=A1(n),d;try{for(c.s();!(d=c.n()).done;){var f=d.value,p=Ce.resolveFieldData(u,f);if(this.filters[r](p,i,o)){s.push(u);break}}}catch(h){c.e(h)}finally{c.f()}}}}catch(h){a.e(h)}finally{a.f()}return s},filters:{startsWith:function(e,n,i){if(n==null||n==="")return!0;if(e==null)return!1;var r=Ce.removeAccents(n.toString()).toLocaleLowerCase(i),o=Ce.removeAccents(e.toString()).toLocaleLowerCase(i);return o.slice(0,r.length)===r},contains:function(e,n,i){if(n==null||n==="")return!0;if(e==null)return!1;var r=Ce.removeAccents(n.toString()).toLocaleLowerCase(i),o=Ce.removeAccents(e.toString()).toLocaleLowerCase(i);return o.indexOf(r)!==-1},notContains:function(e,n,i){if(n==null||n==="")return!0;if(e==null)return!1;var r=Ce.removeAccents(n.toString()).toLocaleLowerCase(i),o=Ce.removeAccents(e.toString()).toLocaleLowerCase(i);return o.indexOf(r)===-1},endsWith:function(e,n,i){if(n==null||n==="")return!0;if(e==null)return!1;var r=Ce.removeAccents(n.toString()).toLocaleLowerCase(i),o=Ce.removeAccents(e.toString()).toLocaleLowerCase(i);return o.indexOf(r,o.length-r.length)!==-1},equals:function(e,n,i){return n==null||n===""?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()===n.getTime():Ce.removeAccents(e.toString()).toLocaleLowerCase(i)==Ce.removeAccents(n.toString()).toLocaleLowerCase(i)},notEquals:function(e,n,i){return n==null||n===""?!1:e==null?!0:e.getTime&&n.getTime?e.getTime()!==n.getTime():Ce.removeAccents(e.toString()).toLocaleLowerCase(i)!=Ce.removeAccents(n.toString()).toLocaleLowerCase(i)},in:function(e,n){if(n==null||n.length===0)return!0;for(var i=0;i<n.length;i++)if(Ce.equals(e,n[i]))return!0;return!1},between:function(e,n){return n==null||n[0]==null||n[1]==null?!0:e==null?!1:e.getTime?n[0].getTime()<=e.getTime()&&e.getTime()<=n[1].getTime():n[0]<=e&&e<=n[1]},lt:function(e,n){return n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()<n.getTime():e<n},lte:function(e,n){return n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()<=n.getTime():e<=n},gt:function(e,n){return n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()>n.getTime():e>n},gte:function(e,n){return n==null?!0:e==null?!1:e.getTime&&n.getTime?e.getTime()>=n.getTime():e>=n},dateIs:function(e,n){return n==null?!0:e==null?!1:e.toDateString()===n.toDateString()},dateIsNot:function(e,n){return n==null?!0:e==null?!1:e.toDateString()!==n.toDateString()},dateBefore:function(e,n){return n==null?!0:e==null?!1:e.getTime()<n.getTime()},dateAfter:function(e,n){return n==null?!0:e==null?!1:e.getTime()>n.getTime()}},register:function(e,n){this.filters[e]=n}};function Wa(t){"@babel/helpers - typeof";return Wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wa(t)}function C1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Qf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?C1(Object(n),!0).forEach(function(i){K9(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C1(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function K9(t,e,n){return e=W9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function W9(t){var e=q9(t,"string");return Wa(e)=="symbol"?e:String(e)}function q9(t,e){if(Wa(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Wa(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var k1={ripple:!1,inputStyle:null,locale:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,showMonthAfterYear:!1,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"Page {page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left",listLabel:"Option List"}},filterMatchModeOptions:{text:[ii.STARTS_WITH,ii.CONTAINS,ii.NOT_CONTAINS,ii.ENDS_WITH,ii.EQUALS,ii.NOT_EQUALS],numeric:[ii.EQUALS,ii.NOT_EQUALS,ii.LESS_THAN,ii.LESS_THAN_OR_EQUAL_TO,ii.GREATER_THAN,ii.GREATER_THAN_OR_EQUAL_TO],date:[ii.DATE_IS,ii.DATE_IS_NOT,ii.DATE_BEFORE,ii.DATE_AFTER]},zIndex:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100},pt:void 0,ptOptions:{mergeSections:!0,mergeProps:!1},unstyled:!1,csp:{nonce:void 0}},X9=Symbol();function G9(t,e,n,i){if(t!==e){var r=document.getElementById(n),o=r.cloneNode(!0),s=r.getAttribute("href").replace(t,e);o.setAttribute("id",n+"-clone"),o.setAttribute("href",s),o.addEventListener("load",function(){r.remove(),o.setAttribute("id",n),i&&i()}),r.parentNode&&r.parentNode.insertBefore(o,r.nextSibling)}}var Z9={install:function(e,n){var i=n?Qf(Qf({},k1),n):Qf({},k1),r={config:hn(i),changeTheme:G9};e.config.globalProperties.$primevue=r,e.provide(X9,r)}};const T1={locale:{global:{startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",completed:"Completed",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],monthNames:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],dayNames:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],dayNamesShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dayNamesMin:["Mi","Se","Se","Ra","Ka","Ju","Sa"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",pm:"PM",am:"AM",today:"Today",weekHeader:"Wk",firstDayOfWeek:0,showMonthAfterYear:!1,dateFormat:"mm/dd/yy",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyFilterMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyMessage:"No available options",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"Page {page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left",listLabel:"Option List"}},components:{FieldWrapper:{labelOptional:"(opsional)",labelRequired:"*"},InputText:{urlFormatInvalidText:"Format URL tidak valid",emailFormatInvalidText:"Format email tidak valid",defaultPlaceholder:"Tulis {label}",alreadyExistInvalidText:"{label} sudah ada",emptyInvalidText:"{label} harus diisi",exceedMaxLengthInvalidText:"Maks. {maxLength} karakter",includeSpecialCharsInvalidText:"Tidak boleh berisi spesial karakter"},DialogConfirm:{nonActionableCloseButtonLabel:"Tutup",actionableCloseButtonLabel:"Batal",defaultConfirmMessage:"Apa kamu yakin?",defaultConfirmLabel:"Yakin"},CustomColumn:{resetDefaultText:"Atur Ulang ke Default"},ButtonSearch:{searchPlaceholder:"Cari"},FilterContainer:{applyText:"Terapkan",clearFieldText:"Bersihkan Field"},MultiSelect:{filterPlaceholder:"Cari",loadingPlaceholder:"Memuat...",inputPlaceholder:"Pilih {lowercaseLabel}",emptySelectionErrorMessage:"{label} harus dipilih"},Dropdown:{filterPlaceholder:"Cari",loadingPlaceholder:"Memuat...",inputPlaceholder:"Pilih {lowercaseLabel}",emptySelectionErrorMessage:"{label} harus dipilih"},InputCurrency:{emptyInputErrorMessage:"{label} harus diisi"},TextArea:{defaultPlaceholder:"Tulis {label}",emptyInvalidText:"{label} harus diisi",exceedMaxLengthInvalidText:"Maks. {maxLength} karakter"},InputRangeNumber:{minPlaceholder:"Tulis",maxPlaceholder:"Tulis"},DialogForm:{cancelBtnLabel:"Batal",clearBtnLabel:"Bersihkan Field",stayCheckboxLabel:"Tetap di halaman ini",submitBtnLabel:"Simpan",asideRightCollapsedButtonLabel:"Lihat data yang ada >",asideRightExpandedButtonLabel:"Tutup <"},InputPhoneNumber:{defaultPlaceholder:"Masukkan nomor telepon"},InputNumber:{defaultPlaceholder:"Tulis {label}",alreadyExistInvalidText:"{label} sudah ada",emptyInvalidText:"{label} harus diisi"},Calendar:{defaultPlaceholder:"Pilih tanggal",emptyInvalidText:"Tanggal tidak boleh kosong",cancelFooterButtonLabel:"Batal",applyFooterButtonLabel:"Terapkan"},Menu:{noOptionLabel:"Tidak ada aksi"},ButtonBulkAction:{allRecordSelected:"All {naming} Selected",selectAllRecords:"Select All ({totalRecords} data)",currentSelectionMessage:"{length} {naming} Selected"},UserName:{detailUserAnchorText:"User Detail"},DataTable:{downloadingMessage:"Downloading...",falseText:"No",trueText:"Yes"},ButtonDownload:{downloadingMessage:"Downloading...",falseText:"No",trueText:"Yes"},ImageCompressor:{cropperCtrlScrollInfo:"Use Ctrl + Scroll to zoom the cropper",cropperTwoFingerInfo:"Use two fingers to move the cropper",cropDialogHeader:"Adjust Photo",imageTypeRequirement:"Must be image format",maxSizeRequirement:"Max. 1 MB",cancelCropLabel:"Cancel",applyCropLabel:"Apply",changeImageLabel:"Change Image"}}},defaultProps:{FieldWrapper:{showOptionalText:!0,showAsterisk:!1,tooltipPos:"top"},Tree:{type:"category",filter:""},InputText:{maxLength:30},InputURL:{maxLength:void 0},InputEmail:{maxLength:60},ButtonBulkAction:{selectMenuType:"overlay-panel",naming:"Data"},Animation:{libPath:"workspace"},TagType:{useNfc:!0}}},O1=Symbol("WangsVue"),Zt=t=>{const e=dt(O1);if(!e)throw new Error("WangsVue is not installed!");return t?e.getComponentConfig(t):e.config},_9=(t,e)=>lv(t,e),J9=(t=T1,e=!0)=>{const n=e?_9(T1,t):t;return{install:(i,r)=>{var a;const o={...n,...r,preset:r.preset??r.pt,locale:{...n.locale,...r==null?void 0:r.locale,components:{...n.locale.components,...((a=r==null?void 0:r.locale)==null?void 0:a.components)||{}}},defaultProps:{...n.defaultProps,...(r==null?void 0:r.defaultProps)||{}},useToastConfig:n.useToastConfig},s={config:o,getComponentConfig:l=>({defaultProps:o.defaultProps[l]||{},locale:{...o.locale.components[l]||{},global:o.locale.global}})};i.config.globalProperties.$wangsvue=s,i.config.globalProperties.$preset=s.config.preset,i.provide(O1,s),i.provide("preset",o.preset),i.provide("useToastConfig",o.useToastConfig),i.use(Z9,{unstyled:!0,pt:o.preset,locale:o.locale.global}),i.use(j9)}}};function zi(t,e){const n={...e};for(const i in t)n[i]=t[i]??e[i];return n}const x1=t=>{if(!t)return"-";if(t.length<=8)return t;const e=t.split(" ");if(e.length===1)return`${e[0].slice(0,8)}..`;const n=e.slice(0,-1).join(" "),i=n.length>8?`${n.slice(0,8)}..`:n,r=e[e.length-1];return`${i} ${r.slice(0,1)}`},ep=t=>{if(!t)return"";const e=["a","e","i","o","h"],n=["a","e","i","o","u"],i=t.toLowerCase(),r=i[0],o=e.includes(r);if(r==="h"){const a=["hour","honest","heir","honor"].some(l=>i.includes(l));return!n.includes(i.slice(2,3))&&!a?`a ${t}`:`an ${t}`}return o||r==="u"&&!e.includes(i.slice(2,3))?`an ${t}`:`a ${t}`};var Y9={root:function(e){var n=e.props,i=e.instance;return["p-badge p-component",{"p-badge-no-gutter":Ce.isNotEmpty(n.value)&&String(n.value).length===1,"p-badge-dot":Ce.isEmpty(n.value)&&!i.$slots.default,"p-badge-lg":n.size==="large","p-badge-xl":n.size==="xlarge","p-badge-info":n.severity==="info","p-badge-success":n.severity==="success","p-badge-warning":n.severity==="warning","p-badge-danger":n.severity==="danger","p-badge-secondary":n.severity==="secondary","p-badge-contrast":n.severity==="contrast"}]}},Q9=Wt.extend({name:"badge",classes:Y9});function qa(t){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qa(t)}function M1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function eT(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?M1(Object(n),!0).forEach(function(i){tT(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M1(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function tT(t,e,n){return e=nT(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nT(t){var e=iT(t,"string");return qa(e)=="symbol"?e:String(e)}function iT(t,e){if(qa(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(qa(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var tp=Wt.extend({name:"common",loadGlobalStyle:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ay(e,eT({name:"global"},n))}});function Xa(t){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xa(t)}function rT(t){return L1(t)||oT(t)||I1(t)||E1()}function oT(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function ju(t,e){return L1(t)||sT(t,e)||I1(t,e)||E1()}function E1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I1(t,e){if(t){if(typeof t=="string")return P1(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P1(t,e)}}function P1(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function sT(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}function L1(t){if(Array.isArray(t))return t}function D1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function gn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?D1(Object(n),!0).forEach(function(i){Uu(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):D1(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Uu(t,e,n){return e=aT(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function aT(t){var e=lT(t,"string");return Xa(e)=="symbol"?e:String(e)}function lT(t,e){if(Xa(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Xa(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var It={name:"BaseComponent",props:{pt:{type:Object,default:void 0},ptOptions:{type:Object,default:void 0},unstyled:{type:Boolean,default:void 0}},inject:{$parentInstance:{default:void 0}},watch:{isUnstyled:{immediate:!0,handler:function(e){if(!e){var n,i;tp.loadStyle({nonce:(n=this.$primevueConfig)===null||n===void 0||(n=n.csp)===null||n===void 0?void 0:n.nonce}),this.$options.style&&this.$style.loadStyle({nonce:(i=this.$primevueConfig)===null||i===void 0||(i=i.csp)===null||i===void 0?void 0:i.nonce})}}}},beforeCreate:function(){var e,n,i,r,o,s,a,l,u,c,d,f=(e=this.pt)===null||e===void 0?void 0:e._usept,p=f?(n=this.pt)===null||n===void 0||(n=n.originalValue)===null||n===void 0?void 0:n[this.$.type.name]:void 0,h=f?(i=this.pt)===null||i===void 0||(i=i.value)===null||i===void 0?void 0:i[this.$.type.name]:this.pt;(r=h||p)===null||r===void 0||(r=r.hooks)===null||r===void 0||(o=r.onBeforeCreate)===null||o===void 0||o.call(r);var m=(s=this.$primevueConfig)===null||s===void 0||(s=s.pt)===null||s===void 0?void 0:s._usept,v=m?(a=this.$primevue)===null||a===void 0||(a=a.config)===null||a===void 0||(a=a.pt)===null||a===void 0?void 0:a.originalValue:void 0,S=m?(l=this.$primevue)===null||l===void 0||(l=l.config)===null||l===void 0||(l=l.pt)===null||l===void 0?void 0:l.value:(u=this.$primevue)===null||u===void 0||(u=u.config)===null||u===void 0?void 0:u.pt;(c=S||v)===null||c===void 0||(c=c[this.$.type.name])===null||c===void 0||(c=c.hooks)===null||c===void 0||(d=c.onBeforeCreate)===null||d===void 0||d.call(c)},created:function(){this._hook("onCreated")},beforeMount:function(){var e;Wt.loadStyle({nonce:(e=this.$primevueConfig)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce}),this._loadGlobalStyles(),this._hook("onBeforeMount")},mounted:function(){this._hook("onMounted")},beforeUpdate:function(){this._hook("onBeforeUpdate")},updated:function(){this._hook("onUpdated")},beforeUnmount:function(){this._hook("onBeforeUnmount")},unmounted:function(){this._hook("onUnmounted")},methods:{_hook:function(e){if(!this.$options.hostName){var n=this._usePT(this._getPT(this.pt,this.$.type.name),this._getOptionValue,"hooks.".concat(e)),i=this._useDefaultPT(this._getOptionValue,"hooks.".concat(e));n==null||n(),i==null||i()}},_mergeProps:function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return Ce.isFunction(e)?e.apply(void 0,i):T.apply(void 0,i)},_loadGlobalStyles:function(){var e,n=this._useGlobalPT(this._getOptionValue,"global.css",this.$params);Ce.isNotEmpty(n)&&tp.loadGlobalStyle(n,{nonce:(e=this.$primevueConfig)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce})},_getHostInstance:function(e){return e?this.$options.hostName?e.$.type.name===this.$options.hostName?e:this._getHostInstance(e.$parentInstance):e.$parentInstance:void 0},_getPropValue:function(e){var n;return this[e]||((n=this._getHostInstance(this))===null||n===void 0?void 0:n[e])},_getOptionValue:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Ce.toFlatCase(n).split("."),o=r.shift();return o?Ce.isObject(e)?this._getOptionValue(Ce.getItemValue(e[Object.keys(e).find(function(s){return Ce.toFlatCase(s)===o})||""],i),r.join("."),i):void 0:Ce.getItemValue(e,i)},_getPTValue:function(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=/./g.test(i)&&!!r[i.split(".")[0]],a=this._getPropValue("ptOptions")||((e=this.$primevueConfig)===null||e===void 0?void 0:e.ptOptions)||{},l=a.mergeSections,u=l===void 0?!0:l,c=a.mergeProps,d=c===void 0?!1:c,f=o?s?this._useGlobalPT(this._getPTClassValue,i,r):this._useDefaultPT(this._getPTClassValue,i,r):void 0,p=s?void 0:this._getPTSelf(n,this._getPTClassValue,i,gn(gn({},r),{},{global:f||{}})),h=this._getPTDatasets(i);return u||!u&&p?d?this._mergeProps(d,f,p,h):gn(gn(gn({},f),p),h):gn(gn({},p),h)},_getPTSelf:function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return T(this._usePT.apply(this,[this._getPT(e,this.$name)].concat(i)),this._usePT.apply(this,[this.$_attrsPT].concat(i)))},_getPTDatasets:function(){var e,n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r="data-pc-",o=i==="root"&&Ce.isNotEmpty((e=this.pt)===null||e===void 0?void 0:e["data-pc-section"]);return i!=="transition"&&gn(gn({},i==="root"&&gn(Uu({},"".concat(r,"name"),Ce.toFlatCase(o?(n=this.pt)===null||n===void 0?void 0:n["data-pc-section"]:this.$.type.name)),o&&Uu({},"".concat(r,"extend"),Ce.toFlatCase(this.$.type.name)))),{},Uu({},"".concat(r,"section"),Ce.toFlatCase(i)))},_getPTClassValue:function(){var e=this._getOptionValue.apply(this,arguments);return Ce.isString(e)||Ce.isArray(e)?{class:e}:e},_getPT:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,o=function(a){var l,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=r?r(a):a,d=Ce.toFlatCase(i),f=Ce.toFlatCase(n.$name);return(l=u?d!==f?c==null?void 0:c[d]:void 0:c==null?void 0:c[d])!==null&&l!==void 0?l:c};return e!=null&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:o(e.originalValue),value:o(e.value)}:o(e,!0)},_usePT:function(e,n,i,r){var o=function(m){return n(m,i,r)};if(e!=null&&e.hasOwnProperty("_usept")){var s,a=e._usept||((s=this.$primevueConfig)===null||s===void 0?void 0:s.ptOptions)||{},l=a.mergeSections,u=l===void 0?!0:l,c=a.mergeProps,d=c===void 0?!1:c,f=o(e.originalValue),p=o(e.value);return f===void 0&&p===void 0?void 0:Ce.isString(p)?p:Ce.isString(f)?f:u||!u&&p?d?this._mergeProps(d,f,p):gn(gn({},f),p):p}return o(e)},_useGlobalPT:function(e,n,i){return this._usePT(this.globalPT,e,n,i)},_useDefaultPT:function(e,n,i){return this._usePT(this.defaultPT,e,n,i)},ptm:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._getPTValue(this.pt,e,gn(gn({},this.$params),n))},ptmi:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return T(this.$_attrsNoPT,this.ptm(e,n))},ptmo:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._getPTValue(e,n,gn({instance:this},i),!1)},cx:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.isUnstyled?void 0:this._getOptionValue(this.$style.classes,e,gn(gn({},this.$params),n))},sx:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(n){var r=this._getOptionValue(this.$style.inlineStyles,e,gn(gn({},this.$params),i)),o=this._getOptionValue(tp.inlineStyles,e,gn(gn({},this.$params),i));return[o,r]}}},computed:{globalPT:function(){var e,n=this;return this._getPT((e=this.$primevueConfig)===null||e===void 0?void 0:e.pt,void 0,function(i){return Ce.getItemValue(i,{instance:n})})},defaultPT:function(){var e,n=this;return this._getPT((e=this.$primevueConfig)===null||e===void 0?void 0:e.pt,void 0,function(i){return n._getOptionValue(i,n.$name,gn({},n.$params))||Ce.getItemValue(i,gn({},n.$params))})},isUnstyled:function(){var e;return this.unstyled!==void 0?this.unstyled:(e=this.$primevueConfig)===null||e===void 0?void 0:e.unstyled},$params:function(){var e=this._getHostInstance(this)||this.$parent;return{instance:this,props:this.$props,state:this.$data,attrs:this.$attrs,parent:{instance:e,props:e==null?void 0:e.$props,state:e==null?void 0:e.$data,attrs:e==null?void 0:e.$attrs},parentInstance:e}},$style:function(){return gn(gn({classes:void 0,inlineStyles:void 0,loadStyle:function(){},loadCustomStyle:function(){}},(this._getHostInstance(this)||{}).$style),this.$options.style)},$primevueConfig:function(){var e;return(e=this.$primevue)===null||e===void 0?void 0:e.config},$name:function(){return this.$options.hostName||this.$.type.name},$_attrsPT:function(){return Object.entries(this.$attrs||{}).filter(function(e){var n=ju(e,1),i=n[0];return i==null?void 0:i.startsWith("pt:")}).reduce(function(e,n){var i=ju(n,2),r=i[0],o=i[1],s=r.split(":"),a=rT(s),l=a.slice(1);return l==null||l.reduce(function(u,c,d,f){return!u[c]&&(u[c]=d===f.length-1?o:{}),u[c]},e),e},{})},$_attrsNoPT:function(){return Object.entries(this.$attrs||{}).filter(function(e){var n=ju(e,1),i=n[0];return!(i!=null&&i.startsWith("pt:"))}).reduce(function(e,n){var i=ju(n,2),r=i[0],o=i[1];return e[r]=o,e},{})}}},uT={name:"BaseBadge",extends:It,props:{value:{type:[String,Number],default:null},severity:{type:String,default:null},size:{type:String,default:null}},style:Q9,provide:function(){return{$parentInstance:this}}},np={name:"Badge",extends:uT,inheritAttrs:!1};function cT(t,e,n,i,r,o){return g(),O("span",T({class:t.cx("root")},t.ptmi("root")),[Q(t.$slots,"default",{},function(){return[ht(_(t.value),1)]})],16)}np.render=cT;var dT=`
|
|
67
|
+
.p-icon {
|
|
68
|
+
display: inline-block;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.p-icon-spin {
|
|
72
|
+
-webkit-animation: p-icon-spin 2s infinite linear;
|
|
73
|
+
animation: p-icon-spin 2s infinite linear;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@-webkit-keyframes p-icon-spin {
|
|
77
|
+
0% {
|
|
78
|
+
-webkit-transform: rotate(0deg);
|
|
79
|
+
transform: rotate(0deg);
|
|
80
|
+
}
|
|
81
|
+
100% {
|
|
82
|
+
-webkit-transform: rotate(359deg);
|
|
83
|
+
transform: rotate(359deg);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@keyframes p-icon-spin {
|
|
88
|
+
0% {
|
|
89
|
+
-webkit-transform: rotate(0deg);
|
|
90
|
+
transform: rotate(0deg);
|
|
91
|
+
}
|
|
92
|
+
100% {
|
|
93
|
+
-webkit-transform: rotate(359deg);
|
|
94
|
+
transform: rotate(359deg);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`,fT=Wt.extend({name:"baseicon",css:dT});function Ga(t){"@babel/helpers - typeof";return Ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ga(t)}function R1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function B1(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?R1(Object(n),!0).forEach(function(i){pT(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):R1(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function pT(t,e,n){return e=hT(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hT(t){var e=mT(t,"string");return Ga(e)=="symbol"?e:String(e)}function mT(t,e){if(Ga(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Ga(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var vn={name:"BaseIcon",extends:It,props:{label:{type:String,default:void 0},spin:{type:Boolean,default:!1}},style:fT,methods:{pti:function(){var e=Ce.isEmpty(this.label);return B1(B1({},!this.isUnstyled&&{class:["p-icon",{"p-icon-spin":this.spin}]}),{},{role:e?void 0:"img","aria-label":e?void 0:this.label,"aria-hidden":e})}}},Za={name:"SpinnerIcon",extends:vn},gT=E("path",{d:"M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z",fill:"currentColor"},null,-1),vT=[gT];function yT(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),vT,16)}Za.render=yT;var bT={root:"p-ink"},AT=Wt.extend({name:"ripple",classes:bT}),wT=Ft.extend({style:AT});function ST(t){return OT(t)||TT(t)||kT(t)||CT()}function CT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
98
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kT(t,e){if(t){if(typeof t=="string")return ip(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ip(t,e)}}function TT(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function OT(t){if(Array.isArray(t))return ip(t)}function ip(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var fi=wT.extend("ripple",{mounted:function(e){var n,i=e==null||(n=e.$instance)===null||n===void 0?void 0:n.$primevueConfig;i&&i.ripple&&(this.create(e),this.bindEvents(e),e.setAttribute("data-pd-ripple",!0))},unmounted:function(e){this.remove(e)},timeout:void 0,methods:{bindEvents:function(e){e.addEventListener("mousedown",this.onMouseDown.bind(this))},unbindEvents:function(e){e.removeEventListener("mousedown",this.onMouseDown.bind(this))},create:function(e){var n=G.createElement("span",{role:"presentation","aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx("root"),onAnimationEnd:this.onAnimationEnd.bind(this),"p-bind":this.ptm("root")});e.appendChild(n),this.$el=n},remove:function(e){var n=this.getInk(e);n&&(this.unbindEvents(e),n.removeEventListener("animationend",this.onAnimationEnd),n.remove())},onMouseDown:function(e){var n=this,i=e.currentTarget,r=this.getInk(i);if(!(!r||getComputedStyle(r,null).display==="none")){if(!this.isUnstyled()&&G.removeClass(r,"p-ink-active"),r.setAttribute("data-p-ink-active","false"),!G.getHeight(r)&&!G.getWidth(r)){var o=Math.max(G.getOuterWidth(i),G.getOuterHeight(i));r.style.height=o+"px",r.style.width=o+"px"}var s=G.getOffset(i),a=e.pageX-s.left+document.body.scrollTop-G.getWidth(r)/2,l=e.pageY-s.top+document.body.scrollLeft-G.getHeight(r)/2;r.style.top=l+"px",r.style.left=a+"px",!this.isUnstyled()&&G.addClass(r,"p-ink-active"),r.setAttribute("data-p-ink-active","true"),this.timeout=setTimeout(function(){r&&(!n.isUnstyled()&&G.removeClass(r,"p-ink-active"),r.setAttribute("data-p-ink-active","false"))},401)}},onAnimationEnd:function(e){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&G.removeClass(e.currentTarget,"p-ink-active"),e.currentTarget.setAttribute("data-p-ink-active","false")},getInk:function(e){return e&&e.children?ST(e.children).find(function(n){return G.getAttribute(n,"data-pc-name")==="ripple"}):void 0}}});function _a(t){"@babel/helpers - typeof";return _a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_a(t)}function ao(t,e,n){return e=xT(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xT(t){var e=MT(t,"string");return _a(e)=="symbol"?e:String(e)}function MT(t,e){if(_a(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(_a(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ET={root:function(e){var n=e.instance,i=e.props;return["p-button p-component",ao(ao(ao(ao(ao(ao(ao(ao({"p-button-icon-only":n.hasIcon&&!i.label&&!i.badge,"p-button-vertical":(i.iconPos==="top"||i.iconPos==="bottom")&&i.label,"p-disabled":n.$attrs.disabled||n.$attrs.disabled===""||i.loading,"p-button-loading":i.loading,"p-button-loading-label-only":i.loading&&!n.hasIcon&&i.label,"p-button-link":i.link},"p-button-".concat(i.severity),i.severity),"p-button-raised",i.raised),"p-button-rounded",i.rounded),"p-button-text",i.text),"p-button-outlined",i.outlined),"p-button-sm",i.size==="small"),"p-button-lg",i.size==="large"),"p-button-plain",i.plain)]},loadingIcon:"p-button-loading-icon pi-spin",icon:function(e){var n=e.props;return["p-button-icon",{"p-button-icon-left":n.iconPos==="left"&&n.label,"p-button-icon-right":n.iconPos==="right"&&n.label,"p-button-icon-top":n.iconPos==="top"&&n.label,"p-button-icon-bottom":n.iconPos==="bottom"&&n.label}]},label:"p-button-label"},IT=Wt.extend({name:"button",classes:ET}),PT={name:"BaseButton",extends:It,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:"left"},iconClass:{type:String,default:null},badge:{type:String,default:null},badgeClass:{type:String,default:null},badgeSeverity:{type:String,default:null},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},style:IT,provide:function(){return{$parentInstance:this}}},lo={name:"Button",extends:PT,inheritAttrs:!1,methods:{getPTOptions:function(e){var n=e==="root"?this.ptmi:this.ptm;return n(e,{context:{disabled:this.disabled}})}},computed:{disabled:function(){return this.$attrs.disabled||this.$attrs.disabled===""||this.loading},defaultAriaLabel:function(){return this.label?this.label+(this.badge?" "+this.badge:""):this.$attrs.ariaLabel},hasIcon:function(){return this.icon||this.$slots.icon}},components:{SpinnerIcon:Za,Badge:np},directives:{ripple:fi}},LT=["aria-label","disabled","data-p-severity"];function DT(t,e,n,i,r,o){var s=et("SpinnerIcon"),a=et("Badge"),l=on("ripple");return ft((g(),O("button",T({class:t.cx("root"),type:"button","aria-label":o.defaultAriaLabel,disabled:o.disabled},o.getPTOptions("root"),{"data-p-severity":t.severity}),[Q(t.$slots,"default",{},function(){return[t.loading?Q(t.$slots,"loadingicon",{key:0,class:pe([t.cx("loadingIcon"),t.cx("icon")])},function(){return[t.loadingIcon?(g(),O("span",T({key:0,class:[t.cx("loadingIcon"),t.cx("icon"),t.loadingIcon]},t.ptm("loadingIcon")),null,16)):(g(),P(s,T({key:1,class:[t.cx("loadingIcon"),t.cx("icon")],spin:""},t.ptm("loadingIcon")),null,16,["class"]))]}):Q(t.$slots,"icon",{key:1,class:pe([t.cx("icon")])},function(){return[t.icon?(g(),O("span",T({key:0,class:[t.cx("icon"),t.icon,t.iconClass]},t.ptm("icon")),null,16)):B("",!0)]}),E("span",T({class:t.cx("label")},t.ptm("label")),_(t.label||" "),17),t.badge?(g(),P(a,T({key:2,value:t.badge,class:t.badgeClass,severity:t.badgeSeverity,unstyled:t.unstyled},t.ptm("badge")),null,16,["value","class","severity","unstyled"])):B("",!0)]})],16,LT)),[[l]])}lo.render=DT;const N1=t=>t?Array.isArray(t)?t:[t]:[],Ee=ce("Icon",Ae({__name:"Icon",props:{icon:{},severity:{default:void 0},info:{default:void 0},tooltipPos:{default:"bottom"},class:{default:void 0}},setup(t){const e=t,n=(()=>{switch(e.severity){case"primary":return"text-primary-500";case"success":return"text-success-500";case"warning":return"text-warning-500";case"danger":return"text-danger-500";case"info":return"text-info-500";default:return"inherit"}})(),i=X(()=>["icon",`ic-${e.icon}`,n,"cursor-pointer !shrink-0"]);return(r,o)=>{const s=on("tooltip");return g(),O(ue,null,[r.tooltipPos==="top"?ft((g(),O("i",T({key:0},r.$attrs,{class:[...i.value,r.$props.class]}),null,16)),[[s,r.info,void 0,{top:!0}]]):B("",!0),r.tooltipPos==="bottom"?ft((g(),O("i",T({key:1},r.$attrs,{class:[...i.value,r.$props.class]}),null,16)),[[s,r.info,void 0,{bottom:!0}]]):B("",!0),r.tooltipPos==="right"?ft((g(),O("i",T({key:2},r.$attrs,{class:[...i.value,r.$props.class]}),null,16)),[[s,r.info,void 0,{right:!0}]]):B("",!0),r.tooltipPos==="left"?ft((g(),O("i",T({key:3},r.$attrs,{class:[...i.value,r.$props.class]}),null,16)),[[s,r.info,void 0,{left:!0}]]):B("",!0)],64)}}})),We=ce("Button",Ae({__name:"Button",props:{style:{},class:{},label:{},icon:{},iconPos:{},iconClass:{},tooltip:{},tooltipPos:{},badge:{},badgeClass:{},badgeSeverity:{},loading:{type:Boolean},loadingIcon:{},link:{type:Boolean},severity:{},raised:{type:Boolean},rounded:{type:Boolean},text:{type:Boolean},outlined:{type:Boolean},size:{},plain:{type:Boolean}},setup(t){const e=t,n=dt("preset",{}).button,i=X(()=>({icon:e.icon??"check",class:[...(n==null?void 0:n.icon({props:e}).class)??{},{"text-base":e.icon&&!e.label},...N1(e.iconClass)]}));return(r,o)=>{const s=on("tooltip");return r.tooltipPos==="top"?ft((g(),P(x(lo),T({key:0},e,{icon:r.icon,"icon-pos":r.iconPos}),{icon:H(({class:a})=>[r.icon?(g(),P(Ee,T({key:0},i.value,{class:a}),null,16,["class"])):B("",!0)]),default:H(()=>[Q(r.$slots,"default")]),_:3},16,["icon","icon-pos"])),[[s,r.tooltip,void 0,{top:!0}]]):r.tooltipPos==="left"?ft((g(),P(x(lo),T({key:1},e,{icon:r.icon,"icon-pos":r.iconPos}),{icon:H(()=>[r.icon?(g(),P(Ee,it(T({key:0},i.value)),null,16)):B("",!0)]),default:H(()=>[Q(r.$slots,"default")]),_:3},16,["icon","icon-pos"])),[[s,r.tooltip,void 0,{left:!0}]]):r.tooltipPos==="right"?ft((g(),P(x(lo),T({key:2},e,{icon:r.icon,"icon-pos":r.iconPos}),{icon:H(()=>[r.icon?(g(),P(Ee,it(T({key:0},i.value)),null,16)):B("",!0)]),default:H(()=>[Q(r.$slots,"default")]),_:3},16,["icon","icon-pos"])),[[s,r.tooltip,void 0,{right:!0}]]):ft((g(),P(x(lo),T({key:3},e,{icon:r.icon,"icon-pos":r.iconPos}),{icon:H(()=>[r.icon?(g(),P(Ee,it(T({key:0},i.value)),null,16)):B("",!0)]),default:H(()=>[Q(r.$slots,"default")]),_:3},16,["icon","icon-pos"])),[[s,r.tooltip,void 0,{bottom:!0}]])}}})),RT=["contenteditable"],BT={key:1,"aria-label":"invalid-label"},Pt=ce("Badge",Ae({__name:"Badge",props:{label:{},editable:{type:Boolean},severity:{},format:{},removable:{type:Boolean},disabled:{type:Boolean},tooltip:{},getSeverity:{type:Function}},emits:["remove","update:label"],setup(t,{emit:e}){const n=t,i=e,{defaultProps:r}=Zt("Badge"),o=X(()=>zi(n,r)),s=X(()=>{const f=typeof n.label;return f==="number"||f==="string"&&n.label&&n.label!=="-"}),a=X(()=>{var f,p;return n.severity||((p=(f=o.value).getSeverity)==null?void 0:p.call(f,n.label))}),l=X(()=>{if(!s.value)return"-";switch(n.format){case"nowrap":return n.label;case"username":return x1(n.label);default:if(n.label.length>12){const f=n.label.slice(0,5),p=n.label.slice(-5);return`${f}..${p}`}return n.label}}),u=X(()=>n.tooltip||(n.format!=="nowrap"&&n.label.length>12||n.format==="username"&&n.label.length>8?n.label:void 0)),c=f=>{const p=f.target;(f.code==="Enter"||f.code==="Tab")&&(f.preventDefault(),p.blur())},d=(f,p)=>{const h=f.textContent;if(h!==n.label){const m=(h==null?void 0:h.trim())??null;f.textContent=m,i("update:label",m),p&&!h&&(p.remove(),i("remove"))}};return(f,p)=>{var m,v,S;const h=on("tooltip");return s.value?ft((g(),O("span",T({key:0,ref:"badge"},(m=f.$preset.badge)==null?void 0:m.root({props:{severity:a.value,disabled:f.disabled}})),[E("span",T({ref:"input"},(v=f.$preset.badge)==null?void 0:v.input({props:n,context:{badgeTooltip:u.value}}),{contenteditable:f.editable,onBlur:p[0]||(p[0]=b=>d(f.$refs.input,f.$refs.badge)),onKeydown:c,spellcheck:"false"}),_(l.value),17,RT),n.removable?(g(),P(We,T({key:0},(S=f.$preset.badge)==null?void 0:S.removebutton({props:{badgeSeverity:a.value,disabled:f.disabled}}),{disabled:n.disabled,severity:a.value,onClick:p[1]||(p[1]=b=>i("remove")),icon:"close",rounded:"",text:""}),null,16,["disabled","severity"])):B("",!0)],16)),[[h,{value:u.value,autoHide:!1},void 0,{top:!0}]]):(g(),O("span",BT,"-"))}}}));var NT={},$T=Ft.extend({style:NT});function Ja(t){"@babel/helpers - typeof";return Ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ja(t)}function $1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function V1(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$1(Object(n),!0).forEach(function(i){VT(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$1(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function VT(t,e,n){return e=zT(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zT(t){var e=FT(t,"string");return Ja(e)=="symbol"?e:String(e)}function FT(t,e){if(Ja(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Ja(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var rp=$T.extend("focustrap",{mounted:function(e,n){var i=n.value||{},r=i.disabled;r||(this.createHiddenFocusableElements(e,n),this.bind(e,n),this.autoElementFocus(e,n)),e.setAttribute("data-pd-focustrap",!0),this.$el=e},updated:function(e,n){var i=n.value||{},r=i.disabled;r&&this.unbind(e)},unmounted:function(e){this.unbind(e)},methods:{getComputedSelector:function(e){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(e??"")},bind:function(e,n){var i=this,r=n.value||{},o=r.onFocusIn,s=r.onFocusOut;e.$_pfocustrap_mutationobserver=new MutationObserver(function(a){a.forEach(function(l){if(l.type==="childList"&&!e.contains(document.activeElement)){var u=function c(d){var f=G.isFocusableElement(d)?G.isFocusableElement(d,i.getComputedSelector(e.$_pfocustrap_focusableselector))?d:G.getFirstFocusableElement(e,i.getComputedSelector(e.$_pfocustrap_focusableselector)):G.getFirstFocusableElement(d);return Ce.isNotEmpty(f)?f:d.nextSibling&&c(d.nextSibling)};G.focus(u(l.nextSibling))}})}),e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_mutationobserver.observe(e,{childList:!0}),e.$_pfocustrap_focusinlistener=function(a){return o&&o(a)},e.$_pfocustrap_focusoutlistener=function(a){return s&&s(a)},e.addEventListener("focusin",e.$_pfocustrap_focusinlistener),e.addEventListener("focusout",e.$_pfocustrap_focusoutlistener)},unbind:function(e){e.$_pfocustrap_mutationobserver&&e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_focusinlistener&&e.removeEventListener("focusin",e.$_pfocustrap_focusinlistener)&&(e.$_pfocustrap_focusinlistener=null),e.$_pfocustrap_focusoutlistener&&e.removeEventListener("focusout",e.$_pfocustrap_focusoutlistener)&&(e.$_pfocustrap_focusoutlistener=null)},autoFocus:function(e){this.autoElementFocus(this.$el,{value:V1(V1({},e),{},{autoFocus:!0})})},autoElementFocus:function(e,n){var i=n.value||{},r=i.autoFocusSelector,o=r===void 0?"":r,s=i.firstFocusableSelector,a=s===void 0?"":s,l=i.autoFocus,u=l===void 0?!1:l,c=G.getFirstFocusableElement(e,"[autofocus]".concat(this.getComputedSelector(o)));u&&!c&&(c=G.getFirstFocusableElement(e,this.getComputedSelector(a))),G.focus(c)},onFirstHiddenElementFocus:function(e){var n,i=e.currentTarget,r=e.relatedTarget,o=r===i.$_pfocustrap_lasthiddenfocusableelement||!((n=this.$el)!==null&&n!==void 0&&n.contains(r))?G.getFirstFocusableElement(i.parentElement,this.getComputedSelector(i.$_pfocustrap_focusableselector)):i.$_pfocustrap_lasthiddenfocusableelement;G.focus(o)},onLastHiddenElementFocus:function(e){var n,i=e.currentTarget,r=e.relatedTarget,o=r===i.$_pfocustrap_firsthiddenfocusableelement||!((n=this.$el)!==null&&n!==void 0&&n.contains(r))?G.getLastFocusableElement(i.parentElement,this.getComputedSelector(i.$_pfocustrap_focusableselector)):i.$_pfocustrap_firsthiddenfocusableelement;G.focus(o)},createHiddenFocusableElements:function(e,n){var i=this,r=n.value||{},o=r.tabIndex,s=o===void 0?0:o,a=r.firstFocusableSelector,l=a===void 0?"":a,u=r.lastFocusableSelector,c=u===void 0?"":u,d=function(m){return G.createElement("span",{class:"p-hidden-accessible p-hidden-focusable",tabIndex:s,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:m==null?void 0:m.bind(i)})},f=d(this.onFirstHiddenElementFocus),p=d(this.onLastHiddenElementFocus);f.$_pfocustrap_lasthiddenfocusableelement=p,f.$_pfocustrap_focusableselector=l,f.setAttribute("data-pc-section","firstfocusableelement"),p.$_pfocustrap_firsthiddenfocusableelement=f,p.$_pfocustrap_focusableselector=c,p.setAttribute("data-pc-section","lastfocusableelement"),e.prepend(f),e.append(p)}}}),fr={name:"TimesIcon",extends:vn},HT=E("path",{d:"M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z",fill:"currentColor"},null,-1),jT=[HT];function UT(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),jT,16)}fr.render=UT;var z1={name:"WindowMaximizeIcon",extends:vn},KT=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z",fill:"currentColor"},null,-1),WT=[KT];function qT(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),WT,16)}z1.render=qT;var F1={name:"WindowMinimizeIcon",extends:vn},XT=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z",fill:"currentColor"},null,-1),GT=[XT];function ZT(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),GT,16)}F1.render=ZT;var $r={name:"Portal",props:{appendTo:{type:[String,Object],default:"body"},disabled:{type:Boolean,default:!1}},data:function(){return{mounted:!1}},mounted:function(){this.mounted=G.isClient()},computed:{inline:function(){return this.disabled||this.appendTo==="self"}}};function _T(t,e,n,i,r,o){return o.inline?Q(t.$slots,"default",{key:0}):r.mounted?(g(),P(yu,{key:1,to:n.appendTo},[Q(t.$slots,"default")],8,["to"])):B("",!0)}$r.render=_T;var JT={mask:function(e){var n=e.position,i=e.modal;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:n==="left"||n==="topleft"||n==="bottomleft"?"flex-start":n==="right"||n==="topright"||n==="bottomright"?"flex-end":"center",alignItems:n==="top"||n==="topleft"||n==="topright"?"flex-start":n==="bottom"||n==="bottomleft"||n==="bottomright"?"flex-end":"center",pointerEvents:i?"auto":"none"}},root:{display:"flex",flexDirection:"column",pointerEvents:"auto"}},YT={mask:function(e){var n=e.props,i=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"],r=i.find(function(o){return o===n.position});return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":n.modal},r?"p-dialog-".concat(r):""]},root:function(e){var n=e.props,i=e.instance;return["p-dialog p-component",{"p-dialog-rtl":n.rtl,"p-dialog-maximized":n.maximizable&&i.maximized,"p-ripple-disabled":i.$primevue.config.ripple===!1}]},header:"p-dialog-header",title:"p-dialog-title",icons:"p-dialog-header-icons",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",maximizableIcon:"p-dialog-header-maximize-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",closeButtonIcon:"p-dialog-header-close-icon",content:"p-dialog-content",footer:"p-dialog-footer"},QT=Wt.extend({name:"dialog",classes:YT,inlineStyles:JT}),eO={name:"BaseDialog",extends:It,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:[String,Object],default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:QT,provide:function(){return{$parentInstance:this}}},Ya={name:"Dialog",extends:eO,inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var e=this;return{dialogRef:X(function(){return e._instance})}},data:function(){return{id:this.$attrs.id,containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null,target:null}},watch:{"$attrs.id":function(e){this.id=e||Vn()}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&dn.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.id=this.id||Vn(),this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(e){e.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.target=document.activeElement,this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&dn.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.focus()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&G.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),G.focus(this.target),this.target=null,this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&dn.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus:function(){var e=function(r){return r&&r.querySelector("[autofocus]")},n=this.$slots.footer&&e(this.footerContainer);n||(n=this.$slots.header&&e(this.headerContainer),n||(n=this.$slots.default&&e(this.content),n||(this.maximizable?(this.focusableMax=!0,n=this.maximizableButton):(this.focusableClose=!0,n=this.closeButton)))),n&&G.focus(n,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?G.blockBodyScroll():G.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&G.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&G.unblockBodyScroll()},onKeyDown:function(e){e.code==="Escape"&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e},closeButtonRef:function(e){this.closeButton=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",G.setAttribute(this.styleElement,"nonce",(e=this.$primevue)===null||e===void 0||(e=e.config)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce),document.head.appendChild(this.styleElement);var n="";for(var i in this.breakpoints)n+=`
|
|
99
|
+
@media screen and (max-width: `.concat(i,`) {
|
|
100
|
+
.p-dialog[`).concat(this.attributeSelector,`] {
|
|
101
|
+
width: `).concat(this.breakpoints[i],` !important;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
`);this.styleElement.innerHTML=n}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(e){e.target.closest("div").getAttribute("data-pc-section")!=="icons"&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",document.body.setAttribute("data-p-unselectable-text","true"),!this.isUnstyled&&G.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(n){if(e.dragging){var i=G.getOuterWidth(e.container),r=G.getOuterHeight(e.container),o=n.pageX-e.lastPageX,s=n.pageY-e.lastPageY,a=e.container.getBoundingClientRect(),l=a.left+o,u=a.top+s,c=G.getViewport(),d=getComputedStyle(e.container),f=parseFloat(d.marginLeft),p=parseFloat(d.marginTop);e.container.style.position="fixed",e.keepInViewport?(l>=e.minX&&l+i<c.width&&(e.lastPageX=n.pageX,e.container.style.left=l-f+"px"),u>=e.minY&&u+r<c.height&&(e.lastPageY=n.pageY,e.container.style.top=u-p+"px")):(e.lastPageX=n.pageX,e.container.style.left=l-f+"px",e.lastPageY=n.pageY,e.container.style.top=u-p+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(n){e.dragging&&(e.dragging=!1,document.body.removeAttribute("data-p-unselectable-text"),!e.isUnstyled&&G.removeClass(document.body,"p-unselectable-text"),e.$emit("dragend",n))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaLabelledById:function(){return this.header!=null||this.$attrs["aria-labelledby"]!==null?this.id+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:function(){return Vn()}},directives:{ripple:fi,focustrap:rp},components:{Portal:$r,WindowMinimizeIcon:F1,WindowMaximizeIcon:z1,TimesIcon:fr}};function Qa(t){"@babel/helpers - typeof";return Qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qa(t)}function H1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Ku(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?H1(Object(n),!0).forEach(function(i){tO(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):H1(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function tO(t,e,n){return e=nO(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nO(t){var e=iO(t,"string");return Qa(e)=="symbol"?e:String(e)}function iO(t,e){if(Qa(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Qa(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var rO=["aria-labelledby","aria-modal"],oO=["id"],sO=["autofocus","tabindex"],aO=["autofocus","aria-label"];function lO(t,e,n,i,r,o){var s=et("Portal"),a=on("ripple"),l=on("focustrap");return g(),P(s,{appendTo:t.appendTo},{default:H(function(){return[r.containerVisible?(g(),O("div",T({key:0,ref:o.maskRef,class:t.cx("mask"),style:t.sx("mask",!0,{position:t.position,modal:t.modal}),onClick:e[3]||(e[3]=function(){return o.onMaskClick&&o.onMaskClick.apply(o,arguments)})},t.ptm("mask")),[L(Lr,T({name:"p-dialog",onBeforeEnter:o.onBeforeEnter,onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:""},t.ptm("transition")),{default:H(function(){return[t.visible?ft((g(),O("div",T({key:0,ref:o.containerRef,class:t.cx("root"),style:t.sx("root"),role:"dialog","aria-labelledby":o.ariaLabelledById,"aria-modal":t.modal},t.ptmi("root")),[t.$slots.container?Q(t.$slots,"container",{key:0,onClose:o.close,onMaximize:function(c){return o.maximize(c)},closeCallback:o.close,maximizeCallback:function(c){return o.maximize(c)}}):(g(),O(ue,{key:1},[t.showHeader?(g(),O("div",T({key:0,ref:o.headerContainerRef,class:t.cx("header"),onMousedown:e[2]||(e[2]=function(){return o.initDrag&&o.initDrag.apply(o,arguments)})},t.ptm("header")),[Q(t.$slots,"header",{class:pe(t.cx("title"))},function(){return[t.header?(g(),O("span",T({key:0,id:o.ariaLabelledById,class:t.cx("title")},t.ptm("title")),_(t.header),17,oO)):B("",!0)]}),E("div",T({class:t.cx("icons")},t.ptm("icons")),[t.maximizable?ft((g(),O("button",T({key:0,ref:o.maximizableRef,autofocus:r.focusableMax,class:t.cx("maximizableButton"),onClick:e[0]||(e[0]=function(){return o.maximize&&o.maximize.apply(o,arguments)}),type:"button",tabindex:t.maximizable?"0":"-1"},t.ptm("maximizableButton"),{"data-pc-group-section":"headericon"}),[Q(t.$slots,"maximizeicon",{maximized:r.maximized,class:pe(t.cx("maximizableIcon"))},function(){return[(g(),P(yt(o.maximizeIconComponent),T({class:[t.cx("maximizableIcon"),r.maximized?t.minimizeIcon:t.maximizeIcon]},t.ptm("maximizableIcon")),null,16,["class"]))]})],16,sO)),[[a]]):B("",!0),t.closable?ft((g(),O("button",T({key:1,ref:o.closeButtonRef,autofocus:r.focusableClose,class:t.cx("closeButton"),onClick:e[1]||(e[1]=function(){return o.close&&o.close.apply(o,arguments)}),"aria-label":o.closeAriaLabel,type:"button"},Ku(Ku({},t.closeButtonProps),t.ptm("closeButton")),{"data-pc-group-section":"headericon"}),[Q(t.$slots,"closeicon",{class:pe(t.cx("closeButtonIcon"))},function(){return[(g(),P(yt(t.closeIcon?"span":"TimesIcon"),T({class:[t.cx("closeButtonIcon"),t.closeIcon]},t.ptm("closeButtonIcon")),null,16,["class"]))]})],16,aO)),[[a]]):B("",!0)],16)],16)):B("",!0),E("div",T({ref:o.contentRef,class:[t.cx("content"),t.contentClass],style:t.contentStyle},Ku(Ku({},t.contentProps),t.ptm("content"))),[Q(t.$slots,"default")],16),t.footer||t.$slots.footer?(g(),O("div",T({key:1,ref:o.footerContainerRef,class:t.cx("footer")},t.ptm("footer")),[Q(t.$slots,"footer",{},function(){return[ht(_(t.footer),1)]})],16)):B("",!0)],64))],16,rO)),[[l,{disabled:!t.modal}]]):B("",!0)]}),_:3},16,["onBeforeEnter","onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):B("",!0)]}),_:3},8,["appendTo"])}Ya.render=lO;const rr=ce("Dialog",Ae({__name:"Dialog",props:{header:{default:void 0},footer:{default:void 0},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},contentStyle:{default:void 0},contentProps:{default:void 0},rtl:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},dismissableMask:{type:Boolean,default:!1},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{default:0},autoZIndex:{type:Boolean,default:!0},position:{default:"center"},maximizable:{type:Boolean,default:!1},breakpoints:{default:void 0},draggable:{type:Boolean,default:!1},keepInViewPort:{type:Boolean,default:!0},minX:{default:0},minY:{default:0},appendTo:{default:"body"},style:{default:void 0},closeIcon:{default:void 0},maximizeIcon:{default:void 0},minimizeIcon:{default:void 0},pt:{default:void 0},ptOptions:{default:void 0},unstyled:{type:Boolean,default:!1},class:{default:""},headerClass:{default:void 0},contentClass:{default:void 0},footerClass:{}},emits:["update:visible","hide","afterHide","show","maximize","unmaximize","dragend"],setup(t){const e=dt("preset",{}).dialog;return(n,i)=>{var r,o,s,a;return g(),P(x(Ya),T(n.$props,{pt:{root:{class:[...(r=x(e))==null?void 0:r.root({state:{}}).class,...Array.isArray(n.$props.class)?n.$props.class:[n.$props.class]]},header:{class:[...(o=x(e))==null?void 0:o.header.class,...Array.isArray(n.$props.headerClass)?n.$props.headerClass:[n.$props.headerClass]],"data-wv-section":"dialogheader"},content:{class:[...(s=x(e))==null?void 0:s.content({state:{},instance:{}}).class,...Array.isArray(n.$props.contentClass)?n.$props.contentClass:[n.$props.contentClass]]},footer:{class:[...(a=x(e))==null?void 0:a.footer.class,...Array.isArray(n.$props.footerClass)?n.$props.footerClass:[n.$props.footerClass]]},...n.$props.pt},onAfterHide:i[0]||(i[0]=l=>n.$emit("afterHide")),onDragend:i[1]||(i[1]=l=>n.$emit("dragend",l)),onHide:i[2]||(i[2]=l=>n.$emit("hide")),onMaximize:i[3]||(i[3]=l=>n.$emit("maximize",l)),onShow:i[4]||(i[4]=l=>n.$emit("show")),onUnmaximize:i[5]||(i[5]=l=>n.$emit("unmaximize",l)),"onUpdate:visible":i[6]||(i[6]=l=>n.$emit("update:visible",l))}),In({default:H(()=>[Q(n.$slots,"default")]),_:2},[n.$slots.closeicon?{name:"closeicon",fn:H(()=>[Q(n.$slots,"closeicon")]),key:"0"}:void 0,n.$slots.maximizeicon?{name:"maximizeicon",fn:H(()=>[Q(n.$slots,"maximizeicon")]),key:"1"}:void 0,n.$slots.header?{name:"header",fn:H(()=>[Q(n.$slots,"header")]),key:"2"}:void 0,n.$slots.footer?{name:"footer",fn:H(()=>[Q(n.$slots,"footer")]),key:"3"}:void 0]),1040,["pt"])}}})),uO={class:"flex justify-end gap-1 items-center pb-1 flex-wrap whitespace-nowrap","data-wv-name":"approver-info"},cO={class:"text-primary-500"},dO={class:"text-general-800"},fO={key:1},pO={class:"flex flex-col gap-3 justify-between"},hO={class:"flex justify-between"},mO={class:"text-general-800 text-xs font-medium"},gO={class:"flex justify-between items-center"},vO={class:"text-primary-500 font-medium text-xs"},yO={key:0,class:"text-general-800 font-normal text-xs"},bO={key:1,class:"flex gap-1 justify-end items-center"},AO={class:"text-general-800 font-normal text-xs"},KX=ce("ApproverInfo",Ae({__name:"ApproverInfo",props:{approvals:{},showShortInfo:{type:Boolean,default:!0},label:{},btnLabel:{},useFormatDate:{type:Boolean,default:!0}},setup(t){const e=t,n=oe(!1),i=X(()=>{var l,u,c,d,f,p,h;let s,a;return(l=e.approvals)==null||l.forEach(m=>{a=m.approvers.findIndex(v=>!!v.actionAt),s=a===-1?0:m.level-1,a=a===-1?0:a}),{name:(d=(c=(u=e.approvals)==null?void 0:u[s])==null?void 0:c.approvers[a])==null?void 0:d.fullName,date:(h=(p=(f=e.approvals)==null?void 0:f[s])==null?void 0:p.approvers[a])==null?void 0:h.actionAt}}),r=s=>{let a;switch(s){case"menyetujui":a="success";break;case"menolak":a="danger";break;default:a="warning"}return a},o=s=>e.useFormatDate?s?bu(new Date(s),{locale:"id-ID",dateFormat:"dd M yyyy",timeFormat:"HH:mm:ss"}):"-":s;return(s,a)=>{var l;return g(),O(ue,null,[E("div",uO,[s.showShortInfo?(g(),O(ue,{key:0},[a[3]||(a[3]=E("span",null,"Approver:",-1)),(l=s.approvals)!=null&&l.length?(g(),O(ue,{key:0},[L(Ee,{class:"!text-general-200 !text-base",icon:"user"}),E("span",cO,_(i.value.name),1),E("span",dO,_(o(i.value.date)),1),E("span",{onClick:a[0]||(a[0]=u=>n.value=!0),class:"text-primary-500 hover:cursor-pointer"},_(e.btnLabel??"more"),1)],64)):(g(),O("span",fO,"-"))],64)):(g(),O("span",{key:1,onClick:a[1]||(a[1]=u=>n.value=!0),class:"text-primary-500 hover:cursor-pointer"},_(s.label??"Lihat Approval"),1))]),L(rr,{visible:n.value,"onUpdate:visible":a[2]||(a[2]=u=>n.value=u),class:"min-w-[400px]",header:"List Approver",modal:""},{default:H(()=>[E("div",pO,[(g(!0),O(ue,null,Je(s.approvals,u=>(g(),O(ue,{key:u._id},[E("div",hO,[E("span",mO," Level "+_(u.level)+" ("+_(u.type.toLowerCase())+") ",1),u.status!=="menunggu approval"?(g(),P(Pt,{key:0,label:"selesai",severity:"success"})):B("",!0)]),(g(!0),O(ue,null,Je(u.approvers,c=>(g(),O("div",{key:c._id,class:"flex justify-between"},[E("div",gO,[L(Ee,{class:"!text-general-200 !text-base",icon:"user"}),E("span",vO,_(c.fullName),1)]),u.status!=="menunggu approval"&&!c.action?(g(),O("span",yO," Tidak terlibat ")):(g(),O("div",bO,[E("span",AO,_(c.actionAt?o(c.actionAt):"Menunggu approval..."),1),c.action?(g(),P(Pt,{key:0,label:c.action,severity:r(c.action)},null,8,["label","severity"])):B("",!0)]))]))),128))],64))),128))])]),_:1},8,["visible"])],64)}}})),wO={key:0},WX=ce("BadgeGroup",Ae({__name:"BadgeGroup",props:{labels:{},textMoreSeverity:{default:void 0},textMore:{default:"more"},limit:{},headerLabel:{default:"Header"},editable:{type:Boolean},severity:{},format:{},tooltip:{},getSeverity:{}},setup(t){const e=t,n=oe(!1),i=X(()=>e.labels.slice(0,e.limit)),r=X(()=>e.labels.length-i.value.length);return(o,s)=>i.value.length?(g(),O("div",it(T({key:1},o.$preset.badgegroup.root)),[(g(!0),O(ue,null,Je(i.value,a=>(g(),P(Pt,{key:typeof a=="string"?a:a.text,format:e.format,label:typeof a=="string"?a:a.text,severity:typeof a=="string"?e.severity:a.severity,tooltip:typeof a=="object"&&a.tooltip},null,8,["format","label","severity","tooltip"]))),128)),r.value?(g(),P(We,T({key:0,label:`+${r.value} ${o.textMore}`},o.$preset.badgegroup.showmorebutton,{severity:e.textMoreSeverity??"dark",onClick:s[0]||(s[0]=a=>n.value=!0),text:""}),null,16,["label","severity"])):B("",!0),o.limit?(g(),P(x(Ya),{key:1,visible:n.value,"onUpdate:visible":s[1]||(s[1]=a=>n.value=a),draggable:!1,header:o.headerLabel,pt:o.$preset.badgegroup.showmoredialog,modal:""},{default:H(()=>[Q(o.$slots,"dialogcontent",{labels:e.labels},()=>[(g(!0),O(ue,null,Je(e.labels,a=>(g(),P(Pt,{key:typeof a=="string"?a:a.text,format:e.format,label:typeof a=="string"?a:a.text,severity:typeof a=="string"?e.severity:a.severity,tooltip:typeof a=="object"&&a.tooltip},null,8,["format","label","severity","tooltip"]))),128))])]),_:3},8,["visible","header","pt"])):B("",!0)],16)):(g(),O("span",wO," - "))}})),SO=["data-p-disabled","data-p-highlight"],CO=["id","aria-invalid","aria-label","aria-labelledby","checked","disabled","input-id","name","readonly","required","tabindex","value"],Jo=ce("Checkbox",Ae({__name:"Checkbox",props:wn({value:{},modelValue:{},label:{},tooltip:{},tooltipPos:{},name:{},withinTable:{type:Boolean,default:!1},binary:{type:Boolean,default:!0},triState:{type:[Boolean,null]},invalid:{type:Boolean},disabled:{type:Boolean},selectable:{type:Boolean,default:!0},variant:{},readonly:{type:Boolean},useValidator:{type:Boolean},fieldName:{},required:{type:Boolean},tabindex:{},trueValue:{default:!0},falseValue:{default:!1},inputId:{default:"checkbox"},inputClass:{},inputStyle:{},ariaLabelledby:{},ariaLabel:{},pt:{},ptOptions:{},unstyled:{type:Boolean},labelClass:{}},{modelValue:{},modelModifiers:{}}),emits:wn(["update:modelValue","change","focus","blur"],["update:modelValue"]),setup(t,{emit:e}){const n=dt("preset",{}).checkbox,i=t,r=e,o=ni(t,"modelValue"),s=hn({value:void 0});wt(()=>{i.useValidator&&(Object.assign(s,Nn(i.fieldName??"checkbox")),i.value!=null&&(s.value=i.value)),i.modelValue!=null&&(s.value=i.modelValue)});const a=X(()=>i.triState?s.value:i.binary?s.value===i.trueValue:Q3(i.value,i.modelValue)),l=X(()=>i.triState&&o.value===!1),u=c=>{if(!i.disabled&&!i.readonly){let d;i.binary&&!i.triState?d=a.value?i.falseValue:i.trueValue:i.triState?d=s.value==null?!1:s.value===!1?!0:null:Array.isArray(i.modelValue)&&(a.value?d=i.modelValue.filter(f=>!av(f,i.value)):d=i.modelValue?[...i.modelValue,i.value]:[i.value]),o.value=d,s.value=d,r("change",c)}};return $e(()=>i.value,()=>{s.value=i.value}),$e(()=>i.modelValue,()=>{s.value=i.modelValue}),(c,d)=>{var f,p,h;return g(),O("label",T((f=x(n))==null?void 0:f.root,{class:[{"gap-1":i==null?void 0:i.label},{"pointer-events-none":!(i!=null&&i.selectable)}],"data-p-disabled":c.disabled,"data-p-highlight":s.value,"data-wv-name":"checkbox"}),[E("input",T({id:c.inputId},{...(p=x(n))==null?void 0:p.input,...i},{"aria-invalid":c.invalid||void 0,"aria-label":c.ariaLabel,"aria-labelledby":c.ariaLabelledby,checked:a.value,disabled:c.disabled,"input-id":c.inputId,name:c.name,readonly:c.readonly,required:c.required,style:c.inputStyle,tabindex:c.tabindex,value:s.value,onBlur:d[0]||(d[0]=m=>r("blur",m)),onChange:u,onFocus:d[1]||(d[1]=m=>r("focus",m)),"data-wv-section":"checkbox-input",type:"checkbox"}),null,16,CO),E("div",T((h=x(n))==null?void 0:h.box({props:i,context:{checked:a.value,partialChecked:l.value}}),{"data-wv-section":"box"}),[Q(c.$slots,"icon",{checked:a.value},()=>{var m;return[L(Ee,{class:pe([...(m=x(n))==null?void 0:m.icon.class,{"text-transparent":!a.value}]),icon:a.value?"check":l.value?"subtract":null},null,8,["class","icon"])]})],16),E("span",T(x(n).label({props:i}),{"data-wv-section":"checkbox-label"}),[ht(_(c.label)+" ",1),c.tooltip?(g(),P(Ee,T({key:0,info:c.tooltip,"tooltip-pos":c.tooltipPos},x(n).tooltipicon,{"data-wv-section":"tooltipicon",icon:"info"}),null,16,["info","tooltip-pos"])):B("",!0)],16)],16,SO)}}}));var uo=ev(),kO={root:function(e){var n=e.instance,i=e.props;return["p-menu p-component",{"p-menu-overlay":i.popup,"p-ripple-disabled":n.$primevue.config.ripple===!1}]},start:"p-menu-start",menu:"p-menu-list p-reset",submenuHeader:"p-submenu-header",separator:"p-menuitem-separator",end:"p-menu-end",menuitem:function(e){var n=e.instance;return["p-menuitem",{"p-focus":n.id===n.focusedOptionId,"p-disabled":n.disabled()}]},content:"p-menuitem-content",action:"p-menuitem-link",icon:"p-menuitem-icon",label:"p-menuitem-text"},TO=Wt.extend({name:"menu",classes:kO}),OO={name:"BaseMenu",extends:It,props:{popup:{type:Boolean,default:!1},model:{type:Array,default:null},appendTo:{type:[String,Object],default:"body"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:TO,provide:function(){return{$parentInstance:this}}},j1={name:"Menuitem",hostName:"Menu",extends:It,inheritAttrs:!1,emits:["item-click","item-mousemove"],props:{item:null,templates:null,id:null,focusedOptionId:null,index:null},methods:{getItemProp:function(e,n){return e&&e.item?Ce.getItemValue(e.item[n]):void 0},getPTOptions:function(e){return this.ptm(e,{context:{item:this.item,index:this.index,focused:this.isItemFocused(),disabled:this.disabled()}})},isItemFocused:function(){return this.focusedOptionId===this.id},onItemClick:function(e){var n=this.getItemProp(this.item,"command");n&&n({originalEvent:e,item:this.item.item}),this.$emit("item-click",{originalEvent:e,item:this.item,id:this.id})},onItemMouseMove:function(e){this.$emit("item-mousemove",{originalEvent:e,item:this.item,id:this.id})},visible:function(){return typeof this.item.visible=="function"?this.item.visible():this.item.visible!==!1},disabled:function(){return typeof this.item.disabled=="function"?this.item.disabled():this.item.disabled},label:function(){return typeof this.item.label=="function"?this.item.label():this.item.label},getMenuItemProps:function(e){return{action:T({class:this.cx("action"),tabindex:"-1","aria-hidden":!0},this.getPTOptions("action")),icon:T({class:[this.cx("icon"),e.icon]},this.getPTOptions("icon")),label:T({class:this.cx("label")},this.getPTOptions("label"))}}},directives:{ripple:fi}},xO=["id","aria-label","aria-disabled","data-p-focused","data-p-disabled"],MO=["href","target"];function EO(t,e,n,i,r,o){var s=on("ripple");return o.visible()?(g(),O("li",T({key:0,id:n.id,class:[t.cx("menuitem"),n.item.class],role:"menuitem",style:n.item.style,"aria-label":o.label(),"aria-disabled":o.disabled()},o.getPTOptions("menuitem"),{"data-p-focused":o.isItemFocused(),"data-p-disabled":o.disabled()||!1}),[E("div",T({class:t.cx("content"),onClick:e[0]||(e[0]=function(a){return o.onItemClick(a)}),onMousemove:e[1]||(e[1]=function(a){return o.onItemMouseMove(a)})},o.getPTOptions("content")),[n.templates.item?n.templates.item?(g(),P(yt(n.templates.item),{key:1,item:n.item,label:o.label(),props:o.getMenuItemProps(n.item)},null,8,["item","label","props"])):B("",!0):ft((g(),O("a",T({key:0,href:n.item.url,class:t.cx("action"),target:n.item.target,tabindex:"-1","aria-hidden":"true"},o.getPTOptions("action")),[n.templates.itemicon?(g(),P(yt(n.templates.itemicon),{key:0,item:n.item,class:pe(t.cx("icon"))},null,8,["item","class"])):n.item.icon?(g(),O("span",T({key:1,class:[t.cx("icon"),n.item.icon]},o.getPTOptions("icon")),null,16)):B("",!0),E("span",T({class:t.cx("label")},o.getPTOptions("label")),_(o.label()),17)],16,MO)),[[s]])],16)],16,xO)):B("",!0)}j1.render=EO;function U1(t){return DO(t)||LO(t)||PO(t)||IO()}function IO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
105
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PO(t,e){if(t){if(typeof t=="string")return op(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return op(t,e)}}function LO(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function DO(t){if(Array.isArray(t))return op(t)}function op(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var Wu={name:"Menu",extends:OO,inheritAttrs:!1,emits:["show","hide","focus","blur"],data:function(){return{id:this.$attrs.id,overlayVisible:!1,focused:!1,focusedOptionIndex:-1,selectedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||Vn()}},target:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,list:null,mounted:function(){this.id=this.id||Vn(),this.popup||(this.bindResizeListener(),this.bindOutsideClickListener())},beforeUnmount:function(){this.unbindResizeListener(),this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.container&&this.autoZIndex&&dn.clear(this.container),this.container=null},methods:{itemClick:function(e){var n=e.item;this.disabled(n)||(n.command&&n.command(e),this.overlayVisible&&this.hide(),!this.popup&&this.focusedOptionIndex!==e.id&&(this.focusedOptionIndex=e.id))},itemMouseMove:function(e){this.focused&&(this.focusedOptionIndex=e.id)},onListFocus:function(e){this.focused=!0,!this.popup&&this.changeFocusedOptionIndex(0),this.$emit("focus",e)},onListBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onListKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Space":this.onSpaceKey(e);break;case"Escape":this.popup&&(G.focus(this.target),this.hide());case"Tab":this.overlayVisible&&this.hide();break}},onArrowDownKey:function(e){var n=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(n),e.preventDefault()},onArrowUpKey:function(e){if(e.altKey&&this.popup)G.focus(this.target),this.hide(),e.preventDefault();else{var n=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(n),e.preventDefault()}},onHomeKey:function(e){this.changeFocusedOptionIndex(0),e.preventDefault()},onEndKey:function(e){this.changeFocusedOptionIndex(G.find(this.container,'li[data-pc-section="menuitem"][data-p-disabled="false"]').length-1),e.preventDefault()},onEnterKey:function(e){var n=G.findSingle(this.list,'li[id="'.concat("".concat(this.focusedOptionIndex),'"]')),i=n&&G.findSingle(n,'a[data-pc-section="action"]');this.popup&&G.focus(this.target),i?i.click():n&&n.click(),e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},findNextOptionIndex:function(e){var n=G.find(this.container,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),i=U1(n).findIndex(function(r){return r.id===e});return i>-1?i+1:0},findPrevOptionIndex:function(e){var n=G.find(this.container,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),i=U1(n).findIndex(function(r){return r.id===e});return i>-1?i-1:0},changeFocusedOptionIndex:function(e){var n=G.find(this.container,'li[data-pc-section="menuitem"][data-p-disabled="false"]'),i=e>=n.length?n.length-1:e<0?0:e;i>-1&&(this.focusedOptionIndex=n[i].getAttribute("id"))},toggle:function(e){this.overlayVisible?this.hide():this.show(e)},show:function(e){this.overlayVisible=!0,this.target=e.currentTarget},hide:function(){this.overlayVisible=!1,this.target=null},onEnter:function(e){G.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindOutsideClickListener(),this.bindResizeListener(),this.bindScrollListener(),this.autoZIndex&&dn.set("menu",e,this.baseZIndex+this.$primevue.config.zIndex.menu),this.popup&&G.focus(this.list),this.$emit("show")},onLeave:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.$emit("hide")},onAfterLeave:function(e){this.autoZIndex&&dn.clear(e)},alignOverlay:function(){G.absolutePosition(this.container,this.target);var e=G.getOuterWidth(this.target);e>G.getOuterWidth(this.container)&&(this.container.style.minWidth=G.getOuterWidth(this.target)+"px")},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){var i=e.container&&!e.container.contains(n.target),r=!(e.target&&(e.target===n.target||e.target.contains(n.target)));e.overlayVisible&&i&&r?e.hide():!e.popup&&i&&r&&(e.focusedOptionIndex=-1)},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new Ls(this.target,function(){e.overlayVisible&&e.hide()})),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!G.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},visible:function(e){return typeof e.visible=="function"?e.visible():e.visible!==!1},disabled:function(e){return typeof e.disabled=="function"?e.disabled():e.disabled},label:function(e){return typeof e.label=="function"?e.label():e.label},onOverlayClick:function(e){uo.emit("overlay-click",{originalEvent:e,target:this.target})},containerRef:function(e){this.container=e},listRef:function(e){this.list=e}},computed:{focusedOptionId:function(){return this.focusedOptionIndex!==-1?this.focusedOptionIndex:null}},components:{PVMenuitem:j1,Portal:$r}},RO=["id"],BO=["id","tabindex","aria-activedescendant","aria-label","aria-labelledby"],NO=["id"];function $O(t,e,n,i,r,o){var s=et("PVMenuitem"),a=et("Portal");return g(),P(a,{appendTo:t.appendTo,disabled:!t.popup},{default:H(function(){return[L(Lr,T({name:"p-connected-overlay",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},t.ptm("transition")),{default:H(function(){return[!t.popup||r.overlayVisible?(g(),O("div",T({key:0,ref:o.containerRef,id:r.id,class:t.cx("root"),onClick:e[3]||(e[3]=function(){return o.onOverlayClick&&o.onOverlayClick.apply(o,arguments)})},t.ptmi("root")),[t.$slots.start?(g(),O("div",T({key:0,class:t.cx("start")},t.ptm("start")),[Q(t.$slots,"start")],16)):B("",!0),E("ul",T({ref:o.listRef,id:r.id+"_list",class:t.cx("menu"),role:"menu",tabindex:t.tabindex,"aria-activedescendant":r.focused?o.focusedOptionId:void 0,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,onFocus:e[0]||(e[0]=function(){return o.onListFocus&&o.onListFocus.apply(o,arguments)}),onBlur:e[1]||(e[1]=function(){return o.onListBlur&&o.onListBlur.apply(o,arguments)}),onKeydown:e[2]||(e[2]=function(){return o.onListKeyDown&&o.onListKeyDown.apply(o,arguments)})},t.ptm("menu")),[(g(!0),O(ue,null,Je(t.model,function(l,u){return g(),O(ue,{key:o.label(l)+u.toString()},[l.items&&o.visible(l)&&!l.separator?(g(),O(ue,{key:0},[l.items?(g(),O("li",T({key:0,id:r.id+"_"+u,class:[t.cx("submenuHeader"),l.class],style:l.style,role:"none"},t.ptm("submenuHeader")),[Q(t.$slots,"submenuheader",{item:l},function(){return[ht(_(o.label(l)),1)]})],16,NO)):B("",!0),(g(!0),O(ue,null,Je(l.items,function(c,d){return g(),O(ue,{key:c.label+u+"_"+d},[o.visible(c)&&!c.separator?(g(),P(s,{key:0,id:r.id+"_"+u+"_"+d,item:c,templates:t.$slots,focusedOptionId:o.focusedOptionId,unstyled:t.unstyled,onItemClick:o.itemClick,onItemMousemove:o.itemMouseMove,pt:t.pt},null,8,["id","item","templates","focusedOptionId","unstyled","onItemClick","onItemMousemove","pt"])):o.visible(c)&&c.separator?(g(),O("li",T({key:"separator"+u+d,class:[t.cx("separator"),l.class],style:c.style,role:"separator"},t.ptm("separator")),null,16)):B("",!0)],64)}),128))],64)):o.visible(l)&&l.separator?(g(),O("li",T({key:"separator"+u.toString(),class:[t.cx("separator"),l.class],style:l.style,role:"separator"},t.ptm("separator")),null,16)):(g(),P(s,{key:o.label(l)+u.toString(),id:r.id+"_"+u,item:l,index:u,templates:t.$slots,focusedOptionId:o.focusedOptionId,unstyled:t.unstyled,onItemClick:o.itemClick,onItemMousemove:o.itemMouseMove,pt:t.pt},null,8,["id","item","index","templates","focusedOptionId","unstyled","onItemClick","onItemMousemove","pt"]))],64)}),128))],16,BO),t.$slots.end?(g(),O("div",T({key:1,class:t.cx("end")},t.ptm("end")),[Q(t.$slots,"end")],16)):B("",!0)],16,RO)):B("",!0)]}),_:3},16,["onEnter","onLeave","onAfterLeave"])]}),_:3},8,["appendTo","disabled"])}Wu.render=$O;const K1=(t,e)=>{const n={label:e,disabled:!0},i=t.filter(r=>r.visible!==!1);return i.length?i:[n]},VO=["href","onClick"],zO=["href","target"],W1=Ae({__name:"MenuItem",props:{item:{},routerProps:{}},setup(t){const e=t;return(n,i)=>{var o,s,a,l,u,c;const r=et("router-link");return e.item.route?(g(),P(r,{key:0,to:e.item.route,custom:""},{default:H(({href:d,navigate:f})=>{var p,h,m;return[E("a",T({href:d},(p=n.routerProps)==null?void 0:p.action,{onClick:f}),[e.item.icon?(g(),P(Ee,T({key:0},(h=n.routerProps)==null?void 0:h.icon,{icon:e.item.icon}),null,16,["icon"])):B("",!0),E("span",it(kt((m=n.routerProps)==null?void 0:m.label)),_(e.item.label),17)],16,VO)]}),_:1},8,["to"])):e.item.url?(g(),O("a",T({key:1,href:e.item.url,target:e.item.target},(o=n.routerProps)==null?void 0:o.action,{onClick:i[0]||(i[0]=Ot(()=>{},["stop"]))}),[e.item.icon?(g(),P(Ee,T({key:0},(s=n.routerProps)==null?void 0:s.icon,{icon:e.item.icon}),null,16,["icon"])):B("",!0),E("span",it(kt((a=n.routerProps)==null?void 0:a.label)),_(e.item.label),17)],16,zO)):(g(),O("a",T({key:2},(l=n.routerProps)==null?void 0:l.action,{"aria-hidden":"true","data-pc-section":"action",tabindex:"-1"}),[e.item.icon?(g(),P(Ee,T({key:0,icon:e.item.icon,severity:e.item.danger?"danger":void 0},(u=n.routerProps)==null?void 0:u.icon),null,16,["icon","severity"])):B("",!0),E("span",T((c=n.$preset.menu)==null?void 0:c.label({props:{danger:e.item.danger}}),{"data-pc-section":"label"}),_(e.item.label),17)],16))}}}),sp=ce("Menu",Ae({__name:"Menu",props:{model:{default:()=>[]},popup:{type:Boolean,default:!0},appendTo:{},autoZIndex:{type:Boolean},baseZIndex:{},exact:{type:Boolean},tabindex:{},ariaLabel:{},ariaLabelledby:{},pt:{},ptOptions:{},unstyled:{type:Boolean}},emits:["focus","blur"],setup(t,{expose:e,emit:n}){const i=n,{locale:r}=Zt("Menu"),o=+new Date,s=re(),a=f=>{var p;(p=s.value)==null||p.toggle(f)},l=f=>{var p;(p=s.value)==null||p.show(f)},u=f=>{var p;s.value&&f.overlayId!==o&&((p=s.value)==null||p.hide())},c=f=>{i("blur",f),setTimeout(()=>{Ye.off("overlay:show",u)},1e3)},d=f=>{Ye.on("overlay:show",u),Ye.emit("overlay:show",{overlayId:o}),i("focus",f)};return e({toggle:a,show:l,hide:u}),(f,p)=>(g(),P(x(Wu),T(f.$props,{ref_key:"menu",ref:s,model:x(K1)(f.$props.model,x(r).noOptionLabel),onBlur:c,onFocus:d}),In({item:H(({item:h,props:m,index:v})=>[L(W1,{index:v,item:h,"router-props":m},null,8,["index","item","router-props"])]),_:2},[f.$slots.start?{name:"start",fn:H(()=>[Q(f.$slots,"start")]),key:"0"}:void 0]),1040,["model"]))}})),FO=["aria-checked","aria-expanded","aria-label","aria-level","aria-posinset","aria-selected","aria-setsize","tabindex"],HO=["data-p-highlight","data-p-selectable"],jO=["data-node-has-children","data-node-key","data-node-selected"],UO={"aria-hidden":"true",class:"flex items-center justify-start gap-2 px-4 py-1.5 hover:bg-surface-50 text-xs no-underline overflow-hidden cursor-pointer select-none","data-pc-section":"action",tabindex:"-1"},KO=Ae({__name:"TreeNode",props:{node:{},index:{},disabled:{type:Boolean},listLabelsNoOption:{},pt:{},templates:{},disableKeys:{},disableNodeAll:{type:Boolean},exactDisableKeys:{},level:{},value:{},propagateSelection:{type:Boolean},expandedKeys:{},selectionKeys:{},treeNodeMenus:{},selectionMode:{},metaKeySelection:{type:Boolean},loading:{type:Boolean},showDisposableGroups:{type:Boolean},loadingIcon:{},loadingMode:{},filterText:{},filterBy:{},filterMode:{},filterPlaceholder:{},filterLocale:{},highlightOnSelect:{type:Boolean},scrollHeight:{},ariaLabel:{},ariaLabelledby:{},ptOptions:{},unstyled:{type:Boolean},useOption:{type:Boolean},disableNodeWhen:{type:Function},exactDisableNodeWhen:{type:Function},nodeSelectedWhen:{type:Function}},emits:["nodeToggle","nodeClick","checkboxChange","toggleMenu"],setup(t,{emit:e}){const n=e,i=t,r=dt("preset",{}).tree,o=re(),s=re(null);let a=!1,l=!1;const u=X(()=>{var j;return((j=i.node)==null?void 0:j.children)&&i.node.children.length>0}),c=X(()=>{var j;return+i.node.key!=-1&&i.useOption&&!((j=i.listLabelsNoOption)!=null&&j.includes(i.node.name))}),d=X(()=>i.expandedKeys&&i.expandedKeys[i.node.key]===!0),f=X(()=>i.node.leaf===!1?!1:!(i.node.children&&i.node.children.length)),p=X(()=>ke(i.node)||He(i.node)||i.node.selectable===!1?!1:i.selectionMode!=null),h=X(()=>{var j;return((j=i.nodeSelectedWhen)==null?void 0:j.call(i,i.node))||(i.selectionMode&&i.selectionKeys?i.selectionKeys[i.node.key]===!0:!1)}),m=X(()=>i.selectionMode==="checkbox"&&i.node.selectable!==!1),v=X(()=>{var j,he;return((j=i.nodeSelectedWhen)==null?void 0:j.call(i,i.node))||(i.selectionKeys?(he=i.selectionKeys[i.node.key])==null?void 0:he.checked:!1)}),S=X(()=>{var j;return i.selectionKeys?(j=i.selectionKeys[i.node.key])==null?void 0:j.partialChecked:!1}),b=X(()=>i.selectionMode==="single"||i.selectionMode==="multiple"?h.value:void 0),k=X(()=>m.value?v.value:void 0),A=()=>{n("nodeToggle",i.node),l=!0},w=j=>j.label,y=j=>{n("nodeToggle",j)},C=j=>{if(l||G.getAttribute(j.target,'[data-pc-section="toggler"]')||G.getAttribute(j.target.parentElement,'[data-pc-section="toggler"]')){l=!1;return}me()?ie(j.type==="dblclick"||i.node.key===-1):n("nodeClick",{originalEvent:j,nodeTouched:a,node:{...i.node,selectable:p.value}}),a=!1},I=j=>{n("nodeClick",j)},R=()=>{a=!0},M=(j,he)=>{if(i.selectionMode!==null){const De=[...G.find(s.value.parentElement,'[role="treeitem"]')];j.currentTarget.tabIndex=he===!1?-1:0,De.every(nt=>nt.tabIndex===-1)&&(De[0].tabIndex=0)}},D=(j,he,De)=>{j.tabIndex=-1,he.tabIndex=0,J(De||he)},$=j=>{const he=j.closest("ul").closest("li");if(he){const De=G.findSingle(he,"button");return De&&De.style.visibility!=="hidden"?he:$(j.previousElementSibling)}return null},W=()=>{if(!s.value)return;const j=G.find(s.value.closest('[data-pc-section="container"]'),'[role="treeitem"]'),he=[...j].some(De=>De.getAttribute("aria-selected")==="true"||De.getAttribute("aria-checked")==="true");if([...j].forEach(De=>{De.tabIndex=-1}),he){const De=[...j].filter(nt=>nt.getAttribute("aria-selected")==="true"||nt.getAttribute("aria-checked")==="true");De[0].tabIndex=0;return}[...j][0].tabIndex=0},ie=(j=!1)=>{const he=i.selectionKeys?{...i.selectionKeys}:{},De=!v.value;ve(i.node,De,he,j),n("checkboxChange",{node:i.node,check:De,selectionKeys:he})},ve=(j,he,De,nt=!1)=>{if(he?De[j.key]={checked:!0,partialChecked:!1}:delete De[j.key],(nt||i.propagateSelection)&&j.children&&j.children.length)for(const St of j.children)ve(St,he,De,nt)},ae=j=>{var lt,bt;const{check:he}=j,De={...j.selectionKeys};let nt=0,St=!1;if(i.node.children){if(i.propagateSelection){for(const jt of i.node.children)(lt=De[jt.key])!=null&<.checked?nt++:(bt=De[jt.key])!=null&&bt.partialChecked&&(St=!0);he&&nt===i.node.children.length?De[i.node.key]={checked:!0,partialChecked:!1}:(he||delete De[i.node.key],St||nt>0&&nt!==i.node.children.length?De[i.node.key]={checked:!1,partialChecked:!0}:delete De[i.node.key])}n("checkboxChange",{node:j.node,check:j.check,selectionKeys:De})}},me=()=>i.selectionMode==="checkbox",se=j=>{if(Oe(j))switch(j.code){case"Tab":Ie();break;case"ArrowDown":Pe(j);break;case"ArrowUp":Be(j);break;case"ArrowRight":xe(j);break;case"ArrowLeft":de(j);break;case"Enter":case"NumpadEnter":case"Space":ge(j);break}},Pe=j=>{const he=j.target.getAttribute("data-wv-section")==="tree-node-toggler"?j.target.closest('[role="treeitem"]'):j.target,De=he.children[1];if(De)D(he,De.children[0]);else if(he.nextElementSibling)D(he,he.nextElementSibling);else{const nt=Z(he);nt&&D(he,nt)}j.preventDefault()},Be=j=>{const he=j.target;if(he.previousElementSibling)D(he,he.previousElementSibling,q(he.previousElementSibling));else{const De=U(he);De&&D(he,De)}j.preventDefault()},xe=j=>{f.value||d.value||(j.currentTarget.tabIndex=-1,n("nodeToggle",i.node),Et(()=>{Pe(j)}))},de=j=>{const he=G.findSingle(j.currentTarget,'[data-wv-section="tree-node-toggler"]');if(i.level===0&&!d.value)return!1;if(d.value&&!f.value)return he.click(),!1;const De=$(j.currentTarget);De&&D(j.currentTarget,De)},ge=j=>{M(j,a),C(j),j.preventDefault()},Ie=()=>{W()},Oe=j=>j.currentTarget&&(j.currentTarget.isSameNode(j.target)||j.currentTarget.isSameNode(j.target.closest('[role="treeitem"]'))),le=async(j,he)=>{var St,lt;const De=j.target,nt=De.tagName.toLowerCase()==="button"?De:De.parentElement;if(nt!=null&&nt.classList.contains("tree-menu-button-active")){Se();const bt={...j,currentTarget:j.target};(St=o.value)==null||St.toggle(bt)}else{await Et(),Se(),nt==null||nt.classList.add("tree-menu-button-active","!bg-surface-300/20");const bt={...j,currentTarget:j.target};(lt=o.value)==null||lt.toggle(bt),n("toggleMenu",he)}},Se=()=>{const j=document.querySelectorAll(".tree-menu-button-active");j==null||j.forEach(he=>{he.classList.remove("tree-menu-button-active","!bg-surface-300/20")})},Z=j=>{const he=U(j);return he?he.nextElementSibling?he.nextElementSibling:Z(he):null},q=j=>{const he=j.children[1];if(he){const De=he.children[he.children.length-1];return q(De)}return j},U=j=>{const he=j.parentElement.parentElement;return G.getAttribute(he,"role")==="treeitem"?he:null},J=j=>{j.focus()},ke=j=>{var he,De;return((he=i.disableKeys)==null?void 0:he.includes(+j.key))||i.disabled||j.selectable==!1||j.disabled==!0||((De=i.disableNodeWhen)==null?void 0:De.call(i,j))},He=j=>{var he,De;return j.selectable==!1||((he=i.exactDisableKeys)==null?void 0:he.includes(+j.key))||i.disableNodeAll&&+j.key==-1||((De=i.exactDisableNodeWhen)==null?void 0:De.call(i,j))};return wt(()=>{W()}),(j,he)=>{var nt,St,lt,bt,jt,ln,un,en,Vt,Dt,Sn;const De=et("TreeNode",!0);return g(),O(ue,null,[E("li",T({ref_key:"currentNode",ref:s,"aria-checked":b.value,"aria-expanded":d.value,"aria-label":w(j.node),"aria-level":j.level,"aria-posinset":j.index+1,"aria-selected":k.value,"aria-setsize":j.node.children?j.node.children.length:0,tabindex:j.index===0?0:-1,onKeydown:se},(nt=i.pt??x(r))==null?void 0:nt.node,{"data-wv-name":"treenode",role:"treeitem"}),[E("div",T((St=i.pt??x(r))==null?void 0:St.content({props:i,context:{selected:v.value||h.value,disabled:ke(j.node),exactDisabled:He(j.node)}}),{"data-p-highlight":m.value?v.value:h.value,"data-p-selectable":p.value,style:j.node.style,onClick:C,onTouchend:R}),[E("button",T({onClick:A,"aria-hidden":"true",tabindex:"-1",type:"button"},(lt=i.pt??x(r))==null?void 0:lt.toggler({context:{leaf:f.value}})),[j.node.loading&&j.loadingMode==="icon"?(g(),P(Ee,{key:0,class:"animate-spin",icon:"spinner"})):(g(),O(ue,{key:1},[j.templates.togglericon?(g(),P(yt(j.templates.togglericon),{key:0,class:pe([...(bt=i.pt??x(r))==null?void 0:bt.togglericon.class]),expanded:d.value,node:j.node},null,8,["class","expanded","node"])):(g(),P(Ee,{key:1,class:pe([...(jt=i.pt??x(r))==null?void 0:jt.togglericon.class,{"rotate-90":d.value}]),"data-wv-section":"togglericon",icon:"arrow-right"},null,8,["class"]))],64))],16),m.value?(g(),P(Jo,T({key:0,binary:!1},(ln=i.pt??x(r))==null?void 0:ln.nodeCheckbox.root,{disabled:ke(j.node)||He(j.node),"model-value":v.value?v.value:S.value?!1:null,onClick:he[0]||(he[0]=Ot(()=>{},["prevent"])),onKeydown:he[1]||(he[1]=Ot(()=>{},["prevent","stop"])),"onUpdate:modelValue":C,"data-wv-section":"nodecheckbox","tri-state":""}),null,16,["disabled","model-value"])):B("",!0),j.templates.nodeicon?(g(),P(yt(j.templates.nodeicon),{key:1,class:pe([...(un=i.pt??x(r))==null?void 0:un.nodeicon().class]),node:j.node},null,8,["class","node"])):(g(),O("span",{key:2,class:pe([...(en=i.pt??x(r))==null?void 0:en.nodeicon().class,j.node.icon])},null,2)),E("span",T((Vt=i.pt??x(r))==null?void 0:Vt.label({props:i,context:{selected:v.value||h.value,disabled:ke(j.node),exactDisabled:He(j.node)}}),{onKeydown:he[3]||(he[3]=Ot(()=>{},["stop"]))}),[j.templates[j.node.type]||j.templates.default?(g(),P(yt(j.templates[j.node.type]||j.templates.default),{key:0,checked:v.value,disabled:He(j.node)||ke(j.node),node:j.node},null,8,["checked","disabled","node"])):(g(),O("span",{key:1,"data-node-has-children":!!((Dt=j.node.children)!=null&&Dt.length),"data-node-key":j.node.key,"data-node-selected":v.value,class:"grow"},_(j.node.name),9,jO)),j.node.isDisposable&&j.showDisposableGroups?(g(),P(Ee,{key:2,class:"!text-general-200 w-4 h-4 p-1",icon:"disposal",info:"Disposable Group","tooltip-pos":"left"})):B("",!0),c.value?(g(),P(We,{key:3,class:pe(["!w-4 !h-4 !min-w-4 p-0.5","!text-general-200","rounded-full"]),onClick:he[2]||(he[2]=Ot(Jt=>le(Jt,j.node),["stop"])),"data-wv-section":"nodemenubutton",icon:"more",severity:"secondary",text:"",tooltip:"Action","tooltip-pos":"left"})):B("",!0)],16)],16,HO),u.value&&d.value?(g(),O("ul",T({key:0,role:"group"},(Sn=i.pt??x(r))==null?void 0:Sn.subgroup),[(g(!0),O(ue,null,Je(j.node.children,Jt=>{var ee,Y;return g(),P(De,T({key:Jt.key,ref_for:!0},i,{class:[...(Y=(ee=i.pt??x(r))==null?void 0:ee.node)==null?void 0:Y.class],"disable-keys":j.disableKeys,disabled:ke(Jt),"exact-disable-keys":j.exactDisableKeys,"expanded-keys":j.expandedKeys,level:j.level+1,"list-labels-no-option":j.listLabelsNoOption,"loading-mode":j.loadingMode,node:Jt,"propagate-selection":i.propagateSelection,pt:j.pt,"selection-keys":j.selectionKeys,"selection-mode":j.selectionMode,"show-disposable-groups":j.showDisposableGroups,templates:j.templates,"tree-node-menus":j.treeNodeMenus,unstyled:j.unstyled,"use-option":j.useOption,onCheckboxChange:ae,onNodeClick:I,onNodeToggle:y,onToggleMenu:he[4]||(he[4]=we=>n("toggleMenu",we))}),null,16,["class","disable-keys","disabled","exact-disable-keys","expanded-keys","level","list-labels-no-option","loading-mode","node","propagate-selection","pt","selection-keys","selection-mode","show-disposable-groups","templates","tree-node-menus","unstyled","use-option"])}),128))],16)):B("",!0)],16,FO),c.value?(g(),P(sp,{key:0,ref_key:"treeNodeMenu",ref:o,model:j.treeNodeMenus,popup:!0,onHide:Se,"data-wv-section":"tree-node-menus"},{item:H(({item:Jt})=>[E("a",UO,[L(Ee,{icon:Jt.icon,severity:Jt.danger?"danger":void 0},null,8,["icon","severity"]),E("span",{class:pe(["text-inherit",{"!text-danger-500":Jt.danger}]),"data-pc-section":"label"},_(Jt.label),3)])]),_:1},8,["model"])):B("",!0)],64)}}}),WO=["id"],qO=["aria-label","aria-labelledby"],XO=ce("BaseTree",Ae({inheritAttrs:!1,__name:"BaseTree",props:{disableKeys:{},disableNodeAll:{type:Boolean,default:!1},exactDisableKeys:{},level:{default:0},listLabelsNoOption:{},value:{},propagateSelection:{type:Boolean,default:!0},expandedKeys:{},selectionKeys:{default:null},treeNodeMenus:{},selectionMode:{},metaKeySelection:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},showDisposableGroups:{type:Boolean},loadingIcon:{},loadingMode:{default:"mask"},filterText:{default:""},filterBy:{default:"label"},filterMode:{default:"lenient"},filterPlaceholder:{},filterLocale:{},highlightOnSelect:{type:Boolean,default:!1},scrollHeight:{},ariaLabel:{},ariaLabelledby:{},pt:{},ptOptions:{},unstyled:{type:Boolean},useOption:{type:Boolean,default:!1},disableNodeWhen:{},exactDisableNodeWhen:{},nodeSelectedWhen:{}},emits:["update:expandedKeys","update:selectionKeys","nodeSelect","nodeUnselect","nodeExpand","nodeCollapse","toggleMenu"],setup(t,{emit:e}){const n=t,i=e,r=dt("preset",{}).tree,o=re(n.expandedKeys??[]),s=b=>{const{key:k}=b;o.value[k]?(delete o.value[k],i("nodeCollapse",b)):(o.value[k]=!0,i("nodeExpand",b)),o.value={...o.value},i("update:expandedKeys",o.value)},a=b=>{if(n.selectionMode!=null&&b.node.selectable!==!1){const A=(b.nodeTouched?!1:n.metaKeySelection)?u(b):c(b);i("update:selectionKeys",A)}},l=b=>{i("update:selectionKeys",b.selectionKeys),b.check?i("nodeSelect",b.node):i("nodeUnselect",b.node)},u=b=>{const{originalEvent:k}=b,{node:A}=b,w=k.metaKey||k.ctrlKey,y=p(A);let C;return y&&w?(d()?C={}:(C={...n.selectionKeys},delete C[A.key]),i("nodeUnselect",A)):(d()?C={}:f()&&(w&&n.selectionKeys?C={...n.selectionKeys}:C={}),C[A.key]=!0,i("nodeSelect",A)),C},c=b=>{const{node:k}=b,A=p(k);let w;return d()?A?(w={},i("nodeUnselect",k)):(w={},w[k.key]=!0,i("nodeSelect",k)):A?(w={...n.selectionKeys},delete w[k.key],i("nodeUnselect",k)):(w=n.selectionKeys?{...n.selectionKeys}:{},w[k.key]=!0,i("nodeSelect",k)),w},d=()=>n.selectionMode==="single",f=()=>n.selectionMode==="multiple",p=b=>n.selectionMode&&n.selectionKeys?n.selectionKeys[b.key]===!0:!1,h=b=>b.leaf===!1?!1:!(b.children&&b.children.length),m=(b,k)=>{if(b){let A=!1;if(b.children){const w=[...b.children];b.children=[];for(const y of w){const C={...y};v(C,k)&&(A=!0,b.children.push(C))}}if(A)return!0}},v=(b,{searchFields:k,filterText:A,strict:w})=>{let y=!1;for(const C of k)String(Ce.resolveFieldData(b,C)).toLocaleLowerCase(n.filterLocale).indexOf(A)>-1&&(y=!0);return(!y||w&&!h(b))&&(y=m(b,{searchFields:k,filterText:A,strict:w})||y),y},S=X(()=>{const b=[],k=n.filterBy.split(","),A=n.filterMode==="strict";for(const w of n.value){const y={...w},C={searchFields:k,filterText:n.filterText.toLocaleLowerCase(n.filterLocale),strict:A};(A&&(m(y,C)||v(y,C))||!A&&(v(y,C)||m(y,C)))&&b.push(y)}return b});return $e(()=>n.expandedKeys,b=>{o.value=b},{deep:!0}),(b,k)=>{var A,w,y,C;return g(),O("div",T((A=n.pt??x(r))==null?void 0:A.root,{id:b.$attrs.id,class:b.$attrs.class,"data-wv-name":"tree"}),[b.loading&&b.loadingMode==="mask"?(g(),O("div",it(T({key:0},(w=n.pt??x(r))==null?void 0:w.loadingOverlay)),[Q(b.$slots,"loadingicon",{},()=>{var I;return[L(Ee,T({class:"animate-spin",icon:"spinner"},(I=n.pt??x(r))==null?void 0:I.loadingicon),null,16)]})],16)):B("",!0),E("div",T({style:{maxHeight:b.scrollHeight}},(y=n.pt??x(r))==null?void 0:y.wrapper),[E("ul",T({"aria-label":b.ariaLabel,"aria-labelledby":b.ariaLabelledby},(C=n.pt??x(r))==null?void 0:C.container,{"data-pc-section":"container",role:"tree"}),[(g(!0),O(ue,null,Je(S.value,(I,R)=>{var M,D,$;return g(),P(KO,T({key:I.key,ref_for:!0},n,{class:[...(D=(M=n.pt??x(r))==null?void 0:M.node)==null?void 0:D.class],"disable-keys":b.disableKeys,"disable-node-all":n.disableNodeAll,disabled:($=b.disableKeys)==null?void 0:$.includes(+I.key),"exact-disable-keys":b.exactDisableKeys,"expanded-keys":o.value,index:R,level:b.level+1,"list-labels-no-option":b.listLabelsNoOption,"loading-mode":b.loadingMode,node:I,"propagate-selection":b.propagateSelection,pt:b.pt,"selection-keys":b.selectionKeys,"selection-mode":b.selectionMode,"show-disposable-groups":b.showDisposableGroups,templates:b.$slots,"tree-node-menus":b.treeNodeMenus,unstyled:b.unstyled,"use-option":b.useOption,onCheckboxChange:l,onNodeClick:a,onNodeToggle:s,onToggleMenu:k[0]||(k[0]=W=>b.$emit("toggleMenu",W))}),null,16,["class","disable-keys","disable-node-all","disabled","exact-disable-keys","expanded-keys","index","level","list-labels-no-option","loading-mode","node","propagate-selection","pt","selection-keys","selection-mode","show-disposable-groups","templates","tree-node-menus","unstyled","use-option"])}),128))],16,qO)],16)],16,WO)}}})),GO=["href","title","onClick"],ZO=["textContent"],qX=ce("Breadcrumb",Ae({__name:"Breadcrumb",props:{menus:{}},setup(t){const e=t,n=dt("preset",{}).breadcrumb,i=X(()=>e.menus.length-1);return(r,o)=>(g(),O("div",it(kt(x(n).root)),[(g(!0),O(ue,null,Je(e.menus,(s,a)=>(g(),O(ue,{key:s.route},[E("span",T({ref_for:!0},x(n).item({context:{firstItem:a==0,lastItem:a==i.value,hasRoute:!!s.route}})),[s.route?(g(),O("a",T({key:0,href:s.route,title:s.title,ref_for:!0},x(n).itemlink,{onClick:l=>x(Sa)(s.route)}),_(s.name),17,GO)):(g(),O(ue,{key:1},[ht(_(s.name),1)],64))],16),a!=i.value?(g(),O("span",T({key:0,textContent:_(x(n).separator.content),ref_for:!0},x(n).separator),null,16,ZO)):B("",!0)],64))),128))],16))}}));var q1={name:"BlankIcon",extends:vn},_O=E("rect",{width:"1",height:"1",fill:"currentColor","fill-opacity":"0"},null,-1),JO=[_O];function YO(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),JO,16)}q1.render=YO;var co={name:"CheckIcon",extends:vn},QO=E("path",{d:"M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z",fill:"currentColor"},null,-1),ex=[QO];function tx(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),ex,16)}co.render=tx;var ap={name:"ChevronDownIcon",extends:vn},nx=E("path",{d:"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z",fill:"currentColor"},null,-1),ix=[nx];function rx(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),ix,16)}ap.render=rx;var lp={name:"SearchIcon",extends:vn},ox=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z",fill:"currentColor"},null,-1),sx=[ox];function ax(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),sx,16)}lp.render=ax;var lx=`
|
|
106
|
+
@layer primevue {
|
|
107
|
+
.p-virtualscroller {
|
|
108
|
+
position: relative;
|
|
109
|
+
overflow: auto;
|
|
110
|
+
contain: strict;
|
|
111
|
+
transform: translateZ(0);
|
|
112
|
+
will-change: scroll-position;
|
|
113
|
+
outline: 0 none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.p-virtualscroller-content {
|
|
117
|
+
position: absolute;
|
|
118
|
+
top: 0;
|
|
119
|
+
left: 0;
|
|
120
|
+
/* contain: content; */
|
|
121
|
+
min-height: 100%;
|
|
122
|
+
min-width: 100%;
|
|
123
|
+
will-change: transform;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.p-virtualscroller-spacer {
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 0;
|
|
129
|
+
left: 0;
|
|
130
|
+
height: 1px;
|
|
131
|
+
width: 1px;
|
|
132
|
+
transform-origin: 0 0;
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.p-virtualscroller .p-virtualscroller-loader {
|
|
137
|
+
position: sticky;
|
|
138
|
+
top: 0;
|
|
139
|
+
left: 0;
|
|
140
|
+
width: 100%;
|
|
141
|
+
height: 100%;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.p-virtualscroller-loader.p-component-overlay {
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.p-virtualscroller-loading-icon {
|
|
151
|
+
font-size: 2rem;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.p-virtualscroller-loading-icon.p-icon {
|
|
155
|
+
width: 2rem;
|
|
156
|
+
height: 2rem;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.p-virtualscroller-horizontal > .p-virtualscroller-content {
|
|
160
|
+
display: flex;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* Inline */
|
|
164
|
+
.p-virtualscroller-inline .p-virtualscroller-content {
|
|
165
|
+
position: static;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
`,X1=Wt.extend({name:"virtualscroller",css:lx}),ux={name:"BaseVirtualScroller",extends:It,props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},style:X1,provide:function(){return{$parentInstance:this}},beforeMount:function(){var e;X1.loadStyle({nonce:(e=this.$primevueConfig)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce})}};function el(t){"@babel/helpers - typeof";return el=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},el(t)}function G1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function tl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?G1(Object(n),!0).forEach(function(i){Z1(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):G1(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Z1(t,e,n){return e=cx(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cx(t){var e=dx(t,"string");return el(e)=="symbol"?e:String(e)}function dx(t,e){if(el(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(el(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var up={name:"VirtualScroller",extends:ux,inheritAttrs:!1,emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],data:function(){var e=this.isBoth();return{first:e?{rows:0,cols:0}:0,last:e?{rows:0,cols:0}:0,page:e?{rows:0,cols:0}:0,numItemsInViewport:e?{rows:0,cols:0}:0,lastScrollPos:e?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems:function(e){this.d_numToleratedItems=e},loading:function(e,n){this.lazy&&e!==n&&e!==this.d_loading&&(this.d_loading=e)},items:function(e,n){(!n||n.length!==(e||[]).length)&&(this.init(),this.calculateAutoSize())},itemSize:function(){this.init(),this.calculateAutoSize()},orientation:function(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight:function(){this.init(),this.calculateAutoSize()},scrollWidth:function(){this.init(),this.calculateAutoSize()}},mounted:function(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated:function(){!this.initialized&&this.viewInit()},unmounted:function(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit:function(){G.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.calculateAutoSize(),this.bindResizeListener(),this.defaultWidth=G.getWidth(this.element),this.defaultHeight=G.getHeight(this.element),this.defaultContentWidth=G.getWidth(this.content),this.defaultContentHeight=G.getHeight(this.content),this.initialized=!0)},init:function(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical:function(){return this.orientation==="vertical"},isHorizontal:function(){return this.orientation==="horizontal"},isBoth:function(){return this.orientation==="both"},scrollTo:function(e){this.element&&this.element.scrollTo(e)},scrollToIndex:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auto",r=this.isBoth(),o=this.isHorizontal(),s=r?e.every(function(C){return C>-1}):e>-1;if(s){var a=this.first,l=this.element,u=l.scrollTop,c=u===void 0?0:u,d=l.scrollLeft,f=d===void 0?0:d,p=this.calculateNumItems(),h=p.numToleratedItems,m=this.getContentPosition(),v=this.itemSize,S=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,R=arguments.length>1?arguments[1]:void 0;return I<=R?0:I},b=function(I,R,M){return I*R+M},k=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return n.scrollTo({left:I,top:R,behavior:i})},A=r?{rows:0,cols:0}:0,w=!1,y=!1;r?(A={rows:S(e[0],h[0]),cols:S(e[1],h[1])},k(b(A.cols,v[1],m.left),b(A.rows,v[0],m.top)),y=this.lastScrollPos.top!==c||this.lastScrollPos.left!==f,w=A.rows!==a.rows||A.cols!==a.cols):(A=S(e,h),o?k(b(A,v,m.left),c):k(f,b(A,v,m.top)),y=this.lastScrollPos!==(o?f:c),w=A!==a),this.isRangeChanged=w,y&&(this.first=A)}},scrollInView:function(e,n){var i=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"auto";if(n){var o=this.isBoth(),s=this.isHorizontal(),a=o?e.every(function(v){return v>-1}):e>-1;if(a){var l=this.getRenderedRange(),u=l.first,c=l.viewport,d=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return i.scrollTo({left:S,top:b,behavior:r})},f=n==="to-start",p=n==="to-end";if(f){if(o)c.first.rows-u.rows>e[0]?d(c.first.cols*this.itemSize[1],(c.first.rows-1)*this.itemSize[0]):c.first.cols-u.cols>e[1]&&d((c.first.cols-1)*this.itemSize[1],c.first.rows*this.itemSize[0]);else if(c.first-u>e){var h=(c.first-1)*this.itemSize;s?d(h,0):d(0,h)}}else if(p){if(o)c.last.rows-u.rows<=e[0]+1?d(c.first.cols*this.itemSize[1],(c.first.rows+1)*this.itemSize[0]):c.last.cols-u.cols<=e[1]+1&&d((c.first.cols+1)*this.itemSize[1],c.first.rows*this.itemSize[0]);else if(c.last-u<=e+1){var m=(c.first+1)*this.itemSize;s?d(m,0):d(0,m)}}}}else this.scrollToIndex(e,r)},getRenderedRange:function(){var e=function(d,f){return Math.floor(d/(f||d))},n=this.first,i=0;if(this.element){var r=this.isBoth(),o=this.isHorizontal(),s=this.element,a=s.scrollTop,l=s.scrollLeft;if(r)n={rows:e(a,this.itemSize[0]),cols:e(l,this.itemSize[1])},i={rows:n.rows+this.numItemsInViewport.rows,cols:n.cols+this.numItemsInViewport.cols};else{var u=o?l:a;n=e(u,this.itemSize),i=n+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:n,last:i}}},calculateNumItems:function(){var e=this.isBoth(),n=this.isHorizontal(),i=this.itemSize,r=this.getContentPosition(),o=this.element?this.element.offsetWidth-r.left:0,s=this.element?this.element.offsetHeight-r.top:0,a=function(f,p){return Math.ceil(f/(p||f))},l=function(f){return Math.ceil(f/2)},u=e?{rows:a(s,i[0]),cols:a(o,i[1])}:a(n?o:s,i),c=this.d_numToleratedItems||(e?[l(u.rows),l(u.cols)]:l(u));return{numItemsInViewport:u,numToleratedItems:c}},calculateOptions:function(){var e=this,n=this.isBoth(),i=this.first,r=this.calculateNumItems(),o=r.numItemsInViewport,s=r.numToleratedItems,a=function(c,d,f){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return e.getLast(c+d+(c<f?2:3)*f,p)},l=n?{rows:a(i.rows,o.rows,s[0]),cols:a(i.cols,o.cols,s[1],!0)}:a(i,o,s);this.last=l,this.numItemsInViewport=o,this.d_numToleratedItems=s,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=n?Array.from({length:o.rows}).map(function(){return Array.from({length:o.cols})}):Array.from({length:o})),this.lazy&&Promise.resolve().then(function(){var u;e.lazyLoadState={first:e.step?n?{rows:0,cols:i.cols}:0:i,last:Math.min(e.step?e.step:l,((u=e.items)===null||u===void 0?void 0:u.length)||0)},e.$emit("lazy-load",e.lazyLoadState)})},calculateAutoSize:function(){var e=this;this.autoSize&&!this.d_loading&&Promise.resolve().then(function(){if(e.content){var n=e.isBoth(),i=e.isHorizontal(),r=e.isVertical();e.content.style.minHeight=e.content.style.minWidth="auto",e.content.style.position="relative",e.element.style.contain="none";var o=[G.getWidth(e.element),G.getHeight(e.element)],s=o[0],a=o[1];(n||i)&&(e.element.style.width=s<e.defaultWidth?s+"px":e.scrollWidth||e.defaultWidth+"px"),(n||r)&&(e.element.style.height=a<e.defaultHeight?a+"px":e.scrollHeight||e.defaultHeight+"px"),e.content.style.minHeight=e.content.style.minWidth="",e.content.style.position="",e.element.style.contain=""}})},getLast:function(){var e,n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;return this.items?Math.min(r?((e=this.columns||this.items[0])===null||e===void 0?void 0:e.length)||0:((n=this.items)===null||n===void 0?void 0:n.length)||0,i):0},getContentPosition:function(){if(this.content){var e=getComputedStyle(this.content),n=parseFloat(e.paddingLeft)+Math.max(parseFloat(e.left)||0,0),i=parseFloat(e.paddingRight)+Math.max(parseFloat(e.right)||0,0),r=parseFloat(e.paddingTop)+Math.max(parseFloat(e.top)||0,0),o=parseFloat(e.paddingBottom)+Math.max(parseFloat(e.bottom)||0,0);return{left:n,right:i,top:r,bottom:o,x:n+i,y:r+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize:function(){var e=this;if(this.element){var n=this.isBoth(),i=this.isHorizontal(),r=this.element.parentElement,o=this.scrollWidth||"".concat(this.element.offsetWidth||r.offsetWidth,"px"),s=this.scrollHeight||"".concat(this.element.offsetHeight||r.offsetHeight,"px"),a=function(u,c){return e.element.style[u]=c};n||i?(a("height",s),a("width",o)):a("height",s)}},setSpacerSize:function(){var e=this,n=this.items;if(n){var i=this.isBoth(),r=this.isHorizontal(),o=this.getContentPosition(),s=function(l,u,c){var d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return e.spacerStyle=tl(tl({},e.spacerStyle),Z1({},"".concat(l),(u||[]).length*c+d+"px"))};i?(s("height",n,this.itemSize[0],o.y),s("width",this.columns||n[1],this.itemSize[1],o.x)):r?s("width",this.columns||n,this.itemSize,o.x):s("height",n,this.itemSize,o.y)}},setContentPosition:function(e){var n=this;if(this.content&&!this.appendOnly){var i=this.isBoth(),r=this.isHorizontal(),o=e?e.first:this.first,s=function(c,d){return c*d},a=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return n.contentStyle=tl(tl({},n.contentStyle),{transform:"translate3d(".concat(c,"px, ").concat(d,"px, 0)")})};if(i)a(s(o.cols,this.itemSize[1]),s(o.rows,this.itemSize[0]));else{var l=s(o,this.itemSize);r?a(l,0):a(0,l)}}},onScrollPositionChange:function(e){var n=this,i=e.target,r=this.isBoth(),o=this.isHorizontal(),s=this.getContentPosition(),a=function(D,$){return D?D>$?D-$:D:0},l=function(D,$){return Math.floor(D/($||D))},u=function(D,$,W,ie,ve,ae){return D<=ve?ve:ae?W-ie-ve:$+ve-1},c=function(D,$,W,ie,ve,ae,me){return D<=ae?0:Math.max(0,me?D<$?W:D-ae:D>$?W:D-2*ae)},d=function(D,$,W,ie,ve,ae){var me=$+ie+2*ve;return D>=ve&&(me+=ve+1),n.getLast(me,ae)},f=a(i.scrollTop,s.top),p=a(i.scrollLeft,s.left),h=r?{rows:0,cols:0}:0,m=this.last,v=!1,S=this.lastScrollPos;if(r){var b=this.lastScrollPos.top<=f,k=this.lastScrollPos.left<=p;if(!this.appendOnly||this.appendOnly&&(b||k)){var A={rows:l(f,this.itemSize[0]),cols:l(p,this.itemSize[1])},w={rows:u(A.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],b),cols:u(A.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],k)};h={rows:c(A.rows,w.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],b),cols:c(A.cols,w.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],k)},m={rows:d(A.rows,h.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:d(A.cols,h.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},v=h.rows!==this.first.rows||m.rows!==this.last.rows||h.cols!==this.first.cols||m.cols!==this.last.cols||this.isRangeChanged,S={top:f,left:p}}}else{var y=o?p:f,C=this.lastScrollPos<=y;if(!this.appendOnly||this.appendOnly&&C){var I=l(y,this.itemSize),R=u(I,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,C);h=c(I,R,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,C),m=d(I,h,this.last,this.numItemsInViewport,this.d_numToleratedItems),v=h!==this.first||m!==this.last||this.isRangeChanged,S=y}}return{first:h,last:m,isRangeChanged:v,scrollPos:S}},onScrollChange:function(e){var n=this.onScrollPositionChange(e),i=n.first,r=n.last,o=n.isRangeChanged,s=n.scrollPos;if(o){var a={first:i,last:r};if(this.setContentPosition(a),this.first=i,this.last=r,this.lastScrollPos=s,this.$emit("scroll-index-change",a),this.lazy&&this.isPageChanged(i)){var l,u,c={first:this.step?Math.min(this.getPageByFirst(i)*this.step,(((l=this.items)===null||l===void 0?void 0:l.length)||0)-this.step):i,last:Math.min(this.step?(this.getPageByFirst(i)+1)*this.step:r,((u=this.items)===null||u===void 0?void 0:u.length)||0)},d=this.lazyLoadState.first!==c.first||this.lazyLoadState.last!==c.last;d&&this.$emit("lazy-load",c),this.lazyLoadState=c}}},onScroll:function(e){var n=this;if(this.$emit("scroll",e),this.delay){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.isPageChanged()){if(!this.d_loading&&this.showLoader){var i=this.onScrollPositionChange(e),r=i.isRangeChanged,o=r||(this.step?this.isPageChanged():!1);o&&(this.d_loading=!0)}this.scrollTimeout=setTimeout(function(){n.onScrollChange(e),n.d_loading&&n.showLoader&&(!n.lazy||n.loading===void 0)&&(n.d_loading=!1,n.page=n.getPageByFirst())},this.delay)}}else this.onScrollChange(e)},onResize:function(){var e=this;this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){if(G.isVisible(e.element)){var n=e.isBoth(),i=e.isVertical(),r=e.isHorizontal(),o=[G.getWidth(e.element),G.getHeight(e.element)],s=o[0],a=o[1],l=s!==e.defaultWidth,u=a!==e.defaultHeight,c=n?l||u:r?l:i?u:!1;c&&(e.d_numToleratedItems=e.numToleratedItems,e.defaultWidth=s,e.defaultHeight=a,e.defaultContentWidth=G.getWidth(e.content),e.defaultContentHeight=G.getHeight(e.content),e.init())}},this.resizeDelay)},bindResizeListener:function(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions:function(e){var n=(this.items||[]).length,i=this.isBoth()?this.first.rows+e:this.first+e;return{index:i,count:n,first:i===0,last:i===n-1,even:i%2===0,odd:i%2!==0}},getLoaderOptions:function(e,n){var i=this.loaderArr.length;return tl({index:e,count:i,first:e===0,last:e===i-1,even:e%2===0,odd:e%2!==0},n)},getPageByFirst:function(e){return Math.floor(((e??this.first)+this.d_numToleratedItems*4)/(this.step||1))},isPageChanged:function(e){return this.step?this.page!==this.getPageByFirst(e??this.first):!0},setContentEl:function(e){this.content=e||this.content||G.findSingle(this.element,'[data-pc-section="content"]')},elementRef:function(e){this.element=e},contentRef:function(e){this.content=e}},computed:{containerClass:function(){return["p-virtualscroller",this.class,{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()}]},contentClass:function(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass:function(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems:function(){var e=this;return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map(function(n){return e.columns?n:n.slice(e.appendOnly?0:e.first.cols,e.last.cols)}):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows:function(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns:function(){if(this.columns){var e=this.isBoth(),n=this.isHorizontal();if(e||n)return this.d_loading&&this.loaderDisabled?e?this.loaderArr[0]:this.loaderArr:this.columns.slice(e?this.first.cols:this.first,e?this.last.cols:this.last)}return this.columns}},components:{SpinnerIcon:Za}},fx=["tabindex"];function px(t,e,n,i,r,o){var s=et("SpinnerIcon");return t.disabled?(g(),O(ue,{key:1},[Q(t.$slots,"default"),Q(t.$slots,"content",{items:t.items,rows:t.items,columns:o.loadedColumns})],64)):(g(),O("div",T({key:0,ref:o.elementRef,class:o.containerClass,tabindex:t.tabindex,style:t.style,onScroll:e[0]||(e[0]=function(){return o.onScroll&&o.onScroll.apply(o,arguments)})},t.ptmi("root")),[Q(t.$slots,"content",{styleClass:o.contentClass,items:o.loadedItems,getItemOptions:o.getOptions,loading:r.d_loading,getLoaderOptions:o.getLoaderOptions,itemSize:t.itemSize,rows:o.loadedRows,columns:o.loadedColumns,contentRef:o.contentRef,spacerStyle:r.spacerStyle,contentStyle:r.contentStyle,vertical:o.isVertical(),horizontal:o.isHorizontal(),both:o.isBoth()},function(){return[E("div",T({ref:o.contentRef,class:o.contentClass,style:r.contentStyle},t.ptm("content")),[(g(!0),O(ue,null,Je(o.loadedItems,function(a,l){return Q(t.$slots,"item",{key:l,item:a,options:o.getOptions(l)})}),128))],16)]}),t.showSpacer?(g(),O("div",T({key:0,class:"p-virtualscroller-spacer",style:r.spacerStyle},t.ptm("spacer")),null,16)):B("",!0),!t.loaderDisabled&&t.showLoader&&r.d_loading?(g(),O("div",T({key:1,class:o.loaderClass},t.ptm("loader")),[t.$slots&&t.$slots.loader?(g(!0),O(ue,{key:0},Je(r.loaderArr,function(a,l){return Q(t.$slots,"loader",{key:l,options:o.getLoaderOptions(l,o.isBoth()&&{numCols:t.d_numItemsInViewport.cols})})}),128)):B("",!0),Q(t.$slots,"loadingicon",{},function(){return[L(s,T({spin:"",class:"p-virtualscroller-loading-icon"},t.ptm("loadingIcon")),null,16)]})],16)):B("",!0)],16,fx))}up.render=px;var hx={root:function(e){var n=e.instance,i=e.props,r=e.state;return["p-dropdown p-component p-inputwrapper",{"p-disabled":i.disabled,"p-invalid":i.invalid,"p-variant-filled":i.variant?i.variant==="filled":n.$primevue.config.inputStyle==="filled","p-dropdown-clearable":i.showClear,"p-focus":r.focused,"p-inputwrapper-filled":n.hasSelectedOption,"p-inputwrapper-focus":r.focused||r.overlayVisible,"p-overlay-open":r.overlayVisible}]},input:function(e){var n,i=e.instance,r=e.props;return["p-dropdown-label p-inputtext",{"p-placeholder":!r.editable&&i.label===r.placeholder,"p-dropdown-label-empty":!r.editable&&!i.$slots.value&&(i.label==="p-emptylabel"||((n=i.label)===null||n===void 0?void 0:n.length)===0)}]},clearIcon:"p-dropdown-clear-icon",trigger:"p-dropdown-trigger",loadingicon:"p-dropdown-trigger-icon",dropdownIcon:"p-dropdown-trigger-icon",panel:function(e){e.props;var n=e.instance;return["p-dropdown-panel p-component",{"p-ripple-disabled":n.$primevue.config.ripple===!1}]},header:"p-dropdown-header",filterContainer:"p-dropdown-filter-container",filterInput:function(e){var n=e.props,i=e.instance;return["p-dropdown-filter p-inputtext p-component",{"p-variant-filled":n.variant?n.variant==="filled":i.$primevue.config.inputStyle==="filled"}]},filterIcon:"p-dropdown-filter-icon",wrapper:"p-dropdown-items-wrapper",list:"p-dropdown-items",itemGroup:"p-dropdown-item-group",itemGroupLabel:"p-dropdown-item-group-label",item:function(e){var n=e.instance,i=e.props,r=e.state,o=e.option,s=e.focusedOption;return["p-dropdown-item",{"p-highlight":n.isSelected(o)&&i.highlightOnSelect,"p-focus":r.focusedOptionIndex===s,"p-disabled":n.isOptionDisabled(o)}]},itemLabel:"p-dropdown-item-label",checkIcon:"p-dropdown-check-icon",blankIcon:"p-dropdown-blank-icon",emptyMessage:"p-dropdown-empty-message"},mx=Wt.extend({name:"dropdown",classes:hx}),gx={name:"BaseDropdown",extends:It,props:{modelValue:null,options:Array,optionLabel:[String,Function],optionValue:[String,Function],optionDisabled:[String,Function],optionGroupLabel:[String,Function],optionGroupChildren:[String,Function],scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:[String,Object],default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},filterIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},resetFilterOnHide:{type:Boolean,default:!1},resetFilterOnClear:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},highlightOnSelect:{type:Boolean,default:!0},checkmark:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:mx,provide:function(){return{$parentInstance:this}}};function nl(t){"@babel/helpers - typeof";return nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nl(t)}function vx(t){return wx(t)||Ax(t)||bx(t)||yx()}function yx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
169
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bx(t,e){if(t){if(typeof t=="string")return cp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cp(t,e)}}function Ax(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function wx(t){if(Array.isArray(t))return cp(t)}function cp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function _1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function J1(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_1(Object(n),!0).forEach(function(i){Y1(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_1(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Y1(t,e,n){return e=Sx(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sx(t){var e=Cx(t,"string");return nl(e)=="symbol"?e:String(e)}function Cx(t,e){if(nl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(nl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Vr={name:"Dropdown",extends:gx,inheritAttrs:!1,emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],outsideClickListener:null,scrollHandler:null,resizeListener:null,labelClickListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||Vn()},modelValue:function(){this.isModelValueChanged=!0},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||Vn(),this.autoUpdateModel(),this.bindLabelClickListener()},updated:function(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindLabelClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(dn.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,n){return this.virtualScrollerDisabled?e:n&&n(e).index},getOptionLabel:function(e){return this.optionLabel?Ce.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?Ce.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,n){return(this.dataKey?Ce.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+n},getPTItemOptions:function(e,n,i,r){return this.ptm(r,{context:{option:e,index:i,selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,n),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return this.optionDisabled?Ce.resolveFieldData(e,this.optionDisabled):!1},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return Ce.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return Ce.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var n=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(function(i){return n.isOptionGroup(i)}).length:e)+1},show:function(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex(),e&&G.focus(this.$refs.focusInput)},hide:function(e){var n=this,i=function(){n.$emit("before-hide"),n.overlayVisible=!1,n.clicked=!1,n.focusedOptionIndex=-1,n.searchValue="",n.resetFilterOnHide&&(n.filterValue=null),e&&G.focus(n.$refs.focusInput)};setTimeout(function(){i()},0)},onFocus:function(e){this.disabled||(this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex(),this.scrollInView(this.focusedOptionIndex)),this.$emit("focus",e))},onBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled||G.isAndroid()){e.preventDefault();return}var n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!n&&Ce.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}this.clicked=!1},onEditableInput:function(e){var n=e.target.value;this.searchValue="";var i=this.searchOptions(e,n);!i&&(this.focusedOptionIndex=-1),this.updateModel(e,n),!this.overlayVisible&&Ce.isNotEmpty(n)&&this.show()},onContainerClick:function(e){this.disabled||this.loading||e.target.tagName==="INPUT"||e.target.getAttribute("data-pc-section")==="clearicon"||e.target.closest('[data-pc-section="clearicon"]')||((!this.overlay||!this.overlay.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.clicked=!0)},onClearClick:function(e){this.updateModel(e,null),this.resetFilterOnClear&&(this.filterValue=null)},onFirstHiddenFocus:function(e){var n=e.relatedTarget===this.$refs.focusInput?G.getFirstFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;G.focus(n)},onLastHiddenFocus:function(e){var n=e.relatedTarget===this.$refs.focusInput?G.getLastFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;G.focus(n)},onOptionSelect:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=this.getOptionValue(n);this.updateModel(e,r),i&&this.hide(!0)},onOptionMouseMove:function(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)},onFilterChange:function(e){var n=e.target.value;this.filterValue=n,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:n}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break}},onFilterBlur:function(){this.focusedOptionIndex=-1},onFilterUpdated:function(){this.overlayVisible&&this.alignOverlay()},onOverlayClick:function(e){uo.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){switch(e.code){case"Escape":this.onEscapeKey(e);break}},onArrowDownKey:function(e){if(!this.overlayVisible)this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());else{var n=this.focusedOptionIndex!==-1?this.findNextOptionIndex(this.focusedOptionIndex):this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,n)}e.preventDefault()},onArrowUpKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.altKey&&!n)this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var i=this.focusedOptionIndex!==-1?this.findPrevOptionIndex(this.focusedOptionIndex):this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n){var i=e.currentTarget;e.shiftKey?i.setSelectionRange(0,e.target.selectionStart):(i.setSelectionRange(0,0),this.focusedOptionIndex=-1)}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onEndKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n){var i=e.currentTarget;if(e.shiftKey)i.setSelectionRange(e.target.selectionStart,i.value.length);else{var r=i.value.length;i.setSelectionRange(r,r),this.focusedOptionIndex=-1}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onSpaceKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;!n&&this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault(),e.stopPropagation()},onTabKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n||(this.overlayVisible&&this.hasFocusableElements()?(G.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n&&!this.overlayVisible&&this.show()},onOverlayEnter:function(e){dn.set("overlay",e,this.$primevue.config.zIndex.overlay),G.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&G.focus(this.$refs.filterInput)},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){dn.clear(e)},alignOverlay:function(){this.appendTo==="self"?G.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=G.getOuterWidth(this.$el)+"px",G.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){e.overlayVisible&&e.overlay&&!e.$el.contains(n.target)&&!e.overlay.contains(n.target)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new Ls(this.$refs.container,function(){e.overlayVisible&&e.hide()})),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!G.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindLabelClickListener:function(){var e=this;if(!this.editable&&!this.labelClickListener){var n=document.querySelector('label[for="'.concat(this.inputId,'"]'));n&&G.isVisible(n)&&(this.labelClickListener=function(){G.focus(e.$refs.focusInput)},n.addEventListener("click",this.labelClickListener))}},unbindLabelClickListener:function(){if(this.labelClickListener){var e=document.querySelector('label[for="'.concat(this.inputId,'"]'));e&&G.isVisible(e)&&e.removeEventListener("click",this.labelClickListener)}},hasFocusableElements:function(){return G.getFocusableElements(this.overlay,':not([data-p-hidden-focusable="true"])').length>0},isOptionMatched:function(e){var n;return this.isValidOption(e)&&((n=this.getOptionLabel(e))===null||n===void 0?void 0:n.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale)))},isValidOption:function(e){return Ce.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return this.isValidOption(e)&&Ce.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(n){return e.isValidOption(n)})},findLastOptionIndex:function(){var e=this;return Ce.findLastIndex(this.visibleOptions,function(n){return e.isValidOption(n)})},findNextOptionIndex:function(e){var n=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(r){return n.isValidOption(r)}):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var n=this,i=e>0?Ce.findLastIndex(this.visibleOptions.slice(0,e),function(r){return n.isValidOption(r)}):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex(function(n){return e.isValidSelectedOption(n)}):-1},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,n){var i=this;this.searchValue=(this.searchValue||"")+n;var r=-1,o=!1;return Ce.isNotEmpty(this.searchValue)&&(this.focusedOptionIndex!==-1?(r=this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function(s){return i.isOptionMatched(s)}),r=r===-1?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex(function(s){return i.isOptionMatched(s)}):r+this.focusedOptionIndex):r=this.visibleOptions.findIndex(function(s){return i.isOptionMatched(s)}),r!==-1&&(o=!0),r===-1&&this.focusedOptionIndex===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&this.changeFocusedOptionIndex(e,r)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){i.searchValue="",i.searchTimeout=null},500),o},changeFocusedOptionIndex:function(e,n){this.focusedOptionIndex!==n&&(this.focusedOptionIndex=n,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[n],!1))},scrollInView:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;this.$nextTick(function(){var i=n!==-1?"".concat(e.id,"_").concat(n):e.focusedOptionId,r=G.findSingle(e.list,'li[id="'.concat(i,'"]'));r?r.scrollIntoView&&r.scrollIntoView({block:"nearest"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(n!==-1?n:e.focusedOptionIndex)})},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel:function(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},flatOptions:function(e){var n=this;return(e||[]).reduce(function(i,r,o){i.push({optionGroup:r,group:!0,index:o});var s=n.getOptionGroupChildren(r);return s&&s.forEach(function(a){return i.push(a)}),i},[])},overlayRef:function(e){this.overlay=e},listRef:function(e,n){this.list=e,n&&n(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var e=this,n=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){var i=S1.filter(n,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){var r=this.options||[],o=[];return r.forEach(function(s){var a=e.getOptionGroupChildren(s),l=a.filter(function(u){return i.includes(u)});l.length>0&&o.push(J1(J1({},s),{},Y1({},typeof e.optionGroupChildren=="string"?e.optionGroupChildren:"items",vx(l))))}),this.flatOptions(o)}return i}return n},hasSelectedOption:function(){return Ce.isNotEmpty(this.modelValue)},label:function(){var e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue:function(){var e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return Ce.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},listAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.listLabel:void 0},focusedOptionId:function(){return this.focusedOptionIndex!==-1?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter(function(n){return!e.isOptionGroup(n)}).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:fi},components:{VirtualScroller:up,Portal:$r,TimesIcon:fr,ChevronDownIcon:ap,SpinnerIcon:Za,SearchIcon:lp,CheckIcon:co,BlankIcon:q1}};function il(t){"@babel/helpers - typeof";return il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},il(t)}function Q1(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function pr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Q1(Object(n),!0).forEach(function(i){kx(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q1(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function kx(t,e,n){return e=Tx(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Tx(t){var e=Ox(t,"string");return il(e)=="symbol"?e:String(e)}function Ox(t,e){if(il(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(il(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xx=["id"],Mx=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],Ex=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],Ix=["value","placeholder","aria-owns","aria-activedescendant"],Px=["id","aria-label"],Lx=["id"],Dx=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"];function Rx(t,e,n,i,r,o){var s=et("SpinnerIcon"),a=et("CheckIcon"),l=et("BlankIcon"),u=et("VirtualScroller"),c=et("Portal"),d=on("ripple");return g(),O("div",T({ref:"container",id:r.id,class:t.cx("root"),onClick:e[16]||(e[16]=function(){return o.onContainerClick&&o.onContainerClick.apply(o,arguments)})},t.ptmi("root")),[t.editable?(g(),O("input",T({key:0,ref:"focusInput",id:t.inputId,type:"text",class:[t.cx("input"),t.inputClass],style:t.inputStyle,value:o.editableInputValue,placeholder:t.placeholder,tabindex:t.disabled?-1:t.tabindex,disabled:t.disabled,autocomplete:"off",role:"combobox","aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":r.overlayVisible,"aria-controls":r.id+"_list","aria-activedescendant":r.focused?o.focusedOptionId:void 0,"aria-invalid":t.invalid||void 0,onFocus:e[0]||(e[0]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[1]||(e[1]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),onKeydown:e[2]||(e[2]=function(){return o.onKeyDown&&o.onKeyDown.apply(o,arguments)}),onInput:e[3]||(e[3]=function(){return o.onEditableInput&&o.onEditableInput.apply(o,arguments)})},pr(pr({},t.inputProps),t.ptm("input"))),null,16,Mx)):(g(),O("span",T({key:1,ref:"focusInput",id:t.inputId,class:[t.cx("input"),t.inputClass],style:t.inputStyle,tabindex:t.disabled?-1:t.tabindex,role:"combobox","aria-label":t.ariaLabel||(o.label==="p-emptylabel"?void 0:o.label),"aria-labelledby":t.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":r.overlayVisible,"aria-controls":r.id+"_list","aria-activedescendant":r.focused?o.focusedOptionId:void 0,"aria-disabled":t.disabled,onFocus:e[4]||(e[4]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[5]||(e[5]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),onKeydown:e[6]||(e[6]=function(){return o.onKeyDown&&o.onKeyDown.apply(o,arguments)})},pr(pr({},t.inputProps),t.ptm("input"))),[Q(t.$slots,"value",{value:t.modelValue,placeholder:t.placeholder},function(){return[ht(_(o.label==="p-emptylabel"?" ":o.label||"empty"),1)]})],16,Ex)),t.showClear&&t.modelValue!=null?Q(t.$slots,"clearicon",{key:2,class:pe(t.cx("clearIcon")),onClick:o.onClearClick,clearCallback:o.onClearClick},function(){return[(g(),P(yt(t.clearIcon?"i":"TimesIcon"),T({ref:"clearIcon",class:[t.cx("clearIcon"),t.clearIcon],onClick:o.onClearClick},pr(pr({},t.clearIconProps),t.ptm("clearIcon")),{"data-pc-section":"clearicon"}),null,16,["class","onClick"]))]}):B("",!0),E("div",T({class:t.cx("trigger")},t.ptm("trigger")),[t.loading?Q(t.$slots,"loadingicon",{key:0,class:pe(t.cx("loadingIcon"))},function(){return[t.loadingIcon?(g(),O("span",T({key:0,class:[t.cx("loadingIcon"),"pi-spin",t.loadingIcon],"aria-hidden":"true"},t.ptm("loadingIcon")),null,16)):(g(),P(s,T({key:1,class:t.cx("loadingIcon"),spin:"","aria-hidden":"true"},t.ptm("loadingIcon")),null,16,["class"]))]}):Q(t.$slots,"dropdownicon",{key:1,class:pe(t.cx("dropdownIcon"))},function(){return[(g(),P(yt(t.dropdownIcon?"span":"ChevronDownIcon"),T({class:[t.cx("dropdownIcon"),t.dropdownIcon],"aria-hidden":"true"},t.ptm("dropdownIcon")),null,16,["class"]))]})],16),L(c,{appendTo:t.appendTo},{default:H(function(){return[L(Lr,T({name:"p-connected-overlay",onEnter:o.onOverlayEnter,onAfterEnter:o.onOverlayAfterEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},t.ptm("transition")),{default:H(function(){return[r.overlayVisible?(g(),O("div",T({key:0,ref:o.overlayRef,class:[t.cx("panel"),t.panelClass],style:t.panelStyle,onClick:e[14]||(e[14]=function(){return o.onOverlayClick&&o.onOverlayClick.apply(o,arguments)}),onKeydown:e[15]||(e[15]=function(){return o.onOverlayKeyDown&&o.onOverlayKeyDown.apply(o,arguments)})},pr(pr({},t.panelProps),t.ptm("panel"))),[E("span",T({ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:e[7]||(e[7]=function(){return o.onFirstHiddenFocus&&o.onFirstHiddenFocus.apply(o,arguments)})},t.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16),Q(t.$slots,"header",{value:t.modelValue,options:o.visibleOptions}),t.filter?(g(),O("div",T({key:0,class:t.cx("header")},t.ptm("header")),[E("div",T({class:t.cx("filterContainer")},t.ptm("filterContainer")),[E("input",T({ref:"filterInput",type:"text",value:r.filterValue,onVnodeMounted:e[8]||(e[8]=function(){return o.onFilterUpdated&&o.onFilterUpdated.apply(o,arguments)}),onVnodeUpdated:e[9]||(e[9]=function(){return o.onFilterUpdated&&o.onFilterUpdated.apply(o,arguments)}),class:t.cx("filterInput"),placeholder:t.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":r.id+"_list","aria-activedescendant":o.focusedOptionId,onKeydown:e[10]||(e[10]=function(){return o.onFilterKeyDown&&o.onFilterKeyDown.apply(o,arguments)}),onBlur:e[11]||(e[11]=function(){return o.onFilterBlur&&o.onFilterBlur.apply(o,arguments)}),onInput:e[12]||(e[12]=function(){return o.onFilterChange&&o.onFilterChange.apply(o,arguments)})},pr(pr({},t.filterInputProps),t.ptm("filterInput"))),null,16,Ix),Q(t.$slots,"filtericon",{class:pe(t.cx("filterIcon"))},function(){return[(g(),P(yt(t.filterIcon?"span":"SearchIcon"),T({class:[t.cx("filterIcon"),t.filterIcon]},t.ptm("filterIcon")),null,16,["class"]))]})],16),E("span",T({role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),_(o.filterResultMessageText),17)],16)):B("",!0),E("div",T({class:t.cx("wrapper"),style:{"max-height":o.virtualScrollerDisabled?t.scrollHeight:""}},t.ptm("wrapper")),[L(u,T({ref:o.virtualScrollerRef},t.virtualScrollerOptions,{items:o.visibleOptions,style:{height:t.scrollHeight},tabindex:-1,disabled:o.virtualScrollerDisabled,pt:t.ptm("virtualScroller")}),In({content:H(function(f){var p=f.styleClass,h=f.contentRef,m=f.items,v=f.getItemOptions,S=f.contentStyle,b=f.itemSize;return[E("ul",T({ref:function(A){return o.listRef(A,h)},id:r.id+"_list",class:[t.cx("list"),p],style:S,role:"listbox","aria-label":o.listAriaLabel},t.ptm("list")),[(g(!0),O(ue,null,Je(m,function(k,A){return g(),O(ue,{key:o.getOptionRenderKey(k,o.getOptionIndex(A,v))},[o.isOptionGroup(k)?(g(),O("li",T({key:0,id:r.id+"_"+o.getOptionIndex(A,v),style:{height:b?b+"px":void 0},class:t.cx("itemGroup"),role:"option"},t.ptm("itemGroup")),[Q(t.$slots,"optiongroup",{option:k.optionGroup,index:o.getOptionIndex(A,v)},function(){return[E("span",T({class:t.cx("itemGroupLabel")},t.ptm("itemGroupLabel")),_(o.getOptionGroupLabel(k.optionGroup)),17)]})],16,Lx)):ft((g(),O("li",T({key:1,id:r.id+"_"+o.getOptionIndex(A,v),class:t.cx("item",{option:k,focusedOption:o.getOptionIndex(A,v)}),style:{height:b?b+"px":void 0},role:"option","aria-label":o.getOptionLabel(k),"aria-selected":o.isSelected(k),"aria-disabled":o.isOptionDisabled(k),"aria-setsize":o.ariaSetSize,"aria-posinset":o.getAriaPosInset(o.getOptionIndex(A,v)),onClick:function(y){return o.onOptionSelect(y,k)},onMousemove:function(y){return o.onOptionMouseMove(y,o.getOptionIndex(A,v))},"data-p-highlight":o.isSelected(k),"data-p-focused":r.focusedOptionIndex===o.getOptionIndex(A,v),"data-p-disabled":o.isOptionDisabled(k)},o.getPTItemOptions(k,v,A,"item")),[t.checkmark?(g(),O(ue,{key:0},[o.isSelected(k)?(g(),P(a,T({key:0,class:t.cx("checkIcon")},t.ptm("checkIcon")),null,16,["class"])):(g(),P(l,T({key:1,class:t.cx("blankIcon")},t.ptm("blankIcon")),null,16,["class"]))],64)):B("",!0),Q(t.$slots,"option",{option:k,index:o.getOptionIndex(A,v)},function(){return[E("span",T({class:t.cx("itemLabel")},t.ptm("itemLabel")),_(o.getOptionLabel(k)),17)]})],16,Dx)),[[d]])],64)}),128)),r.filterValue&&(!m||m&&m.length===0)?(g(),O("li",T({key:0,class:t.cx("emptyMessage"),role:"option"},t.ptm("emptyMessage"),{"data-p-hidden-accessible":!0}),[Q(t.$slots,"emptyfilter",{},function(){return[ht(_(o.emptyFilterMessageText),1)]})],16)):!t.options||t.options&&t.options.length===0?(g(),O("li",T({key:1,class:t.cx("emptyMessage"),role:"option"},t.ptm("emptyMessage"),{"data-p-hidden-accessible":!0}),[Q(t.$slots,"empty",{},function(){return[ht(_(o.emptyMessageText),1)]})],16)):B("",!0)],16,Px)]}),_:2},[t.$slots.loader?{name:"loader",fn:H(function(f){var p=f.options;return[Q(t.$slots,"loader",{options:p})]}),key:"0"}:void 0]),1040,["items","style","disabled","pt"])],16),Q(t.$slots,"footer",{value:t.modelValue,options:o.visibleOptions}),!t.options||t.options&&t.options.length===0?(g(),O("span",T({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),_(o.emptyMessageText),17)):B("",!0),E("span",T({role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),_(o.selectedMessageText),17),E("span",T({ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:e[13]||(e[13]=function(){return o.onLastHiddenFocus&&o.onLastHiddenFocus.apply(o,arguments)})},t.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16)],16)):B("",!0)]}),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]}),_:3},8,["appendTo"])],16,xx)}Vr.render=Rx;const Bx=ce("ButtonBulkAction",Ae({__name:"ButtonBulkAction",props:{disabled:{type:Boolean},selectedData:{default:()=>[]},totalRecords:{},options:{default:()=>[]},tableName:{default:"datatable"},selectMenuType:{},naming:{}},emits:["apply","update:selectedData"],setup(t,{emit:e}){const n=t,{defaultProps:i,locale:r}=Zt("ButtonBulkAction"),o=zi(n,i),s=e;wt(()=>{window.addEventListener("disableBulkAction",S),Ye.on("data-table:update-selected-data",A),Ye.on("data-table:update-total-record",k)}),Fo(()=>{window.removeEventListener("disableBulkAction",S),Ye.off("data-table:update-total-record",A),Ye.off("data-table:update-selected-data",k)});const a=re(),l=re(),u=oe(),c=oe(0),d=oe(!1),f=oe(!1),p=re(n.selectedData),h=X(()=>{var C;return((C=p.value)==null?void 0:C.length)&&!f.value&&c.value>0}),m=()=>{window.dispatchEvent(new CustomEvent("fetchAllData",{detail:n.tableName})),Ye.emit("data-table:select-all-record",{tableName:n.tableName})},v=()=>{s("update:selectedData",[]),Ye.emit("data-table:clear-selected-data",{tableName:n.tableName})},S=C=>{n.tableName===C.detail.tableName&&(f.value=C.detail.value)},b=C=>{var I;(I=a.value)==null||I.toggle(C)},k=C=>{n.tableName===(C==null?void 0:C.tableName)&&(c.value=C==null?void 0:C.total)},A=C=>{C.tableName===n.tableName&&(p.value=C.data,s("update:selectedData",C.data??[]))},w=async C=>{var I,R;if(C.useAdditionSlot){u.value=C,await Et();const M=(I=l.value)==null?void 0:I.children[1],D=M==null?void 0:M.querySelector("input");D&&(D==null||D.click(),D==null||D.focus())}else C.command?(C.command({originalEvent:void 0,item:C}),(R=a.value)==null||R.hide(),u.value=void 0):C.url?window.open(C.url,C.target):C.route&&window.history.pushState(void 0,"",C.route)},y=C=>{var I,R;(R=(I=u.value)==null?void 0:I.command)==null||R.call(I,{originalEvent:C,item:u.value}),u.value=void 0,s("apply")};return $e([p,c],([C,I])=>{C!=null&&C.length||(u.value=void 0),d.value=(C==null?void 0:C.length)===I},{deep:!0}),$e(()=>n.totalRecords,C=>c.value=C??0,{immediate:!0}),(C,I)=>{var R,M,D,$,W,ie;return ft((g(),O("div",T(C.$preset.buttonbulkaction.root,{ref_key:"wrapper",ref:l}),[x(o).selectMenuType==="overlay-panel"&&((R=p.value)!=null&&R.length)?(g(),P(sp,{key:0,ref_key:"menu",ref:a,model:C.options,popup:""},null,8,["model"])):B("",!0),x(o).selectMenuType==="dropdown"?(g(),O(ue,{key:1},[(M=C.selectedData)!=null&&M.length?(g(),P(x(Vr),{key:0,disabled:n.disabled||f.value||!((D=C.selectedData)!=null&&D.length),options:x(K1)(C.options,C.$wangsvue.config.locale.components.Menu.noOptionLabel),pt:C.$preset.buttonbulkaction.dropdownmenu,"onUpdate:modelValue":I[0]||(I[0]=ve=>w(ve)),"option-label":"label",outlined:"",placeholder:"Bulk Action"},{dropdownicon:H(({class:ve})=>[L(Ee,{class:pe([ve]),icon:"arrow-down"},null,8,["class"])]),option:H(({option:ve})=>[L(W1,{item:ve,"router-props":{action:C.$preset.menu.action,label:C.$preset.menu.label,icon:C.$preset.menu.icon}},null,8,["item","router-props"])]),_:1},8,["disabled","options","pt"])):B("",!0),Q(C.$slots,"addition",{selectedOption:u.value}),ft(L(We,T({onClick:y},C.$preset.buttonbulkaction.applybutton,{label:"Apply"}),null,16),[[Xn,($=u.value)==null?void 0:$.useAdditionSlot]])],64)):B("",!0),ft(E("span",it(kt(C.$preset.buttonbulkaction.selectionmessage)),_(x(r).currentSelectionMessage.replace("{length} {naming}",`${p.value.length.toString()} ${x(o).naming}`)),17),[[Xn,(W=p.value)==null?void 0:W.length]]),ft(L(We,T({onClick:m},C.$preset.buttonbulkaction.buttonselectall({context:{selectedAll:d.value}}),{text:""}),{default:H(()=>[d.value?(g(),O(ue,{key:1},[ht(_(x(r).allRecordSelected.replace("{naming}",x(o).naming)),1)],64)):(g(),O(ue,{key:0},[ht(_(x(r).selectAllRecords.replace("{totalRecords}",c.value.toString())),1)],64))]),_:1},16),[[Xn,h.value]]),x(o).selectMenuType==="overlay-panel"?(g(),P(We,T({key:2,onClick:b},C.$preset.buttonbulkaction.bulkactiontoggle,{icon:"ellipsis-h",outlined:"",severity:"secondary",size:"small"}),null,16)):B("",!0),L(We,T({onClick:v},C.$preset.buttonbulkaction.buttonclearselection,{icon:"close",severity:"danger",text:""}),null,16)],16)),[[Xn,(ie=p.value)==null?void 0:ie.length]])}}})),Nx=ce("ButtonCopy",Ae({__name:"ButtonCopy",props:{text:{}},setup(t){const e=t,n=()=>{navigator.clipboard.writeText(e.text)};return(i,r)=>(g(),P(We,{onClick:n,class:"p-0 m-0","data-wv-name":"buttoncopy",text:""},{default:H(()=>[L(Ee,{class:"h-[14px] text-sm text-general-200",icon:"file-copy"})]),_:1}))}})),$x=1*1024*1024,Vx=10*1024*1024,zx=t=>t.startsWith("image/")?"image":t.includes("mp4")?"mp4":t==="video/x-matroska"?"mkv":t==="text/plain"?"txt":t==="text/csv"?"csv":t==="text/html"?"html":t==="application/json"?"json":t==="application/pdf"?"pdf":t==="application/vnd.ms-excel"||t==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"?"xls":t==="application/msword"||t==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"?"doc":t.startsWith("application/x-url")?"link":t.includes("application/x-zip-compressed")||t.includes("application/x-compressed")?"compressed":"unknown",Fx=(t,e=1)=>{var i;if(e*=$x,!((i=t.type)!=null&&i.length))return!1;const n=zx(t.type);return t.size<=(n==="mp4"||n==="mkv"?Vx:e)},eb=t=>t!=null&&t.length?typeof(t==null?void 0:t[0])=="string"?t:t==null?void 0:t.filter(e=>e.visible!==!1):[],tb=["#57291F","#C0413B","#D77B5F","#FF9200","#C87505","#F18E3F","#C14C32","#80003A","#506432","#B30019","#EC410B","#8CB5B5","#6C3400","#FFA400","#41222A","#FFB27B","#BC7576"],nb=()=>{const t=Math.floor(Math.random()*tb.length);return tb[t]},Hx=(t,e,n,i)=>{const r=n??nb(),o=document.createElement("canvas");o.style.background=r,o.width=e,o.height=e;const s=o.getContext("2d");if(s){const a="Poppins",l="600",c="#fff";s.font=`${l} 48px/48px ${a}`,s.textAlign="center",s.textBaseline="middle";const d=o.width/2,f=(o.height+8)/2;s.fillStyle=r,s.fillRect(0,0,o.width,o.height),s.fillStyle=c,s.fillText(t,d,f)}return o},jx={key:0,class:"inherit text-xs"},XX=ce("ButtonDownload",Ae({__name:"ButtonDownload",props:{fileName:{},label:{default:void 0},tableName:{default:"datatable"},multiTableNames:{default:void 0},additionalTextBelowTable:{default:void 0},dataConfigs:{},excelToastErrorMessage:{}},setup(t){const e=t,{setLoading:n}=$i(),i=dt("useToastConfig"),r=ro(i),{defaultProps:o,locale:s}=Zt("ButtonDownload"),a=X(()=>zi(e,o)),l=dt("preset",{}).buttondownload,u=re({}),c=X(()=>Object.entries(u.value).map(([v])=>v)),d=async v=>{const S=await v();if(S instanceof Error)throw S;return(S==null?void 0:S.data)??{data:[],totalRecords:0}},f=()=>{const{fileName:v,tableName:S,multiTableNames:b,dataConfigs:k}=a.value;if(k!=null&&k.length&&h(k),b!=null&&b.length)Ye.on("button-download:multi-tables",m),b.forEach(A=>{const w={fileName:v,tableName:A,multiTableNames:b};Ye.emit("data-table:download",w)});else{const A={fileName:v,tableName:S,additionalTexts:e.additionalTextBelowTable};Ye.emit("data-table:download",A)}},p=()=>e.fileName.trim().replace(/[^a-zA-Z0-9\s]/g,"-").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/-+$/,""),h=async v=>{var S,b;try{const k=await Promise.all(v.map(async A=>{const{columns:w,data:y,fetchFunction:C,tableTitle:I}=A,M=w.filter(ie=>ie.visible!==!1).filter(ie=>!ie.excluded),D=M.map(ie=>ie.header??ie.exportHeader??"-");n(!0,s.downloadingMessage);const{data:$}=C?await d(C):{data:y};return{data:uv($,M,s),headers:D,tableTitle:I}}));await df({tables:k,additionalTexts:e.additionalTextBelowTable,fileName:p()})}catch(k){console.error("🚀 ~ handleTableConfig error:",k),r.removeAllGroups(),r.add({message:((b=(S=a.value)==null?void 0:S.excelToastErrorMessage)==null?void 0:b.replace("{fileName}",e.fileName))??"Data gagal diunduh.",error:k,group:"download"})}finally{n(!1)}},m=async({table:v})=>{var S;try{const{tableName:b}=v;if(!b||(c.value.includes(b)||(u.value[b]=v),c.value.length!==((S=e.multiTableNames)==null?void 0:S.length)))return;Ye.off("button-download:multi-tables",m);const k=[];e.multiTableNames.forEach(A=>{k.push(u.value[A])}),await df({tables:k,additionalTexts:e.additionalTextBelowTable,fileName:p()})}catch(b){console.error(b)}};return(v,S)=>(g(),O("button",T({onClick:f},x(l).root({props:e}),{type:"button"}),[L(Ee,T(x(l).icon,{icon:"download",info:"Download","tooltip-pos":"bottom"}),null,16),v.label?(g(),O("span",jx,_(v.label),1)):B("",!0)],16))}})),dp=ce("ButtonFilter",Ae({__name:"ButtonFilter",props:{tableName:{default:"datatable"}},emits:["showFilter"],setup(t,{emit:e}){const n=dt("preset",{}).buttonfilter,i=t,r=e,o=oe(!1),s=()=>{o.value=!o.value,r("showFilter",o.value),Ye.emit("show-filter",{tableName:i.tableName,show:o.value})};return(a,l)=>{var u,c;return g(),O("button",T({onClick:s},(u=x(n))==null?void 0:u.root({context:{active:o.value}}),{type:"button"}),[L(Ee,T((c=x(n))==null?void 0:c.icon({context:{active:o.value}}),{icon:o.value?"filter-fill":"filter",info:"Filter","tooltip-pos":"bottom"}),null,16,["icon"])],16)}}})),Ux=(t,e)=>{const{attrs:n,slots:i}=e||{};return t.label?Ji("label",n,i.default()):i.default()},Kx=["id","aria-invalid","checked","disabled","name","readonly","tabindex","value"],Wx=ce("ButtonRadio",Ae({inheritAttrs:!1,__name:"ButtonRadio",props:{label:{},value:{},modelValue:{},name:{},binary:{type:Boolean,default:!1},invalid:{type:Boolean},disabled:{type:Boolean},variant:{},readonly:{type:Boolean},tabindex:{},inputId:{},inputStyle:{type:[Boolean,null,String,Object,Array]},inputClass:{},tooltip:{},tooltipPos:{default:"top"}},emits:["update:modelValue","change","focus","blur"],setup(t,{emit:e}){const n=t,i=e,r=dt("preset",{}).buttonradio,o=X(()=>n.modelValue!=null&&(n.binary?s():ey(n.modelValue,n.value))),s=()=>{const{modelValue:d,value:f}=n;return typeof d!="boolean"?!!d:typeof f=="boolean"?d===f:typeof f=="number"?!!d==!!f:typeof f=="string"?(d==null?void 0:d.toString())===f:!1},a=d=>{if(typeof d=="boolean")return d;if(typeof d=="number")return!!d;if(typeof d=="string")return d.toLowerCase()==="true"},l=d=>{if(!n.disabled&&!n.readonly){const f=n.binary?a(n.value):n.value;i("update:modelValue",f),i("change",d)}},u=d=>{i("focus",d)},c=d=>{i("blur",d)};return(d,f)=>(g(),P(x(Ux),T(x(r).label,{label:d.label}),{default:H(()=>[E("span",it(kt(x(r).root({props:n,state:{checked:o.value}}))),[E("input",{id:d.inputId,"aria-invalid":d.invalid||void 0,checked:o.value,class:pe([x(r).input({props:n}).class,d.inputClass]),disabled:d.disabled,name:d.name,readonly:d.readonly,style:Yi(d.inputStyle),tabindex:d.tabindex,value:d.value,onBlur:c,onChange:l,onFocus:u,type:"radio"},null,46,Kx),E("span",it(kt(x(r).box({props:n,state:{checked:o.value}}))),[E("span",it(kt(x(r).icon)),null,16)],16)],16),Q(d.$slots,"label",{},()=>[d.label?(g(),O("span",T({key:0,"data-wv-section":"labeltext"},x(r).labeltext),_(d.label),17)):B("",!0)]),d.tooltip?(g(),P(Ee,T({key:0,info:d.tooltip,"tooltip-pos":d.tooltipPos},x(r).tooltipicon,{"data-wv-section":"tooltipicon",icon:"info"}),null,16,["info","tooltip-pos"])):B("",!0)]),_:3},16,["label"]))}}));let qu;const qx=new Uint8Array(16);function Xx(){if(!qu&&(qu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!qu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return qu(qx)}const Gn=[];for(let t=0;t<256;++t)Gn.push((t+256).toString(16).slice(1));function Gx(t,e=0){return Gn[t[e+0]]+Gn[t[e+1]]+Gn[t[e+2]]+Gn[t[e+3]]+"-"+Gn[t[e+4]]+Gn[t[e+5]]+"-"+Gn[t[e+6]]+Gn[t[e+7]]+"-"+Gn[t[e+8]]+Gn[t[e+9]]+"-"+Gn[t[e+10]]+Gn[t[e+11]]+Gn[t[e+12]]+Gn[t[e+13]]+Gn[t[e+14]]+Gn[t[e+15]]}const ib={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function fp(t,e,n){if(ib.randomUUID&&!t)return ib.randomUUID();t=t||{};const i=t.random||(t.rng||Xx)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Gx(i)}const rb=t=>{if(t instanceof Yg)return t.response?"DEVICE_NOT_CONNECTED":"DRIVER_NOT_FOUND";if(t instanceof Error&&["NOT_SUPPORTED_SYSTEM","HARDWARE_NOT_SYNCHRONIZED"].includes(t.message))return t.message},ob=`(function(){"use strict";let n=null,t=null,a;self.onmessage=s=>{const e=s.data;switch(e.command){case"sync":u(e);break;case"connect":l(e);break;case"scan":m(e);break;case"stopscan":d(e);break}};const r=s=>{let e="established";n&&n.readyState===WebSocket.OPEN?(e="reused",s.onopen(n,e),i(s.timeout)):n=new WebSocket("wss://dev-api.tagsamurai.com/rfid-reader-go/"),n.onopen=()=>{e="established",n&&s.onopen(n,e),i(s.timeout)},n.onmessage=o=>{s.onmessage(o),i(s.timeout)},n.onerror=o=>{console.error("🚀 ~ Scanner Worker: openConnection ~ error:",o),s.onerror(o),n==null||n.close(),n=null,t&&clearTimeout(t)}},p=()=>{d({userId:a}),a=void 0,n&&n.close(),n=null,t&&clearTimeout(t),console.info("Socket connection has been closed!")},i=(s=0)=>{s&&(t&&clearTimeout(t),t=setTimeout(p,s))},u=({userId:s})=>{a=s,r({onopen:e=>{e.send(JSON.stringify({data:{command:"connect",userId:s,source:"app"},event:"reader"}))},onmessage:e=>{postMessage({status:"synced",...JSON.parse(e.data)})},onerror:e=>{postMessage({status:"sync_error",error:e})}})},l=({userId:s})=>{a=s,r({onopen:(e,o)=>{o==="established"?e.send(JSON.stringify({data:{command:"connect",userId:s,source:"app"},event:"reader"})):postMessage({status:"connection_reused"})},onmessage:e=>{postMessage({status:"connection_established",...JSON.parse(e.data)})},onerror:e=>{postMessage({status:"error_connecting",error:e})}})},m=({scanCommand:s,userId:e,serialNumber:o,jenisDevice:g})=>{a=e,r({onopen:c=>{c.send(JSON.stringify({data:{command:s,userId:e,source:"app",serialNumber:o,jenisDevice:g},event:"reader"})),postMessage({status:"scan_started"})},onmessage:c=>{postMessage({status:"scanned",...JSON.parse(c.data)})},onerror:c=>{postMessage({status:"scan_error",error:c})}})},d=({userId:s})=>{n&&n.readyState===WebSocket.OPEN&&(n.send(JSON.stringify({data:{command:"stopscan",userId:s,source:"app"},event:"reader"})),postMessage({status:"scan_stopped"}),console.info("Scan Process Stopped!"))}})();
|
|
170
|
+
`,sb=typeof self<"u"&&self.Blob&&new Blob([ob],{type:"text/javascript;charset=utf-8"});function ab(t){let e;try{if(e=sb&&(self.URL||self.webkitURL).createObjectURL(sb),!e)throw"";const n=new Worker(e,{name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ob),{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}const lb=()=>window.devices??[],Zx=()=>window.device??{RFID:null,QR:null},ub=re(lb()),cb=re(Zx()),db=()=>{const t=i=>{window.devices=i,n()},e=i=>{window.device=i,cb.value=i},n=()=>{ub.value=lb()};return{devices:ub,device:cb,saveDevices:t,setDevice:e,loadDevices:n}},or=ce("DialogConfirm",Ae({__name:"DialogConfirm",props:{header:{},severity:{},confirmButtonSeverity:{},visible:{type:Boolean},closeAfterConfirm:{type:Boolean,default:!0},closeLabel:{default:void 0},actionable:{type:Boolean,default:!0},confirmLabel:{},disableConfirmButton:{type:Boolean,default:!1},headerIcon:{},list:{default:void 0},listLabel:{default:void 0},message:{},showIcon:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},contentClass:{}},emits:["close","confirm","hide","update:visible"],setup(t,{emit:e}){const n=dt("preset",{}).dialog,i=dt("preset",{}).dialogconfirm,r=t,o=e,{locale:s}=Zt("DialogConfirm"),a=re(),l=X(()=>r.closeLabel?r.closeLabel:r.actionable?s.actionableCloseButtonLabel:s.nonActionableCloseButtonLabel),u=()=>{o("update:visible",!1),o("close")},c=()=>{o("confirm"),r.closeAfterConfirm&&o("update:visible",!1)};return(d,f)=>{var h,m,v,S,b,k,A,w,y,C,I,R,M;const p=on("focus");return g(),P(x(Ya),{ref_key:"dialogConfirm",ref:a,closable:!1,draggable:!1,header:d.header,pt:{root:{class:[...(h=x(n))==null?void 0:h.root({state:{}}).class,...(m=x(i))==null?void 0:m.root.class],"data-wv-section":(v=x(i))==null?void 0:v.root["data-wv-section"](d.$attrs["data-wv-section"]),"data-wv-name":(S=x(i))==null?void 0:S.root["data-wv-name"](d.$attrs["data-wv-name"])},header:{...(b=x(i))==null?void 0:b.header,class:[...(k=x(n))==null?void 0:k.header.class,(A=x(i))==null?void 0:A.header.class]},content:{...(w=x(i))==null?void 0:w.content,class:[...(y=x(n))==null?void 0:y.content({state:{},instance:{}}).class,(C=x(i))==null?void 0:C.content.class,r.contentClass]},footer:{...(I=x(i))==null?void 0:I.footer,class:[...(R=x(n))==null?void 0:R.footer.class,(M=x(i))==null?void 0:M.footer.class]}},visible:r.visible,onHide:f[0]||(f[0]=D=>o("hide")),"onUpdate:visible":f[1]||(f[1]=D=>o("update:visible",!!D)),"close-on-escape":"",modal:""},{header:H(()=>{var D,$;return[d.showIcon?(g(),P(Ee,T({key:0},(D=x(i))==null?void 0:D.headericon({props:r}),{severity:d.severity,"aria-label":"Header Icon"}),null,16,["severity"])):B("",!0),E("h3",it(kt(($=x(i))==null?void 0:$.headertitle(d.severity))),_(d.header),17)]}),default:H(()=>{var D;return[d.list?(g(),O("ul",it(T({key:0},(D=x(i))==null?void 0:D.list)),[(g(!0),O(ue,null,Je(d.list,($,W)=>(g(),O("li",{key:W},_(d.listLabel&&typeof $!="string"?x(zn)($,d.listLabel):$),1))),128))],16)):B("",!0),Q(d.$slots,"body",{items:d.list},()=>{var $;return[E("p",it(kt(($=x(i))==null?void 0:$.bodymessage)),_(d.message??x(s).defaultConfirmMessage),17)]})]}),footer:H(()=>[Q(d.$slots,"footer",{},()=>{var D,$;return[d.showCloseButton?(g(),P(We,T({key:0},(D=x(i))==null?void 0:D.cancelbutton,{label:l.value,onClick:u,severity:"secondary",text:""}),null,16,["label"])):B("",!0),d.actionable?ft((g(),P(We,T({key:1},($=x(i))==null?void 0:$.confirmbutton,{disabled:d.disableConfirmButton,label:d.confirmLabel??x(s).defaultConfirmLabel,severity:d.confirmButtonSeverity??d.severity,onClick:c}),null,16,["disabled","label","severity"])),[[p]]):B("",!0)]})]),_:3},8,["header","pt","visible"])}}}));var _x={root:"p-inputgroup-addon"},Jx=Wt.extend({name:"inputgroupaddon",classes:_x}),Yx={name:"BaseInputGroupAddon",extends:It,style:Jx,provide:function(){return{$parentInstance:this}}},Yo={name:"InputGroupAddon",extends:Yx,inheritAttrs:!1};function Qx(t,e,n,i,r,o){return g(),O("div",T({class:t.cx("root")},t.ptmi("root")),[Q(t.$slots,"default")],16)}Yo.render=Qx;const pi=Ae({__name:"FieldWrapper",props:{label:{},mandatory:{type:Boolean},showOptionalText:{type:Boolean,default:void 0},showAsterisk:{type:Boolean,default:void 0},info:{},labelClass:{},tooltipPos:{}},emits:["infoClick"],setup(t){const e=t,n=wa(),{defaultProps:i,locale:r}=Zt("FieldWrapper"),o=X(()=>zi(e,i));return(s,a)=>s.$attrs["use-field-wrapper"]!=!1?(g(),O("div",it(T({key:0},s.$preset.fieldwrapper.root)),[s.label||n["label-addon"]?(g(),O("label",it(T({key:0},s.$preset.fieldwrapper.label({props:e,slots:n}))),[s.label?(g(),O(ue,{key:0},[ht(_(s.label)+" ",1),s.mandatory&&o.value.showAsterisk?(g(),O("span",it(T({key:0},s.$preset.fieldwrapper.arterisksign)),_(x(r).labelRequired),17)):B("",!0),s.info?(g(),P(Ee,T({key:1,info:s.info,"tooltip-pos":o.value.tooltipPos,onClick:a[0]||(a[0]=l=>s.$emit("infoClick"))},s.$preset.fieldwrapper.info,{icon:"info"}),null,16,["info","tooltip-pos"])):B("",!0),s.mandatory==!1&&o.value.showOptionalText?(g(),O("span",it(T({key:2},s.$preset.fieldwrapper.optionaltext)),_(x(r).labelOptional),17)):B("",!0)],64)):B("",!0),Q(s.$slots,"label-addon")],16)):B("",!0),Q(s.$slots,"default")],16)):Q(s.$slots,"default",{key:1})}});var eM={root:"p-inputgroup"},tM=Wt.extend({name:"inputgroup",classes:eM}),nM={name:"BaseInputGroup",extends:It,style:tM,provide:function(){return{$parentInstance:this}}},fb={name:"InputGroup",extends:nM,inheritAttrs:!1};function iM(t,e,n,i,r,o){return g(),O("div",T({class:t.cx("root")},t.ptmi("root")),[Q(t.$slots,"default")],16)}fb.render=iM;const fo=Ae({__name:"InputGroup",props:{pt:{},ptOptions:{},ring:{},unstyled:{type:Boolean},invalid:{type:Boolean},disabled:{type:Boolean}},setup(t){const e=dt("preset",{}).inputgroup,n=i=>{const r=i.target;if(r){const o=r.querySelector("input");o==null||o.focus()}};return(i,r)=>i.$attrs["use-input-group"]!=!1?(g(),P(x(fb),T({key:0},x(e).root({props:{...i.$props,class:i.$attrs.class}}),{onClick:n}),{default:H(()=>[Q(i.$slots,"default")]),_:3},16)):Q(i.$slots,"default",{key:1})}}),Fn=ce("ValidatorMessage",Ae({__name:"ValidatorMessage",props:{message:{}},setup(t){const e=dt("preset",{}).validatormessage;return(n,i)=>{var r;return ft((g(),O("small",T((r=x(e))==null?void 0:r.root,{role:"alert"}),_(n.message),17)),[[Xn,n.message]])}}})),rl=ce("Dropdown",Ae({__name:"Dropdown",props:{modelValue:{type:[String,Number,Boolean,Object],default:void 0},initialValue:{type:[String,Number,Boolean,Object],default:void 0},label:{},options:{},allowNullOption:{type:Boolean,default:void 0},optionLabel:{},optionValue:{},valueType:{default:"plain"},badgeValueProps:{},inputBorder:{},dataKey:{},useValidator:{type:Boolean},mandatory:{type:Boolean},showOptionalText:{type:Boolean,default:void 0},validatorMessage:{},formatValidatorMessage:{type:Boolean,default:!0},invalid:{type:Boolean},fieldName:{},placeholder:{},loading:{type:Boolean},fieldInfo:{},disabled:{type:Boolean},filter:{type:Boolean,default:!0},filterPlaceholder:{},panelMaxContent:{type:Boolean,default:!1}},emits:["update:modelValue","show","fieldInfoClick"],setup(t,{expose:e,emit:n}){const i=t,r=n;wt(()=>{S()});const{locale:o,defaultProps:s}=Zt("Dropdown"),a=X(()=>zi(i,s)),l=dt("preset",{}).dropdown,u=dt("preset",{}).inputgroupaddon,c=re(),d=oe(!1),f=X(()=>i.invalid||!!p.errorMessage),p=hn({value:i.initialValue!==void 0?i.initialValue:i.modelValue}),h=X(()=>{var y;return o.emptySelectionErrorMessage.replace("{label}",i.label).replace("{formattedLabel}",(y=ep(i.label))==null?void 0:y.toLowerCase())}),m=X(()=>eb(i.options)),v=X(()=>{var y;return i.loading?o.loadingPlaceholder:i.placeholder??((y=o.inputPlaceholder)==null?void 0:y.replace("{label}",i.label??"").replace("{lowercaseLabel}",(i.label??"").toLowerCase()))}),S=()=>{i.useValidator&&(Object.assign(p,Nn(i.fieldName??"dropdown",y=>!(y!=null&&y!=="")&&i.mandatory?typeof i.validatorMessage=="object"&&"empty"in i.validatorMessage?i.validatorMessage.empty:i.validatorMessage??h.value:Et(b))),i.initialValue!==void 0&&(p.value=i.initialValue),i.invalid&&p.validate())},b=()=>i.validatorMessage&&i.invalid?i.validatorMessage:!0,k=y=>{const{value:C}=y;r("update:modelValue",C)},A=()=>{if(i.optionValue){const y=m.value.find(C=>{if(typeof C!="string")return i.dataKey?p.value[i.dataKey]===C[i.optionValue??""][i.dataKey]:ey(io(C[i.optionValue??""]),io(p.value))});if(y&&typeof y!="string")return y[i.optionLabel??""]}else if(p.value&&typeof p.value=="object"&&i.optionLabel&&i.optionLabel in p.value)return p.value[i.optionLabel];return p.value},w=()=>{c.value&&c.value.show()};return $e(()=>i.initialValue,y=>{p.value=y},{once:!0}),$e(()=>i.modelValue,y=>{p.value=y}),e({showOverlay:w}),(y,C)=>(g(),P(pi,{info:y.fieldInfo,label:i.label,mandatory:i.mandatory,"show-optional-text":y.showOptionalText,onInfoClick:C[3]||(C[3]=I=>y.$emit("fieldInfoClick"))},{default:H(()=>[L(fo,{class:pe([{"grid grid-cols-[max-content,1fr,max-content]":y.$slots["addon-left"]&&y.$slots["addon-right"],"grid grid-cols-[1fr,max-content]":!y.$slots["addon-left"]&&y.$slots["addon-right"],"grid grid-cols-[max-content,1fr]":y.$slots["addon-left"]&&!y.$slots["addon-right"]}]),disabled:i.disabled,invalid:f.value,ring:y.inputBorder},{default:H(()=>{var I,R,M,D,$;return[y.$slots["addon-left"]?(g(),P(x(Yo),{key:0,disabled:i.disabled},{default:H(()=>[Q(y.$slots,"addon-left")]),_:3},8,["disabled"])):B("",!0),L(x(Vr),T({ref_key:"dropdown",ref:c},i,{modelValue:p.value,"onUpdate:modelValue":C[0]||(C[0]=W=>p.value=W),"aria-describedby":i.label+"error","filter-placeholder":i.filterPlaceholder||x(o).filterPlaceholder,invalid:f.value,options:m.value,placeholder:v.value,pt:{list:(I=x(l))==null?void 0:I.list({props:i}),panel:(R=x(l))==null?void 0:R.panel({props:i}),virtualScroller:(M=x(l))==null?void 0:M.virtualScroller({props:i}),wrapper:(D=x(l))==null?void 0:D.wrapper({props:i})},"virtual-scroller-options":(($=m.value)==null?void 0:$.length)>10?{itemSize:32}:void 0,onChange:k,onHide:C[1]||(C[1]=W=>d.value=!1),onShow:C[2]||(C[2]=W=>(y.$emit("show"),d.value=!0))}),In({dropdownicon:H(()=>[L(Ee,it(kt(x(l).dropdownicon({state:{isShowOverlay:d.value}}))),null,16)]),loadingicon:H(()=>[L(Ee,it(kt(x(l).loadingicon)),null,16)]),filtericon:H(()=>[L(Ee,it(kt(x(l).filtericon)),null,16)]),_:2},[y.loading?{name:"value",fn:H(({placeholder:W})=>[E("span",it(kt(x(l).loadingplaceholder)),_(W),17)]),key:"0"}:{name:"value",fn:H(W=>[(a.value.allowNullOption?W.value!==void 0:W.value!=null)?Q(y.$slots,"value",{key:0,originalValue:W.value,value:A()},()=>[y.valueType==="badge"?(g(),P(Pt,T({key:0},y.badgeValueProps,{label:A()}),null,16,["label"])):(g(),O(ue,{key:1},[ht(_(A()),1)],64))]):(g(),O(ue,{key:1},[ht(_(W.placeholder),1)],64))]),key:"1"},y.$slots.option?{name:"option",fn:H(({option:W})=>[Q(y.$slots,"option",{option:W})]),key:"2"}:void 0]),1040,["modelValue","aria-describedby","filter-placeholder","invalid","options","placeholder","pt","virtual-scroller-options"]),y.$slots["addon-right"]?(g(),P(x(Yo),{key:1,pt:{root:x(u).root({props:{class:[{"!text-general-200":i.disabled}]}})}},{default:H(()=>[Q(y.$slots,"addon-right")]),_:3},8,["pt"])):B("",!0)]}),_:3},8,["class","disabled","invalid","ring"]),L(Fn,{id:i.label+"error",message:p.errorMessage},null,8,["id","message"])]),_:3},8,["info","label","mandatory","show-optional-text"]))}})),rM={class:"flex items-center gap-3 w-full"},oM={class:"flex items-center w-full justify-between","data-wv-section":"content"},sM={key:0,class:"font-bold","data-wv-section":"title"},aM={"data-wv-section":"message"},lM={key:0,class:"flex flex-col gap-3 overflow-auto max-h-[71px]","data-wv-section":"list"},uM=ce("InlineMessage",Ae({__name:"InlineMessage",props:{severity:{default:"secondary"},title:{},message:{},lists:{},showIcon:{type:Boolean,default:!0},removable:{type:Boolean,default:!0},messageWrapperClass:{},loading:{type:Boolean,default:!1}},emits:["close"],setup(t){const e=t,n=re(!0),i=X(()=>{if(e.loading)return"spinner";switch(e.severity){case"success":return"checkbox-circle";case"danger":return"close-circle";default:return"info"}});return(r,o)=>n.value?(g(),O("div",T({key:0},r.$preset.inlinemessage.root({props:e}),{"aria-atomic":"true","aria-live":"assertive",role:"alert"}),[E("div",rM,[r.showIcon?(g(),P(Ee,T({key:0},r.$preset.inlinemessage.icon({props:e}),{icon:i.value,severity:e.severity}),null,16,["icon","severity"])):B("",!0),E("div",oM,[E("section",{class:pe(["flex flex-col font-medium",...x(N1)(e.messageWrapperClass)]),"data-wv-section":"messagewrapper"},[r.title?(g(),O("span",sM,_(e.title),1)):B("",!0),E("span",aM,_(e.loading?`${e.message}...`:e.message),1)],2),r.removable?(g(),P(We,{key:0,severity:e.severity,onClick:o[0]||(o[0]=()=>{r.$emit("close"),n.value=!1}),class:"[&_i]:w-6 [&_i]:h-6","data-wv-section":"close",icon:"close",rounded:"",text:""},null,8,["severity"])):B("",!0)])]),e.lists?(g(),O("div",lM,[(g(!0),O(ue,null,Je(e.lists,(s,a)=>(g(),O("div",{key:a,class:"flex items-center gap-2","data-wv-section":"item"},[L(Ee,{severity:e.severity,class:"w-4 h-4 !cursor-auto",icon:"arrow-right-fill"},null,8,["severity"]),E("span",null,_(s),1)]))),128))])):B("",!0)],16)):B("",!0)}})),pb=Ae({__name:"HardwareSync",props:{visible:{type:Boolean},errorCode:{},searchBy:{},bulk:{type:Boolean},withoutScanBtn:{type:Boolean}},emits:["update:visible","scan"],setup(t,{emit:e}){const n=t,i=e,r=ro();wt(()=>{W()});const{device:o,devices:s,saveDevices:a,setDevice:l,loadDevices:u}=db(),c={label:"None",device:void 0},d=oe(!1),f=oe(c),p=oe(c),h=me=>{var se,Pe;if((se=s.value)!=null&&se.length){const Be=(Pe=s.value)==null?void 0:Pe.filter(xe=>xe[me]).map(xe=>({label:`${xe.name??xe.jenisDevice+" - "+xe.serialNumber}`,device:xe}));return Be.length?Be:[]}return f.value=c,p.value=c,[]},m=X(()=>h("rfidScan")),v=X(()=>h("qrScan")),S=X(()=>n.errorCode==="NOT_SUPPORTED_SYSTEM"),b=X(()=>n.searchBy==="RFID"&&f.value.device),k=X(()=>n.searchBy==="QR"&&p.value.device),A=X(()=>!!n.searchBy&&n.errorCode!=="HARDWARE_NOT_SYNCHRONIZED"),w=async me=>{try{a(me);const se=m.value.some(Be=>{var xe,de,ge;return((xe=Be==null?void 0:Be.device)==null?void 0:xe.serialNumber)===((ge=(de=f.value)==null?void 0:de.device)==null?void 0:ge.serialNumber)}),Pe=v.value.some(Be=>{var xe,de,ge;return((xe=Be==null?void 0:Be.device)==null?void 0:xe.serialNumber)===((ge=(de=p.value)==null?void 0:de.device)==null?void 0:ge.serialNumber)});f.value=se?f.value:m.value[0]??c,p.value=Pe?p.value:v.value[0]??c,$()}catch(se){y.value=D(rb(se))}finally{d.value=!1}},y=re(),C=oe({title:"The detected OS is not compatible",detail:"Please check the OS compatibility list on our product information page."}),I=oe({title:"Scanner Disconnected",detail:"Your scanner has been disconnected. Please reconnect it or select another device from the list."}),R=oe({title:"Scanner driver not found",detail:"The scanner driver may not be running or installed correctly on your device. Please contact your administrator."}),M=oe({title:"Scanner not detected",detail:"The scanner is either not detected or not identified by our system."});oe({title:"Scanner is not registered",detail:"The scanner is not registered in your company."});const D=me=>{switch(me??n.errorCode){case"DEVICE_NOT_CONNECTED":return M.value;case"DRIVER_NOT_FOUND":return R.value;case"NOT_SUPPORTED_SYSTEM":return C.value;case"DEVICE_DISCONNECTED":return I.value;default:return}},$=()=>{l({RFID:f.value.device,QR:p.value.device})},W=()=>{u(),o.value.RFID?f.value={label:o.value.RFID.name,device:o.value.RFID}:m.value.length&&(f.value=m.value[0]??c),v.value.length&&(p.value=v.value[0]??c),$()},ie=()=>{i("update:visible",!1),i("scan")},ve=()=>{var me;d.value=!0,y.value=void 0,window.scannerWorker.onmessage=({data:se})=>{var Pe;if(se.status==="synced"){const Be=((Pe=se==null?void 0:se.data)==null?void 0:Pe.deviceList)??[];w(Be);const{error:xe}=(se==null?void 0:se.data)??{};xe==="Driver not connected to server"?(d.value=!1,y.value=D("DRIVER_NOT_FOUND")):Be.length||(d.value=!1,y.value=D("DEVICE_NOT_CONNECTED"))}else se.status==="error_sync"&&(d.value=!1,w([]),r.add({message:"Failed to connecting scanner",severity:"error"}))},window.scannerWorker.postMessage({command:"sync",userId:(me=JSON.parse(localStorage.getItem("user")??"{}"))==null?void 0:me._id})},ae=()=>{window.scannerWorker??(window.scannerWorker=new ab)};return $e(()=>n.visible,me=>{me&&(ae(),y.value=D(),W(),d.value=!1)}),(me,se)=>(g(),P(rr,{closable:!A.value,"header-class":[{"flex !gap-1 !items-center !justify-center !text-sm !font-bold !leading-[18px] tracking-[0.02em] [&>div]:hidden":A.value}],visible:me.visible,"onUpdate:visible":se[3]||(se[3]=Pe=>me.$emit("update:visible",Pe)),class:"w-[400px]","content-class":"!overflow-y-visible","footer-class":"!gap-1",header:"Hardware Synchronize",modal:""},In({footer:H(()=>[A.value?(g(),P(We,{key:0,onClick:se[2]||(se[2]=Pe=>me.$emit("update:visible",!1)),label:"Close",severity:"secondary",text:""})):B("",!0),S.value?B("",!0):(g(),O(ue,{key:1},[b.value&&!n.withoutScanBtn?(g(),P(We,{key:0,onClick:ie,icon:"rfid",label:"Scan RFID"})):B("",!0),k.value&&!n.withoutScanBtn?(g(),P(We,{key:1,onClick:ie,icon:"qr",label:"Scan QR"})):B("",!0)],64))]),default:H(()=>[y.value?(g(),P(uM,{key:0,class:pe(["p-[9.52px] transition"]),message:y.value.detail,removable:!1,"show-icon":!1,title:y.value.title,"message-wrapper-class":"text-[11px] leading-[14px] tracking-[0.02em]",severity:"danger"},null,8,["message","title"])):B("",!0),L(We,{disabled:S.value,loading:d.value,onClick:ve,icon:"refresh",label:"Sync","loading-icon":"refresh",outlined:""},null,8,["disabled","loading"]),E("section",{class:pe(["grid grid-cols-2 gap-3 justify-start w-full",{"opacity-60 pointer-events-none":S.value}]),"data-ts-section":"scanner-list"},[L(rl,{modelValue:f.value,"onUpdate:modelValue":[se[0]||(se[0]=Pe=>f.value=Pe),$],options:m.value,label:"RFID Scanner","option-label":"label"},null,8,["modelValue","options"]),L(rl,{modelValue:p.value,"onUpdate:modelValue":[se[1]||(se[1]=Pe=>p.value=Pe),$],options:v.value,label:"QR Scanner","option-label":"label"},null,8,["modelValue","options"])],2)]),_:2},[A.value?{name:"header",fn:H(()=>{var Pe;return[L(Ee,{icon:(Pe=me.searchBy)==null?void 0:Pe.toLowerCase()},null,8,["icon"]),E("h3",null,"Scan "+_(me.searchBy),1)]}),key:"0"}:void 0]),1032,["closable","header-class","visible"]))}});function ol(t){"@babel/helpers - typeof";return ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ol(t)}function Xu(t,e,n){return e=cM(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cM(t){var e=dM(t,"string");return ol(e)=="symbol"?e:String(e)}function dM(t,e){if(ol(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(ol(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var fM={root:function(e){var n=e.position;return{position:"fixed",top:n==="top-right"||n==="top-left"||n==="top-center"?"20px":n==="center"?"50%":null,right:(n==="top-right"||n==="bottom-right")&&"20px",bottom:(n==="bottom-left"||n==="bottom-right"||n==="bottom-center")&&"20px",left:n==="top-left"||n==="bottom-left"?"20px":n==="center"||n==="top-center"||n==="bottom-center"?"50%":null}}},pM={root:function(e){var n=e.props,i=e.instance;return["p-toast p-component p-toast-"+n.position,{"p-ripple-disabled":i.$primevue.config.ripple===!1}]},container:function(e){var n=e.props;return["p-toast-message",{"p-toast-message-info":n.message.severity==="info"||n.message.severity===void 0,"p-toast-message-warn":n.message.severity==="warn","p-toast-message-error":n.message.severity==="error","p-toast-message-success":n.message.severity==="success","p-toast-message-secondary":n.message.severity==="secondary","p-toast-message-contrast":n.message.severity==="contrast"}]},content:"p-toast-message-content",icon:function(e){var n=e.props;return["p-toast-message-icon",Xu(Xu(Xu(Xu({},n.infoIcon,n.message.severity==="info"),n.warnIcon,n.message.severity==="warn"),n.errorIcon,n.message.severity==="error"),n.successIcon,n.message.severity==="success")]},text:"p-toast-message-text",summary:"p-toast-summary",detail:"p-toast-detail",closeButton:"p-toast-icon-close p-link",closeIcon:"p-toast-icon-close-icon"},hM=Wt.extend({name:"toast",classes:pM,inlineStyles:fM}),sl={name:"ExclamationTriangleIcon",extends:vn},mM=E("path",{d:"M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z",fill:"currentColor"},null,-1),gM=E("path",{d:"M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z",fill:"currentColor"},null,-1),vM=E("path",{d:"M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z",fill:"currentColor"},null,-1),yM=[mM,gM,vM];function bM(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),yM,16)}sl.render=bM;var al={name:"InfoCircleIcon",extends:vn},AM=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z",fill:"currentColor"},null,-1),wM=[AM];function SM(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),wM,16)}al.render=SM;var Fs={name:"TimesCircleIcon",extends:vn},CM=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z",fill:"currentColor"},null,-1),kM=[CM];function TM(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),kM,16)}Fs.render=TM;var OM={name:"BaseToast",extends:It,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},infoIcon:{type:String,default:void 0},warnIcon:{type:String,default:void 0},errorIcon:{type:String,default:void 0},successIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},style:hM,provide:function(){return{$parentInstance:this}}},hb={name:"ToastMessage",hostName:"Toast",extends:It,emits:["close"],closeTimeout:null,props:{message:{type:null,default:null},templates:{type:Object,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},mounted:function(){var e=this;this.message.life&&(this.closeTimeout=setTimeout(function(){e.close({message:e.message,type:"life-end"})},this.message.life))},beforeUnmount:function(){this.clearCloseTimeout()},methods:{close:function(e){this.$emit("close",e)},onCloseClick:function(){this.clearCloseTimeout(),this.close({message:this.message,type:"close"})},clearCloseTimeout:function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{iconComponent:function(){return{info:!this.infoIcon&&al,success:!this.successIcon&&co,warn:!this.warnIcon&&sl,error:!this.errorIcon&&Fs}[this.message.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{TimesIcon:fr,InfoCircleIcon:al,CheckIcon:co,ExclamationTriangleIcon:sl,TimesCircleIcon:Fs},directives:{ripple:fi}};function ll(t){"@babel/helpers - typeof";return ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ll(t)}function mb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function ul(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?mb(Object(n),!0).forEach(function(i){xM(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mb(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function xM(t,e,n){return e=MM(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function MM(t){var e=EM(t,"string");return ll(e)=="symbol"?e:String(e)}function EM(t,e){if(ll(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(ll(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var IM=["aria-label"];function PM(t,e,n,i,r,o){var s=on("ripple");return g(),O("div",T({class:[t.cx("container"),n.message.styleClass],role:"alert","aria-live":"assertive","aria-atomic":"true"},t.ptm("container")),[n.templates.container?(g(),P(yt(n.templates.container),{key:0,message:n.message,onClose:o.onCloseClick,closeCallback:o.onCloseClick},null,40,["message","onClose","closeCallback"])):(g(),O("div",T({key:1,class:[t.cx("content"),n.message.contentStyleClass]},t.ptm("content")),[n.templates.message?(g(),P(yt(n.templates.message),{key:1,message:n.message},null,8,["message"])):(g(),O(ue,{key:0},[(g(),P(yt(n.templates.icon?n.templates.icon:o.iconComponent&&o.iconComponent.name?o.iconComponent:"span"),T({class:t.cx("icon")},t.ptm("icon")),null,16,["class"])),E("div",T({class:t.cx("text")},t.ptm("text")),[E("span",T({class:t.cx("summary")},t.ptm("summary")),_(n.message.summary),17),E("div",T({class:t.cx("detail")},t.ptm("detail")),_(n.message.detail),17)],16)],64)),n.message.closable!==!1?(g(),O("div",it(T({key:2},t.ptm("buttonContainer"))),[ft((g(),O("button",T({class:t.cx("closeButton"),type:"button","aria-label":o.closeAriaLabel,onClick:e[0]||(e[0]=function(){return o.onCloseClick&&o.onCloseClick.apply(o,arguments)}),autofocus:""},ul(ul(ul({},n.closeButtonProps),t.ptm("button")),t.ptm("closeButton"))),[(g(),P(yt(n.templates.closeicon||"TimesIcon"),T({class:[t.cx("closeIcon"),n.closeIcon]},ul(ul({},t.ptm("buttonIcon")),t.ptm("closeIcon"))),null,16,["class"]))],16,IM)),[[s]])],16)):B("",!0)],16))],16)}hb.render=PM;function LM(t){return NM(t)||BM(t)||RM(t)||DM()}function DM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
171
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RM(t,e){if(t){if(typeof t=="string")return pp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pp(t,e)}}function BM(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function NM(t){if(Array.isArray(t))return pp(t)}function pp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var $M=0,gb={name:"Toast",extends:OM,inheritAttrs:!1,emits:["close","life-end"],data:function(){return{messages:[]}},styleElement:null,mounted:function(){Ni.on("add",this.onAdd),Ni.on("remove",this.onRemove),Ni.on("remove-group",this.onRemoveGroup),Ni.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount:function(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&dn.clear(this.$refs.container),Ni.off("add",this.onAdd),Ni.off("remove",this.onRemove),Ni.off("remove-group",this.onRemoveGroup),Ni.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add:function(e){e.id==null&&(e.id=$M++),this.messages=[].concat(LM(this.messages),[e])},remove:function(e){var n=this.messages.findIndex(function(i){return i.id===e.message.id});n!==-1&&(this.messages.splice(n,1),this.$emit(e.type,{message:e.message}))},onAdd:function(e){this.group==e.group&&this.add(e)},onRemove:function(e){this.remove({message:e,type:"close"})},onRemoveGroup:function(e){this.group===e&&(this.messages=[])},onRemoveAllGroups:function(){this.messages=[]},onEnter:function(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&dn.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave:function(){var e=this;this.$refs.container&&this.autoZIndex&&Ce.isEmpty(this.messages)&&setTimeout(function(){dn.clear(e.$refs.container)},200)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",G.setAttribute(this.styleElement,"nonce",(e=this.$primevue)===null||e===void 0||(e=e.config)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce),document.head.appendChild(this.styleElement);var n="";for(var i in this.breakpoints){var r="";for(var o in this.breakpoints[i])r+=o+":"+this.breakpoints[i][o]+"!important;";n+=`
|
|
172
|
+
@media screen and (max-width: `.concat(i,`) {
|
|
173
|
+
.p-toast[`).concat(this.attributeSelector,`] {
|
|
174
|
+
`).concat(r,`
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
`)}this.styleElement.innerHTML=n}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{attributeSelector:function(){return Vn()}},components:{ToastMessage:hb,Portal:$r}};function cl(t){"@babel/helpers - typeof";return cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cl(t)}function vb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function yb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vb(Object(n),!0).forEach(function(i){VM(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vb(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function VM(t,e,n){return e=zM(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zM(t){var e=FM(t,"string");return cl(e)=="symbol"?e:String(e)}function FM(t,e){if(cl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(cl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function HM(t,e,n,i,r,o){var s=et("ToastMessage"),a=et("Portal");return g(),P(a,null,{default:H(function(){return[E("div",T({ref:"container",class:t.cx("root"),style:t.sx("root",!0,{position:t.position})},t.ptmi("root")),[L(Vg,T({name:"p-toast-message",tag:"div",onEnter:o.onEnter,onLeave:o.onLeave},yb(yb({},t.ptm("message")),t.ptm("transition"))),{default:H(function(){return[(g(!0),O(ue,null,Je(r.messages,function(l){return g(),P(s,{key:l.id,message:l,templates:t.$slots,closeIcon:t.closeIcon,infoIcon:t.infoIcon,warnIcon:t.warnIcon,errorIcon:t.errorIcon,successIcon:t.successIcon,closeButtonProps:t.closeButtonProps,onClose:e[0]||(e[0]=function(u){return o.remove(u)}),pt:t.pt},null,8,["message","templates","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps","pt"])}),128))]}),_:1},16,["onEnter","onLeave"])],16)]}),_:1})}gb.render=HM;const Hs=ce("Toast",Ae({__name:"Toast",props:{group:{default:"default-toast"},position:{default:"bottom-right"},autoZIndex:{type:Boolean},baseZIndex:{default:9980},breakpoints:{},message:{},icon:{},pt:{},ptOptions:{},unstyled:{type:Boolean}},emits:["close","lifeEnd"],setup(t){const e=t;wt(()=>{Ye.on("toast:add",r)}),Wd(()=>{window.toastGroups&&window.toastGroups.includes(e.group)?i.value=!1:(window.toastGroups=[e.group,...window.toastGroups??[]],i.value=!0)}),Bi(()=>{var o;window.toastGroups=(o=window.toastGroups)==null?void 0:o.filter(s=>s!==e.group),Ye.off("toast:add",r)});const n=oe(),i=oe(!1),r=o=>{o.group===e.group&&(n.value=o),o.error&&console.error(o.error)};return(o,s)=>i.value?(g(),P(x(gb),T({key:0},o.$props,{"data-group":o.$props.group,onClose:s[0]||(s[0]=a=>o.$emit("close",a)),onLifeEnd:s[1]||(s[1]=a=>o.$emit("lifeEnd",a))}),In({icon:H(()=>{var a,l,u;return[(a=n.value)!=null&&a.icon?(g(),P(Ee,{key:0,class:pe(["w-5 h-5 text-inherit",(l=n.value)==null?void 0:l.iconClass]),icon:(u=n.value)==null?void 0:u.icon},null,8,["class","icon"])):B("",!0)]}),_:2},[o.$slots.container?{name:"container",fn:H(({message:a,closeCallback:l})=>[Q(o.$slots,"container",{closeCallback:l,message:a})]),key:"0"}:void 0,o.$slots.message?{name:"message",fn:H(({message:a})=>[Q(o.$slots,"message",{message:a})]),key:"1"}:void 0]),1040,["data-group"])):B("",!0)}})),jM={class:"flex gap-2 items-center"},UM={class:"flex gap-0.5 items-center leading-4"},KM={class:"flex gap-5 items-center"},WM={key:1,class:"text-xs font-medium leading-[16.39px] tracking-[0.02em]"},Gu=ce("ButtonScan",Ae({__name:"ButtonScan",props:{label:{},icon:{},type:{default:"RFID"},autoSwitch:{type:Boolean},scanValidation:{},modelValue:{},bulk:{type:Boolean},id:{},disabled:{type:Boolean},powerbank:{type:Boolean},labelOnly:{type:Boolean},outlined:{type:Boolean},severity:{},size:{default:void 0},style:{},class:{},iconPos:{},iconClass:{},tooltip:{},tooltipPos:{},badge:{},badgeClass:{},badgeSeverity:{},loading:{type:Boolean},loadingIcon:{},link:{type:Boolean},raised:{type:Boolean},rounded:{type:Boolean},text:{type:Boolean},plain:{type:Boolean}},emits:["update:modelValue","connect","connected","scan","stop","error","beforeStartScan"],setup(t,{expose:e,emit:n}){const i=t,r=n;Bi(()=>{xe()});const o=ro(),{devices:s,device:a,saveDevices:l,setDevice:u}=db(),c=oe(!1),d=oe(!1),f=oe(!1),p=oe(!1),h=oe(!1),m=oe(!1),v=oe(),S=oe(0),b=oe(i.type??"RFID"),k=[],A=X(()=>b.value==="RFID"?"RFID_Scanning":"QR_Scanning"),w=X(()=>b.value==="RFID"?"RFID_Connecting":"QR_Connecting");X(()=>`The scanner could not identify the ${b.value} code. It may be damaged or improperly positioned. Please check the code and try again.`);const y=()=>{window.scannerWorker??(window.scannerWorker=new ab)},C=()=>{const{serialNumber:Oe=""}=a.value[b.value]??{};return Oe},I=async()=>{try{y(),await R(),c.value=!0}catch(Oe){console.error(Oe),c.value=!1}},R=async()=>{var Oe;try{if(!de())throw new Error("NOT_SUPPORTED_SYSTEM");if(r("connect"),!s.value.length||!a.value[b.value])throw new Error("HARDWARE_NOT_SYNCHRONIZED");o.add({customMessage:!0,message:b.value==="QR"?"Connecting QR Scanner...":"Connecting RFID Scanner...",severity:"info",life:0,group:w.value}),f.value=!0;const le=()=>{r("connected",a.value[b.value]),setTimeout(()=>{M()},0)};window.scannerWorker.onmessage=({data:Se})=>{var Z;if(Se.status==="connection_established")try{const{error:q}=(Se==null?void 0:Se.data)??{},U=((Z=Se==null?void 0:Se.data)==null?void 0:Z.deviceList)??[],J=a.value[i.type],ke=U.some(He=>He.serialNumber===(J==null?void 0:J.serialNumber));if(U.length&&ke)le();else{if(q==="Driver not connected to server")throw new Error("DRIVER_NOT_FOUND");if(!U.length)throw new Error("DEVICE_NOT_CONNECTED")}o.removeGroup(w.value)}catch(q){D(q)}else Se.status==="connection_reused"?le():Se.status==="error_connecting"&&(o.removeGroup(w.value),o.add({customMessage:!0,message:"Scanner connection failed",severity:"error"}))},window.scannerWorker.postMessage({command:"connect",userId:(Oe=JSON.parse(localStorage.getItem("user")??"{}"))==null?void 0:Oe._id})}catch(le){D(le)}},M=(Oe=!1,le=!1)=>{var Z;m.value=!1,o.removeGroup(w.value),localStorage.devmode||(window.addEventListener("blur",Be),window.addEventListener("beforeunload",Be));const Se=a.value[b.value];if(Se){let q="";i.bulk?q=`bulkscan-${b.value.toLowerCase()}`:q=`scan-${b.value.toLowerCase()}`,window.scannerWorker.onmessage=async({data:U})=>{var J;if(U.status==="scan_started")le||(S.value++,setTimeout(()=>{o.add({customMessage:!0,message:"scanning",severity:"info",life:0,group:A.value})},0));else if(U.status==="scanned"){const{code:ke,error:He,deviceList:j}=(U==null?void 0:U.data)??{};if(He)return $(He,j);if(ke){if(["scan-rfid","scan-qr"].includes(q)){h.value=!!i.scanValidation;const he=await((J=i.scanValidation)==null?void 0:J.call(i,b.value,ke,C()))??!0;if(h.value=!1,he)i.autoSwitch?(ae(),Pe()):me(!0);else{m.value||M(!1,!0);return}}if(!k.includes(ke)){try{Hg.postScanLog({tag:ke,serialNumber:C()})}catch(he){console.error(he)}r("update:modelValue",ke),r("scan",ke,C()),i.bulk&&k.push(ke)}}}else U.status==="scan_stopped"?me(!0):U.status==="scan_error"&&W(U.error)},window.scannerWorker.onerror=W,window.scannerWorker.postMessage({command:"scan",scanCommand:q,userId:(Z=JSON.parse(localStorage.getItem("user")??"{}"))==null?void 0:Z._id,source:"app",jenisDevice:Se.jenisDevice,serialNumber:Se.serialNumber,newConnection:Oe})}},D=Oe=>{u({RFID:void 0,QR:void 0}),p.value=!0,v.value=Oe instanceof Error?Oe.message:rb(Oe),f.value=!1,r("error",Oe),o.removeGroup(w.value)},$=(Oe,le=[])=>{let Se="";v.value=void 0,se(!0),Oe==="Time out"?Se="The scanning process has timed out. Please try again.":Oe==="Driver not connected to server"?v.value="DRIVER_NOT_FOUND":Oe==="Device disconnected"&&(v.value="DEVICE_DISCONNECTED",l(le),u({RFID:void 0,QR:void 0})),r("error",Oe),p.value=!!v.value,Se&&o.add({customMessage:!0,message:Se,error:Oe,life:6e3,group:A.value})},W=Oe=>{se(!0),r("error",Oe),o.add({customMessage:!0,message:"An unexpected error occurred during scanning. Please try again, and if the issue persists, contact your administrator for assistance.",error:Oe,life:6e3,group:A.value})},ie=()=>{window.Cypress?ve():I()},ve=()=>{o.add({customMessage:!0,message:"Connecting device...",severity:"info",life:3e3,group:w.value}),setTimeout(async()=>{var Oe;if(r("connect"),r("connected",{jenisDevice:"Handheld",serialNumber:fp(),API:"v2",rfidScan:!0,qrScan:!0,name:"Device Test"}),i.bulk)r("scan",fp(),"serialNumber");else{const le=fp();h.value=!!i.scanValidation;const Se=await((Oe=i.scanValidation)==null?void 0:Oe.call(i,b.value,le,C()))??!0;h.value=!1,Se&&(r("scan",le,"serialNumber"),me())}},100)},ae=()=>{o.removeGroup("RFID_Scanning"),o.removeGroup("QR_Scanning")},me=(Oe=!1)=>{ae(),f.value=!1,xe(),Oe&&r("stop"),k.splice(0)},se=(Oe=!1)=>{var le;window.scannerWorker.onmessage=null,window.scannerWorker.postMessage({command:"stopscan",userId:(le=JSON.parse(localStorage.getItem("user")??"{}"))==null?void 0:le._id}),me(Oe),m.value=!0,c.value=!1},Pe=()=>{i.bulk||(a.value[b.value]?(b.value=b.value==="QR"?"RFID":"QR",M()):(me(),p.value=!0,v.value="HARDWARE_NOT_SYNCHRONIZED",f.value=!1))},Be=Oe=>{d.value=!0,se(!0),Oe.preventDefault()},xe=()=>{window.removeEventListener("blur",Be),window.removeEventListener("beforeunload",Be)},de=()=>{const{userAgent:Oe}=navigator;return Oe.includes("Windows")},ge=X(()=>{if(!i.labelOnly)return i.icon?i.icon:i.autoSwitch?"qr-scan":b.value==="QR"?"qr":"rfid"}),Ie=X(()=>i.label?i.label:i.autoSwitch?"SCAN TAG":b.value==="QR"?"Scan QR":"Scan RFID");return e({onBeforeStartScan:ie,startScan:I,stopScan:se}),(Oe,le)=>(g(),O(ue,null,[L(We,T(Oe.$attrs,{class:[{"[&_i]:w-2 [&_i]:h-2":Oe.type==="QR","[&_i]:w-[11px] [&_i]:h-[7px]":Oe.type==="RFID"},"!px-1.5"],disabled:i.disabled,icon:ge.value,label:Ie.value,outlined:i.outlined,severity:i.severity,size:i.size,onClick:ie}),null,16,["class","disabled","icon","label","outlined","severity","size"]),L(pb,{visible:p.value,"onUpdate:visible":le[0]||(le[0]=Se=>p.value=Se),bulk:Oe.bulk,"error-code":v.value,"search-by":b.value,onScan:ie},null,8,["visible","bulk","error-code","search-by"]),c.value?(g(),P(Hs,{key:0,"base-z-index":9983,group:w.value,icon:"info"},null,8,["group"])):B("",!0),c.value?(g(),P(Hs,{key:1,"base-z-index":9997,class:"!absolute !bottom-[80px] !h-max",group:"scan-error-validation"})):B("",!0),c.value?(g(),P(Hs,{key:S.value,"base-z-index":9984,group:A.value,class:"[&_[data-pc-section=buttoncontainer]]"},{message:H(({message:Se})=>[E("div",{class:pe(Se.detail=="scanning"?"w-full -mr-8 z-10 flex gap-2 justify-between items-center text-general-800 text-xs font-normal":"w-full")},[Se.detail==="scanning"?(g(),O(ue,{key:0},[E("section",jM,[L(Ee,{class:"animate-spin text-base",icon:"loader-4"}),E("span",UM,[b.value==="RFID"?(g(),O(ue,{key:0},[L(Ee,{class:"text-base !w-4 !h-4",icon:"rfid"}),ht(" "+_(h.value?"Validating RFID...":"RFID Scanning..."),1)],64)):(g(),O(ue,{key:1},[L(Ee,{class:"text-sm",icon:"qr"}),ht(" "+_(h.value?"Validating QR...":"QR Scanning..."),1)],64))])]),E("section",KM,[le[4]||(le[4]=E("span",null,"do not leave this page",-1)),L(We,{onClick:le[1]||(le[1]=Z=>se(!0)),label:"Stop Scan",severity:"danger"})])],64)):(g(),O("span",WM,_(Se.detail),1))],2)]),_:1},8,["group"])):B("",!0),L(or,{visible:d.value,"onUpdate:visible":le[2]||(le[2]=Se=>d.value=Se),header:`${b.value} SCAN STOPPED`,onConfirm:le[3]||(le[3]=Se=>(d.value=!1,ie())),"confirm-label":"Continue",message:"The scan process was interrupted because you want to leave this window.",severity:"danger"},null,8,["visible","header"]),(g(),P(yu,{to:"body"},[f.value?(g(),O("div",{key:0,class:pe([Oe.$preset.dialog.mask({props:{modal:!0}}).class,"w-screen h-screen fixed top-0 left-0","!z-[9982]"]),"data-ts-section":"toast-mask"},null,2)):B("",!0)]))],64))}}));var qM={root:function(e){var n=e.instance;return["p-overlaypanel p-component",{"p-ripple-disabled":n.$primevue.config.ripple===!1}]},content:"p-overlaypanel-content",closeButton:"p-overlaypanel-close p-link",closeIcon:"p-overlaypanel-close-icon"},XM=Wt.extend({name:"overlaypanel",classes:qM}),GM={name:"BaseOverlayPanel",extends:It,props:{dismissable:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!1},appendTo:{type:[String,Object],default:"body"},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:void 0},closeOnEscape:{type:Boolean,default:!0}},style:XM,provide:function(){return{$parentInstance:this}}},hp={name:"OverlayPanel",extends:GM,inheritAttrs:!1,emits:["show","hide"],data:function(){return{visible:!1}},watch:{dismissable:{immediate:!0,handler:function(e){e?this.bindOutsideClickListener():this.unbindOutsideClickListener()}}},selfClick:!1,target:null,eventTarget:null,outsideClickListener:null,scrollHandler:null,resizeListener:null,container:null,styleElement:null,overlayEventListener:null,documentKeydownListener:null,beforeUnmount:function(){this.dismissable&&this.unbindOutsideClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.destroyStyle(),this.unbindResizeListener(),this.target=null,this.container&&this.autoZIndex&&dn.clear(this.container),this.overlayEventListener&&(uo.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null),this.container=null},mounted:function(){this.breakpoints&&this.createStyle()},methods:{toggle:function(e,n){this.visible?this.hide():this.show(e,n)},show:function(e,n){this.visible=!0,this.eventTarget=e.currentTarget,this.target=n||e.currentTarget},hide:function(){this.visible=!1},onContentClick:function(){this.selfClick=!0},onEnter:function(e){var n=this;this.container.setAttribute(this.attributeSelector,""),G.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.dismissable&&this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.autoZIndex&&dn.set("overlay",e,this.baseZIndex+this.$primevue.config.zIndex.overlay),this.overlayEventListener=function(i){n.container.contains(i.target)&&(n.selfClick=!0)},this.focus(),uo.on("overlay-click",this.overlayEventListener),this.$emit("show"),this.closeOnEscape&&this.bindDocumentKeyDownListener()},onLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.unbindDocumentKeyDownListener(),uo.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null,this.$emit("hide")},onAfterLeave:function(e){this.autoZIndex&&dn.clear(e)},alignOverlay:function(){G.absolutePosition(this.container,this.target,!1);var e=G.getOffset(this.container),n=G.getOffset(this.target),i=0;e.left<n.left&&(i=n.left-e.left),this.container.style.setProperty("--overlayArrowLeft","".concat(i,"px")),e.top<n.top&&(this.container.setAttribute("data-p-overlaypanel-flipped","true"),!this.isUnstyled&&G.addClass(this.container,"p-overlaypanel-flipped"))},onContentKeydown:function(e){e.code==="Escape"&&this.closeOnEscape&&(this.hide(),G.focus(this.target))},onButtonKeydown:function(e){switch(e.code){case"ArrowDown":case"ArrowUp":case"ArrowLeft":case"ArrowRight":e.preventDefault()}},focus:function(){var e=this.container.querySelector("[autofocus]");e&&e.focus()},onKeyDown:function(e){e.code==="Escape"&&this.closeOnEscape&&(this.visible=!1)},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},bindOutsideClickListener:function(){var e=this;!this.outsideClickListener&&G.isClient()&&(this.outsideClickListener=function(n){e.visible&&!e.selfClick&&!e.isTargetClicked(n)&&(e.visible=!1),e.selfClick=!1},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null,this.selfClick=!1)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new Ls(this.target,function(){e.visible&&(e.visible=!1)})),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.visible&&!G.isTouchDevice()&&(e.visible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isTargetClicked:function(e){return this.eventTarget&&(this.eventTarget===e.target||this.eventTarget.contains(e.target))},containerRef:function(e){this.container=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",G.setAttribute(this.styleElement,"nonce",(e=this.$primevue)===null||e===void 0||(e=e.config)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce),document.head.appendChild(this.styleElement);var n="";for(var i in this.breakpoints)n+=`
|
|
178
|
+
@media screen and (max-width: `.concat(i,`) {
|
|
179
|
+
.p-overlaypanel[`).concat(this.attributeSelector,`] {
|
|
180
|
+
width: `).concat(this.breakpoints[i],` !important;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
`);this.styleElement.innerHTML=n}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},onOverlayClick:function(e){uo.emit("overlay-click",{originalEvent:e,target:this.target})}},computed:{attributeSelector:function(){return Vn()},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{focustrap:rp,ripple:fi},components:{Portal:$r,TimesIcon:fr}},ZM=["aria-modal"],_M=["aria-label"];function JM(t,e,n,i,r,o){var s=et("Portal"),a=on("ripple"),l=on("focustrap");return g(),P(s,{appendTo:t.appendTo},{default:H(function(){return[L(Lr,T({name:"p-overlaypanel",onEnter:o.onEnter,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave},t.ptm("transition")),{default:H(function(){return[r.visible?ft((g(),O("div",T({key:0,ref:o.containerRef,role:"dialog","aria-modal":r.visible,onClick:e[5]||(e[5]=function(){return o.onOverlayClick&&o.onOverlayClick.apply(o,arguments)}),class:t.cx("root")},t.ptmi("root")),[t.$slots.container?Q(t.$slots,"container",{key:0,onClose:o.hide,onKeydown:function(c){return o.onButtonKeydown(c)},closeCallback:o.hide,keydownCallback:function(c){return o.onButtonKeydown(c)}}):(g(),O(ue,{key:1},[E("div",T({class:t.cx("content"),onClick:e[0]||(e[0]=function(){return o.onContentClick&&o.onContentClick.apply(o,arguments)}),onMousedown:e[1]||(e[1]=function(){return o.onContentClick&&o.onContentClick.apply(o,arguments)}),onKeydown:e[2]||(e[2]=function(){return o.onContentKeydown&&o.onContentKeydown.apply(o,arguments)})},t.ptm("content")),[Q(t.$slots,"default")],16),t.showCloseIcon?ft((g(),O("button",T({key:0,class:t.cx("closeButton"),"aria-label":o.closeAriaLabel,type:"button",autofocus:"",onClick:e[3]||(e[3]=function(){return o.hide&&o.hide.apply(o,arguments)}),onKeydown:e[4]||(e[4]=function(){return o.onButtonKeydown&&o.onButtonKeydown.apply(o,arguments)})},t.ptm("closeButton")),[Q(t.$slots,"closeicon",{},function(){return[(g(),P(yt(t.closeIcon?"span":"TimesIcon"),T({class:[t.cx("closeIcon"),t.closeIcon]},t.ptm("closeIcon")),null,16,["class"]))]})],16,_M)),[[a]]):B("",!0)],64))],16,ZM)),[[l]]):B("",!0)]}),_:3},16,["onEnter","onLeave","onAfterLeave"])]}),_:3},8,["appendTo"])}hp.render=JM;const Zu=ce("OverlayPanel",Ae({__name:"OverlayPanel",props:{dismissable:{type:Boolean,default:!0},dismissableOverlay:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!1},baseZIndex:{default:0},autoZIndex:{type:Boolean,default:!0},breakpoints:{},closeIcon:{},pt:{},ptOptions:{},unstyled:{type:Boolean,default:!1},closeOnEscape:{type:Boolean,default:!0}},setup(t,{expose:e}){const n=+new Date,i=re(),r=t,o=()=>{Ye.off("overlay:show",s)},s=d=>{i.value&&d.overlayId!==n&&r.dismissableOverlay&&i.value.hide()},a=async()=>{Ye.emit("overlay:show",{overlayId:n}),Ye.on("overlay:show",s)};return e({toggle:d=>{i.value.toggle(d)},hide:()=>{i.value.hide()},show:d=>{i.value.show(d)}}),(d,f)=>(g(),P(x(hp),T(d.$props,{id:n,ref_key:"op",ref:i,onHide:o,onShow:a}),{default:H(()=>[Q(d.$slots,"default")]),_:3},16))}})),YM={class:"hidden"},QM={class:"flex gap-1 justify-center p-2"},eE=ce("ButtonSearchByScan",Ae({__name:"ButtonSearchByScan",props:{label:{default:"Search by Scan"},icon:{},tableName:{default:"datatable"},bulk:{type:Boolean},scanValidation:{}},emits:["scan"],setup(t,{expose:e,emit:n}){const i=t,r=n,o=oe(""),s=re(),a=re(),l=re(),u=(f,p)=>{var h,m;f==="rfid"?(h=s.value)==null||h.onBeforeStartScan():(m=a.value)==null||m.onBeforeStartScan(),l.value.toggle(p)},c=(f,p)=>{r("scan",{type:f,code:p,device:o.value}),i.tableName&&Ye.emit("search-by-scan-table",{tableName:i.tableName,tag:p})};return e({stopScan:(f=!1)=>{var p,h;(p=s.value)==null||p.stopScan(f),(h=a.value)==null||h.stopScan(f)}}),(f,p)=>(g(),O(ue,null,[L(We,T(f.$attrs,{icon:i.icon??"qr-scan",label:f.label,onClick:p[0]||(p[0]=h=>{var m;return(m=l.value)==null?void 0:m.toggle(h)}),"data-ts-name":"buttonsearchbyscan"}),null,16,["icon","label"]),E("div",YM,[L(Gu,{ref_key:"rfidScanner",ref:s,bulk:f.bulk,"scan-validation":f.scanValidation,onConnected:p[1]||(p[1]=h=>o.value=(h==null?void 0:h.serialNumber)??""),onScan:p[2]||(p[2]=h=>c("RFID",h)),size:"small",type:"RFID"},null,8,["bulk","scan-validation"]),L(Gu,{ref_key:"qrScanner",ref:a,bulk:f.bulk,"scan-validation":f.scanValidation,onConnected:p[3]||(p[3]=h=>o.value=(h==null?void 0:h.serialNumber)??""),onScan:p[4]||(p[4]=h=>c("QR",h)),size:"small",type:"QR"},null,8,["bulk","scan-validation"])]),L(Zu,{ref_key:"scannerPanel",ref:l},{default:H(()=>[E("div",QM,[L(We,{class:pe(["[&_i]:w-[11px] [&_i]:h-[7px]","!px-1.5"]),onClick:p[5]||(p[5]=h=>u("rfid",h)),icon:"rfid",label:"Scan RFID"}),L(We,{class:pe(["[&_i]:w-2 [&_i]:h-2","!px-1.5"]),onClick:p[6]||(p[6]=h=>u("qr",h)),icon:"qr",label:"Scan QR"})])]),_:1},512)],64))}}));var tE={root:function(e){var n=e.instance,i=e.props;return["p-inputtext p-component",{"p-filled":n.filled,"p-inputtext-sm":i.size==="small","p-inputtext-lg":i.size==="large","p-invalid":i.invalid,"p-variant-filled":i.variant?i.variant==="filled":n.$primevue.config.inputStyle==="filled"}]}},nE=Wt.extend({name:"inputtext",classes:tE}),iE={name:"BaseInputText",extends:It,props:{modelValue:null,size:{type:String,default:null},invalid:{type:Boolean,default:!1},variant:{type:String,default:null}},style:nE,provide:function(){return{$parentInstance:this}}},Qo={name:"InputText",extends:iE,inheritAttrs:!1,emits:["update:modelValue"],methods:{getPTOptions:function(e){var n=e==="root"?this.ptmi:this.ptm;return n(e,{context:{filled:this.filled,disabled:this.$attrs.disabled||this.$attrs.disabled===""}})},onInput:function(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return this.modelValue!=null&&this.modelValue.toString().length>0}}},rE=["value","aria-invalid"];function oE(t,e,n,i,r,o){return g(),O("input",T({class:t.cx("root"),value:t.modelValue,"aria-invalid":t.invalid||void 0,onInput:e[0]||(e[0]=function(){return o.onInput&&o.onInput.apply(o,arguments)})},o.getPTOptions("root")),null,16,rE)}Qo.render=oE;const mp=ce("ButtonSearch",Ae({__name:"ButtonSearch",props:{tableName:{default:"datatable"}},emits:["search","collapsed"],setup(t){const e=dt("preset",{}).buttonsearch,{locale:n}=Zt("ButtonSearch"),i=oe(),r=re(),o=oe(!1),s=()=>{o.value=!0,a()},a=()=>{Et(()=>{r.value&&r.value.$el.focus()})},l=u=>{i.value=u.target.value||void 0};return(u,c)=>{var d,f,p,h,m,v,S,b,k;return o.value?(g(),O("form",T({key:1},(p=x(e))==null?void 0:p.form({context:{showSearchInput:o.value}}),{onSubmit:c[2]||(c[2]=Ot(()=>{x(Ye).emit("search-table",{tableName:u.tableName,search:i.value}),u.$emit("search",i.value)},["prevent"]))}),[E("button",T({onClick:c[0]||(c[0]=()=>{i.value=void 0,o.value=!1,u.$emit("collapsed"),x(Ye).emit("search-table",{tableName:u.tableName,search:void 0}),u.$emit("search",void 0)})},(h=x(e))==null?void 0:h.collapsebutton.root({context:{showSearchInput:o.value}}),{type:"button"}),[L(Ee,T((m=x(e))==null?void 0:m.collapsebutton.icon,{icon:"arrow-left"}),null,16)],16),L(x(Qo),T((v=x(e))==null?void 0:v.inputtext,{ref_key:"inputtext",ref:r,"model-value":i.value,placeholder:x(n).searchPlaceholder,onInput:l}),null,16,["model-value","placeholder"]),E("button",T({onClick:c[1]||(c[1]=A=>{i.value=void 0,a()})},(S=x(e))==null?void 0:S.resetbutton.root({query:i.value}),{type:"button"}),[L(Ee,T((b=x(e))==null?void 0:b.resetbutton.icon,{icon:"close"}),null,16)],16),E("button",T((k=x(e))==null?void 0:k.hiddensubmit,{type:"submit"}),null,16)],16)):(g(),O("button",T({key:0,onClick:s},(d=x(e))==null?void 0:d.buttontrigger.root({context:{showSearchInput:o.value}}),{type:"button"}),[L(Ee,T((f=x(e))==null?void 0:f.buttontrigger.icon,{icon:"search",info:"Search",severity:"secondary","tooltip-pos":"bottom"}),null,16)],16))}}})),sE=ce("Tree",Ae({__name:"Tree",props:{filter:{},type:{},fetchTree:{},params:{},selectedKeys:{default:void 0},selectedTreeNodes:{},selectionMode:{default:"checkbox"},useOption:{type:Boolean,default:!1},listLabelsNoOption:{},treeNodeMenus:{},autoSelectAll:{type:Boolean,default:!1},selectLastNode:{type:Boolean,default:!1},disableNodeAll:{type:Boolean,default:!1},includeNodeAllKey:{type:Boolean,default:!1},disableKeys:{},exactDisableKeys:{},readonly:{type:Boolean},selectDisposableOnly:{type:Boolean},flattenDisposableNode:{type:Boolean},excludedKeys:{},shouldEmitEventOnChange:{type:Boolean,default:!1},level:{},value:{},propagateSelection:{type:Boolean,default:!0},expandedKeys:{},selectionKeys:{},metaKeySelection:{type:Boolean},loading:{type:Boolean},showDisposableGroups:{type:Boolean},loadingIcon:{},loadingMode:{},filterText:{},filterBy:{},filterMode:{},filterPlaceholder:{},filterLocale:{},highlightOnSelect:{type:Boolean},scrollHeight:{},ariaLabel:{},ariaLabelledby:{},pt:{},ptOptions:{},unstyled:{type:Boolean},disableNodeWhen:{},exactDisableNodeWhen:{},nodeSelectedWhen:{}},emits:["update:selectedKeys","update:selectedTreeNodes","nodeSelect","nodeUnselect","toggleMenu"],setup(t,{expose:e,emit:n}){const i=t,r=wa(),{defaultProps:o}=Zt("Tree"),s=X(()=>zi(i,o)),a=n;wt(()=>{Ye.on("tree:update-tree-nodes",R),Pe(i.filter),M()}),Bi(()=>{Ye.off("tree:update-tree-nodes",R)});const l=re(!0),u=re(new Date().getTime().toString()),c=re(),d=re([]),f=re([]),p=re({}),h=re(!1),m=re({"-1":!0}),v=re(!1),S=X({get:()=>i.selectedKeys??{},set:de=>{a("update:selectedKeys",de)}}),b=oe({}),k=de=>{if(i.selectionMode==="checkbox"){const ge=(Ie,Oe)=>{Ie.forEach(le=>{var q;const Se=JSON.stringify(le.key),Z=!!(de!=null&&de.includes(Number(le.key)));b.value[Se]={checked:Z},(q=le.children)!=null&&q.length&&ge(le.children,Se),Oe&&w(Oe)})};ge(d.value)}else{const ge=de==null?void 0:de[0];ge&&(b.value={[ge]:!0})}},A=de=>Array.isArray(de)&&de.every(ge=>typeof ge=="number"),w=de=>{const ge=y(de),Ie=b.value[de].checked||ge,Oe=!ge&&C(de);b.value[de]={checked:!Oe&&Ie,partialChecked:Oe}},y=de=>{var ge;return(ge=p.value[de])==null?void 0:ge.every(Ie=>{var le;const Oe=JSON.stringify(Ie);return(le=b.value[Oe])==null?void 0:le.checked})},C=de=>{var ge;return(ge=p.value[de])==null?void 0:ge.some(Ie=>{var le,Se;const Oe=JSON.stringify(Ie);return((le=b.value[Oe])==null?void 0:le.checked)||((Se=b.value[Oe])==null?void 0:Se.partialChecked)})},I=de=>de.map(ge=>{var Ie;return(Ie=ge.children)!=null&&Ie.length&&(p.value={...p.value,[ge.key.toString()]:ge.children.map(Oe=>Number(Oe.key))},ge.children=I(ge.children)),i.disableNodeWhen&&(ge.selectable=!i.disableNodeWhen(ge)),ge}),R=()=>{(async()=>(a("update:selectedKeys",{}),await M(!1),se()))()},M=async(de=!0)=>{try{l.value=!0;const{data:ge}=await s.value.fetchTree(i.type,i.params);if(ge){const Ie=I(ge);f.value=cv(ge),d.value=Ie,sessionStorage.setItem(`${i.type}Tree`,JSON.stringify(Ie)),sessionStorage.setItem(`flatten${i.type}nodes`,JSON.stringify(f.value))}i.selectLastNode&&i.selectionMode==="single"&&await Et(D),i.autoSelectAll&&i.selectionMode==="checkbox"&&await Et(ie)}finally{A(i.selectedKeys)&&(k(i.selectedKeys),S.value=b.value),de||Ye.emit("tree:tree-updated"),l.value=!1}},D=async()=>{var q,U;const de=sessionStorage.getItem(`${i.type.toLowerCase()}Node`),ge=(q=d.value)==null?void 0:q[0],Ie=(U=ge==null?void 0:ge.children)==null?void 0:U[0],Oe=de?JSON.parse(de):null,le=(Oe==null?void 0:Oe.key)==-1,Se=i.disableNodeAll?Ie:ge,Z=le&&i.disableNodeAll?Ie:Oe??Se;if((Z==null?void 0:Z.key)!=null&&$(Z==null?void 0:Z.key)){S.value={[Z==null?void 0:Z.key]:!0};const J=sessionStorage.getItem(`${i.type.toLowerCase()}NodeExpandedKeys`);J&&(m.value=JSON.parse(J)),W(Z)}},$=de=>f.value.some(ge=>ge.key===de),W=de=>{a("nodeSelect",de),i.shouldEmitEventOnChange&&(sessionStorage.setItem(`${i.type.toLowerCase()}Node`,JSON.stringify(de)),sessionStorage.setItem(`${i.type.toLowerCase()}NodeExpandedKeys`,JSON.stringify(m.value)))},ie=()=>{const de={};f.value.forEach(ge=>{de[ge.key]={checked:!0,partialChecked:!1}}),S.value=de},ve=()=>{h.value=!0;for(const de of d.value)ae(de);m.value={...m.value}},ae=de=>{var ge;if((ge=de.children)!=null&&ge.length){m.value[de.key??""]=!0;for(const Ie of de.children)ae(Ie)}},me=()=>{m.value={"-1":!0},h.value=!1},se=()=>{if(i.selectedKeys){const de=Array.isArray(i.selectedKeys)?i.selectedKeys:Object.keys(ov(i.selectedKeys,i.includeNodeAllKey)).map(Number),ge=f.value.filter(Ie=>de.includes(Ie.key));i.shouldEmitEventOnChange&&(sessionStorage.setItem(`${i.type.toLowerCase()}Keys`,JSON.stringify(de)),Ye.emit("tree:selection-changed",{keys:JSON.stringify(de)})),a("update:selectedTreeNodes",ge)}},Pe=de=>{de!=null&&de.length?ve():xe()},Be=de=>{i.readonly||W(de)},xe=()=>{m.value={"-1":!0}};return $e(()=>i.filter,de=>{Pe(de)}),$e(()=>[i.selectedKeys,i.type],async(de,ge)=>{de[1]!==ge[1]&&(a("update:selectedKeys",{}),await M()),se()}),e({treeNodes:d,flatNodes:f,isLoading:l,showDisposableGroups:v,isExpandedAll:h,collapseAll:me,expandAll:ve,expandNodeAll:xe,fetchTreeList:M}),(de,ge)=>(g(),P(XO,T({id:u.value,ref_key:"tree",ref:c},de.$attrs,{"expanded-keys":m.value,"onUpdate:expandedKeys":ge[0]||(ge[0]=Ie=>m.value=Ie),"selection-keys":S.value,"onUpdate:selectionKeys":ge[1]||(ge[1]=Ie=>S.value=Ie),class:{readonly:i.readonly},"disable-keys":de.disableKeys,"disable-node-all":i.disableNodeAll,"disable-node-when":de.disableNodeWhen,"exact-disable-keys":de.exactDisableKeys,"exact-disable-node-when":de.exactDisableNodeWhen,"filter-text":de.filter,"list-labels-no-option":de.listLabelsNoOption,loading:l.value,"node-selected-when":de.nodeSelectedWhen,"propagate-selection":de.propagateSelection,"selection-mode":i.selectionMode,"show-disposable-groups":v.value,"tree-node-menus":de.treeNodeMenus,"use-option":de.useOption,value:d.value,onNodeCollapse:ge[2]||(ge[2]=Ie=>h.value=!1),onNodeSelect:Be,onNodeUnselect:ge[3]||(ge[3]=Ie=>a("nodeUnselect",Ie)),onToggleMenu:ge[4]||(ge[4]=Ie=>a("toggleMenu",Ie)),"filter-by":"name"}),In({_:2},[r.default?{name:"default",fn:H(({node:Ie,checked:Oe,disabled:le})=>[Q(de.$slots,"default",{checked:Oe,disabled:le,node:Ie})]),key:"0"}:void 0]),1040,["id","expanded-keys","selection-keys","class","disable-keys","disable-node-all","disable-node-when","exact-disable-keys","exact-disable-node-when","filter-text","list-labels-no-option","loading","node-selected-when","propagate-selection","selection-mode","show-disposable-groups","tree-node-menus","use-option","value"]))}})),aE={class:pe(["relative w-full text-xs flex gap-1 py-[4.5px] px-2 items-center","rounded ring-1 ring-inset ring-offset-0 ring-general-500 dark:ring-general-500"]),"data-wv-name":"tree-search-input"},lE=Ae({__name:"TreeSearchInput",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=s=>{s.key==="Enter"&&s.preventDefault()},o=s=>{i("update:modelValue",s)};return(s,a)=>{const l=on("focus");return g(),O("div",aE,[L(Ee,{class:"w-4 h-4 shrink-0 grow-0 !text-general-400",icon:"search"}),ft(L(x(Qo),{class:pe(["w-max grow h-auto !shadow-none !p-0 placeholder:text-general-200"]),"model-value":n.modelValue,onInput:a[0]||(a[0]=u=>o(u.target.value)),onKeydown:r,autocomplete:"off",placeholder:"Search"},null,8,["model-value"]),[[l]]),L(Ee,{class:pe(["text-md w-4 h-4 shrink-0 !text-general-400",{hidden:!n.modelValue}]),onClick:a[1]||(a[1]=u=>o("")),"data-wv-section":"reset-filter-icon",icon:"close"},null,8,["class"])])}}}),uE={class:"flex flex-col gap-3 items-start w-full","data-wv-section":"header-wrapper"},cE={key:0,class:"list-inside w-full overflow-auto max-h-20","data-wv-section":"dialog-select-tree-lists"},dE={class:"flex gap-1 items-center justify-end","data-wv-section":"footer-button"},fE=ce("DialogSelectTree",Ae({__name:"DialogSelectTree",props:wn({fetchTree:{},params:{},visible:{type:Boolean},type:{default:"group"},autoSelectAll:{type:Boolean},header:{},subHeader:{default:void 0},selectionMode:{default:"checkbox"},allowEmptySelection:{type:Boolean,default:!0},keys:{default:void 0},lists:{default:void 0},listLabel:{default:void 0},disableNodeAll:{type:Boolean,default:!1},exactDisableKey:{},disableKeys:{},exactDisableKeys:{},readonly:{type:Boolean},showDisposableGroups:{type:Boolean},flattenDisposableNode:{type:Boolean},excludedKeys:{},hidden:{type:Boolean},propagateSelection:{type:Boolean},selectedKeys:{},selectedTreeNodes:{},useOption:{type:Boolean},listLabelsNoOption:{},treeNodeMenus:{},selectLastNode:{type:Boolean},includeNodeAllKey:{type:Boolean},selectDisposableOnly:{type:Boolean},shouldEmitEventOnChange:{type:Boolean},level:{},value:{},expandedKeys:{},selectionKeys:{},metaKeySelection:{type:Boolean},loading:{type:Boolean},loadingIcon:{},loadingMode:{},filterText:{},filterBy:{},filterMode:{},filterPlaceholder:{},filterLocale:{},highlightOnSelect:{type:Boolean},scrollHeight:{},ariaLabel:{},ariaLabelledby:{},pt:{},ptOptions:{},unstyled:{type:Boolean},disableNodeWhen:{},exactDisableNodeWhen:{},nodeSelectedWhen:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:wn(["select","hide"],["update:visible"]),setup(t,{expose:e,emit:n}){const i=t,r=n,o=ni(t,"visible"),s=dt("preset",{}).dialog,a=re(),l=re(""),u=re(""),c=re([]),d=re(),f=re(),p=re(!1),h=re(),m=re(),v=X(()=>i.header?i.header:i.type==="group"?"Select Group":"Select Category"),S=(b=!0)=>{d.value=h.value,f.value=m.value,Object.keys(d.value??{}).length?(r("select",{keys:d.value,selectedNodes:c.value,singleNode:f.value}),o.value=!b):i.allowEmptySelection?(r("select",{keys:[],selectedNodes:void 0,singleNode:void 0}),o.value=!b):i.allowEmptySelection||(u.value="You must pick a "+i.type.toLowerCase())};return $e(o,b=>{h.value=b?d.value:void 0,m.value=b?f.value:void 0,b&&i.keys&&!h.value&&(h.value=i.keys)}),$e(a,b=>{b&&i.showDisposableGroups&&(b.showDisposableGroups=!0,p.value=!0)},{deep:!0}),$e(c,()=>{i.hidden&&S(!1)},{once:!0}),$e(()=>i.keys,()=>{d.value=i.keys}),e({treeComponent:a}),(b,k)=>(g(),P(rr,{visible:o.value,"onUpdate:visible":k[7]||(k[7]=A=>o.value=A),modal:!b.hidden,pt:{root:{class:[...x(s).root({state:{}}).class,"!w-[400px]",{"!hidden":b.hidden}]},header:{class:"relative"},icons:{class:"absolute top-0 right-0"},content:{class:[...x(s).content({state:{},instance:{}}).class,"pr-1.5 focus-visible:outline-none"]},footer:{class:[{"flex justify-end items-center gap-1":b.allowEmptySelection,"flex justify-end items-end flex-col gap-1":!b.allowEmptySelection}]}},onHide:k[8]||(k[8]=A=>b.$emit("hide")),onShow:k[9]||(k[9]=A=>u.value=""),"data-wv-name":"dialogselecttree"},In({header:H(()=>{var A;return[Q(b.$slots,"header",{dialogHeader:v.value,filter:l.value,isLoading:!!((A=a.value)!=null&&A.isLoading),listLabel:b.listLabel,lists:b.lists,subHeader:b.subHeader,updateFilter:w=>l.value=w},()=>{var w;return[E("div",uE,[E("h3",{class:pe([...x(s).title.class,"!leading-6"])},_(v.value),3),b.lists?(g(),O("ul",cE,[(g(!0),O(ue,null,Je(b.lists,(y,C)=>(g(),O("li",{key:C,class:"text-xs leading-[16.39px] tracking-[0.02em] font-medium text-general-800 list-disc ps-[6px]"},_(b.listLabel&&typeof y!="string"?x(zn)(y,b.listLabel):y),1))),128))])):B("",!0),b.subHeader?(g(),O("h4",{key:1,class:pe([...x(s).title.class,"!leading-6 text-sm"])},_(b.subHeader),3)):B("",!0),(w=a.value)!=null&&w.isLoading?B("",!0):(g(),P(lE,{key:2,modelValue:l.value,"onUpdate:modelValue":k[0]||(k[0]=y=>l.value=y),class:"w-full"},null,8,["modelValue"]))])]})]}),default:H(()=>[L(sE,T({ref_key:"treeComponent",ref:a},i,{"selected-keys":h.value,"onUpdate:selectedKeys":[k[1]||(k[1]=A=>h.value=A),k[4]||(k[4]=A=>u.value="")],"selected-tree-nodes":c.value,"onUpdate:selectedTreeNodes":k[2]||(k[2]=A=>c.value=A),"auto-select-all":b.autoSelectAll,"disable-keys":b.disableKeys,"disable-node-all":b.disableNodeAll,"exact-disable-key":b.exactDisableKey,"exact-disable-keys":b.exactDisableKeys,"excluded-keys":b.excludedKeys,"fetch-tree":b.fetchTree,filter:l.value,"flatten-disposable-node":b.flattenDisposableNode,params:b.params,"propagate-selection":b.propagateSelection,readonly:i.readonly,"select-disposable-only":p.value,"selection-mode":b.selectionMode,type:i.type,onNodeSelect:k[3]||(k[3]=A=>m.value=A)}),In({_:2},[b.$slots.treenode?{name:"default",fn:H(({node:A,checked:w,disabled:y})=>[Q(b.$slots,"treenode",{checked:w,disabled:y,node:A})]),key:"0"}:void 0]),1040,["selected-keys","selected-tree-nodes","auto-select-all","disable-keys","disable-node-all","exact-disable-key","exact-disable-keys","excluded-keys","fetch-tree","filter","flatten-disposable-node","params","propagate-selection","readonly","select-disposable-only","selection-mode","type"])]),_:2},[i.readonly?void 0:{name:"footer",fn:H(()=>[Q(b.$slots,"footer",{},()=>{var A;return[b.allowEmptySelection?B("",!0):ft((g(),P(Fn,{key:0,format:!1,message:u.value},null,8,["message"])),[[Xn,!!u.value]]),E("div",dE,[L(We,{onClick:k[5]||(k[5]=w=>o.value=!1),label:"Cancel",severity:"secondary",text:""}),L(We,{disabled:(A=a.value)==null?void 0:A.isLoading,onClick:k[6]||(k[6]=w=>S(!0)),label:"Select",severity:"success"},null,8,["disabled"])])]})]),key:"0"}]),1032,["visible","modal","pt"]))}})),pE={key:0,class:"inline-flex gap-1 items-center"},hE=ce("ButtonSelectTree",Ae({__name:"ButtonSelectTree",props:{type:{},value:{},selectedNode:{},fieldDataKey:{},selectionMode:{default:"checkbox"},useValidator:{type:Boolean},fieldName:{default:"selectTree"},mandatory:{type:Boolean,default:!1},validatorMessage:{default:void 0},dialogHeader:{default:void 0},label:{default:void 0},fetchTree:{},params:{},autoSelectAll:{type:Boolean},disableKeys:{},exactDisableKeys:{},disabled:{type:Boolean},exactDisableKey:{},disableNodeAll:{type:Boolean,default:!1},allowEmptySelection:{type:Boolean,default:!0},fieldLabel:{default:void 0},fieldInfo:{default:void 0},invalid:{type:Boolean,default:!1},btnWidth:{},width:{},readonly:{type:Boolean},showDisposableGroups:{type:Boolean},flattenDisposableNode:{type:Boolean},excludedKeys:{},singleEditable:{type:Boolean,default:!0},singleResetable:{type:Boolean},fetchTreeOnButtonRender:{type:Boolean,default:!1}},emits:["update:value","dialogShown","dialogHidden","reset"],setup(t,{emit:e}){const n=e,i=t;wt(()=>{var A,w;i.useValidator&&(Object.assign(r,Nn(i.fieldName,y=>v(y))),i.value&&((w=(A=o.value)==null?void 0:A.treeComponent)==null||w.fetchTreeList(),r.value=i.value))});const r=hn({value:i.value}),o=re(),s=re(i.fetchTreeOnButtonRender),a=re(i.fetchTreeOnButtonRender),l=re(0),u=re(!Array.isArray(i.value)&&typeof i.value!="number"&&typeof i.value!="string"?i.value:void 0),c=X({get:()=>u.value,set:A=>{u.value=A,n("update:value",m(A,i.fieldDataKey))}}),d=X(()=>h(r.value??i.value)),f=X(()=>{var y;const w=(i.selectionMode==="checkbox"?((y=d.value)==null?void 0:y.filter(C=>(C==null?void 0:C.toString())!="-1"))??[]:[]).length;return w&&i.selectionMode==="checkbox"?w+(i.type==="group"?" group(s) selected":" category(s) selected"):i.label?i.label:i.type==="group"?"Select Group":"Select Category"}),p=X(()=>i.width?`width: ${i.width}px !important`:void 0),h=A=>{const w=JSON.parse(sessionStorage.getItem(`flatten${i.type}nodes`)??"[]");return A?(Array.isArray(A)?A:[A]).map(y=>{if(typeof y=="number")return y;if(typeof y=="string"){const C=w.find(I=>I._id===y);return C==null?void 0:C.key}return y.key}):[]},m=(A,w)=>{if(Array.isArray(A)&&i.selectionMode==="checkbox")return A.map(y=>w?y==null?void 0:y[w]:y);if(A&&i.selectionMode==="single")return w?A==null?void 0:A[w]:A},v=async A=>(await Et(),(Array.isArray(A)&&!(A!=null&&A.length)||!Array.isArray(A)&&!A)&&i.mandatory?i.validatorMessage?i.validatorMessage:i.type==="group"?"You must pick a group":"You must pick a category":i.invalid&&i.validatorMessage?i.validatorMessage:!0),S=A=>{var w;if(A){const{keys:y,singleNode:C,selectedNodes:I}=A,R=((w=y[-1])==null?void 0:w.checked)??!1;if(i.selectionMode==="single")c.value=C,r.value=m(c.value,i.fieldDataKey);else{const M=I==null?void 0:I.filter(D=>{var $;return!(($=i.excludedKeys)!=null&&$.includes(Number(D.key)))});r.value=m(M,i.fieldDataKey)??[]}n("update:value",r.value,R)}},b=()=>{c.value=void 0,l.value++,n("reset")},k=()=>{s.value=!0,a.value=!1,n("dialogShown")};return $e(()=>i.value,A=>{r.value=A}),$e(()=>i.selectedNode,A=>{i.selectionMode==="single"&&(u.value=A)},{immediate:!0}),(A,w)=>(g(),O(ue,null,[L(pi,T(A.$attrs,{info:A.fieldInfo,label:i.fieldLabel,mandatory:i.mandatory,"show-optional-text":A.$attrs["show-optional-text"]!=!1}),{default:H(()=>[u.value?(g(),O("span",pE,[L(Pt,{label:u.value.name,format:"nowrap"},null,8,["label"]),A.singleEditable?(g(),P(We,{key:0,onClick:k,class:"p-0 m-0 !min-w-0 !min-h-0 !h-4 !w-4 focus-visible:ring-0 focus-visible:bg-primary-50",text:""},{default:H(()=>[L(Ee,{class:"w-full h-full",icon:"edit",severity:"primary"})]),_:1})):B("",!0),A.singleResetable?(g(),P(We,{key:1,onClick:b,class:"p-0 m-0 !min-w-0 !min-h-0 !h-4 !w-4 focus-visible:ring-0 focus-visible:bg-danger-50",text:""},{default:H(()=>[L(Ee,{class:"w-full h-full",icon:"close",severity:"danger"})]),_:1})):B("",!0)])):(g(),P(We,{key:1,class:pe({"!w-full":!i.width}),disabled:A.disabled,label:f.value,style:Yi(p.value),onClick:k},null,8,["class","disabled","label","style"])),L(Fn,{message:r.errorMessage},null,8,["message"])]),_:1},16,["info","label","mandatory","show-optional-text"]),(g(),P(fE,{key:l.value+ +a.value,ref_key:"dialogTreeInstance",ref:o,visible:s.value,"onUpdate:visible":w[0]||(w[0]=y=>s.value=y),"allow-empty-selection":A.allowEmptySelection,"auto-select-all":A.autoSelectAll,"disable-keys":A.disableKeys,"disable-node-all":A.disableNodeAll,"exact-disable-key":A.exactDisableKey,"exact-disable-keys":A.exactDisableKeys,"excluded-keys":A.excludedKeys,"fetch-tree":A.fetchTree,"flatten-disposable-node":A.flattenDisposableNode,header:A.dialogHeader,hidden:a.value,keys:d.value,params:A.params,readonly:i.readonly,"selection-mode":i.selectionMode,"show-disposable-groups":i.showDisposableGroups,type:i.type,onHide:w[1]||(w[1]=y=>A.$emit("dialogHidden")),onSelect:S},In({_:2},[A.$slots.treenode?{name:"treenode",fn:H(({node:y})=>[Q(A.$slots,"treenode",{node:y})]),key:"0"}:void 0]),1032,["visible","allow-empty-selection","auto-select-all","disable-keys","disable-node-all","exact-disable-key","exact-disable-keys","excluded-keys","fetch-tree","flatten-disposable-node","header","hidden","keys","params","readonly","selection-mode","show-disposable-groups","type"]))],64))}})),ZX=ce("ButtonSync",Ae({__name:"ButtonSync",props:{withoutScanBtn:{type:Boolean}},setup(t){const e=t,n=oe(!1);return(i,r)=>(g(),O(ue,null,[L(We,T({onClick:r[0]||(r[0]=o=>n.value=!0)},i.$attrs,{icon:"refresh",label:"Sync",outlined:""}),null,16),L(pb,{visible:n.value,"onUpdate:visible":r[1]||(r[1]=o=>n.value=o),"without-scan-btn":e.withoutScanBtn},null,8,["visible","without-scan-btn"])],64))}})),mE=["data-p-disabled","data-p-highlight"],gE=["id","aria-checked","aria-invalid","aria-label","aria-labelledby","checked","disabled","readonly","tabindex"],bb=ce("ToggleSwitch",Ae({__name:"ToggleSwitch",props:{triState:{type:Boolean,default:!1},modelValue:{type:[Boolean,String,null]},trueValue:{default:!0},falseValue:{default:!1},label:{},tooltip:{},tooltipPos:{default:"top"},invalid:{type:Boolean},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},tabindex:{},inputId:{},inputClass:{},inputStyle:{type:[Boolean,null,String,Object,Array]},ariaLabelledby:{},ariaLabel:{},pt:{},ptOptions:{},unstyled:{type:Boolean}},emits:["update:modelValue","change","focus","blur"],setup(t,{emit:e}){const n=t,i=e,r=dt("preset",{}).toggleswitch,o=X(()=>n.modelValue===n.trueValue),s=c=>{if(!n.disabled&&!n.readonly){let d;n.triState?n.triState&&(d=n.modelValue==null?n.trueValue:o.value?n.falseValue:null):d=o.value?n.falseValue:n.trueValue,i("update:modelValue",d),i("change",c)}},a=c=>{i("focus",c)},l=c=>{i("blur",c)},u=(c,d)=>{const{attrs:f,slots:p}=d;return n.label?Ji("label",f,p.default()):p.default()};return(c,d)=>(g(),P(u,it(kt(x(r).label)),{default:H(()=>[E("span",T(x(r).root({props:n}),{"data-p-disabled":n.disabled,"data-p-highlight":o.value,onClick:d[0]||(d[0]=Ot(()=>{},["stop"])),"data-wv-name":"toggleswitch"}),[E("input",T(x(r).input({props:n}),{id:n.inputId,"aria-checked":o.value,"aria-invalid":n.invalid||void 0,"aria-label":n.ariaLabel,"aria-labelledby":n.ariaLabelledby,checked:o.value,class:["input-switch-input",n.inputClass],disabled:n.disabled,readonly:n.readonly,style:n.inputStyle,tabindex:n.tabindex,onBlur:l,onChange:s,onFocus:a,role:"switch",type:"checkbox"}),null,16,gE),E("span",it(kt(x(r).slider({props:n}))),null,16)],16,mE),n.label?(g(),O("span",T({key:0,"data-wv-section":"labeltext"},x(r).labeltext),_(c.label),17)):B("",!0),c.tooltip?(g(),P(Ee,T({key:1,info:c.tooltip,"tooltip-pos":c.tooltipPos},x(r).tooltipicon,{"data-wv-section":"tooltipicon",icon:"info"}),null,16,["info","tooltip-pos"])):B("",!0)]),_:1},16))}})),_X=ce("ButtonToggle",Ae({__name:"ButtonToggle",setup(t){return(e,n)=>(g(),P(bb))}}));var vE={root:function(e){var n=e.props;return["p-selectbutton p-button-group p-component",{"p-disabled":n.disabled,"p-invalid":n.invalid}]},button:function(e){var n=e.instance,i=e.option;return["p-button p-component",{"p-highlight":n.isSelected(i),"p-disabled":n.isOptionDisabled(i)}]},label:"p-button-label"},yE=Wt.extend({name:"selectbutton",classes:vE}),bE={name:"BaseSelectButton",extends:It,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,multiple:Boolean,unselectable:{type:Boolean,default:!0},allowEmpty:{type:Boolean,default:!0},invalid:{type:Boolean,default:!1},disabled:Boolean,dataKey:null,ariaLabelledby:{type:String,default:null}},style:yE,provide:function(){return{$parentInstance:this}}};function AE(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ab(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(u){throw u},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
184
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function wE(t){return kE(t)||CE(t)||Ab(t)||SE()}function SE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
185
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ab(t,e){if(t){if(typeof t=="string")return gp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gp(t,e)}}function CE(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function kE(t){if(Array.isArray(t))return gp(t)}function gp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var wb={name:"SelectButton",extends:bE,inheritAttrs:!1,emits:["update:modelValue","focus","blur","change"],data:function(){return{focusedIndex:0}},mounted:function(){this.defaultTabIndexes()},methods:{defaultTabIndexes:function(){for(var e=G.find(this.$refs.container,'[data-pc-section="button"]'),n=G.findSingle(this.$refs.container,'[data-p-highlight="true"]'),i=0;i<e.length;i++)(G.getAttribute(e[i],"data-p-highlight")===!0&&Ce.equals(e[i],n)||n===null&&i==0)&&(this.focusedIndex=i)},getOptionLabel:function(e){return this.optionLabel?Ce.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?Ce.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e){return this.dataKey?Ce.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getPTOptions:function(e,n){return this.ptm(n,{context:{active:this.isSelected(e),disabled:this.isOptionDisabled(e),option:e}})},isOptionDisabled:function(e){return this.optionDisabled?Ce.resolveFieldData(e,this.optionDisabled):!1},onOptionSelect:function(e,n,i){var r=this;if(!(this.disabled||this.isOptionDisabled(n))){var o=this.isSelected(n);if(!(o&&!(this.unselectable&&this.allowEmpty))){var s=this.getOptionValue(n),a;this.multiple?o?a=this.modelValue.filter(function(l){return!Ce.equals(l,s,r.equalityKey)}):a=this.modelValue?[].concat(wE(this.modelValue),[s]):[s]:a=o?null:s,this.focusedIndex=i,this.$emit("update:modelValue",a),this.$emit("change",{event:e,value:a})}}},isSelected:function(e){var n=!1,i=this.getOptionValue(e);if(this.multiple){if(this.modelValue){var r=AE(this.modelValue),o;try{for(r.s();!(o=r.n()).done;){var s=o.value;if(Ce.equals(s,i,this.equalityKey)){n=!0;break}}}catch(a){r.e(a)}finally{r.f()}}}else n=Ce.equals(this.modelValue,i,this.equalityKey);return n},onKeydown:function(e,n,i){switch(e.code){case"Space":{this.onOptionSelect(e,n,i),e.preventDefault();break}case"ArrowDown":case"ArrowRight":{this.onArrowRightKey(e.target),e.preventDefault();break}case"ArrowUp":case"ArrowLeft":{this.onArrowLeftKey(e.target),e.preventDefault();break}}},onArrowRightKey:function(e){var n=this.findNextElement(e);n&&(this.focusedIndex=Ce.findIndexInList(n,this.findAllElements()),G.focus(n))},onArrowLeftKey:function(e){var n=this.findPrevElement(e);n&&(this.focusedIndex=Ce.findIndexInList(n,this.findAllElements()),G.focus(n))},findAllElements:function(){return G.find(this.$refs.container,'[data-pc-section="button"]')},findNextElement:function(e){return e.nextElementSibling?G.getAttribute(e.nextElementSibling,"data-p-disabled")?this.findNextElement(e.nextElementSibling):e.nextElementSibling:null},findPrevElement:function(e){return e.previousElementSibling?G.getAttribute(e.previousElementSibling,"data-p-disabled")?this.findPrevElement(e.previousElementSibling):e.previousElementSibling:null},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e,n){e.target&&e.relatedTarget&&e.target.parentElement!==e.relatedTarget.parentElement&&this.defaultTabIndexes(),this.$emit("blur",e,n)},findTabindex:function(e,n){return this.disabled||this.isOptionDisabled(e)||n!==this.focusedIndex?"-1":"0"}},computed:{equalityKey:function(){return this.optionValue?null:this.dataKey}},directives:{ripple:fi}},TE=["aria-labelledby"],OE=["tabindex","aria-label","role","aria-checked","aria-disabled","onClick","onKeydown","onBlur","data-p-highlight","data-p-disabled"];function xE(t,e,n,i,r,o){var s=on("ripple");return g(),O("div",T({ref:"container",class:t.cx("root"),role:"group","aria-labelledby":t.ariaLabelledby},t.ptmi("root")),[(g(!0),O(ue,null,Je(t.options,function(a,l){return ft((g(),O("div",T({key:o.getOptionRenderKey(a),tabindex:o.findTabindex(a,l),"aria-label":o.getOptionLabel(a),role:t.multiple?"checkbox":"radio","aria-checked":o.isSelected(a),"aria-disabled":o.isOptionDisabled(a),class:t.cx("button",{option:a}),onClick:function(c){return o.onOptionSelect(c,a,l)},onKeydown:function(c){return o.onKeydown(c,a,l)},onFocus:e[0]||(e[0]=function(u){return o.onFocus(u)}),onBlur:function(c){return o.onBlur(c,a)}},o.getPTOptions(a,"button"),{"data-p-highlight":o.isSelected(a),"data-p-disabled":o.isOptionDisabled(a)}),[Q(t.$slots,"option",{option:a,index:l,class:pe(t.cx("label"))},function(){return[E("span",T({class:t.cx("label")},o.getPTOptions(a,"label")),_(o.getOptionLabel(a)),17)]})],16,OE)),[[s]])}),128))],16,TE)}wb.render=xE;var ME={root:{position:"relative"}},EE={root:function(e){var n=e.props;return["p-skeleton p-component",{"p-skeleton-circle":n.shape==="circle","p-skeleton-none":n.animation==="none"}]}},IE=Wt.extend({name:"skeleton",classes:EE,inlineStyles:ME}),PE={name:"BaseSkeleton",extends:It,props:{shape:{type:String,default:"rectangle"},size:{type:String,default:null},width:{type:String,default:"100%"},height:{type:String,default:"1rem"},borderRadius:{type:String,default:null},animation:{type:String,default:"wave"}},style:IE,provide:function(){return{$parentInstance:this}}},dl={name:"Skeleton",extends:PE,inheritAttrs:!1,computed:{containerStyle:function(){return this.size?{width:this.size,height:this.size,borderRadius:this.borderRadius}:{width:this.width,height:this.height,borderRadius:this.borderRadius}}}};function LE(t,e,n,i,r,o){return g(),O("div",T({class:t.cx("root"),style:[t.sx("root"),o.containerStyle],"aria-hidden":"true"},t.ptmi("root")),null,16)}dl.render=LE;const DE=["id"],RE=["id","aria-invalid","disabled","placeholder","value"],BE={class:"flex gap-1"},NE={key:2},$E={key:0,class:"flex flex-col","data-wv-section":"datepicker"},VE={"data-wv-section":"tableheader"},zE={class:"grid grid-cols-7 justify-between h-[26.8px] items-center","data-wv-section":"weekdays"},FE={class:"grid grid-cols-7","data-wv-section":"tablebody"},HE=["aria-label","data-wv-other-month","data-wv-today"],jE=["aria-disabled","data-p-disabled","onClick"],UE=["data-p-disabled","data-p-highlight","onClick"],KE=["data-p-disabled","data-p-highlight","onClick"],WE=["aria-label"],qE=["aria-label"],XE=["aria-label","disabled"],GE=["aria-label","disabled"],ZE={key:1,class:"w-full flex items-center justify-end gap-1","data-wv-section":"calendarbuttons"},_E=Ae({__name:"BaseCalendar",props:{modelValue:{},dateValue:{},epochTimeMillis:{},valueFormat:{default:"millis"},label:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},overlayClass:{},inputId:{},id:{},mode:{default:"single"},selectionMode:{default:"single"},hideOnDateTimeSelect:{type:Boolean},hideOnRangeSelection:{type:Boolean,default:!0},view:{default:"date"},showYear:{type:Boolean,default:!0},showButtons:{type:Boolean},useValidator:{type:Boolean},fieldName:{},fieldInfo:{},mandatory:{type:Boolean},showOptionalText:{type:Boolean,default:void 0},invalid:{type:Boolean},validatorMessage:{},customValidation:{},dateFormat:{default:"dd/mm/yy"},hourFormat:{default:"24"},showTime:{type:Boolean},timeSeparator:{default:":"},stepHour:{default:1},stepMinute:{default:1},useTimeFormat:{type:Boolean},onlyWeekdays:{type:Boolean,default:!1},excludeDates:{default:()=>[]},minDate:{},maxDate:{},maxYear:{},maxMonth:{},exactSelection:{type:Boolean,default:!1}},emits:["update:modelValue","update:epochTimeMillis","monthChange","yearChange","dateSelect"],setup(t,{emit:e}){const n=t,i=e;wt(()=>{Z()});const r=Zt("Calendar"),o=(1969*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7,s=re(),a=re(),l=re(),u=new Date,c=re(u.getMonth()),d=re(u.getFullYear()),f=re(u.getHours()),p=re(u.getMinutes()),h=re(u.getSeconds()),m=re(n.modelValue),v=re(!1),S=oe(),b=oe(n.view??"date"),k=oe([]),A=oe(!1),w=oe(!1),y=oe(),C=oe(!1),I=oe(),R=oe([]),M=X(()=>n.showButtons||n.showTime?m.value:n.modelValue),D=X(()=>k.value.flatMap(N=>N)),$=X(()=>f.value<10?"0"+f.value:f.value),W=X(()=>p.value<10?"0"+p.value:p.value),ie=X(()=>n.dateFormat||r.locale.global.dateFormat),ve=X(()=>{const N=[],F=K=>{if(n.minDate){const Ke=n.minDate.getMonth(),Ze=n.minDate.getFullYear();if(d.value<Ze||d.value===Ze&&K<Ke)return!1}if(n.maxDate){const Ke=n.maxDate.getMonth(),Ze=n.maxDate.getFullYear();if(d.value>Ze||d.value===Ze&&K>Ke)return!1}if(n.maxMonth&&n.maxMonth==="current"){const Ke=new Date,Ze=Ke.getMonth(),Ut=Ke.getFullYear();return K<=Ze&&d.value==Ut||d.value<Ut}return!0};for(let K=0;K<=11;K++)N.push({value:K,selectable:F(K)});return N}),ae=X(()=>{const N=[],F=d.value-d.value%10,K=Ke=>{if(n.minDate&&n.minDate.getFullYear()>Ke||n.maxDate&&n.maxDate.getFullYear()<Ke)return!1;if(n.maxYear&&n.maxYear==="current"){const Ze=new Date().getFullYear();return Ke<=Ze}return!0};for(let Ke=0;Ke<10;Ke++)N.push({value:F+Ke,selectable:K(F+Ke)});return N}),me=X(()=>{let N;if(M.value&&He(M.value)?N=M.value[se(M.value)]||M.value[0]:N=M.value,N&&typeof N!="string"&&N.toString()!=="Invalid Date")return N;const F=new Date;return n.maxDate&&n.maxDate<F?n.maxDate:n.minDate&&n.minDate>F?n.minDate:F}),se=N=>N.length>2?N.length-1:1,Pe=()=>{const N=new Date(d.value,c.value,1),F=new Date(d.value,c.value+1,0),K=F.getDate(),Ke=N.getDay(),Ze=F.getDay(),Ut=[];let V=1-Ke;for(;V<=K;){const te=[];for(let ze=0;ze<7;ze++)te.push({day:V,month:c.value,year:d.value,otherMonth:V<1||V>K,today:V===u.getDate()&&c.value===new Date().getMonth()&&d.value===new Date().getFullYear(),selectable:jt(V,c.value,d.value)}),V++;Ut.push(te)}if(Ze!==6){const te=Ut[Ut.length-1];let ze=1;for(let qe=Ze+1;qe<7;qe++)te[qe].day=ze++,te[qe].otherMonth=!0}return Ut},Be=()=>{c.value===0?(d.value--,c.value=11):c.value--,Z()},xe=()=>{d.value--},de=()=>{d.value++},ge=()=>{c.value===11?(de(),c.value=0):c.value++,Z()},Ie=()=>{d.value-=10},Oe=()=>{d.value+=10},le=()=>{b.value==="date"?Be():b.value==="month"?xe():Ie()},Se=()=>{b.value==="date"?ge():b.value==="month"?de():Oe()},Z=()=>{k.value=Pe()},q=()=>M.value!=null&&typeof M.value!="string",U=N=>n.selectionMode==="single"&&(!Array.isArray(M.value)||M.value==null),J=()=>n.selectionMode==="range"&&(Array.isArray(M.value)||M.value==null),ke=()=>n.selectionMode==="multiple"&&(Array.isArray(M.value)||M.value==null),He=N=>ke()||J(),j=(N,F)=>N?N.getDate()===F.day&&N.getMonth()===F.month&&N.getFullYear()===F.year:!1,he=(N,F,K)=>{if(N&&F){const Ze=new Date(K.year,K.month,K.day);return N.getTime()<=Ze.getTime()&&F.getTime()>=Ze.getTime()}return!1},De=N=>{if(!q())return!1;if(M.value){if(U(M.value))return j(M.value,N);if(ke())return M.value.some(F=>j(F,N));if(J())return M.value[se(M.value)]?j(M.value[0],N)||j(M.value[se(M.value)],N)||he(M.value[0],M.value[se(M.value)],N):j(M.value[0],N)}return!1},nt=N=>U(M.value)||ke()?De(N):J()?De(N)&&(j(M.value[0],N)||M.value[0]==null):!1,St=N=>U(M.value)||ke()?De(N):J()?De(N)&&(j(M.value[se(M.value)],N)||M.value[se(M.value)]==null):!1,lt=N=>{if(q()){if(U(M.value))return M.value.getMonth()===N&&M.value.getFullYear()===d.value;if(ke())return M.value.some(F=>F.getMonth()===N&&F.getFullYear()===d.value);if(J()){const[F,K]=M.value;if(F&&K){const Ke=new Date(F.getFullYear(),F.getMonth()),Ze=new Date(K.getFullYear(),K.getMonth()),Ut=new Date(d.value,N);return Ut>=Ke&&Ut<=Ze}}}return!1},bt=N=>{var F;if(q()){if(U(M.value))return((F=M.value)==null?void 0:F.getFullYear())===N;if(ke())return M.value.some(K=>K.getFullYear()===N);if(J()){const[K,Ke]=M.value;return N>=K.getFullYear()&&N<=(Ke??K).getFullYear()}}return!1},jt=(N,F,K)=>{let Ke=!0,Ze=!0,Ut=!0,V=!0;if(n.onlyWeekdays){const te=new Date(K,F,N).getDay();Ut=te>=1&&te<=5}return n.excludeDates&&(V=!n.excludeDates.some(te=>te.getFullYear()===K&&te.getMonth()===F&&te.getDate()===N)),n.minDate&&(n.minDate.getFullYear()>K||n.minDate.getFullYear()===K&&(n.minDate.getMonth()>F||n.minDate.getMonth()===F&&n.minDate.getDate()>N))&&(Ke=!1),n.maxDate&&(n.maxDate.getFullYear()<K||n.maxDate.getFullYear()===K&&(n.maxDate.getMonth()<F||n.maxDate.getMonth()===F&&n.maxDate.getDate()<N))&&(Ze=!1),Ke&&Ze&&Ut&&V},ln=(N,F)=>{N.currentTarget instanceof HTMLElement&&N.currentTarget.focus(),F.selectable&&On(F),n.selectionMode==="single"&&(!n.showTime||n.hideOnDateTimeSelect)&&_i()},un=(N,F)=>{F.selectable&&(n.view==="month"?ln(N,{year:d.value,month:F.value,day:1,selectable:!0,today:!1,otherMonth:!1}):(c.value=F.value,b.value="date",i("monthChange",{month:c.value,year:d.value})),Z())},en=(N,F)=>{F.selectable&&(n.view==="year"?ln(N,{year:F.value,month:0,day:1,selectable:!0,otherMonth:!1,today:!1}):(d.value=F.value,b.value="month",i("yearChange",{month:c.value+1,year:d.value})),Z())},Vt=(N,F,K)=>{!n.disabled&&!n.readonly&&(st(N,null,F,K),N.preventDefault())},Dt=N=>{!n.disabled&&!n.readonly&&(rt(),rn(),N.preventDefault())},Sn=()=>{rt()},Jt=N=>{switch(N.code){case"Tab":break;case"Escape":_i(),N.preventDefault();break}},ee=N=>{n.disabled||setTimeout(()=>{a.value.show(N,je(N))},0)},Y=N=>{n.disabled||setTimeout(()=>{var F;(F=a.value)==null||F.toggle(N,je(N))},0)},we=()=>{b.value=n.view,at(),v.value||fe()},je=N=>("$el"in l.value?l.value.$el:s.value)??N.currentTarget,st=(N,F,K,Ke)=>{switch(F||(F=500),rt(),y.value=setTimeout(()=>{st(N,100,K,Ke)},F),K){case 0:Ke===1?ne(N):be(N);break;case 1:Ke===1?Ue(N):ut(N);break}},ne=N=>{const F=f.value;let K=f.value+Number(n.stepHour),Ke=w.value;n.hourFormat=="24"?K=K>=24?K-24:K:n.hourFormat=="12"&&(F<12&&K>11&&(Ke=!w.value),K=K>=13?K-12:K),gt(K,p.value,h.value,Ke)&&(f.value=K,w.value=Ke),N.preventDefault()},be=N=>{let F=f.value-n.stepHour,K=w.value;n.hourFormat=="24"?F=F<0?24+F:F:n.hourFormat=="12"&&(f.value===12&&(K=!w.value),F=F<=0?12+F:F),gt(F,p.value,h.value,K)&&(f.value=F,w.value=K),N.preventDefault()},Ue=N=>{const F=p.value+Number(n.stepMinute);gt(f.value,F,h.value,w.value)&&(p.value=F>59?F-60:F),N.preventDefault()},ut=N=>{let F=p.value-n.stepMinute;F=F<0?60+F:F,gt(f.value,F,h.value,w.value)&&(p.value=F),N.preventDefault()},rt=()=>{y.value&&clearInterval(y.value)},gt=(N,F,K,Ke)=>{let Ze;const Ut=zt(N,Ke);if(He(M.value)){const te=q()?M.value:me.value;Ze=te[se(te)]||te[0]}else Ze=q()?M.value:me.value;const V=Ze?Ze.toDateString():null;return!(n.minDate&&V&&n.minDate.toDateString()===V&&(n.minDate.getHours()>Ut||n.minDate.getHours()===Ut&&(n.minDate.getMinutes()>F||n.minDate.getMinutes()===F&&n.minDate.getSeconds()>K))||n.maxDate&&V&&n.maxDate.toDateString()===V&&(n.maxDate.getHours()<Ut||n.maxDate.getHours()===Ut&&(n.maxDate.getMinutes()<F||n.maxDate.getMinutes()===F&&n.maxDate.getSeconds()<K)))},zt=(N,F)=>n.hourFormat=="12"?N===12?F?12:0:F?N+12:N:N,rn=()=>{C.value=!0;let N;if(He(M.value)){const F=q()?M.value:me.value;N=F[se(F)]||F[0]}else N=q()?M.value:me.value;N=N&&!Array.isArray(N)?new Date(N.getTime()):new Date,n.hourFormat=="12"?f.value===12?N.setHours(w.value?12:0):N.setHours(w.value?f.value+12:f.value):N.setHours(f.value),N.setMinutes(p.value),N.setSeconds(h.value),He(M.value)&&(ke()?N=[...M.value]:J()&&(M.value[se(M.value)]?N=[M.value[0],N]:N=[N,null])),pn(N),i("dateSelect",N),setTimeout(()=>C.value=!1,0)},cn=N=>N?Array.isArray(N)?N.map(K=>K==null?void 0:K.getTime()):N.getTime():null,pn=N=>{n.showButtons||n.showTime?(m.value=N,v.value=!1):(i("update:epochTimeMillis",cn(N)),i("update:modelValue",N))},z=()=>{i("update:epochTimeMillis",cn(m.value)),i("update:modelValue",m.value),v.value=!0,_i()},fe=()=>{m.value=n.modelValue,v.value=!0,_i()},Re=()=>{!gt(f.value,p.value,h.value,!w.value)&&(n.maxDate||n.minDate)||(w.value=!w.value,rn())},at=()=>{c.value=me.value.getMonth(),d.value=me.value.getFullYear(),n.showTime&&Yt(me.value)},Yt=N=>{let F=N.getHours();n.hourFormat==="12"&&(w.value=F>11,F>=12?F=F==12?12:F-12:F=F==0?12:F),f.value=Math.floor(F/n.stepHour)*n.stepHour,p.value=Math.floor(N.getMinutes()/n.stepMinute)*n.stepMinute},_t=()=>{const N=n.showButtons||n.showTime?m.value:M.value;if(typeof N=="string")return N;let F="";if(N)try{if(U(N))N.toString()!=="Invalid Date"&&(F=_e(N));else if(ke())N&&N.length&&(F=N.map(K=>_e(K)).join(", "));else if(J()&&N&&N.length){const K=N[0],Ke=N[se(N)];K.toString()!=="Invalid Date"&&(F=_e(K)),Ke&&Ke.toString()!=="Invalid Date"&&(F+=" - "+_e(Ke))}}catch{F=N.toString()}return F},_e=N=>{let F=null;return N&&(F=Ge(N,ie.value),n.showTime&&(F+=" "+vt(N))),F},Ge=(N,F)=>{if(!N)return"";let K;const Ke=ze=>{const qe=K+1<F.length&&F.charAt(K+1)===ze;return qe&&K++,qe},Ze=(ze,qe,Kt)=>{let Qe=""+qe;if(Ke(ze))for(;Qe.length<Kt;)Qe="0"+Qe;return Qe},Ut=(ze,qe,Kt,Qe)=>Ke(ze)?Qe[qe]:Kt[qe];let V="",te=!1;if(N)for(K=0;K<F.length;K++)if(te)F.charAt(K)==="'"&&!Ke("'")?te=!1:V+=F.charAt(K);else switch(F.charAt(K)){case"d":V+=Ze("d",N.getDate(),2);break;case"D":V+=Ut("D",N.getDay(),r.locale.global.dayNamesShort,r.locale.global.dayNames);break;case"o":V+=Ze("o",Math.round((new Date(N.getFullYear(),N.getMonth(),N.getDate()).getTime()-new Date(N.getFullYear(),0,0).getTime())/864e5),3);break;case"m":V+=Ze("m",N.getMonth()+1,2);break;case"M":V+=Ut("M",N.getMonth(),r.locale.global.monthNamesShort,r.locale.global.monthNames);break;case"y":V+=Ke("y")?N.getFullYear():(N.getFullYear()%100<10?"0":"")+N.getFullYear()%100;break;case"@":V+=N.getTime();break;case"!":V+=N.getTime()*1e4+o;break;case"'":Ke("'")?V+="'":te=!0;break;default:V+=F.charAt(K)}return V},vt=N=>{if(!N)return"";let F="",K=N.getHours();const Ke=N.getMinutes();return n.hourFormat==="12"&&K>11&&K!==12&&(K-=12),n.hourFormat==="12"?F+=K===0?12:K<10?"0"+K:K:F+=K<10?"0"+K:K,F+=":",F+=Ke<10?"0"+Ke:Ke,n.hourFormat==="12"&&(F+=N.getHours()>11?` ${r.locale.global.pm}`:` ${r.locale.global.am}`),F},On=N=>{let F=new Date(N.year,N.month,N.day);n.showTime&&(F.setHours(f.value+(n.hourFormat==="12"&&f.value!==12&&w.value?12:0)),F.setMinutes(p.value),F.setSeconds(h.value)),n.minDate&&n.minDate>F&&(F=n.minDate,f.value=F.getHours(),p.value=F.getMinutes(),h.value=F.getSeconds()),n.maxDate&&n.maxDate<F&&(F=n.maxDate,f.value=F.getHours(),p.value=F.getMinutes(),h.value=F.getSeconds());let K=null;if(U(M.value))K=F;else if(ke()){let Ke=M.value;if(Ke&&Ke.length){const Ze=Ke.findIndex(Ut=>Ut.getFullYear()===F.getFullYear()&&Ut.getMonth()===F.getMonth()&&Ut.getDate()===F.getDate());Ze!==-1?Ke.splice(Ze,1):Ke=[...Ke,F],Ke.sort((Ut,V)=>Ut.getTime()-V.getTime())}else Ke=[F];K=Ke}else if(n.exactSelection)K=Mr(N,F);else if(J())if(M.value&&M.value.length){let Ke=M.value[0],Ze=M.value[se(M.value)];!Ze&&F.getTime()>=Ke.getTime()?Ze=F:(Ke=F,Ze=null),K=[Ke,Ze]}else K=[F,null];K!==null&&pn(K),bn(K),i("dateSelect",F)},bn=N=>{const F=n.exactSelection?N.length>1:N&&N[se(N)]!==null;J()&&n.hideOnRangeSelection&&!n.showButtons&&!n.showTime&&F&&_i()},Mr=(N,F)=>{const K=I.value;if(!I.value||K.day===N.day)return I.value=N,R.value=D.value,[F];const Ke=K.month===N.month?D.value.filter(Ze=>Ze.day>K.day&&Ze.day<N.day).map(Ze=>new Date(Ze.year,Ze.month,Ze.day)):[...R.value.filter(Ze=>!Ze.otherMonth&&Ze.day>K.day).map(Ze=>new Date(Ze.year,Ze.month,Ze.day)),...D.value.filter(Ze=>!Ze.otherMonth&&Ze.day<N.day).map(Ze=>new Date(Ze.year,Ze.month,Ze.day))];return[new Date(K.year,K.month,K.day),...Ke,F]},_i=()=>{setTimeout(()=>{var N;(N=a.value)==null||N.hide()},150)};return $e(()=>[n.minDate,n.maxDate,n.excludeDates,n.maxYear,n.maxMonth],()=>Z()),$e(()=>M.value,()=>{at(),S.value=_t()},{immediate:!0}),(n.showButtons||n.showTime)&&$e(m,()=>{at(),S.value=_t()},{immediate:!0,deep:!0}),(N,F)=>(g(),P(pi,{ref_key:"wrapper",ref:l,info:N.fieldInfo,label:N.label,mandatory:N.mandatory,"show-optional-text":N.showOptionalText},{default:H(()=>[Q(N.$slots,"default",{onClick:ee},()=>[L(fo,{disabled:N.disabled},{default:H(()=>[E("span",T(N.$preset.calendar.root({props:n}),{id:N.id,"data-wv-name":"calendar","data-wv-section":"root"}),[E("input",T({id:N.inputId,ref_key:"input",ref:s,"aria-invalid":N.invalid||void 0,disabled:N.disabled,placeholder:N.placeholder??x(r).locale.defaultPlaceholder,tabindex:0,value:S.value,onClick:ee,"aria-autocomplete":"none",autocomplete:"off",inputmode:"none",readonly:"",role:"combobox",type:"text"},N.$preset.calendar.input({props:n})),null,16,RE),L(Ee,T({onClick:Y,icon:"calendar"},N.$preset.calendar.inputicon),null,16)],16,DE)]),_:1},8,["disabled"])]),L(x(hp),{ref_key:"overlayPanel",ref:a,pt:{root:{class:[N.$preset.overlaypanel.root.class,"!mt-0",n.overlayClass]}},onHide:we},{default:H(()=>[E("div",T(N.$preset.calendar.panel({props:n}),{"data-wv-section":"panel"}),[E("div",T(N.$preset.calendar.container,{"data-wv-section":"container"}),[E("div",T(N.$preset.calendar.header({props:n,state:{currentView:b.value}}),{"data-wv-section":"navigation"}),[L(We,{onClick:le,class:"rotate-180 !p-1","data-wv-section":"prevbutton",icon:"arrow-right","icon-class":"w-5 h-5",severity:"secondary",text:""}),E("div",BE,[b.value=="date"?(g(),O("button",T({key:0},N.$preset.calendar.monthTitle,{onClick:F[0]||(F[0]=K=>b.value="month")}),_(N.$wangsvue.config.locale.global.monthNamesShort[c.value]),17)):B("",!0),b.value!="year"?(g(),O("button",T({key:1},N.$preset.calendar.yearTitle({props:n}),{onClick:F[1]||(F[1]=K=>b.value="year")}),_(d.value),17)):B("",!0),b.value=="year"?(g(),O("span",NE,_(ae.value[0].value)+" - "+_(ae.value[ae.value.length-1].value),1)):B("",!0)]),L(We,{onClick:Se,class:"!p-1","data-wv-section":"nextbutton",icon:"arrow-right","icon-class":"w-5 h-5",severity:"secondary",text:""})],16),b.value==="date"?(g(),O("div",$E,[E("div",VE,[E("div",zE,[(g(!0),O(ue,null,Je(N.$wangsvue.config.locale.global.dayNamesShort,K=>(g(),O("span",{key:K,abbr:"day",class:"text-center","data-wv-section":"weekday"},_(K),1))),128))])]),E("div",FE,[(g(!0),O(ue,null,Je(D.value,(K,Ke)=>(g(),O("span",{key:Ke,"aria-label":K.day.toString(),"data-wv-other-month":K.otherMonth,"data-wv-today":K.today,"data-wv-section":"day"},[A.value&&!K.otherMonth?(g(),P(x(dl),{key:0,class:"!w-8 !h-8",shape:"circle"})):A.value?B("",!0):(g(),O("span",T({key:1,"aria-disabled":!K.selectable,"data-p-disabled":K.otherMonth||!K.selectable,onClick:Ze=>ln(Ze,K),ref_for:!0},N.$preset.calendar.daylabel({context:{date:K,today:K.today,otherMonth:K.otherMonth,selected:De(K),firstSelected:nt(K),lastSelected:St(K),disabled:!K.selectable}}),{"data-wv-section":"daylabel",draggable:"false",tabindex:"0"}),[K.otherMonth?B("",!0):(g(),O(ue,{key:0},[ht(_(K.day),1)],64))],16,jE))],8,HE))),128))])])):B("",!0),b.value==="month"?(g(),O("div",T({key:1,"data-wv-section":"monthpicker"},N.$preset.calendar.monthpicker),[(g(!0),O(ue,null,Je(ve.value,(K,Ke)=>(g(),O("span",T({key:K.value,ref_for:!0},N.$preset.calendar.month({context:{month:K,monthIndex:Ke,selected:lt(Ke),disabled:!K.selectable}}),{"data-p-disabled":!K.selectable,"data-p-highlight":lt(Ke),onClick:Ze=>un(Ze,K)}),_(N.$wangsvue.config.locale.global.monthNamesShort[K.value]),17,UE))),128))],16)):B("",!0),b.value==="year"?(g(),O("div",it(T({key:2},N.$preset.calendar.yearpicker)),[(g(!0),O(ue,null,Je(ae.value,K=>(g(),O("span",T({key:K.value,ref_for:!0},N.$preset.calendar.year({context:{year:K,selected:bt(K.value),disabled:!K.selectable}}),{"data-p-disabled":!K.selectable,"data-p-highlight":bt(K.value),onClick:Ke=>en(Ke,K)}),_(K.value),17,KE))),128))],16)):B("",!0)],16),N.showTime&&b.value==="date"?(g(),O("div",T({key:0},N.$preset.calendar.timepicker,{"data-wv-section":"timepicker"}),[E("div",T(N.$preset.calendar.hourpicker,{"data-wv-section":"hourpicker"}),[E("button",T({"aria-label":N.$wangsvue.config.locale.global.nextHour,onKeydown:[Jt,F[2]||(F[2]=Bn(K=>Vt(K,0,1),["enter"])),F[3]||(F[3]=Bn(K=>Vt(K,0,1),["space"]))],onKeyup:[F[4]||(F[4]=Bn(K=>Dt(K),["enter"])),F[5]||(F[5]=Bn(K=>Dt(K),["space"]))],onMousedown:F[6]||(F[6]=K=>Vt(K,0,1)),onMouseleave:F[7]||(F[7]=K=>Sn()),onMouseup:F[8]||(F[8]=K=>Dt(K))},N.$preset.calendar.incrementbutton,{"data-wv-group-section":"hourpicker","data-wv-section":"incrementbutton",type:"button"}),[Q(N.$slots,"incrementicon",{},()=>[L(Ee,T({"data-wv-group-section":"hourpicker","data-wv-section":"incrementicon",icon:"arrow-up-s"},N.$preset.calendar.incrementicon),null,16)])],16,WE),E("span",T(N.$preset.calendar.timepickerlabel,{"data-wv-group-section":"hourpicker","data-wv-section":"timepickerlabel"}),_($.value),17),E("button",T({"aria-label":N.$wangsvue.config.locale.global.prevHour,onKeydown:[Jt,F[9]||(F[9]=Bn(K=>Vt(K,0,-1),["enter"])),F[10]||(F[10]=Bn(K=>Vt(K,0,-1),["space"]))],onKeyup:[F[11]||(F[11]=Bn(K=>Dt(K),["enter"])),F[12]||(F[12]=Bn(K=>Dt(K),["space"]))],onMousedown:F[13]||(F[13]=K=>Vt(K,0,-1)),onMouseleave:F[14]||(F[14]=K=>Sn()),onMouseup:F[15]||(F[15]=K=>Dt(K))},N.$preset.calendar.decrementbutton,{"data-wv-group-section":"hourpicker","data-wv-section":"decrementbutton",type:"button"}),[Q(N.$slots,"decrementicon",{},()=>[L(Ee,T({"data-wv-group-section":"hourpicker","data-wv-section":"decrementicon",icon:"arrow-down"},N.$preset.calendar.decrementicon),null,16)])],16,qE)],16),E("div",T(N.$preset.calendar.separatorcontainer,{"data-wv-section":"separatorcontainer"}),[E("span",T(N.$preset.calendar.separator,{"data-wv-section":"separator"}),_(N.timeSeparator),17)],16),E("div",T(N.$preset.calendar.minutepicker,{"data-wv-section":"minutepicker"}),[E("button",T({"aria-label":N.$wangsvue.config.locale.global.nextMinute,disabled:N.disabled,onKeydown:[Jt,F[16]||(F[16]=Bn(K=>Vt(K,1,1),["enter"])),F[17]||(F[17]=Bn(K=>Vt(K,1,1),["space"]))],onKeyup:[F[18]||(F[18]=Bn(K=>Dt(K),["enter"])),F[19]||(F[19]=Bn(K=>Dt(K),["space"]))],onMousedown:F[20]||(F[20]=K=>Vt(K,1,1)),onMouseleave:F[21]||(F[21]=K=>Sn()),onMouseup:F[22]||(F[22]=K=>Dt(K))},N.$preset.calendar.incrementbutton,{"data-wv-group-section":"minutepicker","data-wv-section":"incrementbutton",type:"button"}),[Q(N.$slots,"incrementicon",{},()=>[L(Ee,T({"data-wv-group-section":"minutepicker","data-wv-section":"incrementicon",icon:"arrow-up-s"},N.$preset.calendar.incrementicon),null,16)])],16,XE),E("span",T(N.$preset.calendar.timepickerlabel,{"data-wv-section":"timepickerlabel"}),_(W.value),17),E("button",T({"aria-label":N.$wangsvue.config.locale.global.prevMinute,disabled:N.disabled,onKeydown:[Jt,F[23]||(F[23]=Bn(K=>Vt(K,1,-1),["enter"])),F[24]||(F[24]=Bn(K=>Vt(K,1,-1),["space"]))],onKeyup:[F[25]||(F[25]=Bn(K=>Dt(K),["enter"])),F[26]||(F[26]=Bn(K=>Dt(K),["space"]))],onMousedown:F[27]||(F[27]=K=>Vt(K,1,-1)),onMouseleave:F[28]||(F[28]=K=>Sn()),onMouseup:F[29]||(F[29]=K=>Dt(K))},N.$preset.calendar.decrementbutton,{"data-wv-group-section":"minutepicker","data-wv-section":"decrementbutton",type:"button"}),[Q(N.$slots,"decrementicon",{},()=>[L(Ee,T({"data-wv-group-section":"minutepicker","data-wv-section":"decrementicon",icon:"arrow-down"},N.$preset.calendar.decrementicon),null,16)])],16,GE)],16),N.hourFormat==="12"?(g(),P(x(wb),{key:0,"model-value":w.value,options:[{label:"AM",value:!1},{label:"PM",value:!0}],"onUpdate:modelValue":Re,"option-label":"label","option-value":"value"},null,8,["model-value"])):B("",!0)],16)):B("",!0),Q(N.$slots,"addon-overlay"),N.showButtons||N.showTime?ft((g(),O("div",ZE,[L(We,{label:x(r).locale.cancelFooterButtonLabel,onClick:fe,severity:"secondary",text:""},null,8,["label"]),L(We,{disabled:!M.value,label:x(r).locale.applyFooterButtonLabel,onClick:z},null,8,["disabled","label"])],512)),[[Xn,b.value==="date"]]):B("",!0)],16)]),_:3},8,["pt"]),L(Fn,{message:N.$attrs["error-message"]},null,8,["message"])]),_:3},8,["info","label","mandatory","show-optional-text"]))}}),JE=ce("Calendar",Ae({__name:"Calendar",props:{modelValue:{},dateValue:{},epochTimeMillis:{},valueFormat:{default:"millis"},label:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},overlayClass:{},inputId:{},id:{},mode:{default:"single"},selectionMode:{},hideOnDateTimeSelect:{type:Boolean},hideOnRangeSelection:{type:Boolean,default:!0},view:{default:"date"},showYear:{type:Boolean,default:!0},showButtons:{type:Boolean},useValidator:{type:Boolean},fieldName:{},fieldInfo:{},mandatory:{type:Boolean},showOptionalText:{type:Boolean,default:void 0},invalid:{type:Boolean},validatorMessage:{},customValidation:{},dateFormat:{default:"dd/mm/yy"},hourFormat:{default:"24"},showTime:{type:Boolean},timeSeparator:{default:":"},stepHour:{default:1},stepMinute:{default:1},useTimeFormat:{type:Boolean},onlyWeekdays:{type:Boolean},excludeDates:{},minDate:{},maxDate:{},maxYear:{},maxMonth:{},exactSelection:{type:Boolean}},emits:["update:modelValue","update:epochTimeMillis","monthChange","yearChange","dateSelect"],setup(t,{emit:e}){const n=t,i=e;wt(()=>{n.dateValue!=null&&(o.value=p(n.dateValue),a.value=o.value,s.value++),n.epochTimeMillis!=null&&(o.value=p(n.epochTimeMillis),a.value=o.value,s.value++)});const{locale:r}=Zt("Calendar"),o=re(),s=re(0),{value:a,errorMessage:l}=n.useValidator?Nn(n.fieldName??"date",h=>c(h)):{value:X({get:()=>n.modelValue,set:h=>{i("update:modelValue",h)}})},u=X(()=>n.invalid||"errorMessage"in a&&!!a.errorMessage),c=async h=>{var m,v;return await Et(),typeof n.validatorMessage=="string"&&n.invalid?n.validatorMessage:typeof n.validatorMessage!="string"&&!h&&n.mandatory?((m=n.validatorMessage)==null?void 0:m.empty)??d():!h&&n.mandatory?((v=n.customValidation)==null?void 0:v.empty)??d():!0},d=()=>{var h;return r.emptyInvalidText.replace("{label}",n.label).replace("{formattedLabel}",(h=ep(n.label))==null?void 0:h.toLowerCase())},f=(h,m)=>{(h===n.valueFormat&&n.useValidator||!n.useValidator&&h==="date")&&(a.value=m),h==="date"&&n.useValidator&&i("update:modelValue",m),h==="millis"&&i("update:epochTimeMillis",m)},p=h=>Array.isArray(h)?h.map(m=>m==null?null:new Date(m)):new Date(h);return $e(()=>n.dateValue,()=>{o.value=p(n.dateValue),n.useValidator&&(a.value=o.value),s.value++},{once:!0}),$e(()=>n.epochTimeMillis,()=>{o.value=p(n.epochTimeMillis),n.useValidator&&(a.value=o.value),s.value++}),$e(()=>n.modelValue,()=>{o.value=n.modelValue,n.useValidator&&(a.value=o.value)}),Aa(()=>{o.value=n.valueFormat==="date"?a.value:a.value?p(a.value):a.value}),(h,m)=>(g(),P(_E,T({key:s.value},n,{"error-message":x(l),invalid:u.value,"model-value":o.value,"selection-mode":h.selectionMode||h.mode,"onUpdate:epochTimeMillis":m[0]||(m[0]=v=>f("millis",v)),"onUpdate:modelValue":m[1]||(m[1]=v=>f("date",v))}),{default:H(({onClick:v})=>[Q(h.$slots,"default",{onClick:v})]),"addon-overlay":H(()=>[Q(h.$slots,"addon-overlay")]),_:3},16,["error-message","invalid","model-value","selection-mode"]))}}));var YE={root:"p-card p-component",header:"p-card-header",body:"p-card-body",caption:"p-card-caption",title:"p-card-title",subtitle:"p-card-subtitle",content:"p-card-content",footer:"p-card-footer"},QE=Wt.extend({name:"card",classes:YE}),eI={name:"BaseCard",extends:It,style:QE},Sb={name:"Card",extends:eI,inheritAttrs:!1};function tI(t,e,n,i,r,o){return g(),O("div",T({class:t.cx("root")},t.ptmi("root")),[t.$slots.header?(g(),O("div",T({key:0,class:t.cx("header")},t.ptm("header")),[Q(t.$slots,"header")],16)):B("",!0),E("div",T({class:t.cx("body")},t.ptm("body")),[t.$slots.title||t.$slots.subtitle?(g(),O("div",T({key:0,class:t.cx("caption")},t.ptm("caption")),[t.$slots.title?(g(),O("div",T({key:0,class:t.cx("title")},t.ptm("title")),[Q(t.$slots,"title")],16)):B("",!0),t.$slots.subtitle?(g(),O("div",T({key:1,class:t.cx("subtitle")},t.ptm("subtitle")),[Q(t.$slots,"subtitle")],16)):B("",!0)],16)):B("",!0),E("div",T({class:t.cx("content")},t.ptm("content")),[Q(t.$slots,"content")],16),t.$slots.footer?(g(),O("div",T({key:1,class:t.cx("footer")},t.ptm("footer")),[Q(t.$slots,"footer")],16)):B("",!0)],16)],16)}Sb.render=tI;const nI=ce("Card",Ae({__name:"Card",setup(t){return(e,n)=>(g(),P(x(Sb),null,In({_:2},[e.$slots.header?{name:"header",fn:H(()=>[Q(e.$slots,"header")]),key:"0"}:void 0,e.$slots.title?{name:"title",fn:H(()=>[Q(e.$slots,"title")]),key:"1"}:void 0,e.$slots.subtitle?{name:"subtitle",fn:H(()=>[Q(e.$slots,"subtitle")]),key:"2"}:void 0,e.$slots.content?{name:"content",fn:H(()=>[Q(e.$slots,"content")]),key:"3"}:void 0,e.$slots.footer?{name:"footer",fn:H(()=>[Q(e.$slots,"footer")]),key:"4"}:void 0]),1024))}}));var vp={name:"EyeIcon",extends:vn},iI=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.0535499 7.25213C0.208567 7.59162 2.40413 12.4 7 12.4C11.5959 12.4 13.7914 7.59162 13.9465 7.25213C13.9487 7.2471 13.9506 7.24304 13.952 7.24001C13.9837 7.16396 14 7.08239 14 7.00001C14 6.91762 13.9837 6.83605 13.952 6.76001C13.9506 6.75697 13.9487 6.75292 13.9465 6.74788C13.7914 6.4084 11.5959 1.60001 7 1.60001C2.40413 1.60001 0.208567 6.40839 0.0535499 6.74788C0.0512519 6.75292 0.0494023 6.75697 0.048 6.76001C0.0163137 6.83605 0 6.91762 0 7.00001C0 7.08239 0.0163137 7.16396 0.048 7.24001C0.0494023 7.24304 0.0512519 7.2471 0.0535499 7.25213ZM7 11.2C3.664 11.2 1.736 7.92001 1.264 7.00001C1.736 6.08001 3.664 2.80001 7 2.80001C10.336 2.80001 12.264 6.08001 12.736 7.00001C12.264 7.92001 10.336 11.2 7 11.2ZM5.55551 9.16182C5.98308 9.44751 6.48576 9.6 7 9.6C7.68891 9.59789 8.349 9.32328 8.83614 8.83614C9.32328 8.349 9.59789 7.68891 9.59999 7C9.59999 6.48576 9.44751 5.98308 9.16182 5.55551C8.87612 5.12794 8.47006 4.7947 7.99497 4.59791C7.51988 4.40112 6.99711 4.34963 6.49276 4.44995C5.98841 4.55027 5.52513 4.7979 5.16152 5.16152C4.7979 5.52513 4.55027 5.98841 4.44995 6.49276C4.34963 6.99711 4.40112 7.51988 4.59791 7.99497C4.7947 8.47006 5.12794 8.87612 5.55551 9.16182ZM6.2222 5.83594C6.45243 5.6821 6.7231 5.6 7 5.6C7.37065 5.6021 7.72553 5.75027 7.98762 6.01237C8.24972 6.27446 8.39789 6.62934 8.4 7C8.4 7.27689 8.31789 7.54756 8.16405 7.77779C8.01022 8.00802 7.79157 8.18746 7.53575 8.29343C7.27994 8.39939 6.99844 8.42711 6.72687 8.37309C6.4553 8.31908 6.20584 8.18574 6.01005 7.98994C5.81425 7.79415 5.68091 7.54469 5.6269 7.27312C5.57288 7.00155 5.6006 6.72006 5.70656 6.46424C5.81253 6.20842 5.99197 5.98977 6.2222 5.83594Z",fill:"currentColor"},null,-1),rI=[iI];function oI(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),rI,16)}vp.render=oI;var Cb={name:"RefreshIcon",extends:vn},sI=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.77051 5.96336C6.84324 5.99355 6.92127 6.00891 7.00002 6.00854C7.07877 6.00891 7.1568 5.99355 7.22953 5.96336C7.30226 5.93317 7.36823 5.88876 7.42357 5.83273L9.82101 3.43529C9.93325 3.32291 9.99629 3.17058 9.99629 3.01175C9.99629 2.85292 9.93325 2.70058 9.82101 2.5882L7.42357 0.190763C7.3687 0.131876 7.30253 0.0846451 7.22901 0.0518865C7.15549 0.019128 7.07612 0.00151319 6.99564 9.32772e-05C6.91517 -0.00132663 6.83523 0.0134773 6.7606 0.0436218C6.68597 0.0737664 6.61817 0.118634 6.56126 0.175548C6.50435 0.232462 6.45948 0.300257 6.42933 0.374888C6.39919 0.449519 6.38439 0.529456 6.38581 0.609933C6.38722 0.690409 6.40484 0.769775 6.4376 0.843296C6.47036 0.916817 6.51759 0.982986 6.57647 1.03786L7.95103 2.41241H6.99998C5.46337 2.41241 3.98969 3.02283 2.90314 4.10938C1.81659 5.19593 1.20618 6.66961 1.20618 8.20622C1.20618 9.74283 1.81659 11.2165 2.90314 12.3031C3.98969 13.3896 5.46337 14 6.99998 14C8.53595 13.9979 10.0084 13.3868 11.0945 12.3007C12.1806 11.2146 12.7917 9.74218 12.7938 8.20622C12.7938 8.04726 12.7306 7.89481 12.6182 7.78241C12.5058 7.67001 12.3534 7.60686 12.1944 7.60686C12.0355 7.60686 11.883 7.67001 11.7706 7.78241C11.6582 7.89481 11.5951 8.04726 11.5951 8.20622C11.5951 9.11504 11.3256 10.0035 10.8207 10.7591C10.3157 11.5148 9.59809 12.1037 8.75845 12.4515C7.9188 12.7993 6.99489 12.8903 6.10353 12.713C5.21217 12.5357 4.3934 12.0981 3.75077 11.4554C3.10813 10.8128 2.67049 9.99404 2.49319 9.10268C2.31589 8.21132 2.40688 7.2874 2.75468 6.44776C3.10247 5.60811 3.69143 4.89046 4.44709 4.38554C5.20275 3.88063 6.09116 3.61113 6.99998 3.61113H7.95098L6.57647 4.98564C6.46423 5.09802 6.40119 5.25035 6.40119 5.40918C6.40119 5.56801 6.46423 5.72035 6.57647 5.83273C6.63181 5.88876 6.69778 5.93317 6.77051 5.96336Z",fill:"currentColor"},null,-1),aI=[sI];function lI(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),aI,16)}Cb.render=lI;var kb={name:"SearchMinusIcon",extends:vn},uI=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.0208 12.0411C4.83005 12.0411 3.66604 11.688 2.67596 11.0265C1.68589 10.3649 0.914216 9.42464 0.458534 8.32452C0.00285271 7.22441 -0.116374 6.01388 0.11593 4.84601C0.348235 3.67813 0.921637 2.60537 1.76363 1.76338C2.60562 0.921393 3.67838 0.34799 4.84625 0.115686C6.01412 -0.116618 7.22466 0.00260857 8.32477 0.45829C9.42488 0.913972 10.3652 1.68564 11.0267 2.67572C11.6883 3.66579 12.0414 4.8298 12.0414 6.02056C12.0395 7.41563 11.5542 8.76029 10.6783 9.8305L13.8244 12.9765C13.9367 13.089 13.9997 13.2414 13.9997 13.4003C13.9997 13.5592 13.9367 13.7116 13.8244 13.8241C13.769 13.8801 13.703 13.9245 13.6302 13.9548C13.5575 13.985 13.4794 14.0003 13.4006 14C13.3218 14.0003 13.2437 13.985 13.171 13.9548C13.0982 13.9245 13.0322 13.8801 12.9768 13.8241L9.83082 10.678C8.76059 11.5539 7.4159 12.0393 6.0208 12.0411ZM6.0208 1.20731C5.07199 1.20731 4.14449 1.48867 3.35559 2.0158C2.56669 2.54292 1.95181 3.29215 1.58872 4.16874C1.22562 5.04532 1.13062 6.00989 1.31572 6.94046C1.50083 7.87104 1.95772 8.72583 2.62863 9.39674C3.29954 10.0676 4.15433 10.5245 5.0849 10.7096C6.01548 10.8947 6.98005 10.7997 7.85663 10.4367C8.73322 10.0736 9.48244 9.45868 10.0096 8.66978C10.5367 7.88088 10.8181 6.95337 10.8181 6.00457C10.8181 4.73226 10.3126 3.51206 9.41297 2.6124C8.51331 1.71274 7.29311 1.20731 6.0208 1.20731ZM4.00591 6.60422H8.00362C8.16266 6.60422 8.31518 6.54104 8.42764 6.42859C8.5401 6.31613 8.60328 6.1636 8.60328 6.00456C8.60328 5.84553 8.5401 5.693 8.42764 5.58054C8.31518 5.46809 8.16266 5.40491 8.00362 5.40491H4.00591C3.84687 5.40491 3.69434 5.46809 3.58189 5.58054C3.46943 5.693 3.40625 5.84553 3.40625 6.00456C3.40625 6.1636 3.46943 6.31613 3.58189 6.42859C3.69434 6.54104 3.84687 6.60422 4.00591 6.60422Z",fill:"currentColor"},null,-1),cI=[uI];function dI(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),cI,16)}kb.render=dI;var Tb={name:"SearchPlusIcon",extends:vn},fI=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.67596 11.0265C3.66604 11.688 4.83005 12.0411 6.0208 12.0411C6.81143 12.0411 7.59432 11.8854 8.32477 11.5828C8.86999 11.357 9.37802 11.0526 9.83311 10.6803L12.9768 13.8241C13.0322 13.8801 13.0982 13.9245 13.171 13.9548C13.2437 13.985 13.3218 14.0003 13.4006 14C13.4794 14.0003 13.5575 13.985 13.6302 13.9548C13.703 13.9245 13.769 13.8801 13.8244 13.8241C13.9367 13.7116 13.9997 13.5592 13.9997 13.4003C13.9997 13.2414 13.9367 13.089 13.8244 12.9765L10.6806 9.8328C11.0529 9.37773 11.3572 8.86972 11.5831 8.32452C11.8856 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0267 2.67572C10.3652 1.68564 9.42488 0.913972 8.32477 0.45829C7.22466 0.00260857 6.01412 -0.116618 4.84625 0.115686C3.67838 0.34799 2.60562 0.921393 1.76363 1.76338C0.921637 2.60537 0.348235 3.67813 0.11593 4.84601C-0.116374 6.01388 0.00285271 7.22441 0.458534 8.32452C0.914216 9.42464 1.68589 10.3649 2.67596 11.0265ZM3.35559 2.0158C4.14449 1.48867 5.07199 1.20731 6.0208 1.20731C7.29311 1.20731 8.51331 1.71274 9.41297 2.6124C10.3126 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5367 7.88088 10.0096 8.66978C9.48244 9.45868 8.73322 10.0736 7.85663 10.4367C6.98005 10.7997 6.01548 10.8947 5.0849 10.7096C4.15433 10.5245 3.29954 10.0676 2.62863 9.39674C1.95772 8.72583 1.50083 7.87104 1.31572 6.94046C1.13062 6.00989 1.22562 5.04532 1.58872 4.16874C1.95181 3.29215 2.56669 2.54292 3.35559 2.0158ZM6.00481 8.60309C5.84641 8.60102 5.69509 8.53718 5.58308 8.42517C5.47107 8.31316 5.40722 8.16183 5.40515 8.00344V6.60422H4.00591C3.84687 6.60422 3.69434 6.54104 3.58189 6.42859C3.46943 6.31613 3.40625 6.1636 3.40625 6.00456C3.40625 5.84553 3.46943 5.693 3.58189 5.58054C3.69434 5.46809 3.84687 5.40491 4.00591 5.40491H5.40515V4.00572C5.40515 3.84668 5.46833 3.69416 5.58079 3.5817C5.69324 3.46924 5.84577 3.40607 6.00481 3.40607C6.16385 3.40607 6.31637 3.46924 6.42883 3.5817C6.54129 3.69416 6.60447 3.84668 6.60447 4.00572V5.40491H8.00362C8.16266 5.40491 8.31518 5.46809 8.42764 5.58054C8.5401 5.693 8.60328 5.84553 8.60328 6.00456C8.60328 6.1636 8.5401 6.31613 8.42764 6.42859C8.31518 6.54104 8.16266 6.60422 8.00362 6.60422H6.60447V8.00344C6.60239 8.16183 6.53855 8.31316 6.42654 8.42517C6.31453 8.53718 6.1632 8.60102 6.00481 8.60309Z",fill:"currentColor"},null,-1),pI=[fI];function hI(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),pI,16)}Tb.render=hI;var Ob={name:"UndoIcon",extends:vn},mI=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.77042 5.96336C6.84315 5.99355 6.92118 6.00891 6.99993 6.00854C7.07868 6.00891 7.15671 5.99355 7.22944 5.96336C7.30217 5.93317 7.36814 5.88876 7.42348 5.83273C7.53572 5.72035 7.59876 5.56801 7.59876 5.40918C7.59876 5.25035 7.53572 5.09802 7.42348 4.98564L6.04897 3.61113H6.99998C7.9088 3.61113 8.79722 3.88063 9.55288 4.38554C10.3085 4.89046 10.8975 5.60811 11.2453 6.44776C11.5931 7.2874 11.6841 8.21132 11.5068 9.10268C11.3295 9.99404 10.8918 10.8128 10.2492 11.4554C9.60657 12.0981 8.7878 12.5357 7.89644 12.713C7.00508 12.8903 6.08116 12.7993 5.24152 12.4515C4.40188 12.1037 3.68422 11.5148 3.17931 10.7591C2.67439 10.0035 2.4049 9.11504 2.4049 8.20622C2.4049 8.04726 2.34175 7.89481 2.22935 7.78241C2.11695 7.67001 1.9645 7.60686 1.80554 7.60686C1.64658 7.60686 1.49413 7.67001 1.38172 7.78241C1.26932 7.89481 1.20618 8.04726 1.20618 8.20622C1.20829 9.74218 1.81939 11.2146 2.90548 12.3007C3.99157 13.3868 5.46402 13.9979 6.99998 14C8.5366 14 10.0103 13.3896 11.0968 12.3031C12.1834 11.2165 12.7938 9.74283 12.7938 8.20622C12.7938 6.66961 12.1834 5.19593 11.0968 4.10938C10.0103 3.02283 8.5366 2.41241 6.99998 2.41241H6.04892L7.42348 1.03786C7.48236 0.982986 7.5296 0.916817 7.56235 0.843296C7.59511 0.769775 7.61273 0.690409 7.61415 0.609933C7.61557 0.529456 7.60076 0.449519 7.57062 0.374888C7.54047 0.300257 7.49561 0.232462 7.43869 0.175548C7.38178 0.118634 7.31398 0.0737664 7.23935 0.0436218C7.16472 0.0134773 7.08478 -0.00132663 7.00431 9.32772e-05C6.92383 0.00151319 6.84447 0.019128 6.77095 0.0518865C6.69742 0.0846451 6.63126 0.131876 6.57638 0.190763L4.17895 2.5882C4.06671 2.70058 4.00366 2.85292 4.00366 3.01175C4.00366 3.17058 4.06671 3.32291 4.17895 3.43529L6.57638 5.83273C6.63172 5.88876 6.69769 5.93317 6.77042 5.96336Z",fill:"currentColor"},null,-1),gI=[mI];function vI(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),gI,16)}Ob.render=vI;var yI={root:function(e){var n=e.props;return["p-image p-component",{"p-image-preview-container":n.preview}]},image:function(e){var n=e.props;return n.image},button:"p-image-preview-indicator",icon:"p-image-preview-icon",mask:"p-image-mask p-component-overlay p-component-overlay-enter",toolbar:"p-image-toolbar",rotateRightButton:"p-image-action p-link",rotateLeftButton:"p-image-action p-link",zoomOutButton:function(e){var n=e.instance;return["p-image-action p-link",{"p-disabled":n.isZoomOutDisabled}]},zoomInButton:function(e){var n=e.instance;return["p-image-action p-link",{"p-disabled":n.isZoomInDisabled}]},closeButton:"p-image-action p-link",preview:"p-image-preview"},bI=Wt.extend({name:"image",classes:yI}),AI={name:"BaseImage",extends:It,props:{preview:{type:Boolean,default:!1},class:{type:null,default:null},style:{type:null,default:null},imageStyle:{type:null,default:null},imageClass:{type:null,default:null},previewButtonProps:{type:null,default:null},indicatorIcon:{type:String,default:void 0},zoomInDisabled:{type:Boolean,default:!1},zoomOutDisabled:{type:Boolean,default:!1}},style:bI,provide:function(){return{$parentInstance:this}}},xb={name:"Image",extends:AI,inheritAttrs:!1,emits:["show","hide","error"],mask:null,data:function(){return{maskVisible:!1,previewVisible:!1,rotate:0,scale:1}},beforeUnmount:function(){this.mask&&dn.clear(this.container)},methods:{maskRef:function(e){this.mask=e},toolbarRef:function(e){this.toolbarRef=e},onImageClick:function(){var e=this;this.preview&&(G.blockBodyScroll(),this.maskVisible=!0,setTimeout(function(){e.previewVisible=!0},25))},onPreviewImageClick:function(){this.previewClick=!0},onMaskClick:function(e){var n=G.isAttributeEquals(e.target,"data-pc-section-group","action")||e.target.closest('[data-pc-section-group="action"]');!this.previewClick&&!n&&(this.previewVisible=!1,this.rotate=0,this.scale=1),this.previewClick=!1},onMaskKeydown:function(e){var n=this;switch(e.code){case"Escape":this.hidePreview(),setTimeout(function(){G.focus(n.$refs.previewButton)},200),e.preventDefault();break}},onError:function(){this.$emit("error")},rotateRight:function(){this.rotate+=90,this.previewClick=!0},rotateLeft:function(){this.rotate-=90,this.previewClick=!0},zoomIn:function(){this.scale=this.scale+.1,this.previewClick=!0},zoomOut:function(){this.scale=this.scale-.1,this.previewClick=!0},onBeforeEnter:function(){dn.set("modal",this.mask,this.$primevue.config.zIndex.modal)},onEnter:function(){this.focus(),this.$emit("show")},onBeforeLeave:function(){!this.isUnstyled&&G.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){G.unblockBodyScroll(),this.$emit("hide")},onAfterLeave:function(e){dn.clear(e),this.maskVisible=!1},focus:function(){var e=this.mask.querySelector("[autofocus]");e&&e.focus()},hidePreview:function(){this.previewVisible=!1,this.rotate=0,this.scale=1,G.unblockBodyScroll()}},computed:{containerClass:function(){return[this.cx("root"),this.class]},rotateClass:function(){return"p-image-preview-rotate-"+this.rotate},imagePreviewStyle:function(){return{transform:"rotate("+this.rotate+"deg) scale("+this.scale+")"}},isZoomInDisabled:function(){return this.zoomInDisabled||this.scale>=1.5},isZoomOutDisabled:function(){return this.zoomOutDisabled||this.scale<=.5},rightAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateRight:void 0},leftAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.rotateLeft:void 0},zoomInAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomIn:void 0},zoomOutAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomOut:void 0},zoomImageAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.zoomImage:void 0},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},components:{Portal:$r,EyeIcon:vp,RefreshIcon:Cb,UndoIcon:Ob,SearchMinusIcon:kb,SearchPlusIcon:Tb,TimesIcon:fr},directives:{focustrap:rp}};function fl(t){"@babel/helpers - typeof";return fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fl(t)}function Mb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function _u(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mb(Object(n),!0).forEach(function(i){wI(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mb(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function wI(t,e,n){return e=SI(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function SI(t){var e=CI(t,"string");return fl(e)=="symbol"?e:String(e)}function CI(t,e){if(fl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(fl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var kI=["aria-label"],TI=["aria-modal"],OI=["aria-label"],xI=["aria-label"],MI=["disabled","aria-label"],EI=["disabled","aria-label"],II=["aria-label"],PI=["src"];function LI(t,e,n,i,r,o){var s=et("RefreshIcon"),a=et("UndoIcon"),l=et("SearchMinusIcon"),u=et("SearchPlusIcon"),c=et("TimesIcon"),d=et("Portal"),f=on("focustrap");return g(),O("span",T({class:o.containerClass,style:t.style},t.ptmi("root")),[Q(t.$slots,"image",{onError:o.onError,errorCallback:o.onError},function(){return[E("img",T({style:t.imageStyle,class:[t.cx("image"),t.imageClass],onError:e[0]||(e[0]=function(){return o.onError&&o.onError.apply(o,arguments)})},_u(_u({},t.$attrs),t.ptm("image"))),null,16)]}),t.preview?(g(),O("button",T({key:0,ref:"previewButton","aria-label":o.zoomImageAriaLabel,type:"button",class:t.cx("button"),onClick:e[1]||(e[1]=function(){return o.onImageClick&&o.onImageClick.apply(o,arguments)})},_u(_u({},t.previewButtonProps),t.ptm("button"))),[Q(t.$slots,"indicatoricon",{},function(){return[(g(),P(yt(t.indicatorIcon?"i":"EyeIcon"),T({class:t.cx("icon")},t.ptm("icon")),null,16,["class"]))]})],16,kI)):B("",!0),L(d,null,{default:H(function(){return[r.maskVisible?ft((g(),O("div",T({key:0,ref:o.maskRef,role:"dialog",class:t.cx("mask"),"aria-modal":r.maskVisible,onClick:e[8]||(e[8]=function(){return o.onMaskClick&&o.onMaskClick.apply(o,arguments)}),onKeydown:e[9]||(e[9]=function(){return o.onMaskKeydown&&o.onMaskKeydown.apply(o,arguments)})},t.ptm("mask")),[E("div",T({class:t.cx("toolbar")},t.ptm("toolbar")),[E("button",T({class:t.cx("rotateRightButton"),onClick:e[2]||(e[2]=function(){return o.rotateRight&&o.rotateRight.apply(o,arguments)}),type:"button","aria-label":o.rightAriaLabel},t.ptm("rotateRightButton"),{"data-pc-group-section":"action"}),[Q(t.$slots,"refresh",{},function(){return[L(s,it(kt(t.ptm("rotateRightIcon"))),null,16)]})],16,OI),E("button",T({class:t.cx("rotateLeftButton"),onClick:e[3]||(e[3]=function(){return o.rotateLeft&&o.rotateLeft.apply(o,arguments)}),type:"button","aria-label":o.leftAriaLabel},t.ptm("rotateLeftButton"),{"data-pc-group-section":"action"}),[Q(t.$slots,"undo",{},function(){return[L(a,it(kt(t.ptm("rotateLeftIcon"))),null,16)]})],16,xI),E("button",T({class:t.cx("zoomOutButton"),onClick:e[4]||(e[4]=function(){return o.zoomOut&&o.zoomOut.apply(o,arguments)}),type:"button",disabled:o.isZoomOutDisabled,"aria-label":o.zoomOutAriaLabel},t.ptm("zoomOutButton"),{"data-pc-group-section":"action"}),[Q(t.$slots,"zoomout",{},function(){return[L(l,it(kt(t.ptm("zoomOutIcon"))),null,16)]})],16,MI),E("button",T({class:t.cx("zoomInButton"),onClick:e[5]||(e[5]=function(){return o.zoomIn&&o.zoomIn.apply(o,arguments)}),type:"button",disabled:o.isZoomInDisabled,"aria-label":o.zoomInAriaLabel},t.ptm("zoomInButton"),{"data-pc-group-section":"action"}),[Q(t.$slots,"zoomin",{},function(){return[L(u,it(kt(t.ptm("zoomInIcon"))),null,16)]})],16,EI),E("button",T({class:t.cx("closeButton"),type:"button",onClick:e[6]||(e[6]=function(){return o.hidePreview&&o.hidePreview.apply(o,arguments)}),"aria-label":o.closeAriaLabel,autofocus:""},t.ptm("closeButton"),{"data-pc-group-section":"action"}),[Q(t.$slots,"close",{},function(){return[L(c,it(kt(t.ptm("closeIcon"))),null,16)]})],16,II)],16),L(Lr,T({name:"p-image-preview",onBeforeEnter:o.onBeforeEnter,onEnter:o.onEnter,onLeave:o.onLeave,onBeforeLeave:o.onBeforeLeave,onAfterLeave:o.onAfterLeave},t.ptm("transition")),{default:H(function(){return[r.previewVisible?(g(),O("div",it(T({key:0},t.ptm("previewContainer"))),[Q(t.$slots,"preview",{class:pe(t.cx("preview")),style:Yi(o.imagePreviewStyle),onClick:o.onPreviewImageClick,previewCallback:o.onPreviewImageClick},function(){return[E("img",T({src:t.$attrs.src,class:t.cx("preview"),style:o.imagePreviewStyle,onClick:e[7]||(e[7]=function(){return o.onPreviewImageClick&&o.onPreviewImageClick.apply(o,arguments)})},t.ptm("preview")),null,16,PI)]})],16)):B("",!0)]}),_:3},16,["onBeforeEnter","onEnter","onLeave","onBeforeLeave","onAfterLeave"])],16,TI)),[[f]]):B("",!0)]}),_:3})],16)}xb.render=LI;const DI=["src"],RI=["src"],BI=["src"],NI=["src","onClick"],hr=ce("Image",Ae({__name:"Image",props:{src:{},preview:{type:Boolean,default:!0},size:{},width:{},rounded:{type:Boolean},imageStyle:{},imageClass:{},galleries:{},indicatorIcon:{},zoomInDisabled:{type:Boolean},zoomOutDisabled:{type:Boolean},pt:{},ptOptions:{},unstyled:{type:Boolean},getImageURL:{},placeholder:{}},setup(t){const e=t,{defaultProps:n}=Zt("Image"),i=X(()=>zi(e,n));wt(()=>{setTimeout(()=>{d()},3e3)}),Fo(()=>{f()});const r=oe(0),o=oe(),s=oe(),a=oe(!1),l=X(()=>{var k;return e.preview===!1?!1:!a.value&&!((k=h.value)!=null&&k.toString().includes("data:image/png;base64"))&&h.value!==i.value.placeholder}),u=()=>{const k=e.galleries??[];r.value=(r.value+1)%k.length,v()},c=()=>{const k=e.galleries??[];r.value=(r.value-1+k.length)%k.length,v()},d=()=>{var k;f(),(k=e.galleries)!=null&&k.length&&(o.value=window.setInterval(()=>{const A=e.galleries??[];r.value=(r.value+1)%A.length},3e3))},f=()=>{o.value&&(window.clearInterval(o.value),o.value=void 0)},p=X(()=>e.width!=null?e.width:e.size==="small"?30:e.size==="medium"?80:125),h=X(()=>{var k,A;return!e.src||a.value?i.value.placeholder:typeof e.src=="string"?e.src.includes("http")||e.src.includes("data:image/png;base64")?e.src:(A=(k=i.value).getImageURL)==null?void 0:A.call(k,e.src,p.value):e.src}),m=X(()=>{var A,w,y,C;const k=h.value;if(typeof k=="string"){const I=(w=(A=i.value).getImageURL)==null?void 0:w.call(A,"preview"),R=I&&!(I!=null&&I.includes("undefined"))?new URL(I).origin:"",M=R&&k.includes(R);return k.includes("http")&&!M||k.includes("data:image/svg+xml")?k:(C=(y=i.value).getImageURL)==null?void 0:C.call(y,e.src)}return k}),v=k=>{f(),typeof k=="number"&&(r.value=k),s.value?window.clearTimeout(s.value):window.setTimeout(d,3e3)},S=k=>{var w;const A=(w=k.target)==null?void 0:w.src;(A===h.value||A.includes(h.value.toString()))&&(a.value=!0)},b=k=>{var w,y;const A=k;return typeof A=="string"?A.includes("http")?A:(y=(w=i.value).getImageURL)==null?void 0:y.call(w,A):A};return(k,A)=>{var w;return g(),P(x(xb),T(k.$props,{preview:l.value,pt:{root:(w=k.$preset.image)==null?void 0:w.root({props:k.$props})}}),{image:H(()=>{var y;return[E("img",T((y=k.$preset.image)==null?void 0:y.image({props:k.$props,context:{imageSize:p.value}}),{onerror:S,src:h.value,alt:""}),null,16,DI)]}),indicatoricon:H(()=>[L(Ee,T(k.$preset.image.icon,{icon:"eye"}),null,16)]),preview:H(y=>{var C;return[(C=k.galleries)!=null&&C.length?(g(),O(ue,{key:1},[(g(!0),O(ue,null,Je(k.galleries,({src:I},R)=>ft((g(),O("img",{key:R,onerror:S,src:b(I),style:Yi(y.style),alt:"","data-wv-section":"image-gallery"},null,12,BI)),[[Xn,R===r.value]])),128)),E("div",{onClick:A[0]||(A[0]=Ot(()=>{},["stop"])),class:"fixed bottom-0 left-0 flex justify-center items-center w-full p-4 mx-auto flex-row bg-black/80","data-wv-section":"gallery-thumbnail"},[L(We,{class:pe(["text-surface-0 rotate-180 sticky left-0 !w-8 !h-8 [&_i]:w-5 [&_i]:h-5","rounded-full mr-3"]),onClick:c,"aria-label":"Previous Image","data-wv-section":"prev-button",icon:"arrow-right","icon-class":"w-5 h-5",severity:"secondary",text:""}),(g(!0),O(ue,null,Je(k.galleries,({src:I},R)=>(g(),O("img",{key:R,class:pe(["h-10 w-10 object-cover cursor-pointer opacity-50 hover:opacity-100 transition-opacity",{"!opacity-100":r.value==R}]),onerror:S,src:b(I),style:Yi(y.style),onClick:Ot(M=>v(R),["stop"]),alt:"","data-wv-section":"thumbnail-image"},null,14,NI))),128)),L(We,{class:pe(["text-surface-0 sticky !w-8 !h-8 [&_i]:w-5 [&_i]:h-5","rounded-full ml-3"]),onClick:u,"aria-label":"Next Image","data-wv-section":"next-button",icon:"arrow-right",severity:"secondary",text:""})])],64)):(g(),O("img",{key:0,onerror:S,src:m.value,style:Yi(y.style),alt:""},null,12,RI))]}),_:1},16,["preview","pt"])}}})),$I={class:"flex flex-col gap-1 items-center justify-center w-[125px] overflow-hidden","data-ts-name":"carousel","data-ts-section":"root"},VI={class:"flex gap-1","data-ts-section":"indicators"},zI=["onClick"],JX=ce("Carousel",Ae({__name:"Carousel",props:{value:{}},setup(t){const e=t,n=oe(0),i=oe(),r=oe();wt(()=>{o()}),Fo(()=>{s()});const o=()=>{s(),i.value=window.setInterval(()=>{var l;n.value=(n.value+1)%(((l=e.value)==null?void 0:l.length)??0)},3e3)},s=()=>{i.value&&(window.clearInterval(i.value),i.value=void 0)},a=l=>{s(),n.value=l,r.value?window.clearTimeout(r.value):window.setTimeout(o,3e3)};return(l,u)=>(g(),O("div",$I,[E("div",{class:pe(["relative w-full h-max flex transition-transform duration-300"]),style:Yi(`transform: translateX(${n.value*-100}%)`),"data-ts-section":"carousel-image-wrapper"},[(g(!0),O(ue,null,Je(l.value,c=>{var d;return g(),P(hr,{key:(d=c.src)==null?void 0:d.toString(),galleries:l.value,src:c.src,"data-ts-section":"carousel-image"},null,8,["galleries","src"])}),128))],4),E("div",VI,[(g(!0),O(ue,null,Je(l.value,(c,d)=>(g(),O("span",{key:d,class:pe(["w-1.5 h-1.5 bg-general-100 rounded-full","cursor-pointer",{"!bg-primary-500":d===n.value}]),onClick:f=>a(d),"data-ts-section":"indicator-item"},null,10,zI))),128))])]))}}));var Ju=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var yp,Eb;function bp(){if(Eb)return yp;Eb=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return yp=t,yp}var Ap,Ib;function FI(){if(Ib)return Ap;Ib=1;var t=typeof Ju=="object"&&Ju&&Ju.Object===Object&&Ju;return Ap=t,Ap}var wp,Pb;function Lb(){if(Pb)return wp;Pb=1;var t=FI(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return wp=n,wp}var Sp,Db;function HI(){if(Db)return Sp;Db=1;var t=Lb(),e=function(){return t.Date.now()};return Sp=e,Sp}var Cp,Rb;function jI(){if(Rb)return Cp;Rb=1;var t=/\s/;function e(n){for(var i=n.length;i--&&t.test(n.charAt(i)););return i}return Cp=e,Cp}var kp,Bb;function UI(){if(Bb)return kp;Bb=1;var t=jI(),e=/^\s+/;function n(i){return i&&i.slice(0,t(i)+1).replace(e,"")}return kp=n,kp}var Tp,Nb;function $b(){if(Nb)return Tp;Nb=1;var t=Lb(),e=t.Symbol;return Tp=e,Tp}var Op,Vb;function KI(){if(Vb)return Op;Vb=1;var t=$b(),e=Object.prototype,n=e.hasOwnProperty,i=e.toString,r=t?t.toStringTag:void 0;function o(s){var a=n.call(s,r),l=s[r];try{s[r]=void 0;var u=!0}catch{}var c=i.call(s);return u&&(a?s[r]=l:delete s[r]),c}return Op=o,Op}var xp,zb;function WI(){if(zb)return xp;zb=1;var t=Object.prototype,e=t.toString;function n(i){return e.call(i)}return xp=n,xp}var Mp,Fb;function qI(){if(Fb)return Mp;Fb=1;var t=$b(),e=KI(),n=WI(),i="[object Null]",r="[object Undefined]",o=t?t.toStringTag:void 0;function s(a){return a==null?a===void 0?r:i:o&&o in Object(a)?e(a):n(a)}return Mp=s,Mp}var Ep,Hb;function XI(){if(Hb)return Ep;Hb=1;function t(e){return e!=null&&typeof e=="object"}return Ep=t,Ep}var Ip,jb;function GI(){if(jb)return Ip;jb=1;var t=qI(),e=XI(),n="[object Symbol]";function i(r){return typeof r=="symbol"||e(r)&&t(r)==n}return Ip=i,Ip}var Pp,Ub;function ZI(){if(Ub)return Pp;Ub=1;var t=UI(),e=bp(),n=GI(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return i;if(e(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=e(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=t(u);var d=o.test(u);return d||s.test(u)?a(u.slice(2),d?2:8):r.test(u)?i:+u}return Pp=l,Pp}var Lp,Kb;function Wb(){if(Kb)return Lp;Kb=1;var t=bp(),e=HI(),n=ZI(),i="Expected a function",r=Math.max,o=Math.min;function s(a,l,u){var c,d,f,p,h,m,v=0,S=!1,b=!1,k=!0;if(typeof a!="function")throw new TypeError(i);l=n(l)||0,t(u)&&(S=!!u.leading,b="maxWait"in u,f=b?r(n(u.maxWait)||0,l):f,k="trailing"in u?!!u.trailing:k);function A(W){var ie=c,ve=d;return c=d=void 0,v=W,p=a.apply(ve,ie),p}function w(W){return v=W,h=setTimeout(I,l),S?A(W):p}function y(W){var ie=W-m,ve=W-v,ae=l-ie;return b?o(ae,f-ve):ae}function C(W){var ie=W-m,ve=W-v;return m===void 0||ie>=l||ie<0||b&&ve>=f}function I(){var W=e();if(C(W))return R(W);h=setTimeout(I,y(W))}function R(W){return h=void 0,k&&c?A(W):(c=d=void 0,p)}function M(){h!==void 0&&clearTimeout(h),v=0,c=m=d=h=void 0}function D(){return h===void 0?p:R(e())}function $(){var W=e(),ie=C(W);if(c=arguments,d=this,m=W,ie){if(h===void 0)return w(m);if(b)return clearTimeout(h),h=setTimeout(I,l),A(m)}return h===void 0&&(h=setTimeout(I,l)),p}return $.cancel=M,$.flush=D,$}return Lp=s,Lp}var _I=Wb();const Dp=pl(_I);var Rp,qb;function JI(){if(qb)return Rp;qb=1;var t=Wb(),e=bp(),n="Expected a function";function i(r,o,s){var a=!0,l=!0;if(typeof r!="function")throw new TypeError(n);return e(s)&&(a="leading"in s?!!s.leading:a,l="trailing"in s?!!s.trailing:l),t(r,o,{leading:a,maxWait:o,trailing:l})}return Rp=i,Rp}var YI=JI();const QI=pl(YI);var js=function(){return js=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},js.apply(this,arguments)};function Xb(t){return!t||!t.ownerDocument||!t.ownerDocument.defaultView?window:t.ownerDocument.defaultView}function Gb(t){return!t||!t.ownerDocument?document:t.ownerDocument}var Zb=function(t){var e={},n=Array.prototype.reduce.call(t,function(i,r){var o=r.name.match(/data-simplebar-(.+)/);if(o){var s=o[1].replace(/\W+(.)/g,function(a,l){return l.toUpperCase()});switch(r.value){case"true":i[s]=!0;break;case"false":i[s]=!1;break;case void 0:i[s]=!0;break;default:i[s]=r.value}}return i},e);return n};function _b(t,e){var n;t&&(n=t.classList).add.apply(n,e.split(" "))}function Jb(t,e){t&&e.split(" ").forEach(function(n){t.classList.remove(n)})}function Yb(t){return".".concat(t.split(" ").join("."))}var Bp=!!(typeof window<"u"&&window.document&&window.document.createElement),eP=Object.freeze({__proto__:null,addClasses:_b,canUseDOM:Bp,classNamesToQuery:Yb,getElementDocument:Gb,getElementWindow:Xb,getOptions:Zb,removeClasses:Jb}),Us=null,Qb=null;Bp&&window.addEventListener("resize",function(){Qb!==window.devicePixelRatio&&(Qb=window.devicePixelRatio,Us=null)});function e0(){if(Us===null){if(typeof document>"u")return Us=0,Us;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var n=e.getBoundingClientRect().right;t.removeChild(e),Us=n}return Us}var po=Xb,Np=Gb,tP=Zb,ho=_b,mo=Jb,wi=Yb,hl=function(){function t(e,n){n===void 0&&(n={});var i=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var r=po(i.el);i.scrollXTicking||(r.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(r.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0),i.isScrolling||(i.isScrolling=!0,ho(i.el,i.classNames.scrolling)),i.showScrollbar("x"),i.showScrollbar("y"),i.onStopScrolling()},this.scrollX=function(){i.axis.x.isOverflowing&&i.positionScrollbar("x"),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&i.positionScrollbar("y"),i.scrollYTicking=!1},this._onStopScrolling=function(){mo(i.el,i.classNames.scrolling),i.options.autoHide&&(i.hideScrollbar("x"),i.hideScrollbar("y")),i.isScrolling=!1},this.onMouseEnter=function(){i.isMouseEntering||(ho(i.el,i.classNames.mouseEntered),i.showScrollbar("x"),i.showScrollbar("y"),i.isMouseEntering=!0),i.onMouseEntered()},this._onMouseEntered=function(){mo(i.el,i.classNames.mouseEntered),i.options.autoHide&&(i.hideScrollbar("x"),i.hideScrollbar("y")),i.isMouseEntering=!1},this._onMouseMove=function(r){i.mouseX=r.clientX,i.mouseY=r.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this._onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.onPointerEvent=function(r){if(!(!i.axis.x.track.el||!i.axis.y.track.el||!i.axis.x.scrollbar.el||!i.axis.y.scrollbar.el)){var o,s;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(o=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(s=i.isWithinBounds(i.axis.y.track.rect)),(o||s)&&(r.stopPropagation(),r.type==="pointerdown"&&r.pointerType!=="touch"&&(o&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(r,"x"):i.onTrackClick(r,"x")),s&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(r,"y"):i.onTrackClick(r,"y"))))}},this.drag=function(r){var o,s,a,l,u,c,d,f,p,h,m;if(!(!i.draggedAxis||!i.contentWrapperEl)){var v,S=i.axis[i.draggedAxis].track,b=(s=(o=S.rect)===null||o===void 0?void 0:o[i.axis[i.draggedAxis].sizeAttr])!==null&&s!==void 0?s:0,k=i.axis[i.draggedAxis].scrollbar,A=(l=(a=i.contentWrapperEl)===null||a===void 0?void 0:a[i.axis[i.draggedAxis].scrollSizeAttr])!==null&&l!==void 0?l:0,w=parseInt((c=(u=i.elStyles)===null||u===void 0?void 0:u[i.axis[i.draggedAxis].sizeAttr])!==null&&c!==void 0?c:"0px",10);r.preventDefault(),r.stopPropagation(),i.draggedAxis==="y"?v=r.pageY:v=r.pageX;var y=v-((f=(d=S.rect)===null||d===void 0?void 0:d[i.axis[i.draggedAxis].offsetAttr])!==null&&f!==void 0?f:0)-i.axis[i.draggedAxis].dragOffset;y=i.draggedAxis==="x"&&i.isRtl?((h=(p=S.rect)===null||p===void 0?void 0:p[i.axis[i.draggedAxis].sizeAttr])!==null&&h!==void 0?h:0)-k.size-y:y;var C=y/(b-k.size),I=C*(A-w);i.draggedAxis==="x"&&i.isRtl&&(I=!((m=t.getRtlHelpers())===null||m===void 0)&&m.isScrollingToNegative?-I:I),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=I}},this.onEndDrag=function(r){i.isDragging=!1;var o=Np(i.el),s=po(i.el);r.preventDefault(),r.stopPropagation(),mo(i.el,i.classNames.dragging),i.onStopScrolling(),o.removeEventListener("mousemove",i.drag,!0),o.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=s.setTimeout(function(){o.removeEventListener("click",i.preventClick,!0),o.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null})},this.preventClick=function(r){r.preventDefault(),r.stopPropagation()},this.el=e,this.options=js(js({},t.defaultOptions),n),this.classNames=js(js({},t.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=QI(this._onMouseMove,64),this.onWindowResize=Dp(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=Dp(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Dp(this._onMouseEntered,this.stopScrollDelay),this.init()}return t.getRtlHelpers=function(){if(t.rtlHelpers)return t.rtlHelpers;var e=document.createElement("div");e.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=e.firstElementChild,i=n==null?void 0:n.firstElementChild;if(!i)return null;document.body.appendChild(n),n.scrollLeft=0;var r=t.getOffset(n),o=t.getOffset(i);n.scrollLeft=-999;var s=t.getOffset(i);return document.body.removeChild(n),t.rtlHelpers={isScrollOriginAtZero:r.left!==o.left,isScrollingToNegative:o.left!==s.left},t.rtlHelpers},t.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:e0()}catch{return e0()}},t.getOffset=function(e){var n=e.getBoundingClientRect(),i=Np(e),r=po(e);return{top:n.top+(r.pageYOffset||i.documentElement.scrollTop),left:n.left+(r.pageXOffset||i.documentElement.scrollLeft)}},t.prototype.init=function(){Bp&&(this.initDOM(),this.rtlHelpers=t.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.prototype.initDOM=function(){var e,n;this.wrapperEl=this.el.querySelector(wi(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(wi(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(wi(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(wi(this.classNames.offset)),this.maskEl=this.el.querySelector(wi(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,wi(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(wi(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(wi(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(wi(this.classNames.track)).concat(wi(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(wi(this.classNames.track)).concat(wi(this.classNames.vertical))),this.axis.x.scrollbar.el=((e=this.axis.x.track.el)===null||e===void 0?void 0:e.querySelector(wi(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(wi(this.classNames.scrollbar)))||null,this.options.autoHide||(ho(this.axis.x.scrollbar.el,this.classNames.visible),ho(this.axis.y.scrollbar.el,this.classNames.visible))},t.prototype.initListeners=function(){var e=this,n,i=po(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),i.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var r=!1,o=i.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){r&&i.requestAnimationFrame(function(){e.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),i.requestAnimationFrame(function(){r=!0})}this.mutationObserver=new i.MutationObserver(function(){i.requestAnimationFrame(function(){e.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},t.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var e=po(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,i=this.heightAutoObserverEl.offsetHeight<=1,r=this.heightAutoObserverEl.offsetWidth<=1||n>0,o=this.contentWrapperEl.offsetWidth,s=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var l=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=r?"".concat(n||u,"px"):"auto",this.placeholderEl.style.height="".concat(l,"px");var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&u>n,this.axis.y.isOverflowing=l>c,this.axis.x.isOverflowing=s==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=a==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var d=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>o-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&l>c-d,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},t.prototype.getScrollbarSize=function(e){var n,i;if(e===void 0&&(e="y"),!this.axis[e].isOverflowing||!this.contentEl)return 0;var r=this.contentEl[this.axis[e].scrollSizeAttr],o=(i=(n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])!==null&&i!==void 0?i:0,s=o/r,a;return a=Math.max(~~(s*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.prototype.positionScrollbar=function(e){var n,i,r;e===void 0&&(e="y");var o=this.axis[e].scrollbar;if(!(!this.axis[e].isOverflowing||!this.contentWrapperEl||!o.el||!this.elStyles)){var s=this.contentWrapperEl[this.axis[e].scrollSizeAttr],a=((n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])||0,l=parseInt(this.elStyles[this.axis[e].sizeAttr],10),u=this.contentWrapperEl[this.axis[e].scrollOffsetAttr];u=e==="x"&&this.isRtl&&(!((i=t.getRtlHelpers())===null||i===void 0)&&i.isScrollOriginAtZero)?-u:u,e==="x"&&this.isRtl&&(u=!((r=t.getRtlHelpers())===null||r===void 0)&&r.isScrollingToNegative?u:-u);var c=u/(s-l),d=~~((a-o.size)*c);d=e==="x"&&this.isRtl?-d+(a-o.size):d,o.el.style.transform=e==="x"?"translate3d(".concat(d,"px, 0, 0)"):"translate3d(0, ".concat(d,"px, 0)")}},t.prototype.toggleTrackVisibility=function(e){e===void 0&&(e="y");var n=this.axis[e].track.el,i=this.axis[e].scrollbar.el;!n||!i||!this.contentWrapperEl||(this.axis[e].isOverflowing||this.axis[e].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(e))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(e))),this.axis[e].isOverflowing?i.style.display="block":i.style.display="none")},t.prototype.showScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&!this.axis[e].scrollbar.isVisible&&(ho(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!0)},t.prototype.hideScrollbar=function(e){e===void 0&&(e="y"),!this.isDragging&&this.axis[e].isOverflowing&&this.axis[e].scrollbar.isVisible&&(mo(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!1)},t.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},t.prototype.onMouseMoveForAxis=function(e){e===void 0&&(e="y");var n=this.axis[e];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(e),ho(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?ho(n.scrollbar.el,this.classNames.hover):mo(n.scrollbar.el,this.classNames.hover)):(mo(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)))},t.prototype.onMouseLeaveForAxis=function(e){e===void 0&&(e="y"),mo(this.axis[e].track.el,this.classNames.hover),mo(this.axis[e].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)},t.prototype.onDragStart=function(e,n){var i;n===void 0&&(n="y"),this.isDragging=!0;var r=Np(this.el),o=po(this.el),s=this.axis[n].scrollbar,a=n==="y"?e.pageY:e.pageX;this.axis[n].dragOffset=a-(((i=s.rect)===null||i===void 0?void 0:i[this.axis[n].offsetAttr])||0),this.draggedAxis=n,ho(this.el,this.classNames.dragging),r.addEventListener("mousemove",this.drag,!0),r.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(r.addEventListener("click",this.preventClick,!0),r.addEventListener("dblclick",this.preventClick,!0)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.prototype.onTrackClick=function(e,n){var i=this,r,o,s,a;n===void 0&&(n="y");var l=this.axis[n];if(!(!this.options.clickOnTrack||!l.scrollbar.el||!this.contentWrapperEl)){e.preventDefault();var u=po(this.el);this.axis[n].scrollbar.rect=l.scrollbar.el.getBoundingClientRect();var c=this.axis[n].scrollbar,d=(o=(r=c.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])!==null&&o!==void 0?o:0,f=parseInt((a=(s=this.elStyles)===null||s===void 0?void 0:s[this.axis[n].sizeAttr])!==null&&a!==void 0?a:"0px",10),p=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],h=n==="y"?this.mouseY-d:this.mouseX-d,m=h<0?-1:1,v=m===-1?p-f:p+f,S=40,b=function(){i.contentWrapperEl&&(m===-1?p>v&&(p-=S,i.contentWrapperEl[i.axis[n].scrollOffsetAttr]=p,u.requestAnimationFrame(b)):p<v&&(p+=S,i.contentWrapperEl[i.axis[n].scrollOffsetAttr]=p,u.requestAnimationFrame(b)))};b()}},t.prototype.getContentElement=function(){return this.contentEl},t.prototype.getScrollElement=function(){return this.contentWrapperEl},t.prototype.removeListeners=function(){var e=po(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},t.prototype.unMount=function(){this.removeListeners()},t.prototype.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.prototype.findChild=function(e,n){var i=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,function(r){return i.call(r,n)})[0]},t.rtlHelpers=null,t.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},t.getOptions=tP,t.helpers=eP,t}(),es=function(){return es=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},es.apply(this,arguments)},nP={beforeUnmount:"beforeUnmount"},ml;function iP(t){var e,n=t.h,i=t.emit,r=t.slots,o=t.props,s=function(l){return i("scroll",l)},a=es(es({},hl.defaultOptions.classNames),o.classNames);return n("div",es({ref:"element"},{"data-simplebar":"init"}),[n("div",{class:a.wrapper},[n("div",{class:a.heightAutoObserverWrapperEl},[n("div",{class:a.heightAutoObserverEl})]),n("div",{class:a.mask},[n("div",{class:a.offset},[n("div",es(es({},{onScroll:s,class:a.contentWrapper,tabIndex:o.tabIndex||hl.defaultOptions.tabIndex,role:"region","aria-label":o.ariaLabel||hl.defaultOptions.ariaLabel}),{ref:"scrollElement"}),[n("div",{class:a.contentEl,ref:"contentElement"},(e=r.default)===null||e===void 0?void 0:e.call(r))])])]),n("div",{class:a.placeholder})]),n("div",{class:"".concat(a.track," simplebar-horizontal")},[n("div",{class:a.scrollbar})]),n("div",{class:"".concat(a.track," simplebar-vertical")},[n("div",{class:a.scrollbar})])])}var rP=Ae((ml={name:"simplebar-vue",props:{autoHide:{type:Boolean,default:void 0},classNames:Object,forceVisible:{type:[Boolean,String],validator:function(t){return typeof t=="boolean"||t==="x"||t==="y"},default:void 0},ariaLabel:String,tabIndex:Number,direction:{type:String,validator:function(t){return t==="ltr"||t==="rtl"}},timeout:Number,clickOnTrack:{type:Boolean,default:void 0},scrollbarMinSize:Number,scrollbarMaxSize:Number},emits:["scroll"],data:function(){return{}},mounted:function(){for(var t=hl.getOptions(this.$refs.element.attributes),e=0,n=Object.entries(this.$props);e<n.length;e++){var i=n[e],r=i[0],o=i[1];o!=null&&typeof o!="function"&&(t[r]=o)}this.SimpleBar=new hl(this.$refs.element,t),this.scrollElement=this.$refs.scrollElement,this.contentElement=this.$refs.contentElement}},ml[nP.beforeUnmount]=function(){var t;(t=this.SimpleBar)===null||t===void 0||t.unMount(),this.SimpleBar=void 0},ml.methods={recalculate:function(){var t;(t=this.SimpleBar)===null||t===void 0||t.recalculate()}},ml.render=function(t){var e=this;return iP({h:typeof t=="function"?t:Ji,emit:function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e.$emit.apply(e,n)},slots:this.$slots,props:this.$props})},ml));function oP(t){let e=t.target;e.tagName==="UL"&&(e=e.parentElement);const{offsetHeight:n=0}=e,i=window.innerHeight*90/100;n>=i&&(e.style.transform="translateY(5vh)")}const sP=(t,e)=>t.every(n=>e.includes(n));function gl(t){"@babel/helpers - typeof";return gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gl(t)}function aP(t,e,n){return e=lP(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lP(t){var e=uP(t,"string");return gl(e)=="symbol"?e:String(e)}function uP(t,e){if(gl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(gl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var cP={paginator:function(e){var n=e.instance,i=e.key;return["p-paginator p-component",aP({"p-paginator-default":!n.hasBreakpoints()},"p-paginator-".concat(i),n.hasBreakpoints())]},start:"p-paginator-left-content",end:"p-paginator-right-content",firstPageButton:function(e){var n=e.instance;return["p-paginator-first p-paginator-element p-link",{"p-disabled":n.$attrs.disabled}]},firstPageIcon:"p-paginator-icon",previousPageButton:function(e){var n=e.instance;return["p-paginator-prev p-paginator-element p-link",{"p-disabled":n.$attrs.disabled}]},previousPageIcon:"p-paginator-icon",nextPageButton:function(e){var n=e.instance;return["p-paginator-next p-paginator-element p-link",{"p-disabled":n.$attrs.disabled}]},nextPageIcon:"p-paginator-icon",lastPageButton:function(e){var n=e.instance;return["p-paginator-last p-paginator-element p-link",{"p-disabled":n.$attrs.disabled}]},lastPageIcon:"p-paginator-icon",pages:"p-paginator-pages",pageButton:function(e){var n=e.props,i=e.pageLink;return["p-paginator-page p-paginator-element p-link",{"p-highlight":i-1===n.page}]},current:"p-paginator-current",rowPerPageDropdown:"p-paginator-rpp-options",jumpToPageDropdown:"p-paginator-page-options",jumpToPageInput:"p-paginator-page-input"},dP=Wt.extend({name:"paginator",classes:cP}),t0={name:"AngleDoubleLeftIcon",extends:vn},fP=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z",fill:"currentColor"},null,-1),pP=[fP];function hP(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),pP,16)}t0.render=hP;var n0={name:"AngleDownIcon",extends:vn},mP=E("path",{d:"M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z",fill:"currentColor"},null,-1),gP=[mP];function vP(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),gP,16)}n0.render=vP;var i0={name:"AngleUpIcon",extends:vn},yP=E("path",{d:"M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z",fill:"currentColor"},null,-1),bP=[yP];function AP(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),bP,16)}i0.render=AP;var wP={root:function(e){var n=e.instance,i=e.props;return["p-inputnumber p-component p-inputwrapper",{"p-inputwrapper-filled":n.filled||i.allowEmpty===!1,"p-inputwrapper-focus":n.focused,"p-inputnumber-buttons-stacked":i.showButtons&&i.buttonLayout==="stacked","p-inputnumber-buttons-horizontal":i.showButtons&&i.buttonLayout==="horizontal","p-inputnumber-buttons-vertical":i.showButtons&&i.buttonLayout==="vertical","p-invalid":i.invalid}]},input:function(e){var n=e.props,i=e.instance;return["p-inputnumber-input",{"p-variant-filled":n.variant?n.variant==="filled":i.$primevue.config.inputStyle==="filled"}]},buttonGroup:"p-inputnumber-button-group",incrementButton:function(e){var n=e.instance,i=e.props;return["p-inputnumber-button p-inputnumber-button-up",{"p-disabled":i.showButtons&&i.max!==null&&n.maxBoundry()}]},decrementButton:function(e){var n=e.instance,i=e.props;return["p-inputnumber-button p-inputnumber-button-down",{"p-disabled":i.showButtons&&i.min!==null&&n.minBoundry()}]}},SP=Wt.extend({name:"inputnumber",classes:wP}),CP={name:"BaseInputNumber",extends:It,props:{modelValue:{type:Number,default:null},format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:"stacked"},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:void 0},decrementButtonIcon:{type:String,default:void 0},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:"decimal"},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},roundingMode:{type:String,default:"halfExpand",validator:function(e){return["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"].includes(e)}},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},highlightOnFocus:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},incrementButtonProps:{type:null,default:null},decrementButtonProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:SP,provide:function(){return{$parentInstance:this}}};function vl(t){"@babel/helpers - typeof";return vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vl(t)}function r0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function o0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?r0(Object(n),!0).forEach(function(i){kP(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r0(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function kP(t,e,n){return e=TP(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function TP(t){var e=OP(t,"string");return vl(e)=="symbol"?e:String(e)}function OP(t,e){if(vl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(vl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xP(t){return PP(t)||IP(t)||EP(t)||MP()}function MP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
186
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EP(t,e){if(t){if(typeof t=="string")return $p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $p(t,e)}}function IP(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function PP(t){if(Array.isArray(t))return $p(t)}function $p(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var yl={name:"InputNumber",extends:CP,inheritAttrs:!1,emits:["update:modelValue","input","focus","blur"],numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:"",isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data:function(){return{d_modelValue:this.modelValue,focused:!1}},watch:{modelValue:function(e){this.d_modelValue=e},locale:function(e,n){this.updateConstructParser(e,n)},localeMatcher:function(e,n){this.updateConstructParser(e,n)},mode:function(e,n){this.updateConstructParser(e,n)},currency:function(e,n){this.updateConstructParser(e,n)},currencyDisplay:function(e,n){this.updateConstructParser(e,n)},useGrouping:function(e,n){this.updateConstructParser(e,n)},minFractionDigits:function(e,n){this.updateConstructParser(e,n)},maxFractionDigits:function(e,n){this.updateConstructParser(e,n)},suffix:function(e,n){this.updateConstructParser(e,n)},prefix:function(e,n){this.updateConstructParser(e,n)}},created:function(){this.constructParser()},methods:{getOptions:function(){var e,n;return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:(e=this.minFractionDigits)!==null&&e!==void 0?e:void 0,maximumFractionDigits:(n=this.maxFractionDigits)!==null&&n!==void 0?n:void 0,roundingMode:this.roundingMode}},constructParser:function(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());var e=xP(new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)).reverse(),n=new Map(e.map(function(i,r){return[i,r]}));this._numeral=new RegExp("[".concat(e.join(""),"]"),"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=function(i){return n.get(i)}},updateConstructParser:function(e,n){e!==n&&this.constructParser()},escapeRegExp:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},getDecimalExpression:function(){var e=new Intl.NumberFormat(this.locale,o0(o0({},this.getOptions()),{},{useGrouping:!1}));return new RegExp("[".concat(e.format(1.1).replace(this._currency,"").trim().replace(this._numeral,""),"]"),"g")},getGroupingExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=e.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp("[".concat(this.groupChar,"]"),"g")},getMinusSignExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp("[".concat(e.format(-1).trim().replace(this._numeral,""),"]"),"g")},getCurrencyExpression:function(){if(this.currency){var e=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});return new RegExp("[".concat(e.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,""),"]"),"g")}return new RegExp("[]","g")},getPrefixExpression:function(){if(this.prefix)this.prefixChar=this.prefix;else{var e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=e.format(1).split("1")[0]}return new RegExp("".concat(this.escapeRegExp(this.prefixChar||"")),"g")},getSuffixExpression:function(){if(this.suffix)this.suffixChar=this.suffix;else{var e=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});this.suffixChar=e.format(1).split("1")[1]}return new RegExp("".concat(this.escapeRegExp(this.suffixChar||"")),"g")},formatValue:function(e){if(e!=null){if(e==="-")return e;if(this.format){var n=new Intl.NumberFormat(this.locale,this.getOptions()),i=n.format(e);return this.prefix&&(i=this.prefix+i),this.suffix&&(i=i+this.suffix),i}return e.toString()}return""},parseValue:function(e){var n=e.replace(this._suffix,"").replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(n){if(n==="-")return n;var i=+n;return isNaN(i)?null:i}return null},repeat:function(e,n,i){var r=this;if(!this.readonly){var o=n||500;this.clearTimer(),this.timer=setTimeout(function(){r.repeat(e,40,i)},o),this.spin(e,i)}},spin:function(e,n){if(this.$refs.input){var i=this.step*n,r=this.parseValue(this.$refs.input.$el.value)||0,o=this.validateValue(r+i);this.updateInput(o,null,"spin"),this.updateModel(e,o),this.handleOnInput(e,r,o)}},onUpButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,1),e.preventDefault())},onUpButtonMouseUp:function(){this.disabled||this.clearTimer()},onUpButtonMouseLeave:function(){this.disabled||this.clearTimer()},onUpButtonKeyUp:function(){this.disabled||this.clearTimer()},onUpButtonKeyDown:function(e){(e.code==="Space"||e.code==="Enter"||e.code==="NumpadEnter")&&this.repeat(e,null,1)},onDownButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,-1),e.preventDefault())},onDownButtonMouseUp:function(){this.disabled||this.clearTimer()},onDownButtonMouseLeave:function(){this.disabled||this.clearTimer()},onDownButtonKeyUp:function(){this.disabled||this.clearTimer()},onDownButtonKeyDown:function(e){(e.code==="Space"||e.code==="Enter"||e.code==="NumpadEnter")&&this.repeat(e,null,-1)},onUserInput:function(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown:function(e){if(!this.readonly){if(e.altKey||e.ctrlKey||e.metaKey){this.isSpecialChar=!0,this.lastValue=this.$refs.input.$el.value;return}this.lastValue=e.target.value;var n=e.target.selectionStart,i=e.target.selectionEnd,r=e.target.value,o=null;switch(e.code){case"ArrowUp":this.spin(e,1),e.preventDefault();break;case"ArrowDown":this.spin(e,-1),e.preventDefault();break;case"ArrowLeft":this.isNumeralChar(r.charAt(n-1))||e.preventDefault();break;case"ArrowRight":this.isNumeralChar(r.charAt(n))||e.preventDefault();break;case"Tab":case"Enter":case"NumpadEnter":o=this.validateValue(this.parseValue(r)),this.$refs.input.$el.value=this.formatValue(o),this.$refs.input.$el.setAttribute("aria-valuenow",o),this.updateModel(e,o);break;case"Backspace":{if(e.preventDefault(),n===i){var s=r.charAt(n-1),a=this.getDecimalCharIndexes(r),l=a.decimalCharIndex,u=a.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(s)){var c=this.getDecimalLength(r);if(this._group.test(s))this._group.lastIndex=0,o=r.slice(0,n-2)+r.slice(n-1);else if(this._decimal.test(s))this._decimal.lastIndex=0,c?this.$refs.input.$el.setSelectionRange(n-1,n-1):o=r.slice(0,n-1)+r.slice(n);else if(l>0&&n>l){var d=this.isDecimalMode()&&(this.minFractionDigits||0)<c?"":"0";o=r.slice(0,n-1)+d+r.slice(n)}else u===1?(o=r.slice(0,n-1)+"0"+r.slice(n),o=this.parseValue(o)>0?o:""):o=r.slice(0,n-1)+r.slice(n)}this.updateValue(e,o,null,"delete-single")}else o=this.deleteRange(r,n,i),this.updateValue(e,o,null,"delete-range");break}case"Delete":if(e.preventDefault(),n===i){var f=r.charAt(n),p=this.getDecimalCharIndexes(r),h=p.decimalCharIndex,m=p.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(f)){var v=this.getDecimalLength(r);if(this._group.test(f))this._group.lastIndex=0,o=r.slice(0,n)+r.slice(n+2);else if(this._decimal.test(f))this._decimal.lastIndex=0,v?this.$refs.input.$el.setSelectionRange(n+1,n+1):o=r.slice(0,n)+r.slice(n+1);else if(h>0&&n>h){var S=this.isDecimalMode()&&(this.minFractionDigits||0)<v?"":"0";o=r.slice(0,n)+S+r.slice(n+1)}else m===1?(o=r.slice(0,n)+"0"+r.slice(n+1),o=this.parseValue(o)>0?o:""):o=r.slice(0,n)+r.slice(n+1)}this.updateValue(e,o,null,"delete-back-single")}else o=this.deleteRange(r,n,i),this.updateValue(e,o,null,"delete-range");break;case"Home":e.preventDefault(),Ce.isEmpty(this.min)||this.updateModel(e,this.min);break;case"End":e.preventDefault(),Ce.isEmpty(this.max)||this.updateModel(e,this.max);break}}},onInputKeyPress:function(e){if(!this.readonly){var n=e.key,i=this.isDecimalSign(n),r=this.isMinusSign(n);this.locale==="fr-FR"&&(e.code==="Comma"||e.code==="NumpadDecimal")&&!i&&(i=!0,n=decimalSign),e.code!=="Enter"&&e.preventDefault(),(Number(n)>=0&&Number(n)<=9||r||i)&&this.insert(e,n,{isDecimalSign:i,isMinusSign:r})}},onPaste:function(e){if(!(this.readonly||this.disabled)){e.preventDefault();var n=(e.clipboardData||window.clipboardData).getData("Text");if(n){var i=this.parseValue(n);i!=null&&this.insert(e,i.toString())}}},allowMinusSign:function(){return this.min===null||this.min<0},isMinusSign:function(e){return this._minusSign.test(e)||e==="-"?(this._minusSign.lastIndex=0,!0):!1},isDecimalSign:function(e){return this._decimal.test(e)?(this._decimal.lastIndex=0,!0):!1},isDecimalMode:function(){return this.mode==="decimal"},getDecimalCharIndexes:function(e){var n=e.search(this._decimal);this._decimal.lastIndex=0;var i=e.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,""),r=i.search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:n,decimalCharIndexWithoutPrefix:r}},getCharIndexes:function(e){var n=e.search(this._decimal);this._decimal.lastIndex=0;var i=e.search(this._minusSign);this._minusSign.lastIndex=0;var r=e.search(this._suffix);this._suffix.lastIndex=0;var o=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:n,minusCharIndex:i,suffixCharIndex:r,currencyCharIndex:o}},insert:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{isDecimalSign:!1,isMinusSign:!1},r=n.search(this._minusSign);if(this._minusSign.lastIndex=0,!(!this.allowMinusSign()&&r!==-1)){var o=this.$refs.input.$el.selectionStart,s=this.$refs.input.$el.selectionEnd,a=this.$refs.input.$el.value.trim(),l=this.getCharIndexes(a),u=l.decimalCharIndex,c=l.minusCharIndex,d=l.suffixCharIndex,f=l.currencyCharIndex,p;if(i.isMinusSign)o===0&&(p=a,(c===-1||s!==0)&&(p=this.insertText(a,n,0,s)),this.updateValue(e,p,n,"insert"));else if(i.isDecimalSign)u>0&&o===u?this.updateValue(e,a,n,"insert"):u>o&&u<s?(p=this.insertText(a,n,o,s),this.updateValue(e,p,n,"insert")):u===-1&&this.maxFractionDigits&&(p=this.insertText(a,n,o,s),this.updateValue(e,p,n,"insert"));else{var h=this.numberFormat.resolvedOptions().maximumFractionDigits,m=o!==s?"range-insert":"insert";if(u>0&&o>u){if(o+n.length-(u+1)<=h){var v=f>=o?f-1:d>=o?d:a.length;p=a.slice(0,o)+n+a.slice(o+n.length,v)+a.slice(v),this.updateValue(e,p,n,m)}}else p=this.insertText(a,n,o,s),this.updateValue(e,p,n,m)}}},insertText:function(e,n,i,r){var o=n==="."?n:n.split(".");if(o.length===2){var s=e.slice(i,r).search(this._decimal);return this._decimal.lastIndex=0,s>0?e.slice(0,i)+this.formatValue(n)+e.slice(r):this.formatValue(n)||e}else return r-i===e.length?this.formatValue(n):i===0?n+e.slice(r):r===e.length?e.slice(0,i)+n:e.slice(0,i)+n+e.slice(r)},deleteRange:function(e,n,i){var r;return i-n===e.length?r="":n===0?r=e.slice(i):i===e.length?r=e.slice(0,n):r=e.slice(0,n)+e.slice(i),r},initCursor:function(){var e=this.$refs.input.$el.selectionStart,n=this.$refs.input.$el.value,i=n.length,r=null,o=(this.prefixChar||"").length;n=n.replace(this._prefix,""),e=e-o;var s=n.charAt(e);if(this.isNumeralChar(s))return e+o;for(var a=e-1;a>=0;)if(s=n.charAt(a),this.isNumeralChar(s)){r=a+o;break}else a--;if(r!==null)this.$refs.input.$el.setSelectionRange(r+1,r+1);else{for(a=e;a<i;)if(s=n.charAt(a),this.isNumeralChar(s)){r=a+o;break}else a++;r!==null&&this.$refs.input.$el.setSelectionRange(r,r)}return r||0},onInputClick:function(){var e=this.$refs.input.$el.value;!this.readonly&&e!==G.getSelection()&&this.initCursor()},isNumeralChar:function(e){return e.length===1&&(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e))?(this.resetRegex(),!0):!1},resetRegex:function(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue:function(e,n,i,r){var o=this.$refs.input.$el.value,s=null;n!=null&&(s=this.parseValue(n),s=!s&&!this.allowEmpty?0:s,this.updateInput(s,i,r,n),this.handleOnInput(e,o,s))},handleOnInput:function(e,n,i){this.isValueChanged(n,i)&&this.$emit("input",{originalEvent:e,value:i,formattedValue:n})},isValueChanged:function(e,n){if(n===null&&e!==null)return!0;if(n!=null){var i=typeof e=="string"?this.parseValue(e):e;return n!==i}return!1},validateValue:function(e){return e==="-"||e==null?null:this.min!=null&&e<this.min?this.min:this.max!=null&&e>this.max?this.max:e},updateInput:function(e,n,i,r){n=n||"";var o=this.$refs.input.$el.value,s=this.formatValue(e),a=o.length;if(s!==r&&(s=this.concatValues(s,r)),a===0){this.$refs.input.$el.value=s,this.$refs.input.$el.setSelectionRange(0,0);var l=this.initCursor(),u=l+n.length;this.$refs.input.$el.setSelectionRange(u,u)}else{var c=this.$refs.input.$el.selectionStart,d=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=s;var f=s.length;if(i==="range-insert"){var p=this.parseValue((o||"").slice(0,c)),h=p!==null?p.toString():"",m=h.split("").join("(".concat(this.groupChar,")?")),v=new RegExp(m,"g");v.test(s);var S=n.split("").join("(".concat(this.groupChar,")?")),b=new RegExp(S,"g");b.test(s.slice(v.lastIndex)),d=v.lastIndex+b.lastIndex,this.$refs.input.$el.setSelectionRange(d,d)}else if(f===a)i==="insert"||i==="delete-back-single"?this.$refs.input.$el.setSelectionRange(d+1,d+1):i==="delete-single"?this.$refs.input.$el.setSelectionRange(d-1,d-1):(i==="delete-range"||i==="spin")&&this.$refs.input.$el.setSelectionRange(d,d);else if(i==="delete-back-single"){var k=o.charAt(d-1),A=o.charAt(d),w=a-f,y=this._group.test(A);y&&w===1?d+=1:!y&&this.isNumeralChar(k)&&(d+=-1*w+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(d,d)}else if(o==="-"&&i==="insert"){this.$refs.input.$el.setSelectionRange(0,0);var C=this.initCursor(),I=C+n.length+1;this.$refs.input.$el.setSelectionRange(I,I)}else d=d+(f-a),this.$refs.input.$el.setSelectionRange(d,d)}this.$refs.input.$el.setAttribute("aria-valuenow",e)},concatValues:function(e,n){if(e&&n){var i=n.search(this._decimal);return this._decimal.lastIndex=0,this.suffixChar?i!==-1?e.replace(this.suffixChar,"").split(this._decimal)[0]+n.replace(this.suffixChar,"").slice(i)+this.suffixChar:e:i!==-1?e.split(this._decimal)[0]+n.slice(i):e}return e},getDecimalLength:function(e){if(e){var n=e.split(this._decimal);if(n.length===2)return n[1].replace(this._suffix,"").trim().replace(/\s/g,"").replace(this._currency,"").length}return 0},updateModel:function(e,n){this.d_modelValue=n,this.$emit("update:modelValue",n)},onInputFocus:function(e){this.focused=!0,!this.disabled&&!this.readonly&&this.$refs.input.$el.value!==G.getSelection()&&this.highlightOnFocus&&e.target.select(),this.$emit("focus",e)},onInputBlur:function(e){this.focused=!1;var n=e.target,i=this.validateValue(this.parseValue(n.value));this.$emit("blur",{originalEvent:e,value:n.value}),n.value=this.formatValue(i),n.setAttribute("aria-valuenow",i),this.updateModel(e,i),!this.disabled&&!this.readonly&&this.highlightOnFocus&&G.clearSelection()},clearTimer:function(){this.timer&&clearInterval(this.timer)},maxBoundry:function(){return this.d_modelValue>=this.max},minBoundry:function(){return this.d_modelValue<=this.min}},computed:{filled:function(){return this.modelValue!=null&&this.modelValue.toString().length>0},upButtonListeners:function(){var e=this;return{mousedown:function(i){return e.onUpButtonMouseDown(i)},mouseup:function(i){return e.onUpButtonMouseUp(i)},mouseleave:function(i){return e.onUpButtonMouseLeave(i)},keydown:function(i){return e.onUpButtonKeyDown(i)},keyup:function(i){return e.onUpButtonKeyUp(i)}}},downButtonListeners:function(){var e=this;return{mousedown:function(i){return e.onDownButtonMouseDown(i)},mouseup:function(i){return e.onDownButtonMouseUp(i)},mouseleave:function(i){return e.onDownButtonMouseLeave(i)},keydown:function(i){return e.onDownButtonKeyDown(i)},keyup:function(i){return e.onDownButtonKeyUp(i)}}},formattedValue:function(){var e=!this.modelValue&&!this.allowEmpty?0:this.modelValue;return this.formatValue(e)},getFormatter:function(){return this.numberFormat}},components:{INInputText:Qo,INButton:lo,AngleUpIcon:i0,AngleDownIcon:n0}};function LP(t,e,n,i,r,o){var s=et("INInputText"),a=et("INButton");return g(),O("span",T({class:t.cx("root")},t.ptmi("root")),[L(s,T({ref:"input",id:t.inputId,role:"spinbutton",class:[t.cx("input"),t.inputClass],style:t.inputStyle,value:o.formattedValue,"aria-valuemin":t.min,"aria-valuemax":t.max,"aria-valuenow":t.modelValue,inputmode:t.mode==="decimal"&&!t.minFractionDigits?"numeric":"decimal",disabled:t.disabled,readonly:t.readonly,placeholder:t.placeholder,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,"aria-invalid":t.invalid||void 0,onInput:o.onUserInput,onKeydown:o.onInputKeyDown,onKeypress:o.onInputKeyPress,onPaste:o.onPaste,onClick:o.onInputClick,onFocus:o.onInputFocus,onBlur:o.onInputBlur},t.inputProps,{pt:t.ptm("input"),unstyled:t.unstyled}),null,16,["id","class","style","value","aria-valuemin","aria-valuemax","aria-valuenow","inputmode","disabled","readonly","placeholder","aria-labelledby","aria-label","aria-invalid","onInput","onKeydown","onKeypress","onPaste","onClick","onFocus","onBlur","pt","unstyled"]),t.showButtons&&t.buttonLayout==="stacked"?(g(),O("span",T({key:0,class:t.cx("buttonGroup")},t.ptm("buttonGroup")),[L(a,T({class:[t.cx("incrementButton"),t.incrementButtonClass]},Ho(o.upButtonListeners),{disabled:t.disabled,tabindex:-1,"aria-hidden":"true"},t.incrementButtonProps,{pt:t.ptm("incrementButton"),unstyled:t.unstyled}),{icon:H(function(){return[Q(t.$slots,"incrementbuttonicon",{},function(){return[(g(),P(yt(t.incrementButtonIcon?"span":"AngleUpIcon"),T({class:t.incrementButtonIcon},t.ptm("incrementButton").icon,{"data-pc-section":"incrementbuttonicon"}),null,16,["class"]))]})]}),_:3},16,["class","disabled","pt","unstyled"]),L(a,T({class:[t.cx("decrementButton"),t.decrementButtonClass]},Ho(o.downButtonListeners),{disabled:t.disabled,tabindex:-1,"aria-hidden":"true"},t.decrementButtonProps,{pt:t.ptm("decrementButton"),unstyled:t.unstyled}),{icon:H(function(){return[Q(t.$slots,"decrementbuttonicon",{},function(){return[(g(),P(yt(t.decrementButtonIcon?"span":"AngleDownIcon"),T({class:t.decrementButtonIcon},t.ptm("decrementButton").icon,{"data-pc-section":"decrementbuttonicon"}),null,16,["class"]))]})]}),_:3},16,["class","disabled","pt","unstyled"])],16)):B("",!0),t.showButtons&&t.buttonLayout!=="stacked"?(g(),P(a,T({key:1,class:[t.cx("incrementButton"),t.incrementButtonClass]},Ho(o.upButtonListeners),{disabled:t.disabled,tabindex:-1,"aria-hidden":"true"},t.incrementButtonProps,{pt:t.ptm("incrementButton"),unstyled:t.unstyled}),{icon:H(function(){return[Q(t.$slots,"incrementbuttonicon",{},function(){return[(g(),P(yt(t.incrementButtonIcon?"span":"AngleUpIcon"),T({class:t.incrementButtonIcon},t.ptm("incrementButton").icon,{"data-pc-section":"incrementbuttonicon"}),null,16,["class"]))]})]}),_:3},16,["class","disabled","pt","unstyled"])):B("",!0),t.showButtons&&t.buttonLayout!=="stacked"?(g(),P(a,T({key:2,class:[t.cx("decrementButton"),t.decrementButtonClass]},Ho(o.downButtonListeners),{disabled:t.disabled,tabindex:-1,"aria-hidden":"true"},t.decrementButtonProps,{pt:t.ptm("decrementButton"),unstyled:t.unstyled}),{icon:H(function(){return[Q(t.$slots,"decrementbuttonicon",{},function(){return[(g(),P(yt(t.decrementButtonIcon?"span":"AngleDownIcon"),T({class:t.decrementButtonIcon},t.ptm("decrementButton").icon,{"data-pc-section":"decrementbuttonicon"}),null,16,["class"]))]})]}),_:3},16,["class","disabled","pt","unstyled"])):B("",!0)],16)}yl.render=LP;var s0={name:"AngleDoubleRightIcon",extends:vn},DP=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.68757 11.1451C7.7791 11.1831 7.8773 11.2024 7.9764 11.2019C8.07769 11.1985 8.17721 11.1745 8.26886 11.1312C8.36052 11.088 8.44238 11.0265 8.50943 10.9505L12.0294 7.49085C12.1707 7.34942 12.25 7.15771 12.25 6.95782C12.25 6.75794 12.1707 6.56622 12.0294 6.42479L8.50943 2.90479C8.37014 2.82159 8.20774 2.78551 8.04633 2.80192C7.88491 2.81833 7.73309 2.88635 7.6134 2.99588C7.4937 3.10541 7.41252 3.25061 7.38189 3.40994C7.35126 3.56927 7.37282 3.73423 7.44337 3.88033L10.4605 6.89748L7.44337 9.91463C7.30212 10.0561 7.22278 10.2478 7.22278 10.4477C7.22278 10.6475 7.30212 10.8393 7.44337 10.9807C7.51301 11.0512 7.59603 11.1071 7.68757 11.1451ZM1.94207 10.9505C2.07037 11.0968 2.25089 11.1871 2.44493 11.2019C2.63898 11.1871 2.81949 11.0968 2.94779 10.9505L6.46779 7.49085C6.60905 7.34942 6.68839 7.15771 6.68839 6.95782C6.68839 6.75793 6.60905 6.56622 6.46779 6.42479L2.94779 2.90479C2.80704 2.83757 2.6489 2.81563 2.49517 2.84201C2.34143 2.86839 2.19965 2.94178 2.08936 3.05207C1.97906 3.16237 1.90567 3.30415 1.8793 3.45788C1.85292 3.61162 1.87485 3.76975 1.94207 3.9105L4.95922 6.92765L1.94207 9.9448C1.81838 10.0831 1.75 10.2621 1.75 10.4477C1.75 10.6332 1.81838 10.8122 1.94207 10.9505Z",fill:"currentColor"},null,-1),RP=[DP];function BP(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),RP,16)}s0.render=BP;var a0={name:"AngleRightIcon",extends:vn},NP=E("path",{d:"M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z",fill:"currentColor"},null,-1),$P=[NP];function VP(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),$P,16)}a0.render=VP;var l0={name:"AngleLeftIcon",extends:vn},zP=E("path",{d:"M8.75 11.185C8.65146 11.1854 8.55381 11.1662 8.4628 11.1284C8.37179 11.0906 8.28924 11.0351 8.22 10.965L4.72 7.46496C4.57955 7.32433 4.50066 7.13371 4.50066 6.93496C4.50066 6.73621 4.57955 6.54558 4.72 6.40496L8.22 2.93496C8.36095 2.84357 8.52851 2.80215 8.69582 2.81733C8.86312 2.83252 9.02048 2.90344 9.14268 3.01872C9.26487 3.134 9.34483 3.28696 9.36973 3.4531C9.39463 3.61924 9.36303 3.78892 9.28 3.93496L6.28 6.93496L9.28 9.93496C9.42045 10.0756 9.49934 10.2662 9.49934 10.465C9.49934 10.6637 9.42045 10.8543 9.28 10.995C9.13526 11.1257 8.9448 11.1939 8.75 11.185Z",fill:"currentColor"},null,-1),FP=[zP];function HP(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),FP,16)}l0.render=HP;var jP={name:"BasePaginator",extends:It,props:{totalRecords:{type:Number,default:0},rows:{type:Number,default:0},first:{type:Number,default:0},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},template:{type:[Object,String],default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},currentPageReportTemplate:{type:null,default:"({currentPage} of {totalPages})"},alwaysShow:{type:Boolean,default:!0}},style:dP,provide:function(){return{$parentInstance:this}}},u0={name:"CurrentPageReport",hostName:"Paginator",extends:It,props:{pageCount:{type:Number,default:0},currentPage:{type:Number,default:0},page:{type:Number,default:0},first:{type:Number,default:0},rows:{type:Number,default:0},totalRecords:{type:Number,default:0},template:{type:String,default:"({currentPage} of {totalPages})"}},computed:{text:function(){var e=this.template.replace("{currentPage}",this.currentPage).replace("{totalPages}",this.pageCount).replace("{first}",this.pageCount>0?this.first+1:0).replace("{last}",Math.min(this.first+this.rows,this.totalRecords)).replace("{rows}",this.rows).replace("{totalRecords}",this.totalRecords);return e}}};function UP(t,e,n,i,r,o){return g(),O("span",T({class:t.cx("current")},t.ptm("current")),_(o.text),17)}u0.render=UP;var c0={name:"FirstPageLink",hostName:"Paginator",extends:It,props:{template:{type:Function,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},components:{AngleDoubleLeftIcon:t0},directives:{ripple:fi}};function KP(t,e,n,i,r,o){var s=on("ripple");return ft((g(),O("button",T({class:t.cx("firstPageButton"),type:"button"},o.getPTOptions("firstPageButton"),{"data-pc-group-section":"pagebutton"}),[(g(),P(yt(n.template||"AngleDoubleLeftIcon"),T({class:t.cx("firstPageIcon")},o.getPTOptions("firstPageIcon")),null,16,["class"]))],16)),[[s]])}c0.render=KP;var d0={name:"JumpToPageDropdown",hostName:"Paginator",extends:It,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean,templates:null},methods:{onChange:function(e){this.$emit("page-change",e)}},computed:{pageOptions:function(){for(var e=[],n=0;n<this.pageCount;n++)e.push({label:String(n+1),value:n});return e}},components:{JTPDropdown:Vr}};function WP(t,e,n,i,r,o){var s=et("JTPDropdown");return g(),P(s,{modelValue:n.page,options:o.pageOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":e[0]||(e[0]=function(a){return o.onChange(a)}),class:pe(t.cx("jumpToPageDropdown")),disabled:n.disabled,unstyled:t.unstyled,pt:t.ptm("jumpToPageDropdown"),"data-pc-group-section":"pagedropdown"},In({_:2},[n.templates.jumptopagedropdownicon?{name:"dropdownicon",fn:H(function(a){return[(g(),P(yt(n.templates.jumptopagedropdownicon),{class:pe(a.class)},null,8,["class"]))]}),key:"0"}:void 0]),1032,["modelValue","options","class","disabled","unstyled","pt"])}d0.render=WP;var f0={name:"JumpToPageInput",hostName:"Paginator",extends:It,inheritAttrs:!1,emits:["page-change"],props:{page:Number,pageCount:Number,disabled:Boolean},data:function(){return{d_page:this.page}},watch:{page:function(e){this.d_page=e}},methods:{onChange:function(e){e!==this.page&&(this.d_page=e,this.$emit("page-change",e-1))}},computed:{inputArialabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.jumpToPageInputLabel:void 0}},components:{JTPInput:yl}};function qP(t,e,n,i,r,o){var s=et("JTPInput");return g(),P(s,{ref:"jtpInput",modelValue:r.d_page,class:pe(t.cx("jumpToPageInput")),"aria-label":o.inputArialabel,disabled:n.disabled,"onUpdate:modelValue":o.onChange,unstyled:t.unstyled,pt:t.ptm("jumpToPageInput")},null,8,["modelValue","class","aria-label","disabled","onUpdate:modelValue","unstyled","pt"])}f0.render=qP;var p0={name:"LastPageLink",hostName:"Paginator",extends:It,props:{template:{type:Function,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},components:{AngleDoubleRightIcon:s0},directives:{ripple:fi}};function XP(t,e,n,i,r,o){var s=on("ripple");return ft((g(),O("button",T({class:t.cx("lastPageButton"),type:"button"},o.getPTOptions("lastPageButton"),{"data-pc-group-section":"pagebutton"}),[(g(),P(yt(n.template||"AngleDoubleRightIcon"),T({class:t.cx("lastPageIcon")},o.getPTOptions("lastPageIcon")),null,16,["class"]))],16)),[[s]])}p0.render=XP;var h0={name:"NextPageLink",hostName:"Paginator",extends:It,props:{template:{type:Function,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},components:{AngleRightIcon:a0},directives:{ripple:fi}};function GP(t,e,n,i,r,o){var s=on("ripple");return ft((g(),O("button",T({class:t.cx("nextPageButton"),type:"button"},o.getPTOptions("nextPageButton"),{"data-pc-group-section":"pagebutton"}),[(g(),P(yt(n.template||"AngleRightIcon"),T({class:t.cx("nextPageIcon")},o.getPTOptions("nextPageIcon")),null,16,["class"]))],16)),[[s]])}h0.render=GP;var m0={name:"PageLinks",hostName:"Paginator",extends:It,inheritAttrs:!1,emits:["click"],props:{value:Array,page:Number},methods:{getPTOptions:function(e,n){return this.ptm(n,{context:{active:e===this.page}})},onPageLinkClick:function(e,n){this.$emit("click",{originalEvent:e,value:n})},ariaPageLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,e):void 0}},directives:{ripple:fi}},ZP=["aria-label","aria-current","onClick","data-p-highlight"];function _P(t,e,n,i,r,o){var s=on("ripple");return g(),O("span",T({class:t.cx("pages")},t.ptm("pages")),[(g(!0),O(ue,null,Je(n.value,function(a){return ft((g(),O("button",T({key:a,class:t.cx("pageButton",{pageLink:a}),type:"button","aria-label":o.ariaPageLabel(a),"aria-current":a-1===n.page?"page":void 0,onClick:function(u){return o.onPageLinkClick(u,a)}},o.getPTOptions(a-1,"pageButton"),{"data-p-highlight":a-1===n.page}),[ht(_(a),1)],16,ZP)),[[s]])}),128))],16)}m0.render=_P;var g0={name:"PrevPageLink",hostName:"Paginator",extends:It,props:{template:{type:Function,default:null}},methods:{getPTOptions:function(e){return this.ptm(e,{context:{disabled:this.$attrs.disabled}})}},components:{AngleLeftIcon:l0},directives:{ripple:fi}};function JP(t,e,n,i,r,o){var s=on("ripple");return ft((g(),O("button",T({class:t.cx("previousPageButton"),type:"button"},o.getPTOptions("previousPageButton"),{"data-pc-group-section":"pagebutton"}),[(g(),P(yt(n.template||"AngleLeftIcon"),T({class:t.cx("previousPageIcon")},o.getPTOptions("previousPageIcon")),null,16,["class"]))],16)),[[s]])}g0.render=JP;var v0={name:"RowsPerPageDropdown",hostName:"Paginator",extends:It,emits:["rows-change"],props:{options:Array,rows:Number,disabled:Boolean,templates:null},methods:{onChange:function(e){this.$emit("rows-change",e)}},computed:{rowsOptions:function(){var e=[];if(this.options)for(var n=0;n<this.options.length;n++)e.push({label:String(this.options[n]),value:this.options[n]});return e}},components:{RPPDropdown:Vr}};function YP(t,e,n,i,r,o){var s=et("RPPDropdown");return g(),P(s,{modelValue:n.rows,options:o.rowsOptions,optionLabel:"label",optionValue:"value","onUpdate:modelValue":e[0]||(e[0]=function(a){return o.onChange(a)}),class:pe(t.cx("rowPerPageDropdown")),disabled:n.disabled,unstyled:t.unstyled,pt:t.ptm("rowPerPageDropdown"),"data-pc-group-section":"pagedropdown"},In({_:2},[n.templates.rowsperpagedropdownicon?{name:"dropdownicon",fn:H(function(a){return[(g(),P(yt(n.templates.rowsperpagedropdownicon),{class:pe(a.class)},null,8,["class"]))]}),key:"0"}:void 0]),1032,["modelValue","options","class","disabled","unstyled","pt"])}v0.render=YP;function QP(t){return nL(t)||tL(t)||b0(t)||eL()}function eL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
187
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tL(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function nL(t){if(Array.isArray(t))return zp(t)}function Vp(t){"@babel/helpers - typeof";return Vp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vp(t)}function y0(t,e){return oL(t)||rL(t,e)||b0(t,e)||iL()}function iL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
188
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b0(t,e){if(t){if(typeof t=="string")return zp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zp(t,e)}}function zp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function rL(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(c){u=!0,r=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw r}}return a}}function oL(t){if(Array.isArray(t))return t}var Fp={name:"Paginator",extends:jP,inheritAttrs:!1,emits:["update:first","update:rows","page"],data:function(){return{d_first:this.first,d_rows:this.rows}},watch:{first:function(e){this.d_first=e},rows:function(e){this.d_rows=e},totalRecords:function(e){this.page>0&&e&&this.d_first>=e&&this.changePage(this.pageCount-1)}},mounted:function(){this.setPaginatorAttribute(),this.createStyle()},methods:{changePage:function(e){var n=this.pageCount;if(e>=0&&e<n){this.d_first=this.d_rows*e;var i={page:e,first:this.d_first,rows:this.d_rows,pageCount:n};this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",i)}},changePageToFirst:function(e){this.isFirstPage||this.changePage(0),e.preventDefault()},changePageToPrev:function(e){this.changePage(this.page-1),e.preventDefault()},changePageLink:function(e){this.changePage(e.value-1),e.originalEvent.preventDefault()},changePageToNext:function(e){this.changePage(this.page+1),e.preventDefault()},changePageToLast:function(e){this.isLastPage||this.changePage(this.pageCount-1),e.preventDefault()},onRowChange:function(e){this.d_rows=e,this.changePage(this.page)},createStyle:function(){var e=this;if(this.hasBreakpoints()&&!this.isUnstyled){var n;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",G.setAttribute(this.styleElement,"nonce",(n=this.$primevue)===null||n===void 0||(n=n.config)===null||n===void 0||(n=n.csp)===null||n===void 0?void 0:n.nonce),document.head.appendChild(this.styleElement);var i="",r=Object.keys(this.template),o={};r.sort(function(h,m){return parseInt(h)-parseInt(m)}).forEach(function(h){o[h]=e.template[h]});for(var s=0,a=Object.entries(Object.entries(o));s<a.length;s++){var l=y0(a[s],2),u=l[0],c=y0(l[1],1),d=c[0],f=void 0,p=void 0;d!=="default"&&typeof Object.keys(o)[u-1]=="string"?p=Number(Object.keys(o)[u-1].slice(0,-2))+1+"px":p=Object.keys(o)[u-1],f=Object.entries(o)[u-1]?"and (min-width:".concat(p,")"):"",d==="default"?i+=`
|
|
189
|
+
@media screen `.concat(f,` {
|
|
190
|
+
.paginator[`).concat(this.attributeSelector,`],
|
|
191
|
+
display: flex;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
`):i+=`
|
|
195
|
+
.paginator[`.concat(this.attributeSelector,"], .p-paginator-").concat(d,` {
|
|
196
|
+
display: none;
|
|
197
|
+
}
|
|
198
|
+
@media screen `).concat(f," and (max-width: ").concat(d,`) {
|
|
199
|
+
.paginator[`).concat(this.attributeSelector,"], .p-paginator-").concat(d,` {
|
|
200
|
+
display: flex;
|
|
201
|
+
}
|
|
202
|
+
.paginator[`).concat(this.attributeSelector,`],
|
|
203
|
+
.p-paginator-default{
|
|
204
|
+
display: none;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
`)}this.styleElement.innerHTML=i}},hasBreakpoints:function(){return Vp(this.template)==="object"},setPaginatorAttribute:function(){var e=this;this.$refs.paginator&&this.$refs.paginator.length>=0&&QP(this.$refs.paginator).forEach(function(n){n.setAttribute(e.attributeSelector,"")})},getAriaLabel:function(e){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria[e]:void 0}},computed:{templateItems:function(){var e={};if(this.hasBreakpoints()){e=this.template,e.default||(e.default="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown");for(var n in e)e[n]=this.template[n].split(" ").map(function(i){return i.trim()});return e}return e.default=this.template.split(" ").map(function(i){return i.trim()}),e},page:function(){return Math.floor(this.d_first/this.d_rows)},pageCount:function(){return Math.ceil(this.totalRecords/this.d_rows)},isFirstPage:function(){return this.page===0},isLastPage:function(){return this.page===this.pageCount-1},calculatePageLinkBoundaries:function(){var e=this.pageCount,n=Math.min(this.pageLinkSize,e),i=Math.max(0,Math.ceil(this.page-n/2)),r=Math.min(e-1,i+n-1),o=this.pageLinkSize-(r-i+1);return i=Math.max(0,i-o),[i,r]},pageLinks:function(){for(var e=[],n=this.calculatePageLinkBoundaries,i=n[0],r=n[1],o=i;o<=r;o++)e.push(o+1);return e},currentState:function(){return{page:this.page,first:this.d_first,rows:this.d_rows}},empty:function(){return this.pageCount===0},currentPage:function(){return this.pageCount>0?this.page+1:0},attributeSelector:function(){return Vn()}},components:{CurrentPageReport:u0,FirstPageLink:c0,LastPageLink:p0,NextPageLink:h0,PageLinks:m0,PrevPageLink:g0,RowsPerPageDropdown:v0,JumpToPageDropdown:d0,JumpToPageInput:f0}};function sL(t,e,n,i,r,o){var s=et("FirstPageLink"),a=et("PrevPageLink"),l=et("NextPageLink"),u=et("LastPageLink"),c=et("PageLinks"),d=et("CurrentPageReport"),f=et("RowsPerPageDropdown"),p=et("JumpToPageDropdown"),h=et("JumpToPageInput");return t.alwaysShow||o.pageLinks&&o.pageLinks.length>1?(g(),O("nav",it(T({key:0},t.ptmi("paginatorWrapper"))),[(g(!0),O(ue,null,Je(o.templateItems,function(m,v){return g(),O("div",T({key:v,ref_for:!0,ref:"paginator",class:t.cx("paginator",{key:v})},t.ptm("root")),[t.$slots.start?(g(),O("div",T({key:0,class:t.cx("start")},t.ptm("start")),[Q(t.$slots,"start",{state:o.currentState})],16)):B("",!0),(g(!0),O(ue,null,Je(m,function(S){return g(),O(ue,{key:S},[S==="FirstPageLink"?(g(),P(s,{key:0,"aria-label":o.getAriaLabel("firstPageLabel"),template:t.$slots.firstpagelinkicon,onClick:e[0]||(e[0]=function(b){return o.changePageToFirst(b)}),disabled:o.isFirstPage||o.empty,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","template","disabled","unstyled","pt"])):S==="PrevPageLink"?(g(),P(a,{key:1,"aria-label":o.getAriaLabel("prevPageLabel"),template:t.$slots.prevpagelinkicon,onClick:e[1]||(e[1]=function(b){return o.changePageToPrev(b)}),disabled:o.isFirstPage||o.empty,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","template","disabled","unstyled","pt"])):S==="NextPageLink"?(g(),P(l,{key:2,"aria-label":o.getAriaLabel("nextPageLabel"),template:t.$slots.nextpagelinkicon,onClick:e[2]||(e[2]=function(b){return o.changePageToNext(b)}),disabled:o.isLastPage||o.empty,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","template","disabled","unstyled","pt"])):S==="LastPageLink"?(g(),P(u,{key:3,"aria-label":o.getAriaLabel("lastPageLabel"),template:t.$slots.lastpagelinkicon,onClick:e[3]||(e[3]=function(b){return o.changePageToLast(b)}),disabled:o.isLastPage||o.empty,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","template","disabled","unstyled","pt"])):S==="PageLinks"?(g(),P(c,{key:4,"aria-label":o.getAriaLabel("pageLabel"),value:o.pageLinks,page:o.page,onClick:e[4]||(e[4]=function(b){return o.changePageLink(b)}),pt:t.pt},null,8,["aria-label","value","page","pt"])):S==="CurrentPageReport"?(g(),P(d,{key:5,"aria-live":"polite",template:t.currentPageReportTemplate,currentPage:o.currentPage,page:o.page,pageCount:o.pageCount,first:r.d_first,rows:r.d_rows,totalRecords:t.totalRecords,unstyled:t.unstyled,pt:t.pt},null,8,["template","currentPage","page","pageCount","first","rows","totalRecords","unstyled","pt"])):S==="RowsPerPageDropdown"&&t.rowsPerPageOptions?(g(),P(f,{key:6,"aria-label":o.getAriaLabel("rowsPerPageLabel"),rows:r.d_rows,options:t.rowsPerPageOptions,onRowsChange:e[5]||(e[5]=function(b){return o.onRowChange(b)}),disabled:o.empty,templates:t.$slots,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","rows","options","disabled","templates","unstyled","pt"])):S==="JumpToPageDropdown"?(g(),P(p,{key:7,"aria-label":o.getAriaLabel("jumpToPageDropdownLabel"),page:o.page,pageCount:o.pageCount,onPageChange:e[6]||(e[6]=function(b){return o.changePage(b)}),disabled:o.empty,templates:t.$slots,unstyled:t.unstyled,pt:t.pt},null,8,["aria-label","page","pageCount","disabled","templates","unstyled","pt"])):S==="JumpToPageInput"?(g(),P(h,{key:8,page:o.currentPage,onPageChange:e[7]||(e[7]=function(b){return o.changePage(b)}),disabled:o.empty,unstyled:t.unstyled,pt:t.pt},null,8,["page","disabled","unstyled","pt"])):B("",!0)],64)}),128)),t.$slots.end?(g(),O("div",T({key:1,class:t.cx("end")},t.ptm("end")),[Q(t.$slots,"end",{state:o.currentState})],16)):B("",!0)],16)}),128))],16)):B("",!0)}Fp.render=sL;const aL=(t,e,n)=>{const i=t[e];return i?typeof i=="function"?i():Promise.resolve(i):new Promise((r,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},bl=Ae({__name:"Animation",props:{animation:{},autoplay:{type:Boolean,default:!0},loop:{type:Boolean,default:!0}},setup(t){const e=t,{defaultProps:n}=Zt("Animation"),i=X(()=>zi(e,n)),r=re(null);wt(async()=>{const s=await aL(Object.assign({"../../assets/lottie/admin/loading-page.lottie":()=>Gt.import("./loading-page-BrQattYE.js"),"../../assets/lottie/admin/loading-table.lottie":()=>Gt.import("./loading-table-BzrSQlA0.js"),"../../assets/lottie/admin/no-data.lottie":()=>Gt.import("./no-data-y1X5WtcQ.js"),"../../assets/lottie/supplyasset/loading-page.lottie":()=>Gt.import("./loading-page-DbLuqCHa.js"),"../../assets/lottie/supplyasset/loading-table.lottie":()=>Gt.import("./loading-table-Bdr9ZhtP.js"),"../../assets/lottie/supplyasset/no-data.lottie":()=>Gt.import("./no-data-Cgze_Rvp.js"),"../../assets/lottie/workspace/loading-page.lottie":()=>Gt.import("./loading-page-CgfbWppy.js"),"../../assets/lottie/workspace/loading-plane.lottie":()=>Gt.import("./loading-plane-CgfbWppy.js"),"../../assets/lottie/workspace/loading-table.lottie":()=>Gt.import("./loading-table-chOgXi94.js"),"../../assets/lottie/workspace/no-data.lottie":()=>Gt.import("./no-data-Dep79CBh.js")}),`../../assets/lottie/${i.value.libPath}/${e.animation}.lottie`,6),{DotLottie:a}=await o();r.value&&new a({canvas:r.value,src:s.default,autoplay:e.autoplay,loop:e.loop})});const o=()=>new Function('return import("https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-web@0.38.2/+esm")')();return(s,a)=>(g(),O("div",T({"data-wv-name":"animation"},s.$attrs),[E("canvas",{ref_key:"canvasRef",ref:r,style:{width:"100%",height:"100%"}},null,512)],16))}}),A0=(t,e,n)=>{if(e&&n>e){let i=0;return t.map(r=>{const o=e!==void 0&&i<e,s=r.checkedByDefault!==!1&&e===void 0||r.checkedByDefault!==!1&&o;return s&&i++,{...r,visible:s}})}return t},Al="tableConfigs",lL=()=>"user-"+(JSON.parse(localStorage.getItem("user")??"{}")._id??"unknown"),w0=async()=>{let t=null;return new Promise(e=>{const n=indexedDB.open(lL(),1);n.onupgradeneeded=i=>{t=i.target.result,t.createObjectStore(Al)},n.onsuccess=i=>{t=i.target.result,e(t)}})},uL=async()=>{const n=(await w0()).transaction(Al,"readonly").objectStore(Al);return new Promise(i=>{let r,o;n.getAllKeys().onsuccess=s=>{r=s.target.result},n.getAll().onsuccess=s=>{o=s.target.result;const a={};r.forEach((l,u)=>{a[l]=o[u]}),i(a)}})},Hp=hn({}),S0=async()=>{const t=async(e,n)=>{Hp[e]=n,(await w0()).transaction(Al,"readwrite").objectStore(Al).put(n,e)};return Object.assign(Hp,await uL()),{config:Hp,setConfig:t}};async function cL(t,e){const{config:n}=await S0(),i=n[t];return i?i.map(r=>{const o=e.find(s=>s.field===r.field);if(!(!o||o.visible===!1))return{...o,...r}}).filter(r=>!!r):e}const dL=["id","data-item-dragable","draggable","onDragenter","onDragstart"],C0=Ae({__name:"ColumnList",props:wn({tableId:{},defaultColumns:{},visibleColumns:{},maxColumn:{},type:{},savedColumns:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:e}){const n=t,i=ni(t,"modelValue"),r=re([]),o=oe(),s=X(()=>[...r.value].filter(b=>b.visible!==!1)),a=X(()=>n.maxColumn?s.value.length>=n.maxColumn:!1),l=b=>b.dragable!==!1&&u(b),u=b=>{if(!a.value)return!0;const k=i.value.findIndex(A=>A.field===b.field)>0;return a.value&&k},c=()=>{r.value=A0(r.value,n.maxColumn,s.value.length),i.value=[...s.value]},d=async()=>{const b=r.value.map(A=>({field:A.field,width:A.width??"max-content",visible:A.visible!==!1,fixed:!!A.fixed})),{setConfig:k}=await S0();await k(n.tableId,b)},f=()=>{i.value=[...r.value]},p=(b,k,A)=>{const{dataTransfer:w}=b;o.value=k,w&&(w.dropEffect="move",w.effectAllowed="move",w.setData("field",k.field),w.setData("index",A.toString()))},h=async()=>{o.value=void 0,f(),await d()},m=(b,k)=>{var A,w;if(b.preventDefault(),l(k)){const y=b.target,C=y.tagName==="LI"?y:y.closest("li");if(C==null||C.classList.add("bg-primary-50"),(A=C==null?void 0:C.nextElementSibling)==null||A.classList.remove("bg-primary-50"),(w=C==null?void 0:C.previousElementSibling)==null||w.classList.remove("bg-primary-50"),!C||!o.value)return;const I=r.value.findIndex(M=>{var D;return M.field===((D=o.value)==null?void 0:D.field)}),R=r.value.findIndex(M=>M.field===C.id);I!==-1&&R!==-1&&([r.value[I],r.value[R]]=[r.value[R],r.value[I]])}},v=b=>{const k=b.target.querySelector("label");k&&k.click()},S=()=>{const b=io(n.defaultColumns);if(n.maxColumn&&b.length>n.maxColumn){let k=0;r.value=b.map(A=>{const w=n.maxColumn!==void 0&&k<n.maxColumn,y=A.checkedByDefault!==!1&&n.maxColumn===void 0||A.checkedByDefault!==!1&&w;return y&&k++,{...A,visible:y}})}else r.value=b;i.value=[...s.value],d()};return $e(()=>n.savedColumns,b=>{r.value=b??[]},{immediate:!0}),e({setColumnVisibilityConfig:d,resetToDefault:S,updateVisibleColumnsModel:c}),(b,k)=>(g(),O("ul",null,[(g(!0),O(ue,null,Je(r.value,(A,w)=>{var y;return g(),O(ue,null,[A.reorderable!==!1?(g(),O("li",T({id:A.field,key:A.field,ref_for:!0},b.$preset.customcolumn.menuitem({props:n,context:{dragable:l(A)}}),{"data-item-dragable":l(A),draggable:l(A),onClick:v,onDragend:h,onDragenter:Ot(C=>m(C,A),["prevent"]),onDragleave:k[2]||(k[2]=Ot(()=>{},["prevent"])),onDragover:k[3]||(k[3]=Ot(()=>{},["prevent"])),onDragstart:C=>p(C,A,w),onMouseenter:k[4]||(k[4]=C=>C.target.classList.add("bg-primary-50")),onMouseleave:k[5]||(k[5]=C=>C.target.classList.remove("bg-primary-50")),"data-wv-section":"custom-column-menu-item"}),[L(Ee,T({onClick:k[0]||(k[0]=Ot(()=>{},["stop"])),ref_for:!0},(y=b.$preset.customcolumn)==null?void 0:y.dragicon({context:{dragable:l(A)}}),{icon:"dragable-menu"}),null,16),L(Jo,{"aria-label":A.header,disabled:A.fixed,label:A.header,"model-value":A.visible!==!1,selectable:u(A),onClick:k[1]||(k[1]=Ot(()=>{},["stop"])),"onUpdate:modelValue":C=>{A.visible=!!C,c(),d()},class:"!w-full"},null,8,["aria-label","disabled","label","model-value","selectable","onUpdate:modelValue"])],16,dL)):B("",!0)],64)}),256))]))}}),fL=Ae({__name:"CustomColumn",props:{tableId:{},defaultColumns:{},visibleColumns:{},maxColumn:{},type:{default:"menu"}},emits:["update:visibleColumns"],setup(t,{expose:e,emit:n}){const i=t,r=n;wt(()=>f());const{locale:o}=Zt("CustomColumn"),s=re(),a=re(),l=oe([]),u=X(()=>"column-visibility-menu-"+i.tableId),c=X({get:()=>i.visibleColumns,set:p=>{r("update:visibleColumns",p.filter(h=>h.visible!=!1))}}),d=async p=>{if(await f(),a.value&&"toggle"in a.value){const h=p.currentTarget??p.target,m=h.tagName.toLowerCase()==="th"?h:h.parentElement,v={...p,currentTarget:m};a.value.toggle(v)}},f=async()=>{const p=await cL(i.tableId,io(i.defaultColumns));l.value=A0(p,i.maxColumn,p.filter(h=>h.visible!==!1).length),c.value=l.value.filter(h=>h.visible!==!1)};return e({toggleMenu:d,resetToDefault:()=>{var p;(p=s.value)==null||p.resetToDefault()}}),(p,h)=>{var m,v,S,b;return g(),O(ue,null,[i.type==="menu"?(g(),P(x(Wu),{key:0,id:u.value,ref_key:"visibilityMenu",ref:a,"data-table-id":p.tableId,pt:{root:{class:[...(m=p.$preset.menu)==null?void 0:m.root.class,"shadow-panel"]},start:{class:[...(v=p.$preset.menu)==null?void 0:v.start.class,(S=p.$preset.customcolumn)==null?void 0:S.menustart.class]}},onHide:(b=s.value)==null?void 0:b.setColumnVisibilityConfig,"append-to":"body","auto-z-index":"","data-wv-name":"column-visibility","data-wv-section":"menu",popup:""},{start:H(()=>{var k;return[L(We,{label:x(o).resetDefaultText,onClick:(k=s.value)==null?void 0:k.resetToDefault,"data-wv-section":"button-reset-default",text:""},null,8,["label","onClick"])]}),end:H(()=>[L(C0,T({ref_key:"columnList",ref:s,modelValue:c.value,"onUpdate:modelValue":h[0]||(h[0]=k=>c.value=k)},i,{"saved-columns":l.value,"data-wv-section":"custom-column-list"}),null,16,["modelValue","saved-columns"])]),_:1},8,["id","data-table-id","pt","onHide"])):B("",!0),p.type==="flat"?(g(),P(C0,T({key:1,ref_key:"columnList",ref:s,modelValue:c.value,"onUpdate:modelValue":h[1]||(h[1]=k=>c.value=k)},i,{class:[{"grid grid-rows-4 grid-flow-col-dense w-max gap-x-4":p.type==="flat"}],"saved-columns":l.value,"data-wv-section":"custom-column-flat-list"}),null,16,["modelValue","class","saved-columns"])):B("",!0)],64)}}}),pL=Ae({__name:"MultiRow",props:{attributes:{}},setup(t){const e=t,n=dt("preset",{}).datatable;return(i,r)=>{var o;return g(),O("div",it(kt((o=x(n))==null?void 0:o.multirowcontainer({props:e}))),[(g(!0),O(ue,null,Je(i.attributes,(s,a)=>{var l;return g(),O("span",T({key:a,ref_for:!0},(l=x(n))==null?void 0:l.multirow({context:{firstIndex:a===0}}),{class:s.class}),[s.bodyComponent?(g(),P(yt(s.bodyComponent.component),T({key:0,modelValue:s.bodyComponent.model,"onUpdate:modelValue":u=>s.bodyComponent.model=u,ref_for:!0},s.bodyComponent.props,{class:s.class,disabled:s.bodyComponent.disabled},Ho(s.bodyComponent.events?s.bodyComponent.events:{}),{onClick:r[0]||(r[0]=Ot(()=>{},["stop"]))}),null,16,["modelValue","onUpdate:modelValue","class","disabled"])):(g(),O(ue,{key:1},[ht(_(s.value),1)],64))],16)}),128))],16)}}}),hL=["id"],mL=["onClick"],gL={class:"flex"},vL=["id"],yL={key:0},bL=["colspan"],AL=["id","draggable","onClick","onDblclick","onDragenter","onDragstart"],wL=["onClick"],SL=["colspan"],CL=["colspan"],kL=["colspan"],TL=["colspan"],OL=["colspan"],xL=["contenteditable","onBlur","onKeypress"],ML={key:1},EL={key:2},IL=["colspan"],PL=Ae({__name:"DataTable",props:wn({treeTable:{type:Boolean},childTableProps:{},tableName:{default:"datatable"},tableTitle:{default:void 0},columns:{},useOption:{type:Boolean,default:!0},data:{},dataKey:{default:"_id"},disableKey:{default:"isDefault"},includeCheckDisabledRows:{type:Boolean},highlightKey:{},disableAllRows:{type:Boolean},search:{},tag:{},defaultQueryParams:{},fetchFunction:{},rows:{},isSelectedAll:{type:Boolean},filters:{},lazy:{type:Boolean,default:!0},loading:{type:Boolean},selectionType:{default:"checkbox"},useSelection:{type:Boolean},selectedData:{},expandedRows:{},usePaginator:{type:Boolean},options:{default:()=>[]},singleSelect:{type:Boolean},customColumn:{type:Boolean,default:!0},scrollHeight:{},rowHeight:{default:"fixed"},reorderable:{type:Boolean},globalFilterFields:{},totalDisabledRows:{},excelToastErrorMessage:{},emptyTableMessage:{},singleSelection:{}},{singleSelection:{},singleSelectionModifiers:{}}),emits:wn(["toggleOption","selectData","rowSelect","page","sort","update:selectedData","update:singleSelection","cellEdited","input","rowReorder"],["update:singleSelection"]),setup(t,{emit:e}){const n=t,i=e,r=ni(t,"singleSelection"),{defaultProps:o,locale:s}=Zt("DataTable"),a=X(()=>zi(n,o)),l=dt("preset",{}).datatable,u=[10,25,50,100],c=dt("useToastConfig"),d=ro(c),{setLoading:f}=$i(),p=`${window.location.pathname.replace("/","").split("/").join("-")}-${n.tableName}`,h=re(n.data??[]),m=oe(n.data??[]),v=re({}),S=re(n.columns),b=re(),k=re(),A=oe([]),w=oe(),y=oe(0),C=oe(!1),I=oe(!1),R=oe(0),M=oe(0),D=oe(0),$=oe(!1),W=oe(),ie=re(),ve=re(),ae=re([]),me=oe({}),se=oe(),Pe=oe(),Be=oe(),xe=oe(),de=oe(1),ge=oe(10),Ie=oe(0),Oe=re({}),le=X(()=>{var V,te;return(V=n.childTableProps)!=null&&V.columns?(te=n.childTableProps)==null?void 0:te.columns.filter(ze=>{var qe;return!ze.parentColumnsFields||((qe=ze.parentColumnsFields)==null?void 0:qe.some(Kt=>S.value.some(Qe=>Qe.field===Kt)))}):S.value}),Se=X(()=>S.value.length+(n.selectionType==="checkbox"?1:0)+(n.useOption?1:0)+(n.reorderable?1:0)+(n.treeTable?1:0)),Z=X(()=>({...n.defaultQueryParams,search:n.lazy?se.value:n.search,tag:n.lazy?Pe.value:void 0,page:n.usePaginator?de.value:void 0,limit:n.usePaginator?ge.value:void 0,sortOrder:xe.value,sortBy:Be.value,...n.lazy?me.value:n.filters})),q=X(()=>{var te;const V=(te=h.value)==null?void 0:te.filter(ze=>{var qe;return((qe=ze.children)==null?void 0:qe.length)||ze.hasChildren});return(V==null?void 0:V.length)&&V.every(ze=>v.value[ze[n.dataKey]]>0)}),U=X(()=>{var Qe,Ht,Rt,Cn,xn;if(n.disableAllRows||!((Qe=lt())!=null&&Qe.length)||n.selectionType!=="checkbox"||((Ht=J.value)==null?void 0:Ht.length)===h.value.length)return!1;const V=(Rt=A.value)==null?void 0:Rt.length,te=((Cn=at(lt()))==null?void 0:Cn.map(ye=>ye[n.dataKey]))??[],ze=((xn=A.value)==null?void 0:xn.map(ye=>ye[n.dataKey]))??[],qe=ze.length?sP(te,ze):!1,Kt=V>0&&V===(Ie.value??0)-(J.value.length??0);return qe||Kt}),J=X(()=>Yt(n.data??lt()??[])),ke=X(()=>C.value||n.loading),He=X(()=>{var V;return!ke.value&&!((V=h.value)!=null&&V.length)}),j=X(()=>n.lazy&&n.fetchFunction||!n.usePaginator?h.value:h.value.slice((de.value-1)*ge.value,de.value*ge.value)),he=V=>Object.keys(v.value).includes(V),De=V=>J.value.includes(V),nt=V=>n.selectionType==="checkbox"?!!A.value.find(te=>te[n.dataKey]===V):St(V),St=V=>{var te;return V!==void 0&&((te=r.value)==null?void 0:te[n.dataKey])===V},lt=V=>(h.value??[]).filter(te=>!te.childRowHeader&&!te.childRow),bt=async(V,te,ze)=>{var Kt,Qe;if(he(V[n.dataKey])===ze)return;const qe=ze??!he(V[n.dataKey]);if(!I.value)if(!qe)h.value.splice(te+1,v.value[V[n.dataKey]]),delete v.value[V[n.dataKey]];else{v.value[V[n.dataKey]]=1;let{children:Ht}=V;if((Kt=n.childTableProps)!=null&&Kt.fetchFunction&&V.hasChildren)try{h.value.splice(te+1,0,{childRow:!0,loadingRow:!0}),I.value=!0;const Rt=await((Qe=n.childTableProps)==null?void 0:Qe.fetchFunction(V));Ht=Rt==null?void 0:Rt.data}catch(Rt){console.error("🚀 ~ toggleRowExpand ~ error:",Rt)}finally{h.value.splice(te+1,1),I.value=!1}if(te>=0&&(Ht!=null&&Ht.length)){const Rt=Ht.flatMap(Cn=>[{childRowHeader:!0,header:Cn.groupHeader},...(Cn.groupItems??[]).map(ye=>({childRow:!0,...ye}))]);v.value[V[n.dataKey]]=Rt.length,h.value.splice(te+1,0,...Rt)}else h.value.splice(te+1,0,{childRow:!0,noDataRow:!0})}},jt=V=>{n.includeCheckDisabledRows?A.value=V?lt():lt().filter(te=>De(te[n.dataKey])):A.value=V?at(lt()):[]},ln=(V,te,ze)=>{if(!te.childRow&&!te.childRowHeader&&!De(te[n.dataKey])&&n.selectionType!=="none"){const qe=nt(te[n.dataKey]);i("rowSelect",{originalEvent:V,data:te,index:ze}),n.selectionType==="checkbox"?qe?A.value=A.value.filter(Kt=>Kt[n.dataKey]!=te[n.dataKey]):A.value=[...A.value,te]:r.value=qe?void 0:te}},un=async()=>{var te;const V=!q.value;if(!I.value){let ze=0;for(const qe of h.value)((te=qe.children)!=null&&te.length||qe.hasChildren)&&await bt(qe,ze,V),ze++}},en=async(V,te)=>{const ze=V.target,qe=ze.tagName.toLowerCase()==="button"?ze:ze.parentElement;i("toggleOption",te);const Kt={...V,currentTarget:V.currentTarget??V.target};we(),await Et(()=>{var Qe;qe!=null&&qe.classList.contains("option-button-active")?we():((Qe=ve.value)==null||Qe.toggle(Kt),we(),qe==null||qe.classList.add("option-button-active"))})},Vt=async(V,te,ze)=>{var Kt,Qe,Ht,Rt;if(!ze.preset)return;const qe=()=>Rs(te,ze.field,!zn(te,ze.field));if(ze.preset.type==="checkbox"?(Qe=(Kt=ze.preset).onCheck)==null||Qe.call(Kt,V,te,qe):ze.preset.type==="toggle"&&((Rt=(Ht=ze.preset).onToggle)==null||Rt.call(Ht,V,te,qe)),"confirmDialogProps"in ze.preset){const{showWhen:Cn}=Ut(ze.preset,te[ze.field],te)??{};typeof Cn=="function"?Oe.value[te[n.dataKey]+ze.field]=await Cn(te,V):Oe.value[te[n.dataKey]+ze.field]=!Cn||Cn==="active"&&V||Cn==="inactive"&&!V}},Dt=V=>V.draggable!==!1&&!V.childRow&&!V.childRowHeader&&n.reorderable&&!xe.value,Sn=(V,te,ze)=>{if(te.childRow||te.childRowHeader)return;v.value={};const{dataTransfer:qe}=V;W.value=te,w.value={item:te,fromIndex:ze},qe&&(qe.dropEffect="move",qe.effectAllowed="move",qe.setData("id",te._id),qe.setData("index",ze.toString()))},Jt=(V,te)=>{var ze,qe;if(V.preventDefault(),Dt(te)){const Kt=V.target,Qe=Kt.tagName==="TR"?Kt:Kt.closest("tr");if(Qe==null||Qe.classList.add("bg-primary-50"),(ze=Qe==null?void 0:Qe.nextElementSibling)==null||ze.classList.remove("bg-primary-50"),(qe=Qe==null?void 0:Qe.previousElementSibling)==null||qe.classList.remove("bg-primary-50"),!Qe||!W.value)return;const Ht=ae.value.findIndex(Cn=>{var xn;return Cn._id===((xn=W.value)==null?void 0:xn._id)}),Rt=ae.value.findIndex(Cn=>Cn._id===Qe.id);Ht!==-1&&Rt!==-1&&(w.value&&(w.value.toIndex=Rt),[ae.value[Ht],ae.value[Rt]]=[ae.value[Rt],ae.value[Ht]],Y())}},ee=()=>{w.value&&i("rowReorder",w.value),W.value=void 0,$.value=!1,w.value=void 0},Y=()=>{h.value=[...ae.value]},we=()=>{const V=document.querySelectorAll(".option-button-active");V==null||V.forEach(te=>{te.classList.remove("option-button-active")})},je=()=>{Be.value=void 0,xe.value=void 0},st=()=>{de.value=1,D.value++},ne=()=>{ge.value=n.rows??10,de.value=1,D.value++},be=()=>{ne(),je()},Ue=async()=>{M.value++,D.value++,be(),n.lazy?await cn():ut()},ut=()=>{let V=[...m.value??[]];const te=me.value,ze=Object.entries(te);try{V=ze.length?V.filter(qe=>ze.every(([Kt,{value:Qe,matchMode:Ht}])=>{const Rt=zn(qe,Kt);switch(Ht){case"IN":return Array.isArray(Qe)?Qe.includes(Rt):!1;case"CONTAINS":return Rt&&Qe?Rt.toString().toLowerCase().includes(Qe):!1;case"EQUALS":return Rt?Rt.toString()===Qe.toString():!1;case"BETWEEN":return Array.isArray(Qe)&&Qe.length===2?!isNaN(Rt)&&(Qe[0]==null||Rt>=Qe[0])&&(Qe[1]==null||Rt<=Qe[1]):!1;case"DATE_BETWEEN":return Array.isArray(Qe)?+new Date(Rt)>=Qe[0]&&+new Date(Rt)<=Qe[1]:!1;default:return!1}})):m.value}catch(qe){console.error("🚀 ~ applyStaticFilter ~ error:",qe)}rt(V)},rt=V=>{var te;try{h.value=(te=se.value)!=null&&te.length?V.filter(ze=>{const qe=JSON.stringify(ze);return new RegExp(se.value,"i").test(qe)||se.value.split(/\s+/).filter(Boolean).every(Kt=>new RegExp(Kt,"i").test(qe))}):V}catch(ze){console.error("🚀 ~ applyStaticSearch ~ error:",ze)}},gt=async V=>{ge.value=V.rows,de.value=V.page+1,n.lazy&&n.fetchFunction&&await cn(),Object.keys(v.value).forEach(te=>{const ze=h.value.findIndex(qe=>qe[n.dataKey]==te);ze>=0&&bt(h.value[ze],ze,!0)})},zt=(V,te)=>{V!==Be.value&&(xe.value=void 0),Be.value=V,xe.value?xe.value==-1?(xe.value=void 0,Be.value=void 0):xe.value=-1:xe.value=1,i("sort",{sortOrder:xe.value,sortField:Be.value,originalEvent:te,rows:ge.value}),st(),n.lazy&&n.fetchFunction?cn():rn()},rn=()=>{const V=[...h.value??[]],te=new Map;if(!xe.value){h.value=m.value??[];return}for(const qe of V)te.set(qe,Ce.resolveFieldData(qe,Be.value));const ze=new Intl.Collator(void 0,{numeric:!0}).compare;V.sort((qe,Kt)=>{const Qe=te.get(qe),Ht=te.get(Kt);return Ce.sort(Qe,Ht,xe.value,ze,-1)}),h.value=V},cn=async()=>{var V;try{C.value=!0;const te=await((V=n.fetchFunction)==null?void 0:V.call(n,Z.value)),{data:ze=[],totalRecords:qe=0}=(te==null?void 0:te.data)??{};h.value=ze,ae.value=[...h.value],Ie.value=qe}catch(te){console.error("🚀 ~ reFetch ~ error:",te)}finally{C.value=!1,v.value={}}},pn=async()=>{var ze;const V=io(Z.value);delete V.page,delete V.limit;const te=await((ze=n.fetchFunction)==null?void 0:ze.call(n,V));if(te instanceof Error)throw te;return(te==null?void 0:te.data)??{data:[],totalRecords:0}},z=async V=>{if(n.tableName===V.tableName)try{C.value=!0;const{data:te,totalRecords:ze=0}=n.lazy?await pn():{totalRecords:(n.data??[]).length,data:n.data},qe=Yt(te);A.value=n.includeCheckDisabledRows?te??[]:at(te,qe),Ie.value=ze}finally{C.value=!1}},fe=(V,te)=>l==null?void 0:l.headercell({props:n,context:{sortOrder:xe.value,customColumn:te,sorted:Be.value&&Be.value===(V==null?void 0:V.field),sortable:V==null?void 0:V.sortable}}),Re=V=>{(!V.tableName||V.tableName===n.tableName)&&Et(()=>{R.value++,cn()})},at=(V,te)=>(V??[]).filter(ze=>!(te??J.value).includes(ze[n.dataKey])),Yt=(V=[])=>n.disableAllRows?V.map(te=>te[n.dataKey]):V.filter(te=>te[n.disableKey]).map(te=>te[n.dataKey]),_t=async({tableName:V,multiTableNames:te,fileName:ze,additionalTexts:qe})=>{var Cn;if(V!==n.tableName&&!(te!=null&&te.includes(n.tableName)))return;const Qe=S.value.filter(xn=>xn.visible!==!1).filter(xn=>!xn.excluded),Ht=Qe.map(xn=>xn.header??xn.exportHeader??"-"),Rt=()=>ze.trim().replace(/[^a-zA-Z0-9\s]/g,"-").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/-+$/,"");try{if(Ye.off("data-table:download",N),V===n.tableName){f(!0,s.downloadingMessage);const{data:xn}=n.fetchFunction?await pn():{data:n.data},ye=uv(xn,Qe,s);if(te!=null&&te.length){Ye.emit("button-download:multi-tables",{table:{headers:Ht,data:ye,tableName:V,tableTitle:n.tableTitle}});return}await df({tables:[{headers:Ht,data:ye,tableName:V,tableTitle:n.tableTitle}],fileName:Rt(),additionalTexts:qe})}}catch(xn){console.error("🚀 ~ downloadExcel error:",xn),d.removeAllGroups(),d.add({message:((Cn=a.value.excelToastErrorMessage)==null?void 0:Cn.replace("{fileName}",ze))??"Data gagal diunduh.",error:xn,group:"download"})}finally{f(!1),Ye.on("data-table:download",N)}};wt(async()=>{var V;n.fetchFunction&&(await cn(),Ke()),(V=n.selectedData)!=null&&V.length&&(A.value=n.selectedData),_e()}),Fo(()=>{Ge()}),$e(()=>n.columns,()=>{n.customColumn||(S.value=n.columns),y.value++}),$e(()=>n.data,V=>{h.value=V??[],m.value=V??[],Ye.emit("data-table:updated",{tableName:n.tableName,data:V}),Ie.value=V==null?void 0:V.length},{immediate:!0}),$e(Ie,V=>{K(V)}),$e(A,V=>{i("selectData",V),i("update:selectedData",V),Ye.emit("data-table:update-selected-data",{tableName:n.tableName,data:V})},{deep:!0});const _e=()=>{Ye.on("data-table:apply-filter",vt),Ye.on("search-table",On),Ye.on("search-by-scan-table",bn),Ye.on("data-table:clear-selected-data",_i),Ye.on("data-table:select-all-record",Mr),Ye.on("data-table:download",N),Ye.on("data-table:import-excel-to-json",Ze)},Ge=()=>{Ye.off("data-table:update",Re),Ye.off("data-table:apply-filter",vt),Ye.off("search-table",On),Ye.off("search-by-scan-table",bn),Ye.off("data-table:clear-selected-data",_i),Ye.off("data-table:select-all-record",Mr),Ye.off("data-table:download",N),Ye.off("data-table:import-excel-to-json",Ze)},vt=V=>{V.tableName===n.tableName&&(me.value=V.filter,Ue())},On=V=>{V.tableName===n.tableName&&(se.value=V.search,Ue())},bn=V=>{V.tableName===n.tableName&&(Pe.value=V.tag,Ue())},Mr=V=>{V.tableName===n.tableName&&z(V)},_i=V=>{V.tableName===n.tableName&&(A.value=[])},N=V=>{var te;(V.tableName===n.tableName||(te=V.multiTableNames)!=null&&te.includes(n.tableName))&&_t(V)},F=V=>{V.code.includes("Digit")||V.code.includes("Numpad")||["ArrowLeft","ArrowRight","Backspace","Delete"].includes(V.code)||V.preventDefault()},K=V=>{const te=n.includeCheckDisabledRows?0:(J.value.length||n.totalDisabledRows)??0,ze={total:(V??Ie.value??0)-te,tableName:n.tableName};Ye.emit("data-table:update-total-record",ze)},Ke=()=>{Ye.on("data-table:update",Re)},Ze=V=>{V.tableName===n.tableName&&(h.value=V.data,ae.value=[...h.value],Ie.value=V.data.length)},Ut=(V,te,ze)=>typeof(V==null?void 0:V.confirmDialogProps)=="function"?V==null?void 0:V.confirmDialogProps(te,ze):V==null?void 0:V.confirmDialogProps;return(V,te)=>{var ze,qe,Kt;return g(),O("div",it(kt((ze=x(l))==null?void 0:ze.root)),[E("div",it(kt((qe=x(l))==null?void 0:qe.tablewrapper)),[L(x(rP),T({"auto-hide":!1},(Kt=x(l))==null?void 0:Kt.scrollheightwrapper({props:n}),{class:"custom-scrollbar"}),{default:H(()=>{var Qe,Ht,Rt,Cn,xn;return[(g(),O("table",T({id:x(p)},(Qe=x(l))==null?void 0:Qe.table,{key:M.value,ref:b.value}),[E("thead",it(kt(x(l).thead)),[E("tr",it(kt(x(l).headerrow)),[V.reorderable&&!xe.value?(g(),O("th",T({key:0},x(l).headercellreorderable,{class:fe().class}),null,16)):B("",!0),V.selectionType==="checkbox"?(g(),O("th",T({key:1},x(l).headercellcheckbox,{class:fe().class}),[L(Jo,T((Ht=x(l))==null?void 0:Ht.headercheckbox({context:{isSelectedAll:U.value}}),{"model-value":U.value,"onUpdate:modelValue":te[0]||(te[0]=ye=>jt(!!ye)),binary:""}),null,16,["model-value"])],16)):B("",!0),V.treeTable?(g(),O("th",T({key:2},x(l).headertoggler,{class:fe().class}),[L(We,T({onClick:un},x(l).headertogglerbutton({context:{isExpandedAll:q.value}}),{icon:"arrow-down",text:""}),null,16)],16)):B("",!0),(g(!0),O(ue,null,Je(S.value,ye=>(g(),O("th",T({key:ye.field,class:[ye.headerClass,ye.class],ref_for:!0},fe(ye),{onClick:kn=>ye.sortable?zt(ye.field,kn):null}),[E("span",T({ref_for:!0},x(l).headercellcontent),[E("span",gL,[ht(_(ye.header)+" ",1),ye.info?(g(),P(Ee,{key:0,info:ye.info,severity:ye.infoSeverity,class:"w-[10px] h-[10px]",icon:"info"},null,8,["info","severity"])):B("",!0)]),ye.sortable?(g(),P(Ee,{key:0,icon:!Be.value||Be.value!=ye.field?"arrow-up-down":xe.value==1?"sort-asc":"sort-desc",class:"text-base"},null,8,["icon"])):B("",!0)],16)],16,mL))),128)),n.customColumn||n.useOption?(g(),O("th",T({key:3},fe(void 0,n.customColumn),{id:`column-visibility-toggle-${x(p)}`,onClick:te[1]||(te[1]=(...ye)=>{var kn,Er;return((kn=ie.value)==null?void 0:kn.toggleMenu)&&((Er=ie.value)==null?void 0:Er.toggleMenu(...ye))})}),[n.customColumn?(g(),P(Ee,T({key:0},x(l).columnvisibilityicon,{icon:"ellipsis-h","tooltip-pos":"left"}),null,16)):B("",!0)],16,vL)):B("",!0)],16)],16),E("tbody",it(kt((Rt=x(l))==null?void 0:Rt.tbody)),[ke.value?(g(),O("tr",yL,[E("td",T({colspan:Se.value},(Cn=x(l))==null?void 0:Cn.bodycell),[(g(!0),O(ue,null,Je(x(l).invisiblelottiewrapper?2:1,ye=>(g(),O("div",T({key:ye,ref_for:!0},ye===1?x(l).loadingtablewrapper:x(l).invisiblelottiewrapper),[L(bl,T({animation:"loading-table",ref_for:!0},x(l).loadingtablelottie),null,16)],16))),128))],16,bL)])):He.value?(g(),O("tr",EL,[E("td",T({colspan:Se.value},(xn=x(l))==null?void 0:xn.bodycell),[(g(!0),O(ue,null,Je(x(l).invisiblelottiewrapper?2:1,ye=>(g(),O("div",T({key:ye,ref_for:!0},ye===1?x(l).nodatalottiewrapper:x(l).invisiblelottiewrapper),[L(bl,T({animation:"no-data",ref_for:!0},x(l).nodatalottie),null,16),a.value.emptyTableMessage?(g(),O("span",T({key:0,ref_for:!0},x(l).nodatamessage),_(a.value.emptyTableMessage),17)):B("",!0)],16))),128))],16,IL)])):(g(!0),O(ue,{key:1},Je(j.value,(ye,kn)=>{var Er,Vd,Ne,ct,Bt,tn,En,Mi,cr,Ms,ai;return g(),O("tr",T({id:ye._id,key:`${kn}-${ye[V.dataKey]}`,draggable:Dt(ye),ref_for:!0},(Er=x(l))==null?void 0:Er.bodyrow({context:{highlighted:ye[V.highlightKey??""],selected:nt(ye[V.dataKey]),disabled:De(ye[V.dataKey]),draggable:Dt(ye),dragging:$.value},props:n}),{onClick:Te=>ln(Te,ye,kn),onDblclick:Te=>{var dr;return V.treeTable&&((dr=ye.children)!=null&&dr.length||ye.hasChildren)?bt(ye,kn):null},onDrag:te[10]||(te[10]=Te=>$.value=!0),onDragenter:Ot(Te=>Jt(Te,ye),["prevent"]),onDragleave:te[11]||(te[11]=Ot(()=>{},["prevent"])),onDragover:te[12]||(te[12]=Ot(()=>{},["prevent"])),onDragstart:Te=>Sn(Te,ye,kn),onDrop:ee}),[V.reorderable&&!xe.value?(g(),O("td",T({key:0,ref_for:!0},(Vd=x(l))==null?void 0:Vd.bodycell),[!ye.childRow&&!ye.childRowHeader?(g(),P(Ee,{key:0,class:"draggableicon",icon:"dragable-menu"})):B("",!0)],16)):B("",!0),V.selectionType==="checkbox"?(g(),O("td",T({key:1,ref_for:!0},(Ne=x(l))==null?void 0:Ne.bodycell,{onClick:te[3]||(te[3]=Ot(()=>{},["stop"]))}),[!ye.childRow&&!ye.childRowHeader?(g(),P(Jo,T({key:0,ref_for:!0},(ct=x(l))==null?void 0:ct.rowcheckbox,{modelValue:A.value,"onUpdate:modelValue":te[2]||(te[2]=Te=>A.value=Te),binary:!1,disabled:De(ye[V.dataKey]),value:ye}),null,16,["modelValue","disabled","value"])):B("",!0)],16)):B("",!0),V.treeTable?(g(),O("td",T({key:2,ref_for:!0},(Bt=x(l))==null?void 0:Bt.bodycell,{onClick:Te=>{(ye.childRow||ye.childRowHeader)&&Te.stopPropagation()}}),[(tn=ye.children)!=null&&tn.length||ye.hasChildren?(g(),P(We,T({key:0,onClick:Ot(Te=>bt(ye,kn),["stop"]),ref_for:!0},x(l).rowtogglerbutton({context:{isRowExpanded:he(ye[V.dataKey])}}),{icon:"arrow-down",text:""}),null,16,["onClick"])):B("",!0)],16,wL)):B("",!0),(()=>{var Te;return ye.childRowHeader&&((Te=n.childTableProps)==null?void 0:Te.useColumnsHeader)})()?(g(!0),O(ue,{key:3},Je(le.value,Te=>{var dr,zo;return g(),O("td",{key:Te.header,class:pe([(dr=x(l))==null?void 0:dr.bodycell.class,"font-semibold text-xs"]),colspan:Te.colspan??((zo=Te.parentColumnsFields)==null?void 0:zo.length),onClick:te[4]||(te[4]=Ot(()=>{},["stop"]))},_(Te.header),11,SL)}),128)):ye.childRowHeader?(g(),O("td",T({key:4,ref_for:!0},x(l).childrowheader,{class:(En=x(l))==null?void 0:En.bodycell.class,colspan:n.columns.length+1,onClick:te[5]||(te[5]=Ot(()=>{},["stop"]))}),_(ye.header),17,CL)):ye.loadingRow?(g(),O("td",{key:5,class:pe((Mi=x(l))==null?void 0:Mi.bodycell.class),colspan:n.columns.length+1,onClick:te[6]||(te[6]=Ot(()=>{},["stop"]))},[E("div",T({ref_for:!0},x(l).loadingtablewrapper),[L(bl,T({animation:"loading-table",ref_for:!0},x(l).loadingtablelottie),null,16)],16)],10,kL)):ye.noDataRow?(g(),O("td",{key:6,class:pe((cr=x(l))==null?void 0:cr.bodycell.class),colspan:n.columns.length+1,onClick:te[7]||(te[7]=Ot(()=>{},["stop"]))},[E("div",T({ref_for:!0},x(l).nodatalottiewrapper),[L(bl,T({animation:"no-data",ref_for:!0},x(l).nodatalottie),null,16),a.value.emptyTableMessage?(g(),O("span",T({key:0,ref_for:!0},x(l).nodatamessage),_(a.value.emptyTableMessage),17)):B("",!0)],16)],10,TL)):(g(),O(ue,{key:7},[(g(!0),O(ue,null,Je(ye.childRow?le.value:S.value,Te=>{var dr,zo,mu,zd,Fd,Hd,jd,Es,gu,Ri,Ud,ya,At,vu,Rn,Qt,Is,Ir;return g(),O("td",T({key:Te.field,class:[{"!py-0":Te.editable,"!px-0":((dr=Te.preset)==null?void 0:dr.type)==="multirow"},typeof Te.bodyClass=="function"?Te.bodyClass(ye):Te.bodyClass,Te.class],colspan:Te.colspan??((zo=Te.parentColumnsFields)==null?void 0:zo.length),ref_for:!0},(mu=x(l))==null?void 0:mu.bodycell),[((zd=Te.preset)==null?void 0:zd.type)==="toggle"||((Fd=Te.preset)==null?void 0:Fd.type)==="checkbox"?(g(),O(ue,{key:0},[((Hd=Te.preset)==null?void 0:Hd.type)==="toggle"?(g(),P(bb,{key:0,disabled:De(ye[V.dataKey])||(typeof((jd=Te.preset)==null?void 0:jd.disabled)=="function"?(Es=Te.preset)==null?void 0:Es.disabled(ye):(gu=Te.preset)==null?void 0:gu.disabled),"input-id":ye[V.dataKey],"model-value":x(zn)(ye,Te.field),onClick:te[8]||(te[8]=Ot(()=>{},["stop"])),"onUpdate:modelValue":An=>{x(Rs)(ye,Te.field,An),Vt(An,ye,Te)}},null,8,["disabled","input-id","model-value","onUpdate:modelValue"])):B("",!0),((Ri=Te.preset)==null?void 0:Ri.type)==="checkbox"?(g(),P(Jo,{key:1,disabled:De(ye[V.dataKey])||(typeof((Ud=Te.preset)==null?void 0:Ud.disabled)=="function"?(ya=Te.preset)==null?void 0:ya.disabled(ye):(At=Te.preset)==null?void 0:At.disabled),"input-id":ye[V.dataKey],"model-value":x(zn)(ye,Te.field),onClick:te[9]||(te[9]=Ot(()=>{},["stop"])),"onUpdate:modelValue":An=>{x(Rs)(ye,Te.field,!!An),Vt(!!An,ye,Te)},binary:""},null,8,["disabled","input-id","model-value","onUpdate:modelValue"])):B("",!0),(vu=Te.preset)!=null&&vu.confirmDialogProps?(g(),P(or,T({key:2,list:[ye],visible:!!Oe.value[ye[V.dataKey]+Te.field],onClose:()=>{var ti,Fe,ot;const An=()=>x(Rs)(ye,Te.field,!x(zn)(ye,Te.field));((ti=Ut(Te.preset,ye[Te.field],ye))==null?void 0:ti.actionable)==!1&&"onConfirm"in Te.preset?(ot=(Fe=Te.preset).onConfirm)==null||ot.call(Fe,ye[Te.field],ye,An):An()},onConfirm:An=>{var ti,Fe;return(Fe=(ti=Te.preset)==null?void 0:ti.onConfirm)==null?void 0:Fe.call(ti,ye[Te.field],ye,()=>x(Rs)(ye,Te.field,!x(zn)(ye,Te.field)))},"onUpdate:visible":An=>Oe.value[ye[V.dataKey]+Te.field]=An,actionable:"",ref_for:!0},Ut(Te.preset,ye[Te.field],ye)),null,16,["list","visible","onClose","onConfirm","onUpdate:visible"])):B("",!0)],64)):((Rn=Te.preset)==null?void 0:Rn.type)==="multirow"?(g(),P(pL,{key:1,attributes:((Is=(Qt=Te.preset)==null?void 0:Qt.fieldAttributes)==null?void 0:Is.call(Qt,ye))??[]},null,8,["attributes"])):Te.editable?(g(),O("span",T({key:2,ref_for:!0},x(l).celleditableelement,{contenteditable:Te.editable,onBlur:An=>{V.$emit("cellEdited",{item:ye,field:Te.field,index:kn,value:An.target.innerText})},onKeypress:An=>{Te.numberInputOnly&&F(An)}}),_(x(zn)(ye,Te.field)||"-"),17,xL)):Te.bodyComponent||Te.bodyClass||Te.bodyTemplate||Te.dateFormatOptions?(g(),O(ue,{key:3},[Te.bodyComponent?(g(),P(yt(Te.bodyComponent(ye,kn).component),T({key:0,modelValue:Te.bodyComponent(ye,kn).model,"onUpdate:modelValue":An=>Te.bodyComponent(ye,kn).model=An,disabled:Te.bodyComponent(ye,kn).disabled,ref_for:!0},Te.bodyComponent(ye,kn).props,Ho(Te.bodyComponent(ye,kn).events?Te.bodyComponent(ye,kn).events:{}),{onChange:An=>{var ti,Fe;return(Fe=(ti=Te.bodyComponent(ye,kn)).onChange)==null?void 0:Fe.call(ti,ye)},onClick:An=>{Te.bodyComponent(ye,kn).stop!==!1&&An.stopPropagation()},"onUpdate:modelValue":An=>{var ti,Fe;return(Fe=(ti=Te.bodyComponent(ye,kn)).onChange)==null?void 0:Fe.call(ti,ye)}}),null,16,["modelValue","onUpdate:modelValue","disabled","onChange","onClick"])):(g(),O("span",ML,[Te.bodyTemplate?(g(),O(ue,{key:0},[ht(_(((Ir=Te.bodyTemplate)==null?void 0:Ir.call(Te,ye,kn))||"-"),1)],64)):Te.dateFormatOptions?(g(),O(ue,{key:1},[ht(_(x(bu)(new Date(x(zn)(ye,Te.field)),Te.dateFormatOptions)),1)],64)):(g(),O(ue,{key:2},[ht(_(x(zn)(ye,Te.field)||"-"),1)],64))]))],64)):(g(),O(ue,{key:4},[ht(_(x(zn)(ye,Te.field)??"-"),1)],64))],16,OL)}),128)),(()=>{var Te;return(V.useOption||ie.value)&&!ye.childRow||ye.childRow&&((Te=V.childTableProps)==null?void 0:Te.useOption)})()?(g(),O("td",T({key:0,ref_for:!0,ref_key:"rowSingleActionCell",ref:k},(Ms=x(l))==null?void 0:Ms.rowsingleactioncell({props:n,context:{selected:nt(ye[V.dataKey]),highlighted:ye[V.highlightKey??""]}}),{class:x(l).bodycell.class}),[V.useOption||(ai=V.childTableProps)!=null&&ai.useOption?(g(),O("div",T({key:0,ref_for:!0},x(l).singleactionwrapper),[L(We,T({id:"button-action-"+ye[n.dataKey],ref_for:!0},x(l).singleactionbutton({props:n}),{disabled:V.disableAllRows,onClick:Ot(Te=>en(Te,ye),["stop"]),icon:"ellipsis-h",outlined:"",size:"small","tooltip-pos":"left",type:"button"}),null,16,["id","disabled","onClick"])],16)):B("",!0)],16)):B("",!0)],64))],16,AL)}),128))],16)],16,hL))]}),_:1},16)],16),V.usePaginator?ft((g(),P(x(Fp),T({key:D.value,rows:ge.value,"onUpdate:rows":te[13]||(te[13]=Qe=>ge.value=Qe)},x(l).paginator({context:{totalRecords:Ie.value}}),{"rows-per-page-options":u,"total-records":Ie.value,onPage:gt}),{firstpagelinkicon:H(()=>[L(Ee,{icon:"round-keyboard-double-arrow-left"})]),lastpagelinkicon:H(()=>[L(Ee,{icon:"round-keyboard-double-arrow-right"})]),prevpagelinkicon:H(()=>[L(Ee,{icon:"round-keyboard-arrow-left"})]),nextpagelinkicon:H(()=>[L(Ee,{icon:"round-keyboard-arrow-right"})]),_:1},16,["rows","total-records"])),[[Xn,!ke.value]]):B("",!0),L(sp,{id:"single-action-menu",ref_key:"optionMenu",ref:ve,model:V.options,onFocus:x(oP),"append-to":"body","auto-z-index":"",popup:""},null,8,["model","onFocus"]),n.customColumn?(g(),P(fL,{key:y.value,ref_key:"customColumn",ref:ie,"visible-columns":S.value,"onUpdate:visibleColumns":te[14]||(te[14]=Qe=>S.value=Qe),"default-columns":V.columns.filter(Qe=>Qe.visible!==!1),"table-id":x(p)},null,8,["visible-columns","default-columns","table-id"])):B("",!0),L(Hs,{group:"download"})],16)}}}),k0=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},jp=ce("DataTable",k0(PL,[["__scopeId","data-v-96b7926f"]])),T0=ce("Form",Ae({__name:"Form",props:{buttonsTemplate:{},disableSubmit:{type:Boolean},cancelBtnLabel:{default:"Batal"},clearBtnLabel:{default:"Bersihkan Field"},columnPerRow:{},hideFooter:{type:Boolean},hideStayCheckbox:{type:Boolean},invalid:{type:Boolean},resetAfterSubmit:{type:Boolean,default:!0},saveBtnLabel:{default:"Simpan"},submitBtnLabel:{default:"Simpan"},stayCheckboxLabel:{default:"Tetap di halaman ini"},validatorMessage:{default:"Please input all required field!"},validateOnSave:{type:Boolean,default:!1},cancelBtnSeverity:{default:"secondary"},saveBtnSeverity:{default:"success"},submitBtnSeverity:{default:"success"}},emits:["cancel","clear","save","submit"],setup(t,{expose:e,emit:n}){const i=t,r=n;wt(()=>{if(C.value){const ae=i.columnPerRow??1;C.value.style.gridTemplateColumns=`repeat(${ae}, minmax(0, 1fr))`,R()}});const o=dt("preset",{}).form,{handleSubmit:s,values:a,resetForm:l,errors:u,resetField:c,setValues:d,setFieldValue:f,setErrors:p}=Nf(),h=oe(!1),m=re(),v=oe(!1),S=oe(!1),b=oe(0),k=re(),A=oe(!1),w=oe(!1),y=oe(!1),C=re(null),I=re(null);Ps("isSubmitting",A);const R=()=>{var ae;if(k.value){const me=(ae=k.value)==null?void 0:ae.offsetHeight;I.value&&(I.value.style.height=`calc(100% + ${me+20}px)`)}},M=()=>{A.value=!0,y.value=!0,S.value||(v.value=!0)},D=()=>{A.value=!0,w.value=!0,i.validateOnSave?(S.value||(v.value=!0),$()):W()},$=s(ae=>{if(!i.invalid){const me=ve(ae),se={stayAfterSubmit:h.value,formValues:me};w.value?r("save",se):r("submit",se),v.value=!1,w.value=!1,i.resetAfterSubmit&&(b.value+=1,l())}A.value=!1},()=>{A.value=!1}),W=()=>{const ae=ve(a),me={stayAfterSubmit:h.value,formValues:ae};r("save",me),A.value=!1},ie=()=>{l(),b.value++,r("clear"),v.value=!1,y.value=!1},ve=ae=>{const me=ae,se=Object.keys(me);for(const Pe of se)typeof me[Pe]=="string"&&(me[Pe]=me[Pe].trim());return me};return $e(a,()=>{y.value=!1},{deep:!0}),e({stayAfterSubmit:h,submit:$,onSubmitClicked:M,onSaveClicked:D,showValidator:v,formElement:m,clearField:ie,resetField:c,errors:u,setOuterFieldsWrapperHeight:R,setValues:d,setFieldValue:f,setErrors:p,values:a,isSubmitClicked:y}),(ae,me)=>{var se,Pe,Be,xe,de,ge,Ie,Oe,le,Se,Z,q,U,J,ke;return g(),O("form",T({ref_key:"formElement",ref:m},(se=x(o))==null?void 0:se.root({props:i}),{onInput:me[2]||(me[2]=He=>v.value=!1),onSubmit:me[3]||(me[3]=Ot((...He)=>x($)&&x($)(...He),["prevent"]))}),[E("div",{ref_key:"outerFieldsWrapper",ref:I},[E("div",T({ref_key:"fieldsWrapper",ref:C},(Pe=x(o))==null?void 0:Pe["fields-wrapper"]),[Q(ae.$slots,"fields",{key:b.value,formValues:x(a)})],16)],512),ae.hideFooter?B("",!0):(g(),O("div",T({key:0,ref_key:"footer",ref:k},(Be=x(o))==null?void 0:Be.footer),[ae.hideStayCheckbox?B("",!0):(g(),O("div",it(T({key:0},(xe=x(o))==null?void 0:xe.staycheckbox)),[L(Jo,{modelValue:h.value,"onUpdate:modelValue":me[0]||(me[0]=He=>h.value=He),label:ae.stayCheckboxLabel},null,8,["modelValue","label"])],16)),E("div",T({id:"footer-actions-wrapper"},(de=x(o))==null?void 0:de["action-buttons"]),[ft(L(Fn,T((ge=x(o))==null?void 0:ge["validator-message"],{message:ae.validatorMessage}),null,16,["message"]),[[Xn,v.value||i.invalid]]),E("div",it(kt((Ie=x(o))==null?void 0:Ie["button-wrapper"])),[(Oe=i.buttonsTemplate)!=null&&Oe.includes("cancel")?(g(),P(We,T({key:0},(le=x(o))==null?void 0:le["cancel-button"],{label:ae.cancelBtnLabel,severity:ae.cancelBtnSeverity,onClick:me[1]||(me[1]=He=>ae.$emit("cancel")),"data-test":"cancel-button",text:"",type:"button"}),null,16,["label","severity"])):B("",!0),(Se=i.buttonsTemplate)!=null&&Se.includes("clear")?(g(),P(We,T({key:1},(Z=x(o))==null?void 0:Z["clear-button"],{label:ae.clearBtnLabel,onClick:ie,text:"",type:"button"}),null,16,["label"])):B("",!0),(q=i.buttonsTemplate)!=null&&q.includes("save")?(g(),P(We,T({key:2},(U=x(o))==null?void 0:U["save-button"],{label:ae.saveBtnLabel,severity:ae.saveBtnSeverity,onClick:D,outlined:"",type:"button"}),null,16,["label","severity"])):B("",!0),(J=i.buttonsTemplate)!=null&&J.includes("submit")?(g(),P(We,T({key:3},(ke=x(o))==null?void 0:ke["submit-button"],{disabled:ae.disableSubmit,label:ae.submitBtnLabel,severity:ae.submitBtnSeverity,onClick:M,type:"submit"}),null,16,["disabled","label","severity"])):B("",!0)],16)],16)],16))],16)}}})),Up=ce("DialogForm",Ae({__name:"DialogForm",props:{buttonsTemplate:{},header:{},visible:{type:Boolean},asideRightWidth:{default:260},class:{},cancelBtnLabel:{},clearBtnLabel:{},closable:{type:Boolean,default:!0},closeOnSubmit:{type:Boolean,default:!0},contentClass:{},dateHeader:{},headerIcon:{},invalid:{type:Boolean},resetAfterSubmit:{type:Boolean,default:!0},severity:{},showStayCheckbox:{type:Boolean,default:void 0},stayCheckboxLabel:{},submitBtnLabel:{},validatorMessage:{},validationFunction:{},width:{default:"small"},disableSubmit:{type:Boolean},columnPerRow:{default:1},hideFooter:{type:Boolean},hideStayCheckbox:{type:Boolean},saveBtnLabel:{},validateOnSave:{type:Boolean},cancelBtnSeverity:{},saveBtnSeverity:{},submitBtnSeverity:{}},emits:["clear","close","hide","show","submit","update:visible"],setup(t,{expose:e,emit:n}){const i=t,r=n,o=wa(),{locale:s}=Zt("DialogForm"),a=dt("preset",{}).dialog,l=dt("preset",{}).dialogform,u=re(),c=re(),d=oe(0),f=oe(!1),p=oe(!1),h=re({stayAfterSubmit:!1,formValues:{}}),m=X(()=>{const w=o["aside-right"]&&p.value?i.asideRightWidth:0;return`calc(${{small:400,medium:500,large:572,"semi-xlarge":600,xlarge:800}[i.width]}px + ${w}px)`}),v=()=>{r("update:visible",!1),r("close")},S=()=>{u.value&&!i.invalid&&!i.validatorMessage&&(u.value.onSubmitClicked(),u.value.submit())},b=()=>{u.value&&u.value.clearField(),r("clear")},k=async w=>{i.validationFunction&&await i.validationFunction(w.formValues),!i.invalid&&!i.validatorMessage&&(h.value=w,o.confirm?f.value=!0:A())},A=async w=>{const{stayAfterSubmit:y}=h.value;if(!y&&i.closeOnSubmit&&r("update:visible",!1),o.confirm)try{await(w==null?void 0:w(h.value))}catch(C){console.error(C)}else r("submit",h.value);i.resetAfterSubmit&&b()};return e({form:u,clearField:b,setValues:w=>{var y;(y=u.value)==null||y.setValues(w)},setFieldValue:(w,y,C)=>{var I;(I=u.value)==null||I.setFieldValue(w,y,C)},setErrors:w=>{var y;(y=u.value)==null||y.setErrors(w)}}),(w,y)=>{var C,I,R,M;return g(),P(x(Ya),T({ref_key:"dialogForm",ref:c},(C=x(l))==null?void 0:C.root,{class:i.class,closable:w.closable,draggable:!1,header:w.header,pt:{root:{class:[...(I=x(a))==null?void 0:I.root({state:{}}).class,...(R=x(l))==null?void 0:R.root.class],style:(M=x(l))==null?void 0:M.root.style(m.value)}},visible:w.visible,onHide:y[3]||(y[3]=D=>r("hide")),onShow:y[4]||(y[4]=D=>r("show")),"onUpdate:visible":y[5]||(y[5]=D=>r("update:visible",!!D)),modal:""}),{container:H(()=>{var D,$,W,ie,ve,ae,me,se,Pe,Be;return[E("div",it(kt((D=x(l))==null?void 0:D.container(p.value))),[E("section",T(($=x(l))==null?void 0:$.mainsection,{id:"main"}),[E("div",it(kt((W=x(l))==null?void 0:W.header)),[Q(w.$slots,"header",{},()=>{var xe,de,ge,Ie;return[w.headerIcon?(g(),P(Ee,T({key:0},(xe=x(l))==null?void 0:xe.headericon,{icon:w.headerIcon,severity:w.severity,"aria-label":"Header Icon"}),null,16,["icon","severity"])):B("",!0),E("h3",it(kt((de=x(l))==null?void 0:de.headertitle)),_(w.header),17),w.$slots["aside-right"]?(g(),P(We,T({key:1},(ge=x(l))==null?void 0:ge.expandasidebutton,{label:p.value?x(s).asideRightExpandedButtonLabel:x(s).asideRightCollapsedButtonLabel,onClick:y[0]||(y[0]=Oe=>p.value=!p.value),text:""}),null,16,["label"])):B("",!0),w.closable?(g(),P(We,T({key:2,onClick:v},(Ie=x(l))==null?void 0:Ie.closedialog,{icon:"close","icon-class":"w-[22px] h-[22px]",rounded:"",severity:"secondary",text:""}),null,16)):B("",!0)]})],16),L(T0,T((ie=x(l))==null?void 0:ie.form,{ref_key:"form",ref:u,"buttons-template":w.buttonsTemplate,"column-per-row":w.columnPerRow,"reset-after-submit":w.resetAfterSubmit,onSubmit:k,"hide-footer":""}),{fields:H(({formValues:xe})=>[Q(w.$slots,"fields",{key:d.value,formValues:xe})]),_:3},16,["buttons-template","column-per-row","reset-after-submit"]),Q(w.$slots,"confirm",{hide:()=>f.value=!1,submit:A,visible:f.value}),E("div",it(kt((ve=x(l))==null?void 0:ve.footer)),[w.showStayCheckbox?(g(),P(Jo,T({key:0},(ae=x(l))==null?void 0:ae.staycheckbox,{label:w.stayCheckboxLabel??x(s).stayCheckboxLabel,"model-value":(me=u.value)==null?void 0:me.stayAfterSubmit,"onUpdate:modelValue":y[1]||(y[1]=xe=>u.value&&(u.value.stayAfterSubmit=xe))}),null,16,["label","model-value"])):B("",!0),ft(L(Fn,T((se=x(l))==null?void 0:se.validatormessage,{format:!1,message:w.validatorMessage}),null,16,["message"]),[[Xn,w.invalid&&w.validatorMessage]]),i.buttonsTemplate.length?(g(),O("div",it(T({key:1},(Pe=x(l))==null?void 0:Pe.footerbutton)),[Q(w.$slots,"actionButtons",{submit:S},()=>{var xe,de,ge,Ie,Oe,le;return[(xe=i.buttonsTemplate)!=null&&xe.includes("cancel")?(g(),P(We,T({key:0},(de=x(l))==null?void 0:de.cancelbtn,{label:w.cancelBtnLabel??x(s).cancelBtnLabel,onClick:y[2]||(y[2]=Se=>(r("close"),r("update:visible",!1))),severity:"dark",text:""}),null,16,["label"])):B("",!0),(ge=i.buttonsTemplate)!=null&&ge.includes("clear")?(g(),P(We,T({key:1},(Ie=x(l))==null?void 0:Ie.clearfield,{label:w.clearBtnLabel??x(s).clearBtnLabel,onClick:b,class:"whitespace-nowrap",text:""}),null,16,["label"])):B("",!0),(Oe=i.buttonsTemplate)!=null&&Oe.includes("submit")?(g(),P(We,T({key:2},(le=x(l))==null?void 0:le.savesubmitbutton,{label:w.submitBtnLabel??x(s).submitBtnLabel,severity:i.severity==="primary"?void 0:i.severity??"success",onClick:S}),null,16,["label","severity"])):B("",!0)]})],16)):B("",!0)],16)],16),w.$slots["aside-right"]?(g(),O("aside",it(T({key:0},(Be=x(l))==null?void 0:Be.asidesection(p.value,w.asideRightWidth))),[Q(w.$slots,"aside-right")],16)):B("",!0)],16)]}),_:3},16,["class","closable","header","pt","visible"])}}}));var O0={name:"PlusIcon",extends:vn},LL=E("path",{d:"M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z",fill:"currentColor"},null,-1),DL=[LL];function RL(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),DL,16)}O0.render=RL;var x0={name:"UploadIcon",extends:vn},BL=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.58942 9.82197C6.70165 9.93405 6.85328 9.99793 7.012 10C7.17071 9.99793 7.32234 9.93405 7.43458 9.82197C7.54681 9.7099 7.61079 9.55849 7.61286 9.4V2.04798L9.79204 4.22402C9.84752 4.28011 9.91365 4.32457 9.98657 4.35479C10.0595 4.38502 10.1377 4.40039 10.2167 4.40002C10.2956 4.40039 10.3738 4.38502 10.4467 4.35479C10.5197 4.32457 10.5858 4.28011 10.6413 4.22402C10.7538 4.11152 10.817 3.95902 10.817 3.80002C10.817 3.64102 10.7538 3.48852 10.6413 3.37602L7.45127 0.190618C7.44656 0.185584 7.44176 0.180622 7.43687 0.175736C7.32419 0.063214 7.17136 0 7.012 0C6.85264 0 6.69981 0.063214 6.58712 0.175736C6.58181 0.181045 6.5766 0.186443 6.5715 0.191927L3.38282 3.37602C3.27669 3.48976 3.2189 3.6402 3.22165 3.79564C3.2244 3.95108 3.28746 4.09939 3.39755 4.20932C3.50764 4.31925 3.65616 4.38222 3.81182 4.38496C3.96749 4.3877 4.11814 4.33001 4.23204 4.22402L6.41113 2.04807V9.4C6.41321 9.55849 6.47718 9.7099 6.58942 9.82197ZM11.9952 14H2.02883C1.751 13.9887 1.47813 13.9228 1.22584 13.8061C0.973545 13.6894 0.746779 13.5241 0.558517 13.3197C0.370254 13.1154 0.22419 12.876 0.128681 12.6152C0.0331723 12.3545 -0.00990605 12.0775 0.0019109 11.8V9.40005C0.0019109 9.24092 0.065216 9.08831 0.1779 8.97579C0.290584 8.86326 0.443416 8.80005 0.602775 8.80005C0.762134 8.80005 0.914966 8.86326 1.02765 8.97579C1.14033 9.08831 1.20364 9.24092 1.20364 9.40005V11.8C1.18295 12.0376 1.25463 12.274 1.40379 12.4602C1.55296 12.6463 1.76817 12.7681 2.00479 12.8H11.9952C12.2318 12.7681 12.447 12.6463 12.5962 12.4602C12.7453 12.274 12.817 12.0376 12.7963 11.8V9.40005C12.7963 9.24092 12.8596 9.08831 12.9723 8.97579C13.085 8.86326 13.2378 8.80005 13.3972 8.80005C13.5565 8.80005 13.7094 8.86326 13.8221 8.97579C13.9347 9.08831 13.998 9.24092 13.998 9.40005V11.8C14.022 12.3563 13.8251 12.8996 13.45 13.3116C13.0749 13.7236 12.552 13.971 11.9952 14Z",fill:"currentColor"},null,-1),NL=[BL];function $L(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),NL,16)}x0.render=$L;var VL={root:function(e){var n=e.props;return"p-message p-component p-message-"+n.severity},wrapper:"p-message-wrapper",icon:"p-message-icon",text:"p-message-text",closeButton:"p-message-close p-link",closeIcon:"p-message-close-icon"},zL=Wt.extend({name:"message",classes:VL}),FL={name:"BaseMessage",extends:It,props:{severity:{type:String,default:"info"},closable:{type:Boolean,default:!0},sticky:{type:Boolean,default:!0},life:{type:Number,default:3e3},icon:{type:String,default:void 0},closeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null}},style:zL,provide:function(){return{$parentInstance:this}}},M0={name:"Message",extends:FL,inheritAttrs:!1,emits:["close","life-end"],timeout:null,data:function(){return{visible:!0}},watch:{sticky:function(e){e||this.closeAfterDelay()}},mounted:function(){this.sticky||this.closeAfterDelay()},methods:{close:function(e){this.visible=!1,this.$emit("close",e)},closeAfterDelay:function(){var e=this;setTimeout(function(){e.visible=!1,e.$emit("life-end")},this.life)}},computed:{iconComponent:function(){return{info:al,success:co,warn:sl,error:Fs}[this.severity]},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{ripple:fi},components:{TimesIcon:fr,InfoCircleIcon:al,CheckIcon:co,ExclamationTriangleIcon:sl,TimesCircleIcon:Fs}};function wl(t){"@babel/helpers - typeof";return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wl(t)}function E0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function ts(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?E0(Object(n),!0).forEach(function(i){HL(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E0(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function HL(t,e,n){return e=jL(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jL(t){var e=UL(t,"string");return wl(e)=="symbol"?e:String(e)}function UL(t,e){if(wl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(wl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var KL=["aria-label"];function WL(t,e,n,i,r,o){var s=et("TimesIcon"),a=on("ripple");return g(),P(Lr,T({name:"p-message",appear:""},t.ptmi("transition")),{default:H(function(){return[ft(E("div",T({class:t.cx("root"),role:"alert","aria-live":"assertive","aria-atomic":"true"},t.ptm("root")),[t.$slots.container?Q(t.$slots,"container",{key:0,onClose:o.close,closeCallback:o.close}):(g(),O("div",T({key:1,class:t.cx("wrapper")},t.ptm("wrapper")),[Q(t.$slots,"messageicon",{class:"p-message-icon"},function(){return[(g(),P(yt(t.icon?"span":o.iconComponent),T({class:[t.cx("icon"),t.icon]},t.ptm("icon")),null,16,["class"]))]}),E("div",T({class:["p-message-text",t.cx("text")]},t.ptm("text")),[Q(t.$slots,"default")],16),t.closable?ft((g(),O("button",T({key:0,class:t.cx("closeButton"),"aria-label":o.closeAriaLabel,type:"button",onClick:e[0]||(e[0]=function(l){return o.close(l)})},ts(ts(ts({},t.closeButtonProps),t.ptm("button")),t.ptm("closeButton"))),[Q(t.$slots,"closeicon",{},function(){return[t.closeIcon?(g(),O("i",T({key:0,class:[t.cx("closeIcon"),t.closeIcon]},ts(ts({},t.ptm("buttonIcon")),t.ptm("closeIcon"))),null,16)):(g(),P(s,T({key:1,class:[t.cx("closeIcon"),t.closeIcon]},ts(ts({},t.ptm("buttonIcon")),t.ptm("closeIcon"))),null,16,["class"]))]})],16,KL)),[[a]]):B("",!0)],16))],16),[[Xn,r.visible]])]}),_:3},16)}M0.render=WL;var qL={root:function(e){var n=e.instance;return["p-progressbar p-component",{"p-progressbar-determinate":n.determinate,"p-progressbar-indeterminate":n.indeterminate}]},container:"p-progressbar-indeterminate-container",value:"p-progressbar-value p-progressbar-value-animate",label:"p-progressbar-label"},XL=Wt.extend({name:"progressbar",classes:qL}),GL={name:"BaseProgressBar",extends:It,props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},style:XL,provide:function(){return{$parentInstance:this}}},I0={name:"ProgressBar",extends:GL,inheritAttrs:!1,computed:{progressStyle:function(){return{width:this.value+"%",display:"flex"}},indeterminate:function(){return this.mode==="indeterminate"},determinate:function(){return this.mode==="determinate"}}},ZL=["aria-valuenow"];function _L(t,e,n,i,r,o){return g(),O("div",T({role:"progressbar",class:t.cx("root"),"aria-valuemin":"0","aria-valuenow":t.value,"aria-valuemax":"100"},t.ptmi("root")),[o.determinate?(g(),O("div",T({key:0,class:t.cx("value"),style:o.progressStyle},t.ptm("value")),[t.value!=null&&t.value!==0&&t.showValue?(g(),O("div",T({key:0,class:t.cx("label")},t.ptm("label")),[Q(t.$slots,"default",{},function(){return[ht(_(t.value+"%"),1)]})],16)):B("",!0)],16)):B("",!0),o.indeterminate?(g(),O("div",T({key:1,class:t.cx("container")},t.ptm("container")),[E("div",T({class:t.cx("value")},t.ptm("value")),null,16)],16)):B("",!0)],16,ZL)}I0.render=_L;var JL={root:function(e){var n=e.props;return["p-fileupload p-fileupload-".concat(n.mode," p-component")]},buttonbar:"p-fileupload-buttonbar",chooseButton:function(e){var n=e.instance,i=e.props;return["p-button p-component p-fileupload-choose",{"p-fileupload-choose-selected":i.mode==="basic"&&n.hasFiles,"p-disabled":i.disabled,"p-focus":n.focused}]},chooseIcon:"p-button-icon p-button-icon-left",chooseButtonLabel:"p-button-label",content:"p-fileupload-content",empty:"p-fileupload-empty",uploadIcon:"p-button-icon p-button-icon-left",label:"p-button-label",file:"p-fileupload-file",thumbnail:"p-fileupload-file-thumbnail",details:"p-fileupload-file-details",fileName:"p-fileupload-file-name",fileSize:"p-fileupload-file-size",badge:"p-fileupload-file-badge",actions:"p-fileupload-file-actions",removeButton:"p-fileupload-file-remove"},YL=Wt.extend({name:"fileupload",classes:JL}),QL={name:"BaseFileUpload",extends:It,props:{name:{type:String,default:null},url:{type:String,default:null},mode:{type:String,default:"advanced"},multiple:{type:Boolean,default:!1},accept:{type:String,default:null},disabled:{type:Boolean,default:!1},auto:{type:Boolean,default:!1},maxFileSize:{type:Number,default:null},invalidFileSizeMessage:{type:String,default:"{0}: Invalid file size, file size should be smaller than {1}."},invalidFileTypeMessage:{type:String,default:"{0}: Invalid file type, allowed file types: {1}."},fileLimit:{type:Number,default:null},invalidFileLimitMessage:{type:String,default:"Maximum number of files exceeded, limit is {0} at most."},withCredentials:{type:Boolean,default:!1},previewWidth:{type:Number,default:50},chooseLabel:{type:String,default:null},uploadLabel:{type:String,default:null},cancelLabel:{type:String,default:null},customUpload:{type:Boolean,default:!1},showUploadButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},chooseIcon:{type:String,default:void 0},uploadIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0},style:null,class:null},style:YL,provide:function(){return{$parentInstance:this}}},P0={name:"FileContent",hostName:"FileUpload",extends:It,emits:["remove"],props:{files:{type:Array,default:function(){return[]}},badgeSeverity:{type:String,default:"warning"},badgeValue:{type:String,default:null},previewWidth:{type:Number,default:50},templates:{type:null,default:null}},methods:{formatSize:function(e){var n,i=1024,r=3,o=((n=this.$primevue.config.locale)===null||n===void 0?void 0:n.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(i)),a=parseFloat((e/Math.pow(i,s)).toFixed(r));return"".concat(a," ").concat(o[s])}},components:{FileUploadButton:lo,FileUploadBadge:np,TimesIcon:fr}},eD=["alt","src","width"];function tD(t,e,n,i,r,o){var s=et("FileUploadBadge"),a=et("TimesIcon"),l=et("FileUploadButton");return g(!0),O(ue,null,Je(n.files,function(u,c){return g(),O("div",T({key:u.name+u.type+u.size,class:t.cx("file")},t.ptm("file")),[E("img",T({role:"presentation",class:t.cx("thumbnail"),alt:u.name,src:u.objectURL,width:n.previewWidth},t.ptm("thumbnail")),null,16,eD),E("div",T({class:t.cx("details")},t.ptm("details")),[E("div",T({class:t.cx("fileName")},t.ptm("fileName")),_(u.name),17),E("span",T({class:t.cx("fileSize")},t.ptm("fileSize")),_(o.formatSize(u.size)),17),L(s,{value:n.badgeValue,class:pe(t.cx("badge")),severity:n.badgeSeverity,unstyled:t.unstyled,pt:t.ptm("badge")},null,8,["value","class","severity","unstyled","pt"])],16),E("div",T({class:t.cx("actions")},t.ptm("actions")),[L(l,{onClick:function(f){return t.$emit("remove",c)},text:"",rounded:"",severity:"danger",class:pe(t.cx("removeButton")),unstyled:t.unstyled,pt:t.ptm("removeButton")},{icon:H(function(d){return[n.templates.fileremoveicon?(g(),P(yt(n.templates.fileremoveicon),{key:0,class:pe(d.class),file:u,index:c},null,8,["class","file","index"])):(g(),P(a,T({key:1,class:d.class,"aria-hidden":"true"},t.ptm("removeButton").icon),null,16,["class"]))]}),_:2},1032,["onClick","class","unstyled","pt"])],16)],16)}),128)}P0.render=tD;function Kp(t){return rD(t)||iD(t)||L0(t)||nD()}function nD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
208
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iD(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function rD(t){if(Array.isArray(t))return Wp(t)}function Yu(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=L0(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(u){throw u},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
209
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function L0(t,e){if(t){if(typeof t=="string")return Wp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wp(t,e)}}function Wp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var D0={name:"FileUpload",extends:QL,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 n=e.dataTransfer?e.dataTransfer.files:e.target.files,i=Yu(n),r;try{for(i.s();!(r=i.n()).done;){var o=r.value;this.isFileSelected(o)||this.validate(o)&&(this.isImage(o)&&(o.objectURL=window.URL.createObjectURL(o)),this.files.push(o))}}catch(s){i.e(s)}finally{i.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 n=new XMLHttpRequest,i=new FormData;this.$emit("before-upload",{xhr:n,formData:i});var r=Yu(this.files),o;try{for(r.s();!(o=r.n()).done;){var s=o.value;i.append(this.name,s,s.name)}}catch(a){r.e(a)}finally{r.f()}n.upload.addEventListener("progress",function(a){a.lengthComputable&&(e.progress=Math.round(a.loaded*100/a.total)),e.$emit("progress",{originalEvent:a,progress:e.progress})}),n.onreadystatechange=function(){if(n.readyState===4){var a;e.progress=0,n.status>=200&&n.status<300?(e.fileLimit&&(e.uploadedFileCount+=e.files.length),e.$emit("upload",{xhr:n,files:e.files})):e.$emit("error",{xhr:n,files:e.files}),(a=e.uploadedFiles).push.apply(a,Kp(e.files)),e.clear()}},n.open("POST",this.url,!0),this.$emit("before-send",{xhr:n,formData:i}),n.withCredentials=this.withCredentials,n.send(i)}},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 n=Yu(this.files),i;try{for(n.s();!(i=n.n()).done;){var r=i.value;if(r.name+r.type+r.size===e.name+e.type+e.size)return!0}}catch(o){n.e(o)}finally{n.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 n=this.accept.split(",").map(function(a){return a.trim()}),i=Yu(n),r;try{for(i.s();!(r=i.n()).done;){var o=r.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(a){i.e(a)}finally{i.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&&G.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&&G.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1))},onDrop:function(e){if(!this.disabled){!this.isUnstyled&&G.removeClass(this.$refs.content,"p-fileupload-highlight"),this.$refs.content.setAttribute("data-p-highlight",!1),e.stopPropagation(),e.preventDefault();var n=e.dataTransfer?e.dataTransfer.files:e.target.files,i=this.multiple||n&&n.length===1;i&&this.onFileSelect(e)}},onBasicUploaderClick:function(e){this.hasFiles?this.upload():e.button===0&&this.$refs.fileInput.click()},remove:function(e){this.clearInputElement();var n=this.files.splice(e,1)[0];this.files=Kp(this.files),this.$emit("remove",{file:n,files:this.files})},removeUploadedFile:function(e){var n=this.uploadedFiles.splice(e,1)[0];this.uploadedFiles=Kp(this.uploadedFiles),this.$emit("remove-uploaded-file",{file:n,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 n,i=1024,r=3,o=((n=this.$primevue.config.locale)===null||n===void 0?void 0:n.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(i)),a=parseFloat((e/Math.pow(i,s)).toFixed(r));return"".concat(a," ").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:lo,FileUploadProgressBar:I0,FileUploadMessage:M0,FileContent:P0,PlusIcon:O0,UploadIcon:x0,TimesIcon:fr},directives:{ripple:fi}},oD=["multiple","accept","disabled"],sD=["accept","disabled","multiple"];function aD(t,e,n,i,r,o){var s=et("FileUploadButton"),a=et("FileUploadProgressBar"),l=et("FileContent"),u=et("FileUploadMessage"),c=on("ripple");return o.isAdvanced?(g(),O("div",T({key:0,class:t.cx("root")},t.ptmi("root")),[E("input",T({ref:"fileInput",type:"file",onChange:e[0]||(e[0]=function(){return o.onFileSelect&&o.onFileSelect.apply(o,arguments)}),multiple:t.multiple,accept:t.accept,disabled:o.chooseDisabled},t.ptm("input")),null,16,oD),E("div",T({class:t.cx("buttonbar")},t.ptm("buttonbar")),[Q(t.$slots,"header",{files:r.files,uploadedFiles:r.uploadedFiles,chooseCallback:o.choose,uploadCallback:o.upload,clearCallback:o.clear},function(){return[ft((g(),O("span",T({class:o.chooseButtonClass,style:t.style,onClick:e[1]||(e[1]=function(){return o.choose&&o.choose.apply(o,arguments)}),onKeydown:e[2]||(e[2]=Bn(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"},t.ptm("chooseButton")),[Q(t.$slots,"chooseicon",{class:pe(t.cx("chooseIcon"))},function(){return[(g(),P(yt(t.chooseIcon?"span":"PlusIcon"),T({class:[t.cx("chooseIcon"),t.chooseIcon],"aria-hidden":"true"},t.ptm("chooseIcon")),null,16,["class"]))]}),E("span",T({class:t.cx("chooseButtonLabel")},t.ptm("chooseButtonLabel")),_(o.chooseButtonLabel),17)],16)),[[c]]),t.showUploadButton?(g(),P(s,{key:0,label:o.uploadButtonLabel,onClick:o.upload,disabled:o.uploadDisabled,unstyled:t.unstyled,pt:t.ptm("uploadButton")},{icon:H(function(d){return[Q(t.$slots,"uploadicon",{},function(){return[(g(),P(yt(t.uploadIcon?"span":"UploadIcon"),T({class:[d.class,t.uploadIcon],"aria-hidden":"true"},t.ptm("uploadButton").icon,{"data-pc-section":"uploadbuttonicon"}),null,16,["class"]))]})]}),_:3},8,["label","onClick","disabled","unstyled","pt"])):B("",!0),t.showCancelButton?(g(),P(s,{key:1,label:o.cancelButtonLabel,onClick:o.clear,disabled:o.cancelDisabled,unstyled:t.unstyled,pt:t.ptm("cancelButton")},{icon:H(function(d){return[Q(t.$slots,"cancelicon",{},function(){return[(g(),P(yt(t.cancelIcon?"span":"TimesIcon"),T({class:[d.class,t.cancelIcon],"aria-hidden":"true"},t.ptm("cancelButton").icon,{"data-pc-section":"cancelbuttonicon"}),null,16,["class"]))]})]}),_:3},8,["label","onClick","disabled","unstyled","pt"])):B("",!0)]})],16),E("div",T({ref:"content",class:t.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)})},t.ptm("content"),{"data-p-highlight":!1}),[Q(t.$slots,"content",{files:r.files,uploadedFiles:r.uploadedFiles,removeUploadedFileCallback:o.removeUploadedFile,removeFileCallback:o.remove,progress:r.progress,messages:r.messages},function(){return[o.hasFiles?(g(),O(ue,{key:0},[L(a,{value:r.progress,showValue:!1,unstyled:t.unstyled,pt:t.ptm("progressbar")},null,8,["value","unstyled","pt"]),L(l,{files:r.files,onRemove:o.remove,badgeValue:o.pendingLabel,previewWidth:t.previewWidth,templates:t.$slots,unstyled:t.unstyled,pt:t.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])],64)):B("",!0),(g(!0),O(ue,null,Je(r.messages,function(d){return g(),P(u,{key:d,severity:"error",onClose:o.onMessageClose,unstyled:t.unstyled,pt:t.ptm("message")},{default:H(function(){return[ht(_(d),1)]}),_:2},1032,["onClose","unstyled","pt"])}),128)),L(l,{files:r.uploadedFiles,onRemove:o.removeUploadedFile,badgeValue:o.completedLabel,badgeSeverity:"success",previewWidth:t.previewWidth,templates:t.$slots,unstyled:t.unstyled,pt:t.pt},null,8,["files","onRemove","badgeValue","previewWidth","templates","unstyled","pt"])]}),t.$slots.empty&&!o.hasFiles&&!o.hasUploadedFiles?(g(),O("div",T({key:0,class:t.cx("empty")},t.ptm("empty")),[Q(t.$slots,"empty")],16)):B("",!0)],16)],16)):o.isBasic?(g(),O("div",T({key:1,class:t.cx("root")},t.ptmi("root")),[(g(!0),O(ue,null,Je(r.messages,function(d){return g(),P(u,{key:d,severity:"error",onClose:o.onMessageClose,unstyled:t.unstyled,pt:t.ptm("messages")},{default:H(function(){return[ht(_(d),1)]}),_:2},1032,["onClose","unstyled","pt"])}),128)),ft((g(),O("span",T({class:o.chooseButtonClass,style:t.style,onMouseup:e[12]||(e[12]=function(){return o.onBasicUploaderClick&&o.onBasicUploaderClick.apply(o,arguments)}),onKeydown:e[13]||(e[13]=Bn(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"},t.ptm("chooseButton")),[!o.hasFiles||t.auto?Q(t.$slots,"uploadicon",{key:0,class:pe(t.cx("uploadIcon"))},function(){return[(g(),P(yt(t.uploadIcon?"span":"UploadIcon"),T({class:[t.cx("uploadIcon"),t.uploadIcon],"aria-hidden":"true"},t.ptm("uploadIcon")),null,16,["class"]))]}):Q(t.$slots,"chooseicon",{key:1,class:pe(t.cx("chooseIcon"))},function(){return[(g(),P(yt(t.chooseIcon?"span":"PlusIcon"),T({class:[t.cx("chooseIcon"),t.chooseIcon],"aria-hidden":"true"},t.ptm("chooseIcon")),null,16,["class"]))]}),E("span",T({class:t.cx("label")},t.ptm("label")),_(o.basicChooseButtonLabel),17),o.hasFiles?B("",!0):(g(),O("input",T({key:2,ref:"fileInput",type:"file",accept:t.accept,disabled:t.disabled,multiple:t.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)})},t.ptm("input")),null,16,sD))],16)),[[c]])],16)):B("",!0)}D0.render=aD;const Qu="Checking availability...",Ks=ce("InputText",Ae({__name:"InputText",props:{allowedCharacters:{},autoUppercase:{type:Boolean,default:!1},modelValue:{},value:{},existingValues:{},checkAvailability:{},maxLength:{},label:{},useValidator:{type:Boolean},fieldName:{},mandatory:{type:Boolean},invalid:{type:Boolean},manualInvalidContainer:{type:Boolean,default:!1},validatorMessage:{},validatorMessageClass:{},placeholder:{},type:{default:"text"},disabled:{type:Boolean},fieldInfo:{},inputClass:{},inputContainerClass:{},labelClass:{},blurOnReachMaxLength:{type:Boolean},preventInputOnMaxLength:{type:Boolean},validateOnBlur:{type:Boolean,default:!1},useProtocol:{type:Boolean,default:!0},allowSpecialCharacters:{type:Boolean,default:!0},useInputGroup:{type:Boolean,default:!0},inputId:{}},emits:["update:modelValue","blur","input"],setup(t,{emit:e}){const n=t,i=e,{defaultProps:r}=Zt(n.type==="email"?"InputEmail":n.type==="url"?"InputURL":"InputText"),{locale:o}=Zt("InputText"),s=zi(n,r),a=dt("preset",{}).inputgroupaddon,l=hn({value:void 0}),u=dt("isSubmitting"),c=X(()=>n.invalid||!!l.errorMessage),d=oe(0),f=oe(n.value||n.modelValue);wt(()=>{var M;n.useValidator&&(Object.assign(l,Nn(n.fieldName??"textInput",D=>Et(()=>m(D==null?void 0:D.trim())))),n.value!=null&&R(n.value)),n.modelValue!=null&&(l.value=(M=n.modelValue)==null?void 0:M.trim()),n.invalid&&n.useValidator&&l.validate()}),Bi(()=>{n.useValidator&&l.handleReset()});const p=X(()=>{var M,D;return n.placeholder??((D=o.defaultPlaceholder)==null?void 0:D.replace("{label}",n.label?(M=n.label)==null?void 0:M.toLowerCase():""))}),h=X(()=>{var M,D;return typeof n.validatorMessage=="object"&&"exist"in n.validatorMessage?(M=n.validatorMessage)==null?void 0:M.exist:(D=o.alreadyExistInvalidText)==null?void 0:D.replace("{label}",n.label)}),m=M=>{var D,$,W,ie;if(typeof n.validatorMessage=="string"&&n.invalid)return n.validatorMessage;if(typeof n.validatorMessage!="string"){const{invalidFormat:ve,empty:ae,exceed:me}=n.validatorMessage??{};if(!M&&n.mandatory)return ae??o.emptyInvalidText.replace("{label}",n.label);if((M==null?void 0:M.length)>s.maxLength)return me??((D=o.exceedMaxLengthInvalidText)==null?void 0:D.replace("{maxLength}",s.maxLength.toString()));if(($=(n.existingValues??[]).filter(se=>se!=n.value))!=null&&$.includes(M))return((W=n.validatorMessage)==null?void 0:W.exist)??((ie=o.alreadyExistInvalidText)==null?void 0:ie.replace("{label}",n.label));if(M&&n.type==="email")return S(M,ve??o.emailFormatInvalidText);if(M&&n.type==="url")return v(M,ve??o.urlFormatInvalidText)}else if(!n.allowSpecialCharacters)return/[^A-Za-z0-9 ]/.test(M)?o.includeSpecialCharsInvalidText:!0;return n.checkAvailability?C():!0},v=(M,D)=>{const $=new RegExp(`^(https?:\\/\\/)${n.useProtocol?"":"?"}((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+:@!$&'()*+,;=]*)*(\\?[;&a-z\\d%_.~+=:@!$&'()*+,;=-]*)?(\\#[-a-z\\d_:@!$&'()*+,;=]*)?$`,"i");return D==null||$.test(M)?!0:D},S=(M,D)=>{const $=/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;return D==null||$.test(M)?!n.checkAvailability||!!n.checkAvailability&&C():D},b=()=>{n.validateOnBlur&&(l.value=f.value),i("blur",f.value)},k=M=>{var W;const D=s.maxLength&&s.maxLength===((W=f.value)==null?void 0:W.length);(n.allowedCharacters&&!n.allowedCharacters.test(M.key)||D&&(n.preventInputOnMaxLength||n.blurOnReachMaxLength))&&(M.preventDefault(),n.blurOnReachMaxLength&&D&&d.value++)},A=M=>{var W,ie,ve;const D=(W=M.clipboardData)==null?void 0:W.getData("text"),$=s.maxLength&&s.maxLength===((ie=f.value)==null?void 0:ie.length)||((ve=f.value)==null?void 0:ve.length)+(D==null?void 0:D.length)>s.maxLength||(D==null?void 0:D.length)>s.maxLength;(n.allowedCharacters&&!n.allowedCharacters.test(D)||$&&(n.preventInputOnMaxLength||n.blurOnReachMaxLength))&&(M.preventDefault(),n.blurOnReachMaxLength&&$&&d.value++)},w=M=>{M===""&&(M=void 0),n.autoUppercase&&M&&(M=M.replace(/[a-z]/g,D=>D.toUpperCase())),f.value=M,(!n.validateOnBlur&&n.useValidator||!n.useValidator)&&(l.value=f.value),i("update:modelValue",f.value)},y=M=>{i("input",M.target.value||void 0)},C=()=>{if(u!=null&&u.value){if(l.errorMessage===h.value||l.errorMessage===Qu)return l.errorMessage}else return I(),Qu;return!0},I=g5(async()=>{var M;if(l.value!=n.value&&(M=l.value)!=null&&M.length&&!await n.checkAvailability(l.value))return l.setErrors(h.value);l.errorMessage===Qu&&l.setErrors("")},300),R=M=>{n.useValidator?l.setValue(M==null?void 0:M.trim(),!1):l.value=M==null?void 0:M.trim()};return $e(()=>n.value,M=>{R(M),f.value=M==null?void 0:M.trim()},{once:!0}),$e(()=>n.modelValue,M=>{f.value=M==null?void 0:M.trim(),n.validateOnBlur||(l.value=f.value)}),$e(()=>n.invalid,()=>{var M;(M=l.validate)==null||M.call(l)}),(M,D)=>(g(),P(pi,{info:M.fieldInfo,label:n.label,"label-class":n.labelClass,mandatory:n.mandatory},{default:H(()=>[L(fo,{class:pe(n.inputContainerClass??["grid ",{"grid-cols-[max-content,1fr,max-content]":M.$slots["addon-left"]&&M.$slots["addon-right"],"grid-cols-[1fr,max-content]":!M.$slots["addon-left"]&&M.$slots["addon-right"],"grid-cols-[max-content,1fr]":M.$slots["addon-left"]&&!M.$slots["addon-right"]}]),disabled:n.disabled,invalid:c.value&&!n.manualInvalidContainer,"use-input-group":M.useInputGroup},{default:H(()=>[M.$slots["addon-left"]?(g(),P(x(Yo),{key:0,disabled:n.disabled},{default:H(()=>[Q(M.$slots,"addon-left")]),_:3},8,["disabled"])):B("",!0),(g(),P(x(Qo),{id:M.inputId,key:d.value,class:pe(M.inputClass),disabled:M.disabled,invalid:c.value,"model-value":l.value,placeholder:p.value,onBlur:b,onInput:y,onKeypress:k,onPaste:A,"onUpdate:modelValue":w},null,8,["id","class","disabled","invalid","model-value","placeholder"])),M.$slots["addon-right"]?(g(),P(x(Yo),{key:1,pt:{root:x(a).root({props:{class:[{"!text-general-200":n.disabled}]}})}},{default:H(()=>[Q(M.$slots,"addon-right")]),_:3},8,["pt"])):B("",!0)]),_:3},8,["class","disabled","invalid","use-input-group"]),l.errorMessage==Qu?(g(),O("span",T({key:0},M.$preset.validatormessage.root,{class:"text-general-800","data-wv-section":"checking-availability"})," Checking availability... ",16)):(g(),P(Fn,{key:1,class:pe(M.validatorMessageClass),message:l.errorMessage},null,8,["class","message"]))]),_:3},8,["info","label","label-class","mandatory"]))}})),lD={class:"'!mt-0 font-light text-xs text-general-500'"},uD=1048576,YX=ce("FileUpload",Ae({__name:"FileUpload",props:wn({accept:{},disabled:{type:Boolean},maxFileSize:{},modelValue:{},multiple:{type:Boolean,default:!1},invalidFileSizeMessage:{},invalidFileTypeMessage:{},label:{default:"Upload File"},withUpload:{type:Boolean,default:!0},uploadLabel:{default:"Upload"},placeholder:{default:"Select File"},fileExtensions:{},fileRequirements:{},uploadFunction:{},useValidator:{type:Boolean},fieldName:{default:"fileUpload"},mandatory:{type:Boolean},useErrorToast:{type:Boolean,default:!0},validatorMessage:{},validatorMessageClass:{}},{modelValue:{},modelModifiers:{}}),emits:wn(["select","update:modelValue","upload","error"],["update:modelValue"]),setup(t,{emit:e}){const n=ro(),i=ni(t,"modelValue"),r=t,o=e,{fileupload:s={}}=dt("preset",{}),a=oe(),l=oe(),u=oe(),c=re(),d=hn({value:void 0}),f=X(()=>!!d.errorMessage||(k.value?k.value.length>0:!1)),p=oe(!1);wt(()=>{r.useValidator&&Object.assign(d,Nn(r.fieldName,y=>h(y))),i.value&&(Array.isArray(i.value)&&r.multiple?(u.value=i.value,a.value=i.value.map(y=>y.name)):i.value instanceof File&&(u.value=i.value,a.value=i.value.name))});const h=y=>{if(typeof r.validatorMessage=="string")return r.validatorMessage;if(typeof r.validatorMessage!="string"){const{empty:C}=r.validatorMessage??{};if(!y&&r.mandatory&&!u.value)return C??!0}return!0},m=y=>{if(!r.useErrorToast&&typeof r.validatorMessage!="string"){const{exceed:C,invalidFormat:I}=r.validatorMessage;y.includes("Invalid file size")&&C?l.value=C:y.includes("Invalid file type")?l.value=I:l.value=void 0}},v=y=>{var C;try{if(!y.files||y.files.length===0)return;r.multiple?(u.value=y.files,a.value=y.files.map(I=>I.name),o("select",y.files)):(u.value=y.files[0],a.value=(C=y.files[0])==null?void 0:C.name,o("select",y.files[0]))}catch(I){console.error(I)}},S=(y,C)=>{r.disabled||p.value||(k.value=void 0,new Promise((I,R)=>{try{C(),I()}catch(M){R(M)}}).then(()=>{y()}))},b=async(y,C)=>{try{p.value=!0,r.uploadFunction&&await r.uploadFunction(y),u.value=void 0,a.value=void 0,C(),p.value=!1}catch(I){throw p.value=!1,I}},k=re(),A=y=>{k.value=y},w=(y,C,I)=>{(y.key==="Enter"||y.key===" ")&&S(C,I)};return $e(u,y=>{d.value=y,i.value=y,k.value=void 0,l.value=void 0}),$e(i,y=>{Array.isArray(y)&&r.multiple?(u.value=y,a.value=y.map(C=>C.name)):y instanceof File?(u.value=y,a.value=y.name):(u.value=void 0,a.value=void 0),d.value=y,"messages"in c.value&&(c.value.messages=[]),k.value=void 0,l.value=void 0}),$e(k,y=>{if(y&&y.length>0){const C=y[0].replace("{2}",r.accept||"").replace("{2.1}",r.fileExtensions||"");C.includes("Invalid file size")&&o("error","FILE_SIZE_TOO_LARGE"),m(C),r.useErrorToast&&n.add({message:C,severity:"error"}),u.value=void 0,a.value=void 0}else l.value=void 0}),(y,C)=>(g(),P(x(D0),T(r,{ref_key:"fileUpload",ref:c,"file-limit":y.multiple?void 0:1,pt:{input:{style:"display: none"}},onSelect:v,onUpload:C[0]||(C[0]=I=>y.$emit("upload",I))}),{header:H(({files:I,chooseCallback:R,clearCallback:M})=>[E("div",{class:pe([{"grid-cols-[auto,max-content]":r.withUpload},"grid gap-3 items-end"])},[L(pi,T(x(s).wrapper,{"error-messages":k.value,label:r.label,mandatory:r.mandatory}),{default:H(()=>[L(Ks,{disabled:r.disabled||p.value,"input-class":x(s).input({state:{fileName:a.value}}).class,invalid:f.value,"model-value":Array.isArray(a.value)?a.value.join(", "):a.value,placeholder:r.placeholder,onClick:D=>S(R,M),onKeydown:Ot(D=>w(D,R,M),["prevent"])},{"addon-left":H(()=>C[1]||(C[1]=[ht(" Browse")])),_:2},1032,["disabled","input-class","invalid","model-value","placeholder","onClick","onKeydown"]),r.fileExtensions||r.fileRequirements||d.errorMessage||l.value||r.validatorMessage?(g(),O("div",{key:0,class:pe([{"justify-between":d.errorMessage||l.value,"justify-end":(!d.errorMessage||!l.value)&&r.validatorMessage},"flex w-full"])},[L(Fn,{class:pe(r.validatorMessageClass),message:d.errorMessage??l.value},null,8,["class","message"]),r.fileExtensions||r.fileRequirements?(g(),O("div",it(T({key:0},x(s).requirements)),[E("small",lD,[y.fileRequirements?(g(),O(ue,{key:0},[ht(_(y.fileRequirements),1)],64)):(g(),O(ue,{key:1},[ht(_(r.maxFileSize?`${r.fileExtensions}. max file ${Math.round(r.maxFileSize/uD)} MB`:`${r.fileExtensions} file`),1)],64))])],16)):B("",!0)],2)):B("",!0)]),_:2},1040,["error-messages","label","mandatory"]),r.withUpload?(g(),P(We,T({key:0},x(s).buttonupload({props:r}),{disabled:r.disabled||p.value||!u.value,label:r.uploadLabel,onClick:D=>b(I,M),severity:"success",type:"button"}),null,16,["disabled","label","onClick"])):B("",!0)],2)]),content:H(({messages:I})=>[ht(_(A(I)),1)]),_:1},16,["file-limit"]))}}));var Sl={exports:{}},cD=Sl.exports,R0;function dD(){return R0||(R0=1,function(t,e){(function(){function n(i,r){r=r||"";for(var o=1024,s=window.atob(i),a=[],l=0,u=s.length;l<u;l+=o){for(var c=s.slice(l,l+o),d=new Array(c.length),f=0;f<c.length;f++)d[f]=c.charCodeAt(f);var p=new Uint8Array(d);a.push(p)}return new Blob(a,{type:r})}t.exports&&(e=t.exports=n),e.base64ToBlob=n}).call(cD)}(Sl,Sl.exports)),Sl.exports}var fD=dD();const pD=pl(fD);function B0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function qt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?B0(Object(n),!0).forEach(function(i){Fi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B0(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Fi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hD(t,e){if(t==null)return{};var n,i,r=function(s,a){if(s==null)return{};var l,u,c={},d=Object.keys(s);for(u=0;u<d.length;u++)l=d[u],a.indexOf(l)>=0||(c[l]=s[l]);return c}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ns(t){return function(e){if(Array.isArray(e))return qp(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,n){if(e){if(typeof e=="string")return qp(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return qp(e,n)}}(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
210
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function qp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var N0,mD,ec,$n=(N0=function(t){/*!
|
|
211
|
+
Copyright (c) 2018 Jed Watson.
|
|
212
|
+
Licensed under the MIT License (MIT), see
|
|
213
|
+
http://jedwatson.github.io/classnames
|
|
214
|
+
*/(function(){var e={}.hasOwnProperty;function n(){for(var i=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var s=typeof o;if(s==="string"||s==="number")i.push(o);else if(Array.isArray(o)){if(o.length){var a=n.apply(null,o);a&&i.push(a)}}else if(s==="object")if(o.toString===Object.prototype.toString)for(var l in o)e.call(o,l)&&o[l]&&i.push(l);else i.push(o.toString())}}return i.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()},N0(ec={path:mD,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(e==null&&ec.path)}},ec.exports),ec.exports),sr=function(t){return function(e,n){if(!e)return t;var i;typeof e=="string"?i=e:n=e;var r=t;return i&&(r+="__"+i),r+(n?Object.keys(n).reduce(function(o,s){var a=n[s];return a&&(o+=" "+(typeof a=="boolean"?r+"--"+s:r+"--"+s+"_"+a)),o},""):"")}};function Xp(t,e,n){var i,r,o,s,a;function l(){var c=Date.now()-s;c<e&&c>=0?i=setTimeout(l,e-c):(i=null,n||(a=t.apply(o,r),o=r=null))}e==null&&(e=100);var u=function(){o=this,r=arguments,s=Date.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a};return u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(a=t.apply(o,r),o=r=null,clearTimeout(i),i=null)},u}Xp.debounce=Xp;var Gp=Xp,pt=function(){return pt=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},pt.apply(this,arguments)};/*! *****************************************************************************
|
|
215
|
+
Copyright (c) Microsoft Corporation.
|
|
216
|
+
|
|
217
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
218
|
+
purpose with or without fee is hereby granted.
|
|
219
|
+
|
|
220
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
221
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
222
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
223
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
224
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
225
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
226
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
227
|
+
***************************************************************************** */function $0(t,e){var n,i;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),i=t+"-"+e):(n=t||e,i=t||e),{name:n,classname:i}}function V0(t){return/^blob:/.test(t)}function z0(t){return V0(t)||function(e){return/^data:/.test(e)}(t)}function Ws(t){return!!(t&&t.constructor&&t.call&&t.apply)}function Hn(t){return t===void 0}function tc(t){return typeof t=="object"&&t!==null}function Zp(t,e,n){var i={};return tc(t)?(Object.keys(e).forEach(function(r){Hn(t[r])?i[r]=e[r]:tc(e[r])?tc(t[r])?i[r]=Zp(t[r],e[r],n[r]):i[r]=t[r]?e[r]:n[r]:e[r]===!0||e[r]===!1?i[r]=!!t[r]:i[r]=t[r]}),i):t?e:n}function nc(t){var e=Number(t);return Number.isNaN(e)?t:e}function F0(t){return typeof(t=="number"||function(e){return typeof e=="object"&&e!==null}(t)&&toString.call(t)=="[object Number]")&&!H0(t)}function H0(t){return t!=t}function j0(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var Cl=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},gD=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},_p=function(t){this.type="move",this.directions=t},vD=function(){function t(e,n,i,r,o){this.type="drag",this.nativeEvent=e,this.position=i,this.previousPosition=r,this.element=n,this.anchor=o}return t.prototype.shift=function(){var e=this,n=e.element,i=e.anchor,r=e.position;if(n){var o=n.getBoundingClientRect(),s=o.left,a=o.top;return{left:r.left-s-i.left,top:r.top-a-i.top}}return{left:0,top:0}},t}(),Jp={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=ns(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce(function(e,n){return{clientX:e.clientX+n.clientX/t.touches.length,clientY:e.clientY+n.clientY/t.touches.length}},{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),n=e.left,i=e.right,r=e.bottom,o=e.top;this.anchor={left:t.clientX-n,top:t.clientY-o,bottom:r-t.clientY,right:i-t.clientX}},processMove:function(t,e){var n=ns(e);if(this.touches.length){if(this.touches.length===1&&n.length===1){var i=this.$refs.draggable;this.$emit("drag",new vD(t,i,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};Jp.render=function(t,e,n,i,r,o){return g(),P("div",{ref:"draggable",class:n.classname,onTouchstart:e[1]||(e[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:e[2]||(e[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onMouseover:e[3]||(e[3]=function(){return o.onMouseOver&&o.onMouseOver.apply(o,arguments)}),onMouseleave:e[4]||(e[4]=function(){return o.onMouseLeave&&o.onMouseLeave.apply(o,arguments)})},[Q(t.$slots,"default")],34)};var Yp=sr("vue-handler-wrapper"),U0={name:"HandlerWrapper",components:{DraggableElement:Jp},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,n=$0(this.horizontalPosition,this.verticalPosition);t=Yp((Fi(e={},n.classname,!0),Fi(e,"disabled",this.disabled),e))}else t=Yp({disabled:this.disabled});return{root:t,draggable:Yp("draggable")}}},emits:["leave","enter","drag","drag-end"]};U0.render=function(t,e,n,i,r,o){var s=et("DraggableElement");return g(),P("div",{class:o.classes.root},[L(s,{class:o.classes.draggable,onDrag:e[1]||(e[1]=function(a){return t.$emit("drag",a)}),onDragEnd:e[2]||(e[2]=function(a){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(a){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(a){return t.$emit("enter")})},{default:H(function(){return[Q(t.$slots,"default")]}),_:3},8,["class"])],2)};var yD=sr("vue-line-wrapper"),K0={name:"LineWrapper",components:{DraggableElement:Jp},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return yD((Fi(t={},this.position,!0),Fi(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};K0.render=function(t,e,n,i,r,o){var s=et("DraggableElement");return g(),P(s,{class:o.classname,onDrag:e[1]||(e[1]=function(a){return t.$emit("drag",a)}),onDragEnd:e[2]||(e[2]=function(a){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(a){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(a){return t.$emit("enter")})},{default:H(function(){return[Q(t.$slots,"default")]}),_:3},8,["class"])};var mr=["left","right","top","bottom"],bD=["left","right"],AD=["top","bottom"],wD=["left","top"],SD=["fill-area","fit-area","stencil","none"],W0={left:0,top:0,width:0,height:0};function q0(t,e,n){return!(n=n||["width","height","left","top"]).some(function(i){return t[i]!==e[i]})}function gr(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function qs(t,e){return{left:t.left-e.left,top:t.top-e.top}}function Zn(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function kl(t,e){var n={left:0,top:0,right:0,bottom:0};return mr.forEach(function(i){var r=e[i],o=gr(t)[i];n[i]=r!==void 0&&o!==void 0?i==="left"||i==="top"?Math.max(0,r-o):Math.max(0,o-r):0}),n}function vr(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function ic(t){return{left:-t.left,top:-t.top}}function Si(t,e){return pt(pt({},t),{left:t.left+e.left,top:t.top+e.top})}function Hi(t,e,n,i){if(e!==1){if(n){var r=Zn(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-r.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-r.top)*(1-e)}}return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2}}return t}function Xt(t){return t.width/t.height}function Xs(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function Gs(t,e){var n={left:0,top:0},i=kl(t,e);return i.left&&i.left>0?n.left=i.left:i.right&&i.right>0&&(n.left=-i.right),i.top&&i.top>0?n.top=i.top:i.bottom&&i.bottom>0&&(n.top=-i.bottom),n}function Qp(t,e){var n;return e.minimum&&t<e.minimum?n=e.minimum:e.maximum&&t>e.maximum&&(n=e.maximum),n}function X0(t,e){var n=Xt(t),i=Xt(e);return e.width<1/0&&e.height<1/0?n>i?{width:e.width,height:e.width/n}:{width:e.height*n,height:e.height}:e.width<1/0?{width:e.width,height:e.width/n}:e.height<1/0?{width:e.height*n,height:e.height}:t}function G0(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function go(t,e){var n=e*Math.PI/180;return{left:t.left*Math.cos(n)-t.top*Math.sin(n),top:t.left*Math.sin(n)+t.top*Math.cos(n)}}function rc(t,e){var n=kl(_n(t,e),e);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((t.width+n.left+n.right)/t.width,Xs(t,e)):Math.min((t.height+n.top+n.bottom)/t.height,Xs(t,e)):1}function _n(t,e,n){n===void 0&&(n=!1);var i=Gs(t,e);return Si(t,n?ic(i):i)}function eh(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function CD(t,e){return pt(pt({},t),{minWidth:Math.min(e.width,t.minWidth),minHeight:Math.min(e.height,t.minHeight),maxWidth:Math.min(e.width,t.maxWidth),maxHeight:Math.min(e.height,t.maxHeight)})}function Z0(t,e,n){n===void 0&&(n=!0);var i={};return mr.forEach(function(r){var o=t[r],s=e[r];o!==void 0&&s!==void 0?i[r]=r==="left"||r==="top"?n?Math.max(o,s):Math.min(o,s):n?Math.min(o,s):Math.max(o,s):s!==void 0?i[r]=s:o!==void 0&&(i[r]=o)}),i}function oc(t,e){return Z0(t,e,!0)}function _0(t){var e=t.size,n=t.aspectRatio,i=t.ignoreMinimum,r=t.sizeRestrictions;return!!((e.correctRatio||Xt(e)>=n.minimum&&Xt(e)<=n.maximum)&&e.height<=r.maxHeight&&e.width<=r.maxWidth&&e.width&&e.height&&(i||e.height>=r.minHeight&&e.width>=r.minWidth))}function J0(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function zr(t){var e=t.width,n=t.height,i=t.sizeRestrictions,r={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},o={width:Math.max(i.minWidth,Math.min(i.maxWidth,e)),height:Math.max(i.minHeight,Math.min(i.maxHeight,n))};function s(u,c){return c===void 0&&(c=!1),u.reduce(function(d,f){return _0({size:f,aspectRatio:r,sizeRestrictions:i,ignoreMinimum:c})&&(!d||J0(f,{width:e,height:n})<J0(d,{width:e,height:n}))?f:d},null)}var a=[];r&&[r.minimum,r.maximum].forEach(function(u){u&&a.push({width:o.width,height:o.width/u,correctRatio:!0},{width:o.height*u,height:o.height,correctRatio:!0})}),_0({size:o,aspectRatio:r,sizeRestrictions:i})&&a.push(o);var l=s(a)||s(a,!0);return l&&{width:l.width,height:l.height}}function th(t){var e=t.event,n=t.coordinates,i=t.positionRestrictions,r=i===void 0?{}:i,o=Si(n,e.directions);return Si(o,Gs(o,r))}function kD(t){var e=t.coordinates,n=t.transform,i=t.imageSize,r=t.sizeRestrictions,o=t.positionRestrictions,s=t.aspectRatio,a=t.visibleArea,l=function(c,d){return th({coordinates:c,positionRestrictions:o,event:new _p({left:d.left-c.left,top:d.top-c.top})})},u=pt({},e);return(Array.isArray(n)?n:[n]).forEach(function(c){var d={};Hn((d=typeof c=="function"?c({coordinates:u,imageSize:i,visibleArea:a}):c).width)&&Hn(d.height)||(u=function(f,p){var h=pt(pt(pt({},f),zr({width:p.width,height:p.height,sizeRestrictions:r,aspectRatio:s})),{left:0,top:0});return l(h,{left:f.left,top:f.top})}(u,pt(pt({},u),d))),Hn(d.left)&&Hn(d.top)||(u=l(u,pt(pt({},u),d)))}),u}function TD(t){t.event;var e=t.getAreaRestrictions,n=t.boundaries,i=t.coordinates,r=t.visibleArea;t.aspectRatio;var o=t.stencilSize,s=t.sizeRestrictions,a=t.positionRestrictions;t.stencilReference;var l,u,c,d=pt({},i),f=pt({},r),p=pt({},o);l=Xt(p),u=Xt(d),c===void 0&&(c=.001),(l===0||u===0?Math.abs(u-l)<c:Math.abs(u/l)<1+c&&Math.abs(u/l)>1-c)||(d=pt(pt({},d),zr({sizeRestrictions:s,width:d.width,height:d.height,aspectRatio:{minimum:Xt(p),maximum:Xt(p)}})));var h=rc(f=Hi(f,d.width*n.width/(f.width*p.width)),e({visibleArea:f,type:"resize"}));return h!==1&&(f=Hi(f,h),d=Hi(d,h)),f=_n(f=Si(f,qs(Zn(d),Zn(f))),e({visibleArea:f,type:"move"})),{coordinates:d=_n(d,oc(gr(f),a)),visibleArea:f}}function OD(t){var e=t.event,n=t.getAreaRestrictions,i=t.boundaries,r=t.coordinates,o=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var s=t.positionRestrictions;t.stencilReference;var a=pt({},r),l=pt({},o);if(r&&o&&e.type!=="manipulateImage"){var u={width:0,height:0};l.width,i.width,Xt(i)>Xt(a)?(u.height=.8*i.height,u.width=u.height*Xt(a)):(u.width=.8*i.width,u.height=u.width*Xt(a));var c=rc(l=Hi(l,a.width*i.width/(l.width*u.width)),n({visibleArea:l,type:"resize"}));l=Hi(l,c),c!==1&&(u.height/=c,u.width/=c),l=_n(l=Si(l,qs(Zn(a),Zn(l))),n({visibleArea:l,type:"move"})),a=_n(a,oc(gr(l),s))}return{coordinates:a,visibleArea:l}}function xD(t){var e=t.event,n=t.coordinates,i=t.visibleArea,r=t.getAreaRestrictions,o=pt({},i),s=pt({},n);if(e.type==="setCoordinates"){var a=Math.max(0,s.width-o.width),l=Math.max(0,s.height-o.height);a>l?o=Hi(o,Math.min(s.width/o.width,Xs(o,r({visibleArea:o,type:"resize"})))):l>a&&(o=Hi(o,Math.min(s.height/o.height,Xs(o,r({visibleArea:o,type:"resize"}))))),o=_n(o=Si(o,ic(Gs(s,gr(o)))),r({visibleArea:o,type:"move"}))}return{visibleArea:o,coordinates:s}}function MD(t){var e=t.imageSize,n=t.visibleArea,i=t.coordinates,r=n||e;return{left:(n?n.left:0)+r.width/2-i.width/2,top:(n?n.top:0)+r.height/2-i.height/2}}function ED(t){var e=t.imageSize,n=t.visibleArea,i=t.aspectRatio,r=t.sizeRestrictions,o=n||e,s=Math.min(i.maximum||1/0,Math.max(i.minimum||0,Xt(o))),a=o.width<o.height?{width:.8*o.width,height:.8*o.width/s}:{height:.8*o.height,width:.8*o.height*s};return zr(pt(pt({},a),{aspectRatio:i,sizeRestrictions:r}))}function ID(t){var e,n,i=t.imageSize,r=t.visibleArea,o=t.boundaries,s=t.aspectRatio,a=t.sizeRestrictions,l=t.stencilSize,u=r||i;return Xt(u)>Xt(o)?n=(e=l.height*u.height/o.height)*Xt(l):e=(n=l.width*u.width/o.width)/Xt(l),zr({width:n,height:e,aspectRatio:s,sizeRestrictions:a})}function PD(t){var e=t.getAreaRestrictions,n=t.coordinates,i=t.imageSize,r=Xt(t.boundaries);if(n){var o={height:Math.max(n.height,i.height),width:Math.max(n.width,i.width)},s=X0({width:Xt(o)>r?o.width:o.height*r,height:Xt(o)>r?o.width/r:o.height},eh(e())),a={left:n.left+n.width/2-s.width/2,top:n.top+n.height/2-s.height/2,width:s.width,height:s.height},l=kl(n,gr(pt({left:0,top:0},i))),u={};return!l.left&&!l.right&&a.width<=i.width&&(u.left=0,u.right=i.width),!l.top&&!l.bottom&&a.height<=i.height&&(u.top=0,u.bottom=i.height),_n(a,u)}var c=Xt(i);return s={height:c>r?i.height:i.width/r,width:c>r?i.height*r:i.width},{left:i.width/2-s.width/2,top:i.height/2-s.height/2,width:s.width,height:s.height}}function sc(t,e){return Z0(t,gr(e))}function LD(t){var e=t.event,n=t.coordinates,i=t.visibleArea,r=t.sizeRestrictions,o=t.getAreaRestrictions,s=t.positionRestrictions,a=t.adjustStencil,l=e.scale,u=e.move,c=pt({},i),d=pt({},n),f=1,p=1,h=l.factor&&Math.abs(l.factor-1)>.001;c=Si(c,{left:u.left||0,top:u.top||0});var m={stencil:{minimum:Math.max(r.minWidth?r.minWidth/d.width:0,r.minHeight?r.minHeight/d.height:0),maximum:Math.min(r.maxWidth?r.maxWidth/d.width:1/0,r.maxHeight?r.maxHeight/d.height:1/0,Xs(d,s))},area:{maximum:Xs(c,o({visibleArea:c,type:"resize"}))}};l.factor&&h&&(l.factor<1?(p=Math.max(l.factor,m.stencil.minimum))>1&&(p=1):l.factor>1&&(p=Math.min(l.factor,Math.min(m.area.maximum,m.stencil.maximum)))<1&&(p=1)),p&&(c=Hi(c,p,l.center));var v=n.left-i.left,S=i.width+i.left-(n.width+n.left),b=n.top-i.top,k=i.height+i.top-(n.height+n.top);return c=_n(c=Si(c,Gs(c,{left:s.left!==void 0?s.left-v*p:void 0,top:s.top!==void 0?s.top-b*p:void 0,bottom:s.bottom!==void 0?s.bottom+k*p:void 0,right:s.right!==void 0?s.right+S*p:void 0})),o({visibleArea:c,type:"move"})),d.width=d.width*p,d.height=d.height*p,d.left=c.left+v*p,d.top=c.top+b*p,d=_n(d,oc(gr(c),s)),l.factor&&h&&a&&(l.factor>1?f=Math.min(m.area.maximum,l.factor)/p:l.factor<1&&(f=Math.max(d.height/c.height,d.width/c.width,l.factor/p)),f!==1&&(c=Si(c=_n(c=Hi(c,f,l.factor>1?l.center:Zn(d)),o({visibleArea:c,type:"move"})),ic(Gs(d,gr(c)))))),{coordinates:d,visibleArea:c}}function DD(t){var e=t.aspectRatio,n=t.getAreaRestrictions,i=t.coordinates,r=t.visibleArea,o=t.sizeRestrictions,s=t.positionRestrictions,a=t.imageSize,l=t.previousImageSize,u=t.angle,c=pt({},i),d=pt({},r),f=go(Zn(pt({left:0,top:0},l)),u);return(c=pt(pt({},zr({sizeRestrictions:o,aspectRatio:e,width:c.width,height:c.height})),go(Zn(c),u))).left-=f.left-a.width/2+c.width/2,c.top-=f.top-a.height/2+c.height/2,d=Hi(d,rc(d,n({visibleArea:d,type:"resize"}))),{coordinates:c=_n(c,s),visibleArea:d=_n(d=Si(d,qs(Zn(c),Zn(i))),n({visibleArea:d,type:"move"}))}}function RD(t){var e=t.flip,n=t.previousFlip,i=t.rotate,r=t.getAreaRestrictions,o=t.coordinates,s=t.visibleArea,a=t.imageSize,l=pt({},o),u=pt({},s),c=n.horizontal!==e.horizontal,d=n.vertical!==e.vertical;if(c||d){var f=go({left:a.width/2,top:a.height/2},-i),p=go(Zn(l),-i),h=go({left:c?f.left-(p.left-f.left):p.left,top:d?f.top-(p.top-f.top):p.top},i);l=Si(l,qs(h,Zn(l))),p=go(Zn(u),-i),u=_n(u=Si(u,qs(h=go({left:c?f.left-(p.left-f.left):p.left,top:d?f.top-(p.top-f.top):p.top},i),Zn(u))),r({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function Y0(t){var e=t.directions,n=t.coordinates,i=t.positionRestrictions,r=i===void 0?{}:i,o=t.sizeRestrictions,s=t.preserveRatio,a=t.compensate,l=pt({},e),u=vr(n,l).width,c=vr(n,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(n.width-o.minWidth)/(l.left/l.right),l.right=-(n.width-o.minWidth)/(l.right/l.left)):l.left<0?l.left=-(n.width-o.minWidth):l.right<0&&(l.right=-(n.width-o.minWidth))),c<0&&(l.top<0&&l.bottom<0?(l.top=-(n.height-o.minHeight)/(l.top/l.bottom),l.bottom=-(n.height-o.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(n.height-o.minHeight):l.bottom<0&&(l.bottom=-(n.height-o.minHeight)));var d=kl(vr(n,l),r);a&&(d.left&&d.left>0&&d.right===0?(l.right+=d.left,l.left-=d.left):d.right&&d.right>0&&d.left===0&&(l.left+=d.right,l.right-=d.right),d.top&&d.top>0&&d.bottom===0?(l.bottom+=d.top,l.top-=d.top):d.bottom&&d.bottom>0&&d.top===0&&(l.top+=d.bottom,l.bottom-=d.bottom),d=kl(vr(n,l),r));var f={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(mr.forEach(function(m){var v=d[m];v&&l[m]&&(f[m]=Math.max(0,1-v/l[m]))}),s){var p=Math.min.apply(null,mr.map(function(m){return f[m]}));p!==1/0&&mr.forEach(function(m){l[m]*=p})}else mr.forEach(function(m){f[m]!==1/0&&(l[m]*=f[m])});if(u=vr(n,l).width,c=vr(n,l).height,l.right+l.left&&(u>o.maxWidth?f.width=(o.maxWidth-n.width)/(l.right+l.left):u<o.minWidth&&(f.width=(o.minWidth-n.width)/(l.right+l.left))),l.bottom+l.top&&(c>o.maxHeight?f.height=(o.maxHeight-n.height)/(l.bottom+l.top):c<o.minHeight&&(f.height=(o.minHeight-n.height)/(l.bottom+l.top))),s){var h=Math.min(f.width,f.height);h!==1/0&&mr.forEach(function(m){l[m]*=h})}else f.width!==1/0&&bD.forEach(function(m){l[m]*=f.width}),f.height!==1/0&&AD.forEach(function(m){l[m]*=f.height});return l}function ac(t,e,n){return e==0&&n==0?t/2:e==0?0:n==0?t:t*Math.abs(e/(e+n))}var BD=sr("vue-simple-handler"),ND=sr("vue-simple-handler-wrapper"),nh={name:"SimpleHandler",components:{HandlerWrapper:U0},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var t,e=(Fi(t={},this.horizontalPosition,!!this.horizontalPosition),Fi(t,this.verticalPosition,!!this.verticalPosition),Fi(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),Fi(t,"hover",this.hover),t);return{default:$n(BD(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:$n(ND(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};nh.render=function(t,e,n,i,r,o){var s=et("HandlerWrapper");return g(),P(s,{class:o.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:H(function(){return[L("div",{class:o.classes.default},null,2)]}),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var $D=sr("vue-simple-line"),VD=sr("vue-simple-line-wrapper"),ih={name:"SimpleLine",components:{LineWrapper:K0},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:$n($D(Fi({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:$n(VD(Fi({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};ih.render=function(t,e,n,i,r,o){var s=et("LineWrapper");return g(),P(s,{class:o.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:H(function(){return[L("div",{class:o.classes.root},null,2)]}),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var rh=sr("vue-bounding-box"),zD=["east","west",null],FD=["south","north",null],Q0={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return nh}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return ih}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return zD.forEach(function(e){FD.forEach(function(n){if(e!==n){var i=$0(e,n),r=i.name,o=i.classname;t.push({name:r,classname:o,verticalDirection:n,horizontalDirection:e})}})}),{points:t}},computed:{style:function(){var t={};return this.width&&this.height&&(t.width="".concat(this.width,"px"),t.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),t},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,n=this.linesClasses,i=this.linesWrappersClasses;return{root:rh(),handlers:t,handlersWrappers:e,lines:n,linesWrappers:i}},lineNodes:function(){var t=this,e=[];return this.points.forEach(function(n){n.horizontalDirection&&n.verticalDirection||!t.lines[n.name]||e.push({name:n.name,component:t.linesComponent,class:$n(t.classes.lines.default,t.classes.lines[n.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:$n(t.classes.linesWrappers.default,t.classes.linesWrappers[n.name],!t.resizable&&t.classes.linesWrappers.disabled),hoverClass:t.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!t.resizable})}),e},handlerNodes:function(){var t=this,e=[],n=this.width,i=this.height;return this.points.forEach(function(r){if(t.handlers[r.name]){var o={name:r.name,component:t.handlersComponent,class:$n(t.classes.handlers.default,t.classes.handlers[r.name]),wrapperClass:$n(t.classes.handlersWrappers.default,t.classes.handlersWrappers[r.name]),hoverClass:t.classes.handlers.hover,verticalDirection:r.verticalDirection,horizontalDirection:r.horizontalDirection,disabled:!t.resizable};if(n&&i){var s=r.horizontalDirection,a=r.verticalDirection,l=s==="east"?n:s==="west"?0:n/2,u=a==="south"?i:a==="north"?0:i/2;o.wrapperClass=rh("handler"),o.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},t.transitions&&t.transitions.enabled&&(o.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else o.wrapperClass=rh("handler",Fi({},r.classname,!0));e.push(o)}}),e}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(t,e,n){var i,r=t.shift(),o=r.left,s=r.top,a={left:0,right:0,top:0,bottom:0};e==="west"?a.left-=o:e==="east"&&(a.right+=o),n==="north"?a.top-=s:n==="south"&&(a.bottom+=s),!n&&e?i="width":n&&!e&&(i="height"),this.resizable&&this.$emit("resize",new gD(a,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:i}))}},emits:["resize","resize-end"]};Q0.render=function(t,e,n,i,r,o){return g(),P("div",{ref:"box",class:o.classes.root,style:o.style},[Q(t.$slots,"default"),L("div",null,[(g(!0),P(ue,null,Je(o.lineNodes,function(s){return g(),P(yt(s.component),{key:s.name,"default-class":s.class,"hover-class":s.hoverClass,"wrapper-class":s.wrapperClass,position:s.name,disabled:s.disabled,onDrag:function(a){return o.onHandlerDrag(a,s.horizontalDirection,s.verticalDirection)},onDragEnd:e[1]||(e[1]=function(a){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])}),128))]),(g(!0),P(ue,null,Je(o.handlerNodes,function(s){return g(),P("div",{key:s.name,style:s.wrapperStyle,class:s.wrapperClass},[(g(),P(yt(s.component),{"default-class":s.class,"hover-class":s.hoverClass,"wrapper-class":s.wrapperClass,"horizontal-position":s.horizontalDirection,"vertical-position":s.verticalDirection,disabled:s.disabled,onDrag:function(a){return o.onHandlerDrag(a,s.horizontalDirection,s.verticalDirection)},onDragEnd:e[2]||(e[2]=function(a){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)}),128))],6)};var HD=sr("vue-draggable-area"),eA={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:HD()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=ns(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):j0({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),n=e.left,i=e.top;this.anchor={x:t.clientX-n,y:t.clientY-i}},processMove:function(t,e){var n=ns(e);if(this.touches.length){var i=this.$refs.container.getBoundingClientRect(),r=i.left,o=i.top;this.touches.length===1&&n.length===1&&this.$emit("move",new _p({left:n[0].clientX-(r+this.anchor.x),top:n[0].clientY-(o+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};eA.render=function(t,e,n,i,r,o){return g(),P("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:e[2]||(e[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)})},[Q(t.$slots,"default")],544)};function oh(t){var e,n;return{rotate:t.rotate||0,flip:{horizontal:((e=t==null?void 0:t.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((n=t==null?void 0:t.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function jD(t){return new Promise(function(e,n){try{if(t)if(/^data:/i.test(t))e(function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),c=u.length,d=new ArrayBuffer(c),f=new Uint8Array(d),p=0;p<c;p++)f[p]=u.charCodeAt(p);return d}(t));else if(/^blob:/i.test(t)){var i=new FileReader;i.onload=function(l){e(l.target.result)},o=t,s=function(l){i.readAsArrayBuffer(l)},(a=new XMLHttpRequest).open("GET",o,!0),a.responseType="blob",a.onload=function(){this.status!=200&&this.status!==0||s(this.response)},a.send()}else{var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||r.status===0?e(r.response):n("Warning: could not load an image to parse its orientation"),r=null)},r.onprogress=function(){r.getResponseHeader("content-type")!=="image/jpeg"&&r.abort()},r.withCredentials=!1,r.open("GET",t,!0),r.responseType="arraybuffer",r.send(null)}else n("Error: the image is empty")}catch(l){n(l)}var o,s,a})}function tA(t){var e=t.rotate,n=t.flip,i=t.scaleX,r=t.scaleY,o="";return o+=" rotate("+e+"deg) ",o+=" scaleX("+i*(n.horizontal?-1:1)+") ",o+=" scaleY("+r*(n.vertical?-1:1)+") "}function UD(t){try{var e,n=new DataView(t),i=void 0,r=void 0,o=void 0,s=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var a=n.byteLength,l=2;l+1<a;){if(n.getUint8(l)===255&&n.getUint8(l+1)===225){o=l;break}l++}if(o&&(i=o+10,function(p,h,m){var v,S="";for(v=h,m+=h;v<m;v++)S+=String.fromCharCode(p.getUint8(v));return S}(n,o+4,4)==="Exif")){var u=n.getUint16(i);if(((r=u===18761)||u===19789)&&n.getUint16(i+2,r)===42){var c=n.getUint32(i+4,r);c>=8&&(s=i+c)}}if(s){for(var d=n.getUint16(s,r),f=0;f<d;f++)if(l=s+12*f+2,n.getUint16(l,r)===274){l+=8,e=n.getUint16(l,r),n.setUint16(l,1,r);break}}return e}catch{return null}}function nA(t,e){var n=e.getBoundingClientRect(),i=n.left,r=n.top,o={left:0,top:0},s=0;return t.forEach(function(a){o.left+=(a.clientX-i)/t.length,o.top+=(a.clientY-r)/t.length}),t.forEach(function(a){s+=j0({x:o.left,y:o.top},{x:a.clientX-i,y:a.clientY-r})}),{centerMass:o,spread:s,count:t.length}}var sh={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=Gp(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new Cl({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=nA(e,this.$refs.container),i=this.oldGeometricProperties;i.count===n.count&&i.count>1&&this.$emit("resize",new Cl({left:i.centerMass.left-n.centerMass.left,top:i.centerMass.top-n.centerMass.top},{factor:i.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,n=e.getBoundingClientRect(),i=n.left,r=n.top,o=n.bottom,s=n.right;this.touches=ns(t.touches).filter(function(a){return a.clientX>i&&a.clientX<s&&a.clientY>r&&a.clientY<o}),this.oldGeometricProperties=nA(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var n=ns(t.touches).filter(function(i){return!i.identifier||e.touches.find(function(r){return r.identifier===i.identifier})});this.processEvent(t)&&(this.processMove(t,n),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),n=e.left,i=e.top,r=1+this.wheelResize.ratio*(s=t.deltaY||t.detail||t.wheelDelta,(a=+s)==0||H0(a)?a:a>0?1:-1),o={left:t.clientX-n,top:t.clientY-i};this.$emit("resize",new Cl({},{factor:r,center:o})),this.touches.length||this.debouncedProcessEnd()}var s,a}},emits:["resize","move","transform-end"]};sh.render=function(t,e,n,i,r,o){return g(),P("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:e[2]||(e[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onWheel:e[3]||(e[3]=function(){return o.onWheel&&o.onWheel.apply(o,arguments)})},[Q(t.$slots,"default")],544)};var ah={components:{TransformableImage:sh},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};ah.render=function(t,e,n,i,r,o){var s=et("transformable-image");return g(),P(s,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:e[1]||(e[1]=function(a){return t.$emit("move",a)}),onResize:e[2]||(e[2]=function(a){return t.$emit("resize",a)})},{default:H(function(){return[Q(t.$slots,"default")]}),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var lc=sr("vue-preview"),iA={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:lc({fill:this.fill}),wrapper:lc("wrapper"),imageWrapper:lc("image-wrapper"),image:$n(lc("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};return this.width&&(t.width="".concat(this.size.width,"px")),this.height&&(t.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},wrapperStyle:function(){var t={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=qt(qt({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),n=this.imageSize.width,i=this.imageSize.height,r=G0({width:n,height:i},e.rotate),o={width:"".concat(n,"px"),height:"".concat(i,"px"),left:"0px",top:"0px"},s={rotate:{left:(n-r.width)*e.scaleX/2,top:(i-r.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*n/2,top:(1-e.scaleY)*i/2}};return o.transform=`translate(
|
|
228
|
+
`.concat(-this.coordinates.left/t-s.rotate.left-s.scale.left,"px,").concat(-this.coordinates.top/t-s.rotate.top-s.scale.top,"px) ")+tA(e),this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",function(){t.refreshImage()}),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};iA.render=function(t,e,n,i,r,o){return g(),P("div",{ref:"root",class:o.classes.root,style:o.style},[L("div",{ref:"wrapper",class:o.classes.wrapper,style:o.wrapperStyle},[ft(L("img",{ref:"image",src:n.image&&n.image.src,class:o.classes.image,style:o.imageStyle},null,14,["src"]),[[Xn,n.image&&n.image.src]])],6)],6)};var rA={components:{Preview:iA},inheritAttrs:!1};rA.render=function(t,e,n,i,r,o){var s=et("preview");return g(),P(s,T(t.$attrs,{fill:!0}),null,16)};var lh=sr("vue-rectangle-stencil"),oA={name:"RectangleStencil",components:{StencilPreview:rA,BoundingBox:Q0,DraggableArea:eA},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return nh}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return ih}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:$n(lh({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:$n(lh("preview"),this.previewClass),boundingBox:$n(lh("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,i=t.left,r=t.top,o={width:"".concat(n,"px"),height:"".concat(e,"px"),transform:"translate(".concat(i,"px, ").concat(r,"px)")};return this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};oA.render=function(t,e,n,i,r,o){var s=et("stencil-preview"),a=et("draggable-area"),l=et("bounding-box");return g(),P("div",{class:o.classes.stencil,style:o.style},[L(l,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:o.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:o.onResize,onResizeEnd:o.onResizeEnd},{default:H(function(){return[L(a,{movable:n.movable,onMove:o.onMove,onMoveEnd:o.onMoveEnd},{default:H(function(){return[L(s,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:o.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]}),_:1},8,["movable","onMove","onMoveEnd"])]}),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var KD=["transitions"],Fr=sr("vue-advanced-cropper"),sA={name:"Cropper",components:{BackgroundWrapper:ah},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return oA}},backgroundWrapperComponent:{type:[Object,String],default:function(){return ah}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(t){return SD.indexOf(t)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(t){return!(typeof t=="string"&&t!=="fill"&&t!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(t){var e=t.event,n=t.coordinates,i=t.aspectRatio,r=t.positionRestrictions,o=t.sizeRestrictions,s=pt(pt({},n),{right:n.left+n.width,bottom:n.top+n.height}),a=e.params||{},l=pt({},e.directions),u=a.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};o.widthFrozen&&(l.left=0,l.right=0),o.heightFrozen&&(l.top=0,l.bottom=0),mr.forEach(function(A){u[A]||(l[A]=0)});var c=vr(s,l=Y0({coordinates:s,directions:l,sizeRestrictions:o,positionRestrictions:r})).width,d=vr(s,l).height,f=a.preserveRatio?Xt(s):Qp(c/d,i);if(f){var p=a.respectDirection;if(p||(p=s.width>=s.height||f===1?"width":"height"),p==="width"){var h=c/f-s.height;if(u.top&&u.bottom){var m=l.top,v=l.bottom;l.bottom=ac(h,v,m),l.top=ac(h,m,v)}else u.bottom?l.bottom=h:u.top?l.top=h:u.right?l.right=0:u.left&&(l.left=0)}else if(p==="height"){var S=s.width-d*f;if(u.left&&u.right){var b=l.left,k=l.right;l.left=-ac(S,b,k),l.right=-ac(S,k,b)}else u.left?l.left=-S:u.right?l.right=-S:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=Y0({directions:l,coordinates:s,sizeRestrictions:o,positionRestrictions:r,preserveRatio:!0,compensate:a.compensate})}return c=vr(s,l).width,d=vr(s,l).height,(f=a.preserveRatio?Xt(s):Qp(c/d,i))&&Math.abs(f-c/d)>.001&&mr.forEach(function(A){u[A]||(l[A]=0)}),th({event:new _p({left:-l.left,top:-l.top}),coordinates:{width:n.width+l.right+l.left,height:n.height+l.top+l.bottom,left:n.left,top:n.top},positionRestrictions:r})}},moveAlgorithm:{type:Function,default:th},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,i=Xt(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/i+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,i=t.aspectRatio,r=t.sizeRestrictions,o=t.positionRestrictions,s=pt(pt({},n),zr({width:n.width,height:n.height,aspectRatio:i,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,r.minHeight),minWidth:Math.min(e.width,r.minWidth)}}));return s=_n(s=Si(s,qs(Zn(n),Zn(s))),oc(gr(e),o))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,i=t.getAreaRestrictions,r=t.coordinates,o=pt({},e);o.height=o.width/Xt(n),o.top+=(e.height-o.height)/2,(r.height-o.height>0||r.width-o.width>0)&&(o=Hi(o,Math.max(r.height/o.height,r.width/o.width)));var s=ic(Gs(r,gr(o=Hi(o,rc(o,i({visibleArea:o,type:"resize"}))))));return o.width<r.width&&(s.left=0),o.height<r.height&&(s.top=0),o=_n(o=Si(o,s),i({visibleArea:o,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,i=t.imageSize,r=t.imageRestriction,o=t.type,s={};return r==="fill-area"?s={left:0,top:0,right:i.width,bottom:i.height}:r==="fit-area"&&(Xt(n)>Xt(i)?(s={top:0,bottom:i.height},e&&o==="move"&&(e.width>i.width?(s.left=-(e.width-i.width)/2,s.right=i.width-s.left):(s.left=0,s.right=i.width))):(s={left:0,right:i.width},e&&o==="move"&&(e.height>i.height?(s.top=-(e.height-i.height)/2,s.bottom=i.height-s.top):(s.top=0,s.bottom=i.height)))),s}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:qt({},W0)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var t=function(e){return e*Math.PI/180}(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=Zp(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Zp(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:Hn(this.minWidth)?0:nc(this.minWidth),minHeight:Hn(this.minHeight)?0:nc(this.minHeight),maxWidth:Hn(this.maxWidth)?1/0:nc(this.maxWidth),maxHeight:Hn(this.maxHeight)?1/0:nc(this.maxHeight)});if(t=function(i){var r=i.areaRestrictions,o=i.sizeRestrictions,s=i.boundaries,a=i.positionRestrictions,l=pt(pt({},o),{minWidth:o.minWidth!==void 0?o.minWidth:0,minHeight:o.minHeight!==void 0?o.minHeight:0,maxWidth:o.maxWidth!==void 0?o.maxWidth:1/0,maxHeight:o.maxHeight!==void 0?o.maxHeight:1/0});a.left!==void 0&&a.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,a.right-a.left)),a.bottom!==void 0&&a.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,a.bottom-a.top));var u=eh(r),c=X0(s,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>c.width)&&(l.maxWidth=Math.min(l.maxWidth,c.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>c.height)&&(l.maxHeight=Math.min(l.maxHeight,c.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l}({sizeRestrictions:t,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),n=eh(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Fr(),image:$n(Fr("image"),this.imageClass),stencil:Fr("stencil"),boundaries:$n(Fr("boundaries"),this.boundariesClass),stretcher:$n(Fr("stretcher")),background:$n(Fr("background"),this.backgroundClass),foreground:$n(Fr("foreground"),this.foregroundClass),imageWrapper:$n(Fr("image-wrapper")),cropperWrapper:$n(Fr("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,i=t.left,r=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(i-this.visibleArea.left)/this.coefficient,top:(r-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(t.opacity="0"),t},imageStyle:function(){var t=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},i=qt(qt({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),r={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+tA(i)};return this.transitionsOptions.enabled&&(r.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),r}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick(function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()})},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find(function(n){return t[n]!==e[n]})&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Gp(this.update,this.debounce),this.debouncedDisableTransitions=Gp(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var t=this.initialized?this.prepareResult(qt({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:qt({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?qt({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?qt({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.transitions,r=i===void 0||i;this.onManipulateImage(new Cl({},{factor:1/t,center:e}),{normalize:!1,transitions:r})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.transitions,r=i===void 0||i;this.onManipulateImage(new Cl({left:t||0,top:e||0}),{normalize:!1,transitions:r})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.autoZoom,r=i===void 0||i,o=n.transitions,s=o===void 0||o;this.$nextTick(function(){e.imageLoaded?(e.transitionsActive||(s&&e.enableTransitions(),e.coordinates=e.applyTransform(t),r&&e.runAutoZoom("setCoordinates"),s&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t})},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then(function(){t.onChange()}):this.resetVisibleArea().then(function(){t.onChange()})},reset:function(){var t=this;return this.resetVisibleArea().then(function(){t.onChange(!1)})},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick(function(){t(),e.awaiting=!1}))},prepareResult:function(t){return this.roundResult?function(e){var n=e.coordinates,i=e.sizeRestrictions,r=e.positionRestrictions,o={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return o.width>i.maxWidth?o.width=Math.floor(n.width):o.width<i.minWidth&&(o.width=Math.ceil(n.width)),o.height>i.maxHeight?o.height=Math.floor(n.height):o.height<i.minHeight&&(o.height=Math.ceil(n.height)),_n(o,r)}(qt(qt({},this.getPublicProperties()),{},{positionRestrictions:sc(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,i){var r=this.autoZoomAlgorithm;r||(r=this.stencilSize?TD:this.autoZoom?OD:xD);var o=r({event:{type:t,params:i},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return qt(qt({},o),{},{changed:!q0(o.visibleArea,e)||!q0(o.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,i=n!==void 0&&n,r=hD(e,KD),o=this.processAutoZoom(t,this.visibleArea,this.coordinates,r),s=o.visibleArea,a=o.coordinates,l=o.changed;i&&l&&this.enableTransitions(),this.visibleArea=s,this.coordinates=a,i&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return function(e){var n=e.event,i=e.visibleArea,r=e.coefficient;if(n.type==="manipulateImage")return pt(pt({},n),{move:{left:n.move&&n.move.left?r*n.move.left:0,top:n.move&&n.move.top?r*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*r+i.left,top:n.scale.center.top*r+i.top}:null}});if(n.type==="resize"){var o=pt(pt({},n),{directions:pt({},n.directions)});return mr.forEach(function(a){o.directions[a]*=r}),o}if(n.type==="move"){var s=pt(pt({},n),{directions:pt({},n.directions)});return wD.forEach(function(a){s.directions[a]*=r}),s}return n}(qt(qt({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?function(a,l,u){var c=u.rotate,d=u.flip,f={width:l.naturalWidth,height:l.naturalHeight},p=G0(f,c),h=a.getContext("2d");a.height=p.height,a.width=p.width,h.save();var m=go(Zn(pt({left:0,top:0},f)),c);return h.translate(-(m.left-p.width/2),-(m.top-p.height/2)),h.rotate(c*Math.PI/180),h.translate(d.horizontal?f.width:0,d.vertical?f.height:0),h.scale(d.horizontal?-1:1,d.vertical?-1:1),h.drawImage(l,0,0,f.width,f.height),h.restore(),a}(this.$refs.sourceCanvas,e,this.imageTransforms):e,i=qt({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),r=function(a){return a.find(function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u})},o=zr({sizeRestrictions:{minWidth:r([i.width,i.minWidth])||0,minHeight:r([i.height,i.minHeight])||0,maxWidth:r([i.width,i.maxWidth])||1/0,maxHeight:r([i.height,i.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(i.maxArea&&o.width*o.height>i.maxArea){var s=Math.sqrt(i.maxArea/(o.width*o.height));o={width:Math.round(s*o.width),height:Math.round(s*o.height)}}return function(a,l,u,c,d){a.width=c?c.width:u.width,a.height=c?c.height:u.height;var f=a.getContext("2d");f.clearRect(0,0,a.width,a.height),d&&(d.imageSmoothingEnabled&&(f.imageSmoothingEnabled=d.imageSmoothingEnabled),d.imageSmoothingQuality&&(f.imageSmoothingQuality=d.imageSmoothingQuality),d.fillColor&&(f.fillStyle=d.fillColor,f.fillRect(0,0,a.width,a.height),f.save()));var p=u.left<0?-u.left:0,h=u.top<0?-u.top:0;f.drawImage(l,u.left+p,u.top+h,u.width,u.height,p*(a.width/u.width),h*(a.height/u.height),a.width,a.height)}(t,n,this.coordinates,o,i),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?CD(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,i=this.visibleArea&&e?sc(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return kD({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:i,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?ID:ED);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var i=Ws(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,r=this.defaultPosition||MD,o=[i,function(s){var a=s.coordinates;return qt({},Ws(r)?r({coordinates:a,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&o.push.apply(o,ns(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(o,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout(function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}},this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then(function(){var i={cropper:n,imageSize:t.imageSize};if(Ws(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(i):t.defaultBoundaries==="fit"?t.boundaries=function(r){var o=r.cropper,s=r.imageSize,a=o.clientHeight,l=o.clientWidth,u=a,c=s.width*a/s.height;return c>l&&(c=l,u=s.height*l/s.width),{width:c,height:u}}(i):t.boundaries=function(r){var o=r.cropper;return{width:o.clientWidth,height:o.clientHeight}}(i),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")})},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=qt(qt({},this.defaultImageTransforms),{},{flip:qt({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then(function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,i,r,o,s,a=t.defaultVisibleArea||PD;t.visibleArea=Ws(a)?a({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,i=e.boundaries,r=e.getAreaRestrictions,o=pt({},n),s=Xt(i),o.width/o.height!==s&&(o.height=o.width/s),_n(o,r({visibleArea:o,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")}).catch(function(){t.visibleArea=null})},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then(function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")}).catch(function(){t.visibleArea=null})},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if(function(r){if(z0(r))return!1;var o=window.location,s=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(r)||[],a={protocol:s[1]||"",host:s[2]||"",port:s[3]||""},l=function(u){return u.port||((u.protocol||o.protocol)==="http"?80:433)};return!(!a.protocol&&!a.host&&!a.port||a.protocol&&a.protocol==o.protocol&&a.host&&a.host==o.host&&a.host&&l(a)==l(o))}(this.src)){var n=Hn(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var i=(t=this.src,new Promise(function(r){jD(t).then(function(o){var s=UD(o);r(o?{source:t,arrayBuffer:o,orientation:s}:{source:t,arrayBuffer:null,orientation:null})}).catch(function(o){console.warn(o),r({source:t,arrayBuffer:null,orientation:null})})}));setTimeout(function(){i.then(e.onParseImage)},this.transitionTime)}else setTimeout(function(){e.onParseImage({source:e.src})},this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then(function(){t.$emit("ready"),t.onChange(!1)}))},onParseImage:function(t){var e=this,n=t.source,i=t.arrayBuffer,r=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,i&&r&&r>1?V0(n)||!z0(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([i])),this.imageAttributes.revoke=!0):this.imageAttributes.src=function(o){for(var s=[],a=new Uint8Array(o);a.length>0;){var l=a.subarray(0,8192);s.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),a=a.subarray(8192)}return"data:image/jpeg;base64,"+btoa(s.join(""))}(i):this.imageAttributes.src=n,Ws(this.defaultTransforms)?this.appliedImageTransforms=oh(this.defaultTransforms()):tc(this.defaultTransforms)?this.appliedImageTransforms=oh(this.defaultTransforms):this.appliedImageTransforms=function(o){var s=oh({});if(o)switch(o){case 2:s.flip.horizontal=!0;break;case 3:s.rotate=-180;break;case 4:s.flip.vertical=!0;break;case 5:s.rotate=90,s.flip.vertical=!0;break;case 6:s.rotate=90;break;case 7:s.rotate=90,s.flip.horizontal=!0;break;case 8:s.rotate=-90}return s}(r),this.defaultImageTransforms=qt(qt({},this.appliedImageTransforms),{},{flip:qt({},this.appliedImageTransforms.flip)}),this.$nextTick(function(){var o=e.$refs.image;o&&o.complete&&(function(s){return!!s.naturalWidth}(o)?e.onSuccessLoadImage():e.onFailLoadImage())})},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender(function(){e.coordinates=e.moveAlgorithm(qt(qt({},e.getPublicProperties()),{},{positionRestrictions:sc(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()})},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender(function(){var n=e.sizeRestrictions,i=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(qt(qt({},e.getPublicProperties()),{},{positionRestrictions:sc(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,i),minHeight:Math.max(n.minHeight,i)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1})},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,i=n!==void 0&&n,r=e.normalize,o=r===void 0||r;i&&this.enableTransitions();var s=LD(qt(qt({},this.getPublicProperties()),{},{event:o?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),a=s.visibleArea,l=s.coordinates;this.visibleArea=a,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),i&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,i=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:i})},getAspectRatio:function(t){var e,n,i=this.stencilProps,r=i.aspectRatio,o=i.minAspectRatio,s=i.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var a=this.$refs.stencil.aspectRatios();e=a.minimum,n=a.maximum}if(Hn(e)&&(e=Hn(r)?o:r),Hn(n)&&(n=Hn(r)?s:r),!t&&(Hn(e)||Hn(n))){var l=this.getStencilSize(),u=l?Xt(l):null;Hn(e)&&(e=F0(u)?u:void 0),Hn(n)&&(n=F0(u)?u:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=t.boundaries,n=t.stencilSize,i=t.aspectRatio,Qp(Xt(r=Ws(n)?n({boundaries:e,aspectRatio:i}):n),i)&&(r=zr({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:i.minimum,maximum:i.maximum}})),(r.width>e.width||r.height>e.height)&&(r=zr({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:r.width,height:r.height,aspectRatio:{minimum:Xt(r),maximum:Xt(r)}})),r;var t,e,n,i,r},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return qt({},W0)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.transitions,r=i===void 0||i;if(!this.transitionsActive){r&&this.enableTransitions();var o=qt({},this.imageTransforms.flip),s=RD({flip:{horizontal:t?!o.horizontal:o.horizontal,vertical:e?!o.vertical:o.vertical},previousFlip:o,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=s.visibleArea,l=s.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=a,this.coordinates=l,this.onChange(),r&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,i=n===void 0||n;if(!this.transitionsActive){i&&this.enableTransitions();var r=qt({},this.imageSize);this.appliedImageTransforms.rotate+=t;var o=DD({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:r,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),s=o.visibleArea,a=o.coordinates,l=this.processAutoZoom("rotateImage",s,a);s=l.visibleArea,a=l.coordinates,this.visibleArea=s,this.coordinates=a,this.onChange(),i&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},WD={key:0,ref:"canvas",style:{display:"none"}},qD={key:1,ref:"sourceCanvas",style:{display:"none"}};sA.render=function(t,e,n,i,r,o){return g(),P("div",{ref:"cropper",class:o.classes.cropper},[L("div",{ref:"stretcher",class:o.classes.stretcher},null,2),L("div",{class:o.classes.boundaries,style:o.boundariesStyle},[(g(),P(yt(n.backgroundWrapperComponent),{class:o.classes.cropperWrapper,"wheel-resize":o.settings.resizeImage.wheel,"touch-resize":o.settings.resizeImage.touch,"touch-move":o.settings.moveImage.touch,"mouse-move":o.settings.moveImage.mouse,onMove:o.onManipulateImage,onResize:o.onManipulateImage},{default:H(function(){return[L("div",{class:o.classes.background,style:o.boundariesStyle},null,6),L("div",{class:o.classes.imageWrapper},[L("img",{ref:"image",crossorigin:r.imageAttributes.crossOrigin,src:r.imageAttributes.src,class:o.classes.image,style:o.imageStyle,onMousedown:e[1]||(e[1]=Ot(function(){},["prevent"]))},null,46,["crossorigin","src"])],2),L("div",{class:o.classes.foreground,style:o.boundariesStyle},null,6),ft((g(),P(yt(n.stencilComponent),T({ref:"stencil",image:o.image,coordinates:r.coordinates,"stencil-coordinates":o.stencilCoordinates,transitions:o.transitionsOptions},n.stencilProps,{onResize:o.onResize,onResizeEnd:o.onResizeEnd,onMove:o.onMove,onMoveEnd:o.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[Xn,r.imageLoaded]]),n.canvas?(g(),P("canvas",WD,null,512)):B("",!0),n.canvas?(g(),P("canvas",qD,null,512)):B("",!0)]}),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const XD={class:"!hidden"},GD=ce("InvisibleField",Ae({__name:"InvisibleField",props:{value:{type:[String,Array,Number,Boolean,null,Object],default:void 0},fieldName:{default:"invisibleinput"}},setup(t){var i;const e=t,n=hn({value:typeof e.value=="string"?(i=e.value)==null?void 0:i.trim():e.value});return wt(()=>{var r;Object.assign(n,Nn(e.fieldName??"invisibleinput")),e.value!=null&&(n.value=typeof e.value=="string"?(r=e.value)==null?void 0:r.trim():e.value)}),$e(()=>e.value,r=>{n.value=r}),(r,o)=>(g(),O("div",XD))}})),ZD=k0(Ae({__name:"BackgroundImageCropper",props:{touchMove:{},mouseMove:{},touchResize:{},wheelResize:{}},emits:["move","resize"],setup(t){const e=t,{locale:n}=Zt("ImageCompressor"),i=oe(!1),r=re(),o=(a,l)=>{if(a.type==="touchstart"||a.type==="touchmove"){if(a.touches.length===1&&!l)return i.value=!0,r.value="touch",s(),!1;i.value=!1}else if(a.type==="wheel"){if(!l&&!a.ctrlKey)return i.value=!0,r.value="wheel",s(),!1;i.value=!1}a.preventDefault(),a.stopPropagation()},s=()=>{setTimeout(()=>{i.value=!1},1e3)};return(a,l)=>(g(),P(x(sh),{"events-filter":o,"mouse-move":e.mouseMove,"touch-move":e.touchMove,"touch-resize":e.touchResize,"wheel-resize":e.wheelResize,onMove:l[0]||(l[0]=u=>a.$emit("move",u)),onResize:l[1]||(l[1]=u=>a.$emit("resize",u))},{default:H(()=>[Q(a.$slots,"default",{},void 0,!0),E("div",{class:pe([{"cropper-event-notification--visible":i.value},"cropper-event-notification"])},_(r.value==="wheel"?x(n).cropperCtrlScrollInfo:x(n).cropperTwoFingerInfo),3)]),_:3},8,["mouse-move","touch-move","touch-resize","wheel-resize"]))}}),[["__scopeId","data-v-9031c32d"]]),_D={class:"flex flex-col gap-y-4"},JD={key:0,class:pe(["text-xs font-normal text-grayscale-900","[&_li]:before:content-['•']","[&_li]:before:inline-block [&_li]:before:w-[12px] [&_li]:before:ml-[-12px] pl-3","max-w-[121px] [&_li]:pl-0.5"]),"data-wv-section":"image-requirements-info"},aA=Ae({__name:"ImageInputInfo",props:{customRequirements:{},showInfo:{type:Boolean},showAddButton:{type:Boolean}},emits:["addPhoto"],setup(t){const{locale:e}=Zt("ImageCompressor");return(n,i)=>{var r;return g(),O("div",_D,[n.showInfo?(g(),O("ul",JD,[(r=n.customRequirements)!=null&&r.length?(g(!0),O(ue,{key:0},Je(n.customRequirements,o=>(g(),O("li",{key:o},_(o),1))),128)):(g(),O(ue,{key:1},[E("li",null,_(x(e).maxSizeRequirement),1),E("li",null,_(x(e).imageTypeRequirement),1)],64))])):B("",!0),n.showAddButton?(g(),P(We,{key:1,onClick:i[0]||(i[0]=o=>n.$emit("addPhoto")),icon:"add",label:"Add Photo",text:""})):B("",!0),Q(n.$slots,"default")])}}}),YD={key:1,class:"flex gap-1 items-start"},QD=["id","multiple"],eR=["for"],tR=ce("ImageCompressor",Ae({__name:"ImageCompressor",props:wn({initialName:{},multiple:{type:Boolean},defaultImage:{},disabled:{type:Boolean,default:!1},compressedBlob:{default:void 0},imagePreviewUrl:{default:void 0},imagePreviewSize:{default:"big"},rounded:{type:Boolean,default:!1},useDeleteButton:{type:Boolean,default:!0},useValidator:{type:Boolean,default:!1},mandatory:{type:Boolean,default:!1},invalid:{type:Boolean},validatorMessage:{default:"Photo must be uploaded"},label:{default:void 0},fieldName:{default:"imageInput"},fieldInfo:{default:void 0},showInfo:{type:Boolean,default:!0},customRequirements:{default:void 0},confirmOnDelete:{type:Boolean},emitDeleteFn:{type:Boolean},showValidatorMessage:{type:Boolean,default:!0},fileType:{default:"webp"},type:{default:"normal"}},{defaultImage:{default:0},defaultImageModifiers:{}}),emits:wn(["apply","applyProp","update:defaultImage","update:fieldValue","delete"],["update:defaultImage"]),setup(t,{expose:e,emit:n}){const i=dt("preset",{}).image,r=t,o=n,{locale:s}=Zt("ImageCompressor");wt(async()=>{ve(),M()}),Fo(()=>{Ie(0),Ie(1)});const a=re([{src:null,type:null},{src:null,type:null}]),l=nb(),u=re(),c=re(),d=re([]),f=re(),p=oe(0),h=re(),m=re(),v=oe(),S=ni(t,"defaultImage"),b=hn({value:r.multiple?[]:void 0}),k=oe(!1),A=oe(),w=oe(0),y=oe(!1),C=re([!1,!1]),I=X(()=>`image/${r.fileType}`),R=U=>typeof d.value[U]=="string"&&d.value[U].includes("data:image/png;base64"),M=async()=>{var U,J;(U=r.imagePreviewUrl)!=null&&U.length?d.value=Array.isArray(r.imagePreviewUrl)?r.imagePreviewUrl:[r.imagePreviewUrl]:Array.isArray(r.compressedBlob)?d.value=r.compressedBlob:r.compressedBlob?d.value=[r.compressedBlob]:r.initialName?(u.value=Hx(r.initialName,125,l),d.value=[(J=u.value)==null?void 0:J.toDataURL()]):d.value=[],r.imagePreviewUrl?b.value=r.imagePreviewUrl:r.initialName&&(b.value=await D()),o("applyProp")},D=async()=>new Promise(U=>{var J;(J=u.value)==null||J.toBlob(ke=>{U(new File([ke??new Blob],Date.now()+".png",{type:"image/png"}))})}),$=(U=!1)=>{var J;r.disabled||(U&&(v.value=1),(J=f.value)==null||J.click())},W=async U=>{const{files:J}=U.target,ke=Array.from(J??[]).slice(0,d.value.length?1:2);for(const[He,j]of ke.entries())try{const he=v.value??He;await ie(j,he)}catch(he){console.error("Error loading image:",he)}finally{v.value=void 0}},ie=async(U,J)=>{const ke=j=>j.includes("image"),He=j=>j>1e6;return new Promise((j,he)=>{var De,nt;if(U)if(ae(J),!ke(U.type))k.value=!0,A.value=typeof r.validatorMessage!="string"&&((De=r.validatorMessage)!=null&&De.invalidFormat)?r.validatorMessage.invalidFormat:"Tipe file harus berupa gambar!",M(),y.value=!1,Ie(J),he("Tipe file harus berupa gambar!");else if(He(U.size))k.value=!0,A.value=typeof r.validatorMessage!="string"&&((nt=r.validatorMessage)!=null&&nt.exceed)?r.validatorMessage.exceed:"Ukuran gambar terlalu besar! Maks. 1 MB",M(),y.value=!1,Ie(J),he("Ukuran gambar terlalu besar! Maks. 1 MB");else{Ie(J);const St=URL.createObjectURL(U),lt=new FileReader;lt.onload=bt=>{var jt;a.value[J].src=St,a.value[J].type=me((jt=bt==null?void 0:bt.target)==null?void 0:jt.result,U.type)},lt.onerror=bt=>{console.error("🚀 ~ returnnewPromise ~ e:",bt)},lt.readAsArrayBuffer(U),v.value==null&&(v.value=J),y.value||(y.value=!0),k.value=!1,A.value=void 0}w.value+=1,m.value=j})},ve=()=>{r.useValidator&&Object.assign(b,Nn(r.fieldName,U=>{var J;return!U&&r.mandatory?typeof r.validatorMessage!="string"&&((J=r.validatorMessage)!=null&&J.empty)?r.validatorMessage.empty:(r.label??"Photo")+" must be uploaded":r.invalid&&r.validatorMessage?r.validatorMessage:A.value?A.value:!0}))},ae=U=>{a.value[U]={src:null,type:null}},me=(U,J=null)=>{if(U){const ke=new Uint8Array(U).subarray(0,4);let He="";for(const j of ke)He+=j.toString(16);switch(He){case"89504e47":return"image/png";case"47494638":return"image/gif";case"ffd8ffe0":case"ffd8ffe1":case"ffd8ffe2":case"ffd8ffe3":case"ffd8ffe8":return I.value;default:return J}}return null},se=U=>{const J=pD(U.split(",")[1],I.value);return window.URL.createObjectURL(J)},Pe=async(U,J)=>{const ke=await fetch(U).then(He=>He.blob());return new File([ke],J,{type:I.value})},Be=async()=>{const U=v.value??0;try{await de(U)}catch(J){console.error(J)}xe()},xe=()=>{var U;y.value=!1,(U=m.value)==null||U.call(m),m.value=void 0},de=async U=>{if(h.value){const J=h.value.getResult();if(J.canvas){const ke=J.canvas.toDataURL(I.value);await ge(ke,U)}}},ge=async(U,J)=>{try{c.value=document.createElement("canvas");const ke=c.value.getContext("2d"),He=new Image;He.src=U,await He.decode();const j=80/100,he=He.width*j,De=He.height*j;c.value.setAttribute("width",he.toString()),c.value.setAttribute("height",De.toString()),ke&&ke.drawImage(He,0,0,he,De);const nt=c.value.toDataURL(I.value,.95),St=Date.now()+`.${r.fileType}`,lt={canvas:c.value,compressed:{blob:se(nt),base64:nt,fileName:St,file:await Pe(se(nt),St),size:"",type:I.value},message:"File has been compressed."};lt.compressed.size=Math.round(lt.compressed.file.size/1e3)+"KB",d.value[J]=lt.compressed.blob,r.multiple?b.value&&Array.isArray(b.value)?b.value[J]=lt.compressed.file:b.value=[lt.compressed.file]:b.value=lt.compressed.file,o("apply",lt)}catch(ke){console.error(ke)}},Ie=U=>{a.value[U].src&&URL.revokeObjectURL(a.value[U].src)},Oe=U=>{r.confirmOnDelete?C.value[U]=!0:r.emitDeleteFn?o("delete",le,U):le(U)},le=(U=0)=>{k.value=!1,A.value=void 0,d.value=d.value.toSpliced(U,1),Ie(U),a.value[U]={src:null,type:null},a.value=[a.value[+!U],a.value[U]],v.value=0,S.value=0,r.confirmOnDelete||o("delete"),r.multiple&&Array.isArray(b.value)?b.value=b.value.toSpliced(U,1):b.handleReset&&b.handleReset()},Se=U=>{var ke;const J=(ke=d.value[U])==null?void 0:ke.toString();v.value=U,J!=null&&J.includes("blob")?(v.value=U,y.value=!0):(ae(U),$())},Z=()=>{$()},q=X(()=>navigator.userAgent.includes("Firefox"));return $e(()=>b.value,U=>{(U instanceof File||Array.isArray(U)&&U.some(J=>J instanceof File))&&o("update:fieldValue",U)}),$e(A,U=>{U&&b.setErrors&&b.setErrors(U)}),$e(y,U=>{U||p.value++}),$e(()=>r.initialName,()=>{M()}),$e(()=>r.imagePreviewUrl,()=>{M()},{once:!0}),e({assignPreviewImagesFromProp:M}),(U,J)=>(g(),O(ue,null,[L(pi,{class:pe([{"!w-max":!r.multiple,"!w-full":r.multiple}]),info:r.fieldInfo,label:r.label,mandatory:r.mandatory,"data-wv-name":"image-compressor","data-wv-section":"root"},{default:H(()=>[E("div",{class:pe(["w-full",{"grid gap-6 items-start grid-cols-2":U.multiple&&U.type==="normal"},{"grid gap-3 items-start grid-cols-[max-content,max-content]":U.multiple&&U.type==="inline-table"}]),"data-wv-section":"wrapper"},[d.value.length?(g(!0),O(ue,{key:0},Je(d.value,(ke,He)=>{var j;return g(),O("div",{key:He,class:pe([[{"items-start":U.type==="normal"},{"items-center":U.type==="inline-table"}],"flex gap-1"]),"data-wv-section":"preview"},[E("div",{class:pe(["flex gap-1 items-center",{"max-w-[80px]":U.imagePreviewSize==="medium"},{"max-w-[125px]":U.imagePreviewSize==="big"},{"flex-col":U.type==="normal"}]),"data-wv-section":"preview-image-wrapper"},[E("div",{class:pe([{"[&>span]:hover:opacity-30 [&>[data-wv-section=input-image-trigger]]:hover:opacity-100":R(He)},"relative",{"w-[125px] h-[125px]":U.imagePreviewSize==="big"&&U.type==="normal","w-[30px] h-[30px]":U.imagePreviewSize==="small"||U.type==="inline-table","w-[80px] h-[80px]":U.imagePreviewSize==="medium"&&U.type==="normal"}]),"data-wv-section":"image-wrapper"},[L(hr,{class:pe([{"w-[30px] h-[30px]":U.type==="inline-table"},"transition-opacity duration-300"]),rounded:U.rounded,size:U.type==="normal"?U.imagePreviewSize:"small",src:ke,"data-wv-section":"preview-image"},null,8,["class","rounded","size","src"]),R(He)?(g(),O("button",{key:0,class:pe([(j=x(i))==null?void 0:j.button.class,"hover:bg-opacity-0 rounded-lg opacity-0"]),onClick:J[0]||(J[0]=he=>$(!1)),"data-wv-section":"input-image-trigger",type:"button"},[L(Ee,{class:"w-6 h-6","data-wv-section":"trigger-icon",icon:"image-add",severity:"primary"})],2)):B("",!0)],2),!r.disabled&&!R(He)?(g(),O(ue,{key:0},[E("div",{class:pe(["flex gap-0.5 justify-center",{"scale-75":U.imagePreviewSize==="medium"}]),"data-wv-section":"preview-buttons"},[U.type==="normal"?(g(),O(ue,{key:0},[L(We,{onClick:he=>Se(He),class:"!py-0 !px-1 !h-max",icon:"pencil",label:"Edit",text:""},null,8,["onClick"]),U.useDeleteButton?(g(),P(We,{key:0,onClick:he=>Oe(He),class:"!py-0 !px-1 !h-max",icon:"delete-bin",label:"Delete",severity:"danger",text:""},null,8,["onClick"])):B("",!0)],64)):(g(),O(ue,{key:1},[L(Ee,{onClick:he=>Se(He),class:"text-xs p-0.5 rounded-xs mr-1",icon:"pencil",severity:"primary"},null,8,["onClick"]),L(Ee,{onClick:he=>Oe(He),class:"text-xs p-0.5 rounded-xs",icon:"delete-bin",severity:"danger"},null,8,["onClick"])],64))],2),L(or,{visible:C.value[He],"onUpdate:visible":he=>C.value[He]=he,closable:!1,onConfirm:he=>o("delete",le,He),body:"Are you sure you want to delete it?","confirm-label":"Delete",header:"Delete Photo",severity:"danger"},null,8,["visible","onUpdate:visible","onConfirm"])],64)):B("",!0)],2),U.type==="normal"?(g(),P(aA,{key:0,"custom-requirements":U.customRequirements,"show-add-button":d.value.length===1&&r.multiple,"show-info":U.showInfo,onAddPhoto:J[2]||(J[2]=he=>$(!0))},{default:H(()=>[d.value.length===2&&r.multiple?(g(),P(Wx,{key:0,modelValue:S.value,"onUpdate:modelValue":J[1]||(J[1]=he=>S.value=he),"label-id":"default-"+He,value:He,label:"Set as default"},null,8,["modelValue","label-id","value"])):B("",!0)]),_:2},1032,["custom-requirements","show-add-button","show-info"])):B("",!0),U.multiple&&d.value.length==1&&U.type==="inline-table"?(g(),P(We,{key:1,onClick:J[3]||(J[3]=he=>$(!0)),icon:"add",label:"Photo",text:""})):B("",!0)],2)}),128)):U.type!="inline-table"?(g(),O("div",YD,[E("button",{class:pe([{"w-[125px] h-[125px]":U.imagePreviewSize==="big","w-[30px] h-[30px]":U.imagePreviewSize==="small","w-[80px] h-[80px]":U.imagePreviewSize==="medium"},"flex items-center justify-center","ring-inset","cursor-pointer",{"ring-1":q.value,"ring-[0.5px]":!q.value},{"rounded-full":U.rounded,"rounded-lg":!U.rounded},{"ring-general-400 focus-visible:ring-primary-500":!k.value&&!b.errorMessage,"ring-danger-500":k.value||b.errorMessage},{"bg-white":!r.disabled,"bg-general-50":r.disabled}]),onClick:J[4]||(J[4]=ke=>$(!1)),"data-wv-section":"input-image-trigger",type:"button"},[L(Ee,{class:"w-6 h-6","data-wv-section":"trigger-icon",icon:"image-add",severity:"primary"})],2),L(aA,{"custom-requirements":U.customRequirements,"show-info":U.showInfo},null,8,["custom-requirements","show-info"])])):B("",!0)],2),(g(),O("input",{id:U.fieldName,key:p.value,ref_key:"inputImageFile",ref:f,multiple:r.multiple&&!d.value.length,onChange:W,accept:"image/*",class:"hidden","data-wv-section":"hidden-image-input",type:"file"},null,40,QD)),U.type==="inline-table"&&!d.value.length?(g(),O("label",{key:0,for:U.fieldName,class:"inline-flex items-center cursor-pointer"},J[6]||(J[6]=[E("span",{class:"inline-flex items-center text-body-medium rounded-bl rounded-tl bg-general-50 px-3 h-[26px] border-[0.5px] border-general-200"}," Browse ",-1),E("span",{class:"inline-flex items-center text-body-medium !text-general-200 !font-light rounded-br rounded-tr px-3 h-[26px] leading-4 border-[0.5px] border-l-0 border-general-200"}," Select File ",-1)]),8,eR)):B("",!0),U.showValidatorMessage?(g(),P(Fn,{key:1,format:!1,message:b.errorMessage??A.value},null,8,["message"])):B("",!0),r.multiple?(g(),P(GD,{key:2,value:S.value?"secondImage":"firstImage","field-name":"defaultImage"},null,8,["value"])):B("",!0)]),_:1},8,["class","info","label","mandatory"]),L(rr,{visible:y.value,"onUpdate:visible":J[5]||(J[5]=ke=>y.value=ke),draggable:!1,header:x(s).cropDialogHeader,class:"w-max max-w-[98vw] min-w-[min(500px,98vw)] !max-h-[94vh]","content-class":"overflow-hidden overflow-y-auto min-h-[100px]","data-wv-section":"dialog-cropper","footer-class":"!gap-1",modal:""},{footer:H(()=>[L(We,{label:x(s).cancelCropLabel,onClick:xe,"data-wv-section":"cancel-crop",severity:"secondary",text:"",type:"button"},null,8,["label"]),L(We,{label:x(s).changeImageLabel,onClick:Z,"data-wv-section":"change-image-button",text:"",type:"button"},null,8,["label"]),L(We,{label:x(s).applyCropLabel,onClick:Be,"data-wv-section":"apply-image-button",severity:"success",type:"button"},null,8,["label"])]),default:H(()=>[v.value!=null?(g(),P(x(sA),{key:0,ref_key:"vueAdvanceCropper",ref:h,"auto-zoom":!1,"background-wrapper-component":ZD,src:a.value[v.value].src,class:"upload-example-cropper h-400","foreground-class":"h-400","image-class":"h-400"},null,8,["src"])):B("",!0)]),_:1},8,["visible","header"])],64))}})),nR=["id","disabled","placeholder"],eG=ce("InputBadge",Ae({__name:"InputBadge",props:{type:{default:"text"},modelValue:{},initialValue:{},useValidator:{type:Boolean},existingValues:{},mandatory:{type:Boolean},validatorMessage:{},showValidatorMessage:{type:Boolean,default:!0},invalid:{type:Boolean},fieldName:{default:"inputBadge"},placeholder:{},disabled:{type:Boolean},label:{},fieldInfo:{},preserveDeletedIndex:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e;wt(()=>{var w,y;n.useValidator&&(Object.assign(l,Nn(n.fieldName,C=>Et(()=>f(C)))),(w=n.initialValue)!=null&&w.length?l.value=n.initialValue:(y=n.modelValue)!=null&&y.length&&(l.value=n.modelValue))}),Bi(()=>{n.useValidator&&l.handleReset()});const r=dt("preset",{}).inputbadge,o=re(null),s=re(),a=oe(),l=hn({value:n.initialValue??n.modelValue??[]}),u=X(()=>{var w;return((w=n.label)==null?void 0:w.toLowerCase)+"-badge-input"}),c=X(()=>n.invalid&&typeof n.validatorMessage=="string"?n.validatorMessage:l.errorMessage),d=X(()=>n.placeholder?n.placeholder:n.type==="email"?"Enter valid email":"Enter value"),f=w=>{var y;if(typeof n.validatorMessage=="string"&&n.invalid)return n.validatorMessage;if(typeof n.validatorMessage!="string"){const{empty:C,exist:I}=n.validatorMessage??{};if(!(w!=null&&w.length)&&n.mandatory)return C??!0;if((y=n.existingValues)!=null&&y.length||I){let R=!0;return w.forEach(M=>{const D=w.filter($=>$===M);(n.existingValues.includes(M)||D.length>1)&&(R=I)}),R}}return!0},p=X(()=>{var w;return n.invalid||!!l.errorMessage||!((w=l.value)!=null&&w.length)&&typeof a.value=="string"&&!a.value.length}),h=X(()=>{var w,y;return!!((y=(w=l.value)==null?void 0:w.filter(Boolean))!=null&&y.length)}),m=w=>/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(w),v=()=>{a.value&&(l.value=[...l.value??[],a.value],a.value=void 0,i("update:modelValue",l.value))},S=w=>{if(n.type==="email"&&o.value&&s.value&&a.value&&!m(a.value)){s.value.show(w,o.value);return}v()},b=w=>{var y;(y=l.value)==null||y.splice(w,1,...n.preserveDeletedIndex?[null]:[]),l.value=io(l.value)},k=w=>{var y,C;w.key==="Backspace"&&!a.value&&(w.preventDefault(),n.type==="text"?a.value=(y=l.value)==null?void 0:y.pop():(C=l.value)==null||C.pop(),l.value=io(l.value))},A=(w,y)=>{l.value&&w&&(l.value[y]=w,l.value=io(l.value),i("update:modelValue",l.value))};return $e(()=>n.initialValue,w=>{w&&(l.value=w)},{once:!0}),$e(()=>n.modelValue,w=>{w&&(l.value=w)}),n.preserveDeletedIndex&&Aa(()=>{var w,y;(w=l.value)!=null&&w.length&&((y=l.value)!=null&&y.every(C=>C==null))&&(l.value=[])}),(w,y)=>(g(),P(pi,{info:w.fieldInfo,label:n.label,mandatory:n.mandatory},{default:H(()=>{var C,I;return[E("div",T((C=x(r))==null?void 0:C.root({context:{invalidInput:p.value,disabled:w.disabled}}),{"data-wv-name":"inputbadge","data-wv-section":"root"}),[(g(!0),O(ue,null,Je(l.value,(R,M)=>(g(),O(ue,{key:R},[R?(g(),P(Pt,{key:0,label:R,onRemove:()=>{var D;(D=o.value)==null||D.focus(),b(M)},"onUpdate:label":D=>A(D,M),editable:"",format:"nowrap",removable:"",severity:"dark"},null,8,["label","onRemove","onUpdate:label"])):B("",!0)],64))),128)),E("form",{onSubmit:Ot(S,["prevent"]),class:"flex-1","data-wv-section":"form-input"},[ft(E("input",T({id:u.value,ref_key:"badgeInput",ref:o,"onUpdate:modelValue":y[0]||(y[0]=R=>a.value=R)},(I=x(r))==null?void 0:I.input({context:{disabled:w.disabled,value:l.value,showPlaceholder:h.value},parent:w.$parent,props:n}),{disabled:w.disabled,placeholder:d.value,onBlur:S,onFocus:y[1]||(y[1]=R=>{var M;return(M=s.value)==null?void 0:M.hide()}),onInput:y[2]||(y[2]=R=>{var M;return(M=s.value)==null?void 0:M.hide()}),onKeydown:k,"data-wv-section":"input",type:"text"}),null,16,nR),[[qd,a.value]]),L(Zu,T({ref_key:"op",ref:s},x(r).erroroverlaypanel,{dismissable:!1}),{default:H(()=>[L(Ee,T(x(r).erroricon,{icon:"error"}),null,16),y[3]||(y[3]=ht(" Email format is incorrect "))]),_:1,__:[3]},16)],32)],16),n.showValidatorMessage?(g(),P(Fn,{key:0,message:c.value},null,8,["message"])):B("",!0)]}),_:1},8,["info","label","mandatory"]))}})),lA=ce("InputNumber",Ae({__name:"InputNumber",props:{modelValue:{},value:{},existingValues:{},label:{},min:{},max:{},maxDigit:{default:16},padStart:{default:0},useValidator:{type:Boolean},fieldName:{},mandatory:{type:Boolean},validatorMessage:{},showValidatorMessage:{type:Boolean,default:!0},placeholder:{},disabled:{type:Boolean},invalid:{type:Boolean},showButtons:{type:Boolean},size:{},mode:{},currency:{},locale:{},prefix:{},suffix:{},minFractionDigits:{default:0},maxFractionDigits:{default:2},useGrouping:{type:Boolean},fieldInfo:{},tooltipPos:{},addonVariant:{default:"filled"},addonLeftClass:{},addonRightClass:{},inputGroupClass:{},inputNumberClass:{},inputId:{},autoResize:{type:Boolean},allowEmptyValue:{type:Boolean,default:!0}},emits:["update:modelValue","input"],setup(t,{emit:e}){const n=t,i=e,r=wa(),o=dt("preset",{}).inputgroupaddon,{locale:s}=Zt("InputNumber"),a=dt("preset",{}).inputnumber,l=oe(0),u=re(),c=hn({value:n.value??n.modelValue}),d=X(()=>{var y,C;return n.placeholder??((C=s.defaultPlaceholder)==null?void 0:C.replace("{label}",n.label?(y=n.label)==null?void 0:y.toLowerCase():""))});wt(()=>{n.useValidator&&Object.assign(c,Nn(n.fieldName??"numberInput",I=>Et(()=>h(I))));const y=n.value??n.modelValue,C=y!=null?w(y):y;C!=null&&n.allowEmptyValue?c.value=C:n.allowEmptyValue||(c.value=C??n.min??0),n.invalid&&n.useValidator&&c.validate()});const f=X(()=>n.invalid||!!c.errorMessage),p=X(()=>n.inputId?n.inputId:(n.label??n.fieldName??"input-number").toLowerCase().trim().replaceAll(" ","-")+"-inputnumber"),h=y=>{var I,R;const C=y!=null&&typeof y=="number";if(n.invalid&&typeof n.validatorMessage=="string")return n.validatorMessage;if(typeof n.validatorMessage!="string"){const{empty:M,exist:D}=n.validatorMessage??{};if(y==null&&n.mandatory)return M??s.emptyInvalidText.replace("{label}",n.label);if(C&&((I=n.existingValues)!=null&&I.includes(y)))return D??((R=s.alreadyExistInvalidText)==null?void 0:R.replace("{label}",n.label))}return!0},m=()=>{l.value++,Et(()=>{var I;const y=(I=u.value)==null?void 0:I.$el,C=y==null?void 0:y.querySelector("input");C==null||C.focus()})},v=(y,C)=>{const I=C==="input"?y.value:y;let M=(()=>{if(I!=null)return I!=="-"?+I:I})();if(M!=null&&!isNaN(+M))M=I!=null?+I:void 0,S(C,M);else if(M==null&&typeof M!="string"){const D=n.allowEmptyValue?M:M??n.min??0;c.value=D,C==="input"?(!n.allowEmptyValue&&u.value&&m(),i("input",D)):i("update:modelValue",D)}},S=(y,C)=>{const I=typeof C=="number"?b(C):!1;let R=C==null?void 0:C.toString().slice(0,C<0?n.maxDigit+1:n.maxDigit);R!=null&&(R=+(R??0)),c.value=I?+(R??0):C,I&&m(),i(y==="input"?"input":"update:modelValue",I?+(R??0):C)},b=y=>y!=null&&y.toString().length>(n.maxDigit>16?16:n.maxDigit),k=()=>{const y=+(c.value??0)+1;(n.max&&n.max>=y||n.max==null)&&v(y,"modelValue")},A=()=>{const y=+(c.value??0)-1;(n.min&&n.min<=y||n.min==null)&&v(y,"modelValue")},w=y=>n.min&&y<n.min?n.min:n.max&&y>n.max?n.max:y;return $e(()=>n.value,y=>{const C=y!=null?w(y):y;b(C)||(c.value=C)},{once:!0}),$e(()=>n.modelValue,y=>{const C=y!=null?w(y):y;b(C)||(c.value=C)}),(y,C)=>(g(),P(pi,{info:y.fieldInfo,label:n.label,mandatory:n.mandatory,"tooltip-pos":y.tooltipPos},In({default:H(()=>[L(fo,{class:pe(["grid ",{"grid-cols-[max-content,1fr,max-content]":r["addon-left"]&&r["addon-right"]||y.showButtons,"grid-cols-[1fr,max-content]":!r["addon-left"]&&r["addon-right"],"grid-cols-[max-content,1fr]":r["addon-left"]&&!r["addon-right"]},{"w-max":y.autoResize},y.inputGroupClass]),disabled:n.disabled,invalid:f.value},{default:H(()=>[r["addon-left"]||n.showButtons?(g(),P(x(Yo),{key:0,class:pe([y.addonLeftClass,{"cursor-pointer":n.showButtons}]),disabled:y.disabled,pt:{root:x(o).root({props:n})},onClick:C[0]||(C[0]=I=>n.showButtons&&!n.disabled?A():void 0)},{default:H(()=>[Q(y.$slots,"addon-left",{},()=>[L(Ee,T(x(a).decrementicon({props:n}),{icon:"subtract"}),null,16)])]),_:3},8,["class","disabled","pt"])):B("",!0),E("span",{class:pe(["relative",{"w-max":y.autoResize}]),"data-wv-section":"autoresizeinputwrapper"},[y.autoResize?(g(),O("span",T({key:0,"data-wv-section":"inputresizer"},x(a).inputresizer),_((c.value??"").toString().padStart(y.padStart,"0")),17)):B("",!0),(g(),P(x(yl),T({key:l.value,ref_key:"inputNumber",ref:u},n,{class:[y.inputNumberClass,{"absolute left-0 top-0":y.autoResize}],"input-id":p.value,"model-value":c.value,placeholder:y.autoResize?"":d.value,"show-buttons":!1,onInput:C[1]||(C[1]=I=>v(I,"input")),"onUpdate:modelValue":C[2]||(C[2]=I=>v(I,"modelValue"))}),null,16,["class","input-id","model-value","placeholder"]))],2),r["addon-right"]||n.showButtons?(g(),P(x(Yo),{key:1,class:pe([y.addonRightClass,{"cursor-pointer":n.showButtons}]),disabled:y.disabled,pt:{root:x(o).root({props:n})},onClick:C[3]||(C[3]=I=>n.showButtons&&!y.disabled?k():void 0)},{default:H(()=>[Q(y.$slots,"addon-right",{},()=>[L(Ee,T(x(a).incrementicon({props:n}),{icon:"add"}),null,16)])]),_:3},8,["class","disabled","pt"])):B("",!0)]),_:3},8,["class","disabled","invalid"]),Q(y.$slots,"validatormessage",{},()=>[n.showValidatorMessage?(g(),P(Fn,{key:0,message:c.errorMessage},null,8,["message"])):B("",!0)])]),_:2},[r["field-label-addon"]?{name:"label-addon",fn:H(()=>[Q(y.$slots,"field-label-addon")]),key:"0"}:void 0]),1032,["info","label","mandatory","tooltip-pos"]))}})),tG=ce("InputCurrency",Ae({__name:"InputCurrency",props:{modelValue:{},value:{},label:{},max:{},useValidator:{type:Boolean},fieldName:{},mandatory:{type:Boolean},validatorMessage:{},invalid:{type:Boolean},placeholder:{},disabled:{type:Boolean},showButtons:{type:Boolean},size:{},mode:{},useGrouping:{type:Boolean},fieldInfo:{},inputnNumberId:{}},emits:["update:modelValue","input"],setup(t,{emit:e}){var k,A;const n=t,i=e;wt(()=>{n.useValidator&&(Object.assign(f,Nn(n.fieldName??"currencyInput",w=>{var y;return!(w!=null&&w.value)&&n.mandatory?typeof n.validatorMessage=="object"&&"empty"in n.validatorMessage?n.validatorMessage.empty.replace("{label}",n.label):(y=r.emptyInputErrorMessage)==null?void 0:y.replace("{label}",n.label):!0})),n.modelValue&&(f.value=n.modelValue))});const{locale:r}=Zt("InputCurrency"),{locale:o}=Zt("Dropdown"),{dropdown:s={},inputcurrency:a={}}=dt("preset",{}),l=oe(!1),u=oe((k=n.modelValue)==null?void 0:k.value),c=navigator.userAgent.includes("Firefox"),d=oe(kf((A=n.modelValue)==null?void 0:A.currency)),f=hn({value:n.modelValue}),p=oe(ny),h=X(()=>{var w;return(w=d.value)==null?void 0:w.locale}),m=X(()=>n.inputnNumberId?n.inputnNumberId:(n.label??n.fieldName??"input-number").toLowerCase().trim().replaceAll(" ","-")+"-inputnumber"),v=X(()=>n.invalid||!!f.errorMessage),S=({currency:w},y)=>{const C={currency:w,value:y};i("update:modelValue",C),f.value=C},b=()=>{Et(()=>{const w=document.getElementById(m.value);w&&w.focus()})};return $e(()=>n.modelValue,()=>{var w,y,C;d.value=(w=n.modelValue)!=null&&w.currency?kf((y=n.modelValue)==null?void 0:y.currency):d.value,f.value=n.modelValue,u.value=(C=n.modelValue)==null?void 0:C.value}),(w,y)=>(g(),P(lA,T(n,{modelValue:u.value,"onUpdate:modelValue":[y[4]||(y[4]=C=>u.value=C),y[5]||(y[5]=C=>S(d.value,C))],"input-id":m.value,"input-number-class":x(a).value({isFirefoxBased:x(c),invalidInput:v.value}).class,locale:h.value,"min-fraction-digits":0,"use-validator":!1,"addon-left-class":"!p-0 !bg-transparent","input-group-class":"!ring-0",mode:"decimal","use-grouping":""}),{"addon-left":H(()=>[L(x(Vr),{modelValue:d.value,"onUpdate:modelValue":[y[0]||(y[0]=C=>d.value=C),y[3]||(y[3]=C=>S(C,u.value))],class:pe(x(a).currency({isFirefoxBased:x(c),invalidInput:v.value}).class),"filter-fields":["label","currency"],"filter-placeholder":x(o).filterPlaceholder,options:p.value,pt:{input:{class:["py-1 pl-3 pr-0.5",x(s).input({props:{modelValue:d.value}}).class]}},onHide:y[1]||(y[1]=C=>(l.value=!1,b())),onShow:y[2]||(y[2]=C=>l.value=!0),"data-key":"currency",filter:"","option-label":"symbol"},{dropdownicon:H(()=>[L(Ee,it(kt(x(s).dropdownicon({state:{isShowOverlay:l.value}}))),null,16)]),option:H(({option:C})=>[ht(_(C.label),1)]),_:1},8,["modelValue","class","filter-placeholder","options","pt"])]),validatormessage:H(()=>[L(Fn,{message:f.errorMessage},null,8,["message"])]),_:1},16,["modelValue","input-id","input-number-class","locale"]))}})),nG=ce("InputEmail",Ae({__name:"InputEmail",props:{allowedCharacters:{},autoUppercase:{type:Boolean},modelValue:{},value:{},existingValues:{},checkAvailability:{},maxLength:{},label:{},useValidator:{type:Boolean},fieldName:{},mandatory:{type:Boolean},invalid:{type:Boolean},manualInvalidContainer:{type:Boolean},validatorMessage:{},validatorMessageClass:{},placeholder:{},disabled:{type:Boolean},fieldInfo:{},inputClass:{},inputContainerClass:{},labelClass:{},blurOnReachMaxLength:{type:Boolean},preventInputOnMaxLength:{type:Boolean},validateOnBlur:{type:Boolean},useProtocol:{type:Boolean,default:!0},allowSpecialCharacters:{type:Boolean,default:!0},useInputGroup:{type:Boolean,default:!0},inputId:{}},emits:["update:modelValue","blur","input"],setup(t){return(e,n)=>(g(),P(Ks,T({onBlur:n[0]||(n[0]=i=>e.$emit("blur",i)),onInput:n[1]||(n[1]=i=>e.$emit("input",i)),"onUpdate:modelValue":n[2]||(n[2]=i=>e.$emit("update:modelValue",i))},e.$props,{type:"email","validate-on-blur":""}),null,16))}})),iG=ce("InputOtp",Ae({__name:"InputOtp",props:{disabled:{type:Boolean},integerOnly:{type:Boolean},invalid:{type:Boolean},length:{},mask:{type:Boolean},modelValue:{},onBlur:{type:Function},onChange:{type:Function},onCompleted:{type:Function},onFocus:{type:Function},"onUpdate:modelValue":{type:Function},pt:{},readonly:{type:Boolean},variant:{}},setup(t){return(e,n)=>(g(),P(x(F9),T(e.$props,{onVnodeBeforeMount:n[0]||(n[0]=i=>x(m1)("WANGS-INPUT-OTP",e.$preset.inputotp))}),null,16))}}));var uA={name:"EyeSlashIcon",extends:vn},iR=E("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.9414 6.74792C13.9437 6.75295 13.9455 6.757 13.9469 6.76003C13.982 6.8394 14.0001 6.9252 14.0001 7.01195C14.0001 7.0987 13.982 7.1845 13.9469 7.26386C13.6004 8.00059 13.1711 8.69549 12.6674 9.33515C12.6115 9.4071 12.54 9.46538 12.4582 9.50556C12.3765 9.54574 12.2866 9.56678 12.1955 9.56707C12.0834 9.56671 11.9737 9.53496 11.8788 9.47541C11.7838 9.41586 11.7074 9.3309 11.6583 9.23015C11.6092 9.12941 11.5893 9.01691 11.6008 8.90543C11.6124 8.79394 11.6549 8.68793 11.7237 8.5994C12.1065 8.09726 12.4437 7.56199 12.7313 6.99995C12.2595 6.08027 10.3402 2.8014 6.99732 2.8014C6.63723 2.80218 6.27816 2.83969 5.92569 2.91336C5.77666 2.93304 5.62568 2.89606 5.50263 2.80972C5.37958 2.72337 5.29344 2.59398 5.26125 2.44714C5.22907 2.30031 5.2532 2.14674 5.32885 2.01685C5.40451 1.88696 5.52618 1.79021 5.66978 1.74576C6.10574 1.64961 6.55089 1.60134 6.99732 1.60181C11.5916 1.60181 13.7864 6.40856 13.9414 6.74792ZM2.20333 1.61685C2.35871 1.61411 2.5091 1.67179 2.6228 1.77774L12.2195 11.3744C12.3318 11.4869 12.3949 11.6393 12.3949 11.7983C12.3949 11.9572 12.3318 12.1097 12.2195 12.2221C12.107 12.3345 11.9546 12.3976 11.7956 12.3976C11.6367 12.3976 11.4842 12.3345 11.3718 12.2221L10.5081 11.3584C9.46549 12.0426 8.24432 12.4042 6.99729 12.3981C2.403 12.3981 0.208197 7.59135 0.0532336 7.25198C0.0509364 7.24694 0.0490875 7.2429 0.0476856 7.23986C0.0162332 7.16518 3.05176e-05 7.08497 3.05176e-05 7.00394C3.05176e-05 6.92291 0.0162332 6.8427 0.0476856 6.76802C0.631261 5.47831 1.46902 4.31959 2.51084 3.36119L1.77509 2.62545C1.66914 2.51175 1.61146 2.36136 1.61421 2.20597C1.61695 2.05059 1.6799 1.90233 1.78979 1.79244C1.89968 1.68254 2.04794 1.6196 2.20333 1.61685ZM7.45314 8.35147L5.68574 6.57609V6.5361C5.5872 6.78938 5.56498 7.06597 5.62183 7.33173C5.67868 7.59749 5.8121 7.84078 6.00563 8.03158C6.19567 8.21043 6.43052 8.33458 6.68533 8.39089C6.94014 8.44721 7.20543 8.43359 7.45314 8.35147ZM1.26327 6.99994C1.7351 7.91163 3.64645 11.1985 6.99729 11.1985C7.9267 11.2048 8.8408 10.9618 9.64438 10.4947L8.35682 9.20718C7.86027 9.51441 7.27449 9.64491 6.69448 9.57752C6.11446 9.51014 5.57421 9.24881 5.16131 8.83592C4.74842 8.42303 4.4871 7.88277 4.41971 7.30276C4.35232 6.72274 4.48282 6.13697 4.79005 5.64041L3.35855 4.2089C2.4954 5.00336 1.78523 5.94935 1.26327 6.99994Z",fill:"currentColor"},null,-1),rR=[iR];function oR(t,e,n,i,r,o){return g(),O("svg",T({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),rR,16)}uA.render=oR;var sR={root:function(e){var n=e.props;return{position:n.appendTo==="self"?"relative":void 0}}},aR={root:function(e){var n=e.instance,i=e.props;return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":n.filled,"p-inputwrapper-focus":n.focused,"p-icon-field p-icon-field-right":i.toggleMask}]},input:function(e){var n=e.props;return["p-password-input",{"p-disabled":n.disabled}]},hideIcon:"p-input-icon",showIcon:"p-input-icon",panel:function(e){var n=e.instance;return["p-password-panel p-component",{"p-ripple-disabled":n.$primevue.config.ripple===!1}]},meter:"p-password-meter",meterLabel:function(e){var n=e.instance;return"p-password-strength ".concat(n.meter?n.meter.strength:"")},info:"p-password-info"},lR=Wt.extend({name:"password",classes:aR,inlineStyles:sR}),uR={name:"BasePassword",extends:It,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:[String,RegExp],default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:[String,RegExp],default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:[String,Object],default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:lR,provide:function(){return{$parentInstance:this}}},cA={name:"Password",extends:uR,inheritAttrs:!1,emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{id:this.$attrs.id,overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},watch:{"$attrs.id":function(e){this.id=e||Vn()}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.id=this.id||Vn(),this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(dn.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){dn.set("overlay",e,this.$primevue.config.zIndex.overlay),G.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){dn.clear(e)},alignOverlay:function(){this.appendTo==="self"?G.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=G.getOuterWidth(this.$refs.input.$el)+"px",G.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var n=0;return this.strongCheckRegExp.test(e)?n=3:this.mediumCheckRegExp.test(e)?n=2:e.length&&(n=1),n},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var n=e.target.value,i=this.checkPasswordStrength(n),r=i.meter,o=i.label;if(this.meter=r,this.infoText=o,e.code==="Escape"){this.overlayVisible&&(this.overlayVisible=!1);return}this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(!this.modelValue){this.meter=null,this.infoText=this.promptText;return}var e=this.checkPasswordStrength(this.modelValue),n=e.meter,i=e.label;this.meter=n,this.infoText=i,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength:function(e){var n=null,i=null;switch(this.testStrength(e)){case 1:n=this.weakText,i={strength:"weak",width:"33.33%"};break;case 2:n=this.mediumText,i={strength:"medium",width:"66.66%"};break;case 3:n=this.strongText,i={strength:"strong",width:"100%"};break;default:n=this.promptText,i=null;break}return{label:n,meter:i}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new Ls(this.$refs.input.$el,function(){e.overlayVisible&&(e.overlayVisible=!1)})),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!G.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){uo.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return this.modelValue!=null&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return this.id+"_panel"}},components:{PInputText:Qo,Portal:$r,EyeSlashIcon:uA,EyeIcon:vp}};function Tl(t){"@babel/helpers - typeof";return Tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tl(t)}function dA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function fA(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dA(Object(n),!0).forEach(function(i){cR(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dA(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function cR(t,e,n){return e=dR(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dR(t){var e=fR(t,"string");return Tl(e)=="symbol"?e:String(e)}function fR(t,e){if(Tl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Tl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var pR=["id"];function hR(t,e,n,i,r,o){var s=et("PInputText"),a=et("Portal");return g(),O("div",T({class:t.cx("root"),style:t.sx("root")},t.ptmi("root")),[L(s,T({ref:"input",id:t.inputId,type:o.inputType,class:[t.cx("input"),t.inputClass],style:t.inputStyle,value:t.modelValue,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,"aria-controls":t.panelProps&&t.panelProps.id||t.panelId||o.panelUniqueId,"aria-expanded":r.overlayVisible,"aria-haspopup":!0,placeholder:t.placeholder,required:t.required,disabled:t.disabled,variant:t.variant,invalid:t.invalid,onInput:o.onInput,onFocus:o.onFocus,onBlur:o.onBlur,onKeyup:o.onKeyUp,onInvalid:o.onInvalid},t.inputProps,{pt:t.ptm("input"),unstyled:t.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","disabled","variant","invalid","onInput","onFocus","onBlur","onKeyup","onInvalid","pt","unstyled"]),t.toggleMask&&r.unmasked?Q(t.$slots,"hideicon",{key:0,onClick:o.onMaskToggle,toggleCallback:o.onMaskToggle},function(){return[(g(),P(yt(t.hideIcon?"i":"EyeSlashIcon"),T({class:[t.cx("hideIcon"),t.hideIcon],onClick:o.onMaskToggle},t.ptm("hideIcon")),null,16,["class","onClick"]))]}):B("",!0),t.toggleMask&&!r.unmasked?Q(t.$slots,"showicon",{key:1,onClick:o.onMaskToggle,toggleCallback:o.onMaskToggle},function(){return[(g(),P(yt(t.showIcon?"i":"EyeIcon"),T({class:[t.cx("showIcon"),t.showIcon],onClick:o.onMaskToggle},t.ptm("showIcon")),null,16,["class","onClick"]))]}):B("",!0),E("span",T({class:"p-hidden-accessible","aria-live":"polite"},t.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),_(r.infoText),17),L(a,{appendTo:t.appendTo},{default:H(function(){return[L(Lr,T({name:"p-connected-overlay",onEnter:o.onOverlayEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},t.ptm("transition")),{default:H(function(){return[r.overlayVisible?(g(),O("div",T({key:0,ref:o.overlayRef,id:t.panelId||o.panelUniqueId,class:[t.cx("panel"),t.panelClass],style:t.panelStyle,onClick:e[0]||(e[0]=function(){return o.onOverlayClick&&o.onOverlayClick.apply(o,arguments)})},fA(fA({},t.panelProps),t.ptm("panel"))),[Q(t.$slots,"header"),Q(t.$slots,"content",{},function(){return[E("div",T({class:t.cx("meter")},t.ptm("meter")),[E("div",T({class:t.cx("meterLabel"),style:{width:r.meter?r.meter.width:""}},t.ptm("meterLabel")),null,16)],16),E("div",T({class:t.cx("info")},t.ptm("info")),_(r.infoText),17)]}),Q(t.$slots,"footer")],16,pR)):B("",!0)]}),_:3},16,["onEnter","onLeave","onAfterLeave"])]}),_:3},8,["appendTo"])],16)}cA.render=hR;const mR=["onClick"],gR=["onClick"],rG=ce("InputPassword",Ae({__name:"InputPassword",props:{modelValue:{},label:{},labelClass:{},inputContainerClass:{},mandatory:{type:Boolean},placeholder:{},feedback:{type:Boolean},fieldName:{},useValidator:{type:Boolean},invalid:{type:Boolean},validatorMessage:{},validatorMessageClass:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=dt("preset",{}).password,i=t,r=e,o=re(i.modelValue),s=hn({value:void 0}),a=X(()=>i.invalid||!!s.errorMessage);wt(()=>{i.useValidator&&(Object.assign(s,Nn(i.fieldName??"password",d=>Et(()=>l(d==null?void 0:d.trim())))),i.modelValue!=null&&(s.value=i.modelValue))});const l=d=>{if(typeof i.validatorMessage=="string"&&i.invalid)return i.validatorMessage;if(typeof i.validatorMessage!="string"){const{empty:f}=i.validatorMessage??{};if(!d&&i.mandatory)return f??!0}return!0},u=d=>{r("update:modelValue",d),i.useValidator&&(s.value=d)},c=d=>{const f=d.target;f.previousElementSibling&&f.previousElementSibling.tagName==="INPUT"&&f.previousElementSibling.focus()};return $e(()=>i.modelValue,d=>{o.value=d,s.value=d}),$e(()=>i.invalid,()=>{var d;(d=s.validate)==null||d.call(s)}),(d,f)=>(g(),P(pi,{label:i.label,"label-class":i.labelClass,mandatory:i.mandatory},{default:H(()=>[L(fo,{class:pe(i.inputContainerClass),invalid:a.value},{default:H(()=>[L(x(cA),{modelValue:o.value,"onUpdate:modelValue":[f[0]||(f[0]=p=>o.value=p),u],feedback:i.feedback,invalid:a.value,placeholder:i.placeholder,"toggle-mask":""},{showicon:H(({toggleCallback:p})=>{var h;return[E("button",{class:pe([(h=x(n))==null?void 0:h.showicon.class,"unset"]),onClick:m=>(p(),c(m))},[L(Ee,{icon:"eye"})],10,mR)]}),hideicon:H(({toggleCallback:p})=>{var h;return[E("button",{class:pe([(h=x(n))==null?void 0:h.showicon.class,"unset"]),onClick:m=>(p(),c(m))},[L(Ee,{icon:"eye-off"})],10,gR)]}),_:1},8,["modelValue","feedback","invalid","placeholder"])]),_:1},8,["class","invalid"]),L(Fn,{class:pe(i.validatorMessageClass),message:s.errorMessage},null,8,["class","message"])]),_:1},8,["label","label-class","mandatory"]))}})),vR={Andorra:"Andorra",Dubai:"United Arab Emirates",Kabul:"Afghanistan",Tirane:"Albania",Yerevan:"Armenia",Casey:"Antarctica",Davis:"Antarctica",Mawson:"Antarctica",Palmer:"Antarctica",Rothera:"Antarctica",Troll:"Antarctica",Vostok:"Antarctica",Buenos_Aires:"Argentina",Cordoba:"Argentina",Salta:"Argentina",Jujuy:"Argentina",Tucuman:"Argentina",Catamarca:"Argentina",La_Rioja:"Argentina",San_Juan:"Argentina",Mendoza:"Argentina",San_Luis:"Argentina",Rio_Gallegos:"Argentina",Ushuaia:"Argentina",Pago_Pago:"Samoa (American)",Vienna:"Austria",Lord_Howe:"Australia",Macquarie:"Australia",Hobart:"Australia",Melbourne:"Australia",Sydney:"Australia",Broken_Hill:"Australia",Brisbane:"Australia",Lindeman:"Australia",Adelaide:"Australia",Darwin:"Australia",Perth:"Australia",Eucla:"Australia",Baku:"Azerbaijan",Barbados:"Barbados",Dhaka:"Bangladesh",Brussels:"Belgium",Sofia:"Bulgaria",Bermuda:"Bermuda",La_Paz:"Bolivia",Noronha:"Brazil",Belem:"Brazil",Fortaleza:"Brazil",Recife:"Brazil",Araguaina:"Brazil",Maceio:"Brazil",Bahia:"Brazil",Sao_Paulo:"Brazil",Campo_Grande:"Brazil",Cuiaba:"Brazil",Santarem:"Brazil",Porto_Velho:"Brazil",Boa_Vista:"Brazil",Manaus:"Brazil",Eirunepe:"Brazil",Rio_Branco:"Brazil",Thimphu:"Bhutan",Minsk:"Belarus",Belize:"Belize",St_Johns:"Canada",Halifax:"Canada",Glace_Bay:"Canada",Moncton:"Canada",Goose_Bay:"Canada",Toronto:"Canada",Iqaluit:"Canada",Winnipeg:"Canada",Resolute:"Canada",Rankin_Inlet:"Canada",Regina:"Canada",Swift_Current:"Canada",Edmonton:"Canada",Cambridge_Bay:"Canada",Inuvik:"Canada",Dawson_Creek:"Canada",Fort_Nelson:"Canada",Whitehorse:"Canada",Dawson:"Canada",Vancouver:"Canada",Zurich:"Switzerland",Abidjan:"Côte d'Ivoire",Rarotonga:"Cook Islands",Santiago:"Chile",Coyhaique:"Chile",Punta_Arenas:"Chile",Easter:"Chile",Shanghai:"China",Urumqi:"China",Bogota:"Colombia",Costa_Rica:"Costa Rica",Havana:"Cuba",Cape_Verde:"Cape Verde",Nicosia:"Cyprus",Famagusta:"Cyprus",Prague:"Czech Republic",Berlin:"Germany",Santo_Domingo:"Dominican Republic",Algiers:"Algeria",Guayaquil:"Ecuador",Galapagos:"Ecuador",Tallinn:"Estonia",Cairo:"Egypt",El_Aaiun:"Western Sahara",Madrid:"Spain",Ceuta:"Spain",Canary:"Spain",Helsinki:"Finland",Fiji:"Fiji",Stanley:"Falkland Islands",Kosrae:"Micronesia",Faroe:"Faroe Islands",Paris:"France",London:"Britain (UK)",Tbilisi:"Georgia",Cayenne:"French Guiana",Gibraltar:"Gibraltar",Nuuk:"Greenland",Danmarkshavn:"Greenland",Scoresbysund:"Greenland",Thule:"Greenland",Athens:"Greece",South_Georgia:"South Georgia & the South Sandwich Islands",Guatemala:"Guatemala",Guam:"Guam",Bissau:"Guinea-Bissau",Guyana:"Guyana",Hong_Kong:"Hong Kong",Tegucigalpa:"Honduras","Port-au-Prince":"Haiti",Budapest:"Hungary",Jakarta:"Indonesia",Pontianak:"Indonesia",Makassar:"Indonesia",Jayapura:"Indonesia",Dublin:"Ireland",Jerusalem:"Israel",Kolkata:"India",Chagos:"British Indian Ocean Territory",Baghdad:"Iraq",Tehran:"Iran",Rome:"Italy",Jamaica:"Jamaica",Amman:"Jordan",Tokyo:"Japan",Nairobi:"Kenya",Bishkek:"Kyrgyzstan",Tarawa:"Kiribati",Kanton:"Kiribati",Kiritimati:"Kiribati",Pyongyang:"Korea (North)",Seoul:"Korea (South)",Almaty:"Kazakhstan",Qyzylorda:"Kazakhstan",Qostanay:"Kazakhstan",Aqtobe:"Kazakhstan",Aqtau:"Kazakhstan",Atyrau:"Kazakhstan",Oral:"Kazakhstan",Beirut:"Lebanon",Colombo:"Sri Lanka",Monrovia:"Liberia",Vilnius:"Lithuania",Riga:"Latvia",Tripoli:"Libya",Casablanca:"Morocco",Chisinau:"Moldova",Kwajalein:"Marshall Islands",Yangon:"Myanmar (Burma)",Ulaanbaatar:"Mongolia",Hovd:"Mongolia",Macau:"Macau",Martinique:"Martinique",Malta:"Malta",Mauritius:"Mauritius",Maldives:"Maldives",Mexico_City:"Mexico",Cancun:"Mexico",Merida:"Mexico",Monterrey:"Mexico",Matamoros:"Mexico",Chihuahua:"Mexico",Ciudad_Juarez:"Mexico",Ojinaga:"Mexico",Mazatlan:"Mexico",Bahia_Banderas:"Mexico",Hermosillo:"Mexico",Tijuana:"Mexico",Kuching:"Malaysia",Maputo:"Mozambique",Windhoek:"Namibia",Noumea:"New Caledonia",Norfolk:"Norfolk Island",Lagos:"Nigeria",Managua:"Nicaragua",Kathmandu:"Nepal",Nauru:"Nauru",Niue:"Niue",Auckland:"New Zealand",Chatham:"New Zealand",Panama:"Panama",Lima:"Peru",Tahiti:"French Polynesia",Marquesas:"French Polynesia",Gambier:"French Polynesia",Port_Moresby:"Papua New Guinea",Bougainville:"Papua New Guinea",Manila:"Philippines",Karachi:"Pakistan",Warsaw:"Poland",Miquelon:"St Pierre & Miquelon",Pitcairn:"Pitcairn",Puerto_Rico:"Puerto Rico",Gaza:"Palestine",Hebron:"Palestine",Lisbon:"Portugal",Madeira:"Portugal",Azores:"Portugal",Palau:"Palau",Asuncion:"Paraguay",Qatar:"Qatar",Bucharest:"Romania",Belgrade:"Serbia",Kaliningrad:"Russia",Moscow:"Russia",Simferopol:"Russia",Kirov:"Russia",Volgograd:"Russia",Astrakhan:"Russia",Saratov:"Russia",Ulyanovsk:"Russia",Samara:"Russia",Yekaterinburg:"Russia",Omsk:"Russia",Novosibirsk:"Russia",Barnaul:"Russia",Tomsk:"Russia",Novokuznetsk:"Russia",Krasnoyarsk:"Russia",Irkutsk:"Russia",Chita:"Russia",Yakutsk:"Russia",Khandyga:"Russia",Vladivostok:"Russia","Ust-Nera":"Russia",Magadan:"Russia",Sakhalin:"Russia",Srednekolymsk:"Russia",Kamchatka:"Russia",Anadyr:"Russia",Riyadh:"Saudi Arabia",Guadalcanal:"Solomon Islands",Khartoum:"Sudan",Singapore:"Singapore",Paramaribo:"Suriname",Juba:"South Sudan",Sao_Tome:"Sao Tome & Principe",El_Salvador:"El Salvador",Damascus:"Syria",Grand_Turk:"Turks & Caicos Is",Ndjamena:"Chad",Bangkok:"Thailand",Dushanbe:"Tajikistan",Fakaofo:"Tokelau",Dili:"East Timor",Ashgabat:"Turkmenistan",Tunis:"Tunisia",Tongatapu:"Tonga",Istanbul:"Turkey",Taipei:"Taiwan",Kyiv:"Ukraine",New_York:"United States",Detroit:"United States",Louisville:"United States",Monticello:"United States",Indianapolis:"United States",Vincennes:"United States",Winamac:"United States",Marengo:"United States",Petersburg:"United States",Vevay:"United States",Chicago:"United States",Tell_City:"United States",Knox:"United States",Menominee:"United States",Center:"United States",New_Salem:"United States",Beulah:"United States",Denver:"United States",Boise:"United States",Phoenix:"United States",Los_Angeles:"United States",Anchorage:"United States",Juneau:"United States",Sitka:"United States",Metlakatla:"United States",Yakutat:"United States",Nome:"United States",Adak:"United States",Honolulu:"United States",Montevideo:"Uruguay",Samarkand:"Uzbekistan",Tashkent:"Uzbekistan",Caracas:"Venezuela",Ho_Chi_Minh:"Vietnam",Efate:"Vanuatu",Apia:"Samoa (western)",Johannesburg:"South Africa",Antigua:"Antigua & Barbuda",Anguilla:"Anguilla",Luanda:"Angola",McMurdo:"Antarctica",DumontDUrville:"Antarctica",Syowa:"Antarctica",Aruba:"Aruba",Mariehamn:"Åland Islands",Sarajevo:"Bosnia & Herzegovina",Ouagadougou:"Burkina Faso",Bahrain:"Bahrain",Bujumbura:"Burundi","Porto-Novo":"Benin",St_Barthelemy:"St Barthelemy",Brunei:"Brunei",Kralendijk:"Caribbean NL",Nassau:"Bahamas",Gaborone:"Botswana","Blanc-Sablon":"Canada",Atikokan:"Canada",Creston:"Canada",Cocos:"Cocos (Keeling) Islands",Kinshasa:"Congo (Dem. Rep.)",Lubumbashi:"Congo (Dem. Rep.)",Bangui:"Central African Rep.",Brazzaville:"Congo (Rep.)",Douala:"Cameroon",Curacao:"Curaçao",Christmas:"Christmas Island",Busingen:"Germany",Djibouti:"Djibouti",Copenhagen:"Denmark",Dominica:"Dominica",Asmara:"Eritrea",Addis_Ababa:"Ethiopia",Chuuk:"Micronesia",Pohnpei:"Micronesia",Libreville:"Gabon",Grenada:"Grenada",Guernsey:"Guernsey",Accra:"Ghana",Banjul:"Gambia",Conakry:"Guinea",Guadeloupe:"Guadeloupe",Malabo:"Equatorial Guinea",Zagreb:"Croatia",Isle_of_Man:"Isle of Man",Reykjavik:"Iceland",Jersey:"Jersey",Phnom_Penh:"Cambodia",Comoro:"Comoros",St_Kitts:"St Kitts & Nevis",Kuwait:"Kuwait",Cayman:"Cayman Islands",Vientiane:"Laos",St_Lucia:"St Lucia",Vaduz:"Liechtenstein",Maseru:"Lesotho",Luxembourg:"Luxembourg",Monaco:"Monaco",Podgorica:"Montenegro",Marigot:"St Martin (French)",Antananarivo:"Madagascar",Majuro:"Marshall Islands",Skopje:"North Macedonia",Bamako:"Mali",Saipan:"Northern Mariana Islands",Nouakchott:"Mauritania",Montserrat:"Montserrat",Blantyre:"Malawi",Kuala_Lumpur:"Malaysia",Niamey:"Niger",Amsterdam:"Netherlands",Oslo:"Norway",Muscat:"Oman",Reunion:"Réunion",Kigali:"Rwanda",Mahe:"Seychelles",Stockholm:"Sweden",St_Helena:"St Helena",Ljubljana:"Slovenia",Longyearbyen:"Svalbard & Jan Mayen",Bratislava:"Slovakia",Freetown:"Sierra Leone",San_Marino:"San Marino",Dakar:"Senegal",Mogadishu:"Somalia",Lower_Princes:"St Maarten (Dutch)",Mbabane:"Eswatini (Swaziland)",Kerguelen:"French S. Terr.",Lome:"Togo",Port_of_Spain:"Trinidad & Tobago",Funafuti:"Tuvalu",Dar_es_Salaam:"Tanzania",Kampala:"Uganda",Midway:"US minor outlying islands",Wake:"US minor outlying islands",Vatican:"Vatican City",St_Vincent:"St Vincent",Tortola:"Virgin Islands (UK)",St_Thomas:"Virgin Islands (US)",Wallis:"Wallis & Futuna",Aden:"Yemen",Mayotte:"Mayotte",Lusaka:"Zambia",Harare:"Zimbabwe"};function yR(){let t=Intl.DateTimeFormat().resolvedOptions().timeZone;t==="Asia/Bangkok"&&(t="Asia/Jakarta");const[e,...n]=t.split("/"),i=n.join("/");return{timezone:t,region:e,city:i,country:vR[i]||"Unknown"}}const bR={class:"grid grid-cols-[max-content,auto] w-full","data-wv-section":"phone-number-input-wrapper"},AR={class:"flex gap-2"},wR=["src"],jte=ce("InputPhoneNumber",Ae({__name:"InputPhoneNumber",props:{modelValue:{},value:{},label:{},placeholder:{},disabled:{type:Boolean},maxDigit:{default:14},invalid:{type:Boolean},useValidator:{type:Boolean},fieldName:{},mandatory:{type:Boolean},validatorMessage:{},fieldInfo:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e;Wd(async()=>{c.value=await m(),n.value||(d.value=A())}),wt(async()=>{h.value=n.modelValue,n.useValidator&&Object.assign(h,Nn(n.fieldName??"numberInput",async w=>await Et(()=>u(w)))),n.value!=null&&k(n.value),n.modelValue!=null&&k(n.modelValue)});const{locale:r}=Zt("InputPhoneNumber"),o=dt("preset",{}).inputphonenumber,s=oe(!1),a=X(()=>n.invalid||!!h.errorMessage),l=navigator.userAgent.includes("Firefox"),u=w=>n.invalid&&n.validatorMessage?n.validatorMessage:w==null&&n.mandatory?n.validatorMessage??`${n.label} harus diisi.`:!0,c=oe(),d=oe(),f=oe(),p=oe(0),h=hn({value:null}),m=async()=>{const{data:w}=await Qg.get("https://assets.tagsamurai.com/json/country-dial-code.json");return w.filter(y=>y.dial_code)??[]},v=()=>{h.value=f.value?`${d.value} ${f.value}`:void 0,i("update:modelValue",h.value)},S=()=>{Et(()=>{const w=document.getElementById("phone-number-input");w&&w.focus()})},b=(w,y)=>{d.value=w,f.value=y},k=w=>{const y=w==null?void 0:w.split(" ");y!=null&&y.length?(b(y[0],y[1]),h.value=f.value?`${d.value} ${f.value}`:void 0):h.value=void 0},A=()=>{if(c.value){const{country:w}=yR(),y=c.value.find(C=>C.name===w);return y?y.dial_code:"+62"}return"+62"};return $e(()=>n.value,w=>{k(w)},{once:!0}),$e(()=>h.value,()=>{var C;const[w,y]=((C=h.value)==null?void 0:C.split(" "))??[];w&&y&&b(w,y)}),$e(()=>n.modelValue,w=>{k(w)}),(w,y)=>(g(),P(pi,{info:n.fieldInfo,label:n.label,mandatory:n.mandatory},{default:H(()=>{var C,I;return[E("div",bR,[L(x(Vr),{modelValue:d.value,"onUpdate:modelValue":y[0]||(y[0]=R=>d.value=R),class:pe((C=x(o))==null?void 0:C.dialcode.root({isFirefoxBased:x(l),invalidInput:a.value}).class),disabled:n.disabled,"filter-fields":["dial_code","name"],options:c.value,onChange:v,onHide:y[1]||(y[1]=()=>{S(),s.value=!1}),onShow:y[2]||(y[2]=R=>s.value=!0),"data-wv-section":"dialcode",filter:"","filter-placeholder":"Search","option-label":"dial_code","option-value":"dial_code"},{dropdownicon:H(()=>[L(Ee,it(kt(x(o).dialcode.dropdownicon({state:{isShowOverlay:s.value}}))),null,16)]),option:H(({option:R})=>[E("div",AR,[E("img",{src:R.image,alt:"country-img",style:{height:"16px"}},null,8,wR),E("span",null,_(R.name),1),E("span",null,_(R.dial_code),1)])]),_:1},8,["modelValue","class","disabled","options"]),(g(),P(Ks,{key:p.value,modelValue:f.value,"onUpdate:modelValue":y[3]||(y[3]=R=>f.value=R),"allowed-characters":/\d/,disabled:w.disabled,"input-class":(I=x(o))==null?void 0:I.input({isFirefoxBased:x(l),invalidInput:a.value}).class,"max-length":w.maxDigit,placeholder:w.placeholder??x(r).defaultPlaceholder,"use-field-wrapper":!1,"use-input-group":!1,"use-validator":!1,onBlur:v,"data-wv-section":"phoneinput","input-id":"phone-number-input","prevent-input-on-max-length":""},null,8,["modelValue","disabled","input-class","max-length","placeholder"]))]),ft(L(Fn,{message:h.errorMessage},null,8,["message"]),[[Xn,h.errorMessage]])]}),_:1},8,["info","label","mandatory"]))}})),SR={class:"flex gap-2 w-full items-center","data-wv-section":"inputwrapper"},CR=ce("InputRangeNumber",Ae({__name:"InputRangeNumber",props:{modelValue:{},value:{},label:{},placeholder:{},minPlaceholder:{},maxPlaceholder:{},disabled:{type:Boolean},invalid:{type:Boolean},showOptionalText:{type:Boolean},useValidator:{type:Boolean},mandatory:{type:Boolean},validatorMessage:{},minFieldName:{},maxFieldName:{}},emits:["update:modelValue","submit"],setup(t,{emit:e}){const n=t,i=e,{locale:r}=Zt("InputRangeNumber"),o=hn({value:void 0}),s=hn({value:void 0});wt(()=>{n.useValidator&&(Object.assign(o,Nn(n.minFieldName??"minNumberInput",c=>u(c),{initialValue:void 0})),Object.assign(s,Nn(n.maxFieldName??"maxNumberInput",c=>u(c),{initialValue:void 0})),n.value&&(o.value=n.value[0],s.value=n.value[1])),n.invalid&&n.useValidator&&(o.validate(),s.validate())});const a=X(()=>n.invalid||!!o.errorMessage||!!s.errorMessage),l=c=>{c.key==="Enter"&&i("submit")},u=async c=>{if(await Et(),typeof n.validatorMessage=="string"&&n.invalid)return n.validatorMessage;if(typeof n.validatorMessage!="string"){const{empty:d}=n.validatorMessage??{};if(c==null&&n.mandatory)return d??!0}return!0};return $e([()=>o.value,()=>s.value],([c,d])=>{i("update:modelValue",[c,d])}),$e(()=>n.value,c=>{o.value=c?c[0]:void 0,s.value=c?c[1]:void 0},{once:!0}),$e(()=>n.modelValue,c=>{o.value=c?c[0]:void 0,s.value=c?c[1]:void 0}),(c,d)=>(g(),P(pi,{label:n.label,"show-optional-text":c.showOptionalText},{default:H(()=>[E("div",SR,[L(fo,{invalid:a.value},{default:H(()=>[L(x(yl),T(c.$props,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=f=>o.value=f),max:s.value,placeholder:c.placeholder??c.minPlaceholder??x(r).minPlaceholder,"use-grouping":!1,onKeydown:l,class:"w-full","input-id":"range-start"}),null,16,["modelValue","max","placeholder"])]),_:1},8,["invalid"]),d[2]||(d[2]=ht(" - ")),L(fo,{invalid:a.value},{default:H(()=>[L(x(yl),T(c.$props,{modelValue:s.value,"onUpdate:modelValue":d[1]||(d[1]=f=>s.value=f),min:o.value,placeholder:c.placeholder??c.maxPlaceholder??x(r).maxPlaceholder,"use-grouping":!1,onKeydown:l,class:"w-full","input-id":"range-end"}),null,16,["modelValue","min","placeholder"])]),_:1},8,["invalid"])]),L(Fn,{message:o.errorMessage??s.errorMessage},null,8,["message"])]),_:1},8,["label","show-optional-text"]))}})),pA=ce("InputURL",Ae({__name:"InputURL",props:{allowedCharacters:{},autoUppercase:{type:Boolean},modelValue:{},value:{},existingValues:{},checkAvailability:{},maxLength:{},label:{},useValidator:{type:Boolean,default:!0},fieldName:{},mandatory:{type:Boolean},invalid:{type:Boolean},manualInvalidContainer:{type:Boolean},validatorMessage:{},validatorMessageClass:{},placeholder:{},disabled:{type:Boolean},fieldInfo:{},inputClass:{},inputContainerClass:{},labelClass:{},blurOnReachMaxLength:{type:Boolean},preventInputOnMaxLength:{type:Boolean},validateOnBlur:{type:Boolean},useProtocol:{type:Boolean,default:!0},allowSpecialCharacters:{type:Boolean,default:!0},useInputGroup:{type:Boolean,default:!0},inputId:{}},emits:["update:modelValue","blur","input"],setup(t){return(e,n)=>(g(),P(Ks,T({onBlur:n[0]||(n[0]=i=>e.$emit("blur",i)),onInput:n[1]||(n[1]=i=>e.$emit("input",i)),"onUpdate:modelValue":n[2]||(n[2]=i=>e.$emit("update:modelValue",i))},e.$props,{type:"url"}),In({_:2},[e.$slots["addon-left"]?{name:"addon-left",fn:H(()=>[Q(e.$slots,"addon-left")]),key:"0"}:void 0,e.$slots["addon-right"]?{name:"addon-right",fn:H(()=>[Q(e.$slots,"addon-right")]),key:"1"}:void 0]),1040))}})),Ute=ce("LiteDropdown",Ae({__name:"LiteDropdown",props:wn({modelValue:{type:[String,Number,Boolean,Object]},options:{},optionLabel:{},optionValue:{},mandatory:{type:Boolean},placeholder:{default:"Pilih data"},loading:{type:Boolean},disabled:{type:Boolean},filter:{type:Boolean,default:!0},filterPlaceholder:{default:"Cari"}},{modelValue:{type:[String,Number,Boolean,Object],required:!0},modelModifiers:{}}),emits:wn(["update:modelValue","show","change"],["update:modelValue"]),setup(t){const e=dt("preset",{}).dropdown,n=ni(t,"modelValue"),i=t,r=oe(!1);return(o,s)=>(g(),P(pi,{mandatory:i.mandatory},{default:H(()=>[L(x(Vr),T(i,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=a=>n.value=a),placeholder:i.loading?"Loading...":i.placeholder,pt:{root:({state:a,props:l})=>{var u;return{class:[...(u=x(e))==null?void 0:u.root({state:a,props:l}).class,"text-base",{"cursor-pointer":!l.disabled}],"data-wv-name":"litedropdown"}},input:({props:a})=>({class:["!font-semibold",{"!text-general-200":a.modelValue==null,"!text-grayscale-900":a.modelValue!=null}]})},onChange:s[1]||(s[1]=a=>o.$emit("change",a)),onHide:s[2]||(s[2]=a=>r.value=!1),onShow:s[3]||(s[3]=()=>{o.$emit("show"),r.value=!0}),class:"!w-fit"}),In({dropdownicon:H(()=>[L(Ee,{class:pe(["!w-6 !h-6 !transition-transform !text-general-500",{"rotate-180":r.value}]),icon:"arrow-drop-down"},null,8,["class"])]),loadingicon:H(()=>[L(Ee,{class:"text-xs animate-spin duration-200",icon:"spinner"})]),filtericon:H(()=>[L(Ee,{class:"text-xs w-6 h-6",icon:"search-line"})]),_:2},[o.$slots.option?{name:"option",fn:H(({option:a})=>[Q(o.$slots,"option",{option:a})]),key:"0"}:void 0]),1040,["modelValue","placeholder","pt"])]),_:3},8,["mandatory"]))}})),kR=["data-user-lang"],TR=["alt","src"],OR={key:1,class:"flex items-center gap-0.5 text-xs text-general-800"},xR={key:2},hA=Ae({__name:"LanguageDropdownOption",props:{option:{},iconOnly:{type:Boolean}},setup(t){return(e,n)=>{const i=on("tooltip");return g(),O("div",{"data-user-lang":e.option.isoCode,class:"flex gap-2 items-center"},[e.option.flag?ft((g(),O("img",{key:0,alt:"Country Flag of "+e.option.name,class:pe(["cursor-pointer aspect-square rounded-full ring-general-100 ring-[0.5px] outline-none",{"w-4 h-4":!e.iconOnly,"w-6 h-6":e.iconOnly}]),src:e.option.flag},null,10,TR)),[[i,e.iconOnly?`${e.option.name} (${e.option.isoCode.toUpperCase()})`:void 0,void 0,{left:!0}]]):e.iconOnly?(g(),O("span",OR,[L(Ee,{class:"!text-base",icon:"global-line"}),ht(" "+_(e.option.isoCode.toUpperCase()),1)])):B("",!0),e.iconOnly?B("",!0):(g(),O("span",xR,_(e.option.name)+" ("+_(e.option.isoCode.toUpperCase())+") ",1))],8,kR)}}}),Kte=ce("LanguageSwitcher",Ae({__name:"LanguageSwitcher",setup(t){wt(async()=>{i.value=await s()});const{service:e,setLocale:n}=Va(),i=oe(),r=oe([]),o=oe(!1),s=async()=>{const l=localStorage.getItem("lang")||navigator.language.split("-")[0];if(!r.value.length)try{const u=await e.getLanguageOptionMeta(l);if(u.isoCode)return r.value[0]=u,u}catch(u){console.error("Ups! Something error while fetching Language Option Meta.",u)}return r.value.find(u=>u.isoCode===l)||r.value[0]},a=async()=>{if(!(!e||r.value.length>1))try{o.value=!0;const l=await e.getLanguageOptions();r.value=l}catch(l){console.error("Ups! Something error while fetching language options.",l)}finally{o.value=!1}};return $e(i,l=>{n(l.isoCode)}),(l,u)=>(g(),P(x(Vr),{modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=c=>i.value=c),"filter-fields":["language","name"],loading:o.value,options:r.value,pt:{root:{class:"flex items-center gap-1 gap-1"},input:{class:"p-0 outline-none"},trigger:{class:"w-max hover:bg-primary-50 rounded-full"}},onShow:a,class:"w-max","data-key":"language",filter:"","filter-placeholder":"Search language"},{dropdownicon:H(()=>[L(Ee,{class:"w-4 h-4 rotate-180 text-general-800 transition-transform",icon:"arrow-up-s"})]),value:H(({value:c})=>[c?(g(),P(hA,{key:0,option:c,"icon-only":""},null,8,["option"])):B("",!0)]),option:H(({option:c})=>[L(hA,{option:c},null,8,["option"])]),_:1},8,["modelValue","loading","options"]))}})),Wte=ce("Loading",Ae({__name:"Loading",setup(t){const{loading:e,message:n}=$i();return(i,r)=>x(e)?(g(),P(yu,{key:0,to:"body"},[E("div",T(i.$preset.loading.root,{"data-wv-name":"loading-overlay","data-wv-section":"overlay"}),[L(bl,T({animation:"loading-page"},i.$preset.loading.animation),null,16),ht(" "+_(x(n)),1)],16)])):B("",!0)}}));var MR={root:function(e){var n=e.instance,i=e.props;return["p-checkbox p-component",{"p-highlight":n.checked,"p-disabled":i.disabled,"p-invalid":i.invalid,"p-variant-filled":i.variant?i.variant==="filled":n.$primevue.config.inputStyle==="filled"}]},box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon"},ER=Wt.extend({name:"checkbox",classes:MR}),IR={name:"BaseCheckbox",extends:It,props:{value:null,modelValue:null,binary:Boolean,name:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:ER,provide:function(){return{$parentInstance:this}}};function PR(t){return BR(t)||RR(t)||DR(t)||LR()}function LR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
229
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DR(t,e){if(t){if(typeof t=="string")return uh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uh(t,e)}}function RR(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function BR(t){if(Array.isArray(t))return uh(t)}function uh(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var mA={name:"Checkbox",extends:IR,inheritAttrs:!1,emits:["update:modelValue","change","focus","blur"],methods:{getPTOptions:function(e){var n=e==="root"?this.ptmi:this.ptm;return n(e,{context:{checked:this.checked,disabled:this.disabled}})},onChange:function(e){var n=this;if(!this.disabled&&!this.readonly){var i;this.binary?i=this.checked?this.falseValue:this.trueValue:this.checked?i=this.modelValue.filter(function(r){return!Ce.equals(r,n.value)}):i=this.modelValue?[].concat(PR(this.modelValue),[this.value]):[this.value],this.$emit("update:modelValue",i),this.$emit("change",e)}},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e){this.$emit("blur",e)}},computed:{checked:function(){return this.binary?this.modelValue===this.trueValue:Ce.contains(this.value,this.modelValue)}},components:{CheckIcon:co}},NR=["data-p-highlight","data-p-disabled"],$R=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label","aria-invalid"];function VR(t,e,n,i,r,o){var s=et("CheckIcon");return g(),O("div",T({class:t.cx("root")},o.getPTOptions("root"),{"data-p-highlight":o.checked,"data-p-disabled":t.disabled}),[E("input",T({id:t.inputId,type:"checkbox",class:[t.cx("input"),t.inputClass],style:t.inputStyle,value:t.value,name:t.name,checked:o.checked,tabindex:t.tabindex,disabled:t.disabled,readonly:t.readonly,required:t.required,"aria-labelledby":t.ariaLabelledby,"aria-label":t.ariaLabel,"aria-invalid":t.invalid||void 0,onFocus:e[0]||(e[0]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[1]||(e[1]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),onChange:e[2]||(e[2]=function(){return o.onChange&&o.onChange.apply(o,arguments)})},o.getPTOptions("input")),null,16,$R),E("div",T({class:t.cx("box")},o.getPTOptions("box")),[Q(t.$slots,"icon",{checked:o.checked,class:pe(t.cx("icon"))},function(){return[o.checked?(g(),P(s,T({key:0,class:t.cx("icon")},o.getPTOptions("icon")),null,16,["class"])):B("",!0)]})],16)],16,NR)}mA.render=VR;var zR={root:function(e){var n=e.props;return{position:n.appendTo==="self"?"relative":void 0}}},FR={root:function(e){var n=e.instance,i=e.props;return["p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":i.display==="chip","p-disabled":i.disabled,"p-invalid":i.invalid,"p-variant-filled":i.variant?i.variant==="filled":n.$primevue.config.inputStyle==="filled","p-focus":n.focused,"p-inputwrapper-filled":i.modelValue&&i.modelValue.length,"p-inputwrapper-focus":n.focused||n.overlayVisible,"p-overlay-open":n.overlayVisible}]},labelContainer:"p-multiselect-label-container",label:function(e){var n=e.instance,i=e.props;return["p-multiselect-label",{"p-placeholder":n.label===i.placeholder,"p-multiselect-label-empty":!i.placeholder&&(!i.modelValue||i.modelValue.length===0)}]},token:"p-multiselect-token",tokenLabel:"p-multiselect-token-label",removeTokenIcon:"p-multiselect-token-icon",trigger:"p-multiselect-trigger",loadingIcon:"p-multiselect-trigger-icon",dropdownIcon:"p-multiselect-trigger-icon",panel:function(e){e.props;var n=e.instance;return["p-multiselect-panel p-component",{"p-ripple-disabled":n.$primevue.config.ripple===!1}]},header:"p-multiselect-header",filterContainer:"p-multiselect-filter-container",filterInput:function(e){var n=e.props,i=e.instance;return["p-multiselect-filter p-inputtext p-component",{"p-variant-filled":n.variant?n.variant==="filled":i.$primevue.config.inputStyle==="filled"}]},filterIcon:"p-multiselect-filter-icon",closeButton:"p-multiselect-close p-link",closeIcon:"p-multiselect-close-icon",wrapper:"p-multiselect-items-wrapper",list:"p-multiselect-items p-component",itemGroup:"p-multiselect-item-group",item:function(e){var n=e.instance,i=e.option,r=e.index,o=e.getItemOptions,s=e.props;return["p-multiselect-item",{"p-highlight":n.isSelected(i)&&s.highlightOnSelect,"p-focus":n.focusedOptionIndex===n.getOptionIndex(r,o),"p-disabled":n.isOptionDisabled(i)}]},emptyMessage:"p-multiselect-empty-message"},HR=Wt.extend({name:"multiselect",classes:FR,inlineStyles:zR}),jR={name:"BaseMultiSelect",extends:It,props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},placeholder:String,variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:Boolean,inputId:{type:String,default:null},inputProps:{type:null,default:null},panelClass:{type:String,default:null},panelStyle:{type:null,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},closeButtonProps:{type:null,default:null},dataKey:null,filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},appendTo:{type:[String,Object],default:"body"},display:{type:String,default:"comma"},selectedItemsLabel:{type:String,default:"{0} items selected"},maxSelectedLabels:{type:Number,default:null},selectionLimit:{type:Number,default:null},showToggleAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},checkboxIcon:{type:String,default:void 0},closeIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},filterIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},removeTokenIcon:{type:String,default:void 0},selectAll:{type:Boolean,default:null},resetFilterOnHide:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},autoFilterFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},highlightOnSelect:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:HR,provide:function(){return{$parentInstance:this}}};function Ol(t){"@babel/helpers - typeof";return Ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ol(t)}function gA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function vA(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gA(Object(n),!0).forEach(function(i){yA(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gA(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function yA(t,e,n){return e=UR(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function UR(t){var e=KR(t,"string");return Ol(e)=="symbol"?e:String(e)}function KR(t,e){if(Ol(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Ol(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bA(t){return GR(t)||XR(t)||qR(t)||WR()}function WR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
230
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qR(t,e){if(t){if(typeof t=="string")return ch(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ch(t,e)}}function XR(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function GR(t){if(Array.isArray(t))return ch(t)}function ch(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var AA={name:"MultiSelect",extends:jR,inheritAttrs:!1,emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter","selectall-change"],outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,list:null,virtualScroller:null,startRangeIndex:-1,searchTimeout:null,searchValue:"",selectOnFocus:!1,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||Vn()},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||Vn(),this.autoUpdateModel()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(dn.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,n){return this.virtualScrollerDisabled?e:n&&n(e).index},getOptionLabel:function(e){return this.optionLabel?Ce.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?Ce.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,n){return this.dataKey?Ce.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)+"_".concat(n)},getHeaderCheckboxPTOptions:function(e){return this.ptm(e,{context:{selected:this.allSelected}})},getCheckboxPTOptions:function(e,n,i,r){return this.ptm(r,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,n),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return this.maxSelectionLimitReached&&!this.isSelected(e)?!0:this.optionDisabled?Ce.resolveFieldData(e,this.optionDisabled):!1},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return Ce.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return Ce.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var n=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(function(i){return n.isOptionGroup(i)}).length:e)+1},show:function(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.findSelectedOptionIndex(),e&&G.focus(this.$refs.focusInput)},hide:function(e){var n=this,i=function(){n.$emit("before-hide"),n.overlayVisible=!1,n.clicked=!1,n.focusedOptionIndex=-1,n.searchValue="",n.resetFilterOnHide&&(n.filterValue=null),e&&G.focus(n.$refs.focusInput)};setTimeout(function(){i()},0)},onFocus:function(e){this.disabled||(this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.findSelectedOptionIndex(),this.scrollInView(this.focusedOptionIndex)),this.$emit("focus",e))},onBlur:function(e){this.clicked=!1,this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){var n=this;if(this.disabled){e.preventDefault();return}var i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(e.code==="KeyA"&&i){var r=this.visibleOptions.filter(function(o){return n.isValidOption(o)}).map(function(o){return n.getOptionValue(o)});this.updateModel(e,r),e.preventDefault();break}!i&&Ce.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e),e.preventDefault());break}this.clicked=!1},onContainerClick:function(e){this.disabled||this.loading||((!this.overlay||!this.overlay.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.clicked=!0)},onFirstHiddenFocus:function(e){var n=e.relatedTarget===this.$refs.focusInput?G.getFirstFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;G.focus(n)},onLastHiddenFocus:function(e){var n=e.relatedTarget===this.$refs.focusInput?G.getLastFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;G.focus(n)},onCloseClick:function(){this.hide(!0)},onOptionSelect:function(e,n){var i=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!(this.disabled||this.isOptionDisabled(n))){var s=this.isSelected(n),a=null;s?a=this.modelValue.filter(function(l){return!Ce.equals(l,i.getOptionValue(n),i.equalityKey)}):a=[].concat(bA(this.modelValue||[]),[this.getOptionValue(n)]),this.updateModel(e,a),r!==-1&&(this.focusedOptionIndex=r),o&&G.focus(this.$refs.focusInput)}},onOptionMouseMove:function(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)},onOptionSelectRange:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(i===-1&&(i=this.findNearestSelectedOptionIndex(r,!0)),r===-1&&(r=this.findNearestSelectedOptionIndex(i)),i!==-1&&r!==-1){var o=Math.min(i,r),s=Math.max(i,r),a=this.visibleOptions.slice(o,s+1).filter(function(l){return n.isValidOption(l)}).map(function(l){return n.getOptionValue(l)});this.updateModel(e,a)}},onFilterChange:function(e){var n=e.target.value;this.filterValue=n,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:n}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break}},onFilterBlur:function(){this.focusedOptionIndex=-1},onFilterUpdated:function(){this.overlayVisible&&this.alignOverlay()},onOverlayClick:function(e){uo.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){switch(e.code){case"Escape":this.onEscapeKey(e);break}},onArrowDownKey:function(e){if(!this.overlayVisible)this.show();else{var n=this.focusedOptionIndex!==-1?this.findNextOptionIndex(this.focusedOptionIndex):this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,n),this.changeFocusedOptionIndex(e,n)}e.preventDefault()},onArrowUpKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.altKey&&!n)this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var i=this.focusedOptionIndex!==-1?this.findPrevOptionIndex(this.focusedOptionIndex):this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n){var i=e.currentTarget;e.shiftKey?i.setSelectionRange(0,e.target.selectionStart):(i.setSelectionRange(0,0),this.focusedOptionIndex=-1)}else{var r=e.metaKey||e.ctrlKey,o=this.findFirstOptionIndex();e.shiftKey&&r&&this.onOptionSelectRange(e,o,this.startRangeIndex),this.changeFocusedOptionIndex(e,o),!this.overlayVisible&&this.show()}e.preventDefault()},onEndKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n){var i=e.currentTarget;if(e.shiftKey)i.setSelectionRange(e.target.selectionStart,i.value.length);else{var r=i.value.length;i.setSelectionRange(r,r),this.focusedOptionIndex=-1}}else{var o=e.metaKey||e.ctrlKey,s=this.findLastOptionIndex();e.shiftKey&&o&&this.onOptionSelectRange(e,this.startRangeIndex,s),this.changeFocusedOptionIndex(e,s),!this.overlayVisible&&this.show()}e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?this.focusedOptionIndex!==-1&&(e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n||(this.overlayVisible&&this.hasFocusableElements()?(G.focus(e.shiftKey?this.$refs.lastHiddenFocusableElementOnOverlay:this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onShiftKey:function(){this.startRangeIndex=this.focusedOptionIndex},onOverlayEnter:function(e){dn.set("overlay",e,this.$primevue.config.zIndex.overlay),G.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&G.focus(this.$refs.filterInput)},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){dn.clear(e)},alignOverlay:function(){this.appendTo==="self"?G.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=G.getOuterWidth(this.$el)+"px",G.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(n){e.overlayVisible&&e.isOutsideClicked(n)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new Ls(this.$refs.container,function(){e.overlayVisible&&e.hide()})),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!G.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked:function(e){return!(this.$el.isSameNode(e.target)||this.$el.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},getLabelByValue:function(e){var n=this,i=this.optionGroupLabel?this.flatOptions(this.options):this.options||[],r=i.find(function(o){return!n.isOptionGroup(o)&&Ce.equals(n.getOptionValue(o),e,n.equalityKey)});return r?this.getOptionLabel(r):null},getSelectedItemsLabel:function(){var e=/{(.*?)}/,n=this.selectedItemsLabel||this.$primevue.config.locale.selectionMessage;return e.test(n)?n.replace(n.match(e)[0],this.modelValue.length+""):n},onToggleAll:function(e){var n=this;if(this.selectAll!==null)this.$emit("selectall-change",{originalEvent:e,checked:!this.allSelected});else{var i=this.allSelected?[]:this.visibleOptions.filter(function(r){return n.isValidOption(r)}).map(function(r){return n.getOptionValue(r)});this.updateModel(e,i)}},removeOption:function(e,n){var i=this,r=this.modelValue.filter(function(o){return!Ce.equals(o,n,i.equalityKey)});this.updateModel(e,r)},clearFilter:function(){this.filterValue=null},hasFocusableElements:function(){return G.getFocusableElements(this.overlay,':not([data-p-hidden-focusable="true"])').length>0},isOptionMatched:function(e){var n;return this.isValidOption(e)&&((n=this.getOptionLabel(e))===null||n===void 0?void 0:n.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale)))},isValidOption:function(e){return Ce.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isEquals:function(e,n){return Ce.equals(e,n,this.equalityKey)},isSelected:function(e){var n=this,i=this.getOptionValue(e);return(this.modelValue||[]).some(function(r){return n.isEquals(r,i)})},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(n){return e.isValidOption(n)})},findLastOptionIndex:function(){var e=this;return Ce.findLastIndex(this.visibleOptions,function(n){return e.isValidOption(n)})},findNextOptionIndex:function(e){var n=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(r){return n.isValidOption(r)}):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var n=this,i=e>0?Ce.findLastIndex(this.visibleOptions.slice(0,e),function(r){return n.isValidOption(r)}):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;if(this.hasSelectedOption){for(var n=function(){var s=e.modelValue[r],a=e.visibleOptions.findIndex(function(l){return e.isValidSelectedOption(l)&&e.isEquals(s,e.getOptionValue(l))});if(a>-1)return{v:a}},i,r=this.modelValue.length-1;r>=0;r--)if(i=n(),i)return i.v}return-1},findFirstSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex(function(n){return e.isValidSelectedOption(n)}):-1},findLastSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?Ce.findLastIndex(this.visibleOptions,function(n){return e.isValidSelectedOption(n)}):-1},findNextSelectedOptionIndex:function(e){var n=this,i=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(r){return n.isValidSelectedOption(r)}):-1;return i>-1?i+e+1:-1},findPrevSelectedOptionIndex:function(e){var n=this,i=this.hasSelectedOption&&e>0?Ce.findLastIndex(this.visibleOptions.slice(0,e),function(r){return n.isValidSelectedOption(r)}):-1;return i>-1?i:-1},findNearestSelectedOptionIndex:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=-1;return this.hasSelectedOption&&(n?(i=this.findPrevSelectedOptionIndex(e),i=i===-1?this.findNextSelectedOptionIndex(e):i):(i=this.findNextSelectedOptionIndex(e),i=i===-1?this.findPrevSelectedOptionIndex(e):i)),i>-1?i:e},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e){var n=this;this.searchValue=(this.searchValue||"")+e.key;var i=-1;Ce.isNotEmpty(this.searchValue)&&(this.focusedOptionIndex!==-1?(i=this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function(r){return n.isOptionMatched(r)}),i=i===-1?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex(function(r){return n.isOptionMatched(r)}):i+this.focusedOptionIndex):i=this.visibleOptions.findIndex(function(r){return n.isOptionMatched(r)}),i===-1&&this.focusedOptionIndex===-1&&(i=this.findFirstFocusedOptionIndex()),i!==-1&&this.changeFocusedOptionIndex(e,i)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){n.searchValue="",n.searchTimeout=null},500)},changeFocusedOptionIndex:function(e,n){this.focusedOptionIndex!==n&&(this.focusedOptionIndex=n,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[n]))},scrollInView:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;this.$nextTick(function(){var i=n!==-1?"".concat(e.id,"_").concat(n):e.focusedOptionId,r=G.findSingle(e.list,'li[id="'.concat(i,'"]'));r?r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"nearest"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(n!==-1?n:e.focusedOptionIndex)})},autoUpdateModel:function(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption){this.focusedOptionIndex=this.findFirstFocusedOptionIndex();var e=this.getOptionValue(this.visibleOptions[this.focusedOptionIndex]);this.updateModel(null,[e])}},updateModel:function(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},flatOptions:function(e){var n=this;return(e||[]).reduce(function(i,r,o){i.push({optionGroup:r,group:!0,index:o});var s=n.getOptionGroupChildren(r);return s&&s.forEach(function(a){return i.push(a)}),i},[])},overlayRef:function(e){this.overlay=e},listRef:function(e,n){this.list=e,n&&n(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var e=this,n=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){var i=S1.filter(n,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){var r=this.options||[],o=[];return r.forEach(function(s){var a=e.getOptionGroupChildren(s),l=a.filter(function(u){return i.includes(u)});l.length>0&&o.push(vA(vA({},s),{},yA({},typeof e.optionGroupChildren=="string"?e.optionGroupChildren:"items",bA(l))))}),this.flatOptions(o)}return i}return n},label:function(){var e;if(this.modelValue&&this.modelValue.length){if(Ce.isNotEmpty(this.maxSelectedLabels)&&this.modelValue.length>this.maxSelectedLabels)return this.getSelectedItemsLabel();e="";for(var n=0;n<this.modelValue.length;n++)n!==0&&(e+=", "),e+=this.getLabelByValue(this.modelValue[n])}else e=this.placeholder;return e},chipSelectedItems:function(){return Ce.isNotEmpty(this.maxSelectedLabels)&&this.modelValue&&this.modelValue.length>this.maxSelectedLabels?this.modelValue.slice(0,this.maxSelectedLabels):this.modelValue},allSelected:function(){var e=this;return this.selectAll!==null?this.selectAll:Ce.isNotEmpty(this.visibleOptions)&&this.visibleOptions.every(function(n){return e.isOptionGroup(n)||e.isOptionDisabled(n)||e.isSelected(n)})},hasSelectedOption:function(){return Ce.isNotEmpty(this.modelValue)},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},maxSelectionLimitReached:function(){return this.selectionLimit&&this.modelValue&&this.modelValue.length===this.selectionLimit},filterResultMessageText:function(){return Ce.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.modelValue.length):this.emptySelectionMessageText},focusedOptionId:function(){return this.focusedOptionIndex!==-1?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter(function(n){return!e.isOptionGroup(n)}).length},toggleAllAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria[this.allSelected?"selectAll":"unselectAll"]:void 0},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},listAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.listLabel:void 0},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:fi},components:{Checkbox:mA,VirtualScroller:up,Portal:$r,TimesIcon:fr,SearchIcon:lp,TimesCircleIcon:Fs,ChevronDownIcon:ap,SpinnerIcon:Za,CheckIcon:co}};function xl(t){"@babel/helpers - typeof";return xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xl(t)}function wA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function vo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wA(Object(n),!0).forEach(function(i){dh(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wA(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function dh(t,e,n){return e=ZR(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ZR(t){var e=_R(t,"string");return xl(e)=="symbol"?e:String(e)}function _R(t,e){if(xl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(xl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var JR=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],YR=["onClick"],QR=["value","placeholder","aria-owns","aria-activedescendant"],eB=["aria-label"],tB=["id","aria-label"],nB=["id"],iB=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"];function rB(t,e,n,i,r,o){var s=et("TimesCircleIcon"),a=et("SpinnerIcon"),l=et("Checkbox"),u=et("VirtualScroller"),c=et("Portal"),d=on("ripple");return g(),O("div",T({ref:"container",class:t.cx("root"),style:t.sx("root"),onClick:e[13]||(e[13]=function(){return o.onContainerClick&&o.onContainerClick.apply(o,arguments)})},t.ptmi("root")),[E("div",T({class:"p-hidden-accessible"},t.ptm("hiddenInputWrapper"),{"data-p-hidden-accessible":!0}),[E("input",T({ref:"focusInput",id:t.inputId,type:"text",readonly:"",disabled:t.disabled,placeholder:t.placeholder,tabindex:t.disabled?-1:t.tabindex,role:"combobox","aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":r.overlayVisible,"aria-controls":r.id+"_list","aria-activedescendant":r.focused?o.focusedOptionId:void 0,"aria-invalid":t.invalid||void 0,onFocus:e[0]||(e[0]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[1]||(e[1]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)}),onKeydown:e[2]||(e[2]=function(){return o.onKeyDown&&o.onKeyDown.apply(o,arguments)})},vo(vo({},t.inputProps),t.ptm("hiddenInput"))),null,16,JR)],16),E("div",T({class:t.cx("labelContainer")},t.ptm("labelContainer")),[E("div",T({class:t.cx("label")},t.ptm("label")),[Q(t.$slots,"value",{value:t.modelValue,placeholder:t.placeholder},function(){return[t.display==="comma"?(g(),O(ue,{key:0},[ht(_(o.label||"empty"),1)],64)):t.display==="chip"?(g(),O(ue,{key:1},[(g(!0),O(ue,null,Je(o.chipSelectedItems,function(f){return g(),O("div",T({key:o.getLabelByValue(f),class:t.cx("token")},t.ptm("token")),[Q(t.$slots,"chip",{value:f},function(){return[E("span",T({class:t.cx("tokenLabel")},t.ptm("tokenLabel")),_(o.getLabelByValue(f)),17)]}),t.disabled?B("",!0):Q(t.$slots,"removetokenicon",{key:0,class:pe(t.cx("removeTokenIcon")),item:f,onClick:function(h){return o.removeOption(h,f)},removeCallback:function(h){return o.removeOption(h,f)}},function(){return[t.removeTokenIcon?(g(),O("span",T({key:0,class:[t.cx("removeTokenIcon"),t.removeTokenIcon],onClick:Ot(function(p){return o.removeOption(p,f)},["stop"])},t.ptm("removeTokenIcon")),null,16,YR)):(g(),P(s,T({key:1,class:t.cx("removeTokenIcon"),onClick:Ot(function(p){return o.removeOption(p,f)},["stop"])},t.ptm("removeTokenIcon")),null,16,["class","onClick"]))]})],16)}),128)),!t.modelValue||t.modelValue.length===0?(g(),O(ue,{key:0},[ht(_(t.placeholder||"empty"),1)],64)):B("",!0)],64)):B("",!0)]})],16)],16),E("div",T({class:t.cx("trigger")},t.ptm("trigger")),[t.loading?Q(t.$slots,"loadingicon",{key:0,class:pe(t.cx("loadingIcon"))},function(){return[t.loadingIcon?(g(),O("span",T({key:0,class:[t.cx("loadingIcon"),"pi-spin",t.loadingIcon],"aria-hidden":"true"},t.ptm("loadingIcon")),null,16)):(g(),P(a,T({key:1,class:t.cx("loadingIcon"),spin:"","aria-hidden":"true"},t.ptm("loadingIcon")),null,16,["class"]))]}):Q(t.$slots,"dropdownicon",{key:1,class:pe(t.cx("dropdownIcon"))},function(){return[(g(),P(yt(t.dropdownIcon?"span":"ChevronDownIcon"),T({class:[t.cx("dropdownIcon"),t.dropdownIcon],"aria-hidden":"true"},t.ptm("dropdownIcon")),null,16,["class"]))]})],16),L(c,{appendTo:t.appendTo},{default:H(function(){return[L(Lr,T({name:"p-connected-overlay",onEnter:o.onOverlayEnter,onAfterEnter:o.onOverlayAfterEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},t.ptm("transition")),{default:H(function(){return[r.overlayVisible?(g(),O("div",T({key:0,ref:o.overlayRef,style:t.panelStyle,class:[t.cx("panel"),t.panelClass],onClick:e[11]||(e[11]=function(){return o.onOverlayClick&&o.onOverlayClick.apply(o,arguments)}),onKeydown:e[12]||(e[12]=function(){return o.onOverlayKeyDown&&o.onOverlayKeyDown.apply(o,arguments)})},vo(vo({},t.panelProps),t.ptm("panel"))),[E("span",T({ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:e[3]||(e[3]=function(){return o.onFirstHiddenFocus&&o.onFirstHiddenFocus.apply(o,arguments)})},t.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16),Q(t.$slots,"header",{value:t.modelValue,options:o.visibleOptions}),t.showToggleAll&&t.selectionLimit==null||t.filter?(g(),O("div",T({key:0,class:t.cx("header")},t.ptm("header")),[t.showToggleAll&&t.selectionLimit==null?(g(),P(l,{key:0,modelValue:o.allSelected,binary:!0,disabled:t.disabled,variant:t.variant,"aria-label":o.toggleAllAriaLabel,onChange:o.onToggleAll,unstyled:t.unstyled,pt:o.getHeaderCheckboxPTOptions("headerCheckbox")},{icon:H(function(f){return[t.$slots.headercheckboxicon?(g(),P(yt(t.$slots.headercheckboxicon),{key:0,checked:f.checked,class:pe(f.class)},null,8,["checked","class"])):f.checked?(g(),P(yt(t.checkboxIcon?"span":"CheckIcon"),T({key:1,class:[f.class,dh({},t.checkboxIcon,f.checked)]},o.getHeaderCheckboxPTOptions("headerCheckbox.icon")),null,16,["class"])):B("",!0)]}),_:1},8,["modelValue","disabled","variant","aria-label","onChange","unstyled","pt"])):B("",!0),t.filter?(g(),O("div",T({key:1,class:t.cx("filterContainer")},t.ptm("filterContainer")),[E("input",T({ref:"filterInput",type:"text",value:r.filterValue,onVnodeMounted:e[4]||(e[4]=function(){return o.onFilterUpdated&&o.onFilterUpdated.apply(o,arguments)}),onVnodeUpdated:e[5]||(e[5]=function(){return o.onFilterUpdated&&o.onFilterUpdated.apply(o,arguments)}),class:t.cx("filterInput"),placeholder:t.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":r.id+"_list","aria-activedescendant":o.focusedOptionId,onKeydown:e[6]||(e[6]=function(){return o.onFilterKeyDown&&o.onFilterKeyDown.apply(o,arguments)}),onBlur:e[7]||(e[7]=function(){return o.onFilterBlur&&o.onFilterBlur.apply(o,arguments)}),onInput:e[8]||(e[8]=function(){return o.onFilterChange&&o.onFilterChange.apply(o,arguments)})},vo(vo({},t.filterInputProps),t.ptm("filterInput"))),null,16,QR),Q(t.$slots,"filtericon",{class:pe(t.cx("filterIcon"))},function(){return[(g(),P(yt(t.filterIcon?"span":"SearchIcon"),T({class:[t.cx("filterIcon"),t.filterIcon]},t.ptm("filterIcon")),null,16,["class"]))]})],16)):B("",!0),t.filter?(g(),O("span",T({key:2,role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),_(o.filterResultMessageText),17)):B("",!0),ft((g(),O("button",T({class:t.cx("closeButton"),"aria-label":o.closeAriaLabel,onClick:e[9]||(e[9]=function(){return o.onCloseClick&&o.onCloseClick.apply(o,arguments)}),type:"button"},vo(vo({},t.closeButtonProps),t.ptm("closeButton"))),[Q(t.$slots,"closeicon",{class:pe(t.cx("closeIcon"))},function(){return[(g(),P(yt(t.closeIcon?"span":"TimesIcon"),T({class:[t.cx("closeIcon"),t.closeIcon]},t.ptm("closeIcon")),null,16,["class"]))]})],16,eB)),[[d]])],16)):B("",!0),E("div",T({class:t.cx("wrapper"),style:{"max-height":o.virtualScrollerDisabled?t.scrollHeight:""}},t.ptm("wrapper")),[L(u,T({ref:o.virtualScrollerRef},t.virtualScrollerOptions,{items:o.visibleOptions,style:{height:t.scrollHeight},tabindex:-1,disabled:o.virtualScrollerDisabled,pt:t.ptm("virtualScroller")}),In({content:H(function(f){var p=f.styleClass,h=f.contentRef,m=f.items,v=f.getItemOptions,S=f.contentStyle,b=f.itemSize;return[E("ul",T({ref:function(A){return o.listRef(A,h)},id:r.id+"_list",class:[t.cx("list"),p],style:S,role:"listbox","aria-multiselectable":"true","aria-label":o.listAriaLabel},t.ptm("list")),[(g(!0),O(ue,null,Je(m,function(k,A){return g(),O(ue,{key:o.getOptionRenderKey(k,o.getOptionIndex(A,v))},[o.isOptionGroup(k)?(g(),O("li",T({key:0,id:r.id+"_"+o.getOptionIndex(A,v),style:{height:b?b+"px":void 0},class:t.cx("itemGroup"),role:"option"},t.ptm("itemGroup")),[Q(t.$slots,"optiongroup",{option:k.optionGroup,index:o.getOptionIndex(A,v)},function(){return[ht(_(o.getOptionGroupLabel(k.optionGroup)),1)]})],16,nB)):ft((g(),O("li",T({key:1,id:r.id+"_"+o.getOptionIndex(A,v),style:{height:b?b+"px":void 0},class:t.cx("item",{option:k,index:A,getItemOptions:v}),role:"option","aria-label":o.getOptionLabel(k),"aria-selected":o.isSelected(k),"aria-disabled":o.isOptionDisabled(k),"aria-setsize":o.ariaSetSize,"aria-posinset":o.getAriaPosInset(o.getOptionIndex(A,v)),onClick:function(y){return o.onOptionSelect(y,k,o.getOptionIndex(A,v),!0)},onMousemove:function(y){return o.onOptionMouseMove(y,o.getOptionIndex(A,v))}},o.getCheckboxPTOptions(k,v,A,"item"),{"data-p-highlight":o.isSelected(k),"data-p-focused":r.focusedOptionIndex===o.getOptionIndex(A,v),"data-p-disabled":o.isOptionDisabled(k)}),[L(l,{modelValue:o.isSelected(k),binary:!0,tabindex:-1,variant:t.variant,unstyled:t.unstyled,pt:o.getCheckboxPTOptions(k,v,A,"itemCheckbox")},{icon:H(function(w){return[t.$slots.itemcheckboxicon?(g(),P(yt(t.$slots.itemcheckboxicon),{key:0,checked:w.checked,class:pe(w.class)},null,8,["checked","class"])):w.checked?(g(),P(yt(t.checkboxIcon?"span":"CheckIcon"),T({key:1,class:[w.class,dh({},t.checkboxIcon,w.checked)]},o.getCheckboxPTOptions(k,v,A,"itemCheckbox.icon")),null,16,["class"])):B("",!0)]}),_:2},1032,["modelValue","variant","unstyled","pt"]),Q(t.$slots,"option",{option:k,index:o.getOptionIndex(A,v)},function(){return[E("span",it(kt(t.ptm("option"))),_(o.getOptionLabel(k)),17)]})],16,iB)),[[d]])],64)}),128)),r.filterValue&&(!m||m&&m.length===0)?(g(),O("li",T({key:0,class:t.cx("emptyMessage"),role:"option"},t.ptm("emptyMessage")),[Q(t.$slots,"emptyfilter",{},function(){return[ht(_(o.emptyFilterMessageText),1)]})],16)):!t.options||t.options&&t.options.length===0?(g(),O("li",T({key:1,class:t.cx("emptyMessage"),role:"option"},t.ptm("emptyMessage")),[Q(t.$slots,"empty",{},function(){return[ht(_(o.emptyMessageText),1)]})],16)):B("",!0)],16,tB)]}),_:2},[t.$slots.loader?{name:"loader",fn:H(function(f){var p=f.options;return[Q(t.$slots,"loader",{options:p})]}),key:"0"}:void 0]),1040,["items","style","disabled","pt"])],16),Q(t.$slots,"footer",{value:t.modelValue,options:o.visibleOptions}),!t.options||t.options&&t.options.length===0?(g(),O("span",T({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),_(o.emptyMessageText),17)):B("",!0),E("span",T({role:"status","aria-live":"polite",class:"p-hidden-accessible"},t.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),_(o.selectedMessageText),17),E("span",T({ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:e[10]||(e[10]=function(){return o.onLastHiddenFocus&&o.onLastHiddenFocus.apply(o,arguments)})},t.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16)],16)):B("",!0)]}),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]}),_:3},8,["appendTo"])],16)}AA.render=rB;const oB=ce("MultiSelect",Ae({__name:"MultiSelect",props:{modelValue:{},initialValue:{},label:{},options:{},optionLabel:{},optionValue:{},useValidator:{type:Boolean},mandatory:{type:Boolean},showOptionalText:{type:Boolean,default:void 0},validatorMessage:{},fieldName:{},placeholder:{},loading:{type:Boolean},fieldInfo:{},controls:{type:Boolean},disabled:{type:Boolean},filter:{type:Boolean,default:!0},filterPlaceholder:{},display:{default:"chip"},selectedItemsLabel:{},maxSelectedLabels:{}},emits:["update:modelValue","show","hide"],setup(t,{expose:e,emit:n}){const i=t,r=n;wt(()=>{p(),Ye.on("multi-select:hide-overlay",m)}),Fo(()=>{Ye.off("multi-select:hide-overlay")});const{locale:o}=Zt("MultiSelect"),s=dt("preset",{}).multiselect,a=oe(!1),l=re(),u=hn({value:i.initialValue?i.initialValue:i.modelValue}),c=X(()=>eb(i.options)),d=X(()=>{var S;return o.emptySelectionErrorMessage.replace("{label}",i.label).replace("{formattedLabel}",(S=ep(i.label))==null?void 0:S.toLowerCase())}),f=X(()=>{var S;return i.loading?o.loadingPlaceholder:i.placeholder??((S=o.inputPlaceholder)==null?void 0:S.replace("{label}",i.label??"").replace("{lowercaseLabel}",(i.label??"").toLowerCase()))}),p=()=>{var S;i.useValidator&&(Object.assign(u,Nn(i.fieldName??"multiSelect",b=>!(Array.isArray(b)&&b.length)&&i.mandatory?typeof i.validatorMessage=="object"&&"empty"in i.validatorMessage?i.validatorMessage.empty:i.validatorMessage??d.value:!0)),(S=i.initialValue)!=null&&S.length&&(u.value=i.initialValue))},h=()=>{l.value&&l.value.show()},m=()=>{l.value&&l.value.hide()},v=S=>{const b=S!=null&&S.length?S:void 0;r("update:modelValue",b)};return $e(()=>u.value,()=>{v(u.value)}),$e(()=>i.modelValue,S=>{u.value=S}),$e(()=>i.initialValue,S=>{u.value=S},{once:!0}),e({isShowOverlay:a,showOverlay:h,hideOverlay:m}),(S,b)=>(g(),P(pi,{info:S.fieldInfo,label:i.label,mandatory:i.mandatory,"show-optional-text":S.showOptionalText},{default:H(()=>[L(fo,{class:pe({"rounded-none !ring-0 !w-max":S.controls}),disabled:i.disabled,invalid:!!u.errorMessage},{default:H(()=>{var k;return[L(x(AA),T(i,{ref_key:"multiselect",ref:l,modelValue:u.value,"onUpdate:modelValue":b[0]||(b[0]=A=>u.value=A),"aria-describedby":i.label+"error",class:[{"invisible !w-0":S.controls}],display:i.display,"filter-placeholder":i.filterPlaceholder||x(o).filterPlaceholder,"max-selected-labels":i.maxSelectedLabels,options:c.value,placeholder:f.value,"selected-items-label":i.selectedItemsLabel,"show-toggle-all":i.filter,"virtual-scroller-options":(((k=S.options)==null?void 0:k.length)??0)>10?{itemSize:32}:void 0,onHide:b[1]||(b[1]=A=>(a.value=!1,S.$emit("hide"))),onShow:b[2]||(b[2]=A=>(S.$emit("show"),a.value=!0))}),In({dropdownicon:H(()=>[L(Ee,it(kt(x(s).dropdownicon({state:{isShowOverlay:a.value}}))),null,16)]),headercheckboxicon:H(()=>[L(Ee,{icon:"check"})]),itemcheckboxicon:H(()=>[L(Ee,{icon:"check"})]),filtericon:H(()=>[L(Ee,it(kt(x(s).filtericon)),null,16)]),removetokenicon:H(({removeCallback:A,item:w})=>[L(We,T({onClick:Ot(y=>A(y,w),["stop"])},x(s).removeTokenIcon,{icon:"close",rounded:"",severity:"dark",text:""}),null,16,["onClick"])]),loadingicon:H(()=>[L(Ee,it(kt(x(s).loadingicon)),null,16)]),_:2},[S.loading?{name:"value",fn:H(({placeholder:A})=>[E("span",it(kt(x(s).loadingplaceholder)),_(A),17)]),key:"0"}:void 0]),1040,["modelValue","aria-describedby","class","display","filter-placeholder","max-selected-labels","options","placeholder","selected-items-label","show-toggle-all","virtual-scroller-options"]),Q(S.$slots,"trigger",{disabled:i.disabled},()=>[S.controls?(g(),P(We,{key:0,disabled:i.disabled,onClick:h,class:"!rounded !ring-0",icon:"add"},null,8,["disabled"])):B("",!0)])]}),_:3},8,["class","disabled","invalid"]),L(Fn,{id:i.label+"error",message:u.errorMessage},null,8,["id","message"])]),_:3},8,["info","label","mandatory","show-optional-text"]))}})),qte=ce("Paginator",Ae({__name:"Paginator",props:wn({totalRecords:{},rows:{},first:{},pageLinkSize:{},rowsPerPageOptions:{},template:{},currentPageReportTemplate:{},alwaysShow:{type:Boolean},pt:{},ptOptions:{}},{rows:{},rowsModifiers:{}}),emits:wn(["page","update:rows"],["update:rows"]),setup(t){const e=ni(t,"rows"),n=dt("preset",{}).datatable;return(i,r)=>(g(),P(x(Fp),T({rows:e.value,"onUpdate:rows":r[0]||(r[0]=o=>e.value=o)},x(n).paginator({context:{totalRecords:i.totalRecords}}),{template:i.template,"total-records":i.totalRecords,onPage:r[1]||(r[1]=o=>i.$emit("page",o))}),{firstpagelinkicon:H(()=>[L(Ee,{icon:"round-keyboard-double-arrow-left"})]),lastpagelinkicon:H(()=>[L(Ee,{icon:"round-keyboard-double-arrow-right"})]),prevpagelinkicon:H(()=>[L(Ee,{icon:"round-keyboard-arrow-left"})]),nextpagelinkicon:H(()=>[L(Ee,{icon:"round-keyboard-arrow-right"})]),_:1},16,["rows","template","total-records"]))}})),fh=ce("TabMenu",Ae({__name:"TabMenu",props:{menu:{},type:{default:"tab"},activeIndex:{default:0},useTrailingLine:{type:Boolean,default:!0},model:{},pt:{}},emits:["tabChange","update:activeIndex"],setup(t){return(e,n)=>(g(),P(x(H9),{"active-index":e.activeIndex,model:e.model||e.menu,type:e.type,"use-trailing-line":e.useTrailingLine,onTabChange:n[0]||(n[0]=i=>e.$emit("tabChange",i)),"onUpdate:activeIndex":n[1]||(n[1]=i=>e.$emit("update:activeIndex",i)),onVnodeBeforeMount:n[2]||(n[2]=i=>x(m1)("WANGS-TAB-MENU",e.$preset.tabmenu))},null,8,["active-index","model","type","use-trailing-line"]))}})),sB={class:"text-[10px] leading-3 tracking-[0.03em] flex gap-1","data-wv-name":"tagtype"},aB=["data-wv-section"],SA=ce("TagType",Ae({__name:"TagType",props:{type:{},useNfc:{type:Boolean,default:void 0}},setup(t){const e=t,{defaultProps:n}=Zt("TagType"),i=X(()=>zi(e,n)),r=X(()=>[{tag:"rfid",active:i.value.type.includes("RFID")},{tag:"nfc",active:i.value.type.includes("NFC"),visible:i.value.useNfc},{tag:"qr",active:i.value.type.includes("QR")}].filter(o=>o.visible!==!1));return(o,s)=>(g(),O("span",sB,[(g(!0),O(ue,null,Je(r.value,a=>(g(),O("span",{key:a.tag,class:pe(["inline-flex items-center gap-[1px]",{"text-primary-700":a.active,"text-general-200":!a.active}]),"data-wv-section":a.tag},[L(Ee,{class:pe({"!w-[14px]":a.tag==="rfid"}),icon:a.tag},null,8,["class","icon"]),ht(" "+_(a.tag.toUpperCase()),1)],10,aB))),128))]))}}));var lB={root:function(e){var n=e.instance,i=e.props;return["p-inputtextarea p-inputtext p-component",{"p-filled":n.filled,"p-inputtextarea-resizable ":i.autoResize,"p-invalid":i.invalid,"p-variant-filled":i.variant?i.variant==="filled":n.$primevue.config.inputStyle==="filled"}]}},uB=Wt.extend({name:"textarea",classes:lB}),cB={name:"BaseTextarea",extends:It,props:{modelValue:null,autoResize:Boolean,invalid:{type:Boolean,default:!1},variant:{type:String,default:null}},style:uB,provide:function(){return{$parentInstance:this}}},CA={name:"Textarea",extends:cB,inheritAttrs:!1,emits:["update:modelValue"],mounted:function(){this.$el.offsetParent&&this.autoResize&&this.resize()},updated:function(){this.$el.offsetParent&&this.autoResize&&this.resize()},methods:{resize:function(){this.$el.style.height="auto",this.$el.style.height=this.$el.scrollHeight+"px",parseFloat(this.$el.style.height)>=parseFloat(this.$el.style.maxHeight)?(this.$el.style.overflowY="scroll",this.$el.style.height=this.$el.style.maxHeight):this.$el.style.overflow="hidden"},onInput:function(e){this.autoResize&&this.resize(),this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return this.modelValue!=null&&this.modelValue.toString().length>0},ptmParams:function(){return{context:{disabled:this.$attrs.disabled||this.$attrs.disabled===""}}}}},dB=["value","aria-invalid"];function fB(t,e,n,i,r,o){return g(),O("textarea",T({class:t.cx("root"),value:t.modelValue,"aria-invalid":t.invalid||void 0,onInput:e[0]||(e[0]=function(){return o.onInput&&o.onInput.apply(o,arguments)})},t.ptmi("root",o.ptmParams)),null,16,dB)}CA.render=fB;const uc=ce("Textarea",Ae({__name:"Textarea",props:{modelValue:{},value:{},invalid:{type:Boolean},disabled:{type:Boolean},autoResize:{type:Boolean,default:!0},variant:{},useValidator:{type:Boolean},validatorMessage:{},fieldName:{default:"textareaInput"},fieldInfo:{},mandatory:{type:Boolean},maxInput:{default:void 0},maxlength:{},preventInputOnMaxLength:{type:Boolean,default:!0},inputClass:{},rows:{default:5},placeholder:{},label:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e;wt(()=>{u()});const{locale:r}=Zt("TextArea"),o=dt("preset",{}).textarea,s=hn({value:void 0}),a=X(()=>n.invalid||!!s.errorMessage),l=X(()=>{var f,p;return n.placeholder??((p=r.defaultPlaceholder)==null?void 0:p.replace("{label}",((f=n.label)==null?void 0:f.toLowerCase())??""))}),u=()=>{var f,p;n.useValidator&&Object.assign(s,Nn(n.fieldName,h=>Et(()=>c(h)))),(n.value??n.modelValue)&&(s.value=((f=n.value)==null?void 0:f.trim())??((p=n.modelValue)==null?void 0:p.trim())),n.invalid&&n.useValidator&&s.validate()},c=f=>{if(typeof n.validatorMessage=="string"&&n.invalid)return n.validatorMessage;if(typeof n.validatorMessage!="string"){const{empty:p,exceed:h}=n.validatorMessage??{};if(!f&&n.mandatory)return p??r.emptyInvalidText.replace("{label}",n.label);if(n.maxInput&&((f==null?void 0:f.length)??0)>n.maxInput||n.maxlength&&((f==null?void 0:f.length)??0)>n.maxlength)return h??r.exceedMaxLengthInvalidText.replace("{maxLength}",(n.maxInput??n.maxlength).toString())}return!0},d=()=>{var f;s.value=(f=s.value)==null?void 0:f.trim(),i("update:modelValue",s.value)};return $e(()=>n.value,f=>{s.value=f==null?void 0:f.trim()},{once:!0}),$e(()=>n.modelValue,f=>{s.value=f}),(f,p)=>(g(),P(pi,{info:f.fieldInfo,label:n.label,mandatory:n.mandatory},{default:H(()=>[L(x(CA),T({modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=h=>s.value=h)},x(o).root({props:n,context:{disabled:f.disabled,invalidInput:a.value}}),{"auto-resize":f.autoResize,disabled:f.disabled,maxlength:f.preventInputOnMaxLength?f.maxlength:void 0,placeholder:l.value,rows:f.rows,onBlur:d,"onUpdate:modelValue":p[1]||(p[1]=h=>i("update:modelValue",h))}),null,16,["modelValue","auto-resize","disabled","maxlength","placeholder","rows"]),L(Fn,{message:s.errorMessage},null,8,["message"])]),_:1},8,["info","label","mandatory"]))}}));var pB={root:function(e){var n=e.props;return["p-timeline p-component","p-timeline-"+n.align,"p-timeline-"+n.layout]},event:"p-timeline-event",opposite:"p-timeline-event-opposite",separator:"p-timeline-event-separator",marker:"p-timeline-event-marker",connector:"p-timeline-event-connector",content:"p-timeline-event-content"},hB=Wt.extend({name:"timeline",classes:pB}),mB={name:"BaseTimeline",extends:It,props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},style:hB,provide:function(){return{$parentInstance:this}}},kA={name:"Timeline",extends:mB,inheritAttrs:!1,methods:{getKey:function(e,n){return this.dataKey?Ce.resolveFieldData(e,this.dataKey):n},getPTOptions:function(e,n){return this.ptm(e,{context:{index:n,count:this.value.length}})}}};function gB(t,e,n,i,r,o){return g(),O("div",T({class:t.cx("root")},t.ptmi("root")),[(g(!0),O(ue,null,Je(t.value,function(s,a){return g(),O("div",T({key:o.getKey(s,a),class:t.cx("event")},o.getPTOptions("event",a)),[E("div",T({class:t.cx("opposite",{index:a})},o.getPTOptions("opposite",a)),[Q(t.$slots,"opposite",{item:s,index:a})],16),E("div",T({class:t.cx("separator")},o.getPTOptions("separator",a)),[Q(t.$slots,"marker",{item:s,index:a},function(){return[E("div",T({class:t.cx("marker")},o.getPTOptions("marker",a)),null,16)]}),a!==t.value.length-1?Q(t.$slots,"connector",{key:0,item:s,index:a},function(){return[E("div",T({class:t.cx("connector")},o.getPTOptions("connector",a)),null,16)]}):B("",!0)],16),E("div",T({class:t.cx("content")},o.getPTOptions("content",a)),[Q(t.$slots,"content",{item:s,index:a})],16)],16)}),128))],16)}kA.render=gB;const vB={key:0},Ml=ce("UserName",Ae({__name:"UserName",props:{user:{},fetchDetailOnPanelShow:{type:Boolean,default:!0},detailUserPath:{},type:{},showUserName:{type:Boolean,default:!0},userNameField:{},profilePictureField:{},getUserDetail:{}},setup(t){const e=t,{locale:n,defaultProps:i}=Zt("UserName"),r=X(()=>zi(e,i)),o=oe(!1),s=oe(),a=oe(!1),l=re(),u=X(()=>zn(e.user??{},r.value.userNameField)),c=X(()=>x1(u.value)),d=async()=>{var f,p,h;if(!s.value&&e.fetchDetailOnPanelShow)try{o.value=!0;const m=await((h=(p=r.value).getUserDetail)==null?void 0:h.call(p,(f=e.user)==null?void 0:f._id));s.value=m}catch(m){console.error(m)}finally{o.value=!1}else e.fetchDetailOnPanelShow||(s.value=e.user)};return(f,p)=>{const h=on("tooltip");return Object.keys(e.user??{}).length<1?(g(),O("span",vB," - ")):(g(),O("span",T({key:1,onClick:p[4]||(p[4]=(...m)=>{var v,S;return((v=l.value)==null?void 0:v.toggle)&&((S=l.value)==null?void 0:S.toggle(...m))})},f.$preset.username.root,{"data-wv-name":"username","data-wv-section":"root"}),[r.value.type=="picture"?(g(),P(hr,{key:0,preview:u.value!==void 0,src:x(zn)(e.user??{},r.value.profilePictureField),onClick:p[0]||(p[0]=Ot(m=>{var v;u.value||(v=l.value)==null||v.toggle(m)},["stop"])),rounded:"",size:"small"},null,8,["preview","src"])):(g(),P(Ee,{key:1,class:"text-general-300 text-base",icon:"user"})),f.showUserName?ft((g(),O("span",T({key:2},f.$preset.username.displayname({props:e}),{"data-wv-section":"displayname"}),[ht(_(c.value),1)],16)),[[h,c.value===u.value?void 0:u.value,void 0,{top:!0}]]):B("",!0),Object.keys(e.user??{}).length>1?(g(),P(Zu,{key:3,ref_key:"miniProfile",ref:l,dismissable:!a.value,onShow:d},{default:H(()=>{var m,v,S,b,k,A,w,y;return[E("div",T(f.$preset.username.panel.contentwrapper,{"data-wv-section":"contentwrapper"}),[E("div",T(f.$preset.username.panel.background,{"data-wv-section":"background"}),null,16),L(hr,{src:((m=s.value)==null?void 0:m.profilePicture)??((v=s.value)==null?void 0:v.profilePictureBig),width:60,onHide:p[1]||(p[1]=C=>a.value=!1),onShow:p[2]||(p[2]=C=>a.value=!0),class:"w-[60px] h-[60px]",rounded:""},null,8,["src"]),o.value?(g(),P(x(dl),{key:1,height:"29px",width:"100px"})):(g(),O("div",it(T({key:0},f.$preset.username.panel.detailwrapper)),[E("h4",T(f.$preset.username.panel.username,{"data-wv-section":"username"}),[ht(_((S=s.value)==null?void 0:S.fullName)+" ",1),(b=s.value)!=null&&b.nickName?(g(),O(ue,{key:0},[ht(" ("+_((k=s.value)==null?void 0:k.nickName)+") ",1)],64)):B("",!0)],16),E("span",T(f.$preset.username.panel.useremail,{"data-wv-section":"useremail"}),_((A=s.value)==null?void 0:A.email),17)],16)),o.value?(g(),P(x(dl),{key:3,height:"12px",width:"60px"})):(g(),O("span",T({key:2},f.$preset.username.panel.positiondivision,{"data-wv-section":"positiondivision"}),_((w=s.value)==null?void 0:w.division)+" / "+_((y=s.value)==null?void 0:y.position),17)),o.value?(g(),P(x(dl),{key:5,width:"75px"})):(g(),O("a",T({key:4,onClick:p[3]||(p[3]=Ot(C=>{var I;return x(Sa)(r.value.detailUserPath.replace("{userId}",(I=e.user)==null?void 0:I._id))},["stop"]))},f.$preset.username.panel.userdetaillink,{"data-wv-section":"userdetaillink"}),_(x(n).detailUserAnchorText),17))],16)]}),_:1},8,["dismissable"])):B("",!0)],16))}}})),yB="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.14994%200H14.1739L20.9745%207.08846V20.8756C20.9745%2022.6027%2019.5772%2024%2017.8561%2024H6.14994C4.42281%2024%203.02551%2022.6027%203.02551%2020.8756V3.12443C3.02548%201.3973%204.42278%200%206.14994%200Z'%20fill='%2353C26F'/%3e%3cpath%20d='M8.38742%2017.7024C8.01617%2017.7024%207.69563%2017.6216%207.42578%2017.46C7.15766%2017.2985%206.95055%2017.0725%206.80445%2016.782C6.66008%2016.4915%206.58789%2016.1538%206.58789%2015.7688C6.58789%2015.3838%206.66008%2015.0461%206.80445%2014.7556C6.95055%2014.4651%207.15766%2014.2391%207.42578%2014.0775C7.69563%2013.916%208.01617%2013.8352%208.38742%2013.8352C8.81367%2013.8352%209.17117%2013.9409%209.45992%2014.1523C9.75039%2014.3637%209.95492%2014.6499%2010.0735%2015.0108L9.36711%2015.2068C9.29836%2014.9816%209.18234%2014.8072%209.01906%2014.6834C8.85578%2014.5579%208.64523%2014.4952%208.38742%2014.4952C8.15195%2014.4952%207.95516%2014.5476%207.79703%2014.6525C7.64062%2014.7573%207.52289%2014.9051%207.44383%2015.0959C7.36477%2015.2867%207.32523%2015.511%207.32523%2015.7688C7.32523%2016.0266%207.36477%2016.2509%207.44383%2016.4417C7.52289%2016.6325%207.64062%2016.7803%207.79703%2016.8851C7.95516%2016.99%208.15195%2017.0424%208.38742%2017.0424C8.64523%2017.0424%208.85578%2016.9797%209.01906%2016.8542C9.18234%2016.7287%209.29836%2016.5543%209.36711%2016.3308L10.0735%2016.5268C9.95492%2016.8877%209.75039%2017.1739%209.45992%2017.3853C9.17117%2017.5967%208.81367%2017.7024%208.38742%2017.7024Z'%20fill='white'/%3e%3cpath%20d='M12.3545%2017.7024C12.0795%2017.7024%2011.8311%2017.6543%2011.6094%2017.558C11.3894%2017.46%2011.2081%2017.3208%2011.0654%2017.1404C10.9245%2016.9582%2010.8351%2016.7416%2010.7973%2016.4907L11.5295%2016.3824C11.581%2016.5955%2011.6876%2016.7597%2011.8492%2016.8748C12.0107%2016.99%2012.1946%2017.0475%2012.4009%2017.0475C12.516%2017.0475%2012.6278%2017.0295%2012.736%2016.9934C12.8443%2016.9573%2012.9328%2016.904%2013.0016%2016.8336C13.072%2016.7631%2013.1073%2016.6763%2013.1073%2016.5732C13.1073%2016.5354%2013.1013%2016.4993%2013.0892%2016.4649C13.0789%2016.4288%2013.0609%2016.3953%2013.0351%2016.3643C13.0093%2016.3334%2012.9724%2016.3042%2012.9242%2016.2767C12.8778%2016.2492%2012.8185%2016.2243%2012.7463%2016.2019L11.7821%2015.9183C11.7099%2015.8977%2011.6257%2015.8685%2011.5295%2015.8307C11.4349%2015.7929%2011.343%2015.7387%2011.2536%2015.6683C11.1642%2015.5978%2011.0895%2015.505%2011.0293%2015.3898C10.9709%2015.2729%2010.9417%2015.126%2010.9417%2014.949C10.9417%2014.6997%2011.0044%2014.4926%2011.1299%2014.3276C11.2553%2014.1626%2011.4229%2014.0397%2011.6326%2013.959C11.8423%2013.8782%2012.0743%2013.8386%2012.3287%2013.8404C12.5848%2013.8438%2012.8134%2013.8876%2013.0145%2013.9718C13.2156%2014.0561%2013.384%2014.179%2013.5198%2014.3405C13.6556%2014.5004%2013.7535%2014.6963%2013.8137%2014.9283L13.0557%2015.0572C13.0282%2014.9369%2012.9775%2014.8355%2012.9036%2014.753C12.8297%2014.6705%2012.7412%2014.6078%2012.6381%2014.5648C12.5367%2014.5218%2012.4301%2014.4986%2012.3184%2014.4952C12.2084%2014.4918%2012.1044%2014.5072%2012.0064%2014.5416C11.9102%2014.5743%2011.8311%2014.6224%2011.7692%2014.686C11.7091%2014.7496%2011.679%2014.8252%2011.679%2014.9129C11.679%2014.9936%2011.7039%2015.0598%2011.7538%2015.1114C11.8036%2015.1612%2011.8663%2015.2016%2011.942%2015.2325C12.0176%2015.2635%2012.0949%2015.2893%2012.174%2015.3099L12.8185%2015.4852C12.9148%2015.511%2013.0213%2015.5454%2013.1382%2015.5883C13.2551%2015.6296%2013.3668%2015.688%2013.4734%2015.7636C13.5817%2015.8375%2013.6702%2015.9355%2013.7389%2016.0575C13.8094%2016.1796%2013.8446%2016.3343%2013.8446%2016.5216C13.8446%2016.721%2013.8025%2016.8954%2013.7183%2017.045C13.6358%2017.1928%2013.5241%2017.3157%2013.3831%2017.4136C13.2422%2017.5099%2013.0824%2017.5821%2012.9036%2017.6302C12.7266%2017.6783%2012.5435%2017.7024%2012.3545%2017.7024Z'%20fill='white'/%3e%3cpath%20d='M15.2645%2017.625L14.1301%2013.9125H14.852L15.7801%2016.965L16.7237%2013.9125H17.4456L16.3112%2017.625H15.2645Z'%20fill='white'/%3e%3cpath%20opacity='0.302'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.168%200V7.03449H20.9746L14.168%200Z'%20fill='white'/%3e%3c/svg%3e",bB="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.14994%200H14.1739L20.9745%207.08846V20.8756C20.9745%2022.6027%2019.5772%2024%2017.8561%2024H6.14994C4.42281%2024%203.02551%2022.6027%203.02551%2020.8756V3.12443C3.02548%201.3973%204.42278%200%206.14994%200Z'%20fill='%234E4B66'/%3e%3cpath%20d='M5.43604%2017.6251V13.9126H6.63744C6.66666%2013.9126%206.72682%2013.9135%206.81791%2013.9152C6.909%2013.9169%206.99666%2013.9229%207.08088%2013.9332C7.37994%2013.9693%207.63346%2014.0733%207.84143%2014.2452C8.04939%2014.4171%208.20752%2014.6353%208.3158%2014.9C8.42408%2015.1647%208.47822%2015.4543%208.47822%2015.7688C8.47822%2016.0834%208.42408%2016.373%208.3158%2016.6377C8.20752%2016.9024%208.04939%2017.1206%207.84143%2017.2925C7.63346%2017.4644%207.37994%2017.5684%207.08088%2017.6045C6.99666%2017.6148%206.909%2017.6208%206.81791%2017.6225C6.72682%2017.6242%206.66666%2017.6251%206.63744%2017.6251H5.43604ZM6.1476%2016.9651H6.63744C6.68385%2016.9651%206.74658%2016.9642%206.82564%2016.9625C6.90471%2016.9591%206.97604%2016.9513%207.03963%2016.9393C7.20119%2016.9067%207.33268%2016.831%207.43408%2016.7124C7.53721%2016.5938%207.61283%2016.4512%207.66096%2016.2845C7.7108%2016.1178%207.73572%2015.9459%207.73572%2015.7688C7.73572%2015.5832%207.70994%2015.4071%207.65838%2015.2403C7.60854%2015.0736%207.53205%2014.9327%207.42893%2014.8175C7.3258%2014.7024%207.19604%2014.6293%207.03963%2014.5984C6.97604%2014.5846%206.90471%2014.5769%206.82564%2014.5752C6.74658%2014.5735%206.68385%2014.5726%206.63744%2014.5726H6.1476V16.9651Z'%20fill='white'/%3e%3cpath%20d='M8.89294%2017.6251L10.0273%2013.9126H11.074L12.2084%2017.6251H11.4865L10.4759%2014.3509H10.61L9.61481%2017.6251H8.89294ZM9.57356%2016.8517V16.1968H11.5329V16.8517H9.57356Z'%20fill='white'/%3e%3cpath%20d='M13.3791%2017.6251V14.5674H12.2086V13.9126H15.2508V14.5674H14.0804V17.6251H13.3791Z'%20fill='white'/%3e%3cpath%20d='M15.4613%2017.6251L16.5957%2013.9126H17.6424L18.7768%2017.6251H18.0549L17.0443%2014.3509H17.1783L16.1832%2017.6251H15.4613ZM16.1419%2016.8517V16.1968H18.1013V16.8517H16.1419Z'%20fill='white'/%3e%3cpath%20opacity='0.302'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.168%200V7.03449H20.9746L14.168%200Z'%20fill='white'/%3e%3c/svg%3e",AB="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.14994%200H14.1739L20.9745%207.08846V20.8756C20.9745%2022.6027%2019.5772%2024%2017.8561%2024H6.14994C4.42281%2024%203.02551%2022.6027%203.02551%2020.8756V3.12443C3.02548%201.3973%204.42278%200%206.14994%200Z'%20fill='%232A61CA'/%3e%3cpath%20d='M6.47522%2017.625V13.9125H7.67663C7.70584%2013.9125%207.766%2013.9134%207.85709%2013.9151C7.94819%2013.9168%208.03584%2013.9229%208.12006%2013.9332C8.41913%2013.9693%208.67264%2014.0733%208.88061%2014.2451C9.08858%2014.417%209.2467%2014.6353%209.35499%2014.9C9.46327%2015.1647%209.51741%2015.4543%209.51741%2015.7688C9.51741%2016.0833%209.46327%2016.3729%209.35499%2016.6376C9.2467%2016.9023%209.08858%2017.1206%208.88061%2017.2925C8.67264%2017.4643%208.41913%2017.5683%208.12006%2017.6044C8.03584%2017.6147%207.94819%2017.6208%207.85709%2017.6225C7.766%2017.6242%207.70584%2017.625%207.67663%2017.625H6.47522ZM7.18678%2016.965H7.67663C7.72303%2016.965%207.78577%2016.9642%207.86483%2016.9625C7.94389%2016.959%208.01522%2016.9513%208.07881%2016.9393C8.24038%2016.9066%208.37186%2016.831%208.47327%2016.7124C8.57639%2016.5938%208.65202%2016.4511%208.70014%2016.2844C8.74999%2016.1177%208.77491%2015.9458%208.77491%2015.7688C8.77491%2015.5832%208.74913%2015.407%208.69756%2015.2403C8.64772%2015.0736%208.57124%2014.9326%208.46811%2014.8175C8.36499%2014.7023%208.23522%2014.6293%208.07881%2014.5983C8.01522%2014.5846%207.94389%2014.5768%207.86483%2014.5751C7.78577%2014.5734%207.72303%2014.5725%207.67663%2014.5725H7.18678V16.965Z'%20fill='white'/%3e%3cpath%20d='M11.8839%2017.7024C11.5127%2017.7024%2011.1921%2017.6216%2010.9223%2017.46C10.6542%2017.2985%2010.447%2017.0725%2010.301%2016.782C10.1566%2016.4915%2010.0844%2016.1538%2010.0844%2015.7688C10.0844%2015.3838%2010.1566%2015.0461%2010.301%2014.7556C10.447%2014.4651%2010.6542%2014.2391%2010.9223%2014.0775C11.1921%2013.916%2011.5127%2013.8352%2011.8839%2013.8352C12.2552%2013.8352%2012.5749%2013.916%2012.843%2014.0775C13.1128%2014.2391%2013.3199%2014.4651%2013.4643%2014.7556C13.6104%2015.0461%2013.6835%2015.3838%2013.6835%2015.7688C13.6835%2016.1538%2013.6104%2016.4915%2013.4643%2016.782C13.3199%2017.0725%2013.1128%2017.2985%2012.843%2017.46C12.5749%2017.6216%2012.2552%2017.7024%2011.8839%2017.7024ZM11.8839%2017.0424C12.1194%2017.0458%2012.3153%2016.9951%2012.4717%2016.8903C12.6281%2016.7854%2012.745%2016.6368%2012.8224%2016.4443C12.9014%2016.2518%2012.941%2016.0266%2012.941%2015.7688C12.941%2015.511%2012.9014%2015.2875%2012.8224%2015.0985C12.745%2014.9094%2012.6281%2014.7625%2012.4717%2014.6576C12.3153%2014.5528%2012.1194%2014.4986%2011.8839%2014.4952C11.6485%2014.4918%2011.4525%2014.5425%2011.2961%2014.6473C11.1397%2014.7522%2011.022%2014.9008%2010.9429%2015.0933C10.8656%2015.2858%2010.8269%2015.511%2010.8269%2015.7688C10.8269%2016.0266%2010.8656%2016.25%2010.9429%2016.4391C11.022%2016.6282%2011.1397%2016.7751%2011.2961%2016.88C11.4525%2016.9848%2011.6485%2017.039%2011.8839%2017.0424Z'%20fill='white'/%3e%3cpath%20d='M15.9461%2017.7024C15.5748%2017.7024%2015.2543%2017.6216%2014.9844%2017.46C14.7163%2017.2985%2014.5092%2017.0725%2014.3631%2016.782C14.2187%2016.4915%2014.1466%2016.1538%2014.1466%2015.7688C14.1466%2015.3838%2014.2187%2015.0461%2014.3631%2014.7556C14.5092%2014.4651%2014.7163%2014.2391%2014.9844%2014.0775C15.2543%2013.916%2015.5748%2013.8352%2015.9461%2013.8352C16.3723%2013.8352%2016.7298%2013.9409%2017.0186%2014.1523C17.3091%2014.3637%2017.5136%2014.6499%2017.6322%2015.0108L16.9258%2015.2068C16.857%2014.9816%2016.741%2014.8072%2016.5777%2014.6834C16.4144%2014.5579%2016.2039%2014.4952%2015.9461%2014.4952C15.7106%2014.4952%2015.5138%2014.5476%2015.3557%2014.6525C15.1993%2014.7573%2015.0816%2014.9051%2015.0025%2015.0959C14.9234%2015.2867%2014.8839%2015.511%2014.8839%2015.7688C14.8839%2016.0266%2014.9234%2016.2509%2015.0025%2016.4417C15.0816%2016.6325%2015.1993%2016.7803%2015.3557%2016.8851C15.5138%2016.99%2015.7106%2017.0424%2015.9461%2017.0424C16.2039%2017.0424%2016.4144%2016.9797%2016.5777%2016.8542C16.741%2016.7287%2016.857%2016.5543%2016.9258%2016.3308L17.6322%2016.5268C17.5136%2016.8877%2017.3091%2017.1739%2017.0186%2017.3853C16.7298%2017.5967%2016.3723%2017.7024%2015.9461%2017.7024Z'%20fill='white'/%3e%3cpath%20opacity='0.302'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.168%200V7.03449H20.9746L14.168%200Z'%20fill='white'/%3e%3c/svg%3e",wB="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.14994%200H14.1739L20.9745%207.08846V20.8756C20.9745%2022.6027%2019.5772%2024%2017.8561%2024H6.14994C4.42281%2024%203.02551%2022.6027%203.02551%2020.8756V3.12443C3.02548%201.3973%204.42278%200%206.14994%200Z'%20fill='%23E5252A'/%3e%3cpath%20d='M7.30859%2017.6251V13.9126H8.87609C8.91219%2013.9126%208.96031%2013.9143%209.02047%2013.9178C9.08234%2013.9195%209.13734%2013.9246%209.18547%2013.9332C9.40719%2013.9676%209.58852%2014.0406%209.72945%2014.1524C9.87211%2014.2641%209.97695%2014.405%2010.044%2014.5752C10.111%2014.7436%2010.1445%2014.9318%2010.1445%2015.1398C10.1445%2015.3478%2010.1102%2015.5368%2010.0414%2015.707C9.97438%2015.8754%209.86953%2016.0155%209.72688%2016.1272C9.58594%2016.2389%209.40547%2016.312%209.18547%2016.3463C9.13734%2016.3532%209.08234%2016.3584%209.02047%2016.3618C8.95859%2016.3653%208.91047%2016.367%208.87609%2016.367H8.00984V17.6251H7.30859ZM8.00984%2015.7121H8.84516C8.88125%2015.7121%208.92078%2015.7104%208.96375%2015.707C9.00672%2015.7035%209.04625%2015.6967%209.08234%2015.6863C9.17688%2015.6606%209.24992%2015.6176%209.30148%2015.5574C9.35305%2015.4956%209.38828%2015.4277%209.40719%2015.3538C9.42781%2015.2781%209.43813%2015.2068%209.43813%2015.1398C9.43813%2015.0728%209.42781%2015.0023%209.40719%2014.9284C9.38828%2014.8528%209.35305%2014.7849%209.30148%2014.7247C9.24992%2014.6628%209.17688%2014.619%209.08234%2014.5932C9.04625%2014.5829%209.00672%2014.576%208.96375%2014.5726C8.92078%2014.5692%208.88125%2014.5674%208.84516%2014.5674H8.00984V15.7121Z'%20fill='white'/%3e%3cpath%20d='M10.8169%2017.6251V13.9126H12.0183C12.0475%2013.9126%2012.1076%2013.9135%2012.1987%2013.9152C12.2898%2013.9169%2012.3775%2013.9229%2012.4617%2013.9332C12.7608%2013.9693%2013.0143%2014.0733%2013.2222%2014.2452C13.4302%2014.4171%2013.5883%2014.6353%2013.6966%2014.9C13.8049%2015.1647%2013.859%2015.4543%2013.859%2015.7688C13.859%2016.0834%2013.8049%2016.373%2013.6966%2016.6377C13.5883%2016.9024%2013.4302%2017.1206%2013.2222%2017.2925C13.0143%2017.4644%2012.7608%2017.5684%2012.4617%2017.6045C12.3775%2017.6148%2012.2898%2017.6208%2012.1987%2017.6225C12.1076%2017.6242%2012.0475%2017.6251%2012.0183%2017.6251H10.8169ZM11.5284%2016.9651H12.0183C12.0647%2016.9651%2012.1274%2016.9642%2012.2065%2016.9625C12.2855%2016.9591%2012.3569%2016.9513%2012.4205%2016.9393C12.582%2016.9067%2012.7135%2016.831%2012.8149%2016.7124C12.918%2016.5938%2012.9937%2016.4512%2013.0418%2016.2845C13.0916%2016.1178%2013.1165%2015.9459%2013.1165%2015.7688C13.1165%2015.5832%2013.0908%2015.4071%2013.0392%2015.2403C12.9894%2015.0736%2012.9129%2014.9327%2012.8097%2014.8175C12.7066%2014.7024%2012.5769%2014.6293%2012.4205%2014.5984C12.3569%2014.5846%2012.2855%2014.5769%2012.2065%2014.5752C12.1274%2014.5735%2012.0647%2014.5726%2012.0183%2014.5726H11.5284V16.9651Z'%20fill='white'/%3e%3cpath%20d='M14.6323%2017.6251V13.9126H16.901V14.6138H15.3335V15.4182H16.5917V16.1195H15.3335V17.6251H14.6323Z'%20fill='white'/%3e%3cpath%20opacity='0.302'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.168%200V7.03449H20.9746L14.168%200Z'%20fill='white'/%3e%3c/svg%3e",SB="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.14994%200H14.1739L20.9745%207.08846V20.8756C20.9745%2022.6027%2019.5772%2024%2017.8561%2024H6.14994C4.42281%2024%203.02551%2022.6027%203.02551%2020.8756V3.12443C3.02548%201.3973%204.42278%200%206.14994%200Z'%20fill='%23317141'/%3e%3cpath%20d='M6.99329%2017.6251L8.2411%2015.7482L7.02938%2013.9126H7.89047L8.67938%2015.1501L9.45797%2013.9126H10.3242L9.1125%2015.7482L10.3552%2017.6251H9.49407L8.67938%2016.3463L7.85954%2017.6251H6.99329Z'%20fill='white'/%3e%3cpath%20d='M10.9733%2017.6251V13.9126H11.6745V16.9702H13.273V17.6251H10.9733Z'%20fill='white'/%3e%3cpath%20d='M15.2685%2017.7024C14.9935%2017.7024%2014.7451%2017.6543%2014.5234%2017.558C14.3034%2017.4601%2014.1221%2017.3209%2013.9794%2017.1404C13.8385%2016.9582%2013.7491%2016.7416%2013.7113%2016.4907L14.4435%2016.3824C14.4951%2016.5955%2014.6016%2016.7597%2014.7632%2016.8748C14.9248%2016.99%2015.1087%2017.0476%2015.3149%2017.0476C15.4301%2017.0476%2015.5418%2017.0295%2015.6501%2016.9934C15.7583%2016.9573%2015.8469%2016.9041%2015.9156%2016.8336C15.9861%2016.7631%2016.0213%2016.6763%2016.0213%2016.5732C16.0213%2016.5354%2016.0153%2016.4993%2016.0033%2016.4649C15.993%2016.4288%2015.9749%2016.3953%2015.9491%2016.3644C15.9233%2016.3334%2015.8864%2016.3042%2015.8383%2016.2767C15.7919%2016.2492%2015.7326%2016.2243%2015.6604%2016.2019L14.6962%2015.9184C14.624%2015.8977%2014.5398%2015.8685%2014.4435%2015.8307C14.349%2015.7929%2014.257%2015.7387%2014.1676%2015.6683C14.0783%2015.5978%2014.0035%2015.505%2013.9433%2015.3898C13.8849%2015.273%2013.8557%2015.126%2013.8557%2014.949C13.8557%2014.6998%2013.9184%2014.4927%2014.0439%2014.3277C14.1694%2014.1627%2014.3369%2014.0398%2014.5466%2013.959C14.7563%2013.8782%2014.9883%2013.8387%2015.2427%2013.8404C15.4988%2013.8438%2015.7274%2013.8877%2015.9285%2013.9719C16.1296%2014.0561%2016.298%2014.179%2016.4338%2014.3405C16.5696%2014.5004%2016.6676%2014.6963%2016.7277%2014.9284L15.9698%2015.0573C15.9423%2014.9369%2015.8916%2014.8355%2015.8176%2014.753C15.7437%2014.6705%2015.6552%2014.6078%2015.5521%2014.5648C15.4507%2014.5219%2015.3441%2014.4987%2015.2324%2014.4952C15.1224%2014.4918%2015.0184%2014.5073%2014.9205%2014.5416C14.8242%2014.5743%2014.7451%2014.6224%2014.6833%2014.686C14.6231%2014.7496%2014.593%2014.8252%2014.593%2014.9129C14.593%2014.9937%2014.618%2015.0598%2014.6678%2015.1114C14.7176%2015.1612%2014.7804%2015.2016%2014.856%2015.2326C14.9316%2015.2635%2015.009%2015.2893%2015.088%2015.3099L15.7326%2015.4852C15.8288%2015.511%2015.9354%2015.5454%2016.0523%2015.5884C16.1691%2015.6296%2016.2808%2015.688%2016.3874%2015.7637C16.4957%2015.8376%2016.5842%2015.9355%2016.653%2016.0576C16.7234%2016.1796%2016.7587%2016.3343%2016.7587%2016.5216C16.7587%2016.721%2016.7165%2016.8955%2016.6323%2017.045C16.5498%2017.1928%2016.4381%2017.3157%2016.2972%2017.4137C16.1562%2017.5099%2015.9964%2017.5821%2015.8176%2017.6302C15.6406%2017.6784%2015.4576%2017.7024%2015.2685%2017.7024Z'%20fill='white'/%3e%3cpath%20opacity='0.302'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.168%200V7.03449H20.9746L14.168%200Z'%20fill='white'/%3e%3c/svg%3e";var ph,TA;function CB(){if(TA)return ph;TA=1;function t(z){return z instanceof Map?z.clear=z.delete=z.set=function(){throw new Error("map is read-only")}:z instanceof Set&&(z.add=z.clear=z.delete=function(){throw new Error("set is read-only")}),Object.freeze(z),Object.getOwnPropertyNames(z).forEach(fe=>{const Re=z[fe],at=typeof Re;(at==="object"||at==="function")&&!Object.isFrozen(Re)&&t(Re)}),z}class e{constructor(fe){fe.data===void 0&&(fe.data={}),this.data=fe.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(z){return z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(z,...fe){const Re=Object.create(null);for(const at in z)Re[at]=z[at];return fe.forEach(function(at){for(const Yt in at)Re[Yt]=at[Yt]}),Re}const r="</span>",o=z=>!!z.scope,s=(z,{prefix:fe})=>{if(z.startsWith("language:"))return z.replace("language:","language-");if(z.includes(".")){const Re=z.split(".");return[`${fe}${Re.shift()}`,...Re.map((at,Yt)=>`${at}${"_".repeat(Yt+1)}`)].join(" ")}return`${fe}${z}`};class a{constructor(fe,Re){this.buffer="",this.classPrefix=Re.classPrefix,fe.walk(this)}addText(fe){this.buffer+=n(fe)}openNode(fe){if(!o(fe))return;const Re=s(fe.scope,{prefix:this.classPrefix});this.span(Re)}closeNode(fe){o(fe)&&(this.buffer+=r)}value(){return this.buffer}span(fe){this.buffer+=`<span class="${fe}">`}}const l=(z={})=>{const fe={children:[]};return Object.assign(fe,z),fe};class u{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(fe){this.top.children.push(fe)}openNode(fe){const Re=l({scope:fe});this.add(Re),this.stack.push(Re)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(fe){return this.constructor._walk(fe,this.rootNode)}static _walk(fe,Re){return typeof Re=="string"?fe.addText(Re):Re.children&&(fe.openNode(Re),Re.children.forEach(at=>this._walk(fe,at)),fe.closeNode(Re)),fe}static _collapse(fe){typeof fe!="string"&&fe.children&&(fe.children.every(Re=>typeof Re=="string")?fe.children=[fe.children.join("")]:fe.children.forEach(Re=>{u._collapse(Re)}))}}class c extends u{constructor(fe){super(),this.options=fe}addText(fe){fe!==""&&this.add(fe)}startScope(fe){this.openNode(fe)}endScope(){this.closeNode()}__addSublanguage(fe,Re){const at=fe.root;Re&&(at.scope=`language:${Re}`),this.add(at)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(z){return z?typeof z=="string"?z:z.source:null}function f(z){return m("(?=",z,")")}function p(z){return m("(?:",z,")*")}function h(z){return m("(?:",z,")?")}function m(...z){return z.map(Re=>d(Re)).join("")}function v(z){const fe=z[z.length-1];return typeof fe=="object"&&fe.constructor===Object?(z.splice(z.length-1,1),fe):{}}function S(...z){return"("+(v(z).capture?"":"?:")+z.map(at=>d(at)).join("|")+")"}function b(z){return new RegExp(z.toString()+"|").exec("").length-1}function k(z,fe){const Re=z&&z.exec(fe);return Re&&Re.index===0}const A=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function w(z,{joinWith:fe}){let Re=0;return z.map(at=>{Re+=1;const Yt=Re;let _t=d(at),_e="";for(;_t.length>0;){const Ge=A.exec(_t);if(!Ge){_e+=_t;break}_e+=_t.substring(0,Ge.index),_t=_t.substring(Ge.index+Ge[0].length),Ge[0][0]==="\\"&&Ge[1]?_e+="\\"+String(Number(Ge[1])+Yt):(_e+=Ge[0],Ge[0]==="("&&Re++)}return _e}).map(at=>`(${at})`).join(fe)}const y=/\b\B/,C="[a-zA-Z]\\w*",I="[a-zA-Z_]\\w*",R="\\b\\d+(\\.\\d+)?",M="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",D="\\b(0b[01]+)",$="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",W=(z={})=>{const fe=/^#![ ]*\//;return z.binary&&(z.begin=m(fe,/.*\b/,z.binary,/\b.*/)),i({scope:"meta",begin:fe,end:/$/,relevance:0,"on:begin":(Re,at)=>{Re.index!==0&&at.ignoreMatch()}},z)},ie={begin:"\\\\[\\s\\S]",relevance:0},ve={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ie]},ae={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ie]},me={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},se=function(z,fe,Re={}){const at=i({scope:"comment",begin:z,end:fe,contains:[]},Re);at.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Yt=S("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return at.contains.push({begin:m(/[ ]+/,"(",Yt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),at},Pe=se("//","$"),Be=se("/\\*","\\*/"),xe=se("#","$"),de={scope:"number",begin:R,relevance:0},ge={scope:"number",begin:M,relevance:0},Ie={scope:"number",begin:D,relevance:0},Oe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ie,{begin:/\[/,end:/\]/,relevance:0,contains:[ie]}]},le={scope:"title",begin:C,relevance:0},Se={scope:"title",begin:I,relevance:0},Z={begin:"\\.\\s*"+I,relevance:0};var U=Object.freeze({__proto__:null,APOS_STRING_MODE:ve,BACKSLASH_ESCAPE:ie,BINARY_NUMBER_MODE:Ie,BINARY_NUMBER_RE:D,COMMENT:se,C_BLOCK_COMMENT_MODE:Be,C_LINE_COMMENT_MODE:Pe,C_NUMBER_MODE:ge,C_NUMBER_RE:M,END_SAME_AS_BEGIN:function(z){return Object.assign(z,{"on:begin":(fe,Re)=>{Re.data._beginMatch=fe[1]},"on:end":(fe,Re)=>{Re.data._beginMatch!==fe[1]&&Re.ignoreMatch()}})},HASH_COMMENT_MODE:xe,IDENT_RE:C,MATCH_NOTHING_RE:y,METHOD_GUARD:Z,NUMBER_MODE:de,NUMBER_RE:R,PHRASAL_WORDS_MODE:me,QUOTE_STRING_MODE:ae,REGEXP_MODE:Oe,RE_STARTERS_RE:$,SHEBANG:W,TITLE_MODE:le,UNDERSCORE_IDENT_RE:I,UNDERSCORE_TITLE_MODE:Se});function J(z,fe){z.input[z.index-1]==="."&&fe.ignoreMatch()}function ke(z,fe){z.className!==void 0&&(z.scope=z.className,delete z.className)}function He(z,fe){fe&&z.beginKeywords&&(z.begin="\\b("+z.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",z.__beforeBegin=J,z.keywords=z.keywords||z.beginKeywords,delete z.beginKeywords,z.relevance===void 0&&(z.relevance=0))}function j(z,fe){Array.isArray(z.illegal)&&(z.illegal=S(...z.illegal))}function he(z,fe){if(z.match){if(z.begin||z.end)throw new Error("begin & end are not supported with match");z.begin=z.match,delete z.match}}function De(z,fe){z.relevance===void 0&&(z.relevance=1)}const nt=(z,fe)=>{if(!z.beforeMatch)return;if(z.starts)throw new Error("beforeMatch cannot be used with starts");const Re=Object.assign({},z);Object.keys(z).forEach(at=>{delete z[at]}),z.keywords=Re.keywords,z.begin=m(Re.beforeMatch,f(Re.begin)),z.starts={relevance:0,contains:[Object.assign(Re,{endsParent:!0})]},z.relevance=0,delete Re.beforeMatch},St=["of","and","for","in","not","or","if","then","parent","list","value"],lt="keyword";function bt(z,fe,Re=lt){const at=Object.create(null);return typeof z=="string"?Yt(Re,z.split(" ")):Array.isArray(z)?Yt(Re,z):Object.keys(z).forEach(function(_t){Object.assign(at,bt(z[_t],fe,_t))}),at;function Yt(_t,_e){fe&&(_e=_e.map(Ge=>Ge.toLowerCase())),_e.forEach(function(Ge){const vt=Ge.split("|");at[vt[0]]=[_t,jt(vt[0],vt[1])]})}}function jt(z,fe){return fe?Number(fe):ln(z)?0:1}function ln(z){return St.includes(z.toLowerCase())}const un={},en=z=>{console.error(z)},Vt=(z,...fe)=>{console.log(`WARN: ${z}`,...fe)},Dt=(z,fe)=>{un[`${z}/${fe}`]||(console.log(`Deprecated as of ${z}. ${fe}`),un[`${z}/${fe}`]=!0)},Sn=new Error;function Jt(z,fe,{key:Re}){let at=0;const Yt=z[Re],_t={},_e={};for(let Ge=1;Ge<=fe.length;Ge++)_e[Ge+at]=Yt[Ge],_t[Ge+at]=!0,at+=b(fe[Ge-1]);z[Re]=_e,z[Re]._emit=_t,z[Re]._multi=!0}function ee(z){if(Array.isArray(z.begin)){if(z.skip||z.excludeBegin||z.returnBegin)throw en("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Sn;if(typeof z.beginScope!="object"||z.beginScope===null)throw en("beginScope must be object"),Sn;Jt(z,z.begin,{key:"beginScope"}),z.begin=w(z.begin,{joinWith:""})}}function Y(z){if(Array.isArray(z.end)){if(z.skip||z.excludeEnd||z.returnEnd)throw en("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Sn;if(typeof z.endScope!="object"||z.endScope===null)throw en("endScope must be object"),Sn;Jt(z,z.end,{key:"endScope"}),z.end=w(z.end,{joinWith:""})}}function we(z){z.scope&&typeof z.scope=="object"&&z.scope!==null&&(z.beginScope=z.scope,delete z.scope)}function je(z){we(z),typeof z.beginScope=="string"&&(z.beginScope={_wrap:z.beginScope}),typeof z.endScope=="string"&&(z.endScope={_wrap:z.endScope}),ee(z),Y(z)}function st(z){function fe(_e,Ge){return new RegExp(d(_e),"m"+(z.case_insensitive?"i":"")+(z.unicodeRegex?"u":"")+(Ge?"g":""))}class Re{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ge,vt){vt.position=this.position++,this.matchIndexes[this.matchAt]=vt,this.regexes.push([vt,Ge]),this.matchAt+=b(Ge)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ge=this.regexes.map(vt=>vt[1]);this.matcherRe=fe(w(Ge,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ge){this.matcherRe.lastIndex=this.lastIndex;const vt=this.matcherRe.exec(Ge);if(!vt)return null;const On=vt.findIndex((Mr,_i)=>_i>0&&Mr!==void 0),bn=this.matchIndexes[On];return vt.splice(0,On),Object.assign(vt,bn)}}class at{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ge){if(this.multiRegexes[Ge])return this.multiRegexes[Ge];const vt=new Re;return this.rules.slice(Ge).forEach(([On,bn])=>vt.addRule(On,bn)),vt.compile(),this.multiRegexes[Ge]=vt,vt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ge,vt){this.rules.push([Ge,vt]),vt.type==="begin"&&this.count++}exec(Ge){const vt=this.getMatcher(this.regexIndex);vt.lastIndex=this.lastIndex;let On=vt.exec(Ge);if(this.resumingScanAtSamePosition()&&!(On&&On.index===this.lastIndex)){const bn=this.getMatcher(0);bn.lastIndex=this.lastIndex+1,On=bn.exec(Ge)}return On&&(this.regexIndex+=On.position+1,this.regexIndex===this.count&&this.considerAll()),On}}function Yt(_e){const Ge=new at;return _e.contains.forEach(vt=>Ge.addRule(vt.begin,{rule:vt,type:"begin"})),_e.terminatorEnd&&Ge.addRule(_e.terminatorEnd,{type:"end"}),_e.illegal&&Ge.addRule(_e.illegal,{type:"illegal"}),Ge}function _t(_e,Ge){const vt=_e;if(_e.isCompiled)return vt;[ke,he,je,nt].forEach(bn=>bn(_e,Ge)),z.compilerExtensions.forEach(bn=>bn(_e,Ge)),_e.__beforeBegin=null,[He,j,De].forEach(bn=>bn(_e,Ge)),_e.isCompiled=!0;let On=null;return typeof _e.keywords=="object"&&_e.keywords.$pattern&&(_e.keywords=Object.assign({},_e.keywords),On=_e.keywords.$pattern,delete _e.keywords.$pattern),On=On||/\w+/,_e.keywords&&(_e.keywords=bt(_e.keywords,z.case_insensitive)),vt.keywordPatternRe=fe(On,!0),Ge&&(_e.begin||(_e.begin=/\B|\b/),vt.beginRe=fe(vt.begin),!_e.end&&!_e.endsWithParent&&(_e.end=/\B|\b/),_e.end&&(vt.endRe=fe(vt.end)),vt.terminatorEnd=d(vt.end)||"",_e.endsWithParent&&Ge.terminatorEnd&&(vt.terminatorEnd+=(_e.end?"|":"")+Ge.terminatorEnd)),_e.illegal&&(vt.illegalRe=fe(_e.illegal)),_e.contains||(_e.contains=[]),_e.contains=[].concat(..._e.contains.map(function(bn){return be(bn==="self"?_e:bn)})),_e.contains.forEach(function(bn){_t(bn,vt)}),_e.starts&&_t(_e.starts,Ge),vt.matcher=Yt(vt),vt}if(z.compilerExtensions||(z.compilerExtensions=[]),z.contains&&z.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return z.classNameAliases=i(z.classNameAliases||{}),_t(z)}function ne(z){return z?z.endsWithParent||ne(z.starts):!1}function be(z){return z.variants&&!z.cachedVariants&&(z.cachedVariants=z.variants.map(function(fe){return i(z,{variants:null},fe)})),z.cachedVariants?z.cachedVariants:ne(z)?i(z,{starts:z.starts?i(z.starts):null}):Object.isFrozen(z)?i(z):z}var Ue="11.10.0";class ut extends Error{constructor(fe,Re){super(fe),this.name="HTMLInjectionError",this.html=Re}}const rt=n,gt=i,zt=Symbol("nomatch"),rn=7,cn=function(z){const fe=Object.create(null),Re=Object.create(null),at=[];let Yt=!0;const _t="Could not find the language '{}', did you forget to load/include a language module?",_e={disableAutodetect:!0,name:"Plain text",contains:[]};let Ge={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function vt(Ne){return Ge.noHighlightRe.test(Ne)}function On(Ne){let ct=Ne.className+" ";ct+=Ne.parentNode?Ne.parentNode.className:"";const Bt=Ge.languageDetectRe.exec(ct);if(Bt){const tn=Ht(Bt[1]);return tn||(Vt(_t.replace("{}",Bt[1])),Vt("Falling back to no-highlight mode for this block.",Ne)),tn?Bt[1]:"no-highlight"}return ct.split(/\s+/).find(tn=>vt(tn)||Ht(tn))}function bn(Ne,ct,Bt){let tn="",En="";typeof ct=="object"?(tn=Ne,Bt=ct.ignoreIllegals,En=ct.language):(Dt("10.7.0","highlight(lang, code, ...args) has been deprecated."),Dt("10.7.0",`Please use highlight(code, options) instead.
|
|
231
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),En=Ne,tn=ct),Bt===void 0&&(Bt=!0);const Mi={code:tn,language:En};Er("before:highlight",Mi);const cr=Mi.result?Mi.result:Mr(Mi.language,Mi.code,Bt);return cr.code=Mi.code,Er("after:highlight",cr),cr}function Mr(Ne,ct,Bt,tn){const En=Object.create(null);function Mi(Fe,ot){return Fe.keywords[ot]}function cr(){if(!At.keywords){Rn.addText(Qt);return}let Fe=0;At.keywordPatternRe.lastIndex=0;let ot=At.keywordPatternRe.exec(Qt),Mt="";for(;ot;){Mt+=Qt.substring(Fe,ot.index);const nn=Ri.case_insensitive?ot[0].toLowerCase():ot[0],li=Mi(At,nn);if(li){const[Qr,gX]=li;if(Rn.addText(Mt),Mt="",En[nn]=(En[nn]||0)+1,En[nn]<=rn&&(Is+=gX),Qr.startsWith("_"))Mt+=ot[0];else{const vX=Ri.classNameAliases[Qr]||Qr;Te(ot[0],vX)}}else Mt+=ot[0];Fe=At.keywordPatternRe.lastIndex,ot=At.keywordPatternRe.exec(Qt)}Mt+=Qt.substring(Fe),Rn.addText(Mt)}function Ms(){if(Qt==="")return;let Fe=null;if(typeof At.subLanguage=="string"){if(!fe[At.subLanguage]){Rn.addText(Qt);return}Fe=Mr(At.subLanguage,Qt,!0,vu[At.subLanguage]),vu[At.subLanguage]=Fe._top}else Fe=N(Qt,At.subLanguage.length?At.subLanguage:null);At.relevance>0&&(Is+=Fe.relevance),Rn.__addSublanguage(Fe._emitter,Fe.language)}function ai(){At.subLanguage!=null?Ms():cr(),Qt=""}function Te(Fe,ot){Fe!==""&&(Rn.startScope(ot),Rn.addText(Fe),Rn.endScope())}function dr(Fe,ot){let Mt=1;const nn=ot.length-1;for(;Mt<=nn;){if(!Fe._emit[Mt]){Mt++;continue}const li=Ri.classNameAliases[Fe[Mt]]||Fe[Mt],Qr=ot[Mt];li?Te(Qr,li):(Qt=Qr,cr(),Qt=""),Mt++}}function zo(Fe,ot){return Fe.scope&&typeof Fe.scope=="string"&&Rn.openNode(Ri.classNameAliases[Fe.scope]||Fe.scope),Fe.beginScope&&(Fe.beginScope._wrap?(Te(Qt,Ri.classNameAliases[Fe.beginScope._wrap]||Fe.beginScope._wrap),Qt=""):Fe.beginScope._multi&&(dr(Fe.beginScope,ot),Qt="")),At=Object.create(Fe,{parent:{value:At}}),At}function mu(Fe,ot,Mt){let nn=k(Fe.endRe,Mt);if(nn){if(Fe["on:end"]){const li=new e(Fe);Fe["on:end"](ot,li),li.isMatchIgnored&&(nn=!1)}if(nn){for(;Fe.endsParent&&Fe.parent;)Fe=Fe.parent;return Fe}}if(Fe.endsWithParent)return mu(Fe.parent,ot,Mt)}function zd(Fe){return At.matcher.regexIndex===0?(Qt+=Fe[0],1):(ti=!0,0)}function Fd(Fe){const ot=Fe[0],Mt=Fe.rule,nn=new e(Mt),li=[Mt.__beforeBegin,Mt["on:begin"]];for(const Qr of li)if(Qr&&(Qr(Fe,nn),nn.isMatchIgnored))return zd(ot);return Mt.skip?Qt+=ot:(Mt.excludeBegin&&(Qt+=ot),ai(),!Mt.returnBegin&&!Mt.excludeBegin&&(Qt=ot)),zo(Mt,Fe),Mt.returnBegin?0:ot.length}function Hd(Fe){const ot=Fe[0],Mt=ct.substring(Fe.index),nn=mu(At,Fe,Mt);if(!nn)return zt;const li=At;At.endScope&&At.endScope._wrap?(ai(),Te(ot,At.endScope._wrap)):At.endScope&&At.endScope._multi?(ai(),dr(At.endScope,Fe)):li.skip?Qt+=ot:(li.returnEnd||li.excludeEnd||(Qt+=ot),ai(),li.excludeEnd&&(Qt=ot));do At.scope&&Rn.closeNode(),!At.skip&&!At.subLanguage&&(Is+=At.relevance),At=At.parent;while(At!==nn.parent);return nn.starts&&zo(nn.starts,Fe),li.returnEnd?0:ot.length}function jd(){const Fe=[];for(let ot=At;ot!==Ri;ot=ot.parent)ot.scope&&Fe.unshift(ot.scope);Fe.forEach(ot=>Rn.openNode(ot))}let Es={};function gu(Fe,ot){const Mt=ot&&ot[0];if(Qt+=Fe,Mt==null)return ai(),0;if(Es.type==="begin"&&ot.type==="end"&&Es.index===ot.index&&Mt===""){if(Qt+=ct.slice(ot.index,ot.index+1),!Yt){const nn=new Error(`0 width match regex (${Ne})`);throw nn.languageName=Ne,nn.badRule=Es.rule,nn}return 1}if(Es=ot,ot.type==="begin")return Fd(ot);if(ot.type==="illegal"&&!Bt){const nn=new Error('Illegal lexeme "'+Mt+'" for mode "'+(At.scope||"<unnamed>")+'"');throw nn.mode=At,nn}else if(ot.type==="end"){const nn=Hd(ot);if(nn!==zt)return nn}if(ot.type==="illegal"&&Mt==="")return 1;if(An>1e5&&An>ot.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Qt+=Mt,Mt.length}const Ri=Ht(Ne);if(!Ri)throw en(_t.replace("{}",Ne)),new Error('Unknown language: "'+Ne+'"');const Ud=st(Ri);let ya="",At=tn||Ud;const vu={},Rn=new Ge.__emitter(Ge);jd();let Qt="",Is=0,Ir=0,An=0,ti=!1;try{if(Ri.__emitTokens)Ri.__emitTokens(ct,Rn);else{for(At.matcher.considerAll();;){An++,ti?ti=!1:At.matcher.considerAll(),At.matcher.lastIndex=Ir;const Fe=At.matcher.exec(ct);if(!Fe)break;const ot=ct.substring(Ir,Fe.index),Mt=gu(ot,Fe);Ir=Fe.index+Mt}gu(ct.substring(Ir))}return Rn.finalize(),ya=Rn.toHTML(),{language:Ne,value:ya,relevance:Is,illegal:!1,_emitter:Rn,_top:At}}catch(Fe){if(Fe.message&&Fe.message.includes("Illegal"))return{language:Ne,value:rt(ct),illegal:!0,relevance:0,_illegalBy:{message:Fe.message,index:Ir,context:ct.slice(Ir-100,Ir+100),mode:Fe.mode,resultSoFar:ya},_emitter:Rn};if(Yt)return{language:Ne,value:rt(ct),illegal:!1,relevance:0,errorRaised:Fe,_emitter:Rn,_top:At};throw Fe}}function _i(Ne){const ct={value:rt(Ne),illegal:!1,relevance:0,_top:_e,_emitter:new Ge.__emitter(Ge)};return ct._emitter.addText(Ne),ct}function N(Ne,ct){ct=ct||Ge.languages||Object.keys(fe);const Bt=_i(Ne),tn=ct.filter(Ht).filter(Cn).map(ai=>Mr(ai,Ne,!1));tn.unshift(Bt);const En=tn.sort((ai,Te)=>{if(ai.relevance!==Te.relevance)return Te.relevance-ai.relevance;if(ai.language&&Te.language){if(Ht(ai.language).supersetOf===Te.language)return 1;if(Ht(Te.language).supersetOf===ai.language)return-1}return 0}),[Mi,cr]=En,Ms=Mi;return Ms.secondBest=cr,Ms}function F(Ne,ct,Bt){const tn=ct&&Re[ct]||Bt;Ne.classList.add("hljs"),Ne.classList.add(`language-${tn}`)}function K(Ne){let ct=null;const Bt=On(Ne);if(vt(Bt))return;if(Er("before:highlightElement",{el:Ne,language:Bt}),Ne.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Ne);return}if(Ne.children.length>0&&(Ge.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Ne)),Ge.throwUnescapedHTML))throw new ut("One of your code blocks includes unescaped HTML.",Ne.innerHTML);ct=Ne;const tn=ct.textContent,En=Bt?bn(tn,{language:Bt,ignoreIllegals:!0}):N(tn);Ne.innerHTML=En.value,Ne.dataset.highlighted="yes",F(Ne,Bt,En.language),Ne.result={language:En.language,re:En.relevance,relevance:En.relevance},En.secondBest&&(Ne.secondBest={language:En.secondBest.language,relevance:En.secondBest.relevance}),Er("after:highlightElement",{el:Ne,result:En,text:tn})}function Ke(Ne){Ge=gt(Ge,Ne)}const Ze=()=>{te(),Dt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ut(){te(),Dt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let V=!1;function te(){if(document.readyState==="loading"){V=!0;return}document.querySelectorAll(Ge.cssSelector).forEach(K)}function ze(){V&&te()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",ze,!1);function qe(Ne,ct){let Bt=null;try{Bt=ct(z)}catch(tn){if(en("Language definition for '{}' could not be registered.".replace("{}",Ne)),Yt)en(tn);else throw tn;Bt=_e}Bt.name||(Bt.name=Ne),fe[Ne]=Bt,Bt.rawDefinition=ct.bind(null,z),Bt.aliases&&Rt(Bt.aliases,{languageName:Ne})}function Kt(Ne){delete fe[Ne];for(const ct of Object.keys(Re))Re[ct]===Ne&&delete Re[ct]}function Qe(){return Object.keys(fe)}function Ht(Ne){return Ne=(Ne||"").toLowerCase(),fe[Ne]||fe[Re[Ne]]}function Rt(Ne,{languageName:ct}){typeof Ne=="string"&&(Ne=[Ne]),Ne.forEach(Bt=>{Re[Bt.toLowerCase()]=ct})}function Cn(Ne){const ct=Ht(Ne);return ct&&!ct.disableAutodetect}function xn(Ne){Ne["before:highlightBlock"]&&!Ne["before:highlightElement"]&&(Ne["before:highlightElement"]=ct=>{Ne["before:highlightBlock"](Object.assign({block:ct.el},ct))}),Ne["after:highlightBlock"]&&!Ne["after:highlightElement"]&&(Ne["after:highlightElement"]=ct=>{Ne["after:highlightBlock"](Object.assign({block:ct.el},ct))})}function ye(Ne){xn(Ne),at.push(Ne)}function kn(Ne){const ct=at.indexOf(Ne);ct!==-1&&at.splice(ct,1)}function Er(Ne,ct){const Bt=Ne;at.forEach(function(tn){tn[Bt]&&tn[Bt](ct)})}function Vd(Ne){return Dt("10.7.0","highlightBlock will be removed entirely in v12.0"),Dt("10.7.0","Please use highlightElement now."),K(Ne)}Object.assign(z,{highlight:bn,highlightAuto:N,highlightAll:te,highlightElement:K,highlightBlock:Vd,configure:Ke,initHighlighting:Ze,initHighlightingOnLoad:Ut,registerLanguage:qe,unregisterLanguage:Kt,listLanguages:Qe,getLanguage:Ht,registerAliases:Rt,autoDetection:Cn,inherit:gt,addPlugin:ye,removePlugin:kn}),z.debugMode=function(){Yt=!1},z.safeMode=function(){Yt=!0},z.versionString=Ue,z.regex={concat:m,lookahead:f,either:S,optional:h,anyNumberOfTimes:p};for(const Ne in U)typeof U[Ne]=="object"&&t(U[Ne]);return Object.assign(z,U),z},pn=cn({});return pn.newInstance=()=>cn({}),ph=pn,pn.HighlightJS=pn,pn.default=pn,ph}var kB=CB();const El=pl(kB),OA="[A-Za-z$_][0-9A-Za-z$_]*",TB=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],OB=["true","false","null","undefined","NaN","Infinity"],xA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],MA=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],EA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],xB=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],MB=[].concat(EA,xA,MA);function EB(t){const e=t.regex,n=(se,{after:Pe})=>{const Be="</"+se[0].slice(1);return se.input.indexOf(Be,Pe)!==-1},i=OA,r={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(se,Pe)=>{const Be=se[0].length+se.index,xe=se.input[Be];if(xe==="<"||xe===","){Pe.ignoreMatch();return}xe===">"&&(n(se,{after:Be})||Pe.ignoreMatch());let de;const ge=se.input.substring(Be);if(de=ge.match(/^\s*=/)){Pe.ignoreMatch();return}if((de=ge.match(/^\s+extends\s+/))&&de.index===0){Pe.ignoreMatch();return}}},a={$pattern:OA,keyword:TB,literal:OB,built_in:MB,"variable.language":xB},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,f]},b={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},k=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,h,m,v,{match:/\$\d+/},d];f.contains=k.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(k)});const A=[].concat(b,f.contains),w=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(A)}]),y={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:w},C={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,e.concat(i,"(",e.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},I={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...xA,...MA]}},R={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},M={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},D={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function $(se){return e.concat("(?!",se.join("|"),")")}const W={match:e.concat(/\b/,$([...EA,"super","import"].map(se=>`${se}\\s*\\(`)),i,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},ie={begin:e.concat(/\./,e.lookahead(e.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ve={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},ae="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",me={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ae)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:w,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),R,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,h,m,v,b,{match:/\$\d+/},d,I,{className:"attr",begin:i+e.lookahead(":"),relevance:0},me,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[b,t.REGEXP_MODE,{className:"function",begin:ae,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:w}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},M,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,t.inherit(t.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},ie,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},W,D,C,ve,{match:/\$[(.]/}]}}function IB(t){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],r={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[e,n,t.QUOTE_STRING_MODE,r,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const cc="[A-Za-z$_][0-9A-Za-z$_]*",IA=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],PA=["true","false","null","undefined","NaN","Infinity"],LA=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],DA=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],RA=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BA=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],NA=[].concat(RA,LA,DA);function PB(t){const e=t.regex,n=(se,{after:Pe})=>{const Be="</"+se[0].slice(1);return se.input.indexOf(Be,Pe)!==-1},i=cc,r={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(se,Pe)=>{const Be=se[0].length+se.index,xe=se.input[Be];if(xe==="<"||xe===","){Pe.ignoreMatch();return}xe===">"&&(n(se,{after:Be})||Pe.ignoreMatch());let de;const ge=se.input.substring(Be);if(de=ge.match(/^\s*=/)){Pe.ignoreMatch();return}if((de=ge.match(/^\s+extends\s+/))&&de.index===0){Pe.ignoreMatch();return}}},a={$pattern:cc,keyword:IA,literal:PA,built_in:NA,"variable.language":BA},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,f]},b={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},k=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,h,m,v,{match:/\$\d+/},d];f.contains=k.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(k)});const A=[].concat(b,f.contains),w=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(A)}]),y={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:w},C={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,e.concat(i,"(",e.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},I={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...LA,...DA]}},R={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},M={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[y],illegal:/%/},D={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function $(se){return e.concat("(?!",se.join("|"),")")}const W={match:e.concat(/\b/,$([...RA,"super","import"].map(se=>`${se}\\s*\\(`)),i,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},ie={begin:e.concat(/\./,e.lookahead(e.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ve={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},y]},ae="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",me={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ae)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[y]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:w,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),R,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,p,h,m,v,b,{match:/\$\d+/},d,I,{className:"attr",begin:i+e.lookahead(":"),relevance:0},me,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[b,t.REGEXP_MODE,{className:"function",begin:ae,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:w}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},M,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[y,t.inherit(t.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},ie,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[y]},W,D,C,ve,{match:/\$[(.]/}]}}function LB(t){const e=PB(t),n=cc,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],r={begin:[/namespace/,/\s+/,t.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[e.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},a=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],l={$pattern:cc,keyword:IA.concat(a),literal:PA,built_in:NA.concat(i),"variable.language":BA},u={className:"meta",begin:"@"+n},c=(p,h,m)=>{const v=p.contains.findIndex(S=>S.label===h);if(v===-1)throw new Error("can not find mode to replace");p.contains.splice(v,1,m)};Object.assign(e.keywords,l),e.exports.PARAMS_CONTAINS.push(u);const d=e.contains.find(p=>p.className==="attr");e.exports.PARAMS_CONTAINS.push([e.exports.CLASS_REFERENCE,d]),e.contains=e.contains.concat([u,r,o]),c(e,"shebang",t.SHEBANG()),c(e,"use_strict",s);const f=e.contains.find(p=>p.label==="func.def");return f.relevance=0,Object.assign(e,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),e}function DB(t){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}const RB={class:"relative w-full overflow-hidden"},BB=["placeholder"],NB={class:"relative"},$B=["innerHTML"],$A=Ae({__name:"CodeSnippet",props:wn({code:{},lang:{default:"json"},readonly:{type:Boolean},placeholder:{}},{code:{default:""},codeModifiers:{}}),emits:["update:code"],setup(t){El.registerLanguage("javascript",EB),El.registerLanguage("typescript",LB),El.registerLanguage("json",IB),El.registerLanguage("html",DB);const e=t,n=ni(t,"code"),i=dt("preset",{}).codesnippet,r=re(),o=re(),s=oe(0),a=oe(!1),l=X(()=>n.value.split(`
|
|
232
|
+
`).map((f,p)=>{const h=El.highlight(f,{language:e.lang}).value;return{line:p+1,code:h}})),u=()=>{var d;(d=navigator.clipboard)==null||d.writeText(n.value),a.value=!0,setTimeout(()=>{a.value=!1},1500)};wt(()=>{c()});const c=()=>{if(o.value){const d=o.value.querySelector("[data-wv-section=linenumber]");s.value=d.offsetWidth}};return $e(l,()=>{c()}),(d,f)=>{var p,h,m;return g(),O("div",RB,[n.value.length&&d.readonly?(g(),P(We,T({key:0},(p=x(i))==null?void 0:p.copybutton,{icon:a.value?"check":"file-copy",onClick:u,size:"small",text:""}),null,16,["icon"])):B("",!0),E("div",T((h=x(i))==null?void 0:h.body,{style:{"scrollbar-width":"none"}}),[d.readonly?B("",!0):ft((g(),O("textarea",T({key:0,ref_key:"textarea",ref:r},(m=x(i))==null?void 0:m.textarea,{"onUpdate:modelValue":f[0]||(f[0]=v=>n.value=v),placeholder:d.placeholder,spellcheck:!1,style:`left: ${s.value}px; width: calc(100% - ${s.value+6}px); scrollbar-width: none;`}),null,16,BB)),[[qd,n.value]]),E("table",{ref_key:"codesnippet",ref:o,class:"relative"},[E("tbody",NB,[(g(!0),O(ue,null,Je(l.value,({line:v,code:S})=>{var b;return g(),O("tr",{key:v,class:"h-5"},[E("td",T({ref_for:!0},(b=x(i))==null?void 0:b.linenumber,{class:[{"pt-1.5":v===1,"pb-1.5":v===l.value.length}],"data-wv-section":"linenumber"}),_(v),17),E("td",{class:pe(["px-1.5",{"pt-1.5":v==1,"pb-1.5":v===l.value.length}])},[E("pre",{innerHTML:S,class:"font-poppins"},null,8,$B)],2)])}),128))])],512)],16)])}}});function Jn(t){this.content=t}Jn.prototype={constructor:Jn,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var i=n&&n!=t?this.remove(n):this,r=i.find(t),o=i.content.slice();return r==-1?o.push(n||t,e):(o[r+1]=e,n&&(o[r]=n)),new Jn(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Jn(n)},addToStart:function(t,e){return new Jn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Jn(n)},addBefore:function(t,e,n){var i=this.remove(e),r=i.content.slice(),o=i.find(t);return r.splice(o==-1?r.length:o,0,e,n),new Jn(r)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Jn.from(t),t.size?new Jn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Jn.from(t),t.size?new Jn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Jn.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},Jn.from=function(t){if(t instanceof Jn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Jn(e)};function VA(t,e,n){for(let i=0;;i++){if(i==t.childCount||i==e.childCount)return t.childCount==e.childCount?null:n;let r=t.child(i),o=e.child(i);if(r==o){n+=r.nodeSize;continue}if(!r.sameMarkup(o))return n;if(r.isText&&r.text!=o.text){for(let s=0;r.text[s]==o.text[s];s++)n++;return n}if(r.content.size||o.content.size){let s=VA(r.content,o.content,n+1);if(s!=null)return s}n+=r.nodeSize}}function zA(t,e,n,i){for(let r=t.childCount,o=e.childCount;;){if(r==0||o==0)return r==o?null:{a:n,b:i};let s=t.child(--r),a=e.child(--o),l=s.nodeSize;if(s==a){n-=l,i-=l;continue}if(!s.sameMarkup(a))return{a:n,b:i};if(s.isText&&s.text!=a.text){let u=0,c=Math.min(s.text.length,a.text.length);for(;u<c&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,i--;return{a:n,b:i}}if(s.content.size||a.content.size){let u=zA(s.content,a.content,n-1,i-1);if(u)return u}n-=l,i-=l}}class Me{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let i=0;i<e.length;i++)this.size+=e[i].nodeSize}nodesBetween(e,n,i,r=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&i(l,r+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),i,r+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,i,r){let o="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?r?typeof r=="function"?r(a):r:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&i&&(s?s=!1:o+=i),o+=u},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,i=e.firstChild,r=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(r[r.length-1]=n.withText(n.text+i.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new Me(r,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let i=[],r=0;if(n>e)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),i.push(a),r+=a.nodeSize),s=l}return new Me(i,r)}cutByIndex(e,n){return e==n?Me.empty:e==0&&n==this.content.length?this:new Me(this.content.slice(e,n))}replaceChild(e,n){let i=this.content[e];if(i==n)return this;let r=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return r[e]=n,new Me(r,o)}addToStart(e){return new Me([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Me(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,i=0;n<this.content.length;n++){let r=this.content[n];e(r,i,n),i+=r.nodeSize}}findDiffStart(e,n=0){return VA(this,e,n)}findDiffEnd(e,n=this.size,i=e.size){return zA(this,e,n,i)}findIndex(e,n=-1){if(e==0)return dc(0,e);if(e==this.size)return dc(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let i=0,r=0;;i++){let o=this.child(i),s=r+o.nodeSize;if(s>=e)return s==e||n>0?dc(i+1,s):dc(i,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Me.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Me(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Me.empty;let n,i=0;for(let r=0;r<e.length;r++){let o=e[r];i+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(n||(n=e.slice(0,r)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new Me(n||e,i)}static from(e){if(!e)return Me.empty;if(e instanceof Me)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Me([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Me.empty=new Me([],0);const hh={index:0,offset:0};function dc(t,e){return hh.index=t,hh.offset=e,hh}function fc(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!fc(t[i],e[i]))return!1}else{for(let i in t)if(!(i in e)||!fc(t[i],e[i]))return!1;for(let i in e)if(!(i in t))return!1}return!0}let an=class Bg{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,i=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!i&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,r)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=e.slice()),i||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&fc(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=e.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let r=i.create(n.attrs);return i.checkAttrs(r.attrs),r}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let i=0;i<e.length;i++)if(!e[i].eq(n[i]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Bg.none;if(e instanceof Bg)return[e];let n=e.slice();return n.sort((i,r)=>i.type.rank-r.type.rank),n}};an.none=[];class pc extends Error{}class Xe{constructor(e,n,i){this.content=e,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let i=HA(this.content,e+this.openStart,n);return i&&new Xe(i,this.openStart,this.openEnd)}removeBetween(e,n){return new Xe(FA(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Xe.empty;let i=n.openStart||0,r=n.openEnd||0;if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Xe(Me.fromJSON(e,n.content),i,r)}static maxOpen(e,n=!0){let i=0,r=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)r++;return new Xe(e,i,r)}}Xe.empty=new Xe(Me.empty,0,0);function FA(t,e,n){let{index:i,offset:r}=t.findIndex(e),o=t.maybeChild(i),{index:s,offset:a}=t.findIndex(n);if(r==e||o.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(i!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(i,o.copy(FA(o.content,e-r-1,n-r-1)))}function HA(t,e,n,i){let{index:r,offset:o}=t.findIndex(e),s=t.maybeChild(r);if(o==e||s.isText)return t.cut(0,e).append(n).append(t.cut(e));let a=HA(s.content,e-o-1,n);return a&&t.replaceChild(r,s.copy(a))}function VB(t,e,n){if(n.openStart>t.depth)throw new pc("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new pc("Inconsistent open depths");return jA(t,e,n,0)}function jA(t,e,n,i){let r=t.index(i),o=t.node(i);if(r==e.index(i)&&i<t.depth-n.openStart){let s=jA(t,e,n,i+1);return o.copy(o.content.replaceChild(r,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==i&&e.depth==i){let s=t.parent,a=s.content;return rs(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=zB(n,t);return rs(o,KA(t,s,a,e,i))}else return rs(o,hc(t,e,i))}function UA(t,e){if(!e.type.compatibleContent(t.type))throw new pc("Cannot join "+e.type.name+" onto "+t.type.name)}function mh(t,e,n){let i=t.node(n);return UA(i,e.node(n)),i}function is(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Il(t,e,n,i){let r=(e||t).node(n),o=0,s=e?e.index(n):r.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(is(t.nodeAfter,i),o++));for(let a=o;a<s;a++)is(r.child(a),i);e&&e.depth==n&&e.textOffset&&is(e.nodeBefore,i)}function rs(t,e){return t.type.checkContent(e),t.copy(e)}function KA(t,e,n,i,r){let o=t.depth>r&&mh(t,e,r+1),s=i.depth>r&&mh(n,i,r+1),a=[];return Il(null,t,r,a),o&&s&&e.index(r)==n.index(r)?(UA(o,s),is(rs(o,KA(t,e,n,i,r+1)),a)):(o&&is(rs(o,hc(t,e,r+1)),a),Il(e,n,r,a),s&&is(rs(s,hc(n,i,r+1)),a)),Il(i,null,r,a),new Me(a)}function hc(t,e,n){let i=[];if(Il(null,t,n,i),t.depth>n){let r=mh(t,e,n+1);is(rs(r,hc(t,e,n+1)),i)}return Il(e,null,n,i),new Me(i)}function zB(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)r=e.node(o).copy(Me.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}class Pl{constructor(e,n,i){this.pos=e,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=e.child(n);return i?e.child(n).cut(i):r}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let i=this.path[n*3],r=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)r+=i.child(o).nodeSize;return r}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return an.none;if(this.textOffset)return e.child(n).marks;let i=e.maybeChild(n-1),r=e.maybeChild(n);if(!i){let a=i;i=r,r=a}let o=i.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!r||!o[s].isInSet(r.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!r||!i[o].isInSet(r.marks))&&(i=i[o--].removeFromSet(i));return i}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);i>=0;i--)if(e.pos<=this.end(i)&&(!n||n(this.node(i))))return new mc(this,e,i);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let i=[],r=0,o=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),u=o-l;if(i.push(s,a,r+l),!u||(s=s.child(a),s.isText))break;o=u-1,r+=l+1}return new Pl(n,i,o)}static resolveCached(e,n){let i=WA.get(e);if(i)for(let o=0;o<i.elts.length;o++){let s=i.elts[o];if(s.pos==n)return s}else WA.set(e,i=new FB);let r=i.elts[i.i]=Pl.resolve(e,n);return i.i=(i.i+1)%HB,r}}class FB{constructor(){this.elts=[],this.i=0}}const HB=12,WA=new WeakMap;class mc{constructor(e,n,i){this.$from=e,this.$to=n,this.depth=i}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const jB=Object.create(null);let yo=class Ng{constructor(e,n,i,r=an.none){this.type=e,this.attrs=n,this.marks=r,this.content=i||Me.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,i,r=0){this.content.nodesBetween(e,n,i,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,i,r){return this.content.textBetween(e,n,i,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,i){return this.type==e&&fc(this.attrs,n||e.defaultAttrs||jB)&&an.sameSet(this.marks,i||an.none)}copy(e=null){return e==this.content?this:new Ng(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ng(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,i=!1){if(e==n)return Xe.empty;let r=this.resolve(e),o=this.resolve(n),s=i?0:r.sharedDepth(n),a=r.start(s),u=r.node(s).content.cut(r.pos-a,o.pos-a);return new Xe(u,r.depth-s,o.depth-s)}replace(e,n,i){return VB(this.resolve(e),this.resolve(n),i)}nodeAt(e){for(let n=this;;){let{index:i,offset:r}=n.content.findIndex(e);if(n=n.maybeChild(i),!n)return null;if(r==e||n.isText)return n;e-=r+1}}childAfter(e){let{index:n,offset:i}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(e);if(i<e)return{node:this.content.child(n),index:n,offset:i};let r=this.content.child(n-1);return{node:r,index:n-1,offset:i-r.nodeSize}}resolve(e){return Pl.resolveCached(this,e)}resolveNoCache(e){return Pl.resolve(this,e)}rangeHasMark(e,n,i){let r=!1;return n>e&&this.nodesBetween(e,n,o=>(i.isInSet(o.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),qA(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,i=Me.empty,r=0,o=i.childCount){let s=this.contentMatchAt(e).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=r;l<o;l++)if(!this.type.allowsMarks(i.child(l).marks))return!1;return!0}canReplaceWith(e,n,i,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(i),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=an.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),e=i.addToSet(e)}if(!an.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,i)}let r=Me.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,r,i);return o.type.checkAttrs(o.attrs),o}};yo.prototype.text=void 0;class gc extends yo{constructor(e,n,i,r){if(super(e,n,null,r),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):qA(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new gc(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new gc(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function qA(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class ss{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let i=new UB(e,n);if(i.next==null)return ss.empty;let r=XA(i);i.next&&i.err("Unexpected trailing text");let o=_B(ZB(r));return JB(o,i),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,i=e.childCount){let r=this;for(let o=n;r&&o<i;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let i=0;i<e.next.length;i++)if(this.next[n].type==e.next[i].type)return!0;return!1}fillBefore(e,n=!1,i=0){let r=[this];function o(s,a){let l=s.matchFragment(e,i);if(l&&(!n||l.validEnd))return Me.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&r.indexOf(d)==-1){r.push(d);let f=o(d,a.concat(c));if(f)return f}}return null}return o(this,[])}findWrapping(e){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==e)return this.wrapCache[i+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let r=i.shift(),o=r.match;if(o.matchType(e)){let s=[];for(let a=r;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!r.type||l.validEnd)&&(i.push({match:a.contentMatch,type:a,via:r}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(i){e.push(i);for(let r=0;r<i.next.length;r++)e.indexOf(i.next[r].next)==-1&&n(i.next[r].next)}return n(this),e.map((i,r)=>{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s<i.next.length;s++)o+=(s?", ":"")+i.next[s].type.name+"->"+e.indexOf(i.next[s].next);return o}).join(`
|
|
233
|
+
`)}}ss.empty=new ss(!0);class UB{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function XA(t){let e=[];do e.push(KB(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function KB(t){let e=[];do e.push(WB(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function WB(t){let e=GB(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=qB(t,e);else break;return e}function GA(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function qB(t,e){let n=GA(t),i=n;return t.eat(",")&&(t.next!="}"?i=GA(t):i=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:e}}function XB(t,e){let n=t.nodeTypes,i=n[e];if(i)return[i];let r=[];for(let o in n){let s=n[o];s.isInGroup(e)&&r.push(s)}return r.length==0&&t.err("No node type or group '"+e+"' found"),r}function GB(t){if(t.eat("(")){let e=XA(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=XB(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function ZB(t){let e=[[]];return r(o(t,0),n()),e;function n(){return e.push([])-1}function i(s,a,l){let u={term:l,to:a};return e[s].push(u),u}function r(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(o(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=o(s.exprs[l],a);if(l==s.exprs.length-1)return u;r(u,a=n())}else if(s.type=="star"){let l=n();return i(a,l),r(o(s.expr,l),l),[i(l)]}else if(s.type=="plus"){let l=n();return r(o(s.expr,a),l),r(o(s.expr,l),l),[i(l)]}else{if(s.type=="opt")return[i(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let c=n();r(o(s.expr,l),c),l=c}if(s.max==-1)r(o(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let c=n();i(l,c),r(o(s.expr,l),c),l=c}return[i(l)]}else{if(s.type=="name")return[i(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function ZA(t,e){return e-t}function _A(t,e){let n=[];return i(e),n.sort(ZA);function i(r){let o=t[r];if(o.length==1&&!o[0].term)return i(o[0].to);n.push(r);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&i(l)}}}function _B(t){let e=Object.create(null);return n(_A(t,0));function n(i){let r=[];i.forEach(s=>{t[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c<r.length;c++)r[c][0]==a&&(u=r[c][1]);_A(t,l).forEach(c=>{u||r.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=e[i.join(",")]=new ss(i.indexOf(t.length-1)>-1);for(let s=0;s<r.length;s++){let a=r[s][1].sort(ZA);o.next.push({type:r[s][0],next:e[a.join(",")]||n(a)})}return o}}function JB(t,e){for(let n=0,i=[t];n<i.length;n++){let r=i[n],o=!r.validEnd,s=[];for(let a=0;a<r.next.length;a++){let{type:l,next:u}=r.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),i.indexOf(u)==-1&&i.push(u)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function JA(t){let e=Object.create(null);for(let n in t){let i=t[n];if(!i.hasDefault)return null;e[n]=i.default}return e}function YA(t,e){let n=Object.create(null);for(let i in t){let r=e&&e[i];if(r===void 0){let o=t[i];if(o.hasDefault)r=o.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=r}return n}function QA(t,e,n,i){for(let r in e)if(!(r in t))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let r in t){let o=t[r];o.validate&&o.validate(e[r])}}function e2(t,e){let n=Object.create(null);if(e)for(let i in e)n[i]=new QB(t,i,e[i]);return n}let t2=class T3{constructor(e,n,i){this.name=e,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=e2(e,i.attrs),this.defaultAttrs=JA(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ss.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:YA(this.attrs,e)}create(e=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new yo(this,this.computeAttrs(e),Me.from(n),an.setFrom(i))}createChecked(e=null,n,i){return n=Me.from(n),this.checkContent(n),new yo(this,this.computeAttrs(e),n,an.setFrom(i))}createAndFill(e=null,n,i){if(e=this.computeAttrs(e),n=Me.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let r=this.contentMatch.matchFragment(n),o=r&&r.fillBefore(Me.empty,!0);return o?new yo(this,e,n.append(o),an.setFrom(i)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let i=0;i<e.childCount;i++)if(!this.allowsMarks(e.child(i).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){QA(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let i=0;i<e.length;i++)this.allowsMarkType(e[i].type)?n&&n.push(e[i]):n||(n=e.slice(0,i));return n?n.length?n:an.none:e}static compile(e,n){let i=Object.create(null);e.forEach((o,s)=>i[o]=new T3(o,n,s));let r=n.spec.topNode||"doc";if(!i[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function YB(t,e,n){let i=n.split("|");return r=>{let o=r===null?"null":typeof r;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${e} on type ${t}, got ${o}`)}}class QB{constructor(e,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?YB(e,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class vc{constructor(e,n,i,r){this.name=e,this.rank=n,this.schema=i,this.spec=r,this.attrs=e2(e,r.attrs),this.excluded=null;let o=JA(this.attrs);this.instance=o?new an(this,o):null}create(e=null){return!e&&this.instance?this.instance:new an(this,YA(this.attrs,e))}static compile(e,n){let i=Object.create(null),r=0;return e.forEach((o,s)=>i[o]=new vc(o,r++,n,s)),i}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){QA(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class n2{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let r in e)n[r]=e[r];n.nodes=Jn.from(e.nodes),n.marks=Jn.from(e.marks||{}),this.nodes=t2.compile(this.spec.nodes,this),this.marks=vc.compile(this.spec.marks,this);let i=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let o=this.nodes[r],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=i[s]||(i[s]=ss.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?i2(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let r in this.marks){let o=this.marks[r],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:i2(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,i,r){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof t2){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,i,r)}text(e,n){let i=this.nodes.text;return new gc(i,i.defaultAttrs,e,an.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return yo.fromJSON(this,e)}markFromJSON(e){return an.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function i2(t,e){let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t.marks[r],s=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(r=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(r)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[i]+"'")}return n}function eN(t){return t.tag!=null}function tN(t){return t.style!=null}class bo{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(r=>{if(eN(r))this.tags.push(r);else if(tN(r)){let o=/[^=]*/.exec(r.style)[0];i.indexOf(o)<0&&i.push(o),this.styles.push(r)}}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let i=new a2(this,n,!1);return i.addAll(e,an.none,n.from,n.to),i.finish()}parseSlice(e,n={}){let i=new a2(this,n,!0);return i.addAll(e,an.none,n.from,n.to),Xe.maxOpen(i.finish())}matchTag(e,n,i){for(let r=i?this.tags.indexOf(i)+1:0;r<this.tags.length;r++){let o=this.tags[r];if(rN(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,i,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!i.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function i(r){let o=r.priority==null?50:r.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,r)}for(let r in e.marks){let o=e.marks[r].spec.parseDOM;o&&o.forEach(s=>{i(s=l2(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in e.nodes){let o=e.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=l2(s)),s.node||s.ignore||s.mark||(s.node=r)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new bo(e,bo.schemaRules(e)))}}const r2={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},nN={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},o2={ol:!0,ul:!0},Ll=1,gh=2,yc=4;function s2(t,e,n){return e!=null?(e?Ll:0)|(e==="full"?gh:0):t&&t.whitespace=="pre"?Ll|gh:n&-5}class bc{constructor(e,n,i,r,o,s){this.type=e,this.attrs=n,this.marks=i,this.solid=r,this.options=s,this.content=[],this.activeMarks=an.none,this.match=o||(s&yc?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Me.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,r;return(r=i.findWrapping(e.type))?(this.match=i,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ll)){let i=this.content[this.content.length-1],r;if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let n=Me.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Me.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!r2.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class a2{constructor(e,n,i){this.parser=e,this.options=n,this.isOpen=i,this.open=0,this.localPreserveWS=!1;let r=n.topNode,o,s=s2(null,n.preserveWhitespace,0)|(i?yc:0);r?o=new bc(r.type,r.attrs,an.none,!0,n.topMatch||r.type.contentMatch,s):i?o=new bc(null,null,an.none,!0,null,s):o=new bc(e.schema.topNodeType,null,an.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let i=e.nodeValue,r=this.top,o=r.options&gh?"full":this.localPreserveWS||(r.options&Ll)>0;if(o==="full"||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(i)){if(o)o!=="full"?i=i.replace(/\r?\n|\r/g," "):i=i.replace(/\r\n?/g,`
|
|
234
|
+
`);else if(i=i.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(i)&&this.open==this.nodes.length-1){let s=r.content[r.content.length-1],a=e.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(i=i.slice(1))}i&&this.insertNode(this.parser.schema.text(i),n,!/\S/.test(i)),this.findInText(e)}else this.findInside(e)}addElement(e,n,i){let r=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;o2.hasOwnProperty(s)&&this.parser.normalizeLists&&iN(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,i));e:if(l?l.ignore:nN.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(r2.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(o),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=r}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
235
|
+
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let i=e.style;if(i&&i.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let o=this.parser.matchedStyles[r],s=i.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,i,r){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),i,e.nodeName=="BR")||this.leafFallback(e,i);else{let l=this.enter(s,n.attrs||null,i,n.preserveWhitespace);l&&(o=!0,i=l)}else{let l=this.parser.schema.marks[n.mark];i=i.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,i,r);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,i,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,i),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,n,i,r){let o=i||0;for(let s=i?e.childNodes[i]:e.firstChild,a=r==null?null:e.childNodes[r];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n,i){let r,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!r||r.length>u.length+a)&&(r=u,o=l,!u.length))break;if(l.solid){if(i)break;a+=2}}if(!r)return null;this.sync(o);for(let s=0;s<r.length;s++)n=this.enterInner(r[s],null,n,!1);return n}insertNode(e,n,i){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let r=this.findPlace(e,n,i);if(r){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=an.none;for(let a of r.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):u2(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,n,i,r){let o=this.findPlace(e.create(n),i,!1);return o&&(o=this.enterInner(e,n,i,!0,r)),o}enterInner(e,n,i,r=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=s2(e,o,s.options);s.options&yc&&s.content.length==0&&(a|=yc);let l=an.none;return i=i.filter(u=>(s.type?s.type.allowsMarkType(u.type):u2(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new bc(e,n,l,r,null,a)),this.open++,i}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Ll)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let r=i.length-1;r>=0;r--)e+=i[r].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let i=0;i<this.find.length;i++)this.find[i].node==e&&this.find[i].offset==n&&(this.find[i].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,i){if(e!=n&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&n.compareDocumentPosition(this.find[r].node)&(i?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),i=this.options.context,r=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),o=-(i?i.depth+1:0)+(r?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let c=l>0||l==0&&r?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}}function iN(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let i=e.nodeType==1?e.nodeName.toLowerCase():null;i&&o2.hasOwnProperty(i)&&n?(n.appendChild(e),e=n):i=="li"?n=e:i&&(n=null)}}function rN(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function l2(t){let e={};for(let n in t)e[n]=t[n];return e}function u2(t,e){let n=e.schema.nodes;for(let i in n){let r=n[i];if(!r.allowsMarkType(t))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==e||o.indexOf(c)<0&&s(c))return!0}};if(s(r.contentMatch))return!0}}class as{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},i){i||(i=vh(n).createDocumentFragment());let r=i,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(o[a][0])||u.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)r=o.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(o.push([u,r]),r.appendChild(c.dom),r=c.contentDOM||c.dom)}}r.appendChild(this.serializeNodeInner(s,n))}),i}serializeNodeInner(e,n){let{dom:i,contentDOM:r}=Ac(vh(n),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,r)}return i}serializeNode(e,n={}){let i=this.serializeNodeInner(e,n);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(e,n,i={}){let r=this.marks[e.type.name];return r&&Ac(vh(i),r(e,n),null,e.attrs)}static renderSpec(e,n,i=null,r){return Ac(e,n,i,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new as(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=c2(e.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(e){return c2(e.marks)}}function c2(t){let e={};for(let n in t){let i=t[n].spec.toDOM;i&&(e[n]=i)}return e}function vh(t){return t.document||window.document}const d2=new WeakMap;function oN(t){let e=d2.get(t);return e===void 0&&d2.set(t,e=sN(t)),e}function sN(t){let e=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")e||(e=[]),e.push(i);else for(let r=0;r<i.length;r++)n(i[r]);else for(let r in i)n(i[r])}return n(t),e}function Ac(t,e,n,i){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let r=e[0],o;if(typeof r!="string")throw new RangeError("Invalid array passed to renderSpec");if(i&&(o=oN(i))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=r.indexOf(" ");s>0&&(n=r.slice(0,s),r=r.slice(s+1));let a,l=n?t.createElementNS(n,r):t.createElement(r),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:h}=Ac(t,f,n,i);if(l.appendChild(p),h){if(a)throw new RangeError("Multiple content holes");a=h}}}return{dom:l,contentDOM:a}}const f2=65535,p2=Math.pow(2,16);function aN(t,e){return t+e*p2}function h2(t){return t&f2}function lN(t){return(t-(t&f2))/p2}const m2=1,g2=2,wc=4,v2=8;class yh{constructor(e,n,i){this.pos=e,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&v2)>0}get deletedBefore(){return(this.delInfo&(m2|wc))>0}get deletedAfter(){return(this.delInfo&(g2|wc))>0}get deletedAcross(){return(this.delInfo&wc)>0}}class Ii{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Ii.empty)return Ii.empty}recover(e){let n=0,i=h2(e);if(!this.inverted)for(let r=0;r<i;r++)n+=this.ranges[r*3+2]-this.ranges[r*3+1];return this.ranges[i*3]+n+lN(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,i){let r=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(e<=d){let f=u?e==l?-1:e==d?1:n:n,p=l+r+(f<0?0:c);if(i)return p;let h=e==(n<0?l:d)?null:aN(a/3,e-l),m=e==l?g2:e==d?m2:wc;return(n<0?e!=l:e!=d)&&(m|=v2),new yh(p,m,h)}r+=c-u}return i?e+r:new yh(e+r,0,null)}touches(e,n){let i=0,r=h2(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[a+o],c=l+u;if(e<=c&&a==r*3)return!0;i+=this.ranges[a+s]-u}return!1}forEach(e){let n=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let s=this.ranges[r],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[r+n],c=this.ranges[r+i];e(a,a+u,l,l+c),o+=c-u}}invert(){return new Ii(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Ii.empty:new Ii(e<0?[0,-e,0]:[0,0,e])}}Ii.empty=new Ii([]);class Dl{constructor(e,n,i=0,r=e?e.length:0){this.mirror=n,this.from=i,this.to=r,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Dl(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,i=this._maps.length;n<e._maps.length;n++){let r=e.getMirror(n);this.appendMap(e._maps[n],r!=null&&r<n?i+r:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,i=this._maps.length+e._maps.length;n>=0;n--){let r=e.getMirror(n);this.appendMap(e._maps[n].invert(),r!=null&&r>n?i-r-1:void 0)}}invert(){let e=new Dl;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let i=this.from;i<this.to;i++)e=this._maps[i].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,i){let r=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],a=s.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this._maps[l].recover(a.recover);continue}}r|=a.delInfo,e=a.pos}return i?e:new yh(e,r,null)}}const bh=Object.create(null);class ri{getMap(){return Ii.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=bh[n.stepType];if(!i)throw new RangeError(`No step type ${n.stepType} defined`);return i.fromJSON(e,n)}static jsonID(e,n){if(e in bh)throw new RangeError("Duplicate use of step JSON ID "+e);return bh[e]=n,n.prototype.jsonID=e,n}}class Pn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Pn(e,null)}static fail(e){return new Pn(null,e)}static fromReplace(e,n,i,r){try{return Pn.ok(e.replace(n,i,r))}catch(o){if(o instanceof pc)return Pn.fail(o.message);throw o}}}function Ah(t,e,n){let i=[];for(let r=0;r<t.childCount;r++){let o=t.child(r);o.content.size&&(o=o.copy(Ah(o.content,e,o))),o.isInline&&(o=e(o,n,r)),i.push(o)}return Me.fromArray(i)}class Ao extends ri{constructor(e,n,i){super(),this.from=e,this.to=n,this.mark=i}apply(e){let n=e.slice(this.from,this.to),i=e.resolve(this.from),r=i.node(i.sharedDepth(this.to)),o=new Xe(Ah(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),r),n.openStart,n.openEnd);return Pn.fromReplace(e,this.from,this.to,o)}invert(){return new yr(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Ao(n.pos,i.pos,this.mark)}merge(e){return e instanceof Ao&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ao(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ao(n.from,n.to,e.markFromJSON(n.mark))}}ri.jsonID("addMark",Ao);class yr extends ri{constructor(e,n,i){super(),this.from=e,this.to=n,this.mark=i}apply(e){let n=e.slice(this.from,this.to),i=new Xe(Ah(n.content,r=>r.mark(this.mark.removeFromSet(r.marks)),e),n.openStart,n.openEnd);return Pn.fromReplace(e,this.from,this.to,i)}invert(){return new Ao(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new yr(n.pos,i.pos,this.mark)}merge(e){return e instanceof yr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new yr(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new yr(n.from,n.to,e.markFromJSON(n.mark))}}ri.jsonID("removeMark",yr);class wo extends ri{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Pn.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Pn.fromReplace(e,this.pos,this.pos+1,new Xe(Me.from(i),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(i))return new wo(this.pos,n.marks[r]);return new wo(this.pos,this.mark)}}return new ls(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new wo(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new wo(n.pos,e.markFromJSON(n.mark))}}ri.jsonID("addNodeMark",wo);class ls extends ri{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Pn.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Pn.fromReplace(e,this.pos,this.pos+1,new Xe(Me.from(i),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new wo(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ls(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ls(n.pos,e.markFromJSON(n.mark))}}ri.jsonID("removeNodeMark",ls);class jn extends ri{constructor(e,n,i,r=!1){super(),this.from=e,this.to=n,this.slice=i,this.structure=r}apply(e){return this.structure&&wh(e,this.from,this.to)?Pn.fail("Structure replace would overwrite content"):Pn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Ii([this.from,this.to-this.from,this.slice.size])}invert(e){return new jn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return n.deletedAcross&&i.deletedAcross?null:new jn(n.pos,Math.max(n.pos,i.pos),this.slice,this.structure)}merge(e){if(!(e instanceof jn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Xe.empty:new Xe(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new jn(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Xe.empty:new Xe(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new jn(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new jn(n.from,n.to,Xe.fromJSON(e,n.slice),!!n.structure)}}ri.jsonID("replace",jn);class Un extends ri{constructor(e,n,i,r,o,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=i,this.gapTo=r,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(wh(e,this.from,this.gapFrom)||wh(e,this.gapTo,this.to)))return Pn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Pn.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?Pn.fromReplace(e,this.from,this.to,i):Pn.fail("Content does not fit in gap")}getMap(){return new Ii([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Un(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1),r=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?i.pos:e.map(this.gapTo,1);return n.deletedAcross&&i.deletedAcross||r<n.pos||o>i.pos?null:new Un(n.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Un(n.from,n.to,n.gapFrom,n.gapTo,Xe.fromJSON(e,n.slice),n.insert,!!n.structure)}}ri.jsonID("replaceAround",Un);function wh(t,e,n){let i=t.resolve(e),r=n-e,o=i.depth;for(;r>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,r--;if(r>0){let s=i.node(o).maybeChild(i.indexAfter(o));for(;r>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,r--}}return!1}function uN(t,e,n,i){let r=[],o=[],s,a;t.doc.nodesBetween(e,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&c.type.allowsMarkType(i.type)){let f=Math.max(u,e),p=Math.min(u+l.nodeSize,n),h=i.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(h)||(s&&s.to==f&&s.mark.eq(d[m])?s.to=p:r.push(s=new yr(f,p,d[m])));a&&a.to==f?a.to=p:o.push(a=new Ao(f,p,i))}}),r.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function cN(t,e,n,i){let r=[],o=0;t.doc.nodesBetween(e,n,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof vc){let u=s.marks,c;for(;c=i.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else i?i.isInSet(s.marks)&&(l=[i]):l=s.marks;if(l&&l.length){let u=Math.min(a+s.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],f;for(let p=0;p<r.length;p++){let h=r[p];h.step==o-1&&d.eq(r[p].style)&&(f=h)}f?(f.to=u,f.step=o):r.push({style:d,from:Math.max(a,e),to:u,step:o})}}}),r.forEach(s=>t.step(new yr(s.from,s.to,s.style)))}function Sh(t,e,n,i=n.contentMatch,r=!0){let o=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let u=o.child(l),c=a+u.nodeSize,d=i.matchType(u.type);if(!d)s.push(new jn(a,c,Xe.empty));else{i=d;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||t.step(new yr(a,c,u.marks[f]));if(r&&u.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,h;for(;f=p.exec(u.text);)h||(h=new Xe(Me.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new jn(a+f.index,a+f.index+f[0].length,h))}}a=c}if(!i.validEnd){let l=i.fillBefore(Me.empty,!0);t.replace(a,a,new Xe(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function dN(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Zs(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let i=t.depth;;--i){let r=t.$from.node(i),o=t.$from.index(i),s=t.$to.indexAfter(i);if(i<t.depth&&r.canReplace(o,s,n))return i;if(i==0||r.type.spec.isolating||!dN(r,o,s))break}return null}function fN(t,e,n){let{$from:i,$to:r,depth:o}=e,s=i.before(o+1),a=r.after(o+1),l=s,u=a,c=Me.empty,d=0;for(let h=o,m=!1;h>n;h--)m||i.index(h)>0?(m=!0,c=Me.from(i.node(h).copy(c)),d++):l--;let f=Me.empty,p=0;for(let h=o,m=!1;h>n;h--)m||r.after(h+1)<r.end(h)?(m=!0,f=Me.from(r.node(h).copy(f)),p++):u++;t.step(new Un(l,u,s,a,new Xe(c.append(f),d,p),c.size-d,!0))}function Ch(t,e,n=null,i=t){let r=pN(t,e),o=r&&hN(i,e);return o?r.map(y2).concat({type:e,attrs:n}).concat(o.map(y2)):null}function y2(t){return{type:t,attrs:null}}function pN(t,e){let{parent:n,startIndex:i,endIndex:r}=t,o=n.contentMatchAt(i).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(i,r,s)?o:null}function hN(t,e){let{parent:n,startIndex:i,endIndex:r}=t,o=n.child(i),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let u=i;l&&u<r;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function mN(t,e,n){let i=Me.empty;for(let s=n.length-1;s>=0;s--){if(i.size){let a=n[s].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=Me.from(n[s].type.create(n[s].attrs,i))}let r=e.start,o=e.end;t.step(new Un(r,o,r,o,new Xe(i,0,0),n.length,!0))}function gN(t,e,n,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(s,a)=>{let l=typeof r=="function"?r(s):r;if(s.isTextblock&&!s.hasMarkup(i,l)&&vN(t.doc,t.mapping.slice(o).map(a),i)){let u=null;if(i.schema.linebreakReplacement){let p=i.whitespace=="pre",h=!!i.contentMatch.matchType(i.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&A2(t,s,a,o),Sh(t,t.mapping.slice(o).map(a,1),i,void 0,u===null);let c=t.mapping.slice(o),d=c.map(a,1),f=c.map(a+s.nodeSize,1);return t.step(new Un(d,f,d+1,f-1,new Xe(Me.from(i.create(l,null,s.marks)),0,0),1,!0)),u===!0&&b2(t,s,a,o),!1}})}function b2(t,e,n,i){e.forEach((r,o)=>{if(r.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(r.text);){let l=t.mapping.slice(i).map(n+1+o+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function A2(t,e,n,i){e.forEach((r,o)=>{if(r.type==r.type.schema.linebreakReplacement){let s=t.mapping.slice(i).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
236
|
+
`))}})}function vN(t,e,n){let i=t.resolve(e),r=i.index();return i.parent.canReplaceWith(r,r+1,n)}function yN(t,e,n,i,r){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(i,null,r||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Un(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new Xe(Me.from(s),0,0),1,!0))}function Hr(t,e,n=1,i){let r=t.resolve(e),o=r.depth-n,s=i&&i[i.length-1]||r.parent;if(o<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!s.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let u=r.depth-1,c=n-2;u>o;u--,c--){let d=r.node(u),f=r.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=i&&i[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=i&&i[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let a=r.indexAfter(o),l=i&&i[0];return r.node(o).canReplaceWith(a,a,l?l.type:r.node(o+1).type)}function bN(t,e,n=1,i){let r=t.doc.resolve(e),o=Me.empty,s=Me.empty;for(let a=r.depth,l=r.depth-n,u=n-1;a>l;a--,u--){o=Me.from(r.node(a).copy(o));let c=i&&i[u];s=Me.from(c?c.type.create(c.attrs,s):r.node(a).copy(s))}t.step(new jn(e,e,new Xe(o.append(s),n,n),!0))}function So(t,e){let n=t.resolve(e),i=n.index();return w2(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function AN(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:i}=t.type.schema;for(let r=0;r<e.childCount;r++){let o=e.child(r),s=o.type==i?t.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(o.marks))return!1}return n.validEnd}function w2(t,e){return!!(t&&e&&!t.isLeaf&&AN(t,e))}function Sc(t,e,n=-1){let i=t.resolve(e);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):n>0?(o=i.node(r+1),a++,s=i.node(r).maybeChild(a)):(o=i.node(r).maybeChild(a-1),s=i.node(r+1)),o&&!o.isTextblock&&w2(o,s)&&i.node(r).canReplace(a,a+1))return e;if(r==0)break;e=n<0?i.before(r):i.after(r)}}function wN(t,e,n){let i=null,{linebreakReplacement:r}=t.doc.type.schema,o=t.doc.resolve(e-n),s=o.node().type;if(r&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(r);c&&!d?i=!1:!c&&d&&(i=!0)}let a=t.steps.length;if(i===!1){let c=t.doc.resolve(e+n);A2(t,c.node(),c.before(),a)}s.inlineContent&&Sh(t,e+n-1,s,o.node().contentMatchAt(o.index()),i==null);let l=t.mapping.slice(a),u=l.map(e-n);if(t.step(new jn(u,l.map(e+n,-1),Xe.empty,!0)),i===!0){let c=t.doc.resolve(u);b2(t,c.node(),c.before(),t.steps.length)}return t}function SN(t,e,n){let i=t.resolve(e);if(i.parent.canReplaceWith(i.index(),i.index(),n))return e;if(i.parentOffset==0)for(let r=i.depth-1;r>=0;r--){let o=i.index(r);if(i.node(r).canReplaceWith(o,o,n))return i.before(r+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let r=i.depth-1;r>=0;r--){let o=i.indexAfter(r);if(i.node(r).canReplaceWith(o,o,n))return i.after(r+1);if(o<i.node(r).childCount)return null}return null}function CN(t,e,n){let i=t.resolve(e);if(!n.content.size)return e;let r=n.content;for(let o=0;o<n.openStart;o++)r=r.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=i.depth;s>=0;s--){let a=s==i.depth?0:i.pos<=(i.start(s+1)+i.end(s+1))/2?-1:1,l=i.index(s)+(a>0?1:0),u=i.node(s),c=!1;if(o==1)c=u.canReplace(l,l,r);else{let d=u.contentMatchAt(l).findWrapping(r.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return a==0?i.pos:a<0?i.before(s+1):i.after(s+1)}return null}function Cc(t,e,n=e,i=Xe.empty){if(e==n&&!i.size)return null;let r=t.resolve(e),o=t.resolve(n);return S2(r,o,i)?new jn(e,n,i):new kN(r,o,i).fit()}function S2(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class kN{constructor(e,n,i){this.$from=e,this.$to=n,this.unplaced=i,this.frontier=[],this.placed=Me.empty;for(let r=0;r<=e.depth;r++){let o=e.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=Me.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(e<0?this.$to:i.doc.resolve(e));if(!r)return null;let o=this.placed,s=i.depth,a=r.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new Xe(o,s,a);return e>-1?new Un(i.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||i.pos!=this.$to.pos?new jn(i.pos,r.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,i=0,r=this.unplaced.openEnd;i<e;i++){let o=n.firstChild;if(n.childCount>1&&(r=0),o.type.spec.isolating&&r<=i){e=i;break}n=o.content}for(let n=1;n<=2;n++)for(let i=n==1?e:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=kh(this.unplaced.content,i-1).firstChild,r=o.content):r=this.unplaced.content;let s=r.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(Me.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:c};if(o&&u.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:i}=this.unplaced,r=kh(e,n);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new Xe(e,n+1,Math.max(i,r.size+n>=e.size-i?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:i}=this.unplaced,r=kh(e,n);if(r.childCount<=1&&n>0){let o=e.size-n<=n+r.size;this.unplaced=new Xe(Rl(e,n-1,1),n-1,o?n-1:i)}else this.unplaced=new Xe(Rl(e,n,1),n,i)}placeNodes({sliceDepth:e,frontierDepth:n,parent:i,inject:r,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=i?i.content:s.content,l=s.openStart-e,u=0,c=[],{match:d,type:f}=this.frontier[n];if(r){for(let m=0;m<r.childCount;m++)c.push(r.child(m));d=d.matchFragment(r)}let p=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let m=a.child(u),v=d.matchType(m.type);if(!v)break;u++,(u>1||l==0||m.content.size)&&(d=v,c.push(C2(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?p:-1)))}let h=u==a.childCount;h||(p=-1),this.placed=Bl(this.placed,n,Me.from(c)),this.frontier[n].match=d,h&&p<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,v=a;m<p;m++){let S=v.lastChild;this.frontier.push({type:S.type,match:S.contentMatchAt(S.childCount)}),v=S.content}this.unplaced=h?e==0?Xe.empty:new Xe(Rl(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new Xe(Rl(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!Th(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:i}=this.$to,r=this.$to.after(i);for(;i>1&&r==this.$to.end(--i);)++r;return r}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:i,type:r}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=Th(e,n,r,i,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=Th(e,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Bl(this.placed,n.depth,n.fit)),e=n.move;for(let i=n.depth+1;i<=e.depth;i++){let r=e.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(i));this.openFrontierNode(r.type,r.attrs,o)}return e}openFrontierNode(e,n=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Bl(this.placed,this.depth,Me.from(e.create(n,i))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Me.empty,!0);n.childCount&&(this.placed=Bl(this.placed,this.frontier.length,n))}}function Rl(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Rl(t.firstChild.content,e-1,n)))}function Bl(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Bl(t.lastChild.content,e-1,n)))}function kh(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function C2(t,e,n){if(e<=0)return t;let i=t.content;return e>1&&(i=i.replaceChild(0,C2(i.firstChild,e-1,i.childCount==1?n-1:0))),e>0&&(i=t.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(Me.empty,!0)))),t.copy(i)}function Th(t,e,n,i,r){let o=t.node(e),s=r?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!TN(n,o.content,s)?a:null}function TN(t,e,n){for(let i=n;i<e.childCount;i++)if(!t.allowsMarks(e.child(i).marks))return!0;return!1}function ON(t){return t.spec.defining||t.spec.definingForContent}function xN(t,e,n,i){if(!i.size)return t.deleteRange(e,n);let r=t.doc.resolve(e),o=t.doc.resolve(n);if(S2(r,o,i))return t.step(new jn(e,n,i));let s=T2(r,t.doc.resolve(n));s[s.length-1]==0&&s.pop();let a=-(r.depth+1);s.unshift(a);for(let f=r.depth,p=r.pos-1;f>0;f--,p--){let h=r.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?a=f:r.before(f)==p&&s.splice(1,0,-f)}let l=s.indexOf(a),u=[],c=i.openStart;for(let f=i.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==i.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=ON(p.type);if(h&&!p.sameMarkup(r.node(Math.abs(a)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=i.openStart;f>=0;f--){let p=(f+c+1)%(i.openStart+1),h=u[p];if(h)for(let m=0;m<s.length;m++){let v=s[(m+l)%s.length],S=!0;v<0&&(S=!1,v=-v);let b=r.node(v-1),k=r.index(v-1);if(b.canReplaceWith(k,k,h.type,h.marks))return t.replace(r.before(v),S?o.after(v):n,new Xe(k2(i.content,0,i.openStart,p),p,i.openEnd))}}let d=t.steps.length;for(let f=s.length-1;f>=0&&(t.replace(e,n,i),!(t.steps.length>d));f--){let p=s[f];p<0||(e=r.before(p),n=o.after(p))}}function k2(t,e,n,i,r){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(k2(o.content,e+1,n,i,o)))}if(e>i){let o=r.contentMatchAt(0),s=o.fillBefore(t).append(t);t=s.append(o.matchFragment(s).fillBefore(Me.empty,!0))}return t}function MN(t,e,n,i){if(!i.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let r=SN(t.doc,e,i.type);r!=null&&(e=n=r)}t.replaceRange(e,n,new Xe(Me.from(i),0,0))}function EN(t,e,n){let i=t.doc.resolve(e),r=t.doc.resolve(n),o=T2(i,r);for(let s=0;s<o.length;s++){let a=o[s],l=s==o.length-1;if(l&&a==0||i.node(a).type.contentMatch.validEnd)return t.delete(i.start(a),r.end(a));if(a>0&&(l||i.node(a-1).canReplace(i.index(a-1),r.indexAfter(a-1))))return t.delete(i.before(a),r.after(a))}for(let s=1;s<=i.depth&&s<=r.depth;s++)if(e-i.start(s)==i.depth-s&&n>i.end(s)&&r.end(s)-n!=r.depth-s&&i.start(s-1)==r.start(s-1)&&i.node(s-1).canReplace(i.index(s-1),r.index(s-1)))return t.delete(i.before(s),n);t.delete(e,n)}function T2(t,e){let n=[],i=Math.min(t.depth,e.depth);for(let r=i;r>=0;r--){let o=t.start(r);if(o<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&n.push(r)}return n}class _s extends ri{constructor(e,n,i){super(),this.pos=e,this.attr=n,this.value=i}apply(e){let n=e.nodeAt(this.pos);if(!n)return Pn.fail("No node at attribute step's position");let i=Object.create(null);for(let o in n.attrs)i[o]=n.attrs[o];i[this.attr]=this.value;let r=n.type.create(i,null,n.marks);return Pn.fromReplace(e,this.pos,this.pos+1,new Xe(Me.from(r),0,n.isLeaf?0:1))}getMap(){return Ii.empty}invert(e){return new _s(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new _s(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new _s(n.pos,n.attr,n.value)}}ri.jsonID("attr",_s);class Nl extends ri{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let r in e.attrs)n[r]=e.attrs[r];n[this.attr]=this.value;let i=e.type.create(n,e.content,e.marks);return Pn.ok(i)}getMap(){return Ii.empty}invert(e){return new Nl(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Nl(n.attr,n.value)}}ri.jsonID("docAttr",Nl);let Js=class extends Error{};Js=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},Js.prototype=Object.create(Error.prototype),Js.prototype.constructor=Js,Js.prototype.name="TransformError";class O2{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Dl}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Js(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,i=Xe.empty){let r=Cc(this.doc,e,n,i);return r&&this.step(r),this}replaceWith(e,n,i){return this.replace(e,n,new Xe(Me.from(i),0,0))}delete(e,n){return this.replace(e,n,Xe.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,i){return xN(this,e,n,i),this}replaceRangeWith(e,n,i){return MN(this,e,n,i),this}deleteRange(e,n){return EN(this,e,n),this}lift(e,n){return fN(this,e,n),this}join(e,n=1){return wN(this,e,n),this}wrap(e,n){return mN(this,e,n),this}setBlockType(e,n=e,i,r=null){return gN(this,e,n,i,r),this}setNodeMarkup(e,n,i=null,r){return yN(this,e,n,i,r),this}setNodeAttribute(e,n,i){return this.step(new _s(e,n,i)),this}setDocAttribute(e,n){return this.step(new Nl(e,n)),this}addNodeMark(e,n){return this.step(new wo(e,n)),this}removeNodeMark(e,n){let i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at position "+e);if(n instanceof an)n.isInSet(i.marks)&&this.step(new ls(e,n));else{let r=i.marks,o,s=[];for(;o=n.isInSet(r);)s.push(new ls(e,o)),r=o.removeFromSet(r);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(e,n=1,i){return bN(this,e,n,i),this}addMark(e,n,i){return uN(this,e,n,i),this}removeMark(e,n,i){return cN(this,e,n,i),this}clearIncompatible(e,n,i){return Sh(this,e,n,i),this}}const Oh=Object.create(null);class $t{constructor(e,n,i){this.$anchor=e,this.$head=n,this.ranges=i||[new IN(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Xe.empty){let i=n.content.lastChild,r=null;for(let a=0;a<n.openEnd;a++)r=i,i=i.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],c=e.mapping.slice(o);e.replaceRange(c.map(l.pos),c.map(u.pos),a?Xe.empty:n),a==0&&E2(e,o,(i?i.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,n){let i=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:s,$to:a}=r[o],l=e.mapping.slice(i),u=l.map(s.pos),c=l.map(a.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,n),E2(e,i,n.isInline?-1:1))}}static findFrom(e,n,i=!1){let r=e.parent.inlineContent?new xt(e):Ys(e.node(0),e.parent,e.pos,e.index(),n,i);if(r)return r;for(let o=e.depth-1;o>=0;o--){let s=n<0?Ys(e.node(0),e.node(o),e.before(o+1),e.index(o),n,i):Ys(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,i);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Pi(e.node(0))}static atStart(e){return Ys(e,e,0,0,1)||new Pi(e)}static atEnd(e){return Ys(e,e,e.content.size,e.childCount,-1)||new Pi(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=Oh[n.type];if(!i)throw new RangeError(`No selection type ${n.type} defined`);return i.fromJSON(e,n)}static jsonID(e,n){if(e in Oh)throw new RangeError("Duplicate use of selection JSON ID "+e);return Oh[e]=n,n.prototype.jsonID=e,n}getBookmark(){return xt.between(this.$anchor,this.$head).getBookmark()}}$t.prototype.visible=!0;class IN{constructor(e,n){this.$from=e,this.$to=n}}let x2=!1;function M2(t){!x2&&!t.parent.inlineContent&&(x2=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class xt extends $t{constructor(e,n=e){M2(e),M2(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let i=e.resolve(n.map(this.head));if(!i.parent.inlineContent)return $t.near(i);let r=e.resolve(n.map(this.anchor));return new xt(r.parent.inlineContent?r:i,i)}replace(e,n=Xe.empty){if(super.replace(e,n),n==Xe.empty){let i=this.$from.marksAcross(this.$to);i&&e.ensureMarks(i)}}eq(e){return e instanceof xt&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new kc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new xt(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,i=n){let r=e.resolve(n);return new this(r,i==n?r:e.resolve(i))}static between(e,n,i){let r=e.pos-n.pos;if((!i||r)&&(i=r>=0?1:-1),!n.parent.inlineContent){let o=$t.findFrom(n,i,!0)||$t.findFrom(n,-i,!0);if(o)n=o.$head;else return $t.near(n,i)}return e.parent.inlineContent||(r==0?e=n:(e=($t.findFrom(e,-i,!0)||$t.findFrom(e,i,!0)).$anchor,e.pos<n.pos!=r<0&&(e=n))),new xt(e,n)}}$t.jsonID("text",xt);class kc{constructor(e,n){this.anchor=e,this.head=n}map(e){return new kc(e.map(this.anchor),e.map(this.head))}resolve(e){return xt.between(e.resolve(this.anchor),e.resolve(this.head))}}class mt extends $t{constructor(e){let n=e.nodeAfter,i=e.node(0).resolve(e.pos+n.nodeSize);super(e,i),this.node=n}map(e,n){let{deleted:i,pos:r}=n.mapResult(this.anchor),o=e.resolve(r);return i?$t.near(o):new mt(o)}content(){return new Xe(Me.from(this.node),0,0)}eq(e){return e instanceof mt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new xh(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new mt(e.resolve(n.anchor))}static create(e,n){return new mt(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}mt.prototype.visible=!1,$t.jsonID("node",mt);class xh{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:i}=e.mapResult(this.anchor);return n?new kc(i,i):new xh(i)}resolve(e){let n=e.resolve(this.anchor),i=n.nodeAfter;return i&&mt.isSelectable(i)?new mt(n):$t.near(n)}}class Pi extends $t{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Xe.empty){if(n==Xe.empty){e.delete(0,e.doc.content.size);let i=$t.atStart(e.doc);i.eq(e.selection)||e.setSelection(i)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Pi(e)}map(e){return new Pi(e)}eq(e){return e instanceof Pi}getBookmark(){return PN}}$t.jsonID("all",Pi);const PN={map(){return this},resolve(t){return new Pi(t)}};function Ys(t,e,n,i,r,o=!1){if(e.inlineContent)return xt.create(t,n);for(let s=i-(r>0?0:1);r>0?s<e.childCount:s>=0;s+=r){let a=e.child(s);if(a.isAtom){if(!o&&mt.isSelectable(a))return mt.create(t,n-(r<0?a.nodeSize:0))}else{let l=Ys(t,a,n+r,r<0?a.childCount:0,r,o);if(l)return l}n+=a.nodeSize*r}return null}function E2(t,e,n){let i=t.steps.length-1;if(i<e)return;let r=t.steps[i];if(!(r instanceof jn||r instanceof Un))return;let o=t.mapping.maps[i],s;o.forEach((a,l,u,c)=>{s==null&&(s=c)}),t.setSelection($t.near(t.doc.resolve(s),n))}const I2=1,P2=2,L2=4;class LN extends O2{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|I2)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&I2)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=P2,this}ensureMarks(e){return an.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&P2)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let i=this.selection;return n&&(e=e.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||an.none))),i.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,i){let r=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(i==null&&(i=n),i=i??n,!e)return this.deleteRange(n,i);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=i==n?s.marks():s.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(n,i,r.text(e,o)),this.selection.empty||this.setSelection($t.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=L2,this}get scrolledIntoView(){return(this.updated&L2)>0}}function D2(t,e){return!e||!t?t:t.bind(e)}class $l{constructor(e,n,i){this.name=e,this.init=D2(n.init,i),this.apply=D2(n.apply,i)}}const DN=[new $l("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new $l("selection",{init(t,e){return t.selection||$t.atStart(e.doc)},apply(t){return t.selection}}),new $l("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,i){return i.selection.$cursor?t.storedMarks:null}}),new $l("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Mh{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=DN.slice(),n&&n.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new $l(i.key,i.spec.state,i))})}}class Qs{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let i=0;i<this.config.plugins.length;i++)if(i!=n){let r=this.config.plugins[i];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],i=this.applyInner(e),r=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=r?r[s].n:0,u=r?r[s].state:this,c=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,i);if(c&&i.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let d=0;d<this.config.plugins.length;d++)r.push(d<s?{state:i,n:n.length}:{state:this,n:0})}n.push(c),i=i.applyInner(c),o=!0}r&&(r[s]={state:i,n:n.length})}}if(!o)return{state:i,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Qs(this.config),i=this.config.fields;for(let r=0;r<i.length;r++){let o=i[r];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new LN(this)}static create(e){let n=new Mh(e.doc?e.doc.type.schema:e.schema,e.plugins),i=new Qs(n);for(let r=0;r<n.fields.length;r++)i[n.fields[r].name]=n.fields[r].init(e,i);return i}reconfigure(e){let n=new Mh(this.schema,e.plugins),i=n.fields,r=new Qs(n);for(let o=0;o<i.length;o++){let s=i[o].name;r[s]=this.hasOwnProperty(s)?this[s]:i[o].init(e,r)}return r}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(i=>i.toJSON())),e&&typeof e=="object")for(let i in e){if(i=="doc"||i=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[i],o=r.spec.state;o&&o.toJSON&&(n[i]=o.toJSON.call(r,this[r.key]))}return n}static fromJSON(e,n,i){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new Mh(e.schema,e.plugins),o=new Qs(r);return r.fields.forEach(s=>{if(s.name=="doc")o.doc=yo.fromJSON(e.schema,n.doc);else if(s.name=="selection")o.selection=$t.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(i)for(let a in i){let l=i[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[s.name]=u.fromJSON.call(l,e,n[a],o);return}}o[s.name]=s.init(e,o)}}),o}}function R2(t,e,n){for(let i in t){let r=t[i];r instanceof Function?r=r.bind(e):i=="handleDOMEvents"&&(r=R2(r,e,{})),n[i]=r}return n}class Kn{constructor(e){this.spec=e,this.props={},e.props&&R2(e.props,this,this.props),this.key=e.key?e.key.key:B2("plugin")}getState(e){return e[this.key]}}const Eh=Object.create(null);function B2(t){return t in Eh?t+"$"+ ++Eh[t]:(Eh[t]=0,t+"$")}class Yn{constructor(e="key"){this.key=B2(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Qn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},ea=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Ih=null;const jr=function(t,e,n){let i=Ih||(Ih=document.createRange());return i.setEnd(t,n??t.nodeValue.length),i.setStart(t,e||0),i},RN=function(){Ih=null},us=function(t,e,n,i){return n&&(N2(t,e,n,i,-1)||N2(t,e,n,i,1))},BN=/^(img|br|input|textarea|hr)$/i;function N2(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:ji(t))){let o=t.parentNode;if(!o||o.nodeType!=1||Vl(t)||BN.test(t.nodeName)||t.contentEditable=="false")return!1;e=Qn(t)+(r<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.contentEditable=="false")return!1;e=r<0?ji(t):0}else return!1}}function ji(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function NN(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=ji(t)}else if(t.parentNode&&!Vl(t))e=Qn(t),t=t.parentNode;else return null}}function $N(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Vl(t))e=Qn(t)+1,t=t.parentNode;else return null}}function VN(t,e,n){for(let i=e==0,r=e==ji(t);i||r;){if(t==n)return!0;let o=Qn(t);if(t=t.parentNode,!t)return!1;i=i&&o==0,r=r&&o==ji(t)}}function Vl(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Tc=function(t){return t.focusNode&&us(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function cs(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function zN(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function FN(t,e,n){if(t.caretPositionFromPoint)try{let i=t.caretPositionFromPoint(e,n);if(i)return{node:i.offsetNode,offset:Math.min(ji(i.offsetNode),i.offset)}}catch{}if(t.caretRangeFromPoint){let i=t.caretRangeFromPoint(e,n);if(i)return{node:i.startContainer,offset:Math.min(ji(i.startContainer),i.startOffset)}}}const br=typeof navigator<"u"?navigator:null,$2=typeof document<"u"?document:null,Co=br&&br.userAgent||"",Ph=/Edge\/(\d+)/.exec(Co),V2=/MSIE \d/.exec(Co),Lh=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Co),Ci=!!(V2||Lh||Ph),ko=V2?document.documentMode:Lh?+Lh[1]:Ph?+Ph[1]:0,ar=!Ci&&/gecko\/(\d+)/i.test(Co);ar&&+(/Firefox\/(\d+)/.exec(Co)||[0,0])[1];const Dh=!Ci&&/Chrome\/(\d+)/.exec(Co),oi=!!Dh,z2=Dh?+Dh[1]:0,hi=!Ci&&!!br&&/Apple Computer/.test(br.vendor),ta=hi&&(/Mobile\/\w+/.test(Co)||!!br&&br.maxTouchPoints>2),Ui=ta||(br?/Mac/.test(br.platform):!1),HN=br?/Win/.test(br.platform):!1,Ur=/Android \d/.test(Co),zl=!!$2&&"webkitFontSmoothing"in $2.documentElement.style,jN=zl?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function UN(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Kr(t,e){return typeof t=="number"?t:t[e]}function KN(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,i=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*i}}function F2(t,e,n){let i=t.someProp("scrollThreshold")||0,r=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=ea(s);continue}let a=s,l=a==o.body,u=l?UN(o):KN(a),c=0,d=0;if(e.top<u.top+Kr(i,"top")?d=-(u.top-e.top+Kr(r,"top")):e.bottom>u.bottom-Kr(i,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+Kr(r,"top")-u.top:e.bottom-u.bottom+Kr(r,"bottom")),e.left<u.left+Kr(i,"left")?c=-(u.left-e.left+Kr(r,"left")):e.right>u.right-Kr(i,"right")&&(c=e.right-u.right+Kr(r,"right")),c||d)if(l)o.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,h=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let m=a.scrollLeft-p,v=a.scrollTop-h;e={left:e.left-m,top:e.top-v,right:e.right-m,bottom:e.bottom-v}}let f=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:ea(s)}}function WN(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),i,r;for(let o=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let a=t.root.elementFromPoint(o,s);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){i=a,r=l.top;break}}return{refDOM:i,refTop:r,stack:H2(t.dom)}}function H2(t){let e=[],n=t.ownerDocument;for(let i=t;i&&(e.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),t!=n);i=ea(i));return e}function qN({refDOM:t,refTop:e,stack:n}){let i=t?t.getBoundingClientRect().top:0;j2(n,i==0?0:i-e)}function j2(t,e){for(let n=0;n<t.length;n++){let{dom:i,top:r,left:o}=t[n];i.scrollTop!=r+e&&(i.scrollTop=r+e),i.scrollLeft!=o&&(i.scrollLeft=o)}}let na=null;function XN(t){if(t.setActive)return t.setActive();if(na)return t.focus(na);let e=H2(t);t.focus(na==null?{get preventScroll(){return na={preventScroll:!0},!0}}:void 0),na||(na=!1,j2(e,0))}function U2(t,e){let n,i=2e8,r,o=0,s=e.top,a=e.top,l,u;for(let c=t.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=jr(c).getClientRects();else continue;for(let p=0;p<f.length;p++){let h=f[p];if(h.top<=s&&h.bottom>=a){s=Math.max(h.bottom,s),a=Math.min(h.top,a);let m=h.left>e.left?h.left-e.left:h.right<e.left?e.left-h.right:0;if(m<i){n=c,i=m,r=m&&n.nodeType==3?{left:h.right<e.left?h.right:h.left,top:e.top}:e,c.nodeType==1&&m&&(o=d+(e.left>=(h.left+h.right)/2?1:0));continue}}else h.top>e.top&&!l&&h.left<=e.left&&h.right>=e.left&&(l=c,u={left:Math.max(h.left,Math.min(h.right,e.left)),top:h.top});!n&&(e.left>=h.right&&e.top>=h.top||e.left>=h.left&&e.top>=h.bottom)&&(o=d+1)}}return!n&&l&&(n=l,r=u,i=0),n&&n.nodeType==3?GN(n,r):!n||i&&n.nodeType==1?{node:t,offset:o}:U2(n,r)}function GN(t,e){let n=t.nodeValue.length,i=document.createRange();for(let r=0;r<n;r++){i.setEnd(t,r+1),i.setStart(t,r);let o=To(i,1);if(o.top!=o.bottom&&Rh(e,o))return{node:t,offset:r+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function Rh(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function ZN(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function _N(t,e,n){let{node:i,offset:r}=U2(e,n),o=-1;if(i.nodeType==1&&!i.firstChild){let s=i.getBoundingClientRect();o=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(i,r,o)}function JN(t,e,n,i){let r=-1;for(let o=e,s=!1;o!=t.dom;){let a=t.docView.nearestDesc(o,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&(!s&&l.left>i.left||l.top>i.top?r=a.posBefore:(!s&&l.right<i.left||l.bottom<i.top)&&(r=a.posAfter),s=!0),!a.contentDOM&&r<0&&!a.node.isText))return(a.node.isBlock?i.top<(l.top+l.bottom)/2:i.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;o=a.dom.parentNode}return r>-1?r:t.docView.posFromDOM(e,n,-1)}function K2(t,e,n){let i=t.childNodes.length;if(i&&n.top<n.bottom)for(let r=Math.max(0,Math.min(i-1,Math.floor(i*(e.top-n.top)/(n.bottom-n.top))-2)),o=r;;){let s=t.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(Rh(e,u))return K2(s,e,u)}}if((o=(o+1)%i)==r)break}return t}function YN(t,e){let n=t.dom.ownerDocument,i,r=0,o=FN(n,e.left,e.top);o&&({node:i,offset:r}=o);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let u=t.dom.getBoundingClientRect();if(!Rh(e,u)||(s=K2(t.dom,e,u),!s))return null}if(hi)for(let u=s;i&&u;u=ea(u))u.draggable&&(i=void 0);if(s=ZN(s,e),i){if(ar&&i.nodeType==1&&(r=Math.min(r,i.childNodes.length),r<i.childNodes.length)){let c=i.childNodes[r],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&r++}let u;zl&&r&&i.nodeType==1&&(u=i.childNodes[r-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&r--,i==t.dom&&r==i.childNodes.length-1&&i.lastChild.nodeType==1&&e.top>i.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(r==0||i.nodeType!=1||i.childNodes[r-1].nodeName!="BR")&&(a=JN(t,i,r,e))}a==null&&(a=_N(t,s,e));let l=t.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function W2(t){return t.top<t.bottom||t.left<t.right}function To(t,e){let n=t.getClientRects();if(n.length){let i=n[e<0?0:n.length-1];if(W2(i))return i}return Array.prototype.find.call(n,W2)||t.getBoundingClientRect()}const QN=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function q2(t,e,n){let{node:i,offset:r,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=zl||ar;if(i.nodeType==3)if(s&&(QN.test(i.nodeValue)||(n<0?!r:r==i.nodeValue.length))){let l=To(jr(i,r,r),n);if(ar&&r&&/\s/.test(i.nodeValue[r-1])&&r<i.nodeValue.length){let u=To(jr(i,r-1,r-1),-1);if(u.top==l.top){let c=To(jr(i,r,r+1),-1);if(c.top!=l.top)return Fl(c,c.left<u.left)}}return l}else{let l=r,u=r,c=n<0?1:-1;return n<0&&!r?(u++,c=-1):n>=0&&r==i.nodeValue.length?(l--,c=1):n<0?l--:u++,Fl(To(jr(i,l,u),c),c<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&r&&(n<0||r==ji(i))){let l=i.childNodes[r-1];if(l.nodeType==1)return Bh(l.getBoundingClientRect(),!1)}if(o==null&&r<ji(i)){let l=i.childNodes[r];if(l.nodeType==1)return Bh(l.getBoundingClientRect(),!0)}return Bh(i.getBoundingClientRect(),n>=0)}if(o==null&&r&&(n<0||r==ji(i))){let l=i.childNodes[r-1],u=l.nodeType==3?jr(l,ji(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Fl(To(u,1),!1)}if(o==null&&r<ji(i)){let l=i.childNodes[r];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?jr(l,0,s?0:1):l.nodeType==1?l:null:null;if(u)return Fl(To(u,-1),!0)}return Fl(To(i.nodeType==3?jr(i):i,-n),n>=0)}function Fl(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Bh(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function X2(t,e,n){let i=t.state,r=t.root.activeElement;i!=e&&t.updateState(e),r!=t.dom&&t.focus();try{return n()}finally{i!=e&&t.updateState(i),r!=t.dom&&r&&r.focus()}}function e$(t,e,n){let i=e.selection,r=n=="up"?i.$from:i.$to;return X2(t,e,()=>{let{node:o}=t.docView.domFromPos(r.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=q2(t,r.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=jr(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let c=l[u];if(c.bottom>c.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const t$=/[\u0590-\u08ac]/;function n$(t,e,n){let{$head:i}=e.selection;if(!i.parent.isTextblock)return!1;let r=i.parentOffset,o=!r,s=r==i.parent.content.size,a=t.domSelection();return a?!t$.test(i.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:s:X2(t,e,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=t.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let p=i.depth?t.docView.domAfterPos(i.before()):t.dom,{focusNode:h,focusOffset:m}=t.domSelectionRange(),v=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&u==m;try{a.collapse(c,d),l&&(l!=c||u!=d)&&a.extend&&a.extend(l,u)}catch{}return f!=null&&(a.caretBidiLevel=f),v}):i.pos==i.start()||i.pos==i.end()}let G2=null,Z2=null,_2=!1;function i$(t,e,n){return G2==e&&Z2==n?_2:(G2=e,Z2=n,_2=n=="up"||n=="down"?e$(t,e,n):n$(t,e,n))}const Ki=0,J2=1,ds=2,Ar=3;class Hl{constructor(e,n,i,r){this.parent=e,this.children=n,this.dom=i,this.contentDOM=r,this.dirty=Ki,i.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,i){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,i=this.posAtStart;;n++){let r=this.children[n];if(r==e)return i;i+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,i){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(i<0){let o,s;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let r;if(e==this.dom&&this.contentDOM)r=n>Qn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){r=!1;break}if(o.previousSibling)break}if(r==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){r=!0;break}if(o.nextSibling)break}}return r??i>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let i=!0,r=e;r;r=r.parentNode){let o=this.getDesc(r),s;if(o&&(!n||o.node))if(i&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))i=!1;else return o}}getDesc(e){let n=e.pmViewDesc;for(let i=n;i;i=i.parent)if(i==this)return n}posFromDOM(e,n,i){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,n,i)}return-1}descAt(e){for(let n=0,i=0;n<this.children.length;n++){let r=this.children[n],o=i+r.size;if(i==e&&o!=i){for(;!r.border&&r.children.length;)for(let s=0;s<r.children.length;s++){let a=r.children[s];if(a.size){r=a;break}}return r}if(e<o)return r.descAt(e-i-r.border);i=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let i=0,r=0;for(let o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.size;if(a>e||s instanceof ew){r=e-o;break}o=a}if(r)return this.children[i].domFromPos(r-this.children[i].border,n);for(let o;i&&!(o=this.children[i-1]).size&&o instanceof Y2&&o.side>=0;i--);if(n<=0){let o,s=!0;for(;o=i?this.children[i-1]:null,!(!o||o.dom.parentNode==this.contentDOM);i--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Qn(o.dom)+1:0}}else{let o,s=!0;for(;o=i<this.children.length?this.children[i]:null,!(!o||o.dom.parentNode==this.contentDOM);i++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Qn(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,i=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let s=i,a=0;;a++){let l=this.children[a],u=s+l.size;if(r==-1&&e<=u){let c=s+l.border;if(e>=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,c);e=s;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=Qn(f.dom)+1;break}e-=f.size}r==-1&&(r=0)}if(r>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=Qn(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:e,to:n,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:i}=this.domFromPos(e,0);if(n.nodeType!=1||i==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[i]}setSelection(e,n,i,r=!1){let o=Math.min(e,n),s=Math.max(e,n);for(let p=0,h=0;p<this.children.length;p++){let m=this.children[p],v=h+m.size;if(o>h&&s<v)return m.setSelection(e-h-m.border,n-h-m.border,i,r);h=v}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),u=i.root.getSelection(),c=i.domSelectionRange(),d=!1;if((ar||hi)&&e==n){let{node:p,offset:h}=a;if(p.nodeType==3){if(d=!!(h&&p.nodeValue[h-1]==`
|
|
237
|
+
`),d&&h==p.nodeValue.length)for(let m=p,v;m;m=m.parentNode){if(v=m.nextSibling){v.nodeName=="BR"&&(a=l={node:v.parentNode,offset:Qn(v)+1});break}let S=m.pmViewDesc;if(S&&S.node&&S.node.isBlock)break}}else{let m=p.childNodes[h-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(ar&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(r=!0)}if(!(r||d&&hi)&&us(a.node,a.offset,c.anchorNode,c.anchorOffset)&&us(l.node,l.offset,c.focusNode,c.focusOffset))return;let f=!1;if((u.extend||e==n)&&!d){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(e>n){let h=a;a=l,l=h}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let i=0,r=0;r<this.children.length;r++){let o=this.children[r],s=i+o.size;if(i==s?e<=s&&n>=i:e<s&&n>i){let a=i+o.border,l=s-o.border;if(e>=a&&n<=l){this.dirty=e==i||n==s?ds:J2,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Ar:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?ds:Ar}i=s}this.dirty=ds}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let i=e==1?ds:J2;n.dirty<i&&(n.dirty=i)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class Y2 extends Hl{constructor(e,n,i,r){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(i,()=>{if(!o)return r;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==Ki&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class r$ extends Hl{constructor(e,n,i,r){super(e,[],n,null),this.textDOM=i,this.text=r}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class fs extends Hl{constructor(e,n,i,r,o){super(e,[],i,r),this.mark=n,this.spec=o}static create(e,n,i,r){let o=r.nodeViews[n.type.name],s=o&&o(n,r,i);return(!s||!s.dom)&&(s=as.renderSpec(document,n.type.spec.toDOM(n,i),null,n.attrs)),new fs(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Ar||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ar&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Ki){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty<this.dirty&&(i.dirty=this.dirty),this.dirty=Ki}}slice(e,n,i){let r=fs.create(this.parent,this.mark,!0,i),o=this.children,s=this.size;n<s&&(o=$h(o,n,s,i)),e>0&&(o=$h(o,0,e,i));for(let a=0;a<o.length;a++)o[a].parent=r;return r.children=o,r}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Oo extends Hl{constructor(e,n,i,r,o,s,a,l,u){super(e,[],o,s),this.node=n,this.outerDeco=i,this.innerDeco=r,this.nodeDOM=a}static create(e,n,i,r,o,s){let a=o.nodeViews[n.type.name],l,u=a&&a(n,o,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},i,r),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=as.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=iw(c,i,n),u?l=new o$(e,n,i,r,c,d||null,f,u,o,s+1):n.isText?new Oc(e,n,i,r,c,f,o):new Oo(e,n,i,r,c,d||null,f,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let i=this.children[n];if(this.dom.contains(i.dom.parentNode)){e.contentElement=i.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Me.empty)}return e}matchesNode(e,n,i){return this.dirty==Ki&&e.eq(this.node)&&xc(n,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let i=this.node.inlineContent,r=n,o=e.composing?this.localCompositionInfo(e,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new a$(this,s&&s.node,e);c$(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,i,e):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?an.none:this.node.child(c).marks,i,e),l.placeWidget(u,e,r)},(u,c,d,f)=>{l.syncToMarks(u.marks,i,e);let p;l.findNodeMatch(u,c,d,f)||a&&e.state.selection.from>r&&e.state.selection.to<r+u.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,d,p,e)||l.updateNextNode(u,c,d,e,f,r)||l.addNode(u,c,d,e,r),r+=u.nodeSize}),l.syncToMarks([],i,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==ds)&&(s&&this.protectLocalComposition(e,s),tw(this.contentDOM,this.children,e),ta&&d$(this.dom))}localCompositionInfo(e,n){let{from:i,to:r}=e.state.selection;if(!(e.state.selection instanceof xt)||i<n||r>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=f$(this.node.content,s,i-n,r-n);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:i,text:r}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new r$(this,o,n,r);e.input.compositionNodes.push(s),this.children=$h(this.children,i,i+r.length,e,s)}update(e,n,i,r){return this.dirty==Ar||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,i,r),!0)}updateInner(e,n,i,r){this.updateOuterDeco(n),this.node=e,this.innerDeco=i,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=Ki}updateOuterDeco(e){if(xc(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,i=this.dom;this.dom=nw(this.dom,this.nodeDOM,Nh(this.outerDeco,this.node,n),Nh(e,this.node,n)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Q2(t,e,n,i,r){iw(i,e,t);let o=new Oo(void 0,t,e,n,i,i,i,r,0);return o.contentDOM&&o.updateChildren(r,0),o}class Oc extends Oo{constructor(e,n,i,r,o,s,a){super(e,n,i,r,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,i,r){return this.dirty==Ar||this.dirty!=Ki&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Ki||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=Ki,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,i){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,i)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,i){let r=this.node.cut(e,n),o=document.createTextNode(r.text);return new Oc(this.parent,r,this.outerDeco,this.innerDeco,o,o,i)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ar)}get domAtom(){return!1}isText(e){return this.node.text==e}}class ew extends Hl{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Ki&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class o$ extends Oo{constructor(e,n,i,r,o,s,a,l,u,c){super(e,n,i,r,o,s,a,u,c),this.spec=l}update(e,n,i,r){if(this.dirty==Ar)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,n,i);return o&&this.updateInner(e,n,i,r),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,i,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,i,r){this.spec.setSelection?this.spec.setSelection(e,n,i.root):super.setSelection(e,n,i,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function tw(t,e,n){let i=t.firstChild,r=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==t){for(;a!=i;)i=rw(i),r=!0;i=i.nextSibling}else r=!0,t.insertBefore(a,i);if(s instanceof fs){let l=i?i.previousSibling:t.lastChild;tw(s.contentDOM,s.children,n),i=l?l.nextSibling:t.firstChild}}for(;i;)i=rw(i),r=!0;r&&n.trackWrites==t&&(n.trackWrites=null)}const jl=function(t){t&&(this.nodeName=t)};jl.prototype=Object.create(null);const ps=[new jl];function Nh(t,e,n){if(t.length==0)return ps;let i=n?ps[0]:new jl,r=[i];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&r.push(i=new jl(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&r.length==1&&r.push(i=new jl(e.isInline?"span":"div")),a=="class"?i.class=(i.class?i.class+" ":"")+l:a=="style"?i.style=(i.style?i.style+";":"")+l:a!="nodeName"&&(i[a]=l))}}}return r}function nw(t,e,n,i){if(n==ps&&i==ps)return e;let r=e;for(let o=0;o<i.length;o++){let s=i[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&r!=t&&(l=r.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(r),a=ps[0]),r=l}s$(r,a||ps[0],s)}return r}function s$(t,e,n){for(let i in e)i!="class"&&i!="style"&&i!="nodeName"&&!(i in n)&&t.removeAttribute(i);for(let i in n)i!="class"&&i!="style"&&i!="nodeName"&&n[i]!=e[i]&&t.setAttribute(i,n[i]);if(e.class!=n.class){let i=e.class?e.class.split(" ").filter(Boolean):[],r=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&t.classList.remove(i[o]);for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&t.classList.add(r[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=i.exec(e.style);)t.style.removeProperty(r[1])}n.style&&(t.style.cssText+=n.style)}}function iw(t,e,n){return nw(t,t,ps,Nh(e,n,t.nodeType!=1))}function xc(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function rw(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class a${constructor(e,n,i){this.lock=n,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=l$(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let i=e;i<n;i++)this.top.children[i].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,i){let r=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;r<s&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&e[r].type.spec.spanning!==!1;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=Ki,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let u=this.top.children[l];if(u.matchesMark(e[o])&&!this.isLocked(u.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=fs.create(this.top,e[o],n,i);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,i,r){let o=-1,s;if(r>=this.preMatch.index&&(s=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,i))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,n,i)&&!this.preMatch.matched.has(u)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,i,r,o){let s=this.top.children[r];return s.dirty==Ar&&s.dom==s.contentDOM&&(s.dirty=ds),s.update(e,n,i,o)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let i=e.pmViewDesc;if(i){for(let r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==i)return r}return-1}e=n}}updateNextNode(e,n,i,r,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Oo){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c=l.dom,d,f=this.isLocked(c)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Ar&&xc(n,l.outerDeco));if(!f&&l.update(e,n,i,r))return this.destroyBetween(this.index,a),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,e,n,i,r,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=ds,d.updateChildren(r,s+1),d.dirty=Ki),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,i,r,o,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!xc(i,e.outerDeco)||!r.eq(e.innerDeco))return null;let a=Oo.create(this.top,n,i,r,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,i,r,o){let s=Oo.create(this.top,e,n,i,r,o);s.contentDOM&&s.updateChildren(r,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,i){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let o=new Y2(this.top,e,n,i);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof fs;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Oc)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((hi||oi)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let i=document.createElement(e);e=="IMG"&&(i.className="ProseMirror-separator",i.alt=""),e=="BR"&&(i.className="ProseMirror-trailingBreak");let r=new ew(this.top,[],i,null);n!=this.top?n.children.push(r):n.children.splice(this.index++,0,r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function l$(t,e){let n=e,i=n.children.length,r=t.childCount,o=new Map,s=[];e:for(;r>0;){let a;for(;;)if(i){let u=n.children[i-1];if(u instanceof fs)n=u,i=u.children.length;else{a=u,i--;break}}else{if(n==e)break e;i=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(r-1))break;--r,o.set(a,r),s.push(a)}}return{index:r,matched:o,matches:s.reverse()}}function u$(t,e){return t.type.side-e.type.side}function c$(t,e,n,i){let r=e.locals(t),o=0;if(r.length==0){for(let u=0;u<t.childCount;u++){let c=t.child(u);i(c,r,e.forChild(o,c),u),o+=c.nodeSize}return}let s=0,a=[],l=null;for(let u=0;;){let c,d;for(;s<r.length&&r[s].to==o;){let v=r[s++];v.widget&&(c?(d||(d=[c])).push(v):c=v)}if(c)if(d){d.sort(u$);for(let v=0;v<d.length;v++)n(d[v],u,!!l)}else n(c,u,!!l);let f,p;if(l)p=-1,f=l,l=null;else if(u<t.childCount)p=u,f=t.child(u++);else break;for(let v=0;v<a.length;v++)a[v].to<=o&&a.splice(v--,1);for(;s<r.length&&r[s].from<=o&&r[s].to>o;)a.push(r[s++]);let h=o+f.nodeSize;if(f.isText){let v=h;s<r.length&&r[s].from<v&&(v=r[s].from);for(let S=0;S<a.length;S++)a[S].to<v&&(v=a[S].to);v<h&&(l=f.cut(v-o),f=f.cut(0,v-o),h=v,p=-1)}else for(;s<r.length&&r[s].to<h;)s++;let m=f.isInline&&!f.isLeaf?a.filter(v=>!v.inline):a.slice();i(f,m,e.forChild(o,f),p),o=h}}function d$(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function f$(t,e,n,i){for(let r=0,o=0;r<t.childCount&&o<=i;){let s=t.child(r++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;r<t.childCount;){let u=t.child(r++);if(o+=u.nodeSize,!u.isText)break;l+=u.text}if(o>=n){if(o>=i&&l.slice(i-e.length-a,i-a)==e)return i-e.length;let u=a<i?l.lastIndexOf(e,i-a-1):-1;if(u>=0&&u+e.length+a>=n)return a+u;if(n==i&&l.length>=i+e.length-a&&l.slice(i-a,i-a+e.length)==e)return i}}return-1}function $h(t,e,n,i,r){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],u=a,c=a+=l.size;u>=n||c<=e?o.push(l):(u<e&&o.push(l.slice(0,e-u,i)),r&&(o.push(r),r=void 0),c>n&&o.push(l.slice(n-u,l.size,i)))}return o}function Vh(t,e=null){let n=t.domSelectionRange(),i=t.state.doc;if(!n.focusNode)return null;let r=t.docView.nearestDesc(n.focusNode),o=r&&r.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=i.resolve(s),l,u;if(Tc(n)){for(l=s;r&&!r.node;)r=r.parent;let d=r.node;if(r&&d.isAtom&&mt.isSelectable(d)&&r.parent&&!(d.isInline&&VN(n.focusNode,n.focusOffset,r.dom))){let f=r.posBefore;u=new mt(s==f?a:i.resolve(f))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p<n.rangeCount;p++){let h=n.getRangeAt(p);d=Math.min(d,t.docView.posFromDOM(h.startContainer,h.startOffset,1)),f=Math.max(f,t.docView.posFromDOM(h.endContainer,h.endOffset,-1))}if(d<0)return null;[l,s]=f==t.state.selection.anchor?[f,d]:[d,f],a=i.resolve(s)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let c=i.resolve(l);if(!u){let d=e=="pointer"||t.state.selection.head<a.pos&&!o?1:-1;u=Fh(t,c,a,d)}return u}function ow(t){return t.editable?t.hasFocus():fw(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Wr(t,e=!1){let n=t.state.selection;if(uw(t,n),!!ow(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&oi){let i=t.domSelectionRange(),r=t.domObserver.currentSelection;if(i.anchorNode&&r.anchorNode&&us(i.anchorNode,i.anchorOffset,r.anchorNode,r.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)h$(t);else{let{anchor:i,head:r}=n,o,s;sw&&!(n instanceof xt)&&(n.$from.parent.inlineContent||(o=aw(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=aw(t,n.to))),t.docView.setSelection(i,r,t,e),sw&&(o&&lw(o),s&&lw(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&p$(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const sw=hi||oi&&z2<63;function aw(t,e){let{node:n,offset:i}=t.docView.domFromPos(e,0),r=i<n.childNodes.length?n.childNodes[i]:null,o=i?n.childNodes[i-1]:null;if(hi&&r&&r.contentEditable=="false")return zh(r);if((!r||r.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(r)return zh(r);if(o)return zh(o)}}function zh(t){return t.contentEditable="true",hi&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function lw(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function p$(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),i=n.anchorNode,r=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=i||n.anchorOffset!=r)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!ow(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function h$(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let i=t.cursorWrapper.dom,r=i.nodeName=="IMG";r?n.setStart(i.parentNode,Qn(i)+1):n.setStart(i,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!r&&!t.state.selection.visible&&Ci&&ko<=11&&(i.disabled=!0,i.disabled=!1)}function uw(t,e){if(e instanceof mt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(cw(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else cw(t)}function cw(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Fh(t,e,n,i){return t.someProp("createSelectionBetween",r=>r(t,e,n))||xt.between(e,n,i)}function dw(t){return t.editable&&!t.hasFocus()?!1:fw(t)}function fw(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function m$(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return us(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Hh(t,e){let{$anchor:n,$head:i}=t.selection,r=e>0?n.max(i):n.min(i),o=r.parent.inlineContent?r.depth?t.doc.resolve(e>0?r.after():r.before()):null:r;return o&&$t.findFrom(o,e)}function xo(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function pw(t,e,n){let i=t.state.selection;if(i instanceof xt)if(n.indexOf("s")>-1){let{$head:r}=i,o=r.textOffset?null:e<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(r.pos+o.nodeSize*(e<0?-1:1));return xo(t,new xt(i.$anchor,s))}else if(i.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let r=Hh(t.state,e);return r&&r instanceof mt?xo(t,r):!1}else if(!(Ui&&n.indexOf("m")>-1)){let r=i.$head,o=r.textOffset?null:e<0?r.nodeBefore:r.nodeAfter,s;if(!o||o.isText)return!1;let a=e<0?r.pos-o.nodeSize:r.pos;return o.isAtom||(s=t.docView.descAt(a))&&!s.contentDOM?mt.isSelectable(o)?xo(t,new mt(e<0?t.state.doc.resolve(r.pos-o.nodeSize):r)):zl?xo(t,new xt(t.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(i instanceof mt&&i.node.isInline)return xo(t,new xt(e>0?i.$to:i.$from));{let r=Hh(t.state,e);return r?xo(t,r):!1}}}function Mc(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ul(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function ia(t,e){return e<0?g$(t):v$(t)}function g$(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let r,o,s=!1;for(ar&&n.nodeType==1&&i<Mc(n)&&Ul(n.childNodes[i],-1)&&(s=!0);;)if(i>0){if(n.nodeType!=1)break;{let a=n.childNodes[i-1];if(Ul(a,-1))r=n,o=--i;else if(a.nodeType==3)n=a,i=n.nodeValue.length;else break}}else{if(hw(n))break;{let a=n.previousSibling;for(;a&&Ul(a,-1);)r=n.parentNode,o=Qn(a),a=a.previousSibling;if(a)n=a,i=Mc(n);else{if(n=n.parentNode,n==t.dom)break;i=0}}}s?jh(t,n,i):r&&jh(t,r,o)}function v$(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let r=Mc(n),o,s;for(;;)if(i<r){if(n.nodeType!=1)break;let a=n.childNodes[i];if(Ul(a,1))o=n,s=++i;else break}else{if(hw(n))break;{let a=n.nextSibling;for(;a&&Ul(a,1);)o=a.parentNode,s=Qn(a)+1,a=a.nextSibling;if(a)n=a,i=0,r=Mc(n);else{if(n=n.parentNode,n==t.dom)break;i=r=0}}}o&&jh(t,o,s)}function hw(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function y$(t,e){for(;t&&e==t.childNodes.length&&!Vl(t);)e=Qn(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function b$(t,e){for(;t&&!e&&!Vl(t);)e=Qn(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function jh(t,e,n){if(e.nodeType!=3){let o,s;(s=y$(e,n))?(e=s,n=0):(o=b$(e,n))&&(e=o,n=o.nodeValue.length)}let i=t.domSelection();if(!i)return;if(Tc(i)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),i.removeAllRanges(),i.addRange(o)}else i.extend&&i.extend(e,n);t.domObserver.setCurSelection();let{state:r}=t;setTimeout(()=>{t.state==r&&Wr(t)},50)}function mw(t,e){let n=t.state.doc.resolve(e);if(!(oi||HN)&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>r.top&&s<r.bottom&&Math.abs(o.left-r.left)>1)return o.left<r.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),s=(o.top+o.bottom)/2;if(s>r.top&&s<r.bottom&&Math.abs(o.left-r.left)>1)return o.left>r.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function gw(t,e,n){let i=t.state.selection;if(i instanceof xt&&!i.empty||n.indexOf("s")>-1||Ui&&n.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=Hh(t.state,e);if(s&&s instanceof mt)return xo(t,s)}if(!r.parent.inlineContent){let s=e<0?r:o,a=i instanceof Pi?$t.near(s,e):$t.findFrom(s,e);return a?xo(t,a):!1}return!1}function vw(t,e){if(!(t.state.selection instanceof xt))return!0;let{$head:n,$anchor:i,empty:r}=t.state.selection;if(!n.sameParent(i))return!0;if(!r)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=t.state.tr;return e<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),t.dispatch(s),!0}return!1}function yw(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function A$(t){if(!hi||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let i=e.firstChild;yw(t,i,"true"),setTimeout(()=>yw(t,i,"false"),20)}return!1}function w$(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function S$(t,e){let n=e.keyCode,i=w$(e);if(n==8||Ui&&n==72&&i=="c")return vw(t,-1)||ia(t,-1);if(n==46&&!e.shiftKey||Ui&&n==68&&i=="c")return vw(t,1)||ia(t,1);if(n==13||n==27)return!0;if(n==37||Ui&&n==66&&i=="c"){let r=n==37?mw(t,t.state.selection.from)=="ltr"?-1:1:-1;return pw(t,r,i)||ia(t,r)}else if(n==39||Ui&&n==70&&i=="c"){let r=n==39?mw(t,t.state.selection.from)=="ltr"?1:-1:1;return pw(t,r,i)||ia(t,r)}else{if(n==38||Ui&&n==80&&i=="c")return gw(t,-1,i)||ia(t,-1);if(n==40||Ui&&n==78&&i=="c")return A$(t)||gw(t,1,i)||ia(t,1);if(i==(Ui?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Uh(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:i,openStart:r,openEnd:o}=e;for(;r>1&&o>1&&i.childCount==1&&i.firstChild.childCount==1;){r--,o--;let p=i.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),i=p.content}let s=t.someProp("clipboardSerializer")||as.fromSchema(t.state.schema),a=Ow(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=kw[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=a.createElement(c[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${r} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
|
|
238
|
+
|
|
239
|
+
`);return{dom:l,text:f,slice:e}}function bw(t,e,n,i,r){let o=r.parent.type.spec.code,s,a;if(!n&&!e)return null;let l=e&&(i||o||!n);if(l){if(t.someProp("transformPastedText",f=>{e=f(e,o||i,t)}),o)return e?new Xe(Me.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
240
|
+
`))),0,0):Xe.empty;let d=t.someProp("clipboardTextParser",f=>f(e,r,i,t));if(d)a=d;else{let f=r.marks(),{schema:p}=t.state,h=as.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let v=s.appendChild(document.createElement("p"));m&&v.appendChild(h.serializeNode(p.text(m,f)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),s=O$(n),zl&&x$(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||bo.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||c),context:r,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!C$.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=M$(Cw(a,+c[1],+c[2]),c[4]);else if(a=Xe.maxOpen(k$(a.content,r),!0),a.openStart||a.openEnd){let d=0,f=0;for(let p=a.content.firstChild;d<a.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=a.content.lastChild;f<a.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);a=Cw(a,d,f)}return t.someProp("transformPasted",d=>{a=d(a,t)}),a}const C$=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function k$(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.index(n)),o,s=[];if(t.forEach(a=>{if(!s)return;let l=r.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&o.length&&ww(l,o,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=Sw(s[s.length-1],o.length));let c=Aw(a,l);s.push(c),r=r.matchType(c.type),o=l}}),s)return Me.from(s)}return t}function Aw(t,e,n=0){for(let i=e.length-1;i>=n;i--)t=e[i].create(null,Me.from(t));return t}function ww(t,e,n,i,r){if(r<t.length&&r<e.length&&t[r]==e[r]){let o=ww(t,e,n,i.lastChild,r+1);if(o)return i.copy(i.content.replaceChild(i.childCount-1,o));if(i.contentMatchAt(i.childCount).matchType(r==t.length-1?n.type:t[r+1]))return i.copy(i.content.append(Me.from(Aw(n,t,r+1))))}}function Sw(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Sw(t.lastChild,e-1)),i=t.contentMatchAt(t.childCount).fillBefore(Me.empty,!0);return t.copy(n.append(i))}function Kh(t,e,n,i,r,o){let s=e<0?t.firstChild:t.lastChild,a=s.content;return t.childCount>1&&(o=0),r<i-1&&(a=Kh(a,e,n,i,r+1,o)),r>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Me.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function Cw(t,e,n){return e<t.openStart&&(t=new Xe(Kh(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Xe(Kh(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const kw={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Tw=null;function Ow(){return Tw||(Tw=document.implementation.createHTMLDocument("title"))}let Wh=null;function T$(t){let e=window.trustedTypes;return e?(Wh||(Wh=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Wh.createHTML(t)):t}function O$(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Ow().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(t),r;if((r=i&&kw[i[1].toLowerCase()])&&(t=r.map(o=>"<"+o+">").join("")+t+r.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=T$(t),r)for(let o=0;o<r.length;o++)n=n.querySelector(r[o])||n;return n}function x$(t){let e=t.querySelectorAll(oi?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let i=e[n];i.childNodes.length==1&&i.textContent==" "&&i.parentNode&&i.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),i)}}function M$(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,i;try{i=JSON.parse(e)}catch{return t}let{content:r,openStart:o,openEnd:s}=t;for(let a=i.length-2;a>=0;a-=2){let l=n.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;r=Me.from(l.create(i[a+1],r)),o++,s++}return new Xe(r,o,s)}const mi={},gi={},E$={touchstart:!0,touchmove:!0};class I${constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function P$(t){for(let e in mi){let n=mi[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=i=>{D$(t,i)&&!Xh(t,i)&&(t.editable||!(i.type in gi))&&n(t,i)},E$[e]?{passive:!0}:void 0)}hi&&t.dom.addEventListener("input",()=>null),qh(t)}function Mo(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function L$(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function qh(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=i=>Xh(t,i))})}function Xh(t,e){return t.someProp("handleDOMEvents",n=>{let i=n[e.type];return i?i(t,e)||e.defaultPrevented:!1})}function D$(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function R$(t,e){!Xh(t,e)&&mi[e.type]&&(t.editable||!(e.type in gi))&&mi[e.type](t,e)}gi.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Mw(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Ur&&oi&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),ta&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let i=Date.now();t.input.lastIOSEnter=i,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==i&&(t.someProp("handleKeyDown",r=>r(t,cs(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",i=>i(t,n))||S$(t,n)?n.preventDefault():Mo(t,"key")},gi.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},gi.keypress=(t,e)=>{let n=e;if(Mw(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ui&&n.metaKey)return;if(t.someProp("handleKeyPress",r=>r(t,n))){n.preventDefault();return}let i=t.state.selection;if(!(i instanceof xt)||!i.$from.sameParent(i.$to)){let r=String.fromCharCode(n.charCode);!/[\r\n]/.test(r)&&!t.someProp("handleTextInput",o=>o(t,i.$from.pos,i.$to.pos,r))&&t.dispatch(t.state.tr.insertText(r).scrollIntoView()),n.preventDefault()}};function Ec(t){return{left:t.clientX,top:t.clientY}}function B$(t,e){let n=e.x-t.clientX,i=e.y-t.clientY;return n*n+i*i<100}function Gh(t,e,n,i,r){if(i==-1)return!1;let o=t.state.doc.resolve(i);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,a=>s>o.depth?a(t,n,o.nodeAfter,o.before(s),r,!0):a(t,n,o.node(s),o.before(s),r,!1)))return!0;return!1}function ra(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let i=t.state.tr.setSelection(e);i.setMeta("pointer",!0),t.dispatch(i)}function N$(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),i=n.nodeAfter;return i&&i.isAtom&&mt.isSelectable(i)?(ra(t,new mt(n)),!0):!1}function $$(t,e){if(e==-1)return!1;let n=t.state.selection,i,r;n instanceof mt&&(i=n.node);let o=t.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(mt.isSelectable(a)){i&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?r=o.before(n.$from.depth):r=o.before(s);break}}return r!=null?(ra(t,mt.create(t.state.doc,r)),!0):!1}function V$(t,e,n,i,r){return Gh(t,"handleClickOn",e,n,i)||t.someProp("handleClick",o=>o(t,e,i))||(r?$$(t,n):N$(t,n))}function z$(t,e,n,i){return Gh(t,"handleDoubleClickOn",e,n,i)||t.someProp("handleDoubleClick",r=>r(t,e,i))}function F$(t,e,n,i){return Gh(t,"handleTripleClickOn",e,n,i)||t.someProp("handleTripleClick",r=>r(t,e,i))||H$(t,n,i)}function H$(t,e,n){if(n.button!=0)return!1;let i=t.state.doc;if(e==-1)return i.inlineContent?(ra(t,xt.create(i,0,i.content.size)),!0):!1;let r=i.resolve(e);for(let o=r.depth+1;o>0;o--){let s=o>r.depth?r.nodeAfter:r.node(o),a=r.before(o);if(s.inlineContent)ra(t,xt.create(i,a+1,a+1+s.content.size));else if(mt.isSelectable(s))ra(t,mt.create(i,a));else continue;return!0}}function Zh(t){return Ic(t)}const xw=Ui?"metaKey":"ctrlKey";mi.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let i=Zh(t),r=Date.now(),o="singleClick";r-t.input.lastClick.time<500&&B$(n,t.input.lastClick)&&!n[xw]&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:r,x:n.clientX,y:n.clientY,type:o};let s=t.posAtCoords(Ec(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new j$(t,s,n,!!i)):(o=="doubleClick"?z$:F$)(t,s.pos,s.inside,n)?n.preventDefault():Mo(t,"pointer"))};class j${constructor(e,n,i,r){this.view=e,this.pos=n,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!i[xw],this.allowDefault=i.shiftKey;let o,s;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let c=e.state.doc.resolve(n.pos);o=c.parent,s=c.depth?c.before():0}const a=r?null:i.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:u}=e.state;(i.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof mt&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ar&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Mo(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Wr(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Ec(e))),this.updateAllowDefault(e),this.allowDefault||!n?Mo(this.view,"pointer"):V$(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||hi&&this.mightDrag&&!this.mightDrag.node.isAtom||oi&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ra(this.view,$t.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Mo(this.view,"pointer")}move(e){this.updateAllowDefault(e),Mo(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}mi.touchstart=t=>{t.input.lastTouch=Date.now(),Zh(t),Mo(t,"pointer")},mi.touchmove=t=>{t.input.lastTouch=Date.now(),Mo(t,"pointer")},mi.contextmenu=t=>Zh(t);function Mw(t,e){return t.composing?!0:hi&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const U$=Ur?5e3:-1;gi.compositionstart=gi.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof xt&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Ic(t,!0),t.markCursor=null;else if(Ic(t,!e.selection.empty),ar&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let i=t.domSelectionRange();for(let r=i.focusNode,o=i.focusOffset;r&&r.nodeType==1&&o!=0;){let s=o<0?r.lastChild:r.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=t.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else r=s,o=-1}}t.input.composing=!0}Ew(t,U$)},gi.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Ew(t,20))};function Ew(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Ic(t),e))}function Iw(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=W$());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function K$(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=NN(e.focusNode,e.focusOffset),i=$N(e.focusNode,e.focusOffset);if(n&&i&&n!=i){let r=i.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||i==o)return o;if(!r||!r.isText(i.nodeValue))return i;if(t.input.compositionNode==i){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return i}}return n||i}function W$(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Ic(t,e=!1){if(!(Ur&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Iw(t),e||t.docView&&t.docView.dirty){let n=Vh(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function q$(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(e),t.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Kl=Ci&&ko<15||ta&&jN<604;mi.copy=gi.cut=(t,e)=>{let n=e,i=t.state.selection,r=n.type=="cut";if(i.empty)return;let o=Kl?null:n.clipboardData,s=i.content(),{dom:a,text:l}=Uh(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):q$(t,a),r&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function X$(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function G$(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,i=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let r=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),i.parentNode&&i.parentNode.removeChild(i),n?Wl(t,i.value,null,r,e):Wl(t,i.textContent,i.innerHTML,r,e)},50)}function Wl(t,e,n,i,r){let o=bw(t,e,n,i,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,r,o||Xe.empty)))return!0;if(!o)return!1;let s=X$(o),a=s?t.state.tr.replaceSelectionWith(s,i):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Pw(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}gi.paste=(t,e)=>{let n=e;if(t.composing&&!Ur)return;let i=Kl?null:n.clipboardData,r=t.input.shiftKey&&t.input.lastKeyCode!=45;i&&Wl(t,Pw(i),i.getData("text/html"),r,n)?n.preventDefault():G$(t,n)};class Lw{constructor(e,n,i){this.slice=e,this.move=n,this.node=i}}const Z$=Ui?"altKey":"ctrlKey";function Dw(t,e){let n=t.someProp("dragCopies",i=>!i(e));return n??!e[Z$]}mi.dragstart=(t,e)=>{let n=e,i=t.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let r=t.state.selection,o=r.empty?null:t.posAtCoords(Ec(n)),s;if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof mt?r.to-1:r.to))){if(i&&i.mightDrag)s=mt.create(t.state.doc,i.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(s=mt.create(t.state.doc,d.posBefore))}}let a=(s||t.state.selection).content(),{dom:l,text:u,slice:c}=Uh(t,a);(!n.dataTransfer.files.length||!oi||z2>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Kl?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Kl||n.dataTransfer.setData("text/plain",u),t.dragging=new Lw(c,Dw(t,n),s)},mi.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},gi.dragover=gi.dragenter=(t,e)=>e.preventDefault(),gi.drop=(t,e)=>{let n=e,i=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let r=t.posAtCoords(Ec(n));if(!r)return;let o=t.state.doc.resolve(r.pos),s=i&&i.slice;s?t.someProp("transformPasted",h=>{s=h(s,t)}):s=bw(t,Pw(n.dataTransfer),Kl?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(i&&Dw(t,n));if(t.someProp("handleDrop",h=>h(t,n,s||Xe.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let l=s?CN(t.state.doc,o.pos,s):o.pos;l==null&&(l=o.pos);let u=t.state.tr;if(a){let{node:h}=i;h?h.replace(u):u.deleteSelection()}let c=u.mapping.map(l),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,f=u.doc;if(d?u.replaceRangeWith(c,c,s.content.firstChild):u.replaceRange(c,c,s),u.doc.eq(f))return;let p=u.doc.resolve(c);if(d&&mt.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new mt(p));else{let h=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((m,v,S,b)=>h=b),u.setSelection(Fh(t,p,u.doc.resolve(h)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))},mi.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Wr(t)},20))},mi.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},mi.beforeinput=(t,e)=>{if(oi&&Ur&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:i}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=i||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,cs(8,"Backspace")))))return;let{$cursor:r}=t.state.selection;r&&r.pos>0&&t.dispatch(t.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let t in gi)mi[t]=gi[t];function ql(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Pc{constructor(e,n){this.toDOM=e,this.spec=n||hs,this.side=this.spec.side||0}map(e,n,i,r){let{pos:o,deleted:s}=e.mapResult(n.from+r,this.side<0?-1:1);return s?null:new Li(o-i,o-i,this)}valid(){return!0}eq(e){return this==e||e instanceof Pc&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ql(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Eo{constructor(e,n){this.attrs=e,this.spec=n||hs}map(e,n,i,r){let o=e.map(n.from+r,this.spec.inclusiveStart?-1:1)-i,s=e.map(n.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new Li(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Eo&&ql(this.attrs,e.attrs)&&ql(this.spec,e.spec)}static is(e){return e.type instanceof Eo}destroy(){}}class _h{constructor(e,n){this.attrs=e,this.spec=n||hs}map(e,n,i,r){let o=e.mapResult(n.from+r,1);if(o.deleted)return null;let s=e.mapResult(n.to+r,-1);return s.deleted||s.pos<=o.pos?null:new Li(o.pos-i,s.pos-i,this)}valid(e,n){let{index:i,offset:r}=e.content.findIndex(n.from),o;return r==n.from&&!(o=e.child(i)).isText&&r+o.nodeSize==n.to}eq(e){return this==e||e instanceof _h&&ql(this.attrs,e.attrs)&&ql(this.spec,e.spec)}destroy(){}}class Li{constructor(e,n,i){this.from=e,this.to=n,this.type=i}copy(e,n){return new Li(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,i){return this.type.map(e,this,n,i)}static widget(e,n,i){return new Li(e,e,new Pc(n,i))}static inline(e,n,i,r){return new Li(e,n,new Eo(i,r))}static node(e,n,i,r){return new Li(e,n,new _h(i,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Eo}get widget(){return this.type instanceof Pc}}const oa=[],hs={};class Ln{constructor(e,n){this.local=e.length?e:oa,this.children=n.length?n:oa}static create(e,n){return n.length?Lc(n,e,0,hs):si}find(e,n,i){let r=[];return this.findInner(e??0,n??1e9,r,0,i),r}findInner(e,n,i,r,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,n-a,i,r+a,o)}}map(e,n,i){return this==si||e.maps.length==0?this:this.mapInner(e,n,0,0,i||hs)}mapInner(e,n,i,r,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,i,r);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?_$(this.children,s||[],e,n,i,r,o):s?new Ln(s.sort(ms),oa):si}add(e,n){return n.length?this==si?Ln.create(e,n):this.addInner(e,n,0):this}addInner(e,n,i){let r,o=0;e.forEach((a,l)=>{let u=l+i,c;if(c=Bw(n,a,u)){for(r||(r=this.children.slice());o<r.length&&r[o]<l;)o+=3;r[o]==l?r[o+2]=r[o+2].addInner(a,c,u+1):r.splice(o,0,l,l+a.nodeSize,Lc(c,a,u+1,hs)),o+=3}});let s=Rw(o?Nw(n):n,-i);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Ln(s.length?this.local.concat(s).sort(ms):this.local,r||this.children)}remove(e){return e.length==0||this==si?this:this.removeInner(e,0)}removeInner(e,n){let i=this.children,r=this.local;for(let o=0;o<i.length;o+=3){let s,a=i[o]+n,l=i[o+1]+n;for(let c=0,d;c<e.length;c++)(d=e[c])&&d.from>a&&d.to<l&&(e[c]=null,(s||(s=[])).push(d));if(!s)continue;i==this.children&&(i=this.children.slice());let u=i[o+2].removeInner(s,a+1);u!=si?i[o+2]=u:(i.splice(o,3),o-=3)}if(r.length){for(let o=0,s;o<e.length;o++)if(s=e[o])for(let a=0;a<r.length;a++)r[a].eq(s,n)&&(r==this.local&&(r=this.local.slice()),r.splice(a--,1))}return i==this.children&&r==this.local?this:r.length||i.length?new Ln(r,i):si}forChild(e,n){if(this==si)return this;if(n.isLeaf)return Ln.empty;let i,r;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(i=this.children[a+2]);break}let o=e+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof Eo){let u=Math.max(o,l.from)-o,c=Math.min(s,l.to)-o;u<c&&(r||(r=[])).push(l.copy(u,c))}}if(r){let a=new Ln(r.sort(ms),oa);return i?new Io([a,i]):a}return i||si}eq(e){if(this==e)return!0;if(!(e instanceof Ln)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Jh(this.localsInner(e))}localsInner(e){if(this==si)return oa;if(e.inlineContent||!this.local.some(Eo.is))return this.local;let n=[];for(let i=0;i<this.local.length;i++)this.local[i].type instanceof Eo||n.push(this.local[i]);return n}forEachSet(e){e(this)}}Ln.empty=new Ln([],[]),Ln.removeOverlap=Jh;const si=Ln.empty;class Io{constructor(e){this.members=e}map(e,n){const i=this.members.map(r=>r.map(e,n,hs));return Io.from(i)}forChild(e,n){if(n.isLeaf)return Ln.empty;let i=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,n);o!=si&&(o instanceof Io?i=i.concat(o.members):i.push(o))}return Io.from(i)}eq(e){if(!(e instanceof Io)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,i=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(!n)n=o;else{i&&(n=n.slice(),i=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?Jh(i?n:n.sort(ms)):oa}static from(e){switch(e.length){case 0:return si;case 1:return e[0];default:return new Io(e.every(n=>n instanceof Ln)?e:e.reduce((n,i)=>n.concat(i instanceof Ln?i:i.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function _$(t,e,n,i,r,o,s){let a=t.slice();for(let u=0,c=o;u<n.maps.length;u++){let d=0;n.maps[u].forEach((f,p,h,m)=>{let v=m-h-(p-f);for(let S=0;S<a.length;S+=3){let b=a[S+1];if(b<0||f>b+c-d)continue;let k=a[S]+c-d;p>=k?a[S+1]=f<=k?-2:-1:f>=c&&v&&(a[S]+=v,a[S+1]+=v)}d+=v}),c=n.maps[u].map(c,-1)}let l=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){l=!0,a[u+1]=-1;continue}let c=n.map(t[u]+o),d=c-r;if(d<0||d>=i.content.size){l=!0;continue}let f=n.map(t[u+1]+o,-1),p=f-r,{index:h,offset:m}=i.content.findIndex(d),v=i.maybeChild(h);if(v&&m==d&&m+v.nodeSize==p){let S=a[u+2].mapInner(n,v,c+1,t[u]+o+1,s);S!=si?(a[u]=d,a[u+1]=p,a[u+2]=S):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=J$(a,t,e,n,r,o,s),c=Lc(u,i,0,s);e=c.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let p=c.children[d];for(;f<a.length&&a[f]<p;)f+=3;a.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new Ln(e.sort(ms),a)}function Rw(t,e){if(!e||!t.length)return t;let n=[];for(let i=0;i<t.length;i++){let r=t[i];n.push(new Li(r.from+e,r.to+e,r.type))}return n}function J$(t,e,n,i,r,o,s){function a(l,u){for(let c=0;c<l.local.length;c++){let d=l.local[c].map(i,r,u);d?n.push(d):s.onRemove&&s.onRemove(l.local[c].spec)}for(let c=0;c<l.children.length;c+=3)a(l.children[c+2],l.children[c]+u+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+o+1);return n}function Bw(t,e,n){if(e.isLeaf)return null;let i=n+e.nodeSize,r=null;for(let o=0,s;o<t.length;o++)(s=t[o])&&s.from>n&&s.to<i&&((r||(r=[])).push(s),t[o]=null);return r}function Nw(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Lc(t,e,n,i){let r=[],o=!1;e.forEach((a,l)=>{let u=Bw(t,a,l+n);if(u){o=!0;let c=Lc(u,a,n+l+1,i);c!=si&&r.push(l,l+a.nodeSize,c)}});let s=Rw(o?Nw(t):t,-n).sort(ms);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(i.onRemove&&i.onRemove(s[a].spec),s.splice(a--,1));return s.length||r.length?new Ln(s,r):si}function ms(t,e){return t.from-e.from||t.to-e.to}function Jh(t){let e=t;for(let n=0;n<e.length-1;n++){let i=e[n];if(i.from!=i.to)for(let r=n+1;r<e.length;r++){let o=e[r];if(o.from==i.from){o.to!=i.to&&(e==t&&(e=t.slice()),e[r]=o.copy(o.from,i.to),$w(e,r+1,o.copy(i.to,o.to)));continue}else{o.from<i.to&&(e==t&&(e=t.slice()),e[n]=i.copy(i.from,o.from),$w(e,r,i.copy(o.from,i.to)));break}}}return e}function $w(t,e,n){for(;e<t.length&&ms(n,t[e])>0;)e++;t.splice(e,0,n)}function Yh(t){let e=[];return t.someProp("decorations",n=>{let i=n(t.state);i&&i!=si&&e.push(i)}),t.cursorWrapper&&e.push(Ln.create(t.state.doc,[t.cursorWrapper.deco])),Io.from(e)}const Y$={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Q$=Ci&&ko<=11;class eV{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class tV{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new eV,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(i=>{for(let r=0;r<i.length;r++)this.queue.push(i[r]);Ci&&ko<=11&&i.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),Q$&&(this.onCharData=i=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Y$)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(dw(this.view)){if(this.suppressingSelectionUpdates)return Wr(this.view);if(Ci&&ko<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&us(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,i;for(let o=e.focusNode;o;o=ea(o))n.add(o);for(let o=e.anchorNode;o;o=ea(o))if(n.has(o)){i=o;break}let r=i&&this.view.docView.nearestDesc(i);if(r&&r.ignoreMutation({type:"selection",target:i.nodeType==3?i.parentNode:i}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let i=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&dw(e)&&!this.ignoreSelectionChange(i),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],l);d&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(ar&&l.length){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||rV(e,d)!=p)&&f.remove()}}}let u=null;o<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Tc(i)&&(u=Vh(e))&&u.eq($t.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Wr(e),this.currentSelection.set(i),e.scrollToSelection()):(o>-1||r)&&(o>-1&&(e.docView.markDirty(o,s),nV(e)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(i)||Wr(e),this.currentSelection.set(i))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let i=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(i==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!i||i.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;c<e.addedNodes.length;c++){let d=e.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(i.contentDOM&&i.contentDOM!=i.dom&&!i.contentDOM.contains(e.target))return{from:i.posBefore,to:i.posAfter};let r=e.previousSibling,o=e.nextSibling;if(Ci&&ko<=11&&e.addedNodes.length)for(let c=0;c<e.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=e.addedNodes[c];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(r=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f)}let s=r&&r.parentNode==e.target?Qn(r)+1:0,a=i.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?Qn(o):e.target.childNodes.length,u=i.localPosFromDOM(e.target,l,1);return{from:a,to:u}}else return e.type=="attributes"?{from:i.posAtStart-i.border,to:i.posAtEnd+i.border}:(this.lastChangedTextNode=e.target,{from:i.posAtStart,to:i.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Vw=new WeakMap,zw=!1;function nV(t){if(!Vw.has(t)&&(Vw.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=ar,zw)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),zw=!0}}function Fw(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return us(s.node,s.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}function iV(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return Fw(t,r)}let n;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",i,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",i,!0),n?Fw(t,n):null}function rV(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let i=t.docView.nearestDesc(n,!0);if(i&&i.node.isBlock)return n}return null}function oV(t,e,n){let{node:i,fromOffset:r,toOffset:o,from:s,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),u,c=l.anchorNode;if(c&&t.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:l.anchorOffset}],Tc(l)||u.push({node:l.focusNode,offset:l.focusOffset})),oi&&t.input.lastKeyCode===8)for(let v=o;v>r;v--){let S=i.childNodes[v-1],b=S.pmViewDesc;if(S.nodeName=="BR"&&!b){o=v;break}if(!b||b.size)break}let d=t.state.doc,f=t.someProp("domParser")||bo.fromSchema(t.state.schema),p=d.resolve(s),h=null,m=f.parse(i,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:r,to:o,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:sV,context:p});if(u&&u[0].pos!=null){let v=u[0].pos,S=u[1]&&u[1].pos;S==null&&(S=v),h={anchor:v+s,head:S+s}}return{doc:m,sel:h,from:s,to:a}}function sV(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(hi&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||hi&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const aV=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function lV(t,e,n,i,r){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let R=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,M=Vh(t,R);if(M&&!t.state.selection.eq(M)){if(oi&&Ur&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",$=>$(t,cs(13,"Enter"))))return;let D=t.state.tr.setSelection(M);R=="pointer"?D.setMeta("pointer",!0):R=="key"&&D.scrollIntoView(),o&&D.setMeta("composition",o),t.dispatch(D)}return}let s=t.state.doc.resolve(e),a=s.sharedDepth(n);e=s.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,u=oV(t,e,n),c=t.state.doc,d=c.slice(u.from,u.to),f,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(f=t.state.selection.to,p="end"):(f=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let h=dV(d.content,u.doc.content,u.from,f,p);if(h&&t.input.domChangeCount++,(ta&&t.input.lastIOSEnter>Date.now()-225||Ur)&&r.some(R=>R.nodeType==1&&!aV.test(R.nodeName))&&(!h||h.endA>=h.endB)&&t.someProp("handleKeyDown",R=>R(t,cs(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!h)if(i&&l instanceof xt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let R=Hw(t,t.state.doc,u.sel);if(R&&!R.eq(t.state.selection)){let M=t.state.tr.setSelection(R);o&&M.setMeta("composition",o),t.dispatch(M)}}return}t.state.selection.from<t.state.selection.to&&h.start==h.endB&&t.state.selection instanceof xt&&(h.start>t.state.selection.from&&h.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?h.start=t.state.selection.from:h.endA<t.state.selection.to&&h.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(h.endB+=t.state.selection.to-h.endA,h.endA=t.state.selection.to)),Ci&&ko<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" "&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),v=u.doc.resolveNoCache(h.endB-u.from),S=c.resolve(h.start),b=m.sameParent(v)&&m.parent.inlineContent&&S.end()>=h.endA,k;if((ta&&t.input.lastIOSEnter>Date.now()-225&&(!b||r.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!b&&m.pos<u.doc.content.size&&(!m.sameParent(v)||!m.parent.inlineContent)&&!/\S/.test(u.doc.textBetween(m.pos,v.pos,"",""))&&(k=$t.findFrom(u.doc.resolve(m.pos+1),1,!0))&&k.head>m.pos)&&t.someProp("handleKeyDown",R=>R(t,cs(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>h.start&&cV(c,h.start,h.endA,m,v)&&t.someProp("handleKeyDown",R=>R(t,cs(8,"Backspace")))){Ur&&oi&&t.domObserver.suppressSelectionUpdates();return}oi&&h.endB==h.start&&(t.input.lastChromeDelete=Date.now()),Ur&&!b&&m.start()!=v.start()&&v.parentOffset==0&&m.depth==v.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,v=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(R){return R(t,cs(13,"Enter"))})},20));let A=h.start,w=h.endA,y,C,I;if(b){if(m.pos==v.pos)Ci&&ko<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Wr(t),20)),y=t.state.tr.delete(A,w),C=c.resolve(h.start).marksAcross(c.resolve(h.endA));else if(h.endA==h.endB&&(I=uV(m.parent.content.cut(m.parentOffset,v.parentOffset),S.parent.content.cut(S.parentOffset,h.endA-S.start()))))y=t.state.tr,I.type=="add"?y.addMark(A,w,I.mark):y.removeMark(A,w,I.mark);else if(m.parent.child(m.index()).isText&&m.index()==v.index()-(v.textOffset?0:1)){let R=m.parent.textBetween(m.parentOffset,v.parentOffset);if(t.someProp("handleTextInput",M=>M(t,A,w,R)))return;y=t.state.tr.insertText(R,A,w)}}if(y||(y=t.state.tr.replace(A,w,u.doc.slice(h.start-u.from,h.endB-u.from))),u.sel){let R=Hw(t,y.doc,u.sel);R&&!(oi&&t.composing&&R.empty&&(h.start!=h.endB||t.input.lastChromeDelete<Date.now()-100)&&(R.head==A||R.head==y.mapping.map(w)-1)||Ci&&R.empty&&R.head==A)&&y.setSelection(R)}C&&y.ensureMarks(C),o&&y.setMeta("composition",o),t.dispatch(y.scrollIntoView())}function Hw(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Fh(t,e.resolve(n.anchor),e.resolve(n.head))}function uV(t,e){let n=t.firstChild.marks,i=e.firstChild.marks,r=n,o=i,s,a,l;for(let c=0;c<i.length;c++)r=i[c].removeFromSet(r);for(let c=0;c<n.length;c++)o=n[c].removeFromSet(o);if(r.length==1&&o.length==0)a=r[0],s="add",l=c=>c.mark(a.addToSet(c.marks));else if(r.length==0&&o.length==1)a=o[0],s="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<e.childCount;c++)u.push(l(e.child(c)));if(Me.from(u).eq(t))return{mark:a,type:s}}function cV(t,e,n,i,r){if(n-e<=r.pos-i.pos||Qh(i,!0,!1)<r.pos)return!1;let o=t.resolve(e);if(!i.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==e+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(Qh(o,!0,!0));return!s.parent.isTextblock||s.pos>n||Qh(s,!0,!1)<n?!1:i.parent.content.cut(i.parentOffset).eq(s.parent.content)}function Qh(t,e,n){let i=t.depth,r=e?t.end():t.pos;for(;i>0&&(e||t.indexAfter(i)==t.node(i).childCount);)i--,r++,e=!1;if(n){let o=t.node(i).maybeChild(t.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,r++}return r}function dV(t,e,n,i,r){let o=t.findDiffStart(e,n);if(o==null)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(r=="end"){let l=Math.max(0,o-Math.min(s,a));i-=s+l-o}if(s<o&&t.size<e.size){let l=i<=o&&i>=s?o-i:0;o-=l,o&&o<e.size&&jw(e.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-s),s=o}else if(a<o){let l=i<=o&&i>=a?o-i:0;o-=l,o&&o<t.size&&jw(t.textBetween(o-1,o+1))&&(o+=l?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}function jw(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class fV{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new I$,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Xw),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Ww(this),Kw(this),this.nodeViews=qw(this),this.docView=Q2(this.state.doc,Uw(this),Yh(this),this.dom,this),this.domObserver=new tV(this,(i,r,o,s)=>lV(this,i,r,o,s)),this.domObserver.start(),P$(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&qh(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Xw),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let i in this._props)n[i]=this._props[i];n.state=this.state;for(let i in e)n[i]=e[i];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var i;let r=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(Iw(this),s=!0),this.state=e;let a=r.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=qw(this);hV(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&qh(this),this.editable=Ww(this),Kw(this);let l=Yh(this),u=Uw(this),c=r.plugins!=e.plugins&&!r.doc.eq(e.doc)?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(e.doc,u,l);(d||!e.selection.eq(r.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&WN(this);if(s){this.domObserver.stop();let p=d&&(Ci||oi)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&pV(r.selection,e.selection);if(d){let h=oi?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=K$(this)),(o||!this.docView.update(e.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=Q2(e.doc,u,l,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&m$(this))?Wr(this,p):(uw(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),!((i=this.dragging)===null||i===void 0)&&i.node&&!r.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,r),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&qN(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof mt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&F2(this,n.getBoundingClientRect(),e)}else F2(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let i=this.state.plugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let i=this.pluginViews[n];i.update&&i.update(this,e)}}updateDraggedNode(e,n){let i=e.node,r=-1;if(this.state.doc.nodeAt(i.from)==i.node)r=i.from;else{let o=i.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==i.node&&(r=o)}this.dragging=new Lw(e.slice,e.move,r<0?void 0:mt.create(this.state.doc,r))}someProp(e,n){let i=this._props&&this._props[e],r;if(i!=null&&(r=n?n(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(r=n?n(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[e];if(a!=null&&(r=n?n(a):a))return r}}hasFocus(){if(Ci){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&XN(this.dom),Wr(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return YN(this,e)}coordsAtPos(e,n=1){return q2(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,i=-1){let r=this.docView.posFromDOM(e,n,i);if(r==null)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,n){return i$(this,n||this.state,e)}pasteHTML(e,n){return Wl(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Wl(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Uh(this,e)}destroy(){this.docView&&(L$(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Yh(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,RN())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return R$(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?hi&&this.root.nodeType===11&&zN(this.dom.ownerDocument)==this.dom&&iV(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Uw(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let i in n)i=="class"?e.class+=" "+n[i]:i=="style"?e.style=(e.style?e.style+";":"")+n[i]:!e[i]&&i!="contenteditable"&&i!="nodeName"&&(e[i]=String(n[i]))}),e.translate||(e.translate="no"),[Li.node(0,t.state.doc.content.size,e)]}function Kw(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Li.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Ww(t){return!t.someProp("editable",e=>e(t.state)===!1)}function pV(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function qw(t){let e=Object.create(null);function n(i){for(let r in i)Object.prototype.hasOwnProperty.call(e,r)||(e[r]=i[r])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function hV(t,e){let n=0,i=0;for(let r in t){if(t[r]!=e[r])return!0;n++}for(let r in e)i++;return n!=i}function Xw(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Po={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Dc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},mV=typeof navigator<"u"&&/Mac/.test(navigator.platform),gV=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ei=0;ei<10;ei++)Po[48+ei]=Po[96+ei]=String(ei);for(var ei=1;ei<=24;ei++)Po[ei+111]="F"+ei;for(var ei=65;ei<=90;ei++)Po[ei]=String.fromCharCode(ei+32),Dc[ei]=String.fromCharCode(ei);for(var em in Po)Dc.hasOwnProperty(em)||(Dc[em]=Po[em]);function vV(t){var e=mV&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||gV&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Dc:Po)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const yV=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function bV(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let i,r,o,s;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))i=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))yV?s=!0:r=!0;else throw new Error("Unrecognized modifier name: "+l)}return i&&(n="Alt-"+n),r&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function AV(t){let e=Object.create(null);for(let n in t)e[bV(n)]=t[n];return e}function tm(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function wV(t){return new Kn({props:{handleKeyDown:SV(t)}})}function SV(t){let e=AV(t);return function(n,i){let r=vV(i),o,s=e[tm(r,i)];if(s&&s(n.state,n.dispatch,n))return!0;if(r.length==1&&r!=" "){if(i.shiftKey){let a=e[tm(r,i,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((i.shiftKey||i.altKey||i.metaKey||r.charCodeAt(0)>127)&&(o=Po[i.keyCode])&&o!=r){let a=e[tm(o,i)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const nm=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Gw(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Zw=(t,e,n)=>{let i=Gw(t,n);if(!i)return!1;let r=im(i);if(!r){let s=i.blockRange(),a=s&&Zs(s);return a==null?!1:(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(rS(t,r,e,-1))return!0;if(i.parent.content.size==0&&(sa(o,"end")||mt.isSelectable(o)))for(let s=i.depth;;s--){let a=Cc(t.doc,i.before(s),i.after(s),Xe.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(sa(o,"end")?$t.findFrom(l.doc.resolve(l.mapping.map(r.pos,-1)),-1):mt.create(l.doc,r.pos-o.nodeSize)),e(l.scrollIntoView())}return!0}if(s==1||i.node(s-1).childCount>1)break}return o.isAtom&&r.depth==i.depth-1?(e&&e(t.tr.delete(r.pos-o.nodeSize,r.pos).scrollIntoView()),!0):!1},CV=(t,e,n)=>{let i=Gw(t,n);if(!i)return!1;let r=im(i);return r?_w(t,r,e):!1},kV=(t,e,n)=>{let i=Yw(t,n);if(!i)return!1;let r=rm(i);return r?_w(t,r,e):!1};function _w(t,e,n){let i=e.nodeBefore,r=i,o=e.pos-1;for(;!r.isTextblock;o--){if(r.type.spec.isolating)return!1;let c=r.lastChild;if(!c)return!1;r=c}let s=e.nodeAfter,a=s,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=Cc(t.doc,o,l,Xe.empty);if(!u||u.from!=o||u instanceof jn&&u.slice.size>=l-o)return!1;if(n){let c=t.tr.step(u);c.setSelection(xt.create(c.doc,o)),n(c.scrollIntoView())}return!0}function sa(t,e,n=!1){for(let i=t;i;i=e=="start"?i.firstChild:i.lastChild){if(i.isTextblock)return!0;if(n&&i.childCount!=1)return!1}return!1}const Jw=(t,e,n)=>{let{$head:i,empty:r}=t.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):i.parentOffset>0)return!1;o=im(i)}let s=o&&o.nodeBefore;return!s||!mt.isSelectable(s)?!1:(e&&e(t.tr.setSelection(mt.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function im(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function Yw(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Qw=(t,e,n)=>{let i=Yw(t,n);if(!i)return!1;let r=rm(i);if(!r)return!1;let o=r.nodeAfter;if(rS(t,r,e,1))return!0;if(i.parent.content.size==0&&(sa(o,"start")||mt.isSelectable(o))){let s=Cc(t.doc,i.before(),i.after(),Xe.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(sa(o,"start")?$t.findFrom(a.doc.resolve(a.mapping.map(r.pos)),1):mt.create(a.doc,a.mapping.map(r.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&r.depth==i.depth-1?(e&&e(t.tr.delete(r.pos,r.pos+o.nodeSize).scrollIntoView()),!0):!1},eS=(t,e,n)=>{let{$head:i,empty:r}=t.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):i.parentOffset<i.parent.content.size)return!1;o=rm(i)}let s=o&&o.nodeAfter;return!s||!mt.isSelectable(s)?!1:(e&&e(t.tr.setSelection(mt.create(t.doc,o.pos)).scrollIntoView()),!0)};function rm(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const TV=(t,e)=>{let n=t.selection,i=n instanceof mt,r;if(i){if(n.node.isTextblock||!So(t.doc,n.from))return!1;r=n.from}else if(r=Sc(t.doc,n.from,-1),r==null)return!1;if(e){let o=t.tr.join(r);i&&o.setSelection(mt.create(o.doc,r-t.doc.resolve(r).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},OV=(t,e)=>{let n=t.selection,i;if(n instanceof mt){if(n.node.isTextblock||!So(t.doc,n.to))return!1;i=n.to}else if(i=Sc(t.doc,n.to,1),i==null)return!1;return e&&e(t.tr.join(i).scrollIntoView()),!0},xV=(t,e)=>{let{$from:n,$to:i}=t.selection,r=n.blockRange(i),o=r&&Zs(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)},tS=(t,e)=>{let{$head:n,$anchor:i}=t.selection;return!n.parent.type.spec.code||!n.sameParent(i)?!1:(e&&e(t.tr.insertText(`
|
|
241
|
+
`).scrollIntoView()),!0)};function om(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const MV=(t,e)=>{let{$head:n,$anchor:i}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let r=n.node(-1),o=n.indexAfter(-1),s=om(r.contentMatchAt(o));if(!s||!r.canReplaceWith(o,o,s))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection($t.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},nS=(t,e)=>{let n=t.selection,{$from:i,$to:r}=n;if(n instanceof Pi||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=om(r.parent.contentMatchAt(r.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!i.parentOffset&&r.index()<r.parent.childCount?i:r).pos,a=t.tr.insert(s,o.createAndFill());a.setSelection(xt.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},iS=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(Hr(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let i=n.blockRange(),r=i&&Zs(i);return r==null?!1:(e&&e(t.tr.lift(i,r).scrollIntoView()),!0)};function EV(t){return(e,n)=>{let{$from:i,$to:r}=e.selection;if(e.selection instanceof mt&&e.selection.node.isBlock)return!i.parentOffset||!Hr(e.doc,i.pos)?!1:(n&&n(e.tr.split(i.pos).scrollIntoView()),!0);if(!i.depth)return!1;let o=[],s,a,l=!1,u=!1;for(let p=i.depth;;p--)if(i.node(p).isBlock){l=i.end(p)==i.pos+(i.depth-p),u=i.start(p)==i.pos-(i.depth-p),a=om(i.node(p-1).contentMatchAt(i.indexAfter(p-1))),o.unshift(l&&a?{type:a}:null),s=p;break}else{if(p==1)return!1;o.unshift(null)}let c=e.tr;(e.selection instanceof xt||e.selection instanceof Pi)&&c.deleteSelection();let d=c.mapping.map(i.pos),f=Hr(c.doc,d,o.length,o);if(f||(o[0]=a?{type:a}:null,f=Hr(c.doc,d,o.length,o)),c.split(d,o.length,o),!l&&u&&i.node(s).type!=a){let p=c.mapping.map(i.before(s)),h=c.doc.resolve(p);a&&i.node(s-1).canReplaceWith(h.index(),h.index()+1,a)&&c.setNodeMarkup(c.mapping.map(i.before(s)),a)}return n&&n(c.scrollIntoView()),!0}}const IV=EV(),PV=(t,e)=>{let{$from:n,to:i}=t.selection,r,o=n.sharedDepth(i);return o==0?!1:(r=n.before(o),e&&e(t.tr.setSelection(mt.create(t.doc,r))),!0)};function LV(t,e,n){let i=e.nodeBefore,r=e.nodeAfter,o=e.index();return!i||!r||!i.type.compatibleContent(r.type)?!1:!i.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-i.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(r.isTextblock||So(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function rS(t,e,n,i){let r=e.nodeBefore,o=e.nodeAfter,s,a,l=r.type.spec.isolating||o.type.spec.isolating;if(!l&&LV(t,e,n))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(s=(a=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(n){let p=e.pos+o.nodeSize,h=Me.empty;for(let S=s.length-1;S>=0;S--)h=Me.from(s[S].create(null,h));h=Me.from(r.copy(h));let m=t.tr.step(new Un(e.pos-1,p,e.pos,p,new Xe(h,1,0),s.length,!0)),v=m.doc.resolve(p+2*s.length);v.nodeAfter&&v.nodeAfter.type==r.type&&So(m.doc,v.pos)&&m.join(v.pos),n(m.scrollIntoView())}return!0}let c=o.type.spec.isolating||i>0&&l?null:$t.findFrom(e,1),d=c&&c.$from.blockRange(c.$to),f=d&&Zs(d);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(d,f).scrollIntoView()),!0;if(u&&sa(o,"start",!0)&&sa(r,"end")){let p=r,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=o,v=1;for(;!m.isTextblock;m=m.firstChild)v++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let S=Me.empty;for(let k=h.length-1;k>=0;k--)S=Me.from(h[k].copy(S));let b=t.tr.step(new Un(e.pos-h.length,e.pos+o.nodeSize,e.pos+v,e.pos+o.nodeSize-v,new Xe(S,h.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function oS(t){return function(e,n){let i=e.selection,r=t<0?i.$from:i.$to,o=r.depth;for(;r.node(o).isInline;){if(!o)return!1;o--}return r.node(o).isTextblock?(n&&n(e.tr.setSelection(xt.create(e.doc,t<0?r.start(o):r.end(o)))),!0):!1}}const DV=oS(-1),RV=oS(1);function BV(t,e=null){return function(n,i){let{$from:r,$to:o}=n.selection,s=r.blockRange(o),a=s&&Ch(s,t,e);return a?(i&&i(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function sS(t,e=null){return function(n,i){let r=!1;for(let o=0;o<n.selection.ranges.length&&!r;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(l,u)=>{if(r)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)r=!0;else{let c=n.doc.resolve(u),d=c.index();r=c.parent.canReplaceWith(d,d+1,t)}})}if(!r)return!1;if(i){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];o.setBlockType(a,l,t,e)}i(o.scrollIntoView())}return!0}}function sm(...t){return function(e,n,i){for(let r=0;r<t.length;r++)if(t[r](e,n,i))return!0;return!1}}sm(nm,Zw,Jw),sm(nm,Qw,eS),sm(tS,nS,iS,IV),typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function NV(t,e=null){return function(n,i){let{$from:r,$to:o}=n.selection,s=r.blockRange(o);if(!s)return!1;let a=i?n.tr:null;return $V(a,s,t,e)?(i&&i(a.scrollIntoView()),!0):!1}}function $V(t,e,n,i=null){let r=!1,o=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=s.resolve(e.start-2);o=new mc(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new mc(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),r=!0}let a=Ch(o,n,i,e);return a?(t&&VV(t,e,a,r,n),!0):!1}function VV(t,e,n,i,r){let o=Me.empty;for(let c=n.length-1;c>=0;c--)o=Me.from(n[c].type.create(n[c].attrs,o));t.step(new Un(e.start-(i?2:0),e.end,e.start,e.end,new Xe(o,0,0),n.length,!0));let s=0;for(let c=0;c<n.length;c++)n[c].type==r&&(s=c+1);let a=n.length-s,l=e.start+n.length-(i?2:0),u=e.parent;for(let c=e.startIndex,d=e.endIndex,f=!0;c<d;c++,f=!1)!f&&Hr(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=u.child(c).nodeSize;return t}function zV(t){return function(e,n){let{$from:i,$to:r}=e.selection,o=i.blockRange(r,s=>s.childCount>0&&s.firstChild.type==t);return o?n?i.node(o.depth-1).type==t?FV(e,n,t,o):HV(e,n,o):!0:!1}}function FV(t,e,n,i){let r=t.tr,o=i.end,s=i.$to.end(i.depth);o<s&&(r.step(new Un(o-1,s,o,s,new Xe(Me.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new mc(r.doc.resolve(i.$from.pos),r.doc.resolve(s),i.depth));const a=Zs(i);if(a==null)return!1;r.lift(i,a);let l=r.mapping.map(o,-1)-1;return So(r.doc,l)&&r.join(l),e(r.scrollIntoView()),!0}function HV(t,e,n){let i=t.tr,r=n.parent;for(let p=n.end,h=n.endIndex-1,m=n.startIndex;h>m;h--)p-=r.child(h).nodeSize,i.delete(p-1,p+1);let o=i.doc.resolve(n.start),s=o.nodeAfter;if(i.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==r.childCount,u=o.node(-1),c=o.index(-1);if(!u.canReplace(c+(a?0:1),c+1,s.content.append(l?Me.empty:Me.from(r))))return!1;let d=o.pos,f=d+s.nodeSize;return i.step(new Un(d-(a?1:0),f+(l?1:0),d+1,f-1,new Xe((a?Me.empty:Me.from(r.copy(Me.empty))).append(l?Me.empty:Me.from(r.copy(Me.empty))),a?0:1,l?0:1),a?0:1)),e(i.scrollIntoView()),!0}function jV(t){return function(e,n){let{$from:i,$to:r}=e.selection,o=i.blockRange(r,u=>u.childCount>0&&u.firstChild.type==t);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=t)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,c=Me.from(u?t.create():null),d=new Xe(Me.from(t.create(null,Me.from(a.type.create(null,c)))),u?3:1,0),f=o.start,p=o.end;n(e.tr.step(new Un(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}function Rc(t){const{state:e,transaction:n}=t;let{selection:i}=n,{doc:r}=n,{storedMarks:o}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=n.selection,r=n.doc,o=n.storedMarks,n}}}class Bc{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:i}=this,{view:r}=n,{tr:o}=i,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...c)=>{const d=l(...c)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a=[],l=!!e,u=e||o.tr,c=()=>(!l&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(i).map(([f,p])=>[f,(...m)=>{const v=this.buildProps(u,n),S=p(...m)(v);return a.push(S),d}])),run:c};return d}createCan(e){const{rawCommands:n,state:i}=this,r=!1,o=e||i.tr,s=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...c)=>u(...c)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(e,n=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a={tr:e,editor:r,view:s,state:Rc({state:o,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(i).map(([l,u])=>[l,(...c)=>u(...c)(a)]))}};return a}}class UV{constructor(){this.callbacks={}}on(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),this}emit(e,...n){const i=this.callbacks[e];return i&&i.forEach(r=>r.apply(this,n)),this}off(e,n){const i=this.callbacks[e];return i&&(n?this.callbacks[e]=i.filter(r=>r!==n):delete this.callbacks[e]),this}once(e,n){const i=(...r)=>{this.off(e,i),n.apply(this,r)};return this.on(e,i)}removeAllListeners(){this.callbacks={}}}function tt(t,e,n){return t.config[e]===void 0&&t.parent?tt(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?tt(t.parent,e,n):null}):t.config[e]}function Nc(t){const e=t.filter(r=>r.type==="extension"),n=t.filter(r=>r.type==="node"),i=t.filter(r=>r.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:i}}function aS(t){const e=[],{nodeExtensions:n,markExtensions:i}=Nc(t),r=[...n,...i],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage,extensions:r},l=tt(s,"addGlobalAttributes",a);if(!l)return;l().forEach(c=>{c.types.forEach(d=>{Object.entries(c.attributes).forEach(([f,p])=>{e.push({type:d,name:f,attribute:{...o,...p}})})})})}),r.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=tt(s,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([c,d])=>{const f={...o,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,e.push({type:s.name,name:c,attribute:f})})}),e}function Wn(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Dn(...t){return t.filter(e=>!!e).reduce((e,n)=>{const i={...e};return Object.entries(n).forEach(([r,o])=>{if(!i[r]){i[r]=o;return}if(r==="class"){const a=o?String(o).split(" "):[],l=i[r]?i[r].split(" "):[],u=a.filter(c=>!l.includes(c));i[r]=[...l,...u].join(" ")}else if(r==="style"){const a=o?o.split(";").map(c=>c.trim()).filter(Boolean):[],l=i[r]?i[r].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;l.forEach(c=>{const[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),a.forEach(c=>{const[d,f]=c.split(":").map(p=>p.trim());u.set(d,f)}),i[r]=Array.from(u.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else i[r]=o}),i},{})}function am(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,i)=>Dn(n,i),{})}function lS(t){return typeof t=="function"}function Lt(t,e=void 0,...n){return lS(t)?e?t.bind(e)(...n):t(...n):t}function KV(t={}){return Object.keys(t).length===0&&t.constructor===Object}function WV(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function uS(t,e){return"style"in t?t:{...t,getAttrs:n=>{const i=t.getAttrs?t.getAttrs(n):t.attrs;if(i===!1)return!1;const r=e.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):WV(n.getAttribute(s.name));return a==null?o:{...o,[s.name]:a}},{});return{...i,...r}}}}function cS(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&KV(n)?!1:n!=null))}function qV(t,e){var n;const i=aS(t),{nodeExtensions:r,markExtensions:o}=Nc(t),s=(n=r.find(u=>tt(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(r.map(u=>{const c=i.filter(S=>S.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:e},f=t.reduce((S,b)=>{const k=tt(b,"extendNodeSchema",d);return{...S,...k?k(u):{}}},{}),p=cS({...f,content:Lt(tt(u,"content",d)),marks:Lt(tt(u,"marks",d)),group:Lt(tt(u,"group",d)),inline:Lt(tt(u,"inline",d)),atom:Lt(tt(u,"atom",d)),selectable:Lt(tt(u,"selectable",d)),draggable:Lt(tt(u,"draggable",d)),code:Lt(tt(u,"code",d)),whitespace:Lt(tt(u,"whitespace",d)),linebreakReplacement:Lt(tt(u,"linebreakReplacement",d)),defining:Lt(tt(u,"defining",d)),isolating:Lt(tt(u,"isolating",d)),attrs:Object.fromEntries(c.map(S=>{var b;return[S.name,{default:(b=S==null?void 0:S.attribute)===null||b===void 0?void 0:b.default}]}))}),h=Lt(tt(u,"parseHTML",d));h&&(p.parseDOM=h.map(S=>uS(S,c)));const m=tt(u,"renderHTML",d);m&&(p.toDOM=S=>m({node:S,HTMLAttributes:am(S,c)}));const v=tt(u,"renderText",d);return v&&(p.toText=v),[u.name,p]})),l=Object.fromEntries(o.map(u=>{const c=i.filter(v=>v.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:e},f=t.reduce((v,S)=>{const b=tt(S,"extendMarkSchema",d);return{...v,...b?b(u):{}}},{}),p=cS({...f,inclusive:Lt(tt(u,"inclusive",d)),excludes:Lt(tt(u,"excludes",d)),group:Lt(tt(u,"group",d)),spanning:Lt(tt(u,"spanning",d)),code:Lt(tt(u,"code",d)),attrs:Object.fromEntries(c.map(v=>{var S;return[v.name,{default:(S=v==null?void 0:v.attribute)===null||S===void 0?void 0:S.default}]}))}),h=Lt(tt(u,"parseHTML",d));h&&(p.parseDOM=h.map(v=>uS(v,c)));const m=tt(u,"renderHTML",d);return m&&(p.toDOM=v=>m({mark:v,HTMLAttributes:am(v,c)})),[u.name,p]}));return new n2({topNode:s,nodes:a,marks:l})}function lm(t,e){return e.nodes[t]||e.marks[t]||null}function dS(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function um(t,e){const n=as.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}const XV=(t,e=500)=>{let n="";const i=t.parentOffset;return t.parent.nodesBetween(Math.max(0,i-e),i,(r,o,s,a)=>{var l,u;const c=((u=(l=r.type.spec).toText)===null||u===void 0?void 0:u.call(l,{node:r,pos:o,parent:s,index:a}))||r.textContent||"%leaf%";n+=r.isAtom&&!r.isText?c:c.slice(0,Math.max(0,i-o))}),n};function cm(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class $c{constructor(e){this.find=e.find,this.handler=e.handler}}const GV=(t,e)=>{if(cm(e))return e.exec(t);const n=e(t);if(!n)return null;const i=[n.text];return i.index=n.index,i.input=t,i.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(n.replaceWith)),i};function Vc(t){var e;const{editor:n,from:i,to:r,text:o,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const u=l.state.doc.resolve(i);if(u.parent.type.spec.code||!((e=u.nodeBefore||u.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let c=!1;const d=XV(u)+o;return s.forEach(f=>{if(c)return;const p=GV(d,f.find);if(!p)return;const h=l.state.tr,m=Rc({state:l.state,transaction:h}),v={from:i-(p[0].length-o.length),to:r},{commands:S,chain:b,can:k}=new Bc({editor:n,state:m});f.handler({state:m,range:v,match:p,commands:S,chain:b,can:k})===null||!h.steps.length||(h.setMeta(a,{transform:h,from:i,to:r,text:o}),l.dispatch(h),c=!0)}),c}function ZV(t){const{editor:e,rules:n}=t,i=new Kn({state:{init(){return null},apply(r,o,s){const a=r.getMeta(i);if(a)return a;const l=r.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=um(Me.from(c),s.schema);const{from:d}=l,f=d+c.length;Vc({editor:e,from:d,to:f,text:c,rules:n,plugin:i})}),r.selectionSet||r.docChanged?null:o}},props:{handleTextInput(r,o,s,a){return Vc({editor:e,from:o,to:s,text:a,rules:n,plugin:i})},handleDOMEvents:{compositionend:r=>(setTimeout(()=>{const{$cursor:o}=r.state.selection;o&&Vc({editor:e,from:o.pos,to:o.pos,text:"",rules:n,plugin:i})}),!1)},handleKeyDown(r,o){if(o.key!=="Enter")return!1;const{$cursor:s}=r.state.selection;return s?Vc({editor:e,from:s.pos,to:s.pos,text:`
|
|
242
|
+
`,rules:n,plugin:i}):!1}},isInputRules:!0});return i}function _V(t){return Object.prototype.toString.call(t).slice(8,-1)}function zc(t){return _V(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Fc(t,e){const n={...t};return zc(t)&&zc(e)&&Object.keys(e).forEach(i=>{zc(e[i])&&zc(t[i])?n[i]=Fc(t[i],e[i]):n[i]=e[i]}),n}class qr{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Lt(tt(this,"addOptions",{name:this.name}))),this.storage=Lt(tt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new qr(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Fc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new qr(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Lt(tt(n,"addOptions",{name:n.name})),n.storage=Lt(tt(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:i}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const s=r.marks();if(!!!s.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const l=s.find(u=>(u==null?void 0:u.type.name)===n.name);return l&&i.removeStoredMark(l),i.insertText(" ",r.pos),e.view.dispatch(i),!0}return!1}}function JV(t){return typeof t=="number"}class YV{constructor(e){this.find=e.find,this.handler=e.handler}}const QV=(t,e,n)=>{if(cm(e))return[...t.matchAll(e)];const i=e(t,n);return i?i.map(r=>{const o=[r.text];return o.index=r.index,o.input=t,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function ez(t){const{editor:e,state:n,from:i,to:r,rule:o,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:u,can:c}=new Bc({editor:e,state:n}),d=[];return n.doc.nodesBetween(i,r,(p,h)=>{if(!p.isTextblock||p.type.spec.code)return;const m=Math.max(i,h),v=Math.min(r,h+p.content.size),S=p.textBetween(m-h,v-h,void 0,"");QV(S,o.find,s).forEach(k=>{if(k.index===void 0)return;const A=m+k.index+1,w=A+k[0].length,y={from:n.tr.mapping.map(A),to:n.tr.mapping.map(w)},C=o.handler({state:n,range:y,match:k,commands:l,chain:u,can:c,pasteEvent:s,dropEvent:a});d.push(C)})}),d.every(p=>p!==null)}let Hc=null;const tz=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function nz(t){const{editor:e,rules:n}=t;let i=null,r=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:c,from:d,to:f,rule:p,pasteEvt:h})=>{const m=c.tr,v=Rc({state:c,transaction:m});if(!(!ez({editor:e,state:v,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new Kn({view(d){const f=h=>{var m;i=!((m=d.dom.parentElement)===null||m===void 0)&&m.contains(h.target)?d.dom.parentElement:null,i&&(Hc=e)},p=()=>{Hc&&(Hc=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(o=i===d.dom.parentElement,a=f,!o){const p=Hc;p&&setTimeout(()=>{const h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;const h=(p=f.clipboardData)===null||p===void 0?void 0:p.getData("text/html");return s=f,r=!!(h!=null&&h.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,p)=>{const h=d[0],m=h.getMeta("uiEvent")==="paste"&&!r,v=h.getMeta("uiEvent")==="drop"&&!o,S=h.getMeta("applyPasteRules"),b=!!S;if(!m&&!v&&!b)return;if(b){let{text:w}=S;typeof w=="string"?w=w:w=um(Me.from(w),p.schema);const{from:y}=S,C=y+w.length,I=tz(w);return l({rule:c,state:p,from:y,to:{b:C},pasteEvt:I})}const k=f.doc.content.findDiffStart(p.doc.content),A=f.doc.content.findDiffEnd(p.doc.content);if(!(!JV(k)||!A||k===A.b))return l({rule:c,state:p,from:k,to:A,pasteEvt:s})}}))}function iz(t){const e=t.filter((n,i)=>t.indexOf(n)!==i);return Array.from(new Set(e))}class aa{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=aa.resolve(e),this.schema=qV(this.extensions,n),this.setupExtensions()}static resolve(e){const n=aa.sort(aa.flatten(e)),i=iz(n.map(r=>r.name));return i.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${i.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),n}static flatten(e){return e.map(n=>{const i={name:n.name,options:n.options,storage:n.storage},r=tt(n,"addExtensions",i);return r?[n,...this.flatten(r())]:n}).flat(10)}static sort(e){return e.sort((i,r)=>{const o=tt(i,"priority")||100,s=tt(r,"priority")||100;return o>s?-1:o<s?1:0})}get commands(){return this.extensions.reduce((e,n)=>{const i={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:lm(n.name,this.schema)},r=tt(n,"addCommands",i);return r?{...e,...r()}:e},{})}get plugins(){const{editor:e}=this,n=aa.sort([...this.extensions].reverse()),i=[],r=[],o=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:lm(s.name,this.schema)},l=[],u=tt(s,"addKeyboardShortcuts",a);let c={};if(s.type==="mark"&&tt(s,"exitable",a)&&(c.ArrowRight=()=>qr.handleExit({editor:e,mark:s})),u){const m=Object.fromEntries(Object.entries(u()).map(([v,S])=>[v,()=>S({editor:e})]));c={...c,...m}}const d=wV(c);l.push(d);const f=tt(s,"addInputRules",a);dS(s,e.options.enableInputRules)&&f&&i.push(...f());const p=tt(s,"addPasteRules",a);dS(s,e.options.enablePasteRules)&&p&&r.push(...p());const h=tt(s,"addProseMirrorPlugins",a);if(h){const m=h();l.push(...m)}return l}).flat();return[ZV({editor:e,rules:i}),...nz({editor:e,rules:r}),...o]}get attributes(){return aS(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=Nc(this.extensions);return Object.fromEntries(n.filter(i=>!!tt(i,"addNodeView")).map(i=>{const r=this.attributes.filter(l=>l.type===i.name),o={name:i.name,options:i.options,storage:i.storage,editor:e,type:Wn(i.name,this.schema)},s=tt(i,"addNodeView",o);if(!s)return[];const a=(l,u,c,d,f)=>{const p=am(l,r);return s()({node:l,view:u,getPos:c,decorations:d,innerDecorations:f,editor:e,extension:i,HTMLAttributes:p})};return[i.name,a]}))}setupExtensions(){this.extensions.forEach(e=>{var n;this.editor.extensionStorage[e.name]=e.storage;const i={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:lm(e.name,this.schema)};e.type==="mark"&&(!((n=Lt(tt(e,"keepOnSplit",i)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const r=tt(e,"onBeforeCreate",i),o=tt(e,"onCreate",i),s=tt(e,"onUpdate",i),a=tt(e,"onSelectionUpdate",i),l=tt(e,"onTransaction",i),u=tt(e,"onFocus",i),c=tt(e,"onBlur",i),d=tt(e,"onDestroy",i);r&&this.editor.on("beforeCreate",r),o&&this.editor.on("create",o),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}}class vi{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Lt(tt(this,"addOptions",{name:this.name}))),this.storage=Lt(tt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new vi(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Fc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new vi({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Lt(tt(n,"addOptions",{name:n.name})),n.storage=Lt(tt(n,"addStorage",{name:n.name,options:n.options})),n}}function fS(t,e,n){const{from:i,to:r}=e,{blockSeparator:o=`
|
|
243
|
+
|
|
244
|
+
`,textSerializers:s={}}=n||{};let a="";return t.nodesBetween(i,r,(l,u,c,d)=>{var f;l.isBlock&&u>i&&(a+=o);const p=s==null?void 0:s[l.type.name];if(p)return c&&(a+=p({node:l,pos:u,parent:c,index:d,range:e})),!1;l.isText&&(a+=(f=l==null?void 0:l.text)===null||f===void 0?void 0:f.slice(Math.max(i,u)-u,r-u))}),a}function dm(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const rz=vi.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Kn({key:new Yn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:i,selection:r}=e,{ranges:o}=r,s=Math.min(...o.map(c=>c.$from.pos)),a=Math.max(...o.map(c=>c.$to.pos)),l=dm(n);return fS(i,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),oz=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),sz=(t=!1)=>({commands:e})=>e.setContent("",t),az=()=>({state:t,tr:e,dispatch:n})=>{const{selection:i}=e,{ranges:r}=i;return n&&r.forEach(({$from:o,$to:s})=>{t.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:c}=e,d=u.resolve(c.map(l)),f=u.resolve(c.map(l+a.nodeSize)),p=d.blockRange(f);if(!p)return;const h=Zs(p);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(p.start,m)}(h||h===0)&&e.lift(p,h)})}),!0},lz=t=>e=>t(e),uz=()=>({state:t,dispatch:e})=>nS(t,e),cz=(t,e)=>({editor:n,tr:i})=>{const{state:r}=n,o=r.doc.slice(t.from,t.to);i.deleteRange(t.from,t.to);const s=i.mapping.map(e);return i.insert(s,o.content),i.setSelection(new xt(i.doc.resolve(s-1))),!0},dz=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,i=n.$anchor.node();if(i.content.size>0)return!1;const r=t.selection.$anchor;for(let o=r.depth;o>0;o-=1)if(r.node(o).type===i.type){if(e){const a=r.before(o),l=r.after(o);t.delete(a,l).scrollIntoView()}return!0}return!1},fz=t=>({tr:e,state:n,dispatch:i})=>{const r=Wn(t,n.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r){if(i){const l=o.before(s),u=o.after(s);e.delete(l,u).scrollIntoView()}return!0}return!1},pz=t=>({tr:e,dispatch:n})=>{const{from:i,to:r}=t;return n&&e.delete(i,r),!0},hz=()=>({state:t,dispatch:e})=>nm(t,e),mz=()=>({commands:t})=>t.keyboardShortcut("Enter"),gz=()=>({state:t,dispatch:e})=>MV(t,e);function jc(t,e,n={strict:!0}){const i=Object.keys(e);return i.length?i.every(r=>n.strict?e[r]===t[r]:cm(e[r])?e[r].test(t[r]):e[r]===t[r]):!0}function pS(t,e,n={}){return t.find(i=>i.type===e&&jc(Object.fromEntries(Object.keys(n).map(r=>[r,i.attrs[r]])),n))}function hS(t,e,n={}){return!!pS(t,e,n)}function fm(t,e,n){var i;if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if((!r.node||!r.node.marks.some(c=>c.type===e))&&(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(c=>c.type===e)||(n=n||((i=r.node.marks[0])===null||i===void 0?void 0:i.attrs),!pS([...r.node.marks],e,n)))return;let s=r.index,a=t.start()+r.offset,l=s+1,u=a+r.node.nodeSize;for(;s>0&&hS([...t.parent.child(s-1).marks],e,n);)s-=1,a-=t.parent.child(s).nodeSize;for(;l<t.parent.childCount&&hS([...t.parent.child(l).marks],e,n);)u+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function Lo(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const vz=(t,e={})=>({tr:n,state:i,dispatch:r})=>{const o=Lo(t,i.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:c}=a;if(r){const d=fm(l,o,e);if(d&&d.from<=u&&d.to>=c){const f=xt.create(s,d.from,d.to);n.setSelection(f)}}return!0},yz=t=>e=>{const n=typeof t=="function"?t(e):t;for(let i=0;i<n.length;i+=1)if(n[i](e))return!0;return!1};function pm(t){return t instanceof xt}function Xr(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function mS(t,e=null){if(!e)return null;const n=$t.atStart(t),i=$t.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return i;const r=n.from,o=i.to;return e==="all"?xt.create(t,Xr(0,r,o),Xr(t.content.size,r,o)):xt.create(t,Xr(e,r,o),Xr(e,r,o))}function gS(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Uc(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const bz=(t=null,e={})=>({editor:n,view:i,tr:r,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{(Uc()||gS())&&i.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(i.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(i.hasFocus()&&t===null||t===!1)return!0;if(o&&t===null&&!pm(n.state.selection))return s(),!0;const a=mS(r.doc,t)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},Az=(t,e)=>n=>t.every((i,r)=>e(i,{...n,index:r})),wz=(t,e)=>({tr:n,commands:i})=>i.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),vS=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const i=e[n];i.nodeType===3&&i.nodeValue&&/^(\n\s\s|\n)$/.test(i.nodeValue)?t.removeChild(i):i.nodeType===1&&vS(i)}return t};function Kc(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return vS(n)}function Wc(t,e,n){if(t instanceof yo||t instanceof Me)return t;n={slice:!0,parseOptions:{},...n};const i=typeof t=="object"&&t!==null,r=typeof t=="string";if(i)try{if(Array.isArray(t)&&t.length>0)return Me.fromArray(t.map(a=>e.nodeFromJSON(a)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",o),Wc("",e,n)}if(r){if(n.errorOnInvalidContent){let s=!1,a="";const l=new n2({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?bo.fromSchema(l).parseSlice(Kc(t),n.parseOptions):bo.fromSchema(l).parse(Kc(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const o=bo.fromSchema(e);return n.slice?o.parseSlice(Kc(t),n.parseOptions).content:o.parse(Kc(t),n.parseOptions)}return Wc("",e,n)}function Sz(t,e,n){const i=t.steps.length-1;if(i<e)return;const r=t.steps[i];if(!(r instanceof jn||r instanceof Un))return;const o=t.mapping.maps[i];let s=0;o.forEach((a,l,u,c)=>{s===0&&(s=c)}),t.setSelection($t.near(t.doc.resolve(s),n))}const Cz=t=>!("type"in t),kz=(t,e,n)=>({tr:i,dispatch:r,editor:o})=>{var s;if(r){n={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;try{a=Wc(e,o.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(s=n.errorOnInvalidContent)!==null&&s!==void 0?s:o.options.enableContentCheck})}catch(h){return o.emit("contentError",{editor:o,error:h,disableCollaboration:()=>{o.storage.collaboration&&(o.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:u}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},c=!0,d=!0;if((Cz(a)?a:[a]).forEach(h=>{h.check(),c=c?h.isText&&h.marks.length===0:!1,d=d?h.isBlock:!1}),l===u&&d){const{parent:h}=i.doc.resolve(l);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(l-=1,u+=1)}let p;if(c){if(Array.isArray(e))p=e.map(h=>h.text||"").join("");else if(e instanceof Me){let h="";e.forEach(m=>{m.text&&(h+=m.text)}),p=h}else typeof e=="object"&&e&&e.text?p=e.text:p=e;i.insertText(p,l,u)}else p=a,i.replaceWith(l,u,p);n.updateSelection&&Sz(i,i.steps.length-1,-1),n.applyInputRules&&i.setMeta("applyInputRules",{from:l,text:p}),n.applyPasteRules&&i.setMeta("applyPasteRules",{from:l,text:p})}return!0},Tz=()=>({state:t,dispatch:e})=>TV(t,e),Oz=()=>({state:t,dispatch:e})=>OV(t,e),xz=()=>({state:t,dispatch:e})=>Zw(t,e),Mz=()=>({state:t,dispatch:e})=>Qw(t,e),Ez=()=>({state:t,dispatch:e,tr:n})=>{try{const i=Sc(t.doc,t.selection.$from.pos,-1);return i==null?!1:(n.join(i,2),e&&e(n),!0)}catch{return!1}},Iz=()=>({state:t,dispatch:e,tr:n})=>{try{const i=Sc(t.doc,t.selection.$from.pos,1);return i==null?!1:(n.join(i,2),e&&e(n),!0)}catch{return!1}},Pz=()=>({state:t,dispatch:e})=>CV(t,e),Lz=()=>({state:t,dispatch:e})=>kV(t,e);function yS(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Dz(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let i,r,o,s;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))i=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))Uc()||yS()?s=!0:r=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return i&&(n=`Alt-${n}`),r&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}const Rz=t=>({editor:e,view:n,tr:i,dispatch:r})=>{const o=Dz(t).split(/-(?!$)/),s=o.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l==null||l.steps.forEach(u=>{const c=u.map(i.mapping);c&&r&&i.maybeStep(c)}),!0};function Xl(t,e,n={}){const{from:i,to:r,empty:o}=t.selection,s=e?Wn(e,t.schema):null,a=[];t.doc.nodesBetween(i,r,(d,f)=>{if(d.isText)return;const p=Math.max(i,f),h=Math.min(r,f+d.nodeSize);a.push({node:d,from:p,to:h})});const l=r-i,u=a.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>jc(d.node.attrs,n,{strict:!1}));return o?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=l}const Bz=(t,e={})=>({state:n,dispatch:i})=>{const r=Wn(t,n.schema);return Xl(n,r,e)?xV(n,i):!1},Nz=()=>({state:t,dispatch:e})=>iS(t,e),$z=t=>({state:e,dispatch:n})=>{const i=Wn(t,e.schema);return zV(i)(e,n)},Vz=()=>({state:t,dispatch:e})=>tS(t,e);function qc(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function bS(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((i,r)=>(n.includes(r)||(i[r]=t[r]),i),{})}const zz=(t,e)=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null;const a=qc(typeof t=="string"?t:t.name,i.schema);return a?(a==="node"&&(o=Wn(t,i.schema)),a==="mark"&&(s=Lo(t,i.schema)),r&&n.selection.ranges.forEach(l=>{i.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,c)=>{o&&o===u.type&&n.setNodeMarkup(c,void 0,bS(u.attrs,e)),s&&u.marks.length&&u.marks.forEach(d=>{s===d.type&&n.addMark(c,c+u.nodeSize,s.create(bS(d.attrs,e)))})})}),!0):!1},Fz=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),Hz=()=>({tr:t,dispatch:e})=>{if(e){const n=new Pi(t.doc);t.setSelection(n)}return!0},jz=()=>({state:t,dispatch:e})=>Jw(t,e),Uz=()=>({state:t,dispatch:e})=>eS(t,e),Kz=()=>({state:t,dispatch:e})=>PV(t,e),Wz=()=>({state:t,dispatch:e})=>RV(t,e),qz=()=>({state:t,dispatch:e})=>DV(t,e);function hm(t,e,n={},i={}){return Wc(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:i.errorOnInvalidContent})}const Xz=(t,e=!1,n={},i={})=>({editor:r,tr:o,dispatch:s,commands:a})=>{var l,u;const{doc:c}=o;if(n.preserveWhitespace!=="full"){const d=hm(t,r.schema,n,{errorOnInvalidContent:(l=i.errorOnInvalidContent)!==null&&l!==void 0?l:r.options.enableContentCheck});return s&&o.replaceWith(0,c.content.size,d).setMeta("preventUpdate",!e),!0}return s&&o.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:c.content.size},t,{parseOptions:n,errorOnInvalidContent:(u=i.errorOnInvalidContent)!==null&&u!==void 0?u:r.options.enableContentCheck})};function AS(t,e){const n=Lo(e,t.schema),{from:i,to:r,empty:o}=t.selection,s=[];o?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(i,r,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function Gz(t,e){const n=new O2(t);return e.forEach(i=>{i.steps.forEach(r=>{n.step(r)})}),n}function Zz(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function _z(t,e,n){const i=[];return t.nodesBetween(e.from,e.to,(r,o)=>{n(r)&&i.push({node:r,pos:o})}),i}function Jz(t,e){for(let n=t.depth;n>0;n-=1){const i=t.node(n);if(e(i))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:i}}}function mm(t){return e=>Jz(e.$from,t)}function wS(t,e){const n={from:0,to:t.content.size};return fS(t,n,e)}function Yz(t,e){const n=Wn(e,t.schema),{from:i,to:r}=t.selection,o=[];t.doc.nodesBetween(i,r,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function SS(t,e){const n=qc(typeof e=="string"?e:e.name,t.schema);return n==="node"?Yz(t,e):n==="mark"?AS(t,e):{}}function Qz(t,e=JSON.stringify){const n={};return t.filter(i=>{const r=e(i);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function eF(t){const e=Qz(t);return e.length===1?e:e.filter((n,i)=>!e.filter((o,s)=>s!==i).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function tF(t){const{mapping:e,steps:n}=t,i=[];return e.maps.forEach((r,o)=>{const s=[];if(r.ranges.length)r.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const u=e.slice(o).map(a,-1),c=e.slice(o).map(l),d=e.invert().map(u,-1),f=e.invert().map(c);i.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),eF(i)}function gm(t,e,n){const i=[];return t===e?n.resolve(t).marks().forEach(r=>{const o=n.resolve(t),s=fm(o,r.type);s&&i.push({mark:r,...s})}):n.nodesBetween(t,e,(r,o)=>{!r||(r==null?void 0:r.nodeSize)===void 0||i.push(...r.marks.map(s=>({from:o,to:o+r.nodeSize,mark:s})))}),i}function Xc(t,e,n){return Object.fromEntries(Object.entries(n).filter(([i])=>{const r=t.find(o=>o.type===e&&o.name===i);return r?r.attribute.keepOnSplit:!1}))}function vm(t,e,n={}){const{empty:i,ranges:r}=t.selection,o=e?Lo(e,t.schema):null;if(i)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>o?o.name===d.type.name:!0).find(d=>jc(d.attrs,n,{strict:!1}));let s=0;const a=[];if(r.forEach(({$from:d,$to:f})=>{const p=d.pos,h=f.pos;t.doc.nodesBetween(p,h,(m,v)=>{if(!m.isText&&!m.marks.length)return;const S=Math.max(p,v),b=Math.min(h,v+m.nodeSize),k=b-S;s+=k,a.push(...m.marks.map(A=>({mark:A,from:S,to:b})))})}),s===0)return!1;const l=a.filter(d=>o?o.name===d.mark.type.name:!0).filter(d=>jc(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=a.filter(d=>o?d.mark.type!==o&&d.mark.type.excludes(o):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+u:l)>=s}function nF(t,e,n={}){if(!e)return Xl(t,null,n)||vm(t,null,n);const i=qc(e,t.schema);return i==="node"?Xl(t,e,n):i==="mark"?vm(t,e,n):!1}function CS(t,e){const{nodeExtensions:n}=Nc(e),i=n.find(s=>s.name===t);if(!i)return!1;const r={name:i.name,options:i.options,storage:i.storage},o=Lt(tt(i,"group",r));return typeof o!="string"?!1:o.split(" ").includes("list")}function Gc(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var i;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((i=t.text)!==null&&i!==void 0?i:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let r=!0;return t.content.forEach(o=>{r!==!1&&(Gc(o,{ignoreWhitespace:n,checkChildren:e})||(r=!1))}),r}return!1}function iF(t){return t instanceof mt}function kS(t,e,n){const r=t.state.doc.content.size,o=Xr(e,0,r),s=Xr(n,0,r),a=t.coordsAtPos(o),l=t.coordsAtPos(s,-1),u=Math.min(a.top,l.top),c=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),f=Math.max(a.right,l.right),p=f-d,h=c-u,S={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return{...S,toJSON:()=>S}}function rF(t,e,n){var i;const{selection:r}=e;let o=null;if(pm(r)&&(o=r.$cursor),o){const a=(i=t.storedMarks)!==null&&i!==void 0?i:o.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:s}=r;return s.some(({$from:a,$to:l})=>{let u=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){const p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=p&&h}return!u}),u})}const oF=(t,e={})=>({tr:n,state:i,dispatch:r})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=Lo(t,i.schema);if(r)if(s){const u=AS(i,l);n.addStoredMark(l.create({...u,...e}))}else a.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;i.doc.nodesBetween(c,d,(f,p)=>{const h=Math.max(p,c),m=Math.min(p+f.nodeSize,d);f.marks.find(S=>S.type===l)?f.marks.forEach(S=>{l===S.type&&n.addMark(h,m,l.create({...S.attrs,...e}))}):n.addMark(h,m,l.create(e))})});return rF(i,n,l)},sF=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),aF=(t,e={})=>({state:n,dispatch:i,chain:r})=>{const o=Wn(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),o.isTextblock?r().command(({commands:a})=>sS(o,{...s,...e})(n)?!0:a.clearNodes()).command(({state:a})=>sS(o,{...s,...e})(a,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},lF=t=>({tr:e,dispatch:n})=>{if(n){const{doc:i}=e,r=Xr(t,0,i.content.size),o=mt.create(i,r);e.setSelection(o)}return!0},uF=t=>({tr:e,dispatch:n})=>{if(n){const{doc:i}=e,{from:r,to:o}=typeof t=="number"?{from:t,to:t}:t,s=xt.atStart(i).from,a=xt.atEnd(i).to,l=Xr(r,s,a),u=Xr(o,s,a),c=xt.create(i,l,u);e.setSelection(c)}return!0},cF=t=>({state:e,dispatch:n})=>{const i=Wn(t,e.schema);return jV(i)(e,n)};function TS(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const i=n.filter(r=>e==null?void 0:e.includes(r.type.name));t.tr.ensureMarks(i)}}const dF=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:i,editor:r})=>{const{selection:o,doc:s}=e,{$from:a,$to:l}=o,u=r.extensionManager.attributes,c=Xc(u,a.node().type.name,a.node().attrs);if(o instanceof mt&&o.node.isBlock)return!a.parentOffset||!Hr(s,a.pos)?!1:(i&&(t&&TS(n,r.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,f=a.depth===0?void 0:Zz(a.node(-1).contentMatchAt(a.indexAfter(-1)));let p=d&&f?[{type:f,attrs:c}]:void 0,h=Hr(e.doc,e.mapping.map(a.pos),1,p);if(!p&&!h&&Hr(e.doc,e.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),i){if(h&&(o instanceof xt&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,p),f&&!d&&!a.parentOffset&&a.parent.type!==f)){const m=e.mapping.map(a.before()),v=e.doc.resolve(m);a.node(-1).canReplaceWith(v.index(),v.index()+1,f)&&e.setNodeMarkup(e.mapping.map(a.before()),f)}t&&TS(n,r.extensionManager.splittableMarks),e.scrollIntoView()}return h},fF=(t,e={})=>({tr:n,state:i,dispatch:r,editor:o})=>{var s;const a=Wn(t,i.schema),{$from:l,$to:u}=i.selection,c=i.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;const d=l.node(-1);if(d.type!==a)return!1;const f=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(r){let S=Me.empty;const b=l.index(-1)?1:l.index(-2)?2:3;for(let I=l.depth-b;I>=l.depth-3;I-=1)S=Me.from(l.node(I).copy(S));const k=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,A={...Xc(f,l.node().type.name,l.node().attrs),...e},w=((s=a.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(A))||void 0;S=S.append(Me.from(a.createAndFill(null,w)||void 0));const y=l.before(l.depth-(b-1));n.replace(y,l.after(-k),new Xe(S,4-b,0));let C=-1;n.doc.nodesBetween(y,n.doc.content.size,(I,R)=>{if(C>-1)return!1;I.isTextblock&&I.content.size===0&&(C=R+1)}),C>-1&&n.setSelection(xt.near(n.doc.resolve(C))),n.scrollIntoView()}return!0}const p=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,h={...Xc(f,d.type.name,d.attrs),...e},m={...Xc(f,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,u.pos);const v=p?[{type:a,attrs:h},{type:p,attrs:m}]:[{type:a,attrs:h}];if(!Hr(n.doc,l.pos,2))return!1;if(r){const{selection:S,storedMarks:b}=i,{splittableMarks:k}=o.extensionManager,A=b||S.$to.parentOffset&&S.$from.marks();if(n.split(l.pos,2,v).scrollIntoView(),!A||!r)return!0;const w=A.filter(y=>k.includes(y.type.name));n.ensureMarks(w)}return!0},ym=(t,e)=>{const n=mm(s=>s.type===e)(t.selection);if(!n)return!0;const i=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(i===void 0)return!0;const r=t.doc.nodeAt(i);return n.node.type===(r==null?void 0:r.type)&&So(t.doc,n.pos)&&t.join(n.pos),!0},bm=(t,e)=>{const n=mm(s=>s.type===e)(t.selection);if(!n)return!0;const i=t.doc.resolve(n.start).after(n.depth);if(i===void 0)return!0;const r=t.doc.nodeAt(i);return n.node.type===(r==null?void 0:r.type)&&So(t.doc,i)&&t.join(i),!0};var pF=Object.freeze({__proto__:null,blur:oz,clearContent:sz,clearNodes:az,command:lz,createParagraphNear:uz,cut:cz,deleteCurrentNode:dz,deleteNode:fz,deleteRange:pz,deleteSelection:hz,enter:mz,exitCode:gz,extendMarkRange:vz,first:yz,focus:bz,forEach:Az,insertContent:wz,insertContentAt:kz,joinBackward:xz,joinDown:Oz,joinForward:Mz,joinItemBackward:Ez,joinItemForward:Iz,joinTextblockBackward:Pz,joinTextblockForward:Lz,joinUp:Tz,keyboardShortcut:Rz,lift:Bz,liftEmptyBlock:Nz,liftListItem:$z,newlineInCode:Vz,resetAttributes:zz,scrollIntoView:Fz,selectAll:Hz,selectNodeBackward:jz,selectNodeForward:Uz,selectParentNode:Kz,selectTextblockEnd:Wz,selectTextblockStart:qz,setContent:Xz,setMark:oF,setMeta:sF,setNode:aF,setNodeSelection:lF,setTextSelection:uF,sinkListItem:cF,splitBlock:dF,splitListItem:fF,toggleList:(t,e,n,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:u,can:c})=>{const{extensions:d,splittableMarks:f}=r.extensionManager,p=Wn(t,s.schema),h=Wn(e,s.schema),{selection:m,storedMarks:v}=s,{$from:S,$to:b}=m,k=S.blockRange(b),A=v||m.$to.parentOffset&&m.$from.marks();if(!k)return!1;const w=mm(y=>CS(y.type.name,d))(m);if(k.depth>=1&&w&&k.depth-w.depth<=1){if(w.node.type===p)return u.liftListItem(h);if(CS(w.node.type.name,d)&&p.validContent(w.node.content)&&a)return l().command(()=>(o.setNodeMarkup(w.pos,p),!0)).command(()=>ym(o,p)).command(()=>bm(o,p)).run()}return!n||!A||!a?l().command(()=>c().wrapInList(p,i)?!0:u.clearNodes()).wrapInList(p,i).command(()=>ym(o,p)).command(()=>bm(o,p)).run():l().command(()=>{const y=c().wrapInList(p,i),C=A.filter(I=>f.includes(I.type.name));return o.ensureMarks(C),y?!0:u.clearNodes()}).wrapInList(p,i).command(()=>ym(o,p)).command(()=>bm(o,p)).run()},toggleMark:(t,e={},n={})=>({state:i,commands:r})=>{const{extendEmptyMarkRange:o=!1}=n,s=Lo(t,i.schema);return vm(i,s,e)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,e)},toggleNode:(t,e,n={})=>({state:i,commands:r})=>{const o=Wn(t,i.schema),s=Wn(e,i.schema),a=Xl(i,o,n);let l;return i.selection.$anchor.sameParent(i.selection.$head)&&(l=i.selection.$anchor.parent.attrs),a?r.setNode(s,l):r.setNode(o,{...l,...n})},toggleWrap:(t,e={})=>({state:n,commands:i})=>{const r=Wn(t,n.schema);return Xl(n,r,e)?i.lift(r):i.wrapIn(r,e)},undoInputRule:()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let i=0;i<n.length;i+=1){const r=n[i];let o;if(r.spec.isInputRules&&(o=r.getState(t))){if(e){const s=t.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,t.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:i,ranges:r}=n;return i||e&&r.forEach(o=>{t.removeMark(o.$from.pos,o.$to.pos)}),!0},unsetMark:(t,e={})=>({tr:n,state:i,dispatch:r})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=Lo(t,i.schema),{$from:u,empty:c,ranges:d}=a;if(!r)return!0;if(c&&s){let{from:f,to:p}=a;const h=(o=u.marks().find(v=>v.type===l))===null||o===void 0?void 0:o.attrs,m=fm(u,l,h);m&&(f=m.from,p=m.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},updateAttributes:(t,e={})=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null;const a=qc(typeof t=="string"?t:t.name,i.schema);return a?(a==="node"&&(o=Wn(t,i.schema)),a==="mark"&&(s=Lo(t,i.schema)),r&&n.selection.ranges.forEach(l=>{const u=l.$from.pos,c=l.$to.pos;let d,f,p,h;n.selection.empty?i.doc.nodesBetween(u,c,(m,v)=>{o&&o===m.type&&(p=Math.max(v,u),h=Math.min(v+m.nodeSize,c),d=v,f=m)}):i.doc.nodesBetween(u,c,(m,v)=>{v<u&&o&&o===m.type&&(p=Math.max(v,u),h=Math.min(v+m.nodeSize,c),d=v,f=m),v>=u&&v<=c&&(o&&o===m.type&&n.setNodeMarkup(v,void 0,{...m.attrs,...e}),s&&m.marks.length&&m.marks.forEach(S=>{if(s===S.type){const b=Math.max(v,u),k=Math.min(v+m.nodeSize,c);n.addMark(b,k,s.create({...S.attrs,...e}))}}))}),f&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...f.attrs,...e}),s&&f.marks.length&&f.marks.forEach(m=>{s===m.type&&n.addMark(p,h,s.create({...m.attrs,...e}))}))}),!0):!1},wrapIn:(t,e={})=>({state:n,dispatch:i})=>{const r=Wn(t,n.schema);return BV(r,e)(n,i)},wrapInList:(t,e={})=>({state:n,dispatch:i})=>{const r=Wn(t,n.schema);return NV(r,e)(n,i)}});const hF=vi.create({name:"commands",addCommands(){return{...pF}}}),mF=vi.create({name:"drop",addProseMirrorPlugins(){return[new Kn({key:new Yn("tiptapDrop"),props:{handleDrop:(t,e,n,i)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:i})}}})]}}),gF=vi.create({name:"editable",addProseMirrorPlugins(){return[new Kn({key:new Yn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),vF=new Yn("focusEvents"),yF=vi.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Kn({key:vF,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const i=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(i),!1},blur:(e,n)=>{t.isFocused=!1;const i=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(i),!1}}}})]}}),bF=vi.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:c,$anchor:d}=l,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,v=d.pos-d.parentOffset,S=m&&h.parent.childCount===1?v===d.pos:$t.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!S||S&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),i={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},r={...i},o={...i,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Uc()||yS()?o:r},addProseMirrorPlugins(){return[new Kn({key:new Yn("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(m=>m.getMeta("composition")))return;const i=t.some(m=>m.docChanged)&&!e.doc.eq(n.doc),r=t.some(m=>m.getMeta("preventClearDocument"));if(!i||r)return;const{empty:o,from:s,to:a}=e.selection,l=$t.atStart(e.doc).from,u=$t.atEnd(e.doc).to;if(o||!(s===l&&a===u)||!Gc(n.doc))return;const f=n.tr,p=Rc({state:n,transaction:f}),{commands:h}=new Bc({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),AF=vi.create({name:"paste",addProseMirrorPlugins(){return[new Kn({key:new Yn("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),wF=vi.create({name:"tabindex",addProseMirrorPlugins(){return[new Kn({key:new Yn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class gs{get name(){return this.node.type.name}constructor(e,n,i=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=i,this.resolvedPos=e,this.editor=n,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,i=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,i=this.to-1}this.editor.commands.insertContentAt({from:n,to:i},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new gs(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new gs(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new gs(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,i)=>{const r=n.isBlock&&!n.isTextblock,o=n.isAtom&&!n.isText,s=this.pos+i+(o?0:1),a=this.resolvedPos.doc.resolve(s);if(!r&&a.depth<=this.depth)return;const l=new gs(a,this.editor,r,r?n:null);r&&(l.actualDepth=this.depth+1),e.push(new gs(a,this.editor,r,r?n:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let i=null,r=this.parent;for(;r&&!i;){if(r.node.type.name===e)if(Object.keys(n).length>0){const o=r.node.attrs,s=Object.keys(n);for(let a=0;a<s.length;a+=1){const l=s[a];if(o[l]!==n[l])break}}else i=r;r=r.parent}return i}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},i=!1){let r=[];if(!this.children||this.children.length===0)return r;const o=Object.keys(n);return this.children.forEach(s=>{i&&r.length>0||(s.node.type.name===e&&o.every(l=>n[l]===s.node.attrs[l])&&r.push(s),!(i&&r.length>0)&&(r=r.concat(s.querySelectorAll(e,n,i))))}),r}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}}const SF=`.ProseMirror {
|
|
245
|
+
position: relative;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.ProseMirror {
|
|
249
|
+
word-wrap: break-word;
|
|
250
|
+
white-space: pre-wrap;
|
|
251
|
+
white-space: break-spaces;
|
|
252
|
+
-webkit-font-variant-ligatures: none;
|
|
253
|
+
font-variant-ligatures: none;
|
|
254
|
+
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.ProseMirror [contenteditable="false"] {
|
|
258
|
+
white-space: normal;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
262
|
+
white-space: pre-wrap;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.ProseMirror pre {
|
|
266
|
+
white-space: pre-wrap;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
img.ProseMirror-separator {
|
|
270
|
+
display: inline !important;
|
|
271
|
+
border: none !important;
|
|
272
|
+
margin: 0 !important;
|
|
273
|
+
width: 0 !important;
|
|
274
|
+
height: 0 !important;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.ProseMirror-gapcursor {
|
|
278
|
+
display: none;
|
|
279
|
+
pointer-events: none;
|
|
280
|
+
position: absolute;
|
|
281
|
+
margin: 0;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.ProseMirror-gapcursor:after {
|
|
285
|
+
content: "";
|
|
286
|
+
display: block;
|
|
287
|
+
position: absolute;
|
|
288
|
+
top: -2px;
|
|
289
|
+
width: 20px;
|
|
290
|
+
border-top: 1px solid black;
|
|
291
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
@keyframes ProseMirror-cursor-blink {
|
|
295
|
+
to {
|
|
296
|
+
visibility: hidden;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.ProseMirror-hideselection *::selection {
|
|
301
|
+
background: transparent;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
305
|
+
background: transparent;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.ProseMirror-hideselection * {
|
|
309
|
+
caret-color: transparent;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
313
|
+
display: block;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
317
|
+
opacity: 0
|
|
318
|
+
}`;function CF(t,e,n){const i=document.querySelector("style[data-tiptap-style]");if(i!==null)return i;const r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.setAttribute("data-tiptap-style",""),r.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(r),r}let kF=class extends UV{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:i,moved:r})=>this.options.onDrop(n,i,r)),this.on("paste",({event:n,slice:i})=>this.options.onPaste(n,i)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=CF(SF,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,n){const i=lS(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:i});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;const n=this.state.plugins;let i=n;if([].concat(e).forEach(o=>{const s=typeof o=="string"?`${o}$`:o.key;i=i.filter(a=>!a.key.startsWith(s))}),n.length===i.length)return;const r=this.state.reconfigure({plugins:i});return this.view.updateState(r),r}createExtensionManager(){var e,n;const r=[...this.options.enableCoreExtensions?[gF,rz.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),hF,yF,bF,wF,mF,AF].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new aa(r,this)}createCommandManager(){this.commandManager=new Bc({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let n;try{n=hm(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),n=hm(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const i=mS(n,this.options.autofocus);this.view=new fV(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Qs.create({doc:n,selection:i||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const n=this.state.apply(e),i=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),i&&this.emit("selectionUpdate",{editor:this,transaction:e});const r=e.getMeta("focus"),o=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return SS(this.state,e)}isActive(e,n){const i=typeof e=="string"?e:null,r=typeof e=="string"?n:e;return nF(this.state,i,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return um(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
|
|
319
|
+
|
|
320
|
+
`,textSerializers:i={}}=e||{};return wS(this.state.doc,{blockSeparator:n,textSerializers:{...dm(this.schema),...i}})}get isEmpty(){return Gc(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,n){var i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelector(e,n))||null}$nodes(e,n){var i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new gs(n,this)}get $doc(){return this.$pos(0)}};function Gl(t){return new $c({find:t.find,handler:({state:e,range:n,match:i})=>{const r=Lt(t.getAttributes,void 0,i);if(r===!1||r===null)return null;const{tr:o}=e,s=i[i.length-1],a=i[0];if(s){const l=a.search(/\S/),u=n.from+a.indexOf(s),c=u+s.length;if(gm(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(m=>m===t.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;c<n.to&&o.delete(c,n.to),u>n.from&&o.delete(n.from+l,u);const f=n.from+l+s.length;o.addMark(n.from+l,f,t.type.create(r||{})),o.removeStoredMark(t.type)}}})}function TF(t){return new $c({find:t.find,handler:({state:e,range:n,match:i})=>{const r=Lt(t.getAttributes,void 0,i)||{},{tr:o}=e,s=n.from;let a=n.to;const l=t.type.create(r);if(i[1]){const u=i[0].lastIndexOf(i[1]);let c=s+u;c>a?c=a:a=c+i[1].length;const d=i[0][i[0].length-1];o.insertText(d,s+i[0].length-1),o.replaceWith(c,a,l)}else if(i[0]){const u=t.type.isInline?s:s-1;o.insert(u,t.type.create(r)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()}})}function OF(t){return new $c({find:t.find,handler:({state:e,range:n,match:i})=>{const r=e.doc.resolve(n.from),o=Lt(t.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)}})}function Zc(t){return new $c({find:t.find,handler:({state:e,range:n,match:i,chain:r})=>{const o=Lt(t.getAttributes,void 0,i)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),u=l&&Ch(l,t.type,o);if(!u)return null;if(s.wrap(l,u),t.keepMarks&&t.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:p}=t.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){const m=h.filter(v=>p.includes(v.type.name));s.ensureMarks(m)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";r().updateAttributes(d,o).run()}const c=s.doc.resolve(n.from-1).nodeBefore;c&&c.type===t.type&&So(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(i,c))&&s.join(n.from-1)}})}class ki{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Lt(tt(this,"addOptions",{name:this.name}))),this.storage=Lt(tt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ki(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Fc(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new ki(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Lt(tt(n,"addOptions",{name:n.name})),n.storage=Lt(tt(n,"addStorage",{name:n.name,options:n.options})),n}}class xF{constructor(e,n,i){this.isDragging=!1,this.component=e,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...i},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var n,i,r,o,s,a,l;const{view:u}=this.editor,c=e.target,d=c.nodeType===3?(n=c.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||!((i=this.contentDOM)===null||i===void 0)&&i.contains(c)||!d)return;let f=0,p=0;if(this.dom!==d){const b=this.dom.getBoundingClientRect(),k=d.getBoundingClientRect(),A=(r=e.offsetX)!==null&&r!==void 0?r:(o=e.nativeEvent)===null||o===void 0?void 0:o.offsetX,w=(s=e.offsetY)!==null&&s!==void 0?s:(a=e.nativeEvent)===null||a===void 0?void 0:a.offsetY;f=k.x-b.x+A,p=k.y-b.y+w}const h=this.dom.cloneNode(!0);(l=e.dataTransfer)===null||l===void 0||l.setDragImage(h,f,p);const m=this.getPos();if(typeof m!="number")return;const v=mt.create(u.state.doc,m),S=u.state.tr.setSelection(v);u.dispatch(S)}stopEvent(e){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const i=e.target;if(!(this.dom.contains(i)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(i))))return!1;const o=e.type.startsWith("drag"),s=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(i.tagName)||i.isContentEditable)&&!s&&!o)return!0;const{isEditable:l}=this.editor,{isDragging:u}=this,c=!!this.node.type.spec.draggable,d=mt.isSelectable(this.node),f=e.type==="copy",p=e.type==="paste",h=e.type==="cut",m=e.type==="mousedown";if(!c&&d&&o&&e.target===this.dom&&e.preventDefault(),c&&o&&!u&&e.target===this.dom)return e.preventDefault(),!1;if(c&&l&&!u&&m){const v=i.closest("[data-drag-handle]");v&&(this.dom===v||this.dom.contains(v))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(u||s||f||p||h||m&&d)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(Uc()||gS())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(i=>i.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:n})=>{const i=this.getPos();return typeof i!="number"?!1:(n.setNodeMarkup(i,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const n=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:n})}}function la(t){return new YV({find:t.find,handler:({state:e,range:n,match:i,pasteEvent:r})=>{const o=Lt(t.getAttributes,void 0,i,r);if(o===!1||o===null)return null;const{tr:s}=e,a=i[i.length-1],l=i[0];let u=n.to;if(a){const c=l.search(/\S/),d=n.from+l.indexOf(a),f=d+a.length;if(gm(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(v=>v===t.type&&v!==h.mark.type)).filter(h=>h.to>d).length)return null;f<n.to&&s.delete(f,n.to),d>n.from&&s.delete(n.from+c,d),u=n.from+c+a.length,s.addMark(n.from+c,u,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}function MF(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}const EF=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,IF=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,PF=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,LF=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,DF=qr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Dn(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Gl({find:EF,type:this.type}),Gl({find:PF,type:this.type})]},addPasteRules(){return[la({find:IF,type:this.type}),la({find:LF,type:this.type})]}}),RF="listItem",OS="textStyle",xS=/^\s*([-+*])\s$/,BF=ki.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Dn(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(RF,this.editor.getAttributes(OS)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Zc({find:xS,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Zc({find:xS,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(OS),editor:this.editor})),[t]}}),NF=/(^|[^`])`([^`]+)`(?!`)/,$F=/(^|[^`])`([^`]+)`(?!`)/g,VF=qr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Dn(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Gl({find:NF,type:this.type})]},addPasteRules(){return[la({find:$F,type:this.type})]}}),zF=ki.create({name:"doc",topNode:!0,content:"block+"});var Ti="top",Wi="bottom",qi="right",Oi="left",Am="auto",Zl=[Ti,Wi,qi,Oi],ua="start",_l="end",FF="clippingParents",MS="viewport",Jl="popper",HF="reference",ES=Zl.reduce(function(t,e){return t.concat([e+"-"+ua,e+"-"+_l])},[]),IS=[].concat(Zl,[Am]).reduce(function(t,e){return t.concat([e,e+"-"+ua,e+"-"+_l])},[]),jF="beforeRead",UF="read",KF="afterRead",WF="beforeMain",qF="main",XF="afterMain",GF="beforeWrite",ZF="write",_F="afterWrite",JF=[jF,UF,KF,WF,qF,XF,GF,ZF,_F];function wr(t){return t?(t.nodeName||"").toLowerCase():null}function Di(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function vs(t){var e=Di(t).Element;return t instanceof e||t instanceof Element}function Xi(t){var e=Di(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function wm(t){if(typeof ShadowRoot>"u")return!1;var e=Di(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function YF(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},r=e.attributes[n]||{},o=e.elements[n];!Xi(o)||!wr(o)||(Object.assign(o.style,i),Object.keys(r).forEach(function(s){var a=r[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function QF(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var r=e.elements[i],o=e.attributes[i]||{},s=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),a=s.reduce(function(l,u){return l[u]="",l},{});!Xi(r)||!wr(r)||(Object.assign(r.style,a),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}}const PS={name:"applyStyles",enabled:!0,phase:"write",fn:YF,effect:QF,requires:["computeStyles"]};function Sr(t){return t.split("-")[0]}var ys=Math.max,_c=Math.min,ca=Math.round;function Sm(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function LS(){return!/^((?!chrome|android).)*safari/i.test(Sm())}function da(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&Xi(t)&&(r=t.offsetWidth>0&&ca(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ca(i.height)/t.offsetHeight||1);var s=vs(t)?Di(t):window,a=s.visualViewport,l=!LS()&&n,u=(i.left+(l&&a?a.offsetLeft:0))/r,c=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,f=i.height/o;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function Cm(t){var e=da(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function DS(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&wm(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Gr(t){return Di(t).getComputedStyle(t)}function eH(t){return["table","td","th"].indexOf(wr(t))>=0}function Do(t){return((vs(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jc(t){return wr(t)==="html"?t:t.assignedSlot||t.parentNode||(wm(t)?t.host:null)||Do(t)}function RS(t){return!Xi(t)||Gr(t).position==="fixed"?null:t.offsetParent}function tH(t){var e=/firefox/i.test(Sm()),n=/Trident/i.test(Sm());if(n&&Xi(t)){var i=Gr(t);if(i.position==="fixed")return null}var r=Jc(t);for(wm(r)&&(r=r.host);Xi(r)&&["html","body"].indexOf(wr(r))<0;){var o=Gr(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function Yl(t){for(var e=Di(t),n=RS(t);n&&eH(n)&&Gr(n).position==="static";)n=RS(n);return n&&(wr(n)==="html"||wr(n)==="body"&&Gr(n).position==="static")?e:n||tH(t)||e}function km(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ql(t,e,n){return ys(t,_c(e,n))}function nH(t,e,n){var i=Ql(t,e,n);return i>n?n:i}function BS(){return{top:0,right:0,bottom:0,left:0}}function NS(t){return Object.assign({},BS(),t)}function $S(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var iH=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,NS(typeof e!="number"?e:$S(e,Zl))};function rH(t){var e,n=t.state,i=t.name,r=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Sr(n.placement),l=km(a),u=[Oi,qi].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!s)){var d=iH(r.padding,n),f=Cm(o),p=l==="y"?Ti:Oi,h=l==="y"?Wi:qi,m=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],v=s[l]-n.rects.reference[l],S=Yl(o),b=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,k=m/2-v/2,A=d[p],w=b-f[c]-d[h],y=b/2-f[c]/2+k,C=Ql(A,y,w),I=l;n.modifiersData[i]=(e={},e[I]=C,e.centerOffset=C-y,e)}}function oH(t){var e=t.state,n=t.options,i=n.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||DS(e.elements.popper,r)&&(e.elements.arrow=r))}const sH={name:"arrow",enabled:!0,phase:"main",fn:rH,effect:oH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fa(t){return t.split("-")[1]}var aH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lH(t,e){var n=t.x,i=t.y,r=e.devicePixelRatio||1;return{x:ca(n*r)/r||0,y:ca(i*r)/r||0}}function VS(t){var e,n=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,f=s.x,p=f===void 0?0:f,h=s.y,m=h===void 0?0:h,v=typeof c=="function"?c({x:p,y:m}):{x:p,y:m};p=v.x,m=v.y;var S=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),k=Oi,A=Ti,w=window;if(u){var y=Yl(n),C="clientHeight",I="clientWidth";if(y===Di(n)&&(y=Do(n),Gr(y).position!=="static"&&a==="absolute"&&(C="scrollHeight",I="scrollWidth")),y=y,r===Ti||(r===Oi||r===qi)&&o===_l){A=Wi;var R=d&&y===w&&w.visualViewport?w.visualViewport.height:y[C];m-=R-i.height,m*=l?1:-1}if(r===Oi||(r===Ti||r===Wi)&&o===_l){k=qi;var M=d&&y===w&&w.visualViewport?w.visualViewport.width:y[I];p-=M-i.width,p*=l?1:-1}}var D=Object.assign({position:a},u&&aH),$=c===!0?lH({x:p,y:m},Di(n)):{x:p,y:m};if(p=$.x,m=$.y,l){var W;return Object.assign({},D,(W={},W[A]=b?"0":"",W[k]=S?"0":"",W.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",W))}return Object.assign({},D,(e={},e[A]=b?m+"px":"",e[k]=S?p+"px":"",e.transform="",e))}function uH(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=i===void 0?!0:i,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:Sr(e.placement),variation:fa(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,VS(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,VS(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const cH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:uH,data:{}};var Yc={passive:!0};function dH(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=r===void 0?!0:r,s=i.resize,a=s===void 0?!0:s,l=Di(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,Yc)}),a&&l.addEventListener("resize",n.update,Yc),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,Yc)}),a&&l.removeEventListener("resize",n.update,Yc)}}const fH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dH,data:{}};var pH={left:"right",right:"left",bottom:"top",top:"bottom"};function Qc(t){return t.replace(/left|right|bottom|top/g,function(e){return pH[e]})}var hH={start:"end",end:"start"};function zS(t){return t.replace(/start|end/g,function(e){return hH[e]})}function Tm(t){var e=Di(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Om(t){return da(Do(t)).left+Tm(t).scrollLeft}function mH(t,e){var n=Di(t),i=Do(t),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var u=LS();(u||!u&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+Om(t),y:l}}function gH(t){var e,n=Do(t),i=Tm(t),r=(e=t.ownerDocument)==null?void 0:e.body,o=ys(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=ys(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+Om(t),l=-i.scrollTop;return Gr(r||n).direction==="rtl"&&(a+=ys(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function xm(t){var e=Gr(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function FS(t){return["html","body","#document"].indexOf(wr(t))>=0?t.ownerDocument.body:Xi(t)&&xm(t)?t:FS(Jc(t))}function eu(t,e){var n;e===void 0&&(e=[]);var i=FS(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),o=Di(i),s=r?[o].concat(o.visualViewport||[],xm(i)?i:[]):i,a=e.concat(s);return r?a:a.concat(eu(Jc(s)))}function Mm(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function vH(t,e){var n=da(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function HS(t,e,n){return e===MS?Mm(mH(t,n)):vs(e)?vH(e,n):Mm(gH(Do(t)))}function yH(t){var e=eu(Jc(t)),n=["absolute","fixed"].indexOf(Gr(t).position)>=0,i=n&&Xi(t)?Yl(t):t;return vs(i)?e.filter(function(r){return vs(r)&&DS(r,i)&&wr(r)!=="body"}):[]}function bH(t,e,n,i){var r=e==="clippingParents"?yH(t):[].concat(e),o=[].concat(r,[n]),s=o[0],a=o.reduce(function(l,u){var c=HS(t,u,i);return l.top=ys(c.top,l.top),l.right=_c(c.right,l.right),l.bottom=_c(c.bottom,l.bottom),l.left=ys(c.left,l.left),l},HS(t,s,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function jS(t){var e=t.reference,n=t.element,i=t.placement,r=i?Sr(i):null,o=i?fa(i):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(r){case Ti:l={x:s,y:e.y-n.height};break;case Wi:l={x:s,y:e.y+e.height};break;case qi:l={x:e.x+e.width,y:a};break;case Oi:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=r?km(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case ua:l[u]=l[u]-(e[c]/2-n[c]/2);break;case _l:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function tu(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=i===void 0?t.placement:i,o=n.strategy,s=o===void 0?t.strategy:o,a=n.boundary,l=a===void 0?FF:a,u=n.rootBoundary,c=u===void 0?MS:u,d=n.elementContext,f=d===void 0?Jl:d,p=n.altBoundary,h=p===void 0?!1:p,m=n.padding,v=m===void 0?0:m,S=NS(typeof v!="number"?v:$S(v,Zl)),b=f===Jl?HF:Jl,k=t.rects.popper,A=t.elements[h?b:f],w=bH(vs(A)?A:A.contextElement||Do(t.elements.popper),l,c,s),y=da(t.elements.reference),C=jS({reference:y,element:k,placement:r}),I=Mm(Object.assign({},k,C)),R=f===Jl?I:y,M={top:w.top-R.top+S.top,bottom:R.bottom-w.bottom+S.bottom,left:w.left-R.left+S.left,right:R.right-w.right+S.right},D=t.modifiersData.offset;if(f===Jl&&D){var $=D[r];Object.keys(M).forEach(function(W){var ie=[qi,Wi].indexOf(W)>=0?1:-1,ve=[Ti,Wi].indexOf(W)>=0?"y":"x";M[W]+=$[ve]*ie})}return M}function AH(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?IS:l,c=fa(i),d=c?a?ES:ES.filter(function(h){return fa(h)===c}):Zl,f=d.filter(function(h){return u.indexOf(h)>=0});f.length===0&&(f=d);var p=f.reduce(function(h,m){return h[m]=tu(t,{placement:m,boundary:r,rootBoundary:o,padding:s})[Sr(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function wH(t){if(Sr(t)===Am)return[];var e=Qc(t);return[zS(t),e,zS(e)]}function SH(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,o=r===void 0?!0:r,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=p===void 0?!0:p,m=n.allowedAutoPlacements,v=e.options.placement,S=Sr(v),b=S===v,k=l||(b||!h?[Qc(v)]:wH(v)),A=[v].concat(k).reduce(function(Ie,Oe){return Ie.concat(Sr(Oe)===Am?AH(e,{placement:Oe,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):Oe)},[]),w=e.rects.reference,y=e.rects.popper,C=new Map,I=!0,R=A[0],M=0;M<A.length;M++){var D=A[M],$=Sr(D),W=fa(D)===ua,ie=[Ti,Wi].indexOf($)>=0,ve=ie?"width":"height",ae=tu(e,{placement:D,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),me=ie?W?qi:Oi:W?Wi:Ti;w[ve]>y[ve]&&(me=Qc(me));var se=Qc(me),Pe=[];if(o&&Pe.push(ae[$]<=0),a&&Pe.push(ae[me]<=0,ae[se]<=0),Pe.every(function(Ie){return Ie})){R=D,I=!1;break}C.set(D,Pe)}if(I)for(var Be=h?3:1,xe=function(Oe){var le=A.find(function(Se){var Z=C.get(Se);if(Z)return Z.slice(0,Oe).every(function(q){return q})});if(le)return R=le,"break"},de=Be;de>0;de--){var ge=xe(de);if(ge==="break")break}e.placement!==R&&(e.modifiersData[i]._skip=!0,e.placement=R,e.reset=!0)}}const CH={name:"flip",enabled:!0,phase:"main",fn:SH,requiresIfExists:["offset"],data:{_skip:!1}};function US(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function KS(t){return[Ti,qi,Wi,Oi].some(function(e){return t[e]>=0})}function kH(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=tu(e,{elementContext:"reference"}),a=tu(e,{altBoundary:!0}),l=US(s,i),u=US(a,r,o),c=KS(l),d=KS(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const TH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:kH};function OH(t,e,n){var i=Sr(t),r=[Oi,Ti].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[Oi,qi].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}function xH(t){var e=t.state,n=t.options,i=t.name,r=n.offset,o=r===void 0?[0,0]:r,s=IS.reduce(function(c,d){return c[d]=OH(d,e.rects,o),c},{}),a=s[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=s}const MH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:xH};function EH(t){var e=t.state,n=t.name;e.modifiersData[n]=jS({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const IH={name:"popperOffsets",enabled:!0,phase:"read",fn:EH,data:{}};function PH(t){return t==="x"?"y":"x"}function LH(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,o=r===void 0?!0:r,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,h=n.tetherOffset,m=h===void 0?0:h,v=tu(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),S=Sr(e.placement),b=fa(e.placement),k=!b,A=km(S),w=PH(A),y=e.modifiersData.popperOffsets,C=e.rects.reference,I=e.rects.popper,R=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,M=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,$={x:0,y:0};if(y){if(o){var W,ie=A==="y"?Ti:Oi,ve=A==="y"?Wi:qi,ae=A==="y"?"height":"width",me=y[A],se=me+v[ie],Pe=me-v[ve],Be=p?-I[ae]/2:0,xe=b===ua?C[ae]:I[ae],de=b===ua?-I[ae]:-C[ae],ge=e.elements.arrow,Ie=p&&ge?Cm(ge):{width:0,height:0},Oe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:BS(),le=Oe[ie],Se=Oe[ve],Z=Ql(0,C[ae],Ie[ae]),q=k?C[ae]/2-Be-Z-le-M.mainAxis:xe-Z-le-M.mainAxis,U=k?-C[ae]/2+Be+Z+Se+M.mainAxis:de+Z+Se+M.mainAxis,J=e.elements.arrow&&Yl(e.elements.arrow),ke=J?A==="y"?J.clientTop||0:J.clientLeft||0:0,He=(W=D==null?void 0:D[A])!=null?W:0,j=me+q-He-ke,he=me+U-He,De=Ql(p?_c(se,j):se,me,p?ys(Pe,he):Pe);y[A]=De,$[A]=De-me}if(a){var nt,St=A==="x"?Ti:Oi,lt=A==="x"?Wi:qi,bt=y[w],jt=w==="y"?"height":"width",ln=bt+v[St],un=bt-v[lt],en=[Ti,Oi].indexOf(S)!==-1,Vt=(nt=D==null?void 0:D[w])!=null?nt:0,Dt=en?ln:bt-C[jt]-I[jt]-Vt+M.altAxis,Sn=en?bt+C[jt]+I[jt]-Vt-M.altAxis:un,Jt=p&&en?nH(Dt,bt,Sn):Ql(p?Dt:ln,bt,p?Sn:un);y[w]=Jt,$[w]=Jt-bt}e.modifiersData[i]=$}}const DH={name:"preventOverflow",enabled:!0,phase:"main",fn:LH,requiresIfExists:["offset"]};function RH(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function BH(t){return t===Di(t)||!Xi(t)?Tm(t):RH(t)}function NH(t){var e=t.getBoundingClientRect(),n=ca(e.width)/t.offsetWidth||1,i=ca(e.height)/t.offsetHeight||1;return n!==1||i!==1}function $H(t,e,n){n===void 0&&(n=!1);var i=Xi(e),r=Xi(e)&&NH(e),o=Do(e),s=da(t,r,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((wr(e)!=="body"||xm(o))&&(a=BH(e)),Xi(e)?(l=da(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Om(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function VH(t){var e=new Map,n=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function r(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&r(l)}}),i.push(o)}return t.forEach(function(o){n.has(o.name)||r(o)}),i}function zH(t){var e=VH(t);return JF.reduce(function(n,i){return n.concat(e.filter(function(r){return r.phase===i}))},[])}function FH(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function HH(t){var e=t.reduce(function(n,i){var r=n[i.name];return n[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var WS={placement:"bottom",modifiers:[],strategy:"absolute"};function qS(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function jH(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,i=n===void 0?[]:n,r=e.defaultOptions,o=r===void 0?WS:r;return function(a,l,u){u===void 0&&(u=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},WS,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:c,setOptions:function(S){var b=typeof S=="function"?S(c.options):S;m(),c.options=Object.assign({},o,c.options,b),c.scrollParents={reference:vs(a)?eu(a):a.contextElement?eu(a.contextElement):[],popper:eu(l)};var k=zH(HH([].concat(i,c.options.modifiers)));return c.orderedModifiers=k.filter(function(A){return A.enabled}),h(),p.update()},forceUpdate:function(){if(!f){var S=c.elements,b=S.reference,k=S.popper;if(qS(b,k)){c.rects={reference:$H(b,Yl(k),c.options.strategy==="fixed"),popper:Cm(k)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(M){return c.modifiersData[M.name]=Object.assign({},M.data)});for(var A=0;A<c.orderedModifiers.length;A++){if(c.reset===!0){c.reset=!1,A=-1;continue}var w=c.orderedModifiers[A],y=w.fn,C=w.options,I=C===void 0?{}:C,R=w.name;typeof y=="function"&&(c=y({state:c,options:I,name:R,instance:p})||c)}}}},update:FH(function(){return new Promise(function(v){p.forceUpdate(),v(c)})}),destroy:function(){m(),f=!0}};if(!qS(a,l))return p;p.setOptions(u).then(function(v){!f&&u.onFirstUpdate&&u.onFirstUpdate(v)});function h(){c.orderedModifiers.forEach(function(v){var S=v.name,b=v.options,k=b===void 0?{}:b,A=v.effect;if(typeof A=="function"){var w=A({state:c,name:S,instance:p,options:k}),y=function(){};d.push(w||y)}})}function m(){d.forEach(function(v){return v()}),d=[]}return p}}var UH=[fH,IH,cH,PS,MH,CH,DH,sH,TH],KH=jH({defaultModifiers:UH}),WH="tippy-box",XS="tippy-content",qH="tippy-backdrop",GS="tippy-arrow",ZS="tippy-svg-arrow",bs={passive:!0,capture:!0},_S=function(){return document.body};function Em(t,e,n){if(Array.isArray(t)){var i=t[e];return i??(Array.isArray(n)?n[e]:n)}return t}function Im(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function JS(t,e){return typeof t=="function"?t.apply(void 0,e):t}function YS(t,e){if(e===0)return t;var n;return function(i){clearTimeout(n),n=setTimeout(function(){t(i)},e)}}function XH(t){return t.split(/\s+/).filter(Boolean)}function pa(t){return[].concat(t)}function QS(t,e){t.indexOf(e)===-1&&t.push(e)}function GH(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function ZH(t){return t.split("-")[0]}function ed(t){return[].slice.call(t)}function e6(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function nu(){return document.createElement("div")}function td(t){return["Element","Fragment"].some(function(e){return Im(t,e)})}function _H(t){return Im(t,"NodeList")}function JH(t){return Im(t,"MouseEvent")}function YH(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function QH(t){return td(t)?[t]:_H(t)?ed(t):Array.isArray(t)?t:ed(document.querySelectorAll(t))}function Pm(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function t6(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function ej(t){var e,n=pa(t),i=n[0];return i!=null&&(e=i.ownerDocument)!=null&&e.body?i.ownerDocument:document}function tj(t,e){var n=e.clientX,i=e.clientY;return t.every(function(r){var o=r.popperRect,s=r.popperState,a=r.props,l=a.interactiveBorder,u=ZH(s.placement),c=s.modifiersData.offset;if(!c)return!0;var d=u==="bottom"?c.top.y:0,f=u==="top"?c.bottom.y:0,p=u==="right"?c.left.x:0,h=u==="left"?c.right.x:0,m=o.top-i+d>l,v=i-o.bottom-f>l,S=o.left-n+p>l,b=n-o.right-h>l;return m||v||S||b})}function Lm(t,e,n){var i=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){t[i](r,n)})}function n6(t,e){for(var n=e;n;){var i;if(t.contains(n))return!0;n=n.getRootNode==null||(i=n.getRootNode())==null?void 0:i.host}return!1}var Cr={isTouch:!1},i6=0;function nj(){Cr.isTouch||(Cr.isTouch=!0,window.performance&&document.addEventListener("mousemove",r6))}function r6(){var t=performance.now();t-i6<20&&(Cr.isTouch=!1,document.removeEventListener("mousemove",r6)),i6=t}function ij(){var t=document.activeElement;if(YH(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function rj(){document.addEventListener("touchstart",nj,bs),window.addEventListener("blur",ij)}var oj=typeof window<"u"&&typeof document<"u",sj=oj?!!window.msCrypto:!1,aj={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},lj={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},lr=Object.assign({appendTo:_S,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},aj,lj),uj=Object.keys(lr),cj=function(e){var n=Object.keys(e);n.forEach(function(i){lr[i]=e[i]})};function o6(t){var e=t.plugins||[],n=e.reduce(function(i,r){var o=r.name,s=r.defaultValue;if(o){var a;i[o]=t[o]!==void 0?t[o]:(a=lr[o])!=null?a:s}return i},{});return Object.assign({},t,n)}function dj(t,e){var n=e?Object.keys(o6(Object.assign({},lr,{plugins:e}))):uj,i=n.reduce(function(r,o){var s=(t.getAttribute("data-tippy-"+o)||"").trim();if(!s)return r;if(o==="content")r[o]=s;else try{r[o]=JSON.parse(s)}catch{r[o]=s}return r},{});return i}function s6(t,e){var n=Object.assign({},e,{content:JS(e.content,[t])},e.ignoreAttributes?{}:dj(t,e.plugins));return n.aria=Object.assign({},lr.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}var fj=function(){return"innerHTML"};function Dm(t,e){t[fj()]=e}function a6(t){var e=nu();return t===!0?e.className=GS:(e.className=ZS,td(t)?e.appendChild(t):Dm(e,t)),e}function l6(t,e){td(e.content)?(Dm(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Dm(t,e.content):t.textContent=e.content)}function Rm(t){var e=t.firstElementChild,n=ed(e.children);return{box:e,content:n.find(function(i){return i.classList.contains(XS)}),arrow:n.find(function(i){return i.classList.contains(GS)||i.classList.contains(ZS)}),backdrop:n.find(function(i){return i.classList.contains(qH)})}}function u6(t){var e=nu(),n=nu();n.className=WH,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=nu();i.className=XS,i.setAttribute("data-state","hidden"),l6(i,t.props),e.appendChild(n),n.appendChild(i),r(t.props,t.props);function r(o,s){var a=Rm(e),l=a.box,u=a.content,c=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&l6(u,t.props),s.arrow?c?o.arrow!==s.arrow&&(l.removeChild(c),l.appendChild(a6(s.arrow))):l.appendChild(a6(s.arrow)):c&&l.removeChild(c)}return{popper:e,onUpdate:r}}u6.$$tippy=!0;var pj=1,nd=[],Bm=[];function hj(t,e){var n=s6(t,Object.assign({},lr,o6(e6(e)))),i,r,o,s=!1,a=!1,l=!1,u=!1,c,d,f,p=[],h=YS(j,n.interactiveDebounce),m,v=pj++,S=null,b=GH(n.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},A={id:v,reference:t,popper:nu(),popperInstance:S,props:n,state:k,plugins:b,clearDelayTimeouts:Dt,setProps:Sn,setContent:Jt,show:ee,hide:Y,hideWithInteractivity:we,enable:en,disable:Vt,unmount:je,destroy:st};if(!n.render)return A;var w=n.render(A),y=w.popper,C=w.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+A.id,A.popper=y,t._tippy=A,y._tippy=A;var I=b.map(function(ne){return ne.fn(A)}),R=t.hasAttribute("aria-expanded");return J(),Be(),me(),se("onCreate",[A]),n.showOnCreate&&ln(),y.addEventListener("mouseenter",function(){A.props.interactive&&A.state.isVisible&&A.clearDelayTimeouts()}),y.addEventListener("mouseleave",function(){A.props.interactive&&A.props.trigger.indexOf("mouseenter")>=0&&ie().addEventListener("mousemove",h)}),A;function M(){var ne=A.props.touch;return Array.isArray(ne)?ne:[ne,0]}function D(){return M()[0]==="hold"}function $(){var ne;return!!((ne=A.props.render)!=null&&ne.$$tippy)}function W(){return m||t}function ie(){var ne=W().parentNode;return ne?ej(ne):document}function ve(){return Rm(y)}function ae(ne){return A.state.isMounted&&!A.state.isVisible||Cr.isTouch||c&&c.type==="focus"?0:Em(A.props.delay,ne?0:1,lr.delay)}function me(ne){ne===void 0&&(ne=!1),y.style.pointerEvents=A.props.interactive&&!ne?"":"none",y.style.zIndex=""+A.props.zIndex}function se(ne,be,Ue){if(Ue===void 0&&(Ue=!0),I.forEach(function(rt){rt[ne]&&rt[ne].apply(rt,be)}),Ue){var ut;(ut=A.props)[ne].apply(ut,be)}}function Pe(){var ne=A.props.aria;if(ne.content){var be="aria-"+ne.content,Ue=y.id,ut=pa(A.props.triggerTarget||t);ut.forEach(function(rt){var gt=rt.getAttribute(be);if(A.state.isVisible)rt.setAttribute(be,gt?gt+" "+Ue:Ue);else{var zt=gt&>.replace(Ue,"").trim();zt?rt.setAttribute(be,zt):rt.removeAttribute(be)}})}}function Be(){if(!(R||!A.props.aria.expanded)){var ne=pa(A.props.triggerTarget||t);ne.forEach(function(be){A.props.interactive?be.setAttribute("aria-expanded",A.state.isVisible&&be===W()?"true":"false"):be.removeAttribute("aria-expanded")})}}function xe(){ie().removeEventListener("mousemove",h),nd=nd.filter(function(ne){return ne!==h})}function de(ne){if(!(Cr.isTouch&&(l||ne.type==="mousedown"))){var be=ne.composedPath&&ne.composedPath()[0]||ne.target;if(!(A.props.interactive&&n6(y,be))){if(pa(A.props.triggerTarget||t).some(function(Ue){return n6(Ue,be)})){if(Cr.isTouch||A.state.isVisible&&A.props.trigger.indexOf("click")>=0)return}else se("onClickOutside",[A,ne]);A.props.hideOnClick===!0&&(A.clearDelayTimeouts(),A.hide(),a=!0,setTimeout(function(){a=!1}),A.state.isMounted||le())}}}function ge(){l=!0}function Ie(){l=!1}function Oe(){var ne=ie();ne.addEventListener("mousedown",de,!0),ne.addEventListener("touchend",de,bs),ne.addEventListener("touchstart",Ie,bs),ne.addEventListener("touchmove",ge,bs)}function le(){var ne=ie();ne.removeEventListener("mousedown",de,!0),ne.removeEventListener("touchend",de,bs),ne.removeEventListener("touchstart",Ie,bs),ne.removeEventListener("touchmove",ge,bs)}function Se(ne,be){q(ne,function(){!A.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&be()})}function Z(ne,be){q(ne,be)}function q(ne,be){var Ue=ve().box;function ut(rt){rt.target===Ue&&(Lm(Ue,"remove",ut),be())}if(ne===0)return be();Lm(Ue,"remove",d),Lm(Ue,"add",ut),d=ut}function U(ne,be,Ue){Ue===void 0&&(Ue=!1);var ut=pa(A.props.triggerTarget||t);ut.forEach(function(rt){rt.addEventListener(ne,be,Ue),p.push({node:rt,eventType:ne,handler:be,options:Ue})})}function J(){D()&&(U("touchstart",He,{passive:!0}),U("touchend",he,{passive:!0})),XH(A.props.trigger).forEach(function(ne){if(ne!=="manual")switch(U(ne,He),ne){case"mouseenter":U("mouseleave",he);break;case"focus":U(sj?"focusout":"blur",De);break;case"focusin":U("focusout",De);break}})}function ke(){p.forEach(function(ne){var be=ne.node,Ue=ne.eventType,ut=ne.handler,rt=ne.options;be.removeEventListener(Ue,ut,rt)}),p=[]}function He(ne){var be,Ue=!1;if(!(!A.state.isEnabled||nt(ne)||a)){var ut=((be=c)==null?void 0:be.type)==="focus";c=ne,m=ne.currentTarget,Be(),!A.state.isVisible&&JH(ne)&&nd.forEach(function(rt){return rt(ne)}),ne.type==="click"&&(A.props.trigger.indexOf("mouseenter")<0||s)&&A.props.hideOnClick!==!1&&A.state.isVisible?Ue=!0:ln(ne),ne.type==="click"&&(s=!Ue),Ue&&!ut&&un(ne)}}function j(ne){var be=ne.target,Ue=W().contains(be)||y.contains(be);if(!(ne.type==="mousemove"&&Ue)){var ut=jt().concat(y).map(function(rt){var gt,zt=rt._tippy,rn=(gt=zt.popperInstance)==null?void 0:gt.state;return rn?{popperRect:rt.getBoundingClientRect(),popperState:rn,props:n}:null}).filter(Boolean);tj(ut,ne)&&(xe(),un(ne))}}function he(ne){var be=nt(ne)||A.props.trigger.indexOf("click")>=0&&s;if(!be){if(A.props.interactive){A.hideWithInteractivity(ne);return}un(ne)}}function De(ne){A.props.trigger.indexOf("focusin")<0&&ne.target!==W()||A.props.interactive&&ne.relatedTarget&&y.contains(ne.relatedTarget)||un(ne)}function nt(ne){return Cr.isTouch?D()!==ne.type.indexOf("touch")>=0:!1}function St(){lt();var ne=A.props,be=ne.popperOptions,Ue=ne.placement,ut=ne.offset,rt=ne.getReferenceClientRect,gt=ne.moveTransition,zt=$()?Rm(y).arrow:null,rn=rt?{getBoundingClientRect:rt,contextElement:rt.contextElement||W()}:t,cn={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(fe){var Re=fe.state;if($()){var at=ve(),Yt=at.box;["placement","reference-hidden","escaped"].forEach(function(_t){_t==="placement"?Yt.setAttribute("data-placement",Re.placement):Re.attributes.popper["data-popper-"+_t]?Yt.setAttribute("data-"+_t,""):Yt.removeAttribute("data-"+_t)}),Re.attributes.popper={}}}},pn=[{name:"offset",options:{offset:ut}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!gt}},cn];$()&&zt&&pn.push({name:"arrow",options:{element:zt,padding:3}}),pn.push.apply(pn,(be==null?void 0:be.modifiers)||[]),A.popperInstance=KH(rn,y,Object.assign({},be,{placement:Ue,onFirstUpdate:f,modifiers:pn}))}function lt(){A.popperInstance&&(A.popperInstance.destroy(),A.popperInstance=null)}function bt(){var ne=A.props.appendTo,be,Ue=W();A.props.interactive&&ne===_S||ne==="parent"?be=Ue.parentNode:be=JS(ne,[Ue]),be.contains(y)||be.appendChild(y),A.state.isMounted=!0,St()}function jt(){return ed(y.querySelectorAll("[data-tippy-root]"))}function ln(ne){A.clearDelayTimeouts(),ne&&se("onTrigger",[A,ne]),Oe();var be=ae(!0),Ue=M(),ut=Ue[0],rt=Ue[1];Cr.isTouch&&ut==="hold"&&rt&&(be=rt),be?i=setTimeout(function(){A.show()},be):A.show()}function un(ne){if(A.clearDelayTimeouts(),se("onUntrigger",[A,ne]),!A.state.isVisible){le();return}if(!(A.props.trigger.indexOf("mouseenter")>=0&&A.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(ne.type)>=0&&s)){var be=ae(!1);be?r=setTimeout(function(){A.state.isVisible&&A.hide()},be):o=requestAnimationFrame(function(){A.hide()})}}function en(){A.state.isEnabled=!0}function Vt(){A.hide(),A.state.isEnabled=!1}function Dt(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)}function Sn(ne){if(!A.state.isDestroyed){se("onBeforeUpdate",[A,ne]),ke();var be=A.props,Ue=s6(t,Object.assign({},be,e6(ne),{ignoreAttributes:!0}));A.props=Ue,J(),be.interactiveDebounce!==Ue.interactiveDebounce&&(xe(),h=YS(j,Ue.interactiveDebounce)),be.triggerTarget&&!Ue.triggerTarget?pa(be.triggerTarget).forEach(function(ut){ut.removeAttribute("aria-expanded")}):Ue.triggerTarget&&t.removeAttribute("aria-expanded"),Be(),me(),C&&C(be,Ue),A.popperInstance&&(St(),jt().forEach(function(ut){requestAnimationFrame(ut._tippy.popperInstance.forceUpdate)})),se("onAfterUpdate",[A,ne])}}function Jt(ne){A.setProps({content:ne})}function ee(){var ne=A.state.isVisible,be=A.state.isDestroyed,Ue=!A.state.isEnabled,ut=Cr.isTouch&&!A.props.touch,rt=Em(A.props.duration,0,lr.duration);if(!(ne||be||Ue||ut)&&!W().hasAttribute("disabled")&&(se("onShow",[A],!1),A.props.onShow(A)!==!1)){if(A.state.isVisible=!0,$()&&(y.style.visibility="visible"),me(),Oe(),A.state.isMounted||(y.style.transition="none"),$()){var gt=ve(),zt=gt.box,rn=gt.content;Pm([zt,rn],0)}f=function(){var pn;if(!(!A.state.isVisible||u)){if(u=!0,y.offsetHeight,y.style.transition=A.props.moveTransition,$()&&A.props.animation){var z=ve(),fe=z.box,Re=z.content;Pm([fe,Re],rt),t6([fe,Re],"visible")}Pe(),Be(),QS(Bm,A),(pn=A.popperInstance)==null||pn.forceUpdate(),se("onMount",[A]),A.props.animation&&$()&&Z(rt,function(){A.state.isShown=!0,se("onShown",[A])})}},bt()}}function Y(){var ne=!A.state.isVisible,be=A.state.isDestroyed,Ue=!A.state.isEnabled,ut=Em(A.props.duration,1,lr.duration);if(!(ne||be||Ue)&&(se("onHide",[A],!1),A.props.onHide(A)!==!1)){if(A.state.isVisible=!1,A.state.isShown=!1,u=!1,s=!1,$()&&(y.style.visibility="hidden"),xe(),le(),me(!0),$()){var rt=ve(),gt=rt.box,zt=rt.content;A.props.animation&&(Pm([gt,zt],ut),t6([gt,zt],"hidden"))}Pe(),Be(),A.props.animation?$()&&Se(ut,A.unmount):A.unmount()}}function we(ne){ie().addEventListener("mousemove",h),QS(nd,h),h(ne)}function je(){A.state.isVisible&&A.hide(),A.state.isMounted&&(lt(),jt().forEach(function(ne){ne._tippy.unmount()}),y.parentNode&&y.parentNode.removeChild(y),Bm=Bm.filter(function(ne){return ne!==A}),A.state.isMounted=!1,se("onHidden",[A]))}function st(){A.state.isDestroyed||(A.clearDelayTimeouts(),A.unmount(),ke(),delete t._tippy,A.state.isDestroyed=!0,se("onDestroy",[A]))}}function As(t,e){e===void 0&&(e={});var n=lr.plugins.concat(e.plugins||[]);rj();var i=Object.assign({},e,{plugins:n}),r=QH(t),o=r.reduce(function(s,a){var l=a&&hj(a,i);return l&&s.push(l),s},[]);return td(t)?o[0]:o}As.defaultProps=lr,As.setDefaultProps=cj,As.currentInput=Cr,Object.assign({},PS,{effect:function(e){var n=e.state,i={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,i.popper),n.styles=i,n.elements.arrow&&Object.assign(n.elements.arrow.style,i.arrow)}}),As.setDefaultProps({render:u6});class mj{getTextContent(e){return wS(e,{textSerializers:dm(this.editor.schema)})}constructor({editor:e,element:n,view:i,tippyOptions:r={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a})=>{const{selection:l}=a,{$anchor:u,empty:c}=l,d=u.depth===1,f=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!s.hasFocus()||!c||!d||!f||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;if(this.preventHide){this.preventHide=!1;return}s!=null&&s.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(s.relatedTarget))||(s==null?void 0:s.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=e,this.element=n,this.view=i,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=As(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){var i,r,o;const{state:s}=e,{doc:a,selection:l}=s,{from:u,to:c}=l;if(n&&n.doc.eq(a)&&n.selection.eq(l))return;if(this.createTooltip(),!((i=this.shouldShow)===null||i===void 0?void 0:i.call(this,{editor:this.editor,view:e,state:s,oldState:n}))){this.hide();return}(r=this.tippy)===null||r===void 0||r.setProps({getReferenceClientRect:((o=this.tippyOptions)===null||o===void 0?void 0:o.getReferenceClientRect)||(()=>kS(e,u,c))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const c6=t=>new Kn({key:typeof t.pluginKey=="string"?new Yn(t.pluginKey):t.pluginKey,view:e=>new mj({view:e,...t})}),gj=vi.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[c6({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),vj=ki.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Dn(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>OF({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var id=200,qn=function(){};qn.prototype.append=function(e){return e.length?(e=qn.from(e),!this.length&&e||e.length<id&&this.leafAppend(e)||this.length<id&&e.leafPrepend(this)||this.appendInner(e)):this},qn.prototype.prepend=function(e){return e.length?qn.from(e).append(this):this},qn.prototype.appendInner=function(e){return new yj(this,e)},qn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?qn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},qn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},qn.prototype.forEach=function(e,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length),n<=i?this.forEachInner(e,n,i,0):this.forEachInvertedInner(e,n,i,0)},qn.prototype.map=function(e,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length);var r=[];return this.forEach(function(o,s){return r.push(e(o,s))},n,i),r},qn.from=function(e){return e instanceof qn?e:e&&e.length?new d6(e):qn.empty};var d6=function(t){function e(i){t.call(this),this.values=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,o){return r==0&&o==this.length?this:new e(this.values.slice(r,o))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,o,s,a){for(var l=o;l<s;l++)if(r(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,s,a){for(var l=o-1;l>=s;l--)if(r(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=id)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=id)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(qn);qn.empty=new d6([]);var yj=function(t){function e(n,i){t.call(this),this.left=n,this.right=i,this.length=n.length+i.length,this.depth=Math.max(n.depth,i.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(i){return i<this.left.length?this.left.get(i):this.right.get(i-this.left.length)},e.prototype.forEachInner=function(i,r,o,s){var a=this.left.length;if(r<a&&this.left.forEachInner(i,r,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(i,Math.max(r-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,r,o,s){var a=this.left.length;if(r>a&&this.right.forEachInvertedInner(i,r-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(i,Math.min(r,a),o,s)===!1)return!1},e.prototype.sliceInner=function(i,r){if(i==0&&r==this.length)return this;var o=this.left.length;return r<=o?this.left.slice(i,r):i>=o?this.right.slice(i-o,r-o):this.left.slice(i,o).append(this.right.slice(0,r-o))},e.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new e(r,this.right)},e.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new e(this.left,new e(this.right,i)):new e(this,i)},e}(qn);const bj=500;class ur{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let r,o;n&&(r=this.remapping(i,this.items.length),o=r.maps.length);let s=e.tr,a,l,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){r||(r=this.remapping(i,f+1),o=r.maps.length),o--,c.push(d);return}if(r){c.push(new kr(d.map));let p=d.step.map(r.slice(o)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],u.push(new kr(h,void 0,void 0,u.length+c.length))),o--,h&&r.appendMap(h,o)}else s.maybeStep(d.step);if(d.selection)return a=r?d.selection.map(r.slice(o)):d.selection,l=new ur(this.items.slice(0,i).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,n,i,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let c=0;c<e.steps.length;c++){let d=e.steps[c].invert(e.docs[c]),f=new kr(e.mapping.maps[c],d,n),p;(p=l&&l.merge(f))&&(f=p,c?o.pop():a=a.slice(0,a.length-1)),o.push(f),n&&(s++,n=void 0),r||(l=f)}let u=s-i.depth;return u>wj&&(a=Aj(a,u),s-=u),new ur(a.append(o),s)}remapping(e,n){let i=new Dl;return this.items.forEach((r,o)=>{let s=r.mirrorOffset!=null&&o-r.mirrorOffset>=e?i.maps.length-r.mirrorOffset:void 0;i.appendMap(r.map,s)},e,n),i}addMaps(e){return this.eventCount==0?this:new ur(this.items.append(e.map(n=>new kr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},r);let l=n;this.items.forEach(f=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let h=o.maps[p];if(f.step){let m=e.steps[p].invert(e.docs[p]),v=f.selection&&f.selection.map(o.slice(l+1,p));v&&a++,i.push(new kr(h,m,v))}else i.push(new kr(h))},r);let u=[];for(let f=n;f<s;f++)u.push(new kr(o.maps[f]));let c=this.items.slice(0,r).append(u).append(i),d=new ur(c,a);return d.emptyItemCount()>bj&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),i=n.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)r.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(i)),u=l&&l.getMap();if(i--,u&&n.appendMap(u,i),l){let c=s.selection&&s.selection.map(n.slice(i));c&&o++;let d=new kr(u.invert(),l,c),f,p=r.length-1;(f=r.length&&r[p].merge(d))?r[p]=f:r.push(d)}}else s.map&&i--},this.items.length,0),new ur(qn.from(r.reverse()),o)}}ur.empty=new ur(qn.empty,0);function Aj(t,e){let n;return t.forEach((i,r)=>{if(i.selection&&e--==0)return n=r,!1}),t.slice(n)}class kr{constructor(e,n,i,r){this.map=e,this.step=n,this.selection=i,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new kr(n.getMap().invert(),n,this.selection)}}}class Ro{constructor(e,n,i,r,o){this.done=e,this.undone=n,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}}const wj=20;function Sj(t,e,n,i){let r=n.getMeta(ws),o;if(r)return r.historyState;n.getMeta(Tj)&&(t=new Ro(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(ws))return s.getMeta(ws).redo?new Ro(t.done.addTransform(n,void 0,i,rd(e)),t.undone,f6(n.mapping.maps),t.prevTime,t.prevComposition):new Ro(t.done,t.undone.addTransform(n,void 0,i,rd(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-i.newGroupDelay||!Cj(n,t.prevRanges)),u=s?Nm(t.prevRanges,n.mapping):f6(n.mapping.maps);return new Ro(t.done.addTransform(n,l?e.selection.getBookmark():void 0,i,rd(e)),ur.empty,u,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new Ro(t.done.rebased(n,o),t.undone.rebased(n,o),Nm(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Ro(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Nm(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Cj(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((i,r)=>{for(let o=0;o<e.length;o+=2)i<=e[o+1]&&r>=e[o]&&(n=!0)}),n}function f6(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((i,r,o,s)=>e.push(o,s));return e}function Nm(t,e){if(!t)return null;let n=[];for(let i=0;i<t.length;i+=2){let r=e.map(t[i],1),o=e.map(t[i+1],-1);r<=o&&n.push(r,o)}return n}function kj(t,e,n){let i=rd(e),r=ws.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,i);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),r,i),l=new Ro(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(ws,{redo:n,historyState:l})}let $m=!1,p6=null;function rd(t){let e=t.plugins;if(p6!=e){$m=!1,p6=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){$m=!0;break}}return $m}const ws=new Yn("history"),Tj=new Yn("closeHistory");function Oj(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Kn({key:ws,state:{init(){return new Ro(ur.empty,ur.empty,null,0,-1)},apply(e,n,i){return Sj(n,i,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let i=n.inputType,r=i=="historyUndo"?m6:i=="historyRedo"?g6:null;return r?(n.preventDefault(),r(e.state,e.dispatch)):!1}}}})}function h6(t,e){return(n,i)=>{let r=ws.getState(n);if(!r||(t?r.undone:r.done).eventCount==0)return!1;if(i){let o=kj(r,n,t);o&&i(e?o.scrollIntoView():o)}return!0}}const m6=h6(!1,!0),g6=h6(!0,!0),xj=vi.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>m6(t,e),redo:()=>({state:t,dispatch:e})=>g6(t,e)}},addProseMirrorPlugins(){return[Oj(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Mj=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Ej=ki.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",Dn(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[TF({find:Mj,type:this.type,getAttributes:t=>{const[,,e,n,i]=t;return{src:n,alt:e,title:i}}})]}}),Ij=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Pj=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Lj=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Dj=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Rj=qr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Dn(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Gl({find:Ij,type:this.type}),Gl({find:Lj,type:this.type})]},addPasteRules(){return[la({find:Pj,type:this.type}),la({find:Dj,type:this.type})]}}),Bj="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Nj="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",ha=(t,e)=>{for(const n in e)t[n]=e[n];return t},Vm="numeric",zm="ascii",Fm="alpha",iu="asciinumeric",ru="alphanumeric",Hm="domain",v6="emoji",$j="scheme",Vj="slashscheme",jm="whitespace";function zj(t,e){return t in e||(e[t]=[]),e[t]}function Ss(t,e,n){e[Vm]&&(e[iu]=!0,e[ru]=!0),e[zm]&&(e[iu]=!0,e[Fm]=!0),e[iu]&&(e[ru]=!0),e[Fm]&&(e[ru]=!0),e[ru]&&(e[Hm]=!0),e[v6]&&(e[Hm]=!0);for(const i in e){const r=zj(i,n);r.indexOf(t)<0&&r.push(t)}}function Fj(t,e){const n={};for(const i in e)e[i].indexOf(t)>=0&&(n[i]=!0);return n}function xi(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}xi.groups={},xi.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let i=0;i<e.jr.length;i++){const r=e.jr[i][0],o=e.jr[i][1];if(o&&r.test(t))return o}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,i){for(let r=0;r<t.length;r++)this.tt(t[r],e,n,i)},tr(t,e,n,i){i=i||xi.groups;let r;return e&&e.j?r=e:(r=new xi(e),n&&i&&Ss(e,n,i)),this.jr.push([t,r]),r},ts(t,e,n,i){let r=this;const o=t.length;if(!o)return r;for(let s=0;s<o-1;s++)r=r.tt(t[s]);return r.tt(t[o-1],e,n,i)},tt(t,e,n,i){i=i||xi.groups;const r=this;if(e&&e.j)return r.j[t]=e,e;const o=e;let s,a=r.go(t);if(a?(s=new xi,ha(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new xi,o){if(i)if(s.t&&typeof s.t=="string"){const l=ha(Fj(s.t,i),n);Ss(o,l,i)}else n&&Ss(o,n,i);s.t=o}return r.j[t]=s,s}};const Tt=(t,e,n,i,r)=>t.ta(e,n,i,r),Mn=(t,e,n,i,r)=>t.tr(e,n,i,r),y6=(t,e,n,i,r)=>t.ts(e,n,i,r),Le=(t,e,n,i,r)=>t.tt(e,n,i,r),Zr="WORD",Um="UWORD",b6="ASCIINUMERICAL",A6="ALPHANUMERICAL",ou="LOCALHOST",Km="TLD",Wm="UTLD",od="SCHEME",ma="SLASH_SCHEME",qm="NUM",Xm="WS",Gm="NL",su="OPENBRACE",au="CLOSEBRACE",sd="OPENBRACKET",ad="CLOSEBRACKET",ld="OPENPAREN",ud="CLOSEPAREN",cd="OPENANGLEBRACKET",dd="CLOSEANGLEBRACKET",fd="FULLWIDTHLEFTPAREN",pd="FULLWIDTHRIGHTPAREN",hd="LEFTCORNERBRACKET",md="RIGHTCORNERBRACKET",gd="LEFTWHITECORNERBRACKET",vd="RIGHTWHITECORNERBRACKET",yd="FULLWIDTHLESSTHAN",bd="FULLWIDTHGREATERTHAN",Ad="AMPERSAND",Zm="APOSTROPHE",wd="ASTERISK",Bo="AT",Sd="BACKSLASH",Cd="BACKTICK",kd="CARET",No="COLON",_m="COMMA",Td="DOLLAR",Tr="DOT",Od="EQUALS",Jm="EXCLAMATION",Gi="HYPHEN",lu="PERCENT",xd="PIPE",Md="PLUS",Ed="POUND",uu="QUERY",Ym="QUOTE",w6="FULLWIDTHMIDDLEDOT",Qm="SEMI",Or="SLASH",cu="TILDE",Id="UNDERSCORE",S6="EMOJI",Pd="SYM";var C6=Object.freeze({__proto__:null,WORD:Zr,UWORD:Um,ASCIINUMERICAL:b6,ALPHANUMERICAL:A6,LOCALHOST:ou,TLD:Km,UTLD:Wm,SCHEME:od,SLASH_SCHEME:ma,NUM:qm,WS:Xm,NL:Gm,OPENBRACE:su,CLOSEBRACE:au,OPENBRACKET:sd,CLOSEBRACKET:ad,OPENPAREN:ld,CLOSEPAREN:ud,OPENANGLEBRACKET:cd,CLOSEANGLEBRACKET:dd,FULLWIDTHLEFTPAREN:fd,FULLWIDTHRIGHTPAREN:pd,LEFTCORNERBRACKET:hd,RIGHTCORNERBRACKET:md,LEFTWHITECORNERBRACKET:gd,RIGHTWHITECORNERBRACKET:vd,FULLWIDTHLESSTHAN:yd,FULLWIDTHGREATERTHAN:bd,AMPERSAND:Ad,APOSTROPHE:Zm,ASTERISK:wd,AT:Bo,BACKSLASH:Sd,BACKTICK:Cd,CARET:kd,COLON:No,COMMA:_m,DOLLAR:Td,DOT:Tr,EQUALS:Od,EXCLAMATION:Jm,HYPHEN:Gi,PERCENT:lu,PIPE:xd,PLUS:Md,POUND:Ed,QUERY:uu,QUOTE:Ym,FULLWIDTHMIDDLEDOT:w6,SEMI:Qm,SLASH:Or,TILDE:cu,UNDERSCORE:Id,EMOJI:S6,SYM:Pd});const _r=/[a-z]/,du=new RegExp("\\p{L}","u"),eg=new RegExp("\\p{Emoji}","u"),Jr=/\d/,tg=/\s/,k6="\r",ng=`
|
|
321
|
+
`,Hj="️",jj="",ig="";let Ld=null,Dd=null;function Uj(t=[]){const e={};xi.groups=e;const n=new xi;Ld==null&&(Ld=O6(Bj)),Dd==null&&(Dd=O6(Nj)),Le(n,"'",Zm),Le(n,"{",su),Le(n,"}",au),Le(n,"[",sd),Le(n,"]",ad),Le(n,"(",ld),Le(n,")",ud),Le(n,"<",cd),Le(n,">",dd),Le(n,"(",fd),Le(n,")",pd),Le(n,"「",hd),Le(n,"」",md),Le(n,"『",gd),Le(n,"』",vd),Le(n,"<",yd),Le(n,">",bd),Le(n,"&",Ad),Le(n,"*",wd),Le(n,"@",Bo),Le(n,"`",Cd),Le(n,"^",kd),Le(n,":",No),Le(n,",",_m),Le(n,"$",Td),Le(n,".",Tr),Le(n,"=",Od),Le(n,"!",Jm),Le(n,"-",Gi),Le(n,"%",lu),Le(n,"|",xd),Le(n,"+",Md),Le(n,"#",Ed),Le(n,"?",uu),Le(n,'"',Ym),Le(n,"/",Or),Le(n,";",Qm),Le(n,"~",cu),Le(n,"_",Id),Le(n,"\\",Sd),Le(n,"・",w6);const i=Mn(n,Jr,qm,{[Vm]:!0});Mn(i,Jr,i);const r=Mn(i,_r,b6,{[iu]:!0}),o=Mn(i,du,A6,{[ru]:!0}),s=Mn(n,_r,Zr,{[zm]:!0});Mn(s,Jr,r),Mn(s,_r,s),Mn(r,Jr,r),Mn(r,_r,r);const a=Mn(n,du,Um,{[Fm]:!0});Mn(a,_r),Mn(a,Jr,o),Mn(a,du,a),Mn(o,Jr,o),Mn(o,_r),Mn(o,du,o);const l=Le(n,ng,Gm,{[jm]:!0}),u=Le(n,k6,Xm,{[jm]:!0}),c=Mn(n,tg,Xm,{[jm]:!0});Le(n,ig,c),Le(u,ng,l),Le(u,ig,c),Mn(u,tg,c),Le(c,k6),Le(c,ng),Mn(c,tg,c),Le(c,ig,c);const d=Mn(n,eg,S6,{[v6]:!0});Le(d,"#"),Mn(d,eg,d),Le(d,Hj,d);const f=Le(d,jj);Le(f,"#"),Mn(f,eg,d);const p=[[_r,s],[Jr,r]],h=[[_r,null],[du,a],[Jr,o]];for(let m=0;m<Ld.length;m++)$o(n,Ld[m],Km,Zr,p);for(let m=0;m<Dd.length;m++)$o(n,Dd[m],Wm,Um,h);Ss(Km,{tld:!0,ascii:!0},e),Ss(Wm,{utld:!0,alpha:!0},e),$o(n,"file",od,Zr,p),$o(n,"mailto",od,Zr,p),$o(n,"http",ma,Zr,p),$o(n,"https",ma,Zr,p),$o(n,"ftp",ma,Zr,p),$o(n,"ftps",ma,Zr,p),Ss(od,{scheme:!0,ascii:!0},e),Ss(ma,{slashscheme:!0,ascii:!0},e),t=t.sort((m,v)=>m[0]>v[0]?1:-1);for(let m=0;m<t.length;m++){const v=t[m][0],b=t[m][1]?{[$j]:!0}:{[Vj]:!0};v.indexOf("-")>=0?b[Hm]=!0:_r.test(v)?Jr.test(v)?b[iu]=!0:b[zm]=!0:b[Vm]=!0,y6(n,v,v,b)}return y6(n,"localhost",ou,{ascii:!0}),n.jd=new xi(Pd),{start:n,tokens:ha({groups:e},C6)}}function T6(t,e){const n=Kj(e.replace(/[A-Z]/g,a=>a.toLowerCase())),i=n.length,r=[];let o=0,s=0;for(;s<i;){let a=t,l=null,u=0,c=null,d=-1,f=-1;for(;s<i&&(l=a.go(n[s]));)a=l,a.accepts()?(d=0,f=0,c=a):d>=0&&(d+=n[s].length,f++),u+=n[s].length,o+=n[s].length,s++;o-=d,s-=f,u-=d,r.push({t:c.t,v:e.slice(o-u,o),s:o-u,e:o})}return r}function Kj(t){const e=[],n=t.length;let i=0;for(;i<n;){let r=t.charCodeAt(i),o,s=r<55296||r>56319||i+1===n||(o=t.charCodeAt(i+1))<56320||o>57343?t[i]:t.slice(i,i+2);e.push(s),i+=s.length}return e}function $o(t,e,n,i,r){let o;const s=e.length;for(let a=0;a<s-1;a++){const l=e[a];t.j[l]?o=t.j[l]:(o=new xi(i),o.jr=r.slice(),t.j[l]=o),t=o}return o=new xi(n),o.jr=r.slice(),t.j[e[s-1]]=o,o}function O6(t){const e=[],n=[];let i=0,r="0123456789";for(;i<t.length;){let o=0;for(;r.indexOf(t[i+o])>=0;)o++;if(o>0){e.push(n.join(""));for(let s=parseInt(t.substring(i,i+o),10);s>0;s--)n.pop();i+=o}else n.push(t[i]),i++}return e}const fu={defaultProtocol:"http",events:null,format:x6,formatHref:x6,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function rg(t,e=null){let n=ha({},fu);t&&(n=ha(n,t instanceof rg?t.o:t));const i=n.ignoreTags,r=[];for(let o=0;o<i.length;o++)r.push(i[o].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=r}rg.prototype={o:fu,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const i=e!=null;let r=this.o[t];return r&&(typeof r=="object"?(r=n.t in r?r[n.t]:fu[t],typeof r=="function"&&i&&(r=r(e,n))):typeof r=="function"&&i&&(r=r(e,n.t,n)),r)},getObj(t,e,n){let i=this.o[t];return typeof i=="function"&&e!=null&&(i=i(e,n.t,n)),i},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function x6(t){return t}function M6(t,e){this.t="token",this.v=t,this.tk=e}M6.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),i=t.get("format",e,this);return n&&i.length>n?i.substring(0,n)+"…":i},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=fu.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),i=t.get("formatHref",n,this),r=t.get("tagName",n,e),o=this.toFormattedString(t),s={},a=t.get("className",n,e),l=t.get("target",n,e),u=t.get("rel",n,e),c=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return s.href=i,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),c&&ha(s,c),{tagName:r,attributes:s,content:o,eventListeners:d}}};function Rd(t,e){class n extends M6{constructor(r,o){super(r,o),this.t=t}}for(const i in e)n.prototype[i]=e[i];return n.t=t,n}const E6=Rd("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),I6=Rd("text"),Wj=Rd("nl"),Bd=Rd("url",{isLink:!0,toHref(t=fu.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==ou&&t[1].t===No}}),Zi=t=>new xi(t);function qj({groups:t}){const e=t.domain.concat([Ad,wd,Bo,Sd,Cd,kd,Td,Od,Gi,qm,lu,xd,Md,Ed,Or,Pd,cu,Id]),n=[No,_m,Tr,Jm,lu,uu,Ym,Qm,cd,dd,su,au,ad,sd,ld,ud,fd,pd,hd,md,gd,vd,yd,bd],i=[Ad,Zm,wd,Sd,Cd,kd,Td,Od,Gi,su,au,lu,xd,Md,Ed,uu,Or,Pd,cu,Id],r=Zi(),o=Le(r,cu);Tt(o,i,o),Tt(o,t.domain,o);const s=Zi(),a=Zi(),l=Zi();Tt(r,t.domain,s),Tt(r,t.scheme,a),Tt(r,t.slashscheme,l),Tt(s,i,o),Tt(s,t.domain,s);const u=Le(s,Bo);Le(o,Bo,u),Le(a,Bo,u),Le(l,Bo,u);const c=Le(o,Tr);Tt(c,i,o),Tt(c,t.domain,o);const d=Zi();Tt(u,t.domain,d),Tt(d,t.domain,d);const f=Le(d,Tr);Tt(f,t.domain,d);const p=Zi(E6);Tt(f,t.tld,p),Tt(f,t.utld,p),Le(u,ou,p);const h=Le(d,Gi);Le(h,Gi,h),Tt(h,t.domain,d),Tt(p,t.domain,d),Le(p,Tr,f),Le(p,Gi,h);const m=Le(p,No);Tt(m,t.numeric,E6);const v=Le(s,Gi),S=Le(s,Tr);Le(v,Gi,v),Tt(v,t.domain,s),Tt(S,i,o),Tt(S,t.domain,s);const b=Zi(Bd);Tt(S,t.tld,b),Tt(S,t.utld,b),Tt(b,t.domain,s),Tt(b,i,o),Le(b,Tr,S),Le(b,Gi,v),Le(b,Bo,u);const k=Le(b,No),A=Zi(Bd);Tt(k,t.numeric,A);const w=Zi(Bd),y=Zi();Tt(w,e,w),Tt(w,n,y),Tt(y,e,w),Tt(y,n,y),Le(b,Or,w),Le(A,Or,w);const C=Le(a,No),I=Le(l,No),R=Le(I,Or),M=Le(R,Or);Tt(a,t.domain,s),Le(a,Tr,S),Le(a,Gi,v),Tt(l,t.domain,s),Le(l,Tr,S),Le(l,Gi,v),Tt(C,t.domain,w),Le(C,Or,w),Le(C,uu,w),Tt(M,t.domain,w),Tt(M,e,w),Le(M,Or,w);const D=[[su,au],[sd,ad],[ld,ud],[cd,dd],[fd,pd],[hd,md],[gd,vd],[yd,bd]];for(let $=0;$<D.length;$++){const[W,ie]=D[$],ve=Le(w,W);Le(y,W,ve),Le(ve,ie,w);const ae=Zi(Bd);Tt(ve,e,ae);const me=Zi();Tt(ve,n),Tt(ae,e,ae),Tt(ae,n,me),Tt(me,e,ae),Tt(me,n,me),Le(ae,ie,w),Le(me,ie,w)}return Le(r,ou,b),Le(r,Gm,Wj),{start:r,tokens:C6}}function Xj(t,e,n){let i=n.length,r=0,o=[],s=[];for(;r<i;){let a=t,l=null,u=null,c=0,d=null,f=-1;for(;r<i&&!(l=a.go(n[r].t));)s.push(n[r++]);for(;r<i&&(u=l||a.go(n[r].t));)l=null,a=u,a.accepts()?(f=0,d=a):f>=0&&f++,r++,c++;if(f<0)r-=c,r<i&&(s.push(n[r]),r++);else{s.length>0&&(o.push(og(I6,e,s)),s=[]),r-=f,c-=f;const p=d.t,h=n.slice(r-c,r);o.push(og(p,e,h))}}return s.length>0&&o.push(og(I6,e,s)),o}function og(t,e,n){const i=n[0].s,r=n[n.length-1].e,o=e.slice(i,r);return new t(o,n)}const Gj=typeof console<"u"&&console&&console.warn||(()=>{}),Zj="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",yn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function _j(){return xi.groups={},yn.scanner=null,yn.parser=null,yn.tokenQueue=[],yn.pluginQueue=[],yn.customSchemes=[],yn.initialized=!1,yn}function P6(t,e=!1){if(yn.initialized&&Gj(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Zj}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
322
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
323
|
+
2. Cannot start or end with "-"
|
|
324
|
+
3. "-" cannot repeat`);yn.customSchemes.push([t,e])}function Jj(){yn.scanner=Uj(yn.customSchemes);for(let t=0;t<yn.tokenQueue.length;t++)yn.tokenQueue[t][1]({scanner:yn.scanner});yn.parser=qj(yn.scanner.tokens);for(let t=0;t<yn.pluginQueue.length;t++)yn.pluginQueue[t][1]({scanner:yn.scanner,parser:yn.parser});return yn.initialized=!0,yn}function sg(t){return yn.initialized||Jj(),Xj(yn.parser.start,t,T6(yn.scanner.start,t))}sg.scan=T6;function L6(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const i=new rg(n),r=sg(t),o=[];for(let s=0;s<r.length;s++){const a=r[s];a.isLink&&(!e||a.t===e)&&i.check(a)&&o.push(a.toFormattedObject(i))}return o}function Yj(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function Qj(t){return new Kn({key:new Yn("autolink"),appendTransaction:(e,n,i)=>{const r=e.some(u=>u.docChanged)&&!n.doc.eq(i.doc),o=e.some(u=>u.getMeta("preventAutolink"));if(!r||o)return;const{tr:s}=i,a=Gz(n.doc,[...e]);if(tF(a).forEach(({newRange:u})=>{const c=_z(i.doc,u,p=>p.isTextblock);let d,f;if(c.length>1?(d=c[0],f=i.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):c.length&&i.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(d=c[0],f=i.doc.textBetween(d.pos,u.to,void 0," ")),d&&f){const p=f.split(" ").filter(S=>S!=="");if(p.length<=0)return!1;const h=p[p.length-1],m=d.pos+f.lastIndexOf(h);if(!h)return!1;const v=sg(h).map(S=>S.toObject(t.defaultProtocol));if(!Yj(v))return!1;v.filter(S=>S.isLink).map(S=>({...S,from:m+S.start+1,to:m+S.end+1})).filter(S=>i.schema.marks.code?!i.doc.rangeHasMark(S.from,S.to,i.schema.marks.code):!0).filter(S=>t.validate(S.value)).filter(S=>t.shouldAutoLink(S.value)).forEach(S=>{gm(S.from,S.to,i.doc).some(b=>b.mark.type===t.type)||s.addMark(S.from,S.to,t.type.create({href:S.href}))})}}),!!s.steps.length)return s}})}function eU(t){return new Kn({key:new Yn("handleClickLink"),props:{handleClick:(e,n,i)=>{var r,o;if(i.button!==0||!e.editable)return!1;let s=i.target;const a=[];for(;s.nodeName!=="DIV";)a.push(s),s=s.parentNode;if(!a.find(f=>f.nodeName==="A"))return!1;const l=SS(e.state,t.type.name),u=i.target,c=(r=u==null?void 0:u.href)!==null&&r!==void 0?r:l.href,d=(o=u==null?void 0:u.target)!==null&&o!==void 0?o:l.target;return u&&c?(window.open(c,d),!0):!1}}})}function tU(t){return new Kn({key:new Yn("handlePasteLink"),props:{handlePaste:(e,n,i)=>{const{state:r}=e,{selection:o}=r,{empty:s}=o;if(s)return!1;let a="";i.content.forEach(u=>{a+=u.textContent});const l=L6(a,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!l?!1:t.editor.commands.setMark(t.type,{href:l.href})}}})}const nU=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Cs(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(i=>{const r=typeof i=="string"?i:i.scheme;r&&n.push(r)}),!t||t.replace(nU,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const iU=qr.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){P6(t);return}P6(t.scheme,t.optionalSlashes)})},onDestroy(){_j()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Cs(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Cs(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Cs(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Dn(this.options.HTMLAttributes,t),0]:["a",Dn(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:i=>!!Cs(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:i=>!!Cs(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[la({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:i}=this.options,r=L6(t).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:s=>!!Cs(s,n),protocols:n,defaultProtocol:i}));r.length&&r.forEach(o=>e.push({text:o.value,data:{href:o.href},index:o.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(Qj({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:i=>this.options.isAllowedUri(i,{defaultValidate:r=>!!Cs(r,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(eU({type:this.type})),this.options.linkOnPaste&&t.push(tU({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),rU=ki.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Dn(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});function oU(t){var e;const{char:n,allowSpaces:i,allowToIncludeChar:r,allowedPrefixes:o,startOfLine:s,$position:a}=t,l=i&&!r,u=MF(n),c=new RegExp(`\\s${u}$`),d=s?"^":"",f=r?"":u,p=l?new RegExp(`${d}${u}.*?(?=\\s${f}|$)`,"gm"):new RegExp(`${d}(?:^)?${u}[^\\s${f}]*`,"gm"),h=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!h)return null;const m=a.pos-h.length,v=Array.from(h.matchAll(p)).pop();if(!v||v.input===void 0||v.index===void 0)return null;const S=v.input.slice(Math.max(0,v.index-1),v.index),b=new RegExp(`^[${o==null?void 0:o.join("")}\0]?$`).test(S);if(o!==null&&!b)return null;const k=m+v.index;let A=k+v[0].length;return l&&c.test(h.slice(A-1,A+1))&&(v[0]+=" ",A+=1),k<a.pos&&A>=a.pos?{range:{from:k,to:A},query:v[0].slice(n.length),text:v[0]}:null}const sU=new Yn("suggestion");function aU({pluginKey:t=sU,editor:e,char:n="@",allowSpaces:i=!1,allowToIncludeChar:r=!1,allowedPrefixes:o=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",command:u=()=>null,items:c=()=>[],render:d=()=>({}),allow:f=()=>!0,findSuggestionMatch:p=oU}){let h;const m=d==null?void 0:d(),v=new Kn({key:t,view(){return{update:async(S,b)=>{var k,A,w,y,C,I,R;const M=(k=this.key)===null||k===void 0?void 0:k.getState(b),D=(A=this.key)===null||A===void 0?void 0:A.getState(S.state),$=M.active&&D.active&&M.range.from!==D.range.from,W=!M.active&&D.active,ie=M.active&&!D.active,ve=!W&&!ie&&M.query!==D.query,ae=W||$&&ve,me=ve||$,se=ie||$&&ve;if(!ae&&!me&&!se)return;const Pe=se&&!ae?M:D,Be=S.dom.querySelector(`[data-decoration-id="${Pe.decorationId}"]`);h={editor:e,range:Pe.range,query:Pe.query,text:Pe.text,items:[],command:xe=>u({editor:e,range:Pe.range,props:xe}),decorationNode:Be,clientRect:Be?()=>{var xe;const{decorationId:de}=(xe=this.key)===null||xe===void 0?void 0:xe.getState(e.state),ge=S.dom.querySelector(`[data-decoration-id="${de}"]`);return(ge==null?void 0:ge.getBoundingClientRect())||null}:null},ae&&((w=m==null?void 0:m.onBeforeStart)===null||w===void 0||w.call(m,h)),me&&((y=m==null?void 0:m.onBeforeUpdate)===null||y===void 0||y.call(m,h)),(me||ae)&&(h.items=await c({editor:e,query:Pe.query})),se&&((C=m==null?void 0:m.onExit)===null||C===void 0||C.call(m,h)),me&&((I=m==null?void 0:m.onUpdate)===null||I===void 0||I.call(m,h)),ae&&((R=m==null?void 0:m.onStart)===null||R===void 0||R.call(m,h))},destroy:()=>{var S;h&&((S=m==null?void 0:m.onExit)===null||S===void 0||S.call(m,h))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(S,b,k,A){const{isEditable:w}=e,{composing:y}=e.view,{selection:C}=S,{empty:I,from:R}=C,M={...b};if(M.composing=y,w&&(I||e.view.composing)){(R<b.range.from||R>b.range.to)&&!y&&!b.composing&&(M.active=!1);const D=p({char:n,allowSpaces:i,allowToIncludeChar:r,allowedPrefixes:o,startOfLine:s,$position:C.$from}),$=`id_${Math.floor(Math.random()*4294967295)}`;D&&f({editor:e,state:A,range:D.range,isActive:b.active})?(M.active=!0,M.decorationId=b.decorationId?b.decorationId:$,M.range=D.range,M.query=D.query,M.text=D.text):M.active=!1}else M.active=!1;return M.active||(M.decorationId=null,M.range={from:0,to:0},M.query=null,M.text=null),M}},props:{handleKeyDown(S,b){var k;const{active:A,range:w}=v.getState(S.state);return A&&((k=m==null?void 0:m.onKeyDown)===null||k===void 0?void 0:k.call(m,{view:S,event:b,range:w}))||!1},decorations(S){const{active:b,range:k,decorationId:A}=v.getState(S);return b?Ln.create(S.doc,[Li.inline(k.from,k.to,{nodeName:a,class:l,"data-decoration-id":A})]):null}}});return v}const lU=new Yn("mention"),uU=ki.create({name:"mention",priority:101,addOptions(){return{HTMLAttributes:{},renderText({options:t,node:e}){var n;return`${t.suggestion.char}${(n=e.attrs.label)!==null&&n!==void 0?n:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:t,node:e}){var n;return["span",Dn(this.HTMLAttributes,t.HTMLAttributes),`${t.suggestion.char}${(n=e.attrs.label)!==null&&n!==void 0?n:e.attrs.id}`]},suggestion:{char:"@",pluginKey:lU,command:({editor:t,range:e,props:n})=>{var i,r,o;const s=t.view.state.selection.$to.nodeAfter;((i=s==null?void 0:s.text)===null||i===void 0?void 0:i.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(o=(r=t.view.dom.ownerDocument.defaultView)===null||r===void 0?void 0:r.getSelection())===null||o===void 0||o.collapseToEnd()},allow:({state:t,range:e})=>{const n=t.doc.resolve(e.from),i=t.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(i)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",Dn({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})];const n={...this.options};n.HTMLAttributes=Dn({"data-type":this.name},this.options.HTMLAttributes,e);const i=this.options.renderHTML({options:n,node:t});return typeof i=="string"?["span",Dn({"data-type":this.name},this.options.HTMLAttributes,e),i]:i},renderText({node:t}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:t})):this.options.renderText({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let n=!1;const{selection:i}=e,{empty:r,anchor:o}=i;return r?(e.doc.nodesBetween(o-1,o,(s,a)=>{if(s.type.name===this.name)return n=!0,t.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",a,a+s.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[aU({editor:this.editor,...this.options.suggestion})]}}),cU="listItem",D6="textStyle",R6=/^(\d+)\.\s$/,dU=ki.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Dn(this.options.HTMLAttributes,n),0]:["ol",Dn(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(cU,this.editor.getAttributes(D6)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Zc({find:R6,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Zc({find:R6,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(D6)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),fU=ki.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Dn(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),pU=vi.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Kn({key:new Yn("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=e,r=[];if(!n)return null;const o=this.editor.isEmpty;return t.descendants((s,a)=>{const l=i>=a&&i<=a+s.nodeSize,u=!s.isLeaf&&Gc(s);if((l||!this.options.showOnlyCurrent)&&u){const c=[this.options.emptyNodeClass];o&&c.push(this.options.emptyEditorClass);const d=Li.node(a,a+s.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:a,hasAnchor:l}):this.options.placeholder});r.push(d)}return this.options.includeChildren}),Ln.create(t,r)}}})]}}),hU=ki.create({name:"text",group:"inline"}),mU=qr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Dn(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});class gU{constructor({editor:e,element:n,view:i,tippyOptions:r={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:u,to:c})=>{const{doc:d,selection:f}=l,{empty:p}=f,h=!d.textBetween(u,c).length&&pm(l.selection),m=this.element.contains(document.activeElement);return!(!(a.hasFocus()||m)||p||h||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}a!=null&&a.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(a.relatedTarget))||(a==null?void 0:a.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const u=!(l!=null&&l.selection.eq(a.state.selection)),c=!(l!=null&&l.doc.eq(a.state.doc));!u&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,u,c,l)},this.updateDelay))},this.updateHandler=(a,l,u,c)=>{var d,f,p;const{state:h,composing:m}=a,{selection:v}=h;if(m||!l&&!u)return;this.createTooltip();const{ranges:b}=v,k=Math.min(...b.map(y=>y.$from.pos)),A=Math.max(...b.map(y=>y.$to.pos));if(!((d=this.shouldShow)===null||d===void 0?void 0:d.call(this,{editor:this.editor,element:this.element,view:a,state:h,oldState:c,from:k,to:A}))){this.hide();return}(f=this.tippy)===null||f===void 0||f.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(iF(h.selection)){let y=a.nodeDOM(k);if(y){const C=y.dataset.nodeViewWrapper?y:y.querySelector("[data-node-view-wrapper]");if(C&&(y=C.firstChild),y)return y.getBoundingClientRect()}}return kS(a,k,A)})}),this.show()},this.editor=e,this.element=n,this.view=i,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=As(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){const{state:i}=e,r=i.selection.from!==i.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,n);return}const o=!(n!=null&&n.selection.eq(e.state.selection)),s=!(n!=null&&n.doc.eq(e.state.doc));this.updateHandler(e,o,s,n)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const B6=t=>new Kn({key:typeof t.pluginKey=="string"?new Yn(t.pluginKey):t.pluginKey,view:e=>new gU({view:e,...t})});vi.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B6({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}}),Ae({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=re(null);return wt(()=>{const{updateDelay:i,editor:r,pluginKey:o,shouldShow:s,tippyOptions:a}=t;r.registerPlugin(B6({updateDelay:i,editor:r,element:n.value,pluginKey:o,shouldShow:s,tippyOptions:a}))}),Bi(()=>{const{pluginKey:i,editor:r}=t;r.unregisterPlugin(i)}),()=>{var i;return Ji("div",{ref:n},(i=e.default)===null||i===void 0?void 0:i.call(e))}}});function N6(t){return zg((e,n)=>({get(){return e(),t},set(i){t=i,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class vU extends kF{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=N6(this.view.state),this.reactiveExtensionStorage=N6(this.extensionStorage),this.on("beforeTransaction",({nextState:n})=>{this.reactiveState.value=n,this.reactiveExtensionStorage.value=this.extensionStorage}),Xd(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,n){const i=super.registerPlugin(e,n);return this.reactiveState&&(this.reactiveState.value=i),i}unregisterPlugin(e){const n=super.unregisterPlugin(e);return this.reactiveState&&n&&(this.reactiveState.value=n),n}}const yU=Ae({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=re(),n=Pr();return Aa(()=>{const i=t.editor;i&&i.options.element&&e.value&&Et(()=>{if(!e.value||!i.options.element.firstChild)return;const r=x(e.value);e.value.append(...i.options.element.childNodes),i.contentComponent=n.ctx._,n&&(i.appContext={...n.appContext,provides:n.provides}),i.setOptions({element:r}),i.createNodeViews()})}),Bi(()=>{const i=t.editor;i&&(i.contentComponent=null,i.appContext=null)}),{rootEl:e}},render(){return Ji("div",{ref:t=>{this.rootEl=t}})}}),ag=Ae({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=re(null);return wt(()=>{const{pluginKey:i,editor:r,tippyOptions:o,shouldShow:s}=t;r.registerPlugin(c6({pluginKey:i,editor:r,element:n.value,tippyOptions:o,shouldShow:s}))}),Bi(()=>{const{pluginKey:i,editor:r}=t;r.unregisterPlugin(i)}),()=>{var i;return Ji("div",{ref:n},(i=e.default)===null||i===void 0?void 0:i.call(e))}}});Ae({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return Ji(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});const $6=Ae({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return Ji(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(t=this.$slots).default)===null||e===void 0?void 0:e.call(t))}}),bU=(t={})=>{const e=oe();return wt(()=>{e.value=new vU(t)}),Bi(()=>{var n,i,r;const o=(n=e.value)===null||n===void 0?void 0:n.options.element,s=o==null?void 0:o.cloneNode(!0);(i=o==null?void 0:o.parentNode)===null||i===void 0||i.replaceChild(s,o),(r=e.value)===null||r===void 0||r.destroy()}),e};class V6{constructor(e,{props:n={},editor:i}){this.editor=i,this.component=Xd(e),this.el=document.createElement("div"),this.props=hn(n),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var e,n,i,r;return!((n=(e=this.renderedComponent.vNode)===null||e===void 0?void 0:e.component)===null||n===void 0)&&n.exposed?this.renderedComponent.vNode.component.exposed:(r=(i=this.renderedComponent.vNode)===null||i===void 0?void 0:i.component)===null||r===void 0?void 0:r.proxy}renderComponent(){let e=Ji(this.component,this.props);return this.editor.appContext&&(e.appContext=this.editor.appContext),typeof document<"u"&&this.el&&Gd(e,this.el),{vNode:e,destroy:()=>{this.el&&Gd(null,this.el),this.el=null,e=null},el:this.el?this.el.firstElementChild:null}}updateProps(e={}){Object.entries(e).forEach(([n,i])=>{this.props[n]=i}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}}const z6={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0},view:{type:Object,required:!0},innerDecorations:{type:Object,required:!0},HTMLAttributes:{type:Object,required:!0}};class AU extends xF{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(r={})=>this.updateAttributes(r),deleteNode:()=>this.deleteNode()},n=this.onDragStart.bind(this);this.decorationClasses=re(this.getDecorationClasses());const i=Ae({extends:{...this.component},props:Object.keys(e),template:this.component.template,setup:r=>{var o,s;return Ps("onDragStart",n),Ps("decorationClasses",this.decorationClasses),(s=(o=this.component).setup)===null||s===void 0?void 0:s.call(o,r,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new V6(i,{editor:this.editor,props:e})}get dom(){if(!this.renderer.element||!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}handleSelectionUpdate(){const{from:e,to:n}=this.editor.state.selection,i=this.getPos();if(typeof i=="number")if(e<=i&&n>=i+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,n,i){const r=o=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(o)};if(typeof this.options.update=="function"){const o=this.node,s=this.decorations,a=this.innerDecorations;return this.node=e,this.decorations=n,this.innerDecorations=i,this.options.update({oldNode:o,oldDecorations:s,newNode:e,newDecorations:n,oldInnerDecorations:a,innerDecorations:i,updateProps:()=>r({node:e,decorations:n,innerDecorations:i})})}return e.type!==this.node.type?!1:(e===this.node&&this.decorations===n&&this.innerDecorations===i||(this.node=e,this.decorations=n,this.innerDecorations=i,r({node:e,decorations:n,innerDecorations:i})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element&&this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element&&this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map(e=>e.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}}function F6(t,e){return n=>{if(!n.editor.contentComponent)return{};const i=typeof t=="function"&&"__vccOpts"in t?t.__vccOpts:t;return new AU(i,n,e)}}const wU=Ae({__name:"CodeSnippetAdapter",props:z6,setup(t){const e=t,n=re(e.node.attrs.code);return $e(n,()=>{e.updateAttributes({code:n.value})}),(i,r)=>(g(),P(x($6),null,{default:H(()=>[L($A,{code:n.value,"onUpdate:code":r[0]||(r[0]=o=>n.value=o),readonly:!e.editor.isEditable,placeholder:"Masukan Code"},null,8,["code","readonly"])]),_:1}))}}),SU=ki.create({name:"codeSnippet",group:"block",atom:!0,addAttributes(){return{code:{default:""}}},parseHTML(){return[{tag:"codeSnippet"}]},renderHTML({HTMLAttributes:t}){return["codeSnippet",Dn(t)]},addNodeView(){return F6(wU)},addCommands(){return{insertCodeSnippet:()=>({commands:t})=>t.insertContent({type:"codeSnippet",attrs:{code:""}}),deleteCodeSnippet:()=>({commands:t})=>t.deleteSelection()}}}),CU={class:"flex flex-col gap-1 border-primary-400 border-[2px] rounded-md relative my-4"},kU={class:"!font-semibold !text-sm absolute -top-[10px] ml-2 bg-white border-primary-400 border-[2px] px-4 rounded-md"},TU={key:0,class:"absolute top-[45%] px-4 text-gray-400"},OU=["contenteditable"],xU=Ae({__name:"MentionSection",props:z6,setup(t){const e=t;wt(()=>{r.value=e.editor.isEditable});const n=re(e.node.attrs.title),i=re(e.node.attrs.bodyText),r=oe(!0);return $e(n,()=>{e.updateAttributes({title:n.value})}),$e(i,()=>{e.updateAttributes({bodyText:i.value})}),(o,s)=>(g(),P(x($6),null,{default:H(()=>[E("div",CU,[E("p",kU,[s[3]||(s[3]=E("span",{class:"text-xs"},"#",-1)),ht(_(n.value),1)]),r.value?(g(),O("span",TU," Tuliskan sebuah pesan ")):B("",!0),E("span",{class:pe(["p-4 pt-6 caret-primary-500 focus:caret-primary-500 relative "]),contenteditable:e.editor.isEditable,onBlur:s[0]||(s[0]=a=>{const l=a.target.innerText;i.value=l,r.value=l===""||l===`
|
|
325
|
+
`}),onFocus:s[1]||(s[1]=a=>r.value=!1),onKeyup:s[2]||(s[2]=a=>{const l=a.target.innerText;console.log(l),r.value=l===""||l===`
|
|
326
|
+
`})},_(i.value),41,OU)])]),_:1}))}}),MU=ki.create({name:"mentionSection",group:"block",atom:!0,addAttributes(){return{title:{default:""},bodyText:{default:""}}},parseHTML(){return[{tag:"mentionSection"}]},renderHTML({HTMLAttributes:t}){return["mentionSection",Dn(t)]},addNodeView(){return F6(xU)},addCommands(){return{insertMentionSection:t=>({commands:e})=>e.insertContent({type:"mentionSection",attrs:{title:t,bodyText:null}}),deleteMentionSection:()=>({commands:t})=>t.deleteSelection()}}}),EU={class:"bg-white border border-gray-200 rounded-lg shadow-md flex flex-col max-h-72 overflow-y-scroll w-fit gap-1 p-2 relative"},IU=["onClick"],PU={class:"flex flex-col gap-[1px]"},LU={class:"!text-[10px] !font-light"},DU={key:1,class:"text-xs font-semibold"},RU=Ae({__name:"MentionList",props:{items:{},command:{type:Function}},setup(t,{expose:e}){const n=t,i=oe(0),r=u=>u.key==="ArrowUp"?(o(),!0):u.key==="ArrowDown"?(s(),!0):u.key==="Enter"?(a(),!0):!1,o=()=>{i.value=(i.value+n.items.length-1)%n.items.length},s=()=>{i.value=(i.value+1)%n.items.length},a=()=>{l(i.value)},l=u=>{const c=n.items[u];c&&n.command({id:c.id,label:c.label})};return e({onKeyDown:r}),$e(()=>n.items,()=>{i.value=0}),(u,c)=>(g(),O("div",EU,[u.items.length?(g(!0),O(ue,{key:0},Je(u.items,(d,f)=>(g(),O("div",{key:f,class:pe({"hover:bg-gray-100 flex":!0,"!bg-gray-100 ":f===i.value}),onClick:p=>l(f)},[L(Ml,{user:{profilePicture:d.profilePicture},"profile-picture-field":"profilePicture"},null,8,["user"]),E("div",PU,[E("p",null,_(d.label),1),E("p",LU,_(d.nickName),1)])],10,IU))),128)):(g(),O("div",DU,"No result"))]))}}),BU=()=>({render:()=>{let t,e;return{onStart(n){t=new V6(RU,{props:{items:n.items,command:n.command},editor:n.editor}),n.clientRect&&(e=As("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(n){t.updateProps(n),n.clientRect&&e[0].setProps({getReferenceClientRect:n.clientRect})},onKeyDown(n){return n.event.key==="Escape"?(e[0].hide(),!0):t.ref.onKeyDown(n.event)},onExit(){e[0].destroy(),t.destroy()}}}}),ks=Ae({__name:"EditorButton",props:{classButton:{}},setup(t){return(e,n)=>(g(),P(We,{class:pe([e.classButton,"!rounded h-6 w-6 p-1"]),tooltip:{pt:{text:{style:"font-size: 9px !important; padding: 2px 6px; border-radius: 8px"}},value:e.$attrs.tooltipText??e.$attrs["tooltip-text"]},"icon-class":"!w-4 !h-4",severity:"secondary",text:"","tooltip-pos":"top"},null,8,["class","tooltip"]))}}),NU=["title","onClick"],$U={class:"!text-[9px] !leading-3 !h-max !font-normal"},VU={class:pe(["flex gap-2 bg-white border-[0.5px] px-2 py-1 rounded-sm","[&_.separator::after]:content-['|']","[&_.separator::after]:text-xl","[&_.separator::after]:font-thin","[&_.separator]:h-6"])},zU={class:pe(["flex gap-2 bg-white border-[0.5px] px-2 py-1 rounded-sm","[&_.separator::after]:content-['|']","[&_.separator::after]:text-xl","[&_.separator::after]:font-thin","[&_.separator]:h-6"])},FU={class:"flex flex-col gap-4"},HU={class:"flex gap-2"},jU={class:"flex-1"},UU={class:"flex items-end"},KU={class:"flex flex-wrap justify-center gap-2"},WU=["src"],qU={class:"flex flex-col justify-center w-28 h-28 items-center"},XU={class:"relative py-[7px] px-3"},GU={class:pe(["flex gap-2 bg-white border-[0.5px] px-2 py-1 rounded-sm","[&_.separator::after]:content-['|']","[&_.separator::after]:text-xl","[&_.separator::after]:font-thin","[&_.separator]:h-6"])},ZU=Ae({__name:"Editor",props:wn({modelValue:{},initialValue:{},placeholder:{default:"Tulis"},editorState:{default:"editable"},borderLess:{type:Boolean,default:!1},label:{},useValidator:{type:Boolean},fieldName:{},labelClass:{},fieldInfo:{},validatorMessageClass:{},validatorMessage:{},mandatory:{type:Boolean},invalid:{type:Boolean},showOptionalText:{type:Boolean,default:void 0},isImageUploadBase64:{type:Boolean,default:!1},fetchMentionSuggestionFunction:{},mentionedList:{},editorWrapperClass:{},toolbarWrapperClass:{},contentWrapperClass:{}},{modelValue:{},modelModifiers:{},mentionedList:{},mentionedListModifiers:{}}),emits:wn(["update:modelValue","postImageLocal","deleteImageLocal","blur","focus","update:mentionedList"],["update:modelValue","update:mentionedList"]),setup(t,{expose:e,emit:n}){const i=dt("preset",{}).menu,r=t,o=n;ni(t,"modelValue");const s=ni(t,"mentionedList");wt(()=>{r.useValidator&&(Object.assign(v,Nn(()=>r.fieldName??"editorInput",Z=>Et(()=>me(Z)))),r.initialValue!=null&&(v.value=r.initialValue),r.modelValue!=null&&(v.value=r.modelValue)),ge()});const a=oe(!1),l=re(),u=re(),c=re(),d=re([]),f=oe(!1),p=oe(),h=oe(),m=oe(),v=hn({value:r.modelValue}),S=oe(!1),b=re([]),k=oe(),A=X(()=>{var Z;return r.placeholder??"Tulis "+(r.label?(Z=r.label)==null?void 0:Z.toLowerCase():"")}),w=bU({content:r.initialValue??r.modelValue,onBlur:Z=>o("blur",Z),onFocus:Z=>o("focus",Z),onUpdate:()=>{var Z,q;o("update:modelValue",((Z=w.value)==null?void 0:Z.getJSON())??{}),v.value=((q=w.value)==null?void 0:q.getJSON())??{}},onPaste:async Z=>{let q=[];const{items:U}=Z.clipboardData,J=ke=>new Promise(He=>{if(ke.kind==="file"){const j=ke.getAsFile();j&&q.push(j),He()}else He()});await Promise.all(Array.from(U).map(J));try{if(q.length){const ke=q.filter(He=>He.type.startsWith("image/")).filter(He=>Fx(He,10));await ve(ke)}}catch(ke){console.error("Error pasting images:",ke)}finally{q=[]}},onSelectionUpdate(Z){var U;const q=Z.editor.getAttributes("image");(U=w.value)==null||U.state.doc.descendants(J=>{J.type.name==="mention"&&b.value.push(J.attrs.id)}),b.value=Array.from(new Set(b.value)),q.title==="localImage"?h.value=q:h.value=void 0},editable:r.editorState==="editable",extensions:[pU.configure({emptyEditorClass:"is-editor-empty !text-general-200 !font-light",placeholder:A.value,includeChildren:!1}),zF.extend({addKeyboardShortcuts(){return{"Mod-\\":()=>(this.editor.commands.clearNodes(),this.editor.commands.unsetAllMarks())}}}),vj,fU,hU,Ej.extend({addKeyboardShortcuts(){const Z=()=>{const{node:q}=this.editor.state.selection;return q&&q.type.name==="image"&&q.attrs.title==="localImage"?(xe(),!0):!1};return{Insert:()=>ie(),Backspace:Z,Delete:Z}}}).configure({HTMLAttributes:{class:"w-fit max-h-[300px] object-contain"}}),SU.extend({addKeyboardShortcuts(){return{"Mod-alt-c":Ie}}}),MU,dU.configure({HTMLAttributes:{class:"list-decimal px-3 py-1"}}),BF.configure({HTMLAttributes:{class:"list-disc px-3 py-1"}}),rU,DF,Rj,mU,VF,iU.extend({addKeyboardShortcuts(){return{"Mod-k":()=>se()}}}).configure({openOnClick:!1}),xj,uU.configure({HTMLAttributes:{class:"bg-primary-200 text-primary-800 rounded-[50px] px-1"},suggestion:{items({query:Z}){return((m==null?void 0:m.value)??[]).filter(q=>q==null?void 0:q.fullName.toLowerCase().includes(Z.toLowerCase())).map(q=>({id:q==null?void 0:q._id,label:q==null?void 0:q.fullName,nickName:q.nickName,profilePicture:q.profilePicture}))},...BU()}}),gj]}),y=X(()=>{var St,lt,bt,jt,ln,un,en,Vt,Dt,Sn,Jt,ee,Y,we,je,st;if(!w.value)return[];const{toggleBold:Z,focus:q,toggleItalic:U,toggleUnderline:J,toggleBulletList:ke,toggleCode:He,toggleOrderedList:j,unsetAllMarks:he,clearNodes:De}=w.value.commands,nt=(St=w.value)==null?void 0:St.isActive("code");return[{label:"Aa",iconPos:"right",icon:"arrow-down",class:"!gap-0 !w-[50px] !p-0 !m-0 [&_span]:leading-[22px]",onClick:(lt=l.value)==null?void 0:lt.toggle},{icon:"bold",tooltipText:"Bold | Ctrl + B",active:(bt=w.value)==null?void 0:bt.isActive("bold"),disabled:nt,onClick:()=>{q(),Z()}},{icon:"italic",tooltipText:"Italic | Ctrl + I",active:(jt=w.value)==null?void 0:jt.isActive("italic"),disabled:nt,onClick:()=>{q(),U()}},{icon:"underline",class:"mr-3",active:(ln=w.value)==null?void 0:ln.isActive("underline"),tooltipText:"Underline | Ctrl + U",disabled:nt,onClick:()=>{q(),J()}},{icon:"list-unordered",tooltipText:"Bullet List | Ctrl + 7",active:(un=w.value)==null?void 0:un.isActive("bullet-list"),onClick:()=>{q(),ke()}},{icon:"list-ordered",tooltipText:"Numbered List | Ctrl + 8",active:(en=w.value)==null?void 0:en.isActive("ordered-list"),class:"mr-3",onClick:()=>{q(),j()}},{icon:"link-m",tooltipText:"Link | Ctrl + K",disabled:((Vt=w.value)==null?void 0:Vt.isActive("link"))||a.value,onClick:se},{icon:"image-add",active:(Dt=w.value)==null?void 0:Dt.isActive("image"),tooltipText:"Image | Insert",onClick:()=>ie()},{icon:"code-line",active:(Sn=w.value)==null?void 0:Sn.isActive("code"),tooltipText:"Inline Code | Ctrl + E",onClick:()=>{q(),He()}},{icon:"code-box-line",active:(Jt=w.value)==null?void 0:Jt.isActive("codeSnippet"),tooltipText:"Code Block | Ctrl + Alt + C",onClick:()=>{Ie()}},{icon:"format-clear",tooltipText:"Clear Formatting Ctrl + \\",disabled:!((ee=w.value)!=null&&ee.isActive("bold"))&&!((Y=w.value)!=null&&Y.isActive("underline"))&&!((we=w.value)!=null&&we.isActive("italic"))&&!((je=w.value)!=null&&je.isActive("code"))&&!((st=w.value)!=null&&st.isActive("heading")),onClick:()=>{q(),De(),he()}}]}),C=oe([{label:"Paragraf",class:"p",shortCut:"Ctrl+Alt+P",command:()=>{var Z,q;(Z=w.value)==null||Z.commands.focus(),(q=w.value)==null||q.commands.setParagraph()}},{label:"Heading 1",class:"heading-1",shortCut:"Ctrl+Alt+1",command:()=>{var Z,q;(Z=w.value)==null||Z.commands.focus(),(q=w.value)==null||q.commands.setHeading({level:1})}},{label:"Heading 2",class:"heading-2",shortCut:"Ctrl+Alt+2",command:()=>{var Z,q;(Z=w.value)==null||Z.commands.focus(),(q=w.value)==null||q.commands.setHeading({level:2})}},{class:"heading-3",label:"Heading 3",shortCut:"Ctrl+Alt+3",command:()=>{var Z,q;(Z=w.value)==null||Z.commands.focus(),(q=w.value)==null||q.commands.setHeading({level:3})}},{label:"Heading 4",class:"heading-4",shortCut:"Ctrl+Alt+4",command:()=>{var Z,q;(Z=w.value)==null||Z.commands.focus(),(q=w.value)==null||q.commands.setHeading({level:4})}},{label:"Heading 5",class:"heading-5",shortCut:"Ctrl+Alt+5",command:()=>{var Z,q;(Z=w.value)==null||Z.commands.focus(),(q=w.value)==null||q.commands.setHeading({level:5})}},{label:"Heading 6",class:"heading-6",shortCut:"Ctrl+Alt+6",command:()=>{var Z,q;(Z=w.value)==null||Z.commands.focus(),(q=w.value)==null||q.commands.setHeading({level:6})}}]),I=X(()=>{var Z;return(Z=w.value)==null?void 0:Z.getAttributes("link")}),R=()=>{var U;const{href:Z}=I.value,q=(U=w.value)==null?void 0:U.view.dom.querySelector(`[href="${Z}"]`);return W()||q&&(q==null?void 0:q.textContent)!==Z&&q.textContent||void 0},M=()=>{var Z;window.open((Z=I.value)==null?void 0:Z.href,"_blank")},D=()=>{var Z;window.navigator.clipboard.writeText((Z=I.value)==null?void 0:Z.href)},$=()=>{var Z;if(w.value){const{unsetLink:q,focus:U}=((Z=w.value)==null?void 0:Z.commands)??{};U(),q()}},W=()=>{if(w.value){const{state:Z}=w.value,{from:q,to:U}=Z.selection;return Z==null?void 0:Z.doc.textBetween(q,U," ")}},ie=()=>(f.value=!0,!1),ve=async Z=>{if(r.isImageUploadBase64){const q=await de(Z[0]);Be(q)}else o("postImageLocal",{image:Z[0],setImageCb:Be})},ae=Z=>{const{files:q}=Z.target;ve(q)},me=(Z={})=>{if(typeof r.validatorMessage=="string"&&r.invalid)return r.validatorMessage;if(typeof r.validatorMessage!="string"){const{empty:q}=r.validatorMessage??{};if(Z.content===void 0&&r.mandatory&&q)return q??!0}return!0},se=Z=>{var J,ke,He,j;const q=Z??{currentTarget:(ke=(J=c.value)==null?void 0:J.querySelector(".ic-link-m"))==null?void 0:ke.closest("button")},{dom:U}=((He=w.value)==null?void 0:He.view)??{};return(j=u.value)==null||j.toggle(q,U),!0},Pe=({formValues:Z})=>{var he,De;if(!w.value)return!1;const{setLink:q,insertContent:U,focus:J}=w.value.commands,{url:ke,text:He}=Z,{state:j}=w.value;return J(),q({href:ke,target:"_blank",rel:"nofollow"}),(he=w.value)!=null&&he.isActive("link")?w.value.chain().focus().command(({tr:nt,state:St})=>{const{$from:lt,$to:bt}=St.selection,jt=j.schema.marks.link;let ln=lt.start(),un=bt.end();return j.doc.nodesBetween(lt.pos,bt.pos,(en,Vt)=>{en.isText&&en.marks.some(Dt=>Dt.type===jt)&&(ln=Math.min(ln,Vt),un=Math.max(un,Vt+en.nodeSize))}),nt.insertText(He||ke,ln,un),!0}).run():j.selection.empty&&U(He||ke),(De=u.value)==null||De.hide(),a.value=!1,!0},Be=Z=>{var q,U,J,ke;(q=w.value)==null||q.commands.focus(),Z&&(r.isImageUploadBase64?(U=w.value)==null||U.commands.setImage({src:Z,title:"localImageBase64"}):(J=w.value)==null||J.commands.setImage({src:Z,title:"localImage"}),d.value=Array.from(new Set([...d.value,Z]))),p.value&&((ke=w.value)==null||ke.commands.setImage({src:p.value}),d.value=Array.from(new Set([...d.value,p.value]))),p.value=void 0,Oe()},xe=()=>{var Z;h.value&&h.value.title==="localImage"&&o("deleteImageLocal",h.value),(Z=w.value)==null||Z.commands.deleteSelection()},de=Z=>new Promise((q,U)=>{const J=new FileReader;J.readAsDataURL(Z),J.onload=()=>{q(J.result)},J.onerror=ke=>{U(ke)}}),ge=async()=>{if(r.fetchMentionSuggestionFunction){S.value=!S.value;try{const{data:Z}=await r.fetchMentionSuggestionFunction()??{};m.value=Z,S.value=!S.value}catch(Z){console.error(Z)}}},Ie=()=>{var U,J;const{insertCodeSnippet:Z,deleteCodeSnippet:q}=(U=w.value)==null?void 0:U.commands;return(J=w.value)!=null&&J.isActive("codeSnippet")?q():Z(),!1},Oe=()=>{w.value.commands.createParagraphNear()},le=Z=>{var q;try{const{insertMentionSection:U}=(q=w.value)==null?void 0:q.commands;U(Z),k.value!==Z&&k.value!==void 0&&Se(),k.value=Z}catch(U){console.error(U)}},Se=()=>{S.value=!0,setTimeout(()=>{S.value=!1},100)};return e({mentionSectionTrigger:le}),$e(()=>r.invalid,()=>{var Z;(Z=v.validate)==null||Z.call(v)}),$e(b,()=>{s.value=b.value}),(Z,q)=>{const U=on("focus");return g(),O(ue,null,[L(pi,{info:Z.fieldInfo,label:r.label,"label-class":r.labelClass,mandatory:r.mandatory,"show-optional-text":r.showOptionalText},{default:H(()=>[E("div",{ref_key:"root",ref:c,class:pe(["rounded-b text-grayscale-900 w-full","[&:has(:focus)]:border-general-200 border-general-100",`${Z.borderLess||Z.editorState==="readonly"?"border-none":"border-[0.5px]"}`,"[&_code]:bg-primary-100","[&_code]:rounded-md","[&_code]:p-[0.25em_0.3em]","[&_code]:text-[0.85rem]","[&_code]:!font-source-code-pro",`${r.editorWrapperClass}`]),"data-wv-name":"editor"},[r.editorState==="editable"?(g(),O("div",{key:0,class:pe(["border-b-[0.5px] border-inherit px-3 py-1 flex gap-1 bg-general-50",`${r.toolbarWrapperClass}`]),"data-wv-section":"toolbar"},[(g(!0),O(ue,null,Je(y.value,J=>(g(),P(ks,T({ref_for:!0},J,{key:J.icon,class:[{"!bg-primary-50 ":J.active},J.class]}),null,16,["class"]))),128))],2)):B("",!0),S.value?B("",!0):(g(),P(x(yU),{key:1,class:pe([`${r.editorState==="editable"?"px-3 py-2":""} [&_*]:outline-none`,"[&_.is-editor-empty:first-child::before]:text-general-200","[&_.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.is-editor-empty:first-child::before]:font-normal","[&_.is-editor-empty:first-child::before]:pointer-events-none","[&_.is-editor-empty:first-child::before]:float-left","[&_.is-editor-empty:first-child::before]:h-0","[&_a]:hover:underline transition-transform duration-75","[&_a]:text-link","[&_a]:cursor-pointer","[&_b]:font-bold","[&_strong]:font-bold","[&_img.ProseMirror-selectednode]:!outline-[0.5px]","[&_img.ProseMirror-selectednode]:!outline-link","[&_img.ProseMirror-selectednode]:!outline-offset-1","[&_img.ProseMirror-selectednode]:!rounded-sm","[&_img]:my-2","[&_*:has(code)]:my-[0.25rem]",`${r.contentWrapperClass}`]),editor:x(w),spellcheck:"false"},null,8,["class","editor"])),L(x(Wu),{ref_key:"headingMenu",ref:l,model:C.value,popup:""},{item:H(({item:J})=>{var ke,He,j,he,De,nt,St,lt;return[E("a",{class:pe([...(ke=x(i))==null?void 0:ke.action.class,J.class,"flex items-center !justify-between h-[30px]",{"bg-primary-50":((He=x(w))==null?void 0:He.isActive("heading",{level:1}))&&J.label==="Heading 1"||((j=x(w))==null?void 0:j.isActive("heading",{level:2}))&&J.label==="Heading 2"||((he=x(w))==null?void 0:he.isActive("heading",{level:3}))&&J.label==="Heading 3"||((De=x(w))==null?void 0:De.isActive("heading",{level:4}))&&J.label==="Heading 4"||((nt=x(w))==null?void 0:nt.isActive("heading",{level:5}))&&J.label==="Heading 5"||((St=x(w))==null?void 0:St.isActive("heading",{level:6}))&&J.label==="Heading 6"||((lt=x(w))==null?void 0:lt.isActive("paragraph"))&&J.label==="Paragraf"}]),title:J.label,onClick:bt=>{var jt;return(jt=J.command)==null?void 0:jt.call(J,{item:J,originalEvent:bt})}},[ht(_(J.label)+" ",1),E("code",$U,_(J.shortCut),1)],10,NU)]}),_:1},8,["model"]),x(w)&&r.editorState==="editable"?(g(),P(x(ag),{key:2,editor:x(w),"should-show":()=>{var J,ke;return((J=x(w))==null?void 0:J.isActive("codeSnippet"))||((ke=x(w))==null?void 0:ke.isActive("mentionSection"))},"tippy-options":{placement:"top",zIndex:9},class:"-mt-1.5 shadow-panel","plugin-key":"editLinkToolbar"},{default:H(()=>[E("div",VU,[L(ks,{onClick:Oe,icon:"close",severity:"secondary",text:"","tooltip-text":"Buat text baru dibawah"})])]),_:1},8,["editor","should-show"])):B("",!0),x(w)&&!a.value&&r.editorState==="editable"?(g(),P(x(ag),{key:3,editor:x(w),"should-show":()=>{var J;return(J=x(w))==null?void 0:J.isActive("link")},"tippy-options":{placement:"bottom",zIndex:9},class:"-mt-1.5 shadow-panel","plugin-key":"editLinkToolbar"},{default:H(()=>[E("div",zU,[L(ks,{onClick:se,class:"!w-max",label:"Edit Tautan",severity:"secondary",text:""}),q[4]||(q[4]=E("span",{class:"separator"},null,-1)),L(ks,{onClick:M,icon:"external-link",severity:"secondary",text:"","tooltip-text":"Buka di tab baru"}),q[5]||(q[5]=E("span",{class:"separator"},null,-1)),L(ks,{onClick:$,icon:"link-unlink-m",severity:"secondary",text:"","tooltip-text":"Lepas tautan"}),q[6]||(q[6]=E("span",{class:"separator"},null,-1)),L(ks,{onClick:D,icon:"file-copy",severity:"secondary",text:"","tooltip-text":"Salin tautan"})])]),_:1},8,["editor","should-show"])):B("",!0),L(rr,{visible:f.value,"onUpdate:visible":q[2]||(q[2]=J=>f.value=J),class:"w-[400px]",header:"Pilih Gambar"},{default:H(()=>[E("div",FU,[E("div",HU,[E("div",jU,[L(pA,{"model-value":p.value,"onUpdate:modelValue":q[0]||(q[0]=J=>p.value=J),class:"w-[269px]",label:"URL Gambar"},null,8,["model-value"])]),E("div",UU,[L(We,{onClick:q[1]||(q[1]=J=>Be()),label:"Simpan",severity:"secondary"})])]),E("div",null,[q[8]||(q[8]=E("p",null,"Baru Saja Ditambahkan",-1)),E("div",KU,[(g(!0),O(ue,null,Je(d.value,(J,ke)=>(g(),O("img",{key:ke,src:J,alt:"preview",class:"w-28 h-28 object-scale-down rounded-lg"},null,8,WU))),128)),E("div",qU,[L(Ee,{class:"!w-[70px] !h-[70px]",icon:"upload-2",severity:"primary"}),L(We,{severity:"secondary"},{default:H(()=>[E("div",XU,[q[7]||(q[7]=E("p",null,"Cari Gambar",-1)),E("input",{onChange:ae,class:"opacity-0 absolute top-0 bottom-0 left-0 right-0",type:"file"},null,32)])]),_:1})])])])])]),_:1},8,["visible"]),x(w)&&r.editorState==="editable"?(g(),P(x(ag),{key:4,editor:x(w),"should-show":()=>{var J;return!!((J=x(w))!=null&&J.isActive("image"))},"tippy-options":{placement:"top",zIndex:9},class:"-mt-1.5 shadow-panel","plugin-key":"editImageToolbar"},{default:H(()=>[E("div",GU,[L(ks,{onClick:xe,icon:"delete-bin",severity:"secondary",text:"","tooltip-text":"Unset Image"})])]),_:1},8,["editor","should-show"])):B("",!0)],2),L(Fn,{class:pe(Z.validatorMessageClass),message:v.errorMessage},null,8,["class","message"])]),_:1},8,["info","label","label-class","mandatory","show-optional-text"]),L(Zu,{ref_key:"editLinkOverlay",ref:u,pt:{content:{class:""}},onHide:q[3]||(q[3]=J=>a.value=!1),"append-to":"self",class:"w-[342px] bg-white p-4"},{default:H(()=>[L(T0,{onSubmit:Pe,class:"!gap-0","hide-stay-checkbox":""},{fields:H(()=>{var J,ke;return[ft(L(pA,{"validator-message":{empty:"Masukan tautan yang valid"},value:(J=I.value)==null?void 0:J.href,"field-name":"url",label:"Tempel Tautan",mandatory:"",placeholder:"Tempel tautan baru","use-validator":""},null,8,["value"]),[[U]]),L(Ks,{value:R(),"field-name":"text",label:"Teks Tampilan",placeholder:"Teks untuk ditampilkan","use-validator":""},null,8,["value"]),L(We,{label:(ke=x(w))!=null&&ke.isActive("link")?"Simpan":"Tambahkan",class:"w-max ml-auto",severity:"secondary",type:"submit"},null,8,["label"])]}),_:1})]),_:1},512)],64)}}}),_U={key:0},JU={key:2},YU={class:"flex items-center gap-1"},QU={key:3,class:"list-none"},eK={key:5,class:"grid"},tK=["href"],nK={key:6,class:"w-[520px] overflow-auto",style:{"scrollbar-width":"none"}},iK={key:7,class:"grid grid-cols-[max-content,1fr] gap-2 items-center"},rK=["alt","src"],oK=["href"],Nd=Ae({__name:"TimelineContentByType",props:{detail:{}},setup(t){const e=i=>({pdf:wB,csv:yB,doc:AB,xls:SB,data:bB})[i],n=i=>{var r,o;return(o=i.filePath)==null?void 0:o.slice((((r=i.filePath)==null?void 0:r.lastIndexOf("/"))??0)+1)};return(i,r)=>i.detail.type==="text"?(g(),O("p",_U,_(i.detail.value),1)):i.detail.type==="badge"?(g(),P(Pt,{key:1,format:i.detail.format,label:i.detail.label,tooltip:i.detail.tooltip},null,8,["format","label","tooltip"])):i.detail.type==="userText"?(g(),O("span",JU,[E("span",YU,[ht(_(i.detail.text)+" ",1),L(Ml,{user:i.detail.user,type:"icon","user-name-field":"nickName"},null,8,["user"])])])):i.detail.type==="bullet"?(g(),O("ul",QU,[(g(!0),O(ue,null,Je(i.detail.value,(o,s)=>(g(),O("li",{key:s,class:"flex items-center gap-1 before:content-['•'] before:mr-1 before:ml-1"},[ht(_(typeof o=="object"?o.text:o)+" ",1),typeof o=="object"?(g(),P(Ml,{key:0,user:o.user,type:"icon","user-name-field":"nickName"},null,8,["user"])):B("",!0)]))),128))])):i.detail.type==="json"?(g(),P(ZU,{key:4,"model-value":i.detail.value,"editor-state":"readonly"},null,8,["model-value"])):i.detail.type==="taskUrl"?(g(),O("span",eK,[E("a",{class:pe(["w-full truncate hover:underline text-[#0000EE]"]),href:i.detail.url,style:{"scrollbar-width":"none"},target:"_blank",title:"Buka Link di Tab Baru"},_(i.detail.url),9,tK)])):i.detail.type=="embed"?(g(),O("div",nK,[L($A,{code:i.detail.code,readonly:""},null,8,["code"])])):(g(),O("div",iK,[i.detail.type==="image"?(g(),P(hr,{key:0,src:i.detail.filePath,class:"!w-6 !h-6 shrink-0"},null,8,["src"])):i.detail.type==="link"?(g(),P(Ee,{key:1,class:"shrink-0 w-6 h-6",icon:"link"})):["pdf","csv","doc","xls","data"].includes(i.detail.type)?(g(),O("img",{key:2,alt:i.detail.type,src:e(i.detail.type),class:"shrink-0 w-6 h-6"},null,8,rK)):B("",!0),i.detail.type==="link"?(g(),O("a",{key:3,class:pe(["w-full truncate hover:underline"]),href:i.detail.url,style:{"scrollbar-width":"none"},target:"_blank",title:"Buka Link di Tab Baru"},_(i.detail.url),9,oK)):i.detail.type!=="video"?(g(),O(ue,{key:4},[ht(_(n(i.detail)),1)],64)):B("",!0)]))}}),sK=["onClick"],aK={class:"flex justify-between items-center"},lK={class:"flex gap-1 py-0.5","data-wv-section":"itemheader"},uK=["innerHTML","onClick"],cK={key:1,class:"flex flex-col gap-1","data-wv-section":"itemdetail"},dK={key:0,class:"grid grid-cols-[max-content,max-content,auto] gap-2 py-1.5 items-start"},fK={class:"font-semibold whitespace-nowrap"},pK={key:0,class:"text-xs"},hK={key:0,class:"grid grid-cols-[max-content,max-content,auto] gap-1 items-start"},mK={key:1,class:"grid grid-rows-[max-content,auto] gap-1"},gK={class:"font-semibold whitespace-nowrap"},lg=ce("Timeline",Ae({__name:"Timeline",props:{value:{},alignDetail:{type:Boolean},noScroll:{type:Boolean},noFormatDate:{type:Boolean}},setup(t){const e=dt("preset",{}).timeline,n=r=>{const o=r.user??r.username;return typeof o!="string"?o:{nickName:o}},i=r=>r.replace(/`([^`]*)`/g,"<b>$1</b>");return(r,o)=>(g(),P(x(kA),{class:pe([{"overflow-auto":!r.noScroll}]),value:re(r.value).value,style:{"scrollbar-width":"none"}},{marker:H(({item:s})=>{var a,l,u;return[E("div",T({onClick:c=>s.showDetail=!s.showDetail},(a=x(e))==null?void 0:a.marker,{"data-wv-section":"timelinemarker"}),[L(Ee,T((l=x(e))==null?void 0:l.markerArrow(s),{icon:"arrow-down"}),null,16),E("div",it(kt((u=x(e))==null?void 0:u.markerDot(s))),null,16)],16,sK)]}),content:H(({item:s})=>{var a,l,u;return[E("div",aK,[E("div",lK,[E("h3",T({innerHTML:i(s.action)},(a=x(e))==null?void 0:a.contentHeader,{onClick:c=>s.showDetail=!s.showDetail}),null,16,uK),s.user||s.username?(g(),P(Ml,{key:0,user:n(s),type:"icon","user-name-field":"nickName"},null,8,["user"])):B("",!0)]),E("span",it(kt((l=x(e))==null?void 0:l.contentDate)),_(r.noFormatDate?s.createdAt:x(tC)(s.createdAt)),17)]),s.showDetail&&s.detail?(g(),O(ue,{key:0},["type"in s.detail?(g(),P(Nd,{key:0,detail:s.detail},null,8,["detail"])):(u=Object.keys(s.detail??{}))!=null&&u.length?(g(),O("div",cK,[r.$props.alignDetail?(g(),O("div",dK,[(g(!0),O(ue,null,Je(Object.entries(s.detail),([c,d])=>(g(),O(ue,{key:c},[E("span",fK,_(c),1),o[0]||(o[0]=E("span",{class:"font-semibold whitespace-nowrap"}," : ",-1)),typeof d=="string"?(g(),O("span",pK,_(d),1)):"type"in d?(g(),P(Nd,{key:1,detail:d},null,8,["detail"])):B("",!0)],64))),128))])):(g(!0),O(ue,{key:1},Je(Object.entries(s.detail),([c,d])=>Q(r.$slots,"detail",T({key:c,ref_for:!0},{key:c,value:d}),()=>{var f,p;return[typeof d=="string"?(g(),O("div",hK,[E("span",T({ref_for:!0},(f=x(e))==null?void 0:f.contentDetailKey),_(c)+": ",17),E("span",T({ref_for:!0},(p=x(e))==null?void 0:p.contentDetailValue),_(d),17)])):"type"in d?(g(),O("div",mK,[E("span",{class:pe(["flex gap-1",{"flex-col":d.type==="embed"}])},[E("span",gK,_(c)+": ",1),d.type!=="json"?(g(),P(Nd,{key:0,detail:d},null,8,["detail"])):B("",!0)],2),d.type==="json"?(g(),P(Nd,{key:0,detail:d},null,8,["detail"])):B("",!0)])):B("",!0)]})),128))])):B("",!0)],64)):B("",!0)]}),_:3},8,["class","value"]))}})),{plan:vK}=JSON.parse(localStorage.getItem("user")??"{}"),H6=()=>vK==="Basic",yK={class:"flex justify-between gap-[18px] dark:text-general-100"},bK={class:"w-full flex flex-col gap-[6px]"},AK={class:"flex justify-between"},wK={class:""},SK={class:"text-[16px] font-bold leading-[19.12px]"},CK={class:"flex items-center gap-[6px]"},kK={class:"text-general-400 leading-[16.39px]"},TK=["href"],OK={class:"flex flex-col gap-1"},xK={key:0,class:"flex gap-3"},MK={key:1,class:"flex gap-3"},EK={key:2,class:"flex gap-3"},IK={key:3,class:"flex gap-3"},pu=ce("AssetInfo",Ae({__name:"AssetInfo",props:{id:{},fields:{},transactionDetail:{},useNfc:{type:Boolean,default:!0},useTagType:{type:Boolean,default:!0}},setup(t,{expose:e}){const n=t;wt(async()=>{n.transactionDetail?s.value=n.transactionDetail:await p()});const i=tr(),{setLoading:r}=$i(),o=JSON.parse(localStorage.getItem("user")??"{}"),s=oe(),a=X(()=>{var h;return(h=n.fields)==null?void 0:h.includes("status")}),l=X(()=>{const{setDefault:h,firstImageMedium:m,firstImageBig:v,secondImageBig:S,secondImageMedium:b,assetImageMedium:k,assetImageBig:A}=s.value??{},w=h==="firstImage";return n.transactionDetail?{thumbnail:k,preview:A}:{thumbnail:w?m:b,preview:w?v:S}}),u=X(()=>{var h,m,v,S,b,k,A,w,y,C;return n.transactionDetail?(v=(m=(h=s.value)==null?void 0:h.assetName)==null?void 0:m.aliasCode)!=null&&v.length?`(${(b=(S=s.value)==null?void 0:S.assetName)==null?void 0:b.aliasCode})`:"":(w=(A=(k=s.value)==null?void 0:k.name)==null?void 0:A.aliasCode)!=null&&w.length?`(${(C=(y=s.value)==null?void 0:y.name)==null?void 0:C.aliasCode})`:""}),c=X(()=>{var h,m;return((h=s.value)==null?void 0:h.assetTagType)??((m=s.value)==null?void 0:m.tagType)}),d=X(()=>{var h,m;return((h=s.value)==null?void 0:h.assetName)??((m=s.value)==null?void 0:m.name)}),f=X(()=>[{"w-[69px]":!a.value,"w-[76px]":a.value}]),p=async()=>{try{r(!0);const{data:h}=H6()?await jg.getAssetDetail(n.id):await eo.getAssetDetail(n.id);h&&(s.value=h.data)}catch(h){i.add({error:h,message:"Error, failed to load asset details."})}finally{r(!1)}};return $e(()=>n.transactionDetail,h=>{s.value=h},{deep:!0}),e({asset:s}),(h,m)=>{var v,S,b,k,A,w,y,C,I,R,M,D,$,W,ie,ve,ae,me,se,Pe,Be,xe;return g(),O("div",yK,[L(hr,{src:l.value.preview},null,8,["src"]),E("div",bK,[E("div",AK,[E("div",wK,[E("div",SK,_(((v=d.value)==null?void 0:v.nameWithSequence)??"-"),1),E("div",CK,[E("span",kK,_(((S=s.value)==null?void 0:S.assetId)??"-")+" "+_(u.value),1),h.useTagType?(g(),O(ue,{key:0},[m[0]||(m[0]=E("div",{class:"w-[6px] h-[6px] rounded-full bg-general-100"},null,-1)),L(SA,{type:c.value,"use-nfc":h.useNfc},null,8,["type","use-nfc"])],64)):B("",!0)])]),x(o).userType!=="Basic"?(g(),O("a",{key:0,href:`/assets/detail/${((b=s.value)==null?void 0:b.asset)??((k=s.value)==null?void 0:k._id)}`,class:"text-primary-500",target:"_blank"}," Asset Detail > ",8,TK)):B("",!0)]),E("div",OK,[!n.fields||(A=n.fields)!=null&&A.includes("brand")?(g(),O("div",xK,[E("span",{class:pe(f.value)}," Brand ",2),m[1]||(m[1]=E("span",null,":",-1)),L(Pt,{label:((y=(w=s.value)==null?void 0:w.assetBrand)==null?void 0:y.name)??((I=(C=s.value)==null?void 0:C.brand)==null?void 0:I.name)??"-",severity:"dark"},null,8,["label"])])):B("",!0),!n.fields||(R=n.fields)!=null&&R.includes("model")?(g(),O("div",MK,[E("span",{class:pe(f.value)}," Model/Type ",2),m[2]||(m[2]=E("span",null,":",-1)),L(Pt,{label:((D=(M=s.value)==null?void 0:M.assetModel)==null?void 0:D.name)??((W=($=s.value)==null?void 0:$.model)==null?void 0:W.name)??"-",severity:"dark"},null,8,["label"])])):B("",!0),!n.fields||(ie=n.fields)!=null&&ie.includes("group")?(g(),O("div",EK,[E("span",{class:pe(f.value)}," Group ",2),m[3]||(m[3]=E("span",null,":",-1)),L(Pt,{label:((ae=(ve=s.value)==null?void 0:ve.assetGroup)==null?void 0:ae.name)??((se=(me=s.value)==null?void 0:me.group)==null?void 0:se.name)??"-"},null,8,["label"])])):B("",!0),(Pe=n.fields)!=null&&Pe.includes("status")?(g(),O("div",IK,[E("span",{class:pe(f.value)}," Asset Status ",2),m[4]||(m[4]=E("span",null,":",-1)),L(Pt,{label:((Be=s.value)==null?void 0:Be.status)??"-",severity:x(dv)((xe=s.value)==null?void 0:xe.status),format:"nowrap"},null,8,["label","severity"])])):B("",!0)])])])}}})),ine=ce("ButtonAddByScan",Ae({__name:"ButtonAddByScan",props:{modelValue:{},reportedDisposalAssets:{type:Boolean},noDisposalAssets:{type:Boolean},queryParams:{}},emits:["update:modelValue","scan"],setup(t,{emit:e}){const n=tr(),{setLoading:i}=$i(),r=t,o=e,s=async c=>{var d,f,p,h;try{i(!0);const m={...r.queryParams,tag:c.code,page:1,limit:1},{data:v}=await eo.getAvailableAssets(m);if((f=(d=v==null?void 0:v.data)==null?void 0:d.data)!=null&&f.length){const S=(p=v==null?void 0:v.data)==null?void 0:p.data[0];if((h=r.modelValue)==null?void 0:h.some(k=>k._id===S._id))n.add({severity:"error",message:"Error, this asset already exists in the list.",group:"add-by-scan-error"});else{const k=[S,...r.modelValue];o("update:modelValue",k),o("scan",{...c,asset:S})}}else n.add({severity:"error",message:"Error, this asset is not available",group:"add-by-scan-error"})}catch(m){n.add({error:m,message:"Error, failed to scan asset.",group:"add-by-scan-error"})}finally{i(!1)}},a=async c=>{var d,f,p,h;try{i(!0);const m={...r.queryParams,tag:c.code,excludeId:(d=r.modelValue)!=null&&d.length?JSON.stringify(r.modelValue.map(S=>S._id)):void 0,page:1,limit:1},{data:v}=await eo.getAllAssets(m);if((p=(f=v==null?void 0:v.data)==null?void 0:f.data)!=null&&p.length){const S=(h=v==null?void 0:v.data)==null?void 0:h.data[0];if(["On Disposal Process","Reported Disposal"].includes(S.status)){n.add({severity:"error",message:"Error, cannot add asset that is in the disposal process.",group:"add-by-scan-error"});return}const k=[S,...r.modelValue];o("update:modelValue",k),o("scan",{...c,asset:S})}else n.add({severity:"error",message:"Error, asset not found.",group:"add-by-scan-error"})}catch(m){n.add({error:m,message:"Error, failed to scan asset.",group:"add-by-scan-error"})}finally{i(!1)}},l=async c=>{var d,f,p,h;try{i(!0);const m={...r.queryParams,tag:c.code,excludeId:(d=r.modelValue)!=null&&d.length?JSON.stringify(r.modelValue.map(S=>S.asset)):void 0,page:1,limit:1},{data:v}=await Zd.getReportedDisposal(m);if((p=(f=v==null?void 0:v.data)==null?void 0:f.data)!=null&&p.length){const S=(h=v==null?void 0:v.data)==null?void 0:h.data[0],b=[S,...r.modelValue];o("update:modelValue",b),o("scan",{...c,asset:S})}else n.add({severity:"error",message:`Error, this asset is not on Reported Disposal - ${r.queryParams.reason} list.`,group:"add-by-scan-error"})}catch(m){n.add({error:m,message:"Error, failed to scan asset.",group:"add-by-scan-error"})}finally{i(!1)}},u=async c=>{r.reportedDisposalAssets?await l(c):r.noDisposalAssets?await a(c):await s(c)};return(c,d)=>(g(),O(ue,null,[L(Hs,{"base-z-index":9997,class:"!absolute !bottom-[80px] !h-max",group:"add-by-scan-error"}),L(eE,{onScan:u,bulk:"",label:"Add By Scan"})],64))}})),PK=()=>re([{field:"profilePictureSmall",header:"Photo",sortable:!0,bodyComponent(t){return{component:hr,props:{src:_d(t.profilePictureBig),size:"small"}}}},{field:"fullName",header:"Name",sortable:!0,bodyTemplate(t){return(t==null?void 0:t.fullName)??(t==null?void 0:t.name)}},{field:"employeeId",header:"Empolyee ID",sortable:!0,bodyTemplate(t){return(t==null?void 0:t.employeeId)??"-"}},{field:"email",header:"Email",sortable:!0,bodyTemplate(t){return(t==null?void 0:t.email)??"-"}},{field:"phoneNumber",header:"Phone",sortable:!0,bodyTemplate(t){return(t==null?void 0:t.phoneNumber)??"-"}},{field:"position",header:"Position",sortable:!0,bodyTemplate(t){return(t==null?void 0:t.position)??"-"}},{field:"division",header:"Division",sortable:!0,bodyTemplate(t){return(t==null?void 0:t.division)??"-"}}]),j6=t=>{if(Array.isArray(t)){const[e,n]=t;return[new Date(e).setHours(0,0,0),new Date(n??e).setHours(23,59,59)]}},LK=(t,e,n)=>{const i=Object.keys(t),r={};Ye.emit("multi-select:hide-overlay"),i.forEach(o=>{var u;const s=Array.isArray(t[o]),a=typeof t[o]=="string",l=s?(u=t[o])==null?void 0:u.filter(c=>c!=null):t[o];if((l!=null&&!s||s&&l.length)&&!a){if(Array.isArray(l)&&l.every(d=>typeof d=="number"&&d>9466848e5&&!isNaN(new Date(d).getTime()))){r[o]=JSON.stringify(j6(l));return}r[o]=l!=null&&l.length?JSON.stringify(t[o]):JSON.stringify(l)}else r[o]=t[o]}),Ye.emit("data-table:apply-filter",{tableName:e,filter:r}),Ye.emit("data-table:clear-selected-data",{tableName:e}),n==null||n("apply",r)},DK=(t,e,n,i)=>{const r={};Ye.emit("multi-select:hide-overlay"),n.forEach(o=>{if("field"in o){const s=zn(t,o.field);"value"in s&&s.value!=null&&(r[o.field]=s,"matchMode"in s&&s.matchMode=="DATE_BETWEEN"&&(r[o.field].value=j6(s.value)),Array.isArray(s.value)&&!s.value.filter(Boolean).length&&delete r[o.field])}}),Ye.emit("data-table:apply-filter",{tableName:e,filter:r}),Ye.emit("data-table:clear-selected-data",{tableName:e}),i==null||i("apply",r)},RK={class:"flex items-end justify-end gap-2","data-wv-section":"filteractionbuttons"},BK=Ae({inheritAttrs:!1,__name:"FilterContainer",props:{tableName:{default:"datatable"},fieldsPerRow:{default:4},fields:{},static:{type:Boolean}},emits:["apply"],setup(t,{emit:e}){const n=t,i=e,{locale:r}=Zt("FilterContainer"),{resetForm:o,handleSubmit:s,setValues:a}=Nf(),l=re({}),u=re({}),c=oe(),d=re(null),f=oe(!1),p=oe(0);wt(()=>{k(),Ye.on("show-filter",m),Ye.on("data-table:updated",v),I()}),Bi(()=>{Ye.off("show-filter",m),Ye.off("data-table:updated",v)});const h=n.fields.filter(M=>M.visible!==!1),m=M=>{M.tableName===n.tableName&&(f.value=M.show)},v=M=>{M.tableName===n.tableName&&(c.value=M.data)},S=async(M,D,$={})=>{if(n.static&&!M)u.value[D]=b(D);else try{l.value[D]=!0;const W={[D]:!0,...$},ie=await(M==null?void 0:M(W));if("data"in ie){const{data:ve}=ie;u.value[D]=ve.data[D]}else Array.isArray(ie)&&(u.value[D]=ie)}catch(W){console.error(W)}finally{l.value[D]=!1}},b=M=>{const D=new Set;if(c.value)for(let $=0;$<c.value.length;$++){const W=zn(c.value[$],M);D.add(W)}return Array.from(D).map($=>({label:$,value:$}))},k=()=>{if(d.value){const{children:M}=d.value,D=d.value.childElementCount,$=D%n.fieldsPerRow;let[W,ie]=[1,1];for(const ve in Array.from({length:D})){const ae=Number(ve)===D-1;M[ve].setAttribute("style",`grid-area: ${W}/${ae&&$?n.fieldsPerRow:ie}`),++ie>n.fieldsPerRow&&(ie=1,W++)}}},A=()=>{o(),p.value++},w=s(M=>{n.static?DK(M,n.tableName,h,i):LK(M,n.tableName,i)}),y=(M,D)=>{var $;switch(M.type){case"rangenumber":return M.field?`${M.field}.matchMode`:`${($=M.fields)==null?void 0:$[D]}.matchMode`;case"multiselect":case"dropdown":case"calendar":case"category":case"group":return`${M.field}.matchMode`}},C=M=>(()=>{switch(M.type){case"rangenumber":return"BETWEEN";case"multiselect":case"category":case"group":return"IN";case"dropdown":return"EQUALS";case"calendar":return"DATE_BETWEEN"}})(),I=()=>{if(n.static){const M={};h.forEach(D=>{Rs(M,y(D),C(D))}),a(M)}},R=(M,D)=>{switch(M.type){case"rangenumber":return M.field?n.static?`${M.field}.value.${D}`:`${M.field}.${D}`:n.static?`${M.fields[D]}.value`:M.fields[D];case"multiselect":case"dropdown":case"calendar":case"category":case"group":return n.static?`${M.field}.value`:`${M.field}`}};return $e(()=>n.fields,k),(M,D)=>ft((g(),O("form",T({ref_key:"container",ref:d},M.$preset.filtercontainer.root,{style:`grid-template-columns: repeat(${M.fieldsPerRow}, 1fr)`,onSubmit:D[0]||(D[0]=Ot((...$)=>x(w)&&x(w)(...$),["prevent"])),"data-wv-name":"filtercontainer"}),[(g(!0),O(ue,null,Je(x(h),$=>(g(),O(ue,{key:JSON.stringify($)+p.value},[$.type=="rangenumber"?(g(),P(CR,T({key:0,ref_for:!0},$,{mandatory:!1,"max-field-name":R($,1),"min-field-name":R($,0),"show-optional-text":!1,"use-validator":""}),null,16,["max-field-name","min-field-name"])):$.type=="multiselect"?(g(),P(oB,T({key:1,ref_for:!0},$,{"field-name":R($),loading:l.value[$.optionField??$.field],mandatory:!1,options:u.value[$.optionField??$.field],"show-optional-text":!1,onShow:W=>S($.fetchOptionFn,$.optionField??$.field,$.params),"option-label":"label","option-value":"value","use-validator":""}),null,16,["field-name","loading","options","onShow"])):$.type=="dropdown"?(g(),P(rl,T({key:2,ref_for:!0},$,{"field-name":R($),loading:l.value[$.field],mandatory:!1,options:u.value[$.optionField??$.field],"show-optional-text":!1,onShow:W=>S($.fetchOptionFn,$.optionField??$.field,$.params),"option-label":"label","option-value":"value","use-validator":""}),null,16,["field-name","loading","options","onShow"])):$.type==="calendar"?(g(),P(JE,T({key:3,ref_for:!0},$,{"field-name":R($),mandatory:!1,"show-optional-text":!1,"selection-mode":"range","use-validator":""}),null,16,["field-name"])):Q(M.$slots,"field",{key:4,field:$,fieldName:R($)})],64))),128)),E("div",RK,[L(We,{label:x(r).clearFieldText,onClick:A,"data-wv-section":"clearbutton",text:""},null,8,["label"]),L(We,{label:x(r).applyText,onClick:x(w),"data-wv-section":"applybutton",severity:"success"},null,8,["label","onClick"])])],16)),[[Xn,f.value]])}}),ug=ce("FilterContainer",Ae({__name:"FilterContainer",setup(t){return(e,n)=>(g(),P(BK,T({fields:e.$attrs.fields},e.$attrs),{field:H(({field:i,fieldName:r})=>[L(hE,T(i,{"field-data-key":i.fieldDataKey??"key","field-label":i.label,"field-name":r,label:i.buttonLabel,mandatory:!1,params:i.params,"show-optional-text":!1,"use-validator":""}),null,16,["field-data-key","field-label","field-name","label","params"])]),_:1},16,["fields"]))}})),NK=Ae({__name:"DialogSelectUserFilter",props:{tableName:{},filterOptions:{}},setup(t){const e=t,n=X(()=>[{type:"multiselect",field:"position",label:"Position",placeholder:"Select position",fetchOptionFn:()=>{var i;return(i=e.filterOptions)==null?void 0:i.positionOptions}},{type:"multiselect",field:"division",label:"Division",placeholder:"Select division",fetchOptionFn:()=>{var i;return(i=e.filterOptions)==null?void 0:i.divisionOptions}}]);return(i,r)=>(g(),P(ug,{fields:n.value,"table-name":i.tableName},null,8,["fields","table-name"]))}}),$K={class:"flex flex-col gap-2"},VK={key:0,class:"overflow-auto max-h-20 list-inside list-disc h-auto ml-2"},zK={class:"flex justify-between items-center gap-1","data-ts-section":"dialog-asset-name-detail-action-group"},FK={class:""},HK={class:"flex justify-end items-center gap-1"},jK={class:"flex flex-col justify-end gap-1"},UK={key:0,class:"text-danger-500 text-[12px] font-light","data-ts-section":"warning-message"},KK=ce("DialogSelectUser",Ae({__name:"DialogSelectUser",props:{header:{default:"Select User"},description:{default:"Select user"},selectionType:{},visible:{type:Boolean},list:{},selectButtonLabel:{default:"Select"},fetchFunction:{},fetchOptionFunction:{}},emits:["update:visible","selected"],setup(t,{emit:e}){const n=t,i=e,r=X(()=>n.visible),o=re(!1),s=re(),a=re([]),l=re(),u=PK(),c=()=>{!a.value.length&&!l.value?o.value=!0:(n.selectionType==="checkbox"?i("selected",a.value):i("selected",l.value),i("update:visible",!1))},d=()=>{a.value=[],l.value=void 0,o.value=!1},f=async p=>{if(n.fetchFunction)return await n.fetchFunction(p)};return $e(r,async p=>{d(),p&&n.fetchOptionFunction&&(s.value=await n.fetchOptionFunction())},{immediate:!0}),(p,h)=>(g(),P(rr,{visible:r.value,"onUpdate:visible":[h[3]||(h[3]=m=>r.value=m),h[4]||(h[4]=m=>i("update:visible",!!m))],draggable:!1,header:n.header,class:"w-[800px]",closable:"","data-ts-name":"dialog-asset-name-detail",modal:""},{footer:H(()=>[Q(p.$slots,"footer",{},()=>[E("div",jK,[o.value?(g(),O("span",UK," You must pick a user ")):B("",!0),E("div",null,[L(We,{onClick:h[2]||(h[2]=m=>p.$emit("update:visible",!1)),label:"Cancel",severity:"dark",text:""}),L(We,{label:n.selectButtonLabel,onClick:c,"data-ts-section":"select-button",severity:"success"},null,8,["label"])])])])]),default:H(()=>[E("div",$K,[n.list&&n.list.length?(g(),O("ul",VK,[(g(!0),O(ue,null,Je(n.list,(m,v)=>(g(),O("li",{key:v},_(m),1))),128))])):B("",!0),E("div",zK,[E("div",FK,_(p.description),1),E("div",HK,[L(mp,{"table-name":"dialog-select-user-table"}),L(dp,{"table-name":"dialog-select-user-table"})])]),L(NK,{"filter-options":s.value,"table-name":"dialog-select-user-table"},null,8,["filter-options"]),L(jp,{"selected-data":a.value,"onUpdate:selectedData":h[0]||(h[0]=m=>a.value=m),columns:x(u),"fetch-function":f,rows:10,"selection-type":n.selectionType,"use-option":!1,onRowSelect:h[1]||(h[1]=m=>{o.value=!1,l.value=l.value?void 0:m.data}),"data-key":"_id","disable-key":"",lazy:"","table-name":"dialog-select-user-table","use-paginator":""},null,8,["selected-data","columns","selection-type"])])]),_:3},8,["visible","header"]))}})),WK={key:0,class:"flex gap-1 items-center"},qK={class:"text-primary-500 text-xs font-medium"},rne=ce("ButtonSelectUser",Ae({__name:"ButtonSelectUser",props:{fetchFunction:{type:Function},fetchOptionFunction:{type:Function},modelValue:{},list:{},header:{},description:{},useBadge:{type:Boolean},confirmBeforeReselect:{type:Boolean},confirmHeader:{},confirmBody:{}},emits:["update:modelValue","confirm"],setup(t,{emit:e}){const n=t,i=e,r=X(()=>n.modelValue??void 0),o=re(!1),s=re(!1),a=async d=>{if(n.fetchFunction)return await n.fetchFunction(d)},l=async()=>{if(n.fetchOptionFunction)return await n.fetchOptionFunction()},u=()=>{n.confirmBeforeReselect?s.value=!0:o.value=!0},c=()=>{i("confirm"),o.value=!0};return(d,f)=>{var p,h,m;return g(),O(ue,null,[r.value?(g(),O("div",WK,[n.useBadge?(g(),P(Pt,{key:0,label:((p=r.value)==null?void 0:p.fullName)??((h=r.value)==null?void 0:h.name),format:"username"},null,8,["label"])):(g(),O(ue,{key:1},[L(Ee,{class:"!text-general-200",icon:"user"}),E("span",qK,_(r.value.fullName??((m=r.value)==null?void 0:m.name)),1)],64)),L(We,{onClick:u,class:"p-0 m-0 !min-w-0 !min-h-0 !h-max !w-max",text:""},{default:H(()=>[L(Ee,{icon:"pencil",severity:"primary"})]),_:1})])):(g(),P(We,{key:1,onClick:f[0]||(f[0]=v=>o.value=!0),label:"Select User"})),L(KK,{visible:o.value,"onUpdate:visible":f[1]||(f[1]=v=>o.value=v),description:n.description,"fetch-function":a,"fetch-option-function":l,header:n.header,list:n.list,onSelected:f[2]||(f[2]=v=>d.$emit("update:modelValue",v)),"selection-type":"single"},null,8,["visible","description","header","list"]),L(or,{visible:s.value,"onUpdate:visible":f[3]||(f[3]=v=>s.value=v),header:n.confirmHeader??"-",onConfirm:c,"confirm-label":"Continue",severity:"danger"},{body:H(()=>[E("p",null,_(n.confirmBody),1),f[4]||(f[4]=E("p",null,"Are you sure you want to continue?",-1))]),_:1},8,["visible","header"])],64)}}})),one=ce("ButtonViewLog",Ae({__name:"ButtonViewLog",props:{showLog:{type:Boolean}},emits:["update:showLog"],setup(t){return(e,n)=>(g(),P(We,{outlined:!e.$props.showLog,onClick:n[0]||(n[0]=i=>e.$emit("update:showLog",!e.$props.showLog)),icon:"file-lines",severity:"secondary",tooltip:"Changelog"},null,8,["outlined"]))}})),XK={class:"flex flex-col gap-3 justify-between"},GK={class:"flex flex-col max-h-20 overflow-y-auto"},ZK={class:"text-general-800 font-medium","data-ts-section":"assetparent"},_K={class:"flex flex-col max-h-20","data-ts-section":"linked-asset-family"},JK={key:3,class:"text-general-800 font-medium","data-ts-section":"confirmbody"},sne=ce("DialogLinkedAsset",Ae({__name:"DialogLinkedAsset",props:{header:{},list:{},lists:{},label:{},confirmBody:{},headerIcon:{},type:{default:"confirmation"},severity:{},confirmButtonSeverity:{},visible:{type:Boolean},closeAfterConfirm:{type:Boolean,default:!0},closeLabel:{},actionable:{type:Boolean,default:!0},confirmLabel:{},disableConfirmButton:{type:Boolean},listLabel:{},message:{},showIcon:{type:Boolean},showCloseButton:{type:Boolean},contentClass:{}},emits:["confirm","update:visible"],setup(t){var c;const e=tr(),n=t,i=X(()=>n.confirmLabel?n.confirmLabel:n.severity==="danger"?"Remove":"Submit"),r=X(()=>n.confirmBody?n.confirmBody:n.severity==="success"?"All related data will be transacted. Are you sure want to submit?":"All related data will be removed from the list. Are you want to remove it?"),o=X(()=>!!n.headerIcon||n.severity==="danger"),s=re(!1),a=re([]),l=re(!!((c=n.list)!=null&&c.length));$e(()=>n.list,()=>{l.value=!0});const u=async()=>{var d;try{if(!l.value)return;s.value=!0;const f=[],p=m=>m.family.length>1,h=({parent:m,children:v,family:S},b)=>{const k=y=>y.map(C=>({_id:C._id,name:C.name})),{_id:A,name:w}=m??b;return{parent:{_id:A,name:w},children:v.length?k(v):k(S.filter(y=>y._id!==A))}};if((d=n.list)!=null&&d.length){const{data:m}=await eo.getLinkedAssetFamily(JSON.stringify(n.list.map(v=>v._id)));m.data&&m.data.forEach(v=>{const S=v.family.find(b=>b._id===v._id);if(p(v)&&S){const b=h(v,S);f.some(A=>A.parent._id===b.parent._id)||f.push(b)}})}a.value=f}catch(f){e.removeGroup("linkedasset"),e.add({error:f,message:"Error, failed to fetch linked assets.",group:"linkedasset"})}finally{s.value=!1,l.value=!1}};return(d,f)=>(g(),P(or,T(d.$props,{"confirm-label":i.value,list:void 0,"show-icon":o.value,onConfirm:f[1]||(f[1]=p=>d.$emit("confirm",a.value)),onShow:u,"onUpdate:visible":f[2]||(f[2]=p=>d.$emit("update:visible",p)),"data-ts-name":"dialoglinkedasset"}),In({body:H(()=>[E("div",XK,[d.type==="confirmation"?(g(),O(ue,{key:0},[E("ul",GK,[(g(!0),O(ue,null,Je(d.list,p=>(g(),O("li",{key:p._id,class:"text-general-800 font-medium","data-ts-section":"assetlistitem"},_(p.name.nameWithSequence),1))),128))]),f[3]||(f[3]=E("p",{class:"text-general-800 font-medium"}," The following assets have other assets linked to them: ",-1))],64)):B("",!0),s.value?(g(),P(Ee,{key:1,class:"animate-spin h-6 w-6 self-center cursor-default !text-general-200 py-4",icon:"loader-4"})):(g(!0),O(ue,{key:2},Je(a.value,p=>(g(),O("div",{key:p.parent._id,class:"flex flex-col gap-0.5"},[E("span",ZK,_(p.parent.name.nameWithSequence)+": ",1),E("ul",_K,[(g(!0),O(ue,null,Je(p.children,h=>(g(),O("li",{key:h._id,class:"text-general-800 font-medium","data-ts-section":"assetchild"},_(h.name.nameWithSequence),1))),128))])]))),128)),d.type==="confirmation"?(g(),O("p",JK,_(r.value),1)):B("",!0)]),L(Hs,{group:"linkedasset"})]),_:2},[n.type==="detail"?{name:"footer",fn:H(()=>[L(We,{onClick:f[0]||(f[0]=p=>d.$emit("update:visible",!1)),"data-ts-section":"closebutton",label:"Close",outlined:""})]),key:"0"}:void 0]),1040,["confirm-label","show-icon"]))}})),U6=ce("UserWithIcon",Ae({__name:"UserWithIcon",props:{user:{}},setup(t){return(e,n)=>(g(),P(Ml,{user:e.user,type:"icon","user-name-field":"fullName"},null,8,["user"]))}})),YK={class:"w-full"},ane=ce("InputSearch",Ae({__name:"InputSearch",emits:["search"],setup(t,{emit:e}){const n=e,i=oe(),r=oe(),o=s=>{i.value=s.target.value||void 0,r.value=s.target.value||void 0};return(s,a)=>{var l,u;return g(),O("form",{class:pe(["text-xs flex gap-1 h-[34px] px-[21px] items-center","rounded-[18px] bg-general-50"]),onSubmit:a[1]||(a[1]=Ot(c=>n("search",i.value),["prevent"]))},[E("div",YK,[L(x(Qo),{class:pe(["h-auto !shadow-none !p-0 !text-general-500 placeholder:text-general-200 !bg-general-50"]),"model-value":r.value,onInput:o,autocomplete:"off",placeholder:"Search asset"},null,8,["model-value"])]),L(Ee,{class:pe(["text-md !text-general-400 !w-4 !h-4",{hidden:(l=r.value)==null?void 0:l.length}]),icon:"search"},null,8,["class"]),L(Ee,{class:pe(["text-md !text-general-400 !w-4 !h-4",{hidden:!((u=r.value)!=null&&u.length)}]),onClick:a[0]||(a[0]=c=>r.value=void 0),"data-ts-section":"reset-filter-icon",icon:"close"},null,8,["class"])],32)}}})),QK={class:"flex gap-1 items-center text-placeholder","data-section-name":"transaction-role-lists"},lne=ce("TransactionRoles",Ae({__name:"TransactionRoles",props:{asset:{},user:{},type:{default:"transaction"}},setup(t){const e=t,n=X(()=>e.user?"user":"asset"),i=X(()=>{const m=e.user??e.asset;if(!m)return[];const S=JSON.parse(localStorage.user??"{}").addOn,b=[{label:"Borrowing",icon:"borrow",info:h(m,"borrowing"),severity:p(m,"borrowing")},{label:"Assignment",icon:"assignment",info:h(m,"assignment"),severity:p(m,"assignment")},{label:"Transfer",icon:"exchange",info:h(m,"transfer"),severity:p(m,"transfer")},{label:"Disposal",icon:"disposal",info:h(m,"disposal"),severity:p(m,"disposal")}];if(e.type==="transaction-policy")return b;const k=n.value==="asset"?[{label:"Asset Control",icon:"gate",info:h(m,"assetControl"),severity:p(m,"assetControl"),visible:S.assetControl}]:[],A=[{label:"Audit",icon:"audit",info:h(m,"audit"),severity:p(m,"audit"),visible:S.audit},...k,{label:"Maintenance",icon:"file-settings",info:h(m,"maintenance"),severity:p(m,"maintenance"),visible:S.maintenance},{label:"Repair Ticketing",icon:"repair-ticketing",info:h(m,"repairTicketing"),severity:p(m,"repairTicketing"),visible:S.repairTicketing},{label:"Tracking",icon:"tracking",info:h(m,"tracking"),severity:p(m,"tracking"),visible:S.tracking}].filter(w=>w.visible);return[...e.type==="transaction"?b:[],...A]}),r=(m,v)=>e.type==="transaction-policy"?m?s(v):a(v):m?n.value==="user"?o(v):l(v):n.value==="user"?u(v):c(v),o=m=>{switch(m){case"borrowing":return"This user has borrowing role";case"assignment":return"This user has assignment role";case"disposal":return"This user has disposal role";case"audit":return"This user has audit role";case"repairTicketing":return"This user has repair ticketing role";case"transfer":return"This user has transfer role";case"maintenance":return"This user has maintenance routine role";case"tracking":return"This user has tracking role";default:return"This user doesn't have role"}},s=m=>{switch(m){case"borrowing":return"This asset can be borrowed";case"assignment":return"This asset can be assigned";case"disposal":return"This asset can be disposed";case"transfer":return"This asset can be transferred";default:return"This asset can be transacted"}},a=m=>{switch(m){case"borrowing":return"This asset cannot be borrowed";case"assignment":return"This asset cannot be assigned";case"disposal":return"This asset cannot be disposed";case"transfer":return"This asset cannot be transferred";default:return"This asset cannot be transacted"}},l=m=>{switch(m){case"borrowing":case"assignment":case"disposal":case"transfer":return s(m);case"audit":return"This asset has Audit Addon";case"assetControl":return"This asset has Asset Control Addon";case"maintenance":return"This asset has Maintenance Routine Addon";case"repairTicketing":return"This asset has Repair Ticketing Addon";case"tracking":return"This asset has Tracking Addon"}},u=m=>{switch(m){case"borrowing":return"This user doesn't have borrowing role";case"assignment":return"This user doesn't have assignment role";case"disposal":return"This user doesn't have disposal role";case"audit":return"This user doesn't have audit role";case"repairTicketing":return"This user doesn't have repair ticketing role";case"transfer":return"This user doesn't have transfer role";case"maintenance":return"This user doesn't have maintenance routine role";case"tracking":return"This user doesn't have tracking role";default:return"This user doesn't have role"}},c=m=>{switch(m){case"borrowing":case"assignment":case"disposal":case"transfer":return a(m);case"audit":return"This asset doesn't have Audit Addon";case"assetControl":return"This asset doesn't have Asset Control Addon";case"maintenance":return"This asset doesn't have Maintenance Routine Addon";case"repairTicketing":return"This asset doesn't have Repair Ticketing Addon";case"tracking":return"This asset doesn't have Tracking Addon"}},d=(m,v)=>{var w;if(e.type==="transaction-policy")return!!((w=m.transactions)!=null&&w[v]);const S=e.type==="addon"?m.addOn:n.value==="user"?m.transactionRoles:m.transactions,b=f(m,v),k=!!(S!=null&&S[v]),A=!!(S!=null&&S[v]);return(e.type==="addon"?k:A)&&b},f=(m,v)=>{if(["repairTicketing","maintenance","tracking","audit","assetControl"].includes(v)&&m.licenseStatuses){const S=m.licenseStatuses[v];return n.value==="asset"?!!S&&["Managed","Active"].includes(S):!0}return!0},p=(m,v)=>d(m,v)?"primary":void 0,h=(m,v)=>r(d(m,v),v);return(m,v)=>(g(),O("div",QK,[(g(!0),O(ue,null,Je(i.value,S=>(g(),P(Ee,{key:S.label,class:pe(["text-xs",{"text-general-200":!S.severity}]),"data-role-name":S.label,icon:S.icon,info:S.info,severity:S.severity},null,8,["class","data-role-name","icon","info","severity"]))),128))]))}}));var ga={},cg,K6;function eW(){return K6||(K6=1,cg=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),cg}var dg={},Vo={},W6;function Ts(){if(W6)return Vo;W6=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Vo.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},Vo.getSymbolTotalCodewords=function(i){return e[i]},Vo.getBCHDigit=function(n){let i=0;for(;n!==0;)i++,n>>>=1;return i},Vo.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');t=i},Vo.isKanjiModeEnabled=function(){return typeof t<"u"},Vo.toSJIS=function(i){return t(i)},Vo}var fg={},q6;function pg(){return q6||(q6=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,r){if(t.isValid(i))return i;try{return e(i)}catch{return r}}}(fg)),fg}var hg,X6;function tW(){if(X6)return hg;X6=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let i=0;i<n;i++)this.putBit((e>>>n-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},hg=t,hg}var mg,G6;function nW(){if(G6)return mg;G6=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,n,i,r){const o=e*this.size+n;this.data[o]=i,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,i){this.data[e*this.size+n]^=i},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},mg=t,mg}var gg={},Z6;function iW(){return Z6||(Z6=1,function(t){const e=Ts().getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const r=Math.floor(i/7)+2,o=e(i),s=o===145?26:Math.ceil((o-13)/(2*r-2))*2,a=[o-7];for(let l=1;l<r-1;l++)a[l]=a[l-1]-s;return a.push(6),a.reverse()},t.getPositions=function(i){const r=[],o=t.getRowColCoords(i),s=o.length;for(let a=0;a<s;a++)for(let l=0;l<s;l++)a===0&&l===0||a===0&&l===s-1||a===s-1&&l===0||r.push([o[a],o[l]]);return r}}(gg)),gg}var vg={},_6;function rW(){if(_6)return vg;_6=1;const t=Ts().getSymbolSize,e=7;return vg.getPositions=function(i){const r=t(i);return[[0,0],[r-e,0],[0,r-e]]},vg}var yg={},J6;function oW(){return J6||(J6=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},t.from=function(r){return t.isValid(r)?parseInt(r,10):void 0},t.getPenaltyN1=function(r){const o=r.size;let s=0,a=0,l=0,u=null,c=null;for(let d=0;d<o;d++){a=l=0,u=c=null;for(let f=0;f<o;f++){let p=r.get(d,f);p===u?a++:(a>=5&&(s+=e.N1+(a-5)),u=p,a=1),p=r.get(f,d),p===c?l++:(l>=5&&(s+=e.N1+(l-5)),c=p,l=1)}a>=5&&(s+=e.N1+(a-5)),l>=5&&(s+=e.N1+(l-5))}return s},t.getPenaltyN2=function(r){const o=r.size;let s=0;for(let a=0;a<o-1;a++)for(let l=0;l<o-1;l++){const u=r.get(a,l)+r.get(a,l+1)+r.get(a+1,l)+r.get(a+1,l+1);(u===4||u===0)&&s++}return s*e.N2},t.getPenaltyN3=function(r){const o=r.size;let s=0,a=0,l=0;for(let u=0;u<o;u++){a=l=0;for(let c=0;c<o;c++)a=a<<1&2047|r.get(u,c),c>=10&&(a===1488||a===93)&&s++,l=l<<1&2047|r.get(c,u),c>=10&&(l===1488||l===93)&&s++}return s*e.N3},t.getPenaltyN4=function(r){let o=0;const s=r.data.length;for(let l=0;l<s;l++)o+=r.data[l];return Math.abs(Math.ceil(o*100/s/5)-10)*e.N4};function n(i,r,o){switch(i){case t.Patterns.PATTERN000:return(r+o)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(r+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return r*o%2+r*o%3===0;case t.Patterns.PATTERN110:return(r*o%2+r*o%3)%2===0;case t.Patterns.PATTERN111:return(r*o%3+(r+o)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(r,o){const s=o.size;for(let a=0;a<s;a++)for(let l=0;l<s;l++)o.isReserved(l,a)||o.xor(l,a,n(r,l,a))},t.getBestMask=function(r,o){const s=Object.keys(t.Patterns).length;let a=0,l=1/0;for(let u=0;u<s;u++){o(u),t.applyMask(u,r);const c=t.getPenaltyN1(r)+t.getPenaltyN2(r)+t.getPenaltyN3(r)+t.getPenaltyN4(r);t.applyMask(u,r),c<l&&(l=c,a=u)}return a}}(yg)),yg}var $d={},Y6;function Q6(){if(Y6)return $d;Y6=1;const t=pg(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return $d.getBlocksCount=function(r,o){switch(o){case t.L:return e[(r-1)*4+0];case t.M:return e[(r-1)*4+1];case t.Q:return e[(r-1)*4+2];case t.H:return e[(r-1)*4+3];default:return}},$d.getTotalCodewordsCount=function(r,o){switch(o){case t.L:return n[(r-1)*4+0];case t.M:return n[(r-1)*4+1];case t.Q:return n[(r-1)*4+2];case t.H:return n[(r-1)*4+3];default:return}},$d}var bg={},hu={},e3;function sW(){if(e3)return hu;e3=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let i=1;for(let r=0;r<255;r++)t[r]=i,e[i]=r,i<<=1,i&256&&(i^=285);for(let r=255;r<512;r++)t[r]=t[r-255]}(),hu.log=function(i){if(i<1)throw new Error("log("+i+")");return e[i]},hu.exp=function(i){return t[i]},hu.mul=function(i,r){return i===0||r===0?0:t[e[i]+e[r]]},hu}var t3;function aW(){return t3||(t3=1,function(t){const e=sW();t.mul=function(i,r){const o=new Uint8Array(i.length+r.length-1);for(let s=0;s<i.length;s++)for(let a=0;a<r.length;a++)o[s+a]^=e.mul(i[s],r[a]);return o},t.mod=function(i,r){let o=new Uint8Array(i);for(;o.length-r.length>=0;){const s=o[0];for(let l=0;l<r.length;l++)o[l]^=e.mul(r[l],s);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},t.generateECPolynomial=function(i){let r=new Uint8Array([1]);for(let o=0;o<i;o++)r=t.mul(r,new Uint8Array([1,e.exp(o)]));return r}}(bg)),bg}var Ag,n3;function lW(){if(n3)return Ag;n3=1;const t=aW();function e(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(i){this.degree=i,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(i){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(i.length+this.degree);r.set(i);const o=t.mod(r,this.genPoly),s=this.degree-o.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(o,s),a}return o},Ag=e,Ag}var wg={},Sg={},Cg={},i3;function r3(){return i3||(i3=1,Cg.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Cg}var xr={},o3;function s3(){if(o3)return xr;o3=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
327
|
+
]))+`;xr.KANJI=new RegExp(n,"g"),xr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),xr.BYTE=new RegExp(i,"g"),xr.NUMERIC=new RegExp(t,"g"),xr.ALPHANUMERIC=new RegExp(e,"g");const r=new RegExp("^"+n+"$"),o=new RegExp("^"+t+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return xr.testKanji=function(l){return r.test(l)},xr.testNumeric=function(l){return o.test(l)},xr.testAlphanumeric=function(l){return s.test(l)},xr}var a3;function Os(){return a3||(a3=1,function(t){const e=r3(),n=s3();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return n.testNumeric(o)?t.NUMERIC:n.testAlphanumeric(o)?t.ALPHANUMERIC:n.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function i(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+r)}}t.from=function(o,s){if(t.isValid(o))return o;try{return i(o)}catch{return s}}}(Sg)),Sg}var l3;function uW(){return l3||(l3=1,function(t){const e=Ts(),n=Q6(),i=pg(),r=Os(),o=r3(),s=7973,a=e.getBCHDigit(s);function l(f,p,h){for(let m=1;m<=40;m++)if(p<=t.getCapacity(m,h,f))return m}function u(f,p){return r.getCharCountIndicator(f,p)+4}function c(f,p){let h=0;return f.forEach(function(m){const v=u(m.mode,p);h+=v+m.getBitsLength()}),h}function d(f,p){for(let h=1;h<=40;h++)if(c(f,h)<=t.getCapacity(h,p,r.MIXED))return h}t.from=function(p,h){return o.isValid(p)?parseInt(p,10):h},t.getCapacity=function(p,h,m){if(!o.isValid(p))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=r.BYTE);const v=e.getSymbolTotalCodewords(p),S=n.getTotalCodewordsCount(p,h),b=(v-S)*8;if(m===r.MIXED)return b;const k=b-u(m,p);switch(m){case r.NUMERIC:return Math.floor(k/10*3);case r.ALPHANUMERIC:return Math.floor(k/11*2);case r.KANJI:return Math.floor(k/13);case r.BYTE:default:return Math.floor(k/8)}},t.getBestVersionForData=function(p,h){let m;const v=i.from(h,i.M);if(Array.isArray(p)){if(p.length>1)return d(p,v);if(p.length===0)return 1;m=p[0]}else m=p;return l(m.mode,m.getLength(),v)},t.getEncodedBits=function(p){if(!o.isValid(p)||p<7)throw new Error("Invalid QR Code version");let h=p<<12;for(;e.getBCHDigit(h)-a>=0;)h^=s<<e.getBCHDigit(h)-a;return p<<12|h}}(wg)),wg}var kg={},u3;function cW(){if(u3)return kg;u3=1;const t=Ts(),e=1335,n=21522,i=t.getBCHDigit(e);return kg.getEncodedBits=function(o,s){const a=o.bit<<3|s;let l=a<<10;for(;t.getBCHDigit(l)-i>=0;)l^=e<<t.getBCHDigit(l)-i;return(a<<10|l)^n},kg}var Tg={},Og,c3;function dW(){if(c3)return Og;c3=1;const t=Os();function e(n){this.mode=t.NUMERIC,this.data=n.toString()}return e.getBitsLength=function(i){return 10*Math.floor(i/3)+(i%3?i%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(i){let r,o,s;for(r=0;r+3<=this.data.length;r+=3)o=this.data.substr(r,3),s=parseInt(o,10),i.put(s,10);const a=this.data.length-r;a>0&&(o=this.data.substr(r),s=parseInt(o,10),i.put(s,a*3+1))},Og=e,Og}var xg,d3;function fW(){if(d3)return xg;d3=1;const t=Os(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(i){this.mode=t.ALPHANUMERIC,this.data=i}return n.getBitsLength=function(r){return 11*Math.floor(r/2)+6*(r%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o+2<=this.data.length;o+=2){let s=e.indexOf(this.data[o])*45;s+=e.indexOf(this.data[o+1]),r.put(s,11)}this.data.length%2&&r.put(e.indexOf(this.data[o]),6)},xg=n,xg}var Mg,f3;function pW(){if(f3)return Mg;f3=1;const t=Os();function e(n){this.mode=t.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return e.getBitsLength=function(i){return i*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(n){for(let i=0,r=this.data.length;i<r;i++)n.put(this.data[i],8)},Mg=e,Mg}var Eg,p3;function hW(){if(p3)return Eg;p3=1;const t=Os(),e=Ts();function n(i){this.mode=t.KANJI,this.data=i}return n.getBitsLength=function(r){return r*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(i){let r;for(r=0;r<this.data.length;r++){let o=e.toSJIS(this.data[r]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[r]+`
|
|
328
|
+
Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),i.put(o,13)}},Eg=n,Eg}var Ig={exports:{}},h3;function mW(){return h3||(h3=1,function(t){var e={single_source_shortest_paths:function(n,i,r){var o={},s={};s[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var l,u,c,d,f,p,h,m,v;!a.empty();){l=a.pop(),u=l.value,d=l.cost,f=n[u]||{};for(c in f)f.hasOwnProperty(c)&&(p=f[c],h=d+p,m=s[c],v=typeof s[c]>"u",(v||m>h)&&(s[c]=h,a.push(c,h),o[c]=u))}if(typeof r<"u"&&typeof s[r]>"u"){var S=["Could not find a path from ",i," to ",r,"."].join("");throw new Error(S)}return o},extract_shortest_path_from_predecessor_list:function(n,i){for(var r=[],o=i;o;)r.push(o),n[o],o=n[o];return r.reverse(),r},find_path:function(n,i,r){var o=e.single_source_shortest_paths(n,i,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(n){var i=e.PriorityQueue,r={},o;n=n||{};for(o in i)i.hasOwnProperty(o)&&(r[o]=i[o]);return r.queue=[],r.sorter=n.sorter||i.default_sorter,r},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var r={value:n,cost:i};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e}(Ig)),Ig.exports}var m3;function gW(){return m3||(m3=1,function(t){const e=Os(),n=dW(),i=fW(),r=pW(),o=hW(),s=s3(),a=Ts(),l=mW();function u(S){return unescape(encodeURIComponent(S)).length}function c(S,b,k){const A=[];let w;for(;(w=S.exec(k))!==null;)A.push({data:w[0],index:w.index,mode:b,length:w[0].length});return A}function d(S){const b=c(s.NUMERIC,e.NUMERIC,S),k=c(s.ALPHANUMERIC,e.ALPHANUMERIC,S);let A,w;return a.isKanjiModeEnabled()?(A=c(s.BYTE,e.BYTE,S),w=c(s.KANJI,e.KANJI,S)):(A=c(s.BYTE_KANJI,e.BYTE,S),w=[]),b.concat(k,A,w).sort(function(C,I){return C.index-I.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function f(S,b){switch(b){case e.NUMERIC:return n.getBitsLength(S);case e.ALPHANUMERIC:return i.getBitsLength(S);case e.KANJI:return o.getBitsLength(S);case e.BYTE:return r.getBitsLength(S)}}function p(S){return S.reduce(function(b,k){const A=b.length-1>=0?b[b.length-1]:null;return A&&A.mode===k.mode?(b[b.length-1].data+=k.data,b):(b.push(k),b)},[])}function h(S){const b=[];for(let k=0;k<S.length;k++){const A=S[k];switch(A.mode){case e.NUMERIC:b.push([A,{data:A.data,mode:e.ALPHANUMERIC,length:A.length},{data:A.data,mode:e.BYTE,length:A.length}]);break;case e.ALPHANUMERIC:b.push([A,{data:A.data,mode:e.BYTE,length:A.length}]);break;case e.KANJI:b.push([A,{data:A.data,mode:e.BYTE,length:u(A.data)}]);break;case e.BYTE:b.push([{data:A.data,mode:e.BYTE,length:u(A.data)}])}}return b}function m(S,b){const k={},A={start:{}};let w=["start"];for(let y=0;y<S.length;y++){const C=S[y],I=[];for(let R=0;R<C.length;R++){const M=C[R],D=""+y+R;I.push(D),k[D]={node:M,lastCount:0},A[D]={};for(let $=0;$<w.length;$++){const W=w[$];k[W]&&k[W].node.mode===M.mode?(A[W][D]=f(k[W].lastCount+M.length,M.mode)-f(k[W].lastCount,M.mode),k[W].lastCount+=M.length):(k[W]&&(k[W].lastCount=M.length),A[W][D]=f(M.length,M.mode)+4+e.getCharCountIndicator(M.mode,b))}}w=I}for(let y=0;y<w.length;y++)A[w[y]].end=0;return{map:A,table:k}}function v(S,b){let k;const A=e.getBestModeForData(S);if(k=e.from(b,A),k!==e.BYTE&&k.bit<A.bit)throw new Error('"'+S+'" cannot be encoded with mode '+e.toString(k)+`.
|
|
329
|
+
Suggested mode is: `+e.toString(A));switch(k===e.KANJI&&!a.isKanjiModeEnabled()&&(k=e.BYTE),k){case e.NUMERIC:return new n(S);case e.ALPHANUMERIC:return new i(S);case e.KANJI:return new o(S);case e.BYTE:return new r(S)}}t.fromArray=function(b){return b.reduce(function(k,A){return typeof A=="string"?k.push(v(A,null)):A.data&&k.push(v(A.data,A.mode)),k},[])},t.fromString=function(b,k){const A=d(b,a.isKanjiModeEnabled()),w=h(A),y=m(w,k),C=l.find_path(y.map,"start","end"),I=[];for(let R=1;R<C.length-1;R++)I.push(y.table[C[R]].node);return t.fromArray(p(I))},t.rawSplit=function(b){return t.fromArray(d(b,a.isKanjiModeEnabled()))}}(Tg)),Tg}var g3;function vW(){if(g3)return dg;g3=1;const t=Ts(),e=pg(),n=tW(),i=nW(),r=iW(),o=rW(),s=oW(),a=Q6(),l=lW(),u=uW(),c=cW(),d=Os(),f=gW();function p(y,C){const I=y.size,R=o.getPositions(C);for(let M=0;M<R.length;M++){const D=R[M][0],$=R[M][1];for(let W=-1;W<=7;W++)if(!(D+W<=-1||I<=D+W))for(let ie=-1;ie<=7;ie++)$+ie<=-1||I<=$+ie||(W>=0&&W<=6&&(ie===0||ie===6)||ie>=0&&ie<=6&&(W===0||W===6)||W>=2&&W<=4&&ie>=2&&ie<=4?y.set(D+W,$+ie,!0,!0):y.set(D+W,$+ie,!1,!0))}}function h(y){const C=y.size;for(let I=8;I<C-8;I++){const R=I%2===0;y.set(I,6,R,!0),y.set(6,I,R,!0)}}function m(y,C){const I=r.getPositions(C);for(let R=0;R<I.length;R++){const M=I[R][0],D=I[R][1];for(let $=-2;$<=2;$++)for(let W=-2;W<=2;W++)$===-2||$===2||W===-2||W===2||$===0&&W===0?y.set(M+$,D+W,!0,!0):y.set(M+$,D+W,!1,!0)}}function v(y,C){const I=y.size,R=u.getEncodedBits(C);let M,D,$;for(let W=0;W<18;W++)M=Math.floor(W/3),D=W%3+I-8-3,$=(R>>W&1)===1,y.set(M,D,$,!0),y.set(D,M,$,!0)}function S(y,C,I){const R=y.size,M=c.getEncodedBits(C,I);let D,$;for(D=0;D<15;D++)$=(M>>D&1)===1,D<6?y.set(D,8,$,!0):D<8?y.set(D+1,8,$,!0):y.set(R-15+D,8,$,!0),D<8?y.set(8,R-D-1,$,!0):D<9?y.set(8,15-D-1+1,$,!0):y.set(8,15-D-1,$,!0);y.set(R-8,8,1,!0)}function b(y,C){const I=y.size;let R=-1,M=I-1,D=7,$=0;for(let W=I-1;W>0;W-=2)for(W===6&&W--;;){for(let ie=0;ie<2;ie++)if(!y.isReserved(M,W-ie)){let ve=!1;$<C.length&&(ve=(C[$]>>>D&1)===1),y.set(M,W-ie,ve),D--,D===-1&&($++,D=7)}if(M+=R,M<0||I<=M){M-=R,R=-R;break}}}function k(y,C,I){const R=new n;I.forEach(function(ie){R.put(ie.mode.bit,4),R.put(ie.getLength(),d.getCharCountIndicator(ie.mode,y)),ie.write(R)});const M=t.getSymbolTotalCodewords(y),D=a.getTotalCodewordsCount(y,C),$=(M-D)*8;for(R.getLengthInBits()+4<=$&&R.put(0,4);R.getLengthInBits()%8!==0;)R.putBit(0);const W=($-R.getLengthInBits())/8;for(let ie=0;ie<W;ie++)R.put(ie%2?17:236,8);return A(R,y,C)}function A(y,C,I){const R=t.getSymbolTotalCodewords(C),M=a.getTotalCodewordsCount(C,I),D=R-M,$=a.getBlocksCount(C,I),W=R%$,ie=$-W,ve=Math.floor(R/$),ae=Math.floor(D/$),me=ae+1,se=ve-ae,Pe=new l(se);let Be=0;const xe=new Array($),de=new Array($);let ge=0;const Ie=new Uint8Array(y.buffer);for(let q=0;q<$;q++){const U=q<ie?ae:me;xe[q]=Ie.slice(Be,Be+U),de[q]=Pe.encode(xe[q]),Be+=U,ge=Math.max(ge,U)}const Oe=new Uint8Array(R);let le=0,Se,Z;for(Se=0;Se<ge;Se++)for(Z=0;Z<$;Z++)Se<xe[Z].length&&(Oe[le++]=xe[Z][Se]);for(Se=0;Se<se;Se++)for(Z=0;Z<$;Z++)Oe[le++]=de[Z][Se];return Oe}function w(y,C,I,R){let M;if(Array.isArray(y))M=f.fromArray(y);else if(typeof y=="string"){let ve=C;if(!ve){const ae=f.rawSplit(y);ve=u.getBestVersionForData(ae,I)}M=f.fromString(y,ve||40)}else throw new Error("Invalid data");const D=u.getBestVersionForData(M,I);if(!D)throw new Error("The amount of data is too big to be stored in a QR Code");if(!C)C=D;else if(C<D)throw new Error(`
|
|
330
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
331
|
+
Minimum version required to store current data is: `+D+`.
|
|
332
|
+
`);const $=k(C,I,M),W=t.getSymbolSize(C),ie=new i(W);return p(ie,C),h(ie),m(ie,C),S(ie,I,0),C>=7&&v(ie,C),b(ie,$),isNaN(R)&&(R=s.getBestMask(ie,S.bind(null,ie,I))),s.applyMask(R,ie),S(ie,I,R),{modules:ie,version:C,errorCorrectionLevel:I,maskPattern:R,segments:M}}return dg.create=function(C,I){if(typeof C>"u"||C==="")throw new Error("No input text");let R=e.M,M,D;return typeof I<"u"&&(R=e.from(I.errorCorrectionLevel,e.M),M=u.from(I.version),D=s.from(I.maskPattern),I.toSJISFunc&&t.setToSJISFunction(I.toSJISFunc)),w(C,M,R,D)},dg}var Pg={},Lg={},v3;function y3(){return v3||(v3=1,function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(o){return[o,o]}))),i.length===6&&i.push("F","F");const r=parseInt(i.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+i.slice(0,6).join("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const r=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,o=i.width&&i.width>=21?i.width:void 0,s=i.scale||4;return{width:o,scale:o?4:s,margin:r,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,r){return r.width&&r.width>=i+r.margin*2?r.width/(i+r.margin*2):r.scale},t.getImageWidth=function(i,r){const o=t.getScale(i,r);return Math.floor((i+r.margin*2)*o)},t.qrToImageData=function(i,r,o){const s=r.modules.size,a=r.modules.data,l=t.getScale(s,o),u=Math.floor((s+o.margin*2)*l),c=o.margin*l,d=[o.color.light,o.color.dark];for(let f=0;f<u;f++)for(let p=0;p<u;p++){let h=(f*u+p)*4,m=o.color.light;if(f>=c&&p>=c&&f<u-c&&p<u-c){const v=Math.floor((f-c)/l),S=Math.floor((p-c)/l);m=d[a[v*s+S]?1:0]}i[h++]=m.r,i[h++]=m.g,i[h++]=m.b,i[h]=m.a}}}(Lg)),Lg}var b3;function yW(){return b3||(b3=1,function(t){const e=y3();function n(r,o,s){r.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,s,a){let l=a,u=s;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),s||(u=i()),l=e.getOptions(l);const c=e.getImageWidth(o.modules.size,l),d=u.getContext("2d"),f=d.createImageData(c,c);return e.qrToImageData(f.data,o,l),n(d,u,c),d.putImageData(f,0,0),u},t.renderToDataURL=function(o,s,a){let l=a;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),l||(l={});const u=t.render(o,s,l),c=l.type||"image/png",d=l.rendererOpts||{};return u.toDataURL(c,d.quality)}}(Pg)),Pg}var Dg={},A3;function bW(){if(A3)return Dg;A3=1;const t=y3();function e(r,o){const s=r.a/255,a=o+'="'+r.hex+'"';return s<1?a+" "+o+'-opacity="'+s.toFixed(2).slice(1)+'"':a}function n(r,o,s){let a=r+o;return typeof s<"u"&&(a+=" "+s),a}function i(r,o,s){let a="",l=0,u=!1,c=0;for(let d=0;d<r.length;d++){const f=Math.floor(d%o),p=Math.floor(d/o);!f&&!u&&(u=!0),r[d]?(c++,d>0&&f>0&&r[d-1]||(a+=u?n("M",f+s,.5+p+s):n("m",l,0),l=0,u=!1),f+1<o&&r[d+1]||(a+=n("h",c),c=0)):l++}return a}return Dg.render=function(o,s,a){const l=t.getOptions(s),u=o.modules.size,c=o.modules.data,d=u+l.margin*2,f=l.color.light.a?"<path "+e(l.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",p="<path "+e(l.color.dark,"stroke")+' d="'+i(c,u,l.margin)+'"/>',h='viewBox="0 0 '+d+" "+d+'"',v='<svg xmlns="http://www.w3.org/2000/svg" '+(l.width?'width="'+l.width+'" height="'+l.width+'" ':"")+h+' shape-rendering="crispEdges">'+f+p+`</svg>
|
|
333
|
+
`;return typeof a=="function"&&a(null,v),v},Dg}var w3;function AW(){if(w3)return ga;w3=1;const t=eW(),e=vW(),n=yW(),i=bW();function r(o,s,a,l,u){const c=[].slice.call(arguments,1),d=c.length,f=typeof c[d-1]=="function";if(!f&&!t())throw new Error("Callback required as last argument");if(f){if(d<2)throw new Error("Too few arguments provided");d===2?(u=a,a=s,s=l=void 0):d===3&&(s.getContext&&typeof u>"u"?(u=l,l=void 0):(u=l,l=a,a=s,s=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=s,s=l=void 0):d===2&&!s.getContext&&(l=a,a=s,s=void 0),new Promise(function(p,h){try{const m=e.create(a,l);p(o(m,s,l))}catch(m){h(m)}})}try{const p=e.create(a,l);u(null,o(p,s,l))}catch(p){u(p)}}return ga.create=e.create,ga.toCanvas=r.bind(null,n.render),ga.toDataURL=r.bind(null,n.renderToDataURL),ga.toString=r.bind(null,function(o,s,a){return i.render(o,a)}),ga}var wW=AW();const S3=pl(wW),C3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABXCAYAAACAw4LhAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAASXSURBVHgB7Z1tcho3GMcf7Qt228RoptD0m/EJgk9QfAJzg5gThJzA5AT2DUpOYHOC4BvgE3Q/NoVMBe50SANSH2kBB8zL0JGmH/z/zTCjXaRntX+9LCv4s0IelVokxCU9JVPD/gltQb4o1SgWH2kfDLXVqN/YGndznTajdUM9fG5vjVss27rWaB++fD1RY5XtiGtoQ52EOxlGjQYtAt6QR+U2Gd2NCAQFAgcGAgcGAgcmoUjcEvBPFLeJ4owAAAAAAAB4hgj5svzGJtRD/wMBb/Bq2lsyUZaQMCcEQnBKNBliLSIwEDgwEDgwEDgwEDgwEDgwEDgwEDgwEDgwEDgwEDgwQjI2oRgC3pjrCgAAAAAAwHMkth6Nw4Pva+Mvf3cJeMN6NA4L30ncKgcGAgfGm8A8JH7l2+/KYtsys4htLCNLNSl/rizvY4rlj4vXStxFvhdc9uWr8+3xf6zvuybAx7smj/jrwYJOyRSuHncc8omJ4/mWnLFURltT4KSyHIjLGWeCPLMviuL3y3Fz1F+Drnr41Pl239P4UZ3GJFfzrBNdHs4aUdBr8khC/lAk9J08etVUo09LvSD/GZGpuXSxLEl8bRClNRbynPe/5p5+rkaDd2uDqt8zWSxVZmVzV6mhW+4aQ5pqvkynXTKTq9l+m6fC8c9IJxcs1i90kFzJQuneGi05zg1pw/XkRcSjn3pq9Md7NzpMekNG9+RB2R7H6yqYT4FZjMG1PQmu9MJYk5+Aqavh4CzfLtVIp9wI/SYLW2Ghuvxed1NMZ9e1jZdjxTtVQ6WkLF885hLVue3XTUsmuWBBr7lhq/TPpGWtsC7/lG7Vw+BDnq/c5n1VHkVNrkNDDT/3XM826W/kEa8CO0Tyjkx0xb0n75GTxIp4N3+bG6HLjbDdhyyoPu+1ZMQ9iXjmbTbZ2nVrQ91FWnM6WuNHttNRJIosbP6eMMc0NVWKomOl+r28btxwR+UOecS7wG5Iy9IdD8VmfoSJ4h67GHZ5j94RhKcA7oEN8oq2U0N7dbRwQ57bnrtoOEHH5JEgH9PsVDG/WHC9ezbtrvr2QqLTt6RFe57V9qzFBcY7LGqa1tzQt35AIy7lD+Wqq4v9hGL3C9HhOl3aOsymoyp5xJ/AWreXtu2wjkTnMc1DtBBfUmQ6i98iR5M258mokNQfC47VotyTY4hvj9GjOOo9yZ9MMjuv5/GnLW7cIk3Tczs1uXrEdMH56zatHH2uA927ugn+1CO015GDvzMIxPzvDHgOFn8SCAHrmkBbAAAAAADwLBHzbwv4njEj4I25rpFbmLYv4Bedtmga1/ClZ2AgcGAgcGAgcGAgcGAgcGAgcGAgcGAgcGAgcGAgcGASiqIeAf+432aIjAAAAAAAAHiGCGdKodw7QcAb1qPHdxtZ5Mwhes+H2IHdWI/eVFexFhEYCBwYCByYmU+Or3VrrFQ7HxZqbVDjPa2nh87vp/6XuP/BLrZLg41xhSlaP2BughH0hg7SFee6yfgkz3bErnC5G9oPa7lqbs2hU67PjjyrTKPmLPZmCmnL+Zf3QJI82ynyQbrhybxx+1+nX5UHk3lnqwAAAABJRU5ErkJggg==",Rg="data:image/png;base64,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",SW=t=>{if(t!=null&&t.length){const e=t.split(""),n=e.length;return[e[0],"*",e[n-5],e[n-4],e[n-3],e[n-2],e[n-1]].join("")}return"-"},CW={key:0,class:""},kW={class:"flex items-center gap-1"},TW={class:"flex flex-col gap-3 w-fit mx-auto"},OW={class:"grid grid-cols-2 gap-x-[15px] gap-y-3"},xW=["src"],MW={key:1,class:"box",style:{border:"1px solid #000"}},EW=["src"],IW={class:"code-container"},PW=["src"],LW={key:1,class:"box",style:{border:"1px solid #000"}},DW=["src"],RW={class:"code-container"},BW={class:"flex w-100 justify-between items-center"},NW={class:"",style:{"font-weight":"300","font-size":"11.2px"}},$W={style:{position:"absolute",left:"-100vw"}},VW={id:"print-container"},zW={class:"grid-container"},FW={key:0,class:"box"},HW=["src"],jW={class:"code-container"},UW={class:"text-code"},KW=`
|
|
334
|
+
@page {
|
|
335
|
+
size: 51mm 24mm;
|
|
336
|
+
}
|
|
337
|
+
`,WW=`
|
|
338
|
+
.box {
|
|
339
|
+
width: 86.9px;
|
|
340
|
+
height: 86.9px;
|
|
341
|
+
display: flex;
|
|
342
|
+
flex-direction: column;
|
|
343
|
+
justify-content: start;
|
|
344
|
+
align-items: center;
|
|
345
|
+
padding: 5px;
|
|
346
|
+
padding-top: 3px;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.logo {
|
|
350
|
+
width: 100%;
|
|
351
|
+
height: auto;
|
|
352
|
+
aspect-ratio: 77 / 14;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.code-container {
|
|
356
|
+
width: 100%;
|
|
357
|
+
height: 100%;
|
|
358
|
+
position: relative;
|
|
359
|
+
display: flex;
|
|
360
|
+
justify-content: end;
|
|
361
|
+
align-items: end;
|
|
362
|
+
overflow: hidden;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.text-code {
|
|
366
|
+
transform: rotate(-90deg);
|
|
367
|
+
transform-origin: left center;
|
|
368
|
+
font-size: 10px;
|
|
369
|
+
font-weight: 400;
|
|
370
|
+
position: absolute;
|
|
371
|
+
left: 6px;
|
|
372
|
+
line-height: 1;
|
|
373
|
+
color: #201E29;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.qr-code-wrapper {
|
|
377
|
+
width: 61px;
|
|
378
|
+
height: 61px;
|
|
379
|
+
background-position: 42% 42%;
|
|
380
|
+
background-repeat: no-repeat;
|
|
381
|
+
background-size: 130%;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
@media print {
|
|
385
|
+
* {
|
|
386
|
+
margin: 0;
|
|
387
|
+
padding: 0;
|
|
388
|
+
box-sizing: border-box;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
body {
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.grid-container {
|
|
395
|
+
display: grid;
|
|
396
|
+
grid-template-columns: repeat(2, 24mm);
|
|
397
|
+
|
|
398
|
+
column-gap: 3mm;
|
|
399
|
+
|
|
400
|
+
width: 51mm;
|
|
401
|
+
height: auto;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.box {
|
|
405
|
+
width: 24mm;
|
|
406
|
+
height: 24mm;
|
|
407
|
+
padding: 1.5mm;
|
|
408
|
+
padding-top: 1mm;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.logo {
|
|
412
|
+
width: 94%;
|
|
413
|
+
margin-left: -0.6mm;
|
|
414
|
+
margin-top: 0.5mm;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.qr-code-wrapper {
|
|
418
|
+
width: 16.4mm;
|
|
419
|
+
height: 16.4mm;
|
|
420
|
+
background-position: center;
|
|
421
|
+
background-repeat: no-repeat;
|
|
422
|
+
background-size: 120%;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
`,qW="Q*2D1AB4",une=ce("DialogPrintQR",Ae({__name:"DialogPrintQR",props:{visible:{type:Boolean}},emits:["printed","update:visible"],setup(t,{emit:e}){const{setLoading:n}=$i(),i=tr(),r=Pr(),o=r==null?void 0:r.appContext.config.globalProperties.$htmlToPaper;wt(async()=>{d.value=await S3.toDataURL(qW)});const s=t,a=e,l=oe(),u=[{label:"Left (Default)",value:"left"},{label:"Right",value:"right"}],c=oe("left"),d=oe(""),f=re([]),p=X(()=>!l.value||l.value<1),h=X(()=>c.value==="left"?l.value&&l.value>2?4:2:l.value&&l.value>=2?4:2),m=async()=>{try{if(p.value)return;n(!0);const{data:k}=await Jd.postCreateQr(l.value);if(k){const A=k.data;for(const w of A){const y=w,C={code:y,url:await S3.toDataURL(y)};f.value.push(C)}setTimeout(()=>{v()},0)}}catch(k){i.add({error:k,message:"Error, failed to generate QR"})}finally{n(!1)}},v=async()=>{var w;const k=document.getElementById("print-container");if(k){const y=document.createElement("style");y.textContent=KW,k.appendChild(y),S("print-container")}await o("print-container",{specs:["fullscreen=yes","titlebar=no","scrollbars=no"],styles:["https://fonts.googleapis.com/css2?family=Manrope:wght@400&display=swap"],timeout:0,autoClose:!0}),a("printed"),b(),(w=k.querySelector("style"))==null||w.remove()},S=(k,A=!0)=>{const w=document.getElementById(k),y=w==null?void 0:w.querySelector('[data-style-name="print-qr-layout"]');if(A&&!y){const C=document.createElement("style");C.textContent=WW,C.setAttribute("data-style-name","print-qr-layout"),w==null||w.appendChild(C)}},b=()=>a("update:visible",!1);return $e(()=>s.visible,k=>{l.value=void 0,c.value="left",f.value=[],Et(()=>{setTimeout(()=>{S("dialog-print-qr",k)},300)})}),(k,A)=>(g(),P(rr,{id:"dialog-print-qr",draggable:!1,visible:k.visible,"onUpdate:visible":A[3]||(A[3]=w=>a("update:visible",!!w)),class:"w-[400px]",closable:"","data-ts-name":"dialog-print-qr",header:"Print Label QR",modal:""},{default:H(()=>[L(lA,{modelValue:l.value,"onUpdate:modelValue":A[0]||(A[0]=w=>l.value=w),max:100,min:1,onInput:A[1]||(A[1]=w=>l.value=w),label:"Amount",mandatory:"",placeholder:"Input amount of label"},null,8,["modelValue"]),L(rl,{modelValue:c.value,"onUpdate:modelValue":A[2]||(A[2]=w=>c.value=w),options:u,label:"Start Print From","option-label":"label","option-value":"value"},null,8,["modelValue"]),p.value?B("",!0):(g(),O("div",CW,[E("div",kW,[A[4]||(A[4]=E("span",null,"Preview",-1)),L(Ee,{icon:"info",info:`This preview is only for showing the side of the\r
|
|
426
|
+
label that printed or not. It does not show the\r
|
|
427
|
+
exact amount you entered.`,severity:"primary"})]),E("div",TW,[E("div",OW,[(g(!0),O(ue,null,Je(h.value,w=>(g(),O(ue,{key:w},[c.value==="left"?(g(),O(ue,{key:0},[l.value<w?(g(),O("img",{key:0,src:x(C3),alt:""},null,8,xW)):(g(),O("div",MW,[E("img",{src:x(Rg),alt:"",class:"logo",height:"14",width:"77"},null,8,EW),E("div",IW,[A[5]||(A[5]=E("span",{class:"text-code"},"Q*2D1AB4",-1)),E("span",{style:Yi(`background-image: url(${d.value});`),class:"qr-code-wrapper"},null,4)])]))],64)):(g(),O(ue,{key:1},[w===1||l.value<w-1?(g(),O("img",{key:0,src:x(C3),alt:""},null,8,PW)):(g(),O("div",LW,[E("img",{src:x(Rg),alt:"",class:"logo",height:"14",width:"77"},null,8,DW),E("div",RW,[A[6]||(A[6]=E("div",{class:"text-code"},"Q*2D1AB4",-1)),E("span",{style:Yi(`background-image: url(${d.value});`),class:"qr-code-wrapper"},null,4)])]))],64))],64))),128))])]),A[7]||(A[7]=E("div",{class:"mt-3 flex w-100 h-[26px] bg-general-800 text-white text-xs font-medium justify-center items-center"}," Printer Side ",-1))])),E("div",BW,[E("div",NW," Label: "+_(l.value||0)+" pcs ",1),L(We,{disabled:!l.value||l.value<0,onClick:m,label:"Start Print"},null,8,["disabled"])]),E("div",$W,[E("div",VW,[E("div",zW,[c.value==="right"?(g(),O("div",FW)):B("",!0),(g(!0),O(ue,null,Je(f.value,(w,y)=>(g(),O("div",{key:y,class:"box"},[E("img",{src:x(Rg),alt:"",class:"logo",height:"14",width:"77"},null,8,HW),E("div",jW,[E("span",UW,_(x(SW)(w.code)),1),E("span",{style:Yi(`background-image: url(${w.url});`),class:"qr-code-wrapper"},null,4)])]))),128))])])])]),_:1},8,["visible"]))}})),XW=()=>[{field:"assets.name.nameWithSequence",header:"Name",sortable:!0,fixed:!0,bodyTemplate(t){var e,n;return((n=(e=t==null?void 0:t.assets)==null?void 0:e.name)==null?void 0:n.nameWithSequence)??"-"}},{field:"assets.group.name",header:"Group",sortable:!0,fixed:!0,bodyComponent(t){var e,n;return{component:Pt,props:{label:((n=(e=t==null?void 0:t.assets)==null?void 0:e.group)==null?void 0:n.name)??"-",severity:"primary",format:"nowrap"}}}},{field:"assets.status",header:"Asset Status",sortable:!0,fixed:!0,bodyComponent(t){var n,i;let e;switch((n=t==null?void 0:t.assets)==null?void 0:n.status){case"Available":e="success";break;case"On Disposal Process":case"Reported Disposal":e="secondary";break;case"Damaged":case"Missing":case"Not Paired Yet":case"TAG Reported":e="danger";break;case"On Borrowing Process":case"On Assign Process":case"Borrowed":case"Assigned":e="primary";break;case"On Transfer":e="warning";break;default:e="primary";break}return{component:Pt,props:{severity:e,format:"nowrap",label:((i=t==null?void 0:t.assets)==null?void 0:i.status)??"-"}}}},{field:"assets.maintenanceStatus",header:"Maintenance",sortable:!0,fixed:!1,bodyComponent(t){var e;return{component:Pt,props:{severity:"warning",format:"nowrap",label:(e=t==null?void 0:t.assets)==null?void 0:e.maintenanceStatus}}}},{field:"assets.auditStatus",header:"Audit",sortable:!0,fixed:!1,bodyComponent(t){var e;return{component:Pt,props:{severity:"warning",format:"nowrap",label:(e=t==null?void 0:t.assets)==null?void 0:e.auditStatus}}}}],GW=["Available","Borrowed","On Borrowing Process","Assigned","On Assign Process","On Transfer","Damaged","Missing","On Disposal Process","Reported Disposal","Not Paired Yet","TAG Reported"],ZW=["In Maintenance","In Audit","None"],_W=[{label:"Group",field:"group",type:"group"},{type:"multiselect",field:"status",label:"Asset Status",placeholder:"Select status",fetchOptionFn:()=>GW.map(t=>({label:t,value:t}))},{type:"multiselect",field:"maintenanceAuditStatus",label:"In Maintenance / Audit",placeholder:"Select status",fetchOptionFn:()=>ZW.map(t=>({label:t,value:t}))}],JW={class:"flex flex-col gap-2"},YW={class:"flex items-center gap-1","data-ts-section":"dialog-asset-name-detail-action-group"},QW={class:"flex items-center gap-3 text-body-medium mr-auto"},eq={class:"font-bold"},cne=ce("DialogAssetNameDetail",Ae({__name:"DialogAssetNameDetail",props:{header:{default:"Asset Name Detail"},id:{},params:{},visible:{type:Boolean}},emits:["update:visible"],setup(t,{emit:e}){const n=tr(),i=t,r=e,o=XW(),s=X(()=>i.visible),a=oe("dialog-asset-name-detail-table"),l=re(),u=async()=>{try{const{data:d}=await Yd.getAssetNameDetail(i.id);l.value=d.data}catch(d){n.add({error:d,message:"Error, failed to load asset name detail"})}},c=async d=>{var f,p;try{const h=i.params?{...d,...i.params}:d,{data:m}=await Yd.getAssetsByAssetName(i.id,{...h,maintenanceAuditStatus:h!=null&&h.maintenanceAuditStatus?h==null?void 0:h.maintenanceAuditStatus:JSON.stringify(["In Maintenance","In Audit","None"])});if(m){const v=(p=(f=m==null?void 0:m.data)==null?void 0:f.data)==null?void 0:p.map((S,b)=>({...S,index:b}));return{message:m.message,data:{data:v,totalRecords:m.data.totalRecords}}}}catch(h){n.add({error:h,message:"Error, failed to load assets"})}};return(d,f)=>(g(),P(rr,{visible:s.value,"onUpdate:visible":[f[0]||(f[0]=p=>s.value=p),f[1]||(f[1]=p=>r("update:visible",!!p))],draggable:!1,header:d.header,onShow:u,class:"w-[800px]",closable:"","data-ts-name":"dialog-asset-name-detail",modal:""},{default:H(()=>{var p,h;return[E("div",JW,[E("div",YW,[E("div",QW,[E("span",eq,_(((p=l.value)==null?void 0:p.name)??"-"),1),E("span",null,"TAG: "+_(((h=l.value)==null?void 0:h.tagType)??"-")+" TAG",1)]),L(mp,{"table-name":a.value},null,8,["table-name"]),L(dp,{"table-name":a.value},null,8,["table-name"])]),L(ug,{fields:x(_W),"table-name":a.value},null,8,["fields","table-name"]),L(jp,{columns:x(o),"fetch-function":c,rows:10,"table-name":a.value,"use-option":!1,"data-key":"index",lazy:"","selection-type":"none","use-paginator":""},null,8,["columns","table-name"])])]}),_:1},8,["visible","header"]))}})),tq={class:"flex flex-col gap-3"},nq=ce("DialogReportTag",Ae({__name:"DialogReportTag",props:{id:{},tagReported:{},visible:{type:Boolean},successMessage:{},submitLabel:{},submitWithoutApi:{type:Boolean},submitFunction:{type:Function}},emits:["update:visible","reported"],setup(t,{emit:e}){const{setLoading:n}=$i(),i=tr(),r=t,o=e,s=X(()=>r.visible),a=X(()=>{var p,h,m,v,S,b,k,A,w,y,C,I,R,M,D,$,W,ie,ve,ae,me,se;const d=(p=r.tagReported)==null?void 0:p.rfid,f=(h=r.tagReported)==null?void 0:h.qr;return[{label:"RFID TAG",value:"RFID",visible:((v=(m=l.value)==null?void 0:m.asset)==null?void 0:v.rfid)&&!d&&!((k=(b=(S=l.value)==null?void 0:S.asset)==null?void 0:b.tagReported)!=null&&k.rfid)},{label:"QR TAG",value:"QR",visible:((w=(A=l.value)==null?void 0:A.asset)==null?void 0:w.qr)&&!f&&!((I=(C=(y=l.value)==null?void 0:y.asset)==null?void 0:C.tagReported)!=null&&I.qr)},{label:"RFID & QR TAG",value:"RFID & QR",visible:((M=(R=l.value)==null?void 0:R.asset)==null?void 0:M.rfid)&&(($=(D=l.value)==null?void 0:D.asset)==null?void 0:$.qr)&&!d&&!((ve=(ie=(W=l.value)==null?void 0:W.asset)==null?void 0:ie.tagReported)!=null&&ve.rfid)&&!f&&!((se=(me=(ae=l.value)==null?void 0:ae.asset)==null?void 0:me.tagReported)!=null&&se.qr)}].filter(Pe=>Pe.visible)}),l=re(),u=async d=>{try{n(!0);const p={RFID:{qr:!1,rfid:!0},QR:{qr:!0,rfid:!1},"RFID & QR":{qr:!0,rfid:!0}}[d.formValues.tagType],h="Success, TAG has been reported.";if(r.submitWithoutApi)i.add({message:r.successMessage??h}),o("reported",p),o("update:visible",!1);else if(r.submitFunction)await r.submitFunction(p)&&(i.add({message:r.successMessage??h}),o("reported",p),o("update:visible",!1));else{const{data:m}=await Jd.putReportTAG(r.id,p);m&&(i.add({message:r.successMessage??h}),o("reported",p),o("update:visible",!1))}}catch(f){i.add({error:f,message:"Error, failed to report TAG."})}finally{n(!1)}},c=X(()=>{var d,f,p,h,m;return((d=a.value)==null?void 0:d.length)>1&&((p=(f=l.value)==null?void 0:f.asset)==null?void 0:p.tagType)==="RFID & QR"?"RFID & QR":(m=(h=a.value)==null?void 0:h[0])==null?void 0:m.value});return(d,f)=>(g(),P(Up,{visible:s.value,"onUpdate:visible":f[0]||(f[0]=p=>s.value=p),"action-label":r.submitLabel??"Submit","buttons-template":["cancel","submit"],"reset-after-submit":!1,"show-stay-checkbox":!1,"use-clear-btn":!1,onClose:f[1]||(f[1]=p=>o("update:visible",!1)),action:"Submit",closable:"","data-ts-name":"report-tag",header:"Report TAG",width:"large"},{confirm:H(p=>{var h,m,v;return[L(or,{lists:[(v=(m=(h=l.value)==null?void 0:h.asset)==null?void 0:m.name)==null?void 0:v.nameWithSequence],visible:p.visible,onConfirm:S=>p.submit(u),"onUpdate:visible":S=>!S&&p.hide(),body:"Are you sure want to report it?","confirm-label":"Report","data-ts-section":"confirm-dialog",header:"Report TAG",severity:"danger"},null,8,["lists","visible","onConfirm","onUpdate:visible"])]}),fields:H(()=>{var p;return[E("div",tq,[L(pu,{id:r.id,ref_key:"assetInfo",ref:l},null,8,["id"]),(p=l.value)!=null&&p.asset?(g(),P(rl,{key:0,disabled:a.value.length<=1,"initial-value":c.value,options:a.value,"data-ts-section":"reported-tag-dropdown","field-info":"Reported TAG will be mark a damaged / missing TAG","field-name":"tagType",label:"Reported TAG",mandatory:"","option-label":"label","option-value":"value",placeholder:"Select TAG","use-validator":""},null,8,["disabled","initial-value","options"])):B("",!0)])]}),_:1},8,["visible","action-label"]))}})),iq={class:"font-bold"},rq={class:"flex flex-col gap-3"},oq={key:0,class:"flex flex-col gap-3"},sq={key:0,class:"flex items-center gap-3"},aq={class:"flex"},lq={key:0,class:"flex mr-1"},dne=ce("DialogReportDamage",Ae({__name:"DialogReportDamage",props:{id:{},reportSource:{},visible:{type:Boolean},byUser:{type:Boolean},successMessage:{},submitFunction:{type:Function}},emits:["update:visible","reported"],setup(t,{emit:e}){const n=t,i=e,{plan:r}=JSON.parse(localStorage.getItem("user")??"{}"),{setLoading:o}=$i(),s=tr(),a=X(()=>n.visible),l=X(()=>{var w,y,C,I;return((y=(w=c.value)==null?void 0:w.asset)==null?void 0:y.rfid)||((I=(C=c.value)==null?void 0:C.asset)==null?void 0:I.qr)}),u=re(),c=re(),d=oe(!1),f=oe(!1),p=oe(),h=X(()=>{var w,y;return((y=(w=c.value)==null?void 0:w.asset)==null?void 0:y.tagReported)??{}}),m=X(()=>{var R,M,D,$,W,ie;const w=(R=h.value)==null?void 0:R.qr,y=(M=h.value)==null?void 0:M.rfid,C=!!(($=(D=c.value)==null?void 0:D.asset)!=null&&$.qr),I=!!((ie=(W=c.value)==null?void 0:W.asset)!=null&&ie.rfid);return(!y&&!w||!w&&C||!y&&I)&&!f.value}),v=X(()=>{const{qr:w,rfid:y}=h.value??{};return w&&y?"RFID & QR Reported":y?"RFID Reported":w?"QR Reported":""}),S=async w=>{try{o(!0);const y={notes:w.formValues.notes,image:w.formValues.image,reportSource:n.reportSource,serialNumber:p.value},C="Success, damaged asset report has been submitted.";if(n.submitFunction)await n.submitFunction(y)&&(s.add({message:n.successMessage??C}),i("reported"),A());else{const{data:I}=await(r==="Basic"?Qd:Ug).putReportDamage(n.id,y);I&&(s.add({message:n.successMessage??C}),i("reported"),A())}}catch(y){s.add({error:y,message:"Error, failed to report damaged asset."})}finally{o(!1)}},b=async(w,y,C)=>{var I;try{const{data:R}=await eo.matchAssetWithTag(n.id,y);return p.value=C,(I=R==null?void 0:R.data)!=null&&I.totalRecords?!0:(s.add({severity:"error",message:"Error, failed to verify. TAG doesn't match.",group:"scan-error-validation"}),!1)}catch(R){s.add({error:R,message:"Error, failed to verify. TAG doesn't match.",group:"scan-error-validation"})}return!1},k=()=>{d.value=!0,A()},A=()=>{i("update:visible",!1)};return $e(a,()=>{f.value=!!n.byUser,p.value=void 0}),$e(f,w=>{var y;w||(y=u.value.form)==null||y.clearField()}),(w,y)=>(g(),O(ue,null,[L(Up,{ref_key:"dialogForm",ref:u,visible:a.value,"onUpdate:visible":y[2]||(y[2]=C=>a.value=C),"buttons-template":["cancel","submit"],"reset-after-submit":!1,"show-stay-checkbox":!1,"use-clear-btn":!1,onClose:A,action:"Submit",closable:"","data-ts-name":"report-damage",header:"Report Damage",width:"large"},{confirm:H(C=>[L(or,{visible:C.visible,onConfirm:I=>C.submit(S),"onUpdate:visible":I=>!I&&C.hide(),body:"Are you sure want to continue?","confirm-label":"Continue","data-ts-section":"confirm-dialog",header:"Report Damaged Asset",severity:"danger"},{body:H(()=>{var I,R,M;return[E("p",null,[E("span",iq,_(((M=(R=(I=c.value)==null?void 0:I.asset)==null?void 0:R.name)==null?void 0:M.nameWithSequence)??"-"),1),y[5]||(y[5]=ht(" will be reported as damaged asset. "))]),y[6]||(y[6]=E("p",null,"Are you sure want to continue?",-1))]}),_:2},1032,["visible","onConfirm","onUpdate:visible"])]),fields:H(()=>{var C,I,R,M,D;return[E("div",rq,[L(pu,{id:n.id,ref_key:"assetInfo",ref:c},null,8,["id"]),(C=c.value)!=null&&C.asset?(g(),O("div",oq,[!n.byUser&&l.value&&x(r)!=="Basic"?(g(),O("div",sq,[E("div",aq,[(R=(I=c.value)==null?void 0:I.asset)!=null&&R.rfid?(g(),O("div",lq,[L(Gu,{disabled:h.value.rfid,"scan-validation":b,onScan:y[0]||(y[0]=$=>f.value=!0),size:"small"},null,8,["disabled"]),L(Ee,{class:"w-[13.33px] h-[13.33px]",icon:"info",info:"Use short range scanner to verify asset",severity:"primary"})])):B("",!0),(D=(M=c.value)==null?void 0:M.asset)!=null&&D.qr?(g(),P(Gu,{key:1,disabled:h.value.qr,"scan-validation":b,onScan:y[1]||(y[1]=$=>f.value=!0),size:"small",type:"QR"},null,8,["disabled"])):B("",!0)]),L(Pt,{label:f.value?"Verified":"Unverified",severity:f.value?"success":"warning"},null,8,["label","severity"]),v.value?(g(),P(Pt,{key:0,label:v.value,format:"nowrap",severity:"danger"},null,8,["label"])):B("",!0),m.value?(g(),P(We,{key:1,onClick:k,label:"Report TAG",text:""})):B("",!0)])):B("",!0),L(Ks,{"data-ts-section":"condition-input",disabled:"",label:"Condition",mandatory:"","use-validator":"",value:"Damaged"}),L(tR,{disabled:!f.value&&l.value,"data-ts-section":"photo-input","field-name":"image","file-type":"jpeg",label:"Photo",mandatory:"","use-validator":""},null,8,["disabled"]),L(uc,{"custom-validation":{empty:"Note must not be empty"},disabled:!f.value&&l.value,"max-length":120,rows:3,"data-ts-section":"notes-input","field-name":"notes","input-class":"!min-h-[67px]",label:"Note",mandatory:"",placeholder:"Enter note","use-validator":""},null,8,["disabled"])])):B("",!0)])]}),_:1},8,["visible"]),L(nq,{id:n.id,visible:d.value,"onUpdate:visible":y[3]||(y[3]=C=>d.value=C),onReported:y[4]||(y[4]=C=>i("reported"))},null,8,["id","visible"])],64))}})),uq={class:"font-bold"},cq={class:"flex flex-col gap-3"},fne=ce("DialogReportMissing",Ae({__name:"DialogReportMissing",props:{id:{},reportSource:{},trackingId:{},visible:{type:Boolean},permanentlyMissing:{type:Boolean},successMessage:{},submitWithoutApi:{type:Boolean},submitFunction:{type:Function}},emits:["update:visible","reported"],setup(t,{emit:e}){const n=t,i=e,{plan:r}=JSON.parse(localStorage.getItem("user")??"{}"),{setLoading:o}=$i(),s=tr(),a=X(()=>n.visible),l=X(()=>n.permanentlyMissing?"Report Permanently Missing":"Report Missing"),u=X(()=>n.permanentlyMissing?"Report as Permanenly Missing":"Report Missing Asset"),c=re(),d=async f=>{try{o(!0);const p={notes:f.formValues.notes,reportSource:n.reportSource},h=n.permanentlyMissing?"Success, asset has been reported as permanently missing.":"Success, missing asset has been reported.";if(n.submitWithoutApi)s.add({message:n.successMessage??h}),i("reported",p),i("update:visible",!1);else if(n.submitFunction)await n.submitFunction(p)&&(s.add({message:n.successMessage??h}),i("reported"),i("update:visible",!1));else{const{data:m}=n.permanentlyMissing?await Kg.putReportPermanentlyMissing(n.trackingId??"",p):await(r==="Basic"?Wg:qg).putReportMissing(n.id,p);m&&(s.add({message:n.successMessage??h}),i("reported"),i("update:visible",!1))}}catch(p){const h=n.permanentlyMissing?"Error, failed to report asset as permanently missing.":"Error, failed to report missing asset.";s.add({error:p,message:h})}finally{o(!1)}};return(f,p)=>(g(),P(Up,{visible:a.value,"onUpdate:visible":p[0]||(p[0]=h=>a.value=h),"buttons-template":["cancel","submit"],header:l.value,"reset-after-submit":!1,"show-stay-checkbox":!1,"use-clear-btn":!1,onClose:p[1]||(p[1]=h=>i("update:visible",!1)),action:"Submit",closable:"","data-ts-name":"report-missing",width:"large"},{confirm:H(h=>[L(or,{header:u.value,visible:h.visible,onConfirm:m=>h.submit(d),"onUpdate:visible":m=>!m&&h.hide(),"confirm-label":"Report","data-ts-section":"confirm-dialog",severity:"danger"},{body:H(()=>{var m,v,S;return[E("p",null,[E("span",uq,_(((S=(v=(m=c.value)==null?void 0:m.asset)==null?void 0:v.name)==null?void 0:S.nameWithSequence)??"-"),1),ht(" will be reported as "+_(n.permanentlyMissing?"permanently missing asset":"missing asset")+". ",1)]),p[2]||(p[2]=E("p",null,"Are you sure you want to report it?",-1))]}),_:2},1032,["header","visible","onConfirm","onUpdate:visible"])]),fields:H(()=>[E("div",cq,[(g(),P(pu,{id:n.id,key:n.id,ref_key:"assetInfo",ref:c},null,8,["id"])),L(uc,{"custom-validation":{empty:"Note must not be empty"},"max-length":120,rows:3,"data-ts-section":"notes-input","field-name":"notes","input-class":"!min-h-[67px]",label:"Note",mandatory:"",placeholder:"Enter note","use-validator":""})])]),_:1},8,["visible","header"]))}})),dq={class:"w-full flex items-center justify-between pr-4"},fq={class:"flex items-center gap-2"},pq={key:0,class:"flex flex-col gap-3"},hq={class:"flex justify-between items-center"},mq={class:"flex items-center gap-1"},gq={class:"flex items-center gap-0.5"},vq={class:"flex items-center gap-0.5"},yq={class:"flex items-center gap-2"},bq={key:0,class:"flex flex-row items-center gap-1"},Aq={key:1,class:"flex flex-col gap-1"},wq={class:"flex flex-row items-center gap-1"},Sq={key:2,class:"flex flex-row items-center gap-1"},Cq={class:"text-xs font-medium text-general-400"},kq={key:1,class:"text-xs font-medium"},Tq=Ae({__name:"DialogBasicTransferLog",props:wn({id:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){const e=t,n=ni(t,"visible"),i=ro(),r=re(),o=re(),s=re(),a=re(0),l=dt("requestIds")??re([]),u=X(()=>{var S;return(S=l.value)!=null&&S.length?l.value.findIndex(b=>s.value===b):-1}),c=X(()=>{var S,b;return(S=l.value)!=null&&S.length?s.value===((b=l.value)==null?void 0:b[0]):!1}),d=X(()=>{var S,b,k;return(S=l.value)!=null&&S.length?s.value===((k=l.value)==null?void 0:k[((b=l.value)==null?void 0:b.length)-1]):!1}),f=X(()=>{var S;return(S=o.value)==null?void 0:S.map(b=>({_id:b.id,action:b.action,createdAt:b.updatedAt,title:b.action+" by",date:b.updatedAt,username:b.userFullName,body:b.action==="Handed over"?void 0:h(b.detail),detail:b.action==="Handed over"?void 0:h(b.detail)}))}),p=S=>{switch(S){case"Rejected":case"Reported Missing":return"danger";case"Waiting for Approval":case"Waiting for Handover":return"warning";case"Completed":case"Approved":return"success";default:return"primary"}},h=S=>{if(!S||!Object.keys(S).length)return;const b={},k=Object.keys(S);for(const A of k){const w=A.replace(/([A-Z])/g," $1"),y=w.charAt(0).toUpperCase()+w.slice(1);b[y==="Notes"?"Note":y]=S[A]??"-"}return b},m=async()=>{var S;if((S=s.value)!=null&&S.length)try{const{data:b}=await Xg.getTransactionLog(s.value);b&&(r.value=b.data.request,o.value=b.data.logs,a.value++)}catch(b){i.add({error:b,message:"Error, failed to load transfer transaction log"})}},v=S=>{if(u.value===-1||S==="prev"&&c.value||S==="next"&&d.value)return;const b=S==="prev"?u.value-1:u.value+1;s.value=l.value[b]};return $e(n,S=>{S&&(s.value=e.id)}),$e(s,S=>{S&&m()}),(S,b)=>(g(),P(rr,{visible:n.value,"onUpdate:visible":b[2]||(b[2]=k=>n.value=k),draggable:!1,class:"!w-[600px]","footer-class":"flex items-end justify-end gap-1",header:"Transfer Log",modal:""},{header:H(()=>[E("div",dq,[b[3]||(b[3]=E("div",{class:"flex gap-3 items-center"},[E("span",{class:"text-sm font-bold"},"Transfer Log")],-1)),E("div",fq,[L(We,{disabled:c.value,onClick:b[0]||(b[0]=k=>v("prev")),class:"!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",label:"<Prev",text:""},null,8,["disabled"]),L(We,{disabled:d.value,onClick:b[1]||(b[1]=k=>v("next")),class:"!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",label:"Next>",text:""},null,8,["disabled"])])])]),default:H(()=>{var k,A,w;return[r.value?(g(),O("div",pq,[(g(),P(pu,{id:r.value.asset,key:r.value.asset,fields:["brand","model","group"],"use-nfc":!1,"use-tag-type":!1},null,8,["id"])),E("div",hq,[E("div",mq,[E("div",gq,[b[4]||(b[4]=E("span",null,"Origin:",-1)),L(Pt,{label:(k=r.value.originGroup)==null?void 0:k.name},null,8,["label"])]),L(U6,{user:{...r.value.manager,fullName:(A=r.value.manager)==null?void 0:A.fullName}},null,8,["user"])]),E("div",vq,[b[5]||(b[5]=E("span",null,"Destination:",-1)),L(Pt,{label:(w=r.value.destinationGroup)==null?void 0:w.name},null,8,["label"])])]),E("div",yq,[b[6]||(b[6]=E("span",null,"Status:",-1)),L(Pt,{label:r.value.status,severity:p(r.value.status),format:"nowrap"},null,8,["label","severity"])]),L(fh,{"active-index":0,menu:[{label:"Transfer Log"}],type:"tab"}),(g(),P(lg,{key:a.value,value:f.value},{detail:H(y=>[y.key==="To"?(g(),O("div",bq,[b[7]||(b[7]=E("span",{class:"text-xs font-medium text-general-400"}," Destination Group: ",-1)),L(Pt,{label:y.value},null,8,["label"])])):y.key==="From"?(g(),O("div",Aq,[E("div",wq,[b[8]||(b[8]=E("span",{class:"text-xs font-medium text-general-400"}," Destination Group: ",-1)),L(Pt,{label:y.value},null,8,["label"])]),L(Ee,{class:"!text-general-800 !text-xs -rotate-90",icon:"arrow-left"})])):(g(),O("div",Sq,[E("span",Cq,_(y.key)+": ",1),y.key.includes("Group")?(g(),P(Pt,{key:0,label:y.value},null,8,["label"])):(g(),O("span",kq,_(y.value),1))]))]),_:1},8,["value"]))])):B("",!0)]}),_:1},8,["visible"]))}}),Oq={class:"w-full flex items-center justify-between pr-4"},xq={class:"flex gap-3 items-center"},Mq={class:"flex gap-1 items-center"},Eq={class:"text-xs font-medium"},Iq={class:"flex items-center gap-2"},Pq={key:0,class:"flex flex-col gap-3"},Lq={class:"flex justify-between items-center"},Dq={class:"flex items-center gap-1"},Rq={class:"flex items-center gap-0.5"},Bq={class:"flex items-center gap-0.5"},Nq={class:"flex items-center gap-2"},$q={key:0,class:"flex flex-row items-center gap-1"},Vq={key:1,class:"flex flex-col gap-1"},zq={class:"flex flex-row items-center gap-1"},Fq={key:2,class:"flex flex-row items-center gap-1"},Hq={class:"text-xs font-medium text-general-400"},jq={key:1,class:"text-xs font-medium"},Uq=Ae({__name:"DialogFullTransferLog",props:wn({id:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){const e=t,n=ni(t,"visible"),i=ro();wt(()=>{window.Cypress&&(l.value=["66406b090d664c625212ac1a","66406b090d664c625212ac22"])});const r=re(),o=re(),s=re(),a=re(0),l=dt("requestIds")??re([]),u=X(()=>{var S;return(S=l.value)!=null&&S.length?l.value.findIndex(b=>s.value===b):-1}),c=X(()=>{var S,b;return(S=l.value)!=null&&S.length?s.value===((b=l.value)==null?void 0:b[0]):!1}),d=X(()=>{var S,b,k;return(S=l.value)!=null&&S.length?s.value===((k=l.value)==null?void 0:k[((b=l.value)==null?void 0:b.length)-1]):!1}),f=X(()=>{var S;return(S=o.value)==null?void 0:S.map(b=>({_id:b._id,action:b.action,createdAt:b.updatedAt,title:b.action+" by",date:b.updatedAt,username:b.userFullName,body:b.action==="Handed over"?void 0:h(b.detail),detail:b.action==="Handed over"?void 0:h(b.detail)}))}),p=S=>{switch(S){case"Rejected":case"Reported Missing":return"danger";case"Waiting for Approval":case"Waiting for Handover":return"warning";case"Completed":case"Approved":return"success";default:return"primary"}},h=S=>{if(!S||!Object.keys(S).length)return;const b={},k=Object.keys(S);for(const A of k){const w=A.replace(/([A-Z])/g," $1"),y=w.charAt(0).toUpperCase()+w.slice(1);b[y==="Notes"?"Note":y]=S[A]??"-"}return b},m=async()=>{var S;if((S=s.value)!=null&&S.length)try{const{data:b}=await Gg.getTransactionLog(s.value);b&&(r.value=b.data.request,o.value=b.data.logs,a.value++)}catch(b){i.add({error:b,message:"Error, failed to load transfer transaction log"})}},v=S=>{if(u.value===-1||S==="prev"&&c.value||S==="next"&&d.value)return;const b=S==="prev"?u.value-1:u.value+1;s.value=l.value[b]};return $e(n,S=>{S&&(s.value=e.id)}),$e(s,S=>{S&&m()}),(S,b)=>(g(),P(rr,{visible:n.value,"onUpdate:visible":b[2]||(b[2]=k=>n.value=k),draggable:!1,class:"!w-[600px]","footer-class":"flex items-end justify-end gap-1",header:"Transfer Log",modal:""},{header:H(()=>{var k,A;return[E("div",Oq,[E("div",xq,[b[3]||(b[3]=E("span",{class:"text-sm font-bold"},"Transfer Log",-1)),E("div",Mq,[E("span",Eq,_(((k=r.value)==null?void 0:k.transactionId)??"-"),1),L(Nx,{text:((A=r.value)==null?void 0:A.transactionId)??""},null,8,["text"])])]),E("div",Iq,[L(We,{disabled:c.value,onClick:b[0]||(b[0]=w=>v("prev")),class:"!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",label:"<Prev",text:""},null,8,["disabled"]),L(We,{disabled:d.value,onClick:b[1]||(b[1]=w=>v("next")),class:"!p-0 !m-0 !h-auto !focus:ring-[0px] !dark:focus:ring-[0px] !ring-0",label:"Next>",text:""},null,8,["disabled"])])])]}),default:H(()=>{var k,A,w;return[r.value?(g(),O("div",Pq,[(g(),P(pu,{id:r.value.asset,key:r.value.asset,fields:["brand","model"]},null,8,["id"])),E("div",Lq,[E("div",Dq,[E("div",Rq,[b[4]||(b[4]=E("span",null,"Origin:",-1)),L(Pt,{label:(k=r.value.originGroup)==null?void 0:k.name},null,8,["label"])]),L(U6,{user:{...r.value.manager,fullName:(A=r.value.manager)==null?void 0:A.fullName}},null,8,["user"])]),E("div",Bq,[b[5]||(b[5]=E("span",null,"Destination:",-1)),L(Pt,{label:(w=r.value.destinationGroup)==null?void 0:w.name},null,8,["label"])])]),E("div",Nq,[b[6]||(b[6]=E("span",null,"Status:",-1)),L(Pt,{label:r.value.status,severity:p(r.value.status),format:"nowrap"},null,8,["label","severity"])]),L(fh,{"active-index":0,menu:[{label:"Transfer Log"}],type:"tab"}),(g(),P(lg,{key:a.value,value:f.value},{detail:H(y=>[y.key==="To"?(g(),O("div",$q,[b[7]||(b[7]=E("span",{class:"text-xs font-medium text-general-400"}," Destination Group: ",-1)),L(Pt,{label:y.value},null,8,["label"])])):y.key==="From"?(g(),O("div",Vq,[E("div",zq,[b[8]||(b[8]=E("span",{class:"text-xs font-medium text-general-400"}," Destination Group: ",-1)),L(Pt,{label:y.value},null,8,["label"])]),L(Ee,{class:"!text-general-800 !text-xs -rotate-90",icon:"arrow-left"})])):(g(),O("div",Fq,[E("span",Hq,_(y.key)+": ",1),y.key.includes("Group")?(g(),P(Pt,{key:0,label:y.value},null,8,["label"])):(g(),O("span",jq,_(y.value),1))]))]),_:1},8,["value"]))])):B("",!0)]}),_:1},8,["visible"]))}}),pne=ce("DialogTransferLog",Ae({__name:"DialogTransferLog",props:wn({id:{},visible:{type:Boolean}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(t){const e=ni(t,"visible");return(n,i)=>x(H6)()?(g(),P(Tq,{key:0,id:n.id,visible:e.value,"onUpdate:visible":i[0]||(i[0]=r=>e.value=r)},null,8,["id","visible"])):(g(),P(Uq,{key:1,id:n.id,visible:e.value,"onUpdate:visible":i[1]||(i[1]=r=>e.value=r)},null,8,["id","visible"]))}})),Kq={class:"w-full flex items-center justify-between"},Wq={class:"flex items-center gap-2"},qq=["disabled"],Xq=["disabled"],Gq={class:"flex items-start gap-[18px]"},Zq={class:"flex flex-col w-full"},_q={class:"w-full flex items-center justify-between"},Jq={class:"text-body-medium !font-bold"},Yq={class:"flex items-center gap-[6px] text-general-400"},Qq={class:"flex gap-3 w-full mt-[6px]"},eX={class:"flex flex-col gap-1 items-start self-stretch"},tX={class:"flex gap-2"},nX=["data-wv-section"],iX={class:"text-body-medium text-general-400","data-wv-section":"key"},rX={key:1,class:"text-body-medium"},hne=ce("DialogDamageLog",Ae({__name:"DialogDamageLog",props:wn({id:{},listId:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:wn(["prev","next"],["update:modelValue"]),setup(t,{emit:e}){const n=t,i=e,r=ni(t,"modelValue"),o=tr(),{setLoading:s}=$i(),a=re(),l=re(0),u=re(0),c=X(()=>n.listId),d=[{label:"Damage Log"}],f=re([]),p=X(()=>{var C,I;switch((I=(C=a.value)==null?void 0:C.request)==null?void 0:I.status){case"Damaged":return"danger";case"Repaired":return"success";default:return"dark"}}),h=async C=>(k(C),await m(l.value)),m=async C=>{var I;try{s(!0);const{data:R}=await Qd.getDamageReportDetail(c.value[C]);a.value=R.data,f.value=b((I=a.value)==null?void 0:I.logs),u.value++}catch(R){o.add({error:R,message:"Error, failed to fetch damage detail."})}finally{s(!1)}},v=C=>{switch(C){case"Reported Damaged":return"Reported damaged by";case"Reported Disposal":return"Reported disposal by";case"Repaired":return"Marked as repaired asset by";case"Disposal Report Canceled":return"Reported disposal canceled by";case"Disposal Report Declined":return"Reported disposal declined by";case"Disposed":return"Asset has been disposed";default:return""}},S=(C,I)=>{switch(C){case"Reported Damaged":return{Note:(I==null?void 0:I.notes)??"-","Damaged Photo":(I==null?void 0:I.damagedPhotoBig)??(I==null?void 0:I.damagedPhoto),Source:(I==null?void 0:I.reportSource)??"-"};case"Reported Disposal":return{Note:(I==null?void 0:I.notes)??"-"}}},b=C=>C.map(I=>({_id:I._id,action:v(I.action),date:I.createdAt,username:I.userFullName,danger:!1,detail:S(I.action,I.detail),createdAt:I.createdAt})),k=C=>{var R;const I=(R=n.listId)==null?void 0:R.findIndex(M=>M===C);l.value=I},A=()=>{l.value++,i("next",l.value)},w=()=>{l.value--,i("prev",l.value)},y=()=>{var C,I;Sa(`/assets/detail/${(I=(C=a.value)==null?void 0:C.request)==null?void 0:I.asset}`)};return $e(()=>l.value,C=>{m(C)}),(C,I)=>(g(),P(rr,{visible:r.value,"onUpdate:visible":I[0]||(I[0]=R=>r.value=R),onShow:I[1]||(I[1]=R=>h(C.id)),class:"w-[600px]",modal:""},{header:H(()=>[E("div",Kq,[I[2]||(I[2]=E("h1",{class:"!text-base font-bold"},"Damage Log",-1)),E("div",Wq,[E("button",{class:pe([l.value===0?"text-general-100":"text-primary","text-xs font-medium"]),disabled:l.value===0,onClick:w,"data-wv-section":"prev-button"}," <Prev ",10,qq),E("button",{class:pe([l.value===c.value.length-1||c.value.length===1?"text-general-100":"text-primary","text-xs font-medium"]),disabled:l.value===c.value.length-1||c.value.length===1,onClick:A,"data-wv-section":"next-button"}," Next> ",10,Xq)])])]),default:H(()=>{var R,M,D,$,W,ie,ve,ae,me,se,Pe,Be,xe,de,ge,Ie,Oe,le,Se,Z,q,U,J,ke,He,j,he,De,nt;return[E("div",Gq,[L(hr,{src:(M=(R=a.value)==null?void 0:R.request)==null?void 0:M.assetImageBig,size:"big"},null,8,["src"]),E("div",Zq,[E("div",_q,[E("p",Jq,_((W=($=(D=a.value)==null?void 0:D.request)==null?void 0:$.assetName)==null?void 0:W.nameWithSequence),1),E("button",{onClick:y,class:"!text-xs font-medium !text-primary-500","data-wv-section":"detail-button"}," Asset Detail > ")]),E("div",Yq,[E("p",null,_(((ve=(ie=a.value)==null?void 0:ie.request)==null?void 0:ve.assetId)??"-")+" "+_((Pe=(se=(me=(ae=a.value)==null?void 0:ae.request)==null?void 0:me.assetName)==null?void 0:se.aliasCode)!=null&&Pe.length?`(${(de=(xe=(Be=a.value)==null?void 0:Be.request)==null?void 0:xe.assetName)==null?void 0:de.aliasCode})`:""),1),x(J3)()==="Enterprise"?(g(),O(ue,{key:0},[I[3]||(I[3]=E("div",{class:"w-[6px] h-[6px] bg-general-100 rounded"},null,-1)),(Ie=(ge=a.value)==null?void 0:ge.request)!=null&&Ie.tagType?(g(),P(SA,{key:0,type:(le=(Oe=a.value)==null?void 0:Oe.request)==null?void 0:le.tagType},null,8,["type"])):B("",!0)],64)):B("",!0)]),E("div",Qq,[I[4]||(I[4]=E("div",{class:"flex flex-col justify-between items-start self-stretch"},[E("p",null,"Brand"),E("p",null,"Model/Type"),E("p",null,"Group")],-1)),I[5]||(I[5]=E("div",{class:"flex flex-col justify-between items-start self-stretch"},[E("p",null,":"),E("p",null,":"),E("p",null,":")],-1)),E("div",eX,[L(Pt,{label:(q=(Z=(Se=a.value)==null?void 0:Se.request)==null?void 0:Z.assetBrand)==null?void 0:q.name,format:"nowrap",severity:"dark"},null,8,["label"]),L(Pt,{label:(ke=(J=(U=a.value)==null?void 0:U.request)==null?void 0:J.assetModel)==null?void 0:ke.name,format:"nowrap",severity:"dark"},null,8,["label"]),L(Pt,{label:(he=(j=(He=a.value)==null?void 0:He.request)==null?void 0:j.assetGroup)==null?void 0:he.name,format:"nowrap",severity:"primary"},null,8,["label"])])])])]),E("div",tX,[I[6]||(I[6]=E("p",{class:"text-xs font-medium tracking-tight"},"Status:",-1)),L(Pt,{label:(nt=(De=a.value)==null?void 0:De.request)==null?void 0:nt.status,severity:p.value,format:"nowrap"},null,8,["label","severity"])]),L(fh,{"active-index":0,menu:d,type:"tab"}),f.value.length?(g(),P(lg,{key:u.value,value:f.value},{detail:H(({key:St,value:lt})=>[E("div",{class:pe(["flex gap-1 items-baseline",{"flex-col":St==="Damaged Photo"}]),"data-wv-section":St},[E("span",iX,_(St)+": ",1),St==="Damaged Photo"?(g(),P(hr,{key:0,src:lt,width:36},null,8,["src"])):(g(),O("span",rX,_(lt),1))],10,nX)]),_:1},8,["value"])):B("",!0)]}),_:1},8,["visible"]))}})),oX=Ae({__name:"DisposalReportBulkAction",props:{tableName:{}},emits:["noted","removed"],setup(t,{emit:e}){const{t:n}=Va(),i=t,r=e,o=re([]),s=oe(!1),a=oe(),l=[{label:n("Note"),icon:"note",useAdditionSlot:!0,command:()=>{r("noted",o.value,a.value),Ye.emit("data-table:clear-selected-data",{tableName:i.tableName}),a.value=void 0}},{label:n("Remove from List"),icon:"delete-bin",danger:!0,command:()=>{s.value=!0}}],u=()=>{r("removed",o.value),Ye.emit("data-table:clear-selected-data",{tableName:i.tableName})};return(c,d)=>(g(),O(ue,null,[L(Bx,T({"selected-data":o.value,"onUpdate:selectedData":d[1]||(d[1]=f=>o.value=f)},c.$attrs,{options:l,"table-name":c.tableName,naming:"Asset(s)"}),{addition:H(({selectedOption:f})=>[(f==null?void 0:f.label)===x(n)("Note")?(g(),P(uc,{key:0,modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=p=>a.value=p),placeholder:x(n)("Enter note"),rows:1,"textarea-pt":{root:{maxlength:30}},class:"!max-w-[250px]"},null,8,["modelValue","placeholder"])):B("",!0)]),_:1},16,["selected-data","table-name"]),L(or,{visible:s.value,"onUpdate:visible":d[2]||(d[2]=f=>s.value=f),"confirm-label":x(n)("Remove"),header:x(n)("Remove from List"),list:o.value,message:x(n)("Are you sure you want to remove it?"),onConfirm:u,"list-label":"name.nameWithSequence",severity:"danger"},null,8,["visible","confirm-label","header","list","message"])],64))}}),sX=Ae({__name:"DisposalReportTableFilter",props:{assets:{},tableName:{}},setup(t){const e=t,n=tr(),{t:i}=Va(),r=oe([{label:i("Name"),placeholder:i("Select asset name"),field:"name.key",type:"multiselect",fetchOptionFn:async()=>a("nameOptions")},{label:i("Brand"),placeholder:i("Select brand"),field:"brand.key",type:"multiselect",fetchOptionFn:async()=>a("brandOptions")},{label:i("Model/Type"),placeholder:i("Select model/type"),field:"model.key",type:"multiselect",fetchOptionFn:async()=>a("modelOptions")},{label:i("Group"),field:"group.key",type:"group"}]),o=oe(e.assets.length),s=re({}),a=async l=>{var u;try{s.value[l]=!0;const c=e.assets.map(p=>p._id??"");o.value=c.length;const d={_id:JSON.stringify(c),[l]:!0},{data:f}=await eo.getOptions("by-id",d);return(u=f.data)==null?void 0:u[l]}catch(c){return console.error(c),n.add({error:c,message:"Error, failed to get filter option."}),[]}finally{s.value[l]=!1}};return(l,u)=>(g(),P(ug,{fields:r.value,"table-name":l.tableName,class:"!gap-x-3 !gap-y-4 !p-3","data-ts-name":"diposalreportfilter",static:""},null,8,["fields","table-name"]))}}),aX={class:"flex flex-col gap-2","data-ts-section":"disposalreporttablewrapper"},lX={class:"flex gap-1 justify-end"},uX={class:"flex gap-1 justify-end"},cX=Ae({__name:"DisposalReportTable",props:{treeTable:{type:Boolean},childTableProps:{},tableName:{},tableTitle:{},useOption:{type:Boolean},data:{},disableKey:{},includeCheckDisabledRows:{type:Boolean},highlightKey:{},disableAllRows:{type:Boolean},search:{},tag:{},defaultQueryParams:{},fetchFunction:{type:Function},rows:{},isSelectedAll:{type:Boolean},filters:{},lazy:{type:Boolean},loading:{type:Boolean},selectionType:{},useSelection:{type:Boolean},selectedData:{},expandedRows:{},usePaginator:{type:Boolean},options:{},singleSelect:{type:Boolean},customColumn:{type:Boolean},scrollHeight:{},rowHeight:{},reorderable:{type:Boolean},globalFilterFields:{},totalDisabledRows:{},excelToastErrorMessage:{},emptyTableMessage:{},singleSelection:{},router:{},reason:{}},setup(t){const e=t;wt(()=>{p()});const n=tr(),{t:i}=Va(),{setLoading:r}=$i(),o=oe(!1),s=oe(!1),a=oe(0),l=oe([]),u=oe(),c=oe([]),d=re(new Map),f=[{field:"assetImageSmall",header:"Photo",style:"min-width: 72px",fixed:!0,sortable:!0,excluded:!0,bodyComponent:A=>({component:hr,props:{src:A.assetImageBig,description:"asset-report-photo",size:"small"}})},{header:"Name",field:"name.nameWithSequence",sortable:!0,fixed:!0,bodyTemplate:A=>{var w;return((w=A.name)==null?void 0:w.nameWithSequence)??"-"}},{header:"Brand",field:"brand.name",sortable:!0,fixed:!1,bodyComponent:A=>{var w;return{component:Pt,props:{label:(w=A.brand)==null?void 0:w.name,severity:"dark",format:"nowrap"}}}},{header:"Model/Type",field:"model.name",sortable:!0,fixed:!1,bodyComponent:A=>{var w;return{component:Pt,props:{label:(w=A.model)==null?void 0:w.name,severity:"dark",format:"nowrap"}}}},{header:"Group",field:"group.name",sortable:!0,fixed:!1,bodyComponent:A=>{var w;return{component:Pt,props:{label:(w=A.group)==null?void 0:w.name,format:"nowrap"}}}},{header:"Note",field:"note",fixed:!0,bodyComponent:A=>({component:uc,props:{modelValue:d.value.get(A._id??"assetId"),placeholder:i("Enter note"),rows:1,textareaPt:{root:{maxlength:30}}},events:{"update:modelValue":w=>{d.value.set(A._id??"assetId",w),A.note=w}}})}],p=async()=>{try{r(!0);const A=sessionStorage.getItem("assetsDisposalReport")??"[]",{data:w}=await eo.getAssetsById(A,{});w.data.data.forEach(y=>{d.value.set(y._id??"",null)}),c.value=w.data.data,console.log("🚀 ~ getAssetsToReport ~ assetsToReport.value:",c.value),a.value=w.data.totalRecords}catch(A){console.error(A),n.add({error:A,message:"Error, failed to get assets. "})}finally{r(!1)}},h=[{label:i("Remove from List"),icon:"delete-bin",danger:!0,command:()=>{o.value=!0}}],m=A=>{c.value=c.value.filter(w=>!A.some(y=>w._id===y._id)),v(A)},v=A=>{A.forEach(w=>{d.value.delete(w._id??"")}),c.value.length||b(),n.add({message:i("Success, asset has been removed from the list."),severity:"success"})},S=(A,w)=>{A.forEach(y=>{d.value.set(y._id??"",w??null)})},b=()=>{const A=window.location.pathname,w=A.slice(0,A.lastIndexOf("/"));e.router.replace(w),sessionStorage.removeItem("assetsDisposalReport")},k=async()=>{const A=[];d.value.forEach((w,y)=>{const C={asset:y,notes:w,reason:e.reason};A.push(C)});try{r(!0),await Zd.postReportDisposal({data:A}),n.add({message:i("Success, disposal report has been submitted.")}),b()}catch(w){console.error(w),n.add({error:w,message:i("Error, failed to submit disposal report.")})}finally{r(!1)}};return(A,w)=>(g(),O(ue,null,[E("div",aX,[E("div",lX,[L(oX,{"assets-to-report":c.value,"onUpdate:assetsToReport":w[0]||(w[0]=y=>c.value=y),"selected-data":l.value,"onUpdate:selectedData":w[1]||(w[1]=y=>l.value=y),onNoted:S,onRemoved:w[2]||(w[2]=y=>m(y)),"table-name":"disposal-report-page-table"},null,8,["assets-to-report","selected-data"]),L(mp,{class:"ml-auto","table-name":"disposal-report-page-table"}),L(dp,{"table-name":"disposal-report-page-table"})]),L(sX,{assets:c.value,"table-name":"disposal-report-page-table"},null,8,["assets"]),L(jp,T(A.$props,{columns:f,data:c.value,lazy:!1,options:h,rows:10,onToggleOption:w[3]||(w[3]=y=>u.value=y),"data-key":"_id","rounded-header":"","selection-type":"checkbox","table-name":"disposal-report-page-table","use-option":"","use-paginator":""}),null,16,["data"])]),L(or,{visible:o.value,"onUpdate:visible":w[4]||(w[4]=y=>o.value=y),body:x(i)("Are you sure you want to remove it?"),"confirm-label":x(i)("Remove"),header:x(i)("Remove from List"),lists:[u.value],onConfirm:w[5]||(w[5]=y=>m([u.value])),"list-label":"name.nameWithSequence",severity:"danger"},null,8,["visible","body","confirm-label","header","lists"]),L(or,{visible:s.value,"onUpdate:visible":w[6]||(w[6]=y=>s.value=y),"confirm-label":x(i)("Continue"),header:x(i)("Cancel Report"),onConfirm:b,severity:"danger"},{body:H(()=>[E("p",null,_(x(i)("This action will cancel the disposal report.")),1),E("p",null,_(x(i)("Are you sure you want to continue?")),1)]),_:1},8,["visible","confirm-label","header"]),E("div",uX,[L(We,{label:x(i)("Cancel"),onClick:w[7]||(w[7]=y=>s.value=!0),severity:"dark",text:""},null,8,["label"]),L(We,{label:x(i)("Submit"),onClick:k,severity:"success"},null,8,["label"])])],64))}}),dX={class:"flex flex-col gap-3","data-ts-name":"disposalreport"},fX={class:"text-general-800 font-bold text-base leading-[21.86px] tracking-[0.02em]","data-ts-section":"pagetitle"},mne=ce("DisposalReport",Ae({__name:"DisposalReport",props:{router:{},reason:{}},setup(t){const{t:e}=Va();return(n,i)=>(g(),P(nI,null,{content:H(()=>[E("div",dX,[E("h2",fX,_(x(e)("Asset Disposal")),1),L(cX,it(kt(n.$props)),null,16)])]),_:1}))}})),pX={class:"flex gap-3 items-center","data-ts-name":"steps","data-ts-section":"root"},gne=ce("Steps",Ae({__name:"Steps",props:{steps:{},currentStep:{}},setup(t){return(e,n)=>(g(),O("div",pX,[(g(!0),O(ue,null,Je(e.steps,(i,r)=>(g(),O("div",{key:i.toString(),class:pe(["flex gap-1 items-center text-general-300 text-xs font-semibold",{"!text-primary-500":r+1===e.currentStep}]),"data-ts-section":"stepitem"},[E("span",{class:pe(["flex items-center justify-center","rounded-full border-2 w-5 h-5 tracking-[0.03em]","bg-general-50","border-general-300",{"!bg-primary-50 !border-primary-500":r+1===e.currentStep}]),"data-ts-section":"stepnumber"},_(r+1),3),ht(" "+_(typeof i=="string"?i:i.label),1)],2))),128))]))}})),hX="data:image/svg+xml,%3csvg%20width='125'%20height='125'%20viewBox='0%200%20125%20125'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20x='0.25'%20y='0.25'%20width='124.5'%20height='124.5'%20rx='7.75'%20fill='%23EBEAF0'/%3e%3crect%20x='0.25'%20y='0.25'%20width='124.5'%20height='124.5'%20rx='7.75'%20stroke='%23D9DBE9'%20stroke-width='0.5'/%3e%3crect%20x='26'%20y='32'%20width='74'%20height='62'%20fill='url(%23pattern0_7801_14173)'%20fill-opacity='0.25'/%3e%3cdefs%3e%3cpattern%20id='pattern0_7801_14173'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_7801_14173'%20transform='matrix(0.00382482%200%200%200.00458979%200.0059523%200)'/%3e%3c/pattern%3e%3cimage%20id='image0_7801_14173'%20width='747'%20height='215'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,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'/%3e%3c/defs%3e%3c/svg%3e",{plan:k3}=JSON.parse(localStorage.getItem("user")??"{}"),xs=t=>{const e=[],n=window.location.pathname,i=Ds(t);return n.includes("approval")?i.approver&&e.push("Approval"):(i.manager&&e.push("Manager"),i.monitoringReport&&e.push("Monitoring"),i.staff&&e.push("Staff")),e},mX=()=>{const t=window.location.pathname;switch(!0){case t.includes("group"):return{systemRole:["group"]};case t.includes("role"):case t.includes("user"):return{systemRole:["userAndRole"]};case t.includes("asset-policy"):return{systemRole:["assetPolicies"]};case t.includes("license"):return{systemRole:["license"]};case t.includes("device/tag"):return{systemRole:["tag"]};case t.includes("file-manager"):return{systemRole:["documentDeletion"]};case t.includes("transfer"):return{transactionAttribute:["transferRole"],roleType:xs("transferRole")};case t.includes("assignment"):case t.includes("borrow"):return{transactionAttribute:["borrowingRole"],roleType:xs("borrowingRole")};case t.includes("assets/disposal"):case t.includes("approvals/disposal"):return{transactionAttribute:["disposalRole"],roleType:xs("disposalRole")};case t.includes("audit"):return{transactionAttribute:["auditRole"],roleType:xs("auditRole")};case t.includes("maintenance-routine"):return{transactionAttribute:["maintenanceRole"],roleType:xs("maintenanceRole")};case t.includes("repair-ticketing"):case t.includes("assets/damage"):return{transactionAttribute:["repairRole"],roleType:xs("repairRole")};case t.includes("tracking"):case t.includes("assets/missing"):return{transactionAttribute:["trackingRole"],roleType:xs("trackingRole")};case t.includes("handheld-reader"):case t.includes("iot-reader"):return{systemRole:["iotReader"]}}return{}},wne=ce("WangsVue",J9({locale:{global:{},components:{FieldWrapper:{labelRequired:"*"},InputText:{urlFormatInvalidText:"URL format is incorrect",emailFormatInvalidText:"Email format is incorrect",defaultPlaceholder:"Enter {label}",alreadyExistInvalidText:"{label} already exist",emptyInvalidText:"{label} must not be empty",exceedMaxLengthInvalidText:"Max. {maxLength} characters",includeSpecialCharsInvalidText:"Cannot include any special characters"},DialogConfirm:{nonActionableCloseButtonLabel:"Close",actionableCloseButtonLabel:"Cancel",defaultConfirmMessage:"Are you sure you want to continue?",defaultConfirmLabel:"Continue"},CustomColumn:{resetDefaultText:"Reset to Default"},ButtonSearch:{searchPlaceholder:"Search"},FilterContainer:{applyText:"Apply",clearFieldText:"Clear Field"},MultiSelect:{filterPlaceholder:"Search",loadingPlaceholder:"Loading...",inputPlaceholder:"Select {lowercaseLabel}",emptySelectionErrorMessage:"You must pick {formattedLabel}"},Dropdown:{filterPlaceholder:"Search",loadingPlaceholder:"Loading...",inputPlaceholder:"Select {lowercaseLabel}",emptySelectionErrorMessage:"You must pick {formattedLabel}"},InputCurrency:{emptyInputErrorMessage:"{label} must not be empty"},TextArea:{defaultPlaceholder:"Enter {label}",emptyInvalidText:"{label} must not be empty",exceedMaxLengthInvalidText:"Max. {maxLength} characters"},InputRangeNumber:{minPlaceholder:"Enter",maxPlaceholder:"Enter"},DialogForm:{cancelBtnLabel:"Cancel",clearBtnLabel:"Clear Field",stayCheckboxLabel:"Stay on this form after submitting",submitBtnLabel:"Submit",asideRightCollapsedButtonLabel:"See existing data >",asideRightExpandedButtonLabel:"Close <"},InputPhoneNumber:{defaultPlaceholder:"Enter phone number"},InputNumber:{defaultPlaceholder:"Enter {label}",alreadyExistInvalidText:"{label} already exist",emptyInvalidText:"{label} must not be empty"},Calendar:{defaultPlaceholder:"Select date",emptyInvalidText:"You must pick {formattedLabel}",cancelFooterButtonLabel:"Cancel",applyFooterButtonLabel:"Apply"},Menu:{noOptionLabel:"No Option Available"}}},defaultProps:{FieldWrapper:{showOptionalText:!1,showAsterisk:!0,tooltipPos:"top"},Tree:{fetchTree:async(t,e)=>{try{const n=k3==="Basic"?_g:Jg,{systemRole:i,transactionAttribute:r,roleType:o}=e??mX(),s={systemRole:i?JSON.stringify(i):void 0,transactionAttribute:r?JSON.stringify(r):void 0,roleType:o?JSON.stringify(o):void 0},{data:a}=await n.getGroupCategory(t,s);return a}catch(n){console.error(n)}},type:"category",filter:""},ButtonBulkAction:{selectMenuType:"dropdown"},Animation:{libPath:"admin"},Image:{getImageURL:k3==="Basic"?Zg:_d,placeholder:hX},DataTable:{rowHeight:"auto",emptyTableMessage:"No Data Found",excelToastErrorMessage:"Error, failed to download {fileName}."},ButtonDownload:{excelToastErrorMessage:"Error, failed to download {fileName}."},TagType:{useNfc:!1}},useToastConfig:ty}))}}});
|