r3ui-lib 1.2.0 → 1.2.2

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.
Files changed (62) hide show
  1. package/README.md +68 -25
  2. package/dist/r3ui-lib.css +6 -2
  3. package/dist/{ui-library.es.js → r3ui-lib.es.js} +10835 -8420
  4. package/dist/r3ui-lib.umd.js +54 -0
  5. package/dist/types/components/DefaultButton.vue.d.ts +2 -2
  6. package/dist/types/components/DefaultButton.vue.d.ts.map +1 -1
  7. package/dist/types/components/Divider.vue.d.ts +2 -2
  8. package/dist/types/components/cards/CardInfo.vue.d.ts +2 -2
  9. package/dist/types/components/cards/CardInfo.vue.d.ts.map +1 -1
  10. package/dist/types/components/form/CustomInput.vue.d.ts +14 -6
  11. package/dist/types/components/form/CustomInput.vue.d.ts.map +1 -1
  12. package/dist/types/components/forms/AddressForm.stories.d.ts +3 -0
  13. package/dist/types/components/forms/AddressForm.stories.d.ts.map +1 -1
  14. package/dist/types/components/forms/AddressForm.vue.d.ts +2 -2
  15. package/dist/types/components/forms/AddressForm.vue.d.ts.map +1 -1
  16. package/dist/types/components/forms/Flatpickr.vue.d.ts +3 -1
  17. package/dist/types/components/forms/Flatpickr.vue.d.ts.map +1 -1
  18. package/dist/types/components/layout/Breadcrumbs.vue.d.ts.map +1 -1
  19. package/dist/types/components/layout/Header.vue.d.ts +13 -1
  20. package/dist/types/components/layout/Header.vue.d.ts.map +1 -1
  21. package/dist/types/components/layout/MainComponent.vue.d.ts.map +1 -1
  22. package/dist/types/components/logo/Logo.stories.d.ts +12 -0
  23. package/dist/types/components/logo/Logo.stories.d.ts.map +1 -0
  24. package/dist/types/components/logo/Logo.vue.d.ts +28 -0
  25. package/dist/types/components/logo/Logo.vue.d.ts.map +1 -0
  26. package/dist/types/components/modals/ConfirmationModal.vue.d.ts +2 -2
  27. package/dist/types/components/modals/ConfirmationModal.vue.d.ts.map +1 -1
  28. package/dist/types/components/modals/DefaultModal.vue.d.ts +15 -4
  29. package/dist/types/components/modals/DefaultModal.vue.d.ts.map +1 -1
  30. package/dist/types/components/modals/EditTableColumnsModalComponent.vue.d.ts.map +1 -1
  31. package/dist/types/components/modals/TableFilterModalComponent.vue.d.ts.map +1 -1
  32. package/dist/types/components/notifications/ErrorMessageComponent.vue.d.ts +1 -1
  33. package/dist/types/components/notifications/ErrorMessageComponent.vue.d.ts.map +1 -1
  34. package/dist/types/components/tables/EditTableColumns.vue.d.ts +4 -4
  35. package/dist/types/components/tables/EditTableColumns.vue.d.ts.map +1 -1
  36. package/dist/types/components/tables/Table.vue.d.ts +22 -2
  37. package/dist/types/components/tables/Table.vue.d.ts.map +1 -1
  38. package/dist/types/components/tables/TableColumnsButton.vue.d.ts +30 -0
  39. package/dist/types/components/tables/TableColumnsButton.vue.d.ts.map +1 -0
  40. package/dist/types/components/tables/TableColumnsModal.vue.d.ts +30 -0
  41. package/dist/types/components/tables/TableColumnsModal.vue.d.ts.map +1 -0
  42. package/dist/types/components/tables/TableCount.vue.d.ts.map +1 -1
  43. package/dist/types/composables/main/useBreadcrumbs.d.ts +34 -0
  44. package/dist/types/composables/main/useBreadcrumbs.d.ts.map +1 -0
  45. package/dist/types/composables/table/useTableColumns.d.ts +42 -0
  46. package/dist/types/composables/table/useTableColumns.d.ts.map +1 -0
  47. package/dist/types/composables/table/useTableColumnsEnhanced.d.ts +81 -0
  48. package/dist/types/composables/table/useTableColumnsEnhanced.d.ts.map +1 -0
  49. package/dist/types/composables/table/useTableColumnsIntegration.d.ts +111 -0
  50. package/dist/types/composables/table/useTableColumnsIntegration.d.ts.map +1 -0
  51. package/dist/types/composables/table/useTableDefault.d.ts +4 -2
  52. package/dist/types/composables/table/useTableDefault.d.ts.map +1 -1
  53. package/dist/types/main.d.ts +20 -3
  54. package/dist/types/main.d.ts.map +1 -1
  55. package/dist/types/types/table.d.ts +33 -0
  56. package/dist/types/types/table.d.ts.map +1 -0
  57. package/dist/types/utils/table-columns-utils.d.ts +163 -0
  58. package/dist/types/utils/table-columns-utils.d.ts.map +1 -0
  59. package/dist/types/utils/tableLocalizations.d.ts +24 -1
  60. package/dist/types/utils/tableLocalizations.d.ts.map +1 -1
  61. package/package.json +8 -6
  62. package/dist/ui-library.umd.js +0 -54
@@ -1,54 +0,0 @@
1
- (function(Ce,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(Ce=typeof globalThis<"u"?globalThis:Ce||self,l(Ce.UiLibrary={},Ce.Vue))})(this,(function(Ce,l){"use strict";const ur={__name:"Spinner",props:{isSmall:{type:Boolean,default:!1}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["spinner-border",{"spinner-border-sm":n.isSmall}]),role:"status"},null,2))}},cr={__name:"Icon",props:{name:{type:String,required:!0}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("i",{class:l.normalizeClass(`bi bi-${n.name}`)},null,2))}},Oc={class:"d-inline-flex align-items-center justify-content-center"},Lc={key:2},Pc={__name:"DefaultButton",props:{label:{type:String,default:""},icon:{type:String,default:""},iconPosition:{type:String,default:"left",validator(n){return["right","left"].includes(n)}},isLoading:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isFullWidth:{type:Boolean,default:!1},customClasses:{type:Array,default:()=>[]},styles:{type:String,default:"primary",validator(n){return["primary","light","secondary","success","danger","warning","info"].includes(n)}}},emits:["submit"],setup(n,{emit:e}){const t=n,i=e,r=l.computed(()=>`btn-${t.styles}`);function s(){t.isLoading||t.isDisabled||i("submit")}return(a,o)=>(l.openBlock(),l.createElementBlock("button",{"data-test":"DefaultButton",class:l.normalizeClass(["btn",[n.isLoading||n.isDisabled?"disabled":"",n.isFullWidth?"w-100":"",n.styles?r.value:"",...n.customClasses]]),onClick:l.withModifiers(s,["prevent"])},[l.createElementVNode("div",Oc,[n.icon&&n.iconPosition==="left"?(l.openBlock(),l.createBlock(cr,{key:0,name:n.icon,class:"me-2"},null,8,["name"])):l.createCommentVNode("",!0),n.isLoading?(l.openBlock(),l.createBlock(ur,{key:1,isSmall:!0})):l.createCommentVNode("",!0),n.label?(l.openBlock(),l.createElementBlock("span",Lc,l.toDisplayString(n.label),1)):l.createCommentVNode("",!0),n.icon&&n.iconPosition==="right"?(l.openBlock(),l.createBlock(cr,{key:3,name:n.icon,class:"ms-2"},null,8,["name"])):l.createCommentVNode("",!0)])],2))}},Ac=l.defineComponent({__name:"AddButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1},iconClass:{default:"bi bi-plus-circle-fill pe-2"}},emits:["click"],setup(n,{emit:e}){const t=n,i=e,r=()=>{t.disabled||i("click")};return(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["d-flex add-button",{"opacity-75 disabled":s.disabled}]),style:{cursor:"pointer"},"data-test":"AddButton",onClick:r},[l.createElementVNode("i",{class:l.normalizeClass(s.iconClass)},null,2),l.createTextVNode(" "+l.toDisplayString(s.label||s.text||"Добавить"),1)],2))}}),Ve=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},Ca=Ve(Ac,[["__scopeId","data-v-cf07042b"]]),Fc={"data-test":"CollapseButton"},Bc=["id"],Nc=["id"],Vc=Ve(l.defineComponent({__name:"CollapseButton",props:{isCollapsed:{type:Boolean,default:!0},expandText:{default:"Развернуть все"},collapseText:{default:"Свернуть все"},expandId:{default:"expand-filters-btn"},collapseId:{default:"collapse-filters-btn"},buttonStyle:{default:"padding: 8px 24px; margin-bottom: 32px"},iconStyle:{default:"font-size: 10px"},expandLabel:{default:"Развернуть все"},collapseLabel:{default:"Свернуть все"},isColapsed:{type:Boolean}},emits:["emitCollapseToggle","emitColapsed","expand","collapse"],setup(n,{emit:e}){const t=n,i=e,r=l.computed(()=>t.isCollapsed),s=l.computed(()=>t.expandText),a=l.computed(()=>t.collapseText),o=()=>{i("emitCollapseToggle",!1),i("emitColapsed",!1),i("expand")},u=()=>{i("emitCollapseToggle",!0),i("emitColapsed",!0),i("collapse")};return(c,d)=>(l.openBlock(),l.createElementBlock("div",Fc,[r.value?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",id:c.expandId,class:"btn btn-light collapse-button",onClick:o,style:l.normalizeStyle(c.buttonStyle)},[l.createTextVNode(l.toDisplayString(s.value)+" ",1),l.createElementVNode("i",{class:"bi bi-caret-down-fill",style:l.normalizeStyle(c.iconStyle)},null,4)],12,Bc)):l.createCommentVNode("",!0),r.value?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:1,type:"button",id:c.collapseId,class:"btn btn-light collapse-button",onClick:u,style:l.normalizeStyle(c.buttonStyle)},[l.createTextVNode(l.toDisplayString(a.value)+" ",1),l.createElementVNode("i",{class:"bi bi-caret-up-fill",style:l.normalizeStyle(c.iconStyle)},null,4)],12,Nc))]))}}),[["__scopeId","data-v-a0502514"]]),Hc=Ve(l.defineComponent({__name:"ExportButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1},exportType:{default:"default"}},emits:["export"],setup(n,{emit:e}){const t=n,i=e,r=()=>{t.disabled||i("export",t.exportType)};return(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["col-auto export-button",{"opacity-75 disabled":s.disabled}]),style:{cursor:"pointer"},"data-test":"ExportButton",onClick:r},[l.createTextVNode(l.toDisplayString(s.label||s.text||"Экспорт")+" ",1),a[0]||(a[0]=l.createElementVNode("i",{class:"ps-2 bi bi-file-earmark-arrow-down-fill"},null,-1))],2))}}),[["__scopeId","data-v-20f08c06"]]),zc=Ve(l.defineComponent({__name:"PrintButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1}},emits:["print"],setup(n,{emit:e}){const t=n,i=e,r=()=>{t.disabled||(window.print(),i("print"))};return(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["col-auto print-button",{"opacity-75 disabled":s.disabled}]),style:{cursor:"pointer"},"data-test":"PrintButton",onClick:r},[l.createTextVNode(l.toDisplayString(s.label||s.text||"Печать")+" ",1),a[0]||(a[0]=l.createElementVNode("i",{class:"ps-2 bi bi-printer-fill"},null,-1))],2))}}),[["__scopeId","data-v-52020521"]]),Ic=["disabled"],$c={class:"clear-form-button__label"},jc=Ve(l.defineComponent({__name:"ClearFormButton",props:{label:{default:"Очистить"},disabled:{type:Boolean,default:!1}},emits:["clear"],setup(n,{emit:e}){const t=n,i=e,r=()=>{t.disabled||i("clear",!0)};return(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["clear-form-button",{"clear-form-button--disabled":s.disabled}]),disabled:s.disabled,"data-test":"ClearFormButton",onClick:r},[a[0]||(a[0]=l.createElementVNode("div",{class:"clear-form-button__icon"},[l.createElementVNode("i",{class:"bi bi-trash-fill"})],-1)),l.createElementVNode("div",$c,l.toDisplayString(s.label),1)],10,Ic))}}),[["__scopeId","data-v-ed163ff4"]]),Wc={class:"toggle-buttons","data-test":"ToggleButtons"},Gc=["onClick"],Yc=Ve(l.defineComponent({__name:"ToggleButtons",props:{options:{},modelValue:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=e,i=r=>{t("update:modelValue",r.name)};return(r,s)=>(l.openBlock(),l.createElementBlock("div",Wc,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.options,a=>(l.openBlock(),l.createElementBlock("button",{key:a.name,type:"button",class:l.normalizeClass(["toggle-buttons__button",{"toggle-buttons__button--active":r.modelValue===a.name}]),onClick:o=>i(a)},l.toDisplayString(a.title),11,Gc))),128))]))}}),[["__scopeId","data-v-4eae7f5d"]]);var Ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ka(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Uc(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var t=function i(){var r=!1;try{r=this instanceof i}catch{}return r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var dr,Sa;function vi(){return Sa||(Sa=1,dr=TypeError),dr}const qc=Uc(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var hr,xa;function gn(){if(xa)return hr;xa=1;var n=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=n&&e&&typeof e.get=="function"?e.get:null,i=n&&Map.prototype.forEach,r=typeof Set=="function"&&Set.prototype,s=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=r&&s&&typeof s.get=="function"?s.get:null,o=r&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,c=u?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,p=d?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,f=h?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,k=Object.prototype.toString,C=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,R=String.prototype.replace,m=String.prototype.toUpperCase,x=String.prototype.toLowerCase,g=RegExp.prototype.test,S=Array.prototype.concat,w=Array.prototype.join,E=Array.prototype.slice,b=Math.floor,T=typeof BigInt=="function"?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,O=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,F=typeof Symbol=="function"&&typeof Symbol.iterator=="object",z=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===F||!0)?Symbol.toStringTag:null,$=Object.prototype.propertyIsEnumerable,H=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(J){return J.__proto__}:null);function V(J,Q){if(J===1/0||J===-1/0||J!==J||J&&J>-1e3&&J<1e3||g.call(/e/,Q))return Q;var Be=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof J=="number"){var Ie=J<0?-b(-J):b(J);if(Ie!==J){var Me=String(Ie),ke=v.call(Q,Me.length+1);return R.call(Me,Be,"$&_")+"."+R.call(R.call(ke,/([0-9]{3})/g,"$&_"),/_$/,"")}}return R.call(Q,Be,"$&_")}var G=qc,D=G.custom,P=re(D)?D:null,I={__proto__:null,double:'"',single:"'"},N={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};hr=function J(Q,Be,Ie,Me){var ke=Be||{};if(we(ke,"quoteStyle")&&!we(I,ke.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(we(ke,"maxStringLength")&&(typeof ke.maxStringLength=="number"?ke.maxStringLength<0&&ke.maxStringLength!==1/0:ke.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var pt=we(ke,"customInspect")?ke.customInspect:!0;if(typeof pt!="boolean"&&pt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(we(ke,"indent")&&ke.indent!==null&&ke.indent!==" "&&!(parseInt(ke.indent,10)===ke.indent&&ke.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(we(ke,"numericSeparator")&&typeof ke.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var et=ke.numericSeparator;if(typeof Q>"u")return"undefined";if(Q===null)return"null";if(typeof Q=="boolean")return Q?"true":"false";if(typeof Q=="string")return Re(Q,ke);if(typeof Q=="number"){if(Q===0)return 1/0/Q>0?"0":"-0";var L=String(Q);return et?V(Q,L):L}if(typeof Q=="bigint"){var A=String(Q)+"n";return et?V(Q,A):A}var j=typeof ke.depth>"u"?5:ke.depth;if(typeof Ie>"u"&&(Ie=0),Ie>=j&&j>0&&typeof Q=="object")return se(Q)?"[Array]":"[Object]";var ee=pn(ke,Ie);if(typeof Me>"u")Me=[];else if(Ne(Me,Q)>=0)return"[Circular]";function de(ai,Hi,wa){if(Hi&&(Me=E.call(Me),Me.push(Hi)),wa){var lr={depth:ke.depth};return we(ke,"quoteStyle")&&(lr.quoteStyle=ke.quoteStyle),J(ai,lr,Ie+1,Me)}return J(ai,ke,Ie+1,Me)}if(typeof Q=="function"&&!B(Q)){var me=Fe(Q),Te=Ue(Q,de);return"[Function"+(me?": "+me:" (anonymous)")+"]"+(Te.length>0?" { "+w.call(Te,", ")+" }":"")}if(re(Q)){var ye=F?R.call(String(Q),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(Q);return typeof Q=="object"&&!F?_e(ye):ye}if(ve(Q)){for(var De="<"+x.call(String(Q.nodeName)),be=Q.attributes||[],xe=0;xe<be.length;xe++)De+=" "+be[xe].name+"="+Y(X(be[xe].value),"double",ke);return De+=">",Q.childNodes&&Q.childNodes.length&&(De+="..."),De+="</"+x.call(String(Q.nodeName))+">",De}if(se(Q)){if(Q.length===0)return"[]";var Ye=Ue(Q,de);return ee&&!ze(Ye)?"["+Zt(Ye,ee)+"]":"[ "+w.call(Ye,", ")+" ]"}if(Z(Q)){var mt=Ue(Q,de);return!("cause"in Error.prototype)&&"cause"in Q&&!$.call(Q,"cause")?"{ ["+String(Q)+"] "+w.call(S.call("[cause]: "+de(Q.cause),mt),", ")+" }":mt.length===0?"["+String(Q)+"]":"{ ["+String(Q)+"] "+w.call(mt,", ")+" }"}if(typeof Q=="object"&&pt){if(P&&typeof Q[P]=="function"&&G)return G(Q,{depth:j-Ie});if(pt!=="symbol"&&typeof Q.inspect=="function")return Q.inspect()}if(ae(Q)){var lt=[];return i&&i.call(Q,function(ai,Hi){lt.push(de(Hi,Q,!0)+" => "+de(ai,Q))}),Le("Map",t.call(Q),lt,ee)}if(ue(Q)){var si=[];return o&&o.call(Q,function(ai){si.push(de(ai,Q))}),Le("Set",a.call(Q),si,ee)}if(q(Q))return ce("WeakMap");if(oe(Q))return ce("WeakSet");if(ie(Q))return ce("WeakRef");if(U(Q))return _e(de(Number(Q)));if(te(Q))return _e(de(T.call(Q)));if(le(Q))return _e(_.call(Q));if(K(Q))return _e(de(String(Q)));if(typeof window<"u"&&Q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Q===globalThis||typeof Ea<"u"&&Q===Ea)return"{ [object globalThis] }";if(!W(Q)&&!B(Q)){var zt=Ue(Q,de),ar=H?H(Q)===Object.prototype:Q instanceof Object||Q.constructor===Object,bi=Q instanceof Object?"":"null prototype",or=!ar&&z&&Object(Q)===Q&&z in Q?v.call(Ae(Q),8,-1):bi?"Object":"",ya=ar||typeof Q.constructor!="function"?"":Q.constructor.name?Q.constructor.name+" ":"",mn=ya+(or||bi?"["+w.call(S.call([],or||[],bi||[]),": ")+"] ":"");return zt.length===0?mn+"{}":ee?mn+"{"+Zt(zt,ee)+"}":mn+"{ "+w.call(zt,", ")+" }"}return String(Q)};function Y(J,Q,Be){var Ie=Be.quoteStyle||Q,Me=I[Ie];return Me+J+Me}function X(J){return R.call(String(J),/"/g,"&quot;")}function ne(J){return!z||!(typeof J=="object"&&(z in J||typeof J[z]<"u"))}function se(J){return Ae(J)==="[object Array]"&&ne(J)}function W(J){return Ae(J)==="[object Date]"&&ne(J)}function B(J){return Ae(J)==="[object RegExp]"&&ne(J)}function Z(J){return Ae(J)==="[object Error]"&&ne(J)}function K(J){return Ae(J)==="[object String]"&&ne(J)}function U(J){return Ae(J)==="[object Number]"&&ne(J)}function le(J){return Ae(J)==="[object Boolean]"&&ne(J)}function re(J){if(F)return J&&typeof J=="object"&&J instanceof Symbol;if(typeof J=="symbol")return!0;if(!J||typeof J!="object"||!O)return!1;try{return O.call(J),!0}catch{}return!1}function te(J){if(!J||typeof J!="object"||!T)return!1;try{return T.call(J),!0}catch{}return!1}var fe=Object.prototype.hasOwnProperty||function(J){return J in this};function we(J,Q){return fe.call(J,Q)}function Ae(J){return k.call(J)}function Fe(J){if(J.name)return J.name;var Q=y.call(C.call(J),/^function\s*([\w$]+)/);return Q?Q[1]:null}function Ne(J,Q){if(J.indexOf)return J.indexOf(Q);for(var Be=0,Ie=J.length;Be<Ie;Be++)if(J[Be]===Q)return Be;return-1}function ae(J){if(!t||!J||typeof J!="object")return!1;try{t.call(J);try{a.call(J)}catch{return!0}return J instanceof Map}catch{}return!1}function q(J){if(!c||!J||typeof J!="object")return!1;try{c.call(J,c);try{p.call(J,p)}catch{return!0}return J instanceof WeakMap}catch{}return!1}function ie(J){if(!f||!J||typeof J!="object")return!1;try{return f.call(J),!0}catch{}return!1}function ue(J){if(!a||!J||typeof J!="object")return!1;try{a.call(J);try{t.call(J)}catch{return!0}return J instanceof Set}catch{}return!1}function oe(J){if(!p||!J||typeof J!="object")return!1;try{p.call(J,p);try{c.call(J,c)}catch{return!0}return J instanceof WeakSet}catch{}return!1}function ve(J){return!J||typeof J!="object"?!1:typeof HTMLElement<"u"&&J instanceof HTMLElement?!0:typeof J.nodeName=="string"&&typeof J.getAttribute=="function"}function Re(J,Q){if(J.length>Q.maxStringLength){var Be=J.length-Q.maxStringLength,Ie="... "+Be+" more character"+(Be>1?"s":"");return Re(v.call(J,0,Q.maxStringLength),Q)+Ie}var Me=N[Q.quoteStyle||"single"];Me.lastIndex=0;var ke=R.call(R.call(J,Me,"\\$1"),/[\x00-\x1f]/g,Se);return Y(ke,"single",Q)}function Se(J){var Q=J.charCodeAt(0),Be={8:"b",9:"t",10:"n",12:"f",13:"r"}[Q];return Be?"\\"+Be:"\\x"+(Q<16?"0":"")+m.call(Q.toString(16))}function _e(J){return"Object("+J+")"}function ce(J){return J+" { ? }"}function Le(J,Q,Be,Ie){var Me=Ie?Zt(Be,Ie):w.call(Be,", ");return J+" ("+Q+") {"+Me+"}"}function ze(J){for(var Q=0;Q<J.length;Q++)if(Ne(J[Q],`
2
- `)>=0)return!1;return!0}function pn(J,Q){var Be;if(J.indent===" ")Be=" ";else if(typeof J.indent=="number"&&J.indent>0)Be=w.call(Array(J.indent+1)," ");else return null;return{base:Be,prev:w.call(Array(Q+1),Be)}}function Zt(J,Q){if(J.length===0)return"";var Be=`
3
- `+Q.prev+Q.base;return Be+w.call(J,","+Be)+`
4
- `+Q.prev}function Ue(J,Q){var Be=se(J),Ie=[];if(Be){Ie.length=J.length;for(var Me=0;Me<J.length;Me++)Ie[Me]=we(J,Me)?Q(J[Me],J):""}var ke=typeof M=="function"?M(J):[],pt;if(F){pt={};for(var et=0;et<ke.length;et++)pt["$"+ke[et]]=ke[et]}for(var L in J)we(J,L)&&(Be&&String(Number(L))===L&&L<J.length||F&&pt["$"+L]instanceof Symbol||(g.call(/[^\w$]/,L)?Ie.push(Q(L,J)+": "+Q(J[L],J)):Ie.push(L+": "+Q(J[L],J))));if(typeof M=="function")for(var A=0;A<ke.length;A++)$.call(J,ke[A])&&Ie.push("["+Q(ke[A])+"]: "+Q(J[ke[A]],J));return Ie}return hr}var fr,_a;function Kc(){if(_a)return fr;_a=1;var n=gn(),e=vi(),t=function(o,u,c){for(var d=o,p;(p=d.next)!=null;d=p)if(p.key===u)return d.next=p.next,c||(p.next=o.next,o.next=p),p},i=function(o,u){if(o){var c=t(o,u);return c&&c.value}},r=function(o,u,c){var d=t(o,u);d?d.value=c:o.next={key:u,next:o.next,value:c}},s=function(o,u){return o?!!t(o,u):!1},a=function(o,u){if(o)return t(o,u,!0)};return fr=function(){var u,c={assert:function(d){if(!c.has(d))throw new e("Side channel does not contain "+n(d))},delete:function(d){var p=u&&u.next,h=a(u,d);return h&&p&&p===h&&(u=void 0),!!h},get:function(d){return i(u,d)},has:function(d){return s(u,d)},set:function(d,p){u||(u={next:void 0}),r(u,d,p)}};return c},fr}var pr,Ma;function Ra(){return Ma||(Ma=1,pr=Object),pr}var mr,Ta;function Jc(){return Ta||(Ta=1,mr=Error),mr}var gr,Da;function Xc(){return Da||(Da=1,gr=EvalError),gr}var br,Oa;function Zc(){return Oa||(Oa=1,br=RangeError),br}var vr,La;function Qc(){return La||(La=1,vr=ReferenceError),vr}var yr,Pa;function ed(){return Pa||(Pa=1,yr=SyntaxError),yr}var wr,Aa;function td(){return Aa||(Aa=1,wr=URIError),wr}var Cr,Fa;function id(){return Fa||(Fa=1,Cr=Math.abs),Cr}var Er,Ba;function nd(){return Ba||(Ba=1,Er=Math.floor),Er}var kr,Na;function rd(){return Na||(Na=1,kr=Math.max),kr}var Sr,Va;function sd(){return Va||(Va=1,Sr=Math.min),Sr}var xr,Ha;function ad(){return Ha||(Ha=1,xr=Math.pow),xr}var _r,za;function od(){return za||(za=1,_r=Math.round),_r}var Mr,Ia;function ld(){return Ia||(Ia=1,Mr=Number.isNaN||function(e){return e!==e}),Mr}var Rr,$a;function ud(){if($a)return Rr;$a=1;var n=ld();return Rr=function(t){return n(t)||t===0?t:t<0?-1:1},Rr}var Tr,ja;function cd(){return ja||(ja=1,Tr=Object.getOwnPropertyDescriptor),Tr}var Dr,Wa;function Ga(){if(Wa)return Dr;Wa=1;var n=cd();if(n)try{n([],"length")}catch{n=null}return Dr=n,Dr}var Or,Ya;function dd(){if(Ya)return Or;Ya=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return Or=n,Or}var Lr,Ua;function hd(){return Ua||(Ua=1,Lr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}),Lr}var Pr,qa;function fd(){if(qa)return Pr;qa=1;var n=typeof Symbol<"u"&&Symbol,e=hd();return Pr=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Pr}var Ar,Ka;function Ja(){return Ka||(Ka=1,Ar=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ar}var Fr,Xa;function Za(){if(Xa)return Fr;Xa=1;var n=Ra();return Fr=n.getPrototypeOf||null,Fr}var Br,Qa;function pd(){if(Qa)return Br;Qa=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",r=function(u,c){for(var d=[],p=0;p<u.length;p+=1)d[p]=u[p];for(var h=0;h<c.length;h+=1)d[h+u.length]=c[h];return d},s=function(u,c){for(var d=[],p=c,h=0;p<u.length;p+=1,h+=1)d[h]=u[p];return d},a=function(o,u){for(var c="",d=0;d<o.length;d+=1)c+=o[d],d+1<o.length&&(c+=u);return c};return Br=function(u){var c=this;if(typeof c!="function"||e.apply(c)!==i)throw new TypeError(n+c);for(var d=s(arguments,1),p,h=function(){if(this instanceof p){var y=c.apply(this,r(d,arguments));return Object(y)===y?y:this}return c.apply(u,r(d,arguments))},f=t(0,c.length-d.length),_=[],k=0;k<f;k++)_[k]="$"+k;if(p=Function("binder","return function ("+a(_,",")+"){ return binder.apply(this,arguments); }")(h),c.prototype){var C=function(){};C.prototype=c.prototype,p.prototype=new C,C.prototype=null}return p},Br}var Nr,eo;function bn(){if(eo)return Nr;eo=1;var n=pd();return Nr=Function.prototype.bind||n,Nr}var Vr,to;function Hr(){return to||(to=1,Vr=Function.prototype.call),Vr}var zr,io;function no(){return io||(io=1,zr=Function.prototype.apply),zr}var Ir,ro;function md(){return ro||(ro=1,Ir=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ir}var $r,so;function gd(){if(so)return $r;so=1;var n=bn(),e=no(),t=Hr(),i=md();return $r=i||n.call(t,e),$r}var jr,ao;function oo(){if(ao)return jr;ao=1;var n=bn(),e=vi(),t=Hr(),i=gd();return jr=function(s){if(s.length<1||typeof s[0]!="function")throw new e("a function is required");return i(n,t,s)},jr}var Wr,lo;function bd(){if(lo)return Wr;lo=1;var n=oo(),e=Ga(),t;try{t=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var i=!!t&&e&&e(Object.prototype,"__proto__"),r=Object,s=r.getPrototypeOf;return Wr=i&&typeof i.get=="function"?n([i.get]):typeof s=="function"?function(o){return s(o==null?o:r(o))}:!1,Wr}var Gr,uo;function vd(){if(uo)return Gr;uo=1;var n=Ja(),e=Za(),t=bd();return Gr=n?function(r){return n(r)}:e?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return e(r)}:t?function(r){return t(r)}:null,Gr}var Yr,co;function yd(){if(co)return Yr;co=1;var n=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=bn();return Yr=t.call(n,e),Yr}var Ur,ho;function qr(){if(ho)return Ur;ho=1;var n,e=Ra(),t=Jc(),i=Xc(),r=Zc(),s=Qc(),a=ed(),o=vi(),u=td(),c=id(),d=nd(),p=rd(),h=sd(),f=ad(),_=od(),k=ud(),C=Function,y=function(B){try{return C('"use strict"; return ('+B+").constructor;")()}catch{}},v=Ga(),R=dd(),m=function(){throw new o},x=v?(function(){try{return arguments.callee,m}catch{try{return v(arguments,"callee").get}catch{return m}}})():m,g=fd()(),S=vd(),w=Za(),E=Ja(),b=no(),T=Hr(),M={},O=typeof Uint8Array>"u"||!S?n:S(Uint8Array),F={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&S?S([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":C,"%GeneratorFunction%":M,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&S?S(S([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!g||!S?n:S(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":r,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!g||!S?n:S(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&S?S(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":x,"%TypedArray%":O,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":b,"%Object.defineProperty%":R,"%Object.getPrototypeOf%":w,"%Math.abs%":c,"%Math.floor%":d,"%Math.max%":p,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":_,"%Math.sign%":k,"%Reflect.getPrototypeOf%":E};if(S)try{null.error}catch(B){var z=S(S(B));F["%Error.prototype%"]=z}var $=function B(Z){var K;if(Z==="%AsyncFunction%")K=y("async function () {}");else if(Z==="%GeneratorFunction%")K=y("function* () {}");else if(Z==="%AsyncGeneratorFunction%")K=y("async function* () {}");else if(Z==="%AsyncGenerator%"){var U=B("%AsyncGeneratorFunction%");U&&(K=U.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var le=B("%AsyncGenerator%");le&&S&&(K=S(le.prototype))}return F[Z]=K,K},H={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},V=bn(),G=yd(),D=V.call(T,Array.prototype.concat),P=V.call(b,Array.prototype.splice),I=V.call(T,String.prototype.replace),N=V.call(T,String.prototype.slice),Y=V.call(T,RegExp.prototype.exec),X=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ne=/\\(\\)?/g,se=function(Z){var K=N(Z,0,1),U=N(Z,-1);if(K==="%"&&U!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(U==="%"&&K!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var le=[];return I(Z,X,function(re,te,fe,we){le[le.length]=fe?I(we,ne,"$1"):te||re}),le},W=function(Z,K){var U=Z,le;if(G(H,U)&&(le=H[U],U="%"+le[0]+"%"),G(F,U)){var re=F[U];if(re===M&&(re=$(U)),typeof re>"u"&&!K)throw new o("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:le,name:U,value:re}}throw new a("intrinsic "+Z+" does not exist!")};return Ur=function(Z,K){if(typeof Z!="string"||Z.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof K!="boolean")throw new o('"allowMissing" argument must be a boolean');if(Y(/^%?[^%]*%?$/,Z)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var U=se(Z),le=U.length>0?U[0]:"",re=W("%"+le+"%",K),te=re.name,fe=re.value,we=!1,Ae=re.alias;Ae&&(le=Ae[0],P(U,D([0,1],Ae)));for(var Fe=1,Ne=!0;Fe<U.length;Fe+=1){var ae=U[Fe],q=N(ae,0,1),ie=N(ae,-1);if((q==='"'||q==="'"||q==="`"||ie==='"'||ie==="'"||ie==="`")&&q!==ie)throw new a("property names with quotes must have matching quotes");if((ae==="constructor"||!Ne)&&(we=!0),le+="."+ae,te="%"+le+"%",G(F,te))fe=F[te];else if(fe!=null){if(!(ae in fe)){if(!K)throw new o("base intrinsic for "+Z+" exists, but the property is not available.");return}if(v&&Fe+1>=U.length){var ue=v(fe,ae);Ne=!!ue,Ne&&"get"in ue&&!("originalValue"in ue.get)?fe=ue.get:fe=fe[ae]}else Ne=G(fe,ae),fe=fe[ae];Ne&&!we&&(F[te]=fe)}}return fe},Ur}var Kr,fo;function po(){if(fo)return Kr;fo=1;var n=qr(),e=oo(),t=e([n("%String.prototype.indexOf%")]);return Kr=function(r,s){var a=n(r,!!s);return typeof a=="function"&&t(r,".prototype.")>-1?e([a]):a},Kr}var Jr,mo;function go(){if(mo)return Jr;mo=1;var n=qr(),e=po(),t=gn(),i=vi(),r=n("%Map%",!0),s=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),o=e("Map.prototype.has",!0),u=e("Map.prototype.delete",!0),c=e("Map.prototype.size",!0);return Jr=!!r&&function(){var p,h={assert:function(f){if(!h.has(f))throw new i("Side channel does not contain "+t(f))},delete:function(f){if(p){var _=u(p,f);return c(p)===0&&(p=void 0),_}return!1},get:function(f){if(p)return s(p,f)},has:function(f){return p?o(p,f):!1},set:function(f,_){p||(p=new r),a(p,f,_)}};return h},Jr}var Xr,bo;function wd(){if(bo)return Xr;bo=1;var n=qr(),e=po(),t=gn(),i=go(),r=vi(),s=n("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),o=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),c=e("WeakMap.prototype.delete",!0);return Xr=s?function(){var p,h,f={assert:function(_){if(!f.has(_))throw new r("Side channel does not contain "+t(_))},delete:function(_){if(s&&_&&(typeof _=="object"||typeof _=="function")){if(p)return c(p,_)}else if(i&&h)return h.delete(_);return!1},get:function(_){return s&&_&&(typeof _=="object"||typeof _=="function")&&p?a(p,_):h&&h.get(_)},has:function(_){return s&&_&&(typeof _=="object"||typeof _=="function")&&p?u(p,_):!!h&&h.has(_)},set:function(_,k){s&&_&&(typeof _=="object"||typeof _=="function")?(p||(p=new s),o(p,_,k)):i&&(h||(h=i()),h.set(_,k))}};return f}:i,Xr}var Zr,vo;function Cd(){if(vo)return Zr;vo=1;var n=vi(),e=gn(),t=Kc(),i=go(),r=wd(),s=r||i||t;return Zr=function(){var o,u={assert:function(c){if(!u.has(c))throw new n("Side channel does not contain "+e(c))},delete:function(c){return!!o&&o.delete(c)},get:function(c){return o&&o.get(c)},has:function(c){return!!o&&o.has(c)},set:function(c,d){o||(o=s()),o.set(c,d)}};return u},Zr}var Qr,yo;function es(){if(yo)return Qr;yo=1;var n=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Qr={default:t.RFC3986,formatters:{RFC1738:function(i){return n.call(i,e,"+")},RFC3986:function(i){return String(i)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},Qr}var ts,wo;function Co(){if(wo)return ts;wo=1;var n=es(),e=Object.prototype.hasOwnProperty,t=Array.isArray,i=(function(){for(var C=[],y=0;y<256;++y)C.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return C})(),r=function(y){for(;y.length>1;){var v=y.pop(),R=v.obj[v.prop];if(t(R)){for(var m=[],x=0;x<R.length;++x)typeof R[x]<"u"&&m.push(R[x]);v.obj[v.prop]=m}}},s=function(y,v){for(var R=v&&v.plainObjects?{__proto__:null}:{},m=0;m<y.length;++m)typeof y[m]<"u"&&(R[m]=y[m]);return R},a=function C(y,v,R){if(!v)return y;if(typeof v!="object"&&typeof v!="function"){if(t(y))y.push(v);else if(y&&typeof y=="object")(R&&(R.plainObjects||R.allowPrototypes)||!e.call(Object.prototype,v))&&(y[v]=!0);else return[y,v];return y}if(!y||typeof y!="object")return[y].concat(v);var m=y;return t(y)&&!t(v)&&(m=s(y,R)),t(y)&&t(v)?(v.forEach(function(x,g){if(e.call(y,g)){var S=y[g];S&&typeof S=="object"&&x&&typeof x=="object"?y[g]=C(S,x,R):y.push(x)}else y[g]=x}),y):Object.keys(v).reduce(function(x,g){var S=v[g];return e.call(x,g)?x[g]=C(x[g],S,R):x[g]=S,x},m)},o=function(y,v){return Object.keys(v).reduce(function(R,m){return R[m]=v[m],R},y)},u=function(C,y,v){var R=C.replace(/\+/g," ");if(v==="iso-8859-1")return R.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(R)}catch{return R}},c=1024,d=function(y,v,R,m,x){if(y.length===0)return y;var g=y;if(typeof y=="symbol"?g=Symbol.prototype.toString.call(y):typeof y!="string"&&(g=String(y)),R==="iso-8859-1")return escape(g).replace(/%u[0-9a-f]{4}/gi,function(O){return"%26%23"+parseInt(O.slice(2),16)+"%3B"});for(var S="",w=0;w<g.length;w+=c){for(var E=g.length>=c?g.slice(w,w+c):g,b=[],T=0;T<E.length;++T){var M=E.charCodeAt(T);if(M===45||M===46||M===95||M===126||M>=48&&M<=57||M>=65&&M<=90||M>=97&&M<=122||x===n.RFC1738&&(M===40||M===41)){b[b.length]=E.charAt(T);continue}if(M<128){b[b.length]=i[M];continue}if(M<2048){b[b.length]=i[192|M>>6]+i[128|M&63];continue}if(M<55296||M>=57344){b[b.length]=i[224|M>>12]+i[128|M>>6&63]+i[128|M&63];continue}T+=1,M=65536+((M&1023)<<10|E.charCodeAt(T)&1023),b[b.length]=i[240|M>>18]+i[128|M>>12&63]+i[128|M>>6&63]+i[128|M&63]}S+=b.join("")}return S},p=function(y){for(var v=[{obj:{o:y},prop:"o"}],R=[],m=0;m<v.length;++m)for(var x=v[m],g=x.obj[x.prop],S=Object.keys(g),w=0;w<S.length;++w){var E=S[w],b=g[E];typeof b=="object"&&b!==null&&R.indexOf(b)===-1&&(v.push({obj:g,prop:E}),R.push(b))}return r(v),y},h=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},f=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},_=function(y,v){return[].concat(y,v)},k=function(y,v){if(t(y)){for(var R=[],m=0;m<y.length;m+=1)R.push(v(y[m]));return R}return v(y)};return ts={arrayToObject:s,assign:o,combine:_,compact:p,decode:u,encode:d,isBuffer:f,isRegExp:h,maybeMap:k,merge:a},ts}var is,Eo;function Ed(){if(Eo)return is;Eo=1;var n=Cd(),e=Co(),t=es(),i=Object.prototype.hasOwnProperty,r={brackets:function(C){return C+"[]"},comma:"comma",indices:function(C,y){return C+"["+y+"]"},repeat:function(C){return C}},s=Array.isArray,a=Array.prototype.push,o=function(k,C){a.apply(k,s(C)?C:[C])},u=Date.prototype.toISOString,c=t.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:t.formatters[c],indices:!1,serializeDate:function(C){return u.call(C)},skipNulls:!1,strictNullHandling:!1},p=function(C){return typeof C=="string"||typeof C=="number"||typeof C=="boolean"||typeof C=="symbol"||typeof C=="bigint"},h={},f=function k(C,y,v,R,m,x,g,S,w,E,b,T,M,O,F,z,$,H){for(var V=C,G=H,D=0,P=!1;(G=G.get(h))!==void 0&&!P;){var I=G.get(C);if(D+=1,typeof I<"u"){if(I===D)throw new RangeError("Cyclic object value");P=!0}typeof G.get(h)>"u"&&(D=0)}if(typeof E=="function"?V=E(y,V):V instanceof Date?V=M(V):v==="comma"&&s(V)&&(V=e.maybeMap(V,function(te){return te instanceof Date?M(te):te})),V===null){if(x)return w&&!z?w(y,d.encoder,$,"key",O):y;V=""}if(p(V)||e.isBuffer(V)){if(w){var N=z?y:w(y,d.encoder,$,"key",O);return[F(N)+"="+F(w(V,d.encoder,$,"value",O))]}return[F(y)+"="+F(String(V))]}var Y=[];if(typeof V>"u")return Y;var X;if(v==="comma"&&s(V))z&&w&&(V=e.maybeMap(V,w)),X=[{value:V.length>0?V.join(",")||null:void 0}];else if(s(E))X=E;else{var ne=Object.keys(V);X=b?ne.sort(b):ne}var se=S?String(y).replace(/\./g,"%2E"):String(y),W=R&&s(V)&&V.length===1?se+"[]":se;if(m&&s(V)&&V.length===0)return W+"[]";for(var B=0;B<X.length;++B){var Z=X[B],K=typeof Z=="object"&&Z&&typeof Z.value<"u"?Z.value:V[Z];if(!(g&&K===null)){var U=T&&S?String(Z).replace(/\./g,"%2E"):String(Z),le=s(V)?typeof v=="function"?v(W,U):W:W+(T?"."+U:"["+U+"]");H.set(C,D);var re=n();re.set(h,H),o(Y,k(K,le,v,R,m,x,g,S,v==="comma"&&z&&s(V)?null:w,E,b,T,M,O,F,z,$,re))}}return Y},_=function(C){if(!C)return d;if(typeof C.allowEmptyArrays<"u"&&typeof C.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof C.encodeDotInKeys<"u"&&typeof C.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(C.encoder!==null&&typeof C.encoder<"u"&&typeof C.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=C.charset||d.charset;if(typeof C.charset<"u"&&C.charset!=="utf-8"&&C.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=t.default;if(typeof C.format<"u"){if(!i.call(t.formatters,C.format))throw new TypeError("Unknown format option provided.");v=C.format}var R=t.formatters[v],m=d.filter;(typeof C.filter=="function"||s(C.filter))&&(m=C.filter);var x;if(C.arrayFormat in r?x=C.arrayFormat:"indices"in C?x=C.indices?"indices":"repeat":x=d.arrayFormat,"commaRoundTrip"in C&&typeof C.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g=typeof C.allowDots>"u"?C.encodeDotInKeys===!0?!0:d.allowDots:!!C.allowDots;return{addQueryPrefix:typeof C.addQueryPrefix=="boolean"?C.addQueryPrefix:d.addQueryPrefix,allowDots:g,allowEmptyArrays:typeof C.allowEmptyArrays=="boolean"?!!C.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:x,charset:y,charsetSentinel:typeof C.charsetSentinel=="boolean"?C.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!C.commaRoundTrip,delimiter:typeof C.delimiter>"u"?d.delimiter:C.delimiter,encode:typeof C.encode=="boolean"?C.encode:d.encode,encodeDotInKeys:typeof C.encodeDotInKeys=="boolean"?C.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof C.encoder=="function"?C.encoder:d.encoder,encodeValuesOnly:typeof C.encodeValuesOnly=="boolean"?C.encodeValuesOnly:d.encodeValuesOnly,filter:m,format:v,formatter:R,serializeDate:typeof C.serializeDate=="function"?C.serializeDate:d.serializeDate,skipNulls:typeof C.skipNulls=="boolean"?C.skipNulls:d.skipNulls,sort:typeof C.sort=="function"?C.sort:null,strictNullHandling:typeof C.strictNullHandling=="boolean"?C.strictNullHandling:d.strictNullHandling}};return is=function(k,C){var y=k,v=_(C),R,m;typeof v.filter=="function"?(m=v.filter,y=m("",y)):s(v.filter)&&(m=v.filter,R=m);var x=[];if(typeof y!="object"||y===null)return"";var g=r[v.arrayFormat],S=g==="comma"&&v.commaRoundTrip;R||(R=Object.keys(y)),v.sort&&R.sort(v.sort);for(var w=n(),E=0;E<R.length;++E){var b=R[E],T=y[b];v.skipNulls&&T===null||o(x,f(T,b,g,S,v.allowEmptyArrays,v.strictNullHandling,v.skipNulls,v.encodeDotInKeys,v.encode?v.encoder:null,v.filter,v.sort,v.allowDots,v.serializeDate,v.format,v.formatter,v.encodeValuesOnly,v.charset,w))}var M=x.join(v.delimiter),O=v.addQueryPrefix===!0?"?":"";return v.charsetSentinel&&(v.charset==="iso-8859-1"?O+="utf8=%26%2310003%3B&":O+="utf8=%E2%9C%93&"),M.length>0?O+M:""},is}var ns,ko;function kd(){if(ko)return ns;ko=1;var n=Co(),e=Object.prototype.hasOwnProperty,t=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},r=function(h){return h.replace(/&#(\d+);/g,function(f,_){return String.fromCharCode(parseInt(_,10))})},s=function(h,f,_){if(h&&typeof h=="string"&&f.comma&&h.indexOf(",")>-1)return h.split(",");if(f.throwOnLimitExceeded&&_>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return h},a="utf8=%26%2310003%3B",o="utf8=%E2%9C%93",u=function(f,_){var k={__proto__:null},C=_.ignoreQueryPrefix?f.replace(/^\?/,""):f;C=C.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=_.parameterLimit===1/0?void 0:_.parameterLimit,v=C.split(_.delimiter,_.throwOnLimitExceeded?y+1:y);if(_.throwOnLimitExceeded&&v.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var R=-1,m,x=_.charset;if(_.charsetSentinel)for(m=0;m<v.length;++m)v[m].indexOf("utf8=")===0&&(v[m]===o?x="utf-8":v[m]===a&&(x="iso-8859-1"),R=m,m=v.length);for(m=0;m<v.length;++m)if(m!==R){var g=v[m],S=g.indexOf("]="),w=S===-1?g.indexOf("="):S+1,E,b;w===-1?(E=_.decoder(g,i.decoder,x,"key"),b=_.strictNullHandling?null:""):(E=_.decoder(g.slice(0,w),i.decoder,x,"key"),b=n.maybeMap(s(g.slice(w+1),_,t(k[E])?k[E].length:0),function(M){return _.decoder(M,i.decoder,x,"value")})),b&&_.interpretNumericEntities&&x==="iso-8859-1"&&(b=r(String(b))),g.indexOf("[]=")>-1&&(b=t(b)?[b]:b);var T=e.call(k,E);T&&_.duplicates==="combine"?k[E]=n.combine(k[E],b):(!T||_.duplicates==="last")&&(k[E]=b)}return k},c=function(h,f,_,k){var C=0;if(h.length>0&&h[h.length-1]==="[]"){var y=h.slice(0,-1).join("");C=Array.isArray(f)&&f[y]?f[y].length:0}for(var v=k?f:s(f,_,C),R=h.length-1;R>=0;--R){var m,x=h[R];if(x==="[]"&&_.parseArrays)m=_.allowEmptyArrays&&(v===""||_.strictNullHandling&&v===null)?[]:n.combine([],v);else{m=_.plainObjects?{__proto__:null}:{};var g=x.charAt(0)==="["&&x.charAt(x.length-1)==="]"?x.slice(1,-1):x,S=_.decodeDotInKeys?g.replace(/%2E/g,"."):g,w=parseInt(S,10);!_.parseArrays&&S===""?m={0:v}:!isNaN(w)&&x!==S&&String(w)===S&&w>=0&&_.parseArrays&&w<=_.arrayLimit?(m=[],m[w]=v):S!=="__proto__"&&(m[S]=v)}v=m}return v},d=function(f,_,k,C){if(f){var y=k.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,v=/(\[[^[\]]*])/,R=/(\[[^[\]]*])/g,m=k.depth>0&&v.exec(y),x=m?y.slice(0,m.index):y,g=[];if(x){if(!k.plainObjects&&e.call(Object.prototype,x)&&!k.allowPrototypes)return;g.push(x)}for(var S=0;k.depth>0&&(m=R.exec(y))!==null&&S<k.depth;){if(S+=1,!k.plainObjects&&e.call(Object.prototype,m[1].slice(1,-1))&&!k.allowPrototypes)return;g.push(m[1])}if(m){if(k.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+k.depth+" and strictDepth is true");g.push("["+y.slice(m.index)+"]")}return c(g,_,k,C)}},p=function(f){if(!f)return i;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var _=typeof f.charset>"u"?i.charset:f.charset,k=typeof f.duplicates>"u"?i.duplicates:f.duplicates;if(k!=="combine"&&k!=="first"&&k!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var C=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:i.allowDots:!!f.allowDots;return{allowDots:C,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:i.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:i.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:i.arrayLimit,charset:_,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:i.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:i.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:i.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:i.decoder,delimiter:typeof f.delimiter=="string"||n.isRegExp(f.delimiter)?f.delimiter:i.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:i.depth,duplicates:k,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:i.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:i.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:i.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:i.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return ns=function(h,f){var _=p(f);if(h===""||h===null||typeof h>"u")return _.plainObjects?{__proto__:null}:{};for(var k=typeof h=="string"?u(h,_):h,C=_.plainObjects?{__proto__:null}:{},y=Object.keys(k),v=0;v<y.length;++v){var R=y[v],m=d(R,k[R],_,typeof h=="string");C=n.merge(C,m,_)}return _.allowSparse===!0?C:n.compact(C)},ns}var rs,So;function Sd(){if(So)return rs;So=1;var n=Ed(),e=kd(),t=es();return rs={formats:t,parse:e,stringify:n},rs}var xd=Sd();const xo=ka(xd),_d=["action"],Md=["value"],Rd=["name","value"],Td=["value"],Dd=["disabled"],Od=Ve(l.defineComponent({__name:"ExportComponent",props:{type:{},action:{},filters:{},buttonText:{},csrfToken:{}},setup(n){const e=n,t=l.ref(),i=l.ref([]),r=l.computed(()=>e.csrfToken),s=async()=>{t.value&&t.value.submit()},a=()=>{if(!e.filters)return!1;if(typeof e.filters=="string")return o(),!0;c()},o=()=>{i.value=[];const d=/^.*\?/gm,p=e.filters.replace(d,""),h=xo.parse(p);i.value=u(h)},u=d=>xo.stringify(d,{encode:!1}).split("&").map(p=>{const h=p.split("=");return{key:h[0],value:h[1]}}).filter(({key:p,value:h})=>p.length&&h.length),c=()=>{if(i.value=[],!e.filters)return!1;i.value=u(e.filters)};return l.watch(()=>e.filters,()=>{a()},{deep:!1}),l.onMounted(()=>{a()}),(d,p)=>(l.openBlock(),l.createElementBlock("form",{target:"_blank",action:d.action,method:"POST",ref_key:"reportForm",ref:t},[d.type?(l.openBlock(),l.createElementBlock("input",{key:0,type:"hidden",name:"type",value:d.type},null,8,Md)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value,h=>(l.openBlock(),l.createElementBlock("input",{key:h.key,type:"hidden",name:h.key,value:h.value},null,8,Rd))),128)),l.createElementVNode("input",{type:"hidden",name:"_token",value:r.value},null,8,Td),l.createElementVNode("button",{type:"button",class:l.normalizeClass(["col-auto export-button",{disabled:!d.action}]),onClick:s,disabled:!d.action},[l.createTextVNode(l.toDisplayString(d.buttonText)+" ",1),p[0]||(p[0]=l.createElementVNode("i",{class:"ps-2 bi bi-file-earmark-arrow-down-fill"},null,-1))],10,Dd)],8,_d))}}),[["__scopeId","data-v-db74d2e3"]]);var vn={exports:{}};/*!
5
- * dist/inputmask
6
- * https://github.com/RobinHerbots/Inputmask
7
- * Copyright (c) 2010 - 2024 Robin Herbots
8
- * Licensed under the MIT license
9
- * Version: 5.0.9
10
- */var Ld=vn.exports,_o;function Pd(){return _o||(_o=1,(function(n,e){(function(t,i){n.exports=i()})(typeof self<"u"?self:Ld,(function(){return(function(){var t={3976:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,o.default={_maxTestPos:500,placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:function(){},onincomplete:function(){},oncleared:function(){},repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:function(){},onBeforeMask:null,onBeforePaste:function(u,c){return typeof c.onBeforeMask=="function"?c.onBeforeMask.call(this,u,c):u},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:function(){},skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"text",importDataAttributes:!0,shiftPositions:!0,usePrototypeDefinitions:!0,validationEventTimeOut:3e3,substitutes:{}}},7392:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,o.default={9:{validator:"[0-90-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-90-9A-Za-zА-яЁёÀ-ÿµ]"}}},253:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(u,c,d){if(d===void 0)return u.__data?u.__data[c]:null;u.__data=u.__data||{},u.__data[c]=d}},3776:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.Event=void 0,o.off=function(v,R){var m,x;return C(this[0])&&v&&(m=this[0].eventRegistry,x=this[0],v.split(" ").forEach((function(g){var S=h(g.split("."),2);(function(w,E){var b,T,M=[];if(w.length>0)if(R===void 0)for(b=0,T=m[w][E].length;b<T;b++)M.push({ev:w,namespace:E&&E.length>0?E:"global",handler:m[w][E][b]});else M.push({ev:w,namespace:E&&E.length>0?E:"global",handler:R});else if(E.length>0){for(var O in m)for(var F in m[O])if(F===E)if(R===void 0)for(b=0,T=m[O][F].length;b<T;b++)M.push({ev:O,namespace:F,handler:m[O][F][b]});else M.push({ev:O,namespace:F,handler:R})}return M})(S[0],S[1]).forEach((function(w){var E=w.ev,b=w.handler;(function(T,M,O){if(T in m==1)if(x.removeEventListener?x.removeEventListener(T,O,!1):x.detachEvent&&x.detachEvent("on".concat(T),O),M==="global")for(var F in m[T])m[T][F].splice(m[T][F].indexOf(O),1);else m[T][M].splice(m[T][M].indexOf(O),1)})(E,w.namespace,b)}))}))),this},o.on=function(v,R){if(C(this[0])){var m=this[0].eventRegistry,x=this[0];v.split(" ").forEach((function(g){var S=h(g.split("."),2),w=S[0],E=S[1];(function(b,T){x.addEventListener?x.addEventListener(b,R,!1):x.attachEvent&&x.attachEvent("on".concat(b),R),m[b]=m[b]||{},m[b][T]=m[b][T]||[],m[b][T].push(R)})(w,E===void 0?"global":E)}))}return this},o.trigger=function(v){var R=arguments;if(C(this[0]))for(var m=this[0].eventRegistry,x=this[0],g=typeof v=="string"?v.split(" "):[v.type],S=0;S<g.length;S++){var w=g[S].split("."),E=w[0],b=w[1]||"global";if(k!==void 0&&b==="global"){var T,M={bubbles:!0,cancelable:!0,composed:!0,detail:arguments[1]};if(k.createEvent){try{E==="input"?(M.inputType="insertText",T=new InputEvent(E,M)):T=new CustomEvent(E,M)}catch{(T=k.createEvent("CustomEvent")).initCustomEvent(E,M.bubbles,M.cancelable,M.detail)}v.type&&(0,d.default)(T,v),x.dispatchEvent(T)}else(T=k.createEventObject()).eventType=E,T.detail=arguments[1],v.type&&(0,d.default)(T,v),x.fireEvent("on"+T.eventType,T)}else if(m[E]!==void 0){arguments[0]=arguments[0].type?arguments[0]:p.default.Event(arguments[0]),arguments[0].detail=arguments.slice(1);var O=m[E];(b==="global"?Object.values(O).flat():O[b]).forEach((function(F){return F.apply(x,R)}))}}return this};var c=_(u(9380)),d=_(u(600)),p=_(u(4963));function h(v,R){return(function(m){if(Array.isArray(m))return m})(v)||(function(m,x){var g=m==null?null:typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];if(g!=null){var S,w,E,b,T=[],M=!0,O=!1;try{if(E=(g=g.call(m)).next,x!==0)for(;!(M=(S=E.call(g)).done)&&(T.push(S.value),T.length!==x);M=!0);}catch(F){O=!0,w=F}finally{try{if(!M&&g.return!=null&&(b=g.return(),Object(b)!==b))return}finally{if(O)throw w}}return T}})(v,R)||(function(m,x){if(m){if(typeof m=="string")return f(m,x);var g=Object.prototype.toString.call(m).slice(8,-1);if(g==="Object"&&m.constructor&&(g=m.constructor.name),g==="Map"||g==="Set")return Array.from(m);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return f(m,x)}})(v,R)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function f(v,R){(R==null||R>v.length)&&(R=v.length);for(var m=0,x=new Array(R);m<R;m++)x[m]=v[m];return x}function _(v){return v&&v.__esModule?v:{default:v}}var k=c.default.document;function C(v){return v instanceof Element}var y=o.Event=void 0;typeof c.default.CustomEvent=="function"?o.Event=y=c.default.CustomEvent:c.default.Event&&k&&k.createEvent?(o.Event=y=function(v,R){R=R||{bubbles:!1,cancelable:!1,composed:!0,detail:void 0};var m=k.createEvent("CustomEvent");return m.initCustomEvent(v,R.bubbles,R.cancelable,R.detail),m},y.prototype=c.default.Event.prototype):typeof Event<"u"&&(o.Event=y=Event)},600:function(a,o){function u(c){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},u(c)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=function c(){var d,p,h,f,_,k,C=arguments[0]||{},y=1,v=arguments.length,R=!1;for(typeof C=="boolean"&&(R=C,C=arguments[y]||{},y++),u(C)!=="object"&&typeof C!="function"&&(C={});y<v;y++)if((d=arguments[y])!=null)for(p in d)h=C[p],C!==(f=d[p])&&(R&&f&&(Object.prototype.toString.call(f)==="[object Object]"||(_=Array.isArray(f)))?(_?(_=!1,k=h&&Array.isArray(h)?h:[]):k=h&&Object.prototype.toString.call(h)==="[object Object]"?h:{},C[p]=c(R,k,f)):f!==void 0&&(C[p]=f));return C}},4963:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var c=f(u(9380)),d=f(u(253)),p=u(3776),h=f(u(600));function f(C){return C&&C.__esModule?C:{default:C}}var _=c.default.document;function k(C){return C instanceof k?C:this instanceof k?void(C!=null&&C!==c.default&&(this[0]=C.nodeName?C:C[0]!==void 0&&C[0].nodeName?C[0]:_.querySelector(C),this[0]!==void 0&&this[0]!==null&&(this[0].eventRegistry=this[0].eventRegistry||{}))):new k(C)}k.prototype={on:p.on,off:p.off,trigger:p.trigger},k.extend=h.default,k.data=d.default,k.Event=p.Event,o.default=k},9845:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.mobile=o.iphone=o.ie=void 0;var c,d=(c=u(9380))&&c.__esModule?c:{default:c},p=d.default.navigator&&d.default.navigator.userAgent||"";o.ie=p.indexOf("MSIE ")>0||p.indexOf("Trident/")>0,o.mobile=d.default.navigator&&d.default.navigator.userAgentData&&d.default.navigator.userAgentData.mobile||d.default.navigator&&d.default.navigator.maxTouchPoints||"ontouchstart"in d.default,o.iphone=/iphone/i.test(p)},7184:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(c){return c.replace(u,"\\$1")};var u=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},6030:function(a,o,u){function c(E){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},c(E)}Object.defineProperty(o,"__esModule",{value:!0}),o.EventHandlers=void 0;var d,p=u(9845),h=(d=u(9380))&&d.__esModule?d:{default:d},f=u(7760),_=u(2839),k=u(8711),C=u(7215),y=u(4713);function v(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */v=function(){return b};var E,b={},T=Object.prototype,M=T.hasOwnProperty,O=Object.defineProperty||function(ae,q,ie){ae[q]=ie.value},F=typeof Symbol=="function"?Symbol:{},z=F.iterator||"@@iterator",$=F.asyncIterator||"@@asyncIterator",H=F.toStringTag||"@@toStringTag";function V(ae,q,ie){return Object.defineProperty(ae,q,{value:ie,enumerable:!0,configurable:!0,writable:!0}),ae[q]}try{V({},"")}catch{V=function(q,ie,ue){return q[ie]=ue}}function G(ae,q,ie,ue){var oe=q&&q.prototype instanceof ne?q:ne,ve=Object.create(oe.prototype),Re=new Fe(ue||[]);return O(ve,"_invoke",{value:te(ae,ie,Re)}),ve}function D(ae,q,ie){try{return{type:"normal",arg:ae.call(q,ie)}}catch(ue){return{type:"throw",arg:ue}}}b.wrap=G;var P="suspendedStart",I="suspendedYield",N="executing",Y="completed",X={};function ne(){}function se(){}function W(){}var B={};V(B,z,(function(){return this}));var Z=Object.getPrototypeOf,K=Z&&Z(Z(Ne([])));K&&K!==T&&M.call(K,z)&&(B=K);var U=W.prototype=ne.prototype=Object.create(B);function le(ae){["next","throw","return"].forEach((function(q){V(ae,q,(function(ie){return this._invoke(q,ie)}))}))}function re(ae,q){function ie(oe,ve,Re,Se){var _e=D(ae[oe],ae,ve);if(_e.type!=="throw"){var ce=_e.arg,Le=ce.value;return Le&&c(Le)=="object"&&M.call(Le,"__await")?q.resolve(Le.__await).then((function(ze){ie("next",ze,Re,Se)}),(function(ze){ie("throw",ze,Re,Se)})):q.resolve(Le).then((function(ze){ce.value=ze,Re(ce)}),(function(ze){return ie("throw",ze,Re,Se)}))}Se(_e.arg)}var ue;O(this,"_invoke",{value:function(oe,ve){function Re(){return new q((function(Se,_e){ie(oe,ve,Se,_e)}))}return ue=ue?ue.then(Re,Re):Re()}})}function te(ae,q,ie){var ue=P;return function(oe,ve){if(ue===N)throw new Error("Generator is already running");if(ue===Y){if(oe==="throw")throw ve;return{value:E,done:!0}}for(ie.method=oe,ie.arg=ve;;){var Re=ie.delegate;if(Re){var Se=fe(Re,ie);if(Se){if(Se===X)continue;return Se}}if(ie.method==="next")ie.sent=ie._sent=ie.arg;else if(ie.method==="throw"){if(ue===P)throw ue=Y,ie.arg;ie.dispatchException(ie.arg)}else ie.method==="return"&&ie.abrupt("return",ie.arg);ue=N;var _e=D(ae,q,ie);if(_e.type==="normal"){if(ue=ie.done?Y:I,_e.arg===X)continue;return{value:_e.arg,done:ie.done}}_e.type==="throw"&&(ue=Y,ie.method="throw",ie.arg=_e.arg)}}}function fe(ae,q){var ie=q.method,ue=ae.iterator[ie];if(ue===E)return q.delegate=null,ie==="throw"&&ae.iterator.return&&(q.method="return",q.arg=E,fe(ae,q),q.method==="throw")||ie!=="return"&&(q.method="throw",q.arg=new TypeError("The iterator does not provide a '"+ie+"' method")),X;var oe=D(ue,ae.iterator,q.arg);if(oe.type==="throw")return q.method="throw",q.arg=oe.arg,q.delegate=null,X;var ve=oe.arg;return ve?ve.done?(q[ae.resultName]=ve.value,q.next=ae.nextLoc,q.method!=="return"&&(q.method="next",q.arg=E),q.delegate=null,X):ve:(q.method="throw",q.arg=new TypeError("iterator result is not an object"),q.delegate=null,X)}function we(ae){var q={tryLoc:ae[0]};1 in ae&&(q.catchLoc=ae[1]),2 in ae&&(q.finallyLoc=ae[2],q.afterLoc=ae[3]),this.tryEntries.push(q)}function Ae(ae){var q=ae.completion||{};q.type="normal",delete q.arg,ae.completion=q}function Fe(ae){this.tryEntries=[{tryLoc:"root"}],ae.forEach(we,this),this.reset(!0)}function Ne(ae){if(ae||ae===""){var q=ae[z];if(q)return q.call(ae);if(typeof ae.next=="function")return ae;if(!isNaN(ae.length)){var ie=-1,ue=function oe(){for(;++ie<ae.length;)if(M.call(ae,ie))return oe.value=ae[ie],oe.done=!1,oe;return oe.value=E,oe.done=!0,oe};return ue.next=ue}}throw new TypeError(c(ae)+" is not iterable")}return se.prototype=W,O(U,"constructor",{value:W,configurable:!0}),O(W,"constructor",{value:se,configurable:!0}),se.displayName=V(W,H,"GeneratorFunction"),b.isGeneratorFunction=function(ae){var q=typeof ae=="function"&&ae.constructor;return!!q&&(q===se||(q.displayName||q.name)==="GeneratorFunction")},b.mark=function(ae){return Object.setPrototypeOf?Object.setPrototypeOf(ae,W):(ae.__proto__=W,V(ae,H,"GeneratorFunction")),ae.prototype=Object.create(U),ae},b.awrap=function(ae){return{__await:ae}},le(re.prototype),V(re.prototype,$,(function(){return this})),b.AsyncIterator=re,b.async=function(ae,q,ie,ue,oe){oe===void 0&&(oe=Promise);var ve=new re(G(ae,q,ie,ue),oe);return b.isGeneratorFunction(q)?ve:ve.next().then((function(Re){return Re.done?Re.value:ve.next()}))},le(U),V(U,H,"Generator"),V(U,z,(function(){return this})),V(U,"toString",(function(){return"[object Generator]"})),b.keys=function(ae){var q=Object(ae),ie=[];for(var ue in q)ie.push(ue);return ie.reverse(),function oe(){for(;ie.length;){var ve=ie.pop();if(ve in q)return oe.value=ve,oe.done=!1,oe}return oe.done=!0,oe}},b.values=Ne,Fe.prototype={constructor:Fe,reset:function(ae){if(this.prev=0,this.next=0,this.sent=this._sent=E,this.done=!1,this.delegate=null,this.method="next",this.arg=E,this.tryEntries.forEach(Ae),!ae)for(var q in this)q.charAt(0)==="t"&&M.call(this,q)&&!isNaN(+q.slice(1))&&(this[q]=E)},stop:function(){this.done=!0;var ae=this.tryEntries[0].completion;if(ae.type==="throw")throw ae.arg;return this.rval},dispatchException:function(ae){if(this.done)throw ae;var q=this;function ie(_e,ce){return ve.type="throw",ve.arg=ae,q.next=_e,ce&&(q.method="next",q.arg=E),!!ce}for(var ue=this.tryEntries.length-1;ue>=0;--ue){var oe=this.tryEntries[ue],ve=oe.completion;if(oe.tryLoc==="root")return ie("end");if(oe.tryLoc<=this.prev){var Re=M.call(oe,"catchLoc"),Se=M.call(oe,"finallyLoc");if(Re&&Se){if(this.prev<oe.catchLoc)return ie(oe.catchLoc,!0);if(this.prev<oe.finallyLoc)return ie(oe.finallyLoc)}else if(Re){if(this.prev<oe.catchLoc)return ie(oe.catchLoc,!0)}else{if(!Se)throw new Error("try statement without catch or finally");if(this.prev<oe.finallyLoc)return ie(oe.finallyLoc)}}}},abrupt:function(ae,q){for(var ie=this.tryEntries.length-1;ie>=0;--ie){var ue=this.tryEntries[ie];if(ue.tryLoc<=this.prev&&M.call(ue,"finallyLoc")&&this.prev<ue.finallyLoc){var oe=ue;break}}oe&&(ae==="break"||ae==="continue")&&oe.tryLoc<=q&&q<=oe.finallyLoc&&(oe=null);var ve=oe?oe.completion:{};return ve.type=ae,ve.arg=q,oe?(this.method="next",this.next=oe.finallyLoc,X):this.complete(ve)},complete:function(ae,q){if(ae.type==="throw")throw ae.arg;return ae.type==="break"||ae.type==="continue"?this.next=ae.arg:ae.type==="return"?(this.rval=this.arg=ae.arg,this.method="return",this.next="end"):ae.type==="normal"&&q&&(this.next=q),X},finish:function(ae){for(var q=this.tryEntries.length-1;q>=0;--q){var ie=this.tryEntries[q];if(ie.finallyLoc===ae)return this.complete(ie.completion,ie.afterLoc),Ae(ie),X}},catch:function(ae){for(var q=this.tryEntries.length-1;q>=0;--q){var ie=this.tryEntries[q];if(ie.tryLoc===ae){var ue=ie.completion;if(ue.type==="throw"){var oe=ue.arg;Ae(ie)}return oe}}throw new Error("illegal catch attempt")},delegateYield:function(ae,q,ie){return this.delegate={iterator:Ne(ae),resultName:q,nextLoc:ie},this.method==="next"&&(this.arg=E),X}},b}function R(E,b){var T=typeof Symbol<"u"&&E[Symbol.iterator]||E["@@iterator"];if(!T){if(Array.isArray(E)||(T=(function(H,V){if(H){if(typeof H=="string")return m(H,V);var G=Object.prototype.toString.call(H).slice(8,-1);if(G==="Object"&&H.constructor&&(G=H.constructor.name),G==="Map"||G==="Set")return Array.from(H);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return m(H,V)}})(E))||b){T&&(E=T);var M=0,O=function(){};return{s:O,n:function(){return M>=E.length?{done:!0}:{done:!1,value:E[M++]}},e:function(H){throw H},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
12
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var F,z=!0,$=!1;return{s:function(){T=T.call(E)},n:function(){var H=T.next();return z=H.done,H},e:function(H){$=!0,F=H},f:function(){try{z||T.return==null||T.return()}finally{if($)throw F}}}}function m(E,b){(b==null||b>E.length)&&(b=E.length);for(var T=0,M=new Array(b);T<b;T++)M[T]=E[T];return M}function x(E,b,T,M,O,F,z){try{var $=E[F](z),H=$.value}catch(V){return void T(V)}$.done?b(H):Promise.resolve(H).then(M,O)}var g,S,w=o.EventHandlers={keyEvent:function(E,b,T,M,O){var F=this.inputmask,z=F.opts,$=F.dependencyLib,H=F.maskset,V=this,G=$(V),D=E.key,P=k.caret.call(F,V),I=z.onKeyDown.call(this,E,k.getBuffer.call(F),P,z);if(I!==void 0)return I;if(D===_.keys.Backspace||D===_.keys.Delete||p.iphone&&D===_.keys.BACKSPACE_SAFARI||E.ctrlKey&&D===_.keys.x&&!("oncut"in V))E.preventDefault(),C.handleRemove.call(F,V,D,P),(0,f.writeBuffer)(V,k.getBuffer.call(F,!0),H.p,E,V.inputmask._valueGet()!==k.getBuffer.call(F).join(""));else if(D===_.keys.End||D===_.keys.PageDown){E.preventDefault();var N=k.seekNext.call(F,k.getLastValidPosition.call(F));k.caret.call(F,V,E.shiftKey?P.begin:N,N,!0)}else D===_.keys.Home&&!E.shiftKey||D===_.keys.PageUp?(E.preventDefault(),k.caret.call(F,V,0,E.shiftKey?P.begin:0,!0)):z.undoOnEscape&&D===_.keys.Escape&&E.altKey!==!0?((0,f.checkVal)(V,!0,!1,F.undoValue.split("")),G.trigger("click")):D!==_.keys.Insert||E.shiftKey||E.ctrlKey||F.userOptions.insertMode!==void 0?z.tabThrough===!0&&D===_.keys.Tab?E.shiftKey===!0?(P.end=k.seekPrevious.call(F,P.end,!0),y.getTest.call(F,P.end-1).match.static===!0&&P.end--,P.begin=k.seekPrevious.call(F,P.end,!0),P.begin>=0&&P.end>0&&(E.preventDefault(),k.caret.call(F,V,P.begin,P.end))):(P.begin=k.seekNext.call(F,P.begin,!0),P.end=k.seekNext.call(F,P.begin,!0),P.end<H.maskLength&&P.end--,P.begin<=H.maskLength&&(E.preventDefault(),k.caret.call(F,V,P.begin,P.end))):E.shiftKey||(z.insertModeVisual&&z.insertMode===!1?D===_.keys.ArrowRight?setTimeout((function(){var Y=k.caret.call(F,V);k.caret.call(F,V,Y.begin)}),0):D===_.keys.ArrowLeft&&setTimeout((function(){var Y=k.translatePosition.call(F,V.inputmask.caretPos.begin);k.translatePosition.call(F,V.inputmask.caretPos.end),F.isRTL?k.caret.call(F,V,Y+(Y===H.maskLength?0:1)):k.caret.call(F,V,Y-(Y===0?0:1))}),0):F.keyEventHook===void 0||F.keyEventHook(E)):C.isSelection.call(F,P)?z.insertMode=!z.insertMode:(z.insertMode=!z.insertMode,k.caret.call(F,V,P.begin,P.begin));return F.isComposing=D==_.keys.Process||D==_.keys.Unidentified,F.ignorable=D.length>1&&!(V.tagName.toLowerCase()==="textarea"&&D==_.keys.Enter),w.keypressEvent.call(this,E,b,T,M,O)},keypressEvent:function(E,b,T,M,O){var F=this.inputmask||this,z=F.opts,$=F.dependencyLib,H=F.maskset,V=F.el,G=$(V),D=E.key;if(b===!0||E.ctrlKey&&E.altKey&&!F.ignorable||!(E.ctrlKey||E.metaKey||F.ignorable)){if(D){var P,I=b?{begin:O,end:O}:k.caret.call(F,V);b||(D=z.substitutes[D]||D),H.writeOutBuffer=!0;var N=C.isValid.call(F,I,D,M,void 0,void 0,void 0,b);if(N!==!1&&(k.resetMaskSet.call(F,!0),P=N.caret!==void 0?N.caret:k.seekNext.call(F,N.pos.begin?N.pos.begin:N.pos),H.p=P),P=z.numericInput&&N.caret===void 0?k.seekPrevious.call(F,P):P,T!==!1&&(setTimeout((function(){z.onKeyValidation.call(V,D,N)}),0),H.writeOutBuffer&&N!==!1)){var Y=k.getBuffer.call(F);(0,f.writeBuffer)(V,Y,P,E,b!==!0)}if(E.preventDefault(),b)return N!==!1&&(N.forwardPosition=P),N}}else D===_.keys.Enter&&F.undoValue!==F._valueGet(!0)&&(F.undoValue=F._valueGet(!0),setTimeout((function(){G.trigger("change")}),0))},pasteEvent:(g=v().mark((function E(b){var T,M,O,F,z,$;return v().wrap((function(H){for(;;)switch(H.prev=H.next){case 0:T=function(V,G,D,P,I){var N=k.caret.call(V,G,void 0,void 0,!0),Y=D.substr(0,N.begin),X=D.substr(N.end,D.length);if(Y==(V.isRTL?k.getBufferTemplate.call(V).slice().reverse():k.getBufferTemplate.call(V)).slice(0,N.begin).join("")&&(Y=""),X==(V.isRTL?k.getBufferTemplate.call(V).slice().reverse():k.getBufferTemplate.call(V)).slice(N.end).join("")&&(X=""),P=Y+P+X,V.isRTL&&F.numericInput!==!0){P=P.split("");var ne,se=R(k.getBufferTemplate.call(V));try{for(se.s();!(ne=se.n()).done;){var W=ne.value;P[0]===W&&P.shift()}}catch(Z){se.e(Z)}finally{se.f()}P=P.reverse().join("")}var B=P;if(typeof I=="function"){if((B=I.call(V,B,F))===!1)return!1;B||(B=D)}(0,f.checkVal)(G,!0,!1,B.toString().split(""),b)},M=this,O=this.inputmask,F=O.opts,z=O._valueGet(!0),O.skipInputEvent=!0,b.clipboardData&&b.clipboardData.getData?$=b.clipboardData.getData("text/plain"):h.default.clipboardData&&h.default.clipboardData.getData&&($=h.default.clipboardData.getData("Text")),T(O,M,z,$,F.onBeforePaste),b.preventDefault();case 7:case"end":return H.stop()}}),E,this)})),S=function(){var E=this,b=arguments;return new Promise((function(T,M){var O=g.apply(E,b);function F($){x(O,T,M,F,z,"next",$)}function z($){x(O,T,M,F,z,"throw",$)}F(void 0)}))},function(E){return S.apply(this,arguments)}),inputFallBackEvent:function(E){var b=this.inputmask,T=b.opts,M=b.dependencyLib,O,F=this,z=F.inputmask._valueGet(!0),$=(b.isRTL?k.getBuffer.call(b).slice().reverse():k.getBuffer.call(b)).join(""),H=k.caret.call(b,F,void 0,void 0,!0);if($!==z){if(O=(function(G,D,P){for(var I,N,Y,X=G.substr(0,P.begin).split(""),ne=G.substr(P.begin).split(""),se=D.substr(0,P.begin).split(""),W=D.substr(P.begin).split(""),B=X.length>=se.length?X.length:se.length,Z=ne.length>=W.length?ne.length:W.length,K="",U=[],le="~";X.length<B;)X.push(le);for(;se.length<B;)se.push(le);for(;ne.length<Z;)ne.unshift(le);for(;W.length<Z;)W.unshift(le);var re=X.concat(ne),te=se.concat(W);for(N=0,I=re.length;N<I;N++)switch(Y=y.getPlaceholder.call(b,k.translatePosition.call(b,N)),K){case"insertText":te[N-1]===re[N]&&P.begin==re.length-1&&U.push(re[N]),N=I;break;case"insertReplacementText":case"deleteContentBackward":re[N]===le?P.end++:N=I;break;default:re[N]!==te[N]&&(re[N+1]!==le&&re[N+1]!==Y&&re[N+1]!==void 0||(te[N]!==Y||te[N+1]!==le)&&te[N]!==le?te[N+1]===le&&te[N]===re[N+1]?(K="insertText",U.push(re[N]),P.begin--,P.end--):re[N]!==Y&&re[N]!==le&&(re[N+1]===le||te[N]!==re[N]&&te[N+1]===re[N+1])?(K="insertReplacementText",U.push(re[N]),P.begin--):re[N]===le?(K="deleteContentBackward",(k.isMask.call(b,k.translatePosition.call(b,N),!0)||te[N]===T.radixPoint)&&P.end++):N=I:(K="insertText",U.push(re[N]),P.begin--,P.end--))}return{action:K,data:U,caret:P}})(z,$,H),(F.inputmask.shadowRoot||F.ownerDocument).activeElement!==F&&F.focus(),(0,f.writeBuffer)(F,k.getBuffer.call(b)),k.caret.call(b,F,H.begin,H.end,!0),!p.mobile&&b.skipNextInsert&&E.inputType==="insertText"&&O.action==="insertText"&&b.isComposing)return!1;switch(E.inputType==="insertCompositionText"&&O.action==="insertText"&&b.isComposing?b.skipNextInsert=!0:b.skipNextInsert=!1,O.action){case"insertText":case"insertReplacementText":O.data.forEach((function(G,D){var P=new M.Event("keypress");P.key=G,b.ignorable=!1,w.keypressEvent.call(F,P)})),setTimeout((function(){b.$el.trigger("keyup")}),0);break;case"deleteContentBackward":var V=new M.Event("keydown");V.key=_.keys.Backspace,w.keyEvent.call(F,V);break;default:(0,f.applyInputValue)(F,z),k.caret.call(b,F,H.begin,H.end,!0)}E.preventDefault()}},setValueEvent:function(E){var b=this.inputmask,T=b.dependencyLib,M=this,O=E&&E.detail?E.detail[0]:arguments[1];O===void 0&&(O=M.inputmask._valueGet(!0)),(0,f.applyInputValue)(M,O,new T.Event("input")),(E.detail&&E.detail[1]!==void 0||arguments[2]!==void 0)&&k.caret.call(b,M,E.detail?E.detail[1]:arguments[2])},focusEvent:function(E){var b=this.inputmask,T=b.opts,M=b&&b._valueGet();T.showMaskOnFocus&&M!==k.getBuffer.call(b).join("")&&(0,f.writeBuffer)(this,k.getBuffer.call(b),k.seekNext.call(b,k.getLastValidPosition.call(b))),T.positionCaretOnTab!==!0||b.mouseEnter!==!1||C.isComplete.call(b,k.getBuffer.call(b))&&k.getLastValidPosition.call(b)!==-1||w.clickEvent.apply(this,[E,!0]),b.undoValue=b&&b._valueGet(!0)},invalidEvent:function(E){this.inputmask.validationEvent=!0},mouseleaveEvent:function(){var E=this.inputmask,b=E.opts,T=this;E.mouseEnter=!1,b.clearMaskOnLostFocus&&(T.inputmask.shadowRoot||T.ownerDocument).activeElement!==T&&(0,f.HandleNativePlaceholder)(T,E.originalPlaceholder)},clickEvent:function(E,b){var T=this.inputmask;T.clicked++;var M=this;if((M.inputmask.shadowRoot||M.ownerDocument).activeElement===M){var O=k.determineNewCaretPosition.call(T,k.caret.call(T,M),b);O!==void 0&&k.caret.call(T,M,O)}},cutEvent:function(E){var b=this.inputmask,T=b.maskset,M=this,O=k.caret.call(b,M),F=b.isRTL?k.getBuffer.call(b).slice(O.end,O.begin):k.getBuffer.call(b).slice(O.begin,O.end),z=b.isRTL?F.reverse().join(""):F.join("");h.default.navigator&&h.default.navigator.clipboard?h.default.navigator.clipboard.writeText(z):h.default.clipboardData&&h.default.clipboardData.getData&&h.default.clipboardData.setData("Text",z),C.handleRemove.call(b,M,_.keys.Delete,O),(0,f.writeBuffer)(M,k.getBuffer.call(b),T.p,E,b.undoValue!==b._valueGet(!0))},blurEvent:function(E){var b=this.inputmask,T=b.opts,M=b.dependencyLib;b.clicked=0;var O=M(this),F=this;if(F.inputmask){(0,f.HandleNativePlaceholder)(F,b.originalPlaceholder);var z=F.inputmask._valueGet(),$=k.getBuffer.call(b).slice();z!==""&&(T.clearMaskOnLostFocus&&(k.getLastValidPosition.call(b)===-1&&z===k.getBufferTemplate.call(b).join("")?$=[]:f.clearOptionalTail.call(b,$)),C.isComplete.call(b,$)===!1&&(setTimeout((function(){O.trigger("incomplete")}),0),T.clearIncomplete&&(k.resetMaskSet.call(b,!1),$=T.clearMaskOnLostFocus?[]:k.getBufferTemplate.call(b).slice())),(0,f.writeBuffer)(F,$,void 0,E)),z=b._valueGet(!0),b.undoValue!==z&&(z!=""||b.undoValue!=k.getBufferTemplate.call(b).join("")||b.undoValue==k.getBufferTemplate.call(b).join("")&&b.maskset.validPositions.length>0)&&(b.undoValue=z,O.trigger("change"))}},mouseenterEvent:function(){var E=this.inputmask,b=E.opts.showMaskOnHover,T=this;if(E.mouseEnter=!0,(T.inputmask.shadowRoot||T.ownerDocument).activeElement!==T){var M=(E.isRTL?k.getBufferTemplate.call(E).slice().reverse():k.getBufferTemplate.call(E)).join("");b&&(0,f.HandleNativePlaceholder)(T,M)}},submitEvent:function(){var E=this.inputmask,b=E.opts;E.undoValue!==E._valueGet(!0)&&E.$el.trigger("change"),k.getLastValidPosition.call(E)===-1&&E._valueGet&&E._valueGet()===k.getBufferTemplate.call(E).join("")&&E._valueSet(""),b.clearIncomplete&&C.isComplete.call(E,k.getBuffer.call(E))===!1&&E._valueSet(""),b.removeMaskOnSubmit&&(E._valueSet(E.unmaskedvalue(),!0),setTimeout((function(){(0,f.writeBuffer)(E.el,k.getBuffer.call(E))}),0))},resetEvent:function(){var E=this.inputmask;E.refreshValue=!0,setTimeout((function(){(0,f.applyInputValue)(E.el,E._valueGet(!0))}),0)}}},9716:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.EventRuler=void 0;var c,d=u(7760),p=(c=u(2394))&&c.__esModule?c:{default:c},h=u(2839),f=u(8711);o.EventRuler={on:function(_,k,C){var y=_.inputmask.dependencyLib,v=function(R){R.originalEvent&&(R=R.originalEvent||R,arguments[0]=R);var m,x=this,g=x.inputmask,S=g?g.opts:void 0;if(g===void 0&&this.nodeName!=="FORM"){var w=y.data(x,"_inputmask_opts");y(x).off(),w&&new p.default(w).mask(x)}else{if(["submit","reset","setvalue"].includes(R.type)||this.nodeName==="FORM"||!(x.disabled||x.readOnly&&!(R.type==="keydown"&&R.ctrlKey&&R.key===h.keys.c||S.tabThrough===!1&&R.key===h.keys.Tab))){switch(R.type){case"input":if(g.skipInputEvent===!0)return g.skipInputEvent=!1,R.preventDefault();break;case"click":case"focus":return g.validationEvent?(g.validationEvent=!1,_.blur(),(0,d.HandleNativePlaceholder)(_,(g.isRTL?f.getBufferTemplate.call(g).slice().reverse():f.getBufferTemplate.call(g)).join("")),setTimeout((function(){_.focus()}),S.validationEventTimeOut),!1):(m=arguments,void setTimeout((function(){_.inputmask&&C.apply(x,m)}),0))}var E=C.apply(x,arguments);return E===!1&&(R.preventDefault(),R.stopPropagation()),E}R.preventDefault()}};["submit","reset"].includes(k)?(v=v.bind(_),_.form!==null&&y(_.form).on(k,v)):y(_).on(k,v),_.inputmask.events[k]=_.inputmask.events[k]||[],_.inputmask.events[k].push(v)},off:function(_,k){if(_.inputmask&&_.inputmask.events){var C=_.inputmask.dependencyLib,y=_.inputmask.events;for(var v in k&&((y=[])[k]=_.inputmask.events[k]),y){for(var R=y[v];R.length>0;){var m=R.pop();["submit","reset"].includes(v)?_.form!==null&&C(_.form).off(v,m):C(_).off(v,m)}delete _.inputmask.events[v]}}}}},219:function(a,o,u){var c=v(u(7184)),d=v(u(2394)),p=u(2839),h=u(8711),f=u(4713);function _(D,P){return(function(I){if(Array.isArray(I))return I})(D)||(function(I,N){var Y=I==null?null:typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(Y!=null){var X,ne,se,W,B=[],Z=!0,K=!1;try{if(se=(Y=Y.call(I)).next,N!==0)for(;!(Z=(X=se.call(Y)).done)&&(B.push(X.value),B.length!==N);Z=!0);}catch(U){K=!0,ne=U}finally{try{if(!Z&&Y.return!=null&&(W=Y.return(),Object(W)!==W))return}finally{if(K)throw ne}}return B}})(D,P)||(function(I,N){if(I){if(typeof I=="string")return k(I,N);var Y=Object.prototype.toString.call(I).slice(8,-1);if(Y==="Object"&&I.constructor&&(Y=I.constructor.name),Y==="Map"||Y==="Set")return Array.from(I);if(Y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Y))return k(I,N)}})(D,P)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function k(D,P){(P==null||P>D.length)&&(P=D.length);for(var I=0,N=new Array(P);I<P;I++)N[I]=D[I];return N}function C(D){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},C(D)}function y(D,P){for(var I=0;I<P.length;I++){var N=P[I];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(D,(Y=N.key,X=void 0,X=(function(ne,se){if(C(ne)!=="object"||ne===null)return ne;var W=ne[Symbol.toPrimitive];if(W!==void 0){var B=W.call(ne,se);if(C(B)!=="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(ne)})(Y,"string"),C(X)==="symbol"?X:String(X)),N)}var Y,X}function v(D){return D&&D.__esModule?D:{default:D}}u(1313);var R=d.default.dependencyLib,m=(function(){function D(N,Y,X,ne){(function(se,W){if(!(se instanceof W))throw new TypeError("Cannot call a class as a function")})(this,D),this.mask=N,this.format=Y,this.opts=X,this.inputmask=ne,this._date=new Date(1,0,1),this.initDateObject(N,this.opts,this.inputmask)}var P,I;return P=D,(I=[{key:"date",get:function(){return this._date===void 0&&(this._date=new Date(1,0,1),this.initDateObject(void 0,this.opts,this.inputmask)),this._date}},{key:"initDateObject",value:function(N,Y,X){var ne;for(O(Y).lastIndex=0;ne=O(Y).exec(this.format);){var se=/\d+$/.exec(ne[0]),W=se?ne[0][0]+"x":ne[0],B=void 0;if(N!==void 0){if(se){var Z=O(Y).lastIndex,K=G.call(X,ne.index,Y,X&&X.maskset);O(Y).lastIndex=Z,B=N.slice(0,N.indexOf(K.nextMatch[0]))}else{for(var U=ne[0][0],le=ne.index;X&&(Y.placeholder[f.getTest.call(X,le).match.placeholder]||f.getTest.call(X,le).match.placeholder)===U;)le++;var re=le-ne.index;B=N.slice(0,re||w[W]&&w[W][4]||W.length)}N=N.slice(B.length)}Object.prototype.hasOwnProperty.call(w,W)&&this.setValue(this,B,W,w[W][2],w[W][1])}}},{key:"setValue",value:function(N,Y,X,ne,se){if(Y!==void 0)switch(ne){case"ampm":N[ne]=Y,N["raw"+ne]=Y.replace(/\s/g,"_");break;case"month":if(X==="mmm"||X==="mmmm"){N[ne]=$(X==="mmm"?g.monthNames.slice(0,12).findIndex((function(B){return Y.toLowerCase()===B.toLowerCase()}))+1:g.monthNames.slice(12,24).findIndex((function(B){return Y.toLowerCase()===B.toLowerCase()}))+1,2),N[ne]=N[ne]==="00"?"":N[ne].toString(),N["raw"+ne]=N[ne];break}default:N[ne]=Y.replace(/[^0-9]/g,"0"),N["raw"+ne]=Y.replace(/\s/g,"_")}if(se!==void 0){var W=N[ne];(ne==="day"&&parseInt(W)===29||ne==="month"&&parseInt(W)===2)&&(parseInt(N.day)!==29||parseInt(N.month)!==2||N.year!==""&&N.year!==void 0||N._date.setFullYear(2012,1,29)),ne==="day"&&(S=!0,parseInt(W)===0&&(W=1)),ne==="month"&&(S=!0),ne==="year"&&(S=!0,W.length<w[X][4]&&(W=$(W,w[X][4],!0))),(W!==""&&!isNaN(W)||ne==="ampm")&&se.call(N._date,W)}}},{key:"reset",value:function(){this._date=new Date(1,0,1)}},{key:"reInit",value:function(){this._date=void 0,this.date}}])&&y(P.prototype,I),Object.defineProperty(P,"prototype",{writable:!1}),D})(),x=new Date().getFullYear(),g=d.default.prototype.i18n,S=!1,w={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return $(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",function(D){var P=D?parseInt(D):0;return P>0&&P--,Date.prototype.setMonth.call(this,P)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(D){var P=D?parseInt(D):0;return P>0&&P--,Date.prototype.setMonth.call(this,P)},"month",function(){return $(Date.prototype.getMonth.call(this)+1,2)}],mmm:[g.monthNames.slice(0,12).join("|"),function(D){var P=g.monthNames.slice(0,12).findIndex((function(I){return D.toLowerCase()===I.toLowerCase()}));return P!==-1&&Date.prototype.setMonth.call(this,P)},"month",function(){return g.monthNames.slice(0,12)[Date.prototype.getMonth.call(this)]}],mmmm:[g.monthNames.slice(12,24).join("|"),function(D){var P=g.monthNames.slice(12,24).findIndex((function(I){return D.toLowerCase()===I.toLowerCase()}));return P!==-1&&Date.prototype.setMonth.call(this,P)},"month",function(){return g.monthNames.slice(12,24)[Date.prototype.getMonth.call(this)]}],yy:["[0-9]{2}",function(D){var P=new Date().getFullYear().toString().slice(0,2);Date.prototype.setFullYear.call(this,"".concat(P).concat(D))},"year",function(){return $(Date.prototype.getFullYear.call(this),2)},2],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return $(Date.prototype.getFullYear.call(this),4)},4],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return $(Date.prototype.getHours.call(this),2)}],hx:[function(D){return"[0-9]{".concat(D,"}")},Date.prototype.setHours,"hours",function(D){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return $(Date.prototype.getHours.call(this),2)}],Hx:[function(D){return"[0-9]{".concat(D,"}")},Date.prototype.setHours,"hours",function(D){return function(){return $(Date.prototype.getHours.call(this),D)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return $(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return $(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return $(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return $(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",b,"ampm",T,1],tt:["[ap]m",b,"ampm",T,2],T:["[AP]",b,"ampm",T,1],TT:["[AP]M",b,"ampm",T,2],Z:[".*",void 0,"Z",function(){var D=this.toString().match(/\((.+)\)/)[1];return D.includes(" ")&&(D=(D=D.replace("-"," ").toUpperCase()).split(" ").map((function(P){return _(P,1)[0]})).join("")),D}],o:[""],S:[""]},E={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function b(D){var P=this.getHours();D.toLowerCase().includes("p")?this.setHours(P+12):D.toLowerCase().includes("a")&&P>=12&&this.setHours(P-12)}function T(){var D=this.getHours();return(D=D||12)>=12?"PM":"AM"}function M(D){var P=/\d+$/.exec(D[0]);if(P&&P[0]!==void 0){var I=w[D[0][0]+"x"].slice("");return I[0]=I[0](P[0]),I[3]=I[3](P[0]),I}if(w[D[0]])return w[D[0]]}function O(D){if(!D.tokenizer){var P=[],I=[];for(var N in w)if(/\.*x$/.test(N)){var Y=N[0]+"\\d+";I.indexOf(Y)===-1&&I.push(Y)}else P.indexOf(N[0])===-1&&P.push(N[0]);D.tokenizer="("+(I.length>0?I.join("|")+"|":"")+P.join("+|")+")+?|.",D.tokenizer=new RegExp(D.tokenizer,"g")}return D.tokenizer}function F(D,P,I){if(!S)return!0;if(D.rawday===void 0||!isFinite(D.rawday)&&new Date(D.date.getFullYear(),isFinite(D.rawmonth)?D.month:D.date.getMonth()+1,0).getDate()>=D.day||D.day=="29"&&(!isFinite(D.rawyear)||D.rawyear===void 0||D.rawyear==="")||new Date(D.date.getFullYear(),isFinite(D.rawmonth)?D.month:D.date.getMonth()+1,0).getDate()>=D.day)return P;if(D.day=="29"){var N=G.call(this,P.pos,I,this.maskset);if(N.targetMatch&&N.targetMatch[0]==="yyyy"&&P.pos-N.targetMatchIndex==2)return P.remove=P.pos+1,P}else if(D.date.getMonth()==2&&D.day=="30"&&P.c!==void 0)return D.day="03",D.date.setDate(3),D.date.setMonth(1),P.insert=[{pos:P.pos,c:"0"},{pos:P.pos+1,c:P.c}],P.caret=h.seekNext.call(this,P.pos+1),P;return!1}function z(D,P,I,N){var Y,X,ne="",se=0,W={};for(O(I).lastIndex=0;Y=O(I).exec(D);){if(P===void 0)if(X=M(Y))ne+="("+X[0]+")",I.placeholder&&I.placeholder!==""?(W[se]=I.placeholder[Y.index%I.placeholder.length],W[I.placeholder[Y.index%I.placeholder.length]]=Y[0].charAt(0)):W[se]=Y[0].charAt(0);else switch(Y[0]){case"[":ne+="(";break;case"]":ne+=")?";break;default:ne+=(0,c.default)(Y[0]),W[se]=Y[0].charAt(0)}else(X=M(Y))?N!==!0&&X[3]?ne+=X[3].call(P.date):X[2]?ne+=P["raw"+X[2]]:ne+=Y[0]:ne+=Y[0];se++}return P===void 0&&(I.placeholder=W),ne}function $(D,P,I){for(D=String(D),P=P||2;D.length<P;)D=I?D+"0":"0"+D;return D}function H(D,P,I){return typeof D=="string"?new m(D,P,I,this):D&&C(D)==="object"&&Object.prototype.hasOwnProperty.call(D,"date")?D:void 0}function V(D,P){return z(P.inputFormat,{date:D},P)}function G(D,P,I){var N,Y,X=this,ne=I&&I.tests[D]?P.placeholder[I.tests[D][0].match.placeholder]||I.tests[D][0].match.placeholder:"",se=0,W=0;for(O(P).lastIndex=0;Y=O(P).exec(P.inputFormat);){var B=/\d+$/.exec(Y[0]);if(B)W=parseInt(B[0]);else{for(var Z=Y[0][0],K=se;X&&(P.placeholder[f.getTest.call(X,K).match.placeholder]||f.getTest.call(X,K).match.placeholder)===Z;)K++;(W=K-se)===0&&(W=Y[0].length)}if(se+=W,Y[0].indexOf(ne)!=-1||se>=D+1){N=Y,Y=O(P).exec(P.inputFormat);break}}return{targetMatchIndex:se-W,nextMatch:Y,targetMatch:N}}d.default.extendAliases({datetime:{mask:function(D){return D.numericInput=!1,w.S=g.ordinalSuffix.join("|"),D.inputFormat=E[D.inputFormat]||D.inputFormat,D.displayFormat=E[D.displayFormat]||D.displayFormat||D.inputFormat,D.outputFormat=E[D.outputFormat]||D.outputFormat||D.inputFormat,D.regex=z(D.inputFormat,void 0,D),D.min=H(D.min,D.inputFormat,D),D.max=H(D.max,D.inputFormat,D),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",preValidation:function(D,P,I,N,Y,X,ne,se){if(se)return!0;if(isNaN(I)&&D[P]!==I){var W=G.call(this,P,Y,X);if(W.nextMatch&&W.nextMatch[0]===I&&W.targetMatch[0].length>1){var B=M(W.targetMatch)[0];if(new RegExp(B).test("0"+D[P-1]))return D[P]=D[P-1],D[P-1]="0",{fuzzy:!0,buffer:D,refreshFromBuffer:{start:P-1,end:P+1},pos:P+1}}}return!0},postValidation:function(D,P,I,N,Y,X,ne,se){var W,B,Z=this;if(ne)return!0;if(N===!1&&(((W=G.call(Z,P+1,Y,X)).targetMatch&&W.targetMatchIndex===P&&W.targetMatch[0].length>1&&w[W.targetMatch[0]]!==void 0||(W=G.call(Z,P+2,Y,X)).targetMatch&&W.targetMatchIndex===P+1&&W.targetMatch[0].length>1&&w[W.targetMatch[0]]!==void 0)&&(B=M(W.targetMatch)[0]),B!==void 0&&(X.validPositions[P+1]!==void 0&&new RegExp(B).test(I+"0")?(D[P]=I,D[P+1]="0",N={pos:P+2,caret:P}):new RegExp(B).test("0"+I)&&(D[P]="0",D[P+1]=I,N={pos:P+2})),N===!1))return N;if(N.fuzzy&&(D=N.buffer,P=N.pos),(W=G.call(Z,P,Y,X)).targetMatch&&W.targetMatch[0]&&w[W.targetMatch[0]]!==void 0){var K=M(W.targetMatch);B=K[0];var U=D.slice(W.targetMatchIndex,W.targetMatchIndex+W.targetMatch[0].length);if(new RegExp(B).test(U.join(""))===!1&&W.targetMatch[0].length===2&&X.validPositions[W.targetMatchIndex]&&X.validPositions[W.targetMatchIndex+1]&&(X.validPositions[W.targetMatchIndex+1].input="0"),K[2]=="year")for(var le=f.getMaskTemplate.call(Z,!1,1,void 0,!0),re=P+1;re<D.length;re++)D[re]=le[re],X.validPositions.splice(P+1,1)}var te=N,fe=H.call(Z,D.join(""),Y.inputFormat,Y);return te&&!isNaN(fe.date.getTime())&&(Y.prefillYear&&(te=(function(we,Ae,Fe){if(we.year!==we.rawyear){var Ne=x.toString(),ae=we.rawyear.replace(/[^0-9]/g,""),q=Ne.slice(0,ae.length),ie=Ne.slice(ae.length);if(ae.length===2&&ae===q){var ue=new Date(x,we.month-1,we.day);we.day==ue.getDate()&&(!Fe.max||Fe.max.date.getTime()>=ue.getTime())&&(we.date.setFullYear(x),we.year=Ne,Ae.insert=[{pos:Ae.pos+1,c:ie[0]},{pos:Ae.pos+2,c:ie[1]}])}}return Ae})(fe,te,Y)),te=(function(we,Ae,Fe,Ne,ae){if(!Ae)return Ae;if(Ae&&Fe.min&&!isNaN(Fe.min.date.getTime())){var q;for(we.reset(),O(Fe).lastIndex=0;q=O(Fe).exec(Fe.inputFormat);){var ie;if((ie=M(q))&&ie[3]){for(var ue=ie[1],oe=we[ie[2]],ve=Fe.min[ie[2]],Re=Fe.max?Fe.max[ie[2]]:ve+1,Se=[],_e=!1,ce=0;ce<ve.length;ce++)Ne.validPositions[ce+q.index]!==void 0||_e?(Se[ce]=oe[ce],_e=_e||oe[ce]>ve[ce]):(ce+q.index==0&&oe[ce]<ve[ce]?(Se[ce]=oe[ce],_e=!0):Se[ce]=ve[ce],ie[2]==="year"&&oe.length-1==ce&&ve!=Re&&(Se=(parseInt(Se.join(""))+1).toString().split("")),ie[2]==="ampm"&&ve!=Re&&Fe.min.date.getTime()>we.date.getTime()&&(Se[ce]=Re[ce]));ue.call(we._date,Se.join(""))}}Ae=Fe.min.date.getTime()<=we.date.getTime(),we.reInit()}return Ae&&Fe.max&&(isNaN(Fe.max.date.getTime())||(Ae=Fe.max.date.getTime()>=we.date.getTime())),Ae})(fe,te=F.call(Z,fe,te,Y),Y,X)),P!==void 0&&te&&N.pos!==P?{buffer:z(Y.inputFormat,fe,Y).split(""),refreshFromBuffer:{start:P,end:N.pos},pos:N.caret||N.pos}:te},onKeyDown:function(D,P,I,N){D.ctrlKey&&D.key===p.keys.ArrowRight&&(this.inputmask._valueSet(V(new Date,N)),R(this).trigger("setvalue"))},onUnMask:function(D,P,I){return P&&z(I.outputFormat,H.call(this,D,I.inputFormat,I),I,!0)},casing:function(D,P,I,N){if(P.nativeDef.indexOf("[ap]")==0)return D.toLowerCase();if(P.nativeDef.indexOf("[AP]")==0)return D.toUpperCase();var Y=f.getTest.call(this,[I-1]);return Y.match.def.indexOf("[AP]")==0||I===0||Y&&Y.input===String.fromCharCode(p.keyCode.Space)||Y&&Y.match.def===String.fromCharCode(p.keyCode.Space)?D.toUpperCase():D.toLowerCase()},onBeforeMask:function(D,P){return Object.prototype.toString.call(D)==="[object Date]"&&(D=V(D,P)),D},insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},1313:function(a,o,u){var c,d=(c=u(2394))&&c.__esModule?c:{default:c};d.default.dependencyLib.extend(!0,d.default.prototype.i18n,{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]})},3851:function(a,o,u){var c,d=(c=u(2394))&&c.__esModule?c:{default:c},p=u(8711),h=u(4713);function f(y){return(function(v){if(Array.isArray(v))return _(v)})(y)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(y)||(function(v,R){if(v){if(typeof v=="string")return _(v,R);var m=Object.prototype.toString.call(v).slice(8,-1);if(m==="Object"&&v.constructor&&(m=v.constructor.name),m==="Map"||m==="Set")return Array.from(v);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return _(v,R)}})(y)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
14
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function _(y,v){(v==null||v>y.length)&&(v=y.length);for(var R=0,m=new Array(v);R<v;R++)m[R]=y[R];return m}d.default.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});var k=/25[0-5]|2[0-4][0-9]|[01][0-9][0-9]/;function C(y,v,R,m,x){if(R-1>-1&&v.buffer[R-1]!=="."?(y=v.buffer[R-1]+y,y=R-2>-1&&v.buffer[R-2]!=="."?v.buffer[R-2]+y:"0"+y):y="00"+y,x.greedy&&parseInt(y)>255&&k.test("00"+y.charAt(2))){var g=[].concat(f(v.buffer.slice(0,R)),[".",y.charAt(2)]);if(g.join("").match(/\./g).length<4)return{refreshFromBuffer:!0,buffer:g,caret:R+2}}return k.test(y)}d.default.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)://.*",autoUnmask:!1,keepStatic:!1,tabThrough:!0},ip:{mask:"i{1,3}.j{1,3}.k{1,3}.l{1,3}",definitions:{i:{validator:C},j:{validator:C},k:{validator:C},l:{validator:C}},onUnMask:function(y,v,R){return y},inputmode:"decimal",substitutes:{",":"."}},email:{mask:function(y){var v=y.separator,R=y.quantifier,m="*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",x=m;if(v)for(var g=0;g<R;g++)x+="[".concat(v).concat(m,"]");return x},greedy:!1,casing:"lower",separator:null,quantifier:5,skipOptionalPartCharacter:"",onBeforePaste:function(y,v){return(y=y.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(y,v,R){return y},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0},ssn:{mask:"999-99-9999",postValidation:function(y,v,R,m,x,g,S){var w=h.getMaskTemplate.call(this,!0,p.getLastValidPosition.call(this),!0,!0);return/^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(w.join(""))}}})},207:function(a,o,u){var c=f(u(7184)),d=f(u(2394)),p=u(2839),h=u(8711);function f(m){return m&&m.__esModule?m:{default:m}}var _=d.default.dependencyLib;function k(m,x){for(var g="",S=0;S<m.length;S++)d.default.prototype.definitions[m.charAt(S)]||x.definitions[m.charAt(S)]||x.optionalmarker[0]===m.charAt(S)||x.optionalmarker[1]===m.charAt(S)||x.quantifiermarker[0]===m.charAt(S)||x.quantifiermarker[1]===m.charAt(S)||x.groupmarker[0]===m.charAt(S)||x.groupmarker[1]===m.charAt(S)||x.alternatormarker===m.charAt(S)?g+="\\"+m.charAt(S):g+=m.charAt(S);return g}function C(m,x,g,S){if(m.length>0&&x>0&&(!g.digitsOptional||S)){var w=m.indexOf(g.radixPoint),E=!1;g.negationSymbol.back===m[m.length-1]&&(E=!0,m.length--),w===-1&&(m.push(g.radixPoint),w=m.length-1);for(var b=1;b<=x;b++)isFinite(m[w+b])||(m[w+b]="0")}return E&&m.push(g.negationSymbol.back),m}function y(m,x){var g=0;for(var S in m==="+"&&(g=h.seekNext.call(this,x.validPositions.length-1)),x.tests)if((S=parseInt(S))>=g){for(var w=0,E=x.tests[S].length;w<E;w++)if((x.validPositions[S]===void 0||m==="-")&&x.tests[S][w].match.def===m)return S+(x.validPositions[S]!==void 0&&m!=="-"?1:0)}return g}function v(m,x){for(var g=-1,S=0,w=x.validPositions.length;S<w;S++){var E=x.validPositions[S];if(E&&E.match.def===m){g=S;break}}return g}function R(m,x,g,S,w){var E=x.buffer?x.buffer.indexOf(w.radixPoint):-1,b=(E!==-1||S&&w.jitMasking)&&new RegExp(w.definitions[9].validator).test(m);return!S&&w._radixDance&&E!==-1&&b&&x.validPositions[E]==null?{insert:{pos:E===g?E+1:E,c:w.radixPoint},pos:g}:b}d.default.extendAliases({numeric:{mask:function(m){m.repeat=0,m.groupSeparator===m.radixPoint&&m.digits&&m.digits!=="0"&&(m.radixPoint==="."?m.groupSeparator=",":m.radixPoint===","?m.groupSeparator=".":m.groupSeparator=""),m.groupSeparator===" "&&(m.skipOptionalPartCharacter=void 0),m.placeholder.length>1&&(m.placeholder=m.placeholder.charAt(0)),m.positionCaretOnClick==="radixFocus"&&m.placeholder===""&&(m.positionCaretOnClick="lvp");var x="0",g=m.radixPoint;m.numericInput===!0&&m.__financeInput===void 0?(x="1",m.positionCaretOnClick=m.positionCaretOnClick==="radixFocus"?"lvp":m.positionCaretOnClick,m.digitsOptional=!1,isNaN(m.digits)&&(m.digits=2),m._radixDance=!1,g=m.radixPoint===","?"?":"!",m.radixPoint!==""&&m.definitions[g]===void 0&&(m.definitions[g]={},m.definitions[g].validator="["+m.radixPoint+"]",m.definitions[g].placeholder=m.radixPoint,m.definitions[g].static=!0,m.definitions[g].generated=!0)):(m.__financeInput=!1,m.numericInput=!0);var S,w="[+]";if(w+=k(m.prefix,m),m.groupSeparator!==""?(m.definitions[m.groupSeparator]===void 0&&(m.definitions[m.groupSeparator]={},m.definitions[m.groupSeparator].validator="["+m.groupSeparator+"]",m.definitions[m.groupSeparator].placeholder=m.groupSeparator,m.definitions[m.groupSeparator].static=!0,m.definitions[m.groupSeparator].generated=!0),w+=m._mask(m)):w+="9{+}",m.digits!==void 0&&m.digits!==0){var E=m.digits.toString().split(",");isFinite(E[0])&&E[1]&&isFinite(E[1])?w+=g+x+"{"+m.digits+"}":(isNaN(m.digits)||parseInt(m.digits)>0)&&(m.digitsOptional||m.jitMasking?(S=w+g+x+"{0,"+m.digits+"}",m.keepStatic=!0):w+=g+x+"{"+m.digits+"}")}else m.inputmode="numeric";return w+=k(m.suffix,m),w+="[-]",S&&(w=[S+k(m.suffix,m)+"[-]",w]),m.greedy=!1,(function(b){b.parseMinMaxOptions===void 0&&(b.min!==null&&(b.min=b.min.toString().replace(new RegExp((0,c.default)(b.groupSeparator),"g"),""),b.radixPoint===","&&(b.min=b.min.replace(b.radixPoint,".")),b.min=isFinite(b.min)?parseFloat(b.min):NaN,isNaN(b.min)&&(b.min=Number.MIN_VALUE)),b.max!==null&&(b.max=b.max.toString().replace(new RegExp((0,c.default)(b.groupSeparator),"g"),""),b.radixPoint===","&&(b.max=b.max.replace(b.radixPoint,".")),b.max=isFinite(b.max)?parseFloat(b.max):NaN,isNaN(b.max)&&(b.max=Number.MAX_VALUE)),b.parseMinMaxOptions="done")})(m),m.radixPoint!==""&&m.substituteRadixPoint&&(m.substitutes[m.radixPoint=="."?",":"."]=m.radixPoint),w},_mask:function(m){return"("+m.groupSeparator+"999){+|1}"},digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",_radixDance:!0,groupSeparator:"",allowMinus:!0,negationSymbol:{front:"-",back:""},prefix:"",suffix:"",min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:"text",unmaskAsNumber:!1,roundingFN:Math.round,inputmode:"decimal",shortcuts:{k:"1000",m:"1000000"},placeholder:"0",greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:"",usePrototypeDefinitions:!1,stripLeadingZeroes:!0,substituteRadixPoint:!0,definitions:{0:{validator:R},1:{validator:R,definitionSymbol:"9"},9:{validator:"[0-90-9٠-٩۰-۹]",definitionSymbol:"*"},"+":{validator:function(m,x,g,S,w){return w.allowMinus&&(m==="-"||m===w.negationSymbol.front)}},"-":{validator:function(m,x,g,S,w){return w.allowMinus&&m===w.negationSymbol.back}}},preValidation:function(m,x,g,S,w,E,b,T){var M=this;if(w.__financeInput!==!1&&g===w.radixPoint)return!1;var O=m.indexOf(w.radixPoint),F=x;if(x=(function(G,D,P,I,N){return N._radixDance&&N.numericInput&&D!==N.negationSymbol.back&&G<=P&&(P>0||D==N.radixPoint)&&(I.validPositions[G-1]===void 0||I.validPositions[G-1].input!==N.negationSymbol.back)&&(G-=1),G})(x,g,O,E,w),g==="-"||g===w.negationSymbol.front){if(w.allowMinus!==!0)return!1;var z=!1,$=v("+",E),H=v("-",E);return $!==-1&&(z=[$],H!==-1&&z.push(H)),z!==!1?{remove:z,caret:F-w.negationSymbol.back.length}:{insert:[{pos:y.call(M,"+",E),c:w.negationSymbol.front,fromIsValid:!0},{pos:y.call(M,"-",E),c:w.negationSymbol.back,fromIsValid:void 0}],caret:F+w.negationSymbol.back.length}}if(g===w.groupSeparator)return{caret:F};if(T)return!0;if(O!==-1&&w._radixDance===!0&&S===!1&&g===w.radixPoint&&w.digits!==void 0&&(isNaN(w.digits)||parseInt(w.digits)>0)&&O!==x){var V=y.call(M,w.radixPoint,E);return E.validPositions[V]&&(E.validPositions[V].generatedInput=E.validPositions[V].generated||!1),{caret:w._radixDance&&x===O-1?O+1:O}}if(w.__financeInput===!1){if(S){if(w.digitsOptional)return{rewritePosition:b.end};if(!w.digitsOptional){if(b.begin>O&&b.end<=O)return g===w.radixPoint?{insert:{pos:O+1,c:"0",fromIsValid:!0},rewritePosition:O}:{rewritePosition:O+1};if(b.begin<O)return{rewritePosition:b.begin-1}}}else if(!w.showMaskOnHover&&!w.showMaskOnFocus&&!w.digitsOptional&&w.digits>0&&this.__valueGet.call(this.el)==="")return{rewritePosition:O}}return{rewritePosition:x}},postValidation:function(m,x,g,S,w,E,b){if(S===!1)return S;if(b)return!0;if(w.min!==null||w.max!==null){var T=w.onUnMask(m.slice().reverse().join(""),void 0,_.extend({},w,{unmaskAsNumber:!0}));if(w.min!==null&&T<w.min&&(T.toString().length>w.min.toString().length||T<0))return!1;if(w.max!==null&&T>w.max)return!!w.SetMaxOnOverflow&&{refreshFromBuffer:!0,buffer:C(w.max.toString().replace(".",w.radixPoint).split(""),w.digits,w).reverse()}}return S},onUnMask:function(m,x,g){if(x===""&&g.nullable===!0)return x;var S=m.replace(g.prefix,"");return S=(S=S.replace(g.suffix,"")).replace(new RegExp((0,c.default)(g.groupSeparator),"g"),""),g.placeholder.charAt(0)!==""&&(S=S.replace(new RegExp(g.placeholder.charAt(0),"g"),"0")),g.unmaskAsNumber?(g.radixPoint!==""&&S.indexOf(g.radixPoint)!==-1&&(S=S.replace(c.default.call(this,g.radixPoint),".")),S=(S=S.replace(new RegExp("^"+(0,c.default)(g.negationSymbol.front)),"-")).replace(new RegExp((0,c.default)(g.negationSymbol.back)+"$"),""),Number(S)):S},isComplete:function(m,x){var g=(x.numericInput?m.slice().reverse():m).join("");return g=(g=(g=(g=(g=g.replace(new RegExp("^"+(0,c.default)(x.negationSymbol.front)),"-")).replace(new RegExp((0,c.default)(x.negationSymbol.back)+"$"),"")).replace(x.prefix,"")).replace(x.suffix,"")).replace(new RegExp((0,c.default)(x.groupSeparator)+"([0-9]{3})","g"),"$1"),x.radixPoint===","&&(g=g.replace((0,c.default)(x.radixPoint),".")),isFinite(g)},onBeforeMask:function(m,x){var g;m=(g=m)!==null&&g!==void 0?g:"";var S=x.radixPoint||",";isFinite(x.digits)&&(x.digits=parseInt(x.digits)),typeof m!="number"&&x.inputType!=="number"||S===""||(m=m.toString().replace(".",S));var w=m.charAt(0)==="-"||m.charAt(0)===x.negationSymbol.front,E=m.split(S),b=E[0].replace(/[^\-0-9]/g,""),T=E.length>1?E[1].replace(/[^0-9]/g,""):"",M=E.length>1;m=b+(T!==""?S+T:T);var O=0;if(S!==""&&(O=x.digitsOptional?x.digits<T.length?x.digits:T.length:x.digits,T!==""||!x.digitsOptional)){var F=Math.pow(10,O||1);m=m.replace((0,c.default)(S),"."),isNaN(parseFloat(m))||(m=(x.roundingFN(parseFloat(m)*F)/F).toFixed(O)),m=m.toString().replace(".",S)}if(x.digits===0&&m.indexOf(S)!==-1&&(m=m.substring(0,m.indexOf(S))),x.min!==null||x.max!==null){var z=m.toString().replace(S,".");x.min!==null&&z<x.min?m=x.min.toString().replace(".",S):x.max!==null&&z>x.max&&(m=x.max.toString().replace(".",S))}return w&&m.charAt(0)!=="-"&&(m="-"+m),C(m.toString().split(""),O,x,M).join("")},onBeforeWrite:function(m,x,g,S){function w(H,V){if(S.__financeInput!==!1||V){var G=H.indexOf(S.radixPoint);G!==-1&&H.splice(G,1)}if(S.groupSeparator!=="")for(;(G=H.indexOf(S.groupSeparator))!==-1;)H.splice(G,1);return H}var E,b;if(S.stripLeadingZeroes&&(b=(function(H,V){var G=new RegExp("(^"+(V.negationSymbol.front!==""?(0,c.default)(V.negationSymbol.front)+"?":"")+(0,c.default)(V.prefix)+")(.*)("+(0,c.default)(V.suffix)+(V.negationSymbol.back!=""?(0,c.default)(V.negationSymbol.back)+"?":"")+"$)").exec(H.slice().reverse().join("")),D=G?G[2]:"",P=!1;return D&&(D=D.split(V.radixPoint.charAt(0))[0],P=new RegExp("^[0"+V.groupSeparator+"]*").exec(D)),!(!P||!(P[0].length>1||P[0].length>0&&P[0].length<D.length))&&P})(x,S)))for(var T=x.join("").lastIndexOf(b[0].split("").reverse().join(""))-(b[0]==b.input?0:1),M=b[0]==b.input?1:0,O=b[0].length-M;O>0;O--)this.maskset.validPositions.splice(T+O,1),delete x[T+O];if(m)switch(m.type){case"blur":case"checkval":if(S.min!==null){var F=S.onUnMask(x.slice().reverse().join(""),void 0,_.extend({},S,{unmaskAsNumber:!0}));if(S.min!==null&&F<S.min)return{refreshFromBuffer:!0,buffer:C(S.min.toString().replace(".",S.radixPoint).split(""),S.digits,S).reverse()}}if(x[x.length-1]===S.negationSymbol.front){var z=new RegExp("(^"+(S.negationSymbol.front!=""?(0,c.default)(S.negationSymbol.front)+"?":"")+(0,c.default)(S.prefix)+")(.*)("+(0,c.default)(S.suffix)+(S.negationSymbol.back!=""?(0,c.default)(S.negationSymbol.back)+"?":"")+"$)").exec(w(x.slice(),!0).reverse().join(""));(z?z[2]:"")==0&&(E={refreshFromBuffer:!0,buffer:[0]})}else S.radixPoint!==""&&x.indexOf(S.radixPoint)===S.suffix.length&&(E&&E.buffer?E.buffer.splice(0,1+S.suffix.length):(x.splice(0,1+S.suffix.length),E={refreshFromBuffer:!0,buffer:w(x)}));if(S.enforceDigitsOnBlur){var $=(E=E||{})&&E.buffer||x.slice().reverse();E.refreshFromBuffer=!0,E.buffer=C($,S.digits,S,!0).reverse()}}return E},onKeyDown:function(m,x,g,S){var w,E=_(this);if(m.location!=3){var b,T=m.key;if((b=S.shortcuts&&S.shortcuts[T])&&b.length>1)return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())*parseInt(b)),E.trigger("setvalue"),!1}if(m.ctrlKey)switch(m.key){case p.keys.ArrowUp:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(S.step)),E.trigger("setvalue"),!1;case p.keys.ArrowDown:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(S.step)),E.trigger("setvalue"),!1}if(!m.shiftKey&&(m.key===p.keys.Delete||m.key===p.keys.Backspace||m.key===p.keys.BACKSPACE_SAFARI)&&g.begin!==x.length){if(x[m.key===p.keys.Delete?g.begin-1:g.end]===S.negationSymbol.front)return w=x.slice().reverse(),S.negationSymbol.front!==""&&w.shift(),S.negationSymbol.back!==""&&w.pop(),E.trigger("setvalue",[w.join(""),g.begin]),!1;if(S._radixDance===!0){var M,O=x.indexOf(S.radixPoint);if(S.digitsOptional){if(O===0)return(w=x.slice().reverse()).pop(),E.trigger("setvalue",[w.join(""),g.begin>=w.length?w.length:g.begin]),!1}else if(O!==-1&&(g.begin<O||g.end<O||m.key===p.keys.Delete&&(g.begin===O||g.begin-1===O)))return g.begin===g.end&&(m.key===p.keys.Backspace||m.key===p.keys.BACKSPACE_SAFARI?g.begin++:m.key===p.keys.Delete&&g.begin-1===O&&(M=_.extend({},g),g.begin--,g.end--)),(w=x.slice().reverse()).splice(w.length-g.begin,g.begin-g.end+1),w=C(w,S.digits,S).join(""),M&&(g=M),E.trigger("setvalue",[w,g.begin>=w.length?O+1:g.begin]),!1}}}},currency:{prefix:"",groupSeparator:",",alias:"numeric",digits:2,digitsOptional:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",inputmode:"numeric",digits:0},percentage:{alias:"numeric",min:0,max:100,suffix:" %",digits:0,allowMinus:!1},indianns:{alias:"numeric",_mask:function(m){return"("+m.groupSeparator+"99){*|1}("+m.groupSeparator+"999){1|1}"},groupSeparator:",",radixPoint:".",placeholder:"0",digits:2,digitsOptional:!1}})},9380:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var u=!(typeof window>"u"||!window.document||!window.document.createElement);o.default=u?window:{}},7760:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.HandleNativePlaceholder=function(R,m){var x=R?R.inputmask:this;if(c.ie){if(R.inputmask._valueGet()!==m&&(R.placeholder!==m||R.placeholder==="")){var g=h.getBuffer.call(x).slice(),S=R.inputmask._valueGet();if(S!==m){var w=h.getLastValidPosition.call(x);w===-1&&S===h.getBufferTemplate.call(x).join("")?g=[]:w!==-1&&C.call(x,g),v(R,g)}}}else R.placeholder!==m&&(R.placeholder=m,R.placeholder===""&&R.removeAttribute("placeholder"))},o.applyInputValue=k,o.checkVal=y,o.clearOptionalTail=C,o.unmaskedvalue=function(R){var m=R?R.inputmask:this,x=m.opts,g=m.maskset;if(R){if(R.inputmask===void 0)return R.value;R.inputmask&&R.inputmask.refreshValue&&k(R,R.inputmask._valueGet(!0))}for(var S=[],w=g.validPositions,E=0,b=w.length;E<b;E++)w[E]&&w[E].match&&(w[E].match.static!=1||Array.isArray(g.metadata)&&w[E].generatedInput!==!0)&&S.push(w[E].input);var T=S.length===0?"":(m.isRTL?S.reverse():S).join("");if(typeof x.onUnMask=="function"){var M=(m.isRTL?h.getBuffer.call(m).slice().reverse():h.getBuffer.call(m)).join("");T=x.onUnMask.call(m,M,T,x)}return T},o.writeBuffer=v;var c=u(9845),d=u(6030),p=u(2839),h=u(8711),f=u(7215),_=u(4713);function k(R,m,x){var g=R?R.inputmask:this,S=g.opts;R.inputmask.refreshValue=!1,typeof S.onBeforeMask=="function"&&(m=S.onBeforeMask.call(g,m,S)||m),y(R,!0,!1,m=(m||"").toString().split(""),x),g.undoValue=g._valueGet(!0),(S.clearMaskOnLostFocus||S.clearIncomplete)&&R.inputmask._valueGet()===h.getBufferTemplate.call(g).join("")&&h.getLastValidPosition.call(g)===-1&&R.inputmask._valueSet("")}function C(R){R.length=0;for(var m,x=_.getMaskTemplate.call(this,!0,0,!0,void 0,!0);(m=x.shift())!==void 0;)R.push(m);return R}function y(R,m,x,g,S){var w,E=R?R.inputmask:this,b=E.maskset,T=E.opts,M=E.dependencyLib,O=g.slice(),F="",z=-1,$=T.skipOptionalPartCharacter;T.skipOptionalPartCharacter="",h.resetMaskSet.call(E,!1),E.clicked=0,z=T.radixPoint?h.determineNewCaretPosition.call(E,{begin:0,end:0},!1,T.__financeInput===!1?"radixFocus":void 0).begin:0,b.p=z,E.caretPos={begin:z};var H=[],V=E.caretPos;if(O.forEach((function(Y,X){if(Y!==void 0){var ne=new M.Event("_checkval");ne.key=Y,F+=Y;var se=h.getLastValidPosition.call(E,void 0,!0);(function(W,B){for(var Z=_.getMaskTemplate.call(E,!0,0).slice(W,h.seekNext.call(E,W,!1,!1)).join("").replace(/'/g,""),K=Z.indexOf(B);K>0&&Z[K-1]===" ";)K--;var U=K===0&&!h.isMask.call(E,W)&&(_.getTest.call(E,W).match.nativeDef===B.charAt(0)||_.getTest.call(E,W).match.static===!0&&_.getTest.call(E,W).match.nativeDef==="'"+B.charAt(0)||_.getTest.call(E,W).match.nativeDef===" "&&(_.getTest.call(E,W+1).match.nativeDef===B.charAt(0)||_.getTest.call(E,W+1).match.static===!0&&_.getTest.call(E,W+1).match.nativeDef==="'"+B.charAt(0)));if(!U&&K>0&&!h.isMask.call(E,W,!1,!0)){var le=h.seekNext.call(E,W);E.caretPos.begin<le&&(E.caretPos={begin:le})}return U})(z,F)?w=d.EventHandlers.keypressEvent.call(E,ne,!0,!1,x,se+1):(w=d.EventHandlers.keypressEvent.call(E,ne,!0,!1,x,E.caretPos.begin))&&(z=E.caretPos.begin+1,F=""),w?(w.pos!==void 0&&b.validPositions[w.pos]&&b.validPositions[w.pos].match.static===!0&&b.validPositions[w.pos].alternation===void 0&&(H.push(w.pos),E.isRTL||(w.forwardPosition=w.pos+1)),v.call(E,void 0,h.getBuffer.call(E),w.forwardPosition,ne,!1),E.caretPos={begin:w.forwardPosition,end:w.forwardPosition},V=E.caretPos):b.validPositions[X]===void 0&&O[X]===_.getPlaceholder.call(E,X)&&h.isMask.call(E,X,!0)?E.caretPos.begin++:E.caretPos=V}})),H.length>0){var G,D,P=h.seekNext.call(E,-1,void 0,!1);if(!f.isComplete.call(E,h.getBuffer.call(E))&&H.length<=P||f.isComplete.call(E,h.getBuffer.call(E))&&H.length>0&&H.length!==P&&H[0]===0){for(var I=P;(G=H.shift())!==void 0;)if(G<I){var N=new M.Event("_checkval");if((D=b.validPositions[G]).generatedInput=!0,N.key=D.input,(w=d.EventHandlers.keypressEvent.call(E,N,!0,!1,x,I))&&w.pos!==void 0&&w.pos!==G&&b.validPositions[w.pos]&&b.validPositions[w.pos].match.static===!0)H.push(w.pos);else if(!w)break;I++}}}m&&v.call(E,R,h.getBuffer.call(E),w?w.forwardPosition:E.caretPos.begin,S||new M.Event("checkval"),S&&(S.type==="input"&&E.undoValue!==h.getBuffer.call(E).join("")||S.type==="paste")),T.skipOptionalPartCharacter=$}function v(R,m,x,g,S){var w=R?R.inputmask:this,E=w.opts,b=w.dependencyLib;if(g&&typeof E.onBeforeWrite=="function"){var T=E.onBeforeWrite.call(w,g,m,x,E);if(T){if(T.refreshFromBuffer){var M=T.refreshFromBuffer;f.refreshFromBuffer.call(w,M===!0?M:M.start,M.end,T.buffer||m),m=h.getBuffer.call(w,!0)}x!==void 0&&(x=T.caret!==void 0?T.caret:x)}}if(R!==void 0&&(R.inputmask._valueSet(m.join("")),x===void 0||g!==void 0&&g.type==="blur"||h.caret.call(w,R,x,void 0,void 0,g!==void 0&&g.type==="keydown"&&(g.key===p.keys.Delete||g.key===p.keys.Backspace)),R.inputmask.writeBufferHook===void 0||R.inputmask.writeBufferHook(x),S===!0)){var O=b(R),F=R.inputmask._valueGet();R.inputmask.skipInputEvent=!0,O.trigger("input"),setTimeout((function(){F===h.getBufferTemplate.call(w).join("")?O.trigger("cleared"):f.isComplete.call(w,m)===!0&&O.trigger("complete")}),0)}}},2394:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var c=x(u(3976)),d=x(u(7392)),p=x(u(4963)),h=u(9716),f=x(u(9380)),_=u(7760),k=u(157),C=u(2391),y=u(8711),v=u(7215),R=u(4713);function m(b){return m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},m(b)}function x(b){return b&&b.__esModule?b:{default:b}}var g=f.default.document,S="_inputmask_opts";function w(b,T,M){if(!(this instanceof w))return new w(b,T,M);this.dependencyLib=p.default,this.el=void 0,this.events={},this.maskset=void 0,M!==!0&&(Object.prototype.toString.call(b)==="[object Object]"?T=b:(T=T||{},b&&(T.alias=b)),this.opts=p.default.extend(!0,{},this.defaults,T),this.noMasksCache=T&&T.definitions!==void 0,this.userOptions=T||{},E(this.opts.alias,T,this.opts)),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.clicked=0,this.originalPlaceholder=void 0,this.isComposing=!1,this.hasAlternator=!1}function E(b,T,M){var O=w.prototype.aliases[b];return O?(O.alias&&E(O.alias,void 0,M),p.default.extend(!0,M,O),p.default.extend(!0,M,T),!0):(M.mask===null&&(M.mask=b),!1)}w.prototype={dataAttribute:"data-inputmask",defaults:c.default,definitions:d.default,aliases:{},masksCache:{},i18n:{},get isRTL(){return this.opts.isRTL||this.opts.numericInput},mask:function(b){var T=this;return typeof b=="string"&&(b=g.getElementById(b)||g.querySelectorAll(b)),(b=b.nodeName?[b]:Array.isArray(b)?b:[].slice.call(b)).forEach((function(M,O){var F=p.default.extend(!0,{},T.opts);if((function($,H,V,G){function D(ne,se){var W=G===""?ne:G+"-"+ne;(se=se!==void 0?se:$.getAttribute(W))!==null&&(typeof se=="string"&&(ne.indexOf("on")===0?se=f.default[se]:se==="false"?se=!1:se==="true"&&(se=!0)),V[ne]=se)}if(H.importDataAttributes===!0){var P,I,N,Y,X=$.getAttribute(G);if(X&&X!==""&&(X=X.replace(/'/g,'"'),I=JSON.parse("{"+X+"}")),I){for(Y in N=void 0,I)if(Y.toLowerCase()==="alias"){N=I[Y];break}}for(P in D("alias",N),V.alias&&E(V.alias,V,H),H){if(I){for(Y in N=void 0,I)if(Y.toLowerCase()===P.toLowerCase()){N=I[Y];break}}D(P,N)}}return p.default.extend(!0,H,V),($.dir==="rtl"||H.rightAlign)&&($.style.textAlign="right"),($.dir==="rtl"||H.numericInput)&&($.dir="ltr",$.removeAttribute("dir"),H.isRTL=!0),Object.keys(V).length})(M,F,p.default.extend(!0,{},T.userOptions),T.dataAttribute)){var z=(0,C.generateMaskSet)(F,T.noMasksCache);z!==void 0&&(M.inputmask!==void 0&&(M.inputmask.opts.autoUnmask=!0,M.inputmask.remove()),M.inputmask=new w(void 0,void 0,!0),M.inputmask.opts=F,M.inputmask.noMasksCache=T.noMasksCache,M.inputmask.userOptions=p.default.extend(!0,{},T.userOptions),M.inputmask.el=M,M.inputmask.$el=(0,p.default)(M),M.inputmask.maskset=z,p.default.data(M,S,T.userOptions),k.mask.call(M.inputmask))}})),b&&b[0]&&b[0].inputmask||this},option:function(b,T){return typeof b=="string"?this.opts[b]:m(b)==="object"?(p.default.extend(this.userOptions,b),this.el&&T!==!0&&this.mask(this.el),this):void 0},unmaskedvalue:function(b){if(this.maskset=this.maskset||(0,C.generateMaskSet)(this.opts,this.noMasksCache),this.el===void 0||b!==void 0){var T=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,b,this.opts)||b).split("");_.checkVal.call(this,void 0,!1,!1,T),typeof this.opts.onBeforeWrite=="function"&&this.opts.onBeforeWrite.call(this,void 0,y.getBuffer.call(this),0,this.opts)}return _.unmaskedvalue.call(this,this.el)},remove:function(){if(this.el){p.default.data(this.el,S,null);var b=this.opts.autoUnmask?(0,_.unmaskedvalue)(this.el):this._valueGet(this.opts.autoUnmask);b!==y.getBufferTemplate.call(this).join("")?this._valueSet(b,this.opts.autoUnmask):this._valueSet(""),h.EventRuler.off(this.el),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el),"value")&&this.__valueGet&&Object.defineProperty(this.el,"value",{get:this.__valueGet,set:this.__valueSet,configurable:!0}):g.__lookupGetter__&&this.el.__lookupGetter__("value")&&this.__valueGet&&(this.el.__defineGetter__("value",this.__valueGet),this.el.__defineSetter__("value",this.__valueSet)),this.el.inputmask=void 0}return this.el},getemptymask:function(){return this.maskset=this.maskset||(0,C.generateMaskSet)(this.opts,this.noMasksCache),(this.isRTL?y.getBufferTemplate.call(this).reverse():y.getBufferTemplate.call(this)).join("")},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||(0,C.generateMaskSet)(this.opts,this.noMasksCache),v.isComplete.call(this,y.getBuffer.call(this))},getmetadata:function(){if(this.maskset=this.maskset||(0,C.generateMaskSet)(this.opts,this.noMasksCache),Array.isArray(this.maskset.metadata)){var b=R.getMaskTemplate.call(this,!0,0,!1).join("");return this.maskset.metadata.forEach((function(T){return T.mask!==b||(b=T,!1)})),b}return this.maskset.metadata},isValid:function(b){if(this.maskset=this.maskset||(0,C.generateMaskSet)(this.opts,this.noMasksCache),b){var T=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,b,this.opts)||b).split("");_.checkVal.call(this,void 0,!0,!1,T)}else b=this.isRTL?y.getBuffer.call(this).slice().reverse().join(""):y.getBuffer.call(this).join("");for(var M=y.getBuffer.call(this),O=y.determineLastRequiredPosition.call(this),F=M.length-1;F>O&&!y.isMask.call(this,F);F--);return M.splice(O,F+1-O),v.isComplete.call(this,M)&&b===(this.isRTL?y.getBuffer.call(this).slice().reverse().join(""):y.getBuffer.call(this).join(""))},format:function(b,T){this.maskset=this.maskset||(0,C.generateMaskSet)(this.opts,this.noMasksCache);var M=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,b,this.opts)||b).split("");_.checkVal.call(this,void 0,!0,!1,M);var O=this.isRTL?y.getBuffer.call(this).slice().reverse().join(""):y.getBuffer.call(this).join("");return T?{value:O,metadata:this.getmetadata()}:O},setValue:function(b){this.el&&(0,p.default)(this.el).trigger("setvalue",[b])},analyseMask:C.analyseMask},w.extendDefaults=function(b){p.default.extend(!0,w.prototype.defaults,b)},w.extendDefinitions=function(b){p.default.extend(!0,w.prototype.definitions,b)},w.extendAliases=function(b){p.default.extend(!0,w.prototype.aliases,b)},w.format=function(b,T,M){return w(T).format(b,M)},w.unmask=function(b,T){return w(T).unmaskedvalue(b)},w.isValid=function(b,T){return w(T).isValid(b)},w.remove=function(b){typeof b=="string"&&(b=g.getElementById(b)||g.querySelectorAll(b)),(b=b.nodeName?[b]:b).forEach((function(T){T.inputmask&&T.inputmask.remove()}))},w.setValue=function(b,T){typeof b=="string"&&(b=g.getElementById(b)||g.querySelectorAll(b)),(b=b.nodeName?[b]:b).forEach((function(M){M.inputmask?M.inputmask.setValue(T):(0,p.default)(M).trigger("setvalue",[T])}))},w.dependencyLib=p.default,f.default.Inputmask=w,o.default=w},5296:function(a,o,u){function c(g){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},c(g)}var d=R(u(9380)),p=R(u(2394));function h(g,S){for(var w=0;w<S.length;w++){var E=S[w];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(g,(b=E.key,T=void 0,T=(function(M,O){if(c(M)!=="object"||M===null)return M;var F=M[Symbol.toPrimitive];if(F!==void 0){var z=F.call(M,O);if(c(z)!=="object")return z;throw new TypeError("@@toPrimitive must return a primitive value.")}return(O==="string"?String:Number)(M)})(b,"string"),c(T)==="symbol"?T:String(T)),E)}var b,T}function f(g){var S=C();return function(){var w,E=v(g);if(S){var b=v(this).constructor;w=Reflect.construct(E,arguments,b)}else w=E.apply(this,arguments);return(function(T,M){if(M&&(c(M)==="object"||typeof M=="function"))return M;if(M!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O})(T)})(this,w)}}function _(g){var S=typeof Map=="function"?new Map:void 0;return _=function(w){if(w===null||!(function(b){try{return Function.toString.call(b).indexOf("[native code]")!==-1}catch{return typeof b=="function"}})(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(S!==void 0){if(S.has(w))return S.get(w);S.set(w,E)}function E(){return k(w,arguments,v(this).constructor)}return E.prototype=Object.create(w.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),y(E,w)},_(g)}function k(g,S,w){return k=C()?Reflect.construct.bind():function(E,b,T){var M=[null];M.push.apply(M,b);var O=new(Function.bind.apply(E,M));return T&&y(O,T.prototype),O},k.apply(null,arguments)}function C(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function y(g,S){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,E){return w.__proto__=E,w},y(g,S)}function v(g){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},v(g)}function R(g){return g&&g.__esModule?g:{default:g}}var m=d.default.document;if(m&&m.head&&m.head.attachShadow&&d.default.customElements&&d.default.customElements.get("input-mask")===void 0){var x=(function(g){(function(T,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(M&&M.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),Object.defineProperty(T,"prototype",{writable:!1}),M&&y(T,M)})(b,g);var S,w,E=f(b);function b(){var T;(function($,H){if(!($ instanceof H))throw new TypeError("Cannot call a class as a function")})(this,b);var M=(T=E.call(this)).getAttributeNames(),O=T.attachShadow({mode:"closed"});for(var F in T.input=m.createElement("input"),T.input.type="text",O.appendChild(T.input),M)Object.prototype.hasOwnProperty.call(M,F)&&T.input.setAttribute(M[F],T.getAttribute(M[F]));var z=new p.default;return z.dataAttribute="",z.mask(T.input),T.input.inputmask.shadowRoot=O,T}return S=b,(w=[{key:"attributeChangedCallback",value:function(T,M,O){this.input.setAttribute(T,O)}},{key:"value",get:function(){return this.input.value},set:function(T){this.input.value=T}}])&&h(S.prototype,w),Object.defineProperty(S,"prototype",{writable:!1}),b})(_(HTMLElement));d.default.customElements.define("input-mask",x)}},2839:function(a,o){function u(k){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},u(k)}function c(k,C){return(function(y){if(Array.isArray(y))return y})(k)||(function(y,v){var R=y==null?null:typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(R!=null){var m,x,g,S,w=[],E=!0,b=!1;try{if(g=(R=R.call(y)).next,v!==0)for(;!(E=(m=g.call(R)).done)&&(w.push(m.value),w.length!==v);E=!0);}catch(T){b=!0,x=T}finally{try{if(!E&&R.return!=null&&(S=R.return(),Object(S)!==S))return}finally{if(b)throw x}}return w}})(k,C)||(function(y,v){if(y){if(typeof y=="string")return d(y,v);var R=Object.prototype.toString.call(y).slice(8,-1);if(R==="Object"&&y.constructor&&(R=y.constructor.name),R==="Map"||R==="Set")return Array.from(y);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return d(y,v)}})(k,C)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
15
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function d(k,C){(C==null||C>k.length)&&(C=k.length);for(var y=0,v=new Array(C);y<C;y++)v[y]=k[y];return v}function p(k,C){var y=Object.keys(k);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(k);C&&(v=v.filter((function(R){return Object.getOwnPropertyDescriptor(k,R).enumerable}))),y.push.apply(y,v)}return y}function h(k,C,y){return(C=(function(v){var R=(function(m,x){if(u(m)!=="object"||m===null)return m;var g=m[Symbol.toPrimitive];if(g!==void 0){var S=g.call(m,x);if(u(S)!=="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(m)})(v,"string");return u(R)==="symbol"?R:String(R)})(C))in k?Object.defineProperty(k,C,{value:y,enumerable:!0,configurable:!0,writable:!0}):k[C]=y,k}Object.defineProperty(o,"__esModule",{value:!0}),o.keys=o.keyCode=void 0,o.toKey=function(k,C){return _[k]||(C?String.fromCharCode(k):String.fromCharCode(k).toLowerCase())},o.toKeyCode=function(k){return f[k]};var f=o.keyCode=(function(k){for(var C=1;C<arguments.length;C++){var y=arguments[C]!=null?arguments[C]:{};C%2?p(Object(y),!0).forEach((function(v){h(k,v,y[v])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(y)):p(Object(y)).forEach((function(v){Object.defineProperty(k,v,Object.getOwnPropertyDescriptor(y,v))}))}return k})({c:67,x:88,z:90,BACKSPACE_SAFARI:127,Enter:13,Meta_LEFT:91,Meta_RIGHT:92,Space:32},{Alt:18,AltGraph:18,ArrowDown:40,ArrowLeft:37,ArrowRight:39,ArrowUp:38,Backspace:8,CapsLock:20,Control:17,ContextMenu:93,Dead:221,Delete:46,End:35,Escape:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,Home:36,Insert:45,NumLock:144,PageDown:34,PageUp:33,Pause:19,PrintScreen:44,Process:229,Shift:16,ScrollLock:145,Tab:9,Unidentified:229}),_=Object.entries(f).reduce((function(k,C){var y=c(C,2),v=y[0],R=y[1];return k[R]=k[R]===void 0?v:k[R],k}),{});o.keys=Object.entries(f).reduce((function(k,C){var y=c(C,2),v=y[0];return y[1],k[v]=v==="Space"?" ":v,k}),{})},2391:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.analyseMask=function(C,y,v){var R,m,x,g,S,w,E=/(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g,b=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,T=!1,M=new h.default,O=[],F=[],z=!1;function $(K,U,le){le=le!==void 0?le:K.matches.length;var re=K.matches[le-1];if(y){if(U.indexOf("[")===0||T&&/\\d|\\s|\\w|\\p/i.test(U)||U==="."){var te=v.casing?"i":"";/\\p\{.*}/i.test(U)&&(te+="u"),K.matches.splice(le++,0,{fn:new RegExp(U,te),static:!1,optionality:!1,newBlockMarker:re===void 0?"master":re.def!==U,casing:null,def:U,placeholder:f(v.placeholder)==="object"?v.placeholder[M.matches.length]:void 0,nativeDef:U})}else T&&(U=U[U.length-1]),U.split("").forEach((function(we,Ae){re=K.matches[le-1],K.matches.splice(le++,0,{fn:/[a-z]/i.test(v.staticDefinitionSymbol||we)?new RegExp("["+(v.staticDefinitionSymbol||we)+"]",v.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:re===void 0?"master":re.def!==we&&re.static!==!0,casing:null,def:v.staticDefinitionSymbol||we,placeholder:v.staticDefinitionSymbol!==void 0?we:f(v.placeholder)==="object"?v.placeholder[M.matches.length]:void 0,nativeDef:(T?"'":"")+we})}));T=!1}else{var fe=v.definitions&&v.definitions[U]||v.usePrototypeDefinitions&&p.default.prototype.definitions[U];fe&&!T?K.matches.splice(le++,0,{fn:fe.validator?typeof fe.validator=="string"?new RegExp(fe.validator,v.casing?"i":""):new function(){this.test=fe.validator}:/./,static:fe.static||!1,optionality:fe.optional||!1,defOptionality:fe.optional||!1,newBlockMarker:re===void 0||fe.optional?"master":re.def!==(fe.definitionSymbol||U),casing:fe.casing,def:fe.definitionSymbol||U,placeholder:fe.placeholder,nativeDef:U,generated:fe.generated}):(K.matches.splice(le++,0,{fn:/[a-z]/i.test(v.staticDefinitionSymbol||U)?new RegExp("["+(v.staticDefinitionSymbol||U)+"]",v.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:re===void 0?"master":re.def!==U&&re.static!==!0,casing:null,def:v.staticDefinitionSymbol||U,placeholder:v.staticDefinitionSymbol!==void 0?U:void 0,nativeDef:(T?"'":"")+U}),T=!1)}}function H(){if(O.length>0){if($(g=O[O.length-1],m),g.isAlternator){S=O.pop();for(var K=0;K<S.matches.length;K++)S.matches[K].isGroup&&(S.matches[K].isGroup=!1);O.length>0?(g=O[O.length-1]).matches.push(S):M.matches.push(S)}}else $(M,m)}function V(K){var U=new h.default(!0);return U.openGroup=!1,U.matches=K,U}function G(){if((x=O.pop()).openGroup=!1,x!==void 0)if(O.length>0){if((g=O[O.length-1]).matches.push(x),g.isAlternator){S=O.pop();for(var K=0;K<S.matches.length;K++)S.matches[K].isGroup=!1,S.matches[K].alternatorGroup=!1;O.length>0?(g=O[O.length-1]).matches.push(S):M.matches.push(S)}}else M.matches.push(x);else H()}function D(K){var U=K.pop();return U.isQuantifier&&(U=V([K.pop(),U])),U}for(y&&(v.optionalmarker[0]=void 0,v.optionalmarker[1]=void 0);R=y?b.exec(C):E.exec(C);){if(m=R[0],y){switch(m.charAt(0)){case"?":m="{0,1}";break;case"+":case"*":m="{"+m+"}";break;case"|":if(O.length===0){var P=V(M.matches);P.openGroup=!0,O.push(P),M.matches=[],z=!0}}switch(m){case"\\d":m="[0-9]";break;case"\\p":m+=b.exec(C)[0],m+=b.exec(C)[0]}}if(T)H();else switch(m.charAt(0)){case"$":case"^":y||H();break;case v.escapeChar:T=!0,y&&H();break;case v.optionalmarker[1]:case v.groupmarker[1]:G();break;case v.optionalmarker[0]:O.push(new h.default(!1,!0));break;case v.groupmarker[0]:O.push(new h.default(!0));break;case v.quantifiermarker[0]:var I=new h.default(!1,!1,!0),N=(m=m.replace(/[{}?]/g,"")).split("|"),Y=N[0].split(","),X=isNaN(Y[0])?Y[0]:parseInt(Y[0]),ne=Y.length===1?X:isNaN(Y[1])?Y[1]:parseInt(Y[1]),se=isNaN(N[1])?N[1]:parseInt(N[1]);X!=="*"&&X!=="+"||(X=ne==="*"?0:1),I.quantifier={min:X,max:ne,jit:se};var W=O.length>0?O[O.length-1].matches:M.matches;(R=W.pop()).isGroup||(R=V([R])),W.push(R),W.push(I);break;case v.alternatormarker:if(O.length>0){var B=(g=O[O.length-1]).matches[g.matches.length-1];w=g.openGroup&&(B.matches===void 0||B.isGroup===!1&&B.isAlternator===!1)?O.pop():D(g.matches)}else w=D(M.matches);if(w.isAlternator)O.push(w);else if(w.alternatorGroup?(S=O.pop(),w.alternatorGroup=!1):S=new h.default(!1,!1,!1,!0),S.matches.push(w),O.push(S),w.openGroup){w.openGroup=!1;var Z=new h.default(!0);Z.alternatorGroup=!0,O.push(Z)}break;default:H()}}for(z&&G();O.length>0;)x=O.pop(),M.matches.push(x);return M.matches.length>0&&((function K(U){U&&U.matches&&U.matches.forEach((function(le,re){var te=U.matches[re+1];(te===void 0||te.matches===void 0||te.isQuantifier===!1)&&le&&le.isGroup&&(le.isGroup=!1,y||($(le,v.groupmarker[0],0),le.openGroup!==!0&&$(le,v.groupmarker[1]))),K(le)}))})(M),F.push(M)),(v.numericInput||v.isRTL)&&(function K(U){for(var le in U.matches=U.matches.reverse(),U.matches)if(Object.prototype.hasOwnProperty.call(U.matches,le)){var re=parseInt(le);if(U.matches[le].isQuantifier&&U.matches[re+1]&&U.matches[re+1].isGroup){var te=U.matches[le];U.matches.splice(le,1),U.matches.splice(re+1,0,te)}U.matches[le].matches!==void 0?U.matches[le]=K(U.matches[le]):U.matches[le]=((fe=U.matches[le])===v.optionalmarker[0]?fe=v.optionalmarker[1]:fe===v.optionalmarker[1]?fe=v.optionalmarker[0]:fe===v.groupmarker[0]?fe=v.groupmarker[1]:fe===v.groupmarker[1]&&(fe=v.groupmarker[0]),fe)}var fe;return U})(F[0]),F},o.generateMaskSet=function(C,y){var v;function R(g,S){var w=S.repeat,E=S.groupmarker,b=S.quantifiermarker,T=S.keepStatic;if(w>0||w==="*"||w==="+"){var M=w==="*"?0:w==="+"?1:w;if(M!=w)g=E[0]+g+E[1]+b[0]+M+","+w+b[1];else for(var O=g,F=1;F<M;F++)g+=O}if(T===!0){var z=g.match(new RegExp("(.)\\[([^\\]]*)\\]","g"));z&&z.forEach((function($,H){var V=(function(P,I){return(function(N){if(Array.isArray(N))return N})(P)||(function(N,Y){var X=N==null?null:typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(X!=null){var ne,se,W,B,Z=[],K=!0,U=!1;try{if(W=(X=X.call(N)).next,Y!==0)for(;!(K=(ne=W.call(X)).done)&&(Z.push(ne.value),Z.length!==Y);K=!0);}catch(le){U=!0,se=le}finally{try{if(!K&&X.return!=null&&(B=X.return(),Object(B)!==B))return}finally{if(U)throw se}}return Z}})(P,I)||(function(N,Y){if(N){if(typeof N=="string")return _(N,Y);var X=Object.prototype.toString.call(N).slice(8,-1);if(X==="Object"&&N.constructor&&(X=N.constructor.name),X==="Map"||X==="Set")return Array.from(N);if(X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X))return _(N,Y)}})(P,I)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
16
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})($.split("["),2),G=V[0],D=V[1];D=D.replace("]",""),g=g.replace(new RegExp("".concat((0,d.default)(G),"\\[").concat((0,d.default)(D),"\\]")),G.charAt(0)===D.charAt(0)?"(".concat(G,"|").concat(G).concat(D,")"):"".concat(G,"[").concat(D,"]"))}))}return g}function m(g,S,w){var E,b,T=!1;return g!==null&&g!==""||((T=w.regex!==null)?g=(g=w.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(T=!0,g=".*")),g.length===1&&w.greedy===!1&&w.repeat!==0&&(w.placeholder=""),g=R(g,w),b=T?"regex_"+w.regex:w.numericInput?g.split("").reverse().join(""):g,w.keepStatic!==null&&(b="ks_"+w.keepStatic+b),f(w.placeholder)==="object"&&(b="ph_"+JSON.stringify(w.placeholder)+b),p.default.prototype.masksCache[b]===void 0||y===!0?(E={mask:g,maskToken:p.default.prototype.analyseMask(g,T,w),validPositions:[],_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:S,maskLength:void 0,jitOffset:{}},y!==!0&&(p.default.prototype.masksCache[b]=E,E=c.default.extend(!0,{},p.default.prototype.masksCache[b]))):E=c.default.extend(!0,{},p.default.prototype.masksCache[b]),E}if(typeof C.mask=="function"&&(C.mask=C.mask(C)),Array.isArray(C.mask)){if(C.mask.length>1){C.keepStatic===null&&(C.keepStatic=!0);var x=C.groupmarker[0];return(C.isRTL?C.mask.reverse():C.mask).forEach((function(g){x.length>1&&(x+=C.alternatormarker),g.mask!==void 0&&typeof g.mask!="function"?x+=g.mask:x+=g})),m(x+=C.groupmarker[1],C.mask,C)}C.mask=C.mask.pop()}return v=C.mask&&C.mask.mask!==void 0&&typeof C.mask.mask!="function"?m(C.mask.mask,C.mask,C):m(C.mask,C.mask,C),C.keepStatic===null&&(C.keepStatic=!1),v};var c=k(u(4963)),d=k(u(7184)),p=k(u(2394)),h=k(u(9695));function f(C){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},f(C)}function _(C,y){(y==null||y>C.length)&&(y=C.length);for(var v=0,R=new Array(y);v<y;v++)R[v]=C[v];return R}function k(C){return C&&C.__esModule?C:{default:C}}},157:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.mask=function(){var k=this,C=this.opts,y=this.el,v=this.dependencyLib;p.EventRuler.off(y);var R=(function(g,S){var w=g.getAttribute("type"),E=g.tagName.toLowerCase()==="input"&&S.supportsInputType.includes(w)||g.isContentEditable||g.tagName.toLowerCase()==="textarea";if(!E)if(g.tagName.toLowerCase()==="input"){var b=document.createElement("input");b.setAttribute("type",w),E=b.type==="text",b=null}else E="partial";return E!==!1?(function(T){var M,O;function F(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():f.getLastValidPosition.call(k)!==-1||S.nullable!==!0?(this.inputmask.shadowRoot||this.ownerDocument).activeElement===this&&S.clearMaskOnLostFocus?(k.isRTL?h.clearOptionalTail.call(k,f.getBuffer.call(k).slice()).reverse():h.clearOptionalTail.call(k,f.getBuffer.call(k).slice())).join(""):M.call(this):"":M.call(this)}function z(H){O.call(this,H),this.inputmask&&(0,h.applyInputValue)(this,H)}if(!T.inputmask.__valueGet){if(S.noValuePatching!==!0){if(Object.getOwnPropertyDescriptor){var $=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(T),"value"):void 0;$&&$.get&&$.set?(M=$.get,O=$.set,Object.defineProperty(T,"value",{get:F,set:z,configurable:!0})):T.tagName.toLowerCase()!=="input"&&(M=function(){return this.textContent},O=function(H){this.textContent=H},Object.defineProperty(T,"value",{get:F,set:z,configurable:!0}))}else document.__lookupGetter__&&T.__lookupGetter__("value")&&(M=T.__lookupGetter__("value"),O=T.__lookupSetter__("value"),T.__defineGetter__("value",F),T.__defineSetter__("value",z));T.inputmask.__valueGet=M,T.inputmask.__valueSet=O}T.inputmask._valueGet=function(H){return k.isRTL&&H!==!0?M.call(this.el).split("").reverse().join(""):M.call(this.el)},T.inputmask._valueSet=function(H,V){O.call(this.el,H==null?"":V!==!0&&k.isRTL?H.split("").reverse().join(""):H)},M===void 0&&(M=function(){return this.value},O=function(H){this.value=H},(function(H){if(v.valHooks&&(v.valHooks[H]===void 0||v.valHooks[H].inputmaskpatch!==!0)){var V=v.valHooks[H]&&v.valHooks[H].get?v.valHooks[H].get:function(D){return D.value},G=v.valHooks[H]&&v.valHooks[H].set?v.valHooks[H].set:function(D,P){return D.value=P,D};v.valHooks[H]={get:function(D){if(D.inputmask){if(D.inputmask.opts.autoUnmask)return D.inputmask.unmaskedvalue();var P=V(D);return f.getLastValidPosition.call(k,void 0,void 0,D.inputmask.maskset.validPositions)!==-1||S.nullable!==!0?P:""}return V(D)},set:function(D,P){var I=G(D,P);return D.inputmask&&(0,h.applyInputValue)(D,P),I},inputmaskpatch:!0}}})(T.type),(function(H){p.EventRuler.on(H,"mouseenter",(function(){var V=this,G=V.inputmask._valueGet(!0);G!=(V.inputmask.isRTL?f.getBuffer.call(V.inputmask).slice().reverse():f.getBuffer.call(V.inputmask)).join("")&&(0,h.applyInputValue)(V,G)}))})(T))}})(g):g.inputmask=void 0,E})(y,C);if(R!==!1){k.originalPlaceholder=y.placeholder,k.maxLength=y!==void 0?y.maxLength:void 0,k.maxLength===-1&&(k.maxLength=void 0),"inputMode"in y&&y.getAttribute("inputmode")===null&&(y.inputMode=C.inputmode,y.setAttribute("inputmode",C.inputmode)),R===!0&&(C.showMaskOnFocus=C.showMaskOnFocus&&["cc-number","cc-exp"].indexOf(y.autocomplete)===-1,c.iphone&&(C.insertModeVisual=!1,y.setAttribute("autocorrect","off")),p.EventRuler.on(y,"submit",d.EventHandlers.submitEvent),p.EventRuler.on(y,"reset",d.EventHandlers.resetEvent),p.EventRuler.on(y,"blur",d.EventHandlers.blurEvent),p.EventRuler.on(y,"focus",d.EventHandlers.focusEvent),p.EventRuler.on(y,"invalid",d.EventHandlers.invalidEvent),p.EventRuler.on(y,"click",d.EventHandlers.clickEvent),p.EventRuler.on(y,"mouseleave",d.EventHandlers.mouseleaveEvent),p.EventRuler.on(y,"mouseenter",d.EventHandlers.mouseenterEvent),p.EventRuler.on(y,"paste",d.EventHandlers.pasteEvent),p.EventRuler.on(y,"cut",d.EventHandlers.cutEvent),p.EventRuler.on(y,"complete",C.oncomplete),p.EventRuler.on(y,"incomplete",C.onincomplete),p.EventRuler.on(y,"cleared",C.oncleared),C.inputEventOnly!==!0&&p.EventRuler.on(y,"keydown",d.EventHandlers.keyEvent),(c.mobile||C.inputEventOnly)&&y.removeAttribute("maxLength"),p.EventRuler.on(y,"input",d.EventHandlers.inputFallBackEvent)),p.EventRuler.on(y,"setvalue",d.EventHandlers.setValueEvent),k.applyMaskHook===void 0||k.applyMaskHook(),f.getBufferTemplate.call(k).join(""),k.undoValue=k._valueGet(!0);var m=(y.inputmask.shadowRoot||y.ownerDocument).activeElement;if(y.inputmask._valueGet(!0)!==""||C.clearMaskOnLostFocus===!1||m===y){(0,h.applyInputValue)(y,y.inputmask._valueGet(!0),C);var x=f.getBuffer.call(k).slice();_.isComplete.call(k,x)===!1&&C.clearIncomplete&&f.resetMaskSet.call(k,!1),C.clearMaskOnLostFocus&&m!==y&&(f.getLastValidPosition.call(k)===-1?x=[]:h.clearOptionalTail.call(k,x)),(C.clearMaskOnLostFocus===!1||C.showMaskOnFocus&&m===y||y.inputmask._valueGet(!0)!=="")&&(0,h.writeBuffer)(y,x),m===y&&f.caret.call(k,y,f.seekNext.call(k,f.getLastValidPosition.call(k)))}}};var c=u(9845),d=u(6030),p=u(9716),h=u(7760),f=u(8711),_=u(7215)},9695:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(u,c,d,p){this.matches=[],this.openGroup=u||!1,this.alternatorGroup=!1,this.isGroup=u||!1,this.isOptional=c||!1,this.isQuantifier=d||!1,this.isAlternator=p||!1,this.quantifier={min:1,max:1}}},3194:function(){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(a,o){if(this==null)throw new TypeError('"this" is null or not defined');var u=Object(this),c=u.length>>>0;if(c===0)return!1;for(var d=0|o,p=Math.max(d>=0?d:c-Math.abs(d),0);p<c;){if(u[p]===a)return!0;p++}return!1}})},9302:function(){var a=Function.bind.call(Function.call,Array.prototype.reduce),o=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),u=Function.bind.call(Function.call,Array.prototype.concat),c=Object.keys;Object.entries||(Object.entries=function(d){return a(c(d),(function(p,h){return u(p,typeof h=="string"&&o(d,h)?[[h,d[h]]]:[])}),[])})},7149:function(){function a(o){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},a(o)}typeof Object.getPrototypeOf!="function"&&(Object.getPrototypeOf=a("test".__proto__)==="object"?function(o){return o.__proto__}:function(o){return o.constructor.prototype})},4013:function(){String.prototype.includes||(String.prototype.includes=function(a,o){return typeof o!="number"&&(o=0),!(o+a.length>this.length)&&this.indexOf(a,o)!==-1})},8711:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.caret=function(v,R,m,x,g){var S,w=this,E=this.opts;if(R===void 0)return"selectionStart"in v&&"selectionEnd"in v?(R=v.selectionStart,m=v.selectionEnd):d.default.getSelection?(S=d.default.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==v&&S.commonAncestorContainer!==v||(R=S.startOffset,m=S.endOffset):document.selection&&document.selection.createRange&&(m=(R=0-(S=document.selection.createRange()).duplicate().moveStart("character",-v.inputmask._valueGet().length))+S.text.length),{begin:x?R:y.call(w,R),end:x?m:y.call(w,m)};if(Array.isArray(R)&&(m=w.isRTL?R[0]:R[1],R=w.isRTL?R[1]:R[0]),R.begin!==void 0&&(m=w.isRTL?R.begin:R.end,R=w.isRTL?R.end:R.begin),typeof R=="number"){R=x?R:y.call(w,R),m=typeof(m=x?m:y.call(w,m))=="number"?m:R;var b=parseInt(((v.ownerDocument.defaultView||d.default).getComputedStyle?(v.ownerDocument.defaultView||d.default).getComputedStyle(v,null):v.currentStyle).fontSize)*m;if(v.scrollLeft=b>v.scrollWidth?b:0,v.inputmask.caretPos={begin:R,end:m},E.insertModeVisual&&E.insertMode===!1&&R===m&&(g||m++),v===(v.inputmask.shadowRoot||v.ownerDocument).activeElement){if("setSelectionRange"in v)v.setSelectionRange(R,m);else if(d.default.getSelection){if(S=document.createRange(),v.firstChild===void 0||v.firstChild===null){var T=document.createTextNode("");v.appendChild(T)}S.setStart(v.firstChild,R<v.inputmask._valueGet().length?R:v.inputmask._valueGet().length),S.setEnd(v.firstChild,m<v.inputmask._valueGet().length?m:v.inputmask._valueGet().length),S.collapse(!0);var M=d.default.getSelection();M.removeAllRanges(),M.addRange(S)}else v.createTextRange&&((S=v.createTextRange()).collapse(!0),S.moveEnd("character",m),S.moveStart("character",R),S.select());v.inputmask.caretHook===void 0||v.inputmask.caretHook.call(w,{begin:R,end:m})}}},o.determineLastRequiredPosition=function(v){var R,m,x=this,g=x.maskset,S=x.dependencyLib,w=_.call(x),E={},b=g.validPositions[w],T=h.getMaskTemplate.call(x,!0,_.call(x),!0,!0),M=T.length,O=b!==void 0?b.locator.slice():void 0;for(R=w+1;R<T.length;R++)O=(m=h.getTestTemplate.call(x,R,O,R-1)).locator.slice(),E[R]=S.extend(!0,{},m);var F=b&&b.alternation!==void 0?b.locator[b.alternation]:void 0;for(R=M-1;R>w&&((m=E[R]).match.optionality||m.match.optionalQuantifier&&m.match.newBlockMarker||F&&(F!==E[R].locator[b.alternation]&&m.match.static!==!0||m.match.static===!0&&m.locator[b.alternation]&&p.checkAlternationMatch.call(x,m.locator[b.alternation].toString().split(","),F.toString().split(","))&&h.getTests.call(x,R)[0].def!==""))&&T[R]===h.getPlaceholder.call(x,R,m.match);R--)M--;return v?{l:M,def:E[M]?E[M].match:void 0}:M},o.determineNewCaretPosition=function(v,R,m){var x,g,S,w=this,E=w.maskset,b=w.opts;if(R&&(w.isRTL?v.end=v.begin:v.begin=v.end),v.begin===v.end){switch(m=m||b.positionCaretOnClick){case"none":break;case"select":v={begin:0,end:f.call(w).length};break;case"ignore":v.end=v.begin=C.call(w,_.call(w));break;case"radixFocus":if(w.clicked>1&&E.validPositions.length===0)break;if((function($){if(b.radixPoint!==""&&b.digits!==0){var H=E.validPositions;if(H[$]===void 0||H[$].input===void 0){if($<C.call(w,-1))return!0;var V=f.call(w).indexOf(b.radixPoint);if(V!==-1){for(var G=0,D=H.length;G<D;G++)if(H[G]&&V<G&&H[G].input!==h.getPlaceholder.call(w,G))return!1;return!0}}}return!1})(v.begin)){var T=f.call(w).join("").indexOf(b.radixPoint);v.end=v.begin=b.numericInput?C.call(w,T):T;break}default:if(x=v.begin,g=_.call(w,x,!0),x<=(S=C.call(w,g!==-1||k.call(w,0)?g:-1)))v.end=v.begin=k.call(w,x,!1,!0)?x:C.call(w,x);else{var M=E.validPositions[g],O=h.getTestTemplate.call(w,S,M?M.match.locator:void 0,M),F=h.getPlaceholder.call(w,S,O.match);if(F!==""&&f.call(w)[S]!==F&&O.match.optionalQuantifier!==!0&&O.match.newBlockMarker!==!0||!k.call(w,S,b.keepStatic,!0)&&O.match.def===F){var z=C.call(w,S);(x>=z||x===S)&&(S=z)}v.end=v.begin=S}}return v}},o.getBuffer=f,o.getBufferTemplate=function(){var v=this.maskset;return v._buffer===void 0&&(v._buffer=h.getMaskTemplate.call(this,!1,1),v.buffer===void 0&&(v.buffer=v._buffer.slice())),v._buffer},o.getLastValidPosition=_,o.isMask=k,o.resetMaskSet=function(v){var R=this.maskset;R.buffer=void 0,v!==!0&&(R.validPositions=[],R.p=0),v===!1&&(R.tests={},R.jitOffset={})},o.seekNext=C,o.seekPrevious=function(v,R){var m=this,x=v-1;if(v<=0)return 0;for(;x>0&&(R===!0&&(h.getTest.call(m,x).match.newBlockMarker!==!0||!k.call(m,x,void 0,!0))||R!==!0&&!k.call(m,x,void 0,!0));)x--;return x},o.translatePosition=y;var c,d=(c=u(9380))&&c.__esModule?c:{default:c},p=u(7215),h=u(4713);function f(v){var R=this,m=R.maskset;return m.buffer!==void 0&&v!==!0||(m.buffer=h.getMaskTemplate.call(R,!0,_.call(R),!0),m._buffer===void 0&&(m._buffer=m.buffer.slice())),m.buffer}function _(v,R,m){var x=this.maskset,g=-1,S=-1,w=m||x.validPositions;v===void 0&&(v=-1);for(var E=0,b=w.length;E<b;E++)w[E]&&(R||w[E].generatedInput!==!0)&&(E<=v&&(g=E),E>=v&&(S=E));return g===-1||g===v?S:S===-1||v-g<S-v?g:S}function k(v,R,m){var x=this,g=this.maskset,S=h.getTestTemplate.call(x,v).match;if(S.def===""&&(S=h.getTest.call(x,v).match),S.static!==!0)return S.fn;if(m===!0&&g.validPositions[v]!==void 0&&g.validPositions[v].generatedInput!==!0)return!0;if(R!==!0&&v>-1){if(m){var w=h.getTests.call(x,v);return w.length>1+(w[w.length-1].match.def===""?1:0)}var E=h.determineTestTemplate.call(x,v,h.getTests.call(x,v)),b=h.getPlaceholder.call(x,v,E.match);return E.match.def!==b}return!1}function C(v,R,m){var x=this;m===void 0&&(m=!0);for(var g=v+1;h.getTest.call(x,g).match.def!==""&&(R===!0&&(h.getTest.call(x,g).match.newBlockMarker!==!0||!k.call(x,g,void 0,!0))||R!==!0&&!k.call(x,g,void 0,m));)g++;return g}function y(v){var R=this.opts,m=this.el;return!this.isRTL||typeof v!="number"||R.greedy&&R.placeholder===""||!m||(v=this._valueGet().length-v)<0&&(v=0),v}},4713:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.determineTestTemplate=y,o.getDecisionTaker=_,o.getMaskTemplate=function(x,g,S,w,E){var b=this,T=this.opts,M=this.maskset,O=T.greedy;E&&T.greedy&&(T.greedy=!1,b.maskset.tests={}),g=g||0;var F,z,$,H,V=[],G=0;do{if(x===!0&&M.validPositions[G])z=($=E&&M.validPositions[G].match.optionality&&M.validPositions[G+1]===void 0&&(M.validPositions[G].generatedInput===!0||M.validPositions[G].input==T.skipOptionalPartCharacter&&G>0)?y.call(b,G,m.call(b,G,F,G-1)):M.validPositions[G]).match,F=$.locator.slice(),V.push(S===!0?$.input:S===!1?z.nativeDef:k.call(b,G,z));else{z=($=C.call(b,G,F,G-1)).match,F=$.locator.slice();var D=w!==!0&&(T.jitMasking!==!1?T.jitMasking:z.jit);(H=(H||M.validPositions[G-1])&&z.static&&z.def!==T.groupSeparator&&z.fn===null)||D===!1||D===void 0||typeof D=="number"&&isFinite(D)&&D>G?V.push(S===!1?z.nativeDef:k.call(b,V.length,z)):H=!1}G++}while(z.static!==!0||z.def!==""||g>G);return V[V.length-1]===""&&V.pop(),S===!1&&M.maskLength!==void 0||(M.maskLength=G-1),T.greedy=O,V},o.getPlaceholder=k,o.getTest=v,o.getTestTemplate=C,o.getTests=m,o.isSubsetOf=R;var c,d=(c=u(2394))&&c.__esModule?c:{default:c},p=u(8711);function h(x){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},h(x)}function f(x,g){var S=(x.alternation!=null?x.mloc[_(x)]:x.locator).join("");if(S!=="")for(S=S.split(":")[0];S.length<g;)S+="0";return S}function _(x){var g=x.locator[x.alternation];return typeof g=="string"&&g.length>0&&(g=g.split(",")[0]),g!==void 0?g.toString():""}function k(x,g,S){var w=this,E=this.opts,b=this.maskset;if((g=g||v.call(w,x).match).placeholder!==void 0||S===!0){if(g.placeholder!==""&&g.static===!0&&g.generated!==!0){var T=p.getLastValidPosition.call(w,x),M=p.seekNext.call(w,T);return(S?x<=M:x<M)?E.staticDefinitionSymbol&&g.static?g.nativeDef:g.def:typeof g.placeholder=="function"?g.placeholder(E):g.placeholder}return typeof g.placeholder=="function"?g.placeholder(E):g.placeholder}if(g.static===!0){if(x>-1&&b.validPositions[x]===void 0){var O,F=m.call(w,x),z=[];if(typeof E.placeholder=="string"&&F.length>1+(F[F.length-1].match.def===""?1:0)){for(var $=0;$<F.length;$++)if(F[$].match.def!==""&&F[$].match.optionality!==!0&&F[$].match.optionalQuantifier!==!0&&(F[$].match.static===!0||O===void 0||F[$].match.fn.test(O.match.def,b,x,!0,E)!==!1)&&(z.push(F[$]),F[$].match.static===!0&&(O=F[$]),z.length>1&&/[0-9a-bA-Z]/.test(z[0].match.def)))return E.placeholder.charAt(x%E.placeholder.length)}}return g.def}return h(E.placeholder)==="object"?g.def:E.placeholder.charAt(x%E.placeholder.length)}function C(x,g,S){return this.maskset.validPositions[x]||y.call(this,x,m.call(this,x,g&&g.slice(),S))}function y(x,g){var S=this.opts,w=0,E=(function(H,V){var G=0,D=!1;return V.forEach((function(P){P.match.optionality&&(G!==0&&G!==P.match.optionality&&(D=!0),(G===0||G>P.match.optionality)&&(G=P.match.optionality))})),G&&(H==0||V.length==1?G=0:D||(G=0)),G})(x,g);x=x>0?x-1:0;var b,T,M,O=f(v.call(this,x));S.greedy&&g.length>1&&g[g.length-1].match.def===""&&(w=1);for(var F=0;F<g.length-w;F++){var z=g[F];b=f(z,O.length);var $=Math.abs(b-O);(z.unMatchedAlternationStopped!==!0||g.filter((function(H){return H.unMatchedAlternationStopped!==!0})).length<=1)&&(T===void 0||b!==""&&$<T||M&&!S.greedy&&M.match.optionality&&M.match.optionality-E>0&&M.match.newBlockMarker==="master"&&(!z.match.optionality||z.match.optionality-E<1||!z.match.newBlockMarker)||M&&!S.greedy&&M.match.optionalQuantifier&&!z.match.optionalQuantifier)&&(T=$,M=z)}return M}function v(x,g){var S=this.maskset;return S.validPositions[x]?S.validPositions[x]:(g||m.call(this,x))[0]}function R(x,g,S){function w(E){for(var b,T=[],M=-1,O=0,F=E.length;O<F;O++)if(E.charAt(O)==="-")for(b=E.charCodeAt(O+1);++M<b;)T.push(String.fromCharCode(M));else M=E.charCodeAt(O),T.push(E.charAt(O));return T.join("")}return x.match.def===g.match.nativeDef||!(!(S.regex||x.match.fn instanceof RegExp&&g.match.fn instanceof RegExp)||x.match.static===!0||g.match.static===!0)&&(g.match.fn.source==="."||w(g.match.fn.source.replace(/[[\]/]/g,"")).indexOf(w(x.match.fn.source.replace(/[[\]/]/g,"")))!==-1)}function m(x,g,S){var w,E,b=this,T=this.dependencyLib,M=this.maskset,O=this.opts,F=this.el,z=M.maskToken,$=g?S:0,H=g?g.slice():[0],V=[],G=!1,D=g?g.join(""):"",P=!1;function I(se,W,B,Z){function K(re,te,fe){function we(q,ie){var ue=ie.matches.indexOf(q)===0;return ue||ie.matches.every((function(oe,ve){return oe.isQuantifier===!0?ue=we(q,ie.matches[ve-1]):Object.prototype.hasOwnProperty.call(oe,"matches")&&(ue=we(q,oe)),!ue})),ue}function Ae(q,ie,ue){var oe,ve;if((M.tests[q]||M.validPositions[q])&&(M.validPositions[q]?[M.validPositions[q]]:M.tests[q]).every((function(_e,ce){if(_e.mloc[ie])return oe=_e,!1;var Le=ue!==void 0?ue:_e.alternation,ze=_e.locator[Le]!==void 0?_e.locator[Le].toString().indexOf(ie):-1;return(ve===void 0||ze<ve)&&ze!==-1&&(oe=_e,ve=ze),!0})),oe){var Re=oe.locator[oe.alternation],Se=oe.mloc[ie]||oe.mloc[Re]||oe.locator;return Se[Se.length-1].toString().indexOf(":")!==-1&&Se.pop(),Se.slice((ue!==void 0?ue:oe.alternation)+1)}return ue!==void 0?Ae(q,ie):void 0}function Fe(q,ie){return q.match.static===!0&&ie.match.static!==!0&&ie.match.fn.test(q.match.def,M,x,!1,O,!1)}function Ne(q,ie){var ue=q.alternation,oe=ie===void 0||ue<=ie.alternation&&q.locator[ue].toString().indexOf(ie.locator[ue])===-1;if(!oe&&ue>ie.alternation){for(var ve=0;ve<ue;ve++)if(q.locator[ve]!==ie.locator[ve]){ue=ve,oe=!0;break}}return!!oe&&(function(Re){q.mloc=q.mloc||{};var Se=q.locator[Re];if(Se!==void 0){if(typeof Se=="string"&&(Se=Se.split(",")[0]),q.mloc[Se]===void 0&&(q.mloc[Se]=q.locator.slice(),q.mloc[Se].push(":".concat(q.alternation))),ie!==void 0){for(var _e in ie.mloc)typeof _e=="string"&&(_e=parseInt(_e.split(",")[0])),q.mloc[_e+0]=ie.mloc[_e];q.locator[Re]=Object.keys(q.mloc).join(",")}return q.alternation>Re&&(q.alternation=Re),!0}return q.alternation=void 0,!1})(ue)}function ae(q,ie){if(q.locator.length!==ie.locator.length)return!1;for(var ue=q.alternation+1;ue<q.locator.length;ue++)if(q.locator[ue]!==ie.locator[ue])return!1;return!0}if($>x+O._maxTestPos)throw new Error("Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. ".concat(M.mask));if($===x&&re.matches===void 0){if(V.push({match:re,locator:te.reverse(),cd:D,mloc:{}}),!re.optionality||fe!==void 0||!(O.definitions&&O.definitions[re.nativeDef]&&O.definitions[re.nativeDef].optional||d.default.prototype.definitions[re.nativeDef]&&d.default.prototype.definitions[re.nativeDef].optional))return!0;G=!0,$=x}else if(re.matches!==void 0){if(re.isGroup&&fe!==re)return(function(){if(re=K(se.matches[se.matches.indexOf(re)+1],te,fe))return!0})();if(re.isOptional)return(function(){var q=re,ie=V.length;if(re=I(re,W,te,fe),V.length>0){if(V.forEach((function(ue,oe){oe>=ie&&(ue.match.optionality=ue.match.optionality?ue.match.optionality+1:1)})),w=V[V.length-1].match,fe!==void 0||!we(w,q))return re;G=!0,$=x}})();if(re.isAlternator)return(function(){function q(L){for(var A,j=L.matches[0].matches?L.matches[0].matches.length:1,ee=0;ee<L.matches.length&&j===(A=L.matches[ee].matches?L.matches[ee].matches.length:1);ee++);return j!==A}b.hasAlternator=!0;var ie,ue=re,oe=[],ve=V.slice(),Re=te.length,Se=W.length>0?W.shift():-1;if(Se===-1||typeof Se=="string"){var _e,ce=$,Le=W.slice(),ze=[];if(typeof Se=="string")ze=Se.split(",");else for(_e=0;_e<ue.matches.length;_e++)ze.push(_e.toString());if(M.excludes[x]!==void 0){for(var pn=ze.slice(),Zt=0,Ue=M.excludes[x].length;Zt<Ue;Zt++){var J=M.excludes[x][Zt].toString().split(":");te.length==J[1]&&ze.splice(ze.indexOf(J[0]),1)}ze.length===0&&(delete M.excludes[x],ze=pn)}(O.keepStatic===!0||isFinite(parseInt(O.keepStatic))&&ce>=O.keepStatic)&&(ze=ze.slice(0,1));for(var Q=0;Q<ze.length;Q++){_e=parseInt(ze[Q]),V=[],W=typeof Se=="string"&&Ae($,_e,Re)||Le.slice();var Be=ue.matches[_e];if(Be&&K(Be,[_e].concat(te),fe))re=!0;else if(Q===0&&(P=q(ue)),Be&&Be.matches&&Be.matches.length>ue.matches[0].matches.length)break;ie=V.slice(),$=ce,V=[];for(var Ie=0;Ie<ie.length;Ie++){var Me=ie[Ie],ke=!1;Me.alternation=Me.alternation||Re,Ne(Me);for(var pt=0;pt<oe.length;pt++){var et=oe[pt];if(typeof Se!="string"||Me.alternation!==void 0&&ze.includes(Me.locator[Me.alternation].toString())){if(Me.match.nativeDef===et.match.nativeDef){ke=!0,Ne(et,Me);break}if(R(Me,et,O)){Ne(Me,et)&&(ke=!0,oe.splice(oe.indexOf(et),0,Me));break}if(R(et,Me,O)){Ne(et,Me);break}if(Fe(Me,et)){ae(Me,et)||F.inputmask.userOptions.keepStatic!==void 0?Ne(Me,et)&&(ke=!0,oe.splice(oe.indexOf(et),0,Me)):O.keepStatic=!0;break}if(Fe(et,Me)){Ne(et,Me);break}}}ke||oe.push(Me)}}V=ve.concat(oe),$=x,G=V.length>0&&P,re=oe.length>0&&!P,P&&G&&!re&&V.forEach((function(L,A){L.unMatchedAlternationStopped=!0})),W=Le.slice()}else re=K(ue.matches[Se]||se.matches[Se],[Se].concat(te),fe);if(re)return!0})();if(re.isQuantifier&&fe!==se.matches[se.matches.indexOf(re)-1])return(function(){for(var q=re,ie=!1,ue=W.length>0?W.shift():0;ue<(isNaN(q.quantifier.max)?ue+1:q.quantifier.max)&&$<=x;ue++){var oe=se.matches[se.matches.indexOf(q)-1];if(re=K(oe,[ue].concat(te),oe)){if(V.forEach((function(ve,Re){(w=N(oe,ve.match)?ve.match:V[V.length-1].match).optionalQuantifier=ue>=q.quantifier.min,w.jit=(ue+1)*(oe.matches.indexOf(w)+1)>q.quantifier.jit,w.optionalQuantifier&&we(w,oe)&&(G=!0,$=x,O.greedy&&M.validPositions[x-1]==null&&ue>q.quantifier.min&&["*","+"].indexOf(q.quantifier.max)!=-1&&(V.pop(),D=void 0),ie=!0,re=!1),!ie&&w.jit&&(M.jitOffset[x]=oe.matches.length-oe.matches.indexOf(w))})),ie)break;return!0}}})();if(re=I(re,W,te,fe))return!0}else $++}for(var U=W.length>0?W.shift():0;U<se.matches.length;U++)if(se.matches[U].isQuantifier!==!0){var le=K(se.matches[U],[U].concat(B),Z);if(le&&$===x)return le;if($>x)break}}function N(se,W){var B=se.matches.indexOf(W)!=-1;return B||se.matches.forEach((function(Z,K){Z.matches===void 0||B||(B=N(Z,W))})),B}if(x>-1){if(g===void 0){for(var Y,X=x-1;(Y=M.validPositions[X]||M.tests[X])===void 0&&X>-1;)X--;Y!==void 0&&X>-1&&(H=(function(se,W){var B,Z=[];return Array.isArray(W)||(W=[W]),W.length>0&&(W[0].alternation===void 0||O.keepStatic===!0?(Z=y.call(b,se,W.slice()).locator.slice()).length===0&&(Z=W[0].locator.slice()):W.forEach((function(K){K.def!==""&&(Z.length===0?(B=K.alternation,Z=K.locator.slice()):K.locator[B]&&Z[B].toString().indexOf(K.locator[B])===-1&&(Z[B]+=","+K.locator[B]))}))),Z})(X,Y),D=H.join(""),$=X)}if(M.tests[x]&&M.tests[x][0].cd===D)return M.tests[x];for(var ne=H.shift();ne<z.length&&!(I(z[ne],H,[ne])&&$===x||$>x);ne++);}return(V.length===0||G)&&V.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:"",placeholder:""},locator:P&&V.filter((function(se){return se.unMatchedAlternationStopped!==!0})).length===0?[0]:[],mloc:{},cd:D}),g!==void 0&&M.tests[x]?E=T.extend(!0,[],V):(M.tests[x]=T.extend(!0,[],V),E=M.tests[x]),V.forEach((function(se){se.match.optionality=se.match.defOptionality||!1})),E}},7215:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.alternate=f,o.checkAlternationMatch=function(g,S,w){for(var E,b=this.opts.greedy?S:S.slice(0,1),T=!1,M=w!==void 0?w.split(","):[],O=0;O<M.length;O++)(E=g.indexOf(M[O]))!==-1&&g.splice(E,1);for(var F=0;F<g.length;F++)if(b.includes(g[F])){T=!0;break}return T},o.handleRemove=function(g,S,w,E,b){var T=this,M=this.maskset,O=this.opts;if((O.numericInput||T.isRTL)&&(S===d.keys.Backspace?S=d.keys.Delete:S===d.keys.Delete&&(S=d.keys.Backspace),T.isRTL)){var F=w.end;w.end=w.begin,w.begin=F}var z,$=p.getLastValidPosition.call(T,void 0,!0);w.end>=p.getBuffer.call(T).length&&$>=w.end&&(w.end=$+1),S===d.keys.Backspace?w.end-w.begin<1&&(w.begin=p.seekPrevious.call(T,w.begin)):S===d.keys.Delete&&w.begin===w.end&&(w.end=p.isMask.call(T,w.end,!0,!0)?w.end+1:p.seekNext.call(T,w.end)+1),(z=x.call(T,w))!==!1&&((E!==!0&&O.keepStatic!==!1||O.regex!==null&&h.getTest.call(T,w.begin).match.def.indexOf("|")!==-1)&&f.call(T,!0),E!==!0&&(M.p=S===d.keys.Delete?w.begin+z:w.begin,M.p=p.determineNewCaretPosition.call(T,{begin:M.p,end:M.p},!1,O.insertMode===!1&&S===d.keys.Backspace?"none":void 0).begin))},o.isComplete=k,o.isSelection=C,o.isValid=y,o.refreshFromBuffer=R,o.revalidateMask=x;var c=u(6030),d=u(2839),p=u(8711),h=u(4713);function f(g,S,w,E,b,T){var M=this,O=this.dependencyLib,F=this.opts,z=M.maskset;if(!M.hasAlternator)return!1;var $,H,V,G,D,P,I,N,Y,X,ne,se=O.extend(!0,[],z.validPositions),W=O.extend(!0,{},z.tests),B=!1,Z=!1,K=b!==void 0?b:p.getLastValidPosition.call(M);if(T&&(X=T.begin,ne=T.end,T.begin>T.end&&(X=T.end,ne=T.begin)),K===-1&&b===void 0)$=0,H=(G=h.getTest.call(M,$)).alternation;else for(;K>=0;K--)if((V=z.validPositions[K])&&V.alternation!==void 0){if(K<=(g||0)&&G&&G.locator[V.alternation]!==V.locator[V.alternation])break;$=K,H=z.validPositions[$].alternation,G=V}if(H!==void 0){I=parseInt($),z.excludes[I]=z.excludes[I]||[],g!==!0&&z.excludes[I].push((0,h.getDecisionTaker)(G)+":"+G.alternation);var U=[],le=-1;for(D=I;I<p.getLastValidPosition.call(M,void 0,!0)+1;D++)le===-1&&g<=D&&S!==void 0&&(U.push(S),le=U.length-1),(P=z.validPositions[I])&&P.generatedInput!==!0&&(T===void 0||D<X||D>=ne)&&U.push(P.input),z.validPositions.splice(I,1);for(le===-1&&S!==void 0&&(U.push(S),le=U.length-1);z.excludes[I]!==void 0&&z.excludes[I].length<10;){for(z.tests={},p.resetMaskSet.call(M,!0),B=!0,D=0;D<U.length&&(N=B.caret||F.insertMode==0&&N!=null?p.seekNext.call(M,N):p.getLastValidPosition.call(M,void 0,!0)+1,Y=U[D],B=y.call(M,N,Y,!1,E,!0));D++)D===le&&(Z=B),g==1&&B&&(Z={caretPos:D});if(B)break;if(p.resetMaskSet.call(M),G=h.getTest.call(M,I),z.validPositions=O.extend(!0,[],se),z.tests=O.extend(!0,{},W),!z.excludes[I]){Z=f.call(M,g,S,w,E,I-1,T);break}if(G.alternation!=null){var re=(0,h.getDecisionTaker)(G);if(z.excludes[I].indexOf(re+":"+G.alternation)!==-1){Z=f.call(M,g,S,w,E,I-1,T);break}for(z.excludes[I].push(re+":"+G.alternation),D=I;D<p.getLastValidPosition.call(M,void 0,!0)+1;D++)z.validPositions.splice(I)}else delete z.excludes[I]}}return Z&&F.keepStatic===!1||delete z.excludes[I],Z}function _(g,S,w){var E=this.opts,b=this.maskset;switch(E.casing||S.casing){case"upper":g=g.toUpperCase();break;case"lower":g=g.toLowerCase();break;case"title":var T=b.validPositions[w-1];g=w===0||T&&T.input===String.fromCharCode(d.keyCode.Space)?g.toUpperCase():g.toLowerCase();break;default:if(typeof E.casing=="function"){var M=Array.prototype.slice.call(arguments);M.push(b.validPositions),g=E.casing.apply(this,M)}}return g}function k(g){var S=this,w=this.opts,E=this.maskset;if(typeof w.isComplete=="function")return w.isComplete(g,w);if(w.repeat!=="*"){var b=!1,T=p.determineLastRequiredPosition.call(S,!0),M=T.l;if(T.def===void 0||T.def.newBlockMarker||T.def.optionality||T.def.optionalQuantifier){b=!0;for(var O=0;O<=M;O++){var F=h.getTestTemplate.call(S,O).match;if(F.static!==!0&&E.validPositions[O]===void 0&&(F.optionality===!1||F.optionality===void 0||F.optionality&&F.newBlockMarker==0)&&(F.optionalQuantifier===!1||F.optionalQuantifier===void 0)||F.static===!0&&F.def!=""&&g[O]!==h.getPlaceholder.call(S,O,F)){b=!1;break}}}return b}}function C(g){var S=this.opts.insertMode?0:1;return this.isRTL?g.begin-g.end>S:g.end-g.begin>S}function y(g,S,w,E,b,T,M){var O=this,F=this.dependencyLib,z=this.opts,$=O.maskset;w=w===!0;var H=g;function V(B){if(B!==void 0){if(B.remove!==void 0&&(Array.isArray(B.remove)||(B.remove=[B.remove]),B.remove.sort((function(K,U){return O.isRTL?K.pos-U.pos:U.pos-K.pos})).forEach((function(K){x.call(O,{begin:K,end:K+1})})),B.remove=void 0),B.insert!==void 0&&(Array.isArray(B.insert)||(B.insert=[B.insert]),B.insert.sort((function(K,U){return O.isRTL?U.pos-K.pos:K.pos-U.pos})).forEach((function(K){K.c!==""&&y.call(O,K.pos,K.c,K.strict===void 0||K.strict,K.fromIsValid!==void 0?K.fromIsValid:E)})),B.insert=void 0),B.refreshFromBuffer&&B.buffer){var Z=B.refreshFromBuffer;R.call(O,Z===!0?Z:Z.start,Z.end,B.buffer),B.refreshFromBuffer=void 0}B.rewritePosition!==void 0&&(H=B.rewritePosition,B=!0)}return B}function G(B,Z,K){var U=!1;return h.getTests.call(O,B).every((function(le,re){var te=le.match;if(p.getBuffer.call(O,!0),(U=(!te.jit||$.validPositions[p.seekPrevious.call(O,B)]!==void 0)&&(te.fn!=null?te.fn.test(Z,$,B,K,z,C.call(O,g)):(Z===te.def||Z===z.skipOptionalPartCharacter)&&te.def!==""&&{c:h.getPlaceholder.call(O,B,te,!0)||te.def,pos:B}))!==!1){var fe=U.c!==void 0?U.c:Z,we=B;return fe=fe===z.skipOptionalPartCharacter&&te.static===!0?h.getPlaceholder.call(O,B,te,!0)||te.def:fe,(U=V(U))!==!0&&U.pos!==void 0&&U.pos!==B&&(we=U.pos),U!==!0&&U.pos===void 0&&U.c===void 0||x.call(O,g,F.extend({},le,{input:_.call(O,fe,te,we)}),E,we)===!1&&(U=!1),!1}return!0})),U}g.begin!==void 0&&(H=O.isRTL?g.end:g.begin);var D=!0,P=F.extend(!0,[],$.validPositions);if(z.keepStatic===!1&&$.excludes[H]!==void 0&&b!==!0&&E!==!0)for(var I=H;I<(O.isRTL?g.begin:g.end);I++)$.excludes[I]!==void 0&&($.excludes[I]=void 0,delete $.tests[I]);if(typeof z.preValidation=="function"&&E!==!0&&T!==!0&&(D=V(D=z.preValidation.call(O,p.getBuffer.call(O),H,S,C.call(O,g),z,$,g,w||b))),D===!0){if(D=G(H,S,w),(!w||E===!0)&&D===!1&&T!==!0){var N=$.validPositions[H];if(!N||N.match.static!==!0||N.match.def!==S&&S!==z.skipOptionalPartCharacter){if(z.insertMode||$.validPositions[p.seekNext.call(O,H)]===void 0||g.end>H){var Y=!1;if($.jitOffset[H]&&$.validPositions[p.seekNext.call(O,H)]===void 0&&(D=y.call(O,H+$.jitOffset[H],S,!0,!0))!==!1&&(b!==!0&&(D.caret=H),Y=!0),g.end>H&&($.validPositions[H]=void 0),!Y&&!p.isMask.call(O,H,z.keepStatic&&H===0)){for(var X=H+1,ne=p.seekNext.call(O,H,!1,H!==0);X<=ne;X++)if((D=G(X,S,w))!==!1){D=m.call(O,H,D.pos!==void 0?D.pos:X)||D,H=X;break}}}}else D={caret:p.seekNext.call(O,H)}}O.hasAlternator&&b!==!0&&!w&&(b=!0,D===!1&&z.keepStatic&&(k.call(O,p.getBuffer.call(O))||H===0)?D=f.call(O,H,S,w,E,void 0,g):(C.call(O,g)&&$.tests[H]&&$.tests[H].length>1&&z.keepStatic||D==1&&z.numericInput!==!0&&$.tests[H]&&$.tests[H].length>1&&p.getLastValidPosition.call(O,void 0,!0)>H)&&(D=f.call(O,!0))),D===!0&&(D={pos:H})}if(typeof z.postValidation=="function"&&E!==!0&&T!==!0){var se=z.postValidation.call(O,p.getBuffer.call(O,!0),g.begin!==void 0?O.isRTL?g.end:g.begin:g,S,D,z,$,w,M);se!==void 0&&(D=se===!0?D:se)}D&&D.pos===void 0&&(D.pos=H),D===!1||T===!0?(p.resetMaskSet.call(O,!0),$.validPositions=F.extend(!0,[],P)):m.call(O,void 0,H,!0);var W=V(D);return O.maxLength!==void 0&&p.getBuffer.call(O).length>O.maxLength&&!E&&(p.resetMaskSet.call(O,!0),$.validPositions=F.extend(!0,[],P),W=!1),W}function v(g,S,w){for(var E=this.maskset,b=!1,T=h.getTests.call(this,g),M=0;M<T.length;M++){if(T[M].match&&(T[M].match.nativeDef===S.match[w.shiftPositions?"def":"nativeDef"]&&(!w.shiftPositions||!S.match.static)||T[M].match.nativeDef===S.match.nativeDef||w.regex&&!T[M].match.static&&T[M].match.fn.test(S.input,E,g,!1,w))){b=!0;break}if(T[M].match&&T[M].match.def===S.match.nativeDef){b=void 0;break}}return b===!1&&E.jitOffset[g]!==void 0&&(b=v.call(this,g+E.jitOffset[g],S,w)),b}function R(g,S,w){var E,b,T=this,M=this.maskset,O=this.opts,F=this.dependencyLib,z=O.skipOptionalPartCharacter,$=T.isRTL?w.slice().reverse():w;if(O.skipOptionalPartCharacter="",g===!0)p.resetMaskSet.call(T,!1),g=0,S=w.length,b=p.determineNewCaretPosition.call(T,{begin:0,end:0},!1).begin;else{for(E=g;E<S;E++)M.validPositions.splice(g,0);b=g}var H=new F.Event("keypress");for(E=g;E<S;E++){H.key=$[E].toString(),T.ignorable=!1;var V=c.EventHandlers.keypressEvent.call(T,H,!0,!1,!1,b);V!==!1&&V!==void 0&&(b=V.forwardPosition)}O.skipOptionalPartCharacter=z}function m(g,S,w){var E=this,b=this.maskset,T=this.dependencyLib;if(g===void 0)for(g=S-1;g>0&&!b.validPositions[g];g--);for(var M=g;M<S;M++)if(b.validPositions[M]===void 0&&!p.isMask.call(E,M,!1)&&(M==0?h.getTest.call(E,M):b.validPositions[M-1])){var O=h.getTests.call(E,M).slice();O[O.length-1].match.def===""&&O.pop();var F,z=h.determineTestTemplate.call(E,M,O);if(z&&(z.match.jit!==!0||z.match.newBlockMarker==="master"&&(F=b.validPositions[M+1])&&F.match.optionalQuantifier===!0)&&((z=T.extend({},z,{input:h.getPlaceholder.call(E,M,z.match,!0)||z.match.def})).generatedInput=!0,x.call(E,M,z,!0),w!==!0)){var $=b.validPositions[S].input;return b.validPositions[S]=void 0,y.call(E,S,$,!0,!0)}}}function x(g,S,w,E){var b=this,T=this.maskset,M=this.opts,O=this.dependencyLib;function F(W,B,Z){var K=B[W];if(K!==void 0&&K.match.static===!0&&K.match.optionality!==!0&&(B[0]===void 0||B[0].alternation===void 0)){var U=Z.begin<=W-1?B[W-1]&&B[W-1].match.static===!0&&B[W-1]:B[W-1],le=Z.end>W+1?B[W+1]&&B[W+1].match.static===!0&&B[W+1]:B[W+1];return U&&le}return!1}var z=0,$=g.begin!==void 0?g.begin:g,H=g.end!==void 0?g.end:g,V=!0;if(g.begin>g.end&&($=g.end,H=g.begin),E=E!==void 0?E:$,w===void 0&&($!==H||M.insertMode&&T.validPositions[E]!==void 0||S===void 0||S.match.optionalQuantifier||S.match.optionality)){var G,D=O.extend(!0,[],T.validPositions),P=p.getLastValidPosition.call(b,void 0,!0);T.p=$;var I=C.call(b,g)?$:E;for(G=P;G>=I;G--)T.validPositions.splice(G,1),S===void 0&&delete T.tests[G+1];var N,Y,X=E,ne=X;for(S&&(T.validPositions[E]=O.extend(!0,{},S),ne++,X++),D[H]==null&&T.jitOffset[H]&&(H+=T.jitOffset[H]+1),G=S?H:H-1;G<=P;G++){if((N=D[G])!==void 0&&N.generatedInput!==!0&&(G>=H||G>=$&&F(G,D,{begin:$,end:H}))){for(;h.getTest.call(b,ne).match.def!=="";){if((Y=v.call(b,ne,N,M))!==!1||N.match.def==="+"){N.match.def==="+"&&p.getBuffer.call(b,!0);var se=y.call(b,ne,N.input,N.match.def!=="+",!0);if(V=se!==!1,X=(se.pos||ne)+1,!V&&Y)break}else V=!1;if(V){S===void 0&&N.match.static&&G===g.begin&&z++;break}if(!V&&p.getBuffer.call(b),ne>T.maskLength)break;ne++}h.getTest.call(b,ne).match.def==""&&(V=!1),ne=X}if(!V)break}if(!V)return T.validPositions=O.extend(!0,[],D),p.resetMaskSet.call(b,!0),!1}else S&&h.getTest.call(b,E).match.cd===S.match.cd&&(T.validPositions[E]=O.extend(!0,{},S));return p.resetMaskSet.call(b,!0),z}}},i={};function r(a){var o=i[a];if(o!==void 0)return o.exports;var u=i[a]={exports:{}};return t[a](u,u.exports,r),u.exports}var s={};return(function(){var a=s;Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(7149),r(3194),r(9302),r(4013),r(3851),r(219),r(207),r(5296);var o,u=(o=r(2394))&&o.__esModule?o:{default:o};a.default=u.default})(),s})()}))})(vn)),vn.exports}var Ad=Pd();const Fd=ka(Ad);//! moment.js
17
- //! version : 2.30.1
18
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
19
- //! license : MIT
20
- //! momentjs.com
21
- var Mo;function pe(){return Mo.apply(null,arguments)}function Bd(n){Mo=n}function Rt(n){return n instanceof Array||Object.prototype.toString.call(n)==="[object Array]"}function oi(n){return n!=null&&Object.prototype.toString.call(n)==="[object Object]"}function je(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function ss(n){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(n).length===0;var e;for(e in n)if(je(n,e))return!1;return!0}function ct(n){return n===void 0}function It(n){return typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]"}function zi(n){return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}function Ro(n,e){var t=[],i,r=n.length;for(i=0;i<r;++i)t.push(e(n[i],i));return t}function Qt(n,e){for(var t in e)je(e,t)&&(n[t]=e[t]);return je(e,"toString")&&(n.toString=e.toString),je(e,"valueOf")&&(n.valueOf=e.valueOf),n}function Lt(n,e,t,i){return tl(n,e,t,i,!0).utc()}function Nd(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Oe(n){return n._pf==null&&(n._pf=Nd()),n._pf}var as;Array.prototype.some?as=Array.prototype.some:as=function(n){var e=Object(this),t=e.length>>>0,i;for(i=0;i<t;i++)if(i in e&&n.call(this,e[i],i,e))return!0;return!1};function os(n){var e=null,t=!1,i=n._d&&!isNaN(n._d.getTime());if(i&&(e=Oe(n),t=as.call(e.parsedDateParts,function(r){return r!=null}),i=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&t),n._strict&&(i=i&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(n))n._isValid=i;else return i;return n._isValid}function yn(n){var e=Lt(NaN);return n!=null?Qt(Oe(e),n):Oe(e).userInvalidated=!0,e}var To=pe.momentProperties=[],ls=!1;function us(n,e){var t,i,r,s=To.length;if(ct(e._isAMomentObject)||(n._isAMomentObject=e._isAMomentObject),ct(e._i)||(n._i=e._i),ct(e._f)||(n._f=e._f),ct(e._l)||(n._l=e._l),ct(e._strict)||(n._strict=e._strict),ct(e._tzm)||(n._tzm=e._tzm),ct(e._isUTC)||(n._isUTC=e._isUTC),ct(e._offset)||(n._offset=e._offset),ct(e._pf)||(n._pf=Oe(e)),ct(e._locale)||(n._locale=e._locale),s>0)for(t=0;t<s;t++)i=To[t],r=e[i],ct(r)||(n[i]=r);return n}function Ii(n){us(this,n),this._d=new Date(n._d!=null?n._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),ls===!1&&(ls=!0,pe.updateOffset(this),ls=!1)}function Tt(n){return n instanceof Ii||n!=null&&n._isAMomentObject!=null}function Do(n){pe.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+n)}function wt(n,e){var t=!0;return Qt(function(){if(pe.deprecationHandler!=null&&pe.deprecationHandler(null,n),t){var i=[],r,s,a,o=arguments.length;for(s=0;s<o;s++){if(r="",typeof arguments[s]=="object"){r+=`
22
- [`+s+"] ";for(a in arguments[0])je(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[s];i.push(r)}Do(n+`
23
- Arguments: `+Array.prototype.slice.call(i).join("")+`
24
- `+new Error().stack),t=!1}return e.apply(this,arguments)},e)}var Oo={};function Lo(n,e){pe.deprecationHandler!=null&&pe.deprecationHandler(n,e),Oo[n]||(Do(e),Oo[n]=!0)}pe.suppressDeprecationWarnings=!1,pe.deprecationHandler=null;function Pt(n){return typeof Function<"u"&&n instanceof Function||Object.prototype.toString.call(n)==="[object Function]"}function Vd(n){var e,t;for(t in n)je(n,t)&&(e=n[t],Pt(e)?this[t]=e:this["_"+t]=e);this._config=n,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function cs(n,e){var t=Qt({},n),i;for(i in e)je(e,i)&&(oi(n[i])&&oi(e[i])?(t[i]={},Qt(t[i],n[i]),Qt(t[i],e[i])):e[i]!=null?t[i]=e[i]:delete t[i]);for(i in n)je(n,i)&&!je(e,i)&&oi(n[i])&&(t[i]=Qt({},t[i]));return t}function ds(n){n!=null&&this.set(n)}var hs;Object.keys?hs=Object.keys:hs=function(n){var e,t=[];for(e in n)je(n,e)&&t.push(e);return t};var Hd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function zd(n,e,t){var i=this._calendar[n]||this._calendar.sameElse;return Pt(i)?i.call(e,t):i}function At(n,e,t){var i=""+Math.abs(n),r=e-i.length,s=n>=0;return(s?t?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var fs=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,wn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ps={},yi={};function Ee(n,e,t,i){var r=i;typeof i=="string"&&(r=function(){return this[i]()}),n&&(yi[n]=r),e&&(yi[e[0]]=function(){return At(r.apply(this,arguments),e[1],e[2])}),t&&(yi[t]=function(){return this.localeData().ordinal(r.apply(this,arguments),n)})}function Id(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function $d(n){var e=n.match(fs),t,i;for(t=0,i=e.length;t<i;t++)yi[e[t]]?e[t]=yi[e[t]]:e[t]=Id(e[t]);return function(r){var s="",a;for(a=0;a<i;a++)s+=Pt(e[a])?e[a].call(r,n):e[a];return s}}function Cn(n,e){return n.isValid()?(e=Po(e,n.localeData()),ps[e]=ps[e]||$d(e),ps[e](n)):n.localeData().invalidDate()}function Po(n,e){var t=5;function i(r){return e.longDateFormat(r)||r}for(wn.lastIndex=0;t>=0&&wn.test(n);)n=n.replace(wn,i),wn.lastIndex=0,t-=1;return n}var jd={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Wd(n){var e=this._longDateFormat[n],t=this._longDateFormat[n.toUpperCase()];return e||!t?e:(this._longDateFormat[n]=t.match(fs).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[n])}var Gd="Invalid date";function Yd(){return this._invalidDate}var Ud="%d",qd=/\d{1,2}/;function Kd(n){return this._ordinal.replace("%d",n)}var Jd={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Xd(n,e,t,i){var r=this._relativeTime[t];return Pt(r)?r(n,e,t,i):r.replace(/%d/i,n)}function Zd(n,e){var t=this._relativeTime[n>0?"future":"past"];return Pt(t)?t(e):t.replace(/%s/i,e)}var Ao={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ct(n){return typeof n=="string"?Ao[n]||Ao[n.toLowerCase()]:void 0}function ms(n){var e={},t,i;for(i in n)je(n,i)&&(t=Ct(i),t&&(e[t]=n[i]));return e}var Qd={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function eh(n){var e=[],t;for(t in n)je(n,t)&&e.push({unit:t,priority:Qd[t]});return e.sort(function(i,r){return i.priority-r.priority}),e}var Fo=/\d/,gt=/\d\d/,Bo=/\d{3}/,gs=/\d{4}/,En=/[+-]?\d{6}/,Je=/\d\d?/,No=/\d\d\d\d?/,Vo=/\d\d\d\d\d\d?/,kn=/\d{1,3}/,bs=/\d{1,4}/,Sn=/[+-]?\d{1,6}/,wi=/\d+/,xn=/[+-]?\d+/,th=/Z|[+-]\d\d:?\d\d/gi,_n=/Z|[+-]\d\d(?::?\d\d)?/gi,ih=/[+-]?\d+(\.\d{1,3})?/,$i=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ci=/^[1-9]\d?/,vs=/^([1-9]\d|\d)/,Mn;Mn={};function ge(n,e,t){Mn[n]=Pt(e)?e:function(i,r){return i&&t?t:e}}function nh(n,e){return je(Mn,n)?Mn[n](e._strict,e._locale):new RegExp(rh(n))}function rh(n){return $t(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,r,s){return t||i||r||s}))}function $t(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Et(n){return n<0?Math.ceil(n)||0:Math.floor(n)}function He(n){var e=+n,t=0;return e!==0&&isFinite(e)&&(t=Et(e)),t}var ys={};function qe(n,e){var t,i=e,r;for(typeof n=="string"&&(n=[n]),It(e)&&(i=function(s,a){a[e]=He(s)}),r=n.length,t=0;t<r;t++)ys[n[t]]=i}function ji(n,e){qe(n,function(t,i,r,s){r._w=r._w||{},e(t,r._w,r,s)})}function sh(n,e,t){e!=null&&je(ys,n)&&ys[n](e,t._a,t,n)}function Rn(n){return n%4===0&&n%100!==0||n%400===0}var st=0,jt=1,Ft=2,nt=3,Dt=4,Wt=5,li=6,ah=7,oh=8;Ee("Y",0,0,function(){var n=this.year();return n<=9999?At(n,4):"+"+n}),Ee(0,["YY",2],0,function(){return this.year()%100}),Ee(0,["YYYY",4],0,"year"),Ee(0,["YYYYY",5],0,"year"),Ee(0,["YYYYYY",6,!0],0,"year"),ge("Y",xn),ge("YY",Je,gt),ge("YYYY",bs,gs),ge("YYYYY",Sn,En),ge("YYYYYY",Sn,En),qe(["YYYYY","YYYYYY"],st),qe("YYYY",function(n,e){e[st]=n.length===2?pe.parseTwoDigitYear(n):He(n)}),qe("YY",function(n,e){e[st]=pe.parseTwoDigitYear(n)}),qe("Y",function(n,e){e[st]=parseInt(n,10)});function Wi(n){return Rn(n)?366:365}pe.parseTwoDigitYear=function(n){return He(n)+(He(n)>68?1900:2e3)};var Ho=Ei("FullYear",!0);function lh(){return Rn(this.year())}function Ei(n,e){return function(t){return t!=null?(zo(this,n,t),pe.updateOffset(this,e),this):Gi(this,n)}}function Gi(n,e){if(!n.isValid())return NaN;var t=n._d,i=n._isUTC;switch(e){case"Milliseconds":return i?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return i?t.getUTCSeconds():t.getSeconds();case"Minutes":return i?t.getUTCMinutes():t.getMinutes();case"Hours":return i?t.getUTCHours():t.getHours();case"Date":return i?t.getUTCDate():t.getDate();case"Day":return i?t.getUTCDay():t.getDay();case"Month":return i?t.getUTCMonth():t.getMonth();case"FullYear":return i?t.getUTCFullYear():t.getFullYear();default:return NaN}}function zo(n,e,t){var i,r,s,a,o;if(!(!n.isValid()||isNaN(t))){switch(i=n._d,r=n._isUTC,e){case"Milliseconds":return void(r?i.setUTCMilliseconds(t):i.setMilliseconds(t));case"Seconds":return void(r?i.setUTCSeconds(t):i.setSeconds(t));case"Minutes":return void(r?i.setUTCMinutes(t):i.setMinutes(t));case"Hours":return void(r?i.setUTCHours(t):i.setHours(t));case"Date":return void(r?i.setUTCDate(t):i.setDate(t));case"FullYear":break;default:return}s=t,a=n.month(),o=n.date(),o=o===29&&a===1&&!Rn(s)?28:o,r?i.setUTCFullYear(s,a,o):i.setFullYear(s,a,o)}}function uh(n){return n=Ct(n),Pt(this[n])?this[n]():this}function ch(n,e){if(typeof n=="object"){n=ms(n);var t=eh(n),i,r=t.length;for(i=0;i<r;i++)this[t[i].unit](n[t[i].unit])}else if(n=Ct(n),Pt(this[n]))return this[n](e);return this}function dh(n,e){return(n%e+e)%e}var tt;Array.prototype.indexOf?tt=Array.prototype.indexOf:tt=function(n){var e;for(e=0;e<this.length;++e)if(this[e]===n)return e;return-1};function ws(n,e){if(isNaN(n)||isNaN(e))return NaN;var t=dh(e,12);return n+=(e-t)/12,t===1?Rn(n)?29:28:31-t%7%2}Ee("M",["MM",2],"Mo",function(){return this.month()+1}),Ee("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)}),Ee("MMMM",0,0,function(n){return this.localeData().months(this,n)}),ge("M",Je,Ci),ge("MM",Je,gt),ge("MMM",function(n,e){return e.monthsShortRegex(n)}),ge("MMMM",function(n,e){return e.monthsRegex(n)}),qe(["M","MM"],function(n,e){e[jt]=He(n)-1}),qe(["MMM","MMMM"],function(n,e,t,i){var r=t._locale.monthsParse(n,i,t._strict);r!=null?e[jt]=r:Oe(t).invalidMonth=n});var hh="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Io="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),$o=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,fh=$i,ph=$i;function mh(n,e){return n?Rt(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||$o).test(e)?"format":"standalone"][n.month()]:Rt(this._months)?this._months:this._months.standalone}function gh(n,e){return n?Rt(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[$o.test(e)?"format":"standalone"][n.month()]:Rt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function bh(n,e,t){var i,r,s,a=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)s=Lt([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(s,"").toLocaleLowerCase();return t?e==="MMM"?(r=tt.call(this._shortMonthsParse,a),r!==-1?r:null):(r=tt.call(this._longMonthsParse,a),r!==-1?r:null):e==="MMM"?(r=tt.call(this._shortMonthsParse,a),r!==-1?r:(r=tt.call(this._longMonthsParse,a),r!==-1?r:null)):(r=tt.call(this._longMonthsParse,a),r!==-1?r:(r=tt.call(this._shortMonthsParse,a),r!==-1?r:null))}function vh(n,e,t){var i,r,s;if(this._monthsParseExact)return bh.call(this,n,e,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=Lt([2e3,i]),t&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),!t&&!this._monthsParse[i]&&(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),t&&e==="MMMM"&&this._longMonthsParse[i].test(n))return i;if(t&&e==="MMM"&&this._shortMonthsParse[i].test(n))return i;if(!t&&this._monthsParse[i].test(n))return i}}function jo(n,e){if(!n.isValid())return n;if(typeof e=="string"){if(/^\d+$/.test(e))e=He(e);else if(e=n.localeData().monthsParse(e),!It(e))return n}var t=e,i=n.date();return i=i<29?i:Math.min(i,ws(n.year(),t)),n._isUTC?n._d.setUTCMonth(t,i):n._d.setMonth(t,i),n}function Wo(n){return n!=null?(jo(this,n),pe.updateOffset(this,!0),this):Gi(this,"Month")}function yh(){return ws(this.year(),this.month())}function wh(n){return this._monthsParseExact?(je(this,"_monthsRegex")||Go.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):(je(this,"_monthsShortRegex")||(this._monthsShortRegex=fh),this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ch(n){return this._monthsParseExact?(je(this,"_monthsRegex")||Go.call(this),n?this._monthsStrictRegex:this._monthsRegex):(je(this,"_monthsRegex")||(this._monthsRegex=ph),this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex)}function Go(){function n(u,c){return c.length-u.length}var e=[],t=[],i=[],r,s,a,o;for(r=0;r<12;r++)s=Lt([2e3,r]),a=$t(this.monthsShort(s,"")),o=$t(this.months(s,"")),e.push(a),t.push(o),i.push(o),i.push(a);e.sort(n),t.sort(n),i.sort(n),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function Eh(n,e,t,i,r,s,a){var o;return n<100&&n>=0?(o=new Date(n+400,e,t,i,r,s,a),isFinite(o.getFullYear())&&o.setFullYear(n)):o=new Date(n,e,t,i,r,s,a),o}function Yi(n){var e,t;return n<100&&n>=0?(t=Array.prototype.slice.call(arguments),t[0]=n+400,e=new Date(Date.UTC.apply(null,t)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(n)):e=new Date(Date.UTC.apply(null,arguments)),e}function Tn(n,e,t){var i=7+e-t,r=(7+Yi(n,0,i).getUTCDay()-e)%7;return-r+i-1}function Yo(n,e,t,i,r){var s=(7+t-i)%7,a=Tn(n,i,r),o=1+7*(e-1)+s+a,u,c;return o<=0?(u=n-1,c=Wi(u)+o):o>Wi(n)?(u=n+1,c=o-Wi(n)):(u=n,c=o),{year:u,dayOfYear:c}}function Ui(n,e,t){var i=Tn(n.year(),e,t),r=Math.floor((n.dayOfYear()-i-1)/7)+1,s,a;return r<1?(a=n.year()-1,s=r+Gt(a,e,t)):r>Gt(n.year(),e,t)?(s=r-Gt(n.year(),e,t),a=n.year()+1):(a=n.year(),s=r),{week:s,year:a}}function Gt(n,e,t){var i=Tn(n,e,t),r=Tn(n+1,e,t);return(Wi(n)-i+r)/7}Ee("w",["ww",2],"wo","week"),Ee("W",["WW",2],"Wo","isoWeek"),ge("w",Je,Ci),ge("ww",Je,gt),ge("W",Je,Ci),ge("WW",Je,gt),ji(["w","ww","W","WW"],function(n,e,t,i){e[i.substr(0,1)]=He(n)});function kh(n){return Ui(n,this._week.dow,this._week.doy).week}var Sh={dow:0,doy:6};function xh(){return this._week.dow}function _h(){return this._week.doy}function Mh(n){var e=this.localeData().week(this);return n==null?e:this.add((n-e)*7,"d")}function Rh(n){var e=Ui(this,1,4).week;return n==null?e:this.add((n-e)*7,"d")}Ee("d",0,"do","day"),Ee("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)}),Ee("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)}),Ee("dddd",0,0,function(n){return this.localeData().weekdays(this,n)}),Ee("e",0,0,"weekday"),Ee("E",0,0,"isoWeekday"),ge("d",Je),ge("e",Je),ge("E",Je),ge("dd",function(n,e){return e.weekdaysMinRegex(n)}),ge("ddd",function(n,e){return e.weekdaysShortRegex(n)}),ge("dddd",function(n,e){return e.weekdaysRegex(n)}),ji(["dd","ddd","dddd"],function(n,e,t,i){var r=t._locale.weekdaysParse(n,i,t._strict);r!=null?e.d=r:Oe(t).invalidWeekday=n}),ji(["d","e","E"],function(n,e,t,i){e[i]=He(n)});function Th(n,e){return typeof n!="string"?n:isNaN(n)?(n=e.weekdaysParse(n),typeof n=="number"?n:null):parseInt(n,10)}function Dh(n,e){return typeof n=="string"?e.weekdaysParse(n)%7||7:isNaN(n)?null:n}function Cs(n,e){return n.slice(e,7).concat(n.slice(0,e))}var Oh="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Uo="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Lh="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ph=$i,Ah=$i,Fh=$i;function Bh(n,e){var t=Rt(this._weekdays)?this._weekdays:this._weekdays[n&&n!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return n===!0?Cs(t,this._week.dow):n?t[n.day()]:t}function Nh(n){return n===!0?Cs(this._weekdaysShort,this._week.dow):n?this._weekdaysShort[n.day()]:this._weekdaysShort}function Vh(n){return n===!0?Cs(this._weekdaysMin,this._week.dow):n?this._weekdaysMin[n.day()]:this._weekdaysMin}function Hh(n,e,t){var i,r,s,a=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)s=Lt([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(s,"").toLocaleLowerCase();return t?e==="dddd"?(r=tt.call(this._weekdaysParse,a),r!==-1?r:null):e==="ddd"?(r=tt.call(this._shortWeekdaysParse,a),r!==-1?r:null):(r=tt.call(this._minWeekdaysParse,a),r!==-1?r:null):e==="dddd"?(r=tt.call(this._weekdaysParse,a),r!==-1||(r=tt.call(this._shortWeekdaysParse,a),r!==-1)?r:(r=tt.call(this._minWeekdaysParse,a),r!==-1?r:null)):e==="ddd"?(r=tt.call(this._shortWeekdaysParse,a),r!==-1||(r=tt.call(this._weekdaysParse,a),r!==-1)?r:(r=tt.call(this._minWeekdaysParse,a),r!==-1?r:null)):(r=tt.call(this._minWeekdaysParse,a),r!==-1||(r=tt.call(this._weekdaysParse,a),r!==-1)?r:(r=tt.call(this._shortWeekdaysParse,a),r!==-1?r:null))}function zh(n,e,t){var i,r,s;if(this._weekdaysParseExact)return Hh.call(this,n,e,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=Lt([2e3,1]).day(i),t&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(s.replace(".",""),"i")),t&&e==="dddd"&&this._fullWeekdaysParse[i].test(n))return i;if(t&&e==="ddd"&&this._shortWeekdaysParse[i].test(n))return i;if(t&&e==="dd"&&this._minWeekdaysParse[i].test(n))return i;if(!t&&this._weekdaysParse[i].test(n))return i}}function Ih(n){if(!this.isValid())return n!=null?this:NaN;var e=Gi(this,"Day");return n!=null?(n=Th(n,this.localeData()),this.add(n-e,"d")):e}function $h(n){if(!this.isValid())return n!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return n==null?e:this.add(n-e,"d")}function jh(n){if(!this.isValid())return n!=null?this:NaN;if(n!=null){var e=Dh(n,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function Wh(n){return this._weekdaysParseExact?(je(this,"_weekdaysRegex")||Es.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):(je(this,"_weekdaysRegex")||(this._weekdaysRegex=Ph),this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex)}function Gh(n){return this._weekdaysParseExact?(je(this,"_weekdaysRegex")||Es.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(je(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ah),this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Yh(n){return this._weekdaysParseExact?(je(this,"_weekdaysRegex")||Es.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(je(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Fh),this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Es(){function n(d,p){return p.length-d.length}var e=[],t=[],i=[],r=[],s,a,o,u,c;for(s=0;s<7;s++)a=Lt([2e3,1]).day(s),o=$t(this.weekdaysMin(a,"")),u=$t(this.weekdaysShort(a,"")),c=$t(this.weekdays(a,"")),e.push(o),t.push(u),i.push(c),r.push(o),r.push(u),r.push(c);e.sort(n),t.sort(n),i.sort(n),r.sort(n),this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function ks(){return this.hours()%12||12}function Uh(){return this.hours()||24}Ee("H",["HH",2],0,"hour"),Ee("h",["hh",2],0,ks),Ee("k",["kk",2],0,Uh),Ee("hmm",0,0,function(){return""+ks.apply(this)+At(this.minutes(),2)}),Ee("hmmss",0,0,function(){return""+ks.apply(this)+At(this.minutes(),2)+At(this.seconds(),2)}),Ee("Hmm",0,0,function(){return""+this.hours()+At(this.minutes(),2)}),Ee("Hmmss",0,0,function(){return""+this.hours()+At(this.minutes(),2)+At(this.seconds(),2)});function qo(n,e){Ee(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}qo("a",!0),qo("A",!1);function Ko(n,e){return e._meridiemParse}ge("a",Ko),ge("A",Ko),ge("H",Je,vs),ge("h",Je,Ci),ge("k",Je,Ci),ge("HH",Je,gt),ge("hh",Je,gt),ge("kk",Je,gt),ge("hmm",No),ge("hmmss",Vo),ge("Hmm",No),ge("Hmmss",Vo),qe(["H","HH"],nt),qe(["k","kk"],function(n,e,t){var i=He(n);e[nt]=i===24?0:i}),qe(["a","A"],function(n,e,t){t._isPm=t._locale.isPM(n),t._meridiem=n}),qe(["h","hh"],function(n,e,t){e[nt]=He(n),Oe(t).bigHour=!0}),qe("hmm",function(n,e,t){var i=n.length-2;e[nt]=He(n.substr(0,i)),e[Dt]=He(n.substr(i)),Oe(t).bigHour=!0}),qe("hmmss",function(n,e,t){var i=n.length-4,r=n.length-2;e[nt]=He(n.substr(0,i)),e[Dt]=He(n.substr(i,2)),e[Wt]=He(n.substr(r)),Oe(t).bigHour=!0}),qe("Hmm",function(n,e,t){var i=n.length-2;e[nt]=He(n.substr(0,i)),e[Dt]=He(n.substr(i))}),qe("Hmmss",function(n,e,t){var i=n.length-4,r=n.length-2;e[nt]=He(n.substr(0,i)),e[Dt]=He(n.substr(i,2)),e[Wt]=He(n.substr(r))});function qh(n){return(n+"").toLowerCase().charAt(0)==="p"}var Kh=/[ap]\.?m?\.?/i,Jh=Ei("Hours",!0);function Xh(n,e,t){return n>11?t?"pm":"PM":t?"am":"AM"}var Jo={calendar:Hd,longDateFormat:jd,invalidDate:Gd,ordinal:Ud,dayOfMonthOrdinalParse:qd,relativeTime:Jd,months:hh,monthsShort:Io,week:Sh,weekdays:Oh,weekdaysMin:Lh,weekdaysShort:Uo,meridiemParse:Kh},Ze={},qi={},Ki;function Zh(n,e){var t,i=Math.min(n.length,e.length);for(t=0;t<i;t+=1)if(n[t]!==e[t])return t;return i}function Xo(n){return n&&n.toLowerCase().replace("_","-")}function Qh(n){for(var e=0,t,i,r,s;e<n.length;){for(s=Xo(n[e]).split("-"),t=s.length,i=Xo(n[e+1]),i=i?i.split("-"):null;t>0;){if(r=Dn(s.slice(0,t).join("-")),r)return r;if(i&&i.length>=t&&Zh(s,i)>=t-1)break;t--}e++}return Ki}function ef(n){return!!(n&&n.match("^[^/\\\\]*$"))}function Dn(n){var e=null,t;if(Ze[n]===void 0&&typeof module<"u"&&module&&module.exports&&ef(n))try{e=Ki._abbr,t=require,t("./locale/"+n),ei(e)}catch{Ze[n]=null}return Ze[n]}function ei(n,e){var t;return n&&(ct(e)?t=Yt(n):t=Ss(n,e),t?Ki=t:typeof console<"u"&&console.warn&&console.warn("Locale "+n+" not found. Did you forget to load it?")),Ki._abbr}function Ss(n,e){if(e!==null){var t,i=Jo;if(e.abbr=n,Ze[n]!=null)Lo("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Ze[n]._config;else if(e.parentLocale!=null)if(Ze[e.parentLocale]!=null)i=Ze[e.parentLocale]._config;else if(t=Dn(e.parentLocale),t!=null)i=t._config;else return qi[e.parentLocale]||(qi[e.parentLocale]=[]),qi[e.parentLocale].push({name:n,config:e}),null;return Ze[n]=new ds(cs(i,e)),qi[n]&&qi[n].forEach(function(r){Ss(r.name,r.config)}),ei(n),Ze[n]}else return delete Ze[n],null}function tf(n,e){if(e!=null){var t,i,r=Jo;Ze[n]!=null&&Ze[n].parentLocale!=null?Ze[n].set(cs(Ze[n]._config,e)):(i=Dn(n),i!=null&&(r=i._config),e=cs(r,e),i==null&&(e.abbr=n),t=new ds(e),t.parentLocale=Ze[n],Ze[n]=t),ei(n)}else Ze[n]!=null&&(Ze[n].parentLocale!=null?(Ze[n]=Ze[n].parentLocale,n===ei()&&ei(n)):Ze[n]!=null&&delete Ze[n]);return Ze[n]}function Yt(n){var e;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return Ki;if(!Rt(n)){if(e=Dn(n),e)return e;n=[n]}return Qh(n)}function nf(){return hs(Ze)}function xs(n){var e,t=n._a;return t&&Oe(n).overflow===-2&&(e=t[jt]<0||t[jt]>11?jt:t[Ft]<1||t[Ft]>ws(t[st],t[jt])?Ft:t[nt]<0||t[nt]>24||t[nt]===24&&(t[Dt]!==0||t[Wt]!==0||t[li]!==0)?nt:t[Dt]<0||t[Dt]>59?Dt:t[Wt]<0||t[Wt]>59?Wt:t[li]<0||t[li]>999?li:-1,Oe(n)._overflowDayOfYear&&(e<st||e>Ft)&&(e=Ft),Oe(n)._overflowWeeks&&e===-1&&(e=ah),Oe(n)._overflowWeekday&&e===-1&&(e=oh),Oe(n).overflow=e),n}var rf=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,sf=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,af=/Z|[+-]\d\d(?::?\d\d)?/,On=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_s=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],of=/^\/?Date\((-?\d+)/i,lf=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,uf={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Zo(n){var e,t,i=n._i,r=rf.exec(i)||sf.exec(i),s,a,o,u,c=On.length,d=_s.length;if(r){for(Oe(n).iso=!0,e=0,t=c;e<t;e++)if(On[e][1].exec(r[1])){a=On[e][0],s=On[e][2]!==!1;break}if(a==null){n._isValid=!1;return}if(r[3]){for(e=0,t=d;e<t;e++)if(_s[e][1].exec(r[3])){o=(r[2]||" ")+_s[e][0];break}if(o==null){n._isValid=!1;return}}if(!s&&o!=null){n._isValid=!1;return}if(r[4])if(af.exec(r[4]))u="Z";else{n._isValid=!1;return}n._f=a+(o||"")+(u||""),Rs(n)}else n._isValid=!1}function cf(n,e,t,i,r,s){var a=[df(n),Io.indexOf(e),parseInt(t,10),parseInt(i,10),parseInt(r,10)];return s&&a.push(parseInt(s,10)),a}function df(n){var e=parseInt(n,10);return e<=49?2e3+e:e<=999?1900+e:e}function hf(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function ff(n,e,t){if(n){var i=Uo.indexOf(n),r=new Date(e[0],e[1],e[2]).getDay();if(i!==r)return Oe(t).weekdayMismatch=!0,t._isValid=!1,!1}return!0}function pf(n,e,t){if(n)return uf[n];if(e)return 0;var i=parseInt(t,10),r=i%100,s=(i-r)/100;return s*60+r}function Qo(n){var e=lf.exec(hf(n._i)),t;if(e){if(t=cf(e[4],e[3],e[2],e[5],e[6],e[7]),!ff(e[1],t,n))return;n._a=t,n._tzm=pf(e[8],e[9],e[10]),n._d=Yi.apply(null,n._a),n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),Oe(n).rfc2822=!0}else n._isValid=!1}function mf(n){var e=of.exec(n._i);if(e!==null){n._d=new Date(+e[1]);return}if(Zo(n),n._isValid===!1)delete n._isValid;else return;if(Qo(n),n._isValid===!1)delete n._isValid;else return;n._strict?n._isValid=!1:pe.createFromInputFallback(n)}pe.createFromInputFallback=wt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});function ki(n,e,t){return n??e??t}function gf(n){var e=new Date(pe.now());return n._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Ms(n){var e,t,i=[],r,s,a;if(!n._d){for(r=gf(n),n._w&&n._a[Ft]==null&&n._a[jt]==null&&bf(n),n._dayOfYear!=null&&(a=ki(n._a[st],r[st]),(n._dayOfYear>Wi(a)||n._dayOfYear===0)&&(Oe(n)._overflowDayOfYear=!0),t=Yi(a,0,n._dayOfYear),n._a[jt]=t.getUTCMonth(),n._a[Ft]=t.getUTCDate()),e=0;e<3&&n._a[e]==null;++e)n._a[e]=i[e]=r[e];for(;e<7;e++)n._a[e]=i[e]=n._a[e]==null?e===2?1:0:n._a[e];n._a[nt]===24&&n._a[Dt]===0&&n._a[Wt]===0&&n._a[li]===0&&(n._nextDay=!0,n._a[nt]=0),n._d=(n._useUTC?Yi:Eh).apply(null,i),s=n._useUTC?n._d.getUTCDay():n._d.getDay(),n._tzm!=null&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),n._nextDay&&(n._a[nt]=24),n._w&&typeof n._w.d<"u"&&n._w.d!==s&&(Oe(n).weekdayMismatch=!0)}}function bf(n){var e,t,i,r,s,a,o,u,c;e=n._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,a=4,t=ki(e.GG,n._a[st],Ui(Xe(),1,4).year),i=ki(e.W,1),r=ki(e.E,1),(r<1||r>7)&&(u=!0)):(s=n._locale._week.dow,a=n._locale._week.doy,c=Ui(Xe(),s,a),t=ki(e.gg,n._a[st],c.year),i=ki(e.w,c.week),e.d!=null?(r=e.d,(r<0||r>6)&&(u=!0)):e.e!=null?(r=e.e+s,(e.e<0||e.e>6)&&(u=!0)):r=s),i<1||i>Gt(t,s,a)?Oe(n)._overflowWeeks=!0:u!=null?Oe(n)._overflowWeekday=!0:(o=Yo(t,i,r,s,a),n._a[st]=o.year,n._dayOfYear=o.dayOfYear)}pe.ISO_8601=function(){},pe.RFC_2822=function(){};function Rs(n){if(n._f===pe.ISO_8601){Zo(n);return}if(n._f===pe.RFC_2822){Qo(n);return}n._a=[],Oe(n).empty=!0;var e=""+n._i,t,i,r,s,a,o=e.length,u=0,c,d;for(r=Po(n._f,n._locale).match(fs)||[],d=r.length,t=0;t<d;t++)s=r[t],i=(e.match(nh(s,n))||[])[0],i&&(a=e.substr(0,e.indexOf(i)),a.length>0&&Oe(n).unusedInput.push(a),e=e.slice(e.indexOf(i)+i.length),u+=i.length),yi[s]?(i?Oe(n).empty=!1:Oe(n).unusedTokens.push(s),sh(s,i,n)):n._strict&&!i&&Oe(n).unusedTokens.push(s);Oe(n).charsLeftOver=o-u,e.length>0&&Oe(n).unusedInput.push(e),n._a[nt]<=12&&Oe(n).bigHour===!0&&n._a[nt]>0&&(Oe(n).bigHour=void 0),Oe(n).parsedDateParts=n._a.slice(0),Oe(n).meridiem=n._meridiem,n._a[nt]=vf(n._locale,n._a[nt],n._meridiem),c=Oe(n).era,c!==null&&(n._a[st]=n._locale.erasConvertYear(c,n._a[st])),Ms(n),xs(n)}function vf(n,e,t){var i;return t==null?e:n.meridiemHour!=null?n.meridiemHour(e,t):(n.isPM!=null&&(i=n.isPM(t),i&&e<12&&(e+=12),!i&&e===12&&(e=0)),e)}function yf(n){var e,t,i,r,s,a,o=!1,u=n._f.length;if(u===0){Oe(n).invalidFormat=!0,n._d=new Date(NaN);return}for(r=0;r<u;r++)s=0,a=!1,e=us({},n),n._useUTC!=null&&(e._useUTC=n._useUTC),e._f=n._f[r],Rs(e),os(e)&&(a=!0),s+=Oe(e).charsLeftOver,s+=Oe(e).unusedTokens.length*10,Oe(e).score=s,o?s<i&&(i=s,t=e):(i==null||s<i||a)&&(i=s,t=e,a&&(o=!0));Qt(n,t||e)}function wf(n){if(!n._d){var e=ms(n._i),t=e.day===void 0?e.date:e.day;n._a=Ro([e.year,e.month,t,e.hour,e.minute,e.second,e.millisecond],function(i){return i&&parseInt(i,10)}),Ms(n)}}function Cf(n){var e=new Ii(xs(el(n)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function el(n){var e=n._i,t=n._f;return n._locale=n._locale||Yt(n._l),e===null||t===void 0&&e===""?yn({nullInput:!0}):(typeof e=="string"&&(n._i=e=n._locale.preparse(e)),Tt(e)?new Ii(xs(e)):(zi(e)?n._d=e:Rt(t)?yf(n):t?Rs(n):Ef(n),os(n)||(n._d=null),n))}function Ef(n){var e=n._i;ct(e)?n._d=new Date(pe.now()):zi(e)?n._d=new Date(e.valueOf()):typeof e=="string"?mf(n):Rt(e)?(n._a=Ro(e.slice(0),function(t){return parseInt(t,10)}),Ms(n)):oi(e)?wf(n):It(e)?n._d=new Date(e):pe.createFromInputFallback(n)}function tl(n,e,t,i,r){var s={};return(e===!0||e===!1)&&(i=e,e=void 0),(t===!0||t===!1)&&(i=t,t=void 0),(oi(n)&&ss(n)||Rt(n)&&n.length===0)&&(n=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=r,s._l=t,s._i=n,s._f=e,s._strict=i,Cf(s)}function Xe(n,e,t,i){return tl(n,e,t,i,!1)}var kf=wt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=Xe.apply(null,arguments);return this.isValid()&&n.isValid()?n<this?this:n:yn()}),Sf=wt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=Xe.apply(null,arguments);return this.isValid()&&n.isValid()?n>this?this:n:yn()});function il(n,e){var t,i;if(e.length===1&&Rt(e[0])&&(e=e[0]),!e.length)return Xe();for(t=e[0],i=1;i<e.length;++i)(!e[i].isValid()||e[i][n](t))&&(t=e[i]);return t}function xf(){var n=[].slice.call(arguments,0);return il("isBefore",n)}function _f(){var n=[].slice.call(arguments,0);return il("isAfter",n)}var Mf=function(){return Date.now?Date.now():+new Date},Ji=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rf(n){var e,t=!1,i,r=Ji.length;for(e in n)if(je(n,e)&&!(tt.call(Ji,e)!==-1&&(n[e]==null||!isNaN(n[e]))))return!1;for(i=0;i<r;++i)if(n[Ji[i]]){if(t)return!1;parseFloat(n[Ji[i]])!==He(n[Ji[i]])&&(t=!0)}return!0}function Tf(){return this._isValid}function Df(){return Ot(NaN)}function Ln(n){var e=ms(n),t=e.year||0,i=e.quarter||0,r=e.month||0,s=e.week||e.isoWeek||0,a=e.day||0,o=e.hour||0,u=e.minute||0,c=e.second||0,d=e.millisecond||0;this._isValid=Rf(e),this._milliseconds=+d+c*1e3+u*6e4+o*1e3*60*60,this._days=+a+s*7,this._months=+r+i*3+t*12,this._data={},this._locale=Yt(),this._bubble()}function Pn(n){return n instanceof Ln}function Ts(n){return n<0?Math.round(-1*n)*-1:Math.round(n)}function Of(n,e,t){var i=Math.min(n.length,e.length),r=Math.abs(n.length-e.length),s=0,a;for(a=0;a<i;a++)He(n[a])!==He(e[a])&&s++;return s+r}function nl(n,e){Ee(n,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+At(~~(t/60),2)+e+At(~~t%60,2)})}nl("Z",":"),nl("ZZ",""),ge("Z",_n),ge("ZZ",_n),qe(["Z","ZZ"],function(n,e,t){t._useUTC=!0,t._tzm=Ds(_n,n)});var Lf=/([\+\-]|\d\d)/gi;function Ds(n,e){var t=(e||"").match(n),i,r,s;return t===null?null:(i=t[t.length-1]||[],r=(i+"").match(Lf)||["-",0,0],s=+(r[1]*60)+He(r[2]),s===0?0:r[0]==="+"?s:-s)}function Os(n,e){var t,i;return e._isUTC?(t=e.clone(),i=(Tt(n)||zi(n)?n.valueOf():Xe(n).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+i),pe.updateOffset(t,!1),t):Xe(n).local()}function Ls(n){return-Math.round(n._d.getTimezoneOffset())}pe.updateOffset=function(){};function Pf(n,e,t){var i=this._offset||0,r;if(!this.isValid())return n!=null?this:NaN;if(n!=null){if(typeof n=="string"){if(n=Ds(_n,n),n===null)return this}else Math.abs(n)<16&&!t&&(n=n*60);return!this._isUTC&&e&&(r=Ls(this)),this._offset=n,this._isUTC=!0,r!=null&&this.add(r,"m"),i!==n&&(!e||this._changeInProgress?ol(this,Ot(n-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,pe.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:Ls(this)}function Af(n,e){return n!=null?(typeof n!="string"&&(n=-n),this.utcOffset(n,e),this):-this.utcOffset()}function Ff(n){return this.utcOffset(0,n)}function Bf(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(Ls(this),"m")),this}function Nf(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var n=Ds(th,this._i);n!=null?this.utcOffset(n):this.utcOffset(0,!0)}return this}function Vf(n){return this.isValid()?(n=n?Xe(n).utcOffset():0,(this.utcOffset()-n)%60===0):!1}function Hf(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function zf(){if(!ct(this._isDSTShifted))return this._isDSTShifted;var n={},e;return us(n,this),n=el(n),n._a?(e=n._isUTC?Lt(n._a):Xe(n._a),this._isDSTShifted=this.isValid()&&Of(n._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function If(){return this.isValid()?!this._isUTC:!1}function $f(){return this.isValid()?this._isUTC:!1}function rl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var jf=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Wf=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ot(n,e){var t=n,i=null,r,s,a;return Pn(n)?t={ms:n._milliseconds,d:n._days,M:n._months}:It(n)||!isNaN(+n)?(t={},e?t[e]=+n:t.milliseconds=+n):(i=jf.exec(n))?(r=i[1]==="-"?-1:1,t={y:0,d:He(i[Ft])*r,h:He(i[nt])*r,m:He(i[Dt])*r,s:He(i[Wt])*r,ms:He(Ts(i[li]*1e3))*r}):(i=Wf.exec(n))?(r=i[1]==="-"?-1:1,t={y:ui(i[2],r),M:ui(i[3],r),w:ui(i[4],r),d:ui(i[5],r),h:ui(i[6],r),m:ui(i[7],r),s:ui(i[8],r)}):t==null?t={}:typeof t=="object"&&("from"in t||"to"in t)&&(a=Gf(Xe(t.from),Xe(t.to)),t={},t.ms=a.milliseconds,t.M=a.months),s=new Ln(t),Pn(n)&&je(n,"_locale")&&(s._locale=n._locale),Pn(n)&&je(n,"_isValid")&&(s._isValid=n._isValid),s}Ot.fn=Ln.prototype,Ot.invalid=Df;function ui(n,e){var t=n&&parseFloat(n.replace(",","."));return(isNaN(t)?0:t)*e}function sl(n,e){var t={};return t.months=e.month()-n.month()+(e.year()-n.year())*12,n.clone().add(t.months,"M").isAfter(e)&&--t.months,t.milliseconds=+e-+n.clone().add(t.months,"M"),t}function Gf(n,e){var t;return n.isValid()&&e.isValid()?(e=Os(e,n),n.isBefore(e)?t=sl(n,e):(t=sl(e,n),t.milliseconds=-t.milliseconds,t.months=-t.months),t):{milliseconds:0,months:0}}function al(n,e){return function(t,i){var r,s;return i!==null&&!isNaN(+i)&&(Lo(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=t,t=i,i=s),r=Ot(t,i),ol(this,r,n),this}}function ol(n,e,t,i){var r=e._milliseconds,s=Ts(e._days),a=Ts(e._months);n.isValid()&&(i=i??!0,a&&jo(n,Gi(n,"Month")+a*t),s&&zo(n,"Date",Gi(n,"Date")+s*t),r&&n._d.setTime(n._d.valueOf()+r*t),i&&pe.updateOffset(n,s||a))}var Yf=al(1,"add"),Uf=al(-1,"subtract");function ll(n){return typeof n=="string"||n instanceof String}function qf(n){return Tt(n)||zi(n)||ll(n)||It(n)||Jf(n)||Kf(n)||n===null||n===void 0}function Kf(n){var e=oi(n)&&!ss(n),t=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,s,a=i.length;for(r=0;r<a;r+=1)s=i[r],t=t||je(n,s);return e&&t}function Jf(n){var e=Rt(n),t=!1;return e&&(t=n.filter(function(i){return!It(i)&&ll(n)}).length===0),e&&t}function Xf(n){var e=oi(n)&&!ss(n),t=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],r,s;for(r=0;r<i.length;r+=1)s=i[r],t=t||je(n,s);return e&&t}function Zf(n,e){var t=n.diff(e,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"}function Qf(n,e){arguments.length===1&&(arguments[0]?qf(arguments[0])?(n=arguments[0],e=void 0):Xf(arguments[0])&&(e=arguments[0],n=void 0):(n=void 0,e=void 0));var t=n||Xe(),i=Os(t,this).startOf("day"),r=pe.calendarFormat(this,i)||"sameElse",s=e&&(Pt(e[r])?e[r].call(this,t):e[r]);return this.format(s||this.localeData().calendar(r,this,Xe(t)))}function ep(){return new Ii(this)}function tp(n,e){var t=Tt(n)?n:Xe(n);return this.isValid()&&t.isValid()?(e=Ct(e)||"millisecond",e==="millisecond"?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(e).valueOf()):!1}function ip(n,e){var t=Tt(n)?n:Xe(n);return this.isValid()&&t.isValid()?(e=Ct(e)||"millisecond",e==="millisecond"?this.valueOf()<t.valueOf():this.clone().endOf(e).valueOf()<t.valueOf()):!1}function np(n,e,t,i){var r=Tt(n)?n:Xe(n),s=Tt(e)?e:Xe(e);return this.isValid()&&r.isValid()&&s.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(r,t):!this.isBefore(r,t))&&(i[1]===")"?this.isBefore(s,t):!this.isAfter(s,t))):!1}function rp(n,e){var t=Tt(n)?n:Xe(n),i;return this.isValid()&&t.isValid()?(e=Ct(e)||"millisecond",e==="millisecond"?this.valueOf()===t.valueOf():(i=t.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf())):!1}function sp(n,e){return this.isSame(n,e)||this.isAfter(n,e)}function ap(n,e){return this.isSame(n,e)||this.isBefore(n,e)}function op(n,e,t){var i,r,s;if(!this.isValid())return NaN;if(i=Os(n,this),!i.isValid())return NaN;switch(r=(i.utcOffset()-this.utcOffset())*6e4,e=Ct(e),e){case"year":s=An(this,i)/12;break;case"month":s=An(this,i);break;case"quarter":s=An(this,i)/3;break;case"second":s=(this-i)/1e3;break;case"minute":s=(this-i)/6e4;break;case"hour":s=(this-i)/36e5;break;case"day":s=(this-i-r)/864e5;break;case"week":s=(this-i-r)/6048e5;break;default:s=this-i}return t?s:Et(s)}function An(n,e){if(n.date()<e.date())return-An(e,n);var t=(e.year()-n.year())*12+(e.month()-n.month()),i=n.clone().add(t,"months"),r,s;return e-i<0?(r=n.clone().add(t-1,"months"),s=(e-i)/(i-r)):(r=n.clone().add(t+1,"months"),s=(e-i)/(r-i)),-(t+s)||0}pe.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",pe.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function lp(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function up(n){if(!this.isValid())return null;var e=n!==!0,t=e?this.clone().utc():this;return t.year()<0||t.year()>9999?Cn(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Pt(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Cn(t,"Z")):Cn(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function cp(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var n="moment",e="",t,i,r,s;return this.isLocal()||(n=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),t="["+n+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(t+i+r+s)}function dp(n){n||(n=this.isUtc()?pe.defaultFormatUtc:pe.defaultFormat);var e=Cn(this,n);return this.localeData().postformat(e)}function hp(n,e){return this.isValid()&&(Tt(n)&&n.isValid()||Xe(n).isValid())?Ot({to:this,from:n}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function fp(n){return this.from(Xe(),n)}function pp(n,e){return this.isValid()&&(Tt(n)&&n.isValid()||Xe(n).isValid())?Ot({from:this,to:n}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function mp(n){return this.to(Xe(),n)}function ul(n){var e;return n===void 0?this._locale._abbr:(e=Yt(n),e!=null&&(this._locale=e),this)}var cl=wt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return n===void 0?this.localeData():this.locale(n)});function dl(){return this._locale}var Fn=1e3,Si=60*Fn,Bn=60*Si,hl=(365*400+97)*24*Bn;function xi(n,e){return(n%e+e)%e}function fl(n,e,t){return n<100&&n>=0?new Date(n+400,e,t)-hl:new Date(n,e,t).valueOf()}function pl(n,e,t){return n<100&&n>=0?Date.UTC(n+400,e,t)-hl:Date.UTC(n,e,t)}function gp(n){var e,t;if(n=Ct(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?pl:fl,n){case"year":e=t(this.year(),0,1);break;case"quarter":e=t(this.year(),this.month()-this.month()%3,1);break;case"month":e=t(this.year(),this.month(),1);break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=t(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=xi(e+(this._isUTC?0:this.utcOffset()*Si),Bn);break;case"minute":e=this._d.valueOf(),e-=xi(e,Si);break;case"second":e=this._d.valueOf(),e-=xi(e,Fn);break}return this._d.setTime(e),pe.updateOffset(this,!0),this}function bp(n){var e,t;if(n=Ct(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?pl:fl,n){case"year":e=t(this.year()+1,0,1)-1;break;case"quarter":e=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=t(this.year(),this.month()+1,1)-1;break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Bn-xi(e+(this._isUTC?0:this.utcOffset()*Si),Bn)-1;break;case"minute":e=this._d.valueOf(),e+=Si-xi(e,Si)-1;break;case"second":e=this._d.valueOf(),e+=Fn-xi(e,Fn)-1;break}return this._d.setTime(e),pe.updateOffset(this,!0),this}function vp(){return this._d.valueOf()-(this._offset||0)*6e4}function yp(){return Math.floor(this.valueOf()/1e3)}function wp(){return new Date(this.valueOf())}function Cp(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function Ep(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function kp(){return this.isValid()?this.toISOString():null}function Sp(){return os(this)}function xp(){return Qt({},Oe(this))}function _p(){return Oe(this).overflow}function Mp(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ee("N",0,0,"eraAbbr"),Ee("NN",0,0,"eraAbbr"),Ee("NNN",0,0,"eraAbbr"),Ee("NNNN",0,0,"eraName"),Ee("NNNNN",0,0,"eraNarrow"),Ee("y",["y",1],"yo","eraYear"),Ee("y",["yy",2],0,"eraYear"),Ee("y",["yyy",3],0,"eraYear"),Ee("y",["yyyy",4],0,"eraYear"),ge("N",Ps),ge("NN",Ps),ge("NNN",Ps),ge("NNNN",Vp),ge("NNNNN",Hp),qe(["N","NN","NNN","NNNN","NNNNN"],function(n,e,t,i){var r=t._locale.erasParse(n,i,t._strict);r?Oe(t).era=r:Oe(t).invalidEra=n}),ge("y",wi),ge("yy",wi),ge("yyy",wi),ge("yyyy",wi),ge("yo",zp),qe(["y","yy","yyy","yyyy"],st),qe(["yo"],function(n,e,t,i){var r;t._locale._eraYearOrdinalRegex&&(r=n.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?e[st]=t._locale.eraYearOrdinalParse(n,r):e[st]=parseInt(n,10)});function Rp(n,e){var t,i,r,s=this._eras||Yt("en")._eras;for(t=0,i=s.length;t<i;++t){switch(typeof s[t].since){case"string":r=pe(s[t].since).startOf("day"),s[t].since=r.valueOf();break}switch(typeof s[t].until){case"undefined":s[t].until=1/0;break;case"string":r=pe(s[t].until).startOf("day").valueOf(),s[t].until=r.valueOf();break}}return s}function Tp(n,e,t){var i,r,s=this.eras(),a,o,u;for(n=n.toUpperCase(),i=0,r=s.length;i<r;++i)if(a=s[i].name.toUpperCase(),o=s[i].abbr.toUpperCase(),u=s[i].narrow.toUpperCase(),t)switch(e){case"N":case"NN":case"NNN":if(o===n)return s[i];break;case"NNNN":if(a===n)return s[i];break;case"NNNNN":if(u===n)return s[i];break}else if([a,o,u].indexOf(n)>=0)return s[i]}function Dp(n,e){var t=n.since<=n.until?1:-1;return e===void 0?pe(n.since).year():pe(n.since).year()+(e-n.offset)*t}function Op(){var n,e,t,i=this.localeData().eras();for(n=0,e=i.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),i[n].since<=t&&t<=i[n].until||i[n].until<=t&&t<=i[n].since)return i[n].name;return""}function Lp(){var n,e,t,i=this.localeData().eras();for(n=0,e=i.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),i[n].since<=t&&t<=i[n].until||i[n].until<=t&&t<=i[n].since)return i[n].narrow;return""}function Pp(){var n,e,t,i=this.localeData().eras();for(n=0,e=i.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),i[n].since<=t&&t<=i[n].until||i[n].until<=t&&t<=i[n].since)return i[n].abbr;return""}function Ap(){var n,e,t,i,r=this.localeData().eras();for(n=0,e=r.length;n<e;++n)if(t=r[n].since<=r[n].until?1:-1,i=this.clone().startOf("day").valueOf(),r[n].since<=i&&i<=r[n].until||r[n].until<=i&&i<=r[n].since)return(this.year()-pe(r[n].since).year())*t+r[n].offset;return this.year()}function Fp(n){return je(this,"_erasNameRegex")||As.call(this),n?this._erasNameRegex:this._erasRegex}function Bp(n){return je(this,"_erasAbbrRegex")||As.call(this),n?this._erasAbbrRegex:this._erasRegex}function Np(n){return je(this,"_erasNarrowRegex")||As.call(this),n?this._erasNarrowRegex:this._erasRegex}function Ps(n,e){return e.erasAbbrRegex(n)}function Vp(n,e){return e.erasNameRegex(n)}function Hp(n,e){return e.erasNarrowRegex(n)}function zp(n,e){return e._eraYearOrdinalRegex||wi}function As(){var n=[],e=[],t=[],i=[],r,s,a,o,u,c=this.eras();for(r=0,s=c.length;r<s;++r)a=$t(c[r].name),o=$t(c[r].abbr),u=$t(c[r].narrow),e.push(a),n.push(o),t.push(u),i.push(a),i.push(o),i.push(u);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}Ee(0,["gg",2],0,function(){return this.weekYear()%100}),Ee(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Nn(n,e){Ee(0,[n,n.length],0,e)}Nn("gggg","weekYear"),Nn("ggggg","weekYear"),Nn("GGGG","isoWeekYear"),Nn("GGGGG","isoWeekYear"),ge("G",xn),ge("g",xn),ge("GG",Je,gt),ge("gg",Je,gt),ge("GGGG",bs,gs),ge("gggg",bs,gs),ge("GGGGG",Sn,En),ge("ggggg",Sn,En),ji(["gggg","ggggg","GGGG","GGGGG"],function(n,e,t,i){e[i.substr(0,2)]=He(n)}),ji(["gg","GG"],function(n,e,t,i){e[i]=pe.parseTwoDigitYear(n)});function Ip(n){return ml.call(this,n,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function $p(n){return ml.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function jp(){return Gt(this.year(),1,4)}function Wp(){return Gt(this.isoWeekYear(),1,4)}function Gp(){var n=this.localeData()._week;return Gt(this.year(),n.dow,n.doy)}function Yp(){var n=this.localeData()._week;return Gt(this.weekYear(),n.dow,n.doy)}function ml(n,e,t,i,r){var s;return n==null?Ui(this,i,r).year:(s=Gt(n,i,r),e>s&&(e=s),Up.call(this,n,e,t,i,r))}function Up(n,e,t,i,r){var s=Yo(n,e,t,i,r),a=Yi(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}Ee("Q",0,"Qo","quarter"),ge("Q",Fo),qe("Q",function(n,e){e[jt]=(He(n)-1)*3});function qp(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}Ee("D",["DD",2],"Do","date"),ge("D",Je,Ci),ge("DD",Je,gt),ge("Do",function(n,e){return n?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),qe(["D","DD"],Ft),qe("Do",function(n,e){e[Ft]=He(n.match(Je)[0])});var gl=Ei("Date",!0);Ee("DDD",["DDDD",3],"DDDo","dayOfYear"),ge("DDD",kn),ge("DDDD",Bo),qe(["DDD","DDDD"],function(n,e,t){t._dayOfYear=He(n)});function Kp(n){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return n==null?e:this.add(n-e,"d")}Ee("m",["mm",2],0,"minute"),ge("m",Je,vs),ge("mm",Je,gt),qe(["m","mm"],Dt);var Jp=Ei("Minutes",!1);Ee("s",["ss",2],0,"second"),ge("s",Je,vs),ge("ss",Je,gt),qe(["s","ss"],Wt);var Xp=Ei("Seconds",!1);Ee("S",0,0,function(){return~~(this.millisecond()/100)}),Ee(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Ee(0,["SSS",3],0,"millisecond"),Ee(0,["SSSS",4],0,function(){return this.millisecond()*10}),Ee(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Ee(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Ee(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Ee(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Ee(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ge("S",kn,Fo),ge("SS",kn,gt),ge("SSS",kn,Bo);var ti,bl;for(ti="SSSS";ti.length<=9;ti+="S")ge(ti,wi);function Zp(n,e){e[li]=He(("0."+n)*1e3)}for(ti="S";ti.length<=9;ti+="S")qe(ti,Zp);bl=Ei("Milliseconds",!1),Ee("z",0,0,"zoneAbbr"),Ee("zz",0,0,"zoneName");function Qp(){return this._isUTC?"UTC":""}function em(){return this._isUTC?"Coordinated Universal Time":""}var he=Ii.prototype;he.add=Yf,he.calendar=Qf,he.clone=ep,he.diff=op,he.endOf=bp,he.format=dp,he.from=hp,he.fromNow=fp,he.to=pp,he.toNow=mp,he.get=uh,he.invalidAt=_p,he.isAfter=tp,he.isBefore=ip,he.isBetween=np,he.isSame=rp,he.isSameOrAfter=sp,he.isSameOrBefore=ap,he.isValid=Sp,he.lang=cl,he.locale=ul,he.localeData=dl,he.max=Sf,he.min=kf,he.parsingFlags=xp,he.set=ch,he.startOf=gp,he.subtract=Uf,he.toArray=Cp,he.toObject=Ep,he.toDate=wp,he.toISOString=up,he.inspect=cp,typeof Symbol<"u"&&Symbol.for!=null&&(he[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),he.toJSON=kp,he.toString=lp,he.unix=yp,he.valueOf=vp,he.creationData=Mp,he.eraName=Op,he.eraNarrow=Lp,he.eraAbbr=Pp,he.eraYear=Ap,he.year=Ho,he.isLeapYear=lh,he.weekYear=Ip,he.isoWeekYear=$p,he.quarter=he.quarters=qp,he.month=Wo,he.daysInMonth=yh,he.week=he.weeks=Mh,he.isoWeek=he.isoWeeks=Rh,he.weeksInYear=Gp,he.weeksInWeekYear=Yp,he.isoWeeksInYear=jp,he.isoWeeksInISOWeekYear=Wp,he.date=gl,he.day=he.days=Ih,he.weekday=$h,he.isoWeekday=jh,he.dayOfYear=Kp,he.hour=he.hours=Jh,he.minute=he.minutes=Jp,he.second=he.seconds=Xp,he.millisecond=he.milliseconds=bl,he.utcOffset=Pf,he.utc=Ff,he.local=Bf,he.parseZone=Nf,he.hasAlignedHourOffset=Vf,he.isDST=Hf,he.isLocal=If,he.isUtcOffset=$f,he.isUtc=rl,he.isUTC=rl,he.zoneAbbr=Qp,he.zoneName=em,he.dates=wt("dates accessor is deprecated. Use date instead.",gl),he.months=wt("months accessor is deprecated. Use month instead",Wo),he.years=wt("years accessor is deprecated. Use year instead",Ho),he.zone=wt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Af),he.isDSTShifted=wt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",zf);function tm(n){return Xe(n*1e3)}function im(){return Xe.apply(null,arguments).parseZone()}function vl(n){return n}var We=ds.prototype;We.calendar=zd,We.longDateFormat=Wd,We.invalidDate=Yd,We.ordinal=Kd,We.preparse=vl,We.postformat=vl,We.relativeTime=Xd,We.pastFuture=Zd,We.set=Vd,We.eras=Rp,We.erasParse=Tp,We.erasConvertYear=Dp,We.erasAbbrRegex=Bp,We.erasNameRegex=Fp,We.erasNarrowRegex=Np,We.months=mh,We.monthsShort=gh,We.monthsParse=vh,We.monthsRegex=Ch,We.monthsShortRegex=wh,We.week=kh,We.firstDayOfYear=_h,We.firstDayOfWeek=xh,We.weekdays=Bh,We.weekdaysMin=Vh,We.weekdaysShort=Nh,We.weekdaysParse=zh,We.weekdaysRegex=Wh,We.weekdaysShortRegex=Gh,We.weekdaysMinRegex=Yh,We.isPM=qh,We.meridiem=Xh;function Vn(n,e,t,i){var r=Yt(),s=Lt().set(i,e);return r[t](s,n)}function yl(n,e,t){if(It(n)&&(e=n,n=void 0),n=n||"",e!=null)return Vn(n,e,t,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Vn(n,i,t,"month");return r}function Fs(n,e,t,i){typeof n=="boolean"?(It(e)&&(t=e,e=void 0),e=e||""):(e=n,t=e,n=!1,It(e)&&(t=e,e=void 0),e=e||"");var r=Yt(),s=n?r._week.dow:0,a,o=[];if(t!=null)return Vn(e,(t+s)%7,i,"day");for(a=0;a<7;a++)o[a]=Vn(e,(a+s)%7,i,"day");return o}function nm(n,e){return yl(n,e,"months")}function rm(n,e){return yl(n,e,"monthsShort")}function sm(n,e,t){return Fs(n,e,t,"weekdays")}function am(n,e,t){return Fs(n,e,t,"weekdaysShort")}function om(n,e,t){return Fs(n,e,t,"weekdaysMin")}ei("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var e=n%10,t=He(n%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return n+t}}),pe.lang=wt("moment.lang is deprecated. Use moment.locale instead.",ei),pe.langData=wt("moment.langData is deprecated. Use moment.localeData instead.",Yt);var Ut=Math.abs;function lm(){var n=this._data;return this._milliseconds=Ut(this._milliseconds),this._days=Ut(this._days),this._months=Ut(this._months),n.milliseconds=Ut(n.milliseconds),n.seconds=Ut(n.seconds),n.minutes=Ut(n.minutes),n.hours=Ut(n.hours),n.months=Ut(n.months),n.years=Ut(n.years),this}function wl(n,e,t,i){var r=Ot(e,t);return n._milliseconds+=i*r._milliseconds,n._days+=i*r._days,n._months+=i*r._months,n._bubble()}function um(n,e){return wl(this,n,e,1)}function cm(n,e){return wl(this,n,e,-1)}function Cl(n){return n<0?Math.floor(n):Math.ceil(n)}function dm(){var n=this._milliseconds,e=this._days,t=this._months,i=this._data,r,s,a,o,u;return n>=0&&e>=0&&t>=0||n<=0&&e<=0&&t<=0||(n+=Cl(Bs(t)+e)*864e5,e=0,t=0),i.milliseconds=n%1e3,r=Et(n/1e3),i.seconds=r%60,s=Et(r/60),i.minutes=s%60,a=Et(s/60),i.hours=a%24,e+=Et(a/24),u=Et(El(e)),t+=u,e-=Cl(Bs(u)),o=Et(t/12),t%=12,i.days=e,i.months=t,i.years=o,this}function El(n){return n*4800/146097}function Bs(n){return n*146097/4800}function hm(n){if(!this.isValid())return NaN;var e,t,i=this._milliseconds;if(n=Ct(n),n==="month"||n==="quarter"||n==="year")switch(e=this._days+i/864e5,t=this._months+El(e),n){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(e=this._days+Math.round(Bs(this._months)),n){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return e*24+i/36e5;case"minute":return e*1440+i/6e4;case"second":return e*86400+i/1e3;case"millisecond":return Math.floor(e*864e5)+i;default:throw new Error("Unknown unit "+n)}}function qt(n){return function(){return this.as(n)}}var kl=qt("ms"),fm=qt("s"),pm=qt("m"),mm=qt("h"),gm=qt("d"),bm=qt("w"),vm=qt("M"),ym=qt("Q"),wm=qt("y"),Cm=kl;function Em(){return Ot(this)}function km(n){return n=Ct(n),this.isValid()?this[n+"s"]():NaN}function ci(n){return function(){return this.isValid()?this._data[n]:NaN}}var Sm=ci("milliseconds"),xm=ci("seconds"),_m=ci("minutes"),Mm=ci("hours"),Rm=ci("days"),Tm=ci("months"),Dm=ci("years");function Om(){return Et(this.days()/7)}var Kt=Math.round,_i={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Lm(n,e,t,i,r){return r.relativeTime(e||1,!!t,n,i)}function Pm(n,e,t,i){var r=Ot(n).abs(),s=Kt(r.as("s")),a=Kt(r.as("m")),o=Kt(r.as("h")),u=Kt(r.as("d")),c=Kt(r.as("M")),d=Kt(r.as("w")),p=Kt(r.as("y")),h=s<=t.ss&&["s",s]||s<t.s&&["ss",s]||a<=1&&["m"]||a<t.m&&["mm",a]||o<=1&&["h"]||o<t.h&&["hh",o]||u<=1&&["d"]||u<t.d&&["dd",u];return t.w!=null&&(h=h||d<=1&&["w"]||d<t.w&&["ww",d]),h=h||c<=1&&["M"]||c<t.M&&["MM",c]||p<=1&&["y"]||["yy",p],h[2]=e,h[3]=+n>0,h[4]=i,Lm.apply(null,h)}function Am(n){return n===void 0?Kt:typeof n=="function"?(Kt=n,!0):!1}function Fm(n,e){return _i[n]===void 0?!1:e===void 0?_i[n]:(_i[n]=e,n==="s"&&(_i.ss=e-1),!0)}function Bm(n,e){if(!this.isValid())return this.localeData().invalidDate();var t=!1,i=_i,r,s;return typeof n=="object"&&(e=n,n=!1),typeof n=="boolean"&&(t=n),typeof e=="object"&&(i=Object.assign({},_i,e),e.s!=null&&e.ss==null&&(i.ss=e.s-1)),r=this.localeData(),s=Pm(this,!t,i,r),t&&(s=r.pastFuture(+this,s)),r.postformat(s)}var Ns=Math.abs;function Mi(n){return(n>0)-(n<0)||+n}function Hn(){if(!this.isValid())return this.localeData().invalidDate();var n=Ns(this._milliseconds)/1e3,e=Ns(this._days),t=Ns(this._months),i,r,s,a,o=this.asSeconds(),u,c,d,p;return o?(i=Et(n/60),r=Et(i/60),n%=60,i%=60,s=Et(t/12),t%=12,a=n?n.toFixed(3).replace(/\.?0+$/,""):"",u=o<0?"-":"",c=Mi(this._months)!==Mi(o)?"-":"",d=Mi(this._days)!==Mi(o)?"-":"",p=Mi(this._milliseconds)!==Mi(o)?"-":"",u+"P"+(s?c+s+"Y":"")+(t?c+t+"M":"")+(e?d+e+"D":"")+(r||i||n?"T":"")+(r?p+r+"H":"")+(i?p+i+"M":"")+(n?p+a+"S":"")):"P0D"}var $e=Ln.prototype;$e.isValid=Tf,$e.abs=lm,$e.add=um,$e.subtract=cm,$e.as=hm,$e.asMilliseconds=kl,$e.asSeconds=fm,$e.asMinutes=pm,$e.asHours=mm,$e.asDays=gm,$e.asWeeks=bm,$e.asMonths=vm,$e.asQuarters=ym,$e.asYears=wm,$e.valueOf=Cm,$e._bubble=dm,$e.clone=Em,$e.get=km,$e.milliseconds=Sm,$e.seconds=xm,$e.minutes=_m,$e.hours=Mm,$e.days=Rm,$e.weeks=Om,$e.months=Tm,$e.years=Dm,$e.humanize=Bm,$e.toISOString=Hn,$e.toString=Hn,$e.toJSON=Hn,$e.locale=ul,$e.localeData=dl,$e.toIsoString=wt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Hn),$e.lang=cl,Ee("X",0,0,"unix"),Ee("x",0,0,"valueOf"),ge("x",xn),ge("X",ih),qe("X",function(n,e,t){t._d=new Date(parseFloat(n)*1e3)}),qe("x",function(n,e,t){t._d=new Date(He(n))});//! moment.js
25
- pe.version="2.30.1",Bd(Xe),pe.fn=he,pe.min=xf,pe.max=_f,pe.now=Mf,pe.utc=Lt,pe.unix=tm,pe.months=nm,pe.isDate=zi,pe.locale=ei,pe.invalid=yn,pe.duration=Ot,pe.isMoment=Tt,pe.weekdays=sm,pe.parseZone=im,pe.localeData=Yt,pe.isDuration=Pn,pe.monthsShort=rm,pe.weekdaysMin=om,pe.defineLocale=Ss,pe.updateLocale=tf,pe.locales=nf,pe.weekdaysShort=am,pe.normalizeUnits=Ct,pe.relativeTimeRounding=Am,pe.relativeTimeThreshold=Fm,pe.calendarFormat=Zf,pe.prototype=he,pe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Sl=n=>n===void 0||n==="auto"||n==="instant"||n==="smooth";function Nm(n,e){this.scrollLeft=n,this.scrollTop=e}const xl=(n,e,t="cannot convert to dictionary.")=>`Failed to execute '${n}' on '${e}': ${t}`,_l=(n,e,t)=>xl(n,e,`The provided value '${t}' is not a valid enum value of type ScrollBehavior.`),Ml=(n,e,t)=>{var i;const r=`__SEAMLESS.BACKUP$${e}`;return!n[r]&&n[e]&&!(!((i=n[e])===null||i===void 0)&&i.__isPolyfill)&&(n[r]=n[e]),n[r]||t},Vm=n=>{const e=typeof n;return n!==null&&(e==="object"||e==="function")},Vs=n=>n.ownerDocument.scrollingElement||n.ownerDocument.documentElement;function Hm(n){if(typeof Event=="function")return new Event("scrollend",{bubbles:n,cancelable:!1});const e=document.createEvent("Event");return e.initEvent("scrollend",n,!1),e}const zm=n=>.5*(1-Math.cos(Math.PI*n));function Hs(){var n;let e;return!((n=window.performance)===null||n===void 0)&&n.now?e=()=>window.performance.now():e=()=>window.Date.now(),Hs=e,e()}const Im=500,Rl=n=>{const t=(Hs()-n.timeStamp)/(n.duration||Im);if(t>1){n.method(n.targetX,n.targetY),n.callback();return}const i=(n.timingFunc||zm)(t),r=n.startX+(n.targetX-n.startX)*i,s=n.startY+(n.targetY-n.startY)*i;n.method(r,s),n.rafId=window.requestAnimationFrame(()=>{Rl(n)})},zn=n=>isFinite(n)?Number(n):0,$m=n=>{var e;return(e=n.isConnected)!==null&&e!==void 0?e:!n.ownerDocument||!(n.ownerDocument.compareDocumentPosition(n)&1)},jm=(n,e,t)=>{var i,r;if(!$m(n))return;const s=n.scrollLeft,a=n.scrollTop,o=zn((i=e.left)!==null&&i!==void 0?i:s),u=zn((r=e.top)!==null&&r!==void 0?r:a);if(o===s&&u===a)return;const c=Ml(HTMLElement.prototype,"scroll",Nm),d=Ml(Object.getPrototypeOf(n),"scroll",c).bind(n);if(e.behavior!=="smooth"){d(o,u);return}const p=()=>{window.removeEventListener("wheel",_),window.removeEventListener("touchmove",_)},h=()=>{p();const k=n.nodeType===9;n.dispatchEvent(Hm(k))},f=Object.assign(Object.assign({},t),{timeStamp:Hs(),startX:s,startY:a,targetX:o,targetY:u,rafId:0,method:d,callback:h}),_=()=>{window.cancelAnimationFrame(f.rafId),p()};window.addEventListener("wheel",_,{passive:!0,once:!0}),window.addEventListener("touchmove",_,{passive:!0,once:!0}),Rl(f)},Wm=n=>n.window===n,Gm=(n=>(e,t,i)=>{const[r,s]=Wm(e)?[Vs(e.document.documentElement),"Window"]:[e,"Element"],a=t??{};if(!Vm(a))throw new TypeError(xl(n,s));if(!Sl(a.behavior))throw new TypeError(_l(n,s,a.behavior));n==="scrollBy"&&(a.left=zn(a.left)+r.scrollLeft,a.top=zn(a.top)+r.scrollTop),jm(r,a,i)})("scroll"),Tl=n=>{switch(n){case"horizontal-tb":case"lr":case"lr-tb":case"rl":case"rl-tb":return 0;case"vertical-rl":case"tb":case"tb-rl":return 1;case"vertical-lr":case"tb-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4}return 0},Dl=(n,e,t,i)=>{let r=0;switch(e||(r^=2),n){case 0:r=r>>1|(r&1)<<1,[t,i]=[i,t];break;case 1:case 3:r^=1;break;case 4:r^=2;break}return[r,t,i]},Ym=n=>(Dl(Tl(n.writingMode),n.direction!=="rtl",void 0,void 0)[0]&1)===1,Um=(n,e,t)=>{const[i,r,s]=Dl(e,t,n.block||"start",n.inline||"nearest");return[r,s].map((a,o)=>{switch(a){case"center":return 1;case"nearest":return 0;default:{const u=i>>o&1;return a==="start"==!u?2:3}}})},Ol=(n,e,t,i,r,s,a)=>n!==0?n:r<e&&s>t||r>e&&s<t?null:r<=e&&a<=i||s>=t&&a>=i?2:s>t&&a<i||r<e&&a>i?3:null,Ll=n=>n!=="visible"&&n!=="clip",qm=n=>{var e;try{return((e=n.ownerDocument.defaultView)===null||e===void 0?void 0:e.frameElement)||null}catch{return null}},Km=(n,e)=>n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth?Ll(e.overflowY)||Ll(e.overflowX)||n===Vs(n):!1,Pl=n=>{const e=n.parentNode,t=n.parentElement;if(t===null&&e!==null){if(e.nodeType===11)return e.host;if(e.nodeType===9)return qm(n)}return t},zs=(n,e,t)=>n<e?e:n>t?t:n,Jm=n=>["scroll-margin","scroll-snap-margin"].filter(e=>e in n.documentElement.style)[0],Xm=(n,e,t)=>{const{top:i,right:r,bottom:s,left:a}=e,o=Jm(n.ownerDocument);if(!o)return[i,r,s,a];const u=c=>{const d=t.getPropertyValue(`${o}-${c}`);return parseInt(d,10)||0};return[i-u("top"),r+u("right"),s+u("bottom"),a-u("left")]},In=(n,e,t)=>{switch(n){case 1:return(e+t)/2;case 3:return t;case 2:case 0:return e}},Zm=(n,e)=>{var t,i,r;const s=(t=n.ownerDocument.defaultView)===null||t===void 0?void 0:t.visualViewport,[a,o,u,c]=n===Vs(n)?[0,0,(i=s?.width)!==null&&i!==void 0?i:n.clientWidth,(r=s?.height)!==null&&r!==void 0?r:n.clientHeight]:[e.left,e.top,n.clientWidth,n.clientHeight],d=a+n.clientLeft,p=o+n.clientTop,h=d+u,f=p+c;return[p,h,f,d]},Qm=(n,e)=>{const t=[];let i=n.ownerDocument,r=i.defaultView;if(!r)return t;const s=window.getComputedStyle(n),a=s.direction!=="rtl",o=Tl(s.writingMode||s.getPropertyValue("-webkit-writing-mode")||s.getPropertyValue("-ms-writing-mode")),[u,c]=Um(e,o,a);let[d,p,h,f]=Xm(n,n.getBoundingClientRect(),s);for(let _=Pl(n);_!==null;_=Pl(_)){if(i!==_.ownerDocument){if(i=_.ownerDocument,r=i.defaultView,!r)break;const{left:T,top:M}=_.getBoundingClientRect();d+=M,p+=T,h+=M,f+=T}const k=r.getComputedStyle(_);if(k.position==="fixed")break;if(!Km(_,k))continue;const C=_.getBoundingClientRect(),[y,v,R,m]=Zm(_,C),x=Ol(u,m,v,_.clientWidth,f,p,p-f),g=Ol(c,y,R,_.clientHeight,d,h,h-d),S=x===null?0:In(x,f,p)-In(x,m,v),w=g===null?0:In(g,d,h)-In(g,y,R),E=Ym(k)?zs(S,-_.scrollWidth+_.clientWidth-_.scrollLeft,-_.scrollLeft):zs(S,-_.scrollLeft,_.scrollWidth-_.clientWidth-_.scrollLeft),b=zs(w,-_.scrollTop,_.scrollHeight-_.clientHeight-_.scrollTop);t.push([_,{left:_.scrollLeft+E,top:_.scrollTop+b,behavior:e.behavior}]),d=Math.max(d-b,y),p=Math.min(p-E,v),h=Math.min(h-b,R),f=Math.max(f-E,m)}return t},Al=(n,e,t)=>{const i=e||{};if(!Sl(i.behavior))throw new TypeError(_l("scrollIntoView","Element",i.behavior));Qm(n,i).forEach(([s,a])=>{Gm(s,a,t)})},Fl=(n,e)=>e.some(t=>n.includes(t)),Bl=(n,e)=>e.every(t=>n.includes(t));function Nl(n){return Array.isArray(n)?n.map(e=>({id:e.id,label:e.name,all:e})):[]}function Vl(){setTimeout(()=>{const e=document.querySelectorAll(".not-valid")[0];e&&Al(e,{behavior:"smooth",block:"center"})})}function Hl(n,e){const t=document.querySelector(n);t&&Al(t,{behavior:"smooth",block:"center",...e})}function zl(){return navigator?.language?.split("-")[0]}function Is(){return["ru","en","kz"]}function Il(n){return Is().includes(n)}function $s(n,e){let t;return function(...i){t&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function $l(n,e){let t;return function(...i){t||(n(...i),t=!0,setTimeout(()=>t=!1,e))}}function js(n){const e={};for(const[t,i]of Object.entries(n))i&&(e[t]=i);return e}function jl(n){return n.map(e=>js(e))}function Wl(n){return n.reduce((e,t)=>e+t,0)}const Gl=()=>({alias:"email"}),Yl=(n="ru")=>({ru:{mask:"+7(999)999-99-99"},kz:{mask:"+7(999)999-99-99"},us:{mask:"+1(999)999-9999"}})[n],Ul=()=>({regex:"^[0-9]{10,12}$"}),ql=()=>({mask:"999999999"}),Kl=()=>({mask:"999-999-999 99"}),Jl=()=>({mask:"9999 999999"});function Ws(n){return typeof n!="string"?!1:pe(n).isValid()}function Xl(n,e={}){const{withTime:t=!1,locale:i="ru"}=e;if(!n||n.length===0||!Ws(n))return"";const r=new Date(n),s=r.getHours()>=10?r.getHours():`0${r.getHours()}`,a=r.getMinutes()>=10?r.getMinutes():`0${r.getMinutes()}`,o=r.getFullYear(),u=r.getMonth()+1>=10?r.getMonth()+1:`0${r.getMonth()+1}`,c=r.getDate()>=10?r.getDate():`0${r.getDate()}`;return i==="ru"?t?`${c}.${u}.${o} ${s}:${a}`:`${c}.${u}.${o}`:t?`${u}.${c}.${o} ${s}:${a}`:`${u}.${c}.${o}`}function Zl(n,e={}){const{locale:t="ru",currency:i="RUB"}=e,r={ru:"ru-RU",en:"en-US",kz:"kk-KZ"},a={style:"currency",maximumSignificantDigits:2,currency:{ru:"RUB",en:"USD",kz:"KZT"}[t]||i};return new Intl.NumberFormat(r[t]||"en-US",a).format(Number(n))}function Ql(n){return pe(new Date).format(n)}function eu(n,e){const t=new Date(n);return t.setDate(t.getDate()+e),t}function tu(n,e){const t=new Date(n);return t.setMonth(t.getMonth()+e),t}function iu(n,e){const t=new Date(n);return t.setFullYear(t.getFullYear()+e),t}function nu(n,e,t,i){let r=Math.abs(n);return r%=100,r>=5&&r<=20?i:(r%=10,r===1?e:r>=2&&r<=4?t:i)}function ru(n){return!n||n.length===0?n:n[0].toUpperCase()+n.slice(1)}function su(n){return n.replace(/\b\w/g,e=>e.toUpperCase())}function au(n){return n.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,t)=>t===0?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,"")}function ou(n){return n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}function lu(n){return n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1_$2").toLowerCase()}function uu(n,e,t="..."){return n.length<=e?n:n.substring(0,e)+t}function cu(n){let e=n.replace(/\D/g,"").slice(0,8);return e.length>=5?`${e.slice(0,2)}.${e.slice(2,4)}.${e.slice(4)}`:e.length>=3?`${e.slice(0,2)}.${e.slice(2)}`:e}function du({str:n,limit:e=null}){return!e||!n?n:n.substring(0,e)}function hu(n,e){let t="";for(const[i,r]of n.entries()){const s=n.length>i+1?", ":" ";if(t+=`${r.name}${s}`,t.length>e){let a=n.length-(i+1);const o=a>0?`+${a}`:"";t=`${t.substr(0,e)}...${o}`;break}}return t}function fu(n){return[...new Set(n)]}function pu(n,e){return n.reduce((t,i)=>{const r=String(i[e]);return t[r]=t[r]||[],t[r].push(i),t},{})}function mu(n,e,t="asc"){return[...n].sort((i,r)=>{const s=i[e],a=r[e];return s<a?t==="asc"?-1:1:s>a?t==="asc"?1:-1:0})}function gu(n,e){const t=[];for(let i=0;i<n.length;i+=e)t.push(n.slice(i,i+e));return t}function bu(n){return typeof n=="object"&&n!==null}function ii(n){return n===void 0?n:JSON.parse(JSON.stringify(n))}function Gs(n,e){return JSON.stringify(n)===JSON.stringify(e)}function vu(n,e){return n.sort().toString()===e.sort().toString()}function yu(n,e){let t=n.length,i=e.length;if(t!==i)return!1;n.sort(),e.sort();for(let r=0;r<t;r++)if(n[r]!==e[r])return!1;return!0}const wu=n=>{const e=ii(n),t={};for(const[i,r]of Object.entries(e)){const s=i.split(".");let a=t;for(const[u,c]of s.slice(0,-1).entries()){if(!a[c]){const d=Number.isInteger(Number(s[+u+1]));a[c]=d?[]:{}}a=a[c]}const o=s.pop();o&&(a[o]=r)}return t},Ys=n=>{let e=ii(n),t={};for(const i in e){if(typeof e[i]!="object"||e[i]===null){t[i]=e[i];continue}const r=Ys(e[i]);for(const s in r)t[`${i}.${s}`]=r[s]}return t};function Cu(n,e){const t={};return e.forEach(i=>{i in n&&(t[i]=n[i])}),t}function Eu(n,e){const t={...n};return e.forEach(i=>{delete t[i]}),t}function Xi(n,e,t,i=!1){if(i)return l.render(null,n),!0;const r=l.h(e,t);return l.render(r,n),!0}function di(){const n=Date.now(),e=Math.floor(Math.random()*9999);return n+e}function ku(n=""){return`${n}${Date.now()}-${Math.random().toString(36).substr(2,9)}`}function Su(n){throw new Error(`${n} is required.`)}function xu(n){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)}function _u(n){return/^[\+]?[1-9][\d]{0,15}$/.test(n.replace(/\D/g,""))}function Mu(n){try{return new URL(n),!0}catch{return!1}}function Ru(n,e){try{localStorage.setItem(n,JSON.stringify(e))}catch(t){console.error("Error saving to localStorage:",t)}}function Tu(n,e){try{const t=localStorage.getItem(n);return t?JSON.parse(t):e||null}catch(t){return console.error("Error reading from localStorage:",t),e||null}}function Du(n){try{localStorage.removeItem(n)}catch(e){console.error("Error removing from localStorage:",e)}}function Ou(n,e){try{sessionStorage.setItem(n,JSON.stringify(e))}catch(t){console.error("Error saving to sessionStorage:",t)}}function Lu(n,e){try{const t=sessionStorage.getItem(n);return t?JSON.parse(t):e||null}catch(t){return console.error("Error reading from sessionStorage:",t),e||null}}function Pu(n){try{sessionStorage.removeItem(n)}catch(e){console.error("Error removing from sessionStorage:",e)}}function Au(n){const e=new Map;return((...t)=>{const i=JSON.stringify(t);if(e.has(i))return e.get(i);const r=n(...t);return e.set(i,r),r})}function Fu(n){let e=!1,t;return((...i)=>(e||(e=!0,t=n(...i)),t))}function Bu(n,e,t){return Math.min(Math.max(n,e),t)}function Nu(n,e,t){return n+(e-n)*t}function Vu(n,e){return Math.floor(Math.random()*(e-n+1))+n}function Hu(n,e){return Math.round(n*Math.pow(10,e))/Math.pow(10,e)}const eg=Object.freeze(Object.defineProperty({__proto__:null,addDays:eu,addMonths:tu,addYears:iu,areArraysEqual:yu,arrayToCutString:hu,camelCase:au,capitalize:su,chunk:gu,clamp:Bu,cutString:du,debounce:$s,default:{prepareSelectOptions:Nl,scrollToError:Vl,scrollToElement:Hl,getBrowserLocale:zl,getSupportedLocales:Is,isValidLocale:Il,debounce:$s,throttle:$l,getValueFromObjectItem:js,getValueFromArr:jl,sumOfArrayNumbers:Wl,initEmailMask:Gl,initPhoneMask:Yl,initInnMask:Ul,initKppMask:ql,initSnilsMask:Kl,initPassportMask:Jl,isValidDate:Ws,formatDate:Xl,formatMoney:Zl,getNowDate:Ql,addDays:eu,addMonths:tu,addYears:iu,getDeclinationFromNumber:nu,firstToUppercase:ru,capitalize:su,camelCase:au,kebabCase:ou,snakeCase:lu,truncate:uu,maskDate:cu,cutString:du,arrayToCutString:hu,findOne:Fl,findAll:Bl,unique:fu,groupBy:pu,sortBy:mu,chunk:gu,isObject:bu,getDeepCopyObject:ii,isEqual:Gs,isArraysEqual:vu,areArraysEqual:yu,unflatenObject:wu,flattenObject:Ys,pick:Cu,omit:Eu,mountSubFilter:Xi,getUniqueKey:di,generateId:ku,required:Su,isValidEmail:xu,isValidPhone:_u,isValidUrl:Mu,setLocalStorage:Ru,getLocalStorage:Tu,removeLocalStorage:Du,setSessionStorage:Ou,getSessionStorage:Lu,removeSessionStorage:Pu,memoize:Au,once:Fu,clamp:Bu,lerp:Nu,random:Vu,roundToDecimals:Hu},findAll:Bl,findOne:Fl,firstToUppercase:ru,flattenObject:Ys,formatDate:Xl,formatMoney:Zl,generateId:ku,getBrowserLocale:zl,getDeclinationFromNumber:nu,getDeepCopyObject:ii,getLocalStorage:Tu,getNowDate:Ql,getSessionStorage:Lu,getSupportedLocales:Is,getUniqueKey:di,getValueFromArr:jl,getValueFromObjectItem:js,groupBy:pu,initEmailMask:Gl,initInnMask:Ul,initKppMask:ql,initPassportMask:Jl,initPhoneMask:Yl,initSnilsMask:Kl,isArraysEqual:vu,isEqual:Gs,isObject:bu,isValidDate:Ws,isValidEmail:xu,isValidLocale:Il,isValidPhone:_u,isValidUrl:Mu,kebabCase:ou,lerp:Nu,maskDate:cu,memoize:Au,mountSubFilter:Xi,omit:Eu,once:Fu,pick:Cu,prepareSelectOptions:Nl,random:Vu,removeLocalStorage:Du,removeSessionStorage:Pu,required:Su,roundToDecimals:Hu,scrollToElement:Hl,scrollToError:Vl,setLocalStorage:Ru,setSessionStorage:Ou,snakeCase:lu,sortBy:mu,sumOfArrayNumbers:Wl,throttle:$l,truncate:uu,unflatenObject:wu,unique:fu},Symbol.toStringTag,{value:"Module"})),tg={class:"lh-1","data-test":"FormError"},hi={__name:"FormError",props:{errors:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("div",tg,[n.errors?.length?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(n.errors,(i,r)=>(l.openBlock(),l.createElementBlock("div",{class:"text-danger small",key:r},l.toDisplayString(i),1))),128)):l.createCommentVNode("",!0)]))}},ig={class:"custom-input"},ng={class:"position-relative custom-input-wrapper"},rg=["value","placeholder","disabled"],$n=Ve({__name:"CustomInput",props:{modelValue:{type:[String,Number],default:""},titleClass:{type:String,default:""},title:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},inputClass:{type:[String,Object],default:""},error:{type:[String,Array],default:""},maskOptions:{type:Object,default:()=>({})},maxNumber:{type:Number,default:null}},emits:["change","blur","update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.ref(null),s=c=>{let d=c.target.value;t.maxNumber!==null&&Number(d)>=t.maxNumber&&(d=t.maxNumber.toString(),c.target.value=d),i("update:modelValue",d)},a=()=>{i("update:modelValue",""),i("change","")},o=()=>{Object.keys(t.maskOptions).length!==0&&r.value&&Fd(t.maskOptions).mask(r.value)};l.onMounted(()=>{o()}),l.watch(()=>t.maskOptions,(c,d)=>{Gs(c,d)||o()},{deep:!0});const u=l.computed(()=>Array.isArray(t.error)?t.error.filter(Boolean):typeof t.error=="string"&&t.error?[t.error]:[]);return(c,d)=>(l.openBlock(),l.createElementBlock("div",ig,[n.title?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["mb-1 fw-bold",[n.titleClass]])},l.toDisplayString(n.title),3)):l.createCommentVNode("",!0),l.createElementVNode("div",ng,[l.createElementVNode("input",{ref_key:"inputEl",ref:r,type:"text",class:l.normalizeClass(["form-control outline-none",{[n.inputClass]:n.inputClass,"is-invalid":u.value.length>0}]),value:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,onBlur:d[0]||(d[0]=p=>i("blur")),onInput:s},null,42,rg),n.modelValue&&!n.disabled?(l.openBlock(),l.createElementBlock("i",{key:0,class:"bi bi-x-lg remove-button position-absolute",onClick:a})):l.createCommentVNode("",!0)]),l.createVNode(hi,{errors:u.value},null,8,["errors"])]))}},[["__scopeId","data-v-cc716605"]]),sg={class:"position-relative"},ag=["type","value"],og=Ve({__name:"PasswordInput",props:{modelValue:{type:String,default:""},error:{type:[String,Array],default:""},initialVisibility:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n){const e=n,t=l.ref(e.initialVisibility);l.watch(()=>e.initialVisibility,r=>{t.value=r});const i=l.computed(()=>Array.isArray(e.error)?e.error.filter(Boolean):typeof e.error=="string"&&e.error?[e.error]:[]);return(r,s)=>(l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",sg,[l.createElementVNode("input",{class:l.normalizeClass(["form-control password-input outline-none",{"is-invalid":i.value.length>0}]),type:t.value?"text":"password",value:n.modelValue,autocomplete:"new-password",onInput:s[0]||(s[0]=a=>r.$emit("update:modelValue",a.target.value))},null,42,ag),l.createElementVNode("div",{class:"toggle-pass",onClick:s[1]||(s[1]=a=>t.value=!t.value)},[l.createElementVNode("i",{class:l.normalizeClass(["bi",[t.value?"bi-eye-slash-fill":"bi-eye-fill"]]),style:{"font-size":"20px"}},null,2)])]),l.createVNode(hi,{errors:i.value},null,8,["errors"])]))}},[["__scopeId","data-v-7b5f1918"]]),lg={class:"form-check d-flex align-items-center"},ug=["id","name","checked"],cg=["for"],dg={__name:"Checkbox",props:{modelValue:{type:Boolean,default:!1},name:{type:String,required:!0},label:{type:String,default:""},id:{type:String,default:()=>`checkbox-${Math.random().toString(36).slice(2,9)}`},size:{type:String,default:"sm",validator:n=>["sm","md","lg"].includes(n)},clickableLabel:{type:Boolean,default:!0},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.ref(null),s=l.computed(()=>t.size==="sm"?"5px":t.size==="md"?"10px":t.size==="lg"?"15px":"5px"),a=o=>{i("update:modelValue",o.target.checked)};return l.watch(()=>t.indeterminate,o=>{r.value&&(r.value.indeterminate=o)}),l.onMounted(()=>{r.value&&(r.value.indeterminate=t.indeterminate)}),(o,u)=>(l.openBlock(),l.createElementBlock("div",lg,[l.createElementVNode("input",{ref_key:"inputRef",ref:r,class:"form-check-input mr-2 mt-0",type:"checkbox",id:n.id,name:n.name,style:l.normalizeStyle({padding:s.value}),checked:n.modelValue,onChange:a},null,44,ug),n.label?(l.openBlock(),l.createElementBlock("label",{key:0,class:l.normalizeClass(["form-check-label lh-n",{"cursor-pointer":n.clickableLabel}]),for:n.clickableLabel?n.id:void 0},l.toDisplayString(n.label),11,cg)):l.createCommentVNode("",!0)]))}};var hg=Object.defineProperty,fg=Object.defineProperties,pg=Object.getOwnPropertyDescriptors,zu=Object.getOwnPropertySymbols,mg=Object.prototype.hasOwnProperty,gg=Object.prototype.propertyIsEnumerable,Iu=(n,e,t)=>e in n?hg(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ri=(n,e)=>{for(var t in e||(e={}))mg.call(e,t)&&Iu(n,t,e[t]);if(zu)for(var t of zu(e))gg.call(e,t)&&Iu(n,t,e[t]);return n},$u=(n,e)=>fg(n,pg(e));const bg={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(n){this.autoscroll&&n&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var n;const e=((n=this.$refs.dropdownMenu)==null?void 0:n.children[this.typeAheadPointer])||!1;if(e){const t=this.getDropdownViewport(),{top:i,bottom:r,height:s}=e.getBoundingClientRect();if(i<t.top)return this.$refs.dropdownMenu.scrollTop=e.offsetTop;if(r>t.bottom)return this.$refs.dropdownMenu.scrollTop=e.offsetTop-(t.height-s)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},vg={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let n=0;n<this.filteredOptions.length;n++)if(this.selectable(this.filteredOptions[n])){this.typeAheadPointer=n;break}},open(n){n&&this.typeAheadToLastSelected()},selectedValue(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp(){for(let n=this.typeAheadPointer-1;n>=0;n--)if(this.selectable(this.filteredOptions[n])){this.typeAheadPointer=n;break}},typeAheadDown(){for(let n=this.typeAheadPointer+1;n<this.filteredOptions.length;n++)if(this.selectable(this.filteredOptions[n])){this.typeAheadPointer=n;break}},typeAheadSelect(){const n=this.filteredOptions[this.typeAheadPointer];n&&this.selectable(n)&&this.select(n)},typeAheadToLastSelected(){this.typeAheadPointer=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1}}},yg={props:{loading:{type:Boolean,default:!1}},data(){return{mutableLoading:!1}},watch:{search(){this.$emit("search",this.search,this.toggleLoading)},loading(n){this.mutableLoading=n}},methods:{toggleLoading(n=null){return n==null?this.mutableLoading=!this.mutableLoading:this.mutableLoading=n}}},Us=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},wg={},Cg={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},Eg=l.createElementVNode("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1),kg=[Eg];function Sg(n,e){return l.openBlock(),l.createElementBlock("svg",Cg,kg)}const xg=Us(wg,[["render",Sg]]),_g={},Mg={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},Rg=l.createElementVNode("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1),Tg=[Rg];function Dg(n,e){return l.openBlock(),l.createElementBlock("svg",Mg,Tg)}const Og=Us(_g,[["render",Dg]]),ju={Deselect:xg,OpenIndicator:Og},Lg={mounted(n,{instance:e}){if(e.appendToBody){const{height:t,top:i,left:r,width:s}=e.$refs.toggle.getBoundingClientRect();let a=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset;n.unbindPosition=e.calculatePosition(n,e,{width:s+"px",left:a+r+"px",top:o+i+t+"px"}),document.body.appendChild(n)}},unmounted(n,{instance:e}){e.appendToBody&&(n.unbindPosition&&typeof n.unbindPosition=="function"&&n.unbindPosition(),n.parentNode&&n.parentNode.removeChild(n))}};function Pg(n){const e={};return Object.keys(n).sort().forEach(t=>{e[t]=n[t]}),JSON.stringify(e)}let Ag=0;function Fg(){return++Ag}const Bg={components:Ri({},ju),directives:{appendToBody:Lg},mixins:[bg,vg,yg],compatConfig:{MODE:3},emits:["open","close","update:modelValue","search","search:compositionstart","search:compositionend","search:keydown","search:blur","search:focus","search:input","option:created","option:selecting","option:selected","option:deselecting","option:deselected"],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:n=>n},selectable:{type:Function,default:n=>!0},getOptionLabel:{type:Function,default(n){return typeof n=="object"?n.hasOwnProperty(this.label)?n[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(n)}.
26
- https://vue-select.org/api/props.html#getoptionlabel`):n}},getOptionKey:{type:Function,default(n){if(typeof n!="object")return n;try{return n.hasOwnProperty("id")?n.id:Pg(n)}catch(e){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
27
- https://vue-select.org/api/props.html#getoptionkey`,n,e)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default(n,e,t){return(e||"").toLocaleLowerCase().indexOf(t.toLocaleLowerCase())>-1}},filter:{type:Function,default(n,e){return n.filter(t=>{let i=this.getOptionLabel(t);return typeof i=="number"&&(i=i.toString()),this.filterBy(t,i,e)})}},createOption:{type:Function,default(n){return typeof this.optionList[0]=="object"?{[this.label]:n}:n}},resetOnOptionsChange:{default:!1,validator:n=>["function","boolean"].includes(typeof n)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:n,multiple:e}){return n&&!e}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:()=>[13]},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:(n,e)=>n},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(n,e,{width:t,top:i,left:r}){n.style.top=i,n.style.left=r,n.style.width=t}},dropdownShouldOpen:{type:Function,default({noDrop:n,open:e,mutableLoading:t}){return n?!1:e&&!t}},uid:{type:[String,Number],default:()=>Fg()}},data(){return{search:"",open:!1,isComposing:!1,pushedTags:[],_value:[],deselectButtons:[]}},computed:{isReducingValues(){return this.$props.reduce!==this.$options.props.reduce.default},isTrackingValues(){return typeof this.modelValue>"u"||this.isReducingValues},selectedValue(){let n=this.modelValue;return this.isTrackingValues&&(n=this.$data._value),n!=null&&n!==""?[].concat(n):[]},optionList(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl(){return this.$slots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope(){const n={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:Ri({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":`vs${this.uid}__combobox`,"aria-controls":`vs${this.uid}__listbox`,ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":`vs${this.uid}__option-${this.typeAheadPointer}`}:{}),events:{compositionstart:()=>this.isComposing=!0,compositionend:()=>this.isComposing=!1,keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:e=>this.search=e.target.value}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:n,listFooter:n,header:$u(Ri({},n),{deselect:this.deselect}),footer:$u(Ri({},n),{deselect:this.deselect})}},childComponents(){return Ri(Ri({},ju),this.components)},stateClasses(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching(){return!!this.search},dropdownOpen(){return this.dropdownShouldOpen(this)},searchPlaceholder(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions(){const n=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return n;const e=this.search.length?this.filter(n,this.search,this):n;if(this.taggable&&this.search.length){const t=this.createOption(this.search);this.optionExists(t)||e.unshift(t)}return e},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(n,e){const t=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(n,e,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&t()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(n){this.isTrackingValues&&this.setInternalValueFromOptions(n)}},multiple(){this.clearSelection()},open(n){this.$emit(n?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(n){Array.isArray(n)?this.$data._value=n.map(e=>this.findOptionFromReducedValue(e)):this.$data._value=this.findOptionFromReducedValue(n)},select(n){this.$emit("option:selecting",n),this.isOptionSelected(n)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(n):(this.taggable&&!this.optionExists(n)&&(this.$emit("option:created",n),this.pushTag(n)),this.multiple&&(n=this.selectedValue.concat(n)),this.updateValue(n),this.$emit("option:selected",n)),this.onAfterSelect(n)},deselect(n){this.$emit("option:deselecting",n),this.updateValue(this.selectedValue.filter(e=>!this.optionComparator(e,n))),this.$emit("option:deselected",n)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(n){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(n){typeof this.modelValue>"u"&&(this.$data._value=n),n!==null&&(Array.isArray(n)?n=n.map(e=>this.reduce(e)):n=this.reduce(n)),this.$emit("update:modelValue",n)},toggleDropdown(n){const e=n.target!==this.searchEl;e&&n.preventDefault();const t=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||t.filter(Boolean).some(i=>i.contains(n.target)||i===n.target)){n.preventDefault();return}this.open&&e?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(n){return this.selectedValue.some(e=>this.optionComparator(e,n))},isOptionDeselectable(n){return this.isOptionSelected(n)&&this.deselectFromDropdown},optionComparator(n,e){return this.getOptionKey(n)===this.getOptionKey(e)},findOptionFromReducedValue(n){const e=i=>JSON.stringify(this.reduce(i))===JSON.stringify(n),t=[...this.options,...this.pushedTags].filter(e);return t.length===1?t[0]:t.find(i=>this.optionComparator(i,this.$data._value))||n},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let n=null;this.multiple&&(n=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(n)}},optionExists(n){return this.optionList.some(e=>this.optionComparator(e,n))},normalizeOptionForSlot(n){return typeof n=="object"?n:{[this.label]:n}},pushTag(n){this.pushedTags.push(n)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:n,multiple:e}=this;this.clearSearchOnBlur({clearSearchOnSelect:n,multiple:e})&&(this.search=""),this.closeSearchOptions();return}if(this.search.length===0&&this.options.length===0){this.closeSearchOptions();return}},onSearchFocus(){this.open=!0,this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onSearchKeyDown(n){const e=r=>(r.preventDefault(),!this.isComposing&&this.typeAheadSelect()),t={8:r=>this.maybeDeleteValue(),9:r=>this.onTab(),27:r=>this.onEscape(),38:r=>(r.preventDefault(),this.typeAheadUp()),40:r=>(r.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(r=>t[r]=e);const i=this.mapKeydown(t,this);if(typeof i[n.keyCode]=="function")return i[n.keyCode](n)}}},Ng=["dir"],Vg=["id","aria-expanded","aria-owns"],Hg={ref:"selectedOptions",class:"vs__selected-options"},zg=["disabled","title","aria-label","onClick"],Ig={ref:"actions",class:"vs__actions"},$g=["disabled"],jg={class:"vs__spinner"},Wg=["id"],Gg=["id","aria-selected","onMouseover","onClick"],Yg={key:0,class:"vs__no-options"},Ug=l.createTextVNode(" Sorry, no matching options. "),qg=["id"];function Kg(n,e,t,i,r,s){const a=l.resolveDirective("append-to-body");return l.openBlock(),l.createElementBlock("div",{dir:t.dir,class:l.normalizeClass(["v-select",s.stateClasses])},[l.renderSlot(n.$slots,"header",l.normalizeProps(l.guardReactiveProps(s.scope.header))),l.createElementVNode("div",{id:`vs${t.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":s.dropdownOpen.toString(),"aria-owns":`vs${t.uid}__listbox`,"aria-label":"Search for option",onMousedown:e[1]||(e[1]=o=>s.toggleDropdown(o))},[l.createElementVNode("div",Hg,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.selectedValue,(o,u)=>l.renderSlot(n.$slots,"selected-option-container",{option:s.normalizeOptionForSlot(o),deselect:s.deselect,multiple:t.multiple,disabled:t.disabled},()=>[(l.openBlock(),l.createElementBlock("span",{key:t.getOptionKey(o),class:"vs__selected"},[l.renderSlot(n.$slots,"selected-option",l.normalizeProps(l.guardReactiveProps(s.normalizeOptionForSlot(o))),()=>[l.createTextVNode(l.toDisplayString(t.getOptionLabel(o)),1)]),t.multiple?(l.openBlock(),l.createElementBlock("button",{key:0,ref_for:!0,ref:c=>r.deselectButtons[u]=c,disabled:t.disabled,type:"button",class:"vs__deselect",title:`Deselect ${t.getOptionLabel(o)}`,"aria-label":`Deselect ${t.getOptionLabel(o)}`,onClick:c=>s.deselect(o)},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(s.childComponents.Deselect)))],8,zg)):l.createCommentVNode("",!0)]))])),256)),l.renderSlot(n.$slots,"search",l.normalizeProps(l.guardReactiveProps(s.scope.search)),()=>[l.createElementVNode("input",l.mergeProps({class:"vs__search"},s.scope.search.attributes,l.toHandlers(s.scope.search.events)),null,16)])],512),l.createElementVNode("div",Ig,[l.withDirectives(l.createElementVNode("button",{ref:"clearButton",disabled:t.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:e[0]||(e[0]=(...o)=>s.clearSelection&&s.clearSelection(...o))},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(s.childComponents.Deselect)))],8,$g),[[l.vShow,s.showClearButton]]),l.renderSlot(n.$slots,"open-indicator",l.normalizeProps(l.guardReactiveProps(s.scope.openIndicator)),()=>[t.noDrop?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.resolveDynamicComponent(s.childComponents.OpenIndicator),l.normalizeProps(l.mergeProps({key:0},s.scope.openIndicator.attributes)),null,16))]),l.renderSlot(n.$slots,"spinner",l.normalizeProps(l.guardReactiveProps(s.scope.spinner)),()=>[l.withDirectives(l.createElementVNode("div",jg,"Loading...",512),[[l.vShow,n.mutableLoading]])])],512)],40,Vg),l.createVNode(l.Transition,{name:t.transition},{default:l.withCtx(()=>[s.dropdownOpen?l.withDirectives((l.openBlock(),l.createElementBlock("ul",{id:`vs${t.uid}__listbox`,ref:"dropdownMenu",key:`vs${t.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:e[2]||(e[2]=l.withModifiers((...o)=>s.onMousedown&&s.onMousedown(...o),["prevent"])),onMouseup:e[3]||(e[3]=(...o)=>s.onMouseUp&&s.onMouseUp(...o))},[l.renderSlot(n.$slots,"list-header",l.normalizeProps(l.guardReactiveProps(s.scope.listHeader))),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.filteredOptions,(o,u)=>(l.openBlock(),l.createElementBlock("li",{id:`vs${t.uid}__option-${u}`,key:t.getOptionKey(o),role:"option",class:l.normalizeClass(["vs__dropdown-option",{"vs__dropdown-option--deselect":s.isOptionDeselectable(o)&&u===n.typeAheadPointer,"vs__dropdown-option--selected":s.isOptionSelected(o),"vs__dropdown-option--highlight":u===n.typeAheadPointer,"vs__dropdown-option--disabled":!t.selectable(o)}]),"aria-selected":u===n.typeAheadPointer?!0:null,onMouseover:c=>t.selectable(o)?n.typeAheadPointer=u:null,onClick:l.withModifiers(c=>t.selectable(o)?s.select(o):null,["prevent","stop"])},[l.renderSlot(n.$slots,"option",l.normalizeProps(l.guardReactiveProps(s.normalizeOptionForSlot(o))),()=>[l.createTextVNode(l.toDisplayString(t.getOptionLabel(o)),1)])],42,Gg))),128)),s.filteredOptions.length===0?(l.openBlock(),l.createElementBlock("li",Yg,[l.renderSlot(n.$slots,"no-options",l.normalizeProps(l.guardReactiveProps(s.scope.noOptions)),()=>[Ug])])):l.createCommentVNode("",!0),l.renderSlot(n.$slots,"list-footer",l.normalizeProps(l.guardReactiveProps(s.scope.listFooter)))],40,Wg)),[[a]]):(l.openBlock(),l.createElementBlock("ul",{key:1,id:`vs${t.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,qg))]),_:3},8,["name"]),l.renderSlot(n.$slots,"footer",l.normalizeProps(l.guardReactiveProps(s.scope.footer)))],10,Ng)}const Jg=Us(Bg,[["render",Kg]]);var dt="top",kt="bottom",St="right",ht="left",qs="auto",Zi=[dt,kt,St,ht],Ti="start",Qi="end",Xg="clippingParents",Wu="viewport",en="popper",Zg="reference",Gu=Zi.reduce(function(n,e){return n.concat([e+"-"+Ti,e+"-"+Qi])},[]),Yu=[].concat(Zi,[qs]).reduce(function(n,e){return n.concat([e,e+"-"+Ti,e+"-"+Qi])},[]),Qg="beforeRead",eb="read",tb="afterRead",ib="beforeMain",nb="main",rb="afterMain",sb="beforeWrite",ab="write",ob="afterWrite",lb=[Qg,eb,tb,ib,nb,rb,sb,ab,ob];function Bt(n){return n?(n.nodeName||"").toLowerCase():null}function bt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function fi(n){var e=bt(n).Element;return n instanceof e||n instanceof Element}function xt(n){var e=bt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function Ks(n){if(typeof ShadowRoot>"u")return!1;var e=bt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function ub(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},r=e.attributes[t]||{},s=e.elements[t];!xt(s)||!Bt(s)||(Object.assign(s.style,i),Object.keys(r).forEach(function(a){var o=r[a];o===!1?s.removeAttribute(a):s.setAttribute(a,o===!0?"":o)}))})}function cb(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var r=e.elements[i],s=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),o=a.reduce(function(u,c){return u[c]="",u},{});!xt(r)||!Bt(r)||(Object.assign(r.style,o),Object.keys(s).forEach(function(u){r.removeAttribute(u)}))})}}const db={name:"applyStyles",enabled:!0,phase:"write",fn:ub,effect:cb,requires:["computeStyles"]};function Nt(n){return n.split("-")[0]}var pi=Math.max,jn=Math.min,Di=Math.round;function Js(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Uu(){return!/^((?!chrome|android).)*safari/i.test(Js())}function Oi(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=n.getBoundingClientRect(),r=1,s=1;e&&xt(n)&&(r=n.offsetWidth>0&&Di(i.width)/n.offsetWidth||1,s=n.offsetHeight>0&&Di(i.height)/n.offsetHeight||1);var a=fi(n)?bt(n):window,o=a.visualViewport,u=!Uu()&&t,c=(i.left+(u&&o?o.offsetLeft:0))/r,d=(i.top+(u&&o?o.offsetTop:0))/s,p=i.width/r,h=i.height/s;return{width:p,height:h,top:d,right:c+p,bottom:d+h,left:c,x:c,y:d}}function Xs(n){var e=Oi(n),t=n.offsetWidth,i=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:i}}function qu(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&Ks(t)){var i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Jt(n){return bt(n).getComputedStyle(n)}function hb(n){return["table","td","th"].indexOf(Bt(n))>=0}function ni(n){return((fi(n)?n.ownerDocument:n.document)||window.document).documentElement}function Wn(n){return Bt(n)==="html"?n:n.assignedSlot||n.parentNode||(Ks(n)?n.host:null)||ni(n)}function Ku(n){return!xt(n)||Jt(n).position==="fixed"?null:n.offsetParent}function fb(n){var e=/firefox/i.test(Js()),t=/Trident/i.test(Js());if(t&&xt(n)){var i=Jt(n);if(i.position==="fixed")return null}var r=Wn(n);for(Ks(r)&&(r=r.host);xt(r)&&["html","body"].indexOf(Bt(r))<0;){var s=Jt(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function tn(n){for(var e=bt(n),t=Ku(n);t&&hb(t)&&Jt(t).position==="static";)t=Ku(t);return t&&(Bt(t)==="html"||Bt(t)==="body"&&Jt(t).position==="static")?e:t||fb(n)||e}function Zs(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function nn(n,e,t){return pi(n,jn(e,t))}function pb(n,e,t){var i=nn(n,e,t);return i>t?t:i}function Ju(){return{top:0,right:0,bottom:0,left:0}}function Xu(n){return Object.assign({},Ju(),n)}function Zu(n,e){return e.reduce(function(t,i){return t[i]=n,t},{})}var mb=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Xu(typeof e!="number"?e:Zu(e,Zi))};function gb(n){var e,t=n.state,i=n.name,r=n.options,s=t.elements.arrow,a=t.modifiersData.popperOffsets,o=Nt(t.placement),u=Zs(o),c=[ht,St].indexOf(o)>=0,d=c?"height":"width";if(!(!s||!a)){var p=mb(r.padding,t),h=Xs(s),f=u==="y"?dt:ht,_=u==="y"?kt:St,k=t.rects.reference[d]+t.rects.reference[u]-a[u]-t.rects.popper[d],C=a[u]-t.rects.reference[u],y=tn(s),v=y?u==="y"?y.clientHeight||0:y.clientWidth||0:0,R=k/2-C/2,m=p[f],x=v-h[d]-p[_],g=v/2-h[d]/2+R,S=nn(m,g,x),w=u;t.modifiersData[i]=(e={},e[w]=S,e.centerOffset=S-g,e)}}function bb(n){var e=n.state,t=n.options,i=t.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||qu(e.elements.popper,r)&&(e.elements.arrow=r))}const vb={name:"arrow",enabled:!0,phase:"main",fn:gb,effect:bb,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Li(n){return n.split("-")[1]}var yb={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wb(n,e){var t=n.x,i=n.y,r=e.devicePixelRatio||1;return{x:Di(t*r)/r||0,y:Di(i*r)/r||0}}function Qu(n){var e,t=n.popper,i=n.popperRect,r=n.placement,s=n.variation,a=n.offsets,o=n.position,u=n.gpuAcceleration,c=n.adaptive,d=n.roundOffsets,p=n.isFixed,h=a.x,f=h===void 0?0:h,_=a.y,k=_===void 0?0:_,C=typeof d=="function"?d({x:f,y:k}):{x:f,y:k};f=C.x,k=C.y;var y=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),R=ht,m=dt,x=window;if(c){var g=tn(t),S="clientHeight",w="clientWidth";if(g===bt(t)&&(g=ni(t),Jt(g).position!=="static"&&o==="absolute"&&(S="scrollHeight",w="scrollWidth")),g=g,r===dt||(r===ht||r===St)&&s===Qi){m=kt;var E=p&&g===x&&x.visualViewport?x.visualViewport.height:g[S];k-=E-i.height,k*=u?1:-1}if(r===ht||(r===dt||r===kt)&&s===Qi){R=St;var b=p&&g===x&&x.visualViewport?x.visualViewport.width:g[w];f-=b-i.width,f*=u?1:-1}}var T=Object.assign({position:o},c&&yb),M=d===!0?wb({x:f,y:k},bt(t)):{x:f,y:k};if(f=M.x,k=M.y,u){var O;return Object.assign({},T,(O={},O[m]=v?"0":"",O[R]=y?"0":"",O.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+k+"px)":"translate3d("+f+"px, "+k+"px, 0)",O))}return Object.assign({},T,(e={},e[m]=v?k+"px":"",e[R]=y?f+"px":"",e.transform="",e))}function Cb(n){var e=n.state,t=n.options,i=t.gpuAcceleration,r=i===void 0?!0:i,s=t.adaptive,a=s===void 0?!0:s,o=t.roundOffsets,u=o===void 0?!0:o,c={placement:Nt(e.placement),variation:Li(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,Qu(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Qu(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Eb={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Cb,data:{}};var Gn={passive:!0};function kb(n){var e=n.state,t=n.instance,i=n.options,r=i.scroll,s=r===void 0?!0:r,a=i.resize,o=a===void 0?!0:a,u=bt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach(function(d){d.addEventListener("scroll",t.update,Gn)}),o&&u.addEventListener("resize",t.update,Gn),function(){s&&c.forEach(function(d){d.removeEventListener("scroll",t.update,Gn)}),o&&u.removeEventListener("resize",t.update,Gn)}}const Sb={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kb,data:{}};var xb={left:"right",right:"left",bottom:"top",top:"bottom"};function Yn(n){return n.replace(/left|right|bottom|top/g,function(e){return xb[e]})}var _b={start:"end",end:"start"};function ec(n){return n.replace(/start|end/g,function(e){return _b[e]})}function Qs(n){var e=bt(n),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function ea(n){return Oi(ni(n)).left+Qs(n).scrollLeft}function Mb(n,e){var t=bt(n),i=ni(n),r=t.visualViewport,s=i.clientWidth,a=i.clientHeight,o=0,u=0;if(r){s=r.width,a=r.height;var c=Uu();(c||!c&&e==="fixed")&&(o=r.offsetLeft,u=r.offsetTop)}return{width:s,height:a,x:o+ea(n),y:u}}function Rb(n){var e,t=ni(n),i=Qs(n),r=(e=n.ownerDocument)==null?void 0:e.body,s=pi(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=pi(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-i.scrollLeft+ea(n),u=-i.scrollTop;return Jt(r||t).direction==="rtl"&&(o+=pi(t.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:o,y:u}}function ta(n){var e=Jt(n),t=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+r+i)}function tc(n){return["html","body","#document"].indexOf(Bt(n))>=0?n.ownerDocument.body:xt(n)&&ta(n)?n:tc(Wn(n))}function rn(n,e){var t;e===void 0&&(e=[]);var i=tc(n),r=i===((t=n.ownerDocument)==null?void 0:t.body),s=bt(i),a=r?[s].concat(s.visualViewport||[],ta(i)?i:[]):i,o=e.concat(a);return r?o:o.concat(rn(Wn(a)))}function ia(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Tb(n,e){var t=Oi(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function ic(n,e,t){return e===Wu?ia(Mb(n,t)):fi(e)?Tb(e,t):ia(Rb(ni(n)))}function Db(n){var e=rn(Wn(n)),t=["absolute","fixed"].indexOf(Jt(n).position)>=0,i=t&&xt(n)?tn(n):n;return fi(i)?e.filter(function(r){return fi(r)&&qu(r,i)&&Bt(r)!=="body"}):[]}function Ob(n,e,t,i){var r=e==="clippingParents"?Db(n):[].concat(e),s=[].concat(r,[t]),a=s[0],o=s.reduce(function(u,c){var d=ic(n,c,i);return u.top=pi(d.top,u.top),u.right=jn(d.right,u.right),u.bottom=jn(d.bottom,u.bottom),u.left=pi(d.left,u.left),u},ic(n,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function nc(n){var e=n.reference,t=n.element,i=n.placement,r=i?Nt(i):null,s=i?Li(i):null,a=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,u;switch(r){case dt:u={x:a,y:e.y-t.height};break;case kt:u={x:a,y:e.y+e.height};break;case St:u={x:e.x+e.width,y:o};break;case ht:u={x:e.x-t.width,y:o};break;default:u={x:e.x,y:e.y}}var c=r?Zs(r):null;if(c!=null){var d=c==="y"?"height":"width";switch(s){case Ti:u[c]=u[c]-(e[d]/2-t[d]/2);break;case Qi:u[c]=u[c]+(e[d]/2-t[d]/2);break}}return u}function sn(n,e){e===void 0&&(e={});var t=e,i=t.placement,r=i===void 0?n.placement:i,s=t.strategy,a=s===void 0?n.strategy:s,o=t.boundary,u=o===void 0?Xg:o,c=t.rootBoundary,d=c===void 0?Wu:c,p=t.elementContext,h=p===void 0?en:p,f=t.altBoundary,_=f===void 0?!1:f,k=t.padding,C=k===void 0?0:k,y=Xu(typeof C!="number"?C:Zu(C,Zi)),v=h===en?Zg:en,R=n.rects.popper,m=n.elements[_?v:h],x=Ob(fi(m)?m:m.contextElement||ni(n.elements.popper),u,d,a),g=Oi(n.elements.reference),S=nc({reference:g,element:R,placement:r}),w=ia(Object.assign({},R,S)),E=h===en?w:g,b={top:x.top-E.top+y.top,bottom:E.bottom-x.bottom+y.bottom,left:x.left-E.left+y.left,right:E.right-x.right+y.right},T=n.modifiersData.offset;if(h===en&&T){var M=T[r];Object.keys(b).forEach(function(O){var F=[St,kt].indexOf(O)>=0?1:-1,z=[dt,kt].indexOf(O)>=0?"y":"x";b[O]+=M[z]*F})}return b}function Lb(n,e){e===void 0&&(e={});var t=e,i=t.placement,r=t.boundary,s=t.rootBoundary,a=t.padding,o=t.flipVariations,u=t.allowedAutoPlacements,c=u===void 0?Yu:u,d=Li(i),p=d?o?Gu:Gu.filter(function(_){return Li(_)===d}):Zi,h=p.filter(function(_){return c.indexOf(_)>=0});h.length===0&&(h=p);var f=h.reduce(function(_,k){return _[k]=sn(n,{placement:k,boundary:r,rootBoundary:s,padding:a})[Nt(k)],_},{});return Object.keys(f).sort(function(_,k){return f[_]-f[k]})}function Pb(n){if(Nt(n)===qs)return[];var e=Yn(n);return[ec(n),e,ec(e)]}function Ab(n){var e=n.state,t=n.options,i=n.name;if(!e.modifiersData[i]._skip){for(var r=t.mainAxis,s=r===void 0?!0:r,a=t.altAxis,o=a===void 0?!0:a,u=t.fallbackPlacements,c=t.padding,d=t.boundary,p=t.rootBoundary,h=t.altBoundary,f=t.flipVariations,_=f===void 0?!0:f,k=t.allowedAutoPlacements,C=e.options.placement,y=Nt(C),v=y===C,R=u||(v||!_?[Yn(C)]:Pb(C)),m=[C].concat(R).reduce(function(Y,X){return Y.concat(Nt(X)===qs?Lb(e,{placement:X,boundary:d,rootBoundary:p,padding:c,flipVariations:_,allowedAutoPlacements:k}):X)},[]),x=e.rects.reference,g=e.rects.popper,S=new Map,w=!0,E=m[0],b=0;b<m.length;b++){var T=m[b],M=Nt(T),O=Li(T)===Ti,F=[dt,kt].indexOf(M)>=0,z=F?"width":"height",$=sn(e,{placement:T,boundary:d,rootBoundary:p,altBoundary:h,padding:c}),H=F?O?St:ht:O?kt:dt;x[z]>g[z]&&(H=Yn(H));var V=Yn(H),G=[];if(s&&G.push($[M]<=0),o&&G.push($[H]<=0,$[V]<=0),G.every(function(Y){return Y})){E=T,w=!1;break}S.set(T,G)}if(w)for(var D=_?3:1,P=function(X){var ne=m.find(function(se){var W=S.get(se);if(W)return W.slice(0,X).every(function(B){return B})});if(ne)return E=ne,"break"},I=D;I>0;I--){var N=P(I);if(N==="break")break}e.placement!==E&&(e.modifiersData[i]._skip=!0,e.placement=E,e.reset=!0)}}const Fb={name:"flip",enabled:!0,phase:"main",fn:Ab,requiresIfExists:["offset"],data:{_skip:!1}};function rc(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function sc(n){return[dt,St,kt,ht].some(function(e){return n[e]>=0})}function Bb(n){var e=n.state,t=n.name,i=e.rects.reference,r=e.rects.popper,s=e.modifiersData.preventOverflow,a=sn(e,{elementContext:"reference"}),o=sn(e,{altBoundary:!0}),u=rc(a,i),c=rc(o,r,s),d=sc(u),p=sc(c);e.modifiersData[t]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const Nb={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Bb};function Vb(n,e,t){var i=Nt(n),r=[ht,dt].indexOf(i)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,a=s[0],o=s[1];return a=a||0,o=(o||0)*r,[ht,St].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function Hb(n){var e=n.state,t=n.options,i=n.name,r=t.offset,s=r===void 0?[0,0]:r,a=Yu.reduce(function(d,p){return d[p]=Vb(p,e.rects,s),d},{}),o=a[e.placement],u=o.x,c=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=a}const zb={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Hb};function Ib(n){var e=n.state,t=n.name;e.modifiersData[t]=nc({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const $b={name:"popperOffsets",enabled:!0,phase:"read",fn:Ib,data:{}};function jb(n){return n==="x"?"y":"x"}function Wb(n){var e=n.state,t=n.options,i=n.name,r=t.mainAxis,s=r===void 0?!0:r,a=t.altAxis,o=a===void 0?!1:a,u=t.boundary,c=t.rootBoundary,d=t.altBoundary,p=t.padding,h=t.tether,f=h===void 0?!0:h,_=t.tetherOffset,k=_===void 0?0:_,C=sn(e,{boundary:u,rootBoundary:c,padding:p,altBoundary:d}),y=Nt(e.placement),v=Li(e.placement),R=!v,m=Zs(y),x=jb(m),g=e.modifiersData.popperOffsets,S=e.rects.reference,w=e.rects.popper,E=typeof k=="function"?k(Object.assign({},e.rects,{placement:e.placement})):k,b=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(g){if(s){var O,F=m==="y"?dt:ht,z=m==="y"?kt:St,$=m==="y"?"height":"width",H=g[m],V=H+C[F],G=H-C[z],D=f?-w[$]/2:0,P=v===Ti?S[$]:w[$],I=v===Ti?-w[$]:-S[$],N=e.elements.arrow,Y=f&&N?Xs(N):{width:0,height:0},X=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ju(),ne=X[F],se=X[z],W=nn(0,S[$],Y[$]),B=R?S[$]/2-D-W-ne-b.mainAxis:P-W-ne-b.mainAxis,Z=R?-S[$]/2+D+W+se+b.mainAxis:I+W+se+b.mainAxis,K=e.elements.arrow&&tn(e.elements.arrow),U=K?m==="y"?K.clientTop||0:K.clientLeft||0:0,le=(O=T?.[m])!=null?O:0,re=H+B-le-U,te=H+Z-le,fe=nn(f?jn(V,re):V,H,f?pi(G,te):G);g[m]=fe,M[m]=fe-H}if(o){var we,Ae=m==="x"?dt:ht,Fe=m==="x"?kt:St,Ne=g[x],ae=x==="y"?"height":"width",q=Ne+C[Ae],ie=Ne-C[Fe],ue=[dt,ht].indexOf(y)!==-1,oe=(we=T?.[x])!=null?we:0,ve=ue?q:Ne-S[ae]-w[ae]-oe+b.altAxis,Re=ue?Ne+S[ae]+w[ae]-oe-b.altAxis:ie,Se=f&&ue?pb(ve,Ne,Re):nn(f?ve:q,Ne,f?Re:ie);g[x]=Se,M[x]=Se-Ne}e.modifiersData[i]=M}}const Gb={name:"preventOverflow",enabled:!0,phase:"main",fn:Wb,requiresIfExists:["offset"]};function Yb(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Ub(n){return n===bt(n)||!xt(n)?Qs(n):Yb(n)}function qb(n){var e=n.getBoundingClientRect(),t=Di(e.width)/n.offsetWidth||1,i=Di(e.height)/n.offsetHeight||1;return t!==1||i!==1}function Kb(n,e,t){t===void 0&&(t=!1);var i=xt(e),r=xt(e)&&qb(e),s=ni(e),a=Oi(n,r,t),o={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!t)&&((Bt(e)!=="body"||ta(s))&&(o=Ub(e)),xt(e)?(u=Oi(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):s&&(u.x=ea(s))),{x:a.left+o.scrollLeft-u.x,y:a.top+o.scrollTop-u.y,width:a.width,height:a.height}}function Jb(n){var e=new Map,t=new Set,i=[];n.forEach(function(s){e.set(s.name,s)});function r(s){t.add(s.name);var a=[].concat(s.requires||[],s.requiresIfExists||[]);a.forEach(function(o){if(!t.has(o)){var u=e.get(o);u&&r(u)}}),i.push(s)}return n.forEach(function(s){t.has(s.name)||r(s)}),i}function Xb(n){var e=Jb(n);return lb.reduce(function(t,i){return t.concat(e.filter(function(r){return r.phase===i}))},[])}function Zb(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function Qb(n){var e=n.reduce(function(t,i){var r=t[i.name];return t[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var ac={placement:"bottom",modifiers:[],strategy:"absolute"};function oc(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function ev(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,i=t===void 0?[]:t,r=e.defaultOptions,s=r===void 0?ac:r;return function(o,u,c){c===void 0&&(c=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},ac,s),modifiersData:{},elements:{reference:o,popper:u},attributes:{},styles:{}},p=[],h=!1,f={state:d,setOptions:function(y){var v=typeof y=="function"?y(d.options):y;k(),d.options=Object.assign({},s,d.options,v),d.scrollParents={reference:fi(o)?rn(o):o.contextElement?rn(o.contextElement):[],popper:rn(u)};var R=Xb(Qb([].concat(i,d.options.modifiers)));return d.orderedModifiers=R.filter(function(m){return m.enabled}),_(),f.update()},forceUpdate:function(){if(!h){var y=d.elements,v=y.reference,R=y.popper;if(oc(v,R)){d.rects={reference:Kb(v,tn(R),d.options.strategy==="fixed"),popper:Xs(R)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(b){return d.modifiersData[b.name]=Object.assign({},b.data)});for(var m=0;m<d.orderedModifiers.length;m++){if(d.reset===!0){d.reset=!1,m=-1;continue}var x=d.orderedModifiers[m],g=x.fn,S=x.options,w=S===void 0?{}:S,E=x.name;typeof g=="function"&&(d=g({state:d,options:w,name:E,instance:f})||d)}}}},update:Zb(function(){return new Promise(function(C){f.forceUpdate(),C(d)})}),destroy:function(){k(),h=!0}};if(!oc(o,u))return f;f.setOptions(c).then(function(C){!h&&c.onFirstUpdate&&c.onFirstUpdate(C)});function _(){d.orderedModifiers.forEach(function(C){var y=C.name,v=C.options,R=v===void 0?{}:v,m=C.effect;if(typeof m=="function"){var x=m({state:d,name:y,instance:f,options:R}),g=function(){};p.push(x||g)}})}function k(){p.forEach(function(C){return C()}),p=[]}return f}}var tv=[Sb,$b,Eb,db,zb,Fb,Gb,vb,Nb],iv=ev({defaultModifiers:tv});function nv(n,e,{width:t}){n.style.width=t;const i=iv(e.$refs.toggle,n,{placement:e.$attrs.placement,modifiers:[{name:"offset",options:{offset:[0,-1]}},{name:"toggleClass",enabled:!0,phase:"write",fn({state:r}){e.$el.classList.toggle("drop-up",r.placement==="top")}}]});return()=>i.destroy()}const rv={class:"text-muted"},sv={key:0,class:"py-1"},av={class:"text-wrap"},ov=["innerHTML"],lv={key:1,class:"text-muted p-0"},uv={class:"text-wrap"},cv={key:2,class:"text-muted p-0 small d-flex justify-content-center"},dv={class:"text-wrap px-2"},hv={class:"selected"},fv=["innerHTML"],pv={key:0,style:{"border-left-color":"rgba(88, 151, 251, 0.71)"},class:"vs__spinner"},Xt={__name:"VSelect",props:{modelValue:[String,Object,Number],reduce:{type:Function,default:n=>n.id},hint:{type:String,default:""},classes:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},title:{type:String},disabled:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!0},searchTimout:{type:Number,default:1e3},dropDownPlacement:{type:String,default:"bottom",validator(n,e){return["bottom","top"].includes(n)}},error:{type:[Array,String],default:null}},emits:["update:modelValue","search","blur","focus"],setup(n,{emit:e}){const t=e,i=n,r=i.multiple?[]:null;l.getCurrentInstance();const s=l.ref(r),a=$s(u,i.searchTimout),o=l.computed(()=>{const p=ii(i.options);return p?p.map(h=>{const f=i.modelValue;return f?{...h,disabled:h.id===f}:h}):[]});function u(p){t("search",p)}const c=p=>!(!p.id||p.disabled),d=l.computed(()=>Array.isArray(i.error)?i.error?.filter(Boolean):typeof i.error=="string"&&i.error?[i.error]:[]);return l.watch(()=>i.modelValue,p=>{s.value=i.modelValue},{deep:!0}),l.watch(()=>s.value,p=>{t("update:modelValue",p)},{deep:!0}),l.onMounted(()=>{s.value=i.modelValue}),(p,h)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[n.title?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(p.titleClass)},l.toDisplayString(n.title),3)):l.createCommentVNode("",!0),l.createVNode(l.unref(Jg),l.mergeProps({class:"style-chooser"},p.$attrs,{modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=f=>s.value=f),reduce:n.reduce,options:o.value,multiple:n.multiple,placeholder:n.placeholder,disabled:n.disabled,loading:n.isLoading,clearable:n.allowClear,placement:n.dropDownPlacement,appendToBody:n.dropDownPlacement==="top","calculate-position":l.unref(nv),selectable:f=>c(f),"onSearch:blur":h[1]||(h[1]=f=>t("blur")),"onSearch:focus":h[2]||(h[2]=f=>t("focus")),onSearch:l.unref(a),class:[...n.classes,n.error?"not-valid":""]}),{"no-options":l.withCtx(({search:f,searching:_,loading:k})=>[l.createElementVNode("span",rv,l.toDisplayString(n.hint),1)]),option:l.withCtx(({label:f,html:_,id:k,disabled:C})=>[k?(l.openBlock(),l.createElementBlock("div",sv,[l.createElementVNode("div",av,l.toDisplayString(f),1),_?(l.openBlock(),l.createElementBlock("div",{key:0,innerHTML:_},null,8,ov)):l.createCommentVNode("",!0)])):C?(l.openBlock(),l.createElementBlock("div",lv,[l.createElementVNode("div",uv,l.toDisplayString(f)+"disabled",1)])):(l.openBlock(),l.createElementBlock("div",cv,[h[3]||(h[3]=l.createElementVNode("span",null,"-",-1)),l.createElementVNode("span",dv,l.toDisplayString(f),1),h[4]||(h[4]=l.createElementVNode("span",null,"-",-1))]))]),"selected-option":l.withCtx(({label:f,html:_})=>[l.createElementVNode("div",hv,[l.createElementVNode("div",null,l.toDisplayString(f),1),_?(l.openBlock(),l.createElementBlock("div",{key:0,innerHTML:_},null,8,fv)):l.createCommentVNode("",!0)])]),spinner:l.withCtx(({loading:f})=>[f?(l.openBlock(),l.createElementBlock("div",pv)):l.createCommentVNode("",!0)]),_:1},16,["modelValue","reduce","options","multiple","placeholder","disabled","loading","clearable","placement","appendToBody","calculate-position","selectable","onSearch","class"]),l.createVNode(hi,{errors:d.value},null,8,["errors"])],64))}},mv={class:"form-check"},gv=["type","id","name"],bv=["for"],lc=Ve(l.defineComponent({__name:"BooleanCheckbox",props:{defaultValue:{default:null},trueValue:{default:"1"},modelValue:{default:void 0},name:{default:""},group:{default:""},type:{default:"checkbox"},label:{default:""},error:{default:""},setFilterParamsStringsHandler:{type:Function,default:void 0}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.ref(),s=di(),a=l.computed(()=>t.group.length?t.group:t.name),o=()=>{i("update:modelValue",r.value?.checked?t.trueValue:t.defaultValue)},u=l.computed(()=>!t.modelValue||t.modelValue!==t.trueValue?(r.value&&(r.value.checked=!1),c(),null):(r.value&&(r.value.checked=!0),c(),!0)),c=()=>{if(!t.setFilterParamsStringsHandler)return!1;const p=r.value?.checked?"Да":null;t.setFilterParamsStringsHandler(t.name,p)},d=l.computed(()=>Array.isArray(t.error)?t.error?.filter(Boolean)||[]:typeof t.error=="string"&&t.error?[t.error]:[]);return l.watch(()=>t.modelValue,p=>{r.value&&(r.value.checked=!!p)}),(p,h)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",mv,[(l.openBlock(),l.createElementBlock("input",{class:l.normalizeClass(["form-check-input",[p.error?"not-valid":""]]),ref_key:"input",ref:r,type:p.type,id:String(l.unref(s)),name:a.value,key:String(u.value),onClick:o},null,10,gv)),l.createElementVNode("label",{class:l.normalizeClass(["form-check-label",[p.error?"text-danger":""]]),for:String(l.unref(s))},l.toDisplayString(p.label),11,bv)]),l.createVNode(hi,{errors:d.value},null,8,["errors"])],64))}}),[["__scopeId","data-v-b2a37180"]]),vv={class:"multi-checkbox"},yv=["checked","onClick","id","value","name"],wv=["for"],Cv=Ve(l.defineComponent({__name:"MultiCheckbox",props:{modelValue:{default:()=>[]},inputClass:{default:""},options:{default:()=>[]},error:{default:""},setFilterParamsStringsHandler:{type:Function,default:void 0},name:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.toRef(t,"modelValue"),s=l.toRef(t,"options"),a=l.toRef(t,"name");function o(p,h){const f=String(h);let _=[...r.value];r.value.includes(f)?_=r.value.filter(k=>String(k)!==f):_.push(f),i("update:modelValue",_)}const u=l.computed(()=>p=>r.value.includes(String(p)));function c(p){if(!t.setFilterParamsStringsHandler)return;let h=p.map(_=>String(_));const f=s.value.filter(_=>h.includes(String(_.id))).map(_=>_.text);if(h.length===0){t.setFilterParamsStringsHandler(a.value,null);return}t.setFilterParamsStringsHandler(a.value,f.join(", "))}const d=l.computed(()=>Array.isArray(t.error)?t.error?.filter(Boolean)||[]:typeof t.error=="string"&&t.error?[t.error]:[]);return l.watch(()=>r.value,p=>{c(p)},{deep:!0}),(p,h)=>(l.openBlock(),l.createElementBlock("div",vv,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,f=>(l.openBlock(),l.createElementBlock("div",{class:"form-check",key:f.id},[l.createElementVNode("input",{class:l.normalizeClass(["form-check-input",[p.inputClass,{"not-valid":p.error}]]),type:"checkbox",checked:u.value(f.id),onClick:_=>o(_,f.id),id:`${a.value}-${f.id}`,value:f.id,name:`${a.value}-${f.id}`},null,10,yv),l.createElementVNode("label",{class:"form-check-label d-block",for:`${a.value}-${f.id}`},l.toDisplayString(f.text),9,wv)]))),128)),l.createVNode(hi,{errors:d.value},null,8,["errors"])]))}}),[["__scopeId","data-v-e23ac74b"]]),Ev={class:"multi-input"},kv={class:"col"},Sv={class:"col-auto"},xv=["onClick"],_v=Ve(l.defineComponent({__name:"MultiInput",props:{modelValue:{default:()=>[]},title:{default:""},setFilterParamsStringsHandler:{type:Function,default:void 0},name:{default:""},placeholder:{default:""},disabled:{type:Boolean,default:!1},inputClass:{default:""},error:{default:""},maskOptions:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.toRef(t,"modelValue");l.toRef(t,"title");const s=l.toRef(t,"placeholder");l.toRef(t,"disabled");const a=l.toRef(t,"error"),o=l.toRef(t,"maskOptions"),u=l.ref([]),c=l.ref(!1),d={value:"",disabled:!1,uniqueKey:1};function p(){const y=ii(d);y.uniqueKey=di(),u.value.push(y)}function h(y,v){y.value=v}const f=l.computed(()=>u.value.length>1);function _(y){u.value=u.value.filter(v=>v.uniqueKey!==y.uniqueKey)}function k(){u.value=[],p()}function C(y){const v=y.map(m=>m.value);if(i("update:modelValue",v),!t.setFilterParamsStringsHandler)return;const R=v.filter(m=>m&&m.length>0);if(R.length===0){t.setFilterParamsStringsHandler(t.name,null);return}t.setFilterParamsStringsHandler(t.name,R.join(", "))}return l.watch(()=>u.value,y=>{c.value||C(y)},{deep:!0}),l.watch(()=>r.value,y=>{c.value=!0,!y||y.length===0?k():u.value.length!==y.length?u.value=y.map((v,R)=>({value:v,disabled:!1,uniqueKey:di()+R})):y.forEach((v,R)=>{u.value[R]&&(u.value[R].value=v)}),l.nextTick(()=>{c.value=!1})},{deep:!0}),l.onMounted(()=>{r.value&&r.value.length>0?u.value=r.value.map((y,v)=>({value:y,disabled:!1,uniqueKey:di()+v})):p()}),(y,v)=>(l.openBlock(),l.createElementBlock("div",Ev,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value,(R,m)=>(l.openBlock(),l.createElementBlock("div",{class:"row mb-2",key:R.uniqueKey},[l.createElementVNode("div",kv,[l.createVNode($n,{"model-value":R.value,"onUpdate:modelValue":x=>h(R,x),name:y.name,placeholder:s.value,class:l.normalizeClass(y.inputClass),disabled:R.disabled,"mask-options":o.value,error:a.value},null,8,["model-value","onUpdate:modelValue","name","placeholder","class","disabled","mask-options","error"])]),l.createElementVNode("div",Sv,[f.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"d-flex remove-button p-2",style:{cursor:"pointer"},onClick:x=>_(R)},[...v[0]||(v[0]=[l.createElementVNode("i",{class:"bi bi-trash-fill"},null,-1)])],8,xv)):l.createCommentVNode("",!0)])]))),128)),l.createVNode(Ca,{onClick:p})]))}}),[["__scopeId","data-v-9337052b"]]);var na=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Pi={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},an={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},ft=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},_t=function(n){return n===!0?1:0};function uc(n,e){var t;return function(){var i=this,r=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,r)},e)}}var ra=function(n){return n instanceof Array?n:[n]};function ut(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function Ge(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function Un(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function cc(n,e){if(e(n))return n;if(n.parentNode)return cc(n.parentNode,e)}function qn(n,e){var t=Ge("div","numInputWrapper"),i=Ge("input","numInput "+n),r=Ge("span","arrowUp"),s=Ge("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var a in e)i.setAttribute(a,e[a]);return t.appendChild(i),t.appendChild(r),t.appendChild(s),t}function vt(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var sa=function(){},Kn=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},Mv={D:sa,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*_t(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),r=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return r.setDate(r.getDate()-r.getDay()+t.firstDayOfWeek),r},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:sa,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:sa,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},mi={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},on={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[on.w(n,e,t)]},F:function(n,e,t){return Kn(on.n(n,e,t)-1,!1,e)},G:function(n,e,t){return ft(on.h(n,e,t))},H:function(n){return ft(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[_t(n.getHours()>11)]},M:function(n,e){return Kn(n.getMonth(),!0,e)},S:function(n){return ft(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return ft(n.getFullYear(),4)},d:function(n){return ft(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return ft(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return ft(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},dc=function(n){var e=n.config,t=e===void 0?Pi:e,i=n.l10n,r=i===void 0?an:i,s=n.isMobile,a=s===void 0?!1:s;return function(o,u,c){var d=c||r;return t.formatDate!==void 0&&!a?t.formatDate(o,u,d):u.split("").map(function(p,h,f){return on[p]&&f[h-1]!=="\\"?on[p](o,d,t):p!=="\\"?p:""}).join("")}},aa=function(n){var e=n.config,t=e===void 0?Pi:e,i=n.l10n,r=i===void 0?an:i;return function(s,a,o,u){if(!(s!==0&&!s)){var c=u||r,d,p=s;if(s instanceof Date)d=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)d=new Date(s);else if(typeof s=="string"){var h=a||(t||Pi).dateFormat,f=String(s).trim();if(f==="today")d=new Date,o=!0;else if(t&&t.parseDate)d=t.parseDate(s,h);else if(/Z$/.test(f)||/GMT$/.test(f))d=new Date(s);else{for(var _=void 0,k=[],C=0,y=0,v="";C<h.length;C++){var R=h[C],m=R==="\\",x=h[C-1]==="\\"||m;if(mi[R]&&!x){v+=mi[R];var g=new RegExp(v).exec(s);g&&(_=!0)&&k[R!=="Y"?"push":"unshift"]({fn:Mv[R],val:g[++y]})}else m||(v+=".")}d=!t||!t.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),k.forEach(function(S){var w=S.fn,E=S.val;return d=w(d,E,c)||d}),d=_?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){t.errorHandler(new Error("Invalid date provided: "+p));return}return o===!0&&d.setHours(0,0,0,0),d}}};function yt(n,e,t){return t===void 0&&(t=!0),t!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):n.getTime()-e.getTime()}var Rv=function(n,e,t){return n>Math.min(e,t)&&n<Math.max(e,t)},oa=function(n,e,t){return n*3600+e*60+t},Tv=function(n){var e=Math.floor(n/3600),t=(n-e*3600)/60;return[e,t,n-e*3600-t*60]},Dv={DAY:864e5};function la(n){var e=n.defaultHour,t=n.defaultMinute,i=n.defaultSeconds;if(n.minDate!==void 0){var r=n.minDate.getHours(),s=n.minDate.getMinutes(),a=n.minDate.getSeconds();e<r&&(e=r),e===r&&t<s&&(t=s),e===r&&t===s&&i<a&&(i=n.minDate.getSeconds())}if(n.maxDate!==void 0){var o=n.maxDate.getHours(),u=n.maxDate.getMinutes();e=Math.min(e,o),e===o&&(t=Math.min(u,t)),e===o&&t===u&&(i=n.maxDate.getSeconds())}return{hours:e,minutes:t,seconds:i}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var i=function(o){o&&Object.keys(o).forEach(function(u){return n[u]=o[u]})},r=0,s=e;r<s.length;r++){var a=s[r];i(a)}return n});var at=function(){return at=Object.assign||function(n){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},at.apply(this,arguments)},hc=function(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var i=Array(n),r=0,e=0;e<t;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,r++)i[r]=s[a];return i},Ov=300;function Lv(n,e){var t={config:at(at({},Pi),it.defaultConfig),l10n:an};t.parseDate=aa({config:t.config,l10n:t.l10n}),t._handlers=[],t.pluginElements=[],t.loadedPlugins=[],t._bind=k,t._setHoursFromDate=h,t._positionCalendar=Fe,t.changeMonth=P,t.changeYear=se,t.clear=I,t.close=N,t.onMouseOver=U,t._createElement=Ge,t.createDay=g,t.destroy=Y,t.isEnabled=W,t.jumpToDate=v,t.updateValue=ke,t.open=re,t.redraw=q,t.set=ve,t.setDate=Se,t.toggle=Zt;function i(){t.utils={getDaysInMonth:function(L,A){return L===void 0&&(L=t.currentMonth),A===void 0&&(A=t.currentYear),L===1&&(A%4===0&&A%100!==0||A%400===0)?29:t.l10n.daysInMonth[L]}}}function r(){t.element=t.input=n,t.isOpen=!1,fe(),Ae(),Le(),ce(),i(),t.isMobile||x(),y(),(t.selectedDates.length||t.config.noCalendar)&&(t.config.enableTime&&h(t.config.noCalendar?t.latestSelectedDateObj:void 0),ke(!1)),o();var L=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!t.isMobile&&L&&Fe(),Ue("onReady")}function s(){var L;return((L=t.calendarContainer)===null||L===void 0?void 0:L.getRootNode()).activeElement||document.activeElement}function a(L){return L.bind(t)}function o(){var L=t.config;L.weekNumbers===!1&&L.showMonths===1||L.noCalendar!==!0&&window.requestAnimationFrame(function(){if(t.calendarContainer!==void 0&&(t.calendarContainer.style.visibility="hidden",t.calendarContainer.style.display="block"),t.daysContainer!==void 0){var A=(t.days.offsetWidth+1)*L.showMonths;t.daysContainer.style.width=A+"px",t.calendarContainer.style.width=A+(t.weekWrapper!==void 0?t.weekWrapper.offsetWidth:0)+"px",t.calendarContainer.style.removeProperty("visibility"),t.calendarContainer.style.removeProperty("display")}})}function u(L){if(t.selectedDates.length===0){var A=t.config.minDate===void 0||yt(new Date,t.config.minDate)>=0?new Date:new Date(t.config.minDate.getTime()),j=la(t.config);A.setHours(j.hours,j.minutes,j.seconds,A.getMilliseconds()),t.selectedDates=[A],t.latestSelectedDateObj=A}L!==void 0&&L.type!=="blur"&&et(L);var ee=t._input.value;p(),ke(),t._input.value!==ee&&t._debouncedChange()}function c(L,A){return L%12+12*_t(A===t.l10n.amPM[1])}function d(L){switch(L%24){case 0:case 12:return 12;default:return L%12}}function p(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var L=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,A=(parseInt(t.minuteElement.value,10)||0)%60,j=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(L=c(L,t.amPM.textContent));var ee=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&yt(t.latestSelectedDateObj,t.config.minDate,!0)===0,de=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&yt(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var me=oa(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Te=oa(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),ye=oa(L,A,j);if(ye>Te&&ye<me){var De=Tv(me);L=De[0],A=De[1],j=De[2]}}else{if(de){var be=t.config.maxTime!==void 0?t.config.maxTime:t.config.maxDate;L=Math.min(L,be.getHours()),L===be.getHours()&&(A=Math.min(A,be.getMinutes())),A===be.getMinutes()&&(j=Math.min(j,be.getSeconds()))}if(ee){var xe=t.config.minTime!==void 0?t.config.minTime:t.config.minDate;L=Math.max(L,xe.getHours()),L===xe.getHours()&&A<xe.getMinutes()&&(A=xe.getMinutes()),A===xe.getMinutes()&&(j=Math.max(j,xe.getSeconds()))}}f(L,A,j)}}function h(L){var A=L||t.latestSelectedDateObj;A&&A instanceof Date&&f(A.getHours(),A.getMinutes(),A.getSeconds())}function f(L,A,j){t.latestSelectedDateObj!==void 0&&t.latestSelectedDateObj.setHours(L%24,A,j||0,0),!(!t.hourElement||!t.minuteElement||t.isMobile)&&(t.hourElement.value=ft(t.config.time_24hr?L:(12+L)%12+12*_t(L%12===0)),t.minuteElement.value=ft(A),t.amPM!==void 0&&(t.amPM.textContent=t.l10n.amPM[_t(L>=12)]),t.secondElement!==void 0&&(t.secondElement.value=ft(j)))}function _(L){var A=vt(L),j=parseInt(A.value)+(L.delta||0);(j/1e3>1||L.key==="Enter"&&!/[^\d]/.test(j.toString()))&&se(j)}function k(L,A,j,ee){if(A instanceof Array)return A.forEach(function(de){return k(L,de,j,ee)});if(L instanceof Array)return L.forEach(function(de){return k(de,A,j,ee)});L.addEventListener(A,j,ee),t._handlers.push({remove:function(){return L.removeEventListener(A,j,ee)}})}function C(){Ue("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(j){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+j+"]"),function(ee){return k(ee,"click",t[j])})}),t.isMobile){pn();return}var L=uc(le,50);if(t._debouncedChange=uc(C,Ov),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&k(t.daysContainer,"mouseover",function(j){t.config.mode==="range"&&U(vt(j))}),k(t._input,"keydown",K),t.calendarContainer!==void 0&&k(t.calendarContainer,"keydown",K),!t.config.inline&&!t.config.static&&k(window,"resize",L),window.ontouchstart!==void 0?k(window.document,"touchstart",ne):k(window.document,"mousedown",ne),k(window.document,"focus",ne,{capture:!0}),t.config.clickOpens===!0&&(k(t._input,"focus",t.open),k(t._input,"click",t.open)),t.daysContainer!==void 0&&(k(t.monthNav,"click",pt),k(t.monthNav,["keyup","increment"],_),k(t.daysContainer,"click",ue)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var A=function(j){return vt(j).select()};k(t.timeContainer,["increment"],u),k(t.timeContainer,"blur",u,{capture:!0}),k(t.timeContainer,"click",R),k([t.hourElement,t.minuteElement],["focus","click"],A),t.secondElement!==void 0&&k(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&k(t.amPM,"click",function(j){u(j)})}t.config.allowInput&&k(t._input,"blur",Z)}function v(L,A){var j=L!==void 0?t.parseDate(L):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate<t.now?t.config.maxDate:t.now),ee=t.currentYear,de=t.currentMonth;try{j!==void 0&&(t.currentYear=j.getFullYear(),t.currentMonth=j.getMonth())}catch(me){me.message="Invalid date supplied: "+j,t.config.errorHandler(me)}A&&t.currentYear!==ee&&(Ue("onYearChange"),O()),A&&(t.currentYear!==ee||t.currentMonth!==de)&&Ue("onMonthChange"),t.redraw()}function R(L){var A=vt(L);~A.className.indexOf("arrow")&&m(L,A.classList.contains("arrowUp")?1:-1)}function m(L,A,j){var ee=L&&vt(L),de=j||ee&&ee.parentNode&&ee.parentNode.firstChild,me=J("increment");me.delta=A,de&&de.dispatchEvent(me)}function x(){var L=window.document.createDocumentFragment();if(t.calendarContainer=Ge("div","flatpickr-calendar"),t.calendarContainer.tabIndex=-1,!t.config.noCalendar){if(L.appendChild($()),t.innerContainer=Ge("div","flatpickr-innerContainer"),t.config.weekNumbers){var A=D(),j=A.weekWrapper,ee=A.weekNumbers;t.innerContainer.appendChild(j),t.weekNumbers=ee,t.weekWrapper=j}t.rContainer=Ge("div","flatpickr-rContainer"),t.rContainer.appendChild(V()),t.daysContainer||(t.daysContainer=Ge("div","flatpickr-days"),t.daysContainer.tabIndex=-1),M(),t.rContainer.appendChild(t.daysContainer),t.innerContainer.appendChild(t.rContainer),L.appendChild(t.innerContainer)}t.config.enableTime&&L.appendChild(H()),ut(t.calendarContainer,"rangeMode",t.config.mode==="range"),ut(t.calendarContainer,"animate",t.config.animate===!0),ut(t.calendarContainer,"multiMonth",t.config.showMonths>1),t.calendarContainer.appendChild(L);var de=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!de&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var me=Ge("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(me,t.element),me.appendChild(t.element),t.altInput&&me.appendChild(t.altInput),me.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function g(L,A,j,ee){var de=W(A,!0),me=Ge("span",L,A.getDate().toString());return me.dateObj=A,me.$i=ee,me.setAttribute("aria-label",t.formatDate(A,t.config.ariaDateFormat)),L.indexOf("hidden")===-1&&yt(A,t.now)===0&&(t.todayDateElem=me,me.classList.add("today"),me.setAttribute("aria-current","date")),de?(me.tabIndex=-1,Q(A)&&(me.classList.add("selected"),t.selectedDateElem=me,t.config.mode==="range"&&(ut(me,"startRange",t.selectedDates[0]&&yt(A,t.selectedDates[0],!0)===0),ut(me,"endRange",t.selectedDates[1]&&yt(A,t.selectedDates[1],!0)===0),L==="nextMonthDay"&&me.classList.add("inRange")))):me.classList.add("flatpickr-disabled"),t.config.mode==="range"&&Be(A)&&!Q(A)&&me.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&L!=="prevMonthDay"&&ee%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+t.config.getWeek(A)+"</span>"),Ue("onDayCreate",me),me}function S(L){L.focus(),t.config.mode==="range"&&U(L)}function w(L){for(var A=L>0?0:t.config.showMonths-1,j=L>0?t.config.showMonths:-1,ee=A;ee!=j;ee+=L)for(var de=t.daysContainer.children[ee],me=L>0?0:de.children.length-1,Te=L>0?de.children.length:-1,ye=me;ye!=Te;ye+=L){var De=de.children[ye];if(De.className.indexOf("hidden")===-1&&W(De.dateObj))return De}}function E(L,A){for(var j=L.className.indexOf("Month")===-1?L.dateObj.getMonth():t.currentMonth,ee=A>0?t.config.showMonths:-1,de=A>0?1:-1,me=j-t.currentMonth;me!=ee;me+=de)for(var Te=t.daysContainer.children[me],ye=j-t.currentMonth===me?L.$i+A:A<0?Te.children.length-1:0,De=Te.children.length,be=ye;be>=0&&be<De&&be!=(A>0?De:-1);be+=de){var xe=Te.children[be];if(xe.className.indexOf("hidden")===-1&&W(xe.dateObj)&&Math.abs(L.$i-be)>=Math.abs(A))return S(xe)}t.changeMonth(de),b(w(de),0)}function b(L,A){var j=s(),ee=B(j||document.body),de=L!==void 0?L:ee?j:t.selectedDateElem!==void 0&&B(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&B(t.todayDateElem)?t.todayDateElem:w(A>0?1:-1);de===void 0?t._input.focus():ee?E(de,A):S(de)}function T(L,A){for(var j=(new Date(L,A,1).getDay()-t.l10n.firstDayOfWeek+7)%7,ee=t.utils.getDaysInMonth((A-1+12)%12,L),de=t.utils.getDaysInMonth(A,L),me=window.document.createDocumentFragment(),Te=t.config.showMonths>1,ye=Te?"prevMonthDay hidden":"prevMonthDay",De=Te?"nextMonthDay hidden":"nextMonthDay",be=ee+1-j,xe=0;be<=ee;be++,xe++)me.appendChild(g("flatpickr-day "+ye,new Date(L,A-1,be),be,xe));for(be=1;be<=de;be++,xe++)me.appendChild(g("flatpickr-day",new Date(L,A,be),be,xe));for(var Ye=de+1;Ye<=42-j&&(t.config.showMonths===1||xe%7!==0);Ye++,xe++)me.appendChild(g("flatpickr-day "+De,new Date(L,A+1,Ye%de),Ye,xe));var mt=Ge("div","dayContainer");return mt.appendChild(me),mt}function M(){if(t.daysContainer!==void 0){Un(t.daysContainer),t.weekNumbers&&Un(t.weekNumbers);for(var L=document.createDocumentFragment(),A=0;A<t.config.showMonths;A++){var j=new Date(t.currentYear,t.currentMonth,1);j.setMonth(t.currentMonth+A),L.appendChild(T(j.getFullYear(),j.getMonth()))}t.daysContainer.appendChild(L),t.days=t.daysContainer.firstChild,t.config.mode==="range"&&t.selectedDates.length===1&&U()}}function O(){if(!(t.config.showMonths>1||t.config.monthSelectorType!=="dropdown")){var L=function(ee){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&ee<t.config.minDate.getMonth()?!1:!(t.config.maxDate!==void 0&&t.currentYear===t.config.maxDate.getFullYear()&&ee>t.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var A=0;A<12;A++)if(L(A)){var j=Ge("option","flatpickr-monthDropdown-month");j.value=new Date(t.currentYear,A).getMonth().toString(),j.textContent=Kn(A,t.config.shorthandCurrentMonth,t.l10n),j.tabIndex=-1,t.currentMonth===A&&(j.selected=!0),t.monthsDropdownContainer.appendChild(j)}}}function F(){var L=Ge("div","flatpickr-month"),A=window.document.createDocumentFragment(),j;t.config.showMonths>1||t.config.monthSelectorType==="static"?j=Ge("span","cur-month"):(t.monthsDropdownContainer=Ge("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),k(t.monthsDropdownContainer,"change",function(Te){var ye=vt(Te),De=parseInt(ye.value,10);t.changeMonth(De-t.currentMonth),Ue("onMonthChange")}),O(),j=t.monthsDropdownContainer);var ee=qn("cur-year",{tabindex:"-1"}),de=ee.getElementsByTagName("input")[0];de.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&de.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(de.setAttribute("max",t.config.maxDate.getFullYear().toString()),de.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var me=Ge("div","flatpickr-current-month");return me.appendChild(j),me.appendChild(ee),A.appendChild(me),L.appendChild(A),{container:L,yearElement:de,monthElement:j}}function z(){Un(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var L=t.config.showMonths;L--;){var A=F();t.yearElements.push(A.yearElement),t.monthElements.push(A.monthElement),t.monthNav.appendChild(A.container)}t.monthNav.appendChild(t.nextMonthNav)}function $(){return t.monthNav=Ge("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=Ge("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=Ge("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,z(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(L){t.__hidePrevMonthArrow!==L&&(ut(t.prevMonthNav,"flatpickr-disabled",L),t.__hidePrevMonthArrow=L)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(L){t.__hideNextMonthArrow!==L&&(ut(t.nextMonthNav,"flatpickr-disabled",L),t.__hideNextMonthArrow=L)}}),t.currentYearElement=t.yearElements[0],Ie(),t.monthNav}function H(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var L=la(t.config);t.timeContainer=Ge("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var A=Ge("span","flatpickr-time-separator",":"),j=qn("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=j.getElementsByTagName("input")[0];var ee=qn("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=ee.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=ft(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?L.hours:d(L.hours)),t.minuteElement.value=ft(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():L.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(j),t.timeContainer.appendChild(A),t.timeContainer.appendChild(ee),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var de=qn("flatpickr-second");t.secondElement=de.getElementsByTagName("input")[0],t.secondElement.value=ft(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():L.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(Ge("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(de)}return t.config.time_24hr||(t.amPM=Ge("span","flatpickr-am-pm",t.l10n.amPM[_t((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function V(){t.weekdayContainer?Un(t.weekdayContainer):t.weekdayContainer=Ge("div","flatpickr-weekdays");for(var L=t.config.showMonths;L--;){var A=Ge("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(A)}return G(),t.weekdayContainer}function G(){if(t.weekdayContainer){var L=t.l10n.firstDayOfWeek,A=hc(t.l10n.weekdays.shorthand);L>0&&L<A.length&&(A=hc(A.splice(L,A.length),A.splice(0,L)));for(var j=t.config.showMonths;j--;)t.weekdayContainer.children[j].innerHTML=`
28
- <span class='flatpickr-weekday'>
29
- `+A.join("</span><span class='flatpickr-weekday'>")+`
30
- </span>
31
- `}}function D(){t.calendarContainer.classList.add("hasWeeks");var L=Ge("div","flatpickr-weekwrapper");L.appendChild(Ge("span","flatpickr-weekday",t.l10n.weekAbbreviation));var A=Ge("div","flatpickr-weeks");return L.appendChild(A),{weekWrapper:L,weekNumbers:A}}function P(L,A){A===void 0&&(A=!0);var j=A?L:L-t.currentMonth;j<0&&t._hidePrevMonthArrow===!0||j>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=j,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ue("onYearChange"),O()),M(),Ue("onMonthChange"),Ie())}function I(L,A){if(L===void 0&&(L=!0),A===void 0&&(A=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,A===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var j=la(t.config),ee=j.hours,de=j.minutes,me=j.seconds;f(ee,de,me)}t.redraw(),L&&Ue("onChange")}function N(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ue("onClose")}function Y(){t.config!==void 0&&Ue("onDestroy");for(var L=t._handlers.length;L--;)t._handlers[L].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var A=t.calendarContainer.parentNode;if(A.lastChild&&A.removeChild(A.lastChild),A.parentNode){for(;A.firstChild;)A.parentNode.insertBefore(A.firstChild,A);A.parentNode.removeChild(A)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(j){try{delete t[j]}catch{}})}function X(L){return t.calendarContainer.contains(L)}function ne(L){if(t.isOpen&&!t.config.inline){var A=vt(L),j=X(A),ee=A===t.input||A===t.altInput||t.element.contains(A)||L.path&&L.path.indexOf&&(~L.path.indexOf(t.input)||~L.path.indexOf(t.altInput)),de=!ee&&!j&&!X(L.relatedTarget),me=!t.config.ignoredFocusElements.some(function(Te){return Te.contains(A)});de&&me&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&u(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function se(L){if(!(!L||t.config.minDate&&L<t.config.minDate.getFullYear()||t.config.maxDate&&L>t.config.maxDate.getFullYear())){var A=L,j=t.currentYear!==A;t.currentYear=A||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),j&&(t.redraw(),Ue("onYearChange"),O())}}function W(L,A){var j;A===void 0&&(A=!0);var ee=t.parseDate(L,void 0,A);if(t.config.minDate&&ee&&yt(ee,t.config.minDate,A!==void 0?A:!t.minDateHasTime)<0||t.config.maxDate&&ee&&yt(ee,t.config.maxDate,A!==void 0?A:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(ee===void 0)return!1;for(var de=!!t.config.enable,me=(j=t.config.enable)!==null&&j!==void 0?j:t.config.disable,Te=0,ye=void 0;Te<me.length;Te++){if(ye=me[Te],typeof ye=="function"&&ye(ee))return de;if(ye instanceof Date&&ee!==void 0&&ye.getTime()===ee.getTime())return de;if(typeof ye=="string"){var De=t.parseDate(ye,void 0,!0);return De&&De.getTime()===ee.getTime()?de:!de}else if(typeof ye=="object"&&ee!==void 0&&ye.from&&ye.to&&ee.getTime()>=ye.from.getTime()&&ee.getTime()<=ye.to.getTime())return de}return!de}function B(L){return t.daysContainer!==void 0?L.className.indexOf("hidden")===-1&&L.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(L):!1}function Z(L){var A=L.target===t._input,j=t._input.value.trimEnd()!==Me();A&&j&&!(L.relatedTarget&&X(L.relatedTarget))&&t.setDate(t._input.value,!0,L.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function K(L){var A=vt(L),j=t.config.wrap?n.contains(A):A===t._input,ee=t.config.allowInput,de=t.isOpen&&(!ee||!j),me=t.config.inline&&j&&!ee;if(L.keyCode===13&&j){if(ee)return t.setDate(t._input.value,!0,A===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),A.blur();t.open()}else if(X(A)||de||me){var Te=!!t.timeContainer&&t.timeContainer.contains(A);switch(L.keyCode){case 13:Te?(L.preventDefault(),u(),ie()):ue(L);break;case 27:L.preventDefault(),ie();break;case 8:case 46:j&&!t.config.allowInput&&(L.preventDefault(),t.clear());break;case 37:case 39:if(!Te&&!j){L.preventDefault();var ye=s();if(t.daysContainer!==void 0&&(ee===!1||ye&&B(ye))){var De=L.keyCode===39?1:-1;L.ctrlKey?(L.stopPropagation(),P(De),b(w(1),0)):b(void 0,De)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:L.preventDefault();var be=L.keyCode===40?1:-1;t.daysContainer&&A.$i!==void 0||A===t.input||A===t.altInput?L.ctrlKey?(L.stopPropagation(),se(t.currentYear-be),b(w(1),0)):Te||b(void 0,be*7):A===t.currentYearElement?se(t.currentYear-be):t.config.enableTime&&(!Te&&t.hourElement&&t.hourElement.focus(),u(L),t._debouncedChange());break;case 9:if(Te){var xe=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(lt){return lt}),Ye=xe.indexOf(A);if(Ye!==-1){var mt=xe[Ye+(L.shiftKey?-1:1)];L.preventDefault(),(mt||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(A)&&L.shiftKey&&(L.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&A===t.amPM)switch(L.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],p(),ke();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],p(),ke();break}(j||X(A))&&Ue("onKeyDown",L)}function U(L,A){if(A===void 0&&(A="flatpickr-day"),!(t.selectedDates.length!==1||L&&(!L.classList.contains(A)||L.classList.contains("flatpickr-disabled")))){for(var j=L?L.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),ee=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),de=Math.min(j,t.selectedDates[0].getTime()),me=Math.max(j,t.selectedDates[0].getTime()),Te=!1,ye=0,De=0,be=de;be<me;be+=Dv.DAY)W(new Date(be),!0)||(Te=Te||be>de&&be<me,be<ee&&(!ye||be>ye)?ye=be:be>ee&&(!De||be<De)&&(De=be));var xe=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+A));xe.forEach(function(Ye){var mt=Ye.dateObj,lt=mt.getTime(),si=ye>0&&lt<ye||De>0&&lt>De;if(si){Ye.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(zt){Ye.classList.remove(zt)});return}else if(Te&&!si)return;["startRange","inRange","endRange","notAllowed"].forEach(function(zt){Ye.classList.remove(zt)}),L!==void 0&&(L.classList.add(j<=t.selectedDates[0].getTime()?"startRange":"endRange"),ee<j&&lt===ee?Ye.classList.add("startRange"):ee>j&&lt===ee&&Ye.classList.add("endRange"),lt>=ye&&(De===0||lt<=De)&&Rv(lt,ee,j)&&Ye.classList.add("inRange"))})}}function le(){t.isOpen&&!t.config.static&&!t.config.inline&&Fe()}function re(L,A){if(A===void 0&&(A=t._positionElement),t.isMobile===!0){if(L){L.preventDefault();var j=vt(L);j&&j.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Ue("onOpen");return}else if(t._input.disabled||t.config.inline)return;var ee=t.isOpen;t.isOpen=!0,ee||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Ue("onOpen"),Fe(A)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(L===void 0||!t.timeContainer.contains(L.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function te(L){return function(A){var j=t.config["_"+L+"Date"]=t.parseDate(A,t.config.dateFormat),ee=t.config["_"+(L==="min"?"max":"min")+"Date"];j!==void 0&&(t[L==="min"?"minDateHasTime":"maxDateHasTime"]=j.getHours()>0||j.getMinutes()>0||j.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(de){return W(de)}),!t.selectedDates.length&&L==="min"&&h(j),ke()),t.daysContainer&&(q(),j!==void 0?t.currentYearElement[L]=j.getFullYear().toString():t.currentYearElement.removeAttribute(L),t.currentYearElement.disabled=!!ee&&j!==void 0&&ee.getFullYear()===j.getFullYear())}}function fe(){var L=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],A=at(at({},JSON.parse(JSON.stringify(n.dataset||{}))),e),j={};t.config.parseDate=A.parseDate,t.config.formatDate=A.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(xe){t.config._enable=_e(xe)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(xe){t.config._disable=_e(xe)}});var ee=A.mode==="time";if(!A.dateFormat&&(A.enableTime||ee)){var de=it.defaultConfig.dateFormat||Pi.dateFormat;j.dateFormat=A.noCalendar||ee?"H:i"+(A.enableSeconds?":S":""):de+" H:i"+(A.enableSeconds?":S":"")}if(A.altInput&&(A.enableTime||ee)&&!A.altFormat){var me=it.defaultConfig.altFormat||Pi.altFormat;j.altFormat=A.noCalendar||ee?"h:i"+(A.enableSeconds?":S K":" K"):me+(" h:i"+(A.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:te("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:te("max")});var Te=function(xe){return function(Ye){t.config[xe==="min"?"_minTime":"_maxTime"]=t.parseDate(Ye,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Te("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Te("max")}),A.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,j,A);for(var ye=0;ye<L.length;ye++)t.config[L[ye]]=t.config[L[ye]]===!0||t.config[L[ye]]==="true";na.filter(function(xe){return t.config[xe]!==void 0}).forEach(function(xe){t.config[xe]=ra(t.config[xe]||[]).map(a)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ye=0;ye<t.config.plugins.length;ye++){var De=t.config.plugins[ye](t)||{};for(var be in De)na.indexOf(be)>-1?t.config[be]=ra(De[be]).map(a).concat(t.config[be]):typeof A[be]>"u"&&(t.config[be]=De[be])}A.altInputClass||(t.config.altInputClass=we().className+" "+t.config.altInputClass),Ue("onParseConfig")}function we(){return t.config.wrap?n.querySelector("[data-input]"):n}function Ae(){typeof t.config.locale!="object"&&typeof it.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=at(at({},it.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?it.l10ns[t.config.locale]:void 0),mi.D="("+t.l10n.weekdays.shorthand.join("|")+")",mi.l="("+t.l10n.weekdays.longhand.join("|")+")",mi.M="("+t.l10n.months.shorthand.join("|")+")",mi.F="("+t.l10n.months.longhand.join("|")+")",mi.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var L=at(at({},e),JSON.parse(JSON.stringify(n.dataset||{})));L.time_24hr===void 0&&it.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=dc(t),t.parseDate=aa({config:t.config,l10n:t.l10n})}function Fe(L){if(typeof t.config.position=="function")return void t.config.position(t,L);if(t.calendarContainer!==void 0){Ue("onPreCalendarPosition");var A=L||t._positionElement,j=Array.prototype.reduce.call(t.calendarContainer.children,(function(lr,s1){return lr+s1.offsetHeight}),0),ee=t.calendarContainer.offsetWidth,de=t.config.position.split(" "),me=de[0],Te=de.length>1?de[1]:null,ye=A.getBoundingClientRect(),De=window.innerHeight-ye.bottom,be=me==="above"||me!=="below"&&De<j&&ye.top>j,xe=window.pageYOffset+ye.top+(be?-j-2:A.offsetHeight+2);if(ut(t.calendarContainer,"arrowTop",!be),ut(t.calendarContainer,"arrowBottom",be),!t.config.inline){var Ye=window.pageXOffset+ye.left,mt=!1,lt=!1;Te==="center"?(Ye-=(ee-ye.width)/2,mt=!0):Te==="right"&&(Ye-=ee-ye.width,lt=!0),ut(t.calendarContainer,"arrowLeft",!mt&&!lt),ut(t.calendarContainer,"arrowCenter",mt),ut(t.calendarContainer,"arrowRight",lt);var si=window.document.body.offsetWidth-(window.pageXOffset+ye.right),zt=Ye+ee>window.document.body.offsetWidth,ar=si+ee>window.document.body.offsetWidth;if(ut(t.calendarContainer,"rightMost",zt),!t.config.static)if(t.calendarContainer.style.top=xe+"px",!zt)t.calendarContainer.style.left=Ye+"px",t.calendarContainer.style.right="auto";else if(!ar)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=si+"px";else{var bi=Ne();if(bi===void 0)return;var or=window.document.body.offsetWidth,ya=Math.max(0,or/2-ee/2),mn=".flatpickr-calendar.centerMost:before",ai=".flatpickr-calendar.centerMost:after",Hi=bi.cssRules.length,wa="{left:"+ye.left+"px;right:auto;}";ut(t.calendarContainer,"rightMost",!1),ut(t.calendarContainer,"centerMost",!0),bi.insertRule(mn+","+ai+wa,Hi),t.calendarContainer.style.left=ya+"px",t.calendarContainer.style.right="auto"}}}}function Ne(){for(var L=null,A=0;A<document.styleSheets.length;A++){var j=document.styleSheets[A];if(j.cssRules){try{j.cssRules}catch{continue}L=j;break}}return L??ae()}function ae(){var L=document.createElement("style");return document.head.appendChild(L),L.sheet}function q(){t.config.noCalendar||t.isMobile||(O(),Ie(),M())}function ie(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function ue(L){L.preventDefault(),L.stopPropagation();var A=function(xe){return xe.classList&&xe.classList.contains("flatpickr-day")&&!xe.classList.contains("flatpickr-disabled")&&!xe.classList.contains("notAllowed")},j=cc(vt(L),A);if(j!==void 0){var ee=j,de=t.latestSelectedDateObj=new Date(ee.dateObj.getTime()),me=(de.getMonth()<t.currentMonth||de.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=ee,t.config.mode==="single")t.selectedDates=[de];else if(t.config.mode==="multiple"){var Te=Q(de);Te?t.selectedDates.splice(parseInt(Te),1):t.selectedDates.push(de)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=de,t.selectedDates.push(de),yt(de,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(xe,Ye){return xe.getTime()-Ye.getTime()}));if(p(),me){var ye=t.currentYear!==de.getFullYear();t.currentYear=de.getFullYear(),t.currentMonth=de.getMonth(),ye&&(Ue("onYearChange"),O()),Ue("onMonthChange")}if(Ie(),M(),ke(),!me&&t.config.mode!=="range"&&t.config.showMonths===1?S(ee):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var De=t.config.mode==="single"&&!t.config.enableTime,be=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(De||be)&&ie()}C()}}var oe={locale:[Ae,G],showMonths:[z,o,V],minDate:[v],maxDate:[v],positionElement:[ze],clickOpens:[function(){t.config.clickOpens===!0?(k(t._input,"focus",t.open),k(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function ve(L,A){if(L!==null&&typeof L=="object"){Object.assign(t.config,L);for(var j in L)oe[j]!==void 0&&oe[j].forEach(function(ee){return ee()})}else t.config[L]=A,oe[L]!==void 0?oe[L].forEach(function(ee){return ee()}):na.indexOf(L)>-1&&(t.config[L]=ra(A));t.redraw(),ke(!0)}function Re(L,A){var j=[];if(L instanceof Array)j=L.map(function(ee){return t.parseDate(ee,A)});else if(L instanceof Date||typeof L=="number")j=[t.parseDate(L,A)];else if(typeof L=="string")switch(t.config.mode){case"single":case"time":j=[t.parseDate(L,A)];break;case"multiple":j=L.split(t.config.conjunction).map(function(ee){return t.parseDate(ee,A)});break;case"range":j=L.split(t.l10n.rangeSeparator).map(function(ee){return t.parseDate(ee,A)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(L)));t.selectedDates=t.config.allowInvalidPreload?j:j.filter(function(ee){return ee instanceof Date&&W(ee,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(ee,de){return ee.getTime()-de.getTime()})}function Se(L,A,j){if(A===void 0&&(A=!1),j===void 0&&(j=t.config.dateFormat),L!==0&&!L||L instanceof Array&&L.length===0)return t.clear(A);Re(L,j),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),v(void 0,A),h(),t.selectedDates.length===0&&t.clear(!1),ke(A),A&&Ue("onChange")}function _e(L){return L.slice().map(function(A){return typeof A=="string"||typeof A=="number"||A instanceof Date?t.parseDate(A,void 0,!0):A&&typeof A=="object"&&A.from&&A.to?{from:t.parseDate(A.from,void 0),to:t.parseDate(A.to,void 0)}:A}).filter(function(A){return A})}function ce(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var L=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);L&&Re(L,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Le(){if(t.input=we(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Ge(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),ze()}function ze(){t._positionElement=t.config.positionElement||t._input}function pn(){var L=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Ge("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=L,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=L==="datetime-local"?"Y-m-d\\TH:i:S":L==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}k(t.mobileInput,"change",function(A){t.setDate(vt(A).value,!1,t.mobileFormatStr),Ue("onChange"),Ue("onClose")})}function Zt(L){if(t.isOpen===!0)return t.close();t.open(L)}function Ue(L,A){if(t.config!==void 0){var j=t.config[L];if(j!==void 0&&j.length>0)for(var ee=0;j[ee]&&ee<j.length;ee++)j[ee](t.selectedDates,t.input.value,t,A);L==="onChange"&&(t.input.dispatchEvent(J("change")),t.input.dispatchEvent(J("input")))}}function J(L){var A=document.createEvent("Event");return A.initEvent(L,!0,!0),A}function Q(L){for(var A=0;A<t.selectedDates.length;A++){var j=t.selectedDates[A];if(j instanceof Date&&yt(j,L)===0)return""+A}return!1}function Be(L){return t.config.mode!=="range"||t.selectedDates.length<2?!1:yt(L,t.selectedDates[0])>=0&&yt(L,t.selectedDates[1])<=0}function Ie(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(L,A){var j=new Date(t.currentYear,t.currentMonth,1);j.setMonth(t.currentMonth+A),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[A].textContent=Kn(j.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=j.getMonth().toString(),L.value=j.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Me(L){var A=L||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(j){return t.formatDate(j,A)}).filter(function(j,ee,de){return t.config.mode!=="range"||t.config.enableTime||de.indexOf(j)===ee}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function ke(L){L===void 0&&(L=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Me(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Me(t.config.altFormat)),L!==!1&&Ue("onValueUpdate")}function pt(L){var A=vt(L),j=t.prevMonthNav.contains(A),ee=t.nextMonthNav.contains(A);j||ee?P(j?-1:1):t.yearElements.indexOf(A)>=0?A.select():A.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):A.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function et(L){L.preventDefault();var A=L.type==="keydown",j=vt(L),ee=j;t.amPM!==void 0&&j===t.amPM&&(t.amPM.textContent=t.l10n.amPM[_t(t.amPM.textContent===t.l10n.amPM[0])]);var de=parseFloat(ee.getAttribute("min")),me=parseFloat(ee.getAttribute("max")),Te=parseFloat(ee.getAttribute("step")),ye=parseInt(ee.value,10),De=L.delta||(A?L.which===38?1:-1:0),be=ye+Te*De;if(typeof ee.value<"u"&&ee.value.length===2){var xe=ee===t.hourElement,Ye=ee===t.minuteElement;be<de?(be=me+be+_t(!xe)+(_t(xe)&&_t(!t.amPM)),Ye&&m(void 0,-1,t.hourElement)):be>me&&(be=ee===t.hourElement?be-me-_t(!t.amPM):de,Ye&&m(void 0,1,t.hourElement)),t.amPM&&xe&&(Te===1?be+ye===23:Math.abs(be-ye)>Te)&&(t.amPM.textContent=t.l10n.amPM[_t(t.amPM.textContent===t.l10n.amPM[0])]),ee.value=ft(be)}}return r(),t}function Ai(n,e){for(var t=Array.prototype.slice.call(n).filter(function(a){return a instanceof HTMLElement}),i=[],r=0;r<t.length;r++){var s=t[r];try{if(s.getAttribute("data-fp-omit")!==null)continue;s._flatpickr!==void 0&&(s._flatpickr.destroy(),s._flatpickr=void 0),s._flatpickr=Lv(s,e||{}),i.push(s._flatpickr)}catch(a){console.error(a)}}return i.length===1?i[0]:i}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return Ai(this,n)},HTMLElement.prototype.flatpickr=function(n){return Ai([this],n)});var it=function(n,e){return typeof n=="string"?Ai(window.document.querySelectorAll(n),e):n instanceof Node?Ai([n],e):Ai(n,e)};it.defaultConfig={},it.l10ns={en:at({},an),default:at({},an)},it.localize=function(n){it.l10ns.default=at(at({},it.l10ns.default),n)},it.setDefaults=function(n){it.defaultConfig=at(at({},it.defaultConfig),n)},it.parseDate=aa({}),it.formatDate=dc({}),it.compareDates=yt,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return Ai(this,n)}),Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))},typeof window<"u"&&(window.flatpickr=it);var ln={exports:{}},Pv=ln.exports,fc;function Av(){return fc||(fc=1,(function(n,e){(function(t,i){i(e)})(Pv,(function(t){var i=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={weekdays:{shorthand:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},months:{shorthand:["Янв","Фев","Март","Апр","Май","Июнь","Июль","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Нед.",scrollTitle:"Прокрутите для увеличения",toggleTitle:"Нажмите для переключения",amPM:["ДП","ПП"],yearAriaLabel:"Год",time_24hr:!0};i.l10ns.ru=r;var s=i.l10ns;t.Russian=r,t.default=s,Object.defineProperty(t,"__esModule",{value:!0})}))})(ln,ln.exports)),ln.exports}var Fv=Av();const Bv=["value","id","name","disabled","required","placeholder"],Nv=["title"],Vv=["title"],Hv=Ve(l.defineComponent({__name:"Flatpickr",props:{modelValue:{default:""},id:{default:"flatpickr-input"},error:{default:""},name:{default:"flatpickr"},placeholder:{default:"Выберите дату"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},config:{default:()=>({})},format:{default:"DD.MM.YYYY"},locale:{default:"ru"},resetTitle:{default:"Очистить"},calendarTitle:{default:"Выбрать дату"},allowInput:{type:Boolean,default:!0},enableTime:{type:Boolean,default:!1},time_24hr:{type:Boolean,default:!0},dateFormat:{default:"d.m.Y"},minDate:{default:void 0},maxDate:{default:void 0},defaultDate:{default:void 0},mode:{default:"single"}},emits:["update:modelValue","change","open","close","ready"],setup(n,{emit:e}){const t=n,i=e,r=l.ref(),s=l.ref(null),a=l.ref(!1),o=l.ref(""),u=l.computed(()=>Array.isArray(t.error)?t.error?.filter(Boolean)||[]:typeof t.error=="string"&&t.error?[t.error]:[]),c=C=>{if(!C)return"";const y=new Date(C);if(isNaN(y.getTime()))return"";const v=String(y.getDate()).padStart(2,"0"),R=String(y.getMonth()+1).padStart(2,"0"),m=y.getFullYear();return t.format==="DD.MM.YYYY"?`${v}.${R}.${m}`:t.format==="MM/DD/YYYY"?`${R}/${v}/${m}`:t.format==="YYYY-MM-DD"?`${m}-${R}-${v}`:`${v}.${R}.${m}`},d=C=>{if(!C)return"";if(/^\d{4}-\d{2}-\d{2}/.test(C))return C;if(t.format==="DD.MM.YYYY"){const y=C.split(".");if(y.length===3){const[v,R,m]=y;return`${m}-${R.padStart(2,"0")}-${v.padStart(2,"0")}`}}if(t.format==="MM/DD/YYYY"){const y=C.split("/");if(y.length===3){const[v,R,m]=y;return`${m}-${v.padStart(2,"0")}-${R.padStart(2,"0")}`}}return t.format==="YYYY-MM-DD",C},p=()=>{if(!r.value)return;const C={locale:t.locale==="ru"?Fv.Russian:void 0,allowInput:t.allowInput,enableTime:t.enableTime,time_24hr:t.time_24hr,dateFormat:t.dateFormat,mode:t.mode,wrap:!0,onClose:(y,v,R)=>{const m=y.length>0;if(!(t.modelValue!==v))return!1;if(!m)return h({instance:R}),!1;l.nextTick(()=>{if(t.mode==="multiple"){const g=y.map(S=>c(S));i("update:modelValue",g)}else if(t.mode==="range"){const g=y.map(S=>c(S));i("update:modelValue",g)}else i("update:modelValue",v);i("change",y.map(g=>g.toISOString()),v,R)})},onOpen:y=>{i("open",y)},onReady:y=>{i("ready",y)},...t.config};t.minDate&&t.minDate&&(C.minDate=t.minDate),t.maxDate&&(C.maxDate=t.maxDate),t.defaultDate&&(C.defaultDate=t.defaultDate),s.value=it(r.value,C),h({instance:s.value})},h=({instance:C})=>{C?._input&&(t.modelValue?l.nextTick(()=>{Array.isArray(t.modelValue)?C._input.value=t.modelValue.map(y=>c(y)).join(", "):C._input.value=c(t.modelValue),a.value=!0}):l.nextTick(()=>{C._input.value="",a.value=!1}))},f=()=>{t.disabled||!s.value||(s.value.clear(),s.value._input.value="",i("update:modelValue",""),a.value=!1)},_=C=>{const y=C.target;o.value=y.value},k=()=>{if(o.value){const C=d(o.value);C&&i("update:modelValue",C)}};return l.watch(()=>t.modelValue,C=>{if(!C){a.value=!1,s.value?._input&&(s.value._input.value=""),o.value="";return}Array.isArray(C)?o.value=C.map(y=>c(y)).join(", "):o.value=c(C),a.value=!0},{deep:!0}),l.watch(()=>t.disabled,C=>{s.value?._input&&(s.value._input.disabled=C)}),l.onMounted(()=>{p()}),l.onBeforeUnmount(()=>{s.value&&s.value.destroy()}),(C,y)=>(l.openBlock(),l.createElementBlock("div",{style:{position:"relative"},ref_key:"input",ref:r},[l.createElementVNode("div",{class:l.normalizeClass({"not-valid":u.value.length})},[l.createElementVNode("input",{type:"text",class:"form-control flatpickr",value:o.value,id:C.id,name:C.name,disabled:C.disabled,required:C.required,placeholder:C.placeholder,"data-input":"",onInput:_,onBlur:k},null,40,Bv)],2),a.value&&!C.disabled?(l.openBlock(),l.createElementBlock("a",{key:0,class:"remove-button text-dark",onClick:f,style:{position:"absolute",right:"40px",top:"8px","font-size":"16px",cursor:"pointer"},"data-toggle":"",title:C.resetTitle},[...y[0]||(y[0]=[l.createElementVNode("i",{class:"bi bi-x-lg"},null,-1)])],8,Nv)):l.createCommentVNode("",!0),l.createElementVNode("a",{class:"remove-button text-dark",style:{position:"absolute",right:"10px",top:"4px","font-size":"20px",cursor:"pointer"},"data-toggle":"",title:C.calendarTitle},[...y[1]||(y[1]=[l.createElementVNode("i",{class:"bi bi-calendar3"},null,-1)])],8,Vv),l.createVNode(hi,{errors:u.value},null,8,["errors"])],512))}}),[["__scopeId","data-v-fb3fef0b"]]);function zv(n={}){const{placeholder:e="Поиск...",searchHint:t="Введите минимум 3 символа",searchTypes:i=[{value:"partial",label:"По частичному совпадению"},{value:"exact",label:"По полному совпадению"}],defaultSearchType:r="partial",minSearchLength:s=3}=n,a=l.ref(""),o=l.ref([]),u=l.ref(!1),c=l.ref(r),d=l.ref(!1),p=l.ref(!1),h=l.computed(()=>a.value&&a.value.length>0&&a.value.length<s?`Введите минимум ${s} символа`:t),f=l.computed(()=>i);return{search:a,options:o,isSearchLoading:u,searchType:c,showSettings:d,isLoading:p,enterCharacterMessage:h,filteredSearchTypes:f,onSearch:g=>{a.value=g||"",g&&g.length>=s},onSelect:g=>{},clearSearch:()=>{a.value="",o.value=[]},toggleSettings:()=>{d.value=!d.value},hideSettings:()=>{d.value=!1},setOptions:g=>{o.value=g},setLoading:g=>{u.value=g},setGlobalLoading:g=>{p.value=g}}}const Iv=["disabled"],$v={key:1,class:"bi bi-three-dots-vertical"},jv=Ve(l.defineComponent({__name:"HeaderSearchForm",props:{placeholder:{default:"Поиск..."},searchHint:{default:"Введите минимум 3 символа"},searchTypes:{default:()=>[{value:"partial",label:"По частичному совпадению"},{value:"exact",label:"По полному совпадению"}]},defaultSearchType:{default:"partial"},minSearchLength:{default:3},searchTypeName:{default:"searchType"},options:{default:()=>[]},isLoading:{type:Boolean,default:!1},isSearchLoading:{type:Boolean,default:!1}},emits:["search","select","searchTypeChange"],setup(n,{expose:e,emit:t}){const i=n,r=t,s={placeholder:i.placeholder,searchHint:i.searchHint,searchTypes:i.searchTypes,defaultSearchType:i.defaultSearchType,minSearchLength:i.minSearchLength},{search:a,options:o,isSearchLoading:u,searchType:c,showSettings:d,isLoading:p,enterCharacterMessage:h,filteredSearchTypes:f,onSearch:_,onSelect:k,clearSearch:C,toggleSettings:y,hideSettings:v}=zv(s),R=l.ref();l.computed(()=>i.options.length>0?i.options:o.value),l.computed(()=>i.isSearchLoading||u.value),l.computed(()=>i.isLoading||p.value);const m=E=>{const b=E||"";_(b),r("search",b,c.value)},x=E=>{k(E),r("select",E)},g=l.computed(()=>i.searchTypeName);l.watch(c,E=>{r("searchTypeChange",E),v()});const S=E=>{const b=E.target;w.value?.contains(b)||v()},w=l.ref();return l.onMounted(()=>{document.addEventListener("click",S)}),l.onUnmounted(()=>{document.removeEventListener("click",S)}),e({clearSearch:C,setOptions:E=>{o.value=E},setLoading:E=>{u.value=E},setGlobalLoading:E=>{p.value=E},focus:()=>{R.value?.$el?.querySelector("input")?.focus()}}),(E,b)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"wrapperRef",ref:w,class:"position-relative d-flex align-items-center rounded search-select-wrapper"},[(l.openBlock(),l.createBlock(Xt,{ref_key:"selectRef",ref:R,key:l.unref(c),classes:["border-0","outline-none"],style:{maxWidth:"500px",minWidth:"500px"},modelValue:l.unref(a),"onUpdate:modelValue":[b[0]||(b[0]=T=>l.isRef(a)?a.value=T:null),x],reduce:T=>T,options:E.options,placeholder:E.placeholder,onSearch:m,onBlur:l.unref(C),onFocus:l.unref(v),isLoading:E.isSearchLoading,hint:l.unref(h)},null,8,["modelValue","reduce","options","placeholder","onBlur","onFocus","isLoading","hint"])),l.createElementVNode("button",{class:"btn btn-light px-2",onClick:b[1]||(b[1]=(...T)=>l.unref(y)&&l.unref(y)(...T)),disabled:E.isLoading},[E.isLoading?(l.openBlock(),l.createBlock(ur,{key:0,isSmall:!0})):(l.openBlock(),l.createElementBlock("i",$v))],8,Iv),l.unref(d)?(l.openBlock(),l.createElementBlock("ul",{key:0,class:"position-absolute setting-list",onClick:b[3]||(b[3]=l.withModifiers(()=>{},["stop"]))},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(f),T=>(l.openBlock(),l.createElementBlock("li",{key:T.value,class:"setting-item"},[l.createVNode(lc,{name:g.value,label:T.label,modelValue:l.unref(c),"onUpdate:modelValue":b[2]||(b[2]=M=>l.isRef(c)?c.value=M:null),type:"radio",group:g.value,trueValue:T.value},null,8,["name","label","modelValue","group","trueValue"])]))),128))])):l.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-060eb2dc"]]);function Wv(n={}){const{loadRegions:e,loadDistricts:t,loadLocalities:i,loadStreets:r,regionKey:s="region_id",districtKey:a="district_id",localityKey:o="locality_id",streetKey:u="street_id",houseKey:c="house",buildingKey:d="building",apartmentKey:p="apartment",regionLabel:h="Регион",districtLabel:f="Район",localityLabel:_="Населенный пункт",streetLabel:k="Улица",houseLabel:C="Дом",buildingLabel:y="Корпус",apartmentLabel:v="Квартира",columnWidth:R="12",prefix:m="",multiLocalities:x=!1,multiStreets:g=!1,showHouseFields:S=!0}=n,w=l.ref({}),E=l.ref(!1),b=l.ref(!1),T=l.ref(!1),M=l.ref(!1),O=l.ref(!1),F=l.ref([]),z=l.ref([]),$=l.ref([]),H=l.ref([]),V=l.computed(()=>`${m}${s}`),G=l.computed(()=>`${m}${a}`),D=l.computed(()=>`${m}${o}`),P=l.computed(()=>`${m}${u}`),I=l.computed(()=>`${m}${c}`),N=l.computed(()=>`${m}${d}`),Y=l.computed(()=>`${m}${p}`),X=l.computed(()=>({region:h,district:f,locality:_,street:k,house:C,building:y,apartment:v})),ne=async ce=>{if(e){b.value=!0;try{F.value=await e(ce)}finally{b.value=!1}}},se=async ce=>{if(t){T.value=!0;try{z.value=await t(ce)}finally{T.value=!1}}},W=async ce=>{if(i){M.value=!0;try{$.value=await i(ce)}finally{M.value=!1}}},B=async ce=>{if(r){O.value=!0;try{H.value=await r(ce)}finally{O.value=!1}}},Z=ce=>{const Le={...w.value,[V.value]:ce,[G.value]:null,[D.value]:null,[P.value]:null,[I.value]:null,[N.value]:null,[Y.value]:null};w.value=Le,z.value=[],$.value=[],H.value=[]},K=ce=>{const Le={...w.value,[G.value]:ce,[D.value]:null,[P.value]:null,[I.value]:null,[N.value]:null,[Y.value]:null};w.value=Le},U=ce=>{const Le={...w.value,[D.value]:ce,[P.value]:null,[I.value]:null,[N.value]:null,[Y.value]:null};w.value=Le,H.value=[]},le=async ce=>{Z(ce),ce&&(await se(ce),await W(ce),await B(ce))},re=async ce=>{if(K(ce),!ce){const Le=w.value[V.value];Le&&await le(Le);return}await W(ce)},te=async ce=>{U(ce),ce&&await B(ce)},fe=ce=>{const Le={...w.value,[P.value]:ce,[I.value]:null,[N.value]:null,[Y.value]:null};w.value=Le},we=ce=>{const Le=ce.target,ze={...w.value,[I.value]:Le.value};w.value=ze},Ae=ce=>{const Le=ce.target,ze={...w.value,[N.value]:Le.value};w.value=ze},Fe=ce=>{const Le=ce.target,ze={...w.value,[Y.value]:Le.value};w.value=ze},Ne=l.computed(()=>{const ce=w.value[V.value];return ce&&F.value.find(Le=>String(Le.id)===String(ce))?.label||""}),ae=l.computed(()=>{const ce=w.value[G.value];return ce&&z.value.find(Le=>String(Le.id)===String(ce))?.label||""}),q=l.computed(()=>{const ce=w.value[D.value];return ce&&$.value.find(Le=>String(Le.id)===String(ce))?.label||""}),ie=l.computed(()=>{const ce=w.value[P.value];return ce&&H.value.find(Le=>String(Le.id)===String(ce))?.label||""}),ue=l.computed(()=>{const ce=w.value[I.value];return ce?`${C} ${ce}`:""}),oe=l.computed(()=>{const ce=w.value[N.value];return ce?`${y} ${ce}`:""}),ve=l.computed(()=>{const ce=w.value[Y.value];return ce?`${v} ${ce}`:""}),Re=l.computed(()=>[Ne.value,ae.value,q.value,ie.value,ue.value,oe.value,ve.value].filter(Boolean).join(", ")),Se=l.computed(()=>{const ce=w.value[D.value];return Array.isArray(ce)?ce.length>1:!1}),_e=l.computed(()=>g?!1:S);return{modelValue:w,isLoading:E,isRegionLoading:b,isDistrictLoading:T,isLocalityLoading:M,isStreetLoading:O,regionOptions:F,districtOptions:z,localityOptions:$,streetOptions:H,finalRegionKey:V,finalDistrictKey:G,finalLocalityKey:D,finalStreetKey:P,finalHouseKey:I,finalBuildingKey:N,finalApartmentKey:Y,labels:X,selectedRegionLabel:Ne,selectedDistrictLabel:ae,selectedLocalityLabel:q,selectedStreetLabel:ie,selectedHouseLabel:ue,selectedBuildingLabel:oe,selectedApartmentLabel:ve,fullAddress:Re,isMultiLocalitiesSelected:Se,shouldShowHouseFields:_e,loadRegionOptions:ne,loadDistrictOptions:se,loadLocalityOptions:W,loadStreetOptions:B,onRegionSelect:le,onDistrictSelect:re,onLocalitySelect:te,onStreetSelect:fe,onHouseInput:we,onBuildingInput:Ae,onApartmentInput:Fe,resetFieldsByRegion:Z,resetFieldsByDistrict:K,resetFieldsByLocality:U}}const Gv={class:"address-form"},Yv={class:"row"},Uv={class:"form-label"},qv={class:"form-label"},Kv={class:"form-label"},Jv={class:"form-label"},Xv={class:"form-label"},Zv=["value","disabled"],Qv={class:"form-label"},ey=["value","disabled"],ty={class:"form-label"},iy=["value","disabled"],ny={key:0,class:"mt-3"},ry={class:"alert alert-info"},sy=Ve(l.defineComponent({__name:"AddressForm",props:{modelValue:{default:()=>({})},loadRegions:{},loadDistricts:{},loadLocalities:{},loadStreets:{},regionKey:{default:"region_id"},districtKey:{default:"district_id"},localityKey:{default:"locality_id"},streetKey:{default:"street_id"},houseKey:{default:"house"},buildingKey:{default:"building"},apartmentKey:{default:"apartment"},regionLabel:{default:"Регион"},districtLabel:{default:"Район"},localityLabel:{default:"Населенный пункт"},streetLabel:{default:"Улица"},houseLabel:{default:"Дом"},buildingLabel:{default:"Корпус"},apartmentLabel:{default:"Квартира"},columnWidth:{default:"12"},prefix:{default:""},multiLocalities:{type:Boolean,default:!1},multiStreets:{type:Boolean,default:!1},showHouseFields:{type:Boolean,default:!0},showFullAddress:{type:Boolean,default:!1},disabledFields:{default:()=>({})},allowClear:{default:()=>({})},countryId:{default:void 0},setFilterParamsStringsHandler:{type:Function,default:void 0},filterName:{default:"address"},isParentComponentReady:{type:Boolean,default:!0}},emits:["update:modelValue","change","regionChange","districtChange","localityChange","streetChange"],setup(n,{expose:e,emit:t}){const i=n,r=t,s={loadRegions:i.loadRegions,loadDistricts:i.loadDistricts,loadLocalities:i.loadLocalities,loadStreets:i.loadStreets,regionKey:i.regionKey,districtKey:i.districtKey,localityKey:i.localityKey,streetKey:i.streetKey,houseKey:i.houseKey,buildingKey:i.buildingKey,apartmentKey:i.apartmentKey,regionLabel:i.regionLabel,districtLabel:i.districtLabel,localityLabel:i.localityLabel,streetLabel:i.streetLabel,houseLabel:i.houseLabel,buildingLabel:i.buildingLabel,apartmentLabel:i.apartmentLabel,columnWidth:i.columnWidth,prefix:i.prefix,multiLocalities:i.multiLocalities,multiStreets:i.multiStreets,showHouseFields:i.showHouseFields},{modelValue:a,isRegionLoading:o,isDistrictLoading:u,isLocalityLoading:c,isStreetLoading:d,regionOptions:p,districtOptions:h,localityOptions:f,streetOptions:_,finalRegionKey:k,finalDistrictKey:C,finalLocalityKey:y,finalStreetKey:v,finalHouseKey:R,finalBuildingKey:m,finalApartmentKey:x,labels:g,selectedRegionLabel:S,selectedDistrictLabel:w,selectedLocalityLabel:E,selectedStreetLabel:b,selectedHouseLabel:T,selectedBuildingLabel:M,selectedApartmentLabel:O,fullAddress:F,isMultiLocalitiesSelected:z,shouldShowHouseFields:$,loadRegionOptions:H,onRegionSelect:V,onDistrictSelect:G,onLocalitySelect:D,onStreetSelect:P,onHouseInput:I,onBuildingInput:N,onApartmentInput:Y}=Wv(s);let X=!1;l.watch(()=>i.modelValue,te=>{X||(a.value={...te})},{immediate:!0,deep:!0}),l.watch(a,te=>{X=!0,r("update:modelValue",{...te}),r("change",{...te}),l.nextTick(()=>{X=!1})},{deep:!0});const ne=async te=>{await V(te),r("regionChange",te)},se=async te=>{await G(te),r("districtChange",te)},W=async te=>{await D(te),r("localityChange",te)},B=te=>{P(te),r("streetChange",te)},Z=te=>{I(te)},K=te=>{N(te)},U=te=>{Y(te)},le=l.computed(()=>{if(!i.multiLocalities)return!1;const te=a.value[v.value];return!Array.isArray(te)||te?.length<2});function re(){return[S.value,w.value,E.value,b.value,T.value,M.value,O.value].filter(Boolean).join(", ")}return l.watch(()=>T.value,async te=>{if(!i.setFilterParamsStringsHandler||!i.isParentComponentReady)return!1;i.setFilterParamsStringsHandler(i.filterName,re())},{deep:!0}),l.watch(()=>M.value,async te=>{if(!i.setFilterParamsStringsHandler||!i.isParentComponentReady)return!1;i.setFilterParamsStringsHandler(i.filterName,re())},{deep:!0}),l.watch(()=>O.value,async te=>{if(!i.setFilterParamsStringsHandler||!i.isParentComponentReady)return!1;i.setFilterParamsStringsHandler(i.filterName,re())},{deep:!0}),l.watch(()=>b.value,async te=>{if(!i.setFilterParamsStringsHandler||!i.isParentComponentReady)return!1;i.setFilterParamsStringsHandler(i.filterName,re())},{deep:!0}),l.watch(()=>E.value,async te=>{if(!i.setFilterParamsStringsHandler||!i.isParentComponentReady)return!1;i.setFilterParamsStringsHandler(i.filterName,re())},{deep:!0}),l.watch(()=>w.value,async te=>{if(!i.setFilterParamsStringsHandler||!i.isParentComponentReady)return!1;i.setFilterParamsStringsHandler(i.filterName,re())},{deep:!0}),l.watch(()=>S.value,async te=>{if(!i.setFilterParamsStringsHandler||!i.isParentComponentReady)return!1;i.setFilterParamsStringsHandler(i.filterName,re())},{deep:!0}),l.watch(()=>i.countryId,async te=>{te&&i.loadRegions&&await H(te)},{immediate:!0}),l.onMounted(async()=>{i.countryId&&i.loadRegions&&await H(i.countryId)}),e({loadRegionOptions:H,resetForm:()=>{a.value={},p.value=[],h.value=[],f.value=[],_.value=[]},getFullAddress:()=>F.value,getValue:()=>re()}),(te,fe)=>(l.openBlock(),l.createElementBlock("div",Gv,[l.createElementVNode("div",Yv,[l.createElementVNode("div",{class:l.normalizeClass(`col-${te.columnWidth} mb-2`)},[l.createElementVNode("label",Uv,l.toDisplayString(l.unref(g).region),1),l.createVNode(Xt,{modelValue:te.modelValue[l.unref(k)],options:l.unref(p),disabled:te.disabledFields?.region||l.unref(o),"onUpdate:modelValue":ne,allowClear:te.allowClear?.region,isLoading:l.unref(o)},null,8,["modelValue","options","disabled","allowClear","isLoading"])],2),l.createElementVNode("div",{class:l.normalizeClass(`col-${te.columnWidth} mb-2`)},[l.createElementVNode("label",qv,l.toDisplayString(l.unref(g).district),1),l.createVNode(Xt,{modelValue:te.modelValue[l.unref(C)],disabled:te.disabledFields?.district||l.unref(u),options:l.unref(h),"onUpdate:modelValue":se,allowClear:te.allowClear?.district,isLoading:l.unref(u)},null,8,["modelValue","disabled","options","allowClear","isLoading"])],2),l.createElementVNode("div",{class:l.normalizeClass(`col-${te.columnWidth} mb-2`)},[l.createElementVNode("label",Kv,l.toDisplayString(l.unref(g).locality),1),l.createVNode(Xt,{modelValue:te.modelValue[l.unref(y)],disabled:te.disabledFields?.locality||l.unref(c),"onUpdate:modelValue":W,options:l.unref(f),name:l.unref(y),showAddButton:le.value,isLoading:l.unref(c),multiple:te.multiLocalities},null,8,["modelValue","disabled","options","name","showAddButton","isLoading","multiple"])],2),l.unref(z)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",{class:l.normalizeClass(`col-${te.columnWidth} mb-2`)},[l.createElementVNode("label",Jv,l.toDisplayString(l.unref(g).street),1),l.createVNode(Xt,{modelValue:te.modelValue[l.unref(v)],disabled:te.disabledFields?.street||l.unref(d),options:l.unref(_),"onUpdate:modelValue":B,allowClear:te.allowClear?.street,isLoading:l.unref(d),multiple:te.multiStreets},null,8,["modelValue","disabled","options","allowClear","isLoading","multiple"])],2),l.unref($)?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(`col-${te.columnWidth} mb-2`)},[l.createElementVNode("label",Xv,l.toDisplayString(l.unref(g).house),1),l.createElementVNode("input",{type:"text",class:"form-control",value:te.modelValue[l.unref(R)]||"",disabled:te.disabledFields?.house,onInput:Z},null,40,Zv)],2)):l.createCommentVNode("",!0),l.unref($)?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(`col-${te.columnWidth} mb-2`)},[l.createElementVNode("label",Qv,l.toDisplayString(l.unref(g).building),1),l.createElementVNode("input",{type:"text",class:"form-control",value:te.modelValue[l.unref(m)]||"",disabled:te.disabledFields?.building,onInput:K},null,40,ey)],2)):l.createCommentVNode("",!0),l.unref($)?(l.openBlock(),l.createElementBlock("div",{key:2,class:l.normalizeClass(`col-${te.columnWidth} mb-2`)},[l.createElementVNode("label",ty,l.toDisplayString(l.unref(g).apartment),1),l.createElementVNode("input",{type:"text",class:"form-control",value:te.modelValue[l.unref(x)]||"",disabled:te.disabledFields?.apartment,onInput:U},null,40,iy)],2)):l.createCommentVNode("",!0)],64))]),te.showFullAddress&&l.unref(F)?(l.openBlock(),l.createElementBlock("div",ny,[l.createElementVNode("div",ry,[fe[0]||(fe[0]=l.createElementVNode("strong",null,"Полный адрес:",-1)),l.createTextVNode(" "+l.toDisplayString(l.unref(F)),1)])])):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-e07f42ef"]]),ay={class:"age-from-to-form"},oy={class:"form-group"},ly={key:0,class:"form-label mb-2"},uy={class:"row align-items-center mb-2"},cy={class:"col-auto"},dy={class:"form-label mb-0"},hy={class:"col"},fy={class:"col"},py={class:"row align-items-center mb-2"},my={class:"col-auto"},gy={class:"form-label mb-0"},by={class:"col"},vy={class:"col"},yy=Ve(l.defineComponent({__name:"AgeFromAgeTo",props:{modelValue:{default:null},title:{default:""},nameFrom:{default:"age_from"},nameTo:{default:"age_to"},placeholderFrom:{default:"От"},placeholderTo:{default:"До"},timeTypeOptions:{default:()=>[{id:1,label:"Дней",value:"days"},{id:2,label:"Недель",value:"weeks"},{id:3,label:"Месяцев",value:"months"},{id:4,label:"Лет",value:"years"}]},disabled:{type:Boolean,default:!1},onFilterUpdate:{type:Function,default:void 0}},emits:["update:modelValue","change"],setup(n,{expose:e,emit:t}){const i=n,r=t,s={age_from:null,age_to:null,time_type_from:null,time_type_to:null},a=l.ref({...s}),o=l.computed(()=>{const f=a.value.age_from;if(!f)return null;const _=a.value.time_type_from,k=i.timeTypeOptions.find(({id:C})=>Number(C)===Number(_))?.label;return k?`${f} ${k}`:null}),u=l.computed(()=>{const f=a.value.age_to;if(!f)return null;const _=a.value.time_type_to,k=i.timeTypeOptions.find(({id:C})=>Number(C)===Number(_))?.label;return k?`${f} ${k}`:null}),c=()=>{a.value={...s}},d=()=>{i.onFilterUpdate&&(i.onFilterUpdate(i.nameFrom,o.value),i.onFilterUpdate(i.nameTo,u.value))},p=f=>{if(!f.age_from&&!f.age_to&&!f.time_type_from&&!f.time_type_to){r("update:modelValue",null),r("change",{...s}),d();return}const k=[];f.age_from&&f.time_type_from&&k.push(`age_from[time_type]=${f.time_type_from}&age_from[value]=${f.age_from}`),f.age_to&&f.time_type_to&&k.push(`age_to[time_type]=${f.time_type_to}&age_to[value]=${f.age_to}`);const C=k.length>0?k.join("&")+"&":"";r("update:modelValue",C||null),r("change",{...f}),d()},h=f=>{if(f)try{const _=new URLSearchParams(f),k=_.get("age_from[value]"),C=_.get("age_from[time_type]"),y=_.get("age_to[value]"),v=_.get("age_to[time_type]");a.value={age_from:k?Number(k):null,age_to:y?Number(y):null,time_type_from:C?Number(C):null,time_type_to:v?Number(v):null}}catch(_){console.warn("Error parsing query string:",_)}};return l.watch(()=>i.modelValue,(f,_)=>{f!==_&&(f===null?c():h(f))},{immediate:!0}),l.watch(()=>a.value,f=>{p(f)},{deep:!0}),l.onMounted(()=>{i.modelValue&&h(i.modelValue)}),e({reset:c,getFormData:()=>({age_from:a.value.age_from?Number(a.value.age_from):null,age_to:a.value.age_to?Number(a.value.age_to):null,time_type_from:a.value.time_type_from?Number(a.value.time_type_from):null,time_type_to:a.value.time_type_to?Number(a.value.time_type_to):null}),getFilterStrings:()=>({from:o.value,to:u.value})}),(f,_)=>(l.openBlock(),l.createElementBlock("div",ay,[l.createElementVNode("div",oy,[f.title?(l.openBlock(),l.createElementBlock("label",ly,l.toDisplayString(f.title),1)):l.createCommentVNode("",!0),l.createElementVNode("div",uy,[l.createElementVNode("div",cy,[l.createElementVNode("label",dy,l.toDisplayString(f.placeholderFrom),1)]),l.createElementVNode("div",hy,[l.createVNode($n,{modelValue:a.value.age_from,"onUpdate:modelValue":_[0]||(_[0]=k=>a.value.age_from=k),name:f.nameFrom,maskOptions:{regex:"^[0-9]*$"},placeholder:`Введите ${f.placeholderFrom.toLowerCase()}`,disabled:f.disabled},null,8,["modelValue","name","placeholder","disabled"])]),l.createElementVNode("div",fy,[l.createVNode(Xt,{modelValue:a.value.time_type_from,"onUpdate:modelValue":_[1]||(_[1]=k=>a.value.time_type_from=k),name:`${f.nameFrom}_type`,multiple:!1,options:f.timeTypeOptions,allowClear:!1,disabled:f.disabled,placeholder:"Выберите тип"},null,8,["modelValue","name","options","disabled"])])]),l.createElementVNode("div",py,[l.createElementVNode("div",my,[l.createElementVNode("label",gy,l.toDisplayString(f.placeholderTo),1)]),l.createElementVNode("div",by,[l.createVNode($n,{modelValue:a.value.age_to,"onUpdate:modelValue":_[2]||(_[2]=k=>a.value.age_to=k),name:f.nameTo,maskOptions:{regex:"^[0-9]*$"},placeholder:`Введите ${f.placeholderTo.toLowerCase()}`,disabled:f.disabled},null,8,["modelValue","name","placeholder","disabled"])]),l.createElementVNode("div",vy,[l.createVNode(Xt,{modelValue:a.value.time_type_to,"onUpdate:modelValue":_[3]||(_[3]=k=>a.value.time_type_to=k),name:`${f.nameTo}_type`,multiple:!1,options:f.timeTypeOptions,allowClear:!1,disabled:f.disabled,placeholder:"Выберите тип"},null,8,["modelValue","name","options","disabled"])])])])]))}}),[["__scopeId","data-v-4b5f9814"]]),wy={key:0,class:"modal-wrapper"},Cy={class:"modal-header pb-4 border-bottom-0"},Ey={key:0,class:"modal-title"},ky={key:0,class:"modal-body pt-0"},Sy={key:1,class:"modal-footer row justify-content-start pt-3"},pc=l.defineComponent({__name:"DefaultModal",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},scrollable:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},size:{type:String,default:""},style:{type:String,default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.useSlots(),s=()=>{i("update:modelValue",!1)},a=o=>{o.key==="Escape"&&s()};return l.watch(()=>t.modelValue,o=>{o?(document.body.style.overflow="hidden",window.addEventListener("keydown",a)):(document.body.style.overflow="",window.removeEventListener("keydown",a))},{immediate:!0}),l.onUnmounted(()=>{document.body.style.overflow="",window.removeEventListener("keydown",a)}),(o,u)=>(l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[n.modelValue?(l.openBlock(),l.createElementBlock("div",wy,[l.createElementVNode("div",{class:"overlay",onClick:s}),l.createElementVNode("div",{class:l.normalizeClass(["modal-dialog",{"modal-dialog-scrollable":n.scrollable,"modal-dialog-centered":n.centered,"modal-sm":n.size==="sm","modal-lg":n.size==="lg","modal-xl":n.size==="xl"}])},[l.createElementVNode("div",{class:"modal-content p-3",style:l.normalizeStyle(n.style)},[l.createElementVNode("div",Cy,[n.title?(l.openBlock(),l.createElementBlock("h4",Ey,l.toDisplayString(n.title),1)):l.createCommentVNode("",!0),l.createElementVNode("button",{type:"button",class:"btn-close",onClick:s})]),l.unref(r)["modal-body"]||l.unref(r).body?(l.openBlock(),l.createElementBlock("div",ky,[l.renderSlot(o.$slots,"modal-body"),l.renderSlot(o.$slots,"body")])):l.createCommentVNode("",!0),l.unref(r)["modal-footer"]||l.unref(r).footer?(l.openBlock(),l.createElementBlock("div",Sy,[l.renderSlot(o.$slots,"modal-footer"),l.renderSlot(o.$slots,"footer")])):l.createCommentVNode("",!0)],4)],2)])):l.createCommentVNode("",!0)]))}}),xy="/img/success.png",_y="/img/warning.png",My="/img/error.png",Ry="/img/confirmation.png",Ty={class:"row mb-3"},Dy={class:"col-auto"},Oy={style:{width:"90px",height:"90px"}},Ly=["src","alt"],Py={key:1,class:"w-100",src:xy,alt:"Успех"},Ay={key:2,class:"w-100",src:_y,alt:"Предупреждение"},Fy={key:3,class:"w-100",src:My,alt:"Ошибка"},By={key:4,class:"w-100",src:Ry,alt:"Подтверждение"},Ny={class:"col"},Vy={class:"confirmation-content"},Hy={key:0,class:"mb-3"},zy={key:1,class:"text-muted"},Iy={key:0,class:"d-flex gap-2"},$y=["disabled"],jy=["disabled"],Wy={key:0,class:"spinner-border spinner-border-sm me-2",role:"status"},Gy=Ve(l.defineComponent({__name:"ConfirmationModal",props:{title:{default:"Подтверждение"},message:{default:""},description:{default:""},modalVisibility:{type:Boolean,default:!1},size:{default:""},confirmText:{default:"Да"},cancelText:{default:"Нет"},imageSrc:{default:""},imageAlt:{default:""},loading:{type:Boolean,default:!1},mode:{default:"confirmation"},showButtons:{type:Boolean,default:!0}},emits:["update:modalVisibility","confirm","cancel"],setup(n,{emit:e}){const t=n,i=e,r=c=>{i("update:modalVisibility",c)},s=()=>{switch(t.mode){case"success":return"btn btn-success";case"warning":return"btn btn-warning";case"error":return"btn btn-danger";default:return"btn btn-primary"}},a=()=>{switch(t.mode){case"success":return"Отлично";case"warning":return"Понятно";case"error":return"Понятно";default:return t.confirmText}},o=()=>{t.loading||i("confirm")},u=()=>{t.loading||(i("cancel"),i("update:modalVisibility",!1))};return(c,d)=>(l.openBlock(),l.createBlock(pc,{"model-value":c.modalVisibility,"onUpdate:modelValue":r,size:c.size,title:c.title},{"modal-body":l.withCtx(()=>[l.createElementVNode("div",Ty,[l.createElementVNode("div",Dy,[l.createElementVNode("div",Oy,[c.imageSrc?(l.openBlock(),l.createElementBlock("img",{key:0,class:"w-100",src:c.imageSrc,alt:c.imageAlt||"Изображение"},null,8,Ly)):c.mode==="success"?(l.openBlock(),l.createElementBlock("img",Py)):c.mode==="warning"?(l.openBlock(),l.createElementBlock("img",Ay)):c.mode==="error"?(l.openBlock(),l.createElementBlock("img",Fy)):(l.openBlock(),l.createElementBlock("img",By))])]),l.createElementVNode("div",Ny,[l.createElementVNode("div",Vy,[c.message?(l.openBlock(),l.createElementBlock("h5",Hy,l.toDisplayString(c.message),1)):l.createCommentVNode("",!0),c.description?(l.openBlock(),l.createElementBlock("p",zy,l.toDisplayString(c.description),1)):l.createCommentVNode("",!0)])])]),l.renderSlot(c.$slots,"modal-body",{},void 0,!0)]),"modal-footer":l.withCtx(()=>[l.renderSlot(c.$slots,"modal-footer",{},()=>[c.showButtons?(l.openBlock(),l.createElementBlock("div",Iy,[c.mode==="confirmation"?(l.openBlock(),l.createElementBlock("button",{key:0,class:"btn btn-light",onClick:u,disabled:c.loading},l.toDisplayString(c.cancelText),9,$y)):l.createCommentVNode("",!0),l.createElementVNode("button",{class:l.normalizeClass(s()),onClick:o,disabled:c.loading},[c.loading?(l.openBlock(),l.createElementBlock("span",Wy)):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(a()),1)],10,jy)])):l.createCommentVNode("",!0)],!0)]),_:3},8,["model-value","size","title"]))}}),[["__scopeId","data-v-c2efa4c0"]]),Yy={key:0,class:"filter-modal-wrapper"},Uy={class:"filter-modal-dialog"},qy={class:"filter-modal-content"},Ky={class:"filter-modal-header"},Jy={key:0,class:"filter-modal-title"},Xy={class:"filter-modal-body"},Zy={class:"filter-modal-footer"},Qy=Ve(l.defineComponent({__name:"TableFilterModalComponent",props:{title:{default:""},modalVisibility:{type:Boolean,default:!1}},emits:["emitModalVisibility"],setup(n,{emit:e}){const t=n,i=e,r=()=>{i("emitModalVisibility",!1)},s=a=>{a.key==="Escape"&&r()};return l.watch(()=>t.modalVisibility,a=>{a?(document.body.style.overflow="hidden",window.addEventListener("keydown",s)):(document.body.style.overflow="",window.removeEventListener("keydown",s))},{immediate:!0}),l.onUnmounted(()=>{document.body.style.overflow="",window.removeEventListener("keydown",s)}),(a,o)=>(l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[a.modalVisibility?(l.openBlock(),l.createElementBlock("div",Yy,[l.createElementVNode("div",{class:"filter-modal-overlay",onClick:r}),l.createElementVNode("div",Uy,[l.createElementVNode("div",qy,[l.createElementVNode("div",Ky,[a.title?(l.openBlock(),l.createElementBlock("h4",Jy,l.toDisplayString(a.title),1)):l.createCommentVNode("",!0),l.createElementVNode("button",{type:"button",class:"btn-close",onClick:r})]),l.createElementVNode("div",Xy,[l.renderSlot(a.$slots,"modal-body",{},void 0,!0)]),l.createElementVNode("div",Zy,[l.renderSlot(a.$slots,"modal-footer",{},void 0,!0)])])])])):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-7c21e35f"]]),ew={key:0,class:"px-0"},tw={class:"modal-dialog modal-dialog-centered modal-xl"},iw={class:"modal-content py-2 px-4"},nw={class:"modal-header"},rw={class:"modal-title"},sw={class:"modal-body row"},aw={class:"modal-footer border-0 row justify-content-start pt-0"},mc=Ve(l.defineComponent({__name:"EditTableColumnsModalComponent",props:{title:{default:""},modalVisibility:{type:Boolean,default:!1}},emits:["emitModalVisibility"],setup(n,{emit:e}){return(t,i)=>t.modalVisibility?(l.openBlock(),l.createElementBlock("div",ew,[l.createElementVNode("div",{class:"overlay",onClick:i[0]||(i[0]=r=>t.$emit("emitModalVisibility",!1))}),l.createElementVNode("div",tw,[l.createElementVNode("div",iw,[l.createElementVNode("div",nw,[l.createElementVNode("h3",rw,l.toDisplayString(t.title),1),l.createElementVNode("button",{type:"button",class:"btn-close",onClick:i[1]||(i[1]=r=>t.$emit("emitModalVisibility",!1))})]),l.createElementVNode("div",sw,[l.renderSlot(t.$slots,"modal-body",{},void 0,!0)]),l.createElementVNode("div",aw,[l.renderSlot(t.$slots,"modal-footer",{},void 0,!0)])])])])):l.createCommentVNode("",!0)}}),[["__scopeId","data-v-549f79df"]]),ow={class:"row mb-4 mx-0","data-test":"PageTitle"},lw={class:"col-12"},uw={class:"row align-items-center"},cw={class:"col-auto"},dw={class:"col d-flex justify-content-end"},hw=Ve(l.defineComponent({__name:"PageTitle",props:{title:{},subtitle:{default:""},titleClass:{default:""},subtitleClass:{default:""},titleStyle:{default:""},subtitleStyle:{default:""}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("div",ow,[l.createElementVNode("div",lw,[l.createElementVNode("div",uw,[l.createElementVNode("div",cw,[l.createElementVNode("h2",{class:l.normalizeClass(["mb-0",e.titleClass]),style:l.normalizeStyle(e.titleStyle)},l.toDisplayString(e.title),7),e.subtitle?(l.openBlock(),l.createElementBlock("p",{key:0,class:l.normalizeClass(["text-muted mb-0 mt-1",e.subtitleClass]),style:l.normalizeStyle(e.subtitleStyle)},l.toDisplayString(e.subtitle),7)):l.createCommentVNode("",!0)]),l.createElementVNode("div",dw,[l.renderSlot(e.$slots,"default",{},void 0,!0)])])])]))}}),[["__scopeId","data-v-fd1eb9a3"]]),fw={class:"card-body"},pw={class:"card-text"},mw=Ve({__name:"Card",props:{title:{type:String,default:""},bodyClass:{type:String,default:"bg-gray-light"}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["card",n.bodyClass])},[l.createElementVNode("div",fw,[l.renderSlot(e.$slots,"bodyHeader",{},void 0,!0),l.createElementVNode("p",pw,[l.renderSlot(e.$slots,"default",{},void 0,!0)])])],2))}},[["__scopeId","data-v-5fa81802"]]),gw={key:0,class:"card-header"},bw={class:"card-title mb-0"},vw={class:"card-body"},yw={class:"row"},ww={class:"row align-items-center"},Cw={class:"col-auto label pe-0"},Ew={class:"col-auto"},kw={key:0,class:"mt-3"},Sw=Ve(l.defineComponent({__name:"CardInfo",props:{title:{default:""},fields:{default:()=>[]},cardClass:{default:""},variant:{default:"default"},size:{default:"md"},bordered:{type:Boolean,default:!0},shadow:{type:Boolean,default:!1}},setup(n){const e=n,t=l.computed(()=>{const i=["card-info"];return e.variant!=="default"&&i.push(`card-info--${e.variant}`),e.size!=="md"&&i.push(`card-info--${e.size}`),e.bordered&&i.push("card-info--bordered"),e.shadow&&i.push("card-info--shadow"),e.cardClass&&i.push(e.cardClass),i.join(" ")});return(i,r)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["card",t.value])},[i.title?(l.openBlock(),l.createElementBlock("div",gw,[l.createElementVNode("h5",bw,l.toDisplayString(i.title),1)])):l.createCommentVNode("",!0),l.createElementVNode("div",vw,[l.createElementVNode("div",yw,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.fields,(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:"col-12 mb-2",key:a},[l.createElementVNode("div",ww,[l.createElementVNode("div",Cw,l.toDisplayString(s.label)+": ",1),l.createElementVNode("div",Ew,[l.createElementVNode("span",{class:l.normalizeClass(["value",s.valueClass]),style:l.normalizeStyle(s.valueStyle)},l.toDisplayString(s.value),7)])])]))),128))]),i.$slots.default?(l.openBlock(),l.createElementBlock("div",kw,[l.renderSlot(i.$slots,"default",{},void 0,!0)])):l.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-56359964"]]),xw={class:"col-12 divider divider__wrapper","data-test":"Divider"},gc={__name:"Divider",props:{height:{type:[Number,String],default:4},className:{type:String,default:"mb-4"},colorHEX:{type:String,default:"#EFEFEF"}},setup(n){const e=n;return(t,i)=>(l.openBlock(),l.createElementBlock("div",xw,[l.createElementVNode("div",{class:l.normalizeClass(e.className),style:l.normalizeStyle(`height: ${e.height}px ; background-color:${e.colorHEX};`)},null,6)]))}},_w={class:"custom-dropdown"},Mw={style:{"border-bottom":"2px solid #000"}},Rw={class:"dropdown-list-wrapper"},Tw={key:0,class:"custom-dropdown-menu"},Dw=["onClick"],bc=Ve({__name:"DefaultDropDown",props:{links:{type:Array,required:!0},title:{type:String,default:"Actions"},type:{type:String,default:"actions",validator:function(n){return["actions","profile"].includes(n)}}},setup(n){const e=n,t=l.ref(!1),i=o=>{o&&(o.preventDefault(),o.stopPropagation()),t.value=!t.value},r=o=>{o(),i()},s=o=>{o&&(o.preventDefault(),o.stopPropagation()),setTimeout(()=>{t.value=!1},100)},a=l.computed(()=>e.type==="profile");return(o,u)=>(l.openBlock(),l.createElementBlock("div",_w,[a.value?(l.openBlock(),l.createElementBlock("a",{key:0,href:"#",class:"cursor-pointer nav-link dropdown-toggle d-flex align-items-center border rounded p-2",onClick:i,onBlur:s},[u[0]||(u[0]=l.createElementVNode("div",{class:"circl"},null,-1)),l.createTextVNode(" "+l.toDisplayString(n.title),1)],32)):(l.openBlock(),l.createElementBlock("a",{key:1,href:"#",class:"link-dark",type:"button",onClick:i,onBlur:s},[l.createElementVNode("span",Mw,l.toDisplayString(n.title),1),u[1]||(u[1]=l.createElementVNode("i",{class:"bi bi-chevron-up dropdown-edit",style:{"font-size":"12px","padding-left":"5px"}},null,-1))],32)),l.createElementVNode("div",Rw,[t.value?(l.openBlock(),l.createElementBlock("ul",Tw,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.links,(c,d)=>(l.openBlock(),l.createElementBlock("li",{key:d},[c.hidden?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["dropdown-item",{disabled:c?.disabled}]),style:{cursor:"pointer"},onClick:p=>r(c?.action)},l.toDisplayString(c?.title),11,Dw))]))),128))])):l.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-efc16eec"]]),Ow={class:"page-card"},Lw={class:"row hide-to-print card-header mx-0 w-100"},Pw={class:"col"},Aw={class:"row flex-nowrap align-items-center"},Fw={class:"col-auto"},Bw={key:0,class:"col-auto"},Nw={class:"row",style:{padding:"20px"}},Vw={class:"d-flex align-items-start"},Hw={class:"nav flex-column nav-pills",id:"v-pills-tab",role:"tablist","aria-orientation":"vertical"},zw=["onClick"],Iw={class:"tab-content",id:"v-pills-tabContent"},$w={key:0,class:"title"},jw={key:1},Ww={key:0},Gw=["title"],Yw={class:"row"},Uw={class:"col-12"},qw=Ve(l.defineComponent({__name:"PageCard",props:{actionLinks:{default:()=>[]},tabs:{default:()=>[]},col:{default:"auto"},actionsTitle:{default:"Действия"}},emits:["click","active-tab"],setup(n,{emit:e}){const t=n,i=e,r=l.ref(0),s=l.ref(!1),a=l.ref(!1),o=l.useSlots(),u=h=>{i("click",h)},c=()=>{a.value=!!o.header&&o.header().length>0},d=()=>{s.value=!!o.footer&&o.footer().length>0},p=h=>{r.value=h,i("active-tab",t.tabs[h])};return l.onMounted(()=>{c(),d()}),(h,f)=>(l.openBlock(),l.createElementBlock("div",Ow,[l.createElementVNode("div",Lw,[l.createElementVNode("div",Pw,[l.createElementVNode("div",Aw,[l.createElementVNode("div",Fw,[a.value?l.renderSlot(h.$slots,"header",{key:0},void 0,!0):l.createCommentVNode("",!0)])])]),h.actionLinks.length>0?(l.openBlock(),l.createElementBlock("div",Bw,[l.createVNode(bc,{title:h.actionsTitle,links:h.actionLinks,onClick:u},null,8,["title","links"])])):l.createCommentVNode("",!0)]),l.createElementVNode("div",Nw,[l.createElementVNode("div",Vw,[l.createElementVNode("div",Hw,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.tabs,(_,k)=>l.withDirectives((l.openBlock(),l.createElementBlock("button",{key:k,class:l.normalizeClass(["nav-link me-5",[k===r.value?"active":""]]),onClick:C=>p(k)},l.toDisplayString(_.navLink),11,zw)),[[l.vShow,_.navLink]])),128))]),l.createElementVNode("div",Iw,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.tabs,(_,k)=>(l.openBlock(),l.createElementBlock("div",{key:k,class:l.normalizeClass(["tab-pane fade row",[k===r.value?"show active d-flex":""]])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(_.contents,(C,y)=>(l.openBlock(),l.createElementBlock("div",{key:y,class:l.normalizeClass(`col-${h.col} mb-3`)},[C.subtitle?(l.openBlock(),l.createElementBlock("div",$w,l.toDisplayString(C.subtitle)+": ",1)):l.createCommentVNode("",!0),typeof C.text=="string"?(l.openBlock(),l.createElementBlock("div",jw,l.toDisplayString(C.text),1)):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:2},l.renderList(C.text,(v,R)=>(l.openBlock(),l.createElementBlock("div",{key:R},[typeof v=="string"?(l.openBlock(),l.createElementBlock("div",Ww,l.toDisplayString(v),1)):l.createCommentVNode("",!0),typeof v=="object"?(l.openBlock(),l.createElementBlock("div",{key:1,title:v?.description||""},l.toDisplayString(v.name),9,Gw)):l.createCommentVNode("",!0)]))),128))],2))),128))],2))),128))])]),s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(gc,{class:"mt-3"}),l.createElementVNode("div",Yw,[l.createElementVNode("div",Uw,[l.renderSlot(h.$slots,"footer",{},void 0,!0)])])],64)):l.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-89706e0a"]]),Kw={key:0,class:"row w-100 parent"},Jw={class:"col-12 wrapper w-100"},Xw=["innerHTML"],vc={__name:"Toast",props:{message:{type:String,default:""},isError:{type:Boolean,default:!1}},setup(n){const e=n,t=l.ref(e.message);l.watch(()=>e.message,r=>{t.value=r});const i=()=>{t.value=""};return(r,s)=>t.value&&t.value.length>0?(l.openBlock(),l.createElementBlock("div",Kw,[l.createElementVNode("div",Jw,[l.createElementVNode("div",{class:l.normalizeClass(["alert align-items-center message",[e.isError?"alert-danger":"alert-success"]]),innerHTML:t.value},null,10,Xw),l.createElementVNode("i",{class:"bi bi-x-lg",onClick:i})])])):l.createCommentVNode("",!0)}},Zw={class:"row","data-test":"ErrorMessageComponent"},Qw={class:"col-12"},eC={key:0,class:"bi bi-exclamation-triangle pe-2","aria-hidden":"true"},tC=["innerHTML"],iC=Ve(l.defineComponent({__name:"ErrorMessageComponent",props:{message:{default:""},warningIcon:{type:Boolean,default:!1},type:{default:"danger"},asHtml:{type:Boolean,default:!1}},setup(n){const e=n;l.computed(()=>(Array.isArray(e.message)||e.message)&&e.message.length>0);const t=l.computed(()=>Array.isArray(e.message)?e.message.join(", "):e.message||"");return(i,r)=>(l.openBlock(),l.createElementBlock("div",Zw,[l.createElementVNode("div",Qw,[l.createElementVNode("div",{class:l.normalizeClass([`alert alert-${i.type}`,{"d-flex align-items-center":i.warningIcon}])},[i.warningIcon?(l.openBlock(),l.createElementBlock("i",eC)):l.createCommentVNode("",!0),i.asHtml?(l.openBlock(),l.createElementBlock("div",{key:1,innerHTML:t.value},null,8,tC)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.createTextVNode(l.toDisplayString(t.value),1)],64))],2)])]))}}),[["__scopeId","data-v-c739823d"]]),nC={class:"accordion-header",style:{background:"transparent"}},rC=["aria-expanded","aria-controls"],sC={key:0},aC=["id"],oC={class:"accordion-body px-0"},lC=Ve(l.defineComponent({__name:"DefaultAccordion",props:{title:{},titleFontSize:{default:16},isCollapsed:{type:Boolean,default:!0},isVisibleBorderBottom:{type:Boolean,default:!0},isCollapsedDefault:{type:Boolean,default:!0},isTitleBold:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},emits:["update-visibility"],setup(n,{emit:e}){const t=n,i=e,r=l.useSlots(),s=l.ref(Math.random().toString(36).substr(2,9)),a=u=>!!r[u],o=()=>{const u=!t.isCollapsed;i("update-visibility",u)};return l.watch(()=>t.isCollapsedDefault,u=>{i("update-visibility",u)},{deep:!0}),(u,c)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["accordion accordion-flush",{"w-100":u.fullWidth}]),style:{background:"transparent"}},[l.createElementVNode("div",{class:l.normalizeClass(["accordion-item",{"border-bottom":u.isVisibleBorderBottom}]),style:{background:"transparent"}},[l.createElementVNode("h2",nC,[l.createElementVNode("button",{onClick:o,class:l.normalizeClass(["accordion-button collapsed ps-0",{visible:!u.isCollapsed,"fw-bolder":u.isTitleBold}]),style:l.normalizeStyle(`font-size:${u.titleFontSize}px;`),type:"button","aria-expanded":!u.isCollapsed,"aria-controls":`accordion-${s.value}`},l.toDisplayString(u.title),15,rC)]),l.createVNode(l.Transition,{name:"fade"},{default:l.withCtx(()=>[a("accordion-body")?(l.openBlock(),l.createElementBlock("div",sC,[l.withDirectives(l.createElementVNode("div",{class:"accordion-collapse collapse show",id:`accordion-${s.value}`},[l.createElementVNode("div",oC,[l.renderSlot(u.$slots,"accordion-body",{},void 0,!0)])],8,aC),[[l.vShow,!u.isCollapsed]])])):l.createCommentVNode("",!0)]),_:3})],2)],2))}}),[["__scopeId","data-v-99bfaf08"]]),uC={class:"accordion-header",style:{background:"transparent"}},cC=["onClick"],dC={class:"d-flex align-items-center w-100"},hC={class:"d-flex align-items-center flex-grow-1"},fC=["value","id","onChange"],pC={class:"form-check-label ps-2 text-body flex-grow-1"},mC={class:"accordion-collapse collapse show","aria-labelledby":"flush-animal-type","data-bs-parent":""},gC={class:"col d-flex flex-wrap px-4"},bC={class:"form-check"},vC=["value","id"],yC=["for"],wC=Ve(l.defineComponent({__name:"KindCheckboxesAccordion",props:{checkboxName:{default:"kinds"},kindGroups:{default:()=>[]},defaultSelectedKinds:{default:()=>[]},defaultSelectedKindGroups:{default:()=>[]}},emits:["emitSelectedKinds","emitSelectedKindGroups"],setup(n,{expose:e,emit:t}){const i=n,r=t,s=l.ref([]),a=l.ref([]),o=l.ref(null),u=l.ref([]),c=(_,k)=>{const C=_.target;if(C.tagName==="INPUT"||C.closest(".form-check-input"))return!1;if(C.tagName==="SPAN"||C.closest(".form-check-label"))return o.value!==Number(k)?(o.value=Number(k),!0):(o.value=null,!0);if(o.value!==Number(k))return o.value=Number(k),!0;o.value=null},d=_=>{const k=i.kindGroups.find(y=>y.id===_);if(!k)return;if(s.value.includes(String(_))){const y=k.kinds.map(R=>String(R.id)),v=[...a.value];y.forEach(R=>{v.includes(R)||v.push(R)}),a.value=v}else{const y=k.kinds.map(v=>String(v.id));a.value=a.value.filter(v=>!y.includes(String(v)))}},p=()=>{l.nextTick(()=>{h()})},h=()=>{const _=[];i.kindGroups.forEach((y,v)=>{const R=u.value?.[v];if(!R)return;const m=y.kinds.map(g=>String(g.id)),x=a.value.filter(g=>m.includes(String(g)));x.length===0?(R.indeterminate=!1,R.checked=!1):x.length===m.length?(R.indeterminate=!1,R.checked=!0,_.push(String(y.id))):(R.indeterminate=!0,R.checked=!1)});const k=s.value.map(String).sort(),C=_.map(String).sort();JSON.stringify(k)!==JSON.stringify(C)&&(s.value=_)};l.watch(()=>a.value,_=>{r("emitSelectedKinds",_)},{deep:!0}),l.watch(()=>s.value,_=>{r("emitSelectedKindGroups",_)},{deep:!0}),l.onMounted(()=>{i.defaultSelectedKinds.length>0&&(a.value=[...i.defaultSelectedKinds]),i.defaultSelectedKindGroups.length>0&&(s.value=[...i.defaultSelectedKindGroups]),l.nextTick(()=>{h()})});const f=l.computed(()=>c);return e({toggleAccordion:c}),(_,k)=>(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(_.kindGroups,(C,y)=>(l.openBlock(),l.createElementBlock("div",{class:"accordion-item border-bottom",style:{background:"transparent"},key:C.id},[_.kindGroups[y].kinds.length>0?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",uC,[l.createElementVNode("button",{class:l.normalizeClass(["accordion-button ps-0",{collapsed:o.value===Number(y)}]),type:"button",style:{background:"transparent"},onClick:v=>f.value(v,y)},[l.createElementVNode("div",dC,[l.createElementVNode("div",hC,[l.withDirectives(l.createElementVNode("input",{class:"form-check-input m-0",type:"checkbox",ref_for:!0,ref_key:"groupCheckbox",ref:u,value:`${C.id}`,id:`${_.checkboxName}_${y}`,name:"kind_group","onUpdate:modelValue":k[0]||(k[0]=v=>s.value=v),onClick:k[1]||(k[1]=l.withModifiers(()=>{},["stop"])),onChange:v=>d(C.id)},null,40,fC),[[l.vModelCheckbox,s.value]]),l.createElementVNode("span",pC,l.toDisplayString(C.name),1)]),l.createElementVNode("i",{class:l.normalizeClass(["bi bi-chevron-down accordion-icon",{rotated:o.value===Number(y)}])},null,2)])],10,cC)]),l.withDirectives(l.createElementVNode("div",mC,[l.createElementVNode("div",gC,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(_.kindGroups[y].kinds,(v,R)=>(l.openBlock(),l.createElementBlock("div",{class:"col-6 mb-2",key:R},[l.createElementVNode("div",bC,[l.withDirectives(l.createElementVNode("input",{class:"form-check-input",type:"checkbox",value:`${v.id}`,id:`${_.checkboxName}_${v.id}`,name:"kinds","onUpdate:modelValue":k[2]||(k[2]=m=>a.value=m),onChange:p},null,40,vC),[[l.vModelCheckbox,a.value]]),l.createElementVNode("label",{class:"form-check-label",for:`${_.checkboxName}_${v.id}`},[l.createElementVNode("small",null,l.toDisplayString(v.name),1)],8,yC)])]))),128))])],512),[[l.vShow,o.value===Number(y)]])],64)):l.createCommentVNode("",!0)]))),128))}}),[["__scopeId","data-v-c0a701d5"]]);class rt{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class Ke{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var r=e?t.split(e):[t],s=r.length,a;for(let o=0;o<s&&(i=i[r[o]],a=i,!!i);o++);return a}static deepClone(e,t,i=[]){var r={}.__proto__,s=[].__proto__;t||(t=Object.assign(Array.isArray(e)?[]:{},e));for(var a in e){let o=e[a],u,c;o!=null&&typeof o=="object"&&(o.__proto__===r||o.__proto__===s)&&(u=i.findIndex(d=>d.subject===o),u>-1?t[a]=i[u].copy:(c=Object.assign(Array.isArray(o)?[]:{},o),i.unshift({subject:o,copy:c}),t[a]=this.deepClone(o,c,i)))}return t}}let CC=class Dc extends rt{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,r=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let s=Ke.elOffset(this.container);i-=s.left,r-=s.top}return{x:i,y:r}}elementPositionCoords(e,t="right"){var i=Ke.elOffset(e),r,s,a;switch(this.container!==document.body&&(r=Ke.elOffset(this.container),i.left-=r.left,i.top-=r.top),t){case"right":s=i.left+e.offsetWidth,a=i.top-1;break;case"bottom":s=i.left,a=i.top+e.offsetHeight;break;case"left":s=i.left,a=i.top-1;break;case"top":s=i.left,a=i.top;break;case"center":s=i.left+e.offsetWidth/2,a=i.top+e.offsetHeight/2;break}return{x:s,y:a,offset:i}}show(e,t){var i,r,s,a,o;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(s=e,o=this.elementPositionCoords(e,t),a=o.offset,i=o.x,r=o.y):typeof e=="number"?(a={top:0,left:0},i=e,r=t):(o=this.containerEventCoords(e),i=o.x,r=o.y,this.reversedX=!1),this.element.style.top=r+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,r,s,a,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",u=>{u.stopPropagation()}),this)}_fitToScreen(e,t,i,r,s){var a=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-r.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let o=Math.max(this.container.offsetHeight,a?this.container.scrollHeight:0);if(t+this.element.offsetHeight>o)if(i)switch(s){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.height=o+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new Dc(this.table,e,this),this.childPopup}};class Pe extends rt{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(r=>r.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new CC(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var EC={rownum:function(n,e,t,i,r,s){return s.getPosition()}};class Jn extends Pe{static moduleName="accessor";static accessors=EC;constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(r=>{var s="accessor"+(r.charAt(0).toUpperCase()+r.slice(1)),a;e.definition[s]&&(a=this.lookupAccessor(e.definition[s]),a&&(t=!0,i[s]={accessor:a,params:e.definition[s+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":Jn.accessors[e]?t=Jn.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.getComponent(),s=Ke.deepClone(e.data||{});return this.table.columnManager.traverse(function(a){var o,u,c,d;a.modules.accessor&&(u=a.modules.accessor[i]||a.modules.accessor.accessor||!1,u&&(o=a.getFieldValue(s),o!="undefined"&&(d=a.getComponent(),c=typeof u.params=="function"?u.params(o,s,t,d,r):u.params,a.setFieldValue(s,u.accessor(o,s,t,c,d,r)))))}),s}}var kC={method:"GET"};function ua(n,e){var t=[];if(e=e||"",Array.isArray(n))n.forEach((r,s)=>{t=t.concat(ua(r,e?e+"["+s+"]":s))});else if(typeof n=="object")for(var i in n)t=t.concat(ua(n[i],e?e+"["+i+"]":i));else t.push({key:e,value:n});return t}function SC(n){var e=ua(n),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function yc(n,e,t){return n&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",n+=(n.includes("?")?"&":"?")+SC(t)),n}function xC(n,e,t){var i;return new Promise((r,s)=>{if(n=this.urlGenerator.call(this.table,n,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var a in i.headers)e.headers||(e.headers={}),typeof e.headers[a]>"u"&&(e.headers[a]=i.headers[a]);e.body=i.body.call(this,n,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);n?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(n,e).then(o=>{o.ok?o.json().then(u=>{r(u)}).catch(u=>{s(u),console.warn("Ajax Load Error - Invalid JSON returned",u)}):(console.error("Ajax Load Error - Connection Error: "+o.status,o.statusText),s(o))}).catch(o=>{console.error("Ajax Load Error - Connection Error: ",o),s(o)})):(console.warn("Ajax Load Error - No URL Set"),r([]))})}function ca(n,e){var t=[];if(e=e||"",Array.isArray(n))n.forEach((r,s)=>{t=t.concat(ca(r,e?e+"["+s+"]":s))});else if(typeof n=="object")for(var i in n)t=t.concat(ca(n[i],e?e+"["+i+"]":i));else t.push({key:e,value:n});return t}var _C={json:{headers:{"Content-Type":"application/json"},body:function(n,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(n,e,t){var i=ca(t),r=new FormData;return i.forEach(function(s){r.append(s.key,s.value)}),r}}};class Fi extends Pe{static moduleName="ajax";static defaultConfig=kC;static defaultURLGenerator=yc;static defaultLoaderPromise=xC;static contentTypeFormatters=_C;constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=Fi.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||Fi.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||Fi.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,r){var s=this.table.options.ajaxParams;return s&&(typeof s=="function"&&(s=s.call(this.table)),r=Object.assign(Object.assign({},s),r)),r}requestDataCheck(e,t,i,r){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,r,s){var a;return!s&&this.requestDataCheck(e)?(e&&this.setUrl(e),a=this.generateConfig(i),this.sendRequest(this.url,t,a)):s}setDefaultConfig(e={}){this.config=Object.assign({},Fi.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(r=>(this.table.options.ajaxResponse&&(r=this.table.options.ajaxResponse.call(this.table,e,t,r)),r)):Promise.reject()}}var MC={replace:function(n){return this.table.setData(n)},update:function(n){return this.table.updateOrAddData(n)},insert:function(n){return this.table.addData(n)}},RC={table:function(n){var e=[],t=!0,i=this.table.columnManager.columns,r=[],s=[];return n=n.split(`
32
- `),n.forEach(function(a){e.push(a.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(a){var o=i.find(function(u){return a&&u.definition.title&&a.trim()&&u.definition.title.trim()===a.trim()});o?r.push(o):t=!1}),t||(t=!0,r=[],e[0].forEach(function(a){var o=i.find(function(u){return a&&u.field&&a.trim()&&u.field.trim()===a.trim()});o?r.push(o):t=!1}),t||(r=this.table.columnManager.columnsByIndex)),t&&e.shift(),e.forEach(function(a){var o={};a.forEach(function(u,c){r[c]&&(o[r[c].field]=u)}),s.push(o)}),s):!1}},TC={copyToClipboard:["ctrl + 67","meta + 67"]},DC={copyToClipboard:function(n){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},OC={keybindings:{bindings:TC,actions:DC}};class Xn extends Pe{static moduleName="clipboard";static moduleExtensions=OC;static pasteActions=MC;static pasteParsers=RC;constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,(this.mode===!0||this.mode==="copy")&&this.table.element.addEventListener("copy",e=>{var t,i,r;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(r=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),i=this.table.modules.export.generateHTMLTable(r),t=i?this.generatePlainContent(r):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),i=this.table.options.clipboardCopyFormatter("html",i))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),i&&e.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",t,i),this.reset())}),(this.mode===!0||this.mode==="paste")&&this.table.element.addEventListener("paste",e=>{this.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach(i=>{var r=[];i.columns.forEach(s=>{var a="";if(s)if(i.type==="group"&&(s.value=s.component.getKey()),s.value===null)a="";else switch(typeof s.value){case"object":a=JSON.stringify(s.value);break;case"undefined":a="";break;default:a=s.value}r.push(a)}),t.push(r.join(" "))}),t.join(`
33
- `)}copy(e,t){var i,r;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(r=document.body.createTextRange(),r.moveToElementText(this.table.element),r.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=Xn.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=Xn.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var t,i,r;this.checkPasteOrigin(e)&&(t=this.getPasteData(e),i=this.pasteParser.call(this,t),i?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),r=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,r)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"clipboard"))}):t=e,t}checkPasteOrigin(e){var t=!0,i=this.confirm("clipboard-paste",[e]);return(i||!["DIV","SPAN"].includes(e.target.tagName))&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}class LC{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}_getSelf(){return this._row}}class wc{constructor(e){return this._cell=e,new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,i)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){typeof t>"u"&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class un extends rt{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.column.isRowHeader&&this.element.classList.add("tabulator-row-header")}_configureCell(){var e=this.element,t=this.column.getField(),i={top:"flex-start",bottom:"flex-end",middle:"center"},r={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=i[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=r[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass){var s=this.column.definition.cssClass.split(" ");s.forEach(a=>{e.classList.add(a)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){var r=this.setValueProcessData(e,t,i);r&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,i){var r=!1;return(this.value!==e||i)&&(r=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),r&&this.dispatch("cell-value-changed",this),r}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new wc(this)),this.component}}class Cc{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._column.table.componentFunctionBinder.handle("column",t._column,i)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e}getParentColumn(){return this._column.getParentComponent()}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return e===!0?t=this._column.reinitializeWidth(!0):t=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var Ec={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class Vt extends rt{static defaultOptionList=Ec;constructor(e,t,i){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.isGroup=!1,this.isRowHeader=i,this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((r,s)=>{var a=new Vt(r,this);this.attachColumn(a)}),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.isRowHeader&&e.classList.add("tabulator-row-header"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)typeof this.definition[t]>"u"&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(Vt.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{Vt.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var t=e.cssClass.split(" ");t.forEach(i=>{this.element.classList.add(i)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",r=>{r.stopPropagation(),i.focus()}),i.addEventListener("mousedown",r=>{r.stopPropagation()}),i.addEventListener("change",()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),t.appendChild(i),e.field?this.langBind("columns|"+e.field,r=>{i.value=r||e.title||"&nbsp;"}):i.value=e.title||"&nbsp;"}else e.field?this.langBind("columns|"+e.field,r=>{this._formatColumnHeaderTitle(t,r||e.title||"&nbsp;")}):this._formatColumnHeaderTitle(t,e.title||"&nbsp;");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,()=>t);switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(t=>{this.element.classList.add(t)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t=e,i=this.fieldStructure,r=i.length,s;for(let a=0;a<r&&(t=t[i[a]],s=t,!!t);a++);return s}_setFlatData(e,t){this.field&&(e[this.field]=t)}_setNestedData(e,t){var i=e,r=this.fieldStructure,s=r.length;for(let a=0;a<s;a++)if(a==s-1)i[r[a]]=t;else{if(!i[r[a]])if(typeof t<"u")i[r[a]]={};else break;i=i[r[a]]}}attachColumn(e){this.groupElement?(this.columns.push(e),this.groupElement.appendChild(e.getElement()),e.columnRendered()):console.warn("Column Warning - Column being attached to another column instead of column group")}verticalAlign(e,t){var i=this.parent.isGroup?this.parent.getGroupElement().clientHeight:t||this.parent.getHeadersElement().clientHeight;this.element.style.height=i+"px",this.dispatch("column-height",this,this.element.style.height),this.isGroup&&(this.groupElement.style.minHeight=i-this.contentElement.offsetHeight+"px"),this.columns.forEach(function(r){r.verticalAlign(e)})}clearVerticalAlign(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(e){e.clearVerticalAlign()}),this.dispatch("column-height",this,"")}getElement(){return this.element}getGroupElement(){return this.groupElement}getField(){return this.field}getTitleDownload(){return this.titleDownload}getFirstColumn(){return this.isGroup?this.columns.length?this.columns[0].getFirstColumn():!1:this}getLastColumn(){return this.isGroup?this.columns.length?this.columns[this.columns.length-1].getLastColumn():!1:this}getColumns(e){var t=[];return e?this.columns.forEach(i=>{t.push(i),t=t.concat(i.getColumns(!0))}):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(i){t.push(i.getDefinition(!0))}),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.hide()}),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.table.initialized&&(this.element.style.width=e+"px"),this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this),this.subscribedExternal("columnWidth")&&this.dispatchExternal("columnWidth",this.getComponent())}checkCellHeights(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(t.row.getElement().offsetParent!==null?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(t){t.calcHeight()}),e.forEach(function(t){t.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})}setMaxWidth(e){this.minWidth&&e<this.minWidth&&(e=this.minWidth,console.warn("the maxWidth ("+e+"px) for column '"+this.field+"' cannot be smaller that its minWidth ("+this.minWidthStyled+")")),this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(t){t.setMaxWidth()})}delete(){return new Promise((e,t)=>{this.isGroup&&this.columns.forEach(function(r){r.delete()}),this.dispatch("column-delete",this);var i=this.cells.length;for(let r=0;r<i;r++)this.cells[0].delete();this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.contentElement=!1,this.titleElement=!1,this.groupElement=!1,this.parent.isGroup&&this.parent.removeChild(this),this.table.columnManager.deregisterColumn(this),this.table.columnManager.rerenderColumns(!0),this.dispatch("column-deleted",this),e()})}columnRendered(){this.titleFormatterRendered&&this.titleFormatterRendered(),this.dispatch("column-rendered",this)}generateCell(e){var t=new un(this,e);return this.cells.push(t),t}nextColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(r=>{r.clearWidth()}));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(r=>{var s=r.getWidth();s>t&&(t=s)}),t)){var i=t+1;e?this.setWidth(i):(this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i))}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then(i=>(t.field==this.field&&(this.field=!1),this.delete().then(()=>i.getComponent()))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new Cc(this)),this.component}getPosition(){return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this)+1}getParentComponent(){return this.parent instanceof Vt?this.parent.getComponent():!1}}class Zn{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class ot extends rt{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.calcMinHeight(),t=this.calcMaxHeight(),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}calcMinHeight(){return this.table.options.resizableRows?this.element.clientHeight:0}calcMaxHeight(){var e=0;return this.cells.forEach(function(t){var i=t.getHeight();i>e&&(e=i)}),e}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight,this.subscribedExternal("rowHeight")&&this.dispatchExternal("rowHeight",this.getComponent()))}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&Ke.elVisible(this.element),i={},r;return new Promise((s,a)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(i=Object.assign(i,this.data),i=Object.assign(i,e)),r=this.chain("row-data-changing",[this,i,e],null,e);for(let o in r)this.data[o]=r[o];this.dispatch("row-data-save-after",this);for(let o in e)this.table.columnManager.getColumnsByFieldRoot(o).forEach(c=>{let d=this.getCell(c.getField());if(d){let p=c.getFieldValue(r);d.getValue()!==p&&(d.setValueProcessData(p),t&&d.cellRendered())}});t?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,t,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),s()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var t=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),t=this.cells.find(function(i){return i.column===e}),t}getCellIndex(e){return this.cells.findIndex(function(t){return t===e})}findCell(e){return this.cells.find(t=>t.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t<e;t++)this.cells[0].delete()}wipe(){if(this.detachModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}}isDisplayed(){return this.table.rowManager.getDisplayRows().includes(this)}getPosition(){return this.isDisplayed()?this.position:!1}setPosition(e){e!=this.position&&(this.position=e,this.positionWatchers.forEach(t=>{t(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new Zn(this)),this.component}}var PC={avg:function(n,e,t){var i=0,r=typeof t.precision<"u"?t.precision:2;return n.length&&(i=n.reduce(function(s,a){return Number(s)+Number(a)}),i=i/n.length,i=r!==!1?i.toFixed(r):i),parseFloat(i).toString()},max:function(n,e,t){var i=null,r=typeof t.precision<"u"?t.precision:!1;return n.forEach(function(s){s=Number(s),(s>i||i===null)&&(i=s)}),i!==null?r!==!1?i.toFixed(r):i:""},min:function(n,e,t){var i=null,r=typeof t.precision<"u"?t.precision:!1;return n.forEach(function(s){s=Number(s),(s<i||i===null)&&(i=s)}),i!==null?r!==!1?i.toFixed(r):i:""},sum:function(n,e,t){var i=0,r=typeof t.precision<"u"?t.precision:!1;return n.length&&n.forEach(function(s){s=Number(s),i+=isNaN(s)?0:Number(s)}),r!==!1?i.toFixed(r):i},concat:function(n,e,t){var i=0;return n.length&&(i=n.reduce(function(r,s){return String(r)+String(s)})),i},count:function(n,e,t){var i=0;return n.length&&n.forEach(function(r){r&&i++}),i},unique:function(n,e,t){var i=n.filter((r,s)=>(n||r===0)&&n.indexOf(r)===s);return i.length}};class Bi extends Pe{static moduleName="columnCalcs";static calculations=PC;constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new Vt({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,i={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":Bi.calculations[t.topCalc]?i.topCalc=Bi.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":i.topCalc=t.topCalc;break}i.topCalc&&(e.modules.columnCalcs=i,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":Bi.calculations[t.bottomCalc]?i.botCalc=Bi.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":i.botCalc=t.bottomCalc;break}i.botCalc&&(e.modules.columnCalcs=i,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){var e=document.createDocumentFragment();this.topInitialized||(e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",t),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",t),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(t=>{this.recalcGroup(t)})}}recalcGroup(e){var t,i;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[],i=this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs,r=this.table.modules.dataTree;return e.forEach(s=>{t.push(s.getData()),i&&s.modules.dataTree?.open&&this.rowsToData(r.getFilteredTreeChildren(s)).forEach(a=>{t.push(s)})}),t}generateRow(e,t){var i=this.generateRowData(e,t),r;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),r=new ot(i,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),r.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),r.component=!1,r.getComponent=()=>(r.component||(r.component=new LC(r)),r.component),r.generateCells=()=>{var s=[];this.table.columnManager.columnsByIndex.forEach(a=>{this.genColumn.setField(a.getField()),this.genColumn.hozAlign=a.hozAlign,a.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter(a.definition[e+"CalcFormatter"]),params:a.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=a.definition.cssClass;var o=new un(this.genColumn,r);o.getElement(),o.column=a,o.setWidth(),a.cells.push(o),s.push(o),a.visible||o.hide()}),r.cells=s},r}generateRowData(e,t){var i={},r=e=="top"?this.topCalcs:this.botCalcs,s=e=="top"?"topCalc":"botCalc",a,o;return r.forEach(function(u){var c=[];u.modules.columnCalcs&&u.modules.columnCalcs[s]&&(t.forEach(function(d){c.push(u.getFieldValue(d))}),o=s+"Params",a=typeof u.modules.columnCalcs[o]=="function"?u.modules.columnCalcs[o](c,t):u.modules.columnCalcs[o],u.setFieldValue(i,u.modules.columnCalcs[s](c,t,a)))}),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},t;return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(i=>{e[i.getKey()]=this.getGroupResults(i)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),r={},s={};return i.forEach(a=>{r[a.getKey()]=this.getGroupResults(a)}),s={top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:r},s}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}class AC extends Pe{static moduleName="dataTree";constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?t.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof t.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,r){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,r){return t.dataTreeStartExpanded[r]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),r=i||!i&&typeof t=="object"&&t!==null;!r&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!r&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:r?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&r?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&r?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:r}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),r=e.modules.dataTree;r.branchEl&&(r.branchEl.parentNode&&r.branchEl.parentNode.removeChild(r.branchEl),r.branchEl=!1),r.controlEl&&(r.controlEl.parentNode&&r.controlEl.parentNode.removeChild(r.controlEl),r.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+r.index),r.index&&(this.branchEl?(r.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(r.branchEl,i.firstChild),this.table.rtl?r.branchEl.style.marginRight=(r.branchEl.offsetWidth+r.branchEl.style.marginLeft)*(r.index-1)+r.index*this.indent+"px":r.branchEl.style.marginLeft=(r.branchEl.offsetWidth+r.branchEl.style.marginRight)*(r.index-1)+r.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+r.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+r.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,r=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",s=>{s.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",s=>{s.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",s=>{s.stopPropagation()}),r&&r.parentNode===t?r.parentNode.replaceChild(i.controlEl,r):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,r)=>{var s,a;t.push(i),i instanceof ot&&(i.create(),s=i.modules.dataTree,!s.index&&s.children!==!1&&(a=this.getChildren(i,!1,!0),a.forEach(o=>{o.create(),t.push(o)})))}),t}getChildren(e,t,i){var r=e.modules.dataTree,s=[],a=[];return r.children!==!1&&(r.open||t)&&(Array.isArray(r.children)||(r.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?s=this.table.modules.filter.filter(r.children):s=r.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(s,i),s.forEach(o=>{a.push(o);var u=this.getChildren(o,!1,!0);u.forEach(c=>{a.push(c)})})),a}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(r=>{var s=new ot(r||{},this.table.rowManager);s.create(),s.modules.dataTree.index=e.modules.dataTree.index+1,s.modules.dataTree.parent=e,s.modules.dataTree.children&&(s.modules.dataTree.open=this.startOpen(s.getComponent(),s.modules.dataTree.index)),t.push(s)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],r;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?r=this.table.modules.filter.filter(t.children):r=t.children,r.forEach(s=>{s instanceof ot&&i.push(s)})),i}rowDeleting(e){var t=e.modules.dataTree;t&&t.children&&Array.isArray(t.children)&&t.children.forEach(i=>{i instanceof ot&&i.wipe()})}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,r){var s=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof r<"u"&&(s=this.findChildIndex(r,e),s!==!1&&e.data[this.field].splice(i?s:s+1,0,t)),s===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof ot?i=e.data:e instanceof Zn?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(r=>r instanceof ot?r.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(r=>r.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var r=e.modules.dataTree,s=[];return r&&r.children&&(Array.isArray(r.children)||(r.children=this.generateChildren(e)),r.children.forEach(a=>{a instanceof ot&&(s.push(t?a.getComponent():a),i&&this.getTreeChildren(a,t,i).forEach(o=>{s.push(o)}))})),s}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}function FC(n,e={},t){var i=e.delimiter?e.delimiter:",",r=[],s=[];n.forEach(a=>{var o=[];switch(a.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":a.columns.forEach((u,c)=>{u&&u.depth===1&&(s[c]=typeof u.value>"u"||u.value===null?"":'"'+String(u.value).split('"').join('""')+'"')});break;case"row":a.columns.forEach(u=>{if(u){switch(typeof u.value){case"object":u.value=u.value!==null?JSON.stringify(u.value):"";break;case"undefined":u.value="";break}o.push('"'+String(u.value).split('"').join('""')+'"')}}),r.push(o.join(i));break}}),s.length&&r.unshift(s.join(i)),r=r.join(`
34
- `),e.bom&&(r="\uFEFF"+r),t(r,"text/csv")}function BC(n,e,t){var i=[];n.forEach(r=>{var s={};switch(r.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":r.columns.forEach(a=>{a&&(s[a.component.getTitleDownload()||a.component.getField()]=a.value)}),i.push(s);break}}),i=JSON.stringify(i,null," "),t(i,"application/json")}function NC(n,e={},t){var i=[],r=[],s={},a=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},o=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},u=e.jsPDF||{},c=e.title?e.title:"",d,p;u.orientation||(u.orientation=e.orientation||"landscape"),u.unit||(u.unit="pt"),n.forEach(f=>{switch(f.type){case"header":i.push(h(f));break;case"group":r.push(h(f,a));break;case"calc":r.push(h(f,o));break;case"row":r.push(h(f));break}});function h(f,_){var k=[];return f.columns.forEach(C=>{var y;if(C){switch(typeof C.value){case"object":C.value=C.value!==null?JSON.stringify(C.value):"";break;case"undefined":C.value="";break}y={content:C.value,colSpan:C.width,rowSpan:C.height},_&&(y.styles=_),k.push(y)}}),k}d=this.dependencyRegistry.lookup("jspdf","jsPDF"),p=new d(u),e.autoTable&&(typeof e.autoTable=="function"?s=e.autoTable(p)||{}:s=e.autoTable),c&&(s.didDrawPage=function(f){p.text(c,40,30)}),s.head=i,s.body=r,p.autoTable(s),e.documentProcessing&&e.documentProcessing(p),t(p.output("arraybuffer"),"application/pdf")}function VC(n,e,t){var i=this,r=e.sheetName||"Sheet1",s=this.dependencyRegistry.lookup("XLSX"),a=s.utils.book_new(),o=new rt(this),u="compress"in e?e.compress:!0,c=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:u},d;c.type="binary",a.SheetNames=[],a.Sheets={};function p(){var _=[],k=[],C={},y={s:{c:0,r:0},e:{c:n[0]?n[0].columns.reduce((v,R)=>v+(R&&R.width?R.width:1),0):0,r:n.length}};return n.forEach((v,R)=>{var m=[];v.columns.forEach(function(x,g){x?(m.push(!(x.value instanceof Date)&&typeof x.value=="object"?JSON.stringify(x.value):x.value),(x.width>1||x.height>-1)&&(x.height>1||x.width>1)&&k.push({s:{r:R,c:g},e:{r:R+x.height-1,c:g+x.width-1}})):m.push("")}),_.push(m)}),s.utils.sheet_add_aoa(C,_),C["!ref"]=s.utils.encode_range(y),k.length&&(C["!merges"]=k),C}if(e.sheetOnly){t(p());return}if(e.sheets)for(var h in e.sheets)e.sheets[h]===!0?(a.SheetNames.push(h),a.Sheets[h]=p()):(a.SheetNames.push(h),o.commsSend(e.sheets[h],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:i.active,intercept:function(_){a.Sheets[h]=_}}));else a.SheetNames.push(r),a.Sheets[r]=p();e.documentProcessing&&(a=e.documentProcessing(a));function f(_){for(var k=new ArrayBuffer(_.length),C=new Uint8Array(k),y=0;y!=_.length;++y)C[y]=_.charCodeAt(y)&255;return k}d=s.write(a,c),t(f(d),"application/octet-stream")}function HC(n,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(n),"text/html")}function zC(n,e,t){const i=[];n.forEach(r=>{const s={};switch(r.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":r.columns.forEach(a=>{a&&(s[a.component.getTitleDownload()||a.component.getField()]=a.value)}),i.push(JSON.stringify(s));break}}),t(i.join(`
35
- `),"application/x-ndjson")}var IC={csv:FC,json:BC,jsonLines:zC,pdf:NC,xlsx:VC,html:HC};class Qn extends Pe{static moduleName="download";static downloaders=IC;constructor(e){super(e),this.registerTableOption("downloadEncoder",function(t,i){return new Blob([t],{type:i})}),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){}downloadToTab(e,t,i,r){this.download(e,t,i,r,!0)}download(e,t,i,r,s){var a=!1;function o(c,d){s?s===!0?this.triggerDownload(c,d,e,t,!0):s(c):this.triggerDownload(c,d,e,t)}if(typeof e=="function"?a=e:Qn.downloaders[e]?a=Qn.downloaders[e]:console.warn("Download Error - No such download type found: ",e),a){var u=this.generateExportList(r);a.call(this.table,u,i||{},o.bind(this))}}generateExportList(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach(r=>{var s;r.type==="group"&&(s=r.columns[0],i&&i[r.indent]&&(s.value=i[r.indent](s.value,r.component._group.getRowCount(),r.component._group.getData(),r.component)))}),t}triggerDownload(e,t,i,r,s){var a=document.createElement("a"),o=this.table.options.downloadEncoder(e,t);o&&(s?window.open(window.URL.createObjectURL(o)):(r=r||"Tabulator."+(typeof i=="function"?"txt":i),navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(o,r):(a.setAttribute("href",window.URL.createObjectURL(o)),a.setAttribute("download",r),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a))),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept);break}}}function er(n,e){var t=e.mask,i=typeof e.maskLetterChar<"u"?e.maskLetterChar:"A",r=typeof e.maskNumberChar<"u"?e.maskNumberChar:"9",s=typeof e.maskWildcardChar<"u"?e.maskWildcardChar:"*";function a(o){var u=t[o];typeof u<"u"&&u!==s&&u!==i&&u!==r&&(n.value=n.value+""+u,a(o+1))}n.addEventListener("keydown",o=>{var u=n.value.length,c=o.key;if(o.keyCode>46&&!o.ctrlKey&&!o.metaKey){if(u>=t.length)return o.preventDefault(),o.stopPropagation(),!1;switch(t[u]){case i:if(c.toUpperCase()==c.toLowerCase())return o.preventDefault(),o.stopPropagation(),!1;break;case r:if(isNaN(c))return o.preventDefault(),o.stopPropagation(),!1;break;case s:break;default:if(c!==t[u])return o.preventDefault(),o.stopPropagation(),!1}}}),n.addEventListener("keyup",o=>{o.keyCode>46&&e.maskAutoFill&&a(n.value.length)}),n.placeholder||(n.placeholder=t),e.maskAutoFill&&a(n.value.length)}function $C(n,e,t,i,r){var s=n.getValue(),a=document.createElement("input");if(a.setAttribute("type",r.search?"search":"text"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let u in r.elementAttributes)u.charAt(0)=="+"?(u=u.slice(1),a.setAttribute(u,a.getAttribute(u)+r.elementAttributes["+"+u])):a.setAttribute(u,r.elementAttributes[u]);a.value=typeof s<"u"?s:"",e(function(){n.getType()==="cell"&&(a.focus({preventScroll:!0}),a.style.height="100%",r.selectContents&&a.select())});function o(u){(s===null||typeof s>"u")&&a.value!==""||a.value!==s?t(a.value)&&(s=a.value):i()}return a.addEventListener("change",o),a.addEventListener("blur",o),a.addEventListener("keydown",function(u){switch(u.keyCode){case 13:o();break;case 27:i();break;case 35:case 36:u.stopPropagation();break}}),r.mask&&er(a,r),a}function jC(n,e,t,i,r){var s=n.getValue(),a=r.verticalNavigation||"hybrid",o=String(s!==null&&typeof s<"u"?s:""),u=document.createElement("textarea"),c=0;if(u.style.display="block",u.style.padding="2px",u.style.height="100%",u.style.width="100%",u.style.boxSizing="border-box",u.style.whiteSpace="pre-wrap",u.style.resize="none",r.elementAttributes&&typeof r.elementAttributes=="object")for(let p in r.elementAttributes)p.charAt(0)=="+"?(p=p.slice(1),u.setAttribute(p,u.getAttribute(p)+r.elementAttributes["+"+p])):u.setAttribute(p,r.elementAttributes[p]);u.value=o,e(function(){n.getType()==="cell"&&(u.focus({preventScroll:!0}),u.style.height="100%",u.scrollHeight,u.style.height=u.scrollHeight+"px",n.getRow().normalizeHeight(),r.selectContents&&u.select())});function d(p){(s===null||typeof s>"u")&&u.value!==""||u.value!==s?(t(u.value)&&(s=u.value),setTimeout(function(){n.getRow().normalizeHeight()},300)):i()}return u.addEventListener("change",d),u.addEventListener("blur",d),u.addEventListener("keyup",function(){u.style.height="";var p=u.scrollHeight;u.style.height=p+"px",p!=c&&(c=p,n.getRow().normalizeHeight())}),u.addEventListener("keydown",function(p){switch(p.keyCode){case 13:p.shiftKey&&r.shiftEnterSubmit&&d();break;case 27:i();break;case 38:(a=="editor"||a=="hybrid"&&u.selectionStart)&&(p.stopImmediatePropagation(),p.stopPropagation());break;case 40:(a=="editor"||a=="hybrid"&&u.selectionStart!==u.value.length)&&(p.stopImmediatePropagation(),p.stopPropagation());break;case 35:case 36:p.stopPropagation();break}}),r.mask&&er(u,r),u}function WC(n,e,t,i,r){var s=n.getValue(),a=r.verticalNavigation||"editor",o=document.createElement("input");if(o.setAttribute("type","number"),typeof r.max<"u"&&o.setAttribute("max",r.max),typeof r.min<"u"&&o.setAttribute("min",r.min),typeof r.step<"u"&&o.setAttribute("step",r.step),o.style.padding="4px",o.style.width="100%",o.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let d in r.elementAttributes)d.charAt(0)=="+"?(d=d.slice(1),o.setAttribute(d,o.getAttribute(d)+r.elementAttributes["+"+d])):o.setAttribute(d,r.elementAttributes[d]);o.value=s;var u=function(d){c()};e(function(){n.getType()==="cell"&&(o.removeEventListener("blur",u),o.focus({preventScroll:!0}),o.style.height="100%",o.addEventListener("blur",u),r.selectContents&&o.select())});function c(){var d=o.value;!isNaN(d)&&d!==""&&(d=Number(d)),d!==s?t(d)&&(s=d):i()}return o.addEventListener("keydown",function(d){switch(d.keyCode){case 13:c();break;case 27:i();break;case 38:case 40:a=="editor"&&(d.stopImmediatePropagation(),d.stopPropagation());break;case 35:case 36:d.stopPropagation();break}}),r.mask&&er(o,r),o}function GC(n,e,t,i,r){var s=n.getValue(),a=document.createElement("input");if(a.setAttribute("type","range"),typeof r.max<"u"&&a.setAttribute("max",r.max),typeof r.min<"u"&&a.setAttribute("min",r.min),typeof r.step<"u"&&a.setAttribute("step",r.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let u in r.elementAttributes)u.charAt(0)=="+"?(u=u.slice(1),a.setAttribute(u,a.getAttribute(u)+r.elementAttributes["+"+u])):a.setAttribute(u,r.elementAttributes[u]);a.value=s,e(function(){n.getType()==="cell"&&(a.focus({preventScroll:!0}),a.style.height="100%")});function o(){var u=a.value;!isNaN(u)&&u!==""&&(u=Number(u)),u!=s?t(u)&&(s=u):i()}return a.addEventListener("blur",function(u){o()}),a.addEventListener("keydown",function(u){switch(u.keyCode){case 13:o();break;case 27:i();break}}),a}function YC(n,e,t,i,r){var s=r.format,a=r.verticalNavigation||"editor",o=s?window.DateTime||luxon.DateTime:null,u=n.getValue(),c=document.createElement("input");function d(h){var f;return o.isDateTime(h)?f=h:s==="iso"?f=o.fromISO(String(h)):f=o.fromFormat(String(h),s),f.toFormat("yyyy-MM-dd")}if(c.type="date",c.style.padding="4px",c.style.width="100%",c.style.boxSizing="border-box",r.max&&c.setAttribute("max",s?d(r.max):r.max),r.min&&c.setAttribute("min",s?d(r.min):r.min),r.elementAttributes&&typeof r.elementAttributes=="object")for(let h in r.elementAttributes)h.charAt(0)=="+"?(h=h.slice(1),c.setAttribute(h,c.getAttribute(h)+r.elementAttributes["+"+h])):c.setAttribute(h,r.elementAttributes[h]);u=typeof u<"u"?u:"",s&&(o?u=d(u):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),c.value=u,e(function(){n.getType()==="cell"&&(c.focus({preventScroll:!0}),c.style.height="100%",r.selectContents&&c.select())});function p(){var h=c.value,f;if((u===null||typeof u>"u")&&h!==""||h!==u){if(h&&s)switch(f=o.fromFormat(String(h),"yyyy-MM-dd"),s){case!0:h=f;break;case"iso":h=f.toISO();break;default:h=f.toFormat(s)}t(h)&&(u=c.value)}else i()}return c.addEventListener("blur",function(h){(h.relatedTarget||h.rangeParent||h.explicitOriginalTarget!==c)&&p()}),c.addEventListener("keydown",function(h){switch(h.keyCode){case 13:p();break;case 27:i();break;case 35:case 36:h.stopPropagation();break;case 38:case 40:a=="editor"&&(h.stopImmediatePropagation(),h.stopPropagation());break}}),c}function UC(n,e,t,i,r){var s=r.format,a=r.verticalNavigation||"editor",o=s?window.DateTime||luxon.DateTime:null,u,c=n.getValue(),d=document.createElement("input");if(d.type="time",d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let h in r.elementAttributes)h.charAt(0)=="+"?(h=h.slice(1),d.setAttribute(h,d.getAttribute(h)+r.elementAttributes["+"+h])):d.setAttribute(h,r.elementAttributes[h]);c=typeof c<"u"?c:"",s&&(o?(o.isDateTime(c)?u=c:s==="iso"?u=o.fromISO(String(c)):u=o.fromFormat(String(c),s),c=u.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),d.value=c,e(function(){n.getType()=="cell"&&(d.focus({preventScroll:!0}),d.style.height="100%",r.selectContents&&d.select())});function p(){var h=d.value,f;if((c===null||typeof c>"u")&&h!==""||h!==c){if(h&&s)switch(f=o.fromFormat(String(h),"hh:mm"),s){case!0:h=f;break;case"iso":h=f.toISO();break;default:h=f.toFormat(s)}t(h)&&(c=d.value)}else i()}return d.addEventListener("blur",function(h){(h.relatedTarget||h.rangeParent||h.explicitOriginalTarget!==d)&&p()}),d.addEventListener("keydown",function(h){switch(h.keyCode){case 13:p();break;case 27:i();break;case 35:case 36:h.stopPropagation();break;case 38:case 40:a=="editor"&&(h.stopImmediatePropagation(),h.stopPropagation());break}}),d}function qC(n,e,t,i,r){var s=r.format,a=r.verticalNavigation||"editor",o=s?this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"):null,u,c=n.getValue(),d=document.createElement("input");if(d.type="datetime-local",d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let h in r.elementAttributes)h.charAt(0)=="+"?(h=h.slice(1),d.setAttribute(h,d.getAttribute(h)+r.elementAttributes["+"+h])):d.setAttribute(h,r.elementAttributes[h]);c=typeof c<"u"?c:"",s&&(o?(o.isDateTime(c)?u=c:s==="iso"?u=o.fromISO(String(c)):u=o.fromFormat(String(c),s),c=u.toFormat("yyyy-MM-dd")+"T"+u.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),d.value=c,e(function(){n.getType()==="cell"&&(d.focus({preventScroll:!0}),d.style.height="100%",r.selectContents&&d.select())});function p(){var h=d.value,f;if((c===null||typeof c>"u")&&h!==""||h!==c){if(h&&s)switch(f=o.fromISO(String(h)),s){case!0:h=f;break;case"iso":h=f.toISO();break;default:h=f.toFormat(s)}t(h)&&(c=d.value)}else i()}return d.addEventListener("blur",function(h){(h.relatedTarget||h.rangeParent||h.explicitOriginalTarget!==d)&&p()}),d.addEventListener("keydown",function(h){switch(h.keyCode){case 13:p();break;case 27:i();break;case 35:case 36:h.stopPropagation();break;case 38:case 40:a=="editor"&&(h.stopImmediatePropagation(),h.stopPropagation());break}}),d}let KC=class{constructor(e,t,i,r,s,a){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(a),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=t.getType()==="header",this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:r,cancel:s},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){}_initializeValue(){var e=this.cell.getValue();typeof e>"u"&&typeof this.params.defaultValue<"u"&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(i){i.stopPropagation()}this.isFilter||(this.input.style.height="100%",this.input.focus({preventScroll:!0})),e.addEventListener("click",t),setTimeout(()=>{e.removeEventListener("click",t)},1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(this.params.maxWidth===!0?this.listEl.style.maxWidth=e.offsetWidth+"px":typeof this.params.maxWidth=="number"?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&typeof e=="object")for(let i in e)i.charAt(0)=="+"?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&er(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t=["values","valuesURL","valuesLookup"],i;return e=Object.assign({},e),e.verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=typeof e.placeholderLoading>"u"?"Searching ...":e.placeholderLoading,e.placeholderEmpty=typeof e.placeholderEmpty>"u"?"No Results Found":e.placeholderEmpty,e.filterDelay=typeof e.filterDelay>"u"?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",i=Object.keys(e).filter(r=>t.includes(r)).length,i?i>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&!(typeof e.valuesLookup=="function"||e.valuesURL)&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{this.rebuildOptionsList()},this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:this._keyTab(e);break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout(()=>{this.popup&&this.popup.restoreHide()},10)}_preventBlur(){this.blurable=!1,setTimeout(()=>{this.blurable=!0},10)}_keyTab(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem,!0)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t<this.displayItems.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<this.displayItems.length-1&&(t==-1?this._focusItem(this.displayItems[0]):this._focusItem(this.displayItems[t+1])))}_keySide(e){this.params.autocomplete||(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())}_keyEnter(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem)}_keyEsc(e){this._cancel()}_keyHomeEnd(e){this.params.autocomplete&&e.stopImmediatePropagation()}_keySelectLetter(e){this.params.autocomplete||(e.preventDefault(),e.keyCode>=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find(r=>typeof r.label<"u"&&r.label.toLowerCase().startsWith(this.filterTerm));i&&this._focusItem(i),this.filterTimeout=setTimeout(()=>{this.filterTerm=""},800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch(e=>{Number.isInteger(e)||console.error("List generation error",e)})}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):typeof this.params.valuesLookup=="function"?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then(r=>this.listIteration===i?this._parseList(r):Promise.reject(i))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");typeof e=="function"&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){var i=this.params.filterRemote?{term:t}:{};return e=yc(e,{},i),fetch(e).then(r=>r.ok?r.json().catch(s=>(console.warn("List Ajax Load Error - Invalid JSON returned",s),Promise.reject(s))):(console.error("List Ajax Load Error - Connection Error: "+r.status,r.statusText),Promise.reject(r))).catch(r=>(console.error("List Ajax Load Error - Connection Error: ",r),Promise.reject(r)))}_uniqueColumnValues(e){var t={},i=this.table.getData(this.params.valuesLookup),r;return e?r=this.table.columnManager.getColumnByField(e):r=this.cell.getColumn()._getSelf(),r?i.forEach(s=>{var a=r.getFieldValue(s);this._emptyValueCheck(a)||(this.params.multiselect&&Array.isArray(a)?a.forEach(o=>{this._emptyValueCheck(o)||(t[o]=!0)}):t[a]=!0)}):(console.warn("unable to find matching column to create select lookup list:",e),t=[]),Object.keys(t)}_emptyValueCheck(e){return e===null||typeof e>"u"||e===""}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map(([i,r])=>({label:r,value:i}))),e.forEach(i=>{typeof i!="object"&&(i={label:i,value:i}),this._parseListItem(i,t,0)}),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var r={};e.options?r=this._parseListGroup(e,i+1):(r={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(r,!0)),t.push(r)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach(r=>{this._parseListItem(r,i.options,t)}),i}_sortOptions(e){var t;return this.params.sort&&(t=typeof this.params.sort=="function"?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort((i,r)=>e(i.label,r.label,i.value,r.value,i.original,r.original)),t.forEach(i=>{i.group&&this._sortGroup(e,i.options)})}_defaultSortFunction(e,t){var i,r,s,a,o=0,u,c=/(\d+)|(\D+)/g,d=/\d/,p=0;if(this.params.sort==="desc"&&([e,t]=[t,e]),!e&&e!==0)p=!t&&t!==0?0:-1;else if(!t&&t!==0)p=1;else{if(isFinite(e)&&isFinite(t))return e-t;if(i=String(e).toLowerCase(),r=String(t).toLowerCase(),i===r)return 0;if(!(d.test(i)&&d.test(r)))return i>r?1:-1;for(i=i.match(c),r=r.match(c),u=i.length>r.length?r.length:i.length;o<u;)if(s=i[o],a=r[o++],s!==a)return isFinite(s)&&isFinite(a)?(s.charAt(0)==="0"&&(s="."+s),a.charAt(0)==="0"&&(a="."+a),s-a):s>a?1:-1;return i.length>r.length}return p}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach(i=>{this._filterItem(e,t,i)})):this.filtered=!1,this.data}_filterItem(e,t,i){var r=!1;return i.group?(i.options.forEach(s=>{this._filterItem(e,t,s)&&(r=!0)}),i.visible=r):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,r){return e=String(e).toLowerCase(),t!==null&&typeof t<"u"&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach(t=>{this._buildItem(t)}),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t=e.element,i;if(!this.filtered||e.visible){if(!t){if(t=document.createElement("div"),t.tabIndex=0,i=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,t):e.label,i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i,e.group?t.classList.add("tabulator-edit-list-group"):t.classList.add("tabulator-edit-list-item"),t.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&typeof e.elementAttributes=="object")for(let r in e.elementAttributes)r.charAt(0)=="+"?(r=r.slice(1),t.setAttribute(r,this.input.getAttribute(r)+e.elementAttributes["+"+r])):t.setAttribute(r,e.elementAttributes[r]);e.group?t.addEventListener("click",this._groupClick.bind(this,e)):t.addEventListener("click",this._itemClick.bind(this,e)),t.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=t}this._styleItem(e),this.listEl.appendChild(t),e.group?e.options.forEach(r=>{this._buildItem(r)}):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&this.input.value===""&&!this.params.listOnEmpty){this.popup&&this.popup.hide(!0);return}this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout(()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))},10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach(e=>{e.selected=!1,this._styleItem(e)}),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?(i=this.currentItems.indexOf(e),i>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map(r=>r.label).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map(r=>r.value);else if(e&&this.params.autocomplete&&this.typing)if(this.params.freetext||this.params.allowEmpty&&this.input.value==="")t=this.input.value;else{this.actions.cancel();return}else this.currentItems[0]?t=this.currentItems[0].value:(i=Array.isArray(this.initialValues)?this.initialValues[0]:this.initialValues,i===null||typeof i>"u"||i===""?t=i:t=this.params.emptyValue);t===""&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}};function JC(n,e,t,i,r){var s=new KC(this,n,e,t,i,r);return s.input}function XC(n,e,t,i,r){var s=this,a=n.getElement(),o=n.getValue(),u=a.getElementsByTagName("svg").length||5,c=a.getElementsByTagName("svg")[0]?a.getElementsByTagName("svg")[0].getAttribute("width"):14,d=[],p=document.createElement("div"),h=document.createElementNS("http://www.w3.org/2000/svg","svg");function f(y){d.forEach(function(v,R){R<y?(s.table.browser=="ie"?v.setAttribute("class","tabulator-star-active"):v.classList.replace("tabulator-star-inactive","tabulator-star-active"),v.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):(s.table.browser=="ie"?v.setAttribute("class","tabulator-star-inactive"):v.classList.replace("tabulator-star-active","tabulator-star-inactive"),v.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function _(y){var v=document.createElement("span"),R=h.cloneNode(!0);d.push(R),v.addEventListener("mouseenter",function(m){m.stopPropagation(),m.stopImmediatePropagation(),f(y)}),v.addEventListener("mousemove",function(m){m.stopPropagation(),m.stopImmediatePropagation()}),v.addEventListener("click",function(m){m.stopPropagation(),m.stopImmediatePropagation(),t(y),a.blur()}),v.appendChild(R),p.appendChild(v)}function k(y){o=y,f(y)}if(a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",p.style.verticalAlign="middle",p.style.display="inline-block",p.style.padding="4px",h.setAttribute("width",c),h.setAttribute("height",c),h.setAttribute("viewBox","0 0 512 512"),h.setAttribute("xml:space","preserve"),h.style.padding="0 1px",r.elementAttributes&&typeof r.elementAttributes=="object")for(let y in r.elementAttributes)y.charAt(0)=="+"?(y=y.slice(1),p.setAttribute(y,p.getAttribute(y)+r.elementAttributes["+"+y])):p.setAttribute(y,r.elementAttributes[y]);for(var C=1;C<=u;C++)_(C);return o=Math.min(parseInt(o),u),f(o),p.addEventListener("mousemove",function(y){f(0)}),p.addEventListener("click",function(y){t(0)}),a.addEventListener("blur",function(y){i()}),a.addEventListener("keydown",function(y){switch(y.keyCode){case 39:k(o+1);break;case 37:k(o-1);break;case 13:t(o);break;case 27:i();break}}),p}function ZC(n,e,t,i,r){var s=n.getElement(),a=typeof r.max>"u"?s.getElementsByTagName("div")[0]&&s.getElementsByTagName("div")[0].getAttribute("max")||100:r.max,o=typeof r.min>"u"?s.getElementsByTagName("div")[0]&&s.getElementsByTagName("div")[0].getAttribute("min")||0:r.min,u=(a-o)/100,c=n.getValue()||0,d=document.createElement("div"),p=document.createElement("div"),h,f;function _(){var k=window.getComputedStyle(s,null),C=u*Math.round(p.offsetWidth/((s.clientWidth-parseInt(k.getPropertyValue("padding-left"))-parseInt(k.getPropertyValue("padding-right")))/100))+o;t(C),s.setAttribute("aria-valuenow",C),s.setAttribute("aria-label",c)}if(d.style.position="absolute",d.style.right="0",d.style.top="0",d.style.bottom="0",d.style.width="5px",d.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",r.elementAttributes&&typeof r.elementAttributes=="object")for(let k in r.elementAttributes)k.charAt(0)=="+"?(k=k.slice(1),p.setAttribute(k,p.getAttribute(k)+r.elementAttributes["+"+k])):p.setAttribute(k,r.elementAttributes[k]);return s.style.padding="4px 4px",c=Math.min(parseFloat(c),a),c=Math.max(parseFloat(c),o),c=Math.round((c-o)/u),p.style.width=c+"%",s.setAttribute("aria-valuemin",o),s.setAttribute("aria-valuemax",a),p.appendChild(d),d.addEventListener("mousedown",function(k){h=k.screenX,f=p.offsetWidth}),d.addEventListener("mouseover",function(){d.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(k){h&&(p.style.width=f+k.screenX-h+"px")}),s.addEventListener("mouseup",function(k){h&&(k.stopPropagation(),k.stopImmediatePropagation(),h=!1,f=!1,_())}),s.addEventListener("keydown",function(k){switch(k.keyCode){case 39:k.preventDefault(),p.style.width=p.clientWidth+s.clientWidth/100+"px";break;case 37:k.preventDefault(),p.style.width=p.clientWidth-s.clientWidth/100+"px";break;case 9:case 13:_();break;case 27:i();break}}),s.addEventListener("blur",function(){i()}),p}function QC(n,e,t,i,r){var s=n.getValue(),a=document.createElement("input"),o=r.tristate,u=typeof r.indeterminateValue>"u"?null:r.indeterminateValue,c=!1,d=Object.keys(r).includes("trueValue"),p=Object.keys(r).includes("falseValue");if(a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let f in r.elementAttributes)f.charAt(0)=="+"?(f=f.slice(1),a.setAttribute(f,a.getAttribute(f)+r.elementAttributes["+"+f])):a.setAttribute(f,r.elementAttributes[f]);a.value=s,o&&(typeof s>"u"||s===u||s==="")&&(c=!0,a.indeterminate=!0),this.table.browser!="firefox"&&this.table.browser!="safari"&&e(function(){n.getType()==="cell"&&a.focus({preventScroll:!0})}),a.checked=d?s===r.trueValue:s===!0||s==="true"||s==="True"||s===1;function h(f){var _=a.checked;return d&&_?_=r.trueValue:p&&!_&&(_=r.falseValue),o?f?c?u:_:a.checked&&!c?(a.checked=!1,a.indeterminate=!0,c=!0,u):(c=!1,_):_}return a.addEventListener("change",function(f){t(h())}),a.addEventListener("blur",function(f){t(h(!0))}),a.addEventListener("keydown",function(f){f.keyCode==13&&t(h()),f.keyCode==27&&i()}),a}function e0(n,e,t,i,r){var s=n._getSelf().column,a,o,u;function c(d){var p=d.getValue(),h="input";switch(typeof p){case"number":h="number";break;case"boolean":h="tickCross";break;case"string":p.includes(`
36
- `)&&(h="textarea");break}return h}return a=r.editorLookup?r.editorLookup(n):c(n),r.paramsLookup&&(u=typeof r.paramsLookup=="function"?r.paramsLookup(a,n):r.paramsLookup[a]),o=this.table.modules.edit.lookupEditor(a,s),o.call(this,n,e,t,i,u||{})}var t0={input:$C,textarea:jC,number:WC,range:GC,date:YC,time:UC,datetime:qC,list:JC,star:XC,progress:ZC,tickCross:QC,adaptable:e0};class da extends Pe{static moduleName="edit";static editors=t0;constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.convertEmptyValues=!1,this.editors=da.editors,this.registerTableOption("editTriggerEvent","focus"),this.registerTableOption("editorEmptyValue"),this.registerTableOption("editorEmptyValueFunc",this.emptyValueCheck.bind(this)),this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("editorEmptyValue"),this.registerColumnOption("editorEmptyValueFunc"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellIsEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("cell-value-changed",this.updateCellClass.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("row-layout",this.rowEditableCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("clipboard-paste",this.pasteBlocker.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0)),Object.keys(this.table.options).includes("editorEmptyValue")&&(this.convertEmptyValues=!0)}pasteBlocker(e){if(this.currentCell)return!0}keybindingNavigateNext(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),this.invalidEdit||(i===!0?i=this.table.addRow({}):typeof i=="function"?i=this.table.addRow(i(t.row.getComponent())):i=this.table.addRow(Object.assign({},i)),i.then(()=>{setTimeout(()=>{t.getComponent().navigateNext()})}))))}cellIsEdited(e){return!!e.modules.edit&&e.modules.edit.edited}cellCancelEdit(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}clearCellEdited(e){e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.table.modules.edit.clearEdited(t._getSelf())})}navigatePrev(e=this.currentCell,t){var i,r;if(e){if(t&&t.preventDefault(),i=this.navigateLeft(),i)return!0;if(r=this.table.rowManager.prevDisplayRow(e.row,!0),r&&(i=this.findPrevEditableCell(r,r.cells.length),i))return i.getComponent().edit(),!0}return!1}navigateNext(e=this.currentCell,t){var i,r;if(e){if(t&&t.preventDefault(),i=this.navigateRight(),i)return!0;if(r=this.table.rowManager.nextDisplayRow(e.row,!0),r&&(i=this.findNextEditableCell(r,-1),i))return i.getComponent().edit(),!0}return!1}navigateLeft(e=this.currentCell,t){var i,r;return e&&(t&&t.preventDefault(),i=e.getIndex(),r=this.findPrevEditableCell(e.row,i),r)?(r.getComponent().edit(),!0):!1}navigateRight(e=this.currentCell,t){var i,r;return e&&(t&&t.preventDefault(),i=e.getIndex(),r=this.findNextEditableCell(e.row,i),r)?(r.getComponent().edit(),!0):!1}navigateUp(e=this.currentCell,t){var i,r;return e&&(t&&t.preventDefault(),i=e.getIndex(),r=this.table.rowManager.prevDisplayRow(e.row,!0),r)?(r.cells[i].getComponent().edit(),!0):!1}navigateDown(e=this.currentCell,t){var i,r;return e&&(t&&t.preventDefault(),i=e.getIndex(),r=this.table.rowManager.nextDisplayRow(e.row,!0),r)?(r.cells[i].getComponent().edit(),!0):!1}findNextEditableCell(e,t){var i=!1;if(t<e.cells.length-1)for(var r=t+1;r<e.cells.length;r++){let s=e.cells[r];if(s.column.modules.edit&&Ke.elVisible(s.getElement())&&this.allowEdit(s)){i=s;break}}return i}findPrevEditableCell(e,t){var i=!1;if(t>0)for(var r=t-1;r>=0;r--){let s=e.cells[r];if(s.column.modules.edit&&Ke.elVisible(s.getElement())&&this.allowEdit(s)){i=s;break}}return i}initializeColumnCheck(e){typeof e.definition.editor<"u"&&this.initializeColumn(e)}columnDeleteCheck(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}rowDeleteCheck(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}rowEditableCheck(e){e.getCells().forEach(t=>{t.column.modules.edit&&typeof t.column.modules.edit.check=="function"&&this.updateCellClass(t)})}initializeColumn(e){var t=Object.keys(e.definition).includes("editorEmptyValue"),i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{},convertEmptyValues:t,editorEmptyValue:e.definition.editorEmptyValue,editorEmptyValueFunc:e.definition.editorEmptyValueFunc};i.editor=this.lookupEditor(e.definition.editor,e),i.editor&&(e.modules.edit=i)}lookupEditor(e,t){var i;switch(typeof e){case"string":this.editors[e]?i=this.editors[e]:console.warn("Editor Error - No such editor found: ",e);break;case"function":i=e;break;case"boolean":e===!0&&(typeof t.definition.formatter!="function"?this.editors[t.definition.formatter]?i=this.editors[t.definition.formatter]:i=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter));break}return i}getCurrentCell(){return this.currentCell?this.currentCell.getComponent():!1}clearEditor(e){var t=this.currentCell,i;if(this.invalidEdit=!1,t){for(this.currentCell=!1,i=t.getElement(),this.dispatch("edit-editor-clear",t,e),i.classList.remove("tabulator-editing");i.firstChild;)i.removeChild(i.firstChild);t.row.getElement().classList.remove("tabulator-editing"),t.table.element.classList.remove("tabulator-editing")}}cancelEdit(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),(e.column.definition.editor=="textarea"||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}bindEditor(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);this.updateCellClass(e),i.setAttribute("tabindex",0),i.addEventListener("mousedown",function(r){r.button===2?r.preventDefault():t.mouseClick=!0}),this.options("editTriggerEvent")==="dblclick"&&i.addEventListener("dblclick",function(r){i.classList.contains("tabulator-editing")||(i.focus({preventScroll:!0}),t.edit(e,r,!1))}),(this.options("editTriggerEvent")==="focus"||this.options("editTriggerEvent")==="click")&&i.addEventListener("click",function(r){i.classList.contains("tabulator-editing")||(i.focus({preventScroll:!0}),t.edit(e,r,!1))}),this.options("editTriggerEvent")==="focus"&&i.addEventListener("focus",function(r){t.recursionBlock||t.edit(e,r,!1)})}}focusCellNoEvent(e,t){this.recursionBlock=!0,t&&this.table.browser==="ie"||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}focusScrollAdjust(e){if(this.table.rowManager.getRenderMode()=="virtual"){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,r=e.row.getElement();r.offsetTop<t?this.table.rowManager.element.scrollTop-=t-r.offsetTop:r.offsetTop+r.offsetHeight>i&&(this.table.rowManager.element.scrollTop+=r.offsetTop+r.offsetHeight-i);var s=this.table.rowManager.element.scrollLeft,a=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,o=e.getElement();this.table.modExists("frozenColumns")&&(s+=parseInt(this.table.modules.frozenColumns.leftMargin||0),a-=parseInt(this.table.modules.frozenColumns.rightMargin||0)),this.table.options.renderHorizontal==="virtual"&&(s-=parseInt(this.table.columnManager.renderer.vDomPadLeft),a-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),o.offsetLeft<s?this.table.rowManager.element.scrollLeft-=s-o.offsetLeft:o.offsetLeft+o.offsetWidth>a&&(this.table.rowManager.element.scrollLeft+=o.offsetLeft+o.offsetWidth-a)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check;break}return t}edit(e,t,i){var r=this,s=!0,a=function(){},o=e.getElement(),u=!1,c,d,p;if(this.currentCell){!this.invalidEdit&&this.currentCell!==e&&this.cancelEdit();return}function h(y){if(r.currentCell===e&&!u){var v=r.chain("edit-success",[e,y],!0,!0);return v===!0||r.table.options.validationMode==="highlight"?(u=!0,r.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,r.editedCells.indexOf(e)==-1&&r.editedCells.push(e),y=r.transformEmptyValues(y,e),e.setValue(y,!0),v===!0):(u=!0,r.invalidEdit=!0,r.focusCellNoEvent(e,!0),a(),setTimeout(()=>{u=!1},10),!1)}}function f(){r.currentCell===e&&!u&&r.cancelEdit()}function _(y){a=y}if(e.column.modules.edit.blocked)return this.mouseClick=!1,this.blur(o),!1;if(t&&t.stopPropagation(),s=this.allowEdit(e),s||i){if(r.cancelEdit(),r.currentCell=e,this.focusScrollAdjust(e),d=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,d)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,d),this.dispatch("cell-editing",e),this.dispatchExternal("cellEditing",d),p=typeof e.column.modules.edit.params=="function"?e.column.modules.edit.params(d):e.column.modules.edit.params,c=e.column.modules.edit.editor.call(r,d,_,h,f,p),this.currentCell&&c!==!1)if(c instanceof Node){for(o.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");o.firstChild;)o.removeChild(o.firstChild);o.appendChild(c),a();for(var k=o.children,C=0;C<k.length;C++)k[C].addEventListener("click",function(y){y.stopPropagation()})}else return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",c),this.blur(o),!1;else return this.blur(o),!1;return!0}else return this.mouseClick=!1,this.blur(o),!1}emptyValueCheck(e){return e===""||e===null||typeof e>"u"}transformEmptyValues(e,t){var i=t.column.modules.edit,r=i.convertEmptyValues||this.convertEmptyValues,s;return r&&(s=i.editorEmptyValueFunc||this.options("editorEmptyValueFunc"),s&&s(e)&&(e=i.convertEmptyValues?i.editorEmptyValue:this.options("editorEmptyValue"))),e}blur(e){this.confirm("edit-blur",[e])||e.blur()}getEditedCells(){var e=[];return this.editedCells.forEach(t=>{e.push(t.getComponent())}),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),t=this.editedCells.indexOf(e),t>-1&&this.editedCells.splice(t,1)}}class kc{constructor(e,t,i,r){this.type=e,this.columns=t,this.component=i||!1,this.indent=r||0}}class ha{constructor(e,t,i,r,s){this.value=e,this.component=t||!1,this.width=i,this.height=r,this.depth=s}}var i0={},n0={visible:function(){return this.rowManager.getVisibleRows(!1,!0)},all:function(){return this.rowManager.rows},selected:function(){return this.modules.selectRow.selectedRows},active:function(){return this.options.pagination?this.rowManager.getDisplayRows(this.rowManager.displayRows.length-2):this.rowManager.getDisplayRows()}};class cn extends Pe{static moduleName="export";static columnLookups=i0;static rowLookups=n0;constructor(e){super(e),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.colVisPropAttach="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(e,t,i,r){var s,a,o,u;return this.cloneTableStyle=t,this.config=e||{},this.colVisProp=r,this.colVisPropAttach=this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1),u=cn.columnLookups[i],u&&(o=u.call(this.table),o=o.filter(c=>this.columnVisCheck(c))),s=this.config.columnHeaders!==!1?this.headersToExportRows(this.generateColumnGroupHeaders(o)):[],o&&(o=o.map(c=>c.getComponent())),a=this.bodyToExportRows(this.rowLookup(i),o),s.concat(a)}generateTable(e,t,i,r){var s=this.generateExportList(e,t,i,r);return this.generateTableElement(s)}rowLookup(e){var t=[],i;return typeof e=="function"?e.call(this.table).forEach(r=>{r=this.table.rowManager.findRow(r),r&&t.push(r)}):(i=cn.rowLookups[e]||cn.rowLookups.active,t=i.call(this.table)),Object.assign([],t)}generateColumnGroupHeaders(e){var t=[];return e||(e=this.config.columnGroups!==!1?this.table.columnManager.columns:this.table.columnManager.columnsByIndex),e.forEach(i=>{var r=this.processColumnGroup(i);r&&t.push(r)}),t}processColumnGroup(e){var t=e.columns,i=0,r=e.definition["title"+this.colVisPropAttach]||e.definition.title,s={title:r,column:e,depth:1};if(t.length){if(s.subGroups=[],s.width=0,t.forEach(a=>{var o=this.processColumnGroup(a);o&&(s.width+=o.width,s.subGroups.push(o),o.depth>i&&(i=o.depth))}),s.depth+=i,!s.width)return!1}else if(this.columnVisCheck(e))s.width=1;else return!1;return s}columnVisCheck(e){var t=e.definition[this.colVisProp];return this.config.rowHeaders===!1&&e.isRowHeader?!1:(typeof t=="function"&&(t=t.call(this.table,e.getComponent())),t===!1||t===!0?t:e.visible&&e.field)}headersToExportRows(e){var t=[],i=0,r=[];function s(a,o){var u=i-o;if(typeof t[o]>"u"&&(t[o]=[]),a.height=a.subGroups?1:u-a.depth+1,t[o].push(a),a.height>1)for(let c=1;c<a.height;c++)typeof t[o+c]>"u"&&(t[o+c]=[]),t[o+c].push(!1);if(a.width>1)for(let c=1;c<a.width;c++)t[o].push(!1);a.subGroups&&a.subGroups.forEach(function(c){s(c,o+1)})}return e.forEach(function(a){a.depth>i&&(i=a.depth)}),e.forEach(function(a){s(a,0)}),t.forEach(a=>{var o=[];a.forEach(u=>{if(u){let c=typeof u.title>"u"?"":u.title;o.push(new ha(c,u.column.getComponent(),u.width,u.height,u.depth))}else o.push(null)}),r.push(new kc("header",o))}),r}bodyToExportRows(e,t=[]){var i=[];return t.length===0&&this.table.columnManager.columnsByIndex.forEach(r=>{this.columnVisCheck(r)&&t.push(r.getComponent())}),this.config.columnCalcs!==!1&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(r=>{switch(r.type){case"group":return this.config.rowGroups!==!1;case"calc":return this.config.columnCalcs!==!1;case"row":return!(this.table.options.dataTree&&this.config.dataTree===!1&&r.modules.dataTree.parent)}return!0}),e.forEach((r,s)=>{var a=r.getData(this.colVisProp),o=[],u=0;switch(r.type){case"group":u=r.level,o.push(new ha(r.key,r.getComponent(),t.length,1));break;case"calc":case"row":t.forEach(c=>{o.push(new ha(c._column.getFieldValue(a),c,1,1))}),this.table.options.dataTree&&this.config.dataTree!==!1&&(u=r.modules.dataTree.index);break}i.push(new kc(r.type,o,r.getComponent(),u))}),i}generateTableElement(e){var t=document.createElement("table"),i=document.createElement("thead"),r=document.createElement("tbody"),s=this.lookupTableStyles(),a=this.table.options["rowFormatter"+this.colVisPropAttach],o={};return o.rowFormatter=a!==null?a:this.table.options.rowFormatter,this.table.options.dataTree&&this.config.dataTree!==!1&&this.table.modExists("columnCalcs")&&(o.treeElementField=this.table.modules.dataTree.elementField),o.groupHeader=this.table.options["groupHeader"+this.colVisPropAttach],o.groupHeader&&!Array.isArray(o.groupHeader)&&(o.groupHeader=[o.groupHeader]),t.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach((u,c)=>{let d;switch(u.type){case"header":i.appendChild(this.generateHeaderElement(u,o,s));break;case"group":r.appendChild(this.generateGroupElement(u,o,s));break;case"calc":r.appendChild(this.generateCalcElement(u,o,s));break;case"row":d=this.generateRowElement(u,o,s),this.mapElementStyles(c%2&&s.evenRow?s.evenRow:s.oddRow,d,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),r.appendChild(d);break}}),i.innerHTML&&t.appendChild(i),t.appendChild(r),this.mapElementStyles(this.table.element,t,["border-top","border-left","border-right","border-bottom"]),t}lookupTableStyles(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.styleRowHeader=e.firstRow.getElementsByClassName("tabulator-row-header")[0],e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}generateHeaderElement(e,t,i){var r=document.createElement("tr");return e.columns.forEach(s=>{if(s){var a=document.createElement("th"),o=s.component._column.definition.cssClass?s.component._column.definition.cssClass.split(" "):[];a.colSpan=s.width,a.rowSpan=s.height,a.innerHTML=s.value,this.cloneTableStyle&&(a.style.boxSizing="border-box"),o.forEach(function(u){a.classList.add(u)}),this.mapElementStyles(s.component.getElement(),a,["text-align","border-left","border-right","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(s.component._column.contentElement,a,["padding-top","padding-left","padding-right","padding-bottom"]),s.component._column.visible?this.mapElementStyles(s.component.getElement(),a,["width"]):s.component._column.definition.width&&(a.style.width=s.component._column.definition.width+"px"),s.component._column.parent&&s.component._column.parent.isGroup?this.mapElementStyles(s.component._column.parent.groupElement,a,["border-top"]):this.mapElementStyles(s.component.getElement(),a,["border-top"]),s.component._column.isGroup?this.mapElementStyles(s.component.getElement(),a,["border-bottom"]):this.mapElementStyles(this.table.columnManager.getElement(),a,["border-bottom"]),r.appendChild(a)}}),r}generateGroupElement(e,t,i){var r=document.createElement("tr"),s=document.createElement("td"),a=e.columns[0];return r.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?a.value=t.groupHeader[e.indent](a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):t.groupHeader!==!1&&(a.value=e.component._group.generator(a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)),s.colSpan=a.width,s.innerHTML=a.value,r.classList.add("tabulator-print-table-group"),r.classList.add("tabulator-group-level-"+e.indent),a.component.isVisible()&&r.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,s,["padding-top","padding-left","padding-right","padding-bottom"]),r.appendChild(s),r}generateCalcElement(e,t,i){var r=this.generateRowElement(e,t,i);return r.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),r}generateRowElement(e,t,i){var r=document.createElement("tr");if(r.classList.add("tabulator-print-table-row"),e.columns.forEach((s,a)=>{if(s){var o=document.createElement("td"),u=s.component._column,c=this.table,d=c.columnManager.findColumnIndex(u),p=s.value,h,f,_={modules:{},getValue:function(){return p},getField:function(){return u.definition.field},getElement:function(){return o},getType:function(){return"cell"},getColumn:function(){return u.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getTable:function(){return c},getComponent:function(){return _},column:u},k=u.definition.cssClass?u.definition.cssClass.split(" "):[];if(k.forEach(function(C){o.classList.add(C)}),this.table.modExists("format")&&this.config.formatCells!==!1)p=this.table.modules.format.formatExportValue(_,this.colVisProp);else switch(typeof p){case"object":p=p!==null?JSON.stringify(p):"";break;case"undefined":p="";break}p instanceof Node?o.appendChild(p):o.innerHTML=p,f=["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"],u.isRowHeader?(h=i.styleRowHeader,f.push("background-color")):h=i.styleCells&&i.styleCells[d]?i.styleCells[d]:i.firstCell,h&&(this.mapElementStyles(h,o,f),u.definition.align&&(o.style.textAlign=u.definition.align)),this.table.options.dataTree&&this.config.dataTree!==!1&&(t.treeElementField&&t.treeElementField==u.field||!t.treeElementField&&a==0)&&(e.component._row.modules.dataTree.controlEl&&o.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),o.firstChild),e.component._row.modules.dataTree.branchEl&&o.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),o.firstChild)),r.appendChild(o),_.modules.format&&_.modules.format.renderedCallback&&_.modules.format.renderedCallback()}}),t.rowFormatter&&e.type==="row"&&this.config.formatCells!==!1){let s=Object.assign(e.component);s.getElement=function(){return r},t.rowFormatter(e.component)}return r}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,r){var s=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,r||"htmlOutput");return this.generateHTMLTable(s)}mapElementStyles(e,t,i){if(this.cloneTableStyle&&e&&t){var r={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var s=window.getComputedStyle(e);i.forEach(function(a){t.style[r[a]]||(t.style[r[a]]=s.getPropertyValue(a))})}}}}var r0={"=":function(n,e,t,i){return e==n},"<":function(n,e,t,i){return e<n},"<=":function(n,e,t,i){return e<=n},">":function(n,e,t,i){return e>n},">=":function(n,e,t,i){return e>=n},"!=":function(n,e,t,i){return e!=n},regex:function(n,e,t,i){return typeof n=="string"&&(n=new RegExp(n)),n.test(e)},like:function(n,e,t,i){return n===null||typeof n>"u"?e===n:typeof e<"u"&&e!==null?String(e).toLowerCase().indexOf(n.toLowerCase())>-1:!1},keywords:function(n,e,t,i){var r=n.toLowerCase().split(typeof i.separator>"u"?" ":i.separator),s=String(e===null||typeof e>"u"?"":e).toLowerCase(),a=[];return r.forEach(o=>{s.includes(o)&&a.push(!0)}),i.matchAll?a.length===r.length:!!a.length},starts:function(n,e,t,i){return n===null||typeof n>"u"?e===n:typeof e<"u"&&e!==null?String(e).toLowerCase().startsWith(n.toLowerCase()):!1},ends:function(n,e,t,i){return n===null||typeof n>"u"?e===n:typeof e<"u"&&e!==null?String(e).toLowerCase().endsWith(n.toLowerCase()):!1},in:function(n,e,t,i){return Array.isArray(n)?n.length?n.indexOf(e)>-1:!0:(console.warn("Filter Error - filter value is not an array:",n),!1)}};class gi extends Pe{static moduleName="filter";static filters=r0;constructor(e){super(e),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerTableOption("placeholderHeaderFilter",!1),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.subscribe("placeholder",this.generatePlaceholder.bind(this)),this.table.options.filterMode==="remote"&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach(e=>{var t=this.table.columnManager.findColumn(e.field);if(t)this.setHeaderFilterValue(t,e.value);else return console.warn("Column Filter Error - No matching column found:",e.field),!1}),this.tableInitialized=!0}remoteFilterParams(e,t,i,r){return r.filter=this.getFilters(!0,!0),r}generatePlaceholder(e){if(this.table.options.placeholderHeaderFilter&&Object.keys(this.headerFilters).length)return this.table.options.placeholderHeaderFilter}userSetFilter(e,t,i,r){this.setFilter(e,t,i,r),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(e,t,i,r){this.addFilter(e,t,i,r),this.refreshFilter()}userSetHeaderFilterFocus(e){var t=this.table.columnManager.findColumn(e);if(t)this.setHeaderFilterFocus(t);else return console.warn("Column Filter Focus Error - No matching column found:",e),!1}userGetHeaderFilterValue(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}userSetHeaderFilterValue(e,t){var i=this.table.columnManager.findColumn(e);if(i)this.setHeaderFilterValue(i,t);else return console.warn("Column Filter Error - No matching column found:",e),!1}userRemoveFilter(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}userClearFilter(e){this.clearFilter(e),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(e,t,i){return this.search("rows",e,t,i)}searchData(e,t,i){return this.search("data",e,t,i)}initializeColumnHeaderFilter(e){var t=e.definition;t.headerFilter&&this.initializeColumn(e)}initializeColumn(e,t){var i=this,r=e.getField();function s(a){var o=e.modules.filter.tagType=="input"&&e.modules.filter.attrType=="text"||e.modules.filter.tagType=="textarea"?"partial":"match",u="",c="",d;if(typeof e.modules.filter.prevSuccess>"u"||e.modules.filter.prevSuccess!==a){if(e.modules.filter.prevSuccess=a,e.modules.filter.emptyFunc(a))delete i.headerFilters[r];else{switch(e.modules.filter.value=a,typeof e.definition.headerFilterFunc){case"string":gi.filters[e.definition.headerFilterFunc]?(u=e.definition.headerFilterFunc,d=function(p){var h=e.definition.headerFilterFuncParams||{},f=e.getFieldValue(p);return h=typeof h=="function"?h(a,f,p):h,gi.filters[e.definition.headerFilterFunc](a,f,p,h)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":d=function(p){var h=e.definition.headerFilterFuncParams||{},f=e.getFieldValue(p);return h=typeof h=="function"?h(a,f,p):h,e.definition.headerFilterFunc(a,f,p,h)},u=d;break}if(!d)switch(o){case"partial":d=function(p){var h=e.getFieldValue(p);return typeof h<"u"&&h!==null?String(h).toLowerCase().indexOf(String(a).toLowerCase())>-1:!1},u="like";break;default:d=function(p){return e.getFieldValue(p)==a},u="="}i.headerFilters[r]={value:a,func:d,type:u}}e.modules.filter.value=a,c=JSON.stringify(i.headerFilters),i.prevHeaderFilterChangeCheck!==c&&(i.prevHeaderFilterChangeCheck=c,i.trackChanges(),i.refreshFilter())}return!0}e.modules.filter={success:s,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)}generateHeaderFilterElement(e,t,i){var r=this,s=e.modules.filter.success,a=e.getField(),o,u,c,d,p,h,f,_;e.modules.filter.value=t;function k(){}function C(y){_=y}if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),a){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(y){return!y&&y!==0},o=document.createElement("div"),o.classList.add("tabulator-header-filter"),typeof e.definition.headerFilter){case"string":r.table.modules.edit.editors[e.definition.headerFilter]?(u=r.table.modules.edit.editors[e.definition.headerFilter],(e.definition.headerFilter==="tick"||e.definition.headerFilter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(y){return y!==!0&&y!==!1})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":u=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?u=e.modules.edit.editor:e.definition.formatter&&r.table.modules.edit.editors[e.definition.formatter]?(u=r.table.modules.edit.editors[e.definition.formatter],(e.definition.formatter==="tick"||e.definition.formatter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(y){return y!==!0&&y!==!1})):u=r.table.modules.edit.editors.input;break}if(u){if(d={getValue:function(){return typeof t<"u"?t:""},getField:function(){return e.definition.field},getElement:function(){return o},getColumn:function(){return e.getComponent()},getTable:()=>this.table,getType:()=>"header",getRow:function(){return{normalizeHeight:function(){}}}},f=e.definition.headerFilterParams||{},f=typeof f=="function"?f.call(r.table,d):f,c=u.call(this.table.modules.edit,d,C,s,k,f),!c){console.warn("Filter Error - Cannot add filter to "+a+" column, editor returned a value of false");return}if(!(c instanceof Node)){console.warn("Filter Error - Cannot add filter to "+a+" column, editor should return an instance of Node, the editor returned:",c);return}r.langBind("headerFilters|columns|"+e.definition.field,function(y){c.setAttribute("placeholder",typeof y<"u"&&y?y:e.definition.headerFilterPlaceholder||r.langText("headerFilters|default"))}),c.addEventListener("click",function(y){y.stopPropagation(),c.focus()}),c.addEventListener("focus",y=>{var v=this.table.columnManager.contentsElement.scrollLeft,R=this.table.rowManager.element.scrollLeft;v!==R&&(this.table.rowManager.scrollHorizontal(v),this.table.columnManager.scrollHorizontal(v))}),p=!1,h=function(y){p&&clearTimeout(p),p=setTimeout(function(){s(c.value)},r.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=c,e.modules.filter.attrType=c.hasAttribute("type")?c.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=c.tagName.toLowerCase(),e.definition.headerFilterLiveFilter!==!1&&(e.definition.headerFilter==="autocomplete"||e.definition.headerFilter==="tickCross"||(e.definition.editor==="autocomplete"||e.definition.editor==="tickCross")&&e.definition.headerFilter===!0||(c.addEventListener("keyup",h),c.addEventListener("search",h),e.modules.filter.attrType=="number"&&c.addEventListener("change",function(y){s(c.value)}),e.modules.filter.attrType=="text"&&this.table.browser!=="ie"&&c.setAttribute("type","search")),(e.modules.filter.tagType=="input"||e.modules.filter.tagType=="select"||e.modules.filter.tagType=="textarea")&&c.addEventListener("mousedown",function(y){y.stopPropagation()})),o.appendChild(c),e.contentElement.appendChild(o),i||r.headerFilterColumns.push(e),_&&_()}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})}showHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})}setHeaderFilterFocus(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}getHeaderFilterValue(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}setHeaderFilterValue(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}reloadHeaderFilter(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}refreshFilter(){this.tableInitialized&&(this.table.options.filterMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var e=this.changed;return this.changed=!1,e}setFilter(e,t,i,r){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:r}]),this.addFilter(e)}addFilter(e,t,i,r){var s=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:r}]),e.forEach(a=>{a=this.findFilter(a),a&&(this.filterList.push(a),s=!0)}),s&&this.trackChanges()}findFilter(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return typeof e.field=="function"?i=function(r){return e.field(r,e.type||{})}:gi.filters[e.type]?(t=this.table.columnManager.getColumnByField(e.field),t?i=function(r){return gi.filters[e.type](e.value,t.getFieldValue(r),r,e.params||{})}:i=function(r){return gi.filters[e.type](e.value,r[e.field],r,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,e.func?e:!1}findSubFilters(e){var t=[];return e.forEach(i=>{i=this.findFilter(i),i&&t.push(i)}),t.length?t:!1}getFilters(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach(function(r){typeof r.type=="function"&&(r.type="function")}),i=i.concat(this.filtersToArray(this.filterList,t)),i}filtersToArray(e,t){var i=[];return e.forEach(r=>{var s;Array.isArray(r)?i.push(this.filtersToArray(r,t)):(s={field:r.field,type:r.type,value:r.value},t&&typeof s.type=="function"&&(s.type="function"),i.push(s))}),i}getHeaderFilters(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}removeFilter(e,t,i){Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(r=>{var s=-1;typeof r.field=="object"?s=this.filterList.findIndex(a=>r===a):s=this.filterList.findIndex(a=>r.field===a.field&&r.type===a.type&&r.value===a.value),s>-1?this.filterList.splice(s,1):console.warn("Filter Error - No matching filter type found, ignoring: ",r.type)}),this.trackChanges()}clearFilter(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(e=>{typeof e.modules.filter.value<"u"&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(e)}),this.trackChanges()}search(e,t,i,r){var s=[],a=[];return Array.isArray(t)||(t=[{field:t,type:i,value:r}]),t.forEach(o=>{o=this.findFilter(o),o&&a.push(o)}),this.table.rowManager.rows.forEach(o=>{var u=!0;a.forEach(c=>{this.filterRecurse(c,o.getData())||(u=!1)}),u&&s.push(e==="data"?o.getData("data"):o.getComponent())}),s}filter(e,t){var i=[],r=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters(!0)),this.table.options.filterMode!=="remote"&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach(s=>{this.filterRow(s)&&i.push(s)}):i=e.slice(0),this.subscribedExternal("dataFiltered")&&(i.forEach(s=>{r.push(s.getComponent())}),this.dispatchExternal("dataFiltered",this.getFilters(!0),r)),i}filterRow(e,t){var i=!0,r=e.getData();this.filterList.forEach(a=>{this.filterRecurse(a,r)||(i=!1)});for(var s in this.headerFilters)this.headerFilters[s].func(r)||(i=!1);return i}filterRecurse(e,t){var i=!1;return Array.isArray(e)?e.forEach(r=>{this.filterRecurse(r,t)&&(i=!0)}):i=e.func(t),i}}function s0(n,e,t){return this.emptyToSpace(this.sanitizeHTML(n.getValue()))}function a0(n,e,t){return n.getValue()}function o0(n,e,t){return n.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(n.getValue()))}function l0(n,e,t){var i=parseFloat(n.getValue()),r="",s,a,o,u,c,d=e.decimal||".",p=e.thousand||",",h=e.negativeSign||"-",f=e.symbol||"",_=!!e.symbolAfter,k=typeof e.precision<"u"?e.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(n.getValue()));if(i<0&&(i=Math.abs(i),r=h),s=k!==!1?i.toFixed(k):i,s=String(s).split("."),a=s[0],o=s.length>1?d+s[1]:"",e.thousand!==!1)for(u=/(\d+)(\d{3})/;u.test(a);)a=a.replace(u,"$1"+p+"$2");return c=a+o,r===!0?(c="("+c+")",_?c+f:f+c):_?r+c+f:r+f+c}function u0(n,e,t){var i=n.getValue(),r=e.urlPrefix||"",s=e.download,a=i,o=document.createElement("a"),u;function c(d,p){var h=d.shift(),f=p[h];return d.length&&typeof f=="object"?c(d,f):f}if(e.labelField&&(u=n.getData(),a=c(e.labelField.split(this.table.options.nestedFieldSeparator),u)),e.label)switch(typeof e.label){case"string":a=e.label;break;case"function":a=e.label(n);break}if(a){if(e.urlField&&(u=n.getData(),i=Ke.retrieveNestedData(this.table.options.nestedFieldSeparator,e.urlField,u)),e.url)switch(typeof e.url){case"string":i=e.url;break;case"function":i=e.url(n);break}return o.setAttribute("href",r+i),e.target&&o.setAttribute("target",e.target),e.download&&(typeof s=="function"?s=s(n):s=s===!0?"":s,o.setAttribute("download",s)),o.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),o}else return"&nbsp;"}function c0(n,e,t){var i=document.createElement("img"),r=n.getValue();switch(e.urlPrefix&&(r=e.urlPrefix+n.getValue()),e.urlSuffix&&(r=r+e.urlSuffix),i.setAttribute("src",r),typeof e.height){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height;break}switch(typeof e.width){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width;break}return i.addEventListener("load",function(){n.getRow().normalizeHeight()}),i}function d0(n,e,t){var i=n.getValue(),r=n.getElement(),s=e.allowEmpty,a=e.allowTruthy,o=Object.keys(e).includes("trueValue"),u=typeof e.tickElement<"u"?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',c=typeof e.crossElement<"u"?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return o&&i===e.trueValue||!o&&(a&&i||i===!0||i==="true"||i==="True"||i===1||i==="1")?(r.setAttribute("aria-checked",!0),u||""):s&&(i==="null"||i===""||i===null||typeof i>"u")?(r.setAttribute("aria-checked","mixed"),""):(r.setAttribute("aria-checked",!1),c||"")}function h0(n,e,t){var i=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),r=e.inputFormat||"yyyy-MM-dd HH:mm:ss",s=e.outputFormat||"dd/MM/yyyy HH:mm:ss",a=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",o=n.getValue();if(typeof i<"u"){var u;return i.isDateTime(o)?u=o:r==="iso"?u=i.fromISO(String(o)):u=i.fromFormat(String(o),r),u.isValid?(e.timezone&&(u=u.setZone(e.timezone)),u.toFormat(s)):a===!0||!o?o:typeof a=="function"?a(o):a}else console.error("Format Error - 'datetime' formatter is dependant on luxon.js")}function f0(n,e,t){var i=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),r=e.inputFormat||"yyyy-MM-dd HH:mm:ss",s=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",a=typeof e.suffix<"u"?e.suffix:!1,o=typeof e.unit<"u"?e.unit:"days",u=typeof e.humanize<"u"?e.humanize:!1,c=typeof e.date<"u"?e.date:i.now(),d=n.getValue();if(typeof i<"u"){var p;return i.isDateTime(d)?p=d:r==="iso"?p=i.fromISO(String(d)):p=i.fromFormat(String(d),r),p.isValid?u?p.diff(c,o).toHuman()+(a?" "+a:""):parseInt(p.diff(c,o)[o])+(a?" "+a:""):s===!0?d:typeof s=="function"?s(d):s}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")}function p0(n,e,t){var i=n.getValue();return typeof e[i]>"u"?(console.warn("Missing display value for "+i),i):e[i]}function m0(n,e,t){var i=n.getValue(),r=n.getElement(),s=e&&e.stars?e.stars:5,a=document.createElement("span"),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),u='<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',c='<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>';a.style.verticalAlign="middle",o.setAttribute("width","14"),o.setAttribute("height","14"),o.setAttribute("viewBox","0 0 512 512"),o.setAttribute("xml:space","preserve"),o.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var d=1;d<=s;d++){var p=o.cloneNode(!0);p.innerHTML=d<=i?u:c,a.appendChild(p)}return r.style.whiteSpace="nowrap",r.style.overflow="hidden",r.style.textOverflow="ellipsis",r.setAttribute("aria-label",i),a}function g0(n,e,t){var i=this.sanitizeHTML(n.getValue())||0,r=document.createElement("span"),s=e&&e.max?e.max:100,a=e&&e.min?e.min:0,o=e&&typeof e.color<"u"?e.color:["red","orange","green"],u="#666666",c,d;if(!(isNaN(i)||typeof n.getValue()>"u")){switch(r.classList.add("tabulator-traffic-light"),d=parseFloat(i)<=s?parseFloat(i):s,d=parseFloat(d)>=a?parseFloat(d):a,c=(s-a)/100,d=Math.round((d-a)/c),typeof o){case"string":u=o;break;case"function":u=o(i);break;case"object":if(Array.isArray(o)){var p=100/o.length,h=Math.floor(d/p);h=Math.min(h,o.length-1),h=Math.max(h,0),u=o[h];break}}return r.style.backgroundColor=u,r}}function b0(n,e={},t){var i=this.sanitizeHTML(n.getValue())||0,r=n.getElement(),s=e.max?e.max:100,a=e.min?e.min:0,o=e.legendAlign?e.legendAlign:"center",u,c,d,p,h;switch(c=parseFloat(i)<=s?parseFloat(i):s,c=parseFloat(c)>=a?parseFloat(c):a,u=(s-a)/100,c=Math.round((c-a)/u),typeof e.color){case"string":d=e.color;break;case"function":d=e.color(i);break;case"object":if(Array.isArray(e.color)){let C=100/e.color.length,y=Math.floor(c/C);y=Math.min(y,e.color.length-1),y=Math.max(y,0),d=e.color[y];break}default:d="#2DC214"}switch(typeof e.legend){case"string":p=e.legend;break;case"function":p=e.legend(i);break;case"boolean":p=i;break;default:p=!1}switch(typeof e.legendColor){case"string":h=e.legendColor;break;case"function":h=e.legendColor(i);break;case"object":if(Array.isArray(e.legendColor)){let C=100/e.legendColor.length,y=Math.floor(c/C);y=Math.min(y,e.legendColor.length-1),y=Math.max(y,0),h=e.legendColor[y]}break;default:h="#000"}r.style.minWidth="30px",r.style.position="relative",r.setAttribute("aria-label",c);var f=document.createElement("div");f.style.display="inline-block",f.style.width=c+"%",f.style.backgroundColor=d,f.style.height="100%",f.setAttribute("data-max",s),f.setAttribute("data-min",a);var _=document.createElement("div");if(_.style.position="relative",_.style.width="100%",_.style.height="100%",p){var k=document.createElement("div");k.style.position="absolute",k.style.top=0,k.style.left=0,k.style.textAlign=o,k.style.width="100%",k.style.color=h,k.innerHTML=p}return t(function(){if(!(n instanceof wc)){var C=document.createElement("div");C.style.position="absolute",C.style.top="4px",C.style.bottom="4px",C.style.left="4px",C.style.right="4px",r.appendChild(C),r=C}r.appendChild(_),_.appendChild(f),p&&_.appendChild(k)}),""}function v0(n,e,t){return n.getElement().style.backgroundColor=this.sanitizeHTML(n.getValue()),""}function y0(n,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'}function w0(n,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'}function C0(n,e,t){var i=n.getValue(),r=e.size||15,s=r+"px",a,o,u=e.hasOwnProperty("onValue")?e.onValue:!0,c=e.hasOwnProperty("offValue")?e.offValue:!1,d=e.onTruthy?i:i===u;return a=document.createElement("div"),a.classList.add("tabulator-toggle"),d?(a.classList.add("tabulator-toggle-on"),a.style.flexDirection="row-reverse",e.onColor&&(a.style.background=e.onColor)):e.offColor&&(a.style.background=e.offColor),a.style.width=2.5*r+"px",a.style.borderRadius=s,e.clickable&&a.addEventListener("click",p=>{n.setValue(d?c:u)}),o=document.createElement("div"),o.classList.add("tabulator-toggle-switch"),o.style.height=s,o.style.width=s,o.style.borderRadius=s,a.appendChild(o),a}function E0(n,e,t){var i=document.createElement("span"),r=n.getRow(),s=n.getTable();return r.watchPosition(a=>{e.relativeToPage&&(a+=s.modules.page.getPageSize()*(s.modules.page.getPage()-1)),i.innerText=a}),i}function k0(n,e,t){return n.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"}function S0(n,e,t){var i,r,s;function a(o){var u=o.getValue(),c="plaintext";switch(typeof u){case"boolean":c="tickCross";break;case"string":u.includes(`
37
- `)&&(c="textarea");break}return c}return i=e.formatterLookup?e.formatterLookup(n):a(n),e.paramsLookup&&(s=typeof e.paramsLookup=="function"?e.paramsLookup(i,n):e.paramsLookup[i]),r=this.table.modules.format.lookupFormatter(i),r.call(this,n,s||{},t)}function x0(n,e,t){var i=e.delimiter||",",r=n.getValue(),s=this.table,a;return e.valueMap&&(typeof e.valueMap=="string"?a=function(o){return o.map(u=>Ke.retrieveNestedData(s.options.nestedFieldSeparator,e.valueMap,u))}:a=e.valueMap),Array.isArray(r)?(a&&(r=a(r)),r.join(i)):r}function _0(n,e,t){var i=e.indent||" ",r=typeof e.multiline>"u"?!0:e.multiline,s=e.replacer||null,a=n.getValue();return r&&(n.getElement().style.whiteSpace="pre-wrap"),JSON.stringify(a,s,i)}var M0={plaintext:s0,html:a0,textarea:o0,money:l0,link:u0,image:c0,tickCross:d0,datetime:h0,datetimediff:f0,lookup:p0,star:m0,traffic:g0,progress:b0,color:v0,buttonTick:y0,buttonCross:w0,toggle:C0,rownum:E0,handle:k0,adaptable:S0,array:x0,json:_0};class Ni extends Pe{static moduleName="format";static formatters=M0;constructor(e){super(e),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(e){e.modules.format=this.lookupTypeFormatter(e,""),typeof e.definition.formatterPrint<"u"&&(e.modules.format.print=this.lookupTypeFormatter(e,"Print")),typeof e.definition.formatterClipboard<"u"&&(e.modules.format.clipboard=this.lookupTypeFormatter(e,"Clipboard")),typeof e.definition.formatterHtmlOutput<"u"&&(e.modules.format.htmlOutput=this.lookupTypeFormatter(e,"HtmlOutput"))}lookupTypeFormatter(e,t){var i={params:e.definition["formatter"+t+"Params"]||{}},r=e.definition["formatter"+t];return i.formatter=this.lookupFormatter(r),i}lookupFormatter(e){var t;switch(typeof e){case"string":Ni.formatters[e]?t=Ni.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),t=Ni.formatters.plaintext);break;case"function":t=e;break;default:t=Ni.formatters.plaintext;break}return t}cellRendered(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}formatHeader(e,t,i){var r,s,a,o;return e.definition.titleFormatter?(r=this.lookupFormatter(e.definition.titleFormatter),a=u=>{e.titleFormatterRendered=u},o={getValue:function(){return t},getElement:function(){return i},getType:function(){return"header"},getColumn:function(){return e.getComponent()},getTable:()=>this.table},s=e.definition.titleFormatterParams||{},s=typeof s=="function"?s():s,r.call(this,o,s,a)):t}formatValue(e){var t=e.getComponent(),i=typeof e.column.modules.format.params=="function"?e.column.modules.format.params(t):e.column.modules.format.params;function r(s){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=s,e.modules.format.rendered=!1}return e.column.modules.format.formatter.call(this,t,i,r)}formatExportValue(e,t){var i=e.column.modules.format[t],r;if(i){let s=function(a){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=a,e.modules.format.rendered=!1};return r=typeof i.params=="function"?i.params(e.getComponent()):i.params,i.formatter.call(this,e.getComponent(),r,s)}else return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(e).replace(/[&<>"'`=/]/g,function(i){return t[i]})}else return e}emptyToSpace(e){return e===null||typeof e>"u"||e===""?"&nbsp;":e}}class R0 extends Pe{static moduleName="frozenColumns";constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-deleted",this.reinitializeColumns.bind(this)),this.subscribe("column-hide",this.reinitializeColumns.bind(this)),this.subscribe("column-show",this.reinitializeColumns.bind(this)),this.subscribe("columns-loaded",this.reinitializeColumns.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach(e=>{this.initializeColumn(e)}),this.layout()}initializeColumn(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,this.initializationMode=="left"?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}frozenCheck(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(e){e.forEach(t=>{t.calcs.top&&this.layoutRow(t.calcs.top),t.calcs.bottom&&this.layoutRow(t.calcs.bottom),t.groupList&&t.groupList.length&&this.layoutGroupCalcs(t.groupList)})}layoutColumnPosition(e){var t=[],i=0,r=0;this.leftColumns.forEach((s,a)=>{if(s.modules.frozen.marginValue=i,s.modules.frozen.margin=s.modules.frozen.marginValue+"px",s.visible&&(i+=s.getWidth()),a==this.leftColumns.length-1?s.modules.frozen.edge=!0:s.modules.frozen.edge=!1,s.parent.isGroup){var o=this.getColGroupParentElement(s);t.includes(o)||(this.layoutElement(o,s),t.push(o)),o.classList.toggle("tabulator-frozen-left",s.modules.frozen.edge&&s.modules.frozen.position==="left"),o.classList.toggle("tabulator-frozen-right",s.modules.frozen.edge&&s.modules.frozen.position==="right")}else this.layoutElement(s.getElement(),s);e&&s.cells.forEach(u=>{this.layoutElement(u.getElement(!0),s)})}),this.rightColumns.forEach((s,a)=>{s.modules.frozen.marginValue=r,s.modules.frozen.margin=s.modules.frozen.marginValue+"px",s.visible&&(r+=s.getWidth()),a==this.rightColumns.length-1?s.modules.frozen.edge=!0:s.modules.frozen.edge=!1,s.parent.isGroup?this.layoutElement(this.getColGroupParentElement(s),s):this.layoutElement(s.getElement(),s),e&&s.cells.forEach(o=>{this.layoutElement(o.getElement(!0),s)})})}getColGroupParentElement(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}layout(){this.active&&!this.blocked&&(this.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));t.forEach(i=>{i.deinitialize()}),e.forEach(i=>{i.type==="row"&&this.layoutRow(i)})}layoutRow(e){this.table.options.layout==="fitDataFill"&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)}),this.rightColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)})}layoutElement(e,t){var i;t.modules.frozen&&e&&(e.style.position="sticky",this.table.rtl?i=t.modules.frozen.position==="left"?"right":"left":i=t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),e.classList.toggle("tabulator-frozen-left",t.modules.frozen.edge&&t.modules.frozen.position==="left"),e.classList.toggle("tabulator-frozen-right",t.modules.frozen.edge&&t.modules.frozen.position==="right"))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}getFrozenColumns(){return this.leftColumns.concat(this.rightColumns)}_calcSpace(e,t){var i=0;for(let r=0;r<t;r++)e[r].visible&&(i+=e[r].getWidth());return i}}class T0 extends Pe{static moduleName="frozenRows";constructor(e){super(e),this.topElement=document.createElement("div"),this.rows=[],this.registerComponentFunction("row","freeze",this.freezeRow.bind(this)),this.registerComponentFunction("row","unfreeze",this.unfreezeRow.bind(this)),this.registerComponentFunction("row","isFrozen",this.isRowFrozen.bind(this)),this.registerTableOption("frozenRowsField","id"),this.registerTableOption("frozenRows",!1)}initialize(){var e=document.createDocumentFragment();this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.subscribe("row-deleting",this.detachRow.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),10),this.table.options.frozenRows&&(this.subscribe("data-processed",this.initializeRows.bind(this)),this.subscribe("row-added",this.initializeRow.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this))),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}initializeRows(){this.table.rowManager.getRows().forEach(e=>{this.initializeRow(e)})}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;i==="number"?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):i==="function"?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){var t=this.rows.indexOf(e);return t>-1}isFrozen(){return!!this.rows.length}visibleRows(e,t){return this.rows.forEach(i=>{t.push(i)}),t}getRows(e){var t=e.slice(0);return this.rows.forEach(function(i){var r=t.indexOf(i);r>-1&&t.splice(r,1)}),t}freezeRow(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(e){e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}styleRows(e){this.rows.forEach((t,i)=>{this.table.rowManager.styleRow(t,i)})}}class D0{constructor(e){return this._group=e,this.type="GroupComponent",new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._group.groupManager.table.componentFunctionBinder.handle("group",t._group,i)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return this._group.parent?this._group.parent.getComponent():!1}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}scrollTo(e,t){return this._group.groupManager.table.rowManager.scrollToRow(this._group,e,t)}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class Vi{constructor(e,t,i,r,s,a,o){this.groupManager=e,this.parent=t,this.key=r,this.level=i,this.field=s,this.hasSubGroups=i<e.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=o,this.rows=[],this.groups=[],this.groupList=[],this.generator=a,this.element=!1,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=o?o.visible:typeof e.startOpen[i]<"u"?e.startOpen[i]:e.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()}wipe(e){e||(this.groupList.length?this.groupList.forEach(function(t){t.wipe()}):this.rows.forEach(t=>{t.modules&&delete t.modules.group})),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),this.groupManager.table.options.movableRows!==!1&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach(t=>{this._createGroup(t,e)})}addBindings(){var e;this.groupManager.table.options.groupToggleElement&&(e=this.groupManager.table.options.groupToggleElement=="arrow"?this.arrowElement:this.element,e.addEventListener("click",t=>{this.groupManager.table.options.groupToggleElement==="arrow"&&(t.stopPropagation(),t.stopImmediatePropagation()),setTimeout(()=>{this.toggleVisibility()})}))}_createGroup(e,t){var i=t+"_"+e,r=new Vi(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],this.old?this.old.groups[i]:!1);this.groups[i]=r,this.groupList.push(r)}_addRowToGroup(e){var t=this.level+1;if(this.hasSubGroups){var i=this.groupManager.groupIDLookups[t].func(e.getData()),r=t+"_"+i;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[r]&&this.groups[r].addRow(e):(this.groups[r]||this._createGroup(i,t),this.groups[r].addRow(e))}}_addRow(e){this.rows.push(e),e.modules.group=this}insertRow(e,t,i){var r=this.conformRowData({});e.updateData(r);var s=this.rows.indexOf(t);s>-1?i?this.rows.splice(s+1,0,e):this.rows.splice(s,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)}))}getRowIndex(e){}conformRowData(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}removeRow(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),!this.groupManager.table.options.groupValues&&!this.rows.length?(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0)):(i.parentNode&&i.parentNode.removeChild(i),this.groupManager.blockRedraw||(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}):(this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):!this.groupList.length&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}getData(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(r=>{i.push(r.getData(t||"data"))}),i}getRowCount(){var e=0;return this.groupList.length?this.groupList.forEach(t=>{e+=t.getRowCount()}):e=this.rows.length,e}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination?(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(e=>{var t=e.getHeadersAndRows();t.forEach(i=>{i.detachElement()})}):this.rows.forEach(e=>{var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.updateGroupRows(!0)):this.groupManager.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination){this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach(t=>{var i=t.getHeadersAndRows();i.forEach(r=>{var s=r.getElement();e.parentNode.insertBefore(s,e.nextSibling),r.initialize(),e=s})}):this.rows.forEach(t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}),this.groupManager.updateGroupRows(!0)}else this.groupManager.updateGroupRows(!0);this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var e=[];typeof this.visible=="function"&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}getRowGroup(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(i){var r=i.getRowGroup(e);r&&(t=r)}):this.rows.find(function(i){return i===e})&&(t=this),t}getSubGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getRows(e,t){var i=[];return t&&this.groupList.length?this.groupList.forEach(r=>{i=i.concat(r.getRows(e,t))}):this.rows.forEach(function(r){i.push(e?r.getComponent():r)}),i}generateGroupHeaderContents(){var e=[],t=this.getRows(!1,!0);for(t.forEach(function(i){e.push(i.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);typeof this.elementContents=="string"?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(e=[]){return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;e<this.element.childNodes.length;++e)this.element.childNodes[e].parentNode.removeChild(this.element.childNodes[e]);return this.generateGroupHeaderContents(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}normalizeHeight(){this.setHeight(this.element.clientHeight)}initialize(e){(!this.initialized||e)&&(this.normalizeHeight(),this.initialized=!0)}reinitialize(){this.initialized=!1,this.height=0,Ke.elVisible(this.element)&&this.initialize(!0)}setHeight(e){this.height!=e&&(this.height=e,this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getGroup(){return this}reinitializeHeight(){}calcHeight(){}setCellHeight(){}clearCellHeight(){}deinitializeHeight(){}rendered(){}getComponent(){return this.component||(this.component=new D0(this)),this.component}}class O0 extends Pe{static moduleName="groupRows";constructor(e){super(e),this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayHandler=this.getRows.bind(this),this.blockRedraw=!1,this.registerTableOption("groupBy",!1),this.registerTableOption("groupStartOpen",!0),this.registerTableOption("groupValues",!1),this.registerTableOption("groupUpdateOnCellEdit",!1),this.registerTableOption("groupHeader",!1),this.registerTableOption("groupHeaderPrint",null),this.registerTableOption("groupHeaderClipboard",null),this.registerTableOption("groupHeaderHtmlOutput",null),this.registerTableOption("groupHeaderDownload",null),this.registerTableOption("groupToggleElement","arrow"),this.registerTableOption("groupClosedShowCalcs",!1),this.registerTableFunction("setGroupBy",this.setGroupBy.bind(this)),this.registerTableFunction("setGroupValues",this.setGroupValues.bind(this)),this.registerTableFunction("setGroupStartOpen",this.setGroupStartOpen.bind(this)),this.registerTableFunction("setGroupHeader",this.setGroupHeader.bind(this)),this.registerTableFunction("getGroups",this.userGetGroups.bind(this)),this.registerTableFunction("getGroupedData",this.userGetGroupedData.bind(this)),this.registerComponentFunction("row","getGroup",this.rowGetGroup.bind(this))}initialize(){this.subscribe("table-destroy",this._blockRedrawing.bind(this)),this.subscribe("rows-wipe",this._blockRedrawing.bind(this)),this.subscribe("rows-wiped",this._restore_redrawing.bind(this)),this.table.options.groupBy&&(this.table.options.groupUpdateOnCellEdit&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("row-data-changed",this.reassignRowToGroup.bind(this),0)),this.subscribe("table-built",this.configureGroupSetup.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHeaders.bind(this)),this.subscribe("rows-wipe",this.wipe.bind(this)),this.subscribe("rows-added",this.rowsUpdated.bind(this)),this.subscribe("row-moving",this.rowMoving.bind(this)),this.subscribe("row-adding-index",this.rowAddingIndex.bind(this)),this.subscribe("rows-sample",this.rowSample.bind(this)),this.subscribe("render-virtual-fill",this.virtualRenderFill.bind(this)),this.registerDisplayHandler(this.displayHandler,20),this.initialized=!0)}_blockRedrawing(){this.blockRedraw=!0}_restore_redrawing(){this.blockRedraw=!1}configureGroupSetup(){if(this.table.options.groupBy){var e=this.table.options.groupBy,t=this.table.options.groupStartOpen,i=this.table.options.groupHeader;if(this.allowedValues=this.table.options.groupValues,Array.isArray(e)&&Array.isArray(i)&&e.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",(s,a)=>{this.headerGenerator[0]=(o,u,c)=>(typeof o>"u"?"":o)+"<span>("+u+" "+(u===1?s:a.groups.items)+")</span>"}),this.groupIDLookups=[],e)this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="table"&&this.table.options.columnCalcs!="both"&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="group"){var r=this.table.columnManager.getRealColumns();r.forEach(s=>{s.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),s.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach((s,a)=>{var o,u;typeof s=="function"?o=s:(u=this.table.columnManager.getColumnByField(s),u?o=function(c){return u.getFieldValue(c)}:o=function(c){return c[s]}),this.groupIDLookups.push({field:typeof s=="function"?!1:s,func:o,values:this.allowedValues?this.allowedValues[a]:!1})}),t&&(Array.isArray(t)||(t=[t]),t.forEach(s=>{}),this.startOpen=t),i&&(this.headerGenerator=Array.isArray(i)?i:[i])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(this.table.options.groupBy)t=t.filter(i=>i.type!=="group"),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px";else return t}rowAddingIndex(e,t,i){if(this.table.options.groupBy){this.assignRowToGroup(e);var r=e.modules.group.rows;return r.length>1&&(!t||t&&r.indexOf(t)==-1?i?r[0]!==e&&(t=r[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):r[r.length-1]!==e&&(t=r[r.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}}trackChanges(){this.dispatch("group-changed")}setGroupBy(e){this.table.options.groupBy=e,this.initialized||this.initialize(),this.configureGroupSetup(),!e&&this.table.modExists("columnCalcs")&&this.table.options.columnCalcs===!0&&this.table.modules.columnCalcs.reinitializeCalcs(),this.refreshData(),this.trackChanges()}setGroupValues(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(e){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(e){return e.modules.group?e.modules.group.getComponent():!1}rowMoving(e,t,i){if(this.table.options.groupBy){!i&&t instanceof Vi&&(t=this.table.rowManager.prevDisplayRow(e)||t);var r=t instanceof Vi?t:t.modules.group,s=e instanceof Vi?e:e.modules.group;r===s?this.table.rowManager.moveRowInArray(r.rows,e,t,i):(s&&s.removeRow(e),r.insertRow(e,t,i))}}rowDeleting(e){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}getRows(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}getGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getChildGroups(e){var t=[];return e||(e=this),e.groupList.forEach(i=>{i.groupList.length?t=t.concat(this.getChildGroups(i)):t.push(i)}),t}wipe(){this.table.options.groupBy&&(this.groupList.forEach(function(e){e.wipe()}),this.groupList=[],this.groups={})}pullGroupListData(e){var t=[];return e.forEach(i=>{var r={};r.level=0,r.rowCount=0,r.headerContent="";var s=[];i.hasSubGroups?(s=this.pullGroupListData(i.groupList),r.level=i.level,r.rowCount=s.length-i.groupList.length,r.headerContent=i.generator(i.key,r.rowCount,i.rows,i),t.push(r),t=t.concat(s)):(r.level=i.level,r.headerContent=i.generator(i.key,i.rows.length,i.rows,i),r.rowCount=i.getRows().length,t.push(r),i.getRows().forEach(a=>{t.push(a.getData("data"))}))}),t}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(e){var t=!1;return this.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),this.groupList.forEach(i=>{var r=i.getRowGroup(e);r&&(t=r)}),t}countGroups(){return this.groupList.length}generateGroups(e){var t=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(i=>{this.createGroup(i,0,t)}),e.forEach(i=>{this.assignRowToExistingGroup(i,t)})):e.forEach(i=>{this.assignRowToGroup(i,t)}),Object.values(t).forEach(i=>{i.wipe(!0)})}createGroup(e,t,i){var r=t+"_"+e,s;i=i||[],s=new Vi(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[r]),this.groups[r]=s,this.groupList.push(s)}assignRowToExistingGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),r="0_"+i;this.groups[r]&&this.groups[r].addRow(e)}assignRowToGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),r=!this.groups["0_"+i];return r&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!r}reassignRowToGroup(e){if(e.type==="row"){var t=e.modules.group,i=t.getPath(),r=this.getExpectedPath(e),s;s=i.length==r.length&&i.every((a,o)=>a===r[o]),s||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}getExpectedPath(e){var t=[],i=e.getData();return this.groupIDLookups.forEach(r=>{t.push(r.func(i))}),t}updateGroupRows(e){var t=[];return this.blockRedraw||(this.groupList.forEach(i=>{t=t.concat(i.getHeadersAndRows())}),e&&this.refreshData(!0)),t}scrollHeaders(e){this.table.options.groupBy&&(this.table.options.renderHorizontal==="virtual"&&(e-=this.table.columnManager.renderer.vDomPadLeft),e=e+"px",this.groupList.forEach(t=>{t.scrollHeader(e)}))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach((i,r)=>{this.table.rowManager.styleRow(i,r),e.appendChild(i.getElement()),i.initialize(!0),i.type!=="group"&&(t=!1)}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}}var L0={cellEdit:function(n){n.component.setValueProcessData(n.data.oldValue),n.component.cellRendered()},rowAdd:function(n){n.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowDelete:function(n){var e=this.table.rowManager.addRowActual(n.data.data,n.data.pos,n.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(n.component,e),this.table.rowManager.checkPlaceholder()},rowMove:function(n){var e=n.data.posFrom-n.data.posTo>0;this.table.rowManager.moveRowActual(n.component,this.table.rowManager.getRowFromPosition(n.data.posFrom),e),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},P0={cellEdit:function(n){n.component.setValueProcessData(n.data.newValue),n.component.cellRendered()},rowAdd:function(n){var e=this.table.rowManager.addRowActual(n.data.data,n.data.pos,n.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(n.component,e),this.table.rowManager.checkPlaceholder()},rowDelete:function(n){n.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowMove:function(n){this.table.rowManager.moveRowActual(n.component,this.table.rowManager.getRowFromPosition(n.data.posTo),n.data.after),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},A0={undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"]},F0={undo:function(n){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(n.preventDefault(),this.table.modules.history.undo()))},redo:function(n){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(n.preventDefault(),this.table.modules.history.redo()))}},B0={keybindings:{bindings:A0,actions:F0}};class tr extends Pe{static moduleName="history";static moduleExtensions=B0;static undoers=L0;static redoers=P0;constructor(e){super(e),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(e,t,i){this.action("rowMove",e,{posFrom:e.getPosition(),posTo:t.getPosition(),to:t,after:i})}rowAdded(e,t,i,r){this.action("rowAdd",e,{data:t,pos:i,index:r})}rowDeleted(e){var t,i;this.table.options.groupBy?(i=e.getComponent().getGroup()._getSelf().rows,t=i.indexOf(e),t&&(t=i[t-1])):(t=e.table.rowManager.getRowIndex(e),t&&(t=e.table.rowManager.rows[t-1])),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}cellUpdated(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}clear(){this.history=[],this.index=-1}action(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(e){var t=this.history.findIndex(function(i){return i.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}undo(){if(this.index>-1){let e=this.history[this.index];return tr.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}else return console.warn(this.options("history")?"History Undo Error - No more history to undo":"History module not enabled"),!1}redo(){if(this.history.length-1>this.index){this.index++;let e=this.history[this.index];return tr.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}else return console.warn(this.options("history")?"History Redo Error - No more history to redo":"History module not enabled"),!1}_rebindRow(e,t){this.history.forEach(function(i){if(i.component instanceof ot)i.component===e&&(i.component=t);else if(i.component instanceof un&&i.component.row===e){var r=i.component.column.getField();r&&(i.component=t.getCell(r))}})}}class N0 extends Pe{static moduleName="htmlTableImport";constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&this.table.originalElement.tagName==="TABLE"&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=e.getElementsByTagName("th"),r=e.getElementsByTagName("tbody")[0],s=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),r=r?r.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,r):this._generateBlankHeaders(i,r);for(var a=0;a<r.length;a++){var o=r[a],u=o.getElementsByTagName("td"),c={};this.hasIndex||(c[t.index]=a);for(var d=0;d<u.length;d++){var p=u[d];typeof this.fieldIndex[d]<"u"&&(c[this.fieldIndex[d]]=p.innerHTML)}s.push(c)}t.data=s,this.dispatchExternal("htmlImported")}_extractOptions(e,t,i){var r=e.attributes,s=Object.keys(i||t),a={};s.forEach(d=>{a[d.toLowerCase()]=d});for(var o in r){var u=r[o],c;u&&typeof u=="object"&&u.name&&u.name.indexOf("tabulator-")===0&&(c=u.name.replace("tabulator-",""),typeof a[c]<"u"&&(t[a[c]]=this._attribValue(u.value)))}}_attribValue(e){return e==="true"?!0:e==="false"?!1:e}_findCol(e){var t=this.table.options.columns.find(i=>i.title===e);return t||!1}_extractHeaders(e,t){for(var i=0;i<e.length;i++){var r=e[i],s=!1,a=this._findCol(r.textContent),o;a?s=!0:a={title:r.textContent.trim()},a.field||(a.field=r.textContent.trim().toLowerCase().replaceAll(" ","_")),o=r.getAttribute("width"),o&&!a.width&&(a.width=o),this._extractOptions(r,a,this.table.columnManager.optionsList.registeredDefaults),this.fieldIndex[i]=a.field,a.field==this.table.options.index&&(this.hasIndex=!0),s||this.table.options.columns.push(a)}}_generateBlankHeaders(e,t){for(var i=0;i<e.length;i++){var r=e[i],s={title:"",field:"col"+i};this.fieldIndex[i]=s.field;var a=r.getAttribute("width");a&&(s.width=a),this.table.options.columns.push(s)}}}function V0(n){var e=[],t=0,i=0,r=!1;for(let s=0;s<n.length;s++){let a=n[s],o=n[s+1];if(e[t]||(e[t]=[]),e[t][i]||(e[t][i]=""),a=='"'&&r&&o=='"'){e[t][i]+=a,s++;continue}if(a=='"'){r=!r;continue}if(a==","&&!r){i++;continue}if(a=="\r"&&o==`
38
- `&&!r){i=0,t++,s++;continue}if((a=="\r"||a==`
39
- `)&&!r){i=0,t++;continue}e[t][i]+=a}return e}function H0(n){try{return JSON.parse(n)}catch(e){return console.warn("JSON Import Error - File contents is invalid JSON",e),Promise.reject()}}function z0(n){return n}function I0(n){var e=this.dependencyRegistry.lookup("XLSX"),t=e.read(n),i=t.Sheets[t.SheetNames[0]];return e.utils.sheet_to_json(i,{header:1})}var $0={csv:V0,json:H0,array:z0,xlsx:I0};class fa extends Pe{static moduleName="import";static importers=$0;constructor(e){super(e),this.registerTableOption("importFormat"),this.registerTableOption("importReader","text"),this.registerTableOption("importHeaderTransform"),this.registerTableOption("importValueTransform"),this.registerTableOption("importDataValidator"),this.registerTableOption("importFileValidator")}initialize(){this.registerTableFunction("import",this.importFromFile.bind(this)),this.table.options.importFormat&&(this.subscribe("data-loading",this.loadDataCheck.bind(this),10),this.subscribe("data-load",this.loadData.bind(this),10))}loadDataCheck(e){return this.table.options.importFormat&&(typeof e=="string"||Array.isArray(e)&&e.length&&Array.isArray(e))}loadData(e,t,i,r,s){return this.importData(this.lookupImporter(),e).then(this.structureData.bind(this)).catch(a=>(console.error("Import Error:",a||"Unable to import data"),Promise.reject(a)))}lookupImporter(e){var t;return e||(e=this.table.options.importFormat),typeof e=="string"?t=fa.importers[e]:t=e,t||console.error("Import Error - Importer not found:",e),t}importFromFile(e,t,i){var r=this.lookupImporter(e);if(r)return this.pickFile(t,i).then(this.importData.bind(this,r)).then(this.structureData.bind(this)).then(this.mutateData.bind(this)).then(this.validateData.bind(this)).then(this.setData.bind(this)).catch(s=>(this.dispatch("import-error",s),this.dispatchExternal("importError",s),console.error("Import Error:",s||"Unable to import file"),this.table.dataLoader.alertError(),setTimeout(()=>{this.table.dataLoader.clearAlert()},3e3),Promise.reject(s)))}pickFile(e,t){return new Promise((i,r)=>{var s=document.createElement("input");s.type="file",s.accept=e,s.addEventListener("change",a=>{var o=s.files[0],u=new FileReader,c=this.validateFile(o);if(c===!0){switch(this.dispatch("import-importing",s.files),this.dispatchExternal("importImporting",s.files),t||this.table.options.importReader){case"buffer":u.readAsArrayBuffer(o);break;case"binary":u.readAsBinaryString(o);break;case"url":u.readAsDataURL(o);break;case"text":default:u.readAsText(o)}u.onload=d=>{i(u.result)},u.onerror=d=>{console.warn("File Load Error - Unable to read file"),r(d)}}else r(c)}),this.dispatch("import-choose"),this.dispatchExternal("importChoose"),s.click()})}importData(e,t){var i;return this.table.dataLoader.alertLoader(),new Promise((r,s)=>{setTimeout(()=>{i=e.call(this.table,t),i instanceof Promise||i?r(i):s()},10)})}structureData(e){var t=[];return Array.isArray(e)&&e.length&&Array.isArray(e[0])?(this.table.options.autoColumns?t=this.structureArrayToObject(e):t=this.structureArrayToColumns(e),t):e}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"import"))}):t=e,t}transformHeader(e){var t=[];if(this.table.options.importHeaderTransform)e.forEach(i=>{t.push(this.table.options.importHeaderTransform.call(this.table,i,e))});else return e;return t}transformData(e){var t=[];if(this.table.options.importValueTransform)e.forEach(i=>{t.push(this.table.options.importValueTransform.call(this.table,i,e))});else return e;return t}structureArrayToObject(e){var t=this.transformHeader(e.shift()),i=e.map(r=>{var s={};return r=this.transformData(r),t.forEach((a,o)=>{s[a]=r[o]}),s});return i}structureArrayToColumns(e){var t=[],i=this.transformHeader(e[0]),r=this.table.getColumns();return r[0]&&i[0]&&r[0].getDefinition().title===i[0]&&e.shift(),e.forEach(s=>{var a={};s=this.transformData(s),s.forEach((o,u)=>{var c=r[u];c&&(a[c.getField()]=o)}),t.push(a)}),t}validateFile(e){return this.table.options.importFileValidator?this.table.options.importFileValidator.call(this.table,e):!0}validateData(e){var t;return this.table.options.importDataValidator?(t=this.table.options.importDataValidator.call(this.table,e),t===!0?e:Promise.reject(t)):e}setData(e){return this.dispatch("import-imported",e),this.dispatchExternal("importImported",e),this.table.dataLoader.clearAlert(),this.table.setData(e)}}class j0 extends Pe{static moduleName="interaction";constructor(e){super(e),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerMouseDown"),this.registerColumnOption("headerMouseUp"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellMouseDown"),this.registerColumnOption("cellMouseUp"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this)),this.subscribe("scroll-horizontal",this.clearTouchWatchers.bind(this)),this.subscribe("scroll-vertical",this.clearTouchWatchers.bind(this))}clearTouchWatchers(){var e=Object.values(this.touchWatchers);e.forEach(t=>{for(let i in t)t[i]=null})}cellContentsSelectionFixer(e,t){var i;if(!(this.table.modExists("edit")&&this.table.modules.edit.currentCell===t)){e.preventDefault();try{document.selection?(i=document.body.createTextRange(),i.moveToElementText(t.getElement()),i.select()):window.getSelection&&(i=document.createRange(),i.selectNode(t.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(i))}catch{}}}initializeExternalEvents(){for(let e in this.eventMap)this.subscriptionChangeExternal(e,this.subscriptionChanged.bind(this,e))}subscriptionChanged(e,t){t?this.subscribers[e]||(this.eventMap[e].includes("-")?(this.subscribers[e]=this.handle.bind(this,e),this.subscribe(this.eventMap[e],this.subscribers[e])):this.subscribeTouchEvents(e)):this.eventMap[e].includes("-")?this.subscribers[e]&&!this.columnSubscribers[e]&&!this.subscribedExternal(e)&&(this.unsubscribe(this.eventMap[e],this.subscribers[e]),delete this.subscribers[e]):this.unsubscribeTouchEvents(e)}subscribeTouchEvents(e){var t=this.eventMap[e];this.touchSubscribers[t+"-touchstart"]||(this.touchSubscribers[t+"-touchstart"]=this.handleTouch.bind(this,t,"start"),this.touchSubscribers[t+"-touchend"]=this.handleTouch.bind(this,t,"end"),this.subscribe(t+"-touchstart",this.touchSubscribers[t+"-touchstart"]),this.subscribe(t+"-touchend",this.touchSubscribers[t+"-touchend"])),this.subscribers[e]=!0}unsubscribeTouchEvents(e){var t=!0,i=this.eventMap[e];if(this.subscribers[e]&&!this.subscribedExternal(e)){delete this.subscribers[e];for(let r in this.eventMap)this.eventMap[r]===i&&this.subscribers[r]&&(t=!1);t&&(this.unsubscribe(i+"-touchstart",this.touchSubscribers[i+"-touchstart"]),this.unsubscribe(i+"-touchend",this.touchSubscribers[i+"-touchend"]),delete this.touchSubscribers[i+"-touchstart"],delete this.touchSubscribers[i+"-touchend"])}}initializeColumn(e){var t=e.definition;for(let i in this.eventMap)t[i]&&(this.subscriptionChanged(i,!0),this.columnSubscribers[i]||(this.columnSubscribers[i]=[]),this.columnSubscribers[i].push(e))}handle(e,t,i){this.dispatchEvent(e,t,i)}handleTouch(e,t,i,r){var s=this.touchWatchers[e];switch(e==="column"&&(e="header"),t){case"start":s.tap=!0,clearTimeout(s.tapHold),s.tapHold=setTimeout(()=>{clearTimeout(s.tapHold),s.tapHold=null,s.tap=null,clearTimeout(s.tapDbl),s.tapDbl=null,this.dispatchEvent(e+"TapHold",i,r)},1e3);break;case"end":s.tap&&(s.tap=null,this.dispatchEvent(e+"Tap",i,r)),s.tapDbl?(clearTimeout(s.tapDbl),s.tapDbl=null,this.dispatchEvent(e+"DblTap",i,r)):s.tapDbl=setTimeout(()=>{clearTimeout(s.tapDbl),s.tapDbl=null},300),clearTimeout(s.tapHold),s.tapHold=null;break}}dispatchEvent(e,t,i){var r=i.getComponent(),s;this.columnSubscribers[e]&&(i instanceof un?s=i.column.definition[e]:i instanceof Vt&&(s=i.definition[e]),s&&s(t,r)),this.dispatchExternal(e,t,r)}}var W0={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,navLeft:37,navRight:39,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35},G0={keyBlock:function(n){n.stopPropagation(),n.preventDefault()},scrollPageUp:function(n){var e=this.table.rowManager,t=e.scrollTop-e.element.clientHeight;n.preventDefault(),e.displayRowsCount&&(t>=0?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(n){var e=this.table.rowManager,t=e.scrollTop+e.element.clientHeight,i=e.element.scrollHeight;n.preventDefault(),e.displayRowsCount&&(t<=i?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(n){var e=this.table.rowManager;n.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(n){var e=this.table.rowManager;n.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(n){this.dispatch("keybinding-nav-prev",n)},navNext:function(n){this.dispatch("keybinding-nav-next",n)},navLeft:function(n){this.dispatch("keybinding-nav-left",n)},navRight:function(n){this.dispatch("keybinding-nav-right",n)},navUp:function(n){this.dispatch("keybinding-nav-up",n)},navDown:function(n){this.dispatch("keybinding-nav-down",n)}};class dn extends Pe{static moduleName="keybindings";static bindings=W0;static actions=G0;constructor(e){super(e),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var e=this.table.options.keybindings,t={};this.watchKeys={},this.pressedKeys=[],e!==!1&&(Object.assign(t,dn.bindings),Object.assign(t,e),this.mapBindings(t),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(e){for(let t in e)dn.actions[t]?e[t]&&(typeof e[t]!="object"&&(e[t]=[e[t]]),e[t].forEach(i=>{var r=Array.isArray(i)?i:[i];r.forEach(s=>{this.mapBinding(t,s)})})):console.warn("Key Binding Error - no such action:",t)}mapBinding(e,t){var i={action:dn.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1},r=t.toString().toLowerCase().split(" ").join("").split("+");r.forEach(s=>{switch(s){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:s=isNaN(s)?s.toUpperCase().charCodeAt(0):parseInt(s),i.keys.push(s),this.watchKeys[s]||(this.watchKeys[s]=[]),this.watchKeys[s].push(i)}})}bindEvents(){var e=this;this.keyupBinding=function(t){var i=t.keyCode,r=e.watchKeys[i];r&&(e.pressedKeys.push(i),r.forEach(function(s){e.checkBinding(t,s)}))},this.keydownBinding=function(t){var i=t.keyCode,r=e.watchKeys[i];if(r){var s=e.pressedKeys.indexOf(i);s>-1&&e.pressedKeys.splice(s,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(e,t){var i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta?(t.keys.forEach(r=>{var s=this.pressedKeys.indexOf(r);s==-1&&(i=!1)}),i&&t.action.call(this,e),!0):!1}}class Y0 extends Pe{static moduleName="menu";constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}initializeColumn(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t=e.definition.headerMenuIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="&vellip;",i.addEventListener("click",r=>{r.stopPropagation(),r.preventDefault(),this.loadMenuEvent(e.definition.headerMenu,r,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadMenuTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}loadMenuTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}loadMenuEvent(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,r,s){var a=!(e instanceof MouseEvent),o=document.createElement("div"),u;if(o.classList.add("tabulator-menu"),a||e.preventDefault(),!(!i||!i.length)){if(r)u=s.child(o);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout(()=>{this.nestedMenuBlock=!1},100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=u=this.popup(o)}i.forEach(c=>{var d=document.createElement("div"),p=c.label,h=c.disabled;c.separator?d.classList.add("tabulator-menu-separator"):(d.classList.add("tabulator-menu-item"),typeof p=="function"&&(p=p.call(this.table,t.getComponent())),p instanceof Node?d.appendChild(p):d.innerHTML=p,typeof h=="function"&&(h=h.call(this.table,t.getComponent())),h?(d.classList.add("tabulator-menu-item-disabled"),d.addEventListener("click",f=>{f.stopPropagation()})):c.menu&&c.menu.length?d.addEventListener("click",f=>{f.stopPropagation(),this.loadMenu(f,t,c.menu,d,u)}):c.action&&d.addEventListener("click",f=>{c.action(f,t.getComponent())}),c.menu&&c.menu.length&&d.classList.add("tabulator-menu-item-submenu")),o.appendChild(d)}),o.addEventListener("click",c=>{this.rootPopup&&this.rootPopup.hide()}),u.show(r||e),u===this.rootPopup&&(this.rootPopup.hideOnBlur(()=>{this.rootPopup=null,this.currentComponent&&(this.dispatch("menu-closed",i,u),this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}),this.currentComponent=t,this.dispatch("menu-opened",i,u),this.dispatchExternal("menuOpened",t.getComponent()))}}}class U0 extends Pe{static moduleName="moveColumn";constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}initialize(){this.table.options.movableColumns&&(this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("alert-show",this.abortMove.bind(this)))}abortMove(){clearTimeout(this.checkTimeout)}initializeColumn(e){var t=this,i={},r;!e.modules.frozen&&!e.isGroup&&!e.isRowHeader&&(r=e.getElement(),i.mousemove=(function(s){e.parent===t.moving.parent&&((t.touchMove?s.touches[0].pageX:s.pageX)-Ke.elOffset(r).left+t.table.columnManager.contentsElement.scrollLeft>e.getWidth()/2?(t.toCol!==e||!t.toColAfter)&&(r.parentNode.insertBefore(t.placeholderElement,r.nextSibling),t.moveColumn(e,!0)):(t.toCol!==e||t.toColAfter)&&(r.parentNode.insertBefore(t.placeholderElement,r),t.moveColumn(e,!1)))}).bind(t),r.addEventListener("mousedown",function(s){t.touchMove=!1,s.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(s,e)},t.checkPeriod))}),r.addEventListener("mouseup",function(s){s.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),t.bindTouchEvents(e)),e.modules.moveColumn=i}bindTouchEvents(e){var t=e.getElement(),i=!1,r,s,a,o,u,c;t.addEventListener("touchstart",d=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,r=e.nextColumn(),a=r?r.getWidth()/2:0,s=e.prevColumn(),o=s?s.getWidth()/2:0,u=0,c=0,i=!1,this.startMove(d,e)},this.checkPeriod)},{passive:!0}),t.addEventListener("touchmove",d=>{var p,h;this.moving&&(this.moveHover(d),i||(i=d.touches[0].pageX),p=d.touches[0].pageX-i,p>0?r&&p-u>a&&(h=r,h!==e&&(i=d.touches[0].pageX,h.getElement().parentNode.insertBefore(this.placeholderElement,h.getElement().nextSibling),this.moveColumn(h,!0))):s&&-p-c>o&&(h=s,h!==e&&(i=d.touches[0].pageX,h.getElement().parentNode.insertBefore(this.placeholderElement,h.getElement()),this.moveColumn(h,!1))),h&&(r=h.nextColumn(),u=a,a=r?r.getWidth()/2:0,s=h.prevColumn(),c=o,o=s?s.getWidth()/2:0))},{passive:!0}),t.addEventListener("touchend",d=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(d)})}startMove(e,t){var i=t.getElement(),r=this.table.columnManager.getContentsElement(),s=this.table.columnManager.getHeadersElement();this.table.modules.selectRange&&this.table.modules.selectRange.columnSelection&&this.table.modules.selectRange.mousedown&&this.table.modules.selectRange.selecting==="column"||(this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-Ke.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),r.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=r.clientHeight-s.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e),this.dispatch("column-moving",e,this.moving))}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})}moveColumn(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(r,s){var a=r.getElement(!0);a.parentNode&&i[s]&&a.parentNode.insertBefore(i[s].getElement(),a.nextSibling)}):e.getCells().forEach(function(r,s){var a=r.getElement(!0);a.parentNode&&i[s]&&a.parentNode.insertBefore(i[s].getElement(),a)})}endMove(e){(e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(e){var t=this.table.columnManager.getContentsElement(),i=t.scrollLeft,r=(this.touchMove?e.touches[0].pageX:e.pageX)-Ke.elOffset(t).left+i,s;this.hoverElement.style.left=r-this.startX+"px",r-i<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{s=Math.max(0,i-5),this.table.rowManager.getElement().scrollLeft=s,this.autoScrollTimeout=!1},1))),i+t.clientWidth-r<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{s=Math.min(t.clientWidth,i+5),this.table.rowManager.getElement().scrollLeft=s,this.autoScrollTimeout=!1},1)))}}var q0={delete:function(n,e,t){n.delete()}},K0={insert:function(n,e,t){return this.table.addRow(n.getData(),void 0,e),!0},add:function(n,e,t){return this.table.addRow(n.getData()),!0},update:function(n,e,t){return e?(e.update(n.getData()),!0):!1},replace:function(n,e,t){return e?(this.table.addRow(n.getData(),void 0,e),e.delete(),!0):!1}};class ir extends Pe{static moduleName="moveRow";static senders=q0;static receivers=K0;constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(e){var t=this,i={};i.mouseup=(function(r){t.tableRowDrop(r,e)}).bind(t),i.mousemove=(function(r){var s;r.pageY-Ke.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(s=e.getElement(),s.parentNode.insertBefore(t.placeholderElement,s.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(s=e.getElement(),s.previousSibling&&(s.parentNode.insertBefore(t.placeholderElement,s),t.moveRow(e,!1)))}).bind(t),e.modules.moveRow=i}initializeRow(e){var t=this,i={},r;i.mouseup=(function(s){t.tableRowDrop(s,e)}).bind(t),i.mousemove=(function(s){var a=e.getElement();s.pageY-Ke.elOffset(a).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(a.parentNode.insertBefore(t.placeholderElement,a.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(a.parentNode.insertBefore(t.placeholderElement,a),t.moveRow(e,!1))}).bind(t),this.hasHandle||(r=e.getElement(),r.addEventListener("mousedown",function(s){s.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(s,e)},t.checkPeriod))}),r.addEventListener("mouseup",function(s){s.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i}initializeColumn(e){e.definition.rowHandle&&this.table.options.movableRows!==!1&&(this.hasHandle=!0)}initializeCell(e){if(e.column.definition.rowHandle&&this.table.options.movableRows!==!1){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",function(r){r.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(r,e.row)},t.checkPeriod))}),i.addEventListener("mouseup",function(r){r.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,i)}}bindTouchEvents(e,t){var i=!1,r,s,a,o,u,c;t.addEventListener("touchstart",d=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,r=e.nextRow(),a=r?r.getHeight()/2:0,s=e.prevRow(),o=s?s.getHeight()/2:0,u=0,c=0,i=!1,this.startMove(d,e)},this.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",d=>{var p,h;this.moving&&(d.preventDefault(),this.moveHover(d),i||(i=d.touches[0].pageY),p=d.touches[0].pageY-i,p>0?r&&p-u>a&&(h=r,h!==e&&(i=d.touches[0].pageY,h.getElement().parentNode.insertBefore(this.placeholderElement,h.getElement().nextSibling),this.moveRow(h,!0))):s&&-p-c>o&&(h=s,h!==e&&(i=d.touches[0].pageY,h.getElement().parentNode.insertBefore(this.placeholderElement,h.getElement()),this.moveRow(h,!1))),h&&(r=h.nextRow(),u=a,a=r?r.getHeight()/2:0,s=h.prevRow(),c=o,o=s?s.getHeight()/2:0))}),t.addEventListener("touchend",d=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(d),this.touchMove=!1)})}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})}startMove(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}setStartPosition(e,t){var i=this.touchMove?e.touches[0].pageX:e.pageX,r=this.touchMove?e.touches[0].pageY:e.pageY,s,a;s=t.getElement(),this.connection?(a=s.getBoundingClientRect(),this.startX=a.left-i+window.pageXOffset,this.startY=a.top-r+window.pageYOffset):this.startY=r-s.getBoundingClientRect().top}endMove(e){(!e||e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(e,t){this.toRow=e,this.toRowAfter=t}moveHover(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}moveHoverTable(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,r=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=Math.min(r-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"px"}moveHoverConnections(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}elementRowDrop(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,i?i.getComponent():!1)}connectToTables(e){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(i=>{typeof i=="string"?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(i))):this.connectionElements.push(i)}),this.connectionElements.forEach(i=>{var r=s=>{this.elementRowDrop(s,i,this.moving)};i.addEventListener("mouseup",r),i.tabulatorElementDropEvent=r,i.classList.add("tabulator-movingrow-receiving")}))}disconnectFromTables(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(t=>{t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent})}connect(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(i=>{i.type==="row"&&i.modules.moveRow&&i.modules.moveRow.mouseup&&i.getElement().addEventListener("mouseup",i.modules.moveRow.mouseup)}),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}disconnect(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(t=>{t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(e,t,i){var r=!1;if(i){switch(typeof this.table.options.movableRowsSender){case"string":r=ir.senders[this.table.options.movableRowsSender];break;case"function":r=this.table.options.movableRowsSender;break}r?r.call(this,this.moving?this.moving.getComponent():void 0,t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()}tableRowDrop(e,t){var i=!1,r=!1;switch(e.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":i=ir.receivers[this.table.options.movableRowsReceiver];break;case"function":i=this.table.options.movableRowsReceiver;break}i?r=i.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),r?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:t,success:r})}commsReceived(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}}var J0={};class nr extends Pe{static moduleName="mutator";static mutators=J0;constructor(e){super(e),this.allowedTypes=["","data","edit","clipboard","import"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams"),this.registerColumnOption("mutatorImport"),this.registerColumnOption("mutatorImportParams"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(e,t,i){return this.transformRow(t,"data",i)}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(r=>{var s="mutator"+(r.charAt(0).toUpperCase()+r.slice(1)),a;e.definition[s]&&(a=this.lookupMutator(e.definition[s]),a&&(t=!0,i[s]={mutator:a,params:e.definition[s+"Params"]||{}}))}),t&&(e.modules.mutate=i)}lookupMutator(e){var t=!1;switch(typeof e){case"string":nr.mutators[e]?t=nr.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t,i){var r="mutator"+(t.charAt(0).toUpperCase()+t.slice(1)),s;return this.enabled&&this.table.columnManager.traverse(a=>{var o,u,c;a.modules.mutate&&(o=a.modules.mutate[r]||a.modules.mutate.mutator||!1,o&&(s=a.getFieldValue(typeof i<"u"?i:e),(t=="data"&&!i||typeof s<"u")&&(c=a.getComponent(),u=typeof o.params=="function"?o.params(s,e,t,c):o.params,a.setFieldValue(e,o.mutator(s,e,t,u,c)))))}),e}transformCell(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,r={};if(i)return r=Object.assign(r,e.row.getData()),e.column.setFieldValue(r,t),i.mutator(t,r,"edit",i.params,e.getComponent())}return t}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach(i=>{var r=e.row.getCell(i);r&&r.setValue(r.getValue(),!0,!0)}))}enable(){this.enabled=!0}disable(){this.enabled=!1}}function X0(n,e,t,i,r){var s=document.createElement("span"),a=document.createElement("span"),o=document.createElement("span"),u=document.createElement("span"),c=document.createElement("span"),d=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",p=>{a.innerHTML=p}),this.table.modules.localize.langBind("pagination|counter|of",p=>{u.innerHTML=p}),this.table.modules.localize.langBind("pagination|counter|rows",p=>{d.innerHTML=p}),i?(o.innerHTML=" "+e+"-"+Math.min(e+n-1,i)+" ",c.innerHTML=" "+i+" ",s.appendChild(a),s.appendChild(o),s.appendChild(u),s.appendChild(c),s.appendChild(d)):(o.innerHTML=" 0 ",s.appendChild(a),s.appendChild(o),s.appendChild(d)),s}function Z0(n,e,t,i,r){var s=document.createElement("span"),a=document.createElement("span"),o=document.createElement("span"),u=document.createElement("span"),c=document.createElement("span"),d=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",p=>{a.innerHTML=p}),o.innerHTML=" "+t+" ",this.table.modules.localize.langBind("pagination|counter|of",p=>{u.innerHTML=p}),c.innerHTML=" "+r+" ",this.table.modules.localize.langBind("pagination|counter|pages",p=>{d.innerHTML=p}),s.appendChild(a),s.appendChild(o),s.appendChild(u),s.appendChild(c),s.appendChild(d),s}var Q0={rows:X0,pages:Z0};class pa extends Pe{static moduleName="page";static pageCounters=Q0;constructor(e){super(e),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("paginationOutOfRange",!1),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("footer-redraw",this.footerRedraw.bind(this)),this.table.options.paginationAddRow=="page"&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),this.table.options.paginationMode==="remote"&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),this.table.options.progressiveLoad==="scroll"&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(e,t){var i=this.table.rowManager,r=i.getDisplayRows(),s;return t?r.length?s=r[0]:i.activeRows.length&&(s=i.activeRows[i.activeRows.length-1],t=!1):r.length&&(s=r[r.length-1],t=!(r.length<this.size)),{index:s,top:t}}calculatePageSizes(){var e,t;this.table.options.paginationSize?this.size=this.table.options.paginationSize:(e=document.createElement("div"),e.classList.add("tabulator-row"),e.style.visibility="hidden",t=document.createElement("div"),t.classList.add("tabulator-cell"),t.innerHTML="Page Row Test",e.appendChild(t),this.table.rowManager.getTableElement().appendChild(e),this.size=Math.floor(this.table.rowManager.getElement().clientHeight/e.offsetHeight),this.table.rowManager.getTableElement().removeChild(e)),this.dispatchExternal("pageSizeChanged",this.size),this.generatePageSizeSelectList()}initialLoadComplete(){this.initialLoad=!1}remotePageParams(e,t,i,r){return this.initialLoad||(this.progressiveLoad&&!i||!this.progressiveLoad&&!this.dataChanging)&&this.reset(!0),r.page=this.page,this.size&&(r.size=this.size),r}userSetPageToRow(e){return this.table.options.pagination&&(e=this.table.rowManager.findRow(e),e)?this.setPageToRow(e):Promise.reject()}userSetPageSize(e){return this.table.options.pagination?(this.setPageSize(e),this.setPage(1)):!1}scrollVertical(e,t){var i,r,s;!t&&!this.table.dataLoader.loading&&(i=this.table.rowManager.getElement(),r=i.scrollHeight-i.clientHeight-e,s=this.table.options.progressiveLoadScrollMargin||i.clientHeight*2,r<s&&this.nextPage().catch(()=>{}))}restOnRenderBefore(e,t){return t||this.mode==="local"&&this.reset(),e}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,this.pageSizes.indexOf(this.size)==-1&&e.unshift(this.size);else if(this.pageSizes.indexOf(this.size)==-1){e=[];for(let t=1;t<5;t++)e.push(this.size*t);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach(t=>{var i=document.createElement("option");i.value=t,t===!0?this.langBind("pagination|all",function(r){i.innerHTML=r}):i.innerHTML=t,this.pageSizeSelect.appendChild(i)}),this.pageSizeSelect.value=this.size}}initializePageCounter(){var e=this.table.options.paginationCounter,t=null;e&&(typeof e=="function"?t=e:t=pa.pageCounters[e],t?(this.pageCounter=t,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",e))}initializePaginator(e){var t,i;e||(this.langBind("pagination|first",r=>{this.firstBut.innerHTML=r}),this.langBind("pagination|first_title",r=>{this.firstBut.setAttribute("aria-label",r),this.firstBut.setAttribute("title",r)}),this.langBind("pagination|prev",r=>{this.prevBut.innerHTML=r}),this.langBind("pagination|prev_title",r=>{this.prevBut.setAttribute("aria-label",r),this.prevBut.setAttribute("title",r)}),this.langBind("pagination|next",r=>{this.nextBut.innerHTML=r}),this.langBind("pagination|next_title",r=>{this.nextBut.setAttribute("aria-label",r),this.nextBut.setAttribute("title",r)}),this.langBind("pagination|last",r=>{this.lastBut.innerHTML=r}),this.langBind("pagination|last_title",r=>{this.lastBut.setAttribute("aria-label",r),this.lastBut.setAttribute("title",r)}),this.firstBut.addEventListener("click",()=>{this.setPage(1)}),this.prevBut.addEventListener("click",()=>{this.previousPage()}),this.nextBut.addEventListener("click",()=>{this.nextPage()}),this.lastBut.addEventListener("click",()=>{this.setPage(this.max)}),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),this.langBind("pagination|page_size",r=>{this.pageSizeSelect.setAttribute("aria-label",r),this.pageSizeSelect.setAttribute("title",r),t.innerHTML=r}),this.element.appendChild(t),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",r=>{this.setPageSize(this.pageSizeSelect.value=="true"?!0:this.pageSizeSelect.value),this.setPage(1)})),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):typeof this.table.options.paginationCounterElement=="string"&&(i=document.querySelector(this.table.options.paginationCounterElement),i?i.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(e){this.initializePaginator(!0),this.mode="progressive_"+e,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setMaxRows(e){e?this.max=this.size===!0?1:Math.ceil(e/this.size):this.max=1,this.page>this.max&&(this.page=this.max)}reset(e){this.initialLoad||(this.mode=="local"||e)&&(this.page=1,this.trackChanges())}setMaxPage(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return e=parseInt(e),e>0&&e<=this.max||this.mode!=="local"?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}setPageToRow(e){var t=this.displayRows(-1),i=t.indexOf(e);if(i>-1){var r=this.size===!0?1:Math.ceil((i+1)/this.size);return this.setPage(r)}else return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(e){e!==!0&&(e=parseInt(e)),e>0&&(this.size=e,this.dispatchExternal("pageSizeChanged",e)),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(e,t,i){var r;if(this.pageCounter)switch(this.mode==="remote"&&(t=this.size,i=(this.page-1)*this.size+1,e=this.remoteRowCountEstimate),r=this.pageCounter.call(this,t,i,this.page,e,this.max),typeof r){case"object":if(r instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(r)}else this.pageCounterElement.innerHTML="",r!=null&&console.warn("Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:",r);break;case"undefined":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=r}}_setPageButtons(){let e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+1<this.count?this.max-this.count+1:Math.max(this.page-e,1),r=this.page<=t?Math.min(this.count,this.max):Math.min(this.page+t,this.max);for(;this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);this.page==1?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(let s=i;s<=r;s++)s>0&&s<=this.max&&this.pagesElement.appendChild(this._generatePageButton(s));this.footerRedraw()}_generatePageButton(e){var t=document.createElement("button");return t.classList.add("tabulator-page"),e==this.page&&t.classList.add("active"),t.setAttribute("type","button"),t.setAttribute("role","button"),this.langBind("pagination|page_title",i=>{t.setAttribute("aria-label",i+" "+e),t.setAttribute("title",i+" "+e)}),t.setAttribute("data-page",e),t.textContent=e,t.addEventListener("click",i=>{this.setPage(e)}),t}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.page<this.max?(this.page++,this.trackChanges(),this.trigger()):(this.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+this.max+":",this.max+1),Promise.reject())}getPage(){return this.page}getPageMax(){return this.max}getPageSize(e){return this.size}getMode(){return this.mode}getRows(e){var t=0,i,r,s,a,o=e.filter(u=>u.type==="row");if(this.mode=="local"){i=[],this.setMaxRows(e.length),this.size===!0?(r=0,s=e.length):(r=this.size*(this.page-1),s=r+parseInt(this.size)),this._setPageButtons();for(let u=r;u<s;u++){let c=e[u];c&&(i.push(c),c.type==="row"&&(a||(a=c),t++))}return this._setPageCounter(o.length,t,a?o.indexOf(a)+1:0),i}else return this._setPageButtons(),this._setPageCounter(o.length),e.slice(0)}trigger(){var e;switch(this.mode){case"local":return e=this.table.rowManager.scrollLeft,this.refreshData(),this.table.rowManager.scrollHorizontal(e),this.dispatchExternal("pageLoaded",this.getPage()),Promise.resolve();case"remote":return this.dataChanging=!0,this.reloadData(null).finally(()=>{this.dataChanging=!1});case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(e){var t,i;if(typeof e.last_page>"u"&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),e.data)if(this.max=parseInt(e.last_page)||1,this.remoteRowCountEstimate=typeof e.last_row<"u"?e.last_row:e.last_page*this.size-(this.page==e.last_page?this.size-e.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":this.page==1?this.table.rowManager.setData(e.data,!1,this.page==1):this.table.rowManager.addRows(e.data),this.page<this.max&&setTimeout(()=>{this.nextPage()},this.table.options.progressiveLoadDelay);break;case"progressive_scroll":e=this.page===1?e.data:this.table.rowManager.getData().concat(e.data),this.table.rowManager.setData(e,this.page!==1,this.page==1),t=this.table.options.progressiveLoadScrollMargin||this.table.rowManager.element.clientHeight*2,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+t&&this.page<this.max&&setTimeout(()=>{this.nextPage()});break}return!1}else{if(this.page>this.max&&(console.warn("Remote Pagination Error - Server returned last page value lower than the current page"),i=this.options("paginationOutOfRange"),i))return this.setPage(typeof i=="function"?i.call(this,this.page,this.max):i);this.dispatchExternal("pageLoaded",this.getPage())}else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return e.data}footerRedraw(){var e=this.table.footerManager.containerElement;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))}}var eE={local:function(n,e){var t=localStorage.getItem(n+"-"+e);return t?JSON.parse(t):!1},cookie:function(n,e){var t=document.cookie,i=n+"-"+e,r=t.indexOf(i+"="),s,a;return r>-1&&(t=t.slice(r),s=t.indexOf(";"),s>-1&&(t=t.slice(0,s)),a=t.replace(i+"=","")),a?JSON.parse(a):!1}},tE={local:function(n,e,t){localStorage.setItem(n+"-"+e,JSON.stringify(t))},cookie:function(n,e,t){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=n+"-"+e+"="+JSON.stringify(t)+"; expires="+i.toUTCString()}};class Ht extends Pe{static moduleName="persistence";static moduleInitOrder=-10;static readers=eE;static writers=tE;constructor(e){super(e),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}initialize(){if(this.table.options.persistence){var e=this.table.options.persistenceMode,t=this.table.options.persistenceID,i;this.mode=e!==!0?e:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?typeof this.table.options.persistenceReaderFunc=="function"?this.readFunc=this.table.options.persistenceReaderFunc:Ht.readers[this.table.options.persistenceReaderFunc]?this.readFunc=Ht.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):Ht.readers[this.mode]?this.readFunc=Ht.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?typeof this.table.options.persistenceWriterFunc=="function"?this.writeFunc=this.table.options.persistenceWriterFunc:Ht.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=Ht.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):Ht.writers[this.mode]?this.writeFunc=Ht.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(t||this.table.element.getAttribute("id")||""),this.config={sort:this.table.options.persistence===!0||this.table.options.persistence.sort,filter:this.table.options.persistence===!0||this.table.options.persistence.filter,headerFilter:this.table.options.persistence===!0||this.table.options.persistence.headerFilter,group:this.table.options.persistence===!0||this.table.options.persistence.group,page:this.table.options.persistence===!0||this.table.options.persistence.page,columns:this.table.options.persistence===!0?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(i=this.retrieveData("page"),i&&(typeof i.paginationSize<"u"&&(this.config.page===!0||this.config.page.size)&&(this.table.options.paginationSize=i.paginationSize),typeof i.paginationInitialPage<"u"&&(this.config.page===!0||this.config.page.page)&&(this.table.options.paginationInitialPage=i.paginationInitialPage))),this.config.group&&(i=this.retrieveData("group"),i&&(typeof i.groupBy<"u"&&(this.config.group===!0||this.config.group.groupBy)&&(this.table.options.groupBy=i.groupBy),typeof i.groupStartOpen<"u"&&(this.config.group===!0||this.config.group.groupStartOpen)&&(this.table.options.groupStartOpen=i.groupStartOpen),typeof i.groupHeader<"u"&&(this.config.group===!0||this.config.group.groupHeader)&&(this.table.options.groupHeader=i.groupHeader))),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("filter-changed",this.eventSave.bind(this,"headerFilter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("column-width",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(e){this.config[e]&&this.save(e)}tableBuilt(){var e,t,i;this.config.sort&&(e=this.load("sort"),e&&(this.table.options.initialSort=e)),this.config.filter&&(t=this.load("filter"),t&&(this.table.options.initialFilter=t)),this.config.headerFilter&&(i=this.load("headerFilter"),i&&(this.table.options.initialHeaderFilter=i))}tableRedraw(e){e&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e,!0)),!0}initializeColumn(e){var t,i;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=this.config.columns===!0?Object.keys(t):this.config.columns,i.forEach(r=>{var s=Object.getOwnPropertyDescriptor(t,r),a=t[r];s&&Object.defineProperty(t,r,{set:o=>{a=o,this.defWatcherBlock||this.save("columns"),s.set&&s.set(o)},get:()=>(s.get&&s.get(),a)})}),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(e){return this.readFunc?this.readFunc(this.id,e):!1}mergeDefinition(e,t,i){var r=[];return t=t||[],t.forEach((s,a)=>{var o=this._findColumn(e,s),u;o&&(i?u=Object.keys(s):this.config.columns===!0||this.config.columns==null?(u=Object.keys(o),u.push("width")):u=this.config.columns,u.forEach(c=>{c!=="columns"&&typeof s[c]<"u"&&(o[c]=s[c])}),o.columns&&(o.columns=this.mergeDefinition(o.columns,s.columns)),r.push(o))}),e.forEach((s,a)=>{var o=this._findColumn(t,s);o||(r.length>a?r.splice(a,0,s):r.push(s))}),r}_findColumn(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(r){switch(i){case"group":return r.title===t.title&&r.columns.length===t.columns.length;case"field":return r.field===t.field;case"object":return r===t}})}save(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"headerFilter":t=this.table.modules.filter.getHeaderFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig();break}this.writeFunc&&this.writeFunc(this.id,e,t)}validateSorters(e){return e.forEach(function(t){t.column=t.field,delete t.field}),e}getGroupConfig(){var e={};return this.config.group&&((this.config.group===!0||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(this.config.group===!0||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(this.config.group===!0||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}getPageConfig(){var e={};return this.config.page&&((this.config.page===!0||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(this.config.page===!0||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}parseColumns(e){var t=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(r=>{var s={},a=r.getDefinition(),o;r.isGroup?(s.title=a.title,s.columns=this.parseColumns(r.getColumns())):(s.field=r.getField(),this.config.columns===!0||this.config.columns==null?(o=Object.keys(a),o.push("width"),o.push("visible")):o=this.config.columns,o.forEach(u=>{switch(u){case"width":s.width=r.getWidth();break;case"visible":s.visible=r.visible;break;default:typeof a[u]!="function"&&i.indexOf(u)===-1&&(s[u]=a[u])}})),t.push(s)}),t}}class iE extends Pe{static moduleName="popup";constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t=e.definition.headerPopupIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="&vellip;",i.addEventListener("click",r=>{r.stopPropagation(),r.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,r,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,r){var s;function a(o){s=o}i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent(),a):e,this.loadPopup(t,i,e,s,r)}loadPopup(e,t,i,r,s){var a=!(e instanceof MouseEvent),o,u;i instanceof HTMLElement?o=i:(o=document.createElement("div"),o.innerHTML=i),o.classList.add("tabulator-popup"),o.addEventListener("click",c=>{c.stopPropagation()}),a||e.preventDefault(),u=this.popup(o),typeof r=="function"&&u.renderCallback(r),e?u.show(e):u.show(t.getElement(),s||"center"),u.hideOnBlur(()=>{this.dispatchExternal("popupClosed",t.getComponent())}),this.dispatchExternal("popupOpened",t.getComponent())}}class nE extends Pe{static moduleName="print";constructor(e){super(e),this.element=!1,this.manualBlock=!1,this.beforeprintEventHandler=null,this.afterprintEventHandler=null,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(this.beforeprintEventHandler=this.replaceTable.bind(this),this.afterprintEventHandler=this.cleanup.bind(this),window.addEventListener("beforeprint",this.beforeprintEventHandler),window.addEventListener("afterprint",this.afterprintEventHandler),this.subscribe("table-destroy",this.destroy.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}destroy(){this.table.options.printAsHtml&&(window.removeEventListener("beforeprint",this.beforeprintEventHandler),window.removeEventListener("afterprint",this.afterprintEventHandler))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.generateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(e,t,i){var r=window.scrollX,s=window.scrollY,a=document.createElement("div"),o=document.createElement("div"),u=this.table.modules.export.generateTable(typeof i<"u"?i:this.table.options.printConfig,typeof t<"u"?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print"),c,d;this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.classList.add("tabulator-print-header"),c=typeof this.table.options.printHeader=="function"?this.table.options.printHeader.call(this.table):this.table.options.printHeader,typeof c=="string"?a.innerHTML=c:a.appendChild(c),this.element.appendChild(a)),this.element.appendChild(u),this.table.options.printFooter&&(o.classList.add("tabulator-print-footer"),d=typeof this.table.options.printFooter=="function"?this.table.options.printFooter.call(this.table):this.table.options.printFooter,typeof d=="string"?o.innerHTML=d:o.appendChild(d),this.element.appendChild(o)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,u),window.print(),this.cleanup(),window.scrollTo(r,s),this.manualBlock=!1}}class rE extends Pe{static moduleName="reactiveData";constructor(e){super(e),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(e){var t=this,i;this.currentVersion++,i=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments),s;return!t.blocked&&i===t.currentVersion&&(t.block("data-push"),r.forEach(a=>{t.table.rowManager.addRowActual(a,!1)}),s=t.origFuncs.push.apply(e,arguments),t.unblock("data-push")),s}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments),s;return!t.blocked&&i===t.currentVersion&&(t.block("data-unshift"),r.forEach(a=>{t.table.rowManager.addRowActual(a,!0)}),s=t.origFuncs.unshift.apply(e,arguments),t.unblock("data-unshift")),s}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var r,s;return!t.blocked&&i===t.currentVersion&&(t.block("data-shift"),t.data.length&&(r=t.table.rowManager.getRowFromDataObject(t.data[0]),r&&r.deleteActual()),s=t.origFuncs.shift.call(e),t.unblock("data-shift")),s}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var r,s;return!t.blocked&&i===t.currentVersion&&(t.block("data-pop"),t.data.length&&(r=t.table.rowManager.getRowFromDataObject(t.data[t.data.length-1]),r&&r.deleteActual()),s=t.origFuncs.pop.call(e),t.unblock("data-pop")),s}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments),s=r[0]<0?e.length+r[0]:r[0],a=r[1],o=r[2]?r.slice(2):!1,u,c;if(!t.blocked&&i===t.currentVersion){if(t.block("data-splice"),o&&(u=e[s]?t.table.rowManager.getRowFromDataObject(e[s]):!1,u?o.forEach(p=>{t.table.rowManager.addRowActual(p,!0,u,!0)}):(o=o.slice().reverse(),o.forEach(p=>{t.table.rowManager.addRowActual(p,!0,!1,!0)}))),a!==0){var d=e.slice(s,typeof r[1]>"u"?r[1]:s+a);d.forEach((p,h)=>{var f=t.table.rowManager.getRowFromDataObject(p);f&&f.deleteActual(h!==d.length-1)})}(o||a!==0)&&t.table.rowManager.reRenderInPosition(),c=t.origFuncs.splice.apply(e,arguments),t.unblock("data-splice")}return c}})}unwatchData(){if(this.data!==!1)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(e){var t=e.getData();for(var i in t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],r={};i&&(r.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var s=r.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return s}}),r.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var s=r.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return s}}),r.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var s=r.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return s}}),r.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var s=r.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return s}}),r.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var s=r.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return s}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var r=this,s=Object.getOwnPropertyDescriptor(t,i),a=t[i],o=this.currentVersion;Object.defineProperty(t,i,{set:u=>{if(a=u,!r.blocked&&o===r.currentVersion){r.block("key");var c={};c[i]=u,e.updateData(c),r.unblock("key")}s.set&&s.set(u)},get:()=>(s.get&&s.get(),a)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}class sE extends Pe{static moduleName="resizeColumns";constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1),this.registerTableOption("resizableColumnGuide",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){e.row.type==="row"&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.reinitializeColumn(t)}):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.reinitializeColumn(t)}))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,e.modules.frozen.position==="left"?t+=e.getWidth()-3:t&&(t-=3)),t!==!1?t+"px":!1}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach(i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t,i.modules.resize.handleEl.style["z-index"]=11),i.element.after(i.modules.resize.handleEl))}),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,r){var s=this,a=!1,o=i.definition.resizable,u={},c=i.getLastColumn();if(e==="header"&&(a=i.definition.formatter=="textarea"||i.definition.variableHeight,u={variableHeight:a}),(o===!0||o==e)&&this._checkResizability(c)){var d=document.createElement("span");d.className="tabulator-col-resize-handle",d.addEventListener("click",function(h){h.stopPropagation()});var p=function(h){s.startColumn=i,s.initialNextColumn=s.nextColumn=c.nextColumn(),s._mouseDown(h,c,d)};d.addEventListener("mousedown",p),d.addEventListener("touchstart",p,{passive:!0}),d.addEventListener("dblclick",h=>{var f=c.getWidth();h.stopPropagation(),c.reinitializeWidth(!0),f!==c.getWidth()&&(s.dispatch("column-resized",c),s.dispatchExternal("columnResized",c.getComponent()))}),i.modules.frozen&&(d.style.position="sticky",d.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),u.handleEl=d,r.parentNode&&i.visible&&r.after(d)}t.modules.resize=u}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach(t=>{this.deInitializeComponent(t)})}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl,t&&t.parentElement&&t.parentElement.removeChild(t))}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}resize(e,t){var i=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,r=i-this.startX,s=i-this.latestX,a,o;if(this.latestX=i,this.table.rtl&&(r=-r,s=-s),a=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(this.startWidth+r),o=t.width==t.minWidth||t.width==t.maxWidth,s<0&&(this.nextColumn=this.initialNextColumn),this.table.options.resizableColumnFit&&this.nextColumn&&!(a&&o)){let u=this.nextColumn.getWidth();s>0&&u<=this.nextColumn.minWidth&&(this.nextColumn=this.nextColumn.nextColumn()),this.nextColumn&&this.nextColumn.setWidth(this.nextColumn.getWidth()-s)}this.table.columnManager.rerenderColumns(!0),!this.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}calcGuidePosition(e,t,i){var r=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,s=i.getBoundingClientRect().x-this.table.element.getBoundingClientRect().x,a=this.table.element.getBoundingClientRect().x,o=t.element.getBoundingClientRect().left-a,u=r-this.startX,c=Math.max(s+u,o+t.minWidth);return t.maxWidth&&(c=Math.min(c,o+t.maxWidth)),c}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var r=this,s;this.dispatchExternal("columnResizing",t.getComponent()),r.table.options.resizableColumnGuide&&(s=document.createElement("span"),s.classList.add("tabulator-col-resize-guide"),r.table.element.appendChild(s),setTimeout(()=>{s.style.left=r.calcGuidePosition(e,t,i)+"px"})),r.table.element.classList.add("tabulator-block-select");function a(u){r.table.options.resizableColumnGuide?s.style.left=r.calcGuidePosition(u,t,i)+"px":r.resize(u,t)}function o(u){r.table.options.resizableColumnGuide&&(r.resize(u,t),s.remove()),r.startColumn.modules.edit&&(r.startColumn.modules.edit.blocked=!1),r.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",a),i.removeEventListener("touchmove",a),i.removeEventListener("touchend",o),r.table.element.classList.remove("tabulator-block-select"),r.startWidth!==t.getWidth()&&(r.table.columnManager.verticalAlignHeaders(),r.dispatch("column-resized",t),r.dispatchExternal("columnResized",t.getComponent()))}e.stopPropagation(),r.startColumn.modules.edit&&(r.startColumn.modules.edit.blocked=!0),r.startX=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,r.latestX=r.startX,r.startWidth=t.getWidth(),document.body.addEventListener("mousemove",a),document.body.addEventListener("mouseup",o),i.addEventListener("touchmove",a,{passive:!0}),i.addEventListener("touchend",o)}}class aE extends Pe{static moduleName="resizeRows";constructor(e){super(e),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1),this.registerTableOption("resizableRowGuide",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(e){var t=this,i=e.getElement(),r=document.createElement("div");r.className="tabulator-row-resize-handle";var s=document.createElement("div");s.className="tabulator-row-resize-handle prev",r.addEventListener("click",function(u){u.stopPropagation()});var a=function(u){t.startRow=e,t._mouseDown(u,e,r)};r.addEventListener("mousedown",a),r.addEventListener("touchstart",a,{passive:!0}),s.addEventListener("click",function(u){u.stopPropagation()});var o=function(u){var c=t.table.rowManager.prevDisplayRow(e);c&&(t.startRow=c,t._mouseDown(u,c,s))};s.addEventListener("mousedown",o),s.addEventListener("touchstart",o,{passive:!0}),i.appendChild(r),i.appendChild(s)}resize(e,t){t.setHeight(this.startHeight+((typeof e.screenY>"u"?e.touches[0].screenY:e.screenY)-this.startY))}calcGuidePosition(e,t,i){var r=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,s=i.getBoundingClientRect().y-this.table.element.getBoundingClientRect().y,a=this.table.element.getBoundingClientRect().y,o=t.element.getBoundingClientRect().top-a,u=r-this.startY;return Math.max(s+u,o)}_mouseDown(e,t,i){var r=this,s;r.dispatchExternal("rowResizing",t.getComponent()),r.table.options.resizableRowGuide&&(s=document.createElement("span"),s.classList.add("tabulator-row-resize-guide"),r.table.element.appendChild(s),setTimeout(()=>{s.style.top=r.calcGuidePosition(e,t,i)+"px"})),r.table.element.classList.add("tabulator-block-select");function a(u){r.table.options.resizableRowGuide?s.style.top=r.calcGuidePosition(u,t,i)+"px":r.resize(u,t)}function o(u){r.table.options.resizableRowGuide&&(r.resize(u,t),s.remove()),document.body.removeEventListener("mouseup",a),document.body.removeEventListener("mousemove",a),i.removeEventListener("touchmove",a),i.removeEventListener("touchend",o),r.table.element.classList.remove("tabulator-block-select"),r.dispatchExternal("rowResized",t.getComponent())}e.stopPropagation(),r.startY=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,r.startHeight=t.getHeight(),document.body.addEventListener("mousemove",a),document.body.addEventListener("mouseup",o),i.addEventListener("touchmove",a,{passive:!0}),i.addEventListener("touchend",o)}}class oE extends Pe{static moduleName="resizeTable";constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var e=this.table,t;this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),typeof IntersectionObserver<"u"&&typeof ResizeObserver<"u"&&e.rowManager.getRenderMode()==="virtual"?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell)){var r=Math.floor(i[0].contentRect.height),s=Math.floor(i[0].contentRect.width);(this.tableHeight!=r||this.tableWidth!=s)&&(this.tableHeight=r,this.tableWidth=s,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),this.redrawTable())}}),this.resizeObserver.observe(e.element),t=window.getComputedStyle(e.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell)){var r=Math.floor(i[0].contentRect.height),s=Math.floor(i[0].contentRect.width);(this.containerHeight!=r||this.containerWidth!=s)&&(this.containerHeight=r,this.containerWidth=s,this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth),this.redrawTable()}}),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell))&&(e.columnManager.rerenderColumns(!0),e.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver(e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)}),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}function lE(n,e,t){var i=document.createElement("div"),r=n.getRow()._row.modules.responsiveLayout;i.classList.add("tabulator-responsive-collapse-toggle"),i.innerHTML=`<svg class='tabulator-responsive-collapse-toggle-open' viewbox="0 0 24 24">
40
- <line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />
41
- <line y1="7" x1="12" y2="17" x2="12" fill="none" stroke-width="3" stroke-linecap="round" />
42
- </svg>
43
-
44
- <svg class='tabulator-responsive-collapse-toggle-close' viewbox="0 0 24 24">
45
- <line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />
46
- </svg>`,n.getElement().classList.add("tabulator-row-handle");function s(a){var o=r.element;r.open=a,o&&(r.open?(i.classList.add("open"),o.style.display=""):(i.classList.remove("open"),o.style.display="none"))}return i.addEventListener("click",function(a){a.stopImmediatePropagation(),s(!r.open),n.getTable().rowManager.adjustTableSize()}),s(r.open),i}var uE={format:{formatters:{responsiveCollapse:lE}}};class cE extends Pe{static moduleName="responsiveLayout";static moduleExtensions=uE;constructor(e){super(e),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),this.table.options.responsiveLayout==="collapse"&&(this.subscribe("row-data-changed",this.generateCollapsedRowContent.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(e){["fitColumns","fitDataStretch"].indexOf(this.layoutMode())===-1&&(e||this.update())}initializeResponsivity(){var e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.collapseFormatter&&(this.collapseFormatter=this.collapseFormatter.bind(this.table)),this.table.columnManager.columnsByIndex.forEach((t,i)=>{t.modules.responsive&&t.modules.responsive.order&&t.modules.responsive.visible&&(t.modules.responsive.index=i,e.push(t),!t.visible&&this.mode==="collapse"&&this.hiddenColumns.push(t))}),e=e.reverse(),e=e.sort((t,i)=>{var r=i.modules.responsive.order-t.modules.responsive.order;return r||i.modules.responsive.index-t.modules.responsive.index}),this.columns=e,this.mode==="collapse"&&this.generateCollapsedContent();for(let t of this.table.columnManager.columnsByIndex)if(t.definition.formatter=="responsiveCollapse"){this.collapseHandleColumn=t;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(e){var t=e.getDefinition();e.modules.responsive={order:typeof t.responsive>"u"?1:t.responsive,visible:t.visible!==!1}}initializeRow(e){var t;e.type!=="calc"&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}layoutRow(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}updateColumnVisibility(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}hideColumn(e){var t=this.hiddenColumns.length;e.hide(!1,!0),this.mode==="collapse"&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}showColumn(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),this.mode==="collapse"&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var e=!0;e;){let t=this.table.modules.layout.getMode()=="fitColumns"?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let r=this.columns[this.index];r?(this.hideColumn(r),this.index++):e=!1}else{let r=this.columns[this.index-1];r&&i>0&&i>=r.getWidth()?(this.showColumn(r),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){var e=this.table.rowManager.getDisplayRows();e.forEach(t=>{this.generateCollapsedRowContent(t)})}generateCollapsedRowContent(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);i=this.collapseFormatter(this.generateCollapsedRowData(e)),i&&t.appendChild(i),e.calcHeight(!0)}}generateCollapsedRowData(e){var t=e.getData(),i=[],r;return this.hiddenColumns.forEach(s=>{var a=s.getFieldValue(t);if(s.definition.title&&s.field)if(s.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){let o=function(u){u()};r={value:!1,data:{},getValue:function(){return a},getData:function(){return t},getType:function(){return"cell"},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return s.getComponent()},getTable:()=>this.table},i.push({field:s.field,title:s.definition.title,value:s.modules.format.formatter.call(this.table.modules.format,r,s.modules.format.params,o)})}else i.push({field:s.field,title:s.definition.title,value:a})}),i}formatCollapsedData(e){var t=document.createElement("table");return e.forEach(i=>{var r=document.createElement("tr"),s=document.createElement("td"),a=document.createElement("td"),o,u=document.createElement("strong");s.appendChild(u),this.modules.localize.bind("columns|"+i.field,function(c){u.innerHTML=c||i.title}),i.value instanceof Node?(o=document.createElement("div"),o.appendChild(i.value),a.appendChild(o)):a.innerHTML=i.value,r.appendChild(s),r.appendChild(a),t.appendChild(r)}),Object.keys(e).length?t:""}}function dE(n,e,t){var i=document.createElement("input"),r=!1;if(i.type="checkbox",i.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(i.addEventListener("click",a=>{a.stopPropagation()}),typeof n.getRow=="function"){var s=n.getRow();s instanceof Zn?(i.addEventListener("change",a=>{this.table.options.selectableRowsRangeMode==="click"&&r?r=!1:s.toggleSelect()}),this.table.options.selectableRowsRangeMode==="click"&&i.addEventListener("click",a=>{r=!0,this.table.modules.selectRow.handleComplexRowClick(s._row,a)}),i.checked=s.isSelected&&s.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(s,i)):i=""}else i.addEventListener("change",a=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(e.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(i);return i}var hE={format:{formatters:{rowSelection:dE}}};class fE extends Pe{static moduleName="selectRow";static moduleExtensions=hE;constructor(e){super(e),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectableRows","highlight"),this.registerTableOption("selectableRowsRangeMode","drag"),this.registerTableOption("selectableRowsRollingSelection",!0),this.registerTableOption("selectableRowsPersistence",!0),this.registerTableOption("selectableRowsCheck",function(t,i){return!0}),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){this.deprecatedOptionsCheck(),this.table.options.selectableRows==="highlight"&&this.table.options.selectableRange&&(this.table.options.selectableRows=!1),this.table.options.selectableRows!==!1&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectableRows&&!this.table.options.selectableRowsPersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}deprecatedOptionsCheck(){}rowRetrieve(e,t){return e==="selected"?this.selectedRows:t}rowDeleted(e){this._deselectRow(e,!0)}clearSelectionData(e){var t=this.selectedRows.length;this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t&&e!==!0&&this._rowSelectionChanged()}initializeRow(e){var t=this,i=t.checkRowSelectability(e),r=e.getElement(),s=function(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",s)};e.modules.select={selected:!1},r.classList.toggle("tabulator-selectable",i),r.classList.toggle("tabulator-unselectable",!i),t.checkRowSelectability(e)&&t.table.options.selectableRows&&t.table.options.selectableRows!="highlight"&&(t.table.options.selectableRowsRangeMode==="click"?r.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(r.addEventListener("click",function(a){(!t.table.modExists("edit")||!t.table.modules.edit.getCurrentCell())&&t.table._clearSelection(),t.selecting||t.toggleRow(e)}),r.addEventListener("mousedown",function(a){if(a.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",s),document.body.addEventListener("keyup",s),t.toggleRow(e),!1}),r.addEventListener("mouseenter",function(a){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),r.addEventListener("mouseout",function(a){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))}handleComplexRowClick(e,t){if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var i=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),r=this.table.rowManager.getDisplayRowIndex(e),s=i<=r?i:r,a=i>=r?i:r,o=this.table.rowManager.getDisplayRows().slice(0),u=o.splice(s,a-s+1);t.ctrlKey||t.metaKey?(u.forEach(c=>{c!==this.lastClickedRow&&(this.table.options.selectableRows!==!0&&!this.isRowSelected(e)?this.selectedRows.length<this.table.options.selectableRows&&this.toggleRow(c):this.toggleRow(c))}),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.table.options.selectableRows!==!0&&u.length>this.table.options.selectableRows&&(u=u.slice(0,this.table.options.selectableRows)),this.selectRows(u)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}checkRowSelectability(e){return e&&e.type==="row"?this.table.options.selectableRowsCheck.call(this.table,e.getComponent()):!1}toggleRow(e){this.checkRowSelectability(e)&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}selectRows(e){var t=[],i,r;switch(typeof e){case"undefined":i=this.table.rowManager.rows;break;case"number":i=this.table.rowManager.findRow(e);break;case"string":i=this.table.rowManager.findRow(e),i||(i=this.table.rowManager.getRows(e));break;default:i=e;break}Array.isArray(i)?i.length&&(i.forEach(s=>{r=this._selectRow(s,!0,!0),r&&t.push(r)}),this._rowSelectionChanged(!1,t)):i&&this._selectRow(i,!1,!0)}_selectRow(e,t,i){if(!isNaN(this.table.options.selectableRows)&&this.table.options.selectableRows!==!0&&!i&&this.selectedRows.length>=this.table.options.selectableRows)if(this.table.options.selectableRowsRollingSelection)this._deselectRow(this.selectedRows[0]);else return!1;var r=this.table.rowManager.findRow(e);if(r){if(this.selectedRows.indexOf(r)==-1)return r.getElement().classList.add("tabulator-selected"),r.modules.select||(r.modules.select={}),r.modules.select.selected=!0,r.modules.select.checkboxEl&&(r.modules.select.checkboxEl.checked=!0),this.selectedRows.push(r),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(r,!0),this.dispatchExternal("rowSelected",r.getComponent()),this._rowSelectionChanged(t,r),r}else t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}isRowSelected(e){return this.selectedRows.indexOf(e)!==-1}deselectRows(e,t){var i=[],r,s;switch(typeof e){case"undefined":r=Object.assign([],this.selectedRows);break;case"number":r=this.table.rowManager.findRow(e);break;case"string":r=this.table.rowManager.findRow(e),r||(r=this.table.rowManager.getRows(e));break;default:r=e;break}Array.isArray(r)?r.length&&(r.forEach(a=>{s=this._deselectRow(a,!0,!0),s&&i.push(s)}),this._rowSelectionChanged(t,[],i)):r&&this._deselectRow(r,t,!0)}_deselectRow(e,t){var i=this,r=i.table.rowManager.findRow(e),s,a;if(r){if(s=i.selectedRows.findIndex(function(o){return o==r}),s>-1)return a=r.getElement(),a&&a.classList.remove("tabulator-selected"),r.modules.select||(r.modules.select={}),r.modules.select.selected=!1,r.modules.select.checkboxEl&&(r.modules.select.checkboxEl.checked=!1),i.selectedRows.splice(s,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(r,!1),this.dispatchExternal("rowDeselected",r.getComponent()),i._rowSelectionChanged(t,void 0,r),r}else t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}getSelectedData(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e}getSelectedRows(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e}_rowSelectionChanged(e,t=[],i=[]){this.headerCheckboxElement&&(this.selectedRows.length===0?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||(Array.isArray(t)||(t=[t]),t=t.map(r=>r.getComponent()),Array.isArray(i)||(i=[i]),i=i.map(r=>r.getComponent()),this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows(),t,i))}registerRowSelectCheckbox(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}registerHeaderSelectCheckbox(e){this.headerCheckboxElement=e}childRowSelection(e,t){var i=this.table.modules.dataTree.getChildren(e,!0,!0);if(t)for(let r of i)this._selectRow(r,!0);else for(let r of i)this._deselectRow(r,!0)}}class pE{constructor(e){return this._range=e,new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._range.table.componentFunctionBinder.handle("range",t._range,i)}})}getElement(){return this._range.element}getData(){return this._range.getData()}getCells(){return this._range.getCells(!0,!0)}getStructuredCells(){return this._range.getStructuredCells()}getRows(){return this._range.getRows().map(e=>e.getComponent())}getColumns(){return this._range.getColumns().map(e=>e.getComponent())}getBounds(){return this._range.getBounds()}getTopEdge(){return this._range.top}getBottomEdge(){return this._range.bottom}getLeftEdge(){return this._range.left}getRightEdge(){return this._range.right}setBounds(e,t){this._range.destroyedGuard("setBounds")&&this._range.setBounds(e&&e._cell,t&&t._cell)}setStartBound(e){this._range.destroyedGuard("setStartBound")&&(this._range.setEndBound(e&&e._cell),this._range.rangeManager.layoutElement())}setEndBound(e){this._range.destroyedGuard("setEndBound")&&(this._range.setEndBound(e&&e._cell),this._range.rangeManager.layoutElement())}clearValues(){this._range.destroyedGuard("clearValues")&&this._range.clearValues()}remove(){this._range.destroyedGuard("remove")&&this._range.destroy(!0)}}class mE extends rt{constructor(e,t,i,r){super(e),this.rangeManager=t,this.element=null,this.initialized=!1,this.initializing={start:!1,end:!1},this.destroyed=!1,this.top=0,this.bottom=0,this.left=0,this.right=0,this.table=e,this.start={row:0,col:0},this.end={row:0,col:0},this.rangeManager.rowHeader&&(this.left=1,this.right=1,this.start.col=1,this.end.col=1),this.initElement(),setTimeout(()=>{this.initBounds(i,r)})}initElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-range")}initBounds(e,t){this._updateMinMax(),e&&this.setBounds(e,t||e)}setStart(e,t){(this.start.row!==e||this.start.col!==t)&&(this.start.row=e,this.start.col=t,this.initializing.start=!0,this._updateMinMax())}setEnd(e,t){(this.end.row!==e||this.end.col!==t)&&(this.end.row=e,this.end.col=t,this.initializing.end=!0,this._updateMinMax())}setBounds(e,t,i){e&&this.setStartBound(e),this.setEndBound(t||e),this.rangeManager.layoutElement(i)}setStartBound(e){var t,i;e.type==="column"?this.rangeManager.columnSelection&&this.setStart(0,e.getPosition()-1):(t=e.row.position-1,i=e.column.getPosition()-1,e.column===this.rangeManager.rowHeader?this.setStart(t,1):this.setStart(t,i))}setEndBound(e){var t=this._getTableRows().length,i,r,s;e.type==="column"?this.rangeManager.columnSelection&&(this.rangeManager.selecting==="column"?this.setEnd(t-1,e.getPosition()-1):this.rangeManager.selecting==="cell"&&this.setEnd(0,e.getPosition()-1)):(i=e.row.position-1,r=e.column.getPosition()-1,s=e.column===this.rangeManager.rowHeader,this.rangeManager.selecting==="row"?this.setEnd(i,this._getTableColumns().length-1):this.rangeManager.selecting!=="row"&&s?this.setEnd(i,0):this.rangeManager.selecting==="column"?this.setEnd(t-1,r):this.setEnd(i,r))}_updateMinMax(){this.top=Math.min(this.start.row,this.end.row),this.bottom=Math.max(this.start.row,this.end.row),this.left=Math.min(this.start.col,this.end.col),this.right=Math.max(this.start.col,this.end.col),this.initialized?this.dispatchExternal("rangeChanged",this.getComponent()):this.initializing.start&&this.initializing.end&&(this.initialized=!0,this.dispatchExternal("rangeAdded",this.getComponent()))}_getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}_getTableRows(){return this.table.rowManager.getDisplayRows().filter(e=>e.type==="row")}layout(){var e=this.table.rowManager.renderer.vDomTop,t=this.table.rowManager.renderer.vDomBottom,i=this.table.columnManager.renderer.leftCol,r=this.table.columnManager.renderer.rightCol,s,a,o,u,c,d,p,h,f,_;this.table.options.renderHorizontal==="virtual"&&this.rangeManager.rowHeader&&(r+=1),e==null&&(e=0),t==null&&(t=1/0),i==null&&(i=0),r==null&&(r=1/0),this.overlaps(i,e,r,t)&&(s=Math.max(this.top,e),a=Math.min(this.bottom,t),o=Math.max(this.left,i),u=Math.min(this.right,r),c=this.rangeManager.getCell(s,o),d=this.rangeManager.getCell(a,u),p=c.getElement(),h=d.getElement(),f=c.row.getElement(),_=d.row.getElement(),this.element.classList.add("tabulator-range-active"),this.table.rtl?(this.element.style.right=f.offsetWidth-p.offsetLeft-p.offsetWidth+"px",this.element.style.width=p.offsetLeft+p.offsetWidth-h.offsetLeft+"px"):(this.element.style.left=f.offsetLeft+p.offsetLeft+"px",this.element.style.width=h.offsetLeft+h.offsetWidth-p.offsetLeft+"px"),this.element.style.top=f.offsetTop+"px",this.element.style.height=_.offsetTop+_.offsetHeight-f.offsetTop+"px")}atTopLeft(e){return e.row.position-1===this.top&&e.column.getPosition()-1===this.left}atBottomRight(e){return e.row.position-1===this.bottom&&e.column.getPosition()-1===this.right}occupies(e){return this.occupiesRow(e.row)&&this.occupiesColumn(e.column)}occupiesRow(e){return this.top<=e.position-1&&e.position-1<=this.bottom}occupiesColumn(e){return this.left<=e.getPosition()-1&&e.getPosition()-1<=this.right}overlaps(e,t,i,r){return!(this.left>i||e>this.right||this.top>r||t>this.bottom)}getData(){var e=[],t=this.getRows(),i=this.getColumns();return t.forEach(r=>{var s=r.getData(),a={};i.forEach(o=>{a[o.field]=s[o.field]}),e.push(a)}),e}getCells(e,t){var i=[],r=this.getRows(),s=this.getColumns();return e?i=r.map(a=>{var o=[];return a.getCells().forEach(u=>{s.includes(u.column)&&o.push(t?u.getComponent():u)}),o}):r.forEach(a=>{a.getCells().forEach(o=>{s.includes(o.column)&&i.push(t?o.getComponent():o)})}),i}getStructuredCells(){return this.getCells(!0,!0)}getRows(){return this._getTableRows().slice(this.top,this.bottom+1)}getColumns(){return this._getTableColumns().slice(this.left,this.right+1)}clearValues(){var e=this.getCells(),t=this.table.options.selectableRangeClearCellsValue;this.table.blockRedraw(),e.forEach(i=>{i.setValue(t)}),this.table.restoreRedraw()}getBounds(e){var t=this.getCells(!1,e),i={start:null,end:null};return t.length?(i.start=t[0],i.end=t[t.length-1]):console.warn("No bounds defined on range"),i}getComponent(){return this.component||(this.component=new pE(this)),this.component}destroy(e){this.destroyed=!0,this.element.remove(),e&&this.rangeManager.rangeRemoved(this),this.initialized&&this.dispatchExternal("rangeRemoved",this.getComponent())}destroyedGuard(e){return this.destroyed&&console.warn("You cannot call the "+e+" function on a destroyed range"),!this.destroyed}}var gE={rangeJumpUp:["ctrl + 38","meta + 38"],rangeJumpDown:["ctrl + 40","meta + 40"],rangeJumpLeft:["ctrl + 37","meta + 37"],rangeJumpRight:["ctrl + 39","meta + 39"],rangeExpandUp:"shift + 38",rangeExpandDown:"shift + 40",rangeExpandLeft:"shift + 37",rangeExpandRight:"shift + 39",rangeExpandJumpUp:["ctrl + shift + 38","meta + shift + 38"],rangeExpandJumpDown:["ctrl + shift + 40","meta + shift + 40"],rangeExpandJumpLeft:["ctrl + shift + 37","meta + shift + 37"],rangeExpandJumpRight:["ctrl + shift + 39","meta + shift + 39"]},bE={rangeJumpLeft:function(n){this.dispatch("keybinding-nav-range",n,"left",!0,!1)},rangeJumpRight:function(n){this.dispatch("keybinding-nav-range",n,"right",!0,!1)},rangeJumpUp:function(n){this.dispatch("keybinding-nav-range",n,"up",!0,!1)},rangeJumpDown:function(n){this.dispatch("keybinding-nav-range",n,"down",!0,!1)},rangeExpandLeft:function(n){this.dispatch("keybinding-nav-range",n,"left",!1,!0)},rangeExpandRight:function(n){this.dispatch("keybinding-nav-range",n,"right",!1,!0)},rangeExpandUp:function(n){this.dispatch("keybinding-nav-range",n,"up",!1,!0)},rangeExpandDown:function(n){this.dispatch("keybinding-nav-range",n,"down",!1,!0)},rangeExpandJumpLeft:function(n){this.dispatch("keybinding-nav-range",n,"left",!0,!0)},rangeExpandJumpRight:function(n){this.dispatch("keybinding-nav-range",n,"right",!0,!0)},rangeExpandJumpUp:function(n){this.dispatch("keybinding-nav-range",n,"up",!0,!0)},rangeExpandJumpDown:function(n){this.dispatch("keybinding-nav-range",n,"down",!0,!0)}},vE={range:function(n){var e=[],t=this.table.modules.selectRange.activeRange,i=!1,r,s,a,o,u;return u=n.length,t&&(r=t.getBounds(),s=r.start,r.start===r.end&&(i=!0),s&&(e=this.table.rowManager.activeRows.slice(),a=e.indexOf(s.row),i?o=n.length:o=e.indexOf(r.end.row)-a+1,a>-1&&(this.table.blockRedraw(),e=e.slice(a,a+o),e.forEach((c,d)=>{c.updateData(n[d%u])}),this.table.restoreRedraw()))),e}},yE={range:function(n){var e=[],t=[],i=this.table.modules.selectRange.activeRange,r=!1,s,a,o,u,c;return i&&(s=i.getBounds(),a=s.start,s.start===s.end&&(r=!0),a&&(n=n.split(`
47
- `),n.forEach(function(d){e.push(d.split(" "))}),e.length&&(u=this.table.columnManager.getVisibleColumnsByIndex(),c=u.indexOf(a.column),c>-1)))?(r?o=e[0].length:o=u.indexOf(s.end.column)-c+1,u=u.slice(c,c+o),e.forEach(d=>{var p={},h=d.length;u.forEach(function(f,_){p[f.field]=d[_%h]}),t.push(p)}),t):!1}},wE={range:function(){var n=this.modules.selectRange.selectedColumns();return this.columnManager.rowHeader&&n.unshift(this.columnManager.rowHeader),n}},CE={range:function(){return this.modules.selectRange.selectedRows()}},EE={keybindings:{bindings:gE,actions:bE},clipboard:{pasteActions:vE,pasteParsers:yE},export:{columnLookups:wE,rowLookups:CE}};class kE extends Pe{static moduleName="selectRange";static moduleInitOrder=1;static moduleExtensions=EE;constructor(e){super(e),this.selecting="cell",this.mousedown=!1,this.ranges=[],this.overlay=null,this.rowHeader=null,this.layoutChangeTimeout=null,this.columnSelection=!1,this.rowSelection=!1,this.maxRanges=0,this.activeRange=!1,this.blockKeydown=!1,this.keyDownEvent=this._handleKeyDown.bind(this),this.mouseUpEvent=this._handleMouseUp.bind(this),this.registerTableOption("selectableRange",!1),this.registerTableOption("selectableRangeColumns",!1),this.registerTableOption("selectableRangeRows",!1),this.registerTableOption("selectableRangeClearCells",!1),this.registerTableOption("selectableRangeClearCellsValue",void 0),this.registerTableOption("selectableRangeAutoFocus",!0),this.registerTableFunction("getRangesData",this.getRangesData.bind(this)),this.registerTableFunction("getRanges",this.getRanges.bind(this)),this.registerTableFunction("addRange",this.addRangeFromComponent.bind(this)),this.registerComponentFunction("cell","getRanges",this.cellGetRanges.bind(this)),this.registerComponentFunction("row","getRanges",this.rowGetRanges.bind(this)),this.registerComponentFunction("column","getRanges",this.colGetRanges.bind(this))}initialize(){this.options("selectableRange")&&(this.options("selectableRows")?console.warn("SelectRange functionality cannot be used in conjunction with row selection"):(this.maxRanges=this.options("selectableRange"),this.initializeTable(),this.initializeWatchers()),this.options("columns").findIndex(e=>e.frozen)>0&&console.warn("Having frozen column in arbitrary position with selectRange option may result in unpredictable behavior."),this.options("columns").filter(e=>e.frozen)>1&&console.warn("Having multiple frozen columns with selectRange option may result in unpredictable behavior."))}initializeTable(){this.overlay=document.createElement("div"),this.overlay.classList.add("tabulator-range-overlay"),this.rangeContainer=document.createElement("div"),this.rangeContainer.classList.add("tabulator-range-container"),this.activeRangeCellElement=document.createElement("div"),this.activeRangeCellElement.classList.add("tabulator-range-cell-active"),this.overlay.appendChild(this.rangeContainer),this.overlay.appendChild(this.activeRangeCellElement),this.table.rowManager.element.addEventListener("keydown",this.keyDownEvent),this.resetRanges(),this.table.rowManager.element.appendChild(this.overlay),this.table.columnManager.element.setAttribute("tabindex",0),this.table.element.classList.add("tabulator-ranges")}initializeWatchers(){this.columnSelection=this.options("selectableRangeColumns"),this.rowSelection=this.options("selectableRangeRows"),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-mousedown",this.handleColumnMouseDown.bind(this)),this.subscribe("column-mousemove",this.handleColumnMouseMove.bind(this)),this.subscribe("column-resized",this.handleColumnResized.bind(this)),this.subscribe("column-moving",this.handleColumnMoving.bind(this)),this.subscribe("column-moved",this.handleColumnMoved.bind(this)),this.subscribe("column-width",this.layoutChange.bind(this)),this.subscribe("column-height",this.layoutChange.bind(this)),this.subscribe("column-resized",this.layoutChange.bind(this)),this.subscribe("columns-loaded",this.updateHeaderColumn.bind(this)),this.subscribe("cell-height",this.layoutChange.bind(this)),this.subscribe("cell-rendered",this.renderCell.bind(this)),this.subscribe("cell-mousedown",this.handleCellMouseDown.bind(this)),this.subscribe("cell-mousemove",this.handleCellMouseMove.bind(this)),this.subscribe("cell-click",this.handleCellClick.bind(this)),this.subscribe("cell-editing",this.handleEditingCell.bind(this)),this.subscribe("page-changed",this.redraw.bind(this)),this.subscribe("scroll-vertical",this.layoutChange.bind(this)),this.subscribe("scroll-horizontal",this.layoutChange.bind(this)),this.subscribe("data-destroy",this.tableDestroyed.bind(this)),this.subscribe("data-processed",this.resetRanges.bind(this)),this.subscribe("table-layout",this.layoutElement.bind(this)),this.subscribe("table-redraw",this.redraw.bind(this)),this.subscribe("table-destroy",this.tableDestroyed.bind(this)),this.subscribe("edit-editor-clear",this.finishEditingCell.bind(this)),this.subscribe("edit-blur",this.restoreFocus.bind(this)),this.subscribe("keybinding-nav-prev",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-next",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-left",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-right",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-up",this.keyNavigate.bind(this,"up")),this.subscribe("keybinding-nav-down",this.keyNavigate.bind(this,"down")),this.subscribe("keybinding-nav-range",this.keyNavigateRange.bind(this))}initializeColumn(e){this.columnSelection&&e.definition.headerSort&&this.options("headerSortClickElement")!=="icon"&&console.warn("Using column headerSort with selectableRangeColumns option may result in unpredictable behavior. Consider using headerSortClickElement: 'icon'."),e.modules.edit}updateHeaderColumn(){var e;this.rowSelection&&(this.rowHeader=this.table.columnManager.getVisibleColumnsByIndex()[0],this.rowHeader&&(this.rowHeader.definition.cssClass=this.rowHeader.definition.cssClass+" tabulator-range-row-header",this.rowHeader.definition.headerSort&&console.warn("Using column headerSort with selectableRangeRows option may result in unpredictable behavior"),this.rowHeader.definition.editor&&console.warn("Using column editor with selectableRangeRows option may result in unpredictable behavior"))),this.table.modules.frozenColumns&&this.table.modules.frozenColumns.active&&(e=this.table.modules.frozenColumns.getFrozenColumns(),(e.length>1||e.length===1&&e[0]!==this.rowHeader)&&console.warn("Using frozen columns that are not the range header in combination with the selectRange option may result in unpredictable behavior"))}getRanges(){return this.ranges.map(e=>e.getComponent())}getRangesData(){return this.ranges.map(e=>e.getData())}addRangeFromComponent(e,t){return e=e?e._cell:null,t=t?t._cell:null,this.addRange(e,t)}cellGetRanges(e){var t=[];return e.column===this.rowHeader?t=this.ranges.filter(i=>i.occupiesRow(e.row)):t=this.ranges.filter(i=>i.occupies(e)),t.map(i=>i.getComponent())}rowGetRanges(e){var t=this.ranges.filter(i=>i.occupiesRow(e));return t.map(i=>i.getComponent())}colGetRanges(e){var t=this.ranges.filter(i=>i.occupiesColumn(e));return t.map(i=>i.getComponent())}_handleMouseUp(e){this.mousedown=!1,document.removeEventListener("mouseup",this.mouseUpEvent)}_handleKeyDown(e){if(!this.blockKeydown&&(!this.table.modules.edit||this.table.modules.edit&&!this.table.modules.edit.currentCell)){if(e.key==="Enter"){if(this.table.modules.edit&&this.table.modules.edit.currentCell)return;this.table.modules.edit.editCell(this.getActiveCell()),e.preventDefault()}(e.key==="Backspace"||e.key==="Delete")&&this.options("selectableRangeClearCells")&&this.activeRange&&this.activeRange.clearValues()}}initializeFocus(e){var t;this.restoreFocus();try{document.selection?(t=document.body.createTextRange(),t.moveToElementText(e.getElement()),t.select()):window.getSelection&&(t=document.createRange(),t.selectNode(e.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(t))}catch{}}restoreFocus(e){return this.table.rowManager.element.focus(),!0}handleColumnResized(e){var t;this.selecting!=="column"&&this.selecting!=="all"||(t=this.ranges.some(i=>i.occupiesColumn(e)),t&&this.ranges.forEach(i=>{var r=i.getColumns(!0);r.forEach(s=>{s!==e&&s.setWidth(e.width)})}))}handleColumnMoving(e,t){this.resetRanges().setBounds(t),this.overlay.style.visibility="hidden"}handleColumnMoved(e,t,i){this.activeRange.setBounds(e),this.layoutElement()}handleColumnMouseDown(e,t){e.button===2&&(this.selecting==="column"||this.selecting==="all")&&this.activeRange.occupiesColumn(t)||this.table.options.movableColumns&&this.selecting==="column"&&this.activeRange.occupiesColumn(t)||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleColumnMouseMove(e,t){t===this.rowHeader||!this.mousedown||this.selecting==="all"||this.activeRange.setBounds(!1,t,!0)}renderCell(e){var t=e.getElement(),i=this.ranges.findIndex(r=>r.occupies(e));t.classList.toggle("tabulator-range-selected",i!==-1),t.classList.toggle("tabulator-range-only-cell-selected",this.ranges.length===1&&this.ranges[0].atTopLeft(e)&&this.ranges[0].atBottomRight(e)),t.dataset.range=i}handleCellMouseDown(e,t){e.button===2&&(this.activeRange.occupies(t)||(this.selecting==="row"||this.selecting==="all")&&this.activeRange.occupiesRow(t.row))||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleCellMouseMove(e,t){!this.mousedown||this.selecting==="all"||this.activeRange.setBounds(!1,t,!0)}handleCellClick(e,t){this.initializeFocus(t)}handleEditingCell(e){this.activeRange&&this.activeRange.setBounds(e)}finishEditingCell(){this.blockKeydown=!0,this.table.rowManager.element.focus(),setTimeout(()=>{this.blockKeydown=!1},10)}keyNavigate(e,t){this.navigate(!1,!1,e),t.preventDefault()}keyNavigateRange(e,t,i,r){this.navigate(i,r,t),e.preventDefault()}navigate(e,t,i){var r=!1,s,a,o,u,c,d,p,h,f,_,k;if(this.table.modules.edit&&this.table.modules.edit.currentCell)return!1;if(this.ranges.length>1&&(this.ranges=this.ranges.filter(C=>C===this.activeRange?(C.setEnd(C.start.row,C.start.col),!0):(C.destroy(),!1))),s=this.activeRange,o={top:s.top,bottom:s.bottom,left:s.left,right:s.right},a=t?s.end:s.start,u=a.row,c=a.col,e)switch(i){case"left":c=this.findJumpCellLeft(s.start.row,a.col);break;case"right":c=this.findJumpCellRight(s.start.row,a.col);break;case"up":u=this.findJumpCellUp(a.row,s.start.col);break;case"down":u=this.findJumpCellDown(a.row,s.start.col);break}else{if(t&&(this.selecting==="row"&&(i==="left"||i==="right")||this.selecting==="column"&&(i==="up"||i==="down")))return;switch(i){case"left":c=Math.max(c-1,0);break;case"right":c=Math.min(c+1,this.getTableColumns().length-1);break;case"up":u=Math.max(u-1,0);break;case"down":u=Math.min(u+1,this.getTableRows().length-1);break}}if(this.rowHeader&&c===0&&(c=1),t||s.setStart(u,c),s.setEnd(u,c),t||(this.selecting="cell"),r=o.top!==s.top||o.bottom!==s.bottom||o.left!==s.left||o.right!==s.right,r)return d=this.getRowByRangePos(s.end.row),p=this.getColumnByRangePos(s.end.col),h=d.getElement().getBoundingClientRect(),_=p.getElement().getBoundingClientRect(),f=this.table.rowManager.getElement().getBoundingClientRect(),k=this.table.columnManager.getElement().getBoundingClientRect(),h.top>=f.top&&h.bottom<=f.bottom||(d.getElement().parentNode&&p.getElement().parentNode?this.autoScroll(s,d.getElement(),p.getElement()):d.getComponent().scrollTo(void 0,!1)),_.left>=k.left+this.getRowHeaderWidth()&&_.right<=k.right||(d.getElement().parentNode&&p.getElement().parentNode?this.autoScroll(s,d.getElement(),p.getElement()):p.getComponent().scrollTo(void 0,!1)),this.layoutElement(),!0}rangeRemoved(e){this.ranges=this.ranges.filter(t=>t!==e),this.activeRange===e&&(this.ranges.length?this.activeRange=this.ranges[this.ranges.length-1]:this.addRange()),this.layoutElement()}findJumpRow(e,t,i,r,s){return i&&(t=t.reverse()),this.findJumpItem(r,s,t,function(a){return a.getData()[e.getField()]})}findJumpCol(e,t,i,r,s){return i&&(t=t.reverse()),this.findJumpItem(r,s,t,function(a){return e.getData()[a.getField()]})}findJumpItem(e,t,i,r){var s;for(let a of i){let o=r(a);if(e){if(s=a,o)break}else if(t){if(s=a,o)break}else if(o)s=a;else break}return s}findJumpCellLeft(e,t){var i=this.getRowByRangePos(e),r=this.getTableColumns(),s=this.isEmpty(i.getData()[r[t].getField()]),a=r[t-1]?this.isEmpty(i.getData()[r[t-1].getField()]):!1,o=this.rowHeader?r.slice(1,t):r.slice(0,t),u=this.findJumpCol(i,o,!0,s,a);return u?u.getPosition()-1:t}findJumpCellRight(e,t){var i=this.getRowByRangePos(e),r=this.getTableColumns(),s=this.isEmpty(i.getData()[r[t].getField()]),a=r[t+1]?this.isEmpty(i.getData()[r[t+1].getField()]):!1,o=this.findJumpCol(i,r.slice(t+1,r.length),!1,s,a);return o?o.getPosition()-1:t}findJumpCellUp(e,t){var i=this.getColumnByRangePos(t),r=this.getTableRows(),s=this.isEmpty(r[e].getData()[i.getField()]),a=r[e-1]?this.isEmpty(r[e-1].getData()[i.getField()]):!1,o=this.findJumpRow(i,r.slice(0,e),!0,s,a);return o?o.position-1:e}findJumpCellDown(e,t){var i=this.getColumnByRangePos(t),r=this.getTableRows(),s=this.isEmpty(r[e].getData()[i.getField()]),a=r[e+1]?this.isEmpty(r[e+1].getData()[i.getField()]):!1,o=this.findJumpRow(i,r.slice(e+1,r.length),!1,s,a);return o?o.position-1:e}newSelection(e,t){var i;if(t.type==="column"){if(!this.columnSelection)return;if(t===this.rowHeader){i=this.resetRanges(),this.selecting="all";var r,s=this.getCell(-1,-1);this.rowHeader?r=this.getCell(0,1):r=this.getCell(0,0),i.setBounds(r,s);return}else this.selecting="column"}else t.column===this.rowHeader?this.selecting="row":this.selecting="cell";e.shiftKey?this.activeRange.setBounds(!1,t):e.ctrlKey?this.addRange().setBounds(t):this.resetRanges().setBounds(t)}autoScroll(e,t,i){var r=this.table.rowManager.element,s,a,o,u;typeof t>"u"&&(t=this.getRowByRangePos(e.end.row).getElement()),typeof i>"u"&&(i=this.getColumnByRangePos(e.end.col).getElement()),s={left:i.offsetLeft,right:i.offsetLeft+i.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight},a={left:r.scrollLeft+this.getRowHeaderWidth(),right:Math.ceil(r.scrollLeft+r.clientWidth),top:r.scrollTop,bottom:r.scrollTop+r.offsetHeight-this.table.rowManager.scrollbarWidth},o=a.left<s.left&&s.left<a.right&&a.left<s.right&&s.right<a.right,u=a.top<s.top&&s.top<a.bottom&&a.top<s.bottom&&s.bottom<a.bottom,o||(s.left<a.left?r.scrollLeft=s.left-this.getRowHeaderWidth():s.right>a.right&&(r.scrollLeft=Math.min(s.right-r.clientWidth,s.left-this.getRowHeaderWidth()))),u||(s.top<a.top?r.scrollTop=s.top:s.bottom>a.bottom&&(r.scrollTop=s.bottom-r.clientHeight))}layoutChange(){this.overlay.style.visibility="hidden",clearTimeout(this.layoutChangeTimeout),this.layoutChangeTimeout=setTimeout(this.layoutRanges.bind(this),200)}redraw(e){e&&(this.selecting="cell",this.resetRanges(),this.layoutElement())}layoutElement(e){var t;e?t=this.table.rowManager.getVisibleRows(!0):t=this.table.rowManager.getRows(),t.forEach(i=>{i.type==="row"&&(this.layoutRow(i),i.cells.forEach(r=>this.renderCell(r)))}),this.getTableColumns().forEach(i=>{this.layoutColumn(i)}),this.layoutRanges()}layoutRow(e){var t=e.getElement(),i=!1,r=this.ranges.some(s=>s.occupiesRow(e));this.selecting==="row"?i=r:this.selecting==="all"&&(i=!0),t.classList.toggle("tabulator-range-selected",i),t.classList.toggle("tabulator-range-highlight",r)}layoutColumn(e){var t=e.getElement(),i=!1,r=this.ranges.some(s=>s.occupiesColumn(e));this.selecting==="column"?i=r:this.selecting==="all"&&(i=!0),t.classList.toggle("tabulator-range-selected",i),t.classList.toggle("tabulator-range-highlight",r)}layoutRanges(){var e,t,i;this.table.initialized&&(e=this.getActiveCell(),e&&(t=e.getElement(),i=e.row.getElement(),this.table.rtl?this.activeRangeCellElement.style.right=i.offsetWidth-t.offsetLeft-t.offsetWidth+"px":this.activeRangeCellElement.style.left=i.offsetLeft+t.offsetLeft+"px",this.activeRangeCellElement.style.top=i.offsetTop+"px",this.activeRangeCellElement.style.width=t.offsetWidth+"px",this.activeRangeCellElement.style.height=i.offsetHeight+"px",this.ranges.forEach(r=>r.layout()),this.overlay.style.visibility="visible"))}getCell(e,t){var i;return t<0&&(t=this.getTableColumns().length+t,t<0)?null:(e<0&&(e=this.getTableRows().length+e),i=this.table.rowManager.getRowFromPosition(e+1),i?i.getCells(!1,!0).filter(r=>r.column.visible)[t]:null)}getActiveCell(){return this.getCell(this.activeRange.start.row,this.activeRange.start.col)}getRowByRangePos(e){return this.getTableRows()[e]}getColumnByRangePos(e){return this.getTableColumns()[e]}getTableRows(){return this.table.rowManager.getDisplayRows().filter(e=>e.type==="row")}getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}addRange(e,t){var i;return this.maxRanges!==!0&&this.ranges.length>=this.maxRanges&&this.ranges.shift().destroy(),i=new mE(this.table,this,e,t),this.activeRange=i,this.ranges.push(i),this.rangeContainer.appendChild(i.element),i}resetRanges(){var e,t,i;return this.ranges.forEach(r=>r.destroy()),this.ranges=[],e=this.addRange(),this.table.rowManager.activeRows.length&&(i=this.table.rowManager.activeRows[0].cells.filter(r=>r.column.visible),t=i[this.rowHeader?1:0],t&&(e.setBounds(t),this.options("selectableRangeAutoFocus")&&this.initializeFocus(t))),e}tableDestroyed(){document.removeEventListener("mouseup",this.mouseUpEvent),this.table.rowManager.element.removeEventListener("keydown",this.keyDownEvent)}selectedRows(e){return e?this.activeRange.getRows().map(t=>t.getComponent()):this.activeRange.getRows()}selectedColumns(e){return e?this.activeRange.getColumns().map(t=>t.getComponent()):this.activeRange.getColumns()}getRowHeaderWidth(){return this.rowHeader?this.rowHeader.getElement().offsetWidth:0}isEmpty(e){return e==null||e===""}}function SE(n,e,t,i,r,s,a){var o=a.alignEmptyValues,u=a.decimalSeparator,c=a.thousandSeparator,d=0;if(n=String(n),e=String(e),c&&(n=n.split(c).join(""),e=e.split(c).join("")),u&&(n=n.split(u).join("."),e=e.split(u).join(".")),n=parseFloat(n),e=parseFloat(e),isNaN(n))d=isNaN(e)?0:-1;else if(isNaN(e))d=1;else return n-e;return(o==="top"&&s==="desc"||o==="bottom"&&s==="asc")&&(d*=-1),d}function xE(n,e,t,i,r,s,a){var o=a.alignEmptyValues,u=0,c;if(!n)u=e?-1:0;else if(!e)u=1;else{switch(typeof a.locale){case"boolean":a.locale&&(c=this.langLocale());break;case"string":c=a.locale;break}return String(n).toLowerCase().localeCompare(String(e).toLowerCase(),c)}return(o==="top"&&s==="desc"||o==="bottom"&&s==="asc")&&(u*=-1),u}function ma(n,e,t,i,r,s,a){var o=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),u=a.format||"dd/MM/yyyy HH:mm:ss",c=a.alignEmptyValues,d=0;if(typeof o<"u"){if(o.isDateTime(n)||(u==="iso"?n=o.fromISO(String(n)):n=o.fromFormat(String(n),u)),o.isDateTime(e)||(u==="iso"?e=o.fromISO(String(e)):e=o.fromFormat(String(e),u)),!n.isValid)d=e.isValid?-1:0;else if(!e.isValid)d=1;else return n-e;return(c==="top"&&s==="desc"||c==="bottom"&&s==="asc")&&(d*=-1),d}else console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}function _E(n,e,t,i,r,s,a){return a.format||(a.format="dd/MM/yyyy"),ma.call(this,n,e,t,i,r,s,a)}function ME(n,e,t,i,r,s,a){return a.format||(a.format="HH:mm"),ma.call(this,n,e,t,i,r,s,a)}function RE(n,e,t,i,r,s,a){var o=n===!0||n==="true"||n==="True"||n===1?1:0,u=e===!0||e==="true"||e==="True"||e===1?1:0;return o-u}function TE(n,e,t,i,r,s,a){var o=a.type||"length",u=a.alignEmptyValues,c=0,d=this.table,p;a.valueMap&&(typeof a.valueMap=="string"?p=function(f){return f.map(_=>Ke.retrieveNestedData(d.options.nestedFieldSeparator,a.valueMap,_))}:p=a.valueMap);function h(f){var _;switch(p&&(f=p(f)),o){case"length":_=f.length;break;case"sum":_=f.reduce(function(k,C){return k+C});break;case"max":_=Math.max.apply(null,f);break;case"min":_=Math.min.apply(null,f);break;case"avg":_=f.reduce(function(k,C){return k+C})/f.length;break;case"string":_=f.join("");break}return _}if(!Array.isArray(n))c=Array.isArray(e)?-1:0;else if(!Array.isArray(e))c=1;else return o==="string"?String(h(n)).toLowerCase().localeCompare(String(h(e)).toLowerCase()):h(e)-h(n);return(u==="top"&&s==="desc"||u==="bottom"&&s==="asc")&&(c*=-1),c}function DE(n,e,t,i,r,s,a){var o=typeof n>"u"?0:1,u=typeof e>"u"?0:1;return o-u}function OE(n,e,t,i,r,s,a){var o,u,c,d,p=0,h,f=/(\d+)|(\D+)/g,_=/\d/,k=a.alignEmptyValues,C=0;if(!n&&n!==0)C=!e&&e!==0?0:-1;else if(!e&&e!==0)C=1;else{if(isFinite(n)&&isFinite(e))return n-e;if(o=String(n).toLowerCase(),u=String(e).toLowerCase(),o===u)return 0;if(!(_.test(o)&&_.test(u)))return o>u?1:-1;for(o=o.match(f),u=u.match(f),h=o.length>u.length?u.length:o.length;p<h;)if(c=o[p],d=u[p++],c!==d)return isFinite(c)&&isFinite(d)?(c.charAt(0)==="0"&&(c="."+c),d.charAt(0)==="0"&&(d="."+d),c-d):c>d?1:-1;return o.length>u.length}return(k==="top"&&s==="desc"||k==="bottom"&&s==="asc")&&(C*=-1),C}var LE={number:SE,string:xE,date:_E,time:ME,datetime:ma,boolean:RE,array:TE,exists:DE,alphanum:OE};class hn extends Pe{static moduleName="sort";static sorters=LE;constructor(e){super(e),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","<div class='tabulator-arrow'></div>"),this.registerTableOption("headerSortClickElement","header"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),this.table.options.sortMode==="remote"&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(e,t,i,r){var s=this.getSort();return s.forEach(a=>{delete a.column}),r.sort=s,r}userSetSort(e,t){this.setSort(e,t),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(e){var t=!1,i,r;switch(typeof e.definition.sorter){case"string":hn.sorters[e.definition.sorter]?t=hn.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":t=e.definition.sorter;break}if(e.modules.sort={sorter:t,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},e.definition.headerSort!==!1){switch(i=e.getElement(),i.classList.add("tabulator-sortable"),r=document.createElement("div"),r.classList.add("tabulator-col-sorter"),this.table.options.headerSortClickElement){case"icon":r.classList.add("tabulator-col-sorter-element");break;case"header":i.classList.add("tabulator-col-sorter-element");break;default:i.classList.add("tabulator-col-sorter-element");break}switch(this.table.options.headerSortElement){case"function":break;case"object":r.appendChild(this.table.options.headerSortElement);break;default:r.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(r),e.modules.sort.element=r,this.setColumnHeaderSortIcon(e,"none"),this.table.options.headerSortClickElement==="icon"&&r.addEventListener("mousedown",s=>{s.stopPropagation()}),(this.table.options.headerSortClickElement==="icon"?r:i).addEventListener("click",s=>{var a="",o=[],u=!1;if(e.modules.sort){if(e.modules.sort.tristate)e.modules.sort.dir=="none"?a=e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?a=e.modules.sort.dir=="asc"?"desc":"asc":a="none";else switch(e.modules.sort.dir){case"asc":a="desc";break;case"desc":a="asc";break;default:a=e.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(s.shiftKey||s.ctrlKey)?(o=this.getSort(),u=o.findIndex(c=>c.field===e.getField()),u>-1?(o[u].dir=a,u=o.splice(u,1)[0],a!="none"&&o.push(u)):a!="none"&&o.push({column:e,dir:a}),this.setSort(o)):a=="none"?this.clear():this.setSort(e,a),this.refreshSort()}})}}refreshSort(){this.table.options.sortMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0)}hasChanged(){var e=this.changed;return this.changed=!1,e}getSort(){var e=this,t=[];return e.sortList.forEach(function(i){i.column&&t.push({column:i.column.getComponent(),field:i.column.getField(),dir:i.dir})}),t}setSort(e,t){var i=this,r=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(s){var a;a=i.table.columnManager.findColumn(s.column),a?(s.column=a,r.push(s),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",s.column)}),i.sortList=r,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(e){var t=this.table.rowManager.activeRows[0],i="string",r,s;if(t&&(t=t.getData(),r=e.getField(),r))switch(s=e.getFieldValue(t),typeof s){case"undefined":i="string";break;case"boolean":i="boolean";break;default:!isNaN(s)&&s!==""?i="number":s.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum");break}return hn.sorters[i]}sort(e,t){var i=this,r=this.table.options.sortOrderReverse?i.sortList.slice().reverse():i.sortList,s=[],a=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",i.getSort()),t||i.clearColumnHeaders(),this.table.options.sortMode!=="remote"?(r.forEach(function(o,u){var c;o.column&&(c=o.column.modules.sort,c&&(c.sorter||(c.sorter=i.findSorter(o.column)),o.params=typeof c.params=="function"?c.params(o.column.getComponent(),o.dir):c.params,s.push(o)),t||i.setColumnHeader(o.column,o.dir))}),s.length&&i._sortItems(e,s)):t||r.forEach(function(o,u){i.setColumnHeader(o.column,o.dir)}),this.subscribedExternal("dataSorted")&&(e.forEach(o=>{a.push(o.getComponent())}),this.dispatchExternal("dataSorted",i.getSort(),a)),e}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach(e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))})}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t==="asc"?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i=e.modules.sort.element,r;if(e.definition.headerSort&&typeof this.table.options.headerSortElement=="function"){for(;i.firstChild;)i.removeChild(i.firstChild);r=this.table.options.headerSortElement.call(this.table,e.getComponent(),t),typeof r=="object"?i.appendChild(r):i.innerHTML=r}}_sortItems(e,t){var i=t.length-1;e.sort((r,s)=>{for(var a,o=i;o>=0;o--){let u=t[o];if(a=this._sortRow(r,s,u.column,u.dir,u.params),a!==0)break}return a})}_sortRow(e,t,i,r,s){var a,o,u=r=="asc"?e:t,c=r=="asc"?t:e;return e=i.getFieldValue(u.getData()),t=i.getFieldValue(c.getData()),e=typeof e<"u"?e:"",t=typeof t<"u"?t:"",a=u.getComponent(),o=c.getComponent(),i.modules.sort.sorter.call(this,e,t,a,o,i.getComponent(),r,s)}}class PE{constructor(e,t){this.columnCount=e,this.rowCount=t,this.columnString=[],this.columns=[],this.rows=[]}genColumns(e){var t=Math.max(this.columnCount,Math.max(...e.map(i=>i.length)));this.columnString=[],this.columns=[];for(let i=1;i<=t;i++)this.incrementChar(this.columnString.length-1),this.columns.push(this.columnString.join(""));return this.columns}genRows(e){var t=Math.max(this.rowCount,e.length);this.rows=[];for(let i=1;i<=t;i++)this.rows.push(i);return this.rows}incrementChar(e){let t=this.columnString[e];t?t!=="Z"?this.columnString[e]=String.fromCharCode(this.columnString[e].charCodeAt(0)+1):(this.columnString[e]="A",e?this.incrementChar(e-1):this.columnString.push("A")):this.columnString.push("A")}setRowCount(e){this.rowCount=e}setColumnCount(e){this.columnCount=e}}class Sc{constructor(e){return this._sheet=e,new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._sheet.table.componentFunctionBinder.handle("sheet",t._sheet,i)}})}getTitle(){return this._sheet.title}getKey(){return this._sheet.key}getDefinition(){return this._sheet.getDefinition()}getData(){return this._sheet.getData()}setData(e){return this._sheet.setData(e)}clear(){return this._sheet.clear()}remove(){return this._sheet.remove()}active(){return this._sheet.active()}setTitle(e){return this._sheet.setTitle(e)}setRows(e){return this._sheet.setRows(e)}setColumns(e){return this._sheet.setColumns(e)}}class xc extends rt{constructor(e,t){super(e.table),this.spreadsheetManager=e,this.definition=t,this.title=this.definition.title||"",this.key=this.definition.key||this.definition.title,this.rowCount=this.definition.rows,this.columnCount=this.definition.columns,this.data=this.definition.data||[],this.element=null,this.isActive=!1,this.grid=new PE(this.columnCount,this.rowCount),this.defaultColumnDefinition={width:100,headerHozAlign:"center",headerSort:!1},this.columnDefinition=Object.assign(this.defaultColumnDefinition,this.options("spreadsheetColumnDefinition")),this.columnDefs=[],this.rowDefs=[],this.columnFields=[],this.columns=[],this.rows=[],this.scrollTop=null,this.scrollLeft=null,this.initialize(),this.dispatchExternal("sheetAdded",this.getComponent())}initialize(){this.initializeElement(),this.initializeColumns(),this.initializeRows()}reinitialize(){this.initializeColumns(),this.initializeRows()}initializeElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tab"),this.element.innerText=this.title,this.element.addEventListener("click",()=>{this.spreadsheetManager.loadSheet(this)})}initializeColumns(){this.grid.setColumnCount(this.columnCount),this.columnFields=this.grid.genColumns(this.data),this.columnDefs=[],this.columnFields.forEach(e=>{var t=Object.assign({},this.columnDefinition);t.field=e,t.title=e,this.columnDefs.push(t)})}initializeRows(){var e;this.grid.setRowCount(this.rowCount),e=this.grid.genRows(this.data),this.rowDefs=[],e.forEach((t,i)=>{var r={_id:t},s=this.data[i];s&&s.forEach((a,o)=>{var u=this.columnFields[o];u&&(r[u]=a)}),this.rowDefs.push(r)})}unload(){this.isActive=!1,this.scrollTop=this.table.rowManager.scrollTop,this.scrollLeft=this.table.rowManager.scrollLeft,this.data=this.getData(!0),this.element.classList.remove("tabulator-spreadsheet-tab-active")}load(){var e=!this.isActive;this.isActive=!0,this.table.blockRedraw(),this.table.setData([]),this.table.setColumns(this.columnDefs),this.table.setData(this.rowDefs),this.table.restoreRedraw(),e&&this.scrollTop!==null&&(this.table.rowManager.element.scrollLeft=this.scrollLeft,this.table.rowManager.element.scrollTop=this.scrollTop),this.element.classList.add("tabulator-spreadsheet-tab-active"),this.dispatchExternal("sheetLoaded",this.getComponent())}getComponent(){return new Sc(this)}getDefinition(){return{title:this.title,key:this.key,rows:this.rowCount,columns:this.columnCount,data:this.getData()}}getData(e){var t=[],i,r,s;return this.rowDefs.forEach(a=>{var o=[];this.columnFields.forEach(u=>{o.push(a[u])}),t.push(o)}),!e&&!this.options("spreadsheetOutputFull")&&(i=t.map(a=>a.findLastIndex(o=>typeof o<"u")+1),r=Math.max(...i),s=i.findLastIndex(a=>a>0)+1,t=t.slice(0,s),t=t.map(a=>a.slice(0,r))),t}setData(e){this.data=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}clear(){this.setData([])}setTitle(e){this.title=e,this.element.innerText=e,this.dispatchExternal("sheetUpdated",this.getComponent())}setRows(e){this.rowCount=e,this.initializeRows(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}setColumns(e){this.columnCount=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}remove(){this.spreadsheetManager.removeSheet(this)}destroy(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.dispatchExternal("sheetRemoved",this.getComponent())}active(){this.spreadsheetManager.loadSheet(this)}}class AE extends Pe{static moduleName="spreadsheet";constructor(e){super(e),this.sheets=[],this.element=null,this.registerTableOption("spreadsheet",!1),this.registerTableOption("spreadsheetRows",50),this.registerTableOption("spreadsheetColumns",50),this.registerTableOption("spreadsheetColumnDefinition",{}),this.registerTableOption("spreadsheetOutputFull",!1),this.registerTableOption("spreadsheetData",!1),this.registerTableOption("spreadsheetSheets",!1),this.registerTableOption("spreadsheetSheetTabs",!1),this.registerTableOption("spreadsheetSheetTabsElement",!1),this.registerTableFunction("setSheets",this.setSheets.bind(this)),this.registerTableFunction("addSheet",this.addSheet.bind(this)),this.registerTableFunction("getSheets",this.getSheets.bind(this)),this.registerTableFunction("getSheetDefinitions",this.getSheetDefinitions.bind(this)),this.registerTableFunction("setSheetData",this.setSheetData.bind(this)),this.registerTableFunction("getSheet",this.getSheet.bind(this)),this.registerTableFunction("getSheetData",this.getSheetData.bind(this)),this.registerTableFunction("clearSheet",this.clearSheet.bind(this)),this.registerTableFunction("removeSheet",this.removeSheetFunc.bind(this)),this.registerTableFunction("activeSheet",this.activeSheetFunc.bind(this))}initialize(){this.options("spreadsheet")&&(this.subscribe("table-initialized",this.tableInitialized.bind(this)),this.subscribe("data-loaded",this.loadRemoteData.bind(this)),this.table.options.index="_id",this.options("spreadsheetData")&&this.options("spreadsheetSheets")&&(console.warn("You cannot use spreadsheetData and spreadsheetSheets at the same time, ignoring spreadsheetData"),this.table.options.spreadsheetData=!1),this.compatibilityCheck(),this.options("spreadsheetSheetTabs")&&this.initializeTabset())}compatibilityCheck(){this.options("data")&&console.warn("Do not use the data option when working with spreadsheets, use either spreadsheetData or spreadsheetSheets to pass data into the table"),this.options("pagination")&&console.warn("The spreadsheet module is not compatible with the pagination module"),this.options("groupBy")&&console.warn("The spreadsheet module is not compatible with the row grouping module"),this.options("responsiveCollapse")&&console.warn("The spreadsheet module is not compatible with the responsive collapse module")}initializeTabset(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tabs");var e=this.options("spreadsheetSheetTabsElement");e&&!(e instanceof HTMLElement)&&(e=document.querySelector(e),e||console.warn("Unable to find element matching spreadsheetSheetTabsElement selector:",this.options("spreadsheetSheetTabsElement"))),e?e.appendChild(this.element):this.footerAppend(this.element)}tableInitialized(){this.sheets.length?this.loadSheet(this.sheets[0]):this.options("spreadsheetSheets")?this.loadSheets(this.options("spreadsheetSheets")):this.options("spreadsheetData")&&this.loadData(this.options("spreadsheetData"))}loadRemoteData(e,t,i){return console.log("data",e,t,i),Array.isArray(e)?(this.table.dataLoader.clearAlert(),this.dispatchExternal("dataLoaded",e),!e.length||Array.isArray(e[0])?this.loadData(e):this.loadSheets(e)):console.error(`Spreadsheet Loading Error - Unable to process remote data due to invalid data type
48
- Expecting: array
49
- Received: `,typeof e,`
50
- Data: `,e),!1}loadData(e){var t={data:e};this.loadSheet(this.newSheet(t))}destroySheets(){this.sheets.forEach(e=>{e.destroy()}),this.sheets=[],this.activeSheet=null}loadSheets(e){Array.isArray(e)||(e=[]),this.destroySheets(),e.forEach(t=>{this.newSheet(t)}),this.loadSheet(this.sheets[0])}loadSheet(e){this.activeSheet!==e&&(this.activeSheet&&this.activeSheet.unload(),this.activeSheet=e,e.load())}newSheet(e={}){var t;return e.rows||(e.rows=this.options("spreadsheetRows")),e.columns||(e.columns=this.options("spreadsheetColumns")),t=new xc(this,e),this.sheets.push(t),this.element&&this.element.appendChild(t.element),t}removeSheet(e){var t=this.sheets.indexOf(e),i;this.sheets.length>1?t>-1&&(this.sheets.splice(t,1),e.destroy(),this.activeSheet===e&&(i=this.sheets[t-1]||this.sheets[0],i?this.loadSheet(i):this.activeSheet=null)):console.warn("Unable to remove sheet, at least one sheet must be active")}lookupSheet(e){return e?e instanceof xc?e:e instanceof Sc?e._sheet:this.sheets.find(t=>t.key===e)||!1:this.activeSheet}setSheets(e){return this.loadSheets(e),this.getSheets()}addSheet(e){return this.newSheet(e).getComponent()}getSheetDefinitions(){return this.sheets.map(e=>e.getDefinition())}getSheets(){return this.sheets.map(e=>e.getComponent())}getSheet(e){var t=this.lookupSheet(e);return t?t.getComponent():!1}setSheetData(e,t){e&&!t&&(t=e,e=!1);var i=this.lookupSheet(e);return i?i.setData(t):!1}getSheetData(e){var t=this.lookupSheet(e);return t?t.getData():!1}clearSheet(e){var t=this.lookupSheet(e);return t?t.clear():!1}removeSheetFunc(e){var t=this.lookupSheet(e);t&&this.removeSheet(t)}activeSheetFunc(e){var t=this.lookupSheet(e);return t?this.loadSheet(t):!1}}class FE extends Pe{static moduleName="tooltip";constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var r=e==="tooltip"?i.column.definition.tooltip:i.definition.headerTooltip;r&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,r),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var r,s,a;function o(u){s=u}typeof i=="function"&&(i=i(e,t.getComponent(),o)),i instanceof HTMLElement?r=i:(r=document.createElement("div"),i===!0&&(t instanceof un?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,u=>{r.innerHTML=i=u||t.definition.title}):i=t.definition.title),r.innerHTML=i),(i||i===0||i===!1)&&(r.classList.add("tabulator-tooltip"),r.addEventListener("mousemove",u=>u.preventDefault()),this.popupInstance=this.popup(r),typeof s=="function"&&this.popupInstance.renderCallback(s),a=this.popupInstance.containerEventCoords(e),this.popupInstance.show(a.x+15,a.y+15).hideOnBlur(()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null}),this.dispatchExternal("TooltipOpened",t.getComponent()))}}var BE={integer:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&Math.floor(e)===e)},float:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&e%1!==0)},numeric:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:!isNaN(e)},string:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:isNaN(e)},alphanumeric:function(n,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(/^[a-z0-9]+$/i);return i.test(e)},max:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)<=t},min:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)>=t},starts:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().startsWith(String(t).toLowerCase())},ends:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().endsWith(String(t).toLowerCase())},minLength:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length>=t},maxLength:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length<=t},in:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:(typeof t=="string"&&(t=t.split("|")),t.indexOf(e)>-1)},regex:function(n,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(t);return i.test(e)},unique:function(n,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=!0,r=n.getData(),s=n.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(a){var o=a.getData();o!==r&&e==s.getFieldValue(o)&&(i=!1)}),i},required:function(n,e,t){return e!==""&&e!==null&&typeof e<"u"}};class ga extends Pe{static moduleName="validate";static validators=BE;constructor(e){super(e),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var r=this.table.options.validationMode!=="manual"?this.validate(e.column.modules.validate,e,t):!0;return r!==!0&&setTimeout(()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,r)}),r}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}rowValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}userClearCellValidation(e){e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.clearValidation(t._getSelf())})}userValidate(e){var t=[];return this.table.rowManager.rows.forEach(i=>{i=i.getComponent();var r=i.validate();r!==!0&&(t=t.concat(r))}),t.length?t:!0}initializeColumnCheck(e){typeof e.definition.validator<"u"&&this.initializeColumn(e)}initializeColumn(e){var t=this,i=[],r;e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(s=>{r=t._extractValidator(s),r&&i.push(r)}):(r=this._extractValidator(e.definition.validator),r&&i.push(r)),e.modules.validate=i.length?i:!1)}_extractValidator(e){var t,i,r;switch(typeof e){case"string":return r=e.indexOf(":"),r>-1?(t=e.substring(0,r),i=e.substring(r+1)):t=e,this._buildValidator(t,i);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}}_buildValidator(e,t){var i=typeof e=="function"?e:ga.validators[e];return i?{type:typeof e=="function"?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}validate(e,t,i){var r=this,s=[],a=this.invalidCells.indexOf(t);return e&&e.forEach(o=>{o.func.call(r,t.getComponent(),i,o.params)||s.push({type:o.type,parameters:o.params})}),t.modules.validate||(t.modules.validate={}),s.length?(t.modules.validate.invalid=s,this.table.options.validationMode!=="manual"&&t.getElement().classList.add("tabulator-validation-fail"),a==-1&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),a>-1&&this.invalidCells.splice(a,1)),s.length?s:!0}getInvalidCells(){var e=[];return this.invalidCells.forEach(t=>{e.push(t.getComponent())}),e}clearValidation(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,t=this.invalidCells.indexOf(e),t>-1&&this.invalidCells.splice(t,1))}}var ba=Object.freeze({__proto__:null,AccessorModule:Jn,AjaxModule:Fi,ClipboardModule:Xn,ColumnCalcsModule:Bi,DataTreeModule:AC,DownloadModule:Qn,EditModule:da,ExportModule:cn,FilterModule:gi,FormatModule:Ni,FrozenColumnsModule:R0,FrozenRowsModule:T0,GroupRowsModule:O0,HistoryModule:tr,HtmlTableImportModule:N0,ImportModule:fa,InteractionModule:j0,KeybindingsModule:dn,MenuModule:Y0,MoveColumnsModule:U0,MoveRowsModule:ir,MutatorModule:nr,PageModule:pa,PersistenceModule:Ht,PopupModule:iE,PrintModule:nE,ReactiveDataModule:rE,ResizeColumnsModule:sE,ResizeRowsModule:aE,ResizeTableModule:oE,ResponsiveLayoutModule:cE,SelectRangeModule:kE,SelectRowModule:fE,SortModule:hn,SpreadsheetModule:AE,TooltipModule:FE,ValidateModule:ga}),NE={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},rowHeader:!1,data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{},dependencies:{}};class _c{constructor(e,t,i={}){this.table=e,this.msgType=t,this.registeredDefaults=Object.assign({},i)}register(e,t){this.registeredDefaults[e]=t}generate(e,t={}){var i=Object.assign({},this.registeredDefaults),r=this.table.options.debugInvalidOptions||t.debugInvalidOptions===!0;Object.assign(i,e);for(let s in t)i.hasOwnProperty(s)||(r&&console.warn("Invalid "+this.msgType+" option:",s),i[s]=t.key);for(let s in i)s in t?i[s]=t[s]:Array.isArray(i[s])?i[s]=Object.assign([],i[s]):typeof i[s]=="object"&&i[s]!==null?i[s]=Object.assign({},i[s]):typeof i[s]>"u"&&delete i[s];return i}}class rr extends rt{constructor(e){super(e),this.elementVertical=e.rowManager.element,this.elementHorizontal=e.columnManager.element,this.tableElement=e.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(e){}renderRows(){}renderColumns(){}rerenderRows(e){e&&e()}rerenderColumns(e,t){}renderRowCells(e){}rerenderRowCells(e,t){}scrollColumns(e,t){}scrollRows(e,t){}resize(){}scrollToRow(e){}scrollToRowNearestTop(e){}visibleRows(e){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(e){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(e,t,i){var r=this.rows().indexOf(e),s=e.getElement(),a=0;return new Promise((o,u)=>{if(r>-1){if(typeof i>"u"&&(i=this.table.options.scrollToRowIfVisible),!i&&Ke.elVisible(s)&&(a=Ke.elOffset(s).top-Ke.elOffset(this.elementVertical).top,a>0&&a<this.elementVertical.clientHeight-s.offsetHeight))return o(),!1;switch(typeof t>"u"&&(t=this.table.options.scrollToRowPosition),t==="nearest"&&(t=this.scrollToRowNearestTop(e)?"top":"bottom"),this.scrollToRow(e),t){case"middle":case"center":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop+(s.offsetTop-this.elementVertical.scrollTop)-(this.elementVertical.scrollHeight-s.offsetTop)/2:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight/2;break;case"bottom":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop-(this.elementVertical.scrollHeight-s.offsetTop)+s.offsetHeight:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight+s.offsetHeight;break;case"top":this.elementVertical.scrollTop=s.offsetTop;break}o()}else console.warn("Scroll Error - Row not visible"),u("Scroll Error - Row not visible")})}}class VE extends rr{constructor(e){super(e)}renderRowCells(e,t){const i=document.createDocumentFragment();e.cells.forEach(r=>{i.appendChild(r.getElement())}),e.element.appendChild(i),t||e.cells.forEach(r=>{r.cellRendered()})}reinitializeColumnWidths(e){e.forEach(function(t){t.reinitializeWidth()})}}class HE extends rr{constructor(e){super(e),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){this.options("layout")=="fitDataTable"&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(e,t){this.dataChange()}scrollColumns(e,t){this.scrollLeft!=e&&(this.scrollLeft=e,this.scroll(e-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var e=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach(t=>{if(t.visible){var i=t.getWidth();i>e&&(e=i)}}),this.windowBuffer=e*2}rerenderColumns(e,t){var i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},r=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach(s=>{var a={},o;s.visible&&(s.modules.frozen||(o=s.getWidth(),a.leftPos=r,a.rightPos=r+o,a.width=o,this.isFitData&&(a.fitDataCheck=s.modules.vdomHoz?s.modules.vdomHoz.fitDataCheck:!0),r+o>this.vDomScrollPosLeft&&r<this.vDomScrollPosRight?(this.leftCol==-1&&(this.leftCol=this.columns.length,this.vDomPadLeft=r),this.rightCol=this.columns.length):this.leftCol!==-1&&(this.vDomPadRight+=o),this.columns.push(s),s.modules.vdomHoz=a,r+=o))}),this.tableElement.style.paddingLeft=this.vDomPadLeft+"px",this.tableElement.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,t||(!e||this.reinitChanged(i))&&this.reinitializeRows(),this.elementVertical.scrollLeft=this.scrollLeft)}renderRowCells(e){if(this.initialized)this.initializeRow(e);else{const t=document.createDocumentFragment();e.cells.forEach(i=>{t.appendChild(i.getElement())}),e.element.appendChild(t),e.cells.forEach(i=>{i.cellRendered()})}}rerenderRowCells(e,t){this.reinitializeRow(e,t)}reinitializeColumnWidths(e){for(let t=this.leftCol;t<=this.rightCol;t++){let i=this.columns[t];i&&i.reinitializeWidth()}}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var e=!1,t,i;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach(r=>{!r.definition.width&&r.visible&&(e=!0)}),e&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,t=this.chain("rows-sample",[1],[],()=>this.table.rowManager.getDisplayRows())[0],t)){i=t.getElement(),t.generateCells(),this.tableElement.appendChild(i);for(let r=0;r<t.cells.length;r++){let s=t.cells[r];i.appendChild(s.getElement()),s.column.reinitializeWidth()}i.parentNode.removeChild(i),this.rerenderColumns(!1,!0)}}else this.options("layout")==="fitColumns"&&(this.layoutRefresh(),this.rerenderColumns(!1,!0))}reinitChanged(e){var t=!0;return e.cols.length!==this.columns.length||e.leftCol!==this.leftCol||e.rightCol!==this.rightCol?!0:(e.cols.forEach((i,r)=>{i!==this.columns[r]&&(t=!1)}),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));e.forEach(i=>{this.reinitializeRow(i,!0)}),t.forEach(i=>{i.deinitialize()})}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,Math.abs(e)>this.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(e,t,i){for(let r=e;r<t;r++){let s=this.columns[r];s.modules.vdomHoz.leftPos+=i,s.modules.vdomHoz.rightPos+=i}}addColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(r=>{if(r.type!=="group"){var s=r.getCell(i);r.getElement().insertBefore(s.getElement(),r.getCell(this.columns[this.rightCol]).getElement().nextSibling),s.cellRendered()}}),this.fitDataColActualWidthCheck(i),this.rightCol++,this.getVisibleRows().forEach(r=>{r.type!=="group"&&(r.modules.vdomHoz.rightCol=this.rightCol)}),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach(s=>{if(s.type!=="group"){var a=s.getCell(i);s.getElement().insertBefore(a.getElement(),s.getCell(this.columns[this.leftCol]).getElement()),a.cellRendered()}}),this.leftCol--,this.getVisibleRows().forEach(s=>{s.type!=="group"&&(s.modules.vdomHoz.leftCol=this.leftCol)}),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let r=this.fitDataColActualWidthCheck(i);r&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+r,this.vDomPadRight-=r)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(r=>{if(r.type!=="group"){var s=r.getCell(i);try{r.getElement().removeChild(s.getElement())}catch(a){console.warn("Could not removeColRight",a.message)}}}),this.vDomPadRight+=i.getWidth(),this.rightCol--,this.getVisibleRows().forEach(r=>{r.type!=="group"&&(r.modules.vdomHoz.rightCol=this.rightCol)})):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos<this.vDomScrollPosLeft?(e=!0,this.getVisibleRows().forEach(r=>{if(r.type!=="group"){var s=r.getCell(i);try{r.getElement().removeChild(s.getElement())}catch(a){console.warn("Could not removeColLeft",a.message)}}}),this.vDomPadLeft+=i.getWidth(),this.leftCol++,this.getVisibleRows().forEach(r=>{r.type!=="group"&&(r.modules.vdomHoz.leftCol=this.leftCol)})):t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(e){var t,i;return e.modules.vdomHoz.fitDataCheck&&(e.reinitializeWidth(),t=e.getWidth(),i=t-e.modules.vdomHoz.width,i&&(e.modules.vdomHoz.rightPos+=i,e.modules.vdomHoz.width=t,this.colPositionAdjust(this.columns.indexOf(e)+1,this.columns.length,i)),e.modules.vdomHoz.fitDataCheck=!1),i}initializeRow(e){if(e.type!=="group"){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.appendCell(e,t)});for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.appendCell(e,t)})}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.cellRendered()}}reinitializeRow(e,t){if(e.type!=="group"&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var i=e.getElement();i.firstChild;)i.removeChild(i.firstChild);this.initializeRow(e)}}}class zE extends rt{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.rowHeader=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new _c(this.table,"column definition",Ec),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.initializeScrollWheelWatcher(),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:HE,basic:VE};typeof this.table.options.renderHorizontal=="string"?e=t[this.table.options.renderHorizontal]:e=this.table.options.renderHorizontal,e?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),e}createHeaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-header"),e.setAttribute("role","rowgroup"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e}getElement(){return this.element}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,this.scrollLeft=e,this.renderer.scrollColumns(e)}initializeScrollWheelWatcher(){this.contentsElement.addEventListener("wheel",e=>{var t;e.deltaX&&(t=this.contentsElement.scrollLeft+e.deltaX,this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))})}generateColumnsFromRowData(e){var t=[],i={},r=this.table.options.autoColumns==="full"?e:[e[0]],s=this.table.options.autoColumnsDefinitions;if(e&&e.length){if(r.forEach(a=>{Object.keys(a).forEach((o,u)=>{let c=a[o],d;i[o]?i[o]!==!0&&typeof c<"u"&&(i[o].sorter=this.calculateSorterFromValue(c),i[o]=!0):(d={field:o,title:o,sorter:this.calculateSorterFromValue(c)},t.splice(u,0,d),i[o]=typeof c>"u"?d:!0)})}),s)switch(typeof s){case"function":this.table.options.columns=s.call(this.table,t);break;case"object":Array.isArray(s)?t.forEach(a=>{var o=s.find(u=>u.field===a.field);o&&Object.assign(a,o)}):t.forEach(a=>{s[a.field]&&Object.assign(a,s[a.field])}),this.table.options.columns=t;break}else this.table.options.columns=t;this.setColumns(this.table.options.columns)}}calculateSorterFromValue(e){var t;switch(typeof e){case"undefined":t="string";break;case"boolean":t="boolean";break;case"number":t="number";break;case"object":Array.isArray(e)?t="array":t="string";break;default:!isNaN(e)&&e!==""?t="number":e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?t="alphanum":t="string";break}return t}setColumns(e,t){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),this.dispatchExternal("columnsLoading"),this.table.options.rowHeader&&(this.rowHeader=new Vt(this.table.options.rowHeader===!0?{}:this.table.options.rowHeader,this,!0),this.columns.push(this.rowHeader),this.headersElement.appendChild(this.rowHeader.getElement()),this.rowHeader.columnRendered()),e.forEach((i,r)=>{this._addColumn(i)}),this._reIndexColumns(),this.dispatch("columns-loaded"),this.subscribedExternal("columnsLoaded")&&this.dispatchExternal("columnsLoaded",this.getComponents()),this.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var r=new Vt(e,this),s=r.getElement(),a=i&&this.findColumnIndex(i);if(t&&this.rowHeader&&(!i||i===this.rowHeader)&&(t=!1,i=this.rowHeader,a=0),i&&a>-1){var o=i.getTopColumn(),u=this.columns.indexOf(o),c=o.getElement();t?(this.columns.splice(u,0,r),c.parentNode.insertBefore(s,c)):(this.columns.splice(u+1,0,r),c.parentNode.insertBefore(s,c.nextSibling))}else t?(this.columns.unshift(r),this.headersElement.insertBefore(r.getElement(),this.headersElement.firstChild)):(this.columns.push(r),this.headersElement.appendChild(r.getElement()));return r.columnRendered(),r}registerColumnField(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}registerColumnPosition(e){this.columnsByIndex.push(e)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})}verticalAlignHeaders(){var e=0;this.redrawBlock||(this.headersElement.style.height="",this.columns.forEach(t=>{t.clearVerticalAlign()}),this.columns.forEach(t=>{var i=t.getHeight();i>e&&(e=i)}),this.headersElement.style.height=e+"px",this.columns.forEach(t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)}),this.table.rowManager.adjustTableSize())}findColumn(e){var t;if(typeof e=="object"){if(e instanceof Vt)return e;if(e instanceof Cc)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return t=[],this.columns.forEach(r=>{t.push(r),t=t.concat(r.getColumns(!0))}),t.find(r=>r.element===e)||!1}else return this.columnsByField[e]||!1;return!1}getColumnByField(e){return this.columnsByField[e]}getColumnsByFieldRoot(e){var t=[];return Object.keys(this.columnsByField).forEach(i=>{var r=this.table.options.nestedFieldSeparator?i.split(this.table.options.nestedFieldSeparator)[0]:i;r===e&&t.push(this.columnsByField[i])}),t}getColumnByIndex(e){return this.columnsByIndex[e]}getFirstVisibleColumn(){var e=this.columnsByIndex.findIndex(t=>t.visible);return e>-1?this.columnsByIndex[e]:!1}getVisibleColumnsByIndex(){return this.columnsByIndex.filter(e=>e.visible)}getColumns(){return this.columns}findColumnIndex(e){return this.columnsByIndex.findIndex(t=>e===t)}getRealColumns(){return this.columnsByIndex}traverse(e){this.columnsByIndex.forEach((t,i)=>{e(t,i)})}getDefinitions(e){var t=[];return this.columnsByIndex.forEach(i=>{(!e||e&&i.visible)&&t.push(i.getDefinition())}),t}getDefinitionTree(){var e=[];return this.columns.forEach(t=>{e.push(t.getDefinition(!0))}),e}getComponents(e){var t=[],i=e?this.columns:this.columnsByIndex;return i.forEach(r=>{t.push(r.getComponent())}),t}getWidth(){var e=0;return this.columnsByIndex.forEach(t=>{t.visible&&(e+=t.getWidth())}),e}moveColumn(e,t,i){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(e,t,i,r,s){var a=e.indexOf(t),o,u=[];a>-1&&(e.splice(a,1),o=e.indexOf(i),o>-1?r&&(o=o+1):o=a,e.splice(o,0,t),s&&(u=this.chain("column-moving-rows",[t,i,r],null,[])||[],u=u.concat(this.table.rowManager.rows),u.forEach(function(c){if(c.cells.length){var d=c.cells.splice(a,1)[0];c.cells.splice(o,0,d)}})))}scrollToColumn(e,t,i){var r=0,s=e.getLeftOffset(),a=0,o=e.getElement();return new Promise((u,c)=>{if(typeof t>"u"&&(t=this.table.options.scrollToColumnPosition),typeof i>"u"&&(i=this.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":a=-this.element.clientWidth/2;break;case"right":a=o.clientWidth-this.headersElement.clientWidth;break}if(!i&&s>0&&s+o.offsetWidth<this.element.clientWidth)return!1;r=s+a,r=Math.max(Math.min(r,this.table.rowManager.element.scrollWidth-this.table.rowManager.element.clientWidth),0),this.table.rowManager.scrollHorizontal(r),this.scrollHorizontal(r),u()}else console.warn("Scroll Error - Column not visible"),c("Scroll Error - Column not visible")})}generateCells(e){var t=[];return this.columnsByIndex.forEach(i=>{t.push(i.generateCell(e))}),t}getFlexBaseWidth(){var e=this.table.element.clientWidth,t=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var r,s,a;i.visible&&(r=i.definition.width||0,s=parseInt(i.minWidth),typeof r=="string"?r.indexOf("%")>-1?a=e/100*parseInt(r):a=parseInt(r):a=r,t+=a>s?a:s)}),t}addColumn(e,t,i){return new Promise((r,s)=>{var a=this._addColumn(e,t,i);this._reIndexColumns(),this.dispatch("column-add",e,t,i),this.layoutMode()!="fitColumns"&&a.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.rerenderColumns(),r(a)})}deregisterColumn(e){var t=e.getField(),i;t&&delete this.columnsByField[t],i=this.columnsByIndex.indexOf(e),i>-1&&this.columnsByIndex.splice(i,1),i=this.columns.indexOf(e),i>-1&&this.columns.splice(i,1),this.verticalAlignHeaders(),this.redraw()}rerenderColumns(e,t){this.redrawBlock?(e===!1||e===!0&&this.redrawBlockUpdate===null)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){Ke.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class IE extends rr{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.scrollTop=0,e.scrollLeft=0,e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility=""}renderRows(){var e=this.tableElement,t=!0,i=document.createDocumentFragment(),r=this.rows();r.forEach((s,a)=>{this.styleRow(s,a),s.initialize(!1,!0),s.type!=="group"&&(t=!1),i.appendChild(s.getElement())}),e.appendChild(i),r.forEach(s=>{s.rendered(),s.heightInitialized||s.calcHeight(!0)}),r.forEach(s=>{s.heightInitialized||s.setCellHeight()}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}rerenderRows(e){this.clearRows(),e&&e(),this.renderRows(),this.rows().length||this.table.rowManager.tableEmpty()}scrollToRowNearestTop(e){var t=Ke.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-t)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}scrollToRow(e){var t=e.getElement();this.elementVertical.scrollTop=Ke.elOffset(t).top-Ke.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class $E extends rr{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(e){for(var t=this.elementVertical.scrollTop,i=!1,r=!1,s=this.table.rowManager.scrollLeft,a=this.rows(),o=this.vDomTop;o<=this.vDomBottom;o++)if(a[o]){var u=t-a[o].getElement().offsetTop;if(r===!1||Math.abs(u)<r)r=u,i=o;else break}a.forEach(c=>{c.deinitializeHeight()}),e&&e(),this.rows().length?this._virtualRenderFill(i===!1?this.rows.length-1:i,!0,r||0):(this.clear(),this.table.rowManager.tableEmpty()),this.scrollColumns(s)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var i=e-this.vDomScrollPosTop,r=e-this.vDomScrollPosBottom,s=this.vDomWindowBuffer*2,a=this.rows();if(this.scrollTop=e,-i>s||r>s){var o=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*a.length)),this.scrollColumns(o)}else t?(i<0&&this._addTopRow(a,-i),r<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(a,-r):this.vDomScrollPosBottom=this.scrollTop)):(r>=0&&this._addBottomRow(a,r),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(a,i):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}scrollToRow(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}visibleRows(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,r=!1,s=0,a=0,o=this.rows();if(e)s=this.vDomTop,a=this.vDomBottom;else for(var u=this.vDomTop;u<=this.vDomBottom;u++)if(o[u])if(r)if(i-o[u].getElement().offsetTop>=0)a=u;else break;else if(t-o[u].getElement().offsetTop>=0)s=u;else if(r=!0,i-o[u].getElement().offsetTop>=0)a=u;else break;return o.slice(s,a+1)}_virtualRenderFill(e,t,i){var r=this.tableElement,s=this.elementVertical,a=0,o=0,u=0,c=0,d=0,p=0,h=this.rows(),f=h.length,_=0,k,C,y=[],v=0,R=0,m=this.table.rowManager.fixedHeight,x=this.elementVertical.clientHeight,g=this.table.options.rowHeight,S=!0;if(e=e||0,i=i||0,!e)this.clear();else{for(;r.firstChild;)r.removeChild(r.firstChild);c=(f-e+1)*this.vDomRowHeight,c<x&&(e-=Math.ceil((x-c)/this.vDomRowHeight),e<0&&(e=0)),a=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),e),e-=a}if(f&&Ke.elVisible(this.elementVertical)){for(this.vDomTop=e,this.vDomBottom=e-1,m||this.table.options.maxHeight?(g&&(R=x/g+this.vDomWindowBuffer/g),R=Math.max(this.vDomWindowMinTotalRows,Math.ceil(R))):R=f;(R==f||o<=x+this.vDomWindowBuffer||v<this.vDomWindowMinTotalRows)&&this.vDomBottom<f-1;){for(y=[],C=document.createDocumentFragment(),p=0;p<R&&this.vDomBottom<f-1;)_=this.vDomBottom+1,k=h[_],this.styleRow(k,_),k.initialize(!1,!0),!k.heightInitialized&&!this.table.options.rowHeight&&k.clearCellHeight(),C.appendChild(k.getElement()),y.push(k),this.vDomBottom++,p++;if(!y.length)break;r.appendChild(C),y.forEach(w=>{w.rendered(),w.heightInitialized||w.calcHeight(!0)}),y.forEach(w=>{w.heightInitialized||w.setCellHeight()}),y.forEach(w=>{u=w.getHeight(),v<a?d+=u:o+=u,u>this.vDomWindowBuffer&&(this.vDomWindowBuffer=u*2),v++}),S=this.table.rowManager.adjustTableSize(),x=this.elementVertical.clientHeight,S&&(m||this.table.options.maxHeight)&&(g=o/v,R=Math.max(this.vDomWindowMinTotalRows,Math.ceil(x/g+this.vDomWindowBuffer/g)))}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-d,this.vDomBottomPad=this.vDomBottom==f-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-o-d,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((o+d)/v),this.vDomBottomPad=this.vDomRowHeight*(f-this.vDomBottom-1),this.vDomScrollHeight=d+o+this.vDomBottomPad-x),r.style.paddingTop=this.vDomTopPad+"px",r.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+d+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-x:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-x),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-x),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(e,t){for(var i=this.tableElement,r=[],s=0,a=this.vDomTop-1,o=0,u=!0;u;)if(this.vDomTop){let c=e[a],d,p;c&&o<this.vDomMaxRenderChain?(d=c.getHeight()||this.vDomRowHeight,p=c.initialized,t>=d?(this.styleRow(c,a),i.insertBefore(c.getElement(),i.firstChild),(!c.initialized||!c.heightInitialized)&&r.push(c),c.initialize(),p||(d=c.getElement().offsetHeight,d>this.vDomWindowBuffer&&(this.vDomWindowBuffer=d*2)),t-=d,s+=d,this.vDomTop--,a--,o++):u=!1):u=!1}else u=!1;for(let c of r)c.clearCellHeight();this._quickNormalizeRowHeight(r),s&&(this.vDomTopPad-=s,this.vDomTopPad<0&&(this.vDomTopPad=a*this.vDomRowHeight),a<1&&(this.vDomTopPad=0),i.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=s)}_removeTopRow(e,t){for(var i=[],r=0,s=0,a=!0;a;){let o=e[this.vDomTop],u;o&&s<this.vDomMaxRenderChain?(u=o.getHeight()||this.vDomRowHeight,t>=u?(this.vDomTop++,t-=u,r+=u,i.push(o),s++):a=!1):a=!1}for(let o of i){let u=o.getElement();u.parentNode&&u.parentNode.removeChild(u)}r&&(this.vDomTopPad+=r,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?r:r+this.vDomWindowBuffer)}_addBottomRow(e,t){for(var i=this.tableElement,r=[],s=0,a=this.vDomBottom+1,o=0,u=!0;u;){let c=e[a],d,p;c&&o<this.vDomMaxRenderChain?(d=c.getHeight()||this.vDomRowHeight,p=c.initialized,t>=d?(this.styleRow(c,a),i.appendChild(c.getElement()),(!c.initialized||!c.heightInitialized)&&r.push(c),c.initialize(),p||(d=c.getElement().offsetHeight,d>this.vDomWindowBuffer&&(this.vDomWindowBuffer=d*2)),t-=d,s+=d,this.vDomBottom++,a++,o++):u=!1):u=!1}for(let c of r)c.clearCellHeight();this._quickNormalizeRowHeight(r),s&&(this.vDomBottomPad-=s,(this.vDomBottomPad<0||a==e.length-1)&&(this.vDomBottomPad=0),i.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=s)}_removeBottomRow(e,t){for(var i=[],r=0,s=0,a=!0;a;){let o=e[this.vDomBottom],u;o&&s<this.vDomMaxRenderChain?(u=o.getHeight()||this.vDomRowHeight,t>=u?(this.vDomBottom--,t-=u,r+=u,i.push(o),s++):a=!1):a=!1}for(let o of i){let u=o.getElement();u.parentNode&&u.parentNode.removeChild(u)}r&&(this.vDomBottomPad+=r,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=r)}_quickNormalizeRowHeight(e){for(let t of e)t.calcHeight();for(let t of e)t.setCellHeight()}}class jE extends rt{constructor(e){super(e),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),e}createTableElement(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e.setAttribute("role","rowgroup"),e}initializePlaceholder(){var e=this.table.options.placeholder;if(typeof e=="function"&&(e=e.call(this.table)),e=this.chain("placeholder",[e],e,e)||e,e){let t=document.createElement("div");if(t.classList.add("tabulator-placeholder"),typeof e=="string"){let i=document.createElement("div");i.classList.add("tabulator-placeholder-contents"),i.innerHTML=e,t.appendChild(i),this.placeholderContents=i}else typeof HTMLElement<"u"&&e instanceof HTMLElement?(t.appendChild(e),this.placeholderContents=e):(console.warn("Invalid placeholder provided, must be string or HTML Element",e),this.el=null);this.placeholder=t}}getElement(){return this.element}getTableElement(){return this.tableElement}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",()=>{var e=this.element.scrollLeft,t=this.scrollLeft>e,i=this.element.scrollTop,r=this.scrollTop>i;this.scrollLeft!=e&&(this.scrollLeft=e,this.dispatch("scroll-horizontal",e,t),this.dispatchExternal("scrollHorizontal",e,t),this._positionPlaceholder()),this.scrollTop!=i&&(this.scrollTop=i,this.renderer.scrollRows(i,r),this.dispatch("scroll-vertical",i,r),this.dispatchExternal("scrollVertical",i,r))})}findRow(e){if(typeof e=="object"){if(e instanceof ot)return e;if(e instanceof Zn)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return this.rows.find(i=>i.getElement()===e)||!1;if(e===null)return!1}else return typeof e>"u"?!1:this.rows.find(i=>i.data[this.table.options.index]==e)||!1;return!1}getRowFromDataObject(e){var t=this.rows.find(i=>i.data===e);return t||!1}getRowFromPosition(e){return this.getDisplayRows().find(t=>t.type==="row"&&t.getPosition()===e&&t.isDisplayed())}scrollToRow(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}setData(e,t,i){return new Promise((r,s)=>{t&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(e,!0):this.reRenderInPosition(()=>{this._setDataActual(e)}):(this.table.options.autoColumns&&i&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(e),this.resetScroll(),this._setDataActual(e)),r()})}_setDataActual(e,t){this.dispatchExternal("dataProcessing",e),this._wipeElements(),Array.isArray(e)?(this.dispatch("data-processing",e),e.forEach((i,r)=>{if(i&&typeof i=="object"){var s=new ot(i,this);this.rows.push(s)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",i)}),this.refreshActiveData(!1,!1,t),this.dispatch("data-processed",e),this.dispatchExternal("dataProcessed",e)):console.error(`Data Loading Error - Unable to process data due to invalid data type
51
- Expecting: array
52
- Received: `,typeof e,`
53
- Data: `,e)}_wipeElements(){this.dispatch("rows-wipe"),this.destroy(),this.adjustTableSize(),this.dispatch("rows-wiped")}destroy(){this.rows.forEach(e=>{e.wipe()}),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0}deleteRow(e,t){var i=this.rows.indexOf(e),r=this.activeRows.indexOf(e);r>-1&&this.activeRows.splice(r,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator(s=>{var a=s.indexOf(e);a>-1&&s.splice(a,1)}),t||this.reRenderInPosition(),this.regenerateRowPositions(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this.tableEmpty(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(e,t,i,r){var s=this.addRowActual(e,t,i,r);return s}addRows(e,t,i,r){var s=[];return new Promise((a,o)=>{t=this.findAddRowPos(t),Array.isArray(e)||(e=[e]),(typeof i>"u"&&t||typeof i<"u"&&!t)&&e.reverse(),e.forEach((u,c)=>{var d=this.addRow(u,t,i,!0);s.push(d),this.dispatch("row-added",d,u,t,i)}),this.refreshActiveData(r?"displayPipeline":!1,!1,!0),this.regenerateRowPositions(),this.displayRowsCount&&this._clearPlaceholder(),a(s)})}findAddRowPos(e){return typeof e>"u"&&(e=this.table.options.addRowPos),e==="pos"&&(e=!0),e==="bottom"&&(e=!1),e}addRowActual(e,t,i,r){var s=e instanceof ot?e:new ot(e||{},this),a=this.findAddRowPos(t),o=-1,u,c;return i||(c=this.chain("row-adding-position",[s,a],null,{index:i,top:a}),i=c.index,a=c.top),typeof i<"u"&&(i=this.findRow(i)),i=this.chain("row-adding-index",[s,i,a],null,i),i&&(o=this.rows.indexOf(i)),i&&o>-1?(u=this.activeRows.indexOf(i),this.displayRowIterator(function(d){var p=d.indexOf(i);p>-1&&d.splice(a?p:p+1,0,s)}),u>-1&&this.activeRows.splice(a?u:u+1,0,s),this.rows.splice(a?o:o+1,0,s)):a?(this.displayRowIterator(function(d){d.unshift(s)}),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator(function(d){d.push(s)}),this.activeRows.push(s),this.rows.push(s)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",s.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),r||this.reRenderInPosition(),s}moveRow(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowPositions(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}moveRowActual(e,t,i){this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator(r=>{this.moveRowInArray(r,e,t,i)}),this.dispatch("row-moving",e,t,i)}moveRowInArray(e,t,i,r){var s,a,o,u;if(t!==i&&(s=e.indexOf(t),s>-1&&(e.splice(s,1),a=e.indexOf(i),a>-1?r?e.splice(a+1,0,t):e.splice(a,0,t):e.splice(s,0,t)),e===this.getDisplayRows())){o=s<a?s:a,u=a>s?a:s+1;for(let c=o;c<=u;c++)e[c]&&this.styleRow(e[c],c)}}clearData(){this.setData([])}getRowIndex(e){return this.findRowIndex(e,this.rows)}getDisplayRowIndex(e){var t=this.getDisplayRows().indexOf(e);return t>-1?t:!1}nextDisplayRow(e,t){var i=this.getDisplayRowIndex(e),r=!1;return i!==!1&&i<this.displayRowsCount-1&&(r=this.getDisplayRows()[i+1]),r&&(!(r instanceof ot)||r.type!="row")?this.nextDisplayRow(r,t):r}prevDisplayRow(e,t){var i=this.getDisplayRowIndex(e),r=!1;return i&&(r=this.getDisplayRows()[i-1]),t&&r&&(!(r instanceof ot)||r.type!="row")?this.prevDisplayRow(r,t):r}findRowIndex(e,t){var i;return e=this.findRow(e),e&&(i=t.indexOf(e),i>-1)?i:!1}getData(e,t){var i=[],r=this.getRows(e);return r.forEach(function(s){s.type=="row"&&i.push(s.getData(t||"data"))}),i}getComponents(e){var t=[],i=this.getRows(e);return i.forEach(function(r){t.push(r.getComponent())}),t}getDataCount(e){var t=this.getRows(e);return t.length}scrollHorizontal(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}registerDataPipelineHandler(e,t){typeof t<"u"?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort((i,r)=>i.priority-r.priority)):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(e,t){typeof t<"u"?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort((i,r)=>i.priority-r.priority)):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(e,t,i){var r=this.table,s="",a=0,o=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if(typeof e=="function")if(a=this.dataPipeline.findIndex(u=>u.handler===e),a>-1)s="dataPipeline",t&&(a==this.dataPipeline.length-1?s="display":a++);else if(a=this.displayPipeline.findIndex(u=>u.handler===e),a>-1)s="displayPipeline",t&&(a==this.displayPipeline.length-1?s="end":a++);else{console.error("Unable to refresh data, invalid handler provided",e);return}else s=e||"all",a=0;if(this.redrawBlock){(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===s&&a<this.redrawBlockRestoreConfig.index||o.indexOf(s)<o.indexOf(this.redrawBlockRestoreConfig.stage)))&&(this.redrawBlockRestoreConfig={handler:e,skipStage:t,renderInPosition:i,stage:s,index:a});return}else Ke.elVisible(this.element)?i?this.reRenderInPosition(this.refreshPipelines.bind(this,e,s,a,i)):(this.refreshPipelines(e,s,a,i),e||this.table.columnManager.renderer.renderColumns(),this.renderTable(),r.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0)):this.refreshPipelines(e,s,a,i),this.dispatch("data-refreshed")}}refreshPipelines(e,t,i,r){switch(this.dispatch("data-refreshing"),(!e||!this.activeRowsPipeline[0])&&(this.activeRowsPipeline[0]=this.rows.slice(0)),t){case"all":case"dataPipeline":for(let s=i;s<this.dataPipeline.length;s++){let a=this.dataPipeline[s].handler(this.activeRowsPipeline[s].slice(0));this.activeRowsPipeline[s+1]=a||this.activeRowsPipeline[s].slice(0)}this.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);case"display":i=0,this.resetDisplayRows();case"displayPipeline":for(let s=i;s<this.displayPipeline.length;s++){let a=this.displayPipeline[s].handler((s?this.getDisplayRows(s-1):this.activeRows).slice(0),r);this.setDisplayRows(a||this.getDisplayRows(s-1).slice(0),s)}case"end":this.regenerateRowPositions()}this.getDisplayRows().length&&this._clearPlaceholder()}regenerateRowPositions(){var e=this.getDisplayRows(),t=1;e.forEach(i=>{i.type==="row"&&(i.setPosition(t),t++)})}setActiveRows(e){this.activeRows=this.activeRows=Object.assign([],e),this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}getDisplayRows(e){return typeof e>"u"?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]}getVisibleRows(e,t){var i=Object.assign([],this.renderer.visibleRows(!t));return e&&(i=this.chain("rows-visible",[t],i,i)),i}displayRowIterator(e){this.activeRowsPipeline.forEach(e),this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(e){var t=[];switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0);break;default:t=this.chain("rows-retrieve",e,null,this.rows)||this.rows}return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:$E,basic:IE};typeof this.table.options.renderVertical=="string"?e=t[this.table.options.renderVertical]:e=this.table.options.renderVertical,e?(this.renderMode=this.table.options.renderVertical,this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize(),(this.table.element.clientHeight||this.table.options.height)&&!(this.table.options.minHeight&&this.table.options.maxHeight)?this.fixedHeight=!0:this.fixedHeight=!1):console.error("Unable to find matching renderer:",this.table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.fixedHeight||this.adjustTableSize(),this.layoutRefresh(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}tableEmpty(){this.renderEmptyScroll(),this._showPlaceholder()}checkPlaceholder(){this.displayRowsCount?this._clearPlaceholder():this.tableEmpty()}_showPlaceholder(){this.placeholder&&(this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.initializePlaceholder(),this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder(),this.adjustTableSize())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.tableElement.style.minWidth="",this.tableElement.style.display=""}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}normalizeHeight(e){this.activeRows.forEach(function(t){t.normalizeHeight(e)})}adjustTableSize(){let e=this.element.clientHeight,t,i=!1;if(this.renderer.verticalFillMode==="fill"){let r=Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){t=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px";const s="calc(100% - "+r+"px)";this.element.style.minHeight=t||"calc(100% - "+r+"px)",this.element.style.height=s,this.element.style.maxHeight=s}else this.element.style.height="",this.element.style.height=this.table.element.clientHeight-r+"px",this.element.scrollTop=this.scrollTop;this.renderer.resize(),!this.fixedHeight&&e!=this.element.clientHeight&&(i=!0,this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}return this._positionPlaceholder(),i}reinitialize(){this.rows.forEach(function(e){e.reinitialize(!0)})}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(e){this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():(this.reRenderInPosition(),this.scrollHorizontal(this.scrollLeft))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,this.table.browser==="ie"){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))}}class WE extends rt{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}initialize(){this.initializeElement()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e}createContainerElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer-contents"),this.element.appendChild(e),e}initializeElement(){if(this.table.options.footerElement)switch(typeof this.table.options.footerElement){case"string":this.table.options.footerElement[0]==="<"?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement;break}}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(e){e.parentNode.removeChild(e),this.deactivate()}deactivate(e){(!this.element.firstChild||e)&&(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class GE extends rt{constructor(e){super(e),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","mouseup","mousedown","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var e={};this.listeners.forEach(t=>{e[t]={handler:null,components:[]}}),this.listeners=e}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach(e=>{this.pseudoTrackers[e].subscriber=this.pseudoMouseEnter.bind(this,e),this.subscribe(e+"-mouseover",this.pseudoTrackers[e].subscriber)}),this.pseudoTracking=!0}pseudoMouseEnter(e,t,i){this.pseudoTrackers[e].target!==i&&(this.pseudoTrackers[e].target&&this.dispatch(e+"-mouseleave",t,this.pseudoTrackers[e].target),this.pseudoMouseLeave(e,t),this.pseudoTrackers[e].target=i,this.dispatch(e+"-mouseenter",t,i))}pseudoMouseLeave(e,t){var i=Object.keys(this.pseudoTrackers),r={row:["cell"],cell:["row"]};i=i.filter(s=>{var a=r[e];return s!==e&&(!a||a&&!a.includes(s))}),i.forEach(s=>{var a=this.pseudoTrackers[s].target;this.pseudoTrackers[s].target&&(this.dispatch(s+"-mouseleave",t,a),this.pseudoTrackers[s].target=null)})}bindSubscriptionWatchers(){var e=Object.keys(this.listeners),t=Object.values(this.componentMap);for(let i of t)for(let r of e){let s=i+"-"+r;this.subscriptionChange(s,this.subscriptionChanged.bind(this,i,r))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(e,t,i){var r=this.listeners[t].components,s=r.indexOf(e),a=!1;i?s===-1&&(r.push(e),a=!0):this.subscribed(e+"-"+t)||s>-1&&(r.splice(s,1),a=!0),(t==="mouseenter"||t==="mouseleave")&&!this.pseudoTracking&&this.bindPseudoEvents(),a&&this.updateEventListeners()}updateEventListeners(){for(let e in this.listeners){let t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}track(e,t){var i=t.composedPath&&t.composedPath()||t.path,r=this.findTargets(i);r=this.bindComponents(e,r),this.triggerEvents(e,t,r),this.pseudoTracking&&(e=="mouseover"||e=="mouseleave")&&!Object.keys(r).length&&this.pseudoMouseLeave("none",t)}findTargets(e){var t={};let i=Object.keys(this.componentMap);for(let r of e){let s=r.classList?[...r.classList]:[];if(s.filter(u=>this.abortClasses.includes(u)).length)break;let o=s.filter(u=>i.includes(u));for(let u of o)t[this.componentMap[u]]||(t[this.componentMap[u]]=r)}return t.group&&t.group===t.row&&delete t.row,t}bindComponents(e,t){var i=Object.keys(t).reverse(),r=this.listeners[e],s={},a={},o={};for(let u of i){let c,d=t[u],p=this.previousTargets[u];if(p&&p.target===d)c=p.component;else switch(u){case"row":case"group":(r.components.includes("row")||r.components.includes("cell")||r.components.includes("group"))&&(c=this.table.rowManager.getVisibleRows(!0).find(f=>f.getElement()===d),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[u]=!1));break;case"column":r.components.includes("column")&&(c=this.table.columnManager.findColumn(d));break;case"cell":r.components.includes("cell")&&(s.row instanceof ot?c=s.row.findCell(d):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"));break}c&&(s[u]=c,o[u]={target:d,component:c})}return this.previousTargets=o,Object.keys(t).forEach(u=>{let c=s[u];a[u]=c}),a}triggerEvents(e,t,i){var r=this.listeners[e];for(let s in i)i[s]&&r.components.includes(s)&&this.dispatch(s+"-"+e,t,i[s])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class YE{constructor(e){this.table=e,this.bindings={}}bind(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,i):this.bindings[e][t]=i}handle(e,t,i){if(this.bindings[e]&&this.bindings[e][i]&&typeof this.bindings[e][i].bind=="function")return this.bindings[e][i].bind(null,t);i!=="then"&&typeof i=="string"&&!i.startsWith("_")&&this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class UE extends rt{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,r,s,a){var o=++this.requestOrder;if(this.table.destroyed)return Promise.resolve();if(this.dispatchExternal("dataLoading",e),e&&(e.indexOf("{")==0||e.indexOf("[")==0)&&(e=JSON.parse(e)),this.confirm("data-loading",[e,t,i,s])){this.loading=!0,s||this.alertLoader(),t=this.chain("data-params",[e,i,s],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams);var u=this.chain("data-load",[e,t,i,s],!1,Promise.resolve([]));return u.then(c=>{if(this.table.destroyed)console.warn("Data Load Response Blocked - Table has been destroyed");else{!Array.isArray(c)&&typeof c=="object"&&(c=this.mapParams(c,this.objectInvert(this.table.options.dataReceiveParams)));var d=this.chain("data-loaded",[c],null,c);o==this.requestOrder?(this.clearAlert(),d!==!1&&(this.dispatchExternal("dataLoaded",d),this.table.rowManager.setData(d,r,typeof a>"u"?!r:a))):console.warn("Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made")}}).catch(c=>{console.error("Data Load Error: ",c),this.dispatchExternal("dataLoadError",c),s||this.alertError(),setTimeout(()=>{this.clearAlert()},this.table.options.dataLoaderErrorTimeout)}).finally(()=>{this.loading=!1})}else return this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,r,typeof a>"u"?!r:a),Promise.resolve()}mapParams(e,t){var i={};for(let r in e)i[t.hasOwnProperty(r)?t[r]:r]=e[r];return i}objectInvert(e){var t={};for(let i in e)t[e[i]]=i;return t}blockActiveLoad(){this.requestOrder++}alertLoader(){var e=typeof this.table.options.dataLoader=="function"?this.table.options.dataLoader():this.table.options.dataLoader;e&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class qE{constructor(e,t,i){this.table=e,this.events={},this.optionsList=t||{},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=i}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e])if(t)if(i=this.events[e].findIndex(r=>r===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}else delete this.events[e];else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(r=>{r(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift(),i;return this.events[t]&&this.events[t].forEach((r,s)=>{let a=r.apply(this.table,e);s||(i=a)}),i}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="ExternalEvent:"+e[0],(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}}class KE{constructor(e){this.events={},this.subscriptionNotifiers={},this.dispatch=e?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=e?this._debugChain.bind(this):this._chain.bind(this),this.confirm=e?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=e}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t,i=1e4){this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort((r,s)=>r.priority-s.priority),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t)if(i=this.events[e].findIndex(r=>r.callback===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}}else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_chain(e,t,i,r){var s=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach((a,o)=>{s=a.callback.apply(this,t.concat([s]))}),s):typeof r=="function"?r():r}_confirm(e,t){var i=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach((r,s)=>{r.callback.apply(this,t)&&(i=!0)}),i}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(r=>{r(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift();this.events[t]&&this.events[t].forEach(i=>{i.callback.apply(this,e)})}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}_debugChain(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._chain(...arguments)}_debugConfirm(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._confirm(...arguments)}}class JE extends rt{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t,i){var r="";return typeof this.options(e)<"u"?(r="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(r=r+", Please use the %c"+t+"%c option instead",this._warnUser(r,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;"),i&&(this.table.options[t]=this.table.options[e])):this._warnUser(r,"font-weight: bold;","font-weight: normal;"),!1):!0}checkMsg(e,t){return typeof this.options(e)<"u"?(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1):!0}msg(e){this._warnUser(e)}}class XE extends rt{constructor(e){super(e),this.deps={},this.props={}}initialize(){this.deps=Object.assign({},this.options("dependencies"))}lookup(e,t,i){if(Array.isArray(e)){for(const s of e){var r=this.lookup(s,t,!0);if(r)break}if(r)return r;this.error(e)}else return t?this.lookupProp(e,t,i):this.lookupKey(e,i)}lookupProp(e,t,i){var r;if(this.props[e]&&this.props[e][t])return this.props[e][t];if(r=this.lookupKey(e,i),r)return this.props[e]||(this.props[e]={}),this.props[e][t]=r[t]||r,this.props[e][t]}lookupKey(e,t){var i;return this.deps[e]?i=this.deps[e]:window[e]?(this.deps[e]=window[e],i=this.deps[e]):t||this.error(e),i}error(e){console.error("Unable to find dependency",e,"Please check documentation and ensure you have imported the required library into your project")}}function ZE(n,e){e&&this.table.columnManager.renderer.reinitializeColumnWidths(n),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function Mc(n,e){n.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function QE(n,e){var t=0,i=this.table.rowManager.element.clientWidth,r=0,s=!1;n.forEach((a,o)=>{a.widthFixed||a.reinitializeWidth(),(this.table.options.responsiveLayout?a.modules.responsive.visible:a.visible)&&(s=a),a.visible&&(t+=a.getWidth())}),s?(r=i-t+s.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(s.setWidth(0),this.table.modules.responsiveLayout.update()),r>0?s.setWidth(r):s.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function ek(n,e){var t=this.table.rowManager.element.getBoundingClientRect().width,i=0,r=0,s=0,a=0,o=[],u=[],c=0,d=0,p=0;function h(_){var k;return typeof _=="string"?_.indexOf("%")>-1?k=t/100*parseInt(_):k=parseInt(_):k=_,k}function f(_,k,C,y){var v=[],R=0,m=0,x=0,g=s,S=0,w=0,E=[];function b(M){return C*(M.column.definition.widthGrow||1)}function T(M){return h(M.width)-C*(M.column.definition.widthShrink||0)}return _.forEach(function(M,O){var F=y?T(M):b(M);M.column.minWidth>=F?v.push(M):M.column.maxWidth&&M.column.maxWidth<F?(M.width=M.column.maxWidth,k-=M.column.maxWidth,g-=y?M.column.definition.widthShrink||1:M.column.definition.widthGrow||1,g&&(C=Math.floor(k/g))):(E.push(M),w+=y?M.column.definition.widthShrink||1:M.column.definition.widthGrow||1)}),v.length?(v.forEach(function(M){R+=y?M.width-M.column.minWidth:M.column.minWidth,M.width=M.column.minWidth}),m=k-R,x=w?Math.floor(m/w):m,S=f(E,m,x,y)):(S=w?k-Math.floor(k/w)*w:k,E.forEach(function(M){M.width=y?T(M):b(M)})),S}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(t-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),n.forEach(function(_){var k,C,y;_.visible&&(k=_.definition.width,C=parseInt(_.minWidth),k?(y=h(k),i+=y>C?y:C,_.definition.widthShrink&&(u.push({column:_,width:y>C?y:C}),c+=_.definition.widthShrink)):(o.push({column:_,width:0}),s+=_.definition.widthGrow||1))}),r=t-i,a=Math.floor(r/s),p=f(o,r,a,!1),o.length&&p>0&&(o[o.length-1].width+=p),o.forEach(function(_){r-=_.width}),d=Math.abs(p)+r,d>0&&c&&(p=f(u,d,Math.floor(d/c),!0)),p&&u.length&&(u[u.length-1].width-=p),o.forEach(function(_){_.column.setWidth(_.width)}),u.forEach(function(_){_.column.setWidth(_.width)})}var tk={fitData:ZE,fitDataFill:Mc,fitDataTable:Mc,fitDataStretch:QE,fitColumns:ek};class sr extends Pe{static moduleName="layout";static modes=tk;constructor(e){super(e,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var e=this.table.options.layout;sr.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode),this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(e){e.definition.widthGrow&&(e.definition.widthGrow=Number(e.definition.widthGrow)),e.definition.widthShrink&&(e.definition.widthShrink=Number(e.definition.widthShrink))}getMode(){return this.mode}layout(e){var t=this.table.columnManager.columnsByIndex.find(i=>i.definition.variableHeight||i.definition.formatter==="textarea");this.dispatch("layout-refreshing"),sr.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),t&&this.table.rowManager.normalizeHeight(!0),this.dispatch("layout-refreshed")}}var ik={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};class va extends Pe{static moduleName="localize";static langs=ik;constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=Ke.deepClone(va.langs),this.table.options.columnDefaults.headerFilterPlaceholder!==!1&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let e in this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(e){this.langList.default.headerFilters.default=e}installLang(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}_setLangProp(e,t){for(let i in t)e[i]&&typeof e[i]=="object"?this._setLangProp(e[i],t[i]):e[i]=t[i]}setLocale(e){e=e||"default";function t(i,r){for(var s in i)typeof i[s]=="object"?(r[s]||(r[s]={}),t(i[s],r[s])):r[s]=i[s]}if(e===!0&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!this.langList[e]){let i=e.split("-")[0];this.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}this.locale=e,this.lang=Ke.deepClone(this.langList.default||{}),e!="default"&&t(this.langList[e],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(e){return this.locale}getLang(e){return e?this.langList[e]:this.lang}getText(e,t){var i=t?e+"|"+t:e,r=i.split("|"),s=this._getLangElement(r,this.locale);return s||""}_getLangElement(e,t){var i=this.lang;return e.forEach(function(r){var s;i&&(s=i[r],typeof s<"u"?i=s:i=!1)}),i}bind(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}_executeBindings(){for(let e in this.bindings)this.bindings[e].forEach(t=>{t(this.getText(e),this.lang)})}}class nk extends Pe{static moduleName="comms";constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[],i;return i=this.table.constructor.registry.lookupTable(e),i.forEach(r=>{this.table!==r&&t.push(r)}),t}send(e,t,i,r){var s=this.getConnections(e);s.forEach(a=>{a.tableComms(this.table.element,t,i,r)}),!s.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}receive(e,t,i,r){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,r);console.warn("Inter-table Comms Error - no such module:",t)}}var rk=Object.freeze({__proto__:null,CommsModule:nk,LayoutModule:sr,LocalizeModule:va});class Mt{static registry={tables:[],register(e){Mt.registry.tables.push(e)},deregister(e){var t=Mt.registry.tables.indexOf(e);t>-1&&Mt.registry.tables.splice(t,1)},lookupTable(e,t){var i=[],r,s;if(typeof e=="string"){if(r=document.querySelectorAll(e),r.length)for(var a=0;a<r.length;a++)s=Mt.registry.matchElement(r[a]),s&&i.push(s)}else typeof HTMLElement<"u"&&e instanceof HTMLElement||e instanceof Mt?(s=Mt.registry.matchElement(e),s&&i.push(s)):Array.isArray(e)?e.forEach(function(o){i=i.concat(Mt.registry.lookupTable(o))}):t||console.warn("Table Connection Error - Invalid Selector",e);return i},matchElement(e){return Mt.registry.tables.find(function(t){return e instanceof Mt?t===e:t.element===e})}};static findTable(e){var t=Mt.registry.lookupTable(e,!0);return Array.isArray(t)&&!t.length?!1:t}}class Qe extends Mt{static moduleBindings={};static moduleExtensions={};static modulesRegistered=!1;static defaultModules=!1;constructor(){super()}static initializeModuleBinder(e){Qe.modulesRegistered||(Qe.modulesRegistered=!0,Qe._registerModules(rk,!0),e&&Qe._registerModules(e))}static _extendModule(e,t,i){if(Qe.moduleBindings[e]){var r=Qe.moduleBindings[e][t];if(r)if(typeof i=="object")for(let s in i)r[s]=i[s];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",t)}else console.warn("Module Error - module does not exist:",e)}static _registerModules(e,t){var i=Object.values(e);t&&i.forEach(r=>{r.prototype.moduleCore=!0}),Qe._registerModule(i)}static _registerModule(e){Array.isArray(e)||(e=[e]),e.forEach(t=>{Qe._registerModuleBinding(t),Qe._registerModuleExtensions(t)})}static _registerModuleBinding(e){e.moduleName?Qe.moduleBindings[e.moduleName]=e:console.error("Unable to bind module, no moduleName defined",e.moduleName)}static _registerModuleExtensions(e){var t=e.moduleExtensions;if(e.moduleExtensions)for(let i in t){let r=t[i];if(Qe.moduleBindings[i])for(let s in r)Qe._extendModule(i,s,r[s]);else{Qe.moduleExtensions[i]||(Qe.moduleExtensions[i]={});for(let s in r)Qe.moduleExtensions[i][s]||(Qe.moduleExtensions[i][s]={}),Object.assign(Qe.moduleExtensions[i][s],r[s])}}Qe._extendModuleFromQueue(e)}static _extendModuleFromQueue(e){var t=Qe.moduleExtensions[e.moduleName];if(t)for(let i in t)Qe._extendModule(e.moduleName,i,t[i])}_bindModules(){var e=[],t=[],i=[];this.modules={};for(var r in Qe.moduleBindings){let s=Qe.moduleBindings[r],a=new s(this);this.modules[r]=a,s.prototype.moduleCore?this.modulesCore.push(a):s.moduleInitOrder?s.moduleInitOrder<0?e.push(a):t.push(a):i.push(a)}e.sort((s,a)=>s.moduleInitOrder>a.moduleInitOrder?1:-1),t.sort((s,a)=>s.moduleInitOrder>a.moduleInitOrder?1:-1),this.modulesRegular=e.concat(i.concat(t))}}class sk extends rt{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.dispatch("alert-show",t),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),typeof e=="function"&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.dispatch("alert-hide",this.type),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class ri extends Qe{static defaultOptions=NE;static extendModule(){ri.initializeModuleBinder(),ri._extendModule(...arguments)}static registerModule(){ri.initializeModuleBinder(),ri._registerModule(...arguments)}constructor(e,t,i){super(),ri.initializeModuleBinder(i),this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new YE(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new JE(this),this.optionsList=new _c(this,"table constructor"),this.dependencyRegistry=new XE(this),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout(()=>{this._create()})),this.constructor.registry.register(this)}initializeElement(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement?(this.element=e,!0):typeof e=="string"?(this.element=document.querySelector(e),this.element?!0:(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}initializeCoreSystems(e){this.columnManager=new zE(this),this.rowManager=new jE(this),this.footerManager=new WE(this),this.dataLoader=new UE(this),this.alertManager=new sk(this),this._bindModules(),this.options=this.optionsList.generate(ri.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new qE(this,this.options,this.options.debugEventsExternal),this.eventBus=new KE(this.options.debugEventsInternal),this.interactionMonitor=new GE(this),this.dataLoader.initialize(),this.footerManager.initialize(),this.dependencyRegistry.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this.initialized=!0,this._loadInitialData().finally(()=>{this.eventBus.dispatch("table-initialized"),this.externalEvents.dispatch("tableBuilt")})}_rtlCheck(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if(e.direction!=="rtl")break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var e=this.element,t=this.options,i;if(e.tagName==="TABLE"){this.originalElement=this.element,i=document.createElement("div");var r=e.attributes;for(var s in r)typeof r[s]=="object"&&i.setAttribute(r[s].name,r[s].value);e.parentNode.replaceChild(i,e),this.element=e=i}for(e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);t.height&&(t.height=isNaN(t.height)?t.height:t.height+"px",e.style.height=t.height),t.minHeight!==!1&&(t.minHeight=isNaN(t.minHeight)?t.minHeight:t.minHeight+"px",e.style.minHeight=t.minHeight),t.maxHeight!==!1&&(t.maxHeight=isNaN(t.maxHeight)?t.maxHeight:t.maxHeight+"px",e.style.maxHeight=t.maxHeight)}_initializeTable(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach(i=>{i.initialize()}),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach(i=>{i.initialize()}),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){return this.dataLoader.load(this.options.data).finally(()=>{this.columnManager.verticalAlignHeaders()})}destroy(){var e=this.element;for(this.destroyed=!0,this.constructor.registry.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.destroy();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator"),this.externalEvents.dispatch("tableDestroyed")}_detectBrowser(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):e.indexOf("Mac OS")>-1?(this.browser="safari",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.slice(0,4))}initGuard(e,t){var i,r;return this.options.debugInitialization&&!this.initialized&&(e||(i=new Error().stack.split(`
54
- `),r=i[0]=="Error"?i[2]:i[1],r[0]==" "?e=r.trim().split(" ")[1].split(".")[1]:e=r.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise((i,r)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(s=>{var a=this.rowManager.findRow(s[this.options.index]);a?(t++,a.updateData(s).then(()=>{t--,t||i()}).catch(o=>{r("Update Error - Unable to update row",s,o)})):r("Update Error - Unable to find row",s)}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})}addData(e,t,i){return this.initGuard(),new Promise((r,s)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e?this.rowManager.addRows(e,t,i).then(a=>{var o=[];a.forEach(function(u){o.push(u.getComponent())}),r(o)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise((r,s)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(a=>{var o=this.rowManager.findRow(a[this.options.index]);i++,o?o.updateData(a).then(()=>{i--,t.push(o.getComponent()),i||r(t)}):this.rowManager.addRows(a).then(u=>{i--,t.push(u[0].getComponent()),i||r(t)})}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),Array.isArray(e)||(e=[e]);for(let i of e){let r=this.rowManager.findRow(i,!0);if(r)t.push(r);else return console.error("Delete Error - No matching row found:",i),Promise.reject("Delete Error - No matching row found")}return t.sort((i,r)=>this.rowManager.rows.indexOf(i)>this.rowManager.rows.indexOf(r)?1:-1),t.forEach(i=>{i.delete()}),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(e,t,i){return this.initGuard(),typeof e=="string"&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i,!0).then(r=>r[0].getComponent())}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>i.getComponent()):this.rowManager.addRows(t).then(r=>r[0].getComponent())}updateRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>Promise.resolve(i.getComponent())):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}scrollToRow(e,t,i){var r=this.rowManager.findRow(e);return r?this.rowManager.scrollToRow(r,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}moveRow(e,t,i){var r=this.rowManager.findRow(e);this.initGuard(),r?r.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}getColumns(e){return this.columnManager.getComponents(e)}getColumn(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.show();else return console.warn("Column Show Error - No matching column found:",e),!1}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.hide();else return console.warn("Column Hide Error - No matching column found:",e),!1}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.visible?t.hide():t.show();else return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1}addColumn(e,t,i){var r=this.columnManager.findColumn(i);return this.initGuard(),this.columnManager.addColumn(e,t,r).then(s=>s.getComponent())}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}updateColumnDefinition(e,t){var i=this.columnManager.findColumn(e);return this.initGuard(),i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}moveColumn(e,t,i){var r=this.columnManager.findColumn(e),s=this.columnManager.findColumn(t);this.initGuard(),r?s?this.columnManager.moveColumn(r,s,i):console.warn("Move Error - No matching column found:",s):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,i){return new Promise((r,s)=>{var a=this.columnManager.findColumn(e);return a?this.columnManager.scrollToColumn(a,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))})}redraw(e){this.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}setHeight(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw(!0)}on(e,t){this.externalEvents.subscribe(e,t)}off(e,t){this.externalEvents.unsubscribe(e,t)}dispatchEvent(){var e=Array.from(arguments);e.shift(),this.externalEvents.dispatch(...arguments)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}modExists(e,t){return this.modules[e]?!0:(t&&console.error("Tabulator Module Not Installed: "+e),!1)}module(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}var fn=ri;class ak extends fn{static extendModule(){fn.initializeModuleBinder(ba),fn._extendModule(...arguments)}static registerModule(){fn.initializeModuleBinder(ba),fn._registerModule(...arguments)}constructor(e,t,i){super(e,t,ba)}}var ok=ak;const lk={key:0,class:"bi bi-chevron-up"},uk={key:1,class:"bi bi-chevron-down"},ck=Ve({__name:"SubFilterToggleBtn",props:["modelValue"],emits:["update:modelValue"],setup(n,{emit:e}){const t=e,i=n,r=()=>{t("update:modelValue",!i.modelValue)};return(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:"icon",onClick:r},[n.modelValue?(l.openBlock(),l.createElementBlock("i",lk)):(l.openBlock(),l.createElementBlock("i",uk))]))}},[["__scopeId","data-v-4810f2ed"]]),Rc={gender:{MALE:1,FEMALE:2,MIXED_GENDER:3,NOT_GENDER:4},address_fields:["postal_code","region_code","district_code","locality_code","sub_locality_code","street_code","house","flat"],userRoles:{ADMIN:1,VETERINARIAN:2,SHTP:3,LOCAL_EPIZOOTOLOGIST:4,ORGANIZATION_ADMIN:5,REGIONAL_REPRESENTATIVE:6,AGENCY:7,CENTRAL_WAREHOUSE:8,DISTRICT_REPRESENTATIVE:9,COUNTERPARTY:10,VETERINARIAN_REGISTRATOR:11,LABORATORY:12,INTEGRATOR:13},timeTypes:{HOUR:1,DAY:2,WEEK:3,MONTH:4,YEAR:5},defaultTableOptions:{headerSortClickElement:"icon",printAsHtml:!0,printConfig:{},reactiveData:!0,movableColumns:!0,layout:"fitDataFill",layoutColumnsOnNewData:!0,resizableColumnFit:!0,pagination:!0,paginationMode:"remote",paginationCounter:"rows",paginationSize:10,columns:[]},customPerPageOptions:[{id:10,label:10},{id:40,label:40},{id:100,label:100},{id:150,label:150},{id:200,label:200}],bird_ids:[19,20,21,22,23,24,25],fish_ids:[38,39,40,41,42],animal_kinds:{COW:1,PIG:2,HORSE:3,BEE:4,DOG:5,CAT:6,DEER:7,MARAL:8,CAMEL:9,DONKEY:10,BISON:11,GOST:12,SHEEP:13,MULE:14,LOSHAK:15,ZEBU:16,BUFFALO:17,GRUNTING_OX:18,CHICKEN:19,DUCK:20,GOOSE:21,TURKEY:22,GUINEA_FOWL:23,QUAIL:24,OSTRICH:25,FOX:26,SABLE:27,MINK:28,FERRET:29,RABBIT:30,ARCTIC_FOX:31,RACCOON_DOG:32,NUTRIA:33,ALPACAS:34,PHEASANT:35,PEACOCK:36,RACCOON:37,STURGEON:38,SALMON:39,CARP:40,CATFISH:41,BASS:42},mask_regex:{INTEGER:"^[0-9]*$",DECIMAL:"^[0-9]{1,10}[.]?[0-9]{1}$",HUNDREDTHS:"^([0]{1}[.][0-9]{1,2}|[1-9][0-9]*[.]?[0-9]{1,2})$",THOUSANDS:"^([0]{1}[.][0-9]{1,2}|[1-9][0-9]*[.]?[0-9]{1,3})$",NO_LIMIT_AFTER_DOT:"^[0-9]{1,10}[.]?[0-9]*$",ABOVE_ONE:"^[1-9]+[0-9]*$",NO_START_SPACE:"^[^ ]+.*$",NO_SPACE:"[^ ]*"}};Object.preventExtensions(Rc);const dk={class:"position-relative",style:{"min-height":"300px"}},hk={key:0,class:"tabulator hide-to-print sticky-bottom bg-white"},fk={class:"row"},pk={key:0,class:"col-auto"},mk={class:"col"},gk={class:"tabulator-footer",ref:"footer"},bk=["id"],vk=["disabled"],yk={key:0,class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"},wk="",Ck=l.defineComponent({__name:"Table",props:{langs:{type:Object,default:()=>({})},paginationPage:{type:Number,default:null},locale:{type:String,default:"ru"},columnHide:{type:String,default:""},columnShow:{type:String,default:""},options:{type:Object,default:()=>({})},filters:{type:[Array,Function,Object],default:()=>[]},tableData:{type:Array,default:()=>[]},showAllColumnsIfAllHidden:{type:Boolean,default:!1},parentComponent:{type:Object,default:()=>({})},selectedRowsStorage:{type:Array,default:()=>[]},isVisibleColumnSubFilter:{type:Boolean,default:null},loadMoreText:{type:String,default:"Load More"}},emits:["selectedRow","unselectedRow","updateSelectedRows","updateUnselectedRows","updateTable","onHideColumn","onShowColumn","onTableRowClick","onCellClick","onTableRowMoved","pageLoaded","savePaginationPage","updateIsVisibleColumnSubFilter"],setup(n,{emit:e}){const t=n,i=e,r=l.inject("selectedTabIndex",l.ref()),s=l.inject("selectAll",l.ref(0)),a=l.ref(""),o=l.ref(null),u=l.ref({data:[],rows:[]}),c=l.ref(new Set(t.selectedRowsStorage)),d=l.ref(!1),p=l.ref(di()),h=l.ref(null),f=l.ref(null),_=l.ref(!1),k=l.computed(()=>t.options?.paginationMode==="remote"),C=l.computed(()=>Rc.customPerPageOptions),y=l.useSlots(),v=B=>!!y[B],R=()=>{a.value=""},m=B=>!B||!B.length?[]:B.map(Z=>Z),x=()=>({}),g=()=>{if(!h.value)return;const B=h.value.querySelector(".tabulator-header");!B||t.isVisibleColumnSubFilter===null||Xi(B,ck,{modelValue:t.isVisibleColumnSubFilter,"onUpdate:modelValue":Z=>i("updateIsVisibleColumnSubFilter",Z)})},S=()=>{if(!h.value)return;const B=h.value.querySelector(".tabulator-header");B&&(B.classList.add("position-relative"),g())},w=()=>{if(!f.value)return;const B=h.value?.parentNode?.querySelector(".tabulator-footer"),Z=f.value.last_page;if(!Z||isNaN(+Z)){B&&B.classList.add("d-none");return}Z>1?B&&B.classList.remove("d-none"):B&&B.classList.add("d-none")},E=()=>{_.value=!0},b=()=>{_.value=!1},T=()=>{_.value=!1},M=()=>{d.value=!0,i("updateTable",f.value),f.value&&(f.value.setLocale(t.locale),f.value.selectRow(Array.from(c.value)))},O=B=>{setTimeout(()=>{i("savePaginationPage",B)}),k.value&&w(),s.value>0&&i("pageLoaded"),_.value=!1,S()},F=B=>{const Z=B.getData(),K=f.value?.options?.index||"id",U=Z[K]??null;U!==null&&(c.value.add(U),u.value.data.push(Z),u.value.rows.push(B),i("updateSelectedRows",{data:u.value.data,row:u.value.rows}),i("selectedRow",{data:Z,row:B}))},z=B=>{const Z=B.getData(),K=f.value?.options?.index||"id",U=Z[K]??null;if(U===null)return;c.value.delete(U);const le=u.value.data.findIndex(re=>re[K]===U);le!==-1&&(u.value.data.splice(le,1),u.value.rows.splice(le,1)),i("updateUnselectedRows",{data:Z,row:B}),i("unselectedRow",{data:Z,row:B})},$=function(){f.value&&f.value.selectRow(Array.from(c.value)),_.value=!0},H=(B,Z)=>{if(Z?._cell?.column?.definition?.hasCellClickHandler){i("onCellClick",B,Z);return}const K=[],U=B.target;for(let le=0;le<U.childNodes.length;le++){const re=U.childNodes[le];re.nodeName==="INPUT"&&re.type==="checkbox"&&K.push("checkbox")}K.includes("checkbox")||i("onTableRowClick",B,Z._cell.row,t.parentComponent)},V=B=>{f.value&&i("onTableRowMoved",f.value.getColumnLayout())},G=()=>{setTimeout(()=>{_.value=!0})},D=()=>{setTimeout(()=>{_.value=!1,W()})},P=()=>{d.value=!1},I=()=>{if(!h.value)return;_.value=!0;const B={...t.options,data:t.tableData,langs:t.langs||x(),columns:m(t.options.columns),dataLoaderLoading:`<img alt="" src="${wk}">`,placeholder:"Ничего не найдено",ajaxResponse:function(Z,K,U){return this.last_page=U.last_page,U.data}};k.value&&(B.footerElement=`#tabulator-footer${p.value}`),f.value=new ok(h.value,B),f.value.on("dataLoading",E),f.value.on("dataLoaded",b),f.value.on("dataLoadError",T),f.value.on("tableBuilt",M),f.value.on("pageLoaded",O),f.value.on("rowSelected",F),f.value.on("rowDeselected",z),f.value.on("dataProcessed",$),f.value.on("cellClick",H),f.value.on("columnMoved",V),f.value.on("renderStarted",G),f.value.on("renderComplete",D),f.value.on("tableDestroyed",P)},N=B=>{if(!d.value||!B||!f.value)return;const Z=f.value.options.ajaxParams;Z&&(Z.per_page=Number(B)),f.value.options.paginationSize=Number(B),f.value.setPageSize(B)},Y=()=>{if(!f.value)return;const B=640,Z=f.value.options;if(k.value)Z.ajaxParams?.per_page<B&&(Z.ajaxParams.per_page+=40),f.value.setData();else{const K=f.value.getPageSize();typeof K=="number"&&K<B&&f.value.setPageSize(K+40)}Z.paginationSize>=B&&(a.value="Необходимо воспользоваться переходом по страницам")},X=B=>{B!==""&&f.value&&(f.value.showColumn(B),i("onShowColumn",f.value.getColumnLayout()))},ne=B=>{B!==""&&f.value&&(f.value.hideColumn(B),i("onHideColumn",f.value.getColumnLayout()))},se=B=>{f.value&&(B.filter(({visible:Z})=>!Z).length===B.length?B.map(({field:Z})=>{l.nextTick(()=>f.value?.showColumn(Z))}):B.map(({field:Z,visible:K})=>{K?f.value?.showColumn(Z):f.value?.hideColumn(Z)}))},W=()=>{l.nextTick(()=>{if(!f.value||f.value.getPage()!==1||!t.paginationPage||t.paginationPage===f.value.getPage())return!1;f.value.setPage(t.paginationPage)})};return l.onMounted(()=>{I()}),l.onBeforeUnmount(()=>{f.value&&f.value.destroy()}),l.watch(()=>t.columnShow,B=>{B&&X(B)}),l.watch(()=>t.columnHide,B=>{B&&ne(B)}),l.watch(()=>t.filters,B=>{f.value&&f.value.setFilter(B)},{deep:!0}),l.watch(()=>t.tableData,B=>{f.value&&!k.value&&f.value.setData(B)},{deep:!1}),l.watch(r,()=>{f.value&&f.value.deselectRow()}),l.watch(s,B=>{B>0&&f.value&&f.value.selectRow()}),l.watch(()=>t.options.columns,B=>{!d.value||!f.value||!B||(!B.find(({visible:Z})=>Z)&&t.showAllColumnsIfAllHidden?se(B):f.value.setColumns(B))},{deep:!0}),l.watch(()=>t.selectedRowsStorage,B=>{B&&(c.value=new Set(B))},{deep:!0}),l.watch(d,B=>{B&&(t.showAllColumnsIfAllHidden&&se(t.options.columns||[]),t.tableData.length>0&&f.value?.setData(t.tableData))},{deep:!0}),(B,Z)=>(l.openBlock(),l.createElementBlock("div",dk,[l.createElementVNode("div",{ref_key:"tableRef",ref:h},null,512),k.value?(l.openBlock(),l.createElementBlock("div",hk,[l.createElementVNode("div",fk,[v("table-footer-left")?(l.openBlock(),l.createElementBlock("div",pk,[l.renderSlot(B.$slots,"table-footer-left")])):l.createCommentVNode("",!0),l.createElementVNode("div",mk,[l.createElementVNode("div",gk,[l.createElementVNode("div",{class:"tabulator-footer-contents d-flex",id:`tabulator-footer${p.value}`},[l.createElementVNode("button",{class:"btn btn-primary me-3",id:"loadMoreButton",onClick:Y,disabled:_.value},[l.createTextVNode(l.toDisplayString(n.loadMoreText)+" ",1),Z[2]||(Z[2]=l.createElementVNode("i",{class:"bi bi-plus-lg"},null,-1)),_.value?(l.openBlock(),l.createElementBlock("div",yk)):l.createCommentVNode("",!0)],8,vk),l.createVNode(Xt,{class:"me-3",style:{"min-width":"150px"},modelValue:o.value,"onUpdate:modelValue":[Z[0]||(Z[0]=K=>o.value=K),Z[1]||(Z[1]=K=>N(K))],allowClear:!1,options:C.value,dropDownPlacement:"top"},null,8,["modelValue","options"])],8,bk)],512)])])])):l.createCommentVNode("",!0),l.createVNode(vc,{message:a.value,onClearMessage:R},null,8,["message"])]))}}),Ek={class:"r3-table-count__wrapper px-3"},kk={class:"r3-table-count__label pe-2"},Sk={class:"r3-table-count__value"},xk=Ve(l.defineComponent({__name:"TableCount",props:{label:{default:""},count:{default:0},defaultLabel:{default:"-"},defaultCount:{default:"-"},size:{default:"medium"},showSeparator:{type:Boolean,default:!0}},setup(n){const e=n,t=l.computed(()=>e.label||e.defaultLabel),i=l.computed(()=>e.count===null||e.count===void 0||e.count===""?e.defaultCount:e.count);return(r,s)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["r3-table-count",[`r3-table-count--${r.size}`]])},[l.createElementVNode("div",Ek,[l.createElementVNode("span",kk,l.toDisplayString(t.value)+":",1),l.createElementVNode("span",Sk,l.toDisplayString(i.value),1)])],2))}}),[["__scopeId","data-v-51c6483c"]]),_k=Ve(l.defineComponent({__name:"ColumnSubFilter",props:{tableRefEl:{default:void 0},columnField:{default:""},mountedComponent:{default:void 0},dataProps:{default:()=>({})},table:{default:void 0},isVisible:{type:Boolean,default:!1}},setup(n){const e=n;function t(){if(!e?.tableRefEl)return!1;const i=`[tabulator-field='${e.columnField}']`,r=e.tableRefEl?.querySelector(i);if(!e.table||!r)return!1;if(e.isVisible&&r&&e.mountedComponent)return Xi(r,e.mountedComponent,e.dataProps),!1;Xi(r,null,{},!0)}return l.watch(()=>e,()=>{t()},{deep:!0}),l.onMounted(()=>{t()}),(i,r)=>null}}),[["__scopeId","data-v-0ddbb5a3"]]),Mk=Ve(l.defineComponent({__name:"TableAppliedFiltersStorage",props:{tableName:{},filters:{}},emits:["update:filters"],setup(n,{expose:e,emit:t}){const i=n,r=t,s=l.computed(()=>"default-page"),a=l.toRef(i,"filters");function o(){let h=localStorage.getItem("filters"),f=h?JSON.parse(h):{};f={...ii(f),[s.value]:{[i.tableName]:d(a.value)}};const _=JSON.stringify(f);return localStorage.setItem("filters",_),h=localStorage.getItem("filters"),h?JSON.parse(h):{}}function u(h){return!(!h||!h[s.value]||!h[s.value][i.tableName])}function c(h){const f=JSON.parse(h);return u(f)?(h=localStorage.getItem("filters")||"{}",JSON.parse(h)):o()}function d(h){const f={};for(const[_,k]of Object.entries(h))f[_]=ii(k._value||k);return f}function p(){let h=localStorage.getItem("filters");if(!h)return r("update:filters",{}),!1;let f=c(h);if(!f[s.value]||!f[s.value][i.tableName])return r("update:filters",{}),!1;const _=d(f[s.value][i.tableName]);return r("update:filters",{..._}),!0}return e({getFilters:p,saveFilters:o}),(h,f)=>l.createCommentVNode("",!0)}}),[["__scopeId","data-v-08a5ac04"]]),Rk={class:"row pt-3"},Tk={class:"col-12"},Dk=["onClick"],Ok=Ve(l.defineComponent({__name:"TableQuickFilterComponent",props:{filterList:{},defaultSelected:{default:""}},emits:["emitSelected"],setup(n,{emit:e}){const t=e,i=r=>{t("emitSelected",r)};return(r,s)=>(l.openBlock(),l.createElementBlock("div",Rk,[l.createElementVNode("div",Tk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.filterList,(a,o)=>(l.openBlock(),l.createElementBlock("button",{onClick:u=>i(a.name),class:l.normalizeClass(["btn filter-item",{active:r.defaultSelected===a.name,disabled:a.disabled}]),key:o},l.toDisplayString(a.title),11,Dk))),128))])]))}}),[["__scopeId","data-v-cdf25b7c"]]),Lk={key:0,class:"col-4 mb-2"},Pk={class:"form-check"},Ak=["onUpdate:modelValue","checked","id","onChange"],Fk=["for"],Bk=["innerHTML"],Nk={class:"col-auto"},Vk={class:"col-auto ps-0"},Hk={class:"col-auto ps-0"},zk=Ve(l.defineComponent({__name:"EditTableColumns",props:{title:{default:"Данные для отображения в таблице"},modalVisibility:{type:Boolean,default:!1},columns:{default:()=>[]},applyText:{default:"Применить"},selectAllText:{default:"Выбрать все"},unselectAllText:{default:"Снять все"}},emits:["emitModalVisibility","columnVisibilityChange","apply","selectAll","unselectAll"],setup(n,{emit:e}){const t=n,i=e,r=l.computed(()=>t.columns.some(d=>!d.visible)),s=d=>{i("emitModalVisibility",d)},a=(d,p)=>{i("columnVisibilityChange",d,p)},o=()=>{i("apply")},u=()=>{i("selectAll")},c=()=>{i("unselectAll")};return(d,p)=>(l.openBlock(),l.createBlock(mc,{title:d.title,"modal-visibility":d.modalVisibility,onEmitModalVisibility:s},{"modal-body":l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.columns,(h,f)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:f},[h.title?(l.openBlock(),l.createElementBlock("div",Lk,[l.createElementVNode("div",Pk,[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":_=>h.visible=_,checked:h.visible,class:"form-check-input",type:"checkbox",id:h.field,ref_for:!0,ref:"editColumns",onChange:_=>a(_,h.field)},null,40,Ak),[[l.vModelCheckbox,h.visible]]),l.createElementVNode("label",{class:"form-check-label",for:h.field},[l.createElementVNode("span",{innerHTML:h.title},null,8,Bk)],8,Fk)])])):l.createCommentVNode("",!0)],64))),128))]),"modal-footer":l.withCtx(()=>[l.createElementVNode("div",Nk,[l.createElementVNode("button",{type:"button",class:"btn btn-primary px-4",onClick:o},l.toDisplayString(d.applyText),1)]),l.createElementVNode("div",Vk,[l.createElementVNode("div",Hk,[r.value?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:"btn btn-light",onClick:u},l.toDisplayString(d.selectAllText),1)):l.createCommentVNode("",!0),r.value?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:1,type:"button",class:"btn btn-light",onClick:c},l.toDisplayString(d.unselectAllText),1))])])]),_:1},8,["title","modal-visibility"]))}}),[["__scopeId","data-v-0faf3a19"]]),Ik={"data-test":"ToggleAllTableRowButtons",class:"toggle-all-rows-controls"},$k={key:2,class:"selected-count"},jk=Ve(l.defineComponent({__name:"ToggleAllTableRowButtons",props:{selectedRows:{default:()=>[]},selectAllText:{default:"Выбрать все"},unselectAllText:{default:"Снять все"},selectedText:{default:"Выбрано"},showCount:{type:Boolean,default:!0}},emits:["selectAll","unselectAll"],setup(n,{emit:e}){const t=e,i=()=>{t("selectAll")},r=()=>{t("unselectAll")};return(s,a)=>(l.openBlock(),l.createElementBlock("div",Ik,[s.selectedRows.length>0?(l.openBlock(),l.createElementBlock("button",{key:0,class:"btn btn-light me-3",onClick:r},l.toDisplayString(s.unselectAllText),1)):l.createCommentVNode("",!0),s.selectedRows.length===0?(l.openBlock(),l.createElementBlock("button",{key:1,class:"btn btn-primary me-3",onClick:i},l.toDisplayString(s.selectAllText),1)):l.createCommentVNode("",!0),s.showCount?(l.openBlock(),l.createElementBlock("div",$k,l.toDisplayString(s.selectedText)+": "+l.toDisplayString(s.selectedRows.length),1)):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-010ff090"]]),Wk={class:"row pt-3"},Gk={class:"col-12"},Yk=["onClick"],Uk=Ve(l.defineComponent({__name:"MultipleQuickFilterComponent",props:{filterList:{},defaultSelected:{default:()=>({})}},emits:["emitSelected"],setup(n,{emit:e}){const t=n,i=e,r=s=>{t.filterList[s].disabled||(t.filterList[s].value=!t.filterList[s].value,i("emitSelected",t.filterList))};return l.watch(()=>t.defaultSelected,s=>{s&&Object.keys(s).length>0&&t.filterList.forEach((a,o)=>{const u=Object.keys(s)[o];u&&s[u]!==void 0&&(a.value=s[u])})},{immediate:!0}),(s,a)=>(l.openBlock(),l.createElementBlock("div",Wk,[l.createElementVNode("div",Gk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.filterList,(o,u)=>(l.openBlock(),l.createElementBlock("button",{onClick:c=>r(u),class:l.normalizeClass(["btn filter-item",{active:s.filterList[u].value,disabled:s.filterList[u].disabled}]),key:u},l.toDisplayString(o.title),11,Yk))),128))])]))}}),[["__scopeId","data-v-1a1bfba2"]]),qk=["title"],Kk=Ve(l.defineComponent({__name:"QuestionIcon",props:{title:{default:""},size:{default:"md"},color:{default:"#999999"},iconClass:{default:""},tooltipPosition:{default:"top"},clickToShow:{type:Boolean,default:!0}},setup(n){const e=n,t=l.ref(),i=l.ref(!1),r=l.computed(()=>({color:e.color})),s=l.computed(()=>{switch(e.size){case"sm":return"question-icon--sm";case"lg":return"question-icon--lg";default:return"question-icon--md"}}),a=l.computed(()=>`question-tooltip--${e.tooltipPosition}`),o=()=>{e.clickToShow&&e.title&&(i.value=!i.value)},u=c=>{t.value&&!t.value.contains(c.target)&&(i.value=!1)};return l.onMounted(()=>{e.clickToShow&&document.addEventListener("click",u)}),l.onUnmounted(()=>{e.clickToShow&&document.removeEventListener("click",u)}),(c,d)=>(l.openBlock(),l.createElementBlock("div",{class:"question-icon-wrapper",ref_key:"wrapperRef",ref:t},[l.createElementVNode("i",{class:l.normalizeClass(["bi bi-question-circle-fill question-icon",[c.iconClass,s.value]]),title:c.title,style:l.normalizeStyle(r.value),onClick:o},null,14,qk),i.value&&c.title?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["question-tooltip",a.value])},[l.createTextVNode(l.toDisplayString(c.title)+" ",1),d[0]||(d[0]=l.createElementVNode("div",{class:"question-tooltip-arrow"},null,-1))],2)):l.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-2c102103"]]),Jk={class:"container-fluid rounded overflow-hidden bg-light"},Xk={class:"row w-100"},Zk={class:"text-secondary"},Qk={class:"d-flex py-3 px-2 onlyPrint"},e1={class:"row w-100"},t1={class:"text-secondary"},i1={class:"row"},n1=Ve(l.defineComponent({__name:"FilterValuesPanel",props:{filterValues:{default:null},filterTitles:{}},emits:["showFilter"],setup(n,{emit:e}){const t=n,i=l.ref(!1),r=l.ref([]);return l.computed(()=>t.filterValues?Object.entries(t.filterValues).filter(([s,a])=>a).map(([s,a])=>({name:t.filterTitles[s]||s,value:String(a),key:s})):[]),l.watch(()=>t.filterValues,s=>{if(!s){r.value=[];return}r.value=Object.entries(s).filter(([a,o])=>o).map(([a,o])=>({name:t.filterTitles[a]||a,value:String(o),key:a}))},{deep:!0,immediate:!0}),(s,a)=>(l.openBlock(),l.createElementBlock("div",Jk,[l.createElementVNode("div",{style:l.normalizeStyle({overflow:"hidden",maxHeight:i.value?"initial":"83px"}),class:"d-flex py-3 px-2 noPrint"},[l.createElementVNode("div",Xk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,(o,u)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["mb-2",u===r.value.length-1?"col":"col-auto"]),key:o.key},[l.createElementVNode("div",Zk,l.toDisplayString(o.name)+":",1),l.createElementVNode("div",null,[l.createElementVNode("strong",null,l.toDisplayString(o.value),1)])],2))),128))]),l.createElementVNode("div",null,[l.createElementVNode("div",{role:"button",class:"expand-btn expand-btn-right rounded",onClick:a[0]||(a[0]=o=>s.$emit("showFilter"))},[...a[2]||(a[2]=[l.createElementVNode("i",{class:"bi bi-chevron-right i-hidden"},null,-1)])])])],4),l.createElementVNode("div",Qk,[l.createElementVNode("div",e1,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,(o,u)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["mb-2",u===r.value.length-1?"col":"col-auto"]),key:o.key},[l.createElementVNode("div",t1,l.toDisplayString(o.name)+":",1),l.createElementVNode("div",null,[l.createElementVNode("strong",null,l.toDisplayString(o.value),1)])],2))),128))])]),l.createElementVNode("div",i1,[l.createElementVNode("div",{role:"button",class:"expand-btn expand-btn-bottom hide-to-print",onClick:a[1]||(a[1]=o=>i.value=!i.value)},[l.createElementVNode("i",{class:l.normalizeClass({"bi lh-normal":!0,"bi-chevron-down":!i.value,"bi-chevron-up":i.value})},null,2)])])]))}}),[["__scopeId","data-v-9dc91069"]]),Tc=(n={})=>{n.hasOwnProperty("KEY")||(n.KEY="tables");const{KEY:e}=n;function t(a,o){const u=localStorage.getItem(e);let c=JSON.parse(u);return c={...c,[a]:o},localStorage.setItem(e,JSON.stringify(c)),!0}function i(a){return a?(localStorage.setItem(e,JSON.stringify(a)),!0):!1}function r(a){const o=localStorage.getItem(e),u=JSON.parse(o);return u?.hasOwnProperty(a)&&delete u[a],i(u),!0}function s(a){const o=localStorage.getItem(e);return(JSON.parse(o)||{})[a]||null}return{setItemStorage:t,removeItemStorage:r,getItemStorage:s}},r1=({localStorageKey:n=null,getAjaxUrl:e,getAjaxResponse:t,getColumns:i,tableOptions:r,initialFilters:s=()=>({empty:"empty"}),initialFilterTitles:a=()=>({empty:"empty"}),selectedQuickFilter:o=null})=>{const u=l.ref({}),c=l.ref(0),d=l.ref(""),p=l.ref(""),h=l.ref({}),f=l.ref(!1),_=l.ref(!1),k=l.ref(s()),{setItemStorage:C,removeItemStorage:y,getItemStorage:v}=Tc();async function R(){k.value=s(),h.value={}}function m(D){if(!n)return!1;C(n,D)}const x=l.readonly({...a()});function g(D,P){h.value[D]=P}const S=l.computed(()=>Object.values(h.value).some(Boolean));function w(){c.value+=1}function E(D){if(!n)return!1;C(n,T(D))}async function b(){await F(),w(),f.value=!1}function T(D){return D.map(I=>{let N=JSON.parse(JSON.stringify(I));return I.visible===!1&&(delete N.width,delete N.minWidth),N})}function M(D){if(!n)return!1;C(n,T(D))}function O(){const D={};for(const[P,I]of Object.entries({...k.value}))!I||I?.length<1||Array.isArray(I)&&(I[0]===null||I[0]===void 0||I[0]==="")||(D[P]=I);return D}async function F(){const D=e(),P=await t(),I=V();r.value={...r.value,ajaxURL:D,ajaxResponse:P,columns:I,ajaxParams:{...r.value.ajaxParams,per_page:r.value.paginationSize}}}const z=l.computed(()=>{let D=[];return r.value.columns.map(P=>{P.title&&D.push(P.visible)}),D.includes(!1)});async function $(D,P){D.target.checked==!1?(d.value=P,p.value=""):(p.value=P,d.value="")}async function H(){y(n),r.value.columns=V()}function V(){const D=v(n);return D||i({selectedQuickFilter:o?.value})}async function G(){y(n),r.value.columns.map(D=>D.visible=!1),M(r.value.columns)}return l.provide("setFilterParamsStrings",g),l.provide("selectedFilterTitles",x),l.provide("tableFilters",k),l.provide("filterModalVisibility",f),l.provide("resetFilters",R),l.provide("applyFilters",b),l.provide("editTableColumnsModalVisibility",_),l.provide("tableOptions",r),l.provide("editTableColumnVisibility",$),l.provide("isTableCoumnsHidden",z),l.provide("unselectAllTableColumnCheckboxes",G),l.provide("selectAllTableColumnCheckboxes",H),{selectAllTableColumnCheckboxes:H,unselectAllTableColumnCheckboxes:G,isTableCoumnsHidden:z,editTableColumnVisibility:$,fetchData:F,onHideColumn:M,getFilterData:O,applyFilters:b,reRenderTable:w,resetFilters:R,onTableRowMoved:m,onShowColumn:E,table:u,tableKey:c,columnHide:d,columnShow:p,selectedFilterTitles:x,setFilterParamsStrings:g,filterParamsStrings:h,isSelectedFiltersVisible:S,filterModalVisibility:f,editTableColumnsModalVisibility:_,tableFilters:k,tableOptions:r}};Ce.AddButton=Ca,Ce.AddressForm=sy,Ce.AgeFromAgeTo=yy,Ce.BooleanCheckbox=lc,Ce.Card=mw,Ce.CardInfo=Sw,Ce.Checkbox=dg,Ce.ClearFormButton=jc,Ce.CollapseButton=Vc,Ce.ColumnSubFilter=_k,Ce.ConfirmationModal=Gy,Ce.CustomInput=$n,Ce.DefaultAccordion=lC,Ce.DefaultButton=Pc,Ce.DefaultDropDown=bc,Ce.DefaultModal=pc,Ce.Divider=gc,Ce.EditTableColumns=zk,Ce.EditTableColumnsModalComponent=mc,Ce.ErrorMessageComponent=iC,Ce.ExportButton=Hc,Ce.ExportComponent=Od,Ce.FilterValuesPanel=n1,Ce.Flatpickr=Hv,Ce.FormError=hi,Ce.HeaderSearchForm=jv,Ce.Icon=cr,Ce.KindCheckboxesAccordion=wC,Ce.MultiCheckbox=Cv,Ce.MultiInput=_v,Ce.MultipleQuickFilterComponent=Uk,Ce.PageCard=qw,Ce.PageTitle=hw,Ce.PasswordInput=og,Ce.PrintButton=zc,Ce.QuestionIcon=Kk,Ce.Spinner=ur,Ce.Table=Ck,Ce.TableAppliedFiltersStorage=Mk,Ce.TableCount=xk,Ce.TableFilterModalComponent=Qy,Ce.TableQuickFilterComponent=Ok,Ce.Toast=vc,Ce.ToggleAllTableRowButtons=jk,Ce.ToggleButtons=Yc,Ce.VSelect=Xt,Ce.helpers=eg,Ce.useTableDefault=r1,Ce.useTableStorage=Tc,Object.defineProperty(Ce,Symbol.toStringTag,{value:"Module"})}));