PageSourceSearch

https://cdn.peatix.com/assets/production/static/peatix-frontend/js/customRules-BxZDsLHj.js

js peatix.com collected 2026-10-01 06:58:26 UTC 3,735 bytes, 1 lines download raw bytes

1import{t as e}from"./vue-i18n-DJhw9tnh.js";import{_ as t}from"./util_datetime-Brla9JfE.js";var n=class{async get(e){let t=await fetch(e);return this.isJson(t)?t.json():t.text()}isJson(e){return(e.headers?.get(`Content-Type`))?.toLowerCase()===`application/json`}};function r(e){return(e??``).split(`.`).pop()?.toLocaleLowerCase()===`json`}function i(e){return e&&typeof e==`object`&&!Array.isArray(e)}function a(e,t){let n=e??{},r=t??{};return Object.keys(r).forEach(e=>{i(r[e])&&e in n?n[e]=a(n[e],r[e]):n[e]=r[e]}),n}var o=class e{constructor(e,t){this.distributionHash=e,this.disableManifestCache=!1,this.stringsCache={},this.disableStringsCache=!1,this.disableJsonDeepMerge=!1,this.httpClient=t?.httpClient||new n,this.disableManifestCache=!!t?.disableManifestCache,this.locale=t?.languageCode,this.disableStringsCache=!!t?.disableStringsCache,this.disableJsonDeepMerge=!!t?.disableJsonDeepMerge}getHash(){return this.distributionHash}setCurrentLocale(e){this.locale=e}getCurrentLocale(){return this.locale}async getManifestTimestamp(){return(await this.manifest).timestamp}async getContent(){return(await this.manifest).content}async getLanguageContent(e){let t=this.getLanguageCode(e);return(await this.getContent())[t]}async listLanguages(){return Object.keys(await this.getContent())}async getTranslations(){let e=await this.listLanguages(),t={};return await Promise.all(e.map(async e=>{t[e]=await this.getLanguageTranslations(e)})),t}async getLanguageTranslations(e){let t=this.getLanguageCode(e),n=(await this.getContent())[t]||[];return Promise.all(n.map(async e=>({content:await this.getFileTranslations(e),file:e})))}async getFileTranslations(t){let n=await this.getContent();if(!Object.values(n).some(e=>e.includes(t)))throw Error(`File ${t} does not exists in manifest content`);let r=await this.getManifestTimestamp(),i=`${e.BASE_URL}/${this.distributionHash}${t}?timestamp=${r}`;return this.httpClient.get(i).catch(()=>null)}async getStrings(){let e=await this.getJsonFiles(),t={};return await Promise.all(Object.entries(e).map(async([e,n])=>
1{t[e]=await this.getStringsByFilesAndLocale(n)})),t}async getStringsByLocale(e){let t=this.getLanguageCode(e),n=await this.getJsonFiles();return this.getStringsByFilesAndLocale(n[t]||[])}async getStringByKey(e,t){let n=await this.getStringsByLocale(t),r=Array.isArray(e)?e:[e],i=r.shift();if(!i)return;let a=n[i];for(let e of r)a=a?.[e];return a}clearStringsCache(){this.stringsCache={}}async getStringsByFilesAndLocale(e){let t={};for(let n of e){let e;this.disableStringsCache?e=await this.getFileTranslations(n):(this.stringsCache[n]||(this.stringsCache[n]=this.getFileTranslations(n)),e=await this.stringsCache[n]),this.disableJsonDeepMerge?t={...t,...e}:a(t,e)}return t}get manifest(){return this.manifestHolder&&!this.disableManifestCache||(this.manifestHolder=this.httpClient.get(`${e.BASE_URL}/${this.distributionHash}/manifest.json`)),this.manifestHolder}getLanguageCode(e){let t=e||this.getCurrentLocale();if(t)return t;throw Error(`Language code should be either provided through input arguments or by "setCurrentLocale" method`)}async getJsonFiles(){let e=await this.getContent(),t={};return Object.entries(e).forEach(([e,n])=>t[e]=n.filter(r)),t}};o.BASE_URL=`https://distributions.crowdin.net`;var s=o,c=document.documentElement.lang,l=e({legacy:!1,locale:c,fallbackLocale:c||`en_US`,messages:await(async(e,t)=>new s(e,t).getStrings())(`20083b4d63c730236852e19bobt`,{disableManifestCache:!1,disableStringsCache:!1,disableJsonDeepMerge:!0})});function u(e,n=`second`){let r=e.value;return r?t(r,new Date().toISOString(),n):!1}function d(e){return e.props.hasInvalidTime?!0:!!e.value}function f(e){return e.every(e=>e.length<1)}export{l as i,u as n,f as r,d 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.