2 lines
8.3 KiB
JavaScript
2 lines
8.3 KiB
JavaScript
|
(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],b):(a=a||self,b(a.Remount={},a.React,a.ReactDOM))})(this,function(a,b,c){"use strict";function d(a){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},d(a)}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function g(a,b,c){return b&&f(a.prototype,b),c&&f(a,c),a}function h(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),b&&j(a,b)}function i(a){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},i(a)}function j(a,b){return j=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a},j(a,b)}function k(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(a){return!1}}function l(){return l=k()?Reflect.construct:function(b,c,d){var e=[null];e.push.apply(e,c);var a=Function.bind.apply(b,e),f=new a;return d&&j(f,d.prototype),f},l.apply(null,arguments)}function m(a){return-1!==Function.toString.call(a).indexOf("[native code]")}function n(a){var b="function"==typeof Map?new Map:void 0;return n=function(a){function c(){return l(a,arguments,i(this).constructor)}if(null===a||!m(a))return a;if("function"!=typeof a)throw new TypeError("Super expression must either be null or a function");if("undefined"!=typeof b){if(b.has(a))return b.get(a);b.set(a,c)}return c.prototype=Object.create(a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),j(c,a)},n(a)}function o(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function p(a,b){return b&&("object"==typeof b||"function"==typeof b)?b:o(a)}function q(a){return r(a)||s(a)||t()}function r(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}}function s(a){if(Symbol.iterator in Object(a)||"[object Arguments]"===Object.prototype.toString.call(a))return Array.from(a)}function t(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function u(){if(!(window.HTMLElement&&window.HTMLElement._babelES5Adapter||void 0===window.Reflect||void 0===window.customElements||window.customElements.hasOwnProperty("polyfillWrapFlushCallback"))){var b=HTMLElement;window.HTMLElement=function(){return Reflect.construct(b,[],this.constructor)},HTMLElement.prototype=b.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,b),HTMLElement._babelES5Adapter=!0}}function v(a,b,c){var d=c.onUpdate,f=c.onUnmount,j=c.onMount;u();var k=a.attributes||[],l=function(b){function c(){return e(this,c),p(this,i(c).apply(this,arguments))}return h(c,b),g(c,[{key:"connectedCallback",value:function(){this._mountPoint=w(this,a),j(this,this._mountPoint)}},{key:"disconnectedCallback",value:function(){this._mountPoint&&f(this,this._mountPoint)}},{key:"attributeChangedCallback",value:function(){this._mountPoint&&d(this,this._mountPoint)}}],[{key:"observedAttributes",get:function(){return["props-json"].concat(q(k))}}]),c}(n(HTMLElement));a.quiet&&window.customElements.get(b)||window.customElements.define(b,l)}function w(a,b){var c=b.shadow;if(c&&a.attachShadow){var d=document.createElement("span");return a.attachShadow({mode:"open"}).appendChild(d),d}return a}function x(a,b){for(var c=0,d=a.length;c<d;c++)b(a[c])}function y(){return"Muta
|