marketplacepos 2.8.0 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/Marketplace/369.8c9ca2ecf6f3a760.js +1 -0
  2. package/Marketplace/379.fd2e5a0bd36c9b00.js +1 -0
  3. package/Marketplace/393.9113a28596b36003.js +1 -0
  4. package/Marketplace/397.c6768a042e8257c0.js +1 -0
  5. package/Marketplace/3rdpartylicenses.txt +3 -0
  6. package/Marketplace/408.c73edfe24695a688.js +1 -0
  7. package/Marketplace/425.03f8f97da7452806.js +1 -0
  8. package/Marketplace/46.40ebac81bd0fb91b.js +1 -0
  9. package/Marketplace/{53.7e8bb7325980dfd5.js → 53.ab0f83f4bba76774.js} +1 -1
  10. package/Marketplace/655.9604b4370243c059.js +1 -0
  11. package/Marketplace/717.5d253da5bb63552f.js +1 -0
  12. package/Marketplace/718.455a3c47fb180214.js +1 -0
  13. package/Marketplace/{859.b43bda3adda95fa3.js → 859.3a4d26983bbb5254.js} +1 -1
  14. package/Marketplace/874.5b06431d2b5a1e8f.js +1 -0
  15. package/Marketplace/877.bab93e3da1ff1928.js +1 -0
  16. package/Marketplace/884.06eb48b1f2379d09.js +1 -0
  17. package/Marketplace/{913.6b5b3db030c3bc49.js → 913.ac94f56e393c389b.js} +1 -1
  18. package/Marketplace/997.1e5281aa64540dee.js +1 -0
  19. package/Marketplace/common.29d2fb726f28cde8.js +1 -0
  20. package/Marketplace/index.html +3 -3
  21. package/Marketplace/main.f21ded8d313b0b60.js +1 -0
  22. package/Marketplace/runtime.2d126c69c13cad80.js +1 -0
  23. package/package.json +1 -1
  24. package/Marketplace/369.b5bcb467b3ca04c8.js +0 -1
  25. package/Marketplace/397.55fafd1d8945185c.js +0 -1
  26. package/Marketplace/408.b53797a5bda9f7f8.js +0 -1
  27. package/Marketplace/46.67982fb195b43a4d.js +0 -1
  28. package/Marketplace/655.09b1b17f23a59b7e.js +0 -1
  29. package/Marketplace/717.2e5a78cf17e9bed1.js +0 -1
  30. package/Marketplace/718.78930b2d3e9fc2bd.js +0 -1
  31. package/Marketplace/82.fecf4fa3a3743326.js +0 -1
  32. package/Marketplace/87.0c53ec1547d4d5d5.js +0 -1
  33. package/Marketplace/874.7662257927081a57.js +0 -1
  34. package/Marketplace/877.7e5f8104980e0168.js +0 -1
  35. package/Marketplace/884.45404dc14d1585a7.js +0 -1
  36. package/Marketplace/970.7c36426f4bcc50cb.js +0 -1
  37. package/Marketplace/997.08e3f8cf0bafff67.js +0 -1
  38. package/Marketplace/common.df21aa97084954ce.js +0 -1
  39. package/Marketplace/main.c27e23d32d8dc713.js +0 -1
  40. package/Marketplace/runtime.447f149bd5bc7630.js +0 -1
@@ -1 +0,0 @@
1
- (self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[884],{6304:(re,A,C)=>{"use strict";C.d(A,{j:()=>M});var h=C(5412),N=C(6779),O=C(4650),D=C(6895),F=C(4006),v=C(6709),J=C(6401);function $(G,B){if(1&G){const L=O.EpF();O.TgZ(0,"li")(1,"mat-checkbox",4),O.NdJ("ngModelChange",function(x){const K=O.CHM(L).$implicit;return O.KtG(K.selected=x)}),O.TgZ(2,"div",5)(3,"h5",6),O._uU(4),O.qZA()()()()}if(2&G){const L=B.$implicit;O.xp6(1),O.Q6J("ngModel",L.selected),O.xp6(3),O.Oqu(L.Name)}}class M{constructor(B,L){this.data=B,this.dialogRef=L,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new N.O,this.modalConfig.title="Updating Inventory"}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}getSelectedChannel(){return this.channels.filter(B=>B.selected)}}M.\u0275fac=function(B){return new(B||M)(O.Y36(h.WI),O.Y36(h.so))},M.\u0275cmp=O.Xpm({type:M,selectors:[["app-modal-update-channels"]],decls:5,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"no-bullet"],[4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[1,"d-flex"],[1,"fw-light","me-2","my-auto"]],template:function(B,L){if(1&B&&(O.TgZ(0,"modal-material",0),O.NdJ("onOk",function(){return L.onOk()})("onClose",function(){return L.onClose()})("onCancel",function(){return L.onClose()}),O.TgZ(1,"div",1)(2,"div")(3,"ul",2),O.YNc(4,$,5,2,"li",3),O.qZA()()()()),2&B){let i;O.Q6J("dynamicValidated",(null==(i=L.getSelectedChannel())?null:i.length)>0)("config",L.modalConfig),O.xp6(4),O.Q6J("ngForOf",L.channels)}},dependencies:[D.sg,F.JJ,F.On,v.oG,J.M],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]})},8705:(re,A,C)=>{"use strict";C.d(A,{v:()=>h});var h=(()=>{return(N=h||(h={}))[N.ALL=1]="ALL",N[N.DIFFERENCE=3]="DIFFERENCE",h;var N})()},7945:(re,A,C)=>{"use strict";C.d(A,{k:()=>L});var h=C(6895),N=C(4006),O=C(5412),D=C(9549),F=C(4144),v=C(4650),J=C(7370),$=C.n(J);class M{constructor(x){this.elementRef=x,this.decimalPlaces=4,this.modifyValueOnWheel=!0,this.max="999999999999999.9999",this.min="-999999999999999.9999",this.propagateChange=K=>{},this.preventNegative=!1;const T={digitGroupSeparator:",",decimalCharacter:".",decimalPlaces:this.decimalPlaces,maximumValue:this.max,minimumValue:this.min,allowDecimalPadding:!1,showWarnings:!1};this.numericElement=new($())(this.elementRef.nativeElement,null,T)}set _max(x){x&&(this.max=x,this.updateNumericSettings())}set _min(x){x&&(this.min=x,this.updateNumericSettings())}ngOnInit(){""==this.percentage&&(this.max="100"),this.preventNegative&&(this.min="0.00"),this.updateNumericSettings()}updateNumericSettings(){const x={maximumValue:this.max,minimumValue:this.min,readOnly:this.isElementDisabled(),decimalPlaces:this.decimalPlaces,modifyValueOnWheel:this.modifyValueOnWheel};this.numericElement.update(x)}onKeyUp(){let x=this.numericElement.getNumber();this.propagateChange(x)}isElementDisabled(){let x=!1;return(!0===this.elementRef.nativeElement.readOnly||!0===this.elementRef.nativeElement.disabled)&&(x=!0),x}writeValue(x){null!=x&&this.numericElement.set(x)}registerOnChange(x){this.propagateChange=x}registerOnTouched(){}}M.\u0275fac=function(x){return new(x||M)(v.Y36(v.SBq))},M.\u0275dir=v.lG2({type:M,selectors:[["","autoNum",""]],hostBindings:function(x,T){1&x&&v.NdJ("keyup",function(){return T.onKeyUp()})},inputs:{percentage:"percentage",preventNegative:"preventNegative",decimalPlaces:"decimalPlaces",modifyValueOnWheel:"modifyValueOnWheel",_max:["max","_max"],_min:["min","_min"]},standalone:!0,features:[v._Bn([{provide:N.JU,useExisting:(0,v.Gpc)(()=>M),multi:!0}])]});var G=C(6779),B=C(6401);class L{constructor(x,T){this.dialogRef=x,this.item=T}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(x=>x.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,"inventory"==this.item.Table?this.value=this.selectedChannel.Inventory:"price"==this.item.Table&&(this.value=this.selectedChannel.Price),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){this.modalConfig=new G.O,this.modalConfig.title=`${this.item?.Name} ${this.item?.Variant?.Model} ${this.item?.Table} in ${this.selectedChannel?.Title}`}onSubmit(){"inventory"==this.item.Table?this.selectedChannel.Inventory=this.value:"price"==this.item.Table&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}}L.\u0275fac=function(x){return new(x||L)(v.Y36(O.so),v.Y36(O.WI))},L.\u0275cmp=v.Xpm({type:L,selectors:[["app-table-dialog"]],standalone:!0,features:[v.jDz],decls:6,vars:3,consts:[[3,"dynamicValidated","config","onClose","onCancel","onOk"],["content",""],[1,"font-lg"],["matInput","","autoNum","",1,"font-lgr","py-3",3,"ngModel","ngModelChange"]],template:function(x,T){1&x&&(v.TgZ(0,"modal-material",0),v.NdJ("onClose",function(){return T.onClose()})("onCancel",function(){return T.onClose()})("onOk",function(){return T.onSubmit()}),v.TgZ(1,"div",1)(2,"mat-form-field")(3,"mat-label",2),v._uU(4,"Editing Data"),v.qZA(),v.TgZ(5,"input",3),v.NdJ("ngModelChange",function(se){return T.value=se}),v.qZA()()()()),2&x&&(v.Q6J("dynamicValidated",T.value)("config",T.modalConfig),v.xp6(5),v.Q6J("ngModel",T.value))},dependencies:[h.ez,O.Is,D.lN,D.KE,D.hX,F.c,F.Nt,M,B.M,N.u5,N.Fj,N.JJ,N.On],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]})},6114:(re,A,C)=>{"use strict";C.d(A,{a:()=>W});var h=C(4650),N=C(5412),O=C(7945),D=C(6895),F=C(455),v=C(4006),J=C(9549),$=C(4144),M=C(7579),G=C(2722),B=C(6082),L=C(1739);function i(m,E){if(1&m){const S=h.EpF();h.ynx(0),h._UZ(1,"br"),h.TgZ(2,"mat-slide-toggle",12),h.NdJ("toggleChange",function(){h.CHM(S);const k=h.oxw();return k.toggleStatus=!k.toggleStatus,h.KtG(k.onToggle())}),h.TgZ(3,"small",13),h._uU(4),h.qZA()(),h.BQk()}if(2&m){const S=h.oxw();h.xp6(4),h.hij(" ",S.productToggleTitle?S.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function x(m,E){if(1&m&&(h.TgZ(0,"th",14),h._uU(1),h.qZA()),2&m){const S=E.$implicit;h.xp6(1),h.Oqu(S.Name)}}function T(m,E){if(1&m){const S=h.EpF();h.TgZ(0,"input",28),h.NdJ("ngModelChange",function(k){h.CHM(S);const R=h.oxw(3).$implicit;return h.KtG(R.selected=k)})("ngModelChange",function(){h.CHM(S);const k=h.oxw(3).$implicit,R=h.oxw();return h.KtG(R.onCheckboxStateProduct(k.ID))}),h.qZA()}if(2&m){const S=h.oxw(3).$implicit,P=h.oxw();h.Q6J("hidden",null==P.filter?null:P.filter.HiddenIPOSInventory)("ngModel",S.selected)}}function K(m,E){if(1&m){const S=h.EpF();h.TgZ(0,"img",29),h.NdJ("click",function(k){h.CHM(S);const R=h.oxw(3).$implicit,q=h.oxw();return h.KtG(q.onZoomImage(k,null==R?null:R.ImageUrl))}),h.qZA()}if(2&m){const S=h.oxw(3).$implicit;h.s9C("src",null==S?null:S.ThumbnailUrl,h.LSH)}}function se(m,E){1&m&&h._UZ(0,"img",30)}function fe(m,E){if(1&m&&(h.ynx(0),h.TgZ(1,"td",22)(2,"div",23),h.YNc(3,T,1,2,"input",24),h.YNc(4,K,1,1,"img",25),h.YNc(5,se,1,0,"ng-template",null,26,h.W1O),h.qZA()(),h.TgZ(7,"td",22)(8,"span",27),h._uU(9),h.qZA(),h._UZ(10,"br"),h.TgZ(11,"small"),h._uU(12),h.qZA()(),h.BQk()),2&m){const S=h.MAs(6),P=h.oxw(2).$implicit,k=h.oxw();h.xp6(1),h.Q6J("rowSpan",null==P?null:P.Variants.length),h.xp6(2),h.Q6J("ngIf",k.countVariant(P.Variants)>=0),h.xp6(1),h.Q6J("ngIf",null==P?null:P.ThumbnailUrl)("ngIfElse",S),h.xp6(3),h.Q6J("rowSpan",null==P?null:P.Variants.length),h.xp6(2),h.Oqu(null==P?null:P.Name),h.xp6(3),h.hij("(",null==P?null:P.Category,")")}}function ie(m,E){if(1&m){const S=h.EpF();h.TgZ(0,"input",8),h.NdJ("ngModelChange",function(k){h.CHM(S);const R=h.oxw().$implicit;return h.KtG(R.selected=k)}),h.qZA()}if(2&m){const S=h.oxw().$implicit;h.Q6J("ngModel",S.selected)}}const V=function(m){return{"bg-gradient-warning":m}};function le(m,E){if(1&m){const S=h.EpF();h.ynx(0),h.TgZ(1,"td",33),h.NdJ("click",function(){h.CHM(S);const k=h.oxw().$implicit,R=h.oxw().$implicit,q=h.oxw().$implicit,ne=h.oxw();return h.KtG(ne.openTableDialog(q.Name,R,k.ID,q.ChannelItemID))}),h.TgZ(2,"span",34),h._uU(3),h.ALo(4,"number"),h.qZA(),h.TgZ(5,"a",35),h.NdJ("click",function(k){return null==k?null:k.stopPropagation()}),h._UZ(6,"i",18),h.qZA()(),h.BQk()}if(2&m){const S=E.$implicit,P=h.oxw(2).$implicit,k=h.oxw(2);h.xp6(1),h.Q6J("ngClass",h.VKq(5,V,k.printPOS(P)!=k.printItem(S)&&!(null!=k.filter&&k.filter.HiddenIPOSInventory))),h.xp6(2),h.hij(" ",h.lcZ(4,3,k.printItem(S))," "),h.xp6(2),h.Q6J("href",S.Url,h.LSH)}}function oe(m,E){1&m&&(h.TgZ(0,"td",36)(1,"span",37),h._uU(2,"X"),h.qZA()())}function Z(m,E){if(1&m&&(h.ynx(0),h.YNc(1,le,7,7,"ng-container",31),h.YNc(2,oe,3,0,"ng-template",null,32,h.W1O),h.BQk()),2&m){const S=E.$implicit,P=h.MAs(3),k=h.oxw().$implicit,R=h.oxw(2);h.xp6(1),h.Q6J("ngIf",R.getItemFromChannel(k,S.ID))("ngIfElse",P)}}function H(m,E){if(1&m&&(h.TgZ(0,"tr"),h.YNc(1,fe,13,7,"ng-container",4),h.TgZ(2,"td",15),h._uU(3),h.qZA(),h.TgZ(4,"td",15)(5,"span"),h._uU(6),h.qZA(),h.TgZ(7,"span",16)(8,"a",17),h._UZ(9,"i",18),h.qZA()()(),h.TgZ(10,"td",19),h.YNc(11,ie,1,1,"input",20),h.qZA(),h.TgZ(12,"td",21),h._uU(13),h.ALo(14,"number"),h.qZA(),h.YNc(15,Z,4,2,"ng-container",11),h.qZA()),2&m){const S=E.$implicit,P=E.index,k=h.oxw(2);h.xp6(1),h.Q6J("ngIf",0==P),h.xp6(2),h.Oqu(null==S?null:S.Model),h.xp6(3),h.hij(" ",S.Code," "),h.xp6(2),h.Q6J("href","https://"+k.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(null==S?null:S.ID),h.LSH),h.xp6(2),h.Q6J("hidden",null==k.filter?null:k.filter.HiddenIPOSInventory),h.xp6(1),h.Q6J("ngIf",k.printPOS(S)>=0||"price"==k.table),h.xp6(1),h.Q6J("hidden",null==k.filter?null:k.filter.HiddenIPOSInventory),h.xp6(1),h.Oqu(h.lcZ(14,9,k.printPOS(S))),h.xp6(2),h.Q6J("ngForOf",k.channel)}}function ue(m,E){if(1&m&&(h.TgZ(0,"tbody"),h.YNc(1,H,16,11,"tr",11),h.qZA()),2&m){const S=E.$implicit;h.xp6(1),h.Q6J("ngForOf",S.Variants)}}class W{constructor(E,S,P){this.dialog=E,this.productService=S,this.biggerPictureService=P,this.showProductToggle=!1,this.toggleStatus=!1,this.checkboxState=!1,this.onSubmit=new h.vpe,this.destroy$=new M.x,this.toggle=new h.vpe,this.hostName=this.productService.getHostName()}ngOnInit(){"inventory"==this.table?this.stockHeader="Stock":"price"==this.table&&(this.stockHeader="Price")}onCheckboxStateProduct(E){let S=this.data.filter(P=>P.ID==E);S.length>0&&(S=S.map(P=>(P.Variants=P.Variants.map(k=>(k.selected=P.selected,k)),P)))}onCheckboxStateChange(){this.data=this.data.map(E=>(E.Variants=E.Variants.map(S=>(S.selected=this.checkboxState,S)),E))}getItemFromChannel(E,S){return E.Channel.find(P=>P.ChannelID==S)}printItem(E){return"inventory"==this.table?E.Inventory:"price"==this.table?E.Price:void 0}openTableDialog(E,S,P,k){this.dialog.open(O.k,{data:{Name:E,Variant:S,ChannelID:P,Table:this.table,ChannelItemID:k}}).afterClosed().pipe((0,G.R)(this.destroy$)).subscribe(R=>{null!=R&&this.onSubmit.emit(R)})}printPOS(E){return"inventory"==this.table?E.Inventory?E.Inventory:0:"price"==this.table?E.UnitPrice:null}countVariant(E){let S=0;return"inventory"==this.table?(E.forEach(P=>{S+=P.Inventory}),S):"price"==this.table?(S=0,E.forEach(P=>{S+=P.UnitPrice}),S):null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(E,S){this.biggerPictureService.openBiggerPicture(E,S)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}W.\u0275fac=function(E){return new(E||W)(h.Y36(N.uw),h.Y36(B.M),h.Y36(L.k))},W.\u0275cmp=h.Xpm({type:W,selectors:[["app-table"]],inputs:{filter:"filter",data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle"},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},standalone:!0,features:[h.jDz],decls:17,vars:6,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-20"],[4,"ngIf"],["scope","col",1,"text-start"],["scope","col",1,"text-start","w-10"],[3,"hidden"],["type","checkbox",3,"ngModel","ngModelChange"],["scope","col",1,"text-end","w-10",3,"hidden"],["scope","col","class","text-center w-10 text-uppercase",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],["scope","col",1,"text-center","w-10","text-uppercase"],[1,"text-start"],[1,"ms-2"],["target","_blank",3,"href"],[1,"fas","fa-lg","fa-external-link-alt","external-link-custom"],[1,"align-middle",3,"hidden"],["type","checkbox",3,"ngModel","ngModelChange",4,"ngIf"],[1,"text-end",3,"hidden"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center"],["type","checkbox","class","me-3",3,"hidden","ngModel","ngModelChange",4,"ngIf"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],["elsePic",""],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"hidden","ngModel","ngModelChange"],[1,"border","rounded","w-img","cursor-pointer",3,"src","click"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[4,"ngIf","ngIfElse"],["elseCol",""],[1,"text-center","p-0","pointer","cell-hover",3,"ngClass","click"],[1,"me-2"],["target","_blank",3,"href","click"],[1,"table-white","text-center",2,"color","red"],[1,"me-10"]],template:function(E,S){1&E&&(h.TgZ(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr")(4,"th",3),h._uU(5,"Product "),h.YNc(6,i,5,1,"ng-container",4),h.qZA(),h.TgZ(7,"th",5),h._uU(8,"Variant"),h.qZA(),h.TgZ(9,"th",6),h._uU(10,"SKU"),h.qZA(),h.TgZ(11,"th",7)(12,"input",8),h.NdJ("ngModelChange",function(k){return S.checkboxState=k})("ngModelChange",function(){return S.onCheckboxStateChange()}),h.qZA()(),h.TgZ(13,"th",9),h._uU(14,"POS"),h.qZA(),h.YNc(15,x,2,1,"th",10),h.qZA()(),h.YNc(16,ue,2,1,"tbody",11),h.qZA()()),2&E&&(h.xp6(6),h.Q6J("ngIf",S.showProductToggle),h.xp6(5),h.Q6J("hidden",null==S.filter?null:S.filter.HiddenIPOSInventory),h.xp6(1),h.Q6J("ngModel",S.checkboxState),h.xp6(1),h.Q6J("hidden",null==S.filter?null:S.filter.HiddenIPOSInventory),h.xp6(2),h.Q6J("ngForOf",S.channel),h.xp6(1),h.Q6J("ngForOf",S.data))},dependencies:[D.ez,D.mk,D.sg,D.O5,D.JJ,v.u5,v.Wl,v.JJ,v.On,F.rP,F.Rr,N.Is,J.lN,$.c],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}"]})},7370:function(re){re.exports=function(){return h={},A.m=C=[function(N,O,D){"use strict";D.r(O);var F={allowedTagList:["b","caption","cite","code","const","dd","del","div","dfn","dt","em","h1","h2","h3","h4","h5","h6","input","ins","kdb","label","li","option","output","p","q","s","sample","span","strong","td","th","u"]};Object.freeze(F.allowedTagList),Object.defineProperty(F,"allowedTagList",{configurable:!1,writable:!1}),F.keyCode={Backspace:8,Tab:9,Enter:13,Shift:16,Ctrl:17,Alt:18,Pause:19,CapsLock:20,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,LeftArrow:37,UpArrow:38,RightArrow:39,DownArrow:40,Insert:45,Delete:46,num0:48,num1:49,num2:50,num3:51,num4:52,num5:53,num6:54,num7:55,num8:56,num9:57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,OSLeft:91,OSRight:92,ContextMenu:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,MultiplyNumpad:106,PlusNumpad:107,MinusNumpad:109,DotNumpad:110,SlashNumpad:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NumLock:144,ScrollLock:145,HyphenFirefox:173,MyComputer:182,MyCalculator:183,Semicolon:186,Equal:187,Comma:188,Hyphen:189,Dot:190,Slash:191,Backquote:192,LeftBracket:219,Backslash:220,RightBracket:221,Quote:222,Command:224,AltGraph:225,AndroidDefault:229},Object.freeze(F.keyCode),Object.defineProperty(F,"keyCode",{configurable:!1,writable:!1}),F.fromCharCodeKeyCode={0:"LaunchCalculator",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",91:"OS",92:"OSRight",93:"ContextMenu",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",173:"-",182:"MyComputer",183:"MyCalculator",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Meta",225:"AltGraph"},Object.freeze(F.fromCharCodeKeyCode),Object.defineProperty(F,"fromCharCodeKeyCode",{configurable:!1,writable:!1}),F.keyName={Unidentified:"Unidentified",AndroidDefault:"AndroidDefault",Alt:"Alt",AltGr:"AltGraph",CapsLock:"CapsLock",Ctrl:"Control",Fn:"Fn",FnLock:"FnLock",Hyper:"Hyper",Meta:"Meta",OSLeft:"OS",OSRight:"OS",Command:"OS",NumLock:"NumLock",ScrollLock:"ScrollLock",Shift:"Shift",Super:"Super",Symbol:"Symbol",SymbolLock:"SymbolLock",Enter:"Enter",Tab:"Tab",Space:" ",LeftArrow:"ArrowLeft",UpArrow:"ArrowUp",RightArrow:"ArrowRight",DownArrow:"ArrowDown",End:"End",Home:"Home",PageUp:"PageUp",PageDown:"PageDown",Backspace:"Backspace",Clear:"Clear",Copy:"Copy",CrSel:"CrSel",Cut:"Cut",Delete:"Delete",EraseEof:"EraseEof",ExSel:"ExSel",Insert:"Insert",Paste:"Paste",Redo:"Redo",Undo:"Undo",Accept:"Accept",Again:"Again",Attn:"Attn",Cancel:"Cancel",ContextMenu:"ContextMenu",Esc:"Escape",Execute:"Execute",Find:"Find",Finish:"Finish",Help:"Help",Pause:"Pause",Play:"Play",Props:"Props",Select:"Select",ZoomIn:"ZoomIn",ZoomOut:"ZoomOut",BrightnessDown:"BrightnessDown",BrightnessUp:"BrightnessUp",Eject:"Eject",LogOff:"LogOff",Power:"Power",PowerOff:"PowerOff",PrintScreen:"PrintScreen",Hibernate:"Hibernate",Standby:"Standby",WakeUp:"WakeUp",Compose:"Compose",Dead:"Dead",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",Print:"Print",num0:"0",num1:"1",num2:"2",num3:"3",num4:"4",num5:"5",num6:"6",num7:"7",num8:"8",num9:"9",a:"a",b:"b",c:"c",d:"d",e:"e",f:"f",g:"g",h:"h",i:"i",j:"j",k:"k",l:"l",m:"m",n:"n",o:"o",p:"p",q:"q",r:"r",s:"s",t:"t",u:"u",v:"v",w:"w",x:"x",y:"y",z:"z",A:"A",B:"B",C:"C",D:"D",E:"E",F:"F",G:"G",H:"H",I:"I",J:"J",K:"K",L:"L",M:"M",N:"N",O:"O",P:"P",Q:"Q",R:"R",S:"S",T:"T",U:"U",V:"V",W:"W",X:"X",Y:"Y",Z:"Z",Semicolon:";",Equal:"=",Comma:",",Hyphen:"-",Minus:"-",Plus:"+",Dot:".",Slash:"/",Backquote:"`",LeftParenthesis:"(",RightParenthesis:")",LeftBracket:"[",RightBracket:"]",Backslash:"\\",Quote:"'",numpad0:"0",numpad1:"1",numpad2:"2",numpad3:"3",numpad4:"4",numpad5:"5",numpad6:"6",numpad7:"7",numpad8:"8",numpad9:"9",NumpadDot:".",NumpadDotAlt:",",NumpadMultiply:"*",NumpadPlus:"+",NumpadMinus:"-",NumpadSubtract:"-",NumpadSlash:"/",NumpadDotObsoleteBrowsers:"Decimal",NumpadMultiplyObsoleteBrowsers:"Multiply",NumpadPlusObsoleteBrowsers:"Add",NumpadMinusObsoleteBrowsers:"Subtract",NumpadSlashObsoleteBrowsers:"Divide",_allFnKeys:["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"],_someNonPrintableKeys:["Tab","Enter","Shift","ShiftLeft","ShiftRight","Control","ControlLeft","ControlRight","Alt","AltLeft","AltRight","Pause","CapsLock","Escape"],_directionKeys:["PageUp","PageDown","End","Home","ArrowDown","ArrowLeft","ArrowRight","ArrowUp"]},Object.freeze(F.keyName._allFnKeys),Object.freeze(F.keyName._someNonPrintableKeys),Object.freeze(F.keyName._directionKeys),Object.freeze(F.keyName),Object.defineProperty(F,"keyName",{configurable:!1,writable:!1}),Object.freeze(F);var v=F;function J(a){return function(s){if(Array.isArray(s))return B(s)}(a)||function(s){if(typeof Symbol<"u"&&Symbol.iterator in Object(s))return Array.from(s)}(a)||G(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(){return($=Object.assign||function(a){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var e in l)Object.prototype.hasOwnProperty.call(l,e)&&(a[e]=l[e])}return a}).apply(this,arguments)}function M(a,s){return function(l){if(Array.isArray(l))return l}(a)||function(l,e){if(typeof Symbol<"u"&&Symbol.iterator in Object(l)){var t=[],n=!0,o=!1,u=void 0;try{for(var r,g=l[Symbol.iterator]();!(n=(r=g.next()).done)&&(t.push(r.value),!e||t.length!==e);n=!0);}catch(d){o=!0,u=d}finally{try{n||null==g.return||g.return()}finally{if(o)throw u}}return t}}(a,s)||G(a,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(a,s){if(a){if("string"==typeof a)return B(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);return"Object"===l&&a.constructor&&(l=a.constructor.name),"Map"===l||"Set"===l?Array.from(l):"Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?B(a,s):void 0}}function B(a,s){(null==s||s>a.length)&&(s=a.length);for(var l=0,e=new Array(s);l<s;l++)e[l]=a[l];return e}function L(a){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(a)}var i=function(){function a(){!function(s){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}(this)}return function(s,l){for(var e=0;e<l.length;e++){var t=l[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(s,t.key,t)}}(a,[{key:"isNull",value:function(s){return null===s}},{key:"isUndefined",value:function(s){return void 0===s}},{key:"isUndefinedOrNullOrEmpty",value:function(s){return null==s||""===s}},{key:"isString",value:function(s){return"string"==typeof s||s instanceof String}},{key:"isEmptyString",value:function(s){return""===s}},{key:"isBoolean",value:function(s){return"boolean"==typeof s}},{key:"isTrueOrFalseString",value:function(s){var l=String(s).toLowerCase();return"true"===l||"false"===l}},{key:"isObject",value:function(s){return"object"===L(s)&&null!==s&&!Array.isArray(s)}},{key:"isEmptyObj",value:function(s){for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l))return!1;return!0}},{key:"isNumberStrict",value:function(s){return"number"==typeof s}},{key:"isNumber",value:function(s){return!this.isArray(s)&&!isNaN(parseFloat(s))&&isFinite(s)}},{key:"isDigit",value:function(s){return/\d/.test(s)}},{key:"isNumberOrArabic",value:function(s){var l=this.arabicToLatinNumbers(s,!1,!0,!0);return this.isNumber(l)}},{key:"isInt",value:function(s){return"number"==typeof s&&parseFloat(s)===parseInt(s,10)&&!isNaN(s)}},{key:"isFunction",value:function(s){return"function"==typeof s}},{key:"isIE11",value:function(){return typeof window<"u"&&!!window.MSInputMethodContext&&!!document.documentMode}},{key:"contains",value:function(s,l){return!(!this.isString(s)||!this.isString(l)||""===s||""===l)&&-1!==s.indexOf(l)}},{key:"isInArray",value:function(s,l){return!(!this.isArray(l)||l===[]||this.isUndefined(s))&&-1!==l.indexOf(s)}},{key:"isArray",value:function(s){if("[object Array]"===Object.prototype.toString.call([]))return Array.isArray(s)||"object"===L(s)&&"[object Array]"===Object.prototype.toString.call(s);throw new Error("toString message changed for Object Array")}},{key:"isElement",value:function(s){return typeof Element<"u"&&s instanceof Element}},{key:"isInputElement",value:function(s){return this.isElement(s)&&"input"===s.tagName.toLowerCase()}},{key:"decimalPlaces",value:function(s){var l=M(s.split("."),2)[1];return this.isUndefined(l)?0:l.length}},{key:"indexFirstNonZeroDecimalPlace",value:function(s){var l=M(String(Math.abs(s)).split("."),2)[1];if(this.isUndefined(l))return 0;var e=l.lastIndexOf("0");return-1===e?e=0:e+=2,e}},{key:"keyCodeNumber",value:function(s){return void 0===s.which?s.keyCode:s.which}},{key:"character",value:function(s){var l;if("Unidentified"===s.key||void 0===s.key||this.isSeleniumBot()){var e=this.keyCodeNumber(s);if(e===v.keyCode.AndroidDefault)return v.keyName.AndroidDefault;var t=v.fromCharCodeKeyCode[e];l=a.isUndefinedOrNullOrEmpty(t)?String.fromCharCode(e):t}else{var n;switch(s.key){case"Add":l=v.keyName.NumpadPlus;break;case"Apps":l=v.keyName.ContextMenu;break;case"Crsel":l=v.keyName.CrSel;break;case"Decimal":l=s.char?s.char:v.keyName.NumpadDot;break;case"Del":l="firefox"===(n=this.browser()).name&&n.version<=36||"ie"===n.name&&n.version<=9?v.keyName.Dot:v.keyName.Delete;break;case"Divide":l=v.keyName.NumpadSlash;break;case"Down":l=v.keyName.DownArrow;break;case"Esc":l=v.keyName.Esc;break;case"Exsel":l=v.keyName.ExSel;break;case"Left":l=v.keyName.LeftArrow;break;case"Meta":case"Super":l=v.keyName.OSLeft;break;case"Multiply":l=v.keyName.NumpadMultiply;break;case"Right":l=v.keyName.RightArrow;break;case"Spacebar":l=v.keyName.Space;break;case"Subtract":l=v.keyName.NumpadMinus;break;case"Up":l=v.keyName.UpArrow;break;default:l=s.key}}return l}},{key:"browser",value:function(){var s,l=navigator.userAgent,e=l.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(e[1])?{name:"ie",version:(s=/\brv[ :]+(\d+)/g.exec(l)||[])[1]||""}:"Chrome"===e[1]&&null!==(s=l.match(/\b(OPR|Edge)\/(\d+)/))?{name:s[1].replace("OPR","opera"),version:s[2]}:(e=e[2]?[e[1],e[2]]:[navigator.appName,navigator.appVersion,"-?"],null!==(s=l.match(/version\/(\d+)/i))&&e.splice(1,1,s[1]),{name:e[0].toLowerCase(),version:e[1]})}},{key:"isSeleniumBot",value:function(){return!0===window.navigator.webdriver}},{key:"isNegative",value:function(s,l,e){var t=1<arguments.length&&void 0!==l?l:"-",n=!(2<arguments.length&&void 0!==e)||e;return s===t||""!==s&&(a.isNumber(s)?s<0:n?this.contains(s,t):this.isNegativeStrict(s,t))}},{key:"isNegativeStrict",value:function(s,l){var e=1<arguments.length&&void 0!==l?l:"-";return s.charAt(0)===e}},{key:"isNegativeWithBrackets",value:function(s,l,e){return s.charAt(0)===l&&this.contains(s,e)}},{key:"isZeroOrHasNoValue",value:function(s){return!/[1-9]/g.test(s)}},{key:"setRawNegativeSign",value:function(s){return this.isNegativeStrict(s,"-")?s:"-".concat(s)}},{key:"replaceCharAt",value:function(s,l,e){return"".concat(s.substr(0,l)).concat(e).concat(s.substr(l+e.length))}},{key:"clampToRangeLimits",value:function(s,l){return Math.max(l.minimumValue,Math.min(l.maximumValue,s))}},{key:"countNumberCharactersOnTheCaretLeftSide",value:function(s,l,e){for(var t=new RegExp("[0-9".concat(e,"-]")),n=0,o=0;o<l;o++)t.test(s[o])&&n++;return n}},{key:"findCaretPositionInFormattedNumber",value:function(s,l,e,t){var n,o=e.length,u=s.length,r=0;for(n=0;n<o&&r<u&&r<l;n++)(s[r]===e[n]||"."===s[r]&&e[n]===t)&&r++;return n}},{key:"countCharInText",value:function(s,l){for(var e=0,t=0;t<l.length;t++)l[t]===s&&e++;return e}},{key:"convertCharacterCountToIndexPosition",value:function(s){return Math.max(s,s-1)}},{key:"getElementSelection",value:function(s){var l,e={};try{l=this.isUndefined(s.selectionStart)}catch{l=!1}try{if(l){var t=window.getSelection().getRangeAt(0);e.start=t.startOffset,e.end=t.endOffset,e.length=e.end-e.start}else e.start=s.selectionStart,e.end=s.selectionEnd,e.length=e.end-e.start}catch{e.start=0,e.end=0,e.length=0}return e}},{key:"setElementSelection",value:function(s,l,e){var t=2<arguments.length&&void 0!==e?e:null;if(this.isUndefinedOrNullOrEmpty(t)&&(t=l),this.isInputElement(s))s.setSelectionRange(l,t);else if(!a.isNull(s.firstChild)){var n=document.createRange();n.setStart(s.firstChild,l),n.setEnd(s.firstChild,t);var o=window.getSelection();o.removeAllRanges(),o.addRange(n)}}},{key:"throwError",value:function(s){throw new Error(s)}},{key:"warning",value:function(s,l){1<arguments.length&&void 0!==l&&!l||console.warn("Warning: ".concat(s))}},{key:"isWheelUpEvent",value:function(s){return s.deltaY||this.throwError("The event passed as a parameter is not a valid wheel event, '".concat(s.type,"' given.")),s.deltaY<0}},{key:"isWheelDownEvent",value:function(s){return s.deltaY||this.throwError("The event passed as a parameter is not a valid wheel event, '".concat(s.type,"' given.")),0<s.deltaY}},{key:"forceDecimalPlaces",value:function(s,l){var e=M(String(s).split("."),2),n=e[1];return n?"".concat(e[0],".").concat(n.substr(0,l)):s}},{key:"roundToNearest",value:function(s,l){var e=1<arguments.length&&void 0!==l?l:1e3;return 0===s?0:(0===e&&this.throwError("The `stepPlace` used to round is equal to `0`. This value must not be equal to zero."),Math.round(s/e)*e)}},{key:"modifyAndRoundToNearestAuto",value:function(s,l,e){s=Number(this.forceDecimalPlaces(s,e));var t=Math.abs(s);if(0<=t&&t<1){var n,o=Math.pow(10,-e);if(0===s)return l?o:-o;var r=e,g=this.indexFirstNonZeroDecimalPlace(s);return n=r-1<=g?o:Math.pow(10,-(g+1)),this.roundToNearest(l?s+n:s-n,n)}s=parseInt(s,10);var d,b=Math.abs(s).toString().length;switch(b){case 1:d=0;break;case 2:case 3:d=1;break;case 4:case 5:d=2;break;default:d=b-3}var c,f=Math.pow(10,d);return(c=l?s+f:s-f)<=10&&-10<=c?c:this.roundToNearest(c,f)}},{key:"addAndRoundToNearestAuto",value:function(s,l){return this.modifyAndRoundToNearestAuto(s,!0,l)}},{key:"subtractAndRoundToNearestAuto",value:function(s,l){return this.modifyAndRoundToNearestAuto(s,!1,l)}},{key:"arabicToLatinNumbers",value:function(s,l,e,t){var n=!(1<arguments.length&&void 0!==l)||l,o=2<arguments.length&&void 0!==e&&e,u=3<arguments.length&&void 0!==t&&t;if(this.isNull(s))return s;var r=s.toString();if(""===r)return s;if(null===r.match(/[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u06f4\u06f5\u06f6]/g))return n&&(r=Number(r)),r;o&&(r=r.replace(/\u066b/,".")),u&&(r=r.replace(/\u066c/g,"")),r=r.replace(/[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669]/g,function(d){return d.charCodeAt(0)-1632}).replace(/[\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9]/g,function(d){return d.charCodeAt(0)-1776});var g=Number(r);return isNaN(g)?g:(n&&(r=g),r)}},{key:"triggerEvent",value:function(s,l,e,t,n){var o,u=1<arguments.length&&void 0!==l?l:document,r=2<arguments.length&&void 0!==e?e:null,g=!(3<arguments.length&&void 0!==t)||t,d=!(4<arguments.length&&void 0!==n)||n;window.CustomEvent?o=new CustomEvent(s,{detail:r,bubbles:g,cancelable:d}):(o=document.createEvent("CustomEvent")).initCustomEvent(s,g,d,{detail:r}),u.dispatchEvent(o)}},{key:"parseStr",value:function(s){var l,e,t,n,o={};if(0===s&&1/s<0&&(s="-0"),s=s.toString(),this.isNegativeStrict(s,"-")?(s=s.slice(1),o.s=-1):o.s=1,-1<(l=s.indexOf("."))&&(s=s.replace(".","")),l<0&&(l=s.length),(e=-1===s.search(/[1-9]/i)?s.length:s.search(/[1-9]/i))===(t=s.length))o.e=0,o.c=[0];else{for(n=t-1;"0"===s.charAt(n);--n)--t;for(--t,o.e=l-e-1,o.c=[],l=0;e<=t;e+=1)o.c[l]=+s.charAt(e),l+=1}return o}},{key:"testMinMax",value:function(s,l){var e=l.c,t=s.c,n=l.s,o=s.s,u=l.e,r=s.e;if(!e[0]||!t[0])return e[0]?n:t[0]?-o:0;if(n!==o)return n;var g=n<0;if(u!==r)return r<u^g?1:-1;for(n=-1,o=(u=e.length)<(r=t.length)?u:r,n+=1;n<o;n+=1)if(e[n]!==t[n])return e[n]>t[n]^g?1:-1;return u===r?0:r<u^g?1:-1}},{key:"randomString",value:function(s){var l=0<arguments.length&&void 0!==s?s:5;return Math.random().toString(36).substr(2,l)}},{key:"domElement",value:function(s){return a.isString(s)?document.querySelector(s):s}},{key:"getElementValue",value:function(s){return"input"===s.tagName.toLowerCase()?s.value:this.text(s)}},{key:"setElementValue",value:function(s,l){var e=1<arguments.length&&void 0!==l?l:null;"input"===s.tagName.toLowerCase()?s.value=e:s.textContent=e}},{key:"setInvalidState",value:function(s,l){var e=1<arguments.length&&void 0!==l?l:"Invalid";""!==e&&!this.isNull(e)||this.throwError("Cannot set the invalid state with an empty message."),s.setCustomValidity(e)}},{key:"setValidState",value:function(s){s.setCustomValidity("")}},{key:"cloneObject",value:function(s){return $({},s)}},{key:"camelize",value:function(s,l,e,t){var n=1<arguments.length&&void 0!==l?l:"-",o=!(2<arguments.length&&void 0!==e)||e,u=!(3<arguments.length&&void 0!==t)||t;if(this.isNull(s))return null;o&&(s=s.replace(/^data-/,""));var r=s.split(n).map(function(g){return"".concat(g.charAt(0).toUpperCase()).concat(g.slice(1))});return r=r.join(""),u&&(r="".concat(r.charAt(0).toLowerCase()).concat(r.slice(1))),r}},{key:"text",value:function(s){var l=s.nodeType;return l===Node.ELEMENT_NODE||l===Node.DOCUMENT_NODE||l===Node.DOCUMENT_FRAGMENT_NODE?s.textContent:l===Node.TEXT_NODE?s.nodeValue:""}},{key:"setText",value:function(s,l){var e=s.nodeType;e!==Node.ELEMENT_NODE&&e!==Node.DOCUMENT_NODE&&e!==Node.DOCUMENT_FRAGMENT_NODE||(s.textContent=l)}},{key:"filterOut",value:function(s,l){var e=this;return s.filter(function(t){return!e.isInArray(t,l)})}},{key:"trimPaddedZerosFromDecimalPlaces",value:function(s){if(""===(s=String(s)))return"";var l=M(s.split("."),2),e=l[0],t=l[1];if(this.isUndefinedOrNullOrEmpty(t))return e;var n=t.replace(/0+$/g,"");return""===n?e:"".concat(e,".").concat(n)}},{key:"getHoveredElement",value:function(){var s=J(document.querySelectorAll(":hover"));return s[s.length-1]}},{key:"arrayTrim",value:function(s,l){var e=s.length;return 0===e||e<l?s:l<0?[]:(s.length=parseInt(l,10),s)}},{key:"arrayUnique",value:function(){var s;return J(new Set((s=[]).concat.apply(s,arguments)))}},{key:"mergeMaps",value:function(){for(var s=arguments.length,l=new Array(s),e=0;e<s;e++)l[e]=arguments[e];return new Map(l.reduce(function(t,n){return t.concat(J(n))},[]))}},{key:"objectKeyLookup",value:function(s,l){var e=Object.entries(s).find(function(n){return n[1]===l}),t=null;return void 0!==e&&(t=e[0]),t}},{key:"insertAt",value:function(s,l,e){if(e>(s=String(s)).length)throw new Error("The given index is out of the string range.");if(1!==l.length)throw new Error("The given string `char` should be only one character long.");return""===s&&0===e?l:"".concat(s.slice(0,e)).concat(l).concat(s.slice(e))}},{key:"scientificToDecimal",value:function(s){var l=Number(s);if(isNaN(l))return NaN;if(s=String(s),!this.contains(s,"e")&&!this.contains(s,"E"))return s;var e=M(s.split(/e/i),2),t=e[0],n=e[1],o=t<0;o&&(t=t.replace("-",""));var u=+n<0;u&&(n=n.replace("-",""));var r,g=M(t.split(/\./),2),d=g[0],b=g[1];return r=u?(r=d.length>n?this.insertAt(d,".",d.length-n):"0.".concat("0".repeat(n-d.length)).concat(d),"".concat(r).concat(b||"")):b?(t="".concat(d).concat(b),n<b.length?this.insertAt(t,".",+n+d.length):"".concat(t).concat("0".repeat(n-b.length))):(t=t.replace(".",""),"".concat(t).concat("0".repeat(Number(n)))),o&&(r="-".concat(r)),r}}]),a}(),x=function(){function a(s){if(function(l){if(!(l instanceof a))throw new TypeError("Cannot call a class as a function")}(this),null===s)throw new Error("Invalid AST")}return function(s,l){for(var e=0;e<l.length;e++){var t=l[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(s,t.key,t)}}(a.prototype,[{key:"evaluate",value:function(s){if(null==s)throw new Error("Invalid AST sub-tree");if("number"===s.type)return s.value;if("unaryMinus"===s.type)return-this.evaluate(s.left);var l=this.evaluate(s.left),e=this.evaluate(s.right);switch(s.type){case"op_+":return Number(l)+Number(e);case"op_-":return l-e;case"op_*":return l*e;case"op_/":return l/e;default:throw new Error("Invalid operator '".concat(s.type,"'"))}}}]),a}(),T=function(){function a(){!function(s){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}(this)}return function(s,l){for(var e=0;e<l.length;e++){var t=l[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(s,t.key,t)}}(a,[{key:"createNode",value:function(s,l,e){var t=new a;return t.type=s,t.left=l,t.right=e,t}},{key:"createUnaryNode",value:function(s){var l=new a;return l.type="unaryMinus",l.left=s,l.right=null,l}},{key:"createLeaf",value:function(s){var l=new a;return l.type="number",l.value=s,l}}]),a}();function K(a,s,l){(function(e){if(!(e instanceof K))throw new TypeError("Cannot call a class as a function")})(this),this.type=a,this.value=s,this.symbol=l}var se=function(){function a(s){(function(l){if(!(l instanceof a))throw new TypeError("Cannot call a class as a function")})(this),this.text=s,this.textLength=s.length,this.index=0,this.token=new K("Error",0,0)}return function(s,l){for(var e=0;e<l.length;e++){var t=l[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(s,t.key,t)}}(a.prototype,[{key:"_skipSpaces",value:function(){for(;" "===this.text[this.index]&&this.index<=this.textLength;)this.index++}},{key:"getIndex",value:function(){return this.index}},{key:"getNextToken",value:function(s){var l=0<arguments.length&&void 0!==s?s:".";if(this._skipSpaces(),this.textLength===this.index)return this.token.type="EOT",this.token;if(i.isDigit(this.text[this.index]))return this.token.type="num",this.token.value=this._getNumber(l),this.token;switch(this.token.type="Error",this.text[this.index]){case"+":this.token.type="+";break;case"-":this.token.type="-";break;case"*":this.token.type="*";break;case"/":this.token.type="/";break;case"(":this.token.type="(";break;case")":this.token.type=")"}if("Error"===this.token.type)throw new Error("Unexpected token '".concat(this.token.symbol,"' at position '").concat(this.token.index,"' in the token function"));return this.token.symbol=this.text[this.index],this.index++,this.token}},{key:"_getNumber",value:function(s){this._skipSpaces();for(var l=this.index;this.index<=this.textLength&&i.isDigit(this.text[this.index]);)this.index++;for(this.text[this.index]===s&&this.index++;this.index<=this.textLength&&i.isDigit(this.text[this.index]);)this.index++;if(this.index===l)throw new Error("No number has been found while it was expected");return this.text.substring(l,this.index).replace(s,".")}}]),a}(),fe=function(){function a(s){var l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:".";return function(e){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this),this.text=s,this.decimalCharacter=l,this.lexer=new se(s),this.token=this.lexer.getNextToken(this.decimalCharacter),this._exp()}return function(s,l){for(var e=0;e<l.length;e++){var t=l[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(s,t.key,t)}}(a.prototype,[{key:"_exp",value:function(){var s=this._term(),l=this._moreExp();return T.createNode("op_+",s,l)}},{key:"_moreExp",value:function(){var s,l;switch(this.token.type){case"+":return this.token=this.lexer.getNextToken(this.decimalCharacter),s=this._term(),l=this._moreExp(),T.createNode("op_+",l,s);case"-":return this.token=this.lexer.getNextToken(this.decimalCharacter),s=this._term(),l=this._moreExp(),T.createNode("op_-",l,s)}return T.createLeaf(0)}},{key:"_term",value:function(){var s=this._factor(),l=this._moreTerms();return T.createNode("op_*",s,l)}},{key:"_moreTerms",value:function(){var s,l;switch(this.token.type){case"*":return this.token=this.lexer.getNextToken(this.decimalCharacter),s=this._factor(),l=this._moreTerms(),T.createNode("op_*",l,s);case"/":return this.token=this.lexer.getNextToken(this.decimalCharacter),s=this._factor(),l=this._moreTerms(),T.createNode("op_/",l,s)}return T.createLeaf(1)}},{key:"_factor",value:function(){var s,l,e;switch(this.token.type){case"num":return e=this.token.value,this.token=this.lexer.getNextToken(this.decimalCharacter),T.createLeaf(e);case"-":return this.token=this.lexer.getNextToken(this.decimalCharacter),l=this._factor(),T.createUnaryNode(l);case"(":return this.token=this.lexer.getNextToken(this.decimalCharacter),s=this._exp(),this._match(")"),s;default:throw new Error("Unexpected token '".concat(this.token.symbol,"' with type '").concat(this.token.type,"' at position '").concat(this.token.index,"' in the factor function"))}}},{key:"_match",value:function(s){var l=this.lexer.getIndex()-1;if(this.text[l]!==s)throw new Error("Unexpected token '".concat(this.token.symbol,"' at position '").concat(l,"' in the match function"));this.token=this.lexer.getNextToken(this.decimalCharacter)}}]),a}();function ie(a){return function(s){if(Array.isArray(s))return oe(s)}(a)||function(s){if(typeof Symbol<"u"&&Symbol.iterator in Object(s))return Array.from(s)}(a)||le(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(a,s){return function(l){if(Array.isArray(l))return l}(a)||function(l,e){if(typeof Symbol<"u"&&Symbol.iterator in Object(l)){var t=[],n=!0,o=!1,u=void 0;try{for(var r,g=l[Symbol.iterator]();!(n=(r=g.next()).done)&&(t.push(r.value),!e||t.length!==e);n=!0);}catch(d){o=!0,u=d}finally{try{n||null==g.return||g.return()}finally{if(o)throw u}}return t}}(a,s)||le(a,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(a,s){if(a){if("string"==typeof a)return oe(a,s);var l=Object.prototype.toString.call(a).slice(8,-1);return"Object"===l&&a.constructor&&(l=a.constructor.name),"Map"===l||"Set"===l?Array.from(l):"Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?oe(a,s):void 0}}function oe(a,s){(null==s||s>a.length)&&(s=a.length);for(var l=0,e=new Array(s);l<s;l++)e[l]=a[l];return e}function Z(){return(Z=Object.assign||function(a){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var e in l)Object.prototype.hasOwnProperty.call(l,e)&&(a[e]=l[e])}return a}).apply(this,arguments)}function H(a){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(a)}function ue(a,s){for(var l=0;l<s.length;l++){var e=s[l];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(a,e.key,e)}}var W,m=function(){function a(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;!function(c){if(!(c instanceof a))throw new TypeError("Cannot call a class as a function")}(this);var u=a._setArgumentsValues(t,n,o),g=u.initialValue,d=u.userOptions;if(this.domElement=u.domElement,this.defaultRawValue="",this._setSettings(d,!1),this._checkElement(),this.savedCancellableValue=null,this.historyTable=[],this.historyTableIndex=-1,this.onGoingRedo=!1,this.parentForm=this._getParentForm(),!this.runOnce&&this.settings.formatOnPageLoad)this._formatDefaultValueOnPageLoad(g);else{var b;if(i.isNull(g))switch(this.settings.emptyInputBehavior){case a.options.emptyInputBehavior.min:b=this.settings.minimumValue;break;case a.options.emptyInputBehavior.max:b=this.settings.maximumValue;break;case a.options.emptyInputBehavior.zero:b="0";break;case a.options.emptyInputBehavior.focus:case a.options.emptyInputBehavior.press:case a.options.emptyInputBehavior.always:case a.options.emptyInputBehavior.null:b="";break;default:b=this.settings.emptyInputBehavior}else b=g;this._setElementAndRawValue(b)}this.runOnce=!0,this.hasEventListeners=!1,(this.isInputElement||this.isContentEditable)&&(this.settings.noEventListeners||this._createEventListeners(),this._setWritePermissions(!0)),this._saveInitialValues(g),this.sessionStorageAvailable=this.constructor._storageTest(),this.storageNamePrefix="AUTO_",this._setPersistentStorageName(),this.validState=!0,this.isFocused=!1,this.isWheelEvent=!1,this.isDropEvent=!1,this.isEditing=!1,this.rawValueOnFocus=void 0,this.internalModification=!1,this.attributeToWatch=this._getAttributeToWatch(),this.getterSetter=Object.getOwnPropertyDescriptor(this.domElement.__proto__,this.attributeToWatch),this._addWatcher(),this.settings.createLocalList&&this._createLocalList(),this.constructor._addToGlobalList(this),this.global={set:function(c,f){var p=1<arguments.length&&void 0!==f?f:null;e.autoNumericLocalList.forEach(function(y){y.set(c,p)})},setUnformatted:function(c,f){var p=1<arguments.length&&void 0!==f?f:null;e.autoNumericLocalList.forEach(function(y){y.setUnformatted(c,p)})},get:function(c){var f=0<arguments.length&&void 0!==c?c:null,p=[];return e.autoNumericLocalList.forEach(function(y){p.push(y.get())}),e._executeCallback(p,f),p},getNumericString:function(c){var f=0<arguments.length&&void 0!==c?c:null,p=[];return e.autoNumericLocalList.forEach(function(y){p.push(y.getNumericString())}),e._executeCallback(p,f),p},getFormatted:function(c){var f=0<arguments.length&&void 0!==c?c:null,p=[];return e.autoNumericLocalList.forEach(function(y){p.push(y.getFormatted())}),e._executeCallback(p,f),p},getNumber:function(c){var f=0<arguments.length&&void 0!==c?c:null,p=[];return e.autoNumericLocalList.forEach(function(y){p.push(y.getNumber())}),e._executeCallback(p,f),p},getLocalized:function(c){var f=0<arguments.length&&void 0!==c?c:null,p=[];return e.autoNumericLocalList.forEach(function(y){p.push(y.getLocalized())}),e._executeCallback(p,f),p},reformat:function(){e.autoNumericLocalList.forEach(function(c){c.reformat()})},unformat:function(){e.autoNumericLocalList.forEach(function(c){c.unformat()})},unformatLocalized:function(c){var f=0<arguments.length&&void 0!==c?c:null;e.autoNumericLocalList.forEach(function(p){p.unformatLocalized(f)})},update:function(){for(var c=arguments.length,f=new Array(c),p=0;p<c;p++)f[p]=arguments[p];e.autoNumericLocalList.forEach(function(y){y.update.apply(y,f)})},isPristine:function(){var c=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],f=!0;return e.autoNumericLocalList.forEach(function(p){f&&!p.isPristine(c)&&(f=!1)}),f},clear:function(c){var f=0<arguments.length&&void 0!==c&&c;e.autoNumericLocalList.forEach(function(p){p.clear(f)})},remove:function(){e.autoNumericLocalList.forEach(function(c){c.remove()})},wipe:function(){e.autoNumericLocalList.forEach(function(c){c.wipe()})},nuke:function(){e.autoNumericLocalList.forEach(function(c){c.nuke()})},has:function(c){return e.autoNumericLocalList.has(c instanceof a?c.node():c)},addObject:function(c){var f,p;p=c instanceof a?(f=c.node(),c):a.getAutoNumericElement(f=c),e._hasLocalList()||e._createLocalList();var y,w=p._getLocalList();0===w.size&&(p._createLocalList(),w=p._getLocalList()),(y=w instanceof Map?i.mergeMaps(e._getLocalList(),w):(e._addToLocalList(f,p),e._getLocalList())).forEach(function(_){_._setLocalList(y)})},removeObject:function(c,f){var p,y,w=1<arguments.length&&void 0!==f&&f;y=c instanceof a?(p=c.node(),c):a.getAutoNumericElement(p=c);var _=e.autoNumericLocalList;e.autoNumericLocalList.delete(p),_.forEach(function(I){I._setLocalList(e.autoNumericLocalList)}),w||p!==e.node()?y._createLocalList():y._setLocalList(new Map)},empty:function(c){var f=0<arguments.length&&void 0!==c&&c;e.autoNumericLocalList.forEach(function(p){f?p._createLocalList():p._setLocalList(new Map)})},elements:function(){var c=[];return e.autoNumericLocalList.forEach(function(f){c.push(f.node())}),c},getList:function(){return e.autoNumericLocalList},size:function(){return e.autoNumericLocalList.size}},this.options={reset:function(){return e.settings={rawValue:e.defaultRawValue},e.update(a.defaultSettings),e},allowDecimalPadding:function(c){return e.update({allowDecimalPadding:c}),e},alwaysAllowDecimalCharacter:function(c){return e.update({alwaysAllowDecimalCharacter:c}),e},caretPositionOnFocus:function(c){return e.settings.caretPositionOnFocus=c,e},createLocalList:function(c){return e.settings.createLocalList=c,e.settings.createLocalList?e._hasLocalList()||e._createLocalList():e._deleteLocalList(),e},currencySymbol:function(c){return e.update({currencySymbol:c}),e},currencySymbolPlacement:function(c){return e.update({currencySymbolPlacement:c}),e},decimalCharacter:function(c){return e.update({decimalCharacter:c}),e},decimalCharacterAlternative:function(c){return e.settings.decimalCharacterAlternative=c,e},decimalPlaces:function(c){return i.warning("Using `options.decimalPlaces()` instead of calling the specific `options.decimalPlacesRawValue()`, `options.decimalPlacesShownOnFocus()` and `options.decimalPlacesShownOnBlur()` methods will reset those options.\nPlease call the specific methods if you do not want to reset those.",e.settings.showWarnings),e.update({decimalPlaces:c}),e},decimalPlacesRawValue:function(c){return e.update({decimalPlacesRawValue:c}),e},decimalPlacesShownOnBlur:function(c){return e.update({decimalPlacesShownOnBlur:c}),e},decimalPlacesShownOnFocus:function(c){return e.update({decimalPlacesShownOnFocus:c}),e},defaultValueOverride:function(c){return e.update({defaultValueOverride:c}),e},digitalGroupSpacing:function(c){return e.update({digitalGroupSpacing:c}),e},digitGroupSeparator:function(c){return e.update({digitGroupSeparator:c}),e},divisorWhenUnfocused:function(c){return e.update({divisorWhenUnfocused:c}),e},emptyInputBehavior:function(c){return null===e.rawValue&&c!==a.options.emptyInputBehavior.null&&(i.warning("You are trying to modify the `emptyInputBehavior` option to something different than `'null'` (".concat(c,"), but the element raw value is currently set to `null`. This would result in an invalid `rawValue`. In order to fix that, the element value has been changed to the empty string `''`."),e.settings.showWarnings),e.rawValue=""),e.update({emptyInputBehavior:c}),e},eventBubbles:function(c){return e.settings.eventBubbles=c,e},eventIsCancelable:function(c){return e.settings.eventIsCancelable=c,e},failOnUnknownOption:function(c){return e.settings.failOnUnknownOption=c,e},formatOnPageLoad:function(c){return e.settings.formatOnPageLoad=c,e},formulaMode:function(c){return e.settings.formulaMode=c,e},historySize:function(c){return e.settings.historySize=c,e},invalidClass:function(c){return e.settings.invalidClass=c,e},isCancellable:function(c){return e.settings.isCancellable=c,e},leadingZero:function(c){return e.update({leadingZero:c}),e},maximumValue:function(c){return e.update({maximumValue:c}),e},minimumValue:function(c){return e.update({minimumValue:c}),e},modifyValueOnWheel:function(c){return e.settings.modifyValueOnWheel=c,e},negativeBracketsTypeOnBlur:function(c){return e.update({negativeBracketsTypeOnBlur:c}),e},negativePositiveSignPlacement:function(c){return e.update({negativePositiveSignPlacement:c}),e},negativeSignCharacter:function(c){return e.update({negativeSignCharacter:c}),e},noEventListeners:function(c){return c===a.options.noEventListeners.noEvents&&e.settings.noEventListeners===a.options.noEventListeners.addEvents&&e._removeEventListeners(),e.update({noEventListeners:c}),e},onInvalidPaste:function(c){return e.settings.onInvalidPaste=c,e},outputFormat:function(c){return e.settings.outputFormat=c,e},overrideMinMaxLimits:function(c){return e.update({overrideMinMaxLimits:c}),e},positiveSignCharacter:function(c){return e.update({positiveSignCharacter:c}),e},rawValueDivisor:function(c){return e.update({rawValueDivisor:c}),e},readOnly:function(c){return e.settings.readOnly=c,e._setWritePermissions(),e},roundingMethod:function(c){return e.update({roundingMethod:c}),e},saveValueToSessionStorage:function(c){return e.update({saveValueToSessionStorage:c}),e},symbolWhenUnfocused:function(c){return e.update({symbolWhenUnfocused:c}),e},selectNumberOnly:function(c){return e.settings.selectNumberOnly=c,e},selectOnFocus:function(c){return e.settings.selectOnFocus=c,e},serializeSpaces:function(c){return e.settings.serializeSpaces=c,e},showOnlyNumbersOnFocus:function(c){return e.update({showOnlyNumbersOnFocus:c}),e},showPositiveSign:function(c){return e.update({showPositiveSign:c}),e},showWarnings:function(c){return e.settings.showWarnings=c,e},styleRules:function(c){return e.update({styleRules:c}),e},suffixText:function(c){return e.update({suffixText:c}),e},unformatOnHover:function(c){return e.settings.unformatOnHover=c,e},unformatOnSubmit:function(c){return e.settings.unformatOnSubmit=c,e},valuesToStrings:function(c){return e.update({valuesToStrings:c}),e},watchExternalChanges:function(c){return e.update({watchExternalChanges:c}),e},wheelOn:function(c){return e.settings.wheelOn=c,e},wheelStep:function(c){return e.settings.wheelStep=c,e}},this._triggerEvent(a.events.initialized,this.domElement,{newValue:i.getElementValue(this.domElement),newRawValue:this.rawValue,error:null,aNElement:this})}var s,l;return l=[{key:"version",value:function(){return"4.6.0"}},{key:"_setArgumentsValues",value:function(e,t,n){i.isNull(e)&&i.throwError("At least one valid parameter is needed in order to initialize an AutoNumeric object");var o,u,r,g=i.isElement(e),d=i.isString(e),b=i.isObject(t),c=Array.isArray(t)&&0<t.length,f=i.isNumberOrArabic(t)||""===t,p=this._isPreDefinedOptionValid(t),y=i.isNull(t),w=i.isEmptyString(t),_=i.isObject(n),I=Array.isArray(n)&&0<n.length,U=i.isNull(n),z=this._isPreDefinedOptionValid(n);return g&&y&&U?(o=e,u=r=null):g&&f&&U?(o=e,r=t,u=null):g&&b&&U?(o=e,r=null,u=t):g&&p&&U?(o=e,r=null,u=this._getOptionObject(t)):g&&c&&U?(o=e,r=null,u=this.mergeOptions(t)):g&&(y||w)&&_?(o=e,r=null,u=n):g&&(y||w)&&I?(o=e,r=null,u=this.mergeOptions(n)):d&&y&&U?(o=document.querySelector(e),u=r=null):d&&b&&U?(o=document.querySelector(e),r=null,u=t):d&&p&&U?(o=document.querySelector(e),r=null,u=this._getOptionObject(t)):d&&c&&U?(o=document.querySelector(e),r=null,u=this.mergeOptions(t)):d&&(y||w)&&_?(o=document.querySelector(e),r=null,u=n):d&&(y||w)&&I?(o=document.querySelector(e),r=null,u=this.mergeOptions(n)):d&&f&&U?(o=document.querySelector(e),r=t,u=null):d&&f&&_?(o=document.querySelector(e),r=t,u=n):d&&f&&z?(o=document.querySelector(e),r=t,u=this._getOptionObject(n)):d&&f&&I?(o=document.querySelector(e),r=t,u=this.mergeOptions(n)):g&&f&&_?(o=e,r=t,u=n):g&&f&&z?(o=e,r=t,u=this._getOptionObject(n)):g&&f&&I?(o=e,r=t,u=this.mergeOptions(n)):i.throwError("The parameters given to the AutoNumeric object are not valid, '".concat(e,"', '").concat(t,"' and '").concat(n,"' given.")),i.isNull(o)&&i.throwError("The selector '".concat(e,"' did not select any valid DOM element. Please check on which element you called AutoNumeric.")),{domElement:o,initialValue:r,userOptions:u}}},{key:"mergeOptions",value:function(e){var t=this,n={};return e.forEach(function(o){Z(n,t._getOptionObject(o))}),n}},{key:"_isPreDefinedOptionValid",value:function(e){return Object.prototype.hasOwnProperty.call(a.predefinedOptions,e)}},{key:"_getOptionObject",value:function(e){var t;return i.isString(e)?null==(t=a.getPredefinedOptions()[e])&&i.warning("The given pre-defined option [".concat(e,"] is not recognized by autoNumeric. Please check that pre-defined option name."),!0):t=e,t}},{key:"_doesFormHandlerListExists",value:function(){var e=H(window.aNFormHandlerMap);return"undefined"!==e&&"object"===e}},{key:"_createFormHandlerList",value:function(){window.aNFormHandlerMap=new Map}},{key:"_checkValuesToStringsArray",value:function(e,t){return i.isInArray(String(e),t)}},{key:"_checkValuesToStringsSettings",value:function(e,t){return this._checkValuesToStringsArray(e,Object.keys(t.valuesToStrings))}},{key:"_checkStringsToValuesSettings",value:function(e,t){return this._checkValuesToStringsArray(e,Object.values(t.valuesToStrings))}},{key:"_unformatAltHovered",value:function(e){e.hoveredWithAlt=!0,e.unformat()}},{key:"_reformatAltHovered",value:function(e){e.hoveredWithAlt=!1,e.reformat()}},{key:"_getChildANInputElement",value:function(e){var t=this,n=e.getElementsByTagName("input"),o=[];return Array.prototype.slice.call(n,0).forEach(function(u){t.test(u)&&o.push(u)}),o}},{key:"test",value:function(e){return this._isInGlobalList(i.domElement(e))}},{key:"_createWeakMap",value:function(e){window[e]=new WeakMap}},{key:"_createGlobalList",value:function(){this.autoNumericGlobalListName="autoNumericGlobalList",this._createWeakMap(this.autoNumericGlobalListName)}},{key:"_doesGlobalListExists",value:function(){var e=H(window[this.autoNumericGlobalListName]);return"undefined"!==e&&"object"===e}},{key:"_addToGlobalList",value:function(e){this._doesGlobalListExists()||this._createGlobalList();var t=e.node();if(this._isInGlobalList(t)){if(this._getFromGlobalList(t)===this)return;i.warning("A reference to the DOM element you just initialized already exists in the global AutoNumeric element list. Please make sure to not initialize the same DOM element multiple times.",e.getSettings().showWarnings)}window[this.autoNumericGlobalListName].set(t,e)}},{key:"_removeFromGlobalList",value:function(e){this._doesGlobalListExists()&&window[this.autoNumericGlobalListName].delete(e.node())}},{key:"_getFromGlobalList",value:function(e){return this._doesGlobalListExists()?window[this.autoNumericGlobalListName].get(e):null}},{key:"_isInGlobalList",value:function(e){return!!this._doesGlobalListExists()&&window[this.autoNumericGlobalListName].has(e)}},{key:"validate",value:function(e,t,n){var o=!(1<arguments.length&&void 0!==t)||t,u=2<arguments.length&&void 0!==n?n:null;!i.isUndefinedOrNullOrEmpty(e)&&i.isObject(e)||i.throwError("The userOptions are invalid ; it should be a valid object, [".concat(e,"] given."));var r,g=i.isObject(u);g||i.isNull(u)||i.throwError("The 'originalOptions' parameter is invalid ; it should either be a valid option object or `null`, [".concat(e,"] given.")),i.isNull(e)||this._convertOldOptionsToNewOnes(e),r=o?Z({},this.getDefaultConfig(),e):e,i.isTrueOrFalseString(r.showWarnings)||i.isBoolean(r.showWarnings)||i.throwError("The debug option 'showWarnings' is invalid ; it should be either 'true' or 'false', [".concat(r.showWarnings,"] given."));var d,b=/^[0-9]+$/,c=/[0-9]+/,f=/^-?[0-9]+(\.?[0-9]+)?$/,p=/^[0-9]+(\.?[0-9]+)?$/;i.isTrueOrFalseString(r.allowDecimalPadding)||i.isBoolean(r.allowDecimalPadding)||r.allowDecimalPadding===a.options.allowDecimalPadding.floats||i.throwError("The decimal padding option 'allowDecimalPadding' is invalid ; it should either be `false`, `true` or `'floats'`, [".concat(r.allowDecimalPadding,"] given.")),r.allowDecimalPadding!==a.options.allowDecimalPadding.never&&"false"!==r.allowDecimalPadding||r.decimalPlaces===a.options.decimalPlaces.none&&r.decimalPlacesShownOnBlur===a.options.decimalPlacesShownOnBlur.none&&r.decimalPlacesShownOnFocus===a.options.decimalPlacesShownOnFocus.none||i.warning("Setting 'allowDecimalPadding' to [".concat(r.allowDecimalPadding,"] will override the current 'decimalPlaces*' settings [").concat(r.decimalPlaces,", ").concat(r.decimalPlacesShownOnBlur," and ").concat(r.decimalPlacesShownOnFocus,"]."),r.showWarnings),i.isTrueOrFalseString(r.alwaysAllowDecimalCharacter)||i.isBoolean(r.alwaysAllowDecimalCharacter)||i.throwError("The option 'alwaysAllowDecimalCharacter' is invalid ; it should either be `true` or `false`, [".concat(r.alwaysAllowDecimalCharacter,"] given.")),i.isNull(r.caretPositionOnFocus)||i.isInArray(r.caretPositionOnFocus,[a.options.caretPositionOnFocus.start,a.options.caretPositionOnFocus.end,a.options.caretPositionOnFocus.decimalLeft,a.options.caretPositionOnFocus.decimalRight])||i.throwError("The display on empty string option 'caretPositionOnFocus' is invalid ; it should either be `null`, 'focus', 'press', 'always' or 'zero', [".concat(r.caretPositionOnFocus,"] given.")),d=g?u:this._correctCaretPositionOnFocusAndSelectOnFocusOptions(e),i.isNull(d)||d.caretPositionOnFocus===a.options.caretPositionOnFocus.doNoForceCaretPosition||d.selectOnFocus!==a.options.selectOnFocus.select||i.warning("The 'selectOnFocus' option is set to 'select', which is in conflict with the 'caretPositionOnFocus' which is set to '".concat(d.caretPositionOnFocus,"'. As a result, if this has been called when instantiating an AutoNumeric object, the 'selectOnFocus' option is forced to 'doNotSelect'."),r.showWarnings),i.isInArray(r.digitGroupSeparator,[a.options.digitGroupSeparator.comma,a.options.digitGroupSeparator.dot,a.options.digitGroupSeparator.normalSpace,a.options.digitGroupSeparator.thinSpace,a.options.digitGroupSeparator.narrowNoBreakSpace,a.options.digitGroupSeparator.noBreakSpace,a.options.digitGroupSeparator.noSeparator,a.options.digitGroupSeparator.apostrophe,a.options.digitGroupSeparator.arabicThousandsSeparator,a.options.digitGroupSeparator.dotAbove,a.options.digitGroupSeparator.privateUseTwo])||i.throwError("The thousand separator character option 'digitGroupSeparator' is invalid ; it should be ',', '.', '\u066c', '\u02d9', \"'\", '\x92', ' ', '\u2009', '\u202f', '\xa0' or empty (''), [".concat(r.digitGroupSeparator,"] given.")),i.isTrueOrFalseString(r.showOnlyNumbersOnFocus)||i.isBoolean(r.showOnlyNumbersOnFocus)||i.throwError("The 'showOnlyNumbersOnFocus' option is invalid ; it should be either 'true' or 'false', [".concat(r.showOnlyNumbersOnFocus,"] given.")),i.isInArray(r.digitalGroupSpacing,[a.options.digitalGroupSpacing.two,a.options.digitalGroupSpacing.twoScaled,a.options.digitalGroupSpacing.three,a.options.digitalGroupSpacing.four])||2<=r.digitalGroupSpacing&&r.digitalGroupSpacing<=4||i.throwError("The grouping separator option for thousands 'digitalGroupSpacing' is invalid ; it should be '2', '2s', '3', or '4', [".concat(r.digitalGroupSpacing,"] given.")),i.isInArray(r.decimalCharacter,[a.options.decimalCharacter.comma,a.options.decimalCharacter.dot,a.options.decimalCharacter.middleDot,a.options.decimalCharacter.arabicDecimalSeparator,a.options.decimalCharacter.decimalSeparatorKeySymbol])||i.throwError("The decimal separator character option 'decimalCharacter' is invalid ; it should be '.', ',', '\xb7', '\u2396' or '\u066b', [".concat(r.decimalCharacter,"] given.")),r.decimalCharacter===r.digitGroupSeparator&&i.throwError("autoNumeric will not function properly when the decimal character 'decimalCharacter' [".concat(r.decimalCharacter,"] and the thousand separator 'digitGroupSeparator' [").concat(r.digitGroupSeparator,"] are the same character.")),i.isNull(r.decimalCharacterAlternative)||i.isString(r.decimalCharacterAlternative)||i.throwError("The alternate decimal separator character option 'decimalCharacterAlternative' is invalid ; it should be a string, [".concat(r.decimalCharacterAlternative,"] given.")),""===r.currencySymbol||i.isString(r.currencySymbol)||i.throwError("The currency symbol option 'currencySymbol' is invalid ; it should be a string, [".concat(r.currencySymbol,"] given.")),i.isInArray(r.currencySymbolPlacement,[a.options.currencySymbolPlacement.prefix,a.options.currencySymbolPlacement.suffix])||i.throwError("The placement of the currency sign option 'currencySymbolPlacement' is invalid ; it should either be 'p' (prefix) or 's' (suffix), [".concat(r.currencySymbolPlacement,"] given.")),i.isInArray(r.negativePositiveSignPlacement,[a.options.negativePositiveSignPlacement.prefix,a.options.negativePositiveSignPlacement.suffix,a.options.negativePositiveSignPlacement.left,a.options.negativePositiveSignPlacement.right,a.options.negativePositiveSignPlacement.none])||i.throwError("The placement of the negative sign option 'negativePositiveSignPlacement' is invalid ; it should either be 'p' (prefix), 's' (suffix), 'l' (left), 'r' (right) or 'null', [".concat(r.negativePositiveSignPlacement,"] given.")),i.isTrueOrFalseString(r.showPositiveSign)||i.isBoolean(r.showPositiveSign)||i.throwError("The show positive sign option 'showPositiveSign' is invalid ; it should be either 'true' or 'false', [".concat(r.showPositiveSign,"] given.")),i.isString(r.suffixText)&&(""===r.suffixText||!i.isNegative(r.suffixText,r.negativeSignCharacter)&&!c.test(r.suffixText))||i.throwError("The additional suffix option 'suffixText' is invalid ; it should not contains the negative sign '".concat(r.negativeSignCharacter,"' nor any numerical characters, [").concat(r.suffixText,"] given.")),i.isString(r.negativeSignCharacter)&&1===r.negativeSignCharacter.length&&!i.isUndefinedOrNullOrEmpty(r.negativeSignCharacter)&&!c.test(r.negativeSignCharacter)||i.throwError("The negative sign character option 'negativeSignCharacter' is invalid ; it should be a single character, and cannot be any numerical characters, [".concat(r.negativeSignCharacter,"] given.")),i.isString(r.positiveSignCharacter)&&1===r.positiveSignCharacter.length&&!i.isUndefinedOrNullOrEmpty(r.positiveSignCharacter)&&!c.test(r.positiveSignCharacter)||i.throwError("The positive sign character option 'positiveSignCharacter' is invalid ; it should be a single character, and cannot be any numerical characters, [".concat(r.positiveSignCharacter,"] given.\nIf you want to hide the positive sign character, you need to set the `showPositiveSign` option to `true`.")),r.negativeSignCharacter===r.positiveSignCharacter&&i.throwError("The positive 'positiveSignCharacter' and negative 'negativeSignCharacter' sign characters cannot be identical ; [".concat(r.negativeSignCharacter,"] given."));var y=V(i.isNull(r.negativeBracketsTypeOnBlur)?["",""]:r.negativeBracketsTypeOnBlur.split(","),2),w=y[0],_=y[1];(i.contains(r.digitGroupSeparator,r.negativeSignCharacter)||i.contains(r.decimalCharacter,r.negativeSignCharacter)||i.contains(r.decimalCharacterAlternative,r.negativeSignCharacter)||i.contains(w,r.negativeSignCharacter)||i.contains(_,r.negativeSignCharacter)||i.contains(r.suffixText,r.negativeSignCharacter))&&i.throwError("The negative sign character option 'negativeSignCharacter' is invalid ; it should not be equal or a part of the digit separator, the decimal character, the decimal character alternative, the negative brackets or the suffix text, [".concat(r.negativeSignCharacter,"] given.")),(i.contains(r.digitGroupSeparator,r.positiveSignCharacter)||i.contains(r.decimalCharacter,r.positiveSignCharacter)||i.contains(r.decimalCharacterAlternative,r.positiveSignCharacter)||i.contains(w,r.positiveSignCharacter)||i.contains(_,r.positiveSignCharacter)||i.contains(r.suffixText,r.positiveSignCharacter))&&i.throwError("The positive sign character option 'positiveSignCharacter' is invalid ; it should not be equal or a part of the digit separator, the decimal character, the decimal character alternative, the negative brackets or the suffix text, [".concat(r.positiveSignCharacter,"] given.")),i.isNull(r.overrideMinMaxLimits)||i.isInArray(r.overrideMinMaxLimits,[a.options.overrideMinMaxLimits.ceiling,a.options.overrideMinMaxLimits.floor,a.options.overrideMinMaxLimits.ignore,a.options.overrideMinMaxLimits.invalid])||i.throwError("The override min & max limits option 'overrideMinMaxLimits' is invalid ; it should either be 'ceiling', 'floor', 'ignore' or 'invalid', [".concat(r.overrideMinMaxLimits,"] given.")),r.overrideMinMaxLimits!==a.options.overrideMinMaxLimits.invalid&&r.overrideMinMaxLimits!==a.options.overrideMinMaxLimits.ignore&&(0<r.minimumValue||r.maximumValue<0)&&i.warning("You've set a `minimumValue` or a `maximumValue` excluding the value `0`. AutoNumeric will force the users to always have a valid value in the input, hence preventing them to clear the field. If you want to allow for temporary invalid values (ie. out-of-range), you should use the 'invalid' option for the 'overrideMinMaxLimits' setting."),i.isString(r.maximumValue)&&f.test(r.maximumValue)||i.throwError("The maximum possible value option 'maximumValue' is invalid ; it should be a string that represents a positive or negative number, [".concat(r.maximumValue,"] given.")),i.isString(r.minimumValue)&&f.test(r.minimumValue)||i.throwError("The minimum possible value option 'minimumValue' is invalid ; it should be a string that represents a positive or negative number, [".concat(r.minimumValue,"] given.")),parseFloat(r.minimumValue)>parseFloat(r.maximumValue)&&i.throwError("The minimum possible value option is greater than the maximum possible value option ; 'minimumValue' [".concat(r.minimumValue,"] should be smaller than 'maximumValue' [").concat(r.maximumValue,"].")),i.isInt(r.decimalPlaces)&&0<=r.decimalPlaces||i.isString(r.decimalPlaces)&&b.test(r.decimalPlaces)||i.throwError("The number of decimal places option 'decimalPlaces' is invalid ; it should be a positive integer, [".concat(r.decimalPlaces,"] given.")),i.isNull(r.decimalPlacesRawValue)||i.isInt(r.decimalPlacesRawValue)&&0<=r.decimalPlacesRawValue||i.isString(r.decimalPlacesRawValue)&&b.test(r.decimalPlacesRawValue)||i.throwError("The number of decimal places for the raw value option 'decimalPlacesRawValue' is invalid ; it should be a positive integer or `null`, [".concat(r.decimalPlacesRawValue,"] given.")),this._validateDecimalPlacesRawValue(r),i.isNull(r.decimalPlacesShownOnFocus)||b.test(String(r.decimalPlacesShownOnFocus))||i.throwError("The number of expanded decimal places option 'decimalPlacesShownOnFocus' is invalid ; it should be a positive integer or `null`, [".concat(r.decimalPlacesShownOnFocus,"] given.")),!i.isNull(r.decimalPlacesShownOnFocus)&&Number(r.decimalPlaces)>Number(r.decimalPlacesShownOnFocus)&&i.warning("The extended decimal places 'decimalPlacesShownOnFocus' [".concat(r.decimalPlacesShownOnFocus,"] should be greater than the 'decimalPlaces' [").concat(r.decimalPlaces,"] value. Currently, this will limit the ability of your user to manually change some of the decimal places. Do you really want to do that?"),r.showWarnings),(i.isNull(r.divisorWhenUnfocused)||p.test(r.divisorWhenUnfocused))&&0!==r.divisorWhenUnfocused&&"0"!==r.divisorWhenUnfocused&&1!==r.divisorWhenUnfocused&&"1"!==r.divisorWhenUnfocused||i.throwError("The divisor option 'divisorWhenUnfocused' is invalid ; it should be a positive number higher than one, preferably an integer, [".concat(r.divisorWhenUnfocused,"] given.")),i.isNull(r.decimalPlacesShownOnBlur)||b.test(r.decimalPlacesShownOnBlur)||i.throwError("The number of decimals shown when unfocused option 'decimalPlacesShownOnBlur' is invalid ; it should be a positive integer or `null`, [".concat(r.decimalPlacesShownOnBlur,"] given.")),i.isNull(r.symbolWhenUnfocused)||i.isString(r.symbolWhenUnfocused)||i.throwError("The symbol to show when unfocused option 'symbolWhenUnfocused' is invalid ; it should be a string, [".concat(r.symbolWhenUnfocused,"] given.")),i.isTrueOrFalseString(r.saveValueToSessionStorage)||i.isBoolean(r.saveValueToSessionStorage)||i.throwError("The save to session storage option 'saveValueToSessionStorage' is invalid ; it should be either 'true' or 'false', [".concat(r.saveValueToSessionStorage,"] given.")),i.isInArray(r.onInvalidPaste,[a.options.onInvalidPaste.error,a.options.onInvalidPaste.ignore,a.options.onInvalidPaste.clamp,a.options.onInvalidPaste.truncate,a.options.onInvalidPaste.replace])||i.throwError("The paste behavior option 'onInvalidPaste' is invalid ; it should either be 'error', 'ignore', 'clamp', 'truncate' or 'replace' (cf. documentation), [".concat(r.onInvalidPaste,"] given.")),i.isInArray(r.roundingMethod,[a.options.roundingMethod.halfUpSymmetric,a.options.roundingMethod.halfUpAsymmetric,a.options.roundingMethod.halfDownSymmetric,a.options.roundingMethod.halfDownAsymmetric,a.options.roundingMethod.halfEvenBankersRounding,a.options.roundingMethod.upRoundAwayFromZero,a.options.roundingMethod.downRoundTowardZero,a.options.roundingMethod.toCeilingTowardPositiveInfinity,a.options.roundingMethod.toFloorTowardNegativeInfinity,a.options.roundingMethod.toNearest05,a.options.roundingMethod.toNearest05Alt,a.options.roundingMethod.upToNext05,a.options.roundingMethod.downToNext05])||i.throwError("The rounding method option 'roundingMethod' is invalid ; it should either be 'S', 'A', 's', 'a', 'B', 'U', 'D', 'C', 'F', 'N05', 'CHF', 'U05' or 'D05' (cf. documentation), [".concat(r.roundingMethod,"] given.")),i.isNull(r.negativeBracketsTypeOnBlur)||i.isInArray(r.negativeBracketsTypeOnBlur,[a.options.negativeBracketsTypeOnBlur.parentheses,a.options.negativeBracketsTypeOnBlur.brackets,a.options.negativeBracketsTypeOnBlur.chevrons,a.options.negativeBracketsTypeOnBlur.curlyBraces,a.options.negativeBracketsTypeOnBlur.angleBrackets,a.options.negativeBracketsTypeOnBlur.japaneseQuotationMarks,a.options.negativeBracketsTypeOnBlur.halfBrackets,a.options.negativeBracketsTypeOnBlur.whiteSquareBrackets,a.options.negativeBracketsTypeOnBlur.quotationMarks,a.options.negativeBracketsTypeOnBlur.guillemets])||i.throwError("The brackets for negative values option 'negativeBracketsTypeOnBlur' is invalid ; it should either be '(,)', '[,]', '<,>', '{,}', '\u3008,\u3009', '\uff62,\uff63', '\u2e24,\u2e25', '\u27e6,\u27e7', '\u2039,\u203a' or '\xab,\xbb', [".concat(r.negativeBracketsTypeOnBlur,"] given.")),(i.isString(r.emptyInputBehavior)||i.isNumber(r.emptyInputBehavior))&&(i.isInArray(r.emptyInputBehavior,[a.options.emptyInputBehavior.focus,a.options.emptyInputBehavior.press,a.options.emptyInputBehavior.always,a.options.emptyInputBehavior.min,a.options.emptyInputBehavior.max,a.options.emptyInputBehavior.zero,a.options.emptyInputBehavior.null])||f.test(r.emptyInputBehavior))||i.throwError("The display on empty string option 'emptyInputBehavior' is invalid ; it should either be 'focus', 'press', 'always', 'min', 'max', 'zero', 'null', a number, or a string that represents a number, [".concat(r.emptyInputBehavior,"] given.")),r.emptyInputBehavior===a.options.emptyInputBehavior.zero&&(0<r.minimumValue||r.maximumValue<0)&&i.throwError("The 'emptyInputBehavior' option is set to 'zero', but this value is outside of the range defined by 'minimumValue' and 'maximumValue' [".concat(r.minimumValue,", ").concat(r.maximumValue,"].")),f.test(String(r.emptyInputBehavior))&&(this._isWithinRangeWithOverrideOption(r.emptyInputBehavior,r)||i.throwError("The 'emptyInputBehavior' option is set to a number or a string that represents a number, but its value [".concat(r.emptyInputBehavior,"] is outside of the range defined by the 'minimumValue' and 'maximumValue' options [").concat(r.minimumValue,", ").concat(r.maximumValue,"]."))),i.isTrueOrFalseString(r.eventBubbles)||i.isBoolean(r.eventBubbles)||i.throwError("The event bubbles option 'eventBubbles' is invalid ; it should be either 'true' or 'false', [".concat(r.eventBubbles,"] given.")),i.isTrueOrFalseString(r.eventIsCancelable)||i.isBoolean(r.eventIsCancelable)||i.throwError("The event is cancelable option 'eventIsCancelable' is invalid ; it should be either 'true' or 'false', [".concat(r.eventIsCancelable,"] given.")),!i.isBoolean(r.invalidClass)&&/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/.test(r.invalidClass)||i.throwError("The name of the 'invalidClass' option is not a valid CSS class name ; it should not be empty, and should follow the '^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$' regex, [".concat(r.invalidClass,"] given.")),i.isInArray(r.leadingZero,[a.options.leadingZero.allow,a.options.leadingZero.deny,a.options.leadingZero.keep])||i.throwError("The leading zero behavior option 'leadingZero' is invalid ; it should either be 'allow', 'deny' or 'keep', [".concat(r.leadingZero,"] given.")),i.isTrueOrFalseString(r.formatOnPageLoad)||i.isBoolean(r.formatOnPageLoad)||i.throwError("The format on initialization option 'formatOnPageLoad' is invalid ; it should be either 'true' or 'false', [".concat(r.formatOnPageLoad,"] given.")),i.isTrueOrFalseString(r.formulaMode)||i.isBoolean(r.formulaMode)||i.throwError("The formula mode option 'formulaMode' is invalid ; it should be either 'true' or 'false', [".concat(r.formulaMode,"] given.")),b.test(r.historySize)&&0!==r.historySize||i.throwError("The history size option 'historySize' is invalid ; it should be a positive integer, [".concat(r.historySize,"] given.")),i.isTrueOrFalseString(r.selectNumberOnly)||i.isBoolean(r.selectNumberOnly)||i.throwError("The select number only option 'selectNumberOnly' is invalid ; it should be either 'true' or 'false', [".concat(r.selectNumberOnly,"] given.")),i.isTrueOrFalseString(r.selectOnFocus)||i.isBoolean(r.selectOnFocus)||i.throwError("The select on focus option 'selectOnFocus' is invalid ; it should be either 'true' or 'false', [".concat(r.selectOnFocus,"] given.")),i.isNull(r.defaultValueOverride)||""===r.defaultValueOverride||f.test(r.defaultValueOverride)||i.throwError("The unformatted default value option 'defaultValueOverride' is invalid ; it should be a string that represents a positive or negative number, [".concat(r.defaultValueOverride,"] given.")),i.isTrueOrFalseString(r.unformatOnSubmit)||i.isBoolean(r.unformatOnSubmit)||i.throwError("The remove formatting on submit option 'unformatOnSubmit' is invalid ; it should be either 'true' or 'false', [".concat(r.unformatOnSubmit,"] given.")),i.isNull(r.valuesToStrings)||i.isObject(r.valuesToStrings)||i.throwError("The option 'valuesToStrings' is invalid ; it should be an object, ideally with 'key -> value' entries, [".concat(r.valuesToStrings,"] given.")),i.isNull(r.outputFormat)||i.isInArray(r.outputFormat,[a.options.outputFormat.string,a.options.outputFormat.number,a.options.outputFormat.dot,a.options.outputFormat.negativeDot,a.options.outputFormat.comma,a.options.outputFormat.negativeComma,a.options.outputFormat.dotNegative,a.options.outputFormat.commaNegative])||i.throwError("The custom locale format option 'outputFormat' is invalid ; it should either be null, 'string', 'number', '.', '-.', ',', '-,', '.-' or ',-', [".concat(r.outputFormat,"] given.")),i.isTrueOrFalseString(r.isCancellable)||i.isBoolean(r.isCancellable)||i.throwError("The cancellable behavior option 'isCancellable' is invalid ; it should be either 'true' or 'false', [".concat(r.isCancellable,"] given.")),i.isTrueOrFalseString(r.modifyValueOnWheel)||i.isBoolean(r.modifyValueOnWheel)||i.throwError("The increment/decrement on mouse wheel option 'modifyValueOnWheel' is invalid ; it should be either 'true' or 'false', [".concat(r.modifyValueOnWheel,"] given.")),i.isTrueOrFalseString(r.watchExternalChanges)||i.isBoolean(r.watchExternalChanges)||i.throwError("The option 'watchExternalChanges' is invalid ; it should be either 'true' or 'false', [".concat(r.watchExternalChanges,"] given.")),i.isInArray(r.wheelOn,[a.options.wheelOn.focus,a.options.wheelOn.hover])||i.throwError("The wheel behavior option 'wheelOn' is invalid ; it should either be 'focus' or 'hover', [".concat(r.wheelOn,"] given.")),(i.isString(r.wheelStep)||i.isNumber(r.wheelStep))&&("progressive"===r.wheelStep||p.test(r.wheelStep))&&0!==Number(r.wheelStep)||i.throwError("The wheel step value option 'wheelStep' is invalid ; it should either be the string 'progressive', or a number or a string that represents a positive number (excluding zero), [".concat(r.wheelStep,"] given.")),i.isInArray(r.serializeSpaces,[a.options.serializeSpaces.plus,a.options.serializeSpaces.percent])||i.throwError("The space replacement character option 'serializeSpaces' is invalid ; it should either be '+' or '%20', [".concat(r.serializeSpaces,"] given.")),i.isTrueOrFalseString(r.noEventListeners)||i.isBoolean(r.noEventListeners)||i.throwError("The option 'noEventListeners' that prevent the creation of event listeners is invalid ; it should be either 'true' or 'false', [".concat(r.noEventListeners,"] given.")),i.isNull(r.styleRules)||i.isObject(r.styleRules)&&(Object.prototype.hasOwnProperty.call(r.styleRules,"positive")||Object.prototype.hasOwnProperty.call(r.styleRules,"negative")||Object.prototype.hasOwnProperty.call(r.styleRules,"ranges")||Object.prototype.hasOwnProperty.call(r.styleRules,"userDefined"))||i.throwError("The option 'styleRules' is invalid ; it should be a correctly structured object, with one or more 'positive', 'negative', 'ranges' or 'userDefined' attributes, [".concat(r.styleRules,"] given.")),i.isNull(r.styleRules)||!Object.prototype.hasOwnProperty.call(r.styleRules,"userDefined")||i.isNull(r.styleRules.userDefined)||r.styleRules.userDefined.forEach(function(I){Object.prototype.hasOwnProperty.call(I,"callback")&&!i.isFunction(I.callback)&&i.throwError("The callback defined in the `userDefined` attribute is not a function, ".concat(H(I.callback)," given."))}),(i.isNull(r.rawValueDivisor)||p.test(r.rawValueDivisor))&&0!==r.rawValueDivisor&&"0"!==r.rawValueDivisor&&1!==r.rawValueDivisor&&"1"!==r.rawValueDivisor||i.throwError("The raw value divisor option 'rawValueDivisor' is invalid ; it should be a positive number higher than one, preferably an integer, [".concat(r.rawValueDivisor,"] given.")),i.isTrueOrFalseString(r.readOnly)||i.isBoolean(r.readOnly)||i.throwError("The option 'readOnly' is invalid ; it should be either 'true' or 'false', [".concat(r.readOnly,"] given.")),i.isTrueOrFalseString(r.unformatOnHover)||i.isBoolean(r.unformatOnHover)||i.throwError("The option 'unformatOnHover' is invalid ; it should be either 'true' or 'false', [".concat(r.unformatOnHover,"] given.")),i.isTrueOrFalseString(r.failOnUnknownOption)||i.isBoolean(r.failOnUnknownOption)||i.throwError("The debug option 'failOnUnknownOption' is invalid ; it should be either 'true' or 'false', [".concat(r.failOnUnknownOption,"] given.")),i.isTrueOrFalseString(r.createLocalList)||i.isBoolean(r.createLocalList)||i.throwError("The debug option 'createLocalList' is invalid ; it should be either 'true' or 'false', [".concat(r.createLocalList,"] given."))}},{key:"_validateDecimalPlacesRawValue",value:function(e){i.isNull(e.decimalPlacesRawValue)||(e.decimalPlacesRawValue<e.decimalPlaces&&i.warning("The number of decimal places to store in the raw value [".concat(e.decimalPlacesRawValue,"] is lower than the ones to display [").concat(e.decimalPlaces,"]. This will likely confuse your users.\nTo solve that, you'd need to either set `decimalPlacesRawValue` to `null`, or set a number of decimal places for the raw value equal of bigger than `decimalPlaces`."),e.showWarnings),e.decimalPlacesRawValue<e.decimalPlacesShownOnFocus&&i.warning("The number of decimal places to store in the raw value [".concat(e.decimalPlacesRawValue,"] is lower than the ones shown on focus [").concat(e.decimalPlacesShownOnFocus,"]. This will likely confuse your users.\nTo solve that, you'd need to either set `decimalPlacesRawValue` to `null`, or set a number of decimal places for the raw value equal of bigger than `decimalPlacesShownOnFocus`."),e.showWarnings),e.decimalPlacesRawValue<e.decimalPlacesShownOnBlur&&i.warning("The number of decimal places to store in the raw value [".concat(e.decimalPlacesRawValue,"] is lower than the ones shown when unfocused [").concat(e.decimalPlacesShownOnBlur,"]. This will likely confuse your users.\nTo solve that, you'd need to either set `decimalPlacesRawValue` to `null`, or set a number of decimal places for the raw value equal of bigger than `decimalPlacesShownOnBlur`."),e.showWarnings))}},{key:"areSettingsValid",value:function(e){var t=!0;try{this.validate(e,!0)}catch{t=!1}return t}},{key:"getDefaultConfig",value:function(){return a.defaultSettings}},{key:"getPredefinedOptions",value:function(){return a.predefinedOptions}},{key:"_generateOptionsObjectFromOptionsArray",value:function(e){var t,n=this;return i.isUndefinedOrNullOrEmpty(e)||0===e.length?t=null:(t={},1===e.length&&Array.isArray(e[0])?e[0].forEach(function(o){Z(t,n._getOptionObject(o))}):1<=e.length&&e.forEach(function(o){Z(t,n._getOptionObject(o))})),t}},{key:"format",value:function(e){if(i.isUndefined(e)||null===e)return null;var t;t=i.isElement(e)?i.getElementValue(e):e,i.isString(t)||i.isNumber(t)||i.throwError('The value "'.concat(t,'" being "set" is not numeric and therefore cannot be used appropriately.'));for(var n=arguments.length,o=new Array(1<n?n-1:0),u=1;u<n;u++)o[u-1]=arguments[u];var r=this._generateOptionsObjectFromOptionsArray(o),g=Z({},this.getDefaultConfig(),r);g.isNegativeSignAllowed=t<0,g.isPositiveSignAllowed=0<=t,this._setBrackets(g),this._cachesUsualRegularExpressions(g,{});var d=this._toNumericValue(t,g);return isNaN(Number(d))&&i.throwError("The value [".concat(d,"] that you are trying to format is not a recognized number.")),this._isWithinRangeWithOverrideOption(d,g)||(i.triggerEvent(a.events.formatted,document,{oldValue:null,newValue:null,oldRawValue:null,newRawValue:null,isPristine:null,error:"Range test failed",aNElement:null},!0,!0),i.throwError("The value [".concat(d,"] being set falls outside of the minimumValue [").concat(g.minimumValue,"] and maximumValue [").concat(g.maximumValue,"] range set for this element"))),g.valuesToStrings&&this._checkValuesToStringsSettings(t,g)?g.valuesToStrings[t]:(this._correctNegativePositiveSignPlacementOption(g),this._calculateDecimalPlacesOnInit(g),i.isUndefinedOrNullOrEmpty(g.rawValueDivisor)||0===g.rawValueDivisor||""===d||null===d||(d*=g.rawValueDivisor),d=this._roundFormattedValueShownOnFocus(d,g),d=this._modifyNegativeSignAndDecimalCharacterForFormattedValue(d,g),d=this._addGroupSeparators(d,g,!1,d))}},{key:"formatAndSet",value:function(e,t){var o=this.format(e,1<arguments.length&&void 0!==t?t:null);return i.setElementValue(e,o),o}},{key:"unformat",value:function(e){if(i.isNumberStrict(e))return e;var t;if(""===(t=i.isElement(e)?i.getElementValue(e):e))return"";if(i.isUndefined(t)||null===t)return null;(i.isArray(t)||i.isObject(t))&&i.throwError("A number or a string representing a number is needed to be able to unformat it, [".concat(t,"] given."));for(var n=arguments.length,o=new Array(1<n?n-1:0),u=1;u<n;u++)o[u-1]=arguments[u];var r=this._generateOptionsObjectFromOptionsArray(o),g=Z({},this.getDefaultConfig(),r);if(g.isNegativeSignAllowed=!1,g.isPositiveSignAllowed=!0,t=t.toString(),g.valuesToStrings&&this._checkStringsToValuesSettings(t,g))return i.objectKeyLookup(g.valuesToStrings,t);if(i.isNegative(t,g.negativeSignCharacter))g.isNegativeSignAllowed=!0,g.isPositiveSignAllowed=!1;else if(!i.isNull(g.negativeBracketsTypeOnBlur)){var d=V(g.negativeBracketsTypeOnBlur.split(","),2);g.firstBracket=d[0],g.lastBracket=d[1],t.charAt(0)===g.firstBracket&&t.charAt(t.length-1)===g.lastBracket&&(g.isNegativeSignAllowed=!0,g.isPositiveSignAllowed=!1,t=this._removeBrackets(t,g,!1))}return t=this._convertToNumericString(t,g),new RegExp("[^+-0123456789.]","gi").test(t)?NaN:(this._correctNegativePositiveSignPlacementOption(g),g.originalDecimalPlacesRawValue=g.decimalPlacesRawValue?g.decimalPlacesRawValue:g.decimalPlaces,this._calculateDecimalPlacesOnInit(g),i.isUndefinedOrNullOrEmpty(g.rawValueDivisor)||0===g.rawValueDivisor||""===t||null===t||(t/=g.rawValueDivisor),t=(t=this._roundRawValue(t,g)).replace(g.decimalCharacter,"."),t=this._toLocale(t,g.outputFormat,g))}},{key:"unformatAndSet",value:function(e,t){var o=this.unformat(e,1<arguments.length&&void 0!==t?t:null);return i.setElementValue(e,o),o}},{key:"localize",value:function(e,t){var n,o,u=1<arguments.length&&void 0!==t?t:null;return""===(n=i.isElement(e)?i.getElementValue(e):e)?"":(i.isNull(u)&&(u=a.defaultSettings),n=this.unformat(n,u),0===Number(n)&&u.leadingZero!==a.options.leadingZero.keep&&(n="0"),o=i.isNull(u)?u.outputFormat:a.defaultSettings.outputFormat,this._toLocale(n,o,u))}},{key:"localizeAndSet",value:function(e,t){var o=this.localize(e,1<arguments.length&&void 0!==t?t:null);return i.setElementValue(e,o),o}},{key:"isManagedByAutoNumeric",value:function(e){return this._isInGlobalList(i.domElement(e))}},{key:"getAutoNumericElement",value:function(e){var t=i.domElement(e);return this.isManagedByAutoNumeric(t)?this._getFromGlobalList(t):null}},{key:"set",value:function(e,t,n,o){var u,r=2<arguments.length&&void 0!==n?n:null,g=!(3<arguments.length&&void 0!==o)||o,d=i.domElement(e);return this.isManagedByAutoNumeric(d)?this.getAutoNumericElement(d).set(t,r,g):(u=!(!i.isNull(r)&&Object.prototype.hasOwnProperty.call(r,"showWarnings"))||r.showWarnings,i.warning("Impossible to find an AutoNumeric object for the given DOM element or selector.",u),null)}},{key:"getNumericString",value:function(e,t){return this._get(e,"getNumericString",1<arguments.length&&void 0!==t?t:null)}},{key:"getFormatted",value:function(e,t){return this._get(e,"getFormatted",1<arguments.length&&void 0!==t?t:null)}},{key:"getNumber",value:function(e,t){return this._get(e,"getNumber",1<arguments.length&&void 0!==t?t:null)}},{key:"_get",value:function(e,t,n){var o=2<arguments.length&&void 0!==n?n:null,u=i.domElement(e);return this.isManagedByAutoNumeric(u)||i.throwError("Impossible to find an AutoNumeric object for the given DOM element or selector."),this.getAutoNumericElement(u)[t](o)}},{key:"getLocalized",value:function(e,t,n){var o=1<arguments.length&&void 0!==t?t:null,u=2<arguments.length&&void 0!==n?n:null,r=i.domElement(e);return this.isManagedByAutoNumeric(r)||i.throwError("Impossible to find an AutoNumeric object for the given DOM element or selector."),this.getAutoNumericElement(r).getLocalized(o,u)}},{key:"_stripAllNonNumberCharacters",value:function(e,t,n,o){return this._stripAllNonNumberCharactersExceptCustomDecimalChar(e,t,n,o).replace(t.decimalCharacter,".")}},{key:"_stripAllNonNumberCharactersExceptCustomDecimalChar",value:function(e,t,n,o){var u=(e=(e=this._normalizeCurrencySuffixAndNegativeSignCharacters(e,t)).replace(t.allowedAutoStrip,"")).match(t.numRegAutoStrip);if(e=u?[u[1],u[2],u[3]].join(""):"",t.leadingZero===a.options.leadingZero.allow||t.leadingZero===a.options.leadingZero.keep){var r="",g=V(e.split(t.decimalCharacter),2),b=g[1],c=g[0];i.contains(c,t.negativeSignCharacter)&&(r=t.negativeSignCharacter,c=c.replace(t.negativeSignCharacter,"")),""===r&&c.length>t.mIntPos&&"0"===c.charAt(0)&&(c=c.slice(1)),""!==r&&c.length>t.mIntNeg&&"0"===c.charAt(0)&&(c=c.slice(1)),e="".concat(r).concat(c).concat(i.isUndefined(b)?"":t.decimalCharacter+b)}return(n&&t.leadingZero===a.options.leadingZero.deny||!o&&t.leadingZero===a.options.leadingZero.allow)&&(e=e.replace(t.stripReg,"$1$2")),e}},{key:"_toggleNegativeBracket",value:function(e,t,n){return n?this._removeBrackets(e,t):this._addBrackets(e,t)}},{key:"_addBrackets",value:function(e,t){return i.isNull(t.negativeBracketsTypeOnBlur)?e:"".concat(t.firstBracket).concat(e.replace(t.negativeSignCharacter,"")).concat(t.lastBracket)}},{key:"_removeBrackets",value:function(e,t,n){var o,u=!(2<arguments.length&&void 0!==n)||n;return i.isNull(t.negativeBracketsTypeOnBlur)||e.charAt(0)!==t.firstBracket?e:(o=(o=e.replace(t.firstBracket,"")).replace(t.lastBracket,""),u?(o=o.replace(t.currencySymbol,""),this._mergeCurrencySignNegativePositiveSignAndValue(o,t,!0,!1)):"".concat(t.negativeSignCharacter).concat(o))}},{key:"_setBrackets",value:function(e){if(i.isNull(e.negativeBracketsTypeOnBlur))e.firstBracket="",e.lastBracket="";else{var t=V(e.negativeBracketsTypeOnBlur.split(","),2),o=t[1];e.firstBracket=t[0],e.lastBracket=o}}},{key:"_convertToNumericString",value:function(e,t){e=this._removeBrackets(e,t,!1),e=(e=this._normalizeCurrencySuffixAndNegativeSignCharacters(e,t)).replace(new RegExp("[".concat(t.digitGroupSeparator,"]"),"g"),""),"."!==t.decimalCharacter&&(e=e.replace(t.decimalCharacter,".")),i.isNegative(e)&&e.lastIndexOf("-")===e.length-1&&(e=e.replace("-",""),e="-".concat(e)),t.showPositiveSign&&(e=e.replace(t.positiveSignCharacter,""));var o=i.arabicToLatinNumbers(e,t.leadingZero!==a.options.leadingZero.keep,!1,!1);return isNaN(o)||(e=o.toString()),e}},{key:"_normalizeCurrencySuffixAndNegativeSignCharacters",value:function(e,t){return e=String(e),t.currencySymbol!==a.options.currencySymbol.none&&(e=e.replace(t.currencySymbol,"")),t.suffixText!==a.options.suffixText.none&&(e=e.replace(t.suffixText,"")),t.negativeSignCharacter!==a.options.negativeSignCharacter.hyphen&&(e=e.replace(t.negativeSignCharacter,"-")),e}},{key:"_toLocale",value:function(e,t,n){if(i.isNull(t)||t===a.options.outputFormat.string)return e;var o;switch(t){case a.options.outputFormat.number:o=Number(e);break;case a.options.outputFormat.dotNegative:o=i.isNegative(e)?e.replace("-","")+"-":e;break;case a.options.outputFormat.comma:case a.options.outputFormat.negativeComma:o=e.replace(".",",");break;case a.options.outputFormat.commaNegative:o=e.replace(".",","),o=i.isNegative(o)?o.replace("-","")+"-":o;break;case a.options.outputFormat.dot:case a.options.outputFormat.negativeDot:o=e;break;default:i.throwError("The given outputFormat [".concat(t,"] option is not recognized."))}return t!==a.options.outputFormat.number&&"-"!==n.negativeSignCharacter&&(o=o.replace("-",n.negativeSignCharacter)),o}},{key:"_modifyNegativeSignAndDecimalCharacterForFormattedValue",value:function(e,t){return"-"!==t.negativeSignCharacter&&(e=e.replace("-",t.negativeSignCharacter)),"."!==t.decimalCharacter&&(e=e.replace(".",t.decimalCharacter)),e}},{key:"_isElementValueEmptyOrOnlyTheNegativeSign",value:function(e,t){return""===e||e===t.negativeSignCharacter}},{key:"_orderValueCurrencySymbolAndSuffixText",value:function(e,t,n){var o;if(t.emptyInputBehavior===a.options.emptyInputBehavior.always||n)switch(t.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.left:case a.options.negativePositiveSignPlacement.prefix:case a.options.negativePositiveSignPlacement.none:o=e+t.currencySymbol+t.suffixText;break;default:o=t.currencySymbol+e+t.suffixText}else o=e;return o}},{key:"_addGroupSeparators",value:function(e,t,n,o,u){var r,g=4<arguments.length&&void 0!==u?u:null;if(r=i.isNull(g)?i.isNegative(e,t.negativeSignCharacter)||i.isNegativeWithBrackets(e,t.firstBracket,t.lastBracket):g<0,e=this._stripAllNonNumberCharactersExceptCustomDecimalChar(e,t,!1,n),this._isElementValueEmptyOrOnlyTheNegativeSign(e,t))return this._orderValueCurrencySymbolAndSuffixText(e,t,!0);var d,b=i.isZeroOrHasNoValue(e);switch(r&&(e=e.replace("-","")),t.digitalGroupSpacing=t.digitalGroupSpacing.toString(),t.digitalGroupSpacing){case a.options.digitalGroupSpacing.two:d=/(\d)((\d)(\d{2}?)+)$/;break;case a.options.digitalGroupSpacing.twoScaled:d=/(\d)((?:\d{2}){0,2}\d{3}(?:(?:\d{2}){2}\d{3})*?)$/;break;case a.options.digitalGroupSpacing.four:d=/(\d)((\d{4}?)+)$/;break;default:d=/(\d)((\d{3}?)+)$/}var c,f=V(e.split(t.decimalCharacter),2),p=f[0],y=f[1];if(t.decimalCharacterAlternative&&i.isUndefined(y)){var w=V(e.split(t.decimalCharacterAlternative),2);p=w[0],y=w[1]}if(""!==t.digitGroupSeparator)for(;d.test(p);)p=p.replace(d,"$1".concat(t.digitGroupSeparator,"$2"));return e=0===(c=n?t.decimalPlacesShownOnFocus:t.decimalPlacesShownOnBlur)||i.isUndefined(y)?p:(y.length>c&&(y=y.substring(0,c)),"".concat(p).concat(t.decimalCharacter).concat(y)),e=a._mergeCurrencySignNegativePositiveSignAndValue(e,t,r,b),i.isNull(g)&&(g=o),null!==t.negativeBracketsTypeOnBlur&&(g<0||i.isNegativeStrict(e,t.negativeSignCharacter))&&(e=this._toggleNegativeBracket(e,t,n)),t.suffixText?"".concat(e).concat(t.suffixText):e}},{key:"_mergeCurrencySignNegativePositiveSignAndValue",value:function(e,t,n,o){var u,r="";if(n?r=t.negativeSignCharacter:t.showPositiveSign&&!o&&(r=t.positiveSignCharacter),t.currencySymbolPlacement===a.options.currencySymbolPlacement.prefix)if(t.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none&&(n||!n&&t.showPositiveSign&&!o))switch(t.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.prefix:case a.options.negativePositiveSignPlacement.left:u="".concat(r).concat(t.currencySymbol).concat(e);break;case a.options.negativePositiveSignPlacement.right:u="".concat(t.currencySymbol).concat(r).concat(e);break;case a.options.negativePositiveSignPlacement.suffix:u="".concat(t.currencySymbol).concat(e).concat(r)}else u=t.currencySymbol+e;else if(t.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix)if(t.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none&&(n||!n&&t.showPositiveSign&&!o))switch(t.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.suffix:case a.options.negativePositiveSignPlacement.right:u="".concat(e).concat(t.currencySymbol).concat(r);break;case a.options.negativePositiveSignPlacement.left:u="".concat(e).concat(r).concat(t.currencySymbol);break;case a.options.negativePositiveSignPlacement.prefix:u="".concat(r).concat(e).concat(t.currencySymbol)}else u=e+t.currencySymbol;return u}},{key:"_truncateZeros",value:function(e,t){var n;switch(t){case 0:n=/(\.(?:\d*[1-9])?)0*$/;break;case 1:n=/(\.\d(?:\d*[1-9])?)0*$/;break;default:n=new RegExp("(\\.\\d{".concat(t,"}(?:\\d*[1-9])?)0*"))}return e=e.replace(n,"$1"),0===t&&(e=e.replace(/\.$/,"")),e}},{key:"_roundRawValue",value:function(e,t){return this._roundValue(e,t,t.decimalPlacesRawValue)}},{key:"_roundFormattedValueShownOnFocus",value:function(e,t){return this._roundValue(e,t,Number(t.decimalPlacesShownOnFocus))}},{key:"_roundFormattedValueShownOnBlur",value:function(e,t){return this._roundValue(e,t,Number(t.decimalPlacesShownOnBlur))}},{key:"_roundFormattedValueShownOnFocusOrBlur",value:function(e,t,n){return n?this._roundFormattedValueShownOnFocus(e,t):this._roundFormattedValueShownOnBlur(e,t)}},{key:"_roundValue",value:function(e,t,n){if(i.isNull(e))return e;if(e=""===e?"0":e.toString(),t.roundingMethod===a.options.roundingMethod.toNearest05||t.roundingMethod===a.options.roundingMethod.toNearest05Alt||t.roundingMethod===a.options.roundingMethod.upToNext05||t.roundingMethod===a.options.roundingMethod.downToNext05)return this._roundCloseTo05(e,t);var o,u=V(a._prepareValueForRounding(e,t),2),r=u[0],g=(e=u[1]).lastIndexOf("."),d=-1===g,b=V(e.split("."),2),c=b[0];if(!(0<b[1]||t.allowDecimalPadding!==a.options.allowDecimalPadding.never&&t.allowDecimalPadding!==a.options.allowDecimalPadding.floats))return 0===Number(e)?c:"".concat(r).concat(c);o=t.allowDecimalPadding===a.options.allowDecimalPadding.always||t.allowDecimalPadding===a.options.allowDecimalPadding.floats?n:0;var f,y=e.length-1-(d?e.length-1:g),w="";if(y<=n){if(w=e,y<o){d&&(w="".concat(w).concat(t.decimalCharacter));for(var _="000000";y<o;)w+=_=_.substring(0,o-y),y+=_.length}else o<y?w=this._truncateZeros(w,o):0===y&&0===o&&(w=w.replace(/\.$/,""));return 0===Number(w)?w:"".concat(r).concat(w)}f=d?n-1:Number(n)+Number(g);var I,U=Number(e.charAt(f+1)),z=e.substring(0,f+1).split("");if(I="."===e.charAt(f)?e.charAt(f-1)%2:e.charAt(f)%2,this._shouldRoundUp(U,t,r,I))for(var j=z.length-1;0<=j;--j)if("."!==z[j]){if(z[j]=+z[j]+1,z[j]<10)break;0<j&&(z[j]="0")}return z=z.slice(0,f+1),w=this._truncateZeros(z.join(""),o),0===Number(w)?w:"".concat(r).concat(w)}},{key:"_roundCloseTo05",value:function(e,t){switch(t.roundingMethod){case a.options.roundingMethod.toNearest05:case a.options.roundingMethod.toNearest05Alt:e=(Math.round(20*e)/20).toString();break;case a.options.roundingMethod.upToNext05:e=(Math.ceil(20*e)/20).toString();break;default:e=(Math.floor(20*e)/20).toString()}return i.contains(e,".")?e.length-e.indexOf(".")<3?e+"0":e:e+".00"}},{key:"_prepareValueForRounding",value:function(e,t){var n="";return i.isNegativeStrict(e,"-")&&(n="-",e=e.replace("-","")),e.match(/^\d/)||(e="0".concat(e)),0===Number(e)&&(n=""),(0<Number(e)&&t.leadingZero!==a.options.leadingZero.keep||0<e.length&&t.leadingZero===a.options.leadingZero.allow)&&(e=e.replace(/^0*(\d)/,"$1")),[n,e]}},{key:"_shouldRoundUp",value:function(e,t,n,o){return 4<e&&t.roundingMethod===a.options.roundingMethod.halfUpSymmetric||4<e&&t.roundingMethod===a.options.roundingMethod.halfUpAsymmetric&&""===n||5<e&&t.roundingMethod===a.options.roundingMethod.halfUpAsymmetric&&"-"===n||5<e&&t.roundingMethod===a.options.roundingMethod.halfDownSymmetric||5<e&&t.roundingMethod===a.options.roundingMethod.halfDownAsymmetric&&""===n||4<e&&t.roundingMethod===a.options.roundingMethod.halfDownAsymmetric&&"-"===n||5<e&&t.roundingMethod===a.options.roundingMethod.halfEvenBankersRounding||5===e&&t.roundingMethod===a.options.roundingMethod.halfEvenBankersRounding&&1===o||0<e&&t.roundingMethod===a.options.roundingMethod.toCeilingTowardPositiveInfinity&&""===n||0<e&&t.roundingMethod===a.options.roundingMethod.toFloorTowardNegativeInfinity&&"-"===n||0<e&&t.roundingMethod===a.options.roundingMethod.upRoundAwayFromZero}},{key:"_truncateDecimalPlaces",value:function(e,t,n,o){n&&(e=this._roundFormattedValueShownOnFocus(e,t));var u=V(e.split(t.decimalCharacter),2),r=u[0],g=u[1];if(g&&g.length>o)if(0<o){var d=g.substring(0,o);e="".concat(r).concat(t.decimalCharacter).concat(d)}else e=r;return e}},{key:"_checkIfInRangeWithOverrideOption",value:function(e,t){if(i.isNull(e)&&t.emptyInputBehavior===a.options.emptyInputBehavior.null||t.overrideMinMaxLimits===a.options.overrideMinMaxLimits.ignore||t.overrideMinMaxLimits===a.options.overrideMinMaxLimits.invalid)return[!0,!0];e=(e=e.toString()).replace(",",".");var n,o=i.parseStr(t.minimumValue),u=i.parseStr(t.maximumValue),r=i.parseStr(e);switch(t.overrideMinMaxLimits){case a.options.overrideMinMaxLimits.floor:n=[-1<i.testMinMax(o,r),!0];break;case a.options.overrideMinMaxLimits.ceiling:n=[!0,i.testMinMax(u,r)<1];break;default:n=[-1<i.testMinMax(o,r),i.testMinMax(u,r)<1]}return n}},{key:"_isWithinRangeWithOverrideOption",value:function(e,t){var n=V(this._checkIfInRangeWithOverrideOption(e,t),2);return n[0]&&n[1]}},{key:"_cleanValueForRangeParse",value:function(e){return e=e.toString().replace(",","."),i.parseStr(e)}},{key:"_isMinimumRangeRespected",value:function(e,t){return-1<i.testMinMax(i.parseStr(t.minimumValue),this._cleanValueForRangeParse(e))}},{key:"_isMaximumRangeRespected",value:function(e,t){return i.testMinMax(i.parseStr(t.maximumValue),this._cleanValueForRangeParse(e))<1}},{key:"_readCookie",value:function(e){for(var t=e+"=",n=document.cookie.split(";"),o="",u=0;u<n.length;u+=1){for(o=n[u];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null}},{key:"_storageTest",value:function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch{return!1}}},{key:"_correctNegativePositiveSignPlacementOption",value:function(e){if(i.isNull(e.negativePositiveSignPlacement))if(i.isUndefined(e)||!i.isUndefinedOrNullOrEmpty(e.negativePositiveSignPlacement)||i.isUndefinedOrNullOrEmpty(e.currencySymbol))e.negativePositiveSignPlacement=a.options.negativePositiveSignPlacement.left;else switch(e.currencySymbolPlacement){case a.options.currencySymbolPlacement.suffix:e.negativePositiveSignPlacement=a.options.negativePositiveSignPlacement.prefix;break;case a.options.currencySymbolPlacement.prefix:e.negativePositiveSignPlacement=a.options.negativePositiveSignPlacement.left}}},{key:"_correctCaretPositionOnFocusAndSelectOnFocusOptions",value:function(e){return i.isNull(e)?null:(!i.isUndefinedOrNullOrEmpty(e.caretPositionOnFocus)&&i.isUndefinedOrNullOrEmpty(e.selectOnFocus)&&(e.selectOnFocus=a.options.selectOnFocus.doNotSelect),i.isUndefinedOrNullOrEmpty(e.caretPositionOnFocus)&&!i.isUndefinedOrNullOrEmpty(e.selectOnFocus)&&e.selectOnFocus===a.options.selectOnFocus.select&&(e.caretPositionOnFocus=a.options.caretPositionOnFocus.doNoForceCaretPosition),e)}},{key:"_calculateDecimalPlacesOnInit",value:function(e){this._validateDecimalPlacesRawValue(e),e.decimalPlacesShownOnFocus===a.options.decimalPlacesShownOnFocus.useDefault&&(e.decimalPlacesShownOnFocus=e.decimalPlaces),e.decimalPlacesShownOnBlur===a.options.decimalPlacesShownOnBlur.useDefault&&(e.decimalPlacesShownOnBlur=e.decimalPlaces),e.decimalPlacesRawValue===a.options.decimalPlacesRawValue.useDefault&&(e.decimalPlacesRawValue=e.decimalPlaces);var t=0;e.rawValueDivisor&&e.rawValueDivisor!==a.options.rawValueDivisor.none&&(t=String(e.rawValueDivisor).length-1)<0&&(t=0),e.decimalPlacesRawValue=Math.max(Math.max(e.decimalPlacesShownOnBlur,e.decimalPlacesShownOnFocus)+t,Number(e.originalDecimalPlacesRawValue)+t)}},{key:"_calculateDecimalPlacesOnUpdate",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:null;this._validateDecimalPlacesRawValue(e),i.isNull(n)&&i.throwError("When updating the settings, the previous ones should be passed as an argument.");var o="decimalPlaces"in e;if(o||"decimalPlacesRawValue"in e||"decimalPlacesShownOnFocus"in e||"decimalPlacesShownOnBlur"in e||"rawValueDivisor"in e){o?("decimalPlacesShownOnFocus"in e&&e.decimalPlacesShownOnFocus!==a.options.decimalPlacesShownOnFocus.useDefault||(e.decimalPlacesShownOnFocus=e.decimalPlaces),"decimalPlacesShownOnBlur"in e&&e.decimalPlacesShownOnBlur!==a.options.decimalPlacesShownOnBlur.useDefault||(e.decimalPlacesShownOnBlur=e.decimalPlaces),"decimalPlacesRawValue"in e&&e.decimalPlacesRawValue!==a.options.decimalPlacesRawValue.useDefault||(e.decimalPlacesRawValue=e.decimalPlaces)):(i.isUndefined(e.decimalPlacesShownOnFocus)&&(e.decimalPlacesShownOnFocus=n.decimalPlacesShownOnFocus),i.isUndefined(e.decimalPlacesShownOnBlur)&&(e.decimalPlacesShownOnBlur=n.decimalPlacesShownOnBlur));var u=0;e.rawValueDivisor&&e.rawValueDivisor!==a.options.rawValueDivisor.none&&(u=String(e.rawValueDivisor).length-1)<0&&(u=0),e.decimalPlacesRawValue=e.decimalPlaces||e.decimalPlacesRawValue?Math.max(Math.max(e.decimalPlacesShownOnBlur,e.decimalPlacesShownOnFocus)+u,Number(e.decimalPlacesRawValue)+u):Math.max(Math.max(e.decimalPlacesShownOnBlur,e.decimalPlacesShownOnFocus)+u,Number(n.originalDecimalPlacesRawValue)+u)}}},{key:"_cachesUsualRegularExpressions",value:function(e,t){var n;n=e.negativeSignCharacter!==a.options.negativeSignCharacter.hyphen?"([-\\".concat(e.negativeSignCharacter,"]?)"):"(-?)",t.aNegRegAutoStrip=n,e.allowedAutoStrip=new RegExp("[^-0123456789\\".concat(e.decimalCharacter,"]"),"g"),e.numRegAutoStrip=new RegExp("".concat(n,"(?:\\").concat(e.decimalCharacter,"?([0-9]+\\").concat(e.decimalCharacter,"[0-9]+)|([0-9]*(?:\\").concat(e.decimalCharacter,"[0-9]*)?))")),e.stripReg=new RegExp("^".concat(t.aNegRegAutoStrip,"0*([0-9])")),e.formulaChars=new RegExp("[0-9".concat(e.decimalCharacter,"+\\-*/() ]"))}},{key:"_convertOldOptionsToNewOnes",value:function(e){var t={aSep:"digitGroupSeparator",nSep:"showOnlyNumbersOnFocus",dGroup:"digitalGroupSpacing",aDec:"decimalCharacter",altDec:"decimalCharacterAlternative",aSign:"currencySymbol",pSign:"currencySymbolPlacement",pNeg:"negativePositiveSignPlacement",aSuffix:"suffixText",oLimits:"overrideMinMaxLimits",vMax:"maximumValue",vMin:"minimumValue",mDec:"decimalPlacesOverride",eDec:"decimalPlacesShownOnFocus",scaleDecimal:"decimalPlacesShownOnBlur",aStor:"saveValueToSessionStorage",mRound:"roundingMethod",aPad:"allowDecimalPadding",nBracket:"negativeBracketsTypeOnBlur",wEmpty:"emptyInputBehavior",lZero:"leadingZero",aForm:"formatOnPageLoad",sNumber:"selectNumberOnly",anDefault:"defaultValueOverride",unSetOnSubmit:"unformatOnSubmit",outputType:"outputFormat",debug:"showWarnings",allowDecimalPadding:!0,alwaysAllowDecimalCharacter:!0,caretPositionOnFocus:!0,createLocalList:!0,currencySymbol:!0,currencySymbolPlacement:!0,decimalCharacter:!0,decimalCharacterAlternative:!0,decimalPlaces:!0,decimalPlacesRawValue:!0,decimalPlacesShownOnBlur:!0,decimalPlacesShownOnFocus:!0,defaultValueOverride:!0,digitalGroupSpacing:!0,digitGroupSeparator:!0,divisorWhenUnfocused:!0,emptyInputBehavior:!0,eventBubbles:!0,eventIsCancelable:!0,failOnUnknownOption:!0,formatOnPageLoad:!0,formulaMode:!0,historySize:!0,isCancellable:!0,leadingZero:!0,maximumValue:!0,minimumValue:!0,modifyValueOnWheel:!0,negativeBracketsTypeOnBlur:!0,negativePositiveSignPlacement:!0,negativeSignCharacter:!0,noEventListeners:!0,onInvalidPaste:!0,outputFormat:!0,overrideMinMaxLimits:!0,positiveSignCharacter:!0,rawValueDivisor:!0,readOnly:!0,roundingMethod:!0,saveValueToSessionStorage:!0,selectNumberOnly:!0,selectOnFocus:!0,serializeSpaces:!0,showOnlyNumbersOnFocus:!0,showPositiveSign:!0,showWarnings:!0,styleRules:!0,suffixText:!0,symbolWhenUnfocused:!0,unformatOnHover:!0,unformatOnSubmit:!0,valuesToStrings:!0,watchExternalChanges:!0,wheelOn:!0,wheelStep:!0,allowedAutoStrip:!0,formulaChars:!0,isNegativeSignAllowed:!0,isPositiveSignAllowed:!0,mIntNeg:!0,mIntPos:!0,numRegAutoStrip:!0,originalDecimalPlaces:!0,originalDecimalPlacesRawValue:!0,stripReg:!0};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(!0===t[n])continue;Object.prototype.hasOwnProperty.call(t,n)?(i.warning("You are using the deprecated option name '".concat(n,"'. Please use '").concat(t[n],"' instead from now on. The old option name will be dropped very soon\u2122."),!0),e[t[n]]=e[n],delete e[n]):e.failOnUnknownOption&&i.throwError("Option name '".concat(n,"' is unknown. Please fix the options passed to autoNumeric"))}"mDec"in e&&i.warning("The old `mDec` option has been deprecated in favor of more accurate options ; `decimalPlaces`, `decimalPlacesRawValue`, `decimalPlacesShownOnFocus` and `decimalPlacesShownOnBlur`.",!0)}},{key:"_setNegativePositiveSignPermissions",value:function(e){e.isNegativeSignAllowed=e.minimumValue<0,e.isPositiveSignAllowed=0<=e.maximumValue}},{key:"_toNumericValue",value:function(e,t){var n;return i.isNumber(Number(e))?n=i.scientificToDecimal(e):(n=this._convertToNumericString(e.toString(),t),i.isNumber(Number(n))||(i.warning('The given value "'.concat(e,'" cannot be converted to a numeric one and therefore cannot be used appropriately.'),t.showWarnings),n=NaN)),n}},{key:"_checkIfInRange",value:function(e,t,n){var o=i.parseStr(e);return-1<i.testMinMax(t,o)&&i.testMinMax(n,o)<1}},{key:"_shouldSkipEventKey",value:function(e){var t=i.isInArray(e,v.keyName._allFnKeys),n=e===v.keyName.OSLeft||e===v.keyName.OSRight,o=e===v.keyName.ContextMenu,u=i.isInArray(e,v.keyName._someNonPrintableKeys);return t||n||o||u||e===v.keyName.Unidentified||e===v.keyName.NumLock||e===v.keyName.ScrollLock||e===v.keyName.Insert||e===v.keyName.Command}},{key:"_serialize",value:function(e,t,n,o,u){var r,g=this,d=1<arguments.length&&void 0!==t&&t,b=2<arguments.length&&void 0!==n?n:"unformatted",c=3<arguments.length&&void 0!==o?o:"+",f=4<arguments.length&&void 0!==u?u:null,p=[];return"object"===H(e)&&"form"===e.nodeName.toLowerCase()&&Array.prototype.slice.call(e.elements).forEach(function(y){if(y.name&&!y.disabled&&-1===["file","reset","submit","button"].indexOf(y.type))if("select-multiple"===y.type)Array.prototype.slice.call(y.options).forEach(function(U){U.selected&&p.push(d?{name:y.name,value:U.value}:"".concat(encodeURIComponent(y.name),"=").concat(encodeURIComponent(U.value)))});else if(-1===["checkbox","radio"].indexOf(y.type)||y.checked){var w,_;if(g.isManagedByAutoNumeric(y))switch(b){case"unformatted":_=g.getAutoNumericElement(y),i.isNull(_)||(w=g.unformat(y,_.getSettings()));break;case"localized":if(_=g.getAutoNumericElement(y),!i.isNull(_)){var I=i.cloneObject(_.getSettings());i.isNull(f)||(I.outputFormat=f),w=g.localize(y,I)}break;default:w=y.value}else w=y.value;i.isUndefined(w)&&i.throwError("This error should never be hit. If it has, something really wrong happened!"),p.push(d?{name:y.name,value:w}:"".concat(encodeURIComponent(y.name),"=").concat(encodeURIComponent(w)))}}),d?r=p:(r=p.join("&"),"+"===c&&(r=r.replace(/%20/g,"+"))),r}},{key:"_serializeNumericString",value:function(e,t){return this._serialize(e,!1,"unformatted",1<arguments.length&&void 0!==t?t:"+")}},{key:"_serializeFormatted",value:function(e,t){return this._serialize(e,!1,"formatted",1<arguments.length&&void 0!==t?t:"+")}},{key:"_serializeLocalized",value:function(e,t,n){return this._serialize(e,!1,"localized",1<arguments.length&&void 0!==t?t:"+",2<arguments.length&&void 0!==n?n:null)}},{key:"_serializeNumericStringArray",value:function(e,t){return this._serialize(e,!0,"unformatted",1<arguments.length&&void 0!==t?t:"+")}},{key:"_serializeFormattedArray",value:function(e,t){return this._serialize(e,!0,"formatted",1<arguments.length&&void 0!==t?t:"+")}},{key:"_serializeLocalizedArray",value:function(e,t,n){return this._serialize(e,!0,"localized",1<arguments.length&&void 0!==t?t:"+",2<arguments.length&&void 0!==n?n:null)}}],ue((s=a).prototype,[{key:"_saveInitialValues",value:function(e){this.initialValueHtmlAttribute=i.scientificToDecimal(this.domElement.getAttribute("value")),i.isNull(this.initialValueHtmlAttribute)&&(this.initialValueHtmlAttribute=""),this.initialValue=e,i.isNull(this.initialValue)&&(this.initialValue="")}},{key:"_createEventListeners",value:function(){var e=this;this.formulaMode=!1,this._onFocusInFunc=function(t){e._onFocusIn(t)},this._onFocusInAndMouseEnterFunc=function(t){e._onFocusInAndMouseEnter(t)},this._onFocusFunc=function(){e._onFocus()},this._onKeydownFunc=function(t){e._onKeydown(t)},this._onKeypressFunc=function(t){e._onKeypress(t)},this._onKeyupFunc=function(t){e._onKeyup(t)},this._onFocusOutAndMouseLeaveFunc=function(t){e._onFocusOutAndMouseLeave(t)},this._onPasteFunc=function(t){e._onPaste(t)},this._onWheelFunc=function(t){e._onWheel(t)},this._onDropFunc=function(t){e._onDrop(t)},this._onKeydownGlobalFunc=function(t){e._onKeydownGlobal(t)},this._onKeyupGlobalFunc=function(t){e._onKeyupGlobal(t)},this.domElement.addEventListener("focusin",this._onFocusInFunc,!1),this.domElement.addEventListener("focus",this._onFocusInAndMouseEnterFunc,!1),this.domElement.addEventListener("focus",this._onFocusFunc,!1),this.domElement.addEventListener("mouseenter",this._onFocusInAndMouseEnterFunc,!1),this.domElement.addEventListener("keydown",this._onKeydownFunc,!1),this.domElement.addEventListener("keypress",this._onKeypressFunc,!1),this.domElement.addEventListener("keyup",this._onKeyupFunc,!1),this.domElement.addEventListener("blur",this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.addEventListener("mouseleave",this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.addEventListener("paste",this._onPasteFunc,!1),this.domElement.addEventListener("wheel",this._onWheelFunc,!1),this.domElement.addEventListener("drop",this._onDropFunc,!1),this._setupFormListener(),this.hasEventListeners=!0,a._doesGlobalListExists()||(document.addEventListener("keydown",this._onKeydownGlobalFunc,!1),document.addEventListener("keyup",this._onKeyupGlobalFunc,!1))}},{key:"_removeEventListeners",value:function(){this.domElement.removeEventListener("focusin",this._onFocusInFunc,!1),this.domElement.removeEventListener("focus",this._onFocusInAndMouseEnterFunc,!1),this.domElement.removeEventListener("focus",this._onFocusFunc,!1),this.domElement.removeEventListener("mouseenter",this._onFocusInAndMouseEnterFunc,!1),this.domElement.removeEventListener("blur",this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.removeEventListener("mouseleave",this._onFocusOutAndMouseLeaveFunc,!1),this.domElement.removeEventListener("keydown",this._onKeydownFunc,!1),this.domElement.removeEventListener("keypress",this._onKeypressFunc,!1),this.domElement.removeEventListener("keyup",this._onKeyupFunc,!1),this.domElement.removeEventListener("paste",this._onPasteFunc,!1),this.domElement.removeEventListener("wheel",this._onWheelFunc,!1),this.domElement.removeEventListener("drop",this._onDropFunc,!1),this._removeFormListener(),this.hasEventListeners=!1,document.removeEventListener("keydown",this._onKeydownGlobalFunc,!1),document.removeEventListener("keyup",this._onKeyupGlobalFunc,!1)}},{key:"_updateEventListeners",value:function(){this.settings.noEventListeners||this.hasEventListeners||this._createEventListeners(),this.settings.noEventListeners&&this.hasEventListeners&&this._removeEventListeners()}},{key:"_setupFormListener",value:function(){var e=this;i.isNull(this.parentForm)||(this._onFormSubmitFunc=function(){e._onFormSubmit()},this._onFormResetFunc=function(){e._onFormReset()},this._hasParentFormCounter()?this._incrementParentFormCounter():(this._initializeFormCounterToOne(),this.parentForm.addEventListener("submit",this._onFormSubmitFunc,!1),this.parentForm.addEventListener("reset",this._onFormResetFunc,!1),this._storeFormHandlerFunction()))}},{key:"_removeFormListener",value:function(){if(!i.isNull(this.parentForm)){var e=this._getParentFormCounter();1===e?(this.parentForm.removeEventListener("submit",this._getFormHandlerFunction().submitFn,!1),this.parentForm.removeEventListener("reset",this._getFormHandlerFunction().resetFn,!1),this._removeFormDataSetInfo()):1<e?this._decrementParentFormCounter():i.throwError("The AutoNumeric object count on the form is incoherent.")}}},{key:"_hasParentFormCounter",value:function(){return"anCount"in this.parentForm.dataset}},{key:"_getParentFormCounter",value:function(){return Number(this.parentForm.dataset.anCount)}},{key:"_initializeFormCounterToOne",value:function(e){this._getFormElement(0<arguments.length&&void 0!==e?e:null).dataset.anCount=1}},{key:"_incrementParentFormCounter",value:function(e){this._getFormElement(0<arguments.length&&void 0!==e?e:null).dataset.anCount++}},{key:"_decrementParentFormCounter",value:function(){this.parentForm.dataset.anCount--}},{key:"_hasFormHandlerFunction",value:function(e){return"anFormHandler"in this._getFormElement(0<arguments.length&&void 0!==e?e:null).dataset}},{key:"_getFormElement",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return i.isNull(t)?this.parentForm:t}},{key:"_storeFormHandlerFunction",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;this.constructor._doesFormHandlerListExists()||this.constructor._createFormHandlerList();var n=i.randomString();this._getFormElement(t).dataset.anFormHandler=n,window.aNFormHandlerMap.set(n,{submitFn:this._onFormSubmitFunc,resetFn:this._onFormResetFunc})}},{key:"_getFormHandlerKey",value:function(){this._hasFormHandlerFunction()||i.throwError("Unable to retrieve the form handler name");var e=this.parentForm.dataset.anFormHandler;return""===e&&i.throwError("The form handler name is invalid"),e}},{key:"_getFormHandlerFunction",value:function(){var e=this._getFormHandlerKey();return window.aNFormHandlerMap.get(e)}},{key:"_removeFormDataSetInfo",value:function(){this._decrementParentFormCounter(),window.aNFormHandlerMap.delete(this._getFormHandlerKey()),this.parentForm.removeAttribute("data-an-count"),this.parentForm.removeAttribute("data-an-form-handler")}},{key:"_setWritePermissions",value:function(e){0<arguments.length&&void 0!==e&&e&&this.domElement.readOnly||this.settings.readOnly?this._setReadOnly():this._setReadWrite()}},{key:"_setReadOnly",value:function(){this.isInputElement?this.domElement.readOnly=!0:this.domElement.setAttribute("contenteditable",!1)}},{key:"_setReadWrite",value:function(){this.isInputElement?this.domElement.readOnly=!1:this.domElement.setAttribute("contenteditable",!0)}},{key:"_addWatcher",value:function(){var e=this;if(!i.isUndefined(this.getterSetter)){var t=this.getterSetter,n=t.set,o=t.get;Object.defineProperty(this.domElement,this.attributeToWatch,{configurable:!0,get:function(){return o.call(e.domElement)},set:function(u){n.call(e.domElement,u),e.settings.watchExternalChanges&&!e.internalModification&&e.set(u)}})}}},{key:"_removeWatcher",value:function(){var e=this;if(!i.isUndefined(this.getterSetter)){var t=this.getterSetter,n=t.set,o=t.get;Object.defineProperty(this.domElement,this.attributeToWatch,{configurable:!0,get:function(){return o.call(e.domElement)},set:function(u){n.call(e.domElement,u)}})}}},{key:"_getAttributeToWatch",value:function(){var e;if(this.isInputElement)e="value";else{var t=this.domElement.nodeType;t===Node.ELEMENT_NODE||t===Node.DOCUMENT_NODE||t===Node.DOCUMENT_FRAGMENT_NODE?e="textContent":t===Node.TEXT_NODE&&(e="nodeValue")}return e}},{key:"_historyTableAdd",value:function(){var e=0===this.historyTable.length;if(e||this.rawValue!==this._historyTableCurrentValueUsed()){var t=!0;if(!e){var n=this.historyTableIndex+1;n<this.historyTable.length&&this.rawValue===this.historyTable[n].value?t=!1:i.arrayTrim(this.historyTable,this.historyTableIndex+1)}if(this.historyTableIndex++,t){var o=i.getElementSelection(this.domElement);this.selectionStart=o.start,this.selectionEnd=o.end,this.historyTable.push({value:this.rawValue,start:this.selectionStart+1,end:this.selectionEnd+1}),1<this.historyTable.length&&(this.historyTable[this.historyTableIndex-1].start=this.selectionStart,this.historyTable[this.historyTableIndex-1].end=this.selectionEnd)}this.historyTable.length>this.settings.historySize&&this._historyTableForget()}}},{key:"_historyTableUndoOrRedo",value:function(e){var t;if(0<arguments.length&&void 0!==e&&!e?(t=this.historyTableIndex+1<this.historyTable.length)&&this.historyTableIndex++:(t=0<this.historyTableIndex)&&this.historyTableIndex--,t){var n=this.historyTable[this.historyTableIndex];this.set(n.value,null,!1),i.setElementSelection(this.domElement,n.start,n.end)}}},{key:"_historyTableUndo",value:function(){this._historyTableUndoOrRedo(!0)}},{key:"_historyTableRedo",value:function(){this._historyTableUndoOrRedo(!1)}},{key:"_historyTableForget",value:function(e){for(var t=0<arguments.length&&void 0!==e?e:1,n=[],o=0;o<t;o++)n.push(this.historyTable.shift()),this.historyTableIndex--,this.historyTableIndex<0&&(this.historyTableIndex=0);return 1===n.length?n[0]:n}},{key:"_historyTableCurrentValueUsed",value:function(){var e=this.historyTableIndex;return e<0&&(e=0),i.isUndefinedOrNullOrEmpty(this.historyTable[e])?"":this.historyTable[e].value}},{key:"_parseStyleRules",value:function(){var e=this;i.isUndefinedOrNullOrEmpty(this.settings.styleRules)||""===this.rawValue||(i.isUndefinedOrNullOrEmpty(this.settings.styleRules.positive)||(0<=this.rawValue?this._addCSSClass(this.settings.styleRules.positive):this._removeCSSClass(this.settings.styleRules.positive)),i.isUndefinedOrNullOrEmpty(this.settings.styleRules.negative)||(this.rawValue<0?this._addCSSClass(this.settings.styleRules.negative):this._removeCSSClass(this.settings.styleRules.negative)),i.isUndefinedOrNullOrEmpty(this.settings.styleRules.ranges)||0===this.settings.styleRules.ranges.length||this.settings.styleRules.ranges.forEach(function(t){e.rawValue>=t.min&&e.rawValue<t.max?e._addCSSClass(t.class):e._removeCSSClass(t.class)}),i.isUndefinedOrNullOrEmpty(this.settings.styleRules.userDefined)||0===this.settings.styleRules.userDefined.length||this.settings.styleRules.userDefined.forEach(function(t){if(i.isFunction(t.callback))if(i.isString(t.classes))t.callback(e.rawValue)?e._addCSSClass(t.classes):e._removeCSSClass(t.classes);else if(i.isArray(t.classes))if(2===t.classes.length)t.callback(e.rawValue)?(e._addCSSClass(t.classes[0]),e._removeCSSClass(t.classes[1])):(e._removeCSSClass(t.classes[0]),e._addCSSClass(t.classes[1]));else if(2<t.classes.length){var n=t.callback(e.rawValue);i.isArray(n)?t.classes.forEach(function(o,u){i.isInArray(u,n)?e._addCSSClass(o):e._removeCSSClass(o)}):i.isInt(n)?t.classes.forEach(function(o,u){u===n?e._addCSSClass(o):e._removeCSSClass(o)}):i.isNull(n)?t.classes.forEach(function(o){e._removeCSSClass(o)}):i.throwError("The callback result is not an array nor a valid array index, ".concat(H(n)," given."))}else i.throwError("The classes attribute is not valid for the `styleRules` option.");else i.isUndefinedOrNullOrEmpty(t.classes)?t.callback(e):i.throwError("The callback/classes structure is not valid for the `styleRules` option.");else i.warning("The given `styleRules` callback is not a function, ".concat(typeof callback>"u"?"undefined":H(callback)," given."),e.settings.showWarnings)}))}},{key:"_addCSSClass",value:function(e){this.domElement.classList.add(e)}},{key:"_removeCSSClass",value:function(e){this.domElement.classList.remove(e)}},{key:"update",value:function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];Array.isArray(n)&&Array.isArray(n[0])&&(n=n[0]);var u=i.cloneObject(this.settings),r=this.rawValue,g={};i.isUndefinedOrNullOrEmpty(n)||0===n.length?g=null:1<=n.length&&n.forEach(function(d){e.constructor._isPreDefinedOptionValid(d)&&(d=e.constructor._getOptionObject(d)),Z(g,d)});try{this._setSettings(g,!0),this._setWritePermissions(),this._updateEventListeners(),this.set(r)}catch(d){return this._setSettings(u,!0),i.throwError("Unable to update the settings, those are invalid: [".concat(d,"]")),this}return this}},{key:"getSettings",value:function(){return this.settings}},{key:"set",value:function(e,t,n){var o,u=1<arguments.length&&void 0!==t?t:null,r=!(2<arguments.length&&void 0!==n)||n;if(i.isUndefined(e))return i.warning("You are trying to set an 'undefined' value ; an error could have occurred.",this.settings.showWarnings),this;if(i.isNull(u)||this._setSettings(u,!0),null===e&&this.settings.emptyInputBehavior!==a.options.emptyInputBehavior.null)return i.warning("You are trying to set the `null` value while the `emptyInputBehavior` option is set to ".concat(this.settings.emptyInputBehavior,". If you want to be able to set the `null` value, you need to change the 'emptyInputBehavior' option to `'null'`."),this.settings.showWarnings),this;if(null===e)return this._setElementAndRawValue(null,null,r),this._saveValueToPersistentStorage(),this;if(o=this.constructor._toNumericValue(e,this.settings),isNaN(Number(o)))return i.warning("The value you are trying to set results in `NaN`. The element value is set to the empty string instead.",this.settings.showWarnings),this.setValue("",r),this;if(""===o)switch(this.settings.emptyInputBehavior){case a.options.emptyInputBehavior.zero:o=0;break;case a.options.emptyInputBehavior.min:o=this.settings.minimumValue;break;case a.options.emptyInputBehavior.max:o=this.settings.maximumValue;break;default:i.isNumber(this.settings.emptyInputBehavior)&&(o=Number(this.settings.emptyInputBehavior))}if(""===o)return this._setElementAndRawValue(this.settings.emptyInputBehavior===a.options.emptyInputBehavior.always?this.settings.currencySymbol:"","",r),this;var d=V(this.constructor._checkIfInRangeWithOverrideOption(o,this.settings),2),b=d[0],c=d[1];if(b&&c&&this.settings.valuesToStrings&&this._checkValuesToStrings(o))return this._setElementAndRawValue(this.settings.valuesToStrings[o],o,r),this._saveValueToPersistentStorage(),this;if(i.isZeroOrHasNoValue(o)&&(o="0"),b&&c){var f=this.constructor._roundRawValue(o,this.settings);return f=this._trimLeadingAndTrailingZeros(f.replace(this.settings.decimalCharacter,".")),o=this._getRawValueToFormat(o),o=this.isFocused?this.constructor._roundFormattedValueShownOnFocus(o,this.settings):(this.settings.divisorWhenUnfocused&&(o=(o/=this.settings.divisorWhenUnfocused).toString()),this.constructor._roundFormattedValueShownOnBlur(o,this.settings)),o=this.constructor._modifyNegativeSignAndDecimalCharacterForFormattedValue(o,this.settings),o=this.constructor._addGroupSeparators(o,this.settings,this.isFocused,this.rawValue,f),!this.isFocused&&this.settings.symbolWhenUnfocused&&(o="".concat(o).concat(this.settings.symbolWhenUnfocused)),(this.settings.decimalPlacesShownOnFocus||this.settings.divisorWhenUnfocused)&&this._saveValueToPersistentStorage(),this._setElementAndRawValue(o,f,r),this._setValidOrInvalidState(f),this}return this._triggerRangeEvents(b,c),i.throwError("The value [".concat(o,"] being set falls outside of the minimumValue [").concat(this.settings.minimumValue,"] and maximumValue [").concat(this.settings.maximumValue,"] range set for this element")),this._removeValueFromPersistentStorage(),this.setValue("",r),this}},{key:"setUnformatted",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:null;if(null===e||i.isUndefined(e))return this;i.isNull(n)||this._setSettings(n,!0);var o=this.constructor._removeBrackets(e,this.settings),u=this.constructor._stripAllNonNumberCharacters(o,this.settings,!0,this.isFocused);return i.isNumber(u)||i.throwError("The value is not a valid one, it's not a numeric string nor a recognized currency."),this.constructor._isWithinRangeWithOverrideOption(u,this.settings)?this.setValue(e):i.throwError("The value is out of the range limits [".concat(this.settings.minimumValue,", ").concat(this.settings.maximumValue,"].")),this}},{key:"setValue",value:function(e,t){return this._setElementAndRawValue(e,!(1<arguments.length&&void 0!==t)||t),this}},{key:"_setRawValue",value:function(e,t){var n=!(1<arguments.length&&void 0!==t)||t;if(this.rawValue!==e){var o=this.rawValue;this.rawValue=e,!i.isNull(this.settings.rawValueDivisor)&&0!==this.settings.rawValueDivisor&&""!==e&&null!==e&&this._isUserManuallyEditingTheValue()&&(this.rawValue/=this.settings.rawValueDivisor),this._triggerEvent(a.events.rawValueModified,this.domElement,{oldRawValue:o,newRawValue:this.rawValue,isPristine:this.isPristine(!0),error:null,aNElement:this}),this._parseStyleRules(),n&&this._historyTableAdd()}}},{key:"_setElementValue",value:function(e,t){var n=!(1<arguments.length&&void 0!==t)||t,o=i.getElementValue(this.domElement);return e!==o&&(this.internalModification=!0,i.setElementValue(this.domElement,e),this.internalModification=!1,n&&this._triggerEvent(a.events.formatted,this.domElement,{oldValue:o,newValue:e,oldRawValue:this.rawValue,newRawValue:this.rawValue,isPristine:this.isPristine(!1),error:null,aNElement:this})),this}},{key:"_setElementAndRawValue",value:function(e,t,n){var o=1<arguments.length&&void 0!==t?t:null,u=!(2<arguments.length&&void 0!==n)||n;return i.isNull(o)?o=e:i.isBoolean(o)&&(u=o,o=e),this._setElementValue(e),this._setRawValue(o,u),this}},{key:"_getRawValueToFormat",value:function(e){return i.isNull(this.settings.rawValueDivisor)||0===this.settings.rawValueDivisor||""===e||null===e?e:e*this.settings.rawValueDivisor}},{key:"_checkValuesToStrings",value:function(e){return this.constructor._checkValuesToStringsArray(e,this.valuesToStringsKeys)}},{key:"_isUserManuallyEditingTheValue",value:function(){return this.isFocused&&this.isEditing||this.isDropEvent}},{key:"_executeCallback",value:function(e,t){!i.isNull(t)&&i.isFunction(t)&&t(e,this)}},{key:"_triggerEvent",value:function(e,t,n){var o=1<arguments.length&&void 0!==t?t:document;i.triggerEvent(e,o,2<arguments.length&&void 0!==n?n:null,this.settings.eventBubbles,this.settings.eventIsCancelable)}},{key:"get",value:function(e){return this.getNumericString(0<arguments.length&&void 0!==e?e:null)}},{key:"getNumericString",value:function(e){var t,n=0<arguments.length&&void 0!==e?e:null;return t=i.isNull(this.rawValue)?null:i.trimPaddedZerosFromDecimalPlaces(this.rawValue),this._executeCallback(t,n),t}},{key:"getFormatted",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;"value"in this.domElement||"textContent"in this.domElement||i.throwError("Unable to get the formatted string from the element.");var n=i.getElementValue(this.domElement);return this._executeCallback(n,t),n}},{key:"getNumber",value:function(e){var t,n=0<arguments.length&&void 0!==e?e:null;return t=null===this.rawValue?null:this.constructor._toLocale(this.getNumericString(),"number",this.settings),this._executeCallback(t,n),t}},{key:"getLocalized",value:function(e,t){var n,o,u=0<arguments.length&&void 0!==e?e:null,r=1<arguments.length&&void 0!==t?t:null;i.isFunction(u)&&i.isNull(r)&&(r=u,u=null),(n=i.isEmptyString(this.rawValue)?"":""+Number(this.rawValue))&&0===Number(n)&&this.settings.leadingZero!==a.options.leadingZero.keep&&(n="0"),o=i.isNull(u)?this.settings.outputFormat:u;var g=this.constructor._toLocale(n,o,this.settings);return this._executeCallback(g,r),g}},{key:"reformat",value:function(){return this.set(this.rawValue),this}},{key:"unformat",value:function(){return this._setElementValue(this.getNumericString()),this}},{key:"unformatLocalized",value:function(e){return this._setElementValue(this.getLocalized(0<arguments.length&&void 0!==e?e:null)),this}},{key:"isPristine",value:function(e){return 0<arguments.length&&void 0!==e&&!e?this.initialValueHtmlAttribute===this.getFormatted():this.initialValue===this.getNumericString()}},{key:"select",value:function(){return this.settings.selectNumberOnly?this.selectNumber():this._defaultSelectAll(),this}},{key:"_defaultSelectAll",value:function(){i.setElementSelection(this.domElement,0,i.getElementValue(this.domElement).length)}},{key:"selectNumber",value:function(){var e,t,n=i.getElementValue(this.domElement),o=n.length,u=this.settings.currencySymbol.length,r=this.settings.currencySymbolPlacement,g=i.isNegative(n,this.settings.negativeSignCharacter)?1:0,d=this.settings.suffixText.length;if(e=r===a.options.currencySymbolPlacement.suffix?0:this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.left&&1==g&&0<u?u+1:u,r===a.options.currencySymbolPlacement.prefix)t=o-d;else switch(this.settings.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.left:t=o-(d+u);break;case a.options.negativePositiveSignPlacement.right:t=0<u?o-(u+g+d):o-(u+d);break;default:t=o-(u+d)}return i.setElementSelection(this.domElement,e,t),this}},{key:"selectInteger",value:function(){var e=0,t=0<=this.rawValue;this.settings.currencySymbolPlacement!==a.options.currencySymbolPlacement.prefix&&(this.settings.currencySymbolPlacement!==a.options.currencySymbolPlacement.suffix||this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.prefix&&this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none)||(this.settings.showPositiveSign&&t||!t&&this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.left)&&(e+=1),this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.prefix&&(e+=this.settings.currencySymbol.length);var n=i.getElementValue(this.domElement),o=n.indexOf(this.settings.decimalCharacter);return-1===o&&(o=this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix?n.length-this.settings.currencySymbol.length:n.length,t||this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.suffix&&this.settings.currencySymbolPlacement!==a.options.currencySymbolPlacement.suffix||--o,o-=this.settings.suffixText.length),i.setElementSelection(this.domElement,e,o),this}},{key:"selectDecimal",value:function(){var e,n=i.getElementValue(this.domElement).indexOf(this.settings.decimalCharacter);return e=-1===n?n=0:(n+=1)+Number(this.isFocused?this.settings.decimalPlacesShownOnFocus:this.settings.decimalPlacesShownOnBlur),i.setElementSelection(this.domElement,n,e),this}},{key:"node",value:function(){return this.domElement}},{key:"parent",value:function(){return this.domElement.parentNode}},{key:"detach",value:function(e){var t,n=0<arguments.length&&void 0!==e?e:null;return t=i.isNull(n)?this.domElement:n.node(),this._removeFromLocalList(t),this}},{key:"attach",value:function(e,t){var n=!(1<arguments.length&&void 0!==t)||t;return this._addToLocalList(e.node()),n&&e.update(this.settings),this}},{key:"formatOther",value:function(e,t){return this._formatOrUnformatOther(!0,e,1<arguments.length&&void 0!==t?t:null)}},{key:"unformatOther",value:function(e,t){return this._formatOrUnformatOther(!1,e,1<arguments.length&&void 0!==t?t:null)}},{key:"_formatOrUnformatOther",value:function(e,t,n){var o,u,r=2<arguments.length&&void 0!==n?n:null;if(o=i.isNull(r)?this.settings:this._cloneAndMergeSettings(r),i.isElement(t)){var g=i.getElementValue(t);return u=e?a.format(g,o):a.unformat(g,o),i.setElementValue(t,u),null}return e?a.format(t,o):a.unformat(t,o)}},{key:"init",value:function(e,t){var n=this,o=!(1<arguments.length&&void 0!==t)||t,u=!1,r=[];if(i.isString(e)?r=ie(document.querySelectorAll(e)):i.isElement(e)?(r.push(e),u=!0):i.isArray(e)?r=e:i.throwError("The given parameters to the 'init' function are invalid."),0===r.length)return i.warning("No valid DOM elements were given hence no AutoNumeric object were instantiated.",!0),[];var g=this._getLocalList(),d=[];return r.forEach(function(b){var c=n.settings.createLocalList;o&&(n.settings.createLocalList=!1);var f=new a(b,i.getElementValue(b),n.settings);o&&(f._setLocalList(g),n._addToLocalList(b,f),n.settings.createLocalList=c),d.push(f)}),u?d[0]:d}},{key:"clear",value:function(e){return 0<arguments.length&&void 0!==e&&e?this.set("",{emptyInputBehavior:a.options.emptyInputBehavior.focus}):this.set(""),this}},{key:"remove",value:function(){this._removeValueFromPersistentStorage(),this._removeEventListeners(),this._removeWatcher(),this._removeFromLocalList(this.domElement),this.constructor._removeFromGlobalList(this)}},{key:"wipe",value:function(){this._setElementValue("",!1),this.remove()}},{key:"nuke",value:function(){this.remove(),this.domElement.parentNode.removeChild(this.domElement)}},{key:"form",value:function(e){if(0<arguments.length&&void 0!==e&&e||i.isUndefinedOrNullOrEmpty(this.parentForm)){var t=this._getParentForm();if(!i.isNull(t)&&t!==this.parentForm){var n=this._getFormAutoNumericChildren(this.parentForm);this.parentForm.dataset.anCount=n.length,this._hasFormHandlerFunction(t)?this._incrementParentFormCounter(t):(this._storeFormHandlerFunction(t),this._initializeFormCounterToOne(t))}this.parentForm=t}return this.parentForm}},{key:"_getFormAutoNumericChildren",value:function(e){var t=this;return ie(e.querySelectorAll("input")).filter(function(n){return t.constructor.isManagedByAutoNumeric(n)})}},{key:"_getParentForm",value:function(){if("body"===this.domElement.tagName.toLowerCase())return null;var e,t=this.domElement;do{if(i.isNull(t=t.parentNode))return null;if("body"===(e=t.tagName?t.tagName.toLowerCase():""))break}while("form"!==e);return"form"===e?t:null}},{key:"formNumericString",value:function(){return this.constructor._serializeNumericString(this.form(),this.settings.serializeSpaces)}},{key:"formFormatted",value:function(){return this.constructor._serializeFormatted(this.form(),this.settings.serializeSpaces)}},{key:"formLocalized",value:function(e){var t,n=0<arguments.length&&void 0!==e?e:null;return t=i.isNull(n)?this.settings.outputFormat:n,this.constructor._serializeLocalized(this.form(),this.settings.serializeSpaces,t)}},{key:"formArrayNumericString",value:function(){return this.constructor._serializeNumericStringArray(this.form(),this.settings.serializeSpaces)}},{key:"formArrayFormatted",value:function(){return this.constructor._serializeFormattedArray(this.form(),this.settings.serializeSpaces)}},{key:"formArrayLocalized",value:function(e){var t,n=0<arguments.length&&void 0!==e?e:null;return t=i.isNull(n)?this.settings.outputFormat:n,this.constructor._serializeLocalizedArray(this.form(),this.settings.serializeSpaces,t)}},{key:"formJsonNumericString",value:function(){return JSON.stringify(this.formArrayNumericString())}},{key:"formJsonFormatted",value:function(){return JSON.stringify(this.formArrayFormatted())}},{key:"formJsonLocalized",value:function(e){return JSON.stringify(this.formArrayLocalized(0<arguments.length&&void 0!==e?e:null))}},{key:"formUnformat",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(e){a.getAutoNumericElement(e).unformat()}),this}},{key:"formUnformatLocalized",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(e){a.getAutoNumericElement(e).unformatLocalized()}),this}},{key:"formReformat",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(e){a.getAutoNumericElement(e).reformat()}),this}},{key:"formSubmitNumericString",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return i.isNull(t)?(this.formUnformat(),this.form().submit(),this.formReformat()):i.isFunction(t)?t(this.formNumericString()):i.throwError("The given callback is not a function."),this}},{key:"formSubmitFormatted",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return i.isNull(t)?this.form().submit():i.isFunction(t)?t(this.formFormatted()):i.throwError("The given callback is not a function."),this}},{key:"formSubmitLocalized",value:function(e,t){var n=0<arguments.length&&void 0!==e?e:null,o=1<arguments.length&&void 0!==t?t:null;return i.isNull(o)?(this.formUnformatLocalized(),this.form().submit(),this.formReformat()):i.isFunction(o)?o(this.formLocalized(n)):i.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayNumericString",value:function(e){return i.isFunction(e)?e(this.formArrayNumericString()):i.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayFormatted",value:function(e){return i.isFunction(e)?e(this.formArrayFormatted()):i.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayLocalized",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:null;return i.isFunction(e)?e(this.formArrayLocalized(n)):i.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonNumericString",value:function(e){return i.isFunction(e)?e(this.formJsonNumericString()):i.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonFormatted",value:function(e){return i.isFunction(e)?e(this.formJsonFormatted()):i.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonLocalized",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:null;return i.isFunction(e)?e(this.formJsonLocalized(n)):i.throwError("The given callback is not a function."),this}},{key:"_createLocalList",value:function(){this.autoNumericLocalList=new Map,this._addToLocalList(this.domElement)}},{key:"_deleteLocalList",value:function(){delete this.autoNumericLocalList}},{key:"_setLocalList",value:function(e){this.autoNumericLocalList=e}},{key:"_getLocalList",value:function(){return this.autoNumericLocalList}},{key:"_hasLocalList",value:function(){return this.autoNumericLocalList instanceof Map&&0!==this.autoNumericLocalList.size}},{key:"_addToLocalList",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:null;i.isNull(n)&&(n=this),i.isUndefined(this.autoNumericLocalList)?i.throwError("The local list provided does not exists when trying to add an element. [".concat(this.autoNumericLocalList,"] given.")):this.autoNumericLocalList.set(e,n)}},{key:"_removeFromLocalList",value:function(e){i.isUndefined(this.autoNumericLocalList)?this.settings.createLocalList&&i.throwError("The local list provided does not exists when trying to remove an element. [".concat(this.autoNumericLocalList,"] given.")):this.autoNumericLocalList.delete(e)}},{key:"_mergeSettings",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Z.apply(void 0,[this.settings].concat(t))}},{key:"_cloneAndMergeSettings",value:function(){for(var e={},t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Z.apply(void 0,[e,this.settings].concat(n)),e}},{key:"_updatePredefinedOptions",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:null;return i.isNull(n)?this.update(e):(this._mergeSettings(e,n),this.update(this.settings)),this}},{key:"french",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(a.getPredefinedOptions().French,t),this}},{key:"northAmerican",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(a.getPredefinedOptions().NorthAmerican,t),this}},{key:"british",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(a.getPredefinedOptions().British,t),this}},{key:"swiss",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(a.getPredefinedOptions().Swiss,t),this}},{key:"japanese",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(a.getPredefinedOptions().Japanese,t),this}},{key:"spanish",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(a.getPredefinedOptions().Spanish,t),this}},{key:"chinese",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(a.getPredefinedOptions().Chinese,t),this}},{key:"brazilian",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(a.getPredefinedOptions().Brazilian,t),this}},{key:"_runCallbacksFoundInTheSettingsObject",value:function(){for(var e in this.settings)if(Object.prototype.hasOwnProperty.call(this.settings,e)){var t=this.settings[e];if("function"==typeof t)this.settings[e]=t(this,e);else{var n=this.domElement.getAttribute(e);n=i.camelize(n),"function"==typeof this.settings[n]&&(this.settings[e]=n(this,e))}}}},{key:"_setTrailingNegativeSignInfo",value:function(){this.isTrailingNegative=this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.suffix||this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix&&(this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.left||this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.right)}},{key:"_modifyNegativeSignAndDecimalCharacterForRawValue",value:function(e){return"."!==this.settings.decimalCharacter&&(e=e.replace(this.settings.decimalCharacter,".")),"-"!==this.settings.negativeSignCharacter&&this.settings.isNegativeSignAllowed&&(e=e.replace(this.settings.negativeSignCharacter,"-")),e.match(/\d/)||(e+="0"),e}},{key:"_initialCaretPosition",value:function(e){i.isNull(this.settings.caretPositionOnFocus)&&this.settings.selectOnFocus===a.options.selectOnFocus.doNotSelect&&i.throwError("`_initialCaretPosition()` should never be called when the `caretPositionOnFocus` option is `null`.");var t=this.rawValue<0,n=i.isZeroOrHasNoValue(e),o=e.length,u=0,r=0,g=!1,d=0;this.settings.caretPositionOnFocus!==a.options.caretPositionOnFocus.start&&(u=(e=(e=(e=e.replace(this.settings.negativeSignCharacter,"")).replace(this.settings.positiveSignCharacter,"")).replace(this.settings.currencySymbol,"")).length,g=i.contains(e,this.settings.decimalCharacter),this.settings.caretPositionOnFocus!==a.options.caretPositionOnFocus.decimalLeft&&this.settings.caretPositionOnFocus!==a.options.caretPositionOnFocus.decimalRight||(d=g?(r=e.indexOf(this.settings.decimalCharacter),this.settings.decimalCharacter.length):(r=u,0)));var b="";t?b=this.settings.negativeSignCharacter:this.settings.showPositiveSign&&!n&&(b=this.settings.positiveSignCharacter);var c,f=b.length,p=this.settings.currencySymbol.length;if(this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.prefix){if(this.settings.caretPositionOnFocus===a.options.caretPositionOnFocus.start)if(this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none&&(t||!t&&this.settings.showPositiveSign&&!n))switch(this.settings.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.prefix:case a.options.negativePositiveSignPlacement.left:case a.options.negativePositiveSignPlacement.right:c=f+p;break;case a.options.negativePositiveSignPlacement.suffix:c=p}else c=p;else if(this.settings.caretPositionOnFocus===a.options.caretPositionOnFocus.end)if(this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none&&(t||!t&&this.settings.showPositiveSign&&!n))switch(this.settings.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.prefix:case a.options.negativePositiveSignPlacement.left:case a.options.negativePositiveSignPlacement.right:c=o;break;case a.options.negativePositiveSignPlacement.suffix:c=p+u}else c=o;else if(this.settings.caretPositionOnFocus===a.options.caretPositionOnFocus.decimalLeft)if(this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none&&(t||!t&&this.settings.showPositiveSign&&!n))switch(this.settings.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.prefix:case a.options.negativePositiveSignPlacement.left:case a.options.negativePositiveSignPlacement.right:c=f+p+r;break;case a.options.negativePositiveSignPlacement.suffix:c=p+r}else c=p+r;else if(this.settings.caretPositionOnFocus===a.options.caretPositionOnFocus.decimalRight)if(this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none&&(t||!t&&this.settings.showPositiveSign&&!n))switch(this.settings.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.prefix:case a.options.negativePositiveSignPlacement.left:case a.options.negativePositiveSignPlacement.right:c=f+p+r+d;break;case a.options.negativePositiveSignPlacement.suffix:c=p+r+d}else c=p+r+d}else if(this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix)if(this.settings.caretPositionOnFocus===a.options.caretPositionOnFocus.start)if(this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none&&(t||!t&&this.settings.showPositiveSign&&!n))switch(this.settings.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.suffix:case a.options.negativePositiveSignPlacement.right:case a.options.negativePositiveSignPlacement.left:c=0;break;case a.options.negativePositiveSignPlacement.prefix:c=f}else c=0;else if(this.settings.caretPositionOnFocus===a.options.caretPositionOnFocus.end)if(this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none&&(t||!t&&this.settings.showPositiveSign&&!n))switch(this.settings.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.suffix:case a.options.negativePositiveSignPlacement.right:case a.options.negativePositiveSignPlacement.left:c=u;break;case a.options.negativePositiveSignPlacement.prefix:c=f+u}else c=u;else if(this.settings.caretPositionOnFocus===a.options.caretPositionOnFocus.decimalLeft)if(this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none&&(t||!t&&this.settings.showPositiveSign&&!n))switch(this.settings.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.suffix:case a.options.negativePositiveSignPlacement.right:case a.options.negativePositiveSignPlacement.left:c=r;break;case a.options.negativePositiveSignPlacement.prefix:c=f+r}else c=r;else if(this.settings.caretPositionOnFocus===a.options.caretPositionOnFocus.decimalRight)if(this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.none&&(t||!t&&this.settings.showPositiveSign&&!n))switch(this.settings.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.suffix:case a.options.negativePositiveSignPlacement.right:case a.options.negativePositiveSignPlacement.left:c=r+d;break;case a.options.negativePositiveSignPlacement.prefix:c=f+r+d}else c=r+d;return c}},{key:"_triggerRangeEvents",value:function(e,t){e||this._triggerEvent(a.events.minRangeExceeded,this.domElement),t||this._triggerEvent(a.events.maxRangeExceeded,this.domElement)}},{key:"_setInvalidState",value:function(){this.isInputElement?i.setInvalidState(this.domElement):this._addCSSClass(this.settings.invalidClass),this._triggerEvent(a.events.invalidValue,this.domElement),this.validState=!1}},{key:"_setValidState",value:function(){this.isInputElement?i.setValidState(this.domElement):this._removeCSSClass(this.settings.invalidClass),this.validState||this._triggerEvent(a.events.correctedValue,this.domElement),this.validState=!0}},{key:"_setValidOrInvalidState",value:function(e){if(this.settings.overrideMinMaxLimits===a.options.overrideMinMaxLimits.invalid){var t=this.constructor._isMinimumRangeRespected(e,this.settings),n=this.constructor._isMaximumRangeRespected(e,this.settings);t&&n?this._setValidState():this._setInvalidState(),this._triggerRangeEvents(t,n)}}},{key:"_keepAnOriginalSettingsCopy",value:function(){this.originalDigitGroupSeparator=this.settings.digitGroupSeparator,this.originalCurrencySymbol=this.settings.currencySymbol,this.originalSuffixText=this.settings.suffixText}},{key:"_trimLeadingAndTrailingZeros",value:function(e){if(""===e||null===e)return e;if(this.settings.leadingZero!==a.options.leadingZero.keep){if(0===Number(e))return"0";e=e.replace(/^(-)?0+(?=\d)/g,"$1")}return i.contains(e,".")&&(e=e.replace(/(\.[0-9]*?)0+$/,"$1")),e.replace(/\.$/,"")}},{key:"_setPersistentStorageName",value:function(){this.settings.saveValueToSessionStorage&&(this.rawValueStorageName=""===this.domElement.name||i.isUndefined(this.domElement.name)?"".concat(this.storageNamePrefix).concat(this.domElement.id):"".concat(this.storageNamePrefix).concat(decodeURIComponent(this.domElement.name)))}},{key:"_saveValueToPersistentStorage",value:function(){this.settings.saveValueToSessionStorage&&(this.sessionStorageAvailable?sessionStorage.setItem(this.rawValueStorageName,this.rawValue):document.cookie="".concat(this.rawValueStorageName,"=").concat(this.rawValue,"; expires= ; path=/"))}},{key:"_getValueFromPersistentStorage",value:function(){return this.settings.saveValueToSessionStorage?this.sessionStorageAvailable?sessionStorage.getItem(this.rawValueStorageName):this.constructor._readCookie(this.rawValueStorageName):(i.warning("`_getValueFromPersistentStorage()` is called but `settings.saveValueToSessionStorage` is false. There must be an error that needs fixing.",this.settings.showWarnings),null)}},{key:"_removeValueFromPersistentStorage",value:function(){if(this.settings.saveValueToSessionStorage)if(this.sessionStorageAvailable)sessionStorage.removeItem(this.rawValueStorageName);else{var e=new Date;e.setTime(e.getTime()-864e5);var t="; expires=".concat(e.toUTCString());document.cookie="".concat(this.rawValueStorageName,"='' ;").concat(t,"; path=/")}}},{key:"_getDefaultValue",value:function(e){var t=e.getAttribute("value");return i.isNull(t)?"":t}},{key:"_onFocusInAndMouseEnter",value:function(e){if(this.isEditing=!1,!this.formulaMode&&this.settings.unformatOnHover&&"mouseenter"===e.type&&e.altKey)this.constructor._unformatAltHovered(this);else if("focus"===e.type&&(this.isFocused=!0,this.rawValueOnFocus=this.rawValue),"focus"===e.type&&this.settings.unformatOnHover&&this.hoveredWithAlt&&this.constructor._reformatAltHovered(this),"focus"===e.type||"mouseenter"===e.type&&!this.isFocused){var t=null;this.settings.emptyInputBehavior===a.options.emptyInputBehavior.focus&&this.rawValue<0&&null!==this.settings.negativeBracketsTypeOnBlur&&this.settings.isNegativeSignAllowed&&(t=this.constructor._removeBrackets(i.getElementValue(this.domElement),this.settings));var n=this._getRawValueToFormat(this.rawValue);if(""!==n){var o=this.constructor._roundFormattedValueShownOnFocusOrBlur(n,this.settings,this.isFocused);t=this.settings.showOnlyNumbersOnFocus===a.options.showOnlyNumbersOnFocus.onlyNumbers?(this.settings.digitGroupSeparator="",this.settings.currencySymbol="",this.settings.suffixText="",o.replace(".",this.settings.decimalCharacter)):i.isNull(o)?"":this.constructor._addGroupSeparators(o.replace(".",this.settings.decimalCharacter),this.settings,this.isFocused,n)}this.valueOnFocus=i.isNull(t)?"":t,this.lastVal=this.valueOnFocus;var u=this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(this.valueOnFocus,this.settings),r=this.constructor._orderValueCurrencySymbolAndSuffixText(this.valueOnFocus,this.settings,!0),g=u&&""!==r&&this.settings.emptyInputBehavior===a.options.emptyInputBehavior.focus;g&&(t=r),i.isNull(t)||this._setElementValue(t),g&&r===this.settings.currencySymbol&&this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix&&i.setElementSelection(e.target,0)}}},{key:"_onFocus",value:function(){this.settings.isCancellable&&this._saveCancellableValue()}},{key:"_onFocusIn",value:function(e){this.settings.selectOnFocus?this.select():i.isNull(this.settings.caretPositionOnFocus)||i.setElementSelection(e.target,this._initialCaretPosition(i.getElementValue(this.domElement)))}},{key:"_enterFormulaMode",value:function(){this.settings.formulaMode&&(this.formulaMode=!0,i.setElementValue(this.domElement,"="),i.setElementSelection(this.domElement,1))}},{key:"_exitFormulaMode",value:function(){var e,t=i.getElementValue(this.domElement);t=t.replace(/^\s*=/,"");try{var n=new fe(t,this.settings.decimalCharacter);e=(new x).evaluate(n)}catch{return this._triggerEvent(a.events.invalidFormula,this.domElement,{formula:t,aNElement:this}),this.reformat(),void(this.formulaMode=!1)}this._triggerEvent(a.events.validFormula,this.domElement,{formula:t,result:e,aNElement:this}),this.set(e),this.formulaMode=!1}},{key:"_acceptNonPrintableKeysInFormulaMode",value:function(){return this.eventKey===v.keyName.Backspace||this.eventKey===v.keyName.Delete||this.eventKey===v.keyName.LeftArrow||this.eventKey===v.keyName.RightArrow||this.eventKey===v.keyName.Home||this.eventKey===v.keyName.End}},{key:"_onKeydown",value:function(e){if(this.formatted=!1,this.isEditing=!0,this.formulaMode||this.isFocused||!this.settings.unformatOnHover||!e.altKey||this.domElement!==i.getHoveredElement()){if(this._updateEventKeyInfo(e),this.keydownEventCounter+=1,1===this.keydownEventCounter&&(this.initialValueOnFirstKeydown=i.getElementValue(e.target),this.initialRawValueOnFirstKeydown=this.rawValue),this.formulaMode){if(this.eventKey===v.keyName.Esc)return this.formulaMode=!1,void this.reformat();if(this.eventKey===v.keyName.Enter)return void this._exitFormulaMode();if(this._acceptNonPrintableKeysInFormulaMode())return}else if(this.eventKey===v.keyName.Equal)return void this._enterFormulaMode();if(this.domElement.readOnly||this.settings.readOnly||this.domElement.disabled)this.processed=!0;else{this.eventKey===v.keyName.Esc&&(e.preventDefault(),this.settings.isCancellable&&this.rawValue!==this.savedCancellableValue&&(this.set(this.savedCancellableValue),this._triggerEvent(a.events.native.input,e.target)),this.select());var t=i.getElementValue(e.target);if(this.eventKey===v.keyName.Enter&&this.rawValue!==this.rawValueOnFocus&&(this._triggerEvent(a.events.native.change,e.target),this.valueOnFocus=t,this.rawValueOnFocus=this.rawValue,this.settings.isCancellable&&this._saveCancellableValue()),this._updateInternalProperties(e),this._processNonPrintableKeysAndShortcuts(e))this.processed=!0;else if(this.eventKey===v.keyName.Backspace||this.eventKey===v.keyName.Delete){var n=this._processCharacterDeletion();if(this.processed=!0,!n)return void e.preventDefault();this._formatValue(e),(t=i.getElementValue(e.target))!==this.lastVal&&this.throwInput&&(this._triggerEvent(a.events.native.input,e.target),e.preventDefault()),this.lastVal=t,this.throwInput=!0}}}else this.constructor._unformatAltHovered(this)}},{key:"_onKeypress",value:function(e){if(this.formulaMode){if(this._acceptNonPrintableKeysInFormulaMode()||this.settings.formulaChars.test(this.eventKey))return;e.preventDefault()}else if(this.eventKey!==v.keyName.Insert){var t=this.processed;if(this._updateInternalProperties(e),!this._processNonPrintableKeysAndShortcuts(e))if(t)e.preventDefault();else{if(this._processCharacterInsertion()){this._formatValue(e);var n=i.getElementValue(e.target);if(n!==this.lastVal&&this.throwInput)this._triggerEvent(a.events.native.input,e.target),e.preventDefault();else{if((this.eventKey===this.settings.decimalCharacter||this.eventKey===this.settings.decimalCharacterAlternative)&&i.getElementSelection(e.target).start===i.getElementSelection(e.target).end&&i.getElementSelection(e.target).start===n.indexOf(this.settings.decimalCharacter)){var o=i.getElementSelection(e.target).start+1;i.setElementSelection(e.target,o)}e.preventDefault()}return this.lastVal=i.getElementValue(e.target),this.throwInput=!0,void this._setValidOrInvalidState(this.rawValue)}e.preventDefault()}}}},{key:"_onKeyup",value:function(e){if(this.isEditing=!1,this.keydownEventCounter=0,!this.formulaMode)if(this.settings.isCancellable&&this.eventKey===v.keyName.Esc)e.preventDefault();else{if(this.eventKey===v.keyName.Z||this.eventKey===v.keyName.z){if(e.ctrlKey&&e.shiftKey)return e.preventDefault(),this._historyTableRedo(),void(this.onGoingRedo=!0);if(e.ctrlKey&&!e.shiftKey){if(!this.onGoingRedo)return e.preventDefault(),void this._historyTableUndo();this.onGoingRedo=!1}}if(this.onGoingRedo&&(e.ctrlKey||e.shiftKey)&&(this.onGoingRedo=!1),(e.ctrlKey||e.metaKey)&&this.eventKey===v.keyName.x){var t=i.getElementSelection(this.domElement).start,n=this.constructor._toNumericValue(i.getElementValue(e.target),this.settings);this.set(n),this._setCaretPosition(t)}if(this.eventKey===v.keyName.Alt&&this.settings.unformatOnHover&&this.hoveredWithAlt)this.constructor._reformatAltHovered(this);else if(!e.ctrlKey&&!e.metaKey||this.eventKey!==v.keyName.Backspace&&this.eventKey!==v.keyName.Delete){this._updateInternalProperties(e);var o=this._processNonPrintableKeysAndShortcuts(e);delete this.valuePartsBeforePaste;var u=i.getElementValue(e.target);if(!(o||""===u&&""===this.initialValueOnFirstKeydown)&&(u===this.settings.currencySymbol?i.setElementSelection(e.target,this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix?0:this.settings.currencySymbol.length):this.eventKey===v.keyName.Tab&&i.setElementSelection(e.target,0,u.length),(u===this.settings.suffixText||""===this.rawValue&&""!==this.settings.currencySymbol&&""!==this.settings.suffixText)&&i.setElementSelection(e.target,0),null!==this.settings.decimalPlacesShownOnFocus&&this._saveValueToPersistentStorage(),this.formatted||this._formatValue(e),this._setValidOrInvalidState(this.rawValue),this._saveRawValueForAndroid(),u!==this.initialValueOnFirstKeydown&&this._triggerEvent(a.events.formatted,e.target,{oldValue:this.initialValueOnFirstKeydown,newValue:u,oldRawValue:this.initialRawValueOnFirstKeydown,newRawValue:this.rawValue,isPristine:this.isPristine(!1),error:null,aNElement:this}),1<this.historyTable.length)){var r=i.getElementSelection(this.domElement);this.selectionStart=r.start,this.selectionEnd=r.end,this.historyTable[this.historyTableIndex].start=this.selectionStart,this.historyTable[this.historyTableIndex].end=this.selectionEnd}}else{var g=i.getElementValue(e.target);this._setRawValue(this._formatOrUnformatOther(!1,g))}}}},{key:"_saveRawValueForAndroid",value:function(){if(this.eventKey===v.keyName.AndroidDefault){var e=this.constructor._stripAllNonNumberCharactersExceptCustomDecimalChar(this.getFormatted(),this.settings,!0,this.isFocused);e=this.constructor._convertToNumericString(e,this.settings),this._setRawValue(e)}}},{key:"_onFocusOutAndMouseLeave",value:function(e){if(this.isEditing=!1,"mouseleave"!==e.type||!this.formulaMode)if(this.settings.unformatOnHover&&"mouseleave"===e.type&&this.hoveredWithAlt)this.constructor._reformatAltHovered(this);else if("mouseleave"===e.type&&!this.isFocused||"blur"===e.type){"blur"===e.type&&this.formulaMode&&this._exitFormulaMode(),this._saveValueToPersistentStorage(),this.settings.showOnlyNumbersOnFocus===a.options.showOnlyNumbersOnFocus.onlyNumbers&&(this.settings.digitGroupSeparator=this.originalDigitGroupSeparator,this.settings.currencySymbol=this.originalCurrencySymbol,this.settings.suffixText=this.originalSuffixText);var t=this._getRawValueToFormat(this.rawValue),n=i.isNull(t),o=V(this.constructor._checkIfInRangeWithOverrideOption(t,this.settings),2),u=o[0],r=o[1],g=!1;if(""===t||n||(this._triggerRangeEvents(u,r),this.settings.valuesToStrings&&this._checkValuesToStrings(t)&&(this._setElementValue(this.settings.valuesToStrings[t]),g=!0)),!g){var d;if(d=n||""===t?t:String(t),""===t||n){if(""===t)switch(this.settings.emptyInputBehavior){case a.options.emptyInputBehavior.zero:this._setRawValue("0"),d=this.constructor._roundValue("0",this.settings,0);break;case a.options.emptyInputBehavior.min:this._setRawValue(this.settings.minimumValue),d=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.minimumValue,this.settings,this.isFocused);break;case a.options.emptyInputBehavior.max:this._setRawValue(this.settings.maximumValue),d=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.maximumValue,this.settings,this.isFocused);break;default:i.isNumber(this.settings.emptyInputBehavior)&&(this._setRawValue(this.settings.emptyInputBehavior),d=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.emptyInputBehavior,this.settings,this.isFocused))}}else u&&r&&!this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(t,this.settings)?(d=this._modifyNegativeSignAndDecimalCharacterForRawValue(d),this.settings.divisorWhenUnfocused&&!i.isNull(d)&&(d=(d/=this.settings.divisorWhenUnfocused).toString()),d=this.constructor._roundFormattedValueShownOnBlur(d,this.settings),d=this.constructor._modifyNegativeSignAndDecimalCharacterForFormattedValue(d,this.settings)):this._triggerRangeEvents(u,r);var b=this.constructor._orderValueCurrencySymbolAndSuffixText(d,this.settings,!1);this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(d,this.settings)||n&&this.settings.emptyInputBehavior===a.options.emptyInputBehavior.null||(b=this.constructor._addGroupSeparators(d,this.settings,!1,t)),b===t&&""!==t&&this.settings.allowDecimalPadding!==a.options.allowDecimalPadding.never&&this.settings.allowDecimalPadding!==a.options.allowDecimalPadding.floats||(this.settings.symbolWhenUnfocused&&""!==t&&null!==t&&(b="".concat(b).concat(this.settings.symbolWhenUnfocused)),this._setElementValue(b))}this._setValidOrInvalidState(this.rawValue),"blur"===e.type&&this._onBlur(e)}}},{key:"_onPaste",value:function(e){if(e.preventDefault(),!(this.settings.readOnly||this.domElement.readOnly||this.domElement.disabled)){var t,n;window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):i.throwError("Unable to retrieve the pasted value. Please use a modern browser (ie. Firefox or Chromium).");var o=i.getElementValue(n=e.target.tagName?e.target:e.explicitOriginalTarget),u=n.selectionStart||0,r=n.selectionEnd||0,g=r-u;if(g===o.length){var d=this._preparePastedText(t),b=i.arabicToLatinNumbers(d,!1,!1,!1);return"."===b||""===b||"."!==b&&!i.isNumber(b)?(this.formatted=!0,void(this.settings.onInvalidPaste===a.options.onInvalidPaste.error&&i.throwError("The pasted value '".concat(t,"' is not a valid paste content.")))):(this.set(b),this.formatted=!0,void this._triggerEvent(a.events.native.input,n))}var c=i.isNegativeStrict(t,this.settings.negativeSignCharacter);c&&(t=t.slice(1,t.length));var f,p,y=this._preparePastedText(t);if("."!==(f="."===y?".":i.arabicToLatinNumbers(y,!1,!1,!1))&&(!i.isNumber(f)||""===f))return this.formatted=!0,void(this.settings.onInvalidPaste===a.options.onInvalidPaste.error&&i.throwError("The pasted value '".concat(t,"' is not a valid paste content.")));var w,_,I=i.isNegativeStrict(this.getNumericString(),this.settings.negativeSignCharacter);w=!(!c||I)&&(I=!0);var U=o.slice(0,u),z=o.slice(r,o.length);_=this._preparePastedText(u!==r?U+z:o),I&&(_=i.setRawNegativeSign(_)),p=i.convertCharacterCountToIndexPosition(i.countNumberCharactersOnTheCaretLeftSide(o,u,this.settings.decimalCharacter)),w&&p++;var j=_.slice(0,p),X=_.slice(p,_.length),ge=!1;"."===f&&(i.contains(j,".")&&(ge=!0,j=j.replace(".","")),X=X.replace(".",""));var we=!1;switch(""===j&&"-"===X&&(j="-",we=!(X="")),this.settings.onInvalidPaste){case a.options.onInvalidPaste.truncate:case a.options.onInvalidPaste.replace:for(var Ve=i.parseStr(this.settings.minimumValue),Ae=i.parseStr(this.settings.maximumValue),ee=_,te=0,Me=j;te<f.length&&(_=(Me+=f[te])+X,this.constructor._checkIfInRange(_,Ve,Ae));)ee=_,te++;if(p+=te,we&&p++,this.settings.onInvalidPaste===a.options.onInvalidPaste.truncate){_=ee,ge&&p--;break}for(var ae=p,De=ee.length;te<f.length&&ae<De;)if("."!==ee[ae]){if(_=i.replaceCharAt(ee,ae,f[te]),!this.constructor._checkIfInRange(_,Ve,Ae))break;ee=_,te++,ae++}else ae++;p=ae,ge&&p--,_=ee;break;default:if(_="".concat(j).concat(f).concat(X),u===r)p=i.convertCharacterCountToIndexPosition(i.countNumberCharactersOnTheCaretLeftSide(o,u,this.settings.decimalCharacter))+f.length;else if(""===X)p=i.convertCharacterCountToIndexPosition(i.countNumberCharactersOnTheCaretLeftSide(o,u,this.settings.decimalCharacter))+f.length,we&&p++;else{var Be=i.convertCharacterCountToIndexPosition(i.countNumberCharactersOnTheCaretLeftSide(o,r,this.settings.decimalCharacter)),Re=i.getElementValue(n).slice(u,r);p=Be-g+i.countCharInText(this.settings.digitGroupSeparator,Re)+f.length}w&&p++,ge&&p--}if(i.isNumber(_)&&""!==_){var de=!1,Le=!1;try{this.set(_),de=!0}catch{var ve;switch(this.settings.onInvalidPaste){case a.options.onInvalidPaste.clamp:ve=i.clampToRangeLimits(_,this.settings);try{this.set(ve)}catch{i.throwError("Fatal error: Unable to set the clamped value '".concat(ve,"'."))}de=Le=!0,_=ve;break;case a.options.onInvalidPaste.error:case a.options.onInvalidPaste.truncate:case a.options.onInvalidPaste.replace:i.throwError("The pasted value '".concat(t,"' results in a value '").concat(_,"' that is outside of the minimum [").concat(this.settings.minimumValue,"] and maximum [").concat(this.settings.maximumValue,"] value range."));default:return}}var Ie,pe=i.getElementValue(n);if(de)switch(this.settings.onInvalidPaste){case a.options.onInvalidPaste.clamp:if(Le){i.setElementSelection(n,this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix?pe.length-this.settings.currencySymbol.length:pe.length);break}default:Ie=i.findCaretPositionInFormattedNumber(_,p,pe,this.settings.decimalCharacter),i.setElementSelection(n,Ie)}de&&o!==pe&&this._triggerEvent(a.events.native.input,n)}else this.settings.onInvalidPaste===a.options.onInvalidPaste.error&&i.throwError("The pasted value '".concat(t,"' would result into an invalid content '").concat(_,"'."))}}},{key:"_onBlur",value:function(e){this.isFocused=!1,this.isEditing=!1,this.rawValue!==this.rawValueOnFocus&&this._triggerEvent(a.events.native.change,e.target),this.rawValueOnFocus=void 0}},{key:"_onWheel",value:function(e){this.formulaMode||this.settings.readOnly||this.domElement.readOnly||this.domElement.disabled||this.settings.modifyValueOnWheel&&(this.settings.wheelOn===a.options.wheelOn.focus?this.isFocused?e.shiftKey||this.wheelAction(e):e.shiftKey&&this.wheelAction(e):this.settings.wheelOn===a.options.wheelOn.hover?e.shiftKey?(e.preventDefault(),window.scrollBy(0,i.isNegativeStrict(String(e.deltaY))?-50:50)):this.wheelAction(e):i.throwError("Unknown `wheelOn` option."))}},{key:"wheelAction",value:function(e){this.isWheelEvent=!0;var t,n=e.target.selectionStart||0,o=e.target.selectionEnd||0,u=this.rawValue;if(i.isUndefinedOrNullOrEmpty(u)?0<this.settings.minimumValue||this.settings.maximumValue<0?i.isWheelUpEvent(e)?t=this.settings.minimumValue:i.isWheelDownEvent(e)?t=this.settings.maximumValue:i.throwError("The event is not a 'wheel' event."):t=0:t=u,t=+t,i.isNumber(this.settings.wheelStep)){var r=+this.settings.wheelStep;i.isWheelUpEvent(e)?t+=r:i.isWheelDownEvent(e)&&(t-=r)}else i.isWheelUpEvent(e)?t=i.addAndRoundToNearestAuto(t,this.settings.decimalPlacesRawValue):i.isWheelDownEvent(e)&&(t=i.subtractAndRoundToNearestAuto(t,this.settings.decimalPlacesRawValue));(t=i.clampToRangeLimits(t,this.settings))!==+u&&(this.set(t),this._triggerEvent(a.events.native.input,e.target)),e.preventDefault(),this._setSelection(n,o),this.isWheelEvent=!1}},{key:"_onDrop",value:function(e){if(!this.formulaMode){var t;this.isDropEvent=!0,e.preventDefault(),t=i.isIE11()?"text":"text/plain";var n=e.dataTransfer.getData(t),o=this.unformatOther(n);this.set(o),this.isDropEvent=!1}}},{key:"_onFormSubmit",value:function(){var e=this;return this._getFormAutoNumericChildren(this.parentForm).map(function(t){return e.constructor.getAutoNumericElement(t)}).forEach(function(t){return t._unformatOnSubmit()}),!0}},{key:"_onFormReset",value:function(){var e=this;this._getFormAutoNumericChildren(this.parentForm).map(function(t){return e.constructor.getAutoNumericElement(t)}).forEach(function(t){var n=e._getDefaultValue(t.node());setTimeout(function(){return t.set(n)},0)})}},{key:"_unformatOnSubmit",value:function(){this.settings.unformatOnSubmit&&this._setElementValue(this.rawValue)}},{key:"_onKeydownGlobal",value:function(e){if(i.character(e)===v.keyName.Alt){var t=i.getHoveredElement();if(a.isManagedByAutoNumeric(t)){var n=a.getAutoNumericElement(t);!n.formulaMode&&n.settings.unformatOnHover&&this.constructor._unformatAltHovered(n)}}}},{key:"_onKeyupGlobal",value:function(e){if(i.character(e)===v.keyName.Alt){var t=i.getHoveredElement();if(a.isManagedByAutoNumeric(t)){var n=a.getAutoNumericElement(t);if(n.formulaMode||!n.settings.unformatOnHover)return;this.constructor._reformatAltHovered(n)}}}},{key:"_isElementTagSupported",value:function(){return i.isElement(this.domElement)||i.throwError("The DOM element is not valid, ".concat(this.domElement," given.")),i.isInArray(this.domElement.tagName.toLowerCase(),this.allowedTagList)}},{key:"_isInputElement",value:function(){return"input"===this.domElement.tagName.toLowerCase()}},{key:"_isInputTypeSupported",value:function(){return"text"===this.domElement.type||"hidden"===this.domElement.type||"tel"===this.domElement.type||i.isUndefinedOrNullOrEmpty(this.domElement.type)}},{key:"_checkElement",value:function(){var e=this.domElement.tagName.toLowerCase();this._isElementTagSupported()||i.throwError("The <".concat(e,"> tag is not supported by autoNumeric")),this._isInputElement()?(this._isInputTypeSupported()||i.throwError('The input type "'.concat(this.domElement.type,'" is not supported by autoNumeric')),this.isInputElement=!0):(this.isInputElement=!1,this.isContentEditable=this.domElement.hasAttribute("contenteditable")&&"true"===this.domElement.getAttribute("contenteditable"))}},{key:"_formatDefaultValueOnPageLoad",value:function(e){var t,n=0<arguments.length&&void 0!==e?e:null,o=!0;if(i.isNull(n)?(t=i.getElementValue(this.domElement).trim(),this.domElement.setAttribute("value",t)):t=n,this.isInputElement||this.isContentEditable){var u=this.constructor._toNumericValue(t,this.settings);if(this.domElement.hasAttribute("value")&&""!==this.domElement.getAttribute("value")){if(null!==this.settings.defaultValueOverride&&this.settings.defaultValueOverride.toString()!==t||null===this.settings.defaultValueOverride&&""!==t&&t!==this.domElement.getAttribute("value")||""!==t&&"hidden"===this.domElement.getAttribute("type")&&!i.isNumber(u)){if(this.settings.saveValueToSessionStorage&&(null!==this.settings.decimalPlacesShownOnFocus||this.settings.divisorWhenUnfocused)&&this._setRawValue(this._getValueFromPersistentStorage()),!this.settings.saveValueToSessionStorage){var r=this.constructor._removeBrackets(t,this.settings);(this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.suffix||this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.prefix&&this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix)&&""!==this.settings.negativeSignCharacter&&i.isNegative(t,this.settings.negativeSignCharacter)?this._setRawValue("-".concat(this.constructor._stripAllNonNumberCharacters(r,this.settings,!0,this.isFocused))):this._setRawValue(this.constructor._stripAllNonNumberCharacters(r,this.settings,!0,this.isFocused))}o=!1}}else isNaN(Number(u))||1/0===u?i.throwError("The value [".concat(t,"] used in the input is not a valid value autoNumeric can work with.")):(this.set(u),o=!1);if(""===t)switch(this.settings.emptyInputBehavior){case a.options.emptyInputBehavior.focus:case a.options.emptyInputBehavior.null:case a.options.emptyInputBehavior.press:break;case a.options.emptyInputBehavior.always:this._setElementValue(this.settings.currencySymbol);break;case a.options.emptyInputBehavior.min:this.set(this.settings.minimumValue);break;case a.options.emptyInputBehavior.max:this.set(this.settings.maximumValue);break;case a.options.emptyInputBehavior.zero:this.set("0");break;default:this.set(this.settings.emptyInputBehavior)}else o&&t===this.domElement.getAttribute("value")&&this.set(t)}else null!==this.settings.defaultValueOverride&&this.settings.defaultValueOverride!==t||this.set(t)}},{key:"_calculateVMinAndVMaxIntegerSizes",value:function(){var e=V(this.settings.maximumValue.toString().split("."),1)[0],t=V(this.settings.minimumValue||0===this.settings.minimumValue?this.settings.minimumValue.toString().split("."):[],1)[0];e=e.replace(this.settings.negativeSignCharacter,""),t=t.replace(this.settings.negativeSignCharacter,""),this.settings.mIntPos=Math.max(e.length,1),this.settings.mIntNeg=Math.max(t.length,1)}},{key:"_calculateValuesToStringsKeys",value:function(){this.valuesToStringsKeys=this.settings.valuesToStrings?Object.keys(this.settings.valuesToStrings):[]}},{key:"_transformOptionsValuesToDefaultTypes",value:function(){for(var e in this.settings)if(Object.prototype.hasOwnProperty.call(this.settings,e)){var t=this.settings[e];"true"!==t&&"false"!==t||(this.settings[e]="true"===t),"number"==typeof t&&(this.settings[e]=t.toString())}}},{key:"_setSettings",value:function(e,t){var n=1<arguments.length&&void 0!==t&&t;!n&&i.isNull(e)||this.constructor._convertOldOptionsToNewOnes(e),n?("decimalPlacesRawValue"in e&&(this.settings.originalDecimalPlacesRawValue=e.decimalPlacesRawValue),"decimalPlaces"in e&&(this.settings.originalDecimalPlaces=e.decimalPlaces),this.constructor._calculateDecimalPlacesOnUpdate(e,this.settings),this._mergeSettings(e)):(this.settings={},this._mergeSettings(this.constructor.getDefaultConfig(),this.domElement.dataset,e,{rawValue:this.defaultRawValue}),this.caretFix=!1,this.throwInput=!0,this.allowedTagList=v.allowedTagList,this.runOnce=!1,this.hoveredWithAlt=!1),this._transformOptionsValuesToDefaultTypes(),this._runCallbacksFoundInTheSettingsObject(),this.constructor._correctNegativePositiveSignPlacementOption(this.settings),this.constructor._correctCaretPositionOnFocusAndSelectOnFocusOptions(this.settings),this.constructor._setNegativePositiveSignPermissions(this.settings),n||(this.settings.originalDecimalPlaces=i.isNull(e)||!e.decimalPlaces?null:e.decimalPlaces,this.settings.originalDecimalPlacesRawValue=this.settings.decimalPlacesRawValue,this.constructor._calculateDecimalPlacesOnInit(this.settings)),this._calculateVMinAndVMaxIntegerSizes(),this._setTrailingNegativeSignInfo(),this.regex={},this.constructor._cachesUsualRegularExpressions(this.settings,this.regex),this.constructor._setBrackets(this.settings),this._calculateValuesToStringsKeys(),i.isEmptyObj(this.settings)&&i.throwError("Unable to set the settings, those are invalid ; an empty object was given."),this.constructor.validate(this.settings,!1,e),this._keepAnOriginalSettingsCopy()}},{key:"_preparePastedText",value:function(e){return this.constructor._stripAllNonNumberCharacters(e,this.settings,!0,this.isFocused)}},{key:"_updateInternalProperties",value:function(){this.selection=i.getElementSelection(this.domElement),this.processed=!1}},{key:"_updateEventKeyInfo",value:function(e){this.eventKey=i.character(e)}},{key:"_saveCancellableValue",value:function(){this.savedCancellableValue=this.rawValue}},{key:"_setSelection",value:function(e,t){e=Math.max(e,0),t=Math.min(t,i.getElementValue(this.domElement).length),this.selection={start:e,end:t,length:t-e},i.setElementSelection(this.domElement,e,t)}},{key:"_setCaretPosition",value:function(e){this._setSelection(e,e)}},{key:"_getLeftAndRightPartAroundTheSelection",value:function(){var e=i.getElementValue(this.domElement);return[e.substring(0,this.selection.start),e.substring(this.selection.end,e.length)]}},{key:"_getUnformattedLeftAndRightPartAroundTheSelection",value:function(){var e=V(this._getLeftAndRightPartAroundTheSelection(),2),t=e[0],n=e[1];if(""===t&&""===n)return["",""];var o=!0;return this.eventKey!==v.keyName.Hyphen&&this.eventKey!==v.keyName.Minus||0!==Number(t)||(o=!1),this.isTrailingNegative&&(i.isNegative(n,this.settings.negativeSignCharacter)&&!i.isNegative(t,this.settings.negativeSignCharacter)||""===n&&i.isNegative(t,this.settings.negativeSignCharacter,!0))&&(t=t.replace(this.settings.negativeSignCharacter,""),n=n.replace(this.settings.negativeSignCharacter,""),t=t.replace("-",""),n=n.replace("-",""),t="-".concat(t)),[t=a._stripAllNonNumberCharactersExceptCustomDecimalChar(t,this.settings,o,this.isFocused),n=a._stripAllNonNumberCharactersExceptCustomDecimalChar(n,this.settings,!1,this.isFocused)]}},{key:"_normalizeParts",value:function(e,t){var n=!0;this.eventKey!==v.keyName.Hyphen&&this.eventKey!==v.keyName.Minus||0!==Number(e)||(n=!1),this.isTrailingNegative&&i.isNegative(t,this.settings.negativeSignCharacter)&&!i.isNegative(e,this.settings.negativeSignCharacter)&&(e="-".concat(e),t=t.replace(this.settings.negativeSignCharacter,"")),e=a._stripAllNonNumberCharactersExceptCustomDecimalChar(e,this.settings,n,this.isFocused),t=a._stripAllNonNumberCharactersExceptCustomDecimalChar(t,this.settings,!1,this.isFocused),this.settings.leadingZero!==a.options.leadingZero.deny||this.eventKey!==v.keyName.num0&&this.eventKey!==v.keyName.numpad0||0!==Number(e)||i.contains(e,this.settings.decimalCharacter)||""===t||(e=e.substring(0,e.length-1));var o=e+t;if(this.settings.decimalCharacter){var u=o.match(new RegExp("^".concat(this.regex.aNegRegAutoStrip,"\\").concat(this.settings.decimalCharacter)));u&&(o=(e=e.replace(u[1],u[1]+"0"))+t)}return[e,t,o]}},{key:"_setValueParts",value:function(e,t,n){var o=2<arguments.length&&void 0!==n&&n,u=V(this._normalizeParts(e,t),3),r=u[0],g=u[1],d=u[2],b=V(a._checkIfInRangeWithOverrideOption(d,this.settings),2),c=b[0],f=b[1];if(c&&f){var p=a._truncateDecimalPlaces(d,this.settings,o,this.settings.decimalPlacesRawValue).replace(this.settings.decimalCharacter,".");if(""===p||p===this.settings.negativeSignCharacter){var y;switch(this.settings.emptyInputBehavior){case a.options.emptyInputBehavior.focus:case a.options.emptyInputBehavior.press:case a.options.emptyInputBehavior.always:y="";break;case a.options.emptyInputBehavior.min:y=this.settings.minimumValue;break;case a.options.emptyInputBehavior.max:y=this.settings.maximumValue;break;case a.options.emptyInputBehavior.zero:y="0";break;case a.options.emptyInputBehavior.null:y=null;break;default:y=this.settings.emptyInputBehavior}this._setRawValue(y)}else this._setRawValue(this._trimLeadingAndTrailingZeros(p));var w=a._truncateDecimalPlaces(d,this.settings,o,this.settings.decimalPlacesShownOnFocus),_=r.length;return _>w.length&&(_=w.length),1===_&&"0"===r&&this.settings.leadingZero===a.options.leadingZero.deny&&(_=""===g||"0"===r&&""!==g?1:0),this._setElementValue(w,!1),this._setCaretPosition(_),!0}return this._triggerRangeEvents(c,f),!1}},{key:"_getSignPosition",value:function(){var e;if(this.settings.currencySymbol){var t=this.settings.currencySymbol.length,n=i.getElementValue(this.domElement);if(this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.prefix)e=this.settings.negativeSignCharacter&&n&&n.charAt(0)===this.settings.negativeSignCharacter?[1,t+1]:[0,t];else{var o=n.length;e=[o-t,o]}}else e=[1e3,-1];return e}},{key:"_expandSelectionOnSign",value:function(){var e=V(this._getSignPosition(),2),t=e[0],n=e[1],o=this.selection;o.start<n&&o.end>t&&((o.start<t||o.end>n)&&i.getElementValue(this.domElement).substring(Math.max(o.start,t),Math.min(o.end,n)).match(/^\s*$/)?o.start<t?this._setSelection(o.start,t):this._setSelection(n,o.end):this._setSelection(Math.min(o.start,t),Math.max(o.end,n)))}},{key:"_checkPaste",value:function(){if(!this.formatted&&!i.isUndefined(this.valuePartsBeforePaste)){var e=this.valuePartsBeforePaste,t=V(this._getLeftAndRightPartAroundTheSelection(),2),n=t[0],o=t[1];delete this.valuePartsBeforePaste;var u=n.substr(0,e[0].length)+a._stripAllNonNumberCharactersExceptCustomDecimalChar(n.substr(e[0].length),this.settings,!0,this.isFocused);this._setValueParts(u,o,!0)||(this._setElementValue(e.join(""),!1),this._setCaretPosition(e[0].length))}}},{key:"_processNonPrintableKeysAndShortcuts",value:function(e){if((e.ctrlKey||e.metaKey)&&"keyup"===e.type&&!i.isUndefined(this.valuePartsBeforePaste)||e.shiftKey&&this.eventKey===v.keyName.Insert)return this._checkPaste(),!1;if(this.constructor._shouldSkipEventKey(this.eventKey))return!0;if((e.ctrlKey||e.metaKey)&&this.eventKey===v.keyName.a)return this.settings.selectNumberOnly&&(e.preventDefault(),this.selectNumber()),!0;if((e.ctrlKey||e.metaKey)&&(this.eventKey===v.keyName.c||this.eventKey===v.keyName.v||this.eventKey===v.keyName.x))return"keydown"===e.type&&this._expandSelectionOnSign(),this.eventKey!==v.keyName.v&&this.eventKey!==v.keyName.Insert||("keydown"===e.type||"keypress"===e.type?i.isUndefined(this.valuePartsBeforePaste)&&(this.valuePartsBeforePaste=this._getLeftAndRightPartAroundTheSelection()):this._checkPaste()),"keydown"===e.type||"keypress"===e.type||this.eventKey===v.keyName.c;if(e.ctrlKey||e.metaKey)return!(this.eventKey===v.keyName.Z||this.eventKey===v.keyName.z);if(this.eventKey!==v.keyName.LeftArrow&&this.eventKey!==v.keyName.RightArrow)return i.isInArray(this.eventKey,v.keyName._directionKeys);if("keydown"===e.type&&!e.shiftKey){var t=i.getElementValue(this.domElement);this.eventKey!==v.keyName.LeftArrow||t.charAt(this.selection.start-2)!==this.settings.digitGroupSeparator&&t.charAt(this.selection.start-2)!==this.settings.decimalCharacter?this.eventKey!==v.keyName.RightArrow||t.charAt(this.selection.start+1)!==this.settings.digitGroupSeparator&&t.charAt(this.selection.start+1)!==this.settings.decimalCharacter||this._setCaretPosition(this.selection.start+1):this._setCaretPosition(this.selection.start-1)}return!0}},{key:"_processCharacterDeletionIfTrailingNegativeSign",value:function(e){var t=V(e,2),n=t[0],o=t[1],u=i.getElementValue(this.domElement),r=i.isNegative(u,this.settings.negativeSignCharacter);if(this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.suffix&&(this.eventKey===v.keyName.Backspace?(this.caretFix=this.selection.start>=u.indexOf(this.settings.suffixText)&&""!==this.settings.suffixText,"-"===u.charAt(this.selection.start-1)?n=n.substring(1):this.selection.start<=u.length-this.settings.suffixText.length&&(n=n.substring(0,n.length-1))):(this.caretFix=this.selection.start>=u.indexOf(this.settings.suffixText)&&""!==this.settings.suffixText,this.selection.start>=u.indexOf(this.settings.currencySymbol)+this.settings.currencySymbol.length&&(o=o.substring(1,o.length)),i.isNegative(n,this.settings.negativeSignCharacter)&&"-"===u.charAt(this.selection.start)&&(n=n.substring(1)))),this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix)switch(this.settings.negativePositiveSignPlacement){case a.options.negativePositiveSignPlacement.left:this.caretFix=this.selection.start>=u.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===v.keyName.Backspace?this.selection.start===u.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length&&r?n=n.substring(1):"-"!==n&&(this.selection.start<=u.indexOf(this.settings.negativeSignCharacter)||!r)&&(n=n.substring(0,n.length-1)):("-"===n[0]&&(o=o.substring(1)),this.selection.start===u.indexOf(this.settings.negativeSignCharacter)&&r&&(n=n.substring(1)));break;case a.options.negativePositiveSignPlacement.right:this.caretFix=this.selection.start>=u.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===v.keyName.Backspace?this.selection.start===u.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length?n=n.substring(1):("-"!==n&&this.selection.start<=u.indexOf(this.settings.negativeSignCharacter)-this.settings.currencySymbol.length||""!==n&&!r)&&(n=n.substring(0,n.length-1)):(this.caretFix=this.selection.start>=u.indexOf(this.settings.currencySymbol)&&""!==this.settings.currencySymbol,this.selection.start===u.indexOf(this.settings.negativeSignCharacter)&&(n=n.substring(1)),o=o.substring(1))}return[n,o]}},{key:"_processCharacterDeletion",value:function(){var e,t;if(this.selection.length){this._expandSelectionOnSign();var n=V(this._getUnformattedLeftAndRightPartAroundTheSelection(),2);e=n[0],t=n[1]}else{var o=V(this._getUnformattedLeftAndRightPartAroundTheSelection(),2);if(t=o[1],""===(e=o[0])&&""===t&&(this.throwInput=!1),this.isTrailingNegative&&i.isNegative(i.getElementValue(this.domElement),this.settings.negativeSignCharacter)){var u=V(this._processCharacterDeletionIfTrailingNegativeSign([e,t]),2);e=u[0],t=u[1]}else this.eventKey===v.keyName.Backspace?e=e.substring(0,e.length-1):t=t.substring(1,t.length)}return!!this.constructor._isWithinRangeWithOverrideOption("".concat(e).concat(t),this.settings)&&(this._setValueParts(e,t),!0)}},{key:"_isDecimalCharacterInsertionAllowed",value:function(){return String(this.settings.decimalPlacesShownOnFocus)!==String(a.options.decimalPlacesShownOnFocus.none)&&String(this.settings.decimalPlaces)!==String(a.options.decimalPlaces.none)}},{key:"_processCharacterInsertion",value:function(){var e=V(this._getUnformattedLeftAndRightPartAroundTheSelection(),2),t=e[0],n=e[1];if(this.eventKey!==v.keyName.AndroidDefault&&(this.throwInput=!0),this.eventKey===this.settings.decimalCharacter||this.settings.decimalCharacterAlternative&&this.eventKey===this.settings.decimalCharacterAlternative){if(!this._isDecimalCharacterInsertionAllowed()||!this.settings.decimalCharacter)return!1;if(this.settings.alwaysAllowDecimalCharacter)t=t.replace(this.settings.decimalCharacter,""),n=n.replace(this.settings.decimalCharacter,"");else{if(i.contains(t,this.settings.decimalCharacter)||0<n.indexOf(this.settings.decimalCharacter))return!0;0===n.indexOf(this.settings.decimalCharacter)&&(n=n.substr(1))}return this.settings.negativeSignCharacter&&i.contains(n,this.settings.negativeSignCharacter)&&(t="".concat(this.settings.negativeSignCharacter).concat(t),n=n.replace(this.settings.negativeSignCharacter,"")),this._setValueParts(t+this.settings.decimalCharacter,n),!0}if(("-"===this.eventKey||"+"===this.eventKey)&&this.settings.isNegativeSignAllowed)return""===t&&i.contains(n,"-")?n=n.replace("-",""):t=i.isNegativeStrict(t,"-")?t.replace("-",""):"".concat(this.settings.negativeSignCharacter).concat(t),this._setValueParts(t,n),!0;var o=Number(this.eventKey);return 0<=o&&o<=9?(this.settings.isNegativeSignAllowed&&""===t&&i.contains(n,"-")&&(t="-",n=n.substring(1,n.length)),this.settings.maximumValue<=0&&this.settings.minimumValue<this.settings.maximumValue&&!i.contains(i.getElementValue(this.domElement),this.settings.negativeSignCharacter)&&"0"!==this.eventKey&&(t="-".concat(t)),this._setValueParts("".concat(t).concat(this.eventKey),n),!0):this.throwInput=!1}},{key:"_formatValue",value:function(e){var t=i.getElementValue(this.domElement),n=V(this._getUnformattedLeftAndRightPartAroundTheSelection(),1)[0];if((""===this.settings.digitGroupSeparator||""!==this.settings.digitGroupSeparator&&!i.contains(t,this.settings.digitGroupSeparator))&&(""===this.settings.currencySymbol||""!==this.settings.currencySymbol&&!i.contains(t,this.settings.currencySymbol))){var o=V(t.split(this.settings.decimalCharacter),1)[0],u="";i.isNegative(o,this.settings.negativeSignCharacter)&&(u=this.settings.negativeSignCharacter,o=o.replace(this.settings.negativeSignCharacter,""),n=n.replace("-","")),""===u&&o.length>this.settings.mIntPos&&"0"===n.charAt(0)&&(n=n.slice(1)),u===this.settings.negativeSignCharacter&&o.length>this.settings.mIntNeg&&"0"===n.charAt(0)&&(n=n.slice(1)),this.isTrailingNegative||(n="".concat(u).concat(n))}var r=this.constructor._addGroupSeparators(t,this.settings,this.isFocused,this.rawValue),g=r.length;if(r){var d,b=n.split("");if((this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.suffix||this.settings.negativePositiveSignPlacement!==a.options.negativePositiveSignPlacement.prefix&&this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix)&&b[0]===this.settings.negativeSignCharacter&&!this.settings.isNegativeSignAllowed&&(b.shift(),(this.eventKey===v.keyName.Backspace||this.eventKey===v.keyName.Delete)&&this.caretFix&&((this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.left||this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.suffix)&&(b.push(this.settings.negativeSignCharacter),this.caretFix="keydown"===e.type),this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===a.options.negativePositiveSignPlacement.right))){var c=this.settings.currencySymbol.split(""),f=["\\","^","$",".","|","?","*","+","(",")","["],p=[];c.forEach(function(_,I){i.isInArray(I=c[_],f)?p.push("\\"+I):p.push(I)}),this.eventKey===v.keyName.Backspace&&"-"===this.settings.negativeSignCharacter&&p.push("-"),b.push(p.join("")),this.caretFix="keydown"===e.type}for(var y=0;y<b.length;y++)b[y].match("\\d")||(b[y]="\\"+b[y]);d=this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix?new RegExp("^.*?".concat(b.join(".*?"))):new RegExp("^.*?".concat(this.settings.currencySymbol).concat(b.join(".*?")));var w=r.match(d);w?(g=w[0].length,this.settings.showPositiveSign&&(0===g&&w.input.charAt(0)===this.settings.positiveSignCharacter&&(g=1===w.input.indexOf(this.settings.currencySymbol)?this.settings.currencySymbol.length+1:1),0===g&&w.input.charAt(this.settings.currencySymbol.length)===this.settings.positiveSignCharacter&&(g=this.settings.currencySymbol.length+1)),(0===g&&r.charAt(0)!==this.settings.negativeSignCharacter||1===g&&r.charAt(0)===this.settings.negativeSignCharacter)&&this.settings.currencySymbol&&this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.prefix&&(g=this.settings.currencySymbol.length+(i.isNegativeStrict(r,this.settings.negativeSignCharacter)?1:0))):(this.settings.currencySymbol&&this.settings.currencySymbolPlacement===a.options.currencySymbolPlacement.suffix&&(g-=this.settings.currencySymbol.length),this.settings.suffixText&&(g-=this.settings.suffixText.length))}r!==t&&(this._setElementValue(r,!1),this._setCaretPosition(g)),this.formatted=!0}}]),ue(s,l),a}();function E(a,s){s=s||{bubbles:!1,cancelable:!1,detail:void 0};var l=document.createEvent("CustomEvent");return l.initCustomEvent(a,s.bubbles,s.cancelable,s.detail),l}m.multiple=function(a){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,l=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,e=[];if(i.isObject(s)&&(l=s,s=null),i.isString(a))a=ie(document.querySelectorAll(a));else if(i.isObject(a)){Object.prototype.hasOwnProperty.call(a,"rootElement")||i.throwError("The object passed to the 'multiple' function is invalid ; no 'rootElement' attribute found.");var t=ie(a.rootElement.querySelectorAll("input"));a=Object.prototype.hasOwnProperty.call(a,"exclude")?(Array.isArray(a.exclude)||i.throwError("The 'exclude' array passed to the 'multiple' function is invalid."),i.filterOut(t,a.exclude)):t}else i.isArray(a)||i.throwError("The given parameters to the 'multiple' function are invalid.");if(0===a.length){var n=!0;return!i.isNull(l)&&i.isBoolean(l.showWarnings)&&(n=l.showWarnings),i.warning("No valid DOM elements were given hence no AutoNumeric objects were instantiated.",n),[]}var o=i.isArray(s)&&1<=s.length,u=!1,r=!1;if(o){var g=H(Number(s[0]));(u="number"===g&&!isNaN(Number(s[0])))||"string"!==g&&!isNaN(g)&&"object"!==g||(r=!0)}var d,b=!1;if(i.isArray(l)&&1<=l.length){var c=H(l[0]);"string"!==c&&"object"!==c||(b=!0)}d=r?m.mergeOptions(s):b?m.mergeOptions(l):l;var f,p=i.isNumber(s);return u&&(f=s.length),a.forEach(function(y,w){e.push(new m(y,p?s:u&&w<=f?s[w]:null,d))}),e},Array.from||(Array.from=function(a){return[].slice.call(a)}),typeof window<"u"&&"function"!=typeof window.CustomEvent&&(E.prototype=window.Event.prototype,window.CustomEvent=E),m.events={correctedValue:"autoNumeric:correctedValue",initialized:"autoNumeric:initialized",invalidFormula:"autoNumeric:invalidFormula",invalidValue:"autoNumeric:invalidValue",formatted:"autoNumeric:formatted",rawValueModified:"autoNumeric:rawValueModified",minRangeExceeded:"autoNumeric:minExceeded",maxRangeExceeded:"autoNumeric:maxExceeded",native:{input:"input",change:"change"},validFormula:"autoNumeric:validFormula"},Object.freeze(m.events.native),Object.freeze(m.events),Object.defineProperty(m,"events",{configurable:!1,writable:!1}),m.options={allowDecimalPadding:{always:!0,never:!1,floats:"floats"},alwaysAllowDecimalCharacter:{alwaysAllow:!0,doNotAllow:!1},caretPositionOnFocus:{start:"start",end:"end",decimalLeft:"decimalLeft",decimalRight:"decimalRight",doNoForceCaretPosition:null},createLocalList:{createList:!0,doNotCreateList:!1},currencySymbol:{none:"",currencySign:"\xa4",austral:"\u20b3",australCentavo:"\xa2",baht:"\u0e3f",cedi:"\u20b5",cent:"\xa2",colon:"\u20a1",cruzeiro:"\u20a2",dollar:"$",dong:"\u20ab",drachma:"\u20af",dram:"\u200b\u058f",european:"\u20a0",euro:"\u20ac",florin:"\u0192",franc:"\u20a3",guarani:"\u20b2",hryvnia:"\u20b4",kip:"\u20ad",att:"\u0ead\u0eb1\u0e94",lepton:"\u039b.",lira:"\u20ba",liraOld:"\u20a4",lari:"\u20be",mark:"\u2133",mill:"\u20a5",naira:"\u20a6",peseta:"\u20a7",peso:"\u20b1",pfennig:"\u20b0",pound:"\xa3",real:"R$",riel:"\u17db",ruble:"\u20bd",rupee:"\u20b9",rupeeOld:"\u20a8",shekel:"\u20aa",shekelAlt:"\u05e9\u05f4\u05d7\u200e\u200e",taka:"\u09f3",tenge:"\u20b8",togrog:"\u20ae",won:"\u20a9",yen:"\xa5"},currencySymbolPlacement:{prefix:"p",suffix:"s"},decimalCharacter:{comma:",",dot:".",middleDot:"\xb7",arabicDecimalSeparator:"\u066b",decimalSeparatorKeySymbol:"\u2396"},decimalCharacterAlternative:{none:null,comma:",",dot:"."},decimalPlaces:{none:0,one:1,two:2,three:3,four:4,five:5,six:6},decimalPlacesRawValue:{useDefault:null,none:0,one:1,two:2,three:3,four:4,five:5,six:6},decimalPlacesShownOnBlur:{useDefault:null,none:0,one:1,two:2,three:3,four:4,five:5,six:6},decimalPlacesShownOnFocus:{useDefault:null,none:0,one:1,two:2,three:3,four:4,five:5,six:6},defaultValueOverride:{doNotOverride:null},digitalGroupSpacing:{two:"2",twoScaled:"2s",three:"3",four:"4"},digitGroupSeparator:{comma:",",dot:".",normalSpace:" ",thinSpace:"\u2009",narrowNoBreakSpace:"\u202f",noBreakSpace:"\xa0",noSeparator:"",apostrophe:"'",arabicThousandsSeparator:"\u066c",dotAbove:"\u02d9",privateUseTwo:"\u2019"},divisorWhenUnfocused:{none:null,percentage:100,permille:1e3,basisPoint:1e4},emptyInputBehavior:{focus:"focus",press:"press",always:"always",zero:"zero",min:"min",max:"max",null:"null"},eventBubbles:{bubbles:!0,doesNotBubble:!1},eventIsCancelable:{isCancelable:!0,isNotCancelable:!1},failOnUnknownOption:{fail:!0,ignore:!1},formatOnPageLoad:{format:!0,doNotFormat:!1},formulaMode:{enabled:!0,disabled:!1},historySize:{verySmall:5,small:10,medium:20,large:50,veryLarge:100,insane:Number.MAX_SAFE_INTEGER},invalidClass:"an-invalid",isCancellable:{cancellable:!0,notCancellable:!1},leadingZero:{allow:"allow",deny:"deny",keep:"keep"},maximumValue:{tenTrillions:"10000000000000",oneBillion:"1000000000",zero:"0"},minimumValue:{tenTrillions:"-10000000000000",oneBillion:"-1000000000",zero:"0"},modifyValueOnWheel:{modifyValue:!0,doNothing:!1},negativeBracketsTypeOnBlur:{parentheses:"(,)",brackets:"[,]",chevrons:"<,>",curlyBraces:"{,}",angleBrackets:"\u3008,\u3009",japaneseQuotationMarks:"\uff62,\uff63",halfBrackets:"\u2e24,\u2e25",whiteSquareBrackets:"\u27e6,\u27e7",quotationMarks:"\u2039,\u203a",guillemets:"\xab,\xbb",none:null},negativePositiveSignPlacement:{prefix:"p",suffix:"s",left:"l",right:"r",none:null},negativeSignCharacter:{hyphen:"-",minus:"\u2212",heavyMinus:"\u2796",fullWidthHyphen:"\uff0d",circledMinus:"\u2296",squaredMinus:"\u229f",triangleMinus:"\u2a3a",plusMinus:"\xb1",minusPlus:"\u2213",dotMinus:"\u2238",minusTilde:"\u2242",not:"\xac"},noEventListeners:{noEvents:!0,addEvents:!1},onInvalidPaste:{error:"error",ignore:"ignore",clamp:"clamp",truncate:"truncate",replace:"replace"},outputFormat:{string:"string",number:"number",dot:".",negativeDot:"-.",comma:",",negativeComma:"-,",dotNegative:".-",commaNegative:",-",none:null},overrideMinMaxLimits:{ceiling:"ceiling",floor:"floor",ignore:"ignore",invalid:"invalid",doNotOverride:null},positiveSignCharacter:{plus:"+",fullWidthPlus:"\uff0b",heavyPlus:"\u2795",doublePlus:"\u29fa",triplePlus:"\u29fb",circledPlus:"\u2295",squaredPlus:"\u229e",trianglePlus:"\u2a39",plusMinus:"\xb1",minusPlus:"\u2213",dotPlus:"\u2214",altHebrewPlus:"\ufb29",normalSpace:" ",thinSpace:"\u2009",narrowNoBreakSpace:"\u202f",noBreakSpace:"\xa0"},rawValueDivisor:{none:null,percentage:100,permille:1e3,basisPoint:1e4},readOnly:{readOnly:!0,readWrite:!1},roundingMethod:{halfUpSymmetric:"S",halfUpAsymmetric:"A",halfDownSymmetric:"s",halfDownAsymmetric:"a",halfEvenBankersRounding:"B",upRoundAwayFromZero:"U",downRoundTowardZero:"D",toCeilingTowardPositiveInfinity:"C",toFloorTowardNegativeInfinity:"F",toNearest05:"N05",toNearest05Alt:"CHF",upToNext05:"U05",downToNext05:"D05"},saveValueToSessionStorage:{save:!0,doNotSave:!1},selectNumberOnly:{selectNumbersOnly:!0,selectAll:!1},selectOnFocus:{select:!0,doNotSelect:!1},serializeSpaces:{plus:"+",percent:"%20"},showOnlyNumbersOnFocus:{onlyNumbers:!0,showAll:!1},showPositiveSign:{show:!0,hide:!1},showWarnings:{show:!0,hide:!1},styleRules:{none:null,positiveNegative:{positive:"autoNumeric-positive",negative:"autoNumeric-negative"},range0To100With4Steps:{ranges:[{min:0,max:25,class:"autoNumeric-red"},{min:25,max:50,class:"autoNumeric-orange"},{min:50,max:75,class:"autoNumeric-yellow"},{min:75,max:100,class:"autoNumeric-green"}]},evenOdd:{userDefined:[{callback:function(a){return a%2==0},classes:["autoNumeric-even","autoNumeric-odd"]}]},rangeSmallAndZero:{userDefined:[{callback:function(a){return-1<=a&&a<0?0:0===Number(a)?1:0<a&&a<=1?2:null},classes:["autoNumeric-small-negative","autoNumeric-zero","autoNumeric-small-positive"]}]}},suffixText:{none:"",percentage:"%",permille:"\u2030",basisPoint:"\u2031"},symbolWhenUnfocused:{none:null,percentage:"%",permille:"\u2030",basisPoint:"\u2031"},unformatOnHover:{unformat:!0,doNotUnformat:!1},unformatOnSubmit:{unformat:!0,keepCurrentValue:!1},valuesToStrings:{none:null,zeroDash:{0:"-"},oneAroundZero:{"-1":"Min",1:"Max"}},watchExternalChanges:{watch:!0,doNotWatch:!1},wheelOn:{focus:"focus",hover:"hover"},wheelStep:{progressive:"progressive"}},W=m.options,Object.getOwnPropertyNames(W).forEach(function(a){"valuesToStrings"===a?Object.getOwnPropertyNames(W.valuesToStrings).forEach(function(s){i.isIE11()||null===W.valuesToStrings[s]||Object.freeze(W.valuesToStrings[s])}):"styleRules"!==a&&(i.isIE11()||null===W[a]||Object.freeze(W[a]))}),Object.freeze(W),Object.defineProperty(m,"options",{configurable:!1,writable:!1}),m.defaultSettings={allowDecimalPadding:m.options.allowDecimalPadding.always,alwaysAllowDecimalCharacter:m.options.alwaysAllowDecimalCharacter.doNotAllow,caretPositionOnFocus:m.options.caretPositionOnFocus.doNoForceCaretPosition,createLocalList:m.options.createLocalList.createList,currencySymbol:m.options.currencySymbol.none,currencySymbolPlacement:m.options.currencySymbolPlacement.prefix,decimalCharacter:m.options.decimalCharacter.dot,decimalCharacterAlternative:m.options.decimalCharacterAlternative.none,decimalPlaces:m.options.decimalPlaces.two,decimalPlacesRawValue:m.options.decimalPlacesRawValue.useDefault,decimalPlacesShownOnBlur:m.options.decimalPlacesShownOnBlur.useDefault,decimalPlacesShownOnFocus:m.options.decimalPlacesShownOnFocus.useDefault,defaultValueOverride:m.options.defaultValueOverride.doNotOverride,digitalGroupSpacing:m.options.digitalGroupSpacing.three,digitGroupSeparator:m.options.digitGroupSeparator.comma,divisorWhenUnfocused:m.options.divisorWhenUnfocused.none,emptyInputBehavior:m.options.emptyInputBehavior.focus,eventBubbles:m.options.eventBubbles.bubbles,eventIsCancelable:m.options.eventIsCancelable.isCancelable,failOnUnknownOption:m.options.failOnUnknownOption.ignore,formatOnPageLoad:m.options.formatOnPageLoad.format,formulaMode:m.options.formulaMode.disabled,historySize:m.options.historySize.medium,invalidClass:m.options.invalidClass,isCancellable:m.options.isCancellable.cancellable,leadingZero:m.options.leadingZero.deny,maximumValue:m.options.maximumValue.tenTrillions,minimumValue:m.options.minimumValue.tenTrillions,modifyValueOnWheel:m.options.modifyValueOnWheel.modifyValue,negativeBracketsTypeOnBlur:m.options.negativeBracketsTypeOnBlur.none,negativePositiveSignPlacement:m.options.negativePositiveSignPlacement.none,negativeSignCharacter:m.options.negativeSignCharacter.hyphen,noEventListeners:m.options.noEventListeners.addEvents,onInvalidPaste:m.options.onInvalidPaste.error,outputFormat:m.options.outputFormat.none,overrideMinMaxLimits:m.options.overrideMinMaxLimits.doNotOverride,positiveSignCharacter:m.options.positiveSignCharacter.plus,rawValueDivisor:m.options.rawValueDivisor.none,readOnly:m.options.readOnly.readWrite,roundingMethod:m.options.roundingMethod.halfUpSymmetric,saveValueToSessionStorage:m.options.saveValueToSessionStorage.doNotSave,selectNumberOnly:m.options.selectNumberOnly.selectNumbersOnly,selectOnFocus:m.options.selectOnFocus.select,serializeSpaces:m.options.serializeSpaces.plus,showOnlyNumbersOnFocus:m.options.showOnlyNumbersOnFocus.showAll,showPositiveSign:m.options.showPositiveSign.hide,showWarnings:m.options.showWarnings.show,styleRules:m.options.styleRules.none,suffixText:m.options.suffixText.none,symbolWhenUnfocused:m.options.symbolWhenUnfocused.none,unformatOnHover:m.options.unformatOnHover.unformat,unformatOnSubmit:m.options.unformatOnSubmit.keepCurrentValue,valuesToStrings:m.options.valuesToStrings.none,watchExternalChanges:m.options.watchExternalChanges.doNotWatch,wheelOn:m.options.wheelOn.focus,wheelStep:m.options.wheelStep.progressive},Object.freeze(m.defaultSettings),Object.defineProperty(m,"defaultSettings",{configurable:!1,writable:!1});var S={digitGroupSeparator:m.options.digitGroupSeparator.dot,decimalCharacter:m.options.decimalCharacter.comma,decimalCharacterAlternative:m.options.decimalCharacterAlternative.dot,currencySymbol:"\u202f\u20ac",currencySymbolPlacement:m.options.currencySymbolPlacement.suffix,negativePositiveSignPlacement:m.options.negativePositiveSignPlacement.prefix},P={digitGroupSeparator:m.options.digitGroupSeparator.comma,decimalCharacter:m.options.decimalCharacter.dot,currencySymbol:m.options.currencySymbol.dollar,currencySymbolPlacement:m.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:m.options.negativePositiveSignPlacement.right},k={digitGroupSeparator:m.options.digitGroupSeparator.comma,decimalCharacter:m.options.decimalCharacter.dot,currencySymbol:m.options.currencySymbol.yen,currencySymbolPlacement:m.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:m.options.negativePositiveSignPlacement.right};i.cloneObject(S).formulaMode=m.options.formulaMode.enabled;var R=i.cloneObject(S);R.minimumValue=0;var q=i.cloneObject(S);q.maximumValue=0,q.negativePositiveSignPlacement=m.options.negativePositiveSignPlacement.prefix;var ne=i.cloneObject(S);ne.digitGroupSeparator=m.options.digitGroupSeparator.normalSpace;var _e=i.cloneObject(ne);_e.minimumValue=0;var ye=i.cloneObject(ne);ye.maximumValue=0,ye.negativePositiveSignPlacement=m.options.negativePositiveSignPlacement.prefix;var Q=i.cloneObject(S);Q.currencySymbol=m.options.currencySymbol.none,Q.suffixText="\u202f".concat(m.options.suffixText.percentage),Q.wheelStep=1e-4,Q.rawValueDivisor=m.options.rawValueDivisor.percentage;var Se=i.cloneObject(Q);Se.minimumValue=0;var ce=i.cloneObject(Q);ce.maximumValue=0,ce.negativePositiveSignPlacement=m.options.negativePositiveSignPlacement.prefix;var Pe=i.cloneObject(Q);Pe.decimalPlaces=3;var Oe=i.cloneObject(Se);Oe.decimalPlaces=3;var Ee=i.cloneObject(ce);Ee.decimalPlaces=3,i.cloneObject(P).formulaMode=m.options.formulaMode.enabled;var Ne=i.cloneObject(P);Ne.minimumValue=0;var he=i.cloneObject(P);he.maximumValue=0,he.negativePositiveSignPlacement=m.options.negativePositiveSignPlacement.prefix;var ke=i.cloneObject(he);ke.negativeBracketsTypeOnBlur=m.options.negativeBracketsTypeOnBlur.parentheses;var Y=i.cloneObject(P);Y.currencySymbol=m.options.currencySymbol.none,Y.suffixText=m.options.suffixText.percentage,Y.wheelStep=1e-4,Y.rawValueDivisor=m.options.rawValueDivisor.percentage;var be=i.cloneObject(Y);be.minimumValue=0;var me=i.cloneObject(Y);me.maximumValue=0,me.negativePositiveSignPlacement=m.options.negativePositiveSignPlacement.prefix;var Ce=i.cloneObject(Y);Ce.decimalPlaces=3;var xe=i.cloneObject(be);xe.decimalPlaces=3;var Te=i.cloneObject(me);Te.decimalPlaces=3;var Fe=i.cloneObject(S);Fe.currencySymbol=m.options.currencySymbol.lira,m.predefinedOptions={euro:S,euroPos:R,euroNeg:q,euroSpace:ne,euroSpacePos:_e,euroSpaceNeg:ye,percentageEU2dec:Q,percentageEU2decPos:Se,percentageEU2decNeg:ce,percentageEU3dec:Pe,percentageEU3decPos:Oe,percentageEU3decNeg:Ee,dollar:P,dollarPos:Ne,dollarNeg:he,dollarNegBrackets:ke,percentageUS2dec:Y,percentageUS2decPos:be,percentageUS2decNeg:me,percentageUS3dec:Ce,percentageUS3decPos:xe,percentageUS3decNeg:Te,French:S,Spanish:S,NorthAmerican:P,British:{digitGroupSeparator:m.options.digitGroupSeparator.comma,decimalCharacter:m.options.decimalCharacter.dot,currencySymbol:m.options.currencySymbol.pound,currencySymbolPlacement:m.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:m.options.negativePositiveSignPlacement.right},Swiss:{digitGroupSeparator:m.options.digitGroupSeparator.apostrophe,decimalCharacter:m.options.decimalCharacter.dot,currencySymbol:"\u202fCHF",currencySymbolPlacement:m.options.currencySymbolPlacement.suffix,negativePositiveSignPlacement:m.options.negativePositiveSignPlacement.prefix},Japanese:k,Chinese:k,Brazilian:{digitGroupSeparator:m.options.digitGroupSeparator.dot,decimalCharacter:m.options.decimalCharacter.comma,currencySymbol:m.options.currencySymbol.real,currencySymbolPlacement:m.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:m.options.negativePositiveSignPlacement.right},Turkish:Fe,dotDecimalCharCommaSeparator:{digitGroupSeparator:m.options.digitGroupSeparator.comma,decimalCharacter:m.options.decimalCharacter.dot},commaDecimalCharDotSeparator:{digitGroupSeparator:m.options.digitGroupSeparator.dot,decimalCharacter:m.options.decimalCharacter.comma,decimalCharacterAlternative:m.options.decimalCharacterAlternative.dot},integer:{decimalPlaces:0},integerPos:{minimumValue:m.options.minimumValue.zero,decimalPlaces:0},integerNeg:{maximumValue:m.options.maximumValue.zero,decimalPlaces:0},float:{allowDecimalPadding:m.options.allowDecimalPadding.never},floatPos:{allowDecimalPadding:m.options.allowDecimalPadding.never,minimumValue:m.options.minimumValue.zero,maximumValue:m.options.maximumValue.tenTrillions},floatNeg:{allowDecimalPadding:m.options.allowDecimalPadding.never,minimumValue:m.options.minimumValue.tenTrillions,maximumValue:m.options.maximumValue.zero},numeric:{digitGroupSeparator:m.options.digitGroupSeparator.noSeparator,decimalCharacter:m.options.decimalCharacter.dot,currencySymbol:m.options.currencySymbol.none},numericPos:{digitGroupSeparator:m.options.digitGroupSeparator.noSeparator,decimalCharacter:m.options.decimalCharacter.dot,currencySymbol:m.options.currencySymbol.none,minimumValue:m.options.minimumValue.zero,maximumValue:m.options.maximumValue.tenTrillions},numericNeg:{digitGroupSeparator:m.options.digitGroupSeparator.noSeparator,decimalCharacter:m.options.decimalCharacter.dot,currencySymbol:m.options.currencySymbol.none,minimumValue:m.options.minimumValue.tenTrillions,maximumValue:m.options.maximumValue.zero}},Object.getOwnPropertyNames(m.predefinedOptions).forEach(function(a){Object.freeze(m.predefinedOptions[a])}),Object.freeze(m.predefinedOptions),Object.defineProperty(m,"predefinedOptions",{configurable:!1,writable:!1}),O.default=m}],A.c=h,A.d=function(N,O,D){A.o(N,O)||Object.defineProperty(N,O,{enumerable:!0,get:D})},A.r=function(N){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(N,"__esModule",{value:!0})},A.t=function(N,O){if(1&O&&(N=A(N)),8&O||4&O&&"object"==typeof N&&N&&N.__esModule)return N;var D=Object.create(null);if(A.r(D),Object.defineProperty(D,"default",{enumerable:!0,value:N}),2&O&&"string"!=typeof N)for(var F in N)A.d(D,F,function(v){return N[v]}.bind(null,F));return D},A.n=function(N){var O=N&&N.__esModule?function(){return N.default}:function(){return N};return A.d(O,"a",O),O},A.o=function(N,O){return Object.prototype.hasOwnProperty.call(N,O)},A.p="",A(A.s=0).default;function A(N){if(h[N])return h[N].exports;var O=h[N]={i:N,l:!1,exports:{}};return C[N].call(O.exports,O,O.exports,A),O.l=!0,O.exports}var C,h}()}}]);