@phila/phila-ui-search 1.1.1-beta.0 → 1.1.1-beta.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.
- package/README.md +6 -0
- package/dist/Search.vue.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +2661 -122
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Phila Search Component
|
|
2
2
|
|
|
3
|
+
<!-- status-badge-start -->
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
<!-- status-badge-end -->
|
|
8
|
+
|
|
3
9
|
A search bar component built with Vue 3 and TypeScript, implementing the Philadelphia Design System. Combines the TextField and Button components to create a complete search interface.
|
|
4
10
|
|
|
5
11
|
## Features
|
package/dist/Search.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.vue.d.ts","sourceRoot":"","sources":["../src/Search.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Search.vue.d.ts","sourceRoot":"","sources":["../src/Search.vue"],"names":[],"mappings":"AAyFA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;AAwJ3C,wBAQG"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),n=require("@phila/phila-ui-core");var y={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},b=y;const x=["disabled"],k=e.defineComponent({inheritAttrs:!1,__name:"PhlButton",props:{href:{},to:{},target:{},rel:{},disabled:{type:Boolean,default:!1},clickTarget:{},variant:{default:"primary"},size:{default:"medium"},iconOnly:{type:Boolean,default:!1},iconRight:{type:Boolean},text:{},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(d){const t=d,r=l=>"href"in l&&l.href!==void 0||"to"in l&&l.to!==void 0,a=e.computed(()=>n.cn("phila-button",`phila-button--${t.variant}`,t.size&&`is-${t.size}`,t.iconOnly&&"icon-button",t.iconOnly&&t.variant==="standard"&&"icon-button--standard",t.className)),s=e.computed(()=>r(t)?"to"in t&&t.to!==void 0?{to:t.to,disabled:t.disabled,className:a.value}:{href:t.href,target:t.target,rel:t.rel,disabled:t.disabled,className:a.value}:{}),c=e.computed(()=>({iconDefinition:t.iconDefinition,iconClass:t.iconClass,src:t.src,iconRight:t.iconRight,iconOnly:t.iconOnly,text:t.text,size:t.size}));return(l,u)=>r(t)?(e.openBlock(),e.createBlock(e.unref(n.BaseLink),e.mergeProps({key:0},{...s.value,...l.$attrs},{role:"button"}),{default:e.withCtx(()=>[e.createVNode(e.unref(n.ActionContent),e.normalizeProps(e.guardReactiveProps(c.value)),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])]),_:3},16)]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:1,type:"button",disabled:t.disabled,class:a.value},l.$attrs),[e.createVNode(e.unref(n.ActionContent),e.normalizeProps(e.guardReactiveProps(c.value)),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])]),_:3},16)],16,x))}});var N={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},V=N,B={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},C=B;const z=["for"],S={class:"state-layer"},P={class:"content"},$={class:"input-text-container"},D=["id","placeholder"],R={key:1,class:"has-text-body-small phila-supporting-text"},w={key:2,class:"has-text-body-small phila-error-text"},E=e.defineComponent({inheritAttrs:!1,__name:"TextField",props:{modelValue:{default:void 0},className:{default:""},label:{default:""},id:{default:`phila-text-field-${Math.random().toString(36).substring(2,9)}`},supportingText:{default:""},placeholder:{default:""},leadingIcon:{default:""},trailingIcon:{default:""},error:{default(){return[]}}},emits:["update:modelValue"],setup(d,{emit:t}){const r=e.useAttrs(),a=d,s=e.computed(()=>typeof a.error=="string"?a.error:a.error[0]),c=e.toRef(a,"id"),l=t,u=e.ref(""),i=e.computed({get:()=>a.modelValue!==void 0?a.modelValue:u.value,set:o=>{l("update:modelValue",o),u.value=o}}),p=e.computed(()=>{const o=["default-class"];return r.disabled!=null&&o.push("phila-input--disabled"),s.value&&o.push("phila-input--error"),r.required!=null&&o.push("phila-input--required"),n.cn(...o)}),v=e.computed(()=>{const o=[];return i.value!==""&&o.push("phila-text-field--filled"),a.className&&o.push(a.className),n.cn(...o)}),f=e.ref(null),g=o=>{o.target.closest("button")||f.value?.focus()};return(o,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["phila-input",p.value])},[a.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:c.value,class:"has-text-label-small phila-label"},e.toDisplayString(a.label),9,z)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["phila-text-field",v.value]),onClick:g},[e.createElementVNode("div",S,[a.leadingIcon?(e.openBlock(),e.createBlock(e.unref(n.Icon),{key:0,"icon-class":a.leadingIcon,inline:"",decorative:""},null,8,["icon-class"])):e.createCommentVNode("",!0),e.createElementVNode("div",P,[e.createElementVNode("div",$,[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:c.value,ref_key:"inputRef",ref:f,"onUpdate:modelValue":m[0]||(m[0]=h=>i.value=h),class:"phila-text-field-input has-text-body-default",placeholder:a.placeholder},e.unref(r)),null,16,D),[[e.vModelDynamic,i.value]])])]),i.value!=""?(e.openBlock(),e.createBlock(e.unref(k),{key:1,variant:"standard",size:"small","icon-only":"","icon-definition":e.unref(C),onClick:m[1]||(m[1]=h=>i.value="")},null,8,["icon-definition"])):e.createCommentVNode("",!0),a.trailingIcon?(e.openBlock(),e.createBlock(e.unref(n.Icon),{key:2,size:"small","icon-class":a.trailingIcon,inline:"",decorative:""},null,8,["icon-class"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"trailing-action")])],2),a.supportingText?(e.openBlock(),e.createElementBlock("div",R,e.toDisplayString(a.supportingText),1)):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(e.unref(n.Icon),{"icon-definition":e.unref(V),size:"small",inline:"",decorative:""},null,8,["icon-definition"]),e.createTextVNode(" "+e.toDisplayString(s.value),1)])):e.createCommentVNode("",!0)],2))}}),_=["disabled"],O=e.defineComponent({inheritAttrs:!1,__name:"PhlButton",props:{href:{},to:{},target:{},rel:{},disabled:{type:Boolean,default:!1},clickTarget:{},variant:{default:"primary"},size:{default:"medium"},iconOnly:{type:Boolean,default:!1},iconRight:{type:Boolean},text:{},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(d){const t=d,r=l=>"href"in l&&l.href!==void 0||"to"in l&&l.to!==void 0,a=e.computed(()=>n.cn("phila-button",`phila-button--${t.variant}`,t.size&&`is-${t.size}`,t.iconOnly&&"icon-button",t.iconOnly&&t.variant==="standard"&&"icon-button--standard",t.className)),s=e.computed(()=>r(t)?"to"in t&&t.to!==void 0?{to:t.to,disabled:t.disabled,className:a.value}:{href:t.href,target:t.target,rel:t.rel,disabled:t.disabled,className:a.value}:{}),c=e.computed(()=>({iconDefinition:t.iconDefinition,iconClass:t.iconClass,src:t.src,iconRight:t.iconRight,iconOnly:t.iconOnly,text:t.text,size:t.size}));return(l,u)=>r(t)?(e.openBlock(),e.createBlock(e.unref(n.BaseLink),e.mergeProps({key:0},{...s.value,...l.$attrs},{role:"button"}),{default:e.withCtx(()=>[e.createVNode(e.unref(n.ActionContent),e.normalizeProps(e.guardReactiveProps(c.value)),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])]),_:3},16)]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:1,type:"button",disabled:t.disabled,class:a.value},l.$attrs),[e.createVNode(e.unref(n.ActionContent),e.normalizeProps(e.guardReactiveProps(c.value)),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])]),_:3},16)],16,_))}}),T=e.defineComponent({inheritAttrs:!1,__name:"Search",props:{modelValue:{default:void 0},placeholder:{default:"Search by title or keyword"},className:{}},emits:["update:modelValue","search"],setup(d,{emit:t}){const r=e.useAttrs(),a=d,s=t,c=e.computed({get:()=>a.modelValue,set:u=>s("update:modelValue",u)}),l=e.computed(()=>n.cn("default-class",a.className));return(u,i)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["search",l.value]},e.unref(r)),[e.createVNode(e.unref(E),{modelValue:c.value,"onUpdate:modelValue":i[1]||(i[1]=p=>c.value=p),"class-name":"phila-text-field--search",placeholder:d.placeholder,onKeydown:i[2]||(i[2]=e.withKeys(p=>s("search"),["enter"]))},{"trailing-action":e.withCtx(()=>[e.createVNode(e.unref(O),{variant:"standard",size:"small","icon-only":"","icon-definition":e.unref(b),"aria-label":"Search","class-name":"phila-button--search",onClick:i[0]||(i[0]=p=>s("search"))},null,8,["icon-definition"])]),_:1},8,["modelValue","placeholder"])],16))}});exports.Search=T;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const n=require("vue"),A=require("@phila/phila-ui-core");var ue={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},le=ue;const oe=["disabled"],he=n.defineComponent({inheritAttrs:!1,__name:"PhlButton",props:{href:{},to:{},target:{},rel:{},disabled:{type:Boolean,default:!1},clickTarget:{},variant:{default:"primary"},size:{default:"medium"},iconOnly:{type:Boolean,default:!1},iconRight:{type:Boolean},text:{},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(u){const e=u,t=r=>"href"in r&&r.href!==void 0||"to"in r&&r.to!==void 0,s=n.computed(()=>A.cn("phila-button",`phila-button--${e.variant}`,e.size&&`is-${e.size}`,e.iconOnly&&"icon-button",e.iconOnly&&e.variant==="standard"&&"icon-button--standard",e.className)),i=n.computed(()=>t(e)?"to"in e&&e.to!==void 0?{to:e.to,disabled:e.disabled,className:s.value}:{href:e.href,target:e.target,rel:e.rel,disabled:e.disabled,className:s.value}:{}),a=n.computed(()=>({iconDefinition:e.iconDefinition,iconClass:e.iconClass,src:e.src,iconRight:e.iconRight,iconOnly:e.iconOnly,text:e.text,size:e.size}));return(r,l)=>t(e)?(n.openBlock(),n.createBlock(n.unref(A.BaseLink),n.mergeProps({key:0},{...i.value,...r.$attrs},{role:"button"}),{default:n.withCtx(()=>[n.createVNode(n.unref(A.ActionContent),n.normalizeProps(n.guardReactiveProps(a.value)),{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(e.text),1)])]),_:3},16)]),_:3},16)):(n.openBlock(),n.createElementBlock("button",n.mergeProps({key:1,type:"button",disabled:e.disabled,class:s.value},r.$attrs),[n.createVNode(n.unref(A.ActionContent),n.normalizeProps(n.guardReactiveProps(a.value)),{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(e.text),1)])]),_:3},16)],16,oe))}});var de={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},pe=de,ce={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},me=ce;function S(u){return typeof u=="string"||u instanceof String}function J(u){var e;return typeof u=="object"&&u!=null&&(u==null||(e=u.constructor)==null?void 0:e.name)==="Object"}function ee(u,e){return Array.isArray(e)?ee(u,(t,s)=>e.includes(s)):Object.entries(u).reduce((t,s)=>{let[i,a]=s;return e(a,i)&&(t[i]=a),t},{})}const p={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function ge(u){switch(u){case p.LEFT:return p.FORCE_LEFT;case p.RIGHT:return p.FORCE_RIGHT;default:return u}}function q(u){return u.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function R(u,e){if(e===u)return!0;const t=Array.isArray(e),s=Array.isArray(u);let i;if(t&&s){if(e.length!=u.length)return!1;for(i=0;i<e.length;i++)if(!R(e[i],u[i]))return!1;return!0}if(t!=s)return!1;if(e&&u&&typeof e=="object"&&typeof u=="object"){const a=e instanceof Date,r=u instanceof Date;if(a&&r)return e.getTime()==u.getTime();if(a!=r)return!1;const l=e instanceof RegExp,o=u instanceof RegExp;if(l&&o)return e.toString()==u.toString();if(l!=o)return!1;const h=Object.keys(e);for(i=0;i<h.length;i++)if(!Object.prototype.hasOwnProperty.call(u,h[i]))return!1;for(i=0;i<h.length;i++)if(!R(u[h[i]],e[h[i]]))return!1;return!0}else if(e&&u&&typeof e=="function"&&typeof u=="function")return e.toString()===u.toString();return!1}class fe{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?p.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?p.RIGHT:p.LEFT}}function c(u,e){return new c.InputMask(u,e)}function te(u){if(u==null)throw new Error("mask property should be defined");return u instanceof RegExp?c.MaskedRegExp:S(u)?c.MaskedPattern:u===Date?c.MaskedDate:u===Number?c.MaskedNumber:Array.isArray(u)||u===Array?c.MaskedDynamic:c.Masked&&u.prototype instanceof c.Masked?u:c.Masked&&u instanceof c.Masked?u.constructor:u instanceof Function?c.MaskedFunction:c.Masked}function w(u){if(!u)throw new Error("Options in not defined");if(c.Masked){if(u.prototype instanceof c.Masked)return{mask:u};const{mask:e=void 0,...t}=u instanceof c.Masked?{mask:u}:J(u)&&u.mask instanceof c.Masked?u:{};if(e){const s=e.mask;return{...ee(e,(i,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return J(u)?{...u}:{mask:u}}function V(u){if(c.Masked&&u instanceof c.Masked)return u;const e=w(u),t=te(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}c.createMask=V;class G{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}c.MaskElement=G;const Q=90,ke=89;class O extends G{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Q&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===ke&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Q&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}c.HTMLMaskElement=O;class ve extends O{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}c.HTMLMaskElement=O;class se extends O{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return i==null||s==null||s>i?s:i}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}c.HTMLContenteditableMaskElement=se;class L{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>L.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}L.MAX_LENGTH=100;class _e{constructor(e,t){this.el=e instanceof G?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new se(e):new ve(e),this.masked=V(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new L,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof c.Masked)&&this.masked.constructor===te(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof c.Masked?e:V({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(i=>i(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue,this.el.value,this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,r=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=t,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),r&&this._fireChangeEvents(),!this._historyChanging&&(r||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,i=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);i&&(this.mask=t),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,p.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new fe({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:p.NONE;let r=this.masked.nearestInputPos(t.startChangePos+i,a);a!==p.NONE&&(r=this.masked.nearestInputPos(r,p.NONE)),this.updateControl(r),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}c.InputMask=_e;class m{static normalize(e){return Array.isArray(e)?e:[e,new m]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}c.ChangeDetails=m;class b{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}let y=class T{constructor(e){this._value="",this._update({...T.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new b(this.extractInput(e,t),e)}appendTail(e){return S(e)&&(e=new b(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new m({inserted:e,rawInserted:e})):new m}_appendChar(e,t,s){t===void 0&&(t={});const i=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&this.autofix==="pad")){const r=this.state;this.state=i;let l=this.pad(t);const o=this._appendCharRaw(e,t);l=l.aggregate(o),o.rawInserted||l.equals(a)?a=l:this.state=r}if(a.inserted){let r,l=this.doValidate(t)!==!1;if(l&&s!=null){const o=this.state;if(this.overwrite===!0){r=s.state;for(let d=0;d<a.rawInserted.length;++d)s.unshift(this.displayValue.length-a.tailShift)}let h=this.appendTail(s);if(l=h.rawInserted.length===s.toString().length,!(l&&h.inserted)&&this.overwrite==="shift"){this.state=o,r=s.state;for(let d=0;d<a.rawInserted.length;++d)s.shift();h=this.appendTail(s),l=h.rawInserted.length===s.toString().length}l&&h.inserted&&(this.state=o)}l||(a=new m,this.state=i,s&&r&&(s.state=r))}return a}_appendPlaceholder(){return new m}_appendEager(){return new m}append(e,t,s){if(!S(e))throw new Error("value should be string");const i=S(s)?new b(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,t);for(let r=0;r<e.length;++r){const l=this._appendChar(e[r],t,i);if(!l.rawInserted&&!this.doSkipInvalid(e[r],t,i))break;a.aggregate(l)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&a.aggregate(this._appendEager()),i!=null&&(a.tailShift+=this.appendTail(i).tailShift),a}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new m}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),m.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),m.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,i,a){s===void 0&&(s=""),i===void 0&&(i=p.NONE),a===void 0&&(a={input:!0});const r=e+t,l=this.extractTail(r),o=this.eager===!0||this.eager==="remove";let h;o&&(i=ge(i),h=this.extractInput(0,r,{raw:!0}));let d=e;const g=new m;if(i!==p.NONE&&(d=this.nearestInputPos(e,t>1&&e!==0&&!o?p.NONE:i),g.tailShift=d-e),g.aggregate(this.remove(d)),o&&i!==p.NONE&&h===this.rawInputValue)if(i===p.FORCE_LEFT){let v;for(;h===this.rawInputValue&&(v=this.displayValue.length);)g.aggregate(new m({tailShift:-1})).aggregate(this.remove(v-1))}else i===p.FORCE_RIGHT&&l.unshift();return g.aggregate(this.append(s,a,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!R(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||T.EMPTY_VALUES.includes(e)&&T.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new m}};y.DEFAULTS={skipInvalid:!0};y.EMPTY_VALUES=[void 0,null,""];c.Masked=y;class D{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=S(e)?new b(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof b)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof D){if(e.stop==null){let i;for(;e.chunks.length&&e.chunks[0].stop==null;)i=e.chunks.shift(),i.from+=e.from,this.extend(i)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof c.MaskedPattern))return new b(this.toString()).appendTo(e);const t=new m;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),r=i.stop;let l;if(r!=null&&(!a||a.index<=r)&&((i instanceof D||e._stops.indexOf(r)>=0)&&t.aggregate(e._appendPlaceholder(r)),l=i instanceof D&&e._blocks[r]),l){const o=l.appendTail(i);t.aggregate(o);const h=i.toString().slice(o.rawInserted.length);h&&t.aggregate(e.append(h,{tail:!0}))}else t.aggregate(e.append(i.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map(i=>{const a="chunks"in i?new D:new b;return a.state=i,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const i=this.chunks[s],a=i.unshift(t);if(i.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class Ce{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,p.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,p.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,p.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,p.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,p.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,p.NONE),!0})}}class ie{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new m}nearestInputPos(e,t){t===void 0&&(t=p.NONE);const s=0,i=this._value.length;switch(t){case p.LEFT:case p.FORCE_LEFT:return s;case p.NONE:case p.RIGHT:case p.FORCE_RIGHT:default:return i}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new m;const s=this.eager===!0||this.eager==="append",i=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,a=new m({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(t.raw||t.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new m;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new b("")}appendTail(e){return S(e)&&(e=new b(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return s!=null&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class P{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:r,eager:l,...o}=e;this.masked=V(o),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:a,lazy:r,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new m}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new m;const s=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&this.doValidate(t)===!1&&(i=new m,this.masked.state=s),!i.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new m:(this.isFilled=!0,new m({inserted:this.placeholderChar}))}_appendEager(){return new m}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=p.NONE);const s=0,i=this.value.length,a=Math.min(Math.max(e,s),i);switch(t){case p.LEFT:case p.FORCE_LEFT:return this.isComplete?a:s;case p.RIGHT:case p.FORCE_RIGHT:return this.isComplete?a:i;case p.NONE:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||e?._beforeTailState}}pad(e){return new m}}P.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Ee extends y{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}}c.MaskedRegExp=Ee;class C extends y{constructor(e){super({...C.DEFAULTS,...e,definitions:Object.assign({},P.DEFAULT_DEFINITIONS,e?.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let a=0;a<t.length;++a){if(this.blocks){const h=t.slice(a),d=Object.keys(this.blocks).filter(v=>h.indexOf(v)===0);d.sort((v,f)=>f.length-v.length);const g=d[0];if(g){const{expose:v,repeat:f,...k}=w(this.blocks[g]),E={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...k,repeat:f,parent:this},x=f!=null?new c.RepeatBlock(E):V(E);x&&(this._blocks.push(x),v&&(this.exposeBlock=x),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),a+=g.length-1;continue}}let r=t[a],l=r in e;if(r===C.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(r==="{"||r==="}"){s=!s;continue}if(r==="["||r==="]"){i=!i;continue}if(r===C.ESCAPE_CHAR){if(++a,r=t[a],!r)break;l=!1}const o=l?new P({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...w(e[r]),parent:this}):new ie({char:r,eager:this.eager,isUnmasking:s});this._blocks.push(o)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((i,a)=>i.state=t[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new m;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let i=s;i<this._blocks.length;++i){const a=this._blocks[i]._appendEager();if(!a.inserted)break;t.aggregate(a)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),i=new m;if(!s)return i;for(let r=s.index,l;l=this._blocks[r];++r){var a;const o=l._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[r]});if(i.aggregate(o),o.consumed)break}return i}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new D;return e===t||this._forEachBlocksInRange(e,t,(i,a,r,l)=>{const o=i.extractTail(r,l);o.stop=this._findStopBefore(a),o.from=this._blockStartPos(a),o instanceof D&&(o.blockIndex=a),s.extend(o)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let i="";return this._forEachBlocksInRange(e,t,(a,r,l,o)=>{i+=a.extractInput(l,o,s)}),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(i<=e)t=i;else break}return t}_appendPlaceholder(e){const t=new m;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const i=s.index,a=e??this._blocks.length;return this._blocks.slice(i,a).forEach(r=>{if(!r.lazy||e!=null){var l;t.aggregate(r._appendPlaceholder((l=r._blocks)==null?void 0:l.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=t.length;if(t+=i.displayValue,e<=t.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const i=this._mapPosToBlock(e);if(i){const a=this._mapPosToBlock(t),r=a&&i.index===a.index,l=i.offset,o=a&&r?a.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,l,o),a&&!r){for(let h=i.index+1;h<a.index;++h)s(this._blocks[h],h,0,this._blocks[h].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(i,a,r,l)=>{s.aggregate(i.remove(r,l))}),s}nearestInputPos(e,t){if(t===void 0&&(t=p.NONE),!this._blocks.length)return 0;const s=new Ce(this,e);if(t===p.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===p.LEFT||t===p.FORCE_LEFT){if(t===p.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===p.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===p.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===p.RIGHT||t===p.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===p.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,p.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(i,a,r,l)=>{s+=i.totalInputPositions(r,l)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new m;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}C.DEFAULTS={...y.DEFAULTS,lazy:!0,placeholderChar:"_"};C.STOP_CHAR="`";C.ESCAPE_CHAR="\\";C.InputDefinition=P;C.FixedDefinition=ie;c.MaskedPattern=C;class M extends C{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...r}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,i),this.autofix=a;const l=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0");let h=0;for(;h<o.length&&o[h]===l[h];)++h;r.mask=o.slice(0,h).replace(/0/g,"\\0")+"0".repeat(this.maxLength-h),super._update(r)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,i,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(i.length)+a,s="9".repeat(i.length)+a),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,r]=this.boundaries(this.value+e);return Number(r)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(i[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(t);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new m;if(this.value.length===this.maxLength)return t;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let a=0;a<i;++a)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return t}}c.MaskedRange=M;const Ae="d{.}`m{.}`Y";class B extends C{static extractPatternOptions(e){const{mask:t,pattern:s,...i}=e;return{...i,mask:S(t)?t:s}}constructor(e){super(B.extractPatternOptions({...B.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:i,...a}={...B.DEFAULTS,...e},r=Object.assign({},B.GET_DEFAULT_BLOCKS());e.min&&(r.Y.from=e.min.getFullYear()),e.max&&(r.Y.to=e.max.getFullYear()),e.min&&e.max&&r.Y.from===r.Y.to&&(r.m.from=e.min.getMonth()+1,r.m.to=e.max.getMonth()+1,r.m.from===r.m.to&&(r.d.from=e.min.getDate(),r.d.to=e.max.getDate())),Object.assign(r,this.blocks,i),super._update({...a,mask:S(t)?t:s,blocks:r})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(B.extractPatternOptions(e))}}B.GET_DEFAULT_BLOCKS=()=>({d:{mask:M,from:1,to:31,maxLength:2},m:{mask:M,from:1,to:12,maxLength:2},Y:{mask:M,from:1900,to:9999}});B.DEFAULTS={...C.DEFAULTS,mask:Date,pattern:Ae,format:(u,e)=>{if(!u)return"";const t=String(u.getDate()).padStart(2,"0"),s=String(u.getMonth()+1).padStart(2,"0"),i=u.getFullYear();return[t,s,i].join(".")},parse:(u,e)=>{const[t,s,i]=u.split(".").map(Number);return new Date(i,s-1,t)}};c.MaskedDate=B;class N extends y{constructor(e){super({...N.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:s,...i}=w(t),a=V({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const i=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,a=this.rawInputValue,r=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:a,l=a.slice(r.length),o=this.currentMask,h=new m,d=o?.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==o?(this.currentMask.reset(),r&&(this.currentMask.append(r,{raw:!0}),h.tailShift=this.currentMask.value.length-i.length),l&&(h.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),h}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new m;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,i]=super.doPrepare(e,t);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}doPrepareChar(e,t){t===void 0&&(t={});let[s,i]=super.doPrepareChar(e,t);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(t)),i=i.aggregate(a)}return[s,i]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const s=new m;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i,...a}=e;t&&this.compiledMasks.forEach((r,l)=>r.state=t[l]),s!=null&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:i,...a}=e[s];return R(t,a)&&t.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}N.DEFAULTS={...y.DEFAULTS,dispatch:(u,e,t,s)=>{if(!e.compiledMasks.length)return;const i=e.rawInputValue,a=e.compiledMasks.map((r,l)=>{const o=e.currentMask===r,h=o?r.displayValue.length:r.nearestInputPos(r.displayValue.length,p.FORCE_LEFT);return r.rawInputValue!==i?(r.reset(),r.append(i,{raw:!0})):o||r.remove(h),r.append(u,e.currentMaskFlags(t)),r.appendTail(s),{index:l,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(h,r.nearestInputPos(r.displayValue.length,p.FORCE_LEFT)))}});return a.sort((r,l)=>l.weight-r.weight||l.totalInputPositions-r.totalInputPositions),e.compiledMasks[a[0].index]}};c.MaskedDynamic=N;class U extends C{constructor(e){super({...U.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const i=t.map(l=>l.length),a=Math.min(...i),r=Math.max(...i)-a;s.mask="*".repeat(a),r&&(s.mask+="["+"*".repeat(r)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,p.FORCE_RIGHT),this.value.length),i=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(i.length){i.length===1&&this._forEachBlocksInRange(0,this.value.length,(r,l)=>{const o=i[0][l];l>=this.value.length||o===r.value||(r.reset(),r._appendChar(o,t))});const a=super._appendCharRaw(i[0][this.value.length],t);return i.length===1&&i[0].slice(this.unmaskedValue.length).split("").forEach(r=>a.aggregate(super._appendCharRaw(r))),a}return new m({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new b("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new m;const s=Math.min(super.nearestInputPos(0,p.FORCE_RIGHT),this.value.length);let i;for(i=e;i>=0&&!(this.enum.filter(r=>this.matchValue(r,this.value.slice(s,i),s)).length>1);--i);const a=super.remove(i,t);return a.tailShift+=i-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}U.DEFAULTS={...C.DEFAULTS,matchValue:(u,e,t)=>u.indexOf(e,t)===t};c.MaskedEnum=U;class Fe extends y{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}c.MaskedFunction=Fe;var ae;class F extends y{constructor(e){super({...F.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+q(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(q).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(q(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(i.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(e,t){t===void 0&&(t=!1);let s=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const r=this.number;let l=!isNaN(r),o=!1;if(l){let v;this.min!=null&&this.min<0&&this.number<this.min&&(v=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(v=this.max),v!=null&&(this.autofix?(this._value=this.format(v,this).replace(F.UNMASKED_RADIX,this.radix),o||(o=a===this._value&&!t.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let h;l?h=new m({inserted:this._value.slice(a.length),rawInserted:o?"":e,skip:o}):(this._value=a,h=new m),this._value=this._insertThousandsSeparators(this._value);const d=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(d);return h.tailShift+=(g-i)*this.thousandsSeparator.length,h}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const i=this._findSeparatorAround(t);return i>=0&&(t=i+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const r=this._separatorsCountFromSlice(s);return new m({tailShift:(r-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case p.NONE:case p.LEFT:case p.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===p.FORCE_LEFT)return s}break}case p.RIGHT:case p.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(s,i,a,r)=>i+r),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){t===void 0&&(t={});const i=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===F.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,F.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(F.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||F.EMPTY_VALUES.includes(e)&&F.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}ae=F;F.UNMASKED_RADIX=".";F.EMPTY_VALUES=[...y.EMPTY_VALUES,0];F.DEFAULTS={...y.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[ae.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:u=>u.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};c.MaskedNumber=F;const H={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function re(u,e,t){e===void 0&&(e=H.MASKED),t===void 0&&(t=H.MASKED);const s=V(u);return i=>s.runIsolated(a=>(a[e]=i,a[t]))}function xe(u,e,t,s){return re(e,t,s)(u)}c.PIPE_TYPE=H;c.createPipe=re;c.pipe=xe;class ye extends C{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,i;const{repeat:a,...r}=w(e);this._blockOpts=Object.assign({},this._blockOpts,r);const l=V(this._blockOpts);this.repeat=(t=(s=a??l.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((i=this._blocks)==null?void 0:i.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(V(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new m;for(let o=(i=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?i:Math.max(this._blocks.length-1,0),h,d;h=(r=this._blocks[o])!=null?r:d=!d&&this._allocateBlock(o);++o){var i,a,r,l;const g=h._appendChar(e,{...t,_beforeTailState:(l=t._beforeTailState)==null||(l=l._blocks)==null?void 0:l[o]});if(g.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(g),g.consumed)break}return s}_trimEmptyTail(e,t){var s,i;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let r;t!=null&&(r=(i=this._mapPosToBlock(t))==null?void 0:i.index),r==null&&(r=this._blocks.length-1);let l=0;for(let o=r;a<=o&&!this._blocks[o].unmaskedValue;--o,++l);l&&(this._blocks.splice(r-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}c.RepeatBlock=ye;try{globalThis.IMask=c}catch{}var be={mask:void 0,prepare:Function,prepareChar:Function,validate:Function,commit:Function,overwrite:{type:Boolean,required:!1,default:void 0},eager:{required:!1,default:void 0,validator:u=>["append","remove"].includes(u)||typeof u=="boolean"},skipInvalid:{type:Boolean,required:!1,default:void 0},placeholderChar:String,displayChar:String,lazy:{type:Boolean,required:!1,default:void 0},definitions:Object,blocks:Object,enum:Array,maxLength:Number,from:Number,to:Number,pattern:String,format:Function,parse:Function,autofix:{required:!1,default:void 0,validator:u=>u==="pad"||typeof u=="boolean"},radix:String,thousandsSeparator:String,mapToRadix:Array,scale:Number,normalizeZeros:{type:Boolean,required:!1,default:void 0},padFractionalZeros:{type:Boolean,required:!1,default:void 0},min:[Number,Date],max:[Number,Date],dispatch:Function};function Be(u,e){let{emit:t,onAccept:s,onComplete:i,defaultValue:a,defaultUnmaskedValue:r,defaultTypedValue:l}=e===void 0?{}:e;const o=n.isRef(u)?u:n.ref(u),h=n.ref(),d=n.ref(),g=n.ref(""),v=n.ref(""),f=n.ref();let k,E=g.value,x=v.value,z=f.value;function K(){z=f.value=d.value.typedValue,x=v.value=d.value.unmaskedValue,E=g.value=d.value.value}function I(_){K(),t&&(t("accept",g.value,_),t("accept:masked",g.value,_),t("accept:typed",f.value,_),t("accept:unmasked",v.value,_)),s?.(_)}function ne(_){t&&(t("complete",d.value.value,_),t("complete:masked",d.value.value,_),t("complete:typed",d.value.typedValue,_),t("complete:unmasked",d.value.unmaskedValue,_)),i?.(_)}const $=()=>{!d.value||v.value===void 0||(x!==v.value&&(d.value.unmaskedValue=v.value,d.value.unmaskedValue!==v.value&&I()),x=void 0)};n.watch(v,$);const Y=()=>{!d.value||g.value===void 0||(E!==g.value&&(d.value.value=g.value,d.value.value!==g.value&&I()),E=void 0)};n.watch(g,Y);const X=()=>{!d.value||f.value===void 0||(z!==f.value&&(d.value.typedValue=f.value,d.value.masked.typedValueEquals(f.value)||I()),z=void 0)};n.watch(f,X);function Z(){k=h.value;const _=o.value;!k||!(_!=null&&_.mask)||(d.value=c(k,_),a!==void 0&&(g.value=a),r!==void 0&&(v.value=r),l!==void 0&&(f.value=l),$(),Y(),X(),K(),d.value.on("accept",I).on("complete",ne))}function W(){var _;(_=d.value)==null||_.destroy(),d.value=void 0}return n.onMounted(Z),n.onUnmounted(W),n.watch([h,o],()=>{const _=h.value,j=o.value;(!(j!=null&&j.mask)||_!==k)&&W(),_&&(d.value?d.value.updateOptions(j):Z())}),{el:h,mask:n.readonly(d),masked:g,unmasked:v,typed:f}}function Ve(u,e){return u={...u},Object.keys(u).forEach(t=>{(u[t]===void 0||e.includes(t))&&delete u[t]}),u}const Se=["typed","unmasked","value","modelValue"];var De=n.defineComponent({name:"imask-input",inheritAttrs:!1,props:{modelValue:String,value:String,unmasked:String,typed:{validator:()=>!0},...be},emits:["update:modelValue","update:masked","update:value","update:unmasked","update:typed","accept","accept:value","accept:masked","accept:unmasked","accept:typed","complete","complete:value","complete:masked","complete:unmasked","complete:typed"],setup(u,e){let{attrs:t,emit:s}=e;const{el:i,mask:a,masked:r,unmasked:l,typed:o}=Be(Ve(u,Se),{emit:s,onAccept:f=>{const k=r.value;s("accept:value",k,f),s("update:value",k,f),s("update:masked",k,f),s("update:modelValue",k,f),s("update:unmasked",l.value,f),s("update:typed",o.value,f)},onComplete:f=>{s("complete:value",r.value,f)}}),h=n.toRef(u,"value"),d=n.toRef(u,"modelValue"),g=n.toRef(u,"unmasked"),v=n.toRef(u,"typed");return r.value=d.value||h.value||"",l.value=g.value||"",o.value=v.value,n.watch(h,f=>r.value=f),n.watch(d,f=>r.value=f),n.watch(g,f=>l.value=f),n.watch(v,f=>o.value=f),()=>{const f={...t,value:u.value!=null?u.value:u.modelValue!=null?u.modelValue:a.value?a.value.displayValue:"",ref:i};return u.mask||(f.onInput=k=>{s("update:modelValue",k.target.value),s("update:value",k.target.value)}),n.h("input",f)}}}),we=De;const Ie=["for"],Te={class:"state-layer"},Me={class:"content"},Re={class:"input-text-container"},Pe=["id","placeholder","aria-label"],Oe={key:1,class:"has-text-body-small phila-supporting-text"},Le={key:2,class:"has-text-body-small phila-error-text"},Ne=n.defineComponent({inheritAttrs:!1,__name:"TextField",props:{modelValue:{default:void 0},className:{default:""},label:{default:""},id:{default:`phila-text-field-${Math.random().toString(36).substring(2,9)}`},imaskProps:{default:void 0},supportingText:{default:""},placeholder:{default:""},leadingIcon:{default:""},trailingIcon:{default:""},error:{default(){return[]}}},emits:["update:modelValue","complete"],setup(u,{emit:e}){const t=n.useAttrs(),s=u,i=n.computed(()=>typeof s.error=="string"?s.error:s.error[0]),a=n.toRef(s,"id"),r=e,l=n.ref(""),o=n.computed({get:()=>s.modelValue!==void 0?s.modelValue:l.value,set:k=>{r("update:modelValue",k),l.value=k}}),h=n.computed(()=>{const k=["default-class"];return t.disabled!=null&&k.push("phila-input--disabled"),i.value&&k.push("phila-input--error"),t.required!=null&&k.push("phila-input--required"),A.cn(...k)}),d=n.computed(()=>{const k=[];return o.value!==""&&k.push("phila-text-field--filled"),s.className&&k.push(s.className),A.cn(...k)}),g=n.computed(()=>{if(!(s.label||t["aria-label"]))return s.placeholder||void 0}),v=n.ref(null),f=k=>{k.target.closest("button")||v.value?.focus()};return(k,E)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["phila-input",h.value])},[s.label?(n.openBlock(),n.createElementBlock("label",{key:0,for:a.value,class:"has-text-label-small phila-label"},n.toDisplayString(s.label),9,Ie)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["phila-text-field",d.value]),onClick:n.withModifiers(f,["prevent"])},[n.createElementVNode("div",Te,[s.leadingIcon?(n.openBlock(),n.createBlock(n.unref(A.Icon),{key:0,"icon-class":s.leadingIcon,inline:"",decorative:""},null,8,["icon-class"])):n.createCommentVNode("",!0),n.createElementVNode("div",Me,[n.createElementVNode("div",Re,[s.imaskProps?.mask?(n.openBlock(),n.createBlock(n.unref(we),n.mergeProps({key:0},{...n.unref(t),...s.imaskProps},{id:a.value,modelValue:o.value,"onUpdate:modelValue":E[0]||(E[0]=x=>o.value=x),class:"phila-text-field-input has-text-body-default",placeholder:s.placeholder,onComplete:E[1]||(E[1]=()=>r("complete",l.value))}),null,16,["id","modelValue","placeholder"])):n.withDirectives((n.openBlock(),n.createElementBlock("input",n.mergeProps({key:1},n.unref(t),{id:a.value,"onUpdate:modelValue":E[2]||(E[2]=x=>o.value=x),class:"phila-text-field-input has-text-body-default",placeholder:s.placeholder,"aria-label":g.value}),null,16,Pe)),[[n.vModelDynamic,o.value]])])]),o.value!=""?(n.openBlock(),n.createBlock(n.unref(he),{key:1,variant:"standard",size:"small","icon-only":"","icon-definition":n.unref(me),onClick:E[3]||(E[3]=x=>o.value="")},null,8,["icon-definition"])):n.createCommentVNode("",!0),s.trailingIcon?(n.openBlock(),n.createBlock(n.unref(A.Icon),{key:2,size:"small","icon-class":s.trailingIcon,inline:"",decorative:""},null,8,["icon-class"])):n.createCommentVNode("",!0),n.renderSlot(k.$slots,"trailing-action")])],2),s.supportingText?(n.openBlock(),n.createElementBlock("div",Oe,n.toDisplayString(s.supportingText),1)):n.createCommentVNode("",!0),i.value?(n.openBlock(),n.createElementBlock("div",Le,[n.createVNode(n.unref(A.Icon),{"icon-definition":n.unref(pe),size:"small",inline:"",decorative:""},null,8,["icon-definition"]),n.createTextVNode(" "+n.toDisplayString(i.value),1)])):n.createCommentVNode("",!0)],2))}}),Ue=["disabled"],ze=n.defineComponent({inheritAttrs:!1,__name:"PhlButton",props:{href:{},to:{},target:{},rel:{},disabled:{type:Boolean,default:!1},clickTarget:{},variant:{default:"primary"},size:{default:"medium"},iconOnly:{type:Boolean,default:!1},iconRight:{type:Boolean},text:{},className:{},iconDefinition:{},iconClass:{},src:{},svgRaw:{}},setup(u){const e=u,t=r=>"href"in r&&r.href!==void 0||"to"in r&&r.to!==void 0,s=n.computed(()=>A.cn("phila-button",`phila-button--${e.variant}`,e.size&&`is-${e.size}`,e.iconOnly&&"icon-button",e.iconOnly&&e.variant==="standard"&&"icon-button--standard",e.className)),i=n.computed(()=>t(e)?"to"in e&&e.to!==void 0?{to:e.to,disabled:e.disabled,className:s.value}:{href:e.href,target:e.target,rel:e.rel,disabled:e.disabled,className:s.value}:{}),a=n.computed(()=>({iconDefinition:e.iconDefinition,iconClass:e.iconClass,src:e.src,iconRight:e.iconRight,iconOnly:e.iconOnly,text:e.text,size:e.size}));return(r,l)=>t(e)?(n.openBlock(),n.createBlock(n.unref(A.BaseLink),n.mergeProps({key:0},{...i.value,...r.$attrs},{role:"button"}),{default:n.withCtx(()=>[n.createVNode(n.unref(A.ActionContent),n.normalizeProps(n.guardReactiveProps(a.value)),{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(e.text),1)])]),_:3},16)]),_:3},16)):(n.openBlock(),n.createElementBlock("button",n.mergeProps({key:1,type:"button",disabled:e.disabled,class:s.value},r.$attrs),[n.createVNode(n.unref(A.ActionContent),n.normalizeProps(n.guardReactiveProps(a.value)),{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(e.text),1)])]),_:3},16)],16,Ue))}}),je=n.defineComponent({inheritAttrs:!1,__name:"Search",props:{modelValue:{default:void 0},placeholder:{default:"Search by title or keyword"},className:{}},emits:["update:modelValue","search"],setup(u,{emit:e}){const t=n.useAttrs(),s=u,i=e,a=n.computed({get:()=>s.modelValue,set:h=>i("update:modelValue",h)}),r=n.computed(()=>t["aria-label"]),l=n.computed(()=>Object.fromEntries(Object.entries(t).filter(([h])=>h!=="aria-label"))),o=n.computed(()=>A.cn("default-class",s.className));return(h,d)=>(n.openBlock(),n.createElementBlock("div",n.mergeProps({class:["search",o.value]},l.value),[n.createVNode(n.unref(Ne),{modelValue:a.value,"onUpdate:modelValue":d[1]||(d[1]=g=>a.value=g),"class-name":"phila-text-field--search",placeholder:u.placeholder,"aria-label":r.value,onKeydown:d[2]||(d[2]=n.withKeys(g=>i("search"),["enter"]))},{"trailing-action":n.withCtx(()=>[n.createVNode(n.unref(ze),{variant:"standard",size:"small","icon-only":"","icon-definition":n.unref(le),"aria-label":"Search","class-name":"phila-button--search",onClick:d[0]||(d[0]=g=>i("search"))},null,8,["icon-definition"])]),_:1},8,["modelValue","placeholder","aria-label"])],16))}});exports.Search=je;
|