1import{a as j}from"https://st-p.rmcdn1.net/c099b495/dist/c/c-UAFWIH2L.js";import{k as I,n as h,p as W}from"https://st-p.rmcdn1.net/c099b495/dist/c/c-BPJYJWK6.js";import{C as P,D as r,F as B}from"https://st-p.rmcdn1.net/c099b495/dist/c/c-TT44SLAL.js";import{a as D}from"https://st-p.rmcdn1.net/c099b495/dist/c/c-QLQ7X472.js";import{a as w,c as T,d as M}from"https://st-p.rmcdn1.net/c099b495/dist/c/c-VIR7PMAX.js";var U={};T(U,{BackboneCollectionContextProvider:()=>O,BackboneContext:()=>R,BackboneContextProvider:()=>S,CreateContextProvider:()=>E,renderReact:()=>N});function S({domElement:d,model:e,children:C,context:p,onDestroy:c}){let f={modelSet:(i,s)=>e.set(i,s),modelUnset:(i,s)=>e.unset(i,s),modelSave:(i,s)=>e.save(i,s),destroy:()=>{d&&c&&c()}},[l,b]=(0,u.useState)({model:e.attributes}),m=i=>{b({...l,model:i.attributes})};return(0,u.useEffect)(()=>(e.on("change",m),()=>{e.off("change",m)}),[e]),r(p.Provider,{value:{...l,...f,rawModel:e},children:C})}function O({domElement:d,collection:e,children:C,context:p,onDestroy:c}){let f={elementSet:(t,a,o)=>{let n=e.get(t);if(!n)throw new Error("Element not found");return n.set(a,o)},elementUnset:(t,a,o)=>{let n=e.get(t);if(!n)throw new Error("Element not found");return n.unset(a,o)},elementSave:(t,a,o)=>{let n=e.get(t);if(!n)throw new Error("Element not found");return n.save(a,o)},destroy:()=>{d&&c&&c()}},[l,b]=(0,u.useState)({collection:e.map(t=>t.attributes)}),m=t=>{let a=t.get("_id");b(o=>{let n=o.collection.findIndex(v=>v._id===a);if(n===-1)return{collection:o.collection};let x=o.collection.splice(0);return x[n]=t.attributes,{collection:x}})},i=t=>{b(a=>{let o=a.collection.splice(0);return o.push(t.attributes),{collection:o}})},s=t=>{let a=t.get("_id");b(o=>{let n=o.collection.findIndex(v=>v._id===a);if(n===-1)return{collection:o.collection};let x=o.collection.splice(0);return x.splice(n,1),{collection:x}})};return(0,u.useEffect)(()=>(e.on("change",m),e.on("add",i),e.on("remove",s),()=>{e.off("change",m),e.off("add",i),e.on("off",s)}),[e]),r(p.Provider,{value:{...l,...f},children:C})}function E({model:d,collection:e,domElement:C,context:p,children:c,onDestroy:f}){return d?r(S,{model:d,domElement:C,context:p,onDestroy:f,children:c}):e?r(O,{collection:e,domElement:C,context:p,children:c}):r(P,{children:c})}function y({onRenderComplete:d,children:e}){return(0,u.useEffect)(()=>{d?.()},[]),r(P,{children:e})}var u,g,k,R,N,_=w(()=>{W();u=M(D()),g=M(I()),k=M(j());B();R=(0,u.createContext)({});N=({component:d,domElement:e,props:C,model:p,onDestroy:c,onRenderComplete:f,useReact18:l})=>{let b=p?r(y,{onRenderComplete:l?f:void 0,children:r(h,{withGlobalStyles:!1,children:r(E,{model:p,domElement:e,context:R,onDestroy:c,children:r(d,{...C})})})}):r(y,{onRenderComplete:l?f:void 0,children:r(d,{})}),m=l?k.default.createRoot(e):null;function i(){l&&m.render(b)}function s(){l&&(m.unmount(),m=k.default.createRoot(e))}return l||g.default.render(b,e,f),{render:i,unmount:s}}});export{R as a,S as b,O as c,E as d,N as e,U as f,_ as g};
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.