@sitecore-content-sdk/nextjs 1.5.0 → 2.0.0-canary.10

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 (172) hide show
  1. package/LICENSE.txt +202 -202
  2. package/dist/cjs/client/index.js +1 -1
  3. package/dist/cjs/client/sitecore-nextjs-client.js +4 -4
  4. package/dist/cjs/components/BYOCWrapper.js +0 -5
  5. package/dist/cjs/components/FEaaSWrapper.js +0 -5
  6. package/dist/cjs/components/NextImage.js +2 -2
  7. package/dist/cjs/config/define-config.js +7 -4
  8. package/dist/cjs/config-cli/define-cli-config.js +1 -1
  9. package/dist/cjs/debug.js +11 -0
  10. package/dist/cjs/editing/codegen/import-map-server.js +1 -1
  11. package/dist/cjs/editing/editing-config-middleware.js +13 -11
  12. package/dist/cjs/editing/editing-render-middleware.js +41 -29
  13. package/dist/cjs/editing/feaas-render-middleware.js +24 -13
  14. package/dist/cjs/editing/index.js +2 -2
  15. package/dist/cjs/editing/types.js +2 -0
  16. package/dist/cjs/editing/utils.js +35 -6
  17. package/dist/cjs/index.js +17 -11
  18. package/dist/cjs/middleware/index.js +1 -24
  19. package/dist/cjs/{middleware/app-router-multisite-middleware.js → proxy/app-router-multisite-proxy.js} +8 -8
  20. package/dist/cjs/proxy/index.js +29 -0
  21. package/dist/cjs/{middleware/locale-middleware.js → proxy/locale-proxy.js} +18 -15
  22. package/dist/cjs/{middleware/multisite-middleware.js → proxy/multisite-proxy.js} +23 -20
  23. package/dist/cjs/{middleware/personalize-middleware.js → proxy/personalize-proxy.js} +31 -28
  24. package/dist/cjs/{middleware/middleware.js → proxy/proxy.js} +31 -28
  25. package/dist/cjs/{middleware/redirects-middleware.js → proxy/redirects-proxy.js} +121 -111
  26. package/dist/cjs/route-handler/editing-config-route-handler.js +16 -13
  27. package/dist/cjs/route-handler/editing-render-route-handler.js +43 -32
  28. package/dist/cjs/route-handler/robots-route-handler.js +14 -6
  29. package/dist/cjs/route-handler/sitemap-route-handler.js +13 -5
  30. package/dist/cjs/site/index.js +1 -1
  31. package/dist/cjs/tools/codegen/import-map.js +2 -2
  32. package/dist/cjs/tools/generate-map.js +1 -1
  33. package/dist/cjs/tools/index.js +7 -8
  34. package/dist/cjs/tools/templating/byoc-component.js +1 -1
  35. package/dist/cjs/tools/templating/default-component.js +1 -1
  36. package/dist/cjs/tools/templating/utils.js +5 -6
  37. package/dist/cjs/utils/index.js +4 -5
  38. package/dist/cjs/utils/utils.js +3 -3
  39. package/dist/esm/client/index.js +1 -1
  40. package/dist/esm/client/sitecore-nextjs-client.js +4 -4
  41. package/dist/esm/components/BYOCWrapper.js +0 -5
  42. package/dist/esm/components/FEaaSWrapper.js +0 -5
  43. package/dist/esm/components/NextImage.js +2 -2
  44. package/dist/esm/config/define-config.js +7 -4
  45. package/dist/esm/config-cli/define-cli-config.js +1 -1
  46. package/dist/esm/debug.js +9 -0
  47. package/dist/esm/editing/codegen/import-map-server.js +1 -1
  48. package/dist/esm/editing/editing-config-middleware.js +4 -5
  49. package/dist/esm/editing/editing-render-middleware.js +22 -13
  50. package/dist/esm/editing/feaas-render-middleware.js +14 -6
  51. package/dist/esm/editing/index.js +2 -2
  52. package/dist/esm/editing/types.js +1 -0
  53. package/dist/esm/editing/utils.js +32 -4
  54. package/dist/esm/index.js +11 -12
  55. package/dist/esm/middleware/index.js +0 -9
  56. package/dist/esm/{middleware/app-router-multisite-middleware.js → proxy/app-router-multisite-proxy.js} +6 -6
  57. package/dist/esm/proxy/index.js +9 -0
  58. package/dist/esm/{middleware/locale-middleware.js → proxy/locale-proxy.js} +12 -12
  59. package/dist/esm/{middleware/multisite-middleware.js → proxy/multisite-proxy.js} +16 -16
  60. package/dist/esm/{middleware/personalize-middleware.js → proxy/personalize-proxy.js} +17 -17
  61. package/dist/esm/{middleware/middleware.js → proxy/proxy.js} +24 -24
  62. package/dist/esm/{middleware/redirects-middleware.js → proxy/redirects-proxy.js} +112 -102
  63. package/dist/esm/route-handler/editing-config-route-handler.js +4 -4
  64. package/dist/esm/route-handler/editing-render-route-handler.js +19 -11
  65. package/dist/esm/route-handler/robots-route-handler.js +8 -3
  66. package/dist/esm/route-handler/sitemap-route-handler.js +8 -3
  67. package/dist/esm/site/index.js +1 -1
  68. package/dist/esm/tools/codegen/import-map.js +1 -1
  69. package/dist/esm/tools/generate-map.js +1 -1
  70. package/dist/esm/tools/index.js +2 -1
  71. package/dist/esm/tools/templating/byoc-component.js +1 -1
  72. package/dist/esm/tools/templating/default-component.js +1 -1
  73. package/dist/esm/tools/templating/utils.js +1 -2
  74. package/dist/esm/utils/index.js +2 -2
  75. package/dist/esm/utils/utils.js +2 -2
  76. package/package.json +187 -181
  77. package/proxy.d.ts +1 -0
  78. package/types/client/index.d.ts +1 -1
  79. package/types/client/index.d.ts.map +1 -1
  80. package/types/client/sitecore-nextjs-client.d.ts +3 -3
  81. package/types/client/sitecore-nextjs-client.d.ts.map +1 -1
  82. package/types/components/BYOCWrapper.d.ts +0 -5
  83. package/types/components/BYOCWrapper.d.ts.map +1 -1
  84. package/types/components/FEaaSWrapper.d.ts +0 -5
  85. package/types/components/FEaaSWrapper.d.ts.map +1 -1
  86. package/types/components/Placeholder.d.ts +2 -2
  87. package/types/components/Placeholder.d.ts.map +1 -1
  88. package/types/config/define-config.d.ts +1 -1
  89. package/types/config/define-config.d.ts.map +1 -1
  90. package/types/config-cli/define-cli-config.d.ts +1 -1
  91. package/types/config-cli/define-cli-config.d.ts.map +1 -1
  92. package/types/debug.d.ts +7 -0
  93. package/types/debug.d.ts.map +1 -0
  94. package/types/editing/codegen/import-map-server.d.ts +1 -1
  95. package/types/editing/codegen/import-map-server.d.ts.map +1 -1
  96. package/types/editing/codegen/import-map-utils.d.ts +1 -1
  97. package/types/editing/codegen/import-map-utils.d.ts.map +1 -1
  98. package/types/editing/codegen/import-map.d.ts +1 -1
  99. package/types/editing/codegen/import-map.d.ts.map +1 -1
  100. package/types/editing/codegen/index.d.ts +1 -1
  101. package/types/editing/codegen/index.d.ts.map +1 -1
  102. package/types/editing/editing-config-middleware.d.ts +1 -1
  103. package/types/editing/editing-config-middleware.d.ts.map +1 -1
  104. package/types/editing/editing-render-middleware.d.ts +8 -1
  105. package/types/editing/editing-render-middleware.d.ts.map +1 -1
  106. package/types/editing/feaas-render-middleware.d.ts +1 -1
  107. package/types/editing/feaas-render-middleware.d.ts.map +1 -1
  108. package/types/editing/index.d.ts +3 -2
  109. package/types/editing/index.d.ts.map +1 -1
  110. package/types/editing/types.d.ts +37 -0
  111. package/types/editing/types.d.ts.map +1 -0
  112. package/types/editing/utils.d.ts +12 -1
  113. package/types/editing/utils.d.ts.map +1 -1
  114. package/types/index.d.ts +13 -11
  115. package/types/index.d.ts.map +1 -1
  116. package/types/middleware/index.d.ts +0 -9
  117. package/types/middleware/index.d.ts.map +1 -1
  118. package/types/middleware/robots-middleware.d.ts +1 -1
  119. package/types/middleware/robots-middleware.d.ts.map +1 -1
  120. package/types/middleware/sitemap-middleware.d.ts +1 -1
  121. package/types/middleware/sitemap-middleware.d.ts.map +1 -1
  122. package/types/{middleware/app-router-multisite-middleware.d.ts → proxy/app-router-multisite-proxy.d.ts} +6 -6
  123. package/types/proxy/app-router-multisite-proxy.d.ts.map +1 -0
  124. package/types/proxy/index.d.ts +10 -0
  125. package/types/proxy/index.d.ts.map +1 -0
  126. package/types/proxy/locale-proxy.d.ts +35 -0
  127. package/types/proxy/locale-proxy.d.ts.map +1 -0
  128. package/types/{middleware/multisite-middleware.d.ts → proxy/multisite-proxy.d.ts} +11 -11
  129. package/types/proxy/multisite-proxy.d.ts.map +1 -0
  130. package/types/{middleware/personalize-middleware.d.ts → proxy/personalize-proxy.d.ts} +10 -10
  131. package/types/proxy/personalize-proxy.d.ts.map +1 -0
  132. package/types/{middleware/middleware.d.ts → proxy/proxy.d.ts} +24 -26
  133. package/types/proxy/proxy.d.ts.map +1 -0
  134. package/types/{middleware/redirects-middleware.d.ts → proxy/redirects-proxy.d.ts} +11 -11
  135. package/types/proxy/redirects-proxy.d.ts.map +1 -0
  136. package/types/route-handler/editing-config-route-handler.d.ts +1 -1
  137. package/types/route-handler/editing-config-route-handler.d.ts.map +1 -1
  138. package/types/route-handler/editing-render-route-handler.d.ts +7 -0
  139. package/types/route-handler/editing-render-route-handler.d.ts.map +1 -1
  140. package/types/route-handler/robots-route-handler.d.ts +2 -2
  141. package/types/route-handler/robots-route-handler.d.ts.map +1 -1
  142. package/types/route-handler/sitemap-route-handler.d.ts +2 -2
  143. package/types/route-handler/sitemap-route-handler.d.ts.map +1 -1
  144. package/types/services/component-props-service.d.ts +1 -1
  145. package/types/services/component-props-service.d.ts.map +1 -1
  146. package/types/sharedTypes/component-props.d.ts +1 -1
  147. package/types/sharedTypes/component-props.d.ts.map +1 -1
  148. package/types/sharedTypes/sitecore-page-props.d.ts +2 -2
  149. package/types/sharedTypes/sitecore-page-props.d.ts.map +1 -1
  150. package/types/site/index.d.ts +1 -1
  151. package/types/site/index.d.ts.map +1 -1
  152. package/types/tools/codegen/import-map.d.ts +3 -3
  153. package/types/tools/codegen/import-map.d.ts.map +1 -1
  154. package/types/tools/generate-map.d.ts +1 -1
  155. package/types/tools/generate-map.d.ts.map +1 -1
  156. package/types/tools/index.d.ts +3 -1
  157. package/types/tools/index.d.ts.map +1 -1
  158. package/types/tools/templating/byoc-component.d.ts +1 -1
  159. package/types/tools/templating/byoc-component.d.ts.map +1 -1
  160. package/types/tools/templating/default-component.d.ts +1 -1
  161. package/types/tools/templating/default-component.d.ts.map +1 -1
  162. package/types/tools/templating/utils.d.ts +2 -2
  163. package/types/tools/templating/utils.d.ts.map +1 -1
  164. package/types/utils/index.d.ts +2 -2
  165. package/types/utils/index.d.ts.map +1 -1
  166. package/types/middleware/app-router-multisite-middleware.d.ts.map +0 -1
  167. package/types/middleware/locale-middleware.d.ts +0 -35
  168. package/types/middleware/locale-middleware.d.ts.map +0 -1
  169. package/types/middleware/middleware.d.ts.map +0 -1
  170. package/types/middleware/multisite-middleware.d.ts.map +0 -1
  171. package/types/middleware/personalize-middleware.d.ts.map +0 -1
  172. package/types/middleware/redirects-middleware.d.ts.map +0 -1
@@ -22,7 +22,7 @@ export declare class FEAASRenderMiddleware extends RenderMiddlewareBase {
22
22
  private pageUrl;
23
23
  private defaultPageUrl;
24
24
  /**
25
- * @param {EditingRenderMiddlewareConfig} [config] Editing render middleware config
25
+ * @param {FEAASRenderMiddlewareConfig} [config] FEAAS render middleware config
26
26
  */
27
27
  constructor(config?: FEAASRenderMiddlewareConfig | undefined);
28
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"feaas-render-middleware.d.ts","sourceRoot":"","sources":["../../src/editing/feaas-render-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAQvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAG3D;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,oBAAoB;IAOjD,SAAS,CAAC,MAAM,CAAC,EAAE,2BAA2B;IAN1D,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,cAAc,CAAmB;IAEzC;;OAEG;gBACmB,MAAM,CAAC,EAAE,2BAA2B,YAAA;IAM1D;;;OAGG;IACI,UAAU,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC;IAIjF,OAAO,CAAC,OAAO,CAiFb;CACH"}
1
+ {"version":3,"file":"feaas-render-middleware.d.ts","sourceRoot":"","sources":["../../src/editing/feaas-render-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAOvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAI3D;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,oBAAoB;IAOjD,SAAS,CAAC,MAAM,CAAC,EAAE,2BAA2B;IAN1D,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,cAAc,CAAmB;IAEzC;;OAEG;gBACmB,MAAM,CAAC,EAAE,2BAA2B,YAAA;IAM1D;;;OAGG;IACI,UAAU,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC;IAIjF,OAAO,CAAC,OAAO,CA2Fb;CACH"}
@@ -1,7 +1,8 @@
1
- export { EditingService } from '@sitecore-content-sdk/core/editing';
1
+ export { EditingService } from '@sitecore-content-sdk/content/editing';
2
2
  export { EditingRenderMiddleware, EditingRenderMiddlewareConfig, } from './editing-render-middleware';
3
3
  export { isDesignLibraryPreviewData, getQueryParamsForPropagation, getHeadersForPropagation, } from './utils';
4
4
  export { FEAASRenderMiddleware, FEAASRenderMiddlewareConfig } from './feaas-render-middleware';
5
5
  export { EditingConfigMiddleware, EditingConfigMiddlewareConfig, } from './editing-config-middleware';
6
- export { RenderingType, EDITING_COMPONENT_PLACEHOLDER, EDITING_COMPONENT_ID, } from '@sitecore-content-sdk/core/layout';
6
+ export { RenderingType, EDITING_COMPONENT_PLACEHOLDER, EDITING_COMPONENT_ID, } from '@sitecore-content-sdk/content/layout';
7
+ export type { AllowedQueryParam, AllowedQueryParamsResolver, AllowedQueryParams } from './types';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EACL,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,aAAa,EACb,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EACL,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EACL,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,aAAa,EACb,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Represents an allowed query parameter.
3
+ * @public
4
+ */
5
+ export interface AllowedQueryParam {
6
+ /**
7
+ * The name of the query parameter to allow.
8
+ */
9
+ name: string;
10
+ /**
11
+ * Whether the query parameter is required.
12
+ */
13
+ required?: boolean;
14
+ }
15
+ /**
16
+ * Resolver function for allowed query parameters, which can be used to extract additional parameters from the query string beyond the required editing parameters.
17
+ * @param {string[]} queryParams Array of query parameters from incoming URL.
18
+ * @returns {Array<AllowedQueryParam | string>} Allowed query editing parameters.
19
+ * @public
20
+ */
21
+ export type AllowedQueryParamsResolver = (queryParams: string[]) => Array<AllowedQueryParam | string>;
22
+ /**
23
+ * Allowed query parameters which can be defined as an array of parameter names or objects, or a resolver function which can be used to extract additional parameters from the query string beyond the required editing parameters.
24
+ * @public
25
+ */
26
+ export type AllowedQueryParams = Array<AllowedQueryParam | string> | AllowedQueryParamsResolver;
27
+ /**
28
+ * Result of processing allowed query parameters, including any missing required parameters and the set of allowed parameters that were extracted from the query string.
29
+ * @internal
30
+ */
31
+ export interface GetAllowedQueryParamsResult {
32
+ missingAllowedParams: string[];
33
+ allowedQueryParams: {
34
+ [key: string]: unknown;
35
+ };
36
+ }
37
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/editing/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,CACvC,WAAW,EAAE,MAAM,EAAE,KAClB,KAAK,CAAC,iBAAiB,GAAG,MAAM,CAAC,CAAC;AAEvC;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,iBAAiB,GAAG,MAAM,CAAC,GAAG,0BAA0B,CAAC;AAEhG;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,kBAAkB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CAChD"}
@@ -1,8 +1,9 @@
1
- import { DesignLibraryRenderPreviewData, EditingRenderQueryParams } from '@sitecore-content-sdk/core/editing';
1
+ import { DesignLibraryRenderPreviewData, EditingRenderQueryParams } from '@sitecore-content-sdk/content/editing';
2
2
  import { NextApiRequest } from 'next';
3
3
  import { NextRequest } from 'next/server';
4
4
  import { IncomingHttpHeaders } from 'http';
5
5
  import { NativeDataFetcher } from '@sitecore-content-sdk/core';
6
+ import { AllowedQueryParams, GetAllowedQueryParamsResult } from './types';
6
7
  /**
7
8
  * Gets editing secret value from request
8
9
  * @param {NextApiRequest | NextRequest} req incoming request
@@ -19,6 +20,16 @@ export declare const mapEditingParams: (query: {
19
20
  }) => {
20
21
  [key: string]: string | undefined;
21
22
  };
23
+ /**
24
+ * Parses the query parameters based on the provided allowed parameters or a resolver function, to extract additional parameters that should be allowed.
25
+ * @param {{ [key: string]: string | undefined }} queryParams Object of query parameters from incoming URL.
26
+ * @param {AllowedQueryParams} allowedParams Allowed parameters to map.
27
+ * @returns Object containing the list of missing required parameters and the allowed query parameters that were extracted.
28
+ * @internal
29
+ */
30
+ export declare const getAllowedQueryParams: (queryParams: {
31
+ [key: string]: unknown;
32
+ }, allowedParams?: AllowedQueryParams) => GetAllowedQueryParamsResult;
22
33
  /**
23
34
  * Next.js preview cookies enum
24
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/editing/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAE9B,wBAAwB,EAIzB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GAAI,KAAK,cAAc,GAAG,WAAW,yCAgB5E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO;IACtC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC,KAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAA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aAYlF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,GACvC,OAAO,OAAO,CAAC;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,CAAC,KACnD;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAazB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,SAAS,mBAAmB,GAAG,OAAO,KACrC;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAazB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,YAAY,GAAG,EACf,oBAAoB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAAE,EACzD,mBAAmB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAC5C,SAAS,MAAM,EAAE,EACjB,aAAa,iBAAiB,KAC7B,OAAO,CAAC,MAAM,CAgDhB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACrC,MAAM,OAAO,KACZ,IAAI,IAAI,8BAOV,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,cAAc,GAAG,WAAW,WAmBjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,cAIxB,CAAC"}
package/types/index.d.ts CHANGED
@@ -1,13 +1,15 @@
1
- export { constants, NativeDataFetcher, NativeDataFetcherConfig, NativeDataFetcherResponse, NativeDataFetcherError, HTMLLink, enableDebug, debug, CacheClient, CacheOptions, MemoryCacheClient, } from '@sitecore-content-sdk/core';
2
- export { LayoutServiceData, LayoutServicePageState, LayoutServiceContext, LayoutServiceContextData, LayoutService, LayoutServiceConfig, PlaceholderData, PlaceholdersData, RouteData, Field, Item, getChildPlaceholder, getFieldValue, ComponentRendering, ComponentFields, ComponentParams, getContentStylesheetLink, EditMode, RenderingType, } from '@sitecore-content-sdk/core/layout';
3
- export { PageMode, ErrorPage, Page } from '@sitecore-content-sdk/core/client';
4
- export { ComponentLayoutService } from '@sitecore-content-sdk/core/editing';
5
- export { mediaApi } from '@sitecore-content-sdk/core/media';
6
- export { DictionaryPhrases, DictionaryService, DictionaryServiceConfig, } from '@sitecore-content-sdk/core/i18n';
7
- export { personalizeLayout, getPersonalizedRewrite, getPersonalizedRewriteData, getGroomedVariantIds, normalizePersonalizedRewrite, CdpHelper, PersonalizeService, } from '@sitecore-content-sdk/core/personalize';
8
- export { SitePathService, SitePathServiceConfig, RedirectsService, RedirectsServiceConfig, REDIRECT_TYPE_301, REDIRECT_TYPE_302, REDIRECT_TYPE_SERVER_TRANSFER, RedirectInfo, } from '@sitecore-content-sdk/core/site';
9
- export { StaticPath } from '@sitecore-content-sdk/core';
10
- export { SitemapXmlService, SitemapXmlServiceConfig, ErrorPagesService, ErrorPagesServiceConfig, RobotsQueryResult, RobotsService, RobotsServiceConfig, ErrorPages, SiteInfo, SiteResolver, SiteInfoService, SiteInfoServiceConfig, getSiteRewrite, getSiteRewriteData, normalizeSiteRewrite, } from '@sitecore-content-sdk/core/site';
1
+ export { default as debug } from './debug';
2
+ export { constants, NativeDataFetcher, NativeDataFetcherConfig, NativeDataFetcherResponse, NativeDataFetcherError, enableDebug, CacheClient, CacheOptions, MemoryCacheClient, } from '@sitecore-content-sdk/core';
3
+ export { HTMLLink } from '@sitecore-content-sdk/content';
4
+ export { LayoutServiceData, LayoutServicePageState, LayoutServiceContext, LayoutServiceContextData, LayoutService, LayoutServiceConfig, PlaceholderData, PlaceholdersData, RouteData, Field, Item, getChildPlaceholder, getFieldValue, ComponentRendering, ComponentFields, ComponentParams, getContentStylesheetLink, EditMode, RenderingType, } from '@sitecore-content-sdk/content/layout';
5
+ export { PageMode, ErrorPage, Page } from '@sitecore-content-sdk/content/client';
6
+ export { ComponentLayoutService } from '@sitecore-content-sdk/content/editing';
7
+ export { mediaApi } from '@sitecore-content-sdk/content/media';
8
+ export { DictionaryPhrases, DictionaryService, DictionaryServiceConfig, } from '@sitecore-content-sdk/content/i18n';
9
+ export { personalizeLayout, getPersonalizedRewrite, getPersonalizedRewriteData, getGroomedVariantIds, normalizePersonalizedRewrite, CdpHelper, PersonalizeService, } from '@sitecore-content-sdk/content/personalize';
10
+ export { SitePathService, SitePathServiceConfig, RedirectsService, RedirectsServiceConfig, REDIRECT_TYPE_301, REDIRECT_TYPE_302, REDIRECT_TYPE_SERVER_TRANSFER, RedirectInfo, } from '@sitecore-content-sdk/content/site';
11
+ export { StaticPath } from '@sitecore-content-sdk/content';
12
+ export { SitemapXmlService, SitemapXmlServiceConfig, ErrorPagesService, ErrorPagesServiceConfig, RobotsQueryResult, RobotsService, RobotsServiceConfig, ErrorPages, SiteInfo, SiteResolver, SiteInfoService, SiteInfoServiceConfig, getSiteRewrite, getSiteRewriteData, normalizeSiteRewrite, } from '@sitecore-content-sdk/content/site';
11
13
  export { ComponentPropsCollection, ComponentPropsError, NextjsContentSdkComponent, GetComponentServerProps, } from './sharedTypes/component-props';
12
14
  export { SitecorePageProps } from './sharedTypes/sitecore-page-props';
13
15
  export { ComponentPropsService } from './services/component-props-service';
@@ -21,5 +23,5 @@ import * as BYOCWrapper from './components/BYOCWrapper';
21
23
  export { FEaaSClientWrapper, FEaaSServerWrapper, BYOCClientWrapper, BYOCServerWrapper, } from '@sitecore-content-sdk/react';
22
24
  export { FEaaSWrapper };
23
25
  export { BYOCWrapper };
24
- export { ComponentMap, Image, ImageField, ImageFieldValue, ImageProps, LinkField, LinkFieldValue, Text, TextField, DateField, FEaaSComponent, FEaaSComponentProps, FEaaSComponentParams, fetchFEaaSComponentServerProps, BYOCComponentParams, BYOCComponent, BYOCComponentProps, getDesignLibraryStylesheetLinks, File, FileField, RichTextField, DesignLibrary, DesignLibraryApp, DefaultEmptyFieldEditingComponentImage, DefaultEmptyFieldEditingComponentText, PlaceholderComponentProps, SitecoreProvider, SitecoreProviderState, SitecoreProviderReactContext, withSitecore, useSitecore, withEditorChromes, withPlaceholder, withDatasourceCheck, ImageSizeParameters, WithSitecoreOptions, WithSitecoreProps, WithSitecoreHocProps, withFieldMetadata, withEmptyFieldEditingComponent, EditingScripts, Form, ClientEditingChromesUpdate, AppPlaceholder, AppPlaceholderProps, } from '@sitecore-content-sdk/react';
26
+ export { ComponentMap, Image, ImageField, ImageFieldValue, ImageProps, LinkField, LinkFieldValue, Text, TextField, DateField, FEaaSComponent, FEaaSComponentProps, FEaaSComponentParams, fetchFEaaSComponentServerProps, BYOCComponentParams, BYOCComponent, BYOCComponentProps, getDesignLibraryStylesheetLinks, File, FileField, RichTextField, DesignLibrary, DesignLibraryApp, DefaultEmptyFieldEditingComponentImage, DefaultEmptyFieldEditingComponentText, PlaceholderComponentProps, SitecoreProvider, SitecoreProviderState, SitecoreProviderReactContext, withSitecore, useSitecore, withEditorChromes, withAppPlaceholder, withPlaceholder, withDatasourceCheck, ImageSizeParameters, withFieldMetadata, withEmptyFieldEditingComponent, EditingScripts, Form, ClientEditingChromesUpdate, AppPlaceholder, AppPlaceholderProps, renderEmptyPlaceholder, } from '@sitecore-content-sdk/react';
25
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,QAAQ,EACR,WAAW,EACX,KAAK,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,IAAI,EACJ,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,eAAe,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B,EACrB,4BAA4B,EAC5B,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,8BAA8B,EAC9B,cAAc,EACd,IAAI,EACJ,0BAA0B,EAC1B,cAAc,EACd,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC"}
@@ -1,12 +1,3 @@
1
- export { debug } from '@sitecore-content-sdk/core';
2
- export { MiddlewareBase, MiddlewareBaseConfig, Middleware, defineMiddleware } from './middleware';
3
- export { RedirectsMiddleware, RedirectsMiddlewareConfig } from './redirects-middleware';
4
- export { PersonalizeMiddleware, PersonalizeMiddlewareConfig } from './personalize-middleware';
5
- export { MultisiteMiddleware, MultisiteMiddlewareConfig } from './multisite-middleware';
6
- export { AppRouterMultisiteMiddleware } from './app-router-multisite-middleware';
7
1
  export { SitemapMiddleware } from './sitemap-middleware';
8
2
  export { RobotsMiddleware } from './robots-middleware';
9
- export { LocaleMiddleware, LocaleMiddlewareConfig } from './locale-middleware';
10
- export { PersonalizeService, PersonalizeServiceConfig, } from '@sitecore-content-sdk/core/personalize';
11
- export { RedirectsService, RedirectsServiceConfig, REDIRECT_TYPE_301, REDIRECT_TYPE_302, REDIRECT_TYPE_SERVER_TRANSFER, RedirectInfo, } from '@sitecore-content-sdk/core/site';
12
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/middleware/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,6BAA6B,EAC7B,YAAY,GACb,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/middleware/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { NextApiRequest, NextApiResponse } from 'next';
2
- import { SitecoreClient } from '@sitecore-content-sdk/core/client';
2
+ import { SitecoreClient } from '@sitecore-content-sdk/content/client';
3
3
  import { SiteInfo } from '../site';
4
4
  /**
5
5
  * Middleware for handling robots.txt requests in a Next.js application.
@@ -1 +1 @@
1
- {"version":3,"file":"robots-middleware.d.ts","sourceRoot":"","sources":["../../src/middleware/robots-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAgB,MAAM,SAAS,CAAC;AAEjD;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,YAAY,CAAe;gBAEvB,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;IAKrD,UAAU,UAIiB,cAAc,OAAO,eAAe,KAAG,OAAO,CAAC,IAAI,CAAC;YAAjE,OAAO;CAiBtB"}
1
+ {"version":3,"file":"robots-middleware.d.ts","sourceRoot":"","sources":["../../src/middleware/robots-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAgB,MAAM,SAAS,CAAC;AAEjD;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,YAAY,CAAe;gBAEvB,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;IAKrD,UAAU,UAIiB,cAAc,OAAO,eAAe,KAAG,OAAO,CAAC,IAAI,CAAC;YAAjE,OAAO;CAiBtB"}
@@ -1,5 +1,5 @@
1
1
  import { NextApiRequest, NextApiResponse } from 'next';
2
- import { SitecoreClient } from '@sitecore-content-sdk/core/client';
2
+ import { SitecoreClient } from '@sitecore-content-sdk/content/client';
3
3
  import { SiteInfo } from '../site';
4
4
  /**
5
5
  * Middleware for handling sitemap requests in a Next.js application.
@@ -1 +1 @@
1
- {"version":3,"file":"sitemap-middleware.d.ts","sourceRoot":"","sources":["../../src/middleware/sitemap-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,cAAc,EAAqB,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAgB,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,YAAY,CAAe;gBAEvB,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;IAKrD,UAAU,UAIiB,cAAc,OAAO,eAAe,KAAG,OAAO,CAAC,IAAI,CAAC;YAAjE,OAAO;CAoBtB"}
1
+ {"version":3,"file":"sitemap-middleware.d.ts","sourceRoot":"","sources":["../../src/middleware/sitemap-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,cAAc,EAAqB,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAgB,MAAM,SAAS,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,YAAY,CAAe;gBAEvB,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;IAKrD,UAAU,UAIiB,cAAc,OAAO,eAAe,KAAG,OAAO,CAAC,IAAI,CAAC;YAAjE,OAAO;CAoBtB"}
@@ -1,18 +1,18 @@
1
1
  import { NextResponse } from 'next/server';
2
- import { MultisiteMiddleware } from './multisite-middleware';
2
+ import { MultisiteProxy } from './multisite-proxy';
3
3
  /**
4
- * Middleware/handler for enabling multisite support in the Next.js App Router.
4
+ * Proxy/handler for enabling multisite support in the Next.js App Router.
5
5
  * @public
6
6
  */
7
- export declare class AppRouterMultisiteMiddleware extends MultisiteMiddleware {
7
+ export declare class AppRouterMultisiteProxy extends MultisiteProxy {
8
8
  /**
9
9
  * Warns when multisite is disabled in App Router.
10
- * The middleware will still run to prevent routing errors.
10
+ * The proxy will still run to prevent routing errors.
11
11
  * @param {NextResponse} _res response (unused, kept for method signature compatibility)
12
12
  */
13
13
  protected shouldWarnWhenDisabled(_res: NextResponse): void;
14
14
  /**
15
- * In App Router, we cannot skip the middleware even if enabled is false,
15
+ * In App Router, we cannot skip the proxy even if enabled is false,
16
16
  * because the route structure requires the [site] segment.
17
17
  * @returns {boolean} always returns false (never skip) for App Router
18
18
  */
@@ -25,4 +25,4 @@ export declare class AppRouterMultisiteMiddleware extends MultisiteMiddleware {
25
25
  */
26
26
  protected getSiteRewrite(pathname: string, siteName: string): string;
27
27
  }
28
- //# sourceMappingURL=app-router-multisite-middleware.d.ts.map
28
+ //# sourceMappingURL=app-router-multisite-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-router-multisite-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/app-router-multisite-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IACzD;;;;OAIG;IAEH,SAAS,CAAC,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAS1D;;;;OAIG;IACH,SAAS,CAAC,sBAAsB,IAAI,OAAO;IAI3C;;;;;OAKG;IACH,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;CAIrE"}
@@ -0,0 +1,10 @@
1
+ export { ProxyBase, ProxyBaseConfig, ProxyHandler, defineProxy } from './proxy';
2
+ export { RedirectsProxy, RedirectsProxyConfig } from './redirects-proxy';
3
+ export { PersonalizeProxy, PersonalizeProxyConfig } from './personalize-proxy';
4
+ export { MultisiteProxy, MultisiteProxyConfig } from './multisite-proxy';
5
+ export { AppRouterMultisiteProxy } from './app-router-multisite-proxy';
6
+ export { LocaleProxy, LocaleProxyConfig } from './locale-proxy';
7
+ export { PersonalizeService, PersonalizeServiceConfig, } from '@sitecore-content-sdk/content/personalize';
8
+ export { RedirectsService, RedirectsServiceConfig, REDIRECT_TYPE_301, REDIRECT_TYPE_302, REDIRECT_TYPE_SERVER_TRANSFER, RedirectInfo, } from '@sitecore-content-sdk/content/site';
9
+ export { default as debug } from '../debug';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proxy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,6BAA6B,EAC7B,YAAY,GACb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { NextResponse, NextRequest } from 'next/server';
2
+ import { ProxyBase, ProxyBaseConfig } from './proxy';
3
+ /**
4
+ * The interface for the Locale proxy configuration.
5
+ * @public
6
+ */
7
+ export type LocaleProxyConfig = ProxyBaseConfig & {
8
+ /**
9
+ * List of locales supported by the application
10
+ */
11
+ locales: string[];
12
+ };
13
+ /**
14
+ * Proxy/handler for handling locale-based routing in the Next.js App Router.
15
+ * This proxy is responsible for extracting the locale from the request path and rewriting it if necessary.
16
+ * It also sets the locale header in the response.
17
+ * @public
18
+ */
19
+ export declare class LocaleProxy extends ProxyBase {
20
+ protected config: LocaleProxyConfig;
21
+ /**
22
+ * @param {LocaleProxyConfig} config Locale proxy config
23
+ */
24
+ constructor(config: LocaleProxyConfig);
25
+ handle: (req: NextRequest, res: NextResponse) => Promise<NextResponse>;
26
+ protected disabled(req: NextRequest, res: NextResponse): boolean | undefined;
27
+ /**
28
+ * Extract locale from path
29
+ * @param {string} path request path
30
+ * @returns {string | undefined} the locale if found
31
+ */
32
+ protected getLocaleFromPath(path: string): string | undefined;
33
+ private setLocaleHeader;
34
+ }
35
+ //# sourceMappingURL=locale-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/locale-proxy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAsB,MAAM,SAAS,CAAC;AAGzE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG;IAChD;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,WAAY,SAAQ,SAAS;IAI5B,SAAS,CAAC,MAAM,EAAE,iBAAiB;IAH/C;;OAEG;gBACmB,MAAM,EAAE,iBAAiB;IAI/C,MAAM,GAAU,KAAK,WAAW,EAAE,KAAK,YAAY,KAAG,OAAO,CAAC,YAAY,CAAC,CA6CzE;IAEF,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,GAAG,OAAO,GAAG,SAAS;IAK5E;;;;OAIG;IACH,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAM7D,OAAO,CAAC,eAAe;CAGxB"}
@@ -1,5 +1,5 @@
1
1
  import { NextResponse, NextRequest } from 'next/server';
2
- import { MiddlewareBase, MiddlewareBaseConfig } from './middleware';
2
+ import { ProxyBase, ProxyBaseConfig } from './proxy';
3
3
  import { SitecoreConfig } from '../config';
4
4
  export type CookieAttributes = {
5
5
  /**
@@ -16,20 +16,20 @@ export type CookieAttributes = {
16
16
  sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
17
17
  };
18
18
  /**
19
- * The interface for the MultisiteMiddleware configuration.
19
+ * The interface for the MultisiteProxy configuration.
20
20
  * @public
21
21
  */
22
- export type MultisiteMiddlewareConfig = MiddlewareBaseConfig & SitecoreConfig['multisite'];
22
+ export type MultisiteProxyConfig = ProxyBaseConfig & SitecoreConfig['multisite'];
23
23
  /**
24
- * Middleware / handler for multisite support
24
+ * Proxy / handler for multisite support
25
25
  * @public
26
26
  */
27
- export declare class MultisiteMiddleware extends MiddlewareBase {
28
- protected config: MultisiteMiddlewareConfig;
27
+ export declare class MultisiteProxy extends ProxyBase {
28
+ protected config: MultisiteProxyConfig;
29
29
  /**
30
- * @param {MultisiteMiddlewareConfig} [config] Multisite middleware config
30
+ * @param {MultisiteProxyConfig} [config] Multisite proxy config
31
31
  */
32
- constructor(config: MultisiteMiddlewareConfig);
32
+ constructor(config: MultisiteProxyConfig);
33
33
  handle: (req: NextRequest, res: NextResponse) => Promise<NextResponse>;
34
34
  protected disabled(req: NextRequest, res: NextResponse): boolean | undefined;
35
35
  /**
@@ -38,9 +38,9 @@ export declare class MultisiteMiddleware extends MiddlewareBase {
38
38
  */
39
39
  protected shouldWarnWhenDisabled(_res: NextResponse): void;
40
40
  /**
41
- * Determines if middleware should be skipped when multisite is disabled.
41
+ * Determines if proxy should be skipped when multisite is disabled.
42
42
  * Override in subclasses to provide router-specific behavior.
43
- * @returns {boolean} true if middleware should be skipped when disabled
43
+ * @returns {boolean} true if proxy should be skipped when disabled
44
44
  */
45
45
  protected shouldSkipWhenDisabled(): boolean;
46
46
  /**
@@ -51,4 +51,4 @@ export declare class MultisiteMiddleware extends MiddlewareBase {
51
51
  */
52
52
  protected getSiteRewrite(pathname: string, siteName: string): string;
53
53
  }
54
- //# sourceMappingURL=multisite-middleware.d.ts.map
54
+ //# sourceMappingURL=multisite-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multisite-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/multisite-proxy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAuB,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAI3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;CACjE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;AAEjF;;;GAGG;AACH,qBAAa,cAAe,SAAQ,SAAS;IAI/B,SAAS,CAAC,MAAM,EAAE,oBAAoB;IAHlD;;OAEG;gBACmB,MAAM,EAAE,oBAAoB;IAIlD,MAAM,GAAU,KAAK,WAAW,EAAE,KAAK,YAAY,KAAG,OAAO,CAAC,YAAY,CAAC,CA2FzE;IAEF,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,GAAG,OAAO,GAAG,SAAS;IAK5E;;;OAGG;IAEH,SAAS,CAAC,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAI1D;;;;OAIG;IACH,SAAS,CAAC,sBAAsB,IAAI,OAAO;IAI3C;;;;;OAKG;IACH,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;CAKrE"}
@@ -1,6 +1,6 @@
1
1
  import { NextResponse, NextRequest } from 'next/server';
2
- import { PersonalizeService, PersonalizeInfo } from '@sitecore-content-sdk/core/personalize';
3
- import { MiddlewareBase, MiddlewareBaseConfig } from './middleware';
2
+ import { PersonalizeService, PersonalizeInfo } from '@sitecore-content-sdk/content/personalize';
3
+ import { ProxyBase, ProxyBaseConfig } from './proxy';
4
4
  import { SitecoreConfig } from '../config';
5
5
  /**
6
6
  * Represents the geolocation data used for personalization
@@ -11,10 +11,10 @@ export type PersonalizeGeoData = {
11
11
  region?: string;
12
12
  };
13
13
  /**
14
- * The interface for the PersonalizeMiddleware configuration.
14
+ * The interface for the PersonalizeProxy configuration.
15
15
  * @public
16
16
  */
17
- export type PersonalizeMiddlewareConfig = MiddlewareBaseConfig & SitecoreConfig['api']['edge'] & SitecoreConfig['personalize'] & {
17
+ export type PersonalizeProxyConfig = ProxyBaseConfig & SitecoreConfig['api']['edge'] & SitecoreConfig['personalize'] & {
18
18
  personalizeService?: PersonalizeService;
19
19
  getExtraUtmParams?: (req: NextRequest) => Partial<ExperienceParams['utm']>;
20
20
  extractGeoDataCb?: (req?: NextRequest) => Promise<PersonalizeGeoData> | PersonalizeGeoData;
@@ -40,16 +40,16 @@ type PersonalizeExecution = {
40
40
  variantIds: string[];
41
41
  };
42
42
  /**
43
- * Middleware / handler to support Sitecore Personalize
43
+ * Proxy / handler to support Sitecore Personalize
44
44
  * @public
45
45
  */
46
- export declare class PersonalizeMiddleware extends MiddlewareBase {
47
- protected config: PersonalizeMiddlewareConfig;
46
+ export declare class PersonalizeProxy extends ProxyBase {
47
+ protected config: PersonalizeProxyConfig;
48
48
  protected personalizeService: PersonalizeService | null;
49
49
  /**
50
- * @param {PersonalizeMiddlewareConfig} [config] Personalize middleware config
50
+ * @param {PersonalizeProxyConfig} [config] Personalize proxy config
51
51
  */
52
- constructor(config: PersonalizeMiddlewareConfig);
52
+ constructor(config: PersonalizeProxyConfig);
53
53
  handle: (req: NextRequest, res: NextResponse) => Promise<NextResponse>;
54
54
  protected disabled(req: NextRequest, res: NextResponse): boolean | undefined;
55
55
  protected getExperienceParams(req: NextRequest): ExperienceParams;
@@ -78,4 +78,4 @@ export declare class PersonalizeMiddleware extends MiddlewareBase {
78
78
  protected getPersonalizeExecutions(personalizeInfo: PersonalizeInfo, language: string): PersonalizeExecution[];
79
79
  }
80
80
  export {};
81
- //# sourceMappingURL=personalize-middleware.d.ts.map
81
+ //# sourceMappingURL=personalize-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"personalize-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/personalize-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,kBAAkB,EAElB,eAAe,EAGhB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAuB,MAAM,SAAS,CAAC;AAG1E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAClD,cAAc,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAC7B,cAAc,CAAC,aAAa,CAAC,GAAG;IAC9B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3E,gBAAgB,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;CAC5F,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE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,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,GAAG,CAAC,EAAE,kBAAkB,CAAC;KAC1B,EACD,OAAO,EAAE,WAAW;mBAiBP,MAAM;;IAIrB;;;;;OAKG;IACH,SAAS,CAAC,wBAAwB,CAChC,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,MAAM,GACf,oBAAoB,EAAE;CA8C1B"}
@@ -1,18 +1,18 @@
1
- import { SiteInfo, SiteResolver } from '@sitecore-content-sdk/core/site';
1
+ import { SiteInfo, SiteResolver } from '@sitecore-content-sdk/content/site';
2
2
  import { GraphQLRequestClientFactory } from '@sitecore-content-sdk/core';
3
- import { NextRequest, NextFetchEvent, NextResponse } from 'next/server';
4
- import { GraphQLClientOptions } from '@sitecore-content-sdk/core/client';
3
+ import { NextRequest, NextResponse } from 'next/server';
4
+ import { GraphQLClientOptions } from '@sitecore-content-sdk/content/client';
5
5
  export declare const REWRITE_HEADER_NAME = "x-sc-rewrite";
6
6
  export declare const LOCALE_HEADER_NAME = "x-sc-locale";
7
7
  /**
8
- * The interface for the Middleware configuration.
8
+ * The interface for the Proxy configuration.
9
9
  * @public
10
10
  */
11
- export type MiddlewareBaseConfig = {
11
+ export type ProxyBaseConfig = {
12
12
  /**
13
- * function, determines if middleware execution should be skipped, based on cookie, header, or other considerations
14
- * @param {NextRequest} req request object from middleware handler
15
- * @param {NextResponse} res response object from middleware handler
13
+ * function, determines if proxy execution should be skipped, based on cookie, header, or other considerations
14
+ * @param {NextRequest} req request object from proxy handler
15
+ * @param {NextResponse} res response object from proxy handler
16
16
  */
17
17
  skip?: (req: NextRequest, res: NextResponse) => boolean;
18
18
  /**
@@ -31,27 +31,26 @@ export type MiddlewareBaseConfig = {
31
31
  sites: SiteInfo[];
32
32
  };
33
33
  /**
34
- * Middleware class to be extended by all middleware implementations
34
+ * Proxy handler class to be extended by all proxy implementations
35
35
  * @public
36
36
  */
37
- export declare abstract class Middleware {
37
+ export declare abstract class ProxyHandler {
38
38
  /**
39
- * Handler method to execute middleware logic
39
+ * Handler method to execute proxy logic
40
40
  * @param {NextRequest} req request
41
41
  * @param {NextResponse} res response
42
- * @param {NextFetchEvent} ev fetch event
43
42
  */
44
- abstract handle(req: NextRequest, res: NextResponse, ev: NextFetchEvent): Promise<NextResponse>;
43
+ abstract handle(req: NextRequest, res: NextResponse): Promise<NextResponse>;
45
44
  }
46
45
  /**
47
- * Base middleware class with common methods
46
+ * Base proxy class with common methods
48
47
  * @public
49
48
  */
50
- export declare abstract class MiddlewareBase extends Middleware {
51
- protected config: MiddlewareBaseConfig;
49
+ export declare abstract class ProxyBase extends ProxyHandler {
50
+ protected config: ProxyBaseConfig;
52
51
  protected defaultHostname: string;
53
52
  protected siteResolver: SiteResolver;
54
- constructor(config: MiddlewareBaseConfig);
53
+ constructor(config: ProxyBaseConfig);
55
54
  /**
56
55
  * Determines if mode is preview
57
56
  * @param {NextRequest} req request
@@ -73,7 +72,7 @@ export declare abstract class MiddlewareBase extends Middleware {
73
72
  protected disabled(req: NextRequest, res: NextResponse): boolean | undefined;
74
73
  /**
75
74
  * Safely extract all headers for debug logging
76
- * Necessary to avoid middleware issue https://github.com/vercel/next.js/issues/39765
75
+ * Necessary to avoid proxy issue https://github.com/vercel/next.js/issues/39765
77
76
  * @param {Headers} incomingHeaders Incoming headers
78
77
  * @returns Object with headers as key/value pairs
79
78
  */
@@ -89,7 +88,7 @@ export declare abstract class MiddlewareBase extends Middleware {
89
88
  protected getLanguage(req: NextRequest, res?: NextResponse): string;
90
89
  /**
91
90
  * Extract language from locale header of the response
92
- * set by LocaleMiddleware for app router application
91
+ * set by LocaleProxy for app router application
93
92
  * @param {NextResponse} res response
94
93
  * @returns {string | undefined} language or undefined if not found
95
94
  */
@@ -119,17 +118,16 @@ export declare abstract class MiddlewareBase extends Middleware {
119
118
  protected rewrite(rewritePath: string, req: NextRequest, res: NextResponse, skipHeader?: boolean): NextResponse;
120
119
  }
121
120
  /**
122
- * Define a middleware with a list of middlewares
123
- * @param {Middleware[]} middlewares List of middlewares to execute
121
+ * Define a proxy with a list of proxy handlers
122
+ * @param {ProxyHandler[]} proxies List of proxy handlers to execute
124
123
  * @public
125
124
  */
126
- export declare const defineMiddleware: (...middlewares: Middleware[]) => {
125
+ export declare const defineProxy: (...proxies: ProxyHandler[]) => {
127
126
  /**
128
- * Execute all middlewares
127
+ * Execute all proxies
129
128
  * @param {NextRequest} req request
130
- * @param {NextFetchEvent} ev fetch event
131
129
  * @param {NextResponse} [res] response
132
130
  */
133
- exec: (req: NextRequest, ev: NextFetchEvent, res?: NextResponse) => Promise<NextResponse<unknown>>;
131
+ exec: (req: NextRequest, res?: NextResponse) => Promise<NextResponse<unknown>>;
134
132
  };
135
- //# sourceMappingURL=middleware.d.ts.map
133
+ //# sourceMappingURL=proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAEL,oBAAoB,EACrB,MAAM,sCAAsC,CAAC;AAI9C,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAEhD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,KAAK,OAAO,CAAC;IACxD;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,KAAK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C,OAAO,CACf,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,YAAY,EACjB,UAAU,CAAC,EAAE,OAAO,GACnB,YAAY;CAchB;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,SAAS,YAAY,EAAE;IAElD;;;;OAIG;gBACe,WAAW,QAAQ,YAAY;CAiBpD,CAAC"}
@@ -1,31 +1,31 @@
1
- import { RedirectsService, RedirectsServiceConfig, RedirectInfo } from '@sitecore-content-sdk/core/site';
1
+ import { RedirectsService, RedirectsServiceConfig, RedirectInfo } from '@sitecore-content-sdk/content/site';
2
2
  import { NextURL } from 'next/dist/server/web/next-url';
3
3
  import { NextRequest, NextResponse } from 'next/server';
4
- import { MiddlewareBase, MiddlewareBaseConfig } from './middleware';
4
+ import { ProxyBase, ProxyBaseConfig } from './proxy';
5
5
  import { SitecoreConfig } from '../config';
6
6
  type RedirectResult = RedirectInfo & {
7
7
  matchedQueryString?: string;
8
8
  };
9
9
  /**
10
- * The interface for the RedirectsMiddleware configuration.
10
+ * The interface for the RedirectsProxy configuration.
11
11
  * @public
12
12
  */
13
- export type RedirectsMiddlewareConfig = Omit<RedirectsServiceConfig, 'fetch' | 'clientFactory'> & SitecoreConfig['api']['edge'] & Partial<NonNullable<SitecoreConfig['api']['local']>> & MiddlewareBaseConfig & SitecoreConfig['redirects'] & {
13
+ export type RedirectsProxyConfig = Omit<RedirectsServiceConfig, 'fetch' | 'clientFactory'> & SitecoreConfig['api']['edge'] & Partial<NonNullable<SitecoreConfig['api']['local']>> & ProxyBaseConfig & SitecoreConfig['redirects'] & {
14
14
  redirectsService?: RedirectsService;
15
15
  };
16
16
  /**
17
- * Middleware / handler fetches all redirects from Sitecore instance by grapqhl service
17
+ * Proxy / handler fetches all redirects from Sitecore instance by grapqhl service
18
18
  * compares with current url and redirects to target url
19
19
  * @public
20
20
  */
21
- export declare class RedirectsMiddleware extends MiddlewareBase {
22
- protected config: RedirectsMiddlewareConfig;
21
+ export declare class RedirectsProxy extends ProxyBase {
22
+ protected config: RedirectsProxyConfig;
23
23
  protected redirectsService: RedirectsService | null;
24
24
  private locales;
25
25
  /**
26
- * @param {RedirectsMiddlewareConfig} [config] redirects middleware config
26
+ * @param {RedirectsProxyConfig} [config] redirects proxy config
27
27
  */
28
- constructor(config: RedirectsMiddlewareConfig);
28
+ constructor(config: RedirectsProxyConfig);
29
29
  handle: (req: NextRequest, res: NextResponse) => Promise<NextResponse>;
30
30
  protected disabled(req: NextRequest, res: NextResponse): boolean | undefined;
31
31
  /**
@@ -56,7 +56,7 @@ export declare class RedirectsMiddleware extends MiddlewareBase {
56
56
  */
57
57
  protected dispatchRedirect(target: NextURL | string, type: string, req: NextRequest, res: NextResponse, isExternal?: boolean): NextResponse;
58
58
  /**
59
- * Helper function to create a redirect response and remove the x-middleware-next header.
59
+ * Helper function to create a redirect response and remove the x-proxy-next header.
60
60
  * @param {NextURL | string} url The URL to redirect to.
61
61
  * @param {Response} res The response object.
62
62
  * @param {number} status The HTTP status code of the redirect.
@@ -66,4 +66,4 @@ export declare class RedirectsMiddleware extends MiddlewareBase {
66
66
  protected createRedirectResponse(url: NextURL | string, res: Response | undefined, status: number, statusText: string): NextResponse;
67
67
  }
68
68
  export {};
69
- //# sourceMappingURL=redirects-middleware.d.ts.map
69
+ //# sourceMappingURL=redirects-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redirects-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/redirects-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EAItB,YAAY,EAEb,MAAM,oCAAoC,CAAC;AAO5C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAuB,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,c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