(We=>{var be,ve,Fe,Pe,Ie,Ee,$e,Te;const l=new URLSearchParams(document.currentScript.src.split("?")[1]),L=new URLSearchParams(location.search),h=l.get("tag_id"),u=(be=LeeepCite.tagStyle[h])==null?void 0:be.Style,g=(ve=LeeepCite.tagStyle[h])==null?void 0:ve.Filter,R=u.Common.Viewer,q=L.get("leeep_sdk")==="1",f=e=>document.querySelector(`#leeep-embedded-${h} `+e),J=e=>document.querySelectorAll(`#leeep-embedded-${h} `+e),r=(e,o)=>u.List[e]===o,V=e=>window.innerWidth<=640,P="p";let X=0,x=[];l.set("page","1"),r("SeeMore","paging")&&L.get(P)&&l.set("page",L.get(P)),l.set("count",W()),(Fe=LeeepCite.tagStyle[h])!=null&&Fe.IsRandomSort&&l.set("rand_seed",""+Math.floor(Math.random()*1e8)),R==="list_fullscreen"&&l.set("content_type","video");const Me=window.navigator.languages.map(e=>e.slice(0,2)).filter(e=>["ja","en"].includes(e))[0]||"en";f(".LeeepSeeMore").innerText=u.List.SeeMoreText||{ja:"もっと見る",en:"See more"}[Me];const O=f(".LeeepList"),fe=R==="staff_post_list"?"staff_post":u.List.MediaAspectRatio||"square";O.classList.add("LeeepAr-"+fe);const j=u.List.Column||4;O.classList.add("LeeepCol"+j);const oe=u.List.ColumnMobile||2;O.classList.add("LeeepMobCol"+oe),R==="staff_post_list"&&O.classList.add("LeeepListStaffPost");const me=g.List.Sort==="pv"&&u.List.RankNumber==="shown"&&!u.Filter.Enabled;me&&O.classList.add("LeeepShowRankNumber");const Re=2e3,ie="leeep_like_state_session_storage_key",se=new Map,Ae=2e3,ne="leeep_follow_state_session_storage_key",z=new Map;if(u.Common.CustomCss){const e=document.createElement("style");e.innerText=u.Common.CustomCss.replaceAll(`
`,""),document.body.appendChild(e)}if(u.Common.CustomJs&&new Function(u.Common.CustomJs)(),r("Frame","border")&&O.classList.add("LeeepStyleBorder"),r("Scroll","horizontal")){if(O.classList.add("LeeepScrollHorizontal"),f(".LeeepFooter").classList.add("LeeepScrollHorizontal"),f(".LeeepListScrollOuter").addEventListener("scroll",he),!V()){const e=f(".LeeepList").clientWidth||1200,o={square:[100,48.5,31.6,23.8,18.8,15.5],portrait:[177.8,86.2,56.2,42.3,33.4,27.6],staff_post:[133.3,64.7,42.1,31.7,25.1,20.7],ig_portrait:[125,60.6,39.5,29.8,23.5,19.4],landscape:[52.4,25.4,16.5,12.5,9.8,8.1]}[fe][j-1];J(".LeeepListScrollButton").forEach(s=>s.style.top=(e*o/100-48)/2+"px"),f(".LeeepListScrollButtonL").addEventListener("click",s=>ke(!0)),f(".LeeepListScrollButtonR").addEventListener("click",s=>ke(!1))}if(q&&window.LeeepAndroidSdk){const e=f(".LeeepListScrollOuter"),o=t=>{window.LeeepAndroidSdk.postMessage(JSON.stringify({horizontalScrolling:!0}))};e.addEventListener("touchstart",t=>{e.addEventListener("scroll",o)});const s=t=>{e.removeEventListener("scroll",o),window.LeeepAndroidSdk.postMessage(JSON.stringify({horizontalScrolling:!1}))};e.addEventListener("touchend",s),e.addEventListener("touchcancel",s)}}else{const e=f(".LeeepList").clientWidth,o=V()?[4,2,2,1.6][oe-1]:[4,3,2.6,1.6,1.5,1.4][j-1];f(".LeeepListScrollInner").style.rowGap=e*o/100+"px"}let A=null,Q=[];if((r("VideoLength","full")||r("VideoLength","head"))&&(r("VideoAutoPlayType","sequential")?setInterval(()=>{const e=[];J("video.LeeepLoadedVideo").forEach(o=>{ue(o)&&o.style.display==="block"&&e.push(o)}),e.length===0&&le(null),e.length>0&&!e.includes(A)&&le(e[0]),Q=e},200):setInterval(e=>{J("video.LeeepLoadedVideo").forEach(o=>{const s=ue(o);s&&o.style.display==="block"&&o.paused&&(o.muted=!0,o.play()),!s&&!o.paused&&o.pause()})},200)),q&&r("SeeMore","auto")){document.addEventListener("onLeeepSDKTagViewSeeMore",o=>ae());const e=JSON.stringify({styleSeeMoreAuto:!0});(Ee=(Ie=(Pe=window.webkit)==null?void 0:Pe.messageHandlers)==null?void 0:Ie.LeeepIosSdk)==null||Ee.postMessage(e),($e=window.LeeepAndroidSdk)==null||$e.postMessage(e)}function ue(e){const o=e.getBoundingClientRect(),s=o.y+o.height/2;if(s>window.innerHeight||s<0)return!1;if(!r("Scroll","horizontal"))return!0;const t=f(".LeeepListScrollOuter");if(!t)return!0;const c=t.getBoundingClientRect(),d=o.x+o.width/2;return d>=c.left&&d<=c.right&&s>=c.top&&s<=c.bottom}function le(e){A&&(A.pause(),A.currentTime=0),A=e,A&&(A.mute=!0,A.play())}function W(e){return(V()?u.List.CountMobile:u.List.Count)||l.get("count")||8}function ge(){LeeepCite.insertByLeeep(h,f(".LeeepListByLeeepContainer"),"afterbegin");const e={"{ProductId}":l.get("product_id")||""};LeeepCite.insertCommonElement(h,e)}(Te=u.Filter)!=null&&Te.Enabled&&(ge(),LeeepCite.insertSearchFilter(h,l.get("_cache_key"))),(async()=>{var o,s,t,c,d,i;if((o=u.Filter)!=null&&o.Enabled)try{const m=l.get("_cache_key")?"?_cache_key="+l.get("_cache_key"):"",C=`${LeeepCite.apiBase}/embed/${h}/filters${m}`,_=await(await fetch(C)).json();window.LeeepEmbedFilters=_.Filters||[]}catch(m){console.error("Failed to fetch filters:",m),window.LeeepEmbedFilters=[]}await _e();const e=f("");if((X>0||(s=u.Filter)!=null&&s.Enabled)&&((t=u.Filter)!=null&&t.Enabled||ge(),R==="staff_post_list"&&((c=u.Filter)!=null&&c.Enabled)&&Ue(),!q)){const m=new IntersectionObserver((C,b)=>{C.length>0&&C[0].isIntersecting&&C[0].target===e&&(h&&LeeepCite.isTrackable("PostList-viewTag")&&LeeepCite.doOnce("trackingViewTag"+h,_=>{ParteTracking.viewTag({site_id:LeeepCite.site_id,tid:h,ab_id:LeeepCite.patternTagIds.includes(h)?LeeepCite.abId:null,pattern_id:LeeepCite.patternTagIds.includes(h)?LeeepCite.patternId:null,user:{id:LeeepCite.uid}})}),m.unobserve(e))},{threshold:0});m.observe(e)}X===0&&((d=u.Filter)!=null&&d.Enabled?f(".LeeepStaffPostListEmpty").style.display="block":(e.remove(),(i=document.querySelector(`#leeep-tag-section-${h}`))==null||i.style.setProperty("display","none","important")))})();function Ue(){var w,k,N,D,G,K,Y;const e="スタッフの投稿一覧";document.title=e;let o="スタッフの投稿を一覧・検索するページです。";const s=document.querySelector('meta[name="description"]');if(s)s.setAttribute("content",o);else{const n=document.createElement("meta");n.name="description",n.content=o,document.head.appendChild(n)}const t=`${location.protocol}//${location.host}${location.pathname}`,c=document.querySelector('link[rel="canonical"]');if(c)c.setAttribute("href",t);else{const n=document.createElement("link");n.rel="canonical",n.href=t,document.head.appendChild(n)}const d={"@context":"https://schema.org","@type":"CollectionPage",name:e,description:o,url:t},i=new URLSearchParams(window.location.search),m=[],C=i.get("hashtag_id");if(C){const n=(N=(k=(w=window.LeeepEmbedFilters)==null?void 0:w.find(p=>p.Key.Name==="hashtag_id"))==null?void 0:k.Values.find(p=>p.Name===C))==null?void 0:N.Label;m.push({"@type":"PropertyValue",name:"ハッシュタグ",value:n||C})}const b=i.get("brand_id");if(b){const n=(K=(G=(D=window.LeeepEmbedFilters)==null?void 0:D.find(p=>p.Key.Name==="brand_id"))==null?void 0:G.Values.find(p=>p.Name===b))==null?void 0:K.Label;m.push({"@type":"PropertyValue",name:"ブランド",value:n||b})}const _=i.get("min_height"),I=i.get("max_height");_&&I&&m.push({"@type":"PropertyValue",name:"身長",value:`${_}cm 〜 ${I}cm`});const $=i.get("post_genre");if($&&$!=="-"){const n={womens:"レディース",mens:"メンズ",kids:"キッズ",others:"その他"},p=$.split(",").map(S=>n[S]||S);m.push({"@type":"PropertyValue",name:"種別",value:p.join(", ")})}i.getAll("post_custom_props").concat(i.getAll("user_custom_props")).forEach(n=>{if(!n)return;const p=n.split(","),S=p.slice(1).join(",");S.length!==0&&m.push({"@type":"PropertyValue",name:p[0],value:S})});const T=i.get("sort")||((Y=g==null?void 0:g.List)==null?void 0:Y.Sort);if(T){const n={pv:"閲覧数順",created_at:"新着順",updated_at:"更新順",publish:"新着順"};m.push({"@type":"PropertyValue",name:"並び順",value:n[T]||T})}m.length>0&&(d.about=m);const B=n=>{var y,a,H,M,U,ee,pe,Le,te,v;const p={"@type":"Person",name:n==null?void 0:n.name},S=((y=n==null?void 0:n.staff)==null?void 0:y.staff_page_link)||((H=(a=n==null?void 0:n.sns)==null?void 0:a.instagram)==null?void 0:H.link_value)||((U=(M=n==null?void 0:n.sns)==null?void 0:M.twitter)==null?void 0:U.link_value)||((pe=(ee=n==null?void 0:n.sns)==null?void 0:ee.tiktok)==null?void 0:pe.link_value)||((Le=n==null?void 0:n.parte)==null?void 0:Le.url)||((te=n==null?void 0:n.instagram)==null?void 0:te.url)||((v=n==null?void 0:n.twitter)==null?void 0:v.url);return S&&(p.url=S),p};x&&x.length>0&&(d.mainEntity={"@type":"ItemList",numberOfItems:x.length,itemListElement:x.map((n,p)=>{var S,y,a,H,M;return{"@type":"ListItem",position:p+1,item:{"@type":"BlogPosting",headline:n.title||`${(S=n.post_user)==null?void 0:S.name}の投稿`,url:n.post_detail_page_link,datePublished:n.first_published_at||n.created_at,author:B(n.post_user),image:((a=(y=n.contents)==null?void 0:y[0])==null?void 0:a.media_url)||((M=(H=n.contents)==null?void 0:H[0])==null?void 0:M.thumbnail_url)}}})});let F=document.querySelector('script[type="application/ld+json"]');F?F.textContent=JSON.stringify(d):(F=document.createElement("script"),F.type="application/ld+json",F.textContent=JSON.stringify(d),document.head.appendChild(F))}async function ae(){if(r("Scroll","horizontal"))return;f(".LeeepSeeMore").style.display="none";const e=l.get("page")*1||1;l.set("page",e+1),Ve(),await _e()}function he(){if(r("Scroll","horizontal")){const e=f(".LeeepListScrollOuter");f(".LeeepListScrollButtonL").style.display=!V()&&e.scrollLeft>0?"block":"none",f(".LeeepListScrollButtonR").style.display=!V()&&e.scrollLeft+e.clientWidth<=e.scrollWidth-4?"block":"none"}}function Ve(){for(let e=0;e<W();e++){const o=f(".LeeepTemplatePostEmpty").content.cloneNode(!0),s=t=>o.querySelector(t);s(".LeeepListContent").style.display=r("User","hidden")&&!r("Caption","shown")&&!r("Date","shown")?"none":"block",s(".LeeepListUser").style.display=r("User","hidden")?"none":"flex",s(".LeeepListCaption").style.display=r("Caption","shown")?"-webkit-box":"none",s(".LeeepListDate").style.display=r("Date","shown")?"block":"none",f(".LeeepListScrollInner").appendChild(o)}}async function _e(){var b,_,I,$,T,B,F,w,k,N,D,G,K,Y,n;const e=window.innerWidth===0;if(e&&!q){const p=""+Math.max(W(),u.List.CountMobile||0,u.List.Count||0);l.set("count",p)}r("SeeMore","paging")||l.set("without_total","true");let o=h?`${LeeepCite.apiBase}/embed/${h}/contents?${l.toString()}`:`${LeeepCite.apiBase}/posts?${l.toString()}`;if(R==="staff_post_list"){l.set("without_total","true"),l.set("website_id",LeeepCite.site_id),l.set("user_id",LeeepCite.uid),l.set("offset",`${l.get("count")*(l.get("page")-1)}`);const p=!!((b=u.Filter)!=null&&b.Enabled);if(p?L.get("sort")||((_=g==null?void 0:g.List)!=null&&_.Sort?L.set("sort",(I=g==null?void 0:g.List)==null?void 0:I.Sort):L.set("sort","publish")):(l.set("sort",(($=g==null?void 0:g.List)==null?void 0:$.Sort)||"publish"),l.get("brands")&&l.set(((F=(B=(T=g==null?void 0:g.List)==null?void 0:T.Filter)==null?void 0:B.Common)==null?void 0:F.BrandTarget)==="item"?"product_brand_code":"brand_code",l.get("brands")),l.delete("brands"),g.List.Filter.Common.SpecifyBrandCodes||(l.delete("brand_code"),l.delete("product_brand_code")),g.List.Filter.Common.SpecifyShopCodes||l.delete("shop_code"),g.List.Filter.Common.SpecifyProductID||l.delete("product_id"),(k=(w=g.List.Filter)==null?void 0:w.StaffPost)!=null&&k.Genre&&l.set("post_genre",g.List.Filter.StaffPost.Genre)),((G=(D=(N=g.List.Filter)==null?void 0:N.Common)==null?void 0:D.PostCustomProps)==null?void 0:G.length)>0)for(const y of g.List.Filter.Common.PostCustomProps)l.getAll("post_custom_props").includes(y)||l.append("post_custom_props",y);if(((n=(Y=(K=g.List.Filter)==null?void 0:K.Common)==null?void 0:Y.UserCustomProps)==null?void 0:n.length)>0)for(const y of g.List.Filter.Common.UserCustomProps)l.getAll("user_custom_props").includes(y)||l.append("user_custom_props",y);let S="";(R!=="staff_post_list"||p||r("SeeMore","paging"))&&(L.get("sort")||L.set("sort","publish"),L.keys().forEach&&L.keys().forEach(y=>{l.keys().forEach(a=>{y===a&&l.delete(a)})}),S=L.toString()),l.get("product_id")==="undefined"&&l.delete("product_id"),l.get("user_id")==="undefined"&&l.delete("user_id"),o=`${LeeepCite.domain}/v3/posts?${S}&${l.toString()}`}const t=await(await fetch(o)).json(),c=(t.posts||[]).length;X+=c;const d=LeeepCite.removeUnpublishedFromList(t);if(e&&(d.posts=d.posts.slice(0,W())||[]),x=x.concat(d.posts),d.posts===void 0)return console.error(".posts is undefined: ",d.error),[];xe(d.posts);const i=document.getElementsByClassName("LeeepEmpty");for(let p=i.length-1;p>=0;p--)i[p].remove();r("Scroll","horizontal")&&(f(".LeeepListScrollButtonR").style.display=!V()&&X>j&&(d.posts||[]).length>0?"block":"none");const m=W()<=c,C=!["hidden","auto","paging"].includes(u.List.SeeMore)&&!r("Scroll","horizontal");if(f(".LeeepSeeMore").style.display=m&&C?"block":"none",f(".LeeepSeeMore").addEventListener("click",ae),r("SeeMore","auto")&&m&&!q){let p=function(){const y=window.visualViewport,a=f(".LeeepListScrollOuter");y.pageTop+y.height>a.offsetTop+a.offsetHeight&&(window.clearInterval(S),ae())};const S=window.setInterval(p,200)}if(r("SeeMore","paging")){f(".LeeepPager").style.display="block";const p="M14 5l-7 7l7 7",S="M10 5l7 7l-7 7",y=qe=>`<svg class="LeeepPagerChevron" viewBox="0 0 24 24"><path d="${qe}" /></svg>`,a=l.get("page")*1,H=l.get("count")*1,M=new URLSearchParams(L);M.delete("sort"),M.delete("p");const U=new URLSearchParams(l);U.delete("page"),U.delete("count"),U.delete("offset"),U.delete("url");const ee=`${LeeepCite.domain}/v3/posts/count?${M.toString()}&${U.toString()}`,te=(await(await fetch(ee)).json()).total,v=Math.ceil(te/H),E=f(".LeeepPagerList");q&&L.set("leeep_pager_link","1"),L.set(P,`${a-1}`),E.innerHTML+=a>1?`<li><a class="LeeepPagerItem" href="?${L.toString()}">${y(p)}</a></li>`:`<li class="LeeepPagerItem">${y(p)}</li>`,a>=(a>=v?4:3)&&(L.set(P,"1"),E.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">1</a></li>`),a>=(a>=v?5:4)&&(E.innerHTML+='<li class="LeeepPagerItem">･･･</li>'),a>=v&&v>=3&&(L.set(P,`${a-2}`),E.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">${a-2}</a></li>`),a>=2&&(L.set(P,`${a-1}`),E.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">${a-1}</a></li>`),L.set(P,`${a}`),E.innerHTML+=`<li class="LeeepPagerItem LeeepPagerItemCurrent">${a}</li>`,a<=v-1&&(L.set(P,`${a+1}`),E.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">${a+1}</a></li>`),a<=1&&v>=3&&(L.set(P,`${a+2}`),E.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">${a+2}</a></li>`),a<=v-(a<=1?4:3)&&(E.innerHTML+='<li class="LeeepPagerItem">･･･</li>'),a<=v-(a<=1?3:2)&&(L.set(P,`${v}`),E.innerHTML+=`<li><a class="LeeepPagerItem" href="?${L.toString()}">${v}</a></li>`),L.set(P,`${a+1}`),E.innerHTML+=a<v?`<li><a class="LeeepPagerItem" href="?${L.toString()}">${y(S)}</a></li>`:`<li class="LeeepPagerItem">${y(S)}</li>`}}function xe(e){const o=R==="staff_post_list",s=f(".LeeepListScrollInner");e==null||e.forEach(t=>{var $,T,B,F;o&&t.contents.length>0&&(t.media_url=t.contents[0].media_url,t.thumbnail_url=t.contents[0].thumbnail_url,t.video_thumbnail_url=t.contents[0].video_thumbnail_url,t.duration=t.contents[0].duration);const c=t.post_detail_page_link&&u.Common.TargetBlank==="enabled"?"_blank":"_self",d=f(o?".LeeepTemplateStaffPost":".LeeepTemplatePost").content.cloneNode(!0),i=w=>d.querySelector(w);i(".LeeepListAnchor").dataset.id=t.id,i(".LeeepListAnchor").href=t.post_detail_page_link?t.post_detail_page_link:"javascript:void(0);",i(".LeeepListAnchor").setAttribute("onclick",t.post_detail_page_link?"":"return false;"),i(".LeeepListAnchor").target=c,t.post_detail_page_link||i(".LeeepListAnchor").addEventListener("click",w=>{LeeepCite.openModal({tagId:h,clickedPostId:t.id,postIds:e.map(k=>k.id),viewer:R,count:W(),page:l.get("page"),randSeed:l.get("rand_seed")},l.toString()),w.stopPropagation()});const m=(r("VideoLength","full")||r("VideoLength","head"))&&t.duration>0,C=t.duration||!o&&s.clientWidth/(V()?oe:j)<=180;if(i(".LeeepListMedia .LeeepLoadedImg").src=(C?t.thumbnail_url:null)||t.media_url||t.image_url||t.thumbnail_url,i(".LeeepListMedia .LeeepLoadedImg").alt=t.post_user.name+"の投稿("+t.id+")",i(".LeeepListMedia .LeeepLoadedImg").style.display=m?"none":"block",i(".LeeepListMedia .LeeepLoadedVideo").style.display=m?"block":"none",i(".LeeepListMedia .LeeepLoadedVideo").poster=t.thumbnail_url||t.image_url,i(".LeeepListMedia .LeeepLoadedVideo").src=m?r("VideoLength","full")?t.media_url:r("VideoLength","head")?t.video_thumbnail_url:"":"",m&&r("VideoAutoPlayType","sequential")&&(i(".LeeepListMedia .LeeepLoadedVideo").loop=!1,i(".LeeepListMedia .LeeepLoadedVideo").addEventListener("ended",w=>{const k=Q.indexOf(w.target),N=Q[(k+1)%Q.length]||null;le(N)})),i(".LeeepListMedia .LeeepIconPlayBase").style.display=!m&&t.duration>0?"block":"none",me&&(i(".LeeepPostRankNumber").innerText=`${J(".LeeepPost:not(.LeeepEmpty)").length+1}`),u.List.Like==="shown"){const w=ye(ie,t.id);se.set(t.id,w?{...w,timer:null,inFlight:!1}:{finalLikeState:t.user_action.liked,tempCurrentLikeState:t.user_action.liked,timer:null,inFlight:!1}),i(".LeeepReactionLike").addEventListener("click",k=>Be(k,t.id)),i(".LeeepReactionLikeIconLike").addEventListener("animationend",k=>k.target.classList.remove("animated")),i(".LeeepReactionLike").style.display="flex",se.get(t.id).tempCurrentLikeState?i(".LeeepReactionLikeIconLike").style.display="block":i(".LeeepReactionLikeIconUnlike").style.display="block"}if(i(".LeeepListContent").style.display=r("User","hidden")&&!r("Caption","shown")&&!r("Date","shown")?"none":"block",o&&(i(".LeeepListUserImage").href=t.post_user.staff.staff_page_link,i(".LeeepListUserImage").target=c,i(".LeeepListUserName").href=t.post_user.staff.staff_page_link,i(".LeeepListUserName").target=c),o&&u.List.Follow==="shown"){if(z.has(t.post_user.id))z.get(t.post_user.id).elements.add(i(".LeeepFollowButton"));else{const w=ye(ne,t.post_user.id),k=w?{...w,timer:null,inFlight:!1}:{finalFollowState:t.post_user.user_action.followed,tempCurrentFollowState:t.post_user.user_action.followed,timer:null,inFlight:!1};z.set(t.post_user.id,{...k,elements:new Set([i(".LeeepFollowButton")])})}i(".LeeepFollowButton").addEventListener("click",w=>He(w,t.post_user.id)),i(".LeeepFollowButton").style.display="block",z.get(t.post_user.id).tempCurrentFollowState?i(".LeeepFollowIconFollowed").style.display="inline":i(".LeeepFollowIconFollow").style.display="inline"}i(".LeeepListUserImage .LeeepLoadedImg").src=t.post_user.thumbnail_url,i(".LeeepListUserImage .LeeepLoadedImg").alt=t.post_user.name+"のアイコン",i(".LeeepListUserName").innerText=t.post_user.name;const b=t.post_height||t.post_user.height,_=i(".LeeepListUserHeight"),I=!r("UserHeight","hidden")&&b;_.innerText=I?b+"cm":"",_.style.display=I?"":"none",o&&(i(".LeeepListUserBrand").style.display=r("UserBrand","hidden")?"none":"block",i(".LeeepListUserBrand").innerText=((T=($=t.post_user.staff)==null?void 0:$.brands[0])==null?void 0:T.name)||"",i(".LeeepListUserShop").style.display=r("UserShop","hidden")?"none":"block",i(".LeeepListUserShop").style.color=r("UserBrand","hidden")?"#999":"#444",i(".LeeepListUserShop").innerText=((F=(B=t.post_user.staff)==null?void 0:B.shops[0])==null?void 0:F.name)||""),i(".LeeepListCaption").innerText=t.caption,i(".LeeepListDate").innerText=(t.first_published_at||t.created_at).replaceAll("-","/").split(" ")[0].split("T")[0],i(".LeeepListUser").style.display=r("User","hidden")?"none":"flex",i(".LeeepListCaption").style.display=r("Caption","shown")&&t.caption!==""?"-webkit-box":"none",i(".LeeepListDate").style.display=r("Date","shown")?"block":"none",s.appendChild(d)}),document.dispatchEvent(new CustomEvent("onLeeepContentsRendered",{detail:o?{tag_id:h,staff_posts:e}:{tag_id:h,posts:e}}))}const ye=(e,o)=>{const s=sessionStorage.getItem(e);return s?JSON.parse(s)[o]??null:null},Z=(e,o,s,t)=>{const c=JSON.parse(sessionStorage.getItem(e)||"{}");c[o]=t?Object.keys(s).reduce((d,i)=>t.includes(i)?d:{...d,[i]:s[i]},c[o]):s,sessionStorage.setItem(e,JSON.stringify(c))},re=(e,o)=>{e(".LeeepReactionLikeIconLike").style.display=o?"block":"none",e(".LeeepReactionLikeIconUnlike").style.display=o?"none":"block",o?e(".LeeepReactionLikeIconLike").classList.add("animated"):e(".LeeepReactionLikeIconLike").classList.remove("animated")},Oe=async(e,o,s,t,c)=>{const d=s?"like":"unlike";let i;try{i=await fetch(`${LeeepCite.domain}/v3/posts/${o}/${d}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({website_id:LeeepCite.site_id,user_id:LeeepCite.uid})})}catch(m){console.error(`/${d} fetch error`,m),e.version===t&&(e.isDetail&&(e.likeCount+=s?-1:1),e.tempCurrentLikeState=e.finalLikeState,re(c,e.finalLikeState));return}if(!i.ok){console.error(`/${d} response error`,i),e.version===t&&(e.isDetail&&(e.likeCount+=s?-1:1),e.tempCurrentLikeState=e.finalLikeState,re(c,e.finalLikeState));return}e.finalLikeState=s},we=async(e,o,s)=>{if(e.inFlight)return;if(e.finalLikeState===e.tempCurrentLikeState){Z(ie,o,e);return}const t=e.tempCurrentLikeState,c=e.version;e.inFlight=!0;try{await Oe(e,o,t,c,s)}finally{e.inFlight=!1}Z(ie,o,e),e.finalLikeState!==e.tempCurrentLikeState&&await we(e,o,s)},Se=e=>{const o=e.target.closest(".LeeepAlertTooltipContainer").querySelector(".LeeepAlertTooltip");o.classList.add("LeeepAlertTooltipVisible"),setTimeout(()=>{o.classList.remove("LeeepAlertTooltipVisible")},1e3)},Be=async(e,o)=>{e.preventDefault(),e.stopPropagation();const s=d=>e.target.closest(".LeeepReactionLike").querySelector(d),t=se.get(o);if(!LeeepCite.uid){Se(e);return}const c=!t.tempCurrentLikeState;t.tempCurrentLikeState=!t.tempCurrentLikeState,t.version=(t.version||0)+1,re(s,c),t.timer&&clearTimeout(t.timer),t.timer=setTimeout(async()=>{await we(t,o,s),t.timer=null},Re)},ce=(e,o)=>{e.forEach(s=>{const t=c=>s.querySelector(c);t(".LeeepFollowIconFollow").style.display=o?"none":"inline",t(".LeeepFollowIconFollowed").style.display=o?"inline":"none"})},Ne=async(e,o,s,t)=>{const c=s?"follow":"unfollow";let d;try{d=await fetch(`${LeeepCite.domain}/v3/staffs/${o}/${c}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({website_id:LeeepCite.site_id,user_id:LeeepCite.uid})})}catch(i){console.error(`/${c} fetch error`,i),e.version===t&&(e.tempCurrentFollowState=e.finalFollowState,ce(e.elements,e.finalFollowState));return}if(!d.ok){console.error(`/${c} response error`,d),e.version===t&&(e.tempCurrentFollowState=e.finalFollowState,ce(e.elements,e.finalFollowState));return}e.finalFollowState=s},Ce=async(e,o)=>{if(e.inFlight)return;if(e.finalFollowState===e.tempCurrentFollowState){Z(ne,o,e,["elements"]);return}const s=e.tempCurrentFollowState,t=e.version;e.inFlight=!0;try{await Ne(e,o,s,t)}finally{e.inFlight=!1}Z(ne,o,e,["elements"]),e.finalFollowState!==e.tempCurrentFollowState&&await Ce(e,o)},He=async(e,o)=>{e.preventDefault(),e.stopPropagation();const s=z.get(o);if(!LeeepCite.uid){Se(e);return}const t=!s.tempCurrentFollowState;s.tempCurrentFollowState=!s.tempCurrentFollowState,s.version=(s.version||0)+1,ce(s.elements,t),s.timer&&clearTimeout(s.timer),s.timer=setTimeout(async()=>{await Ce(s,o),s.timer=null},Ae)};let de=!1;function ke(e){if(de)return;de=!0;const o=f(".LeeepListScrollOuter"),s=20,t=o.scrollLeft,c=Array.from(J(".LeeepPost")).map(_=>_.offsetLeft),d=f(".LeeepPost").clientWidth;let i=e?c.filter(_=>_<o.scrollLeft-o.clientWidth+d).pop()||0:c.filter(_=>_>o.scrollLeft+o.clientWidth-d).shift()||o.scrollWidth-o.clientWidth;i>o.scrollWidth-o.clientWidth&&(i=o.scrollWidth-o.clientWidth);const m=_=>{const I=_*(2-_);return t*(1-I)+i*I};let C=0;const b=_=>{C++,o.scrollTo(m(C/s),0),C<s?requestAnimationFrame(b):de=!1};requestAnimationFrame(b)}window.addEventListener("resize",he),window.addEventListener("message",e=>{var s;const o=e.data||{};o.ready&&o.tagId===h&&((s=document.querySelector("#LeeepTagIframeFullscreen").contentWindow)==null||s.postMessage({posts:x},"*"))})})();
