@sankhyalabs/ezui 1.1.75 → 1.1.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ApplicationUtils-d1c1db56.js +35 -0
- package/dist/cjs/AssetsUtils-dd585fba.js +24 -0
- package/dist/cjs/CSSVarsUtils-66e86394.js +18 -0
- package/dist/cjs/DataUnit-fdd7c70e.js +474 -0
- package/dist/cjs/DateUtils-716769e0.js +46 -0
- package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +26 -0
- package/dist/cjs/ez-button_11.cjs.entry.js +111771 -0
- package/dist/cjs/ez-calendar.cjs.entry.js +217 -0
- package/dist/cjs/ez-collapsible-box_6.cjs.entry.js +634 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +254 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +133 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +1838 -0
- package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +36 -212
- package/dist/cjs/ez-popover.cjs.entry.js +3 -3
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +10 -9
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +3 -3
- package/dist/cjs/form-metadata.cjs.entry.js +129 -0
- package/dist/cjs/index-40ebb2be.js +7422 -0
- package/dist/cjs/{index-4d2896bb.js → index-4e4bae01.js} +3 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +8 -3
- package/dist/collection/components/ez-application/ez-application.css +3 -0
- package/dist/collection/components/ez-application/ez-application.js +35 -0
- package/dist/collection/components/ez-button/ez-button.css +78 -44
- package/dist/collection/components/ez-button/ez-button.js +36 -4
- package/dist/collection/components/ez-calendar/ez-calendar.css +70 -3
- package/dist/collection/components/ez-calendar/ez-calendar.js +173 -24
- package/dist/collection/components/ez-check/ez-check.css +78 -78
- package/dist/collection/components/ez-check/ez-check.js +3 -3
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +34 -34
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +12 -12
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +65 -54
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +5 -0
- package/dist/collection/components/ez-date-input/ez-date-input.css +17 -3
- package/dist/collection/components/ez-date-input/ez-date-input.js +3 -3
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +44 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +243 -0
- package/dist/collection/components/ez-form/ez-form.js +37 -35
- package/dist/collection/components/ez-form/store/Form.actions.js +16 -16
- package/dist/collection/components/ez-form/store/Form.reducer.js +17 -17
- package/dist/collection/components/ez-form/subcomponents/DataUnit.js +11 -11
- package/dist/collection/components/ez-form/subcomponents/form-metadata.js +12 -12
- package/dist/collection/components/ez-form/subcomponents/place-holder.js +1 -1
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +21 -21
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
- package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +9 -9
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +21 -0
- package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +203 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +41 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +12 -0
- package/dist/collection/components/ez-grid/ez-grid.css +15 -0
- package/dist/collection/components/ez-grid/ez-grid.js +414 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +105 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +354 -0
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +7 -0
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +66 -0
- package/dist/collection/components/ez-icon/ez-icon.css +1 -1
- package/dist/collection/components/ez-list/ez-list.css +227 -44
- package/dist/collection/components/ez-list/ez-list.js +529 -149
- package/dist/collection/components/ez-modal/ez-modal.css +4 -4
- package/dist/collection/components/ez-modal/ez-modal.js +1 -1
- package/dist/collection/components/ez-number-input/ez-number-input.css +1 -165
- package/dist/collection/components/ez-number-input/ez-number-input.js +53 -339
- package/dist/collection/components/ez-popover/ez-popover.css +10 -6
- package/dist/collection/components/ez-popup/ez-popup.css +25 -27
- package/dist/collection/components/ez-search/ez-search.js +6 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +3 -3
- package/dist/collection/components/ez-text-area/ez-text-area.js +1 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css +60 -60
- package/dist/collection/components/ez-text-input/ez-text-input.js +17 -16
- package/dist/collection/components/ez-time-input/ez-time-input.js +3 -2
- package/dist/collection/components/ez-upload/ez-upload.js +3 -3
- package/dist/collection/components/test-du/test-du.css +3 -0
- package/dist/collection/components/test-du/test-du.js +45 -0
- package/dist/collection/servidor.js +94 -94
- package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
- package/dist/collection/utils/AssetsUtils.js +19 -0
- package/dist/collection/utils/CSSVarsUtils.js +6 -6
- package/dist/custom-elements/index.d.ts +36 -6
- package/dist/custom-elements/index.js +120886 -2964
- package/dist/esm/ApplicationUtils-01280a9d.js +33 -0
- package/dist/esm/AssetsUtils-3803e935.js +22 -0
- package/dist/esm/CSSVarsUtils-aeee9825.js +16 -0
- package/dist/esm/DataUnit-1cd45202.js +464 -0
- package/dist/esm/DateUtils-0a1bbd7a.js +44 -0
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +22 -0
- package/dist/esm/ez-button_11.entry.js +111757 -0
- package/dist/esm/ez-calendar.entry.js +213 -0
- package/dist/esm/ez-collapsible-box_6.entry.js +625 -0
- package/dist/esm/ez-combo-box.entry.js +250 -0
- package/dist/esm/ez-date-time-input.entry.js +129 -0
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +1834 -0
- package/dist/esm/ez-label-chip.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +36 -212
- package/dist/esm/ez-popover.entry.js +3 -3
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-time-input.entry.js +5 -4
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/form-metadata.entry.js +125 -0
- package/dist/esm/{index-33153059.js → index-1dacecd3.js} +3 -6
- package/dist/esm/index-ca8700cb.js +7414 -0
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-14bee38e.entry.js +1 -0
- package/dist/ezui/p-37a611ea.js +1 -0
- package/dist/ezui/p-3a09c678.entry.js +1 -0
- package/dist/ezui/p-43c15c94.entry.js +1 -0
- package/dist/ezui/{p-34d288d0.entry.js → p-516d0e0f.entry.js} +1 -1
- package/dist/ezui/{p-0d476efb.entry.js → p-5a86e18a.entry.js} +1 -1
- package/dist/ezui/{p-47406a6e.entry.js → p-5da66d3e.entry.js} +1 -1
- package/dist/ezui/p-7107d7ef.js +1 -0
- package/dist/ezui/p-72ff3c95.entry.js +1 -0
- package/dist/ezui/p-74f978db.entry.js +369 -0
- package/dist/ezui/p-88f45a83.entry.js +1 -0
- package/dist/ezui/p-8b099482.js +1 -0
- package/dist/ezui/p-8d6cdd3e.entry.js +1 -0
- package/dist/ezui/p-8f4851a6.js +1 -0
- package/dist/ezui/p-9dfd537e.js +1 -0
- package/dist/ezui/p-a0331955.entry.js +1 -0
- package/dist/ezui/p-a15093e3.entry.js +1 -0
- package/dist/ezui/{p-8818da66.entry.js → p-a18a2d7b.entry.js} +1 -1
- package/dist/ezui/p-a19f2af3.entry.js +1 -0
- package/dist/ezui/p-c6d469fc.entry.js +1 -0
- package/dist/ezui/p-c89629eb.js +1 -0
- package/dist/ezui/p-da929c01.js +1 -0
- package/dist/ezui/p-f3c5f27e.entry.js +1 -0
- package/dist/types/components/ez-application/ez-application.d.ts +10 -0
- package/dist/types/components/ez-button/ez-button.d.ts +5 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +21 -0
- package/dist/types/components/ez-check/ez-check.d.ts +1 -1
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +3 -3
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
- package/dist/types/components/ez-form/ez-form.d.ts +9 -9
- package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +1 -1
- package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +8 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +195 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +34 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +78 -0
- package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +30 -0
- package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +9 -0
- package/dist/types/components/ez-list/ez-list.d.ts +70 -17
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +29 -63
- package/dist/types/components/ez-search/ez-search.d.ts +2 -0
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +1 -1
- package/dist/types/components/test-du/test-du.d.ts +6 -0
- package/dist/types/components.d.ts +289 -139
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
- package/dist/types/utils/AssetsUtils.d.ts +1 -0
- package/dist/types/utils/CSSVarsUtils.d.ts +1 -1
- package/package.json +10 -8
- package/react/components.d.ts +6 -1
- package/react/components.js +6 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/CSSVarsUtils-f8827674.js +0 -18
- package/dist/cjs/RequestMetadata-2cd01e8a.js +0 -531
- package/dist/cjs/ez-button_16.cjs.entry.js +0 -4071
- package/dist/cjs/ez-list.cjs.entry.js +0 -174
- package/dist/cjs/ez-modal.cjs.entry.js +0 -65
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +0 -13
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +0 -185
- package/dist/esm/CSSVarsUtils-e0128b01.js +0 -16
- package/dist/esm/RequestMetadata-c265c9d5.js +0 -527
- package/dist/esm/ez-button_16.entry.js +0 -4052
- package/dist/esm/ez-list.entry.js +0 -170
- package/dist/esm/ez-modal.entry.js +0 -61
- package/dist/ezui/p-061d21ba.entry.js +0 -1
- package/dist/ezui/p-15743b09.entry.js +0 -1
- package/dist/ezui/p-46d07e59.entry.js +0 -1
- package/dist/ezui/p-4df6f855.js +0 -1
- package/dist/ezui/p-50464bdf.entry.js +0 -1
- package/dist/ezui/p-67410dfa.entry.js +0 -1
- package/dist/ezui/p-7be54779.entry.js +0 -1
- package/dist/ezui/p-7f3bc6d9.entry.js +0 -1
- package/dist/ezui/p-9dfccb16.js +0 -1
- package/dist/ezui/p-d1889704.js +0 -1
- package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +0 -45
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,g as a,H as s}from"./p-8f4851a6.js";import{g as r}from"./p-9dfd537e.js";import"./p-7107d7ef.js";let n=class{constructor(t){e(this,t)}buildField(e){let t=e.getAttribute("label"),a=e.getAttribute("name")||t,s=e.getAttribute("ui")||"SHORTTEXT",r=[];if("OPTIONSELECTOR"===s){t||(t="Selecione uma das opções:");const a={};Array.from(e.getElementsByTagName("OPTION")).forEach(((e,t)=>{const s=e.getAttribute("value")||t;a[s]=e.textContent})),r.push({name:"options",value:JSON.stringify(a)})}else if("FILE"===s){const t=e.querySelector("URL"),a=e.querySelectorAll("HEADERS>HEADER");if(t&&r.push({name:"URL",value:t.textContent}),a&&a.length>0){const e={};a.forEach((t=>{e[t.getAttribute("name")]=t.textContent})),r.push({name:"HEADERS",value:JSON.stringify(e)})}this.addPropertyIfExists(r,e,"maxfiles")}else t||(t=e.textContent),this.addPropertyIfExists(r,e,"precision"),this.addPropertyIfExists(r,e,"prettyprecision");return{name:a,userInterface:s,label:t,defaultValue:e.getAttribute("defaultValue"),required:"true"===e.getAttribute("required"),readOnly:"true"===e.getAttribute("readonly"),properties:r}}addPropertyIfExists(e,t,a){const s=t.getAttribute(a);s&&e.push({name:a,value:s})}buildFieldSet(e,t){return{label:t.getAttribute("label"),fields:Array.from(t.getElementsByTagName("FIELD")).map((t=>{const a=this.buildField(t);return e.addFieldMetadata(a),{name:a.name}}))}}fromElements(e,t,a,s,n){const i={name:a||t,dataUnit:s,label:t,autoLoad:n};return Array.from(e).forEach((e=>{switch(e.tagName.toUpperCase()){case"FIELD":i.items||(i.items=[]);const t=this.buildField(e);s.addFieldMetadata(t),i.items.push({name:t.name});break;case"FIELD-SET":i.items||(i.items=[]),i.items.push(this.buildFieldSet(s,e));break;case"SUB-FORM":i.subForms||(i.subForms=[]);const a=e.getAttribute("label")||"Subform "+(i.subForms.length+1),n=e.getAttribute("name")||a,l=e.getAttribute("dataunit");let o;o=l?new r(l,"noname",e.hasAttribute("many")?"N":"1"):s,i.subForms.push(this.fromElements(e.children,a,n,o,"true"===e.getAttribute("autoload")))}})),i}connectedCallback(){this.dataunit||(this.dataunit="dataunit_"+(this.name||this.label||(new Date).getTime()));const e=new r(this.dataunit,"noname",this.many?"N":"1");this.metadata=this.fromElements(this._host.children,this.label,this.name,e,this.autoload)}render(){return t(s,null)}get _host(){return a(this)}};export{n as form_metadata}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class t{static applyVarsTextInput(p,e){e&&(t.applyIfExists(p,e,"--ez-text-input__input--background-color"),t.applyIfExists(p,e,"--ez-text-input__input--border-color"))}static applyIfExists(t,p,e){const o=getComputedStyle(t).getPropertyValue(e);o&&p.style.setProperty(e,o)}}export{t as C}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as t,H as i,g as e}from"./p-8f4851a6.js";import{M as h,T as a,N as r}from"./p-da929c01.js";import{C as o}from"./p-8b099482.js";import{g as n}from"./p-37a611ea.js";let l=class{constructor(t){s(this,t),this.enabled=!0,this.showSeconds=!1}prepareMask(){this.showSeconds?null==this._maskFormatter?this._maskFormatter=new h("##:##:##"):this._maskFormatter.mask="##:##:##":null==this._maskFormatter?this._maskFormatter=new h("##:##"):this._maskFormatter.mask="##:##"}onValueChanged(){NaN===this.value&&(this.value=void 0,this.handleFocusout())}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){this.errorMessage="",this.prepareValue(this.viewValue),a.validateTime(this.viewValue,this.showSeconds)||(this.clearField(),this.errorMessage="Favor inserir um horário válido.")}prepareValue(s){try{this.viewValue=a.prepareValue(s,this.showSeconds)}catch(s){this.clearField(),this.errorMessage=s.message}}clearField(){this.viewValue=this.value=void 0}handleChange(){this.viewValue=this._inputElem.value,this.value=r.stringToNumber(this.viewValue.replace(/\D/g,""))}componentDidLoad(){this.onValueChanged(),o.applyVarsTextInput(this._elem,this._inputElem)}componentWillLoad(){this.prepareMask(),this.value?this.prepareValue(this.value.toString()):this.viewValue&&this.prepareValue(this.viewValue)}render(){return t(i,null,t("ez-text-input",{ref:s=>this._inputElem=s,value:this.viewValue,enabled:this.enabled,label:this.label,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},errorMessage:this.errorMessage},t("ez-icon",{slot:"leftIcon",href:n("timer-outline")})))}static get assetsDirs(){return["../assets"]}get _elem(){return e(this)}static get watchers(){return{showSeconds:["prepareMask"],value:["onValueChanged"]}}};l.style=":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";export{l as ez_time_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},i={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),a="http://www.w3.org/1999/xlink",u=new WeakMap,f=e=>"sc-"+e.o,h={},p=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!p(l))&&(l+=""),o&&i?r[r.length-1].i+=l:r.push(o?y(null,l):l),i=o)};if(c(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,r,$);const a=y(e,null);return a.u=t,r.length>0&&(a.h=r),a.p=s,a},y=(e,t)=>({t:0,m:e,i:t,$:null,h:null,u:null,p:null}),m={},$={forEach:(e,t)=>e.map(w).forEach(t),map:(e,t)=>e.map(w).map(t).map(b)},w=e=>({vattrs:e.u,vchildren:e.h,vkey:e.p,vname:e.g,vtag:e.m,vtext:e.i}),b=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),d(e.vtag,t,...e.vchildren||[])}const t=y(e.vtag,e.vtext);return t.u=e.vattrs,t.h=e.vchildren,t.p=e.vkey,t.g=e.vname,t},g=(e,t,n,l,o,r)=>{if(n!==l){let c=Z(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,s=j(n),o=j(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const s=p(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}let i=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(t=u,i=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(i?e.removeAttributeNS(a,t):e.removeAttribute(t)):(!c||4&r||o)&&!s&&(l=!0===l?"":l,i?e.setAttributeNS(a,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):Z(s,u)?u.slice(2):u[2]+t.slice(3),n&&i.rel(e,t,n,!1),l&&i.ael(e,t,l,!1)}},v=/\s/,j=e=>e?e.split(v):[],k=(e,t,n,l)=>{const s=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||h,i=t.u||h;for(l in o)l in i||g(s,l,o[l],void 0,n,t.t);for(l in i)g(s,l,o[l],i[l],n,t.t)},S=(t,l,s)=>{let i,r,c=l.h[s],a=0;if(null!==c.i)i=c.$=o.createTextNode(c.i);else{if(n||(n="svg"===c.m),i=c.$=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.m),n&&"foreignObject"===c.m&&(n=!1),k(null,c,n),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),c.h)for(a=0;a<c.h.length;++a)r=S(t,c,a),r&&i.appendChild(r);"svg"===c.m?n=!1:"foreignObject"===i.tagName&&(n=!0)}return i},O=(e,n,l,s,o,i)=>{let r,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=i;++o)s[o]&&(r=S(null,l,o),r&&(s[o].$=r,c.insertBefore(r,n)))},M=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.$,L(l),s.remove())},x=(e,t)=>e.m===t.m&&e.p===t.p,C=(e,t)=>{const l=t.$=e.$,s=e.h,o=t.h,i=t.m,r=t.i;null===r?(n="svg"===i||"foreignObject"!==i&&n,"slot"===i||k(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o,i=0,r=0,c=0,a=0,u=t.length-1,f=t[0],h=t[u],p=l.length-1,d=l[0],y=l[p];for(;i<=u&&r<=p;)if(null==f)f=t[++i];else if(null==h)h=t[--u];else if(null==d)d=l[++r];else if(null==y)y=l[--p];else if(x(f,d))C(f,d),f=t[++i],d=l[++r];else if(x(h,y))C(h,y),h=t[--u],y=l[--p];else if(x(f,y))C(f,y),e.insertBefore(f.$,h.$.nextSibling),f=t[++i],y=l[--p];else if(x(h,d))C(h,d),e.insertBefore(h.$,f.$),h=t[--u],d=l[++r];else{for(c=-1,a=i;a<=u;++a)if(t[a]&&null!==t[a].p&&t[a].p===d.p){c=a;break}c>=0?(o=t[c],o.m!==d.m?s=S(t&&t[r],n,c):(C(o,d),t[c]=void 0,s=o.$),d=l[++r]):(s=S(t&&t[r],n,r),d=l[++r]),s&&f.$.parentNode.insertBefore(s,f.$)}i>u?O(e,null==l[p+1]?null:l[p+1].$,n,l,r,p):r>p&&M(t,i,u)})(l,s,t,o):null!==o?(null!==e.i&&(l.textContent=""),O(l,null,t,o,0,o.length-1)):null!==s&&M(s,0,s.length-1),n&&"svg"===i&&(n=!1)):e.i!==r&&(l.data=r)},L=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(L)},P=e=>Q(e).v,R=(e,t,n)=>{const l=P(e);return{emit:e=>E(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},E=(e,t,n)=>{const l=i.ce(t,n);return e.dispatchEvent(l),l},W=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},T=(e,t)=>{if(e.t|=16,!(4&e.t))return W(e,e.k),ue((()=>U(e,t)));e.t|=512},U=(e,t)=>{const n=e.S;let l;return t&&(l=z(n,"componentWillLoad")),l=N(l,(()=>z(n,"componentWillRender"))),N(l,(()=>A(e,n,t)))},A=async(e,t,n)=>{const l=e.v,s=l["s-rc"];n&&(e=>{const t=e.O,n=e.v,l=t.t,s=((e,t)=>{let n=f(t),l=le.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=u.get(e=e.head||e);s||u.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);D(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>F(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},D=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.v,o=n.O,i=n.M||y(null,null),r=(e=>e&&e.m===m)(l)?l:d(null,null,l);t=s.tagName,o.C&&(r.u=r.u||{},o.C.map((([e,t])=>r.u[t]=s[e]))),r.m=null,r.t|=4,n.M=r,r.$=i.$=s.shadowRoot||s,e=s["s-sc"],C(i,r)})(n,l)}catch(e){ee(e,n.v)}return null},F=e=>{const t=e.v,n=e.S,l=e.k;z(n,"componentDidRender"),64&e.t||(e.t|=64,V(t),z(n,"componentDidLoad"),e.L(t),l||q()),e.P(t),e.j&&(e.j(),e.j=void 0),512&e.t&&ae((()=>T(e,!1))),e.t&=-517},H=e=>{{const t=Q(e),n=t.v.isConnected;return n&&2==(18&t.t)&&T(t,!1),n}},q=()=>{V(o.documentElement),ae((()=>E(s,"appload",{detail:{namespace:"ezui"}})))},z=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ee(e)}},N=(e,t)=>e&&e.then?e.then(t):t(),V=e=>e.classList.add("hydrated"),_=(e,t,n)=>{if(t.R){e.watchers&&(t.W=e.watchers);const l=Object.entries(t.R),s=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(s,e,{get(){return((e,t)=>Q(this).T.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=Q(e),o=s.v,i=s.T.get(t),r=s.t,c=s.S;if(n=((e,t)=>null==e||p(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.R[t][0]),!(8&r&&void 0!==i||n===i)&&(s.T.set(t,n),c)){if(l.W&&128&r){const e=l.W[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){ee(e,o)}}))}2==(18&r)&&T(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(s,e,{value(...t){const n=Q(this);return n.U.then((()=>n.S[e](...t)))}})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){i.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.C.push([e,s]),s}))}}return e},B=e=>{z(e,"connectedCallback")},G=(e,t={})=>{const n=[],l=t.exclude||[],r=s.customElements,a=o.head,u=a.querySelector("meta[charset]"),h=o.createElement("style"),p=[];let d,y=!0;Object.assign(i,t),i.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],o:t[1],R:t[2],A:t[3]};s.R=t[2],s.C=[],s.W={};const o=s.o,a=class extends HTMLElement{constructor(e){super(e),Y(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),y?p.push(this):i.jmp((()=>(e=>{if(0==(1&i.t)){const t=Q(e),n=t.O,l=()=>{};if(1&t.t)B(t.S);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){W(t,t.k=n);break}}n.R&&Object.entries(n.R).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=ne(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.W=s.watchers,_(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){ee(e)}t.t&=-9,t.t|=128,e(),B(t.S)}if(s.style){let e=s.style;const t=f(n);if(!le.has(t)){const l=()=>{};((e,t,n)=>{let l=le.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,le.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.k,i=()=>T(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){i.jmp((()=>{}))}componentOnReady(){return Q(this).D}};s.F=e[0],l.includes(o)||r.get(o)||(n.push(o),r.define(o,_(a,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),a.insertBefore(h,u?u.nextSibling:a.firstChild),y=!1,p.length?p.map((e=>e.connectedCallback())):i.jmp((()=>d=setTimeout(q,30)))},I=e=>{const t=new URL(e,i.l);return t.origin!==s.location.origin?t.href:t.pathname},J=e=>i.l=e,K=new WeakMap,Q=e=>K.get(e),X=(e,t)=>K.set(t.S=e,t),Y=(e,t)=>{const n={t:0,v:e,O:t,T:new Map};return n.U=new Promise((e=>n.P=e)),n.D=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],K.set(e,n)},Z=(e,t)=>t in e,ee=(e,t)=>(0,console.error)(e,t),te=new Map,ne=e=>{const t=e.o.replace(/-/g,"_"),n=e.F,l=te.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(te.set(n,e),e[t])),ee)},le=new Map,se=[],oe=[],ie=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&i.t?ae(ce):i.raf(ce))},re=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ee(e)}e.length=0},ce=()=>{re(se),re(oe),(l=se.length>0)&&i.raf(ce)},ae=e=>r().then(e),ue=ie(oe,!0);export{m as H,I as a,G as b,R as c,H as f,P as g,d as h,r as p,X as r,J as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as t}from"./p-7107d7ef.js";function s(t,s){return{type:"FORM/CHANGETAB",payload:{formId:t,index:s}}}function i(t,s){return{type:"FORM/CLEAREDITION",payload:{dataUnit:t,recordsLimit:s}}}function e(t,s){return{type:"FORM/COLLAPSEGROUP",payload:{collapseId:t,collapsed:s}}}function h(){return{type:"FORM/LOAD"}}function a(t){return{type:"FORM/DATALOADED",payload:{dataUnit:t}}}function r(t,s,i,e,h,a,r){return{type:"FORM/INVALIDFIELD",payload:{tabController:t,tabIndex:s,dataUnit:i,recordId:h,recordIndex:e,fieldName:a,errorMessage:r}}}function n(t,s){return{type:"FORM/SHOWHIDENAVBTN",payload:{buttonName:t,status:s}}}const o=(t,s)=>t.hist.present.currentTabIndex[s]||0,d=(t,s)=>t.hist.present.collapsedGroups[s],c=(t,s)=>t.hist.present.changes[s],u=(t,s)=>t.hist.present.currentRecordIndex[s]||0,l=(t,s)=>t.hist.present.newRecordIndex[s]||0,p=t=>t.nonhist.visibleButtons;class R{constructor(t,s,i="1",e=null){this.name=t,this.unitLabel=s,this.cardinality=i,this._children=[],this._fields=new Map,this._requiredFields=[],null!=e&&(e._children.push(this),this.parentDU=e,this.parentDUName=e.name)}set store(t){this._store=t}set fields(t){t&&t.forEach((t=>this.addFieldMetadata(t)))}addFieldMetadata(t){this._fields.set(t.name,t),t.required&&this._requiredFields.push(t)}getFieldMetadata(t){if(this._fields)return this._fields.get(t)}get requiredFields(){return this._requiredFields}isLoading(){return this._store.getState().nonhist.dataLoading[this.name]}hasChanges(){const t=this._store.getState();return void 0!==c(t,this.name)||l(t,this.name)>0}hasNext(){return u(this._store.getState(),this.name)<this.records.length-1}hasPrevious(){return u(this._store.getState(),this.name)>0}hasCurrentRecord(){return null!=this.getCurrentRecord()}previous(){this._store.dispatch({type:"FORM/NAVIGATE",payload:{dataUnit:this.name,limit:0,backward:!0}})}next(){this._store.dispatch({type:"FORM/NAVIGATE",payload:{dataUnit:this.name,limit:this.records.length,backward:!1}})}getValue(t){const s=this.getCurrentRecord();if(!s)return;const i=this.getRecordChanges(s);return i&&void 0!==i[t]?i[t]:s[t]||null}getErrorMessage(t){const s=this.getCurrentRecord();return((t,s,i,e)=>((t.nonhist.invalidFields[this.name]||{})[i]||{})[e]||"")(this._store.getState(),0,null==s?void 0:s.record__id,t)}changeValue(t,s){0==this.records.length&&this.insert(),this._changeDeboucing&&window.clearTimeout(this._changeDeboucing),this._changeDeboucing=window.setTimeout((()=>{const i=this.getCurrentRecord();this._store.dispatch(function(t,s,i,e){return{type:"FORM/CHANGEFIELD",payload:{dataUnit:t,recordId:s,fieldName:i,value:e}}}(this.name,i.record__id,t,s))}),100)}cancel(){this.records=this.records.filter((t=>!t.record__id.startsWith("NEW_"))),this._store.dispatch(i(this.name,this.records.length-1))}insert(){const t=this.records.length,s={record__id:"NEW_"+(l(this._store.getState(),this.name)+1)};this.bindToParent(s),this.records.push(s),this._store.dispatch(function(t,s){return{type:"FORM/INSERT",payload:{dataUnit:t,insertionIndex:s}}}(this.name,t))}buildChange(t){const s=c(this._store.getState(),this.name);let i;s&&(i=s[t.record__id]);let e=[];if(this._children.forEach((s=>{e=e.concat(s.getSubChanges(t.record__id))})),i||e.length>0){const s={__data__unit:this.name,__record__id:t.record__id,__sub__changes:e};return i&&Object.keys(i).forEach((()=>{})),s}}getSubChanges(t){const s=[];return this._records&&this._records.filter((s=>s.parent__record__id===t)).forEach((t=>{const i=this.buildChange(t);i&&s.push(i)})),s}getChangesToSave(){let t=[];return this._records&&this._records.forEach((s=>{const i=this.buildChange(s);i&&t.push(i)})),t}save(){if(!this.validateRecords("SAVE"))return;let s;this._store.dispatch({type:"FORM/SAVINGCHANGES",payload:{dataUnit:this.name}}),this.saveExecutor&&(s=this.saveExecutor(this.getChangesToSave())),s instanceof Promise?s.then((t=>this.processSaveResult(t))).catch((s=>{this._store.dispatch(a(this.name)),t.error("Falha ao tentar salvar",s)})):this.processSaveResult(s)}load(){let t;this._store.dispatch({type:"FORM/DATALOADING",payload:{dataUnit:this.name}}),this.loadExecutor&&(t=this.loadExecutor({dataUnit:this.name})),t instanceof Promise?t.then((t=>this.processLoadResult(t))):this.processLoadResult(t)}remove(){const t=u(this._store.getState(),this.name);let s;if(this._store.dispatch({type:"FORM/REMOVINGRECORD",payload:{dataUnit:this.name}}),this.removeExecutor){const t=this.getCurrentRecord();s=this.removeExecutor({dataUnit:this.name,recordId:t.record__id,record:t})}else s=!0;s&&(s instanceof Promise?s.then((s=>this.processRemoveResult(s,t))):this.processRemoveResult(s,t))}processSaveResult(t){t&&(t instanceof Array?t.forEach((t=>this.processSaveResult(t))):t.__data__unit===this.name&&"1"===this.cardinality&&(this.records=[this.buildRecordFromSaveResult(this.records[0],t)])),this._store.dispatch(i(this.name,this.records.length-1)),this._store.dispatch({type:"FORM/CHANGESSAVED",payload:{dataUnit:this.name}})}buildRecordFromSaveResult(t,s){const i=t?Object.assign({},t):{record__id:""};return Object.keys(s).forEach((t=>{t.startsWith("__")||(i[t]=s[t])})),i}processLoadResult(t){this.records=t,this._store.dispatch(i(this.name,this.records.length-1)),this._store.dispatch(a(this.name))}processRemoveResult(t,s){t&&(this.records.splice(s,1),this._store.dispatch(i(this.name,this.records.length-1))),this._store.dispatch({type:"FORM/RECORDREMOVED",payload:{dataUnit:this.name}})}set records(t){this._records=t,this.parentDU&&this._records.forEach((t=>this.bindToParent(t)))}bindToParent(t){if(this.parentDU){const s=this.parentDU.getCurrentRecord();s&&(t.parent__record__id=s.record__id)}}get records(){return this._records||(this._records=[]),this._records}getCurrentRecord(){const t=u(this._store.getState(),this.name);return this.records[t]}getRecordChanges(t){return void 0===t&&(t=this.getCurrentRecord()),t?((t,s,i)=>{const e=c(t,this.name);return e?e[i]:void 0})(this._store.getState(),0,t.record__id):void 0}validateRecords(s="UNKNOWN"){if(!this.recordsValidator)return!0;const i=c(this._store.getState(),this.name),e=[];this.records.forEach(((t,s)=>{const h=i?i[t.record__id]:void 0;h&&e.push(Object.assign(Object.assign(Object.assign({},t),h),{record__index:s,record__changedfields:Object.keys(h)}))}));const h=this.recordsValidator.validateRecords(this,e,s);return h.message&&t.info(h.message),h.isValid}}var O;!function(t){t.SEARCHING="SEARCHING",t.REQUIREMENT="REQUIREMENT",t.VISIBILITY="REQUIREMENT"}(O||(O={}));export{O as D,o as a,p as b,e as c,s as d,n as e,h as f,R as g,r as i,d as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as t,h as e,H as i,g as s}from"./p-8f4851a6.js";import"./p-da929c01.js";import{F as r}from"./p-ddd0ef12.js";import{C as a}from"./p-8b099482.js";let n=class{constructor(e){o(this,e),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.showSelectedValue=!1,this.showOptionValue=!1}internalUpdate(){this._inputElement&&(this._inputElement.value=this.getText()),this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}getText(){let o="";const t=this.getSelectedOption();return t&&(o=this.showSelectedValue?`${t.value} - ${t.label}`:t.label),o}getSelectedOption(){return"string"==typeof this.value||this.value instanceof String?this._visibleOptions.find((o=>o.value===this.value)):this.value}updateVisibleOptions(){let o=this._source||[];if(!this.searchMode&&this._criteria){const t=this._criteria.toUpperCase();o=o.filter((o=>o.label.toLocaleUpperCase().indexOf(t)>-1))}this._visibleOptions=[{value:void 0,label:""}].concat(o)}buildItem(o,t){return e("li",{class:t===this._preSelection?"item preselected":"item",id:`item_${o.value}`,onMouseDown:()=>this.selectOption(o),onMouseOver:()=>this._preSelection=void 0},e("span",{class:"item--label",title:o.label},o.label),this.showOptionValue?e("span",{class:"item--value",title:o.value},o.value):void 0)}showOptions(){this.enabled&&(this._floatingID=r.float(this._optionsList,this._listContainer,{autoClose:!0,top:this.errorMessage?"0px":"-17px"}),window.requestAnimationFrame((()=>{this._optionsList.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}hideOptions(){void 0!==this._floatingID&&r.close(this._floatingID),this._floatingID=void 0}isOptionsVisible(){return void 0!==this._floatingID&&r.isFloating(this._floatingID)}nextOption(){this.searchMode&&!this.isOptionsVisible()||(this.showOptions(),this._preSelection=void 0===this._preSelection?0:Math.min(this._preSelection+1,this._visibleOptions.length-1),this.scrollToOption(this._visibleOptions[this._preSelection],!0))}previousOption(){this._preSelection=void 0===this._preSelection?0:Math.max(this._preSelection-1,0),this.scrollToOption(this._visibleOptions[this._preSelection],!1)}scrollToOption(o,t){window.requestAnimationFrame((()=>{const e=this._optionsList.querySelector(`li#item_${o.value}`);if(e){const o=e.parentElement,i=o.getBoundingClientRect(),s=e.getBoundingClientRect();t&&s.bottom>i.bottom?o.scrollTop=s.top:!t&&s.top<i.top&&(o.scrollTop=0)}}))}selectCurrentOption(){void 0!==this._preSelection&&(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0)}selectOption(o){if(this.getSelectedOption()!==o){const t=(null==o?void 0:o.value)?o:void 0;this.value=t,this.errorMessage="",this.ezChange.emit(t)}else this.internalUpdate()}updateSource(o){o instanceof Promise?(o.then((o=>this.updateSource(o))),this.updateVisibleOptions()):(this._source=o,this.updateVisibleOptions())}loadOptions(o,t=""){this._criteria=t,this.updateSource(this.optionLoader?this.optionLoader({mode:o,argument:t}):this.options)}cancelPreselection(){!this._inputElement.value&&this.value?this.selectOption(void 0):this.internalUpdate()}componentWillLoad(){if(void 0===this.options){this.options=[];const o=this.el.querySelectorAll("option");o&&o.forEach((o=>{let t=o.innerText,e=o.getAttribute("value");e||(e=t),this.options.push({label:t,value:e}),o.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions("PRELOAD")}componentDidRender(){void 0===this._floatingID&&this._optionsList.remove()}componentDidLoad(){a.applyVarsTextInput(this.el,this._inputElement)}onTextInputChangeHandler(o){this._criteria||(this._inputElement.value=o.data);const t=o.target.value;this._criteria=t,this._criteria&&(this.searchMode?(this._changeDeboucingTimeout&&window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions("PREDICTIVE",t)}),200)):this.updateVisibleOptions(),this.showOptions())}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(o){switch(o.key){case"ArrowDown":this.nextOption();break;case"ArrowUp":this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection()}o.stopPropagation()}onTextInputFocusOutHandler(){this.cancelPreselection()}render(){return e(i,null,e("ez-text-input",{ref:o=>this._inputElement=o,enabled:this.enabled,onInput:o=>this.onTextInputChangeHandler(o),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onEzChange:o=>o.stopPropagation(),onKeyDown:o=>this.keyDownHandler(o),label:this.label,value:this.getText(),errorMessage:this.errorMessage},e("button",this.searchMode?{disabled:!this.enabled,tabindex:-1,class:"btn-open-search",onClick:()=>{this.loadOptions("ADVANCED")},slot:"leftIcon"}:{disabled:!this.enabled,tabindex:-1,class:"btn-open-options",slot:"rightIcon",onClick:()=>this.showOptions()})),e("section",{class:"list-container",ref:o=>this._listContainer=o},e("div",{class:"options-list",ref:o=>this._optionsList=o},this._visibleOptions.map(((o,t)=>this.buildItem(o,t))))))}get el(){return s(this)}static get watchers(){return{value:["internalUpdate"]}}};n.style=':host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn-search--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-search-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-search-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__btn-options--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-options-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-options-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #919191);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box__drop-down-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="16px"><path d="M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z"/></svg>\');--ez-combo-box__search-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="22px" width="22px"><path d="m 9.4,2.3 c 4.1,0 7.4,3.2 7.4,7.2 0,1.8 -0.7,3.4 -1.8,4.7 l 0.3,0.3 h 0.9 l 5.7,5.6 -1.7,1.7 -5.7,-5.6 V 15.3 L 14.3,15 C 13,16.1 11.3,16.7 9.5,16.7 5.3,16.7 2,13.5 2,9.5 2,5.5 5.3,2.3 9.4,2.3 m 0,2.2 c -2.9,0 -5.1,2.2 -5.1,5 0,2.8 2.3,5 5.1,5 2.8,0 5.1,-2.2 5.1,-5 0,-2.8 -2.2,-5 -5.1,-5 z"/></svg>\');--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}.list-container{position:relative;width:100%}.options-list{box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-combo-box--background-color--xlight);padding:var(--ez-combo-box--space--small);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);scroll-behavior:smooth;max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));overflow:auto}.item{text-align:left;display:flex;justify-content:space-between;align-items:center;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);list-style-type:none;min-height:var(--ez-combo-box__list-height)}.item--label{text-align:left;flex-basis:85%;flex-grow:1;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item--value{text-align:right;flex-basis:15%;flex-grow:0;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn-open-options{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-options:disabled{cursor:unset}.btn-open-options::after{content:\'\';display:flex;background-color:var(--ez-combo-box__btn-options--background-color);width:16px;height:16px;-webkit-mask-image:var(--ez-combo-box__drop-down-image);mask-image:var(--ez-combo-box__drop-down-image)}.btn-open-options:disabled:after{background-color:var(--ez-combo-box__btn-options-disabled--background-color)}.btn-open-options:enabled:hover::after{background-color:var(--ez-combo-box__btn-options-hover--background-color)}.btn-open-search{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-search:disabled{cursor:unset}.btn-open-search::after{content:\'\';display:flex;background-color:var(--ez-combo-box__btn-search--background-color);width:22px;height:22px;-webkit-mask-image:var(--ez-combo-box__search-image);mask-image:var(--ez-combo-box__search-image)}.btn-open-search:disabled:after{background-color:var(--ez-combo-box__btn-search-disabled--background-color)}.btn-open-search:enabled:hover::after{background-color:var(--ez-combo-box__btn-search-hover--background-color)}';export{n as ez_combo_box}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as n,g as a}from"./p-8f4851a6.js";import{T as r}from"./p-da929c01.js";import{D as s}from"./p-c89629eb.js";import{C as o}from"./p-8b099482.js";let c=class{constructor(i){t(this,i),this.ezChange=e(this,"ezChange",7),this.enabled=!0,this.showSeconds=!1}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}onChangeKeyDown(t){const e=this._textInput.shadowRoot.querySelector("input");if("H"===t.key||"h"===t.key)this.changeValue(new Date);else if(t.shiftKey&&"Tab"===t.key){if(e.selectionStart>0){let i=e.value.lastIndexOf(" ",e.selectionStart);-1!==i&&(e.setSelectionRange(0,i),t.preventDefault())}}else if("Tab"===t.key&&e.value.length!==e.selectionEnd){let i=e.value.indexOf(" ",e.selectionEnd);i=-1===i?e.selectionEnd:i+1,e.setSelectionRange(i,e.value.length),t.preventDefault()}}onFocused(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let e=t.value.indexOf(" ",t.selectionStart);e=-1===e?t.value.length:e,t.setSelectionRange(0,e)}}onClicked(){const t=this._textInput.shadowRoot.querySelector("input");let e=t.value.lastIndexOf(" ",t.selectionEnd);e=-1===e?0:e+1,e=e>t.selectionEnd?0:e;let i=0===e?t.value.indexOf(" "):t.value.length;t.setSelectionRange(e,i)}changeValue(t){this._textInput.errorMessage="",t!==this.value&&(this.value=t,this.ezChange.emit())}showCalendar(){this._calendar.fitVertical(this._textInput.errorMessage?0:-17,this._elem.clientHeight),this._calendar.style.visibility="inherit"}parseDate(){const t=this._textInput.value,e=t&&t.length>0?t.split(" "):[],i=e.length>0?e[0]:t,n=r.prepareValue(e[1]?e[1]:"",this.showSeconds),a=s.strToDate(i+(n&&" "+n));a||!t?this.changeValue(this.value===a?this.value:a):this._textInput.errorMessage="O valor digitado não é uma data válida"}getTextValue(t){return t?new Intl.DateTimeFormat("pt-BR",this.showSeconds?{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}).format(t):null}componentDidLoad(){o.applyVarsTextInput(this._elem,this._textInput)}render(){return i(n,null,i("ez-text-input",{ref:t=>this._textInput=t,onBlur:()=>this.parseDate(),onKeyDown:t=>{this.onChangeKeyDown(t)},label:this.label,onEzChange:t=>t.stopPropagation(),value:this.getTextValue(this.value),restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,onFocus:()=>this.onFocused(),onClick:()=>this.onClicked()},i("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),i("ez-calendar",{onEzChange:t=>{this.changeValue(this._calendar.value),t.stopPropagation()},floating:!0,ref:t=>this._calendar=t,time:!0,showSeconds:this.showSeconds}))}get _elem(){return a(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};c.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{c as ez_date_time_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,f as o,h as a}from"./p-4df6f855.js";class l{constructor(i,t,o,a,l,d){this.title=i,this.message=t,this.critical=o,this.confirm=a,this.icon=l,this.callBack=d}}let d=class{constructor(o){i(this,o),this.ezCancel=t(this,"ezCancel",7),this.ezAccept=t(this,"ezAccept",7),this.confirm=!1,this.critical=!1,this.opened=!1,this._messageQueue=[]}async handleButtonClick(i){this.opened=this._messageQueue.length>0,this._currentMessage.callBack?this._currentMessage.callBack(i):i?this.ezAccept.emit(i):this.ezCancel.emit(i),this._currentMessage=this._messageQueue.shift(),o(this)}async show(i,t,o,a,d){return this.opened=!0,new Promise((e=>{this._messageQueue.push(new l(i,t,o,a,d,e))}))}componentWillRender(){this._currentMessage||(this._messageQueue.length>0?this._currentMessage=this._messageQueue.pop():this.opened&&(this._currentMessage=new l(this.ezTitle,this.message,this.critical,this.confirm,this.personalizedIconPath,null)))}render(){return this.opened&&this._currentMessage?a("div",{class:"overlay"},a("div",{class:"dialog"},a("div",{class:!0===this._currentMessage.critical?"dialog__critical--indicator":"dialog__warning--indicator"}),a("div",{class:"dialog__container"},a("div",{class:"title__container"},a("div",{class:"title__box"},this._currentMessage.icon?a("svg",{class:"changeable__icon",role:"img"},a("use",{xlinkHref:this._currentMessage.icon})):a("div",{class:this._currentMessage.critical?"title-icon title-icon--critical":"title-icon"}),a("div",{class:"title title--label"},a("h2",null,this._currentMessage.title))),a("button",{class:"btn-close",onClick:()=>this.handleButtonClick(!1)})),a("div",{class:"message"},this._currentMessage.message),this._currentMessage.confirm?a("div",{class:"button-yes-no__container"},a("ez-button",{class:"button__no",mode:"link",label:"Não",onClick:()=>this.handleButtonClick(!1)}),a("ez-button",{label:"Ok",onClick:()=>this.handleButtonClick(!0)})):void 0,this._currentMessage.confirm?void 0:a("div",{class:"button__ok--container"},a("ez-button",{label:"Ok",onClick:()=>this.handleButtonClick(!0)}))))):null}};d.style=':host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--dialog__title--font-pattern:var(--font-pattern, "\'Sora\', \'Algerian\'");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, "\'Sora\', \'Algerian\'");--dialog__body--text-shadow:var(--text-shadow, "0 0 0 #353535, 0 0 1px transparent");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url(\'data: image/svg+xml;utf8,<svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path d="M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895"/></svg>\');--dialog--critical__image:url(\'data: image/svg+xml;utf8,<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"><path d="M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z"/></svg>\')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{width:15px;height:15px}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:1.3}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title--label{padding-left:var(--dialog__title--padding-left)}.title-icon{outline:none;border:none;background-color:var(--dialog__warning--background-color);width:26px;height:26px;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:\'\';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.title-icon--critical::after{content:\'\';display:flex;background-color:#FFFF;width:13px;height:13px;-webkit-mask-image:var(--dialog--critical__image);mask-image:var(--dialog--critical__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__no{padding-right:var(--dialog__btn__no--padding-right)}.button__ok--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{d as ez_dialog}
|
|
1
|
+
import{r as i,c as t,f as o,h as a}from"./p-8f4851a6.js";class l{constructor(i,t,o,a,l,d){this.title=i,this.message=t,this.critical=o,this.confirm=a,this.icon=l,this.callBack=d}}let d=class{constructor(o){i(this,o),this.ezCancel=t(this,"ezCancel",7),this.ezAccept=t(this,"ezAccept",7),this.confirm=!1,this.critical=!1,this.opened=!1,this._messageQueue=[]}async handleButtonClick(i){this.opened=this._messageQueue.length>0,this._currentMessage.callBack?this._currentMessage.callBack(i):i?this.ezAccept.emit(i):this.ezCancel.emit(i),this._currentMessage=this._messageQueue.shift(),o(this)}async show(i,t,o,a,d){return this.opened=!0,new Promise((e=>{this._messageQueue.push(new l(i,t,o,a,d,e))}))}componentWillRender(){this._currentMessage||(this._messageQueue.length>0?this._currentMessage=this._messageQueue.pop():this.opened&&(this._currentMessage=new l(this.ezTitle,this.message,this.critical,this.confirm,this.personalizedIconPath,null)))}render(){return this.opened&&this._currentMessage?a("div",{class:"overlay"},a("div",{class:"dialog"},a("div",{class:!0===this._currentMessage.critical?"dialog__critical--indicator":"dialog__warning--indicator"}),a("div",{class:"dialog__container"},a("div",{class:"title__container"},a("div",{class:"title__box"},this._currentMessage.icon?a("svg",{class:"changeable__icon",role:"img"},a("use",{xlinkHref:this._currentMessage.icon})):a("div",{class:this._currentMessage.critical?"title-icon title-icon--critical":"title-icon"}),a("div",{class:"title title--label"},a("h2",null,this._currentMessage.title))),a("button",{class:"btn-close",onClick:()=>this.handleButtonClick(!1)})),a("div",{class:"message"},this._currentMessage.message),this._currentMessage.confirm?a("div",{class:"button-yes-no__container"},a("ez-button",{class:"button__no",mode:"link",label:"Não",onClick:()=>this.handleButtonClick(!1)}),a("ez-button",{label:"Ok",onClick:()=>this.handleButtonClick(!0)})):void 0,this._currentMessage.confirm?void 0:a("div",{class:"button__ok--container"},a("ez-button",{label:"Ok",onClick:()=>this.handleButtonClick(!0)}))))):null}};d.style=':host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--dialog__title--font-pattern:var(--font-pattern, "\'Sora\', \'Algerian\'");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, "\'Sora\', \'Algerian\'");--dialog__body--text-shadow:var(--text-shadow, "0 0 0 #353535, 0 0 1px transparent");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url(\'data: image/svg+xml;utf8,<svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path d="M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895"/></svg>\');--dialog--critical__image:url(\'data: image/svg+xml;utf8,<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"><path d="M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z"/></svg>\')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{width:15px;height:15px}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:1.3}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title--label{padding-left:var(--dialog__title--padding-left)}.title-icon{outline:none;border:none;background-color:var(--dialog__warning--background-color);width:26px;height:26px;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:\'\';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.title-icon--critical::after{content:\'\';display:flex;background-color:#FFFF;width:13px;height:13px;-webkit-mask-image:var(--dialog--critical__image);mask-image:var(--dialog--critical__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__no{padding-right:var(--dialog__btn__no--padding-right)}.button__ok--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{d as ez_dialog}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as a,g as o,f as r}from"./p-8f4851a6.js";import"./p-da929c01.js";import{D as l}from"./p-c89629eb.js";import{C as s}from"./p-8b099482.js";import{A as n}from"./p-7107d7ef.js";let d=class{constructor(i){t(this,i),this.ezChange=e(this,"ezChange",7),this.value=!1,this.headerSize="small",this.iconPlacement="left"}observeValue(){this.ezChange.emit()}async showHide(){this.value=!this.value}render(){return i(a,null,"right"==this.iconPlacement?i("div",{class:"collapsible-box__title"},i("label",{class:("right"==this.iconPlacement?"collapsible-box__label--icon-right ":"collapsible-box__label ")+(this.headerSize?"font--"+this.headerSize:""),onClick:()=>this.showHide(),title:this.label},this.label),i("button",{class:this.value?"collapsible-box__btn collapsible-box__btn--collapsed collapsible-box__btn--"+this.headerSize:"collapsible-box__btn collapsible-box__btn--"+this.headerSize,onClick:()=>this.showHide()})):i("div",{class:"collapsible-box__title"},i("button",{class:this.value?"collapsible-box__btn collapsible-box__btn--collapsed collapsible-box__btn--"+this.headerSize:"collapsible-box__btn collapsible-box__btn--"+this.headerSize,onClick:()=>this.showHide()}),i("label",{class:("right"==this.iconPlacement?"collapsible-box__label--icon-right ":"collapsible-box__label ")+(this.headerSize?"font--"+this.headerSize:""),onClick:()=>this.showHide(),title:this.label},this.label)),this.value?null:i("slot",null))}static get watchers(){return{value:["observeValue"]}}};d.style=':host{--ez-collapsible-box--height:42px;--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box__btn--image--xsmall:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="12px" width="7.5px"><path d="M 0,10.56 4.5967752,6.0000006 0,1.3800006 1.4516132,0 7.5,6.0000006 1.4516132,12 Z"/></svg>\');--ez-collapsible-box__btn--image--small:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="14px" width="8.68px"><path d="M 0,12.32 5.3200012,7.0000007 0,1.6100007 1.6800004,0 8.68,7.0000007 1.6800004,14 Z"/></svg>\');--ez-collapsible-box__btn--image--medium:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\');--ez-collapsible-box__btn--image--large:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="18px" width="11.25px"><path d="M 0,15.84 6.8951628,9.0000009 0,2.0700009 2.1774198,0 11.25,9.0000009 2.1774198,18 Z"/></svg>\');--ez-collapsible-box__btn--image--xlarge:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="20px" width="12.5px"><path d="M 0,17.6 7.661292,10.000001 0,2.300001 2.4193553,0 12.5,10.000001 2.4193553,20 Z"/></svg>\');--ez-collapsible-box__btn--fill:var(--ez-collapsible-box--color);--ez-collapsible-box__btn--width:10px;--ez-collapsible-box__btn--height:16px;display:flex;flex-wrap:wrap;width:100%}.collapsible-box__title{width:100%;align-self:center;display:flex;box-sizing:border-box}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;width:100%;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__label--icon-right{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__btn{outline:none;border:none;background-color:unset;cursor:pointer;padding:1px 6px}.collapsible-box__btn::after{content:\'\';display:flex;background-color:var(--ez-collapsible-box__btn--fill);width:var(--ez-collapsible-box__btn--width);height:var(--ez-collapsible-box__btn--height);transition:transform var(--transition);transform:rotate(90deg)}.collapsible-box__btn--xsmall::after{width:7.5px;height:12px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xsmall);mask-image:var(--ez-collapsible-box__btn--image--xsmall)}.collapsible-box__btn--small::after{width:8.68px;height:14px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--small);mask-image:var(--ez-collapsible-box__btn--image--small)}.collapsible-box__btn--medium::after{width:10px;height:16px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--medium);mask-image:var(--ez-collapsible-box__btn--image--medium)}.collapsible-box__btn--large::after{width:11.25px;height:18px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--large);mask-image:var(--ez-collapsible-box__btn--image--large)}.collapsible-box__btn--xlarge::after{width:12.5px;height:20px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xlarge);mask-image:var(--ez-collapsible-box__btn--image--xlarge)}.collapsible-box__btn--collapsed::after{transform:rotate(0deg)}.font--xsmall{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--xlarge{font-size:20px}';let h=class{constructor(i){t(this,i),this.ezChange=e(this,"ezChange",7),this.enabled=!0}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}changeValue(t){t=null==t?null:l.clearTime(t),this._textInput.errorMessage="",t!==this.value&&(this.value=t,this.ezChange.emit())}showCalendar(){this.parseDate(),this._calendar.value=this.value,this._calendar.fitVertical(this._textInput.errorMessage?0:-17,this._elem.clientHeight)}hideCalendar(){this.changeValue(this._calendar.value),this._calendar.hide()}parseDate(){const t=this._textInput.value,e=l.strToDate(t);e||!t?this.changeValue(this.value===e?this.value:e):this._textInput.errorMessage="O valor digitado não é uma data válida"}getTextValue(t){return t?new Intl.DateTimeFormat("pt-BR").format(t):null}componentDidLoad(){s.applyVarsTextInput(this._elem,this._textInput)}render(){return i(a,null,i("ez-text-input",{ref:t=>this._textInput=t,onBlur:()=>this.parseDate(),onKeyDown:t=>{"H"!==t.key&&"h"!==t.key||this.changeValue(new Date)},label:this.label,onEzChange:t=>t.stopPropagation(),value:this.getTextValue(this.value),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage},i("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),i("ez-calendar",{onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},floating:!0,ref:t=>this._calendar=t}))}get _elem(){return o(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};h.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';let c=class{constructor(i){t(this,i),this.ezChange=e(this,"ezChange",7),this.showPopup=e(this,"showPopup",7),this.enabled=!0,this.showSelectedValue=!0,this.showOptionValue=!0}updateValue(){this._comboElement&&(this._comboElement.value=this.value)}onComboChange(t){t.stopPropagation(),this.value=t.detail,this.ezChange.emit(t.detail)}componentDidLoad(){s.applyVarsTextInput(this._elem,this._comboElement)}render(){return i("ez-combo-box",{ref:t=>this._comboElement=t,value:this.value,label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,optionLoader:this.optionLoader,searchMode:!0,onEzChange:t=>this.onComboChange(t),showSelectedValue:this.showSelectedValue,showOptionValue:this.showOptionValue})}get _elem(){return o(this)}static get watchers(){return{value:["updateValue"]}}};c.style=":host{width:100%}";let p=class{constructor(i){t(this,i),this.ezChange=e(this,"ezChange",7),this.enabled=!0,this.rows=4}showError(){"string"==typeof this.errorMessage&&""!==this.errorMessage?(this._container.classList.add("hasError"),this._messageBoxElem.classList.add("hasError")):(this._container.classList.remove("hasError"),this._messageBoxElem.classList.remove("hasError"))}updateInputValue(){this._inputElem.value=this.value,this.handleChange(),this.adjustFloatingLabel(),this.ezChange.emit(this.value)}adjustFloatingLabel(){if(this.label){const t=this.value&&this.value.toString().length>0,e=this._labelElem.classList.contains("textarea__label--floated");t||this.isFocused()?e||this._labelElem.classList.add("textarea__label--floated"):e&&this._labelElem.classList.remove("textarea__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){this.adjustFloatingLabel(),this._container&&this._container.classList.contains("textarea--focus")&&this._container.classList.remove("textarea--focus")}handleChange(){this.errorMessage="",this.value=this._inputElem.value}handleFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("textarea__label--floated")&&this._labelElem.classList.add("textarea__label--floated"),this._container&&!this._container.classList.contains("textarea--focus")&&this._container.classList.add("textarea--focus")}componentDidLoad(){this.showError(),this.adjustFloatingLabel()}render(){return i(a,null,i("div",{class:"textarea",ref:t=>this._container=t},this.label?i("label",{ref:t=>this._labelElem=t,class:this.enabled?"textarea__label":"textarea__label textarea__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,i("textarea",{onFocus:()=>this.handleFocus(),ref:t=>this._inputElem=t,value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},onKeyDown:t=>t.stopPropagation(),rows:this.rows})),i("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage},this.errorMessage))}get _hostElement(){return o(this)}static get watchers(){return{errorMessage:["showError"],value:["updateInputValue"]}}};p.style=":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--large, 500);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;margin-top:calc(var(--space--medium, 12px) + 4px);width:100%;font-weight:var(--text-weight--large, 600);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);padding:0;background:none}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}";class b{constructor(t){this.file=t,this.size=t.size,this.name=t.name}abortUpload(){this._uploadingXhr&&(this._aborted=!0,this._uploadingXhr.abort(),this._uploadingXhr=void 0)}isUploading(){return void 0!==this._uploadingXhr}async upload(t,e,i){return new Promise(((a,o)=>{const r=new XMLHttpRequest;this._uploadingXhr=r,this._aborted=!1,this.progress=0,r.upload.onprogress=t=>{const e=t.loaded,a=t.total;this.progress=~~(e/a*100),i(this,e,a)},r.onreadystatechange=()=>{if(4==r.readyState){this._uploadingXhr=void 0;const t=r.status;this._aborted||(0===t?o("Servidor indisponível"):t>=500?o("Erro inesperado no servidor"):t>=400&&o("Operação não permitida"));const e=r.response;e&&a(JSON.parse(e))}},r.ontimeout=()=>{o("Tempo limite de transferência atingido.")};const l=new FormData;l.append("ARQUIVO",this.file,this.file.name),r.open("POST",t,!0),e&&e.forEach(((t,e)=>r.setRequestHeader(e,t))),r.send(l)}))}async delete(t,e,i){return new Promise(((a,o)=>{const r=new XMLHttpRequest;r.onreadystatechange=()=>{4==r.readyState&&(0===r.status?o("Servidor indisponível"):r.status>=500?o("Erro inesperado no servidor"):r.status>=400&&o("Operação não permitida"),a(!0))},r.ontimeout=()=>{o("Tempo limite de remoção atingido.")},r.open("DELETE",e,!0),i&&i.forEach(((t,e)=>r.setRequestHeader(e,t))),r.send(JSON.stringify(t))}))}}let x=class{constructor(i){t(this,i),this.ezChange=e(this,"ezChange",7),this._filePointers=new Map,this.enabled=!0}changeValue(t){t!==this._updatingValue&&(this._filePointers.forEach((t=>{this.isRemoteFile(t)&&t.abortUpload()})),this._filePointers=new Map,this.updateFilePointers()),this._updatingValue=void 0}updateFilePointers(){this.value&&this.value.forEach((t=>this._filePointers.set(t.name,t)))}normalizeRequestHeaders(){if(this._requestHeaders=new Map,"string"==typeof this.requestHeaders)try{this.requestHeaders=JSON.parse(this.requestHeaders)}catch(t){this.requestHeaders=void 0}for(var t in this.requestHeaders)this._requestHeaders.set(t,this.requestHeaders[t])}async addFiles(t){if(this.maxFiles>0){let e=this._filePointers.size;if(t.forEach((t=>{this._filePointers.has(t.name)||e++})),e>this.maxFiles)return void this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`)}Array.prototype.forEach.call(t,this.addFile.bind(this))}async addFile(t){const e=this._filePointers.get(t.name);e?n.confirm("Substituir arquivo",`Já existe um arquivo chamado "${t.name}". Deseja substituí-lo?`).then((i=>{i&&(this.isRemoteFile(e)&&e.abortUpload(),this.doAddFile(t))})):this.doAddFile(t)}async doAddFile(t){if(this.validateFile(t)){const e=new b(t);this._filePointers.set(t.name,e),e.upload(this.urlUpload,this._requestHeaders,(t=>this.updateFeedback(t))).then((t=>t.forEach((t=>this.finishUpload(t))))).catch((t=>this.showError(t))),r(this)}}finishUpload(t){this._filePointers.set(t.name,t),this.updateValue()}updateValue(){this._updatingValue=[],this._filePointers.forEach((t=>{this.isRemoteFile(t)||this._updatingValue.push(t)})),this.value=this._updatingValue,this.ezChange.emit(this.value)}buildProgressId(t){return`PROGRESS_${t.name.replace(/[^a-z0-9_]/gi,"_")}_${t.file.lastModified}`}updateFeedback(t){window.requestAnimationFrame((()=>{if(this._host){const e=this._host.shadowRoot.querySelector("#"+this.buildProgressId(t));e&&(e.value=t.progress)}}))}validateFile(t){return!this._filePointers.has(t.name)&&this.maxFiles>0&&this._filePointers.size>=this.maxFiles?(this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`),!1):0===t.size?(this.showError(`Erro de permissão: O arquivo "${t.name}" não pode ser enviado.`),!1):this.urlUpload?!(this.maxFileSize>=0&&t.size>this.maxFileSize&&(this.showError("O tamanho máximo dos arquivos é de "+this.formatBytes(this.maxFileSize)),1)):(this.showError("Endereço de upload não informado"),!1)}showError(t){n.alert("Enviando arquivo",t)}formatBytes(t,e=1){if(0===t)return"0 Bytes";const i=e<0?0:e,a=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,a)).toFixed(i))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][a]}onFileInputChange(t){this.addFiles(Array.from(t.target.files)),this._fileInput.value=""}isRemoteFile(t){return"file"in t}removeFromList(t){this._filePointers.delete(t),this.updateValue()}removeFile(t){const e=this._filePointers.get(t);if(this.isRemoteFile(e))e.abortUpload(),this.removeFromList(t);else if(this.urlDelete){const i=new b(null);this._filePointers.set(e.name,i),i.delete(e,this.urlDelete,null).then((()=>this.removeFromList(t))).catch((t=>this.showError(t)))}else this.removeFromList(t)}openFilesDialog(){this.enabled&&this._fileInput.click()}componentDidLoad(){this.enabled&&this._dropZone&&window.FileList&&window.File&&(this._dropZone.addEventListener("dragover",(t=>{t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy",this._dropZone.style.background="#c2dbff"})),this._dropZone.addEventListener("drop",(t=>{t.stopPropagation(),t.preventDefault(),this.addFiles(Array.from(t.dataTransfer.files)),this._dropZone.style.background=""})),this._dropZone.addEventListener("dragleave",(()=>{this._dropZone.style.background=""})))}componentWillRender(){this.value&&this._filePointers.size<this.value.length&&this.updateFilePointers()}render(){return i("div",{ref:t=>this._dropZone=t,class:this.evalDisabledClass("iu","background--disabled")},i("div",{class:"iu__container",onClick:()=>this.openFilesDialog()},i("div",{class:"iu_header"},this.label?i("label",{class:this.evalDisabledClass("iu__label","text--disabled"),title:this.label},this.label):null,i("div",{class:this.evalDisabledClass("iu__icon-label","mouse-pointer--disabled")},i("button",{class:"iu__file-icon",disabled:!this.enabled}),i("div",{class:this.evalDisabledClass("text text--center text--medium text--primary","text--disabled")},this.enabled?"Arraste e solte ou clique para adicionar arquivos":"Somente leitura"))),this.buildFooter()),i("input",{ref:t=>this._fileInput=t,onChange:t=>this.onFileInputChange(t),type:"file",multiple:!0,hidden:!0}))}buildFooter(){if(0===this._filePointers.size)return null;const t=[];return this._filePointers.forEach((e=>t.push(this.buildFileItem(e)))),i("div",{class:"iu__footer"},t)}buildFileItem(t){const e=t.name,a=Number(t.progress),o=t.downloadURL,r=`${e} (${this.formatBytes(t.size)})`;return i("div",{class:"iu__item",key:e,onClick:t=>t.stopPropagation()},i("div",{class:"iu__item-label modificador"},i("div",{title:r,class:"col--stretch align--middle file__name text text--primary text--small text--ellipsis align--middle"},o?i("a",{href:o,download:!0},r):r)),isNaN(a)?null:i("div",{class:"col col--sd-4 col--stretch align--middle"},i("progress",{id:this.buildProgressId(t),value:a,max:"100"})),this.enabled?i("div",{class:"col col--stretch align--middle"},i("button",{class:"btn-cancel ",onClick:()=>this.removeFile(e)})):null)}evalDisabledClass(t,e){return this.enabled?t:`${t} ${e}`}get _host(){return o(this)}static get watchers(){return{value:["changeValue"],requestHeaders:["normalizeRequestHeaders"]}}};x.style=':host{--ez-upload--height:42px;--ez-upload--width:100%;--ez-upload__icon--width:48px;--ez-upload__container--background-color:var(--background--medium, #d2dce9);--ez-upload__color--primary:var(--color--primary, #008561);--ez-upload--padding--extra-small:var(--space--extra-small, 3px);--ez-upload--padding--small:var(--space--small, 6px);--ez-upload--padding--medium:var(--space--medium, 12px);--ez-upload--padding--large:var(--space--large, 24px);--ez-upload__border--color:var(--color-strokes, #DCE0E8);--ez-upload--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-upload--text--primary:var(--text-primary, #626e82);--ez-upload--font-size:var(--text--medium, 14px);--ez-upload--font-family:var(--font-pattern, Arial);--ez-upload--font-weight:var(--text-weight--large, 500);--ez-upload__btn__cancel-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8x" width="8px"><path d="M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z"/></svg>\');--ez-upload__file-icon-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="11x" width="9px"><path d="M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z"/></svg>\');display:flex;flex-wrap:wrap;position:relative;font-family:var(--ez-upload--font-family);font-size:var(--ez-upload--font-size);width:var(--ez-upload--width);font-weight:var(--ez-upload--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:var(--ez-upload--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--ez-upload--padding--medium) var(--ez-upload--padding--medium) var(--ez-upload--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--ez-upload--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--ez-upload__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--ez-upload__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.text{font-family:"Sora", "Algerian";text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--ez-upload__btn__cancel-image);mask-image:var(--ez-upload__btn__cancel-image)}.iu_header{display:flex;flex-direction:column;width:100%}.iu__label{padding:var(--space--small);box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-upload--font-family);font-size:var(--text--extra-small);font-weight:var(--ez-upload--font-weight);color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon:disabled{cursor:unset}.iu__file-icon::after{content:\'\';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--ez-upload__file-icon-image);mask-image:var(--ez-upload__file-icon-image)}.iu__file-icon:disabled::after{background-color:var(--text--disable, #AFB6C0)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;padding:var(--ez-upload--padding--large) 0px;box-sizing:border-box}.background--disabled{background-color:var(--color--disable-secondary, #F2F5F8)}.text--disabled{color:var(--text--disable, #AFB6C0)}.mouse-pointer--disabled{cursor:unset}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';let u=class{constructor(e){t(this,e)}render(){return i(a,null)}};u.style=":host{display:flex;width:100%;height:42px;border-radius:12px;background:var(--background--medium);background-image:linear-gradient(to right, var(--background--medium) 0%, var(--background--strong) 20%, var(--background--medium) 40%, var(--background--medium) 100%);background-repeat:no-repeat;background-size:800px 1000px;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:placeholderShimmer;animation-timing-function:linear}@keyframes placeholderShimmer{0%{background-position:-800px 0}100%{background-position:800px 0}}";export{d as ez_collapsible_box,h as ez_date_input,c as ez_search,p as ez_text_area,x as ez_upload,u as place_holder}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as i,H as e}from"./p-8f4851a6.js";let l=class{constructor(i){t(this,i),this.ezClosePopup=o(this,"ezClosePopup",7),this.sizeClasses={"x-small":"col--sd-3",small:"col--sd-5",medium:"col--sd-6",large:"col--sd-9","x-large":"col--sd-11"},this.size="medium",this.opened=!1,this.useHeader=!1}getGridSize(){return this.sizeClasses[this.size]||this.sizeClasses.medium}render(){return this.opened?i(e,null,i("div",{class:"overlay"},i("div",{class:"popup col "+this.getGridSize()},i("div",{class:"popup__container"},i("div",{class:"popup__content"},i("div",{class:"popup__header"},this.ezTitle?i("div",{class:"popup__title"},this.ezTitle):void 0,i("button",{class:this.ezTitle?"btn-close":"btn-close btn-close--solo",onClick:()=>{this.opened=!1,this.ezClosePopup.emit()}})),i("div",{class:"popup__expandable-content"},i("slot",null))))))):null}};l.style=':host{display:flex;--ez-popup-z-index:var(--most-visible, 3);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, "\'Sora\', \'Algerian\'");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url(\'data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><path d="M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z"/></svg>\')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:grid;grid-template-rows:auto 1fr}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;height:100%;width:100%}.popup__header{padding-bottom:var(--ez-popup__header--padding-bottom);width:100%;display:flex}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{l as ez_popup}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class e{static clearTime(t,r=!0){const d=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0);return r?e.adjustDLST(d):d}static strToDate(t,r=!0,d=!1){let a;if(a=d?/^(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(t):/^(3[01]|[1-2]\d|0[1-9]|[1-9])[^\d]?(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(t),!a)return;var s=d?1:Number(a[1]),u=Number(a[d?1:2]),n=Number(a[d?2:3]),m=Number(a[d?3:4]||0),b=Number(a[d?4:5]||0),c=Number(a[d?5:6]||0);n<100&&(n+=n<30?2e3:1900);let D=new Date(n,u-1,s,m,b,c,0);return!0!==r||d||0!=m||(D=e.adjustDLST(D)),D}static adjustDLST(e){return 23==e.getHours()?new Date(e.getFullYear(),e.getMonth(),e.getDate()+1,1,0,0,0):e}}export{e as D}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t,e,n){return t(n={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}const i=/^([+-])?(\d+).?(\d*)[eE]([-+]?\d+)$/;class r{}r.stringToNumber=t=>{if(""===t||null==t)return NaN;if(t){var e="-"===(t=t.toString()).charAt(0);if(""===(t=i.test(t)?t.replace(/^-/g,""):t.replace(/[^\d.,]/g,"")))return Number(NaN);var n=t.indexOf(","),r=t.indexOf(".");r>n?t=t.replace(",",""):r<n&&(t=t.replace(/\./g,"@").replace(",",".").replace(/@/g,"")),e&&(t="-"+t)}return Number(t)},r.format=(t,e,n=NaN)=>{if(""===t||void 0===t||"NaN"===t)return NaN.toString();let i=r.stringToNumber(t);if(NaN===i)return NaN.toString();if(e<0||Math.abs(Math.round(1*e)/1)!==e)return r.changeFormat(i.toString());let s,o=0;o=NaN===n||Math.abs(Math.round(1*n)/1)!==n?e:n,s=(Math.round(i*Math.pow(10,e))/Math.pow(10,e)).toLocaleString("pt-br",{minimumFractionDigits:e});const u=e-o;if(u>0)for(let t=0;t<u;t++)"0"==s.substring(s.length-1)&&e>0&&(s=s.substring(0,s.length-1));return"."!=s.substring(s.length-1)&&","!=s.substring(s.length-1)||(s=s.substring(0,s.length-1)),s},r.keepOnlyDecimalSeparator=(t,e="pt-BR")=>(e=e.toUpperCase(),t.replace("EN-US"===e?/\,/g:/\./g,"")),r.changeFormat=t=>t.replace(/\./g,"_").replace(/\,/g,".").replace(/\_/g,",");class s{constructor(t){this._mask="",this._maskChars=new Array,this.placeholder=" ",this.mask=t}set mask(t){this._mask=t,this.updateInternalMask()}get mask(){return this._mask}format(t){let e="";const n=[0];let i=0;const r=this._maskChars.length;for(;i<r;)e=this._maskChars[i].append(e,t,n),i++;return e}updateInternalMask(){if(this._maskChars.length=0,null!=this.mask){let t=0;const e=this.mask.length;for(;t<e;){let n=this.mask.charAt(t);switch(n){case s.DIGIT_KEY:this._maskChars.push(new s.DigitMaskCharacter(this,n));break;case s.LITERAL_KEY:++t<e&&(n=this.mask.charAt(t),this._maskChars.push(new s.LiteralCharacter(this,n)));break;case s.UPPERCASE_KEY:this._maskChars.push(new s.UpperCaseCharacter(this,n));break;case s.LOWERCASE_KEY:this._maskChars.push(new s.LowerCaseCharacter(this,n));break;case s.ALPHA_NUMERIC_KEY:this._maskChars.push(new s.AlphaNumericCharacter(this,n));break;case s.CHARACTER_KEY:this._maskChars.push(new s.CharCharacter(this,n));break;case s.ANYTHING_KEY:this._maskChars.push(new s.MaskCharacter(this,n));break;default:this._maskChars.push(new s.LiteralCharacter(this,n))}t++}}}}s.DIGIT_KEY="#",s.LITERAL_KEY="'",s.UPPERCASE_KEY="U",s.LOWERCASE_KEY="L",s.ALPHA_NUMERIC_KEY="A",s.CHARACTER_KEY="?",s.ANYTHING_KEY="*",s.MaskCharacter=class{constructor(t,e){this.maskFormatter=t,this.type=e}isLiteral(){return!1}isValidCharacter(t){return this.isLiteral()?this.getChar(t)==t:(t=this.getChar(t),!0)}getChar(t){return t}append(t,e,n){const i=n[0]<e.length?e.charAt(n[0]):"";if(this.isLiteral()){const e=this.getChar(i);t+=e,e===i&&(n[0]=n[0]+1)}else if(n[0]>=e.length)t+=this.maskFormatter.placeholder,n[0]=n[0]+1;else{if(!this.isValidCharacter(i))throw new Error(`Valor inválido: "${i}". Na posição ${n[0]+1} espera-se ${this.getFormatMessage()}.`);t+=this.getChar(i),n[0]=n[0]+1}return t}getFormatMessage(){let t;switch(this.type){case s.UPPERCASE_KEY:case s.LOWERCASE_KEY:case s.CHARACTER_KEY:t="uma letra";break;case s.DIGIT_KEY:t="um número";break;case s.ALPHA_NUMERIC_KEY:t="uma letra ou um número";break;default:t=""}return t}},s.LiteralCharacter=class extends s.MaskCharacter{constructor(t,e){super(t,e),this._fixedChar=e}isLiteral(){return!0}getChar(t){return this._fixedChar}},s.DigitMaskCharacter=class extends s.MaskCharacter{isValidCharacter(t){return this.isDigit(t)&&super.isValidCharacter(t)}isDigit(t){return t>="0"&&t<="9"}},s.UpperCaseCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}getChar(t){return t.toUpperCase()}},s.LowerCaseCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}getChar(t){return t.toLocaleLowerCase()}},s.AlphaNumericCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z0-9]/i.test(t)&&super.isValidCharacter(t)}},s.CharCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}};class o{static prepareValue(t,e){if(t&&t.length>0&&"NaN"!=t){let n=t.replace(/:/g,"");if(e){if(this._maskFormatter.mask="##:##:##",n.length<6)for(;n.length<6;)n="0".concat(n)}else if(this._maskFormatter.mask="##:##",n.length<4)for(;n.length<4;)n="0".concat(n);if(this._maskFormatter)try{return this._maskFormatter.format(n)}catch(t){throw new Error(t.message)}}return""}static validateTime(t,e){let n=!0;if(t){let i=t.replace(/:/g,"");e?(["1","2","0"].includes(i[0])||(n=!1),["0","1","2","3","4","5"].includes(i[2])||(n=!1),["0","1","2","3","4","5"].includes(i[4])||(n=!1),"2"!=i[0]||["0","1","2","3"].includes(i[1])||(n=!1)):(["1","2","0"].includes(i[0])||(n=!1),["0","1","2","3","4","5"].includes(i[2])||(n=!1),"2"!=i[0]||["0","1","2","3"].includes(i[1])||(n=!1))}else n=!1;return n}}var u,a,c;o._maskFormatter=new s("##:##"),function(t){t[t.GET=0]="GET",t[t.PUT=1]="PUT",t[t.POST=2]="POST",t[t.DELETE=3]="DELETE"}(u||(u={})),function(t){t.NUMBER="NUMBER",t.DATE="DATE",t.TEXT="TEXT",t.BOOLEAN="BOOLEAN",t.OBJECT="OBJECT"}(a||(a={}));class h{constructor(t,e){this._type=t,this._payload=e}get type(){return this._type}get payload(){return this._payload}}!function(t){t.LOADING_METADATA="loadingMetadata",t.METADATA_LOADED="metadataLoaded",t.LOADING_DATA="loadingData",t.DATA_LOADED="dataLoaded",t.SAVING_DATA="savingData",t.DATA_SAVED="dataSaved",t.RECORDS_REMOVED="recordsRemoved",t.RECORDS_ADDED="recordsAdded",t.DATA_CHANGED="dataChanged",t.EDITION_CANCELED="editionCanceled",t.CHANGE_UNDONE="changeUndone",t.CHANGE_REDONE="changeRedone",t.SELECTION_CHANGED="selectionChanged",t.NEXT_SELECTED="nextSelected",t.PREVIOUS_SELECTED="previousSelected",t.STATE_CHANGED="stateChanged"}(c||(c={}));class l{constructor(t){this._past=[],this._future=[],this._present={},this._nonHist={},this._histClean=!1,this._reducers=t}process(t){const e=this._present;let n=!1,i=!1;this._histClean=!1,this._reducers.forEach((e=>{const r=e.sliceName,s=this.isHistoric(r),o=this.getSlice(r,s),u=e.reduce(this,o,t);u!==o&&(this.updateSlice(r,u,s),n=!0,i||(i=s))})),i&&!this._histClean&&(this._past.push(e),this._future=[],document.dispatchEvent(new CustomEvent("undoableAction",{detail:this}))),n&&console.log(JSON.stringify(this,((t,e)=>e instanceof Map?{dataType:"Map",value:Array.from(e.entries())}:e),3))}select(t,e){const n=this.isHistoric(t);return e(this.getSlice(t,n))}isHistoric(t){return t.startsWith("hist::")}updateSlice(t,e,n){n?(this._present=Object.assign(Object.assign({},this._present),{[t]:e}),void 0===e&&delete this._present[t]):(this._nonHist=Object.assign(Object.assign({},this._nonHist),{[t]:e}),void 0===e&&delete this._nonHist[t])}getSlice(t,e){return e?this._present[t]:this._nonHist[t]}canUndo(){return this._past.length>0}canRedo(){return this._future.length>0}undo(){this.canUndo()&&(this._future.push(this._present),this._present=this._past.pop())}redo(){this.canRedo()&&(this._past.push(this._present),this._present=this._future.pop())}clearUndo(){this._histClean=!0,this._past=[],this._future=[]}persist(){}}const f=new class{constructor(){this.sliceName=""}reduce(t,e,n){switch(n.type){case c.DATA_SAVED:case c.EDITION_CANCELED:t.clearUndo();break;case c.CHANGE_UNDONE:t.undo();break;case c.CHANGE_REDONE:t.redo()}}},d=new class{constructor(){this.sliceName="unitMetadata"}reduce(t,e,n){return n.type===c.METADATA_LOADED?n.payload:e}},v=t=>t.select(d.sliceName,(t=>t)),p=new class{constructor(){this.sliceName="hist::removedRecords"}reduce(t,e,n){switch(n.type){case c.RECORDS_REMOVED:return(e||[]).concat(n.payload);case c.EDITION_CANCELED:case c.DATA_SAVED:return}return e}},m=t=>t.select(p.sliceName,(t=>t)),y=new class{constructor(){this.sliceName="records"}reduce(t,e,n){switch(n.type){case c.DATA_LOADED:return n.payload;case c.DATA_SAVED:const e=new Map,i=b(t);if(i){const n=m(t)||[];i.forEach((t=>{n.includes(t.__record__id__)||e.set(t.__record__id__,t)}))}return n.payload.records.forEach((t=>{const n=t.__old__id__||t.__record__id__,i=Object.assign({},t);delete i.__old__id__,e.set(n,i)})),Array.from(e.values())}return e}},b=t=>t.select(y.sliceName,(t=>t)),w=new class{constructor(){this.sliceName="hist::addedRecords"}reduce(t,e,n){switch(n.type){case c.RECORDS_ADDED:const t=e?e.slice():[];return n.payload.forEach((e=>{t.push(Object.assign({__record__id__:"NEW_"+(t.length+1)},e))})),t;case c.DATA_SAVED:case c.EDITION_CANCELED:return}return e}},E=t=>t.select(w.sliceName,(t=>t)),O=new class{constructor(){this.sliceName="hist::changes"}reduce(t,e,n){switch(n.type){case c.DATA_CHANGED:const i=n.payload.records||j(t);if(i){const t=new Map(e);return i.forEach((e=>{t.set(e,Object.assign(Object.assign({},t.get(e)),n.payload))})),t}return e;case c.DATA_SAVED:case c.EDITION_CANCELED:return}return e}},g=t=>t.select(O.sliceName,(t=>t)),T=new class{constructor(){this.sliceName="currentRecords"}reduce(t,e,n){let i=b(t);const r=E(t);if(!i&&!r)return;r&&(i=(i||[]).concat(r));const s=m(t);s&&(i=i.filter((t=>!s.includes(t.__record__id__))));const o=g(t);return new Map(i.map((t=>{const e=t.__record__id__;return[e,Object.assign(Object.assign({},t),null==o?void 0:o.get(e))]})))}},D=t=>t.select(T.sliceName,(t=>t)),S=new class{constructor(){this.sliceName="hist::selection"}reduce(t,e,n){switch(n.type){case c.DATA_SAVED:return function(t,e){const n=j(t);if(n){const t=[];return n.forEach((n=>{const i=e.find((t=>t.__old__id__===n));t.push(i?i.__record__id__:n)})),t}return n}(t,n.payload.records);case c.RECORDS_REMOVED:const i=n.payload;return e&&i?e.filter((t=>!i.includes(t))):e;case c.NEXT_SELECTED:case c.PREVIOUS_SELECTED:const r=D(t);if(r&&r.size>0){let t;if(t=e&&0!==e.length?N(e[0],r)+(n.type===c.PREVIOUS_SELECTED?-1:1):n.type===c.PREVIOUS_SELECTED?0:Math.min(1,r.size),t<r.size&&t>=0)return[Array.from(r.values())[t].__record__id__]}return;case c.SELECTION_CHANGED:const{type:s,selection:o}=n.payload;if(o&&"index"===s){const e=D(t);if(e){const t=Array.from(e.values()),n=[];return o.forEach((i=>{i>0&&i<e.size&&n.push(t[i].__record__id__)})),n}}return o}return e}},j=t=>{let e=t.select(S.sliceName,(t=>t));const n=Array.from((D(t)||new Map).keys());return e&&(e=e.filter((t=>n.includes(t)))),(!e||0===e.length)&&n&&n.length>0?[n[0]]:e};function N(t,e){return Array.from(e.keys()).indexOf(t)}class A{constructor(t){this._name=t,this._stateManager=new l([f,d,y,p,w,S,O,T]),this._observers=[],this._filterProviders=[],this._sortingProvider=void 0}get name(){return this._name}validateAndTypeValue(t,e){const n=this.getField(t);return n?((t,e)=>{if(null==e)return e;switch(t){case a.NUMBER:return""===e||isNaN(e)?null:Number(e);case a.OBJECT:return"string"==typeof e?JSON.parse(e):e;case a.BOOLEAN:return Boolean(e);case a.DATE:return new Date(e.toString());default:return e}})(n.dataType,e):e}getFilters(){let t;return this._filterProviders.forEach((e=>{const n=e.getFilter(this.name);n&&(t=(t||[]).concat(n))})),t}getSort(){return this._sortingProvider?this._sortingProvider.getSort(this._name):void 0}loadMetadata(){this.dispatchAction(c.LOADING_METADATA),this.metadataLoader&&this.metadataLoader(this._name).then((t=>this.metadata=t))}loadData(){return this.dispatchAction(c.LOADING_DATA),new Promise(((t,e)=>{if(this.dataLoader){const n=this.getSort(),i=this.getFilters();this.dataLoader(this._name,n,i).then((e=>{this.records=e,t(this.records)})).catch((()=>e()))}}))}saveData(){const t=((t,e)=>{const n=[],i=g(e),r=b(e);r&&r.forEach((e=>{if(i){const r=i.get(e.__record__id__);r&&n.push(new U(t,e,r,x.UPDATE))}}));const s=E(e);s&&s.forEach((e=>{n.push(new U(t,e,null==i?void 0:i.get(e.__record__id__),x.INSERT))}));const o=m(e),u={};return r.forEach((t=>u[t.__record__id__]=t)),o&&o.forEach((e=>{n.push(new U(t,u[e],void 0,x.DELETE))})),n})(this._name,this._stateManager);t.length>0&&(this.dispatchAction(c.SAVING_DATA),this.saveLoader&&this.saveLoader(this._name,t).then((e=>this.dispatchAction(c.DATA_SAVED,{changes:t,records:e}))))}addFilterProvider(t){this._filterProviders.push(t)}set sortingProvider(t){this._sortingProvider=t}set metadata(t){this.dispatchAction(c.METADATA_LOADED,t)}get metadata(){return v(this._stateManager)}set records(t){this.dispatchAction(c.DATA_LOADED,t)}get records(){const t=D(this._stateManager);return t?Array.from(t.values()):[]}getField(t){return((t,e)=>{const n=v(this._stateManager);return n?n.fields.find((t=>t.name===e)):void 0})(0,t)}addRecord(){this.dispatchAction(c.RECORDS_ADDED,[{}])}removeSelectedRecords(){const t=j(this._stateManager);t&&this.dispatchAction(c.RECORDS_REMOVED,t)}getFieldValue(t){return((t,e)=>{const n=j(t);if(n&&n.length>0){const i=D(t);if(i){const t=i.get(n[0]);return t?t[e]:void 0}}})(this._stateManager,t)}setFieldValue(t,e,n){const i=this.validateAndTypeValue(t,e);this.getFieldValue(t)!==i&&this.dispatchAction(c.DATA_CHANGED,{[t]:i,records:n})}getSelection(){return j(this._stateManager)}setSelection(t){this.dispatchAction(c.SELECTION_CHANGED,{type:"id",selection:t})}setSelectionByIndex(t){this.dispatchAction(c.SELECTION_CHANGED,{type:"index",selection:t})}nextRecord(){this.dispatchAction(c.NEXT_SELECTED)}previousRecord(){this.dispatchAction(c.PREVIOUS_SELECTED)}cancelEdition(){this.dispatchAction(c.EDITION_CANCELED)}isDirty(){return void 0!==E(t=this._stateManager)||void 0!==m(t)||void 0!==g(t);var t}hasNext(){return(t=>{const e=D(t);if(e){const n=t.select(S.sliceName,(t=>t));return n&&0!==n.length?e.size>N(n[0],e)+1:e.size>0}return!1})(this._stateManager)}hasPrevious(){return(t=>{const e=D(t);if(e){const n=t.select(S.sliceName,(t=>t));return!(!n||0===n.length)&&N(n[0],e)>0}return!1})(this._stateManager)}canUndo(){return this._stateManager.canUndo()}canRedo(){return this._stateManager.canRedo()}undo(){this.dispatchAction(c.CHANGE_UNDONE)}redo(){this.dispatchAction(c.CHANGE_REDONE)}dispatchAction(t,e){const n=new h(t,e);this._stateManager.process(n),this._observers.forEach((t=>t(n)))}subscribe(t){this._observers.push(t)}unsubscribe(t){this._observers=this._observers.filter((e=>e!==t))}}var x,I,k,_,M,F;!function(t){t[t.INSERT=0]="INSERT",t[t.UPDATE=1]="UPDATE",t[t.DELETE=2]="DELETE"}(x||(x={}));class U{constructor(t,e,n,i){this.dataUnit=t,this.record=e,this.updatingFields=n,this._operation=i}isInsert(){return this._operation===x.INSERT}isDelete(){return this._operation===x.DELETE}isUpdate(){return this._operation===x.UPDATE}}!function(t){t.ASC="ASC",t.DESC="DESC"}(I||(I={})),function(t){t.SEARCHING="SEARCHING",t.REQUIREMENT="REQUIREMENT",t.VISIBILITY="REQUIREMENT"}(k||(k={})),function(t){t.FILE="FILE",t.IMAGE="IMAGE",t.DATE="DATE",t.DATETIME="DATETIME",t.ELAPSEDTIME="ELAPSEDTIME",t.CHECKBOX="CHECKBOX",t.SWITCH="SWITCH",t.OPTIONSELECTOR="OPTIONSELECTOR",t.DECIMALNUMBER="DECIMALNUMBER",t.INTEGERNUMBER="INTEGERNUMBER",t.SEARCH="SEARCH",t.SHORTTEXT="SHORTTEXT",t.PASSWORD="PASSWORD",t.MASKEDTEXT="MASKEDTEXT",t.LONGTEXT="LONGTEXT",t.HTML="HTML"}(_||(_={})),function(t){t.DOM_LOADED="DOM_LOADED",t.PRE_INITIALIZE="PRE_INITIALIZE",t.LOADED="LOADED"}(M||(M={})),function(t){t.APP_LOAD="APP_LOAD"}(F||(F={}));var V=n((function(e,n){var i="undefined"!=typeof self?self:t,r=function(){function t(){this.fetch=!1,this.DOMException=i.DOMException}return t.prototype=i,new t}();!function(t){!function(e){var n="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,r="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),s="FormData"in t,o="ArrayBuffer"in t;if(o)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function h(t){return"string"!=typeof t&&(t=String(t)),t}function l(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i&&(e[Symbol.iterator]=function(){return e}),e}function f(t){this.map={},t instanceof f?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function d(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function v(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function p(t){var e=new FileReader,n=v(e);return e.readAsArrayBuffer(t),n}function m(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:r&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:s&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():o&&r&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=m(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(t)||a(t))?this._bodyArrayBuffer=m(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var t,e,n,i=d(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,n=v(e=new FileReader),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),i=0;i<e.length;i++)n[i]=String.fromCharCode(e[i]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(t,e){t=c(t),e=h(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},f.prototype.delete=function(t){delete this.map[c(t)]},f.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},f.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},f.prototype.set=function(t,e){this.map[c(t)]=h(e)},f.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},f.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),l(t)},f.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),l(t)},f.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),l(t)},i&&(f.prototype[Symbol.iterator]=f.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(t,e){var n,i,r=(e=e||{}).body;if(t instanceof w){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new f(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new f(e.headers)),this.method=(i=(n=e.method||this.method||"GET").toUpperCase(),b.indexOf(i)>-1?i:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function E(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(r))}})),e}function O(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new f(e.headers),this.url=e.url||"",this._initBody(t)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},y.call(w.prototype),y.call(O.prototype),O.prototype.clone=function(){return new O(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},O.error=function(){var t=new O(null,{status:0,statusText:""});return t.type="error",t};var g=[301,302,303,307,308];O.redirect=function(t,e){if(-1===g.indexOf(e))throw new RangeError("Invalid status code");return new O(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function T(t,n){return new Promise((function(i,s){var o=new w(t,n);if(o.signal&&o.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function a(){u.abort()}u.onload=function(){var t,e,n={status:u.status,statusText:u.statusText,headers:(t=u.getAllResponseHeaders()||"",e=new f,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();e.append(i,r)}})),e)};n.url="responseURL"in u?u.responseURL:n.headers.get("X-Request-URL"),i(new O("response"in u?u.response:u.responseText,n))},u.onerror=function(){s(new TypeError("Network request failed"))},u.ontimeout=function(){s(new TypeError("Network request failed"))},u.onabort=function(){s(new e.DOMException("Aborted","AbortError"))},u.open(o.method,o.url,!0),"include"===o.credentials?u.withCredentials=!0:"omit"===o.credentials&&(u.withCredentials=!1),"responseType"in u&&r&&(u.responseType="blob"),o.headers.forEach((function(t,e){u.setRequestHeader(e,t)})),o.signal&&(o.signal.addEventListener("abort",a),u.onreadystatechange=function(){4===u.readyState&&o.signal.removeEventListener("abort",a)}),u.send(void 0===o._bodyInit?null:o._bodyInit)}))}T.polyfill=!0,t.fetch||(t.fetch=T,t.Headers=f,t.Request=w,t.Response=O),e.Headers=f,e.Request=w,e.Response=O,e.fetch=T,Object.defineProperty(e,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var s=r;(n=s.fetch).default=s.fetch,n.fetch=s.fetch,n.Headers=s.Headers,n.Request=s.Request,n.Response=s.Response,e.exports=n})),C=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.isObjectLike=function(t){return"object"==typeof t&&null!==t}})),R=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.invariant=function(t,e){if(!Boolean(t))throw new Error(null!=e?e:"Unexpected invariant triggered.")}})),L=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.getLocation=function(t,e){let i=0,r=1;for(const s of t.body.matchAll(n)){if("number"==typeof s.index||(0,R.invariant)(!1),s.index>=e)break;i=s.index+s[0].length,r+=1}return{line:r,column:e+1-i}};const n=/\r\n|[\n\r]/g})),$=n((function(t,e){function n(t,e){const n=t.locationOffset.column-1,r="".padStart(n)+t.body,s=e.line-1,o=e.line+(t.locationOffset.line-1),u=e.column+(1===e.line?n:0),a=`${t.name}:${o}:${u}\n`,c=r.split(/\r\n|[\n\r]/g),h=c[s];if(h.length>120){const t=Math.floor(u/80),e=u%80,n=[];for(let t=0;t<h.length;t+=80)n.push(h.slice(t,t+80));return a+i([[`${o} |`,n[0]],...n.slice(1,t+1).map((t=>["|",t])),["|","^".padStart(e)],["|",n[t+1]]])}return a+i([[o-1+" |",c[s-1]],[`${o} |`,h],["|","^".padStart(u)],[`${o+1} |`,c[s+1]]])}function i(t){const e=t.filter((([t,e])=>void 0!==e)),n=Math.max(...e.map((([t])=>t.length)));return e.map((([t,e])=>t.padStart(n)+(e?" "+e:""))).join("\n")}Object.defineProperty(e,"__esModule",{value:!0}),e.printLocation=function(t){return n(t.source,(0,L.getLocation)(t.source,t.start))},e.printSourceLocation=n})),q=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.GraphQLError=void 0,e.formatError=function(t){return t.toJSON()},e.printError=function(t){return t.toString()};class n extends Error{constructor(t,...e){var r,s,o;const{nodes:u,source:a,positions:c,path:h,originalError:l,extensions:f}=function(t){const e=t[0];return null==e||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}(e);super(t),this.name="GraphQLError",this.path=null!=h?h:void 0,this.originalError=null!=l?l:void 0,this.nodes=i(Array.isArray(u)?u:u?[u]:void 0);const d=i(null===(r=this.nodes)||void 0===r?void 0:r.map((t=>t.loc)).filter((t=>null!=t)));this.source=null!=a?a:null==d||null===(s=d[0])||void 0===s?void 0:s.source,this.positions=null!=c?c:null==d?void 0:d.map((t=>t.start)),this.locations=c&&a?c.map((t=>(0,L.getLocation)(a,t))):null==d?void 0:d.map((t=>(0,L.getLocation)(t.source,t.start)));const v=(0,C.isObjectLike)(null==l?void 0:l.extensions)?null==l?void 0:l.extensions:void 0;this.extensions=null!==(o=null!=f?f:v)&&void 0!==o?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=l&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const e of this.nodes)e.loc&&(t+="\n\n"+(0,$.printLocation)(e.loc));else if(this.source&&this.locations)for(const e of this.locations)t+="\n\n"+(0,$.printSourceLocation)(this.source,e);return t}toJSON(){const t={message:this.message};return null!=this.locations&&(t.locations=this.locations),null!=this.path&&(t.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function i(t){return void 0===t||0===t.length?void 0:t}e.GraphQLError=n})),P=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.syntaxError=function(t,e,n){return new q.GraphQLError(`Syntax Error: ${n}`,void 0,t,[e])}})),B=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Token=e.QueryDocumentKeys=e.OperationTypeNode=e.Location=void 0,e.isNode=function(t){const e=null==t?void 0:t.kind;return"string"==typeof e&&s.has(e)};class n{constructor(t,e,n){this.start=t.start,this.end=e.end,this.startToken=t,this.endToken=e,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}e.Location=n;class i{constructor(t,e,n,i,r,s){this.kind=t,this.start=e,this.end=n,this.line=i,this.column=r,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}e.Token=i;const r={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};e.QueryDocumentKeys=r;const s=new Set(Object.keys(r));let o;e.OperationTypeNode=o,function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"}(o||(e.OperationTypeNode=o={}))})),H=n((function(t,e){let n;Object.defineProperty(e,"__esModule",{value:!0}),e.DirectiveLocation=void 0,e.DirectiveLocation=n,function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(n||(e.DirectiveLocation=n={}))})),G=n((function(t,e){let n;Object.defineProperty(e,"__esModule",{value:!0}),e.Kind=void 0,e.Kind=n,function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(n||(e.Kind=n={}))})),z=n((function(t,e){function n(t){return t>=48&&t<=57}function i(t){return t>=97&&t<=122||t>=65&&t<=90}Object.defineProperty(e,"__esModule",{value:!0}),e.isDigit=n,e.isLetter=i,e.isNameContinue=function(t){return i(t)||n(t)||95===t},e.isNameStart=function(t){return i(t)||95===t},e.isWhiteSpace=function(t){return 9===t||32===t}})),J=n((function(t,e){function n(t){let e=0;for(;e<t.length&&(0,z.isWhiteSpace)(t.charCodeAt(e));)++e;return e}Object.defineProperty(e,"__esModule",{value:!0}),e.dedentBlockStringLines=function(t){var e;let i=Number.MAX_SAFE_INTEGER,r=null,s=-1;for(let e=0;e<t.length;++e){var o;const u=t[e],a=n(u);a!==u.length&&(r=null!==(o=r)&&void 0!==o?o:e,s=e,0!==e&&a<i&&(i=a))}return t.map(((t,e)=>0===e?t:t.slice(i))).slice(null!==(e=r)&&void 0!==e?e:0,s+1)},e.isPrintableAsBlockString=function(t){if(""===t)return!0;let e=!0,n=!1,i=!0,r=!1;for(let s=0;s<t.length;++s)switch(t.codePointAt(s)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:case 13:return!1;case 10:if(e&&!r)return!1;r=!0,e=!0,n=!1;break;case 9:case 32:n||(n=e);break;default:i&&(i=n),e=!1}return!e&&(!i||!r)},e.printBlockString=function(t,e){const n=t.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=1===i.length,s=i.length>1&&i.slice(1).every((t=>0===t.length||(0,z.isWhiteSpace)(t.charCodeAt(0)))),o=n.endsWith('\\"""'),u=t.endsWith('"')&&!o,a=t.endsWith("\\"),c=u||a,h=!(null!=e&&e.minimize)&&(!r||t.length>70||c||s||o);let l="";const f=r&&(0,z.isWhiteSpace)(t.charCodeAt(0));return(h&&!f||s)&&(l+="\n"),l+=n,(h||c)&&(l+="\n"),'"""'+l+'"""'}})),Q=n((function(t,e){let n;Object.defineProperty(e,"__esModule",{value:!0}),e.TokenKind=void 0,e.TokenKind=n,function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"}(n||(e.TokenKind=n={}))})),X=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Lexer=void 0,e.isPunctuatorTokenKind=function(t){return t===Q.TokenKind.BANG||t===Q.TokenKind.DOLLAR||t===Q.TokenKind.AMP||t===Q.TokenKind.PAREN_L||t===Q.TokenKind.PAREN_R||t===Q.TokenKind.SPREAD||t===Q.TokenKind.COLON||t===Q.TokenKind.EQUALS||t===Q.TokenKind.AT||t===Q.TokenKind.BRACKET_L||t===Q.TokenKind.BRACKET_R||t===Q.TokenKind.BRACE_L||t===Q.TokenKind.PIPE||t===Q.TokenKind.BRACE_R};class n{constructor(t){const e=new B.Token(Q.TokenKind.SOF,0,0,0,0);this.source=t,this.lastToken=e,this.token=e,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==Q.TokenKind.EOF)do{if(t.next)t=t.next;else{const e=c(this,t.end);t.next=e,e.prev=t,t=e}}while(t.kind===Q.TokenKind.COMMENT);return t}}function i(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function r(t,e){return s(t.charCodeAt(e))&&o(t.charCodeAt(e+1))}function s(t){return t>=55296&&t<=56319}function o(t){return t>=56320&&t<=57343}function u(t,e){const n=t.source.body.codePointAt(e);if(void 0===n)return Q.TokenKind.EOF;if(n>=32&&n<=126){const t=String.fromCodePoint(n);return'"'===t?"'\"'":`"${t}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function a(t,e,n,i,r){return new B.Token(e,n,i,t.line,1+n-t.lineStart,r)}function c(t,e){const n=t.source.body,s=n.length;let o=e;for(;o<s;){const e=n.charCodeAt(o);switch(e){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++t.line,t.lineStart=o;continue;case 13:10===n.charCodeAt(o+1)?o+=2:++o,++t.line,t.lineStart=o;continue;case 35:return h(t,o);case 33:return a(t,Q.TokenKind.BANG,o,o+1);case 36:return a(t,Q.TokenKind.DOLLAR,o,o+1);case 38:return a(t,Q.TokenKind.AMP,o,o+1);case 40:return a(t,Q.TokenKind.PAREN_L,o,o+1);case 41:return a(t,Q.TokenKind.PAREN_R,o,o+1);case 46:if(46===n.charCodeAt(o+1)&&46===n.charCodeAt(o+2))return a(t,Q.TokenKind.SPREAD,o,o+3);break;case 58:return a(t,Q.TokenKind.COLON,o,o+1);case 61:return a(t,Q.TokenKind.EQUALS,o,o+1);case 64:return a(t,Q.TokenKind.AT,o,o+1);case 91:return a(t,Q.TokenKind.BRACKET_L,o,o+1);case 93:return a(t,Q.TokenKind.BRACKET_R,o,o+1);case 123:return a(t,Q.TokenKind.BRACE_L,o,o+1);case 124:return a(t,Q.TokenKind.PIPE,o,o+1);case 125:return a(t,Q.TokenKind.BRACE_R,o,o+1);case 34:return 34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)?w(t,o):d(t,o)}if((0,z.isDigit)(e)||45===e)return l(t,o,e);if((0,z.isNameStart)(e))return E(t,o);throw(0,P.syntaxError)(t.source,o,39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":i(e)||r(n,o)?`Unexpected character: ${u(t,o)}.`:`Invalid character: ${u(t,o)}.`)}return a(t,Q.TokenKind.EOF,s,s)}function h(t,e){const n=t.source.body,s=n.length;let o=e+1;for(;o<s;){const t=n.charCodeAt(o);if(10===t||13===t)break;if(i(t))++o;else{if(!r(n,o))break;o+=2}}return a(t,Q.TokenKind.COMMENT,e,o,n.slice(e+1,o))}function l(t,e,n){const i=t.source.body;let r=e,s=n,o=!1;if(45===s&&(s=i.charCodeAt(++r)),48===s){if(s=i.charCodeAt(++r),(0,z.isDigit)(s))throw(0,P.syntaxError)(t.source,r,`Invalid number, unexpected digit after 0: ${u(t,r)}.`)}else r=f(t,r,s),s=i.charCodeAt(r);if(46===s&&(o=!0,s=i.charCodeAt(++r),r=f(t,r,s),s=i.charCodeAt(r)),69!==s&&101!==s||(o=!0,s=i.charCodeAt(++r),43!==s&&45!==s||(s=i.charCodeAt(++r)),r=f(t,r,s),s=i.charCodeAt(r)),46===s||(0,z.isNameStart)(s))throw(0,P.syntaxError)(t.source,r,`Invalid number, expected digit but got: ${u(t,r)}.`);return a(t,o?Q.TokenKind.FLOAT:Q.TokenKind.INT,e,r,i.slice(e,r))}function f(t,e,n){if(!(0,z.isDigit)(n))throw(0,P.syntaxError)(t.source,e,`Invalid number, expected digit but got: ${u(t,e)}.`);const i=t.source.body;let r=e+1;for(;(0,z.isDigit)(i.charCodeAt(r));)++r;return r}function d(t,e){const n=t.source.body,s=n.length;let o=e+1,c=o,h="";for(;o<s;){const s=n.charCodeAt(o);if(34===s)return h+=n.slice(c,o),a(t,Q.TokenKind.STRING,e,o+1,h);if(92!==s){if(10===s||13===s)break;if(i(s))++o;else{if(!r(n,o))throw(0,P.syntaxError)(t.source,o,`Invalid character within String: ${u(t,o)}.`);o+=2}}else{h+=n.slice(c,o);const e=117===n.charCodeAt(o+1)?123===n.charCodeAt(o+2)?v(t,o):p(t,o):b(t,o);h+=e.value,o+=e.size,c=o}}throw(0,P.syntaxError)(t.source,o,"Unterminated string.")}function v(t,e){const n=t.source.body;let r=0,s=3;for(;s<12;){const t=n.charCodeAt(e+s++);if(125===t){if(s<5||!i(r))break;return{value:String.fromCodePoint(r),size:s}}if(r=r<<4|y(t),r<0)break}throw(0,P.syntaxError)(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+s)}".`)}function p(t,e){const n=t.source.body,r=m(n,e+2);if(i(r))return{value:String.fromCodePoint(r),size:6};if(s(r)&&92===n.charCodeAt(e+6)&&117===n.charCodeAt(e+7)){const t=m(n,e+8);if(o(t))return{value:String.fromCodePoint(r,t),size:12}}throw(0,P.syntaxError)(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function m(t,e){return y(t.charCodeAt(e))<<12|y(t.charCodeAt(e+1))<<8|y(t.charCodeAt(e+2))<<4|y(t.charCodeAt(e+3))}function y(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function b(t,e){const n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw(0,P.syntaxError)(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function w(t,e){const n=t.source.body,s=n.length;let o=t.lineStart,c=e+3,h=c,l="";const f=[];for(;c<s;){const s=n.charCodeAt(c);if(34===s&&34===n.charCodeAt(c+1)&&34===n.charCodeAt(c+2)){l+=n.slice(h,c),f.push(l);const i=a(t,Q.TokenKind.BLOCK_STRING,e,c+3,(0,J.dedentBlockStringLines)(f).join("\n"));return t.line+=f.length-1,t.lineStart=o,i}if(92!==s||34!==n.charCodeAt(c+1)||34!==n.charCodeAt(c+2)||34!==n.charCodeAt(c+3))if(10!==s&&13!==s)if(i(s))++c;else{if(!r(n,c))throw(0,P.syntaxError)(t.source,c,`Invalid character within String: ${u(t,c)}.`);c+=2}else l+=n.slice(h,c),f.push(l),13===s&&10===n.charCodeAt(c+1)?c+=2:++c,l="",h=c,o=c;else l+=n.slice(h,c),h=c+1,c+=4}throw(0,P.syntaxError)(t.source,c,"Unterminated string.")}function E(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const t=n.charCodeAt(r);if(!(0,z.isNameContinue)(t))break;++r}return a(t,Q.TokenKind.NAME,e,r,n.slice(e,r))}e.Lexer=n})),K=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.devAssert=function(t,e){if(!Boolean(t))throw new Error(e)}})),W=n((function(t,e){function n(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return function(t,e){if(null===t)return"null";if(e.includes(t))return"[Circular]";const i=[...e,t];if(function(t){return"function"==typeof t.toJSON}(t)){const e=t.toJSON();if(e!==t)return"string"==typeof e?e:n(e,i)}else if(Array.isArray(t))return function(t,e){if(0===t.length)return"[]";if(e.length>2)return"[Array]";const i=Math.min(10,t.length),r=t.length-i,s=[];for(let r=0;r<i;++r)s.push(n(t[r],e));return 1===r?s.push("... 1 more item"):r>1&&s.push(`... ${r} more items`),"["+s.join(", ")+"]"}(t,i);return function(t,e){const i=Object.entries(t);return 0===i.length?"{}":e.length>2?"["+function(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if("Object"===e&&"function"==typeof t.constructor){const e=t.constructor.name;if("string"==typeof e&&""!==e)return e}return e}(t)+"]":"{ "+i.map((([t,i])=>t+": "+n(i,e))).join(", ")+" }"}(t,i)}(t,e);default:return String(t)}}Object.defineProperty(e,"__esModule",{value:!0}),e.inspect=function(t){return n(t,[])}})),Y=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.instanceOf=void 0,e.instanceOf=function(t,e){return t instanceof e}})),Z=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0,e.isSource=function(t){return(0,Y.instanceOf)(t,n)};class n{constructor(t,e="GraphQL request",n={line:1,column:1}){"string"==typeof t||(0,K.devAssert)(!1,`Body must be a string. Received: ${(0,W.inspect)(t)}.`),this.body=t,this.name=e,this.locationOffset=n,this.locationOffset.line>0||(0,K.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,K.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}e.Source=n})),tt=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=void 0,e.parse=function(t,e){return new n(t,e).parseDocument()},e.parseConstValue=function(t,e){const i=new n(t,e);i.expectToken(Q.TokenKind.SOF);const r=i.parseConstValueLiteral();return i.expectToken(Q.TokenKind.EOF),r},e.parseType=function(t,e){const i=new n(t,e);i.expectToken(Q.TokenKind.SOF);const r=i.parseTypeReference();return i.expectToken(Q.TokenKind.EOF),r},e.parseValue=function(t,e){const i=new n(t,e);i.expectToken(Q.TokenKind.SOF);const r=i.parseValueLiteral(!1);return i.expectToken(Q.TokenKind.EOF),r};class n{constructor(t,e){const n=(0,Z.isSource)(t)?t:new Z.Source(t);this._lexer=new X.Lexer(n),this._options=e}parseName(){const t=this.expectToken(Q.TokenKind.NAME);return this.node(t,{kind:G.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:G.Kind.DOCUMENT,definitions:this.many(Q.TokenKind.SOF,this.parseDefinition,Q.TokenKind.EOF)})}parseDefinition(){if(this.peek(Q.TokenKind.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),e=t?this._lexer.lookahead():this._lexer.token;if(e.kind===Q.TokenKind.NAME){switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw(0,P.syntaxError)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(e.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(e)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(Q.TokenKind.BRACE_L))return this.node(t,{kind:G.Kind.OPERATION_DEFINITION,operation:B.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const e=this.parseOperationType();let n;return this.peek(Q.TokenKind.NAME)&&(n=this.parseName()),this.node(t,{kind:G.Kind.OPERATION_DEFINITION,operation:e,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(Q.TokenKind.NAME);switch(t.value){case"query":return B.OperationTypeNode.QUERY;case"mutation":return B.OperationTypeNode.MUTATION;case"subscription":return B.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Q.TokenKind.PAREN_L,this.parseVariableDefinition,Q.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:G.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Q.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Q.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(Q.TokenKind.DOLLAR),this.node(t,{kind:G.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:G.Kind.SELECTION_SET,selections:this.many(Q.TokenKind.BRACE_L,this.parseSelection,Q.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Q.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,e=this.parseName();let n,i;return this.expectOptionalToken(Q.TokenKind.COLON)?(n=e,i=this.parseName()):i=e,this.node(t,{kind:G.Kind.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Q.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){return this.optionalMany(Q.TokenKind.PAREN_L,t?this.parseConstArgument:this.parseArgument,Q.TokenKind.PAREN_R)}parseArgument(t=!1){const e=this._lexer.token,n=this.parseName();return this.expectToken(Q.TokenKind.COLON),this.node(e,{kind:G.Kind.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(Q.TokenKind.SPREAD);const e=this.expectOptionalKeyword("on");return!e&&this.peek(Q.TokenKind.NAME)?this.node(t,{kind:G.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:G.Kind.INLINE_FRAGMENT,typeCondition:e?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){var t;const e=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(t=this._options)||void 0===t?void 0:t.allowLegacyFragmentVariables)?this.node(e,{kind:G.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:G.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(t){const e=this._lexer.token;switch(e.kind){case Q.TokenKind.BRACKET_L:return this.parseList(t);case Q.TokenKind.BRACE_L:return this.parseObject(t);case Q.TokenKind.INT:return this._lexer.advance(),this.node(e,{kind:G.Kind.INT,value:e.value});case Q.TokenKind.FLOAT:return this._lexer.advance(),this.node(e,{kind:G.Kind.FLOAT,value:e.value});case Q.TokenKind.STRING:case Q.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Q.TokenKind.NAME:switch(this._lexer.advance(),e.value){case"true":return this.node(e,{kind:G.Kind.BOOLEAN,value:!0});case"false":return this.node(e,{kind:G.Kind.BOOLEAN,value:!1});case"null":return this.node(e,{kind:G.Kind.NULL});default:return this.node(e,{kind:G.Kind.ENUM,value:e.value})}case Q.TokenKind.DOLLAR:if(t){if(this.expectToken(Q.TokenKind.DOLLAR),this._lexer.token.kind===Q.TokenKind.NAME)throw(0,P.syntaxError)(this._lexer.source,e.start,`Unexpected variable "$${this._lexer.token.value}" in constant value.`);throw this.unexpected(e)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this._lexer.advance(),this.node(t,{kind:G.Kind.STRING,value:t.value,block:t.kind===Q.TokenKind.BLOCK_STRING})}parseList(t){return this.node(this._lexer.token,{kind:G.Kind.LIST,values:this.any(Q.TokenKind.BRACKET_L,(()=>this.parseValueLiteral(t)),Q.TokenKind.BRACKET_R)})}parseObject(t){return this.node(this._lexer.token,{kind:G.Kind.OBJECT,fields:this.any(Q.TokenKind.BRACE_L,(()=>this.parseObjectField(t)),Q.TokenKind.BRACE_R)})}parseObjectField(t){const e=this._lexer.token,n=this.parseName();return this.expectToken(Q.TokenKind.COLON),this.node(e,{kind:G.Kind.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const e=[];for(;this.peek(Q.TokenKind.AT);)e.push(this.parseDirective(t));return e}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const e=this._lexer.token;return this.expectToken(Q.TokenKind.AT),this.node(e,{kind:G.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let e;if(this.expectOptionalToken(Q.TokenKind.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(Q.TokenKind.BRACKET_R),e=this.node(t,{kind:G.Kind.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(Q.TokenKind.BANG)?this.node(t,{kind:G.Kind.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:G.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Q.TokenKind.STRING)||this.peek(Q.TokenKind.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(Q.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Q.TokenKind.BRACE_R);return this.node(t,{kind:G.Kind.SCHEMA_DEFINITION,description:e,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,e=this.parseOperationType();this.expectToken(Q.TokenKind.COLON);const n=this.parseNamedType();return this.node(t,{kind:G.Kind.OPERATION_TYPE_DEFINITION,operation:e,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:G.Kind.SCALAR_TYPE_DEFINITION,description:e,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:G.Kind.OBJECT_TYPE_DEFINITION,description:e,name:n,interfaces:i,directives:r,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Q.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Q.TokenKind.BRACE_L,this.parseFieldDefinition,Q.TokenKind.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,e=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Q.TokenKind.COLON);const r=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(t,{kind:G.Kind.FIELD_DEFINITION,description:e,name:n,arguments:i,type:r,directives:s})}parseArgumentDefs(){return this.optionalMany(Q.TokenKind.PAREN_L,this.parseInputValueDef,Q.TokenKind.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,e=this.parseDescription(),n=this.parseName();this.expectToken(Q.TokenKind.COLON);const i=this.parseTypeReference();let r;this.expectOptionalToken(Q.TokenKind.EQUALS)&&(r=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(t,{kind:G.Kind.INPUT_VALUE_DEFINITION,description:e,name:n,type:i,defaultValue:r,directives:s})}parseInterfaceTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:G.Kind.INTERFACE_TYPE_DEFINITION,description:e,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();return this.node(t,{kind:G.Kind.UNION_TYPE_DEFINITION,description:e,name:n,directives:i,types:r})}parseUnionMemberTypes(){return this.expectOptionalToken(Q.TokenKind.EQUALS)?this.delimitedMany(Q.TokenKind.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();return this.node(t,{kind:G.Kind.ENUM_TYPE_DEFINITION,description:e,name:n,directives:i,values:r})}parseEnumValuesDefinition(){return this.optionalMany(Q.TokenKind.BRACE_L,this.parseEnumValueDefinition,Q.TokenKind.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,e=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:G.Kind.ENUM_VALUE_DEFINITION,description:e,name:n,directives:i})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw(0,P.syntaxError)(this._lexer.source,this._lexer.token.start,`${i(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();return this.node(t,{kind:G.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:e,name:n,directives:i,fields:r})}parseInputFieldsDefinition(){return this.optionalMany(Q.TokenKind.BRACE_L,this.parseInputValueDef,Q.TokenKind.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===Q.TokenKind.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const e=this.parseConstDirectives(),n=this.optionalMany(Q.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Q.TokenKind.BRACE_R);if(0===e.length&&0===n.length)throw this.unexpected();return this.node(t,{kind:G.Kind.SCHEMA_EXTENSION,directives:e,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const e=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(t,{kind:G.Kind.SCALAR_TYPE_EXTENSION,name:e,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const e=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(0===n.length&&0===i.length&&0===r.length)throw this.unexpected();return this.node(t,{kind:G.Kind.OBJECT_TYPE_EXTENSION,name:e,interfaces:n,directives:i,fields:r})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const e=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(0===n.length&&0===i.length&&0===r.length)throw this.unexpected();return this.node(t,{kind:G.Kind.INTERFACE_TYPE_EXTENSION,name:e,interfaces:n,directives:i,fields:r})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const e=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(0===n.length&&0===i.length)throw this.unexpected();return this.node(t,{kind:G.Kind.UNION_TYPE_EXTENSION,name:e,directives:n,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const e=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(0===n.length&&0===i.length)throw this.unexpected();return this.node(t,{kind:G.Kind.ENUM_TYPE_EXTENSION,name:e,directives:n,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const e=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(0===n.length&&0===i.length)throw this.unexpected();return this.node(t,{kind:G.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:e,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,e=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Q.TokenKind.AT);const n=this.parseName(),i=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(t,{kind:G.Kind.DIRECTIVE_DEFINITION,description:e,name:n,arguments:i,repeatable:r,locations:s})}parseDirectiveLocations(){return this.delimitedMany(Q.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,e=this.parseName();if(Object.prototype.hasOwnProperty.call(H.DirectiveLocation,e.value))return e;throw this.unexpected(t)}node(t,e){var n;return!0!==(null===(n=this._options)||void 0===n?void 0:n.noLocation)&&(e.loc=new B.Location(t,this._lexer.lastToken,this._lexer.source)),e}peek(t){return this._lexer.token.kind===t}expectToken(t){const e=this._lexer.token;if(e.kind===t)return this._lexer.advance(),e;throw(0,P.syntaxError)(this._lexer.source,e.start,`Expected ${r(t)}, found ${i(e)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t&&(this._lexer.advance(),!0)}expectKeyword(t){const e=this._lexer.token;if(e.kind!==Q.TokenKind.NAME||e.value!==t)throw(0,P.syntaxError)(this._lexer.source,e.start,`Expected "${t}", found ${i(e)}.`);this._lexer.advance()}expectOptionalKeyword(t){const e=this._lexer.token;return e.kind===Q.TokenKind.NAME&&e.value===t&&(this._lexer.advance(),!0)}unexpected(t){const e=null!=t?t:this._lexer.token;return(0,P.syntaxError)(this._lexer.source,e.start,`Unexpected ${i(e)}.`)}any(t,e,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(e.call(this));return i}optionalMany(t,e,n){if(this.expectOptionalToken(t)){const t=[];do{t.push(e.call(this))}while(!this.expectOptionalToken(n));return t}return[]}many(t,e,n){this.expectToken(t);const i=[];do{i.push(e.call(this))}while(!this.expectOptionalToken(n));return i}delimitedMany(t,e){this.expectOptionalToken(t);const n=[];do{n.push(e.call(this))}while(this.expectOptionalToken(t));return n}}function i(t){const e=t.value;return r(t.kind)+(null!=e?` "${e}"`:"")}function r(t){return(0,X.isPunctuatorTokenKind)(t)?`"${t}"`:t}e.Parser=n})),et=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.printString=function(t){return`"${t.replace(n,i)}"`};const n=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function i(t){return r[t.charCodeAt(0)]}const r=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"]})),nt=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BREAK=void 0,e.getEnterLeaveForKind=i,e.getVisitFn=function(t,e,n){const{enter:r,leave:s}=i(t,e);return n?s:r},e.visit=function(t,e,r=B.QueryDocumentKeys){const s=new Map;for(const t of Object.values(G.Kind))s.set(t,i(e,t));let o,u,a,c=Array.isArray(t),h=[t],l=-1,f=[],d=t;const v=[],p=[];do{l++;const t=l===h.length,i=t&&0!==f.length;if(t){if(u=0===p.length?void 0:v[v.length-1],d=a,a=p.pop(),i)if(c){d=d.slice();let t=0;for(const[e,n]of f){const i=e-t;null===n?(d.splice(i,1),t++):d[i]=n}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(const[t,e]of f)d[t]=e}l=o.index,h=o.keys,f=o.edits,c=o.inArray,o=o.prev}else if(a){if(u=c?l:h[l],d=a[u],null==d)continue;v.push(u)}let w;if(!Array.isArray(d)){var m,y;(0,B.isNode)(d)||(0,K.devAssert)(!1,`Invalid AST Node: ${(0,W.inspect)(d)}.`);const i=t?null===(m=s.get(d.kind))||void 0===m?void 0:m.leave:null===(y=s.get(d.kind))||void 0===y?void 0:y.enter;if(w=null==i?void 0:i.call(e,d,u,a,v,p),w===n)break;if(!1===w){if(!t){v.pop();continue}}else if(void 0!==w&&(f.push([u,w]),!t)){if(!(0,B.isNode)(w)){v.pop();continue}d=w}}var b;void 0===w&&i&&f.push([u,d]),t?v.pop():(o={inArray:c,index:l,keys:h,edits:f,prev:o},c=Array.isArray(d),h=c?d:null!==(b=r[d.kind])&&void 0!==b?b:[],l=-1,f=[],a&&p.push(a),a=d)}while(void 0!==o);return 0!==f.length?f[f.length-1][1]:t},e.visitInParallel=function(t){const e=new Array(t.length).fill(null),r=Object.create(null);for(const s of Object.values(G.Kind)){let o=!1;const u=new Array(t.length).fill(void 0),a=new Array(t.length).fill(void 0);for(let e=0;e<t.length;++e){const{enter:n,leave:r}=i(t[e],s);o||(o=null!=n||null!=r),u[e]=n,a[e]=r}o&&(r[s]={enter(...i){const r=i[0];for(let o=0;o<t.length;o++)if(null===e[o]){var s;const a=null===(s=u[o])||void 0===s?void 0:s.apply(t[o],i);if(!1===a)e[o]=r;else if(a===n)e[o]=n;else if(void 0!==a)return a}},leave(...i){const r=i[0];for(let o=0;o<t.length;o++)if(null===e[o]){var s;const r=null===(s=a[o])||void 0===s?void 0:s.apply(t[o],i);if(r===n)e[o]=n;else if(void 0!==r&&!1!==r)return r}else e[o]===r&&(e[o]=null)}})}return r};const n=Object.freeze({});function i(t,e){const n=t[e];return"object"==typeof n?n:"function"==typeof n?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}e.BREAK=n})),it=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.print=function(t){return(0,nt.visit)(t,n)};const n={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>i(t.definitions,"\n\n")},OperationDefinition:{leave(t){const e=s("(",i(t.variableDefinitions,", "),")"),n=i([t.operation,i([t.name,e]),i(t.directives," ")]," ");return("query"===n?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+s(" = ",n)+s(" ",i(r," "))},SelectionSet:{leave:({selections:t})=>r(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:u}){const a=s("",t,": ")+e;let c=a+s("(",i(n,", "),")");return c.length>80&&(c=a+s("(\n",o(i(n,"\n")),"\n)")),i([c,i(r," "),u]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+s(" ",i(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>i(["...",s("on ",t),i(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:o})=>`fragment ${t}${s("(",i(n,", "),")")} on ${e} ${s("",i(r," ")," ")}`+o},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?(0,J.printBlockString)(t):(0,et.printString)(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+i(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+i(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+s("(",i(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>s("",t,"\n")+i(["schema",i(e," "),r(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>s("",t,"\n")+i(["scalar",e,i(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:o,fields:u})=>s("",t,"\n")+i(["type",e,s("implements ",i(n," & ")),i(o," "),r(u)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:a})=>s("",t,"\n")+e+(u(n)?s("(\n",o(i(n,"\n")),"\n)"):s("(",i(n,", "),")"))+": "+r+s(" ",i(a," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:o})=>s("",t,"\n")+i([e+": "+n,s("= ",r),i(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:o,fields:u})=>s("",t,"\n")+i(["interface",e,s("implements ",i(n," & ")),i(o," "),r(u)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>s("",t,"\n")+i(["union",e,i(n," "),s("= ",i(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:o})=>s("",t,"\n")+i(["enum",e,i(n," "),r(o)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>s("",t,"\n")+i([e,i(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:o})=>s("",t,"\n")+i(["input",e,i(n," "),r(o)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:a})=>s("",t,"\n")+"directive @"+e+(u(n)?s("(\n",o(i(n,"\n")),"\n)"):s("(",i(n,", "),")"))+(r?" repeatable":"")+" on "+i(a," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>i(["extend schema",i(t," "),r(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>i(["extend scalar",t,i(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:o})=>i(["extend type",t,s("implements ",i(e," & ")),i(n," "),r(o)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:o})=>i(["extend interface",t,s("implements ",i(e," & ")),i(n," "),r(o)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>i(["extend union",t,i(e," "),s("= ",i(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>i(["extend enum",t,i(e," "),r(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>i(["extend input",t,i(e," "),r(n)]," ")}};function i(t,e=""){var n;return null!==(n=null==t?void 0:t.filter((t=>t)).join(e))&&void 0!==n?n:""}function r(t){return s("{\n",o(i(t,"\n")),"\n}")}function s(t,e,n=""){return null!=e&&""!==e?t+e+n:""}function o(t){return s(" ",t.replace(/\n/g,"\n "))}function u(t){var e;return null!==(e=null==t?void 0:t.some((t=>t.includes("\n"))))&&void 0!==e&&e}})),rt=function(t){var e=t.name,n=t.type;this.uri=t.uri,this.name=e,this.type=n},st=function(t){return"undefined"!=typeof File&&t instanceof File||"undefined"!=typeof Blob&&t instanceof Blob||t instanceof rt},ot=function t(e,n,i){var r;void 0===n&&(n=""),void 0===i&&(i=st);var s=new Map;function o(t,e){var n=s.get(e);n?n.push.apply(n,t):s.set(e,t)}if(i(e))r=null,o([n],e);else{var u=n?n+".":"";if("undefined"!=typeof FileList&&e instanceof FileList)r=Array.prototype.map.call(e,(function(t,e){return o([""+u+e],t),null}));else if(Array.isArray(e))r=e.map((function(e,n){var r=t(e,""+u+n,i);return r.files.forEach(o),r.clone}));else if(e&&e.constructor===Object)for(var a in r={},e){var c=t(e[a],""+u+a,i);c.files.forEach(o),r[a]=c.clone}else r=e}return{clone:r,files:s}},ut=st,at="object"==typeof self?self.FormData:window.FormData,ct=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultJsonSerializer=void 0,e.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify}})),ht=n((function(e,n){var i=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0});var r=i(at),s=function(t){return ut(t)||null!==t&&"object"==typeof t&&"function"==typeof t.pipe};n.default=function(t,e,n,i){void 0===i&&(i=ct.defaultJsonSerializer);var o=ot({query:t,variables:e,operationName:n},"",s),u=o.clone,a=o.files;if(0===a.size){if(!Array.isArray(t))return i.stringify(u);if(void 0!==e&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");var c=t.reduce((function(t,n,i){return t.push({query:n,variables:e?e[i]:void 0}),t}),[]);return i.stringify(c)}var h=new("undefined"==typeof FormData?r.default:FormData);h.append("operations",i.stringify(u));var l={},f=0;return a.forEach((function(t){l[++f]=t})),h.append("map",i.stringify(l)),f=0,a.forEach((function(t,e){h.append(""+ ++f,e)})),h}})),lt=n((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseBatchRequestsExtendedArgs=e.parseRawRequestExtendedArgs=e.parseRequestExtendedArgs=e.parseBatchRequestArgs=e.parseRawRequestArgs=e.parseRequestArgs=void 0,e.parseRequestArgs=function(t,e,n){return t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0}},e.parseRawRequestArgs=function(t,e,n){return t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0}},e.parseBatchRequestArgs=function(t,e){return t.documents?t:{documents:t,requestHeaders:e,signal:void 0}},e.parseRequestExtendedArgs=function(t,e,n,i){return t.document?t:{url:t,document:e,variables:n,requestHeaders:i,signal:void 0}},e.parseRawRequestExtendedArgs=function(t,e,n,i){return t.query?t:{url:t,query:e,variables:n,requestHeaders:i,signal:void 0}},e.parseBatchRequestsExtendedArgs=function(t,e,n){return t.documents?t:{url:t,documents:e,requestHeaders:n,signal:void 0}}})),ft=n((function(e,n){var i,r=t&&t.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(n,"__esModule",{value:!0}),n.ClientError=void 0;var s=function(t){function e(n,i){var r=this,s=e.extractMessage(n)+": "+JSON.stringify({response:n,request:i});return r=t.call(this,s)||this,Object.setPrototypeOf(r,e.prototype),r.response=n,r.request=i,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r(e,t),e.extractMessage=function(t){try{return t.errors[0].message}catch(e){return"GraphQL Error (Code: "+t.status+")"}},e}(Error);n.ClientError=s}));n((function(e,n){var i=t&&t.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},r=t&&t.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),s=t&&t.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=t&&t.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return s(e,t),e},u=t&&t.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))},a=t&&t.__generator||function(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},c=t&&t.__rest||function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n},h=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.gql=n.batchRequests=n.request=n.rawRequest=n.GraphQLClient=n.ClientError=void 0;var l=o(V),f=l,d=h(ht);Object.defineProperty(n,"ClientError",{enumerable:!0,get:function(){return ft.ClientError}});var v=function(t){var e={};return t&&("undefined"!=typeof Headers&&t instanceof Headers||t instanceof f.Headers?e=function(t){var e={};return t.forEach((function(t,n){e[n]=t})),e}(t):Array.isArray(t)?t.forEach((function(t){e[t[0]]=t[1]})):e=t),e},p=function(t){return t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},m=function(t){var e=t.url,n=t.query,r=t.variables,s=t.operationName,o=t.headers,c=t.fetch,h=t.fetchOptions;return u(void 0,void 0,void 0,(function(){var t;return a(this,(function(u){switch(u.label){case 0:return t=d.default(n,r,s,h.jsonSerializer),[4,c(e,i({method:"POST",headers:i(i({},"string"==typeof t?{"Content-Type":"application/json"}:{}),o),body:t},h))];case 1:return[2,u.sent()]}}))}))},y=function(t){var e=t.url,n=t.query,r=t.variables,s=t.operationName,o=t.headers,c=t.fetch,h=t.fetchOptions;return u(void 0,void 0,void 0,(function(){var t;return a(this,(function(u){switch(u.label){case 0:return t=function(t){var e=t.query,n=t.variables,i=t.operationName,r=t.jsonSerializer;if(!Array.isArray(e)){var s=["query="+encodeURIComponent(p(e))];return n&&s.push("variables="+encodeURIComponent(r.stringify(n))),i&&s.push("operationName="+encodeURIComponent(i)),s.join("&")}if(void 0!==n&&!Array.isArray(n))throw new Error("Cannot create query with given variable type, array expected");var o=e.reduce((function(t,e,i){return t.push({query:p(e),variables:n?r.stringify(n[i]):void 0}),t}),[]);return"query="+encodeURIComponent(r.stringify(o))}({query:n,variables:r,operationName:s,jsonSerializer:h.jsonSerializer}),[4,c(e+"?"+t,i({method:"GET",headers:o},h))];case 1:return[2,u.sent()]}}))}))},b=function(){function t(t,e){this.url=t,this.options=e||{}}return t.prototype.rawRequest=function(t,e,n){return u(this,void 0,void 0,(function(){var r,s,o,u,h,f,d,p,m,y;return a(this,(function(){return r=lt.parseRawRequestArgs(t,e,n),o=(s=this.options).headers,h=void 0===(u=s.fetch)?l.default:u,d=void 0===(f=s.method)?"POST":f,p=c(s,["headers","fetch","method"]),m=this.url,void 0!==r.signal&&(p.signal=r.signal),y=T(r.query).operationName,[2,w({url:m,query:r.query,variables:r.variables,headers:i(i({},v(o)),v(r.requestHeaders)),operationName:y,fetch:h,method:d,fetchOptions:p})]}))}))},t.prototype.request=function(t,e,n){return u(this,void 0,void 0,(function(){var r,s,o,u,h,f,d,p,m,y,b;return a(this,(function(a){switch(a.label){case 0:return r=lt.parseRequestArgs(t,e,n),o=(s=this.options).headers,h=void 0===(u=s.fetch)?l.default:u,d=void 0===(f=s.method)?"POST":f,p=c(s,["headers","fetch","method"]),m=this.url,void 0!==r.signal&&(p.signal=r.signal),y=T(r.document),b=y.operationName,[4,w({url:m,query:y.query,variables:r.variables,headers:i(i({},v(o)),v(r.requestHeaders)),operationName:b,fetch:h,method:d,fetchOptions:p})];case 1:return[2,a.sent().data]}}))}))},t.prototype.batchRequests=function(t,e){return u(this,void 0,void 0,(function(){var n,r,s,o,u,h,f,d,p,m,y;return a(this,(function(a){switch(a.label){case 0:return n=lt.parseBatchRequestArgs(t,e),s=(r=this.options).headers,u=void 0===(o=r.fetch)?l.default:o,f=void 0===(h=r.method)?"POST":h,d=c(r,["headers","fetch","method"]),p=this.url,void 0!==n.signal&&(d.signal=n.signal),m=n.documents.map((function(t){return T(t.document).query})),y=n.documents.map((function(t){return t.variables})),[4,w({url:p,query:m,variables:y,headers:i(i({},v(s)),v(n.requestHeaders)),operationName:void 0,fetch:u,method:f,fetchOptions:d})];case 1:return[2,a.sent().data]}}))}))},t.prototype.setHeaders=function(t){return this.options.headers=t,this},t.prototype.setHeader=function(t,e){var n,i=this.options.headers;return i?i[t]=e:this.options.headers=((n={})[t]=e,n),this},t.prototype.setEndpoint=function(t){return this.url=t,this},t}();function w(t){var e=t.url,n=t.query,r=t.variables,s=t.headers,o=t.operationName,c=t.fetch,h=t.method,l=void 0===h?"POST":h,f=t.fetchOptions;return u(this,void 0,void 0,(function(){var t,u,h,d,v,p,b;return a(this,(function(a){switch(a.label){case 0:return t="POST"===l.toUpperCase()?m:y,u=Array.isArray(n),[4,t({url:e,query:n,variables:r,operationName:o,headers:s,fetch:c,fetchOptions:f})];case 1:return[4,O(h=a.sent(),f.jsonSerializer)];case 2:if(d=a.sent(),v=u&&Array.isArray(d)?!d.some((function(t){return!t.data})):!!d.data,h.ok&&!d.errors&&v)return p=h.headers,b=h.status,[2,i(i({},u?{data:d}:d),{headers:p,status:b})];throw new ft.ClientError(i(i({},"string"==typeof d?{error:d}:d),{status:h.status,headers:h.headers}),{query:n,variables:r})}}))}))}function E(t,e,n,r){return u(this,void 0,void 0,(function(){var s;return a(this,(function(){return s=lt.parseRequestExtendedArgs(t,e,n,r),[2,new b(s.url).request(i({},s))]}))}))}function O(t,e){return void 0===e&&(e=ct.defaultJsonSerializer),u(this,void 0,void 0,(function(){var n,i,r;return a(this,(function(s){switch(s.label){case 0:return t.headers.forEach((function(t,e){"content-type"===e.toLowerCase()&&(n=t)})),n&&n.toLowerCase().startsWith("application/json")?(r=(i=e).parse,[4,t.text()]):[3,2];case 1:return[2,r.apply(i,[s.sent()])];case 2:return[2,t.text()]}}))}))}function g(t){var e,n=void 0,i=t.definitions.filter((function(t){return"OperationDefinition"===t.kind}));return 1===i.length&&(n=null===(e=i[0].name)||void 0===e?void 0:e.value),n}function T(t){if("string"==typeof t){var e=void 0;try{e=g(tt.parse(t))}catch(t){}return{query:t,operationName:e}}var n=g(t);return{query:it.print(t),operationName:n}}n.GraphQLClient=b,n.rawRequest=function(t,e,n,r){return u(this,void 0,void 0,(function(){var s;return a(this,(function(){return s=lt.parseRawRequestExtendedArgs(t,e,n,r),[2,new b(s.url).rawRequest(i({},s))]}))}))},n.request=E,n.batchRequests=function(t,e,n){return u(this,void 0,void 0,(function(){var r;return a(this,(function(){return r=lt.parseBatchRequestsExtendedArgs(t,e,n),[2,new b(r.url).batchRequests(i({},r))]}))}))},n.default=E,n.gql=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.reduce((function(t,n,i){return""+t+n+(i in e?e[i]:"")}),"")}}));export{c as A,A as D,s as M,r as N,o as T,t as a,a as b,n as c,e as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as o,H as s,g as e}from"./p-8f4851a6.js";import"./p-da929c01.js";import{F as r}from"./p-ddd0ef12.js";let h=class{constructor(o){t(this,o),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._firstRender=!0,this.autoClose=!0,this.top="0px",this.left="0px",this.bottom="0px",this.right="0px",this.boxWidth="fit-content"}dispatchVisibilityChange(t,i){t!=i&&this.ezVisibilityChange.emit(t)}async updatePosition(t=this.top,i=this.left,o=this.bottom,s=this.right){r.updateFloatPosition(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:(t,i)=>!!t.contains(i)||!(!t.shadowRoot||!t.shadowRoot.contains(i))||((t=this._host).lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))})}async show(t=this.top,i=this.left,o=this.bottom,s=this.right){this._floatingID=r.float(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:(t,i)=>!!t.contains(i)||!(!t.shadowRoot||!t.shadowRoot.contains(i))||((t=this._host).lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))}),this.opened=!0}async hide(){void 0!==this._floatingID&&(r.close(this._floatingID),this._floatingID=void 0,this.opened=!1)}componentDidRender(){this._firstRender&&(this._box.remove(),this._firstRender=!1)}render(){return o(s,null,o("section",{ref:t=>this._container=t},o("div",{class:"box "+("fit-content"===this.boxWidth?"box--fit-content":"box--full-width"),ref:t=>this._box=t},o("slot",null))))}get _host(){return e(this)}static get watchers(){return{opened:["dispatchVisibilityChange"]}}};h.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--more-visible, 1);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";export{h as ez_popover}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
export declare class EzApplication {
|
|
3
|
+
/**
|
|
4
|
+
* Evento disparado quando a aplicação for carregada.
|
|
5
|
+
*/
|
|
6
|
+
applicationLoaded: EventEmitter<boolean>;
|
|
7
|
+
componentWillLoad(): void;
|
|
8
|
+
componentDidLoad(): void;
|
|
9
|
+
render(): any;
|
|
10
|
+
}
|
|
@@ -15,6 +15,11 @@ export declare class EzButton {
|
|
|
15
15
|
* Define o icone svg que será utilizado no botão. Esta propriedade só é utilizada caso o componente esteja no modo 'icon'
|
|
16
16
|
*/
|
|
17
17
|
image: string;
|
|
18
|
+
/**
|
|
19
|
+
* Quando em modo "icon" pode-se escolher entre [small,medium,large] (somente para o modo "icon")
|
|
20
|
+
*/
|
|
21
|
+
size: string;
|
|
22
|
+
getIconSize(): string;
|
|
18
23
|
handleSlotChange(ev: Event): void;
|
|
19
24
|
render(): any;
|
|
20
25
|
}
|
|
@@ -9,6 +9,14 @@ export declare class EzCalendar {
|
|
|
9
9
|
private _weekDayLabels;
|
|
10
10
|
private _monthLabels;
|
|
11
11
|
private _calendarHeight;
|
|
12
|
+
private _hoursLabel;
|
|
13
|
+
private _minutosLabel;
|
|
14
|
+
private _hoursSelect;
|
|
15
|
+
private _minutesSelect;
|
|
16
|
+
private _secondsSelect;
|
|
17
|
+
private _hoursScroll;
|
|
18
|
+
private _minutesScroll;
|
|
19
|
+
private _secondsScroll;
|
|
12
20
|
/**
|
|
13
21
|
* A data selecionada no calendário
|
|
14
22
|
*/
|
|
@@ -18,6 +26,14 @@ export declare class EzCalendar {
|
|
|
18
26
|
* quando o método show() for acionado.
|
|
19
27
|
*/
|
|
20
28
|
floating: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Exibe ou não as horas e minutos no calendario
|
|
31
|
+
*/
|
|
32
|
+
time: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Exibe ou não os segundos no calendario
|
|
35
|
+
*/
|
|
36
|
+
showSeconds: boolean;
|
|
21
37
|
/**
|
|
22
38
|
* Quando o usuário escolhe uma data, esse evento é emitido.
|
|
23
39
|
*/
|
|
@@ -42,6 +58,11 @@ export declare class EzCalendar {
|
|
|
42
58
|
private isSelectedDate;
|
|
43
59
|
private changeMonth;
|
|
44
60
|
private selectDate;
|
|
61
|
+
private selectHours;
|
|
62
|
+
private selectMinutes;
|
|
63
|
+
private selectSeconds;
|
|
64
|
+
updateScroll(element: HTMLElement): void;
|
|
45
65
|
componentDidRender(): void;
|
|
66
|
+
componentDidLoad(): void;
|
|
46
67
|
render(): any;
|
|
47
68
|
}
|