UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1 lines 1.67 MB
(function(te,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("lodash-es"),require("bignumber.js"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","bignumber.js","@vueuse/core"],t):(te=typeof globalThis<"u"?globalThis:te||self,t(te.FarrisVue={},te.vue,te.lodashEs,te.BigNumber,te.core))})(this,function(te,t,ue,Ke,Ia){"use strict";var vR=Object.defineProperty;var CR=(te,t,ue)=>t in te?vR(te,t,{enumerable:!0,configurable:!0,writable:!0,value:ue}):te[t]=ue;var q=(te,t,ue)=>CR(te,typeof t!="symbol"?t+"":t,ue);const Fo={},Ml={};function Il(e){const{properties:n,title:o,ignore:a}=e,i=a&&Array.isArray(a),r=Object.keys(n).reduce((l,s)=>((!i||!a.find(d=>d===s))&&(l[s]=n[s].type==="object"&&n[s].properties?Il(n[s]):ue.cloneDeep(n[s].default)),l),{});if(o&&(!i||!a.find(l=>l==="id"))){const l=o.toLowerCase().replace(/-/g,"_");r.id=`${l}_${Math.random().toString().slice(2,6)}`}return r}function Gb(e){const{properties:n,title:o,required:a}=e;if(a&&Array.isArray(a)){const i=a.reduce((r,l)=>(r[l]=n[l].type==="object"&&n[l].properties?Il(n[l]):ue.cloneDeep(n[l].default),r),{});if(o&&a.find(r=>r==="id")){const r=o.toLowerCase().replace(/-/g,"_");i.id=`${r}_${Math.random().toString().slice(2,6)}`}return i}return{type:o}}function $t(e,n={},o){const a=Fo[e];if(a){let i=Gb(a);const r=Ml[e];return i=r?r({getSchemaByType:$t},i,n,o):i,i}return null}function Pl(e,n){const o=Il(n);return Object.keys(o).reduce((a,i)=>(Object.prototype.hasOwnProperty.call(e,i)&&(a[i]&&ue.isPlainObject(a[i])&&ue.isPlainObject(e[i]||!e[i])?Object.assign(a[i],e[i]||{}):a[i]=e[i]),a),o),o}function El(e,n){return Object.keys(e).filter(a=>e[a]!=null).reduce((a,i)=>{if(n.has(i)){const r=n.get(i);if(typeof r=="string")a[r]=e[i];else{const l=r(i,e[i],e);Object.assign(a,l)}}else a[i]=e[i];return a},{})}function uu(e,n,o=new Map){const a=Pl(e,n);return El(a,o)}function $l(e){var o;const n=e.type;if(n){const a=Fo[n];if(!a)return e;const i=Pl(e,a),r=((o=e.editor)==null?void 0:o.type)||"";if(r){const l=Fo[r],s=Pl(e.editor,l);i.editor=s}return i}return e}function Yb(e={}){function n(c,f,u,m){if(typeof u=="number")return m[c].length===u;if(typeof u=="object"){const h=Object.keys(u)[0],p=u[h];if(h==="not")return Number(m[c].length)!==Number(p);if(h==="moreThan")return Number(m[c].length)>=Number(p);if(h==="lessThan")return Number(m[c].length)<=Number(p)}return!1}function o(c,f,u,m){return m[c]&&m[c].propertyValue&&String(m[c].propertyValue.value)===String(u)}const a=new Map([["length",n],["getProperty",o]]);Object.keys(e).reduce((c,f)=>(c.set(f,e[f]),c),a);function i(c,f){const u=c;return typeof f=="number"?[{target:u,operator:"length",param:null,value:Number(f)}]:typeof f=="boolean"?[{target:u,operator:"getProperty",param:c,value:!!f}]:typeof f=="object"?Object.keys(f).map(m=>{if(m==="length")return{target:u,operator:"length",param:null,value:f[m]};const h=m,p=f[m];return{target:u,operator:"getProperty",param:h,value:p}}):[]}function r(c){return Object.keys(c).reduce((u,m)=>{const h=i(m,c[m]);return u.push(...h),u},[])}function l(c,f){if(a.has(c.operator)){const u=a.get(c.operator);return u&&u(c.target,c.param,c.value,f)||!1}return!1}function s(c,f){return r(c).reduce((h,p)=>h&&l(p,f),!0)}function d(c,f){const u=Object.keys(c),m=u.includes("allOf"),h=u.includes("anyOf"),p=m||h,v=(p?c[p?m?"allOf":"anyOf":"allOf"]:[c]).map(w=>s(w,f));return m?!v.includes(!1):v.includes(!0)}return{parseValueSchema:d}}const Kb={convertTo:(e,n,o,a)=>{e.appearance||(e.appearance={}),e.appearance[n]=o},convertFrom:(e,n,o)=>e.appearance?e.appearance[n]:e[n]},Xb={convertFrom:(e,n,o)=>e.buttons&&e.buttons.length?`共 ${e.buttons.length} 项`:"无"},Zb={convertTo:(e,n,o,a)=>{e.editor&&(e.editor[n]=o)},convertFrom:(e,n,o)=>e.editor&&Object.prototype.hasOwnProperty.call(e.editor,n)?e.editor[n]:e[n]},ge={button:{type:"button",name:"按钮"},"response-toolbar":{type:"response-toolbar",name:"工具栏"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮"},"content-container":{type:"content-container",name:"容器"},"input-group":{type:"input-group",name:"文本"},textarea:{type:"textarea",name:"多行文本"},lookup:{type:"lookup",name:"帮助"},"number-spinner":{type:"number-spinner",name:"数值"},"date-picker":{type:"date-picker",name:"日期"},switch:{type:"switch",name:"开关"},"radio-group":{type:"radio-group",name:"单选组"},"check-box":{type:"check-box",name:"复选框"},"check-group":{type:"check-group",name:"复选框组"},"combo-list":{type:"combo-list",name:"下拉列表"},"response-form":{type:"response-form",name:"卡片面板"},"response-layout":{type:"response-layout",name:"布局容器",icon:"response-layout-3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"response-layout-1"},"tree-grid":{type:"tree-grid",name:"树表格"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块"},component:{type:"component",name:"组件"},tabs:{type:"tabs",name:"标签页"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮"},"html-template":{type:"html-template",name:"模板容器"},"time-picker":{type:"time-picker",name:"时间选择"},section:{type:"section",name:"分组面板"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传"},"page-header":{type:"page-header",name:"页头"},"page-footer":{type:"page-footer",name:"页脚"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏"},fieldset:{type:"fieldset",name:"分组"},"query-solution":{type:"query-solution",name:"筛选方案"},drawer:{type:"drawer",name:"抽屉"},"external-container":{type:"external-container",name:"外部容器",icon:"content-container"},"list-nav":{type:"list-nav",name:"列表导航"},"filter-bar":{type:"filter-bar",name:"筛选条"}},Qb={convertFrom:(e,n,o)=>{var i;const a=e.editor&&e.editor[n]?e.editor[n]:e[n];return((i=ge[a])==null?void 0:i.name)||a}},Jb={convertTo:(e,n,o,a)=>{e[n]=e[n]},convertFrom:(e,n,o)=>e.editor?o.getRealEditorType(e.editor.type):""},ev={convertFrom:(e,n)=>e.binding?e.binding.path:"",convertTo:(e,n,o)=>{if(o&&o.length>0){const a=o[0];e.binding||(e.binding={}),e.binding.type="Form",e.binding.path=a.bindingField,e.binding.field=a.id,e.binding.fullPath=a.path,e.path=a.bindingPath}}},tv={convertTo:(e,n,o,a)=>{e.pagination||(e.pagination={}),e.pagination[n]=o},convertFrom:(e,n,o)=>e.pagination?e.pagination[n]:e[n]},nv={convertTo:(e,n,o,a)=>{e.rowNumber||(e.rowNumber={}),e.rowNumber[n]=o},convertFrom:(e,n,o)=>e.rowNumber?e.rowNumber[n]:e[n]},ov={convertTo:(e,n,o,a)=>{e.selection||(e.selection={}),e.selection[n]=o},convertFrom:(e,n,o)=>e.selection?e.selection[n]:e[n]},av={convertFrom:(e,n,o)=>e[n]&&e[n].length?`共 ${e[n].length} 项`:""},iv={convertFrom:(e,n)=>e[n]||"",convertTo:(e,n,o)=>{e[n]=o}},Pa={},Ol=new Map([["/converter/appearance.converter",Kb],["/converter/buttons.converter",Xb],["/converter/property-editor.converter",Zb],["/converter/items-count.converter",av],["/converter/type.converter",Qb],["/converter/change-editor.converter",Jb],["/converter/form-group-label.converter",iv],["/converter/field-selector.converter",ev],["/converter/pagination.converter",tv],["/converter/row-number.converter",nv],["/converter/grid-selection.converter",ov]]),rv={},lv=new Map([["string",{type:"input-group",enableClear:!1}],["boolean",{type:"combo-list",textField:"name",valueField:"value",idField:"value",enableClear:!1,editable:!1,maxHeight:64,data:[{value:!0,name:"是"},{value:!1,name:"否"}]}],["enum",{type:"combo-list",maxHeight:350,enableClear:!1,editable:!1}],["array",{type:"button-edit"}],["number",{type:"number-spinner",placeholder:""}],["events-editor",{type:"events-editor",hide:!0}]]),sv=Yb();function fu(e,n){return()=>sv.parseValueSchema(e,n)}function cv(e,n,o){return e.includes("visible")&&n.visible!==void 0?typeof n.visible=="boolean"?()=>!!n.visible:n.visible===void 0?!0:fu(n.visible,o):()=>!0}function dv(e,n,o){return e.includes("readonly")&&n.readonly!==void 0?typeof n.readonly=="boolean"?()=>!!n.readonly:fu(n.readonly,o):()=>!1}function uv(e,n){const o=e.$converter||n;return typeof o=="string"&&o&&Ol.has(o)?Ol.get(o)||null:o||null}function Dl(e,n,o,a,i,r="",l=""){return Object.keys(e).map(d=>{const c=t.ref(1),f=d,u=e[d],m=Object.keys(u),h=u.title,p=u.type,g=lv.get(p)||{type:"input-group",enableClear:!1},y=u.editor?Object.assign({},g,u.editor):Object.assign({},g),v=cv(m,u,n),b=dv(m,u,n);y.readonly=y.readonly===void 0?b():y.readonly;const w=u.type==="cascade"?Dl(u.properties,n,o,a,i,r,l):[],N=!0;let S=uv(u,l);const C=t.computed({get(){if(c.value){if(["class","style"].find($=>$===f)&&!S&&(S=Ol.get("/converter/appearance.converter")||null),S&&S.convertFrom)return S.convertFrom(o,d,i,r);const F=o[d];return Object.prototype.hasOwnProperty.call(u,"defaultValue")&&(F===void 0||typeof F=="string"&&F==="")?u.defaultValue:F}return null},set(F){c.value+=1,S&&S.convertTo?(S.convertTo(a,d,F,i,r),S.convertTo(o,d,F,i,r)):(a[d]=F,o[d]=F)}}),{refreshPanelAfterChanged:V,description:x,isExpand:T}=u,M={propertyID:f,propertyName:h,propertyType:p,propertyValue:C,editor:y,visible:v,readonly:b,cascadeConfig:w,hideCascadeTitle:N,refreshPanelAfterChanged:V,description:x,isExpand:T};return n[f]=M,M})}function fv(e,n,o,a,i=""){const r=n.$ref.schema,l=n.$ref.converter,s=o[r],d=s.type,c=$l(s),f={},u=Pa[d];if(u&&u.categories){const m=u.categories[e],h=m==null?void 0:m.title;l&&Object.keys(m.properties).forEach(y=>{m.properties[y].$converter=l});const p=(m==null?void 0:m.properties)||{},g=Dl(p,f,c,s,a,i);return{categoryId:e,categoryName:h,properties:g}}return{categoryId:e,categoryName:"",properties:[]}}function Al(e,n,o,a,i){const r=e.type,l=$l(e),s={};let d=i||Pa[r];if(d&&Object.keys(d).length===0&&o&&o.getPropConfig&&(d=o.getPropConfig(a)),d&&d.categories){const c=[];return Object.keys(d.categories).map(f=>{const u=d.categories[f];if(u.$ref){c.push(fv(f,u,e,n,a));return}const m=u==null?void 0:u.title,h=u==null?void 0:u.tabId,p=u==null?void 0:u.tabName,g=u==null?void 0:u.hide,y=u==null?void 0:u.hideTitle,v=Dl(u.properties||{},s,l,e,n,a,u.$converter),{setPropertyRelates:b}=u;c.push({categoryId:f,categoryName:m,tabId:h,tabName:p,hide:g,properties:v,hideTitle:y,setPropertyRelates:b})}),c}return[]}function Ve(e,n,o=new Map,a=(l,s,d,c)=>s,i={},r=l=>l){return Fo[n.title]=n,Ml[n.title]=a,Pa[n.title]=i,rv[n.title]=r,(l={},s=!0)=>{if(!s)return El(l,o);const d=uu(l,n,o),c=Object.keys(e).reduce((f,u)=>(f[u]=e[u].default,f),{});return Object.assign(c,d)}}function Oe(e,n){return{customClass:n.class,customStyle:n.style}}function pu(e,n){var a,i;const o={};if(n!=null&&n.buttons){const r=[];(a=n==null?void 0:n.buttons)==null||a.map(l=>{const s={};Object.keys(l).map(d=>{var c;d==="appearance"?s.class=((c=l[d])==null?void 0:c.class)||"":s[d]=l[d]}),r.push(s)}),o.buttons=r}return(i=n==null?void 0:n.appearance)!=null&&i.class&&(o.buttonClass=n.appearance.class||"col-6"),n!=null&&n.id&&(o.toolbarId=n.id),n&&Object.prototype.hasOwnProperty.call(n,"visible")&&(o.buttonsVisible=n.visible),o}function mu(){function e(n,o){const{id:a}=n||{},{field:i}=n.binding||{};return{modelValue:o.getValue(a),"onUpdate:modelValue":r=>{o.setValue(a,i,r)}}}return{resolve:e}}function hu(){function e(n,o){const{id:a}=n||{},{dataSource:i}=n||{};return i===void 0?{}:{data:o.getValue(a),"onUpdate:data":(...r)=>{}}}return{resolve:e}}function gu(){function e(n,o){const{dataSource:a}=n||{};return a===void 0?{}:{}}return{resolve:e}}function pv(){function e(n,o){const{path:a}=n.binding||{};return a?{"onUpdate:dataMapping":(...i)=>{}}:{}}return{resolve:e}}function yu(){return(e,n,o)=>{const a=n.id,{type:i}=n,r=e.emits;return r?r.filter(l=>l!=="update:modelValue").reduce((l,s)=>{const d=`on${s.charAt(0).toUpperCase()}${s.slice(1)}`;return l[d]=(...c)=>{o.dispatch(a,s,i,c)},l},{}):{}}}function bu(){function e(n,o){return n.selectItemById(o)}return{selectItemById:e}}function vu(){function e(n,o){return n.selectItemById(o)}return{selectItemById:e}}function Cu(){function e(n){return n.editor}return{resolve:e}}function mv(){function e(n){return Object.prototype.hasOwnProperty.call(n,"visible")?n.visible:null}return{resolve:e}}function Ei(e,n){if(!e||e.length<1)return null;for(const o of e){if(o.id===n)return o;if(o.children){const a=o.children.find(i=>i.id===n);if(a)return a}}return null}function hv(){function e(n,o){const{name:a}=o;return n[`on${a.charAt(0).toUpperCase()}${a.slice(1)}`]||n[a]}return{resolve:e}}function wu(){function e(n,o){var s;const a=(s=n.toolbar)==null?void 0:s.buttons;if(!a||a.length<1)return null;const[i,r]=o.payloads,l=Ei(a,r);return l?l.onClick||l.click:null}return{resolve:e}}function Su(){function e(n,o){const{name:a}=o,[i,r]=o.payloads;if(a==="tabChange"||a==="tabRemove")return n[`on${a.charAt(0).toUpperCase()}${a.slice(1)}`];const l=n.contents;if(!l||l.length<1)return null;const s=l.reduce((c,f)=>{const u=f.toolbar&&f.toolbar.buttons||[];return c.push(...u),c},[]);if(!s||s.length<1)return;const d=Ei(s,r);return d?d.onClick||d.click:null}return{resolve:e}}function Vu(){function e(n,o){const a=n.buttons;if(!a||a.length<1)return null;const[i,r]=o.payloads,l=Ei(a,r);return l?l.onClick||l.click:null}return{resolve:e}}function Nu(){function e(n,o){var s;const a=(s=n.toolbar)==null?void 0:s.buttons;if(!a||a.length<1)return null;const[i,r]=o.payloads,l=Ei(a,r);return l?l.onClick||l.click:null}return{resolve:e}}function Bl(){function e(n,o){const{columns:a}=o;return n.updateColumns(a)}return{updateColumns:e}}const xu=new Map([["appearance",Oe],["size",(e,n)=>{const o={};return n.width&&(o.width=Number(n.width)),n.height&&(o.height=Number(n.height)),o}]]),gv={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/accordion.schema.json",title:"accordion",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Accordion",type:"string"},type:{description:"The type string of Accordion component",type:"string",default:"accordion"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},customClass:{description:"",type:"string",default:""},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"number"}},default:null},enableFold:{description:"",type:"boolean",default:!0},expanded:{description:"",type:"boolean",default:!1}},required:["id","type","contents"]};function yv(e,n,o){return n}const bv={title:"accordion",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},Rl={customClass:{type:String,default:""},enableFold:{type:Boolean,default:!0},expanded:{type:Boolean,default:!1},height:{type:Number},width:{type:Number}},Tu=Ve(Rl,gv,xu,yv,bv);function ku(e){const n=e.nativeElement?e.nativeElement:e;return n.classList!==void 0&&n.classList!==null?n:null}function Fu(e,n){if(n===void 0)return;const o=ku(e);o&&o.classList.remove(n)}function Ll(e,n){if(n===void 0)return;const o=ku(e);o&&o.classList.add(n)}const jl=[{size:"sm",width:576},{size:"md",width:768},{size:"xl",width:1200},{size:"el",width:1690}];function Mu(e){e.resizeObserver&&(e.resizeObserver.disconnect(),e.sharedObject=null)}function Iu(e,n,o=0){const a=[];if(!n)return;const i=o||n.getBoundingClientRect().width,r=parseFloat(i);for(let l=0;l<jl.length;l++)jl[l].width<=r&&a.push(jl[l].size);if(e.className.join(",")!==a.join(",")){if(e.className.length-a.length>0)for(let s=a.length;s<e.className.length;s++)Fu(n,"f-area-response--"+e.className[s]);else for(let s=e.className.length;s<a.length;s++)Ll(n,"f-area-response--"+a[s]);e.className=[...a]}}function vv(e,n){e.enable&&e.autoWidth?e.resizeObserver||(e.resizeObserver=new ResizeObserver(o=>{if(!o||o.length<1||!o[0].contentRect)return;const a=o[0].contentRect;Math.abs(parseInt(a.width+"")-e.width)>e.threshold&&(Iu(e,n,a.width),e.width=parseInt(a.width+""))}),e.resizeObserver.observe(n)):Mu(e)}function Pu(e,n){if(e.enable)Ll(n,"f-area-response"),Iu(e,n);else{Fu(n,"f-area-response");for(let o=e.className.length;o>0;o--)Ll(n,"f-area-response--"+e.className[o]);e.className=[]}vv(e,n)}function Eu(e,n){n.value&&Object.prototype.hasOwnProperty.call(n.value,"enable")&&(e.enable=n.value.enable),n.value&&Object.prototype.hasOwnProperty.call(n.value,"autoWidth")&&(e.autoWidth=n.value.autoWidth)}const Ea={mounted:(e,n,o)=>{o.sharedObject={className:[],resizeObserver:null,enable:!0,autoWidth:!0,threshold:10,width:0},Eu(o.sharedObject,n),Pu(o.sharedObject,e)},updated:function(e,n,o,a){o.sharedObject=a.sharedObject,Eu(o.sharedObject,n),Pu(o.sharedObject,e)},beforeUnmount(e,n,o){Mu(o.sharedObject)}};function $u(e,n,o,a,i){const r=t.ref(e.disabled),l=t.ref(!1),s=t.ref("text"),d=t.ref(e.showBorder),c=t.ref(e.textAlign),f=t.ref(e.updateOn),u=t.ref(!1),m=t.computed(()=>e.editable||!e.readonly),h=t.computed(()=>e.editable&&!e.disabled&&!e.readonly),p=t.computed(()=>!e.disabled&&l.value),g=t.computed(()=>o.value===""||o.value===null||o.value===void 0),y=t.computed(()=>(e.disabled||e.readonly)&&!e.forcePlaceholder?"":e.placeholder),v=t.computed(()=>e.readonly||!e.editable),b=t.computed(()=>e.enableTitle?o.value:""),w=t.computed(()=>({"form-control":!0,"f-utils-fill":!0,"text-left":c.value==="left","text-center":c.value==="center","text-right":c.value==="right"})),N=t.computed(()=>{const P={"f-cmp-inputgroup":!0,"input-group":!0,"f-state-disabled":r.value,"f-state-editable":h.value,"f-state-readonly":v.value,"f-state-focus":p.value,"input-group--has-clear":e.enableClear&&u.value};return(e.customClass||"").split(" ").reduce((A,O)=>(A[O]=!0,A),P),P}),S=t.computed(()=>d.value?"":"border-width : 0 ");function C(P,E=!0){o.value=P,a.value!==P&&(a.value=P),E&&n.emit("change",P),n.emit("update:modelValue",P),n.emit("update:value",P)}t.watch(()=>e.modelValue,(P,E)=>{P!==E&&(o.value=P,a.value=P)}),t.watch(()=>e.disabled,(P,E)=>{P!==E&&(r.value=P)});function V(P){return P.stopPropagation(),l.value=!1,n.emit("blur",P),P.target.tagName==="TEXTAREA"&&(n.emit("update:modelValue",P.target.value),n.emit("update:value",P.target.value),n.emit("change",P.target.value)),!1}function x(P){n.emit("click",P)}function T(P){e.disabled||(d.value&&(l.value=!0),m.value&&n.emit("focus",P))}function M(P){n.emit("input",P.target.value);const E=P.target.value;a.value=E,f.value==="change"&&(n.emit("update:modelValue",E),n.emit("update:value",E),n.emit("change",E))}function F(P){n.emit("keydown",P)}function $(P){n.emit("keyup",P)}function D(P){const E=P.target;E.tagName!=="INPUT"&&E.tagName!=="TEXTAREA"&&P.preventDefault(),P.stopPropagation(),n.emit("mousedownEvent",P)}function k(P){n.emit("mouseupEvent",P)}function I(P){if(f.value==="blur"){const E=P.target.value;P.stopPropagation(),C(E)}}return{changeTextBoxValue:C,disabled:r,displayText:a,editable:h,hasFocused:p,inputGroupClass:N,inputType:s,isEmpty:g,modelValue:o,readonly:v,onBlur:V,hasClearClass:u,onClick:x,onFocus:T,onInput:M,onKeydown:F,onKeyup:$,onMousedown:D,onMouseup:k,onTextBoxValueChange:I,placeholder:y,textBoxClass:w,textBoxTitle:b,inputGroupStyle:S}}function Cv(e,n,o,a){const i=t.ref(e.disabled),r=t.ref(!1),l=t.ref("text"),s=t.ref(e.showBorder),d=t.ref(e.textAlign);t.computed(()=>e.editable||!e.readonly);const c=t.computed(()=>e.editable&&!e.disabled&&!e.readonly),f=t.computed(()=>!e.disabled&&r.value),u=t.computed(()=>o.value===""||o.value===null||o.value===void 0),m=t.computed(()=>e.placeholder),h=t.computed(()=>e.readonly||!e.editable),p=t.computed(()=>e.enableTitle?o.value:""),g=t.computed(()=>({"form-control":!0,"text-left":d.value==="left","text-center":d.value==="center","text-right":d.value==="right"})),y=t.computed(()=>({"f-cmp-inputgroup":!0,"input-group":!0,"f-state-disabled":!0,"f-state-editable":!1,"f-state-readonly":!0})),v=t.computed(()=>s.value?"":"border-width : 0 ");function b(w,N=!0){}return{changeTextBoxValue:b,disabled:i,displayText:a,editable:c,hasFocused:f,inputGroupClass:y,inputType:l,isEmpty:u,modelValue:o,readonly:h,placeholder:m,textBoxClass:g,textBoxTitle:p,inputGroupStyle:v}}function _l(e,n,o){const a=t.ref(!1),i=t.computed(()=>e.enableClear&&!e.readonly&&!e.disabled),{changeTextBoxValue:r,displayText:l,hasFocused:s,modelValue:d,isEmpty:c,hasClearClass:f}=o;function u(v){a.value=v,f&&(f.value=a.value)}t.watch(l,()=>{s!=null&&s.value?u(!!(l!=null&&l.value)):u(!1)});const m=t.computed(()=>({"input-group-text":!0,"input-group-clear":!0})),h=t.computed(()=>({width:"24px",display:a.value?"flex":"none"}));function p(v){v.stopPropagation(),i.value&&(r("",!0),u(!a.value),n.emit("clear"))}function g(v){var S,C;const b=((S=v.target.querySelector("input"))==null?void 0:S.value)||"",w=((C=v.target.querySelector("textarea"))==null?void 0:C.value)||"",N=b||w;N!==d.value&&(d.value=N),i.value&&u(!!N)}function y(v){i.value&&u(!1)}return{clearButtonClass:m,clearButtonStyle:h,hasShownClearButton:a,onClearValue:p,onMouseEnter:g,onMouseLeave:y,shouldShowClearButton:i}}const wv={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12},Sv={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};class Ou{constructor(){q(this,"regexes",{YEAR:"[1-9]\\d{3}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",MONTHNAME:"jan|january|feb|february|mar|march|apr|april|may|jun|june|jul|july|aug|august|sep|september|oct|october|nov|november|dec|december",DAYNAME:"mon|monday|tue|tuesday|wed|wednesday|thu|thursday|fri|friday|sat|saturday|sun|sunday",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",TIMEZONE:"[+-][01]\\d\\:?[0-5]\\d",H24:"[01]\\d|2[0-3]",MIN:"[0-5]\\d",SEC:"[0-5]\\d",MS:"\\d{3,}",H12:"0?[1-9]|1[012]",AMPM:"am|pm",UNIT:"year|month|week|day|hour|minute|second|millisecond"});q(this,"patterns",[["iso_8601",this.makePattern("^(_YEAR_)-(_MONTH_)-(_DAY_)$"),"$2/$3/$1"],["us",this.makePattern("^(_MONTH_)([\\/-])(_DAY_)\\2(_YEAR_)$"),"$1/$3/$4"],["world",this.makePattern("^(_DAY_)([\\/\\.])(_MONTH_)\\2(_YEAR_)$"),"$3/$1/$4"],["chicago",this.makePattern("^(?:(?:_DAYNAME_),? )?(_DAY_)([ -])(_MONTHNAME_)\\2(_YEAR_)$"),"$3 $1, $4"],["conversational",this.makePattern("^(?:(?:_DAYNAME_),? )?(_MONTHNAME_) (_DAY_),? (_YEAR_)$"),"$1 $2, $3"],["month_day_time_year",this.makePattern("^(?:_DAYNAME_) (_MONTHNAME_) (_DAY_) ((?:_H24_)\\:(?:_MIN_)(?:\\:_SEC_)?) (_TIMEZONE_) (_YEAR_)$"),n=>{const o=(""+this.getMonthByName(n[1])).padStart(2,"0"),a=(""+n[2]).padStart(2,"0"),i=n[5],r=n[3],l=n[4],s=i+"-"+o+"-"+a+"T"+r+l;return isNaN(s)?!1:s}],["unix",/^@(-?\d+)$/,n=>this.create(parseInt(n[1],10)*1e3)],["24_hour",this.makePattern("^(?:(.+?)(?: |T))?(_H24_)\\:(_MIN_)(?:\\:(_SEC_)(?:\\.(_MS_))?)? ?(?:GMT)?(_TIMEZONE_)?(?: \\([A-Z]+\\))?$"),n=>{let o;const a=n[1];if(a){if(o=this.create(a),isNaN(o))return!1}else o=new Date,o.setMilliseconds(0);const i=n[2],r=n[3],l=n[4],s=n[5];return o.setHours(parseFloat(i),parseFloat(r),parseFloat(l||0)),s&&o.setMilliseconds(+String(s).slice(0,3)),o}],["12_hour",this.makePattern("^(?:(.+) )?(_H12_)(?:\\:(_MIN_)(?:\\:(_SEC_))?)? ?(_AMPM_)$"),n=>{let o;const a=n[1];if(a){if(o=this.create(a),isNaN(o))return!1}else o=new Date,o.setMilliseconds(0);let i=parseFloat(n[2]);i=n[5].toLowerCase()==="am"?i===12?0:i:i===12?12:i+12;const r=n[3],l=n[4];return o.setHours(i,parseFloat(r||0),parseFloat(l||0)),o}]])}makePattern(n){return n=n.replace(/_([A-Z][A-Z0-9]+)_/g,(o,a)=>this.regexes[a]),new RegExp(n,"i")}getMonthByName(n){return wv[String(n).slice(0,3).toLowerCase()]}getWeekdayByName(n){return Sv[String(n).slice(0,3).toLowerCase()]}parse(n){if(!isNaN(Number(n)))return new Date(n);if(n=String(n).replace(/^\s*(.*)\s*$/,"$1"),n=n.replace(/\s{2,}/g," "),n==="")return Date.now();let o=0;for(;o<this.patterns.length;){const a=this.patterns[o];let i,r;typeof a[0]=="string"?(r=a[1],i=a[2]):(r=a[0],i=a[1]);const l=n.match(r);if(!l){o++;continue}if(typeof i=="function"){const s=i(l);if(s instanceof Date)return s}else{const s=Date.parse(n.replace(r,i));if(!isNaN(s))return new Date(s)}o++}return NaN}create(n){return n==null?Date.now():n instanceof Date?n:this.parse(n)}}function Ot(e){const n=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&n==="[object Date]"?new e.constructor(+e):typeof e=="number"||n==="[object Number]"||typeof e=="string"||n==="[object String]"?new Date(e):new Date(NaN)}function wt(e,n){return e instanceof Date?new e.constructor(n):new Date(n)}function Du(e,n){const o=Ot(e);return isNaN(n)?wt(e,NaN):(n&&o.setDate(o.getDate()+n),o)}const Au=6048e5,Vv=864e5,Hl=6e4,Wl=36e5,Nv=1e3;let xv={};function Zo(){return xv}function ho(e,n){var s,d,c,f;const o=Zo(),a=(n==null?void 0:n.weekStartsOn)??((d=(s=n==null?void 0:n.locale)==null?void 0:s.options)==null?void 0:d.weekStartsOn)??o.weekStartsOn??((f=(c=o.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=Ot(e),r=i.getDay(),l=(r<a?7:0)+r-a;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function Qo(e){return ho(e,{weekStartsOn:1})}function Bu(e){const n=Ot(e),o=n.getFullYear(),a=wt(e,0);a.setFullYear(o+1,0,4),a.setHours(0,0,0,0);const i=Qo(a),r=wt(e,0);r.setFullYear(o,0,4),r.setHours(0,0,0,0);const l=Qo(r);return n.getTime()>=i.getTime()?o+1:n.getTime()>=l.getTime()?o:o-1}function Ru(e){const n=Ot(e);return n.setHours(0,0,0,0),n}function $i(e){const n=Ot(e),o=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return o.setUTCFullYear(n.getFullYear()),+e-+o}function Tv(e,n){const o=Ru(e),a=Ru(n),i=+o-$i(o),r=+a-$i(a);return Math.round((i-r)/Vv)}function kv(e){const n=Bu(e),o=wt(e,0);return o.setFullYear(n,0,4),o.setHours(0,0,0,0),Qo(o)}function Fv(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Oi(e){if(!Fv(e)&&typeof e!="number")return!1;const n=Ot(e);return!isNaN(Number(n))}function Mv(e){const n=Ot(e),o=wt(e,0);return o.setFullYear(n.getFullYear(),0,1),o.setHours(0,0,0,0),o}const Iv={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Pv=(e,n,o)=>{let a;const i=Iv[e];return typeof i=="string"?a=i:n===1?a=i.one:a=i.other.replace("{{count}}",n.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+a:a+" ago":a};function zl(e){return(n={})=>{const o=n.width?String(n.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}const Ev={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$v={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ov={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dv={date:zl({formats:Ev,defaultWidth:"full"}),time:zl({formats:$v,defaultWidth:"full"}),dateTime:zl({formats:Ov,defaultWidth:"full"})},Av={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Bv=(e,n,o,a)=>Av[e];function $a(e){return(n,o)=>{const a=o!=null&&o.context?String(o.context):"standalone";let i;if(a==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,s=o!=null&&o.width?String(o.width):l;i=e.formattingValues[s]||e.formattingValues[l]}else{const l=e.defaultWidth,s=o!=null&&o.width?String(o.width):e.defaultWidth;i=e.values[s]||e.values[l]}const r=e.argumentCallback?e.argumentCallback(n):n;return i[r]}}const Rv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Lv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jv={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},_v={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Hv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Wv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},zv={ordinalNumber:(e,n)=>{const o=Number(e),a=o%100;if(a>20||a<10)switch(a%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},era:$a({values:Rv,defaultWidth:"wide"}),quarter:$a({values:Lv,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$a({values:jv,defaultWidth:"wide"}),day:$a({values:_v,defaultWidth:"wide"}),dayPeriod:$a({values:Hv,defaultWidth:"wide",formattingValues:Wv,defaultFormattingWidth:"wide"})};function Oa(e){return(n,o={})=>{const a=o.width,i=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],r=n.match(i);if(!r)return null;const l=r[0],s=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?Uv(s,u=>u.test(l)):qv(s,u=>u.test(l));let c;c=e.valueCallback?e.valueCallback(d):d,c=o.valueCallback?o.valueCallback(c):c;const f=n.slice(l.length);return{value:c,rest:f}}}function qv(e,n){for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&n(e[o]))return o}function Uv(e,n){for(let o=0;o<e.length;o++)if(n(e[o]))return o}function Gv(e){return(n,o={})=>{const a=n.match(e.matchPattern);if(!a)return null;const i=a[0],r=n.match(e.parsePattern);if(!r)return null;let l=e.valueCallback?e.valueCallback(r[0]):r[0];l=o.valueCallback?o.valueCallback(l):l;const s=n.slice(i.length);return{value:l,rest:s}}}const Yv=/^(\d+)(th|st|nd|rd)?/i,Kv=/\d+/i,Xv={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Zv={any:[/^b/i,/^(a|c)/i]},Qv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Jv={any:[/1/i,/2/i,/3/i,/4/i]},eC={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},tC={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nC={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},oC={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},aC={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},iC={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rC={ordinalNumber:Gv({matchPattern:Yv,parsePattern:Kv,valueCallback:e=>parseInt(e,10)}),era:Oa({matchPatterns:Xv,defaultMatchWidth:"wide",parsePatterns:Zv,defaultParseWidth:"any"}),quarter:Oa({matchPatterns:Qv,defaultMatchWidth:"wide",parsePatterns:Jv,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Oa({matchPatterns:eC,defaultMatchWidth:"wide",parsePatterns:tC,defaultParseWidth:"any"}),day:Oa({matchPatterns:nC,defaultMatchWidth:"wide",parsePatterns:oC,defaultParseWidth:"any"}),dayPeriod:Oa({matchPatterns:aC,defaultMatchWidth:"any",parsePatterns:iC,defaultParseWidth:"any"})},Lu={code:"en-US",formatDistance:Pv,formatLong:Dv,formatRelative:Bv,localize:zv,match:rC,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lC(e){const n=Ot(e);return Tv(n,Mv(n))+1}function ju(e){const n=Ot(e),o=+Qo(n)-+kv(n);return Math.round(o/Au)+1}function ql(e,n){var f,u,m,h;const o=Ot(e),a=o.getFullYear(),i=Zo(),r=(n==null?void 0:n.firstWeekContainsDate)??((u=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:u.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(m=i.locale)==null?void 0:m.options)==null?void 0:h.firstWeekContainsDate)??1,l=wt(e,0);l.setFullYear(a+1,0,r),l.setHours(0,0,0,0);const s=ho(l,n),d=wt(e,0);d.setFullYear(a,0,r),d.setHours(0,0,0,0);const c=ho(d,n);return o.getTime()>=s.getTime()?a+1:o.getTime()>=c.getTime()?a:a-1}function sC(e,n){var s,d,c,f;const o=Zo(),a=(n==null?void 0:n.firstWeekContainsDate)??((d=(s=n==null?void 0:n.locale)==null?void 0:s.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(c=o.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,i=ql(e,n),r=wt(e,0);return r.setFullYear(i,0,a),r.setHours(0,0,0,0),ho(r,n)}function _u(e,n){const o=Ot(e),a=+ho(o,n)-+sC(o,n);return Math.round(a/Au)+1}function ct(e,n){const o=e<0?"-":"",a=Math.abs(e).toString().padStart(n,"0");return o+a}const go={y(e,n){const o=e.getFullYear(),a=o>0?o:1-o;return ct(n==="yy"?a%100:a,n.length)},M(e,n){const o=e.getMonth();return n==="M"?String(o+1):ct(o+1,2)},d(e,n){return ct(e.getDate(),n.length)},a(e,n){const o=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(e,n){return ct(e.getHours()%12||12,n.length)},H(e,n){return ct(e.getHours(),n.length)},m(e,n){return ct(e.getMinutes(),n.length)},s(e,n){return ct(e.getSeconds(),n.length)},S(e,n){const o=n.length,a=e.getMilliseconds(),i=Math.trunc(a*Math.pow(10,o-3));return ct(i,n.length)}},Jo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Hu={G:function(e,n,o){const a=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return o.era(a,{width:"abbreviated"});case"GGGGG":return o.era(a,{width:"narrow"});case"GGGG":default:return o.era(a,{width:"wide"})}},y:function(e,n,o){if(n==="yo"){const a=e.getFullYear(),i=a>0?a:1-a;return o.ordinalNumber(i,{unit:"year"})}return go.y(e,n)},Y:function(e,n,o,a){const i=ql(e,a),r=i>0?i:1-i;if(n==="YY"){const l=r%100;return ct(l,2)}return n==="Yo"?o.ordinalNumber(r,{unit:"year"}):ct(r,n.length)},R:function(e,n){const o=Bu(e);return ct(o,n.length)},u:function(e,n){const o=e.getFullYear();return ct(o,n.length)},Q:function(e,n,o){const a=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return ct(a,2);case"Qo":return o.ordinalNumber(a,{unit:"quarter"});case"QQQ":return o.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,n,o){const a=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return ct(a,2);case"qo":return o.ordinalNumber(a,{unit:"quarter"});case"qqq":return o.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,n,o){const a=e.getMonth();switch(n){case"M":case"MM":return go.M(e,n);case"Mo":return o.ordinalNumber(a+1,{unit:"month"});case"MMM":return o.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(a,{width:"wide",context:"formatting"})}},L:function(e,n,o){const a=e.getMonth();switch(n){case"L":return String(a+1);case"LL":return ct(a+1,2);case"Lo":return o.ordinalNumber(a+1,{unit:"month"});case"LLL":return o.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(a,{width:"wide",context:"standalone"})}},w:function(e,n,o,a){const i=_u(e,a);return n==="wo"?o.ordinalNumber(i,{unit:"week"}):ct(i,n.length)},I:function(e,n,o){const a=ju(e);return n==="Io"?o.ordinalNumber(a,{unit:"week"}):ct(a,n.length)},d:function(e,n,o){return n==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):go.d(e,n)},D:function(e,n,o){const a=lC(e);return n==="Do"?o.ordinalNumber(a,{unit:"dayOfYear"}):ct(a,n.length)},E:function(e,n,o){const a=e.getDay();switch(n){case"E":case"EE":case"EEE":return o.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(a,{width:"short",context:"formatting"});case"EEEE":default:return o.day(a,{width:"wide",context:"formatting"})}},e:function(e,n,o,a){const i=e.getDay(),r=(i-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(r);case"ee":return ct(r,2);case"eo":return o.ordinalNumber(r,{unit:"day"});case"eee":return o.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(i,{width:"short",context:"formatting"});case"eeee":default:return o.day(i,{width:"wide",context:"formatting"})}},c:function(e,n,o,a){const i=e.getDay(),r=(i-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(r);case"cc":return ct(r,n.length);case"co":return o.ordinalNumber(r,{unit:"day"});case"ccc":return o.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(i,{width:"narrow",context:"standalone"});case"cccccc":return o.day(i,{width:"short",context:"standalone"});case"cccc":default:return o.day(i,{width:"wide",context:"standalone"})}},i:function(e,n,o){const a=e.getDay(),i=a===0?7:a;switch(n){case"i":return String(i);case"ii":return ct(i,n.length);case"io":return o.ordinalNumber(i,{unit:"day"});case"iii":return o.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(a,{width:"short",context:"formatting"});case"iiii":default:return o.day(a,{width:"wide",context:"formatting"})}},a:function(e,n,o){const i=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,n,o){const a=e.getHours();let i;switch(a===12?i=Jo.noon:a===0?i=Jo.midnight:i=a/12>=1?"pm":"am",n){case"b":case"bb":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,n,o){const a=e.getHours();let i;switch(a>=17?i=Jo.evening:a>=12?i=Jo.afternoon:a>=4?i=Jo.morning:i=Jo.night,n){case"B":case"BB":case"BBB":return o.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,n,o){if(n==="ho"){let a=e.getHours()%12;return a===0&&(a=12),o.ordinalNumber(a,{unit:"hour"})}return go.h(e,n)},H:function(e,n,o){return n==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):go.H(e,n)},K:function(e,n,o){const a=e.getHours()%12;return n==="Ko"?o.ordinalNumber(a,{unit:"hour"}):ct(a,n.length)},k:function(e,n,o){let a=e.getHours();return a===0&&(a=24),n==="ko"?o.ordinalNumber(a,{unit:"hour"}):ct(a,n.length)},m:function(e,n,o){return n==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):go.m(e,n)},s:function(e,n,o){return n==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):go.s(e,n)},S:function(e,n){return go.S(e,n)},X:function(e,n,o){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return zu(a);case"XXXX":case"XX":return Mo(a);case"XXXXX":case"XXX":default:return Mo(a,":")}},x:function(e,n,o){const a=e.getTimezoneOffset();switch(n){case"x":return zu(a);case"xxxx":case"xx":return Mo(a);case"xxxxx":case"xxx":default:return Mo(a,":")}},O:function(e,n,o){const a=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Wu(a,":");case"OOOO":default:return"GMT"+Mo(a,":")}},z:function(e,n,o){const a=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Wu(a,":");case"zzzz":default:return"GMT"+Mo(a,":")}},t:function(e,n,o){const a=Math.trunc(e.getTime()/1e3);return ct(a,n.length)},T:function(e,n,o){const a=e.getTime();return ct(a,n.length)}};function Wu(e,n=""){const o=e>0?"-":"+",a=Math.abs(e),i=Math.trunc(a/60),r=a%60;return r===0?o+String(i):o+String(i)+n+ct(r,2)}function zu(e,n){return e%60===0?(e>0?"-":"+")+ct(Math.abs(e)/60,2):Mo(e,n)}function Mo(e,n=""){const o=e>0?"-":"+",a=Math.abs(e),i=ct(Math.trunc(a/60),2),r=ct(a%60,2);return o+i+n+r}const qu=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Uu=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Ul={p:Uu,P:(e,n)=>{const o=e.match(/(P+)(p+)?/)||[],a=o[1],i=o[2];if(!i)return qu(e,n);let r;switch(a){case"P":r=n.dateTime({width:"short"});break;case"PP":r=n.dateTime({width:"medium"});break;case"PPP":r=n.dateTime({width:"long"});break;case"PPPP":default:r=n.dateTime({width:"full"});break}return r.replace("{{date}}",qu(a,n)).replace("{{time}}",Uu(i,n))}},cC=/^D+$/,dC=/^Y+$/,uC=["D","DD","YY","YYYY"];function Gu(e){return cC.test(e)}function Yu(e){return dC.test(e)}function Gl(e,n,o){const a=fC(e,n,o);if(console.warn(a),uC.includes(e))throw new RangeError(a)}function fC(e,n,o){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${a} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const pC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hC=/^'([^]*?)'?$/,gC=/''/g,yC=/[a-zA-Z]/;function En(e,n,o){var f,u,m,h;const a=Zo(),i=a.locale??Lu,r=a.firstWeekContainsDate??((u=(f=a.locale)==null?void 0:f.options)==null?void 0:u.firstWeekContainsDate)??1,l=a.weekStartsOn??((h=(m=a.locale)==null?void 0:m.options)==null?void 0:h.weekStartsOn)??0,s=Ot(e);if(!Oi(s))throw new RangeError("Invalid time value");let d=n.match(mC).map(p=>{const g=p[0];if(g==="p"||g==="P"){const y=Ul[g];return y(p,i.formatLong)}return p}).join("").match(pC).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const g=p[0];if(g==="'")return{isToken:!1,value:bC(p)};if(Hu[g])return{isToken:!0,value:p};if(g.match(yC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(d=i.localize.preprocessor(s,d));const c={firstWeekContainsDate:r,weekStartsOn:l,locale:i};return d.map(p=>{if(!p.isToken)return p.value;const g=p.value;(Yu(g)||Gu(g))&&Gl(g,n,String(e));const y=Hu[g[0]];return y(s,g,i.localize,c)}).join("")}function bC(e){const n=e.match(hC);return n?n[1].replace(gC,"'"):e}function vC(){return Object.assign({},Zo())}function CC(e){let o=Ot(e).getDay();return o===0&&(o=7),o}function wC(e,n){const o=n instanceof Date?wt(n,0):new n(0);return o.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),o.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),o}const SC=10;class Ku{constructor(){q(this,"subPriority",0)}validate(n,o){return!0}}class VC extends Ku{constructor(n,o,a,i,r){super(),this.value=n,this.validateValue=o,this.setValue=a,this.priority=i,r&&(this.subPriority=r)}validate(n,o){return this.validateValue(n,this.value,o)}set(n,o,a){return this.setValue(n,o,this.value,a)}}class NC extends Ku{constructor(){super(...arguments);q(this,"priority",SC);q(this,"subPriority",-1)}set(o,a){return a.timestampIsSet?o:wt(o,wC(o,Date))}}class st{run(n,o,a,i){const r=this.parse(n,o,a,i);return r?{setter:new VC(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(n,o,a){return!0}}class xC extends st{constructor(){super(...arguments);q(this,"priority",140);q(this,"incompatibleTokens",["R","u","t","T"])}parse(o,a,i){switch(a){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"});case"GGGGG":return i.era(o,{width:"narrow"});case"GGGG":default:return i.era(o,{width:"wide"})||i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"})}}set(o,a,i){return a.era=i,o.setFullYear(i,0,1),o.setHours(0,0,0,0),o}}const Nt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},$n={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function xt(e,n){return e&&{value:n(e.value),rest:e.rest}}function yt(e,n){const o=n.match(e);return o?{value:parseInt(o[0],10),rest:n.slice(o[0].length)}:null}function On(e,n){const o=n.match(e);if(!o)return null;if(o[0]==="Z")return{value:0,rest:n.slice(1)};const a=o[1]==="+"?1:-1,i=o[2]?parseInt(o[2],10):0,r=o[3]?parseInt(o[3],10):0,l=o[5]?parseInt(o[5],10):0;return{value:a*(i*Wl+r*Hl+l*Nv),rest:n.slice(o[0].length)}}function Xu(e){return yt(Nt.anyDigitsSigned,e)}function St(e,n){switch(e){case 1:return yt(Nt.singleDigit,n);case 2:return yt(Nt.twoDigits,n);case 3:return yt(Nt.threeDigits,n);case 4:return yt(Nt.fourDigits,n);default:return yt(new RegExp("^\\d{1,"+e+"}"),n)}}function Di(e,n){switch(e){case 1:return yt(Nt.singleDigitSigned,n);case 2:return yt(Nt.twoDigitsSigned,n);case 3:return yt(Nt.threeDigitsSigned,n);case 4:return yt(Nt.fourDigitsSigned,n);default:return yt(new RegExp("^-?\\d{1,"+e+"}"),n)}}function Yl(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Zu(e,n){const o=n>0,a=o?n:1-n;let i;if(a<=50)i=e||100;else{const r=a+50,l=Math.trunc(r/100)*100,s=e>=r%100;i=e+l-(s?100:0)}return o?i:1-i}function Qu(e){return e%400===0||e%4===0&&e%100!==0}class TC extends st{constructor(){super(...arguments);q(this,"priority",130);q(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(o,a,i){const r=l=>({year:l,isTwoDigitYear:a==="yy"});switch(a){case"y":return xt(St(4,o),r);case"yo":return xt(i.ordinalNumber(o,{unit:"year"}),r);default:return xt(St(a.length,o),r)}}validate(o,a){return a.isTwoDigitYear||a.year>0}set(o,a,i){const r=o.getFullYear();if(i.isTwoDigitYear){const s=Zu(i.year,r);return o.setFullYear(s,0,1),o.setHours(0,0,0,0),o}const l=!("era"in a)||a.era===1?i.year:1-i.year;return o.setFullYear(l,0,1),o.setHours(0,0,0,0),o}}class kC extends st{constructor(){super(...arguments);q(this,"priority",130);q(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(o,a,i){const r=l=>({year:l,isTwoDigitYear:a==="YY"});switch(a){case"Y":return xt(St(4,o),r);case"Yo":return xt(i.ordinalNumber(o,{unit:"year"}),r);default:return xt(St(a.length,o),r)}}validate(o,a){return a.isTwoDigitYear||a.year>0}set(o,a,i,r){const l=ql(o,r);if(i.isTwoDigitYear){const d=Zu(i.year,l);return o.setFullYear(d,0,r.firstWeekContainsDate),o.setHours(0,0,0,0),ho(o,r)}const s=!("era"in a)||a.era===1?i.year:1-i.year;return o.setFullYear(s,0,r.firstWeekContainsDate),o.setHours(0,0,0,0),ho(o,r)}}class FC extends st{constructor(){super(...arguments);q(this,"priority",130);q(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(o,a){return Di(a==="R"?4:a.length,o)}set(o,a,i){const r=wt(o,0);return r.setFullYear(i,0,4),r.setHours(0,0,0,0),Qo(r)}}class MC extends st{constructor(){super(...argume