PageSourceSearch

https://filbet-frontend-clientside-beta-uat.pages.dev/assets/core_util-C_KVSPe3.js

js filbet-frontend-clientside-beta-uat.pages.dev collected 2026-10-03 05:39:17 UTC 8,830 bytes, 1 lines download raw bytes

1import{g as T,a as m,o as k,u as x,y as f,d,A as h,h as J,T as y,q as I}from"./vendor_react-BY4ncGTv.js";import{d as w,c as L,e as E,f as W}from"./vendors-ByGAWIUN.js";import{b as z}from"./core-ClD1zvFO.js";import{l as Q}from"./vendor_lodash-DtPS97Tu.js";function Y(){return!1}function U(){return!1}function $(){return!0}const b={get isDevMode(){return Y()},get isViteDevMode(){return U()},get isMockWelfare(){return $()},get isExportRoiBest(){return!1},philippineFormat:"MMM DD, YYYY hh:mm A",philippineFormatDateOnly:"MMM DD, YYYY",getPublicSourcePath(t){return t.startsWith("/")&&(t=t.slice(1)),"".concat("/","/").concat(t)},get apiAddressUnderDev(){return""}},we=Object.freeze(Object.defineProperty({__proto__:null,commonConstant:b},Symbol.toStringTag,{value:"Module"}));T();function q(t,e){const n=m(!1);let r=e;const o=m(c=>(c(n),r),async(c,a)=>{r=await t(c),a(n,u=>!u)});return e||(o.onMount=c=>{c()}),o}function B(t,e){const n=m(!1),r=m("loading"),o=m(void 0);let c=e;const a=m(u=>(u(n),{data:c,status:u(r)}),async(u,s)=>{s(o,void 0),s(r,"loading");try{c=await t(u),s(r,"success"),s(n,i=>!i)}catch(i){throw s(r,"error"),s(o,i),i}});return e||(a.onMount=u=>{u()}),a}const N=t=>new Promise(e=>setTimeout(e,t)),F=t=>{const n="atom:".concat("3793cc",":").concat(t);return b.isDevMode?n:btoa(n)};function C(t,e){if(e!=null&&e._inactive)return JSON.stringify(t);try{return btoa(encodeURIComponent(JSON.stringify(t)))}catch(n){return console.error(n),JSON.stringify(t)}}function R(t,e){if(e!=null&&e._inactive)return JSON.parse(t);try{return JSON.parse(decodeURIComponent(atob(t)))}catch(n){return console.error(n),JSON.parse(t)}}function G(t=localStorage,e){const{isEncoded:n=!0}=e!=null?e:{},r=t;return{getItem(c,a){const u=r.getItem(c);if(u)try{return n?R(u,{_inactive:b.isDevMode}):JSON.parse(u)}catch(s){return console.error(s),a}return a},setItem(c,a){if(a==null)return this.removeItem(c);const u=n?C(a,{_inactive:b.isDevMode}):JSON.stringify(a);r.setItem(c,u)},removeItem(c){r.removeItem(c)}}}const K=t=>{const e=m(!1),n=Q.debounce(t,1e3,{leading:!0,trailing:!1});let r;const o=k(async()=>r!=null?r:await n()),c=m(a=>(a(e),r!=null?r:a(o)),async(a,u)=>{r=await n(),u(e,s=>!s)});return c.onMount=a=>{a()},c};function V(t){const[e,n]=x(t);return f(()=>{n()},[]),[e,n]}function H(t){try{const e=JSON.stringify(t);return btoa(e)}catch(e){return console.error(e),null}}function X(t){if(!t)return null;try{const e=atob(t);return JSON.parse(e)}catch(e){return console.error(e),null}}const ve=Object.freeze(Object.defineProperty({__proto__:null,atomWithRefreshWithoutSuspense:q,atomWithRefreshWithoutSuspenseLoadable:B,atomWithReload:K,createSyncStorage:G,decryptData:R,encryptData:C,generateAtomStorageKey:F,packObject:H,unpackObject:X,useAtomWithReload:V,wait:N},Symbol.toStringTag,{value:"Module"}));function Z(t){const[e,n]=d();return f(()=>{let r=!0;return t().then(o=>{r&&n(o)}),()=>{r=!1}},[t]),e}function p(t){const[e,n]=d(t);return f(()=>{n(t)},[t]),[e,n]}function ee(t,e){const[n,r]=d(()=>{if(typeof window>"u")return e;const o=window.localStorage.getItem(t);return o?JSON.parse(o):e});return f(()=>{window.localStorage.setItem(t,JSON.stringify(n))},[t,n]),[n,r]}function te(t,e){const[n,r]=d(t);return f(()=>{e(n)},[e,n]),[t,r]}function re(t,e){const[n,r]=d({loading:!1,params:e==null?void 0:e.initialParams}),o=h(!1),c=async(...a)=>{var s;if(o.current)return;o.current=!0,r(i=>({...i,params:a,loading:!0}));const u=a?await t(...a):await t();return o.current=!1,r({params:a,loading:!1,result:u}),(s=e==null?void 0:e.onRan)==null||s.call(e,u),u};return f(()=>{e!=null&&e.manual||c(e==null?void 0:e.initialParams)},[]),{...n,run:c}}function A(t){return t?Object.fromEntries(Object.entries(t.valueOf())):{}}function ne(t,e=!1){const[n,r]=J(),o=Object.fromEntries(n.entries()),c=y(()=>t&&A(t),[t]),a=I((...u)=>{const s=u;if(typeof u[0]=="function"){const i=u[0],l=_=>{const g=i(_);return e?{...c,...g}:{...c,...c,...g}};s[0]=l}if(typeof u[0]=="object"){const i=A(u[0]);e&&(s[0]={...c,...i}),s[0]={...o,...c,...i}}r(...s)},[r,t,o,e]);return[n,a]}const Me=Object.freeze(Object.defineProperty({__proto__:null,useAppendableSearchParams:ne,useAsyncMemo:Z,useLocalStorage:ee,useQueryApi:re,useStateConnect:te,useStateEffe
1ctedBy:p},Symbol.toStringTag,{value:"Module"}));function ae(t){const e=h(Date.now()),[n,r]=d(Date.now()),o=h(!1),c=y(()=>z(n).diff(e.current,"second"),[n]),a=y(()=>t.secondsEnd-c,[c]);f(()=>{const s=setInterval(()=>{r(Date.now())},200);return()=>{clearInterval(s)}},[]),f(()=>{var s;a<0&&!o.current&&(o.current=!0,(s=t.callback)==null||s.call(t))},[a,t.callback]);const u=y(()=>a<0?0:a,[a]);return{secondsCountDown:a,secondsCountDownDisplay:u}}const se=(...t)=>{b.isDevMode&&console.log("%c[DEBUG]","color: #f00",...t)};function S(t){return String(t).padStart(2,"0")}function oe(t){const[e,n]=d(w(t.expiredDate));f(()=>{const s=setInterval(()=>{n(w(t.expiredDate))},200);return()=>clearInterval(s)},[]);const r=e.diff(w(),"second"),o=Math.floor(r/(24*60*60)),c=Math.floor(r%(24*60*60)/(60*60)),a=Math.floor(r%(60*60)/60),u=r%60;return{days:S(o),hours:S(c),minutes:S(a),seconds:S(u)}}function ce(t,e){const n=L(e,t),r=Math.floor(Math.random()*n);return E(t,r)}function ue(t,e){return Q.random(t,e)}async function ie(t,e,n){const{increment:r,duration:o=3e3}=n;let c;function a(u){c||(c=u);const s=u-c,i=Math.min(s/o,1),l=1-Math.pow(1-i,3),_=+(t+r*l);e(_),i<1&&requestAnimationFrame(a)}return requestAnimationFrame(a),N(o+300)}function le(){return navigator.userAgent.includes("Macintosh")?24:25}function fe(t){return W.decode(t)}const De=Object.freeze(Object.defineProperty({__proto__:null,animateNumber:ie,cborDecode:fe,debugLog:se,getDeviceCode:le,randomDate:ce,randomNumber:ue,useCountDownSeconds:ae,useCountDownTimer:oe},Symbol.toStringTag,{value:"Module"}));class de{constructor(){this.readers=0,this.writer=!1,this.readQueue=[],this.writeQueue=[]}async readLock(){return new Promise(e=>{this.writer||this.writeQueue.length>0?this.readQueue.push(e):(this.readers++,e())})}async readUnlock(){this.readers--,this.processQueues()}async writeLock(){return new Promise(e=>{this.writer||this.readers>0?this.writeQueue.push(e):(this.writer=!0,e())})}async writeUnlock(){this.writer=!1,this.processQueues()}processQueues(){if(!this.writer&&this.writeQueue.length>0){this.writer=!0;const e=this.writeQueue.shift();e&&e()}else if(!this.writer&&this.readers===0&&this.readQueue.length>0)for(;this.readQueue.length>0;){const e=this.readQueue.shift();e&&e(),this.readers++}}}const Oe=Object.freeze(Object.defineProperty({__proto__:null,Locker:de},Symbol.toStringTag,{value:"Module"})),P={hasMore:!1,loading:!1};function me(t,e){const[n,r]=d(!1),o=h(P),c=y(()=>({loadMore:async()=>{var v,M,D,O,j;let s=o.current;if(s.args===void 0){console.warn("never load");return}if(s.loading){console.warn("loading");return}if(!s.hasMore){console.warn("no more");return}const i=(v=s.data)==null?void 0:v.nextCursor;if(!i){console.warn("no next cursor");return}o.current.loading=!0,r(!0);const l=[...s.args];l[0]={...l[0],startCursor:i};const _=(D=(M=s.data)==null?void 0:M.list)!=null?D:[],g=await t(...l);s={...s,loading:!1},g.success&&(s.hasMore=g.data.nextCursor!==void 0,s.data={...g.data,list:[..._,...(j=(O=g.data)==null?void 0:O.list)!=null?j:[]]},s.args=l),o.current=s,r(!1)},reload:async(...s)=>{if(o.current.loading)return;let i={...P,loading:!0,args:s};o.current=i,r(!0);const l=await t(...s);i={...i,loading:!1},l.success&&(i.hasMore=l.data.nextCursor!==void 0,i.data=l.data),o.current=i,r(!1)}}),[t]);f(()=>{e&&c.reload(...e.args)},e!=null&&e.depends?e==null?void 0:e.depends:[]);const{data:a,hasMore:u}=o.current;return{data:a,hasMore:u,loading:n,...c}}const je=Object.freeze(Object.defineProperty({__proto__:null,useCursorQueryApi:me},Symbol.toStringTag,{value:"Module"}));function ge(t,e=[]){const[n,r]=d(!1),o=h(!1);return[I(async(...a)=>{if(o.current)return;o.current=!0,r(!0);const u=await t(...a);return o.current=!1,r(!1),u},e),n]}const Ae=Object.freeze(Object.defineProperty({__proto__:null,default:ge},Symbol.toStringTag,{value:"Module"}));function he(t,e){const[n,r]=d({loading:!1,params:e==null?void 0:e.initialParams}),o=h(!1),c=async(...a)=>{var s;if(o.current)return;o.current=!0,r(i=>({...i,params:a,loading:!0}));const u=a?await t(...a):await t();return o.current=!1,r({params:a,loading:!1,result:u}),(s=e==null?void 0:e.onRan)==null||s.call(e,u),u};return f(()=>{var a;e!=null&&e.manual||c(...(a=e==null?void 0:e.initialParams)!=null?a:[])},[]),{...n,run:c}}const Pe=Object.freeze(Object.defineProperty({__proto__:null,useQueryApi:he},Symbol.toStringTag,{value:"Module"}));
1export{oe as A,ne as B,we as _,b as a,q as b,fe as c,Z as d,ie as e,F as f,le as g,G as h,K as i,V as j,R as k,C as l,Me as m,De as n,ve as o,H as p,Oe as q,je as r,Ae as s,Pe as t,ge as u,ce as v,ue as w,N as x,X as y,ae as z};

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.