PageSourceSearch

https://hopelia.com/assets/useViewAs-C4sUdePs.js

js hopelia.com collected 2026-10-02 01:32:37 UTC 1,354 bytes, 1 lines download raw bytes

1import{r}from"./index-Bf345cdl.js";const s="nidz_view_as",i="nidz:view-as",p={reel:"Vue réelle",perso:"Abonné Perso",pro:"Abonné Pro",non_abonne:"Non abonné",invite:"Invité (visiteur)"};function u(e){return e==="perso"||e==="pro"||e==="non_abonne"||e==="invite"?e:"reel"}function c(){try{return typeof sessionStorage>"u"?"reel":u(sessionStorage.getItem(s))}catch{return"reel"}}function o(e){try{typeof sessionStorage<"u"&&(e==="reel"?sessionStorage.removeItem(s):sessionStorage.setItem(s,e))}catch{}typeof window<"u"&&window.dispatchEvent(new Event(i))}function l(){o("reel")}function w(e,n){switch(e){case"perso":case"non_abonne":case"invite":return"perso";case"pro":return"pro";default:return n}}function E(e,n){if(e==="reel")return n;const t=n?.trialEndsAt??0;return e==="non_abonne"||e==="invite"?{level:"expired",active:!1,subActive:!1,trialEndsAt:t,trialDaysLeft:0}:{level:"subscribed",active:!0,subActive:!0,trialEndsAt:t,trialDaysLeft:0}}function d(e){return window.addEventListener(i,e),window.addEventListener("storage",e),()=>{window.removeEventListener(i,e),window.removeEventListener("storage",e)}}function f(){return"reel"}function b(){const e=r.useSyncExternalStore(d,c,f),n=r.useCallback(a=>o(a),[]),t=r.useCallback(()=>l(),[]);return{viewAs:e,setViewAs:n,reset:t,isSimulating:e!=="reel"}}export{p as V,w as a,l as c,E as o,b as u};

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.