web-component-wrapper 0.0.444 → 0.0.445
Sign up to get free protection for your applications and to get access to all the features.
- package/ReactWeb.js +1 -0
- package/ReactWebNext.js +1 -0
- package/WebNext.js +1 -1
- package/index.d.ts +5 -4
- package/index.js +1 -11
- package/indexNext.js +1 -11
- package/package.json +5 -5
- package/type.d.ts +1 -1
- package/React.js +0 -11
- package/ReactNext.js +0 -11
- /package/{React.d.ts → ReactWeb.d.ts} +0 -0
package/ReactNext.js
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("clientnode"),require("clientnode/property-types"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator"));else if("function"==typeof define&&define.amd)define(["clientnode","clientnode/property-types","react-dom","react-dom/client","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/helpers/extends","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/assertThisInitialized","@babel/runtime/helpers/inheritsLoose","@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerWarningHelper","@babel/runtime/regenerator"],t);else{var r="object"==typeof exports?t(require("clientnode"),require("clientnode/property-types"),require("react-dom"),require("react-dom/client"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/extends"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inheritsLoose"),require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerWarningHelper"),require("@babel/runtime/regenerator")):t(e.clientnode,e["clientnode/property-types"],e["react-dom"],e["react-dom/client"],e["@babel/runtime/helpers/asyncToGenerator"],e["@babel/runtime/helpers/extends"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/assertThisInitialized"],e["@babel/runtime/helpers/inheritsLoose"],e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerWarningHelper"],e["@babel/runtime/regenerator"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,((__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__1__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__12__,__WEBPACK_EXTERNAL_MODULE__8__,__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__3__,__WEBPACK_EXTERNAL_MODULE__9__,__WEBPACK_EXTERNAL_MODULE__7__,__WEBPACK_EXTERNAL_MODULE__4__,__WEBPACK_EXTERNAL_MODULE__5__,__WEBPACK_EXTERNAL_MODULE__10__)=>(()=>{var __webpack_modules__=[e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__0__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__1__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__2__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__3__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__4__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__5__},function(module,__unused_webpack_exports,__webpack_require__){var __dirname="/",e,t,r,n,i,s,o,a,l,p;if(module=__webpack_require__.nmd(module),null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&null!=__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window=void 0===__webpack_require__.g||null===__webpack_require__.g?{}:__webpack_require__.g;module.exports=(e=__webpack_require__(8),t=__webpack_require__(2),r=__webpack_require__(3),n=__webpack_require__(9),i=__webpack_require__(7),s=__webpack_require__(4),o=__webpack_require__(5),a=__webpack_require__(10),l=__webpack_require__(0),p=__webpack_require__(1),function(){var u=[function(e){e.exports=t},function(e){e.exports=l},function(e){e.exports=p},function(e){e.exports=i},function(e,t,r){var n=r(0),o=r.n(n),i=r(1),s=r.n(i),a=r(2);t.default=function(e){return void 0===e&&(e={}),e=o()({readAttribute:!0,type:a.string},e),function(t,r){if("string"==typeof r){var n,i=t.self||t.constructor;if(e.readAttribute){Object.prototype.hasOwnProperty.call(i,"observedAttributes")||(i.observedAttributes=i.observedAttributes?[].concat(i.observedAttributes):[]);var a=s().stringCamelCaseToDelimited(r);i.observedAttributes.includes(a)||i.observedAttributes.push(a)}e.type&&(Object.prototype.hasOwnProperty.call(i,"propertyTypes")||(i.propertyTypes=i.propertyTypes?o()({},i.propertyTypes):{}),!e.update&&Object.prototype.hasOwnProperty.call(i,r)||(i.propertyTypes[r]=e.type)),e.writeAttribute&&(Object.prototype.hasOwnProperty.call(i,"propertiesToReflectAsAttributes")||(i.propertiesToReflectAsAttributes=i.propertiesToReflectAsAttributes?s().copy(i.propertiesToReflectAsAttributes):[]),(e.update||i.propertiesToReflectAsAttributes instanceof Map&&!i.propertiesToReflectAsAttributes.has(r)||Array.isArray(i.propertiesToReflectAsAttributes)&&!i.propertiesToReflectAsAttributes.includes(r)||null!==i.propertiesToReflectAsAttributes&&"object"==typeof i.propertiesToReflectAsAttributes&&!Object.prototype.hasOwnProperty.call(i.propertiesToReflectAsAttributes,r))&&("boolean"==typeof e.writeAttribute?!0===e.writeAttribute&&i.propertyTypes&&Object.prototype.hasOwnProperty.call(i.propertyTypes,r)&&(n=i.propertyTypes[r]):n=e.writeAttribute,void 0!==n&&(Array.isArray(i.propertiesToReflectAsAttributes)&&(!0===e.writeAttribute?i.propertiesToReflectAsAttributes.push(r):i.propertiesToReflectAsAttributes=i.normalizePropertyTypeList(i.propertiesToReflectAsAttributes)),i.propertiesToReflectAsAttributes instanceof Map&&i.propertiesToReflectAsAttributes.set(r,n),null!==i.propertiesToReflectAsAttributes&&"object"==typeof i.propertiesToReflectAsAttributes&&(i.propertiesToReflectAsAttributes[r]=n)))),e.alias&&(Object.prototype.hasOwnProperty.call(i,"propertyAliases")||(i.propertyAliases=i.propertyAliases?o()({},i.propertyAliases):{}),!e.update&&Object.prototype.hasOwnProperty.call(i,r)||(i.propertyAliases[r]=e.alias))}}}},,function(t){t.exports=e},function(e){e.exports=r},function(e){e.exports=n},function(e){e.exports=s},function(e){e.exports=o},function(e){e.exports=a}],c={};function d(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={exports:{}};return u[e](r,r.exports,d),r.exports}d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},d.d=function(e,t){for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var h={};return function(){d.r(h),d.d(h,{GenericHTMLElement:function(){return C},Web:function(){return T},api:function(){return S}});var e,t,r,n,o=d(6),i=d.n(o),s=d(0),a=d.n(s),l=d(7),p=d.n(l),u=d(8),c=d.n(u),f=d(3),_=d.n(f),b=d(9),y=d.n(b),m=(d(10),d(11)),v=d.n(m),g=d(1),A=d.n(g),w=d(2),P=d(4);function E(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C="undefined"==typeof HTMLElement?function(){}:HTMLElement,T=(e=(0,P.default)({type:w.boolean,writeAttribute:!0}),n=function(e){function t(){var n;return(n=e.call(this)||this).batchAttributeUpdates=!0,n.batchPropertyUpdates=!0,n.batchUpdates=!0,n.batchedAttributeUpdateRunning=!0,n.batchedPropertyUpdateRunning=!0,n.batchedUpdateRunning=!0,n.parent=null,n.rootInstance=null,n.scope={Tools:A()},n.domNodeEventBindings=new Map,n.domNodeTemplateCache=new Map,n.externalProperties={},n.ignoreAttributeUpdateObservations=!1,n.internalProperties={},n.outputEventNames=new Set,n.instance=null,p()(n,"isRoot",r,c()(n)),n.root=void 0,n.runDomConnectionAndRenderingInSameEventQueue=!1,n.self=t,n.slots={},n.self=n.constructor,n.self._propertiesToReflectAsAttributes||(n.self._propertiesToReflectAsAttributes=n.self.normalizePropertyTypeList(n.self.propertiesToReflectAsAttributes)),n.generateAliasIndex(),n.root=c()(n),n.defineGetterAndSetterInterface(),n}_()(t,e);var n=t.prototype;return n.attributeChangedCallback=function(e,t,r){this.ignoreAttributeUpdateObservations||t===r||this.updateAttribute(e,r)},n.updateAttribute=function(e,t){var r=this;this.evaluateStringOrNullAndSetAsProperty(e,t),this.batchAttributeUpdates?this.batchedAttributeUpdateRunning||this.batchedUpdateRunning||(this.batchedAttributeUpdateRunning=!0,this.batchedUpdateRunning=!0,A().timeout((function(){r.batchedAttributeUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("attributeChanged")}))):this.render("attributeChanged")},n.connectedCallback=function(){var e=this;try{this.isConnected=!0}catch(e){}this.parent=this,this.rootInstance=this,this.attachEventHandler(),this.self.determineRootBinding&&this.determineRootBinding(),this.self.applyRootBinding&&this.isRoot&&(this.determineRenderScope(),this.applyBinding(this,this.scope)),this.batchedAttributeUpdateRunning=!1,this.batchedPropertyUpdateRunning=!1,this.batchedUpdateRunning=!1,this.grabGivenSlots(),this.reflectExternalProperties(this.externalProperties),this.runDomConnectionAndRenderingInSameEventQueue?this.render("connected"):A().timeout((function(){return e.render("connected")}))},n.disconnectedCallback=function(){try{this.isConnected=!1}catch(e){}for(var e,t=E(this.domNodeEventBindings.values());!(e=t()).done;)for(var r,n=E(e.value.values());!(r=n()).done;)(0,r.value)();this.slots={}},n.defineGetterAndSetterInterface=function(){for(var e,t=this,r=function(){var r=e.value;Object.prototype.hasOwnProperty.call(t,r)&&t.setPropertyValue(r,t[r]),Object.defineProperty(t,r,{configurable:!0,get:function(){return t.getPropertyValue(r)},set:function(e){t.setPropertyValue(r,e),t.triggerPropertySpecificRendering(r,e)}})},n=E(A().arrayUnique(Object.keys(this.self.propertyTypes).concat(Object.keys(this.self._propertyAliasIndex))));!(e=n()).done;)r()},n.getPropertyAlias=function(e){return Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,e)?this.self._propertyAliasIndex[e]:null},n.getPropertyValue=function(e){var r,n,o,i,s=null!=(r=this.instance)&&null!=(n=r.current)&&n.properties&&(Object.prototype.hasOwnProperty.call(!t.propertyTypes,e)||Object.prototype.hasOwnProperty.call(this.instance.current.properties,e))?this.instance.current.properties[e]:this.externalProperties[e];return null!=(o=this.instance)&&null!=(i=o.current)&&i.state&&Object.prototype.hasOwnProperty.call(this.instance.current.state,e)?this.instance.current.state[e]:s},n.setExternalPropertyValue=function(e,t){this.externalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.externalProperties[r]=t)},n.setInternalPropertyValue=function(e,t){this.internalProperties[e]=t;var r=this.getPropertyAlias(e);r&&(this.internalProperties[r]=t)},n.setPropertyValue=function(e,t){var r;this.reflectProperties(((r={})[e]=t,r)),this.setInternalPropertyValue(e,t)},n.triggerPropertySpecificRendering=function(e,t){var r=this;if(this.batchPropertyUpdates)this.batchedPropertyUpdateRunning||this.batchedUpdateRunning||(this.batchedPropertyUpdateRunning=!0,this.batchedUpdateRunning=!0,A().timeout((function(){void 0!==t&&r.isStateProperty(e)?(r.render("preStatePropertyChanged"),A().timeout((function(){r.setInternalPropertyValue(e,void 0),r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("postStatePropertyChanged"),r.triggerOutputEvents()})).then(A().noop,A().noop)):(r.batchedPropertyUpdateRunning=!1,r.batchedUpdateRunning=!1,r.render("propertyChanged"),r.triggerOutputEvents())})));else{var n=this.isStateProperty(e);this.render(n?"preStatePropertyChanged":"propertyChanged"),void 0!==t&&n&&(this.setInternalPropertyValue(e,void 0),this.render("postStatePropertyChanged")),this.triggerOutputEvents()}},n.applyBinding=function(e,t){var r=this;if(e.getAttributeNames)for(var n,o=function(){var o=n.value,i="";if(o.startsWith("data-bind-")?i=o.substring("data-bind-".length):o.startsWith("bind-")&&(i=o.substring("bind-".length)),i){var s=e.getAttribute(o);if(null===s)return"continue";if(i.startsWith("attribute-")||i.startsWith("property-")){var l=A().stringEvaluate(s,t,!1,e);if(l.error)return console.warn('Error occurred during processing given attribute binding "'+o+'" on node:',e,l.error),"continue";i.startsWith("attribute-")?e.setAttribute(i.substring("attribute-".length),l.result):e[A().stringDelimitedToCamelCase(i.substring("property-".length))]=l.result}else if(i.startsWith("on-")){r.domNodeEventBindings.has(e)||r.domNodeEventBindings.set(e,new Map);var p=r.domNodeEventBindings.get(e);i=A().stringDelimitedToCamelCase(i.substring("on-".length)),p.has(i)&&p.get(i)(),t=a()({event:void 0,parameters:void 0},t);var u=A().stringCompile(s,t,!0);if(u.error)console.warn('Error occurred during compiling given event binding "'+o+'" on node:',e,u.error);else{var c=u.templateFunction.bind(e),d=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.event=n[0],t.parameters=n;try{c.apply(void 0,u.originalScopeNames.map((function(e){return t[e]})))}catch(t){console.warn('Error occurred during processing given event binding "'+o+'" on node:',e,'Given expression "'+s+'" could not be evaluated with given scope names "'+u.scopeNames.join('", "')+'": '+A().represent(t))}};e.addEventListener(i,d),p.set(i,(function(){e.removeEventListener(i,d),p.delete(i),0===p.size&&r.domNodeEventBindings.delete(e)}))}}}},i=E(e.getAttributeNames());!(n=i()).done;)o()},n.applyBindings=function(e,t,r){for(void 0===r&&(r=!0);e;){var n;null==(n=e.attributes)||!n.length||!r&&e.getAttribute("slot")||this.applyBinding(e,t),e.nodeName.toLowerCase().includes("-")||this.applyBindings(e.firstChild,t),e=e.nextSibling}},n.compileDomNodeTemplate=function(e,t,r){var n;if(void 0===t&&(t=[]),void 0===r&&(r={}),(r=a()({ignoreComponents:!0,ignoreNestedComponents:!0,map:this.domNodeTemplateCache,unsafe:this.self.renderUnsafe},r)).ignoreComponents&&null!=(n=e.nodeName)&&n.toLowerCase().includes("-"))return r.map;if(r.unsafe){var o=e.innerHTML;if(!o&&e.template&&(o=e.template),this.self.hasCode(o)){var i=A().stringCompile("`"+o+"`",t);r.map.set(e,{children:[],error:i.error,scopeNames:i.scopeNames,template:o,templateFunction:i.templateFunction})}}else{var s,l=e.nodeName.toLowerCase();if(["a","#text"].includes(l)){var p="a"===l?e.getAttribute("href"):e.textContent;this.self.hasCode(p)&&(s=p.replace(/ /g," ").trim())}var u=[];if(s){var c=A().stringCompile("`"+s+"`",t);r.map.set(e,{children:u,error:c.error,scopeNames:c.scopeNames,template:s,templateFunction:c.templateFunction})}for(var d=e.firstChild;d;)r.filter&&!r.filter(d)||u.push(this.compileDomNodeTemplate(d,t,a()({},r,{ignoreComponents:r.ignoreNestedComponents}))),d=d.nextSibling}return r.map},n.evaluateDomNodeTemplate=function(e,t,r){var n;if(void 0===t&&(t={}),void 0===r&&(r={}),(r=a()({applyBindings:!0,ignoreComponents:!0,ignoreNestedComponents:!0,map:this.domNodeTemplateCache,unsafe:this.self.renderUnsafe},r)).map.has(e)||this.compileDomNodeTemplate(e,t,r),r.map.has(e)){var o=r.map.get(e),i=o.error,s=o.scopeNames,l=o.templateFunction;if(i)console.warn("Error occurred during compiling node content: "+i);else{var p=null;try{p=l.apply(void 0,s.map((function(e){return t[e]})))}catch(i){console.warn('Error occurred when "'+this.self._name+'" is running "'+l+'": with bound names "'+s.join('", "')+'": "'+i+'". Rendering node:',e)}null!==p&&(r.unsafe?e.innerHTML=p:"a"===e.nodeName.toLowerCase()?e.setAttribute("href",p):e.textContent=p)}}if(!(r.unsafe||r.ignoreComponents&&null!=(n=e.nodeName)&&n.toLowerCase().includes("-")))for(var u=e.firstChild;u;)r.filter&&!r.filter(u)||this.evaluateDomNodeTemplate(u,t,a()({},r,{applyBindings:!1,ignoreComponents:r.ignoreNestedComponents})),u=u.nextSibling;return r.applyBindings&&this.applyBindings(e,t),r.map},t.replaceDomNodes=function(e,r){for(var n,o=E([].concat(r).reverse());!(n=o()).done;){var i,s=n.value;t.trimSlots&&s.nodeType===Node.TEXT_NODE&&""===(null==(i=s.nodeValue)?void 0:i.trim())||e.after(s)}e.remove()},t.unwrapDomNode=function(e){for(var t=e.parentNode,r=[];e.firstChild;)r.push(e.firstChild),t.insertBefore(e.firstChild,e);return t.removeChild(e),r},n.determineRootBinding=function(){for(var e=this.parentNode;e;){var r;(e instanceof t||null!=(r=e.nodeName)&&r.includes("-")||null===e.parentNode&&"[object ShadowRoot]"===e.toString())&&(this.rootInstance===this?(this.parent=e,this.rootInstance=e,this.setPropertyValue("isRoot",!1)):this.rootInstance=e),e=e.parentNode}},t.hasCode=function(e){return"string"==typeof e&&e.includes("${")&&e.includes("}")&&/\${[\s\S]+}/.test(e)},t.normalizePropertyTypeList=function(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){for(var r,n=e,o=new Map,i=E(n);!(r=i()).done;){var s=r.value;Object.prototype.hasOwnProperty.call(t.propertyTypes,s)&&o.set(s,t.propertyTypes[s])}return o}return A().convertPlainObjectToMap(e)},n.attachEventHandler=function(){if(null!==this.self.eventToPropertyMapping){var e=this.attachExplicitDefinedOutputEventHandler();this.attachImplicitDefinedOutputEventHandler(!e)}},n.attachExplicitDefinedOutputEventHandler=function(){for(var e=this,t=!1,r=function(){var r=o[n];Object.prototype.hasOwnProperty.call(e.internalProperties,r)||(t=!0,e.outputEventNames.add(r),e.setInternalPropertyValue(r,i()(v().mark((function t(){var n,o,i,s,a=arguments;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=a.length,o=new Array(n),i=0;i<n;i++)o[i]=a[i];return t.next=3,e.reflectEventToProperties(r,o);case 3:(s=t.sent)&&(o[0]=s),e.forwardEvent(r,o);case 6:case"end":return t.stop()}}),t)})))))},n=0,o=Object.keys(this.self.eventToPropertyMapping);n<o.length;n++)r();return t},n.attachImplicitDefinedOutputEventHandler=function(e){var t=this;void 0===e&&(e=!0);for(var r=function(){var r=o[n],i=r[0],s=r[1];Object.prototype.hasOwnProperty.call(t.internalProperties,i)||![w.func,"function"].includes(s)||t.self.renderProperties.includes(i)||(t.outputEventNames.add(i),t.setInternalPropertyValue(i,(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e&&t.reflectEventToProperties(i,n),t.forwardEvent(i,n)})))},n=0,o=Object.entries(this.self.propertyTypes);n<o.length;n++)r()},n.triggerOutputEvents=function(){for(var e,t=E(this.outputEventNames);!(e=t()).done;){var r=e.value;this.forwardEvent(r,[this.externalProperties])}},n.forwardEvent=function(e,t){return e.length>"onX".length&&e.startsWith("on")&&(e=A().stringLowerCase(e.substring(2))),this.dispatchEvent(new CustomEvent(e,{detail:{parameters:t}}))},n.applySlots=function(e,t){for(var r=this,n=0,o=Array.from(e.querySelectorAll("slot"));n<o.length;n++){var i=o[n],s=i.getAttribute("name");if(null===s||"default"===s)if(this.slots.default){if(this.self.renderSlots){if(this.self.evaluateSlots)for(var a,l=E(this.slots.default);!(a=l()).done;){var p=a.value;this.evaluateDomNodeTemplate(p,t)}this.self.replaceDomNodes(i,this.slots.default)}}else this.slots.default=this.self.unwrapDomNode(i).map((function(e){return r.grabSlotContent(e)}));else Object.prototype.hasOwnProperty.call(this.slots,s)?this.self.renderSlots&&(this.self.evaluateSlots&&this.evaluateDomNodeTemplate(this.slots[s],t),this.self.replaceDomNodes(i,this.slots[s])):this.slots[s]=this.grabSlotContent(this.self.unwrapDomNode(i).filter((function(e){return"#text"!==e.nodeName.toLowerCase()}))[0])}},n.grabSlotContent=function(e){var t;if("textarea"===(null==(t=e.firstElementChild)?void 0:t.nodeName.toLowerCase())&&(!e.firstElementChild.hasAttribute("data-no-template")||"false"===e.firstElementChild.getAttribute("data-no-template"))){var r,n,o=e.firstElementChild.value;null==(r=e.classList)||r.remove("web-component-template");var i=e.cloneNode();return null==(n=e.classList)||n.add("web-component-template"),i.innerHTML="",i.template=o,i}return this.self.cloneSlots?e.cloneNode(!0):e},n.grabGivenSlots=function(){var e=this;this.slots={};for(var t=0,r=Array.from(this.querySelectorAll("[slot]"));t<r.length;t++){for(var n=r[t],o=n.parentNode,i=!0;o;){if(o.nodeName.includes("-")){o===this&&(i=!1);break}o=o.parentNode}i||(this.slots[n.getAttribute&&n.getAttribute("slot")&&n.getAttribute("slot").trim()?n.getAttribute("slot").trim():n.nodeName.toLowerCase()]=this.grabSlotContent(n))}this.slots.default?this.slots.default=[this.slots.default]:this.childNodes.length>0?this.slots.default=Array.from(this.childNodes).map((function(t){return e.grabSlotContent(t)})):this.slots.default=[]},n.isStateProperty=function(e){var t,r,n,o;return Boolean((null==(t=this.instance)||null==(r=t.current)?void 0:r.state)&&(Object.prototype.hasOwnProperty.call(null==(n=this.instance)||null==(o=n.current)?void 0:o.state,e)||this.instance.current.state.modelState&&Object.prototype.hasOwnProperty.call(this.instance.current.state.modelState,e)))},n.generateAliasIndex=function(){if(!this.self._propertyAliasIndex){this.self._propertyAliasIndex=a()({},this.self.propertyAliases);for(var e=0,t=Object.entries(this.self._propertyAliasIndex);e<t.length;e++){var r=t[e],n=r[0],o=r[1];Object.prototype.hasOwnProperty.call(this.self._propertyAliasIndex,o)||(this.self._propertyAliasIndex[o]=n)}}},n.reflectExternalProperties=function(e){this.ignoreAttributeUpdateObservations=!0;for(var t=0,r=Object.entries(e);t<r.length;t++){var n=r[t],o=n[0],i=n[1];if(this.setExternalPropertyValue(o,i),this.isConnected){var s=A().stringCamelCaseToDelimited(o);if(this.self._propertiesToReflectAsAttributes.has(o))switch(this.self._propertiesToReflectAsAttributes.get(o)){case w.boolean:case"boolean":i?""!==this.getAttribute(s)&&this.setAttribute(s,""):this.hasAttribute(s)&&this.removeAttribute(s);break;case w.func:case"function":break;case"json":if(i){var a=JSON.stringify(i);if(a&&this.getAttribute(s)!==a){this.setAttribute(s,a);break}}this.hasAttribute(s)&&this.removeAttribute(s);break;case w.number:case"number":if("number"!=typeof i||isNaN(i))this.hasAttribute(s)&&this.removeAttribute(s);else{var l=""+i;this.getAttribute(s)!==l&&this.setAttribute(s,l)}break;case w.string:case"string":i?this.getAttribute(s)!==i&&this.setAttribute(s,i):this.hasAttribute(s)&&this.removeAttribute(s);break;case w.any:case w.array:case w.arrayOf:case w.element:case w.elementType:case w.instanceOf:case w.node:case w.object:case"object":case w.objectOf:case w.shape:case w.exact:case w.symbol:default:if(i){var p=A().represent(i);if(p&&this.getAttribute(s)!==p){this.setAttribute(s,p);break}}this.hasAttribute(s)&&this.removeAttribute(s)}}}this.ignoreAttributeUpdateObservations=!1},n.reflectProperties=function(e){var t,r,n,o;if(this.reflectExternalProperties(e),null!=(t=this.instance)&&null!=(r=t.current)&&r.state&&"object"==typeof this.instance.current.state)for(var i,s=E(Object.keys(this.instance.current.state).concat(this.instance.current.state.modelState?Object.keys(this.instance.current.state.modelState):[]));!(i=s()).done;){var a=i.value;Object.prototype.hasOwnProperty.call(this.internalProperties,a)&&this.setInternalPropertyValue(a,void 0)}null!=(n=this.internalProperties.model)&&n.state&&(null==(o=this.internalProperties.model)||delete o.state,this.setInternalPropertyValue("model",this.internalProperties.model));for(var l,p=E(this.self.controllableProperties);!(l=p()).done;){var u=l.value;Object.prototype.hasOwnProperty.call(e,u)&&this.setInternalPropertyValue(u,e[u])}},n.triggerRender=function(e){var t=this;this.batchUpdates?this.batchedUpdateRunning||(this.batchedUpdateRunning=!0,A().timeout((function(){t.batchedUpdateRunning=!1,t.render(e)}))):this.render(e)},n.reflectEventToProperties=function(){var e=i()(v().mark((function e(t,r){var n,o,i,s,l,p,u,c,d,h,f,_,b,y,m,g;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.batchUpdates,this.batchUpdates=!1,o=null,i=!1,!(this.self.eventToPropertyMapping&&Object.prototype.hasOwnProperty.call(this.self.eventToPropertyMapping,t)&&A().isFunction(this.self.eventToPropertyMapping[t]))){e.next=16;break}if(!((l=(s=this.self.eventToPropertyMapping)[t].apply(s,r.concat([this])))&&"then"in l&&A().isFunction(l.then))){e.next=12;break}return e.next=9,l;case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=l;case 13:p=e.t0,i=!0,Array.isArray(p)?(o=p[0],this.reflectProperties(o),A().extend(!0,this.internalProperties,p[1])):null===p?i=!1:"object"==typeof p&&(o=p,this.reflectProperties(p));case 16:if(!i&&r.length>0&&null!==r[0]&&"object"==typeof r[0]){if(c=r[0],"persist"in r[0]&&A().isFunction(r[0].persist))for(c={},d=0,h=Object.keys(this.self.propertyTypes);d<h.length;d++)for(f=h[d],_=E([f].concat(null!==(y=this.getPropertyAlias(f))&&void 0!==y?y:[]));!(b=_()).done;)m=b.value,(g=r[0].currentTarget&&Object.prototype.hasOwnProperty.call(r[0].currentTarget,m)?r[0].currentTarget[m]:this.getPropertyValue(m))!==this.externalProperties[m]&&(c[m]=g);else[null,void 0].includes(null==(u=c.detail)?void 0:u.value)||(c=a()({},c.detail));o=c,this.reflectProperties(c)}return this.triggerRender("propertyReflected"),this.batchUpdates=n,e.abrupt("return",o);case 20:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}(),n.evaluateStringOrNullAndSetAsProperty=function(e,t){var r=this,n=e.startsWith("-"),o=n?e.substring(1):e,i=A().stringDelimitedToCamelCase(o),s=this.getPropertyAlias(i);if(s&&Object.prototype.hasOwnProperty.call(this.self.propertyTypes,s)&&(i=s),Object.prototype.hasOwnProperty.call(this.self.propertyTypes,i)){var a=this.self.propertyTypes[i];if(n){if(t){var l=A().stringEvaluate(t,{Tools:A()},!1,this);l.error?(console.warn('Faild to process pre-evaluation attribute "'+e+'": '+l.error+'. Will be set to "undefined".'),this.setInternalPropertyValue(i,void 0)):(this.setInternalPropertyValue(i,l.result),this.setExternalPropertyValue(i,l.result))}}else switch(a){case w.boolean:case"boolean":var p=![null,"false"].includes(t);this.setInternalPropertyValue(i,p),this.setExternalPropertyValue(i,p);break;case w.func:case"function":var u,c=null,d=["data","event","firstArgument","firstParameter","options","scope","parameters","Tools"];if(t){var h=A().stringCompile(t,d);c=h.error,u=h.templateFunction,c&&console.warn('Failed to compile given handler "'+e+'": '+c+".")}this.setInternalPropertyValue(i,(function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];r.outputEventNames.has(i)&&r.reflectEventToProperties(i,o);var a=void 0;if(!c)try{a=u.call(r,o[0],o[0],o[0],o[0],o[0],o[0],o,A())}catch(r){console.warn('Failed to evaluate function "'+e+'" with expression "'+t+'" and scope variables "'+d.join('", "')+'" set to "'+A().represent(o)+'": '+r+'. Set property to "undedefined".')}return r.self.renderProperties.includes(i)||r.forwardEvent(i,o),a})),c||this.setExternalPropertyValue(i,u);break;case"json":if(t){var f;try{f=JSON.parse(t)}catch(c){console.warn('Error occurred during parsing given json attribute "'+e+'": '+A().represent(c));break}this.setInternalPropertyValue(i,f),this.setExternalPropertyValue(i,A().copy(f,1))}else this.setInternalPropertyValue(i,null),this.setExternalPropertyValue(i,null);break;case w.number:case"number":if(null===t){this.setInternalPropertyValue(i,t),this.setExternalPropertyValue(i,t);break}var _=parseFloat(t);isNaN(_)&&(_=void 0),this.setInternalPropertyValue(i,_),this.setExternalPropertyValue(i,_);break;case w.string:case"string":this.setInternalPropertyValue(i,t),this.setExternalPropertyValue(i,t);break;case w.any:case w.array:case w.arrayOf:case w.element:case w.elementType:case w.instanceOf:case w.node:case w.object:case"object":case w.objectOf:case w.oneOf:case w.oneOfType:case w.shape:case w.exact:case w.symbol:default:if(t){var b=A().stringEvaluate(t,{},!1,this);if(b.error){console.warn('Error occurred during processing given attribute configuration "'+e+'":',b.error);break}this.setInternalPropertyValue(i,b.result),this.setExternalPropertyValue(i,A().copy(b.result,1))}else this.hasAttribute(e)?(this.setInternalPropertyValue(i,!0),this.setExternalPropertyValue(i,!0)):(this.setInternalPropertyValue(i,null),this.setExternalPropertyValue(i,null))}}},n.determineRenderScope=function(e){var t,r;void 0===e&&(e={}),this.scope=a()({},(null==(t=this.parent)?void 0:t.scope)||{},this.scope,this.internalProperties,((r={parent:this.parent,root:this.rootInstance,self:this})[A().stringLowerCase(this.self._name)||"instance"]=this,r),e),this.scope.scope=this.scope},n.applyShadowRootIfNotExisting=function(){this.self.shadowDOM&&this.root===this&&(this.root=(!("attachShadow"in this)&&"ShadyDOM"in window?window.ShadyDOM.wrap(this):this).attachShadow(null!==this.self.shadowDOM&&"object"==typeof this.self.shadowDOM?this.self.shadowDOM:{mode:"open"}))},n.render=function(e){if(void 0===e&&(e="unknown"),this.determineRenderScope(),this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}}))){var t=A().stringEvaluate("`"+this.self.content+"`",this.scope);if(t.error)console.warn("Faild to process template: "+t.error);else{this.applyShadowRootIfNotExisting();var r=document.createElement("div");r.innerHTML=t.result,this.applySlots(r,a()({},this.scope,{parent:this})),this.root.innerHTML=r.innerHTML,this.applyBindings(this.root.firstChild,this.scope,this.self.renderSlots)}}},t}(C),n.applyRootBinding=!0,n.content="<slot>Please provide a template to transclude.</slot>",n.determineRootBinding=!0,n.shadowDOM=null,n.observedAttributes=[],n.controllableProperties=[],n.eventToPropertyMapping={},n.propertyAliases={},n.propertyTypes={onClick:w.func},n.propertiesToReflectAsAttributes=[],n.renderProperties=["children"],n.cloneSlots=!1,n.evaluateSlots=!1,n.renderSlots=!0,n.trimSlots=!0,n.renderUnsafe=!1,n._name="BaseWeb",n._propertyAliasIndex=void 0,n._propertiesToReflectAsAttributes=void 0,t=n,r=y()(t.prototype,"isRoot",[e],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),t),S={component:T,register:function(e){return void 0===e&&(e=A().stringCamelCaseToDelimited(T._name)),customElements.define(e,T)}};h.default=T}(),h}())},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__7__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__8__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__9__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__10__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__11__},e=>{e.exports=__WEBPACK_EXTERNAL_MODULE__12__},,,,,,(e,t,r)=>{e.exports=r(19)},(e,t)=>{
|
2
|
-
/**
|
3
|
-
* @license React
|
4
|
-
* react.production.min.js
|
5
|
-
*
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
7
|
-
*
|
8
|
-
* This source code is licensed under the MIT license found in the
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
10
|
-
*/
|
11
|
-
var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,b={};function y(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||f}function m(){}function v(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||f}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=y.prototype;var g=v.prototype=new m;g.constructor=v,_(g,y.prototype),g.isPureReactComponent=!0;var A=Array.isArray,w=Object.prototype.hasOwnProperty,P={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var o,i={},s=null,a=null;if(null!=t)for(o in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)w.call(t,o)&&!E.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var p=Array(l),u=0;u<l;u++)p[u]=arguments[u+2];i.children=p}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:r,type:e,key:s,ref:a,props:i,_owner:P.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var T=/\/+/g;function S(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function R(e,t,o,i,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case r:case n:l=!0}}if(l)return s=s(l=e),e=""===i?"."+S(l,0):i,A(s)?(o="",null!=e&&(o=e.replace(T,"$&/")+"/"),R(s,t,o,"",(function(e){return e}))):null!=s&&(C(s)&&(s=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,o+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(T,"$&/")+"/")+e)),t.push(s)),1;if(l=0,i=""===i?".":i+":",A(e))for(var p=0;p<e.length;p++){var u=i+S(a=e[p],p);l+=R(a,t,o,u,s)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),p=0;!(a=e.next()).done;)l+=R(a=a.value,t,o,u=i+S(a,p++),s);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function N(e,t,r){if(null==e)return e;var n=[],o=0;return R(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function x(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var k={current:null},j={transition:null},D={ReactCurrentDispatcher:k,ReactCurrentBatchConfig:j,ReactCurrentOwner:P};t.Children={map:N,forEach:function(e,t,r){N(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return N(e,(function(){t++})),t},toArray:function(e){return N(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=o,t.Profiler=s,t.PureComponent=v,t.StrictMode=i,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=_({},e.props),i=e.key,s=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,a=P.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(p in t)w.call(t,p)&&!E.hasOwnProperty(p)&&(o[p]=void 0===t[p]&&void 0!==l?l[p]:t[p])}var p=arguments.length-2;if(1===p)o.children=n;else if(1<p){l=Array(p);for(var u=0;u<p;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:r,type:e.type,key:i,ref:s,props:o,_owner:a}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:x}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=j.transition;j.transition={};try{e()}finally{j.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return k.current.useCallback(e,t)},t.useContext=function(e){return k.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return k.current.useDeferredValue(e)},t.useEffect=function(e,t){return k.current.useEffect(e,t)},t.useId=function(){return k.current.useId()},t.useImperativeHandle=function(e,t,r){return k.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return k.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return k.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return k.current.useMemo(e,t)},t.useReducer=function(e,t,r){return k.current.useReducer(e,t,r)},t.useRef=function(e){return k.current.useRef(e)},t.useState=function(e){return k.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return k.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return k.current.useTransition()},t.version="18.2.0"}],__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};return(()=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ReactWeb:()=>l,api:()=>p,default:()=>u});var e=__webpack_require__(0),t=__webpack_require__.n(e),r=__webpack_require__(1),n=__webpack_require__(18),o=__webpack_require__(11),i=__webpack_require__(12),s=__webpack_require__(6),a=__webpack_require__.n(s);class l extends(a()){constructor(){super(...arguments),this.compiledSlots={},this.preparedSlots={},this.reactRoot=null,this.rootReactInstance=null,this.self=l,this.wrapMemorizingWrapper=null,this.isWrapped=!1,this.reflectInstanceProperties=()=>{this.instance?.current&&this.instance.current.properties&&this.reflectProperties(this.instance.current.properties)}}connectedCallback(){this.applyComponentWrapper(),this.rootReactInstance=this,super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}reflectExternalProperties(e){this.isRoot&&super.reflectExternalProperties(e)}render(e){if(void 0===e&&(e="unknown"),this.rootReactInstance===this&&this.dispatchEvent(new CustomEvent("render",{detail:{reason:e,scope:this.scope}}))){if(this.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&this.preCompileSlots(),this.evaluateSlots({...this.scope,parent:this}),this.prepareProperties(this.internalProperties),this.applyShadowRootIfNotExisting(),this.root!==this){let e=this.firstChild;for(;e;){const t=e.nextSibling;this.removeChild(e),e=t}}this.reactRoot||(this.reactRoot=(0,i.createRoot)(this.root,{identifierPrefix:String(this.id||this.internalProperties.id||this.externalProperties.id||this.name||this.internalProperties.name||this.externalProperties.name)})),(0,o.flushSync)((()=>this.reactRoot.render((0,n.createElement)(this.self.content,this.internalProperties)))),this.instance?.current?this.reflectInstanceProperties():t().timeout(this.reflectInstanceProperties)}}setPropertyValue(e,r){this.reflectProperties({[e]:t().copy(r,1)}),this.setInternalPropertyValue(e,t().copy(r,1))}setInternalPropertyValue(e,t){null===t?t=r.NullSymbol:void 0===t&&(t=r.UndefinedSymbol),super.setInternalPropertyValue(e,t)}preCompileDomNodes(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r=!1),1===(e=e.filter((e=>e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&""!==e.nodeValue.trim()))).length)return this.preCompileDomNode(e[0],t,r);let o=1;const i=[];for(const n of e){const e=this.preCompileDomNode(n,t,r,o.toString());e&&(i.push(e),o+=1)}return r?e=>function(){const t=[];for(const r of i){const n=r(e);"function"==typeof n&&t.push(n(...arguments))}return(0,n.createElement)(n.Fragment,{children:t})}:i}preCompileDomNode(e,r,o,i){if(void 0===r&&(r={}),void 0===o&&(o=!1),o){const t=this.preCompileDomNode(e,{...r,data:void 0,firstArgument:void 0,firstParameter:void 0,options:void 0,scope:void 0,parameters:void 0},!1,i);return e=>function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];const i=n.length>0?n[0]:null;return t({...e,data:i,firstArgument:i,firstParameter:i,options:i,scope:i,parameters:n})}}if(e.nodeType===Node.TEXT_NODE){const t="string"==typeof e.nodeValue?e.nodeValue.trim():"",r=i&&t?(0,n.createElement)(n.Fragment,{children:t,key:i}):t||null;return()=>r}if(!e.getAttributeNames)return()=>null;let s,a;const l=this.self.isReactComponent(e);l?(e.determineRenderScope(),0===Object.keys(this.compiledSlots).length&&e.preCompileSlots(),s=e.internalProperties,i&&!Object.prototype.hasOwnProperty.call(s,"key")&&(s.key=i),a=e.constructor.content):(s={key:i},a=e.tagName.toLowerCase());let p=Object.keys(r);const u={};for(const n of e.getAttributeNames()){let o=e.getAttribute(n);if(null===o)continue;let i=!1,a="";if(n.startsWith("data-bind-")?a=n.substring("data-bind-".length):n.startsWith("bind-")&&(a=n.substring("bind-".length)),a.startsWith("attribute-")||"attributes"===a||a.startsWith("property-")||"properties"===a){const{error:r,originalScopeNames:s,templateFunction:l}=t().stringCompile(o,p);if(r){console.warn(`Error occurred during compiling given attribute binding "${n}" on node:`,e,r);continue}"attributes"===a||"properties"===a?i=!0:a=a.startsWith("attribute-")?a.substring("attribute-".length):a.substring("property-".length),o={originalScopeNames:s,templateFunction:l.bind(this)}}else if(a.startsWith("on-")){a=t().stringDelimitedToCamelCase(a),Object.prototype.hasOwnProperty.call(r,"event")||(p=[...p,"event"]),Object.prototype.hasOwnProperty.call(r,"parameters")||(p=[...p,"parameters"]);const{error:i,originalScopeNames:s,scopeNames:l,templateFunction:u}=t().stringCompile(o,p,!0);if(i){console.warn(`Error occurred during compiling given event binding "${n}" on node:`,e,i);continue}const c=u.bind(this);o=function(){for(var i=arguments.length,a=new Array(i),p=0;p<i;p++)a[p]=arguments[p];r.event=a[0],r.parameters=a;try{c(...s.map((e=>r[e])))}catch(r){console.warn(`Error occurred during processing given event binding "${n}" on node: `,e,`Given expression "${o}" could not be evaluated with given scope names "${l.join('", "')}": `+t().represent(r))}}}else a=n;const l={class:"className",for:"htmlFor"};Object.prototype.hasOwnProperty.call(l,a)&&(a=l[a]),a=t().stringDelimitedToCamelCase(a),o?.originalScopeNames?u[i?"":a]=o:s[a]=o}if(!l){const t=Array.from(e.childNodes);t.length&&(s.children=this.preCompileDomNodes(t,r))}return t=>{(t={...r,...t}).scope=t;let o={...s};for(const[e,{originalScopeNames:r,templateFunction:n}]of Object.entries(u)){const i=n(...r.map((e=>t[e])));""===e?o={...o,...i}:o[e]=i}return Object.prototype.hasOwnProperty.call(o,"innerHTML")&&(o.dangerouslySetInnerHTML={__html:o.innerHTML},delete o.children,delete o.innerHTML),Object.prototype.hasOwnProperty.call(o,"textContent")?(o.children=o.textContent,delete o.textContent):l?(e.evaluateSlots({...o,...t,parent:e}),e.prepareProperties(o),t={...o,...t,parent:e}):o.children&&(o.children=this.evaluatePreCompiledDomNodes(o.children,t)),(0,n.createElement)(a,o)}}evaluatePreCompiledDomNodes(e,t){if(void 0===t&&(t={}),!Array.isArray(e))return e(t);if(1===e.length)return e[0](t);const r=[];for(const n of e){const e=n(t);e&&r.push(e)}return r}preCompileSlots(){for(const e in this.slots)Object.prototype.hasOwnProperty.call(this.slots,e)&&"default"!==e&&(this.compiledSlots[e]=this.preCompileDomNode(this.slots[e],{...this.scope,parent:this},[r.func,"function"].includes(this.self.propertyTypes&&this.self.propertyTypes[e])));this.slots.default&&this.slots.default.length>0&&(this.compiledSlots.children=this.preCompileDomNodes(this.slots.default,{...this.scope,parent:this},[r.func,"function"].includes(this.self.propertyTypes?.children)))}evaluateSlots(e){this.preparedSlots={};for(const t in this.compiledSlots)Object.prototype.hasOwnProperty.call(this.compiledSlots,t)&&("children"===t?this.preparedSlots.children=this.evaluatePreCompiledDomNodes(this.compiledSlots[t],e):this.preparedSlots[t]=this.compiledSlots[t](e))}static isReactComponent(e){const t=e.constructor;return"object"==typeof t.content&&(!1===t.attachWebComponentAdapterIfNotExists||"react"===t.content.webComponentAdapterWrapped)}determineRootBinding(){super.determineRootBinding();let e=this.parentNode;for(;e;){if(this.self.isReactComponent(e)){this.rootReactInstance=e;break}e=e.parentNode}}applyComponentWrapper(){if("string"==typeof this.self.content||this.isWrapped)return;this.isWrapped=!0;const e=this.self.content.wrapped||this.self.content;this.self.content.webComponentAdapterWrapped?this.wrapMemorizingWrapper&&(this.self.content=(0,n.memo)(this.self.content),this.self.content.wrapped=e):this.self.attachWebComponentAdapterIfNotExists?(this.self.content.displayName||(this.self.content.displayName=this.self._name),this.self.content=(0,n.forwardRef)(((t,r)=>((0,n.useImperativeHandle)(r,(()=>({properties:t}))),(0,n.createElement)(e,t)))),(this.wrapMemorizingWrapper||null===this.wrapMemorizingWrapper)&&(this.self.content=(0,n.memo)(this.self.content)),this.self.content.wrapped=e,this.self.content.webComponentAdapterWrapped="react"):this.wrapMemorizingWrapper&&(this.self.content=(0,n.memo)(this.self.content),this.self.content.wrapped=e)}prepareProperties(e){t().extend(e,this.preparedSlots),this.self.removeKnownUnwantedPropertyKeys(this.self,e),e.ref||(this.instance=(0,n.createRef)(),e.ref=this.instance)}static removeKnownUnwantedPropertyKeys(e,t){if("string"!=typeof e.content)for(const r of["isRoot","isTrusted","__composed"])Object.prototype.hasOwnProperty.call(t,r)&&(Object.prototype.hasOwnProperty.call(e.content,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.propTypes,r)||Object.prototype.hasOwnProperty.call(e.content,"wrapped")&&Object.prototype.hasOwnProperty.call(e.content.wrapped,"propTypes")&&!Object.prototype.hasOwnProperty.call(e.content.wrapped.propTypes,r))&&delete t[r]}}l.attachWebComponentAdapterIfNotExists=!0,l.content="div",l.react=n,l._name="ReactWebComponent";const p={component:l,register:function(e){return void 0===e&&(e=t().stringCamelCaseToDelimited(l._name)),customElements.define(e,l)}},u=l})(),__webpack_exports__})()));
|
File without changes
|