@livepreso/cdk 0.0.4 → 0.2.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/dist/400.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";(self.rspackChunk_livepreso_cdk=self.rspackChunk_livepreso_cdk||[]).push([[400],{42278(e,r,t){var n=t(78667),o=t(11202),i=t(42261),l=t(47282);function a(e){var r=e.ref,t=e.label,a=e.isOpen,s=e.onClick,c=a?l.A:i.A;return(0,n.jsxs)(o.A,{ref:r,direction:"row",component:"button",type:"button",onClick:s,sx:{alignItems:"center",gap:1,height:30,px:3,border:"1px solid",borderColor:a?"divider":"dividerFaint",borderRadius:6,cursor:"pointer",fontFamily:"inherit",fontSize:13,whiteSpace:"nowrap",bgcolor:"background.strong",color:a?"text.primary":"text.secondary","&:hover":{borderColor:"divider",color:"text.primary"}},children:[t,(0,n.jsx)(c,{sx:{fontSize:18,color:"text.disabled"}})]})}t(9051),t.d(r,{c:()=>a})},31744(e,r,t){var n=t(78667),o=t(93967),i=t(11202),l=t(29651),a=t(66568),s=t(11853),c=t(9051),u=t(28230),d=t(42278),x=t(91932),f=t(47300);function p(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function h(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){var n;n=t[r],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n})}return e}function m(e){var r,t,u,m=e.only,b=(0,c.useRef)(null),v=function(e){if(Array.isArray(e))return e}(u=(0,c.useState)(!1))||function(e){var r,t,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),2!==o.length);i=!0);}catch(e){l=!0,t=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw t}}return o}}(u)||function(e){if(e){if("string"==typeof e)return p(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,2)}}(u)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),j=v[0],g=v[1],A=(0,f.e)(),S=A.kinds,C=A.applyItem,w=(r=S,(t=void 0===m?null:m)?r.filter(function(e){return t[e.id]}).map(function(e){var r,n;return r=h({},e),n=n={groups:e.groups.filter(function(r){return t[e.id].includes(r.key)})},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r}):r);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.c,{ref:b,label:(0,x.n5)(w),isOpen:j,onClick:function(){return g(!j)}}),(0,n.jsx)(l.Ay,{open:j,onClose:function(){return g(!1)},anchorEl:b.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},marginThreshold:8,children:(0,n.jsx)(s.A,{sx:{width:320,maxHeight:480,overflow:"auto"},children:(0,n.jsx)(i.A,{sx:{py:3},children:w.map(function(e,r){return(0,n.jsxs)(i.A,{children:[r>0&&(0,n.jsx)(a.A,{sx:{borderColor:"dividerFaint",my:2}}),w.length>1&&(0,n.jsx)(o.A,{variant:"label",sx:{px:4,pb:2},children:e.label.toUpperCase()}),(0,n.jsx)(i.A,{sx:{px:4,gap:3},children:e.groups.map(function(r){return(0,n.jsxs)(i.A,{sx:{gap:1},children:[(0,n.jsx)(o.A,{variant:"body2",sx:{color:"text.secondary"},children:r.label}),(0,n.jsx)(i.A,{direction:"row",sx:{flexWrap:"wrap",gap:1},children:r.items.map(function(t){return(0,n.jsx)(y,{item:t,onClick:function(){return C(e.id,r.key,t)}},t.key)})})]},r.key)})})]},e.id)})})})})]})}function y(e){var r=e.item,t=e.onClick;return(0,n.jsx)(i.A,{direction:"row",onClick:t,sx:h({alignItems:"center",gap:1,px:2,py:1,borderRadius:1},(0,u.W)(r.isApplied)),children:(0,n.jsx)(u.K,{item:r})})}t.d(r,{d:()=>m})},28230(e,r,t){var n=t(78667),o=t(97563),i=t(93967),l=t(74554);function a(e){var r=e.item;return(0,n.jsxs)(n.Fragment,{children:[r.isApplied?(0,n.jsx)(o.A,{sx:{fontSize:14,color:"primary.main"}}):(0,n.jsx)(l.A,{sx:{width:14,flex:"0 0 auto"}}),(0,n.jsx)(i.A,{variant:"body2",noWrap:!0,children:r.title})]})}function s(e){return{cursor:"pointer",bgcolor:e?"primary.tint":"transparent","&:hover":{bgcolor:e?"primary.tint":"action.hover"}}}t(9051),t.d(r,{K:()=>a,W:()=>s})},47300(e,r,t){var n=t(79294),o=t(78553),i=t(10453),l=t(91932),a=t(63986),s=t(15067),c=t(10486),u=t(62791),d=t(30538),x=t(57862),f=t(13491);function p(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function h(){var e,r,t=function(e){if(Array.isArray(e))return e}(e=(0,n.E)({queries:[(0,s.Le)(),(0,d.uA)(),(0,u.LW)(),(0,c.IB)(),(0,a.su)()]}))||function(e){var r,t,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),5!==o.length);i=!0);}catch(e){l=!0,t=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw t}}return o}}(e)||function(e){if(e){if("string"==typeof e)return p(e,5);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,5)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),h=t[0].data,m=t[1].data,y=t[2].data,b=t[3].data,v=t[4].data,j=(0,o.U)((0,x.R8)()).data,g=j.selectedContext,A=j.selectedCmsVals,S=j.selectedFeeds,C=j.selectedEnvs,w=j.selectedCustomer,k=j.selectedContacts,I=(0,i.I)((0,c.bG)(w,{enabled:w!==l.GT})).data,O=(0,f.mc)(),P=(0,f.dI)(),W=(0,f.Yy)(),z=(0,f.Tf)(),E=(0,f.vd)(),T=(0,f.qw)();return{kinds:(0,l.Mf)({contexts:h,feeds:m,envs:y,customers:b,cmsValSets:v,contacts:null!=(r=null==I?void 0:I.contacts)?r:[],selectedContext:g,selectedCmsVals:A,selectedFeeds:S,selectedEnvs:C,selectedCustomer:w,selectedContacts:k}),applyItem:function(e,r,t){(0,l.IU)({kindId:e,groupKey:r,item:t,selectedFeeds:S,selectedEnvs:C,selectedContacts:k,saveContext:O.mutate,saveCmsVals:P.mutate,saveFeeds:W.mutate,saveEnvs:z.mutate,saveCustomer:E.mutate,saveContacts:T.mutate})},isLoading:!h||!m||!y||!b||!v}}t.d(r,{e:()=>h})},19187(e,r,t){t.d(r,{StagePane:()=>eL});var n=t(78667),o=t(82919),i=t(88474),l=t(2475),a=t(39728),s=t(95497),c=t(93967),u=t(54705),d=t(11202),x=t(74554),f=t(9051),p=t(78553),h=t(55966),m=t(62774),y=t(42930),b=t(78831),v=t(93082),j=t(32241),g=t(19949),A=t(67590),S=t(24662);function C(e){var r=e.value,t=e.placeholder,o=e.onChange;return(0,n.jsx)(x.A,{sx:{py:2,px:3,borderBottom:"1px solid",borderColor:"dividerFaint"},children:(0,n.jsxs)(d.A,{direction:"row",sx:{alignItems:"center",gap:2,height:34,px:2,border:"1px solid",borderColor:"divider",borderRadius:1},children:[(0,n.jsx)(j.A,{sx:{fontSize:19,color:"text.disabled"}}),(0,n.jsx)(A.Ay,{value:r,placeholder:t,fullWidth:!0,sx:{fontSize:13},onChange:function(e){return o(e.target.value)}}),r&&(0,n.jsx)(S.A,{size:"small",onClick:function(){return o("")},sx:{color:"text.disabled"},children:(0,n.jsx)(g.A,{fontSize:"small"})})]})})}function w(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function k(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function I(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(r){k(e,r,t[r])})}return e}function O(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):(function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r})(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}),e}function P(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(t=o.next()).done)&&(i.push(t.value),!r||i.length!==r);l=!0);}catch(e){a=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw n}}return i}}(e,r)||function(e,r){if(e){if("string"==typeof e)return w(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return w(e,r)}}(e,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e){var r=e.deck,t=e.selectedSlide,o=e.onSlideClicked,i=P((0,f.useState)(""),2),l=i[0],a=i[1],s=P((0,f.useState)({}),2),c=s[0],u=s[1],p=(0,f.useMemo)(function(){var e,t;return e=r,t=l.toLowerCase(),e.sections.reduce(function(e,r){var n=e[r.key]={index:r.key,data:{title:r.title},isFolder:!1,children:[]},o=!0,i=!1,l=void 0;try{for(var a,s=r.slides[Symbol.iterator]();!(o=(a=s.next()).done);o=!0){var c=a.value;(!t||c.title.toLowerCase().includes(t))&&(e[c.key]={index:"".concat(r.key,"--").concat(c.key),data:{title:c.title}},n.children.push(c.key))}}catch(e){i=!0,l=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw l}}return n.isFolder=n.children.length>0,(!t||n.children.length||r.title.toLowerCase().includes(t))&&e.root.children.push(r.key),e},{root:{index:"root",children:["welcome"],data:e.title},welcome:{index:"welcome",data:{title:"Welcome"}}})},[r,l]);function h(e,r){u(O(I({},c),k({},e.index,r)))}return(0,n.jsxs)(d.A,{sx:{flex:1,minHeight:0},children:[(0,n.jsx)(C,{value:l,placeholder:"Filter by title...",onChange:a}),(0,n.jsx)(x.A,{sx:{flex:1,minHeight:0,overflowY:"auto",position:"relative"},children:(0,n.jsx)(b._,{canSearch:!1,onSelectItems:function(e){if(e.length>1)throw Error("Somehow selected more than one");var r=e[0].split("--");o("welcome"===r[0]?[""]:r)},onExpandItem:function(e){return h(e,!0)},onCollapseItem:function(e){return h(e,!1)},renderItem:function(e){return(0,n.jsx)(z,O(I({},e),{selectedSlide:t}))},renderItemArrow:F,renderItemTitle:M,items:p,getItemTitle:function(e){return e.data.title},viewState:{tree:{selectedItems:[t.join("--")],expandedItems:Object.entries(c).filter(function(e){return P(e,2)[1]}).map(function(e){return P(e,1)[0]})}},children:(0,n.jsx)(v.P,{treeId:"tree",rootItem:"root",treeLabel:"Slides"})})})]})}function z(e){var r=e.item,t=e.title,o=e.arrow,i=e.depth,l=e.context,a=e.children,s=e.selectedSlide,c=O(I({},l.itemContainerWithoutChildrenProps,l.interactiveElementProps),{onClick:function(e){e.target.closest("[data-type='nav-text']")?l.selectItem():e.preventDefault()}}),u=a&&(0,n.jsx)(x.A,{sx:{bgcolor:"background.subtle"},children:a});return 0===i?(0,n.jsxs)(x.A,O(I({},l.itemContainerWithChildrenProps),{children:[(0,n.jsx)(E,{title:t,arrow:o,rowProps:c,isSelected:l.isSelected,holdsSelectedSlide:s.length>1&&s[0]===r.index}),u]})):(0,n.jsxs)(x.A,O(I({},l.itemContainerWithChildrenProps),{children:[(0,n.jsx)(T,{title:t,rowProps:c,isSelected:l.isSelected}),u]}))}function E(e){var r=e.title,t=e.arrow,o=e.rowProps,i=e.isSelected,l=e.holdsSelectedSlide;return(0,n.jsxs)(d.A,O(I({direction:"row"},o),{sx:{alignItems:"center",gap:2,py:2,px:3,cursor:"pointer",bgcolor:i?"primary.soft":"transparent","&:hover":i?{}:{bgcolor:"action.hover"}},children:[t,(0,n.jsx)(c.A,{variant:"body2",noWrap:!0,"data-type":"nav-text",sx:{flex:1,fontWeight:500,color:i?"primary.main":"text.primary"},children:r}),l&&(0,n.jsx)(y.A,{sx:{fontSize:8,color:"primary.main"}})]}))}function T(e){var r=e.title,t=e.rowProps,o=e.isSelected;return(0,n.jsx)(x.A,O(I({},t),{sx:{py:2,pl:8,pr:3,cursor:"pointer",bgcolor:o?"primary.soft":"transparent","&:hover":o?{}:{bgcolor:"action.hover"}},children:(0,n.jsx)(c.A,{variant:"body2",noWrap:!0,"data-type":"nav-text",sx:{color:o?"primary.main":"text.secondary",fontWeight:o?500:400},children:r})}))}function F(e){var r=e.item,t=e.context;return r.isFolder?(0,n.jsx)(d.A,O(I({direction:"row"},t.arrowProps),{onClick:t.toggleExpandedState,sx:{alignItems:"center",cursor:"pointer",color:"text.disabled"},children:t.isExpanded?(0,n.jsx)(m.A,{sx:{fontSize:19}}):(0,n.jsx)(h.A,{sx:{fontSize:19}})})):(0,n.jsx)(x.A,O(I({},t.arrowProps),{onClick:void 0,sx:{width:19}}))}function M(e){var r,t=e.title;return(r=e.item).children||"welcome"===r.index?(0,n.jsx)("span",{children:(0,n.jsx)("strong",{children:t})}):(0,n.jsx)("span",{children:t})}var U=t(81331),L=t(97394),R=t(24405),D=t(11316),$=t(68599),H=[{id:R.$0,label:"Slides",Icon:L.A},{id:R.QT,label:"Templates",Icon:U.A}];function G(){var e=(0,$.C)().tab,r=(0,D.M)();return(0,n.jsx)(d.A,{direction:"row",sx:{flex:1,minWidth:0},children:H.map(function(t){var o=t.id,i=t.label,l=t.Icon;return(0,n.jsx)(B,{label:i,Icon:l,isCurrent:o===e,onClick:function(){return r(o)}},o)})})}function B(e){var r=e.label,t=e.Icon,o=e.isCurrent,i=e.onClick;return(0,n.jsxs)(d.A,{direction:"row",component:"button",type:"button",onClick:i,sx:{flex:1,minWidth:0,alignItems:"center",justifyContent:"center",gap:2,height:34,border:0,borderBottom:"2px solid",borderColor:o?"primary.main":"transparent",cursor:"pointer",bgcolor:o?"primary.soft":"transparent",color:o?"primary.main":"text.secondary","&:hover":{bgcolor:o?"primary.soft":"action.hover"}},children:[(0,n.jsx)(t,{sx:{fontSize:17}}),(0,n.jsx)(c.A,{variant:"body2",noWrap:!0,sx:{color:"inherit"},children:r})]})}function V(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function K(e){var r,t=e.templates,o=e.selectedSlide,i=e.onTemplateClicked,l=function(e){if(Array.isArray(e))return e}(r=(0,f.useState)(""))||function(e){var r,t,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),2!==o.length);i=!0);}catch(e){l=!0,t=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw t}}return o}}(r)||function(e){if(e){if("string"==typeof e)return V(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V(e,2)}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=l[0],s=l[1];if(!t.length)return(0,n.jsx)(Q,{});var c=a.toLowerCase(),u=t.filter(function(e){return e.title.toLowerCase().includes(c)||e.templateKey.includes(c)});return(0,n.jsxs)(d.A,{sx:{flex:1,minHeight:0},children:[(0,n.jsx)(C,{value:a,placeholder:"Filter templates...",onChange:s}),(0,n.jsx)(x.A,{sx:{flex:1,minHeight:0,overflowY:"auto"},children:u.map(function(e){return(0,n.jsx)(_,{template:e,isSelected:o[0]===e.path[0],onClick:function(){return i(e.path)}},e.templateKey)})})]})}function _(e){var r=e.template,t=e.isSelected,o=e.onClick;return(0,n.jsx)(x.A,{onClick:o,sx:{py:2,px:4,cursor:"pointer",bgcolor:t?"primary.soft":"transparent","&:hover":t?{}:{bgcolor:"action.hover"}},children:(0,n.jsx)(c.A,{variant:"body2",noWrap:!0,sx:{fontWeight:t?500:400,color:t?"primary.main":"text.secondary"},children:r.title})})}function Q(){return(0,n.jsxs)(d.A,{sx:{flex:1,gap:2,px:4,py:4},children:[(0,n.jsx)(c.A,{variant:"body2",sx:{fontWeight:500},children:"No templates found"}),(0,n.jsxs)(c.A,{variant:"body2",sx:{color:"text.secondary"},children:["Add one under ",(0,n.jsx)(c.A,{variant:"mono",children:"templates:"})," in the project file, with a folder of the same key under"," ",(0,n.jsx)(c.A,{variant:"mono",children:"src/templates"}),"."]})]})}var X=t(76154),N=t(60025),Y=t(50150),q=t(41234),J=t(66568),Z=t(15100),ee=t(42278),er=t(57862),et=t(13491),en=t(93347);function eo(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function ei(e){var r,t=e.onReload,o=void 0===t?function(){}:t,i=function(e){if(Array.isArray(e))return e}(r=(0,f.useState)(null))||function(e){var r,t,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),2!==o.length);i=!0);}catch(e){l=!0,t=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw t}}return o}}(r)||function(e){if(e){if("string"==typeof e)return eo(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eo(e,2)}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=i[0],a=i[1],s=!!l,c=(0,p.U)((0,er.uS)()).data,u=c.cmsVals,d=c.contextOverrides,x=(0,et.EW)(),h=(0,et.Dz)(),m=Object.keys(d).length,y=u.length>0||m>0;function b(){a(null)}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Z.A,{color:"primary",variant:"dot",invisible:!y,children:(0,n.jsx)(ee.c,{label:"Reset",isOpen:s,onClick:function(e){return a(e.currentTarget)}})}),(0,n.jsxs)(q.A,{anchorEl:l,open:s,onClose:b,children:[(0,n.jsxs)(Y.A,{onClick:function(){x.mutate([]),(0,en.$m)("cmsval"),o(),b()},disabled:!u.length,children:["Clear CMS Vals",u.length?" (".concat(u.length,")"):""]}),(0,n.jsxs)(Y.A,{onClick:function(){h.mutate({}),(0,en.$m)("context"),o(),b()},disabled:!m,children:["Clear Context Vals",m?" (".concat(m,")"):""]}),(0,n.jsx)(J.A,{}),(0,n.jsx)(Y.A,{onClick:function(){x.mutate([]),h.mutate({}),(0,en.$m)(),o(),b()},disabled:!y,children:"Clear All"})]})]})}var el=t(11853),ea=t(29651);function es(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function ec(e){var r,t=e.title,o=e.children,i=(0,f.useRef)(null),l=function(e){if(Array.isArray(e))return e}(r=(0,f.useState)(!1))||function(e){var r,t,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),2!==o.length);i=!0);}catch(e){l=!0,t=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw t}}return o}}(r)||function(e){if(e){if("string"==typeof e)return es(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return es(e,2)}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=l[0],s=l[1];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ee.c,{ref:i,label:t,isOpen:a,onClick:function(){return s(!a)}}),(0,n.jsx)(ea.Ay,{open:a,onClose:function(){s(!1)},anchorEl:i.current,children:(0,n.jsx)(x.A,{sx:{minWidth:300},children:o})})]})}var eu=t(512),ed=t(26682);function ex(e){var r=e.bodyClasses,t=void 0===r?[]:r;return(null==t?void 0:t.length)?(0,n.jsxs)(d.A,{sx:{gap:1.5,mt:2},children:[(0,n.jsx)(c.A,{variant:"label",children:"Body classes"}),(0,n.jsx)(d.A,{direction:"row",sx:{gap:2,flexWrap:"wrap"},children:t.map(function(e){return(0,n.jsx)(c.A,{variant:"mono",sx:{px:2,py:.5,borderRadius:4,bgcolor:"background.strong",color:"text.secondary"},children:e},e)})})]}):null}function ef(e){var r=e.value,t=e.label,o=e.description,i=e.onClick;return(0,n.jsx)(Y.A,{value:r,label:t,onClick:i,children:(0,n.jsxs)(d.A,{sx:{maxWidth:250},children:[(0,n.jsx)(c.A,{children:t}),o&&(0,n.jsx)(c.A,{variant:"menuSubheading",sx:{textWrap:"wrap"},children:o})]})})}var ep=t(92227),eh=t(78427),em=t.n(eh);function ey(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function eb(e){var r,t,o=e.selection,i=e.index,l=e.allStates,a=e.tab,s=e.onChange,u=null,x=l.slice(0,i);if(0===i)t=ep.Ls;else{var f=x.flatMap(function(e){return[e,"children"]});t=em()(ep.Ls,f),u=em()(ep.Ls,f.slice(0,-1))}var p=null!=(r=t[o])?r:t[0];return(0,n.jsxs)(d.A,{sx:{gap:2},children:[(null==u?void 0:u.childrenDescription)&&(0,n.jsx)(c.A,{variant:"body2",sx:{color:"text.secondary"},children:u.childrenDescription}),(0,n.jsx)(ed.A,{size:"small",sx:{display:"flex"},children:(0,n.jsx)(eu.A,{value:o,slotProps:{listbox:{placement:"bottom-start",sx:{zIndex:2202}}},renderValue:function(e){return t[e].title},children:t.map(function(e,r){return(0,ep.al)(e,a)?(0,n.jsx)(ef,{value:r,label:e.title,description:e.description,onClick:function(){return s(function(e){for(var r,t=e.ancestors,n=e.states,o=e.index,i=e.tab,l=((function(e){if(Array.isArray(e))return ey(e)})(t)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return ey(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ey(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([o]),a=n[o];null==a||null==(r=a.children)?void 0:r.length;){var s=a.children.findIndex(function(e){return(0,ep.al)(e,i)});l.push(s),a=a.children[s]}return l}({ancestors:x,states:t,index:r,tab:a}))}},e.title):null})})}),(0,n.jsx)(ex,{bodyClasses:p.bodyClasses})]})}var ev=t(75234);function ej(){var e=(0,$.C)().tab,r=(0,ev.g)(),t=(0,ev.P)();return(0,n.jsx)(ec,{title:r.title.replaceAll(" > "," - "),children:(0,n.jsxs)(el.A,{children:[(0,n.jsx)(d.A,{sx:{px:4,pt:4,pb:3},children:(0,n.jsx)(c.A,{variant:"h4",children:"Presentation mode"})}),(0,n.jsx)(J.A,{sx:{borderColor:"dividerFaint"}}),(0,n.jsx)(d.A,{sx:{px:4,py:4,gap:5},children:r.indices.map(function(r,o,i){return(0,n.jsx)(eb,{selection:r,index:o,allStates:i,tab:e,onChange:t},o)})}),(0,n.jsx)(J.A,{sx:{borderColor:"dividerFaint"}}),(0,n.jsx)(d.A,{sx:{px:4,py:3},children:(0,n.jsx)(c.A,{variant:"body2",sx:{color:"text.secondary"},children:"Picking a mode reloads the deck."})})]})})}var eg=t(97167);function eA(){var e=(0,eg.Oc)().reloadStage;return(0,n.jsxs)(d.A,{direction:"row",sx:{alignItems:"center",gap:3,flex:"0 0 auto",minWidth:0},children:[(0,n.jsx)(ej,{}),(0,n.jsx)(ei,{onReload:e})]})}var eS=t(99901),eC=t(95584),ew=t(68562),ek=t(10453);function eI(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function eO(){var e,r=(0,p.U)((0,er.i5)()).data,t=(0,et.rU)(),o=(0,ek.I)((0,ew.G)()),i=o.isLoading,l=o.isError,a=o.data,s=function(e){if(Array.isArray(e))return e}(e=(0,f.useState)(null))||function(e){var r,t,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),2!==o.length);i=!0);}catch(e){l=!0,t=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw t}}return o}}(e)||function(e){if(e){if("string"==typeof e)return eI(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eI(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=s[0],u=s[1];if(i||l)return null;var d=a.dimensions;if(!Array.isArray(d))return null;var x=null!=r?r:"screen",h=d.find(function(e){return e.name.toLowerCase()===x});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ee.c,{label:h?"".concat(h.width," x ").concat(h.height):x,isOpen:!!c,onClick:function(e){return u(e.currentTarget)}}),(0,n.jsx)(q.A,{anchorEl:c,open:!!c,onClose:function(){return u(null)},children:d.map(function(e){var r=e.width,o=e.height,i=e.name;return(0,n.jsxs)(Y.A,{selected:i.toLowerCase()===x,onClick:function(){t.mutate(i.toLowerCase()),u(null)},children:[r," x ",o," (",i,")"]},i)})})]})}var eP=t(31744),eW=t(19490);function ez(){var e,r=(0,eW.k)(),t=r.slides,o=r.at,i=r.current,l=(0,$.C)(),a=l.tab,s=l.selectedSlide,u=a!==R.QT&&o>-1;return(0,n.jsxs)(d.A,{direction:"row",sx:{flex:"0 0 auto",height:38,alignItems:"center",gap:3,px:4,borderTop:"1px solid",borderColor:"divider",bgcolor:"background.paper",overflowX:"auto"},children:[(0,n.jsx)(c.A,{variant:"mono",noWrap:!0,sx:{minWidth:240,color:"text.secondary"},children:null!=(e=null==i?void 0:i.templateKey)?e:s.join("/")}),(0,n.jsx)(eT,{width:96,children:(0,N.uJ)(i)}),(0,n.jsx)(eT,{width:140,children:u?"deck slide ".concat(o+1," of ").concat(t.length):""}),(0,n.jsx)(x.A,{sx:{flex:1,minWidth:8}}),(0,n.jsx)(eP.d,{}),(0,n.jsx)(J.A,{orientation:"vertical",flexItem:!0,sx:{my:2}}),(0,n.jsx)(eO,{}),(0,n.jsx)(eE,{})]})}function eE(){var e=(0,p.U)((0,er.N8)()).data,r=(0,et.b)();return(0,ev.g)().showEditables?(0,n.jsx)(u.A,{title:e?"Hide the editables":"Show the editables",children:(0,n.jsxs)(d.A,{direction:"row",onClick:function(){return r.mutate(!e)},sx:{alignItems:"center",gap:2,px:2,py:1,borderRadius:1,cursor:"pointer",bgcolor:e?"primary.tint":"transparent",color:e?"primary.main":"text.secondary","&:hover":{bgcolor:e?"primary.tint":"action.hover"}},children:[e?(0,n.jsx)(eS.A,{sx:{fontSize:17}}):(0,n.jsx)(eC.A,{sx:{fontSize:17}}),(0,n.jsx)(c.A,{variant:"body2",sx:{color:"inherit"},children:"Editables"})]})}):(0,n.jsx)(u.A,{title:"This mode shows no editables",children:(0,n.jsxs)(d.A,{direction:"row",sx:{alignItems:"center",gap:2,px:2},children:[(0,n.jsx)(eC.A,{sx:{fontSize:17,color:"text.disabled"}}),(0,n.jsx)(c.A,{variant:"body2",sx:{color:"text.disabled"},children:"Editables"})]})})}function eT(e){var r=e.children,t=e.width;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(J.A,{orientation:"vertical",flexItem:!0,sx:{my:2}}),(0,n.jsx)(c.A,{variant:"body2",noWrap:!0,sx:{color:"text.secondary",minWidth:t},children:r})]})}var eF=t(62925),eM=t(40438),eU=t(81835);function eL(e){var r=e.isCompact,t=(0,p.U)((0,er.gP)()).data;return void 0!==r&&r?t?(0,n.jsx)(e$,{}):null:(0,n.jsx)(eR,{isPanelShown:t})}function eR(e){var r=e.isPanelShown;return(0,n.jsxs)(n.Fragment,{children:[r?(0,n.jsx)(eB,{}):(0,n.jsx)(eK,{}),(0,n.jsxs)(d.A,{sx:{flex:1,minWidth:0,minHeight:0,bgcolor:"background.default"},children:[(0,n.jsx)(eD,{}),(0,n.jsx)(d.A,{direction:"row",sx:{flex:1,minHeight:0,minWidth:0,px:4,pb:4},children:(0,n.jsx)(eg.jd,{})}),(0,n.jsx)(ez,{})]})]})}function eD(){var e,r=(0,eW.k)().current,t=(0,$.C)(),o=t.tab,i=t.goToSlide;return(0,n.jsxs)(d.A,{direction:"row",sx:{flex:"0 0 auto",height:52,alignItems:"center",gap:2,px:5},children:[(null==r?void 0:r.sectionTitle)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.A,{title:"Go to ".concat(r.sectionTitle),children:(0,n.jsx)(c.A,{variant:"body2",noWrap:!0,onClick:function(){return i(r.sectionPath)},sx:{color:"text.disabled",cursor:"pointer","&:hover":{color:"text.secondary",textDecoration:"underline"}},children:r.sectionTitle})}),(0,n.jsx)(c.A,{sx:{color:"text.disabled"},children:"/"})]}),(0,n.jsx)(c.A,{noWrap:!0,sx:{fontWeight:500},children:null!=(e=null==r?void 0:r.title)?e:(0,N.bX)(o)}),(0,n.jsx)(x.A,{sx:{flex:1,minWidth:8}}),(0,n.jsx)(eA,{})]})}function e$(){var e=(0,p.U)((0,er.zv)()).data,r=(0,et.zO)(),t=(0,eU.$)({axis:"x",saved:e,fallback:er.I4.stageWidth,min:300,readMax:function(){return Math.max(300,Math.min(920,innerWidth-620))},onSave:function(e){return r.mutate(e)}}),o=t.size,i=t.startResize,l=t.resetSize;return(0,n.jsxs)(d.A,{sx:{position:"relative",flex:"0 0 ".concat(o,"px"),minHeight:0,bgcolor:"background.paper",borderLeft:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(eF.X,{edge:"left",onDragStart:i,onReset:l}),(0,n.jsx)(d.A,{direction:"row",sx:{flex:"0 0 auto",borderBottom:"1px solid",borderColor:"divider"},children:(0,n.jsx)(G,{})}),(0,n.jsx)(eH,{}),(0,n.jsx)(x.A,{sx:{p:3,bgcolor:"background.default",borderBottom:"1px solid",borderColor:"divider"},children:(0,n.jsx)(d.A,{direction:"row",sx:{position:"relative",width:"100%",aspectRatio:"16 / 9"},children:(0,n.jsx)(eg.jd,{hasArrows:!1})})}),(0,n.jsx)(d.A,{direction:"row",sx:{flex:"0 0 auto",alignItems:"center",flexWrap:"wrap",gap:2,px:3,py:2,borderBottom:"1px solid",borderColor:"divider"},children:(0,n.jsx)(eA,{})})]})}function eH(){var e,r=(0,eW.k)(),t=r.current,i=r.previous,l=r.next,x=(0,$.C)(),f=x.tab,p=x.selectedSlide,h=x.goToSlide,m=x.goToPage;return(0,n.jsxs)(d.A,{direction:"row",sx:{flex:"0 0 auto",height:40,alignItems:"center",gap:2,pl:3,pr:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(X._,{isCompact:!0}),(0,n.jsxs)(d.A,{sx:{flex:1,minWidth:0},children:[(0,n.jsx)(c.A,{variant:"body2",noWrap:!0,sx:{fontWeight:500},children:null!=(e=null==t?void 0:t.title)?e:(0,N.bX)(f)}),(0,n.jsx)(c.A,{variant:"mono",noWrap:!0,sx:{fontSize:10,color:"text.disabled"},children:p.join("/")})]}),(0,n.jsx)(eG,{label:"Previous slide",Icon:s.A,target:i,onGo:h}),(0,n.jsx)(eG,{label:"Next slide",Icon:a.A,target:l,onGo:h}),(0,n.jsx)(u.A,{title:"Open the full stage",children:(0,n.jsx)(o.A,{onClick:function(){return m("preview")},sx:{fontSize:17,color:"text.disabled",cursor:"pointer"}})})]})}function eG(e){var r=e.label,t=e.Icon,o=e.target,i=e.onGo,l=e.size,a=void 0===l?19:l;return o?(0,n.jsx)(u.A,{title:"".concat(r,": ").concat(o.title),children:(0,n.jsx)(t,{onClick:function(){return i(o.path)},sx:{fontSize:a,color:"text.secondary",cursor:"pointer"}})}):(0,n.jsx)(t,{sx:{fontSize:a,color:"text.disabled",opacity:.4}})}function eB(){var e=(0,et.gG)();return(0,n.jsxs)(d.A,{sx:{flex:"0 0 264px",minHeight:0,bgcolor:"background.paper",borderRight:"1px solid",borderColor:"divider"},children:[(0,n.jsxs)(d.A,{direction:"row",sx:{flex:"0 0 auto",alignItems:"center",gap:2,pr:2,borderBottom:"1px solid",borderColor:"divider"},children:[(0,n.jsx)(G,{}),(0,n.jsx)(u.A,{title:"Collapse the side panel",children:(0,n.jsx)(l.A,{onClick:function(){return e.mutate(!1)},sx:{fontSize:19,color:"text.disabled",cursor:"pointer"}})})]}),(0,n.jsx)(eV,{})]})}function eV(){var e=(0,eM.F)(),r=(0,$.C)(),t=r.tab,o=r.selectedSlide,i=r.goToSlide;return t===R.QT?(0,n.jsx)(K,{templates:e.templates,selectedSlide:o,onTemplateClicked:i}):(0,n.jsx)(W,{deck:e.presentation.decks[0],selectedSlide:o,onSlideClicked:i})}function eK(){var e=(0,et.gG)();return(0,n.jsx)(d.A,{sx:{flex:"0 0 32px",minHeight:0,alignItems:"center",pt:3,bgcolor:"background.paper",borderRight:"1px solid",borderColor:"divider"},children:(0,n.jsx)(u.A,{title:"Show the slide list",children:(0,n.jsx)(i.A,{onClick:function(){return e.mutate(!0)},sx:{fontSize:19,color:"text.disabled",cursor:"pointer"}})})})}},19490(e,r,t){var n=t(9051),o=t(60025),i=t(24405),l=t(40438),a=t(68599);function s(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function c(){var e=(0,l.F)(),r=(0,a.C)(),t=r.tab,c=r.selectedSlide,u=(0,n.useMemo)(function(){var r,n=(function(e){if(Array.isArray(e))return e}(r=e.presentation.decks)||function(e){var r,t,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),1!==o.length);i=!0);}catch(e){l=!0,t=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw t}}return o}}(r)||function(e){if(e){if("string"==typeof e)return s(e,1);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,1)}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return t===i.QT?(0,o.eG)(n):(0,o.zy)(n)},[e.presentation,t]),d=(0,o.P5)(u,c);return{slides:u,at:d,current:u[d],previous:d>0?u[d-1]:null,next:d>-1&&d<u.length-1?u[d+1]:null}}t.d(r,{k:()=>c})}}]);
2
+ //# sourceMappingURL=400.js.map