PageSourceSearch

https://www.nyinorge.no/nyinorge/static/js/react.Cfj3kT_C.js

js nyinorge.no collected 2026-10-02 04:52:00 UTC 8,215 bytes, 19 lines download raw bytes

1var it=Object.defineProperty;var G=e=>{throw TypeError(e)};var rt=(e,o,t)=>o in e?it(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var _=(e,o,t)=>rt(e,typeof o!="symbol"?o+"":o,t),x=(e,o,t)=>o.has(e)||G("Cannot "+t);var l=(e,o,t)=>(x(e,o,"read from private field"),t?t.call(e):o.get(e)),d=(e,o,t)=>o.has(e)?G("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(e):o.set(e,t),a=(e,o,t,s)=>(x(e,o,"write to private field"),s?s.call(e,t):o.set(e,t),t),h=(e,o,t)=>(x(e,o,"access private method"),t);import{R as nt}from"./main.CWGcSvX0.js";const at="https://www.tiktok.com/player/v1",lt=/tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/,g={INIT:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3},ut={[g.INIT]:"emptied",[g.PAUSED]:"pause",[g.ENDED]:"ended",[g.PLAYING]:"play",[g.BUFFERING]:"waiting"};function z(e,o={}){const t={src:Q(e,o),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; autoplay; fullscreen; encrypted-media; gyroscope; picture-in-picture"};return o.config&&(t["data-config"]=JSON.stringify(o.config)),`
2    <style>
3      :host {
4        display:inline-block;
5        min-width: 300px;
6        min-height: 150px;
7        position: relative;
8      }
9      iframe {
10        position:absolute;
11        top:0;
12        left:0;
13        width:100%;
14        height:100%;
15        border:0;
16      }
17    </style>
18    <iframe ${ft(t)} title="TikTok video"></iframe>
19  `}function Q(e,o={}){if(!e.src)return;const t=e.src.match(lt),s=t&&t[1],i={controls:e.controls===""?null:0,autoplay:e.autoplay,muted:e.muted,loop:e.loop,rel:0,...o.config};return`${at}/${s}?${ht(i)}`}var k,M,w,L,N,A,b,S,E,C,u,T,X,Z,V,tt;const R=class R extends(globalThis.HTMLElement??class{}){constructor(){super();d(this,u);_(this,"loadComplete",new J);d(this,k);d(this,M);d(this,w,!1);d(this,L,0);d(this,N,!0);d(this,A,null);d(this,b,100);d(this,S,0);d(this,E);d(this,C,t=>{var s;if(t.source!==((s=l(this,E))==null?void 0:s.contentWindow))return;const i=t.data;if(i?.["x-tiktok-player"])switch(i.type){case"onPlayerReady":this.loadComplete.resolve();break;case"onStateChange":{a(this,N,[g.INIT,g.PAUSED,g.ENDED].includes(i.value));const f=ut[i.value];f&&this.dispatchEvent(new Event(f));break}case"onCurrentTime":a(this,L,i.value.currentTime),a(this,S,i.value.duration),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("timeupdate"));break;case"onVolumeChange":a(this,b,i.value),this.dispatchEvent(new Event("volumechange"));break;case"onMute":a(this,w,!!i.value),a(this,b,i.value?0:l(this,b)),this.dispatchEvent(new Event("volumechange"));break;case"onError":this.dispatchEvent(new Event("error"));break;default:console.warn("Unhandled TikTok player message:",i);break}});h(this,u,tt).call(this,"config")}static get observedAttributes(){return["src","controls","loop","autoplay","muted"]}async load(){if(l(this,k))return;this.shadowRoot||this.attachShadow(R.shadowRootOptions);const t=!l(this,M);if(l(this,M)&&(this.loadComplete=new J),a(this,M,!0),await a(this,k,Promise.resolve()),a(this,k,null),a(this,L,0),a(this,w,!1),a(this,N,!0),!this.src){this.shadowRoot.innerHTML="",globalThis.removeEventListener("message",l(this,C));return}let s=this.shadowRoot.querySelector("iframe");const i=ct(this.attributes);t&&s&&a(this,A,JSON.parse(s.getAttribute("data-config")||"{}")),(!s?.src||s.src!==Q(i,this))&&(this.shadowRoot.innerHTML=z(i,this),s=this.shadowRoot.querySelector("iframe")),a(this,E,s),globalThis.addEventListener("message",l(this,C))}async attributeChangedCallback(t,s,i){if(s!==i)switch(t){case"muted":{await this.loadComplete,this.muted=i!=null;break}
19case"autoplay":case"controls":case"loop":case"src":{this.load();return}}}get config(){return l(this,A)}set config(t){a(this,A,t)}async play(){await this.loadComplete,h(this,u,T).call(this,"play")}async pause(){await this.loadComplete,h(this,u,T).call(this,"pause")}get volume(){return l(this,b)/100}set volume(t){console.warn("Volume control is not supported for TikTok videos.")}get currentTime(){return l(this,L)}set currentTime(t){h(this,u,X).call(this,t)}get muted(){return l(this,w)}set muted(t){a(this,w,t),t?h(this,u,Z).call(this):h(this,u,V).call(this)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(t){this.toggleAttribute("muted",!!t)}get paused(){return l(this,N)}get duration(){return l(this,S)}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",t??"")}};k=new WeakMap,M=new WeakMap,w=new WeakMap,L=new WeakMap,N=new WeakMap,A=new WeakMap,b=new WeakMap,S=new WeakMap,E=new WeakMap,C=new WeakMap,u=new WeakSet,T=function(t,s){var i;if(!((i=l(this,E))!=null&&i.contentWindow))return;const f={"x-tiktok-player":!0,type:t,...s!==void 0?{value:s}:{}};l(this,E).contentWindow.postMessage(f,"*")},X=async function(t){await this.loadComplete,h(this,u,T).call(this,"seekTo",Number(t))},Z=async function(){await this.loadComplete,h(this,u,T).call(this,"mute")},V=async function(){await this.loadComplete,h(this,u,T).call(this,"unMute")},tt=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){const s=this[t];delete this[t],this[t]=s}},_(R,"getTemplateHTML",z),_(R,"shadowRootOptions",{mode:"open"});let H=R;class J extends Promise{constructor(o=()=>{}){let t,s;super((i,f)=>{o(i,f),t=i,s=f}),this.resolve=t,this.reject=s}}function ct(e){let o={};for(let t of e)o[t.name]=t.value;return o}function dt(e){let o={};for(let t in e){let s=e[t];s===!0||s===""?o[t]=1:s===!1?o[t]=0:s!=null&&(o[t]=s)}return o}function ht(e){return String(new URLSearchParams(dt(e)))}function ft(e){let o="";for(const t in e){const s=e[t];s===""?o+=` ${F(t)}`:o+=` ${F(t)}="${F(`${s}`)}"`}return o}function F(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}globalThis.customElements&&!globalThis.customElements.get("tiktok-video")&&globalThis.customElements.define("tiktok-video",H);var mt=H,pt=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),vt={className:"class",htmlFor:"for"};function et(e){return e.toLowerCase()}function Y(e){if(typeof e=="boolean")return e?"":void 0;if(typeof e!="function"&&!(typeof e=="object"&&e!==null))return e}function gt({react:e,tagName:o,elementClass:t,events:s,displayName:i,defaultProps:f,toAttributeName:ot=et,toAttributeValue:st=Y}){const U=Number.parseInt(e.version)>=19,W=e.forwardRef(($,P)=>{var j,B;const m=e.useRef(null),D=e.useRef(new Map),O={},q={},p={},I={};for(const[r,n]of Object.entries($)){if(pt.has(r)){p[r]=n;continue}const c=ot(vt[r]??r);if(t.prototype&&r in t.prototype&&!(r in(((j=globalThis.HTMLElement)==null?void 0:j.prototype)??{}))&&!((B=t.observedAttributes)!=null&&B.some(y=>y===c))){I[r]=n;continue}if(r.startsWith("on")){O[r]=n;continue}const v=st(n);if(c&&v!=null&&(q[c]=String(v),U||(p[c]=v)),c&&U){const y=Y(n);v!==y?p[c]=v:p[c]=n}}if(typeof window<"u"){for(const r in O){const n=O[r],c=r.endsWith("Capture"),v=(s?.[r]??r.slice(2).toLowerCase()).slice(0,c?-7:void 0);e.useLayoutEffect(()=>{const y=m?.current;if(!(!y||typeof n!="function"))return y.addEventListener(v,n,c),()=>{y.removeEventListener(v,n,c)}},[m?.current,n])}e.useLayoutEffect(()=>{if(m.current===null)return;const r=new Map;for(const n in I)K(m.current,n,I[n]),D.current.delete(n),r.set(n,I[n]);for(const[n,c]of D.current)K(m.current,n,void 0);D.current=r})}if(typeof window>"u"&&t?.getTemplateHTML&&t?.shadowRootOptions){const{mode:r,delegatesFocus:n}=t.shadowRootOptions,c=e.createElement("template",{shadowrootmode:r,shadowrootdelegatesfocus:n,dangerouslySetInnerHTML:{__html:t.getTemplateHTML(q,$)},key:"ce-la-react-ssr-template-shadow-root"});p.children=[c,p.children]}return e.createElement(o,{...f,...p,ref:e.useCallback(r=>{m.current=r,typeof P=="function"?P(r):P!==null&&(P.current=r)},[P])},p.children)});return W.displayName=i??t.name,W}function K(e,o,t){var s;e[o]=t,t==null&&o in(((s=globalThis.HTMLElement)==null?void 0:s.prototype)??{})&&e.removeAttribute(o)}var bt=gt({react:nt,tagName:"tiktok-video",elementClass:mt,toAttributeName(e){return e==="muted"?"":e==="defaultMuted"?"muted":et(e)}});export{bt 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.