"use strict";(self.webpackChunk_genially_view_client=self.webpackChunk_genially_view_client||[]).push([[56],{94253(e,t,n){n.d(t,{q:()=>u});var i=n(45992),o=n(94310),r=n(37577),l=n(24578),a=n(2521);const d={[a.a.Pill]:"9999px",[a.a.Rounded]:"calc(var(--parent-height) * 0.25 * 1px)",[a.a.Square]:"0"},s=r.Ay.div(Object.assign({width:"100%",height:"100%",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},l.iF.mixins.increaseSpecificity({padding:8}))),c=r.Ay.button((e=>{let{$textColor:t,$backgroundColor:n,$hoverColor:i,$shape:o,$fontFamily:r,$bold:a,$italic:s}=e;return Object.assign(Object.assign({border:"none",fontSize:"calc(var(--parent-height) * 0.5 * 1px)",cursor:"pointer",transition:"padding 0.1s ease"},l.iF.mixins.increaseSpecificity({padding:"calc(var(--parent-height) * 0.25 * 1px) calc(var(--parent-height) * 0.5 * 1px)",backgroundColor:n,borderRadius:d[o],lineHeight:1,color:t,fontFamily:null!==r&&void 0!==r?r:"inherit",fontWeight:a?"bold":"normal",fontStyle:s?"italic":"normal"})),{"&:hover":Object.assign({},l.iF.mixins.increaseSpecificity({backgroundColor:i})),"&:active":Object.assign({},l.iF.mixins.increaseSpecificity({padding:"calc(var(--parent-height) * 0.1875 * 1px) calc(var(--parent-height) * 0.375 * 1px)"}))})})),u=e=>{let{text:t,textColor:n,backgroundColor:r,hoverColor:l,visitedColor:a,showVisitedState:d,visited:u,shape:h,fontFamily:g,bold:f,italic:m,onClick:p}=e;const{ref:v,size:b}=(0,o.r)(),C=d&&u?a:r;return(0,i.jsx)(s,{ref:v,style:{"--parent-height":b.height},children:(0,i.jsx)(c,{type:"button",onClick:p,$textColor:n,$backgroundColor:C,$hoverColor:l,$shape:h,$fontFamily:g,$bold:f,$italic:m,children:t})})}},60056(e,t,n){n.d(t,{geniallyButtonViewScript:()=>a});var i=n(45992),o=n(41381),r=n(94253);const l="visited",a=(e,t)=>{(0,o.p)({getTargetNodeItem:()=>e.item,initialState:void 0,renderApp:n=>{let{setState:o}=n;const a=!0===t.getVar(l),d=()=>{t.setVar(l,!0),o({visited:!0})};return t=>{var n;const o=null!==(n=null===t||void 0===t?void 0:t.visited)&&void 0!==n?n:a,{text:l,textColor:s,defaultColor:c,hoverColor:u,visitedColor:h,showVisitedState:g,shape:f,fontFamily:m,bold:p,italic:v}=e.config;return(0,i.jsx)(r.q,{text:l,textColor:s,backgroundColor:c,hoverColor:u,visitedColor:null!==h&&void 0!==h?h:"",showVisitedState:g,visited:o,shape:f,fontFamily:""===m.name?void 0:m.name,bold:p,italic:v,onClick:d})}}})(e,t)}},94310(e,t,n){n.d(t,{r:()=>o});var i=n(17588);const o=()=>{const[e,t]=(0,i.useState)({width:0,height:0}),n=(0,i.useRef)(null);return{ref:(0,i.useCallback)((e=>{if(n.current&&n.current.disconnect(),!e)return;const{width:i,height:o}=e.getBoundingClientRect();t({width:i,height:o}),n.current=new ResizeObserver((e=>{const{contentRect:n}=e[0];t({width:n.width,height:n.height})})),n.current.observe(e)}),[]),size:e}}},41381(e,t,n){n.d(t,{p:()=>l});var i=n(70377),o=n(66264),r=n(60708);function l(e){let{getTargetNodeItem:t,renderApp:n,renderThumbnailApp:l,initialState:a}=e,d=!1;const s=[],c=e=>{s.push(e)};return e=>{const u=t(e.config),h=null===u||void 0===u?void 0:u.parentSlide;function g(){d=!1,s.forEach((e=>{e()})),s.length=0}function f(){if(!u)return;let e=null;if("idOfFreeNode"in u)e=document.getElementById(u.idOfFreeNode);else{const t=document.createElement("div");t.innerHTML=u.source;let n=t.getElementsByClassName("genially-widget-app");n.length||(n=t.getElementsByClassName("genially-widget-gallery"));const{id:i}=n[0];if(!i)return;e=document.getElementById(i)}if(e){let t;const o=n=>{d&&t?i.render(t(n),e):console.warn('"rerender" was called when the widget was already unmounted. This is a no-op. Did you forget to dispose of an event handler with "onUnmount"?')};t=n({setState:o,onUnmount:c,unmountNow:g}),d=!0,o(a),s.push((()=>{i.unmountComponentAtNode(e)}))}}function m(){if(!u||!("idOfThumbnailFreeNode"in u))return[];const e=document.getElementsByClassName(u.idOfThumbnailFreeNode);return Array.from(e).filter((e=>e instanceof HTMLElement))}const p=u&&"isTransversal"in u&&u.isTransversal,v=()=>{null===u||void 0===u||u.on(o.q.Mount,(()=>{f()})),null===u||void 0===u||u.on(o.q.Unmount,(()=>{g()}))};p?v():(null===h||void 0===h||h.on(r.m.Entering,(()=>{d||(f(),d||v())})),null===h||void 0===h||h.on(r.m.Exited,(()=>{d&&g()}))),null===h||void 0===h||h.on(r.m.ThumbnailMount,(()=>{!function(){if(!l||!u||!("idOfThumbnailFreeNode"in u))return;m().forEach((e=>{i.unmountComponentAtNode(e)}))}(),function(){if(!l||!u||!("idOfThumbnailFreeNode"in u))return;m().forEach((e=>{const{renderingSlideId:t}=e.dataset;i.render(l({renderingSlideId:t}),e)}))}()}))}}}}]);
//# sourceMappingURL=https://s3-static-genially.genially.com/view/static/js/56.ed13fa50.chunk.js.map