1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1081],{61544:function(e,t,n){"use strict";n.d(t,{Ii:function(){return l},SF:function(){return a}});var r,o,l,a,i=n(57437),s=n(2265),u=n(2577),c=n(95526),d=n(30758),f=n(98925),v=n(33304),m=n(98830),h=n(180);let p=null,y=null,_=async()=>p||y||(y=n.e(2404).then(n.bind(n,40303)).then(e=>(p=e.default,e.default)));(r=l||(l={}))[r.Undefined=0]="Undefined",r[r.Unload=1]="Unload",r[r.Prepare=2]="Prepare",r[r.Preload=3]="Preload",r[r.Play=4]="Play",(o=a||(a={}))[o.Min=240]="Min",o[o.Small=360]="Small",o[o.Medium=480]="Medium",o[o.HD=720]="HD",o[o.FullHD=1080]="FullHD",o[o.UHD=2160]="UHD";let b={0:"low",1:"low",2:"low",3:"high",4:"high"};function k(e){try{if(!e)return!1;let t=new URL(e);if(!d.MS.allowedProtocols.includes(t.protocol)||!d.MS.allowedHosts.includes(t.hostname))return!1;return d.MS.allowedExtensions.some(e=>t.pathname.endsWith(e))}catch(e){return!1}}let g=(0,s.memo)((0,s.forwardRef)((e,t)=>{var n,r;let o=e.maxQuality||720,l=Math.min(e.defaultQuality||720,o),a=null!==(n=e.state)&&void 0!==n?n:0,y=(0,s.useRef)(null),g=(0,s.useRef)(null),C=(0,s.useRef)(!1),x=(0,s.useRef)(!1),w=(0,s.useRef)(!1),j=(0,s.useRef)(!1),S=(0,s.useRef)(!1),L=(0,s.useRef)(!1),M=(0,s.useRef)(!1),N=(0,s.useRef)(!1),P=(0,s.useRef)(!1),I=(0,s.useRef)(!1),U=(0,s.useRef)(e);U.current=e;
1let[E,T]=(0,s.useState)(!1),[R,Z]=(0,s.useState)(!1),B=(0,s.useMemo)(()=>e.posterUrl?[e.posterUrl]:[],[e.posterUrl]),A=(0,s.useMemo)(()=>e.posterUrl?(0,m.B)(e.posterUrl,{width:e.posterWidth,height:e.posterHeight}):void 0,[e.posterUrl,e.posterWidth,e.posterHeight]),D=(0,s.useCallback)(()=>{let t=y.current;t&&e.startAt&&!I.current&&Number.isFinite(t.duration)&&!(e.startAt>=t.duration)&&(I.current=!0,t.currentTime=e.startAt)},[e.startAt]),V=(0,s.useCallback)(()=>{T(!0),D()},[D]),F=(0,s.useCallback)(()=>{let e=y.current;(null==e?void 0:e.readyState)===0&&T(!1)},[]),z=(0,s.useCallback)(async()=>{let t=y.current;if(t&&!L.current){if(L.current=!0,N.current&&e.fallbackUrl&&k(e.fallbackUrl)){t.src=e.fallbackUrl,t.load(),t.addEventListener("loadedmetadata",G),P.current=!0;return}if(e.hlsUrl&&!P.current){let n=await _();if(n.isSupported()){let r=new n({autoStartLoad:!1,capLevelOnFPSDrop:!0,liveSyncDurationCount:3,lowLatencyMode:!1});r.attachMedia(t),g.current=r,r.on(n.Events.ERROR,(n,o)=>{f.Y.warn("Error loading video",o),o.fatal&&(N.current=!0,P.current=!0,r.destroy(),g.current=null,C.current=!1,e.fallbackUrl&&t&&k(e.fallbackUrl)?(t.src=e.fallbackUrl,t.load(),t.addEventListener("loadedmetadata",G,{once:!0})):f.Y.warn("No fallback URL available - video will have no src!"))}),r.on(n.Events.MEDIA_ATTACHED,()=>{e.hlsUrl&&(r.loadSource(e.hlsUrl),C.current=!0)}),r.on(n.Events.MANIFEST_PARSED,()=>{let e=r.levels,t=e.filter(e=>e.width<=o);if(t.length>0){let n=e.indexOf(t[t.length-1]);r.autoLevelCapping=n;let a=e.reduce((t,n,r)=>n.width>o?t:Math.abs(n.width-l)<Math.abs(e[t].width-l)?r:t,0);r.startLevel=a,r.currentLevel=-1}if(x.current=!0,w.current){var n;null===(n=g.current)||void 0===n||n.startLoad()}j.current&&W()})}else t.canPlayType("application/vnd.apple.mpegURL")?(t.src=e.hlsUrl,t.addEventListener("loadedmetadata",G)):e.fallbackUrl&&k(e.fallbackUrl)&&(t.src=e.fallbackUrl,t.addEventListener("loadedmetadata",G),P.current=!0)}else e.fallbackUrl&&k(e.fallbackUrl)&&(t.src=e.fallbackUrl,t.addEventListener("loadedmetadata",G),P.current=!0)}},[e.hlsUrl,e.fallbackUrl]),W=()=>{let e=y.current;e&&(S.current=!0,(0,h.z)(e,t=>{if(S.current&&(f.Y.warn("Error playing video",t),"NotAllowedError"===(0,h.M)(t)&&!e.muted)){var n,r;f.Y.warn("Not allowed unmuted, retrying muted"),e.muted=!0,null===(n=(r=U.current).onMuteChange)||void 0===n||n.call(r,!0),W()}}))},H=()=>{let e=y.current;e&&(S.current=!1,e.pause())},O=(0,s.useCallback)(async()=>{let t=y.current;if(t){if(P.current&&e.fallbackUrl&&k(e.fallbackUrl)){t.src&&t.src===e.fallbackUrl||(t.src=e.fallbackUrl,t.preload="auto",t.load());return}if(e.hlsUrl&&p){if((await _()).isSupported()&&!N.current){var n;null==g||null===(n=g.current)||void 0===n||n.startLoad(-1)}else t.canPlayType("application/vnd.apple.mpegURL")?t.src=e.hlsUrl:e.fallbackUrl&&k(e.fallbackUrl)&&(t.src=e.fallbackUrl,t.preload="auto",t.load())}else e.hlsUrl&&t.canPlayType("application/vnd.apple.mpegURL")?t.src=e.hlsUrl:e.fallbackUrl&&k(e.fallbackUrl)&&(t.src=e.fallbackUrl,t.preload="auto",t.load())}},[e.hlsUrl,e.fallbackUrl]),Q=(0,s.useCallback)(()=>{let t=y.current;if(t){if(e.hlsUrl&&p&&g.current){var n;null===(n=g.current)||void 0===n||n.stopLoad()}else P.current||(t.removeAttribute("src"),t.load())}},[e.hlsUrl]),G=(0,s.useCallback)(()=>{x.current=!0,j.current&&W()},[]),K=()=>{var e,t,n,r;L.current&&(null===(e=y.current)||void 0===e||e.pause(),Q(),null===(t=y.current)||void 0===t||t.removeEventListener("loadedmetadata",G),null===(n=g.current)||void 0===n||n.detachMedia(),null===(r=g.current)||void 0===r||r.destroy(),g.current=null,T(!1),L.current=!1,M.current=!1)},X=(0,s.useCallback)(()=>{M.current=!1},[]),Y=(0,s.useCallback)(()=>{var e,t;let n=y.current;n&&(n.currentTime<.1&&(M.current=!1),null===(e=(t=U.current).onProgress)||void 0===e||e.call(t,n.currentTime,n.duration))},[]),$=(0,s.useCallback)(()=>{var e,t,n,r;let o=y.current;if(o&&(null===(e=(t=U.current).onProgress)||void 0===e||e.call(t,o.currentTime,o.duration),!M.current&&o.duration)){let e=o.currentTime/o.duration;M.current=o.duration<d.Af.minWatchDurationSec?e>=.9:o.currentTime>d.Af.minWatchDurationSec,M.current&&(null===(n=(r=U.current).onWatched)||void 0===n||n.call(r))}},[]),q=(0,s.useCallback)(()=>
1{e.onClick?e.onClick():S.current?H():W()},[e.onClick]),J=(0,s.useCallback)(()=>{"visible"===document.visibilityState&&j.current?W():H()},[]),ee=(0,s.useCallback)(()=>{Z(!0)},[]);return(0,s.useImperativeHandle)(t,()=>({play:()=>{j.current=!0,x.current&&W()},pause:()=>{j.current=!1,H()},preload:()=>{w.current=!0,x.current&&O()},stopLoad:()=>{w.current=!1,Q()},init:async()=>{await z()},destroy:K,isPlaying:()=>S.current,isReady:()=>x.current,mute:()=>{let e=y.current;e&&(e.muted=!0)},unmute:()=>{let e=y.current;e&&(e.muted=!1)},setMuted:e=>{let t=y.current;t&&(t.muted=e)},isMuted:()=>{var e,t;return null===(t=null===(e=y.current)||void 0===e?void 0:e.muted)||void 0===t||t},seekTo:e=>{let t=y.current;t&&(t.currentTime=e)}}),[z,O,Q]),(0,s.useEffect)(()=>(a>=2?z():K(),K),[z,a]),(0,s.useEffect)(()=>{let e=y.current;w.current=a>=3,e&&x.current&&(w.current?O():Q())},[a,O,Q]),(0,s.useEffect)(()=>{let e=y.current;j.current=4===a,e&&x.current&&(j.current?W():H())},[a]),(0,s.useEffect)(()=>(document.addEventListener("visibilitychange",J),()=>{document.removeEventListener("visibilitychange",J)}),[]),(0,i.jsxs)("div",{ref:e.containerRef,className:(0,v.cn)(e.classNames,"relative",{"cursor-pointer":q}),children:[(0,i.jsx)(u.default,{className:(0,v.cn)(e.classNames,E?"z-[1]":"z-0"),classNames:{content:e.classNames},isLoaded:R||E,children:(0,i.jsx)("video",{ref:y,className:e.classNames,muted:e.muted,playsInline:!0,loop:null===(r=e.loop)||void 0===r||r,autoPlay:!1,poster:A,preload:"metadata",fetchPriority:b[a],onCanPlay:V,onLoadedMetadata:D,onEmptied:F,onSuspend:F,onStalled:F,onTimeUpdate:$,onEnded:X,onSeeked:Y,onPlay:e.onPlay,onPause:e.onPause,onClick:q})}),(0,i.jsx)(c.Z,{urls:B,placeholderUrl:e.posterPlaceholderUrl,className:(0,v.cn)(e.classNames,"h-full absolute top-1/2 start-1/2 -translate-x-1/2 -translate-y-1/2 z-[1] object-center transition-opacity ease-in-out",{"z-0":E}),loading:a>=3?"eager":"lazy",fetchPriority:b[a],height:e.posterHeight,width:e.posterWidth,onLoaded:ee,onClick:q})]})}));t.ZP=g},85900:function(e,t,n){"use strict";var r=n(57437),o=n(38706),l=n(2265),a=n(68683),i=n(33304),s=n(54042),u=n.n(s);let c=(0,l.memo)(function(e){let{isPlaying:t,onToggle:n}=e,l=(0,o.T)("components.ui.video_play_overlay");return(0,r.jsx)("button",{type:"button",className:(0,i.cn)(u().surface,"focusable"),onClick:n,"aria-label":l(t?"PauseVideo":"PlayVideo"),children:!t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:u().scrim}),(0,r.jsx)("span",{className:u().playCircle,"data-scheme":"light",children:(0,r.jsx)(a.Z,{className:u().playIcon})})]})})});t.Z=c},76479:function(e,t,n){"use strict";var r=n(57437),o=n(38706),l=n(2265),a=n(33304),i=n(21144),s=n.n(i);let u=(0,l.memo)(function(e){let{className:t,disabled:n,"data-testid":l,onClick:i}=e,u=(0,o.T)("common.actions");return(0,r.jsx)("button",{type:"button",onClick:i,disabled:n,className:(0,a.cn)("outlined-button",s().button,t),"data-testid":l,children:u("Cancel")})});t.Z=u},80642:function(e,t,n){"use strict";var r=n(57437),o=n(2265),l=n(76479),a=n(44506),i=n(81757),s=n(33304),u=n(13224),c=n.n(u);function d(e){let{ctx:t}=e,{useField:n}=(0,i.G)(t),{value:o}=n("title"),l=(o||"").length;return(0,r.jsxs)("span",{className:c().charCount,children:[l,"/",50]})}let f=(0,o.memo)(function(e){let{ctx:t,onCancel:n,className:o,submitActionKey:i}=e;return(0,r.jsxs)("div",{className:(0,s.cn)(c().form,o),children:[(0,r.jsx)(a.yt,{ctx:t,name:"title",maxLength:50,endContent:(0,r.jsx)(d,{ctx:t})}),(0,r.jsx)(a.Xq,{ctx:t}),(0,r.jsxs)("div",{className:c().footer,children:[(0,r.jsx)(l.Z,{onClick:n,className:c().footerButton}),(0,r.jsx)(a.Zq,{ctx:t,action:i,className:c().footerButton})]})]})});t.Z=f},33524:function(e,t,n){"use strict";var r=n(57437),o=n(2265),l=n(33304);let a=(0,o.memo)(function(e){let{className:t,...n}=e;return(0,r.jsx)("svg",{width:"16",height:"10",viewBox:"0 0 16 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,className:(0,l.cn)("rtl:-scale-x-100",t),children:(0,r.jsx)("path",{d:"M15 5.00019L1 5M1 5L5.08333 1M1 5L5.08333 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})});t.Z=a},84002:function(e,t,n){"use strict";var r=n(57437);let o=(0,n(2265).memo)(function(e){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",...e,children:(0,r.jsx)("path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",stroke:e.color||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})});t.Z=o},21040:function(e,t,n){"use strict";var r=n(57437);let o=(0,n(2265).memo)(function(e){return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}),(0,r.jsx)("path",{d:"m15 5 4 4"})]})});t.Z=o},93662:function(e,t,n){"use strict";var r=n(57437);let o=(0,n(2265).memo)(function(e){return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,r.jsx)("path",{d:"M4 15C4 15 5 14 8 14C11 14 13 16 16 16C19 16 20 15 20 15V3C20 3 19 4 16 4C13 4 11 2 8 2C5 2 4 3 4 3V15Z",stroke:e.color||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M4 22V15",stroke:e.color||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})});t.Z=o},51860:function(e,t,n){"use strict";var r=n(57437);let o=(0,n(2265).memo)(function(e){return(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("circle",{cx:"10",cy:"4",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"10",cy:"10",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"10",cy:"16",r:"1.5",fill:"currentColor"})]})});t.Z=o},52401:function(e,t,n){"use strict";var r=n(57437);let o=(0,n(2265).memo)(function(e){return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,r.jsx)("path",{d:"M12 17v5"}),(0,r.jsx)("path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7
1a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"})]})});t.Z=o},68683:function(e,t,n){"use strict";var r=n(57437);let o=(0,n(2265).memo)(function(e){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:(0,r.jsx)("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",stroke:e.color||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})});t.Z=o},91866:function(e,t,n){"use strict";var r=n(57437);let o=(0,n(2265).memo)(function(e){return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...e,children:[(0,r.jsx)("path",{d:"M7.5 9V19C7.5 20.1046 8.39543 21 9.5 21H15.5C16.6046 21 17.5 20.1046 17.5 19V9",stroke:"currentColor",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M10.5 5V4C10.5 3.44772 10.9477 3 11.5 3H13.5C14.0523 3 14.5 3.44772 14.5 4V5",stroke:"currentColor",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M12.5 11L12.5 17",stroke:"currentColor",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M10.5 11L10.5 17",stroke:"currentColor",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M14.5 11L14.5 17",stroke:"currentColor",strokeLinecap:"round"}),(0,r.jsx)("rect",{x:"5.5",y:"5",width:"14",height:"2",rx:"1",stroke:"currentColor"})]})});t.Z=o},69490:function(e,t,n){"use strict";var r=n(57437);let o=(0,n(2265).memo)(function(e){return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:[(0,r.jsx)("path",{d:"M9.16699 3.91832C9.16682 3.80224 9.13228 3.68882 9.06771 3.59236C9.00314 3.49591 8.91145 3.42074 8.8042 3.37634C8.69696 3.33194 8.57896 3.32031 8.46511 3.34291C8.35126 3.36551 8.24665 3.42132 8.16449 3.50332L5.34449 6.32248C5.23566 6.43196 5.10619 6.51876 4.96357 6.57784C4.82095 6.63691 4.66803 6.6671 4.51366 6.66665H2.50033C2.27931 6.66665 2.06735 6.75445 1.91107 6.91073C1.75479 7.06701 1.66699 7.27897 1.66699 7.49998V12.5C1.66699 12.721 1.75479 12.933 1.91107 13.0892C2.06735 13.2455 2.27931 13.3333 2.50033 13.3333H4.51366C4.66803 13.3329 4.82095 13.3631 4.96357 13.4221C5.10619 13.4812 5.23566 13.568 5.34449 13.6775L8.16366 16.4975C8.24583 16.5798 8.35058 16.6359 8.46465 16.6586C8.57872 16.6814 8.69698 16.6697 8.80443 16.6252C8.91188 16.5807 9.0037 16.5052 9.06824 16.4085C9.13279 16.3117 9.16715 16.198 9.16699 16.0816V3.91832Z",stroke:e.color||"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M18.333 7.5L13.333 12.5",stroke:e.color||"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M13.333 7.5L18.333 12.5",stroke:e.color||"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})});t.Z=o},45239:function(e,t,n){"use strict";var r=n(57437);let o=(0,n(2265).memo)(function(e){return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:[(0,r.jsx)("path",{d:"M9.16699 3.91832C9.16682 3.80224 9.13228 3.68882 9.06771 3.59236C9.00314 3.49591 8.91145 3.42074 8.8042 3.37634C8.69696 3.33194 8.57896 3.32031 8.46511 3.34291C8.35126 3.36551 8.24665 3.42132 8.16449 3.50332L5.34449 6.32248C5.23566 6.43196 5.10619 6.51876 4.96357 6.57784C4.82095 6.63691 4.66803 6.6671 4.51366 6.66665H2.50033C2.27931 6.66665 2.06735 6.75445 1.91107 6.91073C1.75479 7.06701 1.66699 7.27897 1.66699 7.49998V12.5C1.66699 12.721 1.75479 12.933 1.91107 13.0892C2.06735 13.2455 2.27931 13.3333 2.50033 13.3333H4.51366C4.66803 13.3329 4.82095 13.3631 4.96357 13.4221C5.10619 13.4812 5.23566 13.568 5.34449 13.6775L8.16366 16.4975C8.24583 16.5798 8.35058 16.6359 8.46465 16.6586C8.57872 16.6814 8.69698 16.6697 8.80443 16.6252C8.91188 16.5807 9.0037 16.5052 9.06824 16.4085C9.13279 16.3117 9.16715 16.198 9.16699 16.0816V3.91832Z",stroke:e.color||"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M13.333 7.5C13.8739 8.22123 14.1663 9.09846 14.1663 10C14.1663 10.9015 13.8739 11.7788 13.333 12.5",stroke:e.color||"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M16.1367 15.3033C16.8332 14.6069 17.3856 13.7801 17.7625 12.8701C18.1395 11.9602 18.3335 10.9849 18.3335 9.99999C18.3335 9.01507 18.1395 8.03979 17.7625 7.12984C17.3856 6.21989 16.8332 5.3931 16.1367 4.69666",stroke:e.color||"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})});t.Z=o},94739:function(e,t,n){"use strict";n.d(t,{I:function(){return o.Z},n:function(){return r.Z}});
1var r=n(69490),o=n(45239)},39015:function(e,t,n){"use strict";var r=n(57437),o=n(53221),l=n(22646),a=n(2265),i=n(54887),s=n(61760),u=n(33304),c=n(25970),d=n.n(c);let f=(0,a.memo)(function(e){let{isOpen:t,className:n,onClose:c,autoCloseDelay:f=0,children:v,actionButton:m,closeAriaLabel:h="Close"}=e,p=(0,a.useCallback)(e=>{e.stopPropagation(),c()},[c]),y=(0,a.useCallback)(e=>{e.stopPropagation(),e.preventDefault(),null==m||m.onClick()},[m]);return((0,a.useEffect)(()=>{if(!t||f<=0)return;let e=setTimeout(c,f);return()=>clearTimeout(e)},[t,c,f]),t)?(0,i.createPortal)((0,r.jsx)(o.M,{children:(0,r.jsxs)(l.E.div,{className:(0,u.cn)(d().container,n),initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:16},transition:{duration:.2},onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("div",{className:d().content,children:v}),m&&(0,r.jsx)("button",{type:"button",className:d().actionBtn,onClick:y,children:m.label}),(0,r.jsx)("button",{type:"button",className:d().closeBtn,onClick:p,"aria-label":h,children:(0,r.jsx)(s.Z,{className:d().closeIcon})})]})}),document.body):null});t.Z=f},86749:function(e,t,n){"use strict";n.d(t,{I:function(){return o},w:function(){return r}});let r={notation:"compact",compactDisplay:"short"},o="â"},30758:function(e,t,n){"use strict";n.d(t,{Af:function(){return a},Db:function(){return o},MS:function(){return i},gS:function(){return l}});var r=n(10382);let o=3,l=12,a={minWatchDurationSec:3},i={allowedProtocols:["https:"],allowedHosts:[new URL(r.k.api.assetsCdnUrl).hostname],allowedExtensions:[".mp4"]}},77166:function(e,t,n){"use strict";n.d(t,{$f:function(){return m},Ep:function(){return d},Tv:function(){return f},e9:function(){return v},g4:function(){return c},k6:function(){return s},pl:function(){return a},tU:function(){return u},v6:function(){return i}});var r=n(13544),o=n(56799),l=n(36417);let a=async()=>{let e=await (0,l.U2)("/me","Get My Creator Profile");if(!(e instanceof l.iQ))return e},i=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=await (0,l.U2)("/me/stories_page","Get My Stories per Page",{page:e.toString()});return t instanceof l.iQ?r.G:t},s=async e=>{let t=await (0,l.U2)("/me/upload_photo_url","Get Photo Upload URL",{ext:e});if(!(t instanceof l.iQ))return t},u=async e=>await (0,l.gz)("/me/photo","Update Photo",{url:e}),c=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=await (0,l.U2)("/me/followers","Get My Followers",{page:e.toString()});return t instanceof l.iQ?r.G:t},d=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=await (0,l.U2)("/me/follows","Get My Follows",{page:e.toString()});return t instanceof l.iQ?r.G:t},f=async e=>!(await (0,l.v_)("/creators/".concat(e,"/follow"),"Follow Creator") instanceof l.iQ),v=async e=>!(await (0,l.IV)("/creators/".concat(e,"/follow"),"Unfollow Creator") instanceof l.iQ),m=async e=>{let t=[{platform:o.$.Instagram,url:e.instagram_url},{platform:o.$.TikTok,url:e.tiktok_url}],n={description:e.description,socials:t};return void 0!==e.vibes&&(n.vibes=e.vibes),await (0,l.r$)("/me","Update Creator Profile",n)}},6596:function(e,t,n){"use strict";n.d(t,{F:function(){return l}});var r=n(13544),o=n(36417);let l=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n={page:e.toString()};void 0!==t&&(n.pinned=t.toString());let l=await (0,o.U2)("/me/playlists_page","Get My Playlists per Page",n);return l instanceof o.iQ?r.G:l}},52968:function(e,t,n){"use strict";n.d(t,{F:function(){return l},V:function(){return o}});var r=n(13544);let o={...r.G,isLoading:!0};function l(e,t){var n,o,l,a,i,s,u;switch(t.type){case"reset":return{...r.G,isLoading:!1,hasMore:!1};case"set_data":{let r=e.items?[...e.items]:[],i=null!==(o=t.payload.page)&&void 0!==o?o:1;return(null===(n=t.payload.items)||void 0===n?void 0:n.length)&&(i>(null!==(l=e.page)&&void 0!==l?l:1)||!r.length)&&r.push(...t.payload.items),{...e,...t.payload,items:r,items_count:r.length,isLoading:!1,hasMore:(null!==(a=t.payload.pages_count)&&void 0!==a?a:1)>i}}case"start_loading":return{...e,isLoading:!0};case"stop_loading":return{...e,isLoading:!1};case"remove_item":{let n=null!==(i=e.items)&&void 0!==i?i:[],r=n.filter(e=>e.id!==t.id);return{...e,items:r,items_count:r.length,total_count:Math.max((null!==(s=e.total_count)&&void 0!==s?s:0)-(n.length-r.length),0)}}case"patch_item":{let n=(null!==(u=e.items)&&void 0!==u?u:[]).map(e=>e.id===t.id?{...e,...t.patch}:e);return{...e,items:n}}default:return e}}},70241:function(e,t,n){"use strict";n.d(t,{w:function(){return l}});var r=n(2265),o=n(63555);let l=e=>{let t=(0,o.useStore)(e=>e.isAuthorized),n=(0,o.useStore)(e=>{var t;return null===(t=e.account)||void 0===t?void 0:t.username});return(0,r.useMemo)(()=>t&&!!n&&n===e,[t,n,e])}},180:function(e,t,n){"use strict";n.d(t,{M:function(){return r},z:function(){return o}});let r=e=>{let t=null==e?void 0:e.name;return"string"==typeof t?t:""},o=(e,t)=>{let n=e.play();"function"==typeof(null==n?void 0:n.catch)&&n.catch(e=>{"AbortError"!==r(e)&&t(e)})}},13438:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});let r=e=>{var t,n,r;let o=e.first_story;return[e.cover_url,null==o?void 0:null===(t=o.video)||void 0===t?void 0:t.cover_url,null==o?void 0:null===(n=o.video)||void 0===n?void 0:n.first_frame_url,null==o?void 0:null===(r=o.subject_data)||void 0===r?void 0:r.cover_url].filter(e=>!!e)}},60506:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(57437),o=n(2265),l=n(80642),a=n(97734),i=n(81757),s=n(73033);let{Context:u,Form:c}=(0,i.W)({key:s.Xz.CreatePlaylist,fields:{title:{rules:{required:!0,maxLength:50}}},action:a.pT});var d=(0,o.memo)(function(e){let{onSuccess:t,onCancel:n}=e;return(0,r.jsx)(c,{onSuccess:t,children:(0,r.jsx)(l.Z,{ctx:u,onCancel:n,onSuccess:t,submitActionKey:"Create"})})})},71715:function(e,t,n){"use strict";n.d(t,{A:function(){return s},L:function(){return i}});var r=n(6596),o=n(63555);let l=!1,a=!1,i=async()=>{let{myPlaylistsLoaded:e,setMyPlaylists:t}=o.useStore.getState();if(!e&&!l){l=!0;try{var n,a;let e=await (0,r.F)(1),o=1<(null!==(n=e.pages_count)&&void 0!==n?n:1)?2:null;t(null!==(a=e.items)&&void 0!==a?a:[],o)}finally{l=!1}}},s=async()=>{let{myPlaylistsNextPage:e,appendMyPlaylists:t}=o.useStore.getState();if(null!==e&&!a){a=!0;try{var n,l;let o=await (0,r.F)(e),a=e<(null!==(n=o.pages_count)&&void 0!==n?n:1)?e+1:null;t(null!==(l=o.items)&&void 0!==l?l:[],a)}finally{a=!1}
1}}},21834:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(2265),o=n(28819),l=n(63555),a=n(71715);let i=()=>{let e=(0,l.useStore)(e=>e.myPlaylists),t=(0,l.useStore)(e=>e.myPlaylistsNextPage),{ref:n,inView:i}=(0,o.YD)({threshold:0});return(0,r.useEffect)(()=>{i&&(0,a.A)()},[i]),{myPlaylists:e,myPlaylistsNextPage:t,sentinelRef:n}}},81081:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var r=n(57437);n(12619);var o=n(53974),l=n(2265),a=n(61544),i=n(94739),s=n(85900),u=n(31620),c=n(33304),d=n(64741),f=n(12361),v=n(30166),m=n(38706),h=n(70241),p=n(84542),y=n(94409),_=n(7663),b=n(83737),k=n(49388),g=n(19891),C=n.n(g);let x=(0,v.default)(()=>Promise.all([n.e(876),n.e(512),n.e(4959)]).then(n.bind(n,34959)),{loadableGenerated:{webpack:()=>[34959]},ssr:!1}),w=(0,v.default)(()=>Promise.all([n.e(3522),n.e(48)]).then(n.bind(n,50048)),{loadableGenerated:{webpack:()=>[50048]},ssr:!1}),j=(0,l.memo)(function(e){var t;let{story:n,userData:o,onEditVideo:a,onDeleteVideo:i}=e,s=(0,m.T)("features.stories.components.actions.story_video_actions"),u=(0,h.w)(null===(t=n.author)||void 0===t?void 0:t.username),[c,d]=(0,l.useState)(!1),[f,v]=(0,l.useState)(!1),g=(0,l.useMemo)(()=>{var e;return{...n,liked:null!==(e=null==o?void 0:o.liked)&&void 0!==e?e:n.liked,playlist_ids:(null==o?void 0:o.playlist_ids)||n.playlist_ids||[]}},[n,o]),j=(0,l.useCallback)(()=>{d(!0)},[]),S=(0,l.useCallback)(()=>{d(!1)},[]),L=(0,l.useCallback)(()=>{v(!0)},[]),M=(0,l.useCallback)(()=>{v(!1)},[]);return(0,r.jsxs)("aside",{className:C().actions,"aria-label":s("ActionsLabel"),onClick:e=>e.stopPropagation(),children:[(0,r.jsx)(b.Z,{story:g}),!!n.id&&(0,r.jsx)(p.Z,{storyId:n.id,count:n.comments,initial:n.comments_list,classNames:{button:C().button,icon:C().icon}}),(0,r.jsx)(y.Z,{story:g}),(0,r.jsx)(_.Z,{story:n,className:C().shareButton}),(0,r.jsx)(k.Z,{isOwner:u,storyId:n.id,onEdit:a,onDelete:i,onReport:j}),c&&n.id&&(0,r.jsx)(x,{storyId:n.id,isOpen:c,onClose:S,onSuccess:L}),f&&(0,r.jsx)(w,{isOpen:f,onClose:M})]})});var S=n(38944),L=n(4220),M=n(72513),N=n(85143),P=n(70745),I=(0,l.memo)((0,l.forwardRef)(function(e,t){var n;let{story:v,testIdScope:m,userData:h,muted:p,autoplay:y,startAt:_,headerControls:b,footerControls:k,posterUrl:g,posterPlaceholderUrl:C,className:x,classNames:w,xRootMargin:I,xThreshold:U,posterHeight:E,posterWidth:T,maxQuality:R,defaultQuality:Z,muteIconSize:B="size-5",playOnHover:A,showActions:D=!0,showPlayOverlay:V=!1,trackViews:F=!0,onEditVideo:z,onDeleteVideo:W,trackingName:H,trackingData:O,onClick:Q}=e,G=(0,N.C9)("story","Mute"),K=(0,N.C9)("story","Unmute"),{interact:X}=(0,u.z)(null!=H?H:"video"),Y=(0,L.wr)(),$=(0,l.useRef)(null),q=(0,l.useRef)(null),J=(0,l.useRef)(!1),ee=(0,l.useRef)(!1),[et,en]=(0,o.S1)({threshold:null!=U?U:.5,rootMargin:I}),er=(0,M.u)({story:v,enabled:F,isInView:!!(null==en?void 0:en.isIntersecting)}),[eo,el]=(0,l.useState)(null==p||p),[ea,ei]=(0,l.useState)(!1),[es,eu]=(0,l.useState)(!1),ec=null!==(n=null==Y?void 0:Y.muted)&&void 0!==n?n:eo,ed=(0,l.useCallback)(()=>{var e;F&&((0,S.xg)(v),X({element:"video-watch",action:"watch",data:{...O,video_id:v.id,creator_id:null===(e=v.author)||void 0===e?void 0:e.id,content_type:(0,P.zg)(v),content_id:(0,P.US)(v)}}))},[v,F,X,O]),ef=(0,l.useCallback)(e=>{if(Y)Y.setMuted(e);else{var t;el(e),null===(t=$.current)||void 0===t||t.setMuted(e)}},[Y]),ev=(0,l.useCallback)(e=>{null==e||e.stopPropagation();let t=!ec;ef(t),F&&X({element:"video-mute-button",action:"toggle",data:{mode:t?"mute":"unmute"}})},[ef,ec,F,X]),em=(0,l.useCallback)(e=>{if(Y)Y.blur(v,e);else{var t;null===(t=$.current)||void 0===t||t.pause()}},[Y,v]),eh=(0,l.useCallback)(e=>{if(Y)Y.focus(v,e);else{var t;null===(t=$.current)||void 0===t||t.play()}},[Y,v]),ep=(0,l.useCallback)(()=>{var e;null==Q||Q(v),F&&X({action:"open",data:{...O,video_id:v.id,creator_id:null===(e=v.author)||void 0===e?void 0:e.id,content_type:(0,P.zg)(v),content_id:(0,P.US)(v)}})},[Q,X,v,O,F]),ey=(0,l.useCallback)(e=>{let t=$.current;if(t){if(ea){e.stopPropagation(),ee.current=!0,t.pause();return}ee.current=!1,t.preload(),t.play(),eh()}},[ea,eh]),e_=(0,l.useCallback)(()=>{eu(!0),ei(!0)},[]),eb=(0,l.useCallback)(()=>ei(!1),[]),ek=(0,l.useCallback)(e=>{if(!(0,d.G)())switch(e.key){case"Enter":case" ":if(V&&e.target!==e.currentTarget)return;e.preventDefault(),ep();break;case"m":case"M":e.preventDefault(),ev();break;case"ArrowLeft":e.preventDefault(),e.currentTarget.dispatchEvent(new KeyboardEvent("keydown",{key:"ArrowLeft",bubbles:!0}));break;case"ArrowRight":e.preventDefault(),e.currentTarget.dispatchEvent(new KeyboardEvent("keydown",{key:"ArrowRight",bubbles:!0}))}},[ev,ep,V]),eg=(0,l.useCallback)(()=>
1{if(A){if(Y){Y.hover(v);return}J.current=!0,q.current&&clearTimeout(q.current),q.current=setTimeout(()=>{q.current=null,J.current&&eh(!0)},300)}},[eh,A,Y,v]),eC=(0,l.useCallback)(()=>{if(A){if(Y){Y.unhover(v);return}J.current=!1,q.current&&(clearTimeout(q.current),q.current=null),em(!0)}},[em,A,Y,v]),ex=(0,l.useCallback)(e=>{$.current=e,"function"==typeof t?t(e):t&&(t.current=e)},[]);return((0,l.useEffect)(()=>{Y||void 0===p||el(p)},[p,Y]),(0,l.useEffect)(()=>{(null==en?void 0:en.isIntersecting)?ee.current||eh():em()},[em,null==en?void 0:en.isIntersecting,eh,v]),(0,l.useEffect)(()=>{let e=$.current;if(Y&&e)return Y.register(v,e),()=>{Y.unregister(v)}},[v.id]),v.id&&v.video)?(0,r.jsxs)("div",{id:"story-video-".concat(v.id),"data-testid":(0,f.z7)("story-video",v.id,null!=m?m:""),className:(0,c.cn)("story-video-container focusable",{"has-play-overlay":V},x,null==w?void 0:w.container),tabIndex:V?void 0:0,role:V?void 0:"button",onKeyDown:ek,onClick:ep,onMouseEnter:eg,onMouseLeave:eC,children:[(0,r.jsx)(a.ZP,{ref:ex,containerRef:et,id:v.id,hlsUrl:v.video.hls_url,fallbackUrl:v.video.video_url,posterUrl:g||v.video.cover_url||v.video.first_frame_url,posterPlaceholderUrl:C,posterHeight:E,posterWidth:T,muted:ec,startAt:_,state:y?a.Ii.Play:a.Ii.Undefined,classNames:(0,c.cn)("story-video",x,null==w?void 0:w.video),maxQuality:R,defaultQuality:Z,onWatched:ed,onProgress:er,onMuteChange:ef,onPlay:V?e_:void 0,onPause:V?eb:void 0,onClick:Q?ep:void 0}),V&&es&&(0,r.jsx)(s.Z,{isPlaying:ea,onToggle:ey}),D&&(0,r.jsx)(j,{story:v,userData:h,onEditVideo:z,onDeleteVideo:W}),(0,r.jsxs)("section",{className:(0,c.cn)("story-video-controls",null==w?void 0:w.controls),"aria-hidden":"true",children:[(0,r.jsxs)("header",{className:(0,c.cn)(null==w?void 0:w.header),children:[b,(0,r.jsx)("button",{type:"button",className:"story-mute-btn focu
1sable","data-testid":"story-mute-".concat(v.id),onClick:ev,"aria-label":ec?K:G,"aria-keyshortcuts":"m",children:ec?(0,r.jsx)(i.n,{className:B,color:"#fff"}):(0,r.jsx)(i.I,{className:B,color:"#fff"})})]}),!!k&&(0,r.jsx)("footer",{className:(0,c.cn)(null==w?void 0:w.footer),children:k})]})]}):null}))},83737:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(57437),o=n(38706),l=n(2265),a=n(83601),i=n(86749),s=n(67018),u=n(12361),c=n(85143),d=n(22612),f=n(91121),v=n.n(f),m=n(3655),h=n(31620),p=n(63555),y=n(4220);let _=e=>{var t,n;let r=(0,y.wr)(),o=(0,p.useStore)(e=>e.isAuthorized),{interact:a}=(0,h.z)("story-like-button"),[i,s]=(0,l.useState)(null!==(t=e.liked)&&void 0!==t&&t),[u,c]=(0,l.useState)(null!==(n=e.likes)&&void 0!==n?n:0);(0,l.useEffect)(()=>{void 0!==e.liked&&s(e.liked)},[e.liked]),(0,l.useEffect)(()=>{var t;c(null!==(t=e.likes)&&void 0!==t?t:0)},[e.likes]);let d=(0,l.useCallback)(async t=>{if(null==t||t.stopPropagation(),e.id&&o){if(s(!i),c(i?u-1:u+1),!(i?await (0,m.Af)(e.id):await (0,m.ON)(e.id))){s(i),c(u);return}null==r||r.updateStory({...e,liked:!i,likes:i?u-1:u+1}),a({action:"toggle",data:{story_id:e.id,mode:i?"unlike":"like"}})}},[e,i,u,o,r,a]);return{isLiked:i,likesCount:u,toggleLike:d,isAuthorized:o}};var b=(0,l.memo)(function(e){var t,n,l,f,m,h;let{story:p,showCount:y,classNames:b}=e,k=(0,c.C9)("story","Like"),g=(0,c.C9)("story","Unlike"),C=(0,o.G)(),{isLiked:x,likesCount:w,toggleLike:j,isAuthorized:S}=_(p),L=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Z,{className:null!==(t=null==b?void 0:b.icon)&&void 0!==t?t:v().icon,filled:x}),y&&w>0&&(0,r.jsx)("span",{className:null!==(n=null==b?void 0:b.count)&&void 0!==n?n:v().count,children:C.number(w,i.w)})]});return S?(0,r.jsx)("button",{type:"button",className:null!==(m=null==b?void 0:b.button)&&void 0!==m?m:v().button,"aria-label":x?g:k,"aria-pressed":x,"data-testid":(0,u.z7)("story-like-button",null!==(h=p.id)&&void 0!==h?h:""),onClick:j,children:L}):(0,r.jsx)("a",{href:(0,s.h)(d.LS.Login),className:null!==(l=null==b?void 0:b.button)&&void 0!==l?l:v().button,"aria-label":k,"data-testid":(0,u.z7)("story-like-button",null!==(f=p.id)&&void 0!==f?f:""),children:L})})},49388:function(e,t,n){"use strict";var r=n(57437),o=n(2265),l=n(21040),a=n(93662),i=n(51860),s=n(52401),u=n(91866),c=n(98164),d=n(12361),f=n(95594),v=n(85143),m=n(59301),h=n.n(m);let p=(0,o.memo)(function(e){let{isOwner:t,storyId:n,isPinned:m,isPinDisabled:p,placement:y="bottom-end",onPin:_,onEdit:b,onDelete:k,onReport:g}=e,C=(0,v.C9)("story","MoreOptions"),[x,w]=(0,o.useState)(!1),j=(0,o.useCallback)(()=>{w(!1),null==_||_()},[_]),S=(0,o.useCallback)(()=>{w(!1),null==b||b()},[b]),L=(0,o.useCallback)(()=>{w(!1),null==k||k()},[k]),M=(0,o.useCallback)(()=>{w(!1),null==g||g()},[g]);return(0,r.jsxs)(c.J2,{placement:y,isOpen:x,shouldCloseOnBlur:!0,onOpenChange:w,children:[(0,r.jsx)(c.xo,{children:(0,r.jsx)("button",{type:"button",className:h().trigger,"aria-label":C,"data-testid":(0,d.z7)("story-more-button",null!=n?n:""),onClick:e=>e.stopPropagation(),children:(0,r.jsx)(i.Z,{className:h().triggerIcon})})}),(0,r.jsx)(c.yk,{className:h().popover,children:(0,r.jsxs)("ul",{className:h().menu,role:"menu","aria-label":C,children:[t&&_&&(0,r.jsx)("li",{role:"menuitem",className:h().menuItem,children:(0,r.jsxs)("button",{type:"button",disabled:p,"data-testid":"story-more-menu-pin",onClick:j,children:[(0,r.jsx)(s.Z,{className:h().menuIcon}),(0,r.jsx)(f.LO,{type:"story",action:m?"UnpinVideo":"PinVideo"})]})}),t&&b&&(0,r.jsx)("li",{role:"menuitem",className:h().menuItem,children:(0,r.jsxs)("button",{type:"button","data-testid":"story-more-menu-edit",onClick:S,children:[(0,r.jsx)(l.Z,{className:h().menuIcon}),(0,r.jsx)(f.LO,{type:"story",action:"EditVideo"})]})}),t&&k&&(0,r.jsx)("li",{role:"menuitem",className:h().menuItemDanger,children:(0,r.jsxs)("button",{type:"button","data-testid":"story-more-menu-delete",onClick:L,children:[(0,r.jsx)(u.Z,{className:h().menuIconTrash}),(0,r.jsx)(f.LO,{type:"story",action:"DeleteVideo"})]})}),!t&&(0,r.jsx)("li",{role:"menuitem",className:h().menuItemDanger,children:(0,r.jsxs)("button",{type:"button","data-testid":"story-more-menu-report",onClick:M,children:[(0,r.jsx)(a.Z,{className:h().menuIcon}),(0,r.jsx)(f.LO,{type:"story",action:"Report"})]})})]})})]})});t.Z=p},84542:function(e,t,n){"use strict";var r=n(57437),o=n(30166),l=n(38706),a=n(2265),i=n(84002),s=n(86749),u=n(31620),c=n(12361),d=n(85143),f=n(42409),v=n.n(f);let m=(0,o.default)(()=>Promise.all([n.e(2752),n.e(423),n.e(1418),n.e(3901),n.e(6325),n.e(3465)]).then(n.bind(n,84700)),{loadableGenerated:{webpack:()=>[84700]},ssr:!1}),h=(0,a.memo)(function(e){var t,n,o;let{storyId:f,count:h,initial:p,showCount:y,classNames:_,onCountChange:b}=e,k=(0,d.C9)("story","Comments"),g=(0,l.G)(),{interact:C}=(0,u.z)("story-comments"),[x,w]=(0,a.useState)(!1),[j,S]=(0,a.useState)(null!=h?h:0),L=(0,a.useCallback)(()=>{C({action:"open",data:{story_id:f}}),w(!0)},[C,f]),M=(0,a.useCallback)(()=>w(!1),[]),N=(0,a.useCallback)(e=>{S(e),null==b||b(e)},[b]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",className:null!==(t=null==_?void 0:_.button)&&void 0!==t?t:v().button,"aria-label":k,"data-testid":(0,c.z7)("comments-button",f),onClick:L,children:[(0,r.jsx)(i.Z,{className:null!==(n=null==_?void 0:_.icon)&&void 0!==n?n:v().icon}),y&&j>0&&(0,r.jsx)("span",{className:null!==(o=null==_?void 0:_.count)&&void 0!==o?o:v().count,children:g.number(j,s.w)})]}),x&&(0,r.jsx)(m,{storyId:f,isOpen:x,count:null!=h?h:j,initial:p,onClose:M,onCountChange:N})]})});t.Z=h},94409:function(e,t,n){"use strict";n.d(t,{Z:function(){return D}});var r=n(57437),o=n(38706),l=n(2265);let a=(0,l.memo)(function(e){let{filled:t,...n}=e;return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:t?"currentColor":"none",...n,children:(0,r.jsx)("path",{d:"M19 21L12 16L5 21V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.9
16086 3.21071 6.46957 3 7 3H17C17.5304 3 18.0391 3.21071 18.4142 3.58579C18.7893 3.96086 19 4.46957 19 5V21Z",stroke:n.color||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})});var i=n(63555),s=n(67018),u=n(12361),c=n(85143),d=n(22612),f=n(39015),v=n(47954),m=n.n(v);let h=(0,l.memo)(function(e){let{notification:t,onClose:n,onChangeClick:l}=e,a=(0,o.T)("features.stories.components.save.save_notification"),i=(0,c.C9)("Close");return t?(0,r.jsx)(f.Z,{isOpen:!!t,onClose:n,closeAriaLabel:i,actionButton:{label:a("Change"),onClick:l},children:(0,r.jsxs)("p",{className:m().text,children:[a("saved"===t.action?"SavedTo":"RemovedFrom")," ",(0,r.jsx)("strong",{children:t.playlistName})]})}):null});var p=n(46983),y=n.n(p),_=n(33524),b=n(89446),k=n(92501),g=n(33304),C=n(60506),x=n(71852),w=n(95526),j=n(13438),S=n(59420),L=n.n(S);let M=(0,l.memo)(function(e){var t,n;let{playlist:a,isSelected:i,isDisabled:s,onToggle:u}=e,c=(0,o.T)("features.stories.components.save.save_playlist_item"),d=(0,l.useCallback)(()=>{a.id&&!s&&u(a.id)},[u,a.id,s]),f=(0,l.useMemo)(()=>(0,j.o)(a),[a]);return(0,r.jsxs)("button",{type:"button",className:L().item,onClick:d,disabled:s,children:[(0,r.jsx)(w.Z,{urls:f,alt:null!==(t=a.title)&&void 0!==t?t:"",className:L().coverImage}),(0,r.jsx)("div",{className:L().gradient}),i&&(0,r.jsx)("div",{className:L().checkmark,"aria-hidden":"true",children:(0,r.jsx)(x.Z,{})}),(0,r.jsxs)("div",{className:L().overlay,children:[(0,r.jsx)("p",{className:L().title,children:a.title}),(0,r.jsx)("p",{className:L().count,children:c("ItemsCount",{count:null!==(n=a.visible_stories_count)&&void 0!==n?n:0})})]}),(0,r.jsx)("div",{className:L().hover})]})});var N=n(76900),P=n.n(N),I=n(3655),U=n(21834);let E=(0,l.memo)(function(e){let{storyId:t,currentPlaylistIds:n,isOpen:a,story:s,onClose:u,onSaved:d}=e,f=(0,o.T)("features.stories.components.save.save_to_list_modal"),v=(0,c.C9)("Back"),m=(0,c.JD)("name"),{myPlaylists:h,myPlaylistsNextPage:p,sentinelRef:y,showCreateInput:x,isSaving:w,handleToggle:j,handleCreateSuccess:S,handleShowCreate:L,handleCancelCreate:N}=function(e){let{storyId:t,currentPlaylistIds:n,isOpen:r,story:o,onSaved:a}=e,s=(0,i.useStore)(e=>e.addPlaylist),u=(0,i.useStore)(e=>e.updatePlaylistStoriesCount),{myPlaylists:c,myPlaylistsNextPage:d,sentinelRef:f}=(0,U.Z)(),[v,m]=(0,l.useState)(!1),[h,p]=(0,l.useState)(!1),y=(0,l.useCallback)(async e=>{var r,o;p(!0);let l=c.find(t=>t.id===e),i=n.includes(e),s=i?n.filter(t=>
1t!==e):[...n,e],d=await (0,I.EI)(t,s),f=null!==(r=null==d?void 0:d.playlist_ids)&&void 0!==r?r:s;(null==l?void 0:l.id)&&f.includes(l.id)!==i&&u(l.id,i?-1:1),a(f,null!==(o=null==l?void 0:l.title)&&void 0!==o?o:"",i?"removed":"saved",null==l?void 0:l.cover_url),p(!1)},[c,t,n,a,u]),_=(0,l.useCallback)(async e=>{var r,l,i,c;p(!0);let d=(null==o?void 0:null===(r=o.video)||void 0===r?void 0:r.cover_url)||(null==o?void 0:null===(l=o.video)||void 0===l?void 0:l.first_frame_url),f={...e,cover_url:e.cover_url||d,first_story:o};if(s(f),f.id){let e=[...n,f.id],r=await (0,I.EI)(t,e),o=null!==(i=null==r?void 0:r.playlist_ids)&&void 0!==i?i:e;o.includes(f.id)&&u(f.id,1),a(o,null!==(c=f.title)&&void 0!==c?c:"","saved",f.cover_url)}m(!1),p(!1)},[s,t,n,o,a,u]),b=(0,l.useCallback)(()=>m(!0),[]),k=(0,l.useCallback)(()=>m(!1),[]);return(0,l.useEffect)(()=>{r||m(!1)},[r]),{myPlaylists:c,myPlaylistsNextPage:d,sentinelRef:f,showCreateInput:v,isSaving:h,handleToggle:y,handleCreateSuccess:_,handleShowCreate:b,handleCancelCreate:k}}({storyId:t,currentPlaylistIds:n,isOpen:a,story:s,onSaved:d});return(0,r.jsx)(k.u_,{isOpen:a,size:"lg",backdrop:"blur",className:P().modal,onClose:u,children:(0,r.jsxs)(k.hz,{children:[(0,r.jsx)(k.xB,{className:P().header,children:(0,r.jsxs)("div",{className:P().titleRow,children:[x&&(0,r.jsx)("button",{type:"button",onClick:N,className:(0,g.cn)(P().backButton,"focusable"),"aria-label":v,children:(0,r.jsx)(_.Z,{className:P().backIcon})}),(0,r.jsx)("h3",{className:P().title,children:x?m:f("Title")}),(0,r.jsx)(k.ol,{onClick:u})]})}),(0,r.jsx)(k.fe,{children:x?(0,r.jsx)(C.Z,{onSuccess:S,onCancel:N}):h.length>0&&(0,r.jsxs)("div",{className:P().container,children:[h.map(e=>(0,r.jsx)(M,{playlist:e,isSelected:!!(e.id&&n.includes(e.id)),isDisabled:w,onToggle:j},e.id)),null!==p&&(0,r.jsx)("div",{ref:y,"aria-hidden":!0})]})}),!x&&(0,r.jsx)(k.mz,{className:P().footer,children:(0,r.jsxs)("button",{type:"button",onClick:L,className:(0,g.cn)("primary-button",P().createNewButton),disabled:w,children:[(0,r.jsx)(b.Z,{className:P().plusIcon}),(0,r.jsx)("span",{className:P().createNewLabel,children:f("CreateNewList")})]})})]})})});var T=n(31620),R=n(4220),Z=n(41840),B=n(73687);let A=e=>{var t;let n=(0,B.tv)(),r=(0,R.wr)(),o=(0,Z.Kz)(),{interact:a}=(0,T.z)("story-save-button"),s=(0,i.useStore)(e=>e.updatePlaylistStoriesCount),[u,c]=(0,l.useState)(null!==(t=e.playlist_ids)&&void 0!==t?t:[]),[d,f]=(0,l.useState)(!1),[v,m]=(0,l.useState)(null),h=(0,l.useRef)(null),p=u.length>0;(0,l.useEffect)(()=>{void 0!==e.playlist_ids&&c(e.playlist_ids)},[e.playlist_ids]),(0,l.useEffect)(()=>()=>{h.current&&clearTimeout(h.current)},[]);let y=(0,l.useCallback)((e,t)=>{h.current&&clearTimeout(h.current),m({playlistName:e,action:t}),h.current=setTimeout(()=>m(null),5e3)},[]),_=(0,l.useCallback)(e=>{e.stopPropagation(),f(!0)},[]),b=(0,l.useCallback)(t=>{if(t.stopPropagation(),!e.id)return;let l=[...u];l.forEach(e=>{s(e,-1)}),c([]),null==r||r.updateStory({...e,playlist_ids:[]}),(0,I.EI)(e.id,[]).then(t=>{if(!t){l.forEach(e=>{s(e,1)}),c(l),null==r||r.updateStory({...e,playlist_ids:l});return}a({action:"toggle",data:{story_id:e.id,mode:"unsave"}}),(null==o?void 0:o.feedType.type)==="playlist"&&l.includes(o.feedType.playlistId)&&n.refresh()})},[e,u,r,o,s,n,a]),k=(0,l.useCallback)((t,l,i,s)=>{if(f(!1),c(t),null==r||r.updateStory({...e,playlist_ids:t}),a({action:"toggle",data:{story_id:e.id,mode:"saved"===i?"save":"unsave"}}),(null==o?void 0:o.feedType.type)==="playlist"&&"removed"===i&&e.id&&!t.includes(o.feedType.playlistId)){n.refresh();return}y(l,i)},[e,r,o,n,y,a]);return{isSaved:p,playlistIds:u,isModalOpen:d,notification:v,handleSave:_,handleRemove:b,handleSaved:k,handleModalClose:(0,l.useCallback)(()=>f(!1),[]),handleNotificationClose:(0,l.useCallback)(()=>{h.current&&clearTimeout(h.current),m(null)},[]),handleChangeClick:(0,l.useCallback)(()=>{h.current&&clearTimeout(h.current),m(null),f(!0)},[])}};var D=(0,l.memo)(function(e){var t,n,l,f;let{story:v,showLabel:m,classNames:p}=e,_=(0,o.T)("features.stories.components.save.save_story_button"),b=(0,c.C9)("Save"),k=(0,i.useStore)(e=>e.isAuthorized),{isSaved:g,playlistIds:C,isModalOpen:x,notification:w,handleSave:j,handleRemove:S,handleSaved:L,handleModalClose:M,handleNotificationClose:N,handleChangeClick:P}=A(v),I=null!==(t=null==p?void 0:p.button)&&void 0!==t?t:y().button,U=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a,{className:null!==(n=null==p?void 0:p.icon)&&void 0!==n?n:y().icon,filled:g}),m&&(0,r.jsx)("span",{children:b})]});return k?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",className:I,"aria-label":g?_("RemoveLabel"):b,"aria-pressed":g,"data-testid":(0,u.z7)("story-save-button",null!==(f=v.id)&&void 0!==f?f:""),onClick:g?S:j,children:U}),x&&(0,r.jsx)(E,{storyId:v.id,currentPlaylistIds:C,isOpen:x,story:v,onClose:M,onSaved:L}),(0,r.jsx)(h,{notification:w,onClose:N,onChangeClick:P})]}):(0,r.jsx)("a",{href:(0,s.h)(d.LS.Login),className:I,"aria-label":b,"data-testid":(0,u.z7)("story-save-button",null!==(l=v.id)&&void 0!==l?l:""),children:U})})},7663:function(e,t,n){"use strict";var r=n(57437),o=n(38706),l=n(2265),a=n(8726),i=n(33304),s=n(12361),u=n(38944),c=n(73687),d=n(61421),f=n.n(d);let v=(0,l.memo)(function(e){let{story:t,className:n}=e,l=(0,o.T)("features.stories.components.share_story_button"),d=(0,c.lS)();return t.id?(0,r.jsx)("a",{href:(0,u.VC)(t,d),className:(0,i.cn)(f().trigger,!n&&f().triggerDefault,"focusable",n),"aria-label":l("AriaLabel"),"data-testid":(0,s.z7)("story-share-button",t.id),children:(0,r.jsx)(a.Z,{})}):null});t.Z=v},38944:function(e,t,n){"use strict";n.d(t,{$u:function(){return b},LA:function(){return g},Pn:function(){return p},QN:function(){return k},VC:function(){return y},Y7:function(){return C},fo:function(){return _},k7:function(){return h},xg:function(){return m}});var r=n(36417),o=n(3655),l=n(34341),a=n(98925),i=n(63555),s=n(67018),u=n(41615),c=n(68264),d=n(1318),f=n(70745),v=n(22612);let m=e=>{var t;e.id&&(null===(t=e.author)||void 0===t?void 0:t.id)&&(0,f.US)(e)&&((0,l.L9)({type:"view",story_id:e.id}),a.c.sendEvent("story-view",{story:e}))},h=(e,t,n)=>{var r;
1e.id&&(null===(r=e.author)||void 0===r?void 0:r.id)&&(0,f.US)(e)&&!(n<1)&&(0,l.L9)({type:"watch_time",story_id:e.id,view_id:t,value:n})},p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unknown",n=arguments.length>2?arguments[2]:void 0;a.c.sendEvent("share",{type:"video",id:e.toString(),method:t}),n&&(0,l.L9)({type:"share",story_id:e,method:t,url:n})},y=(e,t)=>{let n=new URLSearchParams({id:String(e.id),seo:(0,f.uO)(e)||""}),r=null!=t?t:(0,u.p8)(e.author);return r&&n.set("scope",(0,u.PH)(r)),"#".concat(v.FS.ShareVideo,"?").concat(n)},_=async(e,t,n,r)=>{let l=(0,c.jK)({...t,id:e});if(r)return(0,d.D)(r,l,n);let a=await (0,o.qn)(e);return(null==a?void 0:a.url)?a.url:(0,s.aq)(l,n,!0)},b=async e=>await (0,o.$u)(e.storyId,{description:e.description}),k=async e=>await (0,o.QN)(e.storyId,Number(e.report_type)),g=async e=>{let{pushToast:t}=i.useStore.getState();return!(await (0,o.sI)([e]) instanceof r.iQ)||(t({titleKey:"Stories.Delete.Fail.Title",messageKey:"Stories.Delete.Fail.Message"}),!1)};function C(e){return{id:e.video_id,subject_data:{type:e.type,id:e.id,seo:e.seo,name:e.name,cover_url:e.cover_url,address:e.address,details:e.details},video:{video_url:e.video_thumbnail_url}}}},4220:function(e,t,n){"use strict";n.d(t,{Ac:function(){return f},Uw:function(){return v},wr:function(){return m}});var r=n(57437),o=n(53974),l=n(2265),a=n(61544),i=n(34042);let s=(0,l.createContext)(void 0),u=e=>e.map(e=>{var t;return null!==(t=c(e))&&void 0!==t?t:"0"}).sort((e,t)=>e<t?-1:1).join("|"),c=e=>{var t;return null!==(t=null==e?void 0:e.key)&&void 0!==t?t:null==e?void 0:e.id},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(!e||!t.length)return[];let r=new Map;return t.forEach((o,l)=>{let a=c(o),i=c(e);if(!a||i!==a)return;let s=t[l+n],u=t[l-n],d=c(s),f=c(u);d&&r.set(d,s),f&&r.set(f,u)}),Array.from(r.values())},f=e=>{var t;let{children:n,autoplay:f,feed:v,defaultMuted:m,paging:h,initialStories:p}=e,{screenSize:y}=(0,i.e)(),_=(0,l.useRef)(new Map),b=(0,l.useRef)(),k=(0,l.useRef)(new Set),g=(0,l.useRef)(new Set),C=(0,l.useRef)(()=>a.Ii.Undefined),x=(0,l.useRef)(null),w=(0,l.useRef)(null),j=(0,l.useRef)(),[S,L]=(0,l.useState)(null!==(t=null!=p?p:null==h?void 0:h.items)&&void 0!==t?t:[]),[M,N]=(0,l.useState)(0),P=(0,o.$X)(),[I,U]=(0,l.useState)(null==m||m),[E,T]=(0,l.useState)(),[R,Z]=(0,l.useState)(void 0===f||f),B=(0,l.useMemo)(()=>v?1:y<i._.MD?2:3,[y,v]),A=(0,l.useMemo)(()=>{var e;return null!==(e=null==S?void 0:S.filter(e=>{let t=c(e);return!!t&&P.has(t)}))&&void 0!==e?e:[]},[S,P,M]),D=(0,l.useRef)([]);D.current=A;let V=u(S),F=u(A),z=(0,l.useMemo)(()=>null!=E?E:R?A[0]:void 0,[R,F,E]),W=(0,l.useMemo)(()=>R?d(z,S,B):[],[R,V,z,B]),H=(0,l.useMemo)(()=>R?d(z,S,2*B):[],[R,V,z,B]),O=u(W),Q=u(H),G=(0,l.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=c(e);if(n){if(t){T(e);return}P.has(n)||(P.add(n),N(e=>e+1))}},[P,T]),K=(0,l.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=c(e);if(n){if(t){T(void 0);return}P.has(n)&&(P.delete(n),N(e=>e+1)),T(e=>e&&c(e)===n?void 0:e)}},[P]),X=(0,l.useCallback)(e=>{let t=c(e);t&&(w.current&&(clearTimeout(w.current),w.current=null),x.current&&clearTimeout(x.current),j.current=t,x.current=setTimeout(()=>{x.current=null,j.current===t&&T(e)},300))},[T]),Y=(0,l.useCallback)(e=>{let t=c(e);if(t){if(x.current&&(clearTimeout(x.current),x.current=null),c(D.current[0])!==t){let e=_.current.get(t);null==e||e.pause()}j.current=void 0,w.current=setTimeout(()=>{w.current=null,void 0===j.current&&T(void 0)},300)}},[T]),$=(0,l.useCallback)(()=>{U(e=>{let t=!e;return _.current.forEach(e=>{e.setMuted(t)}),t})},[]),q=(0,l.useCallback)(e=>{U(e),_.current.forEach(t=>{t.setMuted(e)})},[]),J=(0,l.useCallback)(e=>e&&S.some(t=>c(t)===e)?v&&R&&e===c(S[0])&&!z?a.Ii.Preload:e===c(z)?a.Ii.Play:W.some(t=>c(t)===e)?a.Ii.Preload:H.some(t=>c(t)===e)?a.Ii.Prepare:a.Ii.Unload:a.Ii.Undefined,[z,v,R,V,O,Q]);C.current=J;let ee=(0,l.useCallback)(e=>{L(t=>[...t,...e.filter(e=>!t.some(t=>c(t)===c(e)))])},[]),et=(0,l.useCallback)(e=>{L(t=>t.map(t=>c(t)===c(e)?{...t,...e}:t)),N(e=>e+1)},[]),en=(0,l.useCallback)(e=>{L(t=>t.filter(t=>t.id!==e))},[]),er=(0,l.useCallback)((e,t)=>{let n=c(e);if(!n)return;_.current.set(n,t);let r=C.current(n);r===a.Ii.Play?t.init().then(()=>{t.preload(),t.play()}):r===a.Ii.Preload?t.init().then(()=>t.preload()):r===a.Ii.Prepare&&t.init()},[]),eo=(0,l.useCallback)(e=>{let t=c(e);if(!t)return;let n=_.current.get(t);null==n||n.destroy(),_.current.delete(t)},[]);(0,l.useEffect)(()=>{!1===f?Z(!1):Z(!0)},[f,Z]),(0,l.useEffect)(()=>{let e=c(z),t=new Set(W.map(e=>
1c(e)).filter(Boolean)),n=new Set(H.map(e=>c(e)).filter(Boolean));if(b.current!==e){if(b.current){let e=_.current.get(b.current);null==e||e.pause()}if(e){let t=_.current.get(e);t&&t.init().then(()=>{t.preload(),t.play()})}b.current=e}t.forEach(t=>{if(!k.current.has(t)&&t!==e){let e=_.current.get(t);e&&e.init().then(()=>e.preload())}}),k.current.forEach(n=>{if(!t.has(n)&&n!==e){let e=_.current.get(n);null==e||e.stopLoad()}}),k.current=t,n.forEach(n=>{if(!g.current.has(n)&&n!==e&&!t.has(n)){let e=_.current.get(n);null==e||e.init()}}),g.current=n},[z,O,W,Q,H]),(0,l.useEffect)(()=>{var e;(null==h?void 0:null===(e=h.items)||void 0===e?void 0:e.length)&&L(h.items)},[h]);let el=(0,l.useMemo)(()=>({snapshot:M,stories:S,muted:I,gridSize:B,focus:G,blur:K,hover:X,unhover:Y,toggleMute:$,setMuted:q,push:ee,updateStory:et,removeStory:en,register:er,unregister:eo}),[M,I,B,V,G,K,X,Y,$,ee,et,en,er,eo]);return(0,r.jsx)(s.Provider,{value:el,children:n})},v=()=>{let e=(0,l.useContext)(s);if(!e)throw Error("useStoriesContext must be used within StoriesProvider");return e},m=()=>(0,l.useContext)(s)},41840:function(e,t,n){"use strict";n.d(t,{Kz:function(){return v},QP:function(){return f},dw:function(){return d}});var r=n(57437),o=n(53974),l=n(2265),a=n(77166),i=n(33095),s=n(97734),u=n(52968);let c=(0,l.createContext)(void 0),d=e=>{let{enabled:t=!0,children:n,feedType:d}=e,[f,v]=(0,l.useState)(!1),[m,h]=(0,l.useState)(void 0),[p,y]=(0,l.useReducer)(u.F,u.V),_=(0,o.$X)(),b=(0,l.useMemo)(()=>{var e;return null!==(e=p.items)&&void 0!==e?e:[]},[p]),k=(0,l.useMemo)(()=>0===b.findIndex(e=>e===m),[m,b]),g=(0,l.useMemo)(()=>b.findIndex(e=>e===m)===b.length-1,[m,b]),C=(0,l.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(t){y({type:"start_loading"});try{let t;switch(d.type){case"me":t=await (0,a.v6)(e);break;case"creator":t=await (0,i.XR)(d.username,e);break;case"playlist":t=await (0,s.t1)(d.playlistId,e)}y({type:"set_data",payload:t})}catch(e){y({type:"stop_loading"})}}},[t,d]),x=(0,l.useCallback)(()=>{var e;p.hasMore&&!p.isLoading&&C((null!==(e=p.page)&&void 0!==e?e:0)+1)},[p.hasMore,p.isLoading,p.page,C]),w=(0,l.useCallback)(()=>{y({type:"reset"}),C(1)},[C]),j=(0,l.useCallback)(e=>{e.id&&!_.has(e.id)&&(_.add(e.id),h(e))},[_]),S=(0,l.useCallback)(()=>v(!1),[]),L=(0,l.useCallback)(e=>{v(!0),h(e)},[]);(0,l.useEffect)(()=>{C()},[C]);let M=(0,l.useMemo)(()=>({currentStory:m,isFeedOpen:f,isCurrentFirst:k,isCurrentLast:g,paging:p,stories:b,feedType:d,closeFeed:S,focusFeed:j,loadMore:x,openStory:L,reload:w}),[m,f,k,g,p,b,d,S,j,x,L,w]);return(0,r.jsx)(c.Provider,{value:M,children:n})},f=()=>{let e=(0,l.useContext)(c);if(!e)throw Error("useStoriesFeedContext must be used within StoriesFeedProvider");return e},v=()=>(0,l.useContext)(c)},72513:function(e,t,n){"use strict";n.d(t,{u:function(){return a}});var r=n(2265),o=n(34341),l=n(38944);let a=e=>{let{story:t,enabled:n,isInView:a}=e,i=(0,r.useRef)(0),s=(0,r.useRef)(void 0),u=(0,r.useRef)(0),c=(0,r.useRef)(void 0),d=(0,r.useRef)(0),f=(0,r.useRef)(n),v=(0,r.useRef)(a),m=(0,r.useRef)(t),h=(0,r.useCallback)(e=>{var t;if(!f.current||!v.current||!Number.isFinite(e))return;let n=s.current,r=u.current,l=performance.now();if(s.current=e,u.current=l,void 0===n)return;let a=e-n;a<=0||(i.current+=1e3*Math.min(a,(l-r)/1e3,2),null!==(t=c.current)&&void 0!==t||(c.current=(0,o.E2)()))},[]),p=(0,r.useCallback)(()=>{if(!f.current)return;let e=c.current,t=Math.round(i.current);!e||t<1e3||t<=d.current||(d.current=t,(0,l.k7)(m.current,e,t))},[]),y=(0,r.useCallback)(()=>{i.current=0,s.current=void 0,u.current=0,c.current=void 0,d.current=0},[]);return(0,r.useEffect)(()=>{v.current=a,a||(p(),y())},[a,p,y]),(0,r.useEffect)(()=>(m.current=t,()=>{p(),y()}),[t.id,p,y]),(0,r.useEffect)(()=>{if(f.current=n,!n)return;let e=()=>{"hidden"===document.visibilityState&&p()};return window.addEventListener("pagehide",p),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("pagehide",p),document.removeEventListener("visibilitychange",e)}},[n,p]),h}},56799:function(e,t,n){"use strict";var r,o;n.d(t,{$:function(){return r}}),(o=r||(r={}))[o.Instagram=1]="Instagram",o[o.TikTok=2]="TikTok"},22612:function(e,t,n){"use strict";var r,o,l,a,i,s,u;n.d(t,{FS:function(){return a},LS:function(){return o},m3:function(){return r},mL:function(){return l},wU:function(){return i}}),(r||(r={})).Referral="referral",(s=o||(o={})).Login="login",s.ForgotPassword="forgot-password",s.ResetPassword="reset-password",s.SignUp="sign-up",(l||(l={})).LanguageCurrency="language-currency",(u=a||(a={})).ShareVideo="share-video",u.ShareCreator="share-creator",(i||(i={})).Postcard="story"},12619:function(){},54042:function(e){e.exports={surface:"VideoPlayOverlay_surface__AtDxf",scrim:"VideoPlayOverlay_scrim__NDWMT",playCircle:"VideoPlayOverlay_playCircle__9efJn",playIcon:"VideoPlayOverlay_playIcon__4ca7O"}},21144:function(e){e.exports={button:"CancelButton_button__j_COe"}},13224:function(e){e.exports={form:"PlaylistForm_form___aq1J",charCount:"PlaylistForm_charCount__Enucl",footer:"PlaylistForm_footer__9cKrx",footerButton:"PlaylistForm_footerButton__PFxKz"}},25970:function(e){e.exports={container:"Notification_container__DRVsa",content:"Notification_content__7IJss",actionBtn:"Notification_actionBtn__oCHDi",closeBtn:"Notification_closeBtn__izDP0",closeIcon:"Notification_closeIcon__athz9"}},91121:function(e){e.exports={button:"LikeStoryButton_button__WXuV2 focusable",icon:"LikeStoryButton_icon___FexJ",count:"LikeStoryButton_count__3wFKL"}},59301:function(e){e.exports={trigger:"StoryMoreMenu_trigger__siw99 focusable",triggerIcon:"StoryMoreMenu_triggerIcon__AFLAK",popover:"StoryMoreMenu_popover__AWV_l",menu:"StoryMoreMenu_menu__0Qw1q",menuItem:"StoryMoreMenu_menuItem__ObmFs",menuItemDanger:"StoryMoreMenu_menuItemDanger___INWn",menuIcon:"StoryMoreMenu_menuIcon__CtTWD",menuIconTrash:"StoryMoreMenu_menuIconTrash__HpN3_"}},19891:function(e){e.exports={actions:"StoryVideoActions_actions__onLFy",button:"StoryVideoActions_button__l5a9v focusable",icon:"StoryVideoActions_icon__m7u4W",shareButton:"StoryVideoActions_shareButton__KN_HY"}},42409:function(e){e.exports={button:"CommentButton_button__7L8XR focu
1sable",icon:"CommentButton_icon__5wJYk",count:"CommentButton_count__bMfnK"}},47954:function(e){e.exports={text:"SaveNotification_text__QuASN"}},59420:function(e){e.exports={item:"SavePlaylistItem_item__VRtis",coverImage:"SavePlaylistItem_coverImage__a2y42",gradient:"SavePlaylistItem_gradient__W8vwn",checkmark:"SavePlaylistItem_checkmark__FUB5K",overlay:"SavePlaylistItem_overlay__V72eA",title:"SavePlaylistItem_title__4gyMl",count:"SavePlaylistItem_count__tPiUs",hover:"SavePlaylistItem_hover__tOEj_"}},46983:function(e){e.exports={button:"SaveStoryButton_button__ooyxC focusable",icon:"SaveStoryButton_icon__2RUhr"}},76900:function(e){e.exports={modal:"SaveToListModal_modal__0XkQt",header:"SaveToListModal_header__phHWO",titleRow:"SaveToListModal_titleRow__wFlaL",backButton:"SaveToListModal_backButton__cHkrp",backIcon:"SaveToListModal_backIcon__7dtGI",title:"SaveToListModal_title__2A6Qx",container:"SaveToListModal_container__DHVvx",footer:"SaveToListModal_footer__B_n6T",createNewButton:"SaveToListModal_createNewButton__Kqw9b",plusIcon:"SaveToListModal_plusIcon__wXgRz",createNewLabel:"SaveToListModal_createNewLabel__Q4EMW"}},61421:function(e){e.exports={trigger:"ShareStoryButton_trigger__Yl_hi",triggerDefault:"ShareStoryButton_triggerDefault__cLZ_o"}}}]);
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.