@sitecore-feaas/clientside 0.1.47 → 0.1.49
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/build/components/FEAASExternal.js +79 -0
- package/build/components/FEAASExternal.js.map +1 -0
- package/build/headless.js +1 -0
- package/build/headless.js.map +1 -1
- package/build/ui/react.js +1 -1
- package/build/ui/react.js.map +1 -1
- package/build/utils/string.js +13 -0
- package/build/utils/string.js.map +1 -0
- package/dist/browser/headless.cjs +5 -5
- package/dist/browser/headless.cjs.map +4 -4
- package/dist/browser/headless.esm.js +5 -5
- package/dist/browser/headless.esm.js.map +1 -1
- package/dist/browser/index.cjs +5 -5
- package/dist/browser/index.cjs.map +4 -4
- package/dist/browser/index.esm.js +5 -5
- package/dist/browser/index.esm.js.map +1 -1
- package/dist/browser/react.cjs +5 -5
- package/dist/browser/react.cjs.map +4 -4
- package/dist/browser/react.esm.js +5 -5
- package/dist/browser/react.esm.js.map +1 -1
- package/dist/node/headless.cjs +3 -3
- package/dist/node/headless.cjs.map +4 -4
- package/dist/node/headless.esm.js +3 -3
- package/dist/node/headless.esm.js.map +4 -4
- package/dist/node/index.cjs +3 -3
- package/dist/node/index.cjs.map +4 -4
- package/dist/node/index.esm.js +3 -3
- package/dist/node/index.esm.js.map +4 -4
- package/dist/node/react.cjs +3 -3
- package/dist/node/react.cjs.map +4 -4
- package/dist/node/react.esm.js +3 -3
- package/dist/node/react.esm.js.map +4 -4
- package/headless.cjs +3 -3
- package/headless.cjs.map +4 -4
- package/headless.js +3 -3
- package/headless.js.map +4 -4
- package/package.json +1 -1
- package/react.cjs +5 -5
- package/react.cjs.map +4 -4
- package/react.js +5 -5
- package/react.js.map +4 -4
- package/src/components/FEAASExternal.tsx +107 -0
- package/src/headless.ts +1 -0
- package/src/ui/react.tsx +1 -1
- package/src/utils/string.ts +12 -0
- package/test/FEAASExternal.test.tsx +49 -0
- package/types/components/FEAASExternal.d.ts +44 -0
- package/types/components/FEAASExternal.d.ts.map +1 -0
- package/types/headless.d.ts +1 -0
- package/types/headless.d.ts.map +1 -1
- package/types/tsbuildinfo +1 -1
- package/types/tsbuildinfo_ui +1 -1
- package/types/utils/string.d.ts +3 -0
- package/types/utils/string.d.ts.map +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function x(t,e=r=>{}){var r;let n=()=>{var i,o;let s=new Promise((u,c)=>{i=l=>{t==null||t(l),u(l)},o=c});var a=Object.assign(s,{resolve:i,reject:o,restart:n,first:r});return r=a,a.catch(e),a};return n()}var Re=typeof HTMLElement=="undefined"?typeof windowJSDOM!="undefined"?windowJSDOM.HTMLElement:class{}:HTMLElement,b=class extends Re{getProps(e){return{}}constructor(){super(),this.defaultProps={},this.connected=!1,this.refs={},this.descendants=[],this.whenLoaded=x(e=>{this.payload=e}),this.whenRendered=x(()=>this.initialized=!0,()=>cancelAnimationFrame(this.nextRender)),this.addEventListener("feaasMount",this),this.addEventListener("feaasUnmount",this)}getRoot(){return this}attributeChangedCallback(e,r,n){this.set()}connectedCallback(){this.mount()}disconnectedCallback(){this.unmount()}mount(){try{let e=this.getParent();if(e&&!e.connected||this.connected)return;this.connected=!0,this.log("FEAAS: Mount",this.tagName,this),this.dispatchEvent(new Event("feaasMount",{bubbles:!0,composed:!0})),this.getElements().map(r=>{var n;return(n=r.mount)===null||n===void 0?void 0:n.call(r)}),this.set()}catch(e){this.onError(e)}}log(...e){console.log(...e)}unmount(){this.connected&&(this.log("FEAAS: Unmount",this),this.dispatchEvent(new Event("feaasUnmount",{bubbles:!0,composed:!0})),this.connected=!1)}getParent(e=!0){for(var r=this;r=r.parentElement||(r.parentNode instanceof ShadowRoot?r.parentNode.host:null);)if(!e||r.tagName.startsWith("FEAAS-"))return r}getElements(e=this.getRoot(),r=!0){return Array.from(e.querySelectorAll("*")).map(n=>[!r||n.tagName.startsWith("FEAAS-")?n:null,n.shadowRoot?this.getElements(n.shadowRoot,r):null]).flat().filter(Boolean)}handleEvent(e){let r=e.composedPath()[0];switch(e.type){case"feaasMount":r!=this&&this.nestedCallback(r);break;case"feaasUnmount":r!=this&&this.unnestedCallback(r);break}}unnestedCallback(e){let r=this.descendants.indexOf(e);r!=-1&&(this.log("FEAAS: Unnest",this,e),this.descendants.splice(r,-1),this.refs[e.getComponentName()]=null,e.refs.parent==this&&(e.refs.parent=null),e.refs.top==this&&(e.refs.top=e.refs.parent))}nestedCallback(e){var r,n;if(this.descendants.indexOf(e)==-1&&(this.descendants.push(e),this.log("FEAAS: Nest",this,e),this.refs[e.getComponentName()]=e,e.refs.top=this,(r=e.refs).parent||(r.parent=this),e.render))for(var o=e.refs.parent;o;o=o.refs.parent)o.render&&((n=e.refs).parentReact||(n.parentReact=o),e.refs.topReact=o)}getComponentName(){return this.tagName.replace("FEAAS-","").toLowerCase()}isReadyToLoad(){return this.payload===void 0&&this.getAttribute("hidden")==null}onError(e,r="uncaught",n=!1){let i=new CustomEvent("feaasError",{bubbles:!0,composed:!0,detail:e});if(this.dispatchEvent(i),this.whenLoaded.reject(e),!i.defaultPrevented&&!n){this.whenRendered.reject(e);try{this.unmount()}catch(o){}return!0}return!1}shouldUpdateOnLoad(){return!0}async advance(){try{if(this.payload===void 0){if(!this.isReadyToLoad())return;this.payload=null,this.dispatchEvent(new Event("feaasLoad",{bubbles:!0,composed:!0}));let e=await this.load().catch(r=>{throw this.payload=void 0,r});if(this.whenLoaded.resolve(e),this.onLoad)return}else if(this.payload==null)return;this.flush(),this.whenRendered.resolve(this)}catch(e){this.onError(e)}}flush(){var e,r;let n=(r=(e=this.payload)===null||e===void 0?void 0:e.ReactDOM)===null||r===void 0?void 0:r.flushSync;n?n(()=>this.update()):this.update()}load(){return Promise.resolve(null)}update(){var e,r,n;if(this.payload==null||!this.render)return;let{React:i,ReactDOM:o,ReactDOMClient:s}=this.payload||{};if(!i)throw new Error(`${this.tagName}: React is not present in payload`);if(!o)throw new Error(`${this.tagName}: ReactDOM is not present in payload`);!this.refs.topReact&&!this.forceUpdateReact?s?(this.reactRoot||(this.reactRoot=s.createRoot(this.getReactRootElement())),this.reactRoot.render(this.getReactElement())):o.render(this.getReactElement(),this.getReactRootElement()):this.forceUpdateReact?(e=this.forceUpdateReact)===null||e===void 0||e.call(this):(n=(r=this.refs.topReact).forceUpdateReact)===null||n===void 0||n.call(r)}invokeReactRendering(){let{React:e,ReactDOM:r}=this.payload||{};if(!this.connected)return null;let n=this.descendants.filter(i=>i.refs.parentReact==this&&i.payload).map((i,o)=>this.getReactElement(i));return this.render({...this.props,children:n},this.payload)}getReactErrorBoundary(e=this,r=e.tagName){if(this.reactErrorBoundary)return this.reactErrorBoundary;let{React:n,ReactDOM:i}=e.payload||{};return this.reactErrorBoundary||(this.reactErrorBoundary=class extends n.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,a){console.error(`FEAAS: ${e.tagName} Error:`,s,a),e.onError(s,"react")}render(){if(!this.state.error)return this.props.children}})}getReactElement(e=this,r){let{React:n,ReactDOM:i}=e.payload||{},o=this.getReactErrorBoundary(),s=this.getReactWrapper(e);return n.createElement(o,{key:e.tagName+"-"+e.getUID(),slot:e.getAttribute("slot")},n.createElement(s,null))}getReactWrapper(e=this,r=e.tagName){if(e.reactWrapper)return e.reactWrapper;let{React:n,ReactDOM:i}=e.payload||{};return e.reactWrapper=o=>{if(e.render){let[s,a]=n.useReducer(u=>u+1,0);return e.forceUpdateReact=a,i.createPortal(n.createElement(n.Fragment,null,e.invokeReactRendering()),e.getReactRootElement())}else return e.update()},Object.assign(e.reactWrapper,{key:e.tagName+"-"+e.getUID(),displayName:r}),e.reactWrapper}getUID(){return this.uid||(this.uid=String(Math.random()))}getShadowRoot(){return this.shadowRoot||this.attachShadow({mode:"open"}),this.shadowRoot}getReactRootElement(){return this.useShadowRoot?this.getShadowRoot():this.getRoot()}set(e){try{this.scheduleRender(),this.overrides={...this.overrides,...e},this.props={...this.getProps(),...this.overrides};for(var r in this.props){let n=this.props[r],i=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();n==null||n===this.defaultProps[r]?this.removeAttribute(i):(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&this.getAttribute(i)!=String(n)&&this.setAttribute(i,String(n))}}catch(n){this.whenRendered.reject(n),this.onError(n,"set")}return this}import(e){return import( /*@vite-ignore*/ /* webpackIgnore: true */ e)}scheduleRender(){this.nextRender==null&&(this.whenRendered=this.whenRendered.restart()),cancelAnimationFrame(this.nextRender),this.nextRender=requestAnimationFrame(()=>{this.nextRender=null,this.advance().catch(e=>{})})}formatURL(e,r){return typeof e=="string"&&e.match(/^\/[^\/]/)?r+e:e}getContextAttribute(e,r=this){for(var n=this;n=n.parentElement||(n.parentNode instanceof ShadowRoot?n.parentNode.host:null);)if(n.getAttribute(e)!=null)return n.getAttribute(e);return this.getAttribute(e)}static register(e,r){r==null&&(r=typeof window!="undefined"?window:null),r&&!r.customElements.get(e)&&r.customElements.define(e,this)}};var D=class extends b{load(){return Promise.all([import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react"),import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom")]).then(([e,r])=>({React:e,ReactDOM:r}))}render({},{React:e}){return e.createElement(e.Fragment,null)}},V=class extends D{constructor(){super(...arguments),this.useShadowRoot=!0}getProps(){return{counter:parseFloat(this.getAttribute("counter"))}}render({counter:e},{React:r}){let[n,i]=r.useState(0);return r.useEffect(()=>{i(o=>o+1)},[e]),r.createElement(r.Fragment,null,r.createElement("p",null,"Rendering attribute: ",e),r.createElement("p",null,"Triggered updates: ",n))}};V.observedAttributes=["counter"];function g(t){return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(t)}function de(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ce(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function he(t,e,r){return e&&ce(t.prototype,e),r&&ce(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function De(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$(t,e)}function k(t){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},k(t)}function $(t,e){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$(t,e)}function fe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function P(t,e,r){return fe()?P=Reflect.construct.bind():P=function(i,o,s){var a=[null];a.push.apply(a,o);var u=Function.bind.apply(i,a),c=new u;return s&&$(c,s.prototype),c},P.apply(null,arguments)}function Oe(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Y(t){var e=typeof Map=="function"?new Map:void 0;return Y=function(n){if(n===null||!Oe(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return P(n,arguments,k(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),$(i,n)},Y(t)}function Ne(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pe(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ne(t)}function ke(t){var e=fe();return function(){var n=k(t),i;if(e){var o=k(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Pe(this,i)}}function $e(t){return Te(t)||Me(t)||pe(t)||Le()}function Te(t){if(Array.isArray(t))return Z(t)}function Me(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function pe(t,e){if(t){if(typeof t=="string")return Z(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Z(t,e)}}function Z(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Le(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}var m=Object.prototype.hasOwnProperty;function C(t,e){return t=t.slice(),t.push(e),t}function Q(t,e){return e=e.slice(),e.unshift(t),e}var je=function(t){De(r,t);var e=ke(r);function r(n){var i;return de(this,r),i=e.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),i.avoidNew=!0,i.value=n,i.name="NewError",i}return he(r)}(Y(Error));function f(t,e,r,n,i){if(!(this instanceof f))try{return new f(t,e,r,n,i)}catch(u){if(!u.avoidNew)throw u;return u.value}typeof t=="string"&&(i=n,n=r,r=e,e=t,t=null);var o=t&&g(t)==="object";if(t=t||{},this.json=t.json||r,this.path=t.path||e,this.resultType=t.resultType||"value",this.flatten=t.flatten||!1,this.wrap=m.call(t,"wrap")?t.wrap:!0,this.sandbox=t.sandbox||{},this.preventEval=t.preventEval||!1,this.parent=t.parent||null,this.parentProperty=t.parentProperty||null,this.callback=t.callback||n||null,this.otherTypeCallback=t.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},t.autostart!==!1){var s={path:o?t.path:e};o?"json"in t&&(s.json=t.json):s.json=r;var a=this.evaluate(s);if(!a||g(a)!=="object")throw new je(a);return a}}f.prototype.evaluate=function(t,e,r,n){var i=this,o=this.parent,s=this.parentProperty,a=this.flatten,u=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,e=e||this.json,t=t||this.path,t&&g(t)==="object"&&!Array.isArray(t)){if(!t.path&&t.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!m.call(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');var c=t;e=c.json,a=m.call(t,"flatten")?t.flatten:a,this.currResultType=m.call(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=m.call(t,"sandbox")?t.sandbox:this.currSandbox,u=m.call(t,"wrap")?t.wrap:u,this.currPreventEval=m.call(t,"preventEval")?t.preventEval:this.currPreventEval,r=m.call(t,"callback")?t.callback:r,this.currOtherTypeCallback=m.call(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,o=m.call(t,"parent")?t.parent:o,s=m.call(t,"parentProperty")?t.parentProperty:s,t=t.path}if(o=o||null,s=s||null,Array.isArray(t)&&(t=f.toPathString(t)),!(!t&&t!==""||!e)){var l=f.toPathArray(t);l[0]==="$"&&l.length>1&&l.shift(),this._hasParentSelector=null;var h=this._trace(l,e,["$"],o,s,r).filter(function(d){return d&&!d.isParentSelector});return h.length?!u&&h.length===1&&!h[0].hasArrExpr?this._getPreferredOutput(h[0]):h.reduce(function(d,p){var w=i._getPreferredOutput(p);return a&&Array.isArray(w)?d=d.concat(w):d.push(w),d},[]):u?[]:void 0}};f.prototype._getPreferredOutput=function(t){var e=this.currResultType;switch(e){case"all":{var r=Array.isArray(t.path)?t.path:f.toPathArray(t.path);return t.pointer=f.toPointer(r),t.path=typeof t.path=="string"?t.path:f.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return f.toPathString(t[e]);case"pointer":return f.toPointer(t.path);default:throw new TypeError("Unknown result type")}};f.prototype._handleCallback=function(t,e,r){if(e){var n=this._getPreferredOutput(t);t.path=typeof t.path=="string"?t.path:f.toPathString(t.path),e(n,r,t)}};f.prototype._trace=function(t,e,r,n,i,o,s,a){var u=this,c;if(!t.length)return c={path:r,value:e,parent:n,parentProperty:i,hasArrExpr:s},this._handleCallback(c,o,"value"),c;var l=t[0],h=t.slice(1),d=[];function p(y){Array.isArray(y)?y.forEach(function(Ce){d.push(Ce)}):d.push(y)}if((typeof l!="string"||a)&&e&&m.call(e,l))p(this._trace(h,e[l],C(r,l),e,l,o,s));else if(l==="*")this._walk(e,function(y){p(u._trace(h,e[y],C(r,y),e,y,o,!0,!0))});else if(l==="..")p(this._trace(h,e,r,n,i,o,s)),this._walk(e,function(y){g(e[y])==="object"&&p(u._trace(t.slice(),e[y],C(r,y),e,y,o,!0))});else{if(l==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:h,isParentSelector:!0};if(l==="~")return c={path:C(r,l),value:i,parent:n,parentProperty:null},this._handleCallback(c,o,"property"),c;if(l==="$")p(this._trace(h,e,r,null,null,o,s));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(l))p(this._slice(l,h,e,r,n,i,o));else if(l.indexOf("?(")===0){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");var w=l.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1");this._walk(e,function(y){u._eval(w,e[y],y,r,n,i)&&p(u._trace(h,e[y],C(r,y),e,y,o,!0))})}else if(l[0]==="("){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");p(this._trace(Q(this._eval(l,e,r[r.length-1],r.slice(0,-1),n,i),h),e,r,n,i,o,s))}else if(l[0]==="@"){var v=!1,S=l.slice(1,-2);switch(S){case"scalar":(!e||!["object","function"].includes(g(e)))&&(v=!0);break;case"boolean":case"string":case"undefined":case"function":g(e)===S&&(v=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(v=!0);break;case"number":Number.isFinite(e)&&(v=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(v=!0);break;case"object":e&&g(e)===S&&(v=!0);break;case"array":Array.isArray(e)&&(v=!0);break;case"other":v=this.currOtherTypeCallback(e,r,n,i);break;case"null":e===null&&(v=!0);break;default:throw new TypeError("Unknown value type "+S)}if(v)return c={path:r,value:e,parent:n,parentProperty:i},this._handleCallback(c,o,"value"),c}else if(l[0]==="`"&&e&&m.call(e,l.slice(1))){var _=l.slice(1);p(this._trace(h,e[_],C(r,_),e,_,o,s,!0))}else if(l.includes(",")){var xe=l.split(","),j=Be(xe),le;try{for(j.s();!(le=j.n()).done;){var _e=le.value;p(this._trace(Q(_e,h),e,r,n,i,o,!0))}}catch(y){j.e(y)}finally{j.f()}}else!a&&e&&m.call(e,l)&&p(this._trace(h,e[l],C(r,l),e,l,o,s,!0))}if(this._hasParentSelector)for(var F=0;F<d.length;F++){var U=d[F];if(U&&U.isParentSelector){var N=this._trace(U.expr,e,U.path,n,i,o,s);if(Array.isArray(N)){d[F]=N[0];for(var Fe=N.length,G=1;G<Fe;G++)F++,d.splice(F,0,N[G])}else d[F]=N}}return d};f.prototype._walk=function(t,e){if(Array.isArray(t))for(var r=t.length,n=0;n<r;n++)e(n);else t&&g(t)==="object"&&Object.keys(t).forEach(function(i){e(i)})};f.prototype._slice=function(t,e,r,n,i,o,s){if(Array.isArray(r)){var a=r.length,u=t.split(":"),c=u[2]&&Number.parseInt(u[2])||1,l=u[0]&&Number.parseInt(u[0])||0,h=u[1]&&Number.parseInt(u[1])||a;l=l<0?Math.max(0,l+a):Math.min(a,l),h=h<0?Math.max(0,h+a):Math.min(a,h);for(var d=[],p=l;p<h;p+=c){var w=this._trace(Q(p,e),r,n,i,o,s,!0);w.forEach(function(v){d.push(v)})}return d}};f.prototype._eval=function(t,e,r,n,i,o){this.currSandbox._$_parentProperty=o,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;var s=t.includes("@path");s&&(this.currSandbox._$_path=f.toPathString(n.concat([r])));var a="script:"+t;if(!f.cache[a]){var u=t.replace(/@parentProperty/g,"_$_parentProperty").replace(/@parent/g,"_$_parent").replace(/@property/g,"_$_property").replace(/@root/g,"_$_root").replace(/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/g,"_$_v$1");s&&(u=u.replace(/@path/g,"_$_path")),f.cache[a]=new this.vm.Script(u)}try{return f.cache[a].runInNewContext(this.currSandbox)}catch(c){throw new Error("jsonPath: "+c.message+": "+t)}};f.cache={};f.toPathString=function(t){for(var e=t,r=e.length,n="$",i=1;i<r;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[i])||(n+=/^[\*0-9]+$/.test(e[i])?"["+e[i]+"]":"['"+e[i]+"']");return n};f.toPointer=function(t){for(var e=t,r=e.length,n="",i=1;i<r;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[i])||(n+="/"+e[i].toString().replace(/~/g,"~0").replace(/\//g,"~1"));return n};f.toPathArray=function(t){var e=f.cache;if(e[t])return e[t].concat();var r=[],n=t.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g,";$&;").replace(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]]/g,function(o,s){return"[#"+(r.push(s)-1)+"]"}).replace(/\[["']((?:(?!['\]])[\s\S])*)["']\]/g,function(o,s){return"['"+s.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"}).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:(?!\[)[\s\S])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,function(o,s){return";"+s.split("").join(";")+";"}).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,""),i=n.split(";").map(function(o){var s=o.match(/#([0-9]+)/);return!s||!s[1]?o:r[s[1]]});return e[t]=i,e[t].concat()};var Ue=function(e,r,n){for(var i=e.length,o=0;o<i;o++){var s=e[o];n(s)&&r.push(e.splice(o--,1)[0])}},Ie=function(){function t(e){de(this,t),this.code=e}return he(t,[{key:"runInNewContext",value:function(r){var n=this.code,i=Object.keys(r),o=[];Ue(i,o,function(l){return typeof r[l]=="function"});var s=i.map(function(l,h){return r[l]}),a=o.reduce(function(l,h){var d=r[h].toString();return/function/.test(d)||(d="function "+d),"var "+h+"="+d+";"+l},"");n=a+n,!/(["'])use strict\1/.test(n)&&!i.includes("arguments")&&(n="var arguments = undefined;"+n),n=n.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,"");var u=n.lastIndexOf(";"),c=u>-1?n.slice(0,u+1)+" return "+n.slice(u+1):" return "+n;return P(Function,i.concat([c])).apply(void 0,$e(s))}}]),t}();f.prototype.vm={Script:Ie};function He(t){return t.replace(/(\[[^\]\[]+\]|\.\*)$/g,"")}function ye(t){return He(t)+".*"}function ee(t,e,r=!1,n=t){var i=e;let o=Object.keys(t).sort((a,u)=>u.length-a.length);for(let a of o)if(e.startsWith(a)){if(a==e){if(r)return t[a];continue}i=e.substring(a.length+1),n=t[a];break}var s=f({path:i,json:n});return Array.isArray(s)&&(s==null?void 0:s.length)==0&&(s=[i.replace(/^.*?\./,"_."),i.replace(/^.*?\./,""),i.replace(/^([^.]+).*?\.\$\./,"$1."),i.replace(/^.*?\.\$\./,"_."),i.replace(/^.*?\.\$\./,""),i.replace(/^[^.]+$/,"_")].filter((a,u,c)=>c.indexOf(a)===u).reduce((a,u)=>a.length>0?a:f({path:u,json:n}),[])),r&&Array.isArray(s)?s[0]:s}function X(t,e={},r){return r?`<${r}${Object.entries(e).map(([n,i])=>i!=null&&` ${n}="${i}"`).filter(Boolean).join("")}>${T(t)}</${r}>`.replace(/^<([a-z0-9][^>]*)><\/[^>]+>$/,"<$1 />"):T(t)}function T(t){var e;if(Array.isArray(t))return t.map(T).join(`
|
|
4
|
-
`).trim();if(typeof t=="string")return t;if(t==null)return"";switch(t.type){case"heading":let{level:r,...n}=t.attrs;return X(t.content,n,"h"+r);case"text":return(t.marks||[]).reduce((i,o)=>X(i,o.attrs,{link:"a",bold:"strong",italic:"em",strike:"s",underline:"u"}[o.type]),(e=t.text)===null||e===void 0?void 0:e.replace(/\s+/," "));default:return X(t.content||t.text,t.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[t.type])}}var R=class{constructor(e,r=1,n){this.ownerDocument={createElement(i){return new R(i)}},this.nodeName=e,this.nodeType=r,this.textContent=n,this.attributes=[],this.childNodes=[]}setAttribute(e,r){let n=this.attributes.find(i=>i.name===e);n?n.value=r:this.attributes.push({name:e,value:r})}getAttribute(e){let r=this.attributes.find(n=>n.name===e);return r?r.value:void 0}insertBefore(e,r){if(e.parentNode=this,r===null)this.childNodes.push(e);else{let n=this.childNodes.indexOf(r);n!==-1&&this.childNodes.splice(n,0,e)}}removeAttribute(e){let r=this.attributes.findIndex(n=>n.name===e);r!==-1&&this.attributes.splice(r,1)}appendChild(e){e.parentNode=this,this.childNodes.push(e)}get tagName(){var e;return(e=this.nodeName)===null||e===void 0?void 0:e.toUpperCase()}get innerHTML(){return te(this.childNodes)}set innerHTML(e){this.childNodes=re(String(e!=null?e:""))}get outerHTML(){return te([this])}closest(e){let r=this;for(;r;){if(ve(e,r))return r;r=r.parentNode}return null}querySelectorAll(e){let r=e.split(/\s*,\s*/),n=[],i=o=>{for(let s of r)if(ve(s,o)){n.push(o);break}for(let s of o.childNodes)i(s)};for(let o of this.childNodes)i(o);return n}querySelector(e){return this.querySelectorAll(e)[0]}findSibling(e,r){if(!this.parentNode)return null;let n=this.parentNode.childNodes,i=n.indexOf(this);if(i===-1)return null;for(let o=i+e;o>=0&&o<n.length;o+=e){let s=n[o];if(!r||s.nodeType===1)return s}return null}removeChild(e){let r=this.childNodes.indexOf(e);if(r!==-1)return this.childNodes.splice(r,1),e.parentNode=void 0,e}get previousSibling(){return this.findSibling(-1)}get nextSibling(){return this.findSibling(1)}get previousElementSibling(){return this.findSibling(-1,!0)}get nextElementSibling(){return this.findSibling(1,!0)}cloneNode(e=!1){let r=new R(this.nodeName,this.nodeType);if(r.attributes=JSON.parse(JSON.stringify(this.attributes)),this.textContent&&(r.textContent=this.textContent),e)for(let n of this.childNodes){let i=n.cloneNode(!0);r.appendChild(i)}return r}get parentElement(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.nodeType)==1?this.parentNode:null}};function ve(t,e){let r=t.match(/([.#]?[\w-]+|\[([\w-]+)(="([^"]*)")?\])/g);if(!r)return!1;for(let n of r)if(n.startsWith("#")){if(e.getAttribute("id")!==n.slice(1))return!1}else if(n.startsWith(".")){if(!(e.getAttribute("class")||"").split(" ").includes(n.slice(1)))return!1}else if(n.startsWith("[")){let i=n.match(/^\[([\w-]+)(="([^"]*)")?\]$/);if(i){let o=i[1],s=i[3],a=e.getAttribute(o);if(typeof s=="undefined"){if(a===void 0)return!1}else if(a!==s)return!1}else return!1}else if(e.nodeName!==n)return!1;return!0}function re(t){var e;let r=[],n=[];for(;t;){let i=t.match(/^<([\w-]+)(\s[^>]*)?>/),o=t.match(/^<\/([\w-]+)>/);if(i){let s=i[1],u=((e=(i[2]||"").match(/([\w-]+)(="([^"]*)")?/g))===null||e===void 0?void 0:e.map(l=>{let[h,d,,p]=l.match(/([\w-]+)(="([^"]*)")?/);return{name:d,value:ze(p||"")}}))||[],c=new R(s,1);if(c.attributes=u,n.length>0){let l=n[n.length-1];l.childNodes.push(c),c.parentNode=l}else r.push(c);n.push(c),t=t.slice(i[0].length)}else if(o)n.pop(),t=t.slice(o[0].length);else{let s=t.indexOf("<"),a=t.slice(0,s!==-1?s:void 0),u=new R("#text",3);if(u.textContent=a,n.length>0){let c=n[n.length-1];c.childNodes.push(u),u.parentNode=c}else r.push(u);t=t.slice(a.length)}}return r}function We(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ze(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}function te(t){return t.map(e=>{if(e.nodeType===3)return e.textContent||"";let{nodeName:r,attributes:n}=e,i=n.map(({name:s,value:a})=>` ${s}="${We(String(a))}"`).join(""),o=te(e.childNodes);return["img","input","br"].includes(r)?`<${r}${i} />`:`<${r}${i}>${o}</${r}>`}).join("")}function Je(t){let e=new t.ownerDocument.defaultView.MutationObserver(r=>{r.forEach(n=>{let i=n.target,o=i.getAttribute("data-embed-src");o&&I(i,o),n.addedNodes&&n.addedNodes.forEach(s=>{s.nodeType==1&&qe(s,!1)})})});return e.observe(t,{attributes:!0,subtree:!0,childList:!0}),e}function qe(t,e=!0){let r=t.querySelectorAll("[data-embed-src]");for(var n=0;n<r.length;n++){let i=r[n];I(i,i.getAttribute("data-embed-src"))}if(e)return Je(t)}function I(t,e){for(var r=t;r;r=r.parentElement)if(!r.parentElement){let i=r.querySelectorAll("script");for(var n=0;n<i.length;n++)if(i[n].getAttribute("src")==e)return!0;r.tagName=="HTML"&&(r=r.querySelector("head")||r);let o=r.ownerDocument.createElement("script");o.setAttribute("type","module"),o.setAttribute("src",e),r.appendChild(o);break}}function be(t){let e=t.getAttribute("data-path-scope");for(var r=0,n=t;n=n.previousElementSibling;)n.getAttribute("data-path-scope")==e&&r++;return r}function Ke(t,e,r){let n=t.getAttribute("data-path-scope");if(n==null)return;var i=be(t);if(i!=0)return;let o=t.parentNode;if(o!=null){e==0?t.setAttribute("hidden","hidden"):t.getAttribute("hidden")!=null&&t.removeAttribute("hidden");for(var s=i+1,a=t,u=t;u=u.nextElementSibling;)u.getAttribute("data-path-scope")==n&&(s++,a=u);for(var c=s;c<e;c++)o.insertBefore(a.cloneNode(!0),a.nextElementSibling);for(var c=Math.max(1,e);c<s;c++)a=a.previousElementSibling,o.removeChild(a.nextElementSibling)}}function M(t,e,r,n){var i;if(t){var o=t;(r==null?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=T(r)),n!=null&&n.processValue&&(r=n==null?void 0:n.processValue(t,e,r));var s=e.replace("data-path-","");if(e=="data-path-src")o=t.tagName=="IMG"?t:t.querySelector("img, video");else if(e=="data-path-href")o=t.querySelector("a")||t.closest("a");else if(e=="data-path-alt")o=t.querySelector("img, picture");else if(e=="data-path-hidden")r=r?null:!0;else if(e=="data-path"||e=="data-embed-html"||e=="html")s="innerHTML";else if(e=="data-embed-src")I(t,r);else if(e=="data-path-attributes"){let h=((i=t.getAttribute("data-attributes-keys"))===null||i===void 0?void 0:i.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var a in r){var u=r[a];M(t,a,typeof u=="object"&&u?JSON.stringify(u):u,n)}for(var c=0;c<h.length;c++)(r==null||!(h[c]in r))&&M(t,h[c],null,n);M(t,"data-attributes-keys",Object.keys(r||{}).join(","));return}if(typeof r=="boolean"&&(r=r?"":null),!!o){var l=String(t.getAttribute("data-path-placeholder")||o[s]);r!=null?s=="innerHTML"?o.innerHTML!=r&&(o.innerHTML=r):o.getAttribute(s)!=r&&o.setAttribute(s,r):s=="innerHTML"?o.innerHTML=l:o.removeAttribute(s)}}}var me=["data-attributes-keys","data-path-attributes","data-path-scope"];function A(t,e,r,n){var i,o,s;let a=t;if(n||(e=((i=r==null?void 0:r.processData)===null||i===void 0?void 0:i.call(r,a,e))||e),a.nodeType==1){let l=a.getAttribute("data-path-scope");if(l){let d=be(a),p=ee(e,l,!1)||[];d==0&&Ke(a,((o=r==null?void 0:r.shouldRepeat)===null||o===void 0?void 0:o.call(r,a,p))===!1?1:p.length,r),e={...e,[ye(l)]:p[d]}}let h=Array.prototype.slice.call(a.attributes).sort((d,p)=>me.indexOf(d.name)-me.indexOf(p.name));for(var u=0;u<h.length;u++){let{name:d,value:p}=h[u];d.startsWith("data-path")&&d!="data-path-scope"&&M(a,d,ee(e,p,!0),r),d=="data-embed-src"&&M(a,d,a.getAttribute(d),r)}}for(var u=0,c;c=a.childNodes[u++];)ge(c)&&A(c,e,r,!0);return n||(s=r==null?void 0:r.onRender)===null||s===void 0||s.call(r,a,e),a}function ge(t){return t.nodeType==1}function L(t,e,r,n){var i;let o=((i=n==null?void 0:n.processTemplate)===null||i===void 0?void 0:i.call(n,t,e,r))||e;if(t.innerHTML=o,t.classList.add("-feaas"),(t.closest(".component.feaas")||t).className.includes("-theme--"))for(var a=0,u;u=t.childNodes[a++];)ge(u)&&(u.className=u.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return A(t,r,n)}function bt(t,e,r,n=!1){var i;let o=((i=r==null?void 0:r.processTemplate)===null||i===void 0?void 0:i.call(r,null,t,e))||t;if(typeof document=="undefined"||n){let s=re(o);return A(s[0],e,r).outerHTML}else{let s=document.createElement("div");return s.innerHTML=o,A(s,e,r),s.innerHTML}}var Ae=["initial","check","updated"],H={};function wt(){H={}}async function we(t,e,r,n,i=H){return O({url:t,options:e,validator:r,callback:n,cache:i}).then(W).then(o=>o.response)}function Ge(t,e=!1){let r=String(t).replace("?head","");var n=H[r];return!n&&!e&&(n=H[r]={phase:null,initial:x(),check:x(),updated:x(),final:x()}),n}async function O({url:t,options:e,validator:r,callback:n,cache:i},o="initial"){let s=new Date;if(i!=null){var a=Ge(t);if(Ae.indexOf(a.phase)>=Ae.indexOf(o))var u=a[o];else a.phase=o}let c=await(u||fetch(t,e));if(!u&&a&&(c.ok?a[o].resolve(c):a[o].reject(new Error("Fetch failed"))),!c.ok)throw new Error("Fetch failed");if((r==null?void 0:r(c))===!1)throw new Error("Response is not valid");let l=new Date(c.headers.get("date"))<s||u&&o=="initial"&&(a.phase=="updated"||a.phase=="check");return await(n==null?void 0:n(c,o,l)),{url:t,options:e,isCached:l,response:c,validator:r,callback:n,cache:i}}async function W(t){let{url:e,isCached:r,options:n,validator:i,response:o,cache:s}=t;if(r){let{response:a}=await O({url:e+"?head",options:{...n,method:"HEAD",cache:"no-cache"},validator:i,cache:s},"check");if(a.headers.get("last-modified")!=o.headers.get("last-modified"))return ne(t)}return t}async function ne(t){return O({...t,options:{...t.options,cache:"reload"}},"updated")}var E="https://feaas.blob.core.windows.net";function z(t){let e=t.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(e){var[,r,n,i,o,s]=e;return{cdn:r,library:n,component:i,version:o,revision:s}}}function xt(t){if(!t||!t.library||!t.component)throw new Error("Component requires `library` and `component` properties");return`${t.cdn&&t.cdn!=E?`${t.cdn}/components`:""}/${t.library}/${t.component}/${!t.version||t.version=="responsive"&&(!t.revision||t.revision=="published")?"":t.version}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/(^\/|\/$|\/\/)(?!.+\/components\/)/g,"")}function _t(t){return`${t.cdn&&t.cdn!=E?`${t.cdn}/styles/`:""}${t.library}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function ie(t){let e=t.match(/^(?:(.*?)\/styles\/)?([^\/]+)(?:\/(published|staged|saved|\d+)(?:.css)?)?$/);if(e){var[,r,n,i]=e;return{cdn:r,library:n,revision:i}}else{let o=z(t);if(o){var{cdn:r,library:n,revision:i}=o;return i!=null&&i.match(/\d/)&&(i=void 0),{cdn:r,library:n,revision:i}}}}function Se(t){return typeof t=="string"&&(t={src:t}),"src"in t&&(t={...z(t.src)}),`${t.cdn||t.hostname||E}/components/${t.library}/${t.component}/${t.version}/${t.revision||"published"}.html`}function J(t){return typeof t=="string"&&(t={src:t}),"src"in t&&(t={...ie(t.src)}),`${t.cdn||t.hostname||E}/styles/${t.library}/${t.revision||"published"}.css`}async function B(t,e,r=!1){let n=a=>a.headers.get("x-ms-meta-versionDeletedAt")==null,i=a=>a.clone().text().then(e),o=await Promise.all([t.instance&&O({options:{headers:{Accept:"text/html"},credentials:"omit"},url:Se({...t,version:t.instance}),validator:n}).catch(a=>a),O({url:Se(t),validator:n}).catch(a=>a)]),s=o.find(a=>a&&"isCached"in a&&a);if(!s||s instanceof Error)throw o.find(u=>u&&u instanceof Error)||new Error("Can not fetch component");return o[0]==s&&console.log("Using fork!",o),await i(s.response),r?s:W({...s,callback:i}).catch(a=>{if(o[0]==s&&(ne({...s,callback:null,validator:null}),console.log("Fork was deleted"),!(o[1]instanceof Error)))return i(o[1].response),W({...o[1],callback:i});throw a})}async function Ft(t){typeof t=="string"&&(t={src:t});var e;let{response:r}=await B(t,n=>{e=n},!0);return{...t,template:e,lastModified:r.headers.get("last-modified")}}async function oe(t,e){return typeof t=="string"&&(t={src:t}),we(J(t),{headers:{Accept:"text/css"},credentials:"omit"},r=>r.headers.get("x-ms-meta-deletedAt")==null,(r,n)=>r.clone().text().then(i=>e(i,n)))}function Dt(t,e){return Ve(t,e||(e=document.createElement("style"))),e}function Ve(t,e){return e||(e=document.createElement("style")),oe(t,(r,n)=>{e.textContent=r}).then(()=>e)}function se(t,e){var r=Ye(t);if(!r)var n=Ze(t);return oe(t,(i,o)=>{n&&(n.textContent=i),e==null||e(i,o)}).then(()=>r||n)}function Ee(t){return new Promise((e,r)=>{se(t,e).catch(r)})}function Ye(t){return document.head.querySelector(`style[data-href="${J(t)}"]`)}function Ze(t){let e=J(t),r=document.createElement("style");return r.setAttribute("data-href",e),document.head.appendChild(r),r}function kt(t,e){let r=document.createElement("div");r.innerHTML=t;let n=document.createDocumentFragment();for(;r.firstChild;)n.appendChild(r.firstChild);return A(n,e),r}function $t(t,e){return Qe(t,e||(e=document.createElement("div"))),e}async function Qe(t,e){return e||(e=document.createElement("div")),e.childNodes.length?A(e,t.data,t):"template"in t?L(e,t.template,t.data,t):B(t,r=>L(e,r,t.data,t)).then(()=>e)}function Xe(t=this){var e,r,n,i,o,s,a,u;let c,l=t.getAttribute("src");if(l){let _=z(l);if(!_)throw new Error(`Could not parse FEAAS Component source: ${l}`);var{cdn:h,library:d,component:p,version:w,revision:v}=_}let S=t.getAttribute("data");if(S!=null&&S!="")try{c=typeof S=="string"?JSON.parse(S):{}}catch(_){}return{data:c||{},cdn:(r=(e=t.getContextAttribute("cdn"))!==null&&e!==void 0?e:h)!==null&&r!==void 0?r:E,library:(n=t.getAttribute("library"))!==null&&n!==void 0?n:d,component:(i=t.getAttribute("component"))!==null&&i!==void 0?i:p,version:(s=(o=t.getAttribute("version"))!==null&&o!==void 0?o:w)!==null&&s!==void 0?s:"responsive",revision:(u=(a=t.getAttribute("revision"))!==null&&a!==void 0?a:v)!==null&&u!==void 0?u:"published",hostname:t.getAttribute("hostname"),template:t.getAttribute("template"),instance:t.getAttribute("instance"),editable:t.getAttribute("editable")!=null,suspended:t.getAttribute("suspended")!=null,lastModified:t.getAttribute("last-modified"),withStylesheet:t.getAttribute("with-stylesheet")!="false"}}var q=class extends b{setData(e){this.set({data:e})}getProps(){return Xe(this)}attributeChangedCallback(e,r,n){r!==n&&((e=="library"||e=="component"||e=="revision"||e=="version")&&(this.payload=void 0),this.needsRefresh=!0,super.attributeChangedCallback(e,r,n))}getEditor(){var e;return(e=document.querySelector("feaas-context"))===null||e===void 0?void 0:e.refs.editor}constructor(){super(),this.defaultProps={cdn:E,revision:"published",version:"responsive",withStylesheet:!0,editable:!1,suspended:!1},this.onLoad=e=>{this.payload=e,this.advance()},this.addEventListener("click",()=>{this.props.editable&&this.edit()})}edit(){let e=this.getEditor();if(e!=null&&e.setTarget(this))return e.open(),!0}getOriginal(){let e=this.getAttribute("data-path-scope");if(e){for(var r=this;(r=r.previousElementSibling)&&r.getAttribute("data-path-scope")==e;)var n=r;return n}}isReadyToLoad(){return super.isReadyToLoad()&&this.props.library!=null&&this.props.component!=null&&this.props.version!=null}async load(){if(!this.getOriginal()){if(this.props.withStylesheet)var e=Ee({...this.props,revision:"published"}).then(()=>{e=null,this.payload&&this.onLoad(this.payload)});return Promise.all([e,B(this.props,r=>{this.payload=r,e||this.onLoad(r)})]).then(()=>this.payload)}}update(){if(Array.from(this.children).filter(e=>e.tagName!="BR").length>0&&!this.needsRefresh)A(this,this.props.data);else{if(this.needsRefresh=!0,this.getOriginal())return;L(this,this.payload,this.props.data)}}};q.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet"];q.register("feaas-component");function et(t=this){return{opacity:t!=null&&t.getAttribute("opacity")?parseFloat(t==null?void 0:t.getAttribute("opacity")):1,hidden:(t==null?void 0:t.getAttribute("hidden"))!=null}}var K=class extends b{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return et(this)}attributeChangedCallback(e,r,n){if(r!==n)return e=="hidden"&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),n?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,r,n)}connectedCallback(){this.payload=null,super.connectedCallback(),this.attributeChangedCallback("hidden",this.getAttribute("hidden"),this.getAttribute("hidden")),this.stylesheet=document.createElement("style"),this.stylesheet.textContent=`
|
|
1
|
+
function F(t,e=r=>{}){var r;let n=()=>{var i,o;let s=new Promise((u,d)=>{i=l=>{t==null||t(l),u(l)},o=d});var a=Object.assign(s,{resolve:i,reject:o,restart:n,first:r});return r=a,a.catch(e),a};return n()}var Ne=typeof HTMLElement=="undefined"?typeof windowJSDOM!="undefined"?windowJSDOM.HTMLElement:class{}:HTMLElement,g=class extends Ne{getProps(e){return{}}constructor(){super(),this.defaultProps={},this.connected=!1,this.refs={},this.descendants=[],this.whenLoaded=F(e=>{this.payload=e}),this.whenRendered=F(()=>this.initialized=!0,()=>cancelAnimationFrame(this.nextRender)),this.addEventListener("feaasMount",this),this.addEventListener("feaasUnmount",this)}getRoot(){return this}attributeChangedCallback(e,r,n){this.set()}connectedCallback(){this.mount()}disconnectedCallback(){this.unmount()}mount(){try{let e=this.getParent();if(e&&!e.connected||this.connected)return;this.connected=!0,this.log("FEAAS: Mount",this.tagName,this),this.dispatchEvent(new Event("feaasMount",{bubbles:!0,composed:!0})),this.getElements().map(r=>{var n;return(n=r.mount)===null||n===void 0?void 0:n.call(r)}),this.set()}catch(e){this.onError(e)}}log(...e){console.log(...e)}unmount(){this.connected&&(this.log("FEAAS: Unmount",this),this.dispatchEvent(new Event("feaasUnmount",{bubbles:!0,composed:!0})),this.connected=!1)}getParent(e=!0){for(var r=this;r=r.parentElement||(r.parentNode instanceof ShadowRoot?r.parentNode.host:null);)if(!e||r.tagName.startsWith("FEAAS-"))return r}getElements(e=this.getRoot(),r=!0){return Array.from(e.querySelectorAll("*")).map(n=>[!r||n.tagName.startsWith("FEAAS-")?n:null,n.shadowRoot?this.getElements(n.shadowRoot,r):null]).flat().filter(Boolean)}handleEvent(e){let r=e.composedPath()[0];switch(e.type){case"feaasMount":r!=this&&this.nestedCallback(r);break;case"feaasUnmount":r!=this&&this.unnestedCallback(r);break}}unnestedCallback(e){let r=this.descendants.indexOf(e);r!=-1&&(this.log("FEAAS: Unnest",this,e),this.descendants.splice(r,-1),this.refs[e.getComponentName()]=null,e.refs.parent==this&&(e.refs.parent=null),e.refs.top==this&&(e.refs.top=e.refs.parent))}nestedCallback(e){var r,n;if(this.descendants.indexOf(e)==-1&&(this.descendants.push(e),this.log("FEAAS: Nest",this,e),this.refs[e.getComponentName()]=e,e.refs.top=this,(r=e.refs).parent||(r.parent=this),e.render))for(var o=e.refs.parent;o;o=o.refs.parent)o.render&&((n=e.refs).parentReact||(n.parentReact=o),e.refs.topReact=o)}getComponentName(){return this.tagName.replace("FEAAS-","").toLowerCase()}isReadyToLoad(){return this.payload===void 0&&this.getAttribute("hidden")==null}onError(e,r="uncaught",n=!1){let i=new CustomEvent("feaasError",{bubbles:!0,composed:!0,detail:e});if(this.dispatchEvent(i),this.whenLoaded.reject(e),!i.defaultPrevented&&!n){this.whenRendered.reject(e);try{this.unmount()}catch(o){}return!0}return!1}shouldUpdateOnLoad(){return!0}async advance(){try{if(this.payload===void 0){if(!this.isReadyToLoad())return;this.payload=null,this.dispatchEvent(new Event("feaasLoad",{bubbles:!0,composed:!0}));let e=await this.load().catch(r=>{throw this.payload=void 0,r});if(this.whenLoaded.resolve(e),this.onLoad)return}else if(this.payload==null)return;this.flush(),this.whenRendered.resolve(this)}catch(e){this.onError(e)}}flush(){var e,r;let n=(r=(e=this.payload)===null||e===void 0?void 0:e.ReactDOM)===null||r===void 0?void 0:r.flushSync;n?n(()=>this.update()):this.update()}load(){return Promise.resolve(null)}update(){var e,r,n;if(this.payload==null||!this.render)return;let{React:i,ReactDOM:o,ReactDOMClient:s}=this.payload||{};if(!i)throw new Error(`${this.tagName}: React is not present in payload`);if(!o)throw new Error(`${this.tagName}: ReactDOM is not present in payload`);!this.refs.topReact&&!this.forceUpdateReact?s?(this.reactRoot||(this.reactRoot=s.createRoot(this.getReactRootElement())),this.reactRoot.render(this.getReactElement())):o.render(this.getReactElement(),this.getReactRootElement()):this.forceUpdateReact?(e=this.forceUpdateReact)===null||e===void 0||e.call(this):(n=(r=this.refs.topReact).forceUpdateReact)===null||n===void 0||n.call(r)}invokeReactRendering(){let{React:e,ReactDOM:r}=this.payload||{};if(!this.connected)return null;let n=this.descendants.filter(i=>i.refs.parentReact==this&&i.payload).map((i,o)=>this.getReactElement(i));return this.render({...this.props,children:n},this.payload)}getReactErrorBoundary(e=this,r=e.tagName){if(this.reactErrorBoundary)return this.reactErrorBoundary;let{React:n,ReactDOM:i}=e.payload||{};return this.reactErrorBoundary||(this.reactErrorBoundary=class extends n.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,a){console.error(`FEAAS: ${e.tagName} Error:`,s,a),e.onError(s,"react")}render(){if(!this.state.error)return this.props.children}})}getReactElement(e=this,r){let{React:n,ReactDOM:i}=e.payload||{},o=this.getReactErrorBoundary(),s=this.getReactWrapper(e);return n.createElement(o,{key:e.tagName+"-"+e.getUID(),slot:e.getAttribute("slot")},n.createElement(s,null))}getReactWrapper(e=this,r=e.tagName){if(e.reactWrapper)return e.reactWrapper;let{React:n,ReactDOM:i}=e.payload||{};return e.reactWrapper=o=>{if(e.render){let[s,a]=n.useReducer(u=>u+1,0);return e.forceUpdateReact=a,i.createPortal(n.createElement(n.Fragment,null,e.invokeReactRendering()),e.getReactRootElement())}else return e.update()},Object.assign(e.reactWrapper,{key:e.tagName+"-"+e.getUID(),displayName:r}),e.reactWrapper}getUID(){return this.uid||(this.uid=String(Math.random()))}getShadowRoot(){return this.shadowRoot||this.attachShadow({mode:"open"}),this.shadowRoot}getReactRootElement(){return this.useShadowRoot?this.getShadowRoot():this.getRoot()}set(e){try{this.scheduleRender(),this.overrides={...this.overrides,...e},this.props={...this.getProps(),...this.overrides};for(var r in this.props){let n=this.props[r],i=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();n==null||n===this.defaultProps[r]?this.removeAttribute(i):(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&this.getAttribute(i)!=String(n)&&this.setAttribute(i,String(n))}}catch(n){this.whenRendered.reject(n),this.onError(n,"set")}return this}import(e){return import( /*@vite-ignore*/ /* webpackIgnore: true */ e)}scheduleRender(){this.nextRender==null&&(this.whenRendered=this.whenRendered.restart()),cancelAnimationFrame(this.nextRender),this.nextRender=requestAnimationFrame(()=>{this.nextRender=null,this.advance().catch(e=>{})})}formatURL(e,r){return typeof e=="string"&&e.match(/^\/[^\/]/)?r+e:e}getContextAttribute(e,r=this){for(var n=this;n=n.parentElement||(n.parentNode instanceof ShadowRoot?n.parentNode.host:null);)if(n.getAttribute(e)!=null)return n.getAttribute(e);return this.getAttribute(e)}static register(e,r){r==null&&(r=typeof window!="undefined"?window:null),r&&!r.customElements.get(e)&&r.customElements.define(e,this)}};var O=class extends g{load(){return Promise.all([import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react"),import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom")]).then(([e,r])=>({React:e,ReactDOM:r}))}render({},{React:e}){return e.createElement(e.Fragment,null)}},Y=class extends O{constructor(){super(...arguments),this.useShadowRoot=!0}getProps(){return{counter:parseFloat(this.getAttribute("counter"))}}render({counter:e},{React:r}){let[n,i]=r.useState(0);return r.useEffect(()=>{i(o=>o+1)},[e]),r.createElement(r.Fragment,null,r.createElement("p",null,"Rendering attribute: ",e),r.createElement("p",null,"Triggered updates: ",n))}};Y.observedAttributes=["counter"];function A(t){return A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(t)}function fe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function he(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function pe(t,e,r){return e&&he(t.prototype,e),r&&he(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$(t,e)}function T(t){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},T(t)}function $(t,e){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$(t,e)}function ye(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function k(t,e,r){return ye()?k=Reflect.construct.bind():k=function(i,o,s){var a=[null];a.push.apply(a,o);var u=Function.bind.apply(i,a),d=new u;return s&&$(d,s.prototype),d},k.apply(null,arguments)}function ke(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function X(t){var e=typeof Map=="function"?new Map:void 0;return X=function(n){if(n===null||!ke(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return k(n,arguments,T(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),$(i,n)},X(t)}function Te(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $e(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Te(t)}function Me(t){var e=ye();return function(){var n=T(t),i;if(e){var o=T(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return $e(this,i)}}function Le(t){return Be(t)||je(t)||ve(t)||Ue()}function Be(t){if(Array.isArray(t))return Z(t)}function je(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function ve(t,e){if(t){if(typeof t=="string")return Z(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Z(t,e)}}function Z(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ue(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ie(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ve(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}var b=Object.prototype.hasOwnProperty;function R(t,e){return t=t.slice(),t.push(e),t}function Q(t,e){return e=e.slice(),e.unshift(t),e}var He=function(t){Pe(r,t);var e=Me(r);function r(n){var i;return fe(this,r),i=e.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),i.avoidNew=!0,i.value=n,i.name="NewError",i}return pe(r)}(X(Error));function p(t,e,r,n,i){if(!(this instanceof p))try{return new p(t,e,r,n,i)}catch(u){if(!u.avoidNew)throw u;return u.value}typeof t=="string"&&(i=n,n=r,r=e,e=t,t=null);var o=t&&A(t)==="object";if(t=t||{},this.json=t.json||r,this.path=t.path||e,this.resultType=t.resultType||"value",this.flatten=t.flatten||!1,this.wrap=b.call(t,"wrap")?t.wrap:!0,this.sandbox=t.sandbox||{},this.preventEval=t.preventEval||!1,this.parent=t.parent||null,this.parentProperty=t.parentProperty||null,this.callback=t.callback||n||null,this.otherTypeCallback=t.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},t.autostart!==!1){var s={path:o?t.path:e};o?"json"in t&&(s.json=t.json):s.json=r;var a=this.evaluate(s);if(!a||A(a)!=="object")throw new He(a);return a}}p.prototype.evaluate=function(t,e,r,n){var i=this,o=this.parent,s=this.parentProperty,a=this.flatten,u=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,e=e||this.json,t=t||this.path,t&&A(t)==="object"&&!Array.isArray(t)){if(!t.path&&t.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!b.call(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');var d=t;e=d.json,a=b.call(t,"flatten")?t.flatten:a,this.currResultType=b.call(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=b.call(t,"sandbox")?t.sandbox:this.currSandbox,u=b.call(t,"wrap")?t.wrap:u,this.currPreventEval=b.call(t,"preventEval")?t.preventEval:this.currPreventEval,r=b.call(t,"callback")?t.callback:r,this.currOtherTypeCallback=b.call(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,o=b.call(t,"parent")?t.parent:o,s=b.call(t,"parentProperty")?t.parentProperty:s,t=t.path}if(o=o||null,s=s||null,Array.isArray(t)&&(t=p.toPathString(t)),!(!t&&t!==""||!e)){var l=p.toPathArray(t);l[0]==="$"&&l.length>1&&l.shift(),this._hasParentSelector=null;var f=this._trace(l,e,["$"],o,s,r).filter(function(h){return h&&!h.isParentSelector});return f.length?!u&&f.length===1&&!f[0].hasArrExpr?this._getPreferredOutput(f[0]):f.reduce(function(h,y){var S=i._getPreferredOutput(y);return a&&Array.isArray(S)?h=h.concat(S):h.push(S),h},[]):u?[]:void 0}};p.prototype._getPreferredOutput=function(t){var e=this.currResultType;switch(e){case"all":{var r=Array.isArray(t.path)?t.path:p.toPathArray(t.path);return t.pointer=p.toPointer(r),t.path=typeof t.path=="string"?t.path:p.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return p.toPathString(t[e]);case"pointer":return p.toPointer(t.path);default:throw new TypeError("Unknown result type")}};p.prototype._handleCallback=function(t,e,r){if(e){var n=this._getPreferredOutput(t);t.path=typeof t.path=="string"?t.path:p.toPathString(t.path),e(n,r,t)}};p.prototype._trace=function(t,e,r,n,i,o,s,a){var u=this,d;if(!t.length)return d={path:r,value:e,parent:n,parentProperty:i,hasArrExpr:s},this._handleCallback(d,o,"value"),d;var l=t[0],f=t.slice(1),h=[];function y(v){Array.isArray(v)?v.forEach(function(Oe){h.push(Oe)}):h.push(v)}if((typeof l!="string"||a)&&e&&b.call(e,l))y(this._trace(f,e[l],R(r,l),e,l,o,s));else if(l==="*")this._walk(e,function(v){y(u._trace(f,e[v],R(r,v),e,v,o,!0,!0))});else if(l==="..")y(this._trace(f,e,r,n,i,o,s)),this._walk(e,function(v){A(e[v])==="object"&&y(u._trace(t.slice(),e[v],R(r,v),e,v,o,!0))});else{if(l==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:f,isParentSelector:!0};if(l==="~")return d={path:R(r,l),value:i,parent:n,parentProperty:null},this._handleCallback(d,o,"property"),d;if(l==="$")y(this._trace(f,e,r,null,null,o,s));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(l))y(this._slice(l,f,e,r,n,i,o));else if(l.indexOf("?(")===0){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");var S=l.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1");this._walk(e,function(v){u._eval(S,e[v],v,r,n,i)&&y(u._trace(f,e[v],R(r,v),e,v,o,!0))})}else if(l[0]==="("){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");y(this._trace(Q(this._eval(l,e,r[r.length-1],r.slice(0,-1),n,i),f),e,r,n,i,o,s))}else if(l[0]==="@"){var m=!1,w=l.slice(1,-2);switch(w){case"scalar":(!e||!["object","function"].includes(A(e)))&&(m=!0);break;case"boolean":case"string":case"undefined":case"function":A(e)===w&&(m=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(m=!0);break;case"number":Number.isFinite(e)&&(m=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(m=!0);break;case"object":e&&A(e)===w&&(m=!0);break;case"array":Array.isArray(e)&&(m=!0);break;case"other":m=this.currOtherTypeCallback(e,r,n,i);break;case"null":e===null&&(m=!0);break;default:throw new TypeError("Unknown value type "+w)}if(m)return d={path:r,value:e,parent:n,parentProperty:i},this._handleCallback(d,o,"value"),d}else if(l[0]==="`"&&e&&b.call(e,l.slice(1))){var _=l.slice(1);y(this._trace(f,e[_],R(r,_),e,_,o,s,!0))}else if(l.includes(",")){var Ce=l.split(","),U=Ie(Ce),de;try{for(U.s();!(de=U.n()).done;){var Re=de.value;y(this._trace(Q(Re,f),e,r,n,i,o,!0))}}catch(v){U.e(v)}finally{U.f()}}else!a&&e&&b.call(e,l)&&y(this._trace(f,e[l],R(r,l),e,l,o,s,!0))}if(this._hasParentSelector)for(var C=0;C<h.length;C++){var I=h[C];if(I&&I.isParentSelector){var P=this._trace(I.expr,e,I.path,n,i,o,s);if(Array.isArray(P)){h[C]=P[0];for(var De=P.length,V=1;V<De;V++)C++,h.splice(C,0,P[V])}else h[C]=P}}return h};p.prototype._walk=function(t,e){if(Array.isArray(t))for(var r=t.length,n=0;n<r;n++)e(n);else t&&A(t)==="object"&&Object.keys(t).forEach(function(i){e(i)})};p.prototype._slice=function(t,e,r,n,i,o,s){if(Array.isArray(r)){var a=r.length,u=t.split(":"),d=u[2]&&Number.parseInt(u[2])||1,l=u[0]&&Number.parseInt(u[0])||0,f=u[1]&&Number.parseInt(u[1])||a;l=l<0?Math.max(0,l+a):Math.min(a,l),f=f<0?Math.max(0,f+a):Math.min(a,f);for(var h=[],y=l;y<f;y+=d){var S=this._trace(Q(y,e),r,n,i,o,s,!0);S.forEach(function(m){h.push(m)})}return h}};p.prototype._eval=function(t,e,r,n,i,o){this.currSandbox._$_parentProperty=o,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;var s=t.includes("@path");s&&(this.currSandbox._$_path=p.toPathString(n.concat([r])));var a="script:"+t;if(!p.cache[a]){var u=t.replace(/@parentProperty/g,"_$_parentProperty").replace(/@parent/g,"_$_parent").replace(/@property/g,"_$_property").replace(/@root/g,"_$_root").replace(/@([\t-\r \)\.\[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])/g,"_$_v$1");s&&(u=u.replace(/@path/g,"_$_path")),p.cache[a]=new this.vm.Script(u)}try{return p.cache[a].runInNewContext(this.currSandbox)}catch(d){throw new Error("jsonPath: "+d.message+": "+t)}};p.cache={};p.toPathString=function(t){for(var e=t,r=e.length,n="$",i=1;i<r;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[i])||(n+=/^[\*0-9]+$/.test(e[i])?"["+e[i]+"]":"['"+e[i]+"']");return n};p.toPointer=function(t){for(var e=t,r=e.length,n="",i=1;i<r;i++)/^(~|\^|@(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\(\))$/.test(e[i])||(n+="/"+e[i].toString().replace(/~/g,"~0").replace(/\//g,"~1"));return n};p.toPathArray=function(t){var e=p.cache;if(e[t])return e[t].concat();var r=[],n=t.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g,";$&;").replace(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]]/g,function(o,s){return"[#"+(r.push(s)-1)+"]"}).replace(/\[["']((?:(?!['\]])[\s\S])*)["']\]/g,function(o,s){return"['"+s.replace(/\./g,"%@%").replace(/~/g,"%%@@%%")+"']"}).replace(/~/g,";~;").replace(/["']?\.["']?(?!(?:(?!\[)[\s\S])*\])|\[["']?/g,";").replace(/%@%/g,".").replace(/%%@@%%/g,"~").replace(/(?:;)?(\^+)(?:;)?/g,function(o,s){return";"+s.split("").join(";")+";"}).replace(/;;;|;;/g,";..;").replace(/;$|'?\]|'$/g,""),i=n.split(";").map(function(o){var s=o.match(/#([0-9]+)/);return!s||!s[1]?o:r[s[1]]});return e[t]=i,e[t].concat()};var We=function(e,r,n){for(var i=e.length,o=0;o<i;o++){var s=e[o];n(s)&&r.push(e.splice(o--,1)[0])}},ze=function(){function t(e){fe(this,t),this.code=e}return pe(t,[{key:"runInNewContext",value:function(r){var n=this.code,i=Object.keys(r),o=[];We(i,o,function(l){return typeof r[l]=="function"});var s=i.map(function(l,f){return r[l]}),a=o.reduce(function(l,f){var h=r[f].toString();return/function/.test(h)||(h="function "+h),"var "+f+"="+h+";"+l},"");n=a+n,!/(["'])use strict\1/.test(n)&&!i.includes("arguments")&&(n="var arguments = undefined;"+n),n=n.replace(/;[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*$/,"");var u=n.lastIndexOf(";"),d=u>-1?n.slice(0,u+1)+" return "+n.slice(u+1):" return "+n;return k(Function,i.concat([d])).apply(void 0,Le(s))}}]),t}();p.prototype.vm={Script:ze};function Je(t){return t.replace(/(\[[^\]\[]+\]|\.\*)$/g,"")}function me(t){return Je(t)+".*"}function te(t,e,r=!1,n=t){var i=e;let o=Object.keys(t).sort((a,u)=>u.length-a.length);for(let a of o)if(e.startsWith(a)){if(a==e){if(r)return t[a];continue}i=e.substring(a.length+1),n=t[a];break}var s=p({path:i,json:n});return Array.isArray(s)&&(s==null?void 0:s.length)==0&&(s=[i.replace(/^.*?\./,"_."),i.replace(/^.*?\./,""),i.replace(/^([^.]+).*?\.\$\./,"$1."),i.replace(/^.*?\.\$\./,"_."),i.replace(/^.*?\.\$\./,""),i.replace(/^[^.]+$/,"_")].filter((a,u,d)=>d.indexOf(a)===u).reduce((a,u)=>a.length>0?a:p({path:u,json:n}),[])),r&&Array.isArray(s)?s[0]:s}function ee(t,e={},r){return r?`<${r}${Object.entries(e).map(([n,i])=>i!=null&&` ${n}="${i}"`).filter(Boolean).join("")}>${M(t)}</${r}>`.replace(/^<([a-z0-9][^>]*)><\/[^>]+>$/,"<$1 />"):M(t)}function M(t){var e;if(Array.isArray(t))return t.map(M).join(`
|
|
4
|
+
`).trim();if(typeof t=="string")return t;if(t==null)return"";switch(t.type){case"heading":let{level:r,...n}=t.attrs;return ee(t.content,n,"h"+r);case"text":return(t.marks||[]).reduce((i,o)=>ee(i,o.attrs,{link:"a",bold:"strong",italic:"em",strike:"s",underline:"u"}[o.type]),(e=t.text)===null||e===void 0?void 0:e.replace(/\s+/," "));default:return ee(t.content||t.text,t.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[t.type])}}var D=class{constructor(e,r=1,n){this.ownerDocument={createElement(i){return new D(i)}},this.nodeName=e,this.nodeType=r,this.textContent=n,this.attributes=[],this.childNodes=[]}setAttribute(e,r){let n=this.attributes.find(i=>i.name===e);n?n.value=r:this.attributes.push({name:e,value:r})}getAttribute(e){let r=this.attributes.find(n=>n.name===e);return r?r.value:void 0}insertBefore(e,r){if(e.parentNode=this,r===null)this.childNodes.push(e);else{let n=this.childNodes.indexOf(r);n!==-1&&this.childNodes.splice(n,0,e)}}removeAttribute(e){let r=this.attributes.findIndex(n=>n.name===e);r!==-1&&this.attributes.splice(r,1)}appendChild(e){e.parentNode=this,this.childNodes.push(e)}get tagName(){var e;return(e=this.nodeName)===null||e===void 0?void 0:e.toUpperCase()}get innerHTML(){return re(this.childNodes)}set innerHTML(e){this.childNodes=ne(String(e!=null?e:""))}get outerHTML(){return re([this])}closest(e){let r=this;for(;r;){if(be(e,r))return r;r=r.parentNode}return null}querySelectorAll(e){let r=e.split(/\s*,\s*/),n=[],i=o=>{for(let s of r)if(be(s,o)){n.push(o);break}for(let s of o.childNodes)i(s)};for(let o of this.childNodes)i(o);return n}querySelector(e){return this.querySelectorAll(e)[0]}findSibling(e,r){if(!this.parentNode)return null;let n=this.parentNode.childNodes,i=n.indexOf(this);if(i===-1)return null;for(let o=i+e;o>=0&&o<n.length;o+=e){let s=n[o];if(!r||s.nodeType===1)return s}return null}removeChild(e){let r=this.childNodes.indexOf(e);if(r!==-1)return this.childNodes.splice(r,1),e.parentNode=void 0,e}get previousSibling(){return this.findSibling(-1)}get nextSibling(){return this.findSibling(1)}get previousElementSibling(){return this.findSibling(-1,!0)}get nextElementSibling(){return this.findSibling(1,!0)}cloneNode(e=!1){let r=new D(this.nodeName,this.nodeType);if(r.attributes=JSON.parse(JSON.stringify(this.attributes)),this.textContent&&(r.textContent=this.textContent),e)for(let n of this.childNodes){let i=n.cloneNode(!0);r.appendChild(i)}return r}get parentElement(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.nodeType)==1?this.parentNode:null}};function be(t,e){let r=t.match(/([.#]?[\w-]+|\[([\w-]+)(="([^"]*)")?\])/g);if(!r)return!1;for(let n of r)if(n.startsWith("#")){if(e.getAttribute("id")!==n.slice(1))return!1}else if(n.startsWith(".")){if(!(e.getAttribute("class")||"").split(" ").includes(n.slice(1)))return!1}else if(n.startsWith("[")){let i=n.match(/^\[([\w-]+)(="([^"]*)")?\]$/);if(i){let o=i[1],s=i[3],a=e.getAttribute(o);if(typeof s=="undefined"){if(a===void 0)return!1}else if(a!==s)return!1}else return!1}else if(e.nodeName!==n)return!1;return!0}function ne(t){var e;let r=[],n=[];for(;t;){let i=t.match(/^<([\w-]+)(\s[^>]*)?>/),o=t.match(/^<\/([\w-]+)>/);if(i){let s=i[1],u=((e=(i[2]||"").match(/([\w-]+)(="([^"]*)")?/g))===null||e===void 0?void 0:e.map(l=>{let[f,h,,y]=l.match(/([\w-]+)(="([^"]*)")?/);return{name:h,value:Ke(y||"")}}))||[],d=new D(s,1);if(d.attributes=u,n.length>0){let l=n[n.length-1];l.childNodes.push(d),d.parentNode=l}else r.push(d);n.push(d),t=t.slice(i[0].length)}else if(o)n.pop(),t=t.slice(o[0].length);else{let s=t.indexOf("<"),a=t.slice(0,s!==-1?s:void 0),u=new D("#text",3);if(u.textContent=a,n.length>0){let d=n[n.length-1];d.childNodes.push(u),u.parentNode=d}else r.push(u);t=t.slice(a.length)}}return r}function qe(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ke(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}function re(t){return t.map(e=>{if(e.nodeType===3)return e.textContent||"";let{nodeName:r,attributes:n}=e,i=n.map(({name:s,value:a})=>` ${s}="${qe(String(a))}"`).join(""),o=re(e.childNodes);return["img","input","br"].includes(r)?`<${r}${i} />`:`<${r}${i}>${o}</${r}>`}).join("")}function Ge(t){let e=new t.ownerDocument.defaultView.MutationObserver(r=>{r.forEach(n=>{let i=n.target,o=i.getAttribute("data-embed-src");o&&H(i,o),n.addedNodes&&n.addedNodes.forEach(s=>{s.nodeType==1&&Ve(s,!1)})})});return e.observe(t,{attributes:!0,subtree:!0,childList:!0}),e}function Ve(t,e=!0){let r=t.querySelectorAll("[data-embed-src]");for(var n=0;n<r.length;n++){let i=r[n];H(i,i.getAttribute("data-embed-src"))}if(e)return Ge(t)}function H(t,e){for(var r=t;r;r=r.parentElement)if(!r.parentElement){let i=r.querySelectorAll("script");for(var n=0;n<i.length;n++)if(i[n].getAttribute("src")==e)return!0;r.tagName=="HTML"&&(r=r.querySelector("head")||r);let o=r.ownerDocument.createElement("script");o.setAttribute("type","module"),o.setAttribute("src",e),r.appendChild(o);break}}function Ae(t){let e=t.getAttribute("data-path-scope");for(var r=0,n=t;n=n.previousElementSibling;)n.getAttribute("data-path-scope")==e&&r++;return r}function Ye(t,e,r){let n=t.getAttribute("data-path-scope");if(n==null)return;var i=Ae(t);if(i!=0)return;let o=t.parentNode;if(o!=null){e==0?t.setAttribute("hidden","hidden"):t.getAttribute("hidden")!=null&&t.removeAttribute("hidden");for(var s=i+1,a=t,u=t;u=u.nextElementSibling;)u.getAttribute("data-path-scope")==n&&(s++,a=u);for(var d=s;d<e;d++)o.insertBefore(a.cloneNode(!0),a.nextElementSibling);for(var d=Math.max(1,e);d<s;d++)a=a.previousElementSibling,o.removeChild(a.nextElementSibling)}}function L(t,e,r,n){var i;if(t){var o=t;(r==null?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=M(r)),n!=null&&n.processValue&&(r=n==null?void 0:n.processValue(t,e,r));var s=e.replace("data-path-","");if(e=="data-path-src")o=t.tagName=="IMG"?t:t.querySelector("img, video");else if(e=="data-path-href")o=t.querySelector("a")||t.closest("a");else if(e=="data-path-alt")o=t.querySelector("img, picture");else if(e=="data-path-hidden")r=r?null:!0;else if(e=="data-path"||e=="data-embed-html"||e=="html")s="innerHTML";else if(e=="data-embed-src")H(t,r);else if(e=="data-path-attributes"){let f=((i=t.getAttribute("data-attributes-keys"))===null||i===void 0?void 0:i.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var a in r){var u=r[a];L(t,a,typeof u=="object"&&u?JSON.stringify(u):u,n)}for(var d=0;d<f.length;d++)(r==null||!(f[d]in r))&&L(t,f[d],null,n);L(t,"data-attributes-keys",Object.keys(r||{}).join(","));return}if(typeof r=="boolean"&&(r=r?"":null),!!o){var l=String(t.getAttribute("data-path-placeholder")||o[s]);r!=null?s=="innerHTML"?o.innerHTML!=r&&(o.innerHTML=r):o.getAttribute(s)!=r&&o.setAttribute(s,r):s=="innerHTML"?o.innerHTML=l:o.removeAttribute(s)}}}var ge=["data-attributes-keys","data-path-attributes","data-path-scope"];function E(t,e,r,n){var i,o,s;let a=t;if(n||(e=((i=r==null?void 0:r.processData)===null||i===void 0?void 0:i.call(r,a,e))||e),a.nodeType==1){let l=a.getAttribute("data-path-scope");if(l){let h=Ae(a),y=te(e,l,!1)||[];h==0&&Ye(a,((o=r==null?void 0:r.shouldRepeat)===null||o===void 0?void 0:o.call(r,a,y))===!1?1:y.length,r),e={...e,[me(l)]:y[h]}}let f=Array.prototype.slice.call(a.attributes).sort((h,y)=>ge.indexOf(h.name)-ge.indexOf(y.name));for(var u=0;u<f.length;u++){let{name:h,value:y}=f[u];h.startsWith("data-path")&&h!="data-path-scope"&&L(a,h,te(e,y,!0),r),h=="data-embed-src"&&L(a,h,a.getAttribute(h),r)}}for(var u=0,d;d=a.childNodes[u++];)Ee(d)&&E(d,e,r,!0);return n||(s=r==null?void 0:r.onRender)===null||s===void 0||s.call(r,a,e),a}function Ee(t){return t.nodeType==1}function B(t,e,r,n){var i;let o=((i=n==null?void 0:n.processTemplate)===null||i===void 0?void 0:i.call(n,t,e,r))||e;if(t.innerHTML=o,t.classList.add("-feaas"),(t.closest(".component.feaas")||t).className.includes("-theme--"))for(var a=0,u;u=t.childNodes[a++];)Ee(u)&&(u.className=u.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return E(t,r,n)}function Ft(t,e,r,n=!1){var i;let o=((i=r==null?void 0:r.processTemplate)===null||i===void 0?void 0:i.call(r,null,t,e))||t;if(typeof document=="undefined"||n){let s=ne(o);return E(s[0],e,r).outerHTML}else{let s=document.createElement("div");return s.innerHTML=o,E(s,e,r),s.innerHTML}}var Se=["initial","check","updated"],W={};function Rt(){W={}}async function we(t,e,r,n,i=W){return N({url:t,options:e,validator:r,callback:n,cache:i}).then(z).then(o=>o.response)}function Xe(t,e=!1){let r=String(t).replace("?head","");var n=W[r];return!n&&!e&&(n=W[r]={phase:null,initial:F(),check:F(),updated:F(),final:F()}),n}async function N({url:t,options:e,validator:r,callback:n,cache:i},o="initial"){let s=new Date;if(i!=null){var a=Xe(t);if(Se.indexOf(a.phase)>=Se.indexOf(o))var u=a[o];else a.phase=o}let d=await(u||fetch(t,e));if(!u&&a&&(d.ok?a[o].resolve(d):a[o].reject(new Error("Fetch failed"))),!d.ok)throw new Error("Fetch failed");if((r==null?void 0:r(d))===!1)throw new Error("Response is not valid");let l=new Date(d.headers.get("date"))<s||u&&o=="initial"&&(a.phase=="updated"||a.phase=="check");return await(n==null?void 0:n(d,o,l)),{url:t,options:e,isCached:l,response:d,validator:r,callback:n,cache:i}}async function z(t){let{url:e,isCached:r,options:n,validator:i,response:o,cache:s}=t;if(r){let{response:a}=await N({url:e+"?head",options:{...n,method:"HEAD",cache:"no-cache"},validator:i,cache:s},"check");if(a.headers.get("last-modified")!=o.headers.get("last-modified"))return ie(t)}return t}async function ie(t){return N({...t,options:{...t.options,cache:"reload"}},"updated")}var x="https://feaas.blob.core.windows.net";function J(t){let e=t.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(e){var[,r,n,i,o,s]=e;return{cdn:r,library:n,component:i,version:o,revision:s}}}function Nt(t){if(!t||!t.library||!t.component)throw new Error("Component requires `library` and `component` properties");return`${t.cdn&&t.cdn!=x?`${t.cdn}/components`:""}/${t.library}/${t.component}/${!t.version||t.version=="responsive"&&(!t.revision||t.revision=="published")?"":t.version}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/(^\/|\/$|\/\/)(?!.+\/components\/)/g,"")}function Pt(t){return`${t.cdn&&t.cdn!=x?`${t.cdn}/styles/`:""}${t.library}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function oe(t){let e=t.match(/^(?:(.*?)\/styles\/)?([^\/]+)(?:\/(published|staged|saved|\d+)(?:.css)?)?$/);if(e){var[,r,n,i]=e;return{cdn:r,library:n,revision:i}}else{let o=J(t);if(o){var{cdn:r,library:n,revision:i}=o;return i!=null&&i.match(/\d/)&&(i=void 0),{cdn:r,library:n,revision:i}}}}function xe(t){return typeof t=="string"&&(t={src:t}),"src"in t&&(t={...J(t.src)}),`${t.cdn||t.hostname||x}/components/${t.library}/${t.component}/${t.version}/${t.revision||"published"}.html`}function q(t){return typeof t=="string"&&(t={src:t}),"src"in t&&(t={...oe(t.src)}),`${t.cdn||t.hostname||x}/styles/${t.library}/${t.revision||"published"}.css`}async function j(t,e,r=!1){let n=a=>a.headers.get("x-ms-meta-versionDeletedAt")==null,i=a=>a.clone().text().then(e),o=await Promise.all([t.instance&&N({options:{headers:{Accept:"text/html"},credentials:"omit"},url:xe({...t,version:t.instance}),validator:n}).catch(a=>a),N({url:xe(t),validator:n}).catch(a=>a)]),s=o.find(a=>a&&"isCached"in a&&a);if(!s||s instanceof Error)throw o.find(u=>u&&u instanceof Error)||new Error("Can not fetch component");return o[0]==s&&console.log("Using fork!",o),await i(s.response),r?s:z({...s,callback:i}).catch(a=>{if(o[0]==s&&(ie({...s,callback:null,validator:null}),console.log("Fork was deleted"),!(o[1]instanceof Error)))return i(o[1].response),z({...o[1],callback:i});throw a})}async function kt(t){typeof t=="string"&&(t={src:t});var e;let{response:r}=await j(t,n=>{e=n},!0);return{...t,template:e,lastModified:r.headers.get("last-modified")}}async function se(t,e){return typeof t=="string"&&(t={src:t}),we(q(t),{headers:{Accept:"text/css"},credentials:"omit"},r=>r.headers.get("x-ms-meta-deletedAt")==null,(r,n)=>r.clone().text().then(i=>e(i,n)))}function Mt(t,e){return Ze(t,e||(e=document.createElement("style"))),e}function Ze(t,e){return e||(e=document.createElement("style")),se(t,(r,n)=>{e.textContent=r}).then(()=>e)}function ae(t,e){var r=Qe(t);if(!r)var n=et(t);return se(t,(i,o)=>{n&&(n.textContent=i),e==null||e(i,o)}).then(()=>r||n)}function Fe(t){return new Promise((e,r)=>{ae(t,e).catch(r)})}function Qe(t){return document.head.querySelector(`style[data-href="${q(t)}"]`)}function et(t){let e=q(t),r=document.createElement("style");return r.setAttribute("data-href",e),document.head.appendChild(r),r}function Ut(t,e){let r=document.createElement("div");r.innerHTML=t;let n=document.createDocumentFragment();for(;r.firstChild;)n.appendChild(r.firstChild);return E(n,e),r}function It(t,e){return tt(t,e||(e=document.createElement("div"))),e}async function tt(t,e){return e||(e=document.createElement("div")),e.childNodes.length?E(e,t.data,t):"template"in t?B(e,t.template,t.data,t):j(t,r=>B(e,r,t.data,t)).then(()=>e)}function rt(t=this){var e,r,n,i,o,s,a,u;let d,l=t.getAttribute("src");if(l){let _=J(l);if(!_)throw new Error(`Could not parse FEAAS Component source: ${l}`);var{cdn:f,library:h,component:y,version:S,revision:m}=_}let w=t.getAttribute("data");if(w!=null&&w!="")try{d=typeof w=="string"?JSON.parse(w):{}}catch(_){}return{data:d||{},cdn:(r=(e=t.getContextAttribute("cdn"))!==null&&e!==void 0?e:f)!==null&&r!==void 0?r:x,library:(n=t.getAttribute("library"))!==null&&n!==void 0?n:h,component:(i=t.getAttribute("component"))!==null&&i!==void 0?i:y,version:(s=(o=t.getAttribute("version"))!==null&&o!==void 0?o:S)!==null&&s!==void 0?s:"responsive",revision:(u=(a=t.getAttribute("revision"))!==null&&a!==void 0?a:m)!==null&&u!==void 0?u:"published",hostname:t.getAttribute("hostname"),template:t.getAttribute("template"),instance:t.getAttribute("instance"),editable:t.getAttribute("editable")!=null,suspended:t.getAttribute("suspended")!=null,lastModified:t.getAttribute("last-modified"),withStylesheet:t.getAttribute("with-stylesheet")!="false"}}var K=class extends g{setData(e){this.set({data:e})}getProps(){return rt(this)}attributeChangedCallback(e,r,n){r!==n&&((e=="library"||e=="component"||e=="revision"||e=="version")&&(this.payload=void 0),this.needsRefresh=!0,super.attributeChangedCallback(e,r,n))}getEditor(){var e;return(e=document.querySelector("feaas-context"))===null||e===void 0?void 0:e.refs.editor}constructor(){super(),this.defaultProps={cdn:x,revision:"published",version:"responsive",withStylesheet:!0,editable:!1,suspended:!1},this.onLoad=e=>{this.payload=e,this.advance()},this.addEventListener("click",()=>{this.props.editable&&this.edit()})}edit(){let e=this.getEditor();if(e!=null&&e.setTarget(this))return e.open(),!0}getOriginal(){let e=this.getAttribute("data-path-scope");if(e){for(var r=this;(r=r.previousElementSibling)&&r.getAttribute("data-path-scope")==e;)var n=r;return n}}isReadyToLoad(){return super.isReadyToLoad()&&this.props.library!=null&&this.props.component!=null&&this.props.version!=null}async load(){if(!this.getOriginal()){if(this.props.withStylesheet)var e=Fe({...this.props,revision:"published"}).then(()=>{e=null,this.payload&&this.onLoad(this.payload)});return Promise.all([e,j(this.props,r=>{this.payload=r,e||this.onLoad(r)})]).then(()=>this.payload)}}update(){if(Array.from(this.children).filter(e=>e.tagName!="BR").length>0&&!this.needsRefresh)E(this,this.props.data);else{if(this.needsRefresh=!0,this.getOriginal())return;B(this,this.payload,this.props.data)}}};K.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet"];K.register("feaas-component");function nt(t=this){return{opacity:t!=null&&t.getAttribute("opacity")?parseFloat(t==null?void 0:t.getAttribute("opacity")):1,hidden:(t==null?void 0:t.getAttribute("hidden"))!=null}}var G=class extends g{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return nt(this)}attributeChangedCallback(e,r,n){if(r!==n)return e=="hidden"&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),n?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,r,n)}connectedCallback(){this.payload=null,super.connectedCallback(),this.attributeChangedCallback("hidden",this.getAttribute("hidden"),this.getAttribute("hidden")),this.stylesheet=document.createElement("style"),this.stylesheet.textContent=`
|
|
5
5
|
#loader {
|
|
6
6
|
position: absolute;
|
|
7
7
|
top: 0;
|
|
@@ -65,5 +65,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
65
65
|
style="animation: 1.5s linear 0s infinite normal none running loader-circular-track"
|
|
66
66
|
></circle>
|
|
67
67
|
</svg>
|
|
68
|
-
</div>`,this.getRoot().appendChild(this.stylesheet),this.getRoot().appendChild(this.loader)}update(){this.loader.style.opacity=String(this.props.opacity)}};
|
|
68
|
+
</div>`,this.getRoot().appendChild(this.stylesheet),this.getRoot().appendChild(this.loader)}update(){this.loader.style.opacity=String(this.props.opacity)}};G.observedAttributes=["hidden","opacity"];G.register("feaas-loader");function it(t=this){var e,r,n,i;let o=t.getAttribute("src");if(o)var{cdn:s,library:a,revision:u}=oe(o);return{library:t==null?void 0:t.getContextAttribute("library"),revision:(r=(e=t==null?void 0:t.getAttribute("revision"))!==null&&e!==void 0?e:u)!==null&&r!==void 0?r:"published",cdn:(i=(n=t==null?void 0:t.getContextAttribute("cdn"))!==null&&n!==void 0?n:t==null?void 0:t.getContextAttribute("hostname"))!==null&&i!==void 0?i:x}}var ue=class extends g{constructor(){super(...arguments),this.onLoad=e=>{this.payload=e,this.advance()}}getProps(){return it(this)}isReadyToLoad(){return this.props.library!=null&&this.props.revision!=null&&this.props.cdn!=null}load(){return ae(this.props,this.onLoad)}};ue.register("feaas-stylesheet");import ot from"react";import st from"react-dom";function le(t){let e=/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g;return t.replace(e,function(r){return"-"+r.toLowerCase()})}function _e(t){let e=/-[a-z\u00E0-\u00F6\u00F8-\u00FE]/g;return t.replace(e,function(r){return r.slice(1).toUpperCase()})}var at=t=>{if(!t)return;let e,r;return t.properties&&(e=Object.keys(t.properties).reduce((n,i)=>(n[le(i)]=t.properties[i],n),{}),r=t.required.map(n=>le(n))),{...t,properties:e,required:r}};function ut(t=this){return t.getAttributeNames().reduce((n,i)=>!i.startsWith("data-attribute")&&!["class","id","contenteditable"].includes(i)?{...n,[_e(i)]:t.getAttribute(i)}:n,{})}var _FEAASExternal=class extends g{load(){return Promise.resolve({React:ot,ReactDOM:st})}render(t,{React:e}){var r;let{dataExternalId:n}=t,i=(r=_FEAASExternal.registered[n])===null||r===void 0?void 0:r.component;return i||console.warn("FEAASExternal: The component you requested is not registered"),e.createElement(e.Fragment,null,i&&e.createElement(i,{...t}))}getProps(){return ut(this)}static registerComponent(t,e={},r){_FEAASExternal.registered[r||t.name]={component:t,schema:e}}static setRegistrationCallback(){_FEAASExternal.registrationCallback||(_FEAASExternal.registrationCallback=setTimeout(()=>{let t=Object.keys(_FEAASExternal.registered).map(e=>({..._FEAASExternal.registered[e],name:e,schema:at(_FEAASExternal.registered[e].schema),component:_FEAASExternal.registered[e].component.toString()}));window.parent.postMessage(JSON.stringify({action:"register-components",data:t}),"*")},500))}static loadComponents(){let components=JSON.parse(sessionStorage.getItem("feaas-external-components"));components.forEach(c=>{let name=c.name,schema=c.schema,component=eval("("+c.component+")");_FEAASExternal.registerComponent(component,schema,name)})}};_FEAASExternal.registered={};_FEAASExternal.register("feaas-external");_FEAASExternal.setRegistrationCallback();var ce;typeof window!="undefined"&&(window.FEAASElement=O,(ce=window.FEAASLoading)!==null&&ce!==void 0||(window.FEAASLoading=Promise.resolve()));export{g as Base,K as Component,rt as ComponentProps,x as DEFAULT_CDN_URL,_FEAASExternal as External,g as FEAASBase,K as FEAASComponent,rt as FEAASComponentsProps,ut as FEAASExternalProps,G as FEAASLoader,nt as FEAASLoaderProps,ue as FEAASStylesheet,it as FEAASStylesheetProps,p as JSONPath,G as Loader,Y as MyComponent,ue as Stylesheet,Ve as autoloadScripts,Je as cleanCollectionBit,Rt as clearFetchCache,et as createStylesheet,we as fetchAndRevalidate,j as fetchAndRevalidateComponent,se as fetchAndRevalidateStylesheet,ie as fetchBypassingCache,W as fetchCache,kt as fetchComponent,z as fetchToValidateCache,N as fetchWithCacheAwareness,Qe as findStylesheet,Nt as getComponentSource,xe as getComponentURL,Xe as getFetchCache,Pt as getStylesheetSource,q as getStylesheetURL,H as loadScript,ae as loadStylesheet,Fe as loadStylesheetAllowStale,me as normalizeCollectionScope,Ge as observeDOMElement,J as parseComponentSource,oe as parseStylesheetSource,te as queryScopes,It as renderComponent,Ut as renderComponentElement,tt as renderComponentPromise,B as renderDOMContent,E as renderDOMElement,Ft as renderHTMLContent,Mt as renderStylesheet,Ze as renderStylesheetPromise,M as serializeCH1RichText,L as setDOMAttribute};
|
|
69
69
|
//# sourceMappingURL=headless.esm.js.map
|