@ecopages/radiant 0.3.0-alpha.8 → 0.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/README.md +315 -0
- package/dist/client/app-bootstrap.d.ts +19 -0
- package/dist/client/app-bootstrap.js +3 -0
- package/dist/client/app-bootstrap.js.map +10 -0
- package/dist/context/decorators/consume-context.js +2 -2
- package/dist/context/decorators/consume-context.js.map +4 -4
- package/dist/context/decorators/context-selector.js +2 -2
- package/dist/context/decorators/context-selector.js.map +8 -7
- package/dist/context/decorators/legacy/consume-context.js +2 -2
- package/dist/context/decorators/legacy/consume-context.js.map +4 -4
- package/dist/context/decorators/legacy/context-selector-field.js +2 -2
- package/dist/context/decorators/legacy/context-selector-field.js.map +4 -4
- package/dist/context/decorators/legacy/context-selector.js +2 -2
- package/dist/context/decorators/legacy/context-selector.js.map +4 -4
- package/dist/context/decorators/legacy/provide-context.js +2 -2
- package/dist/context/decorators/legacy/provide-context.js.map +4 -4
- package/dist/context/decorators/on-context-update.js +2 -2
- package/dist/context/decorators/on-context-update.js.map +4 -4
- package/dist/context/decorators/provide-context.js +2 -2
- package/dist/context/decorators/provide-context.js.map +4 -4
- package/dist/context/decorators/standard-legacy-dispatch.d.ts +6 -0
- package/dist/context/decorators/standard-legacy-dispatch.js +3 -0
- package/dist/context/decorators/standard-legacy-dispatch.js.map +10 -0
- package/dist/context/index.js +2 -2
- package/dist/context/index.js.map +11 -10
- package/dist/controller-registry.js +2 -2
- package/dist/controller-registry.js.map +3 -3
- package/dist/core/event-subscription-registry.d.ts +16 -0
- package/dist/core/event-subscription-registry.js +3 -0
- package/dist/core/event-subscription-registry.js.map +10 -0
- package/dist/core/host-ssr-registry.d.ts +13 -0
- package/dist/core/host-ssr-registry.js +3 -0
- package/dist/core/host-ssr-registry.js.map +10 -0
- package/dist/core/hydration-capable-host.d.ts +8 -0
- package/dist/core/hydration-capable-host.js +3 -0
- package/dist/core/hydration-capable-host.js.map +10 -0
- package/dist/core/radiant-controller.d.ts +36 -15
- package/dist/core/radiant-controller.js +2 -2
- package/dist/core/radiant-controller.js.map +13 -6
- package/dist/core/{radiant-component-ssr.d.ts → radiant-element-ssr-host.d.ts} +16 -16
- package/dist/core/radiant-element-ssr-host.js +3 -0
- package/dist/core/radiant-element-ssr-host.js.map +10 -0
- package/dist/core/radiant-element-ssr-registry.d.ts +18 -0
- package/dist/core/radiant-element-ssr-registry.js +3 -0
- package/dist/core/radiant-element-ssr-registry.js.map +10 -0
- package/dist/core/radiant-element.d.ts +38 -138
- package/dist/core/radiant-element.js +2 -2
- package/dist/core/radiant-element.js.map +21 -10
- package/dist/core/reactive-host.d.ts +3 -16
- package/dist/core/reactive-host.js +2 -2
- package/dist/core/reactive-host.js.map +7 -4
- package/dist/core/reactive-jsx-value.d.ts +2 -1
- package/dist/core/reactive-jsx-value.js.map +2 -2
- package/dist/core/reactive-prop-core.d.ts +44 -0
- package/dist/core/reactive-prop-core.js +3 -0
- package/dist/core/reactive-prop-core.js.map +11 -0
- package/dist/core/reactive-prop-metadata.d.ts +1 -1
- package/dist/core/reactive-prop-metadata.js +2 -2
- package/dist/core/reactive-prop-metadata.js.map +2 -2
- package/dist/core/reactive-property-state.d.ts +17 -0
- package/dist/core/reactive-property-state.js +3 -0
- package/dist/core/reactive-property-state.js.map +12 -0
- package/dist/core/reactivity-adapter.d.ts +8 -0
- package/dist/core/reactivity-adapter.js +3 -0
- package/dist/core/reactivity-adapter.js.map +12 -0
- package/dist/core/reactivity-contract.d.ts +39 -0
- package/dist/core/reactivity-contract.js +2 -0
- package/dist/core/reactivity-contract.js.map +9 -0
- package/dist/core/reactivity-runtime.d.ts +18 -0
- package/dist/core/reactivity-runtime.js +3 -0
- package/dist/core/reactivity-runtime.js.map +11 -0
- package/dist/core/reactivity-signals.d.ts +10 -0
- package/dist/core/reactivity-signals.js +3 -0
- package/dist/core/reactivity-signals.js.map +10 -0
- package/dist/core/render-runtime.d.ts +28 -0
- package/dist/core/render-runtime.js +3 -0
- package/dist/core/render-runtime.js.map +16 -0
- package/dist/core/render-scheduler.d.ts +22 -0
- package/dist/core/render-scheduler.js +3 -0
- package/dist/core/render-scheduler.js.map +10 -0
- package/dist/core/slot-projection-runtime.js +2 -2
- package/dist/core/slot-projection-runtime.js.map +3 -3
- package/dist/decorators/attr.js +2 -2
- package/dist/decorators/attr.js.map +6 -5
- package/dist/decorators/controller.js +2 -2
- package/dist/decorators/controller.js.map +3 -3
- package/dist/decorators/event.js +2 -2
- package/dist/decorators/event.js.map +3 -3
- package/dist/decorators/legacy/attr.js +2 -2
- package/dist/decorators/legacy/attr.js.map +6 -5
- package/dist/decorators/legacy/event.js +2 -2
- package/dist/decorators/legacy/event.js.map +3 -3
- package/dist/decorators/legacy/host-readiness.d.ts +8 -0
- package/dist/decorators/legacy/host-readiness.js +3 -0
- package/dist/decorators/legacy/host-readiness.js.map +11 -0
- package/dist/decorators/legacy/instance-initializers.d.ts +16 -0
- package/dist/decorators/legacy/instance-initializers.js +2 -2
- package/dist/decorators/legacy/instance-initializers.js.map +3 -3
- package/dist/decorators/legacy/on-event.js +2 -2
- package/dist/decorators/legacy/on-event.js.map +6 -5
- package/dist/decorators/legacy/on-updated.d.ts +1 -1
- package/dist/decorators/legacy/on-updated.js +2 -2
- package/dist/decorators/legacy/on-updated.js.map +4 -4
- package/dist/decorators/legacy/query-slot.js +2 -2
- package/dist/decorators/legacy/query-slot.js.map +5 -5
- package/dist/decorators/legacy/query.js +2 -2
- package/dist/decorators/legacy/query.js.map +3 -3
- package/dist/decorators/legacy/reactive-field.js +2 -2
- package/dist/decorators/legacy/reactive-field.js.map +3 -3
- package/dist/decorators/legacy/reactive-prop.d.ts +1 -1
- package/dist/decorators/legacy/reactive-prop.js +2 -2
- package/dist/decorators/legacy/reactive-prop.js.map +7 -6
- package/dist/decorators/legacy/signal.d.ts +1 -1
- package/dist/decorators/legacy/signal.js +2 -2
- package/dist/decorators/legacy/signal.js.map +6 -5
- package/dist/decorators/on-event.js +2 -2
- package/dist/decorators/on-event.js.map +6 -5
- package/dist/decorators/on-updated.js +2 -2
- package/dist/decorators/on-updated.js.map +4 -4
- package/dist/decorators/prop.d.ts +1 -1
- package/dist/decorators/prop.js +2 -2
- package/dist/decorators/prop.js.map +9 -8
- package/dist/decorators/query-slot.js +2 -2
- package/dist/decorators/query-slot.js.map +6 -6
- package/dist/decorators/query.js +2 -2
- package/dist/decorators/query.js.map +3 -3
- package/dist/decorators/shared/reactive-attr.d.ts +1 -1
- package/dist/decorators/shared/reactive-attr.js +2 -2
- package/dist/decorators/shared/reactive-attr.js.map +5 -4
- package/dist/decorators/signal.js +2 -2
- package/dist/decorators/signal.js.map +7 -6
- package/dist/decorators/standard/attr.js +2 -2
- package/dist/decorators/standard/attr.js.map +5 -4
- package/dist/decorators/standard/on-event.js +2 -2
- package/dist/decorators/standard/on-event.js.map +5 -4
- package/dist/decorators/standard/query-slot.d.ts +0 -1
- package/dist/decorators/standard/query-slot.js +2 -2
- package/dist/decorators/standard/query-slot.js.map +4 -4
- package/dist/decorators/standard/reactive-field.js +2 -2
- package/dist/decorators/standard/reactive-field.js.map +3 -3
- package/dist/decorators/standard/reactive-prop.d.ts +1 -1
- package/dist/decorators/standard/reactive-prop.js +2 -2
- package/dist/decorators/standard/reactive-prop.js.map +6 -5
- package/dist/decorators/standard/signal.d.ts +1 -1
- package/dist/decorators/standard/signal.js +2 -2
- package/dist/decorators/standard/signal.js.map +5 -4
- package/dist/decorators/state.js +2 -2
- package/dist/decorators/state.js.map +4 -4
- package/dist/helpers/create-event-listener.js +2 -2
- package/dist/helpers/create-event-listener.js.map +5 -4
- package/dist/helpers/create-query-slot.d.ts +0 -1
- package/dist/helpers/create-query-slot.js +2 -2
- package/dist/helpers/create-query-slot.js.map +3 -3
- package/dist/helpers/index.js +2 -2
- package/dist/helpers/index.js.map +6 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +37 -25
- package/dist/package.json +209 -0
- package/dist/server/host-attribute-serialization.d.ts +46 -0
- package/dist/server/host-attribute-serialization.js +3 -0
- package/dist/server/host-attribute-serialization.js.map +12 -0
- package/dist/server/host-script-composition.d.ts +42 -0
- package/dist/server/host-script-composition.js +3 -0
- package/dist/server/host-script-composition.js.map +10 -0
- package/dist/server/install-light-dom-shim.js +2 -2
- package/dist/server/install-light-dom-shim.js.map +3 -3
- package/dist/server/internal-radiant-host.d.ts +2 -0
- package/dist/server/internal-radiant-host.js +3 -0
- package/dist/server/internal-radiant-host.js.map +9 -0
- package/dist/server/light-dom-shim.d.ts +9 -0
- package/dist/server/light-dom-shim.js +2 -2
- package/dist/server/light-dom-shim.js.map +3 -3
- package/dist/server/radiant-element-ssr-bridge.d.ts +21 -0
- package/dist/server/radiant-element-ssr-bridge.js +3 -0
- package/dist/server/radiant-element-ssr-bridge.js.map +24 -0
- package/dist/server/radiant-element-ssr-extractor.d.ts +2 -0
- package/dist/server/radiant-element-ssr-extractor.js +3 -0
- package/dist/server/radiant-element-ssr-extractor.js.map +12 -0
- package/dist/server/radiant-element-ssr-service.d.ts +13 -0
- package/dist/server/radiant-element-ssr-service.js +3 -0
- package/dist/server/radiant-element-ssr-service.js.map +22 -0
- package/dist/server/radiant-element-ssr.d.ts +1 -0
- package/dist/server/radiant-element-ssr.js +3 -0
- package/dist/server/radiant-element-ssr.js.map +24 -0
- package/dist/server/render-component.d.ts +3 -9
- package/dist/server/render-component.js +2 -2
- package/dist/server/render-component.js.map +17 -9
- package/dist/server/render-controller.js +2 -2
- package/dist/server/render-controller.js.map +19 -11
- package/dist/server/render-fragment.d.ts +7 -0
- package/dist/server/render-fragment.js +3 -0
- package/dist/server/render-fragment.js.map +10 -0
- package/dist/server/slot-projection-html.js +2 -2
- package/dist/server/slot-projection-html.js.map +3 -3
- package/dist/tools/escape-css-identifier.d.ts +1 -0
- package/dist/tools/escape-css-identifier.js +3 -0
- package/dist/tools/escape-css-identifier.js.map +10 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +2 -2
- package/dist/tools/index.js.map +4 -3
- package/dist/utils/escape-html-attribute.d.ts +2 -0
- package/dist/utils/escape-html-attribute.js +3 -0
- package/dist/utils/escape-html-attribute.js.map +10 -0
- package/package.json +12 -5
- package/dist/core/radiant-component-ssr-registry.d.ts +0 -54
- package/dist/core/radiant-component-ssr-registry.js +0 -3
- package/dist/core/radiant-component-ssr-registry.js.map +0 -10
- package/dist/core/radiant-component-ssr.js +0 -3
- package/dist/core/radiant-component-ssr.js.map +0 -14
- package/dist/server/radiant-component-ssr-runtime.d.ts +0 -9
- package/dist/server/radiant-component-ssr-runtime.js +0 -3
- package/dist/server/radiant-component-ssr-runtime.js.map +0 -17
- package/size-budget.json +0 -25
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var _P=((P)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(P,{get:($,j)=>(typeof require<"u"?require:$)[j]}):P)(function(P){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+P+'" is not supported')});var i=Symbol.for("@ecopages/radiant.component-ssr-runtime");function I(){return globalThis[i]}function r(P){globalThis[i]=P}function n(P){switch(P){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function VP(P){switch(typeof P){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(P))return"array";if(Object.prototype.toString.call(P)==="[object Object]")return"object"}function gP(P){switch(P){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function zP(P){try{return JSON.parse(P)}catch{throw TypeError("Invalid JSON string")}}var CP={array(P){let $=zP(P);if(!Array.isArray($))throw TypeError(`Expected an array but got a value of type "${typeof $}"`);return $},boolean(P){return!(P==="0"||String(P).toLowerCase()==="false")},number(P){return Number(P.replace(/_/g,""))},object(P){let $=JSON.parse(P);if($===null||typeof $!=="object"||Array.isArray($))throw TypeError(`expected value of type "object" but instead got value "${P}" of type "${VP($)}"`);return $},string(P){return P}},a={default:l,array:t,object:t};function t(P){return JSON.stringify(P)}function l(P){return`${P}`}function o(P,$){let j=n($);if(!j)throw TypeError(`[radiant-element] Unknown type "${$}"`);return CP[j](P)}function e(P,$){let j=n($);if(!j)throw TypeError(`[radiant-element] Unknown type "${$}"`);return(a[j]??a.default??l)(P)}function EP(P){return typeof P==="boolean"}function NP(P){return typeof P==="number"}function SP(P){return typeof P==="string"}function OP(P){return Array.isArray(P)}function cP(P){return typeof P==="object"&&!Array.isArray(P)&&P!==null}function _1(P,$){switch(P){case Boolean:return EP($);case Number:return NP($);case String:return SP($);case Array:return OP($);case Object:return cP($);default:return!1}}var V1=(P,$,j,q)=>{if($===Boolean){let Q=P.getAttribute(j);if(Q===null)return q;return Q===""?!0:o(Q,$)}let H=P.getAttribute(j);return H!==null?o(H,$):q??gP($)};var PP=Symbol.for("@ecopages/radiant.controllerIdentifier");function C(P,$){P[PP]=$}function $P(P){return P[PP]}var J="data-controller",jP=Symbol.for("@ecopages/radiant.controller-registry-state");function MP(){let P=globalThis,$=P[jP];if($)return $;let j={activeRuntimes:new Set,controllerRegistrationStrategy:"keep-current",controllerRegistry:new Map};return P[jP]=j,j}var k=MP(),W=k.controllerRegistry,D=k.activeRuntimes;function qP(P){let $=P.getAttribute(J);if(!$)return[];return $.split(/\s+/).map((j)=>j.trim()).filter((j)=>j.length>0)}function x(P,$){if(P instanceof Element&&P.hasAttribute(J))$(P);for(let j of Array.from(P.querySelectorAll(`[${J}]`)))$(j)}class HP{root;controllersByElement=new Map;observer;stopped=!1;constructor(P=document){this.root=P;this.start()}stop(){if(this.stopped)return;this.stopped=!0,this.observer?.disconnect(),this.observer=void 0;for(let[P,$]of this.controllersByElement)for(let[j]of $)this.disconnectController(P,j);D.delete(this)}reconcileRegisteredController(P){x(this.root,($)=>{if(!qP($).includes(P))return;this.connectController($,P)})}replaceRegisteredController(P){for(let[$,j]of Array.from(this.controllersByElement.entries())){if(!j.has(P))continue;this.disconnectController($,P)}this.reconcileRegisteredController(P)}start(){if(x(this.root,($)=>{this.reconcileElement($)}),typeof MutationObserver>"u"){D.add(this);return}this.observer=new MutationObserver(($)=>{for(let j of $){if(j.type==="attributes"&&j.target instanceof Element){this.reconcileElement(j.target);continue}for(let q of Array.from(j.removedNodes)){if(!(q instanceof Element))continue;x(q,(H)=>{this.disconnectElementControllers(H)})}for(let q of Array.from(j.addedNodes)){if(!(q instanceof Element))continue;x(q,(H)=>{this.reconcileElement(H)})}}});let P=this.root instanceof Document?this.root.documentElement:this.root;this.observer.observe(P,{attributeFilter:[J],attributes:!0,childList:!0,subtree:!0}),D.add(this)}reconcileElement(P){let $=new Set(qP(P)),j=this.controllersByElement.get(P);if(j){for(let q of j.keys())if(!$.has(q))this.disconnectController(P,q)}for(let q of $)this.connectController(P,q)}connectController(P,$){let j=W.get($);if(!j)return;let q=this.controllersByElement.get(P);if(!q)q=new Map,this.controllersByElement.set(P,q);if(q.has($))return;let H=new j(P);q.set($,H),H.connect()}disconnectController(P,$){let j=this.controllersByElement.get(P);if(!j)return;let q=j.get($);if(!q)return;if(q.disconnect(),j.delete($),j.size===0)this.controllersByElement.delete(P)}disconnectElementControllers(P){let $=this.controllersByElement.get(P);if(!$)return;for(let j of Array.from($.keys()))this.disconnectController(P,j)}}function sP(P,$){let j=W.get(P);if(j)return j;C($,P),W.set(P,$);for(let q of Array.from(D))q.reconcileRegisteredController(P);return $}function E1(P){return W.has(P)}function N1(P){return W.get(P)}function uP(P,$){if(W.get(P)===$)return $;C($,P),W.set(P,$);for(let q of Array.from(D))q.replaceRegisteredController(P);return $}function QP(P){k.controllerRegistrationStrategy=P}function S1(){QP("replace")}function O1(){QP("keep-current")}function c1(P,$){if(k.controllerRegistrationStrategy==="replace")return uP(P,$);return sP(P,$)}function M1(P=document){return new HP(P)}function s1(){for(let P of Array.from(D))P.stop()}var ZP=Symbol.for("@ecopages/radiant.customElementTagName");function v1(P,$){P[ZP]=$}function A(P){return P[ZP]}var E=Symbol.for("@ecopages/radiant.reactivePropDefinitions");function d1(P,$,j){let q=P.constructor,H=q[E]??[];if(H.some((Q)=>Q.name===$))return;H.push({name:$,options:j}),q[E]=H}function FP(P){return(P.constructor[E]??[]).slice()}var yP=Symbol.for("@ecopages/radiant.ssr-context-provider-resolver");function JP(){return globalThis}function WP(P){JP()[yP]=P}function i1(P){return JP()[yP]?.(P)}var Y;function RP(){if(Y!==void 0)return Y;try{let{AsyncLocalStorage:P}=(()=>{throw new Error("Cannot require module "+"node:async_hooks");})();return Y=new P,Y}catch{return Y=null,null}}var hP=Symbol.for("@ecopages/radiant.ssr-context-fallback-stack");function DP(){let P=globalThis;return P[hP]??=[],P[hP]}function b(P){if(P.length===0)return()=>{return};let $=new Map;for(let H of P)$.set(H.getContextKey(),H);let j=RP();if(j){let H=j.getStore()??[],Q=[...H,$];return j.enterWith(Q),()=>{j.enterWith(H)}}let q=DP();return q.push($),()=>{let H=q.lastIndexOf($);if(H>=0)q.splice(H,1)}}function GP(P){let $=RP()?.getStore()??DP();for(let j=$.length-1;j>=0;j-=1){let q=$[j]?.get(P);if(q)return q}return}function t1(P){let $=GP(P);if(!$)return;return $.getContext()}WP((P)=>GP(P));class N{host;constructor(P){this.host=P}renderHost(){return{nodeType:1,outerHTML:this.renderHostToString({mode:"hydrate"})}}renderHostToString(P={},$=this.getHostAttributes()){let j=this.getTagName(),q=b(this.host.getContextProviders());try{return`<${j}${vP($)}>${this.renderHostContent(P)}</${j}>`}finally{q()}}renderHostContent(P){let $=this.host.renderToString(P),j=this.host.getAuthoredHydrationScriptMarkup?.()??"",q=this.host.getSlotProjectionScriptTag?.()??"";if(!(P.mode==="hydrate"||P.mode===void 0&&P.hydrate===!0))return`${$}${j}${q}`;let Q=this.host.getHydrationBindings().map((Z)=>Z.renderHydrationScriptTag()).filter((Z)=>typeof Z==="string").join("");return`${$}${q}${Q}`}getHostAttributes(){let P={},$=new Set;for(let j of this.host.getReactiveProperties()){let q=this.host.getPropertyValue(j.name);if(q===void 0||q===null||q===!1)continue;P[j.attribute]=String(j.converter.toAttribute(q)),$.add(j.attribute)}for(let j of this.host.getReactivePropDefinitions()){let q=j.options.attribute??j.name;if($.has(q))continue;let H=this.host.getPropertyValue(j.name);if(H===void 0||H===null||H===!1)continue;P[q]=String(e(H,j.options.type)),$.add(q)}for(let j of this.host.listAttributeNames()){let q=this.host.getAttributeValue(j);if(q!==null)P[j]=q}return P}getTagName(){let P=A(this.host.constructor);if(!P)throw Error(`${this.host.constructor.name} is missing @customElement metadata.`);return P}}function vP(P){return Object.entries(P).map(([$,j])=>` ${$}="${pP(j)}"`).join("")}function pP(P){return P.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}import{renderToString as dP}from"@ecopages/jsx/server";import{withServerCustomElementRenderHook as mP}from"@ecopages/jsx/server";var iP=Symbol.for("@ecopages/jsx.active-ssr-hydrate"),S=new WeakSet;function rP(P){return{nodeType:1,outerHTML:UP(P,{mode:"hydrate"})}}function UP(P,$={}){return YP(P).renderHostToString($,XP(P))}function XP(P){let $=P;if(S.has(P))return YP(P).getHostAttributes();S.add(P);try{return $.getHostSsrAttributes()}finally{S.delete(P)}}function YP(P){let $=P;return new N({constructor:$.constructor,getAuthoredHydrationScriptMarkup:()=>$.getAuthoredHydrationScriptMarkup(),getHydrationBindings:()=>$.getHydrationBindings(),getSlotProjectionScriptTag:()=>$.getSlotProjectionScriptTag(),renderToString:(j)=>$.renderToString(j),getContextProviders:()=>$.getContextProviders(),getReactiveProperties:()=>$.getReactiveProperties(),getReactivePropDefinitions:()=>FP(P),getPropertyValue:(j)=>$[j],listAttributeNames:()=>typeof $.getAttributeNames==="function"?$.getAttributeNames():[],getAttributeValue:(j)=>$.getAttribute(j)})}function aP(P){return mP(({instance:$})=>{let j=KP($);if(!j?.renderHostToString)return;let q=j.renderHostToString;return{nodeType:1,get outerHTML(){let H=tP();return q({hydrate:H,mode:H?"hydrate":"plain"})}}},P)}function KP(P){return P.resolveSsrRenderBridge?.()}function tP(){return globalThis[iP]===!0}function G(){let P=I();if(P)return P;let $={getHostAttributes:XP,renderHost:rP,renderHostToString:UP,resolveRenderBridge:KP,renderView:(j,q={})=>{let H=j;return aP(()=>dP(H.resolveTrackedRenderOutput().value,q))}};return r($),$}G();var B=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function fP(P){let $=[],j=0;while(j<P.length){let q=j;if(P.startsWith("<!--",j)){let Z=P.indexOf("-->",j+4);j=Z===-1?P.length:Z+3,$.push(P.slice(q,j));continue}if(P[j]!=="<"){let Z=P.indexOf("<",j);j=Z===-1?P.length:Z,$.push(P.slice(q,j));continue}let H=K(P,j);if(!H){$.push(P.slice(q));break}if(H.type!=="open"||H.selfClosing||B.has(H.tagName)){j=H.end,$.push(P.slice(q,j));continue}j=H.end;let Q=1;while(j<P.length&&Q>0){let Z=P.indexOf("<",j);if(Z===-1){j=P.length;break}let F=K(P,Z);if(!F){j=P.length;break}if(j=F.end,F.type==="comment"||F.type==="declaration")continue;if(F.type==="open"&&!F.selfClosing&&!B.has(F.tagName)){Q+=1;continue}if(F.type==="close")Q-=1}$.push(P.slice(q,j))}return $.filter((q)=>q!=="")}function oP(P,$){let j;for(let q=$+1;q<P.length;q+=1){let H=P[q];if(j){if(H===j)j=void 0;continue}if(H==='"'||H==="'"){j=H;continue}if(H===">")return q+1}return P.length}function nP(P){let $={},j=/([:^@A-Za-z0-9_.-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>/]+)))?/g;for(let q of P.matchAll(j)){let[,H,Q,Z,F]=q;if(!H)continue;$[H]=Q??Z??F??""}return $}function K(P,$){if(P.startsWith("<!--",$)){let R=P.indexOf("-->",$+4);return{end:R===-1?P.length:R+3,type:"comment"}}let j=oP(P,$),q=P.slice($+1,j-1).trim();if(q==="")return;if(q.startsWith("!")||q.startsWith("?"))return{end:j,type:"declaration"};if(q.startsWith("/"))return{end:j,type:"close"};let H=/\/\s*$/.test(q),Q=H?q.replace(/\/\s*$/,"").trim():q,Z=Q.split(/[\s/>]/,1)[0]?.toLowerCase()??"",F=Z.length,h=Q.slice(F).trim(),U=H||B.has(Z)?"":lP(P,$,j,Z);return{attributes:nP(h),end:j,innerHtml:U,selfClosing:H,tagName:Z,type:"open"}}function lP(P,$,j,q){let H=j,Q=1;while(H<P.length&&Q>0){let Z=P.indexOf("<",H);if(Z===-1)return P.slice(j);let F=K(P,Z);if(!F)return P.slice(j);if(F.type==="open"&&F.tagName===q&&!F.selfClosing&&!B.has(q))Q+=1;if(F.type==="close"){if(P.slice(Z+2,F.end-1).trim().toLowerCase()===q){if(Q-=1,Q===0)return P.slice(j,Z)}}H=F.end}return P.slice(j)}class y extends EventTarget{nodeType;static ELEMENT_NODE=1;static TEXT_NODE=3;childNodes=[];parentNode=null;constructor(P){super();this.nodeType=P}append(...P){for(let $ of P)this.appendChild(typeof $==="string"?O($):$)}appendChild(P){if("parentNode"in P&&P.parentNode&&"removeChild"in P.parentNode)P.parentNode.removeChild(P);return this.childNodes.push(P),P.parentNode=this,P}removeChild(P){let $=this.childNodes.indexOf(P);if($===-1)return P;return this.childNodes.splice($,1),P.parentNode=null,P}replaceChildren(...P){for(let $ of this.childNodes)$.parentNode=null;this.childNodes=[],this.append(...P)}get textContent(){return this.childNodes.map((P)=>P.textContent??"").join("")}set textContent(P){this.replaceChildren(P??"")}}class wP extends y{value;constructor(P){super(y.TEXT_NODE);this.value=P}get textContent(){return this.value}set textContent(P){this.value=P??""}}class L extends y{attributes=new Map;fragmentHtml;fragmentText;localName;tagName;constructor(P="div"){super(y.ELEMENT_NODE);this.localName=P.toLowerCase(),this.tagName=this.localName.toUpperCase()}hasAttribute(P){return this.attributes.has(P)}getAttribute(P){return this.attributes.get(P)??null}getAttributeNames(){return Array.from(this.attributes.keys())}setAttribute(P,$){this.fragmentHtml=void 0,this.attributes.set(P,String($))}removeAttribute(P){this.fragmentHtml=void 0,this.attributes.delete(P)}querySelector(){return null}querySelectorAll(){return[]}matches(){return!1}get outerHTML(){if(this.fragmentHtml!==void 0)return this.fragmentHtml;let P=Array.from(this.attributes.entries()).map(([$,j])=>` ${$}="${$1(j)}"`).join("");return`<${this.localName}${P}>${this.innerHTML}</${this.localName}>`}get innerHTML(){return this.childNodes.map((P)=>q1(P)).join("")}set innerHTML(P){this.fragmentHtml=void 0,this.fragmentText=void 0,this.replaceChildren(...AP(P))}get textContent(){return this.fragmentText??super.textContent??""}set textContent(P){this.fragmentHtml=void 0,this.fragmentText=P??"",super.textContent=P}setSerializedFragment(P,$,j){this.fragmentHtml=P,this.fragmentText=$,this.attributes=new Map(Object.entries(j)),this.replaceChildren()}}class _{bubbles;cancelable;composed;type;constructor(P,$={}){this.type=P,this.bubbles=$.bubbles??!1,this.cancelable=$.cancelable??!1,this.composed=$.composed??!1}}class c extends _{detail;constructor(P,$={}){super(P,$);this.detail=$.detail}}class w extends L{isConnected=!1;constructor(P="div"){super(P)}insertAdjacentHTML(P,$){this.append(...AP($))}}class T extends w{constructor(){super("script")}}class IP{definitions=new Map;define(P,$){if(this.definitions.has(P))return;this.definitions.set(P,$)}get(P){return this.definitions.get(P)}}var f;function O(P){return new wP(P)}function xP(){let P=globalThis,$=P.customElements;if(typeof P.Node>"u"||typeof P.Element>"u"||typeof P.HTMLElement>"u"||!$||typeof $.define!=="function"||typeof $.get!=="function")return;return P.window??{CustomEvent:P.CustomEvent??c,Element:P.Element,Event:P.Event??_,EventTarget:P.EventTarget??EventTarget,HTMLScriptElement:P.HTMLScriptElement??P.HTMLElement,HTMLElement:P.HTMLElement,Node:P.Node,customElements:$}}function M(){let P=xP();if(P)return P;return eP()}function kP(){return M(),{prepareHost(P,$={}){if($.authoredContent!==void 0)P.innerHTML=$.authoredContent}}}function eP(){let P=xP();if(P)return P;if(f)return f;let $=new IP,j=globalThis.Event??_,q=globalThis.CustomEvent??c,H=globalThis.EventTarget??EventTarget;return f={CustomEvent:q,Element:L,Event:j,EventTarget:H,HTMLScriptElement:T,HTMLElement:w,Node:y,customElements:$},Object.assign(globalThis,{CustomEvent:q,Element:L,Event:j,EventTarget:H,HTMLScriptElement:T,HTMLElement:w,Node:y,customElements:$,window:f}),f}function P1(P,$){let j=$.tagName==="script"?new T:new w($.tagName);return j.setSerializedFragment(P,j1($.innerHtml),$.attributes),j}function $1(P){return P.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function j1(P){return P.replace(/<!--.*?-->/gs,"").replace(/<[^>]+>/g,"")}function AP(P){return fP(P).map(($)=>{if(!$.startsWith("<"))return O($);let j=K($,0);if(!j||j.type!=="open")return O($);return P1($,j)})}function q1(P){if(P.nodeType===y.TEXT_NODE)return P.textContent??"";return"outerHTML"in P&&typeof P.outerHTML==="string"?P.outerHTML:P.textContent??""}G();function H1(P,$="hydrate"){return{kind:"script-module",src:P,stage:$}}function U$(P){return{kind:"modulepreload",href:P}}function X$(P,$){return $?{kind:"style",href:P,media:$}:{kind:"style",href:P}}async function Y$(P,$){return(await V(g(P,$))).markup}async function K$(P,$){return V(g(P,$))}async function f$(P,$){return s(await V(g(P,$)))}async function w$(P,$){return J1(await V(g(P,$)))}async function V(P){G();let $=P.environment??kP(),j=b(y1(P.ssrContext));try{let q="component"in P?P.component:await P.load(),H=new q;F1($,H,P.authoredContent,P.prepareHost),P.initialize?.(H);let Q=P.clientModuleSrc??await P.resolveClientModuleSrc?.(q),Z=P.assets??await P.resolveAssets?.(q)??[],F=u(Z,Q),h=v(F)??Q,U=P.tagName??D1(q),R=(P.now??W1)().toISOString(),X=p(P.renderOptions),d=Q1(H),m=d?.renderHostToString?.(X)??H.renderHostToString(X),TP=Z1(H,d,m);return{markup:m,metadata:{assets:F,clientModuleUrl:h,generatedAt:R,tagName:U},preview:TP}}finally{j()}}function Q1(P){return I()?.resolveRenderBridge(P)}function Z1(P,$,j){if(!$)return P.renderHost?.()??{nodeType:1,outerHTML:j};if(!$.renderHostToString&&$.renderHost)return{nodeType:1,outerHTML:j};return $.renderHost?.()??P.renderHost?.()??{nodeType:1,outerHTML:j}}function F1(P,$,j,q){if(!R1($)){if(j===void 0&&q===void 0)return;throw Error(`${$.constructor.name} cannot prepare SSR host content because it does not expose an innerHTML host surface.`)}P.prepareHost($,{authoredContent:j}),q?.($,P)}function y1(P){if(!P||P.length===0)return[];return P.map(($)=>({getContext:()=>$.value,getContextKey:()=>$.context,renderHydrationScript:()=>{return},renderHydrationScriptTag:()=>{return}}))}function s(P){if("metadata"in P)return{assets:P.metadata.assets,clientModuleSrc:P.metadata.clientModuleUrl,generatedAt:P.metadata.generatedAt,markup:P.markup,tagName:P.metadata.tagName};let{preview:$,...j}=P;return j}function J1(P){return{assets:P.metadata.assets,clientModuleSrc:P.metadata.clientModuleUrl,generatedAt:P.metadata.generatedAt,markup:P.markup,preview:P.preview,tagName:P.metadata.tagName}}function W1(){return new Date}function h1(P){if(!P)return[];return[H1(P)]}function u(P,$){if(!$)return P;if(P.some((j)=>j.kind==="script-module"&&j.src===$))return P;return[...h1($),...P]}function v(P){return P.find(($)=>$.kind==="script-module")?.src}function g(P,$){if(typeof P==="function")return{...$,component:P};return P}function p(P){if(P?.mode!==void 0||P?.hydrate!==void 0)return P;return{...P,mode:"hydrate"}}function R1(P){return"innerHTML"in P}function D1(P){let $=A(P);if(!$)throw Error(`${P.name} is missing @customElement metadata.`);return $}import{renderToString as G1}from"@ecopages/jsx/server";async function T$(P,$){return(await z(P,$)).markup}async function _$(P,$){return z(P,$)}async function V$(P,$){return s(await z(P,$))}async function g$(P,$){return U1(await z(P,$))}async function z(P,$){G();let j=Y1($.tagName),q=K1(j,f1(P,$)),H=new P(q);try{$.initialize?.(H),H.connectForSsrRender();let Q=$.clientModuleSrc??await $.resolveClientModuleSrc?.(P),Z=$.assets??await $.resolveAssets?.(P)??[],F=u(Z,Q),h=v(F)??Q,U=($.now??X1)().toISOString(),R=p($.renderOptions),X=k1(H,j,R);return{markup:X,metadata:{assets:F,clientModuleUrl:h,generatedAt:U,tagName:j},preview:{nodeType:1,outerHTML:X}}}finally{H.disconnectForSsrRender()}}function U1(P){return{assets:P.metadata.assets,clientModuleSrc:P.metadata.clientModuleUrl,generatedAt:P.metadata.generatedAt,markup:P.markup,preview:P.preview,tagName:P.metadata.tagName}}function X1(){return new Date}function Y1(P){let $=P.trim().toLowerCase();if(!$)throw Error("Controller SSR host tagName is required.");return $}function K1(P,$){M();let j=globalThis.document,q=j?j.createElement(P):new globalThis.HTMLElement(P);for(let[H,Q]of Object.entries($)){if(Q===void 0||Q===null||Q===!1)continue;q.setAttribute(H,Q===!0?"":String(Q))}return q}function f1(P,$){let j={},q=$.host,H=I1($.attributes?.class,q?.class,q?.classes);if(H!==void 0)j.class=H;bP(j,"data",q?.data),bP(j,"aria",q?.aria),w1(j,$.attributes);let Q=$P(P);if(Q&&j[J]==null)j[J]=Q;return j}function bP(P,$,j){if(!LP(j))return;for(let[q,H]of Object.entries(j))P[`${$}-${x1(q)}`]=H}function w1(P,$){if(!$)return;for(let[j,q]of Object.entries($))P[j]=q}function I1(...P){let $=[];for(let j of P)BP($,j);return $.length===0?void 0:$.join(" ")}function BP(P,$){if($===void 0||$===null||$===!1||$===!0)return;if(typeof $==="string"){if($!=="")P.push($);return}if(typeof $==="number"||typeof $==="bigint"){P.push(String($));return}if(Array.isArray($)){for(let j of $)BP(P,j);return}if(!LP($))return;for(let[j,q]of Object.entries($))if(q)P.push(j)}function LP(P){return Object.prototype.toString.call(P)==="[object Object]"}function x1(P){return P.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function k1(P,$,j){return`<${$}${A1(P.host)}>${G1(P.render(),j)}</${$}>`}function A1(P){return P.getAttributeNames().map(($)=>b1($,P.getAttribute($))).join("")}function b1(P,$){if($==="")return` ${P}`;return` ${P}="${B1($??"")}"`}function B1(P){return P.replaceAll("&","&").replaceAll('"',""").replaceAll("<","<").replaceAll(">",">")}export{g$ as renderControllerWithPreview,T$ as renderControllerToString,V$ as renderControllerToPayload,_$ as renderController};
|
|
1
|
+
var Z0=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(Q,$)=>(typeof require<"u"?require:Q)[$]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});var r=Symbol.for("@ecopages/radiant.reactivePropDefinitions");function Jq(q,Q,$){let R=q.constructor,F=R[r]??[];if(F.some((Z)=>Z.name===Q))return;F.push({name:Q,options:$}),R[r]=F}function G1(q){return(q.constructor[r]??[]).slice()}var U1=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),K1=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),J0=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function Wq(q,Q){_1(q,U1,Q)}function Xq(q,Q){_1(q,K1,Q)}function Y1(q){i(q,U1)}function H1(q){let Q=q;i(q,K1,Q[J0]??=new Set)}function _1(q,Q,$){let R=q,F=Object.prototype.hasOwnProperty.call(R,Q)?R[Q]:void 0;if(Array.isArray(F)){F.push($);return}Object.defineProperty(R,Q,{value:[$]})}function i(q,Q,$,R=Object.getPrototypeOf(q)){if(!R||R===Object.prototype)return;i(q,Q,$,Object.getPrototypeOf(R));let F=R[Q];if(!Array.isArray(F))return;for(let Z of F){if($?.has(Z))continue;Z(q),$?.add(Z)}}function K(q,Q){switch(Q){case"construct":Y1(q);break;case"connect":case"ssr":H1(q);break}}function V1(q){switch(q){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function j0(q){switch(typeof q){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(q))return"array";if(Object.prototype.toString.call(q)==="[object Object]")return"object"}function W0(q){switch(q){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function X0(q){try{return JSON.parse(q)}catch{throw TypeError("Invalid JSON string")}}var P0={array(q){let Q=X0(q);if(!Array.isArray(Q))throw TypeError(`Expected an array but got a value of type "${typeof Q}"`);return Q},boolean(q){return!(q==="0"||String(q).toLowerCase()==="false")},number(q){return Number(q.replace(/_/g,""))},object(q){let Q=JSON.parse(q);if(Q===null||typeof Q!=="object"||Array.isArray(Q))throw TypeError(`expected value of type "object" but instead got value "${q}" of type "${j0(Q)}"`);return Q},string(q){return q}},w1={default:I1,array:x1,object:x1};function x1(q){return JSON.stringify(q)}function I1(q){return`${q}`}function L1(q,Q){let $=V1(Q);if(!$)throw TypeError(`[radiant-element] Unknown type "${Q}"`);return P0[$](q)}function D1(q,Q){let $=V1(Q);if(!$)throw TypeError(`[radiant-element] Unknown type "${Q}"`);return(w1[$]??w1.default??I1)(q)}function B0(q){return typeof q==="boolean"}function G0(q){return typeof q==="number"}function U0(q){return typeof q==="string"}function K0(q){return Array.isArray(q)}function Y0(q){return typeof q==="object"&&!Array.isArray(q)&&q!==null}function Uq(q,Q){switch(q){case Boolean:return B0(Q);case Number:return G0(Q);case String:return U0(Q);case Array:return K0(Q);case Object:return Y0(Q);default:return!1}}var Kq=(q,Q,$,R)=>{if(Q===Boolean){let Z=q.getAttribute($);if(Z===null)return R;return Z===""?!0:L1(Z,Q)}let F=q.getAttribute($);return F!==null?L1(F,Q):R??W0(Q)};import{getActiveSsrScopeValue as H0,withActiveSsrScopeValue as _0}from"@ecopages/jsx/server";var A1=Symbol.for("@ecopages/radiant.element-ssr-runtime");function _q(){return H0(A1)}function Y(q,Q){return _0(A1,q,Q)}var T1=Symbol.for("@ecopages/radiant.controllerIdentifier");function n(q,Q){q[T1]=Q}function E1(q){return q[T1]}var P="data-controller",f1=Symbol.for("@ecopages/radiant.controller-registry-state");function w0(){let q=globalThis,Q=q[f1];if(Q)return Q;let $={activeRuntimes:new Set,controllerRegistrationStrategy:"keep-current",controllerRegistry:new Map};return q[f1]=$,$}var y=w0(),B=y.controllerRegistry,H=y.activeRuntimes;function k1(q){let Q=q.getAttribute(P);if(!Q)return[];return Q.split(/\s+/).map(($)=>$.trim()).filter(($)=>$.length>0)}function N(q,Q){if(q instanceof Element&&q.hasAttribute(P))Q(q);for(let $ of Array.from(q.querySelectorAll(`[${P}]`)))Q($)}class C1{root;controllersByElement=new Map;observer;stopped=!1;constructor(q=document){this.root=q;this.start()}stop(){if(this.stopped)return;this.stopped=!0,this.observer?.disconnect(),this.observer=void 0;for(let[q,Q]of this.controllersByElement)for(let[$]of Q)this.disconnectController(q,$);H.delete(this)}reconcileRegisteredController(q){N(this.root,(Q)=>{if(!k1(Q).includes(q))return;this.connectController(Q,q)})}replaceRegisteredController(q){for(let[Q,$]of Array.from(this.controllersByElement.entries())){if(!$.has(q))continue;this.disconnectController(Q,q)}this.reconcileRegisteredController(q)}start(){if(N(this.root,(Q)=>{this.reconcileElement(Q)}),typeof MutationObserver>"u"){H.add(this);return}this.observer=new MutationObserver((Q)=>{for(let $ of Q){if($.type==="attributes"&&$.target instanceof Element){this.reconcileElement($.target);continue}for(let R of Array.from($.removedNodes)){if(!(R instanceof Element))continue;N(R,(F)=>{this.disconnectElementControllers(F)})}for(let R of Array.from($.addedNodes)){if(!(R instanceof Element))continue;N(R,(F)=>{this.reconcileElement(F)})}}});let q=this.root instanceof Document?this.root.documentElement:this.root;this.observer.observe(q,{attributeFilter:[P],attributes:!0,childList:!0,subtree:!0}),H.add(this)}reconcileElement(q){let Q=new Set(k1(q)),$=this.controllersByElement.get(q);if($){for(let R of $.keys())if(!Q.has(R))this.disconnectController(q,R)}for(let R of Q)this.connectController(q,R)}connectController(q,Q){let $=B.get(Q);if(!$)return;let R=this.controllersByElement.get(q);if(!R)R=new Map,this.controllersByElement.set(q,R);if(R.has(Q))return;let F=new $(q);R.set(Q,F),F.connect()}disconnectController(q,Q){let $=this.controllersByElement.get(q);if(!$)return;let R=$.get(Q);if(!R)return;if(R.disconnect(),$.delete(Q),$.size===0)this.controllersByElement.delete(q)}disconnectElementControllers(q){let Q=this.controllersByElement.get(q);if(!Q)return;for(let $ of Array.from(Q.keys()))this.disconnectController(q,$)}}function x0(q,Q){let $=B.get(q);if($)return console.warn(`[radiant] Controller "${q}" is already registered. Keeping the existing constructor.`),$;n(Q,q),B.set(q,Q);for(let R of Array.from(H))R.reconcileRegisteredController(q);return Q}function Vq(q){return B.has(q)}function Iq(q){return B.get(q)}function L0(q,Q){if(B.get(q)===Q)return Q;n(Q,q),B.set(q,Q);for(let R of Array.from(H))R.replaceRegisteredController(q);return Q}function z1(q){y.controllerRegistrationStrategy=q}function Dq(){z1("replace")}function Aq(){z1("keep-current")}function Tq(q,Q){if(y.controllerRegistrationStrategy==="replace")return L0(q,Q);return x0(q,Q)}function Eq(q=document){return new C1(q)}function fq(){for(let q of Array.from(H))q.stop()}var O1=Symbol.for("@ecopages/radiant.customElementTagName");function Cq(q,Q){q[O1]=Q}function M(q){return q[O1]}function h(q){return q.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function b1(q){let Q={},$=new Set;return V0(q,Q,$),I0(q,Q,$),D0(q,Q),Q}function S1(q){return Object.entries(q).map(([Q,$])=>` ${Q}="${h($)}"`).join("")}function V0(q,Q,$){for(let R of q.getReactiveProperties()){let F=q.getPropertyValue(R.name);if(F===void 0||F===null||F===!1)continue;Q[R.attribute]=String(R.converter.toAttribute(F)),$.add(R.attribute)}}function I0(q,Q,$){for(let R of q.getReactivePropDefinitions()){let F=R.options.attribute??R.name;if($.has(F))continue;let Z=q.getPropertyValue(R.name);if(Z===void 0||Z===null||Z===!1)continue;Q[F]=String(D1(Z,R.options.type)),$.add(F)}}function D0(q,Q){for(let $ of q.getAttributeNames()){let R=q.getAttribute($);if(R!==null)Q[$]=R}}var g1=Symbol.for("@ecopages/radiant.ssr-context-provider-resolver");function N1(){return globalThis}function y1(q){N1()[g1]=q}function Nq(q){return N1()[g1]?.(q)}var A;function h1(){if(A!==void 0)return A;try{let{AsyncLocalStorage:q}=(()=>{throw new Error("Cannot require module "+"node:async_hooks");})();return A=new q,A}catch{return A=null,null}}var M1=Symbol.for("@ecopages/radiant.ssr-context-fallback-stack");function v1(){let q=globalThis;return q[M1]??=[],q[M1]}function _(q){if(q.length===0)return()=>{return};let Q=new Map;for(let F of q)Q.set(F.getContextKey(),F);let $=h1();if($){let F=$.getStore()??[],Z=[...F,Q];return $.enterWith(Z),()=>{$.enterWith(F)}}let R=v1();return R.push(Q),()=>{let F=R.lastIndexOf(Q);if(F>=0)R.splice(F,1)}}function u1(q){let Q=h1()?.getStore()??v1();for(let $=Q.length-1;$>=0;$-=1){let R=Q[$]?.get(q);if(R)return R}return}function hq(q){let Q=u1(q);if(!Q)return;return Q.getContext()}y1((q)=>u1(q));function d1(q,Q){if(!Q)return`${q.hostContent}${q.authoredHydrationMarkup}${q.slotProjectionScript}`;return`${q.hostContent}${q.slotProjectionScript}${q.hydrationScripts}`}function w(q){if(A0(q))return q;return}function A0(q){return typeof q.constructor==="function"&&typeof q.getAttribute==="function"&&typeof q.getAttributeNames==="function"&&typeof q.getAuthoredHydrationScriptMarkup==="function"&&typeof q.getContextProviders==="function"&&typeof q.getHydrationBindings==="function"&&typeof q.getReactiveProperties==="function"&&typeof q.getSlotProjectionScriptTag==="function"&&typeof q.resolveTrackedRenderOutput==="function"&&typeof q.renderViewToString==="function"}function c1(q){let Q=w(q);if(!Q)throw Error("Radiant SSR runtime requires a server extraction host shape on the component.");return{constructor:Q.constructor,getAttribute:($)=>Q.getAttribute($),getAttributeNames:()=>Q.getAttributeNames(),getAuthoredHydrationScriptMarkup:()=>Q.getAuthoredHydrationScriptMarkup?.(),getContextProviders:()=>Q.getContextProviders(),getHydrationBindings:()=>Q.getHydrationBindings(),getReactiveProperties:()=>Q.getReactiveProperties(),getReactivePropDefinitions:()=>G1(q),getPropertyValue:($)=>Reflect.get(q,$),getSlotProjectionScriptTag:()=>Q.getSlotProjectionScriptTag?.(),resolveTrackedRenderOutput:()=>Q.resolveTrackedRenderOutput(),renderViewToString:($)=>Q.renderViewToString($)}}class o{component;host;constructor(q){this.component=q,this.host=c1(q)}ensureReady(){K(this.component,"ssr")}renderHost(){return this.ensureReady(),{nodeType:1,outerHTML:this.renderHostToString({mode:"hydrate"})}}renderHostToString(q={},Q=this.getHostAttributes()){this.ensureReady();let $=this.getTagName(),R=_(this.host.getContextProviders());try{return`<${$}${S1(Q)}>${this.renderHostContent(q)}</${$}>`}finally{R()}}getHostAttributes(){return this.ensureReady(),b1(this.host)}renderHostContent(q){let Q=q.mode==="hydrate"||q.mode===void 0&&q.hydrate===!0,$=Q?this.host.getHydrationBindings().map((R)=>R.renderHydrationScriptTag()).filter((R)=>typeof R==="string").join(""):"";return d1({hostContent:this.host.renderViewToString(q),authoredHydrationMarkup:this.host.getAuthoredHydrationScriptMarkup?.()??"",slotProjectionScript:this.host.getSlotProjectionScriptTag?.()??"",hydrationScripts:$},Q)}getTagName(){let q=M(this.host.constructor);if(!q)throw Error(`${this.host.constructor.name} is missing @customElement metadata.`);return q}}import{renderToString as T0}from"@ecopages/jsx/server";import{createServerHydrationBindingState as p1,isServerRenderHydrationActive as s1,withForcedServerCustomElementRendering as E0,withServerCustomElementRenderHook as f0,withServerHydrationBindingState as m1}from"@ecopages/jsx/server";var v;function t(q){return new o(q)}function T(q){return{nodeType:1,outerHTML:G(q,{mode:"hydrate"})}}function e(q){if(E(q))return T(q);if(!d(q))return;return q.renderHost?.()??{nodeType:1,outerHTML:q.renderHostToString({mode:"hydrate"})}}function G(q,Q={}){return R1(()=>t(q).renderHostToString(Q,$1(q)))}function q1(q,Q={}){if(E(q))return G(q,Q);if(!d(q))return;return q.renderHostToString(Q)}function Q1(q,Q){if(E(q))return T(q);if(!d(q))return;return q.renderHost?.()??{nodeType:1,outerHTML:Q}}function l1(q,Q={}){return R1(()=>u(()=>T0(r1(q).value,Q)))}function $1(q){return t(q).getHostAttributes()}function a1(q){if(!E(q))return;return{renderHost:()=>T(q),renderHostToString:(Q)=>G(q,Q)}}function k0(q){return w(q)}function u(q){return E0(()=>f0(({instance:Q})=>{if(E(Q))return{nodeType:1,get outerHTML(){let R=s1(),F={hydrate:R,mode:R?"hydrate":"plain"};if(!R)return G(Q,F);return m1(p1(),()=>G(Q,F))}};if(!d(Q))return;let $=Q;return{nodeType:1,get outerHTML(){let R=s1();if(!R)return $.renderHostToString({hydrate:R,mode:R?"hydrate":"plain"});return m1(p1(),()=>$.renderHostToString({hydrate:R,mode:R?"hydrate":"plain"}))}}},q))}function r1(q){if(C0(q))return q.resolveTrackedRenderOutput();let Q=w(q);if(!Q)throw Error("Radiant SSR runtime requires tracked render output support on the component.");return Q.resolveTrackedRenderOutput()}function E(q){if(typeof q!=="object"||q===null)return!1;return w(q)!==void 0}function d(q){if(typeof q!=="object"||q===null)return!1;return typeof q.renderHostToString==="function"}function C0(q){if(typeof q!=="object"||q===null)return!1;return typeof q.resolveTrackedRenderOutput==="function"}function x(){if(v)return v;return v={getHostAttributes:$1,renderHost:T,renderHostToString:G,resolveRenderBridge:a1,renderView:l1},v}function R1(q){return Y(x(),q)}var c=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function i1(q){let Q=[],$=0;while($<q.length){let R=$;if(q.startsWith("<!--",$)){let j=q.indexOf("-->",$+4);$=j===-1?q.length:j+3,Q.push(q.slice(R,$));continue}if(q[$]!=="<"){let j=q.indexOf("<",$);$=j===-1?q.length:j,Q.push(q.slice(R,$));continue}let F=f(q,$);if(!F){Q.push(q.slice(R));break}if(F.type!=="open"||F.selfClosing||c.has(F.tagName)){$=F.end,Q.push(q.slice(R,$));continue}$=F.end;let Z=1;while($<q.length&&Z>0){let j=q.indexOf("<",$);if(j===-1){$=q.length;break}let J=f(q,j);if(!J){$=q.length;break}if($=J.end,J.type==="comment"||J.type==="declaration")continue;if(J.type==="open"&&!J.selfClosing&&!c.has(J.tagName)){Z+=1;continue}if(J.type==="close")Z-=1}Q.push(q.slice(R,$))}return Q.filter((R)=>R!=="")}function z0(q,Q){let $;for(let R=Q+1;R<q.length;R+=1){let F=q[R];if($){if(F===$)$=void 0;continue}if(F==='"'||F==="'"){$=F;continue}if(F===">")return R+1}return q.length}function O0(q){let Q={},$=/([:^@A-Za-z0-9_.-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>/]+)))?/g;for(let R of q.matchAll($)){let[,F,Z,j,J]=R;if(!F)continue;Q[F]=Z??j??J??""}return Q}function f(q,Q){if(q.startsWith("<!--",Q)){let U=q.indexOf("-->",Q+4);return{end:U===-1?q.length:U+3,type:"comment"}}let $=z0(q,Q),R=q.slice(Q+1,$-1).trim();if(R==="")return;if(R.startsWith("!")||R.startsWith("?"))return{end:$,type:"declaration"};if(R.startsWith("/"))return{end:$,type:"close"};let F=/\/\s*$/.test(R),Z=F?R.replace(/\/\s*$/,"").trim():R,j=Z.split(/[\s/>]/,1)[0]?.toLowerCase()??"",J=j.length,X=Z.slice(J).trim(),I=F||c.has(j)?"":b0(q,Q,$,j);return{attributes:O0(X),end:$,innerHtml:I,selfClosing:F,tagName:j,type:"open"}}function b0(q,Q,$,R){let F=$,Z=1;while(F<q.length&&Z>0){let j=q.indexOf("<",F);if(j===-1)return q.slice($);let J=f(q,j);if(!J)return q.slice($);if(J.type==="open"&&J.tagName===R&&!J.selfClosing&&!c.has(R))Z+=1;if(J.type==="close"){if(q.slice(j+2,J.end-1).trim().toLowerCase()===R){if(Z-=1,Z===0)return q.slice($,j)}}F=J.end}return q.slice($)}class W extends EventTarget{nodeType;static DOCUMENT_NODE=9;static ELEMENT_NODE=1;static TEXT_NODE=3;childNodes=[];ownerDocument;parentNode=null;constructor(q,Q=null){super();this.nodeType=q;this.ownerDocument=Q}append(...q){for(let Q of q)this.appendChild(typeof Q==="string"?S0(Q):Q)}appendChild(q){if("parentNode"in q&&q.parentNode&&"removeChild"in q.parentNode)q.parentNode.removeChild(q);return this.childNodes.push(q),q.ownerDocument=this.nodeType===W.DOCUMENT_NODE?this:this.ownerDocument,q.parentNode=this,q}removeChild(q){let Q=this.childNodes.indexOf(q);if(Q===-1)return q;return this.childNodes.splice(Q,1),q.parentNode=null,q}replaceChildren(...q){for(let Q of this.childNodes)Q.parentNode=null;this.childNodes=[],this.append(...q)}get textContent(){return this.childNodes.map((q)=>q.textContent??"").join("")}set textContent(q){this.replaceChildren(q??"")}getRootNode(){let q=this;while("parentNode"in q&&q.parentNode)q=q.parentNode;return q}}class z extends W{value;constructor(q,Q=V()){super(W.TEXT_NODE,Q);this.value=q}get textContent(){return this.value}set textContent(q){this.value=q??""}}class n1{element;constructor(q){this.element=q}add(...q){let Q=new Set(this.readTokens());for(let $ of q)if($!=="")Q.add($);this.writeTokens([...Q])}remove(...q){let Q=new Set(this.readTokens());for(let $ of q)Q.delete($);this.writeTokens([...Q])}toggle(q,Q){let $=this.contains(q);if(Q??!$)return this.add(q),!0;return this.remove(q),!1}contains(q){return this.readTokens().includes(q)}toString(){return this.value}get value(){return this.element.getAttribute("class")??""}readTokens(){return this.value.split(/\s+/).map((q)=>q.trim()).filter((q)=>q.length>0)}writeTokens(q){if(q.length===0){this.element.removeAttribute("class");return}this.element.setAttribute("class",q.join(" "))}}class p extends W{attributes=new Map;classListValue;datasetValue;fragmentHtml;fragmentText;localName;tagName;constructor(q="div",Q=V()){super(W.ELEMENT_NODE,Q);this.localName=q.toLowerCase(),this.tagName=this.localName.toUpperCase()}get id(){return this.getAttribute("id")??""}set id(q){if(q===""){this.removeAttribute("id");return}this.setAttribute("id",q)}get classList(){return this.classListValue??=new n1(this),this.classListValue}get dataset(){return this.datasetValue??=new Proxy({},{deleteProperty:(q,Q)=>{if(typeof Q!=="string")return!1;return this.removeAttribute(C(Q)),!0},get:(q,Q)=>{if(typeof Q!=="string")return;return this.getAttribute(C(Q))??void 0},getOwnPropertyDescriptor:(q,Q)=>{if(typeof Q!=="string")return;return{configurable:!0,enumerable:!0,value:this.getAttribute(C(Q))??void 0,writable:!0}},has:(q,Q)=>{return typeof Q==="string"&&this.hasAttribute(C(Q))},ownKeys:()=>{return this.getAttributeNames().filter((q)=>q.startsWith("data-")).map((q)=>h0(q.slice(5)))},set:(q,Q,$)=>{if(typeof Q!=="string")return!1;return this.setAttribute(C(Q),String($)),!0}}),this.datasetValue}hasAttribute(q){return this.attributes.has(q)}getAttribute(q){return this.attributes.get(q)??null}getAttributeNames(){return Array.from(this.attributes.keys())}setAttribute(q,Q){this.fragmentHtml=void 0,this.attributes.set(q,String(Q))}toggleAttribute(q,Q){if(Q??!this.hasAttribute(q))return this.setAttribute(q,""),!0;return this.removeAttribute(q),!1}removeAttribute(q){this.fragmentHtml=void 0,this.attributes.delete(q)}querySelector(){return null}querySelectorAll(){return[]}matches(){return!1}get outerHTML(){if(this.fragmentHtml!==void 0)return this.fragmentHtml;let q=Array.from(this.attributes.entries()).map(([Q,$])=>` ${Q}="${y0($)}"`).join("");return`<${this.localName}${q}>${this.innerHTML}</${this.localName}>`}get innerHTML(){return this.childNodes.map((q)=>u0(q)).join("")}set innerHTML(q){this.fragmentHtml=void 0,this.fragmentText=void 0,this.replaceChildren(...q0(q,this.ownerDocument))}get textContent(){return this.fragmentText??super.textContent??""}set textContent(q){this.fragmentHtml=void 0,this.fragmentText=q??"",super.textContent=q}setSerializedFragment(q,Q,$){this.fragmentHtml=q,this.fragmentText=Q,this.attributes=new Map(Object.entries($)),this.replaceChildren()}}class s{bubbles;cancelable;composed;type;constructor(q,Q={}){this.type=q,this.bubbles=Q.bubbles??!1,this.cancelable=Q.cancelable??!1,this.composed=Q.composed??!1}}class J1 extends s{detail;constructor(q,Q={}){super(q,Q);this.detail=Q.detail}}class L extends p{isConnected=!1;constructor(q="div",Q=V()){super(q,Q)}insertAdjacentHTML(q,Q){this.append(...q0(Q,this.ownerDocument))}}class O extends L{constructor(q=V()){super("script",q)}}class F1 extends W{constructor(){super(W.DOCUMENT_NODE)}createElement(q){return q.toLowerCase()==="script"?new O(this):new L(q,this)}createTextNode(q){return new z(q,this)}querySelector(){return null}querySelectorAll(){return[]}}class o1{definitions=new Map;define(q,Q){if(this.definitions.has(q))return;this.definitions.set(q,Q)}get(q){return this.definitions.get(q)}}var k,Z1={escape(q){return v0(String(q))}};function S0(q){return new z(q,V())}function V(){return globalThis.document??null}function t1(){let q=globalThis,Q=q.customElements;if(typeof q.Node>"u"||typeof q.Document>"u"||typeof q.Element>"u"||typeof q.HTMLElement>"u"||typeof q.document>"u"||!Q||typeof Q.define!=="function"||typeof Q.get!=="function")return;return q.window??{CSS:q.CSS??Z1,CustomEvent:q.CustomEvent??J1,Document:q.Document,Element:q.Element,Event:q.Event??s,EventTarget:q.EventTarget??EventTarget,HTMLScriptElement:q.HTMLScriptElement??q.HTMLElement,HTMLElement:q.HTMLElement,Node:q.Node,document:q.document,customElements:Q}}function j1(){let q=t1();if(q)return q;return g0()}function e1(){return j1(),{prepareHost(q,Q={}){if(Q.authoredContent!==void 0)q.innerHTML=Q.authoredContent}}}function g0(){let q=t1();if(q)return q;if(k)return k;let Q=new o1,$=new F1,R=globalThis.Event??s,F=globalThis.CustomEvent??J1,Z=F1,j=globalThis.EventTarget??EventTarget;return k={CSS:globalThis.CSS??Z1,CustomEvent:F,Document:Z,Element:p,Event:R,EventTarget:j,HTMLScriptElement:O,HTMLElement:L,Node:W,document:$,customElements:Q},Object.assign(globalThis,{CSS:globalThis.CSS??Z1,CustomEvent:F,Document:Z,Element:p,Event:R,EventTarget:j,HTMLScriptElement:O,HTMLElement:L,Node:W,document:$,customElements:Q,window:k}),k}function N0(q,Q,$){let R=Q.tagName==="script"?new O($):new L(Q.tagName,$);return R.setSerializedFragment(q,M0(Q.innerHtml),Q.attributes),R}function y0(q){return q.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function M0(q){return q.replace(/<!--.*?-->/gs,"").replace(/<[^>]+>/g,"")}function q0(q,Q=V()){return i1(q).map(($)=>{if(!$.startsWith("<"))return new z($,Q);let R=f($,0);if(!R||R.type!=="open")return new z($,Q);return N0($,R,Q)})}function C(q){return`data-${q.replace(/([A-Z])/g,"-$1").toLowerCase()}`}function h0(q){return q.replace(/-([a-z])/g,(Q,$)=>$.toUpperCase())}function v0(q){let Q="";for(let $=0;$<q.length;$+=1){let R=q[$]??"",F=R.codePointAt(0)??0;if(F===0){Q+="�";continue}let Z=F>=1&&F<=31||F===127,j=$===0&&F>=48&&F<=57,J=$===1&&F>=48&&F<=57&&(q[0]??"")==="-",X=$===0&&R==="-"&&q.length===1;if(Z||j||J){Q+=`\\${F.toString(16)} `;continue}if(F>=128||R==="-"||R==="_"||F>=48&&F<=57||F>=65&&F<=90||F>=97&&F<=122){Q+=X?`\\${R}`:R;continue}Q+=`\\${R}`}return Q}function u0(q){if(q.nodeType===W.TEXT_NODE)return q.textContent??"";return"outerHTML"in q&&typeof q.outerHTML==="string"?q.outerHTML:q.textContent??""}function b(){return new Date}function S(q){if("metadata"in q)return{assets:q.metadata.assets,clientModuleSrc:q.metadata.clientModuleUrl,generatedAt:q.metadata.generatedAt,markup:q.markup,tagName:q.metadata.tagName};let{preview:Q,...$}=q;return $}function g(q){return{assets:q.metadata.assets,clientModuleSrc:q.metadata.clientModuleUrl,generatedAt:q.metadata.generatedAt,markup:q.markup,preview:q.preview,tagName:q.metadata.tagName}}function d0(q,Q="hydrate"){return{kind:"script-module",src:q,stage:Q}}function wQ(q){return{kind:"modulepreload",href:q}}function xQ(q,Q){return Q?{kind:"style",href:q,media:Q}:{kind:"style",href:q}}async function LQ(q,Q){return(await m(l(q,Q))).markup}async function VQ(q,Q){return m(l(q,Q))}async function IQ(q,Q){return S(await m(l(q,Q)))}async function DQ(q,Q){return g(await m(l(q,Q)))}async function m(q){return Y(x(),async()=>{let Q=q.environment??e1(),$=_(s0(q.ssrContext));try{let R="component"in q?q.component:await q.load(),F=new R;K(F,"ssr"),p0(Q,F,q.authoredContent,q.prepareHost),q.initialize?.(F);let Z=q.clientModuleSrc??await q.resolveClientModuleSrc?.(R),j=q.assets??await q.resolveAssets?.(R)??[],J=W1(j,Z),X=X1(J)??Z,I=q.tagName??r0(R),U=(q.now??b)().toISOString(),D=P1(q.renderOptions),B1=q1(F,D)??a0(F,D),F0=c0(F,B1);return{markup:B1,metadata:{assets:J,clientModuleUrl:X,generatedAt:U,tagName:I},preview:F0}}finally{$()}})}function c0(q,Q){return Q1(q,Q)??e(q)??q.renderHost?.()??{nodeType:1,outerHTML:Q}}function p0(q,Q,$,R){if(!l0(Q)){if($===void 0&&R===void 0)return;throw Error(`${Q.constructor.name} cannot prepare SSR host content because it does not expose an innerHTML host surface.`)}q.prepareHost(Q,{authoredContent:$}),R?.(Q,q)}function s0(q){if(!q||q.length===0)return[];return q.map((Q)=>({getContext:()=>Q.value,getContextKey:()=>Q.context,renderHydrationScript:()=>{return},renderHydrationScriptTag:()=>{return}}))}function m0(q){if(!q)return[];return[d0(q)]}function W1(q,Q){if(!Q)return q;if(q.some(($)=>$.kind==="script-module"&&$.src===Q))return q;return[...m0(Q),...q]}function X1(q){return q.find((Q)=>Q.kind==="script-module")?.src}function l(q,Q){if(typeof q==="function")return{...Q,component:q};return q}function P1(q){if(q?.mode!==void 0||q?.hydrate!==void 0)return q;return{...q,mode:"hydrate"}}function l0(q){return"innerHTML"in q}function a0(q,Q){if(typeof q.renderHostToString==="function")return q.renderHostToString(Q);throw Error(`${q.constructor.name} cannot be server-rendered without a registered Radiant SSR host or renderHostToString().`)}function r0(q){let Q=M(q);if(!Q)throw Error(`${q.name} is missing @customElement metadata.`);return Q}import{renderToString as i0}from"@ecopages/jsx/server";async function MQ(q,Q){return(await a(q,Q)).markup}async function hQ(q,Q){return a(q,Q)}async function vQ(q,Q){return S(await a(q,Q))}async function uQ(q,Q){return g(await a(q,Q))}async function a(q,Q){return Y(x(),async()=>{let $=n0(Q.tagName),R=o0($,t0(q,Q)),F=new q(R);K(F,"ssr");try{Q.initialize?.(F),F.runWithSsrLifecycle(()=>F.connect());let Z=Q.clientModuleSrc??await Q.resolveClientModuleSrc?.(q),j=Q.assets??await Q.resolveAssets?.(q)??[],J=W1(j,Z),X=X1(J)??Z,I=(Q.now??b)().toISOString(),U=P1(Q.renderOptions),D=$q(F,$,U);return{markup:D,metadata:{assets:J,clientModuleUrl:X,generatedAt:I,tagName:$},preview:{nodeType:1,outerHTML:D}}}finally{F.disconnect()}})}function n0(q){let Q=q.trim().toLowerCase();if(!Q)throw Error("Controller SSR host tagName is required.");return Q}function o0(q,Q){let R=j1().document.createElement(q);for(let[F,Z]of Object.entries(Q)){if(Z===void 0||Z===null||Z===!1)continue;R.setAttribute(F,Z===!0?"":String(Z))}return R}function t0(q,Q){let $={},R=Q.host,F=qq(Q.attributes?.class,R?.class,R?.classes);if(F!==void 0)$.class=F;Q0($,"data",R?.data),Q0($,"aria",R?.aria),e0($,Q.attributes);let Z=E1(q);if(Z&&$[P]==null)$[P]=Z;return $}function Q0(q,Q,$){if(!R0($))return;for(let[R,F]of Object.entries($))q[`${Q}-${Qq(R)}`]=F}function e0(q,Q){if(!Q)return;for(let[$,R]of Object.entries(Q))q[$]=R}function qq(...q){let Q=[];for(let $ of q)$0(Q,$);return Q.length===0?void 0:Q.join(" ")}function $0(q,Q){if(Q===void 0||Q===null||Q===!1||Q===!0)return;if(typeof Q==="string"){if(Q!=="")q.push(Q);return}if(typeof Q==="number"||typeof Q==="bigint"){q.push(String(Q));return}if(Array.isArray(Q)){for(let $ of Q)$0(q,$);return}if(!R0(Q))return;for(let[$,R]of Object.entries(Q))if(R)q.push($)}function R0(q){return Object.prototype.toString.call(q)==="[object Object]"}function Qq(q){return q.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function $q(q,Q,$){let R=_(q.getSsrContextProviders());try{let F=u(()=>i0(q.render(),$)),j=$.mode==="hydrate"||$.mode===void 0&&$.hydrate===!0?q.getSsrHydrationBindings().map((J)=>J.renderHydrationScriptTag()).filter((J)=>typeof J==="string").join(""):"";return`<${Q}${Rq(q.host)}>${F}${j}</${Q}>`}finally{R()}}function Rq(q){return q.getAttributeNames().map((Q)=>Fq(Q,q.getAttribute(Q))).join("")}function Fq(q,Q){if(Q==="")return` ${q}`;return` ${q}="${h(Q??"")}"`}export{uQ as renderControllerWithPreview,MQ as renderControllerToString,vQ as renderControllerToPayload,hQ as renderController};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=9CA97A2CC1F9288464756E2164756E21
|