1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5175],{45175:(e,t,s)=>{s.r(t),s.d(t,{default:()=>v});var n=s(54568),o=s(7620),r=s(75314),c=s(15012),l=s(23892),i=s(56215),a=s(68292),u=s(65565),d=s(30607),h=s(59250);let x=({className:e,field:t,gifId:s,size:a})=>{let{colors:x,gifs:f,isCompact:C}=(0,o.useContext)(c.k),{changeField:p}=(0,o.useContext)(r.c),g=a||(C?h.Gj:h.oK),m=(0,l.FJ)(t),j=`Add ${m.toLowerCase()}`,w=(0,l.N7)(t),y=(0,l.N7)("source"),b=(0,i.yR)(f,w,s)||"",v=(0,i.yR)(f,y,s)||"",[E,k]=(0,o.useState)(b);function z(){E!==b&&p(t,{link:E?v:"",text:E})}return(0,o.useEffect)(()=>{k(b)},[s]),(0,n.jsx)(d.A,{className:e,color:x.input,placeholder:j,size:g,value:E,onChange:k,onEnterKeyPress:()=>z(),children:(0,n.jsx)(u.A,{color:x.saveButton||x.button,size:g,textColor:x.saveButtonText||x.buttonText,style:{width:h.EM},onClick:()=>z(),children:h.CE})})};var f=s(33464);let C=function(e){let t;e:{if(!e){t="";break e}let s=e.match(/^(http|https):\/\//)?e:`https://${e}`;try{new URL(s),t=s}catch(e){t=""}}return t};var p=s(54713),g=s(22878);let m=p.Ay.div.withConfig({componentId:"sc-36910e4b-0"})(["align-items:center;border-radius:inherit;display:flex;height:100%;justify-content:center;padding:4px;padding-right:0;width:100%;"]),j=p.Ay.img.withConfig({componentId:"sc-36910e4b-1"})(["border-radius:","px;max-height:100%;max-width:100%;object-fit:contain;"],({$size:e})=>(0,g.xb)(e)),w=({className:e,size:t,url:s})=>{let o=s?`https://www.google.com/s2/favicons?domain=${s}&sz=128`:"";return(0,n.jsx)(m,{className:e,children:(0,n.jsx)(j,{$size:t,alt:"",src:o})})},y=({autoFocus:e,children:t,className:s,color:r="#fff",defaultValue:c="",disabled:l,placeholder:i="Enter a url",selectOnFocus:a,size:u,style:h,value:x,onChange:p,onEnterKeyPress:g})=>{let m=(0,o.useRef)(x||c),[j,y]=(0,o.useState)(m.current||""),b=C((0,f.A)(j,800));return(0,o.useEffect)(()=>{b!==m.current&&(m.current=null,p?.(b))},[b]),(0,o.useEffect)(()=>{"string"==typeof x&&x!==j&&y(x)},[x]),(0,n.jsx)(d.A,{autoFocus:e,className:s,color:r,disabled:l,placeholder:i,preview:b?(0,n.jsx)(w,{size:u,url:b}):void 0,selectOnFocus:a,size:u,style:h,value:j,onChange:y,onEnterKeyPress:g,children:t})},b=({className:e,field:t,gifId:s,size:a})=>{let{colors:d,gifs:x,isCompact:f}=(0,o.useContext)(c.k),{changeField:C}=(0,o.useContext)(r.c),p=a||(f?h.Gj:h.oK),g=(0,l.N7)(t),m=(0,i.yR)(x,g,s)||"",j=(0,l.FJ)(t),w=`Add ${j.toLowerCase()}`,[b,v]=(0,o.useState)(m);function E(){b!==m&&C(t,b)}return(0,o.useEffect)(()=>{v(m)},[s]),(0,n.jsx)(y,{className:e,color:d.input,defaultValue:b,placeholder:w,selectOnFocus:!0,size:p,onChange:v,onEnterKeyPress:()=>E(),children:(0,n.jsx)(u.A,{color:d.saveButton||d.button,size:p,style:{width:h.EM},textColor:d.saveButtonText||d.buttonText,onClick:()=>E(),children:h.CE})})},v=({className:e,field:t,...s})=>{let{gifs:u,permissions:d}=(0,o.useContext)(c.k),{isCtaOn:h}=(0,o.useContext)(r.c),f=(0,i._Z)(u),C=(0,o.useMemo)(()=>!!h&&!!(0,a.MC)("cta",d)&&(0,l.dc)("cta").indexOf(f)>-1,[f,h,d]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b,{...s,className:e,field:t}),C&&(0,n.jsx)(x,{...s,field:"cta"})]})}}}]); 2//# sourceMappingURL=5175.a030e8fbd25361b3.js.map
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.