@assaabloy/amarr-wc-dealer-login 9.4.0 → 9.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dealer-login.js +1 -1
  2. package/package.json +2 -2
package/dealer-login.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see dealer-login.js.LICENSE.txt */
2
- !function(e){function t(t){for(var r,a,s=t[0],c=t[1],l=t[2],d=0,h=[];d<s.length;d++)a=s[d],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&h.push(o[a][0]),o[a]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);for(u&&u(t);h.length;)h.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,s=1;s<n.length;s++){var c=n[s];0!==o[c]&&(r=!1)}r&&(i.splice(t--,1),e=a(a.s=n[0]))}return e}var r={},o={40:0},i=[];function a(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/";var s=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],c=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var u=c;i.push([613,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"h",(function(){return c})),n.d(t,"ic",(function(){return l})),n.d(t,"G",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"ub",(function(){return h})),n.d(t,"yb",(function(){return f})),n.d(t,"C",(function(){return p})),n.d(t,"D",(function(){return m})),n.d(t,"sb",(function(){return g})),n.d(t,"t",(function(){return b})),n.d(t,"w",(function(){return v})),n.d(t,"zb",(function(){return y})),n.d(t,"Vb",(function(){return w})),n.d(t,"vb",(function(){return S})),n.d(t,"B",(function(){return O})),n.d(t,"i",(function(){return k})),n.d(t,"F",(function(){return _})),n.d(t,"A",(function(){return C})),n.d(t,"K",(function(){return j})),n.d(t,"z",(function(){return T})),n.d(t,"E",(function(){return P})),n.d(t,"tb",(function(){return x})),n.d(t,"x",(function(){return I})),n.d(t,"Wb",(function(){return E})),n.d(t,"v",(function(){return A})),n.d(t,"Ab",(function(){return N})),n.d(t,"wb",(function(){return L})),n.d(t,"Yb",(function(){return W})),n.d(t,"r",(function(){return z})),n.d(t,"o",(function(){return H})),n.d(t,"s",(function(){return Z})),n.d(t,"p",(function(){return U})),n.d(t,"q",(function(){return K})),n.d(t,"R",(function(){return M})),n.d(t,"Fb",(function(){return G})),n.d(t,"Bb",(function(){return J})),n.d(t,"ob",(function(){return X})),n.d(t,"pb",(function(){return F})),n.d(t,"nb",(function(){return V})),n.d(t,"H",(function(){return B})),n.d(t,"hc",(function(){return Y})),n.d(t,"I",(function(){return $})),n.d(t,"cc",(function(){return ee})),n.d(t,"fb",(function(){return te})),n.d(t,"bc",(function(){return ne})),n.d(t,"ab",(function(){return re})),n.d(t,"Nb",(function(){return oe})),n.d(t,"ec",(function(){return ie})),n.d(t,"b",(function(){return ae})),n.d(t,"Mb",(function(){return se})),n.d(t,"Z",(function(){return ce})),n.d(t,"U",(function(){return le})),n.d(t,"a",(function(){return ue})),n.d(t,"jc",(function(){return de})),n.d(t,"f",(function(){return he})),n.d(t,"d",(function(){return fe})),n.d(t,"g",(function(){return pe})),n.d(t,"e",(function(){return me})),n.d(t,"mc",(function(){return ge})),n.d(t,"c",(function(){return be})),n.d(t,"kc",(function(){return ve})),n.d(t,"lc",(function(){return ye})),n.d(t,"Cb",(function(){return we})),n.d(t,"Db",(function(){return Se})),n.d(t,"Eb",(function(){return Oe})),n.d(t,"Gb",(function(){return ke})),n.d(t,"y",(function(){return _e})),n.d(t,"Kb",(function(){return Ce})),n.d(t,"Xb",(function(){return je})),n.d(t,"u",(function(){return Te})),n.d(t,"Ob",(function(){return Pe})),n.d(t,"P",(function(){return xe})),n.d(t,"X",(function(){return Ie})),n.d(t,"T",(function(){return Ee})),n.d(t,"gb",(function(){return Ae})),n.d(t,"mb",(function(){return Ne})),n.d(t,"db",(function(){return Re})),n.d(t,"N",(function(){return Le})),n.d(t,"O",(function(){return We})),n.d(t,"l",(function(){return ze})),n.d(t,"L",(function(){return He})),n.d(t,"V",(function(){return Ze})),n.d(t,"hb",(function(){return Ue})),n.d(t,"ib",(function(){return Ke})),n.d(t,"bb",(function(){return Me})),n.d(t,"lb",(function(){return Ge})),n.d(t,"J",(function(){return Je})),n.d(t,"m",(function(){return Xe})),n.d(t,"Tb",(function(){return Fe})),n.d(t,"Ub",(function(){return Ve})),n.d(t,"dc",(function(){return Be})),n.d(t,"Qb",(function(){return Ye})),n.d(t,"Pb",(function(){return $e})),n.d(t,"Sb",(function(){return qe})),n.d(t,"Rb",(function(){return Qe})),n.d(t,"Q",(function(){return et})),n.d(t,"Lb",(function(){return tt})),n.d(t,"k",(function(){return nt})),n.d(t,"cb",(function(){return rt})),n.d(t,"jb",(function(){return ot})),n.d(t,"eb",(function(){return it})),n.d(t,"M",(function(){return at})),n.d(t,"kb",(function(){return st})),n.d(t,"fc",(function(){return ct})),n.d(t,"gc",(function(){return lt})),n.d(t,"Ib",(function(){return ut})),n.d(t,"Jb",(function(){return dt})),n.d(t,"Hb",(function(){return ht})),n.d(t,"Y",(function(){return ft})),n.d(t,"qb",(function(){return pt})),n.d(t,"rb",(function(){return mt})),n.d(t,"Zb",(function(){return gt})),n.d(t,"W",(function(){return bt})),n.d(t,"ac",(function(){return vt})),n.d(t,"n",(function(){return yt})),n.d(t,"S",(function(){return St})),n.d(t,"xb",(function(){return Ot}));var r=n(5),o=n(3),i=n(6),a=n(19),s=n(23);const c=e=>JSON.parse(decodeURIComponent(escape(atob(e)))),l=e=>btoa(unescape(encodeURIComponent(e))),u=e=>l(JSON.stringify(e)),d=e=>e.toUpperCase(),h=e=>e.replaceAll(" ","-").toLowerCase(),f=new o.a(!1),p=new o.a(!1),m=new o.a(!1),g=new o.a(!1),b=new o.a(!1),v=new o.a(""),y=new o.a(!1),w=(new o.a(!1),new o.a(!1)),S=new o.a(!1),O=new o.a(!1),k=new o.a(!1),_=new o.a(!1),C=new o.a(""),j=new o.a(!0),T=new o.a(!1),P=new o.a(!0),x=new o.a(!0),I=new o.a(!0),E=new o.a(!0),A=new o.a(!0),N=new o.a({}),R=new o.a(!1);let D=0;const L=new o.a(!1),W=new o.a(""),z=new o.a(""),H=new o.a(""),Z=new o.a(""),U=new o.a(""),K=new o.a(""),M=new o.a(""),G=new o.a(""),J=new o.a(""),X=new o.a(""),F=new o.a(""),V=new o.a(!1),B=new o.a(""),Y=new o.a(!1),$=(new o.a(!1),new o.a(!1),new o.a({flag:!1}),new o.a(!1)),q=()=>new URLSearchParams(window.location.search).get("erp-dealer-id")||sessionStorage.getItem("erp-dealer-id")||"",Q=()=>window.self!==window.top,ee=(e,t)=>{const n=q();return Q()&&n?sessionStorage.setItem("".concat(n,"__").concat(e),t):sessionStorage.setItem(e,t)},te=e=>{const t=q();return Q()&&t?sessionStorage.getItem("".concat(t,"__").concat(e)):sessionStorage.getItem(e)},ne=(e,t)=>{const n=q();return Q()&&n?localStorage.setItem("".concat(n,"__").concat(e),t):localStorage.setItem(e,t)},re=e=>{const t=q();return Q()&&t?localStorage.getItem("".concat(t,"__").concat(e)):localStorage.getItem(e)},oe=e=>{const t=q();return Q()&&t?localStorage.removeItem("".concat(t,"__").concat(e)):localStorage.removeItem(e)};window.cartId$=new o.a(""),window.fetchCart$=new o.a({}),window.minicartUpdate$=new o.a(null),window.dealerCurrency$=new o.a(re("currencySymbol")||"$"),window.dealerLocation$=new o.a(re("dealerLocation")||""),window.dispatchLocationId$=new o.a(re("dispatchLocationId")||""),window.favoritesUpdate$=new o.a(0),window.logOutPopupShown$=new o.a(!1),window.editOrderSizeCollectionChanged$=new o.a(!1);new o.a(!1);const ie=new o.a([]),ae=()=>{setTimeout(()=>{D++,R.next(!0)},0)},se=()=>{setTimeout(()=>{D>0&&D--,0===D&&R.next(!1)},0)},ce=()=>R.asObservable(),le=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var a,s;e&&(ae(),r||(r={}),null===(a=Object(i.f)(e,"{\n customerCart {\n id\n }\n }"))||void 0===a||null===(s=a.then(e=>{const n=e.data.data.customerCart.id;ne("cartId",n),window.cartId$.next(n),t&&t(...r)}))||void 0===s||s.catch(e=>{console.error(e)}).finally(()=>{se()}))},ue=e=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),de=e=>{let t=0;return!!/(?=.{8,})/.test(e)&&(/([a-z])/.test(e)&&t++,/([A-Z])/.test(e)&&t++,/(\d)/.test(e)&&t++,/([!@#$%^&*])/.test(e)&&t++,t>=3)},he=e=>e.match(/^[a-zA-Z0-9]*$/g),fe=e=>e.match(/^[a-zA-Z\xc0-\xff-. ]*$/),pe=e=>/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e),me=e=>/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e),ge=e=>/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/.test(e),be=e=>/^[0-9]*$/.test(e),ve=e=>new RegExp("^[0-9]+[.][0-9]{0,2}$").test(e),ye=e=>/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e),we=e=>{if(e&&""!==e&&-1===e.indexOf("(")&&-1===e.indexOf(") ")&&-1===e.indexOf("-")){let t=e;return t="("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length),t}return e},Se=e=>{let t=(""+e).replace(/\D/g,"");if(t.length>10){t=t.slice(0,10);const e=t.match(/^(\d{3})(\d{3})(\d{4})$/);if(e)return"("+e[1]+") "+e[2]+"-"+e[3]}let n="";return t.split("").forEach((e,t)=>{n+=0===t?"("+e:2===t?e+") ":5===t?e+"-":e}),n},Oe=e=>{const t=e.target.value;return 1===t.length?"("+t:5===t.length?t.slice(0,t.length-1)+") "+t[t.length-1]:10===t.length&&"-"!==t[t.length-1]?t.slice(0,t.length-1)+"-"+t[t.length-1]:10===t.length&&"-"===t[t.length-1]?t.substring(0,t.length-1):6===t.length?t.substring(0,t.length-2):t},ke=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=e;return n&&(n=t?Number(n).toFixed(t).replace(/\d(?=(\d{3})+\.)/g,"$&,"):String(Math.trunc(Number(n))).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==n&&"0"!==n||(n=Number(n).toFixed(t)),n},_e=e=>Boolean(e.find(e=>("delivery_installation_scheduled"===e.code||"delivery_installation_completed"===e.code)&&e.show)),Ce=(e,t)=>{let n=0;return e=e?Number(e):0,n=0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100,n=n.toFixed(2),n},je=e=>{const t=[],n=[];e.forEach(e=>{if(null===e||void 0===e?void 0:e.item_serialize){const o=JSON.parse(null===e||void 0===e?void 0:e.item_serialize);"product"===(null===o||void 0===o?void 0:o.favoriteType)?t.push({id:e.id,data:JSON.parse(null===e||void 0===e?void 0:e.item_serialize)}):"design"!==(null===o||void 0===o?void 0:o.favoriteType)&&"door-design"!==(null===o||void 0===o?void 0:o.favoriteType)||n.push(Object(r.a)({id:e.id},JSON.parse(null===e||void 0===e?void 0:e.item_serialize)))}}),n.length?ne("designer-fav",JSON.stringify({data:n})):oe("designer-fav"),ne("product-fav",JSON.stringify(t))},Te=e=>{const t={tabs:!0,type:"designer",clavos:!1,download:!0,quote:!0,srcUrl:"/DoorApp",id:"AmarrDoorDesigner",panel:e.selectedPanel,brand:"",myGuid:"d-608280c6f378f8.36911414",email:!0,height:e.selectedHeight,collection:e.selectedCollection,print:!0,baseUrl:"",gplacement:e.selectedWindowPlacement,width:e.selectedWidth,srcDir:"DoorApp",MosaicName:"Mosaic",logooption:""};return e.selectedGlass&&(t.glass=e.selectedGlass),e.selectedColor&&(t.color=e.selectedColor),e.colorHex&&(t.colorHex=e.colorHex),e.colorZone&&(t.colorZone=e.colorZone),e.selectedConstruction&&(t.model=e.selectedConstruction),e.selectedWindowDesign&&(t.top=e.selectedWindowDesign),e.glazepattern&&(t.glazepattern=e.glazepattern),e.selectedHardware&&(t.hardware=e.selectedHardware),t},Pe=(e,t,n)=>{let r="";const o=e.split(t);return o.forEach((e,t)=>{"undefined"!==e&&e&&(r+=e,t!==o.length-1&&(r+=n))}),r},xe=e=>e.length>0?e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"").replace(/ /g,""):e,Ie=()=>{const e=document.getElementsByTagName("html")[0].getAttribute("lang");return e?"_"+e.split("-").join("_").toLowerCase():""},Ee=()=>getComputedStyle(document.body).getPropertyValue("--asset-path").trim(),Ae=()=>getComputedStyle(document.body).getPropertyValue("--accent").trim(),Ne=e=>{if("string"===typeof e){let t=e;return t=t.replace(/\\/g,"\\\\"),t=t.replace(/"/g,'\\"'),t}return e},Re=e=>Math.floor(Math.random()*e)+1,De=["January","February","March","April","May","June","July","August","September","October","November","December"],Le=(e,t)=>{const n=new Date("".concat(e).concat(t?" UTC":""));if("Invalid Date"===n.toString())return e;const r=n.getFullYear(),o=n.getMonth(),i=(n.getDate()+"").padStart(2,"0");return"".concat(De[o].slice(0,3)," ").concat(i,", ").concat(r)},We=e=>{const t=new Date(e),n=t.getMonth()+1,r=t.getDate(),o=t.getFullYear(),i=t.getHours(),a=t.getMinutes(),s=i>=12?"PM":"AM",c=i%12||12;return"".concat(n,"/").concat(r,"/").concat(o," ").concat(c,":").concat(a.toString().padStart(2,"0")," ").concat(s)},ze=e=>{try{return e?e.charAt(0).toUpperCase()+e.slice(1):""}catch(t){return e}},He=e=>e?e=(e=(e=e.toLowerCase()).replace(/\s/g,"-")).replace(/_/g,"-"):"",Ze=e=>{var t,n;return null===(t=e.find(e=>"delivery_installation_scheduled"===e.code))||void 0===t||null===(n=t.appointment_detail)||void 0===n?void 0:n.start_time},Ue=(e,t)=>{const n=["in_progress","delivery_installation_scheduled","delivery_installation_completed"];return"canceled"===t?e.filter(e=>!n.includes(e.code)).filter(e=>e.show):e},Ke=e=>{const t=["site_check_requested","site_check_scheduled","site_check_not_schedule","site_check_complete"];return e.filter(e=>!t.includes(e.code))},Me=e=>{const{currentSortBy:t,currentSortingDirection:n,newSortBy:r}=e;return t===r&&"desc"===n?"asc":"desc"},Ge=e=>{var t,n;let r=0;const o=null===e||void 0===e?void 0:e.id,i=Array.isArray(null===e||void 0===e?void 0:e.additional_info)&&(null===e||void 0===e||null===(t=e.additional_info[0])||void 0===t?void 0:t.diy)||!1,a=!!(null===e||void 0===e||null===(n=e.additional_info[0])||void 0===n?void 0:n.door_with_opener);let s=!1;e.items.forEach(e=>{if(null===e||void 0===e?void 0:e.item_serialize){JSON.parse(e.item_serialize)["Door Collection"]&&(s=!0)}r+=e.quantity}),window.fetchCart$.next({cartId:o,diy:i,totalCount:r,hasOpeners:a,hasDoors:s})},Je=e=>{const{parseData:t,imagesArray:n,collectionsArray:r,sizeArray:o,pricesArray:i,installationTypeArray:a,confiStyleArray:s,isHomeownerSite:c}=e,l=[];for(let g=0;g<t.length;g++){let e="";if(e=e+t[g].selectedCollection+t[g].selectedHeightInches+t[g].selectedWidthInches+t[g].selectedConstruction+t[g].selectedColor+t[g].selectedWindload+t[g].selectedPanel+t[g].selectedWindowDesign+t[g].selectedWindowPlacement+t[g].selectedGlass+t[g].selectedInsulation+t[g].selectedHardware+t[g].selectedDoorLock+t[g].selectedDoorSeal+t[g].selectedDoorOpener+t[g].selectedDoorAccessory,re("confi-style")){const t=re("confi-style"),n=JSON.parse(t);e=e+n[g].headroom+n[g].sideroom.inch+n[g].backroom.feet+n[g].backroom.inch}e=c?e+t[g].selectedHeadroom+t[g].selectedhardwareUpgrade:e+t[g].selectedExtraStruts+t[g].selectedExtraStrutsNumber+t[g].selectedHinge+t[g].selectedHoriAngle+t[g].selectedHoriRadius+t[g].selectedRoller+t[g].selectedSpring+t[g].selectedTrackLift+t[g].selectedActualHighLift+t[g].selectedBackhang,l.push(e)}const u=l.reduce((e,t)=>(e[t]?++e[t]:e[t]=1,e),{}),d=Object.keys(u),h=[];d.forEach(e=>{h.push(u[e])});const f=[],p=[];for(let g=0;g<d.length;g++){const e=[];for(let t=0;t<l.length;t++)d[g]===l[t]&&(e.push(t+1),e.length>1&&p.push(t+1));f.push(e)}for(let g=p.length-1;g>=0;g--){const e=p[g]-1;t.splice(e,1),n&&n.splice(e,1),r&&r.splice(e,1),i&&i.splice(e,1),a&&a.splice(e,1),o&&o.splice(e,1),s&&s.splice(e,1)}const m=[];for(let g=0;g<f.length;g++){let e="";m.push(f[g].length);for(let t=0;t<f[g].length;t++)e+=f[g][t],t<f[g].length-1&&(e+=",");f[g]=e}return{imagesArray:n,collectionsArray:r,sizeArray:o,pricesArray:i,confiStyleArray:s,installationTypeArray:a,quantityArray:m,indexArray:f,mergedList:t,uniqueProductsId:l.toString()}},Xe=(e,t,n)=>{let r="";if(r=e.indexOf("http")>-1?e:t+e,e.indexOf("{hardware-overlay-image}")>-1&&(r=""),"number"===typeof n&&e.indexOf("{colorcode}")>-1){const t=re("design-door"),o=JSON.parse(t)[n];r=e.replace("{colorcode}",o.colorHex)}return r},Fe=async e=>{const{apiURL:t,url:n,imageRootPath:r,items:o}=e,a=re("cartId")||"";try{var s,c,l,u;ae();let e="[";o.forEach(t=>{if(!t.sku)throw Error("SKU not available");if(!a)throw Error("Cart ID not available");e+="{\n quantity: ".concat(t.quantity,'\n sku: "').concat(t.sku,'"\n item_serialize: "').concat(Ne(JSON.stringify({price:t.price,diy:t.diy,Image:Xe(t.image,r),isAccessory:!0})),'"\n pricing_payload: "{}"\n }')}),e+="]";const d=await Object(i.e)(t,'mutation {\n addProductsToCart(\n cartId: "'.concat(a,'"\n cartItems: ').concat(e,"\n )\n {\n cart {\n id\n }\n }\n }\n ")),h=null===d||void 0===d||null===(s=d.data)||void 0===s||null===(c=s.data)||void 0===c||null===(l=c.addProductsToCart)||void 0===l||null===(u=l.cart)||void 0===u?void 0:u.id;return ne("hasCartUpdated","true"),n&&(window.location.href=n),h}catch(f){var d,h;throw pt(null===f||void 0===f||null===(d=f.data)||void 0===d||null===(h=d.errors[0])||void 0===h?void 0:h.message)&&le(t,Fe,e),f}finally{se()}},Ve=async e=>{const{apiURL:t,url:n,itemNumber:r,imageRootPath:o,items:a}=e,s=re("cartId")||"";let c=re("erp-dealer-id");if("true"===re("isHomeownerSite"))c=re("erp-dealer-id")||"";else{const e=re("dealer"),t=JSON.parse(e);c=Number(t.accountNumber)+""}const l=c;try{var u,d,h,f;ae();let e="[";a.forEach(t=>{var n,i;const a=null===t||void 0===t||null===(n=t.type)||void 0===n?void 0:n.split("_");e+="{\n quantity: ".concat(t.quantity,'\n sku: "').concat(t.sku,'"\n item_serialize: "').concat(Ne(JSON.stringify({price:t.price,diy:!1,Drive:t.drive,Force:t.force?t.force:"None","Motor Warranty":t.motorWarranty,"Parts Warranty":t.partsWarranty,Type:a&&a.length>1?a?(null===(i=a[0].charAt(0))||void 0===i?void 0:i.toUpperCase())+a[0].slice(1)+" "+a[1].charAt(0).toUpperCase()+a[1].slice(1):"":t.type,"Door Height":t.doorHeight,"Back Room":t.backRoom,"Side Room":t.sideRoom,"Head Room":t.headRoom,Image:Xe(t.image,o),isOpener:!0})),'"\n pricing_payload: "').concat(Ne(JSON.stringify({dealerNumber:l,itemNumber:r})),'"\n }')}),e+="]";const c=await Object(i.e)(t,'mutation {\n addProductsToCart(\n cartId: "'.concat(s,'"\n cartItems: ').concat(e,"\n )\n {\n cart {\n id\n }\n }\n }\n ")),p=null===c||void 0===c||null===(u=c.data)||void 0===u||null===(d=u.data)||void 0===d||null===(h=d.addProductsToCart)||void 0===h||null===(f=h.cart)||void 0===f?void 0:f.id;return ne("hasCartUpdated","true"),n&&(window.location.href=n),p}catch(g){var p,m;throw console.error(g),pt(null===g||void 0===g||null===(p=g.data)||void 0===p||null===(m=p.errors[0])||void 0===m?void 0:m.message)&&le(t,Ve,e),g}finally{se()}},Be=e=>{var t,n,r,o;const i=re("confi-size"),a=JSON.parse(i);let s=(null===(t=a[e])||void 0===t||null===(n=t.sideroom)||void 0===n?void 0:n.inch)?null===(r=a[e])||void 0===r||null===(o=r.sideroom)||void 0===o?void 0:o.inch:0,c=0;if(s.length>3){var l;s=s.split("-");const e=s[0],t=null===(l=s[1])||void 0===l?void 0:l.split("/");c=Number(e)+parseFloat((Number(t[0])/Number(t[1])).toFixed(2))}else if(3===s.length){const e=s.split("/");c=parseFloat((Number(e[0])/Number(e[1])).toFixed(2))}else c=1===s.length&&!isNaN(Number(s))&&Number(s)>0?s:0;return c},Ye=(e,t)=>{var n,r,o,i;let a=(null===(n=e[t])||void 0===n||null===(r=n.sideroom)||void 0===r?void 0:r.inch)?null===(o=e[t])||void 0===o||null===(i=o.sideroom)||void 0===i?void 0:i.inch:0,s=0;if(a.length>3){var c;a=a.split("-");const e=a[0],t=null===(c=a[1])||void 0===c?void 0:c.split("/");s=Number(e)+parseFloat((Number(t[0])/Number(t[1])).toFixed(2))}else if(3===a.length){const e=a.split("/");s=parseFloat((Number(e[0])/Number(e[1])).toFixed(2))}else s=1===a.length&&!isNaN(Number(a))&&Number(a)>0?a:0;return s},$e=(e,t)=>{var n;return(null===(n=e[t])||void 0===n?void 0:n.headroom)||0},qe=async e=>{try{const{apiURL:x,url:I,imageRootPath:E,parseDoor:A,parsePrice:N,parseMar:R,installationType:D=(re("installation-type")?re("installation-type"):""),confiStyle:L=[],quantityArray:W=[]}=e,z=re("cartId")||"";let H;if("true"===re("isHomeownerSite"))H=re("erp-dealer-id")||"";else{const e=re("dealer"),t=JSON.parse(e);H=Number(t.accountNumber)+""}const Z=H,U=[],K=[],M=new URLSearchParams(window.location.search),G=M.has("editCart")||re("editCart");for(let e=0;e<A.length;e++){var t;const i={};var n;if(i.Quantity=W[e]||1,i.Image=Xe(A[e].doorImage,E,e),i["Door Style"]=null===(t=L[e])||void 0===t?void 0:t.selectedDoorStyle,i["confi-style"]=L[e],A[e].hardwareImage&&(i.HardwareImage=Xe(A[e].hardwareImage,E,e)),i.Size=L[e].selectedCollection.nextSizewidth+"'"+L[e].selectedCollection.nextSizewidthInch+'"W '+L[e].selectedCollection.nextSizeheight+"'"+L[e].selectedCollection.nextSizeheightInch+'"H',i["Door Collection"]=A[e].selectedCollection,i["Door Collection_"]=A[e].selectedCollectionLabel,A[e].selectedConstruction&&"vista"!==A[e].selectedCollection&&"horiz"!==A[e].selectedCollection&&(i.Construction=A[e].selectedConstruction,i.Construction_=A[e].selectedConstructionLabel),i.Color="ColorZone"===A[e].selectedColor?A[e].colorZone:A[e].selectedColor,A[e].selectedWindload&&(i.Windload=A[e].selectedWindload,i.winloadDrawingNumber=A[e].winloadDrawingNumber,i.Windload_=A[e].winloadLabel,i.isMosaicSupported=A[e].isMosaicSupported),A[e].selectedPanel&&(i["Door Design"]=A[e].selectedPanel),A[e].selectedWindowPlacement&&(i["Window Placement"]=A[e].selectedWindowPlacement),A[e].selectedGlass&&(i.Glass=A[e].selectedGlass),A[e].selectedWindowDesign&&(i["Window Design"]=A[e].selectedWindowDesign,i["Window Design_"]=A[e].selectedWindowLabel),"vista"!==A[e].selectedCollection&&"horiz"!==A[e].selectedCollection||!A[e].selectedInsulation||(i["Glass Insulation"]=ze(A[e].selectedInsulation||"")),A[e].selectedHardware&&(i["Decorative Hardware"]=A[e].selectedHardware),i.dealer={},A[e].selectedHinge&&(i.dealer["Hinge Type"]=A[e].selectedHinge,i.dealer["Hinge Type_"]=A[e].selectedHingeLabel),A[e].selectedRoller?(i.dealer.Roller=A[e].selectedRoller,i.dealer.Roller_=A[e].selectedRollerLabel):i.dealer.Roller_="None",A[e].selectedTrackLift?(i.dealer["Track Lift"]=A[e].selectedTrackLift,i.dealer["Track Lift_"]=A[e].selectedTrackLiftLabel):i.dealer["Track Lift_"]="None",A[e].selectedActualHighLift?(i.dealer["Actual High Lift"]=A[e].selectedActualHighLift,i.dealer["Actual High Lift_"]=A[e].selectedActualHighLiftLabel):i.dealer["Actual High Lift_"]="None",A[e].selectedHoriAngle?(i.dealer["Horizontal Angle"]=A[e].selectedHoriAngle,i.dealer["Horizontal Angle_"]=A[e].selectedHoriAngleLabel):i.dealer["Horizontal Angle_"]="None",A[e].selectedHoriRadius?(i.dealer["Horizontal Radius"]=A[e].selectedHoriRadius,i.dealer["Horizontal Radius_"]=A[e].selectedHoriRadiusLabel):i.dealer["Horizontal Radius_"]="None",A[e].selectedSpring?(i.dealer["Spring Type"]=A[e].selectedSpring,i.dealer["Spring Type_"]=A[e].selectedSpringLabel):i.dealer["Spring Type_"]="None",A[e].selectedMount&&(i.dealer["Mount Type"]=A[e].selectedMount),A[e].selectedExtraStruts&&(i.dealer["Extra Struts"]=A[e].selectedExtraStruts,i.dealer["Extra Struts_"]=A[e].selectedExtraStrutsLabel,i.dealer["Number of Extra Struts"]=A[e].selectedExtraStrutsNumber),A[e].selectedDoorLock&&(i["Door Lock"]=A[e].selectedDoorLock),A[e].selectedBackhang&&(i.dealer["Back Hang"]=A[e].selectedBackhang+"",i.dealer["Back Hang_"]=A[e].selectedBackHangLabel),A[e].selectedDoorSeal&&(i["Perimeter Door Seal"]=A[e].selectedDoorSeal,i["Perimeter Door Seal_"]=A[e].selectedDoorSealLabel),A[e].selectedDoorOpener&&(i["Garage Door Opener"]=A[e].selectedDoorOpener,i["Garage Door Opener Image Path"]=A[e].selectedDoorOpenerImagePath,i["Garage Door Opener Item Number"]=A[e].selectedDrawingNumber,i["Garage Door Opener_"]=A[e].selectedDoorOpenerLabel,i["Garage Door Opener Laborcost"]=A[e].openerLaborcost),A[e].selectedDoorAccessory&&(i["Garage Door Accessory"]=A[e].selectedDoorAccessory,i["Garage Door Accessory_"]=A[e].selectedDoorAccessoryLabel,i["Garage Door Accessory Price"]=A[e].selectedDoorAccessoryPrice),i["High Cycle Springs"]=A[e].selectedHighcycleSprings,i.homeowner={},A[e].selectedhardwareUpgrade)i.homeowner["Door Hardware Upgrade"]=ze((null===(n=A[e])||void 0===n?void 0:n.selectedhardwareUpgrade)||"");A[e].selectedHeadroom&&(i.low_head_room="yes"===A[e].selectedHeadroom),i.imapUsed=A[e].imapUsed,i.laborcost=A[e].laborcost,i.diy="professionally-installed"!==D,i.price="".concat(isNaN(Number(A[e].selectedDoorAccessoryPrice))?N[e]:N[e]+Number(A[e].selectedDoorAccessoryPrice)),i.installation=D&&(null===D||void 0===D?void 0:D.length)>0?D.charAt(0).toUpperCase()+D.replaceAll("-"," ").slice(1):"",i.accessory_name=A[e].selectedDoorAccessoryLabel,i.accessory_sku=A[e].selectedDoorAccessory,i.accessory_price=A[e].selectedDoorAccessoryPrice,i.opener_brand=A[e].openerBrand;for(let t=0;t<(null===R||void 0===R||null===(r=R.items)||void 0===r?void 0:r.length);t++){var r;if(A[e].selectedCollection===R.items[t].sku){var o;const n=null===R||void 0===R||null===(o=R.items[t])||void 0===o?void 0:o.priceData;var a,s,c;if(n&&n.length>0)for(let t=0;t<n.length;t++){var l,u,d,h,f,p,m,g,b,v,y;if("vista"!==A[e].selectedCollection&&"horiz"!==A[e].selectedCollection||(n[t].model=""),Number(null===(l=A[e])||void 0===l?void 0:l.selectedWidth)<=10){if("single"===n[t].size&&n[t].model===(null===(u=A[e])||void 0===u?void 0:u.selectedConstruction))if(null===n[t].labour_charge||!(null===(d=n[t])||void 0===d?void 0:d.labour_charge)||isNaN(null===(h=n[t])||void 0===h?void 0:h.labour_charge))i.labour_charge=null===R||void 0===R||null===(f=R.default_config)||void 0===f?void 0:f.single_door_labour_charge;else i.labour_charge=Number(null===(p=n[t])||void 0===p?void 0:p.labour_charge)}else if("double"===n[t].size&&n[t].model===(null===(m=A[e])||void 0===m?void 0:m.selectedConstruction))if(null===n[t].labour_charge||!(null===(g=n[t])||void 0===g?void 0:g.labour_charge)||isNaN(null===(b=n[t])||void 0===b?void 0:b.labour_charge))i.labour_charge=null===R||void 0===R||null===(v=R.default_config)||void 0===v?void 0:v.double_door_labour_charge;else i.labour_charge=Number(null===(y=n[t])||void 0===y?void 0:y.labour_charge)}else if(Number(null===(a=A[e])||void 0===a?void 0:a.selectedWidth)<=10)i.labour_charge=null===R||void 0===R||null===(s=R.default_config)||void 0===s?void 0:s.single_door_labour_charge;else i.labour_charge=null===R||void 0===R||null===(c=R.default_config)||void 0===c?void 0:c.single_door_labour_charge}}U.push(i)}let J="[",X="[";for(let e=0;e<A.length;e++){let t;if(K.push(A[e].selectedCollection),t="vista"===A[e].selectedCollection||"horiz"===A[e].selectedCollection?{dealerNumber:Z,door:{market:"Residential",brand:"",collection:A[e].selectedCollection,color:A[e].selectedColor,includeHardwareDetailOptions:!0,includeDoorDetailOptions:!0,includeImapPricing:!0,width:A[e].baseWidth?A[e].baseWidth:A[e].selectedWidth,height:A[e].baseHeight?A[e].baseHeight:A[e].selectedHeight,optional:{trueWidthInches:Number(A[e].selectedWidthInches),trueHeightInches:Number(A[e].selectedHeightInches)},measurements:{headRoomValue:$e(L,e),sideRoomInches:Ye(L,e)}}}:{dealerNumber:Z,door:{market:"Residential",brand:"",model:A[e].selectedConstruction,collection:A[e].selectedCollection,color:A[e].selectedColor,panel:A[e].selectedPanel,includeDoorDetailOptions:!0,includeHardwareDetailOptions:!0,includeImapPricing:!0,width:A[e].baseWidth?A[e].baseWidth:A[e].selectedWidth,height:A[e].baseHeight?A[e].baseHeight:A[e].selectedHeight,optional:{trueWidthInches:Number(A[e].selectedWidthInches),trueHeightInches:Number(A[e].selectedHeightInches)},glassDetail:{gPlacement:A[e].selectedWindowPlacement?A[e].selectedWindowPlacement:null,top:A[e].selectedWindowDesign},measurements:{headRoomValue:$e(L,e),sideRoomInches:Ye(L,e)}}},A[e].selectedGlass&&"Closed"!==A[e].selectedWindowPlacement&&(t.door.glassDetail.glass=A[e].selectedGlass?A[e].selectedGlass:"Clear"),"ColorZone"===A[e].selectedColor&&(t.door.optional.colorZone=A[e].colorZone,t.door.optional.colorZoneHex=A[e].colorHex,t.door.optional.ColorZoneCode=A[e].colorZone.substr(1).split("/")[0].trim()),"Mosaic"===A[e].selectedWindowPlacement&&(t.door.optional.mosaicPattern=A[e].glazepattern),A[e].selectedHardware&&"None"!==A[e].selectedHardware&&(t.door.optional.decorativeHardware=A[e].selectedHardware),"doorColor"===A[e].selectedDoorSeal&&(t.door.optional.VinylStopColor="vista"===A[e].selectedCollection||"horiz"===A[e].selectedCollection||"ColorZone"===A[e].selectedColor?"white":A[e].selectedColor.includes("Two-Tone")?A[e].selectedColor.split("/")[0].replace("Two-Tone","").trim():A[e].selectedColor),"truewhite"===A[e].selectedDoorSeal&&(t.door.optional.VinylStopColor="white"),"black"===A[e].selectedDoorSeal&&(t.door.optional.VinylStopColor="black"),A[e].selectedDrawingNumber&&"undefined"!==A[e].selectedDrawingNumber&&(t.door.openerDetail||(t.door.openerDetail={}),t.door.openerDetail.itemNumber=A[e].selectedDrawingNumber),A[e].selectedWindload&&(t.door.optional.windProCode=A[e].selectedWindload.split("+")[0],t.door.optional.drawingNumber=A[e].winloadDrawingNumber),"vista"!==A[e].selectedCollection&&"horiz"!==A[e].selectedCollection||(t.door.fullViewDetail=A[e].fullViewDetail),A[e].selectedDoorLock&&(t.door.optional.lockhardware=A[e].selectedDoorLock),"true"===re("isHomeownerSite")?t.door.optional.homeOwnerHardwareUpgrade="premium"===A[e].selectedhardwareUpgrade:(A[e].selectedHighcycleSprings&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.highCycleSprings=A[e].selectedHighcycleSprings),A[e].selectedRoller&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.rollers=A[e].selectedRoller),A[e].selectedTrackLift&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.liftType=A[e].selectedTrackLift),A[e].selectedActualHighLift&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.actualHighLift=A[e].selectedActualHighLift),A[e].selectedHoriAngle&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.horizontalAngle=A[e].selectedHoriAngle),A[e].selectedHoriRadius&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.horizontalRadius=A[e].selectedHoriRadius),A[e].selectedSpring&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.spring=A[e].selectedSpring),A[e].selectedHinge&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.hinges=A[e].selectedHinge),A[e].selectedExtraStruts&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.extraStruts=A[e].selectedExtraStruts,t.door.hardwareDetail.numberOfExtraStruts=A[e].selectedExtraStrutsNumber),A[e].selectedBackhang&&(t.door.openerDetail||(t.door.openerDetail={}),t.door.openerDetail.punchAngleItemNumbers=[A[e].selectedBackhang+""])),J+="{\n quantity: ".concat(W[e]||1,'\n sku: "').concat(K[e],'"\n item_serialize: "').concat(Ne(JSON.stringify(U[e])),'"\n pricing_payload: "').concat(Ne(JSON.stringify(t)),'"\n }'),G){const n=JSON.parse(re("edit-cart-data-quantity-list")||"{}"),r=JSON.parse(re("edit-cart-data-uid-list")||"{}"),o=M.has("editDoorIndex")?+M.get("editDoorIndex"):Number(re("editDoorIndex"))||0;X+="{\n quantity: ".concat(n[o],',\n cart_item_uid: "').concat(r[o],'",\n sku: "').concat(K[e],'",\n item_serialize: "').concat(Ne(JSON.stringify(U[e])),'",\n pricing_payload: "').concat(Ne(JSON.stringify(t)),'"\n }')}if(""===z){var w,S;let n=JSON.parse(re("edited-desc-data")||"{}");const r=null===(w=JSON.parse(re("edit-door-additional-details")||"{}"))||void 0===w?void 0:w.edited_door_index,o=null===(S=JSON.parse(re("edit-door-additional-details")||"{}"))||void 0===S?void 0:S.orderNo,i={door_index:r,item_serialize_edited:"".concat(JSON.stringify(U[e])),pricing_payload_edited:"".concat(JSON.stringify(t)),edited_order_no:o,product_sku:"".concat(K[e])};if(re("edited-desc-data")){let e=!0;for(let t=0;t<n.length;t++)if(n[t].door_index===r){n[t]=i,e=!1;break}e&&n.push(i)}else n=[],n.push(i);ne("edited-desc-data",JSON.stringify(n))}}if(J+="]",X+="]",""!==z)try{ae();const e=G?await Object(i.e)(x,'\n mutation {\n updateCartItems(input: { cart_id: "'.concat(z,'", cart_items: ').concat(X," }) {\n cart {\n id\n }\n }\n }")):await Object(i.e)(x,'mutation {\n addProductsToCart(\n cartId: "'.concat(z,'"\n cartItems: ').concat(J,"\n )\n {\n cart {\n id\n }\n }\n }\n "));let t;return G?(t=e.data.data.updateCartItems.cart.id,oe("edit-cart-data-quantity-list"),oe("edit-cart-data-uid-list"),oe("edit-cart-data"),oe("editCart"),oe("editDoorIndex")):(t=e.data.data.addProductsToCart.cart.id,oe("design-door"),oe("confi-style"),oe("confi-size"),oe("startingPrices"),oe("doorPricing"),oe("desc-data"),oe("marginPrices"),sessionStorage.removeItem("pdfClicked"),oe("base0"),oe("base1"),oe("base2"),oe("base3"),oe("coll0"),oe("coll1"),oe("coll2"),oe("coll3"),oe("file0"),oe("file1"),oe("file2"),oe("file3")),ne("hasCartUpdated","true"),I&&(window.location.href=I),t}catch(P){var O,k,_,C;if(console.error(P),pt(null===P||void 0===P||null===(O=P.data)||void 0===O||null===(k=O.errors[0])||void 0===k?void 0:k.message))le(x,qe,e);else if((null===P||void 0===P||null===(_=P.data)||void 0===_||null===(C=_.errors[0])||void 0===C?void 0:C.message.indexOf("Requested product doesn't exist"))>-1){var j;null===(j=document.getElementById("collection-unavailable-popup"))||void 0===j||j.click()}else{var T;if(e.popupErrorLinkId)null===(T=document.getElementById(e.popupErrorLinkId))||void 0===T||T.click()}throw P}finally{se()}}catch(P){throw console.error("error->"+P),P}finally{se()}},Qe=(e,t,n,r,o)=>{const i=re("design-door"),a=JSON.parse(i),s=re("doorPricing"),c=JSON.parse(s),l=re("marginPrices"),u=JSON.parse(l),d=JSON.parse(re("confi-style")||"[]"),h=re("desc-data")||"[]",f=JSON.parse(h),{quantityArray:p,mergedList:m}=Je({parseData:a,isHomeownerSite:"true"===re("isHomeownerSite")});qe({cartId:e,apiURL:t,url:n,imageRootPath:r,parseDoor:m,descData:f,parsePrice:c,parseMar:u,popupErrorLinkId:o,confiStyle:d,quantityArray:p})},et=(e,t)=>{const n=new Date("".concat(e).concat(t?" UTC":"")),r=n.getHours(),o=n.getMinutes();return(r%12||12)+":"+(o<10?"0"+o:o)+(r<12?"AM":"PM")},tt=e=>{const t=JSON.parse(e),n=(new Date).getTime();return t.forEach((e,r)=>{if(e.time){const o=new Date(e.time).getTime();(n-o)/6e4>60&&t.splice(r,1)}}),t},nt=e=>e.reduce((e,t)=>{var n;return e+((null===t||void 0===t||null===(n=t.amount)||void 0===n?void 0:n.value)||0)},0),rt=()=>[{text:"10",value:"10"},{text:"15",value:"15"},{text:"20",value:"20"},{text:"25",value:"25"},{text:"50",value:"50"}],ot=e=>{const t=[],n="true"===re("isHomeownerSite")?"homeowner":"dealer";return e.forEach(e=>{e.key===n&&"object"===typeof e.value?Object.entries(e.value).forEach(e=>{let[n,r]=e;t.push({key:n,value:r})}):"string"===typeof e.value&&"low_head_room"!==e.key&&t.push(e)}),t},it=(e,t)=>{const n=re("design-door")||"[]",o=JSON.parse(n).map(e=>{const t=Object(r.a)({},e);return delete t.collection,delete t.color,delete t.construction,delete t.glass,delete t.hardware,delete t.hints,delete t.panel,delete t.windowdesign,delete t.windowplacement,t});return{designDoor:JSON.stringify(o),confiStyle:re("confi-style"),doorPricing:re("doorPricing"),confiSize:re("confi-size"),installationTypeList:e,doorImageArray:t}},at=e=>{const{currencySymbol:t}=e,n=e.configuration.designDoor,r=e.configuration.confiStyle,o=e.configuration.doorPricing,i=e.configuration.installationTypeList,a=e.configuration.doorImageArray,s=n?JSON.parse(n):null,c=r?JSON.parse(r):null,l=o?JSON.parse(o):null;return((e,t,n,r,o,i,a)=>{const{collectionsArray:s=[],sizeArray:c=[],imagesArray:l=[],installationTypeArray:u=[],indexArray:d=[],pricesArray:h=[],quantityArray:f=[],mergedList:p=[]}=Je({parseData:[...e],imagesArray:[...n],installationTypeArray:[...a],collectionsArray:[...r],pricesArray:[...i],sizeArray:[...o],isHomeownerSite:"true"===re("isHomeownerSite")});return p.map((e,n)=>{var r,o,i,a,p,m,g,b,v,y;return{quantity:f[n],doorNumber:d[n],imageUrl:l[n],price:{label:"".concat(t).concat(ke(h[n])),value:h[n]},heightFeet:(null===(r=c[n])||void 0===r||null===(o=r.height)||void 0===o?void 0:o.feet)||"",heightInches:(null===(i=c[n])||void 0===i||null===(a=i.height)||void 0===a?void 0:a.inch)||"",widthFeet:(null===(p=c[n])||void 0===p||null===(m=p.width)||void 0===m?void 0:m.feet)||"",widthInches:(null===(g=c[n])||void 0===g||null===(b=g.width)||void 0===b?void 0:b.inch)||"",brand:{label:"Amarr",value:e.selectedCollection},collection:{label:e.selectedCollectionLabel,value:e.selectedCollectionLabel,redirectionUrl:s[n]},construction:{label:e.selectedConstructionLabel,value:e.selectedConstructionLabel},color:{label:e.selectedColor,value:e.selectedColor},windload:{label:e.winloadLabel,value:e.selectedWindload},design:{label:e.selectedPanel,value:e.selectedPanel},windowPlacement:{label:e.selectedWindowPlacement,value:e.selectedWindowPlacement},glassType:{label:e.selectedGlass,value:e.selectedGlass},hardware:{label:e.selectedHardwareValue,value:e.selectedHardwareValue},clavos:{label:"",value:""},notes:{label:"",value:""},doorLock:{label:e.selectedDoorLock,value:e.selectedDoorLock},doorSeal:{label:e.selectedDoorSealLabel,value:e.selectedDoorSeal},opener:{label:e.selectedDoorOpenerLabel,value:e.selectedDoorOpener},lowHeadroom:{label:ze(e.selectedHeadroom),value:e.selectedHeadroom},hardwareUpgrade:{label:e.selectedhardwareUpgrade,value:e.selectedhardwareUpgrade},installationType:{label:null===(v=u[n])||void 0===v?void 0:v.label,value:null===(y=u[n])||void 0===y?void 0:y.value}}})})(s,t,a,null===c||void 0===c?void 0:c.map(e=>{var t;return(null===e||void 0===e||null===(t=e.selectedCollection)||void 0===t?void 0:t.url)||""}),null===c||void 0===c?void 0:c.map(e=>({height:(null===e||void 0===e?void 0:e.height)||{},width:(null===e||void 0===e?void 0:e.width)||{},headroom:(null===e||void 0===e?void 0:e.headroom)||"",sideroom:e.sideroom||{},backroom:e.backroom||{}})),l,i)},st=e=>{const t={},n="true"===re("isHomeownerSite")?"homeowner":"dealer";for(const[r,o]of Object.entries(e))r===n&&"object"===typeof e[r]?Object.entries(e[r]).forEach(e=>{let[n,r]=e;t["".concat(n)]=r}):"string"===typeof e[r]&&(t["".concat(r)]=e[r]);return t},ct=e=>{let t=!1;return e.forEach(e=>{"isAccessory"===e.key&&!0===e.value&&(t=!0)}),t},lt=e=>{let t=!1;return e.forEach(e=>{"isOpener"===e.key&&!0===e.value&&(t=!0)}),t},ut=["collection","image","Brand","DIY","Price","Labour_charge","Quantity","low_head_room","HardwareImage","WinloadDrawingNumber","Garage Door Opener Image Path","Garage Door Opener Item Number","Garage Door Opener Laborcost","Door Style","isMosaicSupported","Windload","Garage Door Opener","Garage Door Accessory","Garage Door Accessory Price","Door Collection","Roller","Spring Type","Track Lift","Actual High Lift","Back Hang","Extra Struts","Construction","Perimeter Door Seal","High Cycle Springs","laborcost","accessory_name","accessory_sku","accessory_price","opener_brand","Window Design","Hinge Type","Horizontal Angle","Horizontal Radius","imapUsed"].map(e=>e.toLowerCase()),dt=[...ut,"Door Collection_"].map(e=>e.toLowerCase()),ht=["Door Collection","Construction"].map(e=>e.toLowerCase()),ft=(e,t)=>{let n="";if(t&&t.length>0)for(let r=0;r<t.length;r++)t[r].value===e&&(n=t[r].description);return n},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.includes("Could not find a cart with ID")||e.includes("The cart isn't active")};function mt(e,t){let n=t||"html",r=e;return n||(n="html"),"html"==n&&(r=function(e){let t,n,r,a,s=e,u="";const d=o(s,"&lt;!--","--&gt;",c,"W3HTMLCOMMENTPOS");s=d.rest;for(;s.indexOf("&lt;")>-1;)r="",t=s.indexOf("&lt;"),"&LT;STYLE"==s.substr(t,9).toUpperCase()&&(r="css"),"&LT;SCRIPT"==s.substr(t,10).toUpperCase()&&(r="javascript"),n=s.indexOf("&gt;",t),-1==n&&(n=s.length),u+=s.substring(0,t),u+=i(s.substring(t,n+4)),s=s.substr(n+4),"css"==r&&(n=s.indexOf("&lt;/style&gt;"),n>-1&&(u+=l(s.substring(0,n)),s=s.substr(n))),"javascript"==r&&(n=s.indexOf("&lt;/script&gt;"),n>-1&&(u+=f(s.substring(0,n)),s=s.substr(n)));for(s=u+s,a=0;a<d.arr.length;a++)s=s.replace("W3HTMLCOMMENTPOS",d.arr[a]);return s}(r)),"css"==n&&(r=l(r)),"js"==n&&(r=f(r)),r;function o(e,t,n,r,o){let i,a,s="";const c=[];for(;e.search(t)>-1;)i=e.search(t),a=e.indexOf(n,i),-1==a&&(a=e.length),o?(c.push(r(e.substring(i,a+n.length))),e=e.substring(0,i)+o+e.substr(a+n.length)):(s+=e.substring(0,i),s+=r(e.substring(i,a+n.length)),e=e.substr(a+n.length));return{rest:s+e,arr:c}}function i(e){let t,n,r,o=e,i="";for(;o.search(/(\s|<br>)/)>-1;)t=o.search(/(\s|<br>)/),n=o.indexOf("&gt;"),-1==n&&(n=o.length),i+=o.substring(0,t),i+=a(o.substring(t,n)),o=o.substr(n);return r=i+o,r="<span style=color:grey>&lt;</span>"+r.substring(4),"&gt;"==r.substr(r.length-4,4)&&(r=r.substring(0,r.length-4)+"<span style=color:grey>&gt;</span>"),"<span style=color:#a10d5f>"+r+"</span>"}function a(e){let t,n,r,o,i,a=e,c="";for(;a.indexOf("=")>-1;)n=-1,t=a.indexOf("="),r=a.indexOf("'",t),o=a.indexOf('"',t),i=a.indexOf(" ",t+2),i>-1&&(i<r||-1==r)&&(i<o||-1==o)?n=a.indexOf(" ",t):o>-1&&(o<r||-1==r)&&(o<i||-1==i)?n=a.indexOf('"',a.indexOf('"',t)+1):r>-1&&(r<o||-1==o)&&(r<i||-1==i)&&(n=a.indexOf("'",a.indexOf("'",t)+1)),(!n||-1==n||n<t)&&(n=a.length),c+=a.substring(0,t),c+=s(a.substring(t,n+1)),a=a.substr(n+1);return"<span style=color:green>"+c+a+"</span>"}function s(e){return"<span style=color:#1c8a9c>"+e+"</span>"}function c(e){return"<span style=color:green>"+e+"</span>"}function l(e){let t,n,r,i,a,s,l=e,d="";const h=o(l,/\/\*/,"*/",c,"W3CSSCOMMENTPOS");for(l=h.rest;l.search("{")>-1;){for(t=l.search("{"),i=l.substr(t+1),s=1,a=0,r=0;r<i.length&&("{"==i.substr(r,1)&&(s++,a++),"}"==i.substr(r,1)&&s--,0!=s);r++);for(0!=s&&(a=0),n=t,r=0;r<=a;r++)n=l.indexOf("}",n+1);-1==n&&(n=l.length),d+=l.substring(0,t+1),d+=u(l.substring(t+1,n)),l=l.substr(n)}for(l=d+l,l=l.replace(/{/g,"<span style=color:grey>{</span>"),l=l.replace(/}/g,"<span style=color:grey>}</span>"),r=0;r<h.arr.length;r++)l=l.replace("W3CSSCOMMENTPOS",h.arr[r]);return"<span style=color:green>"+l+"</span>"}function u(e){let t,n,r,o,i=e,a="";if(i.indexOf("{")>-1)return l(i);for(;i.search(":")>-1;){for(t=i.search(":"),o=!0,r=t;1==o;)o=!1,n=i.indexOf(";",r),"&nbsp;"==i.substring(n-5,n+1)&&(o=!0,r=n+1);-1==n&&(n=i.length),a+=i.substring(0,t),a+=d(i.substring(t,n+1)),i=i.substr(n+1)}return"<span style=color:#a10d5f>"+a+i+"</span>"}function d(e){let t,n=e,r="";for(n="<span style=color:grey>:</span>"+n.substring(1);n.search(/!important/i)>-1;)t=n.search(/!important/i),r+=n.substring(0,t),r+=h(n.substring(t,t+10)),n=n.substr(t+10);let o=r+n;return";"==o.substr(o.length-1,1)&&"&nbsp;"!=o.substr(o.length-6,6)&&"&lt;"!=o.substr(o.length-4,4)&&"&gt;"!=o.substr(o.length-4,4)&&"&amp;"!=o.substr(o.length-5,5)&&(o=o.substring(0,o.length-1)+"<span style=color:grey>;</span>"),"<span style=color:black>"+o+"</span>"}function h(e){return"<span style=color:red;font-weight:bold;>"+e+"</span>"}function f(e){let t,n,r,o,i,a,s,l,u,d,h=e,f="",k="";const _=[];for(t=0;t<h.length;t++)n=h.substr(t,1),"\\"==n&&(_.push(h.substr(t,2)),n="W3JSESCAPE",t++),k+=n;h=k;for(;r=S(h,"'","'",p),o=S(h,'"','"',p),i=S(h,/\/\*/,"*/",c),a=S(h,/\/\//,"<br>",c),l=O(h,g),s=w("js",h,m),d=v(h,b),-1!=Math.max(l[0],r[0],o[0],i[0],a[0],s[0],d[0])&&(u=y(l,r,o,i,a,s,d),-1!=u[0]);)u[0]>-1&&(f+=h.substring(0,u[0]),f+=u[2](h.substring(u[0],u[1])),h=h.substr(u[1]));for(h=f+h,t=0;t<_.length;t++)h=h.replace("W3JSESCAPE",_[t]);return"<span style=color:black>"+h+"</span>"}function p(e){return"<span style=color:brown>"+e+"</span>"}function m(e){return"<span style=color:mediumblue>"+e+"</span>"}function g(e){return"<span style=color:red>"+e+"</span>"}function b(e){return"<span style=color:black>"+e+"</span>"}function v(e,t){let n,r,o,i;const a=[".","<"," ",";","(","+",")","[","]",",","&",":","{","}","/","-","*","|","%"],s=e.indexOf(".");if(s>-1)for(n=e.substr(s+1),o=0;o<n.length;o++){const e=n[o];for(r=0;r<a.length;r++)if(e.indexOf(a[r])>-1)return i=o,[s+1,i+s+1,t]}return[-1,-1,t]}function y(e,t,n,r,o,i,a){const s=[e,t,n,r,o,i,a];let c=s[0];for(const l of s)l[0]>-1&&(-1===c[0]||l[0]<c[0])&&(c=l);return c}function w(e,t,n){let r,o,i,a,s=-1,c=-1;for("js"==e&&(a=["abstract","arguments","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","eval","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","let","long","NaN","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with","yield"]),r=0;r<a.length;r++)o=t.indexOf(a[r]),o>-1&&(i=/\W/g,t.substr(o+a[r].length,1).match(i)&&t.substr(o-1,1).match(i)&&o>-1&&(-1==s||o<s)&&(s=o,c=s+a[r].length));return[s,c,n]}function S(e,t,n,r){let o;const i=e.search(t);return o=e.indexOf(n,i+n.length),-1==o&&(o=e.length),[i,o+n.length,r]}function O(e,t){const n=["<br>"," ",";","(","+",")","[","]",",","&",":","{","}","/","-","*","|","%","="];let r,o,i,a,s,c=0;for(r=0;r<e.length;r++)for(o=0;o<n.length;o++)if(i=e.substr(r,n[o].length),i==n[o]){if("-"==i&&("e"==e.substr(r-1,1)||"E"==e.substr(r-1,1)))continue;if(a=r,c<a&&(s=e.substring(c,a),!isNaN(s)))return[c,a,t];r+=n[o].length,c=r,r-=1;break}return[-1,-1,t]}}const gt=e=>{const t=[];e.arguments.split(",").forEach(e=>{e=e.indexOf(":")>-1?JSON.parse(e):e.replaceAll('"',"").trim(),t.push(e)}),window.gtag&&"function"===typeof window.gtag&&window.location.pathname==e.path&&window.gtag(...t)},bt=(e,t)=>{window.indexedDB.open("AmarrDB",10).onsuccess=n=>{n.target.result.transaction(["data"],"readwrite").objectStore("data").get(e).onsuccess=e=>{t(e)}}},vt=(e,t)=>{window.indexedDB.open("AmarrDB",10).onsuccess=function(n){const r=n.target.result;r.transaction(["data"],"readwrite").objectStore("data").add({key:e,value:t}).onsuccess=e=>{},r.close()}},yt=()=>{window.indexedDB.open("AmarrDB",10).onsuccess=function(e){e.target.result.transaction(["data"],"readwrite").objectStore("data").clear().onsuccess=e=>{console.info("db cleard")}}};let wt=0;const St=async()=>{const e=window.location.hostname.split("."),t=["dev","int","qa","qa2","stage"];try{const n=await fetch(a.a.csrfTokenURL,{method:"GET",headers:e.length>2&&e[0]&&t.includes(e[0])?{"Content-Type":"application/json"}:{}}),r=await n.json();return!r.token&&wt<2?(wt++,St()):r.token||""}catch(n){return console.error("There was a problem with fetching the token:",n),""}},Ot=()=>{const e=re("token")||"";if(e){const t=Object(s.default)(e);return(new Date).getTime()>1e3*t.exp}return!0}},10:function(e,t){e.exports=ReactDOM},11:function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",(function(){return r}))},12:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(4),o=n(0),i=n.n(o);const a=e=>{const{componentThemes:t,selectedTheme:n}=e.setter;return i.a.createElement(r.ThemeProvider,{theme:()=>{if(!n)return t.theme1;const e=n.match(/\d+/g).map(Number),r=Object.keys(t).find(n=>!(!Array.isArray(e)||1!==e.length)&&(n.includes(e[0])&&t[n]));return r?t["".concat(r)]:t.theme1}},e.children)};t.b=a},13:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(4),a=n(32),s=n.n(a);const c=Object(r.createContext)({});t.a=e=>{let t=!1;try{var n;t=(null===(n=document)||void 0===n?void 0:n.dir)&&"rtl"===document.dir.toLowerCase()||!1}catch(a){console.error(a)}const r=t?[s.a]:[];return o.a.createElement(i.StyleSheetManager,{stylisPlugins:r},o.a.createElement(c.Provider,{value:{rtl:t}},e.children))}},14:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n.n(r);const i=n(4).default.div.withConfig({displayName:"styles__Wrapper",componentId:"sc-1pdbosk-0"})(["box-sizing:border-box;width:100%;margin:0 auto;padding:",";max-width:",";"],e=>{let{padding:t}=e;return t?"0 var(--grid-margin);":0},e=>{let{maxWidth:t}=e;return"calc(var(--container-max-width)px + var(--grid-margin) + var(--grid-margin));"}),a=e=>{const{className:t,children:n,maxWidth:r=1520,padding:a=!0}=e;return o.a.createElement(i,{className:t,maxWidth:r,padding:a},n)};t.b=a},16:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(1);const o=()=>{Object(r.Nb)("user"),Object(r.Nb)("dealer"),Object(r.Nb)("expiry"),Object(r.Nb)("token"),Object(r.Nb)("childAccountList"),document.cookie="usertype=null; max-age=0;secure",Object(r.Nb)("primaryRole"),sessionStorage.removeItem("amarrRoles"),Object(r.Nb)("dealerMagentoToken"),Object(r.Nb)("currencySymbol"),Object(r.Nb)("dealerLocation"),Object(r.Nb)("dispatchLocationId")},i=()=>{var e;null===(e=document.getElementById("logout-message-popup"))||void 0===e||e.classList.add("show"),document.body.classList.add("modal-open"),setTimeout(()=>{var e;null===(e=document.getElementById("logout-message-popup"))||void 0===e||e.classList.remove("show"),document.body.classList.remove("modal-open"),o(),r.yb.next(!0)},5e3)}},183:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(7),a=n.n(i);var s={theme1:{background:"var(--bg-main)"},theme2:{background:"var(--bg-alt)"}},c=n(11),l=n(4);function u(){const e=Object(c.a)(["\n \n "]);return u=function(){return e},e}const d=l.default.div.withConfig({displayName:"styles__Content",componentId:"sc-g32lcb-0"})(["",""],e=>{var t;(null===(t=e.gradients)||void 0===t?void 0:t.visible)?e.theme.gradient:e.theme;return Object(l.css)(u())});var h=n(12),f=n(13),p=n(14),m=n(1),g=n(78);const b=e=>{let{}=e;const{loginWithRedirect:t}=Object(g.useAuth0)();return Object(r.useEffect)(()=>{t()},[]),o.a.createElement(d,{isReversed:!1},"\xa0")};b.defaultProps={theme:""};var v=b;const y={configs:{dealerLoginDomainName:"",dealerLoginClientId:"",dealerLoginAudience:"",postLoginRedirectURI:"",logoutURI:""}},w=e=>{var t,n,r,i;const c=a()({},y,Object(m.h)(e.content));return o.a.createElement(h.a,{setter:{componentThemes:s,selectedTheme:e.theme}},o.a.createElement(f.a,null,o.a.createElement(p.a,null,o.a.createElement(d,{isReversed:!1},o.a.createElement(g.Auth0Provider,{domain:null===c||void 0===c||null===(t=c.configs)||void 0===t?void 0:t.dealerLoginDomainName,clientId:null===c||void 0===c||null===(n=c.configs)||void 0===n?void 0:n.dealerLoginClientId,authorizationParams:{audience:null===c||void 0===c||null===(r=c.configs)||void 0===r?void 0:r.dealerLoginAudience,redirect_uri:null===c||void 0===c||null===(i=c.configs)||void 0===i?void 0:i.postLoginRedirectURI}},o.a.createElement(v,null))))))};w.defaultProps={theme:"",content:""};t.a=w},19:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r={PowerReviewApi:"3783f7b5-5e6f-4da2-90ce-1a55c1fd02b2",Locale:"en_US",MerchantGroupId:"48814",ProductMerchantId:"445672",DealerMerchantId:"135036",csrfTokenURL:"/libs/granite/csrf/token.json"}},20:function(e,t,n){"use strict";var r=n(21),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=f(n);o&&o!==p&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),m=c(n),g=0;g<a.length;++g){var b=a[g];if(!i[b]&&(!r||!r[b])&&(!m||!m[b])&&(!s||!s[b])){var v=h(n,b);try{l(t,b,v)}catch(y){}}}}return t}},22:function(e,t,n){"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,"a",(function(){return i}));var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=r((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}))},26:function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<i.length;c++){var l=i[c];if(!s(l))return!1;var u=e[l],d=t[l];if(!1===(o=n?n.call(r,u,d,l):void 0)||void 0===o&&u!==d)return!1}return!0}},27:function(e,t,n){"use strict";t.a=function(e){function t(e,t,r){var o=t.trim().split(p);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var c=s=0;for(t=[];s<i;++s)for(var l=0;l<a;++l)t[c++]=n(e[l]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,i){var a=e+";",s=2*t+3*n+4*i;if(944===s){e=a.indexOf(":",9)+1;var c=a.substring(e,a.length-1).trim();return c=a.substring(0,e).trim()+c+";",1===x||2===x&&o(c,1)?"-webkit-"+c+c:c}if(0===x||2===x&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(c=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+c+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(t=(c=a.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=a.replace(y,"tb");break;case 232:c=a.replace(y,"tb-rl");break;case 220:c=a.replace(y,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+c+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(c=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(c,"-webkit-"+c)+";"+a.replace(c,"-ms-"+c+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return c=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+c+"-ms-flex-"+c+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(O,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(O,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===_.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,i).replace(":fill-available",":stretch"):a.replace(c,"-webkit-"+c)+a.replace(c,"-moz-"+c.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+i&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),N(2!==t?r:r.replace(k,"$1"),n,t)}function i(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(S," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,o,i,a,s,l,u){for(var d,h=0,f=t;h<A;++h)switch(d=E[h].call(c,e,f,n,r,o,i,a,s,l,u)){case void 0:case!1:case!0:case null:break;default:f=d}if(f!==t)return f}function s(e){return void 0!==(e=e.prefix)&&(N=null,e?"function"!==typeof e?x=1:(x=2,N=e):x=0),s}function c(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<A){var c=a(-1,n,s,s,T,j,0,0,0,0);void 0!==c&&"string"===typeof c&&(n=c)}var d=function e(n,s,c,d,h){for(var f,p,m,y,S,O=0,k=0,_=0,C=0,E=0,N=0,D=m=f=0,L=0,W=0,z=0,H=0,Z=c.length,U=Z-1,K="",M="",G="",J="";L<Z;){if(p=c.charCodeAt(L),L===U&&0!==k+C+_+O&&(0!==k&&(p=47===k?10:47),C=_=O=0,Z++,U++),0===k+C+_+O){if(L===U&&(0<W&&(K=K.replace(u,"")),0<K.trim().length)){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:K+=c.charAt(L)}p=59}switch(p){case 123:for(f=(K=K.trim()).charCodeAt(0),m=1,H=++L;L<Z;){switch(p=c.charCodeAt(L)){case 123:m++;break;case 125:m--;break;case 47:switch(p=c.charCodeAt(L+1)){case 42:case 47:e:{for(D=L+1;D<U;++D)switch(c.charCodeAt(D)){case 47:if(42===p&&42===c.charCodeAt(D-1)&&L+2!==D){L=D+1;break e}break;case 10:if(47===p){L=D+1;break e}}L=D}}break;case 91:p++;case 40:p++;case 34:case 39:for(;L++<U&&c.charCodeAt(L)!==p;);}if(0===m)break;L++}switch(m=c.substring(H,L),0===f&&(f=(K=K.replace(l,"").trim()).charCodeAt(0)),f){case 64:switch(0<W&&(K=K.replace(u,"")),p=K.charCodeAt(1)){case 100:case 109:case 115:case 45:W=s;break;default:W=I}if(H=(m=e(s,W,m,p,h+1)).length,0<A&&(S=a(3,m,W=t(I,K,z),s,T,j,H,p,h,d),K=W.join(""),void 0!==S&&0===(H=(m=S.trim()).length)&&(p=0,m="")),0<H)switch(p){case 115:K=K.replace(w,i);case 100:case 109:case 45:m=K+"{"+m+"}";break;case 107:m=(K=K.replace(g,"$1 $2"))+"{"+m+"}",m=1===x||2===x&&o("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=K+m,112===d&&(M+=m,m="")}else m="";break;default:m=e(s,t(s,K,z),m,d,h+1)}G+=m,m=z=W=D=f=0,K="",p=c.charCodeAt(++L);break;case 125:case 59:if(1<(H=(K=(0<W?K.replace(u,""):K).trim()).length))switch(0===D&&(f=K.charCodeAt(0),45===f||96<f&&123>f)&&(H=(K=K.replace(" ",":")).length),0<A&&void 0!==(S=a(1,K,s,n,T,j,M.length,d,h,d))&&0===(H=(K=S.trim()).length)&&(K="\0\0"),f=K.charCodeAt(0),p=K.charCodeAt(1),f){case 0:break;case 64:if(105===p||99===p){J+=K+c.charAt(L);break}default:58!==K.charCodeAt(H-1)&&(M+=r(K,f,p,K.charCodeAt(2)))}z=W=D=f=0,K="",p=c.charCodeAt(++L)}}switch(p){case 13:case 10:47===k?k=0:0===1+f&&107!==d&&0<K.length&&(W=1,K+="\0"),0<A*R&&a(0,K,s,n,T,j,M.length,d,h,d),j=1,T++;break;case 59:case 125:if(0===k+C+_+O){j++;break}default:switch(j++,y=c.charAt(L),p){case 9:case 32:if(0===C+O+k)switch(E){case 44:case 58:case 9:case 32:y="";break;default:32!==p&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===C+k+O&&(W=z=1,y="\f"+y);break;case 108:if(0===C+k+O+P&&0<D)switch(L-D){case 2:112===E&&58===c.charCodeAt(L-3)&&(P=E);case 8:111===N&&(P=N)}break;case 58:0===C+k+O&&(D=L);break;case 44:0===k+_+C+O&&(W=1,y+="\r");break;case 34:case 39:0===k&&(C=C===p?0:0===C?p:C);break;case 91:0===C+k+_&&O++;break;case 93:0===C+k+_&&O--;break;case 41:0===C+k+O&&_--;break;case 40:if(0===C+k+O){if(0===f)switch(2*E+3*N){case 533:break;default:f=1}_++}break;case 64:0===k+_+C+O+D+m&&(m=1);break;case 42:case 47:if(!(0<C+O+_))switch(k){case 0:switch(2*p+3*c.charCodeAt(L+1)){case 235:k=47;break;case 220:H=L,k=42}break;case 42:47===p&&42===E&&H+2!==L&&(33===c.charCodeAt(H+2)&&(M+=c.substring(H,L+1)),y="",k=0)}}0===k&&(K+=y)}N=E,E=p,L++}if(0<(H=M.length)){if(W=s,0<A&&(void 0!==(S=a(2,M,W,n,T,j,H,d,h,d))&&0===(M=S).length))return J+M+G;if(M=W.join(",")+"{"+M+"}",0!==x*P){switch(2!==x||o(M,2)||(P=0),P){case 111:M=M.replace(v,":-moz-$1")+M;break;case 112:M=M.replace(b,"::-webkit-input-$1")+M.replace(b,"::-moz-$1")+M.replace(b,":-ms-input-$1")+M}P=0}}return J+M+G}(I,s,n,0,0);return 0<A&&(void 0!==(c=a(-2,d,s,s,T,j,d.length,0,0,0))&&(d=c)),"",P=0,j=T=1,d}var l=/^\0+/g,u=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,f=/([,: ])(transform)/g,p=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,v=/:(read-only)/g,y=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,O=/-self|flex-/g,k=/[^]*?(:[rp][el]a[\w-]+)[^]*/,_=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,j=1,T=1,P=0,x=1,I=[],E=[],A=0,N=null,R=0;return c.use=function e(t){switch(t){case void 0:case null:A=E.length=0;break;default:if("function"===typeof t)E[A++]=t;else if("object"===typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else R=0|!!t}return e},c.set=s,void 0!==e&&s(e),c}},28:function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},29:function(e,t,n){(function(e,n){var r="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",a="[object Map]",s="[object Set]",c=/\w*$/,l=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,d={};d[r]=d["[object Array]"]=d["[object ArrayBuffer]"]=d["[object DataView]"]=d["[object Boolean]"]=d["[object Date]"]=d["[object Float32Array]"]=d["[object Float64Array]"]=d["[object Int8Array]"]=d["[object Int16Array]"]=d["[object Int32Array]"]=d[a]=d["[object Number]"]=d["[object Object]"]=d["[object RegExp]"]=d[s]=d["[object String]"]=d["[object Symbol]"]=d["[object Uint8Array]"]=d["[object Uint8ClampedArray]"]=d["[object Uint16Array]"]=d["[object Uint32Array]"]=!0,d["[object Error]"]=d[o]=d["[object WeakMap]"]=!1;var h="object"==typeof e&&e&&e.Object===Object&&e,f="object"==typeof self&&self&&self.Object===Object&&self,p=h||f||Function("return this")(),m=t&&!t.nodeType&&t,g=m&&"object"==typeof n&&n&&!n.nodeType&&n,b=g&&g.exports===m;function v(e,t){return e.set(t[0],t[1]),e}function y(e,t){return e.add(t),e}function w(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function S(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function O(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function k(e,t){return function(n){return e(t(n))}}function _(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var C=Array.prototype,j=Function.prototype,T=Object.prototype,P=p["__core-js_shared__"],x=function(){var e=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),I=j.toString,E=T.hasOwnProperty,A=T.toString,N=RegExp("^"+I.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=b?p.Buffer:void 0,D=p.Symbol,L=p.Uint8Array,W=k(Object.getPrototypeOf,Object),z=Object.create,H=T.propertyIsEnumerable,Z=C.splice,U=Object.getOwnPropertySymbols,K=R?R.isBuffer:void 0,M=k(Object.keys,Object),G=me(p,"DataView"),J=me(p,"Map"),X=me(p,"Promise"),F=me(p,"Set"),V=me(p,"WeakMap"),B=me(Object,"create"),Y=we(G),$=we(J),q=we(X),Q=we(F),ee=we(V),te=D?D.prototype:void 0,ne=te?te.valueOf:void 0;function re(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ie(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ae(e){this.__data__=new oe(e)}function se(e,t){var n=Oe(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&ke(e)}(e)&&E.call(e,"callee")&&(!H.call(e,"callee")||A.call(e)==r)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=n.length,i=!!o;for(var a in e)!t&&!E.call(e,a)||i&&("length"==a||ve(a,o))||n.push(a);return n}function ce(e,t,n){var r=e[t];E.call(e,t)&&Se(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function le(e,t){for(var n=e.length;n--;)if(Se(e[n][0],t))return n;return-1}function ue(e,t,n,l,u,h,f){var p;if(l&&(p=h?l(e,u,h,f):l(e)),void 0!==p)return p;if(!je(e))return e;var m=Oe(e);if(m){if(p=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&E.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,p)}else{var g=be(e),b=g==o||g==i;if(_e(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if("[object Object]"==g||g==r||b&&!h){if(S(e))return h?e:{};if(p=function(e){return"function"!=typeof e.constructor||ye(e)?{}:(t=W(e),je(t)?z(t):{});var t}(b?{}:e),!t)return function(e,t){return fe(e,ge(e),t)}(e,function(e,t){return e&&fe(t,Te(t),e)}(p,e))}else{if(!d[g])return h?e:{};p=function(e,t,n,r){var o=e.constructor;switch(t){case"[object ArrayBuffer]":return he(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return function(e,t){var n=t?he(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?he(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case a:return function(e,t,n){return w(t?n(O(e),!0):O(e),v,new e.constructor)}(e,r,n);case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,c.exec(e));return t.lastIndex=e.lastIndex,t}(e);case s:return function(e,t,n){return w(t?n(_(e),!0):_(e),y,new e.constructor)}(e,r,n);case"[object Symbol]":return i=e,ne?Object(ne.call(i)):{}}var i}(e,g,ue,t)}}f||(f=new ae);var k=f.get(e);if(k)return k;if(f.set(e,p),!m)var C=n?function(e){return function(e,t,n){var r=t(e);return Oe(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Te,ge)}(e):Te(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(C||e,(function(r,o){C&&(r=e[o=r]),ce(p,o,ue(r,t,n,l,o,e,f))})),p}function de(e){return!(!je(e)||(t=e,x&&x in t))&&(Ce(e)||S(e)?N:l).test(we(e));var t}function he(e){var t=new e.constructor(e.byteLength);return new L(t).set(new L(e)),t}function fe(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],s=r?r(n[a],e[a],a,n,e):void 0;ce(n,a,void 0===s?e[a]:s)}return n}function pe(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return de(n)?n:void 0}re.prototype.clear=function(){this.__data__=B?B(null):{}},re.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},re.prototype.get=function(e){var t=this.__data__;if(B){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return E.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return B?void 0!==t[e]:E.call(t,e)},re.prototype.set=function(e,t){return this.__data__[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this},oe.prototype.clear=function(){this.__data__=[]},oe.prototype.delete=function(e){var t=this.__data__,n=le(t,e);return!(n<0)&&(n==t.length-1?t.pop():Z.call(t,n,1),!0)},oe.prototype.get=function(e){var t=this.__data__,n=le(t,e);return n<0?void 0:t[n][1]},oe.prototype.has=function(e){return le(this.__data__,e)>-1},oe.prototype.set=function(e,t){var n=this.__data__,r=le(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ie.prototype.clear=function(){this.__data__={hash:new re,map:new(J||oe),string:new re}},ie.prototype.delete=function(e){return pe(this,e).delete(e)},ie.prototype.get=function(e){return pe(this,e).get(e)},ie.prototype.has=function(e){return pe(this,e).has(e)},ie.prototype.set=function(e,t){return pe(this,e).set(e,t),this},ae.prototype.clear=function(){this.__data__=new oe},ae.prototype.delete=function(e){return this.__data__.delete(e)},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this;n=this.__data__=new ie(r)}return n.set(e,t),this};var ge=U?k(U,Object):function(){return[]},be=function(e){return A.call(e)};function ve(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||u.test(e))&&e>-1&&e%1==0&&e<t}function ye(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||T)}function we(e){if(null!=e){try{return I.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Se(e,t){return e===t||e!==e&&t!==t}(G&&"[object DataView]"!=be(new G(new ArrayBuffer(1)))||J&&be(new J)!=a||X&&"[object Promise]"!=be(X.resolve())||F&&be(new F)!=s||V&&"[object WeakMap]"!=be(new V))&&(be=function(e){var t=A.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?we(n):void 0;if(r)switch(r){case Y:return"[object DataView]";case $:return a;case q:return"[object Promise]";case Q:return s;case ee:return"[object WeakMap]"}return t});var Oe=Array.isArray;function ke(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!Ce(e)}var _e=K||function(){return!1};function Ce(e){var t=je(e)?A.call(e):"";return t==o||t==i}function je(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Te(e){return ke(e)?se(e):function(e){if(!ye(e))return M(e);var t=[];for(var n in Object(e))E.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}n.exports=function(e){return ue(e,!0,!0)}}).call(this,n(35),n(51)(e))},30:function(e,t,n){var r;!function(){function o(e,t,n){return e.call.apply(e.bind,arguments)}function i(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function a(e,t,n){return(a=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?o:i).apply(null,arguments)}var s=Date.now||function(){return+new Date};function c(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var l=!!window.FontFace;function u(e,t,n,r){if(t=e.c.createElement(t),n)for(var o in n)n.hasOwnProperty(o)&&("style"==o?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return r&&t.appendChild(e.c.createTextNode(r)),t}function d(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function h(e){e.parentNode&&e.parentNode.removeChild(e)}function f(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),o=0;o<t.length;o+=1){for(var i=!1,a=0;a<r.length;a+=1)if(t[o]===r[a]){i=!0;break}i||r.push(t[o])}for(t=[],o=0;o<r.length;o+=1){for(i=!1,a=0;a<n.length;a+=1)if(r[o]===n[a]){i=!0;break}i||t.push(r[o])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function p(e,t){for(var n=e.className.split(/\s+/),r=0,o=n.length;r<o;r++)if(n[r]==t)return!0;return!1}function m(e,t,n){function r(){s&&o&&i&&(s(a),s=null)}t=u(e,"link",{rel:"stylesheet",href:t,media:"all"});var o=!1,i=!0,a=null,s=n||null;l?(t.onload=function(){o=!0,r()},t.onerror=function(){o=!0,a=Error("Stylesheet failed to load"),r()}):setTimeout((function(){o=!0,r()}),0),d(e,"head",t)}function g(e,t,n,r){var o=e.c.getElementsByTagName("head")[0];if(o){var i=u(e,"script",{src:t}),a=!1;return i.onload=i.onreadystatechange=function(){a||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(a=!0,n&&n(null),i.onload=i.onreadystatechange=null,"HEAD"==i.parentNode.tagName&&o.removeChild(i))},o.appendChild(i),setTimeout((function(){a||(a=!0,n&&n(Error("Script load timeout")))}),r||5e3),i}return null}function b(){this.a=0,this.c=null}function v(e){return e.a++,function(){e.a--,w(e)}}function y(e,t){e.c=t,w(e)}function w(e){0==e.a&&e.c&&(e.c(),e.c=null)}function S(e){this.a=e||"-"}function O(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function k(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function _(e){return e.a+e.f}function C(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function j(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function T(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new S("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function P(e){if(e.g){var t=p(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),f(e.f,n,r)}x(e,"inactive")}function x(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,_(n)):e.h[t]())}function I(){this.c={}}function E(e,t){this.c=e,this.f=t,this.a=u(this.c,"span",{"aria-hidden":"true"},this.f)}function A(e){d(e.c,"body",e.a)}function N(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+k(e.c)+";font-style:"+C(e)+";font-weight:"+e.f+"00;"}function R(e,t,n,r,o,i){this.g=e,this.j=t,this.a=r,this.c=n,this.f=o||3e3,this.h=i||void 0}function D(e,t,n,r,o,i,a){this.v=e,this.B=t,this.c=n,this.a=r,this.s=a||"BESbswy",this.f={},this.w=o||3e3,this.u=i||null,this.m=this.j=this.h=this.g=null,this.g=new E(this.c,this.s),this.h=new E(this.c,this.s),this.j=new E(this.c,this.s),this.m=new E(this.c,this.s),e=N(e=new O(this.a.c+",serif",_(this.a))),this.g.a.style.cssText=e,e=N(e=new O(this.a.c+",sans-serif",_(this.a))),this.h.a.style.cssText=e,e=N(e=new O("serif",_(this.a))),this.j.a.style.cssText=e,e=N(e=new O("sans-serif",_(this.a))),this.m.a.style.cssText=e,A(this.g),A(this.h),A(this.j),A(this.m)}S.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},R.prototype.start=function(){var e=this.c.o.document,t=this,n=s(),r=new Promise((function(r,o){!function i(){s()-n>=t.f?o():e.fonts.load(function(e){return C(e)+" "+e.f+"00 300px "+k(e.c)}(t.a),t.h).then((function(e){1<=e.length?r():setTimeout(i,25)}),(function(){o()}))}()})),o=null,i=new Promise((function(e,n){o=setTimeout(n,t.f)}));Promise.race([i,r]).then((function(){o&&(clearTimeout(o),o=null),t.g(t.a)}),(function(){t.j(t.a)}))};var L={D:"serif",C:"sans-serif"},W=null;function z(){if(null===W){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);W=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return W}function H(e,t,n){for(var r in L)if(L.hasOwnProperty(r)&&t===e.f[L[r]]&&n===e.f[L[r]])return!0;return!1}function Z(e){var t,n=e.g.a.offsetWidth,r=e.h.a.offsetWidth;(t=n===e.f.serif&&r===e.f["sans-serif"])||(t=z()&&H(e,n,r)),t?s()-e.A>=e.w?z()&&H(e,n,r)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?U(e,e.v):U(e,e.B):function(e){setTimeout(a((function(){Z(this)}),e),50)}(e):U(e,e.v)}function U(e,t){setTimeout(a((function(){h(this.g.a),h(this.h.a),h(this.j.a),h(this.m.a),t(this.a)}),e),0)}function K(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}D.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=s(),Z(this)};var M=null;function G(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&f(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),x(e,"active")):P(e.a))}function J(e){this.j=e,this.a=new I,this.h=0,this.f=this.g=!0}function X(e,t,n,r,o){var i=0==--e.h;(e.f||e.g)&&setTimeout((function(){var e=o||null,s=r||{};if(0===n.length&&i)P(t.a);else{t.f+=n.length,i&&(t.j=i);var c,l=[];for(c=0;c<n.length;c++){var u=n[c],d=s[u.c],h=t.a,p=u;if(h.g&&f(h.f,[h.a.c("wf",p.c,_(p).toString(),"loading")]),x(h,"fontloading",p),h=null,null===M)if(window.FontFace){p=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var m=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);M=p?42<parseInt(p[1],10):!m}else M=!1;h=M?new R(a(t.g,t),a(t.h,t),t.c,u,t.s,d):new D(a(t.g,t),a(t.h,t),t.c,u,t.s,e,d),l.push(h)}for(c=0;c<l.length;c++)l[c].start()}}),0)}function F(e,t){this.c=e,this.a=t}function V(e,t){this.c=e,this.a=t}function B(e,t){this.c=e||Y,this.a=[],this.f=[],this.g=t||""}K.prototype.g=function(e){var t=this.a;t.g&&f(t.f,[t.a.c("wf",e.c,_(e).toString(),"active")],[t.a.c("wf",e.c,_(e).toString(),"loading"),t.a.c("wf",e.c,_(e).toString(),"inactive")]),x(t,"fontactive",e),this.m=!0,G(this)},K.prototype.h=function(e){var t=this.a;if(t.g){var n=p(t.f,t.a.c("wf",e.c,_(e).toString(),"active")),r=[],o=[t.a.c("wf",e.c,_(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,_(e).toString(),"inactive")),f(t.f,r,o)}x(t,"fontinactive",e),G(this)},J.prototype.load=function(e){this.c=new c(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],o=n.timeout;!function(e){e.g&&f(e.f,[e.a.c("wf","loading")]),x(e,"loading")}(t);r=function(e,t,n){var r,o=[];for(r in t)if(t.hasOwnProperty(r)){var i=e.c[r];i&&o.push(i(t[r],n))}return o}(e.a,n,e.c);var i=new K(e.c,t,o);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load((function(t,n,r){X(e,i,t,n,r)}))}(this,new T(this.c,e),e)},F.prototype.load=function(e){var t=this,n=t.a.projectId,r=t.a.version;if(n){var o=t.c.o;g(this.c,(t.a.api||"https://fast.fonts.net/jsapi")+"/"+n+".js"+(r?"?v="+r:""),(function(r){r?e([]):(o["__MonotypeConfiguration__"+n]=function(){return t.a},function t(){if(o["__mti_fntLst"+n]){var r,i=o["__mti_fntLst"+n](),a=[];if(i)for(var s=0;s<i.length;s++){var c=i[s].fontfamily;void 0!=i[s].fontStyle&&void 0!=i[s].fontWeight?(r=i[s].fontStyle+i[s].fontWeight,a.push(new O(c,r))):a.push(new O(c))}e(a)}else setTimeout((function(){t()}),50)}())})).id="__MonotypeAPIScript__"+n}else e([])},V.prototype.load=function(e){var t,n,r=this.a.urls||[],o=this.a.families||[],i=this.a.testStrings||{},a=new b;for(t=0,n=r.length;t<n;t++)m(this.c,r[t],v(a));var s=[];for(t=0,n=o.length;t<n;t++)if((r=o[t].split(":"))[1])for(var c=r[1].split(","),l=0;l<c.length;l+=1)s.push(new O(r[0],c[l]));else s.push(new O(r[0]));y(a,(function(){e(s,i)}))};var Y="https://fonts.googleapis.com/css";function $(e){this.f=e,this.a=[],this.c={}}var q={latin:"BESbswy","latin-ext":"\xe7\xf6\xfc\u011f\u015f",cyrillic:"\u0439\u044f\u0416",greek:"\u03b1\u03b2\u03a3",khmer:"\u1780\u1781\u1782",Hanuman:"\u1780\u1781\u1782"},Q={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},ee={i:"i",italic:"i",n:"n",normal:"n"},te=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function ne(e,t){this.c=e,this.a=t}var re={Arimo:!0,Cousine:!0,Tinos:!0};function oe(e,t){this.c=e,this.a=t}function ie(e,t){this.c=e,this.f=t,this.a=[]}ne.prototype.load=function(e){var t=new b,n=this.c,r=new B(this.a.api,this.a.text),o=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var o=t[r].split(":");3==o.length&&e.f.push(o.pop());var i="";2==o.length&&""!=o[1]&&(i=":"),e.a.push(o.join(i))}}(r,o);var i=new $(o);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),o=r[0].replace(/\+/g," "),i=["n4"];if(2<=r.length){var a;if(a=[],s=r[1])for(var s,c=(s=s.split(",")).length,l=0;l<c;l++){var u;if((u=s[l]).match(/^[\w-]+$/))if(null==(h=te.exec(u.toLowerCase())))u="";else{if(u=null==(u=h[2])||""==u?"n":ee[u],null==(h=h[1])||""==h)h="4";else var d=Q[h],h=d||(isNaN(h)?"4":h.substr(0,1));u=[u,h].join("")}else u="";u&&a.push(u)}0<a.length&&(i=a),3==r.length&&(a=[],0<(r=(r=r[2])?r.split(","):a).length&&(r=q[r[0]])&&(e.c[o]=r))}for(e.c[o]||(r=q[o])&&(e.c[o]=r),r=0;r<i.length;r+=1)e.a.push(new O(o,i[r]))}}(i),m(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),v(t)),y(t,(function(){e(i.a,i.c,re)}))},oe.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?g(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",(function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],o=0;o<t.length;o+=2)for(var i=t[o],a=t[o+1],s=0;s<a.length;s++)r.push(new O(i,a[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(c){}e(r)}}),2e3):e([])},ie.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var o=0,i=n.fonts.length;o<i;++o){var a=n.fonts[o];r.a.push(new O(a.name,j("font-weight:"+a.weight+";font-style:"+a.style)))}e(r.a)},g(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",(function(t){t&&e([])}))):e([])};var ae=new J(window);ae.a.c.custom=function(e,t){return new V(t,e)},ae.a.c.fontdeck=function(e,t){return new ie(t,e)},ae.a.c.monotype=function(e,t){return new F(t,e)},ae.a.c.typekit=function(e,t){return new oe(t,e)},ae.a.c.google=function(e,t){return new ne(t,e)};var se={load:a(ae.load,ae)};void 0===(r=function(){return se}.call(t,n,t,e))||(e.exports=r)}()},31:function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")(),i=Object.prototype,a=0,s=i.toString,c=o.Symbol,l=c?c.prototype:void 0,u=l?l.toString:void 0;function d(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==s.call(e)}(e))return u?u.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}e.exports=function(e){var t,n=++a;return(null==(t=e)?"":d(t))+n}}).call(this,n(35))},32:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STYLIS_PROPERTY_CONTEXT=void 0;var r,o=n(40),i=(r=o)&&r.__esModule?r:{default:r};var a=t.STYLIS_PROPERTY_CONTEXT=-1;function s(e,t){if(e===a)return i.default.transform(t)}Object.defineProperty(s,"name",{value:"stylisRTLPlugin"}),t.default=s},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return K}));var r=n(0),o=n.n(r),i=n(10),a=n.n(i),s=n(29),c=n.n(s);const l=e=>{const t=e.targetElement;return Object(i.createPortal)(e.children,t)},u=new WeakMap;var d=(e,t)=>new Proxy({open:null,closed:null},{get(n,r){if(u.get(e))return u.get(e);const i=(a={webComponent:e,mode:r,shadowChildren:t},e=>{const t=a.webComponent.shadowRoot||a.webComponent.attachShadow({mode:a.mode});return a.shadowChildren.forEach(e=>{t.appendChild(e)}),o.a.createElement(l,{targetElement:t},e.children)});var a;return u.set(e,i),i}});const h=Object(r.createContext)(()=>{}),f=h.Provider;h.Consumer;var p=e=>(t,n,r)=>e(t,n,r);var m=(e,t,r)=>{if(null===t||void 0===t?void 0:t.find(e=>"styled-components"===e.name))try{const{StyleSheetManager:e}=n(4),t=document.createElement("span");return t.id="direflow_styled-components-styles",[o.a.createElement(e,{target:t},r),t]}catch(i){console.error("Could not load styled-components. Did you remember to install styled-components?")}};const g=e=>{b(e,document.head)||document.head.append(e)},b=(e,t)=>{const n=t.children;return Array.from(n).some(t=>e.isEqualNode(t))};var v=(e,t,n)=>{var r;const o=null===t||void 0===t?void 0:t.find(e=>"external-loader"===e.name),i=null===(r=null===o||void 0===o?void 0:o.options)||void 0===r?void 0:r.paths;if(!i||!i.length||!n)return;const a=[],s=[];i.forEach(e=>{const t="string"===typeof e?e:e.src,n="string"!==typeof e&&e.async,r="string"===typeof e?void 0:e.useHead;if(t.endsWith(".js")){const e=document.createElement("script");e.src=t,e.async=!!n,void 0===r||r?e.setAttribute("use-head","true"):e.setAttribute("use-head","false"),a.push(e)}if(t.endsWith(".css")){const e=document.createElement("link");e.rel="stylesheet",e.href=t,r?e.setAttribute("use-head","true"):e.setAttribute("use-head","false"),s.push(e)}});const c=document.createElement("span");return c.id="direflow_external-sources",window.externalSourcesLoaded||(window.externalSourcesLoaded={}),a.forEach(e=>{"true"===e.getAttribute("use-head")?g(e):c.appendChild(e),window.externalSourcesLoaded[e.src]={state:"loading"},e.addEventListener("load",()=>{var t,n;window.externalSourcesLoaded[e.src].state="completed",null===(n=(t=window.externalSourcesLoaded[e.src]).callback)||void 0===n||n.call(t)})}),s.forEach(e=>{"true"===e.getAttribute("use-head")?g(e):c.appendChild(e),window.externalSourcesLoaded[e.href]={state:"loading"},e.addEventListener("load",()=>{var t,n;window.externalSourcesLoaded[e.href].state="completed",null===(n=(t=window.externalSourcesLoaded[e.href]).callback)||void 0===n||n.call(t)})}),[n,c]},y=n(30),w=n.n(y);let S=!1;var O=(e,t)=>{if(S)return;const n=null===t||void 0===t?void 0:t.find(e=>"font-loader"===e.name);(null===n||void 0===n?void 0:n.options)&&(w.a.load(n.options),S=!0)};var k=(e,t,n)=>{var r;const o=null===t||void 0===t?void 0:t.find(e=>"icon-loader"===e.name);if(n&&(null===(r=null===o||void 0===o?void 0:o.options)||void 0===r?void 0:r.packs.includes("material-icons"))){const e=document.createElement("link");e.rel="stylesheet",e.href="https://fonts.googleapis.com/icon?family=Material+Icons";const t=document.createElement("span");return t.id="direflow_material-icons",t.appendChild(e),[n,t]}},_=n(31),C=n.n(_);const j=new WeakMap;var T=(e,t,r)=>{if(null===t||void 0===t?void 0:t.find(e=>"material-ui"===e.name))try{const{create:t}=n(!function(){var e=new Error("Cannot find module 'jss'");throw e.code="MODULE_NOT_FOUND",e}()),{jssPreset:i,StylesProvider:a,createGenerateClassName:s}=n(!function(){var e=new Error("Cannot find module '@material-ui/core/styles'");throw e.code="MODULE_NOT_FOUND",e}()),c=C()("".concat(e.tagName.toLowerCase(),"-")),l=document.createElement("span");let u;return l.id="direflow_material-ui-styles",j.has(e)?u=j.get(e):(u=t(Object.assign(Object.assign({},i()),{insertionPoint:l})),j.set(e,u)),[o.a.createElement(a,{jss:u,sheetsManager:new Map,generateClassName:s({seed:c})},r),l]}catch(i){console.error("Could not load Material-UI. Did you remember to install @material-ui/core?")}};var P=[p(O),p(k),p(v),p(m),p(T)];var x=e=>{if(""===e)return!0;if("true"===e||"false"===e)return"true"===e;try{return JSON.parse(e.replace(/'/g,'"'))}catch(t){return e}};var I=class{constructor(e,t,n,r,o,i){this.componentProperties=e,this.rootComponent=t,this.shadow=n,this.anonymousSlot=r,this.plugins=o,this.connectCallback=i,this.componentAttributes={},this.reflectPropertiesToAttributes()}reflectPropertiesToAttributes(){Object.entries(this.componentProperties).forEach(e=>{let[t,n]=e;"number"!==typeof n&&"string"!==typeof n&&"boolean"!==typeof n||(this.componentAttributes[t.toLowerCase()]={property:t,value:n})})}create(){const e=this;return class extends HTMLElement{constructor(){super(),this.initialProperties=c()(e.componentProperties),this.properties={},this.hasConnected=!1,this.eventDispatcher=e=>{this.dispatchEvent(e)},this.transferInitialProperties(),this.subscribeToProperties()}static get observedAttributes(){return Object.keys(e.componentAttributes)}connectedCallback(){var t;this.mountReactApp({initial:!0}),this.hasConnected=!0,null===(t=e.connectCallback)||void 0===t||t.call(e,this)}attributeChangedCallback(t,n,r){if(!this.hasConnected)return;if(n===r)return;if(!e.componentAttributes.hasOwnProperty(t))return;const o=e.componentAttributes[t].property;this.properties[o]=x(r),this.mountReactApp()}propertyChangedCallback(e,t,n){this.hasConnected&&t!==n&&(this.properties[e]=n,this.mountReactApp())}disconnectedCallback(){a.a.unmountComponentAtNode(this)}subscribeToProperties(){const e={};Object.keys(this.initialProperties).forEach(t=>{e[t]={configurable:!0,enumerable:!0,get:()=>this.properties.hasOwnProperty(t)?this.properties[t]:this.initialProperties[t],set:e=>{const n=this.properties.hasOwnProperty(t)?this.properties[t]:this.initialProperties[t];this.propertyChangedCallback(t,n,e)}}}),Object.defineProperties(this,e)}syncronizePropertiesAndAttributes(){Object.keys(this.initialProperties).forEach(e=>{this.properties.hasOwnProperty(e)||(null===this.getAttribute(e)?this.properties[e]=this.initialProperties[e]:this.properties[e]=x(this.getAttribute(e)))})}transferInitialProperties(){Object.keys(this.initialProperties).forEach(e=>{this.hasOwnProperty(e)&&(this.properties[e]=this[e])})}applyPlugins(t){const n=[];return[P.reduce((t,r)=>{const o=r(this,e.plugins,t);if(!o)return t;const[i,a]=o;return a&&n.push(a),i},t),n]}reactProps(){return this.syncronizePropertiesAndAttributes(),this.properties}mountReactApp(t){const n=e.anonymousSlot?o.a.createElement("slot"):void 0,r=o.a.createElement(f,{value:this.eventDispatcher},o.a.createElement(e.rootComponent,this.reactProps(),n)),[i,s]=this.applyPlugins(r);if(!e.shadow)return void a.a.render(i,this);let c;(null===t||void 0===t?void 0:t.initial)&&(c=Array.from(this.children).map(e=>e.cloneNode(!0)));const l=d(this,s);a.a.render(o.a.createElement(l.open,null,i),this),c&&c.forEach(e=>this.append(e))}}}};var E=(e,t)=>new Promise((n,r)=>{const o=document.createElement("script");o.async=!0,o.src=e,window[t]||(window[t]=[]);const i=window[t].find(e=>e.script.isEqualNode(o));if(i)return i.hasLoaded&&n(),void i.script.addEventListener("load",()=>n());const a={script:o,hasLoaded:!1};window[t].push(a),o.addEventListener("load",()=>{a.hasLoaded=!0,n()}),o.addEventListener("error",()=>r(new Error("Polyfill failed to load"))),document.head.appendChild(o)}),A=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let N=!1;const R="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2.4.1/bundles/webcomponents-sd.js",D="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2.4.1/bundles/webcomponents-ce.js",L="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.4.1/custom-elements-es5-adapter.js";var W=(e,t)=>A(void 0,void 0,void 0,(function*(){var n,r,o,i,a,s;if(N)return;const c=[];let l="",u="",d="";const h=null===t||void 0===t?void 0:t.find(e=>"polyfill-loader"===e.name);h&&console.warn("polyfill-loader plugin is deprecated. Use direflow-config.json instead.\nSee more: https://direflow.io/configuration");const f=null!==(n="/etc.clientlibs/amarr/clientlibs/webcomponents/amarr-wc-dependencies/resources/_c.webcomponents-sd.js")?n:null===(r=null===h||void 0===h?void 0:h.options)||void 0===r?void 0:r.use.sd,p=null!==(o="/etc.clientlibs/amarr/clientlibs/webcomponents/amarr-wc-dependencies/resources/_d.webcomponents-ce.js")?o:null===(i=null===h||void 0===h?void 0:h.options)||void 0===i?void 0:i.use.ce,m=null!==(a="/etc.clientlibs/amarr/clientlibs/webcomponents/amarr-wc-dependencies/resources/_e.custom-elements-es5-adapter.js")?a:null===(s=null===h||void 0===h?void 0:h.options)||void 0===s?void 0:s.use.adapter,g=!1===f,b=!1===p,v=!1===m;f&&(l="string"===typeof f?f:R),p&&(u="string"===typeof p?p:D),m&&(d="string"===typeof m?m:L),e.usesShadow&&!g&&c.push(E(l||R,"wcPolyfillsLoaded")),b||c.push(E(u||D,"wcPolyfillsLoaded")),v||c.push(E(d||L,"wcPolyfillsLoaded"));try{yield Promise.all(c),N=!0}catch(y){console.error(y)}})),z=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let H;const Z=e=>{null===H||void 0===H||H(e)};class U{static createAll(e){return e.map(U.create)}static create(e){const{component:t}=e,n=t.plugins||e.plugins,r=t.configuration||e.configuration;if(!t)throw Error("Root component has not been set");if(!r)throw Error("No configuration found");const o=Object.assign(Object.assign(Object.assign({},null===e||void 0===e?void 0:e.properties),t.properties),t.defaultProps),i=r.tagname||"direflow-component",a=void 0===r.useShadow||r.useShadow,s=void 0!==r.useAnonymousSlot&&r.useAnonymousSlot;return(()=>{z(this,void 0,void 0,(function*(){yield Promise.all([W({usesShadow:!!a},n)]);const e=new I(o,t,a,s,n,Z).create();customElements.define(i,e)}))})(),{then:e=>z(this,void 0,void 0,(function*(){e&&(H=e)}))}}}var K=U;n(38);r.Component},37:function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],u=!1,d=-1;function h(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=s(h);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},4:function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"ServerStyleSheet",(function(){return Ze})),n.d(t,"StyleSheetConsumer",(function(){return oe})),n.d(t,"StyleSheetContext",(function(){return re})),n.d(t,"StyleSheetManager",(function(){return ue})),n.d(t,"ThemeConsumer",(function(){return Ae})),n.d(t,"ThemeContext",(function(){return Ee})),n.d(t,"ThemeProvider",(function(){return Ne})),n.d(t,"__PRIVATE__",(function(){return Me})),n.d(t,"createGlobalStyle",(function(){return ze})),n.d(t,"css",(function(){return we})),n.d(t,"isStyledComponent",(function(){return w})),n.d(t,"keyframes",(function(){return He})),n.d(t,"useTheme",(function(){return Ke})),n.d(t,"version",(function(){return O})),n.d(t,"withTheme",(function(){return Ue}));var r=n(21),o=n(0),i=n.n(o),a=n(26),s=n.n(a),c=n(27),l=n(28),u=n(22),d=n(20),h=n.n(d);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var p=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},m=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!Object(r.typeOf)(e)},g=Object.freeze([]),b=Object.freeze({});function v(e){return"function"==typeof e}function y(e){return e.displayName||e.name||"Component"}function w(e){return e&&"string"==typeof e.styledComponentId}var S="undefined"!=typeof e&&void 0!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0})&&(Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_SC_ATTR||Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).SC_ATTR)||"data-styled",O="5.3.11",k="undefined"!=typeof window&&"HTMLElement"in window,_=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof e&&void 0!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0})&&(void 0!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_SC_DISABLE_SPEEDY&&""!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_SC_DISABLE_SPEEDY?"false"!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_SC_DISABLE_SPEEDY&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_SC_DISABLE_SPEEDY:void 0!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).SC_DISABLE_SPEEDY&&""!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).SC_DISABLE_SPEEDY&&("false"!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).SC_DISABLE_SPEEDY&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).SC_DISABLE_SPEEDY))),C={};function j(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var T=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&j(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=0,c=t.length;s<c;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),P=new Map,x=new Map,I=1,E=function(e){if(P.has(e))return P.get(e);for(;x.has(I);)I++;var t=I++;return P.set(e,t),x.set(t,e),t},A=function(e){return x.get(e)},N=function(e,t){t>=I&&(I=t+1),P.set(e,t),x.set(t,e)},R="style["+S+'][data-styled-version="5.3.11"]',D=new RegExp("^"+S+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},W=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,i=n.length;o<i;o++){var a=n[o].trim();if(a){var s=a.match(D);if(s){var c=0|parseInt(s[1],10),l=s[2];0!==c&&(N(l,c),L(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(a)}}},z=function(){return n.nc},H=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(S))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(S,"active"),r.setAttribute("data-styled-version","5.3.11");var a=z();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},Z=function(){function e(e){var t=this.element=H(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}j(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),U=function(){function e(e){var t=this.element=H(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),K=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),M=k,G={isServer:!k,useCSSOMInjection:!_},J=function(){function e(e,t,n){void 0===e&&(e=b),void 0===t&&(t={}),this.options=f({},G,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&k&&M&&(M=!1,function(e){for(var t=document.querySelectorAll(R),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(S)&&(W(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return E(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(f({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new K(o):r?new Z(o):new U(o),new T(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(E(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(E(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(E(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var i=A(o);if(void 0!==i){var a=e.names.get(i),s=t.getGroup(o);if(a&&s&&a.size){var c=S+".g"+o+'[id="'+i+'"]',l="";void 0!==a&&a.forEach((function(e){e.length>0&&(l+=e+",")})),r+=""+s+c+'{content:"'+l+'"}/*!sc*/\n'}}}return r}(this)},e}(),X=/(a)(d)/gi,F=function(e){return String.fromCharCode(e+(e>25?39:97))};function V(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=F(t%52)+n;return(F(t%52)+n).replace(X,"$1-$2")}var B=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y=function(e){return B(5381,e)};function $(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(v(n)&&!w(n))return!1}return!0}var q=Y("5.3.11"),Q=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&$(e),this.componentId=t,this.baseHash=B(q,t),this.baseStyle=n,J.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var i=ve(this.rules,e,t,n).join(""),a=V(B(this.baseHash,i)>>>0);if(!t.hasNameForId(r,a)){var s=n(i,"."+a,void 0,r);t.insertRules(r,a,s)}o.push(a),this.staticRulesId=a}else{for(var c=this.rules.length,l=B(this.baseHash,n.hash),u="",d=0;d<c;d++){var h=this.rules[d];if("string"==typeof h)u+=h;else if(h){var f=ve(h,e,t,n),p=Array.isArray(f)?f.join(""):f;l=B(l,p+d),u+=p}}if(u){var m=V(l>>>0);if(!t.hasNameForId(r,m)){var g=n(u,"."+m,void 0,r);t.insertRules(r,m,g)}o.push(m)}}return o.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function ne(e){var t,n,r,o,i=void 0===e?b:e,a=i.options,s=void 0===a?b:a,l=i.plugins,u=void 0===l?g:l,d=new c.a(s),h=[],f=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,c,l,u,d){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){h.push(e)})),p=function(e,r,i){return 0===r&&-1!==te.indexOf(i[n.length])||i.match(o)?e:"."+t};function m(e,i,a,s){void 0===s&&(s="&");var c=e.replace(ee,""),l=i&&a?a+" "+i+" { "+c+" }":c;return t=s,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),d(a||!i?"":i,l)}return d.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,p))},f,function(e){if(-2===e){var t=h;return h=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||j(15),B(e,t.name)}),5381).toString():"",m}var re=i.a.createContext(),oe=re.Consumer,ie=i.a.createContext(),ae=(ie.Consumer,new J),se=ne();function ce(){return Object(o.useContext)(re)||ae}function le(){return Object(o.useContext)(ie)||se}function ue(e){var t=Object(o.useState)(e.stylisPlugins),n=t[0],r=t[1],a=ce(),c=Object(o.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=Object(o.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return Object(o.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),i.a.createElement(re.Provider,{value:c},i.a.createElement(ie.Provider,{value:l},e.children))}var de=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=se);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return j(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=se),this.name+e.hash},e}(),he=/([A-Z])/,fe=/([A-Z])/g,pe=/^ms-/,me=function(e){return"-"+e.toLowerCase()};function ge(e){return he.test(e)?e.replace(fe,me).replace(pe,"-ms-"):e}var be=function(e){return null==e||!1===e||""===e};function ve(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)""!==(o=ve(e[a],t,n,r))&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}return be(e)?"":w(e)?"."+e.styledComponentId:v(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?e:ve(e(t),t,n,r):e instanceof de?n?(e.inject(n,r),e.getName(r)):e:m(e)?function e(t,n){var r,o,i=[];for(var a in t)t.hasOwnProperty(a)&&!be(t[a])&&(Array.isArray(t[a])&&t[a].isCss||v(t[a])?i.push(ge(a)+":",t[a],";"):m(t[a])?i.push.apply(i,e(t[a],a)):i.push(ge(a)+": "+(r=a,(null==(o=t[a])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in l.a||r.startsWith("--")?String(o).trim():o+"px")+";")));return n?[n+" {"].concat(i,["}"]):i}(e):e.toString();var c}var ye=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function we(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return v(e)||m(e)?ye(ve(p(g,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:ye(ve(p(e,n)))}new Set;var Se=function(e,t,n){return void 0===n&&(n=b),e.theme!==n.theme&&e.theme||t||n.theme},Oe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ke=/(^-|-$)/g;function _e(e){return e.replace(Oe,"-").replace(ke,"")}var Ce=function(e){return V(Y(e)>>>0)};function je(e){return"string"==typeof e&&!0}var Te=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Pe=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function xe(e,t,n){var r=e[n];Te(t)&&Te(r)?Ie(r,t):e[n]=t}function Ie(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,i=n;o<i.length;o++){var a=i[o];if(Te(a))for(var s in a)Pe(s)&&xe(e,a[s],s)}return e}var Ee=i.a.createContext(),Ae=Ee.Consumer;function Ne(e){var t=Object(o.useContext)(Ee),n=Object(o.useMemo)((function(){return function(e,t){return e?v(e)?e(t):Array.isArray(e)||"object"!=typeof e?j(8):t?f({},t,{},e):e:j(14)}(e.theme,t)}),[e.theme,t]);return e.children?i.a.createElement(Ee.Provider,{value:n},e.children):null}var Re={};function De(e,t,n){var r=w(e),a=!je(e),s=t.attrs,c=void 0===s?g:s,l=t.componentId,d=void 0===l?function(e,t){var n="string"!=typeof e?"sc":_e(e);Re[n]=(Re[n]||0)+1;var r=n+"-"+Ce("5.3.11"+n+Re[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):l,p=t.displayName,m=void 0===p?function(e){return je(e)?"styled."+e:"Styled("+y(e)+")"}(e):p,S=t.displayName&&t.componentId?_e(t.displayName)+"-"+t.componentId:t.componentId||d,O=r&&e.attrs?Array.prototype.concat(e.attrs,c).filter(Boolean):c,k=t.shouldForwardProp;r&&e.shouldForwardProp&&(k=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var _,C=new Q(n,S,r?e.componentStyle:void 0),j=C.isStatic&&0===c.length,T=function(e,t){return function(e,t,n,r){var i=e.attrs,a=e.componentStyle,s=e.defaultProps,c=e.foldedComponentIds,l=e.shouldForwardProp,d=e.styledComponentId,h=e.target,p=function(e,t,n){void 0===e&&(e=b);var r=f({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,i,a=e;for(t in v(a)&&(a=a(r)),a)r[t]=o[t]="className"===t?(n=o[t],i=a[t],n&&i?n+" "+i:n||i):a[t]})),[r,o]}(Se(t,Object(o.useContext)(Ee),s)||b,t,i),m=p[0],g=p[1],y=function(e,t,n,r){var o=ce(),i=le();return t?e.generateAndInjectStyles(b,o,i):e.generateAndInjectStyles(n,o,i)}(a,r,m),w=n,S=g.$as||t.$as||g.as||t.as||h,O=je(S),k=g!==t?f({},t,{},g):t,_={};for(var C in k)"$"!==C[0]&&"as"!==C&&("forwardedAs"===C?_.as=k[C]:(l?l(C,u.a,S):!O||Object(u.a)(C))&&(_[C]=k[C]));return t.style&&g.style!==t.style&&(_.style=f({},t.style,{},g.style)),_.className=Array.prototype.concat(c,d,y!==d?y:null,t.className,g.className).filter(Boolean).join(" "),_.ref=w,Object(o.createElement)(S,_)}(_,e,t,j)};return T.displayName=m,(_=i.a.forwardRef(T)).attrs=O,_.componentStyle=C,_.displayName=m,_.shouldForwardProp=k,_.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):g,_.styledComponentId=S,_.target=r?e.target:e,_.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(je(e)?e:_e(y(e)));return De(e,f({},o,{attrs:O,componentId:i}),n)},Object.defineProperty(_,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ie({},e.defaultProps,t):t}}),Object.defineProperty(_,"toString",{value:function(){return"."+_.styledComponentId}}),a&&h()(_,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),_}var Le=function(e){return function e(t,n,o){if(void 0===o&&(o=b),!Object(r.isValidElementType)(n))return j(1,String(n));var i=function(){return t(n,o,we.apply(void 0,arguments))};return i.withConfig=function(r){return e(t,n,f({},o,{},r))},i.attrs=function(r){return e(t,n,f({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},i}(De,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Le[e]=Le(e)}));var We=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=$(e),J.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(ve(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&J.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=we.apply(void 0,[e].concat(n)),s="sc-global-"+Ce(JSON.stringify(a)),c=new We(a,s);function l(e){var t=ce(),n=le(),r=Object(o.useContext)(Ee),i=Object(o.useRef)(t.allocateGSInstance(s)).current;return t.server&&u(i,e,t,r,n),Object(o.useLayoutEffect)((function(){if(!t.server)return u(i,e,t,r,n),function(){return c.removeStyles(i,t)}}),[i,e,t,r,n]),null}function u(e,t,n,r,o){if(c.isStatic)c.renderStyles(e,C,n,o);else{var i=f({},t,{theme:Se(t,r,l.defaultProps)});c.renderStyles(e,i,n,o)}}return i.a.memo(l)}function He(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=we.apply(void 0,[e].concat(n)).join(""),i=Ce(o);return new de(i,o)}var Ze=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=z();return"<style "+[n&&'nonce="'+n+'"',S+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?j(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return j(2);var n=((t={})[S]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=z();return r&&(n.nonce=r),[i.a.createElement("style",f({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new J({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?j(2):i.a.createElement(ue,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return j(3)},e}(),Ue=function(e){var t=i.a.forwardRef((function(t,n){var r=Object(o.useContext)(Ee),a=e.defaultProps,s=Se(t,r,a);return i.a.createElement(e,f({},t,{theme:s,ref:n}))}));return h()(t,e),t.displayName="WithTheme("+y(e)+")",t},Ke=function(){return Object(o.useContext)(Ee)},Me={StyleSheet:J,masterSheet:ae};t.default=Le}.call(this,n(37))},40:function(e,t,n){var r;function o(e,t){var n=[],r=0;function o(e){return n.push(e),t}function i(){return n[r++]}return{tokenize:function(t){return t.replace(e,o)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),i)}}}r=new function(){var e="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",t="(?:[_a-z0-9-]|[^\\u0020-\\u007e]|"+e+")",n="(?:[0-9]*\\.[0-9]+|[0-9]+)(?:\\s*(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)|-?(?:[_a-z]|[^\\u0020-\\u007e]|(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f]))(?:[_a-z0-9-]|[^\\u0020-\\u007e]|(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f]))*)?",r="((?:-?"+n+")|(?:inherit|auto))",i="(#?"+t+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",a="(?:[!#$%&*-~]|[^\\u0020-\\u007e]|"+e+")*?",s="(?!("+t+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'])*?{)",c="(?!"+a+"['\"]?\\s*\\))",l="(?="+a+"['\"]?\\s*\\))",u="(\\s*(?:!important\\s*)?[;}])",d=new RegExp("`TMP`","g"),h=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),f=new RegExp("(\\/\\*\\!?\\s*@noflip\\s*\\*\\/"+s+"[^;}]+;?)","gi"),p=new RegExp("(\\/\\*\\!?\\s*@noflip\\s*\\*\\/[^\\}]*?})","gi"),m=new RegExp("(direction\\s*:\\s*)ltr","gi"),g=new RegExp("(direction\\s*:\\s*)rtl","gi"),b=new RegExp("(^|[^a-zA-Z])(left)(?![a-zA-Z])"+c+s,"gi"),v=new RegExp("(^|[^a-zA-Z])(right)(?![a-zA-Z])"+c+s,"gi"),y=new RegExp("(^|[^a-zA-Z])(left)"+l,"gi"),w=new RegExp("(^|[^a-zA-Z])(right)"+l,"gi"),S=new RegExp("(^|[^a-zA-Z])(ltr)"+l,"gi"),O=new RegExp("(^|[^a-zA-Z])(rtl)"+l,"gi"),k=new RegExp("(^|[^a-zA-Z])([ns]?)e-resize","gi"),_=new RegExp("(^|[^a-zA-Z])([ns]?)w-resize","gi"),C=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+r+"(\\s+)"+r+"(\\s+)"+r+"(\\s+)"+r+u,"gi"),j=new RegExp("((?:-color|border-style)\\s*:\\s*)"+i+"(\\s+)"+i+"(\\s+)"+i+"(\\s+)"+i+u,"gi"),T=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+n+")","gi"),P=new RegExp("(background-position-x\\s*:\\s*)(-?(?:[0-9]*\\.[0-9]+|[0-9]+)%)","gi"),x=new RegExp("(border-radius\\s*:\\s*)"+r+"(?:(?:\\s+"+r+")(?:\\s+"+r+")?(?:\\s+"+r+")?)?(?:(?:(?:\\s*\\/\\s*)"+r+")(?:\\s+"+r+")?(?:\\s+"+r+")?(?:\\s+"+r+")?)?"+u,"gi"),I=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+r,"gi"),E=new RegExp("(text-shadow\\s*:\\s*)"+r+"(\\s*)"+i,"gi"),A=new RegExp("(text-shadow\\s*:\\s*)"+i+"(\\s*)"+r,"gi"),N=new RegExp("(text-shadow\\s*:\\s*)"+r,"gi"),R=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+r+"(\\s*\\))","gi"),D=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+r+"((?:\\s*,\\s*"+r+"){0,2}\\s*\\))","gi");function L(e,t,n){var r,o;return"%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(o=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(o)+"%"):n=100-parseFloat(n)+"%"),t+n}function W(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function z(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter((function(e){return e})),o=n.slice(6,10).filter((function(e){return e})),i=n[10]||"";return t+(o.length?W(r)+" / "+W(o):W(r))+i}function H(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function Z(e,t,n){return t+H(n)}function U(e,t,n,r,o){return t+n+H(r)+o}function K(e,t,n,r,o){return t+n+r+H(o)}return{transform:function(e,t){var n=new o(f,"`NOFLIP_SINGLE`"),r=new o(p,"`NOFLIP_CLASS`"),i=new o(h,"`COMMENT`");return e=i.tokenize(r.tokenize(n.tokenize(e.replace("`","%60")))),t.transformDirInUrl&&(e=e.replace(S,"$1`TMP`").replace(O,"$1ltr").replace(d,"rtl")),t.transformEdgeInUrl&&(e=e.replace(y,"$1`TMP`").replace(w,"$1left").replace(d,"right")),e=e.replace(m,"$1`TMP`").replace(g,"$1ltr").replace(d,"rtl").replace(b,"$1`TMP`").replace(v,"$1left").replace(d,"right").replace(k,"$1$2`TMP`").replace(_,"$1$2e-resize").replace(d,"w-resize").replace(x,z).replace(I,Z).replace(E,K).replace(A,K).replace(N,Z).replace(R,U).replace(D,U).replace(C,"$1$2$3$8$5$6$7$4$9").replace(j,"$1$2$3$8$5$6$7$4$9").replace(T,L).replace(P,L),e=n.detokenize(r.detokenize(i.detokenize(e)))}}},e.exports?t.transform=function(e,t,n){var o;return"object"===typeof t?o=t:(o={},"boolean"===typeof t&&(o.transformDirInUrl=t),"boolean"===typeof n&&(o.transformEdgeInUrl=n)),r.transform(e,o)}:"undefined"!==typeof window&&(window.cssjanus=r)},41:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){return new Promise((function(n,r){var o=document.createElement("script");o.async=!0,o.src=e,window[t]||(window[t]=[]);var i=window[t].find((function(e){return e.script.isEqualNode(o)}));if(i)return i.hasLoaded&&n(),void i.script.addEventListener("load",(function(){return n()}));var a={script:o,hasLoaded:!1};window[t].push(a),o.addEventListener("load",(function(){a.hasLoaded=!0,n()})),o.addEventListener("error",(function(){return r(new Error("Polyfill failed to load"))})),document.head.appendChild(o)}))}},5:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"a",(function(){return i}))},6:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"g",(function(){return d})),n.d(t,"f",(function(){return h})),n.d(t,"e",(function(){return f})),n.d(t,"a",(function(){return p}));var r=n(1),o=n(23),i=n(9);const a=()=>{const e=Object(r.ab)("token")||"";return"true"===Object(r.ab)("isHomeownerSite")?Object(r.ab)("homeownerMagentoToken")||e:("false"===Object(r.ab)("isHomeownerSite")&&Object(r.ab)("enableEcommerce"),Object(r.ab)("dealerMagentoToken")||e)},s=()=>{if(a()){const e=Object(o.default)(a());return(new Date).getTime()>1e3*e.exp}return!0},c=()=>!!a()&&!s(),l=()=>{const e=document.getElementById("link1");e?(e.click(),window.logOutPopupShown$.next(!0),setTimeout(()=>{const e=document.getElementById("close-logout-popup");null===e||void 0===e||e.click(),u()},5e3)):(u(),window.location.href="".concat(Object(r.ab)("loginPageUrl"),"?redirectTo=").concat(window.location.pathname).concat(window.location.search)||window.location.origin)},u=()=>{Object(r.Nb)("homeownerMagentoToken"),Object(r.Nb)("username"),Object(r.Nb)("email"),Object(r.Nb)("dealerMagentoToken"),Object(r.Nb)("product-fav"),Object(r.Nb)("designer-fav"),Object(r.Nb)("currencySymbol"),Object(r.Nb)("dealerLocation"),Object(r.Nb)("dispatchLocationId"),Object(r.Nb)("hocompanyDetails"),Object(r.Nb)("hasCartUpdated"),Object(r.Nb)("cartId"),Object(r.Nb)("shippingAddressId")},d=(e,t)=>{if(t)return Object(i.f)({url:e,method:"POST",headers:{"Content-type":"application/json",redirectOnTokenFailure:!1},body:JSON.stringify({query:t})})};function h(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=a();if(t)return Object(i.f)({url:e,method:"POST",headers:{Authorization:"Bearer "+o,"Content-type":"application/json",redirectOnTokenFailure:n},body:JSON.stringify({query:t})});Object(r.Mb)()}function f(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=a();if(t)return Object(i.f)({url:e,method:"POST",headers:{Authorization:"Bearer "+o,"Content-type":"application/json",redirectOnTokenFailure:n},body:JSON.stringify({query:t})});Object(r.Mb)()}const p=(e,t)=>{if(t)return Object(i.f)({url:e,method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify({query:t})});Object(r.Mb)()}},613:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=n(41).default,a="/etc.clientlibs/amarr/clientlibs/webcomponents/amarr-wc-dependencies/resources/_a.react.production.min.js",s="/etc.clientlibs/amarr/clientlibs/webcomponents/amarr-wc-dependencies/resources/_b.react-dom.production.min.js",c=function(){try{n(614)}catch(e){console.warn("File is not found: C:\\Users\\User\\MyWorkingSpace\\gw-esd-amarr-frontend\\src\\components\\organisms\\dealer-login\\index.tsx")}};setTimeout((function(){return r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return window.React&&window.ReactDOM?(c(),[2]):[4,r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,5,,6]),[4,i(a,"reactBundleLoaded")];case 1:t.sent(),t.label=2;case 2:return[4,i(s,"reactBundleLoaded")];case 3:t.sent(),t.label=4;case 4:return[3,6];case 5:return e=t.sent(),console.error(e),[3,6];case 6:return[2]}}))}))];case 1:t.sent(),t.label=2;case 2:return t.trys.push([2,4,,5]),[4,new Promise((function(e,t){var n=0,r=setInterval((function(){n>=2500&&t(new Error("Direflow Error: React & ReactDOM was unable to load")),window.React&&window.ReactDOM&&(clearInterval(r),e()),n+=1}))}))];case 3:return t.sent(),c(),[3,5];case 4:return e=t.sent(),console.error(e.message),[3,5];case 5:return[2]}}))}))}))},614:function(e,t,n){"use strict";n.r(t);var r=n(33),o=n(183);t.default=r.a.create({component:o.a,configuration:{tagname:"amarr-dealer-login",useShadow:!1},plugins:[]})},78:function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Auth0Context",(function(){return ue})),n.d(t,"Auth0Provider",(function(){return Se})),n.d(t,"AuthenticationError",(function(){return y})),n.d(t,"GenericError",(function(){return v})),n.d(t,"InMemoryCache",(function(){return H})),n.d(t,"LocalStorageCache",(function(){return z})),n.d(t,"MfaRequiredError",(function(){return k})),n.d(t,"MissingRefreshTokenError",(function(){return _})),n.d(t,"OAuthError",(function(){return de})),n.d(t,"PopupCancelledError",(function(){return O})),n.d(t,"PopupTimeoutError",(function(){return S})),n.d(t,"TimeoutError",(function(){return w})),n.d(t,"User",(function(){return ae})),n.d(t,"initialContext",(function(){return le})),n.d(t,"useAuth0",(function(){return Oe})),n.d(t,"withAuth0",(function(){return ke})),n.d(t,"withAuthenticationRequired",(function(){return Te}));var r=n(0),o=n.n(r),i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(l){i(l)}}function s(e){try{c(r.throw(e))}catch(l){i(l)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(l){s=[6,l],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function l(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"===typeof SuppressedError&&SuppressedError,"function"==typeof SuppressedError&&SuppressedError;var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{};function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function h(e,t){return e(t={exports:{}},t.exports),t.exports}var f=h((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var r=e.locked.get(t);void 0===r?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(r.unshift(n),e.locked.set(t,r))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise((function(n,r){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())}))},this.unlock=function(t){var n=e.locked.get(t);if(void 0!==n&&0!==n.length){var r=n.pop();e.locked.set(t,n),void 0!==r&&setTimeout(r,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();t.default=function(){return n.getInstance()}}));d(f);var p=d(h((function(e,t){var n=u&&u.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,s)}c((r=r.apply(e,t||[])).next())}))},r=u&&u.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},o=u;Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key",a={key:function(e){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},getItem:function(e){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},clear:function(){return n(o,void 0,void 0,(function(){return r(this,(function(e){return[2,window.localStorage.clear()]}))}))},removeItem:function(e){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},setItem:function(e,t){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function s(e){return new Promise((function(t){return setTimeout(t,e)}))}function c(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}var l=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+c(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,o){return void 0===o&&(o=5e3),n(this,void 0,void 0,(function(){var n,l,u,d,h,f,p;return r(this,(function(r){switch(r.label){case 0:n=Date.now()+c(4),l=Date.now()+o,u=i+"-"+t,d=void 0===this.storageHandler?a:this.storageHandler,r.label=1;case 1:return Date.now()<l?[4,s(30)]:[3,8];case 2:return r.sent(),null!==d.getItemSync(u)?[3,5]:(h=this.id+"-"+t+"-"+n,[4,s(Math.floor(25*Math.random()))]);case 3:return r.sent(),d.setItemSync(u,JSON.stringify({id:this.id,iat:n,timeoutKey:h,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return r.sent(),null!==(f=d.getItemSync(u))&&(p=JSON.parse(f)).id===this.id&&p.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(u,n),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?a:this.storageHandler),[4,this.waitForSomethingToChange(l)];case 6:r.sent(),r.label=7;case 7:return n=Date.now()+c(4),[3,1];case 8:return[2,!1]}}))}))},e.prototype.refreshLockWhileAcquired=function(e,t){return n(this,void 0,void 0,(function(){var o=this;return r(this,(function(i){return setTimeout((function(){return n(o,void 0,void 0,(function(){var n,o,i;return r(this,(function(r){switch(r.label){case 0:return[4,f.default().lock(t)];case 1:return r.sent(),this.acquiredIatSet.has(t)?(n=void 0===this.storageHandler?a:this.storageHandler,null===(o=n.getItemSync(e))?(f.default().unlock(t),[2]):((i=JSON.parse(o)).timeRefreshed=Date.now(),n.setItemSync(e,JSON.stringify(i)),f.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(f.default().unlock(t),[2])}}))}))}),1e3),[2]}))}))},e.prototype.waitForSomethingToChange=function(t){return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n){var r=!1,o=Date.now(),i=!1;function a(){if(i||(window.removeEventListener("storage",a),e.removeFromWaiting(a),clearTimeout(s),i=!0),!r){r=!0;var t=50-(Date.now()-o);t>0?setTimeout(n,t):n(null)}}window.addEventListener("storage",a),e.addToWaiting(a);var s=setTimeout(a,Math.max(0,t-Date.now()))}))];case 1:return n.sent(),[2]}}))}))},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter((function(e){return e!==t})))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach((function(e){return e()}))},e.prototype.releaseLock=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.releaseLock__private__=function(t){return n(this,void 0,void 0,(function(){var n,o,s,c;return r(this,(function(r){switch(r.label){case 0:return n=void 0===this.storageHandler?a:this.storageHandler,o=i+"-"+t,null===(s=n.getItemSync(o))?[2]:(c=JSON.parse(s)).id!==this.id?[3,2]:[4,f.default().lock(c.iat)];case 1:r.sent(),this.acquiredIatSet.delete(c.iat),n.removeItemSync(o),f.default().unlock(c.iat),e.notifyWaiters(),r.label=2;case 2:return[2]}}))}))},e.lockCorrector=function(t){for(var n=Date.now()-5e3,r=t,o=[],a=0;;){var s=r.keySync(a);if(null===s)break;o.push(s),a++}for(var c=!1,l=0;l<o.length;l++){var u=o[l];if(u.includes(i)){var d=r.getItemSync(u);if(null!==d){var h=JSON.parse(d);(void 0===h.timeRefreshed&&h.timeAcquired<n||void 0!==h.timeRefreshed&&h.timeRefreshed<n)&&(r.removeItemSync(u),c=!0)}}}c&&e.notifyWaiters()},e.waiters=void 0,e}();t.default=l})));const m={timeoutInSeconds:60},g={name:"auth0-spa-js",version:"2.1.3"},b=()=>Date.now();class v extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,v.prototype)}static fromPayload(e){let{error:t,error_description:n}=e;return new v(t,n)}}class y extends v{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;super(e,t),this.state=n,this.appState=r,Object.setPrototypeOf(this,y.prototype)}}class w extends v{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,w.prototype)}}class S extends w{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,S.prototype)}}class O extends v{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,O.prototype)}}class k extends v{constructor(e,t,n){super(e,t),this.mfa_token=n,Object.setPrototypeOf(this,k.prototype)}}class _ extends v{constructor(e,t){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(C(e,["default"]),"', scope: '").concat(C(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,_.prototype)}}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e&&!t.includes(e)?e:""}const j=()=>window.crypto,T=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(j().getRandomValues(new Uint8Array(43))).forEach(n=>t+=e[n%e.length]),t},P=e=>btoa(e),x=e=>{var{clientId:t}=e,n=l(e,["clientId"]);return new URLSearchParams((e=>Object.keys(e).filter(t=>void 0!==e[t]).reduce((t,n)=>Object.assign(Object.assign({},t),{[n]:e[n]}),{}))(Object.assign({client_id:t},n))).toString()},I=e=>(e=>decodeURIComponent(atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),E=async(e,t)=>{const n=await fetch(e,t);return{ok:n.ok,json:await n.json()}},A=async(e,t,n)=>{const r=new AbortController;let o;return t.signal=r.signal,Promise.race([E(e,t),new Promise((e,t)=>{o=setTimeout(()=>{r.abort(),t(new Error("Timeout when executing 'fetch'"))},n)})]).finally(()=>{clearTimeout(o)})},N=async(e,t,n,r,o,i,a)=>{return s={auth:{audience:t,scope:n},timeout:o,fetchUrl:e,fetchOptions:r,useFormData:a},c=i,new Promise((function(e,t){const n=new MessageChannel;n.port1.onmessage=function(r){r.data.error?t(new Error(r.data.error)):e(r.data),n.port1.close()},c.postMessage(s,[n.port2])}));var s,c},R=async function(e,t,n,r,o,i){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1e4;return o?N(e,t,n,r,a,o,i):A(e,r,a)};async function D(e,t){var{baseUrl:n,timeout:r,audience:o,scope:i,auth0Client:a,useFormData:s}=e,c=l(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const u=s?x(c):JSON.stringify(c);return await async function(e,t,n,r,o,i,a){let s,c=null;for(let m=0;m<3;m++)try{s=await R(e,n,r,o,i,a,t),c=null;break}catch(l){c=l}if(c)throw c;const u=s.json,{error:d,error_description:h}=u,f=l(u,["error","error_description"]),{ok:p}=s;if(!p){const t=h||"HTTP error. Unable to fetch ".concat(e);if("mfa_required"===d)throw new k(d,t,f.mfa_token);if("missing_refresh_token"===d)throw new _(n,r);throw new v(d||"request_error",t)}return f}("".concat(n,"/oauth/token"),r,o||"default",i,{method:"POST",body:u,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(a||g))}},t,s)}const L=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(r=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(r))).join(" ");var r};class W{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"@@auth0spajs@@",n=arguments.length>2?arguments[2]:void 0;this.prefix=t,this.suffix=n,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[t,n,r,o]=e.split("::");return new W({clientId:n,scope:o,audience:r},t)}static fromCacheEntry(e){const{scope:t,audience:n,client_id:r}=e;return new W({scope:t,audience:n,clientId:r})}}class z{set(e,t){localStorage.setItem(e,JSON.stringify(t))}get(e){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter(e=>e.startsWith("@@auth0spajs@@"))}}class H{constructor(){this.enclosedCache=function(){let e={};return{set(t,n){e[t]=n},get(t){const n=e[t];if(n)return n},remove(t){delete e[t]},allKeys:()=>Object.keys(e)}}()}}class Z{constructor(e,t,n){this.cache=e,this.keyManifest=t,this.nowProvider=n||b}async setIdToken(e,t,n){var r;const o=this.getIdTokenCacheKey(e);await this.cache.set(o,{id_token:t,decodedToken:n}),await(null===(r=this.keyManifest)||void 0===r?void 0:r.add(o))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;var n;let r=await this.cache.get(e.toKey());if(!r){const t=await this.getCacheKeys();if(!t)return;const n=this.matchExistingCacheKey(e,t);n&&(r=await this.cache.get(n))}if(!r)return;const o=await this.nowProvider(),i=Math.floor(o/1e3);return r.expiresAt-t<i?r.body.refresh_token?(r.body={refresh_token:r.body.refresh_token},await this.cache.set(e.toKey(),r),r.body):(await this.cache.remove(e.toKey()),void await(null===(n=this.keyManifest)||void 0===n?void 0:n.remove(e.toKey()))):r.body}async set(e){var t;const n=new W({clientId:e.client_id,scope:e.scope,audience:e.audience}),r=await this.wrapCacheEntry(e);await this.cache.set(n.toKey(),r),await(null===(t=this.keyManifest)||void 0===t?void 0:t.add(n.toKey()))}async clear(e){var t;const n=await this.getCacheKeys();n&&(await n.filter(t=>!e||t.includes(e)).reduce(async(e,t)=>{await e,await this.cache.remove(t)},Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new W({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var n;const r=W.fromKey(t),o=new Set(r.scope&&r.scope.split(" ")),i=(null===(n=e.scope)||void 0===n?void 0:n.split(" "))||[],a=r.scope&&i.reduce((e,t)=>e&&o.has(t),!0);return"@@auth0spajs@@"===r.prefix&&r.clientId===e.clientId&&r.audience===e.audience&&a})[0]}}class U{constructor(e,t,n){this.storage=e,this.clientId=t,this.cookieDomain=n,this.storageKey="a0.spajs.txs.".concat(this.clientId)}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const K=e=>"number"==typeof e,M=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var G=h((function(e,t){var n=u&&u.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e,t){if(!t)return"";var n="; "+e;return!0===t?n:n+"="+t}function o(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return r("Expires",e.expires?e.expires.toUTCString():"")+r("Domain",e.domain)+r("Path",e.path)+r("Secure",e.secure)+r("SameSite",e.sameSite)}(n)}function i(e){for(var t={},n=e?e.split("; "):[],r=/(%[\dA-F]{2})+/gi,o=0;o<n.length;o++){var i=n[o].split("="),a=i.slice(1).join("=");'"'===a.charAt(0)&&(a=a.slice(1,-1));try{t[i[0].replace(r,decodeURIComponent)]=a.replace(r,decodeURIComponent)}catch(e){}}return t}function a(){return i(document.cookie)}function s(e,t,r){document.cookie=o(e,t,n({path:"/"},r))}t.__esModule=!0,t.encode=o,t.parse=i,t.getAll=a,t.get=function(e){return a()[e]},t.set=s,t.remove=function(e,t){s(e,"",n(n({},t),{expires:-1}))}}));d(G),G.encode,G.parse,G.getAll;var J=G.get,X=G.set,F=G.remove;const V={get(e){const t=J(e);if(void 0!==t)return JSON.parse(t)},save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0,sameSite:"none"}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),X(e,JSON.stringify(t),r)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),F(e,n)}},B={get:e=>V.get(e)||V.get("_legacy_".concat(e)),save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),X("_legacy_".concat(e),JSON.stringify(t),r),V.save(e,t,n)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),F(e,n),V.remove(e,t),V.remove("_legacy_".concat(e),t)}},Y={get(e){if("undefined"==typeof sessionStorage)return;const t=sessionStorage.getItem(e);return null!=t?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var $,q=("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",null,!1,function(e){return $=$||function(e,t,n){var r=void 0===t?null:t,o=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,a=o.substring(i)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",null,!1),new Worker($,e)});const Q={};class ee{constructor(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var t;const n=new Set((null===(t=await this.cache.get(this.manifestKey))||void 0===t?void 0:t.keys)||[]);n.add(e),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(e){const t=await this.cache.get(this.manifestKey);if(t){const n=new Set(t.keys);return n.delete(e),n.size>0?await this.cache.set(this.manifestKey,{keys:[...n]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(e){return"@@auth0spajs@@::".concat(e)}}const te={memory:()=>(new H).enclosedCache,localstorage:()=>new z},ne=e=>te[e],re=e=>{const{openUrl:t,onRedirect:n}=e,r=l(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},r),{openUrl:!1===t||t?t:n})},oe=new p;class ie{constructor(e){let t,n;if(this.userCache=(new H).enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await oe.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!j())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===j().subtle)throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")})(),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)n=e.cache;else{if(t=e.cacheLocation||"memory",!ne(t))throw new Error('Invalid cache location "'.concat(t,'"'));n=ne(t)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?V:B,this.orgHintCookieName="auth0.".concat(this.options.clientId,".organization_hint"),this.isAuthenticatedCookieName=(e=>"auth0.".concat(e,".is.authenticated"))(this.options.clientId),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const r=e.useCookiesForTransactions?this.cookieStorage:Y;var o;this.scope=L("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new U(r,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||b,this.cacheManager=new Z(n,n.allKeys?void 0:new ee(n,this.options.clientId),this.nowProvider),this.domainUrl=(o=this.options.domain,/^https?:\/\//.test(o)?o:"https://".concat(o)),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/"))(this.options.issuer,this.domainUrl),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===t&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new q)}_url(e){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||g)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(t)}_authorizeUrl(e){return this._url("/authorize?".concat(x(e)))}async _verifyIdToken(e,t,n){const r=await this.nowProvider();return(e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(e=>{const t=e.split("."),[n,r,o]=t;if(3!==t.length||!n||!r||!o)throw new Error("ID token could not be decoded");const i=JSON.parse(I(r)),a={__raw:e},s={};return Object.keys(i).forEach(e=>{a[e]=i[e],M.includes(e)||(s[e]=i[e])}),{encoded:{header:n,payload:r,signature:o},header:JSON.parse(I(n)),claims:a,user:s}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!K(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==t.claims.exp||!K(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!K(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const n=e.leeway||60,r=new Date(e.now||Date.now()),o=new Date(0);if(o.setUTCSeconds(t.claims.exp+n),r>o)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(r,") is after expiration time (").concat(o,")"));if(null!=t.claims.nbf&&K(t.claims.nbf)){const e=new Date(0);if(e.setUTCSeconds(t.claims.nbf-n),r<e)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (".concat(r,") is before ").concat(e))}if(null!=t.claims.auth_time&&K(t.claims.auth_time)){const o=new Date(0);if(o.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+n),r>o)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (".concat(r,") is after last auth at ").concat(o))}if(e.organization){const n=e.organization.trim();if(n.startsWith("org_")){const e=n;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(e,'", found "').concat(t.claims.org_id,'"'))}else{const e=n.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(e!==t.claims.org_name)throw new Error('Organization Name (org_name) claim mismatch in the ID token; expected "'.concat(e,'", found "').concat(t.claims.org_name,'"'))}}return t})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:t,organization:n,leeway:this.options.leeway,max_age:(o=this.options.authorizationParams.max_age,"string"!=typeof o?o:parseInt(o,10)||void 0),now:r});var o}_processOrgHint(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,t,n){const r=P(T()),o=P(T()),i=T(),a=(e=>{const t=new Uint8Array(e);return(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,e=>t[e])})(window.btoa(String.fromCharCode(...Array.from(t))))})(await(async e=>{const t=j().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t})(i)),s=((e,t,n,r,o,i,a,s)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),n),{scope:L(t,n.scope),response_type:"code",response_mode:s||"query",state:r,nonce:o,redirect_uri:a||e.authorizationParams.redirect_uri,code_challenge:i,code_challenge_method:"S256"}))(this.options,this.scope,e,r,o,a,e.redirect_uri||this.options.authorizationParams.redirect_uri||n,null==t?void 0:t.response_mode),c=this._authorizeUrl(s);return{nonce:o,code_verifier:i,scope:s.scope,audience:s.audience||"default",redirect_uri:s.redirect_uri,state:r,url:c}}async loginWithPopup(e,t){var n;if(e=e||{},!(t=t||{}).popup&&(t.popup=(e=>{const t=window.screenX+(window.innerWidth-400)/2,n=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup","left=".concat(t,",top=").concat(n,",width=400,height=600,resizable,scrollbars=yes,status=1"))})(),!t.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const r=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=r.url;const o=await(e=>new Promise((t,n)=>{let r;const o=setInterval(()=>{e.popup&&e.popup.closed&&(clearInterval(o),clearTimeout(i),window.removeEventListener("message",r,!1),n(new O(e.popup)))},1e3),i=setTimeout(()=>{clearInterval(o),n(new S(e.popup)),window.removeEventListener("message",r,!1)},1e3*(e.timeoutInSeconds||60));r=function(a){if(a.data&&"authorization_response"===a.data.type){if(clearTimeout(i),clearInterval(o),window.removeEventListener("message",r,!1),e.popup.close(),a.data.response.error)return n(v.fromPayload(a.data.response));t(a.data.response)}},window.addEventListener("message",r)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(r.state!==o.state)throw new v("state_mismatch","Invalid state");const i=(null===(n=e.authorizationParams)||void 0===n?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:o.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:i})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(){var e;const t=re(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{openUrl:n,fragment:r,appState:o}=t,i=l(t,["openUrl","fragment","appState"]),a=(null===(e=i.authorizationParams)||void 0===e?void 0:e.organization)||this.options.authorizationParams.organization,s=await this._prepareAuthorizeUrl(i.authorizationParams||{}),{url:c}=s,u=l(s,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:o}),a&&{organization:a}));const d=r?"".concat(c,"#").concat(r):c;n?await n(d):window.location.assign(d)}async handleRedirectCallback(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href).split("?").slice(1);if(0===e.length)throw new Error("There are no query params available for parsing.");const{state:t,code:n,error:r,error_description:o}=(e=>{e.indexOf("#")>-1&&(e=e.substring(0,e.indexOf("#")));const t=new URLSearchParams(e);return{state:t.get("state"),code:t.get("code")||void 0,error:t.get("error")||void 0,error_description:t.get("error_description")||void 0}})(e.join("")),i=this.transactionManager.get();if(!i)throw new v("missing_transaction","Invalid state");if(this.transactionManager.remove(),r)throw new y(r,o||r,t,i.appState);if(!i.code_verifier||i.state&&i.state!==t)throw new v("state_mismatch","Invalid state");const a=i.organization,s=i.nonce,c=i.redirect_uri;return await this._requestToken(Object.assign({audience:i.audience,scope:i.scope,code_verifier:i.code_verifier,grant_type:"authorization_code",code:n},c?{redirect_uri:c}:{}),{nonceIn:s,organization:a}),{appState:i.appState}}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(e)}catch(e){}}async getTokenSilently(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const n=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:L(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope)})}),r=await((e,t)=>{let n=Q[t];return n||(n=e().finally(()=>{delete Q[t],n=null}),Q[t]=n),n})(()=>this._getTokenSilently(n),"".concat(this.options.clientId,"::").concat(n.authorizationParams.audience,"::").concat(n.authorizationParams.scope));return e.detailedResponse?r:null==r?void 0:r.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,n=l(e,["cacheMode"]);if("off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(e)return e}if("cache-only"!==t){if(!await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;for(let n=0;n<t;n++)if(await e())return!0;return!1}(()=>oe.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new w;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),"off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:r,access_token:o,oauthTokenScope:i,expires_in:a}=e;return Object.assign(Object.assign({id_token:r,access_token:o},i?{scope:i}:null),{expires_in:a})}finally{await oe.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;const r=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:L(this.scope,null===(n=e.authorizationParams)||void 0===n?void 0:n.scope)})});return t=Object.assign(Object.assign({},m),t),await this.loginWithPopup(r,t),(await this.cacheManager.get(new W({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(e){null!==e.clientId?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const t=e.logoutParams||{},{federated:n}=t,r=l(t,["federated"]),o=n?"&federated":"";return this._url("/v2/logout?".concat(x(Object.assign({clientId:e.clientId},r))))+o}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=re(e),{openUrl:n}=t,r=l(t,["openUrl"]);null===e.clientId?await this.cacheManager.clear():await this.cacheManager.clear(e.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const o=this._buildLogoutUrl(r);n?await n(o):!1!==n&&window.location.assign(o)}async _getTokenFromIFrame(e){const t=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!t.organization&&(t.organization=n);const{url:r,state:o,nonce:i,code_verifier:a,redirect_uri:s,scope:c,audience:l}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new v("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const n=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,u=await function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60;return new Promise((r,o)=>{const i=window.document.createElement("iframe");i.setAttribute("width","0"),i.setAttribute("height","0"),i.style.display="none";const a=()=>{window.document.body.contains(i)&&(window.document.body.removeChild(i),window.removeEventListener("message",s,!1))};let s;const c=setTimeout(()=>{o(new w),a()},1e3*n);s=function(e){if(e.origin!=t)return;if(!e.data||"authorization_response"!==e.data.type)return;const n=e.source;n&&n.close(),e.data.response.error?o(v.fromPayload(e.data.response)):r(e.data.response),clearTimeout(c),window.removeEventListener("message",s,!1),setTimeout(a,2e3)},window.addEventListener("message",s,!1),window.document.body.appendChild(i),i.setAttribute("src",e)})}(r,this.domainUrl,n);if(o!==u.state)throw new v("state_mismatch","Invalid state");const d=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:a,code:u.code,grant_type:"authorization_code",redirect_uri:s,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:i,organization:t.organization});return Object.assign(Object.assign({},d),{scope:c,oauthTokenScope:d.scope,audience:l})}catch(e){throw"login_required"===e.error&&this.logout({openUrl:!1}),e}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new W({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new _(e.authorizationParams.audience||"default",e.authorizationParams.scope)}const n=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,r="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null;try{const o=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),r&&{timeout:r}));return Object.assign(Object.assign({},o),{scope:e.authorizationParams.scope,oauthTokenScope:o.scope,audience:e.authorizationParams.audience||"default"})}catch(t){if((t.message.indexOf("Missing Refresh Token")>-1||t.message&&t.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw t}}async _saveEntryInCache(e){const{id_token:t,decodedToken:n}=e,r=l(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:t,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||"default",t=await this.cacheManager.getIdToken(new W({clientId:this.options.clientId,audience:e,scope:this.scope})),n=this.userCache.get("@@user@@");return t&&t.id_token===(null==n?void 0:n.id_token)?n:(this.userCache.set("@@user@@",t),t)}async _getEntryFromCache(e){let{scope:t,audience:n,clientId:r}=e;const o=await this.cacheManager.get(new W({scope:t,audience:n,clientId:r}),60);if(o&&o.access_token){const{access_token:e,oauthTokenScope:t,expires_in:n}=o,r=await this._getIdTokenFromCache();return r&&Object.assign(Object.assign({id_token:r.id_token,access_token:e},t?{scope:t}:null),{expires_in:n})}}async _requestToken(e,t){const{nonceIn:n,organization:r}=t||{},o=await D(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},e),this.worker),i=await this._verifyIdToken(o.id_token,n,r);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},o),{decodedToken:i,scope:e.scope,audience:e.audience||"default"}),o.scope?{oauthTokenScope:o.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(r||i.claims.org_id),Object.assign(Object.assign({},o),{decodedToken:i})}}class ae{}var se={isAuthenticated:!1,isLoading:!0},ce=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},le=a(a({},se),{buildAuthorizeUrl:ce,buildLogoutUrl:ce,getAccessTokenSilently:ce,getAccessTokenWithPopup:ce,getIdTokenClaims:ce,loginWithRedirect:ce,loginWithPopup:ce,logout:ce,handleRedirectCallback:ce}),ue=Object(r.createContext)(le),de=function(e){function t(n,r){var o=e.call(this,r||n)||this;return o.error=n,o.error_description=r,Object.setPrototypeOf(o,t.prototype),o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),he=/[?&]code=[^&]+/,fe=/[?&]state=[^&]+/,pe=/[?&]error=[^&]+/,me=function(e){return function(t){return t instanceof Error?t:null!==t&&"object"===typeof t&&"error"in t&&"string"===typeof t.error?"error_description"in t&&"string"===typeof t.error_description?new de(t.error,t.error_description):new de(t.error):new Error(e)}},ge=me("Login failed"),be=me("Get access token failed"),ve=function(e){var t;(null===e||void 0===e?void 0:e.redirectUri)&&(console.warn("Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version"),e.authorizationParams=e.authorizationParams||{},e.authorizationParams.redirect_uri=e.redirectUri,delete e.redirectUri),(null===(t=null===e||void 0===e?void 0:e.authorizationParams)||void 0===t?void 0:t.redirectUri)&&(console.warn("Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version"),e.authorizationParams.redirect_uri=e.authorizationParams.redirectUri,delete e.authorizationParams.redirectUri)},ye=function(e,t){switch(t.type){case"LOGIN_POPUP_STARTED":return a(a({},e),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return a(a({},e),{isAuthenticated:!!t.user,user:t.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return e.user===t.user?e:a(a({},e),{isAuthenticated:!!t.user,user:t.user});case"LOGOUT":return a(a({},e),{isAuthenticated:!1,user:void 0});case"ERROR":return a(a({},e),{isLoading:!1,error:t.error})}},we=function(e){window.history.replaceState({},document.title,(null===e||void 0===e?void 0:e.returnTo)||window.location.pathname)},Se=function(e){var t=e.children,n=e.skipRedirectCallback,i=e.onRedirectCallback,l=void 0===i?we:i,u=e.context,d=void 0===u?ue:u,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children","skipRedirectCallback","onRedirectCallback","context"]),f=Object(r.useState)((function(){return new ie(function(e){return ve(e),a(a({},e),{auth0Client:{name:"auth0-react",version:"2.2.4"}})}(h))}))[0],p=Object(r.useReducer)(ye,se),m=p[0],g=p[1],b=Object(r.useRef)(!1);Object(r.useEffect)((function(){b.current||(b.current=!0,s(void 0,void 0,void 0,(function(){var e,t,r;return c(this,(function(o){switch(o.label){case 0:return o.trys.push([0,7,,8]),e=void 0,void 0===i&&(i=window.location.search),!he.test(i)&&!pe.test(i)||!fe.test(i)||n?[3,3]:[4,f.handleRedirectCallback()];case 1:return t=o.sent().appState,[4,f.getUser()];case 2:return e=o.sent(),l(t,e),[3,6];case 3:return[4,f.checkSession()];case 4:return o.sent(),[4,f.getUser()];case 5:e=o.sent(),o.label=6;case 6:return g({type:"INITIALISED",user:e}),[3,8];case 7:return r=o.sent(),g({type:"ERROR",error:ge(r)}),[3,8];case 8:return[2]}var i}))})))}),[f,l,n]);var v=Object(r.useCallback)((function(e){return ve(e),f.loginWithRedirect(e)}),[f]),y=Object(r.useCallback)((function(e,t){return s(void 0,void 0,void 0,(function(){var n,r;return c(this,(function(o){switch(o.label){case 0:g({type:"LOGIN_POPUP_STARTED"}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,f.loginWithPopup(e,t)];case 2:return o.sent(),[3,4];case 3:return n=o.sent(),g({type:"ERROR",error:ge(n)}),[2];case 4:return[4,f.getUser()];case 5:return r=o.sent(),g({type:"LOGIN_POPUP_COMPLETE",user:r}),[2]}}))}))}),[f]),w=Object(r.useCallback)((function(e){return void 0===e&&(e={}),s(void 0,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,f.logout(e)];case 1:return t.sent(),(e.openUrl||!1===e.openUrl)&&g({type:"LOGOUT"}),[2]}}))}))}),[f]),S=Object(r.useCallback)((function(e){return s(void 0,void 0,void 0,(function(){var t,n,r,o;return c(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,3,5]),[4,f.getTokenSilently(e)];case 1:return t=i.sent(),[3,5];case 2:throw n=i.sent(),be(n);case 3:return r=g,o={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,f.getUser()];case 4:return r.apply(void 0,[(o.user=i.sent(),o)]),[7];case 5:return[2,t]}}))}))}),[f]),O=Object(r.useCallback)((function(e,t){return s(void 0,void 0,void 0,(function(){var n,r,o,i;return c(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,5]),[4,f.getTokenWithPopup(e,t)];case 1:return n=a.sent(),[3,5];case 2:throw r=a.sent(),be(r);case 3:return o=g,i={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,f.getUser()];case 4:return o.apply(void 0,[(i.user=a.sent(),i)]),[7];case 5:return[2,n]}}))}))}),[f]),k=Object(r.useCallback)((function(){return f.getIdTokenClaims()}),[f]),_=Object(r.useCallback)((function(e){return s(void 0,void 0,void 0,(function(){var t,n,r;return c(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,3,5]),[4,f.handleRedirectCallback(e)];case 1:return[2,o.sent()];case 2:throw t=o.sent(),be(t);case 3:return n=g,r={type:"HANDLE_REDIRECT_COMPLETE"},[4,f.getUser()];case 4:return n.apply(void 0,[(r.user=o.sent(),r)]),[7];case 5:return[2]}}))}))}),[f]),C=Object(r.useMemo)((function(){return a(a({},m),{getAccessTokenSilently:S,getAccessTokenWithPopup:O,getIdTokenClaims:k,loginWithRedirect:v,loginWithPopup:y,logout:w,handleRedirectCallback:_})}),[m,S,O,k,v,y,w,_]);return o.a.createElement(d.Provider,{value:C},t)},Oe=function(e){return void 0===e&&(e=ue),Object(r.useContext)(e)},ke=function(e,t){return void 0===t&&(t=ue),function(n){return o.a.createElement(t.Consumer,null,(function(t){return o.a.createElement(e,a({},n,{auth0:t}))}))}},_e=function(){return o.a.createElement(o.a.Fragment,null)},Ce=function(){return s(void 0,void 0,void 0,(function(){return c(this,(function(e){return[2]}))}))},je=function(){return"".concat(window.location.pathname).concat(window.location.search)},Te=function(e,t){return void 0===t&&(t={}),function(n){var i=this,l=t.returnTo,u=void 0===l?je:l,d=t.onRedirecting,h=void 0===d?_e:d,f=t.onBeforeAuthentication,p=void 0===f?Ce:f,m=t.loginOptions,g=t.context,b=Oe(void 0===g?ue:g),v=b.isAuthenticated,y=b.isLoading,w=b.loginWithRedirect;return Object(r.useEffect)((function(){if(!y&&!v){var e=a(a({},m),{appState:a(a({},m&&m.appState),{returnTo:"function"===typeof u?u():u})});s(i,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,p()];case 1:return t.sent(),[4,w(e)];case 2:return t.sent(),[2]}}))}))}}),[y,v,w,p,m,u]),v?o.a.createElement(e,a({},n)):h()}}}.call(this,n(35))},9:function(e,t,n){"use strict";n.d(t,"f",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"g",(function(){return f}));var r=n(5),o=n(1),i=n(16),a=n(6);const s=async e=>{const{url:t,method:n="GET",headers:i={},body:s}=e,c=t.split("/");if(window.location.pathname.includes("/content/")&&t.includes("http"))return Promise.reject(!1);if(c.length>0&&"graphql"!==c[c.length-1]){const e=await fetch(t,{method:n,headers:i,body:s?JSON.stringify(s):void 0});if(!e.ok)throw new Error("HTTP error! status: ".concat(e.status));return{data:await e.json()}}let l="";if("true"===Object(o.ab)("isHomeownerSite"))l=Object(o.ab)("erp-dealer-id")||"";else{const e=Object(o.ab)("dealer")||"";if(e){const t=JSON.parse(e);l=Number(t.accountNumber)+""}}if("false"===Object(o.ab)("isHomeownerSite")&&"true"===Object(o.ab)("enableEcommerce")){const e=Object(o.ab)("dealer")||"";if(e){const t=JSON.parse(e);l=Number(t.accountNumber)+""}}const u=Object(o.ab)("store"),d=Object(o.ab)("currencyCode"),h="true"===Object(o.ab)("enableLogoutRedirection"),f=Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({"Content-Type":"application/json"},i),l&&{"erp-dealer-id":l}),u&&{store:u}),d&&{"Content-Currency":d});i.redirectOnTokenFailure&&h&&Object(a.b)()&&Object(a.d)(),delete f.redirectOnTokenFailure;try{var p,m,g,b;const e=await fetch(t,{method:n,headers:f,body:s?JSON.stringify(s):void 0});if(!e.ok)throw 401===e.status&&window.location.pathname.includes("/dealer/")&&(Object(o.Nb)("user"),Object(o.Nb)("dealer"),Object(o.Nb)("expiry"),Object(o.Nb)("childAccountList"),Object(o.Nb)("token"),document.cookie="usertype=null; max-age=0;secure",Object(o.Nb)("primaryRole"),sessionStorage.removeItem("amarrRoles"),Object(o.Nb)("dealerMagentoToken"),window.location.href=window.location.origin),new Error("HTTP error! status: ".concat(e.status));const r=await e.json();return(null===r||void 0===r||null===(p=r.data)||void 0===p||null===(m=p.errors)||void 0===m?void 0:m.length)>0||(null===r||void 0===r||null===(g=r.errors)||void 0===g?void 0:g.length)?Promise.reject(r):("The current customer isn't authorized."===(null===r||void 0===r||null===(b=r.errors)||void 0===b?void 0:b.message)&&Object(a.d)(),{data:r})}catch(v){throw console.error("Fetch error:",v),v}},c=e=>{if(Object(o.xb)())Object(i.b)();else{const t=Object(o.ab)("token");if(e)return s({url:e.url,method:"GET",headers:{Authorization:"Bearer "+t,"Content-Type":"application/json"}})}},l=e=>{if(Object(o.xb)())Object(i.b)();else{const t=Object(o.ab)("token");if(e)return s({url:e.url,method:"DELETE",headers:{Authorization:"Bearer "+t,"Content-Type":"application/json"}})}},u=e=>{if(Object(o.xb)())Object(i.b)();else{const t=Object(o.ab)("token");if(e)return s({url:e.url,method:"POST",headers:{Authorization:"Bearer "+t,"Content-Type":"application/json"},body:e.data})}},d=e=>{if(Object(o.xb)())Object(i.b)();else{const t=Object(o.ab)("token");if(e)return s({url:e.url,method:"PUT",headers:{Authorization:"Bearer "+t,"Content-Type":"application/json"},body:e.data})}};function h(e){return s({url:e,method:"GET"})}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s({url:e,method:"GET",headers:Object(r.a)(Object(r.a)({},t),{},{"Content-Type":"application/json"})})}}});
2
+ !function(e){function t(t){for(var r,a,s=t[0],c=t[1],l=t[2],d=0,h=[];d<s.length;d++)a=s[d],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&h.push(o[a][0]),o[a]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);for(u&&u(t);h.length;)h.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,s=1;s<n.length;s++){var c=n[s];0!==o[c]&&(r=!1)}r&&(i.splice(t--,1),e=a(a.s=n[0]))}return e}var r={},o={40:0},i=[];function a(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=r,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/";var s=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],c=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var u=c;i.push([613,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"h",(function(){return c})),n.d(t,"ic",(function(){return l})),n.d(t,"G",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"ub",(function(){return h})),n.d(t,"yb",(function(){return f})),n.d(t,"C",(function(){return p})),n.d(t,"D",(function(){return m})),n.d(t,"sb",(function(){return g})),n.d(t,"t",(function(){return b})),n.d(t,"w",(function(){return v})),n.d(t,"zb",(function(){return y})),n.d(t,"Vb",(function(){return w})),n.d(t,"vb",(function(){return S})),n.d(t,"B",(function(){return O})),n.d(t,"i",(function(){return k})),n.d(t,"F",(function(){return _})),n.d(t,"A",(function(){return C})),n.d(t,"K",(function(){return j})),n.d(t,"z",(function(){return T})),n.d(t,"E",(function(){return P})),n.d(t,"tb",(function(){return x})),n.d(t,"x",(function(){return I})),n.d(t,"Wb",(function(){return E})),n.d(t,"v",(function(){return A})),n.d(t,"Ab",(function(){return N})),n.d(t,"wb",(function(){return L})),n.d(t,"Yb",(function(){return W})),n.d(t,"r",(function(){return z})),n.d(t,"o",(function(){return H})),n.d(t,"s",(function(){return Z})),n.d(t,"p",(function(){return U})),n.d(t,"q",(function(){return K})),n.d(t,"R",(function(){return M})),n.d(t,"Fb",(function(){return G})),n.d(t,"Bb",(function(){return J})),n.d(t,"ob",(function(){return X})),n.d(t,"pb",(function(){return F})),n.d(t,"nb",(function(){return V})),n.d(t,"H",(function(){return B})),n.d(t,"hc",(function(){return Y})),n.d(t,"I",(function(){return $})),n.d(t,"cc",(function(){return ee})),n.d(t,"fb",(function(){return te})),n.d(t,"bc",(function(){return ne})),n.d(t,"ab",(function(){return re})),n.d(t,"Nb",(function(){return oe})),n.d(t,"ec",(function(){return ie})),n.d(t,"b",(function(){return ae})),n.d(t,"Mb",(function(){return se})),n.d(t,"Z",(function(){return ce})),n.d(t,"U",(function(){return le})),n.d(t,"a",(function(){return ue})),n.d(t,"jc",(function(){return de})),n.d(t,"f",(function(){return he})),n.d(t,"d",(function(){return fe})),n.d(t,"g",(function(){return pe})),n.d(t,"e",(function(){return me})),n.d(t,"mc",(function(){return ge})),n.d(t,"c",(function(){return be})),n.d(t,"kc",(function(){return ve})),n.d(t,"lc",(function(){return ye})),n.d(t,"Cb",(function(){return we})),n.d(t,"Db",(function(){return Se})),n.d(t,"Eb",(function(){return Oe})),n.d(t,"Gb",(function(){return ke})),n.d(t,"y",(function(){return _e})),n.d(t,"Kb",(function(){return Ce})),n.d(t,"Xb",(function(){return je})),n.d(t,"u",(function(){return Te})),n.d(t,"Ob",(function(){return Pe})),n.d(t,"P",(function(){return xe})),n.d(t,"X",(function(){return Ie})),n.d(t,"T",(function(){return Ee})),n.d(t,"gb",(function(){return Ae})),n.d(t,"mb",(function(){return Ne})),n.d(t,"db",(function(){return Re})),n.d(t,"N",(function(){return Le})),n.d(t,"O",(function(){return We})),n.d(t,"l",(function(){return ze})),n.d(t,"L",(function(){return He})),n.d(t,"V",(function(){return Ze})),n.d(t,"hb",(function(){return Ue})),n.d(t,"ib",(function(){return Ke})),n.d(t,"bb",(function(){return Me})),n.d(t,"lb",(function(){return Ge})),n.d(t,"J",(function(){return Je})),n.d(t,"m",(function(){return Xe})),n.d(t,"Tb",(function(){return Fe})),n.d(t,"Ub",(function(){return Ve})),n.d(t,"dc",(function(){return Be})),n.d(t,"Qb",(function(){return Ye})),n.d(t,"Pb",(function(){return $e})),n.d(t,"Sb",(function(){return qe})),n.d(t,"Rb",(function(){return Qe})),n.d(t,"Q",(function(){return et})),n.d(t,"Lb",(function(){return tt})),n.d(t,"k",(function(){return nt})),n.d(t,"cb",(function(){return rt})),n.d(t,"jb",(function(){return ot})),n.d(t,"eb",(function(){return it})),n.d(t,"M",(function(){return at})),n.d(t,"kb",(function(){return st})),n.d(t,"fc",(function(){return ct})),n.d(t,"gc",(function(){return lt})),n.d(t,"Ib",(function(){return ut})),n.d(t,"Jb",(function(){return dt})),n.d(t,"Hb",(function(){return ht})),n.d(t,"Y",(function(){return ft})),n.d(t,"qb",(function(){return pt})),n.d(t,"rb",(function(){return mt})),n.d(t,"Zb",(function(){return gt})),n.d(t,"W",(function(){return bt})),n.d(t,"ac",(function(){return vt})),n.d(t,"n",(function(){return yt})),n.d(t,"S",(function(){return St})),n.d(t,"xb",(function(){return Ot}));var r=n(5),o=n(3),i=n(6),a=n(19),s=n(23);const c=e=>JSON.parse(decodeURIComponent(escape(atob(e)))),l=e=>btoa(unescape(encodeURIComponent(e))),u=e=>l(JSON.stringify(e)),d=e=>e.toUpperCase(),h=e=>e.replaceAll(" ","-").toLowerCase(),f=new o.a(!1),p=new o.a(!1),m=new o.a(!1),g=new o.a(!1),b=new o.a(!1),v=new o.a(""),y=new o.a(!1),w=(new o.a(!1),new o.a(!1)),S=new o.a(!1),O=new o.a(!1),k=new o.a(!1),_=new o.a(!1),C=new o.a(""),j=new o.a(!0),T=new o.a(!1),P=new o.a(!0),x=new o.a(!0),I=new o.a(!0),E=new o.a(!0),A=new o.a(!0),N=new o.a({}),R=new o.a(!1);let D=0;const L=new o.a(!1),W=new o.a(""),z=new o.a(""),H=new o.a(""),Z=new o.a(""),U=new o.a(""),K=new o.a(""),M=new o.a(""),G=new o.a(""),J=new o.a(""),X=new o.a(""),F=new o.a(""),V=new o.a(!1),B=new o.a(""),Y=new o.a(!1),$=(new o.a(!1),new o.a(!1),new o.a({flag:!1}),new o.a(!1)),q=()=>new URLSearchParams(window.location.search).get("erp-dealer-id")||sessionStorage.getItem("erp-dealer-id")||"",Q=()=>window.self!==window.top,ee=(e,t)=>{const n=q();return Q()&&n?sessionStorage.setItem("".concat(n,"__").concat(e),t):sessionStorage.setItem(e,t)},te=e=>{const t=q();return Q()&&t?sessionStorage.getItem("".concat(t,"__").concat(e)):sessionStorage.getItem(e)},ne=(e,t)=>{const n=q();return Q()&&n?localStorage.setItem("".concat(n,"__").concat(e),t):localStorage.setItem(e,t)},re=e=>{const t=q();return Q()&&t?localStorage.getItem("".concat(t,"__").concat(e)):localStorage.getItem(e)},oe=e=>{const t=q();return Q()&&t?localStorage.removeItem("".concat(t,"__").concat(e)):localStorage.removeItem(e)};window.cartId$=new o.a(""),window.fetchCart$=new o.a({}),window.minicartUpdate$=new o.a(null),window.dealerCurrency$=new o.a(re("currencySymbol")||"$"),window.dealerLocation$=new o.a(re("dealerLocation")||""),window.dispatchLocationId$=new o.a(re("dispatchLocationId")||""),window.favoritesUpdate$=new o.a(0),window.logOutPopupShown$=new o.a(!1),window.editOrderSizeCollectionChanged$=new o.a(!1);new o.a(!1);const ie=new o.a([]),ae=()=>{setTimeout(()=>{D++,R.next(!0)},0)},se=()=>{setTimeout(()=>{D>0&&D--,0===D&&R.next(!1)},0)},ce=()=>R.asObservable(),le=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var a,s;e&&(ae(),r||(r={}),null===(a=Object(i.f)(e,"{\n customerCart {\n id\n }\n }"))||void 0===a||null===(s=a.then(e=>{const n=e.data.data.customerCart.id;ne("cartId",n),window.cartId$.next(n),t&&t(...r)}))||void 0===s||s.catch(e=>{console.error(e)}).finally(()=>{se()}))},ue=e=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),de=e=>{let t=0;return!!/(?=.{8,})/.test(e)&&(/([a-z])/.test(e)&&t++,/([A-Z])/.test(e)&&t++,/(\d)/.test(e)&&t++,/([!@#$%^&*])/.test(e)&&t++,t>=3)},he=e=>e.match(/^[a-zA-Z0-9]*$/g),fe=e=>e.match(/^[a-zA-Z\xc0-\xff-. ]*$/),pe=e=>/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e),me=e=>/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e),ge=e=>/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/.test(e),be=e=>/^[0-9]*$/.test(e),ve=e=>new RegExp("^[0-9]+[.][0-9]{0,2}$").test(e),ye=e=>/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e),we=e=>{if(e&&""!==e&&-1===e.indexOf("(")&&-1===e.indexOf(") ")&&-1===e.indexOf("-")){let t=e;return t="("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length),t}return e},Se=e=>{let t=(""+e).replace(/\D/g,"");if(t.length>10){t=t.slice(0,10);const e=t.match(/^(\d{3})(\d{3})(\d{4})$/);if(e)return"("+e[1]+") "+e[2]+"-"+e[3]}let n="";return t.split("").forEach((e,t)=>{n+=0===t?"("+e:2===t?e+") ":5===t?e+"-":e}),n},Oe=e=>{const t=e.target.value;return 1===t.length?"("+t:5===t.length?t.slice(0,t.length-1)+") "+t[t.length-1]:10===t.length&&"-"!==t[t.length-1]?t.slice(0,t.length-1)+"-"+t[t.length-1]:10===t.length&&"-"===t[t.length-1]?t.substring(0,t.length-1):6===t.length?t.substring(0,t.length-2):t},ke=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=e;return n&&(n=t?Number(n).toFixed(t).replace(/\d(?=(\d{3})+\.)/g,"$&,"):String(Math.trunc(Number(n))).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==n&&"0"!==n||(n=Number(n).toFixed(t)),n},_e=e=>Boolean(e.find(e=>("delivery_installation_scheduled"===e.code||"delivery_installation_completed"===e.code)&&e.show)),Ce=(e,t)=>{let n=0;return e=e?Number(e):0,n=0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100,n=n.toFixed(2),n},je=e=>{const t=[],n=[];e.forEach(e=>{if(null===e||void 0===e?void 0:e.item_serialize){const o=JSON.parse(null===e||void 0===e?void 0:e.item_serialize);"product"===(null===o||void 0===o?void 0:o.favoriteType)?t.push({id:e.id,data:JSON.parse(null===e||void 0===e?void 0:e.item_serialize)}):"design"!==(null===o||void 0===o?void 0:o.favoriteType)&&"door-design"!==(null===o||void 0===o?void 0:o.favoriteType)||n.push(Object(r.a)({id:e.id},JSON.parse(null===e||void 0===e?void 0:e.item_serialize)))}}),n.length?ne("designer-fav",JSON.stringify({data:n})):oe("designer-fav"),ne("product-fav",JSON.stringify(t))},Te=e=>{const t={tabs:!0,type:"designer",clavos:!1,download:!0,quote:!0,srcUrl:"/DoorApp",id:"AmarrDoorDesigner",panel:e.selectedPanel,brand:"",myGuid:"d-608280c6f378f8.36911414",email:!0,height:e.selectedHeight,collection:e.selectedCollection,print:!0,baseUrl:"",gplacement:e.selectedWindowPlacement,width:e.selectedWidth,srcDir:"DoorApp",MosaicName:"Mosaic",logooption:""};return e.selectedGlass&&(t.glass=e.selectedGlass),e.selectedColor&&(t.color=e.selectedColor),e.colorHex&&(t.colorHex=e.colorHex),e.colorZone&&(t.colorZone=e.colorZone),e.selectedConstruction&&(t.model=e.selectedConstruction),e.selectedWindowDesign&&(t.top=e.selectedWindowDesign),e.glazepattern&&(t.glazepattern=e.glazepattern),e.selectedHardware&&(t.hardware=e.selectedHardware),t},Pe=(e,t,n)=>{let r="";const o=e.split(t);return o.forEach((e,t)=>{"undefined"!==e&&e&&(r+=e,t!==o.length-1&&(r+=n))}),r},xe=e=>e.length>0?e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"").replace(/ /g,""):e,Ie=()=>{const e=document.getElementsByTagName("html")[0].getAttribute("lang");return e?"_"+e.split("-").join("_").toLowerCase():""},Ee=()=>getComputedStyle(document.body).getPropertyValue("--asset-path").trim(),Ae=()=>getComputedStyle(document.body).getPropertyValue("--accent").trim(),Ne=e=>{if("string"===typeof e){let t=e;return t=t.replace(/\\/g,"\\\\"),t=t.replace(/"/g,'\\"'),t}return e},Re=e=>Math.floor(Math.random()*e)+1,De=["January","February","March","April","May","June","July","August","September","October","November","December"],Le=(e,t)=>{const n=new Date("".concat(e).concat(t?" UTC":""));if("Invalid Date"===n.toString())return e;const r=n.getFullYear(),o=n.getMonth(),i=(n.getDate()+"").padStart(2,"0");return"".concat(De[o].slice(0,3)," ").concat(i,", ").concat(r)},We=e=>{const t=new Date(e),n=t.getMonth()+1,r=t.getDate(),o=t.getFullYear(),i=t.getHours(),a=t.getMinutes(),s=i>=12?"PM":"AM",c=i%12||12;return"".concat(n,"/").concat(r,"/").concat(o," ").concat(c,":").concat(a.toString().padStart(2,"0")," ").concat(s)},ze=e=>{try{return e?e.charAt(0).toUpperCase()+e.slice(1):""}catch(t){return e}},He=e=>e?e=(e=(e=e.toLowerCase()).replace(/\s/g,"-")).replace(/_/g,"-"):"",Ze=e=>{var t,n;return null===(t=e.find(e=>"delivery_installation_scheduled"===e.code))||void 0===t||null===(n=t.appointment_detail)||void 0===n?void 0:n.start_time},Ue=(e,t)=>{const n=["in_progress","delivery_installation_scheduled","delivery_installation_completed"];return"canceled"===t?e.filter(e=>!n.includes(e.code)).filter(e=>e.show):e},Ke=e=>{const t=["site_check_requested","site_check_scheduled","site_check_not_schedule","site_check_complete"];return e.filter(e=>!t.includes(e.code))},Me=e=>{const{currentSortBy:t,currentSortingDirection:n,newSortBy:r}=e;return t===r&&"desc"===n?"asc":"desc"},Ge=e=>{var t,n;let r=0;const o=null===e||void 0===e?void 0:e.id,i=Array.isArray(null===e||void 0===e?void 0:e.additional_info)&&(null===e||void 0===e||null===(t=e.additional_info[0])||void 0===t?void 0:t.diy)||!1,a=!!(null===e||void 0===e||null===(n=e.additional_info[0])||void 0===n?void 0:n.door_with_opener);let s=!1;e.items.forEach(e=>{if(null===e||void 0===e?void 0:e.item_serialize){JSON.parse(e.item_serialize)["Door Collection"]&&(s=!0)}r+=e.quantity}),window.fetchCart$.next({cartId:o,diy:i,totalCount:r,hasOpeners:a,hasDoors:s})},Je=e=>{const{parseData:t,imagesArray:n,collectionsArray:r,sizeArray:o,pricesArray:i,installationTypeArray:a,confiStyleArray:s,isHomeownerSite:c}=e,l=[];for(let g=0;g<t.length;g++){let e="";if(e=e+t[g].selectedCollection+t[g].selectedHeightInches+t[g].selectedWidthInches+t[g].selectedConstruction+t[g].selectedColor+t[g].selectedWindload+t[g].selectedPanel+t[g].selectedWindowDesign+t[g].selectedWindowPlacement+t[g].selectedGlass+t[g].selectedInsulation+t[g].selectedHardware+t[g].selectedDoorLock+t[g].selectedDoorSeal+t[g].selectedDoorOpener+t[g].selectedDoorAccessory,re("confi-style")){const t=re("confi-style"),n=JSON.parse(t);e=e+n[g].headroom+n[g].sideroom.inch+n[g].backroom.feet+n[g].backroom.inch}e=c?e+t[g].selectedHeadroom+t[g].selectedhardwareUpgrade:e+t[g].selectedExtraStruts+t[g].selectedExtraStrutsNumber+t[g].selectedHinge+t[g].selectedHoriAngle+t[g].selectedHoriRadius+t[g].selectedRoller+t[g].selectedSpring+t[g].selectedTrackLift+t[g].selectedActualHighLift+t[g].selectedBackhang,l.push(e)}const u=l.reduce((e,t)=>(e[t]?++e[t]:e[t]=1,e),{}),d=Object.keys(u),h=[];d.forEach(e=>{h.push(u[e])});const f=[],p=[];for(let g=0;g<d.length;g++){const e=[];for(let t=0;t<l.length;t++)d[g]===l[t]&&(e.push(t+1),e.length>1&&p.push(t+1));f.push(e)}for(let g=p.length-1;g>=0;g--){const e=p[g]-1;t.splice(e,1),n&&n.splice(e,1),r&&r.splice(e,1),i&&i.splice(e,1),a&&a.splice(e,1),o&&o.splice(e,1),s&&s.splice(e,1)}const m=[];for(let g=0;g<f.length;g++){let e="";m.push(f[g].length);for(let t=0;t<f[g].length;t++)e+=f[g][t],t<f[g].length-1&&(e+=",");f[g]=e}return{imagesArray:n,collectionsArray:r,sizeArray:o,pricesArray:i,confiStyleArray:s,installationTypeArray:a,quantityArray:m,indexArray:f,mergedList:t,uniqueProductsId:l.toString()}},Xe=(e,t,n)=>{let r="";if(r=e.indexOf("http")>-1?e:t+e,e.indexOf("{hardware-overlay-image}")>-1&&(r=""),"number"===typeof n&&e.indexOf("{colorcode}")>-1){const t=re("design-door"),o=JSON.parse(t)[n];r=e.replace("{colorcode}",o.colorHex)}return r},Fe=async e=>{const{apiURL:t,url:n,imageRootPath:r,items:o}=e,a=re("cartId")||"";try{var s,c,l,u;ae();let e="[";o.forEach(t=>{if(!t.sku)throw Error("SKU not available");if(!a)throw Error("Cart ID not available");e+="{\n quantity: ".concat(t.quantity,'\n sku: "').concat(t.sku,'"\n item_serialize: "').concat(Ne(JSON.stringify({price:t.price,diy:t.diy,Image:Xe(t.image,r),isAccessory:!0})),'"\n pricing_payload: "{}"\n }')}),e+="]";const d=await Object(i.e)(t,'mutation {\n addProductsToCart(\n cartId: "'.concat(a,'"\n cartItems: ').concat(e,"\n )\n {\n cart {\n id\n }\n }\n }\n ")),h=null===d||void 0===d||null===(s=d.data)||void 0===s||null===(c=s.data)||void 0===c||null===(l=c.addProductsToCart)||void 0===l||null===(u=l.cart)||void 0===u?void 0:u.id;return ne("hasCartUpdated","true"),n&&(window.location.href=n),h}catch(f){var d,h;throw pt(null===f||void 0===f||null===(d=f.data)||void 0===d||null===(h=d.errors[0])||void 0===h?void 0:h.message)&&le(t,Fe,e),f}finally{se()}},Ve=async e=>{const{apiURL:t,url:n,itemNumber:r,imageRootPath:o,items:a}=e,s=re("cartId")||"";let c=re("erp-dealer-id");if("true"===re("isHomeownerSite"))c=re("erp-dealer-id")||"";else{const e=re("dealer"),t=JSON.parse(e);c=Number(t.accountNumber)+""}const l=c;try{var u,d,h,f;ae();let e="[";a.forEach(t=>{var n,i;const a=null===t||void 0===t||null===(n=t.type)||void 0===n?void 0:n.split("_");e+="{\n quantity: ".concat(t.quantity,'\n sku: "').concat(t.sku,'"\n item_serialize: "').concat(Ne(JSON.stringify({price:t.price,diy:!1,Drive:t.drive,Force:t.force?t.force:"None","Motor Warranty":t.motorWarranty,"Parts Warranty":t.partsWarranty,Type:a&&a.length>1?a?(null===(i=a[0].charAt(0))||void 0===i?void 0:i.toUpperCase())+a[0].slice(1)+" "+a[1].charAt(0).toUpperCase()+a[1].slice(1):"":t.type,"Door Height":t.doorHeight,"Back Room":t.backRoom,"Side Room":t.sideRoom,"Head Room":t.headRoom,Image:Xe(t.image,o),isOpener:!0})),'"\n pricing_payload: "').concat(Ne(JSON.stringify({dealerNumber:l,itemNumber:r})),'"\n }')}),e+="]";const c=await Object(i.e)(t,'mutation {\n addProductsToCart(\n cartId: "'.concat(s,'"\n cartItems: ').concat(e,"\n )\n {\n cart {\n id\n }\n }\n }\n ")),p=null===c||void 0===c||null===(u=c.data)||void 0===u||null===(d=u.data)||void 0===d||null===(h=d.addProductsToCart)||void 0===h||null===(f=h.cart)||void 0===f?void 0:f.id;return ne("hasCartUpdated","true"),n&&(window.location.href=n),p}catch(g){var p,m;throw console.error(g),pt(null===g||void 0===g||null===(p=g.data)||void 0===p||null===(m=p.errors[0])||void 0===m?void 0:m.message)&&le(t,Ve,e),g}finally{se()}},Be=e=>{var t,n,r,o;const i=re("confi-size"),a=JSON.parse(i);let s=(null===(t=a[e])||void 0===t||null===(n=t.sideroom)||void 0===n?void 0:n.inch)?null===(r=a[e])||void 0===r||null===(o=r.sideroom)||void 0===o?void 0:o.inch:0,c=0;if(s.length>3){var l;s=s.split("-");const e=s[0],t=null===(l=s[1])||void 0===l?void 0:l.split("/");c=Number(e)+parseFloat((Number(t[0])/Number(t[1])).toFixed(2))}else if(3===s.length){const e=s.split("/");c=parseFloat((Number(e[0])/Number(e[1])).toFixed(2))}else c=1===s.length&&!isNaN(Number(s))&&Number(s)>0?s:0;return c},Ye=(e,t)=>{var n,r,o,i;let a=(null===(n=e[t])||void 0===n||null===(r=n.sideroom)||void 0===r?void 0:r.inch)?null===(o=e[t])||void 0===o||null===(i=o.sideroom)||void 0===i?void 0:i.inch:0,s=0;if(a.length>3){var c;a=a.split("-");const e=a[0],t=null===(c=a[1])||void 0===c?void 0:c.split("/");s=Number(e)+parseFloat((Number(t[0])/Number(t[1])).toFixed(2))}else if(3===a.length){const e=a.split("/");s=parseFloat((Number(e[0])/Number(e[1])).toFixed(2))}else s=1===a.length&&!isNaN(Number(a))&&Number(a)>0?a:0;return s},$e=(e,t)=>{var n;return(null===(n=e[t])||void 0===n?void 0:n.headroom)||0},qe=async e=>{try{const{apiURL:x,url:I,imageRootPath:E,parseDoor:A,parsePrice:N,parseMar:R,installationType:D=(re("installation-type")?re("installation-type"):""),confiStyle:L=[],quantityArray:W=[]}=e,z=re("cartId")||"";let H;if("true"===re("isHomeownerSite"))H=re("erp-dealer-id")||"";else{const e=re("dealer"),t=JSON.parse(e);H=Number(t.accountNumber)+""}const Z=H,U=[],K=[],M=new URLSearchParams(window.location.search),G=M.has("editCart")||re("editCart");for(let e=0;e<A.length;e++){var t;const i={};var n;if(i.Quantity=W[e]||1,i.Image=Xe(A[e].doorImage,E,e),i["Door Style"]=null===(t=L[e])||void 0===t?void 0:t.selectedDoorStyle,i["confi-style"]=L[e],A[e].hardwareImage&&(i.HardwareImage=Xe(A[e].hardwareImage,E,e)),i.Size=L[e].selectedCollection.nextSizewidth+"'"+L[e].selectedCollection.nextSizewidthInch+'"W '+L[e].selectedCollection.nextSizeheight+"'"+L[e].selectedCollection.nextSizeheightInch+'"H',i["Door Collection"]=A[e].selectedCollection,i["Door Collection_"]=A[e].selectedCollectionLabel,A[e].selectedConstruction&&"vista"!==A[e].selectedCollection&&"horiz"!==A[e].selectedCollection&&(i.Construction=A[e].selectedConstruction,i.Construction_=A[e].selectedConstructionLabel),i.Color="ColorZone"===A[e].selectedColor?A[e].colorZone:A[e].selectedColor,A[e].selectedWindload&&(i.Windload=A[e].selectedWindload,i.winloadDrawingNumber=A[e].winloadDrawingNumber,i.Windload_=A[e].winloadLabel,i.isMosaicSupported=A[e].isMosaicSupported),A[e].selectedPanel&&(i["Door Design"]=A[e].selectedPanel),A[e].selectedWindowPlacement&&(i["Window Placement"]=A[e].selectedWindowPlacement),A[e].selectedGlass&&(i.Glass=A[e].selectedGlass),A[e].selectedWindowDesign&&(i["Window Design"]=A[e].selectedWindowDesign,i["Window Design_"]=A[e].selectedWindowLabel),"vista"!==A[e].selectedCollection&&"horiz"!==A[e].selectedCollection||!A[e].selectedInsulation||(i["Glass Insulation"]=ze(A[e].selectedInsulation||"")),A[e].selectedHardware&&(i["Decorative Hardware"]=A[e].selectedHardware),i.dealer={},A[e].selectedHinge&&(i.dealer["Hinge Type"]=A[e].selectedHinge,i.dealer["Hinge Type_"]=A[e].selectedHingeLabel),A[e].selectedRoller?(i.dealer.Roller=A[e].selectedRoller,i.dealer.Roller_=A[e].selectedRollerLabel):i.dealer.Roller_="None",A[e].selectedTrackLift?(i.dealer["Track Lift"]=A[e].selectedTrackLift,i.dealer["Track Lift_"]=A[e].selectedTrackLiftLabel):i.dealer["Track Lift_"]="None",A[e].selectedActualHighLift?(i.dealer["Actual High Lift"]=A[e].selectedActualHighLift,i.dealer["Actual High Lift_"]=A[e].selectedActualHighLiftLabel):i.dealer["Actual High Lift_"]="None",A[e].selectedHoriAngle?(i.dealer["Horizontal Angle"]=A[e].selectedHoriAngle,i.dealer["Horizontal Angle_"]=A[e].selectedHoriAngleLabel):i.dealer["Horizontal Angle_"]="None",A[e].selectedHoriRadius?(i.dealer["Horizontal Radius"]=A[e].selectedHoriRadius,i.dealer["Horizontal Radius_"]=A[e].selectedHoriRadiusLabel):i.dealer["Horizontal Radius_"]="None",A[e].selectedSpring?(i.dealer["Spring Type"]=A[e].selectedSpring,i.dealer["Spring Type_"]=A[e].selectedSpringLabel):i.dealer["Spring Type_"]="None",A[e].selectedMount&&(i.dealer["Mount Type"]=A[e].selectedMount),A[e].selectedExtraStruts&&(i.dealer["Extra Struts"]=A[e].selectedExtraStruts,i.dealer["Extra Struts_"]=A[e].selectedExtraStrutsLabel,i.dealer["Number of Extra Struts"]=A[e].selectedExtraStrutsNumber),A[e].selectedDoorLock&&(i["Door Lock"]=A[e].selectedDoorLock),A[e].selectedBackhang&&(i.dealer["Back Hang"]=A[e].selectedBackhang+"",i.dealer["Back Hang_"]=A[e].selectedBackHangLabel),A[e].selectedDoorSeal&&(i["Perimeter Door Seal"]=A[e].selectedDoorSeal,i["Perimeter Door Seal_"]=A[e].selectedDoorSealLabel),A[e].selectedDoorOpener&&(i["Garage Door Opener"]=A[e].selectedDoorOpener,i["Garage Door Opener Image Path"]=A[e].selectedDoorOpenerImagePath,i["Garage Door Opener Item Number"]=A[e].selectedDrawingNumber,i["Garage Door Opener_"]=A[e].selectedDoorOpenerLabel,i["Garage Door Opener Laborcost"]=A[e].openerLaborcost),A[e].selectedDoorAccessory&&(i["Garage Door Accessory"]=A[e].selectedDoorAccessory,i["Garage Door Accessory_"]=A[e].selectedDoorAccessoryLabel,i["Garage Door Accessory Price"]=A[e].selectedDoorAccessoryPrice),i["High Cycle Springs"]=A[e].selectedHighcycleSprings,i.homeowner={},A[e].selectedhardwareUpgrade)i.homeowner["Door Hardware Upgrade"]=ze((null===(n=A[e])||void 0===n?void 0:n.selectedhardwareUpgrade)||"");A[e].selectedHeadroom&&(i.low_head_room="yes"===A[e].selectedHeadroom),i.imapUsed=A[e].imapUsed,i.laborcost=A[e].laborcost,i.diy="professionally-installed"!==D,i.price="".concat(isNaN(Number(A[e].selectedDoorAccessoryPrice))?N[e]:N[e]+Number(A[e].selectedDoorAccessoryPrice)),i.installation=D&&(null===D||void 0===D?void 0:D.length)>0?D.charAt(0).toUpperCase()+D.replaceAll("-"," ").slice(1):"",i.accessory_name=A[e].selectedDoorAccessoryLabel,i.accessory_sku=A[e].selectedDoorAccessory,i.accessory_price=A[e].selectedDoorAccessoryPrice,i.opener_brand=A[e].openerBrand;for(let t=0;t<(null===R||void 0===R||null===(r=R.items)||void 0===r?void 0:r.length);t++){var r;if(A[e].selectedCollection===R.items[t].sku){var o;const n=null===R||void 0===R||null===(o=R.items[t])||void 0===o?void 0:o.priceData;var a,s,c;if(n&&n.length>0)for(let t=0;t<n.length;t++){var l,u,d,h,f,p,m,g,b,v,y;if("vista"!==A[e].selectedCollection&&"horiz"!==A[e].selectedCollection||(n[t].model=""),Number(null===(l=A[e])||void 0===l?void 0:l.selectedWidth)<=10){if("single"===n[t].size&&n[t].model===(null===(u=A[e])||void 0===u?void 0:u.selectedConstruction))if(null===n[t].labour_charge||!(null===(d=n[t])||void 0===d?void 0:d.labour_charge)||isNaN(null===(h=n[t])||void 0===h?void 0:h.labour_charge))i.labour_charge=null===R||void 0===R||null===(f=R.default_config)||void 0===f?void 0:f.single_door_labour_charge;else i.labour_charge=Number(null===(p=n[t])||void 0===p?void 0:p.labour_charge)}else if("double"===n[t].size&&n[t].model===(null===(m=A[e])||void 0===m?void 0:m.selectedConstruction))if(null===n[t].labour_charge||!(null===(g=n[t])||void 0===g?void 0:g.labour_charge)||isNaN(null===(b=n[t])||void 0===b?void 0:b.labour_charge))i.labour_charge=null===R||void 0===R||null===(v=R.default_config)||void 0===v?void 0:v.double_door_labour_charge;else i.labour_charge=Number(null===(y=n[t])||void 0===y?void 0:y.labour_charge)}else if(Number(null===(a=A[e])||void 0===a?void 0:a.selectedWidth)<=10)i.labour_charge=null===R||void 0===R||null===(s=R.default_config)||void 0===s?void 0:s.single_door_labour_charge;else i.labour_charge=null===R||void 0===R||null===(c=R.default_config)||void 0===c?void 0:c.single_door_labour_charge}}U.push(i)}let J="[",X="[";for(let e=0;e<A.length;e++){let t;if(K.push(A[e].selectedCollection),t="vista"===A[e].selectedCollection||"horiz"===A[e].selectedCollection?{dealerNumber:Z,door:{market:"Residential",brand:"",collection:A[e].selectedCollection,color:A[e].selectedColor,includeHardwareDetailOptions:!0,includeDoorDetailOptions:!0,includeImapPricing:!0,width:A[e].baseWidth?A[e].baseWidth:A[e].selectedWidth,height:A[e].baseHeight?A[e].baseHeight:A[e].selectedHeight,optional:{trueWidthInches:Number(A[e].selectedWidthInches),trueHeightInches:Number(A[e].selectedHeightInches)},measurements:{headRoomValue:$e(L,e),sideRoomInches:Ye(L,e)}}}:{dealerNumber:Z,door:{market:"Residential",brand:"",model:A[e].selectedConstruction,collection:A[e].selectedCollection,color:A[e].selectedColor,panel:A[e].selectedPanel,includeDoorDetailOptions:!0,includeHardwareDetailOptions:!0,includeImapPricing:!0,width:A[e].baseWidth?A[e].baseWidth:A[e].selectedWidth,height:A[e].baseHeight?A[e].baseHeight:A[e].selectedHeight,optional:{trueWidthInches:Number(A[e].selectedWidthInches),trueHeightInches:Number(A[e].selectedHeightInches)},glassDetail:{gPlacement:A[e].selectedWindowPlacement?A[e].selectedWindowPlacement:null,top:A[e].selectedWindowDesign},measurements:{headRoomValue:$e(L,e),sideRoomInches:Ye(L,e)}}},A[e].selectedGlass&&"Closed"!==A[e].selectedWindowPlacement&&(t.door.glassDetail.glass=A[e].selectedGlass?A[e].selectedGlass:"Clear"),"ColorZone"===A[e].selectedColor&&(t.door.optional.colorZone=A[e].colorZone,t.door.optional.colorZoneHex=A[e].colorHex,t.door.optional.ColorZoneCode=A[e].colorZone.substr(1).split("/")[0].trim()),"Mosaic"===A[e].selectedWindowPlacement&&(t.door.optional.mosaicPattern=A[e].glazepattern),A[e].selectedHardware&&"None"!==A[e].selectedHardware&&(t.door.optional.decorativeHardware=A[e].selectedHardware),"doorColor"===A[e].selectedDoorSeal&&(t.door.optional.VinylStopColor="vista"===A[e].selectedCollection||"horiz"===A[e].selectedCollection||"ColorZone"===A[e].selectedColor?"white":A[e].selectedColor.includes("Two-Tone")?A[e].selectedColor.split("/")[0].replace("Two-Tone","").trim():A[e].selectedColor),"truewhite"===A[e].selectedDoorSeal&&(t.door.optional.VinylStopColor="white"),"black"===A[e].selectedDoorSeal&&(t.door.optional.VinylStopColor="black"),A[e].selectedDrawingNumber&&"undefined"!==A[e].selectedDrawingNumber&&(t.door.openerDetail||(t.door.openerDetail={}),t.door.openerDetail.itemNumber=A[e].selectedDrawingNumber),A[e].selectedWindload&&(t.door.optional.windProCode=A[e].selectedWindload.split("+")[0],t.door.optional.drawingNumber=A[e].winloadDrawingNumber),"vista"!==A[e].selectedCollection&&"horiz"!==A[e].selectedCollection||(t.door.fullViewDetail=A[e].fullViewDetail),A[e].selectedDoorLock&&(t.door.optional.lockhardware=A[e].selectedDoorLock),"true"===re("isHomeownerSite")?t.door.optional.homeOwnerHardwareUpgrade="premium"===A[e].selectedhardwareUpgrade:(A[e].selectedHighcycleSprings&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.highCycleSprings=A[e].selectedHighcycleSprings),A[e].selectedRoller&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.rollers=A[e].selectedRoller),A[e].selectedTrackLift&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.liftType=A[e].selectedTrackLift),A[e].selectedActualHighLift&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.actualHighLift=A[e].selectedActualHighLift),A[e].selectedHoriAngle&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.horizontalAngle=A[e].selectedHoriAngle),A[e].selectedHoriRadius&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.horizontalRadius=A[e].selectedHoriRadius),A[e].selectedSpring&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.spring=A[e].selectedSpring),A[e].selectedHinge&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.hinges=A[e].selectedHinge),A[e].selectedExtraStruts&&(t.door.hardwareDetail||(t.door.hardwareDetail={}),t.door.hardwareDetail.extraStruts=A[e].selectedExtraStruts,t.door.hardwareDetail.numberOfExtraStruts=A[e].selectedExtraStrutsNumber),A[e].selectedBackhang&&(t.door.openerDetail||(t.door.openerDetail={}),t.door.openerDetail.punchAngleItemNumbers=[A[e].selectedBackhang+""])),J+="{\n quantity: ".concat(W[e]||1,'\n sku: "').concat(K[e],'"\n item_serialize: "').concat(Ne(JSON.stringify(U[e])),'"\n pricing_payload: "').concat(Ne(JSON.stringify(t)),'"\n }'),G){const n=JSON.parse(re("edit-cart-data-quantity-list")||"{}"),r=JSON.parse(re("edit-cart-data-uid-list")||"{}"),o=M.has("editDoorIndex")?+M.get("editDoorIndex"):Number(re("editDoorIndex"))||0;X+="{\n quantity: ".concat(n[o],',\n cart_item_uid: "').concat(r[o],'",\n sku: "').concat(K[e],'",\n item_serialize: "').concat(Ne(JSON.stringify(U[e])),'",\n pricing_payload: "').concat(Ne(JSON.stringify(t)),'"\n }')}if(""===z){var w,S;let n=JSON.parse(re("edited-desc-data")||"{}");const r=null===(w=JSON.parse(re("edit-door-additional-details")||"{}"))||void 0===w?void 0:w.edited_door_index,o=null===(S=JSON.parse(re("edit-door-additional-details")||"{}"))||void 0===S?void 0:S.orderNo,i={door_index:r,item_serialize_edited:"".concat(JSON.stringify(U[e])),pricing_payload_edited:"".concat(JSON.stringify(t)),edited_order_no:o,product_sku:"".concat(K[e])};if(re("edited-desc-data")){let e=!0;for(let t=0;t<n.length;t++)if(n[t].door_index===r){n[t]=i,e=!1;break}e&&n.push(i)}else n=[],n.push(i);ne("edited-desc-data",JSON.stringify(n))}}if(J+="]",X+="]",""!==z)try{ae();const e=G?await Object(i.e)(x,'\n mutation {\n updateCartItems(input: { cart_id: "'.concat(z,'", cart_items: ').concat(X," }) {\n cart {\n id\n }\n }\n }")):await Object(i.e)(x,'mutation {\n addProductsToCart(\n cartId: "'.concat(z,'"\n cartItems: ').concat(J,"\n )\n {\n cart {\n id\n }\n }\n }\n "));let t;return G?(t=e.data.data.updateCartItems.cart.id,oe("edit-cart-data-quantity-list"),oe("edit-cart-data-uid-list"),oe("edit-cart-data"),oe("editCart"),oe("editDoorIndex")):(t=e.data.data.addProductsToCart.cart.id,oe("design-door"),oe("confi-style"),oe("confi-size"),oe("startingPrices"),oe("doorPricing"),oe("desc-data"),oe("marginPrices"),sessionStorage.removeItem("pdfClicked"),oe("base0"),oe("base1"),oe("base2"),oe("base3"),oe("coll0"),oe("coll1"),oe("coll2"),oe("coll3"),oe("file0"),oe("file1"),oe("file2"),oe("file3")),ne("hasCartUpdated","true"),I&&(window.location.href=I),t}catch(P){var O,k,_,C;if(console.error(P),pt(null===P||void 0===P||null===(O=P.data)||void 0===O||null===(k=O.errors[0])||void 0===k?void 0:k.message))le(x,qe,e);else if((null===P||void 0===P||null===(_=P.data)||void 0===_||null===(C=_.errors[0])||void 0===C?void 0:C.message.indexOf("Requested product doesn't exist"))>-1){var j;null===(j=document.getElementById("collection-unavailable-popup"))||void 0===j||j.click()}else{var T;if(e.popupErrorLinkId)null===(T=document.getElementById(e.popupErrorLinkId))||void 0===T||T.click()}throw P}finally{se()}}catch(P){throw console.error("error->"+P),P}finally{se()}},Qe=(e,t,n,r,o)=>{const i=re("design-door"),a=JSON.parse(i),s=re("doorPricing"),c=JSON.parse(s),l=re("marginPrices"),u=JSON.parse(l),d=JSON.parse(re("confi-style")||"[]"),h=re("desc-data")||"[]",f=JSON.parse(h),{quantityArray:p,mergedList:m}=Je({parseData:a,isHomeownerSite:"true"===re("isHomeownerSite")});qe({cartId:e,apiURL:t,url:n,imageRootPath:r,parseDoor:m,descData:f,parsePrice:c,parseMar:u,popupErrorLinkId:o,confiStyle:d,quantityArray:p})},et=(e,t)=>{const n=new Date("".concat(e).concat(t?" UTC":"")),r=n.getHours(),o=n.getMinutes();return(r%12||12)+":"+(o<10?"0"+o:o)+(r<12?"AM":"PM")},tt=e=>{const t=JSON.parse(e),n=(new Date).getTime();return t.forEach((e,r)=>{if(e.time){const o=new Date(e.time).getTime();(n-o)/6e4>60&&t.splice(r,1)}}),t},nt=e=>e.reduce((e,t)=>{var n;return e+((null===t||void 0===t||null===(n=t.amount)||void 0===n?void 0:n.value)||0)},0),rt=()=>[{text:"10",value:"10"},{text:"15",value:"15"},{text:"20",value:"20"},{text:"25",value:"25"},{text:"50",value:"50"}],ot=e=>{const t=[],n="true"===re("isHomeownerSite")?"homeowner":"dealer";return e.forEach(e=>{e.key===n&&"object"===typeof e.value?Object.entries(e.value).forEach(e=>{let[n,r]=e;t.push({key:n,value:r})}):"string"===typeof e.value&&"low_head_room"!==e.key&&t.push(e)}),t},it=(e,t)=>{const n=re("design-door")||"[]",o=JSON.parse(n).map(e=>{const t=Object(r.a)({},e);return delete t.collection,delete t.color,delete t.construction,delete t.glass,delete t.hardware,delete t.hints,delete t.panel,delete t.windowdesign,delete t.windowplacement,t});return{designDoor:JSON.stringify(o),confiStyle:re("confi-style"),doorPricing:re("doorPricing"),confiSize:re("confi-size"),installationTypeList:e,doorImageArray:t}},at=e=>{const{currencySymbol:t}=e,n=e.configuration.designDoor,r=e.configuration.confiStyle,o=e.configuration.doorPricing,i=e.configuration.installationTypeList,a=e.configuration.doorImageArray,s=n?JSON.parse(n):null,c=r?JSON.parse(r):null,l=o?JSON.parse(o):null;return((e,t,n,r,o,i,a)=>{const{collectionsArray:s=[],sizeArray:c=[],imagesArray:l=[],installationTypeArray:u=[],indexArray:d=[],pricesArray:h=[],quantityArray:f=[],mergedList:p=[]}=Je({parseData:[...e],imagesArray:[...n],installationTypeArray:[...a],collectionsArray:[...r],pricesArray:[...i],sizeArray:[...o],isHomeownerSite:"true"===re("isHomeownerSite")});return p.map((e,n)=>{var r,o,i,a,p,m,g,b,v,y;return{quantity:f[n],doorNumber:d[n],imageUrl:l[n],price:{label:"".concat(t).concat(ke(h[n])),value:h[n]},heightFeet:(null===(r=c[n])||void 0===r||null===(o=r.height)||void 0===o?void 0:o.feet)||"",heightInches:(null===(i=c[n])||void 0===i||null===(a=i.height)||void 0===a?void 0:a.inch)||"",widthFeet:(null===(p=c[n])||void 0===p||null===(m=p.width)||void 0===m?void 0:m.feet)||"",widthInches:(null===(g=c[n])||void 0===g||null===(b=g.width)||void 0===b?void 0:b.inch)||"",brand:{label:"Amarr",value:e.selectedCollection},collection:{label:e.selectedCollectionLabel,value:e.selectedCollectionLabel,redirectionUrl:s[n]},construction:{label:e.selectedConstructionLabel,value:e.selectedConstructionLabel},color:{label:e.selectedColor,value:e.selectedColor},windload:{label:e.winloadLabel,value:e.selectedWindload},design:{label:e.selectedPanel,value:e.selectedPanel},windowPlacement:{label:e.selectedWindowPlacement,value:e.selectedWindowPlacement},glassType:{label:e.selectedGlass,value:e.selectedGlass},hardware:{label:e.selectedHardwareValue,value:e.selectedHardwareValue},clavos:{label:"",value:""},notes:{label:"",value:""},doorLock:{label:e.selectedDoorLock,value:e.selectedDoorLock},doorSeal:{label:e.selectedDoorSealLabel,value:e.selectedDoorSeal},opener:{label:e.selectedDoorOpenerLabel,value:e.selectedDoorOpener},lowHeadroom:{label:ze(e.selectedHeadroom),value:e.selectedHeadroom},hardwareUpgrade:{label:e.selectedhardwareUpgrade,value:e.selectedhardwareUpgrade},installationType:{label:null===(v=u[n])||void 0===v?void 0:v.label,value:null===(y=u[n])||void 0===y?void 0:y.value}}})})(s,t,a,null===c||void 0===c?void 0:c.map(e=>{var t;return(null===e||void 0===e||null===(t=e.selectedCollection)||void 0===t?void 0:t.url)||""}),null===c||void 0===c?void 0:c.map(e=>({height:(null===e||void 0===e?void 0:e.height)||{},width:(null===e||void 0===e?void 0:e.width)||{},headroom:(null===e||void 0===e?void 0:e.headroom)||"",sideroom:e.sideroom||{},backroom:e.backroom||{}})),l,i)},st=e=>{const t={},n="true"===re("isHomeownerSite")?"homeowner":"dealer";for(const[r,o]of Object.entries(e))r===n&&"object"===typeof e[r]?Object.entries(e[r]).forEach(e=>{let[n,r]=e;t["".concat(n)]=r}):"string"===typeof e[r]&&(t["".concat(r)]=e[r]);return t},ct=e=>{let t=!1;return e.forEach(e=>{"isAccessory"===e.key&&!0===e.value&&(t=!0)}),t},lt=e=>{let t=!1;return e.forEach(e=>{"isOpener"===e.key&&!0===e.value&&(t=!0)}),t},ut=["collection","image","Brand","DIY","Price","Labour_charge","Quantity","low_head_room","HardwareImage","WinloadDrawingNumber","Garage Door Opener Image Path","Garage Door Opener Item Number","Garage Door Opener Laborcost","Door Style","isMosaicSupported","Windload","Garage Door Opener","Garage Door Accessory","Garage Door Accessory Price","Door Collection","Roller","Spring Type","Track Lift","Actual High Lift","Back Hang","Extra Struts","Construction","Perimeter Door Seal","High Cycle Springs","laborcost","accessory_name","accessory_sku","accessory_price","opener_brand","Window Design","Hinge Type","Horizontal Angle","Horizontal Radius","imapUsed"].map(e=>e.toLowerCase()),dt=[...ut,"Door Collection_"].map(e=>e.toLowerCase()),ht=["Door Collection","Construction"].map(e=>e.toLowerCase()),ft=(e,t)=>{let n="";if(t&&t.length>0)for(let r=0;r<t.length;r++)t[r].value===e&&(n=t[r].description);return n},pt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.includes("Could not find a cart with ID")||e.includes("The cart isn't active")};function mt(e,t){let n=t||"html",r=e;return n||(n="html"),"html"==n&&(r=function(e){let t,n,r,a,s=e,u="";const d=o(s,"&lt;!--","--&gt;",c,"W3HTMLCOMMENTPOS");s=d.rest;for(;s.indexOf("&lt;")>-1;)r="",t=s.indexOf("&lt;"),"&LT;STYLE"==s.substr(t,9).toUpperCase()&&(r="css"),"&LT;SCRIPT"==s.substr(t,10).toUpperCase()&&(r="javascript"),n=s.indexOf("&gt;",t),-1==n&&(n=s.length),u+=s.substring(0,t),u+=i(s.substring(t,n+4)),s=s.substr(n+4),"css"==r&&(n=s.indexOf("&lt;/style&gt;"),n>-1&&(u+=l(s.substring(0,n)),s=s.substr(n))),"javascript"==r&&(n=s.indexOf("&lt;/script&gt;"),n>-1&&(u+=f(s.substring(0,n)),s=s.substr(n)));for(s=u+s,a=0;a<d.arr.length;a++)s=s.replace("W3HTMLCOMMENTPOS",d.arr[a]);return s}(r)),"css"==n&&(r=l(r)),"js"==n&&(r=f(r)),r;function o(e,t,n,r,o){let i,a,s="";const c=[];for(;e.search(t)>-1;)i=e.search(t),a=e.indexOf(n,i),-1==a&&(a=e.length),o?(c.push(r(e.substring(i,a+n.length))),e=e.substring(0,i)+o+e.substr(a+n.length)):(s+=e.substring(0,i),s+=r(e.substring(i,a+n.length)),e=e.substr(a+n.length));return{rest:s+e,arr:c}}function i(e){let t,n,r,o=e,i="";for(;o.search(/(\s|<br>)/)>-1;)t=o.search(/(\s|<br>)/),n=o.indexOf("&gt;"),-1==n&&(n=o.length),i+=o.substring(0,t),i+=a(o.substring(t,n)),o=o.substr(n);return r=i+o,r="<span style=color:grey>&lt;</span>"+r.substring(4),"&gt;"==r.substr(r.length-4,4)&&(r=r.substring(0,r.length-4)+"<span style=color:grey>&gt;</span>"),"<span style=color:#a10d5f>"+r+"</span>"}function a(e){let t,n,r,o,i,a=e,c="";for(;a.indexOf("=")>-1;)n=-1,t=a.indexOf("="),r=a.indexOf("'",t),o=a.indexOf('"',t),i=a.indexOf(" ",t+2),i>-1&&(i<r||-1==r)&&(i<o||-1==o)?n=a.indexOf(" ",t):o>-1&&(o<r||-1==r)&&(o<i||-1==i)?n=a.indexOf('"',a.indexOf('"',t)+1):r>-1&&(r<o||-1==o)&&(r<i||-1==i)&&(n=a.indexOf("'",a.indexOf("'",t)+1)),(!n||-1==n||n<t)&&(n=a.length),c+=a.substring(0,t),c+=s(a.substring(t,n+1)),a=a.substr(n+1);return"<span style=color:green>"+c+a+"</span>"}function s(e){return"<span style=color:#1c8a9c>"+e+"</span>"}function c(e){return"<span style=color:green>"+e+"</span>"}function l(e){let t,n,r,i,a,s,l=e,d="";const h=o(l,/\/\*/,"*/",c,"W3CSSCOMMENTPOS");for(l=h.rest;l.search("{")>-1;){for(t=l.search("{"),i=l.substr(t+1),s=1,a=0,r=0;r<i.length&&("{"==i.substr(r,1)&&(s++,a++),"}"==i.substr(r,1)&&s--,0!=s);r++);for(0!=s&&(a=0),n=t,r=0;r<=a;r++)n=l.indexOf("}",n+1);-1==n&&(n=l.length),d+=l.substring(0,t+1),d+=u(l.substring(t+1,n)),l=l.substr(n)}for(l=d+l,l=l.replace(/{/g,"<span style=color:grey>{</span>"),l=l.replace(/}/g,"<span style=color:grey>}</span>"),r=0;r<h.arr.length;r++)l=l.replace("W3CSSCOMMENTPOS",h.arr[r]);return"<span style=color:green>"+l+"</span>"}function u(e){let t,n,r,o,i=e,a="";if(i.indexOf("{")>-1)return l(i);for(;i.search(":")>-1;){for(t=i.search(":"),o=!0,r=t;1==o;)o=!1,n=i.indexOf(";",r),"&nbsp;"==i.substring(n-5,n+1)&&(o=!0,r=n+1);-1==n&&(n=i.length),a+=i.substring(0,t),a+=d(i.substring(t,n+1)),i=i.substr(n+1)}return"<span style=color:#a10d5f>"+a+i+"</span>"}function d(e){let t,n=e,r="";for(n="<span style=color:grey>:</span>"+n.substring(1);n.search(/!important/i)>-1;)t=n.search(/!important/i),r+=n.substring(0,t),r+=h(n.substring(t,t+10)),n=n.substr(t+10);let o=r+n;return";"==o.substr(o.length-1,1)&&"&nbsp;"!=o.substr(o.length-6,6)&&"&lt;"!=o.substr(o.length-4,4)&&"&gt;"!=o.substr(o.length-4,4)&&"&amp;"!=o.substr(o.length-5,5)&&(o=o.substring(0,o.length-1)+"<span style=color:grey>;</span>"),"<span style=color:black>"+o+"</span>"}function h(e){return"<span style=color:red;font-weight:bold;>"+e+"</span>"}function f(e){let t,n,r,o,i,a,s,l,u,d,h=e,f="",k="";const _=[];for(t=0;t<h.length;t++)n=h.substr(t,1),"\\"==n&&(_.push(h.substr(t,2)),n="W3JSESCAPE",t++),k+=n;h=k;for(;r=S(h,"'","'",p),o=S(h,'"','"',p),i=S(h,/\/\*/,"*/",c),a=S(h,/\/\//,"<br>",c),l=O(h,g),s=w("js",h,m),d=v(h,b),-1!=Math.max(l[0],r[0],o[0],i[0],a[0],s[0],d[0])&&(u=y(l,r,o,i,a,s,d),-1!=u[0]);)u[0]>-1&&(f+=h.substring(0,u[0]),f+=u[2](h.substring(u[0],u[1])),h=h.substr(u[1]));for(h=f+h,t=0;t<_.length;t++)h=h.replace("W3JSESCAPE",_[t]);return"<span style=color:black>"+h+"</span>"}function p(e){return"<span style=color:brown>"+e+"</span>"}function m(e){return"<span style=color:mediumblue>"+e+"</span>"}function g(e){return"<span style=color:red>"+e+"</span>"}function b(e){return"<span style=color:black>"+e+"</span>"}function v(e,t){let n,r,o,i;const a=[".","<"," ",";","(","+",")","[","]",",","&",":","{","}","/","-","*","|","%"],s=e.indexOf(".");if(s>-1)for(n=e.substr(s+1),o=0;o<n.length;o++){const e=n[o];for(r=0;r<a.length;r++)if(e.indexOf(a[r])>-1)return i=o,[s+1,i+s+1,t]}return[-1,-1,t]}function y(e,t,n,r,o,i,a){const s=[e,t,n,r,o,i,a];let c=s[0];for(const l of s)l[0]>-1&&(-1===c[0]||l[0]<c[0])&&(c=l);return c}function w(e,t,n){let r,o,i,a,s=-1,c=-1;for("js"==e&&(a=["abstract","arguments","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","eval","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","let","long","NaN","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with","yield"]),r=0;r<a.length;r++)o=t.indexOf(a[r]),o>-1&&(i=/\W/g,t.substr(o+a[r].length,1).match(i)&&t.substr(o-1,1).match(i)&&o>-1&&(-1==s||o<s)&&(s=o,c=s+a[r].length));return[s,c,n]}function S(e,t,n,r){let o;const i=e.search(t);return o=e.indexOf(n,i+n.length),-1==o&&(o=e.length),[i,o+n.length,r]}function O(e,t){const n=["<br>"," ",";","(","+",")","[","]",",","&",":","{","}","/","-","*","|","%","="];let r,o,i,a,s,c=0;for(r=0;r<e.length;r++)for(o=0;o<n.length;o++)if(i=e.substr(r,n[o].length),i==n[o]){if("-"==i&&("e"==e.substr(r-1,1)||"E"==e.substr(r-1,1)))continue;if(a=r,c<a&&(s=e.substring(c,a),!isNaN(s)))return[c,a,t];r+=n[o].length,c=r,r-=1;break}return[-1,-1,t]}}const gt=e=>{const t=[];e.arguments.split(",").forEach(e=>{e=e.indexOf(":")>-1?JSON.parse(e):e.replaceAll('"',"").trim(),t.push(e)}),window.gtag&&"function"===typeof window.gtag&&window.location.pathname==e.path&&window.gtag(...t)},bt=(e,t)=>{window.indexedDB.open("AmarrDB",10).onsuccess=n=>{n.target.result.transaction(["data"],"readwrite").objectStore("data").get(e).onsuccess=e=>{t(e)}}},vt=(e,t)=>{window.indexedDB.open("AmarrDB",10).onsuccess=function(n){const r=n.target.result;r.transaction(["data"],"readwrite").objectStore("data").add({key:e,value:t}).onsuccess=e=>{},r.close()}},yt=()=>{window.indexedDB.open("AmarrDB",10).onsuccess=function(e){e.target.result.transaction(["data"],"readwrite").objectStore("data").clear().onsuccess=e=>{console.info("db cleard")}}};let wt=0;const St=async()=>{const e=window.location.hostname.split("."),t=["dev","int","qa","qa2","stage"];try{const n=await fetch(a.a.csrfTokenURL,{method:"GET",headers:e.length>2&&e[0]&&t.includes(e[0])?{"Content-Type":"application/json"}:{}}),r=await n.json();return!r.token&&wt<2?(wt++,St()):r.token||""}catch(n){return console.error("There was a problem with fetching the token:",n),""}},Ot=()=>{const e=re("token")||"";if(e){const t=Object(s.default)(e);return(new Date).getTime()>1e3*t.exp}return!0}},10:function(e,t){e.exports=ReactDOM},11:function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",(function(){return r}))},12:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(4),o=n(0),i=n.n(o);const a=e=>{const{componentThemes:t,selectedTheme:n}=e.setter;return i.a.createElement(r.ThemeProvider,{theme:()=>{if(!n)return t.theme1;const e=n.match(/\d+/g).map(Number),r=Object.keys(t).find(n=>!(!Array.isArray(e)||1!==e.length)&&(n.includes(e[0])&&t[n]));return r?t["".concat(r)]:t.theme1}},e.children)};t.b=a},13:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(4),a=n(32),s=n.n(a);const c=Object(r.createContext)({});t.a=e=>{let t=!1;try{var n;t=(null===(n=document)||void 0===n?void 0:n.dir)&&"rtl"===document.dir.toLowerCase()||!1}catch(a){console.error(a)}const r=t?[s.a]:[];return o.a.createElement(i.StyleSheetManager,{stylisPlugins:r},o.a.createElement(c.Provider,{value:{rtl:t}},e.children))}},14:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n.n(r);const i=n(4).default.div.withConfig({displayName:"styles__Wrapper",componentId:"sc-1pdbosk-0"})(["box-sizing:border-box;width:100%;margin:0 auto;padding:",";max-width:",";"],e=>{let{padding:t}=e;return t?"0 var(--grid-margin);":0},e=>{let{maxWidth:t}=e;return"calc(var(--container-max-width)px + var(--grid-margin) + var(--grid-margin));"}),a=e=>{const{className:t,children:n,maxWidth:r=1520,padding:a=!0}=e;return o.a.createElement(i,{className:t,maxWidth:r,padding:a},n)};t.b=a},16:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(1);const o=()=>{Object(r.Nb)("user"),Object(r.Nb)("dealer"),Object(r.Nb)("expiry"),Object(r.Nb)("token"),Object(r.Nb)("childAccountList"),document.cookie="usertype=null; max-age=0;secure",Object(r.Nb)("primaryRole"),sessionStorage.removeItem("amarrRoles"),Object(r.Nb)("dealerMagentoToken"),Object(r.Nb)("currencySymbol"),Object(r.Nb)("dealerLocation"),Object(r.Nb)("dispatchLocationId")},i=()=>{var e;null===(e=document.getElementById("logout-message-popup"))||void 0===e||e.classList.add("show"),document.body.classList.add("modal-open"),setTimeout(()=>{var e;null===(e=document.getElementById("logout-message-popup"))||void 0===e||e.classList.remove("show"),document.body.classList.remove("modal-open"),o(),r.yb.next(!0)},5e3)}},183:function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(7),a=n.n(i);var s={theme1:{background:"var(--bg-main)"},theme2:{background:"var(--bg-alt)"}},c=n(11),l=n(4);function u(){const e=Object(c.a)(["\n \n "]);return u=function(){return e},e}const d=l.default.div.withConfig({displayName:"styles__Content",componentId:"sc-g32lcb-0"})(["",""],e=>{var t;(null===(t=e.gradients)||void 0===t?void 0:t.visible)?e.theme.gradient:e.theme;return Object(l.css)(u())});var h=n(12),f=n(13),p=n(14),m=n(1),g=n(78);const b=e=>{let{}=e;const{loginWithRedirect:t}=Object(g.useAuth0)();return Object(r.useEffect)(()=>{t()},[]),o.a.createElement(d,{isReversed:!1},"\xa0")};b.defaultProps={theme:""};var v=b;const y={configs:{dealerLoginDomainName:"",dealerLoginClientId:"",dealerLoginAudience:"",postLoginRedirectURI:"",logoutURI:""}},w=e=>{var t,n,r,i;const c=a()({},y,Object(m.h)(e.content));return o.a.createElement(h.a,{setter:{componentThemes:s,selectedTheme:e.theme}},o.a.createElement(f.a,null,o.a.createElement(p.a,null,o.a.createElement(d,{isReversed:!1},o.a.createElement(g.Auth0Provider,{domain:null===c||void 0===c||null===(t=c.configs)||void 0===t?void 0:t.dealerLoginDomainName,clientId:null===c||void 0===c||null===(n=c.configs)||void 0===n?void 0:n.dealerLoginClientId,authorizationParams:{audience:null===c||void 0===c||null===(r=c.configs)||void 0===r?void 0:r.dealerLoginAudience,redirect_uri:null===c||void 0===c||null===(i=c.configs)||void 0===i?void 0:i.postLoginRedirectURI}},o.a.createElement(v,null))))))};w.defaultProps={theme:"",content:""};t.a=w},19:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r={PowerReviewApi:"3783f7b5-5e6f-4da2-90ce-1a55c1fd02b2",Locale:"en_US",MerchantGroupId:"48814",ProductMerchantId:"445672",DealerMerchantId:"135036",csrfTokenURL:"/libs/granite/csrf/token.json"}},20:function(e,t,n){"use strict";var r=n(21),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var o=f(n);o&&o!==p&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),m=c(n),g=0;g<a.length;++g){var b=a[g];if(!i[b]&&(!r||!r[b])&&(!m||!m[b])&&(!s||!s[b])){var v=h(n,b);try{l(t,b,v)}catch(y){}}}}return t}},22:function(e,t,n){"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,"a",(function(){return i}));var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=r((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}))},26:function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<i.length;c++){var l=i[c];if(!s(l))return!1;var u=e[l],d=t[l];if(!1===(o=n?n.call(r,u,d,l):void 0)||void 0===o&&u!==d)return!1}return!0}},27:function(e,t,n){"use strict";t.a=function(e){function t(e,t,r){var o=t.trim().split(p);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var c=s=0;for(t=[];s<i;++s)for(var l=0;l<a;++l)t[c++]=n(e[l]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,i){var a=e+";",s=2*t+3*n+4*i;if(944===s){e=a.indexOf(":",9)+1;var c=a.substring(e,a.length-1).trim();return c=a.substring(0,e).trim()+c+";",1===x||2===x&&o(c,1)?"-webkit-"+c+c:c}if(0===x||2===x&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(c=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+c+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(t=(c=a.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=a.replace(y,"tb");break;case 232:c=a.replace(y,"tb-rl");break;case 220:c=a.replace(y,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+c+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(c=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(c,"-webkit-"+c)+";"+a.replace(c,"-ms-"+c+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return c=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+c+"-ms-flex-"+c+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(O,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(O,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===_.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,i).replace(":fill-available",":stretch"):a.replace(c,"-webkit-"+c)+a.replace(c,"-moz-"+c.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+i&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),N(2!==t?r:r.replace(k,"$1"),n,t)}function i(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(S," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,o,i,a,s,l,u){for(var d,h=0,f=t;h<A;++h)switch(d=E[h].call(c,e,f,n,r,o,i,a,s,l,u)){case void 0:case!1:case!0:case null:break;default:f=d}if(f!==t)return f}function s(e){return void 0!==(e=e.prefix)&&(N=null,e?"function"!==typeof e?x=1:(x=2,N=e):x=0),s}function c(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<A){var c=a(-1,n,s,s,T,j,0,0,0,0);void 0!==c&&"string"===typeof c&&(n=c)}var d=function e(n,s,c,d,h){for(var f,p,m,y,S,O=0,k=0,_=0,C=0,E=0,N=0,D=m=f=0,L=0,W=0,z=0,H=0,Z=c.length,U=Z-1,K="",M="",G="",J="";L<Z;){if(p=c.charCodeAt(L),L===U&&0!==k+C+_+O&&(0!==k&&(p=47===k?10:47),C=_=O=0,Z++,U++),0===k+C+_+O){if(L===U&&(0<W&&(K=K.replace(u,"")),0<K.trim().length)){switch(p){case 32:case 9:case 59:case 13:case 10:break;default:K+=c.charAt(L)}p=59}switch(p){case 123:for(f=(K=K.trim()).charCodeAt(0),m=1,H=++L;L<Z;){switch(p=c.charCodeAt(L)){case 123:m++;break;case 125:m--;break;case 47:switch(p=c.charCodeAt(L+1)){case 42:case 47:e:{for(D=L+1;D<U;++D)switch(c.charCodeAt(D)){case 47:if(42===p&&42===c.charCodeAt(D-1)&&L+2!==D){L=D+1;break e}break;case 10:if(47===p){L=D+1;break e}}L=D}}break;case 91:p++;case 40:p++;case 34:case 39:for(;L++<U&&c.charCodeAt(L)!==p;);}if(0===m)break;L++}switch(m=c.substring(H,L),0===f&&(f=(K=K.replace(l,"").trim()).charCodeAt(0)),f){case 64:switch(0<W&&(K=K.replace(u,"")),p=K.charCodeAt(1)){case 100:case 109:case 115:case 45:W=s;break;default:W=I}if(H=(m=e(s,W,m,p,h+1)).length,0<A&&(S=a(3,m,W=t(I,K,z),s,T,j,H,p,h,d),K=W.join(""),void 0!==S&&0===(H=(m=S.trim()).length)&&(p=0,m="")),0<H)switch(p){case 115:K=K.replace(w,i);case 100:case 109:case 45:m=K+"{"+m+"}";break;case 107:m=(K=K.replace(g,"$1 $2"))+"{"+m+"}",m=1===x||2===x&&o("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=K+m,112===d&&(M+=m,m="")}else m="";break;default:m=e(s,t(s,K,z),m,d,h+1)}G+=m,m=z=W=D=f=0,K="",p=c.charCodeAt(++L);break;case 125:case 59:if(1<(H=(K=(0<W?K.replace(u,""):K).trim()).length))switch(0===D&&(f=K.charCodeAt(0),45===f||96<f&&123>f)&&(H=(K=K.replace(" ",":")).length),0<A&&void 0!==(S=a(1,K,s,n,T,j,M.length,d,h,d))&&0===(H=(K=S.trim()).length)&&(K="\0\0"),f=K.charCodeAt(0),p=K.charCodeAt(1),f){case 0:break;case 64:if(105===p||99===p){J+=K+c.charAt(L);break}default:58!==K.charCodeAt(H-1)&&(M+=r(K,f,p,K.charCodeAt(2)))}z=W=D=f=0,K="",p=c.charCodeAt(++L)}}switch(p){case 13:case 10:47===k?k=0:0===1+f&&107!==d&&0<K.length&&(W=1,K+="\0"),0<A*R&&a(0,K,s,n,T,j,M.length,d,h,d),j=1,T++;break;case 59:case 125:if(0===k+C+_+O){j++;break}default:switch(j++,y=c.charAt(L),p){case 9:case 32:if(0===C+O+k)switch(E){case 44:case 58:case 9:case 32:y="";break;default:32!==p&&(y=" ")}break;case 0:y="\\0";break;case 12:y="\\f";break;case 11:y="\\v";break;case 38:0===C+k+O&&(W=z=1,y="\f"+y);break;case 108:if(0===C+k+O+P&&0<D)switch(L-D){case 2:112===E&&58===c.charCodeAt(L-3)&&(P=E);case 8:111===N&&(P=N)}break;case 58:0===C+k+O&&(D=L);break;case 44:0===k+_+C+O&&(W=1,y+="\r");break;case 34:case 39:0===k&&(C=C===p?0:0===C?p:C);break;case 91:0===C+k+_&&O++;break;case 93:0===C+k+_&&O--;break;case 41:0===C+k+O&&_--;break;case 40:if(0===C+k+O){if(0===f)switch(2*E+3*N){case 533:break;default:f=1}_++}break;case 64:0===k+_+C+O+D+m&&(m=1);break;case 42:case 47:if(!(0<C+O+_))switch(k){case 0:switch(2*p+3*c.charCodeAt(L+1)){case 235:k=47;break;case 220:H=L,k=42}break;case 42:47===p&&42===E&&H+2!==L&&(33===c.charCodeAt(H+2)&&(M+=c.substring(H,L+1)),y="",k=0)}}0===k&&(K+=y)}N=E,E=p,L++}if(0<(H=M.length)){if(W=s,0<A&&(void 0!==(S=a(2,M,W,n,T,j,H,d,h,d))&&0===(M=S).length))return J+M+G;if(M=W.join(",")+"{"+M+"}",0!==x*P){switch(2!==x||o(M,2)||(P=0),P){case 111:M=M.replace(v,":-moz-$1")+M;break;case 112:M=M.replace(b,"::-webkit-input-$1")+M.replace(b,"::-moz-$1")+M.replace(b,":-ms-input-$1")+M}P=0}}return J+M+G}(I,s,n,0,0);return 0<A&&(void 0!==(c=a(-2,d,s,s,T,j,d.length,0,0,0))&&(d=c)),"",P=0,j=T=1,d}var l=/^\0+/g,u=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,f=/([,: ])(transform)/g,p=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,v=/:(read-only)/g,y=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,O=/-self|flex-/g,k=/[^]*?(:[rp][el]a[\w-]+)[^]*/,_=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,j=1,T=1,P=0,x=1,I=[],E=[],A=0,N=null,R=0;return c.use=function e(t){switch(t){case void 0:case null:A=E.length=0;break;default:if("function"===typeof t)E[A++]=t;else if("object"===typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else R=0|!!t}return e},c.set=s,void 0!==e&&s(e),c}},28:function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},29:function(e,t,n){(function(e,n){var r="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",a="[object Map]",s="[object Set]",c=/\w*$/,l=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,d={};d[r]=d["[object Array]"]=d["[object ArrayBuffer]"]=d["[object DataView]"]=d["[object Boolean]"]=d["[object Date]"]=d["[object Float32Array]"]=d["[object Float64Array]"]=d["[object Int8Array]"]=d["[object Int16Array]"]=d["[object Int32Array]"]=d[a]=d["[object Number]"]=d["[object Object]"]=d["[object RegExp]"]=d[s]=d["[object String]"]=d["[object Symbol]"]=d["[object Uint8Array]"]=d["[object Uint8ClampedArray]"]=d["[object Uint16Array]"]=d["[object Uint32Array]"]=!0,d["[object Error]"]=d[o]=d["[object WeakMap]"]=!1;var h="object"==typeof e&&e&&e.Object===Object&&e,f="object"==typeof self&&self&&self.Object===Object&&self,p=h||f||Function("return this")(),m=t&&!t.nodeType&&t,g=m&&"object"==typeof n&&n&&!n.nodeType&&n,b=g&&g.exports===m;function v(e,t){return e.set(t[0],t[1]),e}function y(e,t){return e.add(t),e}function w(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function S(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function O(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function k(e,t){return function(n){return e(t(n))}}function _(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var C=Array.prototype,j=Function.prototype,T=Object.prototype,P=p["__core-js_shared__"],x=function(){var e=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),I=j.toString,E=T.hasOwnProperty,A=T.toString,N=RegExp("^"+I.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=b?p.Buffer:void 0,D=p.Symbol,L=p.Uint8Array,W=k(Object.getPrototypeOf,Object),z=Object.create,H=T.propertyIsEnumerable,Z=C.splice,U=Object.getOwnPropertySymbols,K=R?R.isBuffer:void 0,M=k(Object.keys,Object),G=me(p,"DataView"),J=me(p,"Map"),X=me(p,"Promise"),F=me(p,"Set"),V=me(p,"WeakMap"),B=me(Object,"create"),Y=we(G),$=we(J),q=we(X),Q=we(F),ee=we(V),te=D?D.prototype:void 0,ne=te?te.valueOf:void 0;function re(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ie(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ae(e){this.__data__=new oe(e)}function se(e,t){var n=Oe(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&ke(e)}(e)&&E.call(e,"callee")&&(!H.call(e,"callee")||A.call(e)==r)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=n.length,i=!!o;for(var a in e)!t&&!E.call(e,a)||i&&("length"==a||ve(a,o))||n.push(a);return n}function ce(e,t,n){var r=e[t];E.call(e,t)&&Se(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function le(e,t){for(var n=e.length;n--;)if(Se(e[n][0],t))return n;return-1}function ue(e,t,n,l,u,h,f){var p;if(l&&(p=h?l(e,u,h,f):l(e)),void 0!==p)return p;if(!je(e))return e;var m=Oe(e);if(m){if(p=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&E.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,p)}else{var g=be(e),b=g==o||g==i;if(_e(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if("[object Object]"==g||g==r||b&&!h){if(S(e))return h?e:{};if(p=function(e){return"function"!=typeof e.constructor||ye(e)?{}:(t=W(e),je(t)?z(t):{});var t}(b?{}:e),!t)return function(e,t){return fe(e,ge(e),t)}(e,function(e,t){return e&&fe(t,Te(t),e)}(p,e))}else{if(!d[g])return h?e:{};p=function(e,t,n,r){var o=e.constructor;switch(t){case"[object ArrayBuffer]":return he(e);case"[object Boolean]":case"[object Date]":return new o(+e);case"[object DataView]":return function(e,t){var n=t?he(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var n=t?he(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case a:return function(e,t,n){return w(t?n(O(e),!0):O(e),v,new e.constructor)}(e,r,n);case"[object Number]":case"[object String]":return new o(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,c.exec(e));return t.lastIndex=e.lastIndex,t}(e);case s:return function(e,t,n){return w(t?n(_(e),!0):_(e),y,new e.constructor)}(e,r,n);case"[object Symbol]":return i=e,ne?Object(ne.call(i)):{}}var i}(e,g,ue,t)}}f||(f=new ae);var k=f.get(e);if(k)return k;if(f.set(e,p),!m)var C=n?function(e){return function(e,t,n){var r=t(e);return Oe(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Te,ge)}(e):Te(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(C||e,(function(r,o){C&&(r=e[o=r]),ce(p,o,ue(r,t,n,l,o,e,f))})),p}function de(e){return!(!je(e)||(t=e,x&&x in t))&&(Ce(e)||S(e)?N:l).test(we(e));var t}function he(e){var t=new e.constructor(e.byteLength);return new L(t).set(new L(e)),t}function fe(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],s=r?r(n[a],e[a],a,n,e):void 0;ce(n,a,void 0===s?e[a]:s)}return n}function pe(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return de(n)?n:void 0}re.prototype.clear=function(){this.__data__=B?B(null):{}},re.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},re.prototype.get=function(e){var t=this.__data__;if(B){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return E.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return B?void 0!==t[e]:E.call(t,e)},re.prototype.set=function(e,t){return this.__data__[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this},oe.prototype.clear=function(){this.__data__=[]},oe.prototype.delete=function(e){var t=this.__data__,n=le(t,e);return!(n<0)&&(n==t.length-1?t.pop():Z.call(t,n,1),!0)},oe.prototype.get=function(e){var t=this.__data__,n=le(t,e);return n<0?void 0:t[n][1]},oe.prototype.has=function(e){return le(this.__data__,e)>-1},oe.prototype.set=function(e,t){var n=this.__data__,r=le(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ie.prototype.clear=function(){this.__data__={hash:new re,map:new(J||oe),string:new re}},ie.prototype.delete=function(e){return pe(this,e).delete(e)},ie.prototype.get=function(e){return pe(this,e).get(e)},ie.prototype.has=function(e){return pe(this,e).has(e)},ie.prototype.set=function(e,t){return pe(this,e).set(e,t),this},ae.prototype.clear=function(){this.__data__=new oe},ae.prototype.delete=function(e){return this.__data__.delete(e)},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this;n=this.__data__=new ie(r)}return n.set(e,t),this};var ge=U?k(U,Object):function(){return[]},be=function(e){return A.call(e)};function ve(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||u.test(e))&&e>-1&&e%1==0&&e<t}function ye(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||T)}function we(e){if(null!=e){try{return I.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Se(e,t){return e===t||e!==e&&t!==t}(G&&"[object DataView]"!=be(new G(new ArrayBuffer(1)))||J&&be(new J)!=a||X&&"[object Promise]"!=be(X.resolve())||F&&be(new F)!=s||V&&"[object WeakMap]"!=be(new V))&&(be=function(e){var t=A.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?we(n):void 0;if(r)switch(r){case Y:return"[object DataView]";case $:return a;case q:return"[object Promise]";case Q:return s;case ee:return"[object WeakMap]"}return t});var Oe=Array.isArray;function ke(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!Ce(e)}var _e=K||function(){return!1};function Ce(e){var t=je(e)?A.call(e):"";return t==o||t==i}function je(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Te(e){return ke(e)?se(e):function(e){if(!ye(e))return M(e);var t=[];for(var n in Object(e))E.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}n.exports=function(e){return ue(e,!0,!0)}}).call(this,n(35),n(51)(e))},30:function(e,t,n){var r;!function(){function o(e,t,n){return e.call.apply(e.bind,arguments)}function i(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function a(e,t,n){return(a=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?o:i).apply(null,arguments)}var s=Date.now||function(){return+new Date};function c(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var l=!!window.FontFace;function u(e,t,n,r){if(t=e.c.createElement(t),n)for(var o in n)n.hasOwnProperty(o)&&("style"==o?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return r&&t.appendChild(e.c.createTextNode(r)),t}function d(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function h(e){e.parentNode&&e.parentNode.removeChild(e)}function f(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),o=0;o<t.length;o+=1){for(var i=!1,a=0;a<r.length;a+=1)if(t[o]===r[a]){i=!0;break}i||r.push(t[o])}for(t=[],o=0;o<r.length;o+=1){for(i=!1,a=0;a<n.length;a+=1)if(r[o]===n[a]){i=!0;break}i||t.push(r[o])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function p(e,t){for(var n=e.className.split(/\s+/),r=0,o=n.length;r<o;r++)if(n[r]==t)return!0;return!1}function m(e,t,n){function r(){s&&o&&i&&(s(a),s=null)}t=u(e,"link",{rel:"stylesheet",href:t,media:"all"});var o=!1,i=!0,a=null,s=n||null;l?(t.onload=function(){o=!0,r()},t.onerror=function(){o=!0,a=Error("Stylesheet failed to load"),r()}):setTimeout((function(){o=!0,r()}),0),d(e,"head",t)}function g(e,t,n,r){var o=e.c.getElementsByTagName("head")[0];if(o){var i=u(e,"script",{src:t}),a=!1;return i.onload=i.onreadystatechange=function(){a||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(a=!0,n&&n(null),i.onload=i.onreadystatechange=null,"HEAD"==i.parentNode.tagName&&o.removeChild(i))},o.appendChild(i),setTimeout((function(){a||(a=!0,n&&n(Error("Script load timeout")))}),r||5e3),i}return null}function b(){this.a=0,this.c=null}function v(e){return e.a++,function(){e.a--,w(e)}}function y(e,t){e.c=t,w(e)}function w(e){0==e.a&&e.c&&(e.c(),e.c=null)}function S(e){this.a=e||"-"}function O(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function k(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function _(e){return e.a+e.f}function C(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function j(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function T(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new S("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function P(e){if(e.g){var t=p(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),f(e.f,n,r)}x(e,"inactive")}function x(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,_(n)):e.h[t]())}function I(){this.c={}}function E(e,t){this.c=e,this.f=t,this.a=u(this.c,"span",{"aria-hidden":"true"},this.f)}function A(e){d(e.c,"body",e.a)}function N(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+k(e.c)+";font-style:"+C(e)+";font-weight:"+e.f+"00;"}function R(e,t,n,r,o,i){this.g=e,this.j=t,this.a=r,this.c=n,this.f=o||3e3,this.h=i||void 0}function D(e,t,n,r,o,i,a){this.v=e,this.B=t,this.c=n,this.a=r,this.s=a||"BESbswy",this.f={},this.w=o||3e3,this.u=i||null,this.m=this.j=this.h=this.g=null,this.g=new E(this.c,this.s),this.h=new E(this.c,this.s),this.j=new E(this.c,this.s),this.m=new E(this.c,this.s),e=N(e=new O(this.a.c+",serif",_(this.a))),this.g.a.style.cssText=e,e=N(e=new O(this.a.c+",sans-serif",_(this.a))),this.h.a.style.cssText=e,e=N(e=new O("serif",_(this.a))),this.j.a.style.cssText=e,e=N(e=new O("sans-serif",_(this.a))),this.m.a.style.cssText=e,A(this.g),A(this.h),A(this.j),A(this.m)}S.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},R.prototype.start=function(){var e=this.c.o.document,t=this,n=s(),r=new Promise((function(r,o){!function i(){s()-n>=t.f?o():e.fonts.load(function(e){return C(e)+" "+e.f+"00 300px "+k(e.c)}(t.a),t.h).then((function(e){1<=e.length?r():setTimeout(i,25)}),(function(){o()}))}()})),o=null,i=new Promise((function(e,n){o=setTimeout(n,t.f)}));Promise.race([i,r]).then((function(){o&&(clearTimeout(o),o=null),t.g(t.a)}),(function(){t.j(t.a)}))};var L={D:"serif",C:"sans-serif"},W=null;function z(){if(null===W){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);W=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return W}function H(e,t,n){for(var r in L)if(L.hasOwnProperty(r)&&t===e.f[L[r]]&&n===e.f[L[r]])return!0;return!1}function Z(e){var t,n=e.g.a.offsetWidth,r=e.h.a.offsetWidth;(t=n===e.f.serif&&r===e.f["sans-serif"])||(t=z()&&H(e,n,r)),t?s()-e.A>=e.w?z()&&H(e,n,r)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?U(e,e.v):U(e,e.B):function(e){setTimeout(a((function(){Z(this)}),e),50)}(e):U(e,e.v)}function U(e,t){setTimeout(a((function(){h(this.g.a),h(this.h.a),h(this.j.a),h(this.m.a),t(this.a)}),e),0)}function K(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}D.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=s(),Z(this)};var M=null;function G(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&f(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),x(e,"active")):P(e.a))}function J(e){this.j=e,this.a=new I,this.h=0,this.f=this.g=!0}function X(e,t,n,r,o){var i=0==--e.h;(e.f||e.g)&&setTimeout((function(){var e=o||null,s=r||{};if(0===n.length&&i)P(t.a);else{t.f+=n.length,i&&(t.j=i);var c,l=[];for(c=0;c<n.length;c++){var u=n[c],d=s[u.c],h=t.a,p=u;if(h.g&&f(h.f,[h.a.c("wf",p.c,_(p).toString(),"loading")]),x(h,"fontloading",p),h=null,null===M)if(window.FontFace){p=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var m=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);M=p?42<parseInt(p[1],10):!m}else M=!1;h=M?new R(a(t.g,t),a(t.h,t),t.c,u,t.s,d):new D(a(t.g,t),a(t.h,t),t.c,u,t.s,e,d),l.push(h)}for(c=0;c<l.length;c++)l[c].start()}}),0)}function F(e,t){this.c=e,this.a=t}function V(e,t){this.c=e,this.a=t}function B(e,t){this.c=e||Y,this.a=[],this.f=[],this.g=t||""}K.prototype.g=function(e){var t=this.a;t.g&&f(t.f,[t.a.c("wf",e.c,_(e).toString(),"active")],[t.a.c("wf",e.c,_(e).toString(),"loading"),t.a.c("wf",e.c,_(e).toString(),"inactive")]),x(t,"fontactive",e),this.m=!0,G(this)},K.prototype.h=function(e){var t=this.a;if(t.g){var n=p(t.f,t.a.c("wf",e.c,_(e).toString(),"active")),r=[],o=[t.a.c("wf",e.c,_(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,_(e).toString(),"inactive")),f(t.f,r,o)}x(t,"fontinactive",e),G(this)},J.prototype.load=function(e){this.c=new c(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],o=n.timeout;!function(e){e.g&&f(e.f,[e.a.c("wf","loading")]),x(e,"loading")}(t);r=function(e,t,n){var r,o=[];for(r in t)if(t.hasOwnProperty(r)){var i=e.c[r];i&&o.push(i(t[r],n))}return o}(e.a,n,e.c);var i=new K(e.c,t,o);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load((function(t,n,r){X(e,i,t,n,r)}))}(this,new T(this.c,e),e)},F.prototype.load=function(e){var t=this,n=t.a.projectId,r=t.a.version;if(n){var o=t.c.o;g(this.c,(t.a.api||"https://fast.fonts.net/jsapi")+"/"+n+".js"+(r?"?v="+r:""),(function(r){r?e([]):(o["__MonotypeConfiguration__"+n]=function(){return t.a},function t(){if(o["__mti_fntLst"+n]){var r,i=o["__mti_fntLst"+n](),a=[];if(i)for(var s=0;s<i.length;s++){var c=i[s].fontfamily;void 0!=i[s].fontStyle&&void 0!=i[s].fontWeight?(r=i[s].fontStyle+i[s].fontWeight,a.push(new O(c,r))):a.push(new O(c))}e(a)}else setTimeout((function(){t()}),50)}())})).id="__MonotypeAPIScript__"+n}else e([])},V.prototype.load=function(e){var t,n,r=this.a.urls||[],o=this.a.families||[],i=this.a.testStrings||{},a=new b;for(t=0,n=r.length;t<n;t++)m(this.c,r[t],v(a));var s=[];for(t=0,n=o.length;t<n;t++)if((r=o[t].split(":"))[1])for(var c=r[1].split(","),l=0;l<c.length;l+=1)s.push(new O(r[0],c[l]));else s.push(new O(r[0]));y(a,(function(){e(s,i)}))};var Y="https://fonts.googleapis.com/css";function $(e){this.f=e,this.a=[],this.c={}}var q={latin:"BESbswy","latin-ext":"\xe7\xf6\xfc\u011f\u015f",cyrillic:"\u0439\u044f\u0416",greek:"\u03b1\u03b2\u03a3",khmer:"\u1780\u1781\u1782",Hanuman:"\u1780\u1781\u1782"},Q={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},ee={i:"i",italic:"i",n:"n",normal:"n"},te=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function ne(e,t){this.c=e,this.a=t}var re={Arimo:!0,Cousine:!0,Tinos:!0};function oe(e,t){this.c=e,this.a=t}function ie(e,t){this.c=e,this.f=t,this.a=[]}ne.prototype.load=function(e){var t=new b,n=this.c,r=new B(this.a.api,this.a.text),o=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var o=t[r].split(":");3==o.length&&e.f.push(o.pop());var i="";2==o.length&&""!=o[1]&&(i=":"),e.a.push(o.join(i))}}(r,o);var i=new $(o);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),o=r[0].replace(/\+/g," "),i=["n4"];if(2<=r.length){var a;if(a=[],s=r[1])for(var s,c=(s=s.split(",")).length,l=0;l<c;l++){var u;if((u=s[l]).match(/^[\w-]+$/))if(null==(h=te.exec(u.toLowerCase())))u="";else{if(u=null==(u=h[2])||""==u?"n":ee[u],null==(h=h[1])||""==h)h="4";else var d=Q[h],h=d||(isNaN(h)?"4":h.substr(0,1));u=[u,h].join("")}else u="";u&&a.push(u)}0<a.length&&(i=a),3==r.length&&(a=[],0<(r=(r=r[2])?r.split(","):a).length&&(r=q[r[0]])&&(e.c[o]=r))}for(e.c[o]||(r=q[o])&&(e.c[o]=r),r=0;r<i.length;r+=1)e.a.push(new O(o,i[r]))}}(i),m(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),v(t)),y(t,(function(){e(i.a,i.c,re)}))},oe.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?g(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",(function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],o=0;o<t.length;o+=2)for(var i=t[o],a=t[o+1],s=0;s<a.length;s++)r.push(new O(i,a[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(c){}e(r)}}),2e3):e([])},ie.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var o=0,i=n.fonts.length;o<i;++o){var a=n.fonts[o];r.a.push(new O(a.name,j("font-weight:"+a.weight+";font-style:"+a.style)))}e(r.a)},g(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",(function(t){t&&e([])}))):e([])};var ae=new J(window);ae.a.c.custom=function(e,t){return new V(t,e)},ae.a.c.fontdeck=function(e,t){return new ie(t,e)},ae.a.c.monotype=function(e,t){return new F(t,e)},ae.a.c.typekit=function(e,t){return new oe(t,e)},ae.a.c.google=function(e,t){return new ne(t,e)};var se={load:a(ae.load,ae)};void 0===(r=function(){return se}.call(t,n,t,e))||(e.exports=r)}()},31:function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")(),i=Object.prototype,a=0,s=i.toString,c=o.Symbol,l=c?c.prototype:void 0,u=l?l.toString:void 0;function d(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==s.call(e)}(e))return u?u.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}e.exports=function(e){var t,n=++a;return(null==(t=e)?"":d(t))+n}}).call(this,n(35))},32:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STYLIS_PROPERTY_CONTEXT=void 0;var r,o=n(40),i=(r=o)&&r.__esModule?r:{default:r};var a=t.STYLIS_PROPERTY_CONTEXT=-1;function s(e,t){if(e===a)return i.default.transform(t)}Object.defineProperty(s,"name",{value:"stylisRTLPlugin"}),t.default=s},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return K}));var r=n(0),o=n.n(r),i=n(10),a=n.n(i),s=n(29),c=n.n(s);const l=e=>{const t=e.targetElement;return Object(i.createPortal)(e.children,t)},u=new WeakMap;var d=(e,t)=>new Proxy({open:null,closed:null},{get(n,r){if(u.get(e))return u.get(e);const i=(a={webComponent:e,mode:r,shadowChildren:t},e=>{const t=a.webComponent.shadowRoot||a.webComponent.attachShadow({mode:a.mode});return a.shadowChildren.forEach(e=>{t.appendChild(e)}),o.a.createElement(l,{targetElement:t},e.children)});var a;return u.set(e,i),i}});const h=Object(r.createContext)(()=>{}),f=h.Provider;h.Consumer;var p=e=>(t,n,r)=>e(t,n,r);var m=(e,t,r)=>{if(null===t||void 0===t?void 0:t.find(e=>"styled-components"===e.name))try{const{StyleSheetManager:e}=n(4),t=document.createElement("span");return t.id="direflow_styled-components-styles",[o.a.createElement(e,{target:t},r),t]}catch(i){console.error("Could not load styled-components. Did you remember to install styled-components?")}};const g=e=>{b(e,document.head)||document.head.append(e)},b=(e,t)=>{const n=t.children;return Array.from(n).some(t=>e.isEqualNode(t))};var v=(e,t,n)=>{var r;const o=null===t||void 0===t?void 0:t.find(e=>"external-loader"===e.name),i=null===(r=null===o||void 0===o?void 0:o.options)||void 0===r?void 0:r.paths;if(!i||!i.length||!n)return;const a=[],s=[];i.forEach(e=>{const t="string"===typeof e?e:e.src,n="string"!==typeof e&&e.async,r="string"===typeof e?void 0:e.useHead;if(t.endsWith(".js")){const e=document.createElement("script");e.src=t,e.async=!!n,void 0===r||r?e.setAttribute("use-head","true"):e.setAttribute("use-head","false"),a.push(e)}if(t.endsWith(".css")){const e=document.createElement("link");e.rel="stylesheet",e.href=t,r?e.setAttribute("use-head","true"):e.setAttribute("use-head","false"),s.push(e)}});const c=document.createElement("span");return c.id="direflow_external-sources",window.externalSourcesLoaded||(window.externalSourcesLoaded={}),a.forEach(e=>{"true"===e.getAttribute("use-head")?g(e):c.appendChild(e),window.externalSourcesLoaded[e.src]={state:"loading"},e.addEventListener("load",()=>{var t,n;window.externalSourcesLoaded[e.src].state="completed",null===(n=(t=window.externalSourcesLoaded[e.src]).callback)||void 0===n||n.call(t)})}),s.forEach(e=>{"true"===e.getAttribute("use-head")?g(e):c.appendChild(e),window.externalSourcesLoaded[e.href]={state:"loading"},e.addEventListener("load",()=>{var t,n;window.externalSourcesLoaded[e.href].state="completed",null===(n=(t=window.externalSourcesLoaded[e.href]).callback)||void 0===n||n.call(t)})}),[n,c]},y=n(30),w=n.n(y);let S=!1;var O=(e,t)=>{if(S)return;const n=null===t||void 0===t?void 0:t.find(e=>"font-loader"===e.name);(null===n||void 0===n?void 0:n.options)&&(w.a.load(n.options),S=!0)};var k=(e,t,n)=>{var r;const o=null===t||void 0===t?void 0:t.find(e=>"icon-loader"===e.name);if(n&&(null===(r=null===o||void 0===o?void 0:o.options)||void 0===r?void 0:r.packs.includes("material-icons"))){const e=document.createElement("link");e.rel="stylesheet",e.href="https://fonts.googleapis.com/icon?family=Material+Icons";const t=document.createElement("span");return t.id="direflow_material-icons",t.appendChild(e),[n,t]}},_=n(31),C=n.n(_);const j=new WeakMap;var T=(e,t,r)=>{if(null===t||void 0===t?void 0:t.find(e=>"material-ui"===e.name))try{const{create:t}=n(!function(){var e=new Error("Cannot find module 'jss'");throw e.code="MODULE_NOT_FOUND",e}()),{jssPreset:i,StylesProvider:a,createGenerateClassName:s}=n(!function(){var e=new Error("Cannot find module '@material-ui/core/styles'");throw e.code="MODULE_NOT_FOUND",e}()),c=C()("".concat(e.tagName.toLowerCase(),"-")),l=document.createElement("span");let u;return l.id="direflow_material-ui-styles",j.has(e)?u=j.get(e):(u=t(Object.assign(Object.assign({},i()),{insertionPoint:l})),j.set(e,u)),[o.a.createElement(a,{jss:u,sheetsManager:new Map,generateClassName:s({seed:c})},r),l]}catch(i){console.error("Could not load Material-UI. Did you remember to install @material-ui/core?")}};var P=[p(O),p(k),p(v),p(m),p(T)];var x=e=>{if(""===e)return!0;if("true"===e||"false"===e)return"true"===e;try{return JSON.parse(e.replace(/'/g,'"'))}catch(t){return e}};var I=class{constructor(e,t,n,r,o,i){this.componentProperties=e,this.rootComponent=t,this.shadow=n,this.anonymousSlot=r,this.plugins=o,this.connectCallback=i,this.componentAttributes={},this.reflectPropertiesToAttributes()}reflectPropertiesToAttributes(){Object.entries(this.componentProperties).forEach(e=>{let[t,n]=e;"number"!==typeof n&&"string"!==typeof n&&"boolean"!==typeof n||(this.componentAttributes[t.toLowerCase()]={property:t,value:n})})}create(){const e=this;return class extends HTMLElement{constructor(){super(),this.initialProperties=c()(e.componentProperties),this.properties={},this.hasConnected=!1,this.eventDispatcher=e=>{this.dispatchEvent(e)},this.transferInitialProperties(),this.subscribeToProperties()}static get observedAttributes(){return Object.keys(e.componentAttributes)}connectedCallback(){var t;this.mountReactApp({initial:!0}),this.hasConnected=!0,null===(t=e.connectCallback)||void 0===t||t.call(e,this)}attributeChangedCallback(t,n,r){if(!this.hasConnected)return;if(n===r)return;if(!e.componentAttributes.hasOwnProperty(t))return;const o=e.componentAttributes[t].property;this.properties[o]=x(r),this.mountReactApp()}propertyChangedCallback(e,t,n){this.hasConnected&&t!==n&&(this.properties[e]=n,this.mountReactApp())}disconnectedCallback(){a.a.unmountComponentAtNode(this)}subscribeToProperties(){const e={};Object.keys(this.initialProperties).forEach(t=>{e[t]={configurable:!0,enumerable:!0,get:()=>this.properties.hasOwnProperty(t)?this.properties[t]:this.initialProperties[t],set:e=>{const n=this.properties.hasOwnProperty(t)?this.properties[t]:this.initialProperties[t];this.propertyChangedCallback(t,n,e)}}}),Object.defineProperties(this,e)}syncronizePropertiesAndAttributes(){Object.keys(this.initialProperties).forEach(e=>{this.properties.hasOwnProperty(e)||(null===this.getAttribute(e)?this.properties[e]=this.initialProperties[e]:this.properties[e]=x(this.getAttribute(e)))})}transferInitialProperties(){Object.keys(this.initialProperties).forEach(e=>{this.hasOwnProperty(e)&&(this.properties[e]=this[e])})}applyPlugins(t){const n=[];return[P.reduce((t,r)=>{const o=r(this,e.plugins,t);if(!o)return t;const[i,a]=o;return a&&n.push(a),i},t),n]}reactProps(){return this.syncronizePropertiesAndAttributes(),this.properties}mountReactApp(t){const n=e.anonymousSlot?o.a.createElement("slot"):void 0,r=o.a.createElement(f,{value:this.eventDispatcher},o.a.createElement(e.rootComponent,this.reactProps(),n)),[i,s]=this.applyPlugins(r);if(!e.shadow)return void a.a.render(i,this);let c;(null===t||void 0===t?void 0:t.initial)&&(c=Array.from(this.children).map(e=>e.cloneNode(!0)));const l=d(this,s);a.a.render(o.a.createElement(l.open,null,i),this),c&&c.forEach(e=>this.append(e))}}}};var E=(e,t)=>new Promise((n,r)=>{const o=document.createElement("script");o.async=!0,o.src=e,window[t]||(window[t]=[]);const i=window[t].find(e=>e.script.isEqualNode(o));if(i)return i.hasLoaded&&n(),void i.script.addEventListener("load",()=>n());const a={script:o,hasLoaded:!1};window[t].push(a),o.addEventListener("load",()=>{a.hasLoaded=!0,n()}),o.addEventListener("error",()=>r(new Error("Polyfill failed to load"))),document.head.appendChild(o)}),A=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let N=!1;const R="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2.4.1/bundles/webcomponents-sd.js",D="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2.4.1/bundles/webcomponents-ce.js",L="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.4.1/custom-elements-es5-adapter.js";var W=(e,t)=>A(void 0,void 0,void 0,(function*(){var n,r,o,i,a,s;if(N)return;const c=[];let l="",u="",d="";const h=null===t||void 0===t?void 0:t.find(e=>"polyfill-loader"===e.name);h&&console.warn("polyfill-loader plugin is deprecated. Use direflow-config.json instead.\nSee more: https://direflow.io/configuration");const f=null!==(n="/etc.clientlibs/amarr/clientlibs/webcomponents/amarr-wc-dependencies/resources/_c.webcomponents-sd.js")?n:null===(r=null===h||void 0===h?void 0:h.options)||void 0===r?void 0:r.use.sd,p=null!==(o="/etc.clientlibs/amarr/clientlibs/webcomponents/amarr-wc-dependencies/resources/_d.webcomponents-ce.js")?o:null===(i=null===h||void 0===h?void 0:h.options)||void 0===i?void 0:i.use.ce,m=null!==(a="/etc.clientlibs/amarr/clientlibs/webcomponents/amarr-wc-dependencies/resources/_e.custom-elements-es5-adapter.js")?a:null===(s=null===h||void 0===h?void 0:h.options)||void 0===s?void 0:s.use.adapter,g=!1===f,b=!1===p,v=!1===m;f&&(l="string"===typeof f?f:R),p&&(u="string"===typeof p?p:D),m&&(d="string"===typeof m?m:L),e.usesShadow&&!g&&c.push(E(l||R,"wcPolyfillsLoaded")),b||c.push(E(u||D,"wcPolyfillsLoaded")),v||c.push(E(d||L,"wcPolyfillsLoaded"));try{yield Promise.all(c),N=!0}catch(y){console.error(y)}})),z=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))};let H;const Z=e=>{null===H||void 0===H||H(e)};class U{static createAll(e){return e.map(U.create)}static create(e){const{component:t}=e,n=t.plugins||e.plugins,r=t.configuration||e.configuration;if(!t)throw Error("Root component has not been set");if(!r)throw Error("No configuration found");const o=Object.assign(Object.assign(Object.assign({},null===e||void 0===e?void 0:e.properties),t.properties),t.defaultProps),i=r.tagname||"direflow-component",a=void 0===r.useShadow||r.useShadow,s=void 0!==r.useAnonymousSlot&&r.useAnonymousSlot;return(()=>{z(this,void 0,void 0,(function*(){yield Promise.all([W({usesShadow:!!a},n)]);const e=new I(o,t,a,s,n,Z).create();customElements.define(i,e)}))})(),{then:e=>z(this,void 0,void 0,(function*(){e&&(H=e)}))}}}var K=U;n(38);r.Component},37:function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],u=!1,d=-1;function h(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=s(h);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||u||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},4:function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"ServerStyleSheet",(function(){return Ze})),n.d(t,"StyleSheetConsumer",(function(){return oe})),n.d(t,"StyleSheetContext",(function(){return re})),n.d(t,"StyleSheetManager",(function(){return ue})),n.d(t,"ThemeConsumer",(function(){return Ae})),n.d(t,"ThemeContext",(function(){return Ee})),n.d(t,"ThemeProvider",(function(){return Ne})),n.d(t,"__PRIVATE__",(function(){return Me})),n.d(t,"createGlobalStyle",(function(){return ze})),n.d(t,"css",(function(){return we})),n.d(t,"isStyledComponent",(function(){return w})),n.d(t,"keyframes",(function(){return He})),n.d(t,"useTheme",(function(){return Ke})),n.d(t,"version",(function(){return O})),n.d(t,"withTheme",(function(){return Ue}));var r=n(21),o=n(0),i=n.n(o),a=n(26),s=n.n(a),c=n(27),l=n(28),u=n(22),d=n(20),h=n.n(d);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var p=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},m=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!Object(r.typeOf)(e)},g=Object.freeze([]),b=Object.freeze({});function v(e){return"function"==typeof e}function y(e){return e.displayName||e.name||"Component"}function w(e){return e&&"string"==typeof e.styledComponentId}var S="undefined"!=typeof e&&void 0!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0})&&(Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_SC_ATTR||Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).SC_ATTR)||"data-styled",O="5.3.11",k="undefined"!=typeof window&&"HTMLElement"in window,_=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof e&&void 0!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0})&&(void 0!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_SC_DISABLE_SPEEDY&&""!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_SC_DISABLE_SPEEDY?"false"!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_SC_DISABLE_SPEEDY&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_SC_DISABLE_SPEEDY:void 0!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).SC_DISABLE_SPEEDY&&""!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).SC_DISABLE_SPEEDY&&("false"!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).SC_DISABLE_SPEEDY&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).SC_DISABLE_SPEEDY))),C={};function j(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var T=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&j(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=0,c=t.length;s<c;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),P=new Map,x=new Map,I=1,E=function(e){if(P.has(e))return P.get(e);for(;x.has(I);)I++;var t=I++;return P.set(e,t),x.set(t,e),t},A=function(e){return x.get(e)},N=function(e,t){t>=I&&(I=t+1),P.set(e,t),x.set(t,e)},R="style["+S+'][data-styled-version="5.3.11"]',D=new RegExp("^"+S+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},W=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,i=n.length;o<i;o++){var a=n[o].trim();if(a){var s=a.match(D);if(s){var c=0|parseInt(s[1],10),l=s[2];0!==c&&(N(l,c),L(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(a)}}},z=function(){return n.nc},H=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(S))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(S,"active"),r.setAttribute("data-styled-version","5.3.11");var a=z();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},Z=function(){function e(e){var t=this.element=H(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}j(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),U=function(){function e(e){var t=this.element=H(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),K=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),M=k,G={isServer:!k,useCSSOMInjection:!_},J=function(){function e(e,t,n){void 0===e&&(e=b),void 0===t&&(t={}),this.options=f({},G,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&k&&M&&(M=!1,function(e){for(var t=document.querySelectorAll(R),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(S)&&(W(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return E(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(f({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new K(o):r?new Z(o):new U(o),new T(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(E(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(E(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(E(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var i=A(o);if(void 0!==i){var a=e.names.get(i),s=t.getGroup(o);if(a&&s&&a.size){var c=S+".g"+o+'[id="'+i+'"]',l="";void 0!==a&&a.forEach((function(e){e.length>0&&(l+=e+",")})),r+=""+s+c+'{content:"'+l+'"}/*!sc*/\n'}}}return r}(this)},e}(),X=/(a)(d)/gi,F=function(e){return String.fromCharCode(e+(e>25?39:97))};function V(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=F(t%52)+n;return(F(t%52)+n).replace(X,"$1-$2")}var B=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y=function(e){return B(5381,e)};function $(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(v(n)&&!w(n))return!1}return!0}var q=Y("5.3.11"),Q=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&$(e),this.componentId=t,this.baseHash=B(q,t),this.baseStyle=n,J.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var i=ve(this.rules,e,t,n).join(""),a=V(B(this.baseHash,i)>>>0);if(!t.hasNameForId(r,a)){var s=n(i,"."+a,void 0,r);t.insertRules(r,a,s)}o.push(a),this.staticRulesId=a}else{for(var c=this.rules.length,l=B(this.baseHash,n.hash),u="",d=0;d<c;d++){var h=this.rules[d];if("string"==typeof h)u+=h;else if(h){var f=ve(h,e,t,n),p=Array.isArray(f)?f.join(""):f;l=B(l,p+d),u+=p}}if(u){var m=V(l>>>0);if(!t.hasNameForId(r,m)){var g=n(u,"."+m,void 0,r);t.insertRules(r,m,g)}o.push(m)}}return o.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function ne(e){var t,n,r,o,i=void 0===e?b:e,a=i.options,s=void 0===a?b:a,l=i.plugins,u=void 0===l?g:l,d=new c.a(s),h=[],f=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,c,l,u,d){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){h.push(e)})),p=function(e,r,i){return 0===r&&-1!==te.indexOf(i[n.length])||i.match(o)?e:"."+t};function m(e,i,a,s){void 0===s&&(s="&");var c=e.replace(ee,""),l=i&&a?a+" "+i+" { "+c+" }":c;return t=s,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),d(a||!i?"":i,l)}return d.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,p))},f,function(e){if(-2===e){var t=h;return h=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||j(15),B(e,t.name)}),5381).toString():"",m}var re=i.a.createContext(),oe=re.Consumer,ie=i.a.createContext(),ae=(ie.Consumer,new J),se=ne();function ce(){return Object(o.useContext)(re)||ae}function le(){return Object(o.useContext)(ie)||se}function ue(e){var t=Object(o.useState)(e.stylisPlugins),n=t[0],r=t[1],a=ce(),c=Object(o.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=Object(o.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return Object(o.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),i.a.createElement(re.Provider,{value:c},i.a.createElement(ie.Provider,{value:l},e.children))}var de=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=se);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return j(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=se),this.name+e.hash},e}(),he=/([A-Z])/,fe=/([A-Z])/g,pe=/^ms-/,me=function(e){return"-"+e.toLowerCase()};function ge(e){return he.test(e)?e.replace(fe,me).replace(pe,"-ms-"):e}var be=function(e){return null==e||!1===e||""===e};function ve(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)""!==(o=ve(e[a],t,n,r))&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}return be(e)?"":w(e)?"."+e.styledComponentId:v(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?e:ve(e(t),t,n,r):e instanceof de?n?(e.inject(n,r),e.getName(r)):e:m(e)?function e(t,n){var r,o,i=[];for(var a in t)t.hasOwnProperty(a)&&!be(t[a])&&(Array.isArray(t[a])&&t[a].isCss||v(t[a])?i.push(ge(a)+":",t[a],";"):m(t[a])?i.push.apply(i,e(t[a],a)):i.push(ge(a)+": "+(r=a,(null==(o=t[a])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in l.a||r.startsWith("--")?String(o).trim():o+"px")+";")));return n?[n+" {"].concat(i,["}"]):i}(e):e.toString();var c}var ye=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function we(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return v(e)||m(e)?ye(ve(p(g,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:ye(ve(p(e,n)))}new Set;var Se=function(e,t,n){return void 0===n&&(n=b),e.theme!==n.theme&&e.theme||t||n.theme},Oe=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ke=/(^-|-$)/g;function _e(e){return e.replace(Oe,"-").replace(ke,"")}var Ce=function(e){return V(Y(e)>>>0)};function je(e){return"string"==typeof e&&!0}var Te=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Pe=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function xe(e,t,n){var r=e[n];Te(t)&&Te(r)?Ie(r,t):e[n]=t}function Ie(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,i=n;o<i.length;o++){var a=i[o];if(Te(a))for(var s in a)Pe(s)&&xe(e,a[s],s)}return e}var Ee=i.a.createContext(),Ae=Ee.Consumer;function Ne(e){var t=Object(o.useContext)(Ee),n=Object(o.useMemo)((function(){return function(e,t){return e?v(e)?e(t):Array.isArray(e)||"object"!=typeof e?j(8):t?f({},t,{},e):e:j(14)}(e.theme,t)}),[e.theme,t]);return e.children?i.a.createElement(Ee.Provider,{value:n},e.children):null}var Re={};function De(e,t,n){var r=w(e),a=!je(e),s=t.attrs,c=void 0===s?g:s,l=t.componentId,d=void 0===l?function(e,t){var n="string"!=typeof e?"sc":_e(e);Re[n]=(Re[n]||0)+1;var r=n+"-"+Ce("5.3.11"+n+Re[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):l,p=t.displayName,m=void 0===p?function(e){return je(e)?"styled."+e:"Styled("+y(e)+")"}(e):p,S=t.displayName&&t.componentId?_e(t.displayName)+"-"+t.componentId:t.componentId||d,O=r&&e.attrs?Array.prototype.concat(e.attrs,c).filter(Boolean):c,k=t.shouldForwardProp;r&&e.shouldForwardProp&&(k=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var _,C=new Q(n,S,r?e.componentStyle:void 0),j=C.isStatic&&0===c.length,T=function(e,t){return function(e,t,n,r){var i=e.attrs,a=e.componentStyle,s=e.defaultProps,c=e.foldedComponentIds,l=e.shouldForwardProp,d=e.styledComponentId,h=e.target,p=function(e,t,n){void 0===e&&(e=b);var r=f({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,i,a=e;for(t in v(a)&&(a=a(r)),a)r[t]=o[t]="className"===t?(n=o[t],i=a[t],n&&i?n+" "+i:n||i):a[t]})),[r,o]}(Se(t,Object(o.useContext)(Ee),s)||b,t,i),m=p[0],g=p[1],y=function(e,t,n,r){var o=ce(),i=le();return t?e.generateAndInjectStyles(b,o,i):e.generateAndInjectStyles(n,o,i)}(a,r,m),w=n,S=g.$as||t.$as||g.as||t.as||h,O=je(S),k=g!==t?f({},t,{},g):t,_={};for(var C in k)"$"!==C[0]&&"as"!==C&&("forwardedAs"===C?_.as=k[C]:(l?l(C,u.a,S):!O||Object(u.a)(C))&&(_[C]=k[C]));return t.style&&g.style!==t.style&&(_.style=f({},t.style,{},g.style)),_.className=Array.prototype.concat(c,d,y!==d?y:null,t.className,g.className).filter(Boolean).join(" "),_.ref=w,Object(o.createElement)(S,_)}(_,e,t,j)};return T.displayName=m,(_=i.a.forwardRef(T)).attrs=O,_.componentStyle=C,_.displayName=m,_.shouldForwardProp=k,_.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):g,_.styledComponentId=S,_.target=r?e.target:e,_.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(je(e)?e:_e(y(e)));return De(e,f({},o,{attrs:O,componentId:i}),n)},Object.defineProperty(_,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ie({},e.defaultProps,t):t}}),Object.defineProperty(_,"toString",{value:function(){return"."+_.styledComponentId}}),a&&h()(_,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),_}var Le=function(e){return function e(t,n,o){if(void 0===o&&(o=b),!Object(r.isValidElementType)(n))return j(1,String(n));var i=function(){return t(n,o,we.apply(void 0,arguments))};return i.withConfig=function(r){return e(t,n,f({},o,{},r))},i.attrs=function(r){return e(t,n,f({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},i}(De,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Le[e]=Le(e)}));var We=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=$(e),J.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(ve(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&J.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=we.apply(void 0,[e].concat(n)),s="sc-global-"+Ce(JSON.stringify(a)),c=new We(a,s);function l(e){var t=ce(),n=le(),r=Object(o.useContext)(Ee),i=Object(o.useRef)(t.allocateGSInstance(s)).current;return t.server&&u(i,e,t,r,n),Object(o.useLayoutEffect)((function(){if(!t.server)return u(i,e,t,r,n),function(){return c.removeStyles(i,t)}}),[i,e,t,r,n]),null}function u(e,t,n,r,o){if(c.isStatic)c.renderStyles(e,C,n,o);else{var i=f({},t,{theme:Se(t,r,l.defaultProps)});c.renderStyles(e,i,n,o)}}return i.a.memo(l)}function He(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=we.apply(void 0,[e].concat(n)).join(""),i=Ce(o);return new de(i,o)}var Ze=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=z();return"<style "+[n&&'nonce="'+n+'"',S+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?j(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return j(2);var n=((t={})[S]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=z();return r&&(n.nonce=r),[i.a.createElement("style",f({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new J({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?j(2):i.a.createElement(ue,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return j(3)},e}(),Ue=function(e){var t=i.a.forwardRef((function(t,n){var r=Object(o.useContext)(Ee),a=e.defaultProps,s=Se(t,r,a);return i.a.createElement(e,f({},t,{theme:s,ref:n}))}));return h()(t,e),t.displayName="WithTheme("+y(e)+")",t},Ke=function(){return Object(o.useContext)(Ee)},Me={StyleSheet:J,masterSheet:ae};t.default=Le}.call(this,n(37))},40:function(e,t,n){var r;function o(e,t){var n=[],r=0;function o(e){return n.push(e),t}function i(){return n[r++]}return{tokenize:function(t){return t.replace(e,o)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),i)}}}r=new function(){var e="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",t="(?:[_a-z0-9-]|[^\\u0020-\\u007e]|"+e+")",n="(?:[0-9]*\\.[0-9]+|[0-9]+)(?:\\s*(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)|-?(?:[_a-z]|[^\\u0020-\\u007e]|(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f]))(?:[_a-z0-9-]|[^\\u0020-\\u007e]|(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f]))*)?",r="((?:-?"+n+")|(?:inherit|auto))",i="(#?"+t+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",a="(?:[!#$%&*-~]|[^\\u0020-\\u007e]|"+e+")*?",s="(?!("+t+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'])*?{)",c="(?!"+a+"['\"]?\\s*\\))",l="(?="+a+"['\"]?\\s*\\))",u="(\\s*(?:!important\\s*)?[;}])",d=new RegExp("`TMP`","g"),h=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),f=new RegExp("(\\/\\*\\!?\\s*@noflip\\s*\\*\\/"+s+"[^;}]+;?)","gi"),p=new RegExp("(\\/\\*\\!?\\s*@noflip\\s*\\*\\/[^\\}]*?})","gi"),m=new RegExp("(direction\\s*:\\s*)ltr","gi"),g=new RegExp("(direction\\s*:\\s*)rtl","gi"),b=new RegExp("(^|[^a-zA-Z])(left)(?![a-zA-Z])"+c+s,"gi"),v=new RegExp("(^|[^a-zA-Z])(right)(?![a-zA-Z])"+c+s,"gi"),y=new RegExp("(^|[^a-zA-Z])(left)"+l,"gi"),w=new RegExp("(^|[^a-zA-Z])(right)"+l,"gi"),S=new RegExp("(^|[^a-zA-Z])(ltr)"+l,"gi"),O=new RegExp("(^|[^a-zA-Z])(rtl)"+l,"gi"),k=new RegExp("(^|[^a-zA-Z])([ns]?)e-resize","gi"),_=new RegExp("(^|[^a-zA-Z])([ns]?)w-resize","gi"),C=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+r+"(\\s+)"+r+"(\\s+)"+r+"(\\s+)"+r+u,"gi"),j=new RegExp("((?:-color|border-style)\\s*:\\s*)"+i+"(\\s+)"+i+"(\\s+)"+i+"(\\s+)"+i+u,"gi"),T=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+n+")","gi"),P=new RegExp("(background-position-x\\s*:\\s*)(-?(?:[0-9]*\\.[0-9]+|[0-9]+)%)","gi"),x=new RegExp("(border-radius\\s*:\\s*)"+r+"(?:(?:\\s+"+r+")(?:\\s+"+r+")?(?:\\s+"+r+")?)?(?:(?:(?:\\s*\\/\\s*)"+r+")(?:\\s+"+r+")?(?:\\s+"+r+")?(?:\\s+"+r+")?)?"+u,"gi"),I=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+r,"gi"),E=new RegExp("(text-shadow\\s*:\\s*)"+r+"(\\s*)"+i,"gi"),A=new RegExp("(text-shadow\\s*:\\s*)"+i+"(\\s*)"+r,"gi"),N=new RegExp("(text-shadow\\s*:\\s*)"+r,"gi"),R=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+r+"(\\s*\\))","gi"),D=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+r+"((?:\\s*,\\s*"+r+"){0,2}\\s*\\))","gi");function L(e,t,n){var r,o;return"%"===n.slice(-1)&&(-1!==(r=n.indexOf("."))?(o=n.length-r-2,n=(n=100-parseFloat(n)).toFixed(o)+"%"):n=100-parseFloat(n)+"%"),t+n}function W(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function z(e,t){var n=[].slice.call(arguments),r=n.slice(2,6).filter((function(e){return e})),o=n.slice(6,10).filter((function(e){return e})),i=n[10]||"";return t+(o.length?W(r)+" / "+W(o):W(r))+i}function H(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function Z(e,t,n){return t+H(n)}function U(e,t,n,r,o){return t+n+H(r)+o}function K(e,t,n,r,o){return t+n+r+H(o)}return{transform:function(e,t){var n=new o(f,"`NOFLIP_SINGLE`"),r=new o(p,"`NOFLIP_CLASS`"),i=new o(h,"`COMMENT`");return e=i.tokenize(r.tokenize(n.tokenize(e.replace("`","%60")))),t.transformDirInUrl&&(e=e.replace(S,"$1`TMP`").replace(O,"$1ltr").replace(d,"rtl")),t.transformEdgeInUrl&&(e=e.replace(y,"$1`TMP`").replace(w,"$1left").replace(d,"right")),e=e.replace(m,"$1`TMP`").replace(g,"$1ltr").replace(d,"rtl").replace(b,"$1`TMP`").replace(v,"$1left").replace(d,"right").replace(k,"$1$2`TMP`").replace(_,"$1$2e-resize").replace(d,"w-resize").replace(x,z).replace(I,Z).replace(E,K).replace(A,K).replace(N,Z).replace(R,U).replace(D,U).replace(C,"$1$2$3$8$5$6$7$4$9").replace(j,"$1$2$3$8$5$6$7$4$9").replace(T,L).replace(P,L),e=n.detokenize(r.detokenize(i.detokenize(e)))}}},e.exports?t.transform=function(e,t,n){var o;return"object"===typeof t?o=t:(o={},"boolean"===typeof t&&(o.transformDirInUrl=t),"boolean"===typeof n&&(o.transformEdgeInUrl=n)),r.transform(e,o)}:"undefined"!==typeof window&&(window.cssjanus=r)},41:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){return new Promise((function(n,r){var o=document.createElement("script");o.async=!0,o.src=e,window[t]||(window[t]=[]);var i=window[t].find((function(e){return e.script.isEqualNode(o)}));if(i)return i.hasLoaded&&n(),void i.script.addEventListener("load",(function(){return n()}));var a={script:o,hasLoaded:!1};window[t].push(a),o.addEventListener("load",(function(){a.hasLoaded=!0,n()})),o.addEventListener("error",(function(){return r(new Error("Polyfill failed to load"))})),document.head.appendChild(o)}))}},5:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"a",(function(){return i}))},6:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"g",(function(){return d})),n.d(t,"f",(function(){return h})),n.d(t,"e",(function(){return f})),n.d(t,"a",(function(){return p}));var r=n(1),o=n(23),i=n(9);const a=()=>{const e=Object(r.ab)("token")||"";return"true"===Object(r.ab)("isHomeownerSite")?Object(r.ab)("homeownerMagentoToken")||e:("false"===Object(r.ab)("isHomeownerSite")&&Object(r.ab)("enableEcommerce"),Object(r.ab)("dealerMagentoToken")||e)},s=()=>{if(a()){const e=Object(o.default)(a());return(new Date).getTime()>1e3*e.exp}return!0},c=()=>!!a()&&!s(),l=()=>{const e=document.getElementById("link1");e?(e.click(),window.logOutPopupShown$.next(!0),setTimeout(()=>{const e=document.getElementById("close-logout-popup");null===e||void 0===e||e.click(),u()},5e3)):(u(),window.location.href="".concat(Object(r.ab)("loginPageUrl"),"?redirectTo=").concat(window.location.pathname).concat(window.location.search)||window.location.origin)},u=()=>{Object(r.Nb)("homeownerMagentoToken"),Object(r.Nb)("username"),Object(r.Nb)("email"),Object(r.Nb)("dealerMagentoToken"),Object(r.Nb)("product-fav"),Object(r.Nb)("designer-fav"),Object(r.Nb)("currencySymbol"),Object(r.Nb)("dealerLocation"),Object(r.Nb)("dispatchLocationId"),Object(r.Nb)("hocompanyDetails"),Object(r.Nb)("hasCartUpdated"),Object(r.Nb)("cartId"),Object(r.Nb)("shippingAddressId")},d=(e,t)=>{if(t)return Object(i.f)({url:e,method:"POST",headers:{"Content-type":"application/json",redirectOnTokenFailure:!1},body:JSON.stringify({query:t})})};function h(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=a();if(t)return Object(i.f)({url:e,method:"POST",headers:{Authorization:"Bearer "+o,"Content-type":"application/json",redirectOnTokenFailure:n},body:JSON.stringify({query:t})});Object(r.Mb)()}function f(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=a();if(t)return Object(i.f)({url:e,method:"POST",headers:{Authorization:"Bearer "+o,"Content-type":"application/json",redirectOnTokenFailure:n},body:JSON.stringify({query:t})});Object(r.Mb)()}const p=(e,t)=>{if(t)return Object(i.f)({url:e,method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify({query:t})});Object(r.Mb)()}},613:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=n(41).default,a="/etc.clientlibs/amarr/clientlibs/webcomponents/amarr-wc-dependencies/resources/_a.react.production.min.js",s="/etc.clientlibs/amarr/clientlibs/webcomponents/amarr-wc-dependencies/resources/_b.react-dom.production.min.js",c=function(){try{n(614)}catch(e){console.warn("File is not found: C:\\Users\\User\\MyWorkingSpace\\gw-esd-amarr-frontend\\src\\components\\organisms\\dealer-login\\index.tsx")}};setTimeout((function(){return r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return window.React&&window.ReactDOM?(c(),[2]):[4,r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,5,,6]),[4,i(a,"reactBundleLoaded")];case 1:t.sent(),t.label=2;case 2:return[4,i(s,"reactBundleLoaded")];case 3:t.sent(),t.label=4;case 4:return[3,6];case 5:return e=t.sent(),console.error(e),[3,6];case 6:return[2]}}))}))];case 1:t.sent(),t.label=2;case 2:return t.trys.push([2,4,,5]),[4,new Promise((function(e,t){var n=0,r=setInterval((function(){n>=2500&&t(new Error("Direflow Error: React & ReactDOM was unable to load")),window.React&&window.ReactDOM&&(clearInterval(r),e()),n+=1}))}))];case 3:return t.sent(),c(),[3,5];case 4:return e=t.sent(),console.error(e.message),[3,5];case 5:return[2]}}))}))}))},614:function(e,t,n){"use strict";n.r(t);var r=n(33),o=n(183);t.default=r.a.create({component:o.a,configuration:{tagname:"amarr-dealer-login",useShadow:!1},plugins:[]})},78:function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Auth0Context",(function(){return ue})),n.d(t,"Auth0Provider",(function(){return Se})),n.d(t,"AuthenticationError",(function(){return y})),n.d(t,"GenericError",(function(){return v})),n.d(t,"InMemoryCache",(function(){return H})),n.d(t,"LocalStorageCache",(function(){return z})),n.d(t,"MfaRequiredError",(function(){return k})),n.d(t,"MissingRefreshTokenError",(function(){return _})),n.d(t,"OAuthError",(function(){return de})),n.d(t,"PopupCancelledError",(function(){return O})),n.d(t,"PopupTimeoutError",(function(){return S})),n.d(t,"TimeoutError",(function(){return w})),n.d(t,"User",(function(){return ae})),n.d(t,"initialContext",(function(){return le})),n.d(t,"useAuth0",(function(){return Oe})),n.d(t,"withAuth0",(function(){return ke})),n.d(t,"withAuthenticationRequired",(function(){return Te}));var r=n(0),o=n.n(r),i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(l){i(l)}}function s(e){try{c(r.throw(e))}catch(l){i(l)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(l){s=[6,l],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function l(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"===typeof SuppressedError&&SuppressedError,"function"==typeof SuppressedError&&SuppressedError;var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{};function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function h(e,t){return e(t={exports:{}},t.exports),t.exports}var f=h((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var r=e.locked.get(t);void 0===r?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(r.unshift(n),e.locked.set(t,r))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise((function(n,r){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())}))},this.unlock=function(t){var n=e.locked.get(t);if(void 0!==n&&0!==n.length){var r=n.pop();e.locked.set(t,n),void 0!==r&&setTimeout(r,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();t.default=function(){return n.getInstance()}}));d(f);var p=d(h((function(e,t){var n=u&&u.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,s)}c((r=r.apply(e,t||[])).next())}))},r=u&&u.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},o=u;Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key",a={key:function(e){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},getItem:function(e){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},clear:function(){return n(o,void 0,void 0,(function(){return r(this,(function(e){return[2,window.localStorage.clear()]}))}))},removeItem:function(e){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},setItem:function(e,t){return n(o,void 0,void 0,(function(){return r(this,(function(e){throw new Error("Unsupported")}))}))},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function s(e){return new Promise((function(t){return setTimeout(t,e)}))}function c(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}var l=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+c(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,o){return void 0===o&&(o=5e3),n(this,void 0,void 0,(function(){var n,l,u,d,h,f,p;return r(this,(function(r){switch(r.label){case 0:n=Date.now()+c(4),l=Date.now()+o,u=i+"-"+t,d=void 0===this.storageHandler?a:this.storageHandler,r.label=1;case 1:return Date.now()<l?[4,s(30)]:[3,8];case 2:return r.sent(),null!==d.getItemSync(u)?[3,5]:(h=this.id+"-"+t+"-"+n,[4,s(Math.floor(25*Math.random()))]);case 3:return r.sent(),d.setItemSync(u,JSON.stringify({id:this.id,iat:n,timeoutKey:h,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return r.sent(),null!==(f=d.getItemSync(u))&&(p=JSON.parse(f)).id===this.id&&p.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(u,n),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?a:this.storageHandler),[4,this.waitForSomethingToChange(l)];case 6:r.sent(),r.label=7;case 7:return n=Date.now()+c(4),[3,1];case 8:return[2,!1]}}))}))},e.prototype.refreshLockWhileAcquired=function(e,t){return n(this,void 0,void 0,(function(){var o=this;return r(this,(function(i){return setTimeout((function(){return n(o,void 0,void 0,(function(){var n,o,i;return r(this,(function(r){switch(r.label){case 0:return[4,f.default().lock(t)];case 1:return r.sent(),this.acquiredIatSet.has(t)?(n=void 0===this.storageHandler?a:this.storageHandler,null===(o=n.getItemSync(e))?(f.default().unlock(t),[2]):((i=JSON.parse(o)).timeRefreshed=Date.now(),n.setItemSync(e,JSON.stringify(i)),f.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(f.default().unlock(t),[2])}}))}))}),1e3),[2]}))}))},e.prototype.waitForSomethingToChange=function(t){return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n){var r=!1,o=Date.now(),i=!1;function a(){if(i||(window.removeEventListener("storage",a),e.removeFromWaiting(a),clearTimeout(s),i=!0),!r){r=!0;var t=50-(Date.now()-o);t>0?setTimeout(n,t):n(null)}}window.addEventListener("storage",a),e.addToWaiting(a);var s=setTimeout(a,Math.max(0,t-Date.now()))}))];case 1:return n.sent(),[2]}}))}))},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter((function(e){return e!==t})))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach((function(e){return e()}))},e.prototype.releaseLock=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.releaseLock__private__=function(t){return n(this,void 0,void 0,(function(){var n,o,s,c;return r(this,(function(r){switch(r.label){case 0:return n=void 0===this.storageHandler?a:this.storageHandler,o=i+"-"+t,null===(s=n.getItemSync(o))?[2]:(c=JSON.parse(s)).id!==this.id?[3,2]:[4,f.default().lock(c.iat)];case 1:r.sent(),this.acquiredIatSet.delete(c.iat),n.removeItemSync(o),f.default().unlock(c.iat),e.notifyWaiters(),r.label=2;case 2:return[2]}}))}))},e.lockCorrector=function(t){for(var n=Date.now()-5e3,r=t,o=[],a=0;;){var s=r.keySync(a);if(null===s)break;o.push(s),a++}for(var c=!1,l=0;l<o.length;l++){var u=o[l];if(u.includes(i)){var d=r.getItemSync(u);if(null!==d){var h=JSON.parse(d);(void 0===h.timeRefreshed&&h.timeAcquired<n||void 0!==h.timeRefreshed&&h.timeRefreshed<n)&&(r.removeItemSync(u),c=!0)}}}c&&e.notifyWaiters()},e.waiters=void 0,e}();t.default=l})));const m={timeoutInSeconds:60},g={name:"auth0-spa-js",version:"2.1.3"},b=()=>Date.now();class v extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,v.prototype)}static fromPayload(e){let{error:t,error_description:n}=e;return new v(t,n)}}class y extends v{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;super(e,t),this.state=n,this.appState=r,Object.setPrototypeOf(this,y.prototype)}}class w extends v{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,w.prototype)}}class S extends w{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,S.prototype)}}class O extends v{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,O.prototype)}}class k extends v{constructor(e,t,n){super(e,t),this.mfa_token=n,Object.setPrototypeOf(this,k.prototype)}}class _ extends v{constructor(e,t){super("missing_refresh_token","Missing Refresh Token (audience: '".concat(C(e,["default"]),"', scope: '").concat(C(t),"')")),this.audience=e,this.scope=t,Object.setPrototypeOf(this,_.prototype)}}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e&&!t.includes(e)?e:""}const j=()=>window.crypto,T=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(j().getRandomValues(new Uint8Array(43))).forEach(n=>t+=e[n%e.length]),t},P=e=>btoa(e),x=e=>{var{clientId:t}=e,n=l(e,["clientId"]);return new URLSearchParams((e=>Object.keys(e).filter(t=>void 0!==e[t]).reduce((t,n)=>Object.assign(Object.assign({},t),{[n]:e[n]}),{}))(Object.assign({client_id:t},n))).toString()},I=e=>(e=>decodeURIComponent(atob(e).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),E=async(e,t)=>{const n=await fetch(e,t);return{ok:n.ok,json:await n.json()}},A=async(e,t,n)=>{const r=new AbortController;let o;return t.signal=r.signal,Promise.race([E(e,t),new Promise((e,t)=>{o=setTimeout(()=>{r.abort(),t(new Error("Timeout when executing 'fetch'"))},n)})]).finally(()=>{clearTimeout(o)})},N=async(e,t,n,r,o,i,a)=>{return s={auth:{audience:t,scope:n},timeout:o,fetchUrl:e,fetchOptions:r,useFormData:a},c=i,new Promise((function(e,t){const n=new MessageChannel;n.port1.onmessage=function(r){r.data.error?t(new Error(r.data.error)):e(r.data),n.port1.close()},c.postMessage(s,[n.port2])}));var s,c},R=async function(e,t,n,r,o,i){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1e4;return o?N(e,t,n,r,a,o,i):A(e,r,a)};async function D(e,t){var{baseUrl:n,timeout:r,audience:o,scope:i,auth0Client:a,useFormData:s}=e,c=l(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const u=s?x(c):JSON.stringify(c);return await async function(e,t,n,r,o,i,a){let s,c=null;for(let m=0;m<3;m++)try{s=await R(e,n,r,o,i,a,t),c=null;break}catch(l){c=l}if(c)throw c;const u=s.json,{error:d,error_description:h}=u,f=l(u,["error","error_description"]),{ok:p}=s;if(!p){const t=h||"HTTP error. Unable to fetch ".concat(e);if("mfa_required"===d)throw new k(d,t,f.mfa_token);if("missing_refresh_token"===d)throw new _(n,r);throw new v(d||"request_error",t)}return f}("".concat(n,"/oauth/token"),r,o||"default",i,{method:"POST",body:u,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(a||g))}},t,s)}const L=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(r=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(r))).join(" ");var r};class W{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"@@auth0spajs@@",n=arguments.length>2?arguments[2]:void 0;this.prefix=t,this.suffix=n,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[t,n,r,o]=e.split("::");return new W({clientId:n,scope:o,audience:r},t)}static fromCacheEntry(e){const{scope:t,audience:n,client_id:r}=e;return new W({scope:t,audience:n,clientId:r})}}class z{set(e,t){localStorage.setItem(e,JSON.stringify(t))}get(e){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter(e=>e.startsWith("@@auth0spajs@@"))}}class H{constructor(){this.enclosedCache=function(){let e={};return{set(t,n){e[t]=n},get(t){const n=e[t];if(n)return n},remove(t){delete e[t]},allKeys:()=>Object.keys(e)}}()}}class Z{constructor(e,t,n){this.cache=e,this.keyManifest=t,this.nowProvider=n||b}async setIdToken(e,t,n){var r;const o=this.getIdTokenCacheKey(e);await this.cache.set(o,{id_token:t,decodedToken:n}),await(null===(r=this.keyManifest)||void 0===r?void 0:r.add(o))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;var n;let r=await this.cache.get(e.toKey());if(!r){const t=await this.getCacheKeys();if(!t)return;const n=this.matchExistingCacheKey(e,t);n&&(r=await this.cache.get(n))}if(!r)return;const o=await this.nowProvider(),i=Math.floor(o/1e3);return r.expiresAt-t<i?r.body.refresh_token?(r.body={refresh_token:r.body.refresh_token},await this.cache.set(e.toKey(),r),r.body):(await this.cache.remove(e.toKey()),void await(null===(n=this.keyManifest)||void 0===n?void 0:n.remove(e.toKey()))):r.body}async set(e){var t;const n=new W({clientId:e.client_id,scope:e.scope,audience:e.audience}),r=await this.wrapCacheEntry(e);await this.cache.set(n.toKey(),r),await(null===(t=this.keyManifest)||void 0===t?void 0:t.add(n.toKey()))}async clear(e){var t;const n=await this.getCacheKeys();n&&(await n.filter(t=>!e||t.includes(e)).reduce(async(e,t)=>{await e,await this.cache.remove(t)},Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new W({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var n;const r=W.fromKey(t),o=new Set(r.scope&&r.scope.split(" ")),i=(null===(n=e.scope)||void 0===n?void 0:n.split(" "))||[],a=r.scope&&i.reduce((e,t)=>e&&o.has(t),!0);return"@@auth0spajs@@"===r.prefix&&r.clientId===e.clientId&&r.audience===e.audience&&a})[0]}}class U{constructor(e,t,n){this.storage=e,this.clientId=t,this.cookieDomain=n,this.storageKey="a0.spajs.txs.".concat(this.clientId)}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const K=e=>"number"==typeof e,M=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var G=h((function(e,t){var n=u&&u.__assign||function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e,t){if(!t)return"";var n="; "+e;return!0===t?n:n+"="+t}function o(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return r("Expires",e.expires?e.expires.toUTCString():"")+r("Domain",e.domain)+r("Path",e.path)+r("Secure",e.secure)+r("SameSite",e.sameSite)}(n)}function i(e){for(var t={},n=e?e.split("; "):[],r=/(%[\dA-F]{2})+/gi,o=0;o<n.length;o++){var i=n[o].split("="),a=i.slice(1).join("=");'"'===a.charAt(0)&&(a=a.slice(1,-1));try{t[i[0].replace(r,decodeURIComponent)]=a.replace(r,decodeURIComponent)}catch(e){}}return t}function a(){return i(document.cookie)}function s(e,t,r){document.cookie=o(e,t,n({path:"/"},r))}t.__esModule=!0,t.encode=o,t.parse=i,t.getAll=a,t.get=function(e){return a()[e]},t.set=s,t.remove=function(e,t){s(e,"",n(n({},t),{expires:-1}))}}));d(G),G.encode,G.parse,G.getAll;var J=G.get,X=G.set,F=G.remove;const V={get(e){const t=J(e);if(void 0!==t)return JSON.parse(t)},save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0,sameSite:"none"}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),X(e,JSON.stringify(t),r)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),F(e,n)}},B={get:e=>V.get(e)||V.get("_legacy_".concat(e)),save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),X("_legacy_".concat(e),JSON.stringify(t),r),V.save(e,t,n)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),F(e,n),V.remove(e,t),V.remove("_legacy_".concat(e),t)}},Y={get(e){if("undefined"==typeof sessionStorage)return;const t=sessionStorage.getItem(e);return null!=t?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var $,q=("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",null,!1,function(e){return $=$||function(e,t,n){var r=void 0===t?null:t,o=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,a=o.substring(i)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",null,!1),new Worker($,e)});const Q={};class ee{constructor(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var t;const n=new Set((null===(t=await this.cache.get(this.manifestKey))||void 0===t?void 0:t.keys)||[]);n.add(e),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(e){const t=await this.cache.get(this.manifestKey);if(t){const n=new Set(t.keys);return n.delete(e),n.size>0?await this.cache.set(this.manifestKey,{keys:[...n]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(e){return"@@auth0spajs@@::".concat(e)}}const te={memory:()=>(new H).enclosedCache,localstorage:()=>new z},ne=e=>te[e],re=e=>{const{openUrl:t,onRedirect:n}=e,r=l(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},r),{openUrl:!1===t||t?t:n})},oe=new p;class ie{constructor(e){let t,n;if(this.userCache=(new H).enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await oe.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!j())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===j().subtle)throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")})(),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)n=e.cache;else{if(t=e.cacheLocation||"memory",!ne(t))throw new Error('Invalid cache location "'.concat(t,'"'));n=ne(t)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?V:B,this.orgHintCookieName="auth0.".concat(this.options.clientId,".organization_hint"),this.isAuthenticatedCookieName=(e=>"auth0.".concat(e,".is.authenticated"))(this.options.clientId),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const r=e.useCookiesForTransactions?this.cookieStorage:Y;var o;this.scope=L("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new U(r,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||b,this.cacheManager=new Z(n,n.allKeys?void 0:new ee(n,this.options.clientId),this.nowProvider),this.domainUrl=(o=this.options.domain,/^https?:\/\//.test(o)?o:"https://".concat(o)),this.tokenIssuer=((e,t)=>e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/"))(this.options.issuer,this.domainUrl),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===t&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new q)}_url(e){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||g)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(t)}_authorizeUrl(e){return this._url("/authorize?".concat(x(e)))}async _verifyIdToken(e,t,n){const r=await this.nowProvider();return(e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(e=>{const t=e.split("."),[n,r,o]=t;if(3!==t.length||!n||!r||!o)throw new Error("ID token could not be decoded");const i=JSON.parse(I(r)),a={__raw:e},s={};return Object.keys(i).forEach(e=>{a[e]=i[e],M.includes(e)||(s[e]=i[e])}),{encoded:{header:n,payload:r,signature:o},header:JSON.parse(I(n)),claims:a,user:s}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!K(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==t.claims.exp||!K(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!K(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const n=e.leeway||60,r=new Date(e.now||Date.now()),o=new Date(0);if(o.setUTCSeconds(t.claims.exp+n),r>o)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(r,") is after expiration time (").concat(o,")"));if(null!=t.claims.nbf&&K(t.claims.nbf)){const e=new Date(0);if(e.setUTCSeconds(t.claims.nbf-n),r<e)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (".concat(r,") is before ").concat(e))}if(null!=t.claims.auth_time&&K(t.claims.auth_time)){const o=new Date(0);if(o.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+n),r>o)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (".concat(r,") is after last auth at ").concat(o))}if(e.organization){const n=e.organization.trim();if(n.startsWith("org_")){const e=n;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(e,'", found "').concat(t.claims.org_id,'"'))}else{const e=n.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(e!==t.claims.org_name)throw new Error('Organization Name (org_name) claim mismatch in the ID token; expected "'.concat(e,'", found "').concat(t.claims.org_name,'"'))}}return t})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:t,organization:n,leeway:this.options.leeway,max_age:(o=this.options.authorizationParams.max_age,"string"!=typeof o?o:parseInt(o,10)||void 0),now:r});var o}_processOrgHint(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,t,n){const r=P(T()),o=P(T()),i=T(),a=(e=>{const t=new Uint8Array(e);return(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,e=>t[e])})(window.btoa(String.fromCharCode(...Array.from(t))))})(await(async e=>{const t=j().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t})(i)),s=((e,t,n,r,o,i,a,s)=>Object.assign(Object.assign(Object.assign({client_id:e.clientId},e.authorizationParams),n),{scope:L(t,n.scope),response_type:"code",response_mode:s||"query",state:r,nonce:o,redirect_uri:a||e.authorizationParams.redirect_uri,code_challenge:i,code_challenge_method:"S256"}))(this.options,this.scope,e,r,o,a,e.redirect_uri||this.options.authorizationParams.redirect_uri||n,null==t?void 0:t.response_mode),c=this._authorizeUrl(s);return{nonce:o,code_verifier:i,scope:s.scope,audience:s.audience||"default",redirect_uri:s.redirect_uri,state:r,url:c}}async loginWithPopup(e,t){var n;if(e=e||{},!(t=t||{}).popup&&(t.popup=(e=>{const t=window.screenX+(window.innerWidth-400)/2,n=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup","left=".concat(t,",top=").concat(n,",width=400,height=600,resizable,scrollbars=yes,status=1"))})(),!t.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const r=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=r.url;const o=await(e=>new Promise((t,n)=>{let r;const o=setInterval(()=>{e.popup&&e.popup.closed&&(clearInterval(o),clearTimeout(i),window.removeEventListener("message",r,!1),n(new O(e.popup)))},1e3),i=setTimeout(()=>{clearInterval(o),n(new S(e.popup)),window.removeEventListener("message",r,!1)},1e3*(e.timeoutInSeconds||60));r=function(a){if(a.data&&"authorization_response"===a.data.type){if(clearTimeout(i),clearInterval(o),window.removeEventListener("message",r,!1),e.popup.close(),a.data.response.error)return n(v.fromPayload(a.data.response));t(a.data.response)}},window.addEventListener("message",r)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(r.state!==o.state)throw new v("state_mismatch","Invalid state");const i=(null===(n=e.authorizationParams)||void 0===n?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:o.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:i})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(){var e;const t=re(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{openUrl:n,fragment:r,appState:o}=t,i=l(t,["openUrl","fragment","appState"]),a=(null===(e=i.authorizationParams)||void 0===e?void 0:e.organization)||this.options.authorizationParams.organization,s=await this._prepareAuthorizeUrl(i.authorizationParams||{}),{url:c}=s,u=l(s,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:o}),a&&{organization:a}));const d=r?"".concat(c,"#").concat(r):c;n?await n(d):window.location.assign(d)}async handleRedirectCallback(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href).split("?").slice(1);if(0===e.length)throw new Error("There are no query params available for parsing.");const{state:t,code:n,error:r,error_description:o}=(e=>{e.indexOf("#")>-1&&(e=e.substring(0,e.indexOf("#")));const t=new URLSearchParams(e);return{state:t.get("state"),code:t.get("code")||void 0,error:t.get("error")||void 0,error_description:t.get("error_description")||void 0}})(e.join("")),i=this.transactionManager.get();if(!i)throw new v("missing_transaction","Invalid state");if(this.transactionManager.remove(),r)throw new y(r,o||r,t,i.appState);if(!i.code_verifier||i.state&&i.state!==t)throw new v("state_mismatch","Invalid state");const a=i.organization,s=i.nonce,c=i.redirect_uri;return await this._requestToken(Object.assign({audience:i.audience,scope:i.scope,code_verifier:i.code_verifier,grant_type:"authorization_code",code:n},c?{redirect_uri:c}:{}),{nonceIn:s,organization:a}),{appState:i.appState}}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(e)}catch(e){}}async getTokenSilently(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const n=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:L(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope)})}),r=await((e,t)=>{let n=Q[t];return n||(n=e().finally(()=>{delete Q[t],n=null}),Q[t]=n),n})(()=>this._getTokenSilently(n),"".concat(this.options.clientId,"::").concat(n.authorizationParams.audience,"::").concat(n.authorizationParams.scope));return e.detailedResponse?r:null==r?void 0:r.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,n=l(e,["cacheMode"]);if("off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(e)return e}if("cache-only"!==t){if(!await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;for(let n=0;n<t;n++)if(await e())return!0;return!1}(()=>oe.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new w;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),"off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:r,access_token:o,oauthTokenScope:i,expires_in:a}=e;return Object.assign(Object.assign({id_token:r,access_token:o},i?{scope:i}:null),{expires_in:a})}finally{await oe.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;const r=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:L(this.scope,null===(n=e.authorizationParams)||void 0===n?void 0:n.scope)})});return t=Object.assign(Object.assign({},m),t),await this.loginWithPopup(r,t),(await this.cacheManager.get(new W({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(e){null!==e.clientId?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const t=e.logoutParams||{},{federated:n}=t,r=l(t,["federated"]),o=n?"&federated":"";return this._url("/v2/logout?".concat(x(Object.assign({clientId:e.clientId},r))))+o}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=re(e),{openUrl:n}=t,r=l(t,["openUrl"]);null===e.clientId?await this.cacheManager.clear():await this.cacheManager.clear(e.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const o=this._buildLogoutUrl(r);n?await n(o):!1!==n&&window.location.assign(o)}async _getTokenFromIFrame(e){const t=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!t.organization&&(t.organization=n);const{url:r,state:o,nonce:i,code_verifier:a,redirect_uri:s,scope:c,audience:l}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new v("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const n=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,u=await function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60;return new Promise((r,o)=>{const i=window.document.createElement("iframe");i.setAttribute("width","0"),i.setAttribute("height","0"),i.style.display="none";const a=()=>{window.document.body.contains(i)&&(window.document.body.removeChild(i),window.removeEventListener("message",s,!1))};let s;const c=setTimeout(()=>{o(new w),a()},1e3*n);s=function(e){if(e.origin!=t)return;if(!e.data||"authorization_response"!==e.data.type)return;const n=e.source;n&&n.close(),e.data.response.error?o(v.fromPayload(e.data.response)):r(e.data.response),clearTimeout(c),window.removeEventListener("message",s,!1),setTimeout(a,2e3)},window.addEventListener("message",s,!1),window.document.body.appendChild(i),i.setAttribute("src",e)})}(r,this.domainUrl,n);if(o!==u.state)throw new v("state_mismatch","Invalid state");const d=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:a,code:u.code,grant_type:"authorization_code",redirect_uri:s,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:i,organization:t.organization});return Object.assign(Object.assign({},d),{scope:c,oauthTokenScope:d.scope,audience:l})}catch(e){throw"login_required"===e.error&&this.logout({openUrl:!1}),e}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new W({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new _(e.authorizationParams.audience||"default",e.authorizationParams.scope)}const n=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,r="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null;try{const o=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),r&&{timeout:r}));return Object.assign(Object.assign({},o),{scope:e.authorizationParams.scope,oauthTokenScope:o.scope,audience:e.authorizationParams.audience||"default"})}catch(t){if((t.message.indexOf("Missing Refresh Token")>-1||t.message&&t.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw t}}async _saveEntryInCache(e){const{id_token:t,decodedToken:n}=e,r=l(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:t,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||"default",t=await this.cacheManager.getIdToken(new W({clientId:this.options.clientId,audience:e,scope:this.scope})),n=this.userCache.get("@@user@@");return t&&t.id_token===(null==n?void 0:n.id_token)?n:(this.userCache.set("@@user@@",t),t)}async _getEntryFromCache(e){let{scope:t,audience:n,clientId:r}=e;const o=await this.cacheManager.get(new W({scope:t,audience:n,clientId:r}),60);if(o&&o.access_token){const{access_token:e,oauthTokenScope:t,expires_in:n}=o,r=await this._getIdTokenFromCache();return r&&Object.assign(Object.assign({id_token:r.id_token,access_token:e},t?{scope:t}:null),{expires_in:n})}}async _requestToken(e,t){const{nonceIn:n,organization:r}=t||{},o=await D(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},e),this.worker),i=await this._verifyIdToken(o.id_token,n,r);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},o),{decodedToken:i,scope:e.scope,audience:e.audience||"default"}),o.scope?{oauthTokenScope:o.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(r||i.claims.org_id),Object.assign(Object.assign({},o),{decodedToken:i})}}class ae{}var se={isAuthenticated:!1,isLoading:!0},ce=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},le=a(a({},se),{buildAuthorizeUrl:ce,buildLogoutUrl:ce,getAccessTokenSilently:ce,getAccessTokenWithPopup:ce,getIdTokenClaims:ce,loginWithRedirect:ce,loginWithPopup:ce,logout:ce,handleRedirectCallback:ce}),ue=Object(r.createContext)(le),de=function(e){function t(n,r){var o=e.call(this,r||n)||this;return o.error=n,o.error_description=r,Object.setPrototypeOf(o,t.prototype),o}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),he=/[?&]code=[^&]+/,fe=/[?&]state=[^&]+/,pe=/[?&]error=[^&]+/,me=function(e){return function(t){return t instanceof Error?t:null!==t&&"object"===typeof t&&"error"in t&&"string"===typeof t.error?"error_description"in t&&"string"===typeof t.error_description?new de(t.error,t.error_description):new de(t.error):new Error(e)}},ge=me("Login failed"),be=me("Get access token failed"),ve=function(e){var t;(null===e||void 0===e?void 0:e.redirectUri)&&(console.warn("Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version"),e.authorizationParams=e.authorizationParams||{},e.authorizationParams.redirect_uri=e.redirectUri,delete e.redirectUri),(null===(t=null===e||void 0===e?void 0:e.authorizationParams)||void 0===t?void 0:t.redirectUri)&&(console.warn("Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version"),e.authorizationParams.redirect_uri=e.authorizationParams.redirectUri,delete e.authorizationParams.redirectUri)},ye=function(e,t){switch(t.type){case"LOGIN_POPUP_STARTED":return a(a({},e),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return a(a({},e),{isAuthenticated:!!t.user,user:t.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return e.user===t.user?e:a(a({},e),{isAuthenticated:!!t.user,user:t.user});case"LOGOUT":return a(a({},e),{isAuthenticated:!1,user:void 0});case"ERROR":return a(a({},e),{isLoading:!1,error:t.error})}},we=function(e){window.history.replaceState({},document.title,(null===e||void 0===e?void 0:e.returnTo)||window.location.pathname)},Se=function(e){var t=e.children,n=e.skipRedirectCallback,i=e.onRedirectCallback,l=void 0===i?we:i,u=e.context,d=void 0===u?ue:u,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children","skipRedirectCallback","onRedirectCallback","context"]),f=Object(r.useState)((function(){return new ie(function(e){return ve(e),a(a({},e),{auth0Client:{name:"auth0-react",version:"2.2.4"}})}(h))}))[0],p=Object(r.useReducer)(ye,se),m=p[0],g=p[1],b=Object(r.useRef)(!1);Object(r.useEffect)((function(){b.current||(b.current=!0,s(void 0,void 0,void 0,(function(){var e,t,r;return c(this,(function(o){switch(o.label){case 0:return o.trys.push([0,7,,8]),e=void 0,void 0===i&&(i=window.location.search),!he.test(i)&&!pe.test(i)||!fe.test(i)||n?[3,3]:[4,f.handleRedirectCallback()];case 1:return t=o.sent().appState,[4,f.getUser()];case 2:return e=o.sent(),l(t,e),[3,6];case 3:return[4,f.checkSession()];case 4:return o.sent(),[4,f.getUser()];case 5:e=o.sent(),o.label=6;case 6:return g({type:"INITIALISED",user:e}),[3,8];case 7:return r=o.sent(),g({type:"ERROR",error:ge(r)}),[3,8];case 8:return[2]}var i}))})))}),[f,l,n]);var v=Object(r.useCallback)((function(e){return ve(e),f.loginWithRedirect(e)}),[f]),y=Object(r.useCallback)((function(e,t){return s(void 0,void 0,void 0,(function(){var n,r;return c(this,(function(o){switch(o.label){case 0:g({type:"LOGIN_POPUP_STARTED"}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,f.loginWithPopup(e,t)];case 2:return o.sent(),[3,4];case 3:return n=o.sent(),g({type:"ERROR",error:ge(n)}),[2];case 4:return[4,f.getUser()];case 5:return r=o.sent(),g({type:"LOGIN_POPUP_COMPLETE",user:r}),[2]}}))}))}),[f]),w=Object(r.useCallback)((function(e){return void 0===e&&(e={}),s(void 0,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,f.logout(e)];case 1:return t.sent(),(e.openUrl||!1===e.openUrl)&&g({type:"LOGOUT"}),[2]}}))}))}),[f]),S=Object(r.useCallback)((function(e){return s(void 0,void 0,void 0,(function(){var t,n,r,o;return c(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,3,5]),[4,f.getTokenSilently(e)];case 1:return t=i.sent(),[3,5];case 2:throw n=i.sent(),be(n);case 3:return r=g,o={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,f.getUser()];case 4:return r.apply(void 0,[(o.user=i.sent(),o)]),[7];case 5:return[2,t]}}))}))}),[f]),O=Object(r.useCallback)((function(e,t){return s(void 0,void 0,void 0,(function(){var n,r,o,i;return c(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,5]),[4,f.getTokenWithPopup(e,t)];case 1:return n=a.sent(),[3,5];case 2:throw r=a.sent(),be(r);case 3:return o=g,i={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,f.getUser()];case 4:return o.apply(void 0,[(i.user=a.sent(),i)]),[7];case 5:return[2,n]}}))}))}),[f]),k=Object(r.useCallback)((function(){return f.getIdTokenClaims()}),[f]),_=Object(r.useCallback)((function(e){return s(void 0,void 0,void 0,(function(){var t,n,r;return c(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,3,5]),[4,f.handleRedirectCallback(e)];case 1:return[2,o.sent()];case 2:throw t=o.sent(),be(t);case 3:return n=g,r={type:"HANDLE_REDIRECT_COMPLETE"},[4,f.getUser()];case 4:return n.apply(void 0,[(r.user=o.sent(),r)]),[7];case 5:return[2]}}))}))}),[f]),C=Object(r.useMemo)((function(){return a(a({},m),{getAccessTokenSilently:S,getAccessTokenWithPopup:O,getIdTokenClaims:k,loginWithRedirect:v,loginWithPopup:y,logout:w,handleRedirectCallback:_})}),[m,S,O,k,v,y,w,_]);return o.a.createElement(d.Provider,{value:C},t)},Oe=function(e){return void 0===e&&(e=ue),Object(r.useContext)(e)},ke=function(e,t){return void 0===t&&(t=ue),function(n){return o.a.createElement(t.Consumer,null,(function(t){return o.a.createElement(e,a({},n,{auth0:t}))}))}},_e=function(){return o.a.createElement(o.a.Fragment,null)},Ce=function(){return s(void 0,void 0,void 0,(function(){return c(this,(function(e){return[2]}))}))},je=function(){return"".concat(window.location.pathname).concat(window.location.search)},Te=function(e,t){return void 0===t&&(t={}),function(n){var i=this,l=t.returnTo,u=void 0===l?je:l,d=t.onRedirecting,h=void 0===d?_e:d,f=t.onBeforeAuthentication,p=void 0===f?Ce:f,m=t.loginOptions,g=t.context,b=Oe(void 0===g?ue:g),v=b.isAuthenticated,y=b.isLoading,w=b.loginWithRedirect;return Object(r.useEffect)((function(){if(!y&&!v){var e=a(a({},m),{appState:a(a({},m&&m.appState),{returnTo:"function"===typeof u?u():u})});s(i,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,p()];case 1:return t.sent(),[4,w(e)];case 2:return t.sent(),[2]}}))}))}}),[y,v,w,p,m,u]),v?o.a.createElement(e,a({},n)):h()}}}.call(this,n(35))},9:function(e,t,n){"use strict";n.d(t,"f",(function(){return s})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"g",(function(){return f}));var r=n(5),o=n(1),i=n(16),a=n(6);const s=async e=>{const{url:t,method:n="GET",headers:i={},body:s}=e,c=t.split("/");if(window.location.pathname.includes("/content/")&&t.includes("http"))return Promise.reject(!1);if(c.length>0&&"graphql"!==c[c.length-1]){const e=await fetch(t,{method:n,headers:i,body:s?JSON.stringify(s):void 0});if(!e.ok)return Promise.reject({response:e});const o=await e.json();return Object(r.a)({data:o},e)}let l="";if("true"===Object(o.ab)("isHomeownerSite"))l=Object(o.ab)("erp-dealer-id")||"";else{const e=Object(o.ab)("dealer")||"";if(e){const t=JSON.parse(e);l=Number(t.accountNumber)+""}}if("false"===Object(o.ab)("isHomeownerSite")&&"true"===Object(o.ab)("enableEcommerce")){const e=Object(o.ab)("dealer")||"";if(e){const t=JSON.parse(e);l=Number(t.accountNumber)+""}}const u=Object(o.ab)("store"),d=Object(o.ab)("currencyCode"),h="true"===Object(o.ab)("enableLogoutRedirection"),f=Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({"Content-Type":"application/json"},i),l&&{"erp-dealer-id":l}),u&&{store:u}),d&&{"Content-Currency":d});i.redirectOnTokenFailure&&h&&Object(a.b)()&&Object(a.d)(),delete f.redirectOnTokenFailure;try{var p,m,g,b;const e=await fetch(t,{method:n,headers:f,body:s?JSON.stringify(s):void 0});if(!e.ok)return 401===e.status&&window.location.pathname.includes("/dealer/")&&(Object(o.Nb)("user"),Object(o.Nb)("dealer"),Object(o.Nb)("expiry"),Object(o.Nb)("childAccountList"),Object(o.Nb)("token"),document.cookie="usertype=null; max-age=0;secure",Object(o.Nb)("primaryRole"),sessionStorage.removeItem("amarrRoles"),Object(o.Nb)("dealerMagentoToken"),window.location.href=window.location.origin),Promise.reject({response:e});const i=await e.json();return(null===i||void 0===i||null===(p=i.data)||void 0===p||null===(m=p.errors)||void 0===m?void 0:m.length)>0||(null===i||void 0===i||null===(g=i.errors)||void 0===g?void 0:g.length)?Promise.reject({data:i,response:e}):("The current customer isn't authorized."===(null===i||void 0===i||null===(b=i.errors)||void 0===b?void 0:b.message)&&Object(a.d)(),Object(r.a)({data:i},e))}catch(v){throw console.error("Fetch error:",v),v}},c=e=>{if(Object(o.xb)())Object(i.b)();else{const t=Object(o.ab)("token");if(e)return s({url:e.url,method:"GET",headers:{Authorization:"Bearer "+t,"Content-Type":"application/json"}})}},l=e=>{if(Object(o.xb)())Object(i.b)();else{const t=Object(o.ab)("token");if(e)return s({url:e.url,method:"DELETE",headers:{Authorization:"Bearer "+t,"Content-Type":"application/json"}})}},u=e=>{if(Object(o.xb)())Object(i.b)();else{const t=Object(o.ab)("token");if(e)return s({url:e.url,method:"POST",headers:{Authorization:"Bearer "+t,"Content-Type":"application/json"},body:e.data})}},d=e=>{if(Object(o.xb)())Object(i.b)();else{const t=Object(o.ab)("token");if(e)return s({url:e.url,method:"PUT",headers:{Authorization:"Bearer "+t,"Content-Type":"application/json"},body:e.data})}};function h(e){return s({url:e,method:"GET"})}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s({url:e,method:"GET",headers:Object(r.a)(Object(r.a)({},t),{},{"Content-Type":"application/json"})})}}});
3
3
  //# sourceMappingURL=dealer-login.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assaabloy/amarr-wc-dealer-login",
3
- "version": "9.4.0",
3
+ "version": "9.4.1",
4
4
  "description": "Web component - Dealer-login",
5
5
  "type": "module",
6
6
  "main": "dealer-login.js",
@@ -11,5 +11,5 @@
11
11
  },
12
12
  "author": "Nagarro",
13
13
  "license": "MIT",
14
- "gitHead": "4e7c9b56bc1645da560fe152346ac5d359d83c21"
14
+ "gitHead": "ba8d34d98ce43eb5547f4b5f117b75287efc53cd"
15
15
  }