slice-machine-ui 1.26.1-beta.14 → 1.26.1-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/out/404.html +1 -1
  2. package/out/_next/static/QvZVje-xYRnZnbmBltH-r/_buildManifest.js +1 -0
  3. package/out/_next/static/chunks/{127-ebfffb85bdb0bf53.js → 127-05b868d599a65e35.js} +1 -1
  4. package/out/_next/static/chunks/{183-6ad5c4eb28d4b155.js → 183-6ad1d7303abecd2b.js} +1 -1
  5. package/out/_next/static/chunks/18539003-8854ec97730b0755.js +22 -0
  6. package/out/_next/static/chunks/{453-4e2d00a3515202f4.js → 453-b316fb518939c1f8.js} +1 -1
  7. package/out/_next/static/chunks/{614-af117b661cd3429a.js → 614-873c38acd991869b.js} +1 -1
  8. package/out/_next/static/chunks/756-2582778cc77454f9.js +10 -0
  9. package/out/_next/static/chunks/{91-e96855cdfbfbbade.js → 91-01fb8f8c23867b35.js} +1 -1
  10. package/out/_next/static/chunks/96-8a605f44a6f2716b.js +1 -0
  11. package/out/_next/static/chunks/pages/_app-04b13497d540b990.js +530 -0
  12. package/out/_next/static/chunks/pages/{changelog-db23fdc674e68e53.js → changelog-042822d12df57669.js} +1 -1
  13. package/out/_next/static/chunks/pages/{changes-92929e59b38adef8.js → changes-7e35ed96a4222f5e.js} +1 -1
  14. package/out/_next/static/chunks/pages/{index-16754a04037cf9c1.js → index-eb0fb97f03c26ecd.js} +1 -1
  15. package/out/_next/static/chunks/pages/{labs-f9e359543631af2a.js → labs-7a4fe64cb86b59e8.js} +1 -1
  16. package/out/_next/static/chunks/pages/{settings-a61e874536e40574.js → settings-419384d4d43070c2.js} +1 -1
  17. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/{simulator-9941e7eeb9d4d084.js → simulator-9bdb355306fca592.js} +1 -1
  18. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-a822e349e3e0b18f.js → [variation]-0bb2e8ab95fd94d8.js} +1 -1
  19. package/out/_next/static/css/{c36992b18975f9b9.css → 1df6702d0ca462a4.css} +1 -1
  20. package/out/_next/static/css/{17da9daaa8986410.css → 321d78460d2d69bc.css} +1 -1
  21. package/out/_next/static/css/{6e65ff596e3b465e.css → 4539a57f192decab.css} +1 -1
  22. package/out/_next/static/css/{70e3649c6ba13fdc.css → b65748eaa6f70ab6.css} +1 -1
  23. package/out/_next/static/css/c47241940651ef2f.css +1 -0
  24. package/out/_next/static/css/{663a1bac4ce890da.css → dc201720b301472d.css} +1 -1
  25. package/out/changelog.html +1 -1
  26. package/out/changes.html +1 -1
  27. package/out/custom-types/[customTypeId].html +1 -1
  28. package/out/custom-types.html +1 -1
  29. package/out/index.html +1 -1
  30. package/out/labs.html +1 -1
  31. package/out/page-types/[pageTypeId].html +1 -1
  32. package/out/settings.html +1 -1
  33. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  34. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  35. package/out/slices.html +1 -1
  36. package/package.json +6 -6
  37. package/src/components/PageLayout/PageLayout.module.css +1 -1
  38. package/src/components/SideNav/SideNav.module.css +1 -1
  39. package/src/components/SideNav/SideNav.tsx +3 -4
  40. package/src/components/SideNav/SideNavEnvironmentSelector.tsx +8 -10
  41. package/src/features/inAppGuide/inAppGuideContent.tsx +3 -3
  42. package/src/features/settings/git/GitRepositoryConnectDialog.tsx +2 -5
  43. package/src/features/sync/components/AutoSyncStatusIndicator.module.css +1 -1
  44. package/src/legacy/components/ChangesEmptyState/AuthErrorPage.tsx +3 -3
  45. package/src/legacy/components/Navigation/ChangesItem.tsx +7 -5
  46. package/src/legacy/components/Simulator/index.tsx +5 -4
  47. package/src/legacy/lib/builders/common/Zone/Card/index.jsx +9 -6
  48. package/src/legacy/lib/models/common/widgets/Group/ListItem/index.jsx +2 -0
  49. package/test/src/modules/__fixtures__/serverState.ts +2 -2
  50. package/out/_next/static/chunks/18539003-a5a5d48f20a7b261.js +0 -97
  51. package/out/_next/static/chunks/46-bd45510ac2a839b5.js +0 -10
  52. package/out/_next/static/chunks/96-24fed6adc069e313.js +0 -1
  53. package/out/_next/static/chunks/pages/_app-451e6ea8230ca7e5.js +0 -436
  54. package/out/_next/static/css/09a4e5669351d4e2.css +0 -1
  55. package/out/_next/static/meJPGne56O3xxrr3mYozg/_buildManifest.js +0 -1
  56. /package/out/_next/static/{meJPGne56O3xxrr3mYozg → QvZVje-xYRnZnbmBltH-r}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[453],{2754:function(e,n,t){"use strict";t.d(n,{R$:function(){return l},Qj:function(){return h},T9:function(){return f},nf:function(){return m},u2:function(){return d},_T:function(){return p}});var r=t(67557),o=t(62230),i=t(85244),s=t(98240),c=t(52322),a=t(22715),u=t(6277);t(69143);var l=function(e){var n=e.backgroundImage,t=e.style,a=(0,s.Z)(e,["backgroundImage","style"]),l=void 0!==n;return(0,c.jsx)("article",(0,i.Z)((0,o.Z)({},a),{className:(0,u.W)("_18bjhbz0 _1ecs97dez0 _1ecs97dez1 _1ecs97dez2 _1ecs97dezb _1ecs97dfiv _1ecs97dfix _1ecs97dfiz _1ecs97d3fg _1ecs97d3mt _1ecs97df0r _1ecs97df23 _1ecs97df2h _1ecs97dezp",(0,r.Z)({},"_18bjhbz1 _1ecs97dezx _1ecs97df4v",l)),style:(0,o.Z)({backgroundImage:l?"url(".concat(n,")"):void 0},t)}))},d=function(e){return(0,c.jsx)("div",(0,i.Z)((0,o.Z)({},e),{className:"_1ecs97dez0 _1ecs97dez1 _1ecs97dez2 _1ecs97dezb _1ecs97d6r8 _1ecs97d6yl _1ecs97df29 _1ecs97df2l _1ecs97dezp"}))},f=function(e){return(0,c.jsx)("div",(0,i.Z)((0,o.Z)({},e),{className:"_18bjhbz3 _1ecs97dez0 _1ecs97dez1 _1ecs97dez2 _1ecs97dezb _1ecs97dffv"}))},p=function(e){return(0,c.jsx)(a.xv,(0,i.Z)((0,o.Z)({},e),{className:"_18bjhbz4"}))},m=function(e){return(0,c.jsx)(a.xv,(0,i.Z)((0,o.Z)({},e),{className:"_18bjhbz5",color:"grey11"}))},h=function(e){return(0,c.jsx)("div",(0,i.Z)((0,o.Z)({},e),{className:"_18bjhbz6 _1ecs97dez0 _1ecs97dez8 _1ecs97dez1 _1ecs97dez2 _1ecs97df95 _1ecs97dfdl",color:"grey"}))}},91061:function(e,n,t){"use strict";t.d(n,{AK:function(){return j},E3:function(){return m},EN:function(){return h},F$:function(){return x},HO:function(){return b},L4:function(){return Z},Tr:function(){return p},Ue:function(){return T},gR:function(){return _},mf:function(){return v},vB:function(){return y},xS:function(){return g},y6:function(){return u}});var r=t(67557),o=t(62230),i=t(85244),s=t(17064),c=t(98863),a=t(88866);function u(e){var n;return null!==(n=e.format)&&void 0!==n?n:"custom"}function l(e){return Object.entries(e.json)}function d(e,n){return e.json[n]}function f(e,n){var t=d(e,n);if(void 0!==t)return Object.entries(t).find(function(e){var n=(0,s.Z)(e,2);return(n[0],n[1]).type===a.SlicesFieldType})}function p(e,n){if(t=e,d=f(t,c=n),(p=(0,s.Z)(null!=d?d:[],2))[0],null!==(u=null==(m=p[1])?void 0:m.config)&&void 0!==u?u:void 0)return e;var t,c,u,d,p,m,h=function(e,n){var t,r=l(e),o=r.findIndex(function(e){return(0,s.Z)(e,1)[0]===n}),i=r.flatMap(function(e){var n=(0,s.Z)(e,2),t=(n[0],n[1]);return Object.keys(t).filter(function(e){return t[e].type===a.SlicesFieldType})}),c=o;do t="slices".concat(0!==c?c.toString():""),c++;while(i.includes(t));return t}(e,n);return(0,i.Z)((0,o.Z)({},e),{json:(0,i.Z)((0,o.Z)({},e.json),(0,r.Z)({},n,(0,i.Z)((0,o.Z)({},e.json[n]),(0,r.Z)({},h,{type:a.SlicesFieldType,fieldset:"Slice Zone"}))))})}function m(e,n){var t=d(e,n);if(void 0===t)return e;var s=Object.keys(t).find(function(e){return t[e].type===a.SlicesFieldType});if(void 0===s)return e;var u=(0,c.ud)(t,s);return(0,i.Z)((0,o.Z)({},e),{json:(0,i.Z)((0,o.Z)({},e.json),(0,r.Z)({},n,u))})}function h(e){var n,t,s=e.customType,u=e.sectionId,l=e.sliceId,f=d(s,u);if(void 0===f)return s;var p=Object.keys(f).find(function(e){return f[e].type===a.SlicesFieldType});if(void 0===p)return s;var m=f[p];if(m.type!==a.SlicesFieldType)return s;var h=(0,c.ud)(null!==(t=null===(n=m.config)||void 0===n?void 0:n.choices)&&void 0!==t?t:{},l);return(0,i.Z)((0,o.Z)({},s),{json:(0,i.Z)((0,o.Z)({},s.json),(0,r.Z)({},u,(0,i.Z)((0,o.Z)({},f),(0,r.Z)({},p,(0,i.Z)((0,o.Z)({},m),{config:(0,i.Z)((0,o.Z)({},m.config),{choices:h})})))))})}function v(e){var n,t=(0,i.Z)((0,o.Z)({},e),{format:"page"}),r=l(e)[0];if(r){var c=(0,s.Z)(r,1)[0];t=p(t,c)}return t}function y(e,n){return(0,i.Z)((0,o.Z)({},e),{json:(0,i.Z)((0,o.Z)({},e.json),(0,r.Z)({},n,{}))})}function x(e,n){var t=(0,c.ud)(e.json,n);return(0,i.Z)((0,o.Z)({},e),{json:t})}function b(e,n,t){if(n===t)return e;var r=Object.keys(e.json).reduce(function(r,o){return o===n?r[t]=e.json[o]:r[o]=e.json[o],r},{});return(0,i.Z)((0,o.Z)({},e),{json:r})}function g(e){var n=e.customType,t=e.sectionId,c=e.newField,u=e.newFieldId,l=n.json[t],d=f(n,t),p=Object.fromEntries(Object.entries(l).filter(function(e){var n=(0,s.Z)(e,2);return(n[0],n[1]).type!==a.SlicesFieldType})),m=(0,i.Z)((0,o.Z)({},p),(0,r.Z)({},u,c));if(void 0!==d){var h=(0,s.Z)(d,2),v=h[0],y=h[1];m[v]=y}return I({customType:n,sectionId:t,updatedSection:m})}function j(e){var n=e.customType,t=e.sectionId,r=e.fieldId,o=(0,c.ud)(n.json[t],r);return I({customType:n,sectionId:t,updatedSection:o})}function Z(e){var n,t,r,o,i,c=e.customType,a=e.sectionId,u=e.previousFieldId,l=e.newFieldId,d=e.newField,f=(n={fields:c.json[a],previousFieldId:u,newFieldId:l,newField:d},t=n.fields,r=n.previousFieldId,o=n.newFieldId,i=n.newField,Object.entries(t).reduce(function(e,n){var t=(0,s.Z)(n,2),c=t[0],a=t[1];return c===r?e[o]=i:c!==o&&(e[c]=a),e},{}));return I({customType:c,sectionId:a,updatedSection:f})}function _(e){var n,t,r,o,i,c,u,l=e.customType,d=e.sectionId,p=e.sourceIndex,m=e.destinationIndex,h=l.json[d],v=f(l,d),y=(n={fields:Object.fromEntries(Object.entries(h).filter(function(e){var n=(0,s.Z)(e,2);return(n[0],n[1]).type!==a.SlicesFieldType})),sourceIndex:p,destinationIndex:m},t=n.fields,r=n.sourceIndex,o=n.destinationIndex,i=Object.entries(t),c=(0,s.Z)(i.splice(r,1),1)[0],i.splice(o,0,c),Object.fromEntries(i));if(void 0!==v){var x=(0,s.Z)(v,2),b=x[0],g=x[1];y[b]=g}return I({customType:l,sectionId:d,updatedSection:y})}function I(e){var n=e.customType,t=e.sectionId,s=e.updatedSection;return(0,i.Z)((0,o.Z)({},n),{json:(0,i.Z)((0,o.Z)({},n.json),(0,r.Z)({},t,s))})}function T(e){var n,t,r=e.id,i=e.label,s=e.repeatable,c=e.format,a=(n=s,t=c,!1===n&&"page"===t?(0,o.Z)({},C,k):!1===n?S:"page"===t?(0,o.Z)({},w,k):z);return{format:c,id:r,json:a,label:i,repeatable:s,status:!0}}var S={Main:{}},C={Main:{slices:{config:{choices:{}},fieldset:"Slice Zone",type:"Slices"}}},z={Main:{uid:{config:{label:"UID"},type:"UID"}}},w={Main:(0,o.Z)({},z.Main,C.Main)},k={"SEO & Metadata":{meta_description:{config:{label:"Meta Description",placeholder:"A brief summary of the page"},type:"Text"},meta_image:{config:{constraint:{height:1260,width:2400},label:"Meta Image",thumbnails:[]},type:"Image"},meta_title:{config:{label:"Meta Title",placeholder:"A title of the page used for social media and search engines"},type:"Text"}}}},54845:function(e,n,t){"use strict";t.d(n,{_:function(){return N}});var r=t(22710),o=t(99267),i=t(52322),s=t(22715),c=t(5632),a=t(2784),u=t(65186),l=t(59326),d=t(75289),f=t(88932),p=t(81038),m=t(78656);function h(){return(h=(0,r.Z)(function(e){var n,t,r,i,s,c;return(0,o.__generator)(this,function(o){switch(o.label){case 0:n=e.customType,t=e.onSuccess,r=m.$[n.format],o.label=1;case 1:return o.trys.push([1,3,,4]),[4,p.j.customTypes.deleteCustomType({id:n.id})];case 2:if((i=o.sent().errors).length>0)throw i;return t(),f.Am.success("".concat(r.name({start:!0,plural:!1})," deleted")),[3,4];case 3:return s=o.sent(),c="Internal Error: ".concat(r.name({start:!0,plural:!1})," could not be deleted"),console.error(c,s),f.Am.error(c),[3,4];case 4:return[2]}})})).apply(this,arguments)}var v=t(34226),y=t(98898),x=t(83399),b=t(90374),g=function(e){var n,t=e.customType,s=e.format,c=e.onClose,f=e.onDeleteCustomTypeSuccess,p=m.$[s],g=(0,a.useState)(!1),j=g[0],Z=g[1],_=(0,b.Z)().deleteCustomTypeSuccess,I=(n=(0,r.Z)(function(){return(0,o.__generator)(this,function(e){switch(e.label){case 0:return Z(!0),[4,function(e){return h.apply(this,arguments)}({customType:t,onSuccess:function(){return _(t.id)}})];case 1:return e.sent(),f(),[2]}})}),function(){return n.apply(this,arguments)}),T=(0,l.B7)().theme;return(0,i.jsx)(x.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:function(){return c()},children:(0,i.jsx)(y.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(){var e;return(0,i.jsxs)(d.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.jsxs)(d.kC,{sx:{alignItems:"center"},children:[(0,i.jsx)(u.$vK,{size:20,color:null===(e=T.colors)||void 0===e?void 0:e.greyIcon}),(0,i.jsxs)(d.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:["Delete"," ",p.name({start:!1,plural:!1})]})]}),(0,i.jsx)(d.x8,{type:"button",onClick:function(){return c()}})]})},Footer:function(){return(0,i.jsxs)(d.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)(v.z,{label:"Cancel",variant:"secondary",onClick:function(){return c()},sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),void 0!==t&&(0,i.jsx)(v.z,{label:"Delete",variant:"danger",isLoading:j,onClick:function(){I()},sx:{minHeight:39,minWidth:78}})]})},children:(0,i.jsxs)("div",{children:["This action will immediately make the following change:",(0,i.jsx)("ul",{children:(0,i.jsxs)("li",{children:["Delete the"," ",(0,i.jsxs)(d.xv,{sx:{fontWeight:"bold"},children:["customtypes/",null==t?void 0:t.id,"/"]})," ","directory."]})}),"The next time you push your changes to Prismic, the following change will happen:",(0,i.jsx)("ul",{children:(0,i.jsxs)("li",{children:["Remove the"," ",p.name({start:!1,plural:!1})," and any associated Documents from your repository."]})})]})})})},j=t(62230),Z=t(85244),_=t(56580);function I(){return(I=(0,r.Z)(function(e){var n,t,r,i,s,c,a,u;return(0,o.__generator)(this,function(o){switch(o.label){case 0:n=e.model,t=e.newLabel,r=e.onSuccess,i=m.$[n.format],o.label=1;case 1:return o.trys.push([1,3,,4]),s=(0,Z.Z)((0,j.Z)({},n),{label:t}),[4,p.j.customTypes.renameCustomType({model:s})];case 2:if((c=o.sent().errors).length>0)throw c;return r(s),f.Am.success("".concat(i.name({start:!0,plural:!1})," renamed")),[3,4];case 3:return a=o.sent(),u="Internal Error: ".concat(i.name({start:!0,plural:!1})," could not be renamed"),console.error(u,a),f.Am.error(u),[3,4];case 4:return[2]}})})).apply(this,arguments)}var T=t(50950),S=t(28849),C=t(6134),z=t(36960),w=function(e){var n,t,s,c=e.isChangesLocal,u=e.customType,l=e.format,f=e.onClose,p=e.setLocalCustomType,h=null!==(n=null==u?void 0:u.label)&&void 0!==n?n:"",v=null!==(t=null==u?void 0:u.id)&&void 0!==t?t:"",y=(0,b.Z)().renameCustomTypeSuccess,x=(0,T.g)().syncChanges,g=(0,a.useState)(!1),w=g[0],k=g[1],F=(s=(0,r.Z)(function(e){return(0,o.__generator)(this,function(n){switch(n.label){case 0:if(k(!0),!(c&&p))return[3,1];return p((0,Z.Z)((0,j.Z)({},u),{label:e.customTypeName})),[3,3];case 1:return[4,function(e){return I.apply(this,arguments)}({model:u,newLabel:e.customTypeName,onSuccess:function(e){y(e),x()}})];case 2:n.sent(),n.label=3;case 3:return k(!1),f(),[2]}})}),function(e){return s.apply(this,arguments)}),O=(0,_.v9)(function(e){return{customTypeLabels:(0,S.YS)(e)}}).customTypeLabels,L=m.$[l];return(0,i.jsx)(C.Z,{isOpen:!0,testId:"rename-custom-type-modal",widthInPx:"530px",formId:"rename-custom-type-modal-".concat(v),buttonLabel:"Rename",close:f,onSubmit:function(e){F(e)},initialValues:{customTypeName:h},isLoading:w,content:{title:"Rename a ".concat(L.name({start:!1,plural:!1}))},validate:function(e){var n=e.customTypeName,t={};return n&&n.length||(t.customTypeName="Cannot be empty."),void 0!=t.customTypeName&&O.includes(n)&&h!==n&&(t.customTypeName="".concat(L.name({start:!0,plural:!1})," name is already taken.")),Object.keys(t).length>0?t:void 0},children:function(e){var n=e.errors;return(0,i.jsx)(d.xu,{children:(0,i.jsx)(z.W,{name:"customTypeName",label:"".concat(L.name({start:!0,plural:!1})," Name"),placeholder:"A display name for the ".concat(L.name({start:!1,plural:!1})),error:n.customTypeName,testId:"custom-type-name-input"})})}})},k=t(82770),F=t(91061);function O(){return(O=(0,r.Z)(function(e,n){var t,r,i,s,c;return(0,o.__generator)(this,function(o){switch(o.label){case 0:t=m.$[e.format],o.label=1;case 1:return o.trys.push([1,3,,4]),r=(0,F.mf)(e),[4,(0,k.KA)(r)];case 2:if((i=o.sent().errors).length>0)throw i;return n(r),f.Am.success("".concat(t.name({start:!0,plural:!1})," converted to page type")),[3,4];case 3:return s=o.sent(),c="Internal Error: ".concat(t.name({start:!0,plural:!1})," not converted to page type"),console.error(c,s),f.Am.error(c),[3,4];case 4:return[2]}})})).apply(this,arguments)}var L=t(67445),N=function(e){var n,t=e.format,u=e.customType,l=e.isChangesLocal,d=e.setLocalCustomType,f=(0,c.useRouter)(),p=(0,b.Z)().saveCustomTypeSuccess,m=(0,a.useState)(!1),h=m[0],v=m[1],y=(0,a.useState)(!1),x=y[0],j=y[1],Z=(0,a.useState)(!1),_=Z[0],I=Z[1],T=(n=(0,r.Z)(function(){var e,n;return(0,o.__generator)(this,function(t){switch(t.label){case 0:return I(!0),[4,function(e,n){return O.apply(this,arguments)}(u,p)];case 1:return t.sent(),e=L.cd.custom.getBuilderPagePathname(u.id),f.asPath===e&&(n=L.cd.page.getBuilderPagePathname(u.id),f.replace(n)),I(!1),[2]}})}),function(){return n.apply(this,arguments)}),S=function(){var e,n=L.cd[null!==(e=u.format)&&void 0!==e?e:"custom"].tablePagePathname;f.asPath!==n?f.replace(n):v(!1)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.h_,{modal:!0,children:[(0,i.jsx)(s.$F,{disabled:_,children:(0,i.jsx)(s.hU,{color:"grey","data-testid":"editDropdown",hiddenLabel:"Custom type actions",icon:"moreVert",loading:_,variant:"solid"})}),(0,i.jsxs)(s.AW,{align:"end",children:[(0,i.jsx)(s.Xi,{startIcon:(0,i.jsx)(s.I5,{name:"edit"}),onSelect:function(){j(!0)},children:"Rename"}),"custom"===t&&!l&&(0,i.jsx)(s.Xi,{startIcon:(0,i.jsx)(s.I5,{name:"driveFileMove"}),onSelect:function(){T()},children:"Convert to page type"}),(0,i.jsx)(s.Xi,{color:"tomato",startIcon:(0,i.jsx)(s.I5,{name:"delete"}),onSelect:function(){v(!0)},children:"Remove"})]})]}),h?(0,i.jsx)(g,{format:t,customType:u,onClose:function(){return v(!1)},onDeleteCustomTypeSuccess:S}):null,x?(0,i.jsx)(w,{format:t,customType:u,isChangesLocal:l,onClose:function(){return j(!1)},setLocalCustomType:d}):null]})}},34226:function(e,n,t){"use strict";t.d(n,{z:function(){return d}});var r=t(62230),o=t(85244),i=t(98240),s=t(52322),c=t(2784),a=t(75289),u=function(e,n){return e?"".concat(e,"-").concat(n):""},l=function(e){switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},d=(0,c.forwardRef)(function(e,n){var t=e.label,c=e.Icon,d=e.type,f=e.form,p=e.isLoading,m=void 0!==p&&p,h=e.disabled,v=e.onClick,y=e.sx,x=e.iconSize,b=void 0===x?16:x,g=e.iconFill,j=e.variant,Z=void 0===j?"primary":j,_=(0,i.Z)(e,["label","Icon","type","form","isLoading","disabled","onClick","sx","iconSize","iconFill","variant"]);return(0,s.jsx)(a.zx,(0,o.Z)((0,r.Z)({ref:n,sx:(0,r.Z)((0,o.Z)((0,r.Z)({},void 0===y?{}:y),{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"}),m?{cursor:"wait !important"}:{}),type:d,form:f,disabled:void 0!==h&&h||m,onClick:m?void 0:v,variant:Z},_),{children:m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.$j,{size:b,color:l(Z),"data-testid":u(_["data-testid"],"spinner")}),c&&t]}):(0,s.jsxs)(s.Fragment,{children:[c&&(0,s.jsx)(c,{size:b,fill:g,"data-testid":u(_["data-testid"],"icon")}),t]})}))})},36960:function(e,n,t){"use strict";t.d(n,{W:function(){return c}});var r=t(62230),o=t(52322),i=t(63397);t(2784);var s=t(75289),c=function(e){var n=e.name,t=e.label,c=e.placeholder,a=e.error,u=e.testId,l=e.onChange;return(0,o.jsxs)(s.xu,{mb:3,children:[(0,o.jsx)(s.__,{htmlFor:n,mb:2,children:t}),(0,o.jsx)(i.gN,(0,r.Z)({name:n,type:"text",placeholder:c,as:s.II,autoComplete:"off"},l?{onChange:l}:null,u?{"data-testid":u}:null)),a?(0,o.jsx)(s.xv,{"data-testid":u?"".concat(u,"-error"):"input-error",sx:{color:"error",mt:1},children:a}):null]})}},6134:function(e,n,t){"use strict";var r=t(62230),o=t(85244),i=t(52322),s=t(63397),c=t(37149),a=t.n(c),u=t(75289),l=t(34226),d=t(83399),f=t(98898);n.Z=function(e){var n=e.children,t=e.close,c=e.isOpen,p=e.formId,m=e.validate,h=e.onSubmit,v=e.widthInPx,y=e.initialValues,x=e.content.title,b=e.cardProps,g=e.omitFooter,j=void 0!==g&&g,Z=e.isLoading,_=void 0!==Z&&Z,I=e.buttonLabel,T=void 0===I?"Save":I,S=e.testId,C=e.actionMessage;return a().setAppElement("#__next"),(0,i.jsx)(d.Z,{isOpen:c,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:x,style:{content:{width:null!=v?v:"900px"}},children:(0,i.jsx)(s.J9,{initialValues:y,validate:function(e){return m?m(e):void 0},onSubmit:function(e){h(e)},children:function(e){var c=e.isValid,a=e.isSubmitting,d=e.values,m=e.errors,h=e.touched,v=e.setFieldValue,y=e.setValues;return(0,i.jsx)(s.l0,(0,o.Z)((0,r.Z)({id:p},null!=S?{"data-testid":S}:null),{children:(0,i.jsx)(f.Z,(0,o.Z)((0,r.Z)({borderFooter:!0,footerSx:{p:3,position:"sticky",bottom:0,background:"gray"},bodySx:{px:4,py:4},sx:{border:"none"}},b),{Header:function(e){var n=e.radius;return(0,i.jsxs)(u.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)}},children:[(0,i.jsx)(u.X6,{sx:{fontSize:"20px"},children:x}),(0,i.jsx)(u.x8,{type:"button",onClick:t})]})},Footer:j?null:(0,i.jsxs)(u.kC,{sx:{alignItems:"space-between"},children:[(0,i.jsx)(u.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof C?C(e):C}),(0,i.jsxs)(u.kC,{sx:{ml:"auto"},children:[(0,i.jsx)(u.zx,{mr:2,type:"button",onClick:t,variant:"secondary",disabled:a||_,children:"Cancel"}),(0,i.jsx)(l.z,{label:T,form:p,type:"submit",disabled:!c||a||_,isLoading:a||_,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:n({isValid:c,isSubmitting:a,values:d,errors:m,touched:h,setFieldValue:v,setValues:y})}))}))}})})}},69143:function(){}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[453],{2754:function(e,n,t){"use strict";t.d(n,{R$:function(){return l},Qj:function(){return h},T9:function(){return f},nf:function(){return m},u2:function(){return d},_T:function(){return p}});var r=t(67557),o=t(62230),i=t(85244),s=t(98240),c=t(52322),a=t(22715),u=t(6277);t(69143);var l=function(e){var n=e.backgroundImage,t=e.style,a=(0,s.Z)(e,["backgroundImage","style"]),l=void 0!==n;return(0,c.jsx)("article",(0,i.Z)((0,o.Z)({},a),{className:(0,u.W)("_18bjhbz0 _1ecs97dffi _1ecs97dffj _1ecs97dffk _1ecs97dfft _1ecs97dfze _1ecs97dfzg _1ecs97dfzi _1ecs97d3j4 _1ecs97d3qh _1ecs97dfh9 _1ecs97dfil _1ecs97dfiz _1ecs97dfg7",(0,r.Z)({},"_18bjhbz1 _1ecs97dfgf _1ecs97dfle",l)),style:(0,o.Z)({backgroundImage:l?"url(".concat(n,")"):void 0},t)}))},d=function(e){return(0,c.jsx)("div",(0,i.Z)((0,o.Z)({},e),{className:"_1ecs97dffi _1ecs97dffj _1ecs97dffk _1ecs97dfft _1ecs97d6yk _1ecs97d75x _1ecs97dfir _1ecs97dfj3 _1ecs97dfg7"}))},f=function(e){return(0,c.jsx)("div",(0,i.Z)((0,o.Z)({},e),{className:"_18bjhbz3 _1ecs97dffi _1ecs97dffj _1ecs97dffk _1ecs97dfft _1ecs97dfwe"}))},p=function(e){return(0,c.jsx)(a.xv,(0,i.Z)((0,o.Z)({},e),{className:"_18bjhbz4"}))},m=function(e){return(0,c.jsx)(a.xv,(0,i.Z)((0,o.Z)({},e),{className:"_18bjhbz5",color:"grey11"}))},h=function(e){return(0,c.jsx)("div",(0,i.Z)((0,o.Z)({},e),{className:"_18bjhbz6 _1ecs97dffi _1ecs97dffq _1ecs97dffj _1ecs97dffk _1ecs97dfpo _1ecs97dfu4",color:"grey"}))}},91061:function(e,n,t){"use strict";t.d(n,{AK:function(){return g},E3:function(){return m},EN:function(){return h},F$:function(){return x},HO:function(){return b},L4:function(){return Z},Tr:function(){return p},Ue:function(){return T},gR:function(){return _},mf:function(){return v},vB:function(){return y},xS:function(){return j},y6:function(){return u}});var r=t(67557),o=t(62230),i=t(85244),s=t(17064),c=t(98863),a=t(88866);function u(e){var n;return null!==(n=e.format)&&void 0!==n?n:"custom"}function l(e){return Object.entries(e.json)}function d(e,n){return e.json[n]}function f(e,n){var t=d(e,n);if(void 0!==t)return Object.entries(t).find(function(e){var n=(0,s.Z)(e,2);return(n[0],n[1]).type===a.SlicesFieldType})}function p(e,n){if(t=e,d=f(t,c=n),(p=(0,s.Z)(null!=d?d:[],2))[0],null!==(u=null==(m=p[1])?void 0:m.config)&&void 0!==u?u:void 0)return e;var t,c,u,d,p,m,h=function(e,n){var t,r=l(e),o=r.findIndex(function(e){return(0,s.Z)(e,1)[0]===n}),i=r.flatMap(function(e){var n=(0,s.Z)(e,2),t=(n[0],n[1]);return Object.keys(t).filter(function(e){return t[e].type===a.SlicesFieldType})}),c=o;do t="slices".concat(0!==c?c.toString():""),c++;while(i.includes(t));return t}(e,n);return(0,i.Z)((0,o.Z)({},e),{json:(0,i.Z)((0,o.Z)({},e.json),(0,r.Z)({},n,(0,i.Z)((0,o.Z)({},e.json[n]),(0,r.Z)({},h,{type:a.SlicesFieldType,fieldset:"Slice Zone"}))))})}function m(e,n){var t=d(e,n);if(void 0===t)return e;var s=Object.keys(t).find(function(e){return t[e].type===a.SlicesFieldType});if(void 0===s)return e;var u=(0,c.ud)(t,s);return(0,i.Z)((0,o.Z)({},e),{json:(0,i.Z)((0,o.Z)({},e.json),(0,r.Z)({},n,u))})}function h(e){var n,t,s=e.customType,u=e.sectionId,l=e.sliceId,f=d(s,u);if(void 0===f)return s;var p=Object.keys(f).find(function(e){return f[e].type===a.SlicesFieldType});if(void 0===p)return s;var m=f[p];if(m.type!==a.SlicesFieldType)return s;var h=(0,c.ud)(null!==(t=null===(n=m.config)||void 0===n?void 0:n.choices)&&void 0!==t?t:{},l);return(0,i.Z)((0,o.Z)({},s),{json:(0,i.Z)((0,o.Z)({},s.json),(0,r.Z)({},u,(0,i.Z)((0,o.Z)({},f),(0,r.Z)({},p,(0,i.Z)((0,o.Z)({},m),{config:(0,i.Z)((0,o.Z)({},m.config),{choices:h})})))))})}function v(e){var n,t=(0,i.Z)((0,o.Z)({},e),{format:"page"}),r=l(e)[0];if(r){var c=(0,s.Z)(r,1)[0];t=p(t,c)}return t}function y(e,n){return(0,i.Z)((0,o.Z)({},e),{json:(0,i.Z)((0,o.Z)({},e.json),(0,r.Z)({},n,{}))})}function x(e,n){var t=(0,c.ud)(e.json,n);return(0,i.Z)((0,o.Z)({},e),{json:t})}function b(e,n,t){if(n===t)return e;var r=Object.keys(e.json).reduce(function(r,o){return o===n?r[t]=e.json[o]:r[o]=e.json[o],r},{});return(0,i.Z)((0,o.Z)({},e),{json:r})}function j(e){var n=e.customType,t=e.sectionId,c=e.newField,u=e.newFieldId,l=n.json[t],d=f(n,t),p=Object.fromEntries(Object.entries(l).filter(function(e){var n=(0,s.Z)(e,2);return(n[0],n[1]).type!==a.SlicesFieldType})),m=(0,i.Z)((0,o.Z)({},p),(0,r.Z)({},u,c));if(void 0!==d){var h=(0,s.Z)(d,2),v=h[0],y=h[1];m[v]=y}return I({customType:n,sectionId:t,updatedSection:m})}function g(e){var n=e.customType,t=e.sectionId,r=e.fieldId,o=(0,c.ud)(n.json[t],r);return I({customType:n,sectionId:t,updatedSection:o})}function Z(e){var n,t,r,o,i,c=e.customType,a=e.sectionId,u=e.previousFieldId,l=e.newFieldId,d=e.newField,f=(n={fields:c.json[a],previousFieldId:u,newFieldId:l,newField:d},t=n.fields,r=n.previousFieldId,o=n.newFieldId,i=n.newField,Object.entries(t).reduce(function(e,n){var t=(0,s.Z)(n,2),c=t[0],a=t[1];return c===r?e[o]=i:c!==o&&(e[c]=a),e},{}));return I({customType:c,sectionId:a,updatedSection:f})}function _(e){var n,t,r,o,i,c,u,l=e.customType,d=e.sectionId,p=e.sourceIndex,m=e.destinationIndex,h=l.json[d],v=f(l,d),y=(n={fields:Object.fromEntries(Object.entries(h).filter(function(e){var n=(0,s.Z)(e,2);return(n[0],n[1]).type!==a.SlicesFieldType})),sourceIndex:p,destinationIndex:m},t=n.fields,r=n.sourceIndex,o=n.destinationIndex,i=Object.entries(t),c=(0,s.Z)(i.splice(r,1),1)[0],i.splice(o,0,c),Object.fromEntries(i));if(void 0!==v){var x=(0,s.Z)(v,2),b=x[0],j=x[1];y[b]=j}return I({customType:l,sectionId:d,updatedSection:y})}function I(e){var n=e.customType,t=e.sectionId,s=e.updatedSection;return(0,i.Z)((0,o.Z)({},n),{json:(0,i.Z)((0,o.Z)({},n.json),(0,r.Z)({},t,s))})}function T(e){var n,t,r=e.id,i=e.label,s=e.repeatable,c=e.format,a=(n=s,t=c,!1===n&&"page"===t?(0,o.Z)({},C,F):!1===n?S:"page"===t?(0,o.Z)({},w,F):k);return{format:c,id:r,json:a,label:i,repeatable:s,status:!0}}var S={Main:{}},C={Main:{slices:{config:{choices:{}},fieldset:"Slice Zone",type:"Slices"}}},k={Main:{uid:{config:{label:"UID"},type:"UID"}}},w={Main:(0,o.Z)({},k.Main,C.Main)},F={"SEO & Metadata":{meta_description:{config:{label:"Meta Description",placeholder:"A brief summary of the page"},type:"Text"},meta_image:{config:{constraint:{height:1260,width:2400},label:"Meta Image",thumbnails:[]},type:"Image"},meta_title:{config:{label:"Meta Title",placeholder:"A title of the page used for social media and search engines"},type:"Text"}}}},54845:function(e,n,t){"use strict";t.d(n,{_:function(){return N}});var r=t(22710),o=t(99267),i=t(52322),s=t(22715),c=t(5632),a=t(2784),u=t(65186),l=t(59326),d=t(75289),f=t(88932),p=t(81038),m=t(78656);function h(){return(h=(0,r.Z)(function(e){var n,t,r,i,s,c;return(0,o.__generator)(this,function(o){switch(o.label){case 0:n=e.customType,t=e.onSuccess,r=m.$[n.format],o.label=1;case 1:return o.trys.push([1,3,,4]),[4,p.j.customTypes.deleteCustomType({id:n.id})];case 2:if((i=o.sent().errors).length>0)throw i;return t(),f.Am.success("".concat(r.name({start:!0,plural:!1})," deleted")),[3,4];case 3:return s=o.sent(),c="Internal Error: ".concat(r.name({start:!0,plural:!1})," could not be deleted"),console.error(c,s),f.Am.error(c),[3,4];case 4:return[2]}})})).apply(this,arguments)}var v=t(34226),y=t(98898),x=t(83399),b=t(90374),j=function(e){var n,t=e.customType,s=e.format,c=e.onClose,f=e.onDeleteCustomTypeSuccess,p=m.$[s],j=(0,a.useState)(!1),g=j[0],Z=j[1],_=(0,b.Z)().deleteCustomTypeSuccess,I=(n=(0,r.Z)(function(){return(0,o.__generator)(this,function(e){switch(e.label){case 0:return Z(!0),[4,function(e){return h.apply(this,arguments)}({customType:t,onSuccess:function(){return _(t.id)}})];case 1:return e.sent(),f(),[2]}})}),function(){return n.apply(this,arguments)}),T=(0,l.B7)().theme;return(0,i.jsx)(x.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:function(){return c()},children:(0,i.jsx)(y.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(){var e;return(0,i.jsxs)(d.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.jsxs)(d.kC,{sx:{alignItems:"center"},children:[(0,i.jsx)(u.$vK,{size:20,color:null===(e=T.colors)||void 0===e?void 0:e.greyIcon}),(0,i.jsxs)(d.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:["Delete"," ",p.name({start:!1,plural:!1})]})]}),(0,i.jsx)(d.x8,{type:"button",onClick:function(){return c()}})]})},Footer:function(){return(0,i.jsxs)(d.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)(v.z,{label:"Cancel",variant:"secondary",onClick:function(){return c()},sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),void 0!==t&&(0,i.jsx)(v.z,{label:"Delete",variant:"danger",isLoading:g,onClick:function(){I()},sx:{minHeight:39,minWidth:78}})]})},children:(0,i.jsxs)("div",{children:["This action will immediately make the following change:",(0,i.jsx)("ul",{children:(0,i.jsxs)("li",{children:["Delete the"," ",(0,i.jsxs)(d.xv,{sx:{fontWeight:"bold"},children:["customtypes/",null==t?void 0:t.id,"/"]})," ","directory."]})}),"The next time you push your changes to Prismic, the following change will happen:",(0,i.jsx)("ul",{children:(0,i.jsxs)("li",{children:["Remove the"," ",p.name({start:!1,plural:!1})," and any associated Documents from your repository."]})})]})})})},g=t(62230),Z=t(85244),_=t(56580);function I(){return(I=(0,r.Z)(function(e){var n,t,r,i,s,c,a,u;return(0,o.__generator)(this,function(o){switch(o.label){case 0:n=e.model,t=e.newLabel,r=e.onSuccess,i=m.$[n.format],o.label=1;case 1:return o.trys.push([1,3,,4]),s=(0,Z.Z)((0,g.Z)({},n),{label:t}),[4,p.j.customTypes.renameCustomType({model:s})];case 2:if((c=o.sent().errors).length>0)throw c;return r(s),f.Am.success("".concat(i.name({start:!0,plural:!1})," renamed")),[3,4];case 3:return a=o.sent(),u="Internal Error: ".concat(i.name({start:!0,plural:!1})," could not be renamed"),console.error(u,a),f.Am.error(u),[3,4];case 4:return[2]}})})).apply(this,arguments)}var T=t(50950),S=t(28849),C=t(6134),k=t(36960),w=function(e){var n,t,s,c=e.isChangesLocal,u=e.customType,l=e.format,f=e.onClose,p=e.setLocalCustomType,h=null!==(n=null==u?void 0:u.label)&&void 0!==n?n:"",v=null!==(t=null==u?void 0:u.id)&&void 0!==t?t:"",y=(0,b.Z)().renameCustomTypeSuccess,x=(0,T.g)().syncChanges,j=(0,a.useState)(!1),w=j[0],F=j[1],z=(s=(0,r.Z)(function(e){return(0,o.__generator)(this,function(n){switch(n.label){case 0:if(F(!0),!(c&&p))return[3,1];return p((0,Z.Z)((0,g.Z)({},u),{label:e.customTypeName})),[3,3];case 1:return[4,function(e){return I.apply(this,arguments)}({model:u,newLabel:e.customTypeName,onSuccess:function(e){y(e),x()}})];case 2:n.sent(),n.label=3;case 3:return F(!1),f(),[2]}})}),function(e){return s.apply(this,arguments)}),O=(0,_.v9)(function(e){return{customTypeLabels:(0,S.YS)(e)}}).customTypeLabels,L=m.$[l];return(0,i.jsx)(C.Z,{isOpen:!0,testId:"rename-custom-type-modal",widthInPx:"530px",formId:"rename-custom-type-modal-".concat(v),buttonLabel:"Rename",close:f,onSubmit:function(e){z(e)},initialValues:{customTypeName:h},isLoading:w,content:{title:"Rename a ".concat(L.name({start:!1,plural:!1}))},validate:function(e){var n=e.customTypeName,t={};return n&&n.length||(t.customTypeName="Cannot be empty."),void 0!=t.customTypeName&&O.includes(n)&&h!==n&&(t.customTypeName="".concat(L.name({start:!0,plural:!1})," name is already taken.")),Object.keys(t).length>0?t:void 0},children:function(e){var n=e.errors;return(0,i.jsx)(d.xu,{children:(0,i.jsx)(k.W,{name:"customTypeName",label:"".concat(L.name({start:!0,plural:!1})," Name"),placeholder:"A display name for the ".concat(L.name({start:!1,plural:!1})),error:n.customTypeName,testId:"custom-type-name-input"})})}})},F=t(82770),z=t(91061);function O(){return(O=(0,r.Z)(function(e,n){var t,r,i,s,c;return(0,o.__generator)(this,function(o){switch(o.label){case 0:t=m.$[e.format],o.label=1;case 1:return o.trys.push([1,3,,4]),r=(0,z.mf)(e),[4,(0,F.KA)(r)];case 2:if((i=o.sent().errors).length>0)throw i;return n(r),f.Am.success("".concat(t.name({start:!0,plural:!1})," converted to page type")),[3,4];case 3:return s=o.sent(),c="Internal Error: ".concat(t.name({start:!0,plural:!1})," not converted to page type"),console.error(c,s),f.Am.error(c),[3,4];case 4:return[2]}})})).apply(this,arguments)}var L=t(67445),N=function(e){var n,t=e.format,u=e.customType,l=e.isChangesLocal,d=e.setLocalCustomType,f=(0,c.useRouter)(),p=(0,b.Z)().saveCustomTypeSuccess,m=(0,a.useState)(!1),h=m[0],v=m[1],y=(0,a.useState)(!1),x=y[0],g=y[1],Z=(0,a.useState)(!1),_=Z[0],I=Z[1],T=(n=(0,r.Z)(function(){var e,n;return(0,o.__generator)(this,function(t){switch(t.label){case 0:return I(!0),[4,function(e,n){return O.apply(this,arguments)}(u,p)];case 1:return t.sent(),e=L.cd.custom.getBuilderPagePathname(u.id),f.asPath===e&&(n=L.cd.page.getBuilderPagePathname(u.id),f.replace(n)),I(!1),[2]}})}),function(){return n.apply(this,arguments)}),S=function(){var e,n=L.cd[null!==(e=u.format)&&void 0!==e?e:"custom"].tablePagePathname;f.asPath!==n?f.replace(n):v(!1)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.h_,{modal:!0,children:[(0,i.jsx)(s.$F,{disabled:_,children:(0,i.jsx)(s.hU,{color:"grey","data-testid":"editDropdown",hiddenLabel:"Custom type actions",icon:"moreVert",loading:_,variant:"solid"})}),(0,i.jsxs)(s.AW,{align:"end",children:[(0,i.jsx)(s.Xi,{startIcon:(0,i.jsx)(s.I5,{name:"edit"}),onSelect:function(){g(!0)},children:"Rename"}),"custom"===t&&!l&&(0,i.jsx)(s.Xi,{startIcon:(0,i.jsx)(s.I5,{name:"driveFileMove"}),onSelect:function(){T()},children:"Convert to page type"}),(0,i.jsx)(s.Xi,{color:"tomato",startIcon:(0,i.jsx)(s.I5,{name:"delete"}),onSelect:function(){v(!0)},children:"Remove"})]})]}),h?(0,i.jsx)(j,{format:t,customType:u,onClose:function(){return v(!1)},onDeleteCustomTypeSuccess:S}):null,x?(0,i.jsx)(w,{format:t,customType:u,isChangesLocal:l,onClose:function(){return g(!1)},setLocalCustomType:d}):null]})}},34226:function(e,n,t){"use strict";t.d(n,{z:function(){return d}});var r=t(62230),o=t(85244),i=t(98240),s=t(52322),c=t(2784),a=t(75289),u=function(e,n){return e?"".concat(e,"-").concat(n):""},l=function(e){switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},d=(0,c.forwardRef)(function(e,n){var t=e.label,c=e.Icon,d=e.type,f=e.form,p=e.isLoading,m=void 0!==p&&p,h=e.disabled,v=e.onClick,y=e.sx,x=e.iconSize,b=void 0===x?16:x,j=e.iconFill,g=e.variant,Z=void 0===g?"primary":g,_=(0,i.Z)(e,["label","Icon","type","form","isLoading","disabled","onClick","sx","iconSize","iconFill","variant"]);return(0,s.jsx)(a.zx,(0,o.Z)((0,r.Z)({ref:n,sx:(0,r.Z)((0,o.Z)((0,r.Z)({},void 0===y?{}:y),{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"}),m?{cursor:"wait !important"}:{}),type:d,form:f,disabled:void 0!==h&&h||m,onClick:m?void 0:v,variant:Z},_),{children:m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.$j,{size:b,color:l(Z),"data-testid":u(_["data-testid"],"spinner")}),c&&t]}):(0,s.jsxs)(s.Fragment,{children:[c&&(0,s.jsx)(c,{size:b,fill:j,"data-testid":u(_["data-testid"],"icon")}),t]})}))})},36960:function(e,n,t){"use strict";t.d(n,{W:function(){return c}});var r=t(62230),o=t(52322),i=t(63397);t(2784);var s=t(75289),c=function(e){var n=e.name,t=e.label,c=e.placeholder,a=e.error,u=e.testId,l=e.onChange;return(0,o.jsxs)(s.xu,{mb:3,children:[(0,o.jsx)(s.__,{htmlFor:n,mb:2,children:t}),(0,o.jsx)(i.gN,(0,r.Z)({name:n,type:"text",placeholder:c,as:s.II,autoComplete:"off"},l?{onChange:l}:null,u?{"data-testid":u}:null)),a?(0,o.jsx)(s.xv,{"data-testid":u?"".concat(u,"-error"):"input-error",sx:{color:"error",mt:1},children:a}):null]})}},6134:function(e,n,t){"use strict";var r=t(62230),o=t(85244),i=t(52322),s=t(63397),c=t(37149),a=t.n(c),u=t(75289),l=t(34226),d=t(83399),f=t(98898);n.Z=function(e){var n=e.children,t=e.close,c=e.isOpen,p=e.formId,m=e.validate,h=e.onSubmit,v=e.widthInPx,y=e.initialValues,x=e.content.title,b=e.cardProps,j=e.omitFooter,g=void 0!==j&&j,Z=e.isLoading,_=void 0!==Z&&Z,I=e.buttonLabel,T=void 0===I?"Save":I,S=e.testId,C=e.actionMessage;return a().setAppElement("#__next"),(0,i.jsx)(d.Z,{isOpen:c,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:x,style:{content:{width:null!=v?v:"900px"}},children:(0,i.jsx)(s.J9,{initialValues:y,validate:function(e){return m?m(e):void 0},onSubmit:function(e){h(e)},children:function(e){var c=e.isValid,a=e.isSubmitting,d=e.values,m=e.errors,h=e.touched,v=e.setFieldValue,y=e.setValues;return(0,i.jsx)(s.l0,(0,o.Z)((0,r.Z)({id:p},null!=S?{"data-testid":S}:null),{children:(0,i.jsx)(f.Z,(0,o.Z)((0,r.Z)({borderFooter:!0,footerSx:{p:3,position:"sticky",bottom:0,background:"gray"},bodySx:{px:4,py:4},sx:{border:"none"}},b),{Header:function(e){var n=e.radius;return(0,i.jsxs)(u.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:function(e){var n;return"1px solid ".concat(null===(n=e.colors)||void 0===n?void 0:n.borders)}},children:[(0,i.jsx)(u.X6,{sx:{fontSize:"20px"},children:x}),(0,i.jsx)(u.x8,{type:"button",onClick:t})]})},Footer:g?null:(0,i.jsxs)(u.kC,{sx:{alignItems:"space-between"},children:[(0,i.jsx)(u.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof C?C(e):C}),(0,i.jsxs)(u.kC,{sx:{ml:"auto"},children:[(0,i.jsx)(u.zx,{mr:2,type:"button",onClick:t,variant:"secondary",disabled:a||_,children:"Cancel"}),(0,i.jsx)(l.z,{label:T,form:p,type:"submit",disabled:!c||a||_,isLoading:a||_,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:n({isValid:c,isSubmitting:a,values:d,errors:m,touched:h,setFieldValue:v,setValues:y})}))}))}})})}},69143:function(){}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[614],{24804:function(e,n,t){"use strict";t.d(n,{Zb:function(){return b},T$:function(){return p},eW:function(){return x},ZB:function(){return _},Lm:function(){return g}});var o=t(67557),i=t(62230),r=t(85244),c=t(98240),d=t(52322),s=t(50002),a=t(22715),l=t(6277),u=t(2784);t(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"},f={solid:"kedahr4 _1ecs97d1u _1ecs97d97 _1ecs97d4pe _1ecs97d4wr",outlined:"kedahr5 _1ecs97d18 _1ecs97d8l _1ecs97d4o6 _1ecs97d4vj"},b=function(e){var n,t=e.checked,a=e.size,v=e.variant,b=void 0===v?"solid":v,_=(e.interactive,e.disabled,e.onClick,e.href,e.component),p=void 0===_?"a":_,x=(e.replace,(0,c.Z)(e,["checked","size","variant","interactive","disabled","onClick","href","component","replace"])),g=(0,r.Z)((0,i.Z)({},x),{className:(0,l.W)("_1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97d3fg _1ecs97d3mt _1ecs97df0r _1ecs97df23 _1ecs97df2h _1ecs97dez1 _1ecs97dezr _1ecs97dezv",m[void 0===a?"medium":a],f[b],(n={},(0,o.Z)(n,"kedahr6",e.interactive),(0,o.Z)(n,h[b],e.interactive),n)),"data-state":!0===(void 0!==t&&t)?"checked":void 0});return!0===e.interactive&&void 0===e.href?(0,d.jsx)("div",(0,r.Z)((0,i.Z)({},g),{"data-disabled":!0===e.disabled?"":void 0,onClick:function(n){if(!0!==e.disabled&&void 0!==e.onClick){var t=n.target;(0,s.JY)(t)===n.currentTarget&&e.onClick(n)}},tabIndex:!0===e.disabled?void 0:0})):!0===e.interactive?(0,u.createElement)(p,(0,i.Z)((0,r.Z)((0,i.Z)({},g),{href:e.href,onClick:function(e){var n=e.target;(0,s.JY)(n)!==e.currentTarget&&e.preventDefault()}}),"a"===p?{}:{replace:e.replace})):(0,d.jsx)("div",(0,i.Z)({},g))},_=function(e){var n=e.className,t=e.component,o=void 0===t?"img":t,s=e.overlay,a=(0,c.Z)(e,["className","component","overlay"]);return(0,d.jsxs)("div",{className:"kedahr7 _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97deze _1ecs97dezd _1ecs97df7d _1ecs97dezv",children:[(0,u.createElement)(o,(0,r.Z)((0,i.Z)({},a),{className:(0,l.W)(v[o],n)})),Boolean(s)?(0,d.jsx)("div",{className:"kedahra _1ecs97dez0 _1ecs97dez3 _1ecs97df9d _1ecs97dezt _1ecs97df0i",children:s}):void 0]})},p=function(e){return(0,d.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"kedahrc kedahrb _1ecs97dez0 _1ecs97dez2 _1ecs97dez8 _1ecs97dez1 _1ecs97dezc _1ecs97df71 _1ecs97dezi"}))},x=function(e){var n=e.action,t=e.subtitle,o=e.title,s=(0,c.Z)(e,["action","subtitle","title"]);return(0,d.jsxs)("div",(0,r.Z)((0,i.Z)({},s),{className:"kedahrd kedahrb _1ecs97dez0 _1ecs97dez2 _1ecs97dez8 _1ecs97dez1 _1ecs97dezc _1ecs97df92 _1ecs97df73",children:[(0,d.jsxs)("div",{className:"kedahre _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97deze _1ecs97dezd _1ecs97df51",children:[(0,d.jsx)(a.xv,{component:"span",noWrap:!0,variant:"bold",children:o}),(0,d.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"small",children:t})]}),n]}))},g=function(e){var n=e.children,t=(0,c.Z)(e,["children"]);return(0,d.jsx)("div",(0,r.Z)((0,i.Z)({},t),{className:"kedahrf _1ecs97dez0 _1ecs97dez2 _1ecs97dezb _1ecs97df6v _1ecs97dfb5 _1ecs97dezh _1ecs97dfhi _1ecs97dezt",children:(0,d.jsx)(a.xv,{align:"center",color:"inherit",component:"span",noWrap:!0,variant:"smallBold",children:n})}))}},34728:function(e,n,t){"use strict";t.d(n,{O:function(){return d}});var o=t(52322),i=t(22715),r=t(94007),c=t(79096),d=function(e){var n=function(e){var n=s[e.modelType];switch(e.modelStatus){case r.GJ.New:return{badgeColor:"green",badgeTitle:"New",tooltipContent:"This ".concat(n," exists only locally. Upon sync, it will be pushed to your remote repository.")};case r.GJ.Modified:return{badgeColor:"amber",badgeTitle:"Modified",tooltipContent:"This ".concat(n," has been modified locally. Upon sync, changes will be pushed to your remote repository.")};case r.GJ.Synced:return{badgeColor:"purple",badgeTitle:"Synced",tooltipContent:"This ".concat(n," is in sync with the remote repository.")};case r.GJ.Deleted:return{badgeColor:"tomato",badgeTitle:"Deleted",tooltipContent:"This ".concat(n," has been deleted locally.")};case r.GJ.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===c.t.UNAUTHORIZED)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (not connected to Prismic)."};if(e.authStatus===c.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),t=n.badgeColor,d=n.badgeTitle,a=n.tooltipContent;return(0,o.jsx)(i.u,{content:a,side:"bottom",children:(0,o.jsx)(i.Ct,{color:t,title:d})})},s={CustomType:"type",Slice:"slice"}},56319:function(e,n,t){"use strict";t.d(n,{b:function(){return _}});var o=t(62230),i=t(85244),r=t(52322),c=t(22715),d=t(39097),s=t.n(d),a=t(24804),l=t(5479),u=t(34728),h=t(49451),v=function(e){return(0,r.jsx)("svg",(0,i.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,r.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"})}))},m=t(67557),f=t(17064),b={build:function(e){var n;return(0,i.Z)((0,o.Z)({},e),{screenshots:(n=e.screenshots)?Object.entries(n).reduce(function(e,n){var t,r=(0,f.Z)(n,2),c=r[0],d=r[1];return d.hash?(0,i.Z)((0,o.Z)({},e),(0,m.Z)({},c,(0,o.Z)({},d,{hash:d.hash}))):e},{}):{}})},variation:function(e,n){if(e.model.variations.length)return n?e.model.variations.find(function(e){return e.id===n}):e.model.variations[0]}},_=function(e){var n,t=e.action,d=e.isComingSoon,m=void 0!==d&&d,f=e.isDeleted,_=e.onUpdateScreenshot,g=e.selected,C=void 0!==g&&g,j=e.slice,Z=e.variant,k=e.variationId,y=b.variation(j,k);if(!y)return null;var z=(0,l.d7)(j,y),S=m||void 0!==f&&f,w=!S&&!!_,T="outlined"===Z,N=void 0!==k;return n="selection"===e.mode?{disabled:S,interactive:!0,onClick:function(){e.onSelectedChange(!C)}}:S?{interactive:!1}:{component:s(),href:h.Y.getBuilderPagePathname({libraryName:j.href,sliceName:j.model.name,variationId:y.id}),interactive:!0,replace:e.replace},(0,r.jsxs)(a.Zb,(0,i.Z)((0,o.Z)({"aria-label":"".concat(j.model.name," ").concat(y.name," slice card"),checked:C,"data-testid":"shared-slice-card"},n,"outlined"===Z?{size:"small",variant:"outlined"}:{}),{children:[void 0!==z?(0,r.jsx)(a.ZB,{alt:"Preview image",overlay:w&&!T?(0,r.jsx)(c.xu,{alignItems:"center",justifyContent:"center",children:(0,r.jsx)(p,{onClick:_})}):void 0,src:z}):(0,r.jsx)(a.ZB,{component:"div",children:(0,r.jsxs)(c.xu,{alignItems:"center",flexDirection:"column",gap:8,justifyContent:"center",children:[(0,r.jsx)(c.xv,{color:"grey11",component:"span",children:"No screenshot available"}),w&&!T?(0,r.jsx)(p,{onClick:_}):void 0]})}),(0,r.jsx)(a.eW,{action:"checkbox"===t.type&&"selection"===e.mode?(0,r.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:(0,r.jsx)(c.XZ,{checked:C,disabled:S,onCheckedChange:e.onSelectedChange})}):"menu"===t.type?(0,r.jsxs)(c.h_,{modal:!0,children:[(0,r.jsx)(c.$F,{disabled:S,children:(0,r.jsx)(c.hU,{hiddenLabel:"Slice actions",icon:"moreVert"})}),(0,r.jsxs)(c.AW,{align:"end","data-testid":"slice-action-icon-dropdown",children:[w&&T?(0,r.jsx)(c.Xi,{onSelect:_,startIcon:(0,r.jsx)(v,{}),children:"Update screenshot"}):void 0,(0,r.jsx)(c.Xi,{onSelect:t.onRename,startIcon:(0,r.jsx)(c.I5,{name:"edit"}),children:"Rename"}),!0===t.removeDisabled&&N?(0,r.jsx)(c.u,{content:"The slice needs to have at least one variation.",side:"bottom",stableMount:!0,children:(0,r.jsx)(x,{disabled:!0,onSelect:t.onRemove})}):(0,r.jsx)(x,{disabled:!0===t.removeDisabled,onSelect:t.onRemove})]})]}):"remove"===t.type?(0,r.jsx)(c.hU,{icon:"close",onClick:function(){return!S&&t.onRemove()},hiddenLabel:"Remove slice"}):"status"===t.type?(0,r.jsx)(u.O,{authStatus:t.authStatus,isOnline:t.isOnline,modelStatus:t.modelStatus,modelType:"Slice"}):void 0,subtitle:(0,r.jsxs)(r.Fragment,{children:[N?y.id:"".concat(j.model.variations.length," variation").concat(j.model.variations.length>1?"s":""),m?(0,r.jsxs)(c.xv,{color:"purple11",component:"span",variant:"small",children:[" ","• (coming soon)"]}):void 0]}),title:N?y.name:j.model.name}),w&&!N&&(0,l.cx)(j)>0?(0,r.jsx)(a.Lm,{children:"Missing screenshot"}):void 0]}))},p=function(e){return(0,r.jsx)(c.zx,{onClick:e.onClick,renderStartIcon:function(){return(0,r.jsx)(v,{color:c.TV.color.greyLight11})},color:"grey",children:"Update screenshot"})},x=function(e){return(0,r.jsx)(c.Xi,(0,i.Z)((0,o.Z)({},e),{color:"tomato",startIcon:(0,r.jsx)(c.I5,{name:"delete"}),children:"Delete"}))}},49451:function(e,n,t){"use strict";t.d(n,{Y:function(){return o}});var o={getBuilderPagePathname:function(e){return"/slices/".concat(e.libraryName.replaceAll("/","--"),"/").concat(e.sliceName,"/").concat(e.variationId)}}},98898:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var o=t(62230),i=t(85244),r=t(98240),c=t(52322);t(2784);var d=t(75289),s=function(e){var n=e.bg,t=e.background,i=e.sx,r=e.withRadius,s=e.radius,a=e.children;return(0,c.jsx)(d.xu,{sx:(0,o.Z)({p:4,bg:n||t},r?{borderBottomLeftRadius:s,borderBottomRightRadius:s}:null,i),children:a})},a=function(e){var n=e.Header,t=void 0===n?null:n,a=e.SubHeader,l=void 0===a?null:a,u=e.Body,h=void 0===u?null:u,v=e.Footer,m=void 0===v?null:v,f=e.borderFooter,b=e.radius,_=void 0===b?"6px":b,p=e.bodySx,x=e.footerSx,g=e.sx,C=e.bg,j=e.background,Z=e.children,k=(0,r.Z)(e,["Header","SubHeader","Body","Footer","borderFooter","radius","bodySx","footerSx","sx","bg","background","children"]);return(0,c.jsxs)(d.Zb,(0,i.Z)((0,o.Z)({sx:(0,o.Z)({border:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))},borderRadius:_},void 0===g?null:g)},k),{children:[t?(0,c.jsx)(t,{radius:_}):null,l?(0,c.jsx)(l,{radius:_}):null,(0,c.jsxs)(s,{bg:C,background:j,sx:void 0===p?{}:p,withRadius:!m,children:[h?(0,c.jsx)(h,{}):null,Z||null]}),m?(0,c.jsx)(s,{bg:C,background:j,sx:(0,o.Z)({},void 0!==f&&f?{borderTop:function(e){var n=e.colors;return"1px solid ".concat(String(null==n?void 0:n.borders))}}:null,void 0===x?{}:x),radius:_,withRadius:!0,children:"object"==typeof m?m:(0,c.jsx)(m,{})}):null]}))}},63094:function(e,n,t){"use strict";t.d(n,{Sn:function(){return d},lS:function(){return o},nG:function(){return i},pq:function(){return s},rd:function(){return c},xo:function(){return r}});var o=["components"],i=["png","jpg","jpeg"],r=/^[A-Za-z0-9]+(?:_[A-Za-z0-9]+)*$/,c="placeholders/What_are_Slices_mrvome",d="SM_HELP_VIDEOS/mock_data",s="slice-machine-simulator"},71457:function(){}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[614],{24804:function(e,n,t){"use strict";t.d(n,{Zb:function(){return b},T$:function(){return p},eW:function(){return g},ZB:function(){return _},Lm:function(){return x}});var o=t(67557),i=t(62230),r=t(85244),c=t(98240),d=t(52322),s=t(50002),a=t(22715),l=t(6277),u=t(2784);t(88268);var f={solid:"_1ecs97d3c _1ecs97dap _1ecs97d4ug _1ecs97d51t",outlined:"_1ecs97d2i _1ecs97d9v _1ecs97dw _1ecs97d89 _1ecs97d2w _1ecs97da9 _1ecs97d4tm _1ecs97d50z _1ecs97d4t8 _1ecs97d50l"},h={div:"_1ecs97dffi _1ecs97dffl _1ecs97dffv",img:"kedahr9 _1ecs97dfnq _1ecs97dfg5"},v={small:"kedahr2",medium:"kedahr3"},m={solid:"kedahr4 _1ecs97d1u _1ecs97d97 _1ecs97d4ua _1ecs97d51n",outlined:"kedahr5 _1ecs97d18 _1ecs97d8l _1ecs97d4t2 _1ecs97d50f"},b=function(e){var n,t=e.checked,a=e.size,h=e.variant,b=void 0===h?"solid":h,_=(e.interactive,e.disabled,e.onClick,e.href,e.component),p=void 0===_?"a":_,g=(e.replace,(0,c.Z)(e,["checked","size","variant","interactive","disabled","onClick","href","component","replace"])),x=(0,r.Z)((0,i.Z)({},g),{className:(0,l.W)("_1ecs97dffi _1ecs97dffk _1ecs97dfft _1ecs97d3j4 _1ecs97d3qh _1ecs97dfh9 _1ecs97dfil _1ecs97dfiz _1ecs97dffj _1ecs97dfg9 _1ecs97dfgd",v[void 0===a?"medium":a],m[b],(n={},(0,o.Z)(n,"kedahr6",e.interactive),(0,o.Z)(n,f[b],e.interactive),n)),"data-state":!0===(void 0!==t&&t)?"checked":void 0});return!0===e.interactive&&void 0===e.href?(0,d.jsx)("div",(0,r.Z)((0,i.Z)({},x),{"data-disabled":!0===e.disabled?"":void 0,onClick:function(n){if(!0!==e.disabled&&void 0!==e.onClick){var t=n.target;(0,s.JY)(t)===n.currentTarget&&e.onClick(n)}},tabIndex:!0===e.disabled?void 0:0})):!0===e.interactive?(0,u.createElement)(p,(0,i.Z)((0,r.Z)((0,i.Z)({},x),{href:e.href,onClick:function(e){var n=e.target;(0,s.JY)(n)!==e.currentTarget&&e.preventDefault()}}),"a"===p?{}:{replace:e.replace})):(0,d.jsx)("div",(0,i.Z)({},x))},_=function(e){var n=e.className,t=e.component,o=void 0===t?"img":t,s=e.overlay,a=(0,c.Z)(e,["className","component","overlay"]);return(0,d.jsxs)("div",{className:"kedahr7 _1ecs97dffi _1ecs97dffk _1ecs97dfft _1ecs97dffw _1ecs97dffv _1ecs97dfnw _1ecs97dfgd",children:[(0,u.createElement)(o,(0,r.Z)((0,i.Z)({},a),{className:(0,l.W)(h[o],n)})),Boolean(s)?(0,d.jsx)("div",{className:"kedahra _1ecs97dffi _1ecs97dffl _1ecs97dfpw _1ecs97dfgb _1ecs97dfh0",children:s}):void 0]})},p=function(e){return(0,d.jsx)("div",(0,r.Z)((0,i.Z)({},e),{className:"kedahrc kedahrb _1ecs97dffi _1ecs97dffk _1ecs97dffq _1ecs97dffj _1ecs97dffu _1ecs97dfnk _1ecs97dfg0"}))},g=function(e){var n=e.action,t=e.subtitle,o=e.title,s=(0,c.Z)(e,["action","subtitle","title"]);return(0,d.jsxs)("div",(0,r.Z)((0,i.Z)({},s),{className:"kedahrd kedahrb _1ecs97dffi _1ecs97dffk _1ecs97dffq _1ecs97dffj _1ecs97dffu _1ecs97dfpl _1ecs97dfnm",children:[(0,d.jsxs)("div",{className:"kedahre _1ecs97dffi _1ecs97dffk _1ecs97dfft _1ecs97dffw _1ecs97dffv _1ecs97dflk",children:[(0,d.jsx)(a.xv,{component:"span",noWrap:!0,variant:"bold",children:o}),(0,d.jsx)(a.xv,{color:"grey11",component:"span",noWrap:!0,variant:"small",children:t})]}),n]}))},x=function(e){var n=e.children,t=(0,c.Z)(e,["children"]);return(0,d.jsx)("div",(0,r.Z)((0,i.Z)({},t),{className:"kedahrf _1ecs97dffi _1ecs97dffk _1ecs97dfft _1ecs97dfne _1ecs97dfro _1ecs97dffz _1ecs97dfy1 _1ecs97dfgb",children:(0,d.jsx)(a.xv,{align:"center",color:"inherit",component:"span",noWrap:!0,variant:"smallBold",children:n})}))}},34728:function(e,n,t){"use strict";t.d(n,{O:function(){return d}});var o=t(52322),i=t(22715),r=t(94007),c=t(79096),d=function(e){var n=function(e){var n=s[e.modelType];switch(e.modelStatus){case r.GJ.New:return{badgeColor:"green",badgeTitle:"New",tooltipContent:"This ".concat(n," exists only locally. Upon sync, it will be pushed to your remote repository.")};case r.GJ.Modified:return{badgeColor:"amber",badgeTitle:"Modified",tooltipContent:"This ".concat(n," has been modified locally. Upon sync, changes will be pushed to your remote repository.")};case r.GJ.Synced:return{badgeColor:"purple",badgeTitle:"Synced",tooltipContent:"This ".concat(n," is in sync with the remote repository.")};case r.GJ.Deleted:return{badgeColor:"tomato",badgeTitle:"Deleted",tooltipContent:"This ".concat(n," has been deleted locally.")};case r.GJ.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===c.t.UNAUTHORIZED)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (not connected to Prismic)."};if(e.authStatus===c.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),t=n.badgeColor,d=n.badgeTitle,a=n.tooltipContent;return(0,o.jsx)(i.u,{content:a,side:"bottom",children:(0,o.jsx)(i.Ct,{color:t,title:d})})},s={CustomType:"type",Slice:"slice"}},56319:function(e,n,t){"use strict";t.d(n,{b:function(){return _}});var o=t(62230),i=t(85244),r=t(52322),c=t(22715),d=t(39097),s=t.n(d),a=t(24804),l=t(5479),u=t(34728),f=t(49451),h=function(e){return(0,r.jsx)("svg",(0,i.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,r.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"})}))},v=t(67557),m=t(17064),b={build:function(e){var n;return(0,i.Z)((0,o.Z)({},e),{screenshots:(n=e.screenshots)?Object.entries(n).reduce(function(e,n){var t,r=(0,m.Z)(n,2),c=r[0],d=r[1];return d.hash?(0,i.Z)((0,o.Z)({},e),(0,v.Z)({},c,(0,o.Z)({},d,{hash:d.hash}))):e},{}):{}})},variation:function(e,n){if(e.model.variations.length)return n?e.model.variations.find(function(e){return e.id===n}):e.model.variations[0]}},_=function(e){var n,t=e.action,d=e.isComingSoon,v=void 0!==d&&d,m=e.isDeleted,_=e.onUpdateScreenshot,x=e.selected,C=void 0!==x&&x,j=e.slice,k=e.variant,Z=e.variationId,y=b.variation(j,Z);if(!y)return null;var S=(0,l.d7)(j,y),w=v||void 0!==m&&m,T=!w&&!!_,N="outlined"===k,R=void 0!==Z;return n="selection"===e.mode?{disabled:w,interactive:!0,onClick:function(){e.onSelectedChange(!C)}}:w?{interactive:!1}:{component:s(),href:f.Y.getBuilderPagePathname({libraryName:j.href,sliceName:j.model.name,variationId:y.id}),interactive:!0,replace:e.replace},(0,r.jsxs)(a.Zb,(0,i.Z)((0,o.Z)({"aria-label":"".concat(j.model.name," ").concat(y.name," slice card"),checked:C,"data-testid":"shared-slice-card"},n,"outlined"===k?{size:"small",variant:"outlined"}:{}),{children:[void 0!==S?(0,r.jsx)(a.ZB,{alt:"Preview image",overlay:T&&!N?(0,r.jsx)(c.xu,{alignItems:"center",justifyContent:"center",children:(0,r.jsx)(p,{onClick:_})}):void 0,src:S}):(0,r.jsx)(a.ZB,{component:"div",children:(0,r.jsxs)(c.xu,{alignItems:"center",flexDirection:"column",gap:8,justifyContent:"center",children:[(0,r.jsx)(c.xv,{color:"grey11",component:"span",children:"No screenshot available"}),T&&!N?(0,r.jsx)(p,{onClick:_}):void 0]})}),(0,r.jsx)(a.eW,{action:"checkbox"===t.type&&"selection"===e.mode?(0,r.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:(0,r.jsx)(c.XZ,{checked:C,disabled:w,onCheckedChange:e.onSelectedChange})}):"menu"===t.type?(0,r.jsxs)(c.h_,{modal:!0,children:[(0,r.jsx)(c.$F,{disabled:w,children:(0,r.jsx)(c.hU,{hiddenLabel:"Slice actions",icon:"moreVert"})}),(0,r.jsxs)(c.AW,{align:"end","data-testid":"slice-action-icon-dropdown",children:[T&&N?(0,r.jsx)(c.Xi,{onSelect:_,startIcon:(0,r.jsx)(h,{}),children:"Update screenshot"}):void 0,(0,r.jsx)(c.Xi,{onSelect:t.onRename,startIcon:(0,r.jsx)(c.I5,{name:"edit"}),children:"Rename"}),!0===t.removeDisabled&&R?(0,r.jsx)(c.u,{content:"The slice needs to have at least one variation.",side:"bottom",stableMount:!0,children:(0,r.jsx)(g,{disabled:!0,onSelect:t.onRemove})}):(0,r.jsx)(g,{disabled:!0===t.removeDisabled,onSelect:t.onRemove})]})]}):"remove"===t.type?(0,r.jsx)(c.hU,{icon:"close",onClick:function(){return!w&&t.onRemove()},hiddenLabel:"Remove slice"}):"status"===t.type?(0,r.jsx)(u.O,{authStatus:t.authStatus,isOnline:t.isOnline,modelStatus:t.modelStatus,modelType:"Slice"}):void 0,subtitle:(0,r.jsxs)(r.Fragment,{children:[R?y.id:"".concat(j.model.variations.length," variation").concat(j.model.variations.length>1?"s":""),v?(0,r.jsxs)(c.xv,{color:"purple11",component:"span",variant:"small",children:[" ","• (coming soon)"]}):void 0]}),title:R?y.name:j.model.name}),T&&!R&&(0,l.cx)(j)>0?(0,r.jsx)(a.Lm,{children:"Missing screenshot"}):void 0]}))},p=function(e){return(0,r.jsx)(c.zx,{onClick:e.onClick,renderStartIcon:function(){return(0,r.jsx)(h,{color:c.TV.color.greyLight11})},color:"grey",children:"Update screenshot"})},g=function(e){return(0,r.jsx)(c.Xi,(0,i.Z)((0,o.Z)({},e),{color:"tomato",startIcon:(0,r.jsx)(c.I5,{name:"delete"}),children:"Delete"}))}},49451:function(e,n,t){"use strict";t.d(n,{Y:function(){return o}});var o={getBuilderPagePathname:function(e){return"/slices/".concat(e.libraryName.replaceAll("/","--"),"/").concat(e.sliceName,"/").concat(e.variationId)}}},98898:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var o=t(62230),i=t(85244),r=t(98240),c=t(52322);t(2784);var d=t(75289),s=function(e){var n=e.bg,t=e.background,i=e.sx,r=e.withRadius,s=e.radius,a=e.children;return(0,c.jsx)(d.xu,{sx:(0,o.Z)({p:4,bg:n||t},r?{borderBottomLeftRadius:s,borderBottomRightRadius:s}:null,i),children:a})},a=function(e){var n=e.Header,t=void 0===n?null:n,a=e.SubHeader,l=void 0===a?null:a,u=e.Body,f=void 0===u?null:u,h=e.Footer,v=void 0===h?null:h,m=e.borderFooter,b=e.radius,_=void 0===b?"6px":b,p=e.bodySx,g=e.footerSx,x=e.sx,C=e.bg,j=e.background,k=e.children,Z=(0,r.Z)(e,["Header","SubHeader","Body","Footer","borderFooter","radius","bodySx","footerSx","sx","bg","background","children"]);return(0,c.jsxs)(d.Zb,(0,i.Z)((0,o.Z)({sx:(0,o.Z)({border:function(e){var n;return"1px solid ".concat(String(null===(n=e.colors)||void 0===n?void 0:n.borders))},borderRadius:_},void 0===x?null:x)},Z),{children:[t?(0,c.jsx)(t,{radius:_}):null,l?(0,c.jsx)(l,{radius:_}):null,(0,c.jsxs)(s,{bg:C,background:j,sx:void 0===p?{}:p,withRadius:!v,children:[f?(0,c.jsx)(f,{}):null,k||null]}),v?(0,c.jsx)(s,{bg:C,background:j,sx:(0,o.Z)({},void 0!==m&&m?{borderTop:function(e){var n=e.colors;return"1px solid ".concat(String(null==n?void 0:n.borders))}}:null,void 0===g?{}:g),radius:_,withRadius:!0,children:"object"==typeof v?v:(0,c.jsx)(v,{})}):null]}))}},63094:function(e,n,t){"use strict";t.d(n,{Sn:function(){return d},lS:function(){return o},nG:function(){return i},pq:function(){return s},rd:function(){return c},xo:function(){return r}});var o=["components"],i=["png","jpg","jpeg"],r=/^[A-Za-z0-9]+(?:_[A-Za-z0-9]+)*$/,c="placeholders/What_are_Slices_mrvome",d="SM_HELP_VIDEOS/mock_data",s="slice-machine-simulator"},88268:function(){}}]);