@wix/cli-app 1.1.82 → 1.1.83

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.
Files changed (89) hide show
  1. package/build/{AddPermissionCommand-SXPAYSAF.js → AddPermissionCommand-5X3K4KUG.js} +2 -2
  2. package/build/{CreateVersionCommand-CL7JTSHV.js → CreateVersionCommand-XWWXAFOX.js} +3 -3
  3. package/build/{DevCommand-NKKM4UEH.js → DevCommand-EOEGQX2B.js} +10 -10
  4. package/build/{GenerateCommand-EK35R76L.js → GenerateCommand-IOFKL3RC.js} +8 -8
  5. package/build/{LogsCommand-NCV5AKYF.js → LogsCommand-23QQRT3D.js} +3 -3
  6. package/build/PreviewCommand-FBODGF7Y.js +19 -0
  7. package/build/ReleaseCommand-SNCMQQXK.js +28 -0
  8. package/build/{ReleaseCommand-FJKPKE3Y.js.map → ReleaseCommand-SNCMQQXK.js.map} +1 -1
  9. package/build/ServeCommand-SGREOUDA.js +43 -0
  10. package/build/ServeCommand-SGREOUDA.js.map +1 -0
  11. package/build/{build-VSYNDSED.js → build-PYB5PAZO.js} +6 -6
  12. package/build/{chunk-K4IODCQP.js → chunk-3X2VYRBF.js} +3 -5
  13. package/build/chunk-3X2VYRBF.js.map +1 -0
  14. package/build/{chunk-3GSDI3OJ.js → chunk-4PXJSX4C.js} +2 -2
  15. package/build/{chunk-FGCBIHDS.js → chunk-5TP6T6QK.js} +84 -17
  16. package/build/chunk-5TP6T6QK.js.map +1 -0
  17. package/build/{chunk-HR6CTO67.js → chunk-63VDDLLQ.js} +2 -2
  18. package/build/{chunk-VARU4VGB.js → chunk-AN77SZN2.js} +7 -9
  19. package/build/{chunk-VARU4VGB.js.map → chunk-AN77SZN2.js.map} +1 -1
  20. package/build/{chunk-FTEVVMFS.js → chunk-E4UNGBQY.js} +2 -2
  21. package/build/{chunk-OGO22IKX.js → chunk-GGDJQXOX.js} +3 -3
  22. package/build/{chunk-KU4PN6UU.js → chunk-KLBXSZ6R.js} +3 -3
  23. package/build/{chunk-75BL4FR5.js → chunk-QREADZZF.js} +5 -5
  24. package/build/{chunk-PGKXOCZN.js → chunk-SIJDKP2Q.js} +242 -85
  25. package/build/chunk-SIJDKP2Q.js.map +1 -0
  26. package/build/{chunk-3LJH5WAS.js → chunk-TJFERWU7.js} +5 -5
  27. package/build/{chunk-WBXDIEUS.js → chunk-VB3AXXRP.js} +2 -2
  28. package/build/{chunk-XDWVTYW3.js → chunk-VLQG5SQF.js} +20 -2
  29. package/build/{chunk-XDWVTYW3.js.map → chunk-VLQG5SQF.js.map} +1 -1
  30. package/build/{chunk-5LGI6O3F.js → chunk-WNR36YTI.js} +2 -2
  31. package/build/{chunk-I2PLZT4A.js → chunk-Y4GJ3NS4.js} +2 -2
  32. package/build/{chunk-QSLRE7OK.js → chunk-ZCUJ356B.js} +2 -2
  33. package/build/{chunk-GGQMSU4O.js → chunk-ZLLXHWZF.js} +588 -249
  34. package/build/{chunk-GGQMSU4O.js.map → chunk-ZLLXHWZF.js.map} +1 -1
  35. package/build/{chunk-IB2KM2Q7.js → chunk-ZOZ5LJV7.js} +7 -7
  36. package/build/cloudflare-runtime/entry.js +1 -1
  37. package/build/cloudflare-runtime/getRegisteredExtensions.js +1 -1
  38. package/build/index.js +34 -31
  39. package/build/index.js.map +1 -1
  40. package/build/platform-sdk/chunk-6NLQHDP6.js +2 -0
  41. package/build/platform-sdk/chunk-6NLQHDP6.js.map +1 -0
  42. package/build/platform-sdk/chunk-BGTZ3RNN.js +2 -0
  43. package/build/platform-sdk/chunk-BGTZ3RNN.js.map +1 -0
  44. package/build/platform-sdk/{chunk-3WHQP2RD.js → chunk-MM2KVUBI.js} +2 -2
  45. package/build/platform-sdk/dashboard.js +1 -1
  46. package/build/platform-sdk/editor.js +1 -1
  47. package/build/platform-sdk/sdk-context.js +1 -1
  48. package/build/platform-sdk/sdk-context.js.map +1 -1
  49. package/build/platform-sdk/site.js +1 -1
  50. package/build/{preview-CLBQELU3.js → preview-PIFWQKW3.js} +13 -14
  51. package/build/{preview-CLBQELU3.js.map → preview-PIFWQKW3.js.map} +1 -1
  52. package/build/{release-VZ2GWJE2.js → release-6Z6LMTRW.js} +15 -16
  53. package/build/{release-VZ2GWJE2.js.map → release-6Z6LMTRW.js.map} +1 -1
  54. package/build/{render-command-OT7HQRPA.js → render-command-3G25G5MU.js} +6 -6
  55. package/package.json +6 -6
  56. package/build/PreviewCommand-KCCZ4ECQ.js +0 -20
  57. package/build/ReleaseCommand-FJKPKE3Y.js +0 -29
  58. package/build/ServeCommand-B4GJL65A.js +0 -169
  59. package/build/ServeCommand-B4GJL65A.js.map +0 -1
  60. package/build/chunk-FGCBIHDS.js.map +0 -1
  61. package/build/chunk-K4IODCQP.js.map +0 -1
  62. package/build/chunk-PGKXOCZN.js.map +0 -1
  63. package/build/chunk-PS7R6MWD.js +0 -92
  64. package/build/chunk-PS7R6MWD.js.map +0 -1
  65. package/build/platform-sdk/chunk-42XIZ4MH.js +0 -2
  66. package/build/platform-sdk/chunk-42XIZ4MH.js.map +0 -1
  67. package/build/platform-sdk/chunk-MQEY2AKT.js +0 -2
  68. package/build/platform-sdk/chunk-MQEY2AKT.js.map +0 -1
  69. /package/build/{AddPermissionCommand-SXPAYSAF.js.map → AddPermissionCommand-5X3K4KUG.js.map} +0 -0
  70. /package/build/{CreateVersionCommand-CL7JTSHV.js.map → CreateVersionCommand-XWWXAFOX.js.map} +0 -0
  71. /package/build/{DevCommand-NKKM4UEH.js.map → DevCommand-EOEGQX2B.js.map} +0 -0
  72. /package/build/{GenerateCommand-EK35R76L.js.map → GenerateCommand-IOFKL3RC.js.map} +0 -0
  73. /package/build/{LogsCommand-NCV5AKYF.js.map → LogsCommand-23QQRT3D.js.map} +0 -0
  74. /package/build/{PreviewCommand-KCCZ4ECQ.js.map → PreviewCommand-FBODGF7Y.js.map} +0 -0
  75. /package/build/{build-VSYNDSED.js.map → build-PYB5PAZO.js.map} +0 -0
  76. /package/build/{chunk-3GSDI3OJ.js.map → chunk-4PXJSX4C.js.map} +0 -0
  77. /package/build/{chunk-HR6CTO67.js.map → chunk-63VDDLLQ.js.map} +0 -0
  78. /package/build/{chunk-FTEVVMFS.js.map → chunk-E4UNGBQY.js.map} +0 -0
  79. /package/build/{chunk-OGO22IKX.js.map → chunk-GGDJQXOX.js.map} +0 -0
  80. /package/build/{chunk-KU4PN6UU.js.map → chunk-KLBXSZ6R.js.map} +0 -0
  81. /package/build/{chunk-75BL4FR5.js.map → chunk-QREADZZF.js.map} +0 -0
  82. /package/build/{chunk-3LJH5WAS.js.map → chunk-TJFERWU7.js.map} +0 -0
  83. /package/build/{chunk-WBXDIEUS.js.map → chunk-VB3AXXRP.js.map} +0 -0
  84. /package/build/{chunk-5LGI6O3F.js.map → chunk-WNR36YTI.js.map} +0 -0
  85. /package/build/{chunk-I2PLZT4A.js.map → chunk-Y4GJ3NS4.js.map} +0 -0
  86. /package/build/{chunk-QSLRE7OK.js.map → chunk-ZCUJ356B.js.map} +0 -0
  87. /package/build/{chunk-IB2KM2Q7.js.map → chunk-ZOZ5LJV7.js.map} +0 -0
  88. /package/build/platform-sdk/{chunk-3WHQP2RD.js.map → chunk-MM2KVUBI.js.map} +0 -0
  89. /package/build/{render-command-OT7HQRPA.js.map → render-command-3G25G5MU.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{wixContext as r}from"@wix/sdk-context";function x(){let e=typeof $wixContext<"u"&&$wixContext.initWixModules?$wixContext.initWixModules:typeof globalThis.__wix_context__<"u"&&globalThis.__wix_context__.initWixModules?globalThis.__wix_context__.initWixModules:void 0;if(e)return{initWixModules(n,o){return c(()=>e(n,o))},fetchWithAuth(){throw new Error("fetchWithAuth is not available in this context")},graphql(){throw new Error("graphql is not available in this context")}};let t=typeof $wixContext<"u"?$wixContext.client:typeof r.client<"u"?r.client:typeof globalThis.__wix_context__<"u"?globalThis.__wix_context__.client:void 0,i=typeof $wixContext<"u"?$wixContext.elevatedClient:typeof r.elevatedClient<"u"?r.elevatedClient:typeof globalThis.__wix_context__<"u"?globalThis.__wix_context__.elevatedClient:void 0;if(!(!t&&!i))return{initWixModules(n,o){if(o){if(!i)throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");return c(()=>i.use(n))}if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return c(()=>t.use(n))},fetchWithAuth:(n,o)=>{if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.fetchWithAuth(n,o)},async graphql(n,o,l){if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.graphql(n,o,l)}}}function c(e){let t=globalThis.__wix_context__,i={client:r.client,elevatedClient:r.elevatedClient},n;globalThis.__wix_context__=void 0,r.client=void 0,r.elevatedClient=void 0,typeof $wixContext<"u"&&(n={client:$wixContext?.client,elevatedClient:$wixContext?.elevatedClient},delete $wixContext.client,delete $wixContext.elevatedClient);try{return e()}finally{globalThis.__wix_context__=t,r.client=i.client,r.elevatedClient=i.elevatedClient,typeof $wixContext<"u"&&($wixContext.client=n.client,$wixContext.elevatedClient=n.elevatedClient)}}function p(e,t){return{...e,...Object.fromEntries(t.map(i=>[i,(...n)=>{let o=x();if(!o)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return o.initWixModules(e)[i].apply(void 0,n)}]))}}function F(e){return p({__type:"host",create:t=>Object.entries(e).reduce((i,[n,o])=>({...i,[n]:o(t)}),{})},Object.keys(e))}var y=e=>e!=null&&e!=="",a=e=>f(e,y);function f(e,t=i=>!!i){if(!e)return{};let i={};for(let n in e)t(e[n],n)&&(i[n]=e[n]);return i}var h=e=>{let t=a({"app.id":e.appId,"app.version":e.appVersion,"app.instanceId":e.appInstanceId,"extension.id":e.extensionId,"extension.name":e.extensionName,"extension.type":e.extensionType,platform:e.platform}),i=f({"extension.data":a({...e.extensionData}),site:a({url:e.siteUrl,id:e.tenantType==="SITE"?e.tenantId:void 0}),account:a({id:e.tenantType==="ACCOUNT"?e.tenantId:void 0})},n=>!!n&&Object.keys(n).length>0);return{tags:t,contexts:i}},_=class{constructor(e){this.message=e,this.captureException=()=>{console.error(this.message)},this.captureMessage=()=>{console.error(this.message)},this.startSpan=(t,i)=>(console.error(this.message),Promise.resolve(i(void 0))),this.addBreadcrumb=()=>{console.error(this.message)}}},s=e=>new _(e);var w=(e,{tags:t,contexts:i})=>{t&&e.setTags(t),i&&Object.entries(i).forEach(([n,o])=>typeof o<"u"&&e.setContext(n,o))},S=(e,t)=>{if(!t)return;let{tags:i,contexts:n}=h(t);w(e,{tags:i,contexts:n})},C=["onLoad","forceLoad"],M=class{constructor(e){this.options=e,this.isResolved=!1,this.validateOptions=t=>{let i=C.filter(n=>typeof t.sentrySDK?.[n]!="function");if(i.length>0)throw new Error(`Missing the following options.sentrySDK methods: ${i.join(", ")}`)},this.validateOptions(e)}init(){let{sentrySDK:e,transport:t,hostContext:i,dsn:n,release:o,environment:l,tracesSampleRate:g=1,debug:v=!1}=this.options,u=new e.Scope,d=new e.BrowserClient({dsn:n,transport:t??e.makeFetchTransport,integrations:e.getDefaultIntegrations({}),stackParser:e.defaultStackParser,tracesSampleRate:g||1,debug:v,environment:l,release:o});return S(u,i),u.setClient(d),d.init(),{sentrySDK:e,scope:u,sentryClient:d}}loadFullSDK(){return this.promise?this.promise:(this.promise=new Promise(e=>{this.options.sentrySDK.onLoad(()=>{this.isResolved||(this.isResolved=!0,e(this.init()))})}),this.options.sentrySDK.forceLoad(),this.promise)}},W=class extends M{constructor(){super(...arguments),this.addBreadcrumb=e=>{let t={type:e.type,category:e.category,message:e.message,level:e.level,data:e.data};this.loadFullSDK().then(({scope:i})=>{i.addBreadcrumb(t)})},this.captureException=(e,t)=>{this.loadFullSDK().then(({sentryClient:i,scope:n})=>{i.captureException(e,{captureContext:{level:t?.level??"error",tags:t?.tags,contexts:t?.contexts}},n)})},this.captureMessage=(e,t)=>{this.loadFullSDK().then(({sentryClient:i,scope:n})=>{i.captureMessage(e,t?.level??"error",{captureContext:{level:t?.level??"error",tags:t?.tags,contexts:t?.contexts}},n)})},this.startSpan=async(e,t)=>{let i={name:e.name,tags:e.tags};return this.loadFullSDK().then(({sentrySDK:n,scope:o})=>n.startSpan({...i,scope:o},t))}}},b=e=>`Sentry SDK version "${e}" is not supported. Please make sure to use monitoring SDK only in supported environments.`,D=e=>{try{return parseInt(e.split(".")[0],10)}catch{console.warn("Failed to parse Sentry SDK version");return}},m=({sentrySDK:e,dsn:t,...i})=>{if(!e)return s("Unsupported environment - Sentry SDK is not loaded into the environment. Please make sure to use monitoring SDK only in supported environments.");if(!t)return s("Missing Sentry DSN in the app's monitoring configuration. Please make sure to set it.");try{let n=e.SDK_VERSION&&D(e.SDK_VERSION);return n&&n<7?s(b(e.SDK_VERSION)):new W({...i,dsn:t,sentrySDK:e})}catch(n){return s(`Failed to initialize monitoring client: ${n.message}`)}};var E=e=>e?.type==="SENTRY",L=({sentrySDK:e,sentryTransport:t,monitoringConfig:i,hostContext:n})=>{if(E(i)){let{sentryOptions:o}=i;return()=>m({dsn:o?.dsn,hostContext:n,sentrySDK:e,transport:t})}return()=>s("Invalid monitoring configuration. Please check the monitoring setup of your application.")};export{F as a,L as b};
2
+ //# sourceMappingURL=chunk-6NLQHDP6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/@wix/sdk-runtime/build/context.js","../../../node_modules/@wix/sdk-runtime/build/context-v2.js","../../../node_modules/@wix/sdk-runtime/build/host-modules.js","../../../node_modules/@wix/monitoring/build/index.js","../../../node_modules/@wix/monitoring-browser-sentry/build/index.js","../../../node_modules/@wix/monitoring-browser-sdk-host/build/index.js"],"sourcesContent":["import { wixContext } from '@wix/sdk-context';\nexport function resolveContext() {\n const oldContext = typeof $wixContext !== 'undefined' && $wixContext.initWixModules\n ? $wixContext.initWixModules\n : typeof globalThis.__wix_context__ !== 'undefined' &&\n globalThis.__wix_context__.initWixModules\n ? globalThis.__wix_context__.initWixModules\n : undefined;\n if (oldContext) {\n return {\n // @ts-expect-error\n initWixModules(modules, elevated) {\n return runWithoutContext(() => oldContext(modules, elevated));\n },\n fetchWithAuth() {\n throw new Error('fetchWithAuth is not available in this context');\n },\n graphql() {\n throw new Error('graphql is not available in this context');\n },\n };\n }\n const contextualClient = typeof $wixContext !== 'undefined'\n ? $wixContext.client\n : typeof wixContext.client !== 'undefined'\n ? wixContext.client\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.client\n : undefined;\n const elevatedClient = typeof $wixContext !== 'undefined'\n ? $wixContext.elevatedClient\n : typeof wixContext.elevatedClient !== 'undefined'\n ? wixContext.elevatedClient\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.elevatedClient\n : undefined;\n if (!contextualClient && !elevatedClient) {\n return;\n }\n return {\n initWixModules(wixModules, elevated) {\n if (elevated) {\n if (!elevatedClient) {\n throw new Error('An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules');\n }\n return runWithoutContext(() => elevatedClient.use(wixModules));\n }\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return runWithoutContext(() => contextualClient.use(wixModules));\n },\n fetchWithAuth: (urlOrRequest, requestInit) => {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.fetchWithAuth(urlOrRequest, requestInit);\n },\n async graphql(query, variables, opts) {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.graphql(query, variables, opts);\n },\n };\n}\nexport function contextualizeHostModule(hostModule, prop) {\n return (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(hostModule)[prop].apply(undefined, args);\n };\n}\nexport function contextualizeRESTModule(restModule, expectedArgsLength) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(restModule, args[expectedArgsLength]?.suppressAuth ? true : false)\n .apply(undefined, args);\n });\n}\nexport function contextualizeEventDefinitionModule(eventDefinition) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n}\nexport function contextualizeSerivcePluginModule(servicePlugin) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n}\nexport * from './context-v2.js';\nexport function runWithoutContext(fn) {\n const globalContext = globalThis.__wix_context__;\n const moduleContext = {\n client: wixContext.client,\n elevatedClient: wixContext.elevatedClient,\n };\n let closureContext;\n globalThis.__wix_context__ = undefined;\n wixContext.client = undefined;\n wixContext.elevatedClient = undefined;\n if (typeof $wixContext !== 'undefined') {\n closureContext = {\n client: $wixContext?.client,\n elevatedClient: $wixContext?.elevatedClient,\n };\n delete $wixContext.client;\n delete $wixContext.elevatedClient;\n }\n try {\n return fn();\n }\n finally {\n globalThis.__wix_context__ = globalContext;\n wixContext.client = moduleContext.client;\n wixContext.elevatedClient = moduleContext.elevatedClient;\n if (typeof $wixContext !== 'undefined') {\n $wixContext.client = closureContext.client;\n $wixContext.elevatedClient = closureContext.elevatedClient;\n }\n }\n}\n","import { EventDefinition, ServicePluginDefinition, } from '@wix/sdk-types';\nimport { resolveContext } from './context.js';\nexport { EventDefinition, ServicePluginDefinition, };\nexport function contextualizeHostModuleV2(hostModule, props) {\n return {\n ...hostModule,\n ...Object.fromEntries(props.map((prop) => [\n prop,\n (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(hostModule)[prop].apply(undefined, args);\n },\n ])),\n };\n}\nexport function contextualizeRESTModuleV2(restModule, elevated) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n // @ts-expect-error - if there is no context, we want to behave like the original module\n return restModule.apply(undefined, args);\n }\n return (context\n .initWixModules(restModule, elevated)\n // @ts-expect-error - we know the args here are meant to be passed to the initalized module\n .apply(undefined, args));\n });\n}\nexport function contextualizeEventDefinitionModuleV2(eventDefinition) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n contextualMethod.__type = eventDefinition.__type;\n contextualMethod.type = eventDefinition.type;\n contextualMethod.isDomainEvent = eventDefinition.isDomainEvent;\n contextualMethod.transformations = eventDefinition.transformations;\n return contextualMethod;\n}\nexport function contextualizeSerivcePluginModuleV2(servicePlugin) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n contextualMethod.__type = servicePlugin.__type;\n contextualMethod.componentType = servicePlugin.componentType;\n contextualMethod.methods = servicePlugin.methods;\n return contextualMethod;\n}\n","import { contextualizeHostModuleV2 } from './context-v2.js';\nexport function createHostModule(hostModuleAPI) {\n return contextualizeHostModuleV2({\n __type: 'host',\n create: (host) => Object.entries(hostModuleAPI).reduce((acc, [key, fn]) => ({\n ...acc,\n [key]: fn(host),\n }), {}),\n }, Object.keys(hostModuleAPI));\n}\n","// src/context/context-utils.ts\nvar validValue = (value) => value !== void 0 && value !== null && value !== \"\";\nvar pickByValidValues = (obj) => pickBy(obj, validValue);\nfunction pickBy(object, predicate = (value) => !!value) {\n if (!object) {\n return {};\n }\n const result = {};\n for (const key in object) {\n if (predicate(object[key], key)) {\n result[key] = object[key];\n }\n }\n return result;\n}\nvar generateTagsAndContext = (context) => {\n const tags = pickByValidValues({\n \"app.id\": context.appId,\n \"app.version\": context.appVersion,\n \"app.instanceId\": context.appInstanceId,\n \"extension.id\": context.extensionId,\n \"extension.name\": context.extensionName,\n \"extension.type\": context.extensionType,\n platform: context.platform\n });\n const contexts = pickBy(\n {\n \"extension.data\": pickByValidValues({\n ...context.extensionData\n }),\n site: pickByValidValues({\n url: context.siteUrl,\n id: context.tenantType === \"SITE\" ? context.tenantId : void 0\n }),\n account: pickByValidValues({\n id: context.tenantType === \"ACCOUNT\" ? context.tenantId : void 0\n })\n },\n (value) => !!value && Object.keys(value).length > 0\n );\n return {\n tags,\n contexts\n };\n};\n\n// src/fallback-client.ts\nvar FallbackMonitoringClient = class {\n constructor(message) {\n this.message = message;\n this.captureException = () => {\n console.error(this.message);\n };\n this.captureMessage = () => {\n console.error(this.message);\n };\n this.startSpan = (spanOptions, callback) => {\n console.error(this.message);\n return Promise.resolve(callback(void 0));\n };\n this.addBreadcrumb = () => {\n console.error(this.message);\n };\n }\n};\nvar createFallbackMonitoringClient = (message) => {\n return new FallbackMonitoringClient(message);\n};\nexport {\n createFallbackMonitoringClient,\n generateTagsAndContext\n};\n","// src/factory.ts\nimport { createFallbackMonitoringClient } from \"@wix/monitoring\";\n\n// src/utils.ts\nimport { generateTagsAndContext } from \"@wix/monitoring\";\nvar setTagsAndContextsOnScope = (scope, { tags, contexts }) => {\n if (tags) {\n scope.setTags(tags);\n }\n if (contexts) {\n Object.entries(contexts).forEach(\n ([key, value]) => typeof value !== \"undefined\" && scope.setContext(key, value)\n );\n }\n};\nvar setHostContextOnScope = (scope, hostContext) => {\n if (!hostContext) {\n return;\n }\n const { tags, contexts } = generateTagsAndContext(hostContext);\n setTagsAndContextsOnScope(scope, { tags, contexts });\n};\n\n// src/abstract-browser-client.ts\nvar MandatorySDKMethods = [\"onLoad\", \"forceLoad\"];\nvar AbstractSentryBrowserClient = class {\n constructor(options) {\n this.options = options;\n this.isResolved = false;\n this.validateOptions = (options) => {\n const missingSDKMethods = MandatorySDKMethods.filter(\n (method) => typeof options.sentrySDK?.[method] !== \"function\"\n );\n if (missingSDKMethods.length > 0) {\n throw new Error(\n `Missing the following options.sentrySDK methods: ${missingSDKMethods.join(\", \")}`\n );\n }\n };\n this.validateOptions(options);\n }\n init() {\n const {\n sentrySDK,\n transport,\n hostContext,\n dsn,\n release,\n environment,\n tracesSampleRate = 1,\n debug = false\n } = this.options;\n const scope = new sentrySDK.Scope();\n const sentryClient = new sentrySDK.BrowserClient({\n dsn,\n transport: transport ?? sentrySDK.makeFetchTransport,\n integrations: sentrySDK.getDefaultIntegrations({}),\n stackParser: sentrySDK.defaultStackParser,\n tracesSampleRate: tracesSampleRate || 1,\n debug,\n environment,\n release\n });\n setHostContextOnScope(scope, hostContext);\n scope.setClient(sentryClient);\n sentryClient.init();\n return {\n sentrySDK,\n scope,\n sentryClient\n };\n }\n loadFullSDK() {\n if (this.promise) {\n return this.promise;\n }\n this.promise = new Promise((resolve) => {\n this.options.sentrySDK.onLoad(() => {\n if (this.isResolved) {\n return;\n }\n this.isResolved = true;\n resolve(this.init());\n });\n });\n this.options.sentrySDK.forceLoad();\n return this.promise;\n }\n};\n\n// src/browser/client.ts\nvar SentryBrowserClient = class extends AbstractSentryBrowserClient {\n constructor() {\n super(...arguments);\n /**\n * Records a new breadcrumb which will be attached to future events.\n * Breadcrumbs will be added to subsequent events to provide more context on user's actions prior to an error or crash.\n * @param breadcrumb The breadcrumb to record.\n */\n this.addBreadcrumb = (breadcrumb) => {\n const filteredBreadcrumb = {\n type: breadcrumb.type,\n category: breadcrumb.category,\n message: breadcrumb.message,\n level: breadcrumb.level,\n data: breadcrumb.data\n };\n this.loadFullSDK().then(({ scope }) => {\n scope.addBreadcrumb(filteredBreadcrumb);\n });\n };\n /**\n * Captures an exception event and sends it to Sentry.\n * @param error The error to capture\n * @param captureContext Optional additional data to attach to the Sentry event.\n */\n this.captureException = (error, captureContext) => {\n this.loadFullSDK().then(({ sentryClient, scope }) => {\n sentryClient.captureException(\n error,\n {\n captureContext: {\n level: captureContext?.level ?? \"error\",\n tags: captureContext?.tags,\n contexts: captureContext?.contexts\n }\n },\n scope\n );\n });\n };\n /**\n * Captures a message event and sends it to Sentry.\n * @param message The message to capture\n * @param captureContext Define the level of the message or pass in additional data to attach to the message.\n */\n this.captureMessage = (message, captureContext) => {\n this.loadFullSDK().then(({ sentryClient, scope }) => {\n sentryClient.captureMessage(\n message,\n captureContext?.level ?? \"error\",\n {\n captureContext: {\n level: captureContext?.level ?? \"error\",\n tags: captureContext?.tags,\n contexts: captureContext?.contexts\n }\n },\n scope\n );\n });\n };\n /**\n * Wraps a function with a span and finishes the span after the function is done. The created span is the active span and will be used as parent by other spans created inside the function, as long as the function is executed while the scope is active.\n * @param spanOptions The options for the span\n * @param callback The function to wrap with a span\n * @returns The return value of the callback\n */\n this.startSpan = async (spanOptions, callback) => {\n const filteredSpanOptions = {\n name: spanOptions.name,\n tags: spanOptions.tags\n };\n return this.loadFullSDK().then(({ sentrySDK, scope }) => {\n return sentrySDK.startSpan({ ...filteredSpanOptions, scope }, callback);\n });\n };\n }\n};\n\n// src/factory.ts\nvar unsupportedEnvironmentMessage = (version) => `Sentry SDK version \"${version}\" is not supported. Please make sure to use monitoring SDK only in supported environments.`;\nvar major = (version) => {\n try {\n return parseInt(version.split(\".\")[0], 10);\n } catch {\n console.warn(\"Failed to parse Sentry SDK version\");\n return void 0;\n }\n};\nvar createSentryBrowserClient = ({\n sentrySDK,\n dsn,\n ...options\n}) => {\n if (!sentrySDK) {\n return createFallbackMonitoringClient(\n \"Unsupported environment - Sentry SDK is not loaded into the environment. Please make sure to use monitoring SDK only in supported environments.\"\n );\n }\n if (!dsn) {\n return createFallbackMonitoringClient(\n \"Missing Sentry DSN in the app's monitoring configuration. Please make sure to set it.\"\n );\n }\n try {\n const sentrySdkMajorVersion = sentrySDK.SDK_VERSION && major(sentrySDK.SDK_VERSION);\n if (sentrySdkMajorVersion && sentrySdkMajorVersion < 7) {\n return createFallbackMonitoringClient(\n unsupportedEnvironmentMessage(sentrySDK.SDK_VERSION)\n );\n }\n return new SentryBrowserClient({ ...options, dsn, sentrySDK });\n } catch (e) {\n return createFallbackMonitoringClient(\n `Failed to initialize monitoring client: ${e.message}`\n );\n }\n};\nexport {\n createSentryBrowserClient\n};\n","// src/monitoring-client.ts\nimport { createFallbackMonitoringClient } from \"@wix/monitoring\";\nimport { createSentryBrowserClient } from \"@wix/monitoring-browser-sentry\";\nvar isSentryConfig = (monitoringConfig) => monitoringConfig?.type === \"SENTRY\";\nvar getMonitoringClientFunction = ({\n sentrySDK,\n sentryTransport,\n monitoringConfig,\n hostContext\n}) => {\n if (isSentryConfig(monitoringConfig)) {\n const { sentryOptions } = monitoringConfig;\n return () => createSentryBrowserClient({\n dsn: sentryOptions?.dsn,\n hostContext,\n sentrySDK,\n transport: sentryTransport\n });\n }\n return () => createFallbackMonitoringClient(\n \"Invalid monitoring configuration. Please check the monitoring setup of your application.\"\n );\n};\nexport {\n getMonitoringClientFunction\n};\n"],"mappings":"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","names":["wixContext","resolveContext","oldContext","modules","elevated","runWithoutContext","contextualClient","elevatedClient","wixModules","urlOrRequest","requestInit","query","variables","opts","runWithoutContext","fn","globalContext","moduleContext","wixContext","closureContext","contextualizeHostModuleV2","hostModule","props","prop","args","context","resolveContext","createHostModule","hostModuleAPI","contextualizeHostModuleV2","host","acc","key","fn","validValue","value","pickByValidValues","obj","pickBy","object","predicate","result","key","generateTagsAndContext","context","tags","contexts","FallbackMonitoringClient","message","spanOptions","callback","createFallbackMonitoringClient","setTagsAndContextsOnScope","scope","tags","contexts","key","value","setHostContextOnScope","hostContext","generateTagsAndContext","MandatorySDKMethods","AbstractSentryBrowserClient","options","missingSDKMethods","method","sentrySDK","transport","dsn","release","environment","tracesSampleRate","debug","sentryClient","resolve","SentryBrowserClient","breadcrumb","filteredBreadcrumb","error","captureContext","message","spanOptions","callback","filteredSpanOptions","unsupportedEnvironmentMessage","version","major","createSentryBrowserClient","createFallbackMonitoringClient","sentrySdkMajorVersion","e","isSentryConfig","monitoringConfig","getMonitoringClientFunction","sentrySDK","sentryTransport","hostContext","sentryOptions","createSentryBrowserClient","createFallbackMonitoringClient"]}
@@ -0,0 +1,2 @@
1
+ import{wixContext as n}from"@wix/sdk-context";function d(o,t){return(...i)=>{let e=x();return e?e.initWixModules(o,t).apply(void 0,i):o.apply(void 0,i)}}function x(){let o=typeof $wixContext<"u"&&$wixContext.initWixModules?$wixContext.initWixModules:typeof globalThis.__wix_context__<"u"&&globalThis.__wix_context__.initWixModules?globalThis.__wix_context__.initWixModules:void 0;if(o)return{initWixModules(e,l){return r(()=>o(e,l))},fetchWithAuth(){throw new Error("fetchWithAuth is not available in this context")},graphql(){throw new Error("graphql is not available in this context")}};let t=typeof $wixContext<"u"?$wixContext.client:typeof n.client<"u"?n.client:typeof globalThis.__wix_context__<"u"?globalThis.__wix_context__.client:void 0,i=typeof $wixContext<"u"?$wixContext.elevatedClient:typeof n.elevatedClient<"u"?n.elevatedClient:typeof globalThis.__wix_context__<"u"?globalThis.__wix_context__.elevatedClient:void 0;if(!(!t&&!i))return{initWixModules(e,l){if(l){if(!i)throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");return r(()=>i.use(e))}if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return r(()=>t.use(e))},fetchWithAuth:(e,l)=>{if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.fetchWithAuth(e,l)},async graphql(e,l,u){if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.graphql(e,l,u)}}}function r(o){let t=globalThis.__wix_context__,i={client:n.client,elevatedClient:n.elevatedClient},e;globalThis.__wix_context__=void 0,n.client=void 0,n.elevatedClient=void 0,typeof $wixContext<"u"&&(e={client:$wixContext?.client,elevatedClient:$wixContext?.elevatedClient},delete $wixContext.client,delete $wixContext.elevatedClient);try{return o()}finally{globalThis.__wix_context__=t,n.client=i.client,n.elevatedClient=i.elevatedClient,typeof $wixContext<"u"&&($wixContext.client=e.client,$wixContext.elevatedClient=e.elevatedClient)}}export{d as a,r as b};
2
+ //# sourceMappingURL=chunk-BGTZ3RNN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/@wix/sdk/node_modules/@wix/sdk-runtime/build/context.js","../../../node_modules/@wix/sdk/node_modules/@wix/sdk-runtime/build/context-v2.js"],"sourcesContent":["import { wixContext } from '@wix/sdk-context';\nexport function resolveContext() {\n const oldContext = typeof $wixContext !== 'undefined' && $wixContext.initWixModules\n ? $wixContext.initWixModules\n : typeof globalThis.__wix_context__ !== 'undefined' &&\n globalThis.__wix_context__.initWixModules\n ? globalThis.__wix_context__.initWixModules\n : undefined;\n if (oldContext) {\n return {\n // @ts-expect-error\n initWixModules(modules, elevated) {\n return runWithoutContext(() => oldContext(modules, elevated));\n },\n fetchWithAuth() {\n throw new Error('fetchWithAuth is not available in this context');\n },\n graphql() {\n throw new Error('graphql is not available in this context');\n },\n };\n }\n const contextualClient = typeof $wixContext !== 'undefined'\n ? $wixContext.client\n : typeof wixContext.client !== 'undefined'\n ? wixContext.client\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.client\n : undefined;\n const elevatedClient = typeof $wixContext !== 'undefined'\n ? $wixContext.elevatedClient\n : typeof wixContext.elevatedClient !== 'undefined'\n ? wixContext.elevatedClient\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.elevatedClient\n : undefined;\n if (!contextualClient && !elevatedClient) {\n return;\n }\n return {\n initWixModules(wixModules, elevated) {\n if (elevated) {\n if (!elevatedClient) {\n throw new Error('An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules');\n }\n return runWithoutContext(() => elevatedClient.use(wixModules));\n }\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return runWithoutContext(() => contextualClient.use(wixModules));\n },\n fetchWithAuth: (urlOrRequest, requestInit) => {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.fetchWithAuth(urlOrRequest, requestInit);\n },\n async graphql(query, variables, opts) {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.graphql(query, variables, opts);\n },\n };\n}\nexport function contextualizeHostModule(hostModule, prop) {\n return (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(hostModule)[prop].apply(undefined, args);\n };\n}\nexport function contextualizeRESTModule(restModule, expectedArgsLength) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(restModule, args[expectedArgsLength]?.suppressAuth ? true : false)\n .apply(undefined, args);\n });\n}\nexport function contextualizeEventDefinitionModule(eventDefinition) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n}\nexport function contextualizeSerivcePluginModule(servicePlugin) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n}\nexport * from './context-v2.js';\nexport function runWithoutContext(fn) {\n const globalContext = globalThis.__wix_context__;\n const moduleContext = {\n client: wixContext.client,\n elevatedClient: wixContext.elevatedClient,\n };\n let closureContext;\n globalThis.__wix_context__ = undefined;\n wixContext.client = undefined;\n wixContext.elevatedClient = undefined;\n if (typeof $wixContext !== 'undefined') {\n closureContext = {\n client: $wixContext?.client,\n elevatedClient: $wixContext?.elevatedClient,\n };\n delete $wixContext.client;\n delete $wixContext.elevatedClient;\n }\n try {\n return fn();\n }\n finally {\n globalThis.__wix_context__ = globalContext;\n wixContext.client = moduleContext.client;\n wixContext.elevatedClient = moduleContext.elevatedClient;\n if (typeof $wixContext !== 'undefined') {\n $wixContext.client = closureContext.client;\n $wixContext.elevatedClient = closureContext.elevatedClient;\n }\n }\n}\n","import { EventDefinition, ServicePluginDefinition, } from '@wix/sdk-types';\nimport { resolveContext } from './context.js';\nexport { EventDefinition, ServicePluginDefinition, };\nexport function contextualizeHostModuleV2(hostModule, props) {\n return {\n ...hostModule,\n ...Object.fromEntries(props.map((prop) => [\n prop,\n (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(hostModule)[prop].apply(undefined, args);\n },\n ])),\n };\n}\nexport function contextualizeRESTModuleV2(restModule, elevated) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n // @ts-expect-error - if there is no context, we want to behave like the original module\n return restModule.apply(undefined, args);\n }\n return (context\n .initWixModules(restModule, elevated)\n // @ts-expect-error - we know the args here are meant to be passed to the initalized module\n .apply(undefined, args));\n });\n}\nexport function contextualizeEventDefinitionModuleV2(eventDefinition) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n contextualMethod.__type = eventDefinition.__type;\n contextualMethod.type = eventDefinition.type;\n contextualMethod.isDomainEvent = eventDefinition.isDomainEvent;\n contextualMethod.transformations = eventDefinition.transformations;\n return contextualMethod;\n}\nexport function contextualizeSerivcePluginModuleV2(servicePlugin) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n contextualMethod.__type = servicePlugin.__type;\n contextualMethod.componentType = servicePlugin.componentType;\n contextualMethod.methods = servicePlugin.methods;\n return contextualMethod;\n}\n"],"mappings":"AAAA,OAAS,cAAAA,MAAkB,mBCmBpB,SAASC,EAA0BC,EAAYC,EAAU,CAC5D,MAAQ,IAAIC,IAAS,CACjB,IAAMC,EAAUC,EAAe,EAC/B,OAAKD,EAIGA,EACH,eAAeH,EAAYC,CAAQ,EAEnC,MAAM,OAAWC,CAAI,EALfF,EAAW,MAAM,OAAWE,CAAI,CAM/C,CACJ,CD9BO,SAASG,GAAiB,CAC7B,IAAMC,EAAa,OAAO,YAAgB,KAAe,YAAY,eAC/D,YAAY,eACZ,OAAO,WAAW,gBAAoB,KACpC,WAAW,gBAAgB,eACzB,WAAW,gBAAgB,eAC3B,OACV,GAAIA,EACA,MAAO,CAEH,eAAeC,EAASC,EAAU,CAC9B,OAAOC,EAAkB,IAAMH,EAAWC,EAASC,CAAQ,CAAC,CAChE,EACA,eAAgB,CACZ,MAAM,IAAI,MAAM,gDAAgD,CACpE,EACA,SAAU,CACN,MAAM,IAAI,MAAM,0CAA0C,CAC9D,CACJ,EAEJ,IAAME,EAAmB,OAAO,YAAgB,IAC1C,YAAY,OACZ,OAAOC,EAAW,OAAW,IACzBA,EAAW,OACX,OAAO,WAAW,gBAAoB,IAClC,WAAW,gBAAgB,OAC3B,OACRC,EAAiB,OAAO,YAAgB,IACxC,YAAY,eACZ,OAAOD,EAAW,eAAmB,IACjCA,EAAW,eACX,OAAO,WAAW,gBAAoB,IAClC,WAAW,gBAAgB,eAC3B,OACd,GAAI,GAACD,GAAoB,CAACE,GAG1B,MAAO,CACH,eAAeC,EAAYL,EAAU,CACjC,GAAIA,EAAU,CACV,GAAI,CAACI,EACD,MAAM,IAAI,MAAM,2JAA2J,EAE/K,OAAOH,EAAkB,IAAMG,EAAe,IAAIC,CAAU,CAAC,CACjE,CACA,GAAI,CAACH,EACD,MAAM,IAAI,MAAM,gGAAgG,EAEpH,OAAOD,EAAkB,IAAMC,EAAiB,IAAIG,CAAU,CAAC,CACnE,EACA,cAAe,CAACC,EAAcC,IAAgB,CAC1C,GAAI,CAACL,EACD,MAAM,IAAI,MAAM,gGAAgG,EAEpH,OAAOA,EAAiB,cAAcI,EAAcC,CAAW,CACnE,EACA,MAAM,QAAQC,EAAOC,EAAWC,EAAM,CAClC,GAAI,CAACR,EACD,MAAM,IAAI,MAAM,gGAAgG,EAEpH,OAAOA,EAAiB,QAAQM,EAAOC,EAAWC,CAAI,CAC1D,CACJ,CACJ,CAwCO,SAASC,EAAkBC,EAAI,CAClC,IAAMC,EAAgB,WAAW,gBAC3BC,EAAgB,CAClB,OAAQC,EAAW,OACnB,eAAgBA,EAAW,cAC/B,EACIC,EACJ,WAAW,gBAAkB,OAC7BD,EAAW,OAAS,OACpBA,EAAW,eAAiB,OACxB,OAAO,YAAgB,MACvBC,EAAiB,CACb,OAAQ,aAAa,OACrB,eAAgB,aAAa,cACjC,EACA,OAAO,YAAY,OACnB,OAAO,YAAY,gBAEvB,GAAI,CACA,OAAOJ,EAAG,CACd,QACA,CACI,WAAW,gBAAkBC,EAC7BE,EAAW,OAASD,EAAc,OAClCC,EAAW,eAAiBD,EAAc,eACtC,OAAO,YAAgB,MACvB,YAAY,OAASE,EAAe,OACpC,YAAY,eAAiBA,EAAe,eAEpD,CACJ","names":["wixContext","contextualizeRESTModuleV2","restModule","elevated","args","context","resolveContext","resolveContext","oldContext","modules","elevated","runWithoutContext","contextualClient","wixContext","elevatedClient","wixModules","urlOrRequest","requestInit","query","variables","opts","runWithoutContext","fn","globalContext","moduleContext","wixContext","closureContext"]}
@@ -1,2 +1,2 @@
1
- import{c as g}from"./chunk-42XIZ4MH.js";import{a as A,b as M,d as R}from"./chunk-7EYXEF6M.js";import{f as H}from"./chunk-SBZEOPXX.js";R();import{wixContext as G}from"@wix/sdk-context";var F=e=>{switch(e){case"get":case"GET":return"GET";case"post":case"POST":return"POST";case"put":case"PUT":return"PUT";case"delete":case"DELETE":return"DELETE";case"patch":case"PATCH":return"PATCH";case"head":case"HEAD":return"HEAD";case"options":case"OPTIONS":return"OPTIONS";default:throw new Error(`Unknown method: ${e}`)}},I=e=>s=>async n=>{let d,r=t=>{if(d=e(n)(t),d.url===void 0)throw new Error("Url was not successfully created for this request, please reach out to support channels for assistance.");let{method:i,url:a,params:p}=d;return{...d,method:F(i),url:a,data:d.data,params:p}};try{let t=await s.request(r);if(d===void 0)throw new Error("Request options were not created for this request, please reach out to support channels for assistance.");let i=Array.isArray(d.transformResponse)?d.transformResponse:[d.transformResponse],a=t.data;return i.forEach(p=>{p&&(a=p(t.data,t.headers))}),a}catch(t){throw typeof t=="object"&&t!==null&&"response"in t&&typeof t.response=="object"&&t.response!==null&&"data"in t.response?t.response.data:t}},U=e=>e.__isAmbassador?!0:!!e().__isAmbassador;var j="__metadata",x="www.wixapis.com";var _=class extends Error{constructor(n,d){super(n);H(this,"message");H(this,"response");this.message=n,this.response=d}async details(){let n=await this.response.json();return X(this.response.status,n?.message,n?.details,{requestId:this.response.headers.get("X-Wix-Request-Id"),details:n})}},X=(e,s,n,d)=>({details:{...!n?.validationError&&{applicationError:{description:s,code:e,data:d}},...n},message:s,requestId:d?.requestId});var S=e=>e?.method&&["post","put","patch"].includes(e.method.toLocaleLowerCase())&&e.body?{"Content-Type":"application/json"}:{},W=e=>e&&typeof e=="object"&&!Array.isArray(e);var L=e=>e.__type==="host";function $(e,s){return e.create(s)}var V="x-wix-bi-gateway";function q(e,s,n){return{[V]:Y({environment:`js-sdk${n?`-${n}`:""}`,"package-name":e.packageName??s?.PACKAGE_NAME,"method-fqn":e.methodFqn,entity:e.entityFqdn})}}function Y(e){return Object.entries(e).filter(([s,n])=>!!n).map(([s,n])=>`${s}=${n}`).join(",")}function J(e,s,n,d,r,t,i){return g(()=>e({request:async a=>{let p=a({host:t?.HTTPHost||x}),c=p;c.method==="GET"&&c.fallback?.length&&c.params.toString().length>4e3&&(c=p.fallback[0]);let E=`https://${t?.HTTPHost??x}${c.url}`;c.params&&c.params.toString()&&(E+=`?${c.params.toString()}`);try{let u=q(p,s,i),o=await n(E,{method:c.method,...c.data&&{body:JSON.stringify(c.data)},headers:{...u}});if(o.status!==200){let h=null;try{h=await o.json()}catch{}throw z(o.status,h?.message,h?.details,{requestId:o.headers.get("X-Wix-Request-Id"),details:h})}return{data:await o.json(),headers:o.headers,status:o.status,statusText:o.statusText}}catch(u){throw u.message?.includes("fetch is not defined")&&console.error("Node.js v18+ is required"),u}},fetchWithAuth:n,wixAPIFetch:d,getActiveToken:r}))}var z=(e,s,n,d)=>({response:{data:{details:{...!n?.validationError&&{applicationError:{description:s,code:e,data:d}},...n},message:s},status:e},responseId:d?.requestId});R();function v(){return{emit(e,...s){for(let n=0,d=this.events[e]||[],r=d.length;n<r;n++)d[n](...s)},events:{},on(e,s){return(this.events[e]||=[]).push(s),()=>{this.events[e]=this.events[e]?.filter(n=>s!==n)}}}}var N=e=>e.__type==="event-definition";function O(e,s,n,d){let r;if(e.isDomainEvent){let i=n,{deletedEvent:a,actionEvent:p,createdEvent:c,updatedEvent:f,...E}=i,u={...d,...E};a?a?.deletedEntity?r={entity:a?.deletedEntity,metadata:u}:r={metadata:u}:p?r={data:p.body,metadata:u}:r={entity:c?.entity??f?.currentEntity,metadata:u}}else r={data:n,metadata:d};let t=e.transformations??(i=>i);return s(t(r))}function k(e){let s=new Map,n=v(),d={...n,getRegisteredEvents:()=>s,async process(r,t={expectedEvents:[]}){let{eventType:i,identity:a,instanceId:p,payload:c}=await this.parseJWT(r),f=[...t.expectedEvents,...Array.from(s.keys()).map(u=>({type:u}))];if(f.length>0&&!f.some(({type:u})=>u===i))throw new Error(`Unexpected event type: ${i}. Expected one of: ${f.map(u=>u.type).join(", ")}`);let E=s.get(i)??[];return await Promise.all(E.map(({eventDefinition:u,handler:o})=>O(u,o,c,{instanceId:p,identity:a}))),{instanceId:p,eventType:i,payload:c,identity:a}},async processRequest(r,t){let i=await r.text();return this.process(i,t)},async parseJWT(r){if(!e.decodeJWT)throw new Error("decodeJWT is not supported by the authentication strategy");let{decoded:t,valid:i}=await e.decodeJWT(r);if(!i)throw new Error("JWT is not valid");if(typeof t.data!="string")throw new Error(`Unexpected type of JWT data: expected string, got ${typeof t.data}`);let a=JSON.parse(t.data),p=a.eventType,c=a.instanceId,f=a.identity?JSON.parse(a.identity):void 0,E=JSON.parse(a.data);return{instanceId:c,eventType:p,payload:E,identity:f}},async parseRequest(r){let t=await r.text();return this.parseJWT(t)},async executeHandlers(r){let t=Array.from(s.keys()).map(a=>({type:a}));if(t.length>0&&!t.some(({type:a})=>a===r.eventType))throw new Error(`Unexpected event type: ${r.eventType}. Expected one of: ${t.map(a=>a.type).join(", ")}`);let i=s.get(r.eventType)??[];await Promise.all(i.map(({eventDefinition:a,handler:p})=>O(a,p,r.payload,{instanceId:r.instanceId,identity:r.identity})))},apps:{AppInstalled:A("AppInstalled")(),AppRemoved:A("AppRemoved")()}};return{initModule(r){return t=>{let i=s.get(r.type)??[];i.push({eventDefinition:r,handler:t}),s.set(r.type,i),n.emit("registered",r)}},client:d}}var B=e=>e.__type==="service-plugin-definition";function D(e){let s=new Map,n=v(),d={...n,getRegisteredServicePlugins:()=>s,async parseJWT(r){if(!e.decodeJWT)throw new Error("decodeJWT is not supported by the authentication strategy");let{decoded:t,valid:i}=await e.decodeJWT(r,!0);if(!i)throw new Error("JWT is not valid");if(typeof t.data!="object"||t.data===null||!("metadata"in t.data)||typeof t.data.metadata!="object"||t.data.metadata===null||!("appExtensionType"in t.data.metadata)||typeof t.data.metadata.appExtensionType!="string")throw new Error("Unexpected JWT data: expected object with metadata.appExtensionType string");return t.data},async process(r){let t=await this.parseJWT(r.body);return this.executeHandler(t,r.url)},async parseRequest(r){let t=await r.text();return this.parseJWT(t)},async processRequest(r){let t=r.url,i=await r.text();try{let a=await this.process({url:t,body:i});return Response.json(a)}catch(a){if(a.errorType==="SPI"&&a.applicationCode&&a.httpCode)return Response.json({applicationError:{code:a.applicationCode,data:a.data}},{status:a.httpCode});throw a}},async executeHandler(r,t){let i=r.metadata.appExtensionType.toLowerCase(),a=s.get(i)??[];if(a.length===0)throw new Error(`No service plugin implementations found for component type ${i}`);if(a.length>1)throw new Error(`Multiple service plugin implementations found for component type ${i}. This is currently not supported`);let{implementation:p,servicePluginDefinition:c}=a[0],f=c.methods.find(u=>t.endsWith(u.primaryHttpMappingPath));if(!f)throw new Error("Unexpect request: request url did not match any method: "+t);let E=p[f.name];if(!E)throw new Error(`Got request for service plugin method ${f.name} but no implementation was provided. Available methods: ${Object.keys(p).join(", ")}`);return f.transformations.toREST(await E(f.transformations.fromREST(r)))}};return{initModule(r){return t=>{let i=s.get(r.componentType.toLowerCase())??[];i.push({servicePluginDefinition:r,implementation:t}),s.set(r.componentType.toLowerCase(),i),n.emit("registered",r)}},client:d}}var T="X-Wix-Consistent";function He(e){let s=e.headers||{Authorization:""},n=e.auth||{getAuthHeaders:o=>Promise.resolve({headers:{}})},d=n.getAuthHeaders.bind(void 0,e.host);n.getAuthHeaders=d;let r=async(o,l)=>{let h=await d(),m={...l?.headers??{},...h.headers,...s[T]?{[T]:s[T]}:{}};if(typeof o=="string"||o instanceof URL){let y=await fetch(o,{...l,headers:m}),w=P(y);return w&&(s[T]=w),y}else{for(let[b,C]of Object.entries(m))typeof C=="string"&&o.headers.set(b,C);let y=await fetch(o,l),w=P(y);return w&&(s[T]=w),y}},{client:t,initModule:i}=D(n),{client:a,initModule:p}=k(n),c=async(o,l)=>{let h=await d(),m=S(l),y=await fetch(o,{...l,headers:{...m,...s,...h?.headers,...l?.headers,...e.host?.essentials?.passThroughHeaders}}),w=P(y);return w&&(s[T]=w),y},f=(o,l)=>{if(N(o))return p(o);if(B(o))return i(o);if(L(o)&&e.host)return $(o,e.host);if(typeof o=="function"){if("__type"in o&&o.__type===M)return o;let h=e.host?.apiBaseUrl??x;return J(g(()=>U(o))?I(o):o,l??{},c,(m,y)=>{let w=new URL(m,`https://${h}`);return w.host=h,w.protocol="https",c(w.toString(),y)},n.getActiveToken,{HTTPHost:h},e.host?.name)}else return W(o)?Object.fromEntries(Object.entries(o).map(([h,m])=>[h,f(m,o[j])])):o},E=o=>{for(let l in o)s[l]=o[l]};return{...e.modules?f(e.modules):{},auth:n,setHeaders:E,use:f,enableContext(o,l={elevated:!1}){o==="global"?globalThis.__wix_context__!=null?l.elevated?globalThis.__wix_context__.elevatedClient=this:globalThis.__wix_context__.client=this:l.elevated?globalThis.__wix_context__={elevatedClient:this}:globalThis.__wix_context__={client:this}:l.elevated?G.elevatedClient=this:G.client=this},fetch:(o,l)=>{let h=e.host?.apiBaseUrl??x,m=new URL(o,`https://${h}`);return m.host=h,m.protocol="https",c(m.toString(),l)},fetchWithAuth:r,async graphql(o,l,h={apiVersion:"alpha"}){let m=e?.host?.apiBaseUrl??x,y=await c(`https://${m}/graphql/${h.apiVersion}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:o,variables:l})});if(y.status!==200)throw new _(`GraphQL request failed with status ${y.status}`,y);let{data:w,errors:b}=await y.json();return{data:w??{},errors:b}},webhooks:a,servicePlugins:t}}function P(e){return e.headers?.get(T)??e.headers?.get(T.toLowerCase())}export{He as a};
2
- //# sourceMappingURL=chunk-3WHQP2RD.js.map
1
+ import{b as g}from"./chunk-BGTZ3RNN.js";import{a as A,b as M,d as R}from"./chunk-7EYXEF6M.js";import{f as H}from"./chunk-SBZEOPXX.js";R();import{wixContext as G}from"@wix/sdk-context";var F=e=>{switch(e){case"get":case"GET":return"GET";case"post":case"POST":return"POST";case"put":case"PUT":return"PUT";case"delete":case"DELETE":return"DELETE";case"patch":case"PATCH":return"PATCH";case"head":case"HEAD":return"HEAD";case"options":case"OPTIONS":return"OPTIONS";default:throw new Error(`Unknown method: ${e}`)}},I=e=>s=>async n=>{let d,r=t=>{if(d=e(n)(t),d.url===void 0)throw new Error("Url was not successfully created for this request, please reach out to support channels for assistance.");let{method:i,url:a,params:p}=d;return{...d,method:F(i),url:a,data:d.data,params:p}};try{let t=await s.request(r);if(d===void 0)throw new Error("Request options were not created for this request, please reach out to support channels for assistance.");let i=Array.isArray(d.transformResponse)?d.transformResponse:[d.transformResponse],a=t.data;return i.forEach(p=>{p&&(a=p(t.data,t.headers))}),a}catch(t){throw typeof t=="object"&&t!==null&&"response"in t&&typeof t.response=="object"&&t.response!==null&&"data"in t.response?t.response.data:t}},U=e=>e.__isAmbassador?!0:!!e().__isAmbassador;var j="__metadata",x="www.wixapis.com";var _=class extends Error{constructor(n,d){super(n);H(this,"message");H(this,"response");this.message=n,this.response=d}async details(){let n=await this.response.json();return X(this.response.status,n?.message,n?.details,{requestId:this.response.headers.get("X-Wix-Request-Id"),details:n})}},X=(e,s,n,d)=>({details:{...!n?.validationError&&{applicationError:{description:s,code:e,data:d}},...n},message:s,requestId:d?.requestId});var S=e=>e?.method&&["post","put","patch"].includes(e.method.toLocaleLowerCase())&&e.body?{"Content-Type":"application/json"}:{},W=e=>e&&typeof e=="object"&&!Array.isArray(e);var L=e=>e.__type==="host";function $(e,s){return e.create(s)}var V="x-wix-bi-gateway";function q(e,s,n){return{[V]:Y({environment:`js-sdk${n?`-${n}`:""}`,"package-name":e.packageName??s?.PACKAGE_NAME,"method-fqn":e.methodFqn,entity:e.entityFqdn})}}function Y(e){return Object.entries(e).filter(([s,n])=>!!n).map(([s,n])=>`${s}=${n}`).join(",")}function J(e,s,n,d,r,t,i){return g(()=>e({request:async a=>{let p=a({host:t?.HTTPHost||x}),c=p;c.method==="GET"&&c.fallback?.length&&c.params.toString().length>4e3&&(c=p.fallback[0]);let E=`https://${t?.HTTPHost??x}${c.url}`;c.params&&c.params.toString()&&(E+=`?${c.params.toString()}`);try{let u=q(p,s,i),o=await n(E,{method:c.method,...c.data&&{body:JSON.stringify(c.data)},headers:{...u}});if(o.status!==200){let h=null;try{h=await o.json()}catch{}throw z(o.status,h?.message,h?.details,{requestId:o.headers.get("X-Wix-Request-Id"),details:h})}return{data:await o.json(),headers:o.headers,status:o.status,statusText:o.statusText}}catch(u){throw u.message?.includes("fetch is not defined")&&console.error("Node.js v18+ is required"),u}},fetchWithAuth:n,wixAPIFetch:d,getActiveToken:r}))}var z=(e,s,n,d)=>({response:{data:{details:{...!n?.validationError&&{applicationError:{description:s,code:e,data:d}},...n},message:s},status:e},responseId:d?.requestId});R();function v(){return{emit(e,...s){for(let n=0,d=this.events[e]||[],r=d.length;n<r;n++)d[n](...s)},events:{},on(e,s){return(this.events[e]||=[]).push(s),()=>{this.events[e]=this.events[e]?.filter(n=>s!==n)}}}}var N=e=>e.__type==="event-definition";function O(e,s,n,d){let r;if(e.isDomainEvent){let i=n,{deletedEvent:a,actionEvent:p,createdEvent:c,updatedEvent:f,...E}=i,u={...d,...E};a?a?.deletedEntity?r={entity:a?.deletedEntity,metadata:u}:r={metadata:u}:p?r={data:p.body,metadata:u}:r={entity:c?.entity??f?.currentEntity,metadata:u}}else r={data:n,metadata:d};let t=e.transformations??(i=>i);return s(t(r))}function k(e){let s=new Map,n=v(),d={...n,getRegisteredEvents:()=>s,async process(r,t={expectedEvents:[]}){let{eventType:i,identity:a,instanceId:p,payload:c}=await this.parseJWT(r),f=[...t.expectedEvents,...Array.from(s.keys()).map(u=>({type:u}))];if(f.length>0&&!f.some(({type:u})=>u===i))throw new Error(`Unexpected event type: ${i}. Expected one of: ${f.map(u=>u.type).join(", ")}`);let E=s.get(i)??[];return await Promise.all(E.map(({eventDefinition:u,handler:o})=>O(u,o,c,{instanceId:p,identity:a}))),{instanceId:p,eventType:i,payload:c,identity:a}},async processRequest(r,t){let i=await r.text();return this.process(i,t)},async parseJWT(r){if(!e.decodeJWT)throw new Error("decodeJWT is not supported by the authentication strategy");let{decoded:t,valid:i}=await e.decodeJWT(r);if(!i)throw new Error("JWT is not valid");if(typeof t.data!="string")throw new Error(`Unexpected type of JWT data: expected string, got ${typeof t.data}`);let a=JSON.parse(t.data),p=a.eventType,c=a.instanceId,f=a.identity?JSON.parse(a.identity):void 0,E=JSON.parse(a.data);return{instanceId:c,eventType:p,payload:E,identity:f}},async parseRequest(r){let t=await r.text();return this.parseJWT(t)},async executeHandlers(r){let t=Array.from(s.keys()).map(a=>({type:a}));if(t.length>0&&!t.some(({type:a})=>a===r.eventType))throw new Error(`Unexpected event type: ${r.eventType}. Expected one of: ${t.map(a=>a.type).join(", ")}`);let i=s.get(r.eventType)??[];await Promise.all(i.map(({eventDefinition:a,handler:p})=>O(a,p,r.payload,{instanceId:r.instanceId,identity:r.identity})))},apps:{AppInstalled:A("AppInstalled")(),AppRemoved:A("AppRemoved")()}};return{initModule(r){return t=>{let i=s.get(r.type)??[];i.push({eventDefinition:r,handler:t}),s.set(r.type,i),n.emit("registered",r)}},client:d}}var B=e=>e.__type==="service-plugin-definition";function D(e){let s=new Map,n=v(),d={...n,getRegisteredServicePlugins:()=>s,async parseJWT(r){if(!e.decodeJWT)throw new Error("decodeJWT is not supported by the authentication strategy");let{decoded:t,valid:i}=await e.decodeJWT(r,!0);if(!i)throw new Error("JWT is not valid");if(typeof t.data!="object"||t.data===null||!("metadata"in t.data)||typeof t.data.metadata!="object"||t.data.metadata===null||!("appExtensionType"in t.data.metadata)||typeof t.data.metadata.appExtensionType!="string")throw new Error("Unexpected JWT data: expected object with metadata.appExtensionType string");return t.data},async process(r){let t=await this.parseJWT(r.body);return this.executeHandler(t,r.url)},async parseRequest(r){let t=await r.text();return this.parseJWT(t)},async processRequest(r){let t=r.url,i=await r.text();try{let a=await this.process({url:t,body:i});return Response.json(a)}catch(a){if(a.errorType==="SPI"&&a.applicationCode&&a.httpCode)return Response.json({applicationError:{code:a.applicationCode,data:a.data}},{status:a.httpCode});throw a}},async executeHandler(r,t){let i=r.metadata.appExtensionType.toLowerCase(),a=s.get(i)??[];if(a.length===0)throw new Error(`No service plugin implementations found for component type ${i}`);if(a.length>1)throw new Error(`Multiple service plugin implementations found for component type ${i}. This is currently not supported`);let{implementation:p,servicePluginDefinition:c}=a[0],f=c.methods.find(u=>t.endsWith(u.primaryHttpMappingPath));if(!f)throw new Error("Unexpect request: request url did not match any method: "+t);let E=p[f.name];if(!E)throw new Error(`Got request for service plugin method ${f.name} but no implementation was provided. Available methods: ${Object.keys(p).join(", ")}`);return f.transformations.toREST(await E(f.transformations.fromREST(r)))}};return{initModule(r){return t=>{let i=s.get(r.componentType.toLowerCase())??[];i.push({servicePluginDefinition:r,implementation:t}),s.set(r.componentType.toLowerCase(),i),n.emit("registered",r)}},client:d}}var T="X-Wix-Consistent";function He(e){let s=e.headers||{Authorization:""},n=e.auth||{getAuthHeaders:o=>Promise.resolve({headers:{}})},d=n.getAuthHeaders.bind(void 0,e.host);n.getAuthHeaders=d;let r=async(o,l)=>{let h=await d(),m={...l?.headers??{},...h.headers,...s[T]?{[T]:s[T]}:{}};if(typeof o=="string"||o instanceof URL){let y=await fetch(o,{...l,headers:m}),w=P(y);return w&&(s[T]=w),y}else{for(let[b,C]of Object.entries(m))typeof C=="string"&&o.headers.set(b,C);let y=await fetch(o,l),w=P(y);return w&&(s[T]=w),y}},{client:t,initModule:i}=D(n),{client:a,initModule:p}=k(n),c=async(o,l)=>{let h=await d(),m=S(l),y=await fetch(o,{...l,headers:{...m,...s,...h?.headers,...l?.headers,...e.host?.essentials?.passThroughHeaders}}),w=P(y);return w&&(s[T]=w),y},f=(o,l)=>{if(N(o))return p(o);if(B(o))return i(o);if(L(o)&&e.host)return $(o,e.host);if(typeof o=="function"){if("__type"in o&&o.__type===M)return o;let h=e.host?.apiBaseUrl??x;return J(g(()=>U(o))?I(o):o,l??{},c,(m,y)=>{let w=new URL(m,`https://${h}`);return w.host=h,w.protocol="https",c(w.toString(),y)},n.getActiveToken,{HTTPHost:h},e.host?.name)}else return W(o)?Object.fromEntries(Object.entries(o).map(([h,m])=>[h,f(m,o[j])])):o},E=o=>{for(let l in o)s[l]=o[l]};return{...e.modules?f(e.modules):{},auth:n,setHeaders:E,use:f,enableContext(o,l={elevated:!1}){o==="global"?globalThis.__wix_context__!=null?l.elevated?globalThis.__wix_context__.elevatedClient=this:globalThis.__wix_context__.client=this:l.elevated?globalThis.__wix_context__={elevatedClient:this}:globalThis.__wix_context__={client:this}:l.elevated?G.elevatedClient=this:G.client=this},fetch:(o,l)=>{let h=e.host?.apiBaseUrl??x,m=new URL(o,`https://${h}`);return m.host=h,m.protocol="https",c(m.toString(),l)},fetchWithAuth:r,async graphql(o,l,h={apiVersion:"alpha"}){let m=e?.host?.apiBaseUrl??x,y=await c(`https://${m}/graphql/${h.apiVersion}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:o,variables:l})});if(y.status!==200)throw new _(`GraphQL request failed with status ${y.status}`,y);let{data:w,errors:b}=await y.json();return{data:w??{},errors:b}},webhooks:a,servicePlugins:t}}function P(e){return e.headers?.get(T)??e.headers?.get(T.toLowerCase())}export{He as a};
2
+ //# sourceMappingURL=chunk-MM2KVUBI.js.map
@@ -1,2 +1,2 @@
1
- import{a as N,b as q}from"./chunk-MQEY2AKT.js";import{a as K}from"./chunk-3WHQP2RD.js";import"./chunk-42XIZ4MH.js";import"./chunk-7EYXEF6M.js";import"./chunk-SBZEOPXX.js";function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(null,arguments)}import He,{useEffect as Le,useState as ge}from"react";function w(e){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(e)}function J(e,t){if(w(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(w(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G(e){var t=J(e,"string");return w(t)=="symbol"?t:t+""}function Q(e,t,n){return(t=G(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=class extends Error{constructor(t){let{message:n,code:r}=t;super(n),Q(this,"code",void 0),this.message=n,this.code=r}};var $=()=>{let e=u=>{let{channel:o}=u;return function(){let f=o.showToast(...arguments);return{remove:()=>Promise.resolve(f).then(h=>h.remove())}}},t=u=>{let{channel:o}=u;return function(){let f=o.observeState(...arguments);return{disconnect:()=>Promise.resolve(f).then(h=>h.disconnect())}}};return{showToast:e,observeState:t,navigate:u=>{let{channel:o}=u;return function(){return o.navigate(...arguments)}},navigateBack:u=>{let{channel:o}=u;return()=>o.navigateBack()},openModal:u=>{let{channel:o}=u;return(f,g)=>{let[h,A]=typeof f=="string"?[f,g]:[f.modalId,f.params],E=o.openModal(h,A);return{modalClosed:Promise.resolve(E).then(y=>y.modalClosed)}}},closeModal:u=>{let{channel:o}=u;return f=>{if(f===void 0)return o.closeModal();let g=JSON.parse(JSON.stringify(f));return o.closeModal(g)}},getAccessToken:u=>{let{channel:o}=u;return()=>o.getAccessToken()},getPageUrl:u=>{let{channel:o}=u;return function(){return o.getPageUrl(...arguments)}},openMediaManager:u=>{let{channel:o}=u;return function(){return o.openMediaManager(...arguments)}},addSitePlugin:u=>{let{channel:o}=u;return(f,g)=>{let h="802c76e4-b381-4bb3-9152-96acabbf3194",A=g?.placement||{},E=o.openModal(h,{...A,pluginId:f,action:"populate"});return Promise.resolve(E).then(y=>y.modalClosed).then(y=>{if(y?.type===void 0)throw new S({message:"Aborted by user",code:3006});if(y?.type==="ERROR")throw new S(y.data.error)})}},onBeforeUnload:u=>{let{channel:o}=u;return function(){return o.onBeforeUnload(...arguments)}},setPageTitle:u=>{let{channel:o}=u;return f=>o.setPageTitle(f)},getLanguage:u=>{let o=null;return async()=>{var f;if(o)return o;let g=null;return o=await new Promise(h=>{g=t(u)((A,E)=>{h(E.language)})}),(f=g)==null||f.disconnect(),o}},requestFeedback:u=>{let{channel:o}=u;return function(){return o.requestFeedback(...arguments)}},onLayerStateChange:u=>{let{channel:o}=u;return function(){let f=o.onLayerStateChange(...arguments);return{remove:()=>Promise.resolve(f).then(h=>h.remove())}}},installApp:u=>{let{channel:o}=u;return o.installApp},getWidget:u=>{let{channel:o}=u;return function(){if("getWidget"in o)return o.getWidget(...arguments);throw new Error("Unsupported")}},getDashboardPlugins:u=>{let{channel:o}=u;return function(){if("getDashboardPlugins"in o)return o.getDashboardPlugins(...arguments);throw new Error("Unsupported")}},getDashboardMenuPlugins:u=>{let{channel:o}=u;return function(){if("getDashboardMenuPlugins"in o)return o.getDashboardMenuPlugins(...arguments);throw new Error("Unsupported")}}}};var X=e=>{let{createHost:t}=e,n=$();return{...N(n),host:t,auth:()=>({getAuthHeaders:async r=>({headers:{Authorization:await n.getAccessToken(r)()}})})}};var Z=Symbol("Comlink.proxy"),ye=Symbol("Comlink.endpoint"),D=Symbol("Comlink.releaseProxy"),L=Symbol("Comlink.thrown"),ee=e=>typeof e=="object"&&e!==null||typeof e=="function",be={canHandle:e=>ee(e)&&e[Z],serialize(e){let{port1:t,port2:n}=new MessageChannel;return _(e,t),[n,[n]]},deserialize(e){return e.start(),B(e)}},we={canHandle:e=>ee(e)&&L in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},te=new Map([["proxy",be],["throw",we]]);function _(e,t=self){t.addEventListener("message",function n(r){if(!r||!r.data)return;let{id:s,type:a,path:c}=Object.assign({path:[]},r.data),i=(r.data.argumentList||[]).map(P),l;try{let d=c.slice(0,-1).reduce((m,b)=>m[b],e),p=c.reduce((m,b)=>m[b],e);switch(a){case 0:l=p;break;case 1:d[c.slice(-1)[0]]=P(r.data.value),l=!0;break;case 2:l=p.apply(d,i);break;case 3:{let m=new p(...i);l=k(m)}break;case 4:{let{port1:m,port2:b}=new MessageChannel;_(e,b),l=ve(m,[m])}break;case 5:l=void 0;break}}catch(d){l={value:d,[L]:0}}Promise.resolve(l).catch(d=>({value:d,[L]:0})).then(d=>{let[p,m]=W(d);t.postMessage(Object.assign(Object.assign({},p),{id:s}),m),a===5&&(t.removeEventListener("message",n),ne(t))})}),t.start&&t.start()}function Pe(e){return e.constructor.name==="MessagePort"}function ne(e){Pe(e)&&e.close()}function B(e,t){return R(e,[],t)}function C(e){if(e)throw new Error("Proxy has been released and is not useable")}function R(e,t=[],n=function(){}){let r=!1,s=new Proxy(n,{get(a,c){if(C(r),c===D)return()=>v(e,{type:5,path:t.map(i=>i.toString())}).then(()=>{ne(e),r=!0});if(c==="then"){if(t.length===0)return{then:()=>s};let i=v(e,{type:0,path:t.map(l=>l.toString())}).then(P);return i.then.bind(i)}return R(e,[...t,c])},set(a,c,i){C(r);let[l,d]=W(i);return v(e,{type:1,path:[...t,c].map(p=>p.toString()),value:l},d).then(P)},apply(a,c,i){C(r);let l=t[t.length-1];if(l===ye)return v(e,{type:4}).then(P);if(l==="bind")return R(e,t.slice(0,-1));let[d,p]=Y(i);return v(e,{type:2,path:t.map(m=>m.toString()),argumentList:d},p).then(P)},construct(a,c){C(r);let[i,l]=Y(c);return v(e,{type:3,path:t.map(d=>d.toString()),argumentList:i},l).then(P)}});return s}function xe(e){return Array.prototype.concat.apply([],e)}function Y(e){let t=e.map(W);return[t.map(n=>n[0]),xe(t.map(n=>n[1]))]}var re=new WeakMap;function ve(e,t){return re.set(e,t),e}function k(e){return Object.assign(e,{[Z]:!0})}function W(e){for(let[t,n]of te)if(n.canHandle(e)){let[r,s]=n.serialize(e);return[{type:3,name:t,value:r},s]}return[{type:0,value:e},re.get(e)||[]]}function P(e){switch(e.type){case 3:return te.get(e.name).deserialize(e.value);case 0:return e.value}}function v(e,t,n){return new Promise(r=>{let s=Me();e.addEventListener("message",function a(c){!c.data||!c.data.id||c.data.id!==s||(e.removeEventListener("message",a),r(c.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:s},t),n)})}function Me(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var T="__proxyCallbackId__wixSDK__",I="__proxyPromiseId__wixSDK__",se=e=>Se(e,t=>async function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];let[a,c]=j(r),i=await t(k(a),c);return ae(i)});var Ee=async e=>{let[t,n]=j(await e);return k({proxies:t,clonables:n})},ae=async e=>H(e?.proxies,await e?.clonables),j=e=>{let t=(s,a)=>{if(ie(a)){let c=oe();return s.promises[c]=a,{[I]:c}}if(ke(a)){let c=oe();return s.callbacks[c]=(i,l)=>{let d=H(i,l),p=a(...d);return Ee(p)},{[T]:c}}return Array.isArray(a)?a.map(c=>t(s,c)):O(a)?ce(a,c=>t(s,c)):a},n={promises:{},callbacks:{}},r=t(n,e);return[n,r]},H=(e,t)=>{if(Array.isArray(t))return t.map(n=>H(e,n));if(O(t)&&t.hasOwnProperty(I)){let n=t[I];return e.promises[n]}if(O(t)&&t.hasOwnProperty(T)){let n=t[T];return async function(){for(var r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];let[c,i]=j(s),l=await e.callbacks[n](k(c),i);return ae(l)}}return O(t)?ce(t,n=>H(e,n)):t},Se=(e,t)=>new Proxy(e,{get(n,r){return n[r]?t(n[r]):()=>{throw new Error(`Serialization error occurred while accessing ${r} property of ${n}`)}}}),ie=e=>e instanceof Promise,O=e=>e&&typeof e=="object"&&!ie(e),ke=e=>typeof e=="function",ce=(e,t)=>{let n=r=>{let[s,a]=r;return[s,t(a)]};return Object.fromEntries(Object.entries(e).map(n))},oe=(()=>{let e=0;return()=>++e})();var Ae="wix-sdk-bo-hello-handshake",ue=e=>{let{postMessage:t,origin:n}=e,{port1:r,port2:s}=new MessageChannel;t({code:Ae,version:"1.0.0",port:s},n,[s]);let i=se(B(r));return{channel:i,close:()=>i[D]()}};var le=(e,t)=>{let n=()=>e.updateHeight(t.offsetHeight),r=new ResizeObserver(n);return r.observe(t),()=>r.disconnect()};var Ue=["https://manage.wix.com","https://manage.editorx.com"],Ce=new Set(Ue),de=e=>Ce.has(e);var fe=e=>{let t=new EventTarget,n=typeof window>"u",r=i=>{t.dispatchEvent(new CustomEvent("beforeunload",{cancelable:!0}))||(i.preventDefault(),i.returnValue=!0)},s=e.onBeforeUnload(r),a=()=>{n||window.removeEventListener("beforeunload",r),s.then(i=>{let{remove:l}=i;return l()})};return n||(window.addEventListener("beforeunload",r),window.addEventListener("unload",a)),{onBeforeUnload:i=>(t.addEventListener("beforeunload",i),{remove:()=>{t.removeEventListener("beforeunload",i)}}),clearBeforeUnloadHandler:a}};function Oe(e){if(e)try{return JSON.parse(decodeURIComponent(e))}catch(t){console.warn('Failed to parse "essentials" query parameter. Make sure to run the code inside a supported Wix App extension.',t);return}}function me(e){return e.has("essentials")?Oe(e.get("essentials")):void 0}var pe=function(e){e===void 0&&(e={});let t=e.fullUrl&&new URL(e.fullUrl).search||typeof window<"u"&&window.location.search||"",n=new URLSearchParams(t),r=e.origin||n.get("origin")||"",s=e.postMessage||window.parent.postMessage.bind(window.parent);if(!de(r))throw new Error("Wix Dashboard SDK: Unable to establish a connection with the Wix dashboard. Please ensure that you are running your app within the Wix dashboard.");let{channel:a,close:c}=ue({postMessage:s,origin:r}),i=[c];if(e.autoHeightUpdate===void 0||e.autoHeightUpdate){let x=e.autoHeightElement||document.documentElement,M=le(a,x);i.push(()=>M())}let{onBeforeUnload:l,clearBeforeUnloadHandler:d}=fe(a);i.push(d);let p=new Proxy(a,{get(x,M,F){return M==="onBeforeUnload"?l:Reflect.get(x,M,F)}}),{monitoring:m,...b}=me(n)||{},V=q({hostContext:m?.context,monitoringConfig:m?.config,sentrySDK:typeof window<"u"?window.Sentry:void 0});return{channel:p,close:()=>i.forEach(x=>x()),getMonitoringClient:V,essentials:b}};var z=X({createHost:pe});var he=(e,t)=>{let[n,r]=ge(()=>e());return t(n)&&r(e()),n},Re=e=>t=>{let{host:n,compProps:r}=De(t);return he(()=>(K({auth:z.auth(),host:n}).enableContext("module"),n),s=>s!==n),r?He.createElement(e,U({host:n},r)):null},De=e=>{let{host:t,...n}=e,{host:r,hostType:s}=he(()=>t?{host:t,hostType:"local"}:{host:z.host(),hostType:"remote"},i=>!!t&&t!==i.host),[a,c]=ge(void 0);return Le(()=>{if(s==="local")return;let i=r.channel.observeState(d=>{c(d||{})}),l=async()=>{(await i).disconnect(),r.close()};return()=>{l()}},[r,s]),s==="local"?{host:r,compProps:n}:{host:r,compProps:a?{...a,...n}:void 0}};export{Re as withContextualWixClient};
1
+ import{a as N,b as q}from"./chunk-6NLQHDP6.js";import{a as K}from"./chunk-MM2KVUBI.js";import"./chunk-BGTZ3RNN.js";import"./chunk-7EYXEF6M.js";import"./chunk-SBZEOPXX.js";function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(null,arguments)}import He,{useEffect as Le,useState as ge}from"react";function w(e){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(e)}function J(e,t){if(w(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(w(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G(e){var t=J(e,"string");return w(t)=="symbol"?t:t+""}function Q(e,t,n){return(t=G(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=class extends Error{constructor(t){let{message:n,code:r}=t;super(n),Q(this,"code",void 0),this.message=n,this.code=r}};var $=()=>{let e=u=>{let{channel:o}=u;return function(){let f=o.showToast(...arguments);return{remove:()=>Promise.resolve(f).then(h=>h.remove())}}},t=u=>{let{channel:o}=u;return function(){let f=o.observeState(...arguments);return{disconnect:()=>Promise.resolve(f).then(h=>h.disconnect())}}};return{showToast:e,observeState:t,navigate:u=>{let{channel:o}=u;return function(){return o.navigate(...arguments)}},navigateBack:u=>{let{channel:o}=u;return()=>o.navigateBack()},openModal:u=>{let{channel:o}=u;return(f,g)=>{let[h,A]=typeof f=="string"?[f,g]:[f.modalId,f.params],E=o.openModal(h,A);return{modalClosed:Promise.resolve(E).then(y=>y.modalClosed)}}},closeModal:u=>{let{channel:o}=u;return f=>{if(f===void 0)return o.closeModal();let g=JSON.parse(JSON.stringify(f));return o.closeModal(g)}},getAccessToken:u=>{let{channel:o}=u;return()=>o.getAccessToken()},getPageUrl:u=>{let{channel:o}=u;return function(){return o.getPageUrl(...arguments)}},openMediaManager:u=>{let{channel:o}=u;return function(){return o.openMediaManager(...arguments)}},addSitePlugin:u=>{let{channel:o}=u;return(f,g)=>{let h="802c76e4-b381-4bb3-9152-96acabbf3194",A=g?.placement||{},E=o.openModal(h,{...A,pluginId:f,action:"populate"});return Promise.resolve(E).then(y=>y.modalClosed).then(y=>{if(y?.type===void 0)throw new S({message:"Aborted by user",code:3006});if(y?.type==="ERROR")throw new S(y.data.error)})}},onBeforeUnload:u=>{let{channel:o}=u;return function(){return o.onBeforeUnload(...arguments)}},setPageTitle:u=>{let{channel:o}=u;return f=>o.setPageTitle(f)},getLanguage:u=>{let o=null;return async()=>{var f;if(o)return o;let g=null;return o=await new Promise(h=>{g=t(u)((A,E)=>{h(E.language)})}),(f=g)==null||f.disconnect(),o}},requestFeedback:u=>{let{channel:o}=u;return function(){return o.requestFeedback(...arguments)}},onLayerStateChange:u=>{let{channel:o}=u;return function(){let f=o.onLayerStateChange(...arguments);return{remove:()=>Promise.resolve(f).then(h=>h.remove())}}},installApp:u=>{let{channel:o}=u;return o.installApp},getWidget:u=>{let{channel:o}=u;return function(){if("getWidget"in o)return o.getWidget(...arguments);throw new Error("Unsupported")}},getDashboardPlugins:u=>{let{channel:o}=u;return function(){if("getDashboardPlugins"in o)return o.getDashboardPlugins(...arguments);throw new Error("Unsupported")}},getDashboardMenuPlugins:u=>{let{channel:o}=u;return function(){if("getDashboardMenuPlugins"in o)return o.getDashboardMenuPlugins(...arguments);throw new Error("Unsupported")}}}};var X=e=>{let{createHost:t}=e,n=$();return{...N(n),host:t,auth:()=>({getAuthHeaders:async r=>({headers:{Authorization:await n.getAccessToken(r)()}})})}};var Z=Symbol("Comlink.proxy"),ye=Symbol("Comlink.endpoint"),D=Symbol("Comlink.releaseProxy"),L=Symbol("Comlink.thrown"),ee=e=>typeof e=="object"&&e!==null||typeof e=="function",be={canHandle:e=>ee(e)&&e[Z],serialize(e){let{port1:t,port2:n}=new MessageChannel;return _(e,t),[n,[n]]},deserialize(e){return e.start(),B(e)}},we={canHandle:e=>ee(e)&&L in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},te=new Map([["proxy",be],["throw",we]]);function _(e,t=self){t.addEventListener("message",function n(r){if(!r||!r.data)return;let{id:s,type:a,path:c}=Object.assign({path:[]},r.data),i=(r.data.argumentList||[]).map(P),l;try{let d=c.slice(0,-1).reduce((m,b)=>m[b],e),p=c.reduce((m,b)=>m[b],e);switch(a){case 0:l=p;break;case 1:d[c.slice(-1)[0]]=P(r.data.value),l=!0;break;case 2:l=p.apply(d,i);break;case 3:{let m=new p(...i);l=k(m)}break;case 4:{let{port1:m,port2:b}=new MessageChannel;_(e,b),l=ve(m,[m])}break;case 5:l=void 0;break}}catch(d){l={value:d,[L]:0}}Promise.resolve(l).catch(d=>({value:d,[L]:0})).then(d=>{let[p,m]=W(d);t.postMessage(Object.assign(Object.assign({},p),{id:s}),m),a===5&&(t.removeEventListener("message",n),ne(t))})}),t.start&&t.start()}function Pe(e){return e.constructor.name==="MessagePort"}function ne(e){Pe(e)&&e.close()}function B(e,t){return R(e,[],t)}function C(e){if(e)throw new Error("Proxy has been released and is not useable")}function R(e,t=[],n=function(){}){let r=!1,s=new Proxy(n,{get(a,c){if(C(r),c===D)return()=>v(e,{type:5,path:t.map(i=>i.toString())}).then(()=>{ne(e),r=!0});if(c==="then"){if(t.length===0)return{then:()=>s};let i=v(e,{type:0,path:t.map(l=>l.toString())}).then(P);return i.then.bind(i)}return R(e,[...t,c])},set(a,c,i){C(r);let[l,d]=W(i);return v(e,{type:1,path:[...t,c].map(p=>p.toString()),value:l},d).then(P)},apply(a,c,i){C(r);let l=t[t.length-1];if(l===ye)return v(e,{type:4}).then(P);if(l==="bind")return R(e,t.slice(0,-1));let[d,p]=Y(i);return v(e,{type:2,path:t.map(m=>m.toString()),argumentList:d},p).then(P)},construct(a,c){C(r);let[i,l]=Y(c);return v(e,{type:3,path:t.map(d=>d.toString()),argumentList:i},l).then(P)}});return s}function xe(e){return Array.prototype.concat.apply([],e)}function Y(e){let t=e.map(W);return[t.map(n=>n[0]),xe(t.map(n=>n[1]))]}var re=new WeakMap;function ve(e,t){return re.set(e,t),e}function k(e){return Object.assign(e,{[Z]:!0})}function W(e){for(let[t,n]of te)if(n.canHandle(e)){let[r,s]=n.serialize(e);return[{type:3,name:t,value:r},s]}return[{type:0,value:e},re.get(e)||[]]}function P(e){switch(e.type){case 3:return te.get(e.name).deserialize(e.value);case 0:return e.value}}function v(e,t,n){return new Promise(r=>{let s=Me();e.addEventListener("message",function a(c){!c.data||!c.data.id||c.data.id!==s||(e.removeEventListener("message",a),r(c.data))}),e.start&&e.start(),e.postMessage(Object.assign({id:s},t),n)})}function Me(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var T="__proxyCallbackId__wixSDK__",I="__proxyPromiseId__wixSDK__",se=e=>Se(e,t=>async function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];let[a,c]=j(r),i=await t(k(a),c);return ae(i)});var Ee=async e=>{let[t,n]=j(await e);return k({proxies:t,clonables:n})},ae=async e=>H(e?.proxies,await e?.clonables),j=e=>{let t=(s,a)=>{if(ie(a)){let c=oe();return s.promises[c]=a,{[I]:c}}if(ke(a)){let c=oe();return s.callbacks[c]=(i,l)=>{let d=H(i,l),p=a(...d);return Ee(p)},{[T]:c}}return Array.isArray(a)?a.map(c=>t(s,c)):O(a)?ce(a,c=>t(s,c)):a},n={promises:{},callbacks:{}},r=t(n,e);return[n,r]},H=(e,t)=>{if(Array.isArray(t))return t.map(n=>H(e,n));if(O(t)&&t.hasOwnProperty(I)){let n=t[I];return e.promises[n]}if(O(t)&&t.hasOwnProperty(T)){let n=t[T];return async function(){for(var r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];let[c,i]=j(s),l=await e.callbacks[n](k(c),i);return ae(l)}}return O(t)?ce(t,n=>H(e,n)):t},Se=(e,t)=>new Proxy(e,{get(n,r){return n[r]?t(n[r]):()=>{throw new Error(`Serialization error occurred while accessing ${r} property of ${n}`)}}}),ie=e=>e instanceof Promise,O=e=>e&&typeof e=="object"&&!ie(e),ke=e=>typeof e=="function",ce=(e,t)=>{let n=r=>{let[s,a]=r;return[s,t(a)]};return Object.fromEntries(Object.entries(e).map(n))},oe=(()=>{let e=0;return()=>++e})();var Ae="wix-sdk-bo-hello-handshake",ue=e=>{let{postMessage:t,origin:n}=e,{port1:r,port2:s}=new MessageChannel;t({code:Ae,version:"1.0.0",port:s},n,[s]);let i=se(B(r));return{channel:i,close:()=>i[D]()}};var le=(e,t)=>{let n=()=>e.updateHeight(t.offsetHeight),r=new ResizeObserver(n);return r.observe(t),()=>r.disconnect()};var Ue=["https://manage.wix.com","https://manage.editorx.com"],Ce=new Set(Ue),de=e=>Ce.has(e);var fe=e=>{let t=new EventTarget,n=typeof window>"u",r=i=>{t.dispatchEvent(new CustomEvent("beforeunload",{cancelable:!0}))||(i.preventDefault(),i.returnValue=!0)},s=e.onBeforeUnload(r),a=()=>{n||window.removeEventListener("beforeunload",r),s.then(i=>{let{remove:l}=i;return l()})};return n||(window.addEventListener("beforeunload",r),window.addEventListener("unload",a)),{onBeforeUnload:i=>(t.addEventListener("beforeunload",i),{remove:()=>{t.removeEventListener("beforeunload",i)}}),clearBeforeUnloadHandler:a}};function Oe(e){if(e)try{return JSON.parse(decodeURIComponent(e))}catch(t){console.warn('Failed to parse "essentials" query parameter. Make sure to run the code inside a supported Wix App extension.',t);return}}function me(e){return e.has("essentials")?Oe(e.get("essentials")):void 0}var pe=function(e){e===void 0&&(e={});let t=e.fullUrl&&new URL(e.fullUrl).search||typeof window<"u"&&window.location.search||"",n=new URLSearchParams(t),r=e.origin||n.get("origin")||"",s=e.postMessage||window.parent.postMessage.bind(window.parent);if(!de(r))throw new Error("Wix Dashboard SDK: Unable to establish a connection with the Wix dashboard. Please ensure that you are running your app within the Wix dashboard.");let{channel:a,close:c}=ue({postMessage:s,origin:r}),i=[c];if(e.autoHeightUpdate===void 0||e.autoHeightUpdate){let x=e.autoHeightElement||document.documentElement,M=le(a,x);i.push(()=>M())}let{onBeforeUnload:l,clearBeforeUnloadHandler:d}=fe(a);i.push(d);let p=new Proxy(a,{get(x,M,F){return M==="onBeforeUnload"?l:Reflect.get(x,M,F)}}),{monitoring:m,...b}=me(n)||{},V=q({hostContext:m?.context,monitoringConfig:m?.config,sentrySDK:typeof window<"u"?window.Sentry:void 0});return{channel:p,close:()=>i.forEach(x=>x()),getMonitoringClient:V,essentials:b}};var z=X({createHost:pe});var he=(e,t)=>{let[n,r]=ge(()=>e());return t(n)&&r(e()),n},Re=e=>t=>{let{host:n,compProps:r}=De(t);return he(()=>(K({auth:z.auth(),host:n}).enableContext("module"),n),s=>s!==n),r?He.createElement(e,U({host:n},r)):null},De=e=>{let{host:t,...n}=e,{host:r,hostType:s}=he(()=>t?{host:t,hostType:"local"}:{host:z.host(),hostType:"remote"},i=>!!t&&t!==i.host),[a,c]=ge(void 0);return Le(()=>{if(s==="local")return;let i=r.channel.observeState(d=>{c(d||{})}),l=async()=>{(await i).disconnect(),r.close()};return()=>{l()}},[r,s]),s==="local"?{host:r,compProps:n}:{host:r,compProps:a?{...a,...n}:void 0}};export{Re as withContextualWixClient};
2
2
  //# sourceMappingURL=dashboard.js.map
@@ -1,4 +1,4 @@
1
- import{a as ve,b as Ee}from"./chunk-MQEY2AKT.js";import{a as we}from"./chunk-3WHQP2RD.js";import"./chunk-42XIZ4MH.js";import{c as Xe,d as Qe}from"./chunk-7EYXEF6M.js";import{b as ge,d as Ie,e as He,f as p,g as a,h as l,i as w,j as u}from"./chunk-SBZEOPXX.js";var Te=ge(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.EventType=void 0;var be;(function(n){n.removeAppCompleted="removeAppCompleted",n.componentSelectionChanged="componentSelectionChanged",n.appInstalled="appInstalled",n.appUpdateCompleted="appUpdateCompleted"})(be||(pt.EventType=be={}))});var kt=ge(A=>{"use strict";var Ze=A&&A.__createBinding||(Object.create?function(n,t,e,i){i===void 0&&(i=e);var s=Object.getOwnPropertyDescriptor(t,e);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,i,s)}:function(n,t,e,i){i===void 0&&(i=e),n[i]=t[e]}),tn=A&&A.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),en=A&&A.__importStar||function(){var n=function(t){return n=Object.getOwnPropertyNames||function(e){var i=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(i[i.length]=s);return i},n(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i=n(t),s=0;s<i.length;s++)i[s]!=="default"&&Ze(e,t,i[s]);return tn(e,t),e}}();Object.defineProperty(A,"__esModule",{value:!0});A.EventType=A.WixSDKTypes=void 0;var nn=en((Qe(),He(Xe)));A.WixSDKTypes=nn;var sn=Te();Object.defineProperty(A,"EventType",{enumerable:!0,get:function(){return sn.EventType}})});var V=Ie(kt(),1);var D=class D{constructor(){p(this,"uid",0);p(this,"callbacks",new Map);p(this,"inTransaction",!1);p(this,"isSilent",!1);p(this,"queue",[])}silent(t=!0){this.isSilent=t}startTransaction(){this.inTransaction=!0}commit(){this.inTransaction=!1;let t=this.queue;this.queue=[],this.isSilent||t.forEach(e=>{this.notify(e)})}notify(t){this.isSilent||(this.inTransaction?this.queue.push(t):this.callbacks.forEach(e=>{e(t)}))}subscribe(t){let e=this.uid++;return this.callbacks.set(e,t),()=>{this.callbacks.delete(e)}}notifyWithStep(t,e){this.notify({...t,meta:{...t.meta,step:e}})}async withEvent(t,e){let i=e();if(i&&i.hasOwnProperty("then"))try{return this.notifyWithStep(t,D.EventSteps.Start),i=await i,this.notifyWithStep(t,D.EventSteps.End),i}catch(s){throw this.notifyWithStep({...t,meta:{...t.meta,error:s}},D.EventSteps.Error),s}else return this.notify(t),i}};p(D,"biEvents",{PLATFORM_WORKER_SPAWN:123,PLATFORM_APP_RUNNER_INIT_APP_API:124,PLATFORM_APP_RUNNER_RUN_APP:125,PLATFORM_APP_RUNNER_REMOVE_APP:126,PLATFORM_WORKER_APP_BUNDLE_LOAD:127,PLATFORM_WORKER_APP_BUNDLE_EXECUTE:128,PLATFORM_IFRAME_INIT:129,PLATFORM_APP_API_INIT:130,PLATFORM_APP_API_GET:131}),p(D,"EventSteps",{Start:"start",End:"end",Error:"error"});var Lt=D,ht=(n=>(n.WorkerSpawn="WorkerSpawn",n.HostEvent="HostEvent",n.ApplicationsSpecsReceived="ApplicationsSpecsReceived",n.InitApplicationApi="InitApplicationApi",n.RunApplication="RunApplication",n.getApplicationApi="getApplicationApi",n.IframeInit="IframeInit",n))(ht||{}),Ut=(n=>(n.EditorReady="EditorReady",n))(Ut||{});var v=(n=>(n.ApplicationInit="ApplicationInit",n.ApplicationExecute="ApplicationExecute",n.ApplicationRemoved="ApplicationRemoved",n.ApplicationLoad="ApplicationLoad",n.ApplicationApiInit="ApplicationApiInit",n.CustomEvent="CustomEvent",n.HostEvent="HostEvent",n.EditorReady="EditorReady",n))(v||{}),jt=class{createApplicationRemovedEvent(t){return{type:"ApplicationRemoved",payload:{appDefinitionId:t},meta:{bi:{evid:E.biEvents.PLATFORM_WORKER_SPAWN,appDefId:t}}}}createApplicationLoadEvent(t,e){return{type:"ApplicationLoad",payload:{appDefinitionId:t.appDefinitionId,url:e},meta:{bi:{evid:E.biEvents.PLATFORM_WORKER_APP_BUNDLE_LOAD,appDefId:t.appDefinitionId,appType:t.appType,bundleUrl:e}}}}createApplicationExecuteEvent(t,e){return{type:"ApplicationExecute",payload:{appDefinitionId:t.appDefinitionId,url:e},meta:{bi:{evid:E.biEvents.PLATFORM_WORKER_APP_BUNDLE_EXECUTE,appDefId:t.appDefinitionId,appType:t.appType,bundleUrl:e}}}}createApplicationApiInitEvent(t,e){return{type:"ApplicationApiInit",payload:{appDefinitionId:t},meta:{bi:{evid:E.biEvents.PLATFORM_APP_API_INIT,appDefId:t,scope:e}}}}},E=class extends Lt{constructor(){super(...arguments);p(this,"factories",new jt)}},lt=class lt{constructor(t){this.events=t}mapToPlatformHostEvent(t){if(typeof t=="string")try{t=JSON.parse(t)}catch{}return{type:ht.HostEvent,payload:{type:t.args.eventType,...t.args.eventPayload},meta:{appDefinitionId:t.appDefinitionId??null,intent:t.intent}}}notify(t){let e=this.mapToPlatformHostEvent(t);lt.allowedEvents.includes(e.payload.type)&&this.events.notify(e)}};p(lt,"allowedEvents",[V.EventType.componentSelectionChanged,V.EventType.appInstalled,V.EventType.appUpdateCompleted,V.EventType.removeAppCompleted]);var xe=lt;var g=class n extends Error{constructor(e,i,s){let r=e?` ${e}`:"",o=`[${s}]#${i}`;super(`${o}.${r}`);p(this,"state",{});p(this,"displayName");p(this,"prefix");p(this,"errorMessage");p(this,"parent");p(this,"messages",[]);p(this,"code");this.displayName=o,this.errorMessage=e,this.prefix=s,this.code=i,this.name=o,Object.defineProperty(this,"message",{get:()=>this.getDisplayMessage()}),Error.captureStackTrace&&Error.captureStackTrace(this,n)}get parentError(){let e=this.parent;if(!e)return null;if(this.parent instanceof n)return this.parent;let i=e.name??"[Unknown Error]";return{getBreadcrumbs(){return[i]},getMessage(){return[i,e.message??"unknown error message"].join(`
1
+ import{a as ve,b as Ee}from"./chunk-6NLQHDP6.js";import{a as we}from"./chunk-MM2KVUBI.js";import"./chunk-BGTZ3RNN.js";import{c as Xe,d as Qe}from"./chunk-7EYXEF6M.js";import{b as ge,d as Ie,e as He,f as p,g as a,h as l,i as w,j as u}from"./chunk-SBZEOPXX.js";var Te=ge(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.EventType=void 0;var be;(function(n){n.removeAppCompleted="removeAppCompleted",n.componentSelectionChanged="componentSelectionChanged",n.appInstalled="appInstalled",n.appUpdateCompleted="appUpdateCompleted"})(be||(pt.EventType=be={}))});var kt=ge(A=>{"use strict";var Ze=A&&A.__createBinding||(Object.create?function(n,t,e,i){i===void 0&&(i=e);var s=Object.getOwnPropertyDescriptor(t,e);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,i,s)}:function(n,t,e,i){i===void 0&&(i=e),n[i]=t[e]}),tn=A&&A.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),en=A&&A.__importStar||function(){var n=function(t){return n=Object.getOwnPropertyNames||function(e){var i=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(i[i.length]=s);return i},n(t)};return function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i=n(t),s=0;s<i.length;s++)i[s]!=="default"&&Ze(e,t,i[s]);return tn(e,t),e}}();Object.defineProperty(A,"__esModule",{value:!0});A.EventType=A.WixSDKTypes=void 0;var nn=en((Qe(),He(Xe)));A.WixSDKTypes=nn;var sn=Te();Object.defineProperty(A,"EventType",{enumerable:!0,get:function(){return sn.EventType}})});var V=Ie(kt(),1);var D=class D{constructor(){p(this,"uid",0);p(this,"callbacks",new Map);p(this,"inTransaction",!1);p(this,"isSilent",!1);p(this,"queue",[])}silent(t=!0){this.isSilent=t}startTransaction(){this.inTransaction=!0}commit(){this.inTransaction=!1;let t=this.queue;this.queue=[],this.isSilent||t.forEach(e=>{this.notify(e)})}notify(t){this.isSilent||(this.inTransaction?this.queue.push(t):this.callbacks.forEach(e=>{e(t)}))}subscribe(t){let e=this.uid++;return this.callbacks.set(e,t),()=>{this.callbacks.delete(e)}}notifyWithStep(t,e){this.notify({...t,meta:{...t.meta,step:e}})}async withEvent(t,e){let i=e();if(i&&i.hasOwnProperty("then"))try{return this.notifyWithStep(t,D.EventSteps.Start),i=await i,this.notifyWithStep(t,D.EventSteps.End),i}catch(s){throw this.notifyWithStep({...t,meta:{...t.meta,error:s}},D.EventSteps.Error),s}else return this.notify(t),i}};p(D,"biEvents",{PLATFORM_WORKER_SPAWN:123,PLATFORM_APP_RUNNER_INIT_APP_API:124,PLATFORM_APP_RUNNER_RUN_APP:125,PLATFORM_APP_RUNNER_REMOVE_APP:126,PLATFORM_WORKER_APP_BUNDLE_LOAD:127,PLATFORM_WORKER_APP_BUNDLE_EXECUTE:128,PLATFORM_IFRAME_INIT:129,PLATFORM_APP_API_INIT:130,PLATFORM_APP_API_GET:131}),p(D,"EventSteps",{Start:"start",End:"end",Error:"error"});var Lt=D,ht=(n=>(n.WorkerSpawn="WorkerSpawn",n.HostEvent="HostEvent",n.ApplicationsSpecsReceived="ApplicationsSpecsReceived",n.InitApplicationApi="InitApplicationApi",n.RunApplication="RunApplication",n.getApplicationApi="getApplicationApi",n.IframeInit="IframeInit",n))(ht||{}),Ut=(n=>(n.EditorReady="EditorReady",n))(Ut||{});var v=(n=>(n.ApplicationInit="ApplicationInit",n.ApplicationExecute="ApplicationExecute",n.ApplicationRemoved="ApplicationRemoved",n.ApplicationLoad="ApplicationLoad",n.ApplicationApiInit="ApplicationApiInit",n.CustomEvent="CustomEvent",n.HostEvent="HostEvent",n.EditorReady="EditorReady",n))(v||{}),jt=class{createApplicationRemovedEvent(t){return{type:"ApplicationRemoved",payload:{appDefinitionId:t},meta:{bi:{evid:E.biEvents.PLATFORM_WORKER_SPAWN,appDefId:t}}}}createApplicationLoadEvent(t,e){return{type:"ApplicationLoad",payload:{appDefinitionId:t.appDefinitionId,url:e},meta:{bi:{evid:E.biEvents.PLATFORM_WORKER_APP_BUNDLE_LOAD,appDefId:t.appDefinitionId,appType:t.appType,bundleUrl:e}}}}createApplicationExecuteEvent(t,e){return{type:"ApplicationExecute",payload:{appDefinitionId:t.appDefinitionId,url:e},meta:{bi:{evid:E.biEvents.PLATFORM_WORKER_APP_BUNDLE_EXECUTE,appDefId:t.appDefinitionId,appType:t.appType,bundleUrl:e}}}}createApplicationApiInitEvent(t,e){return{type:"ApplicationApiInit",payload:{appDefinitionId:t},meta:{bi:{evid:E.biEvents.PLATFORM_APP_API_INIT,appDefId:t,scope:e}}}}},E=class extends Lt{constructor(){super(...arguments);p(this,"factories",new jt)}},lt=class lt{constructor(t){this.events=t}mapToPlatformHostEvent(t){if(typeof t=="string")try{t=JSON.parse(t)}catch{}return{type:ht.HostEvent,payload:{type:t.args.eventType,...t.args.eventPayload},meta:{appDefinitionId:t.appDefinitionId??null,intent:t.intent}}}notify(t){let e=this.mapToPlatformHostEvent(t);lt.allowedEvents.includes(e.payload.type)&&this.events.notify(e)}};p(lt,"allowedEvents",[V.EventType.componentSelectionChanged,V.EventType.appInstalled,V.EventType.appUpdateCompleted,V.EventType.removeAppCompleted]);var xe=lt;var g=class n extends Error{constructor(e,i,s){let r=e?` ${e}`:"",o=`[${s}]#${i}`;super(`${o}.${r}`);p(this,"state",{});p(this,"displayName");p(this,"prefix");p(this,"errorMessage");p(this,"parent");p(this,"messages",[]);p(this,"code");this.displayName=o,this.errorMessage=e,this.prefix=s,this.code=i,this.name=o,Object.defineProperty(this,"message",{get:()=>this.getDisplayMessage()}),Error.captureStackTrace&&Error.captureStackTrace(this,n)}get parentError(){let e=this.parent;if(!e)return null;if(this.parent instanceof n)return this.parent;let i=e.name??"[Unknown Error]";return{getBreadcrumbs(){return[i]},getMessage(){return[i,e.message??"unknown error message"].join(`
2
2
  `)}}}getDisplayMessage(){return[(this.parentError?this.getBreadcrumbs():[]).join(" -> "),this.getMessage()].filter(i=>i.trim().length).join(`
3
3
  `)}getMessage(){let e=Object.entries(this.state).reduce((c,[h,d])=>(d&&c.push(` \u2013 ${h}: ${d}`),c),[]).join(`
4
4
  `),i=this.messages.reduce((c,h)=>(c.push(` - ${h.join(" ")}`),c),[]).join(`
@@ -1,2 +1,2 @@
1
- import{b as n}from"./chunk-42XIZ4MH.js";import"./chunk-7EYXEF6M.js";import"./chunk-SBZEOPXX.js";function o(e,t=!1){return n(e,t)}var i=["wix.com","editorx.com"];var _=new RegExp(`\\.(${i.join("|")})$`),s=["42.wixprod.net","uw2-edt-1.wixprod.net"],a="dev.wix-code.com";var u=new RegExp(`\\.(${s.join("|")})$`),p=new RegExp(`.*\\.${a}$`);import{wixContext as f}from"@wix/sdk-context";function r(e,t){t==="global"?globalThis.__wix_context__!=null?globalThis.__wix_context__.client=e:globalThis.__wix_context__={client:e}:f.client=e}var b=o(e=>(t,c)=>e.fetchWithAuth(t,c));export{r as enableContext};
1
+ import{a as n}from"./chunk-BGTZ3RNN.js";import"./chunk-7EYXEF6M.js";import"./chunk-SBZEOPXX.js";function o(e,t=!1){return n(e,t)}var i=["wix.com","editorx.com"];var _=new RegExp(`\\.(${i.join("|")})$`),s=["42.wixprod.net","uw2-edt-1.wixprod.net"],a="dev.wix-code.com";var u=new RegExp(`\\.(${s.join("|")})$`),p=new RegExp(`.*\\.${a}$`);import{wixContext as f}from"@wix/sdk-context";function r(e,t){t==="global"?globalThis.__wix_context__!=null?globalThis.__wix_context__.client=e:globalThis.__wix_context__={client:e}:f.client=e}var b=o(e=>(t,c)=>e.fetchWithAuth(t,c));export{r as enableContext};
2
2
  //# sourceMappingURL=sdk-context.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/@wix/sdk-runtime/build/rest-modules.js","../../../node_modules/@wix/sdk/build/enable-context.js","../../../node_modules/@wix/sdk/build/context.js"],"sourcesContent":["import { contextualizeRESTModuleV2 } from './context-v2.js';\nexport function createRESTModule(descriptor, elevated = false) {\n return contextualizeRESTModuleV2(descriptor, elevated);\n}\nexport function toURLSearchParams(params, isComplexRequest) {\n const flatten = flattenParams(params);\n const searchParams = Object.entries(flatten).reduce((urlSearchParams, [key, value]) => {\n // inorder to make `foo: [1,2]` turn into `foo=1&foo=2` and not `foo[]=1&foo[]=2`\n const keyParams = Array.isArray(value) ? value : [value];\n keyParams.forEach((param) => {\n if (param === undefined || param === null) {\n return;\n }\n urlSearchParams.append(key, param);\n });\n return urlSearchParams;\n }, new URLSearchParams());\n if (isComplexRequest) {\n searchParams.append('.r', base64Encode(JSON.stringify(params)));\n }\n return searchParams;\n}\nexport function resolveUrl(opts) {\n const domain = resolveDomain(opts.host);\n const mappings = resolveMappingsByDomain(domain, opts.domainToMappings);\n const path = injectDataIntoProtoPath(opts.protoPath, opts.data || {});\n return resolvePathFromMappings(path, mappings);\n}\nfunction flattenParams(data, path = '') {\n const params = {};\n Object.entries(data).forEach(([key, value]) => {\n const isObject = value !== null && typeof value === 'object' && !Array.isArray(value);\n const fieldPath = resolvePath(path, key);\n if (isObject) {\n const serializedObject = flattenParams(value, fieldPath);\n Object.assign(params, serializedObject);\n }\n else {\n params[fieldPath] = value;\n }\n });\n return params;\n}\nfunction resolvePath(path, key) {\n return `${path}${path ? '.' : ''}${key}`;\n}\nconst base64Encode = (value) => {\n const base64 = typeof btoa !== 'undefined'\n ? btoa(value)\n : Buffer.from(value, 'utf-8').toString('base64');\n return base64.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n};\nconst DOMAINS = ['wix.com', 'editorx.com'];\nconst USER_DOMAIN = '_';\nconst REGEX_CAPTURE_DOMAINS = new RegExp(`\\\\.(${DOMAINS.join('|')})$`);\nconst WIX_API_DOMAINS = ['42.wixprod.net', 'uw2-edt-1.wixprod.net'];\nconst DEV_WIX_CODE_DOMAIN = 'dev.wix-code.com';\nconst REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;\nconst REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\\\.(${WIX_API_DOMAINS.join('|')})$`);\nconst REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN = new RegExp(`.*\\\\.${DEV_WIX_CODE_DOMAIN}$`);\nfunction resolveDomain(host) {\n const resolvedHost = fixHostExceptions(host);\n return resolvedHost\n .replace(REGEX_CAPTURE_DOMAINS, '._base_domain_')\n .replace(REGEX_CAPTURE_API_DOMAINS, '._api_base_domain_')\n .replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, '*.dev.wix-code.com');\n}\n// hosts which standard string replacing doesn't apply to them, will be fixed here.\nfunction fixHostExceptions(host) {\n // https://system-kb.wixanswers.com/kb/en/article/editorx-domains-matching-to-wixcom\n return host.replace('create.editorx.com', 'editor.editorx.com');\n}\nfunction resolveMappingsByDomain(domain, domainToMappings) {\n const mappings = domainToMappings[domain] || domainToMappings[USER_DOMAIN];\n if (!mappings) {\n if (isBaseDomain(domain)) {\n // fallback <lang>.wix.com sub domains to www.wix.com\n // since all of the languages subdomain are not mapped automatically in FP and we want to support those kind of calls\n // for example: fr.wix.com\n return domainToMappings[wwwBaseDomain];\n }\n }\n return mappings;\n}\nfunction isBaseDomain(domain) {\n return !!domain.match(/\\._base_domain_$/);\n}\nconst wwwBaseDomain = 'www._base_domain_';\nfunction injectDataIntoProtoPath(protoPath, data) {\n return protoPath\n .split('/')\n .map((path) => maybeProtoPathToData(path, data))\n .join('/');\n}\nfunction maybeProtoPathToData(protoPath, data) {\n const protoRegExpMatch = protoPath.match(REGEX_CAPTURE_PROTO_FIELD) || [];\n const field = protoRegExpMatch[1];\n if (field) {\n const suffix = protoPath.replace(protoRegExpMatch[0], '');\n return findByPath(data, field, protoPath, suffix);\n }\n return protoPath;\n}\nfunction findByPath(obj, path, defaultValue, suffix) {\n let result = obj;\n for (const field of path.split('.')) {\n if (!result) {\n return defaultValue;\n }\n result = result[field];\n }\n return `${result}${suffix}`;\n}\nfunction resolvePathFromMappings(protoPath, mappings) {\n const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));\n if (!mapping) {\n // todo: should we return the path? if no - what should we do in case of testings?\n return protoPath;\n }\n return mapping.srcPath + protoPath.slice(mapping.destPath.length);\n}\n","import { wixContext } from '@wix/sdk-context';\nexport function enableContext(wixClient, contextType) {\n if (contextType === 'global') {\n if (globalThis.__wix_context__ != null) {\n globalThis.__wix_context__.client = wixClient;\n }\n else {\n globalThis.__wix_context__ = { client: wixClient };\n }\n }\n else {\n wixContext.client = wixClient;\n }\n}\n","import { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nexport function elevate(restModule) {\n return createRESTModule(restModule, true);\n}\nexport const fetchWithAuth = createRESTModule((restModuleOpts) => {\n return ((url, options) => restModuleOpts.fetchWithAuth(url, options));\n});\nexport { graphql } from './graphql.js';\nexport { setGlobalWixContext } from './wix-context.js';\nexport { enableContext } from './enable-context.js';\n"],"mappings":"gGACO,SAASA,EAAiBC,EAAYC,EAAW,GAAO,CAC3D,OAAOC,EAA0BF,EAAYC,CAAQ,CACzD,CAiDA,IAAME,EAAU,CAAC,UAAW,aAAa,EAEzC,IAAMC,EAAwB,IAAI,OAAO,OAAOC,EAAQ,KAAK,GAAG,CAAC,IAAI,EAC/DC,EAAkB,CAAC,iBAAkB,uBAAuB,EAC5DC,EAAsB,mBAE5B,IAAMC,EAA4B,IAAI,OAAO,OAAOC,EAAgB,KAAK,GAAG,CAAC,IAAI,EAC3EC,EAAoC,IAAI,OAAO,QAAQC,CAAmB,GAAG,EC3DnF,OAAS,cAAAC,MAAkB,mBACpB,SAASC,EAAcC,EAAWC,EAAa,CAC9CA,IAAgB,SACZ,WAAW,iBAAmB,KAC9B,WAAW,gBAAgB,OAASD,EAGpC,WAAW,gBAAkB,CAAE,OAAQA,CAAU,EAIrDF,EAAW,OAASE,CAE5B,CCTO,IAAME,EAAgBC,EAAkBC,GACnC,CAACC,EAAKC,IAAYF,EAAe,cAAcC,EAAKC,CAAO,CACtE","names":["createRESTModule","descriptor","elevated","contextualizeRESTModuleV2","DOMAINS","REGEX_CAPTURE_DOMAINS","DOMAINS","WIX_API_DOMAINS","DEV_WIX_CODE_DOMAIN","REGEX_CAPTURE_API_DOMAINS","WIX_API_DOMAINS","REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN","DEV_WIX_CODE_DOMAIN","wixContext","enableContext","wixClient","contextType","fetchWithAuth","createRESTModule","restModuleOpts","url","options"]}
1
+ {"version":3,"sources":["../../../node_modules/@wix/sdk/node_modules/@wix/sdk-runtime/build/rest-modules.js","../../../node_modules/@wix/sdk/build/enable-context.js","../../../node_modules/@wix/sdk/build/context.js"],"sourcesContent":["import { contextualizeRESTModuleV2 } from './context-v2.js';\nexport function createRESTModule(descriptor, elevated = false) {\n return contextualizeRESTModuleV2(descriptor, elevated);\n}\nexport function toURLSearchParams(params, isComplexRequest) {\n const flatten = flattenParams(params);\n const searchParams = Object.entries(flatten).reduce((urlSearchParams, [key, value]) => {\n // inorder to make `foo: [1,2]` turn into `foo=1&foo=2` and not `foo[]=1&foo[]=2`\n const keyParams = Array.isArray(value) ? value : [value];\n keyParams.forEach((param) => {\n if (param === undefined || param === null) {\n return;\n }\n urlSearchParams.append(key, param);\n });\n return urlSearchParams;\n }, new URLSearchParams());\n if (isComplexRequest) {\n searchParams.append('.r', base64Encode(JSON.stringify(params)));\n }\n return searchParams;\n}\nexport function resolveUrl(opts) {\n const domain = resolveDomain(opts.host);\n const mappings = resolveMappingsByDomain(domain, opts.domainToMappings);\n const path = injectDataIntoProtoPath(opts.protoPath, opts.data || {});\n return resolvePathFromMappings(path, mappings);\n}\nfunction flattenParams(data, path = '') {\n const params = {};\n Object.entries(data).forEach(([key, value]) => {\n const isObject = value !== null && typeof value === 'object' && !Array.isArray(value);\n const fieldPath = resolvePath(path, key);\n if (isObject) {\n const serializedObject = flattenParams(value, fieldPath);\n Object.assign(params, serializedObject);\n }\n else {\n params[fieldPath] = value;\n }\n });\n return params;\n}\nfunction resolvePath(path, key) {\n return `${path}${path ? '.' : ''}${key}`;\n}\nconst base64Encode = (value) => {\n const base64 = typeof btoa !== 'undefined'\n ? btoa(value)\n : Buffer.from(value, 'utf-8').toString('base64');\n return base64.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n};\nconst DOMAINS = ['wix.com', 'editorx.com'];\nconst USER_DOMAIN = '_';\nconst REGEX_CAPTURE_DOMAINS = new RegExp(`\\\\.(${DOMAINS.join('|')})$`);\nconst WIX_API_DOMAINS = ['42.wixprod.net', 'uw2-edt-1.wixprod.net'];\nconst DEV_WIX_CODE_DOMAIN = 'dev.wix-code.com';\nconst REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;\nconst REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\\\.(${WIX_API_DOMAINS.join('|')})$`);\nconst REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN = new RegExp(`.*\\\\.${DEV_WIX_CODE_DOMAIN}$`);\nfunction resolveDomain(host) {\n const resolvedHost = fixHostExceptions(host);\n return resolvedHost\n .replace(REGEX_CAPTURE_DOMAINS, '._base_domain_')\n .replace(REGEX_CAPTURE_API_DOMAINS, '._api_base_domain_')\n .replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, '*.dev.wix-code.com');\n}\n// hosts which standard string replacing doesn't apply to them, will be fixed here.\nfunction fixHostExceptions(host) {\n // https://system-kb.wixanswers.com/kb/en/article/editorx-domains-matching-to-wixcom\n return host.replace('create.editorx.com', 'editor.editorx.com');\n}\nfunction resolveMappingsByDomain(domain, domainToMappings) {\n const mappings = domainToMappings[domain] || domainToMappings[USER_DOMAIN];\n if (!mappings) {\n if (isBaseDomain(domain)) {\n // fallback <lang>.wix.com sub domains to www.wix.com\n // since all of the languages subdomain are not mapped automatically in FP and we want to support those kind of calls\n // for example: fr.wix.com\n return domainToMappings[wwwBaseDomain];\n }\n }\n return mappings;\n}\nfunction isBaseDomain(domain) {\n return !!domain.match(/\\._base_domain_$/);\n}\nconst wwwBaseDomain = 'www._base_domain_';\nfunction injectDataIntoProtoPath(protoPath, data) {\n return protoPath\n .split('/')\n .map((path) => maybeProtoPathToData(path, data))\n .join('/');\n}\nfunction maybeProtoPathToData(protoPath, data) {\n const protoRegExpMatch = protoPath.match(REGEX_CAPTURE_PROTO_FIELD) || [];\n const field = protoRegExpMatch[1];\n if (field) {\n const suffix = protoPath.replace(protoRegExpMatch[0], '');\n return findByPath(data, field, protoPath, suffix);\n }\n return protoPath;\n}\nfunction findByPath(obj, path, defaultValue, suffix) {\n let result = obj;\n for (const field of path.split('.')) {\n if (!result) {\n return defaultValue;\n }\n result = result[field];\n }\n return `${result}${suffix}`;\n}\nfunction resolvePathFromMappings(protoPath, mappings) {\n const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));\n if (!mapping) {\n // todo: should we return the path? if no - what should we do in case of testings?\n return protoPath;\n }\n return mapping.srcPath + protoPath.slice(mapping.destPath.length);\n}\n","import { wixContext } from '@wix/sdk-context';\nexport function enableContext(wixClient, contextType) {\n if (contextType === 'global') {\n if (globalThis.__wix_context__ != null) {\n globalThis.__wix_context__.client = wixClient;\n }\n else {\n globalThis.__wix_context__ = { client: wixClient };\n }\n }\n else {\n wixContext.client = wixClient;\n }\n}\n","import { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nexport function elevate(restModule) {\n return createRESTModule(restModule, true);\n}\nexport const fetchWithAuth = createRESTModule((restModuleOpts) => {\n return ((url, options) => restModuleOpts.fetchWithAuth(url, options));\n});\nexport { graphql } from './graphql.js';\nexport { setGlobalWixContext } from './wix-context.js';\nexport { enableContext } from './enable-context.js';\n"],"mappings":"gGACO,SAASA,EAAiBC,EAAYC,EAAW,GAAO,CAC3D,OAAOC,EAA0BF,EAAYC,CAAQ,CACzD,CAiDA,IAAME,EAAU,CAAC,UAAW,aAAa,EAEzC,IAAMC,EAAwB,IAAI,OAAO,OAAOC,EAAQ,KAAK,GAAG,CAAC,IAAI,EAC/DC,EAAkB,CAAC,iBAAkB,uBAAuB,EAC5DC,EAAsB,mBAE5B,IAAMC,EAA4B,IAAI,OAAO,OAAOC,EAAgB,KAAK,GAAG,CAAC,IAAI,EAC3EC,EAAoC,IAAI,OAAO,QAAQC,CAAmB,GAAG,EC3DnF,OAAS,cAAAC,MAAkB,mBACpB,SAASC,EAAcC,EAAWC,EAAa,CAC9CA,IAAgB,SACZ,WAAW,iBAAmB,KAC9B,WAAW,gBAAgB,OAASD,EAGpC,WAAW,gBAAkB,CAAE,OAAQA,CAAU,EAIrDF,EAAW,OAASE,CAE5B,CCTO,IAAME,EAAgBC,EAAkBC,GACnC,CAACC,EAAKC,IAAYF,EAAe,cAAcC,EAAKC,CAAO,CACtE","names":["createRESTModule","descriptor","elevated","contextualizeRESTModuleV2","DOMAINS","REGEX_CAPTURE_DOMAINS","DOMAINS","WIX_API_DOMAINS","DEV_WIX_CODE_DOMAIN","REGEX_CAPTURE_API_DOMAINS","WIX_API_DOMAINS","REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN","DEV_WIX_CODE_DOMAIN","wixContext","enableContext","wixClient","contextType","fetchWithAuth","createRESTModule","restModuleOpts","url","options"]}
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-3WHQP2RD.js";import"./chunk-42XIZ4MH.js";import"./chunk-7EYXEF6M.js";import"./chunk-SBZEOPXX.js";function d(){let t=null,n=null;return{promise:new Promise((o,i)=>{t=o,n=i}),resolve:t,reject:n}}var u=t=>{let{createHost:n}=t;return{__type:"host",create:e=>({}),host:e=>{var o,i;let{applicationId:s}=e??{},r=typeof window<"u"?window.wixEmbedsAPI:void 0,l=n(e),p=f();return{...l,apiBaseUrl:p,getMonitoringClient:r==null||r.getMonitoringClientFunction==null?void 0:r.getMonitoringClientFunction(s),essentials:{language:typeof window<"u"?(o=window.commonConfig)==null?void 0:o.language:void 0,locale:typeof window<"u"?(i=window.commonConfig)==null?void 0:i.locale:void 0}}},auth:e=>{let o=typeof window<"u"?window.wixEmbedsAPI:void 0;e||(e=o==null||o.getAccessTokenFunction==null?void 0:o.getAccessTokenFunction());let i=!1,{resolve:s,promise:r}=d();return{getAuthHeaders:async()=>{if(!e&&i&&(e=await r),!e)throw new Error("Failed to resolve auth token");return{headers:{Authorization:await e()}}},getAccessTokenInjector:()=>(i=!0,l=>{s(l)})}}}};function f(){let t=typeof window<"u"?window.wixEmbedsAPI:void 0,n=t==null||t.getExternalBaseUrl==null?void 0:t.getExternalBaseUrl();if(!n)return;let e=new URL(n);return e!=null&&e.pathname&&e.pathname!=="/"?""+e.hostname+e.pathname:e.hostname}var w=t=>{let{clientSdk:n,applicationId:e}=t;return{invoke:async o=>{let{namespace:i,method:s,args:r}=o;if(!n)throw new Error("Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction");return n.invoke({namespace:i,method:s,args:r,applicationId:e,accessToken:"accessToken"})},getAccessToken:()=>{throw new Error("Not implemented")},observeState:()=>({disconnect:()=>{}})}};var m=function(t){let n=typeof $wixContext<"u"&&$wixContext.clientSdk||t?.clientSdk||window.clientSdk,{applicationId:e}=t||{};if(!e)throw new Error('"createHost" was called without a required field "applicationId"');return{channel:w({clientSdk:n,applicationId:e}),close:()=>{}}};var c=u({createHost:m});var S=t=>{let n=c.host({applicationId:t}),e=c.auth(),o=e.getAccessTokenInjector();return a({auth:e,host:n}).enableContext("module"),{injectGetAccessToken:o}};export{S as enableClient};
1
+ import{a}from"./chunk-MM2KVUBI.js";import"./chunk-BGTZ3RNN.js";import"./chunk-7EYXEF6M.js";import"./chunk-SBZEOPXX.js";function d(){let t=null,n=null;return{promise:new Promise((o,i)=>{t=o,n=i}),resolve:t,reject:n}}var u=t=>{let{createHost:n}=t;return{__type:"host",create:e=>({}),host:e=>{var o,i;let{applicationId:s}=e??{},r=typeof window<"u"?window.wixEmbedsAPI:void 0,l=n(e),p=f();return{...l,apiBaseUrl:p,getMonitoringClient:r==null||r.getMonitoringClientFunction==null?void 0:r.getMonitoringClientFunction(s),essentials:{language:typeof window<"u"?(o=window.commonConfig)==null?void 0:o.language:void 0,locale:typeof window<"u"?(i=window.commonConfig)==null?void 0:i.locale:void 0}}},auth:e=>{let o=typeof window<"u"?window.wixEmbedsAPI:void 0;e||(e=o==null||o.getAccessTokenFunction==null?void 0:o.getAccessTokenFunction());let i=!1,{resolve:s,promise:r}=d();return{getAuthHeaders:async()=>{if(!e&&i&&(e=await r),!e)throw new Error("Failed to resolve auth token");return{headers:{Authorization:await e()}}},getAccessTokenInjector:()=>(i=!0,l=>{s(l)})}}}};function f(){let t=typeof window<"u"?window.wixEmbedsAPI:void 0,n=t==null||t.getExternalBaseUrl==null?void 0:t.getExternalBaseUrl();if(!n)return;let e=new URL(n);return e!=null&&e.pathname&&e.pathname!=="/"?""+e.hostname+e.pathname:e.hostname}var w=t=>{let{clientSdk:n,applicationId:e}=t;return{invoke:async o=>{let{namespace:i,method:s,args:r}=o;if(!n)throw new Error("Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction");return n.invoke({namespace:i,method:s,args:r,applicationId:e,accessToken:"accessToken"})},getAccessToken:()=>{throw new Error("Not implemented")},observeState:()=>({disconnect:()=>{}})}};var m=function(t){let n=typeof $wixContext<"u"&&$wixContext.clientSdk||t?.clientSdk||window.clientSdk,{applicationId:e}=t||{};if(!e)throw new Error('"createHost" was called without a required field "applicationId"');return{channel:w({clientSdk:n,applicationId:e}),close:()=>{}}};var c=u({createHost:m});var S=t=>{let n=c.host({applicationId:t}),e=c.auth(),o=e.getAccessTokenInjector();return a({auth:e,host:n}).enableContext("module"),{injectGetAccessToken:o}};export{S as enableClient};
2
2
  //# sourceMappingURL=site.js.map
@@ -3,26 +3,25 @@ const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  executeCommand,
5
5
  log
6
- } from "./chunk-3LJH5WAS.js";
6
+ } from "./chunk-TJFERWU7.js";
7
7
  import {
8
8
  PreviewCommand
9
- } from "./chunk-FGCBIHDS.js";
10
- import "./chunk-PS7R6MWD.js";
11
- import "./chunk-I2PLZT4A.js";
12
- import "./chunk-K4IODCQP.js";
13
- import "./chunk-OGO22IKX.js";
14
- import "./chunk-IB2KM2Q7.js";
15
- import "./chunk-HR6CTO67.js";
16
- import "./chunk-3GSDI3OJ.js";
9
+ } from "./chunk-5TP6T6QK.js";
10
+ import "./chunk-Y4GJ3NS4.js";
11
+ import "./chunk-3X2VYRBF.js";
12
+ import "./chunk-GGDJQXOX.js";
13
+ import "./chunk-ZOZ5LJV7.js";
14
+ import "./chunk-63VDDLLQ.js";
15
+ import "./chunk-4PXJSX4C.js";
17
16
  import "./chunk-ZR3N5INU.js";
18
- import "./chunk-5LGI6O3F.js";
19
- import "./chunk-PGKXOCZN.js";
20
- import "./chunk-XDWVTYW3.js";
17
+ import "./chunk-WNR36YTI.js";
18
+ import "./chunk-SIJDKP2Q.js";
19
+ import "./chunk-VLQG5SQF.js";
21
20
  import {
22
21
  CliError,
23
22
  CliErrorCode,
24
23
  require_react
25
- } from "./chunk-GGQMSU4O.js";
24
+ } from "./chunk-ZLLXHWZF.js";
26
25
  import {
27
26
  __toESM,
28
27
  init_esm_shims
@@ -52,4 +51,4 @@ async function nonInteractivePreview(services, model, options) {
52
51
  export {
53
52
  nonInteractivePreview
54
53
  };
55
- //# sourceMappingURL=preview-CLBQELU3.js.map
54
+ //# sourceMappingURL=preview-PIFWQKW3.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/non-interactive/preview.tsx"],"sourcesContent":["import React from 'react';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\nimport type { CommandServices } from '@wix/cli-command-contract';\nimport { PreviewCommand } from '../components/PreviewCommand/index.js';\nimport type { ProjectModel } from '../model.js';\nimport { log } from './logger.js';\nimport { executeCommand } from './execute-command.js';\n\nexport async function nonInteractivePreview(\n services: CommandServices,\n model: ProjectModel,\n options: { siteId?: string; baseUrl?: string }\n) {\n const { baseUrl, siteId } = options;\n\n if (!siteId) {\n throw new CliError({\n code: CliErrorCode.SiteConfiguredRequired(),\n cause: null,\n });\n }\n\n const version = await executeCommand<string>(services, model, (resolve) => (\n <PreviewCommand\n baseUrl={baseUrl}\n siteIdOverride={siteId}\n onPreviewCreated={resolve}\n />\n ));\n\n log(JSON.stringify({ version }, null, 2));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,mBAAkB;AAQlB,eAAsB,sBACpB,UACA,OACA,SACA;AACA,QAAM,EAAE,SAAS,OAAO,IAAI;AAE5B,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,SAAS;AAAA,MACjB,MAAM,aAAa,uBAAuB;AAAA,MAC1C,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,UAAU,MAAM,eAAuB,UAAU,OAAO,CAAC,YAC7D,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,gBAAgB;AAAA,MAChB,kBAAkB;AAAA;AAAA,EACpB,CACD;AAED,MAAI,KAAK,UAAU,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC;AAC1C;","names":["React"]}
1
+ {"version":3,"sources":["../src/non-interactive/preview.tsx"],"sourcesContent":["import React from 'react';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\nimport type { CommandServices } from '@wix/cli-command-contract';\nimport { PreviewCommand } from '../components/PreviewCommand/index.js';\nimport type { ProjectModel } from '../model.js';\nimport { log } from './logger.js';\nimport { executeCommand } from './execute-command.js';\n\nexport async function nonInteractivePreview(\n services: CommandServices,\n model: ProjectModel,\n options: { siteId?: string; baseUrl?: string }\n) {\n const { baseUrl, siteId } = options;\n\n if (!siteId) {\n throw new CliError({\n code: CliErrorCode.SiteConfiguredRequired(),\n cause: null,\n });\n }\n\n const version = await executeCommand<string>(services, model, (resolve) => (\n <PreviewCommand\n baseUrl={baseUrl}\n siteIdOverride={siteId}\n onPreviewCreated={resolve}\n />\n ));\n\n log(JSON.stringify({ version }, null, 2));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,mBAAkB;AAQlB,eAAsB,sBACpB,UACA,OACA,SACA;AACA,QAAM,EAAE,SAAS,OAAO,IAAI;AAE5B,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,SAAS;AAAA,MACjB,MAAM,aAAa,uBAAuB;AAAA,MAC1C,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,UAAU,MAAM,eAAuB,UAAU,OAAO,CAAC,YAC7D,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,gBAAgB;AAAA,MAChB,kBAAkB;AAAA;AAAA,EACpB,CACD;AAED,MAAI,KAAK,UAAU,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC;AAC1C;","names":["React"]}
@@ -3,29 +3,28 @@ const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  executeCommand,
5
5
  log
6
- } from "./chunk-3LJH5WAS.js";
6
+ } from "./chunk-TJFERWU7.js";
7
7
  import {
8
8
  ReleaseCommand
9
- } from "./chunk-VARU4VGB.js";
10
- import "./chunk-FGCBIHDS.js";
11
- import "./chunk-PS7R6MWD.js";
12
- import "./chunk-I2PLZT4A.js";
13
- import "./chunk-K4IODCQP.js";
14
- import "./chunk-OGO22IKX.js";
15
- import "./chunk-IB2KM2Q7.js";
16
- import "./chunk-QSLRE7OK.js";
17
- import "./chunk-HR6CTO67.js";
18
- import "./chunk-3GSDI3OJ.js";
9
+ } from "./chunk-AN77SZN2.js";
10
+ import "./chunk-5TP6T6QK.js";
11
+ import "./chunk-Y4GJ3NS4.js";
12
+ import "./chunk-3X2VYRBF.js";
13
+ import "./chunk-GGDJQXOX.js";
14
+ import "./chunk-ZOZ5LJV7.js";
15
+ import "./chunk-ZCUJ356B.js";
16
+ import "./chunk-63VDDLLQ.js";
17
+ import "./chunk-4PXJSX4C.js";
19
18
  import "./chunk-ZR3N5INU.js";
20
- import "./chunk-5LGI6O3F.js";
21
- import "./chunk-PGKXOCZN.js";
22
- import "./chunk-XDWVTYW3.js";
19
+ import "./chunk-WNR36YTI.js";
20
+ import "./chunk-SIJDKP2Q.js";
21
+ import "./chunk-VLQG5SQF.js";
23
22
  import {
24
23
  CliError,
25
24
  CliErrorCode,
26
25
  require_react,
27
26
  toJsonString
28
- } from "./chunk-GGQMSU4O.js";
27
+ } from "./chunk-ZLLXHWZF.js";
29
28
  import {
30
29
  __toESM,
31
30
  init_esm_shims
@@ -57,4 +56,4 @@ async function nonInteractiveRelease(services, model, releaseProps) {
57
56
  export {
58
57
  nonInteractiveRelease
59
58
  };
60
- //# sourceMappingURL=release-VZ2GWJE2.js.map
59
+ //# sourceMappingURL=release-6Z6LMTRW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/non-interactive/release.tsx"],"sourcesContent":["import React from 'react';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\nimport type { CommandServices } from '@wix/cli-command-contract';\nimport { toJsonString } from '@wix/cli-fs';\nimport type { ProjectModel } from '../model.js';\nimport { log } from './logger.js';\nimport type { ReleaseCommandProps } from '../components/ReleaseCommand/ReleaseCommand.js';\nimport { ReleaseCommand } from '../components/ReleaseCommand/ReleaseCommand.js';\nimport { executeCommand } from './execute-command.js';\n\nexport async function nonInteractiveRelease(\n services: CommandServices,\n model: ProjectModel,\n releaseProps: ReleaseCommandProps\n) {\n const { preEnteredComment, preSelectedVersionType } = releaseProps;\n\n if (!preSelectedVersionType) {\n throw new CliError({\n code: CliErrorCode.InsufficientNonInterractiveReleaseParameters(),\n cause: null,\n });\n }\n\n const version = await executeCommand<string>(services, model, (resolve) => (\n <ReleaseCommand\n {...releaseProps}\n preEnteredComment={preEnteredComment ?? ''}\n onReleaseDraftCreated={(version) => {\n resolve(version);\n }}\n />\n ));\n\n log(toJsonString({ version }, { spaces: 2 }).trimEnd());\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,mBAAkB;AAUlB,eAAsB,sBACpB,UACA,OACA,cACA;AACA,QAAM,EAAE,mBAAmB,uBAAuB,IAAI;AAEtD,MAAI,CAAC,wBAAwB;AAC3B,UAAM,IAAI,SAAS;AAAA,MACjB,MAAM,aAAa,6CAA6C;AAAA,MAChE,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,UAAU,MAAM,eAAuB,UAAU,OAAO,CAAC,YAC7D,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,mBAAmB,qBAAqB;AAAA,MACxC,uBAAuB,CAACC,aAAY;AAClC,gBAAQA,QAAO;AAAA,MACjB;AAAA;AAAA,EACF,CACD;AAED,MAAI,aAAa,EAAE,QAAQ,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,CAAC;AACxD;","names":["React","version"]}
1
+ {"version":3,"sources":["../src/non-interactive/release.tsx"],"sourcesContent":["import React from 'react';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\nimport type { CommandServices } from '@wix/cli-command-contract';\nimport { toJsonString } from '@wix/cli-fs';\nimport type { ProjectModel } from '../model.js';\nimport { log } from './logger.js';\nimport type { ReleaseCommandProps } from '../components/ReleaseCommand/ReleaseCommand.js';\nimport { ReleaseCommand } from '../components/ReleaseCommand/ReleaseCommand.js';\nimport { executeCommand } from './execute-command.js';\n\nexport async function nonInteractiveRelease(\n services: CommandServices,\n model: ProjectModel,\n releaseProps: ReleaseCommandProps\n) {\n const { preEnteredComment, preSelectedVersionType } = releaseProps;\n\n if (!preSelectedVersionType) {\n throw new CliError({\n code: CliErrorCode.InsufficientNonInterractiveReleaseParameters(),\n cause: null,\n });\n }\n\n const version = await executeCommand<string>(services, model, (resolve) => (\n <ReleaseCommand\n {...releaseProps}\n preEnteredComment={preEnteredComment ?? ''}\n onReleaseDraftCreated={(version) => {\n resolve(version);\n }}\n />\n ));\n\n log(toJsonString({ version }, { spaces: 2 }).trimEnd());\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,mBAAkB;AAUlB,eAAsB,sBACpB,UACA,OACA,cACA;AACA,QAAM,EAAE,mBAAmB,uBAAuB,IAAI;AAEtD,MAAI,CAAC,wBAAwB;AAC3B,UAAM,IAAI,SAAS;AAAA,MACjB,MAAM,aAAa,6CAA6C;AAAA,MAChE,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,QAAM,UAAU,MAAM,eAAuB,UAAU,OAAO,CAAC,YAC7D,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,mBAAmB,qBAAqB;AAAA,MACxC,uBAAuB,CAACC,aAAY;AAClC,gBAAQA,QAAO;AAAA,MACjB;AAAA;AAAA,EACF,CACD;AAED,MAAI,aAAa,EAAE,QAAQ,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,CAAC;AACxD;","names":["React","version"]}
@@ -3,14 +3,14 @@ const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  renderCommand,
5
5
  runCommand
6
- } from "./chunk-75BL4FR5.js";
7
- import "./chunk-I2PLZT4A.js";
8
- import "./chunk-K4IODCQP.js";
9
- import "./chunk-5LGI6O3F.js";
10
- import "./chunk-GGQMSU4O.js";
6
+ } from "./chunk-QREADZZF.js";
7
+ import "./chunk-Y4GJ3NS4.js";
8
+ import "./chunk-3X2VYRBF.js";
9
+ import "./chunk-WNR36YTI.js";
10
+ import "./chunk-ZLLXHWZF.js";
11
11
  import "./chunk-PYIAC2GK.js";
12
12
  export {
13
13
  renderCommand,
14
14
  runCommand
15
15
  };
16
- //# sourceMappingURL=render-command-OT7HQRPA.js.map
16
+ //# sourceMappingURL=render-command-3G25G5MU.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wix/cli-app",
3
3
  "description": "CLI tool for Wix apps",
4
- "version": "1.1.82",
4
+ "version": "1.1.83",
5
5
  "author": "Amit Dahan",
6
6
  "dependencies": {
7
7
  "esbuild": "^0.21.3",
@@ -15,15 +15,15 @@
15
15
  "@types/react": "^18.3.3",
16
16
  "@types/semver": "^7.5.8",
17
17
  "@wix/ambassador-blocks-v1-application-structure": "^1.0.3",
18
- "@wix/ambassador-blocks-v1-blocks-app": "^1.0.57",
18
+ "@wix/ambassador-blocks-v1-blocks-app": "^1.0.58",
19
19
  "@wix/ambassador-cli-site-override-service-v1-site-override": "^1.0.7",
20
20
  "@wix/ambassador-ctp-app-cloud-backend-service-v1-app-cloud-backend-deployment": "^1.0.8",
21
21
  "@wix/ambassador-ctp-gradual-rollout-v1-app-config": "^1.0.73",
22
- "@wix/ambassador-devcenter-apps-v1-app": "^1.0.594",
23
- "@wix/ambassador-devcenter-components-v1-component": "^1.0.455",
22
+ "@wix/ambassador-devcenter-apps-v1-app": "^1.0.595",
23
+ "@wix/ambassador-devcenter-components-v1-component": "^1.0.457",
24
24
  "@wix/app-cloud-uploader": "^1.18.0",
25
25
  "@wix/arm-client": "0.0.0",
26
- "@wix/bi-logger-dev-tools-data": "^1.106.0",
26
+ "@wix/bi-logger-dev-tools-data": "^1.111.0",
27
27
  "@wix/cli-app-definitions": "0.0.0",
28
28
  "@wix/cli-app-manifest": "1.0.0",
29
29
  "@wix/cli-app-platform-sdk": "0.0.0",
@@ -154,5 +154,5 @@
154
154
  ]
155
155
  }
156
156
  },
157
- "falconPackageHash": "723ff8177d8f504878946e301ab0aa27cf2bbbe9259c10572d967ee6"
157
+ "falconPackageHash": "ceb0045b0a7a95482bab91ce6517484a25ed182e38b6e506fdfffd00"
158
158
  }
@@ -1,20 +0,0 @@
1
- import { createRequire as _createRequire } from 'node:module';
2
- const require = _createRequire(import.meta.url);
3
- import {
4
- PreviewCommand
5
- } from "./chunk-FGCBIHDS.js";
6
- import "./chunk-PS7R6MWD.js";
7
- import "./chunk-OGO22IKX.js";
8
- import "./chunk-IB2KM2Q7.js";
9
- import "./chunk-HR6CTO67.js";
10
- import "./chunk-3GSDI3OJ.js";
11
- import "./chunk-ZR3N5INU.js";
12
- import "./chunk-5LGI6O3F.js";
13
- import "./chunk-PGKXOCZN.js";
14
- import "./chunk-XDWVTYW3.js";
15
- import "./chunk-GGQMSU4O.js";
16
- import "./chunk-PYIAC2GK.js";
17
- export {
18
- PreviewCommand
19
- };
20
- //# sourceMappingURL=PreviewCommand-KCCZ4ECQ.js.map
@@ -1,29 +0,0 @@
1
- import { createRequire as _createRequire } from 'node:module';
2
- const require = _createRequire(import.meta.url);
3
- import {
4
- ReleaseCommand,
5
- ReleaseVersionType
6
- } from "./chunk-VARU4VGB.js";
7
- import "./chunk-FGCBIHDS.js";
8
- import "./chunk-PS7R6MWD.js";
9
- import "./chunk-OGO22IKX.js";
10
- import "./chunk-IB2KM2Q7.js";
11
- import "./chunk-QSLRE7OK.js";
12
- import "./chunk-HR6CTO67.js";
13
- import "./chunk-3GSDI3OJ.js";
14
- import "./chunk-ZR3N5INU.js";
15
- import "./chunk-5LGI6O3F.js";
16
- import "./chunk-PGKXOCZN.js";
17
- import "./chunk-XDWVTYW3.js";
18
- import "./chunk-GGQMSU4O.js";
19
- import {
20
- init_esm_shims
21
- } from "./chunk-PYIAC2GK.js";
22
-
23
- // src/components/ReleaseCommand/index.ts
24
- init_esm_shims();
25
- export {
26
- ReleaseCommand,
27
- ReleaseVersionType
28
- };
29
- //# sourceMappingURL=ReleaseCommand-FJKPKE3Y.js.map