PageSourceSearch

https://app.simplified.com/static/js/9474.b75e8137.chunk.js

js simplified.com collected 2026-09-24 09:25:29 UTC 28,937 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksimplified_web=self.webpackChunksimplified_web||[]).push([[9474],{466783:(e,t,l)=>{l.d(t,{Z:()=>S});var a=l(587383),o=l(692877),i=l(691275),n=l(351839),d=l(553218),r=l(828865),s=l(90678),c=l(741065),u=l(270858),v=l(179822),m=l(778145),p=l(90583),h=(l(683017),l(791048)),g=l(104399),x=l(624839),_=l(293538),f=l(659840),T=l(228993);const S=function(e){var t,l,S,b,E;const{format:w,searchTerm:A,onSearch:M,breadcrumb:j,cmsPageContent:y,t:I,path:C,containerStyle:L,showBanner:D=!1,titleColor:P="content_active",subtitleColor:k="dark.content_note"}=e,R=(0,f.k6)(),O=(0,h.find)(y,{type:"Hero"}),[F,N]=(0,a.k)(),U=(0,o.S)({base:!0,md:!1}),B=(null===O||void 0===O||null===(t=O.value)||void 0===t?void 0:t.title)||(null===w||void 0===w?void 0:w.display_name),H=(null===O||void 0===O||null===(l=O.value)||void 0===l?void 0:l.description)||(null===w||void 0===w?void 0:w.description)||(null===w||void 0===w?void 0:w.image_width)&&(null===w||void 0===w?void 0:w.image_height)&&`${null===w||void 0===w?void 0:w.image_width}px X ${null===w||void 0===w?void 0:w.image_height}px`,$=(0,i.ff)("var(--chakra-colors-dark-base_alpha_200) !important","var(--chakra-colors-dark-base_alpha_400) !important");return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(_.q,{children:(0,T.jsx)("title",{children:`${(null===w||void 0===w?void 0:w.display_name)||""}${I("tab_titles.templates",{ns:"common"})}`})}),(!U||D)&&(0,T.jsxs)(n.k,{minH:"230px",borderRadius:"lg",justify:"space-between",direction:"row",p:U?3:"unset",pl:U?4:8,background:"base_level_3",backgroundSize:"100%",backgroundPosition:"center",...L,children:[(0,T.jsxs)(d.U,{spacing:3,mr:3,align:"start",alignSelf:"center",children:[C&&(0,T.jsx)(r.h,{onClick:()=>R.replace(C),"aria-label":"back button",borderRadius:"full",icon:(0,T.jsx)(m.FaArrowLeft,{})}),(0,T.jsxs)(n.k,{direction:"column",align:"start",gap:1,children:[j,(0,T.jsx)(s.X,{color:P,as:"h1",fontSize:["lg","lg","lg","2xl","2xl","4xl"],fontWeight:"medium",children:B}),(0,T.jsx)(c.x,{color:k,fontSize:"1rem",children:H}),M&&(0,T.jsxs)(u.x,{id:"tldr-templates-search-wrapper",tabIndex:0,onBlur:e=>function(e){var t;e.currentTarget.id!==(null===(t=e.relatedTarget)||void 0===t?void 0:t.id)&&N.off()}(e),mt:4,pos:"relative",children:[(0,T.jsx)(p.AVt,{onSearch:M,searchTerm:A,onFocus:function(){N.on()},handleEscKeyEvent:N.off,handleClearSearch:N.off,className:"mt-3",placeholder:I("templates.search",{ns:"templates"}),width:"400px",searchInputSx:{backdropFilter:"blur(4px)",backgroundColor:$,_placeholder:{color:"content_note"},_hover:{color:"content_active"},_focus:{color:"content_active"},_active:{color:"content_active"},color:"content_active"},addonIconColor:"content_active"}),F&&(0,T.jsx)(x.Z,{width:"400px",searchTerm:A,searchLocation:"dashboard",handleShowAllClick:e=>{N.off(),M(e)},setShowSuggestions:N,searchInFormats:!1,t:I,top:"40px",path:C})]})]})]}),!U&&(0,T.jsx)(v.E,{src:(null===O||void 0===O||null===(S=O.value)||void 0===S?void 0:S.image)||(null===w||void 0===w?void 0:w.hero)||g.DEFAULT_HERO_IMAGE,alt:(null===O||void 0===O||null===(b=O.value)||void 0===b?void 0:b.description)||(null===w||void 0===w?void 0:w.description),height:260,width:664,objectFit:"cover",objectPosition:"left bottom",title:(null===O||void 0===O||null===(E=O.value)||void 0===E?void 0:E.description)||(null===w||void 0===w?void 0:w.description)})]})]})}},792358:(e,t,l)=>{l.d(t,{K:()=>s});var a=l(270858),o=l(90583),i=l(683017),n=l(135642),d=l(228993);const r={slidesPerView:"auto",mousewheel:!0,keyboard:{enabled:!0},containerModifierClass:"template-category-swiper-specific-"},s=e=>{let{activePreview:t,setActivePreview:l,thumbnails:s,onChangeActivePreview:c}=e;const u=(0,i.useRef)();(0,i.useEffect)(()=>{var e,l;null===u||void 0===u||null===(e=u.current)||void 0===e||null===(l=e.swiper)||void 0===l||l.slideTo(null===t||void 0===t?void 0:t.index)},[null===t||void 0===t?void 0:t.index]),(0,i.useEffect)(()=>{(null===s||void 0===s?void 0:s.length)>0?l({url:s[0],index:0}):l({url:"",index:0})},[l,s]);const v=(null===s||void 0===s?void 0:s.length)>1?null===s||void 0===s?void 0:s.map((e,l)=>(0,d.jsx)(o.G85,{url:e,activePreviewUrl:t.url,onClick:()=>c({url:e,index:l}),pos:l},l)):[];return(null===s||void 0===s?void 0:s.length)>1?(0,d.jsx)(a.x,{mt:3,children:(0,d.jsx)(n.Z,{swiperParams:r,refs:u,children:v})}):null}},593035:(e,t,l)=>{l.d(t,{Z:()=>p});var a=l(616352),o=l(683017),i=l(904728),n=l(250090),d=l(536143),r=l(104399),s=l(90583),c=l(876120),u=l(764293),v=l(659840),m=l(228993);const p=function(e){var t,l;const[p,h]=(0,o.useState)(e.templates),g=(0,v.k6)(),x=(0,u.I0)(),[_,f]=(0,o.useState)(null),T=(null===(t=e.templates[0])||void 0===t?void 0:t.image_width)/(null===(l=e.templates[0])||void 0===l?void 0:l.image_height),S=Number(document.body.clientWidth/e.noColumns)-16,b=S/T;return(0,o.useEffect)(()=>{null!==_&&void 0!==_&&_.selectedAppSubscription||(async()=>{const e=await x((0,c.tD)());f(e)})()},[g.pathname,null===_||void 0===_?void 0:_.selectedAppSubscription]),(0,o.useEffect)(()=>{h(e.templates)},[e.templates]),(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(d.Z,{dataLength:null===p||void 0===p?void 0:p.length,hasMore:e.hasMore,loader:(0,m.jsx)(s.aNw,{}),next:e.loadMoreData,scrollableTarget:r.MAIN_CONTAINER_SCROLLABLE_TARGET_ID,children:(0,m.jsx)(i.r,{gridTemplateColumns:`repeat(${e.noColumns}, 1fr)`,gap:"16px",children:p.filter(e=>null!=e).map(t=>(0,m.jsx)(n.P,{children:(0,m.jsx)(a.Z,{data:t,width:S,height:b,t:e.t,toggleTemplatePreviewModal:e.toggleTemplatePreviewModal,hasPremiumAccess:_&&!(null!==_&&void 0!==_&&_.isFreePlan)||!1})},null===t||void 0===t?void 0:t.id))})})})}},130724:(e,t,l)=>{l.d(t,{E:()=>j});var a=l(313773),o=l(692877),i=l(587383),n=l(270858),d=l(351839),r=l(295903),s=l(129944),c=l(466783),u=l(791048),v=l(683017),m=l(104399),p=l(90583),h=l(593035),g=l(379274),x=l(363024),_=l(268809),f=l(876120),T=l(792358),S=l(774685),b=l(764293),E=l(501271),w=l(46750),A=l(659840),M=l(228993);const j=e=>{var t,l,j,y,I,C,L,D,P,k,R,O;let{t:F,path:N,templateTypePath:U,templateCategoriesResData:B,templateFormatResData:H,pageSEOResData:$,templatesResData:z}=e;const G=(0,A.k6)(),Z=G.location.pathname,[V]=(0,m.useAuth)(),{templatesPath:Y,templateCategory:K}=(0,g.UO)(),W=(0,b.I0)(),X=null===V||void 0===V?void 0:V.isAuthenticated,q=new AbortController,J=(0,o.S)({base:!0,md:!1}),Q=(0,o.S)({base:!0,md:!0,lg:!1}),ee=(0,o.S)({base:!0,md:!0,lg:!0,xl:!1}),te=(0,v.useMemo)(()=>(null===H||void 0===H?void 0:H.results)||[],[H]),le=(0,u.find)(te,{title:Y})||null,ae=(0,v.useMemo)(()=>(null===B||void 0===B?void 0:B.results)||[],[B]),oe=(0,u.find)(ae,{title:K})||{},ie=new URLSearchParams(G.location.search).get("search"),[ne,de]=(0,v.useState)({hasNext:!0,currentPageNumber:1,templates:[],searchTerm:ie||""}),re=N===m.VIDEO_TEMPLATES,[se,ce]=(0,i.k)(!1),[ue,ve]=(0,v.useState)(null);(0,v.useEffect)(()=>{null!==ue&&void 0!==ue&&ue.selectedAppSubscription||(async()=>{const e=await W((0,f.tD)());ve(e)})()},[null===ue||void 0===ue?void 0:ue.selectedAppSubscription]),(0,v.useEffect)(()=>{z&&me()},[z]);const me=(0,v.useCallback)(()=>{de({hasNext:null!==z.next,currentPageNumber:1,templates:(null===z||void 0===z?void 0:z.results)||[],searchTerm:Array.isArray(ie)?ie.join("-"):ie})},[z,ie,de]),pe=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;1===t&&ce.on();try{const l=(await(0,a.uRT)(Y,K,e,t,re?m.StoryTypes.ANIMATED:m.StoryTypes.ALL,q.signal)).data;de(a=>{var o;const i=null===a||void 0===a||null===(o=a.templates)||void 0===o?void 0:o.find(e=>null===e||void 0===e?void 0:e.isBlank);return{...a,hasNext:null!==l.next,currentPageNumber:t,templates:1===t?[i,...l.results]:[...a.templates,...l.results],searchTerm:e}})}catch(error){W((0,E.iM)(error))}finally{ce.off()}}
1,he=async e=>{await pe(e,1)};(0,v.useEffect)(()=>{K&&pe(ie,1)},[K]);const ge=(null===le||void 0===le?void 0:le.image_width)/(null===le||void 0===le?void 0:le.image_height),xe=J?ge<.6?3:2:Q?3:ee&&ge<1.7&&ge>.28?5:(0,m.getNumberOfSlidesPerView)(ge,J),[_e,fe]=(0,v.useState)({showTemplateModal:!1,templateModalDetail:{},onUseTemplate:null}),[Te,Se]=(0,i.k)(),[be,Ee]=(0,v.useState)(),we=(0,v.useCallback)((e,t)=>{fe({showTemplateModal:!_e.showTemplateModal,templateModalDetail:e,onUseTemplate:t})},[fe,_e]),[Ae,Me]=(0,v.useState)({url:"",index:0}),je=(e,t)=>{var l,a;0===(null===e||void 0===e||null===(l=e.thumbnails)||void 0===l?void 0:l.length)&&Me({url:e.image,index:0}),null===(a=document)||void 0===a||a.getElementById("preview-modal-header").scrollIntoView({behavior:"smooth"}),fe({showTemplateModal:!0,templateModalDetail:e,onUseTemplate:t})},[ye,Ie]=(0,v.useState)(m.INITIAL_SIMILAR_TEMPLATES),Ce=()=>{(e=>{var t,l,o;(0,a.kHe)(null===_e||void 0===_e||null===(t=_e.templateModalDetail)||void 0===t?void 0:t.tags,e,null===_e||void 0===_e||null===(l=_e.templateModalDetail)||void 0===l?void 0:l.format_title,null===_e||void 0===_e||null===(o=_e.templateModalDetail)||void 0===o?void 0:o.story_type).then(e=>{Ie(t=>{var l,a;return{...t,hasMore:null!==(null===e||void 0===e||null===(l=e.data)||void 0===l?void 0:l.next),results:[...ye.results,...e.data.results],page:null!==(null===e||void 0===e||null===(a=e.data)||void 0===a?void 0:a.next)?ye.page+1:ye.page,isLoading:!1}})}).catch(e=>W((0,E.iM)(e)))})(ye.page)},Le=G.location.pathname,De=(0,v.useCallback)(()=>{Le&&!(0,m.checkIfURLReplaceState)()&&window.history.replaceState(null,"",Le)},[Le]),Pe=(0,v.useCallback)(()=>{var e;null!==_e&&void 0!==_e&&null!==(e=_e.templateModalDetail)&&void 0!==e&&e.tags&&(0,m.replaceWindowURLState)(N,null===_e||void 0===_e?void 0:_e.templateModalDetail)},[N,null===_e||void 0===_e?void 0:_e.templateModalDetail]),[ke,Re]=(0,v.useState)(void 0),Oe=(0,v.useCallback)(()=>{if((0,m.analyticsTrackEvent)("editTemplateUsingAI"),null!==ue&&void 0!==ue&&ue.isFreePlan)return void Se.on();const e=(0,f.vK)(null===_e||void 0===_e?void 0:_e.templateModalDetail);e&&Re(e)},[_e,ue,Se]),Fe=(0,v.useCallback)(async e=>{let{data:t,name:l}=e;(0,m.downloadFile)(t,l||"edited-image.png"),Re(void 0)},[Re]);(0,v.useEffect)(()=>{var e,t;(null===_e||void 0===_e||null===(e=_e.templateModalDetail)||void 0===e||null===(t=e.tags)||void 0===t?void 0:t.length)>0&&null!==_e&&void 0!==_e&&_e.showTemplateModal&&(Pe(),Ce())},[null===_e||void 0===_e||null===(t=_e.templateModalDetail)||void 0===t?void 0:t.tags,null===_e||void 0===_e?void 0:_e.showTemplateModal]);const Ne=(0,M.jsx)(h.Z,{hasMore:!1,loadMoreData:Ce,templates:null===(l=(0,u.uniqBy)(null===ye||void 0===ye?void 0:ye.results,"id"))||void 0===l?void 0:l.slice(0,m.SIMILAR_TEMPLATES_TO_SHOW),noColumns:J?2:5,t:F,toggleTemplatePreviewModal:_e.showTemplateModal?je:we}),Ue=(null===_e||void 0===_e||null===(j=_e.templateModalDetail)||void 0===j||null===(y=j.tags)||void 0===y?void 0:y.length)>0?(0,M.jsx)(p.VnB,{t:F,isLoading:null===ye||void 0===ye?void 0:ye.isLoading,hasMore:!1,templates:null===ye||void 0===ye?void 0:ye.results,infiniteSimilarGrid:Ne,format_title:null===_e||void 0===_e||null===(I=_e.templateModalDetail)||void 0===I?void 0:I.format_title,category:null!==(C=null===_e||void 0===_e||null===(L=_e.templateModalDetail)||void 0===L||null===(D=L.category)||void 0===D?void 0:D[0])&&void 0!==C?C:"",height:null===_e||void 0===_e||null===(P=_e.templateModalDetail)||void 0===P?void 0:P.image_height,width:null===_e||void 0===_e||null===(k=_e.templateModalDetail)||void 0===k?void 0:k.image_width,path:N}):null,Be=(0,M.jsx)(T.K,{activePreview:Ae,setActivePreview:Me,thumbnails:null===_e||void 0===_e||null===(R=_e.templateModalDetail)||void 0===R?void 0:R.thumbnails,onChangeActivePreview:e=>{let{url:t,index:l}=e;return Me({url:t,index:l})}});return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(S.Z,{pageId:"templates",defaultNavbar:!J,overflowY:"auto",showSidebar:!0,children:(0,M.jsxs)(_.X,{t:F,showUpgradeModal:Te,selectedApp:be,templateModal:_e,handleCancelUpgrade:()=>{Se.off(),Pe()},children:[(0,M.jsx)(p.vb3,{children:(0,M.jsxs)(n.x,{background:"base_level_3",backgroundSize:"100%",backgroundPosition:"center",backdropFilter:"blur(32px)",children:[(0,M.jsx)(p.Mg_,{goBack:()=>{G.push(N)},searchText:ne.searchTerm||"",leftIcon:!0,onSearch:he,handleSearchClear:async()=>{await pe("",1)},extraSx:{px:4,pt:4,pb:2},topOffset:106,t:F,router:G}),(0,M.jsx)(d.k,{px:4,pb:4,borderBottom:"1px solid",borderBottomColor:"content_alpha_100",children:(0,M.jsx)(p.Gx1,{initialData:ae,templateFormatSlug:Y,templateCategorySlug:K,t:F,path:N,onNavigate:e=>G.push(e)})})]})}),(0,M.jsxs)(d.k,{p:{base:4,md:5},direction:"column",gap:J?3:6,children:[(0,M.jsx)(c.Z,{cmsPageContent:(null===$||void 0===$?void 0:$.content)||[],format:le,onSearch:he,searchTerm:ne.searchTerm,breadcrumb:(0,M.jsx)(p.w2N,{t:F,templateFormat:le,templateCategory:oe,path:N,templateTypePath:U,isUserAuthenticated:X,breadCrumbType:m.TemplateBreadCrumbsType.DEFAULT,asPath:Z}),t:F,path:N}),!J&&(0,M.jsx)(x.Z,{initialData:ae,templateFormatSlug:Y,templateCategorySlug:K,emptyCategory:{id:"all",title:"all",display_name:"All"},path:N}),se?Array.from({length:6}).map((e,t)=>(0,M.jsx)(r.O,{isLoaded:!1,w:"full",h:["100px","100px","100px","150px","200px"]},t)):(0,M.jsx)(h.Z,{hasMore:ne.hasNext,loadMoreData:async()=>{await pe(ne.searchTerm,ne.currentPageNumber+1)},templates:ne.templates,noColumns:Math.ceil(xe),t:F,toggleTemplatePreviewModal:_e.showTemplateModal?je:we}),!se&&0===(null===ne||void 0===ne||null===(O=ne.templates)||void 0===O?void 0:O.length)&&(0,M.jsx)(s.M,{flex:"1",children:(0,M.jsx)(p.c6M,{text:F("templates.no_templates",{ns:"templates"})})})]}),!(0,m.hideOnOtherDomain)()&&(0,M.jsx)(p.S9M,{pageId:"templates"})]})}),_e.showTemplateModal&&(0,M.jsx)(p.bqF,{onClose:()=>{fe(e=>({...e,showTemplateModal:!1})),Ie(m.INITIAL_SIMILAR_TEMPLATES),De()},details:_e.templateModalDetail,onUseTemplate:async()=>{var e;if(null!==ue&&void 0!==ue&&ue.isAuthenticated&&null!==(e=_e.templateModalDetail)&&void 0!==e&&e.is_premium&&ue.isFreePlan)return De(),(0,m.analyticsTrackEvent)("showUpgradeForPremiumTemplate",{product:ue.selectedApp}),void Se.on();null===_e||void 0===_e||_e.onUseTemplate()}
1,t:F,showBackgroundImage:!0,similarTemplatesComponent:Ue,swiperComponent:Be,activePreview:Ae,setActivePreview:Me,showMobileBottomBar:!0,onEditUsingAI:Oe}),!!ke&&(0,M.jsx)(w.Z,{defaultFile:ke,showDownload:!1,saveWithoutChanges:!0,onSave:Fe,onCancel:()=>Re(void 0),saveLabel:F("download",{ns:"common"})})]})}},268809:(e,t,l)=>{l.d(t,{X:()=>r});var a=l(104399),o=l(90583),i=l(370336),n=l(659840),d=l(228993);const r=e=>{var t,l,r;let{children:s,t:c,showUpgradeModal:u,selectedApp:v,templateModal:m,handleCancelUpgrade:p}=e;(0,n.k6)();const h=(0,i.Z)();return(0,d.jsxs)(d.Fragment,{children:[s,u&&(0,d.jsx)(o.XLS,{t:c,title:c((null===m||void 0===m||null===(t=m.templateModalDetail)||void 0===t?void 0:t.story_type)===a.StoryTypes.ANIMATED?"premium_video_template_modal.title":"premium_template_modal.title",{ns:"billing"}),subtitle:c((null===m||void 0===m||null===(l=m.templateModalDetail)||void 0===l?void 0:l.story_type)===a.StoryTypes.ANIMATED?"premium_video_template_modal.subtitle":"premium_template_modal.subtitle",{ns:"billing"}),featureList:((null===m||void 0===m||null===(r=m.templateModalDetail)||void 0===r?void 0:r.story_type)===a.StoryTypes.ANIMATED?a.premiumVideoTemplateFeatures:a.premiumTemplateFeatures).map(e=>({...e,title:c(e.title,{ns:e.translation}),info:c(e.info,{ns:e.translation})})),show:u,onHide:p,image:a.PREMIUM_TEMPLATE_IMAGE_DARK_URL,imageTextPrimary:c("modal.premium",{ns:"common"}),imageTextSecondary:c("modal.template",{ns:"common"}),onViewPlansHandler:()=>{var e,t,l;let o=null===(e=window)||void 0===e?void 0:e.location.origin;o===a.REDIRECT_TO_OTHER_DOMAIN_BASE_URL&&(o=a.APP_BASE_URL);const i={action:a.PostLoginAction.CLONE_TEMPLATE,id:null===(t=m.templateModalDetail)||void 0===t?void 0:t.id,template:null===(l=m.templateModalDetail)||void 0===l?void 0:l.template},n=new URLSearchParams(i),d=new URLSearchParams({action:a.PostLoginAction.CLONE_TEMPLATE,from:window.location.pathname,redirect:`${o}/login?${n.toString()}`}).toString();h({},`?${d}`)}})]})}},624839:(e,t,l)=>{l.d(t,{Z:()=>w});var a=l(683017),o=l(778145),i=l(270858),n=l(842554),d=l(351839),r=l(741065),s=l(459695),c=l(295903),u=l(129944),v=l(313773),m=l(104399),p=l(90583),h=l(764293),g=l(501271),x=l(659840),_=l(228993);const f={direction:"row",alignItems:"center",_hover:{backgroundColor:"base_level_2",cursor:"pointer"},padding:"0.5rem 1rem"},T={maxHeight:"350px",height:"auto",display:"flex",flexDirection:"column",color:"content_inactive",backgroundColor:"base_level_3",margin:"auto",borderRadius:"lg",position:"absolute",zIndex:"dropdown",marginTop:3,overflowY:"auto",boxShadow:"card",left:0},S={display:"flex",flexDirection:"row",justifyContent:"flexStart",alignItems:"center",margin:"0.5rem 0rem",padding:"0rem 1rem",svg:{path:{fill:"content_inactive"}},_hover:{backgroundColor:"base_level_2",cursor:"pointer"}},b={marginBottom:"0.25rem !important",padding:"0rem 1rem"},E={fontSize:"md",fontWeight:"medium",padding:"0rem 1rem",margin:"0.5rem 0rem 0rem 0rem !important",color:"content_disabled"};const w=function(e){const{searchTerm:t="",handleShowAllClick:l,searchInFormats:w=!0,setShowSuggestions:A={on:()=>{},off:()=>{}},width:M="400px",t:j,top:y="0",path:I=m.GRAPHIC_TEMPLATES}=e,C=(0,h.I0)(),[L,D]=(0,a.useState)([]),[P,k]=(0,a.useState)(!1),[R,O]=(0,a.useState)([]),F=(0,x.k6)();return(0,a.useEffect)(()=>(w&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";(0,v.$Dz)(e,!1).then(e=>{O(null===e||void 0===e?void 0:e.data)}).catch(e=>C((0,g.iM)(e)))}(t),(null===t||void 0===t?void 0:t.length)>=m.SEARCH_KEYWORD_CHAR_LIMIT&&function(e){var t;k(!0),null===(t=(0,v.Ke1)(e))||void 0===t||t.then(e=>{D(e.data.tag_suggest__completion[0].options),k(!1)}).catch(e=>C((0,g.iM)(e)))}(t),()=>{}),[t]),(0,_.jsxs)(i.x,{sx:T,w:M,top:y,children:[!P&&L.length>0?(0,_.jsx)(n.aV,{children:L.map((e,t)=>(0,_.jsxs)(n.HC,{as:d.k,sx:f,onClick:()=>{return t=null===e||void 0===e?void 0:e.text,void(l&&l(t));var t},children:[(0,_.jsx)(n.DE,{as:o.FaSearch,mr:3}),(0,_.jsx)(r.x,{children:null===e||void 0===e?void 0:e.text})]},t))}):P?(0,_.jsxs)(s.K,{px:"1rem",py:"0.5rem",children:[(0,_.jsx)(c.O,{height:"20px"}),(0,_.jsx)(c.O,{height:"20px"})]}):null,(null===t||void 0===t?void 0:t.length)>0&&(0,_.jsxs)(i.x,{sx:S,onClick:function(){l&&l(t)},children:[(0,_.jsx)("span",{children:(0,_.jsx)(o.FaSearch,{})}),(0,_.jsxs)(i.x,{children:[(0,_.jsx)(r.x,{sx:E,children:j("search.show_all",{ns:"templates"})}),(0,_.jsx)(r.x,{noOfLines:1,sx:b,children:t})]})]}),w?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(r.x,{sx:E,children:j("search.suggested_formats",{ns:"templates"})}),R.length>0?(0,_.jsx)(n.aV,{children:R.map((e,t)=>{var l;return(0,_.jsxs)(n.HC,{as:d.k,direction:"row",align:"center",_hover:{backgroundColor:"base_level_2",cursor:"pointer"},px:"4",py:"2",onClick:()=>function(e){let t=I;t=e.story_type===m.StoryTypes.ANIMATED?m.VIDEO_TEMPLATES:m.GRAPHIC_TEMPLATES,A.off(),F.push({pathname:`${t}/${null===e||void 0===e?void 0:e.title}`,search:""})}(e),children:[(0,_.jsx)(u.M,{borderRadius:"full",h:6,w:6,bgColor:(0,m.getFormatColorByTitle)(null===e||void 0===e?void 0:e.title),mr:3,children:null!==e&&void 0!==e&&null!==(l=e.payload)&&void 0!==l&&l.icon?(0,_.jsx)(p.Hdq,{icon:e.payload.icon,color:"white",style:{display:"inline",marginRight:"var(--chakra-space-3)",verticalAlign:"text-bottom",flexShrink:0,margin:"0 auto"}}):(0,_.jsx)(p.Hdq,{icon:"FaPencilAlt",color:"white",style:{display:"inline",marginRight:"var(--chakra-space-3)",verticalAlign:"text-bottom",flexShrink:0,margin:"0 auto"}})}),(0,_.jsxs)(d.k,{direction:"column",align:"flex-start",children:[(0,_.jsx)(r.x,{children:e.display_name}),(0,_.jsxs)(r.x,{color:"content_disabled",fontSize:"sm",children:[e.image_width," x ",e.image_height]})]})]},t)})}):0===R.length?(0,_.jsx)(r.x,{sx:b,px:4,pb:4,children:j("search.no_formats",{ns:"templates"})}):null]}):null]})}},289474:(e,t,l)=>{l.r(t),l.d(t,{default:()=>m});var a=l(313773),o=l(104399),i=l(408499),n=l(379274),d=l(683017),r=l(130724),s=l(501271),c=l(764293),u=l(228993);const v=["navbar","accounts","billing","gt-navbar","templates","studio","common"];const m=function(){const{t:e}=(0,i.$)(v),t=(0,c.I0)(),{templatesPath:l,templateCategory:m}=(0,n.UO)(),[p,h]=(0,d.useState)([]),[g,x]=(0,d.useState)([]),[_,f]=(0,d.useState)(null),[T,S]=(0,d.useState)(null);return(0,d.useEffect)(()=>{(async()=>
1{try{const e=["templates",l||"",m].filter(Boolean).join("-"),t=await Promise.allSettled([(0,a.kgg)(!0,o.TEMPLATE_CATEGORY_TYPE_TEMPLATE,l),(0,a.oCz)(l),(0,a.iW0)(e),(0,a.uRT)(l,m,"",1,o.StoryTypes.ANIMATED)]),[i,n,d,r]=t.map(e=>e);h(i.status===o.PROMISE_CALL_FULFILLED&&i.value.data?i.value.data:[]),x(n.status===o.PROMISE_CALL_FULFILLED&&n.value.data?n.value.data:[]),f(d.status===o.PROMISE_CALL_FULFILLED?d.value.data:d.reason.toString()),S(r.status===o.PROMISE_CALL_FULFILLED?r.value.data:r.reason.toString())}catch(error){t((0,s.iM)(error))}})()},[]),(0,d.useEffect)(()=>{try{(async()=>{const e=["templates",l||"",m].filter(Boolean).join("-"),t=await(0,a.iW0)(e);f(t.data)})()}catch{t((0,s.iM)(error))}},[m]),(0,u.jsx)(r.E,{t:e,path:o.VIDEO_TEMPLATES,templateTypePath:o.VIDEO_TEMPLATES,templateCategoriesResData:p,templateFormatResData:g,pageSEOResData:_,templatesResData:T})}},876120:(e,t,l)=>{l.d(t,{tD:()=>n,vK:()=>d});var a=l(313773),o=l(104399),i=l(501271);const n=()=>async(e,t)=>{const l=t();let n=null===l||void 0===l?void 0:l.apps;try{var d,r,s,c,u,v,m,p,h,g,x,_;!n&&null!==l&&void 0!==l&&l.auth&&(n=await e((f=null===(d=l.auth)||void 0===d||null===(r=d.payload)||void 0===r||null===(s=r.user)||void 0===s?void 0:s.pk,async e=>{try{const e=await(0,a.rnV)({fields:"",expand:"features,t_plan,extra,android",pagination:"false",omit:"t_plan.feature_list",user:f});if(e.data.length>0){let t={};return e.data.forEach(e=>{e.t_plan&&(t[e.t_plan.product_env]={...e})}),t}}catch(error){e((0,i.iM)(error))}})));const t=(null===l||void 0===l||null===(c=l.auth)||void 0===c||null===(u=c.payload)||void 0===u||null===(v=u.user)||void 0===v||null===(m=v.context)||void 0===m||null===(p=m.ui_state)||void 0===p?void 0:p.selected_product)||o.ENVIRONMENT_ROOT.design,T=(null===(h=n)||void 0===h?void 0:h[t])||(null===(g=n)||void 0===g?void 0:g[o.PRODUCTS.ALL])||(null===(x=n)||void 0===x?void 0:x[o.PRODUCTS.FREE_TOOLS]),S=(0,o.hasPaidSubscription)(n);return{isAuthenticated:null===l||void 0===l||null===(_=l.auth)||void 0===_?void 0:_.isAuthenticated,isFreePlan:!S,selectedApp:t,selectedAppSubscription:T}}catch(error){console.error(error)}var f},d=e=>{var t;return(null===e||void 0===e?void 0:e.image)||(null===e||void 0===e||null===(t=e.thumbnails)||void 0===t?void 0:t[0])}},774685:(e,t,l)=>{l.d(t,{Z:()=>L});var a=l(683017),o=l(90583),i=l(104399),n=l(692877),d=l(351839),r=l(270858),s=l(379274),c=l(408499),u=l(778145),v=l(817745),m=l(773414),p=l(828865),h=l(298249),g=l(128126),x=l(807523),_=l(157653),f=l(177612),T=l(677360),S=l(902352),b=l(179822),E=l(741065),w=l(919941),A=l(228993);const M=e=>{let{pageId:t}=e;const{t:l}=(0,c.$)(["navbar"]),[o,n]=(0,a.useState)(!1),[s]=(0,i.useLocalStorage)(i.STORE_LOCAL_STORAGE_KEY,i.INITIAL_STORE),[M,j]=(0,i.useLocalStorage)(i.LAST_SELECTED_SECTION_KEY),y=(0,a.useMemo)(()=>{let e;const l=i.APP_SECTIONS.filter(e=>{var l;return e.id===t||(null===e||void 0===e||null===(l=e.children)||void 0===l?void 0:l.find(e=>e.id===t))});return 1===l.length?e=l[0]:l.length>1&&(e=l.find(e=>e.id===M)||l[0]),e?(j(e.id),e):M?i.APP_SECTIONS.find(e=>e.id===M):void 0},[t]),I=(0,a.useMemo)(()=>{var e,t;return null===y||void 0===y||null===(e=y.children)||void 0===e||null===(t=e.filter(e=>e.showInMobileMenu||e.showOnlyInMobileMenu))||void 0===t?void 0:t.map(e=>{var t;return{...e,children:null===e||void 0===e||null===(t=e.children)||void 0===t?void 0:t.filter(e=>!e.hideOnSSR)}})},[y]);return(0,A.jsx)(r.x,{display:["flex","flex","flex","none","none"],position:"fixed",zIndex:"modal",bottom:0,w:"full",bg:"base_level_3",h:i.DEFAULT_BOTTOM_BAR_HEIGHT,children:(0,A.jsx)(m.h,{spacing:0,alignItems:"center",justifyContent:"space-around",w:"full",children:null===I||void 0===I?void 0:I.map(e=>(0,A.jsx)(d.k,{flex:"1",justifyContent:"center",children:"plus"===e.id?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(p.h,{"aria-label":l(`main_menu.${e.id}`),size:"md",fontSize:"lg",alignSelf:"center",isRound:!0,variant:"solid",icon:(0,A.jsx)(h.J,{w:5,h:5,as:u.FaPlus,transition:"transform 200ms ease-in-out",transform:o?"rotate(45deg)":""}),onClick:()=>n(!o)}),o&&(0,A.jsxs)(g.dy,{isOpen:!0,placement:"bottom",onClose:()=>n(!1),children:[(0,A.jsx)(x.Z,{}),(0,A.jsxs)(_.s,{marginBottom:i.DEFAULT_BOTTOM_BAR_HEIGHT,background:"base_level_2",borderTopLeftRadius:"lg",borderTopRightRadius:"lg",boxShadow:"none",children:[(0,A.jsx)(f.x,{paddingY:3,textAlign:"center",children:l(`main_menu.${e.title}`)}),(0,A.jsx)(T.f,{paddingTop:0,paddingBottom:1,children:e.children.map(e=>(0,A.jsxs)(a.Fragment,{children:[(null===e||void 0===e?void 0:e.hasDivider)&&(0,A.jsx)(S.i,{my:2,w:"full"}),(0,A.jsxs)(d.k,{as:v.rU,to:e.path,alignItems:"center",backgroundColor:"base_level_3",borderRadius:"lg",ga
1p:3,marginBottom:2,paddingX:4,paddingY:3,children:[(0,A.jsx)(r.x,{width:6,children:(0,w.PX)(null===e||void 0===e?void 0:e.icon)?(0,A.jsx)(b.E,{src:null===e||void 0===e?void 0:e.icon}):(0,A.jsx)(h.J,{as:e.icon,fontSize:"2xl",color:null===e||void 0===e?void 0:e.color})}),(0,A.jsxs)(d.k,{flex:"1",direction:"column",alignItems:"flex-start",children:[(0,A.jsx)(E.x,{fontSize:"md",fontWeight:"500",color:"content_active",children:l(`main_menu.${e.id}`)}),(0,A.jsx)(E.x,{fontSize:"xs",color:"content_details",children:l(`main_menu.${e.id}_description`)})]}),(0,A.jsx)(h.J,{as:e.iconRight||u.FaArrowRight,fontSize:"sm",color:"content_inactive"})]},e.id)]},e.id))})]})]})]}):(0,A.jsxs)(d.k,{direction:"column",justifyContent:"center",alignItems:"center",flex:1,mr:"10px",gap:2,as:v.rU,to:e.path,children:[(0,A.jsx)(p.h,{size:"md",fontSize:"lg",alignSelf:"center",rounded:"full",variant:"secondary",display:"contents","aria-label":e.id,icon:(0,A.jsx)(h.J,{w:5,h:5,as:e.icon,color:e.id===t?"common.primary_400":"content_inactive"})}),e.id&&(0,A.jsx)(E.x,{fontSize:"10px",textAlign:"center",noOfLines:1,color:e.id===t?"common.primary_400":"content_inactive",children:l(`main_menu.${e.id}`)})]})},e.id))})})};var j=l(764293),y=l(544723),I=l(783786),C=l(29200);const L=e=>{let{children:t,overflowY:l="hidden",defaultNavbar:c=!0,paddingBottom:u=[i.DEFAULT_BOTTOM_BAR_HEIGHT,i.DEFAULT_BOTTOM_BAR_HEIGHT,"0","0"],isQuickTool:v=!1,showLandingPageFooter:m=!1,pageId:p,hideNavbar:h,noMaxHeight:g,wrapperProps:x,customNavbar:_=null,showSidebar:f=!1,sidebarChildren:T,renderSidebarBottomCard:S,navbarChildren:b}=e;const E=(0,s.TH)(),w=(0,j.I0)(),L=(0,j.v9)(e=>{var t;return null===(t=e.auth.payload)||void 0===t?void 0:t.user}),D=(0,j.v9)(e=>e.apps),P=(0,n.S)({base:!0,md:!1}),[k]=(0,i.useLocalStorage)(i.LAST_SELECTED_SECTION_KEY),[R]=(0,i.useAuth)(),[O,F]=(0,i.useLocalStorage)("sidebar",!0),N=(0,a.useCallback)(()=>{F(!O)},[O,F]),U=(0,a.useCallback)(function(){F(arguments.length>0&&void 0!==arguments[0]&&arguments[0])},[F]),B=null===R||void 0===R?void 0:R.isAuthenticated,H=(0,a.useCallback)(e=>{var t,l,a;(null===L||void 0===L||null===(t=L.context)||void 0===t||null===(l=t.ui_state)||void 0===l?void 0:l.selected_product)!==e&&w((0,I.Db)(e,null===L||void 0===L?void 0:L.context,null===D||void 0===D||null===(a=D[e])||void 0===a?void 0:a.id))},[w,null===L||void 0===L?void 0:L.context,D]),$=(0,a.useMemo)(()=>{let e;if(p===i.ROOT_SECTION)return null;const t=i.MAIN_MENU_ITEMS.filter(e=>{var t;return e.id===p||(null===e||void 0===e||null===(t=e.children)||void 0===t?void 0:t.find(e=>e.id===p&&!e.openInNewTab))});if(1===t.length)e=t[0];else if(t.length>1){var l,a;const o=null===E||void 0===E||null===(l=E.pathname)||void 0===l||null===(a=l.split("/"))||void 0===a?void 0:a[1];e=t.find(e=>e.id===k||e.id===o)||t[0]}return e?(H((0,i.getProductNameFromURL)(E.pathname)),e):k?i.MAIN_MENU_ITEMS.find(e=>e.id===k):void 0},[p]),z=P&&!v&&!(0,i.hideOnOtherDomain)()&&B;return(0,A.jsxs)(d.k,{flex:1,overflow:"hidden",h:"full",children:[f&&(0,A.jsx)(y.Y,{open:O,onToggle:N,onOpen:U,pageId:p,renderSidebarBottomCard:S,children:T}),(0,A.jsxs)(d.k,{direction:"column",w:"full",h:"full",flex:1,minW:0,overflowY:"auto",transition:"width .2s ease-out",children:[(0,A.jsxs)(r.x,{as:"main",bg:"base_level_1",className:"app",id:i.MAIN_CONTAINER_SCROLLABLE_TARGET_ID,minH:`calc(100vh - ${i.DEFAULT_BOTTOM_BAR_HEIGHT})`,maxH:g?"none":P?`calc(100vh - ${i.DEFAULT_BOTTOM_BAR_HEIGHT})`:v?"none":"100vh",pb:null!==u&&void 0!==u?u:v?[0,0,0,0]:[i.DEFAULT_BOTTOM_BAR_HEIGHT,i.DEFAULT_BOTTOM_BAR_HEIGHT,0,0],overflowY:l,...x,children:[!h&&(c?B?_||(0,A.jsx)(C.Z,{pageId:p,onSidebarToggle:N,sidebarOpen:O,showSidebar:f,appSection:$,showAppSwitcher:!1,children:b}):void 0:null),t,z&&(0,A.jsx)(A.Fragment,{children:(0,A.jsx)(M,{pageId:p||"templates"})})]}),m&&!B&&(0,A.jsx)(o.CdE,{})]})]})}}}]);
2//# sourceMappingURL=9474.b75e8137.chunk.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.