1var Ce=Object.create;var Z=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var Ne=Object.getOwnPropertyNames;var Ee=Object.getPrototypeOf,_e=Object.prototype.hasOwnProperty;var ee=(s,t)=>()=>(t||s((t={exports:{}}).exports,t),t.exports);var Fe=(s,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ne(t))!_e.call(s,o)&&o!==i&&Z(s,o,{get:()=>t[o],enumerable:!(n=ve(t,o))||n.enumerable});return s};var te=(s,t,i)=>(i=s!=null?Ce(Ee(s)):{},Fe(t||!s||!s.__esModule?Z(i,"default",{value:s,enumerable:!0}):i,s));var ue=ee((Zt,se)=>{"use strict";var xe=!1,ae=function(){};xe&&(ie=function(t,i){var n=arguments.length;i=new Array(n>1?n-1:0);for(var o=1;o<n;o++)i[o-1]=arguments[o];var a=0,e="Warning: "+t.replace(/%s/g,function(){return i[a++]});typeof console<"u"&&console.error(e);try{throw new Error(e)}catch{}},ae=function(s,t,i){var n=arguments.length;i=new Array(n>2?n-2:0);for(var o=2;o<n;o++)i[o-2]=arguments[o];if(t===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");s||ie.apply(null,[t].concat(i))});var ie;se.exports=ae});var le=ee((er,ce)=>{"use strict";ce.exports=function(s,t){t||(t={}),typeof t=="function"&&(t={cmp:t});var i=typeof t.cycles=="boolean"?t.cycles:!1,n=t.cmp&&function(a){return function(e){return function(l,u){var S={key:l,value:e[l]},y={key:u,value:e[u]};return a(S,y)}}}(t.cmp),o=[];return function a(e){if(e&&e.toJSON&&typeof e.toJSON=="function"&&(e=e.toJSON()),e!==void 0){if(typeof e=="number")return isFinite(e)?""+e:"null";if(typeof e!="object")return JSON.stringify(e);var l,u;if(Array.isArray(e)){for(u="[",l=0;l<e.length;l++)l&&(u+=","),u+=a(e[l])||"null";return u+"]"}if(e===null)return"null";if(o.indexOf(e)!==-1){if(i)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var S=o.push(e)-1,y=Object.keys(e).sort(n&&n(e));for(u="",l=0;l<y.length;l++){var R=y[l],w=a(e[R]);w&&(u&&(u+=","),u+=JSON.stringify(R)+":"+w)}return o.splice(S,1),"{"+u+"}"}}(s)}});import{Children as Le,Component as Ae,Fragment as Me,Profiler as Ue,PureComponent as je,StrictMode as Ve,Suspense as Je,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED as qe,cloneElement as Be,createContext as ze,createElement as $e,createFactory as He,createRef as Ke,forwardRef as We,isValidElement as Ye,lazy as Ge,memo as Qe,startTransition as Xe,unstable_act as Ze,useCallback as et,useContext as tt,useDebugValue as rt,useDeferredValue as nt,useEffect as I,useId as ot,useImperativeHandle as it,useInsertionEffect as at,useLayoutEffect as st,useMemo as j,useReducer as ut,useRef as p,useState as V,useSyncExternalStore as ct,useTransition as lt,version as ft}from"../../../frontend-js-react-web/__liferay__/exports/react.js";import ke from"../../../frontend-js-react-web/__liferay__/exports/react.js";var x=ke;import{Provider as ht,__UNSTABLE_DataClient as re,useProvider as ne}from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$provider.js";import{FocusScope as pt,Keys as St,LinkOrButton as Rt,MouseSafeArea as bt,Overlay as Pt,PanelResizer as wt,ClayPortal as Ct,delegate as vt,doAlign as Nt,getEllipsisItems as Et,getLocatorValue as _t,observeRect as Ft,isMac as kt,isIPhone as xt,isIPad as It,isIOS as Tt,isAppleDevice as Dt,setElementFullHeight as Ot,stack as Lt,sub as At,throttle as Mt,useControlledState as Ut,useDebounce as oe,useFocusManagement as jt,FOCUSABLE_ELEMENTS as Vt,useHover as Jt,useId as qt,useInteractionFocus as Bt,useFocusVisible as zt,useIsFirstRender as $t,useIsMobileDevice as Ht,useMousePosition as Kt,useNavigation as Wt,isTypeahead as Yt,getFocusableList as Gt,useOverlayPosition as Qt,usePrevious as Xt}from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$shared.js";var E=te(ue());var J=te(le());function q(s,t,i){return new Promise((n,o)=>{let a=setTimeout(()=>{i?.abort(),o(new Error("timeout"))},s);t.then(e=>{clearTimeout(a),n(e)}).catch(e=>{clearTimeout(a),o(e)})})}function fe(s,t,i){let n=s;if(t&&(n+=(0,J.default)(t)),typeof i=="object"){let o={...i},a=Object.keys(i);for(let e=0;e<a.length;e++){let l=a[e],u=i[l];u instanceof URLSearchParams&&(o[l]=u.toString())}n+=(0,J.default)(o)}return n}var B=(n=>(n.CacheFirst="cache-first",n.NoCache="no-cache",n.CacheAndNetwork="cache-and-network",n))(B||{}),z=(a=>(a[a.Error=5]="Error",a[a.Loading=1]="Loading",a[a.Polling=3]="Polling",a[a.Refetch=2]="Refetch",a[a.Unused=4]="Unused",a))(z||{}),de=0;function T({fetch:s,fetchDelay:t=300,fetchOptions:i,fetchPolicy:n="no-cache",fetchRetry:o={},fetchTimeout:a=6e3,link:e,onNetworkStatusChange:l=()=>{},pollInterval:u=0,storageMaxSize:S,suspense:y=!1,variables:R=null}){n==="no-cache"&&y&&(n="cache-and-network");let w=p(null),D=p(null),C=p(null),H=p(),_=p(u),he=j(()=>(de++,String(de)),[]),O=p(!0),L=p(!1),F=n==="cache-first"||n==="cache-and-network",m=j(()=>typeof e=="string"?fe(e,R,i):he,[e,R,i]),{client:K}=ne(),h=p(K??new re({storageMaxSize:S}));(0,E.default)(!(y&&typeof K>"u"),"DataProvider: for the integration with Suspense to work correctly, the ClayProvider must be declared at the root of the project.");let[W,ge]=V(null),[b,ye]=V(h.current.read(m)??null),pe=oe(R,t),v=r=>{l(r),H.current=r},A=()=>{D.current&&clearTimeout(D.current)},Se=r=>{let{delay:c={}}=o,{initial:f=300,jitter:g=!0}=c,U=(g?f:f/2)*2**r;return g&&(U=Math.random()*U),U},Y=(r,c)=>{let{attempts:f=5}=o;if(A(),f>0&&c<f){let g=Se(c);console.warn(`DataProvider: Trying ${c+1} of ${f} will happen in ${g}ms`),D.current=setTimeout(()=>{N(c+1)},g)}else y?h.current.update(m,r):v(5),(0,E.default)(!1,`DataProvider: Error making the requisition ${r}`)},G=()=>w.current&&clearTimeout(w.current),Q=()=>{G(),w.current=setTimeout(()=>{M(3)},_.current)},k=r=>{A();let c=r,f=h.current.getCursor(m);return H.current===1&&(f||f===null)&&b!==null&&b!==void 0&&(Array.isArray(r)&&Array.isArray(b)?c=[...b,...r]:typeof r=="object"&&typeof b=="object"&&(c={...b,...r})),ye(c),v(4),F&&h.current.update(m,c),_.current>0&&Q(),r},X=(r,c)=>
1(c&&Object.keys(c).forEach(g=>r.searchParams.set(g,c[g])),r),Re=(r,c)=>{let f=new URL(r);return h.current.getCursor(m)===null&&(0,E.default)(f.searchParams.toString()==="",`DataProvider: We recommend that instead of passing parameters over the link, use the variables API. 2 More details: https://clayui.com/docs/components/data-provider.html`),c&&X(f,c),f.toString()},N=(r=0,c)=>{switch((0,E.default)(typeof e=="string","DataProvider: The behavior of the `link` accepting a function has been deprecated in favor of the `fetcher` API. \n More details: https://clayui.com/docs/components/data-provider.html#data-fetching"),typeof e){case"function":return q(a,e(X(new URL("http://clay.data.provider"),R).searchParams.toString())).then(k).catch(f=>Y(f,r));case"string":{let f=s??fetch,g;return C.current&&C.current.abort(),C.current=new AbortController,q(a,f(Re(h.current.getCursor(m)??e,R),{...i,signal:C.current.signal},c||W||void 0),C.current).then(d=>d instanceof Response&&d.ok&&!d.bodyUsed?d.json():!(d instanceof Response)&&d.items&&(d.cursor||d.cursor===null)?(g=d.cursor,d.items):d).then(k).then(d=>(g!==void 0&&h.current.setCursor(m,g),d)).catch(d=>Y(d,r))}default:return null}},M=r=>{let c=h.current.read(m);return F&&c&&(k(c),n==="cache-first")?!1:(v(r),N())},be=()=>h.current.getCursor(m)?(v(1),N()):null,Pe=()=>{F||delete h.current.cursors[m],v(2),N()},we=r=>{ge(r),N(0,r)};I(()=>{_.current=u,u>0&&Q()},[u]),I(()=>{O.current||(F||delete h.current.cursors[m],M(2))},[pe]),I(()=>(O.current=!1,()=>{_.current=0,G(),A()}),[]);let P=h.current.isFetching(m);if(!P&&O.current){let r=M(1);r&&(L.current=!0,P=r,h.current.update(m,r))}if(P&&L.current===!1&&!y&&(L.current=!0,P instanceof Promise&&P.then(k)),y&&b===null&&(P instanceof Promise||P instanceof Error))throw P;return{loadMore:be,refetch:Pe,resource:b,sort:W,sortChange:we}}function $({children:s,notifyOnNetworkStatusChange:t=!1,...i}){let[n,o]=x.useState(()=>({error:!1,loading:!1})),a=u=>{let S={error:u===5,loading:u<4};t&&(S.networkStatus=u),o(S)},{refetch:e,resource:l}=T({...i,onNetworkStatusChange:a});return x.createElement(x.Fragment,null,s({...n,data:l,refetch:e}))}var me=$;var yr=me;export{$ as DataProvider,B as FetchPolicy,z as NetworkStatus,yr as default,T as useResource}; 3//# sourceMappingURL=@clayui$data-provider.(OBK5WOKQ).js.map
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.