Plugin Directory

Changeset 2637304


Ignore:
Timestamp:
11/30/2021 09:20:14 AM (3 years ago)
Author:
fean
Message:

Update trunk to v1.1.0

Location:
trunkrs-for-woocommerce/trunk
Files:
2 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunkrs-for-woocommerce/trunk/build/admin.asset.php

    r2591935 r2637304  
    1 <?php return array('dependencies' => array('wp-element'), 'version' => 'fca7dc5ca842c0dae60c28bcf5076b31');
     1<?php return array('dependencies' => array('wp-element'), 'version' => 'd607c9392df2f84c755e501853867d36');
  • trunkrs-for-woocommerce/trunk/build/admin.js

    r2591935 r2637304  
    1 !function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=18)}([function(t,e,n){"use strict";t.exports=n(4)},function(t,e,n){"use strict";var r=n(8),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return a(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e){t.exports=React},function(t,e){t.exports=window.wp.element},function(t,e,n){"use strict";var r=n(2),i=60103;if(e.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),e.Fragment=o("react.fragment")}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var r,o={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(l=e.ref),e)a.call(e,r)&&!u.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===o[r]&&(o[r]=e[r]);return{$$typeof:i,type:t,key:c,ref:l,props:o,_owner:s.current}}e.jsx=c,e.jsxs=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={portalBaseUrl:"https://portal.trunkrs.app",apiBaseUrl:"https://shipping.trunkrs.app",auth0:{domain:"trunkrs.eu.auth0.com",clientId:"hvK6Wu7K57yfp2mYsgMIRNNsOKkSYmDi",audience:"api.portal.trunkrs.app",redirectUrl:"https://portal.trunkrs.app/register/integration"}}},function(t,e,n){"use strict";function r(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=r(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}n.r(e),e.default=function(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=r(t))&&(i&&(i+=" "),i+=e);return i}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(2)).default.createContext({isWorking:!1,config:null,prepareConfig:function(){throw new Error("Not implemented!")},updateIsDarkLogo:function(){throw new Error("Not implemented!")},updateTntLinks:function(){throw new Error("Not implemented!")},updateTntActions:function(){throw new Error("Not implemented!")}});e.default=i},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(1);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(i(e)+"="+i(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";(function(e){var r=n(1),i=n(29),o={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,u={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==e&&"[object process]"===Object.prototype.toString.call(e))&&(a=n(13)),a),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){u.headers[t]=r.merge(o)})),t.exports=u}).call(this,n(12))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,c=[],l=!1,p=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):p=-1,c.length&&f())}function f(){if(!l){var t=a(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++p<e;)u&&u[p].run();p=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||a(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(1),i=n(30),o=n(32),s=n(9),a=n(33),u=n(36),c=n(37),l=n(14);t.exports=function(t){return new Promise((function(e,n){var p=t.data,h=t.headers;r.isFormData(p)&&delete h["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";h.Authorization="Basic "+btoa(d+":"+m)}var y=a(t.baseURL,t.url);if(f.open(t.method.toUpperCase(),s(y,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in f?u(f.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:t,request:f};i(e,n,o),f=null}},f.onabort=function(){f&&(n(l("Request aborted",t,"ECONNABORTED",f)),f=null)},f.onerror=function(){n(l("Network Error",t,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var g=(t.withCredentials||c(y))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;g&&(h[t.xsrfHeaderName]=g)}if("setRequestHeader"in f&&r.forEach(h,(function(t,e){void 0===p&&"content-type"===e.toLowerCase()?delete h[e]:f.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){f&&(f.abort(),n(t),f=null)})),p||(p=null),f.send(p)}))}},function(t,e,n){"use strict";var r=n(31);t.exports=function(t,e,n,i,o){var s=new Error(t);return r(s,e,n,i,o)}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function c(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=u(void 0,e[t]))})),r.forEach(o,c),r.forEach(s,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(void 0,e[i])})),r.forEach(a,(function(r){r in e?n[r]=u(t[r],e[r]):r in t&&(n[r]=u(void 0,t[r]))}));var l=i.concat(o).concat(s).concat(a),p=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(p,c),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(n(2)),s=r(n(6));n(51),e.default=function(t){var e=t.color,n=t.href,r=t.disabled,a=t.className,u=t.children,c=t.onClick,l=s.default("tr-wc-button",{"tr-wc-blue":"blue"===e,"tr-wc-green":"green"===e,"tr-wc-white":"white"===e},a),p=n?i.jsx("a",{href:n,target:"_blank",rel:"noreferrer noopener nofollow"},void 0):i.jsx("button",{type:"button",onClick:c},void 0);return o.default.cloneElement(p,{className:l,disabled:r},u)}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(3);n(19);var o=r(n(20)),s=document.getElementById("tr-wc-settings");s&&i.render(i.createElement(o.default),s)},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(n(21)),s=r(n(41));e.default=function(){return i.jsx(o.default,{children:i.jsx(s.default,{},void 0)},void 0)}},function(t,e,n){"use strict";var r,i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),c=a(n(2)),l=a(n(7)),p=n(22),h=null===(r=document.getElementById("__tr-wc-settings__"))||void 0===r?void 0:r.innerText,f=h?JSON.parse(h):{};e.default=function(t){var e=t.children,n=c.default.useState(!1),r=n[0],a=n[1],h=c.default.useState(f),d=h[0],m=h[1],y=c.default.useCallback((function(t,e){return o(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,4,5]),a(!0),[4,p.doShippingReqisterRequest(t,e,d.metaBag)];case 1:return n=s.sent(),[4,p.doConfigureRequest(n.accessToken,e,n.organizationName,n.integrationId)];case 2:return s.sent(),m(i(i({},d),{isConfigured:!0,details:{integrationId:n.integrationId,organizationId:e,organizationName:n.organizationName}})),[3,5];case 3:return r=s.sent(),o=r,console.error(o),[3,5];case 4:return a(!1),[7];case 5:return[2]}}))}))}),[d]),g=c.default.useCallback((function(){return o(void 0,void 0,void 0,(function(){return s(this,(function(t){return m(i(i({},d),{isDarkLogo:!d.isDarkLogo})),p.doUpdateUseDarkRequest(!d.isDarkLogo).catch((function(){m(i(i({},d),{isDarkLogo:!d.isDarkLogo}))})),[2]}))}))}),[d]),v=c.default.useCallback((function(){return o(void 0,void 0,void 0,(function(){return s(this,(function(t){return m(i(i({},d),{isEmailLinksEnabled:!d.isEmailLinksEnabled})),p.doUpdateUseTntLinksRequest(!d.isEmailLinksEnabled).catch((function(){m(i(i({},d),{isEmailLinksEnabled:!d.isEmailLinksEnabled}))})),[2]}))}))}),[d]),b=c.default.useCallback((function(){return o(void 0,void 0,void 0,(function(){return s(this,(function(t){return m(i(i({},d),{isAccountTrackTraceEnabled:!d.isAccountTrackTraceEnabled})),p.doUpdateUseTntAccountsRequest(!d.isAccountTrackTraceEnabled).catch((function(){m(i(i({},d),{isAccountTrackTraceEnabled:!d.isAccountTrackTraceEnabled}))})),[2]}))}))}),[d]),w=c.default.useMemo((function(){return{isWorking:r,config:d,prepareConfig:y,updateIsDarkLogo:g,updateTntLinks:v,updateTntActions:b}}),[d,r,y,g,b,v]);return u.jsx(l.default.Provider,i({value:w},{children:e}),void 0)}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.doUpdateUseTntAccountsRequest=e.doUpdateUseTntLinksRequest=e.doUpdateUseDarkRequest=e.doConfigureRequest=e.doShippingReqisterRequest=e.decodeHtmlString=void 0;var s=o(n(23)),a=o(n(5));e.decodeHtmlString=function(t){var e=document.createElement("textarea");return e.innerHTML=t,e.value},e.doShippingReqisterRequest=function(t,e,n){return r(void 0,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,s.default.request({method:"POST",baseURL:a.default.apiBaseUrl,url:"integrations",headers:{Authorization:"Bearer "+t,"X-Organization-Id":e},data:{type:"WooCommerce",name:window.location.hostname,version:1,meta:n}})];case 1:return[2,r.sent().data]}}))}))},e.doConfigureRequest=function(t,e,n,o){return r(void 0,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return(r=new FormData).append("action","tr-wc_register-plugin"),r.append("accessToken",t),r.append("organizationId",e),r.append("organizationName",n),r.append("integrationId",o),[4,s.default.request({method:"POST",url:ajaxurl,data:r})];case 1:return i.sent(),[2]}}))}))},e.doUpdateUseDarkRequest=function(t){return r(void 0,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(e=new FormData).append("action","tr-wc_update-use-dark"),e.append("isDarkLogo",t.toString()),[4,s.default.request({method:"POST",url:ajaxurl,data:e})];case 1:return n.sent(),[2]}}))}))},e.doUpdateUseTntLinksRequest=function(t){return r(void 0,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(e=new FormData).append("action","tr-wc_update-use-tnt-links"),e.append("isEmailLinksEnabled",t.toString()),[4,s.default.request({method:"POST",url:ajaxurl,data:e})];case 1:return n.sent(),[2]}}))}))},e.doUpdateUseTntAccountsRequest=function(t){return r(void 0,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(e=new FormData).append("action","tr-wc_update-use-tnt-account"),e.append("isAccountTrackTraceEnabled",t.toString()),[4,s.default.request({method:"POST",url:ajaxurl,data:e})];case 1:return n.sent(),[2]}}))}))}},function(t,e,n){t.exports=n(24)},function(t,e,n){"use strict";var r=n(1),i=n(8),o=n(25),s=n(15);function a(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=a(n(11));u.Axios=o,u.create=function(t){return a(s(u.defaults,t))},u.Cancel=n(16),u.CancelToken=n(38),u.isCancel=n(10),u.all=function(t){return Promise.all(t)},u.spread=n(39),u.isAxiosError=n(40),t.exports=u,t.exports.default=u},function(t,e,n){"use strict";var r=n(1),i=n(9),o=n(26),s=n(27),a=n(15);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},u.prototype.getUri=function(t){return t=a(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,n,r){return this.request(a(r||{},{method:t,url:e,data:n}))}})),t.exports=u},function(t,e,n){"use strict";var r=n(1);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(28),o=n(10),s=n(11);function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return a(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return a(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(a(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(14);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(1);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(34),i=n(35);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(1),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},function(t,e,n){"use strict";var r=n(1);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(16);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(0),a=o(n(2)),u=o(n(42)),c=o(n(43)),l=o(n(44)),p=o(n(46)),h=o(n(56));n(60);var f=o(n(61));e.default=function(){var t=u.default(),e=t.isWorking,n=t.config,o=t.prepareConfig,d=t.updateIsDarkLogo,m=t.updateTntLinks,y=t.updateTntActions,g=a.default.useCallback((function(t){return r(void 0,void 0,void 0,(function(){return i(this,(function(e){return[2,o(t.accessToken,t.organizationId)]}))}))}),[o]);return s.jsxs(l.default,{children:[s.jsx(c.default,{className:"tr-wc-trunkrsFull"},void 0),(null==n?void 0:n.isConfigured)?s.jsxs(s.Fragment,{children:[s.jsx(h.default,{integrationId:n.details.integrationId,organizationId:n.details.organizationId,organizationName:n.details.organizationName},void 0),s.jsx(f.default,{darkLogo:n.isDarkLogo,tntEmailLinks:n.isEmailLinksEnabled,tntAccountActions:n.isAccountTrackTraceEnabled,onDarkLogoChanged:d,onTntEmailLinksChanged:m,onTntAccountActionsChanged:y},void 0)]},void 0):s.jsx(p.default,{loading:e,onLoginDone:g},void 0)]},void 0)}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(2)),o=r(n(7));e.default=function(){return i.default.useContext(o.default)}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.default=function(t){var e=t.className;return i.jsx("svg",r({className:e,viewBox:"0 0 320 38.19"},{children:i.jsxs("g",r({transform:"translate(-238.467 -453.779)"},{children:[i.jsxs("g",r({transform:"translate(238.467 453.779)"},{children:[i.jsxs("g",r({transform:"translate(67.154)"},{children:[i.jsx("path",{d:"M567.979 467.551v30.663h-7.144v-30.663h-16.181l.183-4.991h39.2l.122 4.991z",fill:"#201047",transform:"translate(-544.654 -460.633)"},void 0),i.jsx("path",{d:"M717.507 522.354v-27.661l5.129-.282.305 2.583.306 3.8h.122c2.625-4.227 7.2-6.763 13.066-6.763a21.582 21.582 0 0 1 4.213.423l-.366 4.837a18.181 18.181 0 0 0-4.274-.47c-6.777 0-12.029 3.992-12.029 10.1v13.431z",fill:"#201047",transform:"translate(-678.979 -484.774)"},void 0),i.jsx("path",{d:"M880.84 513.949c0 6.481-5.373 10.473-16.608 10.473-11.174 0-16.547-4.039-16.547-10.473v-17.987h6.472v17.8c0 3.9 3.3 6.246 10.075 6.246s10.136-2.3 10.136-6.246v-17.8h6.472z",fill:"#201047",transform:"translate(-780.09 -486.279)"},void 0),i.jsx("path",{d:"M1064.4 522.02v-17.283c0-4.6-3.48-6.669-10.013-6.669-3.6 0-8.06 1.221-10.2 3.428v20.524h-6.472v-27.755l4.518-.282 1.221 3.24a22.331 22.331 0 0 1 12.639-3.616c9.22 0 14.776 3.8 14.776 11.13v17.283z",fill:"#201047",transform:"translate(-927.733 -484.44)"},void 0),i.jsx("path",{d:"M1234.834 474.161h6.777l12.7-11.022h7.876l-15.143 12.923 15.754 15.3h-7.877l-13.372-13.065h-6.717v13.065h-6.472v-37.298l6.472-.285z",fill:"#201047",transform:"translate(-1075.837 -453.779)"},void 0),i.jsx("path",{d:"M1409.318 522.354v-27.661l5.129-.282.305 2.583.305 3.8h.122c2.625-4.227 7.2-6.763 13.066-6.763a21.581 21.581 0 0 1 4.213.423l-.366 4.837a18.181 18.181 0 0 0-4.274-.47c-6.777 0-12.029 3.992-12.029 10.1v13.431z",fill:"#201047",transform:"translate(-1216.059 -484.774)"},void 0),i.jsx("path",{d:"M1548.524 522.8c-5.19 0-10.014-.939-13.372-2.677l.916-4.133c3.3 1.831 8.365 2.771 12.517 2.771 6.167 0 8.67-2.067 8.67-4.415 0-6.105-22.042-2.865-22.042-12.539 0-4.79 4.946-7.984 14.715-7.984a37.911 37.911 0 0 1 11.723 1.738l-.611 4.039a40.578 40.578 0 0 0-11.357-1.691c-5.068 0-8.243 1.456-8.243 3.663 0 5.683 21.859 2.4 21.859 12.257.001 5.071-4.334 8.971-14.775 8.971z",fill:"#201047",transform:"translate(-1314.294 -484.607)"},void 0)]}),void 0),i.jsx("g",r({transform:"translate(0 1.926)"},{children:i.jsxs("g",{children:[i.jsx("g",r({transform:"translate(.243)"},{children:i.jsx("path",{fill:"#00d163",d:"M239.9 473.289a.981.981 0 0 0 .663 1.708l17.7-.048a1.56 1.56 0 0 0 1.046-.406l13.191-11.984-19.5.054a3.507 3.507 0 0 0-2.351.912z",transform:"translate(-239.576 -462.559)"},void 0)}),void 0),i.jsx("path",{d:"M296.542 462.586l-21.3.051a1.786 1.786 0 0 0-1.2.47l-12.629 11.57a1.523 1.523 0 0 0-.489 1.121v8.934a.94.94 0 0 1-.932.946l-8.148.02a3.363 3.363 0 0 0-2.27.892l-10.779 9.917a1 1 0 0 0 .662 1.729l20.974-.05a1.275 1.275 0 0 0 .858-.336l12.775-11.7a1.522 1.522 0 0 0 .49-1.12v-8.934a.94.94 0 0 1 .932-.946l8.739-.021a1.841 1.841 0 0 0 1.242-.488l11.606-10.678a.789.789 0 0 0-.531-1.377z",fill:"#201047",transform:"translate(-238.467 -462.58)"},void 0)]},void 0)}),void 0)]}),void 0),i.jsx("g",r({transform:"translate(554.613 460.161)"},{children:i.jsx("path",{fill:"#1d1047",d:"M1667.281 484.388a1.928 1.928 0 1 1-1.921-1.876 1.885 1.885 0 0 1 1.921 1.876zm-3.374 0a1.453 1.453 0 0 0 1.464 1.5 1.436 1.436 0 0 0 1.43-1.487 1.448 1.448 0 1 0-2.893-.011zm1.155.983h-.435V483.5a3.792 3.792 0 0 1 .72-.057 1.169 1.169 0 0 1 .652.137.52.52 0 0 1 .183.412.48.48 0 0 1-.389.434v.023a.553.553 0 0 1 .343.457 1.43 1.43 0 0 0 .137.469h-.469a1.613 1.613 0 0 1-.148-.458c-.034-.206-.149-.3-.389-.3h-.206zm.011-1.063h.206c.24 0 .434-.08.434-.275 0-.171-.126-.286-.4-.286a1.049 1.049 0 0 0-.24.023z",transform:"translate(-1663.427 -482.512)"},void 0)}),void 0)]}),void 0)}),void 0)}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);n(45),e.default=function(t){var e=t.children;return i.jsx("div",r({className:"tr-wc-centeredContainer"},{children:e}),void 0)}},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(47));n(55),e.default=function(t){var e=t.loading,n=t.onLoginDone;return o.jsxs("div",r({className:"tr-wc-connectionPanel"},{children:[o.jsx("span",r({className:"tr-wc-panelHeader"},{children:o.jsx("p",{children:"Platform connectie"},void 0)}),void 0),o.jsxs("span",r({className:"tr-wc-panelContent"},{children:[o.jsxs("span",r({className:"tr-wc-connectionStatus"},{children:[o.jsx("h3",{children:"Niet verbonden met Trunkrs"},void 0),o.jsx("p",{children:"Verbind uw winkel met het Trunkrs platform om te beginnen met verzenden."},void 0)]}),void 0),o.jsx("span",{children:o.jsx(s.default,{loading:e,onLoginDone:n},void 0)},void 0)]}),void 0)]}),void 0)}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(2)),a=n(48),u=i(n(6)),c=i(n(50)),l=i(n(17));n(52);var p=i(n(53)),h=i(n(5));e.default=function(t){var e=t.className,n=t.loading,i=t.onLoginDone,f=s.default.useRef(),d=s.default.useCallback((function(t){var e=t.data,n=e.type,r=e.organizationId;"ORG_ID_RECEIVED"===n&&(f.current=r)}),[]),m=s.default.useCallback((function(t,e){window.removeEventListener("message",d),t?console.error(t):null==i||i.call(null,{organizationId:f.current,accessToken:e.accessToken})}),[d,i]),y=s.default.useCallback((function(){var t=btoa(JSON.stringify({origin:window.location.origin}));new a.WebAuth({domain:h.default.auth0.domain,clientID:h.default.auth0.clientId,audience:h.default.auth0.audience,state:t,redirectUri:h.default.auth0.redirectUrl}).popup.authorize({domain:h.default.auth0.domain,clientId:h.default.auth0.clientId,audience:h.default.auth0.audience,redirectUri:h.default.auth0.redirectUrl,responseType:"token"},m),window.removeEventListener("message",d),window.addEventListener("message",d)}),[m,d]);return o.jsxs(l.default,r({color:"green",disabled:n,className:u.default("tr-wc-connectButton",e),onClick:y},{children:[n?o.jsx(p.default,{size:32,thickness:2},void 0):o.jsx(c.default,{className:"tr-wc-logo",variant:"indigo"},void 0),o.jsx("p",r({className:"tr-wc-buttonText"},{children:n?"Verbinden":"Verbind"}),void 0)]}),void 0)}},function(t,e,n){"use strict";n.r(e),function(t,r){n.d(e,"Authentication",(function(){return Ie})),n.d(e,"Management",(function(){return qe})),n.d(e,"WebAuth",(function(){return Ee})),n.d(e,"version",(function(){return ot}));var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var s=o((function(t){var e,n;e=i,n=function(){function t(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<t.length;r++){var i=t[r];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(r>0&&(i=i.replace(/^[\/]+/,"")),i=r<t.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),e.push(i))}var o=e.join("/"),s=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return s.shift()+(s.length>0?"?":"")+s.join("&")}return function(){return t("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=n():e.urljoin=n()})),a=Object.prototype.hasOwnProperty,u=Array.isArray,c=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),l=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n},p={arrayToObject:l,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var i=e[r],o=i.obj[i.prop],s=Object.keys(o),a=0;a<s.length;++a){var c=s[a],l=o[c];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(e.push({obj:o,prop:c}),n.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(u(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n){if(0===t.length)return t;var r=t;if("symbol"==typeof t?r=Symbol.prototype.toString.call(t):"string"!=typeof t&&(r=String(t)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var i="",o=0;o<r.length;++o){var s=r.charCodeAt(o);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?i+=r.charAt(o):s<128?i+=c[s]:s<2048?i+=c[192|s>>6]+c[128|63&s]:s<55296||s>=57344?i+=c[224|s>>12]+c[128|s>>6&63]+c[128|63&s]:(o+=1,s=65536+((1023&s)<<10|1023&r.charCodeAt(o)),i+=c[240|s>>18]+c[128|s>>12&63]+c[128|s>>6&63]+c[128|63&s])}return i},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(u(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!=typeof n){if(u(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var i=e;return u(e)&&!u(n)&&(i=l(e,r)),u(e)&&u(n)?(n.forEach((function(n,i){if(a.call(e,i)){var o=e[i];o&&"object"==typeof o&&n&&"object"==typeof n?e[i]=t(o,n,r):e.push(n)}else e[i]=n})),e):Object.keys(n).reduce((function(e,i){var o=n[i];return a.call(e,i)?e[i]=t(e[i],o,r):e[i]=o,e}),i)}},h=String.prototype.replace,f=/%20/g,d={RFC1738:"RFC1738",RFC3986:"RFC3986"},m=p.assign({default:d.RFC3986,formatters:{RFC1738:function(t){return h.call(t,f,"+")},RFC3986:function(t){return String(t)}}},d),y=Object.prototype.hasOwnProperty,g={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},v=Array.isArray,b=Array.prototype.push,w=function(t,e){b.apply(t,v(e)?e:[e])},_=Date.prototype.toISOString,T=m.default,O={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:p.encode,encodeValuesOnly:!1,format:T,formatter:m.formatters[T],indices:!1,serializeDate:function(t){return _.call(t)},skipNulls:!1,strictNullHandling:!1},k=function t(e,n,r,i,o,s,a,u,c,l,h,f,d){var m=e;if("function"==typeof a?m=a(n,m):m instanceof Date?m=l(m):"comma"===r&&v(m)&&(m=p.maybeMap(m,(function(t){return t instanceof Date?l(t):t})).join(",")),null===m){if(i)return s&&!f?s(n,O.encoder,d,"key"):n;m=""}if(function(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"symbol"==typeof t||"bigint"==typeof t}(m)||p.isBuffer(m))return s?[h(f?n:s(n,O.encoder,d,"key"))+"="+h(s(m,O.encoder,d,"value"))]:[h(n)+"="+h(String(m))];var y,g=[];if(void 0===m)return g;if(v(a))y=a;else{var b=Object.keys(m);y=u?b.sort(u):b}for(var _=0;_<y.length;++_){var T=y[_],k=m[T];if(!o||null!==k){var x=v(m)?"function"==typeof r?r(n,T):n:n+(c?"."+T:"["+T+"]");w(g,t(k,x,r,i,o,s,a,u,c,l,h,f,d))}}return g},x=Object.prototype.hasOwnProperty,j=Array.isArray,C={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:p.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},S=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},A=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},E=function(t,e,n,r){if(t){var i=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),a=s?i.slice(0,s.index):i,u=[];if(a){if(!n.plainObjects&&x.call(Object.prototype,a)&&!n.allowPrototypes)return;u.push(a)}for(var c=0;n.depth>0&&null!==(s=o.exec(i))&&c<n.depth;){if(c+=1,!n.plainObjects&&x.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+i.slice(s.index)+"]"),function(t,e,n,r){for(var i=r?e:A(e,n),o=t.length-1;o>=0;--o){var s,a=t[o];if("[]"===a&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var u="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(u,10);n.parseArrays||""!==u?!isNaN(c)&&a!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[])[c]=i:s[u]=i:s={0:i}}i=s}return i}(u,e,n,r)}},D=function(t,e){var n,r=t,i=function(t){if(!t)return O;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||O.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=m.default;if(void 0!==t.format){if(!y.call(m.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=m.formatters[n],i=O.filter;return("function"==typeof t.filter||v(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:O.addQueryPrefix,allowDots:void 0===t.allowDots?O.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:O.charsetSentinel,delimiter:void 0===t.delimiter?O.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:O.encode,encoder:"function"==typeof t.encoder?t.encoder:O.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:O.encodeValuesOnly,filter:i,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:O.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:O.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:O.strictNullHandling}}(e);"function"==typeof i.filter?r=(0,i.filter)("",r):v(i.filter)&&(n=i.filter);var o,s=[];if("object"!=typeof r||null===r)return"";o=e&&e.arrayFormat in g?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var a=g[o];n||(n=Object.keys(r)),i.sort&&n.sort(i.sort);for(var u=0;u<n.length;++u){var c=n[u];i.skipNulls&&null===r[c]||w(s,k(r[c],c,a,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.formatter,i.encodeValuesOnly,i.charset))}var l=s.join(i.delimiter),p=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&("iso-8859-1"===i.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),l.length>0?p+l:""},R=o((function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}})),I=U;U.default=U,U.stable=L,U.stableStringify=L;var q=[],P=[];function U(t,e,n){var r;for(function t(e,n,r,i){var o;if("object"==typeof e&&null!==e){for(o=0;o<r.length;o++)if(r[o]===e){var s=Object.getOwnPropertyDescriptor(i,n);return void(void 0!==s.get?s.configurable?(Object.defineProperty(i,n,{value:"[Circular]"}),q.push([i,n,e,s])):P.push([e,n]):(i[n]="[Circular]",q.push([i,n,e])))}if(r.push(e),Array.isArray(e))for(o=0;o<e.length;o++)t(e[o],o,r,e);else{var a=Object.keys(e);for(o=0;o<a.length;o++){var u=a[o];t(e[u],u,r,e)}}r.pop()}}(t,"",[],void 0),r=0===P.length?JSON.stringify(t,e,n):JSON.stringify(t,N(e),n);0!==q.length;){var i=q.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}return r}function M(t,e){return t<e?-1:t>e?1:0}function L(t,e,n){var r,i=function t(e,n,r,i){var o;if("object"==typeof e&&null!==e){for(o=0;o<r.length;o++)if(r[o]===e){var s=Object.getOwnPropertyDescriptor(i,n);return void(void 0!==s.get?s.configurable?(Object.defineProperty(i,n,{value:"[Circular]"}),q.push([i,n,e,s])):P.push([e,n]):(i[n]="[Circular]",q.push([i,n,e])))}if("function"==typeof e.toJSON)return;if(r.push(e),Array.isArray(e))for(o=0;o<e.length;o++)t(e[o],o,r,e);else{var a={},u=Object.keys(e).sort(M);for(o=0;o<u.length;o++){var c=u[o];t(e[c],c,r,e),a[c]=e[c]}if(void 0===i)return a;q.push([i,n,e]),i[n]=a}r.pop()}}(t,"",[],void 0)||t;for(r=0===P.length?JSON.stringify(i,e,n):JSON.stringify(i,N(e),n);0!==q.length;){var o=q.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return r}function N(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(P.length>0)for(var r=0;r<P.length;r++){var i=P[r];if(i[1]===e&&i[0]===n){n="[Circular]",P.splice(r,1);break}}return t.call(this,e,n)}}function B(t){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var z=function(t){return null!==t&&"object"===B(t)};function H(t){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var F=V;function V(t){if(t)return function(t){for(var e in V.prototype)Object.prototype.hasOwnProperty.call(V.prototype,e)&&(t[e]=V.prototype[e]);return t}(t)}V.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},V.prototype.parse=function(t){return this._parser=t,this},V.prototype.responseType=function(t){return this._responseType=t,this},V.prototype.serialize=function(t){return this._serializer=t,this},V.prototype.timeout=function(t){if(!t||"object"!==H(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},V.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var W=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];V.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&W.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},V.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},V.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(t,e){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)e(n.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}})),r.end((function(n,r){n?e(n):t(r)}))}))}return this._fullfilledPromise.then(t,e)},V.prototype.catch=function(t){return this.then(void 0,t)},V.prototype.use=function(t){return t(this),this},V.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},V.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},V.prototype.get=function(t){return this._header[t.toLowerCase()]},V.prototype.getHeader=V.prototype.get,V.prototype.set=function(t,e){if(z(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},V.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},V.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(z(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},V.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},V.prototype._auth=function(t,e,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},V.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},V.prototype.redirects=function(t){return this._maxRedirects=t,this},V.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},V.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},V.prototype.send=function(t){var e=z(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&z(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)||n||this.type("json"),this},V.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},V.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.slice(e+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,e)+"?"+n.join("&")}}},V.prototype._appendQueryString=function(){console.warn("Unsupported")},V.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},V.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))};var J=$;function $(t){if(t)return function(t){for(var e in $.prototype)Object.prototype.hasOwnProperty.call($.prototype,e)&&(t[e]=$.prototype[e]);return t}(t)}function X(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Z(){this._defaults=[]}$.prototype.get=function(t){return this.header[t.toLowerCase()]},$.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=e.split(/ *; */).shift();var n=function(t){return t.split(/ *; */).reduce((function(t,e){var n=e.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(t[r]=i),t}),{})}(e);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{t.link&&(this.links=function(t){return t.split(/ *, */).reduce((function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t}),{})}(t.link))}catch(t){}},$.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t},["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(t){Z.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._defaults.push({fn:t,args:n}),this}})),Z.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,function(t){return function(t){if(Array.isArray(t))return X(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return X(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(t,void 0):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.args))}))};for(var K=Z,Q=o((function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r;function i(){}"undefined"!=typeof window?r=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),r=void 0):r=self,t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1===arguments.length?new e.Request("GET",t):new e.Request(t,n)};var o=e=t.exports;e.Request=h,o.getXHR=function(){if(r.XMLHttpRequest&&(!r.location||"file:"!==r.location.protocol||!r.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw new Error("Browser-only version of superagent could not find XHR")};var s="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function a(t){if(!z(t))return t;var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&u(e,n,t[n]);return e.join("&")}function u(t,e,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){u(t,e,n)}));else if(z(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&u(t,"".concat(e,"[").concat(r,"]"),n[r]);else t.push(encodeURI(e)+"="+encodeURIComponent(n));else t.push(encodeURI(e))}function c(t){for(var e,n,r={},i=t.split("&"),o=0,s=i.length;o<s;++o)-1===(n=(e=i[o]).indexOf("="))?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function l(t){return/[/+]json($|[^-\w])/.test(t)}function p(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,n,r,i,o=t.split(/\r?\n/),a={},u=0,c=o.length;u<c;++u)-1!==(e=(n=o[u]).indexOf(":"))&&(r=n.slice(0,e).toLowerCase(),i=s(n.slice(e+1)),a[r]=i);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function h(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,r=null;try{r=new p(n)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",r);try{n._isResponseOK(r)||(t=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=r,t.status=r.status,n.callback(t,r)):n.callback(null,r)}))}function f(t,e,n){var r=o("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}o.serializeObject=a,o.parseString=c,o.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},o.serialize={"application/x-www-form-urlencoded":a,"application/json":I},o.parse={"application/x-www-form-urlencoded":c,"application/json":JSON.parse},J(p.prototype),p.prototype._parseBody=function(t){var e=o.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&l(this.type)&&(e=o.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},p.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot ".concat(e," ").concat(n," (").concat(this.status,")"),i=new Error(r);return i.status=this.status,i.method=e,i.url=n,i},o.Response=p,R(h.prototype),F(h.prototype),h.prototype.type=function(t){return this.set("Content-Type",o.types[t]||t),this},h.prototype.accept=function(t){return this.set("Accept",o.types[t]||t),this},h.prototype.auth=function(t,e,r){1===arguments.length&&(e=""),"object"===n(e)&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var i=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,r,i)},h.prototype.query=function(t){return"string"!=typeof t&&(t=a(t)),t&&this._query.push(t),this},h.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},h.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},h.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},h.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},h.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},h.prototype.ca=h.prototype.agent,h.prototype.buffer=h.prototype.ca,h.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},h.prototype.pipe=h.prototype.write,h.prototype._isHost=function(t){return t&&"object"===n(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},h.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||i,this._finalizeQueryString(),this._end()},h.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},h.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=o.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",r.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",r.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],s=this._serializer||o.serialize[i?i.split(";")[0]:""];!s&&l(i)&&(s=o.serialize["application/json"]),s&&(n=s(n))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},o.agent=function(){return new K},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){K.prototype[t.toLowerCase()]=function(e,n){var r=new o.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}})),K.prototype.del=K.prototype.delete,o.get=function(t,e,n){var r=o("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},o.head=function(t,e,n){var r=o("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},o.options=function(t,e,n){var r=o("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},o.del=f,o.delete=f,o.patch=function(t,e,n){var r=o("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},o.post=function(t,e,n){var r=o("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},o.put=function(t,e,n){var r=o("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}})),G=(Q.Request,[]),Y=[],tt=("undefined"!=typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),et=0,nt=tt.length;et<nt;++et)G[et]=tt[et],Y[tt.charCodeAt(et)]=et;function rt(t,e,n){for(var r,i,o=[],s=e;s<n;s+=3)r=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(G[(i=r)>>18&63]+G[i>>12&63]+G[i>>6&63]+G[63&i]);return o.join("")}Y["-".charCodeAt(0)]=62,Y["_".charCodeAt(0)]=63;var it=function(t){return function(t){for(var e,n=t.length,r=n%3,i=[],o=0,s=n-r;o<s;o+=16383)i.push(rt(t,o,o+16383>s?s:o+16383));return 1===r?(e=t[n-1],i.push(G[e>>2]+G[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(G[e>>10]+G[e>>4&63]+G[e<<2&63]+"=")),i.join("")}(function(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}(t)).replace(/\+/g,"-").replace(/\//g,"_")},ot={raw:"9.16.2"},st=Object.prototype.toString;function at(t,e,n,r){if(n="array"===n?"object":n,t&&typeof t[e]!==n)throw new Error(r)}function ut(t,e,n){if(typeof t!==e)throw new Error(n)}function ct(t,e,n){if(-1===e.indexOf(t))throw new Error(n)}var lt={check:function(t,e,n){if(e.optional&&!t||ut(t,e.type,e.message),"object"===e.type&&n)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=r[i];n[o].optional&&!t[o]||n[o].condition&&!n[o].condition(t)||(at(t,o,n[o].type,n[o].message),n[o].values&&ct(t[o],n[o].values,n[o].value_message))}},attribute:at,variable:ut,value:ct,isArray:function(t){return this.supportsIsArray()?Array.isArray(t):"[object Array]"===st.call(t)},supportsIsArray:function(){return null!=Array.isArray}};function pt(t){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i=Object.keys(Object(r)),o=0,s=i.length;o<s;o++){var a=i[o],u=Object.getOwnPropertyDescriptor(r,a);void 0!==u&&u.enumerable&&(e[a]=r[a])}}return e}var ht=function(){return Object.assign?Object.assign:pt};function ft(t,e){return e.reduce((function(e,n){return t[n]&&(e[n]=t[n]),e}),{})}function dt(t){var e=[];for(var n in t)e.push(t[n]);return e}function mt(){var t=dt(arguments);return t.unshift({}),ht().apply(void 0,t)}function yt(t){var e=t.match(/^(https?:|file:|chrome-extension:)\/\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return e&&{href:t,protocol:e[1],host:e[2],hostname:e[3],port:e[4],pathname:e[5],search:e[6],hash:e[7]}}function gt(t,e){var n=mt(t);return t[e]&&(n[e]=t[e].trim()),n}var vt={toSnakeCase:function t(e,n){return"object"!=typeof e||lt.isArray(e)||null===e?e:(n=n||[],Object.keys(e).reduce((function(r,i){return r[-1===n.indexOf(i)?function(t){for(var e,n="",r=0,i=!0,o=!0;r<t.length;)e=t.charCodeAt(r),!o&&e>=65&&e<=90||!i&&e>=48&&e<=57?(n+="_",n+=t[r].toLowerCase()):n+=t[r].toLowerCase(),i=e>=48&&e<=57,o=e>=65&&e<=90,r++;return n}(i):i]=t(e[i]),r}),{}))},toCamelCase:function t(e,n,r){return"object"!=typeof e||lt.isArray(e)||null===e?e:(n=n||[],r=r||{},Object.keys(e).reduce((function(i,o){var s,a=-1===n.indexOf(o)?(s=o.split("_")).reduce((function(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)}),s.shift()):o;return i[a]=t(e[a]||e[o],[],r),r.keepOriginal&&(i[o]=t(e[o],[],r)),i}),{}))},blacklist:function(t,e){return Object.keys(t).reduce((function(n,r){return-1===e.indexOf(r)&&(n[r]=t[r]),n}),{})},merge:function(t,e){return{base:e?ft(t,e):t,with:function(t,e){return t=e?ft(t,e):t,mt(this.base,t)}}},pick:ft,getKeysNotIn:function(t,e){var n=[];for(var r in t)-1===e.indexOf(r)&&n.push(r);return n},extend:mt,getOriginFromUrl:function(t){if(t){var e=yt(t);if(!e)return null;var n=e.protocol+"//"+e.hostname;return e.port&&(n+=":"+e.port),n}},getLocationFromUrl:yt,trimUserDetails:function(t){return function(t,e){return["username","email","phoneNumber"].reduce(gt,t)}(t)},updatePropertyOn:function t(e,n,r){"string"==typeof n&&(n=n.split("."));var i=n[0];e.hasOwnProperty(i)&&(1===n.length?e[i]=r:t(e[i],n.slice(1),r))}};function bt(t){this.request=t,this.method=t.method,this.url=t.url,this.body=t._data,this.headers=t._header}function wt(t){this.request=t}function _t(t){this._sendTelemetry=!1!==t._sendTelemetry||t._sendTelemetry,this._telemetryInfo=t._telemetryInfo||null,this._timesToRetryFailedRequests=t._timesToRetryFailedRequests,this.headers=t.headers||{},this._universalLoginPage=t.universalLoginPage}function Tt(){return window}bt.prototype.abort=function(){this.request.abort()},bt.prototype.getMethod=function(){return this.method},bt.prototype.getBody=function(){return this.body},bt.prototype.getUrl=function(){return this.url},bt.prototype.getHeaders=function(){return this.headers},wt.prototype.set=function(t,e){return this.request=this.request.set(t,e),this},wt.prototype.send=function(t){return this.request=this.request.send(vt.trimUserDetails(t)),this},wt.prototype.withCredentials=function(){return this.request=this.request.withCredentials(),this},wt.prototype.end=function(t){return this.request.end(t),new bt(this.request)},_t.prototype.setCommonConfiguration=function(t,e){if(e=e||{},this._timesToRetryFailedRequests>0&&(t=t.retry(this._timesToRetryFailedRequests)),e.noHeaders)return t;var n=this.headers;t=t.set("Content-Type","application/json");for(var r=Object.keys(this.headers),i=0;i<r.length;i++)t=t.set(r[i],n[r[i]]);return this._sendTelemetry&&(t=t.set("Auth0-Client",this.getTelemetryData())),t},_t.prototype.getTelemetryData=function(){var t=this._universalLoginPage?"auth0.js-ulp":"auth0.js",e={name:t,version:ot.raw};this._telemetryInfo&&((e=vt.extend({},this._telemetryInfo)).env=vt.extend({},this._telemetryInfo.env),e.env[t]=ot.raw);var n=JSON.stringify(e);return it(n)},_t.prototype.get=function(t,e){return new wt(this.setCommonConfiguration(Q.get(t),e))},_t.prototype.post=function(t,e){return new wt(this.setCommonConfiguration(Q.post(t),e))},_t.prototype.patch=function(t,e){return new wt(this.setCommonConfiguration(Q.patch(t),e))};var Ot={redirect:function(t){Tt().location=t},getDocument:function(){return Tt().document},getWindow:Tt,getOrigin:function(){var t=Tt().location,e=t.origin;return e||(e=vt.getOriginFromUrl(t.href)),e}};function kt(){}kt.prototype.getItem=function(){return null},kt.prototype.removeItem=function(){},kt.prototype.setItem=function(){};var xt=o((function(t,e){var n;n=function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function i(){}function o(e,n,o){if("undefined"!=typeof document){"number"==typeof(o=t({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in o)o[u]&&(a+="; "+u,!0!==o[u]&&(a+="="+o[u].split(";")[0]));return document.cookie=e+"="+n+a}}function s(t,n){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),u=a.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var c=e(a[0]);if(u=(r.read||r)(u,c)||e(u),n)try{u=JSON.parse(u)}catch(t){}if(i[c]=u,t===c)break}catch(t){}}return t?i[t]:i}}return i.set=o,i.get=function(t){return s(t,!1)},i.getJSON=function(t){return s(t,!0)},i.remove=function(e,n){o(e,"",t(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}((function(){}))},t.exports=n()}));function jt(){}function Ct(t){this.disableWarnings=t.disableWarnings}function St(t){if(this.warn=new Ct({}),this.storage=new jt,!0===t.__tryLocalStorageFirst)try{var e=Ot.getWindow().localStorage;e&&(this.storage=e)}catch(t){this.warn.warning(t),this.warn.warning("Can't use localStorage. Using CookieStorage instead.")}}function At(t){this.handler=new St(t)}function Et(t){this.storage=new At(t)}function Dt(t,e){return{error:t,errorDescription:e}}jt.prototype.getItem=function(t){return xt.get(t)},jt.prototype.removeItem=function(t){xt.remove(t)},jt.prototype.setItem=function(t,e,n){var r=vt.extend({expires:1},n);"https:"===Ot.getWindow().location.protocol&&(r.secure=!0),xt.set(t,e,r)},Ct.prototype.warning=function(t){this.disableWarnings||console.warn(t)},St.prototype.failover=function(){this.storage instanceof kt?this.warn.warning("DummyStorage: ignore failover"):this.storage instanceof jt?(this.warn.warning("CookieStorage: failing over DummyStorage"),this.storage=new kt):(this.warn.warning("LocalStorage: failing over CookieStorage"),this.storage=new jt)},St.prototype.getItem=function(t){try{return this.storage.getItem(t)}catch(e){return this.warn.warning(e),this.failover(),this.getItem(t)}},St.prototype.removeItem=function(t){try{return this.storage.removeItem(t)}catch(e){return this.warn.warning(e),this.failover(),this.removeItem(t)}},St.prototype.setItem=function(t,e,n){try{return this.storage.setItem(t,e,n)}catch(r){return this.warn.warning(r),this.failover(),this.setItem(t,e,n)}},At.prototype.getItem=function(t){var e=this.handler.getItem(t);try{return JSON.parse(e)}catch(t){return e}},At.prototype.removeItem=function(t){return this.handler.removeItem(t)},At.prototype.setItem=function(t,e,n){var r=JSON.stringify(e);return this.handler.setItem(t,r,n)},Et.prototype.set=function(t,e){var n={lastUsedConnection:t,lastUsedSub:e};this.storage.setItem("auth0.ssodata",JSON.stringify(n))},Et.prototype.get=function(){var t=this.storage.getItem("auth0.ssodata");if(t)return JSON.parse(t)};var Rt={buildResponse:Dt,invalidToken:function(t){return Dt("invalid_token",t)}};function It(t,e){return(e=e||{}).ignoreCasing=!!e.ignoreCasing&&e.ignoreCasing,function(n,r){var i;return n||r?(!n&&r.err&&(n=r.err,r=null),!n&&r.error&&(n=r,r=null),n?(i={original:n},vt.updatePropertyOn(i,"original.response.req._data.password","*****"),n.response&&n.response.statusCode&&(i.statusCode=n.response.statusCode),n.response&&n.response.statusText&&(i.statusText=n.response.statusText),n.response&&n.response.body&&(n=n.response.body),n.err&&(n=n.err),i.code=n.code||n.error||n.error_code||n.status||null,i.description=n.errorDescription||n.error_description||n.description||n.error||n.details||n.err||null,e.forceLegacyError&&(i.error=i.code,i.error_description=i.description),n.error_codes&&n.error_details&&(i.errorDetails={codes:n.error_codes,details:n.error_details}),n.name&&(i.name=n.name),n.policy&&(i.policy=n.policy),t(i)):!r.type||"text/html"!==r.type&&"text/plain"!==r.type?e.ignoreCasing?t(null,r.body||r):t(null,vt.toCamelCase(r.body||r,[],{keepOriginal:e.keepOriginalCasing})):t(null,r.text)):t(Rt.buildResponse("generic_error","Something went wrong"))}}var qt=["realm","audience","otp","client_id","client_secret","redirect_uri","scope","code","grant_type","username","password","refresh_token","assertion","client_assertion","client_assertion_type","code_verifier"],Pt=["connection","connection_scope","auth0Client","owp","device","realm","organization","invitation","protocol","_csrf","_intstate","login_ticket","client_id","response_type","response_mode","redirect_uri","audience","scope","state","nonce","display","prompt","screen_hint","max_age","ui_locales","claims_locales","id_token_hint","login_hint","acr_values","claims","registration","request","request_uri","code_challenge","code_challenge_method","access_type","display"],Ut="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function Mt(t){var e={exports:{}};return t(e,e.exports),e.exports}var Lt=Mt((function(t,e){t.exports=function(){function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,i=void 0,o=void 0,s=function(t,e){f[n]=t,f[n+1]=e,2===(n+=2)&&(o?o(d):b())},a="undefined"!=typeof window?window:void 0,u=a||{},c=u.MutationObserver||u.WebKitMutationObserver,l="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var t=setTimeout;return function(){return t(d,1)}}var f=new Array(1e3);function d(){for(var t=0;t<n;t+=2)(0,f[t])(f[t+1]),f[t]=void 0,f[t+1]=void 0;n=0}var m,y,g,v,b=void 0;function w(t,e){var n=this,r=new this.constructor(O);void 0===r[T]&&q(r);var i=n._state;if(i){var o=arguments[i-1];s((function(){return R(i,r,o,n._result)}))}else E(n,r,t,e);return r}function _(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(O);return j(e,t),e}b=l?function(){return r.nextTick(d)}:c?(y=0,g=new c(d),v=document.createTextNode(""),g.observe(v,{characterData:!0}),function(){v.data=y=++y%2}):p?((m=new MessageChannel).port1.onmessage=d,function(){return m.port2.postMessage(0)}):void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(d)}:h()}catch(t){return h()}}():h();var T=Math.random().toString(36).substring(2);function O(){}var k=void 0;function x(e,n,r){n.constructor===e.constructor&&r===w&&n.constructor.resolve===_?function(t,e){1===e._state?S(t,e._result):2===e._state?A(t,e._result):E(e,void 0,(function(e){return j(t,e)}),(function(e){return A(t,e)}))}(e,n):void 0===r?S(e,n):t(r)?function(t,e,n){s((function(t){var r=!1,i=function(n,i,o,s){try{n.call(i,(function(n){r||(r=!0,e!==n?j(t,n):S(t,n))}),(function(e){r||(r=!0,A(t,e))}))}catch(t){return t}}(n,e);!r&&i&&(r=!0,A(t,i))}),t)}(e,n,r):S(e,n)}function j(t,e){if(t===e)A(t,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(r=e),null===r||"object"!==i&&"function"!==i)S(t,e);else{var n=void 0;try{n=e.then}catch(e){return void A(t,e)}x(t,e,n)}var r,i}function C(t){t._onerror&&t._onerror(t._result),D(t)}function S(t,e){t._state===k&&(t._result=e,t._state=1,0!==t._subscribers.length&&s(D,t))}function A(t,e){t._state===k&&(t._state=2,t._result=e,s(C,t))}function E(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+1]=n,i[o+2]=r,0===o&&t._state&&s(D,t)}function D(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,s=0;s<e.length;s+=3)i=e[s+n],(r=e[s])?R(n,r,i,o):i(o);t._subscribers.length=0}}function R(e,n,r,i){var o=t(r),s=void 0,a=void 0,u=!0;if(o){try{s=r(i)}catch(e){u=!1,a=e}if(n===s)return void A(n,new TypeError("A promises callback cannot return that same promise."))}else s=i;n._state!==k||(o&&u?j(n,s):!1===u?A(n,a):1===e?S(n,s):2===e&&A(n,s))}var I=0;function q(t){t[T]=I++,t._state=void 0,t._result=void 0,t._subscribers=[]}var P=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(O),this.promise[T]||q(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&S(this.promise,this._result))):A(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===k&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===_){var i=void 0,o=void 0,s=!1;try{i=t.then}catch(t){s=!0,o=t}if(i===w&&t._state!==k)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===U){var a=new n(O);s?A(a,o):x(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===k&&(this._remaining--,2===t?A(r,n):this._result[e]=n),0===this._remaining&&S(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,(function(t){return n._settledAt(1,e,t)}),(function(t){return n._settledAt(2,e,t)}))},t}(),U=function(){function e(t){this[T]=I++,this._result=this._state=void 0,this._subscribers=[],O!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){j(t,e)}),(function(e){A(t,e)}))}catch(e){A(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this,r=n.constructor;return t(e)?n.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):n.then(e,e)},e}();return U.prototype.then=w,U.all=function(t){return new P(this,t).promise},U.race=function(t){var n=this;return e(t)?new n((function(e,r){for(var i=t.length,o=0;o<i;o++)n.resolve(t[o]).then(e,r)})):new n((function(t,e){return e(new TypeError("You must pass an array to race."))}))},U.resolve=_,U.reject=function(t){var e=new this(O);return A(e,t),e},U._setScheduler=function(t){o=t},U._setAsap=function(t){s=t},U._asap=s,U.polyfill=function(){var t=void 0;if(void 0!==Ut)t=Ut;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=U},U.Promise=U,U}()})),Nt=Mt((function(t,e){var n;t.exports=n=n||function(t,e){var n=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},s=i.WordArray=o.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++)e[r+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else for(o=0;o<i;o+=4)e[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],i=function(e){e=e;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r;return i/=4294967296,(i+=.5)*(t.random()>.5?1:-1)}},o=0;o<e;o+=4){var a=i(4294967296*(n||t.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,e)}}),a=r.enc={},u=a.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new s.init(n,e/2)}},c=a.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++)r.push(String.fromCharCode(e[i>>>2]>>>24-i%4*8&255));return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new s.init(n,e)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},p=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),u=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*o,c=t.min(4*u,i);if(u){for(var l=0;l<u;l+=o)this._doProcessBlock(r,l);var p=r.splice(0,u);n.sigBytes-=c}return new s.init(p,c)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});i.Hasher=p.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new h.HMAC.init(t,n).finalize(e)}}});var h=r.algo={};return r}(Math)})),Bt=Mt((function(t,e){var n;t.exports=(n=Nt,function(t){var e=n,r=e.lib,i=r.WordArray,o=r.Hasher,s=e.algo,a=[],u=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(a[i]=n(t.pow(r,.5))),u[i]=n(t.pow(r,1/3)),i++),r++}();var c=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],l=n[5],p=n[6],h=n[7],f=0;f<64;f++){if(f<16)c[f]=0|t[e+f];else{var d=c[f-15],m=c[f-2];c[f]=((d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+c[f-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+c[f-16]}var y=r&i^r&o^i&o,g=h+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&p)+u[f]+c[f];h=p,p=l,l=a,a=s+g|0,s=o,o=i,i=r,r=g+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+l|0,n[6]=n[6]+p|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),n.SHA256)})),zt=Mt((function(t,e){var n,r;t.exports=(r=(n=Nt).lib.WordArray,n.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t){var e=t.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(e=a)}return function(t,e,n){for(var i=[],o=0,s=0;s<e;s++)if(s%4){var a=n[t.charCodeAt(s-1)]<<s%4*2,u=n[t.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=(a|u)<<24-o%4*8,o++}return r.create(i,o)}(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)})),Ht=Mt((function(t,e){t.exports=Nt.enc.Hex})),Ft=Mt((function(t,e){(function(){var e;function n(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):this.fromString(t,null==e&&"string"!=typeof t?256:e))}function r(){return new n(null)}var i="undefined"!=typeof navigator;i&&"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(t,e,n,r,i,o){for(var s=32767&e,a=e>>15;--o>=0;){var u=32767&this[t],c=this[t++]>>15,l=a*u+c*s;i=((u=s*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i},e=30):i&&"Netscape"!=navigator.appName?(n.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var s=e*this[t++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},e=26):(n.prototype.am=function(t,e,n,r,i,o){for(var s=16383&e,a=e>>14;--o>=0;){var u=16383&this[t],c=this[t++]>>14,l=a*u+c*s;i=((u=s*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+a*c,n[r++]=268435455&u}return i},e=28),n.prototype.DB=e,n.prototype.DM=(1<<e)-1,n.prototype.DV=1<<e,n.prototype.FV=Math.pow(2,52),n.prototype.F1=52-e,n.prototype.F2=2*e-52;var o,s,a=new Array;for(o="0".charCodeAt(0),s=0;s<=9;++s)a[o++]=s;for(o="a".charCodeAt(0),s=10;s<36;++s)a[o++]=s;for(o="A".charCodeAt(0),s=10;s<36;++s)a[o++]=s;function u(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function c(t,e){var n=a[t.charCodeAt(e)];return null==n?-1:n}function l(t){var e=r();return e.fromInt(t),e}function p(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function h(t){this.m=t}function f(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function d(t,e){return t&e}function m(t,e){return t|e}function y(t,e){return t^e}function g(t,e){return t&~e}function v(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function b(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function w(){}function _(t){return t}function T(t){this.r2=r(),this.q3=r(),n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}h.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},h.prototype.revert=function(t){return t},h.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},h.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},h.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},f.prototype.convert=function(t){var e=r();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e},f.prototype.revert=function(t){var e=r();return t.copyTo(e),this.reduce(e),e},f.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},f.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},f.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},n.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},n.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},n.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var i=t.length,o=!1,s=0;--i>=0;){var a=8==r?255&t[i]:c(t,i);a<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},n.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},n.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},n.prototype.lShiftTo=function(t,e){var n,r=t%this.DB,i=this.DB-r,o=(1<<i)-1,s=Math.floor(t/this.DB),a=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)e[n+s+1]=this[n]>>i|a,a=(this[n]&o)<<r;for(n=s-1;n>=0;--n)e[n]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},n.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&o)<<i,e[s-n]=this[s]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}},n.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},n.prototype.multiplyTo=function(t,e){var r=this.abs(),i=t.abs(),o=r.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o<i.t;++o)e[o+r.t]=r.am(0,i[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)},n.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},n.prototype.divRemTo=function(t,e,i){var o=t.abs();if(!(o.t<=0)){var s=this.abs();if(s.t<o.t)return null!=e&&e.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=r());var a=r(),u=this.s,c=t.s,l=this.DB-p(o[o.t-1]);l>0?(o.lShiftTo(l,a),s.lShiftTo(l,i)):(o.copyTo(a),s.copyTo(i));var h=a.t,f=a[h-1];if(0!=f){var d=f*(1<<this.F1)+(h>1?a[h-2]>>this.F2:0),m=this.FV/d,y=(1<<this.F1)/d,g=1<<this.F2,v=i.t,b=v-h,w=null==e?r():e;for(a.dlShiftTo(b,w),i.compareTo(w)>=0&&(i[i.t++]=1,i.subTo(w,i)),n.ONE.dlShiftTo(h,w),w.subTo(a,a);a.t<h;)a[a.t++]=0;for(;--b>=0;){var _=i[--v]==f?this.DM:Math.floor(i[v]*m+(i[v-1]+g)*y);if((i[v]+=a.am(0,_,i,b,0,h))<_)for(a.dlShiftTo(b,w),i.subTo(w,i);i[v]<--_;)i.subTo(w,i)}null!=e&&(i.drShiftTo(h,e),u!=c&&n.ZERO.subTo(e,e)),i.t=h,i.clamp(),l>0&&i.rShiftTo(l,i),u<0&&n.ZERO.subTo(i,i)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(t,e){if(t>4294967295||t<1)return n.ONE;var i=r(),o=r(),s=e.convert(this),a=p(t)-1;for(s.copyTo(i);--a>=0;)if(e.sqrTo(i,o),(t&1<<a)>0)e.mulTo(o,s,i);else{var u=i;i=o,o=u}return e.revert(i)},n.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(i=!0,o=u(n));s>=0;)a<e?(n=(this[s]&(1<<a)-1)<<e-a,n|=this[--s]>>(a+=this.DB-e)):(n=this[s]>>(a-=e)&r,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(o+=u(n));return i?o:"0"},n.prototype.negate=function(){var t=r();return n.ZERO.subTo(this,t),t},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(t){var e=r();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e},n.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new h(e):new f(e),this.exp(t,n)},n.ZERO=l(0),n.ONE=l(1),w.prototype.convert=_,w.prototype.revert=_,w.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},w.prototype.sqrTo=function(t,e){t.squareTo(e)},T.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=r();return t.copyTo(e),this.reduce(e),e},T.prototype.revert=function(t){return t},T.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},T.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},T.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var O,k,x,j=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],C=(1<<26)/j[j.length-1];function S(){var t;t=(new Date).getTime(),k[x++]^=255&t,k[x++]^=t>>8&255,k[x++]^=t>>16&255,k[x++]^=t>>24&255,x>=P&&(x-=P)}if(n.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},n.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),i=l(n),o=r(),s=r(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(n+s.intValue()).toString(t).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(t)+a},n.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),o=!1,s=0,a=0,u=0;u<t.length;++u){var l=c(t,u);l<0?"-"==t.charAt(u)&&0==this.signum()&&(o=!0):(a=e*a+l,++s>=r&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),o&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),m,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(n.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),e.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},n.prototype.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;r<o;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=o;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},n.prototype.changeBit=function(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},n.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},n.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},n.prototype.multiplyLowerTo=function(t,e,n){var r,i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,t[i],n,i,0,this.t);for(r=Math.min(t.t,e);i<r;++i)this.am(0,t[i],n,i,0,e-i);n.clamp()},n.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},n.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},n.prototype.millerRabin=function(t){var e=this.subtract(n.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var o=e.shiftRight(i);(t=t+1>>1)>j.length&&(t=j.length);for(var s=r(),a=0;a<t;++a){s.fromInt(j[Math.floor(Math.random()*j.length)]);var u=s.modPow(o,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(e)){for(var c=1;c++<i&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},n.prototype.clone=function(){var t=r();return this.copyTo(t),t},n.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},n.prototype.equals=function(t){return 0==this.compareTo(t)},n.prototype.min=function(t){return this.compareTo(t)<0?this:t},n.prototype.max=function(t){return this.compareTo(t)>0?this:t},n.prototype.and=function(t){var e=r();return this.bitwiseTo(t,d,e),e},n.prototype.or=function(t){var e=r();return this.bitwiseTo(t,m,e),e},n.prototype.xor=function(t){var e=r();return this.bitwiseTo(t,y,e),e},n.prototype.andNot=function(t){var e=r();return this.bitwiseTo(t,g,e),e},n.prototype.not=function(){for(var t=r(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},n.prototype.shiftLeft=function(t){var e=r();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},n.prototype.shiftRight=function(t){var e=r();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},n.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+v(this[t]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=b(this[n]^e);return t},n.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},n.prototype.setBit=function(t){return this.changeBit(t,m)},n.prototype.clearBit=function(t){return this.changeBit(t,g)},n.prototype.flipBit=function(t){return this.changeBit(t,y)},n.prototype.add=function(t){var e=r();return this.addTo(t,e),e},n.prototype.subtract=function(t){var e=r();return this.subTo(t,e),e},n.prototype.multiply=function(t){var e=r();return this.multiplyTo(t,e),e},n.prototype.divide=function(t){var e=r();return this.divRemTo(t,e,null),e},n.prototype.remainder=function(t){var e=r();return this.divRemTo(t,null,e),e},n.prototype.divideAndRemainder=function(t){var e=r(),n=r();return this.divRemTo(t,e,n),new Array(e,n)},n.prototype.modPow=function(t,e){var n,i,o=t.bitLength(),s=l(1);if(o<=0)return s;n=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new h(e):e.isEven()?new T(e):new f(e);var a=new Array,u=3,c=n-1,d=(1<<n)-1;if(a[1]=i.convert(this),n>1){var m=r();for(i.sqrTo(a[1],m);u<=d;)a[u]=r(),i.mulTo(m,a[u-2],a[u]),u+=2}var y,g,v=t.t-1,b=!0,w=r();for(o=p(t[v])-1;v>=0;){for(o>=c?y=t[v]>>o-c&d:(y=(t[v]&(1<<o+1)-1)<<c-o,v>0&&(y|=t[v-1]>>this.DB+o-c)),u=n;0==(1&y);)y>>=1,--u;if((o-=u)<0&&(o+=this.DB,--v),b)a[y].copyTo(s),b=!1;else{for(;u>1;)i.sqrTo(s,w),i.sqrTo(w,s),u-=2;u>0?i.sqrTo(s,w):(g=s,s=w,w=g),i.mulTo(w,a[y],s)}for(;v>=0&&0==(t[v]&1<<o);)i.sqrTo(s,w),g=s,s=w,w=g,--o<0&&(o=this.DB-1,--v)}return i.revert(s)},n.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var r=t.clone(),i=this.clone(),o=l(1),s=l(0),a=l(0),u=l(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(r,i),e&&a.subTo(o,a),u.subTo(s,u))}return 0!=i.compareTo(n.ONE)?n.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},n.prototype.pow=function(t){return this.exp(t,new w)},n.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},n.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=j[j.length-1]){for(e=0;e<j.length;++e)if(n[0]==j[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<j.length;){for(var r=j[e],i=e+1;i<j.length&&r<C;)r*=j[i++];for(r=n.modInt(r);e<i;)if(r%j[e++]==0)return!1}return n.millerRabin(t)},n.prototype.square=function(){var t=r();return this.squareTo(t),t},n.prototype.Barrett=T,null==k){var A;if(k=new Array,x=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var E=new Uint8Array(32);for(window.crypto.getRandomValues(E),A=0;A<32;++A)k[x++]=E[A]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var D=window.crypto.random(32);for(A=0;A<D.length;++A)k[x++]=255&D.charCodeAt(A)}for(;x<P;)A=Math.floor(65536*Math.random()),k[x++]=A>>>8,k[x++]=255&A;x=0,S()}function R(){if(null==O){for(S(),(O=new q).init(k),x=0;x<k.length;++x)k[x]=0;x=0}return O.next()}function I(){}function q(){this.i=0,this.j=0,this.S=new Array}I.prototype.nextBytes=function(t){var e;for(e=0;e<t.length;++e)t[e]=R()},q.prototype.init=function(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)r=this.S[e],this.S[e]=this.S[n=n+this.S[e]+t[e%t.length]&255],this.S[n]=r;this.i=0,this.j=0},q.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]};var P=256;t.exports={default:n,BigInteger:n,SecureRandom:I}}).call(Ut)})),Vt={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},Wt={sha256:Bt};function Jt(t,e){if(this.n=null,this.e=0,!(null!=t&&null!=e&&t.length>0&&e.length>0))throw new Error("Invalid key data");this.n=new Ft.BigInteger(t,16),this.e=parseInt(e,16)}Jt.prototype.verify=function(t,e){e=e.replace(/[^0-9a-f]|[\s\n]]/gi,"");var n=new Ft.BigInteger(e,16);if(n.bitLength()>this.n.bitLength())throw new Error("Signature does not match with the key modulus.");var r=function(t){for(var e in Vt){var n=Vt[e],r=n.length;if(t.substring(0,r)===n)return{alg:e,hash:t.substring(r)}}return[]}(n.modPowInt(this.e,this.n).toString(16).replace(/^1f+00/,""));if(0===r.length)return!1;if(!Wt.hasOwnProperty(r.alg))throw new Error("Hashing algorithm is not supported.");var i=Wt[r.alg](t).toString();return r.hash===i};for(var $t=[],Xt=[],Zt="undefined"!=typeof Uint8Array?Uint8Array:Array,Kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qt=0,Gt=Kt.length;Qt<Gt;++Qt)$t[Qt]=Kt[Qt],Xt[Kt.charCodeAt(Qt)]=Qt;Xt["-".charCodeAt(0)]=62,Xt["_".charCodeAt(0)]=63;var Yt=function(t){var e,n,r=function(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}(t),i=r[0],o=r[1],s=new Zt(function(t,e,n){return 3*(e+n)/4-n}(0,i,o)),a=0,u=o>0?i-4:i;for(n=0;n<u;n+=4)e=Xt[t.charCodeAt(n)]<<18|Xt[t.charCodeAt(n+1)]<<12|Xt[t.charCodeAt(n+2)]<<6|Xt[t.charCodeAt(n+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=255&e;return 2===o&&(e=Xt[t.charCodeAt(n)]<<2|Xt[t.charCodeAt(n+1)]>>4,s[a++]=255&e),1===o&&(e=Xt[t.charCodeAt(n)]<<10|Xt[t.charCodeAt(n+1)]<<4|Xt[t.charCodeAt(n+2)]>>2,s[a++]=e>>8&255,s[a++]=255&e),s};function te(t){var e=t.length%4;return 0===e?t:t+new Array(4-e+1).join("=")}function ee(t){return t=te(t).replace(/\-/g,"+").replace(/_/g,"/"),decodeURIComponent(function(t){for(var e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}(Yt(t)).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function ne(t){return function(t){for(var e="",n=0;n<t.length;n++){var r=t[n].toString(16);e+=2===r.length?r:"0"+r}return e}(Yt(te(t)))}var re=Mt((function(t){var e,n;e=Ut,n=function(){function t(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0]=t[0].match(/^file:\/\/\//)?t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<t.length;r++){var i=t[r];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(r>0&&(i=i.replace(/^[\/]+/,"")),i=i.replace(/[\/]+$/,r<t.length-1?"":"/"),e.push(i))}var o=e.join("/"),s=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return s.shift()+(s.length>0?"?":"")+s.join("&")}return function(){return t("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=n():e.urljoin=n()}));function ie(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(t){return a[t.toLowerCase()]},has:function(t){return t.toLowerCase()in a}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),s.push([e,n]),a[e]=a[e]?a[e]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}function oe(t){if(t.ok)return t.json();var e=new Error(t.statusText);return e.response=t,Promise.reject(e)}function se(t){this.name="ConfigurationError",this.message=t||""}function ae(t){this.name="TokenValidationError",this.message=t||""}se.prototype=Error.prototype,ae.prototype=Error.prototype;var ue=function(){function t(){}var e=t.prototype;return e.get=function(){return null},e.has=function(){return null},e.set=function(){return null},t}();Lt.polyfill();var ce=function(t){return"number"==typeof t},le=function(){return new Date};function pe(t){var e=t||{};if(this.jwksCache=e.jwksCache||new ue,this.expectedAlg=e.expectedAlg||"RS256",this.issuer=e.issuer,this.audience=e.audience,this.leeway=0===e.leeway?0:e.leeway||60,this.jwksURI=e.jwksURI,this.maxAge=e.maxAge,this.__clock="function"==typeof e.__clock?e.__clock:le,this.leeway<0||this.leeway>300)throw new se("The leeway should be positive and lower than five minutes.");if("RS256"!==this.expectedAlg)throw new se('Signature algorithm of "'+this.expectedAlg+'" is not supported. Expected the ID token to be signed with "RS256".')}function he(t,e){this.plugins=e;for(var n=0;n<this.plugins.length;n++){if(this.plugins[n].version!==ot.raw){var r="";throw this.plugins[n].constructor&&this.plugins[n].constructor.name&&(r=this.plugins[n].constructor.name),new Error("Plugin "+r+" version ("+this.plugins[n].version+") is not compatible with the SDK version ("+ot.raw+")")}this.plugins[n].setWebAuth(t)}}pe.prototype.verify=function(t,e,n){if(!n&&e&&"function"==typeof e&&(n=e,e=void 0),!t)return n(new ae("ID token is required but missing"),null);var r=this.decode(t);if(r instanceof Error)return n(new ae("ID token could not be decoded"),null);var i=r.encoded.header+"."+r.encoded.payload,o=ne(r.encoded.signature),s=r.header.alg,a=r.header.kid,u=r.payload.aud,c=r.payload.sub,l=r.payload.iss,p=r.payload.exp,h=r.payload.nbf,f=r.payload.iat,d=r.payload.azp,m=r.payload.auth_time,y=r.payload.nonce,g=this.__clock(),v=this;if(v.expectedAlg!==s)return n(new ae('Signature algorithm of "'+s+'" is not supported. Expected the ID token to be signed with "RS256".'),null);this.getRsaVerifier(l,a,(function(t,s){if(t)return n(t,null);if(!s.verify(i,o))return n(new ae("Invalid ID token signature."),null);if(!l||"string"!=typeof l)return n(new ae("Issuer (iss) claim must be a string present in the ID token"),null);if(v.issuer!==l)return n(new ae('Issuer (iss) claim mismatch in the ID token, expected "'+v.issuer+'", found "'+l+'"'),null);if(!c||"string"!=typeof c)return n(new ae("Subject (sub) claim must be a string present in the ID token"),null);if(!u||"string"!=typeof u&&!Array.isArray(u))return n(new ae("Audience (aud) claim must be a string or array of strings present in the ID token"),null);if(Array.isArray(u)&&!u.includes(v.audience))return n(new ae('Audience (aud) claim mismatch in the ID token; expected "'+v.audience+'" but was not one of "'+u.join(", ")+'"'),null);if("string"==typeof u&&v.audience!==u)return n(new ae('Audience (aud) claim mismatch in the ID token; expected "'+v.audience+'" but found "'+u+'"'),null);if(e){if(!y||"string"!=typeof y)return n(new ae("Nonce (nonce) claim must be a string present in the ID token"),null);if(y!==e)return n(new ae('Nonce (nonce) claim value mismatch in the ID token; expected "'+e+'", found "'+y+'"'),null)}if(Array.isArray(u)&&u.length>1){if(!d||"string"!=typeof d)return n(new ae("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"),null);if(d!==v.audience)return n(new ae('Authorized Party (azp) claim mismatch in the ID token; expected "'+v.audience+'", found "'+d+'"'),null)}if(!p||!ce(p))return n(new ae("Expiration Time (exp) claim must be a number present in the ID token"),null);if(!f||!ce(f))return n(new ae("Issued At (iat) claim must be a number present in the ID token"),null);var a=p+v.leeway,b=new Date(0);if(b.setUTCSeconds(a),g>b)return n(new ae('Expiration Time (exp) claim error in the ID token; current time "'+g+'" is after expiration time "'+b+'"'),null);if(h&&ce(h)){var w=h-v.leeway,_=new Date(0);if(_.setUTCSeconds(w),g<_)return n(new ae('Not Before Time (nbf) claim error in the ID token; current time "'+g+'" is before the not before time "'+_+'"'),null)}if(v.maxAge){if(!m||!ce(m))return n(new ae("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified"),null);var T=m+v.maxAge+v.leeway,O=new Date(0);if(O.setUTCSeconds(T),g>O)return n(new ae('Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time "'+g+'" is after last auth time at "'+O+'"'),null)}return n(null,r.payload)}))},pe.prototype.getRsaVerifier=function(t,e,n){var r=this,i=t+e;Promise.resolve(this.jwksCache.has(i)).then((function(n){return n?r.jwksCache.get(i):(o={jwksURI:r.jwksURI,iss:t,kid:e},("undefined"==typeof fetch?ie:fetch)(o.jwksURI||re(o.iss,".well-known","jwks.json")).then(oe).then((function(t){var e,n,r,i=null;for(e=0;e<t.keys.length&&null===i;e++)(n=t.keys[e]).kid===o.kid&&(i=n);if(!i)throw new Error('Could not find a public key for Key ID (kid) "'+o.kid+'"');return{modulus:ne((r=i).n),exp:ne(r.e)}})).catch((function(t){throw t})));var o})).then((function(t){if(!t||!t.modulus||!t.exp)throw new Error("Empty keyInfo in response");return Promise.resolve(r.jwksCache.set(i,t)).then((function(){n&&n(null,new Jt(t.modulus,t.exp))}))})).catch((function(t){n&&n(t)}))},pe.prototype.decode=function(t){var e,n,r=t.split(".");if(3!==r.length)return new ae("Cannot decode a malformed JWT");try{e=JSON.parse(ee(r[0])),n=JSON.parse(ee(r[1]))}catch(t){return new ae("Token header or payload is not valid JSON")}return{header:e,payload:n,encoded:{header:r[0],payload:r[1],signature:r[2]}}},pe.prototype.validateAccessToken=function(t,e,n,r){if(this.expectedAlg!==e)return r(new ae('Signature algorithm of "'+e+'" is not supported. Expected "'+this.expectedAlg+'"'));var i,o=Bt(t),s=Ht.stringify(o),a=s.substring(0,s.length/2),u=Ht.parse(a),c=zt.stringify(u);return r((i={"+":"-","/":"_","=":""},c.replace(/[+/=]/g,(function(t){return i[t]}))!==n?new ae("Invalid access_token"):null))},he.prototype.get=function(t){for(var e=0;e<this.plugins.length;e++)if(this.plugins[e].supports(t))return this.plugins[e].init();return null};var fe=function(t){var e=new Uint8Array(t),n=[],r="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",i=Ot.getWindow().crypto||Ot.getWindow().msCrypto;if(!i)return null;for(var o=i.getRandomValues(e),s=0;s<o.length;s++)n.push(r[o[s]%r.length]);return n.join("")};function de(t){var e=t.transaction||{};this.namespace=e.namespace||"com.auth0.auth.",this.keyLength=e.keyLength||32,this.storage=new At(t),this.options=t}function me(t){if(this.url=t.url,this.callback=t.callback,this.timeout=t.timeout||6e4,this.timeoutCallback=t.timeoutCallback||null,this.eventListenerType=t.eventListenerType||"message",this.iframe=null,this.timeoutHandle=null,this._destroyTimeout=null,this.transientMessageEventListener=null,this.proxyEventListener=null,this.eventValidator=t.eventValidator||{isValid:function(){return!0}},"function"!=typeof this.callback)throw new Error("options.callback must be a function")}function ye(t){this.webAuth=t,this.warn=new Ct(t.baseOptions)}function ge(t,e){this.webAuth=t,this.baseOptions=e,this.request=new _t(e),this.webMessageHandler=new ye(t),this.storage=new At(e)}function ve(t,e){return["co/verifier",encodeURIComponent(t),encodeURIComponent(e)].join("/")}function be(t,e){this.webAuth=t,this.baseOptions=e,this.crossOriginAuthentication=new ge(t,this.baseOptions),this.warn=new Ct({disableWarnings:!!e._disableDeprecationWarnings})}de.prototype.process=function(t){if(!t.responseType)throw new Error("responseType is required");var e=t.realm||t.connection,n=-1!==t.responseType.indexOf("id_token"),r=this.generateTransaction(t.appState,t.state,t.nonce,e,n,t.organization);return t.state||(t.state=r.state),n&&!t.nonce&&(t.nonce=r.nonce),t},de.prototype.generateTransaction=function(t,e,n,r,i,o){if(e=e||fe(this.keyLength),n=n||(i?fe(this.keyLength):null),Ot.getWindow().location.host!==this.options.domain){var s={nonce:n,appState:t,state:e,lastUsedConnection:r};o&&(s.organization=o),this.storage.setItem(this.namespace+e,s,{expires:1/48})}return{state:e,nonce:n}},de.prototype.getStoredTransaction=function(t){var e;return e=this.storage.getItem(this.namespace+t),this.clearTransaction(t),e},de.prototype.clearTransaction=function(t){this.storage.removeItem(this.namespace+t)},me.prototype.init=function(){var t=this,e=Ot.getWindow();switch(this.iframe=e.document.createElement("iframe"),this.iframe.style.display="none",this.proxyEventListener=function(e){t.eventListener(e)},this.eventListenerType){case"message":this.eventSourceObject=e;break;case"load":this.eventSourceObject=this.iframe;break;default:throw new Error("Unsupported event listener type: "+this.eventListenerType)}this.eventSourceObject.addEventListener(this.eventListenerType,this.proxyEventListener,!1),e.document.body.appendChild(this.iframe),this.iframe.src=this.url,this.timeoutHandle=setTimeout((function(){t.timeoutHandler()}),this.timeout)},me.prototype.eventListener=function(t){var e={event:t,sourceObject:this.eventSourceObject};this.eventValidator.isValid(e)&&(this.destroy(),this.callback(e))},me.prototype.timeoutHandler=function(){this.destroy(),this.timeoutCallback&&this.timeoutCallback()},me.prototype.destroy=function(){var t=this;clearTimeout(this.timeoutHandle),this._destroyTimeout=setTimeout((function(){t.eventSourceObject.removeEventListener(t.eventListenerType,t.proxyEventListener,!1),t.iframe.parentNode&&t.iframe.parentNode.removeChild(t.iframe)}),0)},ye.prototype.run=function(t,e){var n=this;t.responseMode="web_message",t.prompt="none";var r=Ot.getOrigin(),i=vt.getOriginFromUrl(t.redirectUri);if(i&&r!==i)return e({error:"origin_mismatch",error_description:"The redirectUri's origin ("+i+") should match the window's origin ("+r+")."});!function(t,e,n){new me({url:t,eventListenerType:"message",callback:function(t){n(null,t)},timeout:e.timeout,eventValidator:{isValid:function(t){return"authorization_response"===t.event.data.type&&e.state===t.event.data.response.state}},timeoutCallback:function(){n({error:"timeout",error_description:"Timeout during executing web_message communication",state:e.state})}}).init()}(this.webAuth.client.buildAuthorizeUrl(t),t,(function(r,i){var o=r;if(!r&&i.event.data.response.error&&(o=i.event.data.response),!o){var s=i.event.data.response;return n.webAuth.validateAuthenticationResponse(t,s,e)}return"consent_required"===o.error&&"localhost"===Ot.getWindow().location.hostname&&n.warn.warning("Consent Required. Consent can't be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients"),n.webAuth.transactionManager.clearTransaction(o.state),e(vt.pick(o,["error","error_description"]))}))},ge.prototype.login=function(t,e){var n=this,r=s(this.baseOptions.rootUrl,"/co/authenticate");t.username=t.username||t.email,delete t.email;var i={client_id:t.clientID||this.baseOptions.clientID,username:t.username};t.password&&(i.password=t.password),t.otp&&(i.otp=t.otp);var o=t.realm||this.baseOptions.realm;if(o){var a=t.credentialType||this.baseOptions.credentialType||"http://auth0.com/oauth/grant-type/password-realm";i.realm=o,i.credential_type=a}else i.credential_type="password";this.request.post(r).withCredentials().send(i).end((function(r,i){if(r){var o=r.response&&r.response.body||{error:"request_error",error_description:JSON.stringify(r)};return It(e,{forceLegacyError:!0})(o)}function s(){var r=!0===t.popup;t=vt.blacklist(t,["password","credentialType","otp","popup","onRedirecting"]);var o=vt.merge(t).with({loginTicket:i.body.login_ticket}),s=ve(n.baseOptions.rootUrl,i.body.co_id);n.storage.setItem(s,i.body.co_verifier,{expires:1/96}),r?n.webMessageHandler.run(o,It(e,{forceLegacyError:!0})):n.webAuth.authorize(o)}"function"==typeof t.onRedirecting?t.onRedirecting(s):s()}))},ge.prototype.callback=function(){var t=decodeURIComponent(function(t){var e=("&"+Ot.getWindow().location.hash.substring(1)).split("&origin=");if(2===e.length)return e.pop().split("&").shift()}()),e=Ot.getWindow(),n=this;e.addEventListener("message",(function(t){if("co_verifier_request"===t.data.type){var e=ve(t.origin,t.data.request.id),r=function(t,e){try{var n=t.getItem(e);return t.removeItem(e),n||""}catch(t){return""}}(n.storage,e);t.source.postMessage({type:"co_verifier_response",response:{verifier:r}},t.origin)}})),e.parent.postMessage({type:"ready"},t)},be.prototype.loginWithCredentials=function(t,e){t.realm=t.realm||t.connection,delete t.connection,this.crossOriginAuthentication.login(t,e)},be.prototype.signupAndLogin=function(t,e){var n=this;return this.webAuth.client.dbConnection.signup(t,(function(r){return r?e(r):(t.realm=t.realm||t.connection,delete t.connection,n.webAuth.login(t,e))}))};var we=o((function(t){var e=function(){function t(t,e,n){t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener&&t.addEventListener(e,n,!1)}function e(t,e,n){t.detachEvent?t.detachEvent("on"+e,n):t.removeEventListener&&t.removeEventListener(e,n,!1)}function n(t){/^https?:\/\//.test(t)||(t=window.location.href);var e=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(t);return e?e[1]:t}var r=function(){if("undefined"==typeof navigator)return!1;var t=-1,e=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1)):e.indexOf("Trident")>-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1)),t>=8}();return"undefined"!=typeof window&&window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage?{open:function(i,o){if(!o)throw"missing required callback argument";var s,a;i.url||(s="missing required 'url' parameter"),i.relay_url||(s="missing required 'relay_url' parameter"),s&&setTimeout((function(){o(s)}),0),i.window_name||(i.window_name=null),i.window_features&&!function(){try{var t=navigator.userAgent;return-1!=t.indexOf("Fennec/")||-1!=t.indexOf("Firefox/")&&-1!=t.indexOf("Android")}catch(t){}return!1}()||(i.window_features=void 0);var u,c=i.origin||n(i.url);if(c!==n(i.relay_url))return setTimeout((function(){o("invalid arguments: origin of url and relay_url must match")}),0);r&&((a=document.createElement("iframe")).setAttribute("src",i.relay_url),a.style.display="none",a.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(a),u=a.contentWindow);var l=i.popup||window.open(i.url,i.window_name,i.window_features);i.popup&&(l.location.href=i.url),u||(u=l);var p=setInterval((function(){l&&l.closed&&(f(),o&&(o("User closed the popup window"),o=null))}),500),h=JSON.stringify({a:"request",d:i.params});function f(){if(a&&document.body.removeChild(a),a=void 0,p&&(p=clearInterval(p)),e(window,"message",d),e(window,"unload",f),l)try{l.close()}catch(t){u.postMessage("die",c)}l=u=void 0}function d(t){if(t.origin===c){try{var e=JSON.parse(t.data)}catch(t){if(o)return o(t);throw t}"ready"===e.a?u.postMessage(h,c):"error"===e.a?(f(),o&&(o(e.d),o=null)):"response"===e.a&&(f(),o&&(o(null,e.d),o=null))}}return t(window,"unload",f),t(window,"message",d),{originalPopup:l,close:f,focus:function(){if(l)try{l.focus()}catch(t){}}}},onOpen:function(n){var i="*",o=r?function(){for(var t=window.opener.frames,e=t.length-1;e>=0;e--)try{if(t[e].location.protocol===window.location.protocol&&t[e].location.host===window.location.host&&"__winchan_relay_frame"===t[e].name)return t[e]}catch(t){}}():window.opener;if(!o)throw"can't find relay frame";function s(t){t=JSON.stringify(t),r?o.doPost(t,i):o.postMessage(t,i)}function a(t){if("die"===t.data)try{window.close()}catch(t){}}t(r?o:window,"message",(function t(r){var o;try{o=JSON.parse(r.data)}catch(t){}o&&"request"===o.a&&(e(window,"message",t),i=r.origin,n&&setTimeout((function(){n(i,o.d,(function(t){n=void 0,s({a:"response",d:t})}))}),0))})),t(r?o:window,"message",a);try{s({a:"ready"})}catch(e){t(o,"load",(function(t){s({a:"ready"})}))}var u=function(){try{e(r?o:window,"message",a)}catch(t){}n&&s({a:"error",d:"client closed window"}),n=void 0;try{window.close()}catch(t){}};return t(window,"unload",u),{detach:function(){e(window,"unload",u)}}}}:{open:function(t,e,n,r){setTimeout((function(){r("unsupported browser")}),0)},onOpen:function(t){setTimeout((function(){t("unsupported browser")}),0)}}}();t.exports&&(t.exports=e)}));function _e(){this._current_popup=null}function Te(t,e){this.baseOptions=e,this.baseOptions.popupOrigin=e.popupOrigin,this.client=t.client,this.webAuth=t,this.transactionManager=new de(this.baseOptions),this.crossOriginAuthentication=new ge(t,this.baseOptions),this.warn=new Ct({disableWarnings:!!e._disableDeprecationWarnings})}function Oe(t){this.authenticationUrl=t.authenticationUrl,this.timeout=t.timeout||6e4,this.handler=null,this.postMessageDataType=t.postMessageDataType||!1,this.postMessageOrigin=t.postMessageOrigin||Ot.getWindow().location.origin||Ot.getWindow().location.protocol+"//"+Ot.getWindow().location.hostname+(Ot.getWindow().location.port?":"+Ot.getWindow().location.port:"")}function ke(t){this.baseOptions=t,this.request=new _t(t),this.transactionManager=new de(this.baseOptions)}function xe(t,e){this.baseOptions=e,this.client=t,this.baseOptions.universalLoginPage=!0,this.request=new _t(this.baseOptions),this.warn=new Ct({disableWarnings:!!e._disableDeprecationWarnings})}_e.prototype.calculatePosition=function(t){var e=t.width||500,n=t.height||600,r=Ot.getWindow(),i=void 0!==r.screenX?r.screenX:r.screenLeft,o=void 0!==r.screenY?r.screenY:r.screenTop,s=void 0!==r.outerWidth?r.outerWidth:r.document.body.clientWidth,a=void 0!==r.outerHeight?r.outerHeight:r.document.body.clientHeight;return{width:e,height:n,left:t.left||i+(s-e)/2,top:t.top||o+(a-n)/2}},_e.prototype.preload=function(t){var e=this,n=Ot.getWindow(),r=this.calculatePosition(t.popupOptions||{}),i=vt.merge(r).with(t.popupOptions),o=t.url||"about:blank",s=D(i,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed||(this._current_popup=n.open(o,"auth0_signup_popup",s),this._current_popup.kill=function(){this.close(),e._current_popup=null}),this._current_popup},_e.prototype.load=function(t,e,n,r){var i=this,o=this.calculatePosition(n.popupOptions||{}),s=vt.merge(o).with(n.popupOptions),a=vt.merge({url:t,relay_url:e,window_features:D(s,{delimiter:",",encode:!1}),popup:this._current_popup}).with(n),u=we.open(a,(function(t,e){if(!t||"SyntaxError"!==t.name)return i._current_popup=null,r(t,e)}));return u.focus(),u},Te.prototype.buildPopupHandler=function(){var t=this.baseOptions.plugins.get("popup.getPopupHandler");return t?t.getPopupHandler():new _e},Te.prototype.preload=function(t){t=t||{};var e=this.buildPopupHandler();return e.preload(t),e},Te.prototype.getPopupHandler=function(t,e){return t.popupHandler?t.popupHandler:e?this.preload(t):this.buildPopupHandler()},Te.prototype.callback=function(t){var e=this,n=Ot.getWindow(),r=(t=t||{}).popupOrigin||this.baseOptions.popupOrigin||Ot.getOrigin();n.opener?we.onOpen((function(n,i,o){if(n!==r)return o({error:"origin_mismatch",error_description:"The popup's origin ("+n+") should match the `popupOrigin` parameter ("+r+")."});e.webAuth.parseHash(t||{},(function(t,e){return o(t||e)}))})):n.doPost=function(t){n.parent&&n.parent.postMessage(t,r)}},Te.prototype.authorize=function(t,e){var n,r,i={},o=this.baseOptions.plugins.get("popup.authorize"),a=vt.merge(this.baseOptions,["clientID","scope","domain","audience","tenant","responseType","redirectUri","_csrf","state","_intstate","nonce","organization","invitation"]).with(vt.blacklist(t,["popupHandler"]));return lt.check(a,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=s(this.baseOptions.rootUrl,"relay.html"),t.owp?a.owp=!0:(i.origin=function(t){/^https?:\/\//.test(t)||(t=window.location.href);var e=/^(https?:\/\/[-_a-zA-Z.0-9:]+)/.exec(t);return e?e[1]:t}(a.redirectUri),r=a.redirectUri),t.popupOptions&&(i.popupOptions=vt.pick(t.popupOptions,["width","height","top","left"])),o&&(a=o.processParams(a)),(a=this.transactionManager.process(a)).scope=a.scope||"openid profile email",delete a.domain,n=this.client.buildAuthorizeUrl(a),this.getPopupHandler(t).load(n,r,i,It(e,{keepOriginalCasing:!0}))},Te.prototype.loginWithCredentials=function(t,e){t.realm=t.realm||t.connection,t.popup=!0,t=vt.merge(this.baseOptions,["redirectUri","responseType","state","nonce"]).with(vt.blacklist(t,["popupHandler","connection"])),t=this.transactionManager.process(t),this.crossOriginAuthentication.login(t,e)},Te.prototype.passwordlessVerify=function(t,e){var n=this;return this.client.passwordless.verify(vt.blacklist(t,["popupHandler"]),(function(r){if(r)return e(r);t.username=t.phoneNumber||t.email,t.password=t.verificationCode,delete t.email,delete t.phoneNumber,delete t.verificationCode,delete t.type,n.client.loginWithResourceOwner(t,e)}))},Te.prototype.signupAndLogin=function(t,e){var n=this;return this.client.dbConnection.signup(t,(function(r){if(r)return e(r);n.loginWithCredentials(t,e)}))},Oe.create=function(t){return new Oe(t)},Oe.prototype.login=function(t,e){this.handler=new me({auth0:this.auth0,url:this.authenticationUrl,eventListenerType:t?"message":"load",callback:this.getCallbackHandler(e,t),timeout:this.timeout,eventValidator:this.getEventValidator(),timeoutCallback:function(){e(null,"#error=timeout&error_description=Timeout+during+authentication+renew.")},usePostMessage:t||!1}),this.handler.init()},Oe.prototype.getEventValidator=function(){var t=this;return{isValid:function(e){switch(e.event.type){case"message":return e.event.origin===t.postMessageOrigin&&e.event.source===t.handler.iframe.contentWindow&&(!1===t.postMessageDataType||e.event.data.type&&e.event.data.type===t.postMessageDataType);case"load":if("about:"===e.sourceObject.contentWindow.location.protocol)return!1;default:return!0}}}},Oe.prototype.getCallbackHandler=function(t,e){return function(n){var r;r=e?"object"==typeof n.event.data&&n.event.data.hash?n.event.data.hash:n.event.data:n.sourceObject.contentWindow.location.hash,t(null,r)}},ke.prototype.login=function(t,e){var n,r;return n=s(this.baseOptions.rootUrl,"usernamepassword","login"),t.username=t.username||t.email,t=vt.blacklist(t,["email","onRedirecting"]),r=vt.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience"]).with(t),r=this.transactionManager.process(r),r=vt.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(It(e))},ke.prototype.callback=function(t){var e,n=Ot.getDocument();(e=n.createElement("div")).innerHTML=t,n.body.appendChild(e).children[0].submit()},xe.prototype.login=function(t,e){if(Ot.getWindow().location.host!==this.baseOptions.domain)throw new Error("This method is meant to be used only inside the Universal Login Page.");var n,r=vt.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience","_csrf","state","_intstate","nonce"]).with(t);return lt.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(n=new ke(this.baseOptions)).login(r,(function(r,i){if(r)return e(r);function o(){n.callback(i)}if("function"==typeof t.onRedirecting)return t.onRedirecting((function(){o()}));o()}))},xe.prototype.signupAndLogin=function(t,e){var n=this;return n.client.client.dbConnection.signup(t,(function(r){return r?e(r):n.login(t,e)}))},xe.prototype.getSSOData=function(t,e){var n,r="";return"function"==typeof t&&(e=t,t=!1),lt.check(t,{type:"boolean",message:"withActiveDirectories parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),t&&(r="?"+D({ldaps:1,client_id:this.baseOptions.clientID})),n=s(this.baseOptions.rootUrl,"user","ssodata",r),this.request.get(n,{noHeaders:!0}).withCredentials().end(It(e))};var je=function(){},Ce={lang:"en",templates:{auth0:function(t){var e="code"===t.type?"Enter the code shown above":"Solve the formula shown above";return'<div class="captcha-challenge">\n  <img src="'+t.image+'" />\n  <button type="button" class="captcha-reload">↺</button>\n</div>\n<input type="text" name="captcha"\n  class="form-control captcha-control"\n  placeholder="'+e+'" />'},recaptcha_v2:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},recaptcha_enterprise:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},error:function(){return'<div class="error" style="color: red;">Error getting the bot detection challenge. Please contact the system administrator.</div>'}}};function Se(t){switch(t){case"recaptcha_v2":return window.grecaptcha;case"recaptcha_enterprise":return window.grecaptcha.enterprise;default:throw new Error("Unknown captcha provider")}}function Ae(){return new Date}function Ee(t){lt.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},popupOrigin:{optional:!0,type:"string",message:"popupOrigin is not valid"},leeway:{optional:!0,type:"number",message:"leeway is not valid"},plugins:{optional:!0,type:"array",message:"plugins is not valid"},maxAge:{optional:!0,type:"number",message:"maxAge is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"},_timesToRetryFailedRequests:{optional:!0,type:"number",message:"_timesToRetryFailedRequests option is not valid"}}),t.overrides&&lt.check(t.overrides,{type:"object",message:"overrides option is not valid"},{__tenant:{optional:!0,type:"string",message:"__tenant option is required"},__token_issuer:{optional:!0,type:"string",message:"__token_issuer option is required"},__jwks_uri:{optional:!0,type:"string",message:"__jwks_uri is required"}}),this.baseOptions=t,this.baseOptions.plugins=new he(this,this.baseOptions.plugins||[]),this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions._timesToRetryFailedRequests=t._timesToRetryFailedRequests?parseInt(t._timesToRetryFailedRequests,0):0,this.baseOptions.tenant=this.baseOptions.overrides&&this.baseOptions.overrides.__tenant||this.baseOptions.domain.split(".")[0],this.baseOptions.token_issuer=this.baseOptions.overrides&&this.baseOptions.overrides.__token_issuer||"https://"+this.baseOptions.domain+"/",this.baseOptions.jwksURI=this.baseOptions.overrides&&this.baseOptions.overrides.__jwks_uri,this.transactionManager=new de(this.baseOptions),this.client=new Ie(this.baseOptions),this.redirect=new be(this,this.baseOptions),this.popup=new Te(this,this.baseOptions),this.crossOriginAuthentication=new ge(this,this.baseOptions),this.webMessageHandler=new ye(this),this._universalLogin=new xe(this,this.baseOptions),this.ssodataStorage=new Et(this.baseOptions)}function De(t,e){this.baseOptions=e,this.request=t}function Re(t,e){this.baseOptions=e,this.request=t}function Ie(t,e){2===arguments.length?this.auth0=t:e=t,lt.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=e,this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions.rootUrl=this.baseOptions.domain&&0===this.baseOptions.domain.toLowerCase().indexOf("http")?this.baseOptions.domain:"https://"+this.baseOptions.domain,this.request=new _t(this.baseOptions),this.passwordless=new De(this.request,this.baseOptions),this.dbConnection=new Re(this.request,this.baseOptions),this.warn=new Ct({disableWarnings:!!e._disableDeprecationWarnings}),this.ssodataStorage=new Et(this.baseOptions)}function qe(t){lt.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},token:{type:"string",message:"token option is required"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=t,this.baseOptions.headers={Authorization:"Bearer "+this.baseOptions.token},this.request=new _t(this.baseOptions),this.baseOptions.rootUrl=s("https://"+this.baseOptions.domain,"api","v2")}Ee.prototype.parseHash=function(t,e){var n,r;e||"function"!=typeof t?t=t||{}:(e=t,t={});var i=Ot.getWindow(),o=void 0===t.hash?i.location.hash:t.hash;if((n=function(t,e){var n=C;if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof t?function(t,e){var n,r={},i=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=e.parameterLimit===1/0?void 0:e.parameterLimit,s=i.split(e.delimiter,o),a=-1,u=e.charset;if(e.charsetSentinel)for(n=0;n<s.length;++n)0===s[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[n]?u="utf-8":"utf8=%26%2310003%3B"===s[n]&&(u="iso-8859-1"),a=n,n=s.length);for(n=0;n<s.length;++n)if(n!==a){var c,l,h=s[n],f=h.indexOf("]="),d=-1===f?h.indexOf("="):f+1;-1===d?(c=e.decoder(h,C.decoder,u,"key"),l=e.strictNullHandling?null:""):(c=e.decoder(h.slice(0,d),C.decoder,u,"key"),l=p.maybeMap(A(h.slice(d+1),e),(function(t){return e.decoder(t,C.decoder,u,"value")}))),l&&e.interpretNumericEntities&&"iso-8859-1"===u&&(l=S(l)),h.indexOf("[]=")>-1&&(l=j(l)?[l]:l),x.call(r,c)?r[c]=p.combine(r[c],l):r[c]=l}return r}(t,n):t,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s<o.length;++s){var a=o[s],u=E(a,r[a],n,"string"==typeof t);i=p.merge(i,u,n)}return p.compact(i)}(o=o.replace(/^#?\/?/,""))).hasOwnProperty("error"))return r=Rt.buildResponse(n.error,n.error_description),n.state&&(r.state=n.state),e(r);if(!n.hasOwnProperty("access_token")&&!n.hasOwnProperty("id_token")&&!n.hasOwnProperty("refresh_token"))return e(null,null);var s=(this.baseOptions.responseType||t.responseType||"").split(" ");return s.length>0&&-1!==s.indexOf("token")&&!n.hasOwnProperty("access_token")?e(Rt.buildResponse("invalid_hash","response_type contains `token`, but the parsed hash does not contain an `access_token` property")):s.length>0&&-1!==s.indexOf("id_token")&&!n.hasOwnProperty("id_token")?e(Rt.buildResponse("invalid_hash","response_type contains `id_token`, but the parsed hash does not contain an `id_token` property")):this.validateAuthenticationResponse(t,n,e)},Ee.prototype.validateAuthenticationResponse=function(t,e,n){var r=this;t.__enableIdPInitiatedLogin=t.__enableIdPInitiatedLogin||t.__enableImpersonation;var i=e.state,o=this.transactionManager.getStoredTransaction(i),s=t.state||o&&o.state||null,a=s===i;if((i||s||!t.__enableIdPInitiatedLogin)&&!a)return n({error:"invalid_token",errorDescription:"`state` does not match."});var u=t.nonce||o&&o.nonce||null,c=o&&o.organization,l=t.state||o&&o.appState||null,p=function(t,i){return t?n(t):(o&&o.lastUsedConnection&&(i&&(s=i.sub),r.ssodataStorage.set(o.lastUsedConnection,s)),n(null,function(t,e,n){return{accessToken:t.access_token||null,idToken:t.id_token||null,idTokenPayload:n||null,appState:e||null,refreshToken:t.refresh_token||null,state:t.state||null,expiresIn:t.expires_in?parseInt(t.expires_in,10):null,tokenType:t.token_type||null,scope:t.scope||null}}(e,l,i)));var s};return e.id_token?this.validateToken(e.id_token,u,(function(t,n){if(!t){if(c){if(!n.org_id)return p(Rt.invalidToken("Organization Id (org_id) claim must be a string present in the ID token"));if(n.org_id!==c)return p(Rt.invalidToken('Organization Id (org_id) claim value mismatch in the ID token; expected "'+c+'", found "'+n.org_id+'"'))}return e.access_token&&n.at_hash?(new pe).validateAccessToken(e.access_token,"RS256",n.at_hash,(function(t){return t?p(Rt.invalidToken(t.message)):p(null,n)})):p(null,n)}if("invalid_token"!==t.error||t.errorDescription&&t.errorDescription.indexOf("Nonce (nonce) claim value mismatch in the ID token")>-1)return p(t);var i=(new pe).decode(e.id_token);return"HS256"!==i.header.alg?p(t):(i.payload.nonce||null)!==u?p({error:"invalid_token",errorDescription:'Nonce (nonce) claim value mismatch in the ID token; expected "'+u+'", found "'+i.payload.nonce+'"'}):e.access_token?r.client.userInfo(e.access_token,(function(t,e){return t?p(t):p(null,e)})):p({error:"invalid_token",description:"The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can’t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token"})})):p(null,null)},Ee.prototype.validateToken=function(t,e,n){new pe({issuer:this.baseOptions.token_issuer,jwksURI:this.baseOptions.jwksURI,audience:this.baseOptions.clientID,leeway:this.baseOptions.leeway||60,maxAge:this.baseOptions.maxAge,__clock:this.baseOptions.__clock||Ae}).verify(t,e,(function(t,e){if(t)return n(Rt.invalidToken(t.message));n(null,e)}))},Ee.prototype.renewAuth=function(t,e){var n=!!t.usePostMessage,r=t.postMessageDataType||!1,i=t.postMessageOrigin||Ot.getWindow().origin,o=t.timeout,s=this,a=vt.merge(this.baseOptions,["clientID","redirectUri","responseType","scope","audience","_csrf","state","_intstate","nonce"]).with(t);a.responseType=a.responseType||"token",a.responseMode=a.responseMode||"fragment",a=this.transactionManager.process(a),lt.check(a,{type:"object",message:"options parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),a.prompt="none",a=vt.blacklist(a,["usePostMessage","tenant","postMessageDataType","postMessageOrigin"]),Oe.create({authenticationUrl:this.client.buildAuthorizeUrl(a),postMessageDataType:r,postMessageOrigin:i,timeout:o}).login(n,(function(t,n){if("object"==typeof n)return e(t,n);s.parseHash({hash:n},e)}))},Ee.prototype.checkSession=function(t,e){var n=vt.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(t);return"code"===n.responseType?e({error:"error",error_description:"responseType can't be `code`"}):(t.nonce||(n=this.transactionManager.process(n)),n.redirectUri?(lt.check(n,{type:"object",message:"options parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=vt.blacklist(n,["usePostMessage","tenant","postMessageDataType"]),void this.webMessageHandler.run(n,It(e,{forceLegacyError:!0,ignoreCasing:!0}))):e({error:"error",error_description:"redirectUri can't be empty"}))},Ee.prototype.changePassword=function(t,e){return this.client.dbConnection.changePassword(t,e)},Ee.prototype.passwordlessStart=function(t,e){var n=vt.merge(this.baseOptions,["responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(t.authParams);return t.authParams=this.transactionManager.process(n),this.client.passwordless.start(t,e)},Ee.prototype.signup=function(t,e){return this.client.dbConnection.signup(t,e)},Ee.prototype.authorize=function(t){var e=vt.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","organization","invitation"]).with(t);lt.check(e,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(e=this.transactionManager.process(e)).scope=e.scope||"openid profile email",Ot.redirect(this.client.buildAuthorizeUrl(e))},Ee.prototype.signupAndAuthorize=function(t,e){var n=this;return this.client.dbConnection.signup(vt.blacklist(t,["popupHandler"]),(function(r){if(r)return e(r);t.realm=t.connection,t.username||(t.username=t.email),n.client.login(t,e)}))},Ee.prototype.login=function(t,e){var n=vt.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting","organization","invitation"]).with(t);n=this.transactionManager.process(n),Ot.getWindow().location.host===this.baseOptions.domain?(n.connection=n.realm,delete n.realm,this._universalLogin.login(n,e)):this.crossOriginAuthentication.login(n,e)},Ee.prototype.passwordlessLogin=function(t,e){var n=vt.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(t);if(n=this.transactionManager.process(n),Ot.getWindow().location.host===this.baseOptions.domain)this.passwordlessVerify(n,e);else{var r=vt.extend({credentialType:"http://auth0.com/oauth/grant-type/passwordless/otp",realm:n.connection,username:n.email||n.phoneNumber,otp:n.verificationCode},vt.blacklist(n,["connection","email","phoneNumber","verificationCode"]));this.crossOriginAuthentication.login(r,e)}},Ee.prototype.crossOriginAuthenticationCallback=function(){this.crossOriginVerification()},Ee.prototype.crossOriginVerification=function(){this.crossOriginAuthentication.callback()},Ee.prototype.logout=function(t){Ot.redirect(this.client.buildLogoutUrl(t))},Ee.prototype.passwordlessVerify=function(t,e){var n=this,r=vt.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(t);return lt.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=this.transactionManager.process(r),this.client.passwordless.verify(r,(function(i){if(i)return e(i);function o(){Ot.redirect(n.client.passwordless.buildVerifyUrl(r))}if("function"==typeof t.onRedirecting)return t.onRedirecting((function(){o()}));o()}))},Ee.prototype.renderCaptcha=function(t,e,n){return function(t,e,n,r){function i(r){r=r||je,t.getChallenge((function(t,o){return t?(e.innerHTML=n.templates.error(t),r(t)):o.required?(e.style.display="","auth0"===o.provider?function(t,e,n,r){t.innerHTML=e.templates[n.provider](n),t.querySelector(".captcha-reload").addEventListener("click",(function(t){t.preventDefault(),r()}))}(e,n,o,i):"recaptcha_v2"!==o.provider&&"recaptcha_enterprise"!==o.provider||function(t,e,n){var r=t.hasAttribute("data-wid")&&t.getAttribute("data-wid");function i(e){t.querySelector('input[name="captcha"]').value=e||""}if(r)return i(),void Se(n.provider).reset(r);t.innerHTML=e.templates[n.provider](n);var o=t.querySelector(".recaptcha");!function(t,e,n){var r="recaptchaCallback_"+Math.floor(1000001*Math.random());window[r]=function(){delete window[r],n()};var i=window.document.createElement("script");i.src=function(t,e,n){switch(t){case"recaptcha_v2":return"https://www.recaptcha.net/recaptcha/api.js?hl="+e+"&onload="+n;case"recaptcha_enterprise":return"https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl="+e+"&onload="+n;default:throw new Error("Unknown captcha provider")}}(e.provider,e.lang,r),i.async=!0,window.document.body.appendChild(i)}(0,{lang:e.lang,provider:n.provider},(function(){var e=Se(n.provider);r=e.render(o,{callback:i,"expired-callback":function(){i()},"error-callback":function(){i()},sitekey:n.siteKey}),t.setAttribute("data-wid",r)}))}(e,n,o),void r()):(e.style.display="none",void(e.innerHTML=""))}))}return n=vt.merge(Ce).with(n||{}),i(r),{reload:i,getValue:function(){var t=e.querySelector('input[name="captcha"]');if(t)return t.value}}}(this.client,t,e,n)},De.prototype.buildVerifyUrl=function(t){var e,n;return lt.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(t){return!t.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(t){return!t.phoneNumber}}}),e=vt.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","protocol","nonce"]).with(t),this.baseOptions._sendTelemetry&&(e.auth0Client=this.request.getTelemetryData()),e=vt.toSnakeCase(e,["auth0Client"]),n=D(e),s(this.baseOptions.rootUrl,"passwordless","verify_redirect","?"+n)},De.prototype.start=function(t,e){var n,r;return lt.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},send:{type:"string",message:"send option is required",values:["link","code"],value_message:"send is not valid ([link, code])"},phoneNumber:{optional:!0,type:"string",message:"phoneNumber option is required",condition:function(t){return"code"===t.send||!t.email}},email:{optional:!0,type:"string",message:"email option is required",condition:function(t){return"link"===t.send||!t.phoneNumber}},authParams:{optional:!0,type:"object",message:"authParams option is required"}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"passwordless","start"),(r=vt.merge(this.baseOptions,["clientID","responseType","redirectUri","scope"]).with(t)).scope&&(r.authParams=r.authParams||{},r.authParams.scope=r.authParams.scope||r.scope),r.redirectUri&&(r.authParams=r.authParams||{},r.authParams.redirect_uri=r.authParams.redirectUri||r.redirectUri),r.responseType&&(r.authParams=r.authParams||{},r.authParams.response_type=r.authParams.responseType||r.responseType),delete r.redirectUri,delete r.responseType,delete r.scope,r=vt.toSnakeCase(r,["auth0Client","authParams"]),this.request.post(n).send(r).end(It(e))},De.prototype.verify=function(t,e){var n,r;return lt.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(t){return!t.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(t){return!t.phoneNumber}}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),r=vt.pick(t,["connection","verificationCode","phoneNumber","email","auth0Client"]),r=vt.toSnakeCase(r,["auth0Client"]),n=s(this.baseOptions.rootUrl,"passwordless","verify"),this.request.post(n).send(r).end(It(e))},Re.prototype.signup=function(t,e){var n,r,i;return lt.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"},password:{type:"string",message:"password option is required"}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"dbconnections","signup"),i=(r=vt.merge(this.baseOptions,["clientID","state"]).with(t)).user_metadata||r.userMetadata,r=vt.blacklist(r,["scope","userMetadata","user_metadata"]),r=vt.toSnakeCase(r,["auth0Client"]),i&&(r.user_metadata=i),this.request.post(n).send(r).end(It(e))},Re.prototype.changePassword=function(t,e){var n,r;return lt.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"dbconnections","change_password"),r=vt.merge(this.baseOptions,["clientID"]).with(t,["email","connection"]),r=vt.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(It(e))},Ie.prototype.buildAuthorizeUrl=function(t){var e,n;return lt.check(t,{type:"object",message:"options parameter is not valid"}),e=vt.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience"]).with(t),lt.check(e,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},redirectUri:{optional:!0,type:"string",message:"redirectUri option is required"},responseType:{type:"string",message:"responseType option is required"},nonce:{type:"string",message:"nonce option is required",condition:function(t){return-1===t.responseType.indexOf("code")&&-1!==t.responseType.indexOf("id_token")}},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),this.baseOptions._sendTelemetry&&(e.auth0Client=this.request.getTelemetryData()),e.connection_scope&&lt.isArray(e.connection_scope)&&(e.connection_scope=e.connection_scope.join(",")),e=vt.blacklist(e,["username","popupOptions","domain","tenant","timeout","appState"]),e=vt.toSnakeCase(e,["auth0Client"]),e=function(t,e){var n=vt.getKeysNotIn(e,Pt);return n.length>0&&t.warning("Following parameters are not allowed on the `/authorize` endpoint: ["+n.join(",")+"]"),e}(this.warn,e),n=D(e),s(this.baseOptions.rootUrl,"authorize","?"+n)},Ie.prototype.buildLogoutUrl=function(t){var e,n;return lt.check(t,{optional:!0,type:"object",message:"options parameter is not valid"}),e=vt.merge(this.baseOptions,["clientID"]).with(t||{}),this.baseOptions._sendTelemetry&&(e.auth0Client=this.request.getTelemetryData()),e=vt.toSnakeCase(e,["auth0Client","returnTo"]),n=D(vt.blacklist(e,["federated"])),t&&void 0!==t.federated&&!1!==t.federated&&"false"!==t.federated&&(n+="&federated"),s(this.baseOptions.rootUrl,"v2","logout","?"+n)},Ie.prototype.loginWithDefaultDirectory=function(t,e){return lt.check(t,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),t.grantType="password",this.oauthToken(t,e)},Ie.prototype.login=function(t,e){return lt.check(t,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},realm:{type:"string",message:"realm option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),t.grantType="http://auth0.com/oauth/grant-type/password-realm",this.oauthToken(t,e)},Ie.prototype.oauthToken=function(t,e){var n,r,i;return lt.check(t,{type:"object",message:"options parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"oauth","token"),r=vt.merge(this.baseOptions,["clientID","scope","audience"]).with(t),lt.check(r,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},grantType:{type:"string",message:"grantType option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),r=vt.toSnakeCase(r,["auth0Client"]),this.warn,i=r,r=vt.pick(i,qt),this.request.post(n).send(r).end(It(e))},Ie.prototype.loginWithResourceOwner=function(t,e){var n,r;return lt.check(t,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},connection:{type:"string",message:"connection option is required"},scope:{optional:!0,type:"string",message:"scope option is required"}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"oauth","ro"),r=vt.merge(this.baseOptions,["clientID","scope"]).with(t,["username","password","scope","connection","device"]),(r=vt.toSnakeCase(r,["auth0Client"])).grant_type=r.grant_type||"password",this.request.post(n).send(r).end(It(e))},Ie.prototype.getSSOData=function(t,e){if(this.auth0||(this.auth0=new Ee(this.baseOptions)),Ot.getWindow().location.host===this.baseOptions.domain)return this.auth0._universalLogin.getSSOData(t,e);"function"==typeof t&&(e=t),lt.check(e,{type:"function",message:"cb parameter is not valid"});var n=this.baseOptions.clientID,r=this.ssodataStorage.get()||{};this.auth0.checkSession({responseType:"token id_token",scope:"openid profile email",connection:r.lastUsedConnection,timeout:5e3},(function(t,i){return t?"login_required"===t.error?e(null,{sso:!1}):("consent_required"===t.error&&(t.error_description="Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`."),e(t,{sso:!1})):r.lastUsedSub&&r.lastUsedSub!==i.idTokenPayload.sub?e(t,{sso:!1}):e(null,{lastUsedConnection:{name:r.lastUsedConnection},lastUsedUserID:i.idTokenPayload.sub,lastUsedUsername:i.idTokenPayload.email||i.idTokenPayload.name,lastUsedClientID:n,sessionClients:[n],sso:!0})}))},Ie.prototype.userInfo=function(t,e){var n;return lt.check(t,{type:"string",message:"accessToken parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"userinfo"),this.request.get(n).set("Authorization","Bearer "+t).end(It(e,{ignoreCasing:!0}))},Ie.prototype.getChallenge=function(t){if(lt.check(t,{type:"function",message:"cb parameter is not valid"}),!this.baseOptions.state)return t();var e=s(this.baseOptions.rootUrl,"usernamepassword","challenge");return this.request.post(e).send({state:this.baseOptions.state}).end(It(t,{ignoreCasing:!0}))},Ie.prototype.delegation=function(t,e){var n,r;return lt.check(t,{type:"object",message:"options parameter is not valid"},{grant_type:{type:"string",message:"grant_type option is required"}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"delegation"),r=vt.merge(this.baseOptions,["clientID"]).with(t),r=vt.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(It(e))},Ie.prototype.getUserCountry=function(t){var e;return lt.check(t,{type:"function",message:"cb parameter is not valid"}),e=s(this.baseOptions.rootUrl,"user","geoloc","country"),this.request.get(e).end(It(t))},qe.prototype.getUser=function(t,e){var n;return lt.check(t,{type:"string",message:"userId parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"users",t),this.request.get(n).end(It(e,{ignoreCasing:!0}))},qe.prototype.patchUserMetadata=function(t,e,n){var r;return lt.check(t,{type:"string",message:"userId parameter is not valid"}),lt.check(e,{type:"object",message:"userMetadata parameter is not valid"}),lt.check(n,{type:"function",message:"cb parameter is not valid"}),r=s(this.baseOptions.rootUrl,"users",t),this.request.patch(r).send({user_metadata:e}).end(It(n,{ignoreCasing:!0}))},qe.prototype.patchUserAttributes=function(t,e,n){var r;return lt.check(t,{type:"string",message:"userId parameter is not valid"}),lt.check(e,{type:"object",message:"user parameter is not valid"}),lt.check(n,{type:"function",message:"cb parameter is not valid"}),r=s(this.baseOptions.rootUrl,"users",t),this.request.patch(r).send(e).end(It(n,{ignoreCasing:!0}))},qe.prototype.linkUser=function(t,e,n){var r;return lt.check(t,{type:"string",message:"userId parameter is not valid"}),lt.check(e,{type:"string",message:"secondaryUserToken parameter is not valid"}),lt.check(n,{type:"function",message:"cb parameter is not valid"}),r=s(this.baseOptions.rootUrl,"users",t,"identities"),this.request.post(r).send({link_with:e}).end(It(n,{ignoreCasing:!0}))};var Pe={Authentication:Ie,Management:qe,WebAuth:Ee,version:ot};e.default=Pe}.call(this,n(49),n(12))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.default=function(t){var e=t.variant,n=void 0===e?"default":e,o=t.className;return i.jsx("svg",r({className:o,viewBox:"0 0 60 38.19"},{children:i.jsxs("g",r({transform:"translate(-238.467 -453.779)"},{children:[i.jsx("g",r({transform:"translate(238.467 453.779)"},{children:i.jsx("g",r({transform:"translate(0 1.926)"},{children:i.jsxs("g",{children:[i.jsx("g",r({transform:"translate(.243)"},{children:i.jsx("path",{fill:"default"===n?"#00d163":"#220C4A",d:"M239.9 473.289a.981.981 0 0 0 .663 1.708l17.7-.048a1.56 1.56 0 0 0 1.046-.406l13.191-11.984-19.5.054a3.507 3.507 0 0 0-2.351.912z",transform:"translate(-239.576 -462.559)"},void 0)}),void 0),i.jsx("path",{d:"M296.542 462.586l-21.3.051a1.786 1.786 0 0 0-1.2.47l-12.629 11.57a1.523 1.523 0 0 0-.489 1.121v8.934a.94.94 0 0 1-.932.946l-8.148.02a3.363 3.363 0 0 0-2.27.892l-10.779 9.917a1 1 0 0 0 .662 1.729l20.974-.05a1.275 1.275 0 0 0 .858-.336l12.775-11.7a1.522 1.522 0 0 0 .49-1.12v-8.934a.94.94 0 0 1 .932-.946l8.739-.021a1.841 1.841 0 0 0 1.242-.488l11.606-10.678a.789.789 0 0 0-.531-1.377z",fill:"default"===n?"#201047":"#220C4A",transform:"translate(-238.467 -462.58)"},void 0)]},void 0)}),void 0)}),void 0),i.jsx("g",r({transform:"translate(554.613 460.161)"},{children:i.jsx("path",{fill:"default"===n?"#1d1047":"#220C4A",d:"M1667.281 484.388a1.928 1.928 0 1 1-1.921-1.876 1.885 1.885 0 0 1 1.921 1.876zm-3.374 0a1.453 1.453 0 0 0 1.464 1.5 1.436 1.436 0 0 0 1.43-1.487 1.448 1.448 0 1 0-2.893-.011zm1.155.983h-.435V483.5a3.792 3.792 0 0 1 .72-.057 1.169 1.169 0 0 1 .652.137.52.52 0 0 1 .183.412.48.48 0 0 1-.389.434v.023a.553.553 0 0 1 .343.457 1.43 1.43 0 0 0 .137.469h-.469a1.613 1.613 0 0 1-.148-.458c-.034-.206-.149-.3-.389-.3h-.206zm.011-1.063h.206c.24 0 .434-.08.434-.275 0-.171-.126-.286-.4-.286a1.049 1.049 0 0 0-.24.023z",transform:"translate(-1663.427 -482.512)"},void 0)}),void 0)]}),void 0)}),void 0)}},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(n(2));n(54),e.default=function(t){var e=t.size,n=void 0===e?20:e,r=t.thickness,s=void 0===r?2:r;return i.jsxs("span",{children:[o.default.createElement("style",{},"\n     .tr-wc-progress-circular {\n       height: "+n+"px;\n       width: "+n+"px;\n     }\n\n     .tr-wc-progress-circular:indeterminate::before,\n     .tr-wc-progress-circular:indeterminate::-webkit-progress-value {\n       border-width: "+s+"px;\n     }\n    "),i.jsx("progress",{className:"tr-wc-progress-circular"},void 0)]},void 0)}},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(5)),a=i(n(57)),u=i(n(17));n(58);var c=i(n(59));e.default=function(t){var e=t.integrationId,n=t.organizationId,i=t.organizationName,l=s.default.portalBaseUrl+"/"+n+"/settings/integrations/"+e;return o.jsxs("div",r({className:"tr-wc-detailsPanel"},{children:[o.jsx("span",r({className:"tr-wc-panelHeader"},{children:o.jsx("p",{children:"Platform connectie"},void 0)}),void 0),o.jsxs("span",r({className:"tr-wc-panelContent"},{children:[o.jsxs("span",r({className:"tr-wc-detailsPanel-connected"},{children:[o.jsx(a.default,{className:"tr-wc-checkVector"},void 0),o.jsxs("span",{children:[o.jsx("h3",{children:"Deze winkel is verbonden"},void 0),o.jsx("p",{children:"U bent klaar om uw bestellingen met Trunkrs te verzenden."},void 0)]},void 0)]}),void 0),o.jsxs("span",{children:[o.jsx("h4",{children:"Integratie nummer:"},void 0),o.jsx("p",{children:e},void 0),o.jsx("h4",{children:"Organisatie nummer:"},void 0),o.jsx("p",{children:n},void 0),o.jsx("h4",{children:"Organisatie naam:"},void 0),o.jsx("p",{children:i},void 0)]},void 0)]}),void 0),o.jsx("span",r({className:"tr-wc-panelFooter"},{children:o.jsx("span",{children:o.jsxs(u.default,r({href:l,color:"white"},{children:[o.jsx(c.default,{className:"tr-wc-buttonVector"},void 0),"Beheer"]}),void 0)},void 0)}),void 0)]}),void 0)}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.default=function(t){var e=t.className;return i.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 14 14",fill:"none"},{children:i.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.3334 7.00016C12.3334 9.94568 9.94556 12.3335 7.00004 12.3335C4.05452 12.3335 1.66671 9.94568 1.66671 7.00016C1.66671 4.05464 4.05452 1.66683 7.00004 1.66683C9.94556 1.66683 12.3334 4.05464 12.3334 7.00016ZM13.6667 7.00016C13.6667 10.6821 10.6819 13.6668 7.00004 13.6668C3.31814 13.6668 0.333374 10.6821 0.333374 7.00016C0.333374 3.31826 3.31814 0.333496 7.00004 0.333496C10.6819 0.333496 13.6667 3.31826 13.6667 7.00016ZM6.596 9.27795L10.6112 5.2628L9.66834 4.31999L6.1246 7.86373L4.80477 6.5439L3.86196 7.48671L5.65319 9.27795L6.1246 9.74935L6.596 9.27795Z",fill:"#1ED771"},void 0)}),void 0)}},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.default=function(t){var e=t.className;return i.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none"},{children:i.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 2H8V4H4V20H20V16H22V22H2V2ZM18.4372 4.16L12.5199 4.16V2.16L21.8399 2.16L21.8399 11.48H19.8399L19.8399 5.5857L9.20706 16.2186L7.79285 14.8044L18.4372 4.16Z",fill:"currentColor"},void 0)}),void 0)}},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(62));n(64),e.default=function(t){var e=t.darkLogo,n=t.tntEmailLinks,i=t.tntAccountActions,a=t.onDarkLogoChanged,u=t.onTntEmailLinksChanged,c=t.onTntAccountActionsChanged;return o.jsxs("div",r({className:"tr-wc-detailsPanel"},{children:[o.jsx("span",r({className:"tr-wc-panelHeader"},{children:o.jsx("p",{children:"Visuele instellingen"},void 0)}),void 0),o.jsx("span",r({className:"tr-wc-panelContent"},{children:o.jsxs("ul",r({className:"tr-wc-settingsList"},{children:[o.jsx("li",{children:o.jsx(s.default,r({checked:e,onChange:a},{children:o.jsx("h4",r({className:"tr-wc-switchLabel"},{children:"Gebruik aangepast logo voor donker thema in de winkelwagen."}),void 0)}),void 0)},void 0),o.jsx("li",{children:o.jsx(s.default,r({checked:n,onChange:u},{children:o.jsx("h4",r({className:"tr-wc-switchLabel"},{children:"Plaats Trunkrs Track & Trace links in orderbevestiging e-mail."}),void 0)}),void 0)},void 0),o.jsx("li",{children:o.jsx(s.default,r({checked:i,onChange:c},{children:o.jsx("h4",r({className:"tr-wc-switchLabel"},{children:"Maak Trunkrs Track & Trace links zichtbaar in gebruikers account pagina."}),void 0)}),void 0)},void 0)]}),void 0)}),void 0)]}),void 0)}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(6));n(63),e.default=function(t){var e=t.checked,n=t.tabIndex,i=void 0===n?1:n,a=t.children,u=t.onChange;return o.jsxs("span",r({className:"tr-wc-switchContainer"},{children:[o.jsx("div",r({tabIndex:i,role:"button",className:s.default("tr-wc-switch",{"tr-wc-switch-checked":e}),onClick:u},{children:o.jsx("span",{className:"tr-wc-switchKnob"},void 0)}),void 0),o.jsx("span",r({className:"tr-wc-switchContent"},{children:a}),void 0)]}),void 0)}},function(t,e,n){},function(t,e,n){}]);
     1!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=19)}([function(t,e,n){"use strict";t.exports=n(4)},function(t,e,n){"use strict";var r=n(8),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return a(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e){t.exports=React},function(t,e){t.exports=window.wp.element},function(t,e,n){"use strict";var r=n(2),i=60103;if(e.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),e.Fragment=o("react.fragment")}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var r,o={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(l=e.ref),e)a.call(e,r)&&!u.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===o[r]&&(o[r]=e[r]);return{$$typeof:i,type:t,key:c,ref:l,props:o,_owner:s.current}}e.jsx=c,e.jsxs=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default={portalBaseUrl:"https://portal.trunkrs.app",apiBaseUrl:"https://shipping.trunkrs.app",auth0:{domain:"trunkrs.eu.auth0.com",clientId:"hvK6Wu7K57yfp2mYsgMIRNNsOKkSYmDi",audience:"api.portal.trunkrs.app",redirectUrl:"https://portal.trunkrs.app/register/integration"}}},function(t,e,n){"use strict";function r(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=r(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}n.r(e),e.default=function(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=r(t))&&(i&&(i+=" "),i+=e);return i}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(2)).default.createContext({isWorking:!1,config:null,prepareConfig:function(){throw new Error("Not implemented!")},updateUseBigText:function(){throw new Error("Not implemented")},updateIsDarkLogo:function(){throw new Error("Not implemented!")},updateTntLinks:function(){throw new Error("Not implemented!")},updateTntActions:function(){throw new Error("Not implemented!")},updateAllOrdersAreTrunkrs:function(){throw new Error("Not implemented!")}});e.default=i},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(1);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(i(e)+"="+i(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";(function(e){var r=n(1),i=n(30),o={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,u={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==e&&"[object process]"===Object.prototype.toString.call(e))&&(a=n(13)),a),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){u.headers[t]=r.merge(o)})),t.exports=u}).call(this,n(12))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,c=[],l=!1,p=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):p=-1,c.length&&d())}function d(){if(!l){var t=a(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++p<e;)u&&u[p].run();p=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||l||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(1),i=n(31),o=n(33),s=n(9),a=n(34),u=n(37),c=n(38),l=n(14);t.exports=function(t){return new Promise((function(e,n){var p=t.data,h=t.headers;r.isFormData(p)&&delete h["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var f=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";h.Authorization="Basic "+btoa(f+":"+m)}var y=a(t.baseURL,t.url);if(d.open(t.method.toUpperCase(),s(y,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?u(d.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:t,request:d};i(e,n,o),d=null}},d.onabort=function(){d&&(n(l("Request aborted",t,"ECONNABORTED",d)),d=null)},d.onerror=function(){n(l("Network Error",t,null,d)),d=null},d.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var g=(t.withCredentials||c(y))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;g&&(h[t.xsrfHeaderName]=g)}if("setRequestHeader"in d&&r.forEach(h,(function(t,e){void 0===p&&"content-type"===e.toLowerCase()?delete h[e]:d.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){d&&(d.abort(),n(t),d=null)})),p||(p=null),d.send(p)}))}},function(t,e,n){"use strict";var r=n(32);t.exports=function(t,e,n,i,o){var s=new Error(t);return r(s,e,n,i,o)}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function c(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=u(void 0,e[t]))})),r.forEach(o,c),r.forEach(s,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(void 0,e[i])})),r.forEach(a,(function(r){r in e?n[r]=u(t[r],e[r]):r in t&&(n[r]=u(void 0,t[r]))}));var l=i.concat(o).concat(s).concat(a),p=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===l.indexOf(t)}));return r.forEach(p,c),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(n(2)),s=r(n(6));n(52),e.default=function(t){var e=t.color,n=t.href,r=t.disabled,a=t.className,u=t.children,c=t.onClick,l=s.default("tr-wc-button",{"tr-wc-blue":"blue"===e,"tr-wc-green":"green"===e,"tr-wc-white":"white"===e},a),p=n?i.jsx("a",{href:n,target:"_blank",rel:"noreferrer noopener nofollow"},void 0):i.jsx("button",{type:"button",onClick:c},void 0);return o.default.cloneElement(p,{className:l,disabled:r},u)}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(6));n(63),e.default=function(t){var e=t.checked,n=t.tabIndex,i=void 0===n?1:n,a=t.children,u=t.onChange;return o.jsxs("span",r({className:"tr-wc-switchContainer"},{children:[o.jsx("div",r({tabIndex:i,role:"button",className:s.default("tr-wc-switch",{"tr-wc-switch-checked":e}),onClick:u},{children:o.jsx("span",{className:"tr-wc-switchKnob"},void 0)}),void 0),o.jsx("span",r({className:"tr-wc-switchContent"},{children:a}),void 0)]}),void 0)}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(3);n(20);var o=r(n(21)),s=document.getElementById("tr-wc-settings");s&&i.render(i.createElement(o.default),s)},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(n(22)),s=r(n(42));e.default=function(){return i.jsx(o.default,{children:i.jsx(s.default,{},void 0)},void 0)}},function(t,e,n){"use strict";var r,i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),c=a(n(2)),l=a(n(7)),p=n(23),h=null===(r=document.getElementById("__tr-wc-settings__"))||void 0===r?void 0:r.innerText,d=h?JSON.parse(h):{};e.default=function(t){var e=t.children,n=c.default.useState(!1),r=n[0],a=n[1],h=c.default.useState(d),f=h[0],m=h[1],y=c.default.useCallback((function(t,e){return o(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,4,5]),a(!0),[4,p.doShippingReqisterRequest(t,e,f.metaBag)];case 1:return n=s.sent(),[4,p.doConfigureRequest(n.accessToken,e,n.organizationName,n.integrationId)];case 2:return s.sent(),m(i(i({},f),{isConfigured:!0,details:{integrationId:n.integrationId,organizationId:e,organizationName:n.organizationName}})),[3,5];case 3:return r=s.sent(),o=r,console.error(o),[3,5];case 4:return a(!1),[7];case 5:return[2]}}))}))}),[f]),g=c.default.useCallback((function(){return o(void 0,void 0,void 0,(function(){return s(this,(function(t){return m(i(i({},f),{isDarkLogo:!f.isDarkLogo})),p.doUpdateUseDarkRequest(!f.isDarkLogo).catch((function(){m(i(i({},f),{isDarkLogo:!f.isDarkLogo}))})),[2]}))}))}),[f]),v=c.default.useCallback((function(){return o(void 0,void 0,void 0,(function(){return s(this,(function(t){return m(i(i({},f),{isEmailLinksEnabled:!f.isEmailLinksEnabled})),p.doUpdateUseTntLinksRequest(!f.isEmailLinksEnabled).catch((function(){m(i(i({},f),{isEmailLinksEnabled:!f.isEmailLinksEnabled}))})),[2]}))}))}),[f]),b=c.default.useCallback((function(){return o(void 0,void 0,void 0,(function(){return s(this,(function(t){return m(i(i({},f),{isAccountTrackTraceEnabled:!f.isAccountTrackTraceEnabled})),p.doUpdateUseTntAccountsRequest(!f.isAccountTrackTraceEnabled).catch((function(){m(i(i({},f),{isAccountTrackTraceEnabled:!f.isAccountTrackTraceEnabled}))})),[2]}))}))}),[f]),w=c.default.useCallback((function(){return o(void 0,void 0,void 0,(function(){return s(this,(function(t){return m(i(i({},f),{isAllOrdersAreTrunkrsEnabled:!f.isAllOrdersAreTrunkrsEnabled})),p.doUpdateUseAllOrdersAreTrunkrsRequest(!f.isAllOrdersAreTrunkrsEnabled).catch((function(){m(i(i({},f),{isAllOrdersAreTrunkrsEnabled:!f.isAllOrdersAreTrunkrsEnabled}))})),[2]}))}))}),[f]),_=c.default.useCallback((function(){return o(void 0,void 0,void 0,(function(){return s(this,(function(t){return m(i(i({},f),{isBigTextEnabled:!f.isBigTextEnabled})),p.doUpdateUseAllOrdersAreTrunkrsRequest(!f.isBigTextEnabled).catch((function(){m(i(i({},f),{isBigTextEnabled:!f.isBigTextEnabled}))})),[2]}))}))}),[f]),T=c.default.useMemo((function(){return{isWorking:r,config:f,prepareConfig:y,updateIsDarkLogo:g,updateTntLinks:v,updateTntActions:b,updateAllOrdersAreTrunkrs:w,updateUseBigText:_}}),[f,r,y,g,b,v,w,_]);return u.jsx(l.default.Provider,i({value:T},{children:e}),void 0)}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.doUpdateUseBigTextRequest=e.doUpdateUseAllOrdersAreTrunkrsRequest=e.doUpdateUseTntAccountsRequest=e.doUpdateUseTntLinksRequest=e.doUpdateUseDarkRequest=e.doConfigureRequest=e.doShippingReqisterRequest=e.decodeHtmlString=void 0;var s=o(n(24)),a=o(n(5));e.decodeHtmlString=function(t){var e=document.createElement("textarea");return e.innerHTML=t,e.value},e.doShippingReqisterRequest=function(t,e,n){return r(void 0,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,s.default.request({method:"POST",baseURL:a.default.apiBaseUrl,url:"integrations",headers:{Authorization:"Bearer "+t,"X-Organization-Id":e},data:{type:"WooCommerce",name:window.location.hostname,version:1,meta:n}})];case 1:return[2,r.sent().data]}}))}))},e.doConfigureRequest=function(t,e,n,o){return r(void 0,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return(r=new FormData).append("action","tr-wc_register-plugin"),r.append("accessToken",t),r.append("organizationId",e),r.append("organizationName",n),r.append("integrationId",o),[4,s.default.request({method:"POST",url:ajaxurl,data:r})];case 1:return i.sent(),[2]}}))}))},e.doUpdateUseDarkRequest=function(t){return r(void 0,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(e=new FormData).append("action","tr-wc_update-use-dark"),e.append("isDarkLogo",t.toString()),[4,s.default.request({method:"POST",url:ajaxurl,data:e})];case 1:return n.sent(),[2]}}))}))},e.doUpdateUseTntLinksRequest=function(t){return r(void 0,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(e=new FormData).append("action","tr-wc_update-use-tnt-links"),e.append("isEmailLinksEnabled",t.toString()),[4,s.default.request({method:"POST",url:ajaxurl,data:e})];case 1:return n.sent(),[2]}}))}))},e.doUpdateUseTntAccountsRequest=function(t){return r(void 0,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(e=new FormData).append("action","tr-wc_update-use-tnt-account"),e.append("isAccountTrackTraceEnabled",t.toString()),[4,s.default.request({method:"POST",url:ajaxurl,data:e})];case 1:return n.sent(),[2]}}))}))},e.doUpdateUseAllOrdersAreTrunkrsRequest=function(t){return r(void 0,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(e=new FormData).append("action","tr-wc_update-use-all-orders-are-trunkrs"),e.append("isAllOrdersAreTrunkrsEnabled",t.toString()),[4,s.default.request({method:"POST",url:ajaxurl,data:e})];case 1:return n.sent(),[2]}}))}))},e.doUpdateUseBigTextRequest=function(t){return r(void 0,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(e=new FormData).append("action","tr-wc_update-use-big-checkout-text"),e.append("isUseBigTextEnabled",t.toString()),[4,s.default.request({method:"POST",url:ajaxurl,data:e})];case 1:return n.sent(),[2]}}))}))}},function(t,e,n){t.exports=n(25)},function(t,e,n){"use strict";var r=n(1),i=n(8),o=n(26),s=n(15);function a(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=a(n(11));u.Axios=o,u.create=function(t){return a(s(u.defaults,t))},u.Cancel=n(16),u.CancelToken=n(39),u.isCancel=n(10),u.all=function(t){return Promise.all(t)},u.spread=n(40),u.isAxiosError=n(41),t.exports=u,t.exports.default=u},function(t,e,n){"use strict";var r=n(1),i=n(9),o=n(27),s=n(28),a=n(15);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},u.prototype.getUri=function(t){return t=a(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,n,r){return this.request(a(r||{},{method:t,url:e,data:n}))}})),t.exports=u},function(t,e,n){"use strict";var r=n(1);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(29),o=n(10),s=n(11);function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return a(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return a(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(a(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(14);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var r=n(1);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(35),i=n(36);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(1),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},function(t,e,n){"use strict";var r=n(1);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(16);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(0),a=o(n(2)),u=o(n(43)),c=o(n(44)),l=o(n(45)),p=o(n(47)),h=o(n(57));n(61);var d=o(n(62)),f=o(n(65));e.default=function(){var t=u.default(),e=t.isWorking,n=t.config,o=t.prepareConfig,m=t.updateUseBigText,y=t.updateIsDarkLogo,g=t.updateTntLinks,v=t.updateTntActions,b=t.updateAllOrdersAreTrunkrs,w=a.default.useCallback((function(t){return r(void 0,void 0,void 0,(function(){return i(this,(function(e){return[2,o(t.accessToken,t.organizationId)]}))}))}),[o]);return s.jsxs(l.default,{children:[s.jsx(c.default,{className:"tr-wc-trunkrsFull"},void 0),(null==n?void 0:n.isConfigured)?s.jsxs(s.Fragment,{children:[s.jsx(h.default,{integrationId:n.details.integrationId,organizationId:n.details.organizationId,organizationName:n.details.organizationName},void 0),s.jsx(f.default,{allOrdersAreTrunkrs:n.isAllOrdersAreTrunkrsEnabled,onAllOrdersAreTrunkrs:b},void 0),s.jsx(d.default,{useBigText:n.isBigTextEnabled,darkLogo:n.isDarkLogo,tntEmailLinks:n.isEmailLinksEnabled,tntAccountActions:n.isAccountTrackTraceEnabled,onUseBigTextChanged:m,onDarkLogoChanged:y,onTntEmailLinksChanged:g,onTntAccountActionsChanged:v},void 0)]},void 0):s.jsx(p.default,{loading:e,onLoginDone:w},void 0)]},void 0)}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(2)),o=r(n(7));e.default=function(){return i.default.useContext(o.default)}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.default=function(t){var e=t.className;return i.jsx("svg",r({className:e,viewBox:"0 0 320 38.19"},{children:i.jsxs("g",r({transform:"translate(-238.467 -453.779)"},{children:[i.jsxs("g",r({transform:"translate(238.467 453.779)"},{children:[i.jsxs("g",r({transform:"translate(67.154)"},{children:[i.jsx("path",{d:"M567.979 467.551v30.663h-7.144v-30.663h-16.181l.183-4.991h39.2l.122 4.991z",fill:"#201047",transform:"translate(-544.654 -460.633)"},void 0),i.jsx("path",{d:"M717.507 522.354v-27.661l5.129-.282.305 2.583.306 3.8h.122c2.625-4.227 7.2-6.763 13.066-6.763a21.582 21.582 0 0 1 4.213.423l-.366 4.837a18.181 18.181 0 0 0-4.274-.47c-6.777 0-12.029 3.992-12.029 10.1v13.431z",fill:"#201047",transform:"translate(-678.979 -484.774)"},void 0),i.jsx("path",{d:"M880.84 513.949c0 6.481-5.373 10.473-16.608 10.473-11.174 0-16.547-4.039-16.547-10.473v-17.987h6.472v17.8c0 3.9 3.3 6.246 10.075 6.246s10.136-2.3 10.136-6.246v-17.8h6.472z",fill:"#201047",transform:"translate(-780.09 -486.279)"},void 0),i.jsx("path",{d:"M1064.4 522.02v-17.283c0-4.6-3.48-6.669-10.013-6.669-3.6 0-8.06 1.221-10.2 3.428v20.524h-6.472v-27.755l4.518-.282 1.221 3.24a22.331 22.331 0 0 1 12.639-3.616c9.22 0 14.776 3.8 14.776 11.13v17.283z",fill:"#201047",transform:"translate(-927.733 -484.44)"},void 0),i.jsx("path",{d:"M1234.834 474.161h6.777l12.7-11.022h7.876l-15.143 12.923 15.754 15.3h-7.877l-13.372-13.065h-6.717v13.065h-6.472v-37.298l6.472-.285z",fill:"#201047",transform:"translate(-1075.837 -453.779)"},void 0),i.jsx("path",{d:"M1409.318 522.354v-27.661l5.129-.282.305 2.583.305 3.8h.122c2.625-4.227 7.2-6.763 13.066-6.763a21.581 21.581 0 0 1 4.213.423l-.366 4.837a18.181 18.181 0 0 0-4.274-.47c-6.777 0-12.029 3.992-12.029 10.1v13.431z",fill:"#201047",transform:"translate(-1216.059 -484.774)"},void 0),i.jsx("path",{d:"M1548.524 522.8c-5.19 0-10.014-.939-13.372-2.677l.916-4.133c3.3 1.831 8.365 2.771 12.517 2.771 6.167 0 8.67-2.067 8.67-4.415 0-6.105-22.042-2.865-22.042-12.539 0-4.79 4.946-7.984 14.715-7.984a37.911 37.911 0 0 1 11.723 1.738l-.611 4.039a40.578 40.578 0 0 0-11.357-1.691c-5.068 0-8.243 1.456-8.243 3.663 0 5.683 21.859 2.4 21.859 12.257.001 5.071-4.334 8.971-14.775 8.971z",fill:"#201047",transform:"translate(-1314.294 -484.607)"},void 0)]}),void 0),i.jsx("g",r({transform:"translate(0 1.926)"},{children:i.jsxs("g",{children:[i.jsx("g",r({transform:"translate(.243)"},{children:i.jsx("path",{fill:"#00d163",d:"M239.9 473.289a.981.981 0 0 0 .663 1.708l17.7-.048a1.56 1.56 0 0 0 1.046-.406l13.191-11.984-19.5.054a3.507 3.507 0 0 0-2.351.912z",transform:"translate(-239.576 -462.559)"},void 0)}),void 0),i.jsx("path",{d:"M296.542 462.586l-21.3.051a1.786 1.786 0 0 0-1.2.47l-12.629 11.57a1.523 1.523 0 0 0-.489 1.121v8.934a.94.94 0 0 1-.932.946l-8.148.02a3.363 3.363 0 0 0-2.27.892l-10.779 9.917a1 1 0 0 0 .662 1.729l20.974-.05a1.275 1.275 0 0 0 .858-.336l12.775-11.7a1.522 1.522 0 0 0 .49-1.12v-8.934a.94.94 0 0 1 .932-.946l8.739-.021a1.841 1.841 0 0 0 1.242-.488l11.606-10.678a.789.789 0 0 0-.531-1.377z",fill:"#201047",transform:"translate(-238.467 -462.58)"},void 0)]},void 0)}),void 0)]}),void 0),i.jsx("g",r({transform:"translate(554.613 460.161)"},{children:i.jsx("path",{fill:"#1d1047",d:"M1667.281 484.388a1.928 1.928 0 1 1-1.921-1.876 1.885 1.885 0 0 1 1.921 1.876zm-3.374 0a1.453 1.453 0 0 0 1.464 1.5 1.436 1.436 0 0 0 1.43-1.487 1.448 1.448 0 1 0-2.893-.011zm1.155.983h-.435V483.5a3.792 3.792 0 0 1 .72-.057 1.169 1.169 0 0 1 .652.137.52.52 0 0 1 .183.412.48.48 0 0 1-.389.434v.023a.553.553 0 0 1 .343.457 1.43 1.43 0 0 0 .137.469h-.469a1.613 1.613 0 0 1-.148-.458c-.034-.206-.149-.3-.389-.3h-.206zm.011-1.063h.206c.24 0 .434-.08.434-.275 0-.171-.126-.286-.4-.286a1.049 1.049 0 0 0-.24.023z",transform:"translate(-1663.427 -482.512)"},void 0)}),void 0)]}),void 0)}),void 0)}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);n(46),e.default=function(t){var e=t.children;return i.jsx("div",r({className:"tr-wc-centeredContainer"},{children:e}),void 0)}},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(48));n(56),e.default=function(t){var e=t.loading,n=t.onLoginDone;return o.jsxs("div",r({className:"tr-wc-connectionPanel"},{children:[o.jsx("span",r({className:"tr-wc-panelHeader"},{children:o.jsx("p",{children:"Platform connectie"},void 0)}),void 0),o.jsxs("span",r({className:"tr-wc-panelContent"},{children:[o.jsxs("span",r({className:"tr-wc-connectionStatus"},{children:[o.jsx("h3",{children:"Niet verbonden met Trunkrs"},void 0),o.jsx("p",{children:"Verbind uw winkel met het Trunkrs platform om te beginnen met verzenden."},void 0)]}),void 0),o.jsx("span",{children:o.jsx(s.default,{loading:e,onLoginDone:n},void 0)},void 0)]}),void 0)]}),void 0)}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(2)),a=n(49),u=i(n(6)),c=i(n(51)),l=i(n(17));n(53);var p=i(n(54)),h=i(n(5));e.default=function(t){var e=t.className,n=t.loading,i=t.onLoginDone,d=s.default.useRef(),f=s.default.useCallback((function(t){var e=t.data,n=e.type,r=e.organizationId;"ORG_ID_RECEIVED"===n&&(d.current=r)}),[]),m=s.default.useCallback((function(t,e){window.removeEventListener("message",f),t?console.error(t):null==i||i.call(null,{organizationId:d.current,accessToken:e.accessToken})}),[f,i]),y=s.default.useCallback((function(){var t=btoa(JSON.stringify({origin:window.location.origin}));new a.WebAuth({domain:h.default.auth0.domain,clientID:h.default.auth0.clientId,audience:h.default.auth0.audience,state:t,redirectUri:h.default.auth0.redirectUrl}).popup.authorize({domain:h.default.auth0.domain,clientId:h.default.auth0.clientId,audience:h.default.auth0.audience,redirectUri:h.default.auth0.redirectUrl,responseType:"token"},m),window.removeEventListener("message",f),window.addEventListener("message",f)}),[m,f]);return o.jsxs(l.default,r({color:"green",disabled:n,className:u.default("tr-wc-connectButton",e),onClick:y},{children:[n?o.jsx(p.default,{size:32,thickness:2},void 0):o.jsx(c.default,{className:"tr-wc-logo",variant:"indigo"},void 0),o.jsx("p",r({className:"tr-wc-buttonText"},{children:n?"Verbinden":"Verbind"}),void 0)]}),void 0)}},function(t,e,n){"use strict";n.r(e),function(t,r){n.d(e,"Authentication",(function(){return qe})),n.d(e,"Management",(function(){return Ue})),n.d(e,"WebAuth",(function(){return Ee})),n.d(e,"version",(function(){return ot}));var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var s=o((function(t){var e,n;e=i,n=function(){function t(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<t.length;r++){var i=t[r];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(r>0&&(i=i.replace(/^[\/]+/,"")),i=r<t.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),e.push(i))}var o=e.join("/"),s=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return s.shift()+(s.length>0?"?":"")+s.join("&")}return function(){return t("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=n():e.urljoin=n()})),a=Object.prototype.hasOwnProperty,u=Array.isArray,c=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),l=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n},p={arrayToObject:l,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var i=e[r],o=i.obj[i.prop],s=Object.keys(o),a=0;a<s.length;++a){var c=s[a],l=o[c];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(e.push({obj:o,prop:c}),n.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(u(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n){if(0===t.length)return t;var r=t;if("symbol"==typeof t?r=Symbol.prototype.toString.call(t):"string"!=typeof t&&(r=String(t)),"iso-8859-1"===n)return escape(r).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var i="",o=0;o<r.length;++o){var s=r.charCodeAt(o);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?i+=r.charAt(o):s<128?i+=c[s]:s<2048?i+=c[192|s>>6]+c[128|63&s]:s<55296||s>=57344?i+=c[224|s>>12]+c[128|s>>6&63]+c[128|63&s]:(o+=1,s=65536+((1023&s)<<10|1023&r.charCodeAt(o)),i+=c[240|s>>18]+c[128|s>>12&63]+c[128|s>>6&63]+c[128|63&s])}return i},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(u(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!=typeof n){if(u(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var i=e;return u(e)&&!u(n)&&(i=l(e,r)),u(e)&&u(n)?(n.forEach((function(n,i){if(a.call(e,i)){var o=e[i];o&&"object"==typeof o&&n&&"object"==typeof n?e[i]=t(o,n,r):e.push(n)}else e[i]=n})),e):Object.keys(n).reduce((function(e,i){var o=n[i];return a.call(e,i)?e[i]=t(e[i],o,r):e[i]=o,e}),i)}},h=String.prototype.replace,d=/%20/g,f={RFC1738:"RFC1738",RFC3986:"RFC3986"},m=p.assign({default:f.RFC3986,formatters:{RFC1738:function(t){return h.call(t,d,"+")},RFC3986:function(t){return String(t)}}},f),y=Object.prototype.hasOwnProperty,g={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},v=Array.isArray,b=Array.prototype.push,w=function(t,e){b.apply(t,v(e)?e:[e])},_=Date.prototype.toISOString,T=m.default,O={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:p.encode,encodeValuesOnly:!1,format:T,formatter:m.formatters[T],indices:!1,serializeDate:function(t){return _.call(t)},skipNulls:!1,strictNullHandling:!1},k=function t(e,n,r,i,o,s,a,u,c,l,h,d,f){var m=e;if("function"==typeof a?m=a(n,m):m instanceof Date?m=l(m):"comma"===r&&v(m)&&(m=p.maybeMap(m,(function(t){return t instanceof Date?l(t):t})).join(",")),null===m){if(i)return s&&!d?s(n,O.encoder,f,"key"):n;m=""}if(function(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"symbol"==typeof t||"bigint"==typeof t}(m)||p.isBuffer(m))return s?[h(d?n:s(n,O.encoder,f,"key"))+"="+h(s(m,O.encoder,f,"value"))]:[h(n)+"="+h(String(m))];var y,g=[];if(void 0===m)return g;if(v(a))y=a;else{var b=Object.keys(m);y=u?b.sort(u):b}for(var _=0;_<y.length;++_){var T=y[_],k=m[T];if(!o||null!==k){var x=v(m)?"function"==typeof r?r(n,T):n:n+(c?"."+T:"["+T+"]");w(g,t(k,x,r,i,o,s,a,u,c,l,h,d,f))}}return g},x=Object.prototype.hasOwnProperty,j=Array.isArray,C={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:p.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},A=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},S=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},E=function(t,e,n,r){if(t){var i=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),a=s?i.slice(0,s.index):i,u=[];if(a){if(!n.plainObjects&&x.call(Object.prototype,a)&&!n.allowPrototypes)return;u.push(a)}for(var c=0;n.depth>0&&null!==(s=o.exec(i))&&c<n.depth;){if(c+=1,!n.plainObjects&&x.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+i.slice(s.index)+"]"),function(t,e,n,r){for(var i=r?e:S(e,n),o=t.length-1;o>=0;--o){var s,a=t[o];if("[]"===a&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var u="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(u,10);n.parseArrays||""!==u?!isNaN(c)&&a!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[])[c]=i:s[u]=i:s={0:i}}i=s}return i}(u,e,n,r)}},D=function(t,e){var n,r=t,i=function(t){if(!t)return O;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||O.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=m.default;if(void 0!==t.format){if(!y.call(m.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=m.formatters[n],i=O.filter;return("function"==typeof t.filter||v(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:O.addQueryPrefix,allowDots:void 0===t.allowDots?O.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:O.charsetSentinel,delimiter:void 0===t.delimiter?O.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:O.encode,encoder:"function"==typeof t.encoder?t.encoder:O.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:O.encodeValuesOnly,filter:i,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:O.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:O.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:O.strictNullHandling}}(e);"function"==typeof i.filter?r=(0,i.filter)("",r):v(i.filter)&&(n=i.filter);var o,s=[];if("object"!=typeof r||null===r)return"";o=e&&e.arrayFormat in g?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var a=g[o];n||(n=Object.keys(r)),i.sort&&n.sort(i.sort);for(var u=0;u<n.length;++u){var c=n[u];i.skipNulls&&null===r[c]||w(s,k(r[c],c,a,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.formatter,i.encodeValuesOnly,i.charset))}var l=s.join(i.delimiter),p=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&("iso-8859-1"===i.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),l.length>0?p+l:""},R=o((function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<r.length;i++)if((n=r[i])===e||n.fn===e){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}})),q=P;P.default=P,P.stable=L,P.stableStringify=L;var U=[],I=[];function P(t,e,n){var r;for(function t(e,n,r,i){var o;if("object"==typeof e&&null!==e){for(o=0;o<r.length;o++)if(r[o]===e){var s=Object.getOwnPropertyDescriptor(i,n);return void(void 0!==s.get?s.configurable?(Object.defineProperty(i,n,{value:"[Circular]"}),U.push([i,n,e,s])):I.push([e,n]):(i[n]="[Circular]",U.push([i,n,e])))}if(r.push(e),Array.isArray(e))for(o=0;o<e.length;o++)t(e[o],o,r,e);else{var a=Object.keys(e);for(o=0;o<a.length;o++){var u=a[o];t(e[u],u,r,e)}}r.pop()}}(t,"",[],void 0),r=0===I.length?JSON.stringify(t,e,n):JSON.stringify(t,N(e),n);0!==U.length;){var i=U.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}return r}function M(t,e){return t<e?-1:t>e?1:0}function L(t,e,n){var r,i=function t(e,n,r,i){var o;if("object"==typeof e&&null!==e){for(o=0;o<r.length;o++)if(r[o]===e){var s=Object.getOwnPropertyDescriptor(i,n);return void(void 0!==s.get?s.configurable?(Object.defineProperty(i,n,{value:"[Circular]"}),U.push([i,n,e,s])):I.push([e,n]):(i[n]="[Circular]",U.push([i,n,e])))}if("function"==typeof e.toJSON)return;if(r.push(e),Array.isArray(e))for(o=0;o<e.length;o++)t(e[o],o,r,e);else{var a={},u=Object.keys(e).sort(M);for(o=0;o<u.length;o++){var c=u[o];t(e[c],c,r,e),a[c]=e[c]}if(void 0===i)return a;U.push([i,n,e]),i[n]=a}r.pop()}}(t,"",[],void 0)||t;for(r=0===I.length?JSON.stringify(i,e,n):JSON.stringify(i,N(e),n);0!==U.length;){var o=U.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return r}function N(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(I.length>0)for(var r=0;r<I.length;r++){var i=I[r];if(i[1]===e&&i[0]===n){n="[Circular]",I.splice(r,1);break}}return t.call(this,e,n)}}function B(t){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var z=function(t){return null!==t&&"object"===B(t)};function H(t){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var F=V;function V(t){if(t)return function(t){for(var e in V.prototype)Object.prototype.hasOwnProperty.call(V.prototype,e)&&(t[e]=V.prototype[e]);return t}(t)}V.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},V.prototype.parse=function(t){return this._parser=t,this},V.prototype.responseType=function(t){return this._responseType=t,this},V.prototype.serialize=function(t){return this._serializer=t,this},V.prototype.timeout=function(t){if(!t||"object"!==H(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},V.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var W=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];V.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&W.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},V.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},V.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(t,e){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)e(n.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}})),r.end((function(n,r){n?e(n):t(r)}))}))}return this._fullfilledPromise.then(t,e)},V.prototype.catch=function(t){return this.then(void 0,t)},V.prototype.use=function(t){return t(this),this},V.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},V.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},V.prototype.get=function(t){return this._header[t.toLowerCase()]},V.prototype.getHeader=V.prototype.get,V.prototype.set=function(t,e){if(z(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},V.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},V.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(z(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},V.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},V.prototype._auth=function(t,e,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},V.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},V.prototype.redirects=function(t){return this._maxRedirects=t,this},V.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},V.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},V.prototype.send=function(t){var e=z(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&z(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)||n||this.type("json"),this},V.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},V.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.slice(e+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,e)+"?"+n.join("&")}}},V.prototype._appendQueryString=function(){console.warn("Unsupported")},V.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},V.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))};var J=$;function $(t){if(t)return function(t){for(var e in $.prototype)Object.prototype.hasOwnProperty.call($.prototype,e)&&(t[e]=$.prototype[e]);return t}(t)}function X(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Z(){this._defaults=[]}$.prototype.get=function(t){return this.header[t.toLowerCase()]},$.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=e.split(/ *; */).shift();var n=function(t){return t.split(/ *; */).reduce((function(t,e){var n=e.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(t[r]=i),t}),{})}(e);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{t.link&&(this.links=function(t){return t.split(/ *, */).reduce((function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t}),{})}(t.link))}catch(t){}},$.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t},["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach((function(t){Z.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._defaults.push({fn:t,args:n}),this}})),Z.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,function(t){return function(t){if(Array.isArray(t))return X(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return X(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(t,void 0):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.args))}))};for(var K=Z,Q=o((function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r;function i(){}"undefined"!=typeof window?r=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),r=void 0):r=self,t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1===arguments.length?new e.Request("GET",t):new e.Request(t,n)};var o=e=t.exports;e.Request=h,o.getXHR=function(){if(r.XMLHttpRequest&&(!r.location||"file:"!==r.location.protocol||!r.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw new Error("Browser-only version of superagent could not find XHR")};var s="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function a(t){if(!z(t))return t;var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&u(e,n,t[n]);return e.join("&")}function u(t,e,n){if(void 0!==n)if(null!==n)if(Array.isArray(n))n.forEach((function(n){u(t,e,n)}));else if(z(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&u(t,"".concat(e,"[").concat(r,"]"),n[r]);else t.push(encodeURI(e)+"="+encodeURIComponent(n));else t.push(encodeURI(e))}function c(t){for(var e,n,r={},i=t.split("&"),o=0,s=i.length;o<s;++o)-1===(n=(e=i[o]).indexOf("="))?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function l(t){return/[/+]json($|[^-\w])/.test(t)}function p(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,n,r,i,o=t.split(/\r?\n/),a={},u=0,c=o.length;u<c;++u)-1!==(e=(n=o[u]).indexOf(":"))&&(r=n.slice(0,e).toLowerCase(),i=s(n.slice(e+1)),a[r]=i);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function h(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,r=null;try{r=new p(n)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",r);try{n._isResponseOK(r)||(t=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=r,t.status=r.status,n.callback(t,r)):n.callback(null,r)}))}function d(t,e,n){var r=o("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}o.serializeObject=a,o.parseString=c,o.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},o.serialize={"application/x-www-form-urlencoded":a,"application/json":q},o.parse={"application/x-www-form-urlencoded":c,"application/json":JSON.parse},J(p.prototype),p.prototype._parseBody=function(t){var e=o.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&l(this.type)&&(e=o.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},p.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot ".concat(e," ").concat(n," (").concat(this.status,")"),i=new Error(r);return i.status=this.status,i.method=e,i.url=n,i},o.Response=p,R(h.prototype),F(h.prototype),h.prototype.type=function(t){return this.set("Content-Type",o.types[t]||t),this},h.prototype.accept=function(t){return this.set("Accept",o.types[t]||t),this},h.prototype.auth=function(t,e,r){1===arguments.length&&(e=""),"object"===n(e)&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var i=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,r,i)},h.prototype.query=function(t){return"string"!=typeof t&&(t=a(t)),t&&this._query.push(t),this},h.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},h.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},h.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},h.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},h.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},h.prototype.ca=h.prototype.agent,h.prototype.buffer=h.prototype.ca,h.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},h.prototype.pipe=h.prototype.write,h.prototype._isHost=function(t){return t&&"object"===n(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},h.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||i,this._finalizeQueryString(),this._end()},h.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},h.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=o.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",r.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",r.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],s=this._serializer||o.serialize[i?i.split(";")[0]:""];!s&&l(i)&&(s=o.serialize["application/json"]),s&&(n=s(n))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},o.agent=function(){return new K},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){K.prototype[t.toLowerCase()]=function(e,n){var r=new o.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}})),K.prototype.del=K.prototype.delete,o.get=function(t,e,n){var r=o("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},o.head=function(t,e,n){var r=o("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},o.options=function(t,e,n){var r=o("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},o.del=d,o.delete=d,o.patch=function(t,e,n){var r=o("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},o.post=function(t,e,n){var r=o("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},o.put=function(t,e,n){var r=o("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}})),G=(Q.Request,[]),Y=[],tt=("undefined"!=typeof Uint8Array&&Uint8Array,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),et=0,nt=tt.length;et<nt;++et)G[et]=tt[et],Y[tt.charCodeAt(et)]=et;function rt(t,e,n){for(var r,i,o=[],s=e;s<n;s+=3)r=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(G[(i=r)>>18&63]+G[i>>12&63]+G[i>>6&63]+G[63&i]);return o.join("")}Y["-".charCodeAt(0)]=62,Y["_".charCodeAt(0)]=63;var it=function(t){return function(t){for(var e,n=t.length,r=n%3,i=[],o=0,s=n-r;o<s;o+=16383)i.push(rt(t,o,o+16383>s?s:o+16383));return 1===r?(e=t[n-1],i.push(G[e>>2]+G[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(G[e>>10]+G[e>>4&63]+G[e<<2&63]+"=")),i.join("")}(function(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}(t)).replace(/\+/g,"-").replace(/\//g,"_")},ot={raw:"9.16.2"},st=Object.prototype.toString;function at(t,e,n,r){if(n="array"===n?"object":n,t&&typeof t[e]!==n)throw new Error(r)}function ut(t,e,n){if(typeof t!==e)throw new Error(n)}function ct(t,e,n){if(-1===e.indexOf(t))throw new Error(n)}var lt={check:function(t,e,n){if(e.optional&&!t||ut(t,e.type,e.message),"object"===e.type&&n)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=r[i];n[o].optional&&!t[o]||n[o].condition&&!n[o].condition(t)||(at(t,o,n[o].type,n[o].message),n[o].values&&ct(t[o],n[o].values,n[o].value_message))}},attribute:at,variable:ut,value:ct,isArray:function(t){return this.supportsIsArray()?Array.isArray(t):"[object Array]"===st.call(t)},supportsIsArray:function(){return null!=Array.isArray}};function pt(t){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i=Object.keys(Object(r)),o=0,s=i.length;o<s;o++){var a=i[o],u=Object.getOwnPropertyDescriptor(r,a);void 0!==u&&u.enumerable&&(e[a]=r[a])}}return e}var ht=function(){return Object.assign?Object.assign:pt};function dt(t,e){return e.reduce((function(e,n){return t[n]&&(e[n]=t[n]),e}),{})}function ft(t){var e=[];for(var n in t)e.push(t[n]);return e}function mt(){var t=ft(arguments);return t.unshift({}),ht().apply(void 0,t)}function yt(t){var e=t.match(/^(https?:|file:|chrome-extension:)\/\/(([^:/?#]*)(?::([0-9]+))?)([/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return e&&{href:t,protocol:e[1],host:e[2],hostname:e[3],port:e[4],pathname:e[5],search:e[6],hash:e[7]}}function gt(t,e){var n=mt(t);return t[e]&&(n[e]=t[e].trim()),n}var vt={toSnakeCase:function t(e,n){return"object"!=typeof e||lt.isArray(e)||null===e?e:(n=n||[],Object.keys(e).reduce((function(r,i){return r[-1===n.indexOf(i)?function(t){for(var e,n="",r=0,i=!0,o=!0;r<t.length;)e=t.charCodeAt(r),!o&&e>=65&&e<=90||!i&&e>=48&&e<=57?(n+="_",n+=t[r].toLowerCase()):n+=t[r].toLowerCase(),i=e>=48&&e<=57,o=e>=65&&e<=90,r++;return n}(i):i]=t(e[i]),r}),{}))},toCamelCase:function t(e,n,r){return"object"!=typeof e||lt.isArray(e)||null===e?e:(n=n||[],r=r||{},Object.keys(e).reduce((function(i,o){var s,a=-1===n.indexOf(o)?(s=o.split("_")).reduce((function(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)}),s.shift()):o;return i[a]=t(e[a]||e[o],[],r),r.keepOriginal&&(i[o]=t(e[o],[],r)),i}),{}))},blacklist:function(t,e){return Object.keys(t).reduce((function(n,r){return-1===e.indexOf(r)&&(n[r]=t[r]),n}),{})},merge:function(t,e){return{base:e?dt(t,e):t,with:function(t,e){return t=e?dt(t,e):t,mt(this.base,t)}}},pick:dt,getKeysNotIn:function(t,e){var n=[];for(var r in t)-1===e.indexOf(r)&&n.push(r);return n},extend:mt,getOriginFromUrl:function(t){if(t){var e=yt(t);if(!e)return null;var n=e.protocol+"//"+e.hostname;return e.port&&(n+=":"+e.port),n}},getLocationFromUrl:yt,trimUserDetails:function(t){return function(t,e){return["username","email","phoneNumber"].reduce(gt,t)}(t)},updatePropertyOn:function t(e,n,r){"string"==typeof n&&(n=n.split("."));var i=n[0];e.hasOwnProperty(i)&&(1===n.length?e[i]=r:t(e[i],n.slice(1),r))}};function bt(t){this.request=t,this.method=t.method,this.url=t.url,this.body=t._data,this.headers=t._header}function wt(t){this.request=t}function _t(t){this._sendTelemetry=!1!==t._sendTelemetry||t._sendTelemetry,this._telemetryInfo=t._telemetryInfo||null,this._timesToRetryFailedRequests=t._timesToRetryFailedRequests,this.headers=t.headers||{},this._universalLoginPage=t.universalLoginPage}function Tt(){return window}bt.prototype.abort=function(){this.request.abort()},bt.prototype.getMethod=function(){return this.method},bt.prototype.getBody=function(){return this.body},bt.prototype.getUrl=function(){return this.url},bt.prototype.getHeaders=function(){return this.headers},wt.prototype.set=function(t,e){return this.request=this.request.set(t,e),this},wt.prototype.send=function(t){return this.request=this.request.send(vt.trimUserDetails(t)),this},wt.prototype.withCredentials=function(){return this.request=this.request.withCredentials(),this},wt.prototype.end=function(t){return this.request.end(t),new bt(this.request)},_t.prototype.setCommonConfiguration=function(t,e){if(e=e||{},this._timesToRetryFailedRequests>0&&(t=t.retry(this._timesToRetryFailedRequests)),e.noHeaders)return t;var n=this.headers;t=t.set("Content-Type","application/json");for(var r=Object.keys(this.headers),i=0;i<r.length;i++)t=t.set(r[i],n[r[i]]);return this._sendTelemetry&&(t=t.set("Auth0-Client",this.getTelemetryData())),t},_t.prototype.getTelemetryData=function(){var t=this._universalLoginPage?"auth0.js-ulp":"auth0.js",e={name:t,version:ot.raw};this._telemetryInfo&&((e=vt.extend({},this._telemetryInfo)).env=vt.extend({},this._telemetryInfo.env),e.env[t]=ot.raw);var n=JSON.stringify(e);return it(n)},_t.prototype.get=function(t,e){return new wt(this.setCommonConfiguration(Q.get(t),e))},_t.prototype.post=function(t,e){return new wt(this.setCommonConfiguration(Q.post(t),e))},_t.prototype.patch=function(t,e){return new wt(this.setCommonConfiguration(Q.patch(t),e))};var Ot={redirect:function(t){Tt().location=t},getDocument:function(){return Tt().document},getWindow:Tt,getOrigin:function(){var t=Tt().location,e=t.origin;return e||(e=vt.getOriginFromUrl(t.href)),e}};function kt(){}kt.prototype.getItem=function(){return null},kt.prototype.removeItem=function(){},kt.prototype.setItem=function(){};var xt=o((function(t,e){var n;n=function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function i(){}function o(e,n,o){if("undefined"!=typeof document){"number"==typeof(o=t({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(t){}n=r.write?r.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in o)o[u]&&(a+="; "+u,!0!==o[u]&&(a+="="+o[u].split(";")[0]));return document.cookie=e+"="+n+a}}function s(t,n){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),u=a.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var c=e(a[0]);if(u=(r.read||r)(u,c)||e(u),n)try{u=JSON.parse(u)}catch(t){}if(i[c]=u,t===c)break}catch(t){}}return t?i[t]:i}}return i.set=o,i.get=function(t){return s(t,!1)},i.getJSON=function(t){return s(t,!0)},i.remove=function(e,n){o(e,"",t(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}((function(){}))},t.exports=n()}));function jt(){}function Ct(t){this.disableWarnings=t.disableWarnings}function At(t){if(this.warn=new Ct({}),this.storage=new jt,!0===t.__tryLocalStorageFirst)try{var e=Ot.getWindow().localStorage;e&&(this.storage=e)}catch(t){this.warn.warning(t),this.warn.warning("Can't use localStorage. Using CookieStorage instead.")}}function St(t){this.handler=new At(t)}function Et(t){this.storage=new St(t)}function Dt(t,e){return{error:t,errorDescription:e}}jt.prototype.getItem=function(t){return xt.get(t)},jt.prototype.removeItem=function(t){xt.remove(t)},jt.prototype.setItem=function(t,e,n){var r=vt.extend({expires:1},n);"https:"===Ot.getWindow().location.protocol&&(r.secure=!0),xt.set(t,e,r)},Ct.prototype.warning=function(t){this.disableWarnings||console.warn(t)},At.prototype.failover=function(){this.storage instanceof kt?this.warn.warning("DummyStorage: ignore failover"):this.storage instanceof jt?(this.warn.warning("CookieStorage: failing over DummyStorage"),this.storage=new kt):(this.warn.warning("LocalStorage: failing over CookieStorage"),this.storage=new jt)},At.prototype.getItem=function(t){try{return this.storage.getItem(t)}catch(e){return this.warn.warning(e),this.failover(),this.getItem(t)}},At.prototype.removeItem=function(t){try{return this.storage.removeItem(t)}catch(e){return this.warn.warning(e),this.failover(),this.removeItem(t)}},At.prototype.setItem=function(t,e,n){try{return this.storage.setItem(t,e,n)}catch(r){return this.warn.warning(r),this.failover(),this.setItem(t,e,n)}},St.prototype.getItem=function(t){var e=this.handler.getItem(t);try{return JSON.parse(e)}catch(t){return e}},St.prototype.removeItem=function(t){return this.handler.removeItem(t)},St.prototype.setItem=function(t,e,n){var r=JSON.stringify(e);return this.handler.setItem(t,r,n)},Et.prototype.set=function(t,e){var n={lastUsedConnection:t,lastUsedSub:e};this.storage.setItem("auth0.ssodata",JSON.stringify(n))},Et.prototype.get=function(){var t=this.storage.getItem("auth0.ssodata");if(t)return JSON.parse(t)};var Rt={buildResponse:Dt,invalidToken:function(t){return Dt("invalid_token",t)}};function qt(t,e){return(e=e||{}).ignoreCasing=!!e.ignoreCasing&&e.ignoreCasing,function(n,r){var i;return n||r?(!n&&r.err&&(n=r.err,r=null),!n&&r.error&&(n=r,r=null),n?(i={original:n},vt.updatePropertyOn(i,"original.response.req._data.password","*****"),n.response&&n.response.statusCode&&(i.statusCode=n.response.statusCode),n.response&&n.response.statusText&&(i.statusText=n.response.statusText),n.response&&n.response.body&&(n=n.response.body),n.err&&(n=n.err),i.code=n.code||n.error||n.error_code||n.status||null,i.description=n.errorDescription||n.error_description||n.description||n.error||n.details||n.err||null,e.forceLegacyError&&(i.error=i.code,i.error_description=i.description),n.error_codes&&n.error_details&&(i.errorDetails={codes:n.error_codes,details:n.error_details}),n.name&&(i.name=n.name),n.policy&&(i.policy=n.policy),t(i)):!r.type||"text/html"!==r.type&&"text/plain"!==r.type?e.ignoreCasing?t(null,r.body||r):t(null,vt.toCamelCase(r.body||r,[],{keepOriginal:e.keepOriginalCasing})):t(null,r.text)):t(Rt.buildResponse("generic_error","Something went wrong"))}}var Ut=["realm","audience","otp","client_id","client_secret","redirect_uri","scope","code","grant_type","username","password","refresh_token","assertion","client_assertion","client_assertion_type","code_verifier"],It=["connection","connection_scope","auth0Client","owp","device","realm","organization","invitation","protocol","_csrf","_intstate","login_ticket","client_id","response_type","response_mode","redirect_uri","audience","scope","state","nonce","display","prompt","screen_hint","max_age","ui_locales","claims_locales","id_token_hint","login_hint","acr_values","claims","registration","request","request_uri","code_challenge","code_challenge_method","access_type","display"],Pt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function Mt(t){var e={exports:{}};return t(e,e.exports),e.exports}var Lt=Mt((function(t,e){t.exports=function(){function t(t){return"function"==typeof t}var e=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,i=void 0,o=void 0,s=function(t,e){d[n]=t,d[n+1]=e,2===(n+=2)&&(o?o(f):b())},a="undefined"!=typeof window?window:void 0,u=a||{},c=u.MutationObserver||u.WebKitMutationObserver,l="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var t=setTimeout;return function(){return t(f,1)}}var d=new Array(1e3);function f(){for(var t=0;t<n;t+=2)(0,d[t])(d[t+1]),d[t]=void 0,d[t+1]=void 0;n=0}var m,y,g,v,b=void 0;function w(t,e){var n=this,r=new this.constructor(O);void 0===r[T]&&U(r);var i=n._state;if(i){var o=arguments[i-1];s((function(){return R(i,r,o,n._result)}))}else E(n,r,t,e);return r}function _(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(O);return j(e,t),e}b=l?function(){return r.nextTick(f)}:c?(y=0,g=new c(f),v=document.createTextNode(""),g.observe(v,{characterData:!0}),function(){v.data=y=++y%2}):p?((m=new MessageChannel).port1.onmessage=f,function(){return m.port2.postMessage(0)}):void 0===a?function(){try{var t=Function("return this")().require("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(f)}:h()}catch(t){return h()}}():h();var T=Math.random().toString(36).substring(2);function O(){}var k=void 0;function x(e,n,r){n.constructor===e.constructor&&r===w&&n.constructor.resolve===_?function(t,e){1===e._state?A(t,e._result):2===e._state?S(t,e._result):E(e,void 0,(function(e){return j(t,e)}),(function(e){return S(t,e)}))}(e,n):void 0===r?A(e,n):t(r)?function(t,e,n){s((function(t){var r=!1,i=function(n,i,o,s){try{n.call(i,(function(n){r||(r=!0,e!==n?j(t,n):A(t,n))}),(function(e){r||(r=!0,S(t,e))}))}catch(t){return t}}(n,e);!r&&i&&(r=!0,S(t,i))}),t)}(e,n,r):A(e,n)}function j(t,e){if(t===e)S(t,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(r=e),null===r||"object"!==i&&"function"!==i)A(t,e);else{var n=void 0;try{n=e.then}catch(e){return void S(t,e)}x(t,e,n)}var r,i}function C(t){t._onerror&&t._onerror(t._result),D(t)}function A(t,e){t._state===k&&(t._result=e,t._state=1,0!==t._subscribers.length&&s(D,t))}function S(t,e){t._state===k&&(t._state=2,t._result=e,s(C,t))}function E(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+1]=n,i[o+2]=r,0===o&&t._state&&s(D,t)}function D(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,s=0;s<e.length;s+=3)i=e[s+n],(r=e[s])?R(n,r,i,o):i(o);t._subscribers.length=0}}function R(e,n,r,i){var o=t(r),s=void 0,a=void 0,u=!0;if(o){try{s=r(i)}catch(e){u=!1,a=e}if(n===s)return void S(n,new TypeError("A promises callback cannot return that same promise."))}else s=i;n._state!==k||(o&&u?j(n,s):!1===u?S(n,a):1===e?A(n,s):2===e&&S(n,s))}var q=0;function U(t){t[T]=q++,t._state=void 0,t._result=void 0,t._subscribers=[]}var I=function(){function t(t,n){this._instanceConstructor=t,this.promise=new t(O),this.promise[T]||U(this.promise),e(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&A(this.promise,this._result))):S(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===k&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===_){var i=void 0,o=void 0,s=!1;try{i=t.then}catch(t){s=!0,o=t}if(i===w&&t._state!==k)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===P){var a=new n(O);s?S(a,o):x(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===k&&(this._remaining--,2===t?S(r,n):this._result[e]=n),0===this._remaining&&A(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,(function(t){return n._settledAt(1,e,t)}),(function(t){return n._settledAt(2,e,t)}))},t}(),P=function(){function e(t){this[T]=q++,this._result=this._state=void 0,this._subscribers=[],O!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){j(t,e)}),(function(e){S(t,e)}))}catch(e){S(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this,r=n.constructor;return t(e)?n.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):n.then(e,e)},e}();return P.prototype.then=w,P.all=function(t){return new I(this,t).promise},P.race=function(t){var n=this;return e(t)?new n((function(e,r){for(var i=t.length,o=0;o<i;o++)n.resolve(t[o]).then(e,r)})):new n((function(t,e){return e(new TypeError("You must pass an array to race."))}))},P.resolve=_,P.reject=function(t){var e=new this(O);return S(e,t),e},P._setScheduler=function(t){o=t},P._setAsap=function(t){s=t},P._asap=s,P.polyfill=function(){var t=void 0;if(void 0!==Pt)t=Pt;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=P},P.Promise=P,P}()})),Nt=Mt((function(t,e){var n;t.exports=n=n||function(t,e){var n=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},s=i.WordArray=o.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++)e[r+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else for(o=0;o<i;o+=4)e[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],i=function(e){e=e;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r;return i/=4294967296,(i+=.5)*(t.random()>.5?1:-1)}},o=0;o<e;o+=4){var a=i(4294967296*(n||t.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,e)}}),a=r.enc={},u=a.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new s.init(n,e/2)}},c=a.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++)r.push(String.fromCharCode(e[i>>>2]>>>24-i%4*8&255));return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new s.init(n,e)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},p=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),u=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*o,c=t.min(4*u,i);if(u){for(var l=0;l<u;l+=o)this._doProcessBlock(r,l);var p=r.splice(0,u);n.sigBytes-=c}return new s.init(p,c)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});i.Hasher=p.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new h.HMAC.init(t,n).finalize(e)}}});var h=r.algo={};return r}(Math)})),Bt=Mt((function(t,e){var n;t.exports=(n=Nt,function(t){var e=n,r=e.lib,i=r.WordArray,o=r.Hasher,s=e.algo,a=[],u=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(a[i]=n(t.pow(r,.5))),u[i]=n(t.pow(r,1/3)),i++),r++}();var c=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],l=n[5],p=n[6],h=n[7],d=0;d<64;d++){if(d<16)c[d]=0|t[e+d];else{var f=c[d-15],m=c[d-2];c[d]=((f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3)+c[d-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+c[d-16]}var y=r&i^r&o^i&o,g=h+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&p)+u[d]+c[d];h=p,p=l,l=a,a=s+g|0,s=o,o=i,i=r,r=g+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+l|0,n[6]=n[6]+p|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),n.SHA256)})),zt=Mt((function(t,e){var n,r;t.exports=(r=(n=Nt).lib.WordArray,n.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t){var e=t.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(e=a)}return function(t,e,n){for(var i=[],o=0,s=0;s<e;s++)if(s%4){var a=n[t.charCodeAt(s-1)]<<s%4*2,u=n[t.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=(a|u)<<24-o%4*8,o++}return r.create(i,o)}(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)})),Ht=Mt((function(t,e){t.exports=Nt.enc.Hex})),Ft=Mt((function(t,e){(function(){var e;function n(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):this.fromString(t,null==e&&"string"!=typeof t?256:e))}function r(){return new n(null)}var i="undefined"!=typeof navigator;i&&"Microsoft Internet Explorer"==navigator.appName?(n.prototype.am=function(t,e,n,r,i,o){for(var s=32767&e,a=e>>15;--o>=0;){var u=32767&this[t],c=this[t++]>>15,l=a*u+c*s;i=((u=s*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i},e=30):i&&"Netscape"!=navigator.appName?(n.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var s=e*this[t++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},e=26):(n.prototype.am=function(t,e,n,r,i,o){for(var s=16383&e,a=e>>14;--o>=0;){var u=16383&this[t],c=this[t++]>>14,l=a*u+c*s;i=((u=s*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+a*c,n[r++]=268435455&u}return i},e=28),n.prototype.DB=e,n.prototype.DM=(1<<e)-1,n.prototype.DV=1<<e,n.prototype.FV=Math.pow(2,52),n.prototype.F1=52-e,n.prototype.F2=2*e-52;var o,s,a=new Array;for(o="0".charCodeAt(0),s=0;s<=9;++s)a[o++]=s;for(o="a".charCodeAt(0),s=10;s<36;++s)a[o++]=s;for(o="A".charCodeAt(0),s=10;s<36;++s)a[o++]=s;function u(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function c(t,e){var n=a[t.charCodeAt(e)];return null==n?-1:n}function l(t){var e=r();return e.fromInt(t),e}function p(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function h(t){this.m=t}function d(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function f(t,e){return t&e}function m(t,e){return t|e}function y(t,e){return t^e}function g(t,e){return t&~e}function v(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function b(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function w(){}function _(t){return t}function T(t){this.r2=r(),this.q3=r(),n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}h.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},h.prototype.revert=function(t){return t},h.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},h.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},h.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},d.prototype.convert=function(t){var e=r();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e},d.prototype.revert=function(t){var e=r();return t.copyTo(e),this.reduce(e),e},d.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},d.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},d.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},n.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},n.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},n.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var i=t.length,o=!1,s=0;--i>=0;){var a=8==r?255&t[i]:c(t,i);a<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},n.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},n.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},n.prototype.lShiftTo=function(t,e){var n,r=t%this.DB,i=this.DB-r,o=(1<<i)-1,s=Math.floor(t/this.DB),a=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)e[n+s+1]=this[n]>>i|a,a=(this[n]&o)<<r;for(n=s-1;n>=0;--n)e[n]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},n.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&o)<<i,e[s-n]=this[s]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}},n.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},n.prototype.multiplyTo=function(t,e){var r=this.abs(),i=t.abs(),o=r.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o<i.t;++o)e[o+r.t]=r.am(0,i[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)},n.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},n.prototype.divRemTo=function(t,e,i){var o=t.abs();if(!(o.t<=0)){var s=this.abs();if(s.t<o.t)return null!=e&&e.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=r());var a=r(),u=this.s,c=t.s,l=this.DB-p(o[o.t-1]);l>0?(o.lShiftTo(l,a),s.lShiftTo(l,i)):(o.copyTo(a),s.copyTo(i));var h=a.t,d=a[h-1];if(0!=d){var f=d*(1<<this.F1)+(h>1?a[h-2]>>this.F2:0),m=this.FV/f,y=(1<<this.F1)/f,g=1<<this.F2,v=i.t,b=v-h,w=null==e?r():e;for(a.dlShiftTo(b,w),i.compareTo(w)>=0&&(i[i.t++]=1,i.subTo(w,i)),n.ONE.dlShiftTo(h,w),w.subTo(a,a);a.t<h;)a[a.t++]=0;for(;--b>=0;){var _=i[--v]==d?this.DM:Math.floor(i[v]*m+(i[v-1]+g)*y);if((i[v]+=a.am(0,_,i,b,0,h))<_)for(a.dlShiftTo(b,w),i.subTo(w,i);i[v]<--_;)i.subTo(w,i)}null!=e&&(i.drShiftTo(h,e),u!=c&&n.ZERO.subTo(e,e)),i.t=h,i.clamp(),l>0&&i.rShiftTo(l,i),u<0&&n.ZERO.subTo(i,i)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},n.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},n.prototype.exp=function(t,e){if(t>4294967295||t<1)return n.ONE;var i=r(),o=r(),s=e.convert(this),a=p(t)-1;for(s.copyTo(i);--a>=0;)if(e.sqrTo(i,o),(t&1<<a)>0)e.mulTo(o,s,i);else{var u=i;i=o,o=u}return e.revert(i)},n.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(i=!0,o=u(n));s>=0;)a<e?(n=(this[s]&(1<<a)-1)<<e-a,n|=this[--s]>>(a+=this.DB-e)):(n=this[s]>>(a-=e)&r,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(o+=u(n));return i?o:"0"},n.prototype.negate=function(){var t=r();return n.ZERO.subTo(this,t),t},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(t){var e=r();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e},n.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new h(e):new d(e),this.exp(t,n)},n.ZERO=l(0),n.ONE=l(1),w.prototype.convert=_,w.prototype.revert=_,w.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},w.prototype.sqrTo=function(t,e){t.squareTo(e)},T.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=r();return t.copyTo(e),this.reduce(e),e},T.prototype.revert=function(t){return t},T.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},T.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},T.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var O,k,x,j=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],C=(1<<26)/j[j.length-1];function A(){var t;t=(new Date).getTime(),k[x++]^=255&t,k[x++]^=t>>8&255,k[x++]^=t>>16&255,k[x++]^=t>>24&255,x>=I&&(x-=I)}if(n.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},n.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),i=l(n),o=r(),s=r(),a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(n+s.intValue()).toString(t).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(t)+a},n.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),o=!1,s=0,a=0,u=0;u<t.length;++u){var l=c(t,u);l<0?"-"==t.charAt(u)&&0==this.signum()&&(o=!0):(a=e*a+l,++s>=r&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),o&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),m,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(n.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),e.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},n.prototype.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;r<o;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=o;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},n.prototype.changeBit=function(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},n.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},n.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},n.prototype.multiplyLowerTo=function(t,e,n){var r,i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,t[i],n,i,0,this.t);for(r=Math.min(t.t,e);i<r;++i)this.am(0,t[i],n,i,0,e-i);n.clamp()},n.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},n.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},n.prototype.millerRabin=function(t){var e=this.subtract(n.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var o=e.shiftRight(i);(t=t+1>>1)>j.length&&(t=j.length);for(var s=r(),a=0;a<t;++a){s.fromInt(j[Math.floor(Math.random()*j.length)]);var u=s.modPow(o,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(e)){for(var c=1;c++<i&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},n.prototype.clone=function(){var t=r();return this.copyTo(t),t},n.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},n.prototype.equals=function(t){return 0==this.compareTo(t)},n.prototype.min=function(t){return this.compareTo(t)<0?this:t},n.prototype.max=function(t){return this.compareTo(t)>0?this:t},n.prototype.and=function(t){var e=r();return this.bitwiseTo(t,f,e),e},n.prototype.or=function(t){var e=r();return this.bitwiseTo(t,m,e),e},n.prototype.xor=function(t){var e=r();return this.bitwiseTo(t,y,e),e},n.prototype.andNot=function(t){var e=r();return this.bitwiseTo(t,g,e),e},n.prototype.not=function(){for(var t=r(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},n.prototype.shiftLeft=function(t){var e=r();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},n.prototype.shiftRight=function(t){var e=r();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},n.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+v(this[t]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=b(this[n]^e);return t},n.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},n.prototype.setBit=function(t){return this.changeBit(t,m)},n.prototype.clearBit=function(t){return this.changeBit(t,g)},n.prototype.flipBit=function(t){return this.changeBit(t,y)},n.prototype.add=function(t){var e=r();return this.addTo(t,e),e},n.prototype.subtract=function(t){var e=r();return this.subTo(t,e),e},n.prototype.multiply=function(t){var e=r();return this.multiplyTo(t,e),e},n.prototype.divide=function(t){var e=r();return this.divRemTo(t,e,null),e},n.prototype.remainder=function(t){var e=r();return this.divRemTo(t,null,e),e},n.prototype.divideAndRemainder=function(t){var e=r(),n=r();return this.divRemTo(t,e,n),new Array(e,n)},n.prototype.modPow=function(t,e){var n,i,o=t.bitLength(),s=l(1);if(o<=0)return s;n=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new h(e):e.isEven()?new T(e):new d(e);var a=new Array,u=3,c=n-1,f=(1<<n)-1;if(a[1]=i.convert(this),n>1){var m=r();for(i.sqrTo(a[1],m);u<=f;)a[u]=r(),i.mulTo(m,a[u-2],a[u]),u+=2}var y,g,v=t.t-1,b=!0,w=r();for(o=p(t[v])-1;v>=0;){for(o>=c?y=t[v]>>o-c&f:(y=(t[v]&(1<<o+1)-1)<<c-o,v>0&&(y|=t[v-1]>>this.DB+o-c)),u=n;0==(1&y);)y>>=1,--u;if((o-=u)<0&&(o+=this.DB,--v),b)a[y].copyTo(s),b=!1;else{for(;u>1;)i.sqrTo(s,w),i.sqrTo(w,s),u-=2;u>0?i.sqrTo(s,w):(g=s,s=w,w=g),i.mulTo(w,a[y],s)}for(;v>=0&&0==(t[v]&1<<o);)i.sqrTo(s,w),g=s,s=w,w=g,--o<0&&(o=this.DB-1,--v)}return i.revert(s)},n.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var r=t.clone(),i=this.clone(),o=l(1),s=l(0),a=l(0),u=l(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(r,i),e&&a.subTo(o,a),u.subTo(s,u))}return 0!=i.compareTo(n.ONE)?n.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},n.prototype.pow=function(t){return this.exp(t,new w)},n.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},n.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=j[j.length-1]){for(e=0;e<j.length;++e)if(n[0]==j[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<j.length;){for(var r=j[e],i=e+1;i<j.length&&r<C;)r*=j[i++];for(r=n.modInt(r);e<i;)if(r%j[e++]==0)return!1}return n.millerRabin(t)},n.prototype.square=function(){var t=r();return this.squareTo(t),t},n.prototype.Barrett=T,null==k){var S;if(k=new Array,x=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var E=new Uint8Array(32);for(window.crypto.getRandomValues(E),S=0;S<32;++S)k[x++]=E[S]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var D=window.crypto.random(32);for(S=0;S<D.length;++S)k[x++]=255&D.charCodeAt(S)}for(;x<I;)S=Math.floor(65536*Math.random()),k[x++]=S>>>8,k[x++]=255&S;x=0,A()}function R(){if(null==O){for(A(),(O=new U).init(k),x=0;x<k.length;++x)k[x]=0;x=0}return O.next()}function q(){}function U(){this.i=0,this.j=0,this.S=new Array}q.prototype.nextBytes=function(t){var e;for(e=0;e<t.length;++e)t[e]=R()},U.prototype.init=function(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)r=this.S[e],this.S[e]=this.S[n=n+this.S[e]+t[e%t.length]&255],this.S[n]=r;this.i=0,this.j=0},U.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]};var I=256;t.exports={default:n,BigInteger:n,SecureRandom:q}}).call(Pt)})),Vt={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},Wt={sha256:Bt};function Jt(t,e){if(this.n=null,this.e=0,!(null!=t&&null!=e&&t.length>0&&e.length>0))throw new Error("Invalid key data");this.n=new Ft.BigInteger(t,16),this.e=parseInt(e,16)}Jt.prototype.verify=function(t,e){e=e.replace(/[^0-9a-f]|[\s\n]]/gi,"");var n=new Ft.BigInteger(e,16);if(n.bitLength()>this.n.bitLength())throw new Error("Signature does not match with the key modulus.");var r=function(t){for(var e in Vt){var n=Vt[e],r=n.length;if(t.substring(0,r)===n)return{alg:e,hash:t.substring(r)}}return[]}(n.modPowInt(this.e,this.n).toString(16).replace(/^1f+00/,""));if(0===r.length)return!1;if(!Wt.hasOwnProperty(r.alg))throw new Error("Hashing algorithm is not supported.");var i=Wt[r.alg](t).toString();return r.hash===i};for(var $t=[],Xt=[],Zt="undefined"!=typeof Uint8Array?Uint8Array:Array,Kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qt=0,Gt=Kt.length;Qt<Gt;++Qt)$t[Qt]=Kt[Qt],Xt[Kt.charCodeAt(Qt)]=Qt;Xt["-".charCodeAt(0)]=62,Xt["_".charCodeAt(0)]=63;var Yt=function(t){var e,n,r=function(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}(t),i=r[0],o=r[1],s=new Zt(function(t,e,n){return 3*(e+n)/4-n}(0,i,o)),a=0,u=o>0?i-4:i;for(n=0;n<u;n+=4)e=Xt[t.charCodeAt(n)]<<18|Xt[t.charCodeAt(n+1)]<<12|Xt[t.charCodeAt(n+2)]<<6|Xt[t.charCodeAt(n+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=255&e;return 2===o&&(e=Xt[t.charCodeAt(n)]<<2|Xt[t.charCodeAt(n+1)]>>4,s[a++]=255&e),1===o&&(e=Xt[t.charCodeAt(n)]<<10|Xt[t.charCodeAt(n+1)]<<4|Xt[t.charCodeAt(n+2)]>>2,s[a++]=e>>8&255,s[a++]=255&e),s};function te(t){var e=t.length%4;return 0===e?t:t+new Array(4-e+1).join("=")}function ee(t){return t=te(t).replace(/\-/g,"+").replace(/_/g,"/"),decodeURIComponent(function(t){for(var e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}(Yt(t)).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function ne(t){return function(t){for(var e="",n=0;n<t.length;n++){var r=t[n].toString(16);e+=2===r.length?r:"0"+r}return e}(Yt(te(t)))}var re=Mt((function(t){var e,n;e=Pt,n=function(){function t(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0]=t[0].match(/^file:\/\/\//)?t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<t.length;r++){var i=t[r];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(r>0&&(i=i.replace(/^[\/]+/,"")),i=i.replace(/[\/]+$/,r<t.length-1?"":"/"),e.push(i))}var o=e.join("/"),s=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return s.shift()+(s.length>0?"?":"")+s.join("&")}return function(){return t("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=n():e.urljoin=n()}));function ie(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(t){return a[t.toLowerCase()]},has:function(t){return t.toLowerCase()in a}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),s.push([e,n]),a[e]=a[e]?a[e]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}function oe(t){if(t.ok)return t.json();var e=new Error(t.statusText);return e.response=t,Promise.reject(e)}function se(t){this.name="ConfigurationError",this.message=t||""}function ae(t){this.name="TokenValidationError",this.message=t||""}se.prototype=Error.prototype,ae.prototype=Error.prototype;var ue=function(){function t(){}var e=t.prototype;return e.get=function(){return null},e.has=function(){return null},e.set=function(){return null},t}();Lt.polyfill();var ce=function(t){return"number"==typeof t},le=function(){return new Date};function pe(t){var e=t||{};if(this.jwksCache=e.jwksCache||new ue,this.expectedAlg=e.expectedAlg||"RS256",this.issuer=e.issuer,this.audience=e.audience,this.leeway=0===e.leeway?0:e.leeway||60,this.jwksURI=e.jwksURI,this.maxAge=e.maxAge,this.__clock="function"==typeof e.__clock?e.__clock:le,this.leeway<0||this.leeway>300)throw new se("The leeway should be positive and lower than five minutes.");if("RS256"!==this.expectedAlg)throw new se('Signature algorithm of "'+this.expectedAlg+'" is not supported. Expected the ID token to be signed with "RS256".')}function he(t,e){this.plugins=e;for(var n=0;n<this.plugins.length;n++){if(this.plugins[n].version!==ot.raw){var r="";throw this.plugins[n].constructor&&this.plugins[n].constructor.name&&(r=this.plugins[n].constructor.name),new Error("Plugin "+r+" version ("+this.plugins[n].version+") is not compatible with the SDK version ("+ot.raw+")")}this.plugins[n].setWebAuth(t)}}pe.prototype.verify=function(t,e,n){if(!n&&e&&"function"==typeof e&&(n=e,e=void 0),!t)return n(new ae("ID token is required but missing"),null);var r=this.decode(t);if(r instanceof Error)return n(new ae("ID token could not be decoded"),null);var i=r.encoded.header+"."+r.encoded.payload,o=ne(r.encoded.signature),s=r.header.alg,a=r.header.kid,u=r.payload.aud,c=r.payload.sub,l=r.payload.iss,p=r.payload.exp,h=r.payload.nbf,d=r.payload.iat,f=r.payload.azp,m=r.payload.auth_time,y=r.payload.nonce,g=this.__clock(),v=this;if(v.expectedAlg!==s)return n(new ae('Signature algorithm of "'+s+'" is not supported. Expected the ID token to be signed with "RS256".'),null);this.getRsaVerifier(l,a,(function(t,s){if(t)return n(t,null);if(!s.verify(i,o))return n(new ae("Invalid ID token signature."),null);if(!l||"string"!=typeof l)return n(new ae("Issuer (iss) claim must be a string present in the ID token"),null);if(v.issuer!==l)return n(new ae('Issuer (iss) claim mismatch in the ID token, expected "'+v.issuer+'", found "'+l+'"'),null);if(!c||"string"!=typeof c)return n(new ae("Subject (sub) claim must be a string present in the ID token"),null);if(!u||"string"!=typeof u&&!Array.isArray(u))return n(new ae("Audience (aud) claim must be a string or array of strings present in the ID token"),null);if(Array.isArray(u)&&!u.includes(v.audience))return n(new ae('Audience (aud) claim mismatch in the ID token; expected "'+v.audience+'" but was not one of "'+u.join(", ")+'"'),null);if("string"==typeof u&&v.audience!==u)return n(new ae('Audience (aud) claim mismatch in the ID token; expected "'+v.audience+'" but found "'+u+'"'),null);if(e){if(!y||"string"!=typeof y)return n(new ae("Nonce (nonce) claim must be a string present in the ID token"),null);if(y!==e)return n(new ae('Nonce (nonce) claim value mismatch in the ID token; expected "'+e+'", found "'+y+'"'),null)}if(Array.isArray(u)&&u.length>1){if(!f||"string"!=typeof f)return n(new ae("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values"),null);if(f!==v.audience)return n(new ae('Authorized Party (azp) claim mismatch in the ID token; expected "'+v.audience+'", found "'+f+'"'),null)}if(!p||!ce(p))return n(new ae("Expiration Time (exp) claim must be a number present in the ID token"),null);if(!d||!ce(d))return n(new ae("Issued At (iat) claim must be a number present in the ID token"),null);var a=p+v.leeway,b=new Date(0);if(b.setUTCSeconds(a),g>b)return n(new ae('Expiration Time (exp) claim error in the ID token; current time "'+g+'" is after expiration time "'+b+'"'),null);if(h&&ce(h)){var w=h-v.leeway,_=new Date(0);if(_.setUTCSeconds(w),g<_)return n(new ae('Not Before Time (nbf) claim error in the ID token; current time "'+g+'" is before the not before time "'+_+'"'),null)}if(v.maxAge){if(!m||!ce(m))return n(new ae("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified"),null);var T=m+v.maxAge+v.leeway,O=new Date(0);if(O.setUTCSeconds(T),g>O)return n(new ae('Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time "'+g+'" is after last auth time at "'+O+'"'),null)}return n(null,r.payload)}))},pe.prototype.getRsaVerifier=function(t,e,n){var r=this,i=t+e;Promise.resolve(this.jwksCache.has(i)).then((function(n){return n?r.jwksCache.get(i):(o={jwksURI:r.jwksURI,iss:t,kid:e},("undefined"==typeof fetch?ie:fetch)(o.jwksURI||re(o.iss,".well-known","jwks.json")).then(oe).then((function(t){var e,n,r,i=null;for(e=0;e<t.keys.length&&null===i;e++)(n=t.keys[e]).kid===o.kid&&(i=n);if(!i)throw new Error('Could not find a public key for Key ID (kid) "'+o.kid+'"');return{modulus:ne((r=i).n),exp:ne(r.e)}})).catch((function(t){throw t})));var o})).then((function(t){if(!t||!t.modulus||!t.exp)throw new Error("Empty keyInfo in response");return Promise.resolve(r.jwksCache.set(i,t)).then((function(){n&&n(null,new Jt(t.modulus,t.exp))}))})).catch((function(t){n&&n(t)}))},pe.prototype.decode=function(t){var e,n,r=t.split(".");if(3!==r.length)return new ae("Cannot decode a malformed JWT");try{e=JSON.parse(ee(r[0])),n=JSON.parse(ee(r[1]))}catch(t){return new ae("Token header or payload is not valid JSON")}return{header:e,payload:n,encoded:{header:r[0],payload:r[1],signature:r[2]}}},pe.prototype.validateAccessToken=function(t,e,n,r){if(this.expectedAlg!==e)return r(new ae('Signature algorithm of "'+e+'" is not supported. Expected "'+this.expectedAlg+'"'));var i,o=Bt(t),s=Ht.stringify(o),a=s.substring(0,s.length/2),u=Ht.parse(a),c=zt.stringify(u);return r((i={"+":"-","/":"_","=":""},c.replace(/[+/=]/g,(function(t){return i[t]}))!==n?new ae("Invalid access_token"):null))},he.prototype.get=function(t){for(var e=0;e<this.plugins.length;e++)if(this.plugins[e].supports(t))return this.plugins[e].init();return null};var de=function(t){var e=new Uint8Array(t),n=[],r="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",i=Ot.getWindow().crypto||Ot.getWindow().msCrypto;if(!i)return null;for(var o=i.getRandomValues(e),s=0;s<o.length;s++)n.push(r[o[s]%r.length]);return n.join("")};function fe(t){var e=t.transaction||{};this.namespace=e.namespace||"com.auth0.auth.",this.keyLength=e.keyLength||32,this.storage=new St(t),this.options=t}function me(t){if(this.url=t.url,this.callback=t.callback,this.timeout=t.timeout||6e4,this.timeoutCallback=t.timeoutCallback||null,this.eventListenerType=t.eventListenerType||"message",this.iframe=null,this.timeoutHandle=null,this._destroyTimeout=null,this.transientMessageEventListener=null,this.proxyEventListener=null,this.eventValidator=t.eventValidator||{isValid:function(){return!0}},"function"!=typeof this.callback)throw new Error("options.callback must be a function")}function ye(t){this.webAuth=t,this.warn=new Ct(t.baseOptions)}function ge(t,e){this.webAuth=t,this.baseOptions=e,this.request=new _t(e),this.webMessageHandler=new ye(t),this.storage=new St(e)}function ve(t,e){return["co/verifier",encodeURIComponent(t),encodeURIComponent(e)].join("/")}function be(t,e){this.webAuth=t,this.baseOptions=e,this.crossOriginAuthentication=new ge(t,this.baseOptions),this.warn=new Ct({disableWarnings:!!e._disableDeprecationWarnings})}fe.prototype.process=function(t){if(!t.responseType)throw new Error("responseType is required");var e=t.realm||t.connection,n=-1!==t.responseType.indexOf("id_token"),r=this.generateTransaction(t.appState,t.state,t.nonce,e,n,t.organization);return t.state||(t.state=r.state),n&&!t.nonce&&(t.nonce=r.nonce),t},fe.prototype.generateTransaction=function(t,e,n,r,i,o){if(e=e||de(this.keyLength),n=n||(i?de(this.keyLength):null),Ot.getWindow().location.host!==this.options.domain){var s={nonce:n,appState:t,state:e,lastUsedConnection:r};o&&(s.organization=o),this.storage.setItem(this.namespace+e,s,{expires:1/48})}return{state:e,nonce:n}},fe.prototype.getStoredTransaction=function(t){var e;return e=this.storage.getItem(this.namespace+t),this.clearTransaction(t),e},fe.prototype.clearTransaction=function(t){this.storage.removeItem(this.namespace+t)},me.prototype.init=function(){var t=this,e=Ot.getWindow();switch(this.iframe=e.document.createElement("iframe"),this.iframe.style.display="none",this.proxyEventListener=function(e){t.eventListener(e)},this.eventListenerType){case"message":this.eventSourceObject=e;break;case"load":this.eventSourceObject=this.iframe;break;default:throw new Error("Unsupported event listener type: "+this.eventListenerType)}this.eventSourceObject.addEventListener(this.eventListenerType,this.proxyEventListener,!1),e.document.body.appendChild(this.iframe),this.iframe.src=this.url,this.timeoutHandle=setTimeout((function(){t.timeoutHandler()}),this.timeout)},me.prototype.eventListener=function(t){var e={event:t,sourceObject:this.eventSourceObject};this.eventValidator.isValid(e)&&(this.destroy(),this.callback(e))},me.prototype.timeoutHandler=function(){this.destroy(),this.timeoutCallback&&this.timeoutCallback()},me.prototype.destroy=function(){var t=this;clearTimeout(this.timeoutHandle),this._destroyTimeout=setTimeout((function(){t.eventSourceObject.removeEventListener(t.eventListenerType,t.proxyEventListener,!1),t.iframe.parentNode&&t.iframe.parentNode.removeChild(t.iframe)}),0)},ye.prototype.run=function(t,e){var n=this;t.responseMode="web_message",t.prompt="none";var r=Ot.getOrigin(),i=vt.getOriginFromUrl(t.redirectUri);if(i&&r!==i)return e({error:"origin_mismatch",error_description:"The redirectUri's origin ("+i+") should match the window's origin ("+r+")."});!function(t,e,n){new me({url:t,eventListenerType:"message",callback:function(t){n(null,t)},timeout:e.timeout,eventValidator:{isValid:function(t){return"authorization_response"===t.event.data.type&&e.state===t.event.data.response.state}},timeoutCallback:function(){n({error:"timeout",error_description:"Timeout during executing web_message communication",state:e.state})}}).init()}(this.webAuth.client.buildAuthorizeUrl(t),t,(function(r,i){var o=r;if(!r&&i.event.data.response.error&&(o=i.event.data.response),!o){var s=i.event.data.response;return n.webAuth.validateAuthenticationResponse(t,s,e)}return"consent_required"===o.error&&"localhost"===Ot.getWindow().location.hostname&&n.warn.warning("Consent Required. Consent can't be skipped on localhost. Read more here: https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-clients"),n.webAuth.transactionManager.clearTransaction(o.state),e(vt.pick(o,["error","error_description"]))}))},ge.prototype.login=function(t,e){var n=this,r=s(this.baseOptions.rootUrl,"/co/authenticate");t.username=t.username||t.email,delete t.email;var i={client_id:t.clientID||this.baseOptions.clientID,username:t.username};t.password&&(i.password=t.password),t.otp&&(i.otp=t.otp);var o=t.realm||this.baseOptions.realm;if(o){var a=t.credentialType||this.baseOptions.credentialType||"http://auth0.com/oauth/grant-type/password-realm";i.realm=o,i.credential_type=a}else i.credential_type="password";this.request.post(r).withCredentials().send(i).end((function(r,i){if(r){var o=r.response&&r.response.body||{error:"request_error",error_description:JSON.stringify(r)};return qt(e,{forceLegacyError:!0})(o)}function s(){var r=!0===t.popup;t=vt.blacklist(t,["password","credentialType","otp","popup","onRedirecting"]);var o=vt.merge(t).with({loginTicket:i.body.login_ticket}),s=ve(n.baseOptions.rootUrl,i.body.co_id);n.storage.setItem(s,i.body.co_verifier,{expires:1/96}),r?n.webMessageHandler.run(o,qt(e,{forceLegacyError:!0})):n.webAuth.authorize(o)}"function"==typeof t.onRedirecting?t.onRedirecting(s):s()}))},ge.prototype.callback=function(){var t=decodeURIComponent(function(t){var e=("&"+Ot.getWindow().location.hash.substring(1)).split("&origin=");if(2===e.length)return e.pop().split("&").shift()}()),e=Ot.getWindow(),n=this;e.addEventListener("message",(function(t){if("co_verifier_request"===t.data.type){var e=ve(t.origin,t.data.request.id),r=function(t,e){try{var n=t.getItem(e);return t.removeItem(e),n||""}catch(t){return""}}(n.storage,e);t.source.postMessage({type:"co_verifier_response",response:{verifier:r}},t.origin)}})),e.parent.postMessage({type:"ready"},t)},be.prototype.loginWithCredentials=function(t,e){t.realm=t.realm||t.connection,delete t.connection,this.crossOriginAuthentication.login(t,e)},be.prototype.signupAndLogin=function(t,e){var n=this;return this.webAuth.client.dbConnection.signup(t,(function(r){return r?e(r):(t.realm=t.realm||t.connection,delete t.connection,n.webAuth.login(t,e))}))};var we=o((function(t){var e=function(){function t(t,e,n){t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener&&t.addEventListener(e,n,!1)}function e(t,e,n){t.detachEvent?t.detachEvent("on"+e,n):t.removeEventListener&&t.removeEventListener(e,n,!1)}function n(t){/^https?:\/\//.test(t)||(t=window.location.href);var e=/^(https?:\/\/[\-_a-zA-Z\.0-9:]+)/.exec(t);return e?e[1]:t}var r=function(){if("undefined"==typeof navigator)return!1;var t=-1,e=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1)):e.indexOf("Trident")>-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1)),t>=8}();return"undefined"!=typeof window&&window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage?{open:function(i,o){if(!o)throw"missing required callback argument";var s,a;i.url||(s="missing required 'url' parameter"),i.relay_url||(s="missing required 'relay_url' parameter"),s&&setTimeout((function(){o(s)}),0),i.window_name||(i.window_name=null),i.window_features&&!function(){try{var t=navigator.userAgent;return-1!=t.indexOf("Fennec/")||-1!=t.indexOf("Firefox/")&&-1!=t.indexOf("Android")}catch(t){}return!1}()||(i.window_features=void 0);var u,c=i.origin||n(i.url);if(c!==n(i.relay_url))return setTimeout((function(){o("invalid arguments: origin of url and relay_url must match")}),0);r&&((a=document.createElement("iframe")).setAttribute("src",i.relay_url),a.style.display="none",a.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(a),u=a.contentWindow);var l=i.popup||window.open(i.url,i.window_name,i.window_features);i.popup&&(l.location.href=i.url),u||(u=l);var p=setInterval((function(){l&&l.closed&&(d(),o&&(o("User closed the popup window"),o=null))}),500),h=JSON.stringify({a:"request",d:i.params});function d(){if(a&&document.body.removeChild(a),a=void 0,p&&(p=clearInterval(p)),e(window,"message",f),e(window,"unload",d),l)try{l.close()}catch(t){u.postMessage("die",c)}l=u=void 0}function f(t){if(t.origin===c){try{var e=JSON.parse(t.data)}catch(t){if(o)return o(t);throw t}"ready"===e.a?u.postMessage(h,c):"error"===e.a?(d(),o&&(o(e.d),o=null)):"response"===e.a&&(d(),o&&(o(null,e.d),o=null))}}return t(window,"unload",d),t(window,"message",f),{originalPopup:l,close:d,focus:function(){if(l)try{l.focus()}catch(t){}}}},onOpen:function(n){var i="*",o=r?function(){for(var t=window.opener.frames,e=t.length-1;e>=0;e--)try{if(t[e].location.protocol===window.location.protocol&&t[e].location.host===window.location.host&&"__winchan_relay_frame"===t[e].name)return t[e]}catch(t){}}():window.opener;if(!o)throw"can't find relay frame";function s(t){t=JSON.stringify(t),r?o.doPost(t,i):o.postMessage(t,i)}function a(t){if("die"===t.data)try{window.close()}catch(t){}}t(r?o:window,"message",(function t(r){var o;try{o=JSON.parse(r.data)}catch(t){}o&&"request"===o.a&&(e(window,"message",t),i=r.origin,n&&setTimeout((function(){n(i,o.d,(function(t){n=void 0,s({a:"response",d:t})}))}),0))})),t(r?o:window,"message",a);try{s({a:"ready"})}catch(e){t(o,"load",(function(t){s({a:"ready"})}))}var u=function(){try{e(r?o:window,"message",a)}catch(t){}n&&s({a:"error",d:"client closed window"}),n=void 0;try{window.close()}catch(t){}};return t(window,"unload",u),{detach:function(){e(window,"unload",u)}}}}:{open:function(t,e,n,r){setTimeout((function(){r("unsupported browser")}),0)},onOpen:function(t){setTimeout((function(){t("unsupported browser")}),0)}}}();t.exports&&(t.exports=e)}));function _e(){this._current_popup=null}function Te(t,e){this.baseOptions=e,this.baseOptions.popupOrigin=e.popupOrigin,this.client=t.client,this.webAuth=t,this.transactionManager=new fe(this.baseOptions),this.crossOriginAuthentication=new ge(t,this.baseOptions),this.warn=new Ct({disableWarnings:!!e._disableDeprecationWarnings})}function Oe(t){this.authenticationUrl=t.authenticationUrl,this.timeout=t.timeout||6e4,this.handler=null,this.postMessageDataType=t.postMessageDataType||!1,this.postMessageOrigin=t.postMessageOrigin||Ot.getWindow().location.origin||Ot.getWindow().location.protocol+"//"+Ot.getWindow().location.hostname+(Ot.getWindow().location.port?":"+Ot.getWindow().location.port:"")}function ke(t){this.baseOptions=t,this.request=new _t(t),this.transactionManager=new fe(this.baseOptions)}function xe(t,e){this.baseOptions=e,this.client=t,this.baseOptions.universalLoginPage=!0,this.request=new _t(this.baseOptions),this.warn=new Ct({disableWarnings:!!e._disableDeprecationWarnings})}_e.prototype.calculatePosition=function(t){var e=t.width||500,n=t.height||600,r=Ot.getWindow(),i=void 0!==r.screenX?r.screenX:r.screenLeft,o=void 0!==r.screenY?r.screenY:r.screenTop,s=void 0!==r.outerWidth?r.outerWidth:r.document.body.clientWidth,a=void 0!==r.outerHeight?r.outerHeight:r.document.body.clientHeight;return{width:e,height:n,left:t.left||i+(s-e)/2,top:t.top||o+(a-n)/2}},_e.prototype.preload=function(t){var e=this,n=Ot.getWindow(),r=this.calculatePosition(t.popupOptions||{}),i=vt.merge(r).with(t.popupOptions),o=t.url||"about:blank",s=D(i,{encode:!1,delimiter:","});return this._current_popup&&!this._current_popup.closed||(this._current_popup=n.open(o,"auth0_signup_popup",s),this._current_popup.kill=function(){this.close(),e._current_popup=null}),this._current_popup},_e.prototype.load=function(t,e,n,r){var i=this,o=this.calculatePosition(n.popupOptions||{}),s=vt.merge(o).with(n.popupOptions),a=vt.merge({url:t,relay_url:e,window_features:D(s,{delimiter:",",encode:!1}),popup:this._current_popup}).with(n),u=we.open(a,(function(t,e){if(!t||"SyntaxError"!==t.name)return i._current_popup=null,r(t,e)}));return u.focus(),u},Te.prototype.buildPopupHandler=function(){var t=this.baseOptions.plugins.get("popup.getPopupHandler");return t?t.getPopupHandler():new _e},Te.prototype.preload=function(t){t=t||{};var e=this.buildPopupHandler();return e.preload(t),e},Te.prototype.getPopupHandler=function(t,e){return t.popupHandler?t.popupHandler:e?this.preload(t):this.buildPopupHandler()},Te.prototype.callback=function(t){var e=this,n=Ot.getWindow(),r=(t=t||{}).popupOrigin||this.baseOptions.popupOrigin||Ot.getOrigin();n.opener?we.onOpen((function(n,i,o){if(n!==r)return o({error:"origin_mismatch",error_description:"The popup's origin ("+n+") should match the `popupOrigin` parameter ("+r+")."});e.webAuth.parseHash(t||{},(function(t,e){return o(t||e)}))})):n.doPost=function(t){n.parent&&n.parent.postMessage(t,r)}},Te.prototype.authorize=function(t,e){var n,r,i={},o=this.baseOptions.plugins.get("popup.authorize"),a=vt.merge(this.baseOptions,["clientID","scope","domain","audience","tenant","responseType","redirectUri","_csrf","state","_intstate","nonce","organization","invitation"]).with(vt.blacklist(t,["popupHandler"]));return lt.check(a,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=s(this.baseOptions.rootUrl,"relay.html"),t.owp?a.owp=!0:(i.origin=function(t){/^https?:\/\//.test(t)||(t=window.location.href);var e=/^(https?:\/\/[-_a-zA-Z.0-9:]+)/.exec(t);return e?e[1]:t}(a.redirectUri),r=a.redirectUri),t.popupOptions&&(i.popupOptions=vt.pick(t.popupOptions,["width","height","top","left"])),o&&(a=o.processParams(a)),(a=this.transactionManager.process(a)).scope=a.scope||"openid profile email",delete a.domain,n=this.client.buildAuthorizeUrl(a),this.getPopupHandler(t).load(n,r,i,qt(e,{keepOriginalCasing:!0}))},Te.prototype.loginWithCredentials=function(t,e){t.realm=t.realm||t.connection,t.popup=!0,t=vt.merge(this.baseOptions,["redirectUri","responseType","state","nonce"]).with(vt.blacklist(t,["popupHandler","connection"])),t=this.transactionManager.process(t),this.crossOriginAuthentication.login(t,e)},Te.prototype.passwordlessVerify=function(t,e){var n=this;return this.client.passwordless.verify(vt.blacklist(t,["popupHandler"]),(function(r){if(r)return e(r);t.username=t.phoneNumber||t.email,t.password=t.verificationCode,delete t.email,delete t.phoneNumber,delete t.verificationCode,delete t.type,n.client.loginWithResourceOwner(t,e)}))},Te.prototype.signupAndLogin=function(t,e){var n=this;return this.client.dbConnection.signup(t,(function(r){if(r)return e(r);n.loginWithCredentials(t,e)}))},Oe.create=function(t){return new Oe(t)},Oe.prototype.login=function(t,e){this.handler=new me({auth0:this.auth0,url:this.authenticationUrl,eventListenerType:t?"message":"load",callback:this.getCallbackHandler(e,t),timeout:this.timeout,eventValidator:this.getEventValidator(),timeoutCallback:function(){e(null,"#error=timeout&error_description=Timeout+during+authentication+renew.")},usePostMessage:t||!1}),this.handler.init()},Oe.prototype.getEventValidator=function(){var t=this;return{isValid:function(e){switch(e.event.type){case"message":return e.event.origin===t.postMessageOrigin&&e.event.source===t.handler.iframe.contentWindow&&(!1===t.postMessageDataType||e.event.data.type&&e.event.data.type===t.postMessageDataType);case"load":if("about:"===e.sourceObject.contentWindow.location.protocol)return!1;default:return!0}}}},Oe.prototype.getCallbackHandler=function(t,e){return function(n){var r;r=e?"object"==typeof n.event.data&&n.event.data.hash?n.event.data.hash:n.event.data:n.sourceObject.contentWindow.location.hash,t(null,r)}},ke.prototype.login=function(t,e){var n,r;return n=s(this.baseOptions.rootUrl,"usernamepassword","login"),t.username=t.username||t.email,t=vt.blacklist(t,["email","onRedirecting"]),r=vt.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience"]).with(t),r=this.transactionManager.process(r),r=vt.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(qt(e))},ke.prototype.callback=function(t){var e,n=Ot.getDocument();(e=n.createElement("div")).innerHTML=t,n.body.appendChild(e).children[0].submit()},xe.prototype.login=function(t,e){if(Ot.getWindow().location.host!==this.baseOptions.domain)throw new Error("This method is meant to be used only inside the Universal Login Page.");var n,r=vt.merge(this.baseOptions,["clientID","redirectUri","tenant","responseType","responseMode","scope","audience","_csrf","state","_intstate","nonce"]).with(t);return lt.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(n=new ke(this.baseOptions)).login(r,(function(r,i){if(r)return e(r);function o(){n.callback(i)}if("function"==typeof t.onRedirecting)return t.onRedirecting((function(){o()}));o()}))},xe.prototype.signupAndLogin=function(t,e){var n=this;return n.client.client.dbConnection.signup(t,(function(r){return r?e(r):n.login(t,e)}))},xe.prototype.getSSOData=function(t,e){var n,r="";return"function"==typeof t&&(e=t,t=!1),lt.check(t,{type:"boolean",message:"withActiveDirectories parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),t&&(r="?"+D({ldaps:1,client_id:this.baseOptions.clientID})),n=s(this.baseOptions.rootUrl,"user","ssodata",r),this.request.get(n,{noHeaders:!0}).withCredentials().end(qt(e))};var je=function(){},Ce={lang:"en",templates:{auth0:function(t){var e="code"===t.type?"Enter the code shown above":"Solve the formula shown above";return'<div class="captcha-challenge">\n  <img src="'+t.image+'" />\n  <button type="button" class="captcha-reload">↺</button>\n</div>\n<input type="text" name="captcha"\n  class="form-control captcha-control"\n  placeholder="'+e+'" />'},recaptcha_v2:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},recaptcha_enterprise:function(){return'<div class="recaptcha" ></div><input type="hidden" name="captcha" />'},error:function(){return'<div class="error" style="color: red;">Error getting the bot detection challenge. Please contact the system administrator.</div>'}}};function Ae(t){switch(t){case"recaptcha_v2":return window.grecaptcha;case"recaptcha_enterprise":return window.grecaptcha.enterprise;default:throw new Error("Unknown captcha provider")}}function Se(){return new Date}function Ee(t){lt.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},popupOrigin:{optional:!0,type:"string",message:"popupOrigin is not valid"},leeway:{optional:!0,type:"number",message:"leeway is not valid"},plugins:{optional:!0,type:"array",message:"plugins is not valid"},maxAge:{optional:!0,type:"number",message:"maxAge is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"},_timesToRetryFailedRequests:{optional:!0,type:"number",message:"_timesToRetryFailedRequests option is not valid"}}),t.overrides&&lt.check(t.overrides,{type:"object",message:"overrides option is not valid"},{__tenant:{optional:!0,type:"string",message:"__tenant option is required"},__token_issuer:{optional:!0,type:"string",message:"__token_issuer option is required"},__jwks_uri:{optional:!0,type:"string",message:"__jwks_uri is required"}}),this.baseOptions=t,this.baseOptions.plugins=new he(this,this.baseOptions.plugins||[]),this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions._timesToRetryFailedRequests=t._timesToRetryFailedRequests?parseInt(t._timesToRetryFailedRequests,0):0,this.baseOptions.tenant=this.baseOptions.overrides&&this.baseOptions.overrides.__tenant||this.baseOptions.domain.split(".")[0],this.baseOptions.token_issuer=this.baseOptions.overrides&&this.baseOptions.overrides.__token_issuer||"https://"+this.baseOptions.domain+"/",this.baseOptions.jwksURI=this.baseOptions.overrides&&this.baseOptions.overrides.__jwks_uri,this.transactionManager=new fe(this.baseOptions),this.client=new qe(this.baseOptions),this.redirect=new be(this,this.baseOptions),this.popup=new Te(this,this.baseOptions),this.crossOriginAuthentication=new ge(this,this.baseOptions),this.webMessageHandler=new ye(this),this._universalLogin=new xe(this,this.baseOptions),this.ssodataStorage=new Et(this.baseOptions)}function De(t,e){this.baseOptions=e,this.request=t}function Re(t,e){this.baseOptions=e,this.request=t}function qe(t,e){2===arguments.length?this.auth0=t:e=t,lt.check(e,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},clientID:{type:"string",message:"clientID option is required"},responseType:{optional:!0,type:"string",message:"responseType is not valid"},responseMode:{optional:!0,type:"string",message:"responseMode is not valid"},redirectUri:{optional:!0,type:"string",message:"redirectUri is not valid"},scope:{optional:!0,type:"string",message:"scope is not valid"},audience:{optional:!0,type:"string",message:"audience is not valid"},_disableDeprecationWarnings:{optional:!0,type:"boolean",message:"_disableDeprecationWarnings option is not valid"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=e,this.baseOptions._sendTelemetry=!1!==this.baseOptions._sendTelemetry||this.baseOptions._sendTelemetry,this.baseOptions.rootUrl=this.baseOptions.domain&&0===this.baseOptions.domain.toLowerCase().indexOf("http")?this.baseOptions.domain:"https://"+this.baseOptions.domain,this.request=new _t(this.baseOptions),this.passwordless=new De(this.request,this.baseOptions),this.dbConnection=new Re(this.request,this.baseOptions),this.warn=new Ct({disableWarnings:!!e._disableDeprecationWarnings}),this.ssodataStorage=new Et(this.baseOptions)}function Ue(t){lt.check(t,{type:"object",message:"options parameter is not valid"},{domain:{type:"string",message:"domain option is required"},token:{type:"string",message:"token option is required"},_sendTelemetry:{optional:!0,type:"boolean",message:"_sendTelemetry option is not valid"},_telemetryInfo:{optional:!0,type:"object",message:"_telemetryInfo option is not valid"}}),this.baseOptions=t,this.baseOptions.headers={Authorization:"Bearer "+this.baseOptions.token},this.request=new _t(this.baseOptions),this.baseOptions.rootUrl=s("https://"+this.baseOptions.domain,"api","v2")}Ee.prototype.parseHash=function(t,e){var n,r;e||"function"!=typeof t?t=t||{}:(e=t,t={});var i=Ot.getWindow(),o=void 0===t.hash?i.location.hash:t.hash;if((n=function(t,e){var n=C;if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof t?function(t,e){var n,r={},i=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=e.parameterLimit===1/0?void 0:e.parameterLimit,s=i.split(e.delimiter,o),a=-1,u=e.charset;if(e.charsetSentinel)for(n=0;n<s.length;++n)0===s[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[n]?u="utf-8":"utf8=%26%2310003%3B"===s[n]&&(u="iso-8859-1"),a=n,n=s.length);for(n=0;n<s.length;++n)if(n!==a){var c,l,h=s[n],d=h.indexOf("]="),f=-1===d?h.indexOf("="):d+1;-1===f?(c=e.decoder(h,C.decoder,u,"key"),l=e.strictNullHandling?null:""):(c=e.decoder(h.slice(0,f),C.decoder,u,"key"),l=p.maybeMap(S(h.slice(f+1),e),(function(t){return e.decoder(t,C.decoder,u,"value")}))),l&&e.interpretNumericEntities&&"iso-8859-1"===u&&(l=A(l)),h.indexOf("[]=")>-1&&(l=j(l)?[l]:l),x.call(r,c)?r[c]=p.combine(r[c],l):r[c]=l}return r}(t,n):t,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;s<o.length;++s){var a=o[s],u=E(a,r[a],n,"string"==typeof t);i=p.merge(i,u,n)}return p.compact(i)}(o=o.replace(/^#?\/?/,""))).hasOwnProperty("error"))return r=Rt.buildResponse(n.error,n.error_description),n.state&&(r.state=n.state),e(r);if(!n.hasOwnProperty("access_token")&&!n.hasOwnProperty("id_token")&&!n.hasOwnProperty("refresh_token"))return e(null,null);var s=(this.baseOptions.responseType||t.responseType||"").split(" ");return s.length>0&&-1!==s.indexOf("token")&&!n.hasOwnProperty("access_token")?e(Rt.buildResponse("invalid_hash","response_type contains `token`, but the parsed hash does not contain an `access_token` property")):s.length>0&&-1!==s.indexOf("id_token")&&!n.hasOwnProperty("id_token")?e(Rt.buildResponse("invalid_hash","response_type contains `id_token`, but the parsed hash does not contain an `id_token` property")):this.validateAuthenticationResponse(t,n,e)},Ee.prototype.validateAuthenticationResponse=function(t,e,n){var r=this;t.__enableIdPInitiatedLogin=t.__enableIdPInitiatedLogin||t.__enableImpersonation;var i=e.state,o=this.transactionManager.getStoredTransaction(i),s=t.state||o&&o.state||null,a=s===i;if((i||s||!t.__enableIdPInitiatedLogin)&&!a)return n({error:"invalid_token",errorDescription:"`state` does not match."});var u=t.nonce||o&&o.nonce||null,c=o&&o.organization,l=t.state||o&&o.appState||null,p=function(t,i){return t?n(t):(o&&o.lastUsedConnection&&(i&&(s=i.sub),r.ssodataStorage.set(o.lastUsedConnection,s)),n(null,function(t,e,n){return{accessToken:t.access_token||null,idToken:t.id_token||null,idTokenPayload:n||null,appState:e||null,refreshToken:t.refresh_token||null,state:t.state||null,expiresIn:t.expires_in?parseInt(t.expires_in,10):null,tokenType:t.token_type||null,scope:t.scope||null}}(e,l,i)));var s};return e.id_token?this.validateToken(e.id_token,u,(function(t,n){if(!t){if(c){if(!n.org_id)return p(Rt.invalidToken("Organization Id (org_id) claim must be a string present in the ID token"));if(n.org_id!==c)return p(Rt.invalidToken('Organization Id (org_id) claim value mismatch in the ID token; expected "'+c+'", found "'+n.org_id+'"'))}return e.access_token&&n.at_hash?(new pe).validateAccessToken(e.access_token,"RS256",n.at_hash,(function(t){return t?p(Rt.invalidToken(t.message)):p(null,n)})):p(null,n)}if("invalid_token"!==t.error||t.errorDescription&&t.errorDescription.indexOf("Nonce (nonce) claim value mismatch in the ID token")>-1)return p(t);var i=(new pe).decode(e.id_token);return"HS256"!==i.header.alg?p(t):(i.payload.nonce||null)!==u?p({error:"invalid_token",errorDescription:'Nonce (nonce) claim value mismatch in the ID token; expected "'+u+'", found "'+i.payload.nonce+'"'}):e.access_token?r.client.userInfo(e.access_token,(function(t,e){return t?p(t):p(null,e)})):p({error:"invalid_token",description:"The id_token cannot be validated because it was signed with the HS256 algorithm and public clients (like a browser) can’t store secrets. Please read the associated doc for possible ways to fix this. Read more: https://auth0.com/docs/errors/libraries/auth0-js/invalid-token#parsing-an-hs256-signed-id-token-without-an-access-token"})})):p(null,null)},Ee.prototype.validateToken=function(t,e,n){new pe({issuer:this.baseOptions.token_issuer,jwksURI:this.baseOptions.jwksURI,audience:this.baseOptions.clientID,leeway:this.baseOptions.leeway||60,maxAge:this.baseOptions.maxAge,__clock:this.baseOptions.__clock||Se}).verify(t,e,(function(t,e){if(t)return n(Rt.invalidToken(t.message));n(null,e)}))},Ee.prototype.renewAuth=function(t,e){var n=!!t.usePostMessage,r=t.postMessageDataType||!1,i=t.postMessageOrigin||Ot.getWindow().origin,o=t.timeout,s=this,a=vt.merge(this.baseOptions,["clientID","redirectUri","responseType","scope","audience","_csrf","state","_intstate","nonce"]).with(t);a.responseType=a.responseType||"token",a.responseMode=a.responseMode||"fragment",a=this.transactionManager.process(a),lt.check(a,{type:"object",message:"options parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),a.prompt="none",a=vt.blacklist(a,["usePostMessage","tenant","postMessageDataType","postMessageOrigin"]),Oe.create({authenticationUrl:this.client.buildAuthorizeUrl(a),postMessageDataType:r,postMessageOrigin:i,timeout:o}).login(n,(function(t,n){if("object"==typeof n)return e(t,n);s.parseHash({hash:n},e)}))},Ee.prototype.checkSession=function(t,e){var n=vt.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(t);return"code"===n.responseType?e({error:"error",error_description:"responseType can't be `code`"}):(t.nonce||(n=this.transactionManager.process(n)),n.redirectUri?(lt.check(n,{type:"object",message:"options parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=vt.blacklist(n,["usePostMessage","tenant","postMessageDataType"]),void this.webMessageHandler.run(n,qt(e,{forceLegacyError:!0,ignoreCasing:!0}))):e({error:"error",error_description:"redirectUri can't be empty"}))},Ee.prototype.changePassword=function(t,e){return this.client.dbConnection.changePassword(t,e)},Ee.prototype.passwordlessStart=function(t,e){var n=vt.merge(this.baseOptions,["responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce"]).with(t.authParams);return t.authParams=this.transactionManager.process(n),this.client.passwordless.start(t,e)},Ee.prototype.signup=function(t,e){return this.client.dbConnection.signup(t,e)},Ee.prototype.authorize=function(t){var e=vt.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","organization","invitation"]).with(t);lt.check(e,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),(e=this.transactionManager.process(e)).scope=e.scope||"openid profile email",Ot.redirect(this.client.buildAuthorizeUrl(e))},Ee.prototype.signupAndAuthorize=function(t,e){var n=this;return this.client.dbConnection.signup(vt.blacklist(t,["popupHandler"]),(function(r){if(r)return e(r);t.realm=t.connection,t.username||(t.username=t.email),n.client.login(t,e)}))},Ee.prototype.login=function(t,e){var n=vt.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting","organization","invitation"]).with(t);n=this.transactionManager.process(n),Ot.getWindow().location.host===this.baseOptions.domain?(n.connection=n.realm,delete n.realm,this._universalLogin.login(n,e)):this.crossOriginAuthentication.login(n,e)},Ee.prototype.passwordlessLogin=function(t,e){var n=vt.merge(this.baseOptions,["clientID","responseType","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(t);if(n=this.transactionManager.process(n),Ot.getWindow().location.host===this.baseOptions.domain)this.passwordlessVerify(n,e);else{var r=vt.extend({credentialType:"http://auth0.com/oauth/grant-type/passwordless/otp",realm:n.connection,username:n.email||n.phoneNumber,otp:n.verificationCode},vt.blacklist(n,["connection","email","phoneNumber","verificationCode"]));this.crossOriginAuthentication.login(r,e)}},Ee.prototype.crossOriginAuthenticationCallback=function(){this.crossOriginVerification()},Ee.prototype.crossOriginVerification=function(){this.crossOriginAuthentication.callback()},Ee.prototype.logout=function(t){Ot.redirect(this.client.buildLogoutUrl(t))},Ee.prototype.passwordlessVerify=function(t,e){var n=this,r=vt.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","nonce","onRedirecting"]).with(t);return lt.check(r,{type:"object",message:"options parameter is not valid"},{responseType:{type:"string",message:"responseType option is required"}}),r=this.transactionManager.process(r),this.client.passwordless.verify(r,(function(i){if(i)return e(i);function o(){Ot.redirect(n.client.passwordless.buildVerifyUrl(r))}if("function"==typeof t.onRedirecting)return t.onRedirecting((function(){o()}));o()}))},Ee.prototype.renderCaptcha=function(t,e,n){return function(t,e,n,r){function i(r){r=r||je,t.getChallenge((function(t,o){return t?(e.innerHTML=n.templates.error(t),r(t)):o.required?(e.style.display="","auth0"===o.provider?function(t,e,n,r){t.innerHTML=e.templates[n.provider](n),t.querySelector(".captcha-reload").addEventListener("click",(function(t){t.preventDefault(),r()}))}(e,n,o,i):"recaptcha_v2"!==o.provider&&"recaptcha_enterprise"!==o.provider||function(t,e,n){var r=t.hasAttribute("data-wid")&&t.getAttribute("data-wid");function i(e){t.querySelector('input[name="captcha"]').value=e||""}if(r)return i(),void Ae(n.provider).reset(r);t.innerHTML=e.templates[n.provider](n);var o=t.querySelector(".recaptcha");!function(t,e,n){var r="recaptchaCallback_"+Math.floor(1000001*Math.random());window[r]=function(){delete window[r],n()};var i=window.document.createElement("script");i.src=function(t,e,n){switch(t){case"recaptcha_v2":return"https://www.recaptcha.net/recaptcha/api.js?hl="+e+"&onload="+n;case"recaptcha_enterprise":return"https://www.recaptcha.net/recaptcha/enterprise.js?render=explicit&hl="+e+"&onload="+n;default:throw new Error("Unknown captcha provider")}}(e.provider,e.lang,r),i.async=!0,window.document.body.appendChild(i)}(0,{lang:e.lang,provider:n.provider},(function(){var e=Ae(n.provider);r=e.render(o,{callback:i,"expired-callback":function(){i()},"error-callback":function(){i()},sitekey:n.siteKey}),t.setAttribute("data-wid",r)}))}(e,n,o),void r()):(e.style.display="none",void(e.innerHTML=""))}))}return n=vt.merge(Ce).with(n||{}),i(r),{reload:i,getValue:function(){var t=e.querySelector('input[name="captcha"]');if(t)return t.value}}}(this.client,t,e,n)},De.prototype.buildVerifyUrl=function(t){var e,n;return lt.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(t){return!t.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(t){return!t.phoneNumber}}}),e=vt.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience","_csrf","state","_intstate","protocol","nonce"]).with(t),this.baseOptions._sendTelemetry&&(e.auth0Client=this.request.getTelemetryData()),e=vt.toSnakeCase(e,["auth0Client"]),n=D(e),s(this.baseOptions.rootUrl,"passwordless","verify_redirect","?"+n)},De.prototype.start=function(t,e){var n,r;return lt.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},send:{type:"string",message:"send option is required",values:["link","code"],value_message:"send is not valid ([link, code])"},phoneNumber:{optional:!0,type:"string",message:"phoneNumber option is required",condition:function(t){return"code"===t.send||!t.email}},email:{optional:!0,type:"string",message:"email option is required",condition:function(t){return"link"===t.send||!t.phoneNumber}},authParams:{optional:!0,type:"object",message:"authParams option is required"}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"passwordless","start"),(r=vt.merge(this.baseOptions,["clientID","responseType","redirectUri","scope"]).with(t)).scope&&(r.authParams=r.authParams||{},r.authParams.scope=r.authParams.scope||r.scope),r.redirectUri&&(r.authParams=r.authParams||{},r.authParams.redirect_uri=r.authParams.redirectUri||r.redirectUri),r.responseType&&(r.authParams=r.authParams||{},r.authParams.response_type=r.authParams.responseType||r.responseType),delete r.redirectUri,delete r.responseType,delete r.scope,r=vt.toSnakeCase(r,["auth0Client","authParams"]),this.request.post(n).send(r).end(qt(e))},De.prototype.verify=function(t,e){var n,r;return lt.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},verificationCode:{type:"string",message:"verificationCode option is required"},phoneNumber:{optional:!1,type:"string",message:"phoneNumber option is required",condition:function(t){return!t.email}},email:{optional:!1,type:"string",message:"email option is required",condition:function(t){return!t.phoneNumber}}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),r=vt.pick(t,["connection","verificationCode","phoneNumber","email","auth0Client"]),r=vt.toSnakeCase(r,["auth0Client"]),n=s(this.baseOptions.rootUrl,"passwordless","verify"),this.request.post(n).send(r).end(qt(e))},Re.prototype.signup=function(t,e){var n,r,i;return lt.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"},password:{type:"string",message:"password option is required"}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"dbconnections","signup"),i=(r=vt.merge(this.baseOptions,["clientID","state"]).with(t)).user_metadata||r.userMetadata,r=vt.blacklist(r,["scope","userMetadata","user_metadata"]),r=vt.toSnakeCase(r,["auth0Client"]),i&&(r.user_metadata=i),this.request.post(n).send(r).end(qt(e))},Re.prototype.changePassword=function(t,e){var n,r;return lt.check(t,{type:"object",message:"options parameter is not valid"},{connection:{type:"string",message:"connection option is required"},email:{type:"string",message:"email option is required"}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"dbconnections","change_password"),r=vt.merge(this.baseOptions,["clientID"]).with(t,["email","connection"]),r=vt.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(qt(e))},qe.prototype.buildAuthorizeUrl=function(t){var e,n;return lt.check(t,{type:"object",message:"options parameter is not valid"}),e=vt.merge(this.baseOptions,["clientID","responseType","responseMode","redirectUri","scope","audience"]).with(t),lt.check(e,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},redirectUri:{optional:!0,type:"string",message:"redirectUri option is required"},responseType:{type:"string",message:"responseType option is required"},nonce:{type:"string",message:"nonce option is required",condition:function(t){return-1===t.responseType.indexOf("code")&&-1!==t.responseType.indexOf("id_token")}},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),this.baseOptions._sendTelemetry&&(e.auth0Client=this.request.getTelemetryData()),e.connection_scope&&lt.isArray(e.connection_scope)&&(e.connection_scope=e.connection_scope.join(",")),e=vt.blacklist(e,["username","popupOptions","domain","tenant","timeout","appState"]),e=vt.toSnakeCase(e,["auth0Client"]),e=function(t,e){var n=vt.getKeysNotIn(e,It);return n.length>0&&t.warning("Following parameters are not allowed on the `/authorize` endpoint: ["+n.join(",")+"]"),e}(this.warn,e),n=D(e),s(this.baseOptions.rootUrl,"authorize","?"+n)},qe.prototype.buildLogoutUrl=function(t){var e,n;return lt.check(t,{optional:!0,type:"object",message:"options parameter is not valid"}),e=vt.merge(this.baseOptions,["clientID"]).with(t||{}),this.baseOptions._sendTelemetry&&(e.auth0Client=this.request.getTelemetryData()),e=vt.toSnakeCase(e,["auth0Client","returnTo"]),n=D(vt.blacklist(e,["federated"])),t&&void 0!==t.federated&&!1!==t.federated&&"false"!==t.federated&&(n+="&federated"),s(this.baseOptions.rootUrl,"v2","logout","?"+n)},qe.prototype.loginWithDefaultDirectory=function(t,e){return lt.check(t,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),t.grantType="password",this.oauthToken(t,e)},qe.prototype.login=function(t,e){return lt.check(t,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},realm:{type:"string",message:"realm option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),t.grantType="http://auth0.com/oauth/grant-type/password-realm",this.oauthToken(t,e)},qe.prototype.oauthToken=function(t,e){var n,r,i;return lt.check(t,{type:"object",message:"options parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"oauth","token"),r=vt.merge(this.baseOptions,["clientID","scope","audience"]).with(t),lt.check(r,{type:"object",message:"options parameter is not valid"},{clientID:{type:"string",message:"clientID option is required"},grantType:{type:"string",message:"grantType option is required"},scope:{optional:!0,type:"string",message:"scope option is required"},audience:{optional:!0,type:"string",message:"audience option is required"}}),r=vt.toSnakeCase(r,["auth0Client"]),this.warn,i=r,r=vt.pick(i,Ut),this.request.post(n).send(r).end(qt(e))},qe.prototype.loginWithResourceOwner=function(t,e){var n,r;return lt.check(t,{type:"object",message:"options parameter is not valid"},{username:{type:"string",message:"username option is required"},password:{type:"string",message:"password option is required"},connection:{type:"string",message:"connection option is required"},scope:{optional:!0,type:"string",message:"scope option is required"}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"oauth","ro"),r=vt.merge(this.baseOptions,["clientID","scope"]).with(t,["username","password","scope","connection","device"]),(r=vt.toSnakeCase(r,["auth0Client"])).grant_type=r.grant_type||"password",this.request.post(n).send(r).end(qt(e))},qe.prototype.getSSOData=function(t,e){if(this.auth0||(this.auth0=new Ee(this.baseOptions)),Ot.getWindow().location.host===this.baseOptions.domain)return this.auth0._universalLogin.getSSOData(t,e);"function"==typeof t&&(e=t),lt.check(e,{type:"function",message:"cb parameter is not valid"});var n=this.baseOptions.clientID,r=this.ssodataStorage.get()||{};this.auth0.checkSession({responseType:"token id_token",scope:"openid profile email",connection:r.lastUsedConnection,timeout:5e3},(function(t,i){return t?"login_required"===t.error?e(null,{sso:!1}):("consent_required"===t.error&&(t.error_description="Consent required. When using `getSSOData`, the user has to be authenticated with the following scope: `openid profile email`."),e(t,{sso:!1})):r.lastUsedSub&&r.lastUsedSub!==i.idTokenPayload.sub?e(t,{sso:!1}):e(null,{lastUsedConnection:{name:r.lastUsedConnection},lastUsedUserID:i.idTokenPayload.sub,lastUsedUsername:i.idTokenPayload.email||i.idTokenPayload.name,lastUsedClientID:n,sessionClients:[n],sso:!0})}))},qe.prototype.userInfo=function(t,e){var n;return lt.check(t,{type:"string",message:"accessToken parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"userinfo"),this.request.get(n).set("Authorization","Bearer "+t).end(qt(e,{ignoreCasing:!0}))},qe.prototype.getChallenge=function(t){if(lt.check(t,{type:"function",message:"cb parameter is not valid"}),!this.baseOptions.state)return t();var e=s(this.baseOptions.rootUrl,"usernamepassword","challenge");return this.request.post(e).send({state:this.baseOptions.state}).end(qt(t,{ignoreCasing:!0}))},qe.prototype.delegation=function(t,e){var n,r;return lt.check(t,{type:"object",message:"options parameter is not valid"},{grant_type:{type:"string",message:"grant_type option is required"}}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"delegation"),r=vt.merge(this.baseOptions,["clientID"]).with(t),r=vt.toSnakeCase(r,["auth0Client"]),this.request.post(n).send(r).end(qt(e))},qe.prototype.getUserCountry=function(t){var e;return lt.check(t,{type:"function",message:"cb parameter is not valid"}),e=s(this.baseOptions.rootUrl,"user","geoloc","country"),this.request.get(e).end(qt(t))},Ue.prototype.getUser=function(t,e){var n;return lt.check(t,{type:"string",message:"userId parameter is not valid"}),lt.check(e,{type:"function",message:"cb parameter is not valid"}),n=s(this.baseOptions.rootUrl,"users",t),this.request.get(n).end(qt(e,{ignoreCasing:!0}))},Ue.prototype.patchUserMetadata=function(t,e,n){var r;return lt.check(t,{type:"string",message:"userId parameter is not valid"}),lt.check(e,{type:"object",message:"userMetadata parameter is not valid"}),lt.check(n,{type:"function",message:"cb parameter is not valid"}),r=s(this.baseOptions.rootUrl,"users",t),this.request.patch(r).send({user_metadata:e}).end(qt(n,{ignoreCasing:!0}))},Ue.prototype.patchUserAttributes=function(t,e,n){var r;return lt.check(t,{type:"string",message:"userId parameter is not valid"}),lt.check(e,{type:"object",message:"user parameter is not valid"}),lt.check(n,{type:"function",message:"cb parameter is not valid"}),r=s(this.baseOptions.rootUrl,"users",t),this.request.patch(r).send(e).end(qt(n,{ignoreCasing:!0}))},Ue.prototype.linkUser=function(t,e,n){var r;return lt.check(t,{type:"string",message:"userId parameter is not valid"}),lt.check(e,{type:"string",message:"secondaryUserToken parameter is not valid"}),lt.check(n,{type:"function",message:"cb parameter is not valid"}),r=s(this.baseOptions.rootUrl,"users",t,"identities"),this.request.post(r).send({link_with:e}).end(qt(n,{ignoreCasing:!0}))};var Ie={Authentication:qe,Management:Ue,WebAuth:Ee,version:ot};e.default=Ie}.call(this,n(50),n(12))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.default=function(t){var e=t.variant,n=void 0===e?"default":e,o=t.className;return i.jsx("svg",r({className:o,viewBox:"0 0 60 38.19"},{children:i.jsxs("g",r({transform:"translate(-238.467 -453.779)"},{children:[i.jsx("g",r({transform:"translate(238.467 453.779)"},{children:i.jsx("g",r({transform:"translate(0 1.926)"},{children:i.jsxs("g",{children:[i.jsx("g",r({transform:"translate(.243)"},{children:i.jsx("path",{fill:"default"===n?"#00d163":"#220C4A",d:"M239.9 473.289a.981.981 0 0 0 .663 1.708l17.7-.048a1.56 1.56 0 0 0 1.046-.406l13.191-11.984-19.5.054a3.507 3.507 0 0 0-2.351.912z",transform:"translate(-239.576 -462.559)"},void 0)}),void 0),i.jsx("path",{d:"M296.542 462.586l-21.3.051a1.786 1.786 0 0 0-1.2.47l-12.629 11.57a1.523 1.523 0 0 0-.489 1.121v8.934a.94.94 0 0 1-.932.946l-8.148.02a3.363 3.363 0 0 0-2.27.892l-10.779 9.917a1 1 0 0 0 .662 1.729l20.974-.05a1.275 1.275 0 0 0 .858-.336l12.775-11.7a1.522 1.522 0 0 0 .49-1.12v-8.934a.94.94 0 0 1 .932-.946l8.739-.021a1.841 1.841 0 0 0 1.242-.488l11.606-10.678a.789.789 0 0 0-.531-1.377z",fill:"default"===n?"#201047":"#220C4A",transform:"translate(-238.467 -462.58)"},void 0)]},void 0)}),void 0)}),void 0),i.jsx("g",r({transform:"translate(554.613 460.161)"},{children:i.jsx("path",{fill:"default"===n?"#1d1047":"#220C4A",d:"M1667.281 484.388a1.928 1.928 0 1 1-1.921-1.876 1.885 1.885 0 0 1 1.921 1.876zm-3.374 0a1.453 1.453 0 0 0 1.464 1.5 1.436 1.436 0 0 0 1.43-1.487 1.448 1.448 0 1 0-2.893-.011zm1.155.983h-.435V483.5a3.792 3.792 0 0 1 .72-.057 1.169 1.169 0 0 1 .652.137.52.52 0 0 1 .183.412.48.48 0 0 1-.389.434v.023a.553.553 0 0 1 .343.457 1.43 1.43 0 0 0 .137.469h-.469a1.613 1.613 0 0 1-.148-.458c-.034-.206-.149-.3-.389-.3h-.206zm.011-1.063h.206c.24 0 .434-.08.434-.275 0-.171-.126-.286-.4-.286a1.049 1.049 0 0 0-.24.023z",transform:"translate(-1663.427 -482.512)"},void 0)}),void 0)]}),void 0)}),void 0)}},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=r(n(2));n(55),e.default=function(t){var e=t.size,n=void 0===e?20:e,r=t.thickness,s=void 0===r?2:r;return i.jsxs("span",{children:[o.default.createElement("style",{},"\n     .tr-wc-progress-circular {\n       height: "+n+"px;\n       width: "+n+"px;\n     }\n\n     .tr-wc-progress-circular:indeterminate::before,\n     .tr-wc-progress-circular:indeterminate::-webkit-progress-value {\n       border-width: "+s+"px;\n     }\n    "),i.jsx("progress",{className:"tr-wc-progress-circular"},void 0)]},void 0)}},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(5)),a=i(n(58)),u=i(n(17));n(59);var c=i(n(60));e.default=function(t){var e=t.integrationId,n=t.organizationId,i=t.organizationName,l=s.default.portalBaseUrl+"/"+n+"/settings/integrations/"+e;return o.jsxs("div",r({className:"tr-wc-detailsPanel"},{children:[o.jsx("span",r({className:"tr-wc-panelHeader"},{children:o.jsx("p",{children:"Platform connectie"},void 0)}),void 0),o.jsxs("span",r({className:"tr-wc-panelContent"},{children:[o.jsxs("span",r({className:"tr-wc-detailsPanel-connected"},{children:[o.jsx(a.default,{className:"tr-wc-checkVector"},void 0),o.jsxs("span",{children:[o.jsx("h3",{children:"Deze winkel is verbonden"},void 0),o.jsx("p",{children:"U bent klaar om uw bestellingen met Trunkrs te verzenden."},void 0)]},void 0)]}),void 0),o.jsxs("span",{children:[o.jsx("h4",{children:"Integratie nummer:"},void 0),o.jsx("p",{children:e},void 0),o.jsx("h4",{children:"Organisatie nummer:"},void 0),o.jsx("p",{children:n},void 0),o.jsx("h4",{children:"Organisatie naam:"},void 0),o.jsx("p",{children:i},void 0)]},void 0)]}),void 0),o.jsx("span",r({className:"tr-wc-panelFooter"},{children:o.jsx("span",{children:o.jsxs(u.default,r({href:l,color:"white"},{children:[o.jsx(c.default,{className:"tr-wc-buttonVector"},void 0),"Beheer"]}),void 0)},void 0)}),void 0)]}),void 0)}},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.default=function(t){var e=t.className;return i.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 14 14",fill:"none"},{children:i.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.3334 7.00016C12.3334 9.94568 9.94556 12.3335 7.00004 12.3335C4.05452 12.3335 1.66671 9.94568 1.66671 7.00016C1.66671 4.05464 4.05452 1.66683 7.00004 1.66683C9.94556 1.66683 12.3334 4.05464 12.3334 7.00016ZM13.6667 7.00016C13.6667 10.6821 10.6819 13.6668 7.00004 13.6668C3.31814 13.6668 0.333374 10.6821 0.333374 7.00016C0.333374 3.31826 3.31814 0.333496 7.00004 0.333496C10.6819 0.333496 13.6667 3.31826 13.6667 7.00016ZM6.596 9.27795L10.6112 5.2628L9.66834 4.31999L6.1246 7.86373L4.80477 6.5439L3.86196 7.48671L5.65319 9.27795L6.1246 9.74935L6.596 9.27795Z",fill:"#1ED771"},void 0)}),void 0)}},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);e.default=function(t){var e=t.className;return i.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:"0 0 24 24",fill:"none"},{children:i.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 2H8V4H4V20H20V16H22V22H2V2ZM18.4372 4.16L12.5199 4.16V2.16L21.8399 2.16L21.8399 11.48H19.8399L19.8399 5.5857L9.20706 16.2186L7.79285 14.8044L18.4372 4.16Z",fill:"currentColor"},void 0)}),void 0)}},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(18));n(64),e.default=function(t){var e=t.useBigText,n=t.darkLogo,i=t.tntEmailLinks,a=t.tntAccountActions,u=t.onUseBigTextChanged,c=t.onDarkLogoChanged,l=t.onTntEmailLinksChanged,p=t.onTntAccountActionsChanged;return o.jsxs("div",r({className:"tr-wc-detailsPanel"},{children:[o.jsx("span",r({className:"tr-wc-panelHeader"},{children:o.jsx("p",{children:"Visuele instellingen"},void 0)}),void 0),o.jsx("span",r({className:"tr-wc-panelContent"},{children:o.jsxs("ul",r({className:"tr-wc-settingsList"},{children:[o.jsx("li",{children:o.jsx(s.default,r({checked:n,onChange:c},{children:o.jsx("h4",r({className:"tr-wc-switchLabel"},{children:"Gebruik aangepast logo voor donker thema in de winkelwagen."}),void 0)}),void 0)},void 0),o.jsx("li",{children:o.jsx(s.default,r({checked:e,onChange:u},{children:o.jsx("h4",r({className:"tr-wc-switchLabel"},{children:"Laat het verwachte levermoment zien in winkelwagen."}),void 0)}),void 0)},void 0),o.jsx("li",{children:o.jsx(s.default,r({checked:i,onChange:l},{children:o.jsx("h4",r({className:"tr-wc-switchLabel"},{children:"Plaats Trunkrs Track & Trace links in orderbevestiging e-mail."}),void 0)}),void 0)},void 0),o.jsx("li",{children:o.jsx(s.default,r({checked:a,onChange:p},{children:o.jsx("h4",r({className:"tr-wc-switchLabel"},{children:"Maak Trunkrs Track & Trace links zichtbaar in gebruikers account pagina."}),void 0)}),void 0)},void 0)]}),void 0)}),void 0)]}),void 0)}},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(n(18));e.default=function(t){var e=t.allOrdersAreTrunkrs,n=t.onAllOrdersAreTrunkrs;return o.jsxs("div",r({className:"tr-wc-detailsPanel"},{children:[o.jsx("span",r({className:"tr-wc-panelHeader"},{children:o.jsx("p",{children:"Verzendings instellingen"},void 0)}),void 0),o.jsx("span",r({className:"tr-wc-panelContent"},{children:o.jsx("ul",r({className:"tr-wc-settingsList"},{children:o.jsx("li",{children:o.jsx(s.default,r({checked:e,onChange:n},{children:o.jsx("h4",r({className:"tr-wc-switchLabel"},{children:"Alle orders zijn voor Trunkrs"}),void 0)}),void 0)},void 0)}),void 0)}),void 0)]}),void 0)}}]);
  • trunkrs-for-woocommerce/trunk/includes/admin/admin-endpoints.php

    r2591935 r2637304  
    1111    const UPDATE_USE_TNT_LINKS_ACTION = 'tr-wc_update-use-tnt-links';
    1212    const UPDATE_USE_TNT_ACCOUNT_ACTION = 'tr-wc_update-use-tnt-account';
     13    const UPDATE_USE_ALL_ORDERS_ARE_TRUNKRS = 'tr-wc_update-use-all-orders-are-trunkrs';
    1314
    1415    public function __construct()
     
    1819      add_action('wp_ajax_' . self::UPDATE_USE_TNT_LINKS_ACTION, [$this, 'executeUpdateUseTnTLinksEndpoint']);
    1920      add_action('wp_ajax_' . self::UPDATE_USE_TNT_ACCOUNT_ACTION, [$this, 'executeUpdateUseTnTAccountEndpoint']);
     21      add_action('wp_ajax_' . self::UPDATE_USE_ALL_ORDERS_ARE_TRUNKRS, [$this, 'executeUpdateUseAllOrdersAreTrunkrsEndpoint']);
    2022
    2123      add_action('wp_ajax_' . self::DOWNLOAD_LABEL_ACTION, [$this, 'executeDownloadLabelEndpoint']);
     
    7981    }
    8082
     83    public function executeUpdateUseAllOrdersAreTrunkrsEndpoint()
     84    {
     85      $value = sanitize_text_field($_POST['isAllOrdersAreTrunkrsEnabled']) === 'true';
     86
     87      TRUNKRS_WC_Settings::setUseAllOrdersAreTrunkrs($value);
     88
     89      status_header(204);
     90      wp_die();
     91    }
     92
    8193    public function executeDownloadLabelEndpoint() {
    8294      $trunkrsNr = sanitize_text_field($_GET['trunkrsNr']);
  • trunkrs-for-woocommerce/trunk/includes/admin/admin-page.php

    r2591935 r2637304  
    3333          echo wp_json_encode([
    3434            'isConfigured' => TRUNKRS_WC_Settings::isConfigured(),
     35            'isBigTextEnabled' => TRUNKRS_WC_Settings::isBigCheckoutTextEnabled(),
    3536            'isDarkLogo' => TRUNKRS_WC_Settings::getUseDark(),
    3637            'isEmailLinksEnabled' => TRUNKRS_WC_Settings::getUseTrackTraceLinks(),
    3738            'isAccountTrackTraceEnabled' => TRUNKRS_WC_Settings::getUseAccountActions(),
     39            'isAllOrdersAreTrunkrsEnabled' => TRUNKRS_WC_Settings::getUseAllOrdersAreTrunkrsActions(),
    3840            'details' => TRUNKRS_WC_Settings::getIntegrationDetails(),
    3941            'metaBag' => [
  • trunkrs-for-woocommerce/trunk/includes/settings.php

    r2591977 r2637304  
    8484
    8585    /**
     86     * Retrieves whether to use the big text on the check-out page.
     87     * @return bool Flag reflecting whether to use the extended version on the checkout.
     88     */
     89    public static function isBigCheckoutTextEnabled(): bool
     90    {
     91      return self::getSingleOption('useBigCheckoutText') ?? true;
     92    }
     93
     94    /**
    8695     * Retrieves whether to use dark adjusted check-out content.
    8796     * @return bool Flag reflecting whether to adjust for dark content.
     
    106115    public static function getUseAccountActions(): bool {
    107116      return self::getSingleOption('useTrackTraceActions') ?? false;
     117    }
     118
     119    /**
     120     * Gets whether to enable all orders are for trunkrs on customer checkout.
     121     * @return bool Flag whether to enable all orders are for trunkrs.
     122     */
     123    public static function getUseAllOrdersAreTrunkrsActions(): bool {
     124      return self::getSingleOption('useAllOrdersAreTrunkrs') ?? false;
    108125    }
    109126
     
    137154    /**
    138155     * Sets whether to use a dark adjusted logo on check-out
    139      * @param bool $isUseDark The flag whether to use dark adjusted content
     156     * @param bool $isEnabled The flag whether to use dark adjusted content
     157     */
     158    public static function setIsBigCheckoutTextEnabled(bool $isEnabled)
     159    {
     160      self::pushOption('useBigCheckoutText', $isEnabled);
     161    }
     162
     163    /**
     164     * Sets whether to use the extended shipping method text on check-out
     165     * @param bool $isUseDark The flag whether to use extended checkout text
    140166     */
    141167    public static function setUseDark(bool $isUseDark)
     
    159185      self::pushOption('useTrackTraceActions', $isUseAccountAction);
    160186    }
     187
     188    /**
     189     * Sets whether to enable all orders are for trunkrs on customer checkout.
     190     * @param bool $useAllOrdersAreTrunkrs
     191     */
     192    public static function setUseAllOrdersAreTrunkrs(bool $useAllOrdersAreTrunkrs) {
     193      self::pushOption('useAllOrdersAreTrunkrs', $useAllOrdersAreTrunkrs);
     194    }
    161195  }
     196
     197
    162198}
  • trunkrs-for-woocommerce/trunk/includes/wc-internal/shipping-method.php

    r2591977 r2637304  
    2020        if (!$isTrunkrs) {
    2121          return $label;
     22        }
     23
     24        $logoUrl = TRUNKRS_WC_Settings::getUseDark()
     25          ? TRUNKRS_WC_Utils::createAssetUrl('icons/trunkrs-small-light.svg')
     26          : TRUNKRS_WC_Utils::createAssetUrl('icons/trunkrs-small-indigo.svg');
     27
     28        if (!TRUNKRS_WC_Settings::isBigCheckoutTextEnabled()) {
     29          return sprintf(
     30            '<span class="tr-wc-checkout-container">
     31                    <span class="tr-wc-checkout-title-container">
     32                        <img class="tr-wc-checkout-logo" alt="Trunkrs logo" src="%s" />
     33                        <p class="tr-wc-checkout-title"><b>Trunkrs</b>: %s</p>
     34                    </span>
     35                  </span>
     36                ',
     37            esc_url($logoUrl),
     38            wc_price($method->cost),
     39          );
    2240        }
    2341
     
    5068            break;
    5169        }
    52 
    53         $logoUrl = TRUNKRS_WC_Settings::getUseDark()
    54           ? TRUNKRS_WC_Utils::createAssetUrl('icons/trunkrs-small-light.svg')
    55           : TRUNKRS_WC_Utils::createAssetUrl('icons/trunkrs-small-indigo.svg');
    5670
    5771        return sprintf(
  • trunkrs-for-woocommerce/trunk/includes/wc-internal/trunkrs-order.php

    r2591935 r2637304  
    5555      foreach ($shippingItem as $item) {
    5656        $shippingMethodId = $item->get_method_id();
    57         if ($shippingMethodId !== TRUNKRS_WC_Bootstrapper::DOMAIN) {
     57        if (!$this->isAllOrdersForTrunkrs()
     58          && $shippingMethodId !== TRUNKRS_WC_Bootstrapper::DOMAIN) {
    5859          continue;
    5960        }
     
    101102      $postalCode = $this->order->get_shipping_postcode();
    102103      return TRUNKRS_WC_Settings::TRACK_TRACE_BASE_URL . $this->trunkrsNr . '/' . $postalCode;
     104    }
     105
     106    /**
     107     * @return bool Flag whether all orders are for Trunkrs
     108     */
     109    public function isAllOrdersForTrunkrs(): bool {
     110      return TRUNKRS_WC_Settings::getUseAllOrdersAreTrunkrsActions();
    103111    }
    104112
  • trunkrs-for-woocommerce/trunk/readme.txt

    r2591977 r2637304  
    44Requires at least: 3.6 & WooCommerce 3.0+
    55Tested up to: 5.8
    6 Stable tag: 1.0.1
     6Stable tag: 1.1.0
    77Requires PHP: 7.1
    88License: GPLv3
     
    4242== Changelog ==
    4343
     44= 1.1.0 =
     45This release contains more settings to adjust the way we show up in your cart and checkout area.
     46It's now also possible to redirect all orders to the Trunkrs shipping service.
     47
    4448= 1.0.0 =
    4549The first release of the plugin. All of the basic functionality has been implemented.
  • trunkrs-for-woocommerce/trunk/trunkrs-woocommerce.php

    r2591977 r2637304  
    66 * Author: Trunkrs
    77 * Author URI: https://trunkrs.nl
    8  * Version: 1.0.1
     8 * Version: 1.1.0
    99 * Requires at least: 3.6 & WooCommerce 3.0+
    1010 * Requires PHP: 7.1
     
    2424     * @var string The semver version of the plugin.
    2525     */
    26     public $version = '1.0.1';
     26    public $version = '1.1.0';
    2727
    2828    /**
  • trunkrs-for-woocommerce/trunk/vendor/autoload.php

    r2591935 r2637304  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInita033bca4aec65affbaca619f423fdaa0::getLoader();
     7return ComposerAutoloaderInitdc99322e5470e222da321ca8a10db4ab::getLoader();
  • trunkrs-for-woocommerce/trunk/vendor/composer/InstalledVersions.php

    r2591935 r2637304  
    2626  'root' =>
    2727  array (
    28     'pretty_version' => '1.0.0+no-version-set',
    29     'version' => '1.0.0.0',
     28    'pretty_version' => 'dev-main',
     29    'version' => 'dev-main',
    3030    'aliases' =>
    3131    array (
    3232    ),
    33     'reference' => NULL,
     33    'reference' => '6e51d1b8252713ef6738c43694b7272941498e56',
    3434    'name' => 'trunkrs/woocommerce',
    3535  ),
     
    3838    'trunkrs/woocommerce' =>
    3939    array (
    40       'pretty_version' => '1.0.0+no-version-set',
    41       'version' => '1.0.0.0',
     40      'pretty_version' => 'dev-main',
     41      'version' => 'dev-main',
    4242      'aliases' =>
    4343      array (
    4444      ),
    45       'reference' => NULL,
     45      'reference' => '6e51d1b8252713ef6738c43694b7272941498e56',
    4646    ),
    4747  ),
  • trunkrs-for-woocommerce/trunk/vendor/composer/autoload_real.php

    r2591935 r2637304  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInita033bca4aec65affbaca619f423fdaa0
     5class ComposerAutoloaderInitdc99322e5470e222da321ca8a10db4ab
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInita033bca4aec65affbaca619f423fdaa0', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInitdc99322e5470e222da321ca8a10db4ab', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    27         spl_autoload_unregister(array('ComposerAutoloaderInita033bca4aec65affbaca619f423fdaa0', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInitdc99322e5470e222da321ca8a10db4ab', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Composer\Autoload\ComposerStaticInita033bca4aec65affbaca619f423fdaa0::getInitializer($loader));
     33            call_user_func(\Composer\Autoload\ComposerStaticInitdc99322e5470e222da321ca8a10db4ab::getInitializer($loader));
    3434        } else {
    3535            $map = require __DIR__ . '/autoload_namespaces.php';
  • trunkrs-for-woocommerce/trunk/vendor/composer/autoload_static.php

    r2591935 r2637304  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInita033bca4aec65affbaca619f423fdaa0
     7class ComposerStaticInitdc99322e5470e222da321ca8a10db4ab
    88{
    99    public static $classMap = array (
     
    1414    {
    1515        return \Closure::bind(function () use ($loader) {
    16             $loader->classMap = ComposerStaticInita033bca4aec65affbaca619f423fdaa0::$classMap;
     16            $loader->classMap = ComposerStaticInitdc99322e5470e222da321ca8a10db4ab::$classMap;
    1717
    1818        }, null, ClassLoader::class);
  • trunkrs-for-woocommerce/trunk/vendor/composer/installed.php

    r2591935 r2637304  
    22  'root' =>
    33  array (
    4     'pretty_version' => '1.0.0+no-version-set',
    5     'version' => '1.0.0.0',
     4    'pretty_version' => 'dev-main',
     5    'version' => 'dev-main',
    66    'aliases' =>
    77    array (
    88    ),
    9     'reference' => NULL,
     9    'reference' => '6e51d1b8252713ef6738c43694b7272941498e56',
    1010    'name' => 'trunkrs/woocommerce',
    1111  ),
     
    1414    'trunkrs/woocommerce' =>
    1515    array (
    16       'pretty_version' => '1.0.0+no-version-set',
    17       'version' => '1.0.0.0',
     16      'pretty_version' => 'dev-main',
     17      'version' => 'dev-main',
    1818      'aliases' =>
    1919      array (
    2020      ),
    21       'reference' => NULL,
     21      'reference' => '6e51d1b8252713ef6738c43694b7272941498e56',
    2222    ),
    2323  ),
Note: See TracChangeset for help on using the changeset viewer.