dealposbarcode 1.3.8 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +425 -0
- package/660.92c4712e216ff00c.js +1 -0
- package/{barcode/assets → assets}/css/Barcode/Print.css +11 -11
- package/{barcode/assets → assets}/css/Barcode/ZebraTLP.css +93 -93
- package/{barcode/assets → assets}/css/BarcodePrinter.min.css +0 -0
- package/{barcode/assets → assets}/css/bootstrap_light.scss +1151 -1151
- package/{barcode/assets → assets}/css/lbd/_alerts.scss +90 -90
- package/{barcode/assets → assets}/css/lbd/_bootstrap-switch.scss +128 -128
- package/{barcode/assets → assets}/css/lbd/_buttons.scss +132 -132
- package/{barcode/assets → assets}/css/lbd/_cards.scss +256 -256
- package/{barcode/assets → assets}/css/lbd/_chartist.scss +229 -229
- package/{barcode/assets → assets}/css/lbd/_checkbox-radio-switch.scss +140 -140
- package/{barcode/assets → assets}/css/lbd/_dropdown.scss +137 -137
- package/{barcode/assets → assets}/css/lbd/_footers.scss +75 -75
- package/{barcode/assets → assets}/css/lbd/_inputs.scss +141 -141
- package/{barcode/assets → assets}/css/lbd/_misc.scss +120 -120
- package/{barcode/assets → assets}/css/lbd/_mixins.scss +8 -8
- package/{barcode/assets → assets}/css/lbd/_navbars.scss +225 -225
- package/{barcode/assets → assets}/css/lbd/_partial-nucleo-icons.scss +574 -574
- package/{barcode/assets → assets}/css/lbd/_responsive.scss +482 -482
- package/{barcode/assets → assets}/css/lbd/_sidebar-and-main-panel.scss +331 -331
- package/{barcode/assets → assets}/css/lbd/_tables.scss +88 -88
- package/{barcode/assets → assets}/css/lbd/_typography.scss +91 -91
- package/{barcode/assets → assets}/css/lbd/_variables.scss +272 -272
- package/{barcode/assets → assets}/css/lbd/mixins/_buttons.scss +69 -69
- package/{barcode/assets → assets}/css/lbd/mixins/_cards.scss +8 -8
- package/{barcode/assets → assets}/css/lbd/mixins/_chartist.scss +85 -85
- package/{barcode/assets → assets}/css/lbd/mixins/_icons.scss +12 -12
- package/{barcode/assets → assets}/css/lbd/mixins/_inputs.scss +1 -1
- package/{barcode/assets → assets}/css/lbd/mixins/_labels.scss +20 -20
- package/{barcode/assets → assets}/css/lbd/mixins/_morphing-buttons.scss +33 -33
- package/{barcode/assets → assets}/css/lbd/mixins/_navbars.scss +11 -11
- package/{barcode/assets → assets}/css/lbd/mixins/_social-buttons.scss +42 -42
- package/{barcode/assets → assets}/css/lbd/mixins/_tabs.scss +3 -3
- package/{barcode/assets → assets}/css/lbd/mixins/_transparency.scss +19 -19
- package/{barcode/assets → assets}/css/lbd/mixins/_vendor-prefixes.scss +211 -211
- package/{barcode/assets → assets}/css/lbd/plugins/_animate.scss +227 -227
- package/{barcode/assets → assets}/css/lbd/plugins/_datetime-picker.scss +463 -463
- package/{barcode/assets → assets}/css/light-bootstrap-dashboard.scss +32 -32
- package/{barcode/assets → assets}/css/pos_variable.scss +83 -83
- package/{barcode/assets → assets}/css/toastr-bootstrap-5.scss +237 -237
- package/{barcode/assets → assets}/icons/icon-128x128.png +0 -0
- package/{barcode/assets → assets}/icons/icon-144x144.png +0 -0
- package/{barcode/assets → assets}/icons/icon-152x152.png +0 -0
- package/{barcode/assets → assets}/icons/icon-192x192.png +0 -0
- package/{barcode/assets → assets}/icons/icon-384x384.png +0 -0
- package/{barcode/assets → assets}/icons/icon-512x512.png +0 -0
- package/{barcode/assets → assets}/icons/icon-72x72.png +0 -0
- package/{barcode/assets → assets}/icons/icon-96x96.png +0 -0
- package/{barcode/favicon.ico → favicon.ico} +0 -0
- package/{barcode/index.html → index.html} +23 -24
- package/main.52f922e4138d5416.js +1 -0
- package/{barcode/manifest.webmanifest → manifest.webmanifest} +59 -59
- package/ngsw-worker.js +1845 -0
- package/ngsw.json +161 -0
- package/package.json +1 -11
- package/polyfills.24f9e567328321c8.js +1 -0
- package/runtime.7ee318550a075ff2.js +1 -0
- package/safety-worker.js +26 -0
- package/styles.190cdb80d8bf56e0.css +20 -0
- package/worker-basic.min.js +26 -0
- package/barcode/main.js +0 -1428
- package/barcode/main.js.map +0 -1
- package/barcode/polyfills.js +0 -3398
- package/barcode/polyfills.js.map +0 -1
- package/barcode/runtime.js +0 -304
- package/barcode/runtime.js.map +0 -1
- package/barcode/src_app_pages_pages_module_ts.js +0 -9694
- package/barcode/src_app_pages_pages_module_ts.js.map +0 -1
- package/barcode/styles.css +0 -15002
- package/barcode/styles.css.map +0 -1
- package/barcode/vendor.js +0 -114647
- package/barcode/vendor.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkbarcode_app=self.webpackChunkbarcode_app||[]).push([[660],{3660:(H,S,C)=>{"use strict";C.r(S),C.d(S,{PagesModule:()=>ht});var M=C(6895),N=C(8729),t=C(1571),F=C(1135),x=C(9300);let O=(()=>{class _{constructor(){this.store=new F.X([])}getState(){return this.store.asObservable().pipe((0,x.h)(r=>void 0!==r))}setState(r){this.store.next(r)}}return _.\u0275fac=function(r){return new(r||_)},_.\u0275prov=t.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})();var k=C(3389),V=C(5083),b=C(7579),l=C(2722);let c=(()=>{class _{static StringFormat(r,...s){for(let w=0;w<s.length;w++)r=r.replace(`{${w}}`,s[w]);return r}static IsNotEmpty(r){return""!=r&&r!=_.GuidEmpty&&null!=r&&null!=r}static IsEmpty(r){return""==r||null==r||null==r||r==_.GuidEmpty}static FilterByID(r,s){try{const w=r.filter(L=>L.ID==s);if(w.length>0)return w[0]}catch{console.log("error filter")}return null}static DateOnly(r){return r?new Date(new Date(r).toDateString()):new Date((new Date).toDateString())}}return _.GuidEmpty="00000000-0000-0000-0000-000000000000",_.DecimalMinValue="-7.922816251426434e+28",_.InputLockTimeSpan=500,_.MinDate="0001-01-01T00:00:00",_.MinTime="00:00:00",_})();var E=(()=>{return(_=E||(E={}))[_.SUPPLIER_BILL=0]="SUPPLIER_BILL",_[_.OUTLET_DELIVERY=1]="OUTLET_DELIVERY",E;var _})(),D=C(5412),G=C(6985),U=C(433),K=C(8796),ae=C(4405);let me=(()=>{class _{constructor(r,s){this.data=r,this.dialogRef=s,this.outlets=r.outlets}ngOnInit(){this.initModalConfig(),this.initTransactionType()}initModalConfig(){this.modalConfig=new G.O,this.modalConfig.title="Choose your transaction",this.modalConfig.hideMoreButton=!0}initTransactionType(){this.transactionTypes=[{title:"Supplier Bill",type:E.SUPPLIER_BILL},{title:"Transfer Order",type:E.OUTLET_DELIVERY}]}onOk(){this.selectedOutlet&&this.poNumber&&this.dialogRef.close({Outlet:this.selectedOutlet.getName,Number:this.poNumber,Type:this.selectedTransactionType})}onCancel(){this.dialogRef.close()}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(D.WI),t.Y36(D.so))},_.\u0275cmp=t.Xpm({type:_,selectors:[["app-form-add-bill"]],decls:18,vars:10,consts:[[3,"config","onOk","onCancel"],[1,"row"],["align","center",1,"col-sm-12","mt-3"],[2,"position","relative","width","100%"],[1,"w-100"],["bindLabel","title","bindValue","type","placeholder","Choose Type",1,"sticky-top","tall",3,"items","ngModel","clearable","appendTo","ngModelChange"],[1,"pt-6"],["bindLabel","Name","placeholder","Choose Outlet",1,"sticky-top","tall",3,"items","ngModel","clearable","appendTo","ngModelChange"],[1,"form-label-group"],["min","1","id","qty","type","text","placeholder","Invoice Number","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],["for","qty"]],template:function(r,s){1&r&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return s.onOk()})("onCancel",function(){return s.onCancel()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"table",3)(5,"tbody")(6,"tr",4)(7,"td")(8,"ng-select",5),t.NdJ("ngModelChange",function(L){return s.selectedTransactionType=L}),t.qZA()()(),t.TgZ(9,"tr",4)(10,"td",6)(11,"ng-select",7),t.NdJ("ngModelChange",function(L){return s.selectedOutlet=L}),t.qZA()()(),t.TgZ(12,"tr",4)(13,"td",6)(14,"div",8)(15,"input",9),t.NdJ("ngModelChange",function(L){return s.poNumber=L}),t.qZA(),t.TgZ(16,"label",10),t._uU(17,"Invoice Number"),t.qZA()()()()()()()()()()),2&r&&(t.Q6J("config",s.modalConfig),t.xp6(8),t.Q6J("items",s.transactionTypes)("ngModel",s.selectedTransactionType)("clearable",!1)("appendTo","body"),t.xp6(3),t.Q6J("items",s.outlets)("ngModel",s.selectedOutlet)("clearable",!1)("appendTo","body"),t.xp6(4),t.Q6J("ngModel",s.poNumber))},dependencies:[U.Fj,U.JJ,U.On,K.w9,ae.M]}),_})();var le=C(8505),ie=C(4004),ge=C(1104);let J=(()=>{class _{constructor(r){this.httpService=r,this.barcodeConfigState=new F.X(null)}updatePaperFormatConfig(r){let s=localStorage.getItem("Domain");return this.httpService.post("/api/Config/SaveConfig",{SubDomain:s,Version:this.paperFormatVersion,PaperFormats:r})}getPaperFormatConfig(){let r=localStorage.getItem("Domain"),s=[];return this.httpService.post("/api/Config/PaperConfig",{SubDomain:r}).pipe((0,ie.U)(q=>(this.paperFormatVersion=q.version,s=q.PaperFormats,s)))}setBarcodeConfigState(r){this.barcodeConfigState.next(r)}getBarcodeConfigState(){return this.barcodeConfigState.asObservable().pipe((0,x.h)(r=>c.IsNotEmpty(r)))}}return _.\u0275fac=function(r){return new(r||_)(t.LFG(ge.O))},_.\u0275prov=t.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})();var A=C(529);class ee{constructor(f){f&&(this.AccountID=f.AccountID,this.CalculationTypeID=f.CalculationTypeID,this.ID=f.ID,this.Index=f.Index,this.Label=f.Label,this.MultipleTaxTypeID=f.MultipleTaxTypeID,this.Note=f.Note,this.PrintVisible=f.PrintVisible,this.Rate=f.Rate,this.TypeID=f.TypeID,this.Name=f.Name,this.Type=f.Type)}get getID(){return this.ID}get getType(){return this.Type}get getName(){return this.Name}get getAccountID(){return this.AccountID}set setAccountId(f){this.AccountID=f}get getCalculationTypeID(){return this.CalculationTypeID}set setCalculationID(f){this.CalculationTypeID=f}get getRate(){return this.Rate}set setRate(f){this.Rate=f}get getLabel(){return this.Label}}class Q{get getID(){return this.ID}set setID(f){this.ID=f}get getSelectedPromotion(){return this.SelectedPromotion}set setSelectedPromotion(f){this.SelectedPromotion=f}get getDescription(){return this.description}set setDescription(f){this.description=f}set setBarcodeTitle(f){this.barcodeTitle=f}get getBarcodeTitle(){return this.barcodeTitle}set setCustomPrice(f){this.customPrice=f}get getCustomPrice(){return this.customPrice}get getUnitPrice(){return this.UnitPrice}set setUnitPrice(f){this.UnitPrice=f}get getCode(){return this.Code}set setCode(f){this.barcodeTitle=f,this.Code=f}get getModel(){return this.Model}set setModel(f){this.Model=f}get getName(){return this.Name}set setName(f){this.Name=f}get getCurrency(){return this.CurrencySymbol}set setCurrency(f){this.CurrencySymbol=f}}class ${get getCode(){return this.Code}get getName(){return this.Name}get getSuspended(){return this.Suspended}set setCode(f){this.Code=f}set setName(f){this.Name=f}set setSuspended(f){this.Suspended=f}}class ce{get getOutlet(){return this.Outlet}get getNumber(){return this.Number}get getDate(){return this.Date}get getDueDate(){return this.DueDate}get getSupplier(){return this.Supplier}get getCreatorID(){return this.CreatorID}get getCreated(){return this.Created}get getDiscount1(){return this.Discount1}get getDiscountAmount(){return this.DiscountAmount}get getGross(){return this.Gross}get getDiscountTotal(){return this.DiscountTotal}get getTaxType(){return this.TaxType}get getTax(){return this.Tax}get getPurchase(){return this.Purchase}get getPurchaseNTax(){return this.PurchaseNTax}get getDelivery(){return this.Delivery}get getVariants(){return this.Variants}get getPayments(){return this.Payments}set setOutlet(f){this.Outlet=f}set setNumber(f){this.Number=f}set setDate(f){this.Date=f}set setDueDate(f){this.DueDate=f}set setSupplier(f){this.Supplier=f}set setCreatorID(f){this.CreatorID=f}set setCreated(f){this.Created=f}set setDiscount1(f){this.Discount1=f}set setDiscountAmount(f){this.DiscountAmount=f}set setGross(f){this.Gross=f}set setDiscountTotal(f){this.DiscountTotal=f}set setTaxType(f){this.TaxType=f}set setTax(f){this.Tax=f}set setPurchase(f){this.Purchase=f}set setPurchaseNTax(f){this.PurchaseNTax=f}set setDelivery(f){this.Delivery=f}set setVariants(f){this.Variants=f}set setPayments(f){this.Payments=f}}class Ee extends Q{constructor(){super()}get getVariantID(){return this.VariantID}get getQuantity(){return this.Quantity}get getPrice(){return this.Price}get getDiscount(){return this.Discount}get getNettPrice(){return this.NettPrice}set setVariantID(f){this.VariantID=f}set setQuantity(f){this.Quantity=f}set setPrice(f){this.Price=f}set setDiscount(f){this.Discount=f}set setNettPrice(f){this.NettPrice=f}}class Pe{get getID(){return this.ID}set setID(f){this.ID=f}get getName(){return this.Name}set setName(f){this.Name=f}get getDiscount(){return this.Discount}get getExtraCost(){return this.ExtraCost}get getPromotionID(){return this.PromotionID}get getUnitPrice(){return this.UnitPrice}set setDiscount(f){this.Discount=f}set setExtraCost(f){this.ExtraCost=f}set setPromotionID(f){this.PromotionID=f}set setUnitPrice(f){this.UnitPrice=f}}let be=(()=>{class _{constructor(){}getProductModel(r){let s=new Q;return s.setID=r.ID,s.setCode=r.Code,s.setCurrency=r.CurrencySymbol,s.setModel=r.Model,s.setName=r.Name,s.setUnitPrice=r.UnitPrice,s.setDescription=r.Description,s}getTaxModel(r){return new ee(r)}getOutletModel(r){let s=new $;return s.setCode=r.Code,s.setName=r.Name,s.setSuspended=r.Suspended,s}getVariantModel(r){let s=new Ee;return s.setCode=r.Code,s.setDiscount=r.Discount,s.setNettPrice=r.NettPrice,s.setPrice=r.Price,s.setUnitPrice=r.UnitPrice,s.setQuantity=r.Quantity,s.setVariantID=r.VariantID,s.setName=r.Name,s}getBillModel(r){let s=new ce;return s.setNumber=r.Number,s.setOutlet=r.Outlet,s.setVariants=r.Variants?r.Variants.map(w=>this.getVariantModel(w)):[],s}getPromotionModel(r){let s=new Pe;return s.setDiscount=r.Discount,s.setExtraCost=r.ExtraCost,s.setPromotionID=r.PromotionID,s.setUnitPrice=r.UnitPrice,s.setName=r.Name,s.setID=r.ID,s}}return _.\u0275fac=function(r){return new(r||_)},_.\u0275prov=t.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})(),Ce=(()=>{class _{constructor(r,s,w){this.httpService=r,this.http=s,this.factoryService=w}getProductById(r){let s=localStorage.getItem("Domain");return this.httpService.post(`https://${s}/API/V3/Variant/ID`,{ID:r}).pipe((0,ie.U)(w=>this.factoryService.getProductModel(w)))}getPromotionByProducID(r){let s=localStorage.getItem("Domain");return this.httpService.post(`https://${s}/API/v3/PromotionEvent/GetByVariantID`,{VariantID:r}).pipe((0,ie.U)(w=>w.map(q=>this.factoryService.getPromotionModel(q))))}uploadProducts(r){let s=localStorage.getItem("Domain"),w=new FormData;return w.append("file",r,r.name),this.httpService.postFormData(`https://${s}/API/catalog/product/UploadCSVforBarcode`,w).pipe((0,ie.U)(L=>L.map(q=>(q.Print=q.Print.map(X=>this.factoryService.getProductModel(X)),q))))}getTax(){let r=localStorage.getItem("Domain"),s=localStorage.getItem("Token"),w=`https://${r}/API/V3/Tax`,L=new A.WM({authorization:"Bearer "+s,"content-type":"application/json","X-ClientId":"dealpos-app"});return this.http.get(w,{headers:L}).pipe((0,ie.U)(q=>{if(q)return q.map(X=>this.factoryService.getTaxModel(X))}))}}return _.\u0275fac=function(r){return new(r||_)(t.LFG(ge.O),t.LFG(A.eN),t.LFG(be))},_.\u0275prov=t.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})();var Me=C(7370);let pe=(()=>{class _{constructor(r){this.elementRef=r,this.decimalPlaces=4,this.modifyValueOnWheel=!0,this.max="999999999999999.9999",this.min="-999999999999999.9999",this.propagateChange=w=>{},this.preventNegative=!1,this.numericElement=new Me(this.elementRef.nativeElement,null,{digitGroupSeparator:",",decimalCharacter:".",decimalPlaces:this.decimalPlaces,maximumValue:this.max,minimumValue:this.min,allowDecimalPadding:!1,showWarnings:!1})}set _max(r){r&&(this.max=r,this.updateNumericSettings())}set _min(r){r&&(this.min=r,this.updateNumericSettings())}ngOnInit(){""==this.percentage&&(this.max="100"),this.preventNegative&&(this.min="0.00"),this.updateNumericSettings()}updateNumericSettings(){const r={maximumValue:this.max,minimumValue:this.min,readOnly:this.isElementDisabled(),decimalPlaces:this.decimalPlaces,modifyValueOnWheel:this.modifyValueOnWheel};this.numericElement.update(r)}onKeyUp(){let r=this.numericElement.getNumber();this.propagateChange(r)}isElementDisabled(){let r=!1;return(!0===this.elementRef.nativeElement.readOnly||!0===this.elementRef.nativeElement.disabled)&&(r=!0),r}writeValue(r){null!=r&&this.numericElement.set(r)}registerOnChange(r){this.propagateChange=r}registerOnTouched(){}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(t.SBq))},_.\u0275dir=t.lG2({type:_,selectors:[["","autoNum",""]],hostBindings:function(r,s){1&r&&t.NdJ("keyup",function(){return s.onKeyUp()})},inputs:{percentage:"percentage",preventNegative:"preventNegative",decimalPlaces:"decimalPlaces",modifyValueOnWheel:"modifyValueOnWheel",_max:["max","_max"],_min:["min","_min"]},features:[t._Bn([{provide:U.JU,useExisting:(0,t.Gpc)(()=>_),multi:!0}])]}),_})();var we=C(4120),ke=C(8372),ve=C(3238);const Re=["input"];function De(_,f){if(1&_&&t._UZ(0,"img",10),2&_){const r=t.oxw().$implicit;t.Q6J("src",r.ImgUrl,t.LSH)}}function Be(_,f){if(1&_){const r=t.EpF();t.TgZ(0,"mat-option",8),t.NdJ("click",function(w){const q=t.CHM(r).$implicit;return t.oxw().changeDisplayName(q),t.KtG(w.stopPropagation())}),t.YNc(1,De,1,1,"img",9),t._uU(2),t.qZA()}if(2&_){const r=f.$implicit,s=t.oxw();t.Q6J("value",r),t.xp6(1),t.Q6J("ngIf",s.renderThumbnail&&r.ImgUrl),t.xp6(1),t.hij(" ",r.Value," ")}}let Te=(()=>{class _{constructor(r,s){this.httpService=r,this.ngZone=s,this.offlineStorage=[],this.inputLock=!1,this.renderThumbnail=!1,this.onOffline=new t.vpe,this.onEnter=new t.vpe,this.onSelect=new t.vpe,this.onOptionSelect=new t.vpe,this.reset=new t.vpe,this.termControl=new U.p4(""),this.options=[],this.complete=!1,this.foundProduct=!1,this.propagateChange=w=>{},this.termControl.valueChanges.pipe((0,ke.b)(500)).subscribe(w=>{this.options=[],"object"==typeof w?(this.value=w.Key,this.clearOnSelect?this.clear():(this.termControl.setValue(w.Value),this.complete=!0),this.onSelect&&this.onSelect.emit(w.Key),this.options=[],"object"==typeof w&&(this.value=w.Key,this.clearOnSelect?this.clear():(this.termControl.setValue(w.Value),this.complete=!0),this.onOptionSelect)&&this.onOptionSelect.emit(JSON.stringify({Key:w.Key,Value:w.Value}))):"string"==typeof w&&w.length>0?w.length>2&&!this.inputLock&&this.search(w):this.clear()})}set display(r){this.input.nativeElement.value=r}get value(){return this._value}set value(r){this._value=r,this.propagateChange(this._value)}ngOnChanges(r){null!=r.ngModel&&null==r.ngModel.currentValue&&this.clear(),null!=r.display&&r.display.currentValue!=r.display.previousValue&&this.termControl.setValue(r.display.currentValue)}ngAfterViewInit(){}search(r){if(this.termControl.value.length>0){let s={};if(this.data&&(s=this.data),s.prefix=r,s.count=100,this.complete)this.complete=!1;else{let w=this.url,L=localStorage.getItem("Domain");L&&(w=`https://${L}${this.url}`),this.httpService.post(w,s).subscribe(q=>{this.options=q,this.foundProduct=this.options.length>0})}}else this.options=null}onblur(){setTimeout(()=>{},600)}changeDisplayName(r){this.input.nativeElement.value=r.Value}onKeydown(r){const s=r.key;"Enter"===s?(this.clearOnSelect&&this.clear(),!this.foundProduct&&this.termControl.value.length>0&&(this.onEnter.emit(this.termControl.value),r.stopPropagation()),null!=this.termControl.value&&(this.input.nativeElement.value=this.termControl.value.Value),this.foundProduct=!1):(this.inputLock&&("Backspace"===s?this.clear():this.validateInputLock()),this.complete=!1,this.reset.emit())}validateInputLock(){""==this.input.nativeElement.value||0==this.input.nativeElement.value.length?this.startInput=new Date:(new Date).getTime()-this.startInput.getTime()>500&&this.clear()}clear(){this.value=null,this.input.nativeElement.value=""}displayFn(r){return r&&r.Value}writeValue(r){}registerOnChange(r){this.propagateChange=r}registerOnTouched(){}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(ge.O),t.Y36(t.R0b))},_.\u0275cmp=t.Xpm({type:_,selectors:[["autocomplete"]],viewQuery:function(r,s){if(1&r&&t.Gf(Re,7),2&r){let w;t.iGM(w=t.CRH())&&(s.input=w.first)}},inputs:{placeholder:"placeholder",url:"url",clearOnSelect:"clearOnSelect",offlineStorage:"offlineStorage",inputLock:"inputLock",data:"data",renderThumbnail:"renderThumbnail",ngModel:"ngModel",displayText:"displayText",localStorage:"localStorage",_value:"_value",display:"display"},outputs:{onOffline:"onOffline",onEnter:"onEnter",onSelect:"onSelect",onOptionSelect:"onOptionSelect",reset:"reset"},features:[t._Bn([{provide:U.JU,useExisting:(0,t.Gpc)(()=>_),multi:!0}]),t.TTD],decls:9,vars:5,consts:[[1,"w-100"],[1,"form-label-group"],["id","input","type","text","matInput","",1,"form-control","text-black",3,"matAutocomplete","placeholder","formControl","paste","keydown","blur"],["input",""],["for","input"],["autoActiveFirstOption","true"],["autocomplete","matAutocomplete"],["class","option-autocomplete",3,"value","click",4,"ngFor","ngForOf"],[1,"option-autocomplete",3,"value","click"],["width","30","height","30",3,"src",4,"ngIf"],["width","30","height","30",3,"src"]],template:function(r,s){if(1&r&&(t.TgZ(0,"mat-form-field",0)(1,"div",1)(2,"input",2,3),t.NdJ("paste",function(L){return s.inputLock?L.preventDefault():""})("keydown",function(L){return s.onKeydown(L)})("blur",function(){return s.onblur()}),t.qZA(),t.TgZ(4,"label",4),t._uU(5),t.qZA()()(),t.TgZ(6,"mat-autocomplete",5,6),t.YNc(8,Be,3,3,"mat-option",7),t.qZA()),2&r){const w=t.MAs(7);t.xp6(2),t.s9C("placeholder",s.placeholder||""),t.Q6J("matAutocomplete",w)("formControl",s.termControl),t.xp6(3),t.Oqu(s.placeholder||""),t.xp6(3),t.Q6J("ngForOf",s.options)}},dependencies:[we.XC,we.ZL,ve.ey,M.sg,M.O5,U.Fj,U.JJ,U.oH],styles:["mat-option[_ngcontent-%COMP%]{font-size:12px}"]}),_})(),Ue=(()=>{class _{}return _.\u0275fac=function(r){return new(r||_)},_.\u0275mod=t.oAB({type:_}),_.\u0275inj=t.cJS({imports:[we.Bb,M.ez,U.UX]}),_})(),fe=(()=>{class _{constructor(r,s,w,L,q){this.dialogRef=r,this.barcodeService=s,this.productService=w,this.authenticationService=L,this.data=q,this.modalConfig=new G.O,this.variantName="",this.hasProductEdit=!0,this.hasPromotion=!1,this.destroy$=new b.x,this.variantName=q.variantName,this.qty=q.qty,this.customPrice=q.customPrice}ngOnInit(){this.getBarcodeConfig(),this.initModalConfig(),this.initProductUpdate(),this.initRoleProductEdit()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}initRoleProductEdit(){let r=this.authenticationService.getRoles();this.hasProductEdit=-1!==r.findIndex(s=>"ProdE"==s)}initProductUpdate(){c.IsNotEmpty(this.data.variantId)&&this.getProductById(this.data.variantId).subscribe(r=>{this.product.setSelectedPromotion=this.data.promotion,this.hasPromotion=c.IsNotEmpty(this.data.promotion)})}getBarcodeConfig(){this.barcodeService.getBarcodeConfigState().pipe((0,l.R)(this.destroy$)).subscribe(r=>{r&&(this.paperFormat=r)})}initModalConfig(){this.modalConfig.title="Add New Product Barcode?",this.modalConfig.hideMoreButton=!0}onSelectProduct(r){this.getProductById(r).subscribe(s=>{this.customPrice=s.getUnitPrice,this.hasPromotion=!1,this.product.setSelectedPromotion=null})}getProductById(r){return this.productService.getProductById(r).pipe((0,le.b)(s=>{this.product=s,this.getPromotionByProductID(r)}))}getPromotionByProductID(r){this.productService.getPromotionByProducID(r).subscribe(s=>{this.promotions=s})}onCustomPriceChange(r){this.customPrice=r}onSelectPromotion(r){r?(this.product.setSelectedPromotion=this.promotions.find(s=>s.getName==r?.getName),this.customPrice=this.product.getUnitPrice,this.hasPromotion=c.IsNotEmpty(this.product.getSelectedPromotion)):(this.hasPromotion=!1,this.product.setSelectedPromotion=null)}onOk(){this.qty&&this.qty>0&&this.product&&this.dialogRef.close({customPrice:this.customPrice,product:this.product,quantity:this.qty})}onCancel(){this.dialogRef.close()}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(D.so),t.Y36(J),t.Y36(Ce),t.Y36(k.$),t.Y36(D.WI))},_.\u0275cmp=t.Xpm({type:_,selectors:[["app-form-add-variant"]],features:[t._Bn([M.JJ])],decls:24,vars:7,consts:[[3,"config","onOk","onCancel"],[1,"row"],["align","center",1,"col-sm-12","mt-3"],[2,"position","relative","width","100%"],[1,"w-100"],["placeholder","Name","url","/API/AC/GetVariantSuggestionByCodeNName",3,"display","onSelect"],[1,"form-label-group"],["id","qty","type","text","placeholder","Quantity","aria-label","width","autoNum","",1,"form-control",3,"ngModel","ngModelChange"],["for","qty"],[1,"pb-9"],["bindLabel","Name","bindValue","PromotionID","appendTo","body","placeholder","Select Promotion Price",1,"sticky-top","tall",3,"items","ngModel","change"],["placeholder","Price","aria-label","width","autoNum","",1,"form-control",3,"ngModel","readonly","ngModelChange"],["for","price"]],template:function(r,s){1&r&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return s.onOk()})("onCancel",function(){return s.onCancel()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"table",3)(5,"tbody")(6,"tr",4)(7,"td")(8,"autocomplete",5),t.NdJ("onSelect",function(L){return s.onSelectProduct(L)}),t.qZA()()(),t.TgZ(9,"tr",4)(10,"td")(11,"div",6)(12,"input",7),t.NdJ("ngModelChange",function(L){return s.qty=L}),t.qZA(),t.TgZ(13,"label",8),t._uU(14,"Quantity"),t.qZA()()()(),t.TgZ(15,"tr",4)(16,"td",9)(17,"ng-select",10),t.NdJ("change",function(L){return s.onSelectPromotion(L)}),t.qZA()()(),t.TgZ(18,"tr",4)(19,"td")(20,"div",6)(21,"input",11),t.NdJ("ngModelChange",function(L){return s.onCustomPriceChange(L)}),t.qZA(),t.TgZ(22,"label",12),t._uU(23,"Price"),t.qZA()()()()()()()()()()),2&r&&(t.Q6J("config",s.modalConfig),t.xp6(8),t.Q6J("display",s.variantName),t.xp6(4),t.Q6J("ngModel",s.qty),t.xp6(5),t.Q6J("items",s.promotions)("ngModel",null==s.product||null==s.product.getSelectedPromotion?null:s.product.getSelectedPromotion.getPromotionID),t.xp6(4),t.Q6J("ngModel",s.customPrice)("readonly",s.hasPromotion||!s.hasProductEdit))},dependencies:[U.Fj,U.JJ,U.On,K.w9,ae.M,pe,Te]}),_})(),Ie=(()=>{class _{constructor(r,s){this.dialogRef=r,this.data=s,this.event=new t.vpe,this.modalConfig=new G.O}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig.title="Upload New Product Barcode?",this.modalConfig.hideMoreButton=!0}onOk(){this.dialogRef.close(this.files)}onCancel(){this.dialogRef.close()}onUploadFile(r){r&&(this.files=r.target.files)}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(D.so),t.Y36(D.WI))},_.\u0275cmp=t.Xpm({type:_,selectors:[["app-form-upload-variant"]],outputs:{event:"event"},decls:15,vars:1,consts:[[3,"config","onOk","onCancel"],[1,"row"],[1,"col-sm-12"],["href","//res.cloudinary.com/pos/raw/upload/POS/CSV/Barcode_DealPOS.csv",2,"font-size","12px"],[1,"value-title"],["type","file","aria-label","upload",3,"change"]],template:function(r,s){1&r&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return s.onOk()})("onCancel",function(){return s.onCancel()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"a",3),t._uU(5,"Download Sample CSV"),t.qZA(),t.TgZ(6,"table")(7,"tbody")(8,"tr")(9,"th",4),t._uU(10,"CSV File"),t.qZA(),t.TgZ(11,"td"),t._uU(12,":"),t.qZA(),t.TgZ(13,"td")(14,"input",5),t.NdJ("change",function(L){return s.onUploadFile(L)}),t.qZA()()()()()()()()()),2&r&&t.Q6J("config",s.modalConfig)},dependencies:[ae.M]}),_})();var Oe=C(7185);let Ze=(()=>{class _{constructor(r,s){this.httpService=r,this.factoryService=s}get(){let s=localStorage.getItem("Domain");return this.httpService.post(`https://${s}/api/v3/Outlet/p`,{Suspended:!1}).pipe((0,ie.U)(w=>{let L=[];return w&&(L=w.map(q=>this.factoryService.getOutletModel(q))),L}))}}return _.\u0275fac=function(r){return new(r||_)(t.LFG(ge.O),t.LFG(be))},_.\u0275prov=t.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})(),Ge=(()=>{class _{constructor(r,s){this.httpService=r,this.factoryService=s}get(r){let s=localStorage.getItem("Domain"),w=this.getEndPointByType(r.Type);return this.httpService.post(`https://${s}${w}`,{Outlet:r.Outlet,Number:r.Number}).pipe((0,ie.U)(q=>q.map(X=>this.factoryService.getVariantModel(X))))}getEndPointByType(r){let s;return s=r===E.SUPPLIER_BILL?"/API/V3/Barcode/byBillNumber":"/API/V3/Barcode/byOutletDeliveryNumber",s}}return _.\u0275fac=function(r){return new(r||_)(t.LFG(ge.O),t.LFG(be))},_.\u0275prov=t.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})();function je(_,f){if(1&_){const r=t.EpF();t.TgZ(0,"tr",22),t.NdJ("click",function(){const w=t.CHM(r),L=w.$implicit,q=w.index,X=t.oxw();return t.KtG(X.onUpdateProduct(L,q))}),t.TgZ(1,"td")(2,"i",23),t.NdJ("click",function(){const L=t.CHM(r).index,q=t.oxw();return t.KtG(q.onDeleteProduct(L))}),t.qZA()(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",24),t._uU(6),t.qZA()()}if(2&_){const r=f.$implicit;t.xp6(4),t.AsE(" ",null==r||null==r.Variants[0]?null:r.Variants[0].getName,"- ",null==r||null==r.Variants[0]?null:r.Variants[0].getCode," - "),t.xp6(2),t.Oqu(null==r?null:r.Quantity)}}let ze=(()=>{class _{constructor(r,s,w,L,q,X,ue){this.dialog=r,this.productStateService=s,this.productService=w,this.toastService=L,this.queryParamService=q,this.outletService=X,this.billService=ue,this.destroy$=new b.x,this.stickerTotal=0,this.productGroups=[],this.productSource=[],this.getRouteParam(),this.initOutlets()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getRouteParam(){this.queryParamService.getState().pipe((0,l.R)(this.destroy$),(0,x.h)(r=>c.IsEmpty(r))).subscribe(r=>{r.ID&&this.getProductById(r.ID,5),r.billNumber&&this.getBill({Number:r.billNumber,Outlet:r.outletName,Type:E.SUPPLIER_BILL})})}initOutlets(){this.outletService.get().pipe((0,l.R)(this.destroy$)).subscribe(r=>{this.outlets=r})}onAddBill(){this.dialog.open(me,{width:"350px",data:{outlets:this.outlets}}).afterClosed().pipe((0,l.R)(this.destroy$)).subscribe(r=>{r&&this.getBill(r)})}getBill(r){this.billService.get(r).pipe((0,l.R)(this.destroy$)).subscribe(s=>{s&&s.forEach(w=>{this.checkAvailableProductCode(w);let L=this.generateProductByQty(w,w.getQuantity);this.productGroups=[...this.productGroups,{VariantID:w.getVariantID,Quantity:w.getQuantity,Variants:L}],this.updateProductsSource()})})}onAddProduct(){this.dialog.open(fe,{width:"350px",data:{variantName:"",variantId:null,qty:null}}).afterClosed().pipe((0,l.R)(this.destroy$)).subscribe(r=>{r&&(this.customPrice=r.customPrice,this.generateProductBarcode(r.product,r.quantity))})}getProductById(r,s){this.productService.getProductById(r).pipe((0,l.R)(this.destroy$)).subscribe(w=>{w&&this.generateProductBarcode(w,s)})}generateProductBarcode(r,s){this.checkAvailableProductCode(r);let w=this.generateProductByQty(r,s);w=this.updateCustomPriceProducts(w),this.productGroups=[...this.productGroups,{VariantID:r.getID,Quantity:s,Variants:w}],this.updateProductsSource()}checkAvailableProductCode(r){r.getCode||this.toastService.error("Product has no code","Code Not Found")}onUpdateProduct(r,s){this.dialog.open(fe,{width:"350px",data:{variantName:r.Variants[0].getName+" - "+r.Variants[0].getCode,variantId:r.VariantID,qty:r.Quantity,customPrice:r.Variants[0].getCustomPrice,promotion:r.Variants[0].getSelectedPromotion}}).afterClosed().pipe((0,l.R)(this.destroy$)).subscribe(de=>{if(de){this.customPrice=de.customPrice,this.checkAvailableProductCode(de.product);let Ye=this.generateProductByQty(de.product,de.quantity);Ye=this.updateCustomPriceProducts(Ye),this.productGroups[s].Variants=Ye,this.productGroups[s].Quantity=de.quantity,this.productGroups[s].VariantID=de.product.getID,this.updateProductsSource()}})}onDeleteProduct(r){this.productGroups=this.productGroups.filter((s,w)=>w!==r),this.updateProductsSource()}updateProductsSource(){this.productSource=[],this.productGroups.forEach(r=>{this.productSource=[...this.productSource,...r.Variants]}),this.stickerTotal=this.productSource.length,this.productStateService.setState(this.productSource)}onUploadProduct(){this.dialog.open(Ie,{width:"350px"}).afterClosed().pipe((0,l.R)(this.destroy$)).subscribe(r=>{if(r){let s;this.productService.uploadProducts(r[0]).pipe((0,l.R)(this.destroy$)).subscribe(w=>{w&&(this.productGroups=[...this.productGroups,...w.map(L=>(s={Quantity:L.Quantity,VariantID:L.VariantID,Variants:L.Print},s))],this.updateProductsSource())})}})}updateCustomPriceProducts(r){let s=r;return this.customPrice&&(s=r.map(w=>(w.setCustomPrice=this.customPrice,w))),s}generateProductByQty(r,s){let w=[];for(let L=1;L<=s;L++)w.push(r);return w}onClear(){this.productGroups=[],this.updateProductsSource()}onPrint(){window.print()}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(D.uw),t.Y36(O),t.Y36(Ce),t.Y36(Oe._W),t.Y36(V.U),t.Y36(Ze),t.Y36(Ge))},_.\u0275cmp=t.Xpm({type:_,selectors:[["app-list-products"]],decls:33,vars:2,consts:[[1,"card","mt-3","sticky-top"],[1,"card-header","d-flex","justify-content-between","align-items-center","bg-white","pb-5",2,"border","none"],[1,"fw-light","m-1"],[1,"ms-1","fst-italic","text-info","d-block","mt-1"],[1,"btn-group"],["type","button",1,"btn-md","btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-plus"],["aria-hidden","true",1,"fa","fa-upload"],[1,"card-body","py-0"],[1,"table","table-borderless","table-fixed"],[1,"table-light","lh-1"],["scope","col"],["scope","col",1,"text-end"],[3,"click",4,"ngFor","ngForOf"],[1,"card-footer","bg-white","py-8","p-0"],[1,"row"],[1,"col-6","d-flex","justify-content-start"],[1,"btn","btn-xl","btn-outline-secondary",3,"click"],[1,"fa-regular","fa-file-lines","me-2"],[1,"col-6","d-flex","justify-content-end"],[1,"btn","btn-xl","btn-outline-secondary","ms-5",3,"click"],[1,"btn","btn-xl","btn-success","ms-5",3,"click"],[3,"click"],["aria-hidden","true",1,"fa","fa-times",2,"color","#fb404b !important","cursor","pointer",3,"click"],[1,"text-end"]],template:function(r,s){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"h1",2),t._uU(3," Products "),t.TgZ(4,"small",3),t._uU(5),t.qZA()(),t.TgZ(6,"div",4)(7,"button",5),t.NdJ("click",function(){return s.onAddProduct()}),t._UZ(8,"i",6),t.qZA(),t.TgZ(9,"button",5),t.NdJ("click",function(){return s.onUploadProduct()}),t._UZ(10,"i",7),t.qZA()()(),t.TgZ(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr"),t._UZ(15,"th",11),t.TgZ(16,"th",11),t._uU(17,"NAME"),t.qZA(),t.TgZ(18,"th",12),t._uU(19,"QTY"),t.qZA()()(),t.TgZ(20,"tbody"),t.YNc(21,je,7,3,"tr",13),t.qZA()()(),t.TgZ(22,"div",14)(23,"div",15)(24,"div",16)(25,"a",17),t.NdJ("click",function(){return s.onAddBill()}),t._UZ(26,"i",18),t._uU(27," Load Transaction "),t.qZA()(),t.TgZ(28,"div",19)(29,"a",20),t.NdJ("click",function(){return s.onClear()}),t._uU(30,"Clear"),t.qZA(),t.TgZ(31,"a",21),t.NdJ("click",function(){return s.onPrint()}),t._uU(32,"Print"),t.qZA()()()()()),2&r&&(t.xp6(5),t.hij("( ",0===s.stickerTotal?"":s.stickerTotal," stickers )"),t.xp6(16),t.Q6J("ngForOf",s.productGroups))},dependencies:[M.sg],styles:["td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{font-size:12px}.btn[_ngcontent-%COMP%]{font-size:14px!important}"]}),_})();var o=C(7188),h=C(1281);let T=(()=>{class _{constructor(){this._listeners=[]}notify(r,s){for(let w of this._listeners)w(r,s)}listen(r){return this._listeners.push(r),()=>{this._listeners=this._listeners.filter(s=>r!==s)}}ngOnDestroy(){this._listeners=[]}}return _.\u0275fac=function(r){return new(r||_)},_.\u0275prov=t.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"}),_})();const j=["input"],y=function(_){return{enterDuration:_}},B=["*"],R=new t.OlP("mat-radio-default-options",{providedIn:"root",factory:function Z(){return{color:"accent"}}});let z=0;const W={provide:U.JU,useExisting:(0,t.Gpc)(()=>oe),multi:!0};class Y{constructor(f,r){this.source=f,this.value=r}}const te=new t.OlP("MatRadioGroup");let he=(()=>{class _{constructor(r){this._changeDetector=r,this._value=null,this._name="mat-radio-group-"+z++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new t.vpe}get name(){return this._name}set name(r){this._name=r,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(r){this._labelPosition="before"===r?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(r){this._value!==r&&(this._value=r,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(r){this._selected=r,this.value=r?r.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(r){this._disabled=(0,h.Ig)(r),this._markRadiosForCheck()}get required(){return this._required}set required(r){this._required=(0,h.Ig)(r),this._markRadiosForCheck()}ngAfterContentInit(){this._isInitialized=!0}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(r=>{r.name=this.name,r._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(s=>{s.checked=this.value===s.value,s.checked&&(this._selected=s)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new Y(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(r=>r._markForCheck())}writeValue(r){this.value=r,this._changeDetector.markForCheck()}registerOnChange(r){this._controlValueAccessorChangeFn=r}registerOnTouched(r){this.onTouched=r}setDisabledState(r){this.disabled=r,this._changeDetector.markForCheck()}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(t.sBO))},_.\u0275dir=t.lG2({type:_,inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required"},outputs:{change:"change"}}),_})(),oe=(()=>{class _ extends he{}return _.\u0275fac=function(){let f;return function(s){return(f||(f=t.n5z(_)))(s||_)}}(),_.\u0275dir=t.lG2({type:_,selectors:[["mat-radio-group"]],contentQueries:function(r,s,w){if(1&r&&t.Suo(w,Ve,5),2&r){let L;t.iGM(L=t.CRH())&&(s._radios=L)}},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[t._Bn([W,{provide:te,useExisting:_}]),t.qOj]}),_})();class ye{constructor(f){this._elementRef=f}}const Ae=(0,ve.Kr)((0,ve.sb)(ye));let Le=(()=>{class _ extends Ae{constructor(r,s,w,L,q,X,ue,se){super(s),this._changeDetector=w,this._focusMonitor=L,this._radioDispatcher=q,this._providerOverride=ue,this._uniqueId="mat-radio-"+ ++z,this.id=this._uniqueId,this.change=new t.vpe,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=r,this._noopAnimations="NoopAnimations"===X,se&&(this.tabIndex=(0,h.su)(se,0)),this._removeUniqueSelectionListener=q.listen((ne,de)=>{ne!==this.id&&de===this.name&&(this.checked=!1)})}get checked(){return this._checked}set checked(r){const s=(0,h.Ig)(r);this._checked!==s&&(this._checked=s,s&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!s&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),s&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(r){this._value!==r&&(this._value=r,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===r),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(r){this._labelPosition=r}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(r){this._setDisabled((0,h.Ig)(r))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(r){this._required=(0,h.Ig)(r)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(r){this._color=r}get inputId(){return`${this.id||this._uniqueId}-input`}focus(r,s){s?this._focusMonitor.focusVia(this._inputElement,s,r):this._inputElement.nativeElement.focus(r)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name)}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(r=>{!r&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new Y(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(r){r.stopPropagation()}_onInputInteraction(r){if(r.stopPropagation(),!this.checked&&!this.disabled){const s=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),s&&this.radioGroup._emitChangeEvent())}}_setDisabled(r){this._disabled!==r&&(this._disabled=r,this._changeDetector.markForCheck())}_updateTabIndex(){const r=this.radioGroup;let s;if(s=r&&r.selected&&!this.disabled?r.selected===this?this.tabIndex:-1:this.tabIndex,s!==this._previousTabIndex){const w=this._inputElement?.nativeElement;w&&(w.setAttribute("tabindex",s+""),this._previousTabIndex=s)}}}return _.\u0275fac=function(r){t.$Z()},_.\u0275dir=t.lG2({type:_,viewQuery:function(r,s){if(1&r&&t.Gf(j,5),2&r){let w;t.iGM(w=t.CRH())&&(s._inputElement=w.first)}},inputs:{id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"},features:[t.qOj]}),_})(),Ve=(()=>{class _ extends Le{constructor(r,s,w,L,q,X,ue,se){super(r,s,w,L,q,X,ue,se)}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(te,8),t.Y36(t.SBq),t.Y36(t.sBO),t.Y36(o.tE),t.Y36(T),t.Y36(t.QbO,8),t.Y36(R,8),t.$8M("tabindex"))},_.\u0275cmp=t.Xpm({type:_,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(r,s){1&r&&t.NdJ("focus",function(){return s._inputElement.nativeElement.focus()}),2&r&&(t.uIk("tabindex",null)("id",s.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),t.ekj("mat-radio-checked",s.checked)("mat-radio-disabled",s.disabled)("_mat-animation-noopable",s._noopAnimations)("mat-primary","primary"===s.color)("mat-accent","accent"===s.color)("mat-warn","warn"===s.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[t.qOj],ngContentSelectors:B,decls:13,vars:19,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input",3,"id","checked","disabled","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(r,s){if(1&r&&(t.F$t(),t.TgZ(0,"label",0,1)(2,"span",2),t._UZ(3,"span",3)(4,"span",4),t.TgZ(5,"input",5,6),t.NdJ("change",function(L){return s._onInputInteraction(L)})("click",function(L){return s._onInputClick(L)}),t.qZA(),t.TgZ(7,"span",7),t._UZ(8,"span",8),t.qZA()(),t.TgZ(9,"span",9)(10,"span",10),t._uU(11,"\xa0"),t.qZA(),t.Hsn(12),t.qZA()()),2&r){const w=t.MAs(1);t.uIk("for",s.inputId),t.xp6(5),t.Q6J("id",s.inputId)("checked",s.checked)("disabled",s.disabled)("required",s.required),t.uIk("name",s.name)("value",s.value)("aria-label",s.ariaLabel)("aria-labelledby",s.ariaLabelledby)("aria-describedby",s.ariaDescribedby),t.xp6(2),t.Q6J("matRippleTrigger",w)("matRippleDisabled",s._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",t.VKq(17,y,s._noopAnimations?0:150)),t.xp6(2),t.ekj("mat-radio-label-before","before"==s.labelPosition)}},dependencies:[ve.wG],styles:['.mat-radio-button{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-radio-label{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{opacity:0;position:absolute;top:0;left:0;margin:0;width:100%;height:100%;cursor:inherit;z-index:-1}.mat-radio-input:focus~.mat-focus-indicator::before{content:""}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}'],encapsulation:2,changeDetection:0}),_})(),qe=(()=>{class _{}return _.\u0275fac=function(r){return new(r||_)},_.\u0275mod=t.oAB({type:_}),_.\u0275inj=t.cJS({imports:[ve.si,ve.BQ,ve.BQ]}),_})();function _e(_,f){if(1&_){const r=t.EpF();t.TgZ(0,"tr")(1,"td"),t._uU(2,"Selected Tax"),t.qZA(),t.TgZ(3,"td")(4,"ng-select",29),t.NdJ("ngModelChange",function(w){t.CHM(r);const L=t.oxw();return t.KtG(L.taxOptionSelected=w)})("change",function(){t.CHM(r);const w=t.oxw();return t.KtG(w.onSelectTaxType())}),t.qZA()(),t.TgZ(5,"td")(6,"span"),t._uU(7,"Applied Tax ex: 100 + 10% = 110"),t.qZA()()()}if(2&_){const r=t.oxw();t.xp6(4),t.Q6J("items",r.taxOptions)("ngModel",r.taxOptionSelected)("clearable",!1)}}const re=function(_){return{active:_}};let He=(()=>{class _{constructor(r,s){this.dialogRef=r,this.data=s,this.event=new t.vpe,this.modalConfig=new G.O,this.taxOptions=[],this.paperWidth=0,this.marginTop=0,this.marginLeft=0,this.stickerWidth=0,this.stickerHeight=0,this.barcodeHeight=0,this.spacingColumn=0,this.spacingRow=0,this.barcode=!0,this.code=!0,this.price=!0,this.name=!0,this.move=!0,this.removeDefault=!0,this.desc=!0,this.priceTax=!0,this.fontSize=0,this.namePrefix="",this.maxChar=0,this.publiclineHeight=0,this.paperFormat=JSON.parse(JSON.stringify(s.paperFormat)),this.taxs=s.taxs,this.authTax=s.authTax,this.initTaxOptions(),this.activeTab="paper"}ngOnInit(){this.initModalConfig(),this.initFormValue(),this.authTax&&this.initTaxOptionSelected()}initTaxOptions(){this.taxOptions=[],this.taxs.forEach((r,s)=>{this.taxOptions=[...this.taxOptions,{id:s+1,name:r.getName,ID:r.getID}]})}initTaxOptionSelected(){this.taxSelected&&(this.taxOptionSelected=this.taxOptions.find(r=>r.ID===this.taxSelected.ID))}onSelectTaxType(){this.taxSelected=this.taxs.find(r=>r.getID===this.taxOptionSelected.ID)}initModalConfig(){this.modalConfig.title="Sticker Configuration",this.modalConfig.hideMoreButton=!0}onOk(){this.setPaperFormat(),this.dialogRef.close(this.paperFormat)}onCancel(){this.dialogRef.close()}initFormValue(){this.paperFormat&&(this.barcodeHeight=this.paperFormat.BarcodeHeight,this.PriceFontSize=this.paperFormat.PriceFontSize,this.paperWidth=this.paperFormat.PaperWidth,this.marginTop=this.paperFormat.MarginTop,this.marginLeft=this.paperFormat.MarginLeft,this.stickerWidth=this.paperFormat.StickerWidth,this.stickerHeight=this.paperFormat.StickerHeight,this.barcodeHeight=this.paperFormat.BarcodeHeight,this.spacingColumn=this.paperFormat.ColumnSpacing,this.spacingRow=this.paperFormat.RowSpacing,this.barcode=this.paperFormat.BarcodeVisible,this.code=this.paperFormat.CodeVisible,this.price=this.paperFormat.PriceVisible,this.name=this.paperFormat.NameVisible,this.move=this.paperFormat.MoveProductNameOnTop,this.desc=this.paperFormat.DescriptionAsCode,this.fontSize=this.paperFormat.ProductNameFontSize,this.namePrefix=this.paperFormat.ProductNamePrefix,this.maxChar=this.paperFormat.ProductNameMaxLength,this.lineHeight=this.paperFormat.LineHeight,this.priceTax=this.paperFormat.PriceWithTax,this.taxSelected=this.paperFormat.TaxType,this.storeName=this.paperFormat.StoreName,this.currencySymbol=this.paperFormat.CurrencySymbol,this.promotionPriceLabel=this.paperFormat.PromotionPriceLabel,this.basicPriceLabel=this.paperFormat.BasicPriceLabel)}setPaperFormat(){this.paperFormat&&(this.checkPriceWithTax(),this.paperFormat.PriceFontSize=this.PriceFontSize,this.paperFormat.BarcodeHeight=this.barcodeHeight,this.paperFormat.PaperWidth=this.paperWidth,this.paperFormat.MarginTop=this.marginTop,this.paperFormat.MarginLeft=this.marginLeft,this.paperFormat.StickerWidth=this.stickerWidth,this.paperFormat.StickerHeight=this.stickerHeight,this.paperFormat.BarcodeHeight=this.barcodeHeight,this.paperFormat.ColumnSpacing=this.spacingColumn,this.paperFormat.RowSpacing=this.spacingRow,this.paperFormat.BarcodeVisible=this.barcode,this.paperFormat.MoveProductNameOnTop=this.move,this.paperFormat.CodeVisible=this.code,this.paperFormat.PriceVisible=this.price,this.paperFormat.NameVisible=this.name,this.paperFormat.DescriptionAsCode=this.desc,this.paperFormat.ProductNameFontSize=this.fontSize,this.paperFormat.ProductNamePrefix=this.namePrefix,this.paperFormat.ProductNameMaxLength=this.maxChar,this.paperFormat.LineHeight=this.lineHeight,this.paperFormat.PriceWithTax=this.priceTax,this.paperFormat.TaxType=this.taxSelected,this.paperFormat.StoreName=this.storeName,this.paperFormat.CurrencySymbol=this.currencySymbol,this.paperFormat.PromotionPriceLabel=this.promotionPriceLabel,this.paperFormat.BasicPriceLabel=this.basicPriceLabel)}checkPriceWithTax(){this.priceTax||(this.taxSelected=this.taxs.find(r=>"No Tax"==r.getLabel))}dataTarget(r){this.activeTab=r}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(D.so),t.Y36(D.WI))},_.\u0275cmp=t.Xpm({type:_,selectors:[["app-form-settings"]],outputs:{event:"event"},decls:304,vars:71,consts:[[3,"config","onOk","onCancel"],["container",""],["id","myTab","role","tablist",1,"nav","nav-tabs"],["tabs",""],[1,"nav-item"],["data-bs-toggle","tab",1,"nav-link",3,"ngClass","click"],["id","spacing-tab","data-bs-toggle","tab","data-bs-target","'#spacing'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","dua-tab","data-bs-toggle","tab","data-bs-target","'#sticker-content'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","price-tab","data-bs-toggle","tab","data-bs-target","'#price'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","advanced-tab","data-bs-toggle","tab","data-bs-target","'#advanced'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],["id","promotionLabel-tab","data-bs-toggle","tab","data-bs-target","'#promotionLabel'","role","tab","aria-selected","true",1,"nav-link",3,"ngClass","click"],[1,"tab-content","border","bg-white"],["id","paper",1,"tab-pane","mt-0",3,"ngClass"],[1,"table","table-bordered","w-100"],[1,"input-group"],["type","number","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],[1,"input-group-append"],[1,"input-group-text"],["id","spacing",1,"tab-pane","mt-0",3,"ngClass"],["id","sticker-content",1,"tab-pane","mt-0",3,"ngClass"],["aria-label","Select an option","color","primary"],["value","false",3,"checked","change"],["value","true",1,"ms-4",3,"checked","change"],["id","price",1,"tab-pane","mt-0",3,"ngClass"],[4,"ngIf"],["type","text","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],["type","text","autoNum","","aria-label","width",1,"form-control",3,"ngModel","ngModelChange"],["id","advanced",1,"tab-pane","mt-0",3,"ngClass"],["id","promotionLabel",1,"tab-pane","mt-0",3,"ngClass"],["appendTo","body","bindLabel","name","placeholder","Select Column",1,"sticky-top",3,"items","ngModel","clearable","ngModelChange","change"]],template:function(r,s){1&r&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return s.onOk()})("onCancel",function(){return s.onCancel()}),t.TgZ(1,"content")(2,"div",1)(3,"ul",2,3)(5,"li",4)(6,"a",5),t.NdJ("click",function(){return s.dataTarget("paper")}),t._uU(7,"Paper"),t.qZA()(),t.TgZ(8,"li",4)(9,"a",6),t.NdJ("click",function(){return s.dataTarget("spacing")}),t._uU(10,"Spacing"),t.qZA()(),t.TgZ(11,"li",4)(12,"a",7),t.NdJ("click",function(){return s.dataTarget("sticker-content")}),t._uU(13,"Sticker Content"),t.qZA()(),t.TgZ(14,"li",4)(15,"a",8),t.NdJ("click",function(){return s.dataTarget("price")}),t._uU(16,"Price"),t.qZA()(),t.TgZ(17,"li",4)(18,"a",9),t.NdJ("click",function(){return s.dataTarget("advanced")}),t._uU(19,"Advanced"),t.qZA()(),t.TgZ(20,"li",4)(21,"a",10),t.NdJ("click",function(){return s.dataTarget("promotionLabel")}),t._uU(22,"Label"),t.qZA()()(),t.TgZ(23,"div",11)(24,"div",12)(25,"table",13)(26,"tr")(27,"td"),t._uU(28,"Paper Width"),t.qZA(),t.TgZ(29,"td")(30,"div",14)(31,"input",15),t.NdJ("ngModelChange",function(L){return s.paperWidth=L}),t.qZA(),t.TgZ(32,"div",16)(33,"span",17),t._uU(34,"px"),t.qZA()()()(),t.TgZ(35,"td")(36,"span"),t._uU(37,"The width of the paper"),t.qZA()()(),t.TgZ(38,"tr")(39,"td"),t._uU(40,"Sticker Width"),t.qZA(),t.TgZ(41,"td")(42,"div",14)(43,"input",15),t.NdJ("ngModelChange",function(L){return s.stickerWidth=L}),t.qZA(),t.TgZ(44,"div",16)(45,"span",17),t._uU(46,"px"),t.qZA()()()(),t.TgZ(47,"td")(48,"span"),t._uU(49,"The width of the sticker"),t.qZA()()(),t.TgZ(50,"tr")(51,"td"),t._uU(52,"Sticker Height"),t.qZA(),t.TgZ(53,"td")(54,"div",14)(55,"input",15),t.NdJ("ngModelChange",function(L){return s.stickerHeight=L}),t.qZA(),t.TgZ(56,"div",16)(57,"span",17),t._uU(58,"px"),t.qZA()()()(),t.TgZ(59,"td")(60,"span"),t._uU(61,"The height of the sticker"),t.qZA()()()()(),t.TgZ(62,"div",18)(63,"table",13)(64,"tr")(65,"td"),t._uU(66,"Left Indent"),t.qZA(),t.TgZ(67,"td")(68,"div",14)(69,"input",15),t.NdJ("ngModelChange",function(L){return s.marginLeft=L}),t.qZA(),t.TgZ(70,"div",16)(71,"span",17),t._uU(72,"px"),t.qZA()()()(),t.TgZ(73,"td")(74,"span"),t._uU(75,"The number of pixels appended before the first COLUMN"),t.qZA()()(),t.TgZ(76,"tr")(77,"td"),t._uU(78,"Top Indent"),t.qZA(),t.TgZ(79,"td")(80,"div",14)(81,"input",15),t.NdJ("ngModelChange",function(L){return s.marginTop=L}),t.qZA(),t.TgZ(82,"div",16)(83,"span",17),t._uU(84,"px"),t.qZA()()()(),t.TgZ(85,"td")(86,"span"),t._uU(87,"The number of pixels appended before the first ROW"),t.qZA()()(),t.TgZ(88,"tr")(89,"td"),t._uU(90,"Row Spacing"),t.qZA(),t.TgZ(91,"td")(92,"div",14)(93,"input",15),t.NdJ("ngModelChange",function(L){return s.spacingRow=L}),t.qZA(),t.TgZ(94,"div",16)(95,"span",17),t._uU(96,"px"),t.qZA()()()(),t.TgZ(97,"td")(98,"span"),t._uU(99,"The number of pixels between each ROW"),t.qZA()()(),t.TgZ(100,"tr")(101,"td"),t._uU(102,"Column Spacing"),t.qZA(),t.TgZ(103,"td")(104,"div",14)(105,"input",15),t.NdJ("ngModelChange",function(L){return s.spacingColumn=L}),t.qZA(),t.TgZ(106,"div",16)(107,"span",17),t._uU(108,"px"),t.qZA()()()(),t.TgZ(109,"td")(110,"span"),t._uU(111,"The number of pixels between each COLUMN"),t.qZA()()()()(),t.TgZ(112,"div",19)(113,"table",13)(114,"tr")(115,"td"),t._uU(116,"Barcode Height"),t.qZA(),t.TgZ(117,"td")(118,"div",14)(119,"input",15),t.NdJ("ngModelChange",function(L){return s.barcodeHeight=L}),t.qZA(),t.TgZ(120,"div",16)(121,"span",17),t._uU(122,"px"),t.qZA()()()(),t.TgZ(123,"td")(124,"span"),t._uU(125,"The height of the generated barcode in pixels"),t.qZA()()(),t.TgZ(126,"tr")(127,"td"),t._uU(128,"Font Size"),t.qZA(),t.TgZ(129,"td")(130,"div",14)(131,"input",15),t.NdJ("ngModelChange",function(L){return s.fontSize=L}),t.qZA(),t.TgZ(132,"div",16)(133,"span",17),t._uU(134,"px"),t.qZA()()()(),t.TgZ(135,"td")(136,"span"),t._uU(137,"Change all font size (except price)"),t.qZA()()(),t.TgZ(138,"tr")(139,"td"),t._uU(140,"Barcode"),t.qZA(),t.TgZ(141,"td")(142,"mat-radio-group",20)(143,"mat-radio-button",21),t.NdJ("change",function(){return s.barcode=!1}),t._uU(144,"No "),t.qZA(),t.TgZ(145,"mat-radio-button",22),t.NdJ("change",function(){return s.barcode=!0}),t._uU(146,"Yes"),t.qZA()()(),t.TgZ(147,"td")(148,"span"),t._uU(149,"Whether barcode is visible"),t.qZA()()(),t.TgZ(150,"tr")(151,"td"),t._uU(152,"Code"),t.qZA(),t.TgZ(153,"td")(154,"mat-radio-group",20)(155,"mat-radio-button",21),t.NdJ("change",function(){return s.code=!1}),t._uU(156,"No "),t.qZA(),t.TgZ(157,"mat-radio-button",22),t.NdJ("change",function(){return s.code=!0}),t._uU(158,"Yes"),t.qZA()()(),t.TgZ(159,"td")(160,"span"),t._uU(161,"Whether variant code is visible"),t.qZA()()(),t.TgZ(162,"tr")(163,"td"),t._uU(164,"Price"),t.qZA(),t.TgZ(165,"td")(166,"mat-radio-group",20)(167,"mat-radio-button",21),t.NdJ("change",function(){return s.price=!1}),t._uU(168,"No "),t.qZA(),t.TgZ(169,"mat-radio-button",22),t.NdJ("change",function(){return s.price=!0}),t._uU(170,"Yes"),t.qZA()()(),t.TgZ(171,"td")(172,"span"),t._uU(173,"Whether variant price is visible"),t.qZA()()(),t.TgZ(174,"tr")(175,"td"),t._uU(176,"Name"),t.qZA(),t.TgZ(177,"td")(178,"mat-radio-group",20)(179,"mat-radio-button",21),t.NdJ("change",function(){return s.name=!1}),t._uU(180,"No "),t.qZA(),t.TgZ(181,"mat-radio-button",22),t.NdJ("change",function(){return s.name=!0}),t._uU(182,"Yes"),t.qZA()()(),t.TgZ(183,"td")(184,"span"),t._uU(185,"Whether variant name is visible"),t.qZA()()(),t.TgZ(186,"tr")(187,"td"),t._uU(188,"Move Product Name"),t.qZA(),t.TgZ(189,"td")(190,"mat-radio-group",20)(191,"mat-radio-button",21),t.NdJ("change",function(){return s.move=!1}),t._uU(192,"No "),t.qZA(),t.TgZ(193,"mat-radio-button",22),t.NdJ("change",function(){return s.move=!0}),t._uU(194,"Yes"),t.qZA()()(),t.TgZ(195,"td")(196,"span"),t._uU(197,"Whether move variant name below variant code or below variant price"),t.qZA()()()()(),t.TgZ(198,"div",23)(199,"table",13)(200,"tr")(201,"td"),t._uU(202,"Price with Tax"),t.qZA(),t.TgZ(203,"td")(204,"mat-radio-group",20)(205,"mat-radio-button",21),t.NdJ("change",function(){return s.priceTax=!1}),t._uU(206," No"),t.qZA(),t.TgZ(207,"mat-radio-button",22),t.NdJ("change",function(){return s.priceTax=!0}),t._uU(208,"Yes"),t.qZA()()(),t.TgZ(209,"td")(210,"span"),t._uU(211),t.qZA()()(),t.YNc(212,_e,8,3,"tr",24),t.TgZ(213,"tr")(214,"td"),t._uU(215,"Currency"),t.qZA(),t.TgZ(216,"td")(217,"div",14)(218,"input",25),t.NdJ("ngModelChange",function(L){return s.currencySymbol=L}),t.qZA()()(),t.TgZ(219,"td")(220,"span"),t._uU(221,"The default currency"),t.qZA()()(),t.TgZ(222,"tr")(223,"td"),t._uU(224,"Font Size"),t.qZA(),t.TgZ(225,"td")(226,"div",14)(227,"input",26),t.NdJ("ngModelChange",function(L){return s.PriceFontSize=L}),t.qZA()()(),t.TgZ(228,"td")(229,"span"),t._uU(230,"Change font size for price"),t.qZA()()()()(),t.TgZ(231,"div",27)(232,"table",13)(233,"tr")(234,"td"),t._uU(235,"Max Character"),t.qZA(),t.TgZ(236,"td")(237,"div",14)(238,"input",15),t.NdJ("ngModelChange",function(L){return s.maxChar=L}),t.qZA()()(),t.TgZ(239,"td")(240,"span"),t._uU(241,"The max character of the product name"),t.qZA()()(),t.TgZ(242,"tr")(243,"td"),t._uU(244,"Name Prefix"),t.qZA(),t.TgZ(245,"td")(246,"div",14)(247,"input",25),t.NdJ("ngModelChange",function(L){return s.namePrefix=L}),t.qZA()()(),t.TgZ(248,"td")(249,"span"),t._uU(250,"A word, letter, or number placed before product name"),t.qZA()()(),t.TgZ(251,"tr")(252,"td"),t._uU(253,"Store Name"),t.qZA(),t.TgZ(254,"td")(255,"div",14)(256,"input",25),t.NdJ("ngModelChange",function(L){return s.storeName=L}),t.qZA()()(),t.TgZ(257,"td")(258,"span"),t._uU(259,"The name of the store"),t.qZA()()(),t.TgZ(260,"tr")(261,"td"),t._uU(262,"Use description as code"),t.qZA(),t.TgZ(263,"td")(264,"mat-radio-group",20)(265,"mat-radio-button",21),t.NdJ("change",function(){return s.desc=!1}),t._uU(266,"No "),t.qZA(),t.TgZ(267,"mat-radio-button",22),t.NdJ("change",function(){return s.desc=!0}),t._uU(268,"Yes"),t.qZA()()(),t.TgZ(269,"td")(270,"span"),t._uU(271,"Copy product description into Product Code"),t.qZA()()(),t.TgZ(272,"tr")(273,"td"),t._uU(274,'Remove "Default"'),t.qZA(),t.TgZ(275,"td")(276,"mat-radio-group",20)(277,"mat-radio-button",21),t.NdJ("change",function(){return s.removeDefault=!1}),t._uU(278,"No "),t.qZA(),t.TgZ(279,"mat-radio-button",22),t.NdJ("change",function(){return s.removeDefault=!0}),t._uU(280,"Yes"),t.qZA()()(),t.TgZ(281,"td")(282,"span"),t._uU(283,'Remove "Default" Label from product name'),t.qZA()()()()(),t.TgZ(284,"div",28)(285,"table",13)(286,"tr")(287,"td"),t._uU(288,"Normal Price"),t.qZA(),t.TgZ(289,"td")(290,"div",14)(291,"input",25),t.NdJ("ngModelChange",function(L){return s.basicPriceLabel=L}),t.qZA()()(),t.TgZ(292,"td")(293,"span"),t._uU(294,"Custom label normal price"),t.qZA()()(),t.TgZ(295,"tr")(296,"td"),t._uU(297,"Promotion Price"),t.qZA(),t.TgZ(298,"td")(299,"div",14)(300,"input",25),t.NdJ("ngModelChange",function(L){return s.promotionPriceLabel=L}),t.qZA()()(),t.TgZ(301,"td")(302,"span"),t._uU(303,"Custom label promotion price"),t.qZA()()()()()()()()()),2&r&&(t.Q6J("config",s.modalConfig),t.xp6(6),t.Q6J("ngClass",t.VKq(47,re,"paper"===s.activeTab)),t.xp6(3),t.Q6J("ngClass",t.VKq(49,re,"spacing"===s.activeTab)),t.xp6(3),t.Q6J("ngClass",t.VKq(51,re,"sticker-content"===s.activeTab)),t.xp6(3),t.Q6J("ngClass",t.VKq(53,re,"price"===s.activeTab)),t.xp6(3),t.Q6J("ngClass",t.VKq(55,re,"advanced"===s.activeTab)),t.xp6(3),t.Q6J("ngClass",t.VKq(57,re,"promotionLabel"===s.activeTab)),t.xp6(3),t.Q6J("ngClass",t.VKq(59,re,"paper"===s.activeTab)),t.xp6(7),t.Q6J("ngModel",s.paperWidth),t.xp6(12),t.Q6J("ngModel",s.stickerWidth),t.xp6(12),t.Q6J("ngModel",s.stickerHeight),t.xp6(7),t.Q6J("ngClass",t.VKq(61,re,"spacing"===s.activeTab)),t.xp6(7),t.Q6J("ngModel",s.marginLeft),t.xp6(12),t.Q6J("ngModel",s.marginTop),t.xp6(12),t.Q6J("ngModel",s.spacingRow),t.xp6(12),t.Q6J("ngModel",s.spacingColumn),t.xp6(7),t.Q6J("ngClass",t.VKq(63,re,"sticker-content"===s.activeTab)),t.xp6(7),t.Q6J("ngModel",s.barcodeHeight),t.xp6(12),t.Q6J("ngModel",s.fontSize),t.xp6(12),t.Q6J("checked",!s.barcode),t.xp6(2),t.Q6J("checked",s.barcode),t.xp6(10),t.Q6J("checked",!s.code),t.xp6(2),t.Q6J("checked",s.code),t.xp6(10),t.Q6J("checked",!s.price),t.xp6(2),t.Q6J("checked",s.price),t.xp6(10),t.Q6J("checked",!s.name),t.xp6(2),t.Q6J("checked",s.name),t.xp6(10),t.Q6J("checked",!s.move),t.xp6(2),t.Q6J("checked",s.move),t.xp6(5),t.Q6J("ngClass",t.VKq(65,re,"price"===s.activeTab)),t.xp6(7),t.Q6J("checked",!s.priceTax),t.xp6(2),t.Q6J("checked",s.priceTax),t.xp6(4),t.hij("Tax is added to the product base price ",s.authTax,""),t.xp6(1),t.Q6J("ngIf",1==s.priceTax&&1==s.authTax),t.xp6(6),t.Q6J("ngModel",s.currencySymbol),t.xp6(9),t.Q6J("ngModel",s.PriceFontSize),t.xp6(4),t.Q6J("ngClass",t.VKq(67,re,"advanced"===s.activeTab)),t.xp6(7),t.Q6J("ngModel",s.maxChar),t.xp6(9),t.Q6J("ngModel",s.namePrefix),t.xp6(9),t.Q6J("ngModel",s.storeName),t.xp6(9),t.Q6J("checked",!s.desc),t.xp6(2),t.Q6J("checked",s.desc),t.xp6(10),t.Q6J("checked",!s.removeDefault),t.xp6(2),t.Q6J("checked",s.removeDefault),t.xp6(5),t.Q6J("ngClass",t.VKq(69,re,"promotionLabel"===s.activeTab)),t.xp6(7),t.Q6J("ngModel",s.basicPriceLabel),t.xp6(9),t.Q6J("ngModel",s.promotionPriceLabel))},dependencies:[M.mk,M.O5,U.Fj,U.wV,U.JJ,U.On,K.w9,ae.M,pe,oe,Ve],styles:[".input-group-append[_ngcontent-%COMP%]{height:30px}.form-control[_ngcontent-%COMP%]{height:30px;font-size:12px}.input-group-text[_ngcontent-%COMP%]{font-size:12px}.value-title[_ngcontent-%COMP%]{font-size:12px;font-weight:550;width:90px}.advance-value-title[_ngcontent-%COMP%]{font-size:12px;font-weight:550;width:135px}h3[_ngcontent-%COMP%]{margin-bottom:0;font-weight:550}label[_ngcontent-%COMP%]{font-size:12px}bs-dropdown-container[_ngcontent-%COMP%]{z-index:1060}.nav-tabs-custom-border[_ngcontent-%COMP%] .nav-tabs[_ngcontent-%COMP%]{border-bottom:0}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%]{margin-bottom:10px}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(1){font-weight:700;width:172px;padding:12px 1rem}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){width:120px}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(2), .tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){border-right:1px solid #dee2e6;border-left:1px solid #dee2e6}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2) input[_ngcontent-%COMP%]{border:0;border-bottom:1px solid #dee2e6}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2) .input-group-text[_ngcontent-%COMP%]{border:0;border-bottom:1px solid #dee2e6;margin-top:-1px}.tab-content[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] .table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(3){font-style:italic;color:#28a745}.nav-link[_ngcontent-%COMP%]{cursor:pointer} .mat-radio-checked .mat-radio-outer-circle{border-color:#0075ff} .mat-radio-checked .mat-radio-inner-circle{background-color:#0075ff}"]}),_})();var Se=C(7243);const Je=["bcElement"];let Qe=(()=>{class _{constructor(r){this.renderer=r,this.elementType="svg",this.cssClass="barcode",this.format="CODE128",this.lineColor="#000000",this.width=2,this.height=100,this.displayValue=!1,this.fontOptions="",this.font="monospace",this.textAlign="center",this.textPosition="bottom",this.textMargin=2,this.fontSize=20,this.background="#ffffff",this.margin=10,this.marginTop=10,this.marginBottom=10,this.marginLeft=10,this.marginRight=10,this.value="",this.valid=()=>!0}get options(){return{format:this.format,lineColor:this.lineColor,width:this.width,height:this.height,displayValue:this.displayValue,fontOptions:this.fontOptions,font:this.font,textAlign:this.textAlign,textPosition:this.textPosition,textMargin:this.textMargin,fontSize:this.fontSize,background:this.background,margin:this.margin,marginTop:this.marginTop,marginBottom:this.marginBottom,marginLeft:this.marginLeft,marginRight:this.marginRight,valid:this.valid}}ngAfterViewInit(){this.createBarcode()}ngOnChanges(){this.bcElement&&this.createBarcode()}createBarcode(){if(!this.value)return;let r;switch(this.elementType){case"img":r=this.renderer.createElement("img");break;case"canvas":r=this.renderer.createElement("canvas");break;default:r=this.renderer.createElement("svg","svg")}Se(r,this.value,this.options);for(const s of this.bcElement.nativeElement.childNodes)this.renderer.removeChild(this.bcElement.nativeElement,s);this.renderer.appendChild(this.bcElement.nativeElement,r)}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(t.Qsj))},_.\u0275cmp=t.Xpm({type:_,selectors:[["ngx-barcode6"]],viewQuery:function(r,s){if(1&r&&t.Gf(Je,5),2&r){let w;t.iGM(w=t.CRH())&&(s.bcElement=w.first)}},inputs:{elementType:["bc-element-type","elementType"],cssClass:["bc-class","cssClass"],format:["bc-format","format"],lineColor:["bc-line-color","lineColor"],width:["bc-width","width"],height:["bc-height","height"],displayValue:["bc-display-value","displayValue"],fontOptions:["bc-font-options","fontOptions"],font:["bc-font","font"],textAlign:["bc-text-align","textAlign"],textPosition:["bc-text-position","textPosition"],textMargin:["bc-text-margin","textMargin"],fontSize:["bc-font-size","fontSize"],background:["bc-background","background"],margin:["bc-margin","margin"],marginTop:["bc-margin-top","marginTop"],marginBottom:["bc-margin-bottom","marginBottom"],marginLeft:["bc-margin-left","marginLeft"],marginRight:["bc-margin-right","marginRight"],value:["bc-value","value"],valid:["bc-valid","valid"]},features:[t.TTD],decls:2,vars:2,consts:[["bcElement",""]],template:function(r,s){1&r&&t._UZ(0,"div",null,0),2&r&&t.Tol(s.cssClass)},encapsulation:2}),_})(),$e=(()=>{class _{}return _.\u0275fac=function(r){return new(r||_)},_.\u0275mod=t.oAB({type:_}),_.\u0275inj=t.cJS({}),_})(),Ne=(()=>{class _{transform(r,s){let w=r,L=0;return s&&0!==s&&(L=r*(s/100),w=r+L),w}}return _.\u0275fac=function(r){return new(r||_)},_.\u0275pipe=t.Yjl({name:"taxPipe",type:_,pure:!0}),_})();function We(_,f){if(1&_&&t._UZ(0,"ngx-barcode6",18),2&_){const r=t.oxw().$implicit,s=t.oxw();t.Q6J("bc-value",null==r?null:r.getCode)("bc-element-type","img")("bc-width",1)("bc-height",null==s.selectedPaperFormat?null:s.selectedPaperFormat.BarcodeHeight)}}function Fe(_,f){if(1&_&&(t.TgZ(0,"span",19),t._uU(1),t.qZA()),2&_){const r=t.oxw().$implicit,s=t.oxw();t.Udp("font-size",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.ProductNameFontSize)+"px"),t.xp6(1),t.Oqu(r.getBarcodeTitle)}}function Ke(_,f){if(1&_&&(t.TgZ(0,"span",19),t._uU(1),t.ALo(2,"slice"),t.qZA()),2&_){const r=t.oxw().$implicit,s=t.oxw();t.Udp("font-size",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.ProductNameFontSize)+"px"),t.xp6(1),t.hij(" ",t.Dn7(2,3,null!=s.selectedPaperFormat&&s.selectedPaperFormat.ProductNamePrefix?(null==s.selectedPaperFormat?null:s.selectedPaperFormat.ProductNamePrefix)+" "+r.getName:r.getName,0,null==s.selectedPaperFormat?null:s.selectedPaperFormat.ProductNameMaxLength)," ")}}function xe(_,f){if(1&_&&(t.ynx(0),t.TgZ(1,"div",22)(2,"span",23),t._uU(3),t.qZA(),t.TgZ(4,"span",24)(5,"span",25)(6,"span",26),t._uU(7),t.ALo(8,"number"),t.qZA()()()(),t.TgZ(9,"div",27)(10,"span",23),t._uU(11),t.qZA(),t.TgZ(12,"span",28),t._uU(13),t.ALo(14,"number"),t.qZA()(),t.BQk()),2&_){const r=t.oxw(2).$implicit,s=t.oxw();t.xp6(3),t.Oqu(s.selectedPaperFormat.BasicPriceLabel?s.selectedPaperFormat.BasicPriceLabel:"N. Price"),t.xp6(4),t.AsE("",null==s.selectedPaperFormat?null:s.selectedPaperFormat.CurrencySymbol," ",t.lcZ(8,6,null==r?null:r.getUnitPrice),""),t.xp6(4),t.Oqu(s.selectedPaperFormat.PromotionPriceLabel?s.selectedPaperFormat.PromotionPriceLabel:"Spc. Price"),t.xp6(2),t.AsE("",null==s.selectedPaperFormat?null:s.selectedPaperFormat.CurrencySymbol," ",t.lcZ(14,8,(null==r||null==r.getSelectedPromotion?null:r.getSelectedPromotion.getUnitPrice)-(null==r||null==r.getSelectedPromotion?null:r.getSelectedPromotion.getUnitPrice)*(null==r||null==r.getSelectedPromotion?null:r.getSelectedPromotion.getDiscount)/100),"")}}function Xe(_,f){if(1&_&&(t.ynx(0),t._uU(1),t.ALo(2,"number"),t.ALo(3,"taxPipe"),t.BQk()),2&_){const r=t.oxw(3).$implicit,s=t.oxw();t.xp6(1),t.AsE(" ",null==s.selectedPaperFormat?null:s.selectedPaperFormat.CurrencySymbol," ",t.lcZ(2,2,t.xi3(3,4,null==r?null:r.getCustomPrice,s.tax))," ")}}function et(_,f){if(1&_&&(t.ynx(0),t._uU(1),t.ALo(2,"number"),t.ALo(3,"taxPipe"),t.BQk()),2&_){const r=t.oxw(4).$implicit,s=t.oxw();t.xp6(1),t.AsE(" ",null==s.selectedPaperFormat?null:s.selectedPaperFormat.CurrencySymbol," ",t.lcZ(2,2,t.xi3(3,4,null==r?null:r.getUnitPrice,s.tax))," ")}}function tt(_,f){if(1&_&&t.YNc(0,et,4,7,"ng-container",20),2&_){t.oxw();const r=t.MAs(5),s=t.oxw(3);t.Q6J("ngIf",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.PriceWithTax)&&s.tax&&0!=s.tax)("ngIfElse",r)}}function nt(_,f){if(1&_&&(t._uU(0),t.ALo(1,"number")),2&_){const r=t.oxw(3).$implicit,s=t.oxw();t.AsE(" ",null==s.selectedPaperFormat?null:s.selectedPaperFormat.CurrencySymbol," ",t.lcZ(1,2,null==r?null:r.getUnitPrice)," ")}}function it(_,f){if(1&_&&(t.TgZ(0,"strong"),t.YNc(1,Xe,4,7,"ng-container",20),t.YNc(2,tt,1,2,"ng-template",null,29,t.W1O),t.YNc(4,nt,2,4,"ng-template",null,30,t.W1O),t.qZA()),2&_){const r=t.MAs(3),s=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngIf",0!==(null==s?null:s.getCustomPrice)&&void 0!==(null==s?null:s.getCustomPrice))("ngIfElse",r)}}function rt(_,f){if(1&_&&(t.TgZ(0,"span",19),t.YNc(1,xe,15,10,"ng-container",20),t.YNc(2,it,6,2,"ng-template",null,21,t.W1O),t.qZA()),2&_){const r=t.MAs(3),s=t.oxw().$implicit,w=t.oxw();t.Udp("font-size",(null==w.selectedPaperFormat?null:w.selectedPaperFormat.PriceFontSize)+"px"),t.xp6(1),t.Q6J("ngIf",s.getSelectedPromotion)("ngIfElse",r)}}function at(_,f){if(1&_&&(t.TgZ(0,"span",19),t._uU(1),t.ALo(2,"slice"),t.qZA()),2&_){const r=t.oxw().$implicit,s=t.oxw();t.Udp("font-size",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.ProductNameFontSize)+"px"),t.xp6(1),t.hij(" ",t.Dn7(2,3,null!=s.selectedPaperFormat&&s.selectedPaperFormat.ProductNamePrefix?(null==s.selectedPaperFormat?null:s.selectedPaperFormat.ProductNamePrefix)+" "+r.getName:r.getName,0,null==s.selectedPaperFormat?null:s.selectedPaperFormat.ProductNameMaxLength)," ")}}function ot(_,f){if(1&_&&(t.TgZ(0,"li")(1,"div",13),t.YNc(2,We,1,4,"ngx-barcode6",14),t.TgZ(3,"div",15),t.YNc(4,Fe,2,3,"span",16),t.YNc(5,Ke,3,7,"span",16),t.YNc(6,rt,4,4,"span",16),t.YNc(7,at,3,7,"span",16),t.qZA(),t.TgZ(8,"div",17),t._uU(9),t.qZA()()()),2&_){const r=f.index,s=t.oxw();t.Udp("width",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.StickerWidth)+"px")("height",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.StickerHeight)+"px")("margin-right",(r+1)%s.totalStickerPerRow==0?0:(null==s.selectedPaperFormat?null:s.selectedPaperFormat.ColumnSpacing)+"px")("margin-bottom",r>=s.productPreview.length-s.lastIndex?0:(null==s.selectedPaperFormat?null:s.selectedPaperFormat.RowSpacing)+"px"),t.xp6(2),t.Q6J("ngIf",null==s.selectedPaperFormat?null:s.selectedPaperFormat.BarcodeVisible),t.xp6(2),t.Q6J("ngIf",null==s.selectedPaperFormat?null:s.selectedPaperFormat.CodeVisible),t.xp6(1),t.Q6J("ngIf",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.NameVisible)&&(null==s.selectedPaperFormat?null:s.selectedPaperFormat.MoveProductNameOnTop)),t.xp6(1),t.Q6J("ngIf",null==s.selectedPaperFormat?null:s.selectedPaperFormat.PriceVisible),t.xp6(1),t.Q6J("ngIf",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.NameVisible)&&!(null!=s.selectedPaperFormat&&s.selectedPaperFormat.MoveProductNameOnTop)),t.xp6(1),t.Udp("font-size",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.ProductNameFontSize)+"px"),t.xp6(1),t.hij(" ",null==s.selectedPaperFormat?null:s.selectedPaperFormat.StoreName," ")}}let st=(()=>{class _{constructor(r,s,w,L,q,X){this.dialog=r,this.productStateService=s,this.productService=w,this.barcodeService=L,this.toastService=q,this.authService=X,this.paperFormatOptions=[],this.optionSelected={id:1,name:"Continuous - 3 Column"},this.paperFormats=[],this.totalStickerPerRow=0,this.lastIndex=0,this.destroy$=new b.x,this.productPreview=[],this.taxs=[]}ngOnInit(){this.getPaperFormats(),this.checkAuthTax(),this.subscribeToObsproducts()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}checkAuthTax(){this.authService.getRoles().find(w=>"StpE"===w)?(this.getProductTax(),this.authTax=!0):this.authTax=!1}subscribeToObsproducts(){this.productStateService.getState().pipe((0,l.R)(this.destroy$)).subscribe(r=>{this.productPreview=r,this.relayout()})}getProductTax(){this.productService.getTax().pipe((0,l.R)(this.destroy$)).subscribe(r=>{r&&(this.taxs=r)})}getPaperFormats(){this.barcodeService.getPaperFormatConfig().pipe((0,l.R)(this.destroy$)).subscribe({next:r=>{r&&(this.paperFormats=r,this.setSelectedPaperFormat(r[0]),this.initOptionFormat(),this.initOptionSelected(this.selectedPaperFormat))},error:r=>{console.error(r)}})}initOptionFormat(){this.paperFormatOptions=[],this.paperFormats.forEach((r,s)=>{this.paperFormatOptions=[...this.paperFormatOptions,{id:s+1,name:r.Name}]})}initOptionSelected(r){this.optionSelected=this.paperFormatOptions.find(s=>s.name===r.Name)}openSettingModal(){this.dialog.open(He,{width:"850px",data:{paperFormat:this.selectedPaperFormat,taxs:this.taxs,authTax:this.authTax}}).afterClosed().pipe((0,l.R)(this.destroy$)).subscribe(r=>{r&&this.selectedPaperFormat&&(this.updatePaperFormatSource(r),this.updatePaperFormat(),this.setSelectedPaperFormat(r))})}onSelectPaperFormat(){this.getPaperFormatBarcode()}getPaperFormatBarcode(){let s=this.findPaperFormatByName(this.optionSelected.name);this.setSelectedPaperFormat(s)}updatePaperFormat(){this.barcodeService.updatePaperFormatConfig(this.paperFormats).pipe((0,l.R)(this.destroy$)).subscribe({next:()=>{this.toastService.success("Success Update Paper Format","Success")},error:r=>{console.error(r)}})}setSelectedPaperFormat(r){this.selectedPaperFormat=r,this.barcodeService.setBarcodeConfigState(r),this.relayout(),this.getPPnVal(r)}findPaperFormatByName(r){return this.paperFormats.find(w=>w.Name==r)}updatePaperFormatSource(r){this.paperFormats=this.paperFormats.map(s=>(r.Name===s.Name&&(s=r),s))}getPPnVal(r){this.tax=r.TaxType?r.TaxType.Rate:null}relayout(){let w=this.selectedPaperFormat?.ColumnSpacing?this.selectedPaperFormat?.ColumnSpacing:0,q=Math.floor(((this.selectedPaperFormat?.PaperWidth?this.selectedPaperFormat?.PaperWidth:0)+w)/((this.selectedPaperFormat?.StickerWidth?this.selectedPaperFormat?.StickerWidth:0)+w));this.totalStickerPerRow=q;let ue=Math.floor(this.productPreview.length/q),se=this.productPreview.length-ue*q;this.lastIndex=0===se?q:se,this.productPreview=this.productPreview.map(ne=>(ne.setBarcodeTitle=this.selectedPaperFormat?.DescriptionAsCode&&ne.getDescription?ne.getDescription:ne.getCode,ne))}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(D.uw),t.Y36(O),t.Y36(Ce),t.Y36(J),t.Y36(Oe._W),t.Y36(k.$))},_.\u0275cmp=t.Xpm({type:_,selectors:[["app-print-preview"]],decls:15,vars:10,consts:[[1,"mt-3","d-print-none"],[1,"card","mt-0","mb-0","paper-barcode"],[1,"card-header","d-flex","justify-content-between","align-items-center","border-bottom","pb-5","d-print-none"],[1,"fw-light"],["align","right",2,"width","400px"],[1,"d-inline-block","fw-light","text-info","fst-italic"],["align","left","bindLabel","name","placeholder","Select Column",1,"d-inline-block","ms-4",3,"items","ngModel","clearable","ngModelChange","change"],[1,"btn","btn","btn-outline-secondary","ms-4",3,"click"],["aria-hidden","true",1,"fa","fa-cog"],[1,"card-body","d-print-block",2,"padding","0"],[1,"canvas"],[1,"barcodes"],[3,"width","height","margin-right","margin-bottom",4,"ngFor","ngForOf"],[1,"position-relative"],[3,"bc-value","bc-element-type","bc-width","bc-height",4,"ngIf"],[2,"margin-top","-4px","line-height","1"],["class","d-block",3,"font-size",4,"ngIf"],[1,"vertical-text"],[3,"bc-value","bc-element-type","bc-width","bc-height"],[1,"d-block"],[4,"ngIf","ngIfElse"],["WITHOUT_PROMOTION",""],[1,"d-flex","justify-content-between"],[1,"ms-12"],[1,"me-12"],[1,"text-danger",2,"text-decoration","line-through","text-decoration-thickness","1.5px"],[1,"text-dark"],[1,"d-flex","justify-content-between","mt-1"],[1,"me-12","text-danger"],["WITH_TAX",""],["WITHOUT_TAX",""]],template:function(r,s){1&r&&(t._UZ(0,"div",0),t.TgZ(1,"div",1)(2,"div",2)(3,"h1",3),t._uU(4," Print Preview "),t.qZA(),t.TgZ(5,"div",4)(6,"h5",5),t._uU(7,"Paper Source"),t.qZA(),t.TgZ(8,"ng-select",6),t.NdJ("ngModelChange",function(L){return s.optionSelected=L})("change",function(){return s.onSelectPaperFormat()}),t.qZA(),t.TgZ(9,"button",7),t.NdJ("click",function(){return s.openSettingModal()}),t._UZ(10,"i",8),t.qZA()()(),t.TgZ(11,"div",9)(12,"div",10)(13,"ul",11),t.YNc(14,ot,10,16,"li",12),t.qZA()()()()),2&r&&(t.xp6(8),t.Q6J("items",s.paperFormatOptions)("ngModel",s.optionSelected)("clearable",!1),t.xp6(4),t.Udp("width",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.PaperWidth)+"px")("margin-top",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.MarginTop)+"px")("margin-left",(null==s.selectedPaperFormat?null:s.selectedPaperFormat.MarginLeft)+"px"),t.xp6(2),t.Q6J("ngForOf",s.productPreview))},dependencies:[M.sg,M.O5,U.JJ,U.On,K.w9,Qe,M.OU,M.JJ,Ne],styles:["ng-select[_ngcontent-%COMP%]{width:50%}.card-header[_ngcontent-%COMP%]{height:65px} div.barcode>img{text-align:center;max-width:100%;border:none;outline:none}@media (max-width: 480px){ div.barcode>img{border:none!important}} div.canvas ul.barcodes li img{display:block;margin:0 auto}.vertical-text[_ngcontent-%COMP%]{transform:rotate(180deg);writing-mode:vertical-rl;position:absolute;right:0px;height:100%;top:8%;text-align:center}"]}),_})(),lt=(()=>{class _{constructor(r,s,w){this.variantServiceState=r,this.authService=s,this.queryParamService=w,this.domainName=localStorage.getItem("Domain")}onLogout(){this.variantServiceState.setState([]),this.queryParamService.setState(null),this.authService.logout()}}return _.\u0275fac=function(r){return new(r||_)(t.Y36(O),t.Y36(k.$),t.Y36(V.U))},_.\u0275cmp=t.Xpm({type:_,selectors:[["app-pages"]],decls:20,vars:2,consts:[[1,"container"],[1,"row"],[1,"col-4","d-print-none"],[1,"col-8","p-0"],[1,"d-md-block","d-print-none"],[1,"row","justify-content-between","align-items-center"],[1,"col-auto","d-inline-flex"],[1,"pt-1rem","me-3"],["target","_blank","href","https://www.dealpos.com"],["src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid"],[1,"col-auto"],[1,"logout","d-print-none"],[3,"href"],[3,"click"],[1,"fa","fa-sign-out-alt"]],template:function(r,s){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"app-list-products"),t.qZA(),t.TgZ(4,"div",3),t._UZ(5,"app-print-preview"),t.qZA()()(),t.TgZ(6,"footer",4)(7,"div",5)(8,"div",6)(9,"p",7),t._uU(10,"Powered by : "),t.qZA(),t.TgZ(11,"a",8),t._UZ(12,"img",9),t.qZA()(),t.TgZ(13,"div",10)(14,"div",11)(15,"a",12),t._uU(16),t.qZA(),t.TgZ(17,"h5",13),t.NdJ("click",function(){return s.onLogout()}),t._UZ(18,"span",14),t._uU(19,"\xa0Logout"),t.qZA()()()()()),2&r&&(t.xp6(15),t.MGl("href","https://",s.domainName,"",t.LSH),t.xp6(1),t.Oqu(s.domainName))},dependencies:[ze,st],styles:[".logout[_ngcontent-%COMP%]{position:relative;left:2.5vw;top:-5px;font-size:14px;cursor:pointer}footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:-1%}@media (min-height: 720px){footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:12%}}@media (min-height: 768px){footer[_ngcontent-%COMP%]{position:relative;bottom:0;width:90%;left:3rem;top:16%}}"]}),_})();var ut=C(4949);const ct=[{path:"",component:lt}];let ht=(()=>{class _{}return _.\u0275fac=function(r){return new(r||_)},_.\u0275mod=t.oAB({type:_}),_.\u0275inj=t.cJS({imports:[M.ez,ut.m,Ue,$e,qe,N.Bz.forChild(ct)]}),_})()},7370:function(H){H.exports=function(){return M={},S.m=C=[function(N,t,F){"use strict";F.r(t);var x={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(x.allowedTagList),Object.defineProperty(x,"allowedTagList",{configurable:!1,writable:!1}),x.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(x.keyCode),Object.defineProperty(x,"keyCode",{configurable:!1,writable:!1}),x.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(x.fromCharCodeKeyCode),Object.defineProperty(x,"fromCharCodeKeyCode",{configurable:!1,writable:!1}),x.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(x.keyName._allFnKeys),Object.freeze(x.keyName._someNonPrintableKeys),Object.freeze(x.keyName._directionKeys),Object.freeze(x.keyName),Object.defineProperty(x,"keyName",{configurable:!1,writable:!1}),Object.freeze(x);var O=x;function k(o){return function(h){if(Array.isArray(h))return c(h)}(o)||function(h){if(typeof Symbol<"u"&&Symbol.iterator in Object(h))return Array.from(h)}(o)||l(o)||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(){return(V=Object.assign||function(o){for(var h=1;h<arguments.length;h++){var g=arguments[h];for(var e in g)Object.prototype.hasOwnProperty.call(g,e)&&(o[e]=g[e])}return o}).apply(this,arguments)}function b(o,h){return function(g){if(Array.isArray(g))return g}(o)||function(g,e){if(typeof Symbol<"u"&&Symbol.iterator in Object(g)){var i=[],a=!0,m=!1,v=void 0;try{for(var u,T=g[Symbol.iterator]();!(a=(u=T.next()).done)&&(i.push(u.value),!e||i.length!==e);a=!0);}catch(I){m=!0,v=I}finally{try{a||null==T.return||T.return()}finally{if(m)throw v}}return i}}(o,h)||l(o,h)||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 l(o,h){if(o){if("string"==typeof o)return c(o,h);var g=Object.prototype.toString.call(o).slice(8,-1);return"Object"===g&&o.constructor&&(g=o.constructor.name),"Map"===g||"Set"===g?Array.from(g):"Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?c(o,h):void 0}}function c(o,h){(null==h||h>o.length)&&(h=o.length);for(var g=0,e=new Array(h);g<h;g++)e[g]=o[g];return e}function d(o){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"==typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(o)}var n=function(){function o(){!function(h){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}(this)}return function(h,g){for(var e=0;e<g.length;e++){var i=g[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}(o,[{key:"isNull",value:function(h){return null===h}},{key:"isUndefined",value:function(h){return void 0===h}},{key:"isUndefinedOrNullOrEmpty",value:function(h){return null==h||""===h}},{key:"isString",value:function(h){return"string"==typeof h||h instanceof String}},{key:"isEmptyString",value:function(h){return""===h}},{key:"isBoolean",value:function(h){return"boolean"==typeof h}},{key:"isTrueOrFalseString",value:function(h){var g=String(h).toLowerCase();return"true"===g||"false"===g}},{key:"isObject",value:function(h){return"object"===d(h)&&null!==h&&!Array.isArray(h)}},{key:"isEmptyObj",value:function(h){for(var g in h)if(Object.prototype.hasOwnProperty.call(h,g))return!1;return!0}},{key:"isNumberStrict",value:function(h){return"number"==typeof h}},{key:"isNumber",value:function(h){return!this.isArray(h)&&!isNaN(parseFloat(h))&&isFinite(h)}},{key:"isDigit",value:function(h){return/\d/.test(h)}},{key:"isNumberOrArabic",value:function(h){var g=this.arabicToLatinNumbers(h,!1,!0,!0);return this.isNumber(g)}},{key:"isInt",value:function(h){return"number"==typeof h&&parseFloat(h)===parseInt(h,10)&&!isNaN(h)}},{key:"isFunction",value:function(h){return"function"==typeof h}},{key:"isIE11",value:function(){return typeof window<"u"&&!!window.MSInputMethodContext&&!!document.documentMode}},{key:"contains",value:function(h,g){return!(!this.isString(h)||!this.isString(g)||""===h||""===g)&&-1!==h.indexOf(g)}},{key:"isInArray",value:function(h,g){return!(!this.isArray(g)||g===[]||this.isUndefined(h))&&-1!==g.indexOf(h)}},{key:"isArray",value:function(h){if("[object Array]"===Object.prototype.toString.call([]))return Array.isArray(h)||"object"===d(h)&&"[object Array]"===Object.prototype.toString.call(h);throw new Error("toString message changed for Object Array")}},{key:"isElement",value:function(h){return typeof Element<"u"&&h instanceof Element}},{key:"isInputElement",value:function(h){return this.isElement(h)&&"input"===h.tagName.toLowerCase()}},{key:"decimalPlaces",value:function(h){var g=b(h.split("."),2)[1];return this.isUndefined(g)?0:g.length}},{key:"indexFirstNonZeroDecimalPlace",value:function(h){var g=b(String(Math.abs(h)).split("."),2)[1];if(this.isUndefined(g))return 0;var e=g.lastIndexOf("0");return-1===e?e=0:e+=2,e}},{key:"keyCodeNumber",value:function(h){return void 0===h.which?h.keyCode:h.which}},{key:"character",value:function(h){var g;if("Unidentified"===h.key||void 0===h.key||this.isSeleniumBot()){var e=this.keyCodeNumber(h);if(e===O.keyCode.AndroidDefault)return O.keyName.AndroidDefault;var i=O.fromCharCodeKeyCode[e];g=o.isUndefinedOrNullOrEmpty(i)?String.fromCharCode(e):i}else{var a;switch(h.key){case"Add":g=O.keyName.NumpadPlus;break;case"Apps":g=O.keyName.ContextMenu;break;case"Crsel":g=O.keyName.CrSel;break;case"Decimal":g=h.char?h.char:O.keyName.NumpadDot;break;case"Del":g="firefox"===(a=this.browser()).name&&a.version<=36||"ie"===a.name&&a.version<=9?O.keyName.Dot:O.keyName.Delete;break;case"Divide":g=O.keyName.NumpadSlash;break;case"Down":g=O.keyName.DownArrow;break;case"Esc":g=O.keyName.Esc;break;case"Exsel":g=O.keyName.ExSel;break;case"Left":g=O.keyName.LeftArrow;break;case"Meta":case"Super":g=O.keyName.OSLeft;break;case"Multiply":g=O.keyName.NumpadMultiply;break;case"Right":g=O.keyName.RightArrow;break;case"Spacebar":g=O.keyName.Space;break;case"Subtract":g=O.keyName.NumpadMinus;break;case"Up":g=O.keyName.UpArrow;break;default:g=h.key}}return g}},{key:"browser",value:function(){var h,g=navigator.userAgent,e=g.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(e[1])?{name:"ie",version:(h=/\brv[ :]+(\d+)/g.exec(g)||[])[1]||""}:"Chrome"===e[1]&&null!==(h=g.match(/\b(OPR|Edge)\/(\d+)/))?{name:h[1].replace("OPR","opera"),version:h[2]}:(e=e[2]?[e[1],e[2]]:[navigator.appName,navigator.appVersion,"-?"],null!==(h=g.match(/version\/(\d+)/i))&&e.splice(1,1,h[1]),{name:e[0].toLowerCase(),version:e[1]})}},{key:"isSeleniumBot",value:function(){return!0===window.navigator.webdriver}},{key:"isNegative",value:function(h,g,e){var i=1<arguments.length&&void 0!==g?g:"-",a=!(2<arguments.length&&void 0!==e)||e;return h===i||""!==h&&(o.isNumber(h)?h<0:a?this.contains(h,i):this.isNegativeStrict(h,i))}},{key:"isNegativeStrict",value:function(h,g){var e=1<arguments.length&&void 0!==g?g:"-";return h.charAt(0)===e}},{key:"isNegativeWithBrackets",value:function(h,g,e){return h.charAt(0)===g&&this.contains(h,e)}},{key:"isZeroOrHasNoValue",value:function(h){return!/[1-9]/g.test(h)}},{key:"setRawNegativeSign",value:function(h){return this.isNegativeStrict(h,"-")?h:"-".concat(h)}},{key:"replaceCharAt",value:function(h,g,e){return"".concat(h.substr(0,g)).concat(e).concat(h.substr(g+e.length))}},{key:"clampToRangeLimits",value:function(h,g){return Math.max(g.minimumValue,Math.min(g.maximumValue,h))}},{key:"countNumberCharactersOnTheCaretLeftSide",value:function(h,g,e){for(var i=new RegExp("[0-9".concat(e,"-]")),a=0,m=0;m<g;m++)i.test(h[m])&&a++;return a}},{key:"findCaretPositionInFormattedNumber",value:function(h,g,e,i){var a,m=e.length,v=h.length,u=0;for(a=0;a<m&&u<v&&u<g;a++)(h[u]===e[a]||"."===h[u]&&e[a]===i)&&u++;return a}},{key:"countCharInText",value:function(h,g){for(var e=0,i=0;i<g.length;i++)g[i]===h&&e++;return e}},{key:"convertCharacterCountToIndexPosition",value:function(h){return Math.max(h,h-1)}},{key:"getElementSelection",value:function(h){var g,e={};try{g=this.isUndefined(h.selectionStart)}catch{g=!1}try{if(g){var i=window.getSelection().getRangeAt(0);e.start=i.startOffset,e.end=i.endOffset,e.length=e.end-e.start}else e.start=h.selectionStart,e.end=h.selectionEnd,e.length=e.end-e.start}catch{e.start=0,e.end=0,e.length=0}return e}},{key:"setElementSelection",value:function(h,g,e){var i=2<arguments.length&&void 0!==e?e:null;if(this.isUndefinedOrNullOrEmpty(i)&&(i=g),this.isInputElement(h))h.setSelectionRange(g,i);else if(!o.isNull(h.firstChild)){var a=document.createRange();a.setStart(h.firstChild,g),a.setEnd(h.firstChild,i);var m=window.getSelection();m.removeAllRanges(),m.addRange(a)}}},{key:"throwError",value:function(h){throw new Error(h)}},{key:"warning",value:function(h,g){1<arguments.length&&void 0!==g&&!g||console.warn("Warning: ".concat(h))}},{key:"isWheelUpEvent",value:function(h){return h.deltaY||this.throwError("The event passed as a parameter is not a valid wheel event, '".concat(h.type,"' given.")),h.deltaY<0}},{key:"isWheelDownEvent",value:function(h){return h.deltaY||this.throwError("The event passed as a parameter is not a valid wheel event, '".concat(h.type,"' given.")),0<h.deltaY}},{key:"forceDecimalPlaces",value:function(h,g){var e=b(String(h).split("."),2),a=e[1];return a?"".concat(e[0],".").concat(a.substr(0,g)):h}},{key:"roundToNearest",value:function(h,g){var e=1<arguments.length&&void 0!==g?g:1e3;return 0===h?0:(0===e&&this.throwError("The `stepPlace` used to round is equal to `0`. This value must not be equal to zero."),Math.round(h/e)*e)}},{key:"modifyAndRoundToNearestAuto",value:function(h,g,e){h=Number(this.forceDecimalPlaces(h,e));var i=Math.abs(h);if(0<=i&&i<1){var a,m=Math.pow(10,-e);if(0===h)return g?m:-m;var u=e,T=this.indexFirstNonZeroDecimalPlace(h);return a=u-1<=T?m:Math.pow(10,-(T+1)),this.roundToNearest(g?h+a:h-a,a)}h=parseInt(h,10);var I,j=Math.abs(h).toString().length;switch(j){case 1:I=0;break;case 2:case 3:I=1;break;case 4:case 5:I=2;break;default:I=j-3}var y,B=Math.pow(10,I);return(y=g?h+B:h-B)<=10&&-10<=y?y:this.roundToNearest(y,B)}},{key:"addAndRoundToNearestAuto",value:function(h,g){return this.modifyAndRoundToNearestAuto(h,!0,g)}},{key:"subtractAndRoundToNearestAuto",value:function(h,g){return this.modifyAndRoundToNearestAuto(h,!1,g)}},{key:"arabicToLatinNumbers",value:function(h,g,e,i){var a=!(1<arguments.length&&void 0!==g)||g,m=2<arguments.length&&void 0!==e&&e,v=3<arguments.length&&void 0!==i&&i;if(this.isNull(h))return h;var u=h.toString();if(""===u)return h;if(null===u.match(/[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u06f4\u06f5\u06f6]/g))return a&&(u=Number(u)),u;m&&(u=u.replace(/\u066b/,".")),v&&(u=u.replace(/\u066c/g,"")),u=u.replace(/[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669]/g,function(I){return I.charCodeAt(0)-1632}).replace(/[\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9]/g,function(I){return I.charCodeAt(0)-1776});var T=Number(u);return isNaN(T)?T:(a&&(u=T),u)}},{key:"triggerEvent",value:function(h,g,e,i,a){var m,v=1<arguments.length&&void 0!==g?g:document,u=2<arguments.length&&void 0!==e?e:null,T=!(3<arguments.length&&void 0!==i)||i,I=!(4<arguments.length&&void 0!==a)||a;window.CustomEvent?m=new CustomEvent(h,{detail:u,bubbles:T,cancelable:I}):(m=document.createEvent("CustomEvent")).initCustomEvent(h,T,I,{detail:u}),v.dispatchEvent(m)}},{key:"parseStr",value:function(h){var g,e,i,a,m={};if(0===h&&1/h<0&&(h="-0"),h=h.toString(),this.isNegativeStrict(h,"-")?(h=h.slice(1),m.s=-1):m.s=1,-1<(g=h.indexOf("."))&&(h=h.replace(".","")),g<0&&(g=h.length),(e=-1===h.search(/[1-9]/i)?h.length:h.search(/[1-9]/i))===(i=h.length))m.e=0,m.c=[0];else{for(a=i-1;"0"===h.charAt(a);--a)--i;for(--i,m.e=g-e-1,m.c=[],g=0;e<=i;e+=1)m.c[g]=+h.charAt(e),g+=1}return m}},{key:"testMinMax",value:function(h,g){var e=g.c,i=h.c,a=g.s,m=h.s,v=g.e,u=h.e;if(!e[0]||!i[0])return e[0]?a:i[0]?-m:0;if(a!==m)return a;var T=a<0;if(v!==u)return u<v^T?1:-1;for(a=-1,m=(v=e.length)<(u=i.length)?v:u,a+=1;a<m;a+=1)if(e[a]!==i[a])return e[a]>i[a]^T?1:-1;return v===u?0:u<v^T?1:-1}},{key:"randomString",value:function(h){var g=0<arguments.length&&void 0!==h?h:5;return Math.random().toString(36).substr(2,g)}},{key:"domElement",value:function(h){return o.isString(h)?document.querySelector(h):h}},{key:"getElementValue",value:function(h){return"input"===h.tagName.toLowerCase()?h.value:this.text(h)}},{key:"setElementValue",value:function(h,g){var e=1<arguments.length&&void 0!==g?g:null;"input"===h.tagName.toLowerCase()?h.value=e:h.textContent=e}},{key:"setInvalidState",value:function(h,g){var e=1<arguments.length&&void 0!==g?g:"Invalid";""!==e&&!this.isNull(e)||this.throwError("Cannot set the invalid state with an empty message."),h.setCustomValidity(e)}},{key:"setValidState",value:function(h){h.setCustomValidity("")}},{key:"cloneObject",value:function(h){return V({},h)}},{key:"camelize",value:function(h,g,e,i){var a=1<arguments.length&&void 0!==g?g:"-",m=!(2<arguments.length&&void 0!==e)||e,v=!(3<arguments.length&&void 0!==i)||i;if(this.isNull(h))return null;m&&(h=h.replace(/^data-/,""));var u=h.split(a).map(function(T){return"".concat(T.charAt(0).toUpperCase()).concat(T.slice(1))});return u=u.join(""),v&&(u="".concat(u.charAt(0).toLowerCase()).concat(u.slice(1))),u}},{key:"text",value:function(h){var g=h.nodeType;return g===Node.ELEMENT_NODE||g===Node.DOCUMENT_NODE||g===Node.DOCUMENT_FRAGMENT_NODE?h.textContent:g===Node.TEXT_NODE?h.nodeValue:""}},{key:"setText",value:function(h,g){var e=h.nodeType;e!==Node.ELEMENT_NODE&&e!==Node.DOCUMENT_NODE&&e!==Node.DOCUMENT_FRAGMENT_NODE||(h.textContent=g)}},{key:"filterOut",value:function(h,g){var e=this;return h.filter(function(i){return!e.isInArray(i,g)})}},{key:"trimPaddedZerosFromDecimalPlaces",value:function(h){if(""===(h=String(h)))return"";var g=b(h.split("."),2),e=g[0],i=g[1];if(this.isUndefinedOrNullOrEmpty(i))return e;var a=i.replace(/0+$/g,"");return""===a?e:"".concat(e,".").concat(a)}},{key:"getHoveredElement",value:function(){var h=k(document.querySelectorAll(":hover"));return h[h.length-1]}},{key:"arrayTrim",value:function(h,g){var e=h.length;return 0===e||e<g?h:g<0?[]:(h.length=parseInt(g,10),h)}},{key:"arrayUnique",value:function(){var h;return k(new Set((h=[]).concat.apply(h,arguments)))}},{key:"mergeMaps",value:function(){for(var h=arguments.length,g=new Array(h),e=0;e<h;e++)g[e]=arguments[e];return new Map(g.reduce(function(i,a){return i.concat(k(a))},[]))}},{key:"objectKeyLookup",value:function(h,g){var e=Object.entries(h).find(function(a){return a[1]===g}),i=null;return void 0!==e&&(i=e[0]),i}},{key:"insertAt",value:function(h,g,e){if(e>(h=String(h)).length)throw new Error("The given index is out of the string range.");if(1!==g.length)throw new Error("The given string `char` should be only one character long.");return""===h&&0===e?g:"".concat(h.slice(0,e)).concat(g).concat(h.slice(e))}},{key:"scientificToDecimal",value:function(h){var g=Number(h);if(isNaN(g))return NaN;if(h=String(h),!this.contains(h,"e")&&!this.contains(h,"E"))return h;var e=b(h.split(/e/i),2),i=e[0],a=e[1],m=i<0;m&&(i=i.replace("-",""));var v=+a<0;v&&(a=a.replace("-",""));var u,T=b(i.split(/\./),2),I=T[0],j=T[1];return u=v?(u=I.length>a?this.insertAt(I,".",I.length-a):"0.".concat("0".repeat(a-I.length)).concat(I),"".concat(u).concat(j||"")):j?(i="".concat(I).concat(j),a<j.length?this.insertAt(i,".",+a+I.length):"".concat(i).concat("0".repeat(a-j.length))):(i=i.replace(".",""),"".concat(i).concat("0".repeat(Number(a)))),m&&(u="-".concat(u)),u}}]),o}(),p=function(){function o(h){if(function(g){if(!(g instanceof o))throw new TypeError("Cannot call a class as a function")}(this),null===h)throw new Error("Invalid AST")}return function(h,g){for(var e=0;e<g.length;e++){var i=g[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}(o.prototype,[{key:"evaluate",value:function(h){if(null==h)throw new Error("Invalid AST sub-tree");if("number"===h.type)return h.value;if("unaryMinus"===h.type)return-this.evaluate(h.left);var g=this.evaluate(h.left),e=this.evaluate(h.right);switch(h.type){case"op_+":return Number(g)+Number(e);case"op_-":return g-e;case"op_*":return g*e;case"op_/":return g/e;default:throw new Error("Invalid operator '".concat(h.type,"'"))}}}]),o}(),P=function(){function o(){!function(h){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}(this)}return function(h,g){for(var e=0;e<g.length;e++){var i=g[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}(o,[{key:"createNode",value:function(h,g,e){var i=new o;return i.type=h,i.left=g,i.right=e,i}},{key:"createUnaryNode",value:function(h){var g=new o;return g.type="unaryMinus",g.left=h,g.right=null,g}},{key:"createLeaf",value:function(h){var g=new o;return g.type="number",g.value=h,g}}]),o}();function E(o,h,g){(function(e){if(!(e instanceof E))throw new TypeError("Cannot call a class as a function")})(this),this.type=o,this.value=h,this.symbol=g}var D=function(){function o(h){(function(g){if(!(g instanceof o))throw new TypeError("Cannot call a class as a function")})(this),this.text=h,this.textLength=h.length,this.index=0,this.token=new E("Error",0,0)}return function(h,g){for(var e=0;e<g.length;e++){var i=g[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}(o.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(h){var g=0<arguments.length&&void 0!==h?h:".";if(this._skipSpaces(),this.textLength===this.index)return this.token.type="EOT",this.token;if(n.isDigit(this.text[this.index]))return this.token.type="num",this.token.value=this._getNumber(g),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(h){this._skipSpaces();for(var g=this.index;this.index<=this.textLength&&n.isDigit(this.text[this.index]);)this.index++;for(this.text[this.index]===h&&this.index++;this.index<=this.textLength&&n.isDigit(this.text[this.index]);)this.index++;if(this.index===g)throw new Error("No number has been found while it was expected");return this.text.substring(g,this.index).replace(h,".")}}]),o}(),G=function(){function o(h){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:".";return function(e){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this),this.text=h,this.decimalCharacter=g,this.lexer=new D(h),this.token=this.lexer.getNextToken(this.decimalCharacter),this._exp()}return function(h,g){for(var e=0;e<g.length;e++){var i=g[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}(o.prototype,[{key:"_exp",value:function(){var h=this._term(),g=this._moreExp();return P.createNode("op_+",h,g)}},{key:"_moreExp",value:function(){var h,g;switch(this.token.type){case"+":return this.token=this.lexer.getNextToken(this.decimalCharacter),h=this._term(),g=this._moreExp(),P.createNode("op_+",g,h);case"-":return this.token=this.lexer.getNextToken(this.decimalCharacter),h=this._term(),g=this._moreExp(),P.createNode("op_-",g,h)}return P.createLeaf(0)}},{key:"_term",value:function(){var h=this._factor(),g=this._moreTerms();return P.createNode("op_*",h,g)}},{key:"_moreTerms",value:function(){var h,g;switch(this.token.type){case"*":return this.token=this.lexer.getNextToken(this.decimalCharacter),h=this._factor(),g=this._moreTerms(),P.createNode("op_*",g,h);case"/":return this.token=this.lexer.getNextToken(this.decimalCharacter),h=this._factor(),g=this._moreTerms(),P.createNode("op_/",g,h)}return P.createLeaf(1)}},{key:"_factor",value:function(){var h,g,e;switch(this.token.type){case"num":return e=this.token.value,this.token=this.lexer.getNextToken(this.decimalCharacter),P.createLeaf(e);case"-":return this.token=this.lexer.getNextToken(this.decimalCharacter),g=this._factor(),P.createUnaryNode(g);case"(":return this.token=this.lexer.getNextToken(this.decimalCharacter),h=this._exp(),this._match(")"),h;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(h){var g=this.lexer.getIndex()-1;if(this.text[g]!==h)throw new Error("Unexpected token '".concat(this.token.symbol,"' at position '").concat(g,"' in the match function"));this.token=this.lexer.getNextToken(this.decimalCharacter)}}]),o}();function U(o){return function(h){if(Array.isArray(h))return me(h)}(o)||function(h){if(typeof Symbol<"u"&&Symbol.iterator in Object(h))return Array.from(h)}(o)||ae(o)||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 K(o,h){return function(g){if(Array.isArray(g))return g}(o)||function(g,e){if(typeof Symbol<"u"&&Symbol.iterator in Object(g)){var i=[],a=!0,m=!1,v=void 0;try{for(var u,T=g[Symbol.iterator]();!(a=(u=T.next()).done)&&(i.push(u.value),!e||i.length!==e);a=!0);}catch(I){m=!0,v=I}finally{try{a||null==T.return||T.return()}finally{if(m)throw v}}return i}}(o,h)||ae(o,h)||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 ae(o,h){if(o){if("string"==typeof o)return me(o,h);var g=Object.prototype.toString.call(o).slice(8,-1);return"Object"===g&&o.constructor&&(g=o.constructor.name),"Map"===g||"Set"===g?Array.from(g):"Arguments"===g||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?me(o,h):void 0}}function me(o,h){(null==h||h>o.length)&&(h=o.length);for(var g=0,e=new Array(h);g<h;g++)e[g]=o[g];return e}function le(){return(le=Object.assign||function(o){for(var h=1;h<arguments.length;h++){var g=arguments[h];for(var e in g)Object.prototype.hasOwnProperty.call(g,e)&&(o[e]=g[e])}return o}).apply(this,arguments)}function ie(o){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(h){return typeof h}:function(h){return h&&"function"==typeof Symbol&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h})(o)}function ge(o,h){for(var g=0;g<h.length;g++){var e=h[g];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(o,e.key,e)}}var J,A=function(){function o(){var e=this,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,m=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;!function(y){if(!(y instanceof o))throw new TypeError("Cannot call a class as a function")}(this);var v=o._setArgumentsValues(i,a,m),T=v.initialValue,I=v.userOptions;if(this.domElement=v.domElement,this.defaultRawValue="",this._setSettings(I,!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(T);else{var j;if(n.isNull(T))switch(this.settings.emptyInputBehavior){case o.options.emptyInputBehavior.min:j=this.settings.minimumValue;break;case o.options.emptyInputBehavior.max:j=this.settings.maximumValue;break;case o.options.emptyInputBehavior.zero:j="0";break;case o.options.emptyInputBehavior.focus:case o.options.emptyInputBehavior.press:case o.options.emptyInputBehavior.always:case o.options.emptyInputBehavior.null:j="";break;default:j=this.settings.emptyInputBehavior}else j=T;this._setElementAndRawValue(j)}this.runOnce=!0,this.hasEventListeners=!1,(this.isInputElement||this.isContentEditable)&&(this.settings.noEventListeners||this._createEventListeners(),this._setWritePermissions(!0)),this._saveInitialValues(T),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(y,B){var R=1<arguments.length&&void 0!==B?B:null;e.autoNumericLocalList.forEach(function(Z){Z.set(y,R)})},setUnformatted:function(y,B){var R=1<arguments.length&&void 0!==B?B:null;e.autoNumericLocalList.forEach(function(Z){Z.setUnformatted(y,R)})},get:function(y){var B=0<arguments.length&&void 0!==y?y:null,R=[];return e.autoNumericLocalList.forEach(function(Z){R.push(Z.get())}),e._executeCallback(R,B),R},getNumericString:function(y){var B=0<arguments.length&&void 0!==y?y:null,R=[];return e.autoNumericLocalList.forEach(function(Z){R.push(Z.getNumericString())}),e._executeCallback(R,B),R},getFormatted:function(y){var B=0<arguments.length&&void 0!==y?y:null,R=[];return e.autoNumericLocalList.forEach(function(Z){R.push(Z.getFormatted())}),e._executeCallback(R,B),R},getNumber:function(y){var B=0<arguments.length&&void 0!==y?y:null,R=[];return e.autoNumericLocalList.forEach(function(Z){R.push(Z.getNumber())}),e._executeCallback(R,B),R},getLocalized:function(y){var B=0<arguments.length&&void 0!==y?y:null,R=[];return e.autoNumericLocalList.forEach(function(Z){R.push(Z.getLocalized())}),e._executeCallback(R,B),R},reformat:function(){e.autoNumericLocalList.forEach(function(y){y.reformat()})},unformat:function(){e.autoNumericLocalList.forEach(function(y){y.unformat()})},unformatLocalized:function(y){var B=0<arguments.length&&void 0!==y?y:null;e.autoNumericLocalList.forEach(function(R){R.unformatLocalized(B)})},update:function(){for(var y=arguments.length,B=new Array(y),R=0;R<y;R++)B[R]=arguments[R];e.autoNumericLocalList.forEach(function(Z){Z.update.apply(Z,B)})},isPristine:function(){var y=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],B=!0;return e.autoNumericLocalList.forEach(function(R){B&&!R.isPristine(y)&&(B=!1)}),B},clear:function(y){var B=0<arguments.length&&void 0!==y&&y;e.autoNumericLocalList.forEach(function(R){R.clear(B)})},remove:function(){e.autoNumericLocalList.forEach(function(y){y.remove()})},wipe:function(){e.autoNumericLocalList.forEach(function(y){y.wipe()})},nuke:function(){e.autoNumericLocalList.forEach(function(y){y.nuke()})},has:function(y){return e.autoNumericLocalList.has(y instanceof o?y.node():y)},addObject:function(y){var B,R;R=y instanceof o?(B=y.node(),y):o.getAutoNumericElement(B=y),e._hasLocalList()||e._createLocalList();var Z,z=R._getLocalList();0===z.size&&(R._createLocalList(),z=R._getLocalList()),(Z=z instanceof Map?n.mergeMaps(e._getLocalList(),z):(e._addToLocalList(B,R),e._getLocalList())).forEach(function(W){W._setLocalList(Z)})},removeObject:function(y,B){var R,Z,z=1<arguments.length&&void 0!==B&&B;Z=y instanceof o?(R=y.node(),y):o.getAutoNumericElement(R=y);var W=e.autoNumericLocalList;e.autoNumericLocalList.delete(R),W.forEach(function(Y){Y._setLocalList(e.autoNumericLocalList)}),z||R!==e.node()?Z._createLocalList():Z._setLocalList(new Map)},empty:function(y){var B=0<arguments.length&&void 0!==y&&y;e.autoNumericLocalList.forEach(function(R){B?R._createLocalList():R._setLocalList(new Map)})},elements:function(){var y=[];return e.autoNumericLocalList.forEach(function(B){y.push(B.node())}),y},getList:function(){return e.autoNumericLocalList},size:function(){return e.autoNumericLocalList.size}},this.options={reset:function(){return e.settings={rawValue:e.defaultRawValue},e.update(o.defaultSettings),e},allowDecimalPadding:function(y){return e.update({allowDecimalPadding:y}),e},alwaysAllowDecimalCharacter:function(y){return e.update({alwaysAllowDecimalCharacter:y}),e},caretPositionOnFocus:function(y){return e.settings.caretPositionOnFocus=y,e},createLocalList:function(y){return e.settings.createLocalList=y,e.settings.createLocalList?e._hasLocalList()||e._createLocalList():e._deleteLocalList(),e},currencySymbol:function(y){return e.update({currencySymbol:y}),e},currencySymbolPlacement:function(y){return e.update({currencySymbolPlacement:y}),e},decimalCharacter:function(y){return e.update({decimalCharacter:y}),e},decimalCharacterAlternative:function(y){return e.settings.decimalCharacterAlternative=y,e},decimalPlaces:function(y){return n.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:y}),e},decimalPlacesRawValue:function(y){return e.update({decimalPlacesRawValue:y}),e},decimalPlacesShownOnBlur:function(y){return e.update({decimalPlacesShownOnBlur:y}),e},decimalPlacesShownOnFocus:function(y){return e.update({decimalPlacesShownOnFocus:y}),e},defaultValueOverride:function(y){return e.update({defaultValueOverride:y}),e},digitalGroupSpacing:function(y){return e.update({digitalGroupSpacing:y}),e},digitGroupSeparator:function(y){return e.update({digitGroupSeparator:y}),e},divisorWhenUnfocused:function(y){return e.update({divisorWhenUnfocused:y}),e},emptyInputBehavior:function(y){return null===e.rawValue&&y!==o.options.emptyInputBehavior.null&&(n.warning("You are trying to modify the `emptyInputBehavior` option to something different than `'null'` (".concat(y,"), 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:y}),e},eventBubbles:function(y){return e.settings.eventBubbles=y,e},eventIsCancelable:function(y){return e.settings.eventIsCancelable=y,e},failOnUnknownOption:function(y){return e.settings.failOnUnknownOption=y,e},formatOnPageLoad:function(y){return e.settings.formatOnPageLoad=y,e},formulaMode:function(y){return e.settings.formulaMode=y,e},historySize:function(y){return e.settings.historySize=y,e},invalidClass:function(y){return e.settings.invalidClass=y,e},isCancellable:function(y){return e.settings.isCancellable=y,e},leadingZero:function(y){return e.update({leadingZero:y}),e},maximumValue:function(y){return e.update({maximumValue:y}),e},minimumValue:function(y){return e.update({minimumValue:y}),e},modifyValueOnWheel:function(y){return e.settings.modifyValueOnWheel=y,e},negativeBracketsTypeOnBlur:function(y){return e.update({negativeBracketsTypeOnBlur:y}),e},negativePositiveSignPlacement:function(y){return e.update({negativePositiveSignPlacement:y}),e},negativeSignCharacter:function(y){return e.update({negativeSignCharacter:y}),e},noEventListeners:function(y){return y===o.options.noEventListeners.noEvents&&e.settings.noEventListeners===o.options.noEventListeners.addEvents&&e._removeEventListeners(),e.update({noEventListeners:y}),e},onInvalidPaste:function(y){return e.settings.onInvalidPaste=y,e},outputFormat:function(y){return e.settings.outputFormat=y,e},overrideMinMaxLimits:function(y){return e.update({overrideMinMaxLimits:y}),e},positiveSignCharacter:function(y){return e.update({positiveSignCharacter:y}),e},rawValueDivisor:function(y){return e.update({rawValueDivisor:y}),e},readOnly:function(y){return e.settings.readOnly=y,e._setWritePermissions(),e},roundingMethod:function(y){return e.update({roundingMethod:y}),e},saveValueToSessionStorage:function(y){return e.update({saveValueToSessionStorage:y}),e},symbolWhenUnfocused:function(y){return e.update({symbolWhenUnfocused:y}),e},selectNumberOnly:function(y){return e.settings.selectNumberOnly=y,e},selectOnFocus:function(y){return e.settings.selectOnFocus=y,e},serializeSpaces:function(y){return e.settings.serializeSpaces=y,e},showOnlyNumbersOnFocus:function(y){return e.update({showOnlyNumbersOnFocus:y}),e},showPositiveSign:function(y){return e.update({showPositiveSign:y}),e},showWarnings:function(y){return e.settings.showWarnings=y,e},styleRules:function(y){return e.update({styleRules:y}),e},suffixText:function(y){return e.update({suffixText:y}),e},unformatOnHover:function(y){return e.settings.unformatOnHover=y,e},unformatOnSubmit:function(y){return e.settings.unformatOnSubmit=y,e},valuesToStrings:function(y){return e.update({valuesToStrings:y}),e},watchExternalChanges:function(y){return e.update({watchExternalChanges:y}),e},wheelOn:function(y){return e.settings.wheelOn=y,e},wheelStep:function(y){return e.settings.wheelStep=y,e}},this._triggerEvent(o.events.initialized,this.domElement,{newValue:n.getElementValue(this.domElement),newRawValue:this.rawValue,error:null,aNElement:this})}var h,g;return g=[{key:"version",value:function(){return"4.6.0"}},{key:"_setArgumentsValues",value:function(e,i,a){n.isNull(e)&&n.throwError("At least one valid parameter is needed in order to initialize an AutoNumeric object");var m,v,u,T=n.isElement(e),I=n.isString(e),j=n.isObject(i),y=Array.isArray(i)&&0<i.length,B=n.isNumberOrArabic(i)||""===i,R=this._isPreDefinedOptionValid(i),Z=n.isNull(i),z=n.isEmptyString(i),W=n.isObject(a),Y=Array.isArray(a)&&0<a.length,te=n.isNull(a),he=this._isPreDefinedOptionValid(a);return T&&Z&&te?(m=e,v=u=null):T&&B&&te?(m=e,u=i,v=null):T&&j&&te?(m=e,u=null,v=i):T&&R&&te?(m=e,u=null,v=this._getOptionObject(i)):T&&y&&te?(m=e,u=null,v=this.mergeOptions(i)):T&&(Z||z)&&W?(m=e,u=null,v=a):T&&(Z||z)&&Y?(m=e,u=null,v=this.mergeOptions(a)):I&&Z&&te?(m=document.querySelector(e),v=u=null):I&&j&&te?(m=document.querySelector(e),u=null,v=i):I&&R&&te?(m=document.querySelector(e),u=null,v=this._getOptionObject(i)):I&&y&&te?(m=document.querySelector(e),u=null,v=this.mergeOptions(i)):I&&(Z||z)&&W?(m=document.querySelector(e),u=null,v=a):I&&(Z||z)&&Y?(m=document.querySelector(e),u=null,v=this.mergeOptions(a)):I&&B&&te?(m=document.querySelector(e),u=i,v=null):I&&B&&W?(m=document.querySelector(e),u=i,v=a):I&&B&&he?(m=document.querySelector(e),u=i,v=this._getOptionObject(a)):I&&B&&Y?(m=document.querySelector(e),u=i,v=this.mergeOptions(a)):T&&B&&W?(m=e,u=i,v=a):T&&B&&he?(m=e,u=i,v=this._getOptionObject(a)):T&&B&&Y?(m=e,u=i,v=this.mergeOptions(a)):n.throwError("The parameters given to the AutoNumeric object are not valid, '".concat(e,"', '").concat(i,"' and '").concat(a,"' given.")),n.isNull(m)&&n.throwError("The selector '".concat(e,"' did not select any valid DOM element. Please check on which element you called AutoNumeric.")),{domElement:m,initialValue:u,userOptions:v}}},{key:"mergeOptions",value:function(e){var i=this,a={};return e.forEach(function(m){le(a,i._getOptionObject(m))}),a}},{key:"_isPreDefinedOptionValid",value:function(e){return Object.prototype.hasOwnProperty.call(o.predefinedOptions,e)}},{key:"_getOptionObject",value:function(e){var i;return n.isString(e)?null==(i=o.getPredefinedOptions()[e])&&n.warning("The given pre-defined option [".concat(e,"] is not recognized by autoNumeric. Please check that pre-defined option name."),!0):i=e,i}},{key:"_doesFormHandlerListExists",value:function(){var e=ie(window.aNFormHandlerMap);return"undefined"!==e&&"object"===e}},{key:"_createFormHandlerList",value:function(){window.aNFormHandlerMap=new Map}},{key:"_checkValuesToStringsArray",value:function(e,i){return n.isInArray(String(e),i)}},{key:"_checkValuesToStringsSettings",value:function(e,i){return this._checkValuesToStringsArray(e,Object.keys(i.valuesToStrings))}},{key:"_checkStringsToValuesSettings",value:function(e,i){return this._checkValuesToStringsArray(e,Object.values(i.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 i=this,a=e.getElementsByTagName("input"),m=[];return Array.prototype.slice.call(a,0).forEach(function(v){i.test(v)&&m.push(v)}),m}},{key:"test",value:function(e){return this._isInGlobalList(n.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=ie(window[this.autoNumericGlobalListName]);return"undefined"!==e&&"object"===e}},{key:"_addToGlobalList",value:function(e){this._doesGlobalListExists()||this._createGlobalList();var i=e.node();if(this._isInGlobalList(i)){if(this._getFromGlobalList(i)===this)return;n.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(i,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,i,a){var m=!(1<arguments.length&&void 0!==i)||i,v=2<arguments.length&&void 0!==a?a:null;!n.isUndefinedOrNullOrEmpty(e)&&n.isObject(e)||n.throwError("The userOptions are invalid ; it should be a valid object, [".concat(e,"] given."));var u,T=n.isObject(v);T||n.isNull(v)||n.throwError("The 'originalOptions' parameter is invalid ; it should either be a valid option object or `null`, [".concat(e,"] given.")),n.isNull(e)||this._convertOldOptionsToNewOnes(e),u=m?le({},this.getDefaultConfig(),e):e,n.isTrueOrFalseString(u.showWarnings)||n.isBoolean(u.showWarnings)||n.throwError("The debug option 'showWarnings' is invalid ; it should be either 'true' or 'false', [".concat(u.showWarnings,"] given."));var I,j=/^[0-9]+$/,y=/[0-9]+/,B=/^-?[0-9]+(\.?[0-9]+)?$/,R=/^[0-9]+(\.?[0-9]+)?$/;n.isTrueOrFalseString(u.allowDecimalPadding)||n.isBoolean(u.allowDecimalPadding)||u.allowDecimalPadding===o.options.allowDecimalPadding.floats||n.throwError("The decimal padding option 'allowDecimalPadding' is invalid ; it should either be `false`, `true` or `'floats'`, [".concat(u.allowDecimalPadding,"] given.")),u.allowDecimalPadding!==o.options.allowDecimalPadding.never&&"false"!==u.allowDecimalPadding||u.decimalPlaces===o.options.decimalPlaces.none&&u.decimalPlacesShownOnBlur===o.options.decimalPlacesShownOnBlur.none&&u.decimalPlacesShownOnFocus===o.options.decimalPlacesShownOnFocus.none||n.warning("Setting 'allowDecimalPadding' to [".concat(u.allowDecimalPadding,"] will override the current 'decimalPlaces*' settings [").concat(u.decimalPlaces,", ").concat(u.decimalPlacesShownOnBlur," and ").concat(u.decimalPlacesShownOnFocus,"]."),u.showWarnings),n.isTrueOrFalseString(u.alwaysAllowDecimalCharacter)||n.isBoolean(u.alwaysAllowDecimalCharacter)||n.throwError("The option 'alwaysAllowDecimalCharacter' is invalid ; it should either be `true` or `false`, [".concat(u.alwaysAllowDecimalCharacter,"] given.")),n.isNull(u.caretPositionOnFocus)||n.isInArray(u.caretPositionOnFocus,[o.options.caretPositionOnFocus.start,o.options.caretPositionOnFocus.end,o.options.caretPositionOnFocus.decimalLeft,o.options.caretPositionOnFocus.decimalRight])||n.throwError("The display on empty string option 'caretPositionOnFocus' is invalid ; it should either be `null`, 'focus', 'press', 'always' or 'zero', [".concat(u.caretPositionOnFocus,"] given.")),I=T?v:this._correctCaretPositionOnFocusAndSelectOnFocusOptions(e),n.isNull(I)||I.caretPositionOnFocus===o.options.caretPositionOnFocus.doNoForceCaretPosition||I.selectOnFocus!==o.options.selectOnFocus.select||n.warning("The 'selectOnFocus' option is set to 'select', which is in conflict with the 'caretPositionOnFocus' which is set to '".concat(I.caretPositionOnFocus,"'. As a result, if this has been called when instantiating an AutoNumeric object, the 'selectOnFocus' option is forced to 'doNotSelect'."),u.showWarnings),n.isInArray(u.digitGroupSeparator,[o.options.digitGroupSeparator.comma,o.options.digitGroupSeparator.dot,o.options.digitGroupSeparator.normalSpace,o.options.digitGroupSeparator.thinSpace,o.options.digitGroupSeparator.narrowNoBreakSpace,o.options.digitGroupSeparator.noBreakSpace,o.options.digitGroupSeparator.noSeparator,o.options.digitGroupSeparator.apostrophe,o.options.digitGroupSeparator.arabicThousandsSeparator,o.options.digitGroupSeparator.dotAbove,o.options.digitGroupSeparator.privateUseTwo])||n.throwError("The thousand separator character option 'digitGroupSeparator' is invalid ; it should be ',', '.', '\u066c', '\u02d9', \"'\", '\x92', ' ', '\u2009', '\u202f', '\xa0' or empty (''), [".concat(u.digitGroupSeparator,"] given.")),n.isTrueOrFalseString(u.showOnlyNumbersOnFocus)||n.isBoolean(u.showOnlyNumbersOnFocus)||n.throwError("The 'showOnlyNumbersOnFocus' option is invalid ; it should be either 'true' or 'false', [".concat(u.showOnlyNumbersOnFocus,"] given.")),n.isInArray(u.digitalGroupSpacing,[o.options.digitalGroupSpacing.two,o.options.digitalGroupSpacing.twoScaled,o.options.digitalGroupSpacing.three,o.options.digitalGroupSpacing.four])||2<=u.digitalGroupSpacing&&u.digitalGroupSpacing<=4||n.throwError("The grouping separator option for thousands 'digitalGroupSpacing' is invalid ; it should be '2', '2s', '3', or '4', [".concat(u.digitalGroupSpacing,"] given.")),n.isInArray(u.decimalCharacter,[o.options.decimalCharacter.comma,o.options.decimalCharacter.dot,o.options.decimalCharacter.middleDot,o.options.decimalCharacter.arabicDecimalSeparator,o.options.decimalCharacter.decimalSeparatorKeySymbol])||n.throwError("The decimal separator character option 'decimalCharacter' is invalid ; it should be '.', ',', '\xb7', '\u2396' or '\u066b', [".concat(u.decimalCharacter,"] given.")),u.decimalCharacter===u.digitGroupSeparator&&n.throwError("autoNumeric will not function properly when the decimal character 'decimalCharacter' [".concat(u.decimalCharacter,"] and the thousand separator 'digitGroupSeparator' [").concat(u.digitGroupSeparator,"] are the same character.")),n.isNull(u.decimalCharacterAlternative)||n.isString(u.decimalCharacterAlternative)||n.throwError("The alternate decimal separator character option 'decimalCharacterAlternative' is invalid ; it should be a string, [".concat(u.decimalCharacterAlternative,"] given.")),""===u.currencySymbol||n.isString(u.currencySymbol)||n.throwError("The currency symbol option 'currencySymbol' is invalid ; it should be a string, [".concat(u.currencySymbol,"] given.")),n.isInArray(u.currencySymbolPlacement,[o.options.currencySymbolPlacement.prefix,o.options.currencySymbolPlacement.suffix])||n.throwError("The placement of the currency sign option 'currencySymbolPlacement' is invalid ; it should either be 'p' (prefix) or 's' (suffix), [".concat(u.currencySymbolPlacement,"] given.")),n.isInArray(u.negativePositiveSignPlacement,[o.options.negativePositiveSignPlacement.prefix,o.options.negativePositiveSignPlacement.suffix,o.options.negativePositiveSignPlacement.left,o.options.negativePositiveSignPlacement.right,o.options.negativePositiveSignPlacement.none])||n.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(u.negativePositiveSignPlacement,"] given.")),n.isTrueOrFalseString(u.showPositiveSign)||n.isBoolean(u.showPositiveSign)||n.throwError("The show positive sign option 'showPositiveSign' is invalid ; it should be either 'true' or 'false', [".concat(u.showPositiveSign,"] given.")),n.isString(u.suffixText)&&(""===u.suffixText||!n.isNegative(u.suffixText,u.negativeSignCharacter)&&!y.test(u.suffixText))||n.throwError("The additional suffix option 'suffixText' is invalid ; it should not contains the negative sign '".concat(u.negativeSignCharacter,"' nor any numerical characters, [").concat(u.suffixText,"] given.")),n.isString(u.negativeSignCharacter)&&1===u.negativeSignCharacter.length&&!n.isUndefinedOrNullOrEmpty(u.negativeSignCharacter)&&!y.test(u.negativeSignCharacter)||n.throwError("The negative sign character option 'negativeSignCharacter' is invalid ; it should be a single character, and cannot be any numerical characters, [".concat(u.negativeSignCharacter,"] given.")),n.isString(u.positiveSignCharacter)&&1===u.positiveSignCharacter.length&&!n.isUndefinedOrNullOrEmpty(u.positiveSignCharacter)&&!y.test(u.positiveSignCharacter)||n.throwError("The positive sign character option 'positiveSignCharacter' is invalid ; it should be a single character, and cannot be any numerical characters, [".concat(u.positiveSignCharacter,"] given.\nIf you want to hide the positive sign character, you need to set the `showPositiveSign` option to `true`.")),u.negativeSignCharacter===u.positiveSignCharacter&&n.throwError("The positive 'positiveSignCharacter' and negative 'negativeSignCharacter' sign characters cannot be identical ; [".concat(u.negativeSignCharacter,"] given."));var Z=K(n.isNull(u.negativeBracketsTypeOnBlur)?["",""]:u.negativeBracketsTypeOnBlur.split(","),2),z=Z[0],W=Z[1];(n.contains(u.digitGroupSeparator,u.negativeSignCharacter)||n.contains(u.decimalCharacter,u.negativeSignCharacter)||n.contains(u.decimalCharacterAlternative,u.negativeSignCharacter)||n.contains(z,u.negativeSignCharacter)||n.contains(W,u.negativeSignCharacter)||n.contains(u.suffixText,u.negativeSignCharacter))&&n.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(u.negativeSignCharacter,"] given.")),(n.contains(u.digitGroupSeparator,u.positiveSignCharacter)||n.contains(u.decimalCharacter,u.positiveSignCharacter)||n.contains(u.decimalCharacterAlternative,u.positiveSignCharacter)||n.contains(z,u.positiveSignCharacter)||n.contains(W,u.positiveSignCharacter)||n.contains(u.suffixText,u.positiveSignCharacter))&&n.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(u.positiveSignCharacter,"] given.")),n.isNull(u.overrideMinMaxLimits)||n.isInArray(u.overrideMinMaxLimits,[o.options.overrideMinMaxLimits.ceiling,o.options.overrideMinMaxLimits.floor,o.options.overrideMinMaxLimits.ignore,o.options.overrideMinMaxLimits.invalid])||n.throwError("The override min & max limits option 'overrideMinMaxLimits' is invalid ; it should either be 'ceiling', 'floor', 'ignore' or 'invalid', [".concat(u.overrideMinMaxLimits,"] given.")),u.overrideMinMaxLimits!==o.options.overrideMinMaxLimits.invalid&&u.overrideMinMaxLimits!==o.options.overrideMinMaxLimits.ignore&&(0<u.minimumValue||u.maximumValue<0)&&n.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."),n.isString(u.maximumValue)&&B.test(u.maximumValue)||n.throwError("The maximum possible value option 'maximumValue' is invalid ; it should be a string that represents a positive or negative number, [".concat(u.maximumValue,"] given.")),n.isString(u.minimumValue)&&B.test(u.minimumValue)||n.throwError("The minimum possible value option 'minimumValue' is invalid ; it should be a string that represents a positive or negative number, [".concat(u.minimumValue,"] given.")),parseFloat(u.minimumValue)>parseFloat(u.maximumValue)&&n.throwError("The minimum possible value option is greater than the maximum possible value option ; 'minimumValue' [".concat(u.minimumValue,"] should be smaller than 'maximumValue' [").concat(u.maximumValue,"].")),n.isInt(u.decimalPlaces)&&0<=u.decimalPlaces||n.isString(u.decimalPlaces)&&j.test(u.decimalPlaces)||n.throwError("The number of decimal places option 'decimalPlaces' is invalid ; it should be a positive integer, [".concat(u.decimalPlaces,"] given.")),n.isNull(u.decimalPlacesRawValue)||n.isInt(u.decimalPlacesRawValue)&&0<=u.decimalPlacesRawValue||n.isString(u.decimalPlacesRawValue)&&j.test(u.decimalPlacesRawValue)||n.throwError("The number of decimal places for the raw value option 'decimalPlacesRawValue' is invalid ; it should be a positive integer or `null`, [".concat(u.decimalPlacesRawValue,"] given.")),this._validateDecimalPlacesRawValue(u),n.isNull(u.decimalPlacesShownOnFocus)||j.test(String(u.decimalPlacesShownOnFocus))||n.throwError("The number of expanded decimal places option 'decimalPlacesShownOnFocus' is invalid ; it should be a positive integer or `null`, [".concat(u.decimalPlacesShownOnFocus,"] given.")),!n.isNull(u.decimalPlacesShownOnFocus)&&Number(u.decimalPlaces)>Number(u.decimalPlacesShownOnFocus)&&n.warning("The extended decimal places 'decimalPlacesShownOnFocus' [".concat(u.decimalPlacesShownOnFocus,"] should be greater than the 'decimalPlaces' [").concat(u.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?"),u.showWarnings),(n.isNull(u.divisorWhenUnfocused)||R.test(u.divisorWhenUnfocused))&&0!==u.divisorWhenUnfocused&&"0"!==u.divisorWhenUnfocused&&1!==u.divisorWhenUnfocused&&"1"!==u.divisorWhenUnfocused||n.throwError("The divisor option 'divisorWhenUnfocused' is invalid ; it should be a positive number higher than one, preferably an integer, [".concat(u.divisorWhenUnfocused,"] given.")),n.isNull(u.decimalPlacesShownOnBlur)||j.test(u.decimalPlacesShownOnBlur)||n.throwError("The number of decimals shown when unfocused option 'decimalPlacesShownOnBlur' is invalid ; it should be a positive integer or `null`, [".concat(u.decimalPlacesShownOnBlur,"] given.")),n.isNull(u.symbolWhenUnfocused)||n.isString(u.symbolWhenUnfocused)||n.throwError("The symbol to show when unfocused option 'symbolWhenUnfocused' is invalid ; it should be a string, [".concat(u.symbolWhenUnfocused,"] given.")),n.isTrueOrFalseString(u.saveValueToSessionStorage)||n.isBoolean(u.saveValueToSessionStorage)||n.throwError("The save to session storage option 'saveValueToSessionStorage' is invalid ; it should be either 'true' or 'false', [".concat(u.saveValueToSessionStorage,"] given.")),n.isInArray(u.onInvalidPaste,[o.options.onInvalidPaste.error,o.options.onInvalidPaste.ignore,o.options.onInvalidPaste.clamp,o.options.onInvalidPaste.truncate,o.options.onInvalidPaste.replace])||n.throwError("The paste behavior option 'onInvalidPaste' is invalid ; it should either be 'error', 'ignore', 'clamp', 'truncate' or 'replace' (cf. documentation), [".concat(u.onInvalidPaste,"] given.")),n.isInArray(u.roundingMethod,[o.options.roundingMethod.halfUpSymmetric,o.options.roundingMethod.halfUpAsymmetric,o.options.roundingMethod.halfDownSymmetric,o.options.roundingMethod.halfDownAsymmetric,o.options.roundingMethod.halfEvenBankersRounding,o.options.roundingMethod.upRoundAwayFromZero,o.options.roundingMethod.downRoundTowardZero,o.options.roundingMethod.toCeilingTowardPositiveInfinity,o.options.roundingMethod.toFloorTowardNegativeInfinity,o.options.roundingMethod.toNearest05,o.options.roundingMethod.toNearest05Alt,o.options.roundingMethod.upToNext05,o.options.roundingMethod.downToNext05])||n.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(u.roundingMethod,"] given.")),n.isNull(u.negativeBracketsTypeOnBlur)||n.isInArray(u.negativeBracketsTypeOnBlur,[o.options.negativeBracketsTypeOnBlur.parentheses,o.options.negativeBracketsTypeOnBlur.brackets,o.options.negativeBracketsTypeOnBlur.chevrons,o.options.negativeBracketsTypeOnBlur.curlyBraces,o.options.negativeBracketsTypeOnBlur.angleBrackets,o.options.negativeBracketsTypeOnBlur.japaneseQuotationMarks,o.options.negativeBracketsTypeOnBlur.halfBrackets,o.options.negativeBracketsTypeOnBlur.whiteSquareBrackets,o.options.negativeBracketsTypeOnBlur.quotationMarks,o.options.negativeBracketsTypeOnBlur.guillemets])||n.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(u.negativeBracketsTypeOnBlur,"] given.")),(n.isString(u.emptyInputBehavior)||n.isNumber(u.emptyInputBehavior))&&(n.isInArray(u.emptyInputBehavior,[o.options.emptyInputBehavior.focus,o.options.emptyInputBehavior.press,o.options.emptyInputBehavior.always,o.options.emptyInputBehavior.min,o.options.emptyInputBehavior.max,o.options.emptyInputBehavior.zero,o.options.emptyInputBehavior.null])||B.test(u.emptyInputBehavior))||n.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(u.emptyInputBehavior,"] given.")),u.emptyInputBehavior===o.options.emptyInputBehavior.zero&&(0<u.minimumValue||u.maximumValue<0)&&n.throwError("The 'emptyInputBehavior' option is set to 'zero', but this value is outside of the range defined by 'minimumValue' and 'maximumValue' [".concat(u.minimumValue,", ").concat(u.maximumValue,"].")),B.test(String(u.emptyInputBehavior))&&(this._isWithinRangeWithOverrideOption(u.emptyInputBehavior,u)||n.throwError("The 'emptyInputBehavior' option is set to a number or a string that represents a number, but its value [".concat(u.emptyInputBehavior,"] is outside of the range defined by the 'minimumValue' and 'maximumValue' options [").concat(u.minimumValue,", ").concat(u.maximumValue,"]."))),n.isTrueOrFalseString(u.eventBubbles)||n.isBoolean(u.eventBubbles)||n.throwError("The event bubbles option 'eventBubbles' is invalid ; it should be either 'true' or 'false', [".concat(u.eventBubbles,"] given.")),n.isTrueOrFalseString(u.eventIsCancelable)||n.isBoolean(u.eventIsCancelable)||n.throwError("The event is cancelable option 'eventIsCancelable' is invalid ; it should be either 'true' or 'false', [".concat(u.eventIsCancelable,"] given.")),!n.isBoolean(u.invalidClass)&&/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/.test(u.invalidClass)||n.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(u.invalidClass,"] given.")),n.isInArray(u.leadingZero,[o.options.leadingZero.allow,o.options.leadingZero.deny,o.options.leadingZero.keep])||n.throwError("The leading zero behavior option 'leadingZero' is invalid ; it should either be 'allow', 'deny' or 'keep', [".concat(u.leadingZero,"] given.")),n.isTrueOrFalseString(u.formatOnPageLoad)||n.isBoolean(u.formatOnPageLoad)||n.throwError("The format on initialization option 'formatOnPageLoad' is invalid ; it should be either 'true' or 'false', [".concat(u.formatOnPageLoad,"] given.")),n.isTrueOrFalseString(u.formulaMode)||n.isBoolean(u.formulaMode)||n.throwError("The formula mode option 'formulaMode' is invalid ; it should be either 'true' or 'false', [".concat(u.formulaMode,"] given.")),j.test(u.historySize)&&0!==u.historySize||n.throwError("The history size option 'historySize' is invalid ; it should be a positive integer, [".concat(u.historySize,"] given.")),n.isTrueOrFalseString(u.selectNumberOnly)||n.isBoolean(u.selectNumberOnly)||n.throwError("The select number only option 'selectNumberOnly' is invalid ; it should be either 'true' or 'false', [".concat(u.selectNumberOnly,"] given.")),n.isTrueOrFalseString(u.selectOnFocus)||n.isBoolean(u.selectOnFocus)||n.throwError("The select on focus option 'selectOnFocus' is invalid ; it should be either 'true' or 'false', [".concat(u.selectOnFocus,"] given.")),n.isNull(u.defaultValueOverride)||""===u.defaultValueOverride||B.test(u.defaultValueOverride)||n.throwError("The unformatted default value option 'defaultValueOverride' is invalid ; it should be a string that represents a positive or negative number, [".concat(u.defaultValueOverride,"] given.")),n.isTrueOrFalseString(u.unformatOnSubmit)||n.isBoolean(u.unformatOnSubmit)||n.throwError("The remove formatting on submit option 'unformatOnSubmit' is invalid ; it should be either 'true' or 'false', [".concat(u.unformatOnSubmit,"] given.")),n.isNull(u.valuesToStrings)||n.isObject(u.valuesToStrings)||n.throwError("The option 'valuesToStrings' is invalid ; it should be an object, ideally with 'key -> value' entries, [".concat(u.valuesToStrings,"] given.")),n.isNull(u.outputFormat)||n.isInArray(u.outputFormat,[o.options.outputFormat.string,o.options.outputFormat.number,o.options.outputFormat.dot,o.options.outputFormat.negativeDot,o.options.outputFormat.comma,o.options.outputFormat.negativeComma,o.options.outputFormat.dotNegative,o.options.outputFormat.commaNegative])||n.throwError("The custom locale format option 'outputFormat' is invalid ; it should either be null, 'string', 'number', '.', '-.', ',', '-,', '.-' or ',-', [".concat(u.outputFormat,"] given.")),n.isTrueOrFalseString(u.isCancellable)||n.isBoolean(u.isCancellable)||n.throwError("The cancellable behavior option 'isCancellable' is invalid ; it should be either 'true' or 'false', [".concat(u.isCancellable,"] given.")),n.isTrueOrFalseString(u.modifyValueOnWheel)||n.isBoolean(u.modifyValueOnWheel)||n.throwError("The increment/decrement on mouse wheel option 'modifyValueOnWheel' is invalid ; it should be either 'true' or 'false', [".concat(u.modifyValueOnWheel,"] given.")),n.isTrueOrFalseString(u.watchExternalChanges)||n.isBoolean(u.watchExternalChanges)||n.throwError("The option 'watchExternalChanges' is invalid ; it should be either 'true' or 'false', [".concat(u.watchExternalChanges,"] given.")),n.isInArray(u.wheelOn,[o.options.wheelOn.focus,o.options.wheelOn.hover])||n.throwError("The wheel behavior option 'wheelOn' is invalid ; it should either be 'focus' or 'hover', [".concat(u.wheelOn,"] given.")),(n.isString(u.wheelStep)||n.isNumber(u.wheelStep))&&("progressive"===u.wheelStep||R.test(u.wheelStep))&&0!==Number(u.wheelStep)||n.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(u.wheelStep,"] given.")),n.isInArray(u.serializeSpaces,[o.options.serializeSpaces.plus,o.options.serializeSpaces.percent])||n.throwError("The space replacement character option 'serializeSpaces' is invalid ; it should either be '+' or '%20', [".concat(u.serializeSpaces,"] given.")),n.isTrueOrFalseString(u.noEventListeners)||n.isBoolean(u.noEventListeners)||n.throwError("The option 'noEventListeners' that prevent the creation of event listeners is invalid ; it should be either 'true' or 'false', [".concat(u.noEventListeners,"] given.")),n.isNull(u.styleRules)||n.isObject(u.styleRules)&&(Object.prototype.hasOwnProperty.call(u.styleRules,"positive")||Object.prototype.hasOwnProperty.call(u.styleRules,"negative")||Object.prototype.hasOwnProperty.call(u.styleRules,"ranges")||Object.prototype.hasOwnProperty.call(u.styleRules,"userDefined"))||n.throwError("The option 'styleRules' is invalid ; it should be a correctly structured object, with one or more 'positive', 'negative', 'ranges' or 'userDefined' attributes, [".concat(u.styleRules,"] given.")),n.isNull(u.styleRules)||!Object.prototype.hasOwnProperty.call(u.styleRules,"userDefined")||n.isNull(u.styleRules.userDefined)||u.styleRules.userDefined.forEach(function(Y){Object.prototype.hasOwnProperty.call(Y,"callback")&&!n.isFunction(Y.callback)&&n.throwError("The callback defined in the `userDefined` attribute is not a function, ".concat(ie(Y.callback)," given."))}),(n.isNull(u.rawValueDivisor)||R.test(u.rawValueDivisor))&&0!==u.rawValueDivisor&&"0"!==u.rawValueDivisor&&1!==u.rawValueDivisor&&"1"!==u.rawValueDivisor||n.throwError("The raw value divisor option 'rawValueDivisor' is invalid ; it should be a positive number higher than one, preferably an integer, [".concat(u.rawValueDivisor,"] given.")),n.isTrueOrFalseString(u.readOnly)||n.isBoolean(u.readOnly)||n.throwError("The option 'readOnly' is invalid ; it should be either 'true' or 'false', [".concat(u.readOnly,"] given.")),n.isTrueOrFalseString(u.unformatOnHover)||n.isBoolean(u.unformatOnHover)||n.throwError("The option 'unformatOnHover' is invalid ; it should be either 'true' or 'false', [".concat(u.unformatOnHover,"] given.")),n.isTrueOrFalseString(u.failOnUnknownOption)||n.isBoolean(u.failOnUnknownOption)||n.throwError("The debug option 'failOnUnknownOption' is invalid ; it should be either 'true' or 'false', [".concat(u.failOnUnknownOption,"] given.")),n.isTrueOrFalseString(u.createLocalList)||n.isBoolean(u.createLocalList)||n.throwError("The debug option 'createLocalList' is invalid ; it should be either 'true' or 'false', [".concat(u.createLocalList,"] given."))}},{key:"_validateDecimalPlacesRawValue",value:function(e){n.isNull(e.decimalPlacesRawValue)||(e.decimalPlacesRawValue<e.decimalPlaces&&n.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&&n.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&&n.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 i=!0;try{this.validate(e,!0)}catch{i=!1}return i}},{key:"getDefaultConfig",value:function(){return o.defaultSettings}},{key:"getPredefinedOptions",value:function(){return o.predefinedOptions}},{key:"_generateOptionsObjectFromOptionsArray",value:function(e){var i,a=this;return n.isUndefinedOrNullOrEmpty(e)||0===e.length?i=null:(i={},1===e.length&&Array.isArray(e[0])?e[0].forEach(function(m){le(i,a._getOptionObject(m))}):1<=e.length&&e.forEach(function(m){le(i,a._getOptionObject(m))})),i}},{key:"format",value:function(e){if(n.isUndefined(e)||null===e)return null;var i;i=n.isElement(e)?n.getElementValue(e):e,n.isString(i)||n.isNumber(i)||n.throwError('The value "'.concat(i,'" being "set" is not numeric and therefore cannot be used appropriately.'));for(var a=arguments.length,m=new Array(1<a?a-1:0),v=1;v<a;v++)m[v-1]=arguments[v];var u=this._generateOptionsObjectFromOptionsArray(m),T=le({},this.getDefaultConfig(),u);T.isNegativeSignAllowed=i<0,T.isPositiveSignAllowed=0<=i,this._setBrackets(T),this._cachesUsualRegularExpressions(T,{});var I=this._toNumericValue(i,T);return isNaN(Number(I))&&n.throwError("The value [".concat(I,"] that you are trying to format is not a recognized number.")),this._isWithinRangeWithOverrideOption(I,T)||(n.triggerEvent(o.events.formatted,document,{oldValue:null,newValue:null,oldRawValue:null,newRawValue:null,isPristine:null,error:"Range test failed",aNElement:null},!0,!0),n.throwError("The value [".concat(I,"] being set falls outside of the minimumValue [").concat(T.minimumValue,"] and maximumValue [").concat(T.maximumValue,"] range set for this element"))),T.valuesToStrings&&this._checkValuesToStringsSettings(i,T)?T.valuesToStrings[i]:(this._correctNegativePositiveSignPlacementOption(T),this._calculateDecimalPlacesOnInit(T),n.isUndefinedOrNullOrEmpty(T.rawValueDivisor)||0===T.rawValueDivisor||""===I||null===I||(I*=T.rawValueDivisor),I=this._roundFormattedValueShownOnFocus(I,T),I=this._modifyNegativeSignAndDecimalCharacterForFormattedValue(I,T),I=this._addGroupSeparators(I,T,!1,I))}},{key:"formatAndSet",value:function(e,i){var m=this.format(e,1<arguments.length&&void 0!==i?i:null);return n.setElementValue(e,m),m}},{key:"unformat",value:function(e){if(n.isNumberStrict(e))return e;var i;if(""===(i=n.isElement(e)?n.getElementValue(e):e))return"";if(n.isUndefined(i)||null===i)return null;(n.isArray(i)||n.isObject(i))&&n.throwError("A number or a string representing a number is needed to be able to unformat it, [".concat(i,"] given."));for(var a=arguments.length,m=new Array(1<a?a-1:0),v=1;v<a;v++)m[v-1]=arguments[v];var u=this._generateOptionsObjectFromOptionsArray(m),T=le({},this.getDefaultConfig(),u);if(T.isNegativeSignAllowed=!1,T.isPositiveSignAllowed=!0,i=i.toString(),T.valuesToStrings&&this._checkStringsToValuesSettings(i,T))return n.objectKeyLookup(T.valuesToStrings,i);if(n.isNegative(i,T.negativeSignCharacter))T.isNegativeSignAllowed=!0,T.isPositiveSignAllowed=!1;else if(!n.isNull(T.negativeBracketsTypeOnBlur)){var I=K(T.negativeBracketsTypeOnBlur.split(","),2);T.firstBracket=I[0],T.lastBracket=I[1],i.charAt(0)===T.firstBracket&&i.charAt(i.length-1)===T.lastBracket&&(T.isNegativeSignAllowed=!0,T.isPositiveSignAllowed=!1,i=this._removeBrackets(i,T,!1))}return i=this._convertToNumericString(i,T),new RegExp("[^+-0123456789.]","gi").test(i)?NaN:(this._correctNegativePositiveSignPlacementOption(T),T.originalDecimalPlacesRawValue=T.decimalPlacesRawValue?T.decimalPlacesRawValue:T.decimalPlaces,this._calculateDecimalPlacesOnInit(T),n.isUndefinedOrNullOrEmpty(T.rawValueDivisor)||0===T.rawValueDivisor||""===i||null===i||(i/=T.rawValueDivisor),i=(i=this._roundRawValue(i,T)).replace(T.decimalCharacter,"."),i=this._toLocale(i,T.outputFormat,T))}},{key:"unformatAndSet",value:function(e,i){var m=this.unformat(e,1<arguments.length&&void 0!==i?i:null);return n.setElementValue(e,m),m}},{key:"localize",value:function(e,i){var a,m,v=1<arguments.length&&void 0!==i?i:null;return""===(a=n.isElement(e)?n.getElementValue(e):e)?"":(n.isNull(v)&&(v=o.defaultSettings),a=this.unformat(a,v),0===Number(a)&&v.leadingZero!==o.options.leadingZero.keep&&(a="0"),m=n.isNull(v)?v.outputFormat:o.defaultSettings.outputFormat,this._toLocale(a,m,v))}},{key:"localizeAndSet",value:function(e,i){var m=this.localize(e,1<arguments.length&&void 0!==i?i:null);return n.setElementValue(e,m),m}},{key:"isManagedByAutoNumeric",value:function(e){return this._isInGlobalList(n.domElement(e))}},{key:"getAutoNumericElement",value:function(e){var i=n.domElement(e);return this.isManagedByAutoNumeric(i)?this._getFromGlobalList(i):null}},{key:"set",value:function(e,i,a,m){var v,u=2<arguments.length&&void 0!==a?a:null,T=!(3<arguments.length&&void 0!==m)||m,I=n.domElement(e);return this.isManagedByAutoNumeric(I)?this.getAutoNumericElement(I).set(i,u,T):(v=!(!n.isNull(u)&&Object.prototype.hasOwnProperty.call(u,"showWarnings"))||u.showWarnings,n.warning("Impossible to find an AutoNumeric object for the given DOM element or selector.",v),null)}},{key:"getNumericString",value:function(e,i){return this._get(e,"getNumericString",1<arguments.length&&void 0!==i?i:null)}},{key:"getFormatted",value:function(e,i){return this._get(e,"getFormatted",1<arguments.length&&void 0!==i?i:null)}},{key:"getNumber",value:function(e,i){return this._get(e,"getNumber",1<arguments.length&&void 0!==i?i:null)}},{key:"_get",value:function(e,i,a){var m=2<arguments.length&&void 0!==a?a:null,v=n.domElement(e);return this.isManagedByAutoNumeric(v)||n.throwError("Impossible to find an AutoNumeric object for the given DOM element or selector."),this.getAutoNumericElement(v)[i](m)}},{key:"getLocalized",value:function(e,i,a){var m=1<arguments.length&&void 0!==i?i:null,v=2<arguments.length&&void 0!==a?a:null,u=n.domElement(e);return this.isManagedByAutoNumeric(u)||n.throwError("Impossible to find an AutoNumeric object for the given DOM element or selector."),this.getAutoNumericElement(u).getLocalized(m,v)}},{key:"_stripAllNonNumberCharacters",value:function(e,i,a,m){return this._stripAllNonNumberCharactersExceptCustomDecimalChar(e,i,a,m).replace(i.decimalCharacter,".")}},{key:"_stripAllNonNumberCharactersExceptCustomDecimalChar",value:function(e,i,a,m){var v=(e=(e=this._normalizeCurrencySuffixAndNegativeSignCharacters(e,i)).replace(i.allowedAutoStrip,"")).match(i.numRegAutoStrip);if(e=v?[v[1],v[2],v[3]].join(""):"",i.leadingZero===o.options.leadingZero.allow||i.leadingZero===o.options.leadingZero.keep){var u="",T=K(e.split(i.decimalCharacter),2),j=T[1],y=T[0];n.contains(y,i.negativeSignCharacter)&&(u=i.negativeSignCharacter,y=y.replace(i.negativeSignCharacter,"")),""===u&&y.length>i.mIntPos&&"0"===y.charAt(0)&&(y=y.slice(1)),""!==u&&y.length>i.mIntNeg&&"0"===y.charAt(0)&&(y=y.slice(1)),e="".concat(u).concat(y).concat(n.isUndefined(j)?"":i.decimalCharacter+j)}return(a&&i.leadingZero===o.options.leadingZero.deny||!m&&i.leadingZero===o.options.leadingZero.allow)&&(e=e.replace(i.stripReg,"$1$2")),e}},{key:"_toggleNegativeBracket",value:function(e,i,a){return a?this._removeBrackets(e,i):this._addBrackets(e,i)}},{key:"_addBrackets",value:function(e,i){return n.isNull(i.negativeBracketsTypeOnBlur)?e:"".concat(i.firstBracket).concat(e.replace(i.negativeSignCharacter,"")).concat(i.lastBracket)}},{key:"_removeBrackets",value:function(e,i,a){var m,v=!(2<arguments.length&&void 0!==a)||a;return n.isNull(i.negativeBracketsTypeOnBlur)||e.charAt(0)!==i.firstBracket?e:(m=(m=e.replace(i.firstBracket,"")).replace(i.lastBracket,""),v?(m=m.replace(i.currencySymbol,""),this._mergeCurrencySignNegativePositiveSignAndValue(m,i,!0,!1)):"".concat(i.negativeSignCharacter).concat(m))}},{key:"_setBrackets",value:function(e){if(n.isNull(e.negativeBracketsTypeOnBlur))e.firstBracket="",e.lastBracket="";else{var i=K(e.negativeBracketsTypeOnBlur.split(","),2),m=i[1];e.firstBracket=i[0],e.lastBracket=m}}},{key:"_convertToNumericString",value:function(e,i){e=this._removeBrackets(e,i,!1),e=(e=this._normalizeCurrencySuffixAndNegativeSignCharacters(e,i)).replace(new RegExp("[".concat(i.digitGroupSeparator,"]"),"g"),""),"."!==i.decimalCharacter&&(e=e.replace(i.decimalCharacter,".")),n.isNegative(e)&&e.lastIndexOf("-")===e.length-1&&(e=e.replace("-",""),e="-".concat(e)),i.showPositiveSign&&(e=e.replace(i.positiveSignCharacter,""));var m=n.arabicToLatinNumbers(e,i.leadingZero!==o.options.leadingZero.keep,!1,!1);return isNaN(m)||(e=m.toString()),e}},{key:"_normalizeCurrencySuffixAndNegativeSignCharacters",value:function(e,i){return e=String(e),i.currencySymbol!==o.options.currencySymbol.none&&(e=e.replace(i.currencySymbol,"")),i.suffixText!==o.options.suffixText.none&&(e=e.replace(i.suffixText,"")),i.negativeSignCharacter!==o.options.negativeSignCharacter.hyphen&&(e=e.replace(i.negativeSignCharacter,"-")),e}},{key:"_toLocale",value:function(e,i,a){if(n.isNull(i)||i===o.options.outputFormat.string)return e;var m;switch(i){case o.options.outputFormat.number:m=Number(e);break;case o.options.outputFormat.dotNegative:m=n.isNegative(e)?e.replace("-","")+"-":e;break;case o.options.outputFormat.comma:case o.options.outputFormat.negativeComma:m=e.replace(".",",");break;case o.options.outputFormat.commaNegative:m=e.replace(".",","),m=n.isNegative(m)?m.replace("-","")+"-":m;break;case o.options.outputFormat.dot:case o.options.outputFormat.negativeDot:m=e;break;default:n.throwError("The given outputFormat [".concat(i,"] option is not recognized."))}return i!==o.options.outputFormat.number&&"-"!==a.negativeSignCharacter&&(m=m.replace("-",a.negativeSignCharacter)),m}},{key:"_modifyNegativeSignAndDecimalCharacterForFormattedValue",value:function(e,i){return"-"!==i.negativeSignCharacter&&(e=e.replace("-",i.negativeSignCharacter)),"."!==i.decimalCharacter&&(e=e.replace(".",i.decimalCharacter)),e}},{key:"_isElementValueEmptyOrOnlyTheNegativeSign",value:function(e,i){return""===e||e===i.negativeSignCharacter}},{key:"_orderValueCurrencySymbolAndSuffixText",value:function(e,i,a){var m;if(i.emptyInputBehavior===o.options.emptyInputBehavior.always||a)switch(i.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.left:case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.none:m=e+i.currencySymbol+i.suffixText;break;default:m=i.currencySymbol+e+i.suffixText}else m=e;return m}},{key:"_addGroupSeparators",value:function(e,i,a,m,v){var u,T=4<arguments.length&&void 0!==v?v:null;if(u=n.isNull(T)?n.isNegative(e,i.negativeSignCharacter)||n.isNegativeWithBrackets(e,i.firstBracket,i.lastBracket):T<0,e=this._stripAllNonNumberCharactersExceptCustomDecimalChar(e,i,!1,a),this._isElementValueEmptyOrOnlyTheNegativeSign(e,i))return this._orderValueCurrencySymbolAndSuffixText(e,i,!0);var I,j=n.isZeroOrHasNoValue(e);switch(u&&(e=e.replace("-","")),i.digitalGroupSpacing=i.digitalGroupSpacing.toString(),i.digitalGroupSpacing){case o.options.digitalGroupSpacing.two:I=/(\d)((\d)(\d{2}?)+)$/;break;case o.options.digitalGroupSpacing.twoScaled:I=/(\d)((?:\d{2}){0,2}\d{3}(?:(?:\d{2}){2}\d{3})*?)$/;break;case o.options.digitalGroupSpacing.four:I=/(\d)((\d{4}?)+)$/;break;default:I=/(\d)((\d{3}?)+)$/}var y,B=K(e.split(i.decimalCharacter),2),R=B[0],Z=B[1];if(i.decimalCharacterAlternative&&n.isUndefined(Z)){var z=K(e.split(i.decimalCharacterAlternative),2);R=z[0],Z=z[1]}if(""!==i.digitGroupSeparator)for(;I.test(R);)R=R.replace(I,"$1".concat(i.digitGroupSeparator,"$2"));return e=0===(y=a?i.decimalPlacesShownOnFocus:i.decimalPlacesShownOnBlur)||n.isUndefined(Z)?R:(Z.length>y&&(Z=Z.substring(0,y)),"".concat(R).concat(i.decimalCharacter).concat(Z)),e=o._mergeCurrencySignNegativePositiveSignAndValue(e,i,u,j),n.isNull(T)&&(T=m),null!==i.negativeBracketsTypeOnBlur&&(T<0||n.isNegativeStrict(e,i.negativeSignCharacter))&&(e=this._toggleNegativeBracket(e,i,a)),i.suffixText?"".concat(e).concat(i.suffixText):e}},{key:"_mergeCurrencySignNegativePositiveSignAndValue",value:function(e,i,a,m){var v,u="";if(a?u=i.negativeSignCharacter:i.showPositiveSign&&!m&&(u=i.positiveSignCharacter),i.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix)if(i.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(a||!a&&i.showPositiveSign&&!m))switch(i.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.left:v="".concat(u).concat(i.currencySymbol).concat(e);break;case o.options.negativePositiveSignPlacement.right:v="".concat(i.currencySymbol).concat(u).concat(e);break;case o.options.negativePositiveSignPlacement.suffix:v="".concat(i.currencySymbol).concat(e).concat(u)}else v=i.currencySymbol+e;else if(i.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix)if(i.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(a||!a&&i.showPositiveSign&&!m))switch(i.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.suffix:case o.options.negativePositiveSignPlacement.right:v="".concat(e).concat(i.currencySymbol).concat(u);break;case o.options.negativePositiveSignPlacement.left:v="".concat(e).concat(u).concat(i.currencySymbol);break;case o.options.negativePositiveSignPlacement.prefix:v="".concat(u).concat(e).concat(i.currencySymbol)}else v=e+i.currencySymbol;return v}},{key:"_truncateZeros",value:function(e,i){var a;switch(i){case 0:a=/(\.(?:\d*[1-9])?)0*$/;break;case 1:a=/(\.\d(?:\d*[1-9])?)0*$/;break;default:a=new RegExp("(\\.\\d{".concat(i,"}(?:\\d*[1-9])?)0*"))}return e=e.replace(a,"$1"),0===i&&(e=e.replace(/\.$/,"")),e}},{key:"_roundRawValue",value:function(e,i){return this._roundValue(e,i,i.decimalPlacesRawValue)}},{key:"_roundFormattedValueShownOnFocus",value:function(e,i){return this._roundValue(e,i,Number(i.decimalPlacesShownOnFocus))}},{key:"_roundFormattedValueShownOnBlur",value:function(e,i){return this._roundValue(e,i,Number(i.decimalPlacesShownOnBlur))}},{key:"_roundFormattedValueShownOnFocusOrBlur",value:function(e,i,a){return a?this._roundFormattedValueShownOnFocus(e,i):this._roundFormattedValueShownOnBlur(e,i)}},{key:"_roundValue",value:function(e,i,a){if(n.isNull(e))return e;if(e=""===e?"0":e.toString(),i.roundingMethod===o.options.roundingMethod.toNearest05||i.roundingMethod===o.options.roundingMethod.toNearest05Alt||i.roundingMethod===o.options.roundingMethod.upToNext05||i.roundingMethod===o.options.roundingMethod.downToNext05)return this._roundCloseTo05(e,i);var m,v=K(o._prepareValueForRounding(e,i),2),u=v[0],T=(e=v[1]).lastIndexOf("."),I=-1===T,j=K(e.split("."),2),y=j[0];if(!(0<j[1]||i.allowDecimalPadding!==o.options.allowDecimalPadding.never&&i.allowDecimalPadding!==o.options.allowDecimalPadding.floats))return 0===Number(e)?y:"".concat(u).concat(y);m=i.allowDecimalPadding===o.options.allowDecimalPadding.always||i.allowDecimalPadding===o.options.allowDecimalPadding.floats?a:0;var B,Z=e.length-1-(I?e.length-1:T),z="";if(Z<=a){if(z=e,Z<m){I&&(z="".concat(z).concat(i.decimalCharacter));for(var W="000000";Z<m;)z+=W=W.substring(0,m-Z),Z+=W.length}else m<Z?z=this._truncateZeros(z,m):0===Z&&0===m&&(z=z.replace(/\.$/,""));return 0===Number(z)?z:"".concat(u).concat(z)}B=I?a-1:Number(a)+Number(T);var Y,te=Number(e.charAt(B+1)),he=e.substring(0,B+1).split("");if(Y="."===e.charAt(B)?e.charAt(B-1)%2:e.charAt(B)%2,this._shouldRoundUp(te,i,u,Y))for(var oe=he.length-1;0<=oe;--oe)if("."!==he[oe]){if(he[oe]=+he[oe]+1,he[oe]<10)break;0<oe&&(he[oe]="0")}return he=he.slice(0,B+1),z=this._truncateZeros(he.join(""),m),0===Number(z)?z:"".concat(u).concat(z)}},{key:"_roundCloseTo05",value:function(e,i){switch(i.roundingMethod){case o.options.roundingMethod.toNearest05:case o.options.roundingMethod.toNearest05Alt:e=(Math.round(20*e)/20).toString();break;case o.options.roundingMethod.upToNext05:e=(Math.ceil(20*e)/20).toString();break;default:e=(Math.floor(20*e)/20).toString()}return n.contains(e,".")?e.length-e.indexOf(".")<3?e+"0":e:e+".00"}},{key:"_prepareValueForRounding",value:function(e,i){var a="";return n.isNegativeStrict(e,"-")&&(a="-",e=e.replace("-","")),e.match(/^\d/)||(e="0".concat(e)),0===Number(e)&&(a=""),(0<Number(e)&&i.leadingZero!==o.options.leadingZero.keep||0<e.length&&i.leadingZero===o.options.leadingZero.allow)&&(e=e.replace(/^0*(\d)/,"$1")),[a,e]}},{key:"_shouldRoundUp",value:function(e,i,a,m){return 4<e&&i.roundingMethod===o.options.roundingMethod.halfUpSymmetric||4<e&&i.roundingMethod===o.options.roundingMethod.halfUpAsymmetric&&""===a||5<e&&i.roundingMethod===o.options.roundingMethod.halfUpAsymmetric&&"-"===a||5<e&&i.roundingMethod===o.options.roundingMethod.halfDownSymmetric||5<e&&i.roundingMethod===o.options.roundingMethod.halfDownAsymmetric&&""===a||4<e&&i.roundingMethod===o.options.roundingMethod.halfDownAsymmetric&&"-"===a||5<e&&i.roundingMethod===o.options.roundingMethod.halfEvenBankersRounding||5===e&&i.roundingMethod===o.options.roundingMethod.halfEvenBankersRounding&&1===m||0<e&&i.roundingMethod===o.options.roundingMethod.toCeilingTowardPositiveInfinity&&""===a||0<e&&i.roundingMethod===o.options.roundingMethod.toFloorTowardNegativeInfinity&&"-"===a||0<e&&i.roundingMethod===o.options.roundingMethod.upRoundAwayFromZero}},{key:"_truncateDecimalPlaces",value:function(e,i,a,m){a&&(e=this._roundFormattedValueShownOnFocus(e,i));var v=K(e.split(i.decimalCharacter),2),u=v[0],T=v[1];if(T&&T.length>m)if(0<m){var I=T.substring(0,m);e="".concat(u).concat(i.decimalCharacter).concat(I)}else e=u;return e}},{key:"_checkIfInRangeWithOverrideOption",value:function(e,i){if(n.isNull(e)&&i.emptyInputBehavior===o.options.emptyInputBehavior.null||i.overrideMinMaxLimits===o.options.overrideMinMaxLimits.ignore||i.overrideMinMaxLimits===o.options.overrideMinMaxLimits.invalid)return[!0,!0];e=(e=e.toString()).replace(",",".");var a,m=n.parseStr(i.minimumValue),v=n.parseStr(i.maximumValue),u=n.parseStr(e);switch(i.overrideMinMaxLimits){case o.options.overrideMinMaxLimits.floor:a=[-1<n.testMinMax(m,u),!0];break;case o.options.overrideMinMaxLimits.ceiling:a=[!0,n.testMinMax(v,u)<1];break;default:a=[-1<n.testMinMax(m,u),n.testMinMax(v,u)<1]}return a}},{key:"_isWithinRangeWithOverrideOption",value:function(e,i){var a=K(this._checkIfInRangeWithOverrideOption(e,i),2);return a[0]&&a[1]}},{key:"_cleanValueForRangeParse",value:function(e){return e=e.toString().replace(",","."),n.parseStr(e)}},{key:"_isMinimumRangeRespected",value:function(e,i){return-1<n.testMinMax(n.parseStr(i.minimumValue),this._cleanValueForRangeParse(e))}},{key:"_isMaximumRangeRespected",value:function(e,i){return n.testMinMax(n.parseStr(i.maximumValue),this._cleanValueForRangeParse(e))<1}},{key:"_readCookie",value:function(e){for(var i=e+"=",a=document.cookie.split(";"),m="",v=0;v<a.length;v+=1){for(m=a[v];" "===m.charAt(0);)m=m.substring(1,m.length);if(0===m.indexOf(i))return m.substring(i.length,m.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(n.isNull(e.negativePositiveSignPlacement))if(n.isUndefined(e)||!n.isUndefinedOrNullOrEmpty(e.negativePositiveSignPlacement)||n.isUndefinedOrNullOrEmpty(e.currencySymbol))e.negativePositiveSignPlacement=o.options.negativePositiveSignPlacement.left;else switch(e.currencySymbolPlacement){case o.options.currencySymbolPlacement.suffix:e.negativePositiveSignPlacement=o.options.negativePositiveSignPlacement.prefix;break;case o.options.currencySymbolPlacement.prefix:e.negativePositiveSignPlacement=o.options.negativePositiveSignPlacement.left}}},{key:"_correctCaretPositionOnFocusAndSelectOnFocusOptions",value:function(e){return n.isNull(e)?null:(!n.isUndefinedOrNullOrEmpty(e.caretPositionOnFocus)&&n.isUndefinedOrNullOrEmpty(e.selectOnFocus)&&(e.selectOnFocus=o.options.selectOnFocus.doNotSelect),n.isUndefinedOrNullOrEmpty(e.caretPositionOnFocus)&&!n.isUndefinedOrNullOrEmpty(e.selectOnFocus)&&e.selectOnFocus===o.options.selectOnFocus.select&&(e.caretPositionOnFocus=o.options.caretPositionOnFocus.doNoForceCaretPosition),e)}},{key:"_calculateDecimalPlacesOnInit",value:function(e){this._validateDecimalPlacesRawValue(e),e.decimalPlacesShownOnFocus===o.options.decimalPlacesShownOnFocus.useDefault&&(e.decimalPlacesShownOnFocus=e.decimalPlaces),e.decimalPlacesShownOnBlur===o.options.decimalPlacesShownOnBlur.useDefault&&(e.decimalPlacesShownOnBlur=e.decimalPlaces),e.decimalPlacesRawValue===o.options.decimalPlacesRawValue.useDefault&&(e.decimalPlacesRawValue=e.decimalPlaces);var i=0;e.rawValueDivisor&&e.rawValueDivisor!==o.options.rawValueDivisor.none&&(i=String(e.rawValueDivisor).length-1)<0&&(i=0),e.decimalPlacesRawValue=Math.max(Math.max(e.decimalPlacesShownOnBlur,e.decimalPlacesShownOnFocus)+i,Number(e.originalDecimalPlacesRawValue)+i)}},{key:"_calculateDecimalPlacesOnUpdate",value:function(e,i){var a=1<arguments.length&&void 0!==i?i:null;this._validateDecimalPlacesRawValue(e),n.isNull(a)&&n.throwError("When updating the settings, the previous ones should be passed as an argument.");var m="decimalPlaces"in e;if(m||"decimalPlacesRawValue"in e||"decimalPlacesShownOnFocus"in e||"decimalPlacesShownOnBlur"in e||"rawValueDivisor"in e){m?("decimalPlacesShownOnFocus"in e&&e.decimalPlacesShownOnFocus!==o.options.decimalPlacesShownOnFocus.useDefault||(e.decimalPlacesShownOnFocus=e.decimalPlaces),"decimalPlacesShownOnBlur"in e&&e.decimalPlacesShownOnBlur!==o.options.decimalPlacesShownOnBlur.useDefault||(e.decimalPlacesShownOnBlur=e.decimalPlaces),"decimalPlacesRawValue"in e&&e.decimalPlacesRawValue!==o.options.decimalPlacesRawValue.useDefault||(e.decimalPlacesRawValue=e.decimalPlaces)):(n.isUndefined(e.decimalPlacesShownOnFocus)&&(e.decimalPlacesShownOnFocus=a.decimalPlacesShownOnFocus),n.isUndefined(e.decimalPlacesShownOnBlur)&&(e.decimalPlacesShownOnBlur=a.decimalPlacesShownOnBlur));var v=0;e.rawValueDivisor&&e.rawValueDivisor!==o.options.rawValueDivisor.none&&(v=String(e.rawValueDivisor).length-1)<0&&(v=0),e.decimalPlacesRawValue=e.decimalPlaces||e.decimalPlacesRawValue?Math.max(Math.max(e.decimalPlacesShownOnBlur,e.decimalPlacesShownOnFocus)+v,Number(e.decimalPlacesRawValue)+v):Math.max(Math.max(e.decimalPlacesShownOnBlur,e.decimalPlacesShownOnFocus)+v,Number(a.originalDecimalPlacesRawValue)+v)}}},{key:"_cachesUsualRegularExpressions",value:function(e,i){var a;a=e.negativeSignCharacter!==o.options.negativeSignCharacter.hyphen?"([-\\".concat(e.negativeSignCharacter,"]?)"):"(-?)",i.aNegRegAutoStrip=a,e.allowedAutoStrip=new RegExp("[^-0123456789\\".concat(e.decimalCharacter,"]"),"g"),e.numRegAutoStrip=new RegExp("".concat(a,"(?:\\").concat(e.decimalCharacter,"?([0-9]+\\").concat(e.decimalCharacter,"[0-9]+)|([0-9]*(?:\\").concat(e.decimalCharacter,"[0-9]*)?))")),e.stripReg=new RegExp("^".concat(i.aNegRegAutoStrip,"0*([0-9])")),e.formulaChars=new RegExp("[0-9".concat(e.decimalCharacter,"+\\-*/() ]"))}},{key:"_convertOldOptionsToNewOnes",value:function(e){var i={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 a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(!0===i[a])continue;Object.prototype.hasOwnProperty.call(i,a)?(n.warning("You are using the deprecated option name '".concat(a,"'. Please use '").concat(i[a],"' instead from now on. The old option name will be dropped very soon\u2122."),!0),e[i[a]]=e[a],delete e[a]):e.failOnUnknownOption&&n.throwError("Option name '".concat(a,"' is unknown. Please fix the options passed to autoNumeric"))}"mDec"in e&&n.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,i){var a;return n.isNumber(Number(e))?a=n.scientificToDecimal(e):(a=this._convertToNumericString(e.toString(),i),n.isNumber(Number(a))||(n.warning('The given value "'.concat(e,'" cannot be converted to a numeric one and therefore cannot be used appropriately.'),i.showWarnings),a=NaN)),a}},{key:"_checkIfInRange",value:function(e,i,a){var m=n.parseStr(e);return-1<n.testMinMax(i,m)&&n.testMinMax(a,m)<1}},{key:"_shouldSkipEventKey",value:function(e){var i=n.isInArray(e,O.keyName._allFnKeys),a=e===O.keyName.OSLeft||e===O.keyName.OSRight,m=e===O.keyName.ContextMenu,v=n.isInArray(e,O.keyName._someNonPrintableKeys);return i||a||m||v||e===O.keyName.Unidentified||e===O.keyName.NumLock||e===O.keyName.ScrollLock||e===O.keyName.Insert||e===O.keyName.Command}},{key:"_serialize",value:function(e,i,a,m,v){var u,T=this,I=1<arguments.length&&void 0!==i&&i,j=2<arguments.length&&void 0!==a?a:"unformatted",y=3<arguments.length&&void 0!==m?m:"+",B=4<arguments.length&&void 0!==v?v:null,R=[];return"object"===ie(e)&&"form"===e.nodeName.toLowerCase()&&Array.prototype.slice.call(e.elements).forEach(function(Z){if(Z.name&&!Z.disabled&&-1===["file","reset","submit","button"].indexOf(Z.type))if("select-multiple"===Z.type)Array.prototype.slice.call(Z.options).forEach(function(te){te.selected&&R.push(I?{name:Z.name,value:te.value}:"".concat(encodeURIComponent(Z.name),"=").concat(encodeURIComponent(te.value)))});else if(-1===["checkbox","radio"].indexOf(Z.type)||Z.checked){var z,W;if(T.isManagedByAutoNumeric(Z))switch(j){case"unformatted":W=T.getAutoNumericElement(Z),n.isNull(W)||(z=T.unformat(Z,W.getSettings()));break;case"localized":if(W=T.getAutoNumericElement(Z),!n.isNull(W)){var Y=n.cloneObject(W.getSettings());n.isNull(B)||(Y.outputFormat=B),z=T.localize(Z,Y)}break;default:z=Z.value}else z=Z.value;n.isUndefined(z)&&n.throwError("This error should never be hit. If it has, something really wrong happened!"),R.push(I?{name:Z.name,value:z}:"".concat(encodeURIComponent(Z.name),"=").concat(encodeURIComponent(z)))}}),I?u=R:(u=R.join("&"),"+"===y&&(u=u.replace(/%20/g,"+"))),u}},{key:"_serializeNumericString",value:function(e,i){return this._serialize(e,!1,"unformatted",1<arguments.length&&void 0!==i?i:"+")}},{key:"_serializeFormatted",value:function(e,i){return this._serialize(e,!1,"formatted",1<arguments.length&&void 0!==i?i:"+")}},{key:"_serializeLocalized",value:function(e,i,a){return this._serialize(e,!1,"localized",1<arguments.length&&void 0!==i?i:"+",2<arguments.length&&void 0!==a?a:null)}},{key:"_serializeNumericStringArray",value:function(e,i){return this._serialize(e,!0,"unformatted",1<arguments.length&&void 0!==i?i:"+")}},{key:"_serializeFormattedArray",value:function(e,i){return this._serialize(e,!0,"formatted",1<arguments.length&&void 0!==i?i:"+")}},{key:"_serializeLocalizedArray",value:function(e,i,a){return this._serialize(e,!0,"localized",1<arguments.length&&void 0!==i?i:"+",2<arguments.length&&void 0!==a?a:null)}}],ge((h=o).prototype,[{key:"_saveInitialValues",value:function(e){this.initialValueHtmlAttribute=n.scientificToDecimal(this.domElement.getAttribute("value")),n.isNull(this.initialValueHtmlAttribute)&&(this.initialValueHtmlAttribute=""),this.initialValue=e,n.isNull(this.initialValue)&&(this.initialValue="")}},{key:"_createEventListeners",value:function(){var e=this;this.formulaMode=!1,this._onFocusInFunc=function(i){e._onFocusIn(i)},this._onFocusInAndMouseEnterFunc=function(i){e._onFocusInAndMouseEnter(i)},this._onFocusFunc=function(){e._onFocus()},this._onKeydownFunc=function(i){e._onKeydown(i)},this._onKeypressFunc=function(i){e._onKeypress(i)},this._onKeyupFunc=function(i){e._onKeyup(i)},this._onFocusOutAndMouseLeaveFunc=function(i){e._onFocusOutAndMouseLeave(i)},this._onPasteFunc=function(i){e._onPaste(i)},this._onWheelFunc=function(i){e._onWheel(i)},this._onDropFunc=function(i){e._onDrop(i)},this._onKeydownGlobalFunc=function(i){e._onKeydownGlobal(i)},this._onKeyupGlobalFunc=function(i){e._onKeyupGlobal(i)},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,o._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;n.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(!n.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():n.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 i=0<arguments.length&&void 0!==e?e:null;return n.isNull(i)?this.parentForm:i}},{key:"_storeFormHandlerFunction",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;this.constructor._doesFormHandlerListExists()||this.constructor._createFormHandlerList();var a=n.randomString();this._getFormElement(i).dataset.anFormHandler=a,window.aNFormHandlerMap.set(a,{submitFn:this._onFormSubmitFunc,resetFn:this._onFormResetFunc})}},{key:"_getFormHandlerKey",value:function(){this._hasFormHandlerFunction()||n.throwError("Unable to retrieve the form handler name");var e=this.parentForm.dataset.anFormHandler;return""===e&&n.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(!n.isUndefined(this.getterSetter)){var i=this.getterSetter,a=i.set,m=i.get;Object.defineProperty(this.domElement,this.attributeToWatch,{configurable:!0,get:function(){return m.call(e.domElement)},set:function(v){a.call(e.domElement,v),e.settings.watchExternalChanges&&!e.internalModification&&e.set(v)}})}}},{key:"_removeWatcher",value:function(){var e=this;if(!n.isUndefined(this.getterSetter)){var i=this.getterSetter,a=i.set,m=i.get;Object.defineProperty(this.domElement,this.attributeToWatch,{configurable:!0,get:function(){return m.call(e.domElement)},set:function(v){a.call(e.domElement,v)}})}}},{key:"_getAttributeToWatch",value:function(){var e;if(this.isInputElement)e="value";else{var i=this.domElement.nodeType;i===Node.ELEMENT_NODE||i===Node.DOCUMENT_NODE||i===Node.DOCUMENT_FRAGMENT_NODE?e="textContent":i===Node.TEXT_NODE&&(e="nodeValue")}return e}},{key:"_historyTableAdd",value:function(){var e=0===this.historyTable.length;if(e||this.rawValue!==this._historyTableCurrentValueUsed()){var i=!0;if(!e){var a=this.historyTableIndex+1;a<this.historyTable.length&&this.rawValue===this.historyTable[a].value?i=!1:n.arrayTrim(this.historyTable,this.historyTableIndex+1)}if(this.historyTableIndex++,i){var m=n.getElementSelection(this.domElement);this.selectionStart=m.start,this.selectionEnd=m.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 i;if(0<arguments.length&&void 0!==e&&!e?(i=this.historyTableIndex+1<this.historyTable.length)&&this.historyTableIndex++:(i=0<this.historyTableIndex)&&this.historyTableIndex--,i){var a=this.historyTable[this.historyTableIndex];this.set(a.value,null,!1),n.setElementSelection(this.domElement,a.start,a.end)}}},{key:"_historyTableUndo",value:function(){this._historyTableUndoOrRedo(!0)}},{key:"_historyTableRedo",value:function(){this._historyTableUndoOrRedo(!1)}},{key:"_historyTableForget",value:function(e){for(var i=0<arguments.length&&void 0!==e?e:1,a=[],m=0;m<i;m++)a.push(this.historyTable.shift()),this.historyTableIndex--,this.historyTableIndex<0&&(this.historyTableIndex=0);return 1===a.length?a[0]:a}},{key:"_historyTableCurrentValueUsed",value:function(){var e=this.historyTableIndex;return e<0&&(e=0),n.isUndefinedOrNullOrEmpty(this.historyTable[e])?"":this.historyTable[e].value}},{key:"_parseStyleRules",value:function(){var e=this;n.isUndefinedOrNullOrEmpty(this.settings.styleRules)||""===this.rawValue||(n.isUndefinedOrNullOrEmpty(this.settings.styleRules.positive)||(0<=this.rawValue?this._addCSSClass(this.settings.styleRules.positive):this._removeCSSClass(this.settings.styleRules.positive)),n.isUndefinedOrNullOrEmpty(this.settings.styleRules.negative)||(this.rawValue<0?this._addCSSClass(this.settings.styleRules.negative):this._removeCSSClass(this.settings.styleRules.negative)),n.isUndefinedOrNullOrEmpty(this.settings.styleRules.ranges)||0===this.settings.styleRules.ranges.length||this.settings.styleRules.ranges.forEach(function(i){e.rawValue>=i.min&&e.rawValue<i.max?e._addCSSClass(i.class):e._removeCSSClass(i.class)}),n.isUndefinedOrNullOrEmpty(this.settings.styleRules.userDefined)||0===this.settings.styleRules.userDefined.length||this.settings.styleRules.userDefined.forEach(function(i){if(n.isFunction(i.callback))if(n.isString(i.classes))i.callback(e.rawValue)?e._addCSSClass(i.classes):e._removeCSSClass(i.classes);else if(n.isArray(i.classes))if(2===i.classes.length)i.callback(e.rawValue)?(e._addCSSClass(i.classes[0]),e._removeCSSClass(i.classes[1])):(e._removeCSSClass(i.classes[0]),e._addCSSClass(i.classes[1]));else if(2<i.classes.length){var a=i.callback(e.rawValue);n.isArray(a)?i.classes.forEach(function(m,v){n.isInArray(v,a)?e._addCSSClass(m):e._removeCSSClass(m)}):n.isInt(a)?i.classes.forEach(function(m,v){v===a?e._addCSSClass(m):e._removeCSSClass(m)}):n.isNull(a)?i.classes.forEach(function(m){e._removeCSSClass(m)}):n.throwError("The callback result is not an array nor a valid array index, ".concat(ie(a)," given."))}else n.throwError("The classes attribute is not valid for the `styleRules` option.");else n.isUndefinedOrNullOrEmpty(i.classes)?i.callback(e):n.throwError("The callback/classes structure is not valid for the `styleRules` option.");else n.warning("The given `styleRules` callback is not a function, ".concat(typeof callback>"u"?"undefined":ie(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,i=arguments.length,a=new Array(i),m=0;m<i;m++)a[m]=arguments[m];Array.isArray(a)&&Array.isArray(a[0])&&(a=a[0]);var v=n.cloneObject(this.settings),u=this.rawValue,T={};n.isUndefinedOrNullOrEmpty(a)||0===a.length?T=null:1<=a.length&&a.forEach(function(I){e.constructor._isPreDefinedOptionValid(I)&&(I=e.constructor._getOptionObject(I)),le(T,I)});try{this._setSettings(T,!0),this._setWritePermissions(),this._updateEventListeners(),this.set(u)}catch(I){return this._setSettings(v,!0),n.throwError("Unable to update the settings, those are invalid: [".concat(I,"]")),this}return this}},{key:"getSettings",value:function(){return this.settings}},{key:"set",value:function(e,i,a){var m,v=1<arguments.length&&void 0!==i?i:null,u=!(2<arguments.length&&void 0!==a)||a;if(n.isUndefined(e))return n.warning("You are trying to set an 'undefined' value ; an error could have occurred.",this.settings.showWarnings),this;if(n.isNull(v)||this._setSettings(v,!0),null===e&&this.settings.emptyInputBehavior!==o.options.emptyInputBehavior.null)return n.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,u),this._saveValueToPersistentStorage(),this;if(m=this.constructor._toNumericValue(e,this.settings),isNaN(Number(m)))return n.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("",u),this;if(""===m)switch(this.settings.emptyInputBehavior){case o.options.emptyInputBehavior.zero:m=0;break;case o.options.emptyInputBehavior.min:m=this.settings.minimumValue;break;case o.options.emptyInputBehavior.max:m=this.settings.maximumValue;break;default:n.isNumber(this.settings.emptyInputBehavior)&&(m=Number(this.settings.emptyInputBehavior))}if(""===m)return this._setElementAndRawValue(this.settings.emptyInputBehavior===o.options.emptyInputBehavior.always?this.settings.currencySymbol:"","",u),this;var I=K(this.constructor._checkIfInRangeWithOverrideOption(m,this.settings),2),j=I[0],y=I[1];if(j&&y&&this.settings.valuesToStrings&&this._checkValuesToStrings(m))return this._setElementAndRawValue(this.settings.valuesToStrings[m],m,u),this._saveValueToPersistentStorage(),this;if(n.isZeroOrHasNoValue(m)&&(m="0"),j&&y){var B=this.constructor._roundRawValue(m,this.settings);return B=this._trimLeadingAndTrailingZeros(B.replace(this.settings.decimalCharacter,".")),m=this._getRawValueToFormat(m),m=this.isFocused?this.constructor._roundFormattedValueShownOnFocus(m,this.settings):(this.settings.divisorWhenUnfocused&&(m=(m/=this.settings.divisorWhenUnfocused).toString()),this.constructor._roundFormattedValueShownOnBlur(m,this.settings)),m=this.constructor._modifyNegativeSignAndDecimalCharacterForFormattedValue(m,this.settings),m=this.constructor._addGroupSeparators(m,this.settings,this.isFocused,this.rawValue,B),!this.isFocused&&this.settings.symbolWhenUnfocused&&(m="".concat(m).concat(this.settings.symbolWhenUnfocused)),(this.settings.decimalPlacesShownOnFocus||this.settings.divisorWhenUnfocused)&&this._saveValueToPersistentStorage(),this._setElementAndRawValue(m,B,u),this._setValidOrInvalidState(B),this}return this._triggerRangeEvents(j,y),n.throwError("The value [".concat(m,"] 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("",u),this}},{key:"setUnformatted",value:function(e,i){var a=1<arguments.length&&void 0!==i?i:null;if(null===e||n.isUndefined(e))return this;n.isNull(a)||this._setSettings(a,!0);var m=this.constructor._removeBrackets(e,this.settings),v=this.constructor._stripAllNonNumberCharacters(m,this.settings,!0,this.isFocused);return n.isNumber(v)||n.throwError("The value is not a valid one, it's not a numeric string nor a recognized currency."),this.constructor._isWithinRangeWithOverrideOption(v,this.settings)?this.setValue(e):n.throwError("The value is out of the range limits [".concat(this.settings.minimumValue,", ").concat(this.settings.maximumValue,"].")),this}},{key:"setValue",value:function(e,i){return this._setElementAndRawValue(e,!(1<arguments.length&&void 0!==i)||i),this}},{key:"_setRawValue",value:function(e,i){var a=!(1<arguments.length&&void 0!==i)||i;if(this.rawValue!==e){var m=this.rawValue;this.rawValue=e,!n.isNull(this.settings.rawValueDivisor)&&0!==this.settings.rawValueDivisor&&""!==e&&null!==e&&this._isUserManuallyEditingTheValue()&&(this.rawValue/=this.settings.rawValueDivisor),this._triggerEvent(o.events.rawValueModified,this.domElement,{oldRawValue:m,newRawValue:this.rawValue,isPristine:this.isPristine(!0),error:null,aNElement:this}),this._parseStyleRules(),a&&this._historyTableAdd()}}},{key:"_setElementValue",value:function(e,i){var a=!(1<arguments.length&&void 0!==i)||i,m=n.getElementValue(this.domElement);return e!==m&&(this.internalModification=!0,n.setElementValue(this.domElement,e),this.internalModification=!1,a&&this._triggerEvent(o.events.formatted,this.domElement,{oldValue:m,newValue:e,oldRawValue:this.rawValue,newRawValue:this.rawValue,isPristine:this.isPristine(!1),error:null,aNElement:this})),this}},{key:"_setElementAndRawValue",value:function(e,i,a){var m=1<arguments.length&&void 0!==i?i:null,v=!(2<arguments.length&&void 0!==a)||a;return n.isNull(m)?m=e:n.isBoolean(m)&&(v=m,m=e),this._setElementValue(e),this._setRawValue(m,v),this}},{key:"_getRawValueToFormat",value:function(e){return n.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,i){!n.isNull(i)&&n.isFunction(i)&&i(e,this)}},{key:"_triggerEvent",value:function(e,i,a){var m=1<arguments.length&&void 0!==i?i:document;n.triggerEvent(e,m,2<arguments.length&&void 0!==a?a: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 i,a=0<arguments.length&&void 0!==e?e:null;return i=n.isNull(this.rawValue)?null:n.trimPaddedZerosFromDecimalPlaces(this.rawValue),this._executeCallback(i,a),i}},{key:"getFormatted",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;"value"in this.domElement||"textContent"in this.domElement||n.throwError("Unable to get the formatted string from the element.");var a=n.getElementValue(this.domElement);return this._executeCallback(a,i),a}},{key:"getNumber",value:function(e){var i,a=0<arguments.length&&void 0!==e?e:null;return i=null===this.rawValue?null:this.constructor._toLocale(this.getNumericString(),"number",this.settings),this._executeCallback(i,a),i}},{key:"getLocalized",value:function(e,i){var a,m,v=0<arguments.length&&void 0!==e?e:null,u=1<arguments.length&&void 0!==i?i:null;n.isFunction(v)&&n.isNull(u)&&(u=v,v=null),(a=n.isEmptyString(this.rawValue)?"":""+Number(this.rawValue))&&0===Number(a)&&this.settings.leadingZero!==o.options.leadingZero.keep&&(a="0"),m=n.isNull(v)?this.settings.outputFormat:v;var T=this.constructor._toLocale(a,m,this.settings);return this._executeCallback(T,u),T}},{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(){n.setElementSelection(this.domElement,0,n.getElementValue(this.domElement).length)}},{key:"selectNumber",value:function(){var e,i,a=n.getElementValue(this.domElement),m=a.length,v=this.settings.currencySymbol.length,u=this.settings.currencySymbolPlacement,T=n.isNegative(a,this.settings.negativeSignCharacter)?1:0,I=this.settings.suffixText.length;if(e=u===o.options.currencySymbolPlacement.suffix?0:this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.left&&1==T&&0<v?v+1:v,u===o.options.currencySymbolPlacement.prefix)i=m-I;else switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.left:i=m-(I+v);break;case o.options.negativePositiveSignPlacement.right:i=0<v?m-(v+T+I):m-(v+I);break;default:i=m-(v+I)}return n.setElementSelection(this.domElement,e,i),this}},{key:"selectInteger",value:function(){var e=0,i=0<=this.rawValue;this.settings.currencySymbolPlacement!==o.options.currencySymbolPlacement.prefix&&(this.settings.currencySymbolPlacement!==o.options.currencySymbolPlacement.suffix||this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.prefix&&this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none)||(this.settings.showPositiveSign&&i||!i&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.left)&&(e+=1),this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&(e+=this.settings.currencySymbol.length);var a=n.getElementValue(this.domElement),m=a.indexOf(this.settings.decimalCharacter);return-1===m&&(m=this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix?a.length-this.settings.currencySymbol.length:a.length,i||this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.suffix&&this.settings.currencySymbolPlacement!==o.options.currencySymbolPlacement.suffix||--m,m-=this.settings.suffixText.length),n.setElementSelection(this.domElement,e,m),this}},{key:"selectDecimal",value:function(){var e,a=n.getElementValue(this.domElement).indexOf(this.settings.decimalCharacter);return e=-1===a?a=0:(a+=1)+Number(this.isFocused?this.settings.decimalPlacesShownOnFocus:this.settings.decimalPlacesShownOnBlur),n.setElementSelection(this.domElement,a,e),this}},{key:"node",value:function(){return this.domElement}},{key:"parent",value:function(){return this.domElement.parentNode}},{key:"detach",value:function(e){var i,a=0<arguments.length&&void 0!==e?e:null;return i=n.isNull(a)?this.domElement:a.node(),this._removeFromLocalList(i),this}},{key:"attach",value:function(e,i){var a=!(1<arguments.length&&void 0!==i)||i;return this._addToLocalList(e.node()),a&&e.update(this.settings),this}},{key:"formatOther",value:function(e,i){return this._formatOrUnformatOther(!0,e,1<arguments.length&&void 0!==i?i:null)}},{key:"unformatOther",value:function(e,i){return this._formatOrUnformatOther(!1,e,1<arguments.length&&void 0!==i?i:null)}},{key:"_formatOrUnformatOther",value:function(e,i,a){var m,v,u=2<arguments.length&&void 0!==a?a:null;if(m=n.isNull(u)?this.settings:this._cloneAndMergeSettings(u),n.isElement(i)){var T=n.getElementValue(i);return v=e?o.format(T,m):o.unformat(T,m),n.setElementValue(i,v),null}return e?o.format(i,m):o.unformat(i,m)}},{key:"init",value:function(e,i){var a=this,m=!(1<arguments.length&&void 0!==i)||i,v=!1,u=[];if(n.isString(e)?u=U(document.querySelectorAll(e)):n.isElement(e)?(u.push(e),v=!0):n.isArray(e)?u=e:n.throwError("The given parameters to the 'init' function are invalid."),0===u.length)return n.warning("No valid DOM elements were given hence no AutoNumeric object were instantiated.",!0),[];var T=this._getLocalList(),I=[];return u.forEach(function(j){var y=a.settings.createLocalList;m&&(a.settings.createLocalList=!1);var B=new o(j,n.getElementValue(j),a.settings);m&&(B._setLocalList(T),a._addToLocalList(j,B),a.settings.createLocalList=y),I.push(B)}),v?I[0]:I}},{key:"clear",value:function(e){return 0<arguments.length&&void 0!==e&&e?this.set("",{emptyInputBehavior:o.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||n.isUndefinedOrNullOrEmpty(this.parentForm)){var i=this._getParentForm();if(!n.isNull(i)&&i!==this.parentForm){var a=this._getFormAutoNumericChildren(this.parentForm);this.parentForm.dataset.anCount=a.length,this._hasFormHandlerFunction(i)?this._incrementParentFormCounter(i):(this._storeFormHandlerFunction(i),this._initializeFormCounterToOne(i))}this.parentForm=i}return this.parentForm}},{key:"_getFormAutoNumericChildren",value:function(e){var i=this;return U(e.querySelectorAll("input")).filter(function(a){return i.constructor.isManagedByAutoNumeric(a)})}},{key:"_getParentForm",value:function(){if("body"===this.domElement.tagName.toLowerCase())return null;var e,i=this.domElement;do{if(n.isNull(i=i.parentNode))return null;if("body"===(e=i.tagName?i.tagName.toLowerCase():""))break}while("form"!==e);return"form"===e?i: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 i,a=0<arguments.length&&void 0!==e?e:null;return i=n.isNull(a)?this.settings.outputFormat:a,this.constructor._serializeLocalized(this.form(),this.settings.serializeSpaces,i)}},{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 i,a=0<arguments.length&&void 0!==e?e:null;return i=n.isNull(a)?this.settings.outputFormat:a,this.constructor._serializeLocalizedArray(this.form(),this.settings.serializeSpaces,i)}},{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){o.getAutoNumericElement(e).unformat()}),this}},{key:"formUnformatLocalized",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(e){o.getAutoNumericElement(e).unformatLocalized()}),this}},{key:"formReformat",value:function(){return this.constructor._getChildANInputElement(this.form()).forEach(function(e){o.getAutoNumericElement(e).reformat()}),this}},{key:"formSubmitNumericString",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;return n.isNull(i)?(this.formUnformat(),this.form().submit(),this.formReformat()):n.isFunction(i)?i(this.formNumericString()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitFormatted",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;return n.isNull(i)?this.form().submit():n.isFunction(i)?i(this.formFormatted()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitLocalized",value:function(e,i){var a=0<arguments.length&&void 0!==e?e:null,m=1<arguments.length&&void 0!==i?i:null;return n.isNull(m)?(this.formUnformatLocalized(),this.form().submit(),this.formReformat()):n.isFunction(m)?m(this.formLocalized(a)):n.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayNumericString",value:function(e){return n.isFunction(e)?e(this.formArrayNumericString()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayFormatted",value:function(e){return n.isFunction(e)?e(this.formArrayFormatted()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitArrayLocalized",value:function(e,i){var a=1<arguments.length&&void 0!==i?i:null;return n.isFunction(e)?e(this.formArrayLocalized(a)):n.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonNumericString",value:function(e){return n.isFunction(e)?e(this.formJsonNumericString()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonFormatted",value:function(e){return n.isFunction(e)?e(this.formJsonFormatted()):n.throwError("The given callback is not a function."),this}},{key:"formSubmitJsonLocalized",value:function(e,i){var a=1<arguments.length&&void 0!==i?i:null;return n.isFunction(e)?e(this.formJsonLocalized(a)):n.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,i){var a=1<arguments.length&&void 0!==i?i:null;n.isNull(a)&&(a=this),n.isUndefined(this.autoNumericLocalList)?n.throwError("The local list provided does not exists when trying to add an element. [".concat(this.autoNumericLocalList,"] given.")):this.autoNumericLocalList.set(e,a)}},{key:"_removeFromLocalList",value:function(e){n.isUndefined(this.autoNumericLocalList)?this.settings.createLocalList&&n.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,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];le.apply(void 0,[this.settings].concat(i))}},{key:"_cloneAndMergeSettings",value:function(){for(var e={},i=arguments.length,a=new Array(i),m=0;m<i;m++)a[m]=arguments[m];return le.apply(void 0,[e,this.settings].concat(a)),e}},{key:"_updatePredefinedOptions",value:function(e,i){var a=1<arguments.length&&void 0!==i?i:null;return n.isNull(a)?this.update(e):(this._mergeSettings(e,a),this.update(this.settings)),this}},{key:"french",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(o.getPredefinedOptions().French,i),this}},{key:"northAmerican",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(o.getPredefinedOptions().NorthAmerican,i),this}},{key:"british",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(o.getPredefinedOptions().British,i),this}},{key:"swiss",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(o.getPredefinedOptions().Swiss,i),this}},{key:"japanese",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(o.getPredefinedOptions().Japanese,i),this}},{key:"spanish",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(o.getPredefinedOptions().Spanish,i),this}},{key:"chinese",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(o.getPredefinedOptions().Chinese,i),this}},{key:"brazilian",value:function(e){var i=0<arguments.length&&void 0!==e?e:null;return this._updatePredefinedOptions(o.getPredefinedOptions().Brazilian,i),this}},{key:"_runCallbacksFoundInTheSettingsObject",value:function(){for(var e in this.settings)if(Object.prototype.hasOwnProperty.call(this.settings,e)){var i=this.settings[e];if("function"==typeof i)this.settings[e]=i(this,e);else{var a=this.domElement.getAttribute(e);a=n.camelize(a),"function"==typeof this.settings[a]&&(this.settings[e]=a(this,e))}}}},{key:"_setTrailingNegativeSignInfo",value:function(){this.isTrailingNegative=this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.suffix||this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix&&(this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.left||this.settings.negativePositiveSignPlacement===o.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){n.isNull(this.settings.caretPositionOnFocus)&&this.settings.selectOnFocus===o.options.selectOnFocus.doNotSelect&&n.throwError("`_initialCaretPosition()` should never be called when the `caretPositionOnFocus` option is `null`.");var i=this.rawValue<0,a=n.isZeroOrHasNoValue(e),m=e.length,v=0,u=0,T=!1,I=0;this.settings.caretPositionOnFocus!==o.options.caretPositionOnFocus.start&&(v=(e=(e=(e=e.replace(this.settings.negativeSignCharacter,"")).replace(this.settings.positiveSignCharacter,"")).replace(this.settings.currencySymbol,"")).length,T=n.contains(e,this.settings.decimalCharacter),this.settings.caretPositionOnFocus!==o.options.caretPositionOnFocus.decimalLeft&&this.settings.caretPositionOnFocus!==o.options.caretPositionOnFocus.decimalRight||(I=T?(u=e.indexOf(this.settings.decimalCharacter),this.settings.decimalCharacter.length):(u=v,0)));var j="";i?j=this.settings.negativeSignCharacter:this.settings.showPositiveSign&&!a&&(j=this.settings.positiveSignCharacter);var y,B=j.length,R=this.settings.currencySymbol.length;if(this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix){if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.start)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!a))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.left:case o.options.negativePositiveSignPlacement.right:y=B+R;break;case o.options.negativePositiveSignPlacement.suffix:y=R}else y=R;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.end)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!a))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.left:case o.options.negativePositiveSignPlacement.right:y=m;break;case o.options.negativePositiveSignPlacement.suffix:y=R+v}else y=m;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.decimalLeft)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!a))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.left:case o.options.negativePositiveSignPlacement.right:y=B+R+u;break;case o.options.negativePositiveSignPlacement.suffix:y=R+u}else y=R+u;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.decimalRight)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!a))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.prefix:case o.options.negativePositiveSignPlacement.left:case o.options.negativePositiveSignPlacement.right:y=B+R+u+I;break;case o.options.negativePositiveSignPlacement.suffix:y=R+u+I}else y=R+u+I}else if(this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix)if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.start)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!a))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.suffix:case o.options.negativePositiveSignPlacement.right:case o.options.negativePositiveSignPlacement.left:y=0;break;case o.options.negativePositiveSignPlacement.prefix:y=B}else y=0;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.end)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!a))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.suffix:case o.options.negativePositiveSignPlacement.right:case o.options.negativePositiveSignPlacement.left:y=v;break;case o.options.negativePositiveSignPlacement.prefix:y=B+v}else y=v;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.decimalLeft)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!a))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.suffix:case o.options.negativePositiveSignPlacement.right:case o.options.negativePositiveSignPlacement.left:y=u;break;case o.options.negativePositiveSignPlacement.prefix:y=B+u}else y=u;else if(this.settings.caretPositionOnFocus===o.options.caretPositionOnFocus.decimalRight)if(this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.none&&(i||!i&&this.settings.showPositiveSign&&!a))switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.suffix:case o.options.negativePositiveSignPlacement.right:case o.options.negativePositiveSignPlacement.left:y=u+I;break;case o.options.negativePositiveSignPlacement.prefix:y=B+u+I}else y=u+I;return y}},{key:"_triggerRangeEvents",value:function(e,i){e||this._triggerEvent(o.events.minRangeExceeded,this.domElement),i||this._triggerEvent(o.events.maxRangeExceeded,this.domElement)}},{key:"_setInvalidState",value:function(){this.isInputElement?n.setInvalidState(this.domElement):this._addCSSClass(this.settings.invalidClass),this._triggerEvent(o.events.invalidValue,this.domElement),this.validState=!1}},{key:"_setValidState",value:function(){this.isInputElement?n.setValidState(this.domElement):this._removeCSSClass(this.settings.invalidClass),this.validState||this._triggerEvent(o.events.correctedValue,this.domElement),this.validState=!0}},{key:"_setValidOrInvalidState",value:function(e){if(this.settings.overrideMinMaxLimits===o.options.overrideMinMaxLimits.invalid){var i=this.constructor._isMinimumRangeRespected(e,this.settings),a=this.constructor._isMaximumRangeRespected(e,this.settings);i&&a?this._setValidState():this._setInvalidState(),this._triggerRangeEvents(i,a)}}},{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!==o.options.leadingZero.keep){if(0===Number(e))return"0";e=e.replace(/^(-)?0+(?=\d)/g,"$1")}return n.contains(e,".")&&(e=e.replace(/(\.[0-9]*?)0+$/,"$1")),e.replace(/\.$/,"")}},{key:"_setPersistentStorageName",value:function(){this.settings.saveValueToSessionStorage&&(this.rawValueStorageName=""===this.domElement.name||n.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):(n.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 i="; expires=".concat(e.toUTCString());document.cookie="".concat(this.rawValueStorageName,"='' ;").concat(i,"; path=/")}}},{key:"_getDefaultValue",value:function(e){var i=e.getAttribute("value");return n.isNull(i)?"":i}},{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 i=null;this.settings.emptyInputBehavior===o.options.emptyInputBehavior.focus&&this.rawValue<0&&null!==this.settings.negativeBracketsTypeOnBlur&&this.settings.isNegativeSignAllowed&&(i=this.constructor._removeBrackets(n.getElementValue(this.domElement),this.settings));var a=this._getRawValueToFormat(this.rawValue);if(""!==a){var m=this.constructor._roundFormattedValueShownOnFocusOrBlur(a,this.settings,this.isFocused);i=this.settings.showOnlyNumbersOnFocus===o.options.showOnlyNumbersOnFocus.onlyNumbers?(this.settings.digitGroupSeparator="",this.settings.currencySymbol="",this.settings.suffixText="",m.replace(".",this.settings.decimalCharacter)):n.isNull(m)?"":this.constructor._addGroupSeparators(m.replace(".",this.settings.decimalCharacter),this.settings,this.isFocused,a)}this.valueOnFocus=n.isNull(i)?"":i,this.lastVal=this.valueOnFocus;var v=this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(this.valueOnFocus,this.settings),u=this.constructor._orderValueCurrencySymbolAndSuffixText(this.valueOnFocus,this.settings,!0),T=v&&""!==u&&this.settings.emptyInputBehavior===o.options.emptyInputBehavior.focus;T&&(i=u),n.isNull(i)||this._setElementValue(i),T&&u===this.settings.currencySymbol&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix&&n.setElementSelection(e.target,0)}}},{key:"_onFocus",value:function(){this.settings.isCancellable&&this._saveCancellableValue()}},{key:"_onFocusIn",value:function(e){this.settings.selectOnFocus?this.select():n.isNull(this.settings.caretPositionOnFocus)||n.setElementSelection(e.target,this._initialCaretPosition(n.getElementValue(this.domElement)))}},{key:"_enterFormulaMode",value:function(){this.settings.formulaMode&&(this.formulaMode=!0,n.setElementValue(this.domElement,"="),n.setElementSelection(this.domElement,1))}},{key:"_exitFormulaMode",value:function(){var e,i=n.getElementValue(this.domElement);i=i.replace(/^\s*=/,"");try{var a=new G(i,this.settings.decimalCharacter);e=(new p).evaluate(a)}catch{return this._triggerEvent(o.events.invalidFormula,this.domElement,{formula:i,aNElement:this}),this.reformat(),void(this.formulaMode=!1)}this._triggerEvent(o.events.validFormula,this.domElement,{formula:i,result:e,aNElement:this}),this.set(e),this.formulaMode=!1}},{key:"_acceptNonPrintableKeysInFormulaMode",value:function(){return this.eventKey===O.keyName.Backspace||this.eventKey===O.keyName.Delete||this.eventKey===O.keyName.LeftArrow||this.eventKey===O.keyName.RightArrow||this.eventKey===O.keyName.Home||this.eventKey===O.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!==n.getHoveredElement()){if(this._updateEventKeyInfo(e),this.keydownEventCounter+=1,1===this.keydownEventCounter&&(this.initialValueOnFirstKeydown=n.getElementValue(e.target),this.initialRawValueOnFirstKeydown=this.rawValue),this.formulaMode){if(this.eventKey===O.keyName.Esc)return this.formulaMode=!1,void this.reformat();if(this.eventKey===O.keyName.Enter)return void this._exitFormulaMode();if(this._acceptNonPrintableKeysInFormulaMode())return}else if(this.eventKey===O.keyName.Equal)return void this._enterFormulaMode();if(this.domElement.readOnly||this.settings.readOnly||this.domElement.disabled)this.processed=!0;else{this.eventKey===O.keyName.Esc&&(e.preventDefault(),this.settings.isCancellable&&this.rawValue!==this.savedCancellableValue&&(this.set(this.savedCancellableValue),this._triggerEvent(o.events.native.input,e.target)),this.select());var i=n.getElementValue(e.target);if(this.eventKey===O.keyName.Enter&&this.rawValue!==this.rawValueOnFocus&&(this._triggerEvent(o.events.native.change,e.target),this.valueOnFocus=i,this.rawValueOnFocus=this.rawValue,this.settings.isCancellable&&this._saveCancellableValue()),this._updateInternalProperties(e),this._processNonPrintableKeysAndShortcuts(e))this.processed=!0;else if(this.eventKey===O.keyName.Backspace||this.eventKey===O.keyName.Delete){var a=this._processCharacterDeletion();if(this.processed=!0,!a)return void e.preventDefault();this._formatValue(e),(i=n.getElementValue(e.target))!==this.lastVal&&this.throwInput&&(this._triggerEvent(o.events.native.input,e.target),e.preventDefault()),this.lastVal=i,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!==O.keyName.Insert){var i=this.processed;if(this._updateInternalProperties(e),!this._processNonPrintableKeysAndShortcuts(e))if(i)e.preventDefault();else{if(this._processCharacterInsertion()){this._formatValue(e);var a=n.getElementValue(e.target);if(a!==this.lastVal&&this.throwInput)this._triggerEvent(o.events.native.input,e.target),e.preventDefault();else{if((this.eventKey===this.settings.decimalCharacter||this.eventKey===this.settings.decimalCharacterAlternative)&&n.getElementSelection(e.target).start===n.getElementSelection(e.target).end&&n.getElementSelection(e.target).start===a.indexOf(this.settings.decimalCharacter)){var m=n.getElementSelection(e.target).start+1;n.setElementSelection(e.target,m)}e.preventDefault()}return this.lastVal=n.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===O.keyName.Esc)e.preventDefault();else{if(this.eventKey===O.keyName.Z||this.eventKey===O.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===O.keyName.x){var i=n.getElementSelection(this.domElement).start,a=this.constructor._toNumericValue(n.getElementValue(e.target),this.settings);this.set(a),this._setCaretPosition(i)}if(this.eventKey===O.keyName.Alt&&this.settings.unformatOnHover&&this.hoveredWithAlt)this.constructor._reformatAltHovered(this);else if(!e.ctrlKey&&!e.metaKey||this.eventKey!==O.keyName.Backspace&&this.eventKey!==O.keyName.Delete){this._updateInternalProperties(e);var m=this._processNonPrintableKeysAndShortcuts(e);delete this.valuePartsBeforePaste;var v=n.getElementValue(e.target);if(!(m||""===v&&""===this.initialValueOnFirstKeydown)&&(v===this.settings.currencySymbol?n.setElementSelection(e.target,this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix?0:this.settings.currencySymbol.length):this.eventKey===O.keyName.Tab&&n.setElementSelection(e.target,0,v.length),(v===this.settings.suffixText||""===this.rawValue&&""!==this.settings.currencySymbol&&""!==this.settings.suffixText)&&n.setElementSelection(e.target,0),null!==this.settings.decimalPlacesShownOnFocus&&this._saveValueToPersistentStorage(),this.formatted||this._formatValue(e),this._setValidOrInvalidState(this.rawValue),this._saveRawValueForAndroid(),v!==this.initialValueOnFirstKeydown&&this._triggerEvent(o.events.formatted,e.target,{oldValue:this.initialValueOnFirstKeydown,newValue:v,oldRawValue:this.initialRawValueOnFirstKeydown,newRawValue:this.rawValue,isPristine:this.isPristine(!1),error:null,aNElement:this}),1<this.historyTable.length)){var u=n.getElementSelection(this.domElement);this.selectionStart=u.start,this.selectionEnd=u.end,this.historyTable[this.historyTableIndex].start=this.selectionStart,this.historyTable[this.historyTableIndex].end=this.selectionEnd}}else{var T=n.getElementValue(e.target);this._setRawValue(this._formatOrUnformatOther(!1,T))}}}},{key:"_saveRawValueForAndroid",value:function(){if(this.eventKey===O.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===o.options.showOnlyNumbersOnFocus.onlyNumbers&&(this.settings.digitGroupSeparator=this.originalDigitGroupSeparator,this.settings.currencySymbol=this.originalCurrencySymbol,this.settings.suffixText=this.originalSuffixText);var i=this._getRawValueToFormat(this.rawValue),a=n.isNull(i),m=K(this.constructor._checkIfInRangeWithOverrideOption(i,this.settings),2),v=m[0],u=m[1],T=!1;if(""===i||a||(this._triggerRangeEvents(v,u),this.settings.valuesToStrings&&this._checkValuesToStrings(i)&&(this._setElementValue(this.settings.valuesToStrings[i]),T=!0)),!T){var I;if(I=a||""===i?i:String(i),""===i||a){if(""===i)switch(this.settings.emptyInputBehavior){case o.options.emptyInputBehavior.zero:this._setRawValue("0"),I=this.constructor._roundValue("0",this.settings,0);break;case o.options.emptyInputBehavior.min:this._setRawValue(this.settings.minimumValue),I=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.minimumValue,this.settings,this.isFocused);break;case o.options.emptyInputBehavior.max:this._setRawValue(this.settings.maximumValue),I=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.maximumValue,this.settings,this.isFocused);break;default:n.isNumber(this.settings.emptyInputBehavior)&&(this._setRawValue(this.settings.emptyInputBehavior),I=this.constructor._roundFormattedValueShownOnFocusOrBlur(this.settings.emptyInputBehavior,this.settings,this.isFocused))}}else v&&u&&!this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(i,this.settings)?(I=this._modifyNegativeSignAndDecimalCharacterForRawValue(I),this.settings.divisorWhenUnfocused&&!n.isNull(I)&&(I=(I/=this.settings.divisorWhenUnfocused).toString()),I=this.constructor._roundFormattedValueShownOnBlur(I,this.settings),I=this.constructor._modifyNegativeSignAndDecimalCharacterForFormattedValue(I,this.settings)):this._triggerRangeEvents(v,u);var j=this.constructor._orderValueCurrencySymbolAndSuffixText(I,this.settings,!1);this.constructor._isElementValueEmptyOrOnlyTheNegativeSign(I,this.settings)||a&&this.settings.emptyInputBehavior===o.options.emptyInputBehavior.null||(j=this.constructor._addGroupSeparators(I,this.settings,!1,i)),j===i&&""!==i&&this.settings.allowDecimalPadding!==o.options.allowDecimalPadding.never&&this.settings.allowDecimalPadding!==o.options.allowDecimalPadding.floats||(this.settings.symbolWhenUnfocused&&""!==i&&null!==i&&(j="".concat(j).concat(this.settings.symbolWhenUnfocused)),this._setElementValue(j))}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 i,a;window.clipboardData&&window.clipboardData.getData?i=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?i=e.clipboardData.getData("text/plain"):n.throwError("Unable to retrieve the pasted value. Please use a modern browser (ie. Firefox or Chromium).");var m=n.getElementValue(a=e.target.tagName?e.target:e.explicitOriginalTarget),v=a.selectionStart||0,u=a.selectionEnd||0,T=u-v;if(T===m.length){var I=this._preparePastedText(i),j=n.arabicToLatinNumbers(I,!1,!1,!1);return"."===j||""===j||"."!==j&&!n.isNumber(j)?(this.formatted=!0,void(this.settings.onInvalidPaste===o.options.onInvalidPaste.error&&n.throwError("The pasted value '".concat(i,"' is not a valid paste content.")))):(this.set(j),this.formatted=!0,void this._triggerEvent(o.events.native.input,a))}var y=n.isNegativeStrict(i,this.settings.negativeSignCharacter);y&&(i=i.slice(1,i.length));var B,R,Z=this._preparePastedText(i);if("."!==(B="."===Z?".":n.arabicToLatinNumbers(Z,!1,!1,!1))&&(!n.isNumber(B)||""===B))return this.formatted=!0,void(this.settings.onInvalidPaste===o.options.onInvalidPaste.error&&n.throwError("The pasted value '".concat(i,"' is not a valid paste content.")));var z,W,Y=n.isNegativeStrict(this.getNumericString(),this.settings.negativeSignCharacter);z=!(!y||Y)&&(Y=!0);var te=m.slice(0,v),he=m.slice(u,m.length);W=this._preparePastedText(v!==u?te+he:m),Y&&(W=n.setRawNegativeSign(W)),R=n.convertCharacterCountToIndexPosition(n.countNumberCharactersOnTheCaretLeftSide(m,v,this.settings.decimalCharacter)),z&&R++;var oe=W.slice(0,R),ye=W.slice(R,W.length),Ae=!1;"."===B&&(n.contains(oe,".")&&(Ae=!0,oe=oe.replace(".","")),ye=ye.replace(".",""));var Le=!1;switch(""===oe&&"-"===ye&&(oe="-",Le=!(ye="")),this.settings.onInvalidPaste){case o.options.onInvalidPaste.truncate:case o.options.onInvalidPaste.replace:for(var Ve=n.parseStr(this.settings.minimumValue),qe=n.parseStr(this.settings.maximumValue),_e=W,re=0,He=oe;re<B.length&&(W=(He+=B[re])+ye,this.constructor._checkIfInRange(W,Ve,qe));)_e=W,re++;if(R+=re,Le&&R++,this.settings.onInvalidPaste===o.options.onInvalidPaste.truncate){W=_e,Ae&&R--;break}for(var Se=R,Je=_e.length;re<B.length&&Se<Je;)if("."!==_e[Se]){if(W=n.replaceCharAt(_e,Se,B[re]),!this.constructor._checkIfInRange(W,Ve,qe))break;_e=W,re++,Se++}else Se++;R=Se,Ae&&R--,W=_e;break;default:if(W="".concat(oe).concat(B).concat(ye),v===u)R=n.convertCharacterCountToIndexPosition(n.countNumberCharactersOnTheCaretLeftSide(m,v,this.settings.decimalCharacter))+B.length;else if(""===ye)R=n.convertCharacterCountToIndexPosition(n.countNumberCharactersOnTheCaretLeftSide(m,v,this.settings.decimalCharacter))+B.length,Le&&R++;else{var Qe=n.convertCharacterCountToIndexPosition(n.countNumberCharactersOnTheCaretLeftSide(m,u,this.settings.decimalCharacter)),$e=n.getElementValue(a).slice(v,u);R=Qe-T+n.countCharInText(this.settings.digitGroupSeparator,$e)+B.length}z&&R++,Ae&&R--}if(n.isNumber(W)&&""!==W){var Ne=!1,We=!1;try{this.set(W),Ne=!0}catch{var Fe;switch(this.settings.onInvalidPaste){case o.options.onInvalidPaste.clamp:Fe=n.clampToRangeLimits(W,this.settings);try{this.set(Fe)}catch{n.throwError("Fatal error: Unable to set the clamped value '".concat(Fe,"'."))}Ne=We=!0,W=Fe;break;case o.options.onInvalidPaste.error:case o.options.onInvalidPaste.truncate:case o.options.onInvalidPaste.replace:n.throwError("The pasted value '".concat(i,"' results in a value '").concat(W,"' that is outside of the minimum [").concat(this.settings.minimumValue,"] and maximum [").concat(this.settings.maximumValue,"] value range."));default:return}}var Ke,xe=n.getElementValue(a);if(Ne)switch(this.settings.onInvalidPaste){case o.options.onInvalidPaste.clamp:if(We){n.setElementSelection(a,this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix?xe.length-this.settings.currencySymbol.length:xe.length);break}default:Ke=n.findCaretPositionInFormattedNumber(W,R,xe,this.settings.decimalCharacter),n.setElementSelection(a,Ke)}Ne&&m!==xe&&this._triggerEvent(o.events.native.input,a)}else this.settings.onInvalidPaste===o.options.onInvalidPaste.error&&n.throwError("The pasted value '".concat(i,"' would result into an invalid content '").concat(W,"'."))}}},{key:"_onBlur",value:function(e){this.isFocused=!1,this.isEditing=!1,this.rawValue!==this.rawValueOnFocus&&this._triggerEvent(o.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===o.options.wheelOn.focus?this.isFocused?e.shiftKey||this.wheelAction(e):e.shiftKey&&this.wheelAction(e):this.settings.wheelOn===o.options.wheelOn.hover?e.shiftKey?(e.preventDefault(),window.scrollBy(0,n.isNegativeStrict(String(e.deltaY))?-50:50)):this.wheelAction(e):n.throwError("Unknown `wheelOn` option."))}},{key:"wheelAction",value:function(e){this.isWheelEvent=!0;var i,a=e.target.selectionStart||0,m=e.target.selectionEnd||0,v=this.rawValue;if(n.isUndefinedOrNullOrEmpty(v)?0<this.settings.minimumValue||this.settings.maximumValue<0?n.isWheelUpEvent(e)?i=this.settings.minimumValue:n.isWheelDownEvent(e)?i=this.settings.maximumValue:n.throwError("The event is not a 'wheel' event."):i=0:i=v,i=+i,n.isNumber(this.settings.wheelStep)){var u=+this.settings.wheelStep;n.isWheelUpEvent(e)?i+=u:n.isWheelDownEvent(e)&&(i-=u)}else n.isWheelUpEvent(e)?i=n.addAndRoundToNearestAuto(i,this.settings.decimalPlacesRawValue):n.isWheelDownEvent(e)&&(i=n.subtractAndRoundToNearestAuto(i,this.settings.decimalPlacesRawValue));(i=n.clampToRangeLimits(i,this.settings))!==+v&&(this.set(i),this._triggerEvent(o.events.native.input,e.target)),e.preventDefault(),this._setSelection(a,m),this.isWheelEvent=!1}},{key:"_onDrop",value:function(e){if(!this.formulaMode){var i;this.isDropEvent=!0,e.preventDefault(),i=n.isIE11()?"text":"text/plain";var a=e.dataTransfer.getData(i),m=this.unformatOther(a);this.set(m),this.isDropEvent=!1}}},{key:"_onFormSubmit",value:function(){var e=this;return this._getFormAutoNumericChildren(this.parentForm).map(function(i){return e.constructor.getAutoNumericElement(i)}).forEach(function(i){return i._unformatOnSubmit()}),!0}},{key:"_onFormReset",value:function(){var e=this;this._getFormAutoNumericChildren(this.parentForm).map(function(i){return e.constructor.getAutoNumericElement(i)}).forEach(function(i){var a=e._getDefaultValue(i.node());setTimeout(function(){return i.set(a)},0)})}},{key:"_unformatOnSubmit",value:function(){this.settings.unformatOnSubmit&&this._setElementValue(this.rawValue)}},{key:"_onKeydownGlobal",value:function(e){if(n.character(e)===O.keyName.Alt){var i=n.getHoveredElement();if(o.isManagedByAutoNumeric(i)){var a=o.getAutoNumericElement(i);!a.formulaMode&&a.settings.unformatOnHover&&this.constructor._unformatAltHovered(a)}}}},{key:"_onKeyupGlobal",value:function(e){if(n.character(e)===O.keyName.Alt){var i=n.getHoveredElement();if(o.isManagedByAutoNumeric(i)){var a=o.getAutoNumericElement(i);if(a.formulaMode||!a.settings.unformatOnHover)return;this.constructor._reformatAltHovered(a)}}}},{key:"_isElementTagSupported",value:function(){return n.isElement(this.domElement)||n.throwError("The DOM element is not valid, ".concat(this.domElement," given.")),n.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||n.isUndefinedOrNullOrEmpty(this.domElement.type)}},{key:"_checkElement",value:function(){var e=this.domElement.tagName.toLowerCase();this._isElementTagSupported()||n.throwError("The <".concat(e,"> tag is not supported by autoNumeric")),this._isInputElement()?(this._isInputTypeSupported()||n.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 i,a=0<arguments.length&&void 0!==e?e:null,m=!0;if(n.isNull(a)?(i=n.getElementValue(this.domElement).trim(),this.domElement.setAttribute("value",i)):i=a,this.isInputElement||this.isContentEditable){var v=this.constructor._toNumericValue(i,this.settings);if(this.domElement.hasAttribute("value")&&""!==this.domElement.getAttribute("value")){if(null!==this.settings.defaultValueOverride&&this.settings.defaultValueOverride.toString()!==i||null===this.settings.defaultValueOverride&&""!==i&&i!==this.domElement.getAttribute("value")||""!==i&&"hidden"===this.domElement.getAttribute("type")&&!n.isNumber(v)){if(this.settings.saveValueToSessionStorage&&(null!==this.settings.decimalPlacesShownOnFocus||this.settings.divisorWhenUnfocused)&&this._setRawValue(this._getValueFromPersistentStorage()),!this.settings.saveValueToSessionStorage){var u=this.constructor._removeBrackets(i,this.settings);(this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.suffix||this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.prefix&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix)&&""!==this.settings.negativeSignCharacter&&n.isNegative(i,this.settings.negativeSignCharacter)?this._setRawValue("-".concat(this.constructor._stripAllNonNumberCharacters(u,this.settings,!0,this.isFocused))):this._setRawValue(this.constructor._stripAllNonNumberCharacters(u,this.settings,!0,this.isFocused))}m=!1}}else isNaN(Number(v))||1/0===v?n.throwError("The value [".concat(i,"] used in the input is not a valid value autoNumeric can work with.")):(this.set(v),m=!1);if(""===i)switch(this.settings.emptyInputBehavior){case o.options.emptyInputBehavior.focus:case o.options.emptyInputBehavior.null:case o.options.emptyInputBehavior.press:break;case o.options.emptyInputBehavior.always:this._setElementValue(this.settings.currencySymbol);break;case o.options.emptyInputBehavior.min:this.set(this.settings.minimumValue);break;case o.options.emptyInputBehavior.max:this.set(this.settings.maximumValue);break;case o.options.emptyInputBehavior.zero:this.set("0");break;default:this.set(this.settings.emptyInputBehavior)}else m&&i===this.domElement.getAttribute("value")&&this.set(i)}else null!==this.settings.defaultValueOverride&&this.settings.defaultValueOverride!==i||this.set(i)}},{key:"_calculateVMinAndVMaxIntegerSizes",value:function(){var e=K(this.settings.maximumValue.toString().split("."),1)[0],i=K(this.settings.minimumValue||0===this.settings.minimumValue?this.settings.minimumValue.toString().split("."):[],1)[0];e=e.replace(this.settings.negativeSignCharacter,""),i=i.replace(this.settings.negativeSignCharacter,""),this.settings.mIntPos=Math.max(e.length,1),this.settings.mIntNeg=Math.max(i.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 i=this.settings[e];"true"!==i&&"false"!==i||(this.settings[e]="true"===i),"number"==typeof i&&(this.settings[e]=i.toString())}}},{key:"_setSettings",value:function(e,i){var a=1<arguments.length&&void 0!==i&&i;!a&&n.isNull(e)||this.constructor._convertOldOptionsToNewOnes(e),a?("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=O.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),a||(this.settings.originalDecimalPlaces=n.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(),n.isEmptyObj(this.settings)&&n.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=n.getElementSelection(this.domElement),this.processed=!1}},{key:"_updateEventKeyInfo",value:function(e){this.eventKey=n.character(e)}},{key:"_saveCancellableValue",value:function(){this.savedCancellableValue=this.rawValue}},{key:"_setSelection",value:function(e,i){e=Math.max(e,0),i=Math.min(i,n.getElementValue(this.domElement).length),this.selection={start:e,end:i,length:i-e},n.setElementSelection(this.domElement,e,i)}},{key:"_setCaretPosition",value:function(e){this._setSelection(e,e)}},{key:"_getLeftAndRightPartAroundTheSelection",value:function(){var e=n.getElementValue(this.domElement);return[e.substring(0,this.selection.start),e.substring(this.selection.end,e.length)]}},{key:"_getUnformattedLeftAndRightPartAroundTheSelection",value:function(){var e=K(this._getLeftAndRightPartAroundTheSelection(),2),i=e[0],a=e[1];if(""===i&&""===a)return["",""];var m=!0;return this.eventKey!==O.keyName.Hyphen&&this.eventKey!==O.keyName.Minus||0!==Number(i)||(m=!1),this.isTrailingNegative&&(n.isNegative(a,this.settings.negativeSignCharacter)&&!n.isNegative(i,this.settings.negativeSignCharacter)||""===a&&n.isNegative(i,this.settings.negativeSignCharacter,!0))&&(i=i.replace(this.settings.negativeSignCharacter,""),a=a.replace(this.settings.negativeSignCharacter,""),i=i.replace("-",""),a=a.replace("-",""),i="-".concat(i)),[i=o._stripAllNonNumberCharactersExceptCustomDecimalChar(i,this.settings,m,this.isFocused),a=o._stripAllNonNumberCharactersExceptCustomDecimalChar(a,this.settings,!1,this.isFocused)]}},{key:"_normalizeParts",value:function(e,i){var a=!0;this.eventKey!==O.keyName.Hyphen&&this.eventKey!==O.keyName.Minus||0!==Number(e)||(a=!1),this.isTrailingNegative&&n.isNegative(i,this.settings.negativeSignCharacter)&&!n.isNegative(e,this.settings.negativeSignCharacter)&&(e="-".concat(e),i=i.replace(this.settings.negativeSignCharacter,"")),e=o._stripAllNonNumberCharactersExceptCustomDecimalChar(e,this.settings,a,this.isFocused),i=o._stripAllNonNumberCharactersExceptCustomDecimalChar(i,this.settings,!1,this.isFocused),this.settings.leadingZero!==o.options.leadingZero.deny||this.eventKey!==O.keyName.num0&&this.eventKey!==O.keyName.numpad0||0!==Number(e)||n.contains(e,this.settings.decimalCharacter)||""===i||(e=e.substring(0,e.length-1));var m=e+i;if(this.settings.decimalCharacter){var v=m.match(new RegExp("^".concat(this.regex.aNegRegAutoStrip,"\\").concat(this.settings.decimalCharacter)));v&&(m=(e=e.replace(v[1],v[1]+"0"))+i)}return[e,i,m]}},{key:"_setValueParts",value:function(e,i,a){var m=2<arguments.length&&void 0!==a&&a,v=K(this._normalizeParts(e,i),3),u=v[0],T=v[1],I=v[2],j=K(o._checkIfInRangeWithOverrideOption(I,this.settings),2),y=j[0],B=j[1];if(y&&B){var R=o._truncateDecimalPlaces(I,this.settings,m,this.settings.decimalPlacesRawValue).replace(this.settings.decimalCharacter,".");if(""===R||R===this.settings.negativeSignCharacter){var Z;switch(this.settings.emptyInputBehavior){case o.options.emptyInputBehavior.focus:case o.options.emptyInputBehavior.press:case o.options.emptyInputBehavior.always:Z="";break;case o.options.emptyInputBehavior.min:Z=this.settings.minimumValue;break;case o.options.emptyInputBehavior.max:Z=this.settings.maximumValue;break;case o.options.emptyInputBehavior.zero:Z="0";break;case o.options.emptyInputBehavior.null:Z=null;break;default:Z=this.settings.emptyInputBehavior}this._setRawValue(Z)}else this._setRawValue(this._trimLeadingAndTrailingZeros(R));var z=o._truncateDecimalPlaces(I,this.settings,m,this.settings.decimalPlacesShownOnFocus),W=u.length;return W>z.length&&(W=z.length),1===W&&"0"===u&&this.settings.leadingZero===o.options.leadingZero.deny&&(W=""===T||"0"===u&&""!==T?1:0),this._setElementValue(z,!1),this._setCaretPosition(W),!0}return this._triggerRangeEvents(y,B),!1}},{key:"_getSignPosition",value:function(){var e;if(this.settings.currencySymbol){var i=this.settings.currencySymbol.length,a=n.getElementValue(this.domElement);if(this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix)e=this.settings.negativeSignCharacter&&a&&a.charAt(0)===this.settings.negativeSignCharacter?[1,i+1]:[0,i];else{var m=a.length;e=[m-i,m]}}else e=[1e3,-1];return e}},{key:"_expandSelectionOnSign",value:function(){var e=K(this._getSignPosition(),2),i=e[0],a=e[1],m=this.selection;m.start<a&&m.end>i&&((m.start<i||m.end>a)&&n.getElementValue(this.domElement).substring(Math.max(m.start,i),Math.min(m.end,a)).match(/^\s*$/)?m.start<i?this._setSelection(m.start,i):this._setSelection(a,m.end):this._setSelection(Math.min(m.start,i),Math.max(m.end,a)))}},{key:"_checkPaste",value:function(){if(!this.formatted&&!n.isUndefined(this.valuePartsBeforePaste)){var e=this.valuePartsBeforePaste,i=K(this._getLeftAndRightPartAroundTheSelection(),2),a=i[0],m=i[1];delete this.valuePartsBeforePaste;var v=a.substr(0,e[0].length)+o._stripAllNonNumberCharactersExceptCustomDecimalChar(a.substr(e[0].length),this.settings,!0,this.isFocused);this._setValueParts(v,m,!0)||(this._setElementValue(e.join(""),!1),this._setCaretPosition(e[0].length))}}},{key:"_processNonPrintableKeysAndShortcuts",value:function(e){if((e.ctrlKey||e.metaKey)&&"keyup"===e.type&&!n.isUndefined(this.valuePartsBeforePaste)||e.shiftKey&&this.eventKey===O.keyName.Insert)return this._checkPaste(),!1;if(this.constructor._shouldSkipEventKey(this.eventKey))return!0;if((e.ctrlKey||e.metaKey)&&this.eventKey===O.keyName.a)return this.settings.selectNumberOnly&&(e.preventDefault(),this.selectNumber()),!0;if((e.ctrlKey||e.metaKey)&&(this.eventKey===O.keyName.c||this.eventKey===O.keyName.v||this.eventKey===O.keyName.x))return"keydown"===e.type&&this._expandSelectionOnSign(),this.eventKey!==O.keyName.v&&this.eventKey!==O.keyName.Insert||("keydown"===e.type||"keypress"===e.type?n.isUndefined(this.valuePartsBeforePaste)&&(this.valuePartsBeforePaste=this._getLeftAndRightPartAroundTheSelection()):this._checkPaste()),"keydown"===e.type||"keypress"===e.type||this.eventKey===O.keyName.c;if(e.ctrlKey||e.metaKey)return!(this.eventKey===O.keyName.Z||this.eventKey===O.keyName.z);if(this.eventKey!==O.keyName.LeftArrow&&this.eventKey!==O.keyName.RightArrow)return n.isInArray(this.eventKey,O.keyName._directionKeys);if("keydown"===e.type&&!e.shiftKey){var i=n.getElementValue(this.domElement);this.eventKey!==O.keyName.LeftArrow||i.charAt(this.selection.start-2)!==this.settings.digitGroupSeparator&&i.charAt(this.selection.start-2)!==this.settings.decimalCharacter?this.eventKey!==O.keyName.RightArrow||i.charAt(this.selection.start+1)!==this.settings.digitGroupSeparator&&i.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 i=K(e,2),a=i[0],m=i[1],v=n.getElementValue(this.domElement),u=n.isNegative(v,this.settings.negativeSignCharacter);if(this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.suffix&&(this.eventKey===O.keyName.Backspace?(this.caretFix=this.selection.start>=v.indexOf(this.settings.suffixText)&&""!==this.settings.suffixText,"-"===v.charAt(this.selection.start-1)?a=a.substring(1):this.selection.start<=v.length-this.settings.suffixText.length&&(a=a.substring(0,a.length-1))):(this.caretFix=this.selection.start>=v.indexOf(this.settings.suffixText)&&""!==this.settings.suffixText,this.selection.start>=v.indexOf(this.settings.currencySymbol)+this.settings.currencySymbol.length&&(m=m.substring(1,m.length)),n.isNegative(a,this.settings.negativeSignCharacter)&&"-"===v.charAt(this.selection.start)&&(a=a.substring(1)))),this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix)switch(this.settings.negativePositiveSignPlacement){case o.options.negativePositiveSignPlacement.left:this.caretFix=this.selection.start>=v.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===O.keyName.Backspace?this.selection.start===v.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length&&u?a=a.substring(1):"-"!==a&&(this.selection.start<=v.indexOf(this.settings.negativeSignCharacter)||!u)&&(a=a.substring(0,a.length-1)):("-"===a[0]&&(m=m.substring(1)),this.selection.start===v.indexOf(this.settings.negativeSignCharacter)&&u&&(a=a.substring(1)));break;case o.options.negativePositiveSignPlacement.right:this.caretFix=this.selection.start>=v.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===O.keyName.Backspace?this.selection.start===v.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length?a=a.substring(1):("-"!==a&&this.selection.start<=v.indexOf(this.settings.negativeSignCharacter)-this.settings.currencySymbol.length||""!==a&&!u)&&(a=a.substring(0,a.length-1)):(this.caretFix=this.selection.start>=v.indexOf(this.settings.currencySymbol)&&""!==this.settings.currencySymbol,this.selection.start===v.indexOf(this.settings.negativeSignCharacter)&&(a=a.substring(1)),m=m.substring(1))}return[a,m]}},{key:"_processCharacterDeletion",value:function(){var e,i;if(this.selection.length){this._expandSelectionOnSign();var a=K(this._getUnformattedLeftAndRightPartAroundTheSelection(),2);e=a[0],i=a[1]}else{var m=K(this._getUnformattedLeftAndRightPartAroundTheSelection(),2);if(i=m[1],""===(e=m[0])&&""===i&&(this.throwInput=!1),this.isTrailingNegative&&n.isNegative(n.getElementValue(this.domElement),this.settings.negativeSignCharacter)){var v=K(this._processCharacterDeletionIfTrailingNegativeSign([e,i]),2);e=v[0],i=v[1]}else this.eventKey===O.keyName.Backspace?e=e.substring(0,e.length-1):i=i.substring(1,i.length)}return!!this.constructor._isWithinRangeWithOverrideOption("".concat(e).concat(i),this.settings)&&(this._setValueParts(e,i),!0)}},{key:"_isDecimalCharacterInsertionAllowed",value:function(){return String(this.settings.decimalPlacesShownOnFocus)!==String(o.options.decimalPlacesShownOnFocus.none)&&String(this.settings.decimalPlaces)!==String(o.options.decimalPlaces.none)}},{key:"_processCharacterInsertion",value:function(){var e=K(this._getUnformattedLeftAndRightPartAroundTheSelection(),2),i=e[0],a=e[1];if(this.eventKey!==O.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)i=i.replace(this.settings.decimalCharacter,""),a=a.replace(this.settings.decimalCharacter,"");else{if(n.contains(i,this.settings.decimalCharacter)||0<a.indexOf(this.settings.decimalCharacter))return!0;0===a.indexOf(this.settings.decimalCharacter)&&(a=a.substr(1))}return this.settings.negativeSignCharacter&&n.contains(a,this.settings.negativeSignCharacter)&&(i="".concat(this.settings.negativeSignCharacter).concat(i),a=a.replace(this.settings.negativeSignCharacter,"")),this._setValueParts(i+this.settings.decimalCharacter,a),!0}if(("-"===this.eventKey||"+"===this.eventKey)&&this.settings.isNegativeSignAllowed)return""===i&&n.contains(a,"-")?a=a.replace("-",""):i=n.isNegativeStrict(i,"-")?i.replace("-",""):"".concat(this.settings.negativeSignCharacter).concat(i),this._setValueParts(i,a),!0;var m=Number(this.eventKey);return 0<=m&&m<=9?(this.settings.isNegativeSignAllowed&&""===i&&n.contains(a,"-")&&(i="-",a=a.substring(1,a.length)),this.settings.maximumValue<=0&&this.settings.minimumValue<this.settings.maximumValue&&!n.contains(n.getElementValue(this.domElement),this.settings.negativeSignCharacter)&&"0"!==this.eventKey&&(i="-".concat(i)),this._setValueParts("".concat(i).concat(this.eventKey),a),!0):this.throwInput=!1}},{key:"_formatValue",value:function(e){var i=n.getElementValue(this.domElement),a=K(this._getUnformattedLeftAndRightPartAroundTheSelection(),1)[0];if((""===this.settings.digitGroupSeparator||""!==this.settings.digitGroupSeparator&&!n.contains(i,this.settings.digitGroupSeparator))&&(""===this.settings.currencySymbol||""!==this.settings.currencySymbol&&!n.contains(i,this.settings.currencySymbol))){var m=K(i.split(this.settings.decimalCharacter),1)[0],v="";n.isNegative(m,this.settings.negativeSignCharacter)&&(v=this.settings.negativeSignCharacter,m=m.replace(this.settings.negativeSignCharacter,""),a=a.replace("-","")),""===v&&m.length>this.settings.mIntPos&&"0"===a.charAt(0)&&(a=a.slice(1)),v===this.settings.negativeSignCharacter&&m.length>this.settings.mIntNeg&&"0"===a.charAt(0)&&(a=a.slice(1)),this.isTrailingNegative||(a="".concat(v).concat(a))}var u=this.constructor._addGroupSeparators(i,this.settings,this.isFocused,this.rawValue),T=u.length;if(u){var I,j=a.split("");if((this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.suffix||this.settings.negativePositiveSignPlacement!==o.options.negativePositiveSignPlacement.prefix&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix)&&j[0]===this.settings.negativeSignCharacter&&!this.settings.isNegativeSignAllowed&&(j.shift(),(this.eventKey===O.keyName.Backspace||this.eventKey===O.keyName.Delete)&&this.caretFix&&((this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.left||this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.suffix)&&(j.push(this.settings.negativeSignCharacter),this.caretFix="keydown"===e.type),this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===o.options.negativePositiveSignPlacement.right))){var y=this.settings.currencySymbol.split(""),B=["\\","^","$",".","|","?","*","+","(",")","["],R=[];y.forEach(function(W,Y){n.isInArray(Y=y[W],B)?R.push("\\"+Y):R.push(Y)}),this.eventKey===O.keyName.Backspace&&"-"===this.settings.negativeSignCharacter&&R.push("-"),j.push(R.join("")),this.caretFix="keydown"===e.type}for(var Z=0;Z<j.length;Z++)j[Z].match("\\d")||(j[Z]="\\"+j[Z]);I=this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix?new RegExp("^.*?".concat(j.join(".*?"))):new RegExp("^.*?".concat(this.settings.currencySymbol).concat(j.join(".*?")));var z=u.match(I);z?(T=z[0].length,this.settings.showPositiveSign&&(0===T&&z.input.charAt(0)===this.settings.positiveSignCharacter&&(T=1===z.input.indexOf(this.settings.currencySymbol)?this.settings.currencySymbol.length+1:1),0===T&&z.input.charAt(this.settings.currencySymbol.length)===this.settings.positiveSignCharacter&&(T=this.settings.currencySymbol.length+1)),(0===T&&u.charAt(0)!==this.settings.negativeSignCharacter||1===T&&u.charAt(0)===this.settings.negativeSignCharacter)&&this.settings.currencySymbol&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.prefix&&(T=this.settings.currencySymbol.length+(n.isNegativeStrict(u,this.settings.negativeSignCharacter)?1:0))):(this.settings.currencySymbol&&this.settings.currencySymbolPlacement===o.options.currencySymbolPlacement.suffix&&(T-=this.settings.currencySymbol.length),this.settings.suffixText&&(T-=this.settings.suffixText.length))}u!==i&&(this._setElementValue(u,!1),this._setCaretPosition(T)),this.formatted=!0}}]),ge(h,g),o}();function ee(o,h){h=h||{bubbles:!1,cancelable:!1,detail:void 0};var g=document.createEvent("CustomEvent");return g.initCustomEvent(o,h.bubbles,h.cancelable,h.detail),g}A.multiple=function(o){var h=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,g=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,e=[];if(n.isObject(h)&&(g=h,h=null),n.isString(o))o=U(document.querySelectorAll(o));else if(n.isObject(o)){Object.prototype.hasOwnProperty.call(o,"rootElement")||n.throwError("The object passed to the 'multiple' function is invalid ; no 'rootElement' attribute found.");var i=U(o.rootElement.querySelectorAll("input"));o=Object.prototype.hasOwnProperty.call(o,"exclude")?(Array.isArray(o.exclude)||n.throwError("The 'exclude' array passed to the 'multiple' function is invalid."),n.filterOut(i,o.exclude)):i}else n.isArray(o)||n.throwError("The given parameters to the 'multiple' function are invalid.");if(0===o.length){var a=!0;return!n.isNull(g)&&n.isBoolean(g.showWarnings)&&(a=g.showWarnings),n.warning("No valid DOM elements were given hence no AutoNumeric objects were instantiated.",a),[]}var m=n.isArray(h)&&1<=h.length,v=!1,u=!1;if(m){var T=ie(Number(h[0]));(v="number"===T&&!isNaN(Number(h[0])))||"string"!==T&&!isNaN(T)&&"object"!==T||(u=!0)}var I,j=!1;if(n.isArray(g)&&1<=g.length){var y=ie(g[0]);"string"!==y&&"object"!==y||(j=!0)}I=u?A.mergeOptions(h):j?A.mergeOptions(g):g;var B,R=n.isNumber(h);return v&&(B=h.length),o.forEach(function(Z,z){e.push(new A(Z,R?h:v&&z<=B?h[z]:null,I))}),e},Array.from||(Array.from=function(o){return[].slice.call(o)}),typeof window<"u"&&"function"!=typeof window.CustomEvent&&(ee.prototype=window.Event.prototype,window.CustomEvent=ee),A.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(A.events.native),Object.freeze(A.events),Object.defineProperty(A,"events",{configurable:!1,writable:!1}),A.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(o){return o%2==0},classes:["autoNumeric-even","autoNumeric-odd"]}]},rangeSmallAndZero:{userDefined:[{callback:function(o){return-1<=o&&o<0?0:0===Number(o)?1:0<o&&o<=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"}},J=A.options,Object.getOwnPropertyNames(J).forEach(function(o){"valuesToStrings"===o?Object.getOwnPropertyNames(J.valuesToStrings).forEach(function(h){n.isIE11()||null===J.valuesToStrings[h]||Object.freeze(J.valuesToStrings[h])}):"styleRules"!==o&&(n.isIE11()||null===J[o]||Object.freeze(J[o]))}),Object.freeze(J),Object.defineProperty(A,"options",{configurable:!1,writable:!1}),A.defaultSettings={allowDecimalPadding:A.options.allowDecimalPadding.always,alwaysAllowDecimalCharacter:A.options.alwaysAllowDecimalCharacter.doNotAllow,caretPositionOnFocus:A.options.caretPositionOnFocus.doNoForceCaretPosition,createLocalList:A.options.createLocalList.createList,currencySymbol:A.options.currencySymbol.none,currencySymbolPlacement:A.options.currencySymbolPlacement.prefix,decimalCharacter:A.options.decimalCharacter.dot,decimalCharacterAlternative:A.options.decimalCharacterAlternative.none,decimalPlaces:A.options.decimalPlaces.two,decimalPlacesRawValue:A.options.decimalPlacesRawValue.useDefault,decimalPlacesShownOnBlur:A.options.decimalPlacesShownOnBlur.useDefault,decimalPlacesShownOnFocus:A.options.decimalPlacesShownOnFocus.useDefault,defaultValueOverride:A.options.defaultValueOverride.doNotOverride,digitalGroupSpacing:A.options.digitalGroupSpacing.three,digitGroupSeparator:A.options.digitGroupSeparator.comma,divisorWhenUnfocused:A.options.divisorWhenUnfocused.none,emptyInputBehavior:A.options.emptyInputBehavior.focus,eventBubbles:A.options.eventBubbles.bubbles,eventIsCancelable:A.options.eventIsCancelable.isCancelable,failOnUnknownOption:A.options.failOnUnknownOption.ignore,formatOnPageLoad:A.options.formatOnPageLoad.format,formulaMode:A.options.formulaMode.disabled,historySize:A.options.historySize.medium,invalidClass:A.options.invalidClass,isCancellable:A.options.isCancellable.cancellable,leadingZero:A.options.leadingZero.deny,maximumValue:A.options.maximumValue.tenTrillions,minimumValue:A.options.minimumValue.tenTrillions,modifyValueOnWheel:A.options.modifyValueOnWheel.modifyValue,negativeBracketsTypeOnBlur:A.options.negativeBracketsTypeOnBlur.none,negativePositiveSignPlacement:A.options.negativePositiveSignPlacement.none,negativeSignCharacter:A.options.negativeSignCharacter.hyphen,noEventListeners:A.options.noEventListeners.addEvents,onInvalidPaste:A.options.onInvalidPaste.error,outputFormat:A.options.outputFormat.none,overrideMinMaxLimits:A.options.overrideMinMaxLimits.doNotOverride,positiveSignCharacter:A.options.positiveSignCharacter.plus,rawValueDivisor:A.options.rawValueDivisor.none,readOnly:A.options.readOnly.readWrite,roundingMethod:A.options.roundingMethod.halfUpSymmetric,saveValueToSessionStorage:A.options.saveValueToSessionStorage.doNotSave,selectNumberOnly:A.options.selectNumberOnly.selectNumbersOnly,selectOnFocus:A.options.selectOnFocus.select,serializeSpaces:A.options.serializeSpaces.plus,showOnlyNumbersOnFocus:A.options.showOnlyNumbersOnFocus.showAll,showPositiveSign:A.options.showPositiveSign.hide,showWarnings:A.options.showWarnings.show,styleRules:A.options.styleRules.none,suffixText:A.options.suffixText.none,symbolWhenUnfocused:A.options.symbolWhenUnfocused.none,unformatOnHover:A.options.unformatOnHover.unformat,unformatOnSubmit:A.options.unformatOnSubmit.keepCurrentValue,valuesToStrings:A.options.valuesToStrings.none,watchExternalChanges:A.options.watchExternalChanges.doNotWatch,wheelOn:A.options.wheelOn.focus,wheelStep:A.options.wheelStep.progressive},Object.freeze(A.defaultSettings),Object.defineProperty(A,"defaultSettings",{configurable:!1,writable:!1});var Q={digitGroupSeparator:A.options.digitGroupSeparator.dot,decimalCharacter:A.options.decimalCharacter.comma,decimalCharacterAlternative:A.options.decimalCharacterAlternative.dot,currencySymbol:"\u202f\u20ac",currencySymbolPlacement:A.options.currencySymbolPlacement.suffix,negativePositiveSignPlacement:A.options.negativePositiveSignPlacement.prefix},$={digitGroupSeparator:A.options.digitGroupSeparator.comma,decimalCharacter:A.options.decimalCharacter.dot,currencySymbol:A.options.currencySymbol.dollar,currencySymbolPlacement:A.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:A.options.negativePositiveSignPlacement.right},ce={digitGroupSeparator:A.options.digitGroupSeparator.comma,decimalCharacter:A.options.decimalCharacter.dot,currencySymbol:A.options.currencySymbol.yen,currencySymbolPlacement:A.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:A.options.negativePositiveSignPlacement.right};n.cloneObject(Q).formulaMode=A.options.formulaMode.enabled;var Ee=n.cloneObject(Q);Ee.minimumValue=0;var Pe=n.cloneObject(Q);Pe.maximumValue=0,Pe.negativePositiveSignPlacement=A.options.negativePositiveSignPlacement.prefix;var be=n.cloneObject(Q);be.digitGroupSeparator=A.options.digitGroupSeparator.normalSpace;var Ce=n.cloneObject(be);Ce.minimumValue=0;var Me=n.cloneObject(be);Me.maximumValue=0,Me.negativePositiveSignPlacement=A.options.negativePositiveSignPlacement.prefix;var pe=n.cloneObject(Q);pe.currencySymbol=A.options.currencySymbol.none,pe.suffixText="\u202f".concat(A.options.suffixText.percentage),pe.wheelStep=1e-4,pe.rawValueDivisor=A.options.rawValueDivisor.percentage;var we=n.cloneObject(pe);we.minimumValue=0;var ke=n.cloneObject(pe);ke.maximumValue=0,ke.negativePositiveSignPlacement=A.options.negativePositiveSignPlacement.prefix;var ve=n.cloneObject(pe);ve.decimalPlaces=3;var Re=n.cloneObject(we);Re.decimalPlaces=3;var De=n.cloneObject(ke);De.decimalPlaces=3,n.cloneObject($).formulaMode=A.options.formulaMode.enabled;var Be=n.cloneObject($);Be.minimumValue=0;var Te=n.cloneObject($);Te.maximumValue=0,Te.negativePositiveSignPlacement=A.options.negativePositiveSignPlacement.prefix;var Ue=n.cloneObject(Te);Ue.negativeBracketsTypeOnBlur=A.options.negativeBracketsTypeOnBlur.parentheses;var fe=n.cloneObject($);fe.currencySymbol=A.options.currencySymbol.none,fe.suffixText=A.options.suffixText.percentage,fe.wheelStep=1e-4,fe.rawValueDivisor=A.options.rawValueDivisor.percentage;var Ie=n.cloneObject(fe);Ie.minimumValue=0;var Oe=n.cloneObject(fe);Oe.maximumValue=0,Oe.negativePositiveSignPlacement=A.options.negativePositiveSignPlacement.prefix;var Ze=n.cloneObject(fe);Ze.decimalPlaces=3;var Ge=n.cloneObject(Ie);Ge.decimalPlaces=3;var je=n.cloneObject(Oe);je.decimalPlaces=3;var ze=n.cloneObject(Q);ze.currencySymbol=A.options.currencySymbol.lira,A.predefinedOptions={euro:Q,euroPos:Ee,euroNeg:Pe,euroSpace:be,euroSpacePos:Ce,euroSpaceNeg:Me,percentageEU2dec:pe,percentageEU2decPos:we,percentageEU2decNeg:ke,percentageEU3dec:ve,percentageEU3decPos:Re,percentageEU3decNeg:De,dollar:$,dollarPos:Be,dollarNeg:Te,dollarNegBrackets:Ue,percentageUS2dec:fe,percentageUS2decPos:Ie,percentageUS2decNeg:Oe,percentageUS3dec:Ze,percentageUS3decPos:Ge,percentageUS3decNeg:je,French:Q,Spanish:Q,NorthAmerican:$,British:{digitGroupSeparator:A.options.digitGroupSeparator.comma,decimalCharacter:A.options.decimalCharacter.dot,currencySymbol:A.options.currencySymbol.pound,currencySymbolPlacement:A.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:A.options.negativePositiveSignPlacement.right},Swiss:{digitGroupSeparator:A.options.digitGroupSeparator.apostrophe,decimalCharacter:A.options.decimalCharacter.dot,currencySymbol:"\u202fCHF",currencySymbolPlacement:A.options.currencySymbolPlacement.suffix,negativePositiveSignPlacement:A.options.negativePositiveSignPlacement.prefix},Japanese:ce,Chinese:ce,Brazilian:{digitGroupSeparator:A.options.digitGroupSeparator.dot,decimalCharacter:A.options.decimalCharacter.comma,currencySymbol:A.options.currencySymbol.real,currencySymbolPlacement:A.options.currencySymbolPlacement.prefix,negativePositiveSignPlacement:A.options.negativePositiveSignPlacement.right},Turkish:ze,dotDecimalCharCommaSeparator:{digitGroupSeparator:A.options.digitGroupSeparator.comma,decimalCharacter:A.options.decimalCharacter.dot},commaDecimalCharDotSeparator:{digitGroupSeparator:A.options.digitGroupSeparator.dot,decimalCharacter:A.options.decimalCharacter.comma,decimalCharacterAlternative:A.options.decimalCharacterAlternative.dot},integer:{decimalPlaces:0},integerPos:{minimumValue:A.options.minimumValue.zero,decimalPlaces:0},integerNeg:{maximumValue:A.options.maximumValue.zero,decimalPlaces:0},float:{allowDecimalPadding:A.options.allowDecimalPadding.never},floatPos:{allowDecimalPadding:A.options.allowDecimalPadding.never,minimumValue:A.options.minimumValue.zero,maximumValue:A.options.maximumValue.tenTrillions},floatNeg:{allowDecimalPadding:A.options.allowDecimalPadding.never,minimumValue:A.options.minimumValue.tenTrillions,maximumValue:A.options.maximumValue.zero},numeric:{digitGroupSeparator:A.options.digitGroupSeparator.noSeparator,decimalCharacter:A.options.decimalCharacter.dot,currencySymbol:A.options.currencySymbol.none},numericPos:{digitGroupSeparator:A.options.digitGroupSeparator.noSeparator,decimalCharacter:A.options.decimalCharacter.dot,currencySymbol:A.options.currencySymbol.none,minimumValue:A.options.minimumValue.zero,maximumValue:A.options.maximumValue.tenTrillions},numericNeg:{digitGroupSeparator:A.options.digitGroupSeparator.noSeparator,decimalCharacter:A.options.decimalCharacter.dot,currencySymbol:A.options.currencySymbol.none,minimumValue:A.options.minimumValue.tenTrillions,maximumValue:A.options.maximumValue.zero}},Object.getOwnPropertyNames(A.predefinedOptions).forEach(function(o){Object.freeze(A.predefinedOptions[o])}),Object.freeze(A.predefinedOptions),Object.defineProperty(A,"predefinedOptions",{configurable:!1,writable:!1}),t.default=A}],S.c=M,S.d=function(N,t,F){S.o(N,t)||Object.defineProperty(N,t,{enumerable:!0,get:F})},S.r=function(N){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(N,"__esModule",{value:!0})},S.t=function(N,t){if(1&t&&(N=S(N)),8&t||4&t&&"object"==typeof N&&N&&N.__esModule)return N;var F=Object.create(null);if(S.r(F),Object.defineProperty(F,"default",{enumerable:!0,value:N}),2&t&&"string"!=typeof N)for(var x in N)S.d(F,x,function(O){return N[O]}.bind(null,x));return F},S.n=function(N){var t=N&&N.__esModule?function(){return N.default}:function(){return N};return S.d(t,"a",t),t},S.o=function(N,t){return Object.prototype.hasOwnProperty.call(N,t)},S.p="",S(S.s=0).default;function S(N){if(M[N])return M[N].exports;var t=M[N]={i:N,l:!1,exports:{}};return C[N].call(t.exports,t,t.exports,S),t.l=!0,t.exports}var C,M}()},7243:(H,S,C)=>{"use strict";var N=G(C(9721)),F=G(C(4070)),O=G(C(6162)),V=G(C(3800)),l=G(C(1731)),d=G(C(70)),p=G(C(3930)),P=C(7497),D=G(C(7850));function G(J){return J&&J.__esModule?J:{default:J}}var U=function(){},K=function(A,ee,Q){var $=new U;if(typeof A>"u")throw Error("No element to render on was provided.");return $._renderProperties=(0,l.default)(A),$._encodings=[],$._options=D.default,$._errorHandler=new p.default($),typeof ee<"u"&&((Q=Q||{}).format||(Q.format=ie()),$.options(Q)[Q.format](ee,Q).render()),$};for(var ae in K.getModule=function(J){return N.default[J]},N.default)N.default.hasOwnProperty(ae)&&me(N.default,ae);function me(J,A){U.prototype[A]=U.prototype[A.toUpperCase()]=U.prototype[A.toLowerCase()]=function(ee,Q){var $=this;return $._errorHandler.wrapBarcodeCall(function(){Q.text=typeof Q.text>"u"?void 0:""+Q.text;var ce=(0,F.default)($._options,Q);ce=(0,d.default)(ce);var Pe=le(ee,J[A],ce);return $._encodings.push(Pe),$})}}function le(J,A,ee){var Q=new A(J=""+J,ee);if(!Q.valid())throw new P.InvalidInputException(Q.constructor.name,J);var $=Q.encode();$=(0,O.default)($);for(var ce=0;ce<$.length;ce++)$[ce].options=(0,F.default)(ee,$[ce].options);return $}function ie(){return N.default.CODE128?"CODE128":Object.keys(N.default)[0]}function ge(J,A,ee){A=(0,O.default)(A);for(var Q=0;Q<A.length;Q++)A[Q].options=(0,F.default)(ee,A[Q].options),(0,V.default)(A[Q].options);(0,V.default)(ee),new(0,J.renderer)(J.element,A,ee).render(),J.afterRender&&J.afterRender()}U.prototype.options=function(J){return this._options=(0,F.default)(this._options,J),this},U.prototype.blank=function(J){var A=new Array(J+1).join("0");return this._encodings.push({data:A}),this},U.prototype.init=function(){var J;if(this._renderProperties)for(var A in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){var ee=(0,F.default)(this._options,(J=this._renderProperties[A]).options);"auto"==ee.format&&(ee.format=ie()),this._errorHandler.wrapBarcodeCall(function(){var ce=le(ee.value,N.default[ee.format.toUpperCase()],ee);ge(J,ce,ee)})}},U.prototype.render=function(){if(!this._renderProperties)throw new P.NoElementException;if(Array.isArray(this._renderProperties))for(var J=0;J<this._renderProperties.length;J++)ge(this._renderProperties[J],this._encodings,this._options);else ge(this._renderProperties,this._encodings,this._options);return this},U.prototype._defaults=D.default,typeof window<"u"&&(window.JsBarcode=K),typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(J,A){var ee=[];return jQuery(this).each(function(){ee.push(this)}),K(ee,J,A)}),H.exports=K},4648:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function N(t,F){(function C(N,t){if(!(N instanceof t))throw new TypeError("Cannot call a class as a function")})(this,N),this.data=t,this.text=F.text||t,this.options=F}},6106:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function l(c,d){for(var n=0;n<d.length;n++){var p=d[n];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,n){return d&&l(c.prototype,d),n&&l(c,n),c}}(),t=function x(l){return l&&l.__esModule?l:{default:l}}(C(4648)),F=C(9068),b=function(l){function c(d,n){!function O(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}(this,c);var p=function k(l,c){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!c||"object"!=typeof c&&"function"!=typeof c?l:c}(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,d.substring(1),n));return p.bytes=d.split("").map(function(P){return P.charCodeAt(0)}),p}return function V(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(l,c):l.__proto__=c)}(c,l),M(c,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var n=this.bytes,p=n.shift()-105,P=F.SET_BY_CODE[p];if(void 0===P)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&n.unshift(F.FNC1);var E=c.next(n,1,P);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:c.getBar(p)+E.result+c.getBar((E.checksum+p)%F.MODULO)+c.getBar(F.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var n=this.options.ean128||!1;return"string"==typeof n&&(n="true"===n.toLowerCase()),n}}],[{key:"getBar",value:function(n){return F.BARS[n]?F.BARS[n].toString():""}},{key:"correctIndex",value:function(n,p){if(p===F.SET_A){var P=n.shift();return P<32?P+64:P-32}return p===F.SET_B?n.shift()-32:10*(n.shift()-48)+n.shift()-48}},{key:"next",value:function(n,p,P){if(!n.length)return{result:"",checksum:0};var E=void 0,D=void 0;if(n[0]>=200){D=n.shift()-105;var G=F.SWAP[D];void 0!==G?E=c.next(n,p+1,G):((P===F.SET_A||P===F.SET_B)&&D===F.SHIFT&&(n[0]=P===F.SET_A?n[0]>95?n[0]-96:n[0]:n[0]<32?n[0]+96:n[0]),E=c.next(n,p+1,P))}else D=c.correctIndex(n,P),E=c.next(n,p+1,P);return{result:c.getBar(D)+E.result,checksum:D*p+E.checksum}}}]),c}(t.default);S.default=b},8964:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function l(c,d){for(var n=0;n<d.length;n++){var p=d[n];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,n){return d&&l(c.prototype,d),n&&l(c,n),c}}(),t=function x(l){return l&&l.__esModule?l:{default:l}}(C(6106)),F=C(9068),b=function(l){function c(d,n){return function O(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}(this,c),function k(l,c){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!c||"object"!=typeof c&&"function"!=typeof c?l:c}(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,F.A_START_CHAR+d,n))}return function V(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(l,c):l.__proto__=c)}(c,l),M(c,[{key:"valid",value:function(){return new RegExp("^"+F.A_CHARS+"+$").test(this.data)}}]),c}(t.default);S.default=b},3254:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function l(c,d){for(var n=0;n<d.length;n++){var p=d[n];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,n){return d&&l(c.prototype,d),n&&l(c,n),c}}(),t=function x(l){return l&&l.__esModule?l:{default:l}}(C(6106)),F=C(9068),b=function(l){function c(d,n){return function O(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}(this,c),function k(l,c){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!c||"object"!=typeof c&&"function"!=typeof c?l:c}(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,F.B_START_CHAR+d,n))}return function V(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(l,c):l.__proto__=c)}(c,l),M(c,[{key:"valid",value:function(){return new RegExp("^"+F.B_CHARS+"+$").test(this.data)}}]),c}(t.default);S.default=b},5701:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function l(c,d){for(var n=0;n<d.length;n++){var p=d[n];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,n){return d&&l(c.prototype,d),n&&l(c,n),c}}(),t=function x(l){return l&&l.__esModule?l:{default:l}}(C(6106)),F=C(9068),b=function(l){function c(d,n){return function O(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}(this,c),function k(l,c){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!c||"object"!=typeof c&&"function"!=typeof c?l:c}(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,F.C_START_CHAR+d,n))}return function V(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(l,c):l.__proto__=c)}(c,l),M(c,[{key:"valid",value:function(){return new RegExp("^"+F.C_CHARS+"+$").test(this.data)}}]),c}(t.default);S.default=b},5626:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var N=x(C(6106)),F=x(C(4779));function x(l){return l&&l.__esModule?l:{default:l}}function k(l,c){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!c||"object"!=typeof c&&"function"!=typeof c?l:c}var b=function(l){function c(d,n){if(function O(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}(this,c),/^[\x00-\x7F\xC8-\xD3]+$/.test(d))var p=k(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,(0,F.default)(d),n));else p=k(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,d,n));return k(p)}return function V(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(l,c):l.__proto__=c)}(c,l),c}(N.default);S.default=b},4779:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=C(9068),N=function(V){return V.match(new RegExp("^"+M.A_CHARS+"*"))[0].length},t=function(V){return V.match(new RegExp("^"+M.B_CHARS+"*"))[0].length},F=function(V){return V.match(new RegExp("^"+M.C_CHARS+"*"))[0]};function x(k,V){var b=V?M.A_CHARS:M.B_CHARS,l=k.match(new RegExp("^("+b+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(l)return l[1]+String.fromCharCode(204)+O(k.substring(l[1].length));var c=k.match(new RegExp("^"+b+"+"))[0];return c.length===k.length?k:c+String.fromCharCode(V?205:206)+x(k.substring(c.length),!V)}function O(k){var V=F(k),b=V.length;if(b===k.length)return k;k=k.substring(b);var l=N(k)>=t(k);return V+String.fromCharCode(l?206:205)+x(k,l)}S.default=function(k){var V=void 0;if(F(k).length>=2)V=M.C_START_CHAR+O(k);else{var l=N(k)>t(k);V=(l?M.A_START_CHAR:M.B_START_CHAR)+x(k,l)}return V.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(c,d){return String.fromCharCode(203)+d})}},9068:(H,S)=>{"use strict";var C;function M(ae,me,le){return me in ae?Object.defineProperty(ae,me,{value:le,enumerable:!0,configurable:!0,writable:!0}):ae[me]=le,ae}Object.defineProperty(S,"__esModule",{value:!0});var N=S.SET_A=0,t=S.SET_B=1,F=S.SET_C=2,O=(S.SHIFT=98,S.START_A=103),k=S.START_B=104,V=S.START_C=105;S.MODULO=103,S.STOP=106,S.FNC1=207,S.SET_BY_CODE=(M(C={},O,N),M(C,k,t),M(C,V,F),C),S.SWAP={101:N,100:t,99:F},S.A_START_CHAR=String.fromCharCode(208),S.B_START_CHAR=String.fromCharCode(209),S.C_START_CHAR=String.fromCharCode(210),S.A_CHARS="[\0-_\xc8-\xcf]",S.B_CHARS="[ -\x7f\xc8-\xcf]",S.C_CHARS="(\xcf*[0-9]{2}\xcf*)",S.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]},6038:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.CODE128C=S.CODE128B=S.CODE128A=S.CODE128=void 0;var N=b(C(5626)),F=b(C(8964)),O=b(C(3254)),V=b(C(5701));function b(l){return l&&l.__esModule?l:{default:l}}S.CODE128=N.default,S.CODE128A=F.default,S.CODE128B=O.default,S.CODE128C=V.default},528:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.CODE39=void 0;var M=function(){function E(D,G){for(var U=0;U<G.length;U++){var K=G[U];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(D,K.key,K)}}return function(D,G,U){return G&&E(D.prototype,G),U&&E(D,U),D}}(),V=function(E){function D(G,U){return function x(E,D){if(!(E instanceof D))throw new TypeError("Cannot call a class as a function")}(this,D),G=G.toUpperCase(),U.mod43&&(G+=function n(E){return b[E]}(function P(E){for(var D=0,G=0;G<E.length;G++)D+=p(E[G]);return D%43}(G))),function O(E,D){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!D||"object"!=typeof D&&"function"!=typeof D?E:D}(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,G,U))}return function k(E,D){if("function"!=typeof D&&null!==D)throw new TypeError("Super expression must either be null or a function, not "+typeof D);E.prototype=Object.create(D&&D.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(E,D):E.__proto__=D)}(D,E),M(D,[{key:"encode",value:function(){for(var U=c("*"),K=0;K<this.data.length;K++)U+=c(this.data[K])+"0";return{data:U+=c("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),D}(function F(E){return E&&E.__esModule?E:{default:E}}(C(4648)).default),b=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],l=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function c(E){return function d(E){return l[E].toString(2)}(p(E))}function p(E){return b.indexOf(E)}S.CODE39=V},7417:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function d(n,p){for(var P=0;P<p.length;P++){var E=p[P];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(n,E.key,E)}}return function(n,p,P){return p&&d(n.prototype,p),P&&d(n,P),n}}(),N=C(3819),F=k(C(9259));function k(d){return d&&d.__esModule?d:{default:d}}var c=function(d){function n(p,P){!function V(d,n){if(!(d instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);var E=function b(d,n){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?d:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,p,P));return E.fontSize=!P.flat&&P.fontSize>10*P.width?10*P.width:P.fontSize,E.guardHeight=P.height+E.fontSize/2+P.textMargin,E}return function l(d,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);d.prototype=Object.create(n&&n.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(d,n):d.__proto__=n)}(n,d),M(n,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(P,E){return this.text.substr(P,E)}},{key:"leftEncode",value:function(P,E){return(0,F.default)(P,E)}},{key:"rightText",value:function(P,E){return this.text.substr(P,E)}},{key:"rightEncode",value:function(P,E){return(0,F.default)(P,E)}},{key:"encodeGuarded",value:function(){var P={fontSize:this.fontSize},E={height:this.guardHeight};return[{data:N.SIDE_BIN,options:E},{data:this.leftEncode(),text:this.leftText(),options:P},{data:N.MIDDLE_BIN,options:E},{data:this.rightEncode(),text:this.rightText(),options:P},{data:N.SIDE_BIN,options:E}]}},{key:"encodeFlat",value:function(){return{data:[N.SIDE_BIN,this.leftEncode(),N.MIDDLE_BIN,this.rightEncode(),N.SIDE_BIN].join(""),text:this.text}}}]),n}(k(C(4648)).default);S.default=c},6195:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function d(n,p){for(var P=0;P<p.length;P++){var E=p[P];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(n,E.key,E)}}return function(n,p,P){return p&&d(n.prototype,p),P&&d(n,P),n}}(),N=function d(n,p,P){null===n&&(n=Function.prototype);var E=Object.getOwnPropertyDescriptor(n,p);if(void 0===E){var D=Object.getPrototypeOf(n);return null===D?void 0:d(D,p,P)}if("value"in E)return E.value;var G=E.get;return void 0===G?void 0:G.call(P)},t=C(3819),x=function O(d){return d&&d.__esModule?d:{default:d}}(C(7417)),l=function(n){return(10-n.substr(0,12).split("").map(function(P){return+P}).reduce(function(P,E,D){return D%2?P+3*E:P+E},0)%10)%10},c=function(d){function n(p,P){(function k(d,n){if(!(d instanceof n))throw new TypeError("Cannot call a class as a function")})(this,n),-1!==p.search(/^[0-9]{12}$/)&&(p+=l(p));var E=function V(d,n){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?d:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,p,P));return E.lastChar=P.lastChar,E}return function b(d,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);d.prototype=Object.create(n&&n.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(d,n):d.__proto__=n)}(n,d),M(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===l(this.data)}},{key:"leftText",value:function(){return N(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var P=this.data.substr(1,6),E=t.EAN13_STRUCTURE[this.data[0]];return N(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"leftEncode",this).call(this,P,E)}},{key:"rightText",value:function(){return N(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var P=this.data.substr(7,6);return N(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"rightEncode",this).call(this,P,"RRRRRR")}},{key:"encodeGuarded",value:function(){var P=N(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(P.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(P.push({data:"00"}),P.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),P}}]),n}(x.default);S.default=c},4500:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function d(n,p){for(var P=0;P<p.length;P++){var E=p[P];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(n,E.key,E)}}return function(n,p,P){return p&&d(n.prototype,p),P&&d(n,P),n}}(),N=C(3819),F=k(C(9259));function k(d){return d&&d.__esModule?d:{default:d}}var c=function(d){function n(p,P){return function V(d,n){if(!(d instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function b(d,n){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?d:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,p,P))}return function l(d,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);d.prototype=Object.create(n&&n.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(d,n):d.__proto__=n)}(n,d),M(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var P=N.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,F.default)(this.data,P,"01"),text:this.text}}}]),n}(k(C(4648)).default);S.default=c},5174:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function n(p,P){for(var E=0;E<P.length;E++){var D=P[E];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(p,D.key,D)}}return function(p,P,E){return P&&n(p.prototype,P),E&&n(p,E),p}}(),N=C(3819),F=k(C(9259));function k(n){return n&&n.__esModule?n:{default:n}}var d=function(n){function p(P,E){return function V(n,p){if(!(n instanceof p))throw new TypeError("Cannot call a class as a function")}(this,p),function b(n,p){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!p||"object"!=typeof p&&"function"!=typeof p?n:p}(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,P,E))}return function l(n,p){if("function"!=typeof p&&null!==p)throw new TypeError("Super expression must either be null or a function, not "+typeof p);n.prototype=Object.create(p&&p.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(n,p):n.__proto__=p)}(p,n),M(p,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var E=N.EAN5_STRUCTURE[function(p){return p.split("").map(function(E){return+E}).reduce(function(E,D,G){return G%2?E+9*D:E+3*D},0)%10}(this.data)];return{data:"1011"+(0,F.default)(this.data,E,"01"),text:this.text}}}]),p}(k(C(4648)).default);S.default=d},2523:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function c(d,n){for(var p=0;p<n.length;p++){var P=n[p];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(d,P.key,P)}}return function(d,n,p){return n&&c(d.prototype,n),p&&c(d,p),d}}(),N=function c(d,n,p){null===d&&(d=Function.prototype);var P=Object.getOwnPropertyDescriptor(d,n);if(void 0===P){var E=Object.getPrototypeOf(d);return null===E?void 0:c(E,n,p)}if("value"in P)return P.value;var D=P.get;return void 0===D?void 0:D.call(p)},F=function x(c){return c&&c.__esModule?c:{default:c}}(C(7417)),b=function(d){return(10-d.substr(0,7).split("").map(function(p){return+p}).reduce(function(p,P,E){return E%2?p+P:p+3*P},0)%10)%10},l=function(c){function d(n,p){return function O(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}(this,d),-1!==n.search(/^[0-9]{7}$/)&&(n+=b(n)),function k(c,d){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!d||"object"!=typeof d&&"function"!=typeof d?c:d}(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,n,p))}return function V(c,d){if("function"!=typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);c.prototype=Object.create(d&&d.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(c,d):c.__proto__=d)}(d,c),M(d,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===b(this.data)}},{key:"leftText",value:function(){return N(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var p=this.data.substr(0,4);return N(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"leftEncode",this).call(this,p,"LLLL")}},{key:"rightText",value:function(){return N(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var p=this.data.substr(4,4);return N(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"rightEncode",this).call(this,p,"RRRR")}}]),d}(F.default);S.default=l},4102:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function d(n,p){for(var P=0;P<p.length;P++){var E=p[P];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(n,E.key,E)}}return function(n,p,P){return p&&d(n.prototype,p),P&&d(n,P),n}}();S.checksum=c;var t=O(C(9259));function O(d){return d&&d.__esModule?d:{default:d}}var l=function(d){function n(p,P){(function k(d,n){if(!(d instanceof n))throw new TypeError("Cannot call a class as a function")})(this,n),-1!==p.search(/^[0-9]{11}$/)&&(p+=c(p));var E=function V(d,n){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?d:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,p,P));return E.displayValue=P.displayValue,E.fontSize=P.fontSize>10*P.width?10*P.width:P.fontSize,E.guardHeight=P.height+E.fontSize/2+P.textMargin,E}return function b(d,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);d.prototype=Object.create(n&&n.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(d,n):d.__proto__=n)}(n,d),M(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==c(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var P="";return P+="101",P+=(0,t.default)(this.data.substr(0,6),"LLLLLL"),P+="01010",P+=(0,t.default)(this.data.substr(6,6),"RRRRRR"),{data:P+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var P=[];return this.displayValue&&P.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),P.push({data:"101"+(0,t.default)(this.data[0],"L"),options:{height:this.guardHeight}}),P.push({data:(0,t.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),P.push({data:"01010",options:{height:this.guardHeight}}),P.push({data:(0,t.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),P.push({data:(0,t.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&P.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),P}}]),n}(O(C(4648)).default);function c(d){var p,n=0;for(p=1;p<11;p+=2)n+=parseInt(d[p]);for(p=0;p<11;p+=2)n+=3*parseInt(d[p]);return(10-n%10)%10}S.default=l},1285:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function P(E,D){for(var G=0;G<D.length;G++){var U=D[G];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(E,U.key,U)}}return function(E,D,G){return D&&P(E.prototype,D),G&&P(E,G),E}}(),t=k(C(9259)),x=k(C(4648)),O=C(4102);function k(P){return P&&P.__esModule?P:{default:P}}function b(P,E){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!E||"object"!=typeof E&&"function"!=typeof E?P:E}var c=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],d=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],n=function(P){function E(D,G){!function V(P,E){if(!(P instanceof E))throw new TypeError("Cannot call a class as a function")}(this,E);var U=b(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,D,G));if(U.isValid=!1,-1!==D.search(/^[0-9]{6}$/))U.middleDigits=D,U.upcA=p(D,"0"),U.text=G.text||""+U.upcA[0]+D+U.upcA[U.upcA.length-1],U.isValid=!0;else{if(-1===D.search(/^[01][0-9]{7}$/))return b(U);if(U.middleDigits=D.substring(1,D.length-1),U.upcA=p(U.middleDigits,D[0]),U.upcA[U.upcA.length-1]!==D[D.length-1])return b(U);U.isValid=!0}return U.displayValue=G.displayValue,U.fontSize=G.fontSize>10*G.width?10*G.width:G.fontSize,U.guardHeight=G.height+U.fontSize/2+G.textMargin,U}return function l(P,E){if("function"!=typeof E&&null!==E)throw new TypeError("Super expression must either be null or a function, not "+typeof E);P.prototype=Object.create(E&&E.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(P,E):P.__proto__=E)}(E,P),M(E,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var G="";return G+="101",G+=this.encodeMiddleDigits(),{data:G+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var G=[];return this.displayValue&&G.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),G.push({data:"101",options:{height:this.guardHeight}}),G.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),G.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&G.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),G}},{key:"encodeMiddleDigits",value:function(){var G=this.upcA[0],K=d[parseInt(this.upcA[this.upcA.length-1])][parseInt(G)];return(0,t.default)(this.middleDigits,K)}}]),E}(x.default);function p(P,E){for(var D=parseInt(P[P.length-1]),G=c[D],U="",K=0,ae=0;ae<G.length;ae++){var me=G[ae];U+="X"===me?P[K++]:me}return(U=""+E+U)+(0,O.checksum)(U)}S.default=n},3819:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.SIDE_BIN="101",S.MIDDLE_BIN="01010",S.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},S.EAN2_STRUCTURE=["LL","LG","GL","GG"],S.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],S.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},9259:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=C(3819);S.default=function(F,x,O){var k=F.split("").map(function(b,l){return M.BINARIES[x[l]]}).map(function(b,l){return b?b[F[l]]:""});if(O){var V=F.length-1;k=k.map(function(b,l){return l<V?b+O:b})}return k.join("")}},7422:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.UPCE=S.UPC=S.EAN2=S.EAN5=S.EAN8=S.EAN13=void 0;var N=n(C(6195)),F=n(C(2523)),O=n(C(5174)),V=n(C(4500)),l=n(C(4102)),d=n(C(1285));function n(p){return p&&p.__esModule?p:{default:p}}S.EAN13=N.default,S.EAN8=F.default,S.EAN5=O.default,S.EAN2=V.default,S.UPC=l.default,S.UPCE=d.default},791:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.GenericBarcode=void 0;var M=function(){function b(l,c){for(var d=0;d<c.length;d++){var n=c[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(l,n.key,n)}}return function(l,c,d){return c&&b(l.prototype,c),d&&b(l,d),l}}(),V=function(b){function l(c,d){return function x(b,l){if(!(b instanceof l))throw new TypeError("Cannot call a class as a function")}(this,l),function O(b,l){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!l||"object"!=typeof l&&"function"!=typeof l?b:l}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,c,d))}return function k(b,l){if("function"!=typeof l&&null!==l)throw new TypeError("Super expression must either be null or a function, not "+typeof l);b.prototype=Object.create(l&&l.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(b,l):b.__proto__=l)}(l,b),M(l,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),l}(function F(b){return b&&b.__esModule?b:{default:b}}(C(4648)).default);S.GenericBarcode=V},3435:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function l(c,d){for(var n=0;n<d.length;n++){var p=d[n];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,n){return d&&l(c.prototype,d),n&&l(c,n),c}}(),N=C(5306);function O(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}function k(l,c){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!c||"object"!=typeof c&&"function"!=typeof c?l:c}var b=function(l){function c(){return O(this,c),k(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}return function V(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(l,c):l.__proto__=c)}(c,l),M(c,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var n=this,p=this.data.match(/.{2}/g).map(function(P){return n.encodePair(P)}).join("");return{data:N.START_BIN+p+N.END_BIN,text:this.text}}},{key:"encodePair",value:function(n){var p=N.BINARIES[n[1]];return N.BINARIES[n[0]].split("").map(function(P,E){return("1"===P?"111":"1")+("1"===p[E]?"000":"0")}).join("")}}]),c}(function x(l){return l&&l.__esModule?l:{default:l}}(C(4648)).default);S.default=b},580:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function l(c,d){for(var n=0;n<d.length;n++){var p=d[n];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,n){return d&&l(c.prototype,d),n&&l(c,n),c}}(),t=function F(l){return l&&l.__esModule?l:{default:l}}(C(3435)),V=function(c){var d=c.substr(0,13).split("").map(function(n){return parseInt(n,10)}).reduce(function(n,p,P){return n+p*(3-P%2*2)},0);return 10*Math.ceil(d/10)-d},b=function(l){function c(d,n){return function x(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}(this,c),-1!==d.search(/^[0-9]{13}$/)&&(d+=V(d)),function O(l,c){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!c||"object"!=typeof c&&"function"!=typeof c?l:c}(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,d,n))}return function k(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(l,c):l.__proto__=c)}(c,l),M(c,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===V(this.data)}}]),c}(t.default);S.default=b},5306:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.START_BIN="1010",S.END_BIN="11101",S.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},7191:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.ITF14=S.ITF=void 0;var N=x(C(3435)),F=x(C(580));function x(O){return O&&O.__esModule?O:{default:O}}S.ITF=N.default,S.ITF14=F.default},6431:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function l(c,d){for(var n=0;n<d.length;n++){var p=d[n];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}return function(c,d,n){return d&&l(c.prototype,d),n&&l(c,n),c}}(),V=function(l){function c(d,n){return function x(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}(this,c),function O(l,c){if(!l)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!c||"object"!=typeof c&&"function"!=typeof c?l:c}(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,d,n))}return function k(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(l,c):l.__proto__=c)}(c,l),M(c,[{key:"encode",value:function(){for(var n="110",p=0;p<this.data.length;p++){var E=parseInt(this.data[p]).toString(2);E=b(E,4-E.length);for(var D=0;D<E.length;D++)n+="0"==E[D]?"100":"110"}return{data:n+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),c}(function F(l){return l&&l.__esModule?l:{default:l}}(C(4648)).default);function b(l,c){for(var d=0;d<c;d++)l="0"+l;return l}S.default=V},7218:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var N=function F(b){return b&&b.__esModule?b:{default:b}}(C(6431)),t=C(6855),V=function(b){function l(c,d){return function x(b,l){if(!(b instanceof l))throw new TypeError("Cannot call a class as a function")}(this,l),function O(b,l){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!l||"object"!=typeof l&&"function"!=typeof l?b:l}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,c+(0,t.mod10)(c),d))}return function k(b,l){if("function"!=typeof l&&null!==l)throw new TypeError("Super expression must either be null or a function, not "+typeof l);b.prototype=Object.create(l&&l.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(b,l):b.__proto__=l)}(l,b),l}(N.default);S.default=V},9762:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var N=function F(b){return b&&b.__esModule?b:{default:b}}(C(6431)),t=C(6855),V=function(b){function l(c,d){return function x(b,l){if(!(b instanceof l))throw new TypeError("Cannot call a class as a function")}(this,l),c+=(0,t.mod10)(c),c+=(0,t.mod10)(c),function O(b,l){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!l||"object"!=typeof l&&"function"!=typeof l?b:l}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,c,d))}return function k(b,l){if("function"!=typeof l&&null!==l)throw new TypeError("Super expression must either be null or a function, not "+typeof l);b.prototype=Object.create(l&&l.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(b,l):b.__proto__=l)}(l,b),l}(N.default);S.default=V},3117:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var N=function F(b){return b&&b.__esModule?b:{default:b}}(C(6431)),t=C(6855),V=function(b){function l(c,d){return function x(b,l){if(!(b instanceof l))throw new TypeError("Cannot call a class as a function")}(this,l),function O(b,l){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!l||"object"!=typeof l&&"function"!=typeof l?b:l}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,c+(0,t.mod11)(c),d))}return function k(b,l){if("function"!=typeof l&&null!==l)throw new TypeError("Super expression must either be null or a function, not "+typeof l);b.prototype=Object.create(l&&l.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(b,l):b.__proto__=l)}(l,b),l}(N.default);S.default=V},1878:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var N=function F(b){return b&&b.__esModule?b:{default:b}}(C(6431)),t=C(6855),V=function(b){function l(c,d){return function x(b,l){if(!(b instanceof l))throw new TypeError("Cannot call a class as a function")}(this,l),c+=(0,t.mod11)(c),c+=(0,t.mod10)(c),function O(b,l){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!l||"object"!=typeof l&&"function"!=typeof l?b:l}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,c,d))}return function k(b,l){if("function"!=typeof l&&null!==l)throw new TypeError("Super expression must either be null or a function, not "+typeof l);b.prototype=Object.create(l&&l.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(b,l):b.__proto__=l)}(l,b),l}(N.default);S.default=V},6855:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.mod10=function C(N){for(var t=0,F=0;F<N.length;F++){var x=parseInt(N[F]);t+=(F+N.length)%2==0?x:2*x%10+Math.floor(2*x/10)}return(10-t%10)%10},S.mod11=function M(N){for(var t=0,F=[2,3,4,5,6,7],x=0;x<N.length;x++){var O=parseInt(N[N.length-1-x]);t+=F[x%F.length]*O}return(11-t%11)%11}},1247:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.MSI1110=S.MSI1010=S.MSI11=S.MSI10=S.MSI=void 0;var N=c(C(6431)),F=c(C(7218)),O=c(C(3117)),V=c(C(9762)),l=c(C(1878));function c(d){return d&&d.__esModule?d:{default:d}}S.MSI=N.default,S.MSI10=F.default,S.MSI11=O.default,S.MSI1010=V.default,S.MSI1110=l.default},2250:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.codabar=void 0;var M=function(){function b(l,c){for(var d=0;d<c.length;d++){var n=c[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(l,n.key,n)}}return function(l,c,d){return c&&b(l.prototype,c),d&&b(l,d),l}}(),V=function(b){function l(c,d){(function x(b,l){if(!(b instanceof l))throw new TypeError("Cannot call a class as a function")})(this,l),0===c.search(/^[0-9\-\$\:\.\+\/]+$/)&&(c="A"+c+"A");var n=function O(b,l){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!l||"object"!=typeof l&&"function"!=typeof l?b:l}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,c.toUpperCase(),d));return n.text=n.options.text||n.text.replace(/[A-D]/g,""),n}return function k(b,l){if("function"!=typeof l&&null!==l)throw new TypeError("Super expression must either be null or a function, not "+typeof l);b.prototype=Object.create(l&&l.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(b,l):b.__proto__=l)}(l,b),M(l,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var d=[],n=this.getEncodings(),p=0;p<this.data.length;p++)d.push(n[this.data.charAt(p)]),p!==this.data.length-1&&d.push("0");return{text:this.text,data:d.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),l}(function F(b){return b&&b.__esModule?b:{default:b}}(C(4648)).default);S.codabar=V},9721:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=C(528),N=C(6038),t=C(7422),F=C(7191),x=C(1247),O=C(7624),k=C(2250),V=C(791);S.default={CODE39:M.CODE39,CODE128:N.CODE128,CODE128A:N.CODE128A,CODE128B:N.CODE128B,CODE128C:N.CODE128C,EAN13:t.EAN13,EAN8:t.EAN8,EAN5:t.EAN5,EAN2:t.EAN2,UPC:t.UPC,UPCE:t.UPCE,ITF14:F.ITF14,ITF:F.ITF,MSI:x.MSI,MSI10:x.MSI10,MSI11:x.MSI11,MSI1010:x.MSI1010,MSI1110:x.MSI1110,pharmacode:O.pharmacode,codabar:k.codabar,GenericBarcode:V.GenericBarcode}},7624:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.pharmacode=void 0;var M=function(){function b(l,c){for(var d=0;d<c.length;d++){var n=c[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(l,n.key,n)}}return function(l,c,d){return c&&b(l.prototype,c),d&&b(l,d),l}}(),V=function(b){function l(c,d){!function x(b,l){if(!(b instanceof l))throw new TypeError("Cannot call a class as a function")}(this,l);var n=function O(b,l){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!l||"object"!=typeof l&&"function"!=typeof l?b:l}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,c,d));return n.number=parseInt(c,10),n}return function k(b,l){if("function"!=typeof l&&null!==l)throw new TypeError("Super expression must either be null or a function, not "+typeof l);b.prototype=Object.create(l&&l.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(b,l):b.__proto__=l)}(l,b),M(l,[{key:"encode",value:function(){for(var d=this.number,n="";!isNaN(d)&&0!=d;)d%2==0?(n="11100"+n,d=(d-2)/2):(n="100"+n,d=(d-1)/2);return{data:n=n.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),l}(function F(b){return b&&b.__esModule?b:{default:b}}(C(4648)).default);S.pharmacode=V},3930:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function t(F,x){for(var O=0;O<x.length;O++){var k=x[O];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(F,k.key,k)}}return function(F,x,O){return x&&t(F.prototype,x),O&&t(F,O),F}}(),N=function(){function t(F){(function M(t,F){if(!(t instanceof F))throw new TypeError("Cannot call a class as a function")})(this,t),this.api=F}return C(t,[{key:"handleCatch",value:function(x){if("InvalidInputException"!==x.name)throw x;if(this.api._options.valid===this.api._defaults.valid)throw x.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(x){try{var O=x.apply(void 0,arguments);return this.api._options.valid(!0),O}catch(k){return this.handleCatch(k),this.api}}}]),t}();S.default=N},7497:(H,S)=>{"use strict";function C(O,k){if(!(O instanceof k))throw new TypeError("Cannot call a class as a function")}function M(O,k){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!k||"object"!=typeof k&&"function"!=typeof k?O:k}function N(O,k){if("function"!=typeof k&&null!==k)throw new TypeError("Super expression must either be null or a function, not "+typeof k);O.prototype=Object.create(k&&k.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(O,k):O.__proto__=k)}Object.defineProperty(S,"__esModule",{value:!0});var t=function(O){function k(V,b){C(this,k);var l=M(this,(k.__proto__||Object.getPrototypeOf(k)).call(this));return l.name="InvalidInputException",l.symbology=V,l.input=b,l.message='"'+l.input+'" is not a valid input for '+l.symbology,l}return N(k,Error),k}(),F=function(O){function k(){C(this,k);var V=M(this,(k.__proto__||Object.getPrototypeOf(k)).call(this));return V.name="InvalidElementException",V.message="Not supported type to render on",V}return N(k,Error),k}(),x=function(O){function k(){C(this,k);var V=M(this,(k.__proto__||Object.getPrototypeOf(k)).call(this));return V.name="NoElementException",V.message="No element to render on.",V}return N(k,Error),k}();S.InvalidInputException=t,S.InvalidElementException=F,S.NoElementException=x},3800:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function C(M){return M.marginTop=M.marginTop||M.margin,M.marginBottom=M.marginBottom||M.margin,M.marginRight=M.marginRight||M.margin,M.marginLeft=M.marginLeft||M.margin,M}},6428:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var N=x(C(70)),F=x(C(7850));function x(k){return k&&k.__esModule?k:{default:k}}S.default=function O(k){var V={};for(var b in F.default)F.default.hasOwnProperty(b)&&(k.hasAttribute("jsbarcode-"+b.toLowerCase())&&(V[b]=k.getAttribute("jsbarcode-"+b.toLowerCase())),k.hasAttribute("data-"+b.toLowerCase())&&(V[b]=k.getAttribute("data-"+b.toLowerCase())));return V.value=k.getAttribute("jsbarcode-value")||k.getAttribute("data-value"),(0,N.default)(V)}},1731:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(c){return typeof c}:function(c){return c&&"function"==typeof Symbol&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},t=k(C(6428)),x=k(C(2216)),O=C(7497);function k(c){return c&&c.__esModule?c:{default:c}}S.default=function V(c){if("string"==typeof c)return function b(c){var d=document.querySelectorAll(c);if(0!==d.length){for(var n=[],p=0;p<d.length;p++)n.push(V(d[p]));return n}}(c);if(Array.isArray(c)){for(var d=[],n=0;n<c.length;n++)d.push(V(c[n]));return d}if(typeof HTMLCanvasElement<"u"&&c instanceof HTMLImageElement)return function l(c){var d=document.createElement("canvas");return{element:d,options:(0,t.default)(c),renderer:x.default.CanvasRenderer,afterRender:function(){c.setAttribute("src",d.toDataURL())}}}(c);if(c&&c.nodeName&&"svg"===c.nodeName.toLowerCase()||typeof SVGElement<"u"&&c instanceof SVGElement)return{element:c,options:(0,t.default)(c),renderer:x.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&c instanceof HTMLCanvasElement)return{element:c,options:(0,t.default)(c),renderer:x.default.CanvasRenderer};if(c&&c.getContext)return{element:c,renderer:x.default.CanvasRenderer};if(c&&"object"===(typeof c>"u"?"undefined":M(c))&&!c.nodeName)return{element:c,renderer:x.default.ObjectRenderer};throw new O.InvalidElementException}},6162:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function C(M){var N=[];return function t(F){if(Array.isArray(F))for(var x=0;x<F.length;x++)t(F[x]);else F.text=F.text||"",F.data=F.data||"",N.push(F)}(M),N}},4070:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var C=Object.assign||function(M){for(var N=1;N<arguments.length;N++){var t=arguments[N];for(var F in t)Object.prototype.hasOwnProperty.call(t,F)&&(M[F]=t[F])}return M};S.default=function(M,N){return C({},M,N)}},70:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default=function C(M){var N=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var t in N)N.hasOwnProperty(t)&&"string"==typeof M[t=N[t]]&&(M[t]=parseInt(M[t],10));return"string"==typeof M.displayValue&&(M.displayValue="false"!=M.displayValue),M}},7850:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.default={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}}},726:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function V(b,l){for(var c=0;c<l.length;c++){var d=l[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,d.key,d)}}return function(b,l,c){return l&&V(b.prototype,l),c&&V(b,c),b}}(),t=function x(V){return V&&V.__esModule?V:{default:V}}(C(4070)),F=C(3737),k=function(){function V(b,l,c){(function O(V,b){if(!(V instanceof b))throw new TypeError("Cannot call a class as a function")})(this,V),this.canvas=b,this.encodings=l,this.options=c}return M(V,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var l=0;l<this.encodings.length;l++){var c=(0,t.default)(this.options,this.encodings[l].options);this.drawCanvasBarcode(c,this.encodings[l]),this.drawCanvasText(c,this.encodings[l]),this.moveCanvasDrawing(this.encodings[l])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var l=this.canvas.getContext("2d");l.save(),(0,F.calculateEncodingAttributes)(this.encodings,this.options,l);var c=(0,F.getTotalWidthOfEncodings)(this.encodings),d=(0,F.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=c+this.options.marginLeft+this.options.marginRight,this.canvas.height=d,l.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(l.fillStyle=this.options.background,l.fillRect(0,0,this.canvas.width,this.canvas.height)),l.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(l,c){var p,d=this.canvas.getContext("2d"),n=c.data;p="top"==l.textPosition?l.marginTop+l.fontSize+l.textMargin:l.marginTop,d.fillStyle=l.lineColor;for(var P=0;P<n.length;P++){var E=P*l.width+c.barcodePadding;"1"===n[P]?d.fillRect(E,p,l.width,l.height):n[P]&&d.fillRect(E,p,l.width,l.height*n[P])}}},{key:"drawCanvasText",value:function(l,c){var p,P,d=this.canvas.getContext("2d");l.displayValue&&(P="top"==l.textPosition?l.marginTop+l.fontSize-l.textMargin:l.height+l.textMargin+l.marginTop+l.fontSize,d.font=l.fontOptions+" "+l.fontSize+"px "+l.font,"left"==l.textAlign||c.barcodePadding>0?(p=0,d.textAlign="left"):"right"==l.textAlign?(p=c.width-1,d.textAlign="right"):(p=c.width/2,d.textAlign="center"),d.fillText(c.text,p,P))}},{key:"moveCanvasDrawing",value:function(l){this.canvas.getContext("2d").translate(l.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),V}();S.default=k},2216:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var N=k(C(726)),F=k(C(7902)),O=k(C(8138));function k(V){return V&&V.__esModule?V:{default:V}}S.default={CanvasRenderer:N.default,SVGRenderer:F.default,ObjectRenderer:O.default}},8138:(H,S)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function t(F,x){for(var O=0;O<x.length;O++){var k=x[O];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(F,k.key,k)}}return function(F,x,O){return x&&t(F.prototype,x),O&&t(F,O),F}}(),N=function(){function t(F,x,O){(function M(t,F){if(!(t instanceof F))throw new TypeError("Cannot call a class as a function")})(this,t),this.object=F,this.encodings=x,this.options=O}return C(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();S.default=N},3737:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.getTotalWidthOfEncodings=S.calculateEncodingAttributes=S.getBarcodePadding=S.getEncodingHeight=S.getMaximumHeightOfEncodings=void 0;var N=function t(l){return l&&l.__esModule?l:{default:l}}(C(4070));function F(l,c){return c.height+(c.displayValue&&l.text.length>0?c.fontSize+c.textMargin:0)+c.marginTop+c.marginBottom}function x(l,c,d){if(d.displayValue&&c<l){if("center"==d.textAlign)return Math.floor((l-c)/2);if("left"==d.textAlign)return 0;if("right"==d.textAlign)return Math.floor(l-c)}return 0}function b(l,c,d){var n;if(d)n=d;else{if(!(typeof document<"u"))return 0;n=document.createElement("canvas").getContext("2d")}n.font=c.fontOptions+" "+c.fontSize+"px "+c.font;var p=n.measureText(l);return p?p.width:0}S.getMaximumHeightOfEncodings=function V(l){for(var c=0,d=0;d<l.length;d++)l[d].height>c&&(c=l[d].height);return c},S.getEncodingHeight=F,S.getBarcodePadding=x,S.calculateEncodingAttributes=function O(l,c,d){for(var n=0;n<l.length;n++){var E,p=l[n],P=(0,N.default)(c,p.options);E=P.displayValue?b(p.text,P,d):0;var D=p.data.length*P.width;p.width=Math.ceil(Math.max(E,D)),p.height=F(p,P),p.barcodePadding=x(E,D,P)}},S.getTotalWidthOfEncodings=function k(l){for(var c=0,d=0;d<l.length;d++)c+=l[d].width;return c}},7902:(H,S,C)=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});var M=function(){function b(l,c){for(var d=0;d<c.length;d++){var n=c[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(l,n.key,n)}}return function(l,c,d){return c&&b(l.prototype,c),d&&b(l,d),l}}(),t=function x(b){return b&&b.__esModule?b:{default:b}}(C(4070)),F=C(3737),k="http://www.w3.org/2000/svg",V=function(){function b(l,c,d){(function O(b,l){if(!(b instanceof l))throw new TypeError("Cannot call a class as a function")})(this,b),this.svg=l,this.encodings=c,this.options=d,this.document=d.xmlDocument||document}return M(b,[{key:"render",value:function(){var c=this.options.marginLeft;this.prepareSVG();for(var d=0;d<this.encodings.length;d++){var n=this.encodings[d],p=(0,t.default)(this.options,n.options),P=this.createGroup(c,p.marginTop,this.svg);this.setGroupOptions(P,p),this.drawSvgBarcode(P,p,n),this.drawSVGText(P,p,n),c+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,F.calculateEncodingAttributes)(this.encodings,this.options);var c=(0,F.getTotalWidthOfEncodings)(this.encodings),d=(0,F.getMaximumHeightOfEncodings)(this.encodings),n=c+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,d),this.options.background&&this.drawRect(0,0,n,d,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(c,d,n){var P,p=n.data;P="top"==d.textPosition?d.fontSize+d.textMargin:0;for(var E=0,D=0,G=0;G<p.length;G++)D=G*d.width+n.barcodePadding,"1"===p[G]?E++:E>0&&(this.drawRect(D-d.width*E,P,d.width*E,d.height,c),E=0);E>0&&this.drawRect(D-d.width*(E-1),P,d.width*E,d.height,c)}},{key:"drawSVGText",value:function(c,d,n){var P,E,p=this.document.createElementNS(k,"text");d.displayValue&&(p.setAttribute("style","font:"+d.fontOptions+" "+d.fontSize+"px "+d.font),E="top"==d.textPosition?d.fontSize-d.textMargin:d.height+d.textMargin+d.fontSize,"left"==d.textAlign||n.barcodePadding>0?(P=0,p.setAttribute("text-anchor","start")):"right"==d.textAlign?(P=n.width-1,p.setAttribute("text-anchor","end")):(P=n.width/2,p.setAttribute("text-anchor","middle")),p.setAttribute("x",P),p.setAttribute("y",E),p.appendChild(this.document.createTextNode(n.text)),c.appendChild(p))}},{key:"setSvgAttributes",value:function(c,d){var n=this.svg;n.setAttribute("width",c+"px"),n.setAttribute("height",d+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+c+" "+d),n.setAttribute("xmlns",k),n.setAttribute("version","1.1"),n.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(c,d,n){var p=this.document.createElementNS(k,"g");return p.setAttribute("transform","translate("+c+", "+d+")"),n.appendChild(p),p}},{key:"setGroupOptions",value:function(c,d){c.setAttribute("style","fill:"+d.lineColor+";")}},{key:"drawRect",value:function(c,d,n,p,P){var E=this.document.createElementNS(k,"rect");return E.setAttribute("x",c),E.setAttribute("y",d),E.setAttribute("width",n),E.setAttribute("height",p),P.appendChild(E),E}}]),b}();S.default=V}}]);
|