(function(Lr,dt){typeof exports=="object"&&typeof module<"u"?module.exports=dt():typeof define=="function"&&define.amd?define(dt):(Lr=typeof globalThis<"u"?globalThis:Lr||self,Lr.TalkdeskChatSDK=dt())})(this,function(){"use strict";/*! * Talkdesk Confidential * * Copyright (C) Talkdesk Inc. 2025 * * The source code for this program is not published or otherwise divested * of its trade secrets, irrespective of what has been deposited with the * U.S. Copyright Office. Unauthorized copying of this file, via any medium * is strictly prohibited. */function Lr(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t3?(N=$===A)&&(b=M[(y=M[4])?5:(y=3,3)],M[4]=M[5]=e):M[0]<=D&&((N=q<2&&DA||A>$)&&(M[4]=q,M[5]=A,L.n=$,y=0))}if(N||q>1)return o;throw k=!0,A}return function(q,A,N){if(C>1)throw TypeError("Generator is already running");for(k&&A===1&&B(A,N),y=A,b=N;(r=y<2?e:b)||!k;){S||(y?y<3?(y>1&&(L.n=-1),B(y,b)):L.n=b:L.v=b);try{if(C=2,S){if(y||(q="next"),r=S[q]){if(!(r=r.call(S,b)))throw TypeError("iterator result is not an object");if(!r.done)return r;b=r.value,y<2&&(y=0)}else y===1&&(r=S.return)&&r.call(S),y<2&&(b=TypeError("The iterator does not provide a '"+q+"' method"),y=1);S=e}else if((r=(k=L.n<0)?b:O.call(p,L))!==o)break}catch(M){S=e,y=1,b=M}finally{C=1}}return{value:r,done:k}}}(v,m,E),!0),R}var o={};function s(){}function c(){}function u(){}r=Object.getPrototypeOf;var l=[][n]?r(r([][n]())):(We(r={},n,function(){return this}),r),f=u.prototype=s.prototype=Object.create(l);function h(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,u):(v.__proto__=u,We(v,i,"GeneratorFunction")),v.prototype=Object.create(f),v}return c.prototype=u,We(f,"constructor",u),We(u,"constructor",c),c.displayName="GeneratorFunction",We(u,i,"GeneratorFunction"),We(f),We(f,i,"Generator"),We(f,n,function(){return this}),We(f,"toString",function(){return"[object Generator]"}),(Ue=function(){return{w:a,m:h}})()}function We(e,r,t,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}We=function(a,o,s,c){function u(l,f){We(a,l,function(h){return this._invoke(l,f,h)})}o?i?i(a,o,{value:s,enumerable:!c,configurable:!c,writable:!c}):a[o]=s:(u("next",0),u("throw",1),u("return",2))},We(e,r,t,n)}function qh(e,r){return dt(e)||Ih(e,r)||js(e,r)||Ph()}function kh(e){return _h(e)||xh(e)||js(e)||Ah()}function jh(e,r){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ks(e){var r=jh(e,"string");return typeof r=="symbol"?r:r+""}function js(e,r){if(e){if(typeof e=="string")return Lr(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Lr(e,r):void 0}}var Fs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ns={},ht,Us;function le(){if(Us)return ht;Us=1;var e=function(r){return r&&r.Math===Math&&r};return ht=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof Fs=="object"&&Fs)||e(typeof ht=="object"&&ht)||function(){return this}()||Function("return this")(),ht}var Rn={},Sn,Ms;function oe(){return Ms||(Ms=1,Sn=function(e){try{return!!e()}catch{return!0}}),Sn}var On,Ds;function Ee(){if(Ds)return On;Ds=1;var e=oe();return On=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),On}var Cn,Bs;function Mt(){if(Bs)return Cn;Bs=1;var e=oe();return Cn=!e(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),Cn}var Tn,Hs;function ke(){if(Hs)return Tn;Hs=1;var e=Mt(),r=Function.prototype.call;return Tn=e?r.bind(r):function(){return r.apply(r,arguments)},Tn}var _n={},$s;function xn(){if($s)return _n;$s=1;var e={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,t=r&&!e.call({1:2},1);return _n.f=t?function(i){var a=r(this,i);return!!a&&a.enumerable}:e,_n}var In,Gs;function pt(){return Gs||(Gs=1,In=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}),In}var Pn,Ws;function ue(){if(Ws)return Pn;Ws=1;var e=Mt(),r=Function.prototype,t=r.call,n=e&&r.bind.bind(t,t);return Pn=e?n:function(i){return function(){return t.apply(i,arguments)}},Pn}var An,zs;function Er(){if(zs)return An;zs=1;var e=ue(),r=e({}.toString),t=e("".slice);return An=function(n){return t(r(n),8,-1)},An}var Ln,Vs;function Dt(){if(Vs)return Ln;Vs=1;var e=ue(),r=oe(),t=Er(),n=Object,i=e("".split);return Ln=r(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return t(a)==="String"?i(a,""):n(a)}:n,Ln}var qn,Ks;function Xr(){return Ks||(Ks=1,qn=function(e){return e==null}),qn}var kn,Js;function kr(){if(Js)return kn;Js=1;var e=Xr(),r=TypeError;return kn=function(t){if(e(t))throw new r("Can't call method on "+t);return t},kn}var jn,Ys;function Rr(){if(Ys)return jn;Ys=1;var e=Dt(),r=kr();return jn=function(t){return e(r(t))},jn}var Fn,Xs;function me(){if(Xs)return Fn;Xs=1;var e=typeof document=="object"&&document.all;return Fn=typeof e>"u"&&e!==void 0?function(r){return typeof r=="function"||r===e}:function(r){return typeof r=="function"},Fn}var Nn,Qs;function Te(){if(Qs)return Nn;Qs=1;var e=me();return Nn=function(r){return typeof r=="object"?r!==null:e(r)},Nn}var Un,Zs;function Sr(){if(Zs)return Un;Zs=1;var e=le(),r=me(),t=function(n){return r(n)?n:void 0};return Un=function(n,i){return arguments.length<2?t(e[n]):e[n]&&e[n][i]},Un}var Mn,eu;function gt(){if(eu)return Mn;eu=1;var e=ue();return Mn=e({}.isPrototypeOf),Mn}var Dn,ru;function mt(){if(ru)return Dn;ru=1;var e=le(),r=e.navigator,t=r&&r.userAgent;return Dn=t?String(t):"",Dn}var Bn,tu;function Bt(){if(tu)return Bn;tu=1;var e=le(),r=mt(),t=e.process,n=e.Deno,i=t&&t.versions||n&&n.version,a=i&&i.v8,o,s;return a&&(o=a.split("."),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&r&&(o=r.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=r.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),Bn=s,Bn}var Hn,nu;function iu(){if(nu)return Hn;nu=1;var e=Bt(),r=oe(),t=le(),n=t.String;return Hn=!!Object.getOwnPropertySymbols&&!r(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Hn}var $n,au;function ou(){if(au)return $n;au=1;var e=iu();return $n=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",$n}var Gn,su;function Wn(){if(su)return Gn;su=1;var e=Sr(),r=me(),t=gt(),n=ou(),i=Object;return Gn=n?function(a){return typeof a=="symbol"}:function(a){var o=e("Symbol");return r(o)&&t(o.prototype,i(a))},Gn}var zn,uu;function Ht(){if(uu)return zn;uu=1;var e=String;return zn=function(r){try{return e(r)}catch{return"Object"}},zn}var Vn,cu;function Or(){if(cu)return Vn;cu=1;var e=me(),r=Ht(),t=TypeError;return Vn=function(n){if(e(n))return n;throw new t(r(n)+" is not a function")},Vn}var Kn,lu;function Jn(){if(lu)return Kn;lu=1;var e=Or(),r=Xr();return Kn=function(t,n){var i=t[n];return r(i)?void 0:e(i)},Kn}var Yn,fu;function Nh(){if(fu)return Yn;fu=1;var e=ke(),r=me(),t=Te(),n=TypeError;return Yn=function(i,a){var o,s;if(a==="string"&&r(o=i.toString)&&!t(s=e(o,i))||r(o=i.valueOf)&&!t(s=e(o,i))||a!=="string"&&r(o=i.toString)&&!t(s=e(o,i)))return s;throw new n("Can't convert object to primitive value")},Yn}var Xn={exports:{}},Qn,vu;function Ze(){return vu||(vu=1,Qn=!1),Qn}var Zn,du;function ei(){if(du)return Zn;du=1;var e=le(),r=Object.defineProperty;return Zn=function(t,n){try{r(e,t,{value:n,configurable:!0,writable:!0})}catch{e[t]=n}return n},Zn}var hu;function ri(){if(hu)return Xn.exports;hu=1;var e=Ze(),r=le(),t=ei(),n="__core-js_shared__",i=Xn.exports=r[n]||t(n,{});return(i.versions||(i.versions=[])).push({version:"3.44.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Xn.exports}var ti,pu;function ni(){if(pu)return ti;pu=1;var e=ri();return ti=function(r,t){return e[r]||(e[r]=t||{})},ti}var ii,gu;function jr(){if(gu)return ii;gu=1;var e=kr(),r=Object;return ii=function(t){return r(e(t))},ii}var ai,mu;function Me(){if(mu)return ai;mu=1;var e=ue(),r=jr(),t=e({}.hasOwnProperty);return ai=Object.hasOwn||function(i,a){return t(r(i),a)},ai}var oi,yu;function si(){if(yu)return oi;yu=1;var e=ue(),r=0,t=Math.random(),n=e(1.1.toString);return oi=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++r+t,36)},oi}var ui,bu;function ye(){if(bu)return ui;bu=1;var e=le(),r=ni(),t=Me(),n=si(),i=iu(),a=ou(),o=e.Symbol,s=r("wks"),c=a?o.for||o:o&&o.withoutSetter||n;return ui=function(u){return t(s,u)||(s[u]=i&&t(o,u)?o[u]:c("Symbol."+u)),s[u]},ui}var ci,wu;function Eu(){if(wu)return ci;wu=1;var e=ke(),r=Te(),t=Wn(),n=Jn(),i=Nh(),a=ye(),o=TypeError,s=a("toPrimitive");return ci=function(c,u){if(!r(c)||t(c))return c;var l=n(c,s),f;if(l){if(u===void 0&&(u="default"),f=e(l,c,u),!r(f)||t(f))return f;throw new o("Can't convert object to primitive value")}return u===void 0&&(u="number"),i(c,u)},ci}var li,Ru;function Su(){if(Ru)return li;Ru=1;var e=Eu(),r=Wn();return li=function(t){var n=e(t,"string");return r(n)?n:n+""},li}var fi,Ou;function $t(){if(Ou)return fi;Ou=1;var e=le(),r=Te(),t=e.document,n=r(t)&&r(t.createElement);return fi=function(i){return n?t.createElement(i):{}},fi}var vi,Cu;function Tu(){if(Cu)return vi;Cu=1;var e=Ee(),r=oe(),t=$t();return vi=!e&&!r(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),vi}var _u;function Gt(){if(_u)return Rn;_u=1;var e=Ee(),r=ke(),t=xn(),n=pt(),i=Rr(),a=Su(),o=Me(),s=Tu(),c=Object.getOwnPropertyDescriptor;return Rn.f=e?c:function(l,f){if(l=i(l),f=a(f),s)try{return c(l,f)}catch{}if(o(l,f))return n(!r(t.f,l,f),l[f])},Rn}var di={},hi,xu;function Iu(){if(xu)return hi;xu=1;var e=Ee(),r=oe();return hi=e&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),hi}var pi,Pu;function ze(){if(Pu)return pi;Pu=1;var e=Te(),r=String,t=TypeError;return pi=function(n){if(e(n))return n;throw new t(r(n)+" is not an object")},pi}var Au;function er(){if(Au)return di;Au=1;var e=Ee(),r=Tu(),t=Iu(),n=ze(),i=Su(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",l="writable";return di.f=e?t?function(h,v,g){if(n(h),v=i(v),n(g),typeof h=="function"&&v==="prototype"&&"value"in g&&l in g&&!g[l]){var m=s(h,v);m&&m[l]&&(h[v]=g.value,g={configurable:u in g?g[u]:m[u],enumerable:c in g?g[c]:m[c],writable:!1})}return o(h,v,g)}:o:function(h,v,g){if(n(h),v=i(v),n(g),r)try{return o(h,v,g)}catch{}if("get"in g||"set"in g)throw new a("Accessors not supported");return"value"in g&&(h[v]=g.value),h},di}var gi,Lu;function yt(){if(Lu)return gi;Lu=1;var e=Ee(),r=er(),t=pt();return gi=e?function(n,i,a){return r.f(n,i,t(1,a))}:function(n,i,a){return n[i]=a,n},gi}var mi={exports:{}},yi,qu;function bt(){if(qu)return yi;qu=1;var e=Ee(),r=Me(),t=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=r(t,"name"),a=i&&(function(){}).name==="something",o=i&&(!e||e&&n(t,"name").configurable);return yi={EXISTS:i,PROPER:a,CONFIGURABLE:o},yi}var bi,ku;function wi(){if(ku)return bi;ku=1;var e=ue(),r=me(),t=ri(),n=e(Function.toString);return r(t.inspectSource)||(t.inspectSource=function(i){return n(i)}),bi=t.inspectSource,bi}var Ei,ju;function Uh(){if(ju)return Ei;ju=1;var e=le(),r=me(),t=e.WeakMap;return Ei=r(t)&&/native code/.test(String(t)),Ei}var Ri,Fu;function Si(){if(Fu)return Ri;Fu=1;var e=ni(),r=si(),t=e("keys");return Ri=function(n){return t[n]||(t[n]=r(n))},Ri}var Oi,Nu;function Wt(){return Nu||(Nu=1,Oi={}),Oi}var Ci,Uu;function Cr(){if(Uu)return Ci;Uu=1;var e=Uh(),r=le(),t=Te(),n=yt(),i=Me(),a=ri(),o=Si(),s=Wt(),c="Object already initialized",u=r.TypeError,l=r.WeakMap,f,h,v,g=function(R){return v(R)?h(R):f(R,{})},m=function(R){return function(O){var p;if(!t(O)||(p=h(O)).type!==R)throw new u("Incompatible receiver, "+R+" required");return p}};if(e||a.state){var E=a.state||(a.state=new l);E.get=E.get,E.has=E.has,E.set=E.set,f=function(R,O){if(E.has(R))throw new u(c);return O.facade=R,E.set(R,O),O},h=function(R){return E.get(R)||{}},v=function(R){return E.has(R)}}else{var w=o("state");s[w]=!0,f=function(R,O){if(i(R,w))throw new u(c);return O.facade=R,n(R,w,O),O},h=function(R){return i(R,w)?R[w]:{}},v=function(R){return i(R,w)}}return Ci={set:f,get:h,has:v,enforce:g,getterFor:m},Ci}var Mu;function Du(){if(Mu)return mi.exports;Mu=1;var e=ue(),r=oe(),t=me(),n=Me(),i=Ee(),a=bt().CONFIGURABLE,o=wi(),s=Cr(),c=s.enforce,u=s.get,l=String,f=Object.defineProperty,h=e("".slice),v=e("".replace),g=e([].join),m=i&&!r(function(){return f(function(){},"length",{value:8}).length!==8}),E=String(String).split("String"),w=mi.exports=function(R,O,p){h(l(O),0,7)==="Symbol("&&(O="["+v(l(O),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),p&&p.getter&&(O="get "+O),p&&p.setter&&(O="set "+O),(!n(R,"name")||a&&R.name!==O)&&(i?f(R,"name",{value:O,configurable:!0}):R.name=O),m&&p&&n(p,"arity")&&R.length!==p.arity&&f(R,"length",{value:p.arity});try{p&&n(p,"constructor")&&p.constructor?i&&f(R,"prototype",{writable:!1}):R.prototype&&(R.prototype=void 0)}catch{}var d=c(R);return n(d,"source")||(d.source=g(E,typeof O=="string"?O:"")),R};return Function.prototype.toString=w(function(){return t(this)&&u(this).source||o(this)},"toString"),mi.exports}var Ti,Bu;function rr(){if(Bu)return Ti;Bu=1;var e=me(),r=er(),t=Du(),n=ei();return Ti=function(i,a,o,s){s||(s={});var c=s.enumerable,u=s.name!==void 0?s.name:a;if(e(o)&&t(o,u,s),s.global)c?i[a]=o:n(a,o);else{try{s.unsafe?i[a]&&(c=!0):delete i[a]}catch{}c?i[a]=o:r.f(i,a,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return i},Ti}var _i={},xi,Hu;function Mh(){if(Hu)return xi;Hu=1;var e=Math.ceil,r=Math.floor;return xi=Math.trunc||function(n){var i=+n;return(i>0?r:e)(i)},xi}var Ii,$u;function Pi(){if($u)return Ii;$u=1;var e=Mh();return Ii=function(r){var t=+r;return t!==t||t===0?0:e(t)},Ii}var Ai,Gu;function Wu(){if(Gu)return Ai;Gu=1;var e=Pi(),r=Math.max,t=Math.min;return Ai=function(n,i){var a=e(n);return a<0?r(a+i,0):t(a,i)},Ai}var Li,zu;function Vu(){if(zu)return Li;zu=1;var e=Pi(),r=Math.min;return Li=function(t){var n=e(t);return n>0?r(n,9007199254740991):0},Li}var qi,Ku;function wt(){if(Ku)return qi;Ku=1;var e=Vu();return qi=function(r){return e(r.length)},qi}var ki,Ju;function Dh(){if(Ju)return ki;Ju=1;var e=Rr(),r=Wu(),t=wt(),n=function(i){return function(a,o,s){var c=e(a),u=t(c);if(u===0)return!i&&-1;var l=r(s,u),f;if(i&&o!==o){for(;u>l;)if(f=c[l++],f!==f)return!0}else for(;u>l;l++)if((i||l in c)&&c[l]===o)return i||l||0;return!i&&-1}};return ki={includes:n(!0),indexOf:n(!1)},ki}var ji,Yu;function Xu(){if(Yu)return ji;Yu=1;var e=ue(),r=Me(),t=Rr(),n=Dh().indexOf,i=Wt(),a=e([].push);return ji=function(o,s){var c=t(o),u=0,l=[],f;for(f in c)!r(i,f)&&r(c,f)&&a(l,f);for(;s.length>u;)r(c,f=s[u++])&&(~n(l,f)||a(l,f));return l},ji}var Fi,Qu;function Ni(){return Qu||(Qu=1,Fi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Fi}var Zu;function zt(){if(Zu)return _i;Zu=1;var e=Xu(),r=Ni(),t=r.concat("length","prototype");return _i.f=Object.getOwnPropertyNames||function(i){return e(i,t)},_i}var Ui={},ec;function rc(){return ec||(ec=1,Ui.f=Object.getOwnPropertySymbols),Ui}var Mi,tc;function Bh(){if(tc)return Mi;tc=1;var e=Sr(),r=ue(),t=zt(),n=rc(),i=ze(),a=r([].concat);return Mi=e("Reflect","ownKeys")||function(s){var c=t.f(i(s)),u=n.f;return u?a(c,u(s)):c},Mi}var Di,nc;function Hh(){if(nc)return Di;nc=1;var e=Me(),r=Bh(),t=Gt(),n=er();return Di=function(i,a,o){for(var s=r(a),c=n.f,u=t.f,l=0;lr)throw e("Maximum allowed index exceeded");return t},Gi}var Wi,cc;function lc(){if(cc)return Wi;cc=1;var e=Ee(),r=er(),t=pt();return Wi=function(n,i,a){e?r.f(n,i,t(0,a)):n[i]=a},Wi}var zi,fc;function Vi(){if(fc)return zi;fc=1;var e=ye(),r=e("toStringTag"),t={};return t[r]="z",zi=String(t)==="[object z]",zi}var Ki,vc;function Et(){if(vc)return Ki;vc=1;var e=Vi(),r=me(),t=Er(),n=ye(),i=n("toStringTag"),a=Object,o=t(function(){return arguments}())==="Arguments",s=function(c,u){try{return c[u]}catch{}};return Ki=e?t:function(c){var u,l,f;return c===void 0?"Undefined":c===null?"Null":typeof(l=s(u=a(c),i))=="string"?l:o?t(u):(f=t(u))==="Object"&&r(u.callee)?"Arguments":f},Ki}var Ji,dc;function Yi(){if(dc)return Ji;dc=1;var e=ue(),r=oe(),t=me(),n=Et(),i=Sr(),a=wi(),o=function(){},s=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,u=e(c.exec),l=!c.test(o),f=function(g){if(!t(g))return!1;try{return s(o,[],g),!0}catch{return!1}},h=function(g){if(!t(g))return!1;switch(n(g)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return l||!!u(c,a(g))}catch{return!0}};return h.sham=!0,Ji=!s||r(function(){var v;return f(f.call)||!f(Object)||!f(function(){v=!0})||v})?h:f,Ji}var Xi,hc;function Gh(){if(hc)return Xi;hc=1;var e=sc(),r=Yi(),t=Te(),n=ye(),i=n("species"),a=Array;return Xi=function(o){var s;return e(o)&&(s=o.constructor,r(s)&&(s===a||e(s.prototype))?s=void 0:t(s)&&(s=s[i],s===null&&(s=void 0))),s===void 0?a:s},Xi}var Qi,pc;function gc(){if(pc)return Qi;pc=1;var e=Gh();return Qi=function(r,t){return new(e(r))(t===0?0:t)},Qi}var Zi,mc;function ea(){if(mc)return Zi;mc=1;var e=oe(),r=ye(),t=Bt(),n=r("species");return Zi=function(i){return t>=51||!e(function(){var a=[],o=a.constructor={};return o[n]=function(){return{foo:1}},a[i](Boolean).foo!==1})},Zi}var yc;function Wh(){if(yc)return Ns;yc=1;var e=de(),r=oe(),t=sc(),n=Te(),i=jr(),a=wt(),o=$h(),s=lc(),c=gc(),u=ea(),l=ye(),f=Bt(),h=l("isConcatSpreadable"),v=f>=51||!r(function(){var E=[];return E[h]=!1,E.concat()[0]!==E}),g=function(E){if(!n(E))return!1;var w=E[h];return w!==void 0?!!w:t(E)},m=!v||!u("concat");return e({target:"Array",proto:!0,arity:1,forced:m},{concat:function(w){var R=i(this),O=c(R,0),p=0,d,S,y,b,C;for(d=-1,y=arguments.length;dw;)O=g[w++],(!e||(m?O in v:s(v,O)))&&c(R,f?[O,v[O]]:v[O]);return R}};return oa={entries:l(!0),values:l(!1)},oa}var xc;function Jh(){if(xc)return Sc;xc=1;var e=de(),r=Kh().values;return e({target:"Object",stat:!0},{values:function(n){return r(n)}}),Sc}Jh();var Ic={},sa,Pc;function Ac(){if(Pc)return sa;Pc=1;var e=Er(),r=ue();return sa=function(t){if(e(t)==="Function")return r(t)},sa}var ua,Lc;function pr(){if(Lc)return ua;Lc=1;var e=Et(),r=String;return ua=function(t){if(e(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return r(t)},ua}var ca,qc;function Yh(){if(qc)return ca;qc=1;var e=Te(),r=Er(),t=ye(),n=t("match");return ca=function(i){var a;return e(i)&&((a=i[n])!==void 0?!!a:r(i)==="RegExp")},ca}var la,kc;function Xh(){if(kc)return la;kc=1;var e=Yh(),r=TypeError;return la=function(t){if(e(t))throw new r("The method doesn't accept regular expressions");return t},la}var fa,jc;function Qh(){if(jc)return fa;jc=1;var e=ye(),r=e("match");return fa=function(t){var n=/./;try{"/./"[t](n)}catch{try{return n[r]=!1,"/./"[t](n)}catch{}}return!1},fa}var Fc;function Zh(){if(Fc)return Ic;Fc=1;var e=de(),r=Ac(),t=Gt().f,n=Vu(),i=pr(),a=Xh(),o=kr(),s=Qh(),c=Ze(),u=r("".slice),l=Math.min,f=s("startsWith"),h=!c&&!f&&!!function(){var v=t(String.prototype,"startsWith");return v&&!v.writable}();return e({target:"String",proto:!0,forced:!h&&!f},{startsWith:function(g){var m=i(o(this));a(g);var E=n(l(arguments.length>1?arguments[1]:void 0,m.length)),w=i(g);return u(m,E,E+w.length)===w}}),Ic}Zh();var Nc={},va,Uc;function Mc(){return Uc||(Uc=1,va=` \v\f\r                 \u2028\u2029\uFEFF`),va}var da,Dc;function Bc(){if(Dc)return da;Dc=1;var e=ue(),r=kr(),t=pr(),n=Mc(),i=e("".replace),a=RegExp("^["+n+"]+"),o=RegExp("(^|[^"+n+"])["+n+"]+$"),s=function(c){return function(u){var l=t(r(u));return c&1&&(l=i(l,a,"")),c&2&&(l=i(l,o,"$1")),l}};return da={start:s(1),end:s(2),trim:s(3)},da}var ha,Hc;function ep(){if(Hc)return ha;Hc=1;var e=bt().PROPER,r=oe(),t=Mc(),n="​…᠎";return ha=function(i){return r(function(){return!!t[i]()||n[i]()!==n||e&&t[i].name!==i})},ha}var $c;function rp(){if($c)return Nc;$c=1;var e=de(),r=Bc().trim,t=ep();return e({target:"String",proto:!0,forced:t("trim")},{trim:function(){return r(this)}}),Nc}rp();var tp=Object.defineProperty,np=(e,r,t)=>r in e?tp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,sr=(e,r,t)=>np(e,typeof r!="symbol"?r+"":r,t);/*! * Talkdesk Confidential * * Copyright (C) Talkdesk Inc. 2025 * * The source code for this program is not published or otherwise divested * of its trade secrets, irrespective of what has been deposited with the * U.S. Copyright Office. Unauthorized copying of this file, via any medium * is strictly prohibited. */const Gc="talkdesk-chat-widget-debug",Wc="https",Re={US:"td-us-1",EU:"td-eu-1",CA:"td-ca-1",AU:"td-ap-1",UK:"td-uk-1",US_FED:"td-usfed-1"},Tr={tdGatewayUs:"/tdgateway/us",tdGatewayEu:"/tdgateway/eu",tdGatewayCa:"/tdgateway/ca",tdGatewayAu:"/tdgateway/ap",tdGatewayUk:"/tdgateway/uk",tdGatewayUsFed:"/tdgateway/usfed",tdChatSdk:"/tdchatsdk"},_r={initNotStart:`[Talkdesk chat jssdk] This method is only using after the talkdesk chat widget initialized, please using webchat.init().then(function () { // do something })`,botDeviceAlert:`[Talkdesk chat jssdk] This is bot device`,deprecatedMethod:e=>`[Talkdesk chat jssdk] This method will be deprecated, please replace it with "${e}"`,deprecatedCallback:e=>`[Talkdesk chat jssdk] This callback event will be deprecated please replace with "${e}"`},pa={[Re.US]:"https://talkdeskchatsdk.talkdeskapp.com",[Re.EU]:"https://talkdeskchatsdk.talkdeskapp.com",[Re.CA]:"https://talkdeskchatsdk.talkdeskapp.com",[Re.AU]:"https://talkdeskchatsdk.talkdeskapp.com",[Re.UK]:"https://talkdeskchatsdk.talkdeskapp.com",[Re.US_FED]:"https://talkdeskchatsdk.talkdeskapp-pubsec.com"},zc={[Re.US]:"https://api.talkdeskapp.com",[Re.EU]:"https://api.talkdeskapp.eu",[Re.CA]:"https://api.talkdeskappca.com",[Re.AU]:"https://api.talkdeskapp.au",[Re.UK]:"https://api.talkdeskapp.co.uk",[Re.US_FED]:"https://api.talkdeskapp-pubsec.com"},ga={[Re.US]:Tr.tdGatewayUs,[Re.EU]:Tr.tdGatewayEu,[Re.CA]:Tr.tdGatewayCa,[Re.AU]:Tr.tdGatewayAu,[Re.UK]:Tr.tdGatewayUk,[Re.US_FED]:Tr.tdGatewayUsFed};Object.values(Re).reduce((e,r)=>{const t=zc[r],n=ga[r];return t&&n&&e.push([t,n]),e},[]);const ma=86400,ip={pageView:"PAGE_VIEW"};function ap(e){return typeof e=="string"?e:e==null?void 0:e.message}function op({region:e,proxyHost:r=""}){return r?r.startsWith("http")?`${r}${ga[e]}`:`${Wc}://${r}${ga[e]}`:zc[e]}function sp(e,r){return!e||!r?!1:e.contains?e.contains(r):e.childNodes?Array.prototype.indexOf.call(e.childNodes,r)!==-1:!1}function Vc(e,r){return function(){return e.apply(r,arguments)}}const{toString:up}=Object.prototype,{getPrototypeOf:ya}=Object,{iterator:Jt,toStringTag:Kc}=Symbol,Yt=(e=>r=>{const t=up.call(r);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),tr=e=>(e=e.toLowerCase(),r=>Yt(r)===e),Xt=e=>r=>typeof r===e,{isArray:Qr}=Array,Zr=Xt("undefined");function Rt(e){return e!==null&&!Zr(e)&&e.constructor!==null&&!Zr(e.constructor)&&He(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Jc=tr("ArrayBuffer");function cp(e){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&Jc(e.buffer),r}const lp=Xt("string"),He=Xt("function"),Yc=Xt("number"),St=e=>e!==null&&typeof e=="object",fp=e=>e===!0||e===!1,Qt=e=>{if(Yt(e)!=="object")return!1;const r=ya(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Kc in e)&&!(Jt in e)},vp=e=>{if(!St(e)||Rt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},dp=tr("Date"),hp=tr("File"),pp=tr("Blob"),gp=tr("FileList"),mp=e=>St(e)&&He(e.pipe),yp=e=>{let r;return e&&(typeof FormData=="function"&&e instanceof FormData||He(e.append)&&((r=Yt(e))==="formdata"||r==="object"&&He(e.toString)&&e.toString()==="[object FormData]"))},bp=tr("URLSearchParams"),[wp,Ep,Rp,Sp]=["ReadableStream","Request","Response","Headers"].map(tr),Op=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ot(e,r,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Qr(e))for(n=0,i=e.length;n0;)if(i=t[n],r===i.toLowerCase())return i;return null}const Fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qc=e=>!Zr(e)&&e!==Fr;function ba(){const{caseless:e,skipUndefined:r}=Qc(this)&&this||{},t={},n=(i,a)=>{const o=e&&Xc(t,a)||a;Qt(t[o])&&Qt(i)?t[o]=ba(t[o],i):Qt(i)?t[o]=ba({},i):Qr(i)?t[o]=i.slice():(!r||!Zr(i))&&(t[o]=i)};for(let i=0,a=arguments.length;i(Ot(r,(i,a)=>{t&&He(i)?e[a]=Vc(i,t):e[a]=i},{allOwnKeys:n}),e),Tp=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),_p=(e,r,t,n)=>{e.prototype=Object.create(r.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:r.prototype}),t&&Object.assign(e.prototype,t)},xp=(e,r,t,n)=>{let i,a,o;const s={};if(r=r||{},e==null)return r;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,r))&&!s[o]&&(r[o]=e[o],s[o]=!0);e=t!==!1&&ya(e)}while(e&&(!t||t(e,r))&&e!==Object.prototype);return r},Ip=(e,r,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=r.length;const n=e.indexOf(r,t);return n!==-1&&n===t},Pp=e=>{if(!e)return null;if(Qr(e))return e;let r=e.length;if(!Yc(r))return null;const t=new Array(r);for(;r-- >0;)t[r]=e[r];return t},Ap=(e=>r=>e&&r instanceof e)(typeof Uint8Array<"u"&&ya(Uint8Array)),Lp=(e,r)=>{const t=(e&&e[Jt]).call(e);let n;for(;(n=t.next())&&!n.done;){const i=n.value;r.call(e,i[0],i[1])}},qp=(e,r)=>{let t;const n=[];for(;(t=e.exec(r))!==null;)n.push(t);return n},kp=tr("HTMLFormElement"),jp=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,t,n){return t.toUpperCase()+n}),Zc=(({hasOwnProperty:e})=>(r,t)=>e.call(r,t))(Object.prototype),Fp=tr("RegExp"),el=(e,r)=>{const t=Object.getOwnPropertyDescriptors(e),n={};Ot(t,(i,a)=>{let o;(o=r(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},Np=e=>{el(e,(r,t)=>{if(He(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=e[t];if(He(n)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},Up=(e,r)=>{const t={},n=i=>{i.forEach(a=>{t[a]=!0})};return Qr(e)?n(e):n(String(e).split(r)),t},Mp=()=>{},Dp=(e,r)=>e!=null&&Number.isFinite(e=+e)?e:r;function Bp(e){return!!(e&&He(e.append)&&e[Kc]==="FormData"&&e[Jt])}const Hp=e=>{const r=new Array(10),t=(n,i)=>{if(St(n)){if(r.indexOf(n)>=0)return;if(Rt(n))return n;if(!("toJSON"in n)){r[i]=n;const a=Qr(n)?[]:{};return Ot(n,(o,s)=>{const c=t(o,i+1);!Zr(c)&&(a[s]=c)}),r[i]=void 0,a}}return n};return t(e,0)},$p=tr("AsyncFunction"),Gp=e=>e&&(St(e)||He(e))&&He(e.then)&&He(e.catch),rl=((e,r)=>e?setImmediate:r?((t,n)=>(Fr.addEventListener("message",({source:i,data:a})=>{i===Fr&&a===t&&n.length&&n.shift()()},!1),i=>{n.push(i),Fr.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",He(Fr.postMessage)),Wp=typeof queueMicrotask<"u"?queueMicrotask.bind(Fr):typeof process<"u"&&process.nextTick||rl,zp=e=>e!=null&&He(e[Jt]),x={isArray:Qr,isArrayBuffer:Jc,isBuffer:Rt,isFormData:yp,isArrayBufferView:cp,isString:lp,isNumber:Yc,isBoolean:fp,isObject:St,isPlainObject:Qt,isEmptyObject:vp,isReadableStream:wp,isRequest:Ep,isResponse:Rp,isHeaders:Sp,isUndefined:Zr,isDate:dp,isFile:hp,isBlob:pp,isRegExp:Fp,isFunction:He,isStream:mp,isURLSearchParams:bp,isTypedArray:Ap,isFileList:gp,forEach:Ot,merge:ba,extend:Cp,trim:Op,stripBOM:Tp,inherits:_p,toFlatObject:xp,kindOf:Yt,kindOfTest:tr,endsWith:Ip,toArray:Pp,forEachEntry:Lp,matchAll:qp,isHTMLForm:kp,hasOwnProperty:Zc,hasOwnProp:Zc,reduceDescriptors:el,freezeMethods:Np,toObjectSet:Up,toCamelCase:jp,noop:Mp,toFiniteNumber:Dp,findKey:Xc,global:Fr,isContextDefined:Qc,isSpecCompliantForm:Bp,toJSONObject:Hp,isAsyncFn:$p,isThenable:Gp,setImmediate:rl,asap:Wp,isIterable:zp};function ee(e,r,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",r&&(this.code=r),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}x.inherits(ee,Error,{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:x.toJSONObject(this.config),code:this.code,status:this.status}}});const tl=ee.prototype,nl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{nl[e]={value:e}}),Object.defineProperties(ee,nl),Object.defineProperty(tl,"isAxiosError",{value:!0}),ee.from=(e,r,t,n,i,a)=>{const o=Object.create(tl);x.toFlatObject(e,o,function(u){return u!==Error.prototype},u=>u!=="isAxiosError");const s=e&&e.message?e.message:"Error",c=r==null&&e?e.code:r;return ee.call(o,s,c,t,n,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};const Vp=null;function wa(e){return x.isPlainObject(e)||x.isArray(e)}function il(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function al(e,r,t){return e?e.concat(r).map(function(n,i){return n=il(n),!t&&i?"["+n+"]":n}).join(t?".":""):r}function Kp(e){return x.isArray(e)&&!e.some(wa)}const Jp=x.toFlatObject(x,{},null,function(e){return/^is[A-Z]/.test(e)});function Zt(e,r,t){if(!x.isObject(e))throw new TypeError("target must be an object");r=r||new FormData,t=x.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!x.isUndefined(g[v])});const n=t.metaTokens,i=t.visitor||u,a=t.dots,o=t.indexes,s=(t.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(r);if(!x.isFunction(i))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(x.isDate(v))return v.toISOString();if(x.isBoolean(v))return v.toString();if(!s&&x.isBlob(v))throw new ee("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(v)||x.isTypedArray(v)?s&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,g,m){let E=v;if(v&&!m&&typeof v=="object"){if(x.endsWith(g,"{}"))g=n?g:g.slice(0,-2),v=JSON.stringify(v);else if(x.isArray(v)&&Kp(v)||(x.isFileList(v)||x.endsWith(g,"[]"))&&(E=x.toArray(v)))return g=il(g),E.forEach(function(w,R){!(x.isUndefined(w)||w===null)&&r.append(o===!0?al([g],R,a):o===null?g:g+"[]",c(w))}),!1}return wa(v)?!0:(r.append(al(m,g,a),c(v)),!1)}const l=[],f=Object.assign(Jp,{defaultVisitor:u,convertValue:c,isVisitable:wa});function h(v,g){if(!x.isUndefined(v)){if(l.indexOf(v)!==-1)throw Error("Circular reference detected in "+g.join("."));l.push(v),x.forEach(v,function(m,E){(!(x.isUndefined(m)||m===null)&&i.call(r,m,x.isString(E)?E.trim():E,g,f))===!0&&h(m,g?g.concat(E):[E])}),l.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return h(e),r}function ol(e){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(t){return r[t]})}function Ea(e,r){this._pairs=[],e&&Zt(e,this,r)}const sl=Ea.prototype;sl.append=function(e,r){this._pairs.push([e,r])},sl.toString=function(e){const r=e?function(t){return e.call(this,t,ol)}:ol;return this._pairs.map(function(t){return r(t[0])+"="+r(t[1])},"").join("&")};function Yp(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ul(e,r,t){if(!r)return e;const n=t&&t.encode||Yp;x.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let a;if(i?a=i(r,t):a=x.isURLSearchParams(r)?r.toString():new Ea(r,t).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class cl{constructor(){this.handlers=[]}use(r,t,n){return this.handlers.push({fulfilled:r,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){x.forEach(this.handlers,function(t){t!==null&&r(t)})}}const ll={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xp=typeof URLSearchParams<"u"?URLSearchParams:Ea,Qp=typeof FormData<"u"?FormData:null,Zp=typeof Blob<"u"?Blob:null,eg={isBrowser:!0,classes:{URLSearchParams:Xp,FormData:Qp,Blob:Zp},protocols:["http","https","file","blob","url","data"]},Ra=typeof window<"u"&&typeof document<"u",Sa=typeof navigator=="object"&&navigator||void 0,rg=Ra&&(!Sa||["ReactNative","NativeScript","NS"].indexOf(Sa.product)<0),tg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ng=Ra&&window.location.href||"http://localhost",ig=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ra,hasStandardBrowserEnv:rg,hasStandardBrowserWebWorkerEnv:tg,navigator:Sa,origin:ng},Symbol.toStringTag,{value:"Module"})),je={...ig,...eg};function ag(e,r){return Zt(e,new je.classes.URLSearchParams,{visitor:function(t,n,i,a){return je.isNode&&x.isBuffer(t)?(this.append(n,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...r})}function og(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(r=>r[0]==="[]"?"":r[1]||r[0])}function sg(e){const r={},t=Object.keys(e);let n;const i=t.length;let a;for(n=0;n=t.length;return o=!o&&x.isArray(i)?i.length:o,c?(x.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!x.isObject(i[o]))&&(i[o]=[]),r(t,n,i[o],a)&&x.isArray(i[o])&&(i[o]=sg(i[o])),!s)}if(x.isFormData(e)&&x.isFunction(e.entries)){const t={};return x.forEachEntry(e,(n,i)=>{r(og(n),i,t,0)}),t}return null}function ug(e,r,t){if(x.isString(e))try{return(r||JSON.parse)(e),x.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}const Ct={transitional:ll,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const t=r.getContentType()||"",n=t.indexOf("application/json")>-1,i=x.isObject(e);if(i&&x.isHTMLForm(e)&&(e=new FormData(e)),x.isFormData(e))return n?JSON.stringify(fl(e)):e;if(x.isArrayBuffer(e)||x.isBuffer(e)||x.isStream(e)||x.isFile(e)||x.isBlob(e)||x.isReadableStream(e))return e;if(x.isArrayBufferView(e))return e.buffer;if(x.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return ag(e,this.formSerializer).toString();if((a=x.isFileList(e))||t.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Zt(a?{"files[]":e}:e,o&&new o,this.formSerializer)}}return i||n?(r.setContentType("application/json",!1),ug(e)):e}],transformResponse:[function(e){const r=this.transitional||Ct.transitional,t=r&&r.forcedJSONParsing,n=this.responseType==="json";if(x.isResponse(e)||x.isReadableStream(e))return e;if(e&&x.isString(e)&&(t&&!this.responseType||n)){const i=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?ee.from(a,ee.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:je.classes.FormData,Blob:je.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{Ct.headers[e]={}});const cg=x.toObjectSet(["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"]),lg=e=>{const r={};let t,n,i;return e&&e.split(` `).forEach(function(a){i=a.indexOf(":"),t=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!t||r[t]&&cg[t])&&(t==="set-cookie"?r[t]?r[t].push(n):r[t]=[n]:r[t]=r[t]?r[t]+", "+n:n)}),r},vl=Symbol("internals");function Tt(e){return e&&String(e).trim().toLowerCase()}function en(e){return e===!1||e==null?e:x.isArray(e)?e.map(en):String(e)}function fg(e){const r=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(e);)r[n[1]]=n[2];return r}const vg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Oa(e,r,t,n,i){if(x.isFunction(n))return n.call(this,r,t);if(i&&(r=t),!!x.isString(r)){if(x.isString(n))return r.indexOf(n)!==-1;if(x.isRegExp(n))return n.test(r)}}function dg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,t,n)=>t.toUpperCase()+n)}function hg(e,r){const t=x.toCamelCase(" "+r);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+t,{value:function(i,a,o){return this[n].call(this,r,i,a,o)},configurable:!0})})}let $e=class{constructor(e){e&&this.set(e)}set(e,r,t){const n=this;function i(o,s,c){const u=Tt(s);if(!u)throw new Error("header name must be a non-empty string");const l=x.findKey(n,u);(!l||n[l]===void 0||c===!0||c===void 0&&n[l]!==!1)&&(n[l||s]=en(o))}const a=(o,s)=>x.forEach(o,(c,u)=>i(c,u,s));if(x.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if(x.isString(e)&&(e=e.trim())&&!vg(e))a(lg(e),r);else if(x.isObject(e)&&x.isIterable(e)){let o={},s,c;for(const u of e){if(!x.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[c=u[0]]=(s=o[c])?x.isArray(s)?[...s,u[1]]:[s,u[1]]:u[1]}a(o,r)}else e!=null&&i(r,e,t);return this}get(e,r){if(e=Tt(e),e){const t=x.findKey(this,e);if(t){const n=this[t];if(!r)return n;if(r===!0)return fg(n);if(x.isFunction(r))return r.call(this,n,t);if(x.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Tt(e),e){const t=x.findKey(this,e);return!!(t&&this[t]!==void 0&&(!r||Oa(this,this[t],t,r)))}return!1}delete(e,r){const t=this;let n=!1;function i(a){if(a=Tt(a),a){const o=x.findKey(t,a);o&&(!r||Oa(t,t[o],o,r))&&(delete t[o],n=!0)}}return x.isArray(e)?e.forEach(i):i(e),n}clear(e){const r=Object.keys(this);let t=r.length,n=!1;for(;t--;){const i=r[t];(!e||Oa(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){const r=this,t={};return x.forEach(this,(n,i)=>{const a=x.findKey(t,i);if(a){r[a]=en(n),delete r[i];return}const o=e?dg(i):String(i).trim();o!==i&&delete r[i],r[o]=en(n),t[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return x.forEach(this,(t,n)=>{t!=null&&t!==!1&&(r[n]=e&&x.isArray(t)?t.join(", "):t)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const t=new this(e);return r.forEach(n=>t.set(n)),t}static accessor(e){const r=(this[vl]=this[vl]={accessors:{}}).accessors,t=this.prototype;function n(i){const a=Tt(i);r[a]||(hg(t,i),r[a]=!0)}return x.isArray(e)?e.forEach(n):n(e),this}};$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors($e.prototype,({value:e},r)=>{let t=r[0].toUpperCase()+r.slice(1);return{get:()=>e,set(n){this[t]=n}}}),x.freezeMethods($e);function Ca(e,r){const t=this||Ct,n=r||t,i=$e.from(n.headers);let a=n.data;return x.forEach(e,function(o){a=o.call(t,a,i.normalize(),r?r.status:void 0)}),i.normalize(),a}function dl(e){return!!(e&&e.__CANCEL__)}function et(e,r,t){ee.call(this,e??"canceled",ee.ERR_CANCELED,r,t),this.name="CanceledError"}x.inherits(et,ee,{__CANCEL__:!0});function hl(e,r,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?e(t):r(new ee("Request failed with status code "+t.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function pg(e){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}function gg(e,r){e=e||10;const t=new Array(e),n=new Array(e);let i=0,a=0,o;return r=r!==void 0?r:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),t[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=t[l++],l=l%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o{t=c,i=null,a&&(clearTimeout(a),a=null),e(...s)};return[(...s)=>{const c=Date.now(),u=c-t;u>=n?o(s,c):(i=s,a||(a=setTimeout(()=>{a=null,o(i)},n-u)))},()=>i&&o(i)]}const rn=(e,r,t=3)=>{let n=0;const i=gg(50,250);return mg(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,c=o-n,u=i(c),l=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&l?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[r?"download":"upload"]:!0};e(f)},t)},pl=(e,r)=>{const t=e!=null;return[n=>r[0]({lengthComputable:t,total:e,loaded:n}),r[1]]},gl=e=>(...r)=>x.asap(()=>e(...r)),yg=je.hasStandardBrowserEnv?((e,r)=>t=>(t=new URL(t,je.origin),e.protocol===t.protocol&&e.host===t.host&&(r||e.port===t.port)))(new URL(je.origin),je.navigator&&/(msie|trident)/i.test(je.navigator.userAgent)):()=>!0,bg=je.hasStandardBrowserEnv?{write(e,r,t,n,i,a){const o=[e+"="+encodeURIComponent(r)];x.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),x.isString(n)&&o.push("path="+n),x.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const r=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Eg(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}function ml(e,r,t){let n=!wg(r);return e&&(n||t==!1)?Eg(e,r):r}const yl=e=>e instanceof $e?{...e}:e;function Nr(e,r){r=r||{};const t={};function n(u,l,f,h){return x.isPlainObject(u)&&x.isPlainObject(l)?x.merge.call({caseless:h},u,l):x.isPlainObject(l)?x.merge({},l):x.isArray(l)?l.slice():l}function i(u,l,f,h){if(x.isUndefined(l)){if(!x.isUndefined(u))return n(void 0,u,f,h)}else return n(u,l,f,h)}function a(u,l){if(!x.isUndefined(l))return n(void 0,l)}function o(u,l){if(x.isUndefined(l)){if(!x.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function s(u,l,f){if(f in r)return n(u,l);if(f in e)return n(void 0,u)}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,l,f)=>i(yl(u),yl(l),f,!0)};return x.forEach(Object.keys({...e,...r}),function(u){const l=c[u]||i,f=l(e[u],r[u],u);x.isUndefined(f)&&l!==s||(t[u]=f)}),t}const bl=e=>{const r=Nr({},e);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=r;if(r.headers=o=$e.from(o),r.url=ul(ml(r.baseURL,r.url,r.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),x.isFormData(t)){if(je.hasStandardBrowserEnv||je.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(x.isFunction(t.getHeaders)){const c=t.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,f])=>{u.includes(l.toLowerCase())&&o.set(l,f)})}}if(je.hasStandardBrowserEnv&&(n&&x.isFunction(n)&&(n=n(r)),n||n!==!1&&yg(r.url))){const c=i&&a&&bg.read(a);c&&o.set(i,c)}return r},Rg=typeof XMLHttpRequest<"u",Sg=Rg&&function(e){return new Promise(function(r,t){const n=bl(e);let i=n.data;const a=$e.from(n.headers).normalize();let{responseType:o,onUploadProgress:s,onDownloadProgress:c}=n,u,l,f,h,v;function g(){h&&h(),v&&v(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(n.method.toUpperCase(),n.url,!0),m.timeout=n.timeout;function E(){if(!m)return;const R=$e.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),O={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:R,config:e,request:m};hl(function(p){r(p),g()},function(p){t(p),g()},O),m=null}"onloadend"in m?m.onloadend=E:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(E)},m.onabort=function(){m&&(t(new ee("Request aborted",ee.ECONNABORTED,e,m)),m=null)},m.onerror=function(R){const O=R&&R.message?R.message:"Network Error",p=new ee(O,ee.ERR_NETWORK,e,m);p.event=R||null,t(p),m=null},m.ontimeout=function(){let R=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const O=n.transitional||ll;n.timeoutErrorMessage&&(R=n.timeoutErrorMessage),t(new ee(R,O.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,m)),m=null},i===void 0&&a.setContentType(null),"setRequestHeader"in m&&x.forEach(a.toJSON(),function(R,O){m.setRequestHeader(O,R)}),x.isUndefined(n.withCredentials)||(m.withCredentials=!!n.withCredentials),o&&o!=="json"&&(m.responseType=n.responseType),c&&([f,v]=rn(c,!0),m.addEventListener("progress",f)),s&&m.upload&&([l,h]=rn(s),m.upload.addEventListener("progress",l),m.upload.addEventListener("loadend",h)),(n.cancelToken||n.signal)&&(u=R=>{m&&(t(!R||R.type?new et(null,e,m):R),m.abort(),m=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));const w=pg(n.url);if(w&&je.protocols.indexOf(w)===-1){t(new ee("Unsupported protocol "+w+":",ee.ERR_BAD_REQUEST,e));return}m.send(i||null)})},Og=(e,r)=>{const{length:t}=e=e?e.filter(Boolean):[];if(r||t){let n=new AbortController,i;const a=function(u){if(!i){i=!0,s();const l=u instanceof Error?u:this.reason;n.abort(l instanceof ee?l:new et(l instanceof Error?l.message:l))}};let o=r&&setTimeout(()=>{o=null,a(new ee(`timeout ${r} of ms exceeded`,ee.ETIMEDOUT))},r);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:c}=n;return c.unsubscribe=()=>x.asap(s),c}},Cg=function*(e,r){let t=e.byteLength;if(t{const i=Tg(e,r);let a=0,o,s=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await i.next();if(u){s(),c.close();return}let f=l.byteLength;if(t){let h=a+=f;t(h)}c.enqueue(new Uint8Array(l))}catch(u){throw s(u),u}},cancel(c){return s(c),i.return()}},{highWaterMark:2})},El=64*1024,{isFunction:tn}=x,Rl=(({fetch:e,Request:r,Response:t})=>({fetch:e,Request:r,Response:t}))(x.global),{ReadableStream:Sl,TextEncoder:Ol}=x.global,Cl=(e,...r)=>{try{return!!e(...r)}catch{return!1}},xg=e=>{const{fetch:r,Request:t,Response:n}=Object.assign({},Rl,e),i=tn(r),a=tn(t),o=tn(n);if(!i)return!1;const s=i&&tn(Sl),c=i&&(typeof Ol=="function"?(g=>m=>g.encode(m))(new Ol):async g=>new Uint8Array(await new t(g).arrayBuffer())),u=a&&s&&Cl(()=>{let g=!1;const m=new t(je.origin,{body:new Sl,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!m}),l=o&&s&&Cl(()=>x.isReadableStream(new n("").body)),f={stream:l&&(g=>g.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!f[g]&&(f[g]=(m,E)=>{let w=m&&m[g];if(w)return w.call(m);throw new ee(`Response type '${g}' is not supported`,ee.ERR_NOT_SUPPORT,E)})});const h=async g=>{if(g==null)return 0;if(x.isBlob(g))return g.size;if(x.isSpecCompliantForm(g))return(await new t(je.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(x.isArrayBufferView(g)||x.isArrayBuffer(g))return g.byteLength;if(x.isURLSearchParams(g)&&(g=g+""),x.isString(g))return(await c(g)).byteLength},v=async(g,m)=>x.toFiniteNumber(g.getContentLength())??h(m);return async g=>{let{url:m,method:E,data:w,signal:R,cancelToken:O,timeout:p,onDownloadProgress:d,onUploadProgress:S,responseType:y,headers:b,withCredentials:C="same-origin",fetchOptions:I}=bl(g);y=y?(y+"").toLowerCase():"text";let k=Og([R,O&&O.toAbortSignal()],p),L=null;const B=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let q;try{if(S&&u&&E!=="get"&&E!=="head"&&(q=await v(b,w))!==0){let J=new t(m,{method:"POST",body:w,duplex:"half"}),X;if(x.isFormData(w)&&(X=J.headers.get("content-type"))&&b.setContentType(X),J.body){const[Z,te]=pl(q,rn(gl(S)));w=wl(J.body,El,Z,te)}}x.isString(C)||(C=C?"include":"omit");const A=a&&"credentials"in t.prototype,N={...I,signal:k,method:E.toUpperCase(),headers:b.normalize().toJSON(),body:w,duplex:"half",credentials:A?C:void 0};L=a&&new t(m,N);let M=await(a?r(L,I):r(m,N));const D=l&&(y==="stream"||y==="response");if(l&&(d||D&&B)){const J={};["status","statusText","headers"].forEach(se=>{J[se]=M[se]});const X=x.toFiniteNumber(M.headers.get("content-length")),[Z,te]=d&&pl(X,rn(gl(d),!0))||[];M=new n(wl(M.body,El,Z,()=>{te&&te(),B&&B()}),J)}y=y||"text";let $=await f[x.findKey(f,y)||"text"](M,g);return!D&&B&&B(),await new Promise((J,X)=>{hl(J,X,{data:$,headers:$e.from(M.headers),status:M.status,statusText:M.statusText,config:g,request:L})})}catch(A){throw B&&B(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new ee("Network Error",ee.ERR_NETWORK,g,L),{cause:A.cause||A}):ee.from(A,A&&A.code,g,L)}}},Ig=new Map,Tl=e=>{let r=x.merge.call({skipUndefined:!0},Rl,e?e.env:null);const{fetch:t,Request:n,Response:i}=r,a=[n,i,t];let o=a.length,s=o,c,u,l=Ig;for(;s--;)c=a[s],u=l.get(c),u===void 0&&l.set(c,u=s?new Map:xg(r)),l=u;return u};Tl();const Ta={http:Vp,xhr:Sg,fetch:{get:Tl}};x.forEach(Ta,(e,r)=>{if(e){try{Object.defineProperty(e,"name",{value:r})}catch{}Object.defineProperty(e,"adapterName",{value:r})}});const _l=e=>`- ${e}`,Pg=e=>x.isFunction(e)||e===null||e===!1,xl={getAdapter:(e,r)=>{e=x.isArray(e)?e:[e];const{length:t}=e;let n,i;const a={};for(let o=0;o`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since : `+o.map(_l).join(` `):" "+_l(o[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:Ta};function _a(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new et(null,e)}function Il(e){return _a(e),e.headers=$e.from(e.headers),e.data=Ca.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xl.getAdapter(e.adapter||Ct.adapter,e)(e).then(function(r){return _a(e),r.data=Ca.call(e,e.transformResponse,r),r.headers=$e.from(r.headers),r},function(r){return dl(r)||(_a(e),r&&r.response&&(r.response.data=Ca.call(e,e.transformResponse,r.response),r.response.headers=$e.from(r.response.headers))),Promise.reject(r)})}const Pl="1.12.0",nn={};["object","boolean","number","function","string","symbol"].forEach((e,r)=>{nn[e]=function(t){return typeof t===e||"a"+(r<1?"n ":" ")+e}});const Al={};nn.transitional=function(e,r,t){function n(i,a){return"[Axios v"+Pl+"] Transitional option '"+i+"'"+a+(t?". "+t:"")}return(i,a,o)=>{if(e===!1)throw new ee(n(a," has been removed"+(r?" in "+r:"")),ee.ERR_DEPRECATED);return r&&!Al[a]&&(Al[a]=!0,console.warn(n(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,a,o):!0}},nn.spelling=function(e){return(r,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function Ag(e,r,t){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=r[a];if(o){const s=e[a],c=s===void 0||o(s,a,e);if(c!==!0)throw new ee("option "+a+" must be "+c,ee.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ee("Unknown option "+a,ee.ERR_BAD_OPTION)}}const an={assertOptions:Ag,validators:nn},ur=an.validators;let Ur=class{constructor(e){this.defaults=e||{},this.interceptors={request:new cl,response:new cl}}async request(e,r){try{return await this._request(e,r)}catch(t){if(t instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const i=n.stack?n.stack.replace(/^.+\n/,""):"";try{t.stack?i&&!String(t.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(t.stack+=` `+i):t.stack=i}catch{}}throw t}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Nr(this.defaults,r);const{transitional:t,paramsSerializer:n,headers:i}=r;t!==void 0&&an.assertOptions(t,{silentJSONParsing:ur.transitional(ur.boolean),forcedJSONParsing:ur.transitional(ur.boolean),clarifyTimeoutError:ur.transitional(ur.boolean)},!1),n!=null&&(x.isFunction(n)?r.paramsSerializer={serialize:n}:an.assertOptions(n,{encode:ur.function,serialize:ur.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),an.assertOptions(r,{baseUrl:ur.spelling("baseURL"),withXsrfToken:ur.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&x.merge(i.common,i[r.method]);i&&x.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),r.headers=$e.concat(a,i);const o=[];let s=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(s=s&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,l=0,f;if(!s){const v=[Il.bind(this),void 0];for(v.unshift(...o),v.push(...c),f=v.length,u=Promise.resolve(r);l{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},r(function(i,a,o){n.reason||(n.reason=new et(i,a,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const t=this._listeners.indexOf(r);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const r=new AbortController,t=n=>{r.abort(n)};return this.subscribe(t),r.signal.unsubscribe=()=>this.unsubscribe(t),r.signal}static source(){let r;return{token:new Th(function(t){r=t}),cancel:r}}};function qg(e){return function(r){return e.apply(null,r)}}function kg(e){return x.isObject(e)&&e.isAxiosError===!0}const xa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xa).forEach(([e,r])=>{xa[r]=e});function Ll(e){const r=new Ur(e),t=Vc(Ur.prototype.request,r);return x.extend(t,Ur.prototype,r,{allOwnKeys:!0}),x.extend(t,r,null,{allOwnKeys:!0}),t.create=function(n){return Ll(Nr(e,n))},t}const he=Ll(Ct);he.Axios=Ur,he.CanceledError=et,he.CancelToken=Lg,he.isCancel=dl,he.VERSION=Pl,he.toFormData=Zt,he.AxiosError=ee,he.Cancel=he.CanceledError,he.all=function(e){return Promise.all(e)},he.spread=qg,he.isAxiosError=kg,he.mergeConfig=Nr,he.AxiosHeaders=$e,he.formToJSON=e=>fl(x.isHTMLForm(e)?new FormData(e):e),he.getAdapter=xl.getAdapter,he.HttpStatusCode=xa,he.default=he;const{Axios:Ny,AxiosError:Uy,CanceledError:My,isCancel:Dy,CancelToken:By,VERSION:Hy,all:$y,Cancel:Gy,isAxiosError:Wy,spread:zy,toFormData:Vy,AxiosHeaders:Ky,HttpStatusCode:Jy,formToJSON:Yy,getAdapter:Xy,mergeConfig:Qy}=he;function jg(e,r){try{return JSON.stringify(e)}catch{return""}}function Ia(e,r,t){if(!e)return r;try{return JSON.parse(e)}catch{return r}}class Fg{constructor(r){sr(this,"baseURL"),sr(this,"axiosInstance"),sr(this,"defaultErrorMessage","Unknown http client error message"),this.options=r,this.baseURL=this.getBaseUrl(),this.axiosInstance=he.create({baseURL:this.baseURL,timeout:this.options.timeout}),this.axiosInstance.interceptors.request.use(async t=>this.options.onRequest?await this.options.onRequest(t):t),this.axiosInstance.interceptors.response.use(t=>this.options.onResponse?this.options.onResponse(t):t,t=>!he.isCancel(t)&&typeof this.options.onResponseError=="function"?Promise.reject(this.options.onResponseError(t)):Promise.reject(t))}getBaseUrl(){const{region:r,proxyHost:t=""}=this.options;return op({region:r,proxyHost:t})}rawRequest(r){var t;return(t=r.url)!=null&&t.startsWith("http")||(r.url=`${this.baseURL}${r.url}`),he.request(r)}request(r){return this.axiosInstance.request(r)}get(r,t){return this.axiosInstance.get(r,t)}post(r,t,n){return this.axiosInstance.post(r,t,n)}getDownload(r,t){return this.axiosInstance.get(r,{...t,responseType:(t==null?void 0:t.responseType)||"blob"})}getErrorInfo(r){var t,n,i,a;if(he.isAxiosError(r)){const o=((t=r.config)==null?void 0:t.url)||"";return{code:r.code,status:(n=r.response)==null?void 0:n.status,statusText:(i=r.response)==null?void 0:i.statusText,data:(a=r.response)==null?void 0:a.data,message:r.message,requestUrl:o.startsWith("http")?o:`${this.baseURL}${o}`}}return null}getErrorMessageWithInfo(r){if(!r)return this.defaultErrorMessage;const t=this.getErrorInfo(r);if(t){const{message:n,...i}=t||{};return`${n||this.defaultErrorMessage} info=${jg(i)}`}return ap(r)||this.defaultErrorMessage}}function Ng(e){const r=e.charCodeAt(0);return r>=65&&r<=90}function ql(e){return`--${[...e].map((r,t)=>Ng(r)?t===0?r.toLowerCase():"-"+r.toLowerCase():r).join("")}`}function Ug(e,r){const t=Object.keys(r);return t.length?t.reduce((n,i)=>i.indexOf("-")>-1||i.indexOf("_")>-1?n:(e.style.setProperty(ql(i),r[i]),{...n,[ql(i)]:r[i]}),{}):{}}function kl(e,r){let t;if(typeof e=="string"?t=e.indexOf("#")>-1?document.querySelector(e):document.getElementById(e):t=e,t)return Ug(t,r)}function Mg(e){const r=document.createElement("style");return r.id=e,r}function Pa(e,r){return r.querySelector(`#${e}`)}function Dg(e,r,t=document.head){const n=Pa(r,t);if(n)return n.innerHTML=e,()=>{const i=Pa(r,t);i&&t.removeChild(i)};{const i=Mg(r);return i.innerHTML=e,t.appendChild(i),()=>{const a=Pa(r,t);a&&t.removeChild(a)}}}class Bg{constructor(r,t={}){sr(this,"_moving",!1),sr(this,"_moved",!1),sr(this,"_initialXY",[0,0]),sr(this,"_startXY",[0,0]),sr(this,"_boundaryValue",5),sr(this,"_rb",null),sr(this,"_isPC",!0),this.current=r,this.options=t,this.onMoveStart=this.onMoveStart.bind(this),this.onMoving=this.onMoving.bind(this),this.onMoveEnd=this.onMoveEnd.bind(this),this.removeDocumentListeners=this.removeDocumentListeners.bind(this),this.current.addEventListener("mousedown",this.onMoveStart),this.current.addEventListener("touchstart",this.onMoveStart),this._rb=new ResizeObserver(()=>{this.reset()}),this._rb.observe(document.body)}getEventInfo(r){return r.touches?(this._isPC=!1,{clientXY:[r.touches[0].clientX,r.touches[0].clientY]}):(this._isPC=!0,{clientXY:[r.clientX,r.clientY]})}onMoveStart(r){r.stopPropagation(),r.preventDefault(),this._initialXY=[this.current.offsetLeft,this.current.offsetTop],this._startXY=this.getEventInfo(r).clientXY,this._moved=!1,this.addDocumentListeners()}onMoving(r){var t,n;r.stopPropagation(),r.preventDefault();const{clientXY:i}=this.getEventInfo(r),[a,o]=i,s=a-this._startXY[0],c=o-this._startXY[1];Math.abs(s){r&&(clearTimeout(r),r=null)},n=()=>{t(),e&&(e.disconnect(),e=null)};return{get current(){return e},init:(i,a,o)=>{n();try{const s=typeof i=="function"?i():i;if(s){const{callbackDelay:c,...u}=o;return e=new MutationObserver((l,f)=>{t(),r=setTimeout(()=>{a(l,f)},c)}),e.observe(s,u),!0}return!1}catch(s){return console.warn("Failed to create MutationObserver:",s),!1}},destroy:n}}function jl(){let e=!1,r=!1,t,n;const i=new Promise((a,o)=>{t=a,n=o});return{get current(){return i},get isSettled(){return e},get isCancelled(){return r},get isPending(){return!e&&!r},resolve:a=>{!e&&!r&&(t(a),e=!0)},reject:a=>{!e&&!r&&(n(a),e=!0)},cancel:a=>{!e&&!r&&(r=!0,e=!0,n(a))},abort:a=>{!e&&!r&&(e=!0,r=!0,t(a))}}}function $g(e,r){const t={...e};return Object.keys(t).forEach(n=>{(e[n]===void 0||e[n]===null)&&delete t[n],r!=null&&r.removeEmptyString&&e[n]===""&&delete t[n]}),t}function Gg(e){return new Promise(r=>{e<=0?r(!0):setTimeout(()=>r(!0),e)})}function Wg(e){return Math.min(2e3*e,3e4)}async function zg(e,r={}){const{defaultRetry:t=5,retryDelay:n=Wg,onError:i}=r;if(t<=0)return await e();let a=0;const o=async()=>{try{return await e()}catch(s){if(i==null||i(s,a),a===t)throw s;return a+=1,await Gg(typeof n=="function"?n(a):n),await o()}};return o()}function Fl(e,r={}){const{mode:t=window.localStorage,onError:n}=r;try{return t.getItem(e)}catch(i){return n==null||n(i),null}}const ve={Topic:"WidgetCommunication",Methods:{Maximize:"Maximize",Minimize:"Minimize",GetAllConfig:"GetAllConfig",GetCredentials:"GetCredentials",GetTdAccessToken:"GetTdAccessToken",SetBadge:"SetBadge",FrameOpened:"FrameOpened",FrameClosed:"FrameClosed",DownloadTranscript:"DownloadTranscript",ConversationStart:"ConversationStart",FrameReady:"FrameReady",FrameResize:"FrameResize",UpdateAppConfigs:"UpdateAppConfigs",UpdateContext:"UpdateContext",Reset:"Reset",PopupCloseConversation:"PopupCloseConversation",ConversationEnded:"ConversationEnded",ConversationClear:"ConversationClear",SendMessage:"SendMessage",FloatFrameOpen:"FloatFrameOpen",FloatFrameClose:"FloatFrameClose",UpdateOptOut:"UpdateOptOut",TraceUserEvent:"TraceUserEvent",JumpTo:"JumpTo"}},gr={Topic:"FloatWidgetCommunication",Methods:{GetAllConfig:"GetAllConfig",UpdateAppConfigs:"UpdateAppConfigs",UpdateContext:"UpdateContext",FrameResize:"FrameResize",ButtonClick:"ButtonClick",ConversationClear:"ConversationClear",ClickOptOut:"ClickOptOut",JumpTo:"JumpTo"}};var Nl={},Aa,Ul;function Vg(){if(Ul)return Aa;Ul=1;var e=Vi(),r=Et();return Aa=e?{}.toString:function(){return"[object "+r(this)+"]"},Aa}var Ml;function Kg(){if(Ml)return Nl;Ml=1;var e=Vi(),r=rr(),t=Vg();return e||r(Object.prototype,"toString",t,{unsafe:!0}),Nl}Kg();var Dl={},Bl={},La,Hl;function $l(){if(Hl)return La;Hl=1;var e=le(),r=mt(),t=Er(),n=function(i){return r.slice(0,i.length)===i};return La=function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":t(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"}(),La}var qa,Gl;function ka(){if(Gl)return qa;Gl=1;var e=$l();return qa=e==="NODE",qa}var ja,Wl;function zl(){if(Wl)return ja;Wl=1;var e=le();return ja=e,ja}var Fa,Vl;function Jg(){if(Vl)return Fa;Vl=1;var e=ue(),r=Or();return Fa=function(t,n,i){try{return e(r(Object.getOwnPropertyDescriptor(t,n)[i]))}catch{}},Fa}var Na,Kl;function Yg(){if(Kl)return Na;Kl=1;var e=Te();return Na=function(r){return e(r)||r===null},Na}var Ua,Jl;function Xg(){if(Jl)return Ua;Jl=1;var e=Yg(),r=String,t=TypeError;return Ua=function(n){if(e(n))return n;throw new t("Can't set "+r(n)+" as a prototype")},Ua}var Ma,Yl;function Da(){if(Yl)return Ma;Yl=1;var e=Jg(),r=Te(),t=kr(),n=Xg();return Ma=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,"__proto__","set"),o(a,[]),i=a instanceof Array}catch{}return function(c,u){return t(c),n(u),r(c)&&(i?o(c,u):c.__proto__=u),c}}():void 0),Ma}var Ba,Xl;function Mr(){if(Xl)return Ba;Xl=1;var e=er().f,r=Me(),t=ye(),n=t("toStringTag");return Ba=function(i,a,o){i&&!o&&(i=i.prototype),i&&!r(i,n)&&e(i,n,{configurable:!0,value:a})},Ba}var Ha,Ql;function _t(){if(Ql)return Ha;Ql=1;var e=Du(),r=er();return Ha=function(t,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),r.f(t,n,i)},Ha}var $a,Zl;function ef(){if(Zl)return $a;Zl=1;var e=Sr(),r=_t(),t=ye(),n=Ee(),i=t("species");return $a=function(a){var o=e(a);n&&o&&!o[i]&&r(o,i,{configurable:!0,get:function(){return this}})},$a}var Ga,rf;function xt(){if(rf)return Ga;rf=1;var e=gt(),r=TypeError;return Ga=function(t,n){if(e(n,t))return t;throw new r("Incorrect invocation")},Ga}var Wa,tf;function Qg(){if(tf)return Wa;tf=1;var e=Yi(),r=Ht(),t=TypeError;return Wa=function(n){if(e(n))return n;throw new t(r(n)+" is not a constructor")},Wa}var za,nf;function Zg(){if(nf)return za;nf=1;var e=ze(),r=Qg(),t=Xr(),n=ye(),i=n("species");return za=function(a,o){var s=e(a).constructor,c;return s===void 0||t(c=e(s)[i])?o:r(c)},za}var Va,af;function em(){if(af)return Va;af=1;var e=Mt(),r=Function.prototype,t=r.apply,n=r.call;return Va=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(t):function(){return n.apply(t,arguments)}),Va}var Ka,of;function xr(){if(of)return Ka;of=1;var e=Ac(),r=Or(),t=Mt(),n=e(e.bind);return Ka=function(i,a){return r(i),a===void 0?i:t?n(i,a):function(){return i.apply(a,arguments)}},Ka}var Ja,sf;function uf(){if(sf)return Ja;sf=1;var e=Sr();return Ja=e("document","documentElement"),Ja}var Ya,cf;function on(){if(cf)return Ya;cf=1;var e=ue();return Ya=e([].slice),Ya}var Xa,lf;function Qa(){if(lf)return Xa;lf=1;var e=TypeError;return Xa=function(r,t){if(rb;b++)if(I=q(v[b]),I&&o(h,I))return I;return new f(!1)}S=s(v,y)}for(k=R?v.next:S.next;!(L=r(k,S)).done;){try{I=q(L.value)}catch(A){u(S,"throw",A)}if(typeof I=="object"&&I&&o(h,I))return I}return new f(!1)},bo}var wo,Nf;function Uf(){if(Nf)return wo;Nf=1;var e=ye(),r=e("iterator"),t=!1;try{var n=0,i={next:function(){return{done:!!n++}},return:function(){t=!0}};i[r]=function(){return this},Array.from(i,function(){throw 2})}catch{}return wo=function(a,o){try{if(!o&&!t)return!1}catch{return!1}var s=!1;try{var c={};c[r]=function(){return{next:function(){return{done:s=!0}}}},a(c)}catch{}return s},wo}var Eo,Mf;function Df(){if(Mf)return Eo;Mf=1;var e=It(),r=Uf(),t=Pt().CONSTRUCTOR;return Eo=t||!r(function(n){e.all(n).then(void 0,function(){})}),Eo}var Bf;function om(){if(Bf)return xf;Bf=1;var e=de(),r=ke(),t=Or(),n=At(),i=uo(),a=un(),o=Df();return e({target:"Promise",stat:!0,forced:o},{all:function(c){var u=this,l=n.f(u),f=l.resolve,h=l.reject,v=i(function(){var g=t(u.resolve),m=[],E=0,w=1;a(c,function(R){var O=E++,p=!1;w++,r(g,u,R).then(function(d){p||(p=!0,m[O]=d,--w||f(m))},h)}),--w||f(m)});return v.error&&h(v.value),l.promise}}),xf}var Hf={},$f;function sm(){if($f)return Hf;$f=1;var e=de(),r=Ze(),t=Pt().CONSTRUCTOR,n=It(),i=Sr(),a=me(),o=rr(),s=n&&n.prototype;if(e({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(u){return this.then(void 0,u)}}),!r&&a(n)){var c=i("Promise").prototype.catch;s.catch!==c&&o(s,"catch",c,{unsafe:!0})}return Hf}var Gf={},Wf;function um(){if(Wf)return Gf;Wf=1;var e=de(),r=ke(),t=Or(),n=At(),i=uo(),a=un(),o=Df();return e({target:"Promise",stat:!0,forced:o},{race:function(c){var u=this,l=n.f(u),f=l.reject,h=i(function(){var v=t(u.resolve);a(c,function(g){r(v,u,g).then(l.resolve,f)})});return h.error&&f(h.value),l.promise}}),Gf}var zf={},Vf;function cm(){if(Vf)return zf;Vf=1;var e=de(),r=At(),t=Pt().CONSTRUCTOR;return e({target:"Promise",stat:!0,forced:t},{reject:function(i){var a=r.f(this),o=a.reject;return o(i),a.promise}}),zf}var Kf={},Ro,Jf;function lm(){if(Jf)return Ro;Jf=1;var e=ze(),r=Te(),t=At();return Ro=function(n,i){if(e(n),r(i)&&i.constructor===n)return i;var a=t.f(n),o=a.resolve;return o(i),a.promise},Ro}var Yf;function fm(){if(Yf)return Kf;Yf=1;var e=de(),r=Sr(),t=Ze(),n=It(),i=Pt().CONSTRUCTOR,a=lm(),o=r("Promise"),s=t&&!i;return e({target:"Promise",stat:!0,forced:t||i},{resolve:function(u){return a(s&&this===o?n:this,u)}}),Kf}var Xf;function vm(){return Xf||(Xf=1,am(),om(),sm(),um(),cm(),fm()),Dl}vm();function dm(){var e=null;return{create:function(t){return e||(e=new Fg(Ce(Ce({},t),{},{onResponseError:function(i){return new Error(e.getErrorMessageWithInfo(i))}}))),e},get current(){if(!e)throw new Error("HttpClient instance is not initialized. Please call create() first.");return e}}}var qt=dm();function hm(e){return So.apply(this,arguments)}function So(){return So=qr(Ue().m(function e(r){var t;return Ue().w(function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,zg(qr(Ue().m(function i(){var a,o,s,c,u,l,f,h,v,g,m,E,w;return Ue().w(function(R){for(;;)switch(R.n){case 0:return R.n=1,qt.current.get("/2019-11/pas/livechats",{params:{touchpoint_value:r,sdk_version:"v2"}});case 1:return w=R.v,R.a(2,{active:w==null||(a=w.data)===null||a===void 0?void 0:a.active,config:w==null||(o=w.data)===null||o===void 0?void 0:o.config,account_id:w==null||(s=w.data)===null||s===void 0?void 0:s.account_id,feedback_flow_id:(w==null||(c=w.data)===null||c===void 0?void 0:c.feedback_flow_id)||"",quickstart_config:(w==null||(u=w.data)===null||u===void 0?void 0:u.quickstart_config)||"",release_version:w==null?void 0:w.data.release_version,enable_split_twilio_bootstrap:!!(w!=null&&(l=w.data)!==null&&l!==void 0&&l.enable_split_twilio_bootstrap),enable_collection_user_data:(f=w==null||(h=w.data)===null||h===void 0?void 0:h.enable_collection_user_data)!==null&&f!==void 0?f:!1,reportable_events:(w==null||(v=w.data)===null||v===void 0?void 0:v.reportable_events)||[],enable_push_quickstart_message:!!(!(w==null||(g=w.data)===null||g===void 0)&&g.enable_push_quickstart_message),delivery_via_gateway:!!(!(w==null||(m=w.data)===null||m===void 0)&&m.delivery_via_gateway),delivery_mode:w==null||(E=w.data)===null||E===void 0?void 0:E.delivery_mode})}},i)})),{defaultRetry:2});case 1:return n.a(2,n.v);case 2:return n.p=2,t=n.v,console.error("Failed to fetch td chat touchpoint",t),n.a(2,null)}},e,null,[[0,2]])})),So.apply(this,arguments)}var cn={exports:{}},Qf;function pm(){if(Qf)return cn.exports;Qf=1;var e=typeof Reflect=="object"?Reflect:null,r=e&&typeof e.apply=="function"?e.apply:function(d,S,y){return Function.prototype.apply.call(d,S,y)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(d){return Object.getOwnPropertyNames(d).concat(Object.getOwnPropertySymbols(d))}:t=function(d){return Object.getOwnPropertyNames(d)};function n(p){console&&console.warn&&console.warn(p)}var i=Number.isNaN||function(d){return d!==d};function a(){a.init.call(this)}cn.exports=a,cn.exports.once=w,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(p){if(typeof p!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof p)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(p){if(typeof p!="number"||p<0||i(p))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+p+".");o=p}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(d){if(typeof d!="number"||d<0||i(d))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+d+".");return this._maxListeners=d,this};function c(p){return p._maxListeners===void 0?a.defaultMaxListeners:p._maxListeners}a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(d){for(var S=[],y=1;y0&&(I=S[0]),I instanceof Error)throw I;var k=new Error("Unhandled error."+(I?" ("+I.message+")":""));throw k.context=I,k}var L=C[d];if(L===void 0)return!1;if(typeof L=="function")r(L,this,S);else for(var B=L.length,q=g(L,B),y=0;y0&&I.length>b&&!I.warned){I.warned=!0;var k=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String(d)+" listeners added. Use emitter.setMaxListeners() to increase limit");k.name="MaxListenersExceededWarning",k.emitter=p,k.type=d,k.count=I.length,n(k)}return p}a.prototype.addListener=function(d,S){return u(this,d,S,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(d,S){return u(this,d,S,!0)};function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(p,d,S){var y={fired:!1,wrapFn:void 0,target:p,type:d,listener:S},b=l.bind(y);return b.listener=S,y.wrapFn=b,b}a.prototype.once=function(d,S){return s(S),this.on(d,f(this,d,S)),this},a.prototype.prependOnceListener=function(d,S){return s(S),this.prependListener(d,f(this,d,S)),this},a.prototype.removeListener=function(d,S){var y,b,C,I,k;if(s(S),b=this._events,b===void 0)return this;if(y=b[d],y===void 0)return this;if(y===S||y.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete b[d],b.removeListener&&this.emit("removeListener",d,y.listener||S));else if(typeof y!="function"){for(C=-1,I=y.length-1;I>=0;I--)if(y[I]===S||y[I].listener===S){k=y[I].listener,C=I;break}if(C<0)return this;C===0?y.shift():m(y,C),y.length===1&&(b[d]=y[0]),b.removeListener!==void 0&&this.emit("removeListener",d,k||S)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(d){var S,y,b;if(y=this._events,y===void 0)return this;if(y.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):y[d]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete y[d]),this;if(arguments.length===0){var C=Object.keys(y),I;for(b=0;b=0;b--)this.removeListener(d,S[b]);return this};function h(p,d,S){var y=p._events;if(y===void 0)return[];var b=y[d];return b===void 0?[]:typeof b=="function"?S?[b.listener||b]:[b]:S?E(b):g(b,b.length)}a.prototype.listeners=function(d){return h(this,d,!0)},a.prototype.rawListeners=function(d){return h(this,d,!1)},a.listenerCount=function(p,d){return typeof p.listenerCount=="function"?p.listenerCount(d):v.call(p,d)},a.prototype.listenerCount=v;function v(p){var d=this._events;if(d!==void 0){var S=d[p];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function g(p,d){for(var S=new Array(d),y=0;y0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]0&&arguments[0]!==void 0?arguments[0]:{};this.context=Ce(Ce({},this.context),t)}},{key:"setPreviewConfig",value:function(t){this.previewConfig=t}},{key:"clearAll",value:function(){this.appConfig={},this.touchpoint=null,this.context={},this.participantName="",this.appProps=null,this.previewConfig=null}},{key:"templateConfig",get:function(){var t;return(t=this.touchpoint)!==null&&t!==void 0&&t.quickstart_config?Ia(this.touchpoint.quickstart_config,null):null}},{key:"template",get:function(){var t;return(t=this.templateConfig)!==null&&t!==void 0&&t.config?Ia(this.templateConfig.config,null):null}},{key:"templateEnableFlyOut",get:function(){var t;return!!((t=this.template)!==null&&t!==void 0&&t.enable_fly_out)}},{key:"lastPreviewConfig",get:function(){return this.previewConfig}},{key:"touchpointId",get:function(){var t;return((t=this.appProps)===null||t===void 0?void 0:t.touchpointId)||""}},{key:"debug",get:function(){var t;return!!(!((t=this.appProps)===null||t===void 0)&&t.debug)}}])}();const Fe=new bm;var wm=["sender"];function Em(){var e=null,r=function(a){var o,s,c,u,l;(o=e)===null||o===void 0||o.register(gr.Methods.GetAllConfig,function(){return Fe.getAllConfig()}),(s=e)===null||s===void 0||s.register(gr.Methods.FrameResize,function(f){a==null||a.widgetFloatFrame.resize(f)}),(c=e)===null||c===void 0||c.register(gr.Methods.ButtonClick,function(f){var h;a==null||(h=a.onButtonClick)===null||h===void 0||h.call(a,f)}),(u=e)===null||u===void 0||u.register(gr.Methods.ClickOptOut,function(){var f;a==null||(f=a.onClickOptOut)===null||f===void 0||f.call(a)}),(l=e)===null||l===void 0||l.register(gr.Methods.JumpTo,function(f){var h;a==null||(h=a.onJumpTo)===null||h===void 0||h.call(a,f)})},t=function(a){var o=a.sender,s=Ut(a,wm);e=new rv({name:"FloatSDK",sender:o,topic:gr.Topic,debug:Fe.debug}),r(s)},n=function(){var a;(a=e)===null||a===void 0||a.destroy(),e=null};return{bootstrap:t,destroy:n,get current(){return e}}}var Rm=["trace_id"];function Sm(){return Oo.apply(this,arguments)}function Oo(){return Oo=qr(Ue().m(function e(){var r,t,n;return Ue().w(function(i){for(;;)switch(i.n){case 0:return t="/pas/livechat-auth",i.n=1,qt.current.post(t,{app_id:Fe.touchpointId});case 1:return n=i.v,i.a(2,(n==null||(r=n.data)===null||r===void 0?void 0:r.td_access_token)||"")}},e)})),Oo.apply(this,arguments)}function Om(e){return Co.apply(this,arguments)}function Co(){return Co=qr(Ue().m(function e(r){var t,n,i,a,o,s,c,u;return Ue().w(function(l){for(;;)switch(l.n){case 0:return a="/2019-11/pas/livechats",o=r||{},s=o.trace_id,c=Ut(o,Rm),l.n=1,qt.current.post(a,Ce(Ce({},c),{},{page_url:window.location.href,app_id:Fe.touchpointId}),s?{headers:hr({},"x-trace-id",s)}:void 0);case 1:return u=l.v,l.a(2,{accessToken:u==null||(t=u.data)===null||t===void 0?void 0:t.access_token,roomId:u==null||(n=u.data)===null||n===void 0?void 0:n.conversation_sid,region:u==null||(i=u.data)===null||i===void 0?void 0:i.region})}},e)})),Co.apply(this,arguments)}var To={},iv;function Cm(){if(iv)return To;iv=1;var e=Ee(),r=Iu(),t=er(),n=ze(),i=Rr(),a=Kt();return To.f=e&&!r?Object.defineProperties:function(s,c){n(s);for(var u=i(c),l=a(c),f=l.length,h=0,v;f>h;)t.f(s,v=l[h++],u[v]);return s},To}var _o,av;function rt(){if(av)return _o;av=1;var e=ze(),r=Cm(),t=Ni(),n=Wt(),i=uf(),a=$t(),o=Si(),s=">",c="<",u="prototype",l="script",f=o("IE_PROTO"),h=function(){},v=function(R){return c+l+s+R+c+"/"+l+s},g=function(R){R.write(v("")),R.close();var O=R.parentWindow.Object;return R=null,O},m=function(){var R=a("iframe"),O="java"+l+":",p;return R.style.display="none",i.appendChild(R),R.src=String(O),p=R.contentWindow.document,p.open(),p.write(v("document.F=Object")),p.close(),p.F},E,w=function(){try{E=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&E?g(E):m():g(E);for(var R=t.length;R--;)delete w[u][t[R]];return w()};return n[f]=!0,_o=Object.create||function(O,p){var d;return O!==null?(h[u]=e(O),d=new h,h[u]=null,d[f]=O):d=w(),p===void 0?d:r.f(d,p)},_o}var xo,ov;function Tm(){if(ov)return xo;ov=1;var e=ye(),r=rt(),t=er().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&t(i,n,{configurable:!0,value:r(null)}),xo=function(a){i[n][a]=!0},xo}var Io,sv;function uv(){if(sv)return Io;sv=1;var e=oe(),r=me(),t=Te(),n=rt(),i=ia(),a=rr(),o=ye(),s=Ze(),c=o("iterator"),u=!1,l,f,h;[].keys&&(h=[].keys(),"next"in h?(f=i(i(h)),f!==Object.prototype&&(l=f)):u=!0);var v=!t(l)||e(function(){var g={};return l[c].call(g)!==g});return v?l={}:s&&(l=n(l)),r(l[c])||a(l,c,function(){return this}),Io={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:u},Io}var Po,cv;function lv(){if(cv)return Po;cv=1;var e=uv().IteratorPrototype,r=rt(),t=pt(),n=Mr(),i=Lt(),a=function(){return this};return Po=function(o,s,c,u){var l=s+" Iterator";return o.prototype=r(e,{next:t(+!u,c)}),n(o,l,!1,!0),i[l]=a,o},Po}var Ao,fv;function Lo(){if(fv)return Ao;fv=1;var e=de(),r=ke(),t=Ze(),n=bt(),i=me(),a=lv(),o=ia(),s=Da(),c=Mr(),u=yt(),l=rr(),f=ye(),h=Lt(),v=uv(),g=n.PROPER,m=n.CONFIGURABLE,E=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,R=f("iterator"),O="keys",p="values",d="entries",S=function(){return this};return Ao=function(y,b,C,I,k,L,B){a(C,b,I);var q=function(se){if(se===k&&$)return $;if(!w&&se&&se in M)return M[se];switch(se){case O:return function(){return new C(this,se)};case p:return function(){return new C(this,se)};case d:return function(){return new C(this,se)}}return function(){return new C(this)}},A=b+" Iterator",N=!1,M=y.prototype,D=M[R]||M["@@iterator"]||k&&M[k],$=!w&&D||q(k),J=b==="Array"&&M.entries||D,X,Z,te;if(J&&(X=o(J.call(new y)),X!==Object.prototype&&X.next&&(!t&&o(X)!==E&&(s?s(X,E):i(X[R])||l(X,R,S)),c(X,A,!0,!0),t&&(h[A]=S))),g&&k===p&&D&&D.name!==p&&(!t&&m?u(M,"name",p):(N=!0,$=function(){return r(D,this)})),k)if(Z={values:q(p),keys:L?$:q(O),entries:q(d)},B)for(te in Z)(w||N||!(te in M))&&l(M,te,Z[te]);else e({target:b,proto:!0,forced:w||N},Z);return(!t||B)&&M[R]!==$&&l(M,R,$,{name:k}),h[b]=$,Z},Ao}var qo,vv;function fn(){return vv||(vv=1,qo=function(e,r){return{value:e,done:r}}),qo}var ko,dv;function jo(){if(dv)return ko;dv=1;var e=Rr(),r=Tm(),t=Lt(),n=Cr(),i=er().f,a=Lo(),o=fn(),s=Ze(),c=Ee(),u="Array Iterator",l=n.set,f=n.getterFor(u);ko=a(Array,"Array",function(v,g){l(this,{type:u,target:e(v),index:0,kind:g})},function(){var v=f(this),g=v.target,m=v.index++;if(!g||m>=g.length)return v.target=null,o(void 0,!0);switch(v.kind){case"keys":return o(m,!1);case"values":return o(g[m],!1)}return o([m,g[m]],!1)},"values");var h=t.Arguments=t.Array;if(r("keys"),r("values"),r("entries"),!s&&c&&h.name!=="values")try{i(h,"name",{value:"values"})}catch{}return ko}jo();var hv={},Fo,pv;function gv(){if(pv)return Fo;pv=1;var e=ue(),r=Pi(),t=pr(),n=kr(),i=e("".charAt),a=e("".charCodeAt),o=e("".slice),s=function(c){return function(u,l){var f=t(n(u)),h=r(l),v=f.length,g,m;return h<0||h>=v?c?"":void 0:(g=a(f,h),g<55296||g>56319||h+1===v||(m=a(f,h+1))<56320||m>57343?c?i(f,h):g:c?o(f,h,h+2):(g-55296<<10)+(m-56320)+65536)}};return Fo={codeAt:s(!1),charAt:s(!0)},Fo}var mv;function yv(){if(mv)return hv;mv=1;var e=gv().charAt,r=pr(),t=Cr(),n=Lo(),i=fn(),a="String Iterator",o=t.set,s=t.getterFor(a);return n(String,"String",function(c){o(this,{type:a,string:r(c),index:0})},function(){var u=s(this),l=u.string,f=u.index,h;return f>=l.length?i(void 0,!0):(h=e(l,f),u.index+=h.length,i(h,!1))}),hv}yv();var bv={},No,wv;function Ev(){return wv||(wv=1,No={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),No}var Uo,Rv;function Sv(){if(Rv)return Uo;Rv=1;var e=$t(),r=e("span").classList,t=r&&r.constructor&&r.constructor.prototype;return Uo=t===Object.prototype?void 0:t,Uo}var Ov;function _m(){if(Ov)return bv;Ov=1;var e=le(),r=Ev(),t=Sv(),n=jo(),i=yt(),a=Mr(),o=ye(),s=o("iterator"),c=n.values,u=function(f,h){if(f){if(f[s]!==c)try{i(f,s,c)}catch{f[s]=c}if(a(f,h,!0),r[h]){for(var v in n)if(f[v]!==n[v])try{i(f,v,n[v])}catch{f[v]=n[v]}}}};for(var l in r)u(e[l]&&e[l].prototype,l);return u(t,"DOMTokenList"),bv}_m();var Cv={},Tv={},Mo,_v;function xv(){if(_v)return Mo;_v=1;var e=oe(),r=ye(),t=Ee(),n=Ze(),i=r("iterator");return Mo=!e(function(){var a=new URL("b?a=1&b=2&c=3","https://a"),o=a.searchParams,s=new URLSearchParams("a=1&a=2&b=3"),c="";return a.pathname="c%20d",o.forEach(function(u,l){o.delete("b"),c+=l+u}),s.delete("a",2),s.delete("b",void 0),n&&(!a.toJSON||!s.has("a",1)||s.has("a",2)||!s.has("a",void 0)||s.has("b"))||!o.size&&(n||!t)||!o.sort||a.href!=="https://a/c%20d?a=1&c=3"||o.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!o[i]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||c!=="a1c3"||new URL("https://x",void 0).host!=="x"}),Mo}var Do,Iv;function xm(){if(Iv)return Do;Iv=1;var e=Ee(),r=ue(),t=ke(),n=oe(),i=Kt(),a=rc(),o=xn(),s=jr(),c=Dt(),u=Object.assign,l=Object.defineProperty,f=r([].concat);return Do=!u||n(function(){if(e&&u({b:1},u(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},v={},g=Symbol("assign detection"),m="abcdefghijklmnopqrst";return h[g]=7,m.split("").forEach(function(E){v[E]=E}),u({},h)[g]!==7||i(u({},v)).join("")!==m})?function(v,g){for(var m=s(v),E=arguments.length,w=1,R=a.f,O=o.f;E>w;)for(var p=c(arguments[w++]),d=R?f(i(p),R(p)):i(p),S=d.length,y=0,b;S>y;)b=d[y++],(!e||t(O,p,b))&&(m[b]=p[b]);return m}:u,Do}var Bo,Pv;function Im(){if(Pv)return Bo;Pv=1;var e=ze(),r=jf();return Bo=function(t,n,i,a){try{return a?n(e(i)[0],i[1]):n(i)}catch(o){r(t,"throw",o)}},Bo}var Ho,Av;function Pm(){if(Av)return Ho;Av=1;var e=xr(),r=ke(),t=jr(),n=Im(),i=Af(),a=Yi(),o=wt(),s=lc(),c=mo(),u=sn(),l=Array;return Ho=function(h){var v=t(h),g=a(this),m=arguments.length,E=m>1?arguments[1]:void 0,w=E!==void 0;w&&(E=e(E,m>2?arguments[2]:void 0));var R=u(v),O=0,p,d,S,y,b,C;if(R&&!(this===l&&i(R)))for(d=g?new this:[],y=c(v,R),b=y.next;!(S=r(b,y)).done;O++)C=w?n(y,E,[S.value,O],!0):S.value,s(d,O,C);else for(p=o(v),d=g?new this(p):l(p);p>O;O++)C=w?E(v[O],O):v[O],s(d,O,C);return d.length=O,d},Ho}var $o,Lv;function Am(){if(Lv)return $o;Lv=1;var e=ue(),r=2147483647,t=36,n=1,i=26,a=38,o=700,s=72,c=128,u="-",l=/[^\0-\u007E]/,f=/[.\u3002\uFF0E\uFF61]/g,h="Overflow: input needs wider integers to process",v=t-n,g=RangeError,m=e(f.exec),E=Math.floor,w=String.fromCharCode,R=e("".charCodeAt),O=e([].join),p=e([].push),d=e("".replace),S=e("".split),y=e("".toLowerCase),b=function(L){for(var B=[],q=0,A=L.length;q=55296&&N<=56319&&q>1,L+=E(L/B);L>v*i>>1;)L=E(L/v),A+=t;return E(A+(v+1)*L/(L+a))},k=function(L){var B=[];L=b(L);var q=L.length,A=c,N=0,M=s,D,$;for(D=0;D=A&&$E((r-N)/te))throw new g(h);for(N+=(Z-A)*te,A=Z,D=0;Dr)throw new g(h);if($===A){for(var se=N,_e=t;;){var Pe=_e<=M?n:_e>=M+i?i:_e-M;if(seh;){if(v=+arguments[h++],t(v,1114111)!==v)throw new n(v+" is not a valid code point");l[h]=v<65536?i(v):i(((v-=65536)>>10)+55296,v%1024+56320)}return o(l,"")}}),qv}var Go,jv;function Fv(){if(jv)return Go;jv=1;var e=rr();return Go=function(r,t,n){for(var i in t)e(r,i,t[i],n);return r},Go}var Wo,Nv;function qm(){if(Nv)return Wo;Nv=1;var e=on(),r=Math.floor,t=function(n,i){var a=n.length;if(a<8)for(var o=1,s,c;o0;)n[c]=n[--c];c!==o++&&(n[c]=s)}else for(var u=r(a/2),l=t(e(n,0,u),i),f=t(e(n,u),i),h=l.length,v=f.length,g=0,m=0;g0&&(H&V)!==0;V>>=1)z++;return z},G=function(H){var z=null;switch(H.length){case 1:z=H[0];break;case 2:z=(H[0]&31)<<6|H[1]&63;break;case 3:z=(H[0]&15)<<12|(H[1]&63)<<6|H[2]&63;break;case 4:z=(H[0]&7)<<18|(H[1]&63)<<12|(H[2]&63)<<6|H[3]&63;break}return z>1114111?null:z},Y=function(H){H=Wr(H,st," ");for(var z=H.length,V="",K=0;Kz){V+="%",K++;continue}var ie=or(H,K+1);if(ie!==ie){V+=re,K++;continue}K+=2;var fe=Jr(ie);if(fe===0)re=xe(ie);else{if(fe===1||fe>4){V+=Kr,K++;continue}for(var ge=[ie],Se=1;Sez||ar(H,K)!=="%"));){var Ne=or(H,K+1);if(Ne!==Ne){K+=3;break}if(Ne>191||Ne<128)break;Ke(ge,Ne),K+=2,Se++}if(ge.length!==fe){V+=Kr;continue}var vr=G(ge);vr===null?V+=Kr:re=pe(vr)}}V+=re,K++}return V},ne=/[!'()~]|%20/g,ae={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ce=function(H){return ae[H]},Je=function(H){return Wr(Pe(H),ne,ce)},Ae=h(function(z,V){M(this,{type:N,target:D(z).entries,index:0,kind:V})},A,function(){var z=$(this),V=z.target,K=z.index++;if(!V||K>=V.length)return z.target=null,I(void 0,!0);var re=V[K];switch(z.kind){case"keys":return I(re.key,!1);case"values":return I(re.value,!1)}return I([re.key,re.value],!1)},!0),Ge=function(H){this.entries=[],this.url=null,H!==void 0&&(p(H)?this.parseObject(H):this.parseQuery(typeof H=="string"?ar(H,0)==="?"?Vr(H,1):H:d(H)))};Ge.prototype={type:A,bindURL:function(H){this.url=H,this.update()},parseObject:function(H){var z=this.entries,V=C(H),K,re,ie,fe,ge,Se,Ne;if(V)for(K=b(H,V),re=K.next;!(ie=i(re,K)).done;){if(fe=b(O(ie.value)),ge=fe.next,(Se=i(ge,fe)).done||(Ne=i(ge,fe)).done||!i(ge,fe).done)throw new _e("Expected sequence with length 2");Ke(z,{key:d(Se.value),value:d(Ne.value)})}else for(var vr in H)E(H,vr)&&Ke(z,{key:vr,value:d(H[vr])})},parseQuery:function(H){if(H)for(var z=this.entries,V=zr(H,"&"),K=0,re,ie;K0?arguments[0]:void 0,V=M(this,new Ge(z));o||(this.size=V.entries.length)},Ye=Le.prototype;if(l(Ye,{append:function(z,V){var K=D(this);k(arguments.length,2),Ke(K.entries,{key:d(z),value:d(V)}),o||this.length++,K.updateURL()},delete:function(H){for(var z=D(this),V=k(arguments.length,1),K=z.entries,re=d(H),ie=V<2?void 0:arguments[1],fe=ie===void 0?ie:d(ie),ge=0;geK.key?1:-1}),z.updateURL()},forEach:function(z){for(var V=D(this).entries,K=w(z,arguments.length>1?arguments[1]:void 0),re=0,ie;re1?ct(arguments[1]):{})}}),m(X)){var lt=function(z){return g(this,te),new X(z,arguments.length>1?ct(arguments[1]):{})};te.constructor=lt,lt.prototype=te,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:lt})}}return zo={URLSearchParams:Le,getState:D},zo}var Dv;function km(){if(Dv)return Tv;Dv=1,yv();var e=de(),r=Ee(),t=xv(),n=le(),i=xr(),a=ue(),o=rr(),s=_t(),c=xt(),u=Me(),l=xm(),f=Pm(),h=on(),v=gv().codeAt,g=Am(),m=pr(),E=Mr(),w=Qa(),R=Mv(),O=Cr(),p=O.set,d=O.getterFor("URL"),S=R.URLSearchParams,y=R.getState,b=n.URL,C=n.TypeError,I=n.parseInt,k=Math.floor,L=Math.pow,B=a("".charAt),q=a(/./.exec),A=a([].join),N=a(1.1.toString),M=a([].pop),D=a([].push),$=a("".replace),J=a([].shift),X=a("".split),Z=a("".slice),te=a("".toLowerCase),se=a([].unshift),_e="Invalid authority",Pe="Invalid scheme",xe="Invalid host",pe="Invalid port",mr=/[a-z]/i,ar=/[\d+-.a-z]/i,yr=/\d/,Ke=/^0x/i,Wr=/^[0-7]+$/,ot=/^\d+$/,Ar=/^[\da-f]+$/i,zr=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Vr=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ft=/^[\u0000-\u0020]+/,st=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Kr=/[\t\n\r]/g,be,or=function(_){var U=X(_,"."),P,T,j,Q,W,we,Oe;if(U.length&&U[U.length-1]===""&&U.length--,P=U.length,P>4)return _;for(T=[],j=0;j1&&B(Q,0)==="0"&&(W=q(Ke,Q)?16:8,Q=Z(Q,W===8?1:2)),Q==="")we=0;else{if(!q(W===10?ot:W===8?Wr:Ar,Q))return _;we=I(Q,W)}D(T,we)}for(j=0;j=L(256,5-P))return null}else if(we>255)return null;for(Oe=M(T),j=0;j6))return;for(we=0;Ie();){if(Oe=null,we>0)if(Ie()==="."&&we<4)j++;else return;if(!q(yr,Ie()))return;for(;q(yr,Ie());){if(qe=I(Ie(),10),Oe===null)Oe=qe;else{if(Oe===0)return;Oe=Oe*10+qe}if(Oe>255)return;j++}U[P]=U[P]*256+Oe,we++,(we===2||we===4)&&P++}if(we!==4)return;break}else if(Ie()===":"){if(j++,!Ie())return}else if(Ie())return;U[P++]=Q}if(T!==null)for(Qe=P-T,P=7;P!==0&&Qe>0;)F=U[P],U[P--]=U[T+Qe-1],U[T+--Qe]=F;else if(P!==8)return;return U},G=function(_){for(var U=null,P=1,T=null,j=0,Q=0;Q<8;Q++)_[Q]!==0?(j>P&&(U=T,P=j),T=null,j=0):(T===null&&(T=Q),++j);return j>P?T:U},Y=function(_){var U,P,T,j;if(typeof _=="number"){for(U=[],P=0;P<4;P++)se(U,_%256),_=k(_/256);return A(U,".")}if(typeof _=="object"){for(U="",T=G(_),P=0;P<8;P++)j&&_[P]===0||(j&&(j=!1),T===P?(U+=P?":":"::",j=!0):(U+=N(_[P],16),P<7&&(U+=":")));return"["+U+"]"}return _},ne={},ae=l({},ne,{" ":1,'"':1,"<":1,">":1,"`":1}),ce=l({},ae,{"#":1,"?":1,"{":1,"}":1}),Je=l({},ce,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ae=function(_,U){var P=v(_,0);return P>32&&P<127&&!u(U,_)?_:encodeURIComponent(_)},Ge={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Le=function(_,U){var P;return _.length===2&&q(mr,B(_,0))&&((P=B(_,1))===":"||!U&&P==="|")},Ye=function(_){var U;return _.length>1&&Le(Z(_,0,2))&&(_.length===2||(U=B(_,2))==="/"||U==="\\"||U==="?"||U==="#")},ut=function(_){return _==="."||te(_)==="%2e"},Nt=function(_){return _=te(_),_===".."||_==="%2e."||_===".%2e"||_==="%2e%2e"},ct={},lt={},H={},z={},V={},K={},re={},ie={},fe={},ge={},Se={},Ne={},vr={},Os={},wh={},Cs={},ft={},dr={},Eh={},Yr={},br={},Ts=function(_,U,P){var T=m(_),j,Q,W;if(U){if(Q=this.parse(T),Q)throw new C(Q);this.searchParams=null}else{if(P!==void 0&&(j=new Ts(P,!0)),Q=this.parse(T,null,j),Q)throw new C(Q);W=y(new S),W.bindURL(this),this.searchParams=W}};Ts.prototype={type:"URL",parse:function(_,U,P){var T=this,j=U||ct,Q=0,W="",we=!1,Oe=!1,qe=!1,Qe,F,Ie,wr;for(_=m(_),U||(T.scheme="",T.username="",T.password="",T.host=null,T.port=null,T.path=[],T.query=null,T.fragment=null,T.cannotBeABaseURL=!1,_=$(_,Ft,""),_=$(_,st,"$1")),_=$(_,Kr,""),Qe=f(_);Q<=Qe.length;){switch(F=Qe[Q],j){case ct:if(F&&q(mr,F))W+=te(F),j=lt;else{if(U)return Pe;j=H;continue}break;case lt:if(F&&(q(ar,F)||F==="+"||F==="-"||F==="."))W+=te(F);else if(F===":"){if(U&&(T.isSpecial()!==u(Ge,W)||W==="file"&&(T.includesCredentials()||T.port!==null)||T.scheme==="file"&&!T.host))return;if(T.scheme=W,U){T.isSpecial()&&Ge[T.scheme]===T.port&&(T.port=null);return}W="",T.scheme==="file"?j=Os:T.isSpecial()&&P&&P.scheme===T.scheme?j=z:T.isSpecial()?j=ie:Qe[Q+1]==="/"?(j=V,Q++):(T.cannotBeABaseURL=!0,D(T.path,""),j=Eh)}else{if(U)return Pe;W="",j=H,Q=0;continue}break;case H:if(!P||P.cannotBeABaseURL&&F!=="#")return Pe;if(P.cannotBeABaseURL&&F==="#"){T.scheme=P.scheme,T.path=h(P.path),T.query=P.query,T.fragment="",T.cannotBeABaseURL=!0,j=br;break}j=P.scheme==="file"?Os:K;continue;case z:if(F==="/"&&Qe[Q+1]==="/")j=fe,Q++;else{j=K;continue}break;case V:if(F==="/"){j=ge;break}else{j=dr;continue}case K:if(T.scheme=P.scheme,F===be)T.username=P.username,T.password=P.password,T.host=P.host,T.port=P.port,T.path=h(P.path),T.query=P.query;else if(F==="/"||F==="\\"&&T.isSpecial())j=re;else if(F==="?")T.username=P.username,T.password=P.password,T.host=P.host,T.port=P.port,T.path=h(P.path),T.query="",j=Yr;else if(F==="#")T.username=P.username,T.password=P.password,T.host=P.host,T.port=P.port,T.path=h(P.path),T.query=P.query,T.fragment="",j=br;else{T.username=P.username,T.password=P.password,T.host=P.host,T.port=P.port,T.path=h(P.path),T.path.length--,j=dr;continue}break;case re:if(T.isSpecial()&&(F==="/"||F==="\\"))j=fe;else if(F==="/")j=ge;else{T.username=P.username,T.password=P.password,T.host=P.host,T.port=P.port,j=dr;continue}break;case ie:if(j=fe,F!=="/"||B(W,Q+1)!=="/")continue;Q++;break;case fe:if(F!=="/"&&F!=="\\"){j=ge;continue}break;case ge:if(F==="@"){we&&(W="%40"+W),we=!0,Ie=f(W);for(var _s=0;_s65535)return pe;T.port=T.isSpecial()&&xs===Ge[T.scheme]?null:xs,W=""}if(U)return;j=ft;continue}else return pe;break;case Os:if(T.scheme="file",F==="/"||F==="\\")j=wh;else if(P&&P.scheme==="file")switch(F){case be:T.host=P.host,T.path=h(P.path),T.query=P.query;break;case"?":T.host=P.host,T.path=h(P.path),T.query="",j=Yr;break;case"#":T.host=P.host,T.path=h(P.path),T.query=P.query,T.fragment="",j=br;break;default:Ye(A(h(Qe,Q),""))||(T.host=P.host,T.path=h(P.path),T.shortenPath()),j=dr;continue}else{j=dr;continue}break;case wh:if(F==="/"||F==="\\"){j=Cs;break}P&&P.scheme==="file"&&!Ye(A(h(Qe,Q),""))&&(Le(P.path[0],!0)?D(T.path,P.path[0]):T.host=P.host),j=dr;continue;case Cs:if(F===be||F==="/"||F==="\\"||F==="?"||F==="#"){if(!U&&Le(W))j=dr;else if(W===""){if(T.host="",U)return;j=ft}else{if(wr=T.parseHost(W),wr)return wr;if(T.host==="localhost"&&(T.host=""),U)return;W="",j=ft}continue}else W+=F;break;case ft:if(T.isSpecial()){if(j=dr,F!=="/"&&F!=="\\")continue}else if(!U&&F==="?")T.query="",j=Yr;else if(!U&&F==="#")T.fragment="",j=br;else if(F!==be&&(j=dr,F!=="/"))continue;break;case dr:if(F===be||F==="/"||F==="\\"&&T.isSpecial()||!U&&(F==="?"||F==="#")){if(Nt(W)?(T.shortenPath(),F!=="/"&&!(F==="\\"&&T.isSpecial())&&D(T.path,"")):ut(W)?F!=="/"&&!(F==="\\"&&T.isSpecial())&&D(T.path,""):(T.scheme==="file"&&!T.path.length&&Le(W)&&(T.host&&(T.host=""),W=B(W,0)+":"),D(T.path,W)),W="",T.scheme==="file"&&(F===be||F==="?"||F==="#"))for(;T.path.length>1&&T.path[0]==="";)J(T.path);F==="?"?(T.query="",j=Yr):F==="#"&&(T.fragment="",j=br)}else W+=Ae(F,ce);break;case Eh:F==="?"?(T.query="",j=Yr):F==="#"?(T.fragment="",j=br):F!==be&&(T.path[0]+=Ae(F,ne));break;case Yr:!U&&F==="#"?(T.fragment="",j=br):F!==be&&(F==="'"&&T.isSpecial()?T.query+="%27":F==="#"?T.query+="%23":T.query+=Ae(F,ne));break;case br:F!==be&&(T.fragment+=Ae(F,ae));break}Q++}},parseHost:function(_){var U,P,T;if(B(_,0)==="["){if(B(_,_.length-1)!=="]"||(U=Jr(Z(_,1,-1)),!U))return xe;this.host=U}else if(this.isSpecial()){if(_=g(_),q(zr,_)||(U=or(_),U===null))return xe;this.host=U}else{if(q(Vr,_))return xe;for(U="",P=f(_),T=0;T1?arguments[1]:void 0,j=p(P,new Ts(U,!1,T));r||(P.href=j.serialize(),P.origin=j.getOrigin(),P.protocol=j.getProtocol(),P.username=j.getUsername(),P.password=j.getPassword(),P.host=j.getHost(),P.hostname=j.getHostname(),P.port=j.getPort(),P.pathname=j.getPathname(),P.search=j.getSearch(),P.searchParams=j.getSearchParams(),P.hash=j.getHash())},Be=vt.prototype,Xe=function(_,U){return{get:function(){return d(this)[_]()},set:U&&function(P){return d(this)[U](P)},configurable:!0,enumerable:!0}};if(r&&(s(Be,"href",Xe("serialize","setHref")),s(Be,"origin",Xe("getOrigin")),s(Be,"protocol",Xe("getProtocol","setProtocol")),s(Be,"username",Xe("getUsername","setUsername")),s(Be,"password",Xe("getPassword","setPassword")),s(Be,"host",Xe("getHost","setHost")),s(Be,"hostname",Xe("getHostname","setHostname")),s(Be,"port",Xe("getPort","setPort")),s(Be,"pathname",Xe("getPathname","setPathname")),s(Be,"search",Xe("getSearch","setSearch")),s(Be,"searchParams",Xe("getSearchParams")),s(Be,"hash",Xe("getHash","setHash"))),o(Be,"toJSON",function(){return d(this).serialize()},{enumerable:!0}),o(Be,"toString",function(){return d(this).serialize()},{enumerable:!0}),b){var Rh=b.createObjectURL,Sh=b.revokeObjectURL;Rh&&o(vt,"createObjectURL",i(Rh,b)),Sh&&o(vt,"revokeObjectURL",i(Sh,b))}return E(vt,"URL"),e({global:!0,constructor:!0,forced:!t,sham:!r},{URL:vt}),Tv}var Bv;function jm(){return Bv||(Bv=1,km()),Cv}jm();var Hv={},$v;function Fm(){if($v)return Hv;$v=1;var e=de(),r=ke();return e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),Hv}Fm();var Gv={},Wv;function Nm(){return Wv||(Wv=1,Mv()),Gv}Nm();function Um(){var e;return typeof document<"u"&&typeof((e=document.createElement("a"))===null||e===void 0?void 0:e.download)<"u"}function Mm(){try{var e=new Blob(["dummy"],{type:"text/plain"}),r=URL.createObjectURL(e);return URL.revokeObjectURL(r),r&&typeof r=="string"&&r.startsWith("blob:")?{support:!0,error:null}:{support:!1,error:"Failed to check supportURLBlob: URL.createObjectURL returned an invalid URL (".concat(r,")")}}catch(n){var t=(n==null?void 0:n.message)||"unknown error";return{support:!1,error:"Failed to check supportURLBlob: ".concat(t)}}}function Dm(){return typeof FileReader<"u"}function zv(e,r){var t=document.createElement("a");t.href=e,t.download=r,t.rel="noopener",document.body.appendChild(t),t.click(),document.body.removeChild(t)}function Bm(e,r){var t=Mm(),n=t.support,i=t.error,a=Um(),o=Dm();if(!a)throw new Error("The device are not support link download");if(!e.length)throw new Error("The stream is empty");var s=new Blob(e);if(n){var c=URL.createObjectURL(s);return zv(c,r),setTimeout(function(){return URL.revokeObjectURL(c)},5e3),e}if(o){var u=new FileReader;return u.onload=function(){return zv(u.result,r)},u.readAsDataURL(s),e}throw new Error("The device are not support URL Blob and FileReader supportURLBlobError=".concat(i))}function Hm(e){return Vo.apply(this,arguments)}function Vo(){return Vo=qr(Ue().m(function e(r){var t,n,i,a,o,s,c,u,l,f;return Ue().w(function(h){for(;;)switch(h.n){case 0:if(t=r.interactionId,n=t===void 0?"":t,i=r.token,a=i===void 0?"":i,o=r.timezone,s=o===void 0?"":o,c=r.fileName,u=c===void 0?"unknown.txt":c,n){h.n=1;break}throw new Error("Interaction ID is required");case 1:if(a){h.n=2;break}throw new Error("Token is required");case 2:return l="/cds/interactions/".concat(n,"/messages/transcript"),h.n=3,qt.current.getDownload(l,{params:{timezone:s},headers:{Authorization:"Bearer ".concat(a)}});case 3:if(f=h.v,f!=null&&f.data){h.n=4;break}throw new Error("Failed to download response is empty");case 4:return h.a(2,Bm([f.data],u))}},e)})),Vo.apply(this,arguments)}var $m=["sender"];function Gm(){var e=null,r=function(a){var o,s,c,u,l,f,h,v,g,m,E,w,R,O,p;(o=e)===null||o===void 0||o.register(ve.Methods.FrameReady,function(){var d;a==null||(d=a.onFrameReady)===null||d===void 0||d.call(a)}),(s=e)===null||s===void 0||s.register(ve.Methods.FrameResize,function(d){var S;a==null||(S=a.widgetFrame)===null||S===void 0||S.resize(d)}),(c=e)===null||c===void 0||c.register(ve.Methods.Maximize,function(){var d;a==null||(d=a.widgetOpen)===null||d===void 0||d.call(a)}),(u=e)===null||u===void 0||u.register(ve.Methods.Minimize,function(){var d;a==null||(d=a.widgetClose)===null||d===void 0||d.call(a)}),(l=e)===null||l===void 0||l.register(ve.Methods.GetAllConfig,function(){return Fe.getAllConfig()}),(f=e)===null||f===void 0||f.register(ve.Methods.GetCredentials,function(d){return Om(d)}),(h=e)===null||h===void 0||h.register(ve.Methods.SetBadge,function(d){var S;a==null||(S=a.widgetTrigger)===null||S===void 0||S.setBadge(d)}),(v=e)===null||v===void 0||v.register(ve.Methods.GetTdAccessToken,function(){return Sm()}),(g=e)===null||g===void 0||g.register(ve.Methods.DownloadTranscript,function(){var d=qr(Ue().m(function S(y){return Ue().w(function(b){for(;;)switch(b.n){case 0:return b.n=1,Hm(y);case 1:return b.a(2,!0)}},S)}));return function(S){return d.apply(this,arguments)}}()),(m=e)===null||m===void 0||m.register(ve.Methods.ConversationStart,function(){var d;a==null||(d=a.onConversationStart)===null||d===void 0||d.call(a)}),(E=e)===null||E===void 0||E.register(ve.Methods.ConversationEnded,function(){var d;a==null||(d=a.onConversationEnded)===null||d===void 0||d.call(a)}),(w=e)===null||w===void 0||w.register(ve.Methods.ConversationClear,function(){var d;a==null||(d=a.onConversationClear)===null||d===void 0||d.call(a)}),(R=e)===null||R===void 0||R.register(ve.Methods.FloatFrameOpen,function(){var d;a==null||(d=a.onFloatFrameOpen)===null||d===void 0||d.call(a)}),(O=e)===null||O===void 0||O.register(ve.Methods.FloatFrameClose,function(){var d;a==null||(d=a.onFloatFrameClose)===null||d===void 0||d.call(a)}),(p=e)===null||p===void 0||p.register(ve.Methods.JumpTo,function(d){var S;a==null||(S=a.onJumpTo)===null||S===void 0||S.call(a,d)})},t=function(a){var o=a.sender,s=Ut(a,$m);e=new rv({name:"SDK",sender:o,topic:ve.Topic,debug:Fe.debug}),r(s)},n=function(){var a;(a=e)===null||a===void 0||a.destroy(),e=null};return{bootstrap:t,destroy:n,get current(){return e}}}var Vv={},Ko,Kv;function Jo(){if(Kv)return Ko;Kv=1;var e=xr(),r=ue(),t=Dt(),n=jr(),i=wt(),a=gc(),o=r([].push),s=function(c){var u=c===1,l=c===2,f=c===3,h=c===4,v=c===6,g=c===7,m=c===5||v;return function(E,w,R,O){for(var p=n(E),d=t(p),S=i(d),y=e(w,R),b=0,C=O||a,I=u?C(E,S):l||g?C(E,0):void 0,k,L;S>b;b++)if((m||b in d)&&(k=d[b],L=y(k,b,p),c))if(u)I[b]=L;else if(L)switch(c){case 3:return!0;case 5:return k;case 6:return b;case 2:o(I,k)}else switch(c){case 4:return!1;case 7:o(I,k)}return v?-1:f||h?h:I}};return Ko={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},Ko}var Jv;function Wm(){if(Jv)return Vv;Jv=1;var e=de(),r=Jo().filter,t=ea(),n=t("filter");return e({target:"Array",proto:!0,forced:!n},{filter:function(a){return r(this,a,arguments.length>1?arguments[1]:void 0)}}),Vv}Wm();function Yv(){var e=Fe.getAllConfig(),r=e.appProps;return"?"+["touchpointId=".concat(r==null?void 0:r.touchpointId),r!=null&&r.debug?"debug=1":""].filter(Boolean).join("&")}function Xv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e?e.startsWith("http")?"".concat(e).concat(Tr.tdChatSdk):"".concat(Wc,"://").concat(e).concat(Tr.tdChatSdk):""}function Qv(){var e=Fe.getAllConfig(),r=e.appProps,t=(r==null?void 0:r.region)||"";return t&&(pa==null?void 0:pa[t])||"https://talkdeskchatsdk.talkdeskapp.com"}var Zv={},ed;function zm(){if(ed)return Zv;ed=1;var e=de(),r=Jo().map,t=ea(),n=t("map");return e({target:"Array",proto:!0,forced:!n},{map:function(a){return r(this,a,arguments.length>1?arguments[1]:void 0)}}),Zv}zm();var rd={},Yo,td;function Vm(){if(td)return Yo;td=1;var e=le(),r=oe(),t=e.RegExp,n=!r(function(){var i=!0;try{t(".","d")}catch{i=!1}var a={},o="",s=i?"dgimsy":"gimsy",c=function(h,v){Object.defineProperty(a,h,{get:function(){return o+=v,!0}})},u={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(u.hasIndices="d");for(var l in u)c(l,u[l]);var f=Object.getOwnPropertyDescriptor(t.prototype,"flags").get.call(a);return f!==s||o!==s});return Yo={correct:n},Yo}var Xo,nd;function id(){if(nd)return Xo;nd=1;var e=ze();return Xo=function(){var r=e(this),t="";return r.hasIndices&&(t+="d"),r.global&&(t+="g"),r.ignoreCase&&(t+="i"),r.multiline&&(t+="m"),r.dotAll&&(t+="s"),r.unicode&&(t+="u"),r.unicodeSets&&(t+="v"),r.sticky&&(t+="y"),t},Xo}var Qo,ad;function Km(){if(ad)return Qo;ad=1;var e=ke(),r=Me(),t=gt(),n=Vm(),i=id(),a=RegExp.prototype;return Qo=n.correct?function(o){return o.flags}:function(o){return!n.correct&&t(a,o)&&!r(o,"flags")?e(i,o):o.flags},Qo}var od;function Jm(){if(od)return rd;od=1;var e=bt().PROPER,r=rr(),t=ze(),n=pr(),i=oe(),a=Km(),o="toString",s=RegExp.prototype,c=s[o],u=i(function(){return c.call({source:"a",flags:"b"})!=="/a/b"}),l=e&&c.name!==o;return(u||l)&&r(s,o,function(){var h=t(this),v=n(h.source),g=n(a(h));return"/"+v+"/"+g},{unsafe:!0}),rd}Jm();function Zo(e){try{return!isNaN(+e)}catch{return!1}}function sd(e){if(!e)return!1;try{var r=e.toString().split(".").map(function(o){return o.trim()}).filter(Boolean);if(r.length!==3)return!1;var t=qh(r,3),n=t[0],i=t[1],a=t[2];return Zo(n)&&Zo(i)&&Zo(a)}catch{return!1}}var Ym=function(){var r=Fe.getAllConfig(),t=r.touchpoint,n=r.appProps,i=Xv((n==null?void 0:n.proxyHost)||""),a=Yv();if(n!=null&&n.enableTestProxyHost)return"".concat("https://talkdeskchatsdk.talkdeskapp.com","/v2/widget/latest/float.html").concat(a);var o=(t==null?void 0:t.release_version)||"",s=sd(o);return"".concat(i||Qv(),"/v2/widget/").concat(s?o:"latest","/float.html").concat(a)},Xm=function(){var r=Fe.getAllConfig(),t=r.touchpoint,n=r.appProps,i=Xv((n==null?void 0:n.proxyHost)||""),a=Yv();if(n!=null&&n.enableTestProxyHost)return"".concat("https://talkdeskchatsdk.talkdeskapp.com","/v2/widget/latest/index.html").concat(a);var o=(t==null?void 0:t.release_version)||"",s=sd(o);return"".concat(i||Qv(),"/v2/widget/").concat(s?o:"latest","/index.html").concat(a)},ud={},es,cd;function Qm(){if(cd)return es;cd=1;var e=oe(),r=le(),t=r.RegExp,n=e(function(){var o=t("a","y");return o.lastIndex=2,o.exec("abcd")!==null}),i=n||e(function(){return!t("a","y").sticky}),a=n||e(function(){var o=t("^r","gy");return o.lastIndex=2,o.exec("str")!==null});return es={BROKEN_CARET:a,MISSED_STICKY:i,UNSUPPORTED_Y:n},es}var rs,ld;function Zm(){if(ld)return rs;ld=1;var e=oe(),r=le(),t=r.RegExp;return rs=e(function(){var n=t(".","s");return!(n.dotAll&&n.test(` `)&&n.flags==="s")}),rs}var ts,fd;function e0(){if(fd)return ts;fd=1;var e=oe(),r=le(),t=r.RegExp;return ts=e(function(){var n=t("(?b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$c")!=="bc"}),ts}var ns,vd;function r0(){if(vd)return ns;vd=1;var e=ke(),r=ue(),t=pr(),n=id(),i=Qm(),a=ni(),o=rt(),s=Cr().get,c=Zm(),u=e0(),l=a("native-string-replace",String.prototype.replace),f=RegExp.prototype.exec,h=f,v=r("".charAt),g=r("".indexOf),m=r("".replace),E=r("".slice),w=function(){var d=/a/,S=/b*/g;return e(f,d,"a"),e(f,S,"a"),d.lastIndex!==0||S.lastIndex!==0}(),R=i.BROKEN_CARET,O=/()??/.exec("")[1]!==void 0,p=w||O||R||c||u;return p&&(h=function(S){var y=this,b=s(y),C=t(S),I=b.raw,k,L,B,q,A,N,M;if(I)return I.lastIndex=y.lastIndex,k=e(h,I,C),y.lastIndex=I.lastIndex,k;var D=b.groups,$=R&&y.sticky,J=e(n,y),X=y.source,Z=0,te=C;if($&&(J=m(J,"y",""),g(J,"g")===-1&&(J+="g"),te=E(C,y.lastIndex),y.lastIndex>0&&(!y.multiline||y.multiline&&v(C,y.lastIndex-1)!==` `)&&(X="(?: "+X+")",te=" "+te,Z++),L=new RegExp("^(?:"+X+")",J)),O&&(L=new RegExp("^"+X+"$(?!\\s)",J)),w&&(B=y.lastIndex),q=e(f,$?L:y,te),$?q?(q.input=E(q.input,Z),q[0]=E(q[0],Z),q.index=y.lastIndex,y.lastIndex+=q[0].length):y.lastIndex=0:w&&q&&(y.lastIndex=y.global?q.index+q[0].length:B),O&&q&&q.length>1&&e(l,q[0],L,function(){for(A=1;A0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent,r=/googlebot/i.test(e),t=/bingbot/i.test(e),n=/baiduspider/i.test(e),i=/slackbot/i.test(e),a=/amazon-kendra/i.test(e),o=/facebookexternalhit/i.test(e);return r||t||n||i||a||o}var hd={},pd={},is={exports:{}},as={},gd;function i0(){if(gd)return as;gd=1;var e=Er(),r=Rr(),t=zt().f,n=on(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(o){try{return t(o)}catch{return n(i)}};return as.f=function(s){return i&&e(s)==="Window"?a(s):t(r(s))},as}var os,md;function a0(){if(md)return os;md=1;var e=oe();return os=e(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),os}var ss,yd;function o0(){if(yd)return ss;yd=1;var e=oe(),r=Te(),t=Er(),n=a0(),i=Object.isExtensible,a=e(function(){});return ss=a||n?function(s){return!r(s)||n&&t(s)==="ArrayBuffer"?!1:i?i(s):!0}:i,ss}var us,bd;function s0(){if(bd)return us;bd=1;var e=oe();return us=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),us}var wd;function Ed(){if(wd)return is.exports;wd=1;var e=de(),r=ue(),t=Wt(),n=Te(),i=Me(),a=er().f,o=zt(),s=i0(),c=o0(),u=si(),l=s0(),f=!1,h=u("meta"),v=0,g=function(p){a(p,h,{value:{objectID:"O"+v++,weakData:{}}})},m=function(p,d){if(!n(p))return typeof p=="symbol"?p:(typeof p=="string"?"S":"P")+p;if(!i(p,h)){if(!c(p))return"F";if(!d)return"E";g(p)}return p[h].objectID},E=function(p,d){if(!i(p,h)){if(!c(p))return!0;if(!d)return!1;g(p)}return p[h].weakData},w=function(p){return l&&f&&c(p)&&!i(p,h)&&g(p),p},R=function(){O.enable=function(){},f=!0;var p=o.f,d=r([].splice),S={};S[h]=1,p(S).length&&(o.f=function(y){for(var b=p(y),C=0,I=b.length;C1?arguments[1]:void 0),L;L=L?L.next:I.first;)for(k(L.value,L.key,this);L&&L.removed;)L=L.previous},has:function(C){return!!y(this,C)}}),t(p,w?{get:function(C){var I=y(this,C);return I&&I.value},set:function(C,I){return S(this,C===0?0:C,I)}}:{add:function(C){return S(this,C=C===0?0:C,C)}}),l&&r(p,"size",{configurable:!0,get:function(){return d(this).size}}),O},setStrong:function(m,E,w){var R=E+" Iterator",O=g(E),p=g(R);s(m,E,function(d,S){v(this,{type:R,target:d,state:O(d),kind:S,last:null})},function(){for(var d=p(this),S=d.kind,y=d.last;y&&y.removed;)y=y.previous;return!d.target||!(d.last=y=y?y.next:d.state.first)?(d.target=null,c(void 0,!0)):c(S==="keys"?y.key:S==="values"?y.value:[y.key,y.value],!1)},w?"entries":"values",!w,!0),u(E)}},fs}var xd;function u0(){if(xd)return pd;xd=1;var e=Cd(),r=_d();return e("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},r),pd}var Id;function c0(){return Id||(Id=1,u0()),hd}c0();var Pd={},vs,Ad;function l0(){if(Ad)return vs;Ad=1;var e=Jo().forEach,r=Ec(),t=r("forEach");return vs=t?[].forEach:function(i){return e(this,i,arguments.length>1?arguments[1]:void 0)},vs}var Ld;function f0(){if(Ld)return Pd;Ld=1;var e=le(),r=Ev(),t=Sv(),n=l0(),i=yt(),a=function(s){if(s&&s.forEach!==n)try{i(s,"forEach",n)}catch{s.forEach=n}};for(var o in r)r[o]&&a(e[o]&&e[o].prototype);return a(t),Pd}f0();var ds=function(){var e=!1,r="",t=null,n=new Set,i=function(){t&&(clearInterval(t),t=null)},a=function(l){n.forEach(function(f){return f(l)})},o=function(l){i(),t=setInterval(function(){var f=window.location.href;f!==r&&(r=f,a(r))},l)},s=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location.href,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3;e||(e=!0,r=l,o(f))},c=function(){i(),n.clear(),r="",e=!1};return{start:s,stop:c,onChange:function(l){return n.add(l),function(){n.delete(l)}},get current(){return r},get isRunning(){return e}}}(),qd={},kd;function v0(){if(kd)return qd;kd=1;var e=Ee(),r=bt().EXISTS,t=ue(),n=_t(),i=Function.prototype,a=t(i.toString),o=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=t(o.exec),c="name";return e&&!r&&n(i,c,{configurable:!0,get:function(){try{return s(o,a(this))[1]}catch{return""}}}),qd}v0();var jd={},hs,Fd;function d0(){if(Fd)return hs;Fd=1;var e=ue(),r=kr(),t=pr(),n=/"/g,i=e("".replace);return hs=function(a,o,s,c){var u=t(r(a)),l="<"+o;return s!==""&&(l+=" "+s+'="'+i(t(c),n,""")+'"'),l+">"+u+""},hs}var ps,Nd;function h0(){if(Nd)return ps;Nd=1;var e=oe();return ps=function(r){return e(function(){var t=""[r]('"');return t!==t.toLowerCase()||t.split('"').length>3})},ps}var Ud;function p0(){if(Ud)return jd;Ud=1;var e=de(),r=d0(),t=h0();return e({target:"String",proto:!0,forced:t("anchor")},{anchor:function(i){return r(this,"a","name",i)}}),jd}p0();const vn=Math.min,Dr=Math.max,dn=Math.round,hn=Math.floor,cr=e=>({x:e,y:e}),g0={left:"right",right:"left",bottom:"top",top:"bottom"},m0={start:"end",end:"start"};function Md(e,r,t){return Dr(e,vn(r,t))}function pn(e,r){return typeof e=="function"?e(r):e}function Br(e){return e.split("-")[0]}function gn(e){return e.split("-")[1]}function Dd(e){return e==="x"?"y":"x"}function Bd(e){return e==="y"?"height":"width"}function Hr(e){return["top","bottom"].includes(Br(e))?"y":"x"}function Hd(e){return Dd(Hr(e))}function y0(e,r,t){t===void 0&&(t=!1);const n=gn(e),i=Hd(e),a=Bd(i);let o=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(o=mn(o)),[o,mn(o)]}function b0(e){const r=mn(e);return[gs(e),r,gs(r)]}function gs(e){return e.replace(/start|end/g,r=>m0[r])}function w0(e,r,t){const n=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return t?r?i:n:r?n:i;case"left":case"right":return r?a:o;default:return[]}}function E0(e,r,t,n){const i=gn(e);let a=w0(Br(e),t==="start",n);return i&&(a=a.map(o=>o+"-"+i),r&&(a=a.concat(a.map(gs)))),a}function mn(e){return e.replace(/left|right|bottom|top/g,r=>g0[r])}function R0(e){return{top:0,right:0,bottom:0,left:0,...e}}function S0(e){return typeof e!="number"?R0(e):{top:e,right:e,bottom:e,left:e}}function yn(e){const{x:r,y:t,width:n,height:i}=e;return{width:n,height:i,top:t,left:r,right:r+n,bottom:t+i,x:r,y:t}}function $d(e,r,t){let{reference:n,floating:i}=e;const a=Hr(r),o=Hd(r),s=Bd(o),c=Br(r),u=a==="y",l=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,h=n[s]/2-i[s]/2;let v;switch(c){case"top":v={x:l,y:n.y-i.height};break;case"bottom":v={x:l,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:f};break;case"left":v={x:n.x-i.width,y:f};break;default:v={x:n.x,y:n.y}}switch(gn(r)){case"start":v[o]-=h*(t&&u?-1:1);break;case"end":v[o]+=h*(t&&u?-1:1);break}return v}const O0=async(e,r,t)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:o}=t,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(r));let u=await o.getElementRects({reference:e,floating:r,strategy:i}),{x:l,y:f}=$d(u,n,c),h=n,v={},g=0;for(let m=0;mA<=0)){var k,L;const A=(((k=a.flip)==null?void 0:k.index)||0)+1,N=y[A];if(N){var B;const D=f==="alignment"?R!==Hr(N):!1,$=((B=I[0])==null?void 0:B.overflows[0])>0;if(!D||$)return{data:{index:A,overflows:I},reset:{placement:N}}}let M=(L=I.filter(D=>D.overflows[0]<=0).sort((D,$)=>D.overflows[1]-$.overflows[1])[0])==null?void 0:L.placement;if(!M)switch(v){case"bestFit":{var q;const D=(q=I.filter($=>{if(S){const J=Hr($.placement);return J===R||J==="y"}return!0}).map($=>[$.placement,$.overflows.filter(J=>J>0).reduce((J,X)=>J+X,0)]).sort(($,J)=>$[1]-J[1])[0])==null?void 0:q[0];D&&(M=D);break}case"initialPlacement":M=s;break}if(i!==M)return{reset:{placement:M}}}return{}}}};async function T0(e,r){const{placement:t,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Br(t),s=gn(t),c=Hr(t)==="y",u=["left","top"].includes(o)?-1:1,l=a&&c?-1:1,f=pn(r,e);let{mainAxis:h,crossAxis:v,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof g=="number"&&(v=s==="end"?g*-1:g),c?{x:v*l,y:h*u}:{x:h*u,y:v*l}}const _0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var t,n;const{x:i,y:a,placement:o,middlewareData:s}=r,c=await T0(r,e);return o===((t=s.offset)==null?void 0:t.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},x0=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:t,y:n,placement:i}=r,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:E=>{let{x:w,y:R}=E;return{x:w,y:R}}},...c}=pn(e,r),u={x:t,y:n},l=await Gd(r,c),f=Hr(Br(i)),h=Dd(f);let v=u[h],g=u[f];if(a){const E=h==="y"?"top":"left",w=h==="y"?"bottom":"right",R=v+l[E],O=v-l[w];v=Md(R,v,O)}if(o){const E=f==="y"?"top":"left",w=f==="y"?"bottom":"right",R=g+l[E],O=g-l[w];g=Md(R,g,O)}const m=s.fn({...r,[h]:v,[f]:g});return{...m,data:{x:m.x-t,y:m.y-n,enabled:{[h]:a,[f]:o}}}}}};function bn(){return typeof window<"u"}function tt(e){return Wd(e)?(e.nodeName||"").toLowerCase():"#document"}function Ve(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function lr(e){var r;return(r=(Wd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function Wd(e){return bn()?e instanceof Node||e instanceof Ve(e).Node:!1}function nr(e){return bn()?e instanceof Element||e instanceof Ve(e).Element:!1}function fr(e){return bn()?e instanceof HTMLElement||e instanceof Ve(e).HTMLElement:!1}function zd(e){return!bn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ve(e).ShadowRoot}function kt(e){const{overflow:r,overflowX:t,overflowY:n,display:i}=ir(e);return/auto|scroll|overlay|hidden|clip/.test(r+n+t)&&!["inline","contents"].includes(i)}function I0(e){return["table","td","th"].includes(tt(e))}function wn(e){return[":popover-open",":modal"].some(r=>{try{return e.matches(r)}catch{return!1}})}function ms(e){const r=ys(),t=nr(e)?ir(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!r&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!r&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(t.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(t.contain||"").includes(n))}function P0(e){let r=Ir(e);for(;fr(r)&&!nt(r);){if(ms(r))return r;if(wn(r))return null;r=Ir(r)}return null}function ys(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nt(e){return["html","body","#document"].includes(tt(e))}function ir(e){return Ve(e).getComputedStyle(e)}function En(e){return nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ir(e){if(tt(e)==="html")return e;const r=e.assignedSlot||e.parentNode||zd(e)&&e.host||lr(e);return zd(r)?r.host:r}function Vd(e){const r=Ir(e);return nt(r)?e.ownerDocument?e.ownerDocument.body:e.body:fr(r)&&kt(r)?r:Vd(r)}function jt(e,r,t){var n;r===void 0&&(r=[]),t===void 0&&(t=!0);const i=Vd(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),o=Ve(i);if(a){const s=bs(o);return r.concat(o,o.visualViewport||[],kt(i)?i:[],s&&t?jt(s):[])}return r.concat(i,jt(i,[],t))}function bs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kd(e){const r=ir(e);let t=parseFloat(r.width)||0,n=parseFloat(r.height)||0;const i=fr(e),a=i?e.offsetWidth:t,o=i?e.offsetHeight:n,s=dn(t)!==a||dn(n)!==o;return s&&(t=a,n=o),{width:t,height:n,$:s}}function ws(e){return nr(e)?e:e.contextElement}function it(e){const r=ws(e);if(!fr(r))return cr(1);const t=r.getBoundingClientRect(),{width:n,height:i,$:a}=Kd(r);let o=(a?dn(t.width):t.width)/n,s=(a?dn(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const A0=cr(0);function Jd(e){const r=Ve(e);return!ys()||!r.visualViewport?A0:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function L0(e,r,t){return r===void 0&&(r=!1),!t||r&&t!==Ve(e)?!1:r}function $r(e,r,t,n){r===void 0&&(r=!1),t===void 0&&(t=!1);const i=e.getBoundingClientRect(),a=ws(e);let o=cr(1);r&&(n?nr(n)&&(o=it(n)):o=it(e));const s=L0(a,t,n)?Jd(a):cr(0);let c=(i.left+s.x)/o.x,u=(i.top+s.y)/o.y,l=i.width/o.x,f=i.height/o.y;if(a){const h=Ve(a),v=n&&nr(n)?Ve(n):n;let g=h,m=bs(g);for(;m&&n&&v!==g;){const E=it(m),w=m.getBoundingClientRect(),R=ir(m),O=w.left+(m.clientLeft+parseFloat(R.paddingLeft))*E.x,p=w.top+(m.clientTop+parseFloat(R.paddingTop))*E.y;c*=E.x,u*=E.y,l*=E.x,f*=E.y,c+=O,u+=p,g=Ve(m),m=bs(g)}}return yn({width:l,height:f,x:c,y:u})}function Es(e,r){const t=En(e).scrollLeft;return r?r.left+t:$r(lr(e)).left+t}function Yd(e,r,t){t===void 0&&(t=!1);const n=e.getBoundingClientRect(),i=n.left+r.scrollLeft-(t?0:Es(e,n)),a=n.top+r.scrollTop;return{x:i,y:a}}function q0(e){let{elements:r,rect:t,offsetParent:n,strategy:i}=e;const a=i==="fixed",o=lr(n),s=r?wn(r.floating):!1;if(n===o||s&&a)return t;let c={scrollLeft:0,scrollTop:0},u=cr(1);const l=cr(0),f=fr(n);if((f||!f&&!a)&&((tt(n)!=="body"||kt(o))&&(c=En(n)),fr(n))){const v=$r(n);u=it(n),l.x=v.x+n.clientLeft,l.y=v.y+n.clientTop}const h=o&&!f&&!a?Yd(o,c,!0):cr(0);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-c.scrollLeft*u.x+l.x+h.x,y:t.y*u.y-c.scrollTop*u.y+l.y+h.y}}function k0(e){return Array.from(e.getClientRects())}function j0(e){const r=lr(e),t=En(e),n=e.ownerDocument.body,i=Dr(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),a=Dr(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight);let o=-t.scrollLeft+Es(e);const s=-t.scrollTop;return ir(n).direction==="rtl"&&(o+=Dr(r.clientWidth,n.clientWidth)-i),{width:i,height:a,x:o,y:s}}function F0(e,r){const t=Ve(e),n=lr(e),i=t.visualViewport;let a=n.clientWidth,o=n.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;const u=ys();(!u||u&&r==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function N0(e,r){const t=$r(e,!0,r==="fixed"),n=t.top+e.clientTop,i=t.left+e.clientLeft,a=fr(e)?it(e):cr(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,u=n*a.y;return{width:o,height:s,x:c,y:u}}function Xd(e,r,t){let n;if(r==="viewport")n=F0(e,t);else if(r==="document")n=j0(lr(e));else if(nr(r))n=N0(r,t);else{const i=Jd(e);n={x:r.x-i.x,y:r.y-i.y,width:r.width,height:r.height}}return yn(n)}function Qd(e,r){const t=Ir(e);return t===r||!nr(t)||nt(t)?!1:ir(t).position==="fixed"||Qd(t,r)}function U0(e,r){const t=r.get(e);if(t)return t;let n=jt(e,[],!1).filter(s=>nr(s)&&tt(s)!=="body"),i=null;const a=ir(e).position==="fixed";let o=a?Ir(e):e;for(;nr(o)&&!nt(o);){const s=ir(o),c=ms(o);!c&&s.position==="fixed"&&(i=null),(a?!c&&!i:!c&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||kt(o)&&!c&&Qd(e,o))?n=n.filter(l=>l!==o):i=s,o=Ir(o)}return r.set(e,n),n}function M0(e){let{element:r,boundary:t,rootBoundary:n,strategy:i}=e;const o=[...t==="clippingAncestors"?wn(r)?[]:U0(r,this._c):[].concat(t),n],s=o[0],c=o.reduce((u,l)=>{const f=Xd(r,l,i);return u.top=Dr(f.top,u.top),u.right=vn(f.right,u.right),u.bottom=vn(f.bottom,u.bottom),u.left=Dr(f.left,u.left),u},Xd(r,s,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function D0(e){const{width:r,height:t}=Kd(e);return{width:r,height:t}}function B0(e,r,t){const n=fr(r),i=lr(r),a=t==="fixed",o=$r(e,!0,a,r);let s={scrollLeft:0,scrollTop:0};const c=cr(0);function u(){c.x=Es(i)}if(n||!n&&!a)if((tt(r)!=="body"||kt(i))&&(s=En(r)),n){const v=$r(r,!0,a,r);c.x=v.x+r.clientLeft,c.y=v.y+r.clientTop}else i&&u();a&&!n&&i&&u();const l=i&&!n&&!a?Yd(i,s):cr(0),f=o.left+s.scrollLeft-c.x-l.x,h=o.top+s.scrollTop-c.y-l.y;return{x:f,y:h,width:o.width,height:o.height}}function Rs(e){return ir(e).position==="static"}function Zd(e,r){if(!fr(e)||ir(e).position==="fixed")return null;if(r)return r(e);let t=e.offsetParent;return lr(e)===t&&(t=t.ownerDocument.body),t}function eh(e,r){const t=Ve(e);if(wn(e))return t;if(!fr(e)){let i=Ir(e);for(;i&&!nt(i);){if(nr(i)&&!Rs(i))return i;i=Ir(i)}return t}let n=Zd(e,r);for(;n&&I0(n)&&Rs(n);)n=Zd(n,r);return n&&nt(n)&&Rs(n)&&!ms(n)?t:n||P0(e)||t}const H0=async function(e){const r=this.getOffsetParent||eh,t=this.getDimensions,n=await t(e.floating);return{reference:B0(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $0(e){return ir(e).direction==="rtl"}const G0={convertOffsetParentRelativeRectToViewportRelativeRect:q0,getDocumentElement:lr,getClippingRect:M0,getOffsetParent:eh,getElementRects:H0,getClientRects:k0,getDimensions:D0,getScale:it,isElement:nr,isRTL:$0};function rh(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function W0(e,r){let t=null,n;const i=lr(e);function a(){var s;clearTimeout(n),(s=t)==null||s.disconnect(),t=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:l,top:f,width:h,height:v}=u;if(s||r(),!h||!v)return;const g=hn(f),m=hn(i.clientWidth-(l+h)),E=hn(i.clientHeight-(f+v)),w=hn(l),O={rootMargin:-g+"px "+-m+"px "+-E+"px "+-w+"px",threshold:Dr(0,vn(1,c))||1};let p=!0;function d(S){const y=S[0].intersectionRatio;if(y!==c){if(!p)return o();y?o(!1,y):n=setTimeout(()=>{o(!1,1e-7)},1e3)}y===1&&!rh(u,e.getBoundingClientRect())&&o(),p=!1}try{t=new IntersectionObserver(d,{...O,root:i.ownerDocument})}catch{t=new IntersectionObserver(d,O)}t.observe(e)}return o(!0),a}function z0(e,r,t,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=ws(e),l=i||a?[...u?jt(u):[],...jt(r)]:[];l.forEach(w=>{i&&w.addEventListener("scroll",t,{passive:!0}),a&&w.addEventListener("resize",t)});const f=u&&s?W0(u,t):null;let h=-1,v=null;o&&(v=new ResizeObserver(w=>{let[R]=w;R&&R.target===u&&v&&(v.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var O;(O=v)==null||O.observe(r)})),t()}),u&&!c&&v.observe(u),v.observe(r));let g,m=c?$r(e):null;c&&E();function E(){const w=$r(e);m&&!rh(m,w)&&t(),m=w,g=requestAnimationFrame(E)}return t(),()=>{var w;l.forEach(R=>{i&&R.removeEventListener("scroll",t),a&&R.removeEventListener("resize",t)}),f==null||f(),(w=v)==null||w.disconnect(),v=null,c&&cancelAnimationFrame(g)}}const V0=_0,th=x0,K0=C0,J0=(e,r,t)=>{const n=new Map,i={platform:G0,...t},a={...i.platform,_c:n};return O0(e,r,{...i,platform:a})};function nh(e){var r=e.name,t=e.computePositionConfig,n=e.onUpdate,i=!1,a=null,o=null,s=null,c=function(){var E;(E=s)===null||E===void 0||E(),s=null},u=function(E){i=E,E||(c(),h(),a=null,o=null)},l=function(E){a=E},f=function(E){o=E},h=function(){o&&(o.style.left="",o.style.top="")},v=function(){if(!i||!a||!o)return!1;c(),s=z0(a,o,function(){a&&o&&J0(a,o,t).then(function(E){var w=E.x,R=E.y;a&&o&&(n==null||n({anchor:a,popup:o,x:w,y:R}))}).catch(function(E){console.warn("Failed to [".concat(r,"] in computePosition:"),E)})})},g=function(){u(!1)};return{setEnable:u,setAnchor:l,setPopup:f,update:v,destroy:g}}var at=nh({name:"window frame with trigger window span",computePositionConfig:{placement:"top",strategy:"fixed",middleware:[th({padding:{left:0,top:0,right:20,bottom:0}})]},onUpdate:function(r){var t=r.x,n=r.y,i=r.popup,a=r.anchor,o=a.offsetHeight;i.style.left="".concat(t<=0?0:t,"px"),i.style.top="".concat(n<=0?0:n+o,"px")}}),Pr=nh({name:"float frame with trigger button",computePositionConfig:{placement:"top-end",strategy:"fixed",middleware:[K0(),th({padding:10}),V0(12)]},onUpdate:function(r){var t=r.x,n=r.y,i=r.popup;i.style.left="".concat(t,"px"),i.style.top="".concat(n,"px")}}),Y0=function(r){var t=r.triggerVisible,n=r.windowFrameAnchor,i=r.floatFrameAnchor;at.setEnable(t),at.setAnchor(n),at.update(),Pr.setEnable(t),Pr.setAnchor(i),Pr.update()},X0=function(r){Pr.update(),["moveEnded","reset"].indexOf(r)!==-1&&at.update()},Gr=function(){function e(r){Ps(this,e),hr(this,"current",void 0),this.current=r}return Ls(e,null,[{key:"create",value:function(t){return new e(t)}},{key:"empty",value:function(){return new e(null)}}])}();function Q0(e,r,t,n){try{return e==null?void 0:e.apply(void 0,kh(t))}catch(i){console.error('An error occurred in "'.concat(r,'" callback.'),i)}}var De=function(){var e={onOpen:Gr.empty(),onClose:Gr.empty(),onOpenWebchat:Gr.empty(),onCloseWebchat:Gr.empty(),onConversationStart:Gr.empty(),onConversationEnded:Gr.empty(),onConversationClear:Gr.empty()},r=function(){Object.values(e).forEach(function(a){a.current=null})},t=function(a){var o=e[a];if(o.current){for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return ey(Ce(Ce({},ty(r)),e))}function iy(e){var r=[];return r.push(Dg(Z0,ry,e)),function(){r.forEach(function(t){return t()}),r.length=0}}function ay(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0,n=ny(r,t),i=Object.keys(n);if(i.length)return kl(e,n)}var ih=function(){var r=new Set,t=!1,n=null,i=function(){n&&(clearTimeout(n),n=null)},a=function(){i(),n=setTimeout(function(){r.forEach(function(u){return u()})},100)},o=function(){t||(window.addEventListener("resize",a),t=!0)},s=function(){t&&r.size===0&&(window.removeEventListener("resize",a),t=!1)};return o(),{on:function(u){r.add(u),o()},off:function(u){r.delete(u),s()},destroy:function(){i(),r.clear(),window.removeEventListener("resize",a),t=!1}}}();function ah(e){kl(e,{chatScreenWidth:window.innerWidth+"px",chatScreenHeight:window.innerHeight+"px"})}var oy="tdw-widget-wrapper";function sy(e){var r=e.root,t=e.className,n=t===void 0?null:t,i=document.createElement("div");return i.className=[oy,n].filter(Boolean).join(" "),r.appendChild(i),{element:i,destroy:function(){sp(r,i)&&r.removeChild(i),i.remove()}}}var oh={},Ss,sh;function uy(){if(sh)return Ss;sh=1;var e=ue();return Ss=e(1.1.valueOf),Ss}var uh;function cy(){if(uh)return oh;uh=1;var e=de(),r=Ze(),t=Ee(),n=le(),i=zl(),a=ue(),o=Vt(),s=Me(),c=Sd(),u=gt(),l=Wn(),f=Eu(),h=oe(),v=zt().f,g=Gt().f,m=er().f,E=uy(),w=Bc().trim,R="Number",O=n[R],p=i[R],d=O.prototype,S=n.TypeError,y=a("".slice),b=a("".charCodeAt),C=function(A){var N=f(A,"number");return typeof N=="bigint"?N:I(N)},I=function(A){var N=f(A,"number"),M,D,$,J,X,Z,te,se;if(l(N))throw new S("Cannot convert a Symbol value to a number");if(typeof N=="string"&&N.length>2){if(N=w(N),M=b(N,0),M===43||M===45){if(D=b(N,2),D===88||D===120)return NaN}else if(M===48){switch(b(N,1)){case 66:case 98:$=2,J=49;break;case 79:case 111:$=8,J=55;break;default:return+N}for(X=y(N,2),Z=X.length,te=0;teJ)return NaN;return parseInt(X,$)}}return+N},k=o(R,!O(" 0o1")||!O("0b1")||O("+0x1")),L=function(A){return u(d,A)&&h(function(){E(A)})},B=function(N){var M=arguments.length<1?0:O(C(N));return L(this)?c(Object(M),this,B):M};B.prototype=d,k&&!r&&(d.constructor=B),e({global:!0,constructor:!0,wrap:!0,forced:k},{Number:B});var q=function(A,N){for(var M=t?v(N):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),D=0,$;M.length>D;D++)s(N,$=M[D])&&!s(A,$)&&m(A,$,g(N,$))};return r&&p&&q(i[R],p),(k||r)&&q(i[R],O),oh}cy();function ly(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window,t=getComputedStyle(e),n=t==null?void 0:t.display;if(n==="none")return!1;var i=Number(t==null?void 0:t.opacity);if(isNaN(i)||i<=0)return!1;var a=Number(t==null?void 0:t.zIndex);if(isNaN(a)||a<0)return!1;var o=e.getBoundingClientRect();if(o.width<=0||o.height<=0)return!1;var s=o.right>0&&o.left0&&o.top0){var c=i();c.className=[ch,s>9?hy:""].filter(Boolean).join(" "),c.textContent=s>99?"99+":s.toString()}else n()};return{update:a,destroy:n,get element(){return t}}}var lh="talkdesk-chat-widget-trigger",gy="tdw-widget-trigger",my="Open chat widget",fh="button";function yy(e){var r=e.injector,t=e.enableVisibleCheck,n=t===void 0?!0:t,i=e.onClick,a=Hg(),o=document.createElement(fh),s=vy(),c=py({injector:o});o.id=lh,o.className=gy,o.ariaLabel=my,o.type=fh;var u=null,l=function(){var p;(p=u)===null||p===void 0||p.destroy(),u=null},f=function(){u||(u=new Bg(o,{onClick:function(){i==null||i()},onChange:function(d){X0(d)}}))},h=function(){var p=n?ly(o):!0;r.setAttribute("data-trigger-visible",p?"1":"0"),Y0({triggerVisible:p,windowFrameAnchor:o,floatFrameAnchor:o})},v=function(){return document.getElementById(lh)?!1:(r.appendChild(o),o.appendChild(s.element),o.onclick=function(){u||i==null||i()},h(),a.init(o,h,{callbackDelay:1e3/60,attributes:!0,attributeFilter:["style","class"]}),!0)},g=function(){var p=v();o.setAttribute("aria-hidden","false"),o.setAttribute("tabindex","0"),!p&&h()},m=function(){document.activeElement===o&&o.blur(),o.setAttribute("aria-hidden","true"),o.setAttribute("tabindex","-1"),h()},E=function(p){var d=p.enablePointMoveTriggerButton,S=p.themes,y=S===void 0?{}:S;d&&f(),o.setAttribute("data-has-chat-icon",y!=null&&y["--chat-icon"]?"yes":"no")},w=function(){a.destroy(),l(),c.destroy(),o.contains(s.element)&&o.removeChild(s.element),s.destroy(),o.remove()},R=function(p){c.update(p)};return{open:g,close:m,update:E,destroy:w,setBadge:R}}var vh={},dh={},hh;function by(){if(hh)return dh;hh=1;var e=Cd(),r=_d();return e("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},r),dh}var ph;function wy(){return ph||(ph=1,by()),vh}wy();function gh(e){var r=e.id,t=e.className,n=document.createElement("div");n.id=r,n.className=t;var i=new Map,a=function(){n.remove(),i.forEach(function(h){return h.destroy()}),i.clear()},o=function(h,v){i.set(h,v),n.appendChild(v.element)},s=function(h){var v=i.get(h);v&&(v.destroy(),i.delete(h))},c=function(){n.setAttribute("aria-hidden","false")},u=function(){n.setAttribute("aria-hidden","true")},l=function(){return!!document.getElementById(r)};return{element:n,append:o,remove:s,show:c,hide:u,isMounted:l,destroy:a}}function mh(e){var r=e.title,t=document.createElement("iframe"),n=function(){t.remove()};return t.title=r,t.allowFullscreen=!0,t.allow=["fullscreen"].join("; "),{element:t,destroy:n}}var Ey="talkdesk-chat-widget",Ry="iframe-element",Sy="Chat Widget",Oy="tdw-widget";function Cy(e){var r=e.getSrc,t=e.injector,n=e.onAppend,i=gh({id:Ey,className:Oy}),a=mh({title:Sy}),o=function(){i.isMounted()||(t.appendChild(i.element),a.element.src=r(),i.append(Ry,a),n&&a.element.contentWindow&&n(a.element.contentWindow),at.setPopup(i.element))},s=function(v){var g=v.height;g&&(i.element.style.height=typeof g=="string"?g:"".concat(g,"px"))},c=function(){o(),i.show()},u=function(){i.hide()},l=function(){i.destroy()},f=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},g=v.enableResponsiveLayout,m=g===void 0?!1:g;m?i.element.setAttribute("data-responsive-layout","true"):i.element.removeAttribute("data-responsive-layout")};return u(),{init:o,resize:s,open:c,close:u,destroy:l,update:f}}function yh(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.defaultValue,n=r.unit,i=n===void 0?"px":n,a=e==null||typeof e=="string"&&e.trim()==="";return a?t:typeof e=="number"?"".concat(e).concat(i):typeof e=="string"?e.trim():t}var Ty="talkdesk-chat-widget-float",_y="float-iframe-element",xy="Chat Widget Campaign",Iy="tdw-widget-float";function Py(e){var r=e.injector,t=e.getSrc,n=e.onAppend,i=e.waitForResizeFirstOpen,a=i===void 0?!1:i,o=gh({id:Ty,className:Iy}),s=mh({title:xy}),c=jl(),u=function(){o.isMounted()||(r.appendChild(o.element),s.element.src=t(),o.append(_y,s),n&&s.element.contentWindow&&n(s.element.contentWindow),Pr.setPopup(o.element))},l=function(){u();var m=function(){o.show(),Pr.update()};a?c.isSettled?m():c.current.then(m):m()},f=function(){o.hide()},h=function(m){var E=m||{},w=E.width,R=E.height,O=[yh(w),yh(R)],p=O[0],d=O[1];p&&(o.element.style.width=p),d&&(o.element.style.height=d),(p||d)&&(Pr.update(),c.resolve())},v=function(){o.destroy(),c.abort()};return f(),{init:u,open:l,close:f,resize:h,destroy:v}}var bh="talkdesk-chat-proxy-link",Ay="tdw-proxy-link",Ly="noopener noreferrer";function qy(e){var r=e.injector,t=document.createElement("a");t.id=bh,t.className=Ay,t.rel=Ly,t.setAttribute("aria-hidden","true");var n=function(){return!!document.getElementById(bh)},i=function(){n()&&r.removeChild(t),t.remove()},a=function(){n()||r.appendChild(t)},o=function(c){if(a(),c){var u=c.href,l=u===void 0?"":u,f=c.target,h=f===void 0?"_blank":f,v=(l==null?void 0:l.trim())||"";v&&(t.href=v,t.target=h,t.click())}};return a(),{navigate:o,destroy:i}}var ky=["enableResponsiveLayout","enableUserInput","enablePointMoveTriggerButton","enableSoundNotification","enableChatHeader"];function jy(e,r){var t=r.touchpointId;Fe.setAppProps(Ce({},r)),qt.create({region:r.region,proxyHost:r==null?void 0:r.proxyHost});var n=[],i=jl(),a=null,o=!1,s=Gm(),c=Em(),u=sy({root:e}),l=qy({injector:u.element}),f=yy({injector:u.element,onClick:function(){return m()}}),h=Cy({injector:u.element,getSrc:function(){return Xm()},onAppend:function(b){s.bootstrap({sender:b,widgetFrame:h,widgetTrigger:f,widgetOpen:function(){return m(!1)},widgetClose:function(){return E(!1)},onFrameReady:function(){return i.resolve(!0)},onConversationStart:function(){return De.emit("onConversationStart")},onConversationEnded:function(){return De.emit("onConversationEnded")},onConversationClear:function(){var I;(I=c.current)===null||I===void 0||I.trigger(gr.Methods.ConversationClear),De.emit("onConversationClear")},onFloatFrameOpen:function(){return v.open()},onFloatFrameClose:function(){return v.close()},onJumpTo:function(I){return l.navigate(I)}})}}),v=Py({injector:u.element,waitForResizeFirstOpen:!(r!=null&&r.autoOpen),getSrc:function(){return Ym()},onAppend:function(b){c.bootstrap({sender:b,widgetFloatFrame:v,onButtonClick:function(I){d(I,!0).then(function(){m(!0)})},onClickOptOut:function(){var I;return(I=s.current)===null||I===void 0?void 0:I.trigger(ve.Methods.UpdateOptOut)},onJumpTo:function(I){return l.navigate(I)}})}}),g=function(){var y=qr(Ue().m(function b(){var C,I,k,L,B,q,A,N,M,D,$,J,X,Z,te,se,_e,Pe,xe=arguments;return Ue().w(function(pe){for(;;)switch(pe.n){case 0:if(C=xe.length>0&&xe[0]!==void 0?xe[0]:{},I=C.enableResponsiveLayout,k=I===void 0?!0:I,L=C.enableUserInput,B=L===void 0?!0:L,q=C.enablePointMoveTriggerButton,A=q===void 0?!1:q,N=C.enableSoundNotification,M=N===void 0?!0:N,D=C.enableChatHeader,$=D===void 0?!0:D,J=Ut(C,ky),!n0()){pe.n=1;break}return console.warn(_r.botDeviceAlert),pe.a(2,!1);case 1:return a||(a=hm(t)),pe.n=2,a;case 2:if(X=pe.v,X!=null&&X.active){pe.n=3;break}return pe.a(2,!1);case 3:if(Z=Fe.setAppConfig(Ce(Ce({},J),{},{enableResponsiveLayout:k,enableUserInput:B,enablePointMoveTriggerButton:A,enableSoundNotification:M,enableChatHeader:$,languageCode:(J==null?void 0:J.languageCode)||(r==null?void 0:r.languageCode)})),Fe.setTouchpoint(X),o){pe.n=5;break}return o=!0,te=ay(u.element,Z==null?void 0:Z.styles,X),ah(u.element),n.push(iy(u.element)),h.update({enableResponsiveLayout:k}),f.update({enablePointMoveTriggerButton:A,themes:te}),k&&ih.on(function(){return ah(u.element)}),h.init(),pe.n=4,i.current;case 4:se=pe.v,se&&(ds.start(),ds.onChange(function(mr){return S({eventType:ip.pageView,attributes:{page_url:mr}})}),f.open(),Fe.templateEnableFlyOut&&v.init()),pe.n=6;break;case 5:(_e=s.current)===null||_e===void 0||_e.trigger(ve.Methods.UpdateAppConfigs,{appConfig:Z}),(Pe=c.current)===null||Pe===void 0||Pe.trigger(gr.Methods.UpdateAppConfigs,{appConfig:Z});case 6:return pe.a(2,!0)}},b)}));return function(){return y.apply(this,arguments)}}(),m=function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(i.isPending){console.warn(_r.initNotStart);return}if(f.close(),h.open(),b){var C;(C=s.current)===null||C===void 0||C.trigger(ve.Methods.FrameOpened)}De.emit("onOpenWebchat"),De.emit("onOpen")},E=function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(i.isPending){console.warn(_r.initNotStart);return}if(h.close(),f.open(),b){var C;(C=s.current)===null||C===void 0||C.trigger(ve.Methods.FrameClosed)}De.emit("onCloseWebchat"),De.emit("onClose")},w=function(){ds.stop(),at.destroy(),Pr.destroy(),l.destroy(),f.destroy(),h.destroy(),u.destroy(),n.forEach(function(b){return b()}),n.length=0,c.destroy(),s.destroy(),Fe.clearAll(),a=null,o=!1,ih.destroy(),De.destroy(),i.abort(!1)},R=function(b){var C,I;Fe.setContextParam(b),(C=s.current)===null||C===void 0||C.trigger(ve.Methods.UpdateContext,b),(I=c.current)===null||I===void 0||I.trigger(gr.Methods.UpdateContext,b)},O=function(){var b;(b=s.current)===null||b===void 0||b.trigger(ve.Methods.Reset)},p=function(){var b;(b=s.current)===null||b===void 0||b.trigger(ve.Methods.PopupCloseConversation)},d=function(b){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return s.current?s.current.trigger(ve.Methods.SendMessage,b,C):Promise.resolve()},S=function(b){var C;(C=c.current)===null||C===void 0||C.trigger(ve.Methods.TraceUserEvent,b)};return{open:function(){m(!0)},close:function(){E(!0)},init:g,destroy:w,setContextParam:R,reset:O,popupCloseConversation:p,set onOpenWebchat(y){De.on("onOpenWebchat",y)},set onCloseWebchat(y){De.on("onCloseWebchat",y)},set onConversationStart(y){De.on("onConversationStart",y)},set onConversationEnded(y){De.on("onConversationEnded",y)},set onConversationClear(y){De.on("onConversationClear",y)},setCustomFieldDefaultValues:function(b){R(b),console.warn(_r.deprecatedMethod("webchat.setContextParam"))},get selfHostedApp(){return{open:function(){m(!0),console.warn(_r.deprecatedMethod("webchat.open()"))},close:function(){E(!0),console.warn(_r.deprecatedMethod("webchat.open()"))}}},set onOpen(y){De.on("onOpen",y),console.warn(_r.deprecatedCallback("webchat.onOpenWebchat = function () { // do something }"))},set onClose(y){De.on("onClose",y),console.warn(_r.deprecatedCallback("webchat.onCloseWebchat = function () { // do something }"))}}}function Fy(e,r){if(!e)throw new Error("The td chat jssdk injector not exist");if(!r)throw new Error("The td chat jssdk props not exist");var t=typeof e=="string"?document.getElementById(e):e,n=((r==null?void 0:r.touchpointId)||(r==null?void 0:r.flowId)||"").trim(),i=((r==null?void 0:r.region)||"").trim(),a=((r==null?void 0:r.proxyHost)||"").trim(),o=Object.values(Re),s=r!=null&&r.debug?!0:!!(Fl(Gc,{mode:window.localStorage})||Fl(Gc,{mode:window.sessionStorage})),c=+((r==null?void 0:r.optOutLimit)||ma);if(!t)throw new Error('The td chat jssdk injector element not exist, element id = "#'.concat(e,'"'));if(!n)throw new Error("The td chat jssdk touchpointId or flowId no exist");if(!i)throw new Error("The td chat jssdk region not exist");if(o.indexOf(i)===-1)throw new Error("The td chat jssdk region=".concat(i," not support, please use one of ").concat(o.join(",")));if(a){for(var u=["http","https","ws","wss","file"],l=0;l