UNPKG

@zephr/saas-client-sdk

Version:
2 lines (1 loc) 37.1 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t||self).zephrSaaS={})}(this,function(t){function e(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)e.indexOf(r=i[n])>=0||(o[r]=t[r]);return o}var r=0;function n(t){return"__private_"+r+++"_"+t}function o(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t){var e={exports:{}};return t(e,e.exports),e.exports}var a,u,s=function(t){return t&&t.Math==Math&&t},l=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof i&&i)||function(){return this}()||Function("return this")(),f=function(t){try{return!!t()}catch(t){return!0}},p=!f(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),h={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,d=v&&!h.call({1:2},1)?function(t){var e=v(this,t);return!!e&&e.enumerable}:h,y={f:d},g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},m={}.toString,b=function(t){return m.call(t).slice(8,-1)},j="".split,w=f(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==b(t)?j.call(t,""):Object(t)}:Object,O=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},S=function(t){return w(O(t))},x=function(t){return"function"==typeof t},E=function(t){return"object"==typeof t?null!==t:x(t)},P=function(t){return x(t)?t:void 0},T=function(t,e){return arguments.length<2?P(l[t]):l[t]&&l[t][e]},A=T("navigator","userAgent")||"",I=l.process,R=l.Deno,L=I&&I.versions||R&&R.version,C=L&&L.v8;C?u=(a=C.split("."))[0]<4?1:a[0]+a[1]:A&&(!(a=A.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=A.match(/Chrome\/(\d+)/))&&(u=a[1]);var _=u&&+u,k=!!Object.getOwnPropertySymbols&&!f(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&_&&_<41}),M=k&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,F=M?function(t){return"symbol"==typeof t}:function(t){var e=T("Symbol");return x(e)&&Object(t)instanceof e},N=function(t){try{return String(t)}catch(t){return"Object"}},D=function(t){if(x(t))return t;throw TypeError(N(t)+" is not a function")},U=function(t,e){var r=t[e];return null==r?void 0:D(r)},G=function(t,e){try{Object.defineProperty(l,t,{value:e,configurable:!0,writable:!0})}catch(r){l[t]=e}return e},B="__core-js_shared__",z=l[B]||G(B,{}),W=c(function(t){(t.exports=function(t,e){return z[t]||(z[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),H=function(t){return Object(O(t))},V={}.hasOwnProperty,Y=Object.hasOwn||function(t,e){return V.call(H(t),e)},q=0,J=Math.random(),K=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++q+J).toString(36)},$=W("wks"),X=l.Symbol,Q=M?X:X&&X.withoutSetter||K,Z=function(t){return Y($,t)&&(k||"string"==typeof $[t])||($[t]=k&&Y(X,t)?X[t]:Q("Symbol."+t)),$[t]},tt=Z("toPrimitive"),et=function(t){var e=function(t,e){if(!E(t)||F(t))return t;var r,n=U(t,tt);if(n){if(void 0===e&&(e="default"),r=n.call(t,e),!E(r)||F(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&x(r=t.toString)&&!E(n=r.call(t)))return n;if(x(r=t.valueOf)&&!E(n=r.call(t)))return n;if("string"!==e&&x(r=t.toString)&&!E(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")}(t,e)}(t,"string");return F(e)?e:String(e)},rt=l.document,nt=E(rt)&&E(rt.createElement),ot=function(t){return nt?rt.createElement(t):{}},it=!p&&!f(function(){return 7!=Object.defineProperty(ot("div"),"a",{get:function(){return 7}}).a}),ct=Object.getOwnPropertyDescriptor,at={f:p?ct:function(t,e){if(t=S(t),e=et(e),it)try{return ct(t,e)}catch(t){}if(Y(t,e))return g(!y.f.call(t,e),t[e])}},ut=function(t){if(E(t))return t;throw TypeError(String(t)+" is not an object")},st=Object.defineProperty,lt={f:p?st:function(t,e,r){if(ut(t),e=et(e),ut(r),it)try{return st(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},ft=p?function(t,e,r){return lt.f(t,e,g(1,r))}:function(t,e,r){return t[e]=r,t},pt=Function.toString;x(z.inspectSource)||(z.inspectSource=function(t){return pt.call(t)});var ht,vt,dt,yt=z.inspectSource,gt=l.WeakMap,mt=x(gt)&&/native code/.test(yt(gt)),bt=W("keys"),jt=function(t){return bt[t]||(bt[t]=K(t))},wt={},Ot="Object already initialized";if(mt||z.state){var St=z.state||(z.state=new(0,l.WeakMap)),xt=St.get,Et=St.has,Pt=St.set;ht=function(t,e){if(Et.call(St,t))throw new TypeError(Ot);return e.facade=t,Pt.call(St,t,e),e},vt=function(t){return xt.call(St,t)||{}},dt=function(t){return Et.call(St,t)}}else{var Tt=jt("state");wt[Tt]=!0,ht=function(t,e){if(Y(t,Tt))throw new TypeError(Ot);return e.facade=t,ft(t,Tt,e),e},vt=function(t){return Y(t,Tt)?t[Tt]:{}},dt=function(t){return Y(t,Tt)}}var At={set:ht,get:vt,has:dt,enforce:function(t){return dt(t)?vt(t):ht(t,{})},getterFor:function(t){return function(e){var r;if(!E(e)||(r=vt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},It=Function.prototype,Rt=p&&Object.getOwnPropertyDescriptor,Lt=Y(It,"name"),Ct={EXISTS:Lt,PROPER:Lt&&"something"===function(){}.name,CONFIGURABLE:Lt&&(!p||p&&Rt(It,"name").configurable)},_t=c(function(t){var e=Ct.CONFIGURABLE,r=At.get,n=At.enforce,o=String(String).split("String");(t.exports=function(t,r,i,c){var a,u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,f=!!c&&!!c.noTargetGet,p=c&&void 0!==c.name?c.name:r;x(i)&&("Symbol("===String(p).slice(0,7)&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Y(i,"name")||e&&i.name!==p)&&ft(i,"name",p),(a=n(i)).source||(a.source=o.join("string"==typeof p?p:""))),t!==l?(u?!f&&t[r]&&(s=!0):delete t[r],s?t[r]=i:ft(t,r,i)):s?t[r]=i:G(r,i)})(Function.prototype,"toString",function(){return x(this)&&r(this).source||yt(this)})}),kt=Math.ceil,Mt=Math.floor,Ft=function(t){var e=+t;return e!=e||0===e?0:(e>0?Mt:kt)(e)},Nt=Math.max,Dt=Math.min,Ut=function(t,e){var r=Ft(t);return r<0?Nt(r+e,0):Dt(r,e)},Gt=Math.min,Bt=function(t){return t>0?Gt(Ft(t),9007199254740991):0},zt=function(t){return Bt(t.length)},Wt=function(t){return function(e,r,n){var o,i=S(e),c=zt(i),a=Ut(n,c);if(t&&r!=r){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},Ht=(Wt(!0),Wt(!1)),Vt=function(t,e){var r,n=S(t),o=0,i=[];for(r in n)!Y(wt,r)&&Y(n,r)&&i.push(r);for(;e.length>o;)Y(n,r=e[o++])&&(~Ht(i,r)||i.push(r));return i},Yt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qt=Yt.concat("length","prototype"),Jt={f:Object.getOwnPropertyNames||function(t){return Vt(t,qt)}},Kt={f:Object.getOwnPropertySymbols},$t=T("Reflect","ownKeys")||function(t){var e=Jt.f(ut(t)),r=Kt.f;return r?e.concat(r(t)):e},Xt=function(t,e){for(var r=$t(e),n=lt.f,o=at.f,i=0;i<r.length;i++){var c=r[i];Y(t,c)||n(t,c,o(e,c))}},Qt=/#|\.prototype\./,Zt=function(t,e){var r=ee[te(t)];return r==ne||r!=re&&(x(e)?f(e):!!e)},te=Zt.normalize=function(t){return String(t).replace(Qt,".").toLowerCase()},ee=Zt.data={},re=Zt.NATIVE="N",ne=Zt.POLYFILL="P",oe=Zt,ie=at.f,ce=function(t,e){var r,n,o,i,c,a=t.target,u=t.global,s=t.stat;if(r=u?l:s?l[a]||G(a,{}):(l[a]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(c=ie(r,n))&&c.value:r[n],!oe(u?n:a+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Xt(i,o)}(t.sham||o&&o.sham)&&ft(i,"sham",!0),_t(r,n,i,t)}},ae={};ae[Z("toStringTag")]="z";var ue,se="[object z]"===String(ae),le=Z("toStringTag"),fe="Arguments"==b(function(){return arguments}()),pe=se?b:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),le))?r:fe?b(e):"Object"==(n=b(e))&&x(e.callee)?"Arguments":n},he=function(t){if("Symbol"===pe(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},ve=function(){var t=ut(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},de=l.RegExp,ye={UNSUPPORTED_Y:f(function(){var t=de("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),BROKEN_CARET:f(function(){var t=de("^r","gy");return t.lastIndex=2,null!=t.exec("str")})},ge=Object.keys||function(t){return Vt(t,Yt)},me=p?Object.defineProperties:function(t,e){ut(t);for(var r,n=ge(e),o=n.length,i=0;o>i;)lt.f(t,r=n[i++],e[r]);return t},be=T("document","documentElement"),je=jt("IE_PROTO"),we=function(){},Oe=function(t){return"<script>"+t+"<\/script>"},Se=function(t){t.write(Oe("")),t.close();var e=t.parentWindow.Object;return t=null,e},xe=function(){try{ue=new ActiveXObject("htmlfile")}catch(t){}var t,e;xe="undefined"!=typeof document?document.domain&&ue?Se(ue):((e=ot("iframe")).style.display="none",be.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Oe("document.F=Object")),t.close(),t.F):Se(ue);for(var r=Yt.length;r--;)delete xe.prototype[Yt[r]];return xe()};wt[je]=!0;var Ee,Pe,Te=Object.create||function(t,e){var r;return null!==t?(we.prototype=ut(t),r=new we,we.prototype=null,r[je]=t):r=xe(),void 0===e?r:me(r,e)},Ae=l.RegExp,Ie=f(function(){var t=Ae(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}),Re=l.RegExp,Le=f(function(){var t=Re("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}),Ce=At.get,_e=RegExp.prototype.exec,ke=W("native-string-replace",String.prototype.replace),Me=_e,Fe=(Pe=/b*/g,_e.call(Ee=/a/,"a"),_e.call(Pe,"a"),0!==Ee.lastIndex||0!==Pe.lastIndex),Ne=ye.UNSUPPORTED_Y||ye.BROKEN_CARET,De=void 0!==/()??/.exec("")[1];(Fe||De||Ne||Ie||Le)&&(Me=function(t){var e,r,n,o,i,c,a,u=this,s=Ce(u),l=he(t),f=s.raw;if(f)return f.lastIndex=u.lastIndex,e=Me.call(f,l),u.lastIndex=f.lastIndex,e;var p=s.groups,h=Ne&&u.sticky,v=ve.call(u),d=u.source,y=0,g=l;if(h&&(-1===(v=v.replace("y","")).indexOf("g")&&(v+="g"),g=l.slice(u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==l.charAt(u.lastIndex-1))&&(d="(?: "+d+")",g=" "+g,y++),r=new RegExp("^(?:"+d+")",v)),De&&(r=new RegExp("^"+d+"$(?!\\s)",v)),Fe&&(n=u.lastIndex),o=_e.call(h?r:u,g),h?o?(o.input=o.input.slice(y),o[0]=o[0].slice(y),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:Fe&&o&&(u.lastIndex=u.global?o.index+o[0].length:n),De&&o&&o.length>1&&ke.call(o[0],r,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)}),o&&p)for(o.groups=c=Te(null),i=0;i<p.length;i++)c[(a=p[i])[0]]=o[a[1]];return o});var Ue=Me;ce({target:"RegExp",proto:!0,forced:/./.exec!==Ue},{exec:Ue});var Ge=Z("species"),Be=RegExp.prototype,ze=function(t,e,r,n){var o=Z(t),i=!f(function(){var e={};return e[o]=function(){return 7},7!=""[t](e)}),c=i&&!f(function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Ge]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e});if(!i||!c||r){var a=/./[o],u=e(o,""[t],function(t,e,r,n,o){var c=e.exec;return c===Ue||c===Be.exec?i&&!o?{done:!0,value:a.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}});_t(String.prototype,t,u[0]),_t(Be,o,u[1])}n&&ft(Be[o],"sham",!0)},We=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},He=function(t,e){var r=t.exec;if(x(r)){var n=r.call(t,e);return null!==n&&ut(n),n}if("RegExp"===b(t))return Ue.call(t,e);throw TypeError("RegExp#exec called on incompatible receiver")};ze("search",function(t,e,r){return[function(e){var r=O(this),n=null==e?void 0:U(e,t);return n?n.call(e,r):new RegExp(e)[t](he(r))},function(t){var n=ut(this),o=he(t),i=r(e,n,o);if(i.done)return i.value;var c=n.lastIndex;We(c,0)||(n.lastIndex=0);var a=He(n,o);return We(n.lastIndex,c)||(n.lastIndex=c),null===a?-1:a.index}]}),se||_t(Object.prototype,"toString",se?{}.toString:function(){return"[object "+pe(this)+"]"},{unsafe:!0});var Ve=l.Promise,Ye=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return ut(r),function(t){if("object"==typeof t||x(t))return t;throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),qe=lt.f,Je=Z("toStringTag"),Ke=function(t,e,r){t&&!Y(t=r?t:t.prototype,Je)&&qe(t,Je,{configurable:!0,value:e})},$e=Z("species"),Xe={},Qe=Z("iterator"),Ze=Array.prototype,tr=function(t,e,r){if(D(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},er=Z("iterator"),rr=function(t){if(null!=t)return U(t,er)||U(t,"@@iterator")||Xe[pe(t)]},nr=function(t,e,r){var n,o;ut(t);try{if(!(n=U(t,"return"))){if("throw"===e)throw r;return r}n=n.call(t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return ut(n),r},or=function(t,e){this.stopped=t,this.result=e},ir=function(t,e,r){var n,o,i,c,a,u,s,l,f=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),v=tr(e,r&&r.that,1+f+h),d=function(t){return n&&nr(n,"normal",t),new or(!0,t)},y=function(t){return f?(ut(t),h?v(t[0],t[1],d):v(t[0],t[1])):h?v(t,d):v(t)};if(p)n=t;else{if(!(o=rr(t)))throw TypeError(String(t)+" is not iterable");if(void 0!==(l=o)&&(Xe.Array===l||Ze[Qe]===l)){for(i=0,c=zt(t);c>i;i++)if((a=y(t[i]))&&a instanceof or)return a;return new or(!1)}n=function(t,e){var r=arguments.length<2?rr(t):e;if(D(r))return ut(r.call(t));throw TypeError(String(t)+" is not iterable")}(t,o)}for(u=n.next;!(s=u.call(n)).done;){try{a=y(s.value)}catch(t){nr(n,"throw",t)}if("object"==typeof a&&a&&a instanceof or)return a}return new or(!1)},cr=Z("iterator"),ar=!1;try{var ur=0,sr={next:function(){return{done:!!ur++}},return:function(){ar=!0}};sr[cr]=function(){return this},Array.from(sr,function(){throw 2})}catch(t){}var lr,fr,pr,hr,vr=[],dr=T("Reflect","construct"),yr=/^\s*(?:class|function)\b/,gr=yr.exec,mr=!yr.exec(function(){}),br=function(t){if(!x(t))return!1;try{return dr(Object,vr,t),!0}catch(t){return!1}},jr=!dr||f(function(){var t;return br(br.call)||!br(Object)||!br(function(){t=!0})||t})?function(t){if(!x(t))return!1;switch(pe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return mr||!!gr.call(yr,yt(t))}:br,wr=Z("species"),Or=function(t,e){var r,n=ut(t).constructor;return void 0===n||null==(r=ut(n)[wr])?e:function(t){if(jr(t))return t;throw TypeError(N(t)+" is not a constructor")}(r)},Sr=/(?:ipad|iphone|ipod).*applewebkit/i.test(A),xr="process"==b(l.process),Er=l.setImmediate,Pr=l.clearImmediate,Tr=l.process,Ar=l.MessageChannel,Ir=l.Dispatch,Rr=0,Lr={};try{lr=l.location}catch(t){}var Cr=function(t){if(Lr.hasOwnProperty(t)){var e=Lr[t];delete Lr[t],e()}},_r=function(t){return function(){Cr(t)}},kr=function(t){Cr(t.data)},Mr=function(t){l.postMessage(String(t),lr.protocol+"//"+lr.host)};Er&&Pr||(Er=function(t){for(var e=[],r=arguments.length,n=1;r>n;)e.push(arguments[n++]);return Lr[++Rr]=function(){(x(t)?t:Function(t)).apply(void 0,e)},fr(Rr),Rr},Pr=function(t){delete Lr[t]},xr?fr=function(t){Tr.nextTick(_r(t))}:Ir&&Ir.now?fr=function(t){Ir.now(_r(t))}:Ar&&!Sr?(hr=(pr=new Ar).port2,pr.port1.onmessage=kr,fr=tr(hr.postMessage,hr,1)):l.addEventListener&&x(l.postMessage)&&!l.importScripts&&lr&&"file:"!==lr.protocol&&!f(Mr)?(fr=Mr,l.addEventListener("message",kr,!1)):fr="onreadystatechange"in ot("script")?function(t){be.appendChild(ot("script")).onreadystatechange=function(){be.removeChild(this),Cr(t)}}:function(t){setTimeout(_r(t),0)});var Fr,Nr,Dr,Ur,Gr,Br,zr,Wr,Hr={set:Er,clear:Pr},Vr=/ipad|iphone|ipod/i.test(A)&&void 0!==l.Pebble,Yr=/web0s(?!.*chrome)/i.test(A),qr=Hr.set,Jr=l.MutationObserver||l.WebKitMutationObserver,Kr=l.document,$r=l.process,Xr=l.Promise,Qr=(0,at.f)(l,"queueMicrotask"),Zr=Qr&&Qr.value;Zr||(Fr=function(){var t,e;for(xr&&(t=$r.domain)&&t.exit();Nr;){e=Nr.fn,Nr=Nr.next;try{e()}catch(t){throw Nr?Ur():Dr=void 0,t}}Dr=void 0,t&&t.enter()},Sr||xr||Yr||!Jr||!Kr?!Vr&&Xr&&Xr.resolve?((zr=Xr.resolve(void 0)).constructor=Xr,Wr=zr.then,Ur=function(){Wr.call(zr,Fr)}):Ur=xr?function(){$r.nextTick(Fr)}:function(){qr.call(l,Fr)}:(Gr=!0,Br=Kr.createTextNode(""),new Jr(Fr).observe(Br,{characterData:!0}),Ur=function(){Br.data=Gr=!Gr}));var tn,en,rn,nn,on,cn=Zr||function(t){var e={fn:t,next:void 0};Dr&&(Dr.next=e),Nr||(Nr=e,Ur()),Dr=e},an=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=D(e),this.reject=D(r)},un={f:function(t){return new an(t)}},sn=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},ln="object"==typeof window,fn=Hr.set,pn=Z("species"),hn="Promise",vn=At.get,dn=At.set,yn=At.getterFor(hn),gn=Ve&&Ve.prototype,mn=Ve,bn=gn,jn=l.TypeError,wn=l.document,On=l.process,Sn=un.f,xn=Sn,En=!!(wn&&wn.createEvent&&l.dispatchEvent),Pn=x(l.PromiseRejectionEvent),Tn="unhandledrejection",An=!1,In=oe(hn,function(){var t=yt(mn),e=t!==String(mn);if(!e&&66===_)return!0;if(_>=51&&/native code/.test(t))return!1;var r=new mn(function(t){t(1)}),n=function(t){t(function(){},function(){})};return(r.constructor={})[pn]=n,!(An=r.then(function(){})instanceof n)||!e&&ln&&!Pn}),Rn=In||!function(t,e){if(!ar)return!1;var r=!1;try{var n={};n[cr]=function(){return{next:function(){return{done:r=!0}}}},mn.all(n).catch(function(){})}catch(t){}return r}(),Ln=function(t){var e;return!(!E(t)||!x(e=t.then))&&e},Cn=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;cn(function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var c,a,u,s=r[i++],l=o?s.ok:s.fail,f=s.resolve,p=s.reject,h=s.domain;try{l?(o||(2===t.rejection&&Fn(t),t.rejection=1),!0===l?c=n:(h&&h.enter(),c=l(n),h&&(h.exit(),u=!0)),c===s.promise?p(jn("Promise-chain cycle")):(a=Ln(c))?a.call(c,f,p):f(c)):p(n)}catch(t){h&&!u&&h.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&kn(t)})}},_n=function(t,e,r){var n,o;En?((n=wn.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),l.dispatchEvent(n)):n={promise:e,reason:r},!Pn&&(o=l["on"+t])?o(n):t===Tn&&function(t,e){var r=l.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},kn=function(t){fn.call(l,function(){var e,r=t.facade,n=t.value;if(Mn(t)&&(e=sn(function(){xr?On.emit("unhandledRejection",n,r):_n(Tn,r,n)}),t.rejection=xr||Mn(t)?2:1,e.error))throw e.value})},Mn=function(t){return 1!==t.rejection&&!t.parent},Fn=function(t){fn.call(l,function(){var e=t.facade;xr?On.emit("rejectionHandled",e):_n("rejectionhandled",e,t.value)})},Nn=function(t,e,r){return function(n){t(e,n,r)}},Dn=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Cn(t,!0))},Un=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw jn("Promise can't be resolved itself");var n=Ln(e);n?cn(function(){var r={done:!1};try{n.call(e,Nn(Un,r,t),Nn(Dn,r,t))}catch(e){Dn(r,e,t)}}):(t.value=e,t.state=1,Cn(t,!1))}catch(e){Dn({done:!1},e,t)}}};if(In&&(mn=function(t){!function(t,e,r){if(t instanceof e)return t;throw TypeError("Incorrect Promise invocation")}(this,mn),D(t),tn.call(this);var e=vn(this);try{t(Nn(Un,e),Nn(Dn,e))}catch(t){Dn(e,t)}},(tn=function(t){dn(this,{type:hn,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,r){for(var n in e)_t(t,n,e[n],void 0);return t}(bn=mn.prototype,{then:function(t,e){var r=yn(this),n=Sn(Or(this,mn));return n.ok=!x(t)||t,n.fail=x(e)&&e,n.domain=xr?On.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&Cn(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),en=function(){var t=new tn,e=vn(t);this.promise=t,this.resolve=Nn(Un,e),this.reject=Nn(Dn,e)},un.f=Sn=function(t){return t===mn||t===rn?new en(t):xn(t)},x(Ve)&&gn!==Object.prototype)){nn=gn.then,An||(_t(gn,"then",function(t,e){var r=this;return new mn(function(t,e){nn.call(r,t,e)}).then(t,e)},{unsafe:!0}),_t(gn,"catch",bn.catch,{unsafe:!0}));try{delete gn.constructor}catch(t){}Ye&&Ye(gn,bn)}ce({global:!0,wrap:!0,forced:In},{Promise:mn}),Ke(mn,hn,!1),on=T(hn),p&&on&&!on[$e]&&(0,lt.f)(on,$e,{configurable:!0,get:function(){return this}}),rn=T(hn),ce({target:hn,stat:!0,forced:In},{reject:function(t){var e=Sn(this);return e.reject.call(void 0,t),e.promise}}),ce({target:hn,stat:!0,forced:In},{resolve:function(t){return function(t,e){if(ut(t),E(e)&&e.constructor===t)return e;var r=un.f(t);return(0,r.resolve)(e),r.promise}(this,t)}}),ce({target:hn,stat:!0,forced:Rn},{all:function(t){var e=this,r=Sn(e),n=r.resolve,o=r.reject,i=sn(function(){var r=D(e.resolve),i=[],c=0,a=1;ir(t,function(t){var u=c++,s=!1;i.push(void 0),a++,r.call(e,t).then(function(t){s||(s=!0,i[u]=t,--a||n(i))},o)}),--a||n(i)});return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=Sn(e),n=r.reject,o=sn(function(){var o=D(e.resolve);ir(t,function(t){o.call(e,t).then(r.resolve,n)})});return o.error&&n(o.value),r.promise}});var Gn=y.f,Bn=function(t){return function(e){for(var r,n=S(e),o=ge(n),i=o.length,c=0,a=[];i>c;)r=o[c++],p&&!Gn.call(n,r)||a.push(t?[r,n[r]]:n[r]);return a}},zn=(Bn(!0),Bn(!1));ce({target:"Object",stat:!0},{values:function(t){return zn(t)}});var Wn=Object.assign,Hn=Object.defineProperty,Vn=!Wn||f(function(){if(p&&1!==Wn({b:1},Wn(Hn({},"a",{enumerable:!0,get:function(){Hn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=Wn({},t)[r]||ge(Wn({},e)).join("")!=n})?function(t,e){for(var r=H(t),n=arguments.length,o=1,i=Kt.f,c=y.f;n>o;)for(var a,u=w(arguments[o++]),s=i?ge(u).concat(i(u)):ge(u),l=s.length,f=0;l>f;)a=s[f++],p&&!c.call(u,a)||(r[a]=u[a]);return r}:Wn;ce({target:"Object",stat:!0,forced:Object.assign!==Vn},{assign:Vn});var Yn,qn={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},Jn=ot("span").classList,Kn=Jn&&Jn.constructor&&Jn.constructor.prototype,$n=Kn===Object.prototype?void 0:Kn,Xn=Array.isArray||function(t){return"Array"==b(t)},Qn=Z("species"),Zn=function(t,e){return new(function(t){var e;return Xn(t)&&(jr(e=t.constructor)&&(e===Array||Xn(e.prototype))||E(e)&&null===(e=e[Qn]))&&(e=void 0),void 0===e?Array:e}(t))(0===e?0:e)},to=[].push,eo=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,c=7==t,a=5==t||i;return function(u,s,l,f){for(var p,h,v=H(u),d=w(v),y=tr(s,l,3),g=zt(d),m=0,b=f||Zn,j=e?b(u,g):r||c?b(u,0):void 0;g>m;m++)if((a||m in d)&&(h=y(p=d[m],m,v),t))if(e)j[m]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:to.call(j,p)}else switch(t){case 4:return!1;case 7:to.call(j,p)}return i?-1:n||o?o:j}},ro={forEach:eo(0),map:eo(1),filter:eo(2),some:eo(3),every:eo(4),find:eo(5),findIndex:eo(6),filterReject:eo(7)},no=ro.forEach,oo=(Yn=[].forEach)&&f(function(){Yn.call(null,function(){throw 1},1)})?[].forEach:function(t){return no(this,t,arguments.length>1?arguments[1]:void 0)},io=function(t){if(t&&t.forEach!==oo)try{ft(t,"forEach",oo)}catch(e){t.forEach=oo}};for(var co in qn)qn[co]&&io(l[co]&&l[co].prototype);io($n),self.fetch||(self.fetch=function(t,e){return e=e||{},new Promise(function(r,n){var o=new XMLHttpRequest,i=[],c=[],a={},u=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:u,headers:{keys:function(){return i},entries:function(){return c},get:function(t){return a[t.toLowerCase()]},has:function(t){return t.toLowerCase()in a}}}};for(var s in o.open(e.method||"get",t,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(t,e,r){i.push(e=e.toLowerCase()),c.push([e,r]),a[e]=a[e]?a[e]+","+r:r}),r(u())},o.onerror=n,o.withCredentials="include"==e.credentials,e.headers)o.setRequestHeader(s,e.headers[s]);o.send(e.body||null)})});var ao=["jwt","path"],uo=["jwt","path"];function so(t,e){try{var r=t()}catch(t){return e(t)}return r&&r.then?r.then(void 0,e):r}var lo=function(t,e){void 0===e&&(e={});try{var r=this;return Promise.resolve(fetch(r.apiEndpoint+"/access/decision/"+t,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer "+o(r,ho)[ho].jwt},body:JSON.stringify(Object.assign({},e,{path:o(r,ho)[ho].path}))}).then(function(t){try{function e(e){return t.json()}var r=function(){if(!t.ok)return Promise.resolve(t.text()).then(function(t){throw console.error("Rule decision bad response",t),new Error("Failed response.")})}();return Promise.resolve(r&&r.then?r.then(e):e())}catch(t){return Promise.reject(t)}}))}catch(t){return Promise.reject(t)}},fo=function(t,e){void 0===e&&(e={});try{var r=this;return Promise.resolve(fetch(r.apiEndpoint+"/access/feature/"+t,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer "+o(r,ho)[ho].jwt},body:JSON.stringify(Object.assign({},e,{path:o(r,ho)[ho].path}))}).then(function(t){try{function e(e){return t.json()}var r=function(){if(!t.ok)return Promise.resolve(t.text()).then(function(t){throw console.error("Dynamic feature bad response",t),new Error("Failed response.")})}();return Promise.resolve(r&&r.then?r.then(e):e())}catch(t){return Promise.reject(t)}}))}catch(t){return Promise.reject(t)}},po=function(t){void 0===t&&(t={});try{var e=this;return Promise.resolve(fetch(e.apiEndpoint+"/access/currentState",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer "+o(e,ho)[ho].jwt},body:JSON.stringify(Object.assign({},t,{path:o(e,ho)[ho].path}))}).then(function(t){return t.json()}).catch(function(t){console.error(t)}))}catch(t){return Promise.reject(t)}},ho=/*#__PURE__*/n("accessParams"),vo=/*#__PURE__*/n("accessState"),yo=/*#__PURE__*/n("updateCallbacks"),go=/*#__PURE__*/n("deferredStart"),mo=/*#__PURE__*/n("getCurrentAccessState"),bo=/*#__PURE__*/n("runDynamicFeature"),jo=/*#__PURE__*/n("runRuleDecision"),wo=/*#__PURE__*/n("triggerOnUpdate"),Oo=/*#__PURE__*/function(){function t(t){var e,r,n=void 0===t?{}:t,i=n.orgId,c=n.apiEndpoint;if(Object.defineProperty(this,wo,{value:So}),Object.defineProperty(this,jo,{value:lo}),Object.defineProperty(this,bo,{value:fo}),Object.defineProperty(this,mo,{value:po}),this.hasStarted=!1,Object.defineProperty(this,ho,{writable:!0,value:{}}),Object.defineProperty(this,vo,{writable:!0,value:{}}),Object.defineProperty(this,yo,{writable:!0,value:[]}),Object.defineProperty(this,go,{writable:!0,value:void 0}),!i)throw new Error("Organisation ID must be provided");this.orgId=i,this.apiEndpoint=c||"https://"+i+".saas-public-api.zephr.com",o(this,go)[go]={promise:new Promise(function(t,n){e=t,r=n}),resolve:e,reject:r}}var r=t.prototype;return r.startAccessController=function(t){var r=void 0===t?{}:t,n=r.jwt,i=r.path,c=void 0===i?document.location.pathname+document.location.search+document.location.hash:i,a=e(r,ao);try{var u=this;if(console.debug("Starting access controller..."),!n){var s=new Error("JWT token must be provided");return o(u,go)[go].reject(s),Promise.reject(s)}o(u,ho)[ho].jwt=n,o(u,ho)[ho].path=c;try{return Promise.resolve(o(u,mo)[mo](a).then(function(t){o(u,vo)[vo]=t,u.hasStarted=!0,o(u,go)[go].resolve(!0),console.debug("Access controller has started successfully")}))}catch(t){console.error("Access controller failed to start",t);var l=new Error("Failed to get access state.");return o(u,go)[go].reject(l),Promise.reject(l)}}catch(t){return Promise.reject(t)}},r.updateAccessController=function(t){var r=void 0===t?{}:t,n=r.jwt,i=r.path,c=e(r,uo);try{var a=this;console.debug("Updating access controller..."),"string"==typeof n&&(o(a,ho)[ho].jwt=n),"string"==typeof i&&(o(a,ho)[ho].path=i);try{return Promise.resolve(o(a,mo)[mo](c).then(function(t){o(a,vo)[vo]=t,console.debug("Access controller has updated successfully"),o(a,wo)[wo]()}))}catch(t){return console.error("Access controller failed to update",t),Promise.reject(new Error("Failed to get access state."))}}catch(t){return Promise.reject(t)}},r.onReady=function(){return o(this,go)[go].promise},r.onUpdate=function(t){void 0===t&&(t=function(){}),t&&"function"==typeof t&&o(this,yo)[yo].push(t)},r.isFeatureEnabled=function(t,e,r){void 0===e&&(e={}),void 0===r&&(r=!1);try{var n,i,c,a=this,u=(null!=(n=null==(i=o(a,vo)[vo])?void 0:i.features)?n:{})[t];if(!u)return Promise.resolve(r);switch(u.type){case"STATIC":return Promise.resolve(u.enabled);case"DYNAMIC":{function s(t){return c?t:(Object.values(l.meters).length&&(o(a,vo)[vo].meters=Object.assign({},o(a,vo)[vo].meters,l.meters)),l.enabled)}var l,f=so(function(){return Promise.resolve(o(a,bo)[bo](t,e)).then(function(t){l=t})},function(t){return console.error("Decision engine feature failed to execute",t),c=1,r});return Promise.resolve(f&&f.then?f.then(s):s(f))}default:return console.error("Feature "+t+" with type "+u.type+" unrecognised"),Promise.resolve(r)}}catch(t){return Promise.reject(t)}},r.getRuleDecision=function(t,e){void 0===e&&(e={});try{var r,n,i=this,c=so(function(){return Promise.resolve(o(i,jo)[jo](t,e)).then(function(t){n=t})},function(t){return console.error("Rule decision failed to execute",t),r=1,null});return Promise.resolve(c&&c.then?c.then(function(t){return r?t:n}):r?c:n)}catch(t){return Promise.reject(t)}},r.isAuthenticated=function(){var t,e;return null!=(t=null==(e=o(this,vo)[vo])?void 0:e.authenticated)&&t},r.getAllFeatures=function(){var t,e;return null!=(t=null==(e=o(this,vo)[vo])?void 0:e.features)?t:{}},r.getAllMeters=function(){var t,e;return null!=(t=null==(e=o(this,vo)[vo])?void 0:e.meters)?t:{}},t}();function So(){o(this,yo)[yo].forEach(function(t){return t()})}var xo,Eo=Z("match"),Po=function(t){var e;return E(t)&&(void 0!==(e=t[Eo])?!!e:"RegExp"==b(t))},To=function(t){if(Po(t))throw TypeError("The method doesn't accept regular expressions");return t},Ao=Z("match"),Io=at.f,Ro="".startsWith,Lo=Math.min,Co=function(t){var e=/./;try{"/./".startsWith(e)}catch(t){try{return e[Ao]=!1,"/./".startsWith(e)}catch(t){}}return!1}(),_o=!(Co||(xo=Io(String.prototype,"startsWith"),!xo||xo.writable));ce({target:"String",proto:!0,forced:!_o&&!Co},{startsWith:function(t){var e=he(O(this));To(t);var r=Bt(Lo(arguments.length>1?arguments[1]:void 0,e.length)),n=he(t);return Ro?Ro.call(e,n,r):e.slice(r,r+n.length)===n}});var ko=function(t,e,r){var n=et(e);n in t?lt.f(t,n,g(0,r)):t[n]=r},Mo=Z("species"),Fo=function(t){return _>=51||!f(function(){var e=[];return(e.constructor={})[Mo]=function(){return{foo:1}},1!==e[t](Boolean).foo})},No=Fo("slice"),Do=Z("species"),Uo=[].slice,Go=Math.max;ce({target:"Array",proto:!0,forced:!No},{slice:function(t,e){var r,n,o,i=S(this),c=zt(i),a=Ut(t,c),u=Ut(void 0===e?c:e,c);if(Xn(i)&&((jr(r=i.constructor)&&(r===Array||Xn(r.prototype))||E(r)&&null===(r=r[Do]))&&(r=void 0),r===Array||void 0===r))return Uo.call(i,a,u);for(n=new(void 0===r?Array:r)(Go(u-a,0)),o=0;a<u;a++,o++)a in i&&ko(n,o,i[a]);return n.length=o,n}});var Bo=function(t){return function(e,r){var n,o,i=he(O(e)),c=Ft(r),a=i.length;return c<0||c>=a?t?"":void 0:(n=i.charCodeAt(c))<55296||n>56319||c+1===a||(o=i.charCodeAt(c+1))<56320||o>57343?t?i.charAt(c):n:t?i.slice(c,c+2):o-56320+(n-55296<<10)+65536}},zo=(Bo(!1),Bo(!0)),Wo=function(t,e,r){return e+(r?zo(t,e).length:1)},Ho=ye.UNSUPPORTED_Y,Vo=[].push,Yo=Math.min,qo=4294967295,Jo=!f(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]});ze("split",function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=he(O(this)),o=void 0===r?qo:r>>>0;if(0===o)return[];if(void 0===t)return[n];if(!Po(t))return e.call(n,t,o);for(var i,c,a,u=[],s=0,l=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(i=Ue.call(l,n))&&!((c=l.lastIndex)>s&&(u.push(n.slice(s,i.index)),i.length>1&&i.index<n.length&&Vo.apply(u,i.slice(1)),a=i[0].length,s=c,u.length>=o));)l.lastIndex===i.index&&l.lastIndex++;return s===n.length?!a&&l.test("")||u.push(""):u.push(n.slice(s)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var o=O(this),i=null==e?void 0:U(e,t);return i?i.call(e,o,r):n.call(he(o),e,r)},function(t,o){var i=ut(this),c=he(t),a=r(n,i,c,o,n!==e);if(a.done)return a.value;var u=Or(i,RegExp),s=i.unicode,l=new u(Ho?"^(?:"+i.source+")":i,(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(Ho?"g":"y")),f=void 0===o?qo:o>>>0;if(0===f)return[];if(0===c.length)return null===He(l,c)?[c]:[];for(var p=0,h=0,v=[];h<c.length;){l.lastIndex=Ho?0:h;var d,y=He(l,Ho?c.slice(h):c);if(null===y||(d=Yo(Bt(l.lastIndex+(Ho?h:0)),c.length))===p)h=Wo(c,h,s);else{if(v.push(c.slice(p,h)),v.length===f)return v;for(var g=1;g<=y.length-1;g++)if(v.push(y[g]),v.length===f)return v;h=p=d}}return v.push(c.slice(p)),v}]},!Jo,Ho);var Ko=Z("unscopables"),$o=Array.prototype;null==$o[Ko]&&lt.f($o,Ko,{configurable:!0,value:Te(null)});var Xo,Qo,Zo,ti=function(t){$o[Ko][t]=!0},ei=!f(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),ri=jt("IE_PROTO"),ni=Object.prototype,oi=ei?Object.getPrototypeOf:function(t){var e=H(t);if(Y(e,ri))return e[ri];var r=e.constructor;return x(r)&&e instanceof r?r.prototype:e instanceof Object?ni:null},ii=Z("iterator"),ci=!1;[].keys&&("next"in(Zo=[].keys())?(Qo=oi(oi(Zo)))!==Object.prototype&&(Xo=Qo):ci=!0);var ai=null==Xo||f(function(){var t={};return Xo[ii].call(t)!==t});ai&&(Xo={}),x(Xo[ii])||_t(Xo,ii,function(){return this});var ui={IteratorPrototype:Xo,BUGGY_SAFARI_ITERATORS:ci},si=ui.IteratorPrototype,li=function(){return this},fi=Ct.PROPER,pi=Ct.CONFIGURABLE,hi=ui.IteratorPrototype,vi=ui.BUGGY_SAFARI_ITERATORS,di=Z("iterator"),yi="keys",gi="values",mi="entries",bi=function(){return this},ji="Array Iterator",wi=At.set,Oi=At.getterFor(ji);!function(t,e,r,n,o,i,c){!function(t,e,r){var n="Array Iterator";t.prototype=Te(si,{next:g(1,function(){var t=Oi(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}})}),Ke(t,n,!1),Xe[n]=li}(r);var a,u,s,l=function(t){if(t===o&&v)return v;if(!vi&&t in p)return p[t];switch(t){case yi:case gi:case mi:return function(){return new r(this,t)}}return function(){return new r(this)}},f=!1,p=t.prototype,h=p[di]||p["@@iterator"]||p.values,v=!vi&&h||l(o),d=p.entries||h;if(d&&(a=oi(d.call(new t)))!==Object.prototype&&a.next&&(oi(a)!==hi&&(Ye?Ye(a,hi):x(a[di])||_t(a,di,bi)),Ke(a,"Array Iterator",!0)),fi&&h&&h.name!==gi&&(pi?ft(p,"name",gi):(f=!0,v=function(){return h.call(this)})),void(u={values:l(gi),keys:l(yi),entries:l(mi)}))for(s in u)(vi||f||!(s in p))&&_t(p,s,u[s]);else ce({target:"Array",proto:!0,forced:vi||f},u);p[di]!==v&&_t(p,di,v,{name:o}),Xe.Array=v}(Array,0,function(t,e){wi(this,{type:ji,target:S(t),index:0,kind:e})},0,"values"),Xe.Arguments=Xe.Array,ti("keys"),ti("values"),ti("entries"),ce({target:"Object",stat:!0},{fromEntries:function(t){var e={};return ir(t,function(t,r){ko(e,t,r)},{AS_ENTRIES:!0}),e}});var Si=ro.map,xi=Fo("map");ce({target:"Array",proto:!0,forced:!xi},{map:function(t){return Si(this,t,arguments.length>1?arguments[1]:void 0)}});var Ei=function(t,e,r,n,o,i,c,a){for(var u,s,l=o,f=0,p=!!c&&tr(c,a,3);f<n;){if(f in r){if(u=p?p(r[f],f,e):r[f],i>0&&Xn(u))s=zt(u),l=Ei(t,e,u,s,l,i-1)-1;else{if(l>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[l]=u}l++}f++}return l},Pi=Ei;ce({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=H(this),r=zt(e),n=Zn(e,0);return n.length=Pi(n,e,e,r,0,void 0===t?1:Ft(t)),n}}),t.createInstance=function(t,e){return new Oo({orgId:t,apiEndpoint:(void 0===e?{}:e).apiEndpoint})},t.version="1.1.0"});