function_typeof(e){return(_typeof="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(e)}function_AwaitValue(e){this.wrapped=e}function_AsyncGenerator(e){varr,t;functionresume(r,t){try{varn=e[r](t),o=n.value,a=oinstanceof_AwaitValue;Promise.resolve(a?o.wrapped:o).then((function(e){a?resume("return"===r?"return":"next",e):settle(n.done?"return":"normal",e)}),(function(e){resume("throw",e)}))}catch(e){settle("throw",e)}}functionsettle(e,n){switch(e){case"return":r.resolve({value:n,done:!0});break;case"throw":r.reject(n);break;default:r.resolve({value:n,done:!1})}(r=r.next)?resume(r.key,r.arg):t=null}this._invoke=functionsend(e,n){returnnewPromise((function(o,a){vari={key:e,arg:n,resolve:o,reject:a,next:null};t?t=t.next=i:(r=t=i,resume(e,n))}))},"function"!=typeofe.return&&(this.return=void0)}function_toConsumableArray(e){returnfunction_arrayWithoutHoles(e){if(Array.isArray(e))return_arrayLikeToArray(e)}(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||function_nonIterableSpread(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function_iterableToArray(e){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(e))returnArray.from(e)}function_unsupportedIterableToArray(e,r){if(e){if("string"==typeofe)return_arrayLikeToArray(e,r);vart=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void0}}function_arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(vart=0,n=newArray(r);t<r;t++)n[t]=e[t];returnn}"function"==typeofSymbol&&Symbol.asyncIterator&&(_AsyncGenerator.prototype[Symbol.asyncIterator]=function(){returnthis}),_AsyncGenerator.prototype.next=function(e){returnthis._invoke("next",e)},_AsyncGenerator.prototype.throw=function(e){returnthis._invoke("throw",e)},_AsyncGenerator.prototype.return=function(e){returnthis._invoke("return",e)};vare={name:"xdomain-messaging",init:functioninit(){vare=this,r=e.canvas;try{window.addEventListener("message",(function(t){if(t.data&&["string","object"].includes(_typeof(t.data))&&"|"!==t.data.charAt()){varn="object"===_typeof(t.data)?t.data:JSON.parse(t.data);if(n&&"object"===_typeof(n)&&"svgCanvas"===n.namespace){varo=e.curConfig.allowedOrigins;if(o.includes("*")||o.includes(t.origin)){vara=n.id,i=n.name,s=n.args,u={namespace:"svg-edit",id:a};try{u.result=r[i].apply(r,_toConsumableArray(s))}catch(e){u.error=e.message}t.source.postMessage(JSON.stringify(u),"*")}elseconsole.log("Origin ".concat(t.origin," not whitelisted for posting to ").concat(window.origin))}}}))}catch(e){console.log("Error with xdomain message listener: "+e)}}};exportdefaulte;