@remkoj/optimizely-one-nextjs 6.0.0-pre1 → 6.0.0-pre10

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 (32) hide show
  1. package/LICENSE +12 -12
  2. package/README.md +163 -163
  3. package/dist/client-types.d.ts +1 -0
  4. package/dist/components/context.d.ts +4 -1
  5. package/dist/components/context.js +4 -4
  6. package/dist/components/context.js.map +1 -1
  7. package/dist/components/index.d.ts +1 -0
  8. package/dist/components/optimizely-one-gadget/gadget.js +24 -16
  9. package/dist/components/optimizely-one-gadget/gadget.js.map +1 -1
  10. package/dist/components/optimizely-one-gadget/index.js +1 -1
  11. package/dist/components/optimizely-one-gadget/index.js.map +1 -1
  12. package/dist/components/page-activator.js +21 -16
  13. package/dist/components/page-activator.js.map +1 -1
  14. package/dist/components/types.d.ts +2 -0
  15. package/dist/components/types.js +2 -0
  16. package/dist/components/types.js.map +1 -0
  17. package/dist/products/content-recs/client.d.ts +6 -0
  18. package/dist/products/content-recs/client.js +21 -1
  19. package/dist/products/content-recs/client.js.map +1 -1
  20. package/dist/products/content-recs/snippet.js +16 -16
  21. package/dist/products/data-platform/client.d.ts +9 -0
  22. package/dist/products/data-platform/client.js +33 -1
  23. package/dist/products/data-platform/client.js.map +1 -1
  24. package/dist/products/web-experimentation/client.d.ts +3 -0
  25. package/dist/products/web-experimentation/client.js +14 -1
  26. package/dist/products/web-experimentation/client.js.map +1 -1
  27. package/dist/products/web-experimentation/snippet.js +15 -15
  28. package/dist/server.d.ts +3 -0
  29. package/dist/server.js +11 -0
  30. package/dist/server.js.map +1 -1
  31. package/dist/styles.css +2 -2
  32. package/package.json +21 -20
package/LICENSE CHANGED
@@ -1,13 +1,13 @@
1
- Copyright 2024 Remko Jantzen
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
-
7
- http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
1
+ Copyright 2024 Remko Jantzen
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
13
  limitations under the License.
package/README.md CHANGED
@@ -1,164 +1,164 @@
1
- # Next.JS Optimizely One toolkit <!-- omit in toc -->
2
- React components (both client & server) to integrate the browser-side products from Optimizely (Web Experimentation, Data Platform & Content Analytics / Recommendations)
3
-
4
- ## Table of Contents <!-- omit in toc -->
5
- - [1. Requirements](#1-requirements)
6
- - [2. Installation \& Configuration](#2-installation--configuration)
7
- - [2.1. Add API Routes](#21-add-api-routes)
8
- - [2.2. Add Provider \& PageTracker to your layout](#22-add-provider--pagetracker-to-your-layout)
9
- - [2.3. Instrument your site with additional events](#23-instrument-your-site-with-additional-events)
10
- - [2.4. Enable session cookie for Visitor ID](#24-enable-session-cookie-for-visitor-id)
11
- - [2.5. Configuration](#25-configuration)
12
- - [2.5.1. Prevent key leakage and unauthorized access](#251-prevent-key-leakage-and-unauthorized-access)
13
- - [2.5.2. List of supported environment variables](#252-list-of-supported-environment-variables)
14
- - [3. Usage](#3-usage)
15
- - [3.1. Optimizely One Gadget](#31-optimizely-one-gadget)
16
- - [3.2. Selecting the Web Experimentation project in browser](#32-selecting-the-web-experimentation-project-in-browser)
17
-
18
-
19
- ## 1. Requirements
20
- - Next.JS 14.2+
21
- - TypeScript 5+
22
- - Access to the Optimizely One Products
23
-
24
- ## 2. Installation & Configuration
25
-
26
- Start by adding the package to your project:
27
- `yarn add @remkoj/optimizely-one-nextjs`
28
-
29
- ### 2.1. Add API Routes
30
- Then make the service endpoints available by creating a new API route within Next.JS. For the app router this is done by creating this file:
31
-
32
- `app/api/me/[[...path]]/route.ts`
33
-
34
- Put the following code in this file to use the API Route handler from the package:
35
-
36
- ```typescript
37
- import { createOptimizelyOneApi } from '@remkoj/optimizely-one-nextjs/api';
38
-
39
- const handler = createOptimizelyOneApi()
40
-
41
- export const GET = handler
42
- export const POST = handler
43
- export const runtime = 'nodejs' // 'nodejs' (default) | 'edge'
44
- export const dynamic = 'force-dynamic'
45
- export const dynamicParams = true
46
- export const fetchCache = 'default-no-store'
47
- ```
48
-
49
- ### 2.2. Add Provider & PageTracker to your layout
50
- Within the global layout (or your ["third party providers component"](https://vercel.com/guides/react-context-state-management-nextjs#rendering-third-party-context-providers-in-server-components), whatever applies best), add the Optimizely One Scripts (`Scripts.Header` & `Scripts.Footer`), Context Provider (`OptimizelyOneProvider`), Page Activator (`PageActivator`), and - if you want to - the demo gadget (`OptimizelyOneGadget`).
51
-
52
- ```typescript
53
- import { Scripts } from '@remkoj/optimizely-one-nextjs/server'
54
- import { OptimizelyOneProvider, PageActivator, OptimizelyOneGadget } from '@remkoj/optimizely-one-nextjs/client'
55
-
56
- export type RootLayoutProps = {
57
- children: React.ReactNode
58
- }
59
-
60
- export default function RootLayout({ children }: RootLayoutProps)
61
- {
62
- return <html>
63
- <head>
64
- <Scripts.Header />
65
- </head>
66
- <body>
67
- <OptimizelyOneProvider value={{ debug: true }}>
68
- <PageActivator />
69
- { children }
70
- <OptimizelyOneGadget servicePrefix='/api/me' refreshInterval={ 2000 } />
71
- </OptimizelyOneProvider>
72
- <Scripts.Footer />
73
- </body>
74
- </html>
75
- }
76
- ```
77
-
78
- ### 2.3. Instrument your site with additional events
79
- Whenever you want to track additional events, use the provided hook to get to the context and send events.
80
-
81
- ```typescript
82
- 'use client'
83
- import React, { type FunctionComponent } from 'react'
84
- import { useOptimizelyOne } from '@remkoj/optimizely-one-nextjs/client'
85
-
86
- export const YourComponent : FunctionComponent<{}> = props => {
87
- const opti = useOptimizelyOne()
88
-
89
- function handler()
90
- {
91
- opti?.track({ event: "name", action: "action" })
92
- }
93
-
94
- return <button onClick={() => handler()}>Output</button>
95
- }
96
- ```
97
-
98
- ### 2.4. Enable session cookie for Visitor ID
99
- Within your middleware (`src/middleware.ts`), use the Session to make sure each visitor gets a unique Visitor ID. Either create this middleware within your project or add this logic to it.
100
-
101
- ```typescript
102
- import { NextResponse, type NextRequest } from "next/server"
103
- import { Session } from '@remkoj/optimizely-one-nextjs/api'
104
-
105
- export function middleware(request: NextRequest)
106
- {
107
- // Get the response
108
- const response = NextResponse.next()
109
-
110
- // Inject the Visitor ID cookie, with a sliding expiry
111
- const visitorId = Session.getOrCreateVisitorId(request)
112
- Session.addVisitorId(response, visitorId)
113
-
114
- // Return the response
115
- return response
116
- }
117
-
118
- export const config = {
119
- matcher: [
120
- // Skip all internal paths and paths with a '.'
121
- '/((?!.*\\.|ui|api|assets|_next\\/static|_next\\/image|_vercel).*)',
122
- ]
123
- }
124
- ```
125
-
126
- ### 2.5. Configuration
127
- The Optimizely One Integration is configured by setting the appropriate environment variables.
128
-
129
- #### 2.5.1. Prevent key leakage and unauthorized access
130
- These environment variables must ***never*** be, consider them compromised when
131
- 1. Comitted into your source control system. Set them using the method available on your hosting environment.
132
- 2. Configured to be exposed to the browser
133
-
134
- Locally, you may use a `.env.local` file, which must be added to the ignore list of you source control system.
135
-
136
- #### 2.5.2. List of supported environment variables
137
- | Product | Environment Variable | Default Value | Purpose |
138
- | - | - | - | - |
139
- | *Global* | OPTIMIZELY_ONE_HELPER | 0 | Set to "1" to enable the Optimizely One Demo tools.<br/>- Allow overriding of the WebEx project ID through the 'pid' query string parameter <br/>- Enable the `<OptimizelyOneGadget />` component.
140
- | *Global* | OPTIMIZELY_DEBUG | 0 | Set to "1" to enable debugging output. ***Note:*** This setting is shared across the different packages - it will enable debug mode for all of them |
141
- | *Global* | OPTIMIZELY_FRONTEND_COOKIE | visitorId | The cookie used to track the current Visitor ID |
142
- | Data Platform | OPTIMIZELY_DATAPLATFORM_ID | | The public or private key of your ODP instance, use the private key to enable fetching of visitor behaviour / profile information |
143
- | Data Platform | OPTIMIZLEY_DATAPLATFORM_ENDPOINT | https://api.zaius.com/ | The endpoint used to read data from ODP |
144
- | Data Platform | OPTIMIZELY_DATAPLATFORM_BATCH_SIZE | 25 | The maximum number of items to fetch in one request, if there are more results, paging will be used to get the full data set |
145
- | Content Intelligence & Recommendations | OPTIMIZELY_CONTENTRECS_CLIENT | | The client ID for Content Intelligence & Recommendations |
146
- | Content Intelligence & Recommendations | OPTIMIZELY_CONTENTRECS_DELIVERY | 0 | The Delivery ID setup in the main tracking script |
147
- | Content Intelligence & Recommendations | OPTIMIZELY_CONTENTRECS_DELIVERY_KEY | | The Delivery Key used to fetch visitor topic and goal information |
148
- | Content Intelligence & Recommendations | OPTIMIZELY_CONTENTRECS_DOMAIN | idio.co | The main domain used for the Content Recs instance, without the prefix (such as "manager", "s", "api", etc...) |
149
- | Web Experimentation | OPTIMIZELY_WEB_EXPERIMENTATION_PROJECT | | The project identifier of the Web Experimentation Project |
150
-
151
- ## 3. Usage
152
- When leveraging the components and structure from the installation, everything should work immediately.
153
-
154
- ### 3.1. Optimizely One Gadget
155
- The OptimizelyOneGadget will only show if the following two criteria have been met, this ensures that the gadget is only available when it has intentionally ben enabled:
156
- 1. The environment variable `OPTIMIZELY_ONE_HELPER` has been set to "1"
157
- 2. A test-cookie has been added to the browser using the 'Add test cookie' feature of the [Optimizely Assistant Chrome Add-On](https://support.optimizely.com/hc/en-us/articles/4410289500301-Optimizely-Experimentation-Assistant-Chrome-extension)
158
-
159
- Using the Optimizely One Gadget it is possible to demonstrate the in-session behaviour tracking and analysis performed by the configured Optimizely products.
160
-
161
- ### 3.2. Selecting the Web Experimentation project in browser
162
- When the `OPTIMIZELY_ONE_HELPER` is set to "1" - or the Scripts.Header component has been instructed to do so explicitly - it is possible to change the Optimizely Web Experimentation project on the fly. This is done by adding a query string parameter `?pid=`, with the new project id.
163
-
1
+ # Next.JS Optimizely One toolkit <!-- omit in toc -->
2
+ React components (both client & server) to integrate the browser-side products from Optimizely (Web Experimentation, Data Platform & Content Analytics / Recommendations)
3
+
4
+ ## Table of Contents <!-- omit in toc -->
5
+ - [1. Requirements](#1-requirements)
6
+ - [2. Installation \& Configuration](#2-installation--configuration)
7
+ - [2.1. Add API Routes](#21-add-api-routes)
8
+ - [2.2. Add Provider \& PageTracker to your layout](#22-add-provider--pagetracker-to-your-layout)
9
+ - [2.3. Instrument your site with additional events](#23-instrument-your-site-with-additional-events)
10
+ - [2.4. Enable session cookie for Visitor ID](#24-enable-session-cookie-for-visitor-id)
11
+ - [2.5. Configuration](#25-configuration)
12
+ - [2.5.1. Prevent key leakage and unauthorized access](#251-prevent-key-leakage-and-unauthorized-access)
13
+ - [2.5.2. List of supported environment variables](#252-list-of-supported-environment-variables)
14
+ - [3. Usage](#3-usage)
15
+ - [3.1. Optimizely One Gadget](#31-optimizely-one-gadget)
16
+ - [3.2. Selecting the Web Experimentation project in browser](#32-selecting-the-web-experimentation-project-in-browser)
17
+
18
+
19
+ ## 1. Requirements
20
+ - Next.JS 14.2+
21
+ - TypeScript 5+
22
+ - Access to the Optimizely One Products
23
+
24
+ ## 2. Installation & Configuration
25
+
26
+ Start by adding the package to your project:
27
+ `yarn add @remkoj/optimizely-one-nextjs`
28
+
29
+ ### 2.1. Add API Routes
30
+ Then make the service endpoints available by creating a new API route within Next.JS. For the app router this is done by creating this file:
31
+
32
+ `app/api/me/[[...path]]/route.ts`
33
+
34
+ Put the following code in this file to use the API Route handler from the package:
35
+
36
+ ```typescript
37
+ import { createOptimizelyOneApi } from '@remkoj/optimizely-one-nextjs/api';
38
+
39
+ const handler = createOptimizelyOneApi()
40
+
41
+ export const GET = handler
42
+ export const POST = handler
43
+ export const runtime = 'nodejs' // 'nodejs' (default) | 'edge'
44
+ export const dynamic = 'force-dynamic'
45
+ export const dynamicParams = true
46
+ export const fetchCache = 'default-no-store'
47
+ ```
48
+
49
+ ### 2.2. Add Provider & PageTracker to your layout
50
+ Within the global layout (or your ["third party providers component"](https://vercel.com/guides/react-context-state-management-nextjs#rendering-third-party-context-providers-in-server-components), whatever applies best), add the Optimizely One Scripts (`Scripts.Header` & `Scripts.Footer`), Context Provider (`OptimizelyOneProvider`), Page Activator (`PageActivator`), and - if you want to - the demo gadget (`OptimizelyOneGadget`).
51
+
52
+ ```typescript
53
+ import { Scripts } from '@remkoj/optimizely-one-nextjs/server'
54
+ import { OptimizelyOneProvider, PageActivator, OptimizelyOneGadget } from '@remkoj/optimizely-one-nextjs/client'
55
+
56
+ export type RootLayoutProps = {
57
+ children: React.ReactNode
58
+ }
59
+
60
+ export default function RootLayout({ children }: RootLayoutProps)
61
+ {
62
+ return <html>
63
+ <head>
64
+ <Scripts.Header />
65
+ </head>
66
+ <body>
67
+ <OptimizelyOneProvider value={{ debug: true }}>
68
+ <PageActivator />
69
+ { children }
70
+ <OptimizelyOneGadget servicePrefix='/api/me' refreshInterval={ 2000 } />
71
+ </OptimizelyOneProvider>
72
+ <Scripts.Footer />
73
+ </body>
74
+ </html>
75
+ }
76
+ ```
77
+
78
+ ### 2.3. Instrument your site with additional events
79
+ Whenever you want to track additional events, use the provided hook to get to the context and send events.
80
+
81
+ ```typescript
82
+ 'use client'
83
+ import React, { type FunctionComponent } from 'react'
84
+ import { useOptimizelyOne } from '@remkoj/optimizely-one-nextjs/client'
85
+
86
+ export const YourComponent : FunctionComponent<{}> = props => {
87
+ const opti = useOptimizelyOne()
88
+
89
+ function handler()
90
+ {
91
+ opti?.track({ event: "name", action: "action" })
92
+ }
93
+
94
+ return <button onClick={() => handler()}>Output</button>
95
+ }
96
+ ```
97
+
98
+ ### 2.4. Enable session cookie for Visitor ID
99
+ Within your middleware (`src/middleware.ts`), use the Session to make sure each visitor gets a unique Visitor ID. Either create this middleware within your project or add this logic to it.
100
+
101
+ ```typescript
102
+ import { NextResponse, type NextRequest } from "next/server"
103
+ import { Session } from '@remkoj/optimizely-one-nextjs/api'
104
+
105
+ export function middleware(request: NextRequest)
106
+ {
107
+ // Get the response
108
+ const response = NextResponse.next()
109
+
110
+ // Inject the Visitor ID cookie, with a sliding expiry
111
+ const visitorId = Session.getOrCreateVisitorId(request)
112
+ Session.addVisitorId(response, visitorId)
113
+
114
+ // Return the response
115
+ return response
116
+ }
117
+
118
+ export const config = {
119
+ matcher: [
120
+ // Skip all internal paths and paths with a '.'
121
+ '/((?!.*\\.|ui|api|assets|_next\\/static|_next\\/image|_vercel).*)',
122
+ ]
123
+ }
124
+ ```
125
+
126
+ ### 2.5. Configuration
127
+ The Optimizely One Integration is configured by setting the appropriate environment variables.
128
+
129
+ #### 2.5.1. Prevent key leakage and unauthorized access
130
+ These environment variables must ***never*** be, consider them compromised when
131
+ 1. Comitted into your source control system. Set them using the method available on your hosting environment.
132
+ 2. Configured to be exposed to the browser
133
+
134
+ Locally, you may use a `.env.local` file, which must be added to the ignore list of you source control system.
135
+
136
+ #### 2.5.2. List of supported environment variables
137
+ | Product | Environment Variable | Default Value | Purpose |
138
+ | - | - | - | - |
139
+ | *Global* | OPTIMIZELY_ONE_HELPER | 0 | Set to "1" to enable the Optimizely One Demo tools.<br/>- Allow overriding of the WebEx project ID through the 'pid' query string parameter <br/>- Enable the `<OptimizelyOneGadget />` component.
140
+ | *Global* | OPTIMIZELY_DEBUG | 0 | Set to "1" to enable debugging output. ***Note:*** This setting is shared across the different packages - it will enable debug mode for all of them |
141
+ | *Global* | OPTIMIZELY_FRONTEND_COOKIE | visitorId | The cookie used to track the current Visitor ID |
142
+ | Data Platform | OPTIMIZELY_DATAPLATFORM_ID | | The public or private key of your ODP instance, use the private key to enable fetching of visitor behaviour / profile information |
143
+ | Data Platform | OPTIMIZLEY_DATAPLATFORM_ENDPOINT | https://api.zaius.com/ | The endpoint used to read data from ODP |
144
+ | Data Platform | OPTIMIZELY_DATAPLATFORM_BATCH_SIZE | 25 | The maximum number of items to fetch in one request, if there are more results, paging will be used to get the full data set |
145
+ | Content Intelligence & Recommendations | OPTIMIZELY_CONTENTRECS_CLIENT | | The client ID for Content Intelligence & Recommendations |
146
+ | Content Intelligence & Recommendations | OPTIMIZELY_CONTENTRECS_DELIVERY | 0 | The Delivery ID setup in the main tracking script |
147
+ | Content Intelligence & Recommendations | OPTIMIZELY_CONTENTRECS_DELIVERY_KEY | | The Delivery Key used to fetch visitor topic and goal information |
148
+ | Content Intelligence & Recommendations | OPTIMIZELY_CONTENTRECS_DOMAIN | idio.co | The main domain used for the Content Recs instance, without the prefix (such as "manager", "s", "api", etc...) |
149
+ | Web Experimentation | OPTIMIZELY_WEB_EXPERIMENTATION_PROJECT | | The project identifier of the Web Experimentation Project |
150
+
151
+ ## 3. Usage
152
+ When leveraging the components and structure from the installation, everything should work immediately.
153
+
154
+ ### 3.1. Optimizely One Gadget
155
+ The OptimizelyOneGadget will only show if the following two criteria have been met, this ensures that the gadget is only available when it has intentionally ben enabled:
156
+ 1. The environment variable `OPTIMIZELY_ONE_HELPER` has been set to "1"
157
+ 2. A test-cookie has been added to the browser using the 'Add test cookie' feature of the [Optimizely Assistant Chrome Add-On](https://support.optimizely.com/hc/en-us/articles/4410289500301-Optimizely-Experimentation-Assistant-Chrome-extension)
158
+
159
+ Using the Optimizely One Gadget it is possible to demonstrate the in-session behaviour tracking and analysis performed by the configured Optimizely products.
160
+
161
+ ### 3.2. Selecting the Web Experimentation project in browser
162
+ When the `OPTIMIZELY_ONE_HELPER` is set to "1" - or the Scripts.Header component has been instructed to do so explicitly - it is possible to change the Optimizely Web Experimentation project on the fly. This is done by adding a query string parameter `?pid=`, with the new project id.
163
+
164
164
  The project id is persisted in localStorage with the key `_pid` and needs to be removed manually to revert back to the configured Web Experimentation project.
@@ -43,6 +43,7 @@ type NavigationSearchEvent = {
43
43
  search_term: string;
44
44
  };
45
45
  export type OptimizelyOneProfileData = {
46
+ feature_experimentation_id?: string;
46
47
  content_intelligence_id?: string;
47
48
  custom: Record<string, string | number | boolean>;
48
49
  };
@@ -3,6 +3,7 @@ import WebExperimenationService from '../products/web-experimentation/client';
3
3
  import DataPlatformService from '../products/data-platform/client';
4
4
  import ContentRecsService from '../products/content-recs/client';
5
5
  import * as ClientApi from '../client-types';
6
+ import { SupportedProductNames } from "./types";
6
7
  /**
7
8
  * The data stored within the OptimizelyOne context
8
9
  */
@@ -98,5 +99,7 @@ type OptimizelyOneHookResult<TM extends DefaultServiceMap = DefaultServiceMap> =
98
99
  getService: <SC extends keyof TM>(code: SC) => TM[SC] | undefined;
99
100
  };
100
101
  declare function useOptimizelyOne(): OptimizelyOneHookResult;
101
- declare const OptimizelyOneProvider: FunctionComponent<OptimizelyOneProviderProps>;
102
+ declare const OptimizelyOneProvider: FunctionComponent<OptimizelyOneProviderProps & {
103
+ enabledOptimizelyServices?: Array<SupportedProductNames>;
104
+ }>;
102
105
  export { OptimizelyOneProvider, useOptimizelyOne };
@@ -50,12 +50,12 @@ function useOptimizelyOne() {
50
50
  }, [ctx]);
51
51
  return result;
52
52
  }
53
- const OptimizelyOneProvider = ({ value, children }) => {
53
+ const OptimizelyOneProvider = ({ value, children, enabledOptimizelyServices }) => {
54
54
  const [ctxDebug, setCtxDebug] = useState(value?.debug ?? false);
55
55
  const [services, setServices] = useState([
56
- new WebExperimenationService(),
57
- new DataPlatformService(),
58
- new ContentRecsService(),
56
+ new WebExperimenationService(enabledOptimizelyServices),
57
+ new DataPlatformService(enabledOptimizelyServices),
58
+ new ContentRecsService(enabledOptimizelyServices),
59
59
  ...(value?.services || [])
60
60
  ].sort((a, b) => a.order - b.order));
61
61
  services.forEach(service => service.debug = ctxDebug);
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/components/context.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AACZ,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAkD,MAAM,OAAO,CAA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C,YAAY,CAAC,CAAC,CAAC,CAAC;YACnH,UAAU,EAAE,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;YACpG,aAAa,EAAE,OAAO,CAAC,EAAE;gBACrB,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;gBACrC,IAAI,GAAG,IAAI,CAAC,CAAC;oBAAE,OAAM;gBACrB,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAC,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YACpE,CAAC;SACJ,YAAI,QAAQ,GAAkC,CAAA;AACnD,CAAC,CAAA;AACD,qBAAqB,CAAC,WAAW,GAAG,0CAA0C,CAAA;AAC9E,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,CAAA"}
@@ -2,3 +2,4 @@ export { OptimizelyOneGadget } from './optimizely-one-gadget/gadget';
2
2
  export { OptimizelyOneProvider, useOptimizelyOne } from './context';
3
3
  export { PageActivator } from './page-activator';
4
4
  export { useIsInTestMode } from './use-test-mode';
5
+ export type { SupportedProductNames } from './types';
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { Fragment, useLayoutEffect, useCallback, } from 'react';
3
+ import { Fragment, useCallback, useMemo, useEffect, } from 'react';
4
4
  import useCookie from '../use-cookie';
5
5
  import { Popover, PopoverButton, PopoverPanel, Tab, TabGroup, TabList, TabPanels, TabPanel, } from '@headlessui/react';
6
6
  import { ChevronUpIcon, UserGroupIcon, TagIcon, RocketLaunchIcon, IdentificationIcon, Square3Stack3DIcon, TrophyIcon, FingerPrintIcon, } from '@heroicons/react/20/solid';
@@ -69,13 +69,21 @@ export const OptimizelyOneGadget = ({ servicePrefix = '/api/me', refreshInterval
69
69
  const pathname = usePathname();
70
70
  const wxProjectIdParam = searchParams.get('pid');
71
71
  const [projectIdCookie, setProjectIdCookie, removeProjectIdCookie] = useCookie('wx.projectid');
72
- const enabledProducts = [];
73
- if (showContentRecs)
74
- enabledProducts.push('crecs');
75
- if (showDataPlatform)
76
- enabledProducts.push('odp');
77
- if (showWebEx)
78
- enabledProducts.push('webex');
72
+ const enabledProducts = useMemo(() => {
73
+ const enabledProducts = [];
74
+ if (showContentRecs)
75
+ enabledProducts.push('crecs');
76
+ if (showDataPlatform)
77
+ enabledProducts.push('odp');
78
+ if (showWebEx)
79
+ enabledProducts.push('webex');
80
+ return enabledProducts;
81
+ }, [showContentRecs, showDataPlatform, showWebEx]);
82
+ const { forceHidden, forceShown } = useMemo(() => {
83
+ const forceHidden = show != undefined && show == false;
84
+ const forceShown = show != undefined && show == true;
85
+ return { forceHidden, forceShown };
86
+ }, [show]);
79
87
  const removeQueryParam = useCallback((paramName) => {
80
88
  const newParams = new URLSearchParams(searchParams.toString());
81
89
  if (newParams.has(paramName))
@@ -89,7 +97,7 @@ export const OptimizelyOneGadget = ({ servicePrefix = '/api/me', refreshInterval
89
97
  console.log('🛑 Refreshing the page to apply the new Web Experimenation project failed, please refresh manually.');
90
98
  }
91
99
  }, [pathname, searchParams]);
92
- useLayoutEffect(() => {
100
+ useEffect(() => {
93
101
  if (wxProjectIdParam != null && wxProjectIdParam != projectIdCookie) {
94
102
  if (wxProjectIdParam == '')
95
103
  removeProjectIdCookie();
@@ -104,15 +112,15 @@ export const OptimizelyOneGadget = ({ servicePrefix = '/api/me', refreshInterval
104
112
  removeProjectIdCookie,
105
113
  setProjectIdCookie,
106
114
  ]);
107
- const forceHidden = show != undefined && show == false;
108
- const forceShown = show != undefined && show == true;
115
+ useEffect(() => {
116
+ console.groupCollapsed(`🔎 [Optimizely One Gadget] Initializing Optimizely Demo Gadget`);
117
+ console.log(`Optimizely One Demo API: ${servicePrefix}`);
118
+ console.log(`Refresh interval: ${refreshInterval == 0 ? 'DISABLED' : refreshInterval + 'ms'}`);
119
+ console.log(`Enabled products: ${enabledProducts.join(', ')}`);
120
+ console.groupEnd();
121
+ }, [servicePrefix, refreshInterval, enabledProducts]);
109
122
  if (forceHidden || (!forceShown && !inTestMode))
110
123
  return _jsx(_Fragment, {});
111
- console.groupCollapsed(`🔎 [Optimizely One Gadget] Initializing Optimizely Demo Gadget`);
112
- console.log(`Optimizely One Demo API: ${servicePrefix}`);
113
- console.log(`Refresh interval: ${refreshInterval == 0 ? 'DISABLED' : refreshInterval + 'ms'}`);
114
- console.log(`Enabled products: ${enabledProducts.join(', ')}`);
115
- console.groupEnd();
116
124
  return (_jsxs(Popover, { className: "oo:md:fixed oo:md:bottom-0 oo:z-[500]", children: [_jsxs(PopoverButton, { className: "oo:fixed oo:bottom-0 oo:right-0 oo:w-full oo:h-[50px] oo:flex oo:flex-row oo:justify-between oo:border-t oo:border-slate-500 oo:bg-slate-100 oo:text-slate-800 oo:md:w-[350px] oo:md:right-4 oo:md:rounded-t-md oo:md:border-x oo:z-[500] oo:p-[10px] oo:dark:text-slate-800", children: [_jsx(OptiLogo, { className: "oo:w-auto oo:h-full" }), _jsx(ChevronUpIcon, { className: "oo:data-open:rotate-180 oo:data-open:transform oo:h-full oo:w-auto oo:inline-block" })] }), _jsxs(PopoverPanel, { className: "oo:text-[14px] oo:fixed oo:bottom-[50px] oo:right-0 oo:w-full oo:top-0 oo:md:border oo:md:border-slate-300 oo:bg-white oo:md:right-4 oo:md:bottom-[55px] oo:md:w-[800px] oo:z-[501] oo:max-w-full oo:flex oo:flex-col oo:justify-stretch oo:md:h-[350px] oo:md:top-auto oo:md:rounded-md oo:md:shadow-xl oo:md:overflow-hidden oo:text-slate-800 oo:dark:text-slate-800", children: [_jsxs("div", { className: "oo:text-[18px] oo:border-b oo:border-slate-300 oo:bg-slate-100 oo:text-slate-800 oo:font-bold oo:p-1 oo:flex-none oo:md:p-2", children: [_jsx(IdentificationIcon, { className: "oo:inline-block oo:h-[1.5em] oo:w-[1.5em] oo:mr-[0.5em] oo:text-blue-500" }), "My Profile"] }), _jsxs(TabGroup, { as: Fragment, children: [_jsx(TabList, { className: "oo:flex-none oo:flex oo:justify-between oo:md:justify-start oo:gap-[0.25em] oo:px-[0.25em] oo:pt-[0.5em] oo:border-b oo:border-slate-300", children: Panels.filter((pnl) => pnl.products.length == 0 ||
117
125
  pnl.products.every((pk) => enabledProducts.includes(pk))).map(({ id: pnlId, Tab: GadgetTab }) => {
118
126
  const pnlTabKey = 'Tab-' + pnlId;
@@ -1 +1 @@
1
- {"version":3,"file":"gadget.js","sourceRoot":"","sources":["../../../src/components/optimizely-one-gadget/gadget.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EACL,QAAQ,EACR,eAAe,EACf,WAAW,GAGZ,MAAM,OAAO,CAAA;AACd,OAAO,SAAS,MAAM,eAAe,CAAA;AACrC,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,GAAG,EACH,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,GACT,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,aAAa,EACb,aAAa,EACb,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,eAAe,GAChB,MAAM,2BAA2B,CAAA;AAClC,OAAO,QAAQ,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE9D,uBAAuB;AACvB,OAAO,kBAAkB,CAAA;AAEzB,wBAAwB;AACxB,OAAO,OAAO,MAAM,cA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,QAAQ,GAAG,KAAK,CAAA;oCAC/B,OAAO,CACL,KAAC,QAAQ,IAAc,EAAE,EAAC,KAAK,EAAC,SAAS,EAAC,kBAAkB,YAC1D,KAAC,WAAW,IACV,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,GAChC,IAJW,MAAM,CAKV,CACZ,CAAA;gCACH,CAAC,CAAC,GACQ,IACH,IACE,IACP,CACX,CAAA;AACH,CAAC,CAAA;AAED,eAAe,mBAAmB,CAAA"}
1
+ {"version":3,"file":"gadget.js","sourceRoot":"","sources":["../../../src/components/optimizely-one-gadget/gadget.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EACL,QAAQ,EAER,WAAW,EACX,OAAO,EAGP,SAAS,GACV,MAAM,OAAO,CAAA;AACd,OAAO,SAAS,MAAM,eAAe,CAAA;AACrC,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,GAAG,EACH,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,GACT,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,aAAa,EACb,aAAa,EACb,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,eAAe,GAChB,MAAM,2BAA2B,CAAA;AAClC,OAAO,QAAQ,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE9D,uBAAuB;AACvB,OAAO,kBAAkB,CAAA;AAEzB,wBAAwB;AACxB,OAAO,OAAO,MAAM,cAAc,CAAA;AAOlC,MAAM,MAAM,GAAc;IACxB;QACE,EAAE,EAAE,SAAS;QACb,GAAG,EAAE,GAAG,EAAE,CAAC,CACT,MAAC,GAAG,IACF,EAAE,EAAC,KAAK,EACR,SAAS,EAAC,wLAAwL,aAElM,KAAC,kBAAkB,IAAC,SAAS,EAAC,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Q,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAC3D,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE;oCAC1C,MAAM,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAA;oCAC/B,OAAO,CACL,KAAC,QAAQ,IAAc,EAAE,EAAC,KAAK,EAAC,SAAS,EAAC,kBAAkB,YAC1D,KAAC,WAAW,IACV,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,GAChC,IAJW,MAAM,CAKV,CACZ,CAAA;gCACH,CAAC,CAAC,GACQ,IACH,IACE,IACP,CACX,CAAA;AACH,CAAC,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -3,7 +3,7 @@ import getConfig, { checkProductStatus } from '../../config';
3
3
  import dynamic from 'next/dynamic';
4
4
  import { Suspense } from 'react';
5
5
  import 'server-only';
6
- const OptimizelyOneClientGadget = dynamic(() => import('./gadget'));
6
+ const OptimizelyOneClientGadget = dynamic(() => import('./gadget'), { ssr: false });
7
7
  export const OptimizelyOneGadget = ({ refreshInterval = 0, servicePrefix = '/api/me', show, }) => {
8
8
  const optiOneConfig = getConfig();
9
9
  const { HelperEnabled, OptimizelyDebug } = optiOneConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/optimizely-one-gadget/index.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,EAAE,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,aAAa,CAAA;AAEpB,MAAM,yBAAyB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAA;AAEnE,MAAM,CAAC,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AEnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,eAAe,GAAG,CAAC,EACnB,aAAa,GAAG,SAAS,EACzB,IAAI,GACqB,EAAE,EAAE;IAC7B,MAAM,aAAa,GAAG,SAAS,EAAE,CAAA;IACjC,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,aAAa,CAAA;IACxD,MAAM,aAAa,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAA;IAEvD,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,aAAa,CAAC,EAAE,CAAC;QAClD,OAAO,CACL,KAAC,QAAQ,IAAC,QAAQ,EAAE,IAAI,YACtB,KAAC,yBAAyB,IACxB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,aAAa,CAAC,cAAc,EAC7C,gBAAgB,EAAE,aAAa,CAAC,YAAY,EAC5C,SAAS,EAAE,aAAa,CAAC,kBAAkB,GAC3C,GACO,CACZ,CAAA;IACH,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,CAAC,GAAG,CACT,gDAAgD,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW,EAAE,CACrG,CAAA;IACH,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,eAAe,mBAAmB,CAAA"}
@@ -1,16 +1,20 @@
1
1
  'use client';
2
2
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
3
- import { useEffect, useLayoutEffect } from 'react';
3
+ import { useEffect, useLayoutEffect, } from 'react';
4
4
  import { usePathname } from 'next/navigation';
5
5
  import { useOptimizelyOne } from './context';
6
- export const PageActivator = props => {
6
+ import createDeepMerge from '@fastify/deepmerge';
7
+ const deepmerge = createDeepMerge();
8
+ export const PageActivator = (props) => {
7
9
  const path = usePathname();
8
10
  const opti = useOptimizelyOne();
9
11
  // Page activation effect
10
12
  useLayoutEffect(() => {
11
13
  if (opti.debug)
12
14
  console.groupCollapsed(`📑 [Optimizely One] Applying layout effects for: ${path}`);
13
- opti.getActivatePageServices().forEach(service => service.activatePage(path));
15
+ opti
16
+ .getActivatePageServices()
17
+ .forEach((service) => service.activatePage(path));
14
18
  if (opti.debug)
15
19
  console.groupEnd();
16
20
  }, [path, opti]);
@@ -23,7 +27,7 @@ export const PageActivator = props => {
23
27
  }
24
28
  if (opti.debug)
25
29
  console.groupCollapsed(`📢 [Optimizely One] Tracking page view for: ${path}`);
26
- opti.getTrackPageServices().forEach(service => service.trackPage(path));
30
+ opti.getTrackPageServices().forEach((service) => service.trackPage(path));
27
31
  if (opti.debug)
28
32
  console.groupEnd();
29
33
  }, [path, opti]);
@@ -32,19 +36,20 @@ export const PageActivator = props => {
32
36
  if (opti.debug)
33
37
  console.log(`📢 [Optimizely One] Refreshing profile data for: ${path}`);
34
38
  const abort = new AbortController();
35
- Promise.allSettled(opti.getProfileDataSources().map(pds => pds.discoverProfileData(abort.signal))).then(results => {
36
- const mergedProfileData = { custom: {} };
37
- results.forEach(result => {
38
- if (result.status == "fulfilled") {
39
- if (result.value.content_intelligence_id)
40
- mergedProfileData.content_intelligence_id = result.value.content_intelligence_id;
41
- mergedProfileData.custom = { ...mergedProfileData.custom, ...result.value.custom };
42
- }
43
- });
44
- if (mergedProfileData.content_intelligence_id || Object.getOwnPropertyNames(mergedProfileData.custom).length > 0) {
39
+ Promise.allSettled(opti
40
+ .getProfileDataSources()
41
+ .map((pds) => pds.discoverProfileData(abort.signal))).then((results) => {
42
+ const mergedProfileData = results.reduce((merged, current) => current.status == 'fulfilled'
43
+ ? deepmerge(merged, current.value)
44
+ : merged, { custom: {} });
45
+ const hasIds = Object.getOwnPropertyNames(mergedProfileData).some(x => x != "custom");
46
+ if (hasIds ||
47
+ Object.getOwnPropertyNames(mergedProfileData.custom).length > 0) {
45
48
  if (opti.debug)
46
49
  console.log(`📢 [Optimizely One] Discovered profile data: ${JSON.stringify(mergedProfileData)}`);
47
- opti.getProfileServices().forEach(service => service.updateProfile(mergedProfileData));
50
+ opti
51
+ .getProfileServices()
52
+ .forEach((service) => service.updateProfile(mergedProfileData));
48
53
  }
49
54
  });
50
55
  return () => {
@@ -53,6 +58,6 @@ export const PageActivator = props => {
53
58
  }, [path, opti]);
54
59
  return _jsx(_Fragment, { children: props.children });
55
60
  };
56
- PageActivator.displayName = "Optimizely One: (Layout) Effect processor";
61
+ PageActivator.displayName = 'Optimizely One: (Layout) Effect processor';
57
62
  export default PageActivator;
58
63
  //# sourceMappingURL=page-activator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page-activator.js","sourceRoot":"","sources":["../../src/components/page-activator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AACZ,OAAO,EAAE,SAAS,EAAE,eAAe,EAAkD,MAAM,OAAO,CAAA;AAClG,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAK5C,MAAM,CAAC,MAAM,aAAa,GAA2C,KAAK,CAAC,EAAE;IAEzE,MAAM,IAAI,GAAG,WAAW,EAAE,CAAA;IAC1B,MAAM,IAAI,GAAG,gBAAgB,EAAE,CAAA;IAE/B,yBAAyB;IACzB,eAAe,CAAC,GAAG,EAAE;QACjB,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO,CAAC,cAAc,CAAC,oDAAqD,IAAK,EAAE,CAAC,CAAA;QAEpG,IAAI,CAAC,uBAAuB,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAA;QAE7E,IAAI,IAAI,CAAC,KAAK;YACV,OAAO,CAAC,QAAQ,EAAE,CAAA;IAC1B,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;IAEhB,uBAAuB;IACvB,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,IAAI,CAAC,mB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 +1,2 @@
1
+ import type { checkProductStatus } from '../config';
2
+ export type SupportedProductNames = keyof ReturnType<typeof checkProductStatus>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":""}
@@ -1,5 +1,11 @@
1
1
  import * as ClientApi from '../../client-types';
2
+ import * as GlobalClientTypes from '../../components/types';
2
3
  export declare class ContentRecsService implements ClientApi.OptimizelyOneService<ClientApi.OptimizelyContentRecsApi> {
4
+ private _apiEnabled;
5
+ private _clientEnabled;
6
+ constructor(enabledServices?: Array<GlobalClientTypes.SupportedProductNames>);
7
+ get isApiEnabled(): boolean;
8
+ get isClientEnabled(): boolean;
3
9
  order: Readonly<number>;
4
10
  code: Readonly<string>;
5
11
  debug: boolean;
@@ -1,13 +1,29 @@
1
1
  'use client';
2
2
  export class ContentRecsService {
3
+ _apiEnabled = true;
4
+ _clientEnabled = true;
5
+ constructor(enabledServices) {
6
+ if (enabledServices) {
7
+ this._apiEnabled = enabledServices.includes("contentRecsApi");
8
+ this._clientEnabled = enabledServices.includes("contentRecsClient");
9
+ }
10
+ }
11
+ get isApiEnabled() {
12
+ return this._apiEnabled;
13
+ }
14
+ get isClientEnabled() {
15
+ return this._clientEnabled;
16
+ }
3
17
  order = 300;
4
18
  code = "crecs";
5
19
  debug = false;
6
20
  endpoint = "/api/me/cgoals";
7
21
  get isActive() {
8
- return this.getBrowserApi() != undefined;
22
+ return this._apiEnabled || this._clientEnabled;
9
23
  }
10
24
  trackPage() {
25
+ if (!this._clientEnabled)
26
+ return;
11
27
  const idio = this.getBrowserApi();
12
28
  if (!idio)
13
29
  return;
@@ -17,6 +33,8 @@ export class ContentRecsService {
17
33
  }
18
34
  getBrowserApi() {
19
35
  try {
36
+ if (!this._clientEnabled)
37
+ return undefined;
20
38
  if (!window._iaq)
21
39
  window._iaq = [];
22
40
  return window._iaq;
@@ -26,6 +44,8 @@ export class ContentRecsService {
26
44
  }
27
45
  }
28
46
  async discoverProfileData(signal) {
47
+ if (!this._apiEnabled)
48
+ return { custom: {} };
29
49
  const nbg = await fetch(this.endpoint, { cache: 'no-store', signal }).then(r => r.ok ? r.json() : undefined);
30
50
  return {
31
51
  custom: {
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/products/content-recs/client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAIZ,MAAM,OAAO,kBAAkB;IAEpB,KAAK,GAAsB,GAAG,CAAA;IAC9B,IAAI,GAAsB,OAAO,CAAA;IACjC,KAAK,GAAa,KAAK,CAAA;IACvB,QAAQ,GAAY,gBAAgB,CAAA;IAC3C,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,aAAa,EAAE,IAAI,SAAS,CAAA;IAC5C,CAAC;IAEM,SAAS;QAEZ,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,EAAE,CAAA;QACjC,IAAI,CAAC,IAAI;YAAE,OAAM;QACjB,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAA;QACvF,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;IACnC,CAAC;IAEM,aAAa;QAEhB,IAAI,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,IAAI;gBACZ,MAAM,CAAC,IAAI,GAAG,EAAqB,CAAA;YACvC,OAAO,MAAM,CAAC,IAAI,CAAA;QACtB,CAAC;QAAC,MAAM,CAAC;YACL,OAAO,SAAS,CAAA;QACpB,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAAC,MAA2B;QAExD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAA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C,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;aACpE;SACJ,CAAA;IACL,CAAC;CACJ;AAED,eAAe,kBAAkB,CAAA"}
@@ -2,22 +2,22 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /* eslint @next/next/no-before-interactive-script-outside-document: 0 */
3
3
  import Script from 'next/script';
4
4
  export const OptimizelyContentRecsTrackingScript = ({ client: client_id, delivery: delivery_id, domain = 'idio.co' }) => {
5
- return _jsx(Script, { id: 'content-recs-script', strategy: 'beforeInteractive', children: `
6
- // Set client and delivery
7
- _iaq = [
8
- ['client', ${JSON.stringify(client_id)}],
9
- ['delivery', ${JSON.stringify(delivery_id)}]
10
- ];
11
-
12
- // Include Content Analytics
13
- !function(d,s){
14
- var ia=d.createElement(s);
15
- ia.async=1;
16
- ia.id='content-recs-snippet';
17
- ia.src='//s.${domain}/ia.js';
18
- s=d.getElementById('content-recs-script');
19
- s.parentNode.insertBefore(ia,s)
20
- }(document,'script');
5
+ return _jsx(Script, { id: 'content-recs-script', strategy: 'beforeInteractive', children: `
6
+ // Set client and delivery
7
+ _iaq = [
8
+ ['client', ${JSON.stringify(client_id)}],
9
+ ['delivery', ${JSON.stringify(delivery_id)}]
10
+ ];
11
+
12
+ // Include Content Analytics
13
+ !function(d,s){
14
+ var ia=d.createElement(s);
15
+ ia.async=1;
16
+ ia.id='content-recs-snippet';
17
+ ia.src='//s.${domain}/ia.js';
18
+ s=d.getElementById('content-recs-script');
19
+ s.parentNode.insertBefore(ia,s)
20
+ }(document,'script');
21
21
  ` });
22
22
  };
23
23
  export default OptimizelyContentRecsTrackingScript;
@@ -1,5 +1,8 @@
1
1
  import * as ClientApi from '../../client-types';
2
+ import * as GlobalClientTypes from '../../components/types';
2
3
  export declare class DataPlatformService implements ClientApi.OptimizelyOneService<ClientApi.OptimizelyDataPlatformApi> {
4
+ private _odpEnabled;
5
+ constructor(enabledServices?: Array<GlobalClientTypes.SupportedProductNames>);
3
6
  order: Readonly<number>;
4
7
  code: Readonly<string>;
5
8
  debug: boolean;
@@ -7,6 +10,12 @@ export declare class DataPlatformService implements ClientApi.OptimizelyOneServi
7
10
  trackPage(): void;
8
11
  trackEvent(event: ClientApi.OptimizelyOneEvent): void;
9
12
  getBrowserApi(): ClientApi.OptimizelyDataPlatformApi | undefined;
13
+ /**
14
+ * Discover the visitorId cookie and make it available to the systems as identifier
15
+ *
16
+ * @returns The partial profile data
17
+ */
18
+ discoverProfileData(): Promise<ClientApi.OptimizelyOneProfileData>;
10
19
  updateProfile(profileData: ClientApi.OptimizelyOneProfileData): void;
11
20
  private lastTrackedContentIntelligenceId;
12
21
  private get contentIntelligenceId();
@@ -1,12 +1,19 @@
1
1
  'use client';
2
2
  export class DataPlatformService {
3
+ _odpEnabled = true;
4
+ constructor(enabledServices) {
5
+ if (enabledServices)
6
+ this._odpEnabled = enabledServices.includes("dataPlatform");
7
+ }
3
8
  order = 200;
4
9
  code = "odp";
5
10
  debug = false;
6
11
  get isActive() {
7
- return this.getBrowserApi() != undefined;
12
+ return this._odpEnabled;
8
13
  }
9
14
  trackPage() {
15
+ if (!this._odpEnabled)
16
+ return;
10
17
  const zaius = this.getBrowserApi();
11
18
  if (!zaius)
12
19
  return;
@@ -21,6 +28,8 @@ export class DataPlatformService {
21
28
  }
22
29
  }
23
30
  trackEvent(event) {
31
+ if (!this._odpEnabled)
32
+ return;
24
33
  const zaius = this.getBrowserApi();
25
34
  if (!zaius)
26
35
  return;
@@ -36,12 +45,33 @@ export class DataPlatformService {
36
45
  }
37
46
  getBrowserApi() {
38
47
  try {
48
+ if (!this._odpEnabled)
49
+ return undefined;
39
50
  return window.zaius;
40
51
  }
41
52
  catch {
42
53
  return undefined;
43
54
  }
44
55
  }
56
+ /**
57
+ * Discover the visitorId cookie and make it available to the systems as identifier
58
+ *
59
+ * @returns The partial profile data
60
+ */
61
+ discoverProfileData() {
62
+ return new Promise((resolve) => {
63
+ try {
64
+ const cookies = document.cookie.split(';').map(x => x.trim().split('=', 2)).reduce((obj, cData) => { obj[cData[0]] = cData[1]; return obj; }, {});
65
+ const visitorId = cookies['visitorId'];
66
+ if (visitorId)
67
+ return resolve({ feature_experimentation_id: visitorId, custom: {} });
68
+ }
69
+ catch {
70
+ //Ignore errors on purpose
71
+ }
72
+ return resolve({ custom: {} });
73
+ });
74
+ }
45
75
  updateProfile(profileData) {
46
76
  const zaius = this.getBrowserApi();
47
77
  if (!zaius)
@@ -49,6 +79,8 @@ export class DataPlatformService {
49
79
  const ids = {};
50
80
  if (profileData.content_intelligence_id)
51
81
  ids.content_intelligence_id = profileData.content_intelligence_id;
82
+ if (profileData.feature_experimentation_id)
83
+ ids.fs_user_id = profileData.feature_experimentation_id;
52
84
  if (this.debug)
53
85
  console.log("🏬 Data platform - Updating profile (ids, attributes):", ids, profileData.custom);
54
86
  zaius.customer(ids, profileData.custom);
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/products/data-platform/client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAIZ,MAAM,OAAO,mBAAmB;IAErB,KAAK,GAAsB,GAAG,CAAA;IAC9B,IAAI,GAAsB,KAAK,CAAA;IAC/B,KAAK,GAAY,KAAK,CAAA;IAC7B,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,aAAa,EAAE,IAAI,SAAS,CAAA;IAC5C,CAAC;IAEM,SAAS;QAEZ,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,CAAA;QAClC,IAAI,CAAC,KAAK;YAAE,OAAM;QAClB,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAA;QACpE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;QACvB,IAAI,IAAI,CAAC,gCAAgC,IAAI,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC,qBAAqB,IAAI,EAAE,EAC3G,CAAC;YACG,IAAI,IAAI,CAAC,KAAK;gBAAE,OAAO,CA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,CAAC,UAAU,GAAG,WAAW,CAAC,0BAA0B,CAAA;QAC3D,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO,CAAC,GAAG,CAAC,wDAAwD,EAAE,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;QAC9G,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC3C,CAAC;IAEO,gCAAgC,GAAwB,SAAS,CAAA;IACzE,IAAY,qBAAqB;QAE7B,IAAI,CAAC,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC,sBAAsB,IAAI,EAAE,EAAE,CAAC;YACpE,IAAI,CAAC;gBACD,IAAI,CAAC,sBAAsB,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAA;YACnG,CAAC;YAAC,MAAM,CAAC;gBACL,IAAI,CAAC,sBAAsB,GAAG,EAAE,CAAA;YACpC,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC,sBAAsB,CAAA;IACtC,CAAC;IACO,sBAAsB,GAAwB,SAAS,CAAA;CAClE;AAED,eAAe,mBAAmB,CAAA"}
@@ -1,5 +1,8 @@
1
1
  import * as ClientApi from '../../client-types';
2
+ import * as GlobalClientTypes from '../../components/types';
2
3
  export declare class WebExperimenationService implements ClientApi.OptimizelyOneService<ClientApi.OptimizelyWebExperimentationApi> {
4
+ private _wxEnabled;
5
+ constructor(enabledServices?: Array<GlobalClientTypes.SupportedProductNames>);
3
6
  order: Readonly<number>;
4
7
  code: Readonly<string>;
5
8
  debug: boolean;
@@ -1,12 +1,19 @@
1
1
  'use client';
2
2
  export class WebExperimenationService {
3
+ _wxEnabled = true;
4
+ constructor(enabledServices) {
5
+ if (enabledServices)
6
+ this._wxEnabled = enabledServices.includes("dataPlatform");
7
+ }
3
8
  order = 100;
4
9
  code = "webex";
5
10
  debug = false;
6
11
  get isActive() {
7
- return this.getBrowserApi() != undefined;
12
+ return this._wxEnabled;
8
13
  }
9
14
  activatePage() {
15
+ if (!this._wxEnabled)
16
+ return;
10
17
  const webex = this.getBrowserApi();
11
18
  if (!webex)
12
19
  return;
@@ -15,6 +22,8 @@ export class WebExperimenationService {
15
22
  console.log("🚀 Web Experimentation - Activating pages");
16
23
  }
17
24
  trackEvent(event) {
25
+ if (!this._wxEnabled)
26
+ return;
18
27
  const webex = this.getBrowserApi();
19
28
  if (!webex)
20
29
  return;
@@ -30,6 +39,8 @@ export class WebExperimenationService {
30
39
  }
31
40
  getBrowserApi() {
32
41
  try {
42
+ if (!this._wxEnabled)
43
+ return undefined;
33
44
  if (!window.optimizely)
34
45
  window.optimizely = [];
35
46
  return window.optimizely;
@@ -39,6 +50,8 @@ export class WebExperimenationService {
39
50
  }
40
51
  }
41
52
  updateProfile(profileData) {
53
+ if (!this._wxEnabled)
54
+ return;
42
55
  const webex = this.getBrowserApi();
43
56
  if (!webex)
44
57
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/products/web-experimentation/client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAIZ,MAAM,OAAO,wBAAwB;IAE1B,KAAK,GAAsB,GAAG,CAAA;IAC9B,IAAI,GAAsB,OAAO,CAAA;IACjC,KAAK,GAAY,KAAK,CAAA;IAC7B,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,aAAa,EAAE,IAAI,SAAS,CAAA;IAC5C,CAAC;IAEM,YAAY;QAEf,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,CAAA;QAClC,IAAI,CAAC,KAAK;YAAE,OAAM;QAClB,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAA;QAChC,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAA;IAC5E,CAAC;IAEM,UAAU,CAAC,KAAmC;QAEjD,MAAM,KAAK,GAA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.com/js/${pid}.js`;
9
9
  }
10
10
  return _jsxs(_Fragment, { children: [_jsx(Script, { id: 'web-experimentation-startup', strategy: 'beforeInteractive', children: `window["optimizely"] = window["optimizely"] || [];` }), allowProjectOverride ?
11
- _jsx(Script, { id: 'web-experimentation-project', strategy: 'beforeInteractive', children: `
12
- ((w,d,l) => {
13
- const localProject = l.getItem('_pid');
14
- const queryProject = (new URLSearchParams(w.location.search)).get('pid');
15
- const currentProject = queryProject || localProject || '${projectId}';
16
- if (currentProject != localProject)
17
- l.setItem('_pid', currentProject)
18
-
19
- let wx = d.createElement('script');
20
- wx.fetchpriority = 'high';
21
- wx.src='${buildUrl('\'+ currentProject +\'')}';
22
- wx.id='web-experimentation-snippet';
23
- let s=d.getElementById('web-experimentation-project');
24
- s.parentNode.insertBefore(wx,s);
25
- })(window,document,localStorage)
11
+ _jsx(Script, { id: 'web-experimentation-project', strategy: 'beforeInteractive', children: `
12
+ ((w,d,l) => {
13
+ const localProject = l.getItem('_pid');
14
+ const queryProject = (new URLSearchParams(w.location.search)).get('pid');
15
+ const currentProject = queryProject || localProject || '${projectId}';
16
+ if (currentProject != localProject)
17
+ l.setItem('_pid', currentProject)
18
+
19
+ let wx = d.createElement('script');
20
+ wx.fetchpriority = 'high';
21
+ wx.src='${buildUrl('\'+ currentProject +\'')}';
22
+ wx.id='web-experimentation-snippet';
23
+ let s=d.getElementById('web-experimentation-project');
24
+ s.parentNode.insertBefore(wx,s);
25
+ })(window,document,localStorage)
26
26
  ` }) :
27
27
  _jsx(Script, { id: 'web-experimentation-project', strategy: 'beforeInteractive', src: buildUrl(projectId) })] });
28
28
  };
package/dist/server.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import 'server-only';
2
+ import { checkProductStatus, type OptiOneConfig } from './config';
2
3
  export * from './products';
3
4
  export * as Session from './utils/session';
4
5
  export * as EnvTools from './utils/env';
5
6
  export declare function isOptimizelyOneEnabled(): boolean;
6
7
  export * from './server-components';
7
8
  export * from './components/rsc';
9
+ export type SupportedProductNames = keyof ReturnType<typeof checkProductStatus>;
10
+ export declare function getEnabledProducts(config?: Partial<OptiOneConfig>): Array<SupportedProductNames>;
package/dist/server.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import 'server-only';
2
2
  import EnvVars from './env-vars';
3
3
  import EnvTools from './utils/env';
4
+ import { checkProductStatus, readConfigFromEnv } from './config';
4
5
  export * from './products';
5
6
  export * as Session from './utils/session';
6
7
  export * as EnvTools from './utils/env';
@@ -9,4 +10,14 @@ export function isOptimizelyOneEnabled() {
9
10
  }
10
11
  export * from './server-components';
11
12
  export * from './components/rsc';
13
+ export function getEnabledProducts(config) {
14
+ const optiOneConfig = config ?? readConfigFromEnv();
15
+ const status = checkProductStatus(optiOneConfig);
16
+ const enabledProducts = Object.getOwnPropertyNames(status).reduce((list, currentProductName) => {
17
+ if (status[currentProductName])
18
+ list.push(currentProductName);
19
+ return list;
20
+ }, []);
21
+ return enabledProducts;
22
+ }
12
23
  //# sourceMappingURL=server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AACpB,OAAO,OAAO,MAAM,YAAY,CAAA;AAChC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAElC,cAAc,YAAY,CAAA;AAC1B,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAA;AAEvC,MAAM,UAAU,sBAAsB;IAElC,OAAO,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;AACpE,CAAC;AAED,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AACpB,OAAO,OAAO,MAAM,YAAY,CAAA;AAChC,OAAO,QAAQ,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAsB,MAAM,UAAU,CAAA;AAEpF,cAAc,YAAY,CAAA;AAC1B,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAA;AAEvC,MAAM,UAAU,sBAAsB;IAElC,OAAO,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;AACpE,CAAC;AAED,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAIhC,MAAM,UAAU,kBAAkB,CAAC,MAA+B;IAC9D,MAAM,aAAa,GAAG,MAAM,IAAI,iBAAiB,EAAE,CAAA;IACnD,MAAM,MAAM,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAA;IAChD,MAAM,eAAe,GAAI,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAgC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,kBAAkB,EAAE,EAAE;QAC3H,IAAI,MAAM,CAAC,kBAAkB,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAClC,OAAO,IAAI,CAAA;IACf,CAAC,EAAE,EAAgC,CAAC,CAAA;IACpC,OAAO,eAAe,CAAA;AAC1B,CAAC"}
package/dist/styles.css CHANGED
@@ -1,2 +1,2 @@
1
- /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--oo-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--oo-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--oo-color-amber-200:oklch(92.4% .12 95.746);--oo-color-amber-800:oklch(47.3% .137 46.201);--oo-color-blue-500:oklch(62.3% .214 259.815);--oo-color-blue-800:oklch(42.4% .199 265.638);--oo-color-slate-100:oklch(96.8% .007 247.896);--oo-color-slate-200:oklch(92.9% .013 255.508);--oo-color-slate-300:oklch(86.9% .022 252.894);--oo-color-slate-500:oklch(55.4% .046 257.417);--oo-color-slate-800:oklch(27.9% .041 260.031);--oo-color-white:#fff;--oo-spacing:.25rem;--oo-font-weight-bold:700;--oo-radius-md:.375rem;--oo-animate-spin:spin 1s linear infinite;--oo-default-font-family:var(--oo-font-sans);--oo-default-mono-font-family:var(--oo-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--oo-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--oo-default-font-feature-settings,normal);font-variation-settings:var(--oo-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--oo-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--oo-default-mono-font-feature-settings,normal);font-variation-settings:var(--oo-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.oo\:fixed{position:fixed}.oo\:top-0{top:calc(var(--oo-spacing)*0)}.oo\:right-0{right:calc(var(--oo-spacing)*0)}.oo\:bottom-0{bottom:calc(var(--oo-spacing)*0)}.oo\:bottom-\[50px\]{bottom:50px}.oo\:z-\[500\]{z-index:500}.oo\:z-\[501\]{z-index:501}.oo\:col-span-2{grid-column:span 2/span 2}.oo\:m-2{margin:calc(var(--oo-spacing)*2)}.oo\:mt-3{margin-top:calc(var(--oo-spacing)*3)}.oo\:mr-2{margin-right:calc(var(--oo-spacing)*2)}.oo\:mr-\[0\.5em\]{margin-right:.5em}.oo\:mr-\[0\.25em\]{margin-right:.25em}.oo\:mb-2{margin-bottom:calc(var(--oo-spacing)*2)}.oo\:ml-2{margin-left:calc(var(--oo-spacing)*2)}.oo\:flex{display:flex}.oo\:grid{display:grid}.oo\:hidden{display:none}.oo\:inline-block{display:inline-block}.oo\:aspect-square{aspect-ratio:1}.oo\:h-4{height:calc(var(--oo-spacing)*4)}.oo\:h-\[1\.5em\]{height:1.5em}.oo\:h-\[1\.25em\]{height:1.25em}.oo\:h-\[50px\]{height:50px}.oo\:h-full{height:100%}.oo\:w-4{width:calc(var(--oo-spacing)*4)}.oo\:w-\[1\.5em\]{width:1.5em}.oo\:w-\[1\.25em\]{width:1.25em}.oo\:w-\[100px\]{width:100px}.oo\:w-auto{width:auto}.oo\:w-full{width:100%}.oo\:max-w-full{max-width:100%}.oo\:flex-1{flex:1}.oo\:flex-none{flex:none}.oo\:flex-grow{flex-grow:1}.oo\:animate-spin{animation:var(--oo-animate-spin)}.oo\:cursor-pointer{cursor:pointer}.oo\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.oo\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.oo\:flex-col{flex-direction:column}.oo\:flex-row{flex-direction:row}.oo\:justify-between{justify-content:space-between}.oo\:justify-stretch{justify-content:stretch}.oo\:gap-4{gap:calc(var(--oo-spacing)*4)}.oo\:gap-\[0\.25em\]{gap:.25em}.oo\:gap-x-4{column-gap:calc(var(--oo-spacing)*4)}.oo\:gap-y-1{row-gap:calc(var(--oo-spacing)*1)}:where(.oo\:divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.oo\:divide-slate-200>:not(:last-child)){border-color:var(--oo-color-slate-200)}.oo\:overflow-y-auto{overflow-y:auto}.oo\:overscroll-contain{overscroll-behavior:contain}.oo\:rounded-\[15px\]{border-radius:15px}.oo\:rounded-md{border-radius:var(--oo-radius-md)}.oo\:rounded-t-md{border-top-left-radius:var(--oo-radius-md);border-top-right-radius:var(--oo-radius-md)}.oo\:border{border-style:var(--tw-border-style);border-width:1px}.oo\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.oo\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.oo\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.oo\:border-amber-800{border-color:var(--oo-color-amber-800)}.oo\:border-slate-300{border-color:var(--oo-color-slate-300)}.oo\:border-slate-500{border-color:var(--oo-color-slate-500)}.oo\:bg-amber-200{background-color:var(--oo-color-amber-200)}.oo\:bg-blue-500{background-color:var(--oo-color-blue-500)}.oo\:bg-slate-100{background-color:var(--oo-color-slate-100)}.oo\:bg-white{background-color:var(--oo-color-white)}.oo\:p-1{padding:calc(var(--oo-spacing)*1)}.oo\:p-\[10px\]{padding:10px}.oo\:px-2{padding-inline:calc(var(--oo-spacing)*2)}.oo\:px-\[0\.25em\]{padding-inline:.25em}.oo\:py-1{padding-block:calc(var(--oo-spacing)*1)}.oo\:pt-1{padding-top:calc(var(--oo-spacing)*1)}.oo\:pt-4{padding-top:calc(var(--oo-spacing)*4)}.oo\:pt-\[0\.5em\]{padding-top:.5em}.oo\:text-center{text-align:center}.oo\:text-\[12px\]{font-size:12px}.oo\:text-\[14px\]{font-size:14px}.oo\:text-\[18px\]{font-size:18px}.oo\:font-bold{--tw-font-weight:var(--oo-font-weight-bold);font-weight:var(--oo-font-weight-bold)}.oo\:text-amber-800{color:var(--oo-color-amber-800)}.oo\:text-blue-500{color:var(--oo-color-blue-500)}.oo\:text-blue-800{color:var(--oo-color-blue-800)}.oo\:text-slate-800{color:var(--oo-color-slate-800)}.oo\:text-white{color:var(--oo-color-white)}.oo\:underline{text-decoration-line:underline}.oo\:data-open\:rotate-180[data-open]{rotate:180deg}.oo\:data-open\:transform[data-open]{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.oo\:data-selected\:bg-blue-500[data-selected]{background-color:var(--oo-color-blue-500)}.oo\:data-selected\:text-white[data-selected]{color:var(--oo-color-white)}@media (min-width:48rem){.oo\:md\:fixed{position:fixed}.oo\:md\:top-auto{top:auto}.oo\:md\:right-4{right:calc(var(--oo-spacing)*4)}.oo\:md\:bottom-0{bottom:calc(var(--oo-spacing)*0)}.oo\:md\:bottom-\[55px\]{bottom:55px}.oo\:md\:h-24{height:calc(var(--oo-spacing)*24)}.oo\:md\:h-\[350px\]{height:350px}.oo\:md\:w-\[350px\]{width:350px}.oo\:md\:w-\[800px\]{width:800px}.oo\:md\:justify-start{justify-content:flex-start}.oo\:md\:overflow-hidden{overflow:hidden}.oo\:md\:rounded-md{border-radius:var(--oo-radius-md)}.oo\:md\:rounded-t-md{border-top-left-radius:var(--oo-radius-md);border-top-right-radius:var(--oo-radius-md)}.oo\:md\:border{border-style:var(--tw-border-style);border-width:1px}.oo\:md\:border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.oo\:md\:border-slate-300{border-color:var(--oo-color-slate-300)}.oo\:md\:p-2{padding:calc(var(--oo-spacing)*2)}.oo\:md\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@media (prefers-color-scheme:dark){.oo\:dark\:text-slate-800{color:var(--oo-color-slate-800)}}}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@keyframes spin{to{transform:rotate(360deg)}}
1
+ /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--oo-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--oo-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--oo-color-amber-200:oklch(92.4% .12 95.746);--oo-color-amber-800:oklch(47.3% .137 46.201);--oo-color-blue-500:oklch(62.3% .214 259.815);--oo-color-blue-800:oklch(42.4% .199 265.638);--oo-color-slate-100:oklch(96.8% .007 247.896);--oo-color-slate-200:oklch(92.9% .013 255.508);--oo-color-slate-300:oklch(86.9% .022 252.894);--oo-color-slate-500:oklch(55.4% .046 257.417);--oo-color-slate-800:oklch(27.9% .041 260.031);--oo-color-white:#fff;--oo-spacing:.25rem;--oo-font-weight-bold:700;--oo-radius-md:.375rem;--oo-animate-spin:spin 1s linear infinite;--oo-default-font-family:var(--oo-font-sans);--oo-default-mono-font-family:var(--oo-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--oo-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--oo-default-font-feature-settings,normal);font-variation-settings:var(--oo-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--oo-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--oo-default-mono-font-feature-settings,normal);font-variation-settings:var(--oo-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.oo\:fixed{position:fixed}.oo\:top-0{top:calc(var(--oo-spacing)*0)}.oo\:right-0{right:calc(var(--oo-spacing)*0)}.oo\:bottom-0{bottom:calc(var(--oo-spacing)*0)}.oo\:bottom-\[50px\]{bottom:50px}.oo\:z-\[500\]{z-index:500}.oo\:z-\[501\]{z-index:501}.oo\:col-span-2{grid-column:span 2/span 2}.oo\:m-2{margin:calc(var(--oo-spacing)*2)}.oo\:mt-3{margin-top:calc(var(--oo-spacing)*3)}.oo\:mr-2{margin-right:calc(var(--oo-spacing)*2)}.oo\:mr-\[0\.5em\]{margin-right:.5em}.oo\:mr-\[0\.25em\]{margin-right:.25em}.oo\:mb-2{margin-bottom:calc(var(--oo-spacing)*2)}.oo\:ml-2{margin-left:calc(var(--oo-spacing)*2)}.oo\:flex{display:flex}.oo\:grid{display:grid}.oo\:hidden{display:none}.oo\:inline-block{display:inline-block}.oo\:aspect-square{aspect-ratio:1}.oo\:h-4{height:calc(var(--oo-spacing)*4)}.oo\:h-\[1\.5em\]{height:1.5em}.oo\:h-\[1\.25em\]{height:1.25em}.oo\:h-\[50px\]{height:50px}.oo\:h-full{height:100%}.oo\:w-4{width:calc(var(--oo-spacing)*4)}.oo\:w-\[1\.5em\]{width:1.5em}.oo\:w-\[1\.25em\]{width:1.25em}.oo\:w-\[100px\]{width:100px}.oo\:w-auto{width:auto}.oo\:w-full{width:100%}.oo\:max-w-full{max-width:100%}.oo\:flex-1{flex:1}.oo\:flex-none{flex:none}.oo\:flex-grow{flex-grow:1}.oo\:animate-spin{animation:var(--oo-animate-spin)}.oo\:cursor-pointer{cursor:pointer}.oo\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.oo\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.oo\:flex-col{flex-direction:column}.oo\:flex-row{flex-direction:row}.oo\:justify-between{justify-content:space-between}.oo\:justify-stretch{justify-content:stretch}.oo\:gap-4{gap:calc(var(--oo-spacing)*4)}.oo\:gap-\[0\.25em\]{gap:.25em}.oo\:gap-x-4{column-gap:calc(var(--oo-spacing)*4)}.oo\:gap-y-1{row-gap:calc(var(--oo-spacing)*1)}:where(.oo\:divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.oo\:divide-slate-200>:not(:last-child)){border-color:var(--oo-color-slate-200)}.oo\:overflow-y-auto{overflow-y:auto}.oo\:overscroll-contain{overscroll-behavior:contain}.oo\:rounded-\[15px\]{border-radius:15px}.oo\:rounded-md{border-radius:var(--oo-radius-md)}.oo\:rounded-t-md{border-top-left-radius:var(--oo-radius-md);border-top-right-radius:var(--oo-radius-md)}.oo\:border{border-style:var(--tw-border-style);border-width:1px}.oo\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.oo\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.oo\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.oo\:border-amber-800{border-color:var(--oo-color-amber-800)}.oo\:border-slate-300{border-color:var(--oo-color-slate-300)}.oo\:border-slate-500{border-color:var(--oo-color-slate-500)}.oo\:bg-amber-200{background-color:var(--oo-color-amber-200)}.oo\:bg-blue-500{background-color:var(--oo-color-blue-500)}.oo\:bg-slate-100{background-color:var(--oo-color-slate-100)}.oo\:bg-white{background-color:var(--oo-color-white)}.oo\:p-1{padding:calc(var(--oo-spacing)*1)}.oo\:p-\[10px\]{padding:10px}.oo\:px-2{padding-inline:calc(var(--oo-spacing)*2)}.oo\:px-\[0\.25em\]{padding-inline:.25em}.oo\:py-1{padding-block:calc(var(--oo-spacing)*1)}.oo\:pt-1{padding-top:calc(var(--oo-spacing)*1)}.oo\:pt-4{padding-top:calc(var(--oo-spacing)*4)}.oo\:pt-\[0\.5em\]{padding-top:.5em}.oo\:text-center{text-align:center}.oo\:text-\[12px\]{font-size:12px}.oo\:text-\[14px\]{font-size:14px}.oo\:text-\[18px\]{font-size:18px}.oo\:font-bold{--tw-font-weight:var(--oo-font-weight-bold);font-weight:var(--oo-font-weight-bold)}.oo\:text-amber-800{color:var(--oo-color-amber-800)}.oo\:text-blue-500{color:var(--oo-color-blue-500)}.oo\:text-blue-800{color:var(--oo-color-blue-800)}.oo\:text-slate-800{color:var(--oo-color-slate-800)}.oo\:text-white{color:var(--oo-color-white)}.oo\:underline{text-decoration-line:underline}.oo\:data-open\:rotate-180[data-open]{rotate:180deg}.oo\:data-open\:transform[data-open]{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.oo\:data-selected\:bg-blue-500[data-selected]{background-color:var(--oo-color-blue-500)}.oo\:data-selected\:text-white[data-selected]{color:var(--oo-color-white)}@media (min-width:48rem){.oo\:md\:fixed{position:fixed}.oo\:md\:top-auto{top:auto}.oo\:md\:right-4{right:calc(var(--oo-spacing)*4)}.oo\:md\:bottom-0{bottom:calc(var(--oo-spacing)*0)}.oo\:md\:bottom-\[55px\]{bottom:55px}.oo\:md\:h-24{height:calc(var(--oo-spacing)*24)}.oo\:md\:h-\[350px\]{height:350px}.oo\:md\:w-\[350px\]{width:350px}.oo\:md\:w-\[800px\]{width:800px}.oo\:md\:justify-start{justify-content:flex-start}.oo\:md\:overflow-hidden{overflow:hidden}.oo\:md\:rounded-md{border-radius:var(--oo-radius-md)}.oo\:md\:rounded-t-md{border-top-left-radius:var(--oo-radius-md);border-top-right-radius:var(--oo-radius-md)}.oo\:md\:border{border-style:var(--tw-border-style);border-width:1px}.oo\:md\:border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.oo\:md\:border-slate-300{border-color:var(--oo-color-slate-300)}.oo\:md\:p-2{padding:calc(var(--oo-spacing)*2)}.oo\:md\:shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@media (prefers-color-scheme:dark){.oo\:dark\:text-slate-800{color:var(--oo-color-slate-800)}}}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@keyframes spin{to{transform:rotate(360deg)}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@remkoj/optimizely-one-nextjs",
3
3
  "license": "Apache-2.0",
4
- "version": "6.0.0-pre1",
4
+ "version": "6.0.0-pre10",
5
5
  "repository": "https://github.com/remkoj/optimizely-dxp-clients.git",
6
6
  "author": "Remko Jantzen <693172+remkoj@users.noreply.github.com>",
7
7
  "homepage": "https://github.com/remkoj/optimizely-dxp-clients",
@@ -39,33 +39,34 @@
39
39
  }
40
40
  },
41
41
  "devDependencies": {
42
- "@remkoj/optimizely-graph-client": "^6.0.0-pre1",
43
- "@tailwindcss/cli": "^4.1.11",
44
- "@types/node": "^22.16.0",
45
- "@types/react": "^19.1.8",
46
- "@types/react-dom": "19.1.6",
47
- "@types/uuid": "^10.0.0",
48
- "browserslist": "^4.25.1",
49
- "next": "^15.3.5",
42
+ "@remkoj/optimizely-graph-client": "^6.0.0-pre10",
43
+ "@tailwindcss/cli": "^4.1.16",
44
+ "@types/node": "^22.18.12",
45
+ "@types/react": "^19.2.2",
46
+ "@types/react-dom": "19.2.2",
47
+ "@types/uuid": "^11.0.0",
48
+ "browserslist": "^4.27.0",
49
+ "next": "^16.0.0",
50
50
  "prop-types": "^15.8.1",
51
- "react": "^19.1.0",
52
- "react-dom": "^19.1.0",
53
- "scheduler": "^0.26.0",
54
- "tailwindcss": "^4.1.11",
55
- "typescript": "^5.8.3",
56
- "update-browserslist-db": "^1.1.3"
51
+ "react": "^19.2.0",
52
+ "react-dom": "^19.2.0",
53
+ "scheduler": "^0.27.0",
54
+ "tailwindcss": "^4.1.16",
55
+ "typescript": "^5.9.3",
56
+ "update-browserslist-db": "^1.1.4"
57
57
  },
58
58
  "peerDependencies": {
59
- "next": "^15",
59
+ "next": "^15 || ^16",
60
60
  "react": "^19",
61
61
  "react-dom": "^19"
62
62
  },
63
63
  "dependencies": {
64
- "@headlessui/react": "^2.2.4",
64
+ "@fastify/deepmerge": "^3.1.0",
65
+ "@headlessui/react": "^2.2.9",
65
66
  "@heroicons/react": "^2.2.0",
66
- "@remkoj/optimizely-graph-client": "^6.0.0-pre1",
67
- "swr": "^2.3.4",
68
- "uuid": "^11.1.0"
67
+ "@remkoj/optimizely-graph-client": "^6.0.0-pre10",
68
+ "swr": "^2.3.6",
69
+ "uuid": "^13.0.0"
69
70
  },
70
71
  "scripts": {
71
72
  "clean": "tsc --build --clean",