@spiffcommerce/theme-bridge 1.25.1 → 1.25.2

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/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tD=require("@repo/core"),nD=require("fs"),rD=require("path");exports.ThemeFileType=void 0;(function(x){x.Javascript="Javascript",x.CSS="CSS"})(exports.ThemeFileType||(exports.ThemeFileType={}));exports.FieldType=void 0;(function(x){x.Asset="Asset",x.Boolean="Boolean",x.Color="Color",x.ConversionConfiguration="ConversionConfiguration",x.Heading="Heading",x.List="List",x.Number="Number",x.Object="Object",x.Select="Select",x.Text="Text",x.DateRange="DateRange"})(exports.FieldType||(exports.FieldType={}));exports.AssetType=void 0;(function(x){x.Color="Color",x.ColorProfile="ColorProfile",x.Data="Data",x.Environment="Environment",x.Font="Font",x.Frame="Frame",x.Illustration="Illustration",x.Image="Image",x.Material="Material",x.Model="Model",x.Video="Video"})(exports.AssetType||(exports.AssetType={}));exports.CustomSchemaType=void 0;(function(x){x.Object="Object",x.Union="Union"})(exports.CustomSchemaType||(exports.CustomSchemaType={}));exports.ConversionLocation=void 0;(function(x){x.Manual="Manual",x.OnStart="OnStart",x.OnQuit="OnQuit",x.OnEnd="OnEnd"})(exports.ConversionLocation||(exports.ConversionLocation={}));function mE(x){return Object.assign({},...x.map(j=>{if(j.key)return{[j.key]:fT(j)}}))}function fT(x){if(x.type===exports.FieldType.Asset)return x.asset;if(x.type===exports.FieldType.DateRange){const j=x.value?.split(",");if(!j||j.length!==2||!j[0]||!j[1])return;try{return{start:new Date(j[0]),end:new Date(j[1])}}catch{return}}if(x.type===exports.FieldType.ConversionConfiguration)return x.conversionConfiguration;if(x.type!==exports.FieldType.List&&x.type!==exports.FieldType.Object){if(x.value===void 0)return;if(x.type===exports.FieldType.Number)try{const j=Number.parseFloat(x.value);return Number.isNaN(j)?void 0:j}catch{return}else if(x.type===exports.FieldType.Boolean)return x.value==="true";return x.value}if(x.listValues)return x.listValues.map(fT);if(x.objectValues)return{...mE(x.objectValues),schema:x.schema??void 0}}function aD(x){return mE(x)}function iD(x){return mE(x.fields)}function qm(x,j){const k={...x,items:void 0,fields:void 0};return x.items!==void 0&&x.items!==null&&(k.items=qm(j[x.items],j)),x.fields!==void 0&&x.fields!==null&&(k.fields=x.fields.map(Ve=>qm(j[Ve],j))),k}function dT(x){const j={...x,fields:[],customSchemas:x.customSchemas?.map(Ve=>({...Ve,fields:Ve.fields?.map(at=>qm(x.fields[at],x.fields))}))},k=[];if(x.fields.forEach(Ve=>{Ve.root&&k.push(qm(Ve,x.fields))}),x.fields.length>0&&k.length===0)throw new Error("Failed to map ThemeVersionConfiguration GraphQL type to Resource type. Please ensure you've selected the `root` field on ThemeConfigurationSchemaField");return j.fields=k,j}function lD(x){return{...x,configurationSchema:dT(x.configurationSchema)}}function hE(x,j){const k={...x,listValues:void 0,objectValues:void 0};return x.listValues!==void 0&&x.listValues!==null&&(k.listValues=x.listValues.map(Ve=>hE(j[Ve],j))),x.objectValues!==void 0&&x.objectValues!==null&&(k.objectValues=x.objectValues.map(Ve=>hE(j[Ve],j))),k}function uD(x){const j={...x,fields:[]},k=[];if(x.fields.forEach(Ve=>{Ve.root&&k.push(hE(Ve,x.fields))}),x.fields.length>0&&k.length===0)throw new Error("Failed to map ThemeInstallConfiguration GraphQL type to Resource type. Please ensure you've selected the `root` field on ThemeInstallConfigurationField");return j.fields=k,j}var Qm={exports:{}},Xp={},$m={exports:{}},yt={};var KR;function oD(){if(KR)return yt;KR=1;var x=Symbol.for("react.element"),j=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),Ve=Symbol.for("react.strict_mode"),at=Symbol.for("react.profiler"),dt=Symbol.for("react.provider"),S=Symbol.for("react.context"),Ut=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),ue=Symbol.for("react.memo"),Je=Symbol.for("react.lazy"),ee=Symbol.iterator;function Ce(D){return D===null||typeof D!="object"?null:(D=ee&&D[ee]||D["@@iterator"],typeof D=="function"?D:null)}var oe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qe=Object.assign,gt={};function vt(D,B,je){this.props=D,this.context=B,this.refs=gt,this.updater=je||oe}vt.prototype.isReactComponent={},vt.prototype.setState=function(D,B){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,B,"setState")},vt.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function cn(){}cn.prototype=vt.prototype;function pt(D,B,je){this.props=D,this.context=B,this.refs=gt,this.updater=je||oe}var $e=pt.prototype=new cn;$e.constructor=pt,Qe($e,vt.prototype),$e.isPureReactComponent=!0;var ht=Array.isArray,be=Object.prototype.hasOwnProperty,st={current:null},Fe={key:!0,ref:!0,__self:!0,__source:!0};function rn(D,B,je){var Ue,it={},et=null,Ke=null;if(B!=null)for(Ue in B.ref!==void 0&&(Ke=B.ref),B.key!==void 0&&(et=""+B.key),B)be.call(B,Ue)&&!Fe.hasOwnProperty(Ue)&&(it[Ue]=B[Ue]);var tt=arguments.length-2;if(tt===1)it.children=je;else if(1<tt){for(var lt=Array(tt),Pt=0;Pt<tt;Pt++)lt[Pt]=arguments[Pt+2];it.children=lt}if(D&&D.defaultProps)for(Ue in tt=D.defaultProps,tt)it[Ue]===void 0&&(it[Ue]=tt[Ue]);return{$$typeof:x,type:D,key:et,ref:Ke,props:it,_owner:st.current}}function jt(D,B){return{$$typeof:x,type:D.type,key:B,ref:D.ref,props:D.props,_owner:D._owner}}function Kt(D){return typeof D=="object"&&D!==null&&D.$$typeof===x}function an(D){var B={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(je){return B[je]})}var xt=/\/+/g;function ke(D,B){return typeof D=="object"&&D!==null&&D.key!=null?an(""+D.key):B.toString(36)}function At(D,B,je,Ue,it){var et=typeof D;(et==="undefined"||et==="boolean")&&(D=null);var Ke=!1;if(D===null)Ke=!0;else switch(et){case"string":case"number":Ke=!0;break;case"object":switch(D.$$typeof){case x:case j:Ke=!0}}if(Ke)return Ke=D,it=it(Ke),D=Ue===""?"."+ke(Ke,0):Ue,ht(it)?(je="",D!=null&&(je=D.replace(xt,"$&/")+"/"),At(it,B,je,"",function(Pt){return Pt})):it!=null&&(Kt(it)&&(it=jt(it,je+(!it.key||Ke&&Ke.key===it.key?"":(""+it.key).replace(xt,"$&/")+"/")+D)),B.push(it)),1;if(Ke=0,Ue=Ue===""?".":Ue+":",ht(D))for(var tt=0;tt<D.length;tt++){et=D[tt];var lt=Ue+ke(et,tt);Ke+=At(et,B,je,lt,it)}else if(lt=Ce(D),typeof lt=="function")for(D=lt.call(D),tt=0;!(et=D.next()).done;)et=et.value,lt=Ue+ke(et,tt++),Ke+=At(et,B,je,lt,it);else if(et==="object")throw B=String(D),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return Ke}function bt(D,B,je){if(D==null)return D;var Ue=[],it=0;return At(D,Ue,"","",function(et){return B.call(je,et,it++)}),Ue}function Dt(D){if(D._status===-1){var B=D._result;B=B(),B.then(function(je){(D._status===0||D._status===-1)&&(D._status=1,D._result=je)},function(je){(D._status===0||D._status===-1)&&(D._status=2,D._result=je)}),D._status===-1&&(D._status=0,D._result=B)}if(D._status===1)return D._result.default;throw D._result}var Ee={current:null},Z={transition:null},Re={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:Z,ReactCurrentOwner:st};function ne(){throw Error("act(...) is not supported in production builds of React.")}return yt.Children={map:bt,forEach:function(D,B,je){bt(D,function(){B.apply(this,arguments)},je)},count:function(D){var B=0;return bt(D,function(){B++}),B},toArray:function(D){return bt(D,function(B){return B})||[]},only:function(D){if(!Kt(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},yt.Component=vt,yt.Fragment=k,yt.Profiler=at,yt.PureComponent=pt,yt.StrictMode=Ve,yt.Suspense=ce,yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Re,yt.act=ne,yt.cloneElement=function(D,B,je){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Ue=Qe({},D.props),it=D.key,et=D.ref,Ke=D._owner;if(B!=null){if(B.ref!==void 0&&(et=B.ref,Ke=st.current),B.key!==void 0&&(it=""+B.key),D.type&&D.type.defaultProps)var tt=D.type.defaultProps;for(lt in B)be.call(B,lt)&&!Fe.hasOwnProperty(lt)&&(Ue[lt]=B[lt]===void 0&&tt!==void 0?tt[lt]:B[lt])}var lt=arguments.length-2;if(lt===1)Ue.children=je;else if(1<lt){tt=Array(lt);for(var Pt=0;Pt<lt;Pt++)tt[Pt]=arguments[Pt+2];Ue.children=tt}return{$$typeof:x,type:D.type,key:it,ref:et,props:Ue,_owner:Ke}},yt.createContext=function(D){return D={$$typeof:S,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:dt,_context:D},D.Consumer=D},yt.createElement=rn,yt.createFactory=function(D){var B=rn.bind(null,D);return B.type=D,B},yt.createRef=function(){return{current:null}},yt.forwardRef=function(D){return{$$typeof:Ut,render:D}},yt.isValidElement=Kt,yt.lazy=function(D){return{$$typeof:Je,_payload:{_status:-1,_result:D},_init:Dt}},yt.memo=function(D,B){return{$$typeof:ue,type:D,compare:B===void 0?null:B}},yt.startTransition=function(D){var B=Z.transition;Z.transition={};try{D()}finally{Z.transition=B}},yt.unstable_act=ne,yt.useCallback=function(D,B){return Ee.current.useCallback(D,B)},yt.useContext=function(D){return Ee.current.useContext(D)},yt.useDebugValue=function(){},yt.useDeferredValue=function(D){return Ee.current.useDeferredValue(D)},yt.useEffect=function(D,B){return Ee.current.useEffect(D,B)},yt.useId=function(){return Ee.current.useId()},yt.useImperativeHandle=function(D,B,je){return Ee.current.useImperativeHandle(D,B,je)},yt.useInsertionEffect=function(D,B){return Ee.current.useInsertionEffect(D,B)},yt.useLayoutEffect=function(D,B){return Ee.current.useLayoutEffect(D,B)},yt.useMemo=function(D,B){return Ee.current.useMemo(D,B)},yt.useReducer=function(D,B,je){return Ee.current.useReducer(D,B,je)},yt.useRef=function(D){return Ee.current.useRef(D)},yt.useState=function(D){return Ee.current.useState(D)},yt.useSyncExternalStore=function(D,B,je){return Ee.current.useSyncExternalStore(D,B,je)},yt.useTransition=function(){return Ee.current.useTransition()},yt.version="18.3.1",yt}var Zp={exports:{}};Zp.exports;var ZR;function sD(){return ZR||(ZR=1,(function(x,j){process.env.NODE_ENV!=="production"&&(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var k="18.3.1",Ve=Symbol.for("react.element"),at=Symbol.for("react.portal"),dt=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),Ut=Symbol.for("react.profiler"),ce=Symbol.for("react.provider"),ue=Symbol.for("react.context"),Je=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),Ce=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),Qe=Symbol.for("react.lazy"),gt=Symbol.for("react.offscreen"),vt=Symbol.iterator,cn="@@iterator";function pt(h){if(h===null||typeof h!="object")return null;var C=vt&&h[vt]||h[cn];return typeof C=="function"?C:null}var $e={current:null},ht={transition:null},be={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},st={current:null},Fe={},rn=null;function jt(h){rn=h}Fe.setExtraStackFrame=function(h){rn=h},Fe.getCurrentStack=null,Fe.getStackAddendum=function(){var h="";rn&&(h+=rn);var C=Fe.getCurrentStack;return C&&(h+=C()||""),h};var Kt=!1,an=!1,xt=!1,ke=!1,At=!1,bt={ReactCurrentDispatcher:$e,ReactCurrentBatchConfig:ht,ReactCurrentOwner:st};bt.ReactDebugCurrentFrame=Fe,bt.ReactCurrentActQueue=be;function Dt(h){{for(var C=arguments.length,U=new Array(C>1?C-1:0),H=1;H<C;H++)U[H-1]=arguments[H];Z("warn",h,U)}}function Ee(h){{for(var C=arguments.length,U=new Array(C>1?C-1:0),H=1;H<C;H++)U[H-1]=arguments[H];Z("error",h,U)}}function Z(h,C,U){{var H=bt.ReactDebugCurrentFrame,K=H.getStackAddendum();K!==""&&(C+="%s",U=U.concat([K]));var Oe=U.map(function(re){return String(re)});Oe.unshift("Warning: "+C),Function.prototype.apply.call(console[h],console,Oe)}}var Re={};function ne(h,C){{var U=h.constructor,H=U&&(U.displayName||U.name)||"ReactClass",K=H+"."+C;if(Re[K])return;Ee("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",C,H),Re[K]=!0}}var D={isMounted:function(h){return!1},enqueueForceUpdate:function(h,C,U){ne(h,"forceUpdate")},enqueueReplaceState:function(h,C,U,H){ne(h,"replaceState")},enqueueSetState:function(h,C,U,H){ne(h,"setState")}},B=Object.assign,je={};Object.freeze(je);function Ue(h,C,U){this.props=h,this.context=C,this.refs=je,this.updater=U||D}Ue.prototype.isReactComponent={},Ue.prototype.setState=function(h,C){if(typeof h!="object"&&typeof h!="function"&&h!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,h,C,"setState")},Ue.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};{var it={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},et=function(h,C){Object.defineProperty(Ue.prototype,h,{get:function(){Dt("%s(...) is deprecated in plain JavaScript React classes. %s",C[0],C[1])}})};for(var Ke in it)it.hasOwnProperty(Ke)&&et(Ke,it[Ke])}function tt(){}tt.prototype=Ue.prototype;function lt(h,C,U){this.props=h,this.context=C,this.refs=je,this.updater=U||D}var Pt=lt.prototype=new tt;Pt.constructor=lt,B(Pt,Ue.prototype),Pt.isPureReactComponent=!0;function kn(){var h={current:null};return Object.seal(h),h}var wr=Array.isArray;function En(h){return wr(h)}function tr(h){{var C=typeof Symbol=="function"&&Symbol.toStringTag,U=C&&h[Symbol.toStringTag]||h.constructor.name||"Object";return U}}function Vn(h){try{return Pn(h),!1}catch{return!0}}function Pn(h){return""+h}function Ir(h){if(Vn(h))return Ee("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tr(h)),Pn(h)}function oi(h,C,U){var H=h.displayName;if(H)return H;var K=C.displayName||C.name||"";return K!==""?U+"("+K+")":U}function ua(h){return h.displayName||"Context"}function Gn(h){if(h==null)return null;if(typeof h.tag=="number"&&Ee("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case dt:return"Fragment";case at:return"Portal";case Ut:return"Profiler";case S:return"StrictMode";case ee:return"Suspense";case Ce:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case ue:var C=h;return ua(C)+".Consumer";case ce:var U=h;return ua(U._context)+".Provider";case Je:return oi(h,h.render,"ForwardRef");case oe:var H=h.displayName||null;return H!==null?H:Gn(h.type)||"Memo";case Qe:{var K=h,Oe=K._payload,re=K._init;try{return Gn(re(Oe))}catch{return null}}}return null}var Cn=Object.prototype.hasOwnProperty,Bn={key:!0,ref:!0,__self:!0,__source:!0},yr,Ia,On;On={};function gr(h){if(Cn.call(h,"ref")){var C=Object.getOwnPropertyDescriptor(h,"ref").get;if(C&&C.isReactWarning)return!1}return h.ref!==void 0}function oa(h){if(Cn.call(h,"key")){var C=Object.getOwnPropertyDescriptor(h,"key").get;if(C&&C.isReactWarning)return!1}return h.key!==void 0}function Ya(h,C){var U=function(){yr||(yr=!0,Ee("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};U.isReactWarning=!0,Object.defineProperty(h,"key",{get:U,configurable:!0})}function si(h,C){var U=function(){Ia||(Ia=!0,Ee("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};U.isReactWarning=!0,Object.defineProperty(h,"ref",{get:U,configurable:!0})}function J(h){if(typeof h.ref=="string"&&st.current&&h.__self&&st.current.stateNode!==h.__self){var C=Gn(st.current.type);On[C]||(Ee('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C,h.ref),On[C]=!0)}}var Te=function(h,C,U,H,K,Oe,re){var Ne={$$typeof:Ve,type:h,key:C,ref:U,props:re,_owner:Oe};return Ne._store={},Object.defineProperty(Ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ne,"_self",{configurable:!1,enumerable:!1,writable:!1,value:H}),Object.defineProperty(Ne,"_source",{configurable:!1,enumerable:!1,writable:!1,value:K}),Object.freeze&&(Object.freeze(Ne.props),Object.freeze(Ne)),Ne};function nt(h,C,U){var H,K={},Oe=null,re=null,Ne=null,ft=null;if(C!=null){gr(C)&&(re=C.ref,J(C)),oa(C)&&(Ir(C.key),Oe=""+C.key),Ne=C.__self===void 0?null:C.__self,ft=C.__source===void 0?null:C.__source;for(H in C)Cn.call(C,H)&&!Bn.hasOwnProperty(H)&&(K[H]=C[H])}var wt=arguments.length-2;if(wt===1)K.children=U;else if(wt>1){for(var tn=Array(wt),Qt=0;Qt<wt;Qt++)tn[Qt]=arguments[Qt+2];Object.freeze&&Object.freeze(tn),K.children=tn}if(h&&h.defaultProps){var rt=h.defaultProps;for(H in rt)K[H]===void 0&&(K[H]=rt[H])}if(Oe||re){var $t=typeof h=="function"?h.displayName||h.name||"Unknown":h;Oe&&Ya(K,$t),re&&si(K,$t)}return Te(h,Oe,re,Ne,ft,st.current,K)}function Ft(h,C){var U=Te(h.type,C,h.ref,h._self,h._source,h._owner,h.props);return U}function Zt(h,C,U){if(h==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+h+".");var H,K=B({},h.props),Oe=h.key,re=h.ref,Ne=h._self,ft=h._source,wt=h._owner;if(C!=null){gr(C)&&(re=C.ref,wt=st.current),oa(C)&&(Ir(C.key),Oe=""+C.key);var tn;h.type&&h.type.defaultProps&&(tn=h.type.defaultProps);for(H in C)Cn.call(C,H)&&!Bn.hasOwnProperty(H)&&(C[H]===void 0&&tn!==void 0?K[H]=tn[H]:K[H]=C[H])}var Qt=arguments.length-2;if(Qt===1)K.children=U;else if(Qt>1){for(var rt=Array(Qt),$t=0;$t<Qt;$t++)rt[$t]=arguments[$t+2];K.children=rt}return Te(h.type,Oe,re,Ne,ft,wt,K)}function pn(h){return typeof h=="object"&&h!==null&&h.$$typeof===Ve}var ln=".",qn=":";function Jt(h){var C=/[=:]/g,U={"=":"=0",":":"=2"},H=h.replace(C,function(K){return U[K]});return"$"+H}var Bt=!1,It=/\/+/g;function sa(h){return h.replace(It,"$&/")}function Sr(h,C){return typeof h=="object"&&h!==null&&h.key!=null?(Ir(h.key),Jt(""+h.key)):C.toString(36)}function Ra(h,C,U,H,K){var Oe=typeof h;(Oe==="undefined"||Oe==="boolean")&&(h=null);var re=!1;if(h===null)re=!0;else switch(Oe){case"string":case"number":re=!0;break;case"object":switch(h.$$typeof){case Ve:case at:re=!0}}if(re){var Ne=h,ft=K(Ne),wt=H===""?ln+Sr(Ne,0):H;if(En(ft)){var tn="";wt!=null&&(tn=sa(wt)+"/"),Ra(ft,C,tn,"",function(Gf){return Gf})}else ft!=null&&(pn(ft)&&(ft.key&&(!Ne||Ne.key!==ft.key)&&Ir(ft.key),ft=Ft(ft,U+(ft.key&&(!Ne||Ne.key!==ft.key)?sa(""+ft.key)+"/":"")+wt)),C.push(ft));return 1}var Qt,rt,$t=0,vn=H===""?ln:H+qn;if(En(h))for(var El=0;El<h.length;El++)Qt=h[El],rt=vn+Sr(Qt,El),$t+=Ra(Qt,C,U,rt,K);else{var Wo=pt(h);if(typeof Wo=="function"){var Vi=h;Wo===Vi.entries&&(Bt||Dt("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Bt=!0);for(var Go=Wo.call(Vi),lu,Wf=0;!(lu=Go.next()).done;)Qt=lu.value,rt=vn+Sr(Qt,Wf++),$t+=Ra(Qt,C,U,rt,K)}else if(Oe==="object"){var lc=String(h);throw new Error("Objects are not valid as a React child (found: "+(lc==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":lc)+"). If you meant to render a collection of children, use an array instead.")}}return $t}function Fi(h,C,U){if(h==null)return h;var H=[],K=0;return Ra(h,H,"","",function(Oe){return C.call(U,Oe,K++)}),H}function Kl(h){var C=0;return Fi(h,function(){C++}),C}function Zl(h,C,U){Fi(h,function(){C.apply(this,arguments)},U)}function fl(h){return Fi(h,function(C){return C})||[]}function dl(h){if(!pn(h))throw new Error("React.Children.only expected to receive a single React element child.");return h}function Jl(h){var C={$$typeof:ue,_currentValue:h,_currentValue2:h,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};C.Provider={$$typeof:ce,_context:C};var U=!1,H=!1,K=!1;{var Oe={$$typeof:ue,_context:C};Object.defineProperties(Oe,{Provider:{get:function(){return H||(H=!0,Ee("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),C.Provider},set:function(re){C.Provider=re}},_currentValue:{get:function(){return C._currentValue},set:function(re){C._currentValue=re}},_currentValue2:{get:function(){return C._currentValue2},set:function(re){C._currentValue2=re}},_threadCount:{get:function(){return C._threadCount},set:function(re){C._threadCount=re}},Consumer:{get:function(){return U||(U=!0,Ee("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),C.Consumer}},displayName:{get:function(){return C.displayName},set:function(re){K||(Dt("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",re),K=!0)}}}),C.Consumer=Oe}return C._currentRenderer=null,C._currentRenderer2=null,C}var xr=-1,br=0,nr=1,ci=2;function Qa(h){if(h._status===xr){var C=h._result,U=C();if(U.then(function(Oe){if(h._status===br||h._status===xr){var re=h;re._status=nr,re._result=Oe}},function(Oe){if(h._status===br||h._status===xr){var re=h;re._status=ci,re._result=Oe}}),h._status===xr){var H=h;H._status=br,H._result=U}}if(h._status===nr){var K=h._result;return K===void 0&&Ee(`lazy: Expected the result of a dynamic import() call. Instead received: %s
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tD=require("@spiffcommerce/core"),nD=require("fs"),rD=require("path");exports.ThemeFileType=void 0;(function(x){x.Javascript="Javascript",x.CSS="CSS"})(exports.ThemeFileType||(exports.ThemeFileType={}));exports.FieldType=void 0;(function(x){x.Asset="Asset",x.Boolean="Boolean",x.Color="Color",x.ConversionConfiguration="ConversionConfiguration",x.Heading="Heading",x.List="List",x.Number="Number",x.Object="Object",x.Select="Select",x.Text="Text",x.DateRange="DateRange"})(exports.FieldType||(exports.FieldType={}));exports.AssetType=void 0;(function(x){x.Color="Color",x.ColorProfile="ColorProfile",x.Data="Data",x.Environment="Environment",x.Font="Font",x.Frame="Frame",x.Illustration="Illustration",x.Image="Image",x.Material="Material",x.Model="Model",x.Video="Video"})(exports.AssetType||(exports.AssetType={}));exports.CustomSchemaType=void 0;(function(x){x.Object="Object",x.Union="Union"})(exports.CustomSchemaType||(exports.CustomSchemaType={}));exports.ConversionLocation=void 0;(function(x){x.Manual="Manual",x.OnStart="OnStart",x.OnQuit="OnQuit",x.OnEnd="OnEnd"})(exports.ConversionLocation||(exports.ConversionLocation={}));function mE(x){return Object.assign({},...x.map(j=>{if(j.key)return{[j.key]:fT(j)}}))}function fT(x){if(x.type===exports.FieldType.Asset)return x.asset;if(x.type===exports.FieldType.DateRange){const j=x.value?.split(",");if(!j||j.length!==2||!j[0]||!j[1])return;try{return{start:new Date(j[0]),end:new Date(j[1])}}catch{return}}if(x.type===exports.FieldType.ConversionConfiguration)return x.conversionConfiguration;if(x.type!==exports.FieldType.List&&x.type!==exports.FieldType.Object){if(x.value===void 0)return;if(x.type===exports.FieldType.Number)try{const j=Number.parseFloat(x.value);return Number.isNaN(j)?void 0:j}catch{return}else if(x.type===exports.FieldType.Boolean)return x.value==="true";return x.value}if(x.listValues)return x.listValues.map(fT);if(x.objectValues)return{...mE(x.objectValues),schema:x.schema??void 0}}function aD(x){return mE(x)}function iD(x){return mE(x.fields)}function qm(x,j){const k={...x,items:void 0,fields:void 0};return x.items!==void 0&&x.items!==null&&(k.items=qm(j[x.items],j)),x.fields!==void 0&&x.fields!==null&&(k.fields=x.fields.map(Ve=>qm(j[Ve],j))),k}function dT(x){const j={...x,fields:[],customSchemas:x.customSchemas?.map(Ve=>({...Ve,fields:Ve.fields?.map(at=>qm(x.fields[at],x.fields))}))},k=[];if(x.fields.forEach(Ve=>{Ve.root&&k.push(qm(Ve,x.fields))}),x.fields.length>0&&k.length===0)throw new Error("Failed to map ThemeVersionConfiguration GraphQL type to Resource type. Please ensure you've selected the `root` field on ThemeConfigurationSchemaField");return j.fields=k,j}function lD(x){return{...x,configurationSchema:dT(x.configurationSchema)}}function hE(x,j){const k={...x,listValues:void 0,objectValues:void 0};return x.listValues!==void 0&&x.listValues!==null&&(k.listValues=x.listValues.map(Ve=>hE(j[Ve],j))),x.objectValues!==void 0&&x.objectValues!==null&&(k.objectValues=x.objectValues.map(Ve=>hE(j[Ve],j))),k}function uD(x){const j={...x,fields:[]},k=[];if(x.fields.forEach(Ve=>{Ve.root&&k.push(hE(Ve,x.fields))}),x.fields.length>0&&k.length===0)throw new Error("Failed to map ThemeInstallConfiguration GraphQL type to Resource type. Please ensure you've selected the `root` field on ThemeInstallConfigurationField");return j.fields=k,j}var Qm={exports:{}},Xp={},$m={exports:{}},yt={};var KR;function oD(){if(KR)return yt;KR=1;var x=Symbol.for("react.element"),j=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),Ve=Symbol.for("react.strict_mode"),at=Symbol.for("react.profiler"),dt=Symbol.for("react.provider"),S=Symbol.for("react.context"),Ut=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),ue=Symbol.for("react.memo"),Je=Symbol.for("react.lazy"),ee=Symbol.iterator;function Ce(D){return D===null||typeof D!="object"?null:(D=ee&&D[ee]||D["@@iterator"],typeof D=="function"?D:null)}var oe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qe=Object.assign,gt={};function vt(D,B,je){this.props=D,this.context=B,this.refs=gt,this.updater=je||oe}vt.prototype.isReactComponent={},vt.prototype.setState=function(D,B){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,B,"setState")},vt.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function cn(){}cn.prototype=vt.prototype;function pt(D,B,je){this.props=D,this.context=B,this.refs=gt,this.updater=je||oe}var $e=pt.prototype=new cn;$e.constructor=pt,Qe($e,vt.prototype),$e.isPureReactComponent=!0;var ht=Array.isArray,be=Object.prototype.hasOwnProperty,st={current:null},Fe={key:!0,ref:!0,__self:!0,__source:!0};function rn(D,B,je){var Ue,it={},et=null,Ke=null;if(B!=null)for(Ue in B.ref!==void 0&&(Ke=B.ref),B.key!==void 0&&(et=""+B.key),B)be.call(B,Ue)&&!Fe.hasOwnProperty(Ue)&&(it[Ue]=B[Ue]);var tt=arguments.length-2;if(tt===1)it.children=je;else if(1<tt){for(var lt=Array(tt),Pt=0;Pt<tt;Pt++)lt[Pt]=arguments[Pt+2];it.children=lt}if(D&&D.defaultProps)for(Ue in tt=D.defaultProps,tt)it[Ue]===void 0&&(it[Ue]=tt[Ue]);return{$$typeof:x,type:D,key:et,ref:Ke,props:it,_owner:st.current}}function jt(D,B){return{$$typeof:x,type:D.type,key:B,ref:D.ref,props:D.props,_owner:D._owner}}function Kt(D){return typeof D=="object"&&D!==null&&D.$$typeof===x}function an(D){var B={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(je){return B[je]})}var xt=/\/+/g;function ke(D,B){return typeof D=="object"&&D!==null&&D.key!=null?an(""+D.key):B.toString(36)}function At(D,B,je,Ue,it){var et=typeof D;(et==="undefined"||et==="boolean")&&(D=null);var Ke=!1;if(D===null)Ke=!0;else switch(et){case"string":case"number":Ke=!0;break;case"object":switch(D.$$typeof){case x:case j:Ke=!0}}if(Ke)return Ke=D,it=it(Ke),D=Ue===""?"."+ke(Ke,0):Ue,ht(it)?(je="",D!=null&&(je=D.replace(xt,"$&/")+"/"),At(it,B,je,"",function(Pt){return Pt})):it!=null&&(Kt(it)&&(it=jt(it,je+(!it.key||Ke&&Ke.key===it.key?"":(""+it.key).replace(xt,"$&/")+"/")+D)),B.push(it)),1;if(Ke=0,Ue=Ue===""?".":Ue+":",ht(D))for(var tt=0;tt<D.length;tt++){et=D[tt];var lt=Ue+ke(et,tt);Ke+=At(et,B,je,lt,it)}else if(lt=Ce(D),typeof lt=="function")for(D=lt.call(D),tt=0;!(et=D.next()).done;)et=et.value,lt=Ue+ke(et,tt++),Ke+=At(et,B,je,lt,it);else if(et==="object")throw B=String(D),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return Ke}function bt(D,B,je){if(D==null)return D;var Ue=[],it=0;return At(D,Ue,"","",function(et){return B.call(je,et,it++)}),Ue}function Dt(D){if(D._status===-1){var B=D._result;B=B(),B.then(function(je){(D._status===0||D._status===-1)&&(D._status=1,D._result=je)},function(je){(D._status===0||D._status===-1)&&(D._status=2,D._result=je)}),D._status===-1&&(D._status=0,D._result=B)}if(D._status===1)return D._result.default;throw D._result}var Ee={current:null},Z={transition:null},Re={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:Z,ReactCurrentOwner:st};function ne(){throw Error("act(...) is not supported in production builds of React.")}return yt.Children={map:bt,forEach:function(D,B,je){bt(D,function(){B.apply(this,arguments)},je)},count:function(D){var B=0;return bt(D,function(){B++}),B},toArray:function(D){return bt(D,function(B){return B})||[]},only:function(D){if(!Kt(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},yt.Component=vt,yt.Fragment=k,yt.Profiler=at,yt.PureComponent=pt,yt.StrictMode=Ve,yt.Suspense=ce,yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Re,yt.act=ne,yt.cloneElement=function(D,B,je){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Ue=Qe({},D.props),it=D.key,et=D.ref,Ke=D._owner;if(B!=null){if(B.ref!==void 0&&(et=B.ref,Ke=st.current),B.key!==void 0&&(it=""+B.key),D.type&&D.type.defaultProps)var tt=D.type.defaultProps;for(lt in B)be.call(B,lt)&&!Fe.hasOwnProperty(lt)&&(Ue[lt]=B[lt]===void 0&&tt!==void 0?tt[lt]:B[lt])}var lt=arguments.length-2;if(lt===1)Ue.children=je;else if(1<lt){tt=Array(lt);for(var Pt=0;Pt<lt;Pt++)tt[Pt]=arguments[Pt+2];Ue.children=tt}return{$$typeof:x,type:D.type,key:it,ref:et,props:Ue,_owner:Ke}},yt.createContext=function(D){return D={$$typeof:S,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:dt,_context:D},D.Consumer=D},yt.createElement=rn,yt.createFactory=function(D){var B=rn.bind(null,D);return B.type=D,B},yt.createRef=function(){return{current:null}},yt.forwardRef=function(D){return{$$typeof:Ut,render:D}},yt.isValidElement=Kt,yt.lazy=function(D){return{$$typeof:Je,_payload:{_status:-1,_result:D},_init:Dt}},yt.memo=function(D,B){return{$$typeof:ue,type:D,compare:B===void 0?null:B}},yt.startTransition=function(D){var B=Z.transition;Z.transition={};try{D()}finally{Z.transition=B}},yt.unstable_act=ne,yt.useCallback=function(D,B){return Ee.current.useCallback(D,B)},yt.useContext=function(D){return Ee.current.useContext(D)},yt.useDebugValue=function(){},yt.useDeferredValue=function(D){return Ee.current.useDeferredValue(D)},yt.useEffect=function(D,B){return Ee.current.useEffect(D,B)},yt.useId=function(){return Ee.current.useId()},yt.useImperativeHandle=function(D,B,je){return Ee.current.useImperativeHandle(D,B,je)},yt.useInsertionEffect=function(D,B){return Ee.current.useInsertionEffect(D,B)},yt.useLayoutEffect=function(D,B){return Ee.current.useLayoutEffect(D,B)},yt.useMemo=function(D,B){return Ee.current.useMemo(D,B)},yt.useReducer=function(D,B,je){return Ee.current.useReducer(D,B,je)},yt.useRef=function(D){return Ee.current.useRef(D)},yt.useState=function(D){return Ee.current.useState(D)},yt.useSyncExternalStore=function(D,B,je){return Ee.current.useSyncExternalStore(D,B,je)},yt.useTransition=function(){return Ee.current.useTransition()},yt.version="18.3.1",yt}var Zp={exports:{}};Zp.exports;var ZR;function sD(){return ZR||(ZR=1,(function(x,j){process.env.NODE_ENV!=="production"&&(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var k="18.3.1",Ve=Symbol.for("react.element"),at=Symbol.for("react.portal"),dt=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),Ut=Symbol.for("react.profiler"),ce=Symbol.for("react.provider"),ue=Symbol.for("react.context"),Je=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),Ce=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),Qe=Symbol.for("react.lazy"),gt=Symbol.for("react.offscreen"),vt=Symbol.iterator,cn="@@iterator";function pt(h){if(h===null||typeof h!="object")return null;var C=vt&&h[vt]||h[cn];return typeof C=="function"?C:null}var $e={current:null},ht={transition:null},be={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},st={current:null},Fe={},rn=null;function jt(h){rn=h}Fe.setExtraStackFrame=function(h){rn=h},Fe.getCurrentStack=null,Fe.getStackAddendum=function(){var h="";rn&&(h+=rn);var C=Fe.getCurrentStack;return C&&(h+=C()||""),h};var Kt=!1,an=!1,xt=!1,ke=!1,At=!1,bt={ReactCurrentDispatcher:$e,ReactCurrentBatchConfig:ht,ReactCurrentOwner:st};bt.ReactDebugCurrentFrame=Fe,bt.ReactCurrentActQueue=be;function Dt(h){{for(var C=arguments.length,U=new Array(C>1?C-1:0),H=1;H<C;H++)U[H-1]=arguments[H];Z("warn",h,U)}}function Ee(h){{for(var C=arguments.length,U=new Array(C>1?C-1:0),H=1;H<C;H++)U[H-1]=arguments[H];Z("error",h,U)}}function Z(h,C,U){{var H=bt.ReactDebugCurrentFrame,K=H.getStackAddendum();K!==""&&(C+="%s",U=U.concat([K]));var Oe=U.map(function(re){return String(re)});Oe.unshift("Warning: "+C),Function.prototype.apply.call(console[h],console,Oe)}}var Re={};function ne(h,C){{var U=h.constructor,H=U&&(U.displayName||U.name)||"ReactClass",K=H+"."+C;if(Re[K])return;Ee("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",C,H),Re[K]=!0}}var D={isMounted:function(h){return!1},enqueueForceUpdate:function(h,C,U){ne(h,"forceUpdate")},enqueueReplaceState:function(h,C,U,H){ne(h,"replaceState")},enqueueSetState:function(h,C,U,H){ne(h,"setState")}},B=Object.assign,je={};Object.freeze(je);function Ue(h,C,U){this.props=h,this.context=C,this.refs=je,this.updater=U||D}Ue.prototype.isReactComponent={},Ue.prototype.setState=function(h,C){if(typeof h!="object"&&typeof h!="function"&&h!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,h,C,"setState")},Ue.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};{var it={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},et=function(h,C){Object.defineProperty(Ue.prototype,h,{get:function(){Dt("%s(...) is deprecated in plain JavaScript React classes. %s",C[0],C[1])}})};for(var Ke in it)it.hasOwnProperty(Ke)&&et(Ke,it[Ke])}function tt(){}tt.prototype=Ue.prototype;function lt(h,C,U){this.props=h,this.context=C,this.refs=je,this.updater=U||D}var Pt=lt.prototype=new tt;Pt.constructor=lt,B(Pt,Ue.prototype),Pt.isPureReactComponent=!0;function kn(){var h={current:null};return Object.seal(h),h}var wr=Array.isArray;function En(h){return wr(h)}function tr(h){{var C=typeof Symbol=="function"&&Symbol.toStringTag,U=C&&h[Symbol.toStringTag]||h.constructor.name||"Object";return U}}function Vn(h){try{return Pn(h),!1}catch{return!0}}function Pn(h){return""+h}function Ir(h){if(Vn(h))return Ee("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tr(h)),Pn(h)}function oi(h,C,U){var H=h.displayName;if(H)return H;var K=C.displayName||C.name||"";return K!==""?U+"("+K+")":U}function ua(h){return h.displayName||"Context"}function Gn(h){if(h==null)return null;if(typeof h.tag=="number"&&Ee("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case dt:return"Fragment";case at:return"Portal";case Ut:return"Profiler";case S:return"StrictMode";case ee:return"Suspense";case Ce:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case ue:var C=h;return ua(C)+".Consumer";case ce:var U=h;return ua(U._context)+".Provider";case Je:return oi(h,h.render,"ForwardRef");case oe:var H=h.displayName||null;return H!==null?H:Gn(h.type)||"Memo";case Qe:{var K=h,Oe=K._payload,re=K._init;try{return Gn(re(Oe))}catch{return null}}}return null}var Cn=Object.prototype.hasOwnProperty,Bn={key:!0,ref:!0,__self:!0,__source:!0},yr,Ia,On;On={};function gr(h){if(Cn.call(h,"ref")){var C=Object.getOwnPropertyDescriptor(h,"ref").get;if(C&&C.isReactWarning)return!1}return h.ref!==void 0}function oa(h){if(Cn.call(h,"key")){var C=Object.getOwnPropertyDescriptor(h,"key").get;if(C&&C.isReactWarning)return!1}return h.key!==void 0}function Ya(h,C){var U=function(){yr||(yr=!0,Ee("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};U.isReactWarning=!0,Object.defineProperty(h,"key",{get:U,configurable:!0})}function si(h,C){var U=function(){Ia||(Ia=!0,Ee("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};U.isReactWarning=!0,Object.defineProperty(h,"ref",{get:U,configurable:!0})}function J(h){if(typeof h.ref=="string"&&st.current&&h.__self&&st.current.stateNode!==h.__self){var C=Gn(st.current.type);On[C]||(Ee('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C,h.ref),On[C]=!0)}}var Te=function(h,C,U,H,K,Oe,re){var Ne={$$typeof:Ve,type:h,key:C,ref:U,props:re,_owner:Oe};return Ne._store={},Object.defineProperty(Ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ne,"_self",{configurable:!1,enumerable:!1,writable:!1,value:H}),Object.defineProperty(Ne,"_source",{configurable:!1,enumerable:!1,writable:!1,value:K}),Object.freeze&&(Object.freeze(Ne.props),Object.freeze(Ne)),Ne};function nt(h,C,U){var H,K={},Oe=null,re=null,Ne=null,ft=null;if(C!=null){gr(C)&&(re=C.ref,J(C)),oa(C)&&(Ir(C.key),Oe=""+C.key),Ne=C.__self===void 0?null:C.__self,ft=C.__source===void 0?null:C.__source;for(H in C)Cn.call(C,H)&&!Bn.hasOwnProperty(H)&&(K[H]=C[H])}var wt=arguments.length-2;if(wt===1)K.children=U;else if(wt>1){for(var tn=Array(wt),Qt=0;Qt<wt;Qt++)tn[Qt]=arguments[Qt+2];Object.freeze&&Object.freeze(tn),K.children=tn}if(h&&h.defaultProps){var rt=h.defaultProps;for(H in rt)K[H]===void 0&&(K[H]=rt[H])}if(Oe||re){var $t=typeof h=="function"?h.displayName||h.name||"Unknown":h;Oe&&Ya(K,$t),re&&si(K,$t)}return Te(h,Oe,re,Ne,ft,st.current,K)}function Ft(h,C){var U=Te(h.type,C,h.ref,h._self,h._source,h._owner,h.props);return U}function Zt(h,C,U){if(h==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+h+".");var H,K=B({},h.props),Oe=h.key,re=h.ref,Ne=h._self,ft=h._source,wt=h._owner;if(C!=null){gr(C)&&(re=C.ref,wt=st.current),oa(C)&&(Ir(C.key),Oe=""+C.key);var tn;h.type&&h.type.defaultProps&&(tn=h.type.defaultProps);for(H in C)Cn.call(C,H)&&!Bn.hasOwnProperty(H)&&(C[H]===void 0&&tn!==void 0?K[H]=tn[H]:K[H]=C[H])}var Qt=arguments.length-2;if(Qt===1)K.children=U;else if(Qt>1){for(var rt=Array(Qt),$t=0;$t<Qt;$t++)rt[$t]=arguments[$t+2];K.children=rt}return Te(h.type,Oe,re,Ne,ft,wt,K)}function pn(h){return typeof h=="object"&&h!==null&&h.$$typeof===Ve}var ln=".",qn=":";function Jt(h){var C=/[=:]/g,U={"=":"=0",":":"=2"},H=h.replace(C,function(K){return U[K]});return"$"+H}var Bt=!1,It=/\/+/g;function sa(h){return h.replace(It,"$&/")}function Sr(h,C){return typeof h=="object"&&h!==null&&h.key!=null?(Ir(h.key),Jt(""+h.key)):C.toString(36)}function Ra(h,C,U,H,K){var Oe=typeof h;(Oe==="undefined"||Oe==="boolean")&&(h=null);var re=!1;if(h===null)re=!0;else switch(Oe){case"string":case"number":re=!0;break;case"object":switch(h.$$typeof){case Ve:case at:re=!0}}if(re){var Ne=h,ft=K(Ne),wt=H===""?ln+Sr(Ne,0):H;if(En(ft)){var tn="";wt!=null&&(tn=sa(wt)+"/"),Ra(ft,C,tn,"",function(Gf){return Gf})}else ft!=null&&(pn(ft)&&(ft.key&&(!Ne||Ne.key!==ft.key)&&Ir(ft.key),ft=Ft(ft,U+(ft.key&&(!Ne||Ne.key!==ft.key)?sa(""+ft.key)+"/":"")+wt)),C.push(ft));return 1}var Qt,rt,$t=0,vn=H===""?ln:H+qn;if(En(h))for(var El=0;El<h.length;El++)Qt=h[El],rt=vn+Sr(Qt,El),$t+=Ra(Qt,C,U,rt,K);else{var Wo=pt(h);if(typeof Wo=="function"){var Vi=h;Wo===Vi.entries&&(Bt||Dt("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Bt=!0);for(var Go=Wo.call(Vi),lu,Wf=0;!(lu=Go.next()).done;)Qt=lu.value,rt=vn+Sr(Qt,Wf++),$t+=Ra(Qt,C,U,rt,K)}else if(Oe==="object"){var lc=String(h);throw new Error("Objects are not valid as a React child (found: "+(lc==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":lc)+"). If you meant to render a collection of children, use an array instead.")}}return $t}function Fi(h,C,U){if(h==null)return h;var H=[],K=0;return Ra(h,H,"","",function(Oe){return C.call(U,Oe,K++)}),H}function Kl(h){var C=0;return Fi(h,function(){C++}),C}function Zl(h,C,U){Fi(h,function(){C.apply(this,arguments)},U)}function fl(h){return Fi(h,function(C){return C})||[]}function dl(h){if(!pn(h))throw new Error("React.Children.only expected to receive a single React element child.");return h}function Jl(h){var C={$$typeof:ue,_currentValue:h,_currentValue2:h,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};C.Provider={$$typeof:ce,_context:C};var U=!1,H=!1,K=!1;{var Oe={$$typeof:ue,_context:C};Object.defineProperties(Oe,{Provider:{get:function(){return H||(H=!0,Ee("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),C.Provider},set:function(re){C.Provider=re}},_currentValue:{get:function(){return C._currentValue},set:function(re){C._currentValue=re}},_currentValue2:{get:function(){return C._currentValue2},set:function(re){C._currentValue2=re}},_threadCount:{get:function(){return C._threadCount},set:function(re){C._threadCount=re}},Consumer:{get:function(){return U||(U=!0,Ee("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),C.Consumer}},displayName:{get:function(){return C.displayName},set:function(re){K||(Dt("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",re),K=!0)}}}),C.Consumer=Oe}return C._currentRenderer=null,C._currentRenderer2=null,C}var xr=-1,br=0,nr=1,ci=2;function Qa(h){if(h._status===xr){var C=h._result,U=C();if(U.then(function(Oe){if(h._status===br||h._status===xr){var re=h;re._status=nr,re._result=Oe}},function(Oe){if(h._status===br||h._status===xr){var re=h;re._status=ci,re._result=Oe}}),h._status===xr){var H=h;H._status=br,H._result=U}}if(h._status===nr){var K=h._result;return K===void 0&&Ee(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
2
 
3
3
  Your code should look like:
4
4
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -162,5 +162,5 @@ Check the render method of %s.`,Be(ar)||"Unknown"));var v=ju(s,f);v.payload={ele
162
162
 
163
163
  let root = createRoot(domContainer);
164
164
  root.render(<App />);`),t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(u=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var f=TR(e,Fh,null,a,i,u,s);Oh(f.current,e);var p=e.nodeType===Ln?e.parentNode:e;return Jd(p),new cE(f)}function Bm(e){this._internalRoot=e}function F_(e){e&&Zv(e)}Bm.prototype.unstable_scheduleHydration=F_;function j_(e,t,a){if(!Im(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");QR(e),t===void 0&&S("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=a??null,u=a!=null&&a.hydratedSources||null,s=!1,f=!1,p="",v=YR;a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onRecoverableError!==void 0&&(v=a.onRecoverableError));var y=wR(t,null,e,Fh,i,s,f,p,v);if(Oh(y.current,e),Jd(e),u)for(var g=0;g<u.length;g++){var _=u[g];Bx(y,_)}return new Bm(y)}function Im(e){return!!(e&&(e.nodeType===Qr||e.nodeType===Ii||e.nodeType===td))}function Gp(e){return!!(e&&(e.nodeType===Qr||e.nodeType===Ii||e.nodeType===td||e.nodeType===Ln&&e.nodeValue===" react-mount-point-unstable "))}function QR(e){e.nodeType===Qr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),cp(e)&&(e._reactRootContainer?S("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):S("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var H_=k.ReactCurrentOwner,$R;$R=function(e){if(e._reactRootContainer&&e.nodeType!==Ln){var t=bR(e._reactRootContainer.current);t&&t.parentNode!==e&&S("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var a=!!e._reactRootContainer,i=fE(e),u=!!(i&&_o(i));u&&!a&&S("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Qr&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&S("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function fE(e){return e?e.nodeType===Ii?e.documentElement:e.firstChild:null}function WR(){}function V_(e,t,a,i,u){if(u){if(typeof i=="function"){var s=i;i=function(){var w=Pm(f);s.call(w)}}var f=wR(t,i,e,ko,null,!1,!1,"",WR);e._reactRootContainer=f,Oh(f.current,e);var p=e.nodeType===Ln?e.parentNode:e;return Jd(p),Bu(),f}else{for(var v;v=e.lastChild;)e.removeChild(v);if(typeof i=="function"){var y=i;i=function(){var w=Pm(g);y.call(w)}}var g=TR(e,ko,null,!1,!1,"",WR);e._reactRootContainer=g,Oh(g.current,e);var _=e.nodeType===Ln?e.parentNode:e;return Jd(_),Bu(function(){Wp(t,g,a,i)}),g}}function P_(e,t){e!==null&&typeof e!="function"&&S("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function Ym(e,t,a,i,u){$R(a),P_(u===void 0?null:u,"render");var s=a._reactRootContainer,f;if(!s)f=V_(a,t,e,u,i);else{if(f=s,typeof u=="function"){var p=u;u=function(){var v=Pm(f);p.call(v)}}Wp(t,f,e,u)}return Pm(f)}var GR=!1;function B_(e){{GR||(GR=!0,S("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node"));var t=H_.current;if(t!==null&&t.stateNode!==null){var a=t.stateNode._warnedAboutRefsInRender;a||S("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",Tt(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Qr?e:b_(e,"findDOMNode")}function I_(e,t,a){if(S("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Gp(t))throw new Error("Target container is not a DOM element.");{var i=cp(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return Ym(null,e,t,!0,a)}function Y_(e,t,a){if(S("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Gp(t))throw new Error("Target container is not a DOM element.");{var i=cp(t)&&t._reactRootContainer===void 0;i&&S("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return Ym(null,e,t,!1,a)}function Q_(e,t,a,i){if(S("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!Gp(a))throw new Error("Target container is not a DOM element.");if(e==null||!oy(e))throw new Error("parentComponent must be a valid React Component");return Ym(e,t,a,!1,i)}var qR=!1;function $_(e){if(qR||(qR=!0,S("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot")),!Gp(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=cp(e)&&e._reactRootContainer===void 0;t&&S("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var a=fE(e),i=a&&!_o(a);i&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return Bu(function(){Ym(null,null,e,!1,function(){e._reactRootContainer=null,YE(e)})}),!0}else{{var u=fE(e),s=!!(u&&_o(u)),f=e.nodeType===Qr&&Gp(e.parentNode)&&!!e.parentNode._reactRootContainer;s&&S("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",f?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}Rr(__),go(D_),Gv(k_),Ds(za),Ad(Qv),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&S("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),mc(GT),uy(BS,jb,Bu);function W_(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Im(t))throw new Error("Target container is not a DOM element.");return x_(e,t,null,a)}function G_(e,t,a,i){return Q_(e,t,a,i)}var dE={usingClientEntryPoint:!1,Events:[_o,Sf,Lh,lo,yc,BS]};function q_(e,t){return dE.usingClientEntryPoint||S('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),A_(e,t)}function X_(e,t,a){return dE.usingClientEntryPoint||S('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),j_(e,t,a)}function K_(e){return nR()&&S("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),Bu(e)}var Z_=U_({findFiberByHostInstance:Bs,bundleType:1,version:iE,rendererPackageName:"react-dom"});if(!Z_&&kn&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var XR=window.location.protocol;/^(https?|file):$/.test(XR)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(XR==="file:"?`
165
- You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dE,Ba.createPortal=W_,Ba.createRoot=q_,Ba.findDOMNode=B_,Ba.flushSync=K_,Ba.hydrate=I_,Ba.hydrateRoot=X_,Ba.render=Y_,Ba.unmountComponentAtNode=$_,Ba.unstable_batchedUpdates=BS,Ba.unstable_renderSubtreeIntoContainer=G_,Ba.version=iE,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()),Ba}var sT;function yD(){if(sT)return Wm.exports;sT=1;function x(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(x)}catch(j){console.error(j)}}}return process.env.NODE_ENV==="production"?(x(),Wm.exports=hD()):Wm.exports=mD(),Wm.exports}var cT;function gD(){if(cT)return Yf;cT=1;var x=yD();if(process.env.NODE_ENV==="production")Yf.createRoot=x.createRoot,Yf.hydrateRoot=x.hydrateRoot;else{var j=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Yf.createRoot=function(k,Ve){j.usingClientEntryPoint=!0;try{return x.createRoot(k,Ve)}finally{j.usingClientEntryPoint=!1}},Yf.hydrateRoot=function(k,Ve,at){j.usingClientEntryPoint=!0;try{return x.hydrateRoot(k,Ve,at)}finally{j.usingClientEntryPoint=!1}}}return Yf}var SD=gD();class ED{_context=void 0;_getContextCallbacks=[];async getContext(){return this._context?this._context:new Promise(j=>{this._getContextCallbacks.push(j)})}setContext(j){this._context=j,this._getContextCallbacks.forEach(k=>k(j)),this._getContextCallbacks=[]}configureClient(j){console.log("Client configured")}themeLoaded(){console.log("Theme loaded")}close(){console.log("Theme closed")}addToEcommerceCart(j){console.log("Add to cart",j)}completeQuote(){console.log("Complete quote")}navigateToCustomerPortal(){console.log("Navigating to customer portal")}}let Xm;const CD=({context:x})=>{const[j,k]=rT.useState(null);return rT.useEffect(()=>{if(j){if(Xm===void 0)throw new Error("Please call setSpiffDevOptions before requesting the context.");Xm.setContext({...x,container:j})}},[j,x]),pT.jsx("div",{ref:k,id:"spiffThemeWrapper"})};function RD(x,j){Xm=new ED,window.SpiffThemeLoader=Xm;let k;typeof x=="string"?k=document.getElementById(x):k=x,SD.createRoot(k).render(pT.jsx(CD,{context:j}))}function TD(x){return{id:"example",themeInstallId:x?.themeInstallId??"example",name:"Example Configuration",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z",themeVersion:{id:"example",version:"1.0.0",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z",configurationSchema:{fields:[]},launchData:{targetFiles:[]},theme:{id:"example",name:"Example Theme",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z"}},fields:[],...x}}const wD=x=>{if(Object.keys(x).includes("defaultValue"))return x.defaultValue};function xD(x,...j){return x.fields.filter(k=>!k.key||!j.includes(k.key)).map(k=>({key:k.key,fallbackToDefaultConfiguration:!1,value:wD(k),type:k.type,asset:void 0}))}const bD="1.25.0",_D={version:bD};function DD(x,j,k){if(j.type==="chunk"){if(console.log(`chunk ${x} isEntry: ${j.isEntry}, isDynamicEntry: ${j.isDynamicEntry}, isImplicitEntry: ${j.isImplicitEntry}`),!j.isEntry&&!k)return null;if(!j.isDynamicEntry)return{type:exports.ThemeFileType.Javascript,mimeType:"text/javascript",preload:!j.isEntry,filename:x}}else if(x.endsWith(".css"))return{type:exports.ThemeFileType.CSS,mimeType:"text/css",filename:x};return null}function kD(x){const{autoGenerateTargetFiles:j=!0,configurationSchema:k,includePreloadChunks:Ve=!1,targetFiles:at}=x??{};return{name:"spiff-theme-plugin",version:_D.version,config(dt,S){dt.base!==void 0&&dt.base!==""&&console.warn('You have specified a `base` in your vite configuration other than "". This value will now be overwritten.'),dt.base=""},writeBundle(dt,S){const Ut=j?Object.keys(S).map(ue=>at?.some(Je=>Je.filename===ue)?null:DD(ue,S[ue],Ve)).filter(ue=>ue!==null):[];at&&Ut.push(...at);const ce={launchData:{targetFiles:Ut},configurationSchema:k};nD.writeFileSync(rD.join(dt.dir,"spiffTheme.json"),JSON.stringify(ce,void 0,4))}}}Object.defineProperty(exports,"ConversionDataType",{enumerable:!0,get:()=>tD.ConversionDataType});exports.exampleThemeInstallConfig=TD;exports.getDefaultsForSchema=xD;exports.setSpiffDevOptions=RD;exports.spiffThemePlugin=kD;exports.themeInstallConfigurationFieldsToRecordObject=aD;exports.themeInstallConfigurationGraphQlToResource=uD;exports.themeInstallConfigurationToRecordObject=iD;exports.themeVersionConfigurationGraphQlToResource=dT;exports.themeVersionGraphQlToResource=lD;
165
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dE,Ba.createPortal=W_,Ba.createRoot=q_,Ba.findDOMNode=B_,Ba.flushSync=K_,Ba.hydrate=I_,Ba.hydrateRoot=X_,Ba.render=Y_,Ba.unmountComponentAtNode=$_,Ba.unstable_batchedUpdates=BS,Ba.unstable_renderSubtreeIntoContainer=G_,Ba.version=iE,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()),Ba}var sT;function yD(){if(sT)return Wm.exports;sT=1;function x(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function")){if(process.env.NODE_ENV!=="production")throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(x)}catch(j){console.error(j)}}}return process.env.NODE_ENV==="production"?(x(),Wm.exports=hD()):Wm.exports=mD(),Wm.exports}var cT;function gD(){if(cT)return Yf;cT=1;var x=yD();if(process.env.NODE_ENV==="production")Yf.createRoot=x.createRoot,Yf.hydrateRoot=x.hydrateRoot;else{var j=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Yf.createRoot=function(k,Ve){j.usingClientEntryPoint=!0;try{return x.createRoot(k,Ve)}finally{j.usingClientEntryPoint=!1}},Yf.hydrateRoot=function(k,Ve,at){j.usingClientEntryPoint=!0;try{return x.hydrateRoot(k,Ve,at)}finally{j.usingClientEntryPoint=!1}}}return Yf}var SD=gD();class ED{_context=void 0;_getContextCallbacks=[];async getContext(){return this._context?this._context:new Promise(j=>{this._getContextCallbacks.push(j)})}setContext(j){this._context=j,this._getContextCallbacks.forEach(k=>k(j)),this._getContextCallbacks=[]}configureClient(j){console.log("Client configured")}themeLoaded(){console.log("Theme loaded")}close(){console.log("Theme closed")}addToEcommerceCart(j){console.log("Add to cart",j)}completeQuote(){console.log("Complete quote")}navigateToCustomerPortal(){console.log("Navigating to customer portal")}}let Xm;const CD=({context:x})=>{const[j,k]=rT.useState(null);return rT.useEffect(()=>{if(j){if(Xm===void 0)throw new Error("Please call setSpiffDevOptions before requesting the context.");Xm.setContext({...x,container:j})}},[j,x]),pT.jsx("div",{ref:k,id:"spiffThemeWrapper"})};function RD(x,j){Xm=new ED,window.SpiffThemeLoader=Xm;let k;typeof x=="string"?k=document.getElementById(x):k=x,SD.createRoot(k).render(pT.jsx(CD,{context:j}))}function TD(x){return{id:"example",themeInstallId:x?.themeInstallId??"example",name:"Example Configuration",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z",themeVersion:{id:"example",version:"1.0.0",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z",configurationSchema:{fields:[]},launchData:{targetFiles:[]},theme:{id:"example",name:"Example Theme",createdAt:"2021-01-01T00:00:00Z",updatedAt:"2021-01-01T00:00:00Z"}},fields:[],...x}}const wD=x=>{if(Object.keys(x).includes("defaultValue"))return x.defaultValue};function xD(x,...j){return x.fields.filter(k=>!k.key||!j.includes(k.key)).map(k=>({key:k.key,fallbackToDefaultConfiguration:!1,value:wD(k),type:k.type,asset:void 0}))}const bD="1.25.1",_D={version:bD};function DD(x,j,k){if(j.type==="chunk"){if(console.log(`chunk ${x} isEntry: ${j.isEntry}, isDynamicEntry: ${j.isDynamicEntry}, isImplicitEntry: ${j.isImplicitEntry}`),!j.isEntry&&!k)return null;if(!j.isDynamicEntry)return{type:exports.ThemeFileType.Javascript,mimeType:"text/javascript",preload:!j.isEntry,filename:x}}else if(x.endsWith(".css"))return{type:exports.ThemeFileType.CSS,mimeType:"text/css",filename:x};return null}function kD(x){const{autoGenerateTargetFiles:j=!0,configurationSchema:k,includePreloadChunks:Ve=!1,targetFiles:at}=x??{};return{name:"spiff-theme-plugin",version:_D.version,config(dt,S){dt.base!==void 0&&dt.base!==""&&console.warn('You have specified a `base` in your vite configuration other than "". This value will now be overwritten.'),dt.base=""},writeBundle(dt,S){const Ut=j?Object.keys(S).map(ue=>at?.some(Je=>Je.filename===ue)?null:DD(ue,S[ue],Ve)).filter(ue=>ue!==null):[];at&&Ut.push(...at);const ce={launchData:{targetFiles:Ut},configurationSchema:k};nD.writeFileSync(rD.join(dt.dir,"spiffTheme.json"),JSON.stringify(ce,void 0,4))}}}Object.defineProperty(exports,"ConversionDataType",{enumerable:!0,get:()=>tD.ConversionDataType});exports.exampleThemeInstallConfig=TD;exports.getDefaultsForSchema=xD;exports.setSpiffDevOptions=RD;exports.spiffThemePlugin=kD;exports.themeInstallConfigurationFieldsToRecordObject=aD;exports.themeInstallConfigurationGraphQlToResource=uD;exports.themeInstallConfigurationToRecordObject=iD;exports.themeVersionConfigurationGraphQlToResource=dT;exports.themeVersionGraphQlToResource=lD;
166
166
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ConversionDataType as PD } from "@repo/core";
1
+ import { ConversionDataType as PD } from "@spiffcommerce/core";
2
2
  import iD from "fs";
3
3
  import lD from "path";
4
4
  var Xm;
@@ -21358,7 +21358,7 @@ function FD(x, ...j) {
21358
21358
  asset: void 0
21359
21359
  }));
21360
21360
  }
21361
- const TD = "1.25.0", wD = {
21361
+ const TD = "1.25.1", wD = {
21362
21362
  version: TD
21363
21363
  };
21364
21364
  function xD(x, j, k) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/theme-bridge",
3
- "version": "1.25.1",
3
+ "version": "1.25.2",
4
4
  "type": "module",
5
5
  "author": "SpiffCommerce",
6
6
  "license": "MIT",