1import{f as re,F as le,e as r,b1 as ue,cl as ce,b0 as _e,a8 as ve}from"./BH0Y71da.js";import{w as te,o as ye,K as fe,r as E,n as de,c as W,m as he,N as we,b as s,d as n,e as l,u as e,v as p,x as F,q as x,y as H,H as A,F as V,G as R,E as S,M as ee,p as oe,T as Te,I as se,V as ne}from"./gPsfePlh.js";import{u as be,T as ge}from"./CUF1bQXo.js";import{F as pe}from"./Cthu6XmW.js";import{u as ke}from"./BC5cdIfG.js";import{b as Ie}from"./BQgCCCVp.js";import{u as ie}from"./BzLkaU-U.js";import{A as Ee}from"./CjmIDHTd.js";import{u as Le}from"./SWo1WDF4.js";import"./pAgP-qoL.js";import"./BTxTXBVJ.js";import"./_HH5winL.js";import"./C3Fv-oJS.js";import"./Bh2Z5KOr.js";import"./DFZeXhrP.js";import"./DHwmLlUr.js";import"./OXkajaPs.js";import"./C5YB_XCO.js";import"./B_H4L7IM.js";(function(){try{var u=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new u.Error().stack;c&&(u._sentryDebugIds=u._sentryDebugIds||{},u._sentryDebugIds[c]="399513df-3962-4843-ab58-b4ca7c1d0097",u._sentryDebugIdIdentifier="sentry-dbid-399513df-3962-4843-ab58-b4ca7c1d0097")}catch{}})();const Pe=[{id:"placeholder-1",width:720,height:1080},{id:"placeholder-2",width:1080,height:1080},{id:"placeholder-3",width:900,height:1200},{id:"placeholder-4",width:1080,height:1350},{id:"placeholder-5",width:1160,height:820},{id:"placeholder-6",width:720,height:1280},{id:"placeholder-7",width:720,height:1080},{id:"placeholder-8",width:1080,height:1350}],Ce=(u,c)=>{const d=Array.from({length:c},()=>[]),i=Array.from({length:c},()=>0);return u.forEach(f=>{const w=i.indexOf(Math.min(...i));d[w].push(f),i[w]+=f.height/f.width+.24}),d},Me=()=>{const{trackButtonClick:u}=ke(),{resolvePath:c}=re(),d=be({logModuleName:"TemplatePhotoshoot"}),i=E(null),f=E("up"),w=E(null),b=E(4),z=E(!1),g=E(0);let _=null,$="",D="",h="",L="",P="",k="",C=0;const Y=W(()=>Ce(Pe,b.value)),j=W(()=>{if(!g.value)return;const a=Math.round(Math.min(g.value*.92,760));return{"--template-photoshoot-viewport-height":`${g.value}px`,"--template-photoshoot-panel-height":`${a}px`}}),q=a=>{u("FEATURE_CLICK",{screen_name:a.id,feature_name:le.TRY_IT}),i.value=a},M=()=>{i.value=null},N=a=>{const v=i.value?.id,y=d.templates.value.findIndex(t=>t.id===v),I=d.templates.value.findIndex(t=>t.id===a.id);y<0||I<0||y===I||(f.value=I<y?"up":"down",i.value=a)},G=()=>{C=window.scrollY,$=document.body.style.overflow,D=document.body.style.position,h=document.body.style.top,L=document.body.style.width,P=document.documentElement.style.overflow,k=document.documentElement.style.scrollBehavior,document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${C}px`,document.body.style.width="100%"},U=()=>{document.documentElement.style.scrollBehavior="auto",document.documentElement.style.overflow=P,document.body.style.overflow=$,document.body.style.position=D,document.body.style.top=h,document.body.style.width=L,window.scrollTo(0,C),document.documentElement.style.scrollBehavior=k,P="",k="",$="",D="",h="",L="",C=0},K=a=>{if(i.value){if(a.key==="ArrowUp"||a.key==="ArrowDown"){if(a.metaKey||a.ctrlKey||a.altKey)return;const v=d.templates.value.findIndex(I=>I.id===i.value?.id),y=v+(a.key==="ArrowUp"?-1:1);if(v<0||y<0||y>=d.templates.value.length)return;a.preventDefault(),N(d.templates.value[y]);return}a.key==="Escape"&&(a.preventDefault(),M())}},X=()=>{i.value&&!d.templates.value.some(a=>a.id===i.value?.id)&&M()},J=()=>{if(!i.value)return;u("FEATURE_CLICK",{screen_name:i.value.id,feature_name:le.TRY_THIS_TEMPLATE});const a=Ie(i.value,{resolvePath:c});window.open(a,"_blank","noopener,noreferrer"),M()},B=()=>{const a=Math.min(1480,Math.max(0,window.innerWidth-(window.innerWidth<860?32:56)));b.value=a<560||a<860?2:a<1180?3:4},T=()=>{g.value=Math.round(window.visualViewport?.height||window.innerHeight)},Q=async()=>{_&&(await de(),_.disconnect(),w.value&&_.observe(w.value))};return te(()=>d.templates.value,()=>{X()}),te(i,(a,v)=>{if(a&&!v){G();return}!a&&v&&U()}),ye(()=>{"IntersectionObserver"in window&&(_=new IntersectionObserver(([a])=>{z.value=!!(a&&!a.isIntersecting)},{threshold:0})),window.addEventListener("resize",B,{passive:!0}),window.addEventListener("resize",T,{passive:!0}
1),window.visualViewport?.addEventListener("resize",T,{passive:!0}),window.visualViewport?.addEventListener("scroll",T,{passive:!0}),window.addEventListener("keydown",K),B(),T(),Q()}),fe(()=>{window.removeEventListener("resize",B),window.removeEventListener("resize",T),window.visualViewport?.removeEventListener("resize",T),window.visualViewport?.removeEventListener("scroll",T),window.removeEventListener("keydown",K),i.value&&U(),_?.disconnect(),_=null}),{...d,selectedTemplate:i,modalTransitionDirection:f,filtersStickySentinelRef:w,isFiltersStuck:z,modalViewportStyle:j,placeholderColumns:Y,openTemplate:q,selectModalTemplate:N,closeModal:M,handleTryTemplate:J}},Be={class:"template-photoshoot template-photoshoot--inpaint"},Ae={class:"template-photoshoot__shell template-photoshoot__hero-grid"},Ve={class:"template-photoshoot__hero-copy"},Re=["aria-label"],Se={class:"template-photoshoot__feature-pill template-photoshoot__feature-pill--active"},$e={class:"template-photoshoot__shell"},De=["aria-label"],Fe={class:"template-photoshoot__filter-row"},ze={class:"template-photoshoot__filter-label"},Ne=["disabled","onClick"],Ue={key:0},Ke={key:0,class:"template-photoshoot__filter-row"},Oe={class:"template-photoshoot__filter-label"},He=["disabled","onClick"],We={key:0},Ye=["aria-label"],je={class:"template-photoshoot__masonry"},qe={key:1,class:"template-photoshoot__status",role:"alert"},Ge={key:2,class:"template-photoshoot__status"},Xe=["aria-label"],Je={class:"template-photoshoot-modal__media"},Qe=["alt"],Ze={class:"template-photoshoot-modal__details"},xe={class:"template-photoshoot-modal__details-scroll","data-lenis-prevent":""},et={class:"template-photoshoot-modal__summary"},tt={class:"template-photoshoot-modal__category"},ot={key:0,class:"template-photoshoot-modal__tags"},at={key:0,class:"template-photoshoot-modal__switcher"},lt={class:"template-photoshoot-modal__switcher-scroll","data-lenis-prevent":""},st=["aria-current","aria-label","onClick"],nt={alt:"",decoding:"async"},it=he({__name:"index",setup(u){const{resolvePath:c}=re(),{target:d,isVisible:i}=ie({threshold:.08}),{target:f,isVisible:w}=ie({threshold:.04}),b=E(null),{categories:z,scenes:g,templates:_,activeCategoryKey:$,activeSceneKey:D,selectedTemplate:h,modalTransitionDirection:L,isCategoriesLoading:P,isTemplatesLoading:k,isLoadingMore:C,templateError:Y,canLoadMore:j,modalViewportStyle:q,placeholderColumns:M,isTemplateImageLoaded:N,hasTemplateImageError:G,markTemplateImageLoaded:U,markTemplateImageError:K,selectCategory:X,selectScene:J,retryTemplates:B,loadMoreTemplates:T,openTemplate:Q,selectModalTemplate:a,closeModal:v,handleTryTemplate:y}=Me(),I=()=>{(Array.isArray(b.value)?b.value.find(m=>m.classList.contains("template-photoshoot-modal__switcher-item--active")):b.value)?.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})};return te(()=>h.value?.id,()=>{de(I)},{immediate:!0}),(t,m)=>{const me=ue,ae=we("lazy");return s(),n("main",Be,[l("section",{ref_key:"heroRevealTarget",ref:d,class:A(["template-photoshoot__hero",{"template-photoshoot__hero--revealed":e(i)}])},[l("div",Ae,[l("div",Ve,[l("nav",{class:"template-photoshoot__feature-switch","aria-label":("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.filters.ariaLabel")},[l("span",Se,p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.navTitle")),1),F(me,{class:"template-photoshoot__feature-pill",to:e(c)(e(pe).VideoTemplate)},{default:x(()=>[H(p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templateVideo.navTitle")),1)]),_:1},8,["to"])],8,Re),l("h1",null,p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.hero.title")),1),l("p",null,p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.hero.description")),1)])])],2),l("section",{ref_key:"libraryRevealTarget",ref:f,class:A(["template-photoshoot__library",{"template-photoshoot__library--revealed":e(w)}])},[l("div",$e,[l("div",{class:"template-photoshoot__filters","aria-label":("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.filters.ariaLabel")},[l("div",Fe,[l("span",ze,p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.filters.category")),1),(s(!0),n(V,null,R(e(z),o=>(s(),n("button",{key:`category-${o.key}`,type:"button",class:A(["template-photoshoot__filter",{active:o.key===e($)}]),disabled:e(P)||e(k),onClick:O=>e(X)(o.key)},[H(p(o.label)+" ",1),o.count!==void 0&&o.key!=="all"?(s(),n("span",Ue,p(o.count),1)):S("",!0)],10,Ne))),128))]),e(g).length>1?(s(),n("div",Ke,[l("span",Oe,p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.filters.scene")),1),(s(!0),n(V,null,R(e(g),o=>(s(),n("button",{key:`scene-${o.key}`,type:"button",class:A(["template-photoshoot__filter",{active:o.key===e(D)}]),disabled:e(P)||e(k),onClick:O=>e(J)(o.key)},[H(p(o.label)+" ",1),o.count!==void 0&&o.key!=="all"?(s(),n("span",We,p(o.c
1ount),1)):S("",!0)],10,He))),128))])):S("",!0)],8,De),e(k)?(s(),n("div",{key:0,class:"template-photoshoot__loading","aria-label":("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.list.loadingAriaLabel")},[m[4]||(m[4]=l("div",{class:"template-photoshoot__loading-bar","aria-hidden":"true"},null,-1)),l("div",je,[(s(!0),n(V,null,R(e(M),(o,O)=>(s(),n("div",{key:`placeholder-column-${O}`,class:"template-photoshoot__masonry-column"},[(s(!0),n(V,null,R(o,Z=>(s(),n("span",{key:Z.id,class:"template-photoshoot-card template-photoshoot-card--placeholder"},[l("span",{class:"template-photoshoot-card__media",style:ee({aspectRatio:`${Z.width} / ${Z.height}`})},null,4)]))),128))]))),128))])],8,Ye)):e(Y)?(s(),n("div",qe,[l("strong",null,p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.status.error")),1),l("button",{type:"button",onClick:m[0]||(m[0]=(...o)=>e(B)&&e(B)(...o))},p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.status.retry")),1)])):e(_).length?(s(),oe(e(ge),{key:3,items:e(_),"can-load-more":e(j),"is-loading-more":e(C),"is-template-image-loaded":e(N),"has-template-image-error":e(G),"aria-label":("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.list.ariaLabel"),onLoadMore:e(T),onTemplateClick:e(Q),onImageLoad:e(U),onImageError:e(K)},null,8,["items","can-load-more","is-loading-more","is-template-image-loaded","has-template-image-error","aria-label","onLoadMore","onTemplateClick","onImageLoad","onImageError"])):(s(),n("div",Ge,[l("strong",null,p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.status.empty")),1)]))])],2),(s(),oe(Te,{to:"body"},[e(h)?(s(),n("div",{key:0,class:"template-photoshoot-modal",role:"dialog","aria-modal":"true",style:ee(e(q))},[l("div",{class:"template-photoshoot-modal__backdrop","aria-hidden":"true",onClick:m[1]||(m[1]=(...o)=>e(v)&&e(v)(...o))}),l("section",{class:A(["template-photoshoot-modal__panel template-photoshoot-modal__panel--inpaint",{"template-photoshoot-modal__panel--with-switcher":e(_).length>1}])},[l("button",{class:"template-photoshoot-modal__close",type:"button","aria-label":("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.modal.closeAriaLabel"),onClick:m[2]||(m[2]=(...o)=>e(v)&&e(v)(...o))},[F(e(ce),{"aria-hidden":"true"})],8,Xe),l("div",Je,[F(ne,{name:`template-photoshoot-modal-media-${e(L)}`},{default:x(()=>[se((s(),n("img",{key:e(h).id,alt:e(h).title,style:ee({aspectRatio:`${e(h).width} / ${e(h).height}`}),decoding:"async"},null,12,Qe)),[[ae,e(h).posterUrl]])]),_:1},8,["name"])]),l("aside",Ze,[l("div",xe,[F(ne,{name:`template-photoshoot-modal-details-${e(L)}`},{default:x(()=>[(s(),n("div",{key:e(h).id,class:"template-photoshoot-modal__details-content"},[l("div",et,[l("p",tt,p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.fallback.category")),1)]),e(h).tags.length?(s(),n("div",ot,[(s(!0),n(V,null,R(e(h).tags,o=>(s(),n("span",{key:o},p(o),1))),128))])):S("",!0)]))]),_:1},8,["name"])]),l("button",{class:"template-photoshoot-modal__cta",type:"button",onClick:m[3]||(m[3]=(...o)=>e(y)&&e(y)(...o))},[H(p(("useTranslateI18n"in t?t.useTranslateI18n:e(r))("templatePhotoshoot.modal.cta"))+" ",1),F(e(Ee),{"aria-hidden":"true"})])]),e(_).length>1?(s(),n("aside",at,[m[5]||(m[5]=l("div",{class:"template-photoshoot-modal__switcher-header","aria-hidden":"true"},null,-1)),l("div",lt,[(s(!0),n(V,null,R(e(_),o=>(s(),n("button",{key:o.id,ref_for:!0,ref_key:"activeTemplateButtonRef",ref:b,class:A(["template-photoshoot-modal__switcher-item",{"template-photoshoot-modal__switcher-item--active":o.id===e(h).id}]),type:"button","aria-current":o.id===e(h).id?"true":void 0,"aria-label":o.title,onClick:O=>e(a)(o)},[se(l("img",nt,null,512),[[ae,o.thumbUrl||o.posterUrl]])],10,st))),128))])])):S("",!0)],2)],4)):S("",!0)]))])}}}),rt=Object.assign(_e(it,[["__scopeId","data-v-3ccf00a5"]]),{__name:"MorzaiPagesFeatureAiPhotoshootTemplate"}),Ct=he({__name:"ai-photoshoot-template",setup(u){const c=ve(),d=W(()=>r("templatePhotoshoot.hero.title",[],c)),i=W(()=>r("templatePhotoshoot.hero.description",[],c));return Le({path:pe.AiPhotoshootTemplate,title:d,description:i}),(f,w)=>(s(),oe(rt))}});
1export{Ct as default};
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.