!function(e){function t(t){for(var n,i,o=t[0],a=t[1],u=0,c=[];u=0;u--)(i=e[u])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function u(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function p(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i1||u(e,t)}))})}function u(e,t){try{(n=i[e](t)).value instanceof h?Promise.resolve(n.value.v).then(s,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),o.shift(),o.length&&u(o[0][0],o[0][1])}}function v(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=d(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function g(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.create},1021:function(e,t,n){"use strict";t.a=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}},1032:function(e,t,n){"use strict";function r(e){return e.map((function(e){return"url"in e?"\n @font-face {\n font-family: '".concat(e.uid,"';\n src: url(").concat(e.url,");\n }"):e.urls.map((function(t){return"\n @font-face {\n font-family: '".concat(e.uid,"';\n src: url(").concat(t.src,");\n ").concat(t.unicodeRange?"unicode-range: ".concat(t.unicodeRange,";"):"","\n }")})).join("\n")})).join("\n")}n.d(t,"a",(function(){return r}))},1034:function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(1035),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(133))},1035:function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,u,s=1,c={},l=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),r=function(t){e.postMessage(a+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n=t.__.length&&t.__.push({}),t.__[e]}function p(e){return h(_,e)}function h(e,t,n){var o=f(r++);return o.__c||(o.__c=i,o.__=[n?n(t):_(void 0,t),function(t){var n=e(o.__[0],t);o.__[0]!==n&&(o.__[0]=n,o.__c.setState({}))}]),o.__}function b(e,t){var n=f(r++);k(n.__H,t)&&(n.__=e,n.__H=t,i.__H.__h.push(n))}function v(e,t){var n=f(r++);k(n.__H,t)&&(n.__=e,n.__H=t,i.__h.push(n))}function g(e){return y((function(){return{current:e}}),[])}function m(e,t,n){v((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function y(e,t){var n=f(r++);return k(n.__H,t)?(n.__H=t,n.__h=e,n.__=e()):n.__}function w(e,t){return y((function(){return e}),t)}function O(e){var t=i.context[e.__c];if(!t)return e.__;var n=f(r++);return null==n.__&&(n.__=!0,t.sub(i)),t.props.value}function j(e,t){a.options.useDebugValue&&a.options.useDebugValue(t?t(e):e)}function C(e){var t=f(r++),n=p();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function E(){u.some((function(e){if(e.__P)try{e.__H.__h.forEach(x),e.__H.__h.forEach(D),e.__H.__h=[]}catch(t){return a.options.__e(t,e.__v),!0}})),u=[]}function x(e){e.t&&e.t()}function D(e){var t=e.__();"function"==typeof t&&(e.t=t)}function k(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function _(e,t){return"function"==typeof t?t(e):t}a.options.__r=function(e){s&&s(e),r=0,(i=e.__c).__H&&(i.__H.__h.forEach(x),i.__H.__h.forEach(D),i.__H.__h=[])},a.options.diffed=function(e){c&&c(e);var t=e.__c;if(t){var n=t.__H;n&&n.__h.length&&(1!==u.push(t)&&o===a.options.requestAnimationFrame||((o=a.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(E))}},a.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(x),e.__h=e.__h.filter((function(e){return!e.__||D(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],a.options.__e(n,e.__v)}})),l&&l(e,t)},a.options.unmount=function(e){d&&d(e);var t=e.__c;if(t){var n=t.__H;if(n)try{n.__.forEach((function(e){return e.t&&e.t()}))}catch(e){a.options.__e(e,t.__v)}}}},110:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(1);function i(e){var t="EXTERNAL_ATTACHMENT#"+JSON.stringify(e);console.info("Sending iframe message to parent:",t),window.parent.postMessage(t,"*")}function o(e){return Object(r.e)(this,void 0,void 0,(function(){return Object(r.h)(this,(function(t){return[2,new Promise((function(t){if(window.onGiosgInteractionEvent){if("function"!=typeof window.onGiosgInteractionEvent)return console.error("window.onGiosgInteractionEvent is not a function. No event was sent."),void t();var n=window.onGiosgInteractionEvent(e);if(!(n&&n instanceof Promise))return console.error("window.onGiosgInteractionEvent is not returning a promise. Event was sent but could get lost."),void t();n.then(t).catch((function(){console.error("window.onGiosgInterctionEvent returned a promise that rejected. We will continue as if nothing happened."),t()}))}else t()}))]}))}))}},111:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},112:function(e,t,n){"use strict";function r(e,t){return e.data.disablesElements.includes(t)}n.d(t,"a",(function(){return r}))},12:function(e,t,n){"use strict";n.d(t,"s",(function(){return a})),n.d(t,"c",(function(){return u})),n.d(t,"r",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"p",(function(){return l})),n.d(t,"q",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"m",(function(){return p})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return b})),n.d(t,"j",(function(){return v})),n.d(t,"i",(function(){return g})),n.d(t,"a",(function(){return y})),n.d(t,"o",(function(){return w})),n.d(t,"f",(function(){return O})),n.d(t,"e",(function(){return j})),n.d(t,"k",(function(){return C})),n.d(t,"n",(function(){return E})),n.d(t,"l",(function(){return x}));var r=n(1),i=n(26),o=n(22);function a(e,t){var n=Math.min(Math.max(e,0),1),r=Math.min(Math.max(t.a-n,0),1);return{r:t.r,g:t.g,b:t.b,a:r}}var u=function(e,t){return e?t:{}},s=function(){for(var e=[],t=0;t0?o:[""]).map((function(t){return"".concat(e.domain,"/").concat(t)}))}))}}),Object(r.f)([o.A,Object(r.j)("design:type",Array)],e.prototype,"rules",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Array)],e.prototype,"rooms",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Array)],e.prototype,"users",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Array)],e.prototype,"goals",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Array)],e.prototype,"roomsLinks",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],e.prototype,"customership",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Array)],e.prototype,"workflows",void 0),e}(),d=function(){function e(e,t,n){var r=this;Object.defineProperty(this,"giosgApi",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"workflowsApi",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"me",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"giosgIntegration",{enumerable:!0,configurable:!0,writable:!0,value:"loading"}),Object(o.z)(this),this.initGiosgIntegration().catch((function(e){r.giosgIntegration="error",console.error("Error occurred when fetching giosgIntegrations",e)}))}return Object.defineProperty(e.prototype,"initGiosgIntegration",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Object(r.e)(this,void 0,void 0,(function(){var e,t,n,i,o,u,s,d,f;return Object(r.h)(this,(function(r){switch(r.label){case 0:return e=this.me.organization_id,[4,Object(a.e)(this.giosgApi.userPermissions(this.me.id))];case 1:return r.sent().find((function(e){return"settings"===e.scope}))?[4,c(this.giosgApi,this.workflowsApi,e)]:(this.giosgIntegration="noAccess",[2]);case 2:return t=r.sent(),n=t.rules,i=t.rooms,o=t.users,u=t.goals,s=t.roomsLinks,d=t.customership,f=t.workflows,this.giosgIntegration=new l(n,i,o,u,s,d,f,this.giosgApi,e),[2]}}))}))}}),Object.defineProperty(e,"getGiosgIntegrationFetcher",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,r){return this.instance||(this.instance=new e(t,n,r)),this.instance}}),Object.defineProperty(e.prototype,"forceUpdateGiosgIntegration",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Object(r.e)(this,void 0,void 0,(function(){return Object(r.h)(this,(function(e){switch(e.label){case 0:return this.giosgIntegration="loading",[4,this.initGiosgIntegration()];case 1:return e.sent(),[2]}}))}))}}),Object(r.f)([o.A,Object(r.j)("design:type",Object)],e.prototype,"giosgIntegration",void 0),e}()},126:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.darken=t.transparentize=t.hexToRgb=void 0;var r=n(630),i=n(631);function o(e){return{red:Math.min(parseInt("".concat(e[1]).concat(e[2]),16),255),green:Math.min(parseInt("".concat(e[3]).concat(e[4]),16),255),blue:Math.min(parseInt("".concat(e[5]).concat(e[6]),16),255)}}function a(e){var t=e.toString(16);return 1===t.length?"0"+t:t}t.hexToRgb=o,t.transparentize=function(e,t){var n=o(t),r=Math.min(Math.max(1-e,0),1);return"rgba(".concat(n.red,", ").concat(n.green,", ").concat(n.blue,", ").concat(r,")")},t.darken=function(e,t){var n=(0,i.rgbToHsl)(o(t)),u=Math.min(Math.max(n.lightness-e,0),1);return function(e){return"#"+a(e.red)+a(e.green)+a(e.blue)}((0,r.hslToRgb)(n.hue,n.saturation,u))}},132:function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"e",(function(){return u})),n.d(t,"c",(function(){return s}));var r=n(1),i=function(e){return/^\${[^\${}]*?}$/.test(e)},o=function(e){function t(t,n){var r=e.call(this,t)||this;return Object.defineProperty(r,"variable",{enumerable:!0,configurable:!0,writable:!0,value:n}),r.name="InvalidVariableError",r}return Object(r.g)(t,e),t}(Error),a=function(e){function t(t){var n=e.call(this,t)||this;return n.name="UnexpectedCharacterError",n}return Object(r.g)(t,e),t}(Error),u=function(e){for(var t=0,n=[],r=function(e){var t=n[n.length-1];"text"===(null==t?void 0:t.type)?t.text+=e:n.push({type:"text",text:e})};t2||R(A)>3?"":" "}function V(e,t){for(;--t&&F()&&!(A<48||A>102||A>57&&A<65||A>70&&A<97););return N(e,I()+(t<6&&32==T()&&32==F()))}function W(e,t){for(;F()&&e+A!==57&&(e+A!==84||47!==T()););return"/*"+N(t,_-1)+"*"+f(47===e?e:F())}function H(e){for(;!R(T());)F();return N(e,_)}function G(e){return L(function e(t,n,r,i,o,a,u,s,c){var l=0,d=0,p=u,h=0,b=0,v=0,w=1,j=1,E=1,k=0,B="",P=o,N=a,R=i,M=B;for(;j;)switch(v=k,k=F()){case 40:if(108!=v&&58==y(M,p-1)){-1!=m(M+=g(U(k),"&","&\f"),"&\f")&&(E=-1);break}case 34:case 39:case 91:M+=U(k);break;case 9:case 10:case 13:case 32:M+=z(v);break;case 92:M+=V(I()-1,7);continue;case 47:switch(T()){case 42:case 47:C($(W(F(),I()),n,r),c);break;default:M+="/"}break;case 123*w:s[l++]=O(M)*E;case 125*w:case 59:case 0:switch(k){case 0:case 125:j=0;case 59+d:b>0&&O(M)-p&&C(b>32?K(M+";",i,r,p-1):K(g(M," ","")+";",i,r,p-2),c);break;case 59:M+=";";default:if(C(R=q(M,n,r,l,d,o,s,B,P=[],N=[],p),a),123===k)if(0===d)e(M,n,R,R,P,a,p,s,N);else switch(99===h&&110===y(M,3)?100:h){case 100:case 109:case 115:e(t,R,R,i&&C(q(t,R,R,0,0,o,s,B,o,P=[],p),N),o,N,p,s,i?P:N);break;default:e(M,R,R,R,[""],N,0,s,N)}}l=d=b=0,w=E=1,B=M="",p=u;break;case 58:p=1+O(M),b=v;default:if(w<1)if(123==k)--w;else if(125==k&&0==w++&&125==(A=_>0?y(S,--_):0,D--,10===A&&(D=1,x--),A))continue;switch(M+=f(k),k*w){case 38:E=d>0?1:(M+="\f",-1);break;case 44:s[l++]=(O(M)-1)*E,E=1;break;case 64:45===T()&&(M+=U(F())),h=T(),d=p=O(B=M+=H(I())),k++;break;case 45:45===v&&2==O(M)&&(w=0)}}return a}("",null,null,null,[""],e=M(e),0,[0],e))}function q(e,t,n,r,i,o,a,u,c,l,f){for(var p=i-1,h=0===i?o:[""],v=j(h),m=0,y=0,O=0;m0?h[C]+" "+E:g(E,/&\f/g,h[C])))&&(c[O++]=x);return B(e,t,n,0===i?s:u,c,l,f)}function $(e,t,n){return B(e,t,n,u,f(A),w(e,2,-2),0)}function K(e,t,n,r){return B(e,t,n,c,w(e,0,r),w(e,r+1,-1),r)}function Y(e,t){for(var n="",r=j(e),i=0;i-1&&!e.return)switch(e.type){case c:e.return=function e(t,n){switch(h(t,n)){case 5103:return a+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return a+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return a+t+o+t+i+t+t;case 6828:case 4268:return a+t+i+t+t;case 6165:return a+t+i+"flex-"+t+t;case 5187:return a+t+g(t,/(\w+).+(:[^]+)/,a+"box-$1$2"+i+"flex-$1$2")+t;case 5443:return a+t+i+"flex-item-"+g(t,/flex-|-self/,"")+t;case 4675:return a+t+i+"flex-line-pack"+g(t,/align-content|flex-|-self/,"")+t;case 5548:return a+t+i+g(t,"shrink","negative")+t;case 5292:return a+t+i+g(t,"basis","preferred-size")+t;case 6060:return a+"box-"+g(t,"-grow","")+a+t+i+g(t,"grow","positive")+t;case 4554:return a+g(t,/([^-])(transform)/g,"$1"+a+"$2")+t;case 6187:return g(g(g(t,/(zoom-|grab)/,a+"$1"),/(image-set)/,a+"$1"),t,"")+t;case 5495:case 3959:return g(t,/(image-set\([^]*)/,a+"$1$`$1");case 4968:return g(g(t,/(.+:)(flex-)?(.*)/,a+"box-pack:$3"+i+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+a+t+t;case 4095:case 3583:case 4068:case 2532:return g(t,/(.+)-inline(.+)/,a+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(O(t)-1-n>6)switch(y(t,n+1)){case 109:if(45!==y(t,n+4))break;case 102:return g(t,/(.+:)(.+)-([^]+)/,"$1"+a+"$2-$3$1"+o+(108==y(t,n+3)?"$3":"$2-$3"))+t;case 115:return~m(t,"stretch")?e(g(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==y(t,n+1))break;case 6444:switch(y(t,O(t)-3-(~m(t,"!important")&&10))){case 107:return g(t,":",":"+a)+t;case 101:return g(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+a+(45===y(t,14)?"inline-":"")+"box$3$1"+a+"$2$3$1"+i+"$2box$3")+t}break;case 5936:switch(y(t,n+11)){case 114:return a+t+i+g(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return a+t+i+g(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return a+t+i+g(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return a+t+i+t+t}return t}(e.value,e.length);break;case l:return Y([P(e,{value:g(e.value,"@","@"+a)})],r);case s:if(e.length)return E(e.props,(function(t){switch(v(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Y([P(e,{props:[g(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Y([P(e,{props:[g(t,/:(plac\w+)/,":"+a+"input-$1")]}),P(e,{props:[g(t,/:(plac\w+)/,":-moz-$1")]}),P(e,{props:[g(t,/:(plac\w+)/,i+"input-$1")]})],r)}return""}))}}];t.a=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||re;var o,a,u={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;nd.y&&(d.y=m.height),m.width>d.x&&(d.x=m.width)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}return"chat_message_visitor"!==e.environment.runtime&&"chat_message_user"!==e.environment.runtime&&a.allowScaling&&s&&c&&0!==d.x&&0!==d.y?Math.min(c/d.y,s/d.x,1):1}(e,o,c):1}),[o,c])},y=function(e){var t,n=e.store,r=e.innerRef,i=e.children,o=n.data,s=o.project,l=o.info,d=a.b.useCss(),f=Object(c.c)(n),h=m(n),g=void 0===s.mountSelector,y=a.b.jsx("div",{ref:r,className:d(v({scale:h,isFixed:g,isInline:!!s.mountAsInlineBlock,zIndex:null!==(t=s.zIndex)&&void 0!==t?t:u.b,stickToBottom:"bottom"===f.arrangement.default.yType,stickToRight:"right"===f.arrangement.default.xType})),role:"region","aria-label":"".concat(l.projectName," interaction")},i);if(s.mountAsInlineBlock){var w=Object(p.c)(f,{additionalPadding:20});return a.b.jsx("div",{className:d(b({width:w.width*h,height:w.height*h}))},y)}return y},w=n(598),O=function(e){var t,n=e.store,i=n.data,o=i.project,u=i.info,p=i.shown,h=Object(c.c)(n),b=!!o.isInInvisibleViewMode,v=Object(r.k)(Object(a.g)(!1),2),g=v[0],m=v[1];!function(e,t){Object(a.e)((function(){var n=function(n){var r;try{var i=JSON.parse(n.data);if("sendGiosgEvent"===i.type&&(null===(r=i.event)||void 0===r?void 0:r.interactionUid)===t){var o=e.data.project.workflowUid,a=i.event,u=a.action,c=a.dim2,l=a.dim3,d=a.dim4,f=a.workflowUid,p=a.vendor;Object(s.a)({store:e,action:u,workflowUid:f||o,vendor:p,dim2:c||void 0,dim3:l||void 0,stepName:d||void 0})}}catch(e){}};return window.addEventListener("message",n),function(){window.removeEventListener("message",n)}}),[t,e])}(n,u.interactionUuid),t=u.fonts,a.b.useEffect((function(){var e=document.createElement("style");return e.textContent=Object(l.a)(t),document.body.appendChild(e),function(){document.body.removeChild(e)}}),[t]);var O=function(e){return a.b.jsx(a.b.Fragment,null,a.b.jsx("div",{tabIndex:0,"data-interaction-id":u.interactionUuid,"aria-label":"Interaction ".concat(u.projectName)}),o.views.map((function(t){return a.b.jsx(d.a,{key:t.uid,shown:t.uid===h.uid,enter:o.animations.change,exit:o.mountAsInlineBlock?void 0:o.animations.change,render:function(r){return e(a.b.jsx(f.a,{includeElementsIds:!0,store:n,innerRef:r,element:t,activeBreakpoint:n.data.activeBreakpoint,enableResponsivePlayer:b,isInteractionRendered:g}),t,g)}})})))};return a.b.jsx(d.a,{animateOnMount:!0,shown:p,enter:o.animations.enter,exit:o.animations.exit,onAnimationEnd:function(e){m(e)},render:function(e){return b?O((function(t,r){return a.b.jsx(w.a,{store:n,innerRef:e,isDesignMode:!1,view:r},t)})):a.b.jsx(y,{innerRef:e,store:n},O((function(e){return e})))}})};var j=function(e){var t,n=(t=Object(r.k)(a.b.useState(Object.create(null)),2)[1],a.b.useCallback((function(){t(Object.create(null))}),[t]));return e.store.addUpdateListener((function(){n()})),e.store.isDestroyed?null:e.children},C=n(518),E=n(63),x=n(45),D=n(387),k=n(110),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.g)(t,e),Object.defineProperty(t.prototype,"componentDidCatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e){Object(E.c)(e)}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.props.children}}),t}(a.b.Component);function A(e,t,n,r){var i,o,l=document.createElement("div");if(l.className=u.h,e.mountAsInlineBlock||(l.style.width="0",l.style.height="0"),Object(k.a)({type:"interactiondesigner:start",interactionId:t.interactionUuid}),Object(s.b)({store:n,action:"start",value:1}),g(e).appendChild(l),e.jsCustom)try{Object(D.c)(null!==(i=e.noUnsafeEvaluation)&&void 0!==i&&i,t.interactionUuid,e.jsCustom,r)}catch(e){var d="Custom JS Error: ".concat(e.message);t.isPreviewMode?(console.info(d),console.info(e),n.setData({error:d})):(console.error(d),console.error(e),n.destroy())}var f=Object(C.b)(l,Object(C.a)(t.projectUid));n.addUpdateListener((function(e){var t=Object.keys((null==e?void 0:e.fields)||{}).length>0,r=Object.keys((null==e?void 0:e.dataFields)||{}).length>0;if(t||r){var i=Object(c.c)(n);Object(x.b)(n,i,[]).catch((function(e){console.info("Error while running events on data update",e)}))}}));var p=_;if(a.b.render(a.b.jsx(p,null,a.b.jsx(a.a.Provider,{value:f},a.b.jsx(j,{store:n},a.b.jsx(O,{store:n})))),l),null===(o=window.giosg)||void 0===o?void 0:o.interactionRuntime){var h=window.giosg.interactionRuntime[t.interactionUuid];h?h.destroy.then(n.destroy.bind(n)):(console.error('No runtime for "'.concat(t.projectName,'". UUID=').concat(t.interactionUuid,".")),Object(E.b)(new Error("Interaction runtime was not found")))}}var S=n(273),B=n(239),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.g)(t,e),t}(Error);function F(e,t){var n,a;return Object(r.e)(this,void 0,void 0,(function(){var u,s,c,l,d,f,p,h,b,v,g;return Object(r.h)(this,(function(m){switch(m.label){case 0:return u=e.project,s=e.info.interactionUuid,[4,(e.info,new Promise((function(e,t){window._giosg?window._giosg((function(){var n=window.GiosgClient;if(n){var r=window.giosg;n.visitorCidDeferred?n.visitorCidDeferred.then((function(){r?e([r,n]):t(new Error("No giosg or no _giosg"))})):e([r,n])}else t(new Error("No giosg or no GiosgClient!"))})):e([void 0,void 0])})))];case 1:if(c=r.k.apply(void 0,[m.sent(),2]),l=c[0],d=c[1],f=Object(r.a)(Object(r.a)({},u),{views:u.views.map((function(e){return Object(i.a)(e,u)}),u)}),p=new S.a(f,e.info,l,d),h=new o.b(p),t){if(p.setData({shown:!1}),s in(null!==(n=window.giosgInteractions)&&void 0!==n?n:{}))throw new P('Interaction with UID "'.concat(s,'" was already initialized. Same interaction can\'t be added to the page more than once when using "preventAutomaticStartup" flag.'));window.giosgInteractions=Object(r.a)(Object(r.a)({},null!==(a=window.giosgInteractions)&&void 0!==a?a:{}),((g={})[s]=h,g))}return b=p.environment.getInteractionBuilderBaseUrl(),Object(B.b)(u,l),[4,Object(D.a)(u.noUnsafeEvaluation,b,e.info)];case 2:return m.sent(),Object(k.a)({type:"interactiondesigner:ready",interactionId:s}),p.data.shown?A(u,e.info,p,h):v=p.addUpdateListener((function(){p.data.shown&&(v(),A(u,e.info,p,h))})),[2,{destroy:function(){return p.destroy()}}]}}))}))}n.p=document.currentScript&&"src"in document.currentScript?"".concat(new URL(document.currentScript.src).origin,"/"):"https://globalcdn.interactiondesigner.giosg.com/"},167:function(e,t,n){"use strict";n.d(t,"h",(function(){return y})),n.d(t,"d",(function(){return w})),n.d(t,"e",(function(){return O})),n.d(t,"j",(function(){return E})),n.d(t,"a",(function(){return x})),n.d(t,"b",(function(){return D})),n.d(t,"k",(function(){return k})),n.d(t,"g",(function(){return _})),n.d(t,"c",(function(){return A})),n.d(t,"f",(function(){return S})),n.d(t,"i",(function(){return B}));var r=n(1),i=n(0),o=n(8),a=n(5),u=n(72),s={isHistory:e=>Object(u.a)(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||a.d.isOperationList(e.redos[0].operations))&&(0===e.undos.length||a.d.isOperationList(e.undos[0].operations))},c=(new WeakMap,new WeakMap),l=new WeakMap,d={isHistoryEditor:e=>s.isHistory(e.history)&&a.a.isEditor(e),isMerging:e=>l.get(e),isSaving:e=>c.get(e),redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=d.isMerging(e);l.set(e,!1),t(),l.set(e,n)},withoutSaving(e,t){var n=d.isSaving(e);c.set(e,!1),t(),c.set(e,n)}},f=(e,t)=>!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!a.e.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!a.e.equals(e.path,t.path)),p=(e,t)=>"set_selection"!==e.type,h=n(211),b=n(317),v=n(153),g=n(208),m=n(340),y=function(e,t,n){return!!Object(r.k)(a.a.nodes(t,{at:a.a.unhangRange(t,n),match:function(t){return function(e){return!a.a.isEditor(e)&&a.b.isElement(e)}(t)&&t.type===e}}),1)[0]},w=function(e){var t;return null!==(t=Object(o.G)(e.richText))&&void 0!==t?t:Object(g.b)(e.label,e.designs)},O=function(e){return document.getElementById(Object(v.a)(e))},j=function(e){var t=(e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:e}=t,{redos:n}=e;if(n.length>0){var r=n[n.length-1];r.selectionBefore&&a.j.setSelection(t,r.selectionBefore),d.withoutSaving(t,()=>{a.a.withoutNormalizing(t,()=>{for(var e of r.operations)t.apply(e)})}),e.redos.pop(),t.writeHistory("undos",r)}},t.undo=()=>{var{history:e}=t,{undos:n}=e;if(n.length>0){var r=n[n.length-1];d.withoutSaving(t,()=>{a.a.withoutNormalizing(t,()=>{var e=r.operations.map(a.d.inverse).reverse();for(var n of e)t.apply(n);r.selectionBefore&&a.j.setSelection(t,r.selectionBefore)})}),t.writeHistory("redos",r),e.undos.pop()}},t.apply=e=>{var{operations:r,history:i}=t,{undos:o}=i,a=o[o.length-1],u=a&&a.operations[a.operations.length-1],s=d.isSaving(t),c=d.isMerging(t);if(null==s&&(s=p(e)),s){if(null==c&&(c=null!=a&&(0!==r.length||f(e,u))),a&&c)a.operations.push(e);else{var l={operations:[e],selectionBefore:t.selection};t.writeHistory("undos",l)}for(;o.length>100;)o.shift();i.redos=[]}n(e)},t.writeHistory=(e,n)=>{t.history[e].push(n)},t})(Object(h.f)(Object(a.k)())),n=t.isInline,r=t.isVoid;return t.children=w(e),t.isInline=function(e){return"VARIABLE"===e.type||n(e)},t.isVoid=function(e){return"VARIABLE"===e.type||r(e)},t},C={isDOMReady:!1,canUndo:!1,canRedo:!1},E=function(e){var t=e.editor,n=e.editorState;n.canUndo=t.history.undos.length>0,n.canRedo=t.history.redos.length>0},x={},D=function(e){return Object.entries(x).filter((function(t){var n,i=Object(r.k)(t,2),o=i[0],a=i[1];return!!(null===(n=e.textEditorsState[o])||void 0===n?void 0:n.isDOMReady)&&!!a})).map((function(e){return Object(r.k)(e,2)[1]}))},k=function(e,t){var n,r=t.textEditorsState,o=e.uid,a=Object(i.useRef)(x[o]);a.current&&(null===(n=r[o])||void 0===n?void 0:n.isDOMReady)||(a.current=j(e),x[o]=a.current);var u=a.current;if(!r[o]){r[o]=C;var s=u.undo,c=u.redo;u.undo=function(){s(),E({editor:u,editorState:r[o]})},u.redo=function(){c(),E({editor:u,editorState:r[o]})}}return{editor:u,editorState:r[o]}},_=function(e){var t=Object(r.k)(e),n=t[0],i=t.slice(1),o=Object(r.a)({},n);return i.forEach((function(e){Object.entries(e).forEach((function(e){var t=Object(r.k)(e,2),n=t[0],i=t[1];o[n]!==i&&(o[n]=void 0)}))})),o},A=function(e){var t;return null!==(t=e.selection)&&void 0!==t?t:function(e){var t=Object(r.k)(a.a.edges(e,[]),2);return{anchor:t[0],focus:t[1]}}(e)},S=function(e){var t=e.map((function(e){var t,n,i,o,u,s=A(e),c=a.a.nodes(e,{at:s,voids:!0,match:function(e){return a.i.isText(e)}}),l=c.next();if(!(null==l?void 0:l.value))return{hasCustomFont:!1};var d=Object(r.k)(l.value,1)[0],f=Object(r.a)(Object(r.a)({},d),{hasCustomFont:d.fontFamily&&Object(b.c)(d.fontFamily)}),p=function(e,t){if(!a.f.isAfter(a.g.end(s),{path:t,offset:0}))return"break";m.b.forEach((function(t){e[t]!==f[t]&&(f[t]=void 0)})),e.fontFamily&&!f.hasCustomFont&&(f.hasCustomFont=Object(b.c)(e.fontFamily))};try{for(var h=Object(r.n)(c),v=h.next();!v.done;v=h.next()){var g=Object(r.k)(v.value,2);if("break"===p(g[0],g[1]))break}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}var y=a.a.nodes(e,{at:s,voids:!0,match:function(e){return a.b.isElement(e)&&"VARIABLE"===e.type}}).next();if(y.value){var w=Object(r.k)(y.value,1)[0];return Object(r.a)({type:"VARIABLE",variable:w.variable},f)}var O=a.a.nodes(e,{at:s,match:function(e){return a.b.isElement(e)}}),j=Object(r.k)(null!==(u=O.next().value)&&void 0!==u?u:[{textAlignment:void 0,type:void 0}],1)[0],C=Object(r.a)(Object(r.a)({},j),{variable:void 0}),E={textAlignment:C.textAlignment,type:C.type,variable:C.variable};try{for(var x=Object(r.n)(O),D=x.next();!D.done;D=x.next()){var k=Object(r.k)(D.value,1)[0];k.textAlignment!==E.textAlignment&&(E.textAlignment=void 0),[E.type,k.type].includes("LIST_ITEM")||k.type===E.type||(E.type=void 0)}}catch(e){i={error:e}}finally{try{D&&!D.done&&(o=x.return)&&o.call(x)}finally{if(i)throw i.error}}var _=a.g.isCollapsed(s)?a.a.marks(e):{};return Object(r.a)(Object(r.a)(Object(r.a)({},E),f),_)})),n=!!t.find((function(e){return e.hasCustomFont}));return Object(r.a)(Object(r.a)({},_(t)),{hasCustomFont:n})},B=function(e,t){return!!S(t)[e]}},168:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(264);function i(e,t,n){return(t=Object(r.a)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},169:function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r="^(https?:\\/\\/)?\\S+\\.\\S{2,}$",i=new RegExp(r);function o(e){return e.split(/((?:http\:\/\/|https\:\/\/)?\w(?:[\w\-\.]*)\.(?:\w+)(?:\/|\w|\%\d\d)*#?(?:[\w\/\-]*))/g)}function a(e,t){return void 0===t&&(t="https"),e.startsWith("http://")||e.startsWith("https://")?e:"".concat(t,"://").concat(e)}},1695:function(e,t,n){"use strict";(function(e){var r=n(1021),i=setTimeout;function o(e){return Boolean(e&&void 0!==e.length)}function a(){}function u(e){if(!(this instanceof u))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function s(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,u._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void l(t.promise,e)}c(t.promise,r)}else(1===e._state?c:l)(t.promise,e._value)}))):e._deferreds.push(t)}function c(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof u)return e._state=3,e._value=t,void d(e);if("function"==typeof n)return void p((r=n,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,d(e)}catch(t){l(e,t)}var r,i}function l(e,t){e._state=2,e._value=t,d(e)}function d(e){2===e._state&&0===e._deferreds.length&&u._immediateFn((function(){e._handled||u._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i1;)1&e&&(t+=n),e>>=1,n+=n;return t+n}),Array.prototype.findIndex||(Array.prototype.findIndex=function(e){if(null===this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("callback must be a function");for(var t=Object(this),n=t.length>>>0,r=arguments[1],i=0;i1?arguments[1]:void 0,u=a?Number(a):0;isNaN(u)&&(u=0);var s=Math.min(Math.max(u,0),i);return t.call(r,o,u)===s}}String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),Array.prototype.includes||(Array.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),-1!==this.indexOf(e,t)}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{value:function(e,t){var n=t||this;if(null===n)throw new TypeError("Array.prototype.flatMap called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");for(var r=[],i=Object(n),o=i.length>>>0,a=0;a()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@(((\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\.){3}\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b)|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function o(e){if(/^[+]?[0-9]*([ ]?\([0-9]{1,4}\))?[0-9 -]*$/.test(e)&&!/[ ]{3}|\-{2}| -|- |\)-/.exec(e)){var t=e.replace(/[ ()-]/g,"");return/^[+]?[0-9]{4,15}$/.test(t)}return!1}function a(e){return!isNaN(e)}function u(e){return/^\-?\d*(\.\d*)?$/.test(e)}function s(e){var t=e.split(/[\s,;]+/).filter((function(e){return e}));return t.every((function(e){return function(e){try{return new URL("http://".concat(e)).hostname===e}catch(e){return!1}}(e)}))?t.join("\n"):null}function c(e){return f(e)||null!==s(e)}function l(e,t){void 0===t&&(t=!0);var n=e.split(/[\s,;]+/).filter((function(e){return e}));return n.every((function(e){return i(e)||t&&Object(r.d)(e)}))?n.join("\n"):null}function d(e,t){return void 0===t&&(t=!0),f(e)||null!==l(e,t)}function f(e){return/^\s*$/i.test(e)}},190:function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return B}));var r=n(1),i=n(30),o=n(51),a=n(74),u=n(28),s=function(){function e(e,t){Object.defineProperty(this,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:t})}return Object.defineProperty(e.prototype,"storeElement",{get:function(){var e=Object(u.d)(this.store,this.initialElement.uid);if(!e||e.type!==this.initialElement.type)throw new Error("Element is not found.");return e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){var e,t=Object(u.d)(this.store,this.initialElement.uid);return!(null!==(e=t.hidden)&&void 0!==e?e:t.arrangement.default.hidden)},set:function(e){Object(u.i)(this.store,Object(r.a)(Object(r.a)({},this.storeElement),{hidden:!e}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isClicked",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return!!this.store.data.elementClicks.find((function(t){return t===e.initialElement.uid}))}}),Object.defineProperty(e.prototype,"applyThemeStyle",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n=this,i=null===(t=this.store.data.info.themeStyles)||void 0===t?void 0:t.find((function(t){return t.elementType===n.initialElement.type&&t.name===e}));i&&Object(u.i)(this.store,Object(r.a)(Object(r.a)({},this.storeElement),{designs:i.designs}))}}),Object.defineProperty(e.prototype,"disabled",{set:function(e){var t=this;if(e){var n=new Set(Object(r.m)(Object(r.m)([],Object(r.k)(this.store.data.disablesElements),!1),[this.initialElement.uid],!1));this.store.setData({disablesElements:Object(r.m)([],Object(r.k)(n),!1)})}else this.store.setData({disablesElements:this.store.data.disablesElements.filter((function(e){return e!==t.initialElement.uid}))})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"addEventListener",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;return this.store.setData({jsApiEventListeners:Object(r.m)(Object(r.m)([],Object(r.k)(this.store.data.jsApiEventListeners),!1),[{type:e,listener:t,elementUid:this.initialElement.uid}],!1)}),function(){n.store.setData({jsApiEventListeners:n.store.data.jsApiEventListeners.filter((function(e){return e.listener!==t}))})}}}),e}(),c=function(e){function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperty(r,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"store",{enumerable:!0,configurable:!0,writable:!0,value:n}),r}return Object(r.g)(t,e),Object.defineProperty(t.prototype,"text",{get:function(){return this.storeElement.label},set:function(e){Object(u.i)(this.store,Object(r.a)(Object(r.a)({},this.storeElement),{label:e}))},enumerable:!1,configurable:!0}),t}(s),l=function(e){function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperty(r,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"store",{enumerable:!0,configurable:!0,writable:!0,value:n}),r}return Object(r.g)(t,e),Object.defineProperty(t.prototype,"checked",{get:function(){var e=this.store.data.fields[this.initialElement.uid];if(void 0===e)return!1;if("boolean"!=typeof e)throw new Error("Expected boolean field value.");return e},set:function(e){var t;this.store.setData({fields:Object(r.a)(Object(r.a)({},this.store.data.fields),(t={},t[this.initialElement.uid]=e,t))})},enumerable:!1,configurable:!0}),t}(s),d={api:function(e){function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperty(r,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"store",{enumerable:!0,configurable:!0,writable:!0,value:n}),r}return Object(r.g)(t,e),t}(s)},f={api:function(e){function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperty(r,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"store",{enumerable:!0,configurable:!0,writable:!0,value:n}),r}return Object(r.g)(t,e),t}(s)},p=function(e){function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperty(r,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"store",{enumerable:!0,configurable:!0,writable:!0,value:n}),r}return Object(r.g)(t,e),t}(s),h=function(e){function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperty(r,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"store",{enumerable:!0,configurable:!0,writable:!0,value:n}),r}return Object(r.g)(t,e),Object.defineProperty(t.prototype,"url",{get:function(){return this.storeElement.imageUrl},set:function(e){Object(u.i)(this.store,Object(r.a)(Object(r.a)({},this.storeElement),{imageUrl:e,giosgAssetUrl:void 0}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e=this.store.data.fields[this.initialElement.uid];return void 0!==e?String(e):void 0},set:function(e){var t;"string"!=typeof e&&void 0!==e||this.store.setData({fields:Object(r.a)(Object(r.a)({},this.store.data.fields),(t={},t[this.initialElement.uid]=e,t))})},enumerable:!1,configurable:!0}),t}(s),b=function(e){function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperty(r,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"store",{enumerable:!0,configurable:!0,writable:!0,value:n}),r}return Object(r.g)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){var e=this.store.data.fields[this.initialElement.uid];if(void 0===e)return"number"===this.initialElement.inputFieldType?void 0:"";if("number"===this.initialElement.inputFieldType){if(!("number"==typeof e))throw new Error("Expected field value to be number")}else if("string"!=typeof e)throw new Error("Expected field value to be string");return e},set:function(e){var t;if("number"===this.initialElement.inputFieldType&&!("number"==typeof e||void 0===e))throw new Error("Expected field value to be number or undefined");this.store.setData({fields:Object(r.a)(Object(r.a)({},this.store.data.fields),(t={},t[this.initialElement.uid]=e,t))})},enumerable:!1,configurable:!0}),t}(s),v=function(e){function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperty(r,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"store",{enumerable:!0,configurable:!0,writable:!0,value:n}),r}return Object(r.g)(t,e),t}(s),g=function(e){function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperty(r,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"store",{enumerable:!0,configurable:!0,writable:!0,value:n}),r}return Object(r.g)(t,e),t}(s),m=n(27),y=function(e){function t(t,n){var r=e.call(this,t,n)||this;return Object.defineProperty(r,"initialElement",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"store",{enumerable:!0,configurable:!0,writable:!0,value:n}),r}return Object(r.g)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){var e=this.store.data.fields[this.initialElement.uid];if(void 0===e)return null;if("number"!=typeof e)throw new Error("Expected number field value.");return e>=0&&e=0&&e=0&&e=0&&e2||N(_)>3?"":" "}function z(e,t){for(;--t&&P()&&!(_<48||_>102||_>57&&_<65||_>70&&_<97););return I(e,T()+(t<6&&32==F()&&32==P()))}function V(e,t){for(;P()&&e+_!==57&&(e+_!==84||47!==F()););return"/*"+I(t,k-1)+"*"+d(47===e?e:P())}function W(e){for(;!N(F());)P();return I(e,k)}function H(e){return M(function e(t,n,r,i,o,a,u,s,c){var l=0,f=0,p=u,h=0,b=0,y=0,O=1,C=1,D=1,S=0,B="",I=o,N=a,R=i,M=B;for(;C;)switch(y=S,S=P()){case 40:if(108!=y&&58==m(M,p-1)){-1!=g(M+=v(L(S),"&","&\f"),"&\f")&&(D=-1);break}case 34:case 39:case 91:M+=L(S);break;case 9:case 10:case 13:case 32:M+=U(y);break;case 92:M+=z(T()-1,7);continue;case 47:switch(F()){case 42:case 47:j(q(V(P(),T()),n,r),c);break;default:M+="/"}break;case 123*O:s[l++]=w(M)*D;case 125*O:case 59:case 0:switch(S){case 0:case 125:C=0;case 59+f:-1==D&&(M=v(M,/\f/g,"")),b>0&&w(M)-p&&j(b>32?$(M+";",i,r,p-1):$(v(M," ","")+";",i,r,p-2),c);break;case 59:M+=";";default:if(j(R=G(M,n,r,l,f,o,s,B,I=[],N=[],p),a),123===S)if(0===f)e(M,n,R,R,I,a,p,s,N);else switch(99===h&&110===m(M,3)?100:h){case 100:case 108:case 109:case 115:e(t,R,R,i&&j(G(t,R,R,0,0,o,s,B,o,I=[],p),N),o,N,p,s,i?I:N);break;default:e(M,R,R,R,[""],N,0,s,N)}}l=f=b=0,O=D=1,B=M="",p=u;break;case 58:p=1+w(M),b=y;default:if(O<1)if(123==S)--O;else if(125==S&&0==O++&&125==(_=k>0?m(A,--k):0,x--,10===_&&(x=1,E--),_))continue;switch(M+=d(S),S*O){case 38:D=f>0?1:(M+="\f",-1);break;case 44:s[l++]=(w(M)-1)*D,D=1;break;case 64:45===F()&&(M+=L(P())),h=F(),f=p=w(B=M+=W(T())),S++;break;case 45:45===y&&2==w(M)&&(O=0)}}return a}("",null,null,null,[""],e=R(e),0,[0],e))}function G(e,t,n,r,i,o,a,s,c,d,f){for(var p=i-1,b=0===i?o:[""],g=O(b),m=0,w=0,j=0;m0?b[C]+" "+E:v(E,/&\f/g,b[C])))&&(c[j++]=x);return S(e,t,n,0===i?u:s,c,d,f)}function q(e,t,n){return S(e,t,n,a,d(_),y(e,2,-2),0)}function $(e,t,n,r){return S(e,t,n,s,y(e,0,r),y(e,r+1,-1),r)}function K(e,t){for(var n="",r=O(e),i=0;i-1&&!e.return)switch(e.type){case s:return void(e.return=function e(t,n,a){switch(p(t,n)){case 5103:return o+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return o+t+t;case 4789:return i+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return o+t+i+t+r+t+t;case 5936:switch(m(t,n+11)){case 114:return o+t+r+v(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return o+t+r+v(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return o+t+r+v(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return o+t+r+t+t;case 6165:return o+t+r+"flex-"+t+t;case 5187:return o+t+v(t,/(\w+).+(:[^]+)/,o+"box-$1$2"+r+"flex-$1$2")+t;case 5443:return o+t+r+"flex-item-"+v(t,/flex-|-self/g,"")+(b(t,/flex-|baseline/)?"":r+"grid-row-"+v(t,/flex-|-self/g,""))+t;case 4675:return o+t+r+"flex-line-pack"+v(t,/align-content|flex-|-self/g,"")+t;case 5548:return o+t+r+v(t,"shrink","negative")+t;case 5292:return o+t+r+v(t,"basis","preferred-size")+t;case 6060:return o+"box-"+v(t,"-grow","")+o+t+r+v(t,"grow","positive")+t;case 4554:return o+v(t,/([^-])(transform)/g,"$1"+o+"$2")+t;case 6187:return v(v(v(t,/(zoom-|grab)/,o+"$1"),/(image-set)/,o+"$1"),t,"")+t;case 5495:case 3959:return v(t,/(image-set\([^]*)/,o+"$1$`$1");case 4968:return v(v(t,/(.+:)(flex-)?(.*)/,o+"box-pack:$3"+r+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+o+t+t;case 4200:if(!b(t,/flex-|baseline/))return r+"grid-column-align"+y(t,n)+t;break;case 2592:case 3360:return r+v(t,"template-","")+t;case 4384:case 3616:return a&&a.some((function(e,t){return n=t,b(e.props,/grid-\w+-end/)}))?~g(t+(a=a[n].value),"span")?t:r+v(t,"-start","")+t+r+"grid-row-span:"+(~g(a,"span")?b(a,/\d+/):+b(a,/\d+/)-+b(t,/\d+/))+";":r+v(t,"-start","")+t;case 4896:case 4128:return a&&a.some((function(e){return b(e.props,/grid-\w+-start/)}))?t:r+v(v(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return v(t,/(.+)-inline(.+)/,o+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(w(t)-1-n>6)switch(m(t,n+1)){case 109:if(45!==m(t,n+4))break;case 102:return v(t,/(.+:)(.+)-([^]+)/,"$1"+o+"$2-$3$1"+i+(108==m(t,n+3)?"$3":"$2-$3"))+t;case 115:return~g(t,"stretch")?e(v(t,"stretch","fill-available"),n,a)+t:t}break;case 5152:case 5920:return v(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(e,n,i,o,a,u,s){return r+n+":"+i+s+(o?r+n+"-span:"+(a?u:+u-+i)+s:"")+t}));case 4949:if(121===m(t,n+6))return v(t,":",":"+o)+t;break;case 6444:switch(m(t,45===m(t,14)?18:11)){case 120:return v(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+o+(45===m(t,14)?"inline-":"")+"box$3$1"+o+"$2$3$1"+r+"$2box$3")+t;case 100:return v(t,":",":"+r)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return v(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,n));case c:return K([B(e,{value:v(e.value,"@","@"+o)})],a);case u:if(e.length)return C(e.props,(function(t){switch(b(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return K([B(e,{props:[v(t,/:(read-\w+)/,":"+i+"$1")]})],a);case"::placeholder":return K([B(e,{props:[v(t,/:(plac\w+)/,":"+o+"input-$1")]}),B(e,{props:[v(t,/:(plac\w+)/,":"+i+"$1")]}),B(e,{props:[v(t,/:(plac\w+)/,r+"input-$1")]})],a)}return""}))}}},208:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return s}));var r=n(1),i=n(210),o=n(12),a=function(e){var t=e.fontFamily,n=e.textColor,r=e.fontSize,i=e.textAlignment,a=e.fontBold,u=e.fontItalic,s=e.fontUnderlined;return{fontFamily:t,fontSize:r,textAlignment:i,color:Object(o.p)(n),bold:a,italic:u,underline:s}},u=a(i.a),s=function(e,t){var n=a(null!=t?t:i.a),o=n.textAlignment,u=Object(r.l)(n,["textAlignment"]);return[{type:"PARAGRAPH",textAlignment:o,children:[Object(r.a)({text:e},u)]}]}},209:function(e,t,n){"use strict";n.d(t,"e",(function(){return p})),n.d(t,"g",(function(){return v})),n.d(t,"a",(function(){return g})),n.d(t,"f",(function(){return y})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return O})),n.d(t,"d",(function(){return C}));var r=n(1),i=n(26),o=n(41),a=n(515);function u(e,t){return Math.round(e/t)*t-e}function s(e,t,n){if("middle"===n.constraint)return{delta:u(Math.floor((e+t)/2)-n.middle,n.stepSize),constraint:"middle"};var r=null===n.constraint||"start"===n.constraint||"stretch"===n.constraint?e-n.start:1/0,i=null===n.constraint||"end"===n.constraint||"stretch"===n.constraint?n.end-t:1/0;return rt||o>e&&a=t&&u>=n?o-e-r:a>t&&un?a-t+i:0}var b=function(e,t){var n=window,r=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,u=t.skipOverflowHiddenElements,s="function"==typeof a?a:function(e){return e!==a};if(!d(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,l=[],f=e;d(f)&&s(f);){if((f=f.parentElement)===c){l.push(f);break}null!=f&&f===document.body&&p(f)&&!p(document.documentElement)||null!=f&&p(f,u)&&l.push(f)}for(var b=n.visualViewport?n.visualViewport.width:innerWidth,v=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,m=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),w=y.height,O=y.width,j=y.top,C=y.right,E=y.bottom,x=y.left,D="start"===i||"nearest"===i?j:"end"===i?E:j+w/2,k="center"===o?x+O/2:"end"===o?C:x,_=[],A=0;A=0&&x>=0&&E<=v&&C<=b&&j>=T&&E<=N&&x>=R&&C<=I)return _;var M=getComputedStyle(S),L=parseInt(M.borderLeftWidth,10),U=parseInt(M.borderTopWidth,10),z=parseInt(M.borderRightWidth,10),V=parseInt(M.borderBottomWidth,10),W=0,H=0,G="offsetWidth"in S?S.offsetWidth-S.clientWidth-L-z:0,q="offsetHeight"in S?S.offsetHeight-S.clientHeight-U-V:0;if(c===S)W="start"===i?D:"end"===i?D-v:"nearest"===i?h(m,m+v,v,U,V,m+D,m+D+w,w):D-v/2,H="start"===o?k:"center"===o?k-b/2:"end"===o?k-b:h(g,g+b,b,L,z,g+k,g+k+O,O),W=Math.max(0,W+m),H=Math.max(0,H+g);else{W="start"===i?D-T-U:"end"===i?D-N+V+q:"nearest"===i?h(T,N,P,U,V+q,D,D+w,w):D-(T+P/2)+q/2,H="start"===o?k-R-L:"center"===o?k-(R+F/2)+G/2:"end"===o?k-I+z+G:h(R,I,F,L,z+G,k,k+O,O);var $=S.scrollLeft,K=S.scrollTop;D+=K-(W=Math.max(0,Math.min(K+W,S.scrollHeight-P+q))),k+=$-(H=Math.max(0,Math.min($+H,S.scrollWidth-F+G)))}_.push({el:S,top:W,left:H})}return _};function v(e){return e===Object(e)&&0!==Object.keys(e).length}var g,m=function(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(v(t)&&"function"==typeof t.behavior)return t.behavior(n?b(e,t):[]);if(n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:v(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,i=e.top,o=e.left;r.scroll&&n?r.scroll({top:i,left:o,behavior:t}):(r.scrollTop=i,r.scrollLeft=o)}))}(b(e,r),r.behavior)}},y=n(5),w=[],O="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(g||(g={}));var j,C=function(e){return Object.freeze(e)},E=function(e,t){this.inlineSize=e,this.blockSize=t,C(this)},x=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,C(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),D=function(e){return e instanceof SVGElement&&"getBBox"in e},k=function(e){if(D(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},_=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},A="undefined"!=typeof window?window:{},S=new WeakMap,B=/auto|scroll/,P=/^tb|vertical/,F=/msie|trident/i.test(A.navigator&&A.navigator.userAgent),T=function(e){return parseFloat(e||"0")},I=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new E((n?t:e)||0,(n?e:t)||0)},N=C({devicePixelContentBoxSize:I(),borderBoxSize:I(),contentBoxSize:I(),contentRect:new x(0,0,0,0)}),R=function(e,t){if(void 0===t&&(t=!1),S.has(e)&&!t)return S.get(e);if(k(e))return S.set(e,N),N;var n=getComputedStyle(e),r=D(e)&&e.ownerSVGElement&&e.getBBox(),i=!F&&"border-box"===n.boxSizing,o=P.test(n.writingMode||""),a=!r&&B.test(n.overflowY||""),u=!r&&B.test(n.overflowX||""),s=r?0:T(n.paddingTop),c=r?0:T(n.paddingRight),l=r?0:T(n.paddingBottom),d=r?0:T(n.paddingLeft),f=r?0:T(n.borderTopWidth),p=r?0:T(n.borderRightWidth),h=r?0:T(n.borderBottomWidth),b=d+c,v=s+l,g=(r?0:T(n.borderLeftWidth))+p,m=f+h,y=u?e.offsetHeight-m-e.clientHeight:0,w=a?e.offsetWidth-g-e.clientWidth:0,O=i?b+g:0,j=i?v+m:0,E=r?r.width:T(n.width)-O-w,_=r?r.height:T(n.height)-j-y,A=E+b+w+g,R=_+v+y+m,M=C({devicePixelContentBoxSize:I(Math.round(E*devicePixelRatio),Math.round(_*devicePixelRatio),o),borderBoxSize:I(A,R,o),contentBoxSize:I(E,_,o),contentRect:new x(d,s,E,_)});return S.set(e,M),M},M=function(e,t,n){var r=R(e,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case g.DEVICE_PIXEL_CONTENT_BOX:return a;case g.BORDER_BOX:return i;default:return o}},L=function(e){var t=R(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=C([t.borderBoxSize]),this.contentBoxSize=C([t.contentBoxSize]),this.devicePixelContentBoxSize=C([t.devicePixelContentBoxSize])},U=function(e){if(k(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},z=function(){var e=1/0,t=[];w.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new L(t.target),i=U(t.target);r.push(n),t.lastReportedSize=M(t.target,t.observedBox),ie?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},W=function(){var e,t=0;for(V(t);w.some((function(e){return e.activeTargets.length>0}));)t=z(),V(t);return w.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:O}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=O),window.dispatchEvent(e)),t>0},H=[],G=function(e){if(!j){var t=0,n=document.createTextNode("");new MutationObserver((function(){return H.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),j=function(){n.textContent="".concat(t?t--:t++)}}H.push(e),j()},q=0,$={attributes:!0,characterData:!0,childList:!0,subtree:!0},K=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Y=function(e){return void 0===e&&(e=0),Date.now()+e},X=!1,J=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!X){X=!0;var n,r=Y(e);n=function(){var n=!1;try{n=W()}finally{if(X=!1,e=r-Y(),!q)return;n?t.run(1e3):e>0?t.run(e):t.start()}},G((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,$)};document.body?t():A.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),K.forEach((function(t){return A.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),K.forEach((function(t){return A.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),Q=function(e){!q&&e>0&&J.start(),!(q+=e)&&J.stop()},Z=function(){function e(e,t){this.target=e,this.observedBox=t||g.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=M(this.target,this.observedBox,!0);return e=this.target,D(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),ee=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},te=new WeakMap,ne=function(e,t){for(var n=0;n=0&&(i&&w.splice(w.indexOf(n),1),n.observationTargets.splice(r,1),Q(-1))},e.disconnect=function(e){var t=this,n=te.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),ie=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");re.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!_(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");re.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!_(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");re.unobserve(this,e)},e.prototype.disconnect=function(){re.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),oe=n(347),ae=n(48),ue=n.n(ae);function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var le=Object(c.createContext)(null),de=()=>{var e=Object(c.useContext)(le);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the component's context.");return e},fe=parseInt(l.a.version.split(".")[0],10)>=17,pe="undefined"!=typeof navigator&&"undefined"!=typeof window&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,he="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),be="undefined"!=typeof navigator&&/Android/.test(navigator.userAgent),ve="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ge="undefined"!=typeof navigator&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),me="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),ye="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),we="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Oe=be&&"undefined"!=typeof navigator&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),je="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),Ce="undefined"!=typeof navigator&&/.*UCBrowser/.test(navigator.userAgent),Ee="undefined"!=typeof navigator&&/.*Wechat/.test(navigator.userAgent),xe=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),De=(!we||!Oe)&&!me&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,ke=new WeakMap,_e=new WeakMap,Ae=new WeakMap,Se=new WeakMap,Be=new WeakMap,Pe=new WeakMap,Fe=new WeakMap,Te=new WeakMap,Ie=new WeakMap,Ne=new WeakMap,Re=new WeakMap,Me=new WeakMap,Le=new WeakMap,Ue=new WeakMap,ze=new WeakMap,Ve=new WeakMap,We=new WeakMap,He=new WeakMap,Ge=new WeakMap,qe=new WeakMap,$e=new WeakMap,Ke=Symbol("placeholder"),Ye=Symbol("mark-placeholder"),Xe=globalThis.Text,Je=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,Qe=e=>Ze(e)&&1===e.nodeType,Ze=e=>{var t=Je(e);return!!t&&e instanceof t.Node},et=e=>{var t=e&&e.anchorNode&&Je(e.anchorNode);return!!t&&e instanceof t.Selection},tt=e=>Ze(e)&&3===e.nodeType,nt=(e,t,n)=>{for(var r,{childNodes:i}=e,o=i[t],a=t,u=!1,s=!1;(Ze(r=o)&&8===r.nodeType||Qe(o)&&0===o.childNodes.length||Qe(o)&&"false"===o.getAttribute("contenteditable"))&&(!u||!s);)a>=i.length?(u=!0,a=t-1,n="backward"):a<0?(s=!0,a=t+1,n="forward"):(o=i[a],t=a,a+="forward"===n?1:-1);return[o,t]},rt=(e,t,n)=>{var[r]=nt(e,t,n);return r},it=e=>{var t="";if(tt(e)&&e.nodeValue)return e.nodeValue;if(Qe(e)){for(var n of Array.from(e.childNodes))t+=it(n);var r=getComputedStyle(e).getPropertyValue("display");"block"!==r&&"list"!==r&&"BR"!==e.tagName||(t+="\n")}return t},ot=/data-slate-fragment="(.+?)"/m,at=e=>{var t=e.getData("text/html"),[,n]=t.match(ot)||[];return n},ut=(e,t,n)=>{var{target:r}=t;if(Qe(r)&&r.matches('[contentEditable="false"]'))return!1;var{document:i}=lt.getWindow(e);if(i.contains(r))return lt.hasDOMNode(e,r,{editable:!0});var o=n.find(e=>{var{addedNodes:t,removedNodes:n}=e;for(var i of t)if(i===r||i.contains(r))return!0;for(var o of n)if(o===r||o.contains(r))return!0});return!(!o||o===t)&&ut(e,o,n)},st=0;class ct{constructor(){this.id="".concat(st++)}}var lt={androidPendingDiffs:e=>He.get(e),androidScheduleFlush:e=>{var t;null===(t=ze.get(e))||void 0===t||t()},blur:e=>{var t=lt.toDOMNode(e,e),n=lt.findDocumentOrShadowRoot(e);Re.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,n=lt.findDocumentOrShadowRoot(e).getSelection();n&&n.rangeCount>0&&n.removeAllRanges(),t&&y.j.deselect(e)},findDocumentOrShadowRoot:e=>{var t=lt.toDOMNode(e,e),n=t.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&null!=n.getSelection?n:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:n,clientY:r,target:i}=t;if(null==n||null==r)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var o,a=lt.toSlateNode(e,t.target),u=lt.findPath(e,a);if(y.b.isElement(a)&&y.a.isVoid(e,a)){var s=i.getBoundingClientRect(),c=e.isInline(a)?n-s.left{var n=Te.get(t);return n||(n=new ct,Te.set(t,n)),n},findPath:(e,t)=>{for(var n=[],r=t;;){var i=_e.get(r);if(null==i){if(y.a.isEditor(r))return n;break}var o=ke.get(r);if(null==o)break;n.unshift(o),r=i}throw new Error("Unable to find the path for Slate node: ".concat(y.h.stringify(t)))},focus:e=>{var t=lt.toDOMNode(e,e),n=lt.findDocumentOrShadowRoot(e);Re.set(e,!0),n.activeElement!==t&&t.focus({preventScroll:!0})},getWindow:e=>{var t=Ae.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{editable:i=!1}=r,o=lt.toDOMNode(e,e);try{n=Qe(t)?t:t.parentElement}catch(e){if(!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!n&&!(n.closest("[data-slate-editor]")!==o||i&&!n.isContentEditable&&("boolean"!=typeof n.isContentEditable||n.closest('[contenteditable="false"]')!==o)&&!n.getAttribute("data-slate-zero-width"))},hasEditableTarget:(e,t)=>Ze(t)&<.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:n,focus:r}=t;return y.a.hasPath(e,n.path)&&y.a.hasPath(e,r.path)},hasSelectableTarget:(e,t)=>lt.hasEditableTarget(e,t)||lt.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Ze(t)&<.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!Me.get(e),isFocused:e=>!!Re.get(e),isReadOnly:e=>!!Ne.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(Ne.get(e))return!1;var n=lt.hasTarget(e,t)&<.toSlateNode(e,t);return y.b.isElement(n)&&y.a.isVoid(e,n)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{var n=Ie.get(e),r=y.a.isEditor(t)?Se.get(e):null==n?void 0:n.get(lt.findKey(e,t));if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(y.h.stringify(t)));return r},toDOMPoint:(e,t)=>{var n,[r]=y.a.node(e,t.path),i=lt.toDOMNode(e,r);y.a.void(e,{at:t})&&(t={path:t.path,offset:0});for(var o=Array.from(i.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),a=0,u=0;u{var{anchor:n,focus:r}=t,i=y.g.isBackward(t),o=lt.toDOMPoint(e,n),a=y.g.isCollapsed(t)?o:lt.toDOMPoint(e,r),u=lt.getWindow(e).document.createRange(),[s,c]=i?a:o,[l,d]=i?o:a,f=!!(Qe(s)?s:s.parentElement).getAttribute("data-slate-zero-width"),p=!!(Qe(l)?l:l.parentElement).getAttribute("data-slate-zero-width");return u.setStart(s,f?1:c),u.setEnd(l,p?1:d),u},toSlateNode:(e,t)=>{var n=Qe(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Pe.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},toSlatePoint:(e,t,n)=>{var{exactMatch:r,suppressThrow:i}=n,[o,a]=r?t:(e=>{var[t,n]=e;if(Qe(t)&&t.childNodes.length){var r=n===t.childNodes.length,i=r?n-1:n;for([t,i]=nt(t,i,r?"backward":"forward"),r=i{be&&!r&&e.hasAttribute("data-slate-zero-width")&&e.textContent.length>0&&"\ufeff"!==e.textContext?e.textContent.startsWith("\ufeff")&&(e.textContent=e.textContent.slice(1)):e.parentNode.removeChild(e)}),c=m.textContent.length,v=s}}else if(h){for(var w=h.querySelectorAll("[data-slate-leaf]"),O=0;O{c-=e.textContent.length})):c=1}v&&c===v.textContent.length&&be&&"z"===v.getAttribute("data-slate-zero-width")&&null!==(l=v.textContent)&&void 0!==l&&l.startsWith("\ufeff")&&(u.hasAttribute("data-slate-zero-width")||ve&&null!==(d=v.textContent)&&void 0!==d&&d.endsWith("\n\n"))&&c--}if(be&&!s&&!r){var C=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(C&<.hasDOMNode(e,C,{editable:!0})){var E=lt.toSlateNode(e,C),{path:x,offset:D}=y.a.start(e,lt.findPath(e,E));return C.querySelector("[data-slate-leaf]")||(D=a),{path:x,offset:D}}}if(!s){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var k=lt.toSlateNode(e,s);return{path:lt.findPath(e,k),offset:c}},toSlateRange:(e,t,n)=>{var r,i,o,a,u,s,{exactMatch:c,suppressThrow:l}=n;if((et(t)?t.anchorNode:t.startContainer)&&(et(t)?(r=t.anchorNode,i=t.anchorOffset,o=t.focusNode,a=t.focusOffset,u=ye&&(e=>{for(var t=e&&e.parentNode;t;){if("[object ShadowRoot]"===t.toString())return!0;t=t.parentNode}return!1})(r)?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,u=t.collapsed)),null==r||null==o||null==i||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));"getAttribute"in o&&"false"===o.getAttribute("contenteditable")&&(o=r,a=(null===(s=r.textContent)||void 0===s?void 0:s.length)||0);var d=lt.toSlatePoint(e,[r,i],{exactMatch:c,suppressThrow:l});if(!d)return null;var f=u?d:lt.toSlatePoint(e,[o,a],{exactMatch:c,suppressThrow:l});if(!f)return null;if(ve&&!u&&r!==o){var p=y.a.isEnd(e,d,d.path),h=y.a.isStart(e,f,f.path);if(p)d=y.a.after(e,d)||d;if(h)f=y.a.before(e,f)||f}var b={anchor:d,focus:f};return y.g.isExpanded(b)&&y.g.isForward(b)&&Qe(o)&&y.a.void(e,{at:b.focus,mode:"highest"})&&(b=y.a.unhangRange(e,b,{voids:!0})),b}};function dt(e,t){var{path:n,diff:r}=t;if(!y.a.hasPath(e,n))return!1;var i=y.c.get(e,n);if(!y.i.isText(i))return!1;if(r.start!==i.text.length||0===r.text.length)return i.text.slice(r.start,r.start+r.text.length)===r.text;var o=y.e.next(n);if(!y.a.hasPath(e,o))return!1;var a=y.c.get(e,o);return y.i.isText(a)&&a.text.startsWith(r.text)}function ft(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.slice(0,t.start)+t.text+e.slice(t.end),e)}function pt(e,t){var{start:n,end:r,text:i}=t,o=e.slice(n,r),a=function(e,t){for(var n=Math.min(e.length,t.length),r=0;ry.b.isElement(t)&&y.a.isBlock(e,t),at:n});if(!o)return null;for(;r>i.text.length;){var a=y.a.next(e,{at:n,match:y.i.isText});if(!a||!y.e.isDescendant(a[1],o[1]))return null;r-=i.text.length,i=a[0],n=a[1]}return{path:n,offset:r}}function vt(e,t){var n=bt(e,t.anchor);if(!n)return null;if(y.g.isCollapsed(t))return{anchor:n,focus:n};var r=bt(e,t.focus);return r?{anchor:n,focus:r}:null}function gt(e,t,n){var r=He.get(e),i=null==r?void 0:r.find(e=>{var{path:n}=e;return y.e.equals(n,t.path)});if(!i||t.offset<=i.diff.start)return y.f.transform(t,n,{affinity:"backward"});var{diff:o}=i;if(t.offset<=o.start+o.text.length){var a={path:t.path,offset:o.start},u=y.f.transform(a,n,{affinity:"backward"});return u?{path:u.path,offset:u.offset+t.offset-o.start}:null}var s={path:t.path,offset:t.offset-o.text.length+o.end-o.start},c=y.f.transform(s,n,{affinity:"backward"});return c?"split_node"===n.type&&y.e.equals(n.path,t.path)&&s.offset=r.end?e:t.offset<=r.start?{diff:{start:t.text.length+r.start,end:t.text.length+r.end,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end+t.text.length,text:r.text},id:i,path:n};case"remove_text":return!y.e.equals(t.path,n)||t.offset>=r.end?e:t.offset+t.text.length<=r.start?{diff:{start:r.start-t.text.length,end:r.end-t.text.length,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end-t.text.length,text:r.text},id:i,path:n};case"split_node":return!y.e.equals(t.path,n)||t.position>=r.end?{diff:r,id:i,path:y.e.transform(n,t,{affinity:"backward"})}:t.position>r.start?{diff:{start:r.start,end:Math.min(t.position,r.end),text:r.text},id:i,path:n}:{diff:{start:r.start-t.position,end:r.end-t.position,text:r.text},id:i,path:y.e.transform(n,t,{affinity:"forward"})};case"merge_node":return y.e.equals(t.path,n)?{diff:{start:r.start+t.position,end:r.end+t.position,text:r.text},id:i,path:y.e.transform(n,t)}:{diff:r,id:i,path:y.e.transform(n,t)}}var o=y.e.transform(n,t);return o?{diff:r,path:o,id:i}:null}function wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ot(e){for(var t=1;t{var e=qe.get(t);if(qe.delete(t),e){var{selection:n}=t,r=vt(t,e);!r||n&&y.g.equals(r,n)||y.j.select(t,r)}},d=()=>{if(a&&(clearTimeout(a),a=null),u&&(clearTimeout(u),u=null),v()||b()){i||(i=!0,setTimeout(()=>i=!1)),b()&&(i="action");var e=t.selection&&y.a.rangeRef(t,t.selection,{affinity:"forward"});We.set(t,t.marks),Ge.get(t),He.get(t);for(var o,s=v();o=null===(d=He.get(t))||void 0===d?void 0:d[0];){var d,f,p=Ve.get(t);void 0!==p&&(Ve.delete(t),t.marks=p),p&&!1===c&&(c=null);var h=ht(o);t.selection&&y.g.equals(t.selection,h)||y.j.select(t,h),o.diff.text?y.a.insertText(t,o.diff.text):y.a.deleteFragment(t),He.set(t,null===(f=He.get(t))||void 0===f?void 0:f.filter(e=>{var{id:t}=e;return t!==o.id})),dt(t,o)||(s=!1,Ge.delete(t),We.delete(t),i="action",qe.delete(t),n.cancel(),r.cancel(),null==e||e.unref())}var g=null==e?void 0:e.unref();if(!g||qe.get(t)||t.selection&&y.g.equals(g,t.selection)||y.j.select(t,g),b())(()=>{var e=Ge.get(t);if(Ge.delete(t),e){if(e.at){var n=y.f.isPoint(e.at)?bt(t,e.at):vt(t,e.at);if(!n)return;var r=y.a.range(t,n);t.selection&&y.g.equals(t.selection,r)||y.j.select(t,n)}e.run()}})();else{s&&n(),n.flush(),r.flush(),l();var m=We.get(t);We.delete(t),void 0!==m&&(t.marks=m,t.onChange())}}else l()},f=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=Be.get(t);n&&(v()||e?n.style.display="none":n.style.removeProperty("display"))},p=(e,n)=>{var r,i=null!==(r=He.get(t))&&void 0!==r?r:[];He.set(t,i);var o=y.c.leaf(t,e),a=i.findIndex(t=>y.e.equals(t.path,e));if(a<0)return pt(o.text,n)&&i.push({path:e,diff:n,id:s++}),void f();var u,c,l,d,p,h,b,v,g=(u=o.text,c=i[a].diff,l=n,d=Math.min(c.start,l.start),p=Math.max(0,Math.min(c.start+c.text.length,l.end)-l.start),h=ft(u,c,l),b=Math.max(l.start+l.text.length,c.start+c.text.length+(c.start+c.text.length>l.start?l.text.length:0)-p),v=h.slice(d,b),pt(u,{start:d,end:Math.max(c.end,l.end-c.text.length+(c.end-c.start)),text:v}));if(!g)return i.splice(a,1),void f();i[a]=Ot(Ot({},i[a]),{},{diff:g})},h=function(e){var{at:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c=!1,qe.delete(t),n.cancel(),r.cancel(),b()&&d(),Ge.set(t,{at:i,run:e}),u=setTimeout(d)},b=()=>!!Ge.get(t),v=()=>{var e;return!(null===(e=He.get(t))||void 0===e||!e.length)},g=e=>{qe.set(t,e),a&&(clearTimeout(a),a=null);var{selection:n}=t;if(e){var r=!n||!y.e.equals(n.anchor.path,e.anchor.path),i=!n||!y.e.equals(n.anchor.path.slice(0,-1),e.anchor.path.slice(0,-1));(r&&c||i)&&(c=!1),(r||v())&&(a=setTimeout(d,200))}},m=()=>{b()||(u=setTimeout(d))};return{flush:d,scheduleFlush:m,hasPendingDiffs:v,hasPendingAction:b,hasPendingChanges:()=>b()||v(),isFlushing:()=>i,handleUserSelect:g,handleCompositionEnd:e=>{o&&clearTimeout(o),o=setTimeout(()=>{Me.set(t,!1),d()},25)},handleCompositionStart:e=>{Me.set(t,!0),o&&(clearTimeout(o),o=null)},handleDOMBeforeInput:e=>{var n;a&&(clearTimeout(a),a=null);var{inputType:r}=e,i=null,o=e.dataTransfer||e.data||void 0;!1!==c&&"insertText"!==r&&"insertCompositionText"!==r&&(c=!1);var[u]=e.getTargetRanges();u&&(i=lt.toSlateRange(t,u,{exactMatch:!1,suppressThrow:!0}));var s=lt.getWindow(t).getSelection();if(!i&&s&&(u=s,i=lt.toSlateRange(t,s,{exactMatch:!1,suppressThrow:!0})),i=null!==(n=i)&&void 0!==n?n:t.selection){var l,d=!0;if(r.startsWith("delete")){if(y.g.isExpanded(i)){var[f,b]=y.g.edges(i);if(y.c.leaf(t,f.path).text.length===f.offset&&0===b.offset){var v=y.a.next(t,{at:f.path,match:y.i.isText});v&&y.e.equals(v[1],b.path)&&(i={anchor:b,focus:b})}}var w=r.endsWith("Backward")?"backward":"forward",[O,j]=y.g.edges(i),[C,E]=y.a.leaf(t,O.path),x={text:"",start:O.offset,end:j.offset},D=He.get(t),k=null==D?void 0:D.find(e=>y.e.equals(e.path,E)),_=k?[k.diff,x]:[x];if(0===ft(C.text,..._).length&&(d=!1),y.g.isExpanded(i)){if(d&&y.e.equals(i.anchor.path,i.focus.path)){var A={path:i.anchor.path,offset:O.offset},S=y.a.range(t,A,A);return g(S),p(i.anchor.path,{text:"",end:j.offset,start:O.offset})}return h(()=>y.a.deleteFragment(t,{direction:w}),{at:i})}}switch(r){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return h(()=>y.a.deleteFragment(t),{at:i});case"deleteContent":case"deleteContentForward":var{anchor:B}=i;if(d&&y.g.isCollapsed(i)){var P=y.c.leaf(t,B.path);if(B.offsety.a.deleteForward(t),{at:i});case"deleteContentBackward":var F,{anchor:T}=i,I=et(u)?u.isCollapsed:!(null===(F=u)||void 0===F||!F.collapsed);return d&&I&&y.g.isCollapsed(i)&&T.offset>0?p(T.path,{text:"",start:T.offset-1,end:T.offset}):h(()=>y.a.deleteBackward(t),{at:i});case"deleteEntireSoftLine":return h(()=>{y.a.deleteBackward(t,{unit:"line"}),y.a.deleteForward(t,{unit:"line"})},{at:i});case"deleteHardLineBackward":return h(()=>y.a.deleteBackward(t,{unit:"block"}),{at:i});case"deleteSoftLineBackward":return h(()=>y.a.deleteBackward(t,{unit:"line"}),{at:i});case"deleteHardLineForward":return h(()=>y.a.deleteForward(t,{unit:"block"}),{at:i});case"deleteSoftLineForward":return h(()=>y.a.deleteForward(t,{unit:"line"}),{at:i});case"deleteWordBackward":return h(()=>y.a.deleteBackward(t,{unit:"word"}),{at:i});case"deleteWordForward":return h(()=>y.a.deleteForward(t,{unit:"word"}),{at:i});case"insertLineBreak":return h(()=>y.a.insertSoftBreak(t),{at:i});case"insertParagraph":return h(()=>y.a.insertBreak(t),{at:i});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("DataTransfer"===(null==(l=o)?void 0:l.constructor.name))return h(()=>lt.insertData(t,o),{at:i});var N=null!=o?o:"";if(Ve.get(t)&&(N=N.replace("\ufeff","")),"insertText"===r&&/.*\n.*\n$/.test(N)&&(N=N.slice(0,-1)),N.includes("\n"))return h(()=>{var e=N.split("\n");e.forEach((n,r)=>{n&&y.a.insertText(t,n),r!==e.length-1&&y.a.insertSoftBreak(t)})},{at:i});if(y.e.equals(i.anchor.path,i.focus.path)){var[R,M]=y.g.edges(i),L={start:R.offset,end:M.offset,text:N};if(N&&c&&"insertCompositionText"===r){var U=c.start+c.text.search(/\S|$/);L.start+L.text.search(/\S|$/)===U+1&&L.end===c.start+c.text.length?(L.start-=1,c=null,m()):c=!1}else c="insertText"===r&&(null===c?L:!(!c||!y.g.isCollapsed(i)||c.end+c.text.length!==R.offset)&&Ot(Ot({},c),{},{text:c.text+N}));if(d)return void p(R.path,L)}return h(()=>y.a.insertText(t,N),{at:i})}}},handleKeyDown:e=>{v()||(f(!0),setTimeout(f))},handleDomMutations:e=>{var n;v()||b()||e.some(n=>ut(t,n,e))&&(null===(n=$e.get(t))||void 0===n||n())},handleInput:()=>{!b()&&v()||d()}}}var Ct=xe?c.useLayoutEffect:c.useEffect;var Et=["node"];function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Dt={subtree:!0,childList:!0,characterData:!0},kt=be?e=>{var{node:t}=e,n=ce(e,Et);if(!be)return null;var r,i=de(),o=(r=Object(c.useRef)(!1),Object(c.useEffect)(()=>(r.current=!0,()=>{r.current=!1}),[]),r.current),[a]=Object(c.useState)(()=>jt(function(e){for(var t=1;tnew MutationObserver(t));Ct(()=>{r.takeRecords()}),Object(c.useEffect)(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(e.current,n),()=>r.disconnect()},[r,e,n])}(t,a.handleDomMutations,Dt),ze.set(i,a.scheduleFlush),o&&a.flush(),a}:()=>null,_t=["anchor","focus"],At=["anchor","focus"],St=(e,t)=>{var n,r,i=ce(e,_t),o=ce(t,At);return e[Ke]===t[Ke]&&(n=i,r=o,Object.keys(n).length===Object.keys(r).length&&Object.keys(n).every(e=>r.hasOwnProperty(e)&&n[e]===r[e]))},Bt=e=>{var{isLast:t,leaf:n,parent:r,text:i}=e,o=de(),a=lt.findPath(o,i),u=y.e.parent(a),s=!0===n[Ye];return o.isVoid(r)?l.a.createElement(Tt,{length:y.c.string(r).length}):""!==n.text||r.children[r.children.length-1]!==i||o.isInline(r)||""!==y.a.string(o,u)?""===n.text?l.a.createElement(Tt,{isMarkPlaceholder:s}):t&&"\n"===n.text.slice(-1)?l.a.createElement(Pt,{isTrailing:!0,text:n.text}):l.a.createElement(Pt,{text:n.text}):l.a.createElement(Tt,{isLineBreak:!0,isMarkPlaceholder:s})},Pt=e=>{var{text:t,isTrailing:n=!1}=e,r=Object(c.useRef)(null),i=()=>"".concat(null!=t?t:"").concat(n?"\n":""),[o]=Object(c.useState)(i);return Ct(()=>{var e=i();r.current&&r.current.textContent!==e&&(r.current.textContent=e)}),l.a.createElement(Ft,{ref:r},o)},Ft=Object(c.memo)(Object(c.forwardRef)((e,t)=>l.a.createElement("span",{"data-slate-string":!0,ref:t},e.children))),Tt=e=>{var{length:t=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=e,i={"data-slate-zero-width":n?"n":"z","data-slate-length":t};return r&&(i["data-slate-mark-placeholder"]=!0),l.a.createElement("span",Object.assign({},i),be&&n?null:"\ufeff",n?l.a.createElement("br",null):null)};function It(e){e.current&&(clearTimeout(e.current),e.current=null)}var Nt=e=>{var{leaf:t,isLast:n,text:r,parent:i,renderPlaceholder:o,renderLeaf:a=(e=>l.a.createElement(Mt,Object.assign({},e)))}=e,u=de(),s=Object(c.useRef)(null),d=Object(c.useRef)(null),[f,p]=Object(c.useState)(!1),h=Object(c.useRef)(null),b=Object(c.useCallback)(e=>{if(function(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}(s,null==e),null==e){var n;Be.delete(u),null===(n=t.onPlaceholderResize)||void 0===n||n.call(t,null)}else{if(Be.set(u,e),!s.current){var r=window.ResizeObserver||ie;s.current=new r(()=>{var n;null===(n=t.onPlaceholderResize)||void 0===n||n.call(t,e)})}s.current.observe(e),d.current=e}},[d,t,u]),v=l.a.createElement(Bt,{isLast:n,leaf:t,parent:i,text:r}),g=t[Ke];if(Object(c.useEffect)(()=>(g?h.current||(h.current=setTimeout(()=>{p(!0),h.current=null},300)):(It(h),p(!1)),()=>It(h)),[g,p]),g&&f){var m={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:ge?"inherit":void 0},contentEditable:!1,ref:b}};v=l.a.createElement(l.a.Fragment,null,o(m),v)}return a({attributes:{"data-slate-leaf":!0},children:v,leaf:t,text:r})},Rt=l.a.memo(Nt,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&y.i.equals(t.leaf,e.leaf)&&t.leaf[Ke]===e.leaf[Ke]),Mt=e=>{var{attributes:t,children:n}=e;return l.a.createElement("span",Object.assign({},t),n)},Lt=e=>{for(var{decorations:t,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:o,text:a}=e,u=de(),s=Object(c.useRef)(null),d=y.i.decorations(a,t),f=lt.findKey(u,a),p=[],h=0;h{var t=Ie.get(u);e?(null==t||t.set(f,e),Fe.set(a,e),Pe.set(e,a)):(null==t||t.delete(f),Fe.delete(a),s.current&&Pe.delete(s.current)),s.current=e},[s,u,f,a]);return l.a.createElement("span",{"data-slate-node":"text",ref:v},p)},Ut=l.a.memo(Lt,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&((e,t)=>{if(e.length!==t.length)return!1;for(var n=0;n{var{decorations:t,element:n,renderElement:r=(e=>l.a.createElement(Wt,Object.assign({},e))),renderPlaceholder:o,renderLeaf:a,selection:u}=e,s=de(),d=Yt(),f=s.isInline(n),p=lt.findKey(s,n),h=Object(c.useCallback)(e=>{var t=Ie.get(s);e?(null==t||t.set(p,e),Fe.set(n,e),Pe.set(e,n)):(null==t||t.delete(p),Fe.delete(n))},[s,p,n]),b=$t({decorations:t,node:n,renderElement:r,renderPlaceholder:o,renderLeaf:a,selection:u}),v={"data-slate-node":"element",ref:h};if(f&&(v["data-slate-inline"]=!0),!f&&y.a.hasInlines(s,n)){var g=y.c.string(n),m=i()(g);"rtl"===m&&(v.dir=m)}if(y.a.isVoid(s,n)){v["data-slate-void"]=!0,!d&&f&&(v.contentEditable=!1);var w=f?"span":"div",[[O]]=y.c.texts(n);b=l.a.createElement(w,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},l.a.createElement(Ut,{renderPlaceholder:o,decorations:[],isLast:!1,parent:n,text:O})),ke.set(O,0),_e.set(O,n)}return r({attributes:v,children:b,element:n})},Vt=l.a.memo(zt,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&((e,t)=>{if(e.length!==t.length)return!1;for(var n=0;n{var{attributes:t,children:n,element:r}=e,i=de().isInline(r)?"span":"div";return l.a.createElement(i,Object.assign({},t,{style:{position:"relative"}}),n)},Ht=Object(c.createContext)(()=>[]),Gt=Object(c.createContext)(!1),qt=()=>Object(c.useContext)(Gt),$t=e=>{for(var{decorations:t,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:o,selection:a}=e,u=Object(c.useContext)(Ht),s=de(),d=lt.findPath(s,n),f=[],p=y.b.isElement(n)&&!s.isInline(n)&&y.a.hasInlines(s,n),h=0;hObject(c.useContext)(Kt),Xt=Object(c.createContext)(null),Jt=()=>{var e=Object(c.useContext)(Xt);if(!e)throw new Error("The `useSlate` hook must be used inside the component's context.");var{editor:t}=e;return t};var Qt={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},Zt={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},en={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},tn=e=>{var t=Qt[e],n=Zt[e],r=en[e],i=t&&Object(oe.isKeyHotkey)(t),o=n&&Object(oe.isKeyHotkey)(n),a=r&&Object(oe.isKeyHotkey)(r);return e=>!(!i||!i(e))||(!!(he&&o&&o(e))||!(he||!a||!a(e)))},nn={isBold:tn("bold"),isCompose:tn("compose"),isMoveBackward:tn("moveBackward"),isMoveForward:tn("moveForward"),isDeleteBackward:tn("deleteBackward"),isDeleteForward:tn("deleteForward"),isDeleteLineBackward:tn("deleteLineBackward"),isDeleteLineForward:tn("deleteLineForward"),isDeleteWordBackward:tn("deleteWordBackward"),isDeleteWordForward:tn("deleteWordForward"),isExtendBackward:tn("extendBackward"),isExtendForward:tn("extendForward"),isExtendLineBackward:tn("extendLineBackward"),isExtendLineForward:tn("extendLineForward"),isItalic:tn("italic"),isMoveLineBackward:tn("moveLineBackward"),isMoveLineForward:tn("moveLineForward"),isMoveWordBackward:tn("moveWordBackward"),isMoveWordForward:tn("moveWordForward"),isRedo:tn("redo"),isSoftBreak:tn("insertSoftBreak"),isSplitBlock:tn("splitBlock"),isTransposeCharacter:tn("transposeCharacter"),isUndo:tn("undo")},rn={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class on extends c.Component{constructor(){super(...arguments),this.context=null,this.manager=null,this.mutationObserver=null}observe(){var e,{node:t}=this.props;if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");null===(e=this.mutationObserver)||void 0===e||e.observe(t.current,rn)}componentDidMount(){var{receivedUserInput:e}=this.props,t=this.context;this.manager=((e,t)=>{var n=[],r=()=>{n=[]};return{registerMutations:r=>{if(t.current){var i=r.filter(t=>ut(e,t,r));n.push(...i)}},restoreDOM:function(){n.length>0&&(n.reverse().forEach(e=>{"characterData"!==e.type&&(e.removedNodes.forEach(t=>{e.target.insertBefore(t,e.nextSibling)}),e.addedNodes.forEach(t=>{e.target.removeChild(t)}))}),r())},clear:r}})(t,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,t,n,r,i=null===(e=this.mutationObserver)||void 0===e?void 0:e.takeRecords();null!=i&&i.length&&(null===(r=this.manager)||void 0===r||r.registerMutations(i));return null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(n=this.manager)||void 0===n||n.restoreDOM(),null}componentDidUpdate(){var e;null===(e=this.manager)||void 0===e||e.clear(),this.observe()}componentWillUnmount(){var e;null===(e=this.mutationObserver)||void 0===e||e.disconnect()}render(){return this.props.children}}on.contextType=le;var an=be?on:e=>{var{children:t}=e;return l.a.createElement(l.a.Fragment,null,t)},un=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],sn=["text"];function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ln(e){for(var t=1;tl.a.createElement(l.a.Fragment,null,$t(e)),fn=e=>{var t=Object(c.useCallback)(e=>l.a.createElement(pn,Object.assign({},e)),[]),{autoFocus:n,decorate:r=hn,onDOMBeforeInput:o,placeholder:u,readOnly:d=!1,renderElement:f,renderLeaf:p,renderPlaceholder:h=t,scrollSelectionIntoView:b=bn,style:v={},as:g="div",disableDefaultStyles:m=!1}=e,w=ce(e,un),O=Jt(),[j,C]=Object(c.useState)(!1),E=Object(c.useRef)(null),x=Object(c.useRef)([]),[D,k]=Object(c.useState)(),{onUserInput:_,receivedUserInput:A}=function(){var e=de(),t=Object(c.useRef)(!1),n=Object(c.useRef)(0),r=Object(c.useCallback)(()=>{if(!t.current){t.current=!0;var r=lt.getWindow(e);r.cancelAnimationFrame(n.current),n.current=r.requestAnimationFrame(()=>{t.current=!1})}},[e]);return Object(c.useEffect)(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:t,onUserInput:r}}(),[,S]=Object(c.useReducer)(e=>e+1,0);$e.set(O,S),Ne.set(O,d);var B=Object(c.useMemo)(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);Object(c.useEffect)(()=>{E.current&&n&&E.current.focus()},[n]);var P=Object(c.useRef)(),F=Object(c.useMemo)(()=>s()(()=>{var e=P.current;if((be||!lt.isComposing(O))&&(!B.isUpdatingSelection||null!=e&&e.isFlushing())&&!B.isDraggingInternally){var t=lt.findDocumentOrShadowRoot(O),{activeElement:n}=t,r=lt.toDOMNode(O,O),i=t.getSelection();if(n===r?(B.latestElement=n,Re.set(O,!0)):Re.delete(O),!i)return y.j.deselect(O);var{anchorNode:o,focusNode:a}=i,u=lt.hasEditableTarget(O,o)||lt.isTargetInsideNonReadonlyVoid(O,o),s=lt.hasEditableTarget(O,a)||lt.isTargetInsideNonReadonlyVoid(O,a);if(u&&s){var c=lt.toSlateRange(O,i,{exactMatch:!1,suppressThrow:!0});c&&(lt.isComposing(O)||null!=e&&e.hasPendingChanges()||null!=e&&e.isFlushing()?null==e||e.handleUserSelect(c):y.j.select(O,c))}!d||u&&s||y.j.deselect(O)}},100),[O,d,B]),T=Object(c.useMemo)(()=>a()(F,0),[F]);P.current=kt({node:E,onDOMSelectionChange:F,scheduleOnDOMSelectionChange:T}),Ct(()=>{var e,t,n;E.current&&(n=Je(E.current))?(Ae.set(O,n),Se.set(O,E.current),Fe.set(O,E.current),Pe.set(E.current,O)):Fe.delete(O);var{selection:r}=O,i=lt.findDocumentOrShadowRoot(O).getSelection();if(i&<.isFocused(O)&&(null===(e=P.current)||void 0===e||!e.hasPendingAction())){var o=e=>{var t="None"!==i.type;if(r||t){var n=Se.get(O),o=!1;if(n.contains(i.anchorNode)&&n.contains(i.focusNode)&&(o=!0),t&&o&&r&&!e){var a=lt.toSlateRange(O,i,{exactMatch:!0,suppressThrow:!0});if(a&&y.g.equals(a,r)){var u;if(!B.hasMarkPlaceholder)return;var{anchorNode:s}=i;if(null!=s&&null!==(u=s.parentElement)&&void 0!==u&&u.hasAttribute("data-slate-mark-placeholder"))return}}if(!r||lt.hasRange(O,r)){B.isUpdatingSelection=!0;var c=r&<.toDOMRange(O,r);return c?(y.g.isBackward(r)?i.setBaseAndExtent(c.endContainer,c.endOffset,c.startContainer,c.startOffset):i.setBaseAndExtent(c.startContainer,c.startOffset,c.endContainer,c.endOffset),b(O,c)):i.removeAllRanges(),c}O.selection=lt.toSlateRange(O,i,{exactMatch:!1,suppressThrow:!0})}},a=o(),u="action"===(null===(t=P.current)||void 0===t?void 0:t.isFlushing());if(be&&u){var s=null,c=requestAnimationFrame(()=>{if(u){var e=e=>{try{lt.toDOMNode(O,O).focus(),o(e)}catch(e){}};e(),s=setTimeout(()=>{e(!0),B.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(c),s&&clearTimeout(s)}}setTimeout(()=>{a&&ve&<.toDOMNode(O,O).focus();B.isUpdatingSelection=!1})}});var I=Object(c.useCallback)(e=>{if(_(),!d&<.hasEditableTarget(O,e.target)&&!mn(e,o)){var t;if(P.current)return P.current.handleDOMBeforeInput(e);T.flush(),F.flush();var{selection:n}=O,{inputType:r}=e,i=e.dataTransfer||e.data||void 0,a="insertCompositionText"===r||"deleteCompositionText"===r;if(a&<.isComposing(O))return;var u=!1;if("insertText"===r&&n&&y.g.isCollapsed(n)&&e.data&&1===e.data.length&&/[a-z ]/i.test(e.data)&&0!==n.anchor.offset){var s,c;u=!0,O.marks&&(u=!1);var{anchor:l}=n,[f,p]=lt.toDOMPoint(O,l),h=null===(s=f.parentElement)||void 0===s?void 0:s.closest("a"),b=lt.getWindow(O);if(u&&h&<.hasDOMNode(O,h)){var v,g=null==b?void 0:b.document.createTreeWalker(h,NodeFilter.SHOW_TEXT).lastChild();g===f&&(null===(v=g.textContent)||void 0===v?void 0:v.length)===p&&(u=!1)}if(u&&f.parentElement&&"pre"===(null==b||null===(c=b.getComputedStyle(f.parentElement))||void 0===c?void 0:c.whiteSpace)){var m=y.a.above(O,{at:l.path,match:e=>y.b.isElement(e)&&y.a.isBlock(O,e)});m&&y.c.string(m[0]).includes("\t")&&(u=!1)}}if(!r.startsWith("delete")||r.startsWith("deleteBy")){var[w]=e.getTargetRanges();if(w){var j=lt.toSlateRange(O,w,{exactMatch:!1,suppressThrow:!1});if(!n||!y.g.equals(n,j)){u=!1;var E=!a&&O.selection&&y.a.rangeRef(O,O.selection);y.j.select(O,j),E&&Le.set(O,E)}}}if(a)return;if(u||e.preventDefault(),n&&y.g.isExpanded(n)&&r.startsWith("delete")){var D=r.endsWith("Backward")?"backward":"forward";return void y.a.deleteFragment(O,{direction:D})}switch(r){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":y.a.deleteFragment(O);break;case"deleteContent":case"deleteContentForward":y.a.deleteForward(O);break;case"deleteContentBackward":y.a.deleteBackward(O);break;case"deleteEntireSoftLine":y.a.deleteBackward(O,{unit:"line"}),y.a.deleteForward(O,{unit:"line"});break;case"deleteHardLineBackward":y.a.deleteBackward(O,{unit:"block"});break;case"deleteSoftLineBackward":y.a.deleteBackward(O,{unit:"line"});break;case"deleteHardLineForward":y.a.deleteForward(O,{unit:"block"});break;case"deleteSoftLineForward":y.a.deleteForward(O,{unit:"line"});break;case"deleteWordBackward":y.a.deleteBackward(O,{unit:"word"});break;case"deleteWordForward":y.a.deleteForward(O,{unit:"word"});break;case"insertLineBreak":y.a.insertSoftBreak(O);break;case"insertParagraph":y.a.insertBreak(O);break;case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":"insertFromComposition"===r&<.isComposing(O)&&(C(!1),Me.set(O,!1)),"DataTransfer"===(null==i?void 0:i.constructor.name)?lt.insertData(O,i):"string"==typeof i&&(u?x.current.push(()=>y.a.insertText(O,i)):y.a.insertText(O,i))}var k=null===(t=Le.get(O))||void 0===t?void 0:t.unref();Le.delete(O),!k||O.selection&&y.g.equals(O.selection,k)||y.j.select(O,k)}},[O,F,_,o,d,T]),N=Object(c.useCallback)(e=>{null==e?(F.cancel(),T.cancel(),Se.delete(O),Fe.delete(O),E.current&&De&&E.current.removeEventListener("beforeinput",I)):De&&e.addEventListener("beforeinput",I),E.current=e},[F,T,O,I]);Ct(()=>{var e=lt.getWindow(O);return e.document.addEventListener("selectionchange",T),()=>{e.document.removeEventListener("selectionchange",T)}},[T]);var R=r([O,[]]),M=u&&1===O.children.length&&1===Array.from(y.c.texts(O)).length&&""===y.c.string(O)&&!j,L=Object(c.useCallback)(e=>{var t;e&&M?k(null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height):k(void 0)},[M]);if(M){var U=y.a.start(O,[]);R.push({[Ke]:!0,placeholder:u,onPlaceholderResize:L,anchor:U,focus:U})}var{marks:z}=O;if(B.hasMarkPlaceholder=!1,O.selection&&y.g.isCollapsed(O.selection)&&z){var{anchor:V}=O.selection,W=y.c.leaf(O,V.path),H=ce(W,sn);if(!y.i.equals(W,z,{loose:!0})){B.hasMarkPlaceholder=!0;var G=Object.fromEntries(Object.keys(H).map(e=>[e,null]));R.push(ln(ln(ln({[Ye]:!0},G),z),{},{anchor:V,focus:V}))}}return Object(c.useEffect)(()=>{setTimeout(()=>{var{selection:e}=O;if(e){var{anchor:t}=e,n=y.c.leaf(O,t.path);if(z&&!y.i.equals(n,z,{loose:!0}))return void Ve.set(O,z)}Ve.delete(O)})}),l.a.createElement(Kt.Provider,{value:d},l.a.createElement(Ht.Provider,{value:r},l.a.createElement(an,{node:E,receivedUserInput:A},l.a.createElement(g,Object.assign({role:d?void 0:"textbox","aria-multiline":!d||void 0},w,{spellCheck:!(!De&&xe)&&w.spellCheck,autoCorrect:De||!xe?w.autoCorrect:"false",autoCapitalize:De||!xe?w.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!d,zindex:-1,suppressContentEditableWarning:!0,ref:N,style:ln(ln({},m?{}:ln({position:"relative",outline:"none",whiteSpace:"pre-wrap",wordWrap:"break-word"},D?{minHeight:D}:{})),v),onBeforeInput:Object(c.useCallback)(e=>{if(!De&&!d&&!vn(e,w.onBeforeInput)&<.hasSelectableTarget(O,e.target)&&(e.preventDefault(),!lt.isComposing(O))){var t=e.data;y.a.insertText(O,t)}},[w.onBeforeInput,O,d]),onInput:Object(c.useCallback)(e=>{if(!vn(e,w.onInput))if(P.current)P.current.handleInput();else{for(var t of x.current)t();x.current=[]}},[w.onInput]),onBlur:Object(c.useCallback)(e=>{if(!d&&!B.isUpdatingSelection&<.hasSelectableTarget(O,e.target)&&!vn(e,w.onBlur)){var t=lt.findDocumentOrShadowRoot(O);if(B.latestElement!==t.activeElement){var{relatedTarget:n}=e;if(!(n===lt.toDOMNode(O,O)||Qe(n)&&n.hasAttribute("data-slate-spacer"))){if(null!=n&&Ze(n)&<.hasDOMNode(O,n)){var r=lt.toSlateNode(O,n);if(y.b.isElement(r)&&!O.isVoid(r))return}if(ge){var i=t.getSelection();null==i||i.removeAllRanges()}Re.delete(O)}}}},[d,B.isUpdatingSelection,B.latestElement,O,w.onBlur]),onClick:Object(c.useCallback)(e=>{if(lt.hasTarget(O,e.target)&&!vn(e,w.onClick)&&Ze(e.target)){var t=lt.toSlateNode(O,e.target),n=lt.findPath(O,t);if(!y.a.hasPath(O,n)||y.c.get(O,n)!==t)return;if(3===e.detail&&n.length>=1){var r=n;if(!y.b.isElement(t)||!y.a.isBlock(O,t)){var i,o=y.a.above(O,{match:e=>y.b.isElement(e)&&y.a.isBlock(O,e),at:n});r=null!==(i=null==o?void 0:o[1])&&void 0!==i?i:n.slice(0,1)}var a=y.a.range(O,r);return void y.j.select(O,a)}if(d)return;var u=y.a.start(O,n),s=y.a.end(O,n),c=y.a.void(O,{at:u}),l=y.a.void(O,{at:s});if(c&&l&&y.e.equals(c[1],l[1])){var f=y.a.range(O,u);y.j.select(O,f)}}},[O,w.onClick,d]),onCompositionEnd:Object(c.useCallback)(e=>{if(lt.hasSelectableTarget(O,e.target)){var t;if(lt.isComposing(O)&&(C(!1),Me.set(O,!1)),null===(t=P.current)||void 0===t||t.handleCompositionEnd(e),vn(e,w.onCompositionEnd)||be)return;if(!ge&&!je&&!pe&&!Ee&&!Ce&&e.data){var n=Ve.get(O);Ve.delete(O),void 0!==n&&(We.set(O,O.marks),O.marks=n),y.a.insertText(O,e.data);var r=We.get(O);We.delete(O),void 0!==r&&(O.marks=r)}}},[w.onCompositionEnd,O]),onCompositionUpdate:Object(c.useCallback)(e=>{lt.hasSelectableTarget(O,e.target)&&!vn(e,w.onCompositionUpdate)&&(lt.isComposing(O)||(C(!0),Me.set(O,!0)))},[w.onCompositionUpdate,O]),onCompositionStart:Object(c.useCallback)(e=>{if(lt.hasSelectableTarget(O,e.target)){var t;if(null===(t=P.current)||void 0===t||t.handleCompositionStart(e),vn(e,w.onCompositionStart)||be)return;C(!0);var{selection:n}=O;if(n){if(y.g.isExpanded(n))return void y.a.deleteFragment(O);var r=y.a.above(O,{match:e=>y.b.isElement(e)&&y.a.isInline(O,e),mode:"highest"});if(r){var[,i]=r;if(y.a.isEnd(O,n.anchor,i)){var o=y.a.after(O,i);y.j.setSelection(O,{anchor:o,focus:o})}}}}},[w.onCompositionStart,O]),onCopy:Object(c.useCallback)(e=>{!lt.hasSelectableTarget(O,e.target)||vn(e,w.onCopy)||gn(e)||(e.preventDefault(),lt.setFragmentData(O,e.clipboardData,"copy"))},[w.onCopy,O]),onCut:Object(c.useCallback)(e=>{if(!d&<.hasSelectableTarget(O,e.target)&&!vn(e,w.onCut)&&!gn(e)){e.preventDefault(),lt.setFragmentData(O,e.clipboardData,"cut");var{selection:t}=O;if(t)if(y.g.isExpanded(t))y.a.deleteFragment(O);else{var n=y.c.parent(O,t.anchor.path);y.a.isVoid(O,n)&&y.j.delete(O)}}},[d,O,w.onCut]),onDragOver:Object(c.useCallback)(e=>{if(lt.hasTarget(O,e.target)&&!vn(e,w.onDragOver)){var t=lt.toSlateNode(O,e.target);y.b.isElement(t)&&y.a.isVoid(O,t)&&e.preventDefault()}},[w.onDragOver,O]),onDragStart:Object(c.useCallback)(e=>{if(!d&<.hasTarget(O,e.target)&&!vn(e,w.onDragStart)){var t=lt.toSlateNode(O,e.target),n=lt.findPath(O,t);if(y.b.isElement(t)&&y.a.isVoid(O,t)||y.a.void(O,{at:n,voids:!0})){var r=y.a.range(O,n);y.j.select(O,r)}B.isDraggingInternally=!0,lt.setFragmentData(O,e.dataTransfer,"drag")}},[d,O,w.onDragStart,B]),onDrop:Object(c.useCallback)(e=>{if(!d&<.hasTarget(O,e.target)&&!vn(e,w.onDrop)){e.preventDefault();var t=O.selection,n=lt.findEventRange(O,e),r=e.dataTransfer;y.j.select(O,n),B.isDraggingInternally&&(!t||y.g.equals(t,n)||y.a.void(O,{at:n,voids:!0})||y.j.delete(O,{at:t})),lt.insertData(O,r),lt.isFocused(O)||lt.focus(O)}B.isDraggingInternally=!1},[d,O,w.onDrop,B]),onDragEnd:Object(c.useCallback)(e=>{!d&&B.isDraggingInternally&&w.onDragEnd&<.hasTarget(O,e.target)&&w.onDragEnd(e),B.isDraggingInternally=!1},[d,B,w,O]),onFocus:Object(c.useCallback)(e=>{if(!d&&!B.isUpdatingSelection&<.hasEditableTarget(O,e.target)&&!vn(e,w.onFocus)){var t=lt.toDOMNode(O,O),n=lt.findDocumentOrShadowRoot(O);if(B.latestElement=n.activeElement,ve&&e.target!==t)return void t.focus();Re.set(O,!0)}},[d,B,O,w.onFocus]),onKeyDown:Object(c.useCallback)(e=>{if(!d&<.hasEditableTarget(O,e.target)){var t;null===(t=P.current)||void 0===t||t.handleKeyDown(e);var{nativeEvent:n}=e;if(lt.isComposing(O)&&!1===n.isComposing&&(Me.set(O,!1),C(!1)),vn(e,w.onKeyDown)||lt.isComposing(O))return;var{selection:r}=O,o=O.children[null!==r?r.focus.path[0]:0],a="rtl"===i()(y.c.string(o));if(nn.isRedo(n)){e.preventDefault();var u=O;return void("function"==typeof u.redo&&u.redo())}if(nn.isUndo(n)){e.preventDefault();var s=O;return void("function"==typeof s.undo&&s.undo())}if(nn.isMoveLineBackward(n))return e.preventDefault(),void y.j.move(O,{unit:"line",reverse:!0});if(nn.isMoveLineForward(n))return e.preventDefault(),void y.j.move(O,{unit:"line"});if(nn.isExtendLineBackward(n))return e.preventDefault(),void y.j.move(O,{unit:"line",edge:"focus",reverse:!0});if(nn.isExtendLineForward(n))return e.preventDefault(),void y.j.move(O,{unit:"line",edge:"focus"});if(nn.isMoveBackward(n))return e.preventDefault(),void(r&&y.g.isCollapsed(r)?y.j.move(O,{reverse:!a}):y.j.collapse(O,{edge:"start"}));if(nn.isMoveForward(n))return e.preventDefault(),void(r&&y.g.isCollapsed(r)?y.j.move(O,{reverse:a}):y.j.collapse(O,{edge:"end"}));if(nn.isMoveWordBackward(n))return e.preventDefault(),r&&y.g.isExpanded(r)&&y.j.collapse(O,{edge:"focus"}),void y.j.move(O,{unit:"word",reverse:!a});if(nn.isMoveWordForward(n))return e.preventDefault(),r&&y.g.isExpanded(r)&&y.j.collapse(O,{edge:"focus"}),void y.j.move(O,{unit:"word",reverse:a});if(De){if((ye||ge)&&r&&(nn.isDeleteBackward(n)||nn.isDeleteForward(n))&&y.g.isCollapsed(r)){var c=y.c.parent(O,r.anchor.path);if(y.b.isElement(c)&&y.a.isVoid(O,c)&&(y.a.isInline(O,c)||y.a.isBlock(O,c)))return e.preventDefault(),void y.a.deleteBackward(O,{unit:"block"})}}else{if(nn.isBold(n)||nn.isItalic(n)||nn.isTransposeCharacter(n))return void e.preventDefault();if(nn.isSoftBreak(n))return e.preventDefault(),void y.a.insertSoftBreak(O);if(nn.isSplitBlock(n))return e.preventDefault(),void y.a.insertBreak(O);if(nn.isDeleteBackward(n))return e.preventDefault(),void(r&&y.g.isExpanded(r)?y.a.deleteFragment(O,{direction:"backward"}):y.a.deleteBackward(O));if(nn.isDeleteForward(n))return e.preventDefault(),void(r&&y.g.isExpanded(r)?y.a.deleteFragment(O,{direction:"forward"}):y.a.deleteForward(O));if(nn.isDeleteLineBackward(n))return e.preventDefault(),void(r&&y.g.isExpanded(r)?y.a.deleteFragment(O,{direction:"backward"}):y.a.deleteBackward(O,{unit:"line"}));if(nn.isDeleteLineForward(n))return e.preventDefault(),void(r&&y.g.isExpanded(r)?y.a.deleteFragment(O,{direction:"forward"}):y.a.deleteForward(O,{unit:"line"}));if(nn.isDeleteWordBackward(n))return e.preventDefault(),void(r&&y.g.isExpanded(r)?y.a.deleteFragment(O,{direction:"backward"}):y.a.deleteBackward(O,{unit:"word"}));if(nn.isDeleteWordForward(n))return e.preventDefault(),void(r&&y.g.isExpanded(r)?y.a.deleteFragment(O,{direction:"forward"}):y.a.deleteForward(O,{unit:"word"}))}}},[d,O,w.onKeyDown]),onPaste:Object(c.useCallback)(e=>{d||!lt.hasEditableTarget(O,e.target)||vn(e,w.onPaste)||(!De||(e=>e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length)(e.nativeEvent)||ge)&&(e.preventDefault(),lt.insertData(O,e.clipboardData))},[d,O,w.onPaste])}),l.a.createElement(dn,{decorations:R,node:O,renderElement:f,renderPlaceholder:h,renderLeaf:p,selection:O.selection})))))},pn=e=>{var{attributes:t,children:n}=e;return l.a.createElement("span",Object.assign({},t),n,be&&l.a.createElement("br",null))},hn=()=>[],bn=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&y.g.isCollapsed(e.selection))){var n=t.startContainer.parentElement;n.getBoundingClientRect=t.getBoundingClientRect.bind(t),m(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},vn=(e,t)=>{if(!t)return!1;var n=t(e);return null!=n?n:e.isDefaultPrevented()||e.isPropagationStopped()},gn=e=>Ze(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),mn=(e,t)=>{if(!t)return!1;var n=t(e);return null!=n?n:e.defaultPrevented},yn=Object(c.createContext)(!1);var wn=Object(c.createContext)({});var On=["editor","children","onChange","value"],jn=e=>{var{editor:t,children:n,onChange:r,value:i}=e,o=ce(e,On),a=Object(c.useRef)(!1),[u,s]=l.a.useState(()=>{if(!y.c.isNodeList(i))throw new Error("[Slate] value is invalid! Expected a list of elements but got: ".concat(y.h.stringify(i)));if(!y.a.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(y.h.stringify(t)));return t.children=i,Object.assign(t,o),{v:0,editor:t}}),{selectorContext:d,onChange:f}=function(e){var t=Object(c.useRef)([]).current,n=Object(c.useRef)({editor:e}).current,r=Object(c.useCallback)(e=>{n.editor=e,t.forEach(t=>t(e))},[t,n]);return{selectorContext:Object(c.useMemo)(()=>({getSlate:()=>n.editor,addEventListener:e=>(t.push(e),()=>{t.splice(t.indexOf(e),1)})}),[t,n]),onChange:r}}(t),p=Object(c.useCallback)(()=>{r&&r(t.children),s(e=>({v:e.v+1,editor:t})),f(t)},[t,f,r]);Object(c.useEffect)(()=>(Ue.set(t,p),()=>{Ue.set(t,()=>{}),a.current=!0}),[t,p]);var[h,b]=Object(c.useState)(lt.isFocused(t));return Object(c.useEffect)(()=>{b(lt.isFocused(t))},[t]),Ct(()=>{var e=()=>b(lt.isFocused(t));return fe?(document.addEventListener("focusin",e),document.addEventListener("focusout",e),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",e)}):(document.addEventListener("focus",e,!0),document.addEventListener("blur",e,!0),()=>{document.removeEventListener("focus",e,!0),document.removeEventListener("blur",e,!0)})},[]),l.a.createElement(wn.Provider,{value:d},l.a.createElement(Xt.Provider,{value:u},l.a.createElement(le.Provider,{value:u.editor},l.a.createElement(yn.Provider,{value:h},n))))},Cn=(e,t)=>{var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},En=(e,t,n)=>{var r=lt.toDOMRange(e,t).getBoundingClientRect(),i=lt.toDOMRange(e,n).getBoundingClientRect();return Cn(r,i)&&Cn(i,r)},xn=(e,t)=>{var n=y.a.range(e,y.g.end(t)),r=Array.from(y.a.positions(e,{at:t})),i=0,o=r.length,a=Math.floor(o/2);if(En(e,y.a.range(e,r[i]),n))return y.a.range(e,r[i],n);if(r.length<2)return y.a.range(e,r[r.length-1],n);for(;a!==r.length&&a!==i;)En(e,y.a.range(e,r[a]),n)?o=a:i=a,a=Math.floor((i+o)/2);return y.a.range(e,r[o],n)};function Dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kn(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"x-slate-fragment",n=e,{apply:r,onChange:i,deleteBackward:o,addMark:a,removeMark:u}=n;return Ie.set(n,new WeakMap),n.addMark=(e,t)=>{var r,i;null===(r=ze.get(n))||void 0===r||r(),!Ve.get(n)&&null!==(i=He.get(n))&&void 0!==i&&i.length&&Ve.set(n,null),We.delete(n),a(e,t)},n.removeMark=e=>{var t;!Ve.get(n)&&null!==(t=He.get(n))&&void 0!==t&&t.length&&Ve.set(n,null),We.delete(n),u(e)},n.deleteBackward=e=>{if("line"!==e)return o(e);if(n.selection&&y.g.isCollapsed(n.selection)){var t=y.a.above(n,{match:e=>y.b.isElement(e)&&y.a.isBlock(n,e),at:n.selection});if(t){var[,r]=t,i=y.a.range(n,r,n.selection.anchor),a=xn(n,i);y.g.isCollapsed(a)||y.j.delete(n,{at:a})}}},n.apply=e=>{var t=[],i=He.get(n);if(null!=i&&i.length){var o=i.map(t=>yt(t,e)).filter(Boolean);He.set(n,o)}var a=qe.get(n);a&&qe.set(n,mt(n,a,e));var u=Ge.get(n);if(null!=u&&u.at){var s=y.f.isPoint(null==u?void 0:u.at)?gt(n,u.at,e):mt(n,u.at,e);Ge.set(n,s?kn(kn({},u),{},{at:s}):null)}switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":t.push(...An(n,e.path));break;case"set_selection":var c;null===(c=Le.get(n))||void 0===c||c.unref(),Le.delete(n);break;case"insert_node":case"remove_node":t.push(...An(n,y.e.parent(e.path)));break;case"merge_node":var l=y.e.previous(e.path);t.push(...An(n,l));break;case"move_node":var d=y.e.common(y.e.parent(e.path),y.e.parent(e.newPath));t.push(...An(n,d))}for(var[f,p]of(r(e),t)){var[h]=y.a.node(n,f);Te.set(h,p)}},n.setFragmentData=e=>{var{selection:r}=n;if(r){var[i,o]=y.g.edges(r),a=y.a.void(n,{at:i.path}),u=y.a.void(n,{at:o.path});if(!y.g.isCollapsed(r)||a){var s=lt.toDOMRange(n,r),c=s.cloneContents(),l=c.childNodes[0];if(c.childNodes.forEach(e=>{e.textContent&&""!==e.textContent.trim()&&(l=e)}),u){var[d]=u,f=s.cloneRange(),p=lt.toDOMNode(n,d);f.setEndAfter(p),c=f.cloneContents()}if(a&&(l=c.querySelector("[data-slate-spacer]")),Array.from(c.querySelectorAll("[data-slate-zero-width]")).forEach(e=>{var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""}),tt(l)){var h=l.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(l),c.appendChild(h),l=h}var b=n.getFragment(),v=JSON.stringify(b),g=window.btoa(encodeURIComponent(v));l.setAttribute("data-slate-fragment",g),e.setData("application/".concat(t),g);var m=c.ownerDocument.createElement("div");return m.appendChild(c),m.setAttribute("hidden","true"),c.ownerDocument.body.appendChild(m),e.setData("text/html",m.innerHTML),e.setData("text/plain",it(m)),c.ownerDocument.body.removeChild(m),e}}},n.insertData=e=>{n.insertFragmentData(e)||n.insertTextData(e)},n.insertFragmentData=e=>{var r=e.getData("application/".concat(t))||at(e);if(r){var i=decodeURIComponent(window.atob(r)),o=JSON.parse(i);return n.insertFragment(o),!0}return!1},n.insertTextData=e=>{var t=e.getData("text/plain");if(t){var r=t.split(/\r\n|\r|\n/),i=!1;for(var o of r)i&&y.j.splitNodes(n,{always:!0}),n.insertText(o),i=!0;return!0}return!1},n.onChange=e=>{ue.a.unstable_batchedUpdates(()=>{var t=Ue.get(n);t&&t(),i(e)})},n},An=(e,t)=>{var n=[];for(var[r,i]of y.a.levels(e,{at:t})){var o=lt.findKey(e,r);n.push([i,o])}return n}},212:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(1);function i(e){var t;return(t=[]).concat.apply(t,Object(r.m)([],Object(r.k)(e),!1))}function o(e,t){t&&!1===e.hasCustomName&&(e.name=t.slice(0,24))}},213:function(e,t,n){"use strict";t.a=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}}},214:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(142);function i(e,t){return e.jsonVersion===r.b||(t.raiseNeedHardUpdate(),!1)}function o(e,t){return e.jsonVersion===r.b||(t.raiseNeedHardUpdate(),!1)}},22:function(e,t,n){"use strict";n.d(t,"u",(function(){return i})),n.d(t,"w",(function(){return o})),n.d(t,"E",(function(){return a})),n.d(t,"f",(function(){return u})),n.d(t,"v",(function(){return s})),n.d(t,"x",(function(){return c})),n.d(t,"g",(function(){return l})),n.d(t,"s",(function(){return d})),n.d(t,"y",(function(){return f})),n.d(t,"o",(function(){return p})),n.d(t,"A",(function(){return h})),n.d(t,"d",(function(){return b})),n.d(t,"p",(function(){return v})),n.d(t,"D",(function(){return g})),n.d(t,"e",(function(){return m})),n.d(t,"m",(function(){return y})),n.d(t,"l",(function(){return w})),n.d(t,"n",(function(){return O})),n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return C})),n.d(t,"B",(function(){return E})),n.d(t,"r",(function(){return x})),n.d(t,"C",(function(){return D})),n.d(t,"c",(function(){return k})),n.d(t,"k",(function(){return _})),n.d(t,"z",(function(){return A})),n.d(t,"t",(function(){return S})),n.d(t,"h",(function(){return B})),n.d(t,"j",(function(){return P})),n.d(t,"i",(function(){return F})),n.d(t,"q",(function(){return T}));var r=n(32);t.F={shadow:{1:"1px 1px 2px -1px rgba(0, 0, 0, 0.2)",2:"1px 1px 4px -1px rgba(0, 0, 0, 0.2)",3:"1px 1px 6px -1px rgba(0, 0, 0, 0.2)",4:"1px 1px 8px -1px rgba(0, 0, 0, 0.2)"}};var i=r.theme.palette.BrandMainColor,o=r.theme.palette.BrandAlternativeColor,a="#FF9A4C",u="#FF7FA0",s=r.theme.palette.StatusBadgeToneBackgroundColor.positive,c=r.theme.palette.StatusBadgeToneBackgroundColor.neutral,l=r.theme.palette.StatusBadgeToneBackgroundColor.negative,d=r.theme.palette.BorderColorLight,f="#242335",p=r.theme.palette.HeadlineColor,h=r.theme.palette.TextColorDark,b="#8D8C9B",v=r.theme.palette.IconColor,g=r.theme.palette.UnselectedControlColor,m=r.theme.palette.BorderColor,y=r.theme.palette.DividerColor,w=r.theme.palette.DisabledColor,O="#E4E5E7",j=r.theme.palette.PageBackgroundColor,C="#E4E5E7",E=r.theme.palette.ControlBackgroundColor,x="#FBFBFB",D=r.theme.palette.TextColorLight,k=r.theme.palette.BackgroundColor,_=r.theme.palette.DisabledColor,A=r.theme.palette.TextColorDisabled,S="#82adf4",B="#FFB665",P="#FFC789",F="#F7A74E",T="#8AF6EF"},224:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r={opacity:1,shadowApplied:!0,shadowBlur:10,shadowPosX:0,shadowPosY:2,shadowSpread:0,borderApplied:!1,borderColor:{a:1,b:0,g:0,r:0},borderStyle:"solid",borderWidth:1,shadowColor:{a:.25,b:0,g:0,r:0},borderRadius:{topLeft:5,topRight:5,bottomLeft:5,bottomRight:5},backgroundColorApplied:!0,backgroundColor:{a:1,b:255,g:255,r:255},backgroundImageSize:"contain",backgroundImageApplied:!1,backgroundImage:void 0,backgroundImageGiosgAssetUrl:void 0},i={opacity:1,shadowApplied:!1,shadowBlur:0,shadowPosX:0,shadowPosY:0,shadowSpread:0,borderApplied:!1,borderColor:{a:0,b:255,g:255,r:255},borderStyle:"solid",borderWidth:0,shadowColor:{a:0,b:255,g:255,r:255},borderRadius:{topLeft:5,topRight:5,bottomLeft:5,bottomRight:5},backgroundColorApplied:!1,backgroundColor:{a:0,b:255,g:255,r:255},backgroundImageSize:"contain",backgroundImageApplied:!1,backgroundImage:void 0,backgroundImageGiosgAssetUrl:void 0}},225:function(e,t,n){"use strict";n.d(t,"a",(function(){return W})),n.d(t,"c",(function(){return H})),n.d(t,"b",(function(){return q}));var r=n(30),i=n(173),o=n(52),a=n(39),u=n(507),s=Object(a.a)((function(e){return{type:"checkbox",get label(){return o.a.t("designStep.elementsDefaults.CheckboxLabel")},defaultValue:"",hasCustomName:!1,designs:null!=e?e:u.a}}),{width:120,height:30}),c=n(82),l=n(233),d=n(512),f=function(e){var t=Object(l.a)("cell ".concat(e));return Object(c.c)(t,{type:"element",xType:"stretch",yType:"stretch",width:0,height:0,leftOffset:0,rightOffset:0,topOffset:0,bottomOffset:0,rotation:0,hidden:!1},"all"),t},p=Object(a.a)((function(e){return{type:"grid",designs:null!=e?e:d.a,children:[f(1),f(2)]}}),{width:200,height:150}),h=n(509),b=Object(a.a)((function(e){return{type:"iframe",srcTemplate:"",designs:null!=e?e:h.a}}),{width:160,height:90}),v=n(338),g=n(335),m=n(513),y=Object(a.a)((function(e){return{type:"live_reaction",designs:null!=e?e:m.a}}),{width:56,height:56}),w=n(510),O=Object(a.a)((function(e){return{organizationId:null,type:"product_card",designs:null!=e?e:w.a,orientation:"horizontal",listStyle:"continuous",listDirection:"horizontal",showControls:!0,products:[],targetGroups:[],callToActionText:"Current deal",buttonCallToActionText:"Add to cart",usageScenario:"live_stream_campaign"}}),{width:220,height:156}),j=n(27),C=n(504),E=Object(a.a)((function(e){return{type:"radio",get options(){return[{id:Object(j.g)(),label:o.a.t("designStep.elementsDefaults.RadioOption1")},{id:Object(j.g)(),label:o.a.t("designStep.elementsDefaults.RadioOption2")},{id:Object(j.g)(),label:o.a.t("designStep.elementsDefaults.RadioOption3")}]},defaultValue:"0",columns:1,designs:null!=e?e:C.a}}),{width:120,height:60}),x=n(505),D=Object(a.a)((function(e){return{type:"select",get options(){return[{id:Object(j.g)(),label:o.a.t("designStep.elementsDefaults.SelectOptionLabel")}]},defaultValue:"0",designs:null!=e?e:x.a}}),{width:120,height:30}),k=n(323),_=n(514),A=Object(a.a)((function(e){return{type:"slider",designs:null!=e?e:_.a,defaultValue:0,min:0,max:100,step:1,marks:[]}}),{width:170,height:20}),S=n(121),B=n(147),P=Object(a.a)((function(e){return{type:"spinner",get label(){return o.a.t("designStep.elementsDefaults.WheelDefaultButton")},designs:null!=e?e:B.d,sections:[{id:Object(S.a)(),label:"".concat(o.a.t("spinnerElementTools.WinningSection")),probability:50,designs:B.c},{id:Object(S.a)(),label:"".concat(o.a.t("spinnerElementTools.TrySection")),probability:null,designs:B.b},{id:Object(S.a)(),label:"".concat(o.a.t("spinnerElementTools.TrySection")),probability:null,designs:B.a},{id:Object(S.a)(),label:"".concat(o.a.t("spinnerElementTools.TrySection")),probability:null,designs:B.b}]}}),{width:200,height:200}),F=n(268),T=Object(a.a)((function(e){var t;return{type:"stream",streamUrl:"",muxVideoAssetId:"",streamSourceType:null!==(t=null==e?void 0:e.streamSourceType)&&void 0!==t?t:"video-recorded",streamChannelId:void 0,qualityPreset:"optimized",orientation:"landscape",controlsMode:"all",controlSize:18,autoHideControls:!0,autoScale:!0,scale:1,muted:!1,autoPlay:!1,lowLatencyMode:!0,backBufferLength:30,maxLiveSyncPlaybackRate:1.7,liveSyncDurationCount:3,liveMaxLatencyDurationCount:5,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0,abrBandWidthUpFactor:4,abrBandWidthFactor:6,liveDurationInfinity:!0,designs:null!=e?e:F.b,loop:!0}}),{width:160,height:90}),I=Object(a.a)((function(e){return{type:"stream_viewer_count",streamChannelId:void 0,designs:null!=e?e:F.d}}),{width:70,height:45}),N=Object(a.a)((function(e){return{type:"stream_event_listener",streamChannelId:void 0,onStreamStartChangeView:void 0,onStreamEndChangeView:void 0,designs:null!=e?e:F.c}}),{width:70,height:45}),R=n(174),M=n(508),L=Object(a.a)((function(e){return{type:"video",designs:null!=e?e:M.a,description:void 0,video:void 0}}),{width:160,height:90}),U=n(92),z=n(337),V=Object(z.a)({button:i.a,input:g.a,view:U.a,radio:E,select:D,text:R.a,image:v.a,checkbox:s,video:L,iframe:b,stream:T,stream_viewer_count:I,stream_event_listener:N,product_card:O,spinner:P,shape:k.a,group:l.a,grid:p,live_reaction:y,slider:A});function W(e){return V[e]}function H(e){return"input"===e.type||"slider"===e.type||"select"===e.type||"radio"===e.type||"checkbox"===e.type||"image"===e.type||"spinner"===e.type}var G=function(e){return e&&isFinite(Number(e))?Number(e):void 0};function q(e,t){var n;if("select"===e.type){var i=void 0!==t?null!==(n=G(t))&&void 0!==n?n:function(e,t){var n=e.options.findIndex((function(e){return e.label.toLowerCase()===t.toLowerCase()}));return n>-1?n:void 0}(e,t):void 0;return null!=i?i:e.isRequired?void 0:G(e.defaultValue)}if("radio"===e.type){var o=t&&Number(t)||e.defaultValue;return e.isRequired||""===o?void 0:Number(o)}if("checkbox"===e.type)return!!(o=null!=t?t:e.defaultValue);if("input"===e.type){o=null!=t?t:e.defaultValue;return"number"===e.inputFieldType?o?Number(o):void 0:o}if("spinner"===e.type)return 0;if("slider"===e.type){o=null!=t?t:e.defaultValue;return Number(o)}if("image"===e.type)return t;Object(r.a)(e)}},232:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1);function i(e){var t,n,i={};try{for(var o=Object(r.n)(e.replace(/^\?/,"").split("&")),a=o.next();!a.done;a=o.next()){var u=a.value,s=Object(r.k)(u.split("="),2),c=s[0],l=s[1];c&&(i[c]=decodeURIComponent(l))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}},233:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(39),i=n(511),o=n(175),a=Object(r.a)((function(e){return{type:"group",designs:null!=e?e:i.a,groupUid:o.a}}),{width:200,height:150})},234:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(26),i=function(e){return e.slice().sort((function(e,t){var n=Object(r.e)(e),i=Object(r.e)(t),c=a(n.yType,i.yType);if(0!==c)return c;if(!o(n,i))return s(n,i);var l=a(n.xType,i.xType);return 0!==l?l:u(n,i)}))},o=function(e,t){var n="end"!==e.yType?e.topOffset:e.bottomOffset,r="end"!==t.yType?t.topOffset:t.bottomOffset,i=n+e.height;return nr},a=function(e,t){var n={start:1,middle:2,end:3,stretch:1};return n[e]-n[t]},u=function(e,t){return"end"!==e.xType?e.leftOffset-t.leftOffset:t.rightOffset-e.rightOffset},s=function(e,t){return"end"!==e.yType?e.topOffset-t.topOffset:t.bottomOffset-e.bottomOffset}},235:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return d}));var r=n(30),i=n(106),o=n(85),a=n(71),u=n(28),s=function(e,t,n,r){if(!t&&r){if(!Object(a.b)(e,n))return t;Object(a.d)(e,n)}return t},c=function(e,t){return e===t},l=function(e,t){switch(t.type){case"input":return Object(o.d)(e,t);case"radio":case"select":return(void 0===e||"number"==typeof e)&&(void 0===e?!t.isRequired:e>=0&&e<=t.options.length);default:Object(r.a)(t)}},d=function(e,t,n){if("localstorageflag"===n.type){if(n.flagId){var o=!!Object(i.a)("local").getItem(Object(u.f)(n.flagId));if("set"===n.mustBe)return o;if("unset"===n.mustBe)return!o;Object(r.a)(n.mustBe)}}else{if("dataFieldValueEq"===n.type)return!!n.fieldName&&t.dataFields[n.fieldName]===n.targetValue;if("dataFieldValueNotEq"===n.type)return!!n.fieldName&&t.dataFields[n.fieldName]!==n.targetValue;if("viewvalid"===n.type)return function(e,t,n,r){return n.elements.map((function(n){return"input"!==n.type&&"radio"!==n.type&&"select"!==n.type||s(e,l(t.fields[n.uid],n),n.uid,r)})).every((function(e){return!!e}))}(e,t,Object(u.c)(e),n.highlightTarget);if("elementclicked"===n.type){var d=!n.wasClicked;if(!(p=n.targetId))return!1;if(v=Object(u.d)(e,p)){var f=function(e,t,n){var r=!!e.data.elementClicks.find((function(e){return e===t.uid}));return!(!n||r)||!(n||!r)}(e,v,d);return s(e,f,v.uid,!1)}return!1}if("targetId"in n&&"targetValue"in n){var p=n.targetId,h=n.targetValue,b=n.highlightTarget;if(p){var v,g=(v=Object(u.d)(e,p))?function(e,t){var n=e.fields[t.uid];return"radio"===t.type||"select"===t.type?"number"!=typeof n?"":n.toString():"checkbox"===t.type?"boolean"!=typeof n&&void 0!==n?"":n?"true":"false":"input"===t.type?"string"!=typeof n?"":n:""}(t,v):"";if(v){if("valuepresent"===n.type)return s(e,!Object(a.a)(e,v.uid),p,b);var m;if("valueeq"===n.type)return"radio"===v.type||"select"===v.type?(m=v.options.findIndex((function(e){return e.id===h})))<0||s(e,c(g,m.toString()),p,b):s(e,c(g,h),p,b);if("valuenoteq"===n.type&&h)return"radio"===v.type||"select"===v.type?(m=v.options.findIndex((function(e){return e.id===h})))<0||s(e,!c(g,m.toString()),p,b):s(e,!c(g,h),p,b);if("inputvalid"===n.type){if("input"===v.type||"radio"===v.type||"select"===v.type)return s(e,l(t.fields[v.uid],v),p,b)}else if("spinResult"===n.type){if("spinner"===v.type){f=v.resultSectionId===n.targetValue;return s(e,f,v.uid,b)}}else if("spinsLeft"===n.type){if("spinner"===v.type){var y=t.fields[v.uid];f=v.numberOfSpins-y===parseInt(n.targetValue,10);return s(e,f,v.uid,b)}}else if("spinsCount"===n.type&&"spinner"===v.type){f=(y=t.fields[v.uid])===parseInt(n.targetValue,10);return s(e,f,v.uid,b)}}}}else Object(r.a)(n.type)}return!0}},237:function(e,t,n){var r=n(140).Symbol;e.exports=r},239:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return l})),n.d(t,"b",(function(){return f}));var r,i=n(1),o=n(46);function a(e,t,n,r,o){return Object(i.e)(this,void 0,void 0,(function(){var a,u,s,c;return Object(i.h)(this,(function(i){switch(i.label){case 0:if(a={cookieGuid:"giosg",kpiGuid:"giosg",branch:void 0,clientBrowser:"giosg",clientDevice:"giosg",clients:"giosg",interaction:void 0,referrer:"giosg"},!r)return[2];if(!e)throw new Error(":: Missing required parameter 'code'");u="".concat(r,"/api/kpis/").concat(e),s=":: Error while sending KPI ".concat(e),a.branch=n,a.interaction="",0!==Object.keys(o).length&&(a.interaction=JSON.stringify(o)),i.label=1;case 1:return i.trys.push([1,4,,5]),[4,fetch(u,{method:"POST",headers:{token:t},body:JSON.stringify(a)})];case 2:if(!(c=i.sent()).ok)throw new Error(s);return[4,c.json()];case 3:return[2,i.sent()];case 4:return i.sent(),[2,Promise.reject(s)];case 5:return[2]}}))}))}function u(e,t,n,r){return Object(i.e)(this,void 0,void 0,(function(){var r,o,a;return Object(i.h)(this,(function(i){switch(i.label){case 0:if(!e)throw new Error(":: Missing required parameter 'apiKey'");if(!t)throw new Error(":: Missing required parameter 'seedId'");r={branch:t},i.label=1;case 1:return i.trys.push([1,4,,5]),[4,fetch("".concat(n,"/token/").concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})];case 2:if(!(o=i.sent()).ok)throw Error(":: Error getting token for seed [".concat(t,"]"));return[4,o.json()];case 3:return[2,i.sent()];case 4:return a=i.sent(),[2,Promise.reject(a)];case 5:return[2]}}))}))}function s(e,t,n){return Object(i.e)(this,void 0,void 0,(function(){var r,o;return Object(i.h)(this,(function(a){switch(a.label){case 0:return r="".concat(n,"/api/agents/?branch=").concat(e,"&include_agent_list=true"),o="Error while getting the agents availability. ".concat(e),[4,fetch(r,{method:"GET",headers:{"Content-Type":"application/json",token:"".concat(t)}}).then((function(e){return Promise.all([e,e.json()])})).then((function(e){var t=Object(i.k)(e,2),n=t[0],r=t[1];if(!n.ok)throw Error("".concat(o));return r})).catch((function(e){console.error(e)}))];case 1:return[2,a.sent()]}}))}))}function c(e){return Object(i.e)(this,void 0,void 0,(function(){var t;return Object(i.h)(this,(function(n){switch(n.label){case 0:return e&&window.whisbi?[4,u(window.whisbi._config.api.apiKey,window.whisbi._config.api.primarySeed,e)]:[3,3];case 1:return(null==(t=n.sent())?void 0:t.token)?[4,s(window.whisbi._config.api.secondarySeed?window.whisbi._config.api.secondarySeed:window.whisbi._config.api.primarySeed,t.token,e)]:[3,3];case 2:return[2,n.sent()];case 3:return[2]}}))}))}var l;function d(e){return Object(i.e)(this,void 0,void 0,(function(){var t,n;return Object(i.h)(this,(function(r){switch(r.label){case 0:return[4,u(window.whisbi._config.api.apiKey,window.whisbi._config.api.primarySeed,e)];case 1:return(null==(t=r.sent())?void 0:t.token)?(n=window.whisbi._config.api.secondarySeed?window.whisbi._config.api.secondarySeed:window.whisbi._config.api.primarySeed,[4,a(1144,t.token,n,e,"")]):[3,3];case 2:r.sent(),r.label=3;case 3:return[2]}}))}))}var f=function(e,t){var n=function(e){var t,n,r,o,a,u,s,c;try{for(var l=Object(i.n)(e.views),d=l.next();!d.done;d=l.next()){var f=d.value;try{for(var p=(r=void 0,Object(i.n)(f.elements)),h=p.next();!h.done;h=p.next()){var b=h.value;try{for(var v=(a=void 0,Object(i.n)(b.clickEvents||[])),g=v.next();!g.done;g=v.next()){var m=g.value;try{for(var y=(s=void 0,Object(i.n)(m.actions||[])),w=y.next();!w.done;w=y.next()){var O=w.value;if("showWhisbiClient"===O.type)return O}}catch(e){s={error:e}}finally{try{w&&!w.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}}}catch(e){a={error:e}}finally{try{g&&!g.done&&(u=v.return)&&u.call(v)}finally{if(a)throw a.error}}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}}(e);(null==n?void 0:n.landingGuid)&&(l=function(e,t,n){return Object(i.e)(this,void 0,void 0,(function(){return Object(i.h)(this,(function(i){return r?[2,r]:[2,r=new Promise((function(r,i){var a;null===(a=null==e?void 0:e.on)||void 0===a||a.call(e,"whisbiloaded",r);var u=document.createElement("script");u.onerror=i,setTimeout(i,8e3);var s="".concat(o.j,"/").concat(t,"/connect.js");n&&(s+="?".concat(n)),u.src=s,document.body.appendChild(u)}))]}))}))}(t,n.landingGuid,n.customConfig))}},240:function(e,t,n){"use strict";n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c}));var r=n(1),i=n(46),o=n(61),a=function(e){return Object(r.e)(void 0,void 0,void 0,(function(){var t,n;return Object(r.h)(this,(function(r){switch(r.label){case 0:t="".concat(i.d,"/api/pim/v1/public/orgs/").concat(e,"/products/"),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,fetch(t,{mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json"}})];case 2:return[4,r.sent().json()];case 3:return[2,r.sent()];case 4:return n=r.sent(),console.error("Failed to get products",n),[2,[]];case 5:return[2]}}))}))},u=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,a,u;return Object(r.h)(this,(function(r){switch(r.label){case 0:if(n="".concat(i.d,"/api/pim/v1/orgs/").concat(e,"/products/"),!(a=Object(o.a)("giosg_editor_oauth_token")))return[2,null];r.label=1;case 1:return r.trys.push([1,4,,5]),[4,fetch(n,{method:"POST",mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json",authorization:"Bearer ".concat(a)},body:JSON.stringify({url:t})})];case 2:return[4,r.sent().json()];case 3:return[2,r.sent()];case 4:return u=r.sent(),console.error("Failed to create a product",u),[2,null];case 5:return[2]}}))}))},s=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,a,u;return Object(r.h)(this,(function(r){switch(r.label){case 0:if(n="".concat(i.d,"/api/pim/v1/orgs/").concat(e,"/products/").concat(t,"/"),!(a=Object(o.a)("giosg_editor_oauth_token")))return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,fetch(n,{method:"DELETE",mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json",authorization:"Bearer ".concat(a)}})];case 2:return r.sent(),[3,4];case 3:return u=r.sent(),console.error("Failed to delete a product",u),[3,4];case 4:return[2]}}))}))},c=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,o;return Object(r.h)(this,(function(r){switch(r.label){case 0:n="".concat(i.d,"/api/pim/v1/public/orgs/").concat(e,"/groups/").concat(t,"/campaigns/"),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,fetch(n,{mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json"}})];case 2:return[4,r.sent().json()];case 3:return[2,r.sent()];case 4:return o=r.sent(),console.error("Failed to get campaings",o),[2,[]];case 5:return[2]}}))}))}},241:function(e,t,n){"use strict";function r(e,t){return typeof e==typeof t&&("object"!=typeof e||"object"!=typeof t||null===e||null===t?e===t:Array.isArray(e)&&Array.isArray(t)?e.every((function(e){return t.some((function(t){return r(e,t)}))}))&&t.every((function(t){return e.some((function(e){return r(e,t)}))})):!Array.isArray(e)&&!Array.isArray(t)&&(Object.keys(e).every((function(n){return r(e[n],t[n])}))&&Object.keys(t).every((function(n){return r(e[n],t[n])}))))}n.d(t,"a",(function(){return r}))},244:function(e,t,n){var r=n(177),i=n(141);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},259:function(e,t,n){"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,"a",(function(){return r}))},26:function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return u})),n.d(t,"f",(function(){return s})),n.d(t,"e",(function(){return l}));var r=n(1),i=function(e){return"start"===e?"left":"end"===e?"right":e},o=function(e){return"start"===e?"top":"end"===e?"bottom":e};function a(e){var t,n,r,i,o=function(e){return"left"===e?"start":"right"===e?"end":e}(e.xType),a=function(e){return"top"===e?"start":"bottom"===e?"end":e}(e.yType);return{type:"element",leftOffset:["middle","start","stretch"].includes(o)?null!==(t=e.leftOffset)&&void 0!==t?t:Math.round(e.xPos):void 0,rightOffset:null!==(n=["end","stretch"].includes(o)?e.rightOffset:void 0)&&void 0!==n?n:["end"].includes(o)?-Math.round(e.xPos):void 0,topOffset:["middle","start","stretch"].includes(a)?null!==(r=e.topOffset)&&void 0!==r?r:Math.round(e.yPos):void 0,bottomOffset:null!==(i=["end","stretch"].includes(a)?e.bottomOffset:void 0)&&void 0!==i?i:["end"].includes(a)?-Math.round(e.yPos):void 0,xType:o,yType:a,height:e.height,width:e.width,rotation:e.rotation,hidden:e.hidden}}var u=1e4,s=function(e,t){var n,r,i,o,s,l,d=c(e,t),f=!!e.isFullHeight,p=!!e.isFullWidth,h=a(d);return{type:"view",width:[null!==(n=d.minWidth)&&void 0!==n?n:p?1:d.width,null!==(r=d.maxWidth)&&void 0!==r?r:p?u:d.width],height:[null!==(i=d.minHeight)&&void 0!==i?i:f?1:d.height,null!==(o=d.maxHeight)&&void 0!==o?o:f?u:d.height],xType:h.xType,yType:h.yType,topOffset:h.topOffset,bottomOffset:h.bottomOffset,leftOffset:h.leftOffset,rightOffset:h.rightOffset,rotation:h.rotation,hidden:h.hidden,isAutoMinWidth:null!==(s=d.isAutoMinWidth)&&void 0!==s&&s,isAutoMinHeight:null!==(l=d.isAutoMinHeight)&&void 0!==l&&l}};function c(e,t){var n,i,o,a=null!==(n="mobile"===t?e.arrangement.mobile:"desktop"===t?e.arrangement.desktop:null)&&void 0!==n?n:e.arrangement.default;return Object(r.a)(Object(r.a)({},a),{hidden:null!==(o=null!==(i="view"===e.type?void 0:e.hidden)&&void 0!==i?i:a.hidden)&&void 0!==o&&o})}function l(e,t){return void 0===t&&(t="all"),"view"===e.type?s(e,t):a(c(e,t))}},261:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(1),i=n(212),o={x:[],y:[]};function a(e,t,n,r,i){var o=[n,r],a="stretch"===i||"view"===i;return[{offset:e,points:o,constraint:a?"start":i},{offset:Math.floor((e+t)/2),points:o,constraint:"view"===i?"middle":i},{offset:t,points:o,constraint:a?"end":i}]}function u(e,t,n,r,i,o,u){return a(e,t,n,r,i).filter((function(e){return["start","end"].includes(e.constraint)&&"stretch"===o||e.constraint===o||!u})).flatMap((function(e){return e.points.map((function(t){return[e.offset,t]}))}))}function s(e){var t=new Set;return e.filter((function(e){return!t.has(e.offset)&&(t.add(e.offset),!0)}))}function c(e){var t=Object(i.b)(Object(r.m)([],Object(r.k)(e.map((function(e){var t=e.x,n=e.y;return a(t,t+e.width,n,n+e.height,e.constraintX)}))),!1)),n=Object(i.b)(Object(r.m)([],Object(r.k)(e.map((function(e){var t=e.x,n=e.y,r=e.width;return a(n,n+e.height,t,t+r,e.constraintY)}))),!1));return{x:s(t).map((function(e){return{constraint:e.constraint,offset:e.offset}})),y:s(n).map((function(e){return{constraint:e.constraint,offset:e.offset}}))}}function l(e,t,n,o,s){var c=function(e,t){var n=e.x,r=e.y,i=e.height,o=e.width;return{horizontal:a(r,r+i,n,n+o,"stretch").filter((function(e){return!t||e.constraint===t.y})),vertical:a(n,n+o,r,r+i,"stretch").filter((function(e){return!t||e.constraint===t.x}))}}(e,s),l=Object(i.b)(t.map((function(e){return function(e,t,n){var r=e.x,i=e.y;return u(i,i+e.height,r,r+e.width,e.constraintX,t,n)}(e,n.y,o)}))),d=c.horizontal.map((function(e){return{y:e.offset,xs:Object(r.m)(Object(r.m)([],Object(r.k)(e.points),!1),Object(r.k)(l.filter((function(t){var n=Object(r.k)(t,1)[0];return e.offset===n})).map((function(e){return Object(r.k)(e,2)[1]}))),!1)}})),f=Object(i.b)(t.map((function(e){return function(e,t,n){var r=e.x,i=e.y,o=e.height;return u(r,r+e.width,i,i+o,e.constraintX,t,n)}(e,n.x,o)}))),p=c.vertical.map((function(e){return{x:e.offset,ys:Object(r.m)(Object(r.m)([],Object(r.k)(e.points),!1),Object(r.k)(f.filter((function(t){var n=Object(r.k)(t,1)[0];return e.offset===n})).map((function(e){return Object(r.k)(e,2)[1]}))),!1)}})),h={horizontal:d.filter((function(e){return e.xs.length>2})),vertical:p.filter((function(e){return e.ys.length>2}))};return[Object(r.m)(Object(r.m)([],Object(r.k)(h.horizontal.map((function(e){return[{x:Math.max.apply(Math,Object(r.m)([],Object(r.k)(e.xs),!1)),y:e.y},{x:Math.min.apply(Math,Object(r.m)([],Object(r.k)(e.xs),!1)),y:e.y}]}))),!1),Object(r.k)(h.vertical.map((function(e){return[{y:Math.max.apply(Math,Object(r.m)([],Object(r.k)(e.ys),!1)),x:e.x},{y:Math.min.apply(Math,Object(r.m)([],Object(r.k)(e.ys),!1)),x:e.x}]}))),!1),{x:0===h.vertical.length,y:0===h.horizontal.length}]}},264:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(79);function i(e){var t=function(e,t){if("object"!=Object(r.a)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Object(r.a)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Object(r.a)(t)?t:t+""}},265:function(e,t,n){"use strict";n.d(t,"a",(function(){return V})),n.d(t,"c",(function(){return W})),n.d(t,"b",(function(){return G})),n.d(t,"d",(function(){return q}));var r=n(1),i=n(52),o=n(8),a=n(329),u=n(60),s=n(142),c=n(26),l=n(324),d=n(43);function f(e,t,n){return e>=t&&e<=n}var p=n(167),h=n(51),b=n(46),v=n(175),g=n(92),m=n(273),y=n(27),w=n(30),O=n(150),j=n(139),C=n(132),E=n(189),x=function(){function e(e){var t=this;Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"getProjectErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var n,i,o=[];try{for(var a=Object(r.n)(t.store.interactionData.views),u=a.next();!u.done;u=a.next()){var s=u.value;o=o.concat(t.getViewErrors(s,e))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}}),Object.defineProperty(this,"getViewErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n){var i=function(o){var a=t.getElementErrors(o,e,n);if("group"===o.type){var u=t.store.getGroup(o.groupUid);if(u){var s=t.getElementsOrdered(u.elements);a.push.apply(a,Object(r.m)([],Object(r.k)(s.flatMap((function(e){return i(e).map((function(e){return Object(r.a)(Object(r.a)({},e),{parentUids:[o.uid]})}))}))),!1))}}return a},o=t.store.interactionData.isInInvisibleViewMode?[]:t.getElementErrors(e,e,n),a=t.getElementsOrdered(e.elements);return o=Object(r.m)(Object(r.m)([],Object(r.k)(o),!1),Object(r.k)(a.flatMap((function(e){return i(e)}))),!1)}}),Object.defineProperty(this,"getElementErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n,i){var o,a,u=[];if(u=u.concat(t.getElementNameErrors(e,n)),e.clickEvents)try{for(var s=Object(r.n)(e.clickEvents),c=s.next();!c.done;c=s.next()){var l=c.value;u=u.concat(t.getEventErrors(l,e,n,i))}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}return u}}),Object.defineProperty(this,"getElementsOrdered",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return Object(r.m)([],Object(r.k)(e),!1).reverse()}}),Object.defineProperty(this,"getEventErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n,i,o){var a,u,s,c,l=[];try{for(var d=Object(r.n)(e.conditions),f=d.next();!f.done;f=d.next()){var p=f.value;l=l.concat(t.getConditionErrors(p,n,i))}}catch(e){a={error:e}}finally{try{f&&!f.done&&(u=d.return)&&u.call(d)}finally{if(a)throw a.error}}try{for(var h=Object(r.n)(e.actions),b=h.next();!b.done;b=h.next()){var v=b.value;l=l.concat(t.getActionErrors(v,n,i,o))}}catch(e){s={error:e}}finally{try{b&&!b.done&&(c=h.return)&&c.call(h)}finally{if(s)throw s.error}}return l}}),Object.defineProperty(this,"getConditionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n,r){var i=[];return i=(i=(i=i.concat(t.getLocalstorageFlagConditionErrors(e,n,r))).concat(t.getValueCheckConditionErrors(e,n,r))).concat(t.getInputValidationConditionErrors(e,n,r))}}),Object.defineProperty(this,"getActionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n,r,i){return"changeview"===e.type?t.getChangeViewActionErrors(e,n,r):"url"===e.type?t.getUrlActionErrors(e,n,r):"giosgprocessor"===e.type?t.getGiosgProcessorActionErrors(e,n,r):"showhide"===e.type?t.getShowHideElementActionErrors(e,n,r):"localstorageflag"===e.type?t.getLocalstorageFlagActionErrors(e,n,r):"delay"===e.type?t.getDelayActionErrors(e,n,r):"formdata"===e.type?t.getSubmitFormActionErrors(e,n,r):"starttask"===e.type?t.getStartTaskActionErrors(e,n,r):"startcall"===e.type?t.getStartCallActionErrors(e,n,r):"customaction"===e.type?t.getRunWorkflowActionErrors(e,n,r,i):"openchat"===e.type||"exit"===e.type||"runjs"===e.type||"closechat"===e.type||"setdatafield"===e.type||"hubformdata"===e.type||"uploadFile"===e.type||"setVisitorVariable"===e.type||"showWhisbiClient"===e.type?[]:void Object(w.a)(e)}}),Object.defineProperty(this,"getAllProjectVariableNames",{enumerable:!0,configurable:!0,writable:!0,value:function(){return t.store.interactionData.views.flatMap((function(e){return Object(r.m)([Object(h.d)(e)],Object(r.k)(e.elements.flatMap((function(e){return[Object(h.d)(e),Object(h.c)(e)]}))),!1)}))}}),Object.defineProperty(this,"getElementNameErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n){var r=[];if(e.name||r.push({view:n,element:e,description:"Element is missing a name."}),e.name&&Object(O.a)(["input","checkbox","select","radio"],e)){var i=t.getAllProjectVariableNames(),o=Object(h.d)(e);i.filter((function(e){return e===o})).length>1&&r.push({view:n,element:e,description:"Duplicate data field name."})}return r}}),Object.defineProperty(this,"getLocalstorageFlagConditionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n,r){var i=[];"localstorageflag"===e.type&&(e.flagId||i.push({view:r,element:n,description:"Condition “check stored flag” has no flag selected.",condition:e}),e.flagId&&(!!t.store.interactionData.localstorageFlags.find((function(t){return t===e.flagId}))||i.push({view:r,element:n,description:'Condition "check stored flag" has a selected flag that doesn\'t exist.',condition:e})));return i}}),Object.defineProperty(this,"conditionTypeDisplayStrings",{enumerable:!0,configurable:!0,writable:!0,value:{valuepresent:"Have value",valueeq:"Value equals",valuenoteq:"Value not equals",inputvalid:"Input is valid",localstorageflag:"Check stored flag",viewvalid:"View is valid"}}),Object.defineProperty(this,"getValueCheckConditionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n,r){var i=[];if("valueeq"===e.type||"valuenoteq"===e.type||"valuepresent"===e.type||"inputvalid"===e.type)if(e.targetId){var o=t.getElementByUid(e.targetId);o?"valueeq"!==e.type&&"valuenoteq"!==e.type||"radio"!==o.type&&"select"!==o.type||o.options.find((function(t){return t.id===e.targetValue}))||i.push({view:r,element:n,description:'Condition "'.concat(t.conditionTypeDisplayStrings[e.type],'" tries to check for a missing value.'),condition:e}):i.push({view:r,element:n,description:'Condition "'.concat(t.conditionTypeDisplayStrings[e.type],'" targets a missing element.'),condition:e})}else i.push({view:r,element:n,description:'Condition "'.concat(t.conditionTypeDisplayStrings[e.type],'" has no target element.'),condition:e});return i}}),Object.defineProperty(this,"getInputValidationConditionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,t,n){var r=[];return"inputvalid"!==e.type||"input"!==t.type||t.inputFieldType||r.push({view:n,element:t,description:'Condition "Input is valid" tries to validate an input of an element with no validation rule.',condition:e}),r}}),Object.defineProperty(this,"getChangeViewActionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n,r){var i=[];return!e.viewId||!!t.store.interactionData.views.find((function(t){return t.uid===e.viewId}))||i.push({view:r,element:n,description:'Action "Change view" targets a missing view.',action:e}),i}}),Object.defineProperty(this,"getGiosgProcessorActionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,t,n){var r=[];return e.leadForm||r.push({view:n,element:t,description:'Action "Giosg processor" has an empty lead form id field.',action:e}),e.url||r.push({view:n,element:t,description:'Action "Giosg processor" has an empty url field.',action:e}),e.company||r.push({view:n,element:t,description:'Action "Giosg processor" has an empty company id field.',action:e}),e.domain||r.push({view:n,element:t,description:'Action "Giosg processor" has an empty domain id field.',action:e}),e.room||r.push({view:n,element:t,description:'Action "Giosg processor" has an empty room id field.',action:e}),r}}),Object.defineProperty(this,"getShowHideElementActionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n,r){var i=[];(e.targetUid||i.push({view:r,element:n,description:'Action "Show/hide element" has no target element.',action:e}),e.targetUid)&&(t.getElementByUid(e.targetUid)||i.push({view:r,element:n,description:'Action "Show/hide element" targets a missing element.',action:e}));return i}}),Object.defineProperty(this,"getLocalstorageFlagActionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n,r){var i=[];(e.flagId||i.push({view:r,element:n,description:'Action "Update stored flag" has no flag selected',action:e}),e.flagId)&&(!!t.store.interactionData.localstorageFlags.find((function(t){return t===e.flagId}))||i.push({view:r,element:n,description:'Action "Update stored flag" targets a missing flag.',action:e}));return i}}),Object.defineProperty(this,"getDelayActionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,t,n){var r=[];return e.delayMs<0&&r.push({view:n,element:t,description:'Action "Delay" has a delay duration that is less than 0.',action:e}),r}}),Object.defineProperty(this,"getSubmitFormActionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,t,n){var r=[];return e.sendEmailTo&&(Object(E.e)(e.sendEmailTo)||r.push({view:n,element:t,description:'Action "Submit form" has an invalid destination email address.',action:e}),e.sendEmailFrom||r.push({view:n,element:t,description:'Action "Submit form" has an empty sender name field.',action:e}),e.sendEmailSubject||r.push({view:n,element:t,description:'Action "Submit form" has an empty email subject field.',action:e})),r}}),Object.defineProperty(this,"getStartTaskActionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n,i){var o=[];return e.message?o.push.apply(o,Object(r.m)([],Object(r.k)(t.getErrorsFromTemplate(e.message,n,i,"Send task")),!1)):o.push({view:i,element:n,description:'Action "Send task" has an empty message field.',action:e}),e.title&&o.push.apply(o,Object(r.m)([],Object(r.k)(t.getErrorsFromTemplate(e.title,n,i,"Send task")),!1)),o}}),Object.defineProperty(this,"getStartCallActionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,t,n){var r=[];return e.title||r.push({view:n,element:t,description:'Action "Start call" has an empty operator name field.',action:e}),r}}),Object.defineProperty(this,"getRunWorkflowActionErrors",{enumerable:!0,configurable:!0,writable:!0,value:function(e,t,n,r){var i=[];if(!r)return[];var o=r.workflows.find((function(t){return t.id===e.workflowId}));return(null==o?void 0:o.is_enabled)&&null!==o.status||i.push({view:n,element:t,description:'Action "Run Workflow" is using disabled workflow.',action:e}),i}}),this.store=e}return Object.defineProperty(e.prototype,"getElementByUid",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n,i=this,o=function(t){var n,a;try{for(var u=Object(r.n)(t),s=u.next();!s.done;s=u.next()){var c=s.value;if(c.uid===e)return c;if("group"===c.type){var l=o(i.store.getGroup(c.groupUid).elements);if(l)return l}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}};try{for(var a=Object(r.n)(this.store.interactionData.views),u=a.next();!u.done;u=a.next()){var s=u.value;if(s.uid===e)return s;var c=o(s.elements);if(c)return c}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}}),Object.defineProperty(e.prototype,"getErrorsFromTemplate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=[],o=Object(j.a)(this.store.interactionData).map((function(e){return{name:e,value:""}}));try{Object(C.c)(o,e,!1)}catch(e){e instanceof C.a?i.push({view:n,element:t,description:'Action "'.concat(r,'" has an unknown variable "').concat(e.variable,'".')}):e instanceof C.b?i.push({view:n,element:t,description:'Action "'.concat(r,'" has non-terminated variable.')}):i.push({view:n,element:t,description:'Action "'.concat(r,'" has unknown issue.')})}return i}}),Object.defineProperty(e.prototype,"getUrlActionErrors",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var i=[];return e.targetUrl||i.push({view:n,element:t,description:'Action "Url" has an empty url field.',action:e}),i.push.apply(i,Object(r.m)([],Object(r.k)(this.getErrorsFromTemplate(e.targetUrl,t,n,"Url")),!1)),i}}),e}(),D=n(271),k=n(241),_=n(61),A=n(214),S=n(209),B=n(82),P=n(41);function F(e,t,n){var i=Object(c.e)(e,"all");if(function(e,t){var n,i,o=function(e){var n=Object(c.e)(e);if(Object.keys(n).every((function(e){return n[e]===t[e]})))return{value:!0}};try{for(var a=Object(r.n)(e),u=a.next();!u.done;u=a.next()){var s=o(u.value);if("object"==typeof s)return s.value}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!1}(t,i)&&(i.leftOffset=I(i.leftOffset,20),i.rightOffset=I(i.rightOffset,-20),i.topOffset=I(i.topOffset,20),i.bottomOffset=I(i.bottomOffset,-20),T(i.rightOffset)||T(i.bottomOffset)||Object(B.c)(e,i,"all")),"view"!==i.type){var o=Object(S.a)(i,n);Object(B.c)(e,Object(P.a)(i,o,n),"all")}}function T(e){return void 0!==e&&e<0}function I(e,t){return void 0!==e?e+t:void 0}var N=n(475),R=n(342);var M=n(491),L=n(122),U=n(346),z=n(483),V=".giosg-chat-container";function W(e){return e?e.map((function(e){return{actions:e.actions.map((function(e){return Object(r.a)(Object(r.a)({},Object(o.G)(e)),{uid:Object(y.a)()})})),conditions:e.conditions.map((function(e){return Object(r.a)(Object(r.a)({},Object(o.G)(e)),{uid:Object(y.b)()})}))}})):void 0}var H=function(){function e(e){var t=this;Object.defineProperty(this,"templateAsView",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object(o.z)(this);var n,r=Object(g.a)("Template view",{xType:"middle",yType:"middle",height:e.height,width:e.width});r.designs=e.designs,r.elements=e.elements,r.uid=e.uid,r.name=e.name,this.templateAsView=r,Object(o.C)(this,"templateAsView",(function(){n=Object(o.E)((function(){return{elements:Object(o.G)(t.templateAsView.elements),designs:Object(o.G)(t.templateAsView.designs),height:t.templateAsView.arrangement.default.height,width:t.templateAsView.arrangement.default.width,name:t.templateAsView.name}}),(function(t){Object.assign(e,t)}))})),Object(o.D)(this,"templateAsView",(function(){null==n||n()}))}return Object(r.f)([o.A,Object(r.j)("design:type",Object)],e.prototype,"templateAsView",void 0),e}(),G=function(e){function t(t,n,i,a,u,s,c,d,f,p,h,v,g,y,w,O,j){var C,E=e.call(this,t,!0,h?function(e){return Object(r.e)(E,void 0,void 0,(function(){var t,n,i;return Object(r.h)(this,(function(r){switch(r.label){case 0:return[4,this.editorApi.interactionUpdate(e.interactionUuid,e,this.tag)];case 1:return(t=r.sent())?(console.info("Update due to saved ok tag=".concat(this.tag)),this.tag=t.tag,this.updatedDate=t.updatedDate,n=[this.interactionData.views.indexOf(this.currentView)],fetch("".concat(b.g,"/refresh/?interaction_id=").concat(e.interactionUuid,"&views=").concat(n),{method:"post"}),[3,4]):[3,2];case 2:return[4,this.editorApi.interaction(e.interactionUuid)];case 3:return i=r.sent(),Object(A.a)(i,this.versionStore)?(console.info("Update due to saved failed tag=".concat(this.tag)),this.tag=i.tag,[2,i]):[2,void 0];case 4:return[2]}}))}))}:void 0,(function(){return E.editorApi.interaction(E.project.interactionUuid,E.tag).then((function(e){if(e){if(!Object(A.a)(e,E.versionStore))return null;E.tag=e.tag,console.info("Update due to timer tag=".concat(E.tag))}return e}))}))||this;Object.defineProperty(E,"editorApi",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(E,"giosgApi",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(E,"proxyApi",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(E,"workflowsApi",{enumerable:!0,configurable:!0,writable:!0,value:u}),Object.defineProperty(E,"reportingApi",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(E,"pubApi",{enumerable:!0,configurable:!0,writable:!0,value:c}),Object.defineProperty(E,"me",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(E,"themes",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(E,"groupIsReadwrite",{enumerable:!0,configurable:!0,writable:!0,value:h}),Object.defineProperty(E,"routing",{enumerable:!0,configurable:!0,writable:!0,value:v}),Object.defineProperty(E,"collectionName",{enumerable:!0,configurable:!0,writable:!0,value:g}),Object.defineProperty(E,"exit",{enumerable:!0,configurable:!0,writable:!0,value:y}),Object.defineProperty(E,"changeTheme",{enumerable:!0,configurable:!0,writable:!0,value:w}),Object.defineProperty(E,"features",{enumerable:!0,configurable:!0,writable:!0,value:O}),Object.defineProperty(E,"versionStore",{enumerable:!0,configurable:!0,writable:!0,value:j}),Object.defineProperty(E,"tag",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"updatedDate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"publishedDate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"projectValidator",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"dataManagementOpen",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(E,"interactionStore",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"giosgIntegrationFetcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"resizedCanvasSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"selectableElements",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"onElementSelection",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"isTimelineVisible",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(E,"isPreviewTimelineVisible",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(E,"temporaryLayouts",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(E,"isDraggingInProgress",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(E,"isDraggingNewElement",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(E,"themeEditor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"canvasDisplayMode",{enumerable:!0,configurable:!0,writable:!0,value:"both"}),Object.defineProperty(E,"noteSizes",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(E,"zoom",{enumerable:!0,configurable:!0,writable:!0,value:1}),Object.defineProperty(E,"previewZoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(E,"preferableCanvasPosition",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(E,"activeElementsUids",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(E,"activeElementsParentUids",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(E,"activeElementState",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"activeSidebarTab",{enumerable:!0,configurable:!0,writable:!0,value:"properties"}),Object.defineProperty(E,"publishStatus",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"publishedIntoRoomName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"currentTemplateUid",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"rulesChangeDetected",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(E,"rulesToBeDeleted",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(E,"draggingElementUid",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"resizedElementUid",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"currentPreviewViewUid",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"currentViewUid",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"clipboard",{enumerable:!0,configurable:!0,writable:!0,value:Object(_.a)("editorCopyPasteKey")}),Object.defineProperty(E,"_previewEnabled",{enumerable:!0,configurable:!0,writable:!0,value:null===(C=Object(_.a)("previewEnabled"))||void 0===C||C}),Object.defineProperty(E,"publishingSettingsUpdate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"createRuleInDemoModeUrlCondition",{enumerable:!0,configurable:!0,writable:!0,value:"#"+E.project.name.replace(/ /g,"_")}),Object.defineProperty(E,"showViewDeleteConfirmationDialog",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(E,"isEditingRichText",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(E,"activeTextEditorUid",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(E,"textEditorsState",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object(o.z)(E),E.id=t.interactionUuid,E.tag=t.tag,E.updatedDate=t.updatedDate,E.publishedDate=t.publishedDate,E.themeEditor=p,E.giosgIntegrationFetcher=L.b.getGiosgIntegrationFetcher(i,u,d),E.currentViewUid=E.interactionData.views[0].uid;var D=function(){E.clipboard=Object(_.a)("editorCopyPasteKey")};D(),window.addEventListener("storage",D),E.onDestroy.push((function(){window.removeEventListener("storage",D)})),Object(A.a)(E.interaction,E.versionStore),E.projectValidator=new x(E),E.interactionData.noUnsafeEvaluation=E.features.hasNoUnsafeEvaluation,E.interactionData.views.forEach((function(e,t){if(void 0===e.canvasX||void 0===e.canvasY){var n=(o=t,{x:(a=Math.floor((-1+Math.sqrt(1+8*o))/2))-(u=o-a*(a+1)/2),y:u}),r=n.x,i=n.y;e.canvasX=50+700*r,e.canvasY=50+700*i}var o,a,u}));var k=Object(l.a)({organizationUid:t.organizationUid,editing:!0}),S=Object(r.k)([void 0,void 0],2),B=S[0],P=S[1];return E.interactionStore=new m.a(E.interactionData,k,B,P),Object(o.E)((function(){return E.interactionData}),(function(e){E.interactionStore.setData({project:e})})),Object(o.E)((function(){return E.activeBreakpoint}),(function(){var e,t,n=E.activeBreakpoint;try{for(var i=Object(r.n)(Object(r.m)([E.currentView],Object(r.k)(E.currentView.elements),!1)),a=i.next();!a.done;a=i.next()){var u=a.value;!!u.arrangement.mobile&&("mobile"===n?u.arrangement.default=Object(o.G)(u.arrangement.mobile):"desktop"===n&&(u.arrangement.default=Object(o.G)(u.arrangement.desktop)))}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}})),Object(o.j)((function(){E.interactionData.views.forEach((function(e){var t,n=(null!==(t=E.interactionData.templates)&&void 0!==t?t:[]).find((function(t){return t.uid===e.templateUid}));n&&(e.arrangement.default.width=n.width,e.arrangement.default.height=n.height)}))})),0===E.activeElementsUids.size&&E.setElementSelection([E.interactionData.views[0]],[]),E}return Object(r.g)(t,e),Object.defineProperty(t.prototype,"activeBreakpoint",{get:function(){return this.interactionStore.getActiveBreakpointForWidth(this.viewportSize.width)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"initElementSelection",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this.selectableElements=new Set(e),this.onElementSelection=t}}),Object.defineProperty(t.prototype,"finishElementSelection",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t;this.selectableElements=void 0,null===(t=this.onElementSelection)||void 0===t||t.call(this,e),this.onElementSelection=void 0}}),Object.defineProperty(t.prototype,"interaction",{get:function(){return this.project},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"interactionData",{get:function(){return this.interaction.project},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"widget",{get:function(){return this.interactionData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getGroup",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n,r,i=null===(t=this.interactionData.groups)||void 0===t?void 0:t.find((function(t){return t.uid===e})),o=null===(n=this.themeEditor.project.theme.groups)||void 0===n?void 0:n.find((function(t){return t.uid===e})),a=null!==(r=null!=i?i:o)&&void 0!==r?r:e===v.a?Object(v.b)():null;if(!a)throw new Error("Group ".concat(e," not found"));return a}}),Object.defineProperty(t.prototype,"backgroundWebsites",{get:function(){var e,t=this.giosgIntegrationFetcher.giosgIntegration,n=(t instanceof L.a?t.rooms:[]).filter((function(e){return e.domain})).map((function(e){return e.domain})),i="previouslyUsedUrls-".concat(this.me.id),o=(null!==(e=Object(_.a)(i))&&void 0!==e?e:[]).map((function(e){return e}));return Object(r.m)(Object(r.m)([],Object(r.k)(o),!1),Object(r.k)(n),!1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isChatBackgroundUsed",{get:function(){return this.interactionData.mountSelector===V},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"saveBackgroundWebsiteToLocalStorage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n="previouslyUsedUrls-".concat(this.me.id),i=(null!==(t=Object(_.a)(n))&&void 0!==t?t:[]).map((function(e){return e}));return Object(_.e)(n,Object(r.m)([],Object(r.k)(new Set(Object(r.m)([e],Object(r.k)(i),!1))),!1))}}),Object.defineProperty(t.prototype,"isPreviewMode",{get:function(){return"preview"===this.routing.route.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFlowMode",{get:function(){return"flowmode"===this.routing.route.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportDeviceType",{get:function(){var e;return null!==(e=this.interaction.editorCanvasSizeType)&&void 0!==e?e:"desktop2"},set:function(e){this.interaction.editorCanvasSizeType=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportSize",{get:function(){return Object(N.b)(this.viewportDeviceType,this.features.isChatWhiteLabelled,this.resizedCanvasSize)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasSize",{get:function(){return this.viewportSize},set:function(e){this.resizedCanvasSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getNoteSizeForView",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.noteSizes.get(e.uid);return t||(this.noteSizes.set(e.uid,{width:135,height:65}),this.noteSizes.get(e.uid))}}),Object.defineProperty(t.prototype,"currentlyEditedTemplate",{get:function(){var e,t=this,n=null===(e=this.interactionData.templates)||void 0===e?void 0:e.find((function(e){return e.uid===t.currentTemplateUid}));if(n)return new H(n).templateAsView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"broadcastPublishedEventToParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Object(r.e)(this,void 0,void 0,(function(){var e=this;return Object(r.h)(this,(function(t){return this.publishStatus||(this.publishStatus="ok",Object(z.a)({type:"interactiondesigner:save",interaction_id:this.interaction.interactionUuid,organization_id:this.interaction.organizationUid,user_id:this.interaction.updatedUserId}),setTimeout((function(){e.publishStatus=void 0}),4e3)),[2]}))}))}}),Object.defineProperty(t.prototype,"isPublishingSettingsChanged",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;if(!this.publishingSettingsUpdate)return!1;var t=(null===(e=this.interactionData.publishingSettings)||void 0===e?void 0:e[0])||{interactionType:u.a.WebsiteNormal,destinations:[]},n=this.publishingSettingsUpdate;if(n.interactionType!==t.interactionType)return!0;if(n.interactionType===u.a.WebsiteNormal){var r=this.giosgIntegrationFetcher.giosgIntegration;if("string"==typeof r)return!1;var i=Object(U.a)(r,this);return n.destinations.some((function(e){var t=i.find((function(t){return t.ruleId===e.ruleId}));return e.rooms&&!Object(k.a)(t,e)}))}return n.interactionType===u.a.OperatorSendToGroup&&t.interactionType===n.interactionType?JSON.stringify(n.groups)!==JSON.stringify(t.groups):(n.interactionType===u.a.OperatorSendToVisitor||n.interactionType===u.a.ChatWindowSidePanel)&&t.interactionType===n.interactionType&&JSON.stringify(n.rooms)!==JSON.stringify(t.rooms)}}),Object.defineProperty(t.prototype,"readyForPublish",{get:function(){var e=!this.publishedDate||this.updatedDate>this.publishedDate;return!this.rulesChangeDetected&&(this.isPublishingSettingsChanged()||e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"haveRulesChanged",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;return Object(r.e)(this,void 0,void 0,(function(){var t,n,i=this;return Object(r.h)(this,(function(o){switch(o.label){case 0:return(null===(e=this.publishingSettingsUpdate)||void 0===e?void 0:e.interactionType)!==u.a.WebsiteNormal?[2,!1]:"string"==typeof(t=this.giosgIntegrationFetcher.giosgIntegration)?[2]:(n=this.publishingSettingsUpdate.destinations.map((function(e){return Object(r.e)(i,void 0,void 0,(function(){var n,i;return Object(r.h)(this,(function(r){switch(r.label){case 0:return e.ruleId?(n=t.rules.find((function(t){return t.id===e.ruleId})),[4,this.giosgApi.rule(this.interaction.organizationUid,e.ruleId)]):[3,2];case 1:return i=r.sent(),[2,!Object(k.a)(i,n)];case 2:return[2,!1]}}))}))})),[4,Promise.all(n)]);case 1:return[2,o.sent().some((function(e){return e}))]}}))}))}}),Object.defineProperty(t.prototype,"updatePublishingSettings",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Object(r.e)(this,void 0,void 0,(function(){var t,n,i,o,a=this;return Object(r.h)(this,(function(r){switch(r.label){case 0:if("string"==typeof(t=this.giosgIntegrationFetcher.giosgIntegration))throw new Error("giosg platform not available");return this.publishStatus="busy",e.interactionType===u.a.WebsiteNormal?[3,2]:(n=Object(U.b)(t,this),o=n.map((function(e){if(e.ruleId)return t.ruleDelete(e.ruleId)})),[4,Promise.all(o)]);case 1:return r.sent(),this.interactionData.publishingSettings=[e],[3,5];case 2:return i=e.destinations.filter((function(e){return!e.toBeRemoved})).map((function(e){return t.updateInteractionDestinationRules(e,a.interaction.name,a.interaction.interactionUuid)})),o=e.destinations.filter((function(e){return e.toBeRemoved})).map((function(e){var n=e.ruleId;if(n)return t.ruleDelete(n)})),[4,Promise.all(i)];case 3:return r.sent(),[4,Promise.all(o)];case 4:r.sent(),this.interactionData.publishingSettings=void 0,r.label=5;case 5:return[2]}}))}))}}),Object.defineProperty(t.prototype,"publish",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Object(r.e)(this,void 0,void 0,(function(){var e,t,n,o,a,u,s,c=this;return Object(r.h)(this,(function(r){switch(r.label){case 0:return[4,this.haveRulesChanged()];case 1:if(e=r.sent(),this.publishStatus||e)return[2];t=!1,r.label=2;case 2:return r.trys.push([2,5,,6]),(t=!this.interactionData.workflowUid)?[4,this.createInteractionWorkflow({name:this.interaction.name,description:this.interaction.notes||i.a.t("publishingFlow.defaultWorkflowDescription")})]:[3,4];case 3:n=r.sent(),this.interactionData.workflowUid=n,r.label=4;case 4:return[3,6];case 5:return o=r.sent(),console.error(o),[3,6];case 6:return r.trys.push([6,12,13,14]),this.publishingSettingsUpdate?[4,this.updatePublishingSettings(this.publishingSettingsUpdate)]:[3,8];case 7:r.sent(),r.label=8;case 8:return this.publishingSettingsUpdate||t?[4,this.editorApi.interactionUpdate(this.interaction.interactionUuid,this.interaction,this.tag)]:[3,10];case 9:if(!(a=r.sent()))throw Error("Failed to update interaction");this.tag=a.tag,r.label=10;case 10:return[4,this.editorApi.interactionPublish(this.interaction.interactionUuid,void 0,this.tag)];case 11:if(!(u=r.sent()))throw new Error("Save failed due to updated version on backend");return this.tag=u.tag,this.publishedDate=u.publishedDate,this.publishStatus="ok",[3,14];case 12:return s=r.sent(),console.error(s),this.publishStatus="failed",[3,14];case 13:return setTimeout((function(){c.publishStatus=void 0}),4e3),[7];case 14:return[2]}}))}))}}),Object.defineProperty(t.prototype,"activeElements",{get:function(){var e=this;return Object(r.m)([],Object(r.k)(this.activeElementsUids.keys()),!1).map((function(t){return e.elementByUid(t)})).filter((function(e){return!!e}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"draggingElement",{get:function(){var e=this;if(this.draggingElementUid)return this.activeElements.find((function(t){return t.uid===e.draggingElementUid}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resizedElement",{get:function(){var e=this;if(this.resizedElementUid)return this.activeElements.find((function(t){return t.uid===e.resizedElementUid}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeElement",{get:function(){var e;return null!==(e=this.draggingElement)&&void 0!==e?e:this.resizedElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"templatedViewActive",{get:function(){return this.activeElements.filter((function(e){return"view"===e.type})).some((function(e){return!!e.templateUid}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"elementByUid",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n,i,o,a,u,s,c;try{for(var l=Object(r.n)(Object(r.m)(Object(r.m)([],Object(r.k)(this.interactionData.views),!1),[this.currentView],!1)),d=l.next();!d.done;d=l.next()){var f=d.value;if(f.uid===e)return f;try{for(var p=(i=void 0,Object(r.n)(f.elements)),h=p.next();!h.done;h=p.next()){if((w=h.value).uid===e)return w}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}try{for(var b=Object(r.n)(this.interactionData.groups||[]),v=b.next();!v.done;v=b.next()){var g=v.value;try{for(var m=(s=void 0,Object(r.n)(g.elements)),y=m.next();!y.done;y=m.next()){var w;if((w=y.value).uid===e)return w}}catch(e){s={error:e}}finally{try{y&&!y.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}}}catch(e){a={error:e}}finally{try{v&&!v.done&&(u=b.return)&&u.call(b)}finally{if(a)throw a.error}}}}),Object.defineProperty(t.prototype,"templatedViews",{get:function(){var e=this;return this.interactionData.views.map((function(t){var n,r=(null!==(n=e.interactionData.templates)&&void 0!==n?n:[]).find((function(e){return e.uid===t.templateUid}));return r?Object(D.b)(Object(o.G)(t),Object(o.G)(r)):t}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"setCurrentView",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.currentViewUid=e,this.currentTemplateUid=void 0}}),Object.defineProperty(t.prototype,"currentView",{get:function(){var e,t=this;return this.currentlyEditedTemplate?this.currentlyEditedTemplate:null!==(e=this.interactionData.views.find((function(e){return e.uid===t.currentViewUid})))&&void 0!==e?e:this.interactionData.views[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"setElementSelection",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n,i;this.activeElementsUids.clear();try{for(var o=Object(r.n)(e),a=o.next();!a.done;a=o.next()){var u=a.value;this.activeElementsUids.add(u.uid)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}this.activeElementsParentUids=e.length>0?t:[]}}),Object.defineProperty(t.prototype,"clearElementSelection",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.setElementSelection([],[])}}),Object.defineProperty(t.prototype,"selectMultipleElements",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.activeElementsUids.has(e.uid)&&JSON.stringify(t)===JSON.stringify(this.activeElementsParentUids),i="view"===e.type||this.activeElements.some((function(e){return"view"===e.type}))||JSON.stringify(this.activeElementsParentUids)!==JSON.stringify(t)?[]:this.activeElements,o=!n?Object(r.m)(Object(r.m)([],Object(r.k)(i),!1),[e],!1):i.filter((function(t){return t.uid!==e.uid}));this.setElementSelection(o,t)}}),Object.defineProperty(t.prototype,"getAllElementsVariableNames",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t,n,i,o,a,u,s,c,l=[],d=function(e){l.push(Object(h.d)(e))};try{for(var f=Object(r.n)(this.interactionData.views),p=f.next();!p.done;p=f.next()){var b=p.value;d(b);try{for(var v=(n=void 0,Object(r.n)(b.elements)),g=v.next();!g.done;g=v.next()){d(g.value)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}try{for(var m=Object(r.n)(null!==(c=this.interactionData.groups)&&void 0!==c?c:[]),y=m.next();!y.done;y=m.next()){var w=y.value;try{for(var O=(u=void 0,Object(r.n)(w.elements)),j=O.next();!j.done;j=O.next()){d(j.value)}}catch(e){u={error:e}}finally{try{j&&!j.done&&(s=O.return)&&s.call(O)}finally{if(u)throw u.error}}}}catch(e){o={error:e}}finally{try{y&&!y.done&&(a=m.return)&&a.call(m)}finally{if(o)throw o.error}}return l}}),Object.defineProperty(t.prototype,"generateElementNameByType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.generateElementNameByBasename("".concat(e[0].toUpperCase()).concat(e.slice(1)))}}),Object.defineProperty(t.prototype,"generateElementNameByBasename",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getAllElementsVariableNames();return Object(d.f)(e,(function(e){return!t.includes(Object(h.f)(e))}),1)}}),Object.defineProperty(t.prototype,"checkElementName",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return 0===this.projectValidator.getElementNameErrors(e,t).length}}),Object.defineProperty(t.prototype,"checkInteractionElement",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this.projectValidator.getElementErrors(e,t,this.giosgIntegrationFetcher.giosgIntegration instanceof L.a?this.giosgIntegrationFetcher.giosgIntegration:void 0)}}),Object.defineProperty(t.prototype,"checkInteractionViewErrors",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.projectValidator.getViewErrors(e,this.giosgIntegrationFetcher.giosgIntegration instanceof L.a?this.giosgIntegrationFetcher.giosgIntegration:void 0)}}),Object.defineProperty(t.prototype,"canClipboardCut",{get:function(){return this.activeElements.length>0&&this.activeElements.every((function(e){return"view"!==e.type}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canClipboardCopy",{get:function(){return this.canClipboardCut},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canClipboardPaste",{get:function(){return this.clipboard&&(!this.isFlowMode||this.isFlowMode&&!!this.activeElements.length)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cliboardClear",{enumerable:!1,configurable:!0,writable:!0,value:function(){Object(_.c)("editorCopyPasteKey")}}),Object.defineProperty(t.prototype,"clipboardSet",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.clipboard={version:s.b,elements:e},Object(_.e)("editorCopyPasteKey",this.clipboard)}}),Object.defineProperty(t.prototype,"clipboardCut",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=[];this.currentView.elements.forEach((function(n){e.activeElementsUids.has(n.uid)&&t.push(Object(o.G)(Object(r.a)({},n)))})),this.currentView.elements=this.currentView.elements.filter((function(t){return!e.activeElementsUids.has(t.uid)})),this.clipboardSet(t)}}),Object.defineProperty(t.prototype,"clipboardCopy",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=[];this.activeElements.forEach((function(n){"view"!==n.type&&t.push(e.createElementCopy(n))})),this.clipboardSet(t)}}),Object.defineProperty(t.prototype,"clipboardPaste",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(this.clipboard){var t=this.clipboard.elements,n=Object(c.e)(this.currentView,this.activeBreakpoint),r={width:n.width[1],height:n.height[1]};t.forEach((function(t){F(t,e.currentView.elements,r),"button"!==t.type&&"input"!==t.type&&"checkbox"!==t.type||!t.hasCustomName||(t.hasCustomName=!1);var n=e.elementByUid(e.activeElementsParentUids[e.activeElementsParentUids.length-1]);n?e.getGroup(n.groupUid).elements.push(t):e.currentView.elements.push(t)})),this.setElementSelection(t,this.activeElementsParentUids);var i=t.map((function(t){return Object(o.G)(e.createElementCopy(t))}));this.clipboardSet(i)}}}),Object.defineProperty(t.prototype,"createElementCopy",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Object(r.a)(Object(r.a)({},JSON.parse(JSON.stringify(e))),{clickEvents:W(e.clickEvents),uid:Object(y.c)(),name:this.generateElementNameByBasename(e.name)})}}),Object.defineProperty(t.prototype,"previewEnabled",{get:function(){return this._previewEnabled},set:function(e){Object(_.e)("previewEnabled",e),this._previewEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"createEmptyView",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,n=this.features.hasResponsiveDesign,i=Object(g.a)(Object(d.f)("View 1",(function(e){return!t.interactionData.views.map((function(e){return e.name})).includes(e)}),1),Object(a.d)(n),Object(a.c)(this.interactionData.isInInvisibleViewMode||!1)),u=this.themeEditor.theme.themeStyles.find((function(e){return"view"===e.elementType}));if(u&&"view"===u.elementType&&!this.interactionData.isInInvisibleViewMode&&(i.designs=Object(o.G)(u.designs)),e)i.canvasX=e.x,i.canvasY=e.y;else{var s=function(e,t){for(var n=Math.round(t.map((function(e){return e.canvasX})).reduce((function(e,t){return t=4e3&&(i.left=n,i.right=n+e.arrangement.default.width,i.top+=e.arrangement.default.height+50,i.bottom+=e.arrangement.default.height+50),i.bottom>=4e3&&(i.top=0,i.bottom=e.arrangement.default.height)),!(++o>200)););return i}(i,this.interactionData.views);i.canvasY=s.top,i.canvasX=s.left}return this.interactionData.views=Object(r.m)(Object(r.m)([],Object(r.k)(this.interactionData.views),!1),[i],!1),this.setElementSelection([],[]),this.setCurrentView(i.uid),i}}),Object.defineProperty(t.prototype,"focusViewOnCanvas",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.isFlowMode?this.zoom:.5,n=-e.canvasX-e.arrangement.default.width/2,r=-e.canvasY-e.arrangement.default.height/2;this.preferableCanvasPosition={x:n*t,y:r*t}}}),Object.defineProperty(t.prototype,"deleteGroupAndNestedGroups",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n,r=this,i=null===(t=this.interactionData.groups)||void 0===t?void 0:t.find((function(t){return t.uid===e.groupUid}));i&&(i.elements.forEach((function(e){"group"===e.type&&r.deleteGroupAndNestedGroups(e)})),q(this.interactionData,e)||(this.interactionData.groups=null===(n=this.interactionData.groups)||void 0===n?void 0:n.filter((function(t){return t.uid!==e.groupUid}))))}}),Object.defineProperty(t.prototype,"deleteActiveElements",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,n,r=this;if(void 0===e&&(e=!1),this.activeElementsUids.has(this.currentView.uid)&&this.interactionData.views.length>1)this.showViewDeleteConfirmationDialog=!0;else{null===(t=this.interactionData.templates)||void 0===t||t.forEach((function(e){e.elements=e.elements.filter((function(e){return!r.activeElementsUids.has(e.uid)}))}));var i=function(t){return t.filter((function(t){return!r.activeElementsUids.has(t.uid)||("group"!==t.type||q(r.interactionData,t)||e||r.deleteGroupAndNestedGroups(t),!1)}))};this.interactionData.views.forEach((function(e){e.elements=i(e.elements)})),null===(n=this.interactionData.groups)||void 0===n||n.forEach((function(e){e.elements=i(e.elements)})),this.setElementSelection([],[])}}}),Object.defineProperty(t.prototype,"deleteSelectedViews",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this.activeElements.filter((function(e){return"view"===e.type})).length!==this.interactionData.views.length&&(this.interactionData.views=this.interactionData.views.filter((function(t){return!e.activeElements.includes(t)}))),this.setElementSelection([],[])}}),Object.defineProperty(t.prototype,"activeTextEditorState",{get:function(){var e=this.activeTextEditorUid;if(e)return this.textEditorsState[e]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeTextEditor",{get:function(){return Object(r.k)(Object(d.g)(p.a),1)[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undo",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t,n;this.isEditingRichText&&(null===(t=this.activeTextEditorState)||void 0===t?void 0:t.canUndo)?null===(n=this.activeTextEditor)||void 0===n||n.undo():e.prototype.undo.call(this)}}),Object.defineProperty(t.prototype,"redo",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t,n;this.isEditingRichText&&(null===(t=this.activeTextEditorState)||void 0===t?void 0:t.canRedo)?null===(n=this.activeTextEditor)||void 0===n||n.redo():e.prototype.redo.call(this)}}),Object.defineProperty(t.prototype,"createInteractionWorkflow",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Object(r.e)(this,void 0,void 0,(function(){return Object(r.h)(this,(function(t){switch(t.label){case 0:return[4,this.reportingApi.workflowCreate(this.interaction.organizationUid,{name:e.name,description:e.description,external_id:this.interaction.interactionUuid,tags:["workflow_report","interaction"]})];case 1:return[2,t.sent().id]}}))}))}}),Object.defineProperty(t.prototype,"updateInteractionWorkflow",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Object(r.e)(this,void 0,void 0,(function(){return Object(r.h)(this,(function(t){switch(t.label){case 0:return[4,this.reportingApi.workflowUpdate(this.interaction.organizationUid,e,{name:this.interaction.name,description:this.interaction.notes||i.a.t("publishingFlow.defaultWorkflowDescription"),external_id:this.interaction.interactionUuid,tags:["workflow_report","interaction"]})];case 1:return[2,t.sent().id]}}))}))}}),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"updatedDate",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"publishedDate",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"dataManagementOpen",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"resizedCanvasSize",void 0),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"activeBreakpoint",null),Object(r.f)([o.A,Object(r.j)("design:type",Set)],t.prototype,"selectableElements",void 0),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[Array,Function]),Object(r.j)("design:returntype",void 0)],t.prototype,"initElementSelection",null),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[String]),Object(r.j)("design:returntype",void 0)],t.prototype,"finishElementSelection",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"interaction",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"interactionData",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"widget",null),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"isTimelineVisible",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"isPreviewTimelineVisible",void 0),Object(r.f)([o.k,Object(r.j)("design:type",String),Object(r.j)("design:paramtypes",[String])],t.prototype,"viewportDeviceType",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"viewportSize",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[Object])],t.prototype,"canvasSize",null),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"temporaryLayouts",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"isDraggingInProgress",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"isDraggingNewElement",void 0),Object(r.f)([o.A,Object(r.j)("design:type",M.a)],t.prototype,"themeEditor",void 0),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"canvasDisplayMode",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"noteSizes",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"zoom",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"previewZoom",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"preferableCanvasPosition",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"activeElementsUids",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Array)],t.prototype,"activeElementsParentUids",void 0),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"activeElementState",void 0),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"activeSidebarTab",void 0),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"publishStatus",void 0),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"publishedIntoRoomName",void 0),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"currentTemplateUid",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"rulesChangeDetected",void 0),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"currentlyEditedTemplate",null),Object(r.f)([o.A,Object(r.j)("design:type",Array)],t.prototype,"rulesToBeDeleted",void 0),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"readyForPublish",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"activeElements",null),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"draggingElementUid",void 0),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"draggingElement",null),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"resizedElementUid",void 0),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"resizedElement",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"activeElement",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"templatedViewActive",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"templatedViews",null),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"currentPreviewViewUid",void 0),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"currentViewUid",void 0),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"currentView",null),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[Array,Array]),Object(r.j)("design:returntype",void 0)],t.prototype,"setElementSelection",null),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[]),Object(r.j)("design:returntype",void 0)],t.prototype,"clearElementSelection",null),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[Object,Array]),Object(r.j)("design:returntype",void 0)],t.prototype,"selectMultipleElements",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"canClipboardCut",null),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"canClipboardCopy",null),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"clipboard",void 0),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"canClipboardPaste",null),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[]),Object(r.j)("design:returntype",void 0)],t.prototype,"clipboardCut",null),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[]),Object(r.j)("design:returntype",void 0)],t.prototype,"clipboardCopy",null),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[]),Object(r.j)("design:returntype",void 0)],t.prototype,"clipboardPaste",null),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"_previewEnabled",void 0),Object(r.f)([o.k,Object(r.j)("design:type",Boolean),Object(r.j)("design:paramtypes",[Object])],t.prototype,"previewEnabled",null),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"publishingSettingsUpdate",void 0),Object(r.f)([o.A,Object(r.j)("design:type",String)],t.prototype,"createRuleInDemoModeUrlCondition",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"showViewDeleteConfirmationDialog",void 0),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[Object]),Object(r.j)("design:returntype",void 0)],t.prototype,"deleteGroupAndNestedGroups",null),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[Object]),Object(r.j)("design:returntype",void 0)],t.prototype,"deleteActiveElements",null),Object(r.f)([o.i,Object(r.j)("design:type",Function),Object(r.j)("design:paramtypes",[]),Object(r.j)("design:returntype",void 0)],t.prototype,"deleteSelectedViews",null),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"isEditingRichText",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"activeTextEditorUid",void 0),Object(r.f)([o.A,Object(r.j)("design:type",Object)],t.prototype,"textEditorsState",void 0),Object(r.f)([o.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"activeTextEditorState",null),t}(R.a),q=function(e,t){var n=e.views,i=e.groups;return Object(r.m)(Object(r.m)([],Object(r.k)(n),!1),Object(r.k)(null!=i?i:[]),!1).some((function(e){return e.elements.some((function(e){return"group"===e.type&&e.groupUid===t.groupUid&&e.uid!==t.uid}))}))}},266:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(345),i=n.n(r);function o(e){var t=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d*\.?\d+|undefined)\)$/.exec(e);if(!t)throw new Error("Unknown color string '".concat(e,"'"));return{r:parseInt(t[1]),g:parseInt(t[2]),b:parseInt(t[3]),a:"undefined"!==t[4]?parseFloat(t[4]):1}}function a(e){var t=i()(e.r,e.g,e.b,e.a,"rgb"),n=-20,r=e.r+n,o=e.g+n,a=e.b+n;r<=0&&o<=0&&a<=0&&(n=50);var u=function(e,t){var n=i()(e),r=n.alpha();return n=(n=(n=(n=n.set("rgb.r",n.get("rgb.r")+t)).set("rgb.g",n.get("rgb.g")+t)).set("rgb.b",n.get("rgb.b")+t)).alpha(r)}(t.hex("rgba"),n).rgba();return{r:u[0],g:u[1],b:u[2],a:u[3]}}},267:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return d}));var r=n(1),i=n(169),o=n(153),a="#B1D6FD",u=function(e,t){return e?t:"inherit"},s=function(e,t){var n,r,i,o=e.bold,s=e.italic,c=e.underline,l=e.fontSize,d=e.fontFamily,f=e.isSelected,p=e.color,h=e.url,b={background:u(!!t&&!!f,a),cursor:(r=!t&&!!h,i="pointer",r?i:"initial"),fontWeight:u(!!o,"bold"),fontStyle:u(!!s,"italic"),textDecoration:u(!!c,"underline"),fontSize:u(!!l,l),fontFamily:u(!!d,d),color:u(!!p,p),minHeight:"".concat(1.2,"em"),height:"max-content",lineHeight:1.2};return(n={"&:not(li), ::marker":b})["a &, span &, ul &, ol &, p &, div &"]=b,n[":before"]={display:"inline-block",content:"'​'"},n},c=function(e){var t=e.react,n=e.css,o=e.editMode,a=void 0!==o&&o;return function(e){var o=e.children,u=e.attributes,c=void 0===u?{}:u,l=e.leaf,d=e.projectView,f=n(s(l,a));return t.createElement(l.url?"a":"span",Object(r.a)(Object(r.a)({className:f},l.url&&!d?{href:Object(i.a)(l.url),target:l.openInNewTab?"_blank":void 0}:{}),c),null!=o?o:l.text)}},l={fontSize:"initial",fontFamily:"initial",fontWeight:"initial",wordBreak:"initial"},d=function(e){var t=e.react,n=e.css,i=e.editMode,a=e.getVariableValue;return function(e){var u,c=e.element,d=e.attributes,f=e.children;if("VARIABLE"===c.type){var p=n(s(c.children[0],i));return t.createElement("span",{children:[function(){try{return a(c.variable)}catch(e){return console.error(e),"error"}}()],className:p})}var h=n(function(e,t){void 0===t&&(t="justify");var n=["LIST_BULLETED","LIST_NUMBERED"].includes(e)?{"> li":{listStyleType:"LIST_BULLETED"===e?"disc":"decimal",background:"initial"}}:{};return Object(r.a)(Object(r.a)(Object(r.a)({},l),{'* :not([data-slate-string]="true")':l,paddingInline:"revert",marginBlock:0,textAlign:t,fontSize:0,lineHeight:1.2}),n)}(c.type,c.textAlignment));if("LIST_ITEM"===c.type){var b=c.children[0],v=i?n(s("children"in b?{}:b,i)):null===(u=f[0])||void 0===u?void 0:u.props.className;h="".concat(v," ").concat(h)}var g=Object(o.c)(c.type);return t.createElement(g,Object(r.a)(Object(r.a)({},d),{children:f,className:h}))}}},268:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return u}));var r=n(1),i={streamSourceType:"giosg",opacity:1,backgroundColorApplied:!0,backgroundColor:{a:1,b:62,g:62,r:62},borderRadius:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},backgroundImageSize:"cover",backgroundImageApplied:!0,backgroundImage:"https://cdn.giosgusercontent.com/assets/1/D6e5aLreHYp7KwYW6vxy0Izi3n7pvg.png",backgroundImageGiosgAssetUrl:"/assets/1/D6e5aLreHYp7KwYW6vxy0Izi3n7pvg.png",shadowApplied:!1,shadowBlur:6,shadowPosX:0,shadowPosY:4,shadowSpread:0,shadowColor:{a:.5,b:0,g:0,r:0},borderApplied:!1,borderWidth:1,borderColor:{a:1,b:0,g:0,r:0},borderStyle:"solid"},o=Object(r.a)(Object(r.a)({},i),{streamSourceType:"video-recorded"}),a={opacity:1,fontBold:!0,fontSize:14,textColor:{a:1,b:255,g:255,r:255},fontFamily:"Arial Black, Arial Bold, Gadget, sans-serif",fontItalic:!1,textAlignment:"center",verticalTextAlignment:"center",fontUnderlined:!1,backgroundColorApplied:!0,backgroundColor:{a:1,b:155,g:208,r:55},borderRadius:{topLeft:50,topRight:50,bottomLeft:50,bottomRight:50},backgroundImageSize:"100% 100%",backgroundImageApplied:!0,backgroundImage:void 0,shadowApplied:!1,shadowBlur:6,shadowPosX:0,shadowPosY:4,shadowSpread:0,shadowColor:{a:.5,b:0,g:0,r:0},borderApplied:!0,borderWidth:3,borderColor:{a:1,b:148,g:202,r:46},borderStyle:"solid",backgroundImageGiosgAssetUrl:void 0,padding:5},u={opacity:1,backgroundColorApplied:!0,backgroundColor:{a:1,b:62,g:62,r:62},borderRadius:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},backgroundImageSize:"100% 100%",backgroundImageApplied:!0,backgroundImage:void 0,shadowApplied:!1,shadowBlur:6,shadowPosX:0,shadowPosY:4,shadowSpread:0,shadowColor:{a:.5,b:0,g:0,r:0},borderApplied:!1,borderWidth:1,borderColor:{a:1,b:0,g:0,r:0},borderStyle:"solid",backgroundImageGiosgAssetUrl:void 0}},27:function(e,t,n){"use strict";function r(){return String.fromCharCode(97+Math.floor(26*Math.random()))+Math.random().toString(36).slice(2)}function i(e){return(e||"uid")+"-"+r()+r()+r()}n.d(t,"h",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"g",(function(){return l})),n.d(t,"i",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"f",(function(){return p}));var o=function(){return i("element")},a=function(){return i("themestyle")},u=function(){return("font"||"uid")+"-"+r()+r()},s=function(){return i("a")},c=function(){return i("c")},l=function(){return i("o")},d=function(){return i("u")},f=function(){return i("event")},p=function(){return i("group")}},271:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(1),i=function(e,t){var n,r=(null!==(n=t.templates)&&void 0!==n?n:[]).find((function(t){return t.uid===e.templateUid}));return r?o(e,r):e},o=function(e,t){return Object(r.a)(Object(r.a)({},e),{templateUid:void 0,designs:t.designs,elements:Object(r.m)(Object(r.m)([],Object(r.k)(t.elements),!1),Object(r.k)(e.elements),!1),arrangement:Object(r.a)(Object(r.a)({},e.arrangement),{default:Object(r.a)(Object(r.a)({},e.arrangement.default),{width:t.width,height:t.height})})})}},272:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r=function(e){var t,n,r;return null!==(r=null!==(n=null===(t=e.goals)||void 0===t?void 0:t.map((function(e){return e.uid})))&&void 0!==n?n:e.goalUids)&&void 0!==r?r:e.goalEnabled&&void 0!==e.goalUid?[e.goalUid]:[]},i=function(e){var t,n,r;return null!==(r=null!==(n=null===(t=e.goals)||void 0===t?void 0:t.map((function(e){return e.uid})))&&void 0!==n?n:e.goalUids)&&void 0!==r?r:[]}},273:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(1),i=n(60),o=n(121),a=n(274),u=n(336),s=n(63),c=n(106);var l=function(){function e(e,t){var n=this;Object.defineProperty(this,"onStateUpdate",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"cooldownKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dataKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"handleStorageEvent",{enumerable:!0,configurable:!0,writable:!0,value:function(e){e.key!==n.cooldownKey&&e.key!==n.dataKey||n.onStateUpdate(n.getStateFromStorage())}});var r={dataPrefix:"GIOSG_INTERACTION_DATA_",cooldownPrefix:"GIOSG_INTERACTION_COOLDOWN_"},i=r.dataPrefix,o=r.cooldownPrefix,a="".concat(e.interactionUuid,"_").concat(e.publishedAt,"_").concat(1);this.cooldownKey=o+a,this.dataKey=i+a,this.onStateUpdate(this.getStateFromStorage()),window.addEventListener("storage",this.handleStorageEvent)}return Object.defineProperty(e.prototype,"destroy",{enumerable:!1,configurable:!0,writable:!0,value:function(){window.removeEventListener("storage",this.handleStorageEvent)}}),Object.defineProperty(e.prototype,"setState",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.shown,n=Object(r.l)(e,["shown"]);if(!t){var i=Date.now()+18e5;Object(c.a)("local").setItem(this.cooldownKey,i.toString())}Object(c.a)("session").setItem(this.dataKey,JSON.stringify(n))}}),Object.defineProperty(e.prototype,"getStateFromStorage",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e={},t=Object(c.a)("local").getItem(this.cooldownKey);if(t){var n=(parseInt(t,10)||0)=0;u--)(i=e[u])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};!function(){function e(e,t){var n=this;Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"subscription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object(r.z)(this),Object(r.F)((function(){n.current=t,n.subscription=e.subscribe(n)}))}Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.subscription&&this.subscription.unsubscribe()}}),Object.defineProperty(e.prototype,"next",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.current=e}}),Object.defineProperty(e.prototype,"complete",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.dispose()}}),Object.defineProperty(e.prototype,"error",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.current=e,this.dispose()}}),c([r.A.ref],e.prototype,"current",void 0),c([r.i.bound],e.prototype,"next",null),c([r.i.bound],e.prototype,"complete",null),c([r.i.bound],e.prototype,"error",null)}();var l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;u--)(i=e[u])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},f=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];!function(){function e(e){var t=this;Object.defineProperty(this,"model",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"localValues",{enumerable:!0,configurable:!0,writable:!0,value:r.A.map({})}),Object.defineProperty(this,"localComputedValues",{enumerable:!0,configurable:!0,writable:!0,value:r.A.map({})}),Object.defineProperty(this,"isPropertyDirty",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return t.localValues.has(e)}}),Object(r.z)(this),i(Object(r.w)(e),"createViewModel expects an observable object"),a(e).forEach((function(n){var o;if(n!==r.a&&"__mobxDidRunLazyInitializers"!==n){if(i(-1===f.indexOf(n),"The propertyname "+n+" is reserved and cannot be used with viewModels"),Object(r.t)(e,n)){var a=Object(r.g)(e,n),u=a.derivation.bind(t),s=null===(o=a.setter_)||void 0===o?void 0:o.bind(t);t.localComputedValues.set(n,Object(r.k)(u,{set:s}))}var c=Object.getOwnPropertyDescriptor(e,n),d=c?{enumerable:c.enumerable}:{};Object.defineProperty(t,n,l(l({},d),{configurable:!0,get:function(){return Object(r.t)(e,n)?t.localComputedValues.get(n).get():t.isPropertyDirty(n)?t.localValues.get(n):t.model[n]},set:Object(r.i)((function(i){Object(r.t)(e,n)?t.localComputedValues.get(n).set(i):i!==t.model[n]?t.localValues.set(n,i):t.localValues.delete(n)}))}))}}))}Object.defineProperty(e.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changedValues",{get:function(){return new Map(this.localValues)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"submit",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;Object(r.x)(this.localValues).forEach((function(t){var n=e.localValues.get(t),i=e.model[t];Object(r.u)(i)?i.replace(n):Object(r.v)(i)?(i.clear(),i.merge(n)):Object(r.s)(n)||(e.model[t]=n)})),this.localValues.clear()}}),Object.defineProperty(e.prototype,"reset",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.localValues.clear()}}),Object.defineProperty(e.prototype,"resetProperty",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.localValues.delete(e)}}),d([r.k],e.prototype,"isDirty",null),d([r.k],e.prototype,"changedValues",null),d([r.i.bound],e.prototype,"submit",null),d([r.i.bound],e.prototype,"reset",null),d([r.i.bound],e.prototype,"resetProperty",null)}();function p(e){if(!e)return"ROOT";for(var t=[];e.parent;)t.push(e.path),e=e.parent;return t.reverse().join("/")}function h(e){return Object(r.w)(e)||Object(r.u)(e)||Object(r.v)(e)}function b(e,t){var n=new WeakMap;function i(r){var i=n.get(r.object);!function(e,t){switch(e.type){case"add":o(e.newValue,t,e.name);break;case"update":a(e.oldValue),o(e.newValue,t,e.name||""+e.index);break;case"remove":case"delete":a(e.oldValue);break;case"splice":e.removed.map(a),e.added.forEach((function(n,r){return o(n,t,""+(e.index+r))}));for(var r=e.index+e.addedCount;r=e-1&&this.closest.has(this.args[e-1])}}),Object.defineProperty(e.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])}}),Object.defineProperty(e.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.assertNotDisposed();for(var t=this.args.length,n=this.closest,r=this.closestIdx;r0;r--)0===n[r].size&&n[r-1].delete(this.args[r-1]);this.isDisposed=!0}}),Object.defineProperty(e.prototype,"assertNotDisposed",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.isDisposed)throw new Error("Concurrent modification exception")}}),e}());!function(){function e(){Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"argsLength",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"last",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}Object.defineProperty(e.prototype,"entry",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(-1===this.argsLength)this.argsLength=e.length;else if(this.argsLength!==e.length)throw new Error("DeepMap should be used with functions with a consistent length, expected: "+this.argsLength+", got: "+e.length);return this.last&&(this.last.isDisposed=!0),this.last=new m(this.store,e)}})}()},342:function(e,t,n){"use strict";var r=n(1),i=n(490),o=n(395),a=n(8),u=n(341);function s(e,t){var n,r=Object(a.E)(e,(function(){null==n||n(),n=Object(u.a)(e(),t)}),{fireImmediately:!0});return function(){null==n||n(),r()}}var c=function(){function e(e,t,n,r){var i=this;Object.defineProperty(this,"autosave",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"saver",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"updateProber",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"project",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"projectChangeHistory",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"undoPosition",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"stopReactionForUndoCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"deepEqualWorker",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lastSaveStatus",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lastProbeError",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"notificationMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentlySaving",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isChanged",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"stopReactionForSaveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onDestroy",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object(a.z)(this),this.project=e,Object(a.j)((function(){return console.info("Saving busy=".concat(i.savingBusy))})),Object(a.j)((function(){return console.info(i.lastSaveStatus?"Last save status=".concat(i.lastSaveStatus.status," date=").concat(i.lastSaveStatus.date):"No last save")})),this.initReactionForAutosave(),r&&this.initUpdateProbeTimer(r),this.lastSaveStatus=this.autosave?{status:"saved",date:new Date(this.project.updatedDate)}:void 0}return Object.defineProperty(e.prototype,"initReactionForUndo",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if(this.deepEqualWorker||(this.deepEqualWorker=i.b(new Worker("/deepEqualWorker.js"))),this.stopReactionForUndoCallback)throw new Error("Reaction already exists!");var n=function(){return Object(r.e)(t,void 0,void 0,(function(){var e,t;return Object(r.h)(this,(function(n){switch(n.label){case 0:return e=this.projectChangeHistory.length>0?this.projectChangeHistory[this.undoPosition]:null,t=JSON.parse(JSON.stringify(this.project)),[4,this.deepEqualWorker(t,JSON.parse(JSON.stringify(e)))];case 1:if(!n.sent()){for(;this.projectChangeHistory.length-1>this.undoPosition;)this.projectChangeHistory.pop();for(this.projectChangeHistory.push(t);this.projectChangeHistory.length>100;)this.projectChangeHistory.shift();this.undoPosition=this.projectChangeHistory.length-1}return[2]}}))}))};e&&n().catch((function(e){console.error("Error ocurred while saving state for undo/redo",e)})),this.stopReactionForUndoCallback=s((function(){return t.project}),Object(o.a)(n,1e3,{leading:!1}))}}),Object.defineProperty(e.prototype,"stopReactionForUndo",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.stopReactionForUndoCallback)throw new Error("Where is reaction for undo?");this.stopReactionForUndoCallback(),this.stopReactionForUndoCallback=void 0}}),Object.defineProperty(e.prototype,"savingBusy",{get:function(){return!!this.currentlySaving},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canUndo",{get:function(){return this.undoPosition>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canRedo",{get:function(){return this.undoPositionn?n:e},t={},n=0,r=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n255)&&(t._clipped=!0),t[n]=e(t[n],0,255)):3===n&&(t[n]=e(t[n],0,1));return t},limit:e,type:o,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==o(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==o(e[t])?e[t].toLowerCase():null},PI:a,TWOPI:2*a,PITHIRD:a/3,DEG2RAD:a/180,RAD2DEG:180/a},s={format:{},autodetect:[]},c=u.last,l=u.clip_rgb,d=u.type,f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===d(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var r=c(e),i=!1;if(!r){i=!0,s.sorted||(s.autodetect=s.autodetect.sort((function(e,t){return t.p-e.p})),s.sorted=!0);for(var o=0,a=s.autodetect;o4?e[4]:1;return 1===o?[0,0,0,a]:[n>=1?0:255*(1-n)*(1-o),r>=1?0:255*(1-r)*(1-o),i>=1?0:255*(1-i)*(1-o),a]},O=u.unpack,j=u.type;p.prototype.cmyk=function(){return m(this._rgb)},b.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["cmyk"])))},s.format.cmyk=w,s.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=O(e,"cmyk"),"array"===j(e)&&4===e.length)return"cmyk"}});var C=u.unpack,E=u.last,x=function(e){return Math.round(100*e)/100},D=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=C(e,"hsla"),r=E(e)||"lsa";return n[0]=x(n[0]||0),n[1]=x(100*n[1])+"%",n[2]=x(100*n[2])+"%","hsla"===r||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,r="hsla"):n.length=3,r+"("+n.join(",")+")"},k=u.unpack,_=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=k(e,"rgba"))[0],r=e[1],i=e[2];n/=255,r/=255,i/=255;var o,a,u=Math.min(n,r,i),s=Math.max(n,r,i),c=(s+u)/2;return s===u?(o=0,a=Number.NaN):o=c<.5?(s-u)/(s+u):(s-u)/(2-s-u),n==s?a=(r-i)/(s-u):r==s?a=2+(i-n)/(s-u):i==s&&(a=4+(n-r)/(s-u)),(a*=60)<0&&(a+=360),e.length>3&&void 0!==e[3]?[a,o,c,e[3]]:[a,o,c]},A=u.unpack,S=u.last,B=Math.round,P=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=A(e,"rgba"),r=S(e)||"rgb";return"hsl"==r.substr(0,3)?D(_(n),r):(n[0]=B(n[0]),n[1]=B(n[1]),n[2]=B(n[2]),("rgba"===r||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,r="rgba"),r+"("+n.slice(0,"rgb"===r?3:4).join(",")+")")},F=u.unpack,T=Math.round,I=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var r,i,o,a=(t=F(t,"hsl"))[0],u=t[1],s=t[2];if(0===u)r=i=o=255*s;else{var c=[0,0,0],l=[0,0,0],d=s<.5?s*(1+u):s+u-s*u,f=2*s-d,p=a/360;c[0]=p+1/3,c[1]=p,c[2]=p-1/3;for(var h=0;h<3;h++)c[h]<0&&(c[h]+=1),c[h]>1&&(c[h]-=1),6*c[h]<1?l[h]=f+6*(d-f)*c[h]:2*c[h]<1?l[h]=d:3*c[h]<2?l[h]=f+(d-f)*(2/3-c[h])*6:l[h]=f;r=(e=[T(255*l[0]),T(255*l[1]),T(255*l[2])])[0],i=e[1],o=e[2]}return t.length>3?[r,i,o,t[3]]:[r,i,o,1]},N=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,R=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,M=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,L=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,U=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,z=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,V=Math.round,W=function(e){var t;if(e=e.toLowerCase().trim(),s.format.named)try{return s.format.named(e)}catch(e){}if(t=e.match(N)){for(var n=t.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(t=e.match(R)){for(var i=t.slice(1,5),o=0;o<4;o++)i[o]=+i[o];return i}if(t=e.match(M)){for(var a=t.slice(1,4),u=0;u<3;u++)a[u]=V(2.55*a[u]);return a[3]=1,a}if(t=e.match(L)){for(var c=t.slice(1,5),l=0;l<3;l++)c[l]=V(2.55*c[l]);return c[3]=+c[3],c}if(t=e.match(U)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var f=I(d);return f[3]=1,f}if(t=e.match(z)){var p=t.slice(1,4);p[1]*=.01,p[2]*=.01;var h=I(p);return h[3]=+t[4],h}};W.test=function(e){return N.test(e)||R.test(e)||M.test(e)||L.test(e)||U.test(e)||z.test(e)};var H=W,G=u.type;p.prototype.css=function(e){return P(this._rgb,e)},b.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["css"])))},s.format.css=H,s.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===G(e)&&H.test(e))return"css"}});var q=u.unpack;s.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=q(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},b.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["gl"])))},p.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var $=u.unpack,K=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=$(e,"rgb"),i=r[0],o=r[1],a=r[2],u=Math.min(i,o,a),s=Math.max(i,o,a),c=s-u,l=100*c/255,d=u/(255-c)*100;return 0===c?n=Number.NaN:(i===s&&(n=(o-a)/c),o===s&&(n=2+(a-i)/c),a===s&&(n=4+(i-o)/c),(n*=60)<0&&(n+=360)),[n,l,d]},Y=u.unpack,X=Math.floor,J=function(){for(var e,t,n,r,i,o,a=[],u=arguments.length;u--;)a[u]=arguments[u];var s,c,l,d=(a=Y(a,"hcg"))[0],f=a[1],p=a[2];p*=255;var h=255*f;if(0===f)s=c=l=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var b=X(d/=60),v=d-b,g=p*(1-f),m=g+h*(1-v),y=g+h*v,w=g+h;switch(b){case 0:s=(e=[w,y,g])[0],c=e[1],l=e[2];break;case 1:s=(t=[m,w,g])[0],c=t[1],l=t[2];break;case 2:s=(n=[g,w,y])[0],c=n[1],l=n[2];break;case 3:s=(r=[g,m,w])[0],c=r[1],l=r[2];break;case 4:s=(i=[y,g,w])[0],c=i[1],l=i[2];break;case 5:s=(o=[w,g,m])[0],c=o[1],l=o[2]}}return[s,c,l,a.length>3?a[3]:1]},Q=u.unpack,Z=u.type;p.prototype.hcg=function(){return K(this._rgb)},b.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hcg"])))},s.format.hcg=J,s.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Q(e,"hcg"),"array"===Z(e)&&3===e.length)return"hcg"}});var ee=u.unpack,te=u.last,ne=Math.round,re=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ee(e,"rgba"),r=n[0],i=n[1],o=n[2],a=n[3],u=te(e)||"auto";void 0===a&&(a=1),"auto"===u&&(u=a<1?"rgba":"rgb");var s=(r=ne(r))<<16|(i=ne(i))<<8|(o=ne(o)),c="000000"+s.toString(16);c=c.substr(c.length-6);var l="0"+ne(255*a).toString(16);switch(l=l.substr(l.length-2),u.toLowerCase()){case"rgba":return"#"+c+l;case"argb":return"#"+l+c;default:return"#"+c}},ie=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,oe=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,ae=function(e){if(e.match(ie)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(oe)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},ue=u.type;p.prototype.hex=function(e){return re(this._rgb,e)},b.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hex"])))},s.format.hex=ae,s.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===ue(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var se=u.unpack,ce=u.TWOPI,le=Math.min,de=Math.sqrt,fe=Math.acos,pe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=se(e,"rgb"),i=r[0],o=r[1],a=r[2],u=le(i/=255,o/=255,a/=255),s=(i+o+a)/3,c=s>0?1-u/s:0;return 0===c?n=NaN:(n=(i-o+(i-a))/2,n/=de((i-o)*(i-o)+(i-a)*(o-a)),n=fe(n),a>o&&(n=ce-n),n/=ce),[360*n,c,s]},he=u.unpack,be=u.limit,ve=u.TWOPI,ge=u.PITHIRD,me=Math.cos,ye=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=he(e,"hsi"))[0],a=e[1],u=e[2];return isNaN(o)&&(o=0),isNaN(a)&&(a=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?r=1-((i=(1-a)/3)+(n=(1+a*me(ve*o)/me(ge-ve*o))/3)):o<2/3?i=1-((n=(1-a)/3)+(r=(1+a*me(ve*(o-=1/3))/me(ge-ve*o))/3)):n=1-((r=(1-a)/3)+(i=(1+a*me(ve*(o-=2/3))/me(ge-ve*o))/3)),[255*(n=be(u*n*3)),255*(r=be(u*r*3)),255*(i=be(u*i*3)),e.length>3?e[3]:1]},we=u.unpack,Oe=u.type;p.prototype.hsi=function(){return pe(this._rgb)},b.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsi"])))},s.format.hsi=ye,s.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=we(e,"hsi"),"array"===Oe(e)&&3===e.length)return"hsi"}});var je=u.unpack,Ce=u.type;p.prototype.hsl=function(){return _(this._rgb)},b.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsl"])))},s.format.hsl=I,s.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=je(e,"hsl"),"array"===Ce(e)&&3===e.length)return"hsl"}});var Ee=u.unpack,xe=Math.min,De=Math.max,ke=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=Ee(e,"rgb"))[0],a=e[1],u=e[2],s=xe(o,a,u),c=De(o,a,u),l=c-s;return i=c/255,0===c?(n=Number.NaN,r=0):(r=l/c,o===c&&(n=(a-u)/l),a===c&&(n=2+(u-o)/l),u===c&&(n=4+(o-a)/l),(n*=60)<0&&(n+=360)),[n,r,i]},_e=u.unpack,Ae=Math.floor,Se=function(){for(var e,t,n,r,i,o,a=[],u=arguments.length;u--;)a[u]=arguments[u];var s,c,l,d=(a=_e(a,"hsv"))[0],f=a[1],p=a[2];if(p*=255,0===f)s=c=l=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var h=Ae(d/=60),b=d-h,v=p*(1-f),g=p*(1-f*b),m=p*(1-f*(1-b));switch(h){case 0:s=(e=[p,m,v])[0],c=e[1],l=e[2];break;case 1:s=(t=[g,p,v])[0],c=t[1],l=t[2];break;case 2:s=(n=[v,p,m])[0],c=n[1],l=n[2];break;case 3:s=(r=[v,g,p])[0],c=r[1],l=r[2];break;case 4:s=(i=[m,v,p])[0],c=i[1],l=i[2];break;case 5:s=(o=[p,v,g])[0],c=o[1],l=o[2]}}return[s,c,l,a.length>3?a[3]:1]},Be=u.unpack,Pe=u.type;p.prototype.hsv=function(){return ke(this._rgb)},b.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsv"])))},s.format.hsv=Se,s.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Be(e,"hsv"),"array"===Pe(e)&&3===e.length)return"hsv"}});var Fe=18,Te=.95047,Ie=1,Ne=1.08883,Re=.137931034,Me=.206896552,Le=.12841855,Ue=.008856452,ze=u.unpack,Ve=Math.pow,We=function(e){return(e/=255)<=.04045?e/12.92:Ve((e+.055)/1.055,2.4)},He=function(e){return e>Ue?Ve(e,1/3):e/Le+Re},Ge=function(e,t,n){return e=We(e),t=We(t),n=We(n),[He((.4124564*e+.3575761*t+.1804375*n)/Te),He((.2126729*e+.7151522*t+.072175*n)/Ie),He((.0193339*e+.119192*t+.9503041*n)/Ne)]},qe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ze(e,"rgb"),r=n[0],i=n[1],o=n[2],a=Ge(r,i,o),u=a[0],s=a[1],c=a[2],l=116*s-16;return[l<0?0:l,500*(u-s),200*(s-c)]},$e=u.unpack,Ke=Math.pow,Ye=function(e){return 255*(e<=.00304?12.92*e:1.055*Ke(e,1/2.4)-.055)},Xe=function(e){return e>Me?e*e*e:Le*(e-Re)},Je=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=$e(e,"lab"))[0],a=e[1],u=e[2];return r=(o+16)/116,n=isNaN(a)?r:r+a/500,i=isNaN(u)?r:r-u/200,r=Ie*Xe(r),n=Te*Xe(n),i=Ne*Xe(i),[Ye(3.2404542*n-1.5371385*r-.4985314*i),Ye(-.969266*n+1.8760108*r+.041556*i),Ye(.0556434*n-.2040259*r+1.0572252*i),e.length>3?e[3]:1]},Qe=u.unpack,Ze=u.type;p.prototype.lab=function(){return qe(this._rgb)},b.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["lab"])))},s.format.lab=Je,s.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Qe(e,"lab"),"array"===Ze(e)&&3===e.length)return"lab"}});var et=u.unpack,tt=u.RAD2DEG,nt=Math.sqrt,rt=Math.atan2,it=Math.round,ot=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=et(e,"lab"),r=n[0],i=n[1],o=n[2],a=nt(i*i+o*o),u=(rt(o,i)*tt+360)%360;return 0===it(1e4*a)&&(u=Number.NaN),[r,a,u]},at=u.unpack,ut=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=at(e,"rgb"),r=n[0],i=n[1],o=n[2],a=qe(r,i,o),u=a[0],s=a[1],c=a[2];return ot(u,s,c)},st=u.unpack,ct=u.DEG2RAD,lt=Math.sin,dt=Math.cos,ft=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=st(e,"lch"),r=n[0],i=n[1],o=n[2];return isNaN(o)&&(o=0),[r,dt(o*=ct)*i,lt(o)*i]},pt=u.unpack,ht=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=pt(e,"lch"))[0],r=e[1],i=e[2],o=ft(n,r,i),a=o[0],u=o[1],s=o[2],c=Je(a,u,s),l=c[0],d=c[1],f=c[2];return[l,d,f,e.length>3?e[3]:1]},bt=u.unpack,vt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=bt(e,"hcl").reverse();return ht.apply(void 0,n)},gt=u.unpack,mt=u.type;p.prototype.lch=function(){return ut(this._rgb)},p.prototype.hcl=function(){return ut(this._rgb).reverse()},b.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["lch"])))},b.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hcl"])))},s.format.lch=ht,s.format.hcl=vt,["lch","hcl"].forEach((function(e){return s.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=gt(t,e),"array"===mt(t)&&3===t.length)return e}})}));var yt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},wt=u.type;p.prototype.name=function(){for(var e=re(this._rgb,"rgb"),t=0,n=Object.keys(yt);t0;)t[n]=arguments[n+1];if(!t.length&&"string"===wt(e)&&yt[e.toLowerCase()])return"named"}});var Ot=u.unpack,jt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Ot(e,"rgb"),r=n[0],i=n[1],o=n[2];return(r<<16)+(i<<8)+o},Ct=u.type,Et=function(e){if("number"==Ct(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},xt=u.type;p.prototype.num=function(){return jt(this._rgb)},b.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["num"])))},s.format.num=Et,s.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===xt(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var Dt=u.unpack,kt=u.type,_t=Math.round;p.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(_t)},p.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,n){return n<3?!1===e?t:_t(t):t}))},b.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["rgb"])))},s.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Dt(e,"rgba");return void 0===n[3]&&(n[3]=1),n},s.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Dt(e,"rgba"),"array"===kt(e)&&(3===e.length||4===e.length&&"number"==kt(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var At=Math.log,St=function(e){var t,n,r,i=e/100;return i<66?(t=255,n=-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*At(n),r=i<20?0:.8274096064007395*(r=i-10)-254.76935184120902+115.67994401066147*At(r)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*At(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*At(n),r=255),[t,n,r,1]},Bt=u.unpack,Pt=Math.round,Ft=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,r=Bt(e,"rgb"),i=r[0],o=r[2],a=1e3,u=4e4,s=.4;u-a>s;){var c=St(n=.5*(u+a));c[2]/c[0]>=o/i?u=n:a=n}return Pt(n)};p.prototype.temp=p.prototype.kelvin=p.prototype.temperature=function(){return Ft(this._rgb)},b.temp=b.kelvin=b.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["temp"])))},s.format.temp=s.format.kelvin=s.format.temperature=St;var Tt=u.type;p.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Tt(e)?t?(this._rgb[3]=e,this):new p([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},p.prototype.clipped=function(){return this._rgb._clipped||!1},p.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=Fe*e,new p(t,"lab").alpha(this.alpha(),!0)},p.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},p.prototype.darker=p.prototype.darken,p.prototype.brighter=p.prototype.brighten,p.prototype.get=function(e){var t=e.split("."),n=t[0],r=t[1],i=this[n]();if(r){var o=n.indexOf(r);if(o>-1)return i[o];throw new Error("unknown channel "+r+" in mode "+n)}return i};var It=u.type,Nt=Math.pow;p.prototype.luminance=function(e){if(void 0!==e&&"number"===It(e)){if(0===e)return new p([0,0,0,this._rgb[3]],"rgb");if(1===e)return new p([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n=20,r=function(t,i){var o=t.interpolate(i,.5,"rgb"),a=o.luminance();return Math.abs(e-a)<1e-7||!n--?o:a>e?r(t,o):r(o,i)},i=(t>e?r(new p([0,0,0]),this):r(this,new p([255,255,255]))).rgb();return new p(i.concat([this._rgb[3]]))}return Rt.apply(void 0,this._rgb.slice(0,3))};var Rt=function(e,t,n){return.2126*(e=Mt(e))+.7152*(t=Mt(t))+.0722*(n=Mt(n))},Mt=function(e){return(e/=255)<=.03928?e/12.92:Nt((e+.055)/1.055,2.4)},Lt={},Ut=u.type,zt=function(e,t,n){void 0===n&&(n=.5);for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var o=r[0]||"lrgb";if(Lt[o]||r.length||(o=Object.keys(Lt)[0]),!Lt[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==Ut(e)&&(e=new p(e)),"object"!==Ut(t)&&(t=new p(t)),Lt[o](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};p.prototype.mix=p.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return zt.apply(void 0,[this,e,t].concat(n))},p.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new p([t[0]*n,t[1]*n,t[2]*n,n],"rgb")},p.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=Fe*e,t[1]<0&&(t[1]=0),new p(t,"lch").alpha(this.alpha(),!0)},p.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Vt=u.type;p.prototype.set=function(e,t,n){void 0===n&&(n=!1);var r=e.split("."),i=r[0],o=r[1],a=this[i]();if(o){var u=i.indexOf(o);if(u>-1){if("string"==Vt(t))switch(t.charAt(0)){case"+":case"-":a[u]+=+t;break;case"*":a[u]*=+t.substr(1);break;case"/":a[u]/=+t.substr(1);break;default:a[u]=+t}else{if("number"!==Vt(t))throw new Error("unsupported value for Color.set");a[u]=t}var s=new p(a,i);return n?(this._rgb=s._rgb,this):s}throw new Error("unknown channel "+o+" in mode "+i)}return a},Lt.rgb=function(e,t,n){var r=e._rgb,i=t._rgb;return new p(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};var Wt=Math.sqrt,Ht=Math.pow;Lt.lrgb=function(e,t,n){var r=e._rgb,i=r[0],o=r[1],a=r[2],u=t._rgb,s=u[0],c=u[1],l=u[2];return new p(Wt(Ht(i,2)*(1-n)+Ht(s,2)*n),Wt(Ht(o,2)*(1-n)+Ht(c,2)*n),Wt(Ht(a,2)*(1-n)+Ht(l,2)*n),"rgb")},Lt.lab=function(e,t,n){var r=e.lab(),i=t.lab();return new p(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};var Gt=function(e,t,n,r){var i,o,a,u,s,c,l,d,f,h,b,v;return"hsl"===r?(a=e.hsl(),u=t.hsl()):"hsv"===r?(a=e.hsv(),u=t.hsv()):"hcg"===r?(a=e.hcg(),u=t.hcg()):"hsi"===r?(a=e.hsi(),u=t.hsi()):"lch"!==r&&"hcl"!==r||(r="hcl",a=e.hcl(),u=t.hcl()),"h"===r.substr(0,1)&&(s=(i=a)[0],l=i[1],f=i[2],c=(o=u)[0],d=o[1],h=o[2]),isNaN(s)||isNaN(c)?isNaN(s)?isNaN(c)?v=Number.NaN:(v=c,1!=f&&0!=f||"hsv"==r||(b=d)):(v=s,1!=h&&0!=h||"hsv"==r||(b=l)):v=s+n*(c>s&&c-s>180?c-(s+360):c180?c+360-s:c-s),void 0===b&&(b=l+n*(d-l)),new p([v,b,f+n*(h-f)],r)},qt=function(e,t,n){return Gt(e,t,n,"lch")};Lt.lch=qt,Lt.hcl=qt,Lt.num=function(e,t,n){var r=e.num(),i=t.num();return new p(r+n*(i-r),"num")},Lt.hcg=function(e,t,n){return Gt(e,t,n,"hcg")},Lt.hsi=function(e,t,n){return Gt(e,t,n,"hsi")},Lt.hsl=function(e,t,n){return Gt(e,t,n,"hsl")},Lt.hsv=function(e,t,n){return Gt(e,t,n,"hsv")};var $t=u.clip_rgb,Kt=Math.pow,Yt=Math.sqrt,Xt=Math.PI,Jt=Math.cos,Qt=Math.sin,Zt=Math.atan2,en=function(e,t){for(var n=e.length,r=[0,0,0,0],i=0;i.9999999&&(r[3]=1),new p($t(r))},tn=u.type,nn=Math.pow,rn=function(e){var t="rgb",n=b("#ccc"),r=0,i=[0,1],o=[],a=[0,0],u=!1,s=[],c=!1,l=0,d=1,f=!1,p={},h=!0,v=1,g=function(e){if((e=e||["#fff","#000"])&&"string"===tn(e)&&b.brewer&&b.brewer[e.toLowerCase()]&&(e=b.brewer[e.toLowerCase()]),"array"===tn(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t2?function(e){if(null!=u){for(var t=u.length-1,n=0;n=u[n];)n++;return n-1}return 0}(e)/(u.length-2):d!==l?(e-l)/(d-l):1,c=y(c),r||(c=m(c)),1!==v&&(c=nn(c,v)),c=a[0]+c*(1-a[0]-a[1]),c=Math.min(1,Math.max(0,c));var f=Math.floor(1e4*c);if(h&&p[f])i=p[f];else{if("array"===tn(s))for(var g=0;g=w&&g===o.length-1){i=s[g];break}if(c>w&&c2){var c=e.map((function(t,n){return n/(e.length-1)})),f=e.map((function(e){return(e-l)/(d-l)}));f.every((function(e,t){return c[t]===e}))||(y=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=f[t+1];)t++;var n=(e-f[t])/(f[t+1]-f[t]);return c[t]+n*(c[t+1]-c[t])})}}return i=[l,d],j},j.mode=function(e){return arguments.length?(t=e,O(),j):t},j.range=function(e,t){return g(e),j},j.out=function(e){return c=e,j},j.spread=function(e){return arguments.length?(r=e,j):r},j.correctLightness=function(e){return null==e&&(e=!0),f=e,O(),m=f?function(e){for(var t=w(0,!0).lab()[0],n=w(1,!0).lab()[0],r=t>n,i=w(e,!0).lab()[0],o=t+(n-t)*e,a=i-o,u=0,s=1,c=20;Math.abs(a)>.01&&c-- >0;)r&&(a*=-1),a<0?(u=e,e+=.5*(s-e)):(s=e,e+=.5*(u-e)),i=w(e,!0).lab()[0],a=i-o;return e}:function(e){return e},j},j.padding=function(e){return null!=e?("number"===tn(e)&&(e=[e,e]),a=e,j):a},j.colors=function(t,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=s.slice(0);else if(1===t)r=[j(.5)];else if(t>1){var o=i[0],a=i[1]-o;r=on(0,t,!1).map((function(e){return j(o+e/(t-1)*a)}))}else{e=[];var c=[];if(u&&u.length>2)for(var l=1,d=u.length,f=1<=d;f?ld;f?l++:l--)c.push(.5*(u[l-1]+u[l]));else c=i;r=c.map((function(e){return j(e)}))}return b[n]&&(r=r.map((function(e){return e[n]()}))),r},j.cache=function(e){return null!=e?(h=e,j):h},j.gamma=function(e){return null!=e?(v=e,j):v},j.nodata=function(e){return null!=e?(n=b(e),j):n},j};function on(e,t,n){for(var r=[],i=eo;i?a++:a--)r.push(a);return r}var an=function(e){var t,n,r,i,o,a,u;if(2===(e=e.map((function(e){return new p(e)}))).length)t=e.map((function(e){return e.lab()})),o=t[0],a=t[1],i=function(e){var t=[0,1,2].map((function(t){return o[t]+e*(a[t]-o[t])}));return new p(t,"lab")};else if(3===e.length)n=e.map((function(e){return e.lab()})),o=n[0],a=n[1],u=n[2],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*o[t]+2*(1-e)*e*a[t]+e*e*u[t]}));return new p(t,"lab")};else if(4===e.length){var s;r=e.map((function(e){return e.lab()})),o=r[0],a=r[1],u=r[2],s=r[3],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*o[t]+3*(1-e)*(1-e)*e*a[t]+3*(1-e)*e*e*u[t]+e*e*e*s[t]}));return new p(t,"lab")}}else if(5===e.length){var c=an(e.slice(0,3)),l=an(e.slice(2,5));i=function(e){return e<.5?c(2*e):l(2*(e-.5))}}return i},un=function(e,t,n){if(!un[n])throw new Error("unknown blend mode "+n);return un[n](e,t)},sn=function(e){return function(t,n){var r=b(n).rgb(),i=b(t).rgb();return b.rgb(e(r,i))}},cn=function(e){return function(t,n){var r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r}};un.normal=sn(cn((function(e){return e}))),un.multiply=sn(cn((function(e,t){return e*t/255}))),un.screen=sn(cn((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),un.overlay=sn(cn((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),un.darken=sn(cn((function(e,t){return e>t?t:e}))),un.lighten=sn(cn((function(e,t){return e>t?e:t}))),un.dodge=sn(cn((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),un.burn=sn(cn((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var ln=un,dn=u.type,fn=u.clip_rgb,pn=u.TWOPI,hn=Math.pow,bn=Math.sin,vn=Math.cos,gn=Math.floor,mn=Math.random,yn=Math.log,wn=Math.pow,On=Math.floor,jn=Math.abs,Cn=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===o(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===o(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,en.max&&(n.max=e),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(e,t){return En(n,e,t)},n},En=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==o(e)&&(e=Cn(e));var r=e.min,i=e.max,a=e.values.sort((function(e,t){return e-t}));if(1===n)return[r,i];var u=[];if("c"===t.substr(0,1)&&(u.push(r),u.push(i)),"e"===t.substr(0,1)){u.push(r);for(var s=1;s 0");var c=Math.LOG10E*yn(r),l=Math.LOG10E*yn(i);u.push(r);for(var d=1;d200&&(w=!1)}for(var N={},R=0;R=360;)b-=360;a[h]=b}else a[h]=a[h]/u[h];return f/=r,new p(a,t).alpha(f>.99999?1:f,!0)},b.bezier=function(e){var t=an(e);return t.scale=function(){return rn(t)},t},b.blend=ln,b.cubehelix=function(e,t,n,r,i){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=[0,1]);var o,a=0;"array"===dn(i)?o=i[1]-i[0]:(o=0,i=[i,i]);var u=function(u){var s=pn*((e+120)/360+t*u),c=hn(i[0]+o*u,r),l=(0!==a?n[0]+u*a:n)*c*(1-c)/2,d=vn(s),f=bn(s);return b(fn([255*(c+l*(-.14861*d+1.78277*f)),255*(c+l*(-.29227*d-.90649*f)),255*(c+l*(1.97294*d)),1]))};return u.start=function(t){return null==t?e:(e=t,u)},u.rotations=function(e){return null==e?t:(t=e,u)},u.gamma=function(e){return null==e?r:(r=e,u)},u.hue=function(e){return null==e?n:("array"===dn(n=e)?0==(a=n[1]-n[0])&&(n=n[1]):a=0,u)},u.lightness=function(e){return null==e?i:("array"===dn(e)?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),u)},u.scale=function(){return b.scale(u)},u.hue(n),u},b.mix=b.interpolate=zt,b.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(gn(16*mn()));return new p(e,"hex")},b.scale=rn,b.analyze=xn.analyze,b.contrast=function(e,t){e=new p(e),t=new p(t);var n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},b.deltaE=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1),e=new p(e),t=new p(t);for(var i=Array.from(e.lab()),o=i[0],a=i[1],u=i[2],s=Array.from(t.lab()),c=s[0],l=s[1],d=s[2],f=Dn(a*a+u*u),h=Dn(l*l+d*d),b=o<16?.511:.040975*o/(1+.01765*o),v=.0638*f/(1+.0131*f)+.638,g=f<1e-6?0:180*kn(u,a)/Sn;g<0;)g+=360;for(;g>=360;)g-=360;var m=g>=164&&g<=345?.56+_n(.2*An(Sn*(g+168)/180)):.36+_n(.4*An(Sn*(g+35)/180)),y=f*f*f*f,w=Dn(y/(y+1900)),O=v*(w*m+1-w),j=f-h,C=a-l,E=u-d,x=(o-c)/(n*b),D=j/(r*v);return Dn(x*x+D*D+(C*C+E*E-j*j)/(O*O))},b.distance=function(e,t,n){void 0===n&&(n="lab"),e=new p(e),t=new p(t);var r=e.get(n),i=t.get(n),o=0;for(var a in r){var u=(r[a]||0)-(i[a]||0);o+=u*u}return Math.sqrt(o)},b.limits=xn.limits,b.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(p,[null].concat(e))),!0}catch(e){return!1}},b.scales=Bn,b.colors=yt,b.brewer=Nn,b}()},346:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return s}));var r=n(1),i=n(53),o=n(60);function a(e,t){var n=t.id;return e.getInteractionRules(n).map((function(e){var t,n,r,o,a=!0,u=!0,s=!0;e.conditions.filter((function(e){return e.type===i.b.DEVICE_TYPE})).forEach((function(e){"mobile"===e.value&&(a&&(a=!e.is_opposite),u&&(u=e.is_opposite),s&&(s=e.is_opposite)),"desktop"===e.value&&(a&&(a=e.is_opposite),u&&(u=!e.is_opposite),s&&(s=e.is_opposite)),"tablet"===e.value&&(a&&(a=e.is_opposite),u&&(u=e.is_opposite),s&&(s=!e.is_opposite))}));var c=e.rooms.filter((function(e){return e.id})).map((function(e){return{type:"room",roomId:e.id,domain:e.domain}}));return{id:null,ruleId:e.id,enabled:e.is_enabled,rooms:c,groups:[],urlContains:null!==(n=null===(t=e.conditions.find((function(e){return e.type===i.b.PAGE_URL_SIMPLE&&!e.is_opposite})))||void 0===t?void 0:t.value)&&void 0!==n?n:null,allowOnMobile:a,allowOnDesktop:u,allowOnTablet:s,toBeRemoved:!1,delay:parseInt(null!==(o=null===(r=e.conditions.find((function(e){return e.type===i.b.AFTER_TIMEOUT&&!e.is_opposite})))||void 0===r?void 0:r.value)&&void 0!==o?o:"",10)||null}}))}function u(e,t){var n;return(null!==(n=t.interactionData.publishingSettings)&&void 0!==n?n:[])[0]||{interactionType:o.a.WebsiteNormal,destinations:Object(r.m)([],Object(r.k)(a(e,t)),!1)}}function s(e,t){var n=u(e,t);return n.interactionType===o.a.WebsiteNormal?n.destinations:[]}},347:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});for(var r="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),i={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},o={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:r?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},a={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},u=1;u<20;u++)a["f"+u]=111+u;function s(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return c(e,t)})),i=function(e){return r.some((function(t){return l(t,e)}))};return null==n?i:i(n)}function c(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),a=o.length;for(var u in i)r[i[u]]=!1;var s=!0,c=!1,l=void 0;try{for(var p,h=o[Symbol.iterator]();!(s=(p=h.next()).done);s=!0){var b=p.value,v=b.endsWith("?")&&b.length>1;v&&(b=b.slice(0,-1));var g=f(b),m=i[g];1!==a&&m||(n?r.key=g:r.which=d(b)),m&&(r[m]=!v||null)}}catch(e){c=!0,l=e}finally{try{!s&&h.return&&h.return()}finally{if(c)throw l}}return r}function l(e,t){for(var n in e){var r=e[n],i=void 0;if(null!=r&&((null!=(i="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&i!==r))return!1}return!0}function d(e){return e=f(e),a[e]||e.toUpperCase().charCodeAt(0)}function f(e){return e=e.toLowerCase(),e=o[e]||e}t.default=s,t.isHotkey=s,t.isCodeHotkey=function(e,t){return s(e,t)},t.isKeyHotkey=function(e,t){return s(e,{byKey:!0},t)},t.parseHotkey=c,t.compareHotkey=l,t.toKeyCode=d,t.toKeyName=f},35:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),i=n(26),o=n(4),a=n(12),u=function(e){var t=e.type,n=e.includeElementsIds,u=e.absolutePositionDisabled,s=e.isPositioningEnabled,c=e.editingMode,l=e.children,d=e.css,f=e.className,p=e.element,h=e.elementProps,b=e.zIndex,v=e.innerRef,g=e.shouldClickThrough,m=e.setIsOutlineEnabled,y=e.activeBreakpoint,w=o.b.useCss(),O=function(e){"Tab"===e.key&&m&&m(!0)},j=function(){m&&m(!1)};o.b.useEffect((function(){return window.addEventListener("keydown",O),function(){window.removeEventListener("keydown",O)}}),[O]),o.b.useEffect((function(){return window.addEventListener("mousedown",j),function(){window.removeEventListener("mousedown",j)}}),[j]);var C=p.arrangement,E=p.uid,x=null==s||s?Object(a.e)(Object(i.b)(C.runtime||("mobile"===y?C.mobile:C.desktop)||C.default),u,"view"!==p.type&&p.hidden):{};return o.b.jsx(t,Object(r.a)(Object(r.a)({},null!=h?h:{}),{"giosg-autotest-id":E,role:g?"presentation":void 0,id:n?E.toString():void 0,className:"".concat(w([Object(a.d)(c?{}:x,{zIndex:b},d||{})])," ").concat(f),ref:v,onClick:function(){if(!c&&!g)return(null==h?void 0:h.onClick)?function(e){e.stopPropagation(),h.onClick(e)}:function(e){e.stopPropagation()}}(),style:c?x:{}}),l)}},377:function(e,t,n){"use strict";var r=n(152),i=n(91),o=n(68);function a(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function u(e,t,n){var r=[],i=Object(o.a)(e,r,n);return r.length<2?n:i+t(r)}var s=function e(t){for(var n="",r=0;r=t||n<0||v&&e-h>=l}function O(){var e=i();if(w(e))return j(e);f=setTimeout(O,function(e){var n=t-(e-p);return v?u(n,l-(e-h)):n}(e))}function j(e){return f=void 0,g&&s?m(e):(s=c=void 0,d)}function C(){var e=i(),n=w(e);if(s=arguments,c=this,p=e,n){if(void 0===f)return y(p);if(v)return clearTimeout(f),f=setTimeout(O,t),m(p)}return void 0===f&&(f=setTimeout(O,t)),d}return t=o(t)||0,r(n)&&(b=!!n.leading,l=(v="maxWait"in n)?a(o(n.maxWait)||0,t):l,g="trailing"in n?!!n.trailing:g),C.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=p=c=f=void 0},C.flush=function(){return void 0===f?d:j(i())},C}},387:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return l}));var r=n(1),i=n(190),o=function(e,t,n){return Object(r.e)(void 0,void 0,void 0,(function(){return Object(r.h)(this,(function(r){return[2,new Promise((function(r,i){if(e){var o=new URLSearchParams({preview:n.isPreviewMode.toString(),published_at:n.publishedAt||""}),a="/api/v2/live_interactions/".concat(n.interactionUuid,"/js_actions.js"),u="".concat(t).concat(a,"?").concat(o.toString()),s=document.head,c=document.createElement("script");c.type="application/javascript",c.src=u,c.onload=function(){return r()},c.onerror=function(){return i()},s.appendChild(c)}else r()}))]}))}))};function a(e){return e.replace(/-/g,"_")}var u=function(e){var t=a(e);return"ib_runjs_global_".concat(t)},s=function(e){var t=a(e);return"ib_runjs_".concat(t)},c=function(e,t,n,r){if(e){var o=function(e){var t=u(e),n=window.giosgInteractionJsActions;if(!n)throw new Error("Interaction JS action container not found");return n[t]}(t);if(!o){var a=u(t);throw new Error("Global custom JS function not found with name ".concat(a,"."))}o(r)}else{new Function(i.a,n)(r)}},l=function(e,t,n,o,a,u){return Object(r.e)(void 0,void 0,void 0,(function(){var c,l,d,f,p,h;return Object(r.h)(this,(function(r){switch(r.label){case 0:if(c="Action custom JS Error:",!e)return[3,7];if(!(l=function(e){var t=s(e),n=window.giosgInteractionJsActions;if(!n)throw new Error("Interaction JS action container not found");return n[t]}(t)))return d=s(t),console.warn("Did not find runjs action ".concat(d,". Possible syntax error, check console.")),[2];r.label=1;case 1:return r.trys.push([1,5,,6]),n?[4,new Promise((function(e){l(e,a)})).catch((function(e){console.info("".concat(c," ").concat(e.message)),console.info(e)}))]:[3,3];case 2:return r.sent(),[3,4];case 3:l(a),r.label=4;case 4:return[3,6];case 5:return f=r.sent(),console.info("".concat(c," ").concat(f.message)),console.info(f),[3,6];case 6:return[3,13];case 7:p=u.map((function(e){return"var ".concat(e.variableName," = ").concat(JSON.stringify(e.value),";\n")})).join(""),r.label=8;case 8:return r.trys.push([8,12,,13]),n?[4,new Promise((function(e){new Function("done",i.a,p+o)(e,a)})).catch((function(e){console.info("".concat(c," ").concat(e.message)),console.info(e)}))]:[3,10];case 9:return r.sent(),[3,11];case 10:new Function(i.a,p+o)(a),r.label=11;case 11:return[3,13];case 12:return h=r.sent(),console.info("".concat(c," ").concat(h.message)),console.info(h),[3,13];case 13:return[2]}}))}))}},388:function(e,t,n){"use strict";n.d(t,"a",(function(){return vt})),n.d(t,"b",(function(){return mt}));var r=n(1),i=n(4),o=n(343),a=n(402),u=n(45),s=n(12),c=n(62),l=n(112),d=n(74);var f=n(170),p=n(35),h=function(e,t,n,r){var i=t.designs;return Object(s.d)({padding:Object(s.m)(t,!1)},Object(s.f)(i,e,!0),Object(s.o)(i,!0),Object(s.g)(i,e),Object(s.j)(i,n),Object(s.i)(i,r))},b=n(22),v=n(63),g=n(71),m=n(225),y=function(e,t){var n=e.data.fields[t.uid],i=function(n){var i;e.setData({fields:Object(r.a)(Object(r.a)({},e.data.fields),(i={},i[t.uid]=n,i))})};return e.data.info.editing?[Object(m.b)(t),i]:[n,i]},w=function(e){return i.b.jsx("svg",Object(r.a)({viewBox:"0 0 12 9",version:"1.1"},e),i.b.jsx("g",{id:"🐼-Icons",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i.b.jsx("g",{id:"Icon-/-Control-/-Checkbox-/-Checked",transform:"translate(-7.000000, -8.000000)",fill:"currentColor"},i.b.jsx("path",{d:"M18,11 L13,16 C12.447,16.553 11.553,16.553 11,16 L10,15 L8,13 C7.447,12.447 7.447,11.553 8,11 C8.553,10.447 9.447,10.447 10,11 L12,13 L16,9 C16.553,8.447 17.447,8.447 18,9 C18.553,9.553 18.553,10.447 18,11",id:"Path"}))))},O=function(e,t){return Object(s.d)(Object(s.f)(e,t,!1),Object(s.o)(e))},j=function(e){return Object(s.d)(Object(s.o)(e),{display:"inline-flex",position:"relative",cursor:"pointer"})},C=function(e){var t=e.fontSize+2;return Object(s.d)(Object(s.o)(e),{cursor:"pointer",display:"inline-block",marginLeft:t+Math.floor(t/4),userSelect:"none"})},E=function(e,t){var n=e.fontSize+2,r=e.borderInvalidColor,i=e.backgroundInvalidColor;return Object(s.d)({borderRadius:"10%",border:"2px solid",borderColor:Object(s.p)(e.unselectedBorderColor),backgroundColor:Object(s.p)(e.unselectedFillColor),cursor:"pointer",height:n,width:n,display:"inline-block",position:"absolute",boxSizing:"border-box",userSelect:"none"},Object(s.c)(!t,{backgroundColor:i&&Object(s.p)(i),borderColor:r&&Object(s.p)(r)}))},x=function(e,t){return Object(s.d)({margin:0,width:0,opacity:0,":checked ~ span":{borderColor:Object(s.p)(e.selectedBorderColor),backgroundColor:Object(s.p)(e.selectedFillColor)},":checked ~ span svg":{display:"block"}},t&&{":focus ~ span":{boxShadow:"0 0 0 2px ".concat(b.t)}})},D=function(e){var t=e.fontSize+2;return Object(s.d)({display:"none",width:t-6,margin:"auto",position:"absolute",top:0,bottom:0,left:0,right:0,color:Object(s.p)(e.selectedMarkColor)})},k=function(e){var t=Object(r.k)(i.b.useState(e.delay<=0),2),n=t[0],o=t[1];return i.b.useEffect((function(){e.delay>0&&window.setTimeout((function(){return o(!0)}),e.delay)}),[]),n?e.children:null},_=n(234),A=function(e){return[Object(s.f)({opacity:1},e,!1)]},S=function(e){return[Object(s.f)({opacity:1},e,!1),{display:"flex"}]},B=n(169),P=n(139),F=Object(s.d)({height:"100%",width:"100%",overflow:"hidden"}),T=function(e){var t=i.b.useCss(),n=i.b.useRef(null),o=e.html;return i.b.useEffect((function(){var e,t;if(n.current){var i=(new DOMParser).parseFromString(o,"text/html"),a=i.querySelectorAll("script");try{for(var u=Object(r.n)(Array.from(a)),s=u.next();!s.done;s=u.next()){var c=s.value,l=document.createElement("script");l.type="text/javascript",l.innerText=c.innerText,c.src&&(l.src=c.src),document.head.appendChild(l),c.remove()}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}n.current.innerHTML=i.body.innerHTML}}),[o]),i.b.jsx("div",{className:t(F),ref:n})},I=function(){return i.b.jsx("svg",{className:"ib-disable-style-reset",xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 17.49 10.91"},i.b.jsx("g",{id:"Layer_2","data-name":"Layer 2",fill:"currentColor"},i.b.jsx("g",{id:"Layer_1-2","data-name":"Layer 1",fill:"currentColor"},i.b.jsx("path",{d:"M5.2,9.47a.51.51,0,0,1-.31-.11L.19,5.7A.49.49,0,0,1,0,5.31a.53.53,0,0,1,.19-.4l4.7-3.65a.49.49,0,0,1,.7.08.5.5,0,0,1-.08.7L1.31,5.31l4.2,3.26a.52.52,0,0,1,.08.71A.49.49,0,0,1,5.2,9.47Z"}),i.b.jsx("path",{d:"M12.29,9.47a.53.53,0,0,1-.4-.19A.51.51,0,0,1,12,8.57l4.19-3.26L12,2a.5.5,0,1,1,.61-.78l4.7,3.65a.54.54,0,0,1,.2.4.5.5,0,0,1-.2.39l-4.7,3.66A.5.5,0,0,1,12.29,9.47Z"}),i.b.jsx("path",{d:"M6.79,10.91l-.15,0a.5.5,0,0,1-.33-.63L9.37.35A.51.51,0,0,1,10,0a.51.51,0,0,1,.33.63L7.26,10.56A.49.49,0,0,1,6.79,10.91Z"}))))},N=function(e,t){return Object(s.d)(Object(s.f)(t,e,!0),Object(s.g)(t,e))},R=["allow-forms","allow-downloads","allow-modals","allow-orientation-lock","allow-pointer-lock","allow-popups","allow-popups-to-escape-sandbox","allow-presentation","allow-same-origin","allow-scripts","allow-top-navigation"].join(" "),M=Object(s.d)({height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",color:"#8D8C9A"}),L=n(30),U=function(e,t,n,r,i,o){return[Object(s.f)(t,e,r),Object(s.g)(t,e),Object(s.c)(!!o,{backgroundImage:"url(".concat(o,")"),backgroundSize:z(n.objectFit),backgroundPosition:"center"}),r&&Object(s.j)(t,i)]};function z(e){switch(e){case"contain":return"contain";case"cover":return"cover";case"fill":return"100% 100%";case"none":return"auto";default:return Object(L.a)(e)}}var V=n(235),W=n(28),H=function(e){var t=e.color,n=Object(r.l)(e,["color"]);return i.b.jsx("svg",Object(r.a)({id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:t,width:"24",height:"24"},n),i.b.jsx("path",{d:"M20.227,15.986l-6.5-11.055a2,2,0,0,0-3.448,0l-6.5,11.055A2,2,0,0,0,5.5,19H18.5A2,2,0,0,0,20.227,15.986ZM13,17H11V15h2Zm0-5a1,1,0,0,1-2,0V8h2Z"}))},G=function(e,t,n){return Object(s.d)(Object(s.f)(t,e,n))},q=function(e,t,n,r,i){var o=t.shadowPosX,a=t.shadowBlur,u=t.shadowPosY,c=t.shadowSpread,l=t.shadowApplied,d=t.backgroundInvalidColor,f=t.shadowInvalidColor,p=t.borderInvalidColor;return Object(s.d)(Object(s.o)(t),Object(s.g)(t,e),Object(s.j)(t,r),{pointerEvents:"initial",padding:"0.5em",resize:"none",width:"100%",height:"100%",boxSizing:"border-box"},Object(s.c)(!n,{backgroundColor:d&&Object(s.p)(d),borderColor:p&&Object(s.p)(p),boxShadow:f&&l&&"".concat(o,"px ").concat(u,"px ").concat(a,"px ").concat(c,"px ").concat(Object(s.p)(f))||void 0}),Object(s.c)("number"===i,{"::-webkit-outer-spin-button, ::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},MozAppearance:"textfield"}))},$=function(e){var t;return Object(s.d)(Object(s.o)(e),{color:null!==(t=e.borderInvalidColor&&Object(s.p)(e.borderInvalidColor))&&void 0!==t?t:"red",marginTop:"5px",display:"block"})},K=function(e){if(/^-?\d+([.,]\d+)?$/.test(e))return Number(e.replace(",","."))};function Y(e){var t=e.onClick,n=e.className;return i.b.jsx("div",{className:n,onClick:function(e){e.stopPropagation(),t()}},i.b.jsx("svg",{className:"ib-disable-style-reset",version:"1.1",id:"Capa_1",x:"0px",y:"0px",viewBox:"0 0 212.982 212.982",fill:"#7357FF"},i.b.jsx("g",{id:"Close"},i.b.jsx("path",{d:"M131.804,106.491l75.936-75.936c6.99-6.99,6.99-18.323,0-25.312\n c-6.99-6.99-18.322-6.99-25.312,0l-75.937,75.937L30.554,5.242c-6.99-6.99-18.322-6.99-25.312,0c-6.989,6.99-6.989,18.323,0,25.312\n l75.937,75.936L5.242,182.427c-6.989,6.99-6.989,18.323,0,25.312c6.99,6.99,18.322,6.99,25.312,0l75.937-75.937l75.937,75.937\n c6.989,6.99,18.322,6.99,25.312,0c6.99-6.99,6.99-18.322,0-25.312L131.804,106.491z"}))))}var X=n(46);function J(e){var t=e.size,n=e.emoteSymbol,r=e.containerElement,i=e.buttonElement,o=e.isOwnReaction;if(r&&i&&i.parentElement){for(var a=0;a<3;a++){setTimeout(d,150*a)}var u,s=((u=.5)+(1.25-u)*Math.random())*t*(Math.random()>.5?1:-1),c=10*t,l=i.parentElement.offsetHeight}function d(){var e=document.createElement("span");e.className="ib-disable-style-reset",Object.assign(e.style,{position:"absolute",bottom:"".concat(l,"px"),userSelect:"none",pointerEvents:"none",zIndex:o?1:0}),e.innerText=n;var t=[{marginLeft:"0px"},{marginLeft:"".concat(s,"px")}],i=[{transform:"scale(0.5)",opacity:1},{transform:"translateY(-".concat(c,"px) scale(3)"),opacity:0}];null==r||r.appendChild(e),e.animate(t,{duration:300,easing:"ease-in-out",direction:"alternate",iterations:1/0}),e.animate(i,{duration:1500,fill:"forwards",easing:"ease-in-out"}).addEventListener("finish",(function(){e.remove()}))}}var Q=["👍","🎉","❤","😯"];function Z(e){var t=e.animationContainer,n=e.emoteSymbol,o=e.className,a=e.size,u=e.orgId,s=e.interactionId,c=e.getUnpackedVisitorCid,l=i.b.useRef();return i.b.jsx("button",{className:o,onClick:function(e){return Object(r.e)(this,void 0,void 0,(function(){var i,o;return Object(r.h)(this,(function(r){switch(r.label){case 0:return e.stopPropagation(),(i=l.current)?(J({size:a,emoteSymbol:n,buttonElement:i,containerElement:t,isOwnReaction:!0}),[4,c()]):[2];case 1:return o=r.sent(),function(e,t,n,r){var i="".concat(X.d,"/api/pub/public/v1/orgs/").concat(e,"/live_reaction/").concat(t);fetch(i,{mode:"cors",method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({createdAt:(new Date).toISOString(),reaction:n,visitorId:r})}).catch((function(e){return console.error("Failed to send a reaction",e)}))}(u,s,n,o),[2]}}))}))},ref:l},n)}function ee(){return i.b.jsx("svg",{height:"1em",width:"1em",className:"ib-disable-style-reset",viewBox:"0 0 5.4243832 4.8551788",version:"1.1",id:"svg1"},i.b.jsx("defs",{id:"defs1"}),i.b.jsx("g",{id:"layer1",transform:"translate(-102.20281,-139.90085)"},i.b.jsx("g",{id:"g2",transform:"matrix(0.26458333,0,0,0.26458333,102.26139,145.90051)"},i.b.jsx("path",{d:"m 14.278839,-22.675601 c -0.8559,0.0065 -1.7004,0.196447 -2.4767,0.55698 -0.7762,0.36052 -1.4661,0.88328 -2.0232997,1.53302 -0.55712,-0.64974 -1.24704,-1.1725 -2.0233,-1.53302 -0.77626,-0.360533 -1.62081,-0.550453 -2.47668,-0.55698 -0.72424,-0.0071 -1.44261,0.130342 -2.1131,0.40424 -0.67049,0.27389 -1.27961,0.67874 -1.79175,1.19088 -0.51214002,0.51214 -0.91702502,1.12129 -1.19091802,1.79178 -0.273893,0.67049 -0.41131763,1.38886 -0.40423572,2.1131 0,3.78 3.39998374,6.86002 8.54998374,11.5300204 l 1.45,1.32 1.4499997,-1.32 c 5.15,-4.6700004 8.55,-7.7500204 8.55,-11.5300204 0.0071,-0.72424 -0.1303,-1.44261 -0.4042,-2.1131 -0.2739,-0.67049 -0.6788,-1.27964 -1.1909,-1.79178 -0.5122,-0.51214 -1.1213,-0.91699 -1.7918,-1.19088 -0.6705,-0.273898 -1.3888,-0.411322 -2.1131,-0.40424 z",fill:"#ff507b",id:"path1"})),i.b.jsx("g",{id:"g1",transform:"matrix(0.26458333,0,0,0.26458333,104.98136,141.91626)"},i.b.jsx("rect",{width:"10",height:"10",rx:"5",fill:"#ffffff",id:"rect1",x:"0",y:"0"}),i.b.jsx("rect",{width:"6",height:"2",transform:"translate(2,4)",fill:"#7357ff",id:"rect2",x:"0",y:"0"}),i.b.jsx("rect",{width:"2",height:"6",transform:"translate(4,2)",fill:"#7357ff",id:"rect3",x:"0",y:"0"}))))}function te(e){var t=e.element,n=e.store,i=e.css,o=e.isDrawerOpen,a=e.emoteCount,u=t.designs,c=t.arrangement.default,l=c.width,d=c.height,f=Math.min(l,d),p=Math.max(0,.8*f),h=(a+1)*l,b=f/2,v=Math.max(0,.4*f),g=.6*v,m={display:"flex",transition:"100ms ease background",justifyContent:"center",alignItems:"center",borderRadius:"100%",width:p,height:p},y=Object(r.a)(Object(r.a)({},m),{fontSize:.8*v,cursor:"pointer",userSelect:"none",":hover":{background:"#EFEDFA"}});return function(e,t){return Object.fromEntries(Object.entries(e).map((function(e){var n=Object(r.k)(e,2),i=n[0],o=n[1];return[i,t(Object(s.d)(o))]})))}({base:[Object(s.f)(u,n,!1),Object(s.g)(u,n),{fontSize:v,fontFamily:"'Noto Color Emoji', sans-serif",display:"flex",width:l,height:d,justifyContent:"center",alignItems:"center",borderRadius:b,background:"white","&, & *":{cursor:"pointer"},":hover > div":{background:"#EFEDFA"}}],reactionDrawer:[Object(s.f)(u,n,!1),Object(s.g)(u,n),{borderRadius:b,background:"white",display:"flex",flexDirection:"column",justifyContent:"space-evenly",alignItems:"center",position:"absolute",transition:"200ms ease height, 100ms ease opacity",bottom:0,opacity:o?1:0,height:o?h:0,width:l,zIndex:1}],closeButton:Object(r.a)(Object(r.a)({},y),{"> svg":{width:g,height:g}}),innerContainer:m,emoteButton:y},i)}var ne,re,ie,oe=n(240),ae=function(e){return i.b.jsx("svg",Object(r.a)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:50,height:50,fill:"#c1c1c1"},e),i.b.jsx("path",{className:"cls-1",d:"M40.432,15.753c-.014-.025-.04-.04-.058-.062a.5.5,0,0,0-.109-.115l-16-10a.5.5,0,0,0-.53,0l-16,10a.5.5,0,0,0-.109.115c-.018.022-.044.037-.058.062A.49.49,0,0,0,7.5,16V32a.5.5,0,0,0,.235.424l16,10c.008.005.019,0,.027.008a.45.45,0,0,0,.476,0c.008-.005.019,0,.027-.008l16-10A.5.5,0,0,0,40.5,32V16A.49.49,0,0,0,40.432,15.753ZM24,6.59,39.057,16,32,20.41,16.943,11Zm-8,5L31.057,21,24,25.41,8.943,16ZM8.5,16.9l15,9.375V41.1l-15-9.375Zm31,14.821L24.5,41.1V26.277l15-9.375Z"}))},ue=function(e){return i.b.jsx("svg",Object(r.a)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:22,height:22},e),i.b.jsx("path",{d:"M6,5.869v4.262a1,1,0,0,0,1.555.833l3.2-2.132a1,1,0,0,0,0-1.664l-3.2-2.132A1,1,0,0,0,6,5.869Z",fill:"currentColor"}))},se=function(e){return i.b.jsx("svg",Object(r.a)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:22,height:22},e),i.b.jsx("circle",{cx:"8",cy:"8",r:"3",fill:"currentColor",width:8,height:8}))},ce=function(e,t){return Object(s.d)(Object(s.f)(e,t,!1),Object(s.g)(e,t),Object(s.o)(e),{width:"100%",height:"100%",padding:17,display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",boxSizing:"border-box"})},le=function(e){return Object(s.d)({width:"100%",display:"flex",alignItems:"center",fontFamily:"Nunito Sans",color:"#000000"},Object(s.c)("vertical"===e.orientation,{flexDirection:"column"}))},de=function(e){return Object(s.d)({width:"100%",display:"flex",alignItems:"flex-start",flexDirection:"column",overflow:"hidden"},Object(s.c)("vertical"===e.orientation,{alignSelf:"flex-start"}),Object(s.c)("vertical"===e.listDirection,{marginBottom:16}))},fe=Object(s.d)({maxWidth:50,maxHeight:50,objectFit:"contain",borderRadius:5,cursor:"pointer","& > path":{cursor:"pointer"}}),pe=function(e){return Object(s.d)({display:"inline-block",flexShrink:0,marginRight:16},Object(s.c)("vertical"===e.orientation,{marginRight:0,marginBottom:20}))},he=function(e){return Object(s.d)({fontWeight:900,fontSize:14,lineHeight:"12px",letterSpacing:.2,textTransform:"uppercase",color:Object(s.p)(e)})},be=Object(s.d)({width:"100%",display:"flex",justifyContent:"space-between",color:"#000000"}),ve=Object(s.d)({display:"flex",justifyContent:"center",alignItems:"center",gap:8}),ge=function(e){var t=e.mirrorIcon,n=e.pointerEvents;return Object(s.d)({cursor:"pointer",color:"#000000","& > path":{cursor:"pointer"}},Object(s.c)(t,{transform:"scaleX(-1)"}),Object(s.c)(!n,{cursor:"auto",pointerEvents:"none"}))},me=function(e){var t,n,o,a=e.store,c=e.element,l=e.product,d=e.productsAmount,f=e.activeProductIndex,p=e.setActiveProductIndex,h=i.b.useCss(),b=Object(r.m)([],Object(r.k)(Array(Math.min(d,3)).keys()),!1);return i.b.jsx("div",{className:h(ce(c.designs,a))},i.b.jsx("div",{className:h(le(c))},i.b.jsx("a",{className:h(pe(c)),href:l.url,target:"_blank",rel:"noreferrer"},"product_example_id"===l.id?i.b.jsx(ae,{className:h(fe)}):l.image_url?i.b.jsx("img",{className:h(fe),src:l.image_url,alt:""}):null),i.b.jsx("div",{className:h(de(c))},c.callToActionText&&i.b.jsx("div",{className:h((o=c.designs.accentColor,Object(s.d)({fontWeight:800,fontSize:10,lineHeight:"12px",color:Object(s.p)(o),textTransform:"uppercase",marginBottom:8})))},c.callToActionText),i.b.jsx("div",{className:h((n=c.designs.productNameColor,Object(s.d)({fontWeight:900,fontSize:12,lineHeight:"14px",marginBottom:8,textAlign:"left",color:Object(s.p)(n)})))},l.name),l.price&&i.b.jsx("div",{className:h(he(c.designs.accentColor))},l.price,l.currency?" "+l.currency:""))),c.buttonCallToActionText&&i.b.jsx("button",{onClick:function(){return function(){if(l.add_to_cart_script){var e=new Function(l.add_to_cart_script);try{e()}catch(e){console.error("Error occurred while runnning add to cart script")}}else l.url&&window.open(l.url,"_blank");Object(u.a)(a,c,{elementUid:c.uid,type:"click"})}()},className:h((t=c.designs,Object(s.d)({width:"100%",display:"flex",justifyContent:"center",alignItems:"center",padding:"11px 24px",borderRadius:5,backgroundColor:Object(s.p)(t.accentColor),color:Object(s.p)(t.addToCartTextColor),fontFamily:"Nunito Sans",fontWeight:700,fontSize:14,lineHeight:"19px",textTransform:"uppercase",border:"none",cursor:"pointer",boxSizing:"border-box"})))},c.buttonCallToActionText),c.showControls&&d>1&&"carousel"===c.listStyle&&i.b.jsx("div",{className:h(be),onClick:function(e){return e.stopPropagation()}},i.b.jsx(ue,{className:h(ge({mirrorIcon:!0,pointerEvents:f-1>=0})),onClick:function(){return p(f-1)}}),i.b.jsx("div",{className:h(ve)},b.map((function(e,t){var n,r=0===f&&0===t,o=f===d-1&&t===b.length-1,a=0!==f&&f!==d-1&&1===t;return i.b.jsx(se,{key:t,className:h((n=r||o||a,Object(s.d)({color:"rgba(0, 0, 0, 0.25)"},Object(s.c)(n,{color:"#000000"}))))})}))),i.b.jsx(ue,{className:h(ge({mirrorIcon:!1,pointerEvents:f+1t/2?-360+a:a}(C[n][Math.floor(Math.random()*(null===(e=C[n])||void 0===e?void 0:e.length))],Ve(C));S(r),ne(r)}}),[t,I,C,n,ne]),M?i.b.jsx($e,{style:$>0&&H!==$?{visibility:"hidden"}:{}},i.b.jsx(Ge,{shadowBlur:l,shadowPosX:d,shadowPosY:f,shadowColor:c}),i.b.jsx(Ke,{className:P?"started-spinning":"",classKey:X,startSpinningTime:Q,continueSpinningTime:Z,stopSpinningTime:ee,startRotationDegrees:D,finalRotationDegrees:A},i.b.jsx(qe,{width:"900",height:"900",data:w,outerBorderColor:u,outerBorderWidth:s,radiusLineColor:p,radiusLineWidth:h,textDistance:b,perpendicularText:v,prizeMap:C,rouletteUpdater:z})),i.b.jsx(Ye,{style:g.style,src:g.src,alt:"roulette-static"})):null},Je=function(e){var t=e.arrangement.default,n=Math.max(t.width,t.height),i=Object(r.k)([t.width/n,t.height/n],2),o=i[0],a=i[1];return{width:n,height:n,transform:"scale(".concat(o,", ").concat(a,")"),transformOrigin:"0 0","& > div":{width:"100%",height:"100%",maxHeight:"unset",maxWidth:"unset"}}},Qe=function(e){var t=e.designs;return Object(s.d)({position:"absolute",borderRadius:"100%",left:"50%",top:"50%",transform:"translate(-50%, -50%) rotate(".concat(-e.arrangement.default.rotation,"deg)"),width:"".concat(t.buttonSize,"%"),height:"".concat(t.buttonSize,"%"),color:Object(s.p)(t.textColor),backgroundColor:Object(s.p)(t.backgroundColor),borderWidth:t.borderApplied?t.borderWidth:0,borderColor:t.borderApplied?Object(s.p)(t.borderColor):void 0,borderStyle:t.borderApplied?"solid":void 0,boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)",zIndex:5,cursor:"pointer",pointerEvents:"auto"},Object(s.o)(t))},Ze=function(){function e(e,t,n){Object.defineProperty(this,"organizationId",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"streamUrl",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"viewerId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewingEventInterval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.streamUrl||(this.streamUrl="No stream url"),this.viewerId=n||this.generateViewerId()}return Object.defineProperty(e.prototype,"generateViewerId",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Object(r.m)([],Object(r.k)(Array(32)),!1).map((function(){return Math.floor(16*Math.random()).toString(16)})).join("")}}),Object.defineProperty(e.prototype,"sendEvents",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Object(r.e)(this,void 0,void 0,(function(){var t,n,i=this;return Object(r.h)(this,(function(o){switch(o.label){case 0:return t=e.map((function(e){return Object(r.a)(Object(r.a)({},e),{vendor:"com.giosg.stream-player",category:"stream_player",visitor_id:i.viewerId,organization_id:i.organizationId})})),n={events:t},[4,fetch("https://api.giosg.com/events/v2/store/external",{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}})];case 1:return[2,o.sent().json()]}}))}))}}),Object.defineProperty(e.prototype,"streamLoadedEvent",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Object(r.e)(this,void 0,void 0,(function(){var e;return Object(r.h)(this,(function(t){return e=[{event_version:1,category:"stream_player",properties:["stream=".concat(this.streamUrl)],action:"load_stream",value:1}],[2,this.sendEvents(e)]}))}))}}),Object.defineProperty(e.prototype,"streamViewingEvent",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Object(r.e)(this,void 0,void 0,(function(){var e;return Object(r.h)(this,(function(t){return e=[{event_version:1,category:"stream_player",properties:["stream=".concat(this.streamUrl)],action:"view_stream",value:1}],[2,this.sendEvents(e)]}))}))}}),Object.defineProperty(e.prototype,"startStreamViewing",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Object(r.e)(this,void 0,void 0,(function(){var e=this;return Object(r.h)(this,(function(t){return this.viewingEventInterval&&this.stopStreamViewing(),this.viewingEventInterval=window.setInterval((function(){e.streamViewingEvent()}),5e3),this.streamViewingEvent(),[2]}))}))}}),Object.defineProperty(e.prototype,"stopStreamViewing",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.viewingEventInterval&&(window.clearInterval(this.viewingEventInterval),this.viewingEventInterval=void 0)}}),e}(),et=n(476),tt=function(e,t){return[Object(s.d)(Object(s.f)(t,e,!1),Object(s.g)(t,e),{pointerEvents:"initial"})]},nt=n(69),rt=n(47),it=function(e,t,n){return Object(r.e)(void 0,void 0,void 0,(function(){return Object(r.h)(this,(function(r){return Object(rt.b)({store:e,action:"changeview",triggerElementId:t.uid,dim3:n.viewId,actionUid:n.uid}),[2,Object(nt.a)(e,n,t)]}))}))},ot=function(e,t,n,r){return Object(s.d)(Object(s.f)(t,e,n),Object(s.g)(t,e),Object(s.c)(n&&r,{":focus":{boxShadow:"0 0 0 2px ".concat(b.t),outline:"none"}}),Object(s.o)(t,!0))},at=function(e,t){var n=e.designs,r=n.verticalTextAlignment?{top:"0",center:"50",bottom:"100"}[n.verticalTextAlignment]:0,i=!!(n.backgroundColorApplied||n.borderApplied||n.shadowApplied)?Object(s.m)(e,!1):void 0;return Object(s.d)({position:"absolute",width:"100%",top:"".concat(r,"%"),transform:"translateY(-".concat(r,"%)"),right:"right"===n.textAlignment?0:void 0,padding:i,lineHeight:s.a,boxSizing:"border-box"},Object(s.c)(t,{cursor:"pointer"}))},ut=n(267),st=n(153),ct=function(e,t){return Object(s.d)(Object(s.o)(e),Object(s.c)(t,{cursor:"pointer"}))},lt=function(e,t){return Object(s.d)(Object(s.o)(e),{"&&":{textDecoration:"underline",cursor:"pointer"}},t&&{"&&":{":focus":{boxShadow:"0 0 0 2px ".concat(b.t),outline:"none"}}})},dt=function(e,t,n,r,i){return Object(s.d)(Object(s.f)(t,e,n),Object(s.g)(t,e),Object(s.c)(n&&r,{":focus":{boxShadow:"0 0 0 2px ".concat(b.t),outline:"none"}}),i?{}:Object(s.o)(t))},ft=function(e,t,n,r){var i=e.designs,o=i.verticalTextAlignment?{top:"0",center:"50",bottom:"100"}[i.verticalTextAlignment]:0,a=!!(i.backgroundColorApplied||i.borderApplied||i.shadowApplied)?Object(s.m)(e):void 0;return Object(s.d)({position:"absolute",width:"100%",top:"".concat(o,"%"),transform:"translateY(-".concat(o,"%)"),right:"right"===i.textAlignment?0:void 0,padding:a,lineHeight:s.a,boxSizing:"border-box"},Object(s.c)(n,{cursor:"pointer"}),Object(s.c)(r,{height:"100%",top:0,transform:"none",display:"flex",alignItems:Object(st.d)(i.verticalTextAlignment),fontSize:0,span:{overflowWrap:"normal",letterSpacing:"normal",cursor:n?"pointer":"auto"},p:{cursor:n?"pointer":"auto"}}),Object(s.c)(r&&!n&&t.isInIframe,{pointerEvents:"none","& *:not(a)":{pointerEvents:"none"}}),Object(s.c)(r,{"> span":{display:"none",width:"100%",":only-child":{display:"block"}}}))},pt=function(e,t,n,r,i){var o=i.width/i.height,a=Math.round(r*o),u=Math.round(n/o);return Object(s.d)(Object(s.f)(t,e,!1),Object(s.g)(t,e),{width:a<=n?a:n,height:u<=r?u:r,top:0,bottom:0,left:0,right:0,margin:"auto",position:"absolute",pointerEvents:"initial"})},ht=function(e){return Object(s.d)({backgroundColor:"#dcdcdc",opacity:.7,height:"100%",width:"100%",textAlign:"center",lineHeight:"".concat(e.arrangement.default.height,"px"),textTransform:"uppercase",fontFamily:"arial",color:"black",fontSize:12})},bt=n(337),vt=function(e){var t,n,u,s=e.store,c=e.inViewElement,l=e.zIndex,d=e.baseProps,f=mt(c.type),p=Object(i.f)(null),h=null!==(t="mobile"===d.activeBreakpoint?c.arrangement.mobile:c.arrangement.desktop)&&void 0!==t?t:c.arrangement.default,b=!(null!==(n=c.hidden)&&void 0!==n?n:h.hidden);return Object(o.a)(!!p.current,b,p.current,c.uid),i.b.jsx(k,{delay:d.editingMode?0:null!==(u=c.entryDelay)&&void 0!==u?u:0},i.b.jsx(a.a,{animateOnMount:!d.editingMode,key:c.uid,shown:b,enter:c.animation,render:function(e){return i.b.jsx(f,Object(r.a)({},d,{store:s,innerRef:function(t){p.current=t,e(t)},element:c,zIndex:l}))}}))},gt=Object(bt.a)({button:function(e){var t,n,o,a,s=e.element,b=e.store,v=e.elementState,g=s.description,m=s.label,y=i.b.useCss(),w=Object(r.k)(i.b.useState(!1),2),O=w[0],j=w[1],C=Object(f.a)(b,e.element),E="disabled"===C||Object(l.a)(b,s.uid),x=Object(c.b)(b,s,b.data.project.conditionalActions);return i.b.jsx(p.a,Object(r.a)({},e,{type:"button",className:y(h(b,s,O,v)),shouldClickThrough:!x,setIsOutlineEnabled:function(e){j(e)},elementProps:{"aria-label":g,"aria-disabled":E,hidden:"hidden"===C,onClick:function(){E||Object(u.a)(b,s,{elementUid:s.uid,type:"click"})},onMouseOver:function(){Object(u.a)(b,s,{elementUid:s.uid,type:"hover"})}}}),(n=(t=m).trim(),o=t.indexOf(n),a=t.length-n.length-o,d.d.repeat(o)+n+d.d.repeat(a)))},input:function(e){var t=i.b.useCss(),n=e.element,o=e.store,a=Object(r.k)(y(o,n),2),d=a[0],f=a[1],h=Object(r.k)(Object(i.g)(String(null!=d?d:"")),2),b=h[0],m=h[1],w=Object(r.k)(Object(i.g)(!1),2),O=w[0],j=w[1];void 0!==d&&"string"!=typeof d&&"number"!=typeof d&&Object(v.b)(new Error("Expected string field value."));var C=Object(g.b)(o,n.uid),E=Object(c.b)(o,n,o.data.project.conditionalActions),x=Object(c.a)(o),D=Object(l.a)(o,n.uid),k="multiline"!==n.inputFieldType?"input":"textarea";Object(i.e)((function(){var e=K(b);e!==d&&void 0!==e&&m(String(null!=d?d:""))}),[d,b]);var _="number"===n.inputFieldType?"text":n.inputFieldType,A="number"===n.inputFieldType?"decimal":void 0;return i.b.jsx(p.a,Object(r.a)({},Object(r.a)(Object(r.a)({},e),{includeElementsIds:!1}),{type:"div",className:t(G(o,n.designs,E||x)),shouldClickThrough:!1,setIsOutlineEnabled:function(e){j(e)}}),i.b.jsx(k,{type:_,inputMode:A,placeholder:n.placeholder,value:b,"giosg-autotest-valid":C.toString(),"aria-label":n.description,"aria-invalid":!C,"aria-required":n.isRequired,name:"tel"===n.inputFieldType?"phone":n.inputFieldType,autoComplete:n.inputFieldType,className:t(q(o,n.designs,C,O,n.inputFieldType)),onClick:function(){D||Object(u.a)(o,n,{elementUid:n.uid,type:"click"})},onFocus:function(){D||(C||Object(g.c)(o,n.uid),Object(u.a)(o,n,{elementUid:n.uid,type:"click"}))},onBlur:function(){if(""!==b||Object(V.b)(void 0,n)||Object(g.d)(o,n.uid),"number"===n.inputFieldType){var e=K(b);Object(V.b)(e,n)||Object(g.d)(o,n.uid)}else Object(V.b)(d,n)||Object(g.d)(o,n.uid)},onKeyDown:function(e){if(n.triggerElementOnEnter&&"Enter"===e.key&&!D){var t=Object(W.d)(o,n.triggerElementOnEnter);t&&Object(u.a)(o,t,{elementUid:n.uid,type:"click"})}},onInput:function(e){var t=e.currentTarget.value;if(m(t),"number"===n.inputFieldType){if(/^-?$|^-?\d+([.,]\d*)?$/.test(t)){Object(g.c)(o,n.uid);var r=K(t);void 0!==r&&f(r),""===t&&f(void 0)}else Object(g.d)(o,n.uid)}else f(t)}}),!C&&i.b.jsx(i.b.Fragment,null,i.b.jsx("span",{className:t(Object(s.d)({position:"absolute",right:"2px",top:"50%",transform:"translateY(-50%)"}))},i.b.jsx(H,{color:n.designs.borderInvalidColor?Object(s.p)(n.designs.borderInvalidColor):"red"})),n.errorText&&i.b.jsx("span",{className:t($(n.designs)),"aria-live":"assertive"},n.errorText)))},view:null,radio:function(e){var t=e.element,n=e.store,o=t.designs,a=i.b.useCss(),c=Object(r.k)(i.b.useState(!1),2),l=c[0],d=c[1],f=Object(r.k)(y(n,t),2),h=f[0],b=f[1];void 0!==h&&"number"!=typeof h&&Object(v.b)(new Error("Expected string field value."));var m=Object(g.b)(n,t.uid),w=Array.apply(null,{length:t.columns}).map((function(e,t){return t})),O=i.b.useMemo((function(){return"".concat(t.uid,"-").concat(Math.random())}),[]);return i.b.jsx(p.a,Object(r.a)({},e,{type:"div",className:a(je(o,n,m)),shouldClickThrough:!1,elementProps:{role:"radiogroup","aria-label":t.description},setIsOutlineEnabled:function(e){d(e)}}),w.map((function(e){return i.b.jsx("div",{className:a((r=w.length,Object(s.d)({width:r>1?"".concat(100/r,"%"):"100%",display:"inline-block",verticalAlign:"top"}))),key:e},t.options.map((function(r,s){return s%w.length===e?i.b.jsx("div",{key:s},i.b.jsx("label",{className:a(ke(o))},i.b.jsx("input",{className:a(De(o,l)),checked:h===s,onChange:function(e){e.target.checked&&b(s),Object(u.a)(n,t,{elementUid:t.uid,type:"click"})},type:"radio","aria-labelledby":"".concat(t.uid,"-").concat(s,"-label"),name:O,value:r.label,"aria-required":t.isRequired,"aria-invalid":!m}),i.b.jsx("span",{className:a(Ee(o,m))},i.b.jsx(Oe,{className:"".concat(a(xe(o))," ib-disable-style-reset")})),i.b.jsx("div",{id:"".concat(t.uid,"-").concat(s,"-label"),className:a(Ce(o))},r.label))):null})));var r})))},checkbox:function(e){var t=e.element,n=e.store,o=t.designs,a=Object(r.k)(i.b.useState(!1),2),s=a[0],c=a[1],l=Object(r.k)(y(n,t),2),d=l[0],f=l[1],h=i.b.useCss();void 0!==d&&"boolean"!=typeof d&&Object(v.b)(new Error("Expected boolean field value."));var b=Object(g.b)(n,t.uid);return i.b.jsx(p.a,Object(r.a)({},e,{type:"div",className:h(O(o,n)),shouldClickThrough:!1,setIsOutlineEnabled:function(e){c(e)}}),i.b.jsx("label",{className:h(j(o))},i.b.jsx("input",{className:h(x(o,s)),onClick:function(e){e.stopPropagation()},onChange:function(e){f(e.target.checked),Object(u.a)(n,t,{elementUid:t.uid,type:"click"})},checked:d,type:"checkbox",value:t.label,title:t.description,"aria-labelledby":"".concat(t.uid,"-label")}),i.b.jsx("span",{className:h(E(o,b))},i.b.jsx(w,{className:"".concat(h(D(o))," ib-disable-style-reset")})),i.b.jsx("div",{id:"".concat(t.uid,"-label"),className:h(C(o))},t.label)))},image:function(e){var t=i.b.useCss(),n=e.element,o=e.store,a=Object(r.k)(y(o,n),1)[0],d=Object(r.k)(i.b.useState(!1),2),h=d[0],b=d[1],v=Object(c.b)(o,n,o.data.project.conditionalActions),g=Object(c.a)(o),m=Object(f.a)(o,e.element),w="disabled"===m||Object(l.a)(o,n.uid),O=n.giosgAssetUrl&&o.environment.getFullAssetCdnUrl(n.giosgAssetUrl);return i.b.jsx(p.a,Object(r.a)({},e,{type:"div",shouldClickThrough:!v,className:t(s.d.apply(void 0,Object(r.m)(Object(r.m)([],Object(r.k)(U(o,n.designs,n,v||g,h,void 0!==a?String(a):null!=O?O:n.imageUrl)),!1),[Object(s.n)(m)],!1))),elementProps:{onClick:function(){w||Object(u.a)(o,n,{elementUid:n.uid,type:"click"})},onKeyDown:function(e){"Enter"!==e.key||w||Object(u.a)(o,n,{elementUid:n.uid,type:"click"})},role:"img","aria-label":n.description,alt:n.description,"aria-disabled":w,hidden:"hidden"===m,tabIndex:v?0:void 0},setIsOutlineEnabled:function(e){b(e)}}))},select:function(e){var t=e.element,n=e.store,o=i.b.useCss(),a=Object(r.k)(i.b.useState(!1),2),s=a[0],c=a[1],l=Object(r.k)(y(n,t),2),d=l[0],f=l[1],h=Object(g.b)(n,t.uid),b=(t.isRequired||!t.defaultValue)&&!!t.placeholder&&Object(g.a)(n,t.uid);return void 0!==d&&"number"!=typeof d&&Object(v.b)(new Error("Expected string field value.")),i.b.jsx(p.a,Object(r.a)({},e,{type:"div",shouldClickThrough:!1,elementProps:{value:void 0!==d?d:-1},setIsOutlineEnabled:function(e){c(e)},className:o(Be(t.designs,n))}),i.b.jsx(Se,{className:o(Pe(n,t.designs,h,b,s)),element:t,isValid:h,isPlaceholderShown:!t.defaultValue,value:d,onChange:function(e){f(parseInt(e.target.value)),Object(u.a)(n,t,{elementUid:t.uid,type:"click"})}}))},text:function(e){var t=e.element,n=e.store,o=e.editingMode,a=i.b.useCss(),d=Object(r.k)(Object(i.g)(!1),2),f=d[0],h=d[1],b=Object(c.b)(n,t,n.data.project.conditionalActions),v=Object(c.a)(n),g=Object(l.a)(n,t.uid),m=!!t.richText,y=t.richText,w=function(){for(var e=[],t=0;t=new Date(e.start_date)&&t0;return i.b.jsx(p.a,Object(r.a)({},o,{type:"div",element:t,shouldClickThrough:!1,className:a(Ie(u,n)),css:"display: flex"}),i.b.jsx("input",{type:"range",min:s,max:l,step:d,value:null!=g?g:0,"aria-labelledby":"".concat(t.uid,"-label"),className:a(Ne(u,O,n,h,w)),onInput:function(e){m(Number(e.currentTarget.value))}}),j&&i.b.jsx("div",{className:a(Re(w,u))},f.map((function(e,t){return i.b.jsx("span",{key:t,className:a(Me(e.value,l))},e.label)}))))}});function mt(e){return gt[e]}},389:function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r,i=n(1),o=n(4),a=n(272),u=n(51),s=n(45),c=n(339),l=n(28),d=n(12),f=n(62),p=n(112);!function(e){e.GoToStart="Start",e.GoToEnd="End"}(r||(r={}));var h=function(e){var t=e.innerRef,n=e.onFocus;return o.b.jsx("div",{ref:t,tabIndex:0,onFocus:n})},b=function(e,t){var n=e.current;if(n){var i=n.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])");if(i.length>3)i[t===r.GoToStart?2:i.length-2].focus()}},v=function(e){var t=e.rootRef;return o.b.jsx(o.b.Fragment,null,o.b.jsx(g,{rootRef:t}),o.b.jsx(h,{innerRef:t,onFocus:function(){return b(t,r.GoToEnd)}}))},g=function(e){var t=e.rootRef;return o.b.jsx(h,{innerRef:t,onFocus:function(){return b(t,r.GoToStart)}})},m=n(47),y=n(170),w=n(343),O=function(e){var t=o.b.useCss(),n=e.message,r=e.polite,i=o.b.useRef(null);return o.b.useEffect((function(){var e=i.current;e&&(e.textContent=n)}),[n]),o.b.jsx("div",{className:t(j),ref:i,"aria-live":r?"polite":"assertive"})},j=Object(d.d)({"&&":{height:0,width:0,overflow:"hidden"}}),C=n(35),E=n(388),x=n(234),D=n(26),k=n(110),_=function(e,t,n,r,o,a,s){var c=t.arrangement.default,l=!!t.isFullHeight,f=!!t.isFullWidth;return Object(i.m)(Object(i.m)([],Object(i.k)(s?[]:[Object(d.f)(t.designs,e,n),Object(d.h)(t.designs,e)]),!1),[Object(d.c)(s||Object(u.e)(t),{pointerEvents:"none"}),Object(d.c)(!a&&f,{width:"100%"}),Object(d.c)(!a&&l,{height:"100%"}),Object(d.c)(r,{position:"relative",marginLeft:"left"!==c.xType?"auto":0,marginRight:"right"!==c.xType?"auto":0,marginTop:"top"!==c.yType?"auto":0,marginBottom:"bottom"!==c.yType?"auto":0}),Object(d.n)(o),Object(d.c)(a,{transform:c.rotation?"rotate(".concat(c.rotation,"deg)"):void 0,width:"100%",height:"100%"})],!1)},A=function(e){var t,n=e.store,r=e.className,u=e.element,d=e.innerRef,h=e.enableResponsivePlayer,b=e.isInteractionRendered,j=Object(i.l)(e,["store","className","element","innerRef","enableResponsivePlayer","isInteractionRendered"]),A=o.b.useCss(),B=Object(o.f)(null),P=Object(o.f)(null),F=Object(y.a)(n,u),T=n.data.project.isInInvisibleViewMode;Object(o.e)((function(){var e,t,r,o;("chat_message_visitor"===n.environment.runtime||"chat_message_user"===n.environment.runtime||"on_the_task_list"===n.environment.runtime)&&(e=u,t=Object(D.e)(e),r=Object(i.k)(t.width,2)[1],o=Object(i.k)(t.height,2)[1],Object(k.b)({type:"size",width:r,height:o}))}),[n.environment.runtime,u]),Object(o.e)((function(){Object(m.d)(n,u);var e=Object(a.b)(u);return e.length>0&&Object(c.a)(n,u.uid,e,void 0),function(){Object(m.c)(n,u)}}),[u,n]);var I=!h&&!n.data.info.editing&&"chat_message_visitor"!==n.environment.runtime&&"chat_message_user"!==n.environment.runtime;Object(o.e)((function(){if(I&&B.current){var e=B.current,t=e.offsetHeight,r=e.offsetWidth,o=e.parentElement;if(o&&n.data.project.allowScaling){if((o.offsetHeight-t)/2=o}return i.length>=o}function s(e,t,n){var i=this,a=e.map((function(e){return e.rooms.map((function(e){return e.domain}))})).flat();return Object(o.a)(a,(function(e){return Object(r.e)(i,void 0,void 0,(function(){var i;return Object(r.h)(this,(function(r){switch(r.label){case 0:return e?[4,t.domainStatus(n,e).catch(console.error)]:[2,!1];case 1:return[2,!!(i=r.sent())&&!i.is_script_working]}}))}))}))}},394:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));n(482);function r(e,t){var n={events:t};try{if("sendBeacon"in navigator)if(navigator.sendBeacon(e,new Blob([JSON.stringify(n)],{type:"application/json"})))return}catch(e){console.warn(e)}var r=new XMLHttpRequest;r.open("POST",e,!0),r.setRequestHeader("Content-Type","application/json"),r.onreadystatechange=function(){4===r.readyState&&(r.status<=299||console.warn("Event send internal error ".concat(r.status," ").concat(r.statusText)))},r.onerror=function(){console.warn("Event send network error")},r.send(JSON.stringify(n))}function i(e,t){var n={events:t};try{if("sendBeacon"in navigator)if(navigator.sendBeacon(e,new Blob([JSON.stringify(n)],{type:"application/json"})))return}catch(e){console.warn(e)}fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((function(e){e.ok||console.warn("Event send internal error ".concat(e.status," ").concat(e.statusText))})).catch((function(e){console.warn("Event send network error: ".concat(e))}))}},395:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t,n){var r=null,i=null,o=n&&n.leading,a=n&&n.trailing;null==o&&(o=!0);null==a&&(a=!o);1==o&&(a=!1);var u=function(){r&&(clearTimeout(r),r=null)},s=function(){var n=o&&!r,u=this,s=arguments;if(i=function(){return e.apply(u,s)},r||(r=setTimeout((function(){if(r=null,a)return i()}),t)),n)return n=!1,i()};return s.cancel=u,s.flush=function(){var e=i;u(),e&&e()},s}},4:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"g",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return f}));var r=n(1),i=n(57),o=n(107),a=n(74),u=i.createContext(null),s=o.useState,c=o.useEffect,l=o.useRef,d=o.useCallback,f=i.render;t.b=Object(r.a)(Object(r.a)(Object(r.a)({},i),o),{jsx:function(e,t){for(var n=[],o=2;o1)for(var n=1;n=t.width,isFullHeight:r<=0&&r+o>=t.height}}},43:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return u})),n.d(t,"h",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return d})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return p}));var r=n(1),i=n(30),o=n(27),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"tsWorkaroudNotAuthenticated",{enumerable:!0,configurable:!0,writable:!0,value:!0}),t}return Object(r.g)(t,e),t}(Error),u=function(){function e(e,t,n){Object.defineProperty(this,"access_token",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"baseUrl",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"onUnauthorized",{enumerable:!0,configurable:!0,writable:!0,value:n})}return Object.defineProperty(e.prototype,"updateToken",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.access_token=e}}),Object.defineProperty(e.prototype,"apiCall",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,i){return Object(r.e)(this,void 0,void 0,(function(){var o,u,s,c,l;return Object(r.h)(this,(function(r){switch(r.label){case 0:return o=void 0,!n||"POST"!==e&&"PATCH"!==e||(o=JSON.stringify(n)),i&&((o=new FormData).append("upload",i,i.name),o.append("charset","utf-8"),o.append("name",i.name)),(u=new Headers).append("Authorization",this.access_token.length<42?"Token ".concat(this.access_token):"Bearer ".concat(this.access_token)),i||(u.append("Accept","application/json"),u.append("Content-Type","application/json")),[4,fetch(t,{method:e,headers:u,body:o})];case 1:return(s=r.sent()).status<=299?"DELETE"===e?[3,3]:[4,s.json()]:[3,5];case 2:return c=r.sent(),[3,4];case 3:c=s.text(),r.label=4;case 4:return[2,c];case 5:return 401!==s.status?[3,9]:this.onUnauthorized?[4,this.onUnauthorized()]:[3,7];case 6:return r.sent(),[3,8];case 7:throw new a;case 8:return[3,11];case 9:return[4,s.text()];case 10:throw l=r.sent(),s.status>=500&&console.error(l),new Error(l);case 11:return[3,0];case 12:return[2]}}))}))}}),Object.defineProperty(e.prototype,"paginatedGet",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Object(r.b)(this,arguments,(function(){var t,n;return Object(r.h)(this,(function(i){switch(i.label){case 0:t=e,i.label=1;case 1:return[4,Object(r.d)(this.apiCall("GET",t))];case 2:return n=i.sent(),[4,Object(r.d)(n)];case 3:return[4,i.sent()];case 4:return i.sent(),n.next?(t=n.next,[3,1]):[3,5];case 5:return[2]}}))}))}}),e}();function s(e,t){var n=t?Object.keys(t).map((function(e){var n=t[e];return void 0!==n?encodeURIComponent(e)+"="+encodeURIComponent(n.toString()):""})).filter((function(e){return e})).join("&"):"";return n?"".concat(e,"?").concat(n):e}function c(e){var t,n,i,o;return Object(r.e)(this,void 0,void 0,(function(){var a,u,s,c;return Object(r.h)(this,(function(l){switch(l.label){case 0:a=[],l.label=1;case 1:l.trys.push([1,6,7,12]),t=Object(r.c)(e),l.label=2;case 2:return[4,t.next()];case 3:if((n=l.sent()).done)return[3,5];u=n.value,a.push(u.results),l.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return s=l.sent(),i={error:s},[3,12];case 7:return l.trys.push([7,,10,11]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,9];case 8:l.sent(),l.label=9;case 9:return[3,11];case 10:if(i)throw i.error;return[7];case 11:return[7];case 12:return[2,(c=[]).concat.apply(c,Object(r.m)([],Object(r.k)(a),!1))]}}))}))}function l(e){return e.themeStyles.forEach((function(e){e.uid=Object(o.j)()})),e}function d(e){function t(t){var n,i,o,a,u,s,c,l,d;try{for(var f=Object(r.n)(null!==(d=e.templates)&&void 0!==d?d:[]),p=f.next();!p.done;p=f.next()){var h=p.value;try{for(var b=(o=void 0,Object(r.n)(h.elements)),v=b.next();!v.done;v=b.next()){t(v.value)}}catch(e){o={error:e}}finally{try{v&&!v.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}try{for(var g=Object(r.n)(e.views),m=g.next();!m.done;m=g.next()){var y=m.value;try{for(var w=(c=void 0,Object(r.n)(y.elements)),O=w.next();!O.done;O=w.next()){t(O.value)}}catch(e){c={error:e}}finally{try{O&&!O.done&&(l=w.return)&&l.call(w)}finally{if(c)throw c.error}}t(y)}}catch(e){u={error:e}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(u)throw u.error}}}var n=new Map;return n.set(void 0,void 0),t((function(e){var t=e.uid,r=Object(o.c)();e.uid=r,n.set(t,r),"view"===e.type&&(e.goalEnabled=void 0,e.goalUid=void 0,e.goalIsExternal=void 0,e.goalUids=void 0,e.goals=void 0),"button"!==e.type&&"input"!==e.type&&"checkbox"!==e.type||!e.hasCustomName||(e.hasCustomName=!1)})),t((function(e){e.clickEvents&&e.clickEvents.forEach((function(e){e.actions.forEach((function(e){e.uid=Object(o.a)(),"changeview"===e.type?e.viewId=n.get(e.viewId):"showhide"===e.type?e.targetUid=n.get(e.targetUid):"localstorageflag"===e.type||"url"===e.type||"giosgprocessor"===e.type||"exit"===e.type||"delay"===e.type||"customaction"===e.type||"runjs"===e.type||"formdata"===e.type||"openchat"===e.type||"closechat"===e.type||"starttask"===e.type||"startcall"===e.type||"setdatafield"===e.type||"hubformdata"===e.type||"uploadFile"===e.type||"setVisitorVariable"===e.type||"showWhisbiClient"===e.type||Object(i.a)(e)})),e.conditions.forEach((function(e){e.uid=Object(o.b)(),"targetId"in e&&(e.targetId=n.get(e.targetId))}))}))})),e}function f(e,t,n){if(void 0===n&&("function"==typeof t?t(e):!t.includes(e)))return e;for(var r,i=void 0!==n?n:1,o=e.replace(/ (\d+)$/,"");;){if(r="".concat(o," ").concat(i),"function"==typeof t?t(r):!t.includes(r))return r;i++}}var p=function(e){return Object.values(e).filter((function(e){return null!=e}))}},45:function(e,t,n){"use strict";n.d(t,"b",(function(){return U})),n.d(t,"a",(function(){return V}));var r=n(1),i=n(390),o=n(47),a=n(110),u=n(30),s=n(272),c=n(26),l=n(63),d=n(69),f=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,i,o,a;return Object(r.h)(this,(function(r){if(n=t.phoneNumberElementId,i=t.callType,o=e.environment.getGiosg(),a=n?e.data.fields[n]:"",!(null==o?void 0:o.api))throw new Error("Startcall action is not supported in '".concat(e.environment.runtime,"' runtime."));if(!o.api.call)throw new Error("Visitor-side webrtc plugin is not loaded");return"webCall"===i||void 0===i?o.api.call.startCallWithOptions({operatorName:t.title,operatorAvatarUrl:t.avatarUrl,roomId:t.roomId,kind:t.kind,type:"voip"}):"telephonyCall"===i?o.api.call.startCallWithOptions({operatorName:t.title,operatorAvatarUrl:t.avatarUrl,roomId:t.roomId,kind:t.kind,type:"telephony",phoneNumber:a}):Object(u.a)(i),[2]}))}))},p=n(74),h=n(139),b=n(28);function v(e,t,n,r){return new Promise((function(i,o){var a=new XMLHttpRequest;a.open(t,e,!0),a.setRequestHeader("Content-Type","application/json"),r&&a.setRequestHeader("Authorization","Bearer ".concat(r)),a.onreadystatechange=function(){if(4===a.readyState)if(a.status>=100&&a.status<=299)try{var e=JSON.parse(a.responseText);i(e)}catch(e){console.info(e),o(e instanceof Error?e:new Error(""))}else a.statusText||a.responseText?o(new Error(a.statusText+": "+a.responseText)):o(new Error("Network error"))},a.onerror=function(e){return o(new Error("Network error"))},a.send(n?JSON.stringify(n):void 0)}))}var g=function(e,t){return Object(r.e)(void 0,void 0,void 0,(function(){var n,i,o,a,s,c,l,d,f,g;return Object(r.h)(this,(function(r){switch(r.label){case 0:return n=e.environment.getGiosg(),i={message:Object(h.b)(e,t.message||"Lead",!1),type:"interaction_submit"},(g={})[p.g]=Object(h.b)(e,t.title||p.a,!1),g[p.e]=t.avatarUrl,g[p.f]=t.avatarUrl,o=g,(null==n?void 0:n.api)?[4,n.api.chat.startTask(i,t.roomId,"incognito"===t.visitorType,o)]:[3,2];case 1:return r.sent(),[3,9];case 2:if(!(a=t.roomId))throw new Error("StartTask action without roomId is not supported in '".concat(e.environment.runtime,"' runtime"));if("incognito"===t.visitorType);else{if("current"===t.visitorType)throw new Error("StartTask action with current visitor is not supported in '".concat(e.environment.runtime,"' runtime"));Object(u.a)(t.visitorType)}return s=e.data.info.organizationUid,c=e.data.info.api.interactionPlayerChatOrigin,[4,v("".concat(c,"/api/v5/public/orgs/").concat(s,"/auth"),"POST",{})];case 3:return l=r.sent(),[4,v("".concat(c,"/api/v5/public/orgs/").concat(l.organization_id,"/rooms/").concat(a,"/visitors"),"POST",{id:l.visitor_id},l.access_token)];case 4:return d=r.sent(),[4,v("".concat(c,"/api/v5/public/orgs/").concat(l.organization_id,"/rooms/").concat(a,"/visitors/").concat(d.id,"/chats"),"POST",{chat_type:"task"},l.access_token)];case 5:return f=r.sent(),t.title||t.avatarUrl?[4,Object(b.g)("".concat(c,"/giosg_api/visitor/").concat(d.id,"/").concat(a,"/"),{data:o})]:[3,7];case 6:r.sent(),r.label=7;case 7:return[4,v("".concat(c,"/api/v5/public/visitors/").concat(d.id,"/chats/").concat(f.id,"/messages"),"POST",i,l.access_token)];case 8:r.sent(),r.label=9;case 9:return[2]}}))}))},m=n(339),y=function(e,t,n){return Object(r.e)(void 0,void 0,void 0,(function(){var i,a,p,h,v,y,w,O,j,C,E,x,D,k;return Object(r.h)(this,(function(_){switch(_.label){case 0:_.trys.push([0,45,46,47]),i=Object(r.n)(t),a=i.next(),_.label=1;case 1:if(a.done)return[3,44];p=a.value,_.label=2;case 2:return _.trys.push([2,42,,43]),h=n.uid,"changeview"!==p.type?[3,4]:(Object(o.b)({store:e,action:"changeview",triggerElementId:h,dim3:p.viewId,actionUid:p.uid}),[4,Object(d.a)(e,p,n)]);case 3:return _.sent(),[3,41];case 4:return"url"!==p.type?[3,6]:(Object(o.b)({store:e,action:"url",triggerElementId:h,actionUid:p.uid}),[4,Object(d.q)(e,p,n)]);case 5:return _.sent(),[3,41];case 6:return"delay"!==p.type?[3,8]:(Object(o.b)({store:e,action:"delay",triggerElementId:h,value:p.delayMs,actionUid:p.uid}),[4,Object(d.c)(e,p,n)]);case 7:return _.sent(),[3,41];case 8:return"localstorageflag"!==p.type?[3,10]:[4,Object(d.h)(e,p,n)];case 9:return _.sent(),[3,41];case 10:return"hubformdata"!==p.type?[3,12]:(Object(o.b)({store:e,action:"hubformdata",triggerElementId:h,actionUid:p.uid}),[4,Object(d.g)(e,p,n)]);case 11:return _.sent(),[3,41];case 12:return"formdata"!==p.type?[3,14]:(Object(o.b)({store:e,action:"formdata",triggerElementId:h,actionUid:p.uid}),[4,Object(d.e)(e,p,n)]);case 13:return _.sent(),[3,41];case 14:return"giosgprocessor"!==p.type?[3,16]:(Object(o.b)({store:e,action:"leadform",triggerElementId:h,actionUid:p.uid}),[4,Object(d.f)(e,p,n)]);case 15:return _.sent(),[3,41];case 16:return"openchat"!==p.type?[3,18]:(Object(o.b)({store:e,action:"openchat",triggerElementId:h,actionUid:p.uid}),[4,Object(d.i)(e,p,n)]);case 17:return _.sent(),[3,41];case 18:return"closechat"!==p.type?[3,20]:(Object(o.b)({store:e,action:"closechat",triggerElementId:h,actionUid:p.uid}),[4,Object(d.b)(e,p,n)]);case 19:return _.sent(),[3,41];case 20:return"runjs"!==p.type?[3,22]:(Object(o.b)({store:e,action:"runjs",triggerElementId:h,actionUid:p.uid}),[4,Object(d.j)(e,p,n)]);case 21:return _.sent(),[3,41];case 22:return"showhide"!==p.type?[3,24]:((v=p.targetUid&&Object(b.d)(e,p.targetUid))&&"view"!==v.type&&(y=Object(c.e)(v,e.data.activeBreakpoint),w=null!==(k=v.hidden)&&void 0!==k?k:y.hidden,O="show"===p.action||"toggle"===p.action&&w?"showelement":"hideelement",Object(o.b)({store:e,action:O,triggerElementId:h,actionUid:p.uid})),[4,Object(d.n)(e,p,n)]);case 23:return _.sent(),[3,41];case 24:return"exit"!==p.type?[3,26]:(Object(o.b)({store:e,action:"exit",triggerElementId:h,actionUid:p.uid}),[4,Object(d.d)(e)]);case 25:return _.sent(),[3,41];case 26:return"uploadFile"!==p.type?[3,28]:(Object(o.b)({store:e,action:"uploadFile",triggerElementId:h,actionUid:p.uid}),[4,Object(d.p)(e,p,n)]);case 27:return _.sent(),[3,41];case 28:return"starttask"!==p.type?[3,30]:(Object(o.b)({store:e,action:"starttask",triggerElementId:h,actionUid:p.uid}),[4,g(e,p)]);case 29:return _.sent(),[3,41];case 30:return"startcall"!==p.type?[3,32]:(Object(o.b)({store:e,action:"startcall",triggerElementId:h,actionUid:p.uid,dim4:p.kind}),[4,f(e,p)]);case 31:return _.sent(),[3,41];case 32:return"setdatafield"!==p.type?[3,34]:(Object(o.b)({store:e,action:"setdatafield",triggerElementId:h,actionUid:p.uid}),[4,Object(d.l)(e,p,n)]);case 33:return _.sent(),[3,41];case 34:return"setVisitorVariable"!==p.type?[3,36]:(Object(o.b)({store:e,action:"setVisitorVariable",triggerElementId:h,actionUid:p.uid}),[4,Object(d.m)(e,p,n)]);case 35:return _.sent(),[3,41];case 36:return"customaction"!==p.type?[3,38]:(Object(o.b)({store:e,action:"customaction",triggerElementId:h,actionUid:p.uid}),[4,Object(d.k)(e,p,n)]);case 37:return _.sent(),[3,41];case 38:return"showWhisbiClient"!==p.type?[3,40]:(Object(o.b)({store:e,action:"showWhisbiClient",triggerElementId:h,actionUid:p.uid}),[4,Object(d.o)(e,p,n)]);case 39:return _.sent(),[3,41];case 40:Object(u.a)(p),_.label=41;case 41:return(j=Object(s.a)(p)).length>0&&Object(m.a)(e,h,j,p.uid),[3,43];case 42:return(C=_.sent())instanceof Error&&(e.setData({error:C.message}),console.error("Action failed ".concat(p.type),p,C),Object(l.c)(C)),[3,43];case 43:return a=i.next(),[3,1];case 44:return[3,47];case 45:return E=_.sent(),x={error:E},[3,47];case 46:try{a&&!a.done&&(D=i.return)&&D.call(i)}finally{if(x)throw x.error}return[7];case 47:return[2]}}))}))},w=n(85),O=function(e,t){return void 0!==e&&void 0!==t&&e.toString()===t.toString()},j=function(e,t){return void 0!==e&&void 0!==t&&parseFloat(e.toString())>parseFloat(t.toString())},C=function(e,t){return void 0!==e&&void 0!==t&&parseFloat(e.toString())>=parseFloat(t.toString())},E=function(e,t){return void 0!==e&&void 0!==t&&parseFloat(e.toString())0?(j=O.filter((function(e){return"url"===e.type})),C="button"===t.type||"text"===t.type?t.label:void 0,[4,Object(a.a)({type:"interactiondesigner:click",interactionId:e.data.info.interactionUuid,elementId:t.uid,elementType:t.type,elementName:t.name,elementLabel:C,clickHistory:e.data.elementClicks,urlActions:j.map((function(e){return{type:e.urlType,targetUrl:e.targetUrl}}))})]):[3,4]:[3,6]);case 3:k.sent(),e.setData({elementClicks:Object(r.m)(Object(r.m)([],Object(r.k)(e.data.elementClicks),!1),[t.uid],!1)}),e.setData({clicks:Object(r.m)(Object(r.m)([],Object(r.k)(e.data.clicks),!1),[t.name],!1)}),Object(o.b)({store:e,action:"events",triggerElementId:t.uid}),k.label=4;case 4:return[4,y(e,O,t)];case 5:k.sent(),k.label=6;case 6:return g=v.next(),[3,2];case 7:return[3,10];case 8:return E=k.sent(),x={error:E},[3,10];case 9:try{g&&!g.done&&(D=v.return)&&D.call(v)}finally{if(x)throw x.error}return[7];case 10:return[2]}}))}))}var z=function(e,t){var n=[];return t.forEach((function(e){var t=[[]];e.conditionGroups.forEach((function(e){var n;"OR"===(null!==(n=e.operator)&&void 0!==n?n:"AND")&&t.push([]);var r=t.length>0?t.length-1:0;e.conditions.forEach((function(e){"OR"===e.operator?(t.push(t[r].slice()),r++,t[r].pop(),t[r].push(e.condition)):t[r].push(e.condition)}))})),t.forEach((function(t){n.push({events:t,actions:e.actions})}))})),n};function V(e,t,n){if("click"===n.type){Object(o.b)({store:e,action:"click",triggerElementId:t.uid});var r=e.data.project.workflowUid,i="button"===t.type&&t.label?t.label:t.name;Object(o.a)({store:e,workflowUid:r,action:"".concat(t.type," | ").concat(i),dim2:t.uid})}U(e,t,[n]).catch((function(e){console.error("Error while running events",t,e)}))}},46:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"g",(function(){return a})),n.d(t,"e",(function(){return u})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"i",(function(){return l})),n.d(t,"h",(function(){return d})),n.d(t,"k",(function(){return f})),n.d(t,"d",(function(){return p})),n.d(t,"j",(function(){return h}));var r=n(53),i="https://editor-development.staging.giosg.com"===document.location.origin?"development":/https:\/\/\w+\.staging\.giosg\.com/.test(document.location.origin)?"staging":"https://interactiondesigner.giosg.com"===document.location.origin||"https://interactionbuilder.giosg.com"===document.location.origin||document.location.origin.includes("translation-review")?"production":"unknown",o="production"===i?"https://service.giosg.com":"staging"===i||"development"===i?"https://service-staging.giosg.com":"https://service.giosg.com",a="production"===i?"https://globalcdn.interactiondesigner.giosg.com/thumbnails":"staging"===i?"https://ib-thumbnails.staging.giosg.app/thumbnails":"localhost"===i?"http://localhost:4010/thumbnails":"",u="".concat(o,"/api"),s=window.location.origin,c=s+"/api",l="staging"===i||"development"===i?"https://api.preview.staging.giosg.com":"https://api.preview.giosg.com",d="production"===i?r.c:"staging"===i||"development"===i?"https://service-staging.giosg.com/identity/authorize":"".concat("https://service.giosg.com","/identity/authorize"),f=function(e){return"https://".concat(e,"staging"===i||"development"===i?".preview.staging.giosg.com":".preview.giosg.com")},p="staging"===i||"development"===i?"https://api-staging.giosg.com":"https://api.giosg.com",h="staging"===i||"development"===i||"localhost"===i?"https://frontend-pre.s3-eu-west-1.amazonaws.com":"https://static.whisbi.com"},47:function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(1),i=n(394);var o=function(e){return!(e.data.info.editing||"advert"===e.environment.runtime)},a=function(e){void 0===e&&(e=!1);var t="".concat(window.location.hostname).concat(window.location.pathname);return e||(t+=window.location.search),t=(t=t.replace(/^www\./i,"")).replace(/\/$/,"")},u=function(e,t){if(e.reportingPageloadFlag&&0===e.data.reportingSequenceNumber||!e.reportingPageloadFlag){!function(e){e.setData({reportingSequenceNumber:++e.data.reportingSequenceNumber})}(e);var n=t.uid;c({store:e,action:"showview",triggerElementId:n});var i=e.data.project.workflowUid;if(i){var o={workflowUid:i,dim2:n};l(Object(r.a)(Object(r.a)({},o),{store:e,action:"".concat(t.type," | ").concat(e.currentView.name)}))}}e.reportingPageloadFlag&&(e.reportingPageloadFlag=!1)},s=function(e,t){c({store:e,action:"hideview",triggerElementId:t.uid})};function c(e){var t=e.store,n=e.value,a=e.action,u=e.triggerElementId,s=e.dim3,c=e.dim4,l=e.actionUid,d=e.workflowUid;return Object(r.e)(this,void 0,void 0,(function(){var e,f,p,h,b,v,g;return Object(r.h)(this,(function(r){switch(r.label){case 0:return e=t.data,f=e.info,p=e.currentViewId,h=[],b=void 0,o(t)?("showview"===a?(s=t.currentView.name,c=t.data.reportingSequenceUid,b=t.data.reportingSequenceNumber.toString()):b=l,[4,t.environment.getSessionId()]):[2];case 1:return v=r.sent(),[4,t.environment.getUnpackedVisitorCid()];case 2:return g=r.sent(),h.push({event_version:3,organization_id:f.organizationUid,category:"widget",action:a,label:d||f.interactionUuid,value:null!=n?n:1,vendor:"com.giosg.editor",visitor_id:g,session_id:v,dim1:p,dim2:u,dim3:s,dim4:c,dim5:b}),f.publishedAt?(Object(i.a)(t.environment.getBreweryEventsUrl(),h),[2]):(console.info("Interaction generic event data",h),[2])}}))}))}function l(e){var t=e.store,n=e.workflowUid,u=e.vendor,s=void 0===u?"com.giosg.editor":u,c=e.action,l=e.stepName,d=e.dim2,f=e.dim3;return Object(r.e)(this,void 0,void 0,(function(){var e,u,p,h,b,v,g,m;return Object(r.h)(this,(function(y){switch(y.label){case 0:return e=t.data,u=e.info,p=e.reportingSequenceUid,h=[],n&&o(t)&&function(e,t){var n=e.getAllElements().find((function(e){return e.uid===t}));return null==n?void 0:n.isWorkflowReportingEnabled}(t,d)?[4,t.environment.getSessionId()]:[2];case 1:return b=y.sent(),[4,t.environment.getUnpackedVisitorCid()];case 2:return v=y.sent(),g={event_version:1,organization_id:u.organizationUid,category:"workflowReportingEvent",action:"unknown",vendor:s,visitor_id:v,session_id:b,label:n,value:1,dim1:p,dim2:d,dim3:f},0===t.data.reportingCustomSequenceNumber&&h.push(Object(r.a)(Object(r.a)({},g),{action:a(),dim4:"Source",dim5:"0"})),function(e){e.setData({reportingCustomSequenceNumber:++e.data.reportingCustomSequenceNumber})}(t),m=t.data.reportingCustomSequenceNumber,h.push(Object(r.a)(Object(r.a)({},g),{action:c,dim4:l,dim5:null==m?void 0:m.toString()})),u.publishedAt?(Object(i.a)(t.environment.getBreweryEventsUrl(),h),[2]):(console.info("Interaction custom event data",h),[2])}}))}))}},472:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}));var r={shapeType:"rectangle",opacity:1,shadowApplied:!1,shadowBlur:0,shadowPosX:0,shadowPosY:0,shadowSpread:0,borderApplied:!1,borderColor:{a:1,b:0,g:0,r:0},borderStyle:"solid",borderWidth:1,shadowColor:{a:.5,b:0,g:0,r:0},borderRadius:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},backgroundColorApplied:!0,backgroundColor:{r:193,g:193,b:201,a:1},backgroundImageSize:"contain",backgroundImageApplied:!1,backgroundImage:void 0,backgroundImageGiosgAssetUrl:void 0},i={shapeType:"rectangle",opacity:1,shadowApplied:!1,shadowBlur:0,shadowPosX:0,shadowPosY:0,shadowSpread:0,borderApplied:!1,borderColor:{a:0,b:0,g:0,r:0},borderStyle:"solid",borderWidth:1,shadowColor:{a:0,b:0,g:0,r:0},borderRadius:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},backgroundColorApplied:!1,backgroundColor:{a:0,r:255,g:255,b:255},backgroundImageSize:"contain",backgroundImageApplied:!1,backgroundImage:void 0,backgroundImageGiosgAssetUrl:void 0},o={shapeType:"circle",opacity:1,shadowApplied:!1,shadowBlur:0,shadowPosX:0,shadowPosY:0,shadowSpread:0,borderApplied:!1,borderColor:{a:1,b:0,g:0,r:0},borderStyle:"solid",borderWidth:1,shadowColor:{a:.5,b:0,g:0,r:0},borderRadius:{topLeft:80,topRight:80,bottomLeft:80,bottomRight:80},backgroundColorApplied:!0,backgroundColor:{r:193,g:193,b:201,a:1},backgroundImageSize:"contain",backgroundImageApplied:!1,backgroundImage:void 0,backgroundImageGiosgAssetUrl:void 0}},475:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(142),i={width:375,height:414,heightWithWhitelabel:446,backgroundOffsetY:-75,backgroundOffsetX:-24,backgroundWidth:423,backgroundHeight:624},o=function(e,t,n){return{chat_preview:{width:i.width,height:t?i.heightWithWhitelabel:i.height},mobile1:{width:320,height:568},mobile2:{width:768,height:1024},desktop1:{width:1440,height:1024},desktop2:{width:1366,height:768},resize:{width:(null==n?void 0:n.width)||800,height:(null==n?void 0:n.height)||500}}[e||r.a]}},476:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return s}));var r=n(331),i=1920;function o(e,t){var n=window.visualViewport,r=e.height*(11/15),o=(e.width-r)/2,a=o/e.width*100;return{clipPathLeft:a,clipPathRight:100-a,curtainWidth:o,height:t?"".concat(i*t,"px"):n?"".concat(n.height.toString(),"px"):"100%"}}var a=function(e,t){return{"--plyr-color-main":e||"#7357FF","--plyr-control-icon-size":t?"".concat(t,"px"):"18px"}},u=function(e){var t=new Date,n=new Date(e),r=Math.round((t.getTime()-n.getTime())/1e3);return Math.max(r,0)},s=function(e){var t,n={low:{enableWorker:!0,lowLatencyMode:!0,testBandwidth:!0,maxLiveSyncPlaybackRate:1.7,liveSyncDuration:2,liveMaxLatencyDuration:5,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0,liveDurationInfinity:!0,startLevel:-1},optimized:{enableWorker:!0,lowLatencyMode:!0,maxLiveSyncPlaybackRate:1.7,liveSyncDurationCount:3,liveMaxLatencyDurationCount:5,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0,abrBandWidthUpFactor:4,abrBandWidthFactor:6,liveDurationInfinity:!0,startLevel:-1},high:{enableWorker:!0,lowLatencyMode:!0,maxLiveSyncPlaybackRate:1.7,liveSyncDurationCount:2,liveMaxLatencyDurationCount:5,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0,abrBandWidthUpFactor:4,abrBandWidthFactor:6,liveDurationInfinity:!0,startLevel:-1},test:{enableWorker:!0,abrEwmaDefaultEstimate:6e5,testBandwidth:!1,abrBandWidthUpFactor:4,abrBandWidthFactor:6,lowLatencyMode:!0,maxBufferSize:60,maxBufferLength:30,liveSyncDurationCount:2,liveDurationInfinity:!0,maxLiveSyncPlaybackRate:1.7,startLevel:-1}},i=e.qualityPreset,o=i&&null!==(t=n[i])&&void 0!==t?t:n.optimized;for(var a in r.e){var u=e.qualityPreset;null!==u&&(o[r.e[a]]=u)}return o}},477:function(e,t,n){"use strict";e.exports=function(e){if(e=String(e||""),i.test(e))return"rtl";if(o.test(e))return"ltr";return"neutral"};var r="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",i=new RegExp("^[^"+r+"]*[֑-߿יִ-﷽ﹰ-ﻼ]"),o=new RegExp("^[^֑-߿יִ-﷽ﹰ-ﻼ]*["+r+"]")},48:function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(605)},482:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r="https://api.giosg.com/events/v2/store/internal",i="https://api.giosg.com/events/v2/store/external"},483:function(e,t,n){"use strict";function r(e){if(window.parent&&window.parent!==window.self&&window.parent.postMessage)try{window.parent.postMessage(JSON.stringify(e),"*")}catch(e){}}n.d(t,"a",(function(){return r}))},490:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return d}));const r=Symbol("Comlink.proxy"),i=Symbol("Comlink.endpoint"),o=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.thrown"),u=e=>"object"==typeof e&&null!==e||"function"==typeof e,s=new Map([["proxy",{canHandle:e=>u(e)&&e[r],serialize(e){const{port1:t,port2:n}=new MessageChannel;return c(e,t),[n,[n]]},deserialize:e=>(e.start(),d(e))}],["throw",{canHandle:e=>u(e)&&a in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function c(e,t=self){t.addEventListener("message",(function n(i){if(!i||!i.data)return;const{id:o,type:u,path:s}=Object.assign({path:[]},i.data),d=(i.data.argumentList||[]).map(v);let f;try{const t=s.slice(0,-1).reduce((e,t)=>e[t],e),n=s.reduce((e,t)=>e[t],e);switch(u){case 0:f=n;break;case 1:t[s.slice(-1)[0]]=v(i.data.value),f=!0;break;case 2:f=n.apply(t,d);break;case 3:f=function(e){return Object.assign(e,{[r]:!0})}(new n(...d));break;case 4:{const{port1:t,port2:n}=new MessageChannel;c(e,n),f=function(e,t){return h.set(e,t),e}(t,[t])}break;case 5:f=void 0}}catch(e){f={value:e,[a]:0}}Promise.resolve(f).catch(e=>({value:e,[a]:0})).then(e=>{const[r,i]=b(e);t.postMessage(Object.assign(Object.assign({},r),{id:o}),i),5===u&&(t.removeEventListener("message",n),l(t))})})),t.start&&t.start()}function l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function d(e,t){return function e(t,n=[],r=function(){}){let a=!1;const u=new Proxy(r,{get(r,i){if(f(a),i===o)return()=>g(t,{type:5,path:n.map(e=>e.toString())}).then(()=>{l(t),a=!0});if("then"===i){if(0===n.length)return{then:()=>u};const e=g(t,{type:0,path:n.map(e=>e.toString())}).then(v);return e.then.bind(e)}return e(t,[...n,i])},set(e,r,i){f(a);const[o,u]=b(i);return g(t,{type:1,path:[...n,r].map(e=>e.toString()),value:o},u).then(v)},apply(r,o,u){f(a);const s=n[n.length-1];if(s===i)return g(t,{type:4}).then(v);if("bind"===s)return e(t,n.slice(0,-1));const[c,l]=p(u);return g(t,{type:2,path:n.map(e=>e.toString()),argumentList:c},l).then(v)},construct(e,r){f(a);const[i,o]=p(r);return g(t,{type:3,path:n.map(e=>e.toString()),argumentList:i},o).then(v)}});return u}(e,[],t)}function f(e){if(e)throw new Error("Proxy has been released and is not useable")}function p(e){const t=e.map(b);return[t.map(e=>e[0]),(n=t.map(e=>e[1]),Array.prototype.concat.apply([],n))];var n}const h=new WeakMap;function b(e){for(const[t,n]of s)if(n.canHandle(e)){const[r,i]=n.serialize(e);return[{type:3,name:t,value:r},i]}return[{type:0,value:e},h.get(e)||[]]}function v(e){switch(e.type){case 3:return s.get(e.name).deserialize(e.value);case 0:return e.value}}function g(e,t,n){return new Promise(r=>{const i=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");e.addEventListener("message",(function t(n){n.data&&n.data.id&&n.data.id===i&&(e.removeEventListener("message",t),r(n.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:i},t),n)})}},491:function(e,t,n){"use strict";var r=n(1),i=n(8),o=n(341),a=n(46),u=n(214),s=n(342),c=n(122),l=function(e){function t(t,n,a,s,l,d,f,p,h,b,v,g){var m=e.call(this,t,b,f?function(e){return Object(r.e)(m,void 0,void 0,(function(){return Object(r.h)(this,(function(t){switch(t.label){case 0:return[4,this.editorApi.themeUpdate(this.project.groupId,e.uid,e)];case 1:return t.sent()?[2,void 0]:[3,2];case 2:return[4,this.editorApi.theme(this.project.groupId,e.uid)];case 3:return[2,t.sent()]}}))}))}:void 0)||this;Object.defineProperty(m,"fullInfo",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(m,"editorApi",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(m,"giosgApi",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(m,"proxyApi",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(m,"workflowsApi",{enumerable:!0,configurable:!0,writable:!0,value:l}),Object.defineProperty(m,"me",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(m,"groupIsReadwrite",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(m,"collectionName",{enumerable:!0,configurable:!0,writable:!0,value:p}),Object.defineProperty(m,"exit",{enumerable:!0,configurable:!0,writable:!0,value:h}),Object.defineProperty(m,"versionStore",{enumerable:!0,configurable:!0,writable:!0,value:v}),Object.defineProperty(m,"features",{enumerable:!0,configurable:!0,writable:!0,value:g}),Object.defineProperty(m,"giosgIntegrationFetcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(m,"customFonts",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(m,"currentElementStyleUid",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object(i.z)(m),Object(o.a)(m.project,(function(){m.isChanged=!0})),m.giosgIntegrationFetcher=c.b.getGiosgIntegrationFetcher(a,l,d),Object(u.b)(m.project,m.versionStore);var y=m.project.theme.themeStyles.find((function(e){return"button"===e.elementType}));return m.currentElementStyleUid=null==y?void 0:y.uid,m}return Object(r.g)(t,e),Object.defineProperty(t.prototype,"resetCustomFonts",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this.customFonts.forEach((function(t,n){e.customFonts.delete(n)}))}}),Object.defineProperty(t.prototype,"loadCustomFonts",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Object(r.e)(this,void 0,void 0,(function(){var t,n,i=this;return Object(r.h)(this,(function(o){switch(o.label){case 0:if(this.customFonts.has(e.uid))return[3,8];if(!("url"in e))return[3,5];o.label=1;case 1:return o.trys.push([1,3,,4]),t=new FontFace(e.uid,"url(".concat(e.url,")")),this.customFonts.set(e.uid,"loading"),[4,t.load()];case 2:return o.sent(),document.fonts.add(t),this.customFonts.set(e.uid,"loaded"),[3,4];case 3:return o.sent(),this.customFonts.set(e.uid,"error"),[3,4];case 4:return[3,8];case 5:return o.trys.push([5,7,,8]),n=e.urls.map((function(t){return Object(r.e)(i,void 0,void 0,(function(){var n,i,o;return Object(r.h)(this,(function(r){switch(r.label){case 0:return[4,this.proxyApi.proxyTo(t.src)];case 1:return n=r.sent().subdomain,[4,(i=new FontFace(e.uid,"url(".concat(Object(a.k)(n),")"),{unicodeRange:null!==(o=t.unicodeRange)&&void 0!==o?o:void 0})).load()];case 2:return r.sent(),document.fonts.add(i),[2]}}))}))})),this.customFonts.set(e.uid,"loading"),[4,Promise.all(n)];case 6:return o.sent(),this.customFonts.set(e.uid,"loaded"),[3,8];case 7:return o.sent(),this.customFonts.set(e.uid,"error"),[3,8];case 8:return[2]}}))}))}}),Object.defineProperty(t.prototype,"fetchCustomFonts",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return e.map((function(e){return t.loadCustomFonts(e),{font:e,status:t.customFonts.get(e.uid)}}))}}),Object.defineProperty(t.prototype,"theme",{get:function(){return this.project.theme},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentElementStyle",{get:function(){var e=this;return this.theme.themeStyles.find((function(t){return t.uid===e.currentElementStyleUid}))},enumerable:!1,configurable:!0}),Object(r.f)([i.A,Object(r.j)("design:type",Object)],t.prototype,"customFonts",void 0),Object(r.f)([i.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"theme",null),Object(r.f)([i.A,Object(r.j)("design:type",Object)],t.prototype,"currentElementStyleUid",void 0),Object(r.f)([i.k,Object(r.j)("design:type",Object),Object(r.j)("design:paramtypes",[])],t.prototype,"currentElementStyle",null),t}(s.a);t.a=l},5:function(e,t,n){"use strict";n.d(t,"a",(function(){return Ie})),n.d(t,"b",(function(){return De})),n.d(t,"c",(function(){return Se})),n.d(t,"d",(function(){return Fe})),n.d(t,"e",(function(){return pe})),n.d(t,"f",(function(){return Le})),n.d(t,"g",(function(){return Ee})),n.d(t,"h",(function(){return ze})),n.d(t,"i",(function(){return $e})),n.d(t,"j",(function(){return Dt})),n.d(t,"k",(function(){return yr}));var r=n(72);function i(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:p(e)?2:h(e)?3:0}function c(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function l(e,t){return 2===s(e)?e.get(t):e[t]}function d(e,t,n){var r=s(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e){return z&&e instanceof Map}function h(e){return V&&e instanceof Set}function b(e){return e.o||e.t}function v(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Y(e);delete t[q];for(var n=K(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=m),Object.freeze(e),t&&u(e,(function(e,t){return g(t,!0)}),!0)),e}function m(){i(2)}function y(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function w(e){var t=X[e];return t||i(18,e),t}function O(){return L}function j(e,t){t&&(w("Patches"),e.u=[],e.s=[],e.v=t)}function C(e){E(e),e.p.forEach(D),e.p=null}function E(e){e===L&&(L=e.l)}function x(e){return L={p:[],l:L,h:e,m:!0,_:0}}function D(e){var t=e[q];0===t.i||1===t.i?t.j():t.O=!0}function k(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||w("ES5").S(t,e,r),r?(n[q].P&&(C(t),i(4)),a(e)&&(e=_(t,e),t.l||S(t,e)),t.u&&w("Patches").M(n[q].t,e,t.u,t.s)):e=_(t,n,[]),C(t),t.u&&t.v(t.u,t.s),e!==H?e:void 0}function _(e,t,n){if(y(t))return t;var r=t[q];if(!r)return u(t,(function(i,o){return A(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return S(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=v(r.k):r.o;u(3===r.i?new Set(i):i,(function(t,o){return A(e,r,i,t,o,n)})),S(e,i,!1),n&&e.u&&w("Patches").R(r,n,e.u,e.s)}return r.o}function A(e,t,n,r,i,u){if(o(i)){var s=_(e,i,u&&t&&3!==t.i&&!c(t.D,r)?u.concat(r):void 0);if(d(n,r,s),!o(s))return;e.m=!1}if(a(i)&&!y(i)){if(!e.h.F&&e._<1)return;_(e,i),t&&t.A.l||S(e,i)}}function S(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&g(t,n)}function B(e,t){var n=e[q];return(n?b(n):e)[t]}function P(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function F(e){e.P||(e.P=!0,e.l&&F(e.l))}function T(e){e.o||(e.o=v(e.t))}function I(e,t,n){var r=p(t)?w("MapSet").N(t,n):h(t)?w("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:O(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=J;n&&(i=[r],o=Q);var a=Proxy.revocable(i,o),u=a.revoke,s=a.proxy;return r.k=s,r.j=u,s}(t,n):w("ES5").J(t,n);return(n?n.A:O()).p.push(r),r}function N(e){return o(e)||i(22,e),function e(t){if(!a(t))return t;var n,r=t[q],i=s(t);if(r){if(!r.P&&(r.i<4||!w("ES5").K(r)))return r.t;r.I=!0,n=R(t,i),r.I=!1}else n=R(t,i);return u(n,(function(t,i){r&&l(r.t,t)===i||d(n,t,e(i))})),3===i?new Set(n):n}(e)}function R(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return v(e)}var M,L,U="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),z="undefined"!=typeof Map,V="undefined"!=typeof Set,W="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=U?Symbol.for("immer-nothing"):((M={})["immer-nothing"]=!0,M),G=U?Symbol.for("immer-draftable"):"__$immer_draftable",q=U?Symbol.for("immer-state"):"__$immer_state",$=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),K="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Y=Object.getOwnPropertyDescriptors||function(e){var t={};return K(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},X={},J={get:function(e,t){if(t===q)return e;var n=b(e);if(!c(n,t))return function(e,t,n){var r,i=P(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!a(r)?r:r===B(e.t,t)?(T(e),e.o[t]=I(e.A.h,r,e)):r},has:function(e,t){return t in b(e)},ownKeys:function(e){return Reflect.ownKeys(b(e))},set:function(e,t,n){var r=P(b(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=B(b(e),t),o=null==i?void 0:i[q];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(f(n,i)&&(void 0!==n||c(e.t,t)))return!0;T(e),F(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==B(e.t,t)||t in e.t?(e.D[t]=!1,T(e),F(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=b(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){i(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){i(12)}},Q={};u(J,(function(e,t){Q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Q.deleteProperty=function(e,t){return Q.set.call(this,e,t,void 0)},Q.set=function(e,t,n){return J.set.call(this,e[0],t,n,e[0])};var Z=new(function(){function e(e){var t=this;this.g=W,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var u=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a1?r-1:0),o=1;o=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=w("Patches").$;return o(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}()),ee=Z.produce,te=(Z.produceWithPatches.bind(Z),Z.setAutoFreeze.bind(Z),Z.setUseProxies.bind(Z),Z.applyPatches.bind(Z),Z.createDraft.bind(Z)),ne=Z.finishDraft.bind(Z),re={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var i=pe.transform(n,t,{affinity:r});e.current=i,null==i&&e.unref()}}},ie={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var i=Le.transform(n,t,{affinity:r});e.current=i,null==i&&e.unref()}}},oe={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var i=Ee.transform(n,t,{affinity:r});e.current=i,null==i&&e.unref()}}},ae=new WeakMap,ue=new WeakMap,se=new WeakMap,ce=new WeakMap,le=new WeakMap,de=new WeakMap,fe=new WeakMap,pe={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=pe.levels(e,t);return r=n?r.slice(1):r.slice(0,-1)},common(e,t){for(var n=[],r=0;rt[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),o=e[n],a=t[n];return pe.equals(r,i)&&o>a},endsAt(e,t){var n=e.length,r=e.slice(0,n),i=t.slice(0,n);return pe.equals(r,i)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),o=e[n],a=t[n];return pe.equals(r,i)&&oe.length===t.length&&e.every((e,n)=>e===t[n]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===pe.compare(e,t),isAncestor:(e,t)=>e.length-1===pe.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===pe.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===pe.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===pe.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===pe.compare(e,t),isPath:e=>Array.isArray(e)&&(0===e.length||"number"==typeof e[0]),isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&pe.equals(n,r)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=[],i=0;i<=e.length;i++)r.push(e.slice(0,i));return n&&r.reverse(),r},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!pe.isAncestor(t,e)&&!pe.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var r=[...e],{affinity:i="forward"}=n;if(0===e.length)return r;switch(t.type){case"insert_node":var{path:o}=t;(pe.equals(o,r)||pe.endsBefore(o,r)||pe.isAncestor(o,r))&&(r[o.length-1]+=1);break;case"remove_node":var{path:a}=t;if(pe.equals(a,r)||pe.isAncestor(a,r))return null;pe.endsBefore(a,r)&&(r[a.length-1]-=1);break;case"merge_node":var{path:u,position:s}=t;pe.equals(u,r)||pe.endsBefore(u,r)?r[u.length-1]-=1:pe.isAncestor(u,r)&&(r[u.length-1]-=1,r[u.length]+=s);break;case"split_node":var{path:c,position:l}=t;if(pe.equals(c,r)){if("forward"===i)r[r.length-1]+=1;else if("backward"!==i)return null}else pe.endsBefore(c,r)?r[c.length-1]+=1:pe.isAncestor(c,r)&&e[c.length]>=l&&(r[c.length-1]+=1,r[c.length]-=l);break;case"move_node":var{path:d,newPath:f}=t;if(pe.equals(d,f))return r;if(pe.isAncestor(d,r)||pe.equals(d,r)){var p=f.slice();return pe.endsBefore(d,f)&&d.length{switch(n.type){case"insert_node":var{path:r,node:i}=n,o=Se.parent(e,r),a=r[r.length-1];if(a>o.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(o.children.splice(a,0,i),t)for(var[u,s]of Ee.points(t))t[s]=Le.transform(u,n);break;case"insert_text":var{path:c,offset:l,text:d}=n;if(0===d.length)break;var f=Se.leaf(e,c),p=f.text.slice(0,l),h=f.text.slice(l);if(f.text=p+d+h,t)for(var[b,v]of Ee.points(t))t[v]=Le.transform(b,n);break;case"merge_node":var{path:g}=n,m=Se.get(e,g),y=pe.previous(g),w=Se.get(e,y),O=Se.parent(e,g),j=g[g.length-1];if($e.isText(m)&&$e.isText(w))w.text+=m.text;else{if($e.isText(m)||$e.isText(w))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(g,"] to nodes of different interfaces: ").concat(ze.stringify(m)," ").concat(ze.stringify(w)));w.children.push(...m.children)}if(O.children.splice(j,1),t)for(var[C,E]of Ee.points(t))t[E]=Le.transform(C,n);break;case"move_node":var{path:x,newPath:D}=n;if(pe.isAncestor(x,D))throw new Error("Cannot move a path [".concat(x,"] to new path [").concat(D,"] because the destination is inside itself."));var k=Se.get(e,x),_=Se.parent(e,x),A=x[x.length-1];_.children.splice(A,1);var S=pe.transform(x,n),B=Se.get(e,pe.parent(S)),P=S[S.length-1];if(B.children.splice(P,0,k),t)for(var[F,T]of Ee.points(t))t[T]=Le.transform(F,n);break;case"remove_node":var{path:I}=n,N=I[I.length-1];if(Se.parent(e,I).children.splice(N,1),t)for(var[R,M]of Ee.points(t)){var L=Le.transform(R,n);if(null!=t&&null!=L)t[M]=L;else{var U=void 0,z=void 0;for(var[V,W]of Se.texts(e)){if(-1!==pe.compare(W,I)){z=[V,W];break}U=[V,W]}var H=!1;U&&z&&(H=pe.equals(z[1],I)?!pe.hasPrevious(z[1]):pe.common(U[1],I).length{for(var n in e){var i=e[n],o=t[n];if(Object(r.a)(i)&&Object(r.a)(o)){if(!we(i,o))return!1}else if(Array.isArray(i)&&Array.isArray(o)){if(i.length!==o.length)return!1;for(var a=0;a=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var je=["anchor","focus"];function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ee={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:i}=e;return Ee.isBackward(e)===n?[r,i]:[i,r]},end(e){var[,t]=Ee.edges(e);return t},equals:(e,t)=>Le.equals(e.anchor,t.anchor)&&Le.equals(e.focus,t.focus),includes(e,t){if(Ee.isRange(t)){if(Ee.includes(e,t.anchor)||Ee.includes(e,t.focus))return!0;var[n,r]=Ee.edges(e),[i,o]=Ee.edges(t);return Le.isBefore(n,i)&&Le.isAfter(r,o)}var[a,u]=Ee.edges(e),s=!1,c=!1;return Le.isPoint(t)?(s=Le.compare(t,a)>=0,c=Le.compare(t,u)<=0):(s=pe.compare(t,a.path)>=0,c=pe.compare(t,u.path)<=0),s&&c},intersection(e,t){var n=Oe(e,je),[r,i]=Ee.edges(e),[o,a]=Ee.edges(t),u=Le.isBefore(r,o)?o:r,s=Le.isBefore(i,a)?i:a;return Le.isBefore(s,u)?null:function(e){for(var t=1;t!Ee.isCollapsed(e),isForward:e=>!Ee.isBackward(e),isRange:e=>Object(r.a)(e)&&Le.isPoint(e.anchor)&&Le.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Ee.edges(e);return t},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ee(e,e=>{if(null===e)return null;var r,i,{affinity:o="inward"}=n;if("inward"===o){var a=Ee.isCollapsed(e);Ee.isForward(e)?(r="forward",i=a?r:"backward"):(r="backward",i=a?r:"forward")}else"outward"===o?Ee.isForward(e)?(r="backward",i="forward"):(r="forward",i="backward"):(r=o,i=o);var u=Le.transform(e.anchor,t,{affinity:r}),s=Le.transform(e.focus,t,{affinity:i});if(!u||!s)return null;e.anchor=u,e.focus=s})}},xe=e=>Object(r.a)(e)&&Se.isNodeList(e.children)&&!Ie.isEditor(e),De={isAncestor:e=>Object(r.a)(e)&&Se.isNodeList(e.children),isElement:xe,isElementList:e=>Array.isArray(e)&&e.every(e=>De.isElement(e)),isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return xe(e)&&e[n]===t},matches(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},ke=["children"],_e=["text"],Ae=new WeakMap,Se={ancestor(e,t){var n=Se.get(e,t);if($e.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(ze.stringify(n)));return n},*ancestors(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var r of pe.ancestors(t,n)){var i=[Se.ancestor(e,r),r];yield i}},child(e,t){if($e.isText(e))throw new Error("Cannot get the child of a text node: ".concat(ze.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(ze.stringify(e)));return n},*children(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{reverse:r=!1}=n,i=Se.ancestor(e,t),{children:o}=i,a=r?o.length-1:0;r?a>=0:a1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of Se.nodes(e,t))0!==r.length&&(yield[n,r])},*elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of Se.nodes(e,t))De.isElement(n)&&(yield[n,r])},extractProps:e=>De.isAncestor(e)?Oe(e,ke):Oe(e,_e),first(e,t){for(var n=t.slice(),r=Se.get(e,n);r&&!$e.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if($e.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(ze.stringify(e)));return ee({children:e.children},e=>{var[n,r]=Ee.edges(t),i=Se.nodes(e,{reverse:!0,pass:e=>{var[,n]=e;return!Ee.includes(t,n)}});for(var[,o]of i){if(!Ee.includes(t,o)){var a=Se.parent(e,o),u=o[o.length-1];a.children.splice(u,1)}if(pe.equals(o,r.path)){var s=Se.leaf(e,o);s.text=s.text.slice(0,r.offset)}if(pe.equals(o,n.path)){var c=Se.leaf(e,o);c.text=c.text.slice(n.offset)}}Ie.isEditor(e)&&(e.selection=null)}).children},get(e,t){for(var n=e,r=0;r$e.isText(e)||De.isElement(e)||Ie.isEditor(e),isNodeList(e){if(!Array.isArray(e))return!1;var t=Ae.get(e);if(void 0!==t)return t;var n=e.every(e=>Se.isNode(e));return Ae.set(e,n),n},last(e,t){for(var n=t.slice(),r=Se.get(e,n);r&&!$e.isText(r)&&0!==r.children.length;){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(e,t){var n=Se.get(e,t);if(!$e.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(ze.stringify(n)));return n},*levels(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var r of pe.levels(t,n)){var i=Se.get(e,r);yield[i,r]}},matches:(e,t)=>De.isElement(e)&&De.isElementProps(t)&&De.matches(e,t)||$e.isText(e)&&$e.isTextProps(t)&&$e.matches(e,t),*nodes(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{pass:n,reverse:r=!1}=t,{from:i=[],to:o}=t,a=new Set,u=[],s=e;!o||!(r?pe.isBefore(u,o):pe.isAfter(u,o));)if(a.has(s)||(yield[s,u]),a.has(s)||$e.isText(s)||0===s.children.length||null!=n&&!1!==n([s,u])){if(0===u.length)break;if(!r){var c=pe.next(u);if(Se.has(e,c)){u=c,s=Se.get(e,u);continue}}if(r&&0!==u[u.length-1])u=pe.previous(u),s=Se.get(e,u);else u=pe.parent(u),s=Se.get(e,u),a.add(s)}else{a.add(s);var l=r?s.children.length-1:0;pe.isAncestor(u,i)&&(l=i[u.length]),u=u.concat(l),s=Se.get(e,u)}},parent(e,t){var n=pe.parent(t),r=Se.get(e,n);if($e.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:e=>$e.isText(e)?e.text:e.children.map(Se.string).join(""),*texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of Se.nodes(e,t))$e.isText(n)&&(yield[n,r])}};function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;tFe.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!Object(r.a)(e))return!1;switch(e.type){case"insert_node":return pe.isPath(e.path)&&Se.isNode(e.node);case"insert_text":return"number"==typeof e.offset&&"string"==typeof e.text&&pe.isPath(e.path);case"merge_node":return"number"==typeof e.position&&pe.isPath(e.path)&&Object(r.a)(e.properties);case"move_node":return pe.isPath(e.path)&&pe.isPath(e.newPath);case"remove_node":return pe.isPath(e.path)&&Se.isNode(e.node);case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&pe.isPath(e.path);case"set_node":return pe.isPath(e.path)&&Object(r.a)(e.properties)&&Object(r.a)(e.newProperties);case"set_selection":return null===e.properties&&Ee.isRange(e.newProperties)||null===e.newProperties&&Ee.isRange(e.properties)||Object(r.a)(e.properties)&&Object(r.a)(e.newProperties);case"split_node":return pe.isPath(e.path)&&"number"==typeof e.position&&Object(r.a)(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(e=>Fe.isOperation(e)),isSelectionOperation:e=>Fe.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>Fe.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return Pe(Pe({},e),{},{type:"remove_node"});case"insert_text":return Pe(Pe({},e),{},{type:"remove_text"});case"merge_node":return Pe(Pe({},e),{},{type:"split_node",path:pe.previous(e.path)});case"move_node":var{newPath:t,path:n}=e;if(pe.equals(t,n))return e;if(pe.isSibling(n,t))return Pe(Pe({},e),{},{path:t,newPath:n});var r=pe.transform(n,e),i=pe.transform(pe.next(n),e);return Pe(Pe({},e),{},{path:r,newPath:i});case"remove_node":return Pe(Pe({},e),{},{type:"insert_node"});case"remove_text":return Pe(Pe({},e),{},{type:"insert_text"});case"set_node":var{properties:o,newProperties:a}=e;return Pe(Pe({},e),{},{properties:a,newProperties:o});case"set_selection":var{properties:u,newProperties:s}=e;return Pe(Pe({},e),{},null==u?{properties:s,newProperties:null}:null==s?{properties:null,newProperties:u}:{properties:s,newProperties:u});case"split_node":return Pe(Pe({},e),{},{type:"merge_node",path:pe.next(e.path)})}}},Te=new WeakMap,Ie={above:(e,t)=>e.above(t),addMark(e,t,n){e.addMark(t,n)},after:(e,t,n)=>e.after(t,n),before:(e,t,n)=>e.before(t,n),deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges:(e,t)=>e.edges(t),elementReadOnly(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:(e,t)=>e.end(t),first:(e,t)=>e.first(t),fragment:(e,t)=>e.fragment(t),hasBlocks:(e,t)=>e.hasBlocks(t),hasInlines:(e,t)=>e.hasInlines(t),hasPath:(e,t)=>e.hasPath(t),hasTexts:(e,t)=>e.hasTexts(t),insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>e.isBlock(t),isEdge:(e,t,n)=>e.isEdge(t,n),isEditor:e=>(e=>{var t=Te.get(e);if(void 0!==t)return t;if(!Object(r.a)(e))return!1;var n="function"==typeof e.addMark&&"function"==typeof e.apply&&"function"==typeof e.deleteFragment&&"function"==typeof e.insertBreak&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertText&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isInline&&"function"==typeof e.isSelectable&&"function"==typeof e.isVoid&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.removeMark&&"function"==typeof e.getDirtyPaths&&(null===e.marks||Object(r.a)(e.marks))&&(null===e.selection||Ee.isRange(e.selection))&&Se.isNodeList(e.children)&&Fe.isOperationList(e.operations);return Te.set(e,n),n})(e),isElementReadOnly:(e,t)=>e.isElementReadOnly(t),isEmpty:(e,t)=>e.isEmpty(t),isEnd:(e,t,n)=>e.isEnd(t,n),isInline:(e,t)=>e.isInline(t),isNormalizing:e=>e.isNormalizing(),isSelectable:(e,t)=>e.isSelectable(t),isStart:(e,t,n)=>e.isStart(t,n),isVoid:(e,t)=>e.isVoid(t),last:(e,t)=>e.last(t),leaf:(e,t,n)=>e.leaf(t,n),levels:(e,t)=>e.levels(t),marks:e=>e.getMarks(),next:(e,t)=>e.next(t),node:(e,t,n)=>e.node(t,n),nodes:(e,t)=>e.nodes(t),normalize(e,t){e.normalize(t)},parent:(e,t,n)=>e.parent(t,n),path:(e,t,n)=>e.path(t,n),pathRef:(e,t,n)=>e.pathRef(t,n),pathRefs:e=>e.pathRefs(),point:(e,t,n)=>e.point(t,n),pointRef:(e,t,n)=>e.pointRef(t,n),pointRefs:e=>e.pointRefs(),positions:(e,t)=>e.positions(t),previous:(e,t)=>e.previous(t),range:(e,t,n)=>e.range(t,n),rangeRef:(e,t,n)=>e.rangeRef(t,n),rangeRefs:e=>e.rangeRefs(),removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start:(e,t)=>e.start(t),string:(e,t,n)=>e.string(t,n),unhangRange:(e,t,n)=>e.unhangRange(t,n),void:(e,t)=>e.void(t),withoutNormalizing(e,t){e.withoutNormalizing(t)}},Ne={isSpan:e=>Array.isArray(e)&&2===e.length&&e.every(pe.isPath)};function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;tt.offset?1:0:n},isAfter:(e,t)=>1===Le.compare(e,t),isBefore:(e,t)=>-1===Le.compare(e,t),equals:(e,t)=>e.offset===t.offset&&pe.equals(e.path,t.path),isPoint:e=>Object(r.a)(e)&&"number"==typeof e.offset&&pe.isPath(e.path),transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ee(e,e=>{if(null===e)return null;var{affinity:r="forward"}=n,{path:i,offset:o}=e;switch(t.type){case"insert_node":case"move_node":e.path=pe.transform(i,t,n);break;case"insert_text":pe.equals(t.path,i)&&(t.offsetJSON.stringify(e,Ue)},Ve=["text"],We=["anchor","focus"];function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},{loose:r=!1}=n;function i(e){return Oe(e,Ve)}return we(r?i(e):e,r?i(t):t)},isText:e=>Object(r.a)(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every(e=>$e.isText(e)),isTextProps:e=>void 0!==e.text,matches(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[Ge({},e)];for(var r of t){var i=Oe(r,We),[o,a]=Ee.edges(r),u=[],s=0,c=o.offset,l=a.offset;for(var d of n){var{length:f}=d.text,p=s;if(s+=f,c<=p&&s<=l)Object.assign(d,i),u.push(d);else if(c!==l&&(c===s||l===p)||c>s||lp){var m=c-p;b=Ge(Ge({},h),{},{text:h.text.slice(0,m)}),h=Ge(Ge({},h),{},{text:h.text.slice(m)})}Object.assign(h,i),b&&u.push(b),u.push(h),v&&u.push(v)}}n=u}return n}},Ke=e=>e.selection?e.selection:e.children.length>0?Ie.end(e,[]):[0],Ye=(e,t)=>{var[n]=Ie.node(e,t);return e=>e===n},Xe=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!t,r=t?rt(e):e,i=qe.None,o=qe.None,a=0,u=null;for(var s of r){var c=s.codePointAt(0);if(!c)break;var l=bt(s,c);if([i,o]=n?[o,l]:[l,i],vt(i,qe.ZWJ)&&vt(o,qe.ExtPict)&&!wt(n?e.substring(0,a):e.substring(0,e.length-a)))break;if(vt(i,qe.RI)&&vt(o,qe.RI)&&!(u=null!==u?!u:!!n||jt(e.substring(0,e.length-a))))break;if(i!==qe.None&&o!==qe.None&&mt(i,o))break;a+=s.length}return a||1},Je=/\s/,Qe=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Ze=/['\u2018\u2019]/,et=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var i=Xe(e,t),[o,a]=tt(e,i,t);if(nt(o,a,t))r=!0,n+=i;else{if(r)break;n+=i}e=a}return n},tt=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},nt=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Je.test(t))return!1;if(Ze.test(t)){var i=Xe(n,r),[o,a]=tt(n,i,r);if(e(o,a,r))return!0}return!Qe.test(t)},rt=function*(e){for(var t=e.length-1,n=0;ne>=55296&&e<=56319,ot=e=>e>=56320&&e<=57343;!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(qe||(qe={}));var at=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,ut=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,st=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,ct=/^[\u1100-\u115F\uA960-\uA97C]$/,lt=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,dt=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,ft=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,pt=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,ht=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,bt=(e,t)=>{var n=qe.Any;return-1!==e.search(at)&&(n|=qe.Extend),8205===t&&(n|=qe.ZWJ),t>=127462&&t<=127487&&(n|=qe.RI),-1!==e.search(ut)&&(n|=qe.Prepend),-1!==e.search(st)&&(n|=qe.SpacingMark),-1!==e.search(ct)&&(n|=qe.L),-1!==e.search(lt)&&(n|=qe.V),-1!==e.search(dt)&&(n|=qe.T),-1!==e.search(ft)&&(n|=qe.LV),-1!==e.search(pt)&&(n|=qe.LVT),-1!==e.search(ht)&&(n|=qe.ExtPict),n};function vt(e,t){return 0!=(e&t)}var gt=[[qe.L,qe.L|qe.V|qe.LV|qe.LVT],[qe.LV|qe.V,qe.V|qe.T],[qe.LVT|qe.T,qe.T],[qe.Any,qe.Extend|qe.ZWJ],[qe.Any,qe.SpacingMark],[qe.Prepend,qe.Any],[qe.ZWJ,qe.ExtPict],[qe.RI,qe.RI]];function mt(e,t){return-1===gt.findIndex(n=>vt(e,n[0])&&vt(t,n[1]))}var yt=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,wt=e=>-1!==e.search(yt),Ot=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,jt=e=>{var t=e.match(Ot);return null!==t&&t[0].length/2%2==1},Ct={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ie.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:i=Ke(e)}=n;if(pe.isPath(i)&&(i=Ie.range(e,i)),Ee.isRange(i))if(Ee.isCollapsed(i))i=i.anchor;else{var o=Ee.end(i);if(!r&&Ie.void(e,{at:o}))return;var a=Ee.start(i),u=Ie.pointRef(e,a),s=Ie.pointRef(e,o);Dt.delete(e,{at:i,voids:r});var c=u.unref(),l=s.unref();i=c||l,Dt.setSelection(e,{anchor:i,focus:i})}if(!(!r&&Ie.void(e,{at:i})||Ie.elementReadOnly(e,{at:i}))){var{path:d,offset:f}=i;t.length>0&&e.apply({type:"insert_text",path:d,offset:f,text:t})}})}};function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xt(e){for(var t=1;t{for(var n of Ie.pathRefs(e))re.transform(n,t);for(var r of Ie.pointRefs(e))ie.transform(r,t);for(var i of Ie.rangeRefs(e))oe.transform(i,t);var o,a,u=ae.get(e)||[],s=ue.get(e)||new Set,c=e=>{if(e){var t=e.join(",");a.has(t)||(a.add(t),o.push(e))}};if(pe.operationCanTransformPath(t))for(var l of(o=[],a=new Set,u)){c(pe.transform(l,t))}else o=u,a=s;var d=e.getDirtyPaths(t);for(var f of d)c(f);ae.set(e,o),ue.set(e,a),Dt.transform(e,t),e.operations.push(t),Ie.normalize(e,{operation:t}),"set_selection"===t.type&&(e.marks=null),se.get(e)||(se.set(e,!0),Promise.resolve().then(()=>{se.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},_t=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":var{path:n}=t;return pe.levels(n);case"insert_node":var{node:r,path:i}=t;return[...pe.levels(i),...$e.isText(r)?[]:Array.from(Se.nodes(r),e=>{var[,t]=e;return i.concat(t)})];case"merge_node":var{path:o}=t;return[...pe.ancestors(o),pe.previous(o)];case"move_node":var{path:a,newPath:u}=t;if(pe.equals(a,u))return[];var s=[],c=[];for(var l of pe.ancestors(a)){var d=pe.transform(l,t);s.push(d)}for(var f of pe.ancestors(u)){var p=pe.transform(f,t);c.push(p)}var h=c[c.length-1],b=u[u.length-1],v=h.concat(b);return[...s,...c,v];case"remove_node":var{path:g}=t;return[...pe.ancestors(g)];case"split_node":var{path:m}=t;return[...pe.levels(m),pe.next(m)];default:return[]}},At=e=>{var{selection:t}=e;return t?Se.fragment(e,t):[]},St=(e,t)=>{var[n,r]=t;if(!$e.isText(n))if(De.isElement(n)&&0===n.children.length){Dt.insertNodes(e,{text:""},{at:r.concat(0),voids:!0})}else for(var i=!Ie.isEditor(n)&&(De.isElement(n)&&(e.isInline(n)||0===n.children.length||$e.isText(n.children[0])||e.isInline(n.children[0]))),o=0,a=0;a{var{iteration:n,initialDirtyPathsLength:r}=t,i=42*r;if(n>i)throw new Error("Could not completely normalize the editor after ".concat(i," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},Pt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:i=e.selection,match:o}=t;if(i){var a=Ie.path(e,i),u="lowest"===r;for(var[s,c]of Ie.levels(e,{at:a,voids:n,match:o,reverse:u}))if(!$e.isText(s))if(Ee.isRange(i)){if(pe.isAncestor(c,i.anchor.path)&&pe.isAncestor(c,i.focus.path))return[s,c]}else if(!pe.equals(a,c))return[s,c]}};function Ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t{var{selection:r}=e;if(r){var i=(t,n)=>{if(!$e.isText(t))return!1;var[r,i]=Ie.parent(e,n);return!e.isVoid(r)||e.markableVoid(r)},o=Ee.isExpanded(r),a=!1;if(!o){var[u,s]=Ie.node(e,r);if(u&&i(u,s)){var[c]=Ie.parent(e,s);a=c&&e.markableVoid(c)}}if(o||a)Dt.setNodes(e,{[t]:n},{match:i,split:!0,voids:!0});else{var l=Tt(Tt({},Ie.marks(e)||{}),{},{[t]:n});e.marks=l,se.get(e)||e.onChange()}}};function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},i=Ie.point(e,t,{edge:"end"}),o=Ie.end(e,[]),a={anchor:i,focus:o},{distance:u=1}=r,s=0;for(var c of Ie.positions(e,Rt(Rt({},r),{},{at:a}))){if(s>u)break;0!==s&&(n=c),s++}return n};function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},i=Ie.start(e,[]),o=Ie.point(e,t,{edge:"start"}),a={anchor:i,focus:o},{distance:u=1}=r,s=0;for(var c of Ie.positions(e,Ut(Ut({},r),{},{at:a,reverse:!0}))){if(s>u)break;0!==s&&(n=c),s++}return n},Vt=(e,t)=>{var{selection:n}=e;n&&Ee.isCollapsed(n)&&Dt.delete(e,{unit:t,reverse:!0})},Wt=(e,t)=>{var{selection:n}=e;n&&Ee.isCollapsed(n)&&Dt.delete(e,{unit:t})},Ht=function(e){var{direction:t="forward"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=e;n&&Ee.isExpanded(n)&&Dt.delete(e,{reverse:"backward"===t})},Gt=(e,t)=>[Ie.start(e,t),Ie.end(e,t)];function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $t(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return Ie.above(e,$t($t({},t),{},{match:t=>De.isElement(t)&&Ie.isElementReadOnly(e,t)}))},Yt=(e,t)=>Ie.point(e,t,{edge:"end"}),Xt=(e,t)=>{var n=Ie.path(e,t,{edge:"start"});return Ie.node(e,n)},Jt=(e,t)=>{var n=Ie.range(e,t);return Se.fragment(e,n)};function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return Ie.above(e,Zt(Zt({},t),{},{match:t=>De.isElement(t)&&Ie.isVoid(e,t)}))},tn=(e,t)=>t.children.some(t=>De.isElement(t)&&Ie.isBlock(e,t)),nn=(e,t)=>t.children.some(t=>$e.isText(t)||Ie.isInline(e,t)),rn=(e,t)=>Se.has(e,t),on=(e,t)=>t.children.every(e=>$e.isText(e)),an=e=>{Dt.splitNodes(e,{always:!0})},un=(e,t,n)=>{Dt.insertNodes(e,t,n)},sn=e=>{Dt.splitNodes(e,{always:!0})};function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},{selection:r,marks:i}=e;if(r){if(i){var o=ln({text:t},i);Dt.insertNodes(e,o,{at:n.at,voids:n.voids})}else Dt.insertText(e,t,n);e.marks=null}},fn=(e,t)=>!e.isInline(t),pn=(e,t,n)=>Ie.isStart(e,t,n)||Ie.isEnd(e,t,n),hn=(e,t)=>{var{children:n}=t,[r]=n;return 0===n.length||1===n.length&&$e.isText(r)&&""===r.text&&!e.isVoid(t)},bn=(e,t,n)=>{var r=Ie.end(e,n);return Le.equals(t,r)},vn=e=>{var t=ce.get(e);return void 0===t||t},gn=(e,t,n)=>{if(0!==t.offset)return!1;var r=Ie.start(e,n);return Le.equals(t,r)},mn=(e,t)=>{var n=Ie.path(e,t,{edge:"end"});return Ie.node(e,n)},yn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ie.path(e,t,n),i=Se.leaf(e,r);return[i,r]};function*wn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,reverse:r=!1,voids:i=!1}=t,{match:o}=t;if(null==o&&(o=()=>!0),n){var a=[],u=Ie.path(e,n);for(var[s,c]of Se.levels(e,u))if(o(s,c)&&(a.push([s,c]),!i&&De.isElement(s)&&Ie.isVoid(e,s)))break;r&&a.reverse(),yield*a}}var On=["text"],jn=["text"],Cn=function(e){var{marks:t,selection:n}=e;if(!n)return null;if(t)return t;if(Ee.isExpanded(n)){var[r]=Ie.nodes(e,{match:$e.isText});if(r){var[i]=r;return Oe(i,On)}return{}}var{anchor:o}=n,{path:a}=o,[u]=Ie.leaf(e,a);if(0===o.offset){var s=Ie.previous(e,{at:a,match:$e.isText});if(!Ie.above(e,{match:t=>De.isElement(t)&&Ie.isVoid(e,t)&&e.markableVoid(t)})){var c=Ie.above(e,{match:t=>De.isElement(t)&&Ie.isBlock(e,t)});if(s&&c){var[l,d]=s,[,f]=c;pe.isAncestor(f,d)&&(u=l)}}}return Oe(u,jn)},En=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(o){var a=Ie.after(e,o,{voids:r});if(a){var[,u]=Ie.last(e,[]),s=[a.path,u];if(pe.isPath(o)&&0===o.length)throw new Error("Cannot get the next node from the root node!");if(null==i)if(pe.isPath(o)){var[c]=Ie.parent(e,o);i=e=>c.children.includes(e)}else i=()=>!0;var[l]=Ie.nodes(e,{at:s,match:i,mode:n,voids:r});return l}}},xn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ie.path(e,t,n),i=Se.get(e,r);return[i,r]};function*Dn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,mode:r="all",universal:i=!1,reverse:o=!1,voids:a=!1,ignoreNonSelectable:u=!1}=t,{match:s}=t;if(s||(s=()=>!0),n){var c,l;if(Ne.isSpan(n))c=n[0],l=n[1];else{var d=Ie.path(e,n,{edge:"start"}),f=Ie.path(e,n,{edge:"end"});c=o?f:d,l=o?d:f}var p,h=Se.nodes(e,{reverse:o,from:c,to:l,pass:t=>{var[n]=t;return!!De.isElement(n)&&(!(a||!Ie.isVoid(e,n)&&!Ie.isElementReadOnly(e,n))||!(!u||Ie.isSelectable(e,n)))}}),b=[];for(var[v,g]of h)if(!u||!De.isElement(v)||Ie.isSelectable(e,v)){var m=p&&0===pe.compare(g,p[1]);if("highest"!==r||!m)if(s(v,g))if("lowest"===r&&m)p=[v,g];else{var y="lowest"===r?p:[v,g];y&&(i?b.push(y):yield y),p=[v,g]}else if(i&&!m&&$e.isText(v))return}"lowest"===r&&p&&(i?b.push(p):yield p),i&&(yield*b)}}var kn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{force:n=!1,operation:r}=t,i=e=>ae.get(e)||[],o=e=>ue.get(e)||new Set,a=e=>{var t=i(e).pop(),n=t.join(",");return o(e).delete(n),t};if(Ie.isNormalizing(e)){if(n){var u=Array.from(Se.nodes(e),e=>{var[,t]=e;return t}),s=new Set(u.map(e=>e.join(",")));ae.set(e,u),ue.set(e,s)}0!==i(e).length&&Ie.withoutNormalizing(e,()=>{for(var t of i(e))if(Se.has(e,t)){var n=Ie.node(e,t),[o,u]=n;De.isElement(o)&&0===o.children.length&&e.normalizeNode(n,{operation:r})}for(var s=i(e),c=s.length,l=0;0!==s.length;){if(!e.shouldNormalize({dirtyPaths:s,iteration:l,initialDirtyPathsLength:c,operation:r}))return;var d=a(e);if(Se.has(e,d)){var f=Ie.node(e,d);e.normalizeNode(f,{operation:r})}l++,s=i(e)}})}},_n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ie.path(e,t,n),i=pe.parent(r),o=Ie.node(e,i);return o},An=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:t}=i;return Ie.pathRefs(e).delete(i),i.current=null,t}},o=Ie.pathRefs(e);return o.add(i),i},Sn=e=>{var t=le.get(e);return t||(t=new Set,le.set(e,t)),t},Bn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{depth:r,edge:i}=n;if(pe.isPath(t))if("start"===i){var[,o]=Se.first(e,t);t=o}else if("end"===i){var[,a]=Se.last(e,t);t=a}return Ee.isRange(t)&&(t="start"===i?Ee.start(t):"end"===i?Ee.end(t):pe.common(t.anchor.path,t.focus.path)),Le.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t},Pn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:t}=i;return Ie.pointRefs(e).delete(i),i.current=null,t}},o=Ie.pointRefs(e);return o.add(i),i},Fn=e=>{var t=de.get(e);return t||(t=new Set,de.set(e,t)),t},Tn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{edge:r="start"}=n;if(pe.isPath(t)){var i;if("end"===r){var[,o]=Se.last(e,t);i=o}else{var[,a]=Se.first(e,t);i=a}var u=Se.get(e,i);if(!$e.isText(u))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:i,offset:"end"===r?u.text.length:0}}if(Ee.isRange(t)){var[s,c]=Ee.edges(t);return"start"===r?s:c}return t};function*In(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,unit:r="offset",reverse:i=!1,voids:o=!1,ignoreNonSelectable:a=!1}=t;if(n){var u=Ie.range(e,n),[s,c]=Ee.edges(u),l=i?c:s,d=!1,f="",p=0,h=0,b=0;for(var[v,g]of Ie.nodes(e,{at:n,reverse:i,voids:o,ignoreNonSelectable:a})){if(De.isElement(v)){if(!o&&(e.isVoid(v)||e.isElementReadOnly(v))){yield Ie.start(e,g);continue}if(e.isInline(v))continue;if(Ie.hasInlines(e,v)){var m=pe.isAncestor(g,c.path)?c:Ie.end(e,g),y=pe.isAncestor(g,s.path)?s:Ie.start(e,g);f=Ie.string(e,{anchor:y,focus:m},{voids:o}),d=!0}}if($e.isText(v)){var w=pe.equals(g,l.path);for(w?(h=i?l.offset:v.text.length-l.offset,b=l.offset):(h=v.text.length,b=i?h:0),(w||d||"offset"===r)&&(yield{path:g,offset:b},d=!1);;){if(0===p){if(""===f)break;p=O(f,r,i),f=tt(f,p,i)[1]}if(b=i?b-p:b+p,(h-=p)<0){p=-h;break}p=0,yield{path:g,offset:b}}}}}function O(e,t,n){return"character"===t?Xe(e,n):"word"===t?et(e,n):"line"===t||"block"===t?e.length:1}}var Nn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(o){var a=Ie.before(e,o,{voids:r});if(a){var[,u]=Ie.first(e,[]),s=[a.path,u];if(pe.isPath(o)&&0===o.length)throw new Error("Cannot get the previous node from the root node!");if(null==i)if(pe.isPath(o)){var[c]=Ie.parent(e,o);i=e=>c.children.includes(e)}else i=()=>!0;var[l]=Ie.nodes(e,{reverse:!0,at:s,match:i,mode:n,voids:r});return l}}},Rn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:t}=i;return Ie.rangeRefs(e).delete(i),i.current=null,t}},o=Ie.rangeRefs(e);return o.add(i),i},Mn=e=>{var t=fe.get(e);return t||(t=new Set,fe.set(e,t)),t},Ln=(e,t,n)=>Ee.isRange(t)&&!n?t:{anchor:Ie.start(e,t),focus:Ie.end(e,n||t)};function Un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var zn=(e,t)=>{var{selection:n}=e;if(n){var r=(t,n)=>{if(!$e.isText(t))return!1;var[r,i]=Ie.parent(e,n);return!e.isVoid(r)||e.markableVoid(r)},i=Ee.isExpanded(n),o=!1;if(!i){var[a,u]=Ie.node(e,n);if(a&&r(a,u)){var[s]=Ie.parent(e,u);o=s&&e.markableVoid(s)}}if(i||o)Dt.unsetNodes(e,t,{match:r,split:!0,voids:!0});else{var c=function(e){for(var t=1;t{ce.set(e,t)},Wn=(e,t)=>Ie.point(e,t,{edge:"start"}),Hn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,i=Ie.range(e,t),[o,a]=Ee.edges(i),u="";for(var[s,c]of Ie.nodes(e,{at:i,match:$e.isText,voids:r})){var l=s.text;pe.equals(c,a.path)&&(l=l.slice(0,a.offset)),pe.equals(c,o.path)&&(l=l.slice(o.offset)),u+=l}return u},Gn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,[i,o]=Ee.edges(t);if(0!==i.offset||0!==o.offset||Ee.isCollapsed(t)||pe.hasPrevious(o.path))return t;var a=Ie.above(e,{at:o,match:t=>De.isElement(t)&&Ie.isBlock(e,t),voids:r}),u=a?a[1]:[],s=Ie.start(e,i),c={anchor:s,focus:o},l=!0;for(var[d,f]of Ie.nodes(e,{at:c,match:$e.isText,reverse:!0,voids:r}))if(l)l=!1;else if(""!==d.text||pe.isBefore(f,u)){o={path:f,offset:d.text.length};break}return{anchor:i,focus:o}},qn=(e,t)=>{var n=Ie.isNormalizing(e);Ie.setNormalizing(e,!1);try{t()}finally{Ie.setNormalizing(e,n)}Ie.normalize(e)},$n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ie.withoutNormalizing(e,()=>{var n,r,{reverse:i=!1,unit:o="character",distance:a=1,voids:u=!1}=t,{at:s=e.selection,hanging:c=!1}=t;if(s){var l=!1;if(Ee.isRange(s)&&Ee.isCollapsed(s)&&(l=!0,s=s.anchor),Le.isPoint(s)){var d=Ie.void(e,{at:s,mode:"highest"});if(!u&&d){var[,f]=d;s=f}else{var p={unit:o,distance:a};s={anchor:s,focus:i?Ie.before(e,s,p)||Ie.start(e,[]):Ie.after(e,s,p)||Ie.end(e,[])},c=!0}}if(pe.isPath(s))Dt.removeNodes(e,{at:s,voids:u});else if(!Ee.isCollapsed(s)){if(!c){var[,h]=Ee.edges(s),b=Ie.end(e,[]);Le.equals(h,b)||(s=Ie.unhangRange(e,s,{voids:u}))}var[v,g]=Ee.edges(s),m=Ie.above(e,{match:t=>De.isElement(t)&&Ie.isBlock(e,t),at:v,voids:u}),y=Ie.above(e,{match:t=>De.isElement(t)&&Ie.isBlock(e,t),at:g,voids:u}),w=m&&y&&!pe.equals(m[1],y[1]),O=pe.equals(v.path,g.path),j=u?null:null!==(n=Ie.void(e,{at:v,mode:"highest"}))&&void 0!==n?n:Ie.elementReadOnly(e,{at:v,mode:"highest"}),C=u?null:null!==(r=Ie.void(e,{at:g,mode:"highest"}))&&void 0!==r?r:Ie.elementReadOnly(e,{at:g,mode:"highest"});if(j){var E=Ie.before(e,v);E&&m&&pe.isAncestor(m[1],E.path)&&(v=E)}if(C){var x=Ie.after(e,g);x&&y&&pe.isAncestor(y[1],x.path)&&(g=x)}var D,k=[];for(var _ of Ie.nodes(e,{at:s,voids:u})){var[A,S]=_;D&&0===pe.compare(S,D)||(!u&&De.isElement(A)&&(Ie.isVoid(e,A)||Ie.isElementReadOnly(e,A))||!pe.isCommon(S,v.path)&&!pe.isCommon(S,g.path))&&(k.push(_),D=S)}var B=Array.from(k,t=>{var[,n]=t;return Ie.pathRef(e,n)}),P=Ie.pointRef(e,v),F=Ie.pointRef(e,g),T="";if(!O&&!j){var I=P.current,[N]=Ie.leaf(e,I),{path:R}=I,{offset:M}=v,L=N.text.slice(M);L.length>0&&(e.apply({type:"remove_text",path:R,offset:M,text:L}),T=L)}if(B.reverse().map(e=>e.unref()).filter(e=>null!==e).forEach(t=>Dt.removeNodes(e,{at:t,voids:u})),!C){var U=F.current,[z]=Ie.leaf(e,U),{path:V}=U,W=O?v.offset:0,H=z.text.slice(W,g.offset);H.length>0&&(e.apply({type:"remove_text",path:V,offset:W,text:H}),T=H)}!O&&w&&F.current&&P.current&&Dt.mergeNodes(e,{at:F.current,hanging:!0,voids:u}),l&&i&&"character"===o&&T.length>1&&T.match(/[\u0E00-\u0E7F]+/)&&Dt.insertText(e,T.slice(0,T.length-a));var G=P.unref(),q=F.unref(),$=i?G||q:q||G;null==t.at&&$&&Dt.select(e,$)}}})},Kn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ie.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1}=n,{at:o=Ke(e)}=n;if(t.length){if(Ee.isRange(o))if(r||(o=Ie.unhangRange(e,o,{voids:i})),Ee.isCollapsed(o))o=o.anchor;else{var[,a]=Ee.edges(o);if(!i&&Ie.void(e,{at:a}))return;var u=Ie.pointRef(e,a);Dt.delete(e,{at:o}),o=u.unref()}else pe.isPath(o)&&(o=Ie.start(e,o));if(i||!Ie.void(e,{at:o})){var s=Ie.above(e,{at:o,match:t=>De.isElement(t)&&Ie.isInline(e,t),mode:"highest",voids:i});if(s){var[,c]=s;if(Ie.isEnd(e,o,c))o=Ie.after(e,c);else if(Ie.isStart(e,o,c)){o=Ie.before(e,c)}}var l=Ie.above(e,{match:t=>De.isElement(t)&&Ie.isBlock(e,t),at:o,voids:i}),[,d]=l,f=Ie.isStart(e,o,d),p=Ie.isEnd(e,o,d),h=f&&p,b=!f||f&&p,v=!p,[,g]=Se.first({children:t},[]),[,m]=Se.last({children:t},[]),y=[],w=t=>{var[n,r]=t;return!(0===r.length)&&(!!h||!(b&&pe.isAncestor(r,g)&&De.isElement(n)&&!e.isVoid(n)&&!e.isInline(n))&&!(v&&pe.isAncestor(r,m)&&De.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)))};for(var O of Se.nodes({children:t},{pass:w}))w(O)&&y.push(O);var j=[],C=[],E=[],x=!0,D=!1;for(var[k]of y)De.isElement(k)&&!e.isInline(k)?(x=!1,D=!0,C.push(k)):x?j.push(k):E.push(k);var[_]=Ie.nodes(e,{at:o,match:t=>$e.isText(t)||Ie.isInline(e,t),mode:"highest",voids:i}),[,A]=_,S=Ie.isStart(e,o,A),B=Ie.isEnd(e,o,A),P=Ie.pathRef(e,p&&!E.length?pe.next(d):d),F=Ie.pathRef(e,B?pe.next(A):A);Dt.splitNodes(e,{at:o,match:t=>D?De.isElement(t)&&Ie.isBlock(e,t):$e.isText(t)||Ie.isInline(e,t),mode:D?"lowest":"highest",always:D&&(!f||j.length>0)&&(!p||E.length>0),voids:i});var T,I=Ie.pathRef(e,!S||S&&B?pe.next(A):A);if(Dt.insertNodes(e,j,{at:I.current,match:t=>$e.isText(t)||Ie.isInline(e,t),mode:"highest",voids:i}),h&&!j.length&&C.length&&!E.length&&Dt.delete(e,{at:d,voids:i}),Dt.insertNodes(e,C,{at:P.current,match:t=>De.isElement(t)&&Ie.isBlock(e,t),mode:"lowest",voids:i}),Dt.insertNodes(e,E,{at:F.current,match:t=>$e.isText(t)||Ie.isInline(e,t),mode:"highest",voids:i}),!n.at)if(E.length>0&&F.current?T=pe.previous(F.current):C.length>0&&P.current?T=pe.previous(P.current):I.current&&(T=pe.previous(I.current)),T){var N=Ie.end(e,T);Dt.select(e,N)}I.unref(),P.unref(),F.unref()}}})},Yn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{edge:n="anchor"}=t,{selection:r}=e;if(r)if("anchor"===n)Dt.select(e,r.anchor);else if("focus"===n)Dt.select(e,r.focus);else if("start"===n){var[i]=Ee.edges(r);Dt.select(e,i)}else if("end"===n){var[,o]=Ee.edges(r);Dt.select(e,o)}},Xn=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},Jn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:i="character",reverse:o=!1}=t,{edge:a=null}=t;if(n){"start"===a&&(a=Ee.isBackward(n)?"focus":"anchor"),"end"===a&&(a=Ee.isBackward(n)?"anchor":"focus");var{anchor:u,focus:s}=n,c={distance:r,unit:i,ignoreNonSelectable:!0},l={};if(null==a||"anchor"===a){var d=o?Ie.before(e,u,c):Ie.after(e,u,c);d&&(l.anchor=d)}if(null==a||"focus"===a){var f=o?Ie.before(e,s,c):Ie.after(e,s,c);f&&(l.focus=f)}Dt.setSelection(e,l)}},Qn=(e,t)=>{var{selection:n}=e;if(t=Ie.range(e,t),n)Dt.setSelection(e,t);else{if(!Ee.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(ze.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}};function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function er(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},{selection:r}=e,{edge:i="both"}=n;if(r){"start"===i&&(i=Ee.isBackward(r)?"focus":"anchor"),"end"===i&&(i=Ee.isBackward(r)?"anchor":"focus");var{anchor:o,focus:a}=r,u="anchor"===i?o:a;Dt.setSelection(e,{["anchor"===i?"anchor":"focus"]:er(er({},u),t)})}},nr=(e,t)=>{var{selection:n}=e,r={},i={};if(n){for(var o in t)("anchor"===o&&null!=t.anchor&&!Le.equals(t.anchor,n.anchor)||"focus"===o&&null!=t.focus&&!Le.equals(t.focus,n.focus)||"anchor"!==o&&"focus"!==o&&t[o]!==n[o])&&(r[o]=n[o],i[o]=t[o]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:i})}},rr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ie.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:o="lowest"}=n,{at:a,match:u,select:s}=n;if(Se.isNode(t)&&(t=[t]),0!==t.length){var[c]=t;if(a||(a=Ke(e),s=!0),null==s&&(s=!1),Ee.isRange(a))if(r||(a=Ie.unhangRange(e,a,{voids:i})),Ee.isCollapsed(a))a=a.anchor;else{var[,l]=Ee.edges(a),d=Ie.pointRef(e,l);Dt.delete(e,{at:a}),a=d.unref()}if(Le.isPoint(a)){null==u&&(u=$e.isText(c)?e=>$e.isText(e):e.isInline(c)?t=>$e.isText(t)||Ie.isInline(e,t):t=>De.isElement(t)&&Ie.isBlock(e,t));var[f]=Ie.nodes(e,{at:a.path,match:u,mode:o,voids:i});if(!f)return;var[,p]=f,h=Ie.pathRef(e,p),b=Ie.isEnd(e,a,p);Dt.splitNodes(e,{at:a,match:u,mode:o,voids:i});var v=h.unref();a=b?pe.next(v):v}var g=pe.parent(a),m=a[a.length-1];if(i||!Ie.void(e,{at:g})){for(var y of t){var w=g.concat(m);m++,e.apply({type:"insert_node",path:w,node:y}),a=pe.next(a)}if(a=pe.previous(a),s){var O=Ie.end(e,a);O&&Dt.select(e,O)}}}})},ir=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ie.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r="lowest",voids:i=!1}=t,{match:o}=t;if(null==o&&(o=pe.isPath(n)?Ye(e,n):t=>De.isElement(t)&&Ie.isBlock(e,t)),n){var a=Ie.nodes(e,{at:n,match:o,mode:r,voids:i}),u=Array.from(a,t=>{var[,n]=t;return Ie.pathRef(e,n)});for(var s of u){var c=s.unref();if(c.length<2)throw new Error("Cannot lift node at a path [".concat(c,"] because it has a depth of less than `2`."));var l=Ie.node(e,pe.parent(c)),[d,f]=l,p=c[c.length-1],{length:h}=d.children;if(1===h){var b=pe.next(f);Dt.moveNodes(e,{at:c,to:b,voids:i}),Dt.removeNodes(e,{at:f,voids:i})}else if(0===p)Dt.moveNodes(e,{at:c,to:f,voids:i});else if(p===h-1){var v=pe.next(f);Dt.moveNodes(e,{at:c,to:v,voids:i})}else{var g=pe.next(c),m=pe.next(f);Dt.splitNodes(e,{at:g,voids:i}),Dt.moveNodes(e,{at:c,to:m,voids:i})}}}})},or=["text"],ar=["children"],ur=(e,t)=>{if(De.isElement(t)){var n=t;return!!Ie.isVoid(e,t)||1===n.children.length&&ur(e,n.children[0])}return!Ie.isEditor(t)},sr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ie.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:i=!1,voids:o=!1,mode:a="lowest"}=t;if(r){if(null==n)if(pe.isPath(r)){var[u]=Ie.parent(e,r);n=e=>u.children.includes(e)}else n=t=>De.isElement(t)&&Ie.isBlock(e,t);if(!i&&Ee.isRange(r)&&(r=Ie.unhangRange(e,r,{voids:o})),Ee.isRange(r))if(Ee.isCollapsed(r))r=r.anchor;else{var[,s]=Ee.edges(r),c=Ie.pointRef(e,s);Dt.delete(e,{at:r}),r=c.unref(),null==t.at&&Dt.select(e,r)}var[l]=Ie.nodes(e,{at:r,match:n,voids:o,mode:a}),d=Ie.previous(e,{at:r,match:n,voids:o,mode:a});if(l&&d){var[f,p]=l,[h,b]=d;if(0!==p.length&&0!==b.length){var v,g,m=pe.next(b),y=pe.common(p,b),w=pe.isSibling(p,b),O=Array.from(Ie.levels(e,{at:p}),e=>{var[t]=e;return t}).slice(y.length).slice(0,-1),j=Ie.above(e,{at:p,mode:"highest",match:t=>O.includes(t)&&ur(e,t)}),C=j&&Ie.pathRef(e,j[1]);if($e.isText(f)&&$e.isText(h)){var E=Oe(f,or);g=h.text.length,v=E}else{if(!De.isElement(f)||!De.isElement(h))throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(ze.stringify(f)," ").concat(ze.stringify(h)));E=Oe(f,ar);g=h.children.length,v=E}w||Dt.moveNodes(e,{at:p,to:m,voids:o}),C&&Dt.removeNodes(e,{at:C.current,voids:o}),De.isElement(h)&&Ie.isEmpty(e,h)||$e.isText(h)&&""===h.text&&0!==b[b.length-1]?Dt.removeNodes(e,{at:b,voids:o}):e.apply({type:"merge_node",path:m,position:g,properties:v}),C&&C.unref()}}}})},cr=(e,t)=>{Ie.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:i="lowest",voids:o=!1}=t,{match:a}=t;if(r){null==a&&(a=pe.isPath(r)?Ye(e,r):t=>De.isElement(t)&&Ie.isBlock(e,t));var u=Ie.pathRef(e,n),s=Ie.nodes(e,{at:r,match:a,mode:i,voids:o}),c=Array.from(s,t=>{var[,n]=t;return Ie.pathRef(e,n)});for(var l of c){var d=l.unref(),f=u.current;0!==d.length&&e.apply({type:"move_node",path:d,newPath:f}),u.current&&pe.isSibling(f,d)&&pe.isAfter(f,d)&&(u.current=pe.next(u.current))}u.unref()}})},lr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ie.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:i="lowest"}=t,{at:o=e.selection,match:a}=t;if(o){null==a&&(a=pe.isPath(o)?Ye(e,o):t=>De.isElement(t)&&Ie.isBlock(e,t)),!n&&Ee.isRange(o)&&(o=Ie.unhangRange(e,o,{voids:r}));var u=Ie.nodes(e,{at:o,match:a,mode:i,voids:r}),s=Array.from(u,t=>{var[,n]=t;return Ie.pathRef(e,n)});for(var c of s){var l=c.unref();if(l){var[d]=Ie.node(e,l);e.apply({type:"remove_node",path:l,node:d})}}}})},dr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ie.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection,compare:o,merge:a}=n,{hanging:u=!1,mode:s="lowest",split:c=!1,voids:l=!1}=n;if(i){if(null==r&&(r=pe.isPath(i)?Ye(e,i):t=>De.isElement(t)&&Ie.isBlock(e,t)),!u&&Ee.isRange(i)&&(i=Ie.unhangRange(e,i,{voids:l})),c&&Ee.isRange(i)){if(Ee.isCollapsed(i)&&Ie.leaf(e,i.anchor)[0].text.length>0)return;var d=Ie.rangeRef(e,i,{affinity:"inward"}),[f,p]=Ee.edges(i),h="lowest"===s?"lowest":"highest",b=Ie.isEnd(e,p,p.path);Dt.splitNodes(e,{at:p,match:r,mode:h,voids:l,always:!b});var v=Ie.isStart(e,f,f.path);Dt.splitNodes(e,{at:f,match:r,mode:h,voids:l,always:!v}),i=d.unref(),null==n.at&&Dt.select(e,i)}for(var[g,m]of(o||(o=(e,t)=>e!==t),Ie.nodes(e,{at:i,match:r,mode:s,voids:l}))){var y={},w={};if(0!==m.length){var O=!1;for(var j in t)"children"!==j&&"text"!==j&&o(t[j],g[j])&&(O=!0,g.hasOwnProperty(j)&&(y[j]=g[j]),a?null!=t[j]&&(w[j]=a(g[j],t[j])):null!=t[j]&&(w[j]=t[j]));O&&e.apply({type:"set_node",path:m,properties:y,newProperties:w})}}}})},fr=(e,t)=>{if(Ee.isCollapsed(t))return t.anchor;var[,n]=Ee.edges(t),r=Ie.pointRef(e,n);return Dt.delete(e,{at:t}),r.unref()},pr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ie.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection,height:a=0,always:u=!1}=t;if(null==i&&(i=t=>De.isElement(t)&&Ie.isBlock(e,t)),Ee.isRange(o)&&(o=fr(e,o)),pe.isPath(o)){var s=o,c=Ie.point(e,s),[l]=Ie.parent(e,s);i=e=>e===l,a=c.path.length-s.length+1,o=c,u=!0}if(o){var d,f=Ie.pointRef(e,o,{affinity:"backward"});try{var[p]=Ie.nodes(e,{at:o,match:i,mode:n,voids:r});if(!p)return;var h=Ie.void(e,{at:o,mode:"highest"});if(!r&&h){var[b,v]=h;if(De.isElement(b)&&e.isInline(b)){var g=Ie.after(e,v);if(!g){var m=pe.next(v);Dt.insertNodes(e,{text:""},{at:m,voids:r}),g=Ie.point(e,m)}o=g,u=!0}a=o.path.length-v.length+1,u=!0}d=Ie.pointRef(e,o);var y=o.path.length-a,[,w]=p,O=o.path.slice(0,y),j=0===a?o.offset:o.path[y]+0;for(var[C,E]of Ie.levels(e,{at:O,reverse:!0,voids:r})){var x=!1;if(E.length2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var i of t)r[i]=null;Dt.setNodes(e,r,n)},br=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ie.withoutNormalizing(e,()=>{var{mode:n="lowest",split:r=!1,voids:i=!1}=t,{at:o=e.selection,match:a}=t;if(o){null==a&&(a=pe.isPath(o)?Ye(e,o):t=>De.isElement(t)&&Ie.isBlock(e,t)),pe.isPath(o)&&(o=Ie.range(e,o));var u=Ee.isRange(o)?Ie.rangeRef(e,o):null,s=Ie.nodes(e,{at:o,match:a,mode:n,voids:i}),c=Array.from(s,t=>{var[,n]=t;return Ie.pathRef(e,n)}).reverse(),l=function(t){var n=t.unref(),[o]=Ie.node(e,n),a=Ie.range(e,n);r&&u&&(a=Ee.intersection(u.current,a)),Dt.liftNodes(e,{at:a,match:e=>De.isAncestor(o)&&o.children.includes(e),voids:i})};for(var d of c)l(d);u&&u.unref()}})};function vr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Ie.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:o=!1}=n,{match:a,at:u=e.selection}=n;if(u){if(null==a&&(a=pe.isPath(u)?Ye(e,u):e.isInline(t)?t=>De.isElement(t)&&Ie.isInline(e,t)||$e.isText(t):t=>De.isElement(t)&&Ie.isBlock(e,t)),i&&Ee.isRange(u)){var[s,c]=Ee.edges(u),l=Ie.rangeRef(e,u,{affinity:"inward"});Dt.splitNodes(e,{at:c,match:a,voids:o}),Dt.splitNodes(e,{at:s,match:a,voids:o}),u=l.unref(),null==n.at&&Dt.select(e,u)}var d=Array.from(Ie.nodes(e,{at:u,match:e.isInline(t)?t=>De.isElement(t)&&Ie.isBlock(e,t):e=>Ie.isEditor(e),mode:"lowest",voids:o}));for(var[,f]of d){var p=Ee.isRange(u)?Ee.intersection(u,Ie.range(e,f)):u;if(p){var h=Array.from(Ie.nodes(e,{at:p,match:a,mode:r,voids:o}));if(h.length>0)if("continue"===function(){var[n]=h,r=h[h.length-1],[,i]=n,[,a]=r;if(0===i.length&&0===a.length)return"continue";var u=pe.equals(i,a)?pe.parent(i):pe.common(i,a),s=Ie.range(e,i,a),c=Ie.node(e,u),[l]=c,d=u.length+1,f=pe.next(a.slice(0,d)),p=gr(gr({},t),{},{children:[]});Dt.insertNodes(e,p,{at:f,voids:o}),Dt.moveNodes(e,{at:s,match:e=>De.isAncestor(l)&&l.children.includes(e),to:f.concat(0),voids:o})}())continue}}}})},yr=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var t=arguments.length,n=new Array(t),r=0;rt.right.distance)&&o.push([{x:e.x+e.width,y:t.right.mid},{x:e.x+e.width+t.right.distance,y:t.right.mid},t.right.distance]),i&&"unchanged"!==i.x&&r&&"stretch"!==r.x&&o.push([{x:e.x,y:e.y+e.height/3},{x:e.x+e.width,y:e.y+e.height/3},e.width])),n.y&&(isFinite(t.top.distance)&&"unchanged"!==(null==i?void 0:i.y)&&(r?"start"===r.y||"stretch"===r.y:t.top.distance<=t.bottom.distance)&&o.push([{x:t.top.mid,y:e.y-t.top.distance},{x:t.top.mid,y:e.y},t.top.distance]),isFinite(t.bottom.distance)&&"unchanged"!==(null==i?void 0:i.y)&&(r?"end"===r.y||"stretch"===r.y:t.top.distance>t.bottom.distance)&&o.push([{x:t.bottom.mid,y:e.y+e.height},{x:t.bottom.mid,y:e.y+e.height+t.bottom.distance},t.bottom.distance]),i&&"unchanged"!==i.y&&r&&"stretch"!==r.y&&o.push([{x:e.x+e.width/3,y:e.y},{x:e.x+e.width/3,y:e.y+e.height},e.height])),o},d=function(e,t,n){var i=function(e){var r=e.x,i=e.y;return{x:(r+t.x)*n,y:(i+t.y)*n}};return e.map((function(e){var t=Object(r.k)(e,3),n=t[0],o=t[1],a=t[2];return[i(n),i(o),a||void 0]}))},f=function(e,t,n,u,s,c,f,p,h){var b=function(e,t,n){var a={x:0,y:0,width:e.width,height:e.height,constraintX:"view",constraintY:"view"},u=Object(r.m)([],Object(r.k)(t.map((function(t){var a=Object(i.e)(t,n);return Object(r.a)(Object(r.a)({},Object(o.c)(a,e)),{constraintX:a.xType,constraintY:a.yType})}))),!1);return Object(r.m)([a],Object(r.k)(u),!1)}(n,u,f),v=function(e,t){var n,i,o={distance:1/0,mid:0,constraint:"start"},a={distance:1/0,mid:0,constraint:"start"},u={distance:1/0,mid:0,constraint:"start"},s={distance:1/0,mid:0,constraint:"start"},c=function(e,t){return e.distance>=0&&e.distance="0"&&e<="9"?String.fromCharCode(e.charCodeAt(0)-"0".charCodeAt(0)+"g".charCodeAt(0)):e})).join("")}var u=function(e,t){return Object(r.a)({key:"player-styles-".concat(t),stylisPlugins:[o,i.v],container:e})}},52:function(e,t,n){"use strict";var r=n(79),i=n(168);function o(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.init(t,n)}return Object(u.a)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||f,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function y(e,t,n){var r=m(e,t,Object);r.obj[r.k]=n}function w(e,t){var n=m(e,t),r=n.obj,i=n.k;if(r)return r[i]}function O(e,t,n){var r=w(e,n);return void 0!==r?r:w(t,n)}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function C(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var E={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function x(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return E[e]})):e}var D="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;oo+a;)a++,s=i[u=r.slice(o,o+a).join(n)];if(void 0===s)return;if("string"==typeof s)return s;if(u&&"string"==typeof s[u])return s[u];var c=r.slice(o+a).join(n);return c?k(s,c,n):void 0}i=i[r[o]]}return i}}var _=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Object(a.a)(this,t),n=Object(s.a)(this,Object(c.a)(t).call(this)),D&&h.call(Object(l.a)(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),void 0===n.options.ignoreJSONStructure&&(n.options.ignoreJSONStructure=!0),n}return Object(d.a)(t,e),Object(u.a)(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."));var u=w(this.data,a);return u||!o||"string"!=typeof n?u:k(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),y(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},u=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(u=e.split("."))[1]),this.addNamespaces(t);var s=w(this.data,u)||{};r?j(s,n,i):s=o({},s,n),y(this.data,u,s),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?o({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(h),A={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))})),t}},S={},B=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,t),n=Object(s.a)(this,Object(c.a)(t).call(this)),D&&h.call(Object(l.a)(n)),g(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,Object(l.a)(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=p.create("translator"),n}return Object(d.a)(t,e),Object(u.a)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:i};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,n,i){var a=this;if("object"!==Object(r.a)(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var u=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],n),c=s.key,l=s.namespaces,d=l[l.length-1],f=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(p){var h=n.nsSeparator||this.options.nsSeparator;return d+h+c}return c}var b=this.resolve(e,n),v=b&&b.res,g=b&&b.usedKey||c,m=b&&b.exactUsedKey||c,y=Object.prototype.toString.apply(v),w=["[object Number]","[object Function]","[object RegExp]"],O=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,C="string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v;if(j&&v&&C&&w.indexOf(y)<0&&("string"!=typeof O||"[object Array]"!==y)){if(!n.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,v,o({},n,{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(u){var E="[object Array]"===y,x=E?[]:{},D=E?m:g;for(var k in v)if(Object.prototype.hasOwnProperty.call(v,k)){var _="".concat(D).concat(u).concat(k);x[k]=this.translate(_,o({},n,{joinArrays:!1,ns:l})),x[k]===_&&(x[k]=v[k])}v=x}}else if(j&&"string"==typeof O&&"[object Array]"===y)(v=v.join(O))&&(v=this.extendTranslation(v,e,n,i));else{var A=!1,S=!1,B=void 0!==n.count&&"string"!=typeof n.count,P=t.hasDefaultValue(n),F=B?this.pluralResolver.getSuffix(f,n.count):"",T=n["defaultValue".concat(F)]||n.defaultValue;!this.isValidLookup(v)&&P&&(A=!0,v=T),this.isValidLookup(v)||(S=!0,v=c);var I=n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,N=I&&S?void 0:v,R=P&&T!==v&&this.options.updateMissing;if(S||A||R){if(this.logger.log(R?"updateKey":"missingKey",f,d,c,R?T:v),u){var M=this.resolve(c,o({},n,{keySeparator:!1}));M&&M.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var L=[],U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&U&&U[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var s=a.extractFromKey(e,u),c=s.key;n=c;var l=s.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var d=void 0!==u.count&&"string"!=typeof u.count,f=void 0!==u.context&&("string"==typeof u.context||"number"==typeof u.context)&&""!==u.context,p=u.lngs?u.lngs:a.languageUtils.toResolveHierarchy(u.lng||a.language,u.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(o=e,!S["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(S["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){i=n;var o,s,l=c,p=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(p,c,n,e,u);else d&&(o=a.pluralResolver.getSuffix(n,u.count)),d&&f&&p.push(l+o),f&&p.push(l+="".concat(a.options.contextSeparator).concat(u.context)),d&&p.push(l+=o);for(;s=p.pop();)a.isValidLookup(t)||(r=s,t=a.getResource(n,e,s,u))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}]),t}(h);function P(e){return e.charAt(0).toUpperCase()+e.slice(1)}var F=function(){function e(t){Object(a.a)(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=p.create("languageUtils")}return Object(u.a)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=P(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))})),i}}]),e}(),T=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],I={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function N(){var e={};return T.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:I[t.fc]}}))})),e}var R=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,e),this.languageUtils=t,this.options=n,this.logger=p.create("pluralResolver"),this.rules=N()}return Object(u.a)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var i=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),o=r.numbers[i];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,e),this.logger=p.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Object(u.a)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:x,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?C(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?C(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?C(t.nestingPrefix):t.nestingPrefixEscaped||C("$t("),this.nestingSuffix=t.nestingSuffix?C(t.nestingSuffix):t.nestingSuffixEscaped||C(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,a,u,s=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var d=function(e){if(e.indexOf(s.formatSeparator)<0){var i=O(t,c,e);return s.alwaysFormat?s.format(i,void 0,n,o({},r,t,{interpolationkey:e})):i}var a=e.split(s.formatSeparator),u=a.shift().trim(),l=a.join(s.formatSeparator).trim();return s.format(O(t,c,u),l,n,o({},r,t,{interpolationkey:u}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach((function(t){for(u=0;i=t.regex.exec(e);){if(void 0===(a=d(i[1].trim())))if("function"==typeof f){var n=f(e,i,r);a="string"==typeof n?n:""}else{if(p){a=i[0];continue}s.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),a=""}else"string"==typeof a||s.useRawValueToEscape||(a=v(a));var o=t.safeValue(a);if(e=e.replace(i[0],o),p?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++u>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=o({},a);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0],i=(i=this.interpolate(i,u)).replace(/'/g,'"');try{u=JSON.parse(i),t&&(u=o({},t,u))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete u.defaultValue,e}for(u.applyPostProcessor=!1,delete u.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var d=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=d.shift(),c=d,l=!0}if((r=t(s.call(this,n[1].trim(),u),u))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=v(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return i.format(e,t,a.lng,o({},a,{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();var L=function(e){function t(e,n,r){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.a)(this,t),i=Object(s.a)(this,Object(c.a)(t).call(this)),D&&h.call(Object(l.a)(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=o,i.logger=p.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,o.backend,o),i}return Object(d.a)(t,e),Object(u.a)(t,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o=[],a=[],u=[],s=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var u="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[u]=2:i.state[u]<0||(1===i.state[u]?a.indexOf(u)<0&&a.push(u):(i.state[u]=1,r=!1,a.indexOf(u)<0&&a.push(u),o.indexOf(u)<0&&o.push(u),s.indexOf(t)<0&&s.push(t)))})),r||u.push(e)})),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:o,pending:a,toLoadLanguages:u,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,u,s,c,l,d;r=n.loaded,u=o,c=m(r,[i],Object),l=c.obj,d=c.k,l[d]=l[d]||[],s&&(l[d]=l[d].concat(u)),s||l[d].push(u),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(u,s){u&&s&&i<5?setTimeout((function(){r.read.call(r,e,t,n,i+1,2*o,a)}),o):a(u,s)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,o({},a,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(h);function U(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Object(r.a)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Object(r.a)(e[2])||"object"===Object(r.a)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function z(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function V(){}var W=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(Object(a.a)(this,t),e=Object(s.a)(this,Object(c.a)(t).call(this)),D&&h.call(Object(l.a)(e)),e.options=z(n),e.services={},e.logger=p,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),Object(s.a)(e,Object(l.a)(e));setTimeout((function(){e.init(n,r)}),0)}return e}return Object(d.a)(t,e),Object(u.a)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=o({},U(),this.options,z(t)),this.format=this.options.interpolation.format,n||(n=V),!this.options.isClone){this.modules.logger?p.init(r(this.modules.logger),this.options):p.init(null,this.options);var i=new F(this.options);this.store=new _(this.options.resources,this.options);var a=this.services;a.logger=p,a.resourceStore=this.store,a.languageUtils=i,a.pluralResolver=new R(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new M(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new L(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var s=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var l=b(),d=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:V,r=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)a(i);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(o,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=b();return e||(e=this.languages),t||(t=this.options.ns),n||(n=V),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&A.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=b();this.emit("languageChanging",e);var i=function(i){e||i||!n.services.languageDetector||(i=[]);var o="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,i){i?(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var i=this,a=function e(t,a){var u;if("object"!==Object(r.a)(a)){for(var s=arguments.length,c=new Array(s>2?s-2:0),l=2;l1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var u=n.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(r,e)||(!this.services.backendConnector.backend||!(!a(r,e)||i&&!a(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=b();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=b();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:V,i=o({},this.options,n,{isClone:!0}),a=new t(i),u=["store","services","language"];return u.forEach((function(t){a[t]=e[t]})),a.services=o({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new B(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r3)for(n=[n],r=3;r2&&(t.children=f.slice.call(arguments,2)),g(e.type,t,t.key||e.key,t.ref||e.ref)}function L(e){var t={},n={__c:"__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(t){e.value!==t.value&&r.some((function(e){e.context=t.value,C(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n}r={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return C(n.__E=n)}catch(t){e=t}throw e}},i=function(e){return null!=e&&void 0===e.constructor},w.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&h(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),C(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},w.prototype.render=y,o=[],a=0,u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=d,l=0},598:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1),i=n(107),o=n(60),a=n(26),u=n(4),s=n(12),c=n(74);var l=function(e,t){var n=function(e){return window.GiosgClient&&!window.GiosgClient.visitorCidDeferred&&function(e){return".giosg-chat-container"===e.mountSelector}(e)?window.GiosgClient._getInteractionRoot()||document.body:e.mountSelector&&document.querySelector(e.mountSelector)||document.body}(e),o=Object(i.useCallback)((function(){return null!=t?t:function(e,t){var n,r,i=void 0===(null===(r=null===(n=e.publishingSettings)||void 0===n?void 0:n[0])||void 0===r?void 0:r.interactionType);return{width:void 0!==e.mountSelector&&i?t instanceof ShadowRoot?t.host.clientWidth:t.clientWidth:window.innerWidth,height:void 0!==e.mountSelector&&i?e.mountAsInlineBlock?1/0:t instanceof ShadowRoot?t.host.clientHeight:t.clientHeight:window.innerHeight}}(e,n)}),[t,e,n]),a=Object(r.k)(Object(u.g)(o()),2),s=a[0],c=a[1];return Object(u.e)((function(){var e=function(){return c(o())},t=new ResizeObserver(e);return t.observe(n instanceof ShadowRoot?n.host:n),window.addEventListener("resize",e),function(){t.disconnect(),window.removeEventListener("resize",e)}}),[o,n]),Object(u.e)((function(){c(o())}),[o,null==t?void 0:t.height,null==t?void 0:t.width]),s},d=function(e){var t=e.store,n=e.view,i=e.innerRef,d=e.isDesignMode,v=t.data.project,g=u.b.useCss(),m=l(v,e.canvasSize),y=Object(a.f)(n,t.data.activeBreakpoint);Object(u.e)((function(){var e=t.getActiveBreakpointForWidth(m.width);t.data.activeBreakpoint!==e&&t.setData({activeBreakpoint:e})}),[t,m.width]);var w=function(e,t,n){var i,o=void 0!==t.mountSelector,a=o&&!!t.mountAsInlineBlock,u=!n&&!!(o?t.allowMountedScaling:t.allowScaling);return Object(r.a)(Object(r.a)({},e),{type:"interaction",fitWithScaling:u,positionInPage:o,reserveSpaceInContainer:a,zIndex:a?0:null!==(i=t.zIndex)&&void 0!==i?i:c.b,yType:a?"start":e.yType,topOffset:a?0:e.topOffset})}(y,v,function(e,t){var n,r;return[o.a.OperatorSendToVisitor,o.a.OperatorSendToGroup].includes((null===(r=null===(n=e.publishingSettings)||void 0===n?void 0:n[0])||void 0===r?void 0:r.interactionType)||o.a.WebsiteNormal)||"chat_message_visitor"===t.environment.runtime||"chat_message_user"===t.environment.runtime}(v,t)),O=function(e,t){var n,i,o,a,u=Object(r.k)(e.width,2),s=u[0],c=u[1],l=Object(r.k)(e.height,2),d=l[0],f=l[1];e.leftOffset=null!==(n=e.leftOffset)&&void 0!==n?n:0,e.rightOffset=null!==(i=e.rightOffset)&&void 0!==i?i:0,e.topOffset=null!==(o=e.topOffset)&&void 0!==o?o:0,e.bottomOffset=null!==(a=e.bottomOffset)&&void 0!==a?a:0;var p=function(e,t){return"middle"===e?t>=0?t:0:t},h=function(e,t,n){return"middle"===e?t<0?-t:0:n},b=p(e.xType,e.leftOffset),v=h(e.xType,e.leftOffset,e.rightOffset),g=p(e.yType,e.topOffset),m=h(e.yType,e.topOffset,e.bottomOffset),y={x1:("middle"===e.xType?2:1)*b,x2:("middle"===e.xType?2:1)*v,y1:("middle"===e.yType?2:1)*g,y2:("middle"===e.yType?2:1)*m},w={x1:Math.max("end"===e.xType?0:y.x1,0),x2:Math.max("start"===e.xType?0:y.x2,0),y1:Math.max("end"===e.yType?0:y.y1,0),y2:Math.max("start"===e.yType?0:y.y2,0)},O=w.x1+w.x2+c,j=w.y1+w.y2+f,C=Math.max(O-t.width,0),E=Math.max(j-t.height,0),x=function(e){return function(t,n){var r=n?Math.min(n,e):e,i=Math.min(r,t);return e-=i,t-i}},D=x(C),k=x(E),_={x1:D(w.x1,C),x2:D(w.x2,C),y1:k(w.y1,E),y2:k(w.y2,E)},A={x1:D(_.x1),x2:D(_.x2),y1:k(_.y1),y2:k(_.y2)},S=t.width,B=t.height,P=D(c-s)+s,F=k(f-d)+d,T=e.fitWithScaling?S/P:1,I=e.fitWithScaling?B/F:1,N=Math.min(Math.min(T,I),1);return{top:A.y1,bottom:A.y2,left:A.x1,right:A.x2,width:P,height:F,scaling:N,fitWithScaling:e.fitWithScaling,reserveSpaceInContainer:e.reserveSpaceInContainer,position:e.positionInPage?e.reserveSpaceInContainer?"relative":"absolute":"fixed",zIndex:e.zIndex,containerHeight:e.reserveSpaceInContainer?F*N:void 0,scrollX:!e.fitWithScaling&&P>S,scrollY:!e.fitWithScaling&&F>B,xAlignment:T<1?"center":"start"===e.xType?"start":"middle"===e.xType?"center":"end",yAlignment:I<1?"center":"start"===e.yType?"start":"middle"===e.yType?"center":"end"}}(w,m);return u.b.jsx(b,{isDesignMode:d,className:d?"":g(Object(s.k)()),style:f(O)},u.b.jsx(b,{isDesignMode:d,innerRef:i,style:p(O)},w.fitWithScaling?e.children:u.b.jsx(b,{isDesignMode:d,style:h(O)},e.children)))},f=function(e){return{display:"flex",justifyContent:e.xAlignment,alignItems:e.yAlignment,position:e.position,top:e.top,bottom:e.bottom,left:e.left,right:e.right,zIndex:e.zIndex,height:e.containerHeight,pointerEvents:"none",touchAction:"none"}},p=function(e){return{minWidth:e.scrollX?"100%":e.width,height:e.scrollY?"100%":e.height,transform:e.fitWithScaling?"scale(".concat(e.scaling,")"):void 0,transformOrigin:e.reserveSpaceInContainer?"top":"center",position:e.reserveSpaceInContainer?"absolute":"relative",overflowX:e.scrollX?"scroll":void 0,overflowY:e.scrollY?"scroll":void 0,pointerEvents:"none"}},h=function(e){return{minWidth:e.width,height:e.height,position:"relative",pointerEvents:"none"}},b=function(e){var t=u.b.useCss();return u.b.jsx("div",{style:e.isDesignMode?e.style:void 0,ref:e.innerRef,className:"".concat(t(Object(s.r)(e.style))," ").concat(e.className||"")},e.children)}},60:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.WebsiteNormal="WebsiteNormal",e.OperatorSendToVisitor="OperatorSendToVisitor",e.OperatorSendToGroup="OperatorSendToGroup",e.ChatWindowSidePanel="ChatWindowSidePanel",e.StartMenu="StartMenu",e.ProductCardAttachment="ProductCardAttachment",e.Advertisement="Advertisement"}(r||(r={}))},604:function(e,t,n){"use strict"; /** @license React v17.0.1 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(326),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,u=60110,s=60112;t.Suspense=60113;var c=60115,l=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;i=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),u=d("react.context"),s=d("react.forward_ref"),t.Suspense=d("react.suspense"),c=d("react.memo"),l=d("react.lazy")}var f="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n