1"use strict";(self.webpackChunkeh4u=self.webpackChunkeh4u||[]).push([[5646],{82585:function(e,t,n){n.r(t),n.d(t,{default:function(){return r}});var a=n(93902);function r({splash:e,wizard:t,template:n}){return React.createElement(a.L2,{wizard:t,template:n,splash:e,fontDescription:["Roboto","Roboto Slab"]},React.createElement("div",{className:"content"},React.createElement(a.xG,null),React.createElement(a.l1,null),React.createElement(a.gG,{className:"slide-hover"})))}},93902:function(e,t,n){n.d(t,{gG:function(){return x},L2:function(){return C},WT:function(){return d},l1:function(){return v},xG:function(){return g},np:function(){return N},Od:function(){return y},ML:function(){return R},r7:function(){return b}});var a=n(41594),r=n.n(a);function l({title:e,value:t,url:n,name:l,uploadName:c}){const[i,o]=(0,a.useState)(null);return r().createElement("div",{className:"upload-image"},r().createElement("label",null,i||n?r().createElement("img",{src:i||n,alt:""}):r().createElement("span",{className:"title"},e),!i&&r().createElement("input",{type:"hidden",name:l||"image",value:void 0!==t?t:n}),r().createElement("input",{type:"file",accept:"image/*",onChange:function(e){const t=e.target.files?.[0];if(t){const e=new FileReader;e.onload=function(e){o(e.target?.result??null)},e.readAsDataURL(t)}},name:i?c||l||"image":""})))}var c=n(47767),i=n(46942),o=n.n(i);const s=(0,a.createContext)(null),u=(0,a.createContext)(null),m=(0,a.createContext)(null);const d=(0,a.createContext)(!1);function f(){return(0,a.useContext)(d)}function p(){const e=(0,a.useContext)(u),t=(0,a.useContext)(m);return t&&t.id>0?{url:t.content,newWindow:parseInt((t.new_window??"0")+"",10)>0,bg_id:t.bg_id,header1:t.wizard_header1,header2:t.wizard_header2,text1:t.wizard_text1,text2:t.wizard_text2,text3:t.wizard_text3,text4:t.wizard_text4,text5:t.wizard_text5,button:t.wizard_button}:{...e,url:"",newWindow:!1,bg_id:void 0}}function w({name:e,children:t}){return f()?r().createElement("input",{type:"text",name:e,defaultValue:t}):r().createElement("span",null,t)}function h({name:e,children:t}){const n=f(),l=(0,a.useRef)(null),c=(0,a.useCallback)(()=>{l.current.style.height="",l.current.style.height=l.current.scrollHeight+"px"},[]);return(0,a.useEffect)(()=>{if(n){const e=setTimeout(c,250);return()=>clearTimeout(e)}},[n]),n?r().createElement("textarea",{name:e,rows:1,defaultValue:t,onInput:c,ref:l}):r().createElement("span",null,t)}function E({bg_id:e,defaultLogo:t,className:n}){const a=f(),c=e?`/user/img/splash/bg/${e}.png`:t&&t.length?t:void 0;return a?r().createElement("div",{className:"logo editing"+(n?" "+n:"")},r().createElement(l,{name:"bg_id",uploadName:"banfile",value:e,url:c,title:"Your logo here"})):r().createElement("div",{className:"logo"},r().createElement("img",{src:c,alt:""}))}function g({className:e}){const t=(0,a.useContext)(s),n=p(),l=(0,c.zy)();if(!t)throw"No wizard";const i=l.pathname.match(/preview/);return r().createElement(E,{bg_id:n.bg_id,className:e,defaultLogo:t.logo||(i?"/images/splash/wizard/upload-logo.svg":void 0)})}function v(){const e=p();return r().createElement("h1",null,r().createElement(h,{name:"header1"},e.header1))}function N(){const e=p();return r().createElement("h2",null,r().createElement(h,{name:"header2"},e.header2))}function b({id:e}){const t=p(),n="text"+e;return r().createElement("p",null,r().createElement(h,{name:n},t[n]))}function x({multiLine:e,className:t}){const n=p();return r().createElement(_,{name:"button",targetUrl:n.url,multiLine:e,className:t,newWindow:n.newWindow},n.button)}function z({targetUrl:e,children:t,className:n,newWindow:a}){return r().createElement("button",{onClick:()=>{a?window.open(e):window.location.href=e},className:o()(n)},t)}function _({name:e,targetUrl:t,children:n,multiLine:a,className:l,newWindow:c}){return f()?r().createElement("div",{className:"button"},a?r().createElement(h,{name:e},n):r().createElement(w,{name:e},n)):r().createElement(z,{targetUrl:t,className:l,newWindow:c},n)}function C({wizard:e,template:t,splash:n,fontDescription:l,children:c}){const i=f(),d=(0,a.useRef)(null),[p,w]=(0,a.useState)(1),h=(!t.wizard_id||"default"===e.name)&&t.template_id>=20;return(0,a.useEffect)(()=>
1{if(l){const e=("string"==typeof l?[l]:l).map(e=>`family=${e.replace(/\s/g,"+")}`);window.loadCSS(`https://fonts.googleapis.com/css2?${e.join("&")}&display=swap`)}},[l]),(0,a.useEffect)(()=>{if(!i&&d.current){const e=getComputedStyle(d.current);e.backgroundColor&&(window.document.body.style.backgroundColor=e.backgroundColor)}const e=function(){const e=document.documentElement.clientWidth,t=document.documentElement.clientHeight-(parseInt((n.show_top_frame??"0")+"",10)>0?35:0),a=e/d.current.clientWidth,r=t/d.current.clientHeight;console.log("handleResize",d.current.clientWidth,d.current.clientHeight,{maxWidth:e,maxHeight:t,scaleX:a,scaleY:r}),w(a>r?r:a)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i,d.current,h]),r().createElement(s.Provider,{value:e},r().createElement(u.Provider,{value:t},r().createElement(m.Provider,{value:n},r().createElement("div",{ref:d,style:i?void 0:{transform:`scale(${p})`,transformOrigin:h||p>=1?"top center":"top left"},className:o()("splash-wizard-content",`splash-${t.wizard_id>0?e.name:"default"}-${t.template_id}`,{scaled:h})},c))))}function y({splash:e,wizard:t,template:n,fontDescription:a,className:l,buttonClassName:c}){return r().createElement(C,{wizard:t,template:n,splash:e,fontDescription:a},r().createElement("div",{className:"content"},r().createElement(g,{className:l}),r().createElement(v,null),r().createElement(b,{id:1}),r().createElement(x,{className:c})))}function R({splash:e,wizard:t,template:n,fontDescription:a,className:l,buttonClassName:c}){return r().createElement(C,{wizard:t,template:n,splash:e,fontDescription:a},r().createElement("div",{className:"content"},r().createElement(g,{className:l}),r().createElement(b,{id:1}),r().createElement(v,null),r().createElement(x,{className:c})))}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.