PageSourceSearch

https://www.praisecharts.com/chunk-ANN4UR74.js

js praisecharts.com collected 2026-10-03 19:37:08 UTC 3,621 bytes, 1 lines download raw bytes

1import{a as u,b as d,c as f}from"./chunk-UC7XB5VU.js";import{k as r}from"./chunk-TX7E3JLP.js";var c=(function(t){return t.missingKey="missingKey",t.invalidData="invalidData",t.osError="osError",t.unknownError="unknownError",t})(c||{}),h=(function(t){return t[t.whenUnlocked=0]="whenUnlocked",t[t.whenUnlockedThisDeviceOnly=1]="whenUnlockedThisDeviceOnly",t[t.afterFirstUnlock=2]="afterFirstUnlock",t[t.afterFirstUnlockThisDeviceOnly=3]="afterFirstUnlockThisDeviceOnly",t[t.whenPasscodeSetThisDeviceOnly=4]="whenPasscodeSetThisDeviceOnly",t})(h||{}),o=class extends Error{constructor(e,n){super(e),this.name="StorageError",this.code=n}};function w(t){return t!==void 0&&Object.keys(c).includes(t)}var l=class t extends f{constructor(){super(...arguments),this.prefix="capacitor-storage_",this.sync=!1,this.access=h.whenUnlocked}setSynchronize(e){return r(this,null,function*(){if(this.sync=e,d.getPlatform()==="ios")return this.setSynchronizeKeychain({sync:e})})}getSynchronize(){return r(this,null,function*(){return this.sync})}setDefaultKeychainAccess(e){return r(this,null,function*(){this.access=e})}tryOperation(e){return r(this,null,function*(){try{return yield e()}catch(n){throw n instanceof u&&w(n.code)?new o(n.message,n.code):n}})}get(e,n=!0,i){return r(this,null,function*(){if(e){let{data:s}=yield this.tryOperation(()=>r(this,null,function*(){return this.internalGetItem({prefixedKey:this.prefixedKey(e),sync:i??this.sync})}));if(s===null)return null;if(n){let a=v(s);if(a)return a}try{return JSON.parse(s)}catch(a){throw new o("Invalid data",c.invalidData)}}return t.missingKey()})}getItem(e){return r(this,null,function*(){if(e){let{data:n}=yield this.tryOperation(()=>r(this,null,function*(){return this.internalGetItem({prefixedKey:this.prefixedKey(e),sync:this.sync})}));return n}return null})}set(e,n,i=!0,s,a){return r(this,null,function*(){if(e){let y=n;return i&&n instanceof Date&&(y=n.toISOString()),this.tryOperation(()=>r(this,null,function*(){return this.internalSetItem({prefixedKey:this.prefixedKey(e),data:JSON.stringify(y),sync:s??this.sync,access:a??this.access})}))}return t.missingKey()})}setItem(e,n){return r(this,null,function*(){return e?this.tryOperation(()=>r(this,null,function*(){return this.internalSetItem({prefixedKey:this.prefixedKey(e),data:n,sync:this.sync,access:this.access})})):t.missingKey()})}remove(e,n){return r(this,null,function*(){if(e){let{success:i}=yield this.tryOperation(()=>r(this,null,function*(){return this.internalRemoveItem({prefixedKey:this.prefixedKey(e),sync:n??this.sync})}));return i}return t.missingKey()})}removeItem(e){return r(this,null,function*(){if(e){yield this.tryOperation(()=>r(this,null,function*(){return this.internalRemoveItem({prefixedKey:this.prefixedKey(e),sync:this.sync})}));return}t.missingKey()})}keys(e){return r(this,null,function*(){let{keys:n}=yield this.tryOperation(()=>r(this,null,function*(){return this.getPrefixedKeys({prefix:this.prefix,sync:e??this.sync})})),i=this.prefix.length;return n.map(s=>s.slice(i))})}getKeyPrefix(){return r(this,null,function*(){return this.prefix})}setKeyPrefix(e){return r(this,null,function*(){this.prefix=e})}prefixedKey(e){return this.prefix+e}static missingKey(){throw new o("No key provided",c.missingKey)}},g=/^"(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{3})Z"$/u;function v(t){let e=g.exec(t);if(e){let n=Number.parseInt(e[1],10),i=Number.parseInt(e[2],10)-1,s=Number.parseInt(e[3],10),a=Number.parseInt(e[4],10),y=Number.parseInt(e[5],10),p=Number.parseInt(e[6],10),m=Number.parseInt(e[7],10),x=Date.UTC(n,i,s,a,y,p,m);return new Date(x)}return null}export{l as a};

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.