PageSourceSearch

https://seedlang.com/assets/youtube_video-4ki7Ov0B.js

js seedlang.com collected 2026-10-04 00:32:53 UTC 6,159 bytes, 83 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`b118a3387c06afdf625a4e3c513ea6a95901cac8`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`32b48bd8-00d0-43ec-927d-7da61cf2bff6`,e._sentryDebugIdIdentifier=`sentry-dbid-32b48bd8-00d0-43ec-927d-7da61cf2bff6`)}catch{}})();import{o as e}from"./chunk-BBRjo-9F.js";import{t}from"./react-CgWhlUet.js";import{n}from"./dist-Bfo7hZtR.js";import{_ as r,c as i,f as a}from"./mobx.module-D8DpqJEi.js";import{t as o}from"./mobxreact.esm--Z-zxU5E.js";import{t as s}from"./error_boundary-CYFJBKMo.js";import{t as c}from"./emotion-styled.browser.esm-4FI-bo8L.js";import{t as l}from"./jsx-runtime-CLsEzmKX.js";import{t as u}from"./dist-DClUQkFl.js";var d=l(),f=e(t());a();var p=n(),m=u(),h,g,_,v;function y(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function b(e,t,n,r,i){var a={};return Object.keys(r).forEach(function(e){a[e]=r[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,(`value`in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},a),i&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(i):void 0,a.initializer=void 0),a.initializer===void 0?(Object.defineProperty(e,t,a),null):a}var x=c.div`
2  position: relative;
3  width: 100%;
4  height: 100%;
5  margin: 0 auto;
6  
7  &, iframe {
8    border-radius: 10px;
9    overflow: hidden;
10  }
11`,S=c.div`
12  position: ${e=>e.isFloating?`fixed`:`relative`};
13  bottom: ${e=>e.isFloating?`20px`:`auto`};
14  left: ${e=>e.isFloating?`20px`:`auto`};
15  z-index: ${e=>e.isFloating?`1000`:`auto`};
16  max-width: ${e=>e.isFloating?`540px`:``};
17  max-height: ${e=>e.isFloating?`300px`:``};
18  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
19  transition-property: position, bottom, left, z-index, box-shadow, border-radius;
20  box-shadow: ${e=>e.isFloating?`0 4px 12px rgba(0, 0, 0, 0.15)`:`none`};
21  will-change: transform, opacity;
22  transform: ${e=>e.isFloating?`scale(0.65)`:`none`};
23  transform-origin: bottom left;
24  backface-visibility: hidden;
25  width: 100%;
26  height: 100%;
27`,C=c.div`
28  width: 100%;
29  height: fit-content;
30  padding: 1em;
31  text-align: center;
32  font-size: 14px;
33  line-height: 1.5;
34  text-wrap: balance;
35  display: grid;
36  place-content: center;
37  position: relative;
38  .background {
39    position: absolute;
40    inset: 0;
41    z-index: 1;
42    background-color: #DDD;
43    ${({placeholderImageUrl:e})=>e&&`
44      background-image: url('${e}');
45      background-size: cover;
46      filter: blur(5px);
47    `}
48  }
49  .notice-text {
50    z-index: 2;
51    padding: 1em;
52    background: rgba(255,255,255,0.9);
53    border-radius: 0.5em;
54    .title {
55      font-size: 120%;
56      font-weight: bold;
57    }
58  }
59`,w=c.div`
60  display: inline-block;
61  background: ${e=>e.background};
62  color: ${e=>e.color};
63  width: ${e=>e.width};
64  margin: ${e=>e.margin};
65  padding: 5px;
66  font-weight: bold;
67  cursor: pointer;
68  border-radius: 10px;
69`,T=c.div`
70  position: absolute;
71  top: -10px;
72  right: -10px;
73  width: 40px;
74  height: 40px;
75  font-size: 24px;
76  background: #000;
77  border-radius: 50%;
78  ${(0,m.flexCenter)()}
79  cursor: pointer;
80  color: #fff;
81  z-index: 2;
82`;function E(){let e=sessionStorage.getItem(`dismissedYoutubeVideoUrls`);return e?JSON.parse(e):[]}function D(e){let t=E();sessionStorage.setItem(`dismissedYoutubeVideoUrls`,JSON.stringify([...t,e]))}var O=s(o(h=(g=class extends f.Component{constructor(e){super(e),y(this,`isOutOfView`,_,this),y(this,`floatingDisabledByUser`,v,this),this.handleCloseFloating=()=>{this.floatingDisabledByUser=!0,D(this.props.url)},this.wrapperRef=f.createRef()}get isFloating(){return!p.AppUI.layout.isMobile&&this.isOutOfView&&!this.floatingDisabledByUser&&this.props.allowFloating}componentDidMount(){if(E().includes(this.props.url)&&(this.floatingDisabledByUser=!0),p.AppUI.layout.isMobile||!this.props.allowFloating||this.floatingDisabledByUser)return;let e=new IntersectionObserver(([e])=>{let t=e.intersectionRatio<.4;t!==this.isOutOfView&&(this.isOutOfView=t)}
82,{threshold:[0,.4,.6,1],rootMargin:`-10% 0px`});return this.wrapperRef.current&&e.observe(this.wrapperRef.current),()=>e.disconnect()}render(){let e=p.PrivacySettingsState.isYoutubeAllowed?(0,d.jsx)(`div`,{className:`youtube-video`,style:{height:`100%`},children:(0,d.jsx)(`iframe`,{src:`${this.props.url}?rel=0&autoplay=${+!!this.props.autoPlay}`,style:{width:`100%`,height:`100%`},allowFullScreen:!0,frameBorder:`0`,title:`Video`,allow:`autoplay`})}):(0,d.jsxs)(C,{className:`youtube-video`,placeholderImageUrl:this.props.placeholderImageUrl,children:[(0,d.jsx)(`div`,{className:`background`}),(0,d.jsxs)(`div`,{className:`notice-text`,children:[(0,d.jsx)(`p`,{className:`title`,children:`Opt in to watch YouTube videos`}),(0,d.jsx)(`p`,{children:`To respect your privacy, we do not load YouTube videos automatically. YouTube may collect personal data and track your activity if videos are played directly from our site.`}),(0,d.jsx)(`p`,{children:`If you would like to watch the video, please click the button below to opt-in and enable the YouTube content.`}),(0,d.jsx)(w,{background:`#0584a1`,color:`#FFF`,onClick:p.PrivacySettingsUI.showModal,width:p.AppUI.layout.isMobile?`100%`:`200px`,margin:p.AppUI.layout.isMobile?`5px 0 0 0`:`0 0 0 5px`,children:`Edit Privacy Preferences`})]})]});return(0,d.jsx)(x,{ref:this.wrapperRef,children:(0,d.jsxs)(S,{isFloating:this.isFloating,children:[e,this.isFloating&&(0,d.jsx)(T,{onClick:this.handleCloseFloating,children:(0,d.jsx)(`i`,{className:`fa fa-times`})})]})})}},_=b(g.prototype,`isOutOfView`,[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),v=b(g.prototype,`floatingDisabledByUser`,[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),b(g.prototype,`isFloating`,[i],Object.getOwnPropertyDescriptor(g.prototype,`isFloating`),g.prototype),g))||h);export{O as t};
83//# sourceMappingURL=youtube_video-4ki7Ov0B.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.