PageSourceSearch

https://cdn.pacdora.com/_pacui/assets/TinyToolStorage-C38NkD7VcZ.js

js pacdora.com collected 2026-09-25 19:13:13 UTC 1,792 bytes, 1 lines download raw bytes

1import{Ni as e}from"./src-DdRYxgPx8x.js";var t=class{static initTabId(){let[e]=performance.getEntriesByType(`navigation`);(e==null?void 0:e.type)===`reload`?this.tabId=sessionStorage.getItem(`tabId`)||``:(this.tabId=Math.random().toString(36).substring(2,10),sessionStorage.setItem(`tabId`,this.tabId))}static get prefix(){return this.tabId||this.initTabId(),`${this.basePrefix}${this.tabId}_`}static setPrefix(e){this.basePrefix=e+`_tiny_tool_cache_`}static setBasePrefix(e){this.basePrefix=e}static setType(e){this.storageType=e}static get storage(){return this.storageType===`session`?sessionStorage:localStorage}static setInstanceId(e){e&&(this.instanceId=e.toString())}static set(e,t){try{let n=`${this.prefix}${this.instanceId?`${this.instanceId}_`:``}${e}`;this.storage.setItem(n,JSON.stringify({value:t,timestamp:Date.now()}))}catch(e){console.error(`存储数据失败:`,e)}}static get(e){try{let t=`${this.prefix}${this.instanceId?`${this.instanceId}_`:``}${e}`,n=this.storage.getItem(t);return n?JSON.parse(n).value:null}catch(e){return console.error(`获取数据失败:`,e),null}}static remove(e){let t=`${this.prefix}${this.instanceId?`${this.instanceId}_`:``}${e}`;this.storage.removeItem(t)}static clear(){Object.keys(this.storage).forEach(e=>{e.startsWith(`${this.prefix}${this.instanceId?`${this.instanceId}_`:``}`)&&this.storage.removeItem(e)})}static watch(e,t){this.storageType===`local`&&window.addEventListener(`storage`,n=>{n.key===this.prefix+e&&t(n.newValue?JSON.parse(n.newValue).value:null)})}static getUsedSpace(){let e=0;for(let t in this.storage)Object.prototype.hasOwnProperty.call(this.storage,t)&&(e+=this.storage[t].length*2);return e}};e(t,`storageType`,`session`),e(t,`basePrefix`,`mockup_tiny_tool_cache_`),e(t,`instanceId`,``),e(t,`tabId`,``);export{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.