System.register(["./chunk-bbd6f469.js","./chunk-82b7d41d.js"],function(a,v){"use strict";var c,B,y,g;return{setters:[function(t){c=t.a,B=t.b},function(t){y=t.a,g=t.b;var e={};e.builder=t.b,e.Builder=t.a,a(e)}],execute:function(){(function(){var n=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function p(t){var e=n.has(t);return t=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(t),!e&&t}function c(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function s(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function a(t,e,n){n=void 0===n?new Set:n;for(var i=t;i;){if(i.nodeType===Node.ELEMENT_NODE){var r=i;e(r);var o=r.localName;if("link"===o&&"import"===r.getAttribute("rel")){if((i=r.import)instanceof Node&&!n.has(i))for(n.add(i),i=i.firstChild;i;i=i.nextSibling)a(i,e,n);i=s(t,r);continue}if("template"===o){i=s(t,r);continue}if(r=r.__CE_shadowRoot)for(r=r.firstChild;r;r=r.nextSibling)a(r,e,n)}i=i.firstChild?i.firstChild:s(t,i)}}function o(t,e,n){t[e]=n}function t(){this.a=new Map,this.f=new Map,this.c=[],this.b=!1}function i(t,e){t.b=!0,t.c.push(e)}function u(e,t){e.b&&a(t,function(t){return l(e,t)})}function l(t,e){if(t.b&&!e.__CE_patched){e.__CE_patched=!0;for(var n=0;n<t.c.length;n++)t.c[n](e)}}function d(t,e){var n=[];for(a(e,function(t){return n.push(t)}),e=0;e<n.length;e++){var i=n[e];1===i.__CE_state?t.connectedCallback(i):b(t,i)}}function h(t,e){var n=[];for(a(e,function(t){return n.push(t)}),e=0;e<n.length;e++){var i=n[e];1===i.__CE_state&&t.disconnectedCallback(i)}}function f(i,t,e){var r=(e=void 0===e?{}:e).u||new Set,o=e.h||function(t){return b(i,t)},s=[];if(a(t,function(n){if("link"===n.localName&&"import"===n.getAttribute("rel")){var t=n.import;t instanceof Node&&(t.__CE_isImportDocument=!0,t.__CE_hasRegistry=!0),t&&"complete"===t.readyState?t.__CE_documentLoadHandled=!0:n.addEventListener("load",function(){var t=n.import;if(!t.__CE_documentLoadHandled){t.__CE_documentLoadHandled=!0;var e=new Set(r);e.delete(t),f(i,t,{u:e,h:o})}})}else s.push(n)},r),i.b)for(t=0;t<s.length;t++)l(i,s[t]);for(t=0;t<s.length;t++)o(s[t])}function b(t,e){if(void 0===e.__CE_state){var n=e.ownerDocument;if((n.defaultView||n.__CE_isImportDocument&&n.__CE_hasRegistry)&&(n=t.a.get(e.localName))){n.constructionStack.push(e);var i=n.constructorFunction;try{try{if(new i!==e)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{n.constructionStack.pop()}}catch(t){throw e.__CE_state=2,t}if(e.__CE_state=1,(e.__CE_definition=n).attributeChangedCallback)for(n=n.observedAttributes,i=0;i<n.length;i++){var r=n[i],o=e.getAttribute(r);null!==o&&t.attributeChangedCallback(e,r,null,o,null)}c(e)&&t.connectedCallback(e)}}}function e(t){var e=document;this.c=t,this.a=e,this.b=void 0,f(this.c,this.a),"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function r(t){t.b&&t.b.disconnect()}function m(){var e=this;this.b=this.a=void 0,this.c=new Promise(function(t){e.b=t,e.a&&t(e.a)})}function v(t){if(t.a)throw Error("Already resolved.");t.a=void 0,t.b&&t.b(void 0)}function y(t){this.c=!1,this.a=t,this.j=new Map,this.f=function(t){return t()},this.b=!1,this.i=[],this.o=new e(t)}t.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},t.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},t.prototype.attributeChangedCallback=function(t,e,n,i,r){var o=t.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(e)&&o.attributeChangedCallback.call(t,e,n,i,r)},e.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||r(this),e=0;e<t.length;e++)for(var n=t[e].addedNodes,i=0;i<n.length;i++)f(this.c,n[i])},y.prototype.l=function(t,e){var n,i,r,o=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!p(t))throw new SyntaxError("The element name '"+t+"' is not valid.");if(this.a.a.get(t))throw Error("A custom element with name '"+t+"' has already been defined.");if(this.c)throw Error("A custom element is already being defined.");this.c=!0;try{var s=function(t){var e=a[t];if(void 0!==e&&!(e instanceof Function))throw Error("The '"+t+"' callback must be a function.");return e},a=e.prototype;if(!(a instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var c=s("connectedCallback"),u=s("disconnectedCallback"),l=s("adoptedCallback"),d=s("attributeChangedCallback"),h=e.observedAttributes||[]}catch(t){return}finally{this.c=!1}e={localName:t,constructorFunction:e,connectedCallback:c,disconnectedCallback:u,adoptedCallback:l,attributeChangedCallback:d,observedAttributes:h,constructionStack:[]},n=this.a,i=t,r=e,n.a.set(i,r),n.f.set(r.constructorFunction,r),this.i.push(e),this.b||(this.b=!0,this.f(function(){return function(i){if(!1!==i.b){i.b=!1;for(var t=i.i,r=[],o=new Map,e=0;e<t.length;e++)o.set(t[e].localName,[]);for(f(i.a,document,{h:function(t){if(void 0===t.__CE_state){var e=t.localName,n=o.get(e);n?n.push(t):i.a.a.get(e)&&r.push(t)}}}),e=0;e<r.length;e++)b(i.a,r[e]);for(;0<t.length;){var n=t.shift();e=n.localName,n=o.get(n.localName);for(var s=0;s<n.length;s++)b(i.a,n[s]);(e=i.j.get(e))&&v(e)}}}(o)}))},y.prototype.h=function(t){f(this.a,t)},y.prototype.get=function(t){if(t=this.a.a.get(t))return t.constructorFunction},y.prototype.m=function(e){if(!p(e))return Promise.reject(new SyntaxError("'"+e+"' is not a valid custom element name."));var t=this.j.get(e);return t||(t=new m,this.j.set(e,t),this.a.a.get(e)&&!this.i.some(function(t){return t.localName===e})&&v(t)),t.c},y.prototype.s=function(e){r(this.o);var n=this.f;this.f=function(t){return e(function(){return n(t)})}},(window.CustomElementRegistry=y).prototype.define=y.prototype.l,y.prototype.upgrade=y.prototype.h,y.prototype.get=y.prototype.get,y.prototype.whenDefined=y.prototype.m,y.prototype.polyfillWrapFlushCallback=y.prototype.s;var g=window.Document.prototype.createElement,w=window.Document.prototype.createElementNS,_=window.Document.prototype.importNode,E=window.Document.prototype.prepend,C=window.Document.prototype.append,A=window.DocumentFragment.prototype.prepend,k=window.DocumentFragment.prototype.append,N=window.Node.prototype.cloneNode,T=window.Node.prototype.appendChild,L=window.Node.prototype.insertBefore,S=window.Node.prototype.removeChild,j=window.Node.prototype.replaceChild,M=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),O=window.Element.prototype.attachShadow,x=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),D=window.Element.prototype.getAttribute,H=window.Element.prototype.setAttribute,P=window.Element.prototype.removeAttribute,F=window.Element.prototype.getAttributeNS,I=window.Element.prototype.setAttributeNS,R=window.Element.prototype.removeAttributeNS,K=window.Element.prototype.insertAdjacentElement,B=window.Element.prototype.insertAdjacentHTML,q=window.Element.prototype.prepend,V=window.Element.prototype.append,W=window.Element.prototype.before,z=window.Element.prototype.after,U=window.Element.prototype.replaceWith,Y=window.Element.prototype.remove,$=window.HTMLElement,J=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),G=window.HTMLElement.prototype.insertAdjacentElement,X=window.HTMLElement.prototype.insertAdjacentHTML,Q=new function(){};function Z(a,t,e){function n(s){return function(t){for(var e=[],n=0;n<arguments.length;++n)e[n]=arguments[n];n=[];for(var i=[],r=0;r<e.length;r++){var o=e[r];if(o instanceof Element&&c(o)&&i.push(o),o instanceof DocumentFragment)for(o=o.firstChild;o;o=o.nextSibling)n.push(o);else n.push(o)}for(s.apply(this,e),e=0;e<i.length;e++)h(a,i[e]);if(c(this))for(e=0;e<n.length;e++)(i=n[e])instanceof Element&&d(a,i)}}void 0!==e.g&&(t.prepend=n(e.g)),void 0!==e.append&&(t.append=n(e.append))}var tt,et,nt=window.customElements;if(!nt||nt.forcePolyfill||"function"!=typeof nt.define||"function"!=typeof nt.get){var it=new t;et=it,window.HTMLElement=function(){function t(){var t=this.constructor,e=et.f.get(t);if(!e)throw Error("The custom element being constructed was not registered with `customElements`.");var n=e.constructionStack;if(0===n.length)return n=g.call(document,e.localName),Object.setPrototypeOf(n,t.prototype),n.__CE_state=1,n.__CE_definition=e,l(et,n),n;var i=n[e=n.length-1];if(i===Q)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[e]=Q,Object.setPrototypeOf(i,t.prototype),l(et,i),i}return t.prototype=$.prototype,Object.defineProperty(t.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:t}),t}(),tt=it,o(Document.prototype,"createElement",function(t){if(this.__CE_hasRegistry){var e=tt.a.get(t);if(e)return new e.constructorFunction}return t=g.call(this,t),l(tt,t),t}),o(Document.prototype,"importNode",function(t,e){return t=_.call(this,t,!!e),this.__CE_hasRegistry?f(tt,t):u(tt,t),t}),o(Document.prototype,"createElementNS",function(t,e){if(this.__CE_hasRegistry&&(null===t||"http://www.w3.org/1999/xhtml"===t)){var n=tt.a.get(e);if(n)return new n.constructorFunction}return t=w.call(this,t,e),l(tt,t),t}),Z(tt,Document.prototype,{g:E,append:C}),Z(it,DocumentFragment.prototype,{g:A,append:k}),function(){function e(t,o){Object.defineProperty(t,"textContent",{enumerable:o.enumerable,configurable:!0,get:o.get,set:function(t){if(this.nodeType===Node.TEXT_NODE)o.set.call(this,t);else{var e=void 0;if(this.firstChild){var n=this.childNodes,i=n.length;if(0<i&&c(this)){e=Array(i);for(var r=0;r<i;r++)e[r]=n[r]}}if(o.set.call(this,t),e)for(t=0;t<e.length;t++)h(s,e[t])}}})}var s=it;o(Node.prototype,"insertBefore",function(t,e){if(t instanceof DocumentFragment){var n=Array.prototype.slice.apply(t.childNodes);if(t=L.call(this,t,e),c(this))for(e=0;e<n.length;e++)d(s,n[e]);return t}return n=c(t),e=L.call(this,t,e),n&&h(s,t),c(this)&&d(s,t),e}),o(Node.prototype,"appendChild",function(t){if(t instanceof DocumentFragment){var e=Array.prototype.slice.apply(t.childNodes);if(t=T.call(this,t),c(this))for(var n=0;n<e.length;n++)d(s,e[n]);return t}return e=c(t),n=T.call(this,t),e&&h(s,t),c(this)&&d(s,t),n}),o(Node.prototype,"cloneNode",function(t){return t=N.call(this,!!t),this.ownerDocument.__CE_hasRegistry?f(s,t):u(s,t),t}),o(Node.prototype,"removeChild",function(t){var e=c(t),n=S.call(this,t);return e&&h(s,t),n}),o(Node.prototype,"replaceChild",function(t,e){if(t instanceof DocumentFragment){var n=Array.prototype.slice.apply(t.childNodes);if(t=j.call(this,t,e),c(this))for(h(s,e),e=0;e<n.length;e++)d(s,n[e]);return t}n=c(t);var i=j.call(this,t,e),r=c(this);return r&&h(s,e),n&&h(s,t),r&&d(s,t),i}),M&&M.get?e(Node.prototype,M):i(s,function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)S.call(this,this.firstChild);T.call(this,document.createTextNode(t))}})})}(),function(){function e(t,o){Object.defineProperty(t,"innerHTML",{enumerable:o.enumerable,configurable:!0,get:o.get,set:function(t){var e=this,n=void 0;if(c(this)&&(n=[],a(this,function(t){t!==e&&n.push(t)})),o.set.call(this,t),n)for(var i=0;i<n.length;i++){var r=n[i];1===r.__CE_state&&s.disconnectedCallback(r)}return this.ownerDocument.__CE_hasRegistry?f(s,this):u(s,this),t}})}function t(t,i){o(t,"insertAdjacentElement",function(t,e){var n=c(e);return t=i.call(this,t,e),n&&h(s,e),c(t)&&d(s,e),t})}function n(t,i){function r(t,e){for(var n=[];t!==e;t=t.nextSibling)n.push(t);for(e=0;e<n.length;e++)f(s,n[e])}o(t,"insertAdjacentHTML",function(t,e){if("beforebegin"===(t=t.toLowerCase())){var n=this.previousSibling;i.call(this,t,e),r(n||this.parentNode.firstChild,this)}else if("afterbegin"===t)n=this.firstChild,i.call(this,t,e),r(this.firstChild,n);else if("beforeend"===t)n=this.lastChild,i.call(this,t,e),r(n||this.firstChild,null);else{if("afterend"!==t)throw new SyntaxError("The value provided ("+String(t)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");n=this.nextSibling,i.call(this,t,e),r(this.nextSibling,n)}})}var s=it;O&&o(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=O.call(this,t)}),x&&x.get?e(Element.prototype,x):J&&J.get?e(HTMLElement.prototype,J):i(s,function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return N.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName,n=e?this.content:this,i=w.call(document,this.namespaceURI,this.localName);for(i.innerHTML=t;0<n.childNodes.length;)S.call(n,n.childNodes[0]);for(t=e?i.content:i;0<t.childNodes.length;)T.call(n,t.childNodes[0])}})}),o(Element.prototype,"setAttribute",function(t,e){if(1!==this.__CE_state)return H.call(this,t,e);var n=D.call(this,t);H.call(this,t,e),e=D.call(this,t),s.attributeChangedCallback(this,t,n,e,null)}),o(Element.prototype,"setAttributeNS",function(t,e,n){if(1!==this.__CE_state)return I.call(this,t,e,n);var i=F.call(this,t,e);I.call(this,t,e,n),n=F.call(this,t,e),s.attributeChangedCallback(this,e,i,n,t)}),o(Element.prototype,"removeAttribute",function(t){if(1!==this.__CE_state)return P.call(this,t);var e=D.call(this,t);P.call(this,t),null!==e&&s.attributeChangedCallback(this,t,e,null,null)}),o(Element.prototype,"removeAttributeNS",function(t,e){if(1!==this.__CE_state)return R.call(this,t,e);var n=F.call(this,t,e);R.call(this,t,e);var i=F.call(this,t,e);n!==i&&s.attributeChangedCallback(this,e,n,i,t)}),G?t(HTMLElement.prototype,G):K?t(Element.prototype,K):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),X?n(HTMLElement.prototype,X):B?n(Element.prototype,B):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched."),Z(s,Element.prototype,{g:q,append:V}),function(a){function t(s){return function(t){for(var e=[],n=0;n<arguments.length;++n)e[n]=arguments[n];n=[];for(var i=[],r=0;r<e.length;r++){var o=e[r];if(o instanceof Element&&c(o)&&i.push(o),o instanceof DocumentFragment)for(o=o.firstChild;o;o=o.nextSibling)n.push(o);else n.push(o)}for(s.apply(this,e),e=0;e<i.length;e++)h(a,i[e]);if(c(this))for(e=0;e<n.length;e++)(i=n[e])instanceof Element&&d(a,i)}}var e=Element.prototype;void 0!==W&&(e.before=t(W)),void 0!==W&&(e.after=t(z)),void 0!==U&&o(e,"replaceWith",function(t){for(var e=[],n=0;n<arguments.length;++n)e[n]=arguments[n];n=[];for(var i=[],r=0;r<e.length;r++){var o=e[r];if(o instanceof Element&&c(o)&&i.push(o),o instanceof DocumentFragment)for(o=o.firstChild;o;o=o.nextSibling)n.push(o);else n.push(o)}for(r=c(this),U.apply(this,e),e=0;e<i.length;e++)h(a,i[e]);if(r)for(h(a,this),e=0;e<n.length;e++)(i=n[e])instanceof Element&&d(a,i)}),void 0!==Y&&o(e,"remove",function(){var t=c(this);Y.call(this),t&&h(a,this)})}(s)}(),document.__CE_hasRegistry=!0;var rt=new y(it);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:rt})}}).call(self);c(function(t,e){t.exports=function(){function u(t){return"function"==typeof t}var n=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=0,e=void 0,r=void 0,a=function(t,e){h[i]=t,h[i+1]=e,2===(i+=2)&&(r?r(p):y())},t="undefined"!=typeof window?window:void 0,o=t||{},s=o.MutationObserver||o.WebKitMutationObserver,c="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),l="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(p,1)}}var h=new Array(1e3);function p(){for(var t=0;t<i;t+=2){var e=h[t],n=h[t+1];e(n),h[t]=void 0,h[t+1]=void 0}i=0}var f,b,m,v,y=void 0;function g(t,e){var n=this,i=new this.constructor(E);void 0===i[_]&&I(i);var r=n._state;if(r){var o=arguments[r-1];a(function(){return P(r,i,o,n._result)})}else D(n,i,t,e);return i}function w(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(E);return j(e,t),e}y=c?function(){return process.nextTick(p)}:s?(b=0,m=new s(p),v=document.createTextNode(""),m.observe(v,{characterData:!0}),function(){v.data=b=++b%2}):l?((f=new MessageChannel).port1.onmessage=p,function(){return f.port2.postMessage(0)}):void 0===t&&"function"==typeof require?function(){try{var t=Function("return this")().require("vertx");return void 0===(e=t.runOnLoop||t.runOnContext)?d():function(){e(p)}}catch(t){return d()}}():d();var _=Math.random().toString(36).substring(2);function E(){}var C=void 0,A=1,k=2,N={error:null};function T(t){try{return t.then}catch(t){return N.error=t,N}}function L(t,e,n,i){try{t.call(e,n,i)}catch(t){return t}}function S(t,e,n){var i,r,o,s;e.constructor===t.constructor&&n===g&&e.constructor.resolve===w?(o=t,(s=e)._state===A?O(o,s._result):s._state===k?x(o,s._result):D(s,void 0,function(t){return j(o,t)},function(t){return x(o,t)})):n===N?(x(t,N.error),N.error=null):void 0===n?O(t,e):u(n)?(i=e,r=n,a(function(e){var n=!1,t=L(r,i,function(t){n||(n=!0,i!==t?j(e,t):O(e,t))},function(t){n||(n=!0,x(e,t))},e._label);!n&&t&&(n=!0,x(e,t))},t)):O(t,e)}function j(t,e){var n,i;t===e?x(t,new TypeError("You cannot resolve a promise with itself")):(i=typeof(n=e),null===n||"object"!==i&&"function"!==i?O(t,e):S(t,e,T(e)))}function M(t){t._onerror&&t._onerror(t._result),H(t)}function O(t,e){t._state===C&&(t._result=e,t._state=A,0!==t._subscribers.length&&a(H,t))}function x(t,e){t._state===C&&(t._state=k,t._result=e,a(M,t))}function D(t,e,n,i){var r=t._subscribers,o=r.length;t._onerror=null,r[o]=e,r[o+A]=n,r[o+k]=i,0===o&&t._state&&a(H,t)}function H(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var i=void 0,r=void 0,o=t._result,s=0;s<e.length;s+=3)i=e[s],r=e[s+n],i?P(n,i,r,o):r(o);t._subscribers.length=0}}function P(t,e,n,i){var r=u(n),o=void 0,s=void 0,a=void 0,c=void 0;if(r){if((o=function(t,e){try{return t(e)}catch(t){return N.error=t,N}}(n,i))===N?(c=!0,s=o.error,o.error=null):a=!0,e===o)return void x(e,new TypeError("A promises callback cannot return that same promise."))}else o=i,a=!0;e._state!==C||(r&&a?j(e,o):c?x(e,s):t===A?O(e,o):t===k&&x(e,o))}var F=0;function I(t){t[_]=F++,t._state=void 0,t._result=void 0,t._subscribers=[]}var R=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(E),this.promise[_]||I(this.promise),n(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?O(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&O(this.promise,this._result))):x(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===C&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,i=n.resolve;if(i===w){var r=T(e);if(r===g&&e._state!==C)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(n===K){var o=new n(E);S(o,e,r),this._willSettleAt(o,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(i(e),t)},t.prototype._settledAt=function(t,e,n){var i=this.promise;i._state===C&&(this._remaining--,t===k?x(i,n):this._result[e]=n),0===this._remaining&&O(i,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;D(t,void 0,function(t){return n._settledAt(A,e,t)},function(t){return n._settledAt(k,e,t)})},t}(),K=function(){function e(t){this[_]=F++,this._result=this._state=void 0,this._subscribers=[],E!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(e,t){try{t(function(t){j(e,t)},function(t){x(e,t)})}catch(t){x(e,t)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this.constructor;return u(e)?this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){throw t})}):this.then(e,e)},e}();return K.prototype.then=g,K.all=function(t){return new R(this,t).promise},K.race=function(r){var o=this;return n(r)?new o(function(t,e){for(var n=r.length,i=0;i<n;i++)o.resolve(r[i]).then(t,e)}):new o(function(t,e){return e(new TypeError("You must pass an array to race."))})},K.resolve=w,K.reject=function(t){var e=new this(E);return x(e,t),e},K._setScheduler=function(t){r=t},K._setAsap=function(t){a=t},K._asap=a,K.polyfill=function(){var t=void 0;if(void 0!==B)t=B;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=K},K.Promise=K}()}).polyfill();!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.hasOwnProperty("polyfillWrapFlushCallback")){var t=HTMLElement;window.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}();var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function n(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var h=function(){return(h=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function p(o,s,a,c){return new(a||(a=Promise))(function(t,e){function n(t){try{r(c.next(t))}catch(t){e(t)}}function i(t){try{r(c.throw(t))}catch(t){e(t)}}function r(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(n,i)}r((c=c.apply(o,s||[])).next())})}function f(n,i){var r,o,s,t,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(s=2&e[0]?o.return:e[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,e[1])).done)return s;switch(o=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,o=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=i.call(n,a)}catch(t){e=[6,t],o=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var t,b=function(){return v.import("./chunk-6cf7a920.js")},m=function(){return v.import("./chunk-d6e55dce.js")};if(y.isIframe&&(b(),m(),v.import("./chunk-3ccdbe6e.js")),y.isBrowser&&!customElements.get("builder-component")){var e=function(){for(var t=document.querySelectorAll(".builder-component-wrap.builder-to-embed"),e=0;e<t.length;e++){for(var n=t[e],i=n.attributes,r=document.createElement("builder-component"),o=i.length-1;0<=o;o--){var s=i[o];if(0===s.name.indexOf("data-")){var a=0===s.name.indexOf("data-")?s.name.slice(5):s.name,c=s.value;r.setAttribute(a,c)}}n.classList.remove("builder-to-embed");for(var u=0;u<n.children.length;u++){var l=n.children[u];l.remove(),r.appendChild(l)}n.appendChild(r)}};e(),t=e,"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t);var r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.previousName="",t.subscriptions=[],t.trackedClick=!1,t.prerender=!0,t._options={},t}return n(t,e),Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t},enumerable:!0,configurable:!0}),t.prototype.getOptionsFromAttribute=function(){var t=this.getAttribute("options");t&&"string"==typeof t&&"{"===t.trim()[0]&&(this._options=JSON.parse(t));var e=this.getAttribute("slot");if(e){var n=this._options=this._options||{};(n.query||(n.query={}))["data.slot"]=e}},t.prototype.connectedCallback=function(){var t=this,e=this.getAttribute("prerender");e&&(this.prerender="false"!==e&&this.prerender),window.parent.postMessage({type:"builder.isReactSdk",data:{value:!0}},"*"),this.getOptionsFromAttribute(),this.addEventListener("remove",function(){return t.unsubscribe()}),this.getContent()},t.prototype.attributeChangedCallback=function(){this.getOptionsFromAttribute(),this.getContent()},t.prototype.disconnectedCallback=function(){this.unsubscribe()},t.prototype.loaded=function(){this.classList.add("builder-loaded")},Object.defineProperty(t.prototype,"currentContent",{get:function(){var t=this.getAttribute("name")||this.getAttribute("model"),e=this.querySelector('[data-builder-component="'+t+'"]');if(e){var n=e.getAttribute("data-builder-content-id"),i=e.getAttribute("data-builder-variation-id");if(n&&i)return{id:n,testVariationId:i}}return null},enumerable:!0,configurable:!0}),t.prototype.getContent=function(){var n=this,t=this.getAttribute("key")||this.getAttribute("api-key");if(t&&t!==g.apiKey&&(g.apiKey=t),!g.apiKey){var e=g.apiKey$.subscribe(function(t){t&&n.getContent()});if(this.subscriptions.push(function(){return e.unsubscribe()}),setTimeout(function(){if(!g.apiKey)throw new Error("Builder API key not found. Please see our docs for how to provide your API key https://builder.io/c/docs")},1e4),!y.isIframe)return}var i=this.getAttribute("name")||this.getAttribute("model");if(i===this.previousName)return!1;var r=this.getAttribute("entry");if(this.prerender&&g.apiKey){if(this.unsubscribe(),!i)return!1;var o=this.currentContent;if(o)return this.data=o,this.loaded(),void this.loadReact(this.data);this.previousName=i,this.classList.add("builder-loading");var s=!1,a=this.getAttribute("slot"),c=g.get(i,h({key:(a?"slot:"+a:null)||!y.isEditing&&(this.getAttribute("entry")||i)||void 0,entry:r||void 0},this.options,{prerender:!0})).subscribe(function(t){if(s)console.warn("Unsubscribe didnt work!");else if(n.classList.remove("builder-loading"),n.loaded(),t)if(n.classList.contains("builder-editor-injected"))n.unsubscribe();else{if((n.data=t).data&&t.data.html){n.innerHTML=t.data.html;e=new CustomEvent("htmlload",{detail:t});n.dispatchEvent(e)}n.loadReact(t),c.unsubscribe(),s=!0}else{n.classList.add("builder-no-content-found");var e=new CustomEvent("load",{detail:t});n.dispatchEvent(e)}},function(t){n.loadReact(),c.unsubscribe(),s=!0});this.subscriptions.push(function(){return c.unsubscribe()})}else this.loadReact(r?{id:r}:null)},t.prototype.loadReact=function(d){return p(this,void 0,void 0,function(){var r,o,s,a,c,u,e,l,n=this;return f(this,function(t){switch(t.label){case 0:return"undefined"!=typeof location&&!y.isIframe&&-1<location.hostname.indexOf("shopstyle")?[2]:(this.unsubscribe(),r=this.getAttribute("name")||this.getAttribute("model")||this.getAttribute("model-name"),o=b(),s=m(),a=null,"email"===r&&(a=v.import("./chunk-3ccdbe6e.js")),c=!1,u=this.getAttribute("slot"),this.prerender&&(!y.isIframe||g.apiKey&&"DEMO"!==g.apiKey)?[3,3]:[4,o]);case 1:return e=t.sent().BuilderComponent,[4,s];case 2:return t.sent(),e.renderInto(this,{modelName:r,emailMode:(this.options||{}).emailMode||"true"===this.getAttribute("email-mode"),options:h({},this.options,{key:(u?"slot:"+u:null)||(y.isEditing?r:this.getAttribute("entry")||r||void 0)})}),[2];case 3:return l=g.get(r,h({key:(u?"slot:"+u:null)||(y.isEditing?r:this.getAttribute("entry")||r)},this.options,{entry:d?d.id:this.options.entry||void 0,prerender:!1})).subscribe(function(i){return p(n,void 0,void 0,function(){var e,n;return f(this,function(t){switch(t.label){case 0:return c?(console.log("unsubscribe didnt work!"),[2]):[4,o];case 1:return e=t.sent().BuilderComponent,[4,s];case 2:return t.sent(),a?[4,a]:[3,4];case 3:t.sent(),t.label=4;case 4:return n=new CustomEvent("load",{detail:i}),this.dispatchEvent(n),e.renderInto(this,{modelName:r,emailMode:(this.options||{}).emailMode||"true"===this.getAttribute("email-mode"),options:h({},this.options,{entry:i?i.id:void 0,initialContent:i?[i]:void 0,key:(u?"slot:"+u:null)||(y.isEditing?r:i&&i.id||void 0)})}),l.unsubscribe(),c=!0,y.isIframe&&setTimeout(function(){parent.postMessage({type:"builder.updateContent"},"*"),setTimeout(function(){parent.postMessage({type:"builder.sdkInjected",data:{modelName:r}},"*")},100)},100),[2]}})})},function(i){return p(n,void 0,void 0,function(){var e,n;return f(this,function(t){switch(t.label){case 0:return y.isEditing?[4,o]:[3,5];case 1:return e=t.sent().BuilderComponent,[4,s];case 2:return t.sent(),a?[4,a]:[3,4];case 3:t.sent(),t.label=4;case 4:return e.renderInto(this,{modelName:r,emailMode:(this.options||{}).emailMode||"true"===this.getAttribute("email-mode"),options:h({},this.options,{entry:d?d.id:void 0,initialContent:d?[d]:void 0,key:(u?"slot:"+u:null)||(y.isEditing?r:d&&d.id||void 0)})}),[3,6];case 5:console.warn("Builder webcomponent error:",i),this.classList.add("builder-errored"),this.classList.add("builder-loaded"),this.classList.remove("builder-loading"),n=new CustomEvent("error",{detail:i}),this.dispatchEvent(n),t.label=6;case 6:return[2]}})})}),this.subscriptions.push(function(){return l.unsubscribe()}),[2]}})})},t.prototype.unsubscribe=function(){this.subscriptions&&(this.subscriptions.forEach(function(t){return t()}),this.subscriptions=[])},t}(HTMLElement);customElements.define("builder-component",r);var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.previousName="",t.subscriptions=[],t.trackedClick=!1,t._options={},t}return n(t,e),Object.defineProperty(t.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t},enumerable:!0,configurable:!0}),t.prototype.getOptionsFromAttribute=function(){var t=this.getAttribute("options");t&&"string"==typeof t&&"{"===t.trim()[0]&&(this._options=JSON.parse(t))},t.prototype.connectedCallback=function(){var e=this;this.getOptionsFromAttribute(),this.addEventListener("remove",function(){return e.unsubscribe()}),this.addEventListener("click",function(t){g.canTrack&&e.data&&(g.trackInteraction(e.data.id,e.data.testVariationId||e.data.id,e.trackedClick,t),e.trackedClick||(e.trackedClick=!0))}),this.getContent()},t.prototype.attributeChangedCallback=function(){this.getOptionsFromAttribute(),this.getContent()},t.prototype.disconnectedCallback=function(){this.unsubscribe()},t.prototype.loaded=function(){this.classList.add("builder-loaded")},Object.defineProperty(t.prototype,"currentContent",{get:function(){var t=this.getAttribute("name")||this.getAttribute("model"),e=this.querySelector('[data-builder-component="'+t+'"]');if(e){var n=e.getAttribute("data-builder-content-id"),i=e.getAttribute("data-builder-variation-id");if(n&&i)return{id:n,testVariationId:i}}return null},enumerable:!0,configurable:!0}),t.prototype.getContent=function(){var o=this,t=this.getAttribute("key")||this.getAttribute("api-key");if(t&&t!==g.apiKey&&(g.apiKey=t),!g.apiKey){var e=g.apiKey$.subscribe(function(t){t&&o.getContent()});this.subscriptions.push(function(){return e.unsubscribe()})}var n=this.getAttribute("name")||this.getAttribute("model");if(n===this.previousName)return!1;var i=this.getAttribute("entry");if(this.unsubscribe(),!n)return!1;var r=this.currentContent;if(r)return this.data=r,this.loaded(),void g.trackImpression(r.id,r.testVariationId||r.id);this.previousName=n,this.classList.add("builder-loading");var s=this.getAttribute("slot"),a=g.get(n,h({key:(s?"slot:"+s:null)||!y.isEditing&&(this.getAttribute("entry")||n)||void 0,entry:i||void 0},this.options,{prerender:!0})).subscribe(function(t){if(o.classList.remove("builder-loading"),o.loaded(),t)if(o.classList.contains("builder-editor-injected"))o.unsubscribe();else{if(o.data=t,g.canTrack&&g.trackImpression(t.id,t.testVariationId||t.id),t.data&&t.data.html){o.innerHTML=t.data.html;for(var e=o.getElementsByTagName("script"),n=0;n<e.length;n++){var i=e[n];try{new Function(i.innerText)(t)}catch(t){console.warn("Eval error",t)}}r=new CustomEvent("load",{detail:t});o.dispatchEvent(r),t.data.animations&&t.data.animations.length&&y.nextTick(function(){y.animator.bindAnimations(t.data.animations)})}if(t.data&&t.data.jsCode&&!y.isIframe)try{new Function(t.data.jsCode)(t)}catch(t){console.warn("Eval error",t)}}else{o.classList.add("builder-no-content-found");var r=new CustomEvent("load",{detail:t});o.dispatchEvent(r)}},function(t){console.warn("Builder webcomponent error:",t),o.classList.add("builder-errored"),o.classList.add("builder-loaded"),o.classList.remove("builder-loading");var e=new CustomEvent("error",{detail:t});o.dispatchEvent(e)});this.subscriptions.push(function(){return a.unsubscribe()})},t.prototype.unsubscribe=function(){this.subscriptions&&(this.subscriptions.forEach(function(t){return t()}),this.subscriptions=[])},t}(HTMLElement);customElements.define("builder-simple-component",o);var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){var t=this.getAttribute("apiKey")||this.getAttribute("key"),e="false"!==this.getAttribute("canTrack");t&&g.apiKey!==t&&(g.apiKey=t),g.canTrack!==e&&(g.canTrack=e)},e.prototype.connectedCallback=function(){this.init()},e.prototype.attributeChangedCallback=function(){this.init()},e}(HTMLElement);customElements.define("builder-init",s)}a("VERSION","1.0.61-alpha.5")}}});
//# sourceMappingURL=builder-webcomponents.js.map
