PageSourceSearch

https://clicktrans.de/_nuxt3/Nlek2vJ_.js

js clicktrans.de collected 2026-10-06 08:05:48 UTC 9,583 bytes, 1 lines download raw bytes

1import{i as e}from"./CSUnZ94s.js";import{F as t,g as n,ht as r,ot as i,wt as a,xt as o}from"./Z_aOG11b.js";import{t as s}from"./DQxHBabN.js";import"./0Gol55mL.js";import{n as c}from"./Cm1HTVQb.js";import{a as l,i as u,n as d,o as f,r as p,t as m}from"./BbyoANvN.js";function h(e){if(typeof WorkerGlobalScope==`function`&&self instanceof WorkerGlobalScope){var t=self.close.bind(self);self.close=function(){return e(),t()}}else{if(typeof window.addEventListener!=`function`)return;window.addEventListener(`beforeunload`,function(){e()},!0),window.addEventListener(`unload`,function(){e()},!0)}}function g(e){process.on(`exit`,function(){return e()}),process.on(`beforeExit`,function(){return e().then(function(){return process.exit()})}),process.on(`SIGINT`,function(){return e().then(function(){return process.exit()})}),process.on(`uncaughtException`,function(t){return e().then(function(){console.trace(t),process.exit(101)})})}var _=Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`?g:h,v=new Set,y=!1;function b(){y||(y=!0,_(S))}function x(e){if(b(),typeof e!=`function`)throw Error(`Listener is no function`);return v.add(e),{remove:function(){return v.delete(e)},run:function(){return v.delete(e),e()}}}function S(){var e=[];return v.forEach(function(t){e.push(t()),v.delete(t)}),Promise.all(e)}function C(e,t){var n={context:`leader`,action:t,token:e.token};return e.broadcastChannel.postInternal(n)}function w(e){e.isLeader=!0,e._hasLeader=!0;var t=x(function(){return e.die()});e._unl.push(t);var n=function(t){t.context===`leader`&&t.action===`apply`&&C(e,`tell`),t.context===`leader`&&t.action===`tell`&&!e._dpLC&&(e._dpLC=!0,e._dpL(),C(e,`tell`))};return e.broadcastChannel.addEventListener(`internal`,n),e._lstns.push(n),C(e,`tell`)}var T=function(e,t){var n=this;this.broadcastChannel=e,e._befC.push(function(){return n.die()}),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=u(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN=`pubkey-bc||`+e.method.type+`||`+e.name},E=`LeaderElectionWebLock.die() called`;T.prototype={hasLeader:function(){var e=this;return navigator.locks.query().then(function(t){var n=t.held?t.held.filter(function(t){return t.name===e.lN}):[];return!!(n&&n.length>0)})},awaitLeadership:function(){var e=this;if(!this._wLMP){this._wKMC.c=new AbortController;var t=new Promise(function(t,n){e._wKMC.res=t,e._wKMC.rej=n});this._wLMP=new Promise(function(n,r){navigator.locks.request(e.lN,{signal:e._wKMC.c.signal},function(){return e._wKMC.c=void 0,w(e),n(),t}).catch(function(t){t.message&&t.message===E||(e._wKMC.rej&&e._wKMC.rej(t),r(t))})})}return this._wLMP},set onduplicate(e){},die:function(){var e=this;return this._lstns.forEach(function(t){return e.broadcastChannel.removeEventListener(`internal`,t)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&=!1,this.isDead=!0,this._wKMC.res&&this._wKMC.res(),this._wKMC.c&&this._wKMC.c.abort(Error(E)),C(this,`death`)}};var D=function(e,t){var n=this;this.broadcastChannel=e,this._options=t,this.isLeader=!1,this._hasLeader=!1,this.isDead=!1,this.token=u(),this._aplQ=p,this._aplQC=0,this._unl=[],this._lstns=[],this._dpL=function(){},this._dpLC=!1;var r=function(e){e.context===`leader`&&(e.action===`death`&&(n._hasLeader=!1),e.action===`tell`&&(n._hasLeader=!0))};this.broadcastChannel.addEventListener(`internal`,r),this._lstns.push(r)};D.prototype={hasLeader:function(){return Promise.resolve(this._hasLeader)},applyOnce:function(e){var t=this;if(this.isLeader)return l(0,!0);if(this.isDead)return l(0,!1);if(this._aplQC>1)return this._aplQ;var n=function(){if(t.isLeader)return d;var n=!1,r,i=new Promise(function(e){r=function(){n=!0,e()}}),a=function(e){e.context===`leader`&&e.token!=t.token&&(e.action===`apply`&&e.token>t.token&&r(),e.action===`tell`&&(r(),t._hasLeader=!0))};t.broadcastChannel.addEventListener(`internal`,a);var o=e?t._options.responseTime*4:t._options.responseTime;return C(t,`apply`).then(function(){return Promise.race([l(o),i.then(function(){return Promise.reject(Error())})])}).then(function(){return C(t,`apply`)}
1).then(function(){return Promise.race([l(o),i.then(function(){return Promise.reject(Error())})])}).catch(function(){}).then(function(){return t.broadcastChannel.removeEventListener(`internal`,a),!n&&w(t).then(function(){return!0})})};return this._aplQC+=1,this._aplQ=this._aplQ.then(function(){return n()}).then(function(){--t._aplQC}),this._aplQ.then(function(){return t.isLeader})},awaitLeadership:function(){return this._aLP||=O(this),this._aLP},set onduplicate(e){this._dpL=e},die:function(){var e=this;return this._lstns.forEach(function(t){return e.broadcastChannel.removeEventListener(`internal`,t)}),this._lstns=[],this._unl.forEach(function(e){return e.remove()}),this._unl=[],this.isLeader&&=(this._hasLeader=!1,!1),this.isDead=!0,C(this,`death`)}};function O(e){return e.isLeader?p:new Promise(function(t){var n=!1;function r(){n||(n=!0,e.broadcastChannel.removeEventListener(`internal`,a),t(!0))}e.applyOnce().then(function(){e.isLeader&&r()});var i=function(){return l(e._options.fallbackInterval).then(function(){if(!(e.isDead||n)){if(e.isLeader)r();else return e.applyOnce(!0).then(function(){e.isLeader?r():i()})}})};i();var a=function(t){t.context===`leader`&&t.action===`death`&&(e._hasLeader=!1,e.applyOnce().then(function(){e.isLeader&&r()}))};e.broadcastChannel.addEventListener(`internal`,a),e._lstns.push(a)})}function k(e,t){return e||={},e=JSON.parse(JSON.stringify(e)),e.fallbackInterval||(e.fallbackInterval=3e3),e.responseTime||(e.responseTime=t.method.averageResponseTime(t.options)),e}function A(e,t){if(e._leaderElector)throw Error(`BroadcastChannel already has a leader-elector`);t=k(t,e);var n=f()?new T(e,t):new D(e,t);return e._befC.push(function(){return n.die()}),e._leaderElector=n,n}r(),t();var j=`value-update`,M=`value-request`,N=`value-response`,P=({channelName:e,fetchValue:t,getValue:n,setValue:r,shouldSync:o=()=>!0,fallbackValue:s=null,watchSource:c=null,leaderSyncLockTimeout:l=null,onError:u=()=>{}})=>{let d=new m(e,{...typeof globalThis.BroadcastChannel==`function`?{type:`native`}:{},webWorkerSupport:!1}),f=A(d),p=!1,h=0,g=null,_=null,v={normal:null,forced:null},y={normal:null,forced:null},b=e=>e?`forced`:`normal`,x=e=>{let t=b(e),n=!!v[t];return n||(v[t]=new Promise(e=>{y[t]=n=>{v[t]=null,y[t]=null,e(n)}})),{hasPendingResponse:n,pendingResponse:v[t]}
1},S=(e,t=!1)=>{let n=b(t);y[n]?.(e)},C=({pendingResponse:e,resolvePendingResponse:t,onLeadership:n})=>{if(p)return t(void 0),Promise.resolve(void 0);let r=!1;return Promise.race([e.then(e=>(r=!0,e)),f.awaitLeadership().then(()=>{if(!r)return Promise.resolve(n()).then(e=>(r=!0,t(e),e))})]).catch(e=>{t(void 0),u(e,`failed while waiting for a leader tab response`)})},w=e=>p?Promise.resolve():d.postMessage(e).catch(e=>{u(e,`failed to send a BroadcastChannel message`)}),T=e=>{w({type:j,value:a(e)})},E=()=>{let e=n();return T(e),e},D=(e,t=!1)=>(w({type:N,value:a(e),force:t}),e),O=()=>!l||l<=0?!1:Date.now()-h<l,k=async({force:e=!1,skipFetch:n=!1}={})=>{if(!p)return g||(!e&&(O()||n)?E():o()?(g=Promise.resolve(t()).then(e=>(r(e),T(e),h=Date.now(),e)).catch(e=>{u(e,`failed while the leader tab fetched and shared the latest value`)}).finally(()=>{g=null}),g):(r(s),T(s),s))},P=({force:e=!1}={})=>{if(f.isLeader)return k({force:e});let{hasPendingResponse:t,pendingResponse:n}=x(e);return t||w({type:M,force:e}),C({pendingResponse:n,resolvePendingResponse:t=>{S(t,e)},onLeadership:()=>k({force:e}).then(t=>D(t,e))})},F=()=>{document.hidden||k({skipFetch:!0})};c&&(_=i(c,()=>{if(o())return P();r(s),f.isLeader&&T(s)})),d.onmessage=e=>{if(!p){if(e?.type===j){r(e.value),S(e.value),S(e.value,!0);return}if(e?.type===N)return S(e.value,e.force);if(e?.type===M&&f.isLeader)return k({force:e?.force}).then(t=>D(t,e?.force))}},typeof document<`u`&&document.addEventListener(`visibilitychange`,F);let I=P();return f.awaitLeadership().catch(e=>{u(e,`failed during leader election`)}),{broadcastCurrentValue:E,requestValueFromLeader:P,ready:I,destroy:async()=>{p||(p=!0,_?.(),S(void 0),S(void 0,!0),typeof document<`u`&&document.removeEventListener(`visibilitychange`,F),d.onmessage=null,await Promise.allSettled([f.die?.(),d.close?.()]))}}},F=6e4,I=null,L=async({$api:e,onError:t=()=>{}})=>{let n=s(`announcements`,()=>[]);return typeof document>`u`?n.value:I?I.requestValueFromLeader():(I=P({channelName:`announcements`,leaderSyncLockTimeout:F,getValue:()=>n.value,setValue:e=>{n.value=e},fetchValue:async()=>await e.landingPage.getAnnouncements(),onError:t}),I.ready)};t(),r();var R=()=>{let{$auth:t,$api:r,$screen:i,$bugsnagErrorHandler:a}=e(),l=n(()=>t?.loggedIn),u=n(()=>c(t?.user?.userType)),d=n(()=>i?.isMobileUserAgent),f=n(()=>d.value&&l.value&&u.value),p=n(()=>f.value&&h.value?.length===0),m=s(`announcements`,()=>[]),h=o(null);return{announcements:m,devices:h,isLoggedIn:l,isCourier:u,isMobile:d,showMobileAppBarPreconditions:f,showMobileAppBar:p,fetchAnnouncements:async()=>{try{let e=()=>L({$api:r,onError:(e,t=``)=>{a.conditionalNotify(e,`Fetch Error`,`Cannot fetch announcements: ${t}`)}});if(typeof window<`u`&&document.readyState!==`complete`){window.addEventListener(`load`,e,{once:!0});return}await e()}catch{}},fetchDevices:async()=>{try{h.value=await r.company.getCompanyDevices()}catch(e){a.conditionalNotify(e,`UseCommonLayoutData`)}},getMobileAppMeta:()=>({meta:[{name:`apple-itunes-app`,content:`app-id=1494904576`}],link:[{rel:`manifest`,href:`/frontapp/androidManifest.json`}]})}};export{R as t};

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.