PageSourceSearch

https://www.deepbase.ch/_nuxt/gwGEGWcm.js

js deepbase.ch collected 2026-10-07 03:44:43 UTC 5,571 bytes, 1 lines download raw bytes

1import{k as K,l as G,m as F,n as _,p as v,j as H,q as h}from"./D4-tnFCP.js";const j=K({id:"editingModeStore",state:()=>({isEnabled:!1,isEditing:!1})});function Z(){return{publish:(t,i)=>{try{return $fetch("/api/stories/pages/publish",{method:"POST",body:{id:t,localeIsoCode:i}})}catch(n){return console.error("error",n),Promise.reject(n)}}}}var d={},x={BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1},J={};const R=Object.create(null),I=r=>{var t;return d||x||((t=globalThis.Deno)==null?void 0:t.env.toObject())||globalThis.__env__||(r?R:globalThis)},E=new Proxy(R,{get(r,t){return I()[t]??R[t]},has(r,t){const i=I();return t in i||t in R},set(r,t,i){const n=I(!0);return n[t]=i,!0},deleteProperty(r,t){if(!t)return!1;const i=I(!0);return delete i[t],!0},ownKeys(){const r=I(!0);return Object.keys(r)}}),q=typeof process<"u"&&J&&"production"||"",z=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"]];function X(){var r,t;if(d)for(const i of z){const n=i[1]||i[0];if(d[n])return{name:i[0].toLowerCase(),...i[2]}}return(d==null?void 0:d.SHELL)==="/bin/jsh"&&((t=(r=globalThis.process)==null?void 0:r.versions)!=null&&t.webcontainer)?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const Y=X();Y.name;function a(r){return r?r!=="false":!1}var y;const Q=((y=globalThis.process)==null?void 0:y.platform)||"",V=a(E.CI)||Y.ci!==!1;var N,B;const W=a(((N=globalThis.process)==null?void 0:N.stdout)&&((B=globalThis.process)==null?void 0:B.stdout.isTTY)),$=typeof window<"u";a(E.DEBUG);const k=q==="test"||a(E.TEST);a(E.MINIMAL);const ee=/^win/i.test(Q);!a(E.NO_COLOR)&&(a(E.FORCE_COLOR)||(W||ee)&&E.TERM);var g,U;const A=(((U=(g=globalThis.process)==null?void 0:g.versions)==null?void 0:U.node)||"").replace(/^v/,"")||null;Number(A==null?void 0:A.split(".")[0]);const te=globalThis.process||Object.create(null),b={versions:{}};new Proxy(te,{get(r,t){if(t==="env")return E;if(t in r)return r[t];if(t in b)return b[t]}});var c,f;const oe=((f=(c=globalThis.process)==null?void 0:c.release)==null?void 0:f.name)==="node";var m,M;const re=!!globalThis.Bun||!!((M=(m=globalThis.process)==null?void 0:m.versions)!=null&&M.bun),se=!!globalThis.Deno,ie=!!globalThis.fastly,ne=!!globalThis.Netlify,ue=!!globalThis.EdgeRuntime;var w;const Ee=((w=globalThis.navigator)==null?void 0:w.userAgent)==="Cloudflare-Workers",le=!!globalThis.__lagon__,ae=[[ne,"netlify"],[ue,"edge-light"],[Ee,"workerd"],[ie,"fastly"],[se,"deno"],[re,"bun"],[oe,"node"],[le,"lagon"]];function de(){const r=ae.find(t=>t[0]);if(r)return{name:r[1]}}const C=de();C!=null&&C.name;function Te(){const r=G(),t=j(),{detectedLocale:i}=F(),n=_(()=>{const e=v().currentRoute.value.query._storyblok;return e&&e!==""&&!Array.isArray(e)&&!Number.isNaN(Number(e))?Number(e):void 0}),S=_(()=>{var e;return(e=H().locales.find(o=>{var u;return o.appKey===((u=i.value)==null?void 0:u.appKey)}))==null?void 0:e.code}),P=_(()=>!!n.value),p=(e,o)=>{e.content=o.content},L=e=>{var u,l,s;const o=e;t.isEditing=!0,((u=r.currentLayoutPage)==null?void 0:u.page.id)===o.id?p(r.currentLayoutPage.page,o):((s=(l=r.currentLayoutPage)==null?void 0:l.layout)==null?void 0:s.id)===o.id&&p(r.currentLayoutPage.layout,o)},T=(e=!0,o)=>{n.value&&S.value&&Z().publish(n.value,S.value).then(u=>{u.success&&(o==null||o(u))}).catch(u=>{console.error("error",u),e&&T(!1,o)})},O=(e=["input","change","published","unpublished"],o)=>{const u={resolveRelations:h().api.resolve_relations,resolveLinks:h().api.resolve_links};$&&window.storyblokRegisterEvent(()=>{const l=new window.StoryblokBridge(u);e.includes("input")&&l.on(["input"],s=>{s!=null&&s.story&&L(s.story)}),e.includes("change")&&l.on(["change"],s=>{s!=null&&s.story&&L(s.story),T(!0,o==null?void 0:o.onPublishPage)}),e.some(s=>["published","unpublished"].includes(s))&&l.on(["published","unpublished"],s=>{s!=null&&s.story&&L(s.story),T(!0,o==null?void 0:o.onPublishPage)}),l.on(["enterEditmode"],s=>{var D;(D=o==null?void 0:o.onEnterEditMode)==null||D.call(o,s==null?void 0:s.storyId)})})};return{enable:()=>{P.value&&n.value&&r.currentLayoutPage&&(t.isEnabled=!0,O())},listen:e=>{if(P.value&&n.value){t.isEnabled=!0;const o=e!=null&&e.reloadWindow||e!=null&&e.onPublishPage?()=>{e!=null&&e.onPublishPage&&(e==null||e.onPublishPage()),e!=null&&e.reloadWindow&&window.location.reload()}:void 0;O(["change","published","unpublished"],{onPublishPage:o,onEnterEditMode:e==null?void 0:e.onEnterEditMode})}}}}export{Te 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.