slice-machine-ui 1.22.0 → 1.22.1-dev-next-release.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/out/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/7ef90ba762e84cee.css" as="style"/><link rel="stylesheet" href="/_next/static/css/7ef90ba762e84cee.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-2f5c7151b68c3a63.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/Ab-V3DkdEEbqzjp7W8ayU/_buildManifest.js" defer=""></script><script src="/_next/static/Ab-V3DkdEEbqzjp7W8ayU/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"Ab-V3DkdEEbqzjp7W8ayU","runtimeConfig":{"sentryEnvironment":"production"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/7ef90ba762e84cee.css" as="style"/><link rel="stylesheet" href="/_next/static/css/7ef90ba762e84cee.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2f903acb0cccbf9e.js" defer=""></script><script src="/_next/static/chunks/framework-cdccea7a52cc6e81.js" defer=""></script><script src="/_next/static/chunks/main-5e6780279ca21cb9.js" defer=""></script><script src="/_next/static/chunks/pages/_app-905f14cc31c727ef.js" defer=""></script><script src="/_next/static/chunks/pages/_error-69b4f498bafdd188.js" defer=""></script><script src="/_next/static/J1MoBnBBZsx2sI15rIXpA/_buildManifest.js" defer=""></script><script src="/_next/static/J1MoBnBBZsx2sI15rIXpA/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"J1MoBnBBZsx2sI15rIXpA","runtimeConfig":{"sentryEnvironment":"alpha"},"nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- self.__BUILD_MANIFEST=function(s,c,a,e,t,i,d,f,b,n){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[c,i,d,"static/chunks/pages/index-d8e3a2c0d712904f.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":["static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-cfda9d30715b6e2a.js"],"/changes":[a,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-38d08f1e885b222d.js",s,e,"static/css/7d650bca12dc4061.css","static/chunks/pages/changes-a3cdb6251b224e4b.js"],"/custom-types":[c,i,d,"static/chunks/pages/custom-types-2f5664d9492b13fb.js"],"/custom-types/[customTypeId]":[f,s,c,t,b,n,"static/chunks/pages/custom-types/[customTypeId]-3a37eb3373bb8823.js"],"/labs":["static/chunks/pages/labs-dfad3c3553469739.js"],"/page-types/[pageTypeId]":[f,s,c,t,b,n,"static/chunks/pages/page-types/[pageTypeId]-733f3890c0466a05.js"],"/slices":[a,s,e,"static/css/cb33580e45d01b59.css","static/chunks/pages/slices-dc4f17b54c9a3eb5.js"],"/slices/[lib]/[sliceName]/[variation]":[a,s,e,t,"static/css/77abb01eee0e43a7.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-c228a7c42e87eb27.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[a,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-9f66499125869c64.js","static/chunks/505-fa47e200ac3a012d.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-7b17cb59d0db03b5.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/958-b69a03c1c151348e.js","static/chunks/550-8557ad3750e1e581.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/80-7b8a97d0122ff74a.js","static/chunks/482-ec07ddd6b8d3b7ae.js","static/chunks/840-45aefe7b4d84745c.js","static/css/be1f49e49a5aa7eb.css","static/chunks/474-9a64c602aba34ae5.js","static/chunks/904-245c0d63cb4b9a11.js","static/css/5da5d3cd7a87c3cf.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
1
+ self.__BUILD_MANIFEST=function(s,c,a,e,t,i,d,f,b,n){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[c,i,d,"static/chunks/pages/index-d8e3a2c0d712904f.js"],"/_error":["static/chunks/pages/_error-69b4f498bafdd188.js"],"/changelog":["static/chunks/870-0c7a8a9622de78b7.js","static/chunks/pages/changelog-cfda9d30715b6e2a.js"],"/changes":[a,"static/chunks/8eec4907-b712959d9f984b68.js","static/chunks/918-38d08f1e885b222d.js",s,e,"static/css/7d650bca12dc4061.css","static/chunks/pages/changes-a3cdb6251b224e4b.js"],"/custom-types":[c,i,d,"static/chunks/pages/custom-types-2f5664d9492b13fb.js"],"/custom-types/[customTypeId]":[f,s,c,t,b,n,"static/chunks/pages/custom-types/[customTypeId]-3a37eb3373bb8823.js"],"/labs":["static/chunks/pages/labs-dfad3c3553469739.js"],"/page-types/[pageTypeId]":[f,s,c,t,b,n,"static/chunks/pages/page-types/[pageTypeId]-733f3890c0466a05.js"],"/slices":[a,s,e,"static/css/cb33580e45d01b59.css","static/chunks/pages/slices-dc4f17b54c9a3eb5.js"],"/slices/[lib]/[sliceName]/[variation]":[a,s,e,t,"static/css/77abb01eee0e43a7.css","static/chunks/pages/slices/[lib]/[sliceName]/[variation]-c228a7c42e87eb27.js"],"/slices/[lib]/[sliceName]/[variation]/simulator":[a,"static/chunks/72585f70-28b4d7d5384b3703.js","static/chunks/18539003-9f66499125869c64.js","static/chunks/505-fa47e200ac3a012d.js","static/chunks/pages/slices/[lib]/[sliceName]/[variation]/simulator-7b17cb59d0db03b5.js"],sortedPages:["/","/_app","/_error","/changelog","/changes","/custom-types","/custom-types/[customTypeId]","/labs","/page-types/[pageTypeId]","/slices","/slices/[lib]/[sliceName]/[variation]","/slices/[lib]/[sliceName]/[variation]/simulator"]}}("static/chunks/958-0a6a103fac00582b.js","static/chunks/550-8557ad3750e1e581.js","static/chunks/c8eae200-966ce352f7b5d2b9.js","static/chunks/80-7b8a97d0122ff74a.js","static/chunks/482-7e97f91961588a90.js","static/chunks/840-45aefe7b4d84745c.js","static/css/be1f49e49a5aa7eb.css","static/chunks/474-9a64c602aba34ae5.js","static/chunks/904-e7c8c1ba265177fb.js","static/css/5da5d3cd7a87c3cf.css"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[482],{8482:function(e,n,t){"use strict";t.d(n,{Z:function(){return S}});var s=t(62230),i=t(85244),d=t(17064),r=t(81541),a=t(52322),c=t(22715),l=t(13980),o=t(2784),u=t(65077),f=t(28173),p=t(75012),x=t(9620),h=t(2967),y=t(75289),_=t(71168),g=t(21078),j=t(13394),v=t(99968),m=t(92809),b=function(e){var n=e.fields,t=e.title,d=e.tabId,r=e.enterEditMode,c=e.enterSelectMode,l=e.onDragEnd,o=e.renderFieldAccessor,u=e.onDeleteItem,f=e.showHints,p=e.newField,x=e.renderHintBase,b=e.isRepeatable,R=e.dataCy,z=e.isRepeatableCustomType;return(0,a.jsx)(h.Z5,{onDragEnd:l,children:(0,a.jsx)(h.bK,{droppableId:t,children:function(e,t){return(0,a.jsxs)(y.xu,(0,i.Z)((0,s.Z)({as:"ul",ref:e.innerRef},e.droppableProps),{"data-cy":R,sx:{paddingInline:"16px !important"},children:[n.map(function(e,n){var l=e.value,p=l.config,h=l.type,R=(0,v.t)(j,p,h);if(!R)return(0,a.jsx)(_.Z,{children:(0,a.jsxs)(y.xv,{children:['Field type "',h,'" not supported']})});var S={item:e,index:n,tabId:d,widget:R,showHints:f,key:e.key,enterSelectMode:c,renderFieldAccessor:o,enterEditMode:r,parentSnapshot:t,deleteItem:u,draggableId:"list-item-".concat(e.key),isRepeatableCustomType:z};if(R.CustomListItem){var Z=R.CustomListItem;return(0,a.jsx)(Z,(0,s.Z)({},S))}var C=(0,a.jsx)(m.Z,{item:e,show:f,isRepeatable:b,renderHintBase:x,Widgets:j,typeName:R.CUSTOM_NAME||R.TYPE_NAME});return(0,a.jsx)(g.Z,(0,i.Z)((0,s.Z)({},S),{HintElement:C}))}),e.placeholder,p]}))}})})},R=function(e){var n=e.onEnterSelectMode,t=e.zoneName;return(0,a.jsxs)(y.xu,{sx:{textAlign:"center",my:4},children:[(0,a.jsx)(y.X6,{as:"h5",children:"Add a new field here"}),(0,a.jsx)(y.xu,{sx:{my:2},children:(0,a.jsxs)(y.xv,{sx:{color:"textClear"},children:["Add a field to your ",t," Zone"]})}),(0,a.jsx)(y.xu,{sx:{display:"flex",justifyContent:"center",marginTop:16},children:(0,a.jsx)(c.zx,{variant:"secondary",onClick:function(){return n()},"data-cy":"add-".concat(t,"-field"),startIcon:"add",children:"Add a new field"})})]})},z=function(e){var n=e.zoneType,t=e.tabId,l=e.title,h=e.fields,y=e.poolOfFieldsToCheck,_=e.widgetsArray,g=e.isRepeatable,j=e.onDeleteItem,v=e.onSaveNewField,m=e.onDragEnd,z=e.EditModal,S=e.onSave,Z=e.dataTip,C=e.renderHintBase,w=e.renderFieldAccessor,E=e.dataCy,I=e.isRepeatableCustomType,A=Object.entries(y).find(function(e){return"UID"===(0,d.Z)(e,2)[1].value.type})?_.filter(function(e){return"UID"!==e.TYPE_NAME}):_,T=(0,o.useState)(!1),k=T[0],F=T[1],N=(0,o.useState)({isOpen:!1}),M=N[0],O=N[1],q=(0,o.useState)({isOpen:!1}),D=q[0],H=q[1],B=(0,o.useState)(null),P=B[0],U=B[1],W=function(e){O({isOpen:!0,field:e})},L=function(){H({isOpen:!0})},Y=function(){O({isOpen:!1})},K=function(){return H({isOpen:!1})},V=function(e){U({widgetTypeName:e,fields:h}),H({isOpen:!1})},X=function(){return U(null)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.Bu,{actions:h.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.xv,{color:"grey11",component:"span",noWrap:!0,children:"Show code snippets?"}),(0,a.jsx)(c.rs,{checked:k,onCheckedChange:F,size:"small",style:{flexShrink:0}}),(0,a.jsx)(c.zx,{"data-cy":"add-".concat(g?"Repeatable":"Static","-field"),onClick:L,startIcon:"add",variant:"secondary",children:"Add a new field"})]}):void 0,children:l}),0!==h.length||P?h.length>0||P?(0,a.jsx)(u.xR,{children:(0,a.jsx)(b,{tabId:t,isRepeatable:g,fields:h,showHints:k,dataTip:Z,title:l,renderFieldAccessor:w,renderHintBase:C,enterEditMode:W,enterSelectMode:L,onDragEnd:m,onDeleteItem:j,dataCy:E,isRepeatableCustomType:I,newField:P&&(0,a.jsx)(x.Z,(0,i.Z)((0,s.Z)({},P),{fields:y||h,onSave:function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];v.apply(void 0,(0,r.Z)(n)),U(null)},onCancelNewField:X}))})}):void 0:(0,a.jsx)(u.xR,{children:(0,a.jsx)(R,{onEnterSelectMode:function(){return L()},zoneName:g?"Repeatable":"Static"})}),(0,a.jsx)(z,{data:M,close:Y,onSave:S,fields:y,zoneType:n}),(0,a.jsx)(p.Z,{data:D,close:K,onSelect:V,widgetsArray:A})]})};z.propTypes={isRepeatable:l.bool,title:l.string.isRequired,dataTip:l.string.isRequired,onSave:l.func.isRequired,onSaveNewField:l.func.isRequired,onDragEnd:l.func.isRequired,onDeleteItem:l.func.isRequired,poolOfFieldsToCheck:(0,l.arrayOf)((0,l.shape)({key:l.string,value:l.object})),renderHintBase:l.func.isRequired,renderFieldAccessor:l.func.isRequired,widgetsArray:l.array.isRequired,fields:(0,l.arrayOf)((0,l.shape)({key:l.string.isRequired,value:(0,l.shape)({config:l.object,fields:l.array,type:l.string.isRequired})}))};var S=z},28173:function(e,n,t){"use strict";t.d(n,{aV:function(){return c},Bu:function(){return l}});var s=t(62230),i=t(85244),d=t(98240),r=t(52322),a=t(22715);t(545),t(84779);var c=function(e){return(0,r.jsx)("div",(0,i.Z)((0,s.Z)({},e),{className:"_2a96i71 _1ecs97dez0 _1ecs97dez2 _1ecs97d3fg _1ecs97d3mt _1ecs97df0r _1ecs97df23 _1ecs97df2h _1ecs97dezb _1ecs97dezr"}))},l=function(e){var n=e.actions,t=e.children,c=e.toggle,l=(0,d.Z)(e,["actions","children","toggle"]);return(0,r.jsxs)("div",(0,i.Z)((0,s.Z)({},l),{className:"_2a96i73 _2a96i72 _1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97dez8 _1ecs97d6r8 _1ecs97d6yl _1ecs97df2l _1ecs97dez1 _1ecs97df71 _1ecs97dfie _1ecs97d18 _1ecs97d8l _1ecs97df29 _1ecs97df92 _1ecs97dfi1",children:[(0,r.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"bold",children:t}),c,Boolean(n)?(0,r.jsx)("div",{className:"_1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97dez8 _1ecs97dezd _1ecs97df92 _1ecs97dezj _1ecs97df51",children:n}):null]}))}},84779:function(){},545:function(){}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[482],{8482:function(e,n,t){"use strict";t.d(n,{Z:function(){return S}});var s=t(62230),i=t(85244),d=t(17064),r=t(81541),a=t(52322),c=t(22715),l=t(13980),o=t(2784),u=t(65077),f=t(28173),p=t(75012),x=t(9620),h=t(2967),y=t(75289),_=t(71168),g=t(21078),j=t(13394),v=t(99968),m=t(92809),b=function(e){var n=e.fields,t=e.title,d=e.tabId,r=e.enterEditMode,c=e.enterSelectMode,l=e.onDragEnd,o=e.renderFieldAccessor,u=e.onDeleteItem,f=e.showHints,p=e.newField,x=e.renderHintBase,b=e.isRepeatable,R=e.dataCy,z=e.isRepeatableCustomType;return(0,a.jsx)(h.Z5,{onDragEnd:l,children:(0,a.jsx)(h.bK,{droppableId:t,children:function(e,t){return(0,a.jsxs)(y.xu,(0,i.Z)((0,s.Z)({as:"ul",ref:e.innerRef},e.droppableProps),{"data-cy":R,sx:{paddingInline:"16px !important"},children:[n.map(function(e,n){var l=e.value,p=l.config,h=l.type,R=(0,v.t)(j,p,h);if(!R)return(0,a.jsx)(_.Z,{children:(0,a.jsxs)(y.xv,{children:['Field type "',h,'" not supported']})});var S={item:e,index:n,tabId:d,widget:R,showHints:f,key:e.key,enterSelectMode:c,renderFieldAccessor:o,enterEditMode:r,parentSnapshot:t,deleteItem:u,draggableId:"list-item-".concat(e.key),isRepeatableCustomType:z};if(R.CustomListItem){var Z=R.CustomListItem;return(0,a.jsx)(Z,(0,s.Z)({},S))}var C=(0,a.jsx)(m.Z,{item:e,show:f,isRepeatable:b,renderHintBase:x,Widgets:j,typeName:R.CUSTOM_NAME||R.TYPE_NAME});return(0,a.jsx)(g.Z,(0,i.Z)((0,s.Z)({},S),{HintElement:C}))}),e.placeholder,p]}))}})})},R=function(e){var n=e.onEnterSelectMode,t=e.zoneName;return(0,a.jsxs)(y.xu,{sx:{textAlign:"center",my:4},children:[(0,a.jsx)(y.X6,{as:"h5",children:"Add a new field here"}),(0,a.jsx)(y.xu,{sx:{my:2},children:(0,a.jsxs)(y.xv,{sx:{color:"textClear"},children:["Add a field to your ",t," Zone"]})}),(0,a.jsx)(y.xu,{sx:{display:"flex",justifyContent:"center",marginTop:16},children:(0,a.jsx)(c.zx,{variant:"secondary",onClick:function(){return n()},"data-cy":"add-".concat(t,"-field"),startIcon:"add",children:"Add a new field"})})]})},z=function(e){var n=e.zoneType,t=e.tabId,l=e.title,h=e.fields,y=e.poolOfFieldsToCheck,_=e.widgetsArray,g=e.isRepeatable,j=e.onDeleteItem,v=e.onSaveNewField,m=e.onDragEnd,z=e.EditModal,S=e.onSave,Z=e.dataTip,C=e.renderHintBase,w=e.renderFieldAccessor,E=e.dataCy,I=e.isRepeatableCustomType,A=Object.entries(y).find(function(e){return"UID"===(0,d.Z)(e,2)[1].value.type})?_.filter(function(e){return"UID"!==e.TYPE_NAME}):_,T=(0,o.useState)(!1),k=T[0],F=T[1],N=(0,o.useState)({isOpen:!1}),M=N[0],O=N[1],q=(0,o.useState)({isOpen:!1}),D=q[0],H=q[1],B=(0,o.useState)(null),P=B[0],U=B[1],W=function(e){O({isOpen:!0,field:e})},L=function(){H({isOpen:!0})},Y=function(){O({isOpen:!1})},K=function(){return H({isOpen:!1})},V=function(e){U({widgetTypeName:e,fields:h}),H({isOpen:!1})},X=function(){return U(null)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.Bu,{actions:h.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.xv,{color:"grey11",component:"span",noWrap:!0,children:"Show code snippets?"}),(0,a.jsx)(c.rs,{checked:k,onCheckedChange:F,size:"small",style:{flexShrink:0}}),(0,a.jsx)(c.zx,{"data-cy":"add-".concat(g?"Repeatable":"Static","-field"),onClick:L,startIcon:"add",variant:"secondary",children:"Add a new field"})]}):void 0,children:l}),0!==h.length||P?h.length>0||P?(0,a.jsx)(u.xR,{children:(0,a.jsx)(b,{tabId:t,isRepeatable:g,fields:h,showHints:k,dataTip:Z,title:l,renderFieldAccessor:w,renderHintBase:C,enterEditMode:W,enterSelectMode:L,onDragEnd:m,onDeleteItem:j,dataCy:E,isRepeatableCustomType:I,newField:P&&(0,a.jsx)(x.Z,(0,i.Z)((0,s.Z)({},P),{fields:y||h,onSave:function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];v.apply(void 0,(0,r.Z)(n)),U(null)},onCancelNewField:X}))})}):void 0:(0,a.jsx)(u.xR,{children:(0,a.jsx)(R,{onEnterSelectMode:function(){return L()},zoneName:g?"Repeatable":"Static"})}),(0,a.jsx)(z,{data:M,close:Y,onSave:S,fields:y,zoneType:n}),(0,a.jsx)(p.Z,{data:D,close:K,onSelect:V,widgetsArray:A})]})};z.propTypes={isRepeatable:l.bool,title:l.string.isRequired,dataTip:l.string.isRequired,onSave:l.func.isRequired,onSaveNewField:l.func.isRequired,onDragEnd:l.func.isRequired,onDeleteItem:l.func.isRequired,poolOfFieldsToCheck:(0,l.arrayOf)((0,l.shape)({key:l.string,value:l.object})),renderHintBase:l.func.isRequired,renderFieldAccessor:l.func.isRequired,widgetsArray:l.array.isRequired,fields:(0,l.arrayOf)((0,l.shape)({key:l.string.isRequired,value:(0,l.shape)({config:l.object,fields:l.array,type:l.string.isRequired})}))};var S=z},28173:function(e,n,t){"use strict";t.d(n,{aV:function(){return c},Bu:function(){return l}});var s=t(62230),i=t(85244),d=t(98240),r=t(52322),a=t(22715);t(82432),t(84779);var c=function(e){return(0,r.jsx)("div",(0,i.Z)((0,s.Z)({},e),{className:"_2a96i71 _1ecs97dez0 _1ecs97dez2 _1ecs97d3fg _1ecs97d3mt _1ecs97df0r _1ecs97df23 _1ecs97df2h _1ecs97dezb _1ecs97dezr"}))},l=function(e){var n=e.actions,t=e.children,c=e.toggle,l=(0,d.Z)(e,["actions","children","toggle"]);return(0,r.jsxs)("div",(0,i.Z)((0,s.Z)({},l),{className:"_2a96i73 _2a96i72 _1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97dez8 _1ecs97d6r8 _1ecs97d6yl _1ecs97df2l _1ecs97dez1 _1ecs97df71 _1ecs97dfie _1ecs97d18 _1ecs97d8l _1ecs97df29 _1ecs97df92 _1ecs97dfi1",children:[(0,r.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"bold",children:t}),c,Boolean(n)?(0,r.jsx)("div",{className:"_1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97dez8 _1ecs97dezd _1ecs97df92 _1ecs97dezj _1ecs97df51",children:n}):null]}))}},84779:function(){},82432:function(){}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[904],{45466:function(e,n,t){"use strict";t.d(n,{c:function(){return g}});var i=t(22710),r=t(62230),a=t(85244),s=t(99267),l=t(52322),c=t(75289),o=t(2784),d=t(36131),u=t(68780),f=t(88932),m=t(38876),h=t(81038),p=t(82770);function v(){return(v=(0,i.Z)(function(e){var n,t,i,r,a,l,c;return(0,s.__generator)(this,function(s){switch(s.label){case 0:var o;return s.trys.push([0,3,,4]),n=e.sliceName,t=e.libraryName,i=e.onSuccess,o=n,r={id:(0,m.T3)(o),type:"SharedSlice",name:o,description:o,variations:[{id:x,name:(0,m.MP)(x),docURL:"...",version:"initial",description:(0,m.MP)(x),imageUrl:""},]},[4,h.j.slices.createSlice({libraryID:t,model:r})];case 1:if((a=s.sent().errors).length>0)throw a;return p.Xe.track({event:"slice:created",id:(0,m.MP)(n),name:n,library:t}),[4,i(r)];case 2:return s.sent(),[3,4];case 3:return l=s.sent(),c="Internal Error: Slice not created",console.error(c,l),f.Am.error(c),[3,4];case 4:return[2]}})})).apply(this,arguments)}var x="default",y=t(90374),j=t(66443),b=t(70041),g=function(e){var n,t=e.onClose,f=e.onSuccess,m=e.localLibraries,h=e.remoteSlices,x=(0,y.Z)().createSliceSuccess,g=(0,o.useState)(!1),C=g[0],S=g[1],_=(n=(0,i.Z)(function(e){var n,t;return(0,s.__generator)(this,function(r){switch(r.label){case 0:var a;return n=e.sliceName,t=e.from,S(!0),[4,function(e){return v.apply(this,arguments)}({sliceName:n,libraryName:t,onSuccess:(a=(0,i.Z)(function(e){var n;return(0,s.__generator)(this,function(n){switch(n.label){case 0:return[4,(0,p.y0)()];case 1:return x(n.sent().libraries),[4,f(e,t)];case 2:return n.sent(),[2]}})}),function(e){return a.apply(this,arguments)})})];case 1:return r.sent(),[2]}})}),function(e){return n.apply(this,arguments)});return(0,l.jsx)(u.Z,{dataCy:"create-slice-modal",isOpen:!0,widthInPx:"530px",isLoading:C,formId:"create-new-slice",close:t,buttonLabel:"Create",onSubmit:function(e){_(e)},initialValues:{sliceName:"",from:m[0].name},validate:function(e){return(0,j.h)(e,m,h)},content:{title:"Create a new slice"},children:function(e){var n=e.touched,t=e.values,i=e.setFieldValue,s=e.errors;return(0,l.jsxs)(c.xu,{children:[(0,l.jsx)(b.W,{name:"sliceName",label:"Slice Name",placeholder:"Pascalised Slice API ID (e.g. TextBlock)",error:n.sliceName?s.sliceName:void 0,dataCy:"slice-name-input"}),(0,l.jsx)(c.__,{htmlFor:"from",sx:{mb:2},children:"Target Library"}),(0,l.jsx)(d.ZP,{name:"from",options:m.map(function(e){return{value:e.name,label:e.name}}),onChange:function(e){return e?void i("from",e.value):null},defaultValue:{value:t.from,label:t.from},styles:{option:function(e){return(0,a.Z)((0,r.Z)({},e),{color:"#161618"})}},theme:function(e){return(0,a.Z)((0,r.Z)({},e),{colors:(0,a.Z)((0,r.Z)({},e.colors),{primary:"#E9E8EA"})})},menuPortalTarget:document.body})]})}})}},66443:function(e,n,t){"use strict";t.d(n,{h:function(){return o}});var i=t(81541),r=t(75329),a=t(96009),s=t.n(a),l=t(74600),c=t.n(l);function o(e,n,t){var a=e.sliceName;if(!a)return{sliceName:"Cannot be empty"};if(!r.xo.exec(a))return{sliceName:"No special characters allowed"};if(c()(s()(a)).replace(/\s/gm,"")!==a.trim())return{sliceName:"Value has to be PascalCased"};if(a.match(/^\d/))return{sliceName:"Value cannot start with a number"};if(r.lS.includes(a))return{sliceName:"".concat(a," is reserved for Slice Machine use")};var l=n.flatMap(function(e){return e.components.map(function(e){return e.model.name})}),o=t.map(function(e){return e.name});if((0,i.Z)(l).concat((0,i.Z)(o)).includes(a))return{sliceName:"Slice name is already taken."}}},59469:function(e,n,t){"use strict";var i=t(62230),r=t(52322),a=t(75289);n.Z=function(e){var n=e.elems,t=e.renderElem,s=e.defineElementKey,l=e.gridTemplateMinPx,c=e.gridGap,o=e.sx;return(0,r.jsx)(a.xu,{as:"section",sx:(0,i.Z)({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(".concat(void 0===l?"320px":l,", 1fr))"),gridGap:void 0===c?"16px":c,pt:2},o),children:n.map(function(e,n){return e?(0,r.jsx)("span",{children:t(e,n)},"".concat(s(e),"-").concat(n+1)):null})})}},12904:function(e,n,t){"use strict";t.d(n,{H:function(){return nr}});var i=t(52322),r=t(22715),a=t(97729),s=t.n(a),l=t(5632),c=t(2784),o=t(56580),d=t(76747),u=t(62230),f=t(85244),m=t(98240),h=t(50002),p=t(73844);t(82432);var v="_1k08lzu5 _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97d32 _1ecs97daf _1ecs97df0v",x=function(e){return(0,i.jsx)("div",(0,f.Z)((0,u.Z)({},e),{className:"_1k08lzu2 _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97d1u _1ecs97d97 _1ecs97d3fg _1ecs97d3mt _1ecs97df0r _1ecs97df23 _1ecs97df2h _1ecs97dezr"}))},y=function(e){return(0,i.jsx)("div",(0,f.Z)((0,u.Z)({},e),{className:"_1k08lzu3 _1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97dez8 _1ecs97dfhl",children:(0,i.jsxs)("div",{className:"_1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97df92",children:[(0,i.jsx)("span",{className:v}),(0,i.jsx)("span",{className:v}),(0,i.jsx)("span",{className:v})]})}))},j=function(e){return(0,i.jsx)(p.fC,(0,f.Z)((0,u.Z)({},e),{activationMode:"manual",className:"_1k08lzu6 _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97dezd"}))},b=function(e){var n=e.children,t=e.onAddNewTab,a=(0,m.Z)(e,["children","onAddNewTab"]);return(0,i.jsxs)(p.aV,(0,f.Z)((0,u.Z)({},a),{className:"_1k08lzu7 _1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97dezq",children:[n,(0,i.jsx)("div",{className:"_1k08lzuc _1k08lzu8 _1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97dez8 _1ecs97dfgy _1ecs97d1u _1ecs97d97 _1ecs97dfhi _1ecs97dezw _1ecs97dfc1",children:(0,i.jsx)(r.hU,{icon:"add",onClick:t})})]}))},g=function(e){var n=e.children,t=e.menu,a=(0,m.Z)(e,["children","menu"]);return(0,i.jsx)(p.xz,(0,f.Z)((0,u.Z)({},a),{asChild:!0,onMouseDown:function(e){var n=e.target,t=(0,h.JY)(n);t!==e.currentTarget&&t!==e.currentTarget.parentElement&&e.preventDefault(),n===e.currentTarget&&n.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},children:(0,i.jsxs)("div",{className:"_1k08lzu9 _1k08lzu8 _1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97dez8 _1ecs97dfgy _1ecs97dez1 _1ecs97da62 _1ecs97dadf _1ecs97df41 _1ecs97df92 _1ecs97dfhl _1ecs97dezv",children:[(0,i.jsx)(r.xv,{className:"_1ecs97dezv _1ecs97dezd",color:"inherit",component:"span",noWrap:!0,variant:"emphasized",children:n}),Boolean(t)?(0,i.jsx)("div",{className:"_1k08lzub _1ecs97dezv _1ecs97df0i",children:(0,i.jsxs)(r.h_,{children:[(0,i.jsx)(r.$F,{children:(0,i.jsx)(r.hU,{icon:"moreVert"})}),(0,i.jsx)(r.AW,{align:"start",children:t})]})}):void 0]})}))},C=function(e){return(0,i.jsx)(p.VY,(0,f.Z)((0,u.Z)({},e),{className:"_1k08lzud _1ecs97dez0 _1ecs97d18 _1ecs97d8l _1ecs97dez3 _1ecs97dezd"}))},S=t(90374),_=t(68780),Z=t(63397),w=t(75289),I=function(e){var n=e.name,t=e.label,r=e.placeholder,a=e.error,s=(0,m.Z)(e,["name","label","placeholder","error"]);return(0,i.jsxs)(w.xu,{mb:3,children:[(0,i.jsx)(w.__,{htmlFor:n,mb:2,children:t}),(0,i.jsx)(Z.gN,(0,u.Z)({name:n,type:"text",placeholder:r,as:w.II,autoComplete:"off"},s)),a?(0,i.jsx)(w.xv,{sx:{color:"error",mt:1},children:a}):null]})},T=function(e){var n=e.isOpen,t=e.onSubmit,r=e.close,a=e.tabIds;return(0,i.jsx)(_.Z,{isOpen:n,widthInPx:"530px",formId:"create-tab",close:r,onSubmit:function(e){t(e),r()},initialValues:{id:""},validate:function(e){var n=e.id;return n?a.includes(n.toLowerCase())?{id:"Tab exists already"}:void 0:{id:"Tab ID is required"}},content:{title:"Add Tab"},children:function(e){var n=e.errors;return(0,i.jsx)(I,{name:"id",label:"New Tab ID",placeholder:"A label for selecting the tab (i.e. not used in the API)",error:n.id})}})},k=function(e){var n=e.isOpen,t=e.onSubmit,r=e.close;return(0,i.jsx)(_.Z,{omitFooter:!0,isOpen:n,widthInPx:"530px",formId:"create-tab",close:r,cardProps:{bodySx:{p:0}},onSubmit:function(e){t(e),r()},initialValues:{},content:{title:"Remove Tab"},children:function(){return(0,i.jsxs)(w.xu,{sx:{px:4,py:4},children:[(0,i.jsx)(w.X6,{as:"h4",children:"Remove this tab?"}),(0,i.jsx)(w.xv,{as:"p",color:"textClear",sx:{mt:2},children:"This action cannot be undone."}),(0,i.jsx)(w.zx,{type:"button",variant:"buttons.actionDelete",sx:{mt:3},onClick:function(){t({}),r()},children:"Yes, remove tab"})]})}})},z=function(e){var n=e.isOpen,t=e.onSubmit,r=e.close,a=e.tabIds;return(0,i.jsx)(_.Z,{omitFooter:!0,isOpen:n,widthInPx:"530px",formId:"create-tab",close:r,cardProps:{bodySx:{p:0}},onSubmit:function(e){t(e),r()},initialValues:{id:""},validate:function(e){var n=e.id;return n?a.includes(n.toLowerCase())?{id:"Tab exists already"}:void 0:{id:"Tab ID is required"}},content:{title:"Rename Tab"},children:function(e){var n=e.errors,a=e.values,s=e.setFieldValue,l=e.isValid;return(0,i.jsxs)(w.xu,{sx:{px:4,py:4},children:[(0,i.jsx)(I,{name:"id",label:"Rename Tab ID",placeholder:"A label for selecting the tab (i.e. not used in the API)",error:n.id,onBlur:function(e){a.id!==e.target.value&&s("id",e.target.value.trim())},onChange:function(e){s("id",e.target.value)}}),(0,i.jsx)(w.zx,{type:"button",sx:{mt:3,width:"100%"},disabled:!l,onClick:function(){a.id&&a.id.length&&t({id:a.id.trim()}),r()},children:"Save"})]})}})},D=t(13394),N=[D.UID,D.Group,D.StructuredText,D.Image,D.Link,D.LinkToMedia,D.ContentRelationship,D.Select,D.Boolean,D.Date,D.Timestamp,D.Embed,D.Number,D.GeoPoint,D.Color,D.Text,],V=t(47560),L=t(28173),M=t(82770),E=t(38876),F=t(43904),P=t(4092),O=t(8482),H=t(22710),R=t(81541),A=t(99267),U=t(65077),K=t(88932),X=t(75708),B=t(45466),q=t(2754),Y=function(e){return(0,i.jsxs)("svg",(0,f.Z)((0,u.Z)({width:"127",height:"98",viewBox:"0 0 127 98",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:[(0,i.jsx)("path",{d:"M73.5 44.5H85",stroke:"#17151F",strokeLinecap:"round"}),(0,i.jsx)("path",{d:"M35 68.5H40.5H92C93.1046 68.5 94 67.6046 94 66.5V39C94 37.8954 93.1046 37 92 37H35C33.8954 37 33 37.8954 33 39V66.5C33 67.6046 33.8954 68.5 35 68.5Z",fill:"#F4F2F4",stroke:"#17151F"}),(0,i.jsx)("path",{d:"M38 60.5H41.0381H89C89.5523 60.5 90 60.0523 90 59.5V52C90 51.4477 89.5523 51 89 51H38C37.4477 51 37 51.4477 37 52V59.5C37 60.0523 37.4477 60.5 38 60.5Z",fill:"#6E56CF",stroke:"#17151F"}),(0,i.jsx)("circle",{cx:"89.5",cy:"44.5",r:"0.5",fill:"#17151F"}),(0,i.jsx)("path",{d:"M40.5 97.5V56H86V97.5H40.5Z",fill:"#F9F8F9",stroke:"#17151F"}),(0,i.jsx)("rect",{x:"47",y:"75",width:"33",height:"16",fill:"#E4E2E4"}),(0,i.jsx)("path",{d:"M48 57H52V70C52 71.1046 51.1046 72 50 72V72C48.8954 72 48 71.1046 48 70V57Z",fill:"#E4E2E4"}),(0,i.jsx)("path",{d:"M55 57H59V70C59 71.1046 58.1046 72 57 72V72C55.8954 72 55 71.1046 55 70V57Z",fill:"#E4E2E4"}),(0,i.jsx)("path",{d:"M62 57H66V70C66 71.1046 65.1046 72 64 72V72C62.8954 72 62 71.1046 62 70V57Z",fill:"#E4E2E4"}),(0,i.jsx)("line",{x1:"0.353553",y1:"35.9856",x2:"15.5467",y2:"51.1787",stroke:"#C8C7CB"}),(0,i.jsx)("line",{x1:"42.1959",y1:"0.87059",x2:"47.7569",y2:"21.6248",stroke:"#C8C7CB"}),(0,i.jsx)("line",{x1:"99.5522",y1:"8.4091",x2:"87.2281",y2:"26.0097",stroke:"#C8C7CB"}),(0,i.jsx)("line",{x1:"126.408",y1:"41.0849",x2:"108.807",y2:"53.4089",stroke:"#C8C7CB"}),(0,i.jsx)("path",{d:"M39.8713 47C38.7657 47 38.0627 46.4554 38.0033 45.6337L38 45.5875H38.8251L38.8284 45.6205C38.868 46.0198 39.2937 46.2838 39.8977 46.2838C40.4719 46.2838 40.8746 46 40.8746 45.5908V45.5875C40.8746 45.2442 40.6271 45.0363 40.0132 44.9043L39.5017 44.7987C38.5281 44.5941 38.1056 44.1386 38.1056 43.429V43.4257C38.1056 42.5743 38.8383 42 39.868 42C40.9241 42 41.5809 42.5776 41.6403 43.3432L41.6436 43.3861H40.8284L40.8218 43.3465C40.7624 42.9769 40.4092 42.7129 39.8647 42.7162C39.3366 42.7162 38.9604 42.9637 38.9604 43.3696V43.3729C38.9604 43.7096 39.2013 43.9208 39.7954 44.0462L40.3069 44.1551C41.3102 44.3663 41.7294 44.769 41.7294 45.4884V45.4917C41.7294 46.4191 41.0132 47 39.8713 47Z",fill:"black"}),(0,i.jsx)("path",{d:"M42.6865 46.8812V42.1188H43.6634L45.0957 45.7822H45.1518L46.5809 42.1188H47.5578V46.8812H46.7921V43.495H46.7327L45.4125 46.8812H44.8317L43.5116 43.495H43.4554V46.8812H42.6865Z",fill:"black"})]}))},J=function(e){var n=e.openCreateSliceModal,t=e.openUpdateSliceZoneModal,a=e.openSlicesTemplatesModal,s=e.projectHasAvailableSlices,l=e.isSlicesTemplatesSupported;return(0,i.jsx)(r.xu,{flexGrow:1,justifyContent:"center","data-cy":"slice-zone-blank-slate",children:(0,i.jsx)(q.R$,{backgroundImage:"/blank-slate-slice-zone.png",children:(0,i.jsxs)(q.T9,{children:[(0,i.jsx)(r.xu,{justifyContent:"center",padding:{bottom:16},children:(0,i.jsx)(Y,{})}),(0,i.jsx)(q._T,{children:"Add slices"}),(0,i.jsx)(q.nf,{children:"Slices are website sections that you can reuse on different pages with different content. Each slice has its own component in your code."}),(0,i.jsx)(q.Qj,{children:(0,i.jsxs)(r.S0,{children:[(0,i.jsx)(r.F8,{startIcon:"add",onClick:n,description:"Start from scratch.",children:"Create new"}),l?(0,i.jsx)(r.F8,{startIcon:"contentCopy",onClick:a,description:"Select from premade examples.",endAdornment:(0,i.jsx)(r.Ct,{color:"purple",title:"New"}),children:"Use template"}):void 0,s?(0,i.jsx)(r.F8,{startIcon:"folder",onClick:t,description:"Select from your own slices.",children:"Select existing"}):void 0]})})]})})})},G=t(75992),W=t(17064),$=t(17329),Q=t(81038);function ee(){return en.apply(this,arguments)}function en(){return(en=(0,H.Z)(function(){var e,n,t;return(0,A.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,Q.j.sliceTemplateLibrary.readLibrary({})];case 1:if(n=(e=i.sent()).templates,(t=e.errors).length>0)throw t;return[2,n.map(function(e){return{model:e.model,screenshots:Object.fromEntries(Object.entries(e.screenshots).map(function(e){var n=(0,W.Z)(e,2),t=n[0],i=n[1];return[t,URL.createObjectURL(i),]}))}})];case 2:return i.sent(),[2,[]];case 3:return[2]}})})).apply(this,arguments)}function et(e){return ei.apply(this,arguments)}function ei(){return(ei=(0,H.Z)(function(e){var n,t,i,r;return(0,A.__generator)(this,function(a){switch(a.label){case 0:return n=e.customType,t=e.tabId,i=e.slices,r=(0,u.Z)({},n),i.forEach(function(e){r=(0,f.Z)((0,u.Z)({},r),{tabs:r.tabs.map(function(n){return n.key===t&&n.sliceZone?(0,f.Z)((0,u.Z)({},n),{sliceZone:{key:n.sliceZone.key,value:[{key:e.id,value:e},].concat((0,R.Z)(n.sliceZone.value))}}):n})})}),[4,Q.j.customTypes.updateCustomType({model:X.Dc.fromSM(r)})];case 1:return a.sent(),M.Xe.track({event:"custom-type:slice-zone-updated",customTypeId:n.id}),[2,r]}})})).apply(this,arguments)}var er=t(13858),ea=t(56577),es=t(54132),el=t(25812),ec=function(e){var n=e.deleteSliceZone,t=e.closeDeleteSliceZoneModal;return(0,i.jsx)(el.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:t,children:(0,i.jsx)(es.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none",overflow:"hidden"},borderFooter:!0,Header:function(){return(0,i.jsxs)(w.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))}},children:[(0,i.jsx)(w.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:"Do you really want to delete Slice Zone?"}),(0,i.jsx)(w.x8,{type:"button",onClick:t})]})},Footer:function(){return(0,i.jsxs)(w.kC,{sx:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.darkBorders))},backgroundColor:"gray"},children:[(0,i.jsx)(ea.z,{label:"Cancel",variant:"secondary",onClick:t,sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),(0,i.jsx)(ea.z,{label:"Delete",variant:"danger",onClick:n,sx:{minHeight:39,minWidth:78}})]})},children:(0,i.jsx)(w.nv,{children:"You're about to delete Slice Zone."})})})},eo=t(59469),ed=t(65958),eu=function(e){var n=e.availableSlices,t=e.values,r=e.placeholderSlices;return(0,i.jsx)(Z.F2,{name:"sliceKeys",render:function(e){return(0,i.jsx)(eo.Z,{gridTemplateMinPx:"200px",elems:n,defineElementKey:function(e){return"".concat(e.from,"-").concat(e.model.name)},renderElem:function(n){var a,s=null!==(a=null==r?void 0:r.some(function(e){return e.model.id===n.model.id}))&&void 0!==a&&a,l=t.sliceKeys.includes(n.model.id);return(0,i.jsx)(ed.b,{action:{type:"checkbox"},isComingSoon:s,mode:"selection",onSelectedChange:function(i){i?e.push(n.model.id):e.remove(t.sliceKeys.indexOf(n.model.id))},selected:l,slice:n,variant:"outlined"})}})}})},ef=function(e){var n=e.formId,t=e.close,r=e.onSubmit,a=e.availableSlices;return(0,i.jsx)(_.Z,{isOpen:!0,buttonLabel:"Add",formId:n,close:t,onSubmit:function(e){r(e.sliceKeys.map(function(e){var n;return null===(n=a.find(function(n){return n.model.id===e}))||void 0===n?void 0:n.model}).filter(function(e){return void 0!==e}))},initialValues:{sliceKeys:[]},content:{title:"Select existing slices"},dataCy:"update-slices-modal",validate:function(e){if(0===e.sliceKeys.length)return{sliceKeys:"Select at least one slice to add"}},actionMessage:function(e){var n=e.errors;return void 0!==n.sliceKeys?(0,i.jsx)(w.xv,{sx:{color:"error"},children:n.sliceKeys}):void 0},children:function(e){var n=e.values;return(0,i.jsx)(eu,{values:n,availableSlices:a})}})},em=t(67557),eh=t(53559);function ep(){return(ep=(0,H.Z)(function(e){var n,t,i,r,a,s,l,c;return(0,A.__generator)(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),n=e.templateIDs,t=e.localLibrariesNames,i=e.onSuccess,[4,Q.j.sliceTemplateLibrary.createSlices({templateIDs:n})];case 1:if(a=(r=o.sent()).data,(s=r.errors).length>0||void 0===a)throw s;return a.sliceIDs.forEach(function(e,i){M.Xe.track({event:"slice:created",id:e,name:e,library:t[0],sliceTemplate:n[i]})}),[4,i(a.sliceIDs)];case 2:return o.sent(),[3,4];case 3:return l=o.sent(),c="Internal Error: Slice(s) not created",console.error(c,l),K.Am.error(c),[3,4];case 4:return[2]}})})).apply(this,arguments)}var ev=[{extension:"",fileName:"",from:"",href:"",pathToSlice:"",model:{id:"video_highlights",name:"VideoHighlights",type:"SharedSlice",variations:[{description:"",docURL:"",id:"default",name:"Default",version:"sktwi1xtmkfgx8626"},]},screenshots:{default:{url:"/videoHighlights.png"}}},],ex=function(e){var n=e.formId,t=e.close,r=e.onSuccess,a=e.availableSlicesTemplates,s=e.localLibraries,l=(0,S.Z)().createSliceSuccess;return(0,i.jsx)(_.Z,{isOpen:!0,buttonLabel:"Add",formId:n,close:t,onSubmit:function(e){var n;!function(e){return ep.apply(this,arguments)}({templateIDs:e.sliceKeys,localLibrariesNames:s.map(function(e){return e.name}),onSuccess:(n=(0,H.Z)(function(e){var n,t;return(0,A.__generator)(this,function(n){switch(n.label){case 0:return[4,(0,M.y0)()];case 1:var t;return l(n.sent().libraries),[4,Promise.all(e.map((t=(0,H.Z)(function(e){var n;return(0,A.__generator)(this,function(n){switch(n.label){case 0:return[4,Q.j.slices.readSlice({libraryID:s[0].name,sliceID:e})];case 1:return[2,n.sent().model]}})}),function(e){return t.apply(this,arguments)})).filter(function(e){return void 0!==e}))];case 2:return[4,r(n.sent())];case 3:return n.sent(),[2]}})}),function(e){return n.apply(this,arguments)})})},initialValues:{sliceKeys:[]},content:{title:"Use template slices"},validate:function(e){if(0===e.sliceKeys.length)return{sliceKeys:"Select at least one template to add"}},actionMessage:function(e){var n=e.errors;return void 0!==n.sliceKeys?(0,i.jsx)(w.xv,{sx:{color:"error"},children:n.sliceKeys}):void 0},children:function(e){var n=e.values;return(0,i.jsx)(eu,{values:n,placeholderSlices:ev,availableSlices:(0,R.Z)(a.map(function(e){return{extension:"",fileName:"",from:"",href:"",pathToSlice:"",model:eh.id.toSM(e.model),screenshots:Object.entries(e.screenshots).reduce(function(e,n){return(0,f.Z)((0,u.Z)({},e),(0,em.Z)({},n[0],{url:n[1]}))},{})}})).concat((0,R.Z)(ev))})}})},ey=t(40432),ej=t(78656),eb=t(24804),eg=t(5479),eC=t(65988),eS=t(66443),e_="_1ecs97dez4 _1ecs97dez8 _1ecs97df90",eZ="_1ecs97df77 _1ecs97dez2 _1ecs97df92 _1ecs97dfhl _1ecs97dfg9",ew=function(e){var n,t=e.isOpen,a=e.close,s=e.onSubmit,l=e.isLoading,c=e.slice,d=e.libraries,u=(0,o.v9)(function(e){return{remoteSlices:(0,G.sT)(e)}}).remoteSlices;return(0,i.jsxs)(r.Vq,{open:t,onOpenChange:function(e){return!e&&a()},size:{width:448,height:"auto"},children:[(0,i.jsx)(r.fK,{title:"Upgrade slice"}),(0,i.jsx)(r.cZ,{children:(0,i.jsx)(Z.J9,{validateOnChange:!0,validateOnMount:!0,initialValues:{from:null===(n=d[0])||void 0===n?void 0:n.name,sliceName:(0,E.MP)(c.key)},validate:function(e){return(0,eS.h)(e,d,u)},onSubmit:function(e){s({libraryID:e.from,sliceID:e.sliceName})},children:function(e){return(0,i.jsx)("form",{id:"convert-legacy-slice-as-new-slice-dialog",children:(0,i.jsxs)(r.xu,{flexDirection:"column",children:[(0,i.jsxs)(r.xr,{className:eZ,style:{width:448},children:[(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"This will create a new slice with the same fields. The new slice will replace the legacy slice in all of your types, and the existing slice content will be re-mapped to the new slice."}),(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"This will not migrate your component. You will need to do that manually."}),(0,i.jsxs)(r.xu,{flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"Display name*"}),"string"==typeof e.errors.sliceName?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.sliceName}):null]}),(0,i.jsx)(r.yt,{placeholder:"Pascalised Slice API ID (e.g. ".concat((0,E.MP)(c.key),")"),error:"string"==typeof e.errors.sliceName,value:e.values.sliceName,onValueChange:function(n){e.setFieldValue("sliceName",n.slice(0,30))},"data-cy":"slice-name-input"}),(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"A display name for the slice"})]}),(0,i.jsxs)(r.xu,{flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"Slice library*"}),"string"==typeof e.errors.from?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.from}):null]}),(0,i.jsx)(r.Ph,{size:"medium",variant:"secondary",startIcon:"folder",flexContent:!0,value:e.values.from,onValueChange:function(n){return n?void e.setFieldValue("from",n):null},children:d.map(function(e){return(0,i.jsx)(r.Ql,{value:e.name,children:e.name},e.name)})}),(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"The library where we'll store your slice"})]})]}),(0,i.jsx)(r.kX,{ok:{text:"Upgrade",onClick:function(){e.submitForm()},loading:l,disabled:!e.isValid},cancel:{text:"Cancel"},size:"medium"})]})})}})})]})},eI=t(55658),eT=function(e){var n,t,a=e.isOpen,s=e.close,l=e.onSubmit,o=e.isLoading,d=e.slice,m=e.sliceName,h=e.libraries,p=e.localSharedSlices,v=(0,c.useState)(!0),x=v[0],y=v[1];return(0,i.jsxs)(r.Vq,{open:a,onOpenChange:function(e){return!e&&s()},size:{width:448,height:"auto"},children:[(0,i.jsx)(r.fK,{title:"Convert to slice variation"}),(0,i.jsx)(r.cZ,{children:(0,i.jsx)(Z.J9,{validateOnChange:!0,initialValues:{libraryID:null===(n=p[0])||void 0===n?void 0:n.from,sliceID:null===(t=p[0])||void 0===t?void 0:t.model.id,variationID:eI.e.generateId(d.key),variationName:m},validate:function(e){return ek(e,h)},onSubmit:function(e){l(e)},children:function(e){return(0,i.jsx)("form",{id:"convert-legacy-slice-as-new-variation-dialog",children:(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",children:[(0,i.jsxs)(r.xr,{className:eZ,style:{width:448},children:[(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"If you have multiple slices that are similar, you can combine them as variations of the same slice."}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"Target slice*"}),"string"==typeof e.errors.libraryID?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.libraryID}):null,"string"==typeof e.errors.sliceID?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.sliceID}):null]}),(0,i.jsx)(r.Ph,{size:"medium",variant:"secondary",startIcon:"viewDay",flexContent:!0,value:"".concat(e.values.libraryID,"::").concat(e.values.sliceID),onValueChange:function(n){if(n){var t=(0,W.Z)(n.split("::"),2),i=t[0],r=t[1];e.setFieldValue("libraryID",i),e.setFieldValue("sliceID",r)}},children:p.map(function(e){return(0,i.jsxs)(r.Ql,{value:"".concat(e.from,"::").concat(e.model.id),children:[e.from," ",">"," ",e.model.name," (",e.model.id,")"]},"".concat(e.from,"::").concat(e.model.id))})}),(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"Choose the slice to which you would like to add this variation."})]}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"Variation name*"}),"string"==typeof e.errors.variationName?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.variationName}):null]}),(0,i.jsx)(r.yt,{placeholder:m,error:"string"==typeof e.errors.variationName,value:e.values.variationName,onValueChange:function(n){var t=(0,f.Z)((0,u.Z)({},e.values),{variationName:n.slice(0,30)});x&&(t.variationID=eI.e.generateId(t.variationName)),e.setValues(t,!0)},"data-cy":"variation-name-input"})]}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"ID*"}),"string"==typeof e.errors.variationID?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.variationID}):null]}),(0,i.jsx)(r.yt,{placeholder:eI.e.generateId(d.key),error:"string"==typeof e.errors.variationID,value:e.values.variationID,onValueChange:function(n){y(!1),e.setFieldValue("variationID",eI.e.generateId(n.slice(0,30)))},"data-cy":"variation-id-input"})]})]}),(0,i.jsx)(r.kX,{ok:{text:"Convert",onClick:function(){e.submitForm()},loading:o,disabled:!e.isValid},cancel:{text:"Cancel"},size:"medium"})]})})}})})]})},ek=function(e,n){var t,i={};e.libraryID||(i.libraryID="Cannot be empty.");var r=n.find(function(n){return n.path===e.libraryID});i.libraryID||r||(i.libraryID="Does not exist."),e.sliceID||(i.sliceID="Cannot be empty.");var a=null==r?void 0:r.components.find(function(n){return n.model.id===e.sliceID});return(i.sliceID||a||(i.sliceID="Does not exist."),e.variationName||(i.variationName="Cannot be empty."),e.variationID)?(null!==(t=null==a?void 0:a.model.variations.map(function(e){return e.id}))&&void 0!==t?t:[]).includes(e.variationID)&&(i.variationID="Slice variation ID is already taken."):i.variationID="Cannot be empty.",i},ez=function(e){var n,t,a=e.isOpen,s=e.close,l=e.onSubmit,c=e.isLoading,o=e.identicalSlices;return(0,i.jsxs)(r.Vq,{open:a,onOpenChange:function(e){return!e&&s()},size:{width:448,height:"auto"},children:[(0,i.jsx)(r.fK,{title:"Merge with an existing slice"}),(0,i.jsx)(r.cZ,{children:(0,i.jsx)(Z.J9,{validateOnChange:!0,initialValues:{path:null!==(t=null===(n=o[0])||void 0===n?void 0:n.path)&&void 0!==t?t:""},validate:function(e){if(!e.path)return{path:"Cannot be empty."}},onSubmit:function(e){var n,t=(0,W.Z)(e.path.split("::"),3),i=t[0];l({libraryID:i,sliceID:t[1],variationID:t[2]})},children:function(e){return(0,i.jsx)("form",{id:"convert-legacy-slice-merge-with-identical-dialog",children:(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",children:[(0,i.jsxs)(r.xr,{className:eZ,style:{width:448},children:[(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"If you have multiple identical slices, you can merge them. All of your content will be remapped to the target slice."}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",gap:4,children:[(0,i.jsxs)("label",{className:e_,children:[(0,i.jsx)(r.xv,{variant:"bold",children:"Target slice*"}),"string"==typeof e.errors.path?(0,i.jsx)(r.xv,{variant:"small",color:"tomato10",children:e.errors.path}):null]}),(0,i.jsx)(r.Ph,{size:"medium",variant:"secondary",startIcon:"viewDay",flexContent:!0,value:e.values.path,onValueChange:function(n){n&&e.setFieldValue("path",n)},children:o.map(function(e){return(0,i.jsx)(r.Ql,{value:e.path,children:e.path.split("::").join(" > ")},e.path)})}),(0,i.jsx)(r.xv,{variant:"normal",color:"grey11",children:"Choose a slice that you would like to merge this into."})]})]}),(0,i.jsx)(r.kX,{ok:{text:"Merge",onClick:function(){e.submitForm()},loading:c,disabled:!e.isValid},cancel:{text:"Cancel"},size:"medium"})]})})}})})]})},eD=function(e){var n,t,a=e.slice,s=e.path,l=(0,S.Z)(),d=l.refreshState,m=l.openToaster,h=l.initCustomTypeStore,p=l.saveCustomTypeSuccess,v=(0,c.useState)(!1),x=v[0],y=v[1],j=(0,c.useState)(),b=j[0],g=j[1],C=(0,o.v9)(function(e){return{libraries:(0,G.Sd)(e)}}).libraries,_="Slice"===a.value.type&&null!==(n=a.value.fieldset)&&void 0!==n?n:a.key,Z=C.filter(function(e){return e.isLocal}),w=Z.map(function(e){return e.components}).flat(),I=eN(a,_,w),T=(t=(0,H.Z)(function(e){var n,t,i,r,l,c,o,v,x;return(0,A.__generator)(this,function(v){switch(v.label){case 0:if(!b)return[2];return y(!0),M.Xe.track({event:"legacy-slice:converted",id:e.sliceID,variation:null!==(n=e.variationID)&&void 0!==n?n:"default",library:e.libraryID,conversionType:b}),[4,Q.j.slices.convertLegacySliceToSharedSlice({model:a.value,src:(0,f.Z)((0,u.Z)({},s),{sliceID:a.key}),dest:{libraryID:e.libraryID,sliceID:e.sliceID,variationName:null!==(t=e.variationName)&&void 0!==t?t:"Default",variationID:null!==(i=e.variationID)&&void 0!==i?i:"default"}})];case 1:if((r=v.sent().errors).length)throw console.error("Could not convert slice `".concat(_,"`"),r),m("Could not convert slice `".concat(_,"`"),ey.Jf.ERROR),r;return[4,Q.j.customTypes.readCustomType({id:s.customTypeID})];case 2:if(c=(l=v.sent()).model,(o=l.errors).length||!c)return console.error("Could not refresh custom type view `".concat(s.customTypeID,"`"),o),m("Could not refresh custom type view `".concat(s.customTypeID,"`"),ey.Jf.ERROR),[2];return[4,(0,M.y0)()];case 3:switch(d(v.sent()),y(!1),g(void 0),b){case"as_new_slice":m("".concat(_," has been upgraded to a new slice ").concat(e.libraryID," > ").concat(e.sliceID),ey.Jf.SUCCESS);break;case"as_new_variation":m("".concat(_," has been converted as a variation of ").concat(e.libraryID," > ").concat(e.sliceID),ey.Jf.SUCCESS);break;default:m("".concat(_," has been merged with ").concat(e.libraryID," > ").concat(e.sliceID),ey.Jf.SUCCESS)}return h(x=X.Dc.toSM(c),x),p(c),[2]}})}),function(e){return t.apply(this,arguments)}),k={path:s,slice:a,sliceName:_,libraries:Z,localSharedSlices:w,identicalSlices:I,close:function(){return g(void 0)},onSubmit:T,isLoading:x};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.h_,{children:[(0,i.jsx)(r.$F,{children:(0,i.jsx)(r.zx,{"data-cy":"convert-legacy-slice",startIcon:"refresh",endIcon:"arrowDropDown",size:"medium",variant:"secondary",children:"Migrate legacy slice"})}),(0,i.jsxs)(r.AW,{align:"start",children:[(0,i.jsx)(r.Xi,{startIcon:(0,i.jsx)(r.I5,{name:"folder",size:"large"}),description:"Use it with new types",onSelect:function(){return g("as_new_slice")},children:"Upgrade slice"}),(0,i.jsx)(r.Xi,{startIcon:(0,i.jsx)(r.I5,{name:"viewDay",size:"large"}),description:"Add it to another slice",onSelect:function(){return g("as_new_variation")},disabled:!w.length,children:"Convert to slice variation"}),(0,i.jsx)(r.Xi,{startIcon:(0,i.jsx)(r.I5,{name:"driveFileMove",size:"large"}),description:"Combine identical slices",onSelect:function(){return g("merge_with_identical")},disabled:!I.length,children:"Merge with another slice"})]})]}),(0,i.jsx)(ew,(0,f.Z)((0,u.Z)({},k),{isOpen:"as_new_slice"===b})),(0,i.jsx)(eT,(0,f.Z)((0,u.Z)({},k),{isOpen:"as_new_variation"===b})),(0,i.jsx)(ez,(0,f.Z)((0,u.Z)({},k),{isOpen:"merge_with_identical"===b}))]})},eN=function(e,n,t){return(0,c.useMemo)(function(){var i=[],r=(0,eg.ux)(e.value,n),a=!0,s=!1,l=void 0;try{for(var c,o=t[Symbol.iterator]();!(a=(c=o.next()).done);a=!0){var d=c.value,u=!0,f=!1,m=void 0;try{for(var h,p=d.model.variations[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){var v=h.value,x=(0,eg.ux)(v,d.model.name);r.primary===x.primary&&r.items===x.items&&i.push({libraryID:d.from,sliceID:d.model.id,variationID:v.id,path:"".concat(d.from,"::").concat(d.model.id,"::").concat(v.id)})}}catch(y){f=!0,m=y}finally{try{u||null==p.return||p.return()}finally{if(f)throw m}}}}catch(j){s=!0,l=j}finally{try{a||null==o.return||o.return()}finally{if(s)throw l}}return i},[e,n,t])},eV=function(e){var n=e.slice,t=e.path,a=(0,W.Z)((0,eC.E)("legacySliceUpgrader"),1)[0],s=a.enabled?"This Slice was created with the Legacy Builder. It needs to be converted first to be used within Slice Machine.":"This Slice was created with the Legacy Builder, and is incompatible with Slice Machine. You cannot edit, push, or delete it in Slice Machine. In order to proceed, manually remove the Slice from your type model. Then create a new Slice with the same fields using Slice Machine.";return(0,i.jsxs)(eb.Zb,{children:[(0,i.jsx)(eb.ZB,{component:"div",children:(0,i.jsx)(r.xu,{alignItems:"center",justifyContent:"center",children:(0,i.jsx)(r.xv,{color:"grey11",component:"span",children:"No screenshot available"})})}),(0,i.jsxs)(eb.T$,{children:[(0,i.jsx)(r.u,{content:s,side:"bottom",children:(0,i.jsx)(r.Ct,{color:"purple",title:"Legacy Slice"})}),a.enabled?(0,i.jsx)(eD,{slice:n,path:t}):null]}),(0,i.jsx)(eb.eW,{subtitle:"1 variation",title:(0,eg.Dj)(n.value)})]})},eL=function(e){var n=e.slices,t=e.format,r=e.path,a=e.onRemoveSharedSlice,s=n.some(function(e){return"SharedSlice"!==e.type}),l=ej.$[t],o=(0,W.Z)((0,eC.E)("legacySliceUpgrader"),1)[0],d=(0,S.Z)().openToaster;return(0,c.useEffect)(function(){s&&(o.enabled?d("This ".concat(l.name({start:!1,plural:!1})," contains legacy slices that can be upgraded."),ey.Jf.INFO):d("This ".concat(l.name({start:!1,plural:!1})," contains slices that are incompatible."),ey.Jf.WARNING))},[s]),(0,i.jsx)(eo.Z,{elems:n,defineElementKey:function(e){return"SharedSlice"!==e.type?e.payload.key:e.payload.model.name},renderElem:function(e){if("SharedSlice"!==e.type){var n=e.payload;return(0,i.jsx)(eV,{slice:n,path:r})}var t=e.payload;return(0,i.jsx)(ed.b,{action:{type:"remove",onRemove:function(){a(t.model.id)}},mode:"navigation",slice:t,variant:"solid"})},sx:{padding:"16px"}})},eM=function(e,n){var t,i=(n||[]).reduce(function(e,n){return(0,R.Z)(e).concat((0,R.Z)(n.components))},[]),r=e.value.reduce(function(e,n){var t=n.key,r=n.value;if("SharedSlice"===r.type){var a=i.find(function(e){return e.model.id===t});return a?(0,f.Z)((0,u.Z)({},e),{slicesInSliceZone:(0,R.Z)(e.slicesInSliceZone).concat([{type:"SharedSlice",payload:a},])}):(0,f.Z)((0,u.Z)({},e),{notFound:(0,R.Z)(e.notFound).concat([{key:t}])})}return(0,f.Z)((0,u.Z)({},e),{slicesInSliceZone:(0,R.Z)(e.slicesInSliceZone).concat([{type:"Slice",payload:{key:t,value:r}},])})},{slicesInSliceZone:[],notFound:[]});return{availableSlices:i,slicesInSliceZone:r.slicesInSliceZone,notFound:r.notFound}},eE=function(e){var n,t=e.customType,a=e.onCreateSliceZone,s=e.onDeleteSliceZone,d=e.onRemoveSharedSlice,u=e.sliceZone,f=e.tabId,m=(0,l.useRouter)(),h=m.query,p=m.replace,v=m.pathname,x=(0,$.QT)(ee,[]),y=(0,c.useState)(!1),j=y[0],b=y[1],g=(0,c.useState)(!1),C=g[0],_=g[1],Z=(0,c.useState)(!1),w=Z[0],I=Z[1],T=(0,o.v9)(function(e){return{remoteSlices:(0,G.sT)(e),libraries:(0,G.Sd)(e),slices:(0,G.xC)(e)}}),k=T.remoteSlices,z=T.libraries,D=(0,S.Z)(),N=D.initCustomTypeStore,V=D.saveCustomTypeSuccess,E=z.filter(function(e){return e.isLocal}),F=(0,c.useMemo)(function(){return u?eM(u,z):{availableSlices:[],slicesInSliceZone:[],notFound:[]}},[u,z]),P=F.availableSlices,O=F.slicesInSliceZone,R=F.notFound,q=(0,c.useState)(!1),Y=q[0],W=q[1];(0,c.useEffect)(function(){(null==R?void 0:R.length)&&R.forEach(function(e){d(e.key)})},[R]);var Q,en,ei,ea=O.filter(function(e){return"SharedSlice"===e.type}).map(function(e){return e.payload}),es=P.filter(function(e){return!ea.some(function(n){return n.model.id===e.model.id})}),el=function(){_(!0)},eo=function(){I(!0)},ed=function(){b(!0),M.Xe.track({event:"custom-type:open-add-from-templates",customTypeId:t.id,customTypeFormat:t.format})},eu=function(){"true"===h.newPageType&&p({pathname:v,query:{pageTypeId:h.pageTypeId}},void 0,{shallow:!0})},em=function(){_(!1)},eh=function(){I(!1)},ep=function(){b(!1)},ev=function(e){N(e,e),V(X.Dc.fromSM(e))};return(0,i.jsxs)(i.Fragment,{children:[void 0===h.newPageType?(0,i.jsx)(L.Bu,{actions:u?(0,i.jsxs)(r.h_,{children:[(0,i.jsx)(r.$F,{children:(0,i.jsx)(r.zx,{variant:"secondary",startIcon:"add",children:"Add slices"})}),(0,i.jsxs)(r.AW,{align:"end",children:[(0,i.jsx)(r.Xi,{startIcon:(0,i.jsx)(r.I5,{name:"add",size:"large"}),onSelect:eo,description:"Start from scratch.",children:"Create new"}),x.length>0?(0,i.jsx)(r.Xi,{onSelect:ed,startIcon:(0,i.jsx)(r.I5,{name:"contentCopy",size:"large"}),description:"Select from premade examples.",shortcut:(0,i.jsx)(r.Ct,{color:"purple",title:"New"}),children:"Use template"}):void 0,es.length>0?(0,i.jsx)(r.Xi,{onSelect:el,startIcon:(0,i.jsx)(r.I5,{name:"folder",size:"large"}),description:"Select from your own slices.",children:"Select existing"}):void 0]})]}):void 0,toggle:"page"!==t.format||"Main"!==f?(0,i.jsx)(r.rs,{checked:!!u,onCheckedChange:function(e){e?a():W(!0)},size:"small","data-cy":"slice-zone-switch"}):void 0,children:"Slice Zone"}):void 0,u?O.length>0?(0,i.jsx)(U.xR,{children:(0,i.jsx)(eL,{slices:O,format:t.format,path:{customTypeID:t.id,tabID:f,sliceZoneID:null!==(n=null==u?void 0:u.key)&&void 0!==n?n:""},onRemoveSharedSlice:d})}):(0,i.jsx)(J,{openUpdateSliceZoneModal:el,openCreateSliceModal:eo,openSlicesTemplatesModal:ed,projectHasAvailableSlices:es.length>0,isSlicesTemplatesSupported:x.length>0}):void 0,C&&(0,i.jsx)(ef,{formId:"tab-slicezone-form-".concat(f),availableSlices:es,onSubmit:(Q=(0,H.Z)(function(e){var n;return(0,A.__generator)(this,function(n){switch(n.label){case 0:return[4,et({customType:t,tabId:f,slices:e})];case 1:return ev(n.sent()),em(),eu(),K.Am.success("Slice(s) added to slice zone"),[2]}})}),function(e){return Q.apply(this,arguments)}),close:em}),j&&(0,i.jsx)(ex,{formId:"tab-slicezone-form-".concat(f),availableSlicesTemplates:x,localLibraries:E,onSuccess:(en=(0,H.Z)(function(e){var n;return(0,A.__generator)(this,function(n){switch(n.label){case 0:return[4,et({customType:t,tabId:f,slices:e})];case 1:return ev(n.sent()),ep(),eu(),K.Am.success((0,i.jsx)(er.GX,{message:"Slice template(s) added to slice zone and created at: ",path:"".concat(E[0].name,"/")})),[2]}})}),function(e){return en.apply(this,arguments)}),close:ep}),Y&&(0,i.jsx)(ec,{closeDeleteSliceZoneModal:function(){W(!1)},deleteSliceZone:function(){s(),W(!1)}}),(null==E?void 0:E.length)!==0&&w&&(0,i.jsx)(B.c,{onSuccess:(ei=(0,H.Z)(function(e){var n;return(0,A.__generator)(this,function(n){switch(n.label){case 0:return[4,et({customType:t,tabId:f,slices:[e]})];case 1:return ev(n.sent()),eh(),eu(),K.Am.success((0,i.jsx)(er.GX,{message:"New slice added to slice zone and created at: ",path:"".concat(E[0].name,"/")})),[2]}})}),function(e){return ei.apply(this,arguments)}),localLibraries:E,remoteSlices:k,onClose:eh})]})},eF=function(e){var n=e.customType,t=e.tabId,a=e.fields,s=e.sliceZone,d=(0,S.Z)(),u=d.deleteCustomTypeField,f=d.addCustomTypeField,m=d.reorderCustomTypeField,h=d.replaceCustomTypeField,p=d.createSliceZone,v=d.deleteSliceZone,x=d.deleteCustomTypeSharedSlice,y=(0,l.useRouter)().query,j=(0,o.v9)(function(e){return{poolOfFields:(0,F.h2)(e)}}).poolOfFields;if(!j)return null;var b=function(e){u(t,e)},g=function(e){var i=e.id,r=e.label,a=e.widgetTypeName;if(!(0,V.Ss)(D,a)){var s=D[a];M.Xe.track({event:"custom-type:field-added",id:i,name:n.id,type:s.TYPE_NAME,zone:"static"}),f(t,i,s.create(r))}},C=function(e){!(0,V.uS)(e)&&m(t,e.source.index,e.destination.index)},_=function(e){var n=e.apiId,i=e.newKey,r=e.value;!(0,V.Ss)(D,r.type)&&h(t,n,i,r)},Z=function(){p(t)},w=function(){v(t)},I=function(e){x(t,e)};return(0,i.jsx)(r.SV,{children:(0,i.jsx)(c.Suspense,{fallback:(0,i.jsx)(r.xu,{padding:32,children:(0,i.jsx)(r._3,{})}),children:(0,i.jsxs)(L.aV,{style:{flexGrow:1},children:[void 0===y.newPageType?(0,i.jsx)(O.Z,{zoneType:"customType",tabId:t,title:"Static Zone",dataTip:"",fields:a,poolOfFieldsToCheck:j,showHints:!0,EditModal:P.Z,widgetsArray:N,onDeleteItem:b,onSave:_,onSaveNewField:g,onDragEnd:C,renderHintBase:function(e){var n=e.item;return"data".concat((0,E.Ti)(n.key))},renderFieldAccessor:function(e){return"data".concat((0,E.Ti)(e))},dataCy:"ct-static-zone",isRepeatableCustomType:n.repeatable}):void 0,(0,i.jsx)(eE,{customType:n,tabId:t,sliceZone:s,onRemoveSharedSlice:I,onCreateSliceZone:Z,onDeleteSliceZone:w})]})})})},eP=function(e){var n,t,a,s=e.customType,o=(0,c.useState)(null===(n=s.tabs[0])||void 0===n?void 0:n.key),d=o[0],u=o[1],f=(0,c.useState)(),m=f[0],h=f[1],p=(0,S.Z)(),v=p.createCustomTypeTab,_=p.updateCustomTypeTab,Z=p.deleteCustomTypeTab,w=(0,l.useRouter)().query,I=(null===(t=s.tabs.find(function(e){return e.key===d}))||void 0===t?void 0:null===(a=t.sliceZone)||void 0===a?void 0:a.value.length)===0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(x,{style:I?{flexGrow:1}:void 0,children:["page"===s.format?(0,i.jsx)(y,{}):void 0,"true"===w.newPageType?(0,i.jsx)(eF,{customType:s,fields:s.tabs[0].value,sliceZone:s.tabs[0].sliceZone,tabId:s.tabs[0].key}):(0,i.jsxs)(j,{onValueChange:u,value:d,children:[(0,i.jsx)(b,{onAddNewTab:function(){h({type:"CREATE_CUSTOM_TYPE"})},children:s.tabs.map(function(e){return(0,i.jsx)(g,{menu:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Xi,{onSelect:function(){h({type:"UPDATE_CUSTOM_TYPE",tabKey:e.key})},startIcon:(0,i.jsx)(r.I5,{name:"edit"}),children:"Rename"}),(0,i.jsx)(r.Xi,{color:"tomato",disabled:s.tabs.length<=1,onSelect:function(){h({type:"DELETE_CUSTOM_TYPE",tabKey:e.key})},startIcon:(0,i.jsx)(r.I5,{name:"delete"}),children:"Remove"})]}),value:e.key,children:e.key},e.key)})}),s.tabs.map(function(e){return(0,i.jsx)(C,{value:e.key,children:(0,i.jsx)(eF,{customType:s,fields:e.value,sliceZone:e.sliceZone,tabId:e.key})},e.key)})]})]}),(null==m?void 0:m.type)==="CREATE_CUSTOM_TYPE"?(0,i.jsx)(T,{close:function(){h(void 0)},isOpen:!0,onSubmit:function(e){var n=e.id;v(n),u(n)},tabIds:s.tabs.map(function(e){return e.key.toLowerCase()})}):void 0,(null==m?void 0:m.type)==="UPDATE_CUSTOM_TYPE"?(0,i.jsx)(z,{close:function(){h(void 0)},isOpen:!0,onSubmit:function(e){var n=e.id;_(m.tabKey,n),d===m.tabKey&&u(n)},tabIds:s.tabs.filter(function(e){return e.key!==m.tabKey}).map(function(e){return e.key.toLowerCase()})}):void 0,(null==m?void 0:m.type)==="DELETE_CUSTOM_TYPE"?(0,i.jsx)(k,{close:function(){h(void 0)},isOpen:!0,onSubmit:function(){if(Z(m.tabKey),d===m.tabKey){var e,n=null===(e=s.tabs.find(function(e){return e.key!==m.tabKey}))||void 0===e?void 0:e.key;void 0!==n&&u(n)}}}):void 0]})},eO=t(7819),eH=t(67445),eR=t(49471),eA=t(3098),eU=t(32665),eK=t(62607);t(5608);var eX=function(e){var n=e.tabs,t=(0,m.Z)(e,["tabs"]);return(0,i.jsxs)(p.fC,(0,f.Z)((0,u.Z)({},t),{className:"_1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97dm _1ecs97d7z _1ecs97df7d",defaultValue:n[0].label,orientation:"vertical",children:[(0,i.jsx)(p.aV,{className:"_1ecs97dez0 _1ecs97dez2 _1ecs97dezc _1ecs97d6qm _1ecs97d6xz _1ecs97df29 _1ecs97df2l _1ecs97dfhl","aria-label":"content tabs",children:n.map(function(e,n){var t=e.label;return(0,i.jsx)(p.xz,{className:"_76k20u4 _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97da62 _1ecs97dadf _1ecs97df41 _1ecs97dfg6",value:t,children:(0,i.jsx)(r.xv,{className:"_76k20u5",component:"span",color:"inherit",children:t})},"".concat(t,"-trig").concat(n+1))})}),n.map(function(e,n){var t=e.label,a=e.content;return(0,i.jsx)(p.VY,{className:"_76k20u6 _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97df7d _1ecs97df2s",value:t,children:(0,i.jsx)(r.xr,{className:"_1ecs97dfft",children:a})},"".concat(t,"-content").concat(n+1))})]}))},eB=t(88241),eq=t(70863),eY=t(8857),eJ=t(49109),eG=t(72757),eW=t(25145),e$=function(){return(0,i.jsx)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.1707 19.1237C17.9629 19.3056 17.9419 19.6214 18.1237 19.8293C18.3056 20.0371 18.6214 20.0581 18.8293 19.8763L22.8293 16.3763C22.9378 16.2814 23 16.1442 23 16C23 15.8558 22.9378 15.7187 22.8293 15.6237L18.8293 12.1237C18.6214 11.9419 18.3056 11.9629 18.1237 12.1708C17.9419 12.3786 17.9629 12.6945 18.1707 12.8763L21.7407 16L18.1707 19.1237ZM13.8293 12.8763C14.0371 12.6945 14.0581 12.3786 13.8763 12.1708C13.6944 11.9629 13.3786 11.9419 13.1707 12.1237L9.17075 15.6237C9.06224 15.7187 9 15.8558 9 16C9 16.1442 9.06224 16.2814 9.17075 16.3763L13.1707 19.8763C13.3786 20.0581 13.6944 20.0371 13.8763 19.8293C14.0581 19.6214 14.0371 19.3056 13.8293 19.1237L10.2593 16L13.8293 12.8763Z",fill:"#6F6E77"})})},eQ=function(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,i.jsx)("path",{d:"M21.2388 10H10.7623C10.3415 10 10 10.3415 10 10.7623V21.2377C10 21.6585 10.3415 22 10.7623 22H21.2377C21.6585 22 22 21.6585 22 21.2388V10.7623C22 10.3415 21.6585 10 21.2388 10ZM16.5714 19.1953C16.5714 20.3371 15.9018 20.8571 14.9241 20.8571C14.0402 20.8571 13.4029 20.2645 13.1429 19.7143L14.0413 19.1708C14.2143 19.4777 14.4777 19.7143 14.8571 19.7143C15.2199 19.7143 15.4286 19.5725 15.4286 19.0212V15.4286H16.5714V19.1953ZM19.0502 20.8571C18.0379 20.8571 17.4632 20.3471 17.1429 19.7143L18 19.1429C18.2333 19.5246 18.4877 19.8895 19.0257 19.8895C19.4777 19.8895 19.7143 19.6641 19.7143 19.3516C19.7143 18.9788 19.4688 18.846 18.9721 18.6283L18.6998 18.5112C17.9129 18.1763 17.3895 17.7567 17.3895 16.8683C17.3895 16.0513 18.0134 15.4286 18.9866 15.4286C19.6797 15.4286 20.1775 15.6696 20.5368 16.3013L19.6886 16.8471C19.5011 16.5112 19.3002 16.3795 18.9866 16.3795C18.6674 16.3795 18.4654 16.5826 18.4654 16.8471C18.4654 17.1741 18.6674 17.3058 19.135 17.5089L19.4074 17.6261C20.3348 18.0223 20.8571 18.4275 20.8571 19.3382C20.8571 20.3192 20.0859 20.8571 19.0502 20.8571Z",fill:"#6F6E77"})})},e0=function(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.1719 10H20.8281C21.4753 10 22 10.5247 22 11.1719V20.8281C22 21.4753 21.4753 22 20.8281 22H11.1719C10.5247 22 10 21.4753 10 20.8281V11.1719C10 10.5247 10.5247 10 11.1719 10ZM17.4283 20.7223V19.549C17.641 19.7275 17.8721 19.8613 18.1215 19.9505C18.371 20.0397 18.6228 20.0843 18.8771 20.0843C19.0263 20.0843 19.1565 20.0709 19.2678 20.044C19.3791 20.0171 19.472 19.9798 19.5466 19.9322C19.6211 19.8845 19.6768 19.8283 19.7135 19.7635C19.7501 19.6987 19.7685 19.6285 19.7685 19.5527C19.7685 19.45 19.7391 19.3583 19.6805 19.2777C19.6217 19.197 19.5417 19.1225 19.4402 19.054C19.3387 18.9856 19.2183 18.9196 19.0789 18.856C18.9395 18.7925 18.7891 18.7277 18.6277 18.6617C18.2169 18.4906 17.9106 18.2816 17.7089 18.0347C17.5071 17.7878 17.4062 17.4896 17.4062 17.1401C17.4062 16.8663 17.4613 16.631 17.5713 16.4343C17.6814 16.2375 17.8311 16.0756 18.0206 15.9484C18.2102 15.8213 18.4296 15.7278 18.6791 15.668C18.9285 15.6081 19.1926 15.5781 19.4714 15.5781C19.7452 15.5781 19.988 15.5946 20.1995 15.6276C20.411 15.6606 20.606 15.7113 20.7845 15.7798V16.8761C20.6965 16.815 20.6005 16.7612 20.4966 16.7148C20.3927 16.6683 20.2857 16.6298 20.1756 16.5992C20.0656 16.5687 19.9562 16.5461 19.8473 16.5314C19.7385 16.5168 19.6352 16.5094 19.5374 16.5094C19.4029 16.5094 19.2806 16.5223 19.1706 16.5479C19.0605 16.5736 18.9676 16.6097 18.8918 16.6561C18.816 16.7025 18.7573 16.7581 18.7157 16.8229C18.6742 16.8877 18.6534 16.9604 18.6534 17.0411C18.6534 17.1291 18.6766 17.2079 18.7231 17.2776C18.7695 17.3472 18.8356 17.4132 18.9212 17.4756C19.0068 17.5379 19.1107 17.599 19.2329 17.6589C19.3552 17.7188 19.4934 17.7805 19.6474 17.8441C19.8577 17.932 20.0466 18.0255 20.2142 18.1245C20.3817 18.2235 20.5253 18.3354 20.6451 18.46C20.765 18.5847 20.8567 18.7271 20.9203 18.8872C20.9838 19.0473 21.0156 19.2337 21.0156 19.4463C21.0156 19.7397 20.96 19.9859 20.8487 20.1851C20.7375 20.3844 20.5865 20.5457 20.3957 20.6691C20.205 20.7926 19.9831 20.8812 19.73 20.935C19.4769 20.9887 19.2097 21.0156 18.9285 21.0156C18.6399 21.0156 18.3655 20.9912 18.105 20.9423C17.8446 20.8934 17.619 20.8201 17.4283 20.7223ZM16.9609 16.6582H15.4558V20.9453H14.2634V16.6582H12.7656V15.6953H16.9609V16.6582Z",fill:"#6F6E77"})})},e1=function(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.031 11L15.7584 17.8336L16.0831 18.4288L16.4077 17.8336L20.1352 11H22L16.0831 21.4347L10 11H12.031ZM19.2924 11.0006L16.0831 16.8843L12.8737 11.0005L14.2612 11.0001L14.727 11L15.2777 11.9497L16.1319 13.4226L16.9886 11.9512L17.542 11.0006H17.9881H19.2924Z",fill:"#6F6E77"})})},e7=function(){return(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,children:(0,i.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,i.jsx)("path",{d:"M0 0h32v32H0z"}),(0,i.jsx)("path",{fill:"#6F6E77",fillRule:"nonzero",d:"M15.45 10.534c1.592-1.013 3.794-.542 4.908 1.054.533.747.742 1.679.585 2.584a3.2 3.2 0 0 1-.48 1.197c.35.664.466 1.427.333 2.167a3.205 3.205 0 0 1-1.449 2.148l-2.795 1.782c-1.593 1.013-3.792.542-4.908-1.054a3.413 3.413 0 0 1-.585-2.584c.075-.425.24-.834.48-1.197a3.374 3.374 0 0 1-.334-2.167 3.205 3.205 0 0 1 1.449-2.148Zm3.756 1.785a2.224 2.224 0 0 0-2.383-.883 2.053 2.053 0 0 0-.57.249l-2.794 1.782c-.46.29-.778.759-.873 1.292a2.06 2.06 0 0 0 .352 1.555 2.224 2.224 0 0 0 2.384.883c.203-.054.393-.138.569-.249l1.064-.68a.567.567 0 0 1 .171-.076.67.67 0 0 1 .718.266.613.613 0 0 1 .106.468.582.582 0 0 1-.263.39L14.89 19.1a.567.567 0 0 1-.17.076.67.67 0 0 1-.718-.266.612.612 0 0 1-.114-.414l.011-.103-.103-.033a3.608 3.608 0 0 1-1.094-.547l-.144-.106-.051.16c-.03.084-.052.17-.068.26a2.06 2.06 0 0 0 .352 1.555 2.224 2.224 0 0 0 2.384.883c.2-.054.393-.138.569-.249l2.795-1.782c.46-.29.777-.759.872-1.292a2.06 2.06 0 0 0-.352-1.555 2.224 2.224 0 0 0-2.384-.883 2.053 2.053 0 0 0-.568.249l-1.065.68a.567.567 0 0 1-.17.076.67.67 0 0 1-.718-.266.613.613 0 0 1-.106-.468.582.582 0 0 1 .263-.39l2.795-1.783a.567.567 0 0 1 .17-.076.67.67 0 0 1 .719.266c.086.119.127.268.113.414l-.01.103.102.033c.393.119.764.303 1.095.547l.143.106.052-.16c.03-.084.051-.17.068-.26a2.06 2.06 0 0 0-.353-1.555Z"})]})})};t(69001),eY.Z.registerLanguage("tsx",eJ.Z),eY.Z.registerLanguage("markup",eG.Z),eY.Z.alias("markup","vue"),eY.Z.alias("markup","svelte");var e2=function(e){var n,t=(null!==(n=e.fileName.match(/\.([^\.]*)$/))&&void 0!==n?n:[])[1];return function(){switch(t){case"ts":case"tsx":return(0,i.jsx)(e0,{});case"js":case"jsx":return(0,i.jsx)(eQ,{});case"vue":return(0,i.jsx)(e1,{});case"svelte":return(0,i.jsx)(e7,{});default:return(0,i.jsx)(e$,{})}}()},e9=function(e){var n=e.code,t=e.onCopy,a=(0,c.useState)(!1),s=a[0],l=a[1];(0,c.useEffect)(function(){if(s){var e=setTimeout(function(){l(!1)},1200);return function(){clearTimeout(e)}}},[s]);var o=function(){navigator.clipboard.writeText(n).then(function(){l(!0),void 0!==t&&t()})};return(0,i.jsx)(r.hU,{size:"small",onClick:o,icon:s?"check":"contentCopy"})},e4=function(e){var n=e.fileInfo,t=e.className,a=e.copy,s=e.code,l=e.onCopy,c=/language-(\w+)/.exec(null!=t?t:"");return(0,i.jsxs)("div",{className:"_1ecs97dez0 _1ecs97dez5 _1ecs97df2h _1ecs97df0r _1ecs97df23 _1ecs97d3fg _1ecs97d3mt",children:[(0,i.jsxs)("div",{className:"_1ecs97dez0 _1ecs97dez2 _1ecs97dez8 _1ecs97dezi _1ecs97df1k _1ecs97df1u _1ecs97df29 _1ecs97df2l _1ecs97d18 _1ecs97d8l _1ecs97d6r8 _1ecs97d6yl _1ecs97dfg4 _1ecs97dfic",children:[void 0!==n?(0,i.jsxs)("div",{className:"_1ecs97dez0 _1ecs97dez2 _1ecs97dezi _1ecs97dez8",children:[(0,i.jsx)(e2,{fileName:n.fileName}),(0,i.jsx)(r.xv,{className:"_8uty130",color:"grey11",children:n.fileName})]}):(0,i.jsx)("span",{}),!0===a?(0,i.jsx)(e9,{onCopy:l,code:String(s)}):null]}),null!==c&&c[1]?(0,i.jsx)(eY.Z,{showLineNumbers:!0,customStyle:{margin:0,border:"none",fontSize:"12px",lineHeight:"18px",borderRadius:"none",backgroundColor:"#FFF",borderBottomLeftRadius:"4px",borderBottomRightRadius:"4px"},children:String(s).replace(/\n$/,""),style:eW.MS,language:c[1],PreTag:"div"}):s]})},e8="_1ecs97dfh5",e6=t(36065),e5=function(e){var n=(0,e6.p)();if(!0===e.inline)return(0,i.jsx)("code",(0,f.Z)((0,u.Z)({},e),{className:"_1ecs97df46 _1ecs97d18 _1ecs97d8l _1ecs97df0r _1ecs97dfg3 _1ecs97dfhg"}));var t=function(){var n,t;if((null===(n=e.node)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.meta)!==void 0){var i,r,a,s=null===(i=e.node)||void 0===i?void 0:null===(r=i.data)||void 0===r?void 0:r.meta;return{fileName:s.substring(1,s.length-1),language:null===(a=e.className)||void 0===a?void 0:a.split("-")[1]}}return null}(),r=function(){void 0!==n&&M.Xe.track({event:"page-type:copy-snippet",framework:n})};return(0,i.jsx)(e4,(0,u.Z)((0,f.Z)((0,u.Z)({copy:!0},e),{onCopy:r,code:e.children}),null!==t?{fileInfo:t}:{}))},e3=function(e){var n=e.markdown;return(0,i.jsx)(eq.D,{children:n,linkTarget:"_blank",remarkPlugins:[eB.Z],components:{code:function(e){return(0,i.jsx)(e5,(0,u.Z)({},e))},h1:function(e){return(0,i.jsx)(r.xv,{children:e.children,component:"h1",variant:"h1"})},h2:function(e){return(0,i.jsx)(r.xv,{children:e.children,component:"h2",variant:"h2"})},h3:function(e){return(0,i.jsx)(r.xv,{children:e.children,component:"h3",variant:"h3"})},h4:function(e){return(0,i.jsx)(r.xv,{children:e.children,component:"h4",variant:"h4"})},h5:function(e){return(0,i.jsx)(r.xv,{children:e.children,component:"h4",variant:"h4"})},p:function(e){return(0,i.jsx)(r.xv,{className:e8,children:e.children,component:"p",variant:"normal"})},pre:function(e){return(0,i.jsx)(r.xv,{className:e8,children:e.children,component:"pre",variant:"normal"})}}})};function ne(e){return nn.apply(this,arguments)}function nn(){return(nn=(0,H.Z)(function(e){var n,t,i,r;return(0,A.__generator)(this,function(a){switch(a.label){case 0:return n=JSON.parse(e),[4,Q.j.documentation.read({kind:n.kind,data:n.data})];case 1:if(i=(t=a.sent()).errors,r=t.documentation,i.length>0)throw i;return[2,r]}})})).apply(this,arguments)}t(75317);var nt=function(e){var n,t=e.model,a=(0,e6.p)(),s=(0,$.QT)(ne,[JSON.stringify({kind:"PageSnippet",data:{model:t}})]);if(0===s.length)return null;var l=function(){void 0!==a&&M.Xe.track({event:"page-type:open-snippet",framework:a})};return(0,i.jsxs)(r.Vq,{size:"small",trigger:(0,i.jsx)(r.zx,{variant:"secondary",onClick:l,startIcon:"code",children:"Page snippet"}),children:[(0,i.jsx)(r.fK,{icon:"code",title:"Page snippet"}),(0,i.jsx)("section",{className:"_3uvawd0 _1ecs97dez2 _1ecs97dezb _1ecs97df7d _1ecs97df94",children:s.length>1?(0,i.jsx)(eX,{style:{flex:1},tabs:s.map(function(e,n){var t=e.label,r=e.content;return{label:null!=t?t:"Tab ".concat(n+1),content:(0,i.jsx)(e3,{markdown:r})}})}):(0,i.jsx)(r.xr,{style:{flex:1,padding:16},children:(0,i.jsx)(e3,{markdown:s[0].content})})})]})},ni=function(e){var n=e.model;return(0,i.jsx)("div",{children:(0,i.jsx)(r.SV,{children:(0,i.jsx)(c.Suspense,{fallback:(0,i.jsx)(r.zx,{variant:"secondary",startIcon:"code",children:"Page snippet"}),children:(0,i.jsx)(nt,{model:n})})})})},nr=function(){var e=(0,l.useRouter)(),n=(0,o.v9)(function(n){return{selectedCustomType:(0,eR.Jk)(n,(0,eH.Ag)(e.query))}}).selectedCustomType,t=(0,S.Z)().cleanupCustomTypeStore;return((0,c.useEffect)(function(){n&&(0,eO.TG)(n)||e.replace("/")},[n,e]),(0,c.useEffect)(function(){return function(){t()}},[]),n&&(0,eO.TG)(n))?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s(),{children:(0,i.jsxs)("title",{children:[n.local.label," - Slice Machine"]})}),(0,i.jsx)(na,{customType:n.local,remoteCustomType:(0,eO.wU)(n)?n.remote:void 0})]}):(0,i.jsx)(d.LN,{})},na=function(e){var n,t=e.customType,a=e.remoteCustomType,s=(0,S.Z)(),l=s.initCustomTypeStore,u=s.saveCustomType;(0,c.useEffect)(function(){l(t,a)},[]);var f=(0,o.v9)(function(e){return{currentCustomType:(0,F.A3)(e),hasPendingModifications:(0,F.CT)(e),isSavingCustomType:(0,eU.hg)(e,eA.z.SAVE_CUSTOM_TYPE)}}),m=f.currentCustomType,h=f.hasPendingModifications,p=f.isSavingCustomType;if(null===m)return(0,i.jsx)(d.LN,{});var v=eH.cd[m.format],x=ej.$[m.format];return(0,i.jsxs)(d.LN,{children:[(0,i.jsxs)(d.wd,{children:[(0,i.jsx)(d.Xq,{url:v.tablePagePathname}),(0,i.jsx)(d.Cx,{folder:x.name({start:!0,plural:!0}),page:null!==(n=m.label)&&void 0!==n?n:m.id}),(0,i.jsxs)(d.K2,{children:["page"===m.format?(0,i.jsx)(ni,{model:X.Dc.fromSM(m)}):void 0,(0,i.jsx)(eK._,{isChangesLocal:!0,format:m.format,customType:X.Dc.fromSM(m)}),(0,i.jsx)(r.zx,{onClick:u,loading:p,"data-testid":"builder-save-button",disabled:!h||p,children:"Save"})]})]}),(0,i.jsx)(d.RN,{children:(0,i.jsx)(r.xu,{flexDirection:"column",minWidth:0,children:(0,i.jsx)(eP,{customType:m})})})]})}},65988:function(e,n,t){"use strict";t.d(n,{E:function(){return f}});var i=t(22710),r=t(62230),a=t(85244),s=t(17064),l=t(99267),c=t(17329),o=t(81038);function d(){return u.apply(this,arguments)}function u(){return(u=(0,i.Z)(function(){return(0,l.__generator)(this,function(e){return[2,o.j.project.getSliceMachineConfig()]})})).apply(this,arguments)}function f(e){var n,t,u,f,m,h,p=(0,s.Z)((n=(0,c.QT)(d,[]),t=(0,i.Z)(function(e){return(0,l.__generator)(this,function(n){switch(n.label){case 0:return[4,o.j.project.writeSliceMachineConfig({config:e})];case 1:return n.sent(),(0,c.VA)(d,[],e),[2]}})}),[n,u=function(e){return t.apply(this,arguments)}]),2),v=p[0],x=p[1],y=(h=(0,i.Z)(function(n){var t;return(0,l.__generator)(this,function(i){switch(i.label){case 0:return t=(0,a.Z)((0,r.Z)({},v),{labs:(0,r.Z)({},v.labs)}),n?t.labs[e]=n:e in t.labs&&delete t.labs[e],0===Object.keys(t.labs).length&&delete t.labs,[4,x(t)];case 1:return i.sent(),[2]}})}),function(e){return h.apply(this,arguments)});return[{enabled:null!==(m=null==v?void 0:null===(f=v.labs)||void 0===f?void 0:f[e])&&void 0!==m&&m},y]}},69001:function(){},5608:function(){},75317:function(){}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[958],{24804:function(e,t,n){"use strict";n.d(t,{Zb:function(){return f},T$:function(){return C},eW:function(){return b},ZB:function(){return p},Lm:function(){return x}});var o=n(67557),c=n(62230),i=n(85244),d=n(98240),s=n(52322),r=n(50002),a=n(22715),l=n(6277),u=n(2784);n(13451);var h={solid:"_1ecs97d3c _1ecs97dap _1ecs97d4pk _1ecs97d4wx",outlined:"_1ecs97d2i _1ecs97d9v _1ecs97dw _1ecs97d89 _1ecs97d2w _1ecs97da9 _1ecs97d4oq _1ecs97d4w3 _1ecs97d4oc _1ecs97d4vp"},v={div:"_1ecs97dez0 _1ecs97dez3 _1ecs97dezd",img:"kedahr9 _1ecs97df77 _1ecs97dezn"},m={small:"kedahr2",medium:"kedahr3"},_={solid:"kedahr4 _1ecs97d1u _1ecs97d97 _1ecs97d4pe _1ecs97d4wr",outlined:"kedahr5 _1ecs97d18 _1ecs97d8l _1ecs97d4o6 _1ecs97d4vj"},f=function(e){var t,n=e.checked,a=e.size,v=e.variant,f=void 0===v?"solid":v,p=(e.interactive,e.disabled,e.onClick,e.href,e.component),C=void 0===p?"a":p,b=(e.replace,(0,d.Z)(e,["checked","size","variant","interactive","disabled","onClick","href","component","replace"])),x=(0,i.Z)((0,c.Z)({},b),{className:(0,l.W)("_1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97d3fg _1ecs97d3mt _1ecs97df0r _1ecs97df23 _1ecs97df2h _1ecs97dez1 _1ecs97dezr _1ecs97dezv",m[void 0===a?"medium":a],_[f],(t={},(0,o.Z)(t,"kedahr6",e.interactive),(0,o.Z)(t,h[f],e.interactive),t)),"data-state":!0===(void 0!==n&&n)?"checked":void 0});return!0===e.interactive&&void 0===e.href?(0,s.jsx)("div",(0,i.Z)((0,c.Z)({},x),{"data-disabled":!0===e.disabled?"":void 0,onClick:function(t){if(!0!==e.disabled&&void 0!==e.onClick){var n=t.target;(0,r.JY)(n)===t.currentTarget&&e.onClick(t)}},tabIndex:!0===e.disabled?void 0:0})):!0===e.interactive?(0,u.createElement)(C,(0,c.Z)((0,i.Z)((0,c.Z)({},x),{href:e.href,onClick:function(e){var t=e.target;(0,r.JY)(t)!==e.currentTarget&&e.preventDefault()}}),"a"===C?{}:{replace:e.replace})):(0,s.jsx)("div",(0,c.Z)({},x))},p=function(e){var t=e.className,n=e.component,o=void 0===n?"img":n,r=e.overlay,a=(0,d.Z)(e,["className","component","overlay"]);return(0,s.jsxs)("div",{className:"kedahr7 _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97deze _1ecs97dezd _1ecs97df7d _1ecs97dezv",children:[(0,u.createElement)(o,(0,i.Z)((0,c.Z)({},a),{className:(0,l.W)(v[o],t)})),Boolean(r)?(0,s.jsx)("div",{className:"kedahra _1ecs97dez0 _1ecs97dez3 _1ecs97df9d _1ecs97dezt _1ecs97df0i",children:r}):void 0]})},C=function(e){return(0,s.jsx)("div",(0,i.Z)((0,c.Z)({},e),{className:"kedahrc kedahrb _1ecs97dez0 _1ecs97dez2 _1ecs97dez8 _1ecs97dez1 _1ecs97dezc _1ecs97df71 _1ecs97dezi"}))},b=function(e){var t=e.action,n=e.subtitle,o=e.title,r=(0,d.Z)(e,["action","subtitle","title"]);return(0,s.jsxs)("div",(0,i.Z)((0,c.Z)({},r),{className:"kedahrd kedahrb _1ecs97dez0 _1ecs97dez2 _1ecs97dez8 _1ecs97dez1 _1ecs97dezc _1ecs97df92 _1ecs97df73",children:[(0,s.jsxs)("div",{className:"kedahre _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97deze _1ecs97dezd _1ecs97df51",children:[(0,s.jsx)(a.xv,{component:"span",noWrap:!0,variant:"bold",children:o}),(0,s.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"small",children:n})]}),t]}))},x=function(e){var t=e.children,n=(0,d.Z)(e,["children"]);return(0,s.jsx)("div",(0,i.Z)((0,c.Z)({},n),{className:"kedahrf _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97df6v _1ecs97dfb5 _1ecs97dezh _1ecs97dfhi _1ecs97dezt",children:(0,s.jsx)(a.xv,{align:"center",color:"inherit",component:"span",noWrap:!0,variant:"smallBold",children:t})}))}},34728:function(e,t,n){"use strict";n.d(t,{O:function(){return s}});var o=n(52322),c=n(22715),i=n(32681),d=n(79096),s=function(e){var t=function(e){var t=r[e.modelType];switch(e.modelStatus){case i.G.New:return{badgeColor:"green",badgeTitle:"New",tooltipContent:"This ".concat(t," exists only locally. Upon sync, it will be pushed to your remote repository.")};case i.G.Modified:return{badgeColor:"amber",badgeTitle:"Modified",tooltipContent:"This ".concat(t," has been modified locally. Upon sync, changes will be pushed to your remote repository.")};case i.G.Synced:return{badgeColor:"purple",badgeTitle:"Synced",tooltipContent:"This ".concat(t," is in sync with the remote repository.")};case i.G.Deleted:return{badgeColor:"tomato",badgeTitle:"Deleted",tooltipContent:"This ".concat(t," has been deleted locally.")};case i.G.Unknown:if(!e.isOnline)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (no internet connection)."};if(e.authStatus===d.t.UNAUTHORIZED)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (not connected to Prismic)."};if(e.authStatus===d.t.FORBIDDEN)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (you don't have access to the repository)."};default:return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (unknown error)."}}}(e),n=t.badgeColor,s=t.badgeTitle,a=t.tooltipContent;return(0,o.jsx)(c.u,{content:a,side:"bottom",children:(0,o.jsx)(c.Ct,{color:n,title:s})})},r={CustomType:"type",Slice:"slice"}},65958:function(e,t,n){"use strict";n.d(t,{b:function(){return _}});var o=n(62230),c=n(85244),i=n(52322),d=n(22715),s=n(39097),r=n.n(s),a=n(30180),l=n(24804),u=n(5479),h=n(34728),v=n(49451),m=function(e){return(0,i.jsx)("svg",(0,c.Z)((0,o.Z)({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 5.5C4 4.67157 4.67157 4 5.5 4H18.5C19.3284 4 20 4.67157 20 5.5V12.4413C20 12.4512 19.9997 12.461 19.9991 12.4707C20.0072 12.6083 19.9586 12.7485 19.8536 12.8536C19.6583 13.0488 19.3417 13.0488 19.1464 12.8536L16.3536 10.0607C16.1583 9.8654 15.8417 9.8654 15.6464 10.0607L11.8536 13.8536C11.6583 14.0488 11.3417 14.0488 11.1464 13.8536L9.35355 12.0607C9.15829 11.8654 8.84171 11.8654 8.64645 12.0607L5 15.7071V18.5C5 18.7761 5.22386 19 5.5 19H12.5C12.7761 19 13 19.2239 13 19.5C13 19.7761 12.7761 20 12.5 20H5.5C4.67157 20 4 19.3284 4 18.5V15.5003V15.4997V5.5ZM11.5 12.7929L14.9393 9.35355C15.5251 8.76777 16.4749 8.76777 17.0607 9.35355L19 11.2929V5.5C19 5.22386 18.7761 5 18.5 5H5.5C5.22386 5 5 5.22386 5 5.5V14.2929L7.93934 11.3536C8.52513 10.7678 9.47487 10.7678 10.0607 11.3536L11.5 12.7929ZM16.5 13C16.7761 13 17 13.2239 17 13.5V16H19.5C19.7761 16 20 16.2239 20 16.5C20 16.7761 19.7761 17 19.5 17H17V19.5C17 19.7761 16.7761 20 16.5 20C16.2239 20 16 19.7761 16 19.5V17H13.5C13.2239 17 13 16.7761 13 16.5C13 16.2239 13.2239 16 13.5 16H16V13.5C16 13.2239 16.2239 13 16.5 13Z",fill:"currentColor"})}))},_=function(e){var t,n=e.action,s=e.isComingSoon,_=void 0!==s&&s,C=e.isDeleted,b=e.onUpdateScreenshot,x=e.selected,g=void 0!==x&&x,j=e.slice,y=e.variant,k=e.variationId,z=a.dN.variation(j,k);if(!z)return null;var Z=(0,u.d7)(j,z),w=_||void 0!==C&&C,N=!w&&!!b,T="outlined"===y,S=void 0!==k;return t="selection"===e.mode?{disabled:w,interactive:!0,onClick:function(){e.onSelectedChange(!g)}}:w?{interactive:!1}:{component:r(),href:v.Y.getBuilderPagePathname({libraryName:j.href,sliceName:j.model.name,variationId:z.id}),interactive:!0,replace:e.replace},(0,i.jsxs)(l.Zb,(0,c.Z)((0,o.Z)({"aria-label":"".concat(j.model.name," ").concat(z.name," slice card"),checked:g,"data-cy":"shared-slice-card","data-testid":"shared-slice-card"},t,"outlined"===y?{size:"small",variant:"outlined"}:{}),{children:[void 0!==Z?(0,i.jsx)(l.ZB,{alt:"Preview image",overlay:N&&!T?(0,i.jsx)(d.xu,{alignItems:"center",justifyContent:"center",children:(0,i.jsx)(f,{onClick:b})}):void 0,src:Z}):(0,i.jsx)(l.ZB,{component:"div",children:(0,i.jsxs)(d.xu,{alignItems:"center",flexDirection:"column",gap:8,justifyContent:"center",children:[(0,i.jsx)(d.xv,{color:"grey11",component:"span",children:"No screenshot available"}),N&&!T?(0,i.jsx)(f,{onClick:b}):void 0]})}),(0,i.jsx)(l.eW,{action:"checkbox"===n.type&&"selection"===e.mode?(0,i.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:(0,i.jsx)(d.XZ,{checked:g,disabled:w,onCheckedChange:e.onSelectedChange})}):"menu"===n.type?(0,i.jsxs)(d.h_,{modal:!0,children:[(0,i.jsx)(d.$F,{disabled:w,children:(0,i.jsx)(d.hU,{"data-cy":"slice-action-icon",icon:"moreVert"})}),(0,i.jsxs)(d.AW,{align:"end","data-cy":"slice-action-icon-dropdown",children:[N&&T?(0,i.jsx)(d.Xi,{onSelect:b,startIcon:(0,i.jsx)(m,{}),children:"Update screenshot"}):void 0,(0,i.jsx)(d.Xi,{onSelect:n.onRename,startIcon:(0,i.jsx)(d.I5,{name:"edit"}),children:"Rename"}),!0===n.removeDisabled&&S?(0,i.jsx)(d.u,{content:"The slice needs to have at least one variation.",side:"bottom",stableMount:!0,children:(0,i.jsx)(p,{disabled:!0,onSelect:n.onRemove})}):(0,i.jsx)(p,{disabled:!0===n.removeDisabled,onSelect:n.onRemove})]})]}):"remove"===n.type?(0,i.jsx)(d.hU,{icon:"close",onClick:function(){return!w&&n.onRemove()}}):"status"===n.type?(0,i.jsx)(h.O,{authStatus:n.authStatus,isOnline:n.isOnline,modelStatus:n.modelStatus,modelType:"Slice"}):void 0,subtitle:(0,i.jsxs)(i.Fragment,{children:[S?z.id:"".concat(j.model.variations.length," variation").concat(j.model.variations.length>1?"s":""),_?(0,i.jsxs)(d.xv,{color:"purple11",component:"span",variant:"small",children:[" ","• (coming soon)"]}):void 0]}),title:S?z.name:j.model.name}),N&&!S&&(0,u.cx)(j)>0?(0,i.jsx)(l.Lm,{children:"Missing screenshot"}):void 0]}))},f=function(e){return(0,i.jsx)(d.zx,{onClick:e.onClick,renderStartIcon:function(){return(0,i.jsx)(m,{color:d.TV.color.greyLight11})},variant:"secondary",children:"Update screenshot"})},p=function(e){return(0,i.jsx)(d.Xi,(0,c.Z)((0,o.Z)({},e),{color:"tomato",startIcon:(0,i.jsx)(d.I5,{name:"delete"}),children:"Delete"}))}},49451:function(e,t,n){"use strict";n.d(t,{Y:function(){return o}});var o={getBuilderPagePathname:function(e){return"/slices/".concat(e.libraryName.replaceAll("/","--"),"/").concat(e.sliceName,"/").concat(e.variationId)}}},13451:function(){}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[958],{24804:function(e,t,n){"use strict";n.d(t,{Zb:function(){return f},T$:function(){return C},eW:function(){return b},ZB:function(){return p},Lm:function(){return x}});var o=n(67557),c=n(62230),i=n(85244),d=n(98240),s=n(52322),r=n(50002),a=n(22715),l=n(6277),u=n(2784);n(71457);var h={solid:"_1ecs97d3c _1ecs97dap _1ecs97d4pk _1ecs97d4wx",outlined:"_1ecs97d2i _1ecs97d9v _1ecs97dw _1ecs97d89 _1ecs97d2w _1ecs97da9 _1ecs97d4oq _1ecs97d4w3 _1ecs97d4oc _1ecs97d4vp"},v={div:"_1ecs97dez0 _1ecs97dez3 _1ecs97dezd",img:"kedahr9 _1ecs97df77 _1ecs97dezn"},m={small:"kedahr2",medium:"kedahr3"},_={solid:"kedahr4 _1ecs97d1u _1ecs97d97 _1ecs97d4pe _1ecs97d4wr",outlined:"kedahr5 _1ecs97d18 _1ecs97d8l _1ecs97d4o6 _1ecs97d4vj"},f=function(e){var t,n=e.checked,a=e.size,v=e.variant,f=void 0===v?"solid":v,p=(e.interactive,e.disabled,e.onClick,e.href,e.component),C=void 0===p?"a":p,b=(e.replace,(0,d.Z)(e,["checked","size","variant","interactive","disabled","onClick","href","component","replace"])),x=(0,i.Z)((0,c.Z)({},b),{className:(0,l.W)("_1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97d3fg _1ecs97d3mt _1ecs97df0r _1ecs97df23 _1ecs97df2h _1ecs97dez1 _1ecs97dezr _1ecs97dezv",m[void 0===a?"medium":a],_[f],(t={},(0,o.Z)(t,"kedahr6",e.interactive),(0,o.Z)(t,h[f],e.interactive),t)),"data-state":!0===(void 0!==n&&n)?"checked":void 0});return!0===e.interactive&&void 0===e.href?(0,s.jsx)("div",(0,i.Z)((0,c.Z)({},x),{"data-disabled":!0===e.disabled?"":void 0,onClick:function(t){if(!0!==e.disabled&&void 0!==e.onClick){var n=t.target;(0,r.JY)(n)===t.currentTarget&&e.onClick(t)}},tabIndex:!0===e.disabled?void 0:0})):!0===e.interactive?(0,u.createElement)(C,(0,c.Z)((0,i.Z)((0,c.Z)({},x),{href:e.href,onClick:function(e){var t=e.target;(0,r.JY)(t)!==e.currentTarget&&e.preventDefault()}}),"a"===C?{}:{replace:e.replace})):(0,s.jsx)("div",(0,c.Z)({},x))},p=function(e){var t=e.className,n=e.component,o=void 0===n?"img":n,r=e.overlay,a=(0,d.Z)(e,["className","component","overlay"]);return(0,s.jsxs)("div",{className:"kedahr7 _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97deze _1ecs97dezd _1ecs97df7d _1ecs97dezv",children:[(0,u.createElement)(o,(0,i.Z)((0,c.Z)({},a),{className:(0,l.W)(v[o],t)})),Boolean(r)?(0,s.jsx)("div",{className:"kedahra _1ecs97dez0 _1ecs97dez3 _1ecs97df9d _1ecs97dezt _1ecs97df0i",children:r}):void 0]})},C=function(e){return(0,s.jsx)("div",(0,i.Z)((0,c.Z)({},e),{className:"kedahrc kedahrb _1ecs97dez0 _1ecs97dez2 _1ecs97dez8 _1ecs97dez1 _1ecs97dezc _1ecs97df71 _1ecs97dezi"}))},b=function(e){var t=e.action,n=e.subtitle,o=e.title,r=(0,d.Z)(e,["action","subtitle","title"]);return(0,s.jsxs)("div",(0,i.Z)((0,c.Z)({},r),{className:"kedahrd kedahrb _1ecs97dez0 _1ecs97dez2 _1ecs97dez8 _1ecs97dez1 _1ecs97dezc _1ecs97df92 _1ecs97df73",children:[(0,s.jsxs)("div",{className:"kedahre _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97deze _1ecs97dezd _1ecs97df51",children:[(0,s.jsx)(a.xv,{component:"span",noWrap:!0,variant:"bold",children:o}),(0,s.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"small",children:n})]}),t]}))},x=function(e){var t=e.children,n=(0,d.Z)(e,["children"]);return(0,s.jsx)("div",(0,i.Z)((0,c.Z)({},n),{className:"kedahrf _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97df6v _1ecs97dfb5 _1ecs97dezh _1ecs97dfhi _1ecs97dezt",children:(0,s.jsx)(a.xv,{align:"center",color:"inherit",component:"span",noWrap:!0,variant:"smallBold",children:t})}))}},34728:function(e,t,n){"use strict";n.d(t,{O:function(){return s}});var o=n(52322),c=n(22715),i=n(32681),d=n(79096),s=function(e){var t=function(e){var t=r[e.modelType];switch(e.modelStatus){case i.G.New:return{badgeColor:"green",badgeTitle:"New",tooltipContent:"This ".concat(t," exists only locally. Upon sync, it will be pushed to your remote repository.")};case i.G.Modified:return{badgeColor:"amber",badgeTitle:"Modified",tooltipContent:"This ".concat(t," has been modified locally. Upon sync, changes will be pushed to your remote repository.")};case i.G.Synced:return{badgeColor:"purple",badgeTitle:"Synced",tooltipContent:"This ".concat(t," is in sync with the remote repository.")};case i.G.Deleted:return{badgeColor:"tomato",badgeTitle:"Deleted",tooltipContent:"This ".concat(t," has been deleted locally.")};case i.G.Unknown:if(!e.isOnline)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (no internet connection)."};if(e.authStatus===d.t.UNAUTHORIZED)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (not connected to Prismic)."};if(e.authStatus===d.t.FORBIDDEN)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (you don't have access to the repository)."};default:return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (unknown error)."}}}(e),n=t.badgeColor,s=t.badgeTitle,a=t.tooltipContent;return(0,o.jsx)(c.u,{content:a,side:"bottom",children:(0,o.jsx)(c.Ct,{color:n,title:s})})},r={CustomType:"type",Slice:"slice"}},65958:function(e,t,n){"use strict";n.d(t,{b:function(){return _}});var o=n(62230),c=n(85244),i=n(52322),d=n(22715),s=n(39097),r=n.n(s),a=n(30180),l=n(24804),u=n(5479),h=n(34728),v=n(49451),m=function(e){return(0,i.jsx)("svg",(0,c.Z)((0,o.Z)({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 5.5C4 4.67157 4.67157 4 5.5 4H18.5C19.3284 4 20 4.67157 20 5.5V12.4413C20 12.4512 19.9997 12.461 19.9991 12.4707C20.0072 12.6083 19.9586 12.7485 19.8536 12.8536C19.6583 13.0488 19.3417 13.0488 19.1464 12.8536L16.3536 10.0607C16.1583 9.8654 15.8417 9.8654 15.6464 10.0607L11.8536 13.8536C11.6583 14.0488 11.3417 14.0488 11.1464 13.8536L9.35355 12.0607C9.15829 11.8654 8.84171 11.8654 8.64645 12.0607L5 15.7071V18.5C5 18.7761 5.22386 19 5.5 19H12.5C12.7761 19 13 19.2239 13 19.5C13 19.7761 12.7761 20 12.5 20H5.5C4.67157 20 4 19.3284 4 18.5V15.5003V15.4997V5.5ZM11.5 12.7929L14.9393 9.35355C15.5251 8.76777 16.4749 8.76777 17.0607 9.35355L19 11.2929V5.5C19 5.22386 18.7761 5 18.5 5H5.5C5.22386 5 5 5.22386 5 5.5V14.2929L7.93934 11.3536C8.52513 10.7678 9.47487 10.7678 10.0607 11.3536L11.5 12.7929ZM16.5 13C16.7761 13 17 13.2239 17 13.5V16H19.5C19.7761 16 20 16.2239 20 16.5C20 16.7761 19.7761 17 19.5 17H17V19.5C17 19.7761 16.7761 20 16.5 20C16.2239 20 16 19.7761 16 19.5V17H13.5C13.2239 17 13 16.7761 13 16.5C13 16.2239 13.2239 16 13.5 16H16V13.5C16 13.2239 16.2239 13 16.5 13Z",fill:"currentColor"})}))},_=function(e){var t,n=e.action,s=e.isComingSoon,_=void 0!==s&&s,C=e.isDeleted,b=e.onUpdateScreenshot,x=e.selected,g=void 0!==x&&x,j=e.slice,y=e.variant,k=e.variationId,z=a.dN.variation(j,k);if(!z)return null;var Z=(0,u.d7)(j,z),w=_||void 0!==C&&C,N=!w&&!!b,T="outlined"===y,S=void 0!==k;return t="selection"===e.mode?{disabled:w,interactive:!0,onClick:function(){e.onSelectedChange(!g)}}:w?{interactive:!1}:{component:r(),href:v.Y.getBuilderPagePathname({libraryName:j.href,sliceName:j.model.name,variationId:z.id}),interactive:!0,replace:e.replace},(0,i.jsxs)(l.Zb,(0,c.Z)((0,o.Z)({"aria-label":"".concat(j.model.name," ").concat(z.name," slice card"),checked:g,"data-cy":"shared-slice-card","data-testid":"shared-slice-card"},t,"outlined"===y?{size:"small",variant:"outlined"}:{}),{children:[void 0!==Z?(0,i.jsx)(l.ZB,{alt:"Preview image",overlay:N&&!T?(0,i.jsx)(d.xu,{alignItems:"center",justifyContent:"center",children:(0,i.jsx)(f,{onClick:b})}):void 0,src:Z}):(0,i.jsx)(l.ZB,{component:"div",children:(0,i.jsxs)(d.xu,{alignItems:"center",flexDirection:"column",gap:8,justifyContent:"center",children:[(0,i.jsx)(d.xv,{color:"grey11",component:"span",children:"No screenshot available"}),N&&!T?(0,i.jsx)(f,{onClick:b}):void 0]})}),(0,i.jsx)(l.eW,{action:"checkbox"===n.type&&"selection"===e.mode?(0,i.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:(0,i.jsx)(d.XZ,{checked:g,disabled:w,onCheckedChange:e.onSelectedChange})}):"menu"===n.type?(0,i.jsxs)(d.h_,{modal:!0,children:[(0,i.jsx)(d.$F,{disabled:w,children:(0,i.jsx)(d.hU,{"data-cy":"slice-action-icon",icon:"moreVert"})}),(0,i.jsxs)(d.AW,{align:"end","data-cy":"slice-action-icon-dropdown",children:[N&&T?(0,i.jsx)(d.Xi,{onSelect:b,startIcon:(0,i.jsx)(m,{}),children:"Update screenshot"}):void 0,(0,i.jsx)(d.Xi,{onSelect:n.onRename,startIcon:(0,i.jsx)(d.I5,{name:"edit"}),children:"Rename"}),!0===n.removeDisabled&&S?(0,i.jsx)(d.u,{content:"The slice needs to have at least one variation.",side:"bottom",stableMount:!0,children:(0,i.jsx)(p,{disabled:!0,onSelect:n.onRemove})}):(0,i.jsx)(p,{disabled:!0===n.removeDisabled,onSelect:n.onRemove})]})]}):"remove"===n.type?(0,i.jsx)(d.hU,{icon:"close",onClick:function(){return!w&&n.onRemove()}}):"status"===n.type?(0,i.jsx)(h.O,{authStatus:n.authStatus,isOnline:n.isOnline,modelStatus:n.modelStatus,modelType:"Slice"}):void 0,subtitle:(0,i.jsxs)(i.Fragment,{children:[S?z.id:"".concat(j.model.variations.length," variation").concat(j.model.variations.length>1?"s":""),_?(0,i.jsxs)(d.xv,{color:"purple11",component:"span",variant:"small",children:[" ","• (coming soon)"]}):void 0]}),title:S?z.name:j.model.name}),N&&!S&&(0,u.cx)(j)>0?(0,i.jsx)(l.Lm,{children:"Missing screenshot"}):void 0]}))},f=function(e){return(0,i.jsx)(d.zx,{onClick:e.onClick,renderStartIcon:function(){return(0,i.jsx)(m,{color:d.TV.color.greyLight11})},variant:"secondary",children:"Update screenshot"})},p=function(e){return(0,i.jsx)(d.Xi,(0,c.Z)((0,o.Z)({},e),{color:"tomato",startIcon:(0,i.jsx)(d.I5,{name:"delete"}),children:"Delete"}))}},49451:function(e,t,n){"use strict";n.d(t,{Y:function(){return o}});var o={getBuilderPagePathname:function(e){return"/slices/".concat(e.libraryName.replaceAll("/","--"),"/").concat(e.sliceName,"/").concat(e.variationId)}}},71457:function(){}}]);