diff --git a/build/assets/CheckIcon-c0260530.js b/build/assets/CheckIcon-4e74d21d.js similarity index 92% rename from build/assets/CheckIcon-c0260530.js rename to build/assets/CheckIcon-4e74d21d.js index 546b34ddb..fe564c31a 100644 --- a/build/assets/CheckIcon-c0260530.js +++ b/build/assets/CheckIcon-4e74d21d.js @@ -1 +1 @@ -import{j as C}from"./index-a0989d63.js";const t=o=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 7",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M3.08467 5.34482L8.02842 0.401074C8.14508 0.284408 8.28363 0.226074 8.44404 0.226074C8.60446 0.226074 8.743 0.284408 8.85967 0.401074C8.97633 0.517741 9.03467 0.656283 9.03467 0.816699C9.03467 0.977116 8.97633 1.11566 8.85967 1.23232L3.493 6.59899C3.37633 6.71566 3.24022 6.77399 3.08467 6.77399C2.92911 6.77399 2.793 6.71566 2.67633 6.59899L0.168 4.09066C0.0513333 3.97399 -0.00456944 3.83545 0.000291667 3.67503C0.00515278 3.51462 0.0659167 3.37607 0.182583 3.25941C0.29925 3.14274 0.437792 3.08441 0.598208 3.08441C0.758625 3.08441 0.897167 3.14274 1.01383 3.25941L3.08467 5.34482Z",fill:"currentColor"})});export{t as C}; +import{j as C}from"./index-022521cf.js";const t=o=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 7",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M3.08467 5.34482L8.02842 0.401074C8.14508 0.284408 8.28363 0.226074 8.44404 0.226074C8.60446 0.226074 8.743 0.284408 8.85967 0.401074C8.97633 0.517741 9.03467 0.656283 9.03467 0.816699C9.03467 0.977116 8.97633 1.11566 8.85967 1.23232L3.493 6.59899C3.37633 6.71566 3.24022 6.77399 3.08467 6.77399C2.92911 6.77399 2.793 6.71566 2.67633 6.59899L0.168 4.09066C0.0513333 3.97399 -0.00456944 3.83545 0.000291667 3.67503C0.00515278 3.51462 0.0659167 3.37607 0.182583 3.25941C0.29925 3.14274 0.437792 3.08441 0.598208 3.08441C0.758625 3.08441 0.897167 3.14274 1.01383 3.25941L3.08467 5.34482Z",fill:"currentColor"})});export{t as C}; diff --git a/build/assets/ClipLoader-f345d5d1.js b/build/assets/ClipLoader-d8628c6c.js similarity index 97% rename from build/assets/ClipLoader-f345d5d1.js rename to build/assets/ClipLoader-d8628c6c.js index d28e8b729..4a22619f7 100644 --- a/build/assets/ClipLoader-f345d5d1.js +++ b/build/assets/ClipLoader-d8628c6c.js @@ -1,4 +1,4 @@ -import{r as m}from"./index-a0989d63.js";var g={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function h(e){if(typeof e=="number")return{value:e,unit:"px"};var t,a=(e.match(/^[0-9.]*/)||"").toString();a.includes(".")?t=parseFloat(a):t=parseInt(a,10);var r=(e.match(/[^0-9]*$/)||"").toString();return g[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function d(e){var t=h(e);return"".concat(t.value).concat(t.unit)}var b=function(e,t,a){var r="react-spinners-".concat(e,"-").concat(a);if(typeof window>"u"||!window.document)return r;var n=document.createElement("style");document.head.appendChild(n);var o=n.sheet,l=` +import{r as m}from"./index-022521cf.js";var g={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function h(e){if(typeof e=="number")return{value:e,unit:"px"};var t,a=(e.match(/^[0-9.]*/)||"").toString();a.includes(".")?t=parseFloat(a):t=parseInt(a,10);var r=(e.match(/[^0-9]*$/)||"").toString();return g[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function d(e){var t=h(e);return"".concat(t.value).concat(t.unit)}var b=function(e,t,a){var r="react-spinners-".concat(e,"-").concat(a);if(typeof window>"u"||!window.document)return r;var n=document.createElement("style");document.head.appendChild(n);var o=n.sheet,l=` @keyframes `.concat(r,` { `).concat(t,` } diff --git a/build/assets/DailyMotion-7ecfbb97.js b/build/assets/DailyMotion-e3c418c3.js similarity index 95% rename from build/assets/DailyMotion-7ecfbb97.js rename to build/assets/DailyMotion-e3c418c3.js index a64369bb6..dc38937ef 100644 --- a/build/assets/DailyMotion-7ecfbb97.js +++ b/build/assets/DailyMotion-e3c418c3.js @@ -1 +1 @@ -import{n as P,r as v}from"./index-a0989d63.js";import{u as D,p as O}from"./index-159c08bd.js";function b(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,s=Object.defineProperty,w=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,j=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,E=(t,e,r)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,A=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of S(e))!T.call(t,a)&&a!==r&&s(t,a,{get:()=>e[a],enumerable:!(o=w(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?M(j(t)):{},h(e||!t||!t.__esModule?s(r,"default",{value:t,enumerable:!0}):r,t)),C=t=>h(s({},"__esModule",{value:!0}),t),n=(t,e,r)=>(E(t,typeof e!="symbol"?e+"":e,r),r),d={};A(d,{default:()=>p});var _=C(d),c=L(v),l=D,f=O;const x="https://api.dmcdn.net/all.js",N="DM",K="dmAsyncInit";class p extends c.Component{constructor(){super(...arguments),n(this,"callPlayer",l.callPlayer),n(this,"onDurationChange",()=>{const e=this.getDuration();this.props.onDuration(e)}),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)}),n(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{controls:r,config:o,onError:a,playing:i}=this.props,[,y]=e.match(f.MATCH_URL_DAILYMOTION);if(this.player){this.player.load(y,{start:(0,l.parseStartTime)(e),autoplay:i});return}(0,l.getSDK)(x,N,K,u=>u.player).then(u=>{if(!this.container)return;const m=u.player;this.player=new m(this.container,{width:"100%",height:"100%",video:y,params:{controls:r,autoplay:this.props.playing,mute:this.props.muted,start:(0,l.parseStartTime)(e),origin:window.location.origin,...o.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:g=>a(g)}})},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}n(p,"displayName","DailyMotion");n(p,"canPlay",f.canPlay.dailymotion);n(p,"loopOnEnded",!0);const R=P(_),k=b({__proto__:null,default:R},[_]);export{k as D}; +import{n as P,r as v}from"./index-022521cf.js";import{u as D,p as O}from"./index-4378ec35.js";function b(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,s=Object.defineProperty,w=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,j=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,E=(t,e,r)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,A=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of S(e))!T.call(t,a)&&a!==r&&s(t,a,{get:()=>e[a],enumerable:!(o=w(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?M(j(t)):{},h(e||!t||!t.__esModule?s(r,"default",{value:t,enumerable:!0}):r,t)),C=t=>h(s({},"__esModule",{value:!0}),t),n=(t,e,r)=>(E(t,typeof e!="symbol"?e+"":e,r),r),d={};A(d,{default:()=>p});var _=C(d),c=L(v),l=D,f=O;const x="https://api.dmcdn.net/all.js",N="DM",K="dmAsyncInit";class p extends c.Component{constructor(){super(...arguments),n(this,"callPlayer",l.callPlayer),n(this,"onDurationChange",()=>{const e=this.getDuration();this.props.onDuration(e)}),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)}),n(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{controls:r,config:o,onError:a,playing:i}=this.props,[,y]=e.match(f.MATCH_URL_DAILYMOTION);if(this.player){this.player.load(y,{start:(0,l.parseStartTime)(e),autoplay:i});return}(0,l.getSDK)(x,N,K,u=>u.player).then(u=>{if(!this.container)return;const m=u.player;this.player=new m(this.container,{width:"100%",height:"100%",video:y,params:{controls:r,autoplay:this.props.playing,mute:this.props.muted,start:(0,l.parseStartTime)(e),origin:window.location.origin,...o.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:g=>a(g)}})},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}n(p,"displayName","DailyMotion");n(p,"canPlay",f.canPlay.dailymotion);n(p,"loopOnEnded",!0);const R=P(_),k=b({__proto__:null,default:R},[_]);export{k as D}; diff --git a/build/assets/DeleteIcon-32576b88.js b/build/assets/DeleteIcon-afd5d6e5.js similarity index 96% rename from build/assets/DeleteIcon-32576b88.js rename to build/assets/DeleteIcon-afd5d6e5.js index 83a1ae464..13be7a9c2 100644 --- a/build/assets/DeleteIcon-32576b88.js +++ b/build/assets/DeleteIcon-afd5d6e5.js @@ -1 +1 @@ -import{j as e}from"./index-a0989d63.js";const s=C=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsxs("g",{id:"delete",children:[e.jsx("mask",{id:"mask0_2401_3378",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{children:e.jsx("path",{id:"delete_2",d:"M6.08975 17.0834C5.67415 17.0834 5.31919 16.9362 5.02485 16.6419C4.73051 16.3475 4.58333 15.9926 4.58333 15.577V5.00009H4.375C4.19765 5.00009 4.04915 4.94026 3.9295 4.82061C3.80983 4.70095 3.75 4.55245 3.75 4.37511C3.75 4.19776 3.80983 4.04926 3.9295 3.92961C4.04915 3.80994 4.19765 3.75011 4.375 3.75011H7.49998C7.49998 3.54605 7.57183 3.37218 7.71552 3.22848C7.85922 3.08479 8.03309 3.01294 8.23715 3.01294H11.7628C11.9669 3.01294 12.1407 3.08479 12.2844 3.22848C12.4281 3.37218 12.5 3.54605 12.5 3.75011H15.625C15.8023 3.75011 15.9508 3.80994 16.0705 3.92961C16.1901 4.04926 16.25 4.19776 16.25 4.37511C16.25 4.55245 16.1901 4.70095 16.0705 4.82061C15.9508 4.94026 15.8023 5.00009 15.625 5.00009H15.4166V15.577C15.4166 15.9926 15.2695 16.3475 14.9751 16.6419C14.6808 16.9362 14.3258 17.0834 13.9102 17.0834H6.08975ZM14.1666 5.00009H5.83331V15.577C5.83331 15.6518 5.85735 15.7132 5.90544 15.7613C5.95352 15.8094 6.01496 15.8334 6.08975 15.8334H13.9102C13.985 15.8334 14.0464 15.8094 14.0945 15.7613C14.1426 15.7132 14.1666 15.6518 14.1666 15.577V5.00009ZM7.83654 14.1668H9.08652V6.66675H7.83654V14.1668ZM10.9134 14.1668H12.1634V6.66675H10.9134V14.1668Z",fill:"currentColor"})})]})});export{s as D}; +import{j as e}from"./index-022521cf.js";const s=C=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsxs("g",{id:"delete",children:[e.jsx("mask",{id:"mask0_2401_3378",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:e.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{children:e.jsx("path",{id:"delete_2",d:"M6.08975 17.0834C5.67415 17.0834 5.31919 16.9362 5.02485 16.6419C4.73051 16.3475 4.58333 15.9926 4.58333 15.577V5.00009H4.375C4.19765 5.00009 4.04915 4.94026 3.9295 4.82061C3.80983 4.70095 3.75 4.55245 3.75 4.37511C3.75 4.19776 3.80983 4.04926 3.9295 3.92961C4.04915 3.80994 4.19765 3.75011 4.375 3.75011H7.49998C7.49998 3.54605 7.57183 3.37218 7.71552 3.22848C7.85922 3.08479 8.03309 3.01294 8.23715 3.01294H11.7628C11.9669 3.01294 12.1407 3.08479 12.2844 3.22848C12.4281 3.37218 12.5 3.54605 12.5 3.75011H15.625C15.8023 3.75011 15.9508 3.80994 16.0705 3.92961C16.1901 4.04926 16.25 4.19776 16.25 4.37511C16.25 4.55245 16.1901 4.70095 16.0705 4.82061C15.9508 4.94026 15.8023 5.00009 15.625 5.00009H15.4166V15.577C15.4166 15.9926 15.2695 16.3475 14.9751 16.6419C14.6808 16.9362 14.3258 17.0834 13.9102 17.0834H6.08975ZM14.1666 5.00009H5.83331V15.577C5.83331 15.6518 5.85735 15.7132 5.90544 15.7613C5.95352 15.8094 6.01496 15.8334 6.08975 15.8334H13.9102C13.985 15.8334 14.0464 15.8094 14.0945 15.7613C14.1426 15.7132 14.1666 15.6518 14.1666 15.577V5.00009ZM7.83654 14.1668H9.08652V6.66675H7.83654V14.1668ZM10.9134 14.1668H12.1634V6.66675H10.9134V14.1668Z",fill:"currentColor"})})]})});export{s as D}; diff --git a/build/assets/Facebook-bed98e7b.js b/build/assets/Facebook-9cbfb8fd.js similarity index 96% rename from build/assets/Facebook-bed98e7b.js rename to build/assets/Facebook-9cbfb8fd.js index e69fa356a..398a3c1be 100644 --- a/build/assets/Facebook-bed98e7b.js +++ b/build/assets/Facebook-9cbfb8fd.js @@ -1 +1 @@ -import{n as _,r as P}from"./index-a0989d63.js";import{u as g,p as m}from"./index-159c08bd.js";function v(t,e){for(var r=0;ra[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var O=Object.create,i=Object.defineProperty,D=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,I=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,k=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of E(e))!j.call(t,s)&&s!==r&&i(t,s,{get:()=>e[s],enumerable:!(a=D(e,s))||a.enumerable});return t},w=(t,e,r)=>(r=t!=null?O(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),F=t=>h(i({},"__esModule",{value:!0}),t),o=(t,e,r)=>(I(t,typeof e!="symbol"?e+"":e,r),r),b={};k(b,{default:()=>l});var d=F(b),u=w(P),n=g,x=m;const c="https://connect.facebook.net/en_US/sdk.js",f="FB",y="fbAsyncInit",L="facebook-player-";class l extends u.Component{constructor(){super(...arguments),o(this,"callPlayer",n.callPlayer),o(this,"playerID",this.props.config.playerId||`${L}${(0,n.randomString)()}`),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){if(r){(0,n.getSDK)(c,f,y).then(a=>a.XFBML.parse());return}(0,n.getSDK)(c,f,y).then(a=>{a.init({appId:this.props.config.appId,xfbml:!0,version:this.props.config.version}),a.Event.subscribe("xfbml.render",s=>{this.props.onLoaded()}),a.Event.subscribe("xfbml.ready",s=>{s.type==="video"&&s.id===this.playerID&&(this.player=s.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted?this.callPlayer("mute"):this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){const{attributes:e}=this.props.config,r={width:"100%",height:"100%"};return u.default.createElement("div",{style:r,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false",...e})}}o(l,"displayName","Facebook");o(l,"canPlay",x.canPlay.facebook);o(l,"loopOnEnded",!0);const M=_(d),N=v({__proto__:null,default:M},[d]);export{N as F}; +import{n as _,r as P}from"./index-022521cf.js";import{u as g,p as m}from"./index-4378ec35.js";function v(t,e){for(var r=0;ra[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var O=Object.create,i=Object.defineProperty,D=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,I=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,k=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of E(e))!j.call(t,s)&&s!==r&&i(t,s,{get:()=>e[s],enumerable:!(a=D(e,s))||a.enumerable});return t},w=(t,e,r)=>(r=t!=null?O(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),F=t=>h(i({},"__esModule",{value:!0}),t),o=(t,e,r)=>(I(t,typeof e!="symbol"?e+"":e,r),r),b={};k(b,{default:()=>l});var d=F(b),u=w(P),n=g,x=m;const c="https://connect.facebook.net/en_US/sdk.js",f="FB",y="fbAsyncInit",L="facebook-player-";class l extends u.Component{constructor(){super(...arguments),o(this,"callPlayer",n.callPlayer),o(this,"playerID",this.props.config.playerId||`${L}${(0,n.randomString)()}`),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){if(r){(0,n.getSDK)(c,f,y).then(a=>a.XFBML.parse());return}(0,n.getSDK)(c,f,y).then(a=>{a.init({appId:this.props.config.appId,xfbml:!0,version:this.props.config.version}),a.Event.subscribe("xfbml.render",s=>{this.props.onLoaded()}),a.Event.subscribe("xfbml.ready",s=>{s.type==="video"&&s.id===this.playerID&&(this.player=s.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted?this.callPlayer("mute"):this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){const{attributes:e}=this.props.config,r={width:"100%",height:"100%"};return u.default.createElement("div",{style:r,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false",...e})}}o(l,"displayName","Facebook");o(l,"canPlay",x.canPlay.facebook);o(l,"loopOnEnded",!0);const M=_(d),N=v({__proto__:null,default:M},[d]);export{N as F}; diff --git a/build/assets/FilePlayer-c12ae876.js b/build/assets/FilePlayer-8f1b5c8c.js similarity index 98% rename from build/assets/FilePlayer-c12ae876.js rename to build/assets/FilePlayer-8f1b5c8c.js index e321ec774..0fc6557ae 100644 --- a/build/assets/FilePlayer-c12ae876.js +++ b/build/assets/FilePlayer-8f1b5c8c.js @@ -1 +1 @@ -import{n as b,r as _}from"./index-a0989d63.js";import{u as O,p as A}from"./index-159c08bd.js";function R(s,e){for(var t=0;ti[n]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var I=Object.create,u=Object.defineProperty,D=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,M=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,U=(s,e,t)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,N=(s,e)=>{for(var t in e)u(s,t,{get:e[t],enumerable:!0})},E=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of w(e))!k.call(s,n)&&n!==t&&u(s,n,{get:()=>e[n],enumerable:!(i=D(e,n))||i.enumerable});return s},j=(s,e,t)=>(t=s!=null?I(M(s)):{},E(e||!s||!s.__esModule?u(t,"default",{value:s,enumerable:!0}):t,s)),H=s=>E(u({},"__esModule",{value:!0}),s),r=(s,e,t)=>(U(s,typeof e!="symbol"?e+"":e,t),t),m={};N(m,{default:()=>P});var g=H(m),c=j(_),a=O,d=A;const y=typeof navigator<"u",F=y&&navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,v=y&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||F)&&!window.MSStream,V=y&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,T="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",C="Hls",B="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",x="dashjs",K="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",G="flvjs",X=/www\.dropbox\.com\/.+/,f=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,W="https://videodelivery.net/{id}/manifest/video.m3u8";class P extends c.Component{constructor(){super(...arguments),r(this,"onReady",(...e)=>this.props.onReady(...e)),r(this,"onPlay",(...e)=>this.props.onPlay(...e)),r(this,"onBuffer",(...e)=>this.props.onBuffer(...e)),r(this,"onBufferEnd",(...e)=>this.props.onBufferEnd(...e)),r(this,"onPause",(...e)=>this.props.onPause(...e)),r(this,"onEnded",(...e)=>this.props.onEnded(...e)),r(this,"onError",(...e)=>this.props.onError(...e)),r(this,"onPlayBackRateChange",e=>this.props.onPlaybackRateChange(e.target.playbackRate)),r(this,"onEnablePIP",(...e)=>this.props.onEnablePIP(...e)),r(this,"onDisablePIP",e=>{const{onDisablePIP:t,playing:i}=this.props;t(e),i&&this.play()}),r(this,"onPresentationModeChange",e=>{if(this.player&&(0,a.supportsWebKitPresentationMode)(this.player)){const{webkitPresentationMode:t}=this.player;t==="picture-in-picture"?this.onEnablePIP(e):t==="inline"&&this.onDisablePIP(e)}}),r(this,"onSeek",e=>{this.props.onSeek(e.target.currentTime)}),r(this,"mute",()=>{this.player.muted=!0}),r(this,"unmute",()=>{this.player.muted=!1}),r(this,"renderSourceElement",(e,t)=>typeof e=="string"?c.default.createElement("source",{key:t,src:e}):c.default.createElement("source",{key:t,...e})),r(this,"renderTrack",(e,t)=>c.default.createElement("track",{key:t,...e})),r(this,"ref",e=>{this.player&&(this.prevPlayer=this.player),this.player=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getSource(this.props.url);e&&(this.player.src=e),(v||this.props.config.forceDisableHls)&&this.player.load()}componentDidUpdate(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url!==e.url&&!(0,a.isMediaStream)(this.props.url)&&!(this.props.url instanceof Array)&&(this.player.srcObject=null)}componentWillUnmount(){this.player.removeAttribute("src"),this.removeListeners(this.player),this.hls&&this.hls.destroy()}addListeners(e){const{url:t,playsinline:i}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.addEventListener("canplay",this.onReady),i&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}removeListeners(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}shouldUseAudio(e){return e.config.forceVideo||e.config.attributes.poster?!1:d.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio}shouldUseHLS(e){return V&&this.props.config.forceSafariHLS||this.props.config.forceHLS?!0:v||this.props.config.forceDisableHls?!1:d.HLS_EXTENSIONS.test(e)||f.test(e)}shouldUseDASH(e){return d.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}shouldUseFLV(e){return d.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}load(e){const{hlsVersion:t,hlsOptions:i,dashVersion:n,flvVersion:l}=this.props.config;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,a.getSDK)(T.replace("VERSION",t),C).then(o=>{if(this.hls=new o(i),this.hls.on(o.Events.MANIFEST_PARSED,()=>{this.props.onReady()}),this.hls.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.hls,o)}),f.test(e)){const h=e.match(f)[1];this.hls.loadSource(W.replace("{id}",h))}else this.hls.loadSource(e);this.hls.attachMedia(this.player),this.props.onLoaded()}),this.shouldUseDASH(e)&&(0,a.getSDK)(B.replace("VERSION",n),x).then(o=>{this.dash=o.MediaPlayer().create(),this.dash.initialize(this.player,e,this.props.playing),this.dash.on("error",this.props.onError),parseInt(n)<3?this.dash.getDebug().setLogToBrowserConsole(!1):this.dash.updateSettings({debug:{logLevel:o.Debug.LOG_LEVEL_NONE}}),this.props.onLoaded()}),this.shouldUseFLV(e)&&(0,a.getSDK)(K.replace("VERSION",l),G).then(o=>{this.flv=o.createPlayer({type:"flv",url:e}),this.flv.attachMediaElement(this.player),this.flv.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.flv,o)}),this.flv.load(),this.props.onLoaded()}),e instanceof Array)this.player.load();else if((0,a.isMediaStream)(e))try{this.player.srcObject=e}catch{this.player.src=window.URL.createObjectURL(e)}}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="picture-in-picture"&&this.player.webkitSetPresentationMode("picture-in-picture")}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="inline"&&this.player.webkitSetPresentationMode("inline")}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(e.length===0)return 0;const t=e.end(e.length-1),i=this.getDuration();return t>i?i:t}getSource(e){const t=this.shouldUseHLS(e),i=this.shouldUseDASH(e),n=this.shouldUseFLV(e);if(!(e instanceof Array||(0,a.isMediaStream)(e)||t||i||n))return X.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}render(){const{url:e,playing:t,loop:i,controls:n,muted:l,config:o,width:h,height:p}=this.props,L=this.shouldUseAudio(this.props)?"audio":"video",S={width:h==="auto"?h:"100%",height:p==="auto"?p:"100%"};return c.default.createElement(L,{ref:this.ref,src:this.getSource(e),style:S,preload:"auto",autoPlay:t||void 0,controls:n,muted:l,loop:i,...o.attributes},e instanceof Array&&e.map(this.renderSourceElement),o.tracks.map(this.renderTrack))}}r(P,"displayName","FilePlayer");r(P,"canPlay",d.canPlay.file);const z=b(g),Q=R({__proto__:null,default:z},[g]);export{Q as F}; +import{n as b,r as _}from"./index-022521cf.js";import{u as O,p as A}from"./index-4378ec35.js";function R(s,e){for(var t=0;ti[n]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var I=Object.create,u=Object.defineProperty,D=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,M=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,U=(s,e,t)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,N=(s,e)=>{for(var t in e)u(s,t,{get:e[t],enumerable:!0})},E=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of w(e))!k.call(s,n)&&n!==t&&u(s,n,{get:()=>e[n],enumerable:!(i=D(e,n))||i.enumerable});return s},j=(s,e,t)=>(t=s!=null?I(M(s)):{},E(e||!s||!s.__esModule?u(t,"default",{value:s,enumerable:!0}):t,s)),H=s=>E(u({},"__esModule",{value:!0}),s),r=(s,e,t)=>(U(s,typeof e!="symbol"?e+"":e,t),t),m={};N(m,{default:()=>P});var g=H(m),c=j(_),a=O,d=A;const y=typeof navigator<"u",F=y&&navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,v=y&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||F)&&!window.MSStream,V=y&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,T="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",C="Hls",B="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",x="dashjs",K="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",G="flvjs",X=/www\.dropbox\.com\/.+/,f=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,W="https://videodelivery.net/{id}/manifest/video.m3u8";class P extends c.Component{constructor(){super(...arguments),r(this,"onReady",(...e)=>this.props.onReady(...e)),r(this,"onPlay",(...e)=>this.props.onPlay(...e)),r(this,"onBuffer",(...e)=>this.props.onBuffer(...e)),r(this,"onBufferEnd",(...e)=>this.props.onBufferEnd(...e)),r(this,"onPause",(...e)=>this.props.onPause(...e)),r(this,"onEnded",(...e)=>this.props.onEnded(...e)),r(this,"onError",(...e)=>this.props.onError(...e)),r(this,"onPlayBackRateChange",e=>this.props.onPlaybackRateChange(e.target.playbackRate)),r(this,"onEnablePIP",(...e)=>this.props.onEnablePIP(...e)),r(this,"onDisablePIP",e=>{const{onDisablePIP:t,playing:i}=this.props;t(e),i&&this.play()}),r(this,"onPresentationModeChange",e=>{if(this.player&&(0,a.supportsWebKitPresentationMode)(this.player)){const{webkitPresentationMode:t}=this.player;t==="picture-in-picture"?this.onEnablePIP(e):t==="inline"&&this.onDisablePIP(e)}}),r(this,"onSeek",e=>{this.props.onSeek(e.target.currentTime)}),r(this,"mute",()=>{this.player.muted=!0}),r(this,"unmute",()=>{this.player.muted=!1}),r(this,"renderSourceElement",(e,t)=>typeof e=="string"?c.default.createElement("source",{key:t,src:e}):c.default.createElement("source",{key:t,...e})),r(this,"renderTrack",(e,t)=>c.default.createElement("track",{key:t,...e})),r(this,"ref",e=>{this.player&&(this.prevPlayer=this.player),this.player=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getSource(this.props.url);e&&(this.player.src=e),(v||this.props.config.forceDisableHls)&&this.player.load()}componentDidUpdate(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url!==e.url&&!(0,a.isMediaStream)(this.props.url)&&!(this.props.url instanceof Array)&&(this.player.srcObject=null)}componentWillUnmount(){this.player.removeAttribute("src"),this.removeListeners(this.player),this.hls&&this.hls.destroy()}addListeners(e){const{url:t,playsinline:i}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.addEventListener("canplay",this.onReady),i&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}removeListeners(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}shouldUseAudio(e){return e.config.forceVideo||e.config.attributes.poster?!1:d.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio}shouldUseHLS(e){return V&&this.props.config.forceSafariHLS||this.props.config.forceHLS?!0:v||this.props.config.forceDisableHls?!1:d.HLS_EXTENSIONS.test(e)||f.test(e)}shouldUseDASH(e){return d.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}shouldUseFLV(e){return d.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}load(e){const{hlsVersion:t,hlsOptions:i,dashVersion:n,flvVersion:l}=this.props.config;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,a.getSDK)(T.replace("VERSION",t),C).then(o=>{if(this.hls=new o(i),this.hls.on(o.Events.MANIFEST_PARSED,()=>{this.props.onReady()}),this.hls.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.hls,o)}),f.test(e)){const h=e.match(f)[1];this.hls.loadSource(W.replace("{id}",h))}else this.hls.loadSource(e);this.hls.attachMedia(this.player),this.props.onLoaded()}),this.shouldUseDASH(e)&&(0,a.getSDK)(B.replace("VERSION",n),x).then(o=>{this.dash=o.MediaPlayer().create(),this.dash.initialize(this.player,e,this.props.playing),this.dash.on("error",this.props.onError),parseInt(n)<3?this.dash.getDebug().setLogToBrowserConsole(!1):this.dash.updateSettings({debug:{logLevel:o.Debug.LOG_LEVEL_NONE}}),this.props.onLoaded()}),this.shouldUseFLV(e)&&(0,a.getSDK)(K.replace("VERSION",l),G).then(o=>{this.flv=o.createPlayer({type:"flv",url:e}),this.flv.attachMediaElement(this.player),this.flv.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.flv,o)}),this.flv.load(),this.props.onLoaded()}),e instanceof Array)this.player.load();else if((0,a.isMediaStream)(e))try{this.player.srcObject=e}catch{this.player.src=window.URL.createObjectURL(e)}}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="picture-in-picture"&&this.player.webkitSetPresentationMode("picture-in-picture")}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="inline"&&this.player.webkitSetPresentationMode("inline")}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(e.length===0)return 0;const t=e.end(e.length-1),i=this.getDuration();return t>i?i:t}getSource(e){const t=this.shouldUseHLS(e),i=this.shouldUseDASH(e),n=this.shouldUseFLV(e);if(!(e instanceof Array||(0,a.isMediaStream)(e)||t||i||n))return X.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}render(){const{url:e,playing:t,loop:i,controls:n,muted:l,config:o,width:h,height:p}=this.props,L=this.shouldUseAudio(this.props)?"audio":"video",S={width:h==="auto"?h:"100%",height:p==="auto"?p:"100%"};return c.default.createElement(L,{ref:this.ref,src:this.getSource(e),style:S,preload:"auto",autoPlay:t||void 0,controls:n,muted:l,loop:i,...o.attributes},e instanceof Array&&e.map(this.renderSourceElement),o.tracks.map(this.renderTrack))}}r(P,"displayName","FilePlayer");r(P,"canPlay",d.canPlay.file);const z=b(g),Q=R({__proto__:null,default:z},[g]);export{Q as F}; diff --git a/build/assets/FormControlLabel-770e209b.js b/build/assets/FormControlLabel-8c91edc9.js similarity index 94% rename from build/assets/FormControlLabel-770e209b.js rename to build/assets/FormControlLabel-8c91edc9.js index 67bdc521d..f6aaca274 100644 --- a/build/assets/FormControlLabel-770e209b.js +++ b/build/assets/FormControlLabel-8c91edc9.js @@ -1 +1 @@ -import{b as z,g as A,s as B,_ as d,i as V,r as j,a as D,j as f,c as T,e as _,d as O,u as X}from"./index-a0989d63.js";import{u as Y,a as W,f as Z,S as ee}from"./Stack-98b5acbc.js";import{p as oe}from"./index-775b6bc6.js";import{T as M}from"./Typography-d3022217.js";function te(e){return z("PrivateSwitchBase",e)}A("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const se=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],ae=e=>{const{classes:o,checked:a,disabled:l,edge:s}=e,t={root:["root",a&&"checked",l&&"disabled",s&&`edge${_(s)}`],input:["input"]};return O(t,te,o)},re=B(oe)(({ownerState:e})=>d({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),le=B("input",{shouldForwardProp:V})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),ne=j.forwardRef(function(o,a){const{autoFocus:l,checked:s,checkedIcon:t,className:g,defaultChecked:x,disabled:p,disableFocusRipple:C=!1,edge:L=!1,icon:w,id:v,inputProps:R,inputRef:$,name:q,onBlur:m,onChange:P,onFocus:b,readOnly:S,required:I=!1,tabIndex:y,type:n,value:h}=o,i=D(o,se),[u,H]=Y({controlled:s,default:!!x,name:"SwitchBase",state:"checked"}),c=W(),G=r=>{b&&b(r),c&&c.onFocus&&c.onFocus(r)},J=r=>{m&&m(r),c&&c.onBlur&&c.onBlur(r)},K=r=>{if(r.nativeEvent.defaultPrevented)return;const U=r.target.checked;H(U),P&&P(r,U)};let k=p;c&&typeof k>"u"&&(k=c.disabled);const Q=n==="checkbox"||n==="radio",N=d({},o,{checked:u,disabled:k,disableFocusRipple:C,edge:L}),E=ae(N);return f.jsxs(re,d({component:"span",className:T(E.root,g),centerRipple:!0,focusRipple:!C,disabled:k,tabIndex:null,role:void 0,onFocus:G,onBlur:J,ownerState:N,ref:a},i,{children:[f.jsx(le,d({autoFocus:l,checked:s,defaultChecked:x,className:E.input,disabled:k,id:Q?v:void 0,name:q,onChange:K,readOnly:S,ref:$,required:I,ownerState:N,tabIndex:y,type:n},n==="checkbox"&&h===void 0?{}:{value:h},R)),u?t:w]}))}),Pe=ne;function ie(e){return z("MuiFormControlLabel",e)}const ce=A("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),F=ce,de=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],ue=e=>{const{classes:o,disabled:a,labelPlacement:l,error:s,required:t}=e,g={root:["root",a&&"disabled",`labelPlacement${_(l)}`,s&&"error",t&&"required"],label:["label",a&&"disabled"],asterisk:["asterisk",s&&"error"]};return O(g,ie,o)},pe=B("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[{[`& .${F.label}`]:o.label},o.root,o[`labelPlacement${_(a.labelPlacement)}`]]}})(({theme:e,ownerState:o})=>d({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${F.disabled}`]:{cursor:"default"}},o.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},o.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},o.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${F.label}`]:{[`&.${F.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),me=B("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,o)=>o.asterisk})(({theme:e})=>({[`&.${F.error}`]:{color:(e.vars||e).palette.error.main}})),be=j.forwardRef(function(o,a){var l,s;const t=X({props:o,name:"MuiFormControlLabel"}),{className:g,componentsProps:x={},control:p,disabled:C,disableTypography:L,label:w,labelPlacement:v="end",required:R,slotProps:$={}}=t,q=D(t,de),m=W(),P=(l=C??p.props.disabled)!=null?l:m==null?void 0:m.disabled,b=R??p.props.required,S={disabled:P,required:b};["checked","name","onChange","value","inputRef"].forEach(u=>{typeof p.props[u]>"u"&&typeof t[u]<"u"&&(S[u]=t[u])});const I=Z({props:t,muiFormControl:m,states:["error"]}),y=d({},t,{disabled:P,labelPlacement:v,required:b,error:I.error}),n=ue(y),h=(s=$.typography)!=null?s:x.typography;let i=w;return i!=null&&i.type!==M&&!L&&(i=f.jsx(M,d({component:"span"},h,{className:T(n.label,h==null?void 0:h.className),children:i}))),f.jsxs(pe,d({className:T(n.root,g),ownerState:y,ref:a},q,{children:[j.cloneElement(p,S),b?f.jsxs(ee,{display:"block",children:[i,f.jsxs(me,{ownerState:y,"aria-hidden":!0,className:n.asterisk,children:[" ","*"]})]}):i]}))}),ye=be;export{ye as F,Pe as S}; +import{b as z,g as A,s as B,_ as d,i as V,r as j,a as D,j as f,c as T,e as _,d as O,u as X}from"./index-022521cf.js";import{u as Y,a as W,f as Z,S as ee}from"./Stack-ce2a5ec5.js";import{p as oe}from"./index-586dfb7f.js";import{T as M}from"./Typography-13dc67f3.js";function te(e){return z("PrivateSwitchBase",e)}A("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const se=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],ae=e=>{const{classes:o,checked:a,disabled:l,edge:s}=e,t={root:["root",a&&"checked",l&&"disabled",s&&`edge${_(s)}`],input:["input"]};return O(t,te,o)},re=B(oe)(({ownerState:e})=>d({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),le=B("input",{shouldForwardProp:V})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),ne=j.forwardRef(function(o,a){const{autoFocus:l,checked:s,checkedIcon:t,className:g,defaultChecked:x,disabled:p,disableFocusRipple:C=!1,edge:L=!1,icon:w,id:v,inputProps:R,inputRef:$,name:q,onBlur:m,onChange:P,onFocus:b,readOnly:S,required:I=!1,tabIndex:y,type:n,value:h}=o,i=D(o,se),[u,H]=Y({controlled:s,default:!!x,name:"SwitchBase",state:"checked"}),c=W(),G=r=>{b&&b(r),c&&c.onFocus&&c.onFocus(r)},J=r=>{m&&m(r),c&&c.onBlur&&c.onBlur(r)},K=r=>{if(r.nativeEvent.defaultPrevented)return;const U=r.target.checked;H(U),P&&P(r,U)};let k=p;c&&typeof k>"u"&&(k=c.disabled);const Q=n==="checkbox"||n==="radio",N=d({},o,{checked:u,disabled:k,disableFocusRipple:C,edge:L}),E=ae(N);return f.jsxs(re,d({component:"span",className:T(E.root,g),centerRipple:!0,focusRipple:!C,disabled:k,tabIndex:null,role:void 0,onFocus:G,onBlur:J,ownerState:N,ref:a},i,{children:[f.jsx(le,d({autoFocus:l,checked:s,defaultChecked:x,className:E.input,disabled:k,id:Q?v:void 0,name:q,onChange:K,readOnly:S,ref:$,required:I,ownerState:N,tabIndex:y,type:n},n==="checkbox"&&h===void 0?{}:{value:h},R)),u?t:w]}))}),Pe=ne;function ie(e){return z("MuiFormControlLabel",e)}const ce=A("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),F=ce,de=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],ue=e=>{const{classes:o,disabled:a,labelPlacement:l,error:s,required:t}=e,g={root:["root",a&&"disabled",`labelPlacement${_(l)}`,s&&"error",t&&"required"],label:["label",a&&"disabled"],asterisk:["asterisk",s&&"error"]};return O(g,ie,o)},pe=B("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[{[`& .${F.label}`]:o.label},o.root,o[`labelPlacement${_(a.labelPlacement)}`]]}})(({theme:e,ownerState:o})=>d({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${F.disabled}`]:{cursor:"default"}},o.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},o.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},o.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${F.label}`]:{[`&.${F.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),me=B("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,o)=>o.asterisk})(({theme:e})=>({[`&.${F.error}`]:{color:(e.vars||e).palette.error.main}})),be=j.forwardRef(function(o,a){var l,s;const t=X({props:o,name:"MuiFormControlLabel"}),{className:g,componentsProps:x={},control:p,disabled:C,disableTypography:L,label:w,labelPlacement:v="end",required:R,slotProps:$={}}=t,q=D(t,de),m=W(),P=(l=C??p.props.disabled)!=null?l:m==null?void 0:m.disabled,b=R??p.props.required,S={disabled:P,required:b};["checked","name","onChange","value","inputRef"].forEach(u=>{typeof p.props[u]>"u"&&typeof t[u]<"u"&&(S[u]=t[u])});const I=Z({props:t,muiFormControl:m,states:["error"]}),y=d({},t,{disabled:P,labelPlacement:v,required:b,error:I.error}),n=ue(y),h=(s=$.typography)!=null?s:x.typography;let i=w;return i!=null&&i.type!==M&&!L&&(i=f.jsx(M,d({component:"span"},h,{className:T(n.label,h==null?void 0:h.className),children:i}))),f.jsxs(pe,d({className:T(n.root,g),ownerState:y,ref:a},q,{children:[j.cloneElement(p,S),b?f.jsxs(ee,{display:"block",children:[i,f.jsxs(me,{ownerState:y,"aria-hidden":!0,className:n.asterisk,children:[" ","*"]})]}):i]}))}),ye=be;export{ye as F,Pe as S}; diff --git a/build/assets/InfoIcon-4aad7e99.js b/build/assets/InfoIcon-b7d3736d.js similarity index 97% rename from build/assets/InfoIcon-4aad7e99.js rename to build/assets/InfoIcon-b7d3736d.js index fe7cb809f..be4c85483 100644 --- a/build/assets/InfoIcon-4aad7e99.js +++ b/build/assets/InfoIcon-b7d3736d.js @@ -1 +1 @@ -import{j as C}from"./index-a0989d63.js";const r=i=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsxs("g",{id:"info",children:[C.jsx("mask",{id:"mask0_2682_970",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:C.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),C.jsx("g",{mask:"url(#mask0_2682_970)",children:C.jsx("path",{id:"info_2",d:"M7.99992 11.3334C8.18881 11.3334 8.34714 11.2695 8.47492 11.1417C8.6027 11.0139 8.66658 10.8556 8.66658 10.6667V8.00004C8.66658 7.81115 8.6027 7.65282 8.47492 7.52504C8.34714 7.39726 8.18881 7.33337 7.99992 7.33337C7.81103 7.33337 7.6527 7.39726 7.52492 7.52504C7.39714 7.65282 7.33325 7.81115 7.33325 8.00004V10.6667C7.33325 10.8556 7.39714 11.0139 7.52492 11.1417C7.6527 11.2695 7.81103 11.3334 7.99992 11.3334ZM7.99992 6.00004C8.18881 6.00004 8.34714 5.93615 8.47492 5.80837C8.6027 5.6806 8.66658 5.52226 8.66658 5.33337C8.66658 5.14448 8.6027 4.98615 8.47492 4.85837C8.34714 4.7306 8.18881 4.66671 7.99992 4.66671C7.81103 4.66671 7.6527 4.7306 7.52492 4.85837C7.39714 4.98615 7.33325 5.14448 7.33325 5.33337C7.33325 5.52226 7.39714 5.6806 7.52492 5.80837C7.6527 5.93615 7.81103 6.00004 7.99992 6.00004ZM7.99992 14.6667C7.0777 14.6667 6.21103 14.4917 5.39992 14.1417C4.58881 13.7917 3.88325 13.3167 3.28325 12.7167C2.68325 12.1167 2.20825 11.4112 1.85825 10.6C1.50825 9.78893 1.33325 8.92226 1.33325 8.00004C1.33325 7.07782 1.50825 6.21115 1.85825 5.40004C2.20825 4.58893 2.68325 3.88337 3.28325 3.28337C3.88325 2.68337 4.58881 2.20837 5.39992 1.85837C6.21103 1.50837 7.0777 1.33337 7.99992 1.33337C8.92214 1.33337 9.78881 1.50837 10.5999 1.85837C11.411 2.20837 12.1166 2.68337 12.7166 3.28337C13.3166 3.88337 13.7916 4.58893 14.1416 5.40004C14.4916 6.21115 14.6666 7.07782 14.6666 8.00004C14.6666 8.92226 14.4916 9.78893 14.1416 10.6C13.7916 11.4112 13.3166 12.1167 12.7166 12.7167C12.1166 13.3167 11.411 13.7917 10.5999 14.1417C9.78881 14.4917 8.92214 14.6667 7.99992 14.6667ZM7.99992 13.3334C9.48881 13.3334 10.7499 12.8167 11.7833 11.7834C12.8166 10.75 13.3333 9.48893 13.3333 8.00004C13.3333 6.51115 12.8166 5.25004 11.7833 4.21671C10.7499 3.18337 9.48881 2.66671 7.99992 2.66671C6.51103 2.66671 5.24992 3.18337 4.21659 4.21671C3.18325 5.25004 2.66659 6.51115 2.66659 8.00004C2.66659 9.48893 3.18325 10.75 4.21659 11.7834C5.24992 12.8167 6.51103 13.3334 7.99992 13.3334Z",fill:"currentColor"})})]})});export{r as I}; +import{j as C}from"./index-022521cf.js";const r=i=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsxs("g",{id:"info",children:[C.jsx("mask",{id:"mask0_2682_970",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:C.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),C.jsx("g",{mask:"url(#mask0_2682_970)",children:C.jsx("path",{id:"info_2",d:"M7.99992 11.3334C8.18881 11.3334 8.34714 11.2695 8.47492 11.1417C8.6027 11.0139 8.66658 10.8556 8.66658 10.6667V8.00004C8.66658 7.81115 8.6027 7.65282 8.47492 7.52504C8.34714 7.39726 8.18881 7.33337 7.99992 7.33337C7.81103 7.33337 7.6527 7.39726 7.52492 7.52504C7.39714 7.65282 7.33325 7.81115 7.33325 8.00004V10.6667C7.33325 10.8556 7.39714 11.0139 7.52492 11.1417C7.6527 11.2695 7.81103 11.3334 7.99992 11.3334ZM7.99992 6.00004C8.18881 6.00004 8.34714 5.93615 8.47492 5.80837C8.6027 5.6806 8.66658 5.52226 8.66658 5.33337C8.66658 5.14448 8.6027 4.98615 8.47492 4.85837C8.34714 4.7306 8.18881 4.66671 7.99992 4.66671C7.81103 4.66671 7.6527 4.7306 7.52492 4.85837C7.39714 4.98615 7.33325 5.14448 7.33325 5.33337C7.33325 5.52226 7.39714 5.6806 7.52492 5.80837C7.6527 5.93615 7.81103 6.00004 7.99992 6.00004ZM7.99992 14.6667C7.0777 14.6667 6.21103 14.4917 5.39992 14.1417C4.58881 13.7917 3.88325 13.3167 3.28325 12.7167C2.68325 12.1167 2.20825 11.4112 1.85825 10.6C1.50825 9.78893 1.33325 8.92226 1.33325 8.00004C1.33325 7.07782 1.50825 6.21115 1.85825 5.40004C2.20825 4.58893 2.68325 3.88337 3.28325 3.28337C3.88325 2.68337 4.58881 2.20837 5.39992 1.85837C6.21103 1.50837 7.0777 1.33337 7.99992 1.33337C8.92214 1.33337 9.78881 1.50837 10.5999 1.85837C11.411 2.20837 12.1166 2.68337 12.7166 3.28337C13.3166 3.88337 13.7916 4.58893 14.1416 5.40004C14.4916 6.21115 14.6666 7.07782 14.6666 8.00004C14.6666 8.92226 14.4916 9.78893 14.1416 10.6C13.7916 11.4112 13.3166 12.1167 12.7166 12.7167C12.1166 13.3167 11.411 13.7917 10.5999 14.1417C9.78881 14.4917 8.92214 14.6667 7.99992 14.6667ZM7.99992 13.3334C9.48881 13.3334 10.7499 12.8167 11.7833 11.7834C12.8166 10.75 13.3333 9.48893 13.3333 8.00004C13.3333 6.51115 12.8166 5.25004 11.7833 4.21671C10.7499 3.18337 9.48881 2.66671 7.99992 2.66671C6.51103 2.66671 5.24992 3.18337 4.21659 4.21671C3.18325 5.25004 2.66659 6.51115 2.66659 8.00004C2.66659 9.48893 3.18325 10.75 4.21659 11.7834C5.24992 12.8167 6.51103 13.3334 7.99992 13.3334Z",fill:"currentColor"})})]})});export{r as I}; diff --git a/build/assets/Kaltura-26ce6f71.js b/build/assets/Kaltura-f1b9cba8.js similarity index 95% rename from build/assets/Kaltura-26ce6f71.js rename to build/assets/Kaltura-f1b9cba8.js index bc18a3e11..09d1c11b3 100644 --- a/build/assets/Kaltura-26ce6f71.js +++ b/build/assets/Kaltura-f1b9cba8.js @@ -1 +1 @@ -import{n as y,r as f}from"./index-a0989d63.js";import{u as _,p as m}from"./index-159c08bd.js";function P(r,e){for(var t=0;to[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?n(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,L=(r,e)=>{for(var t in e)n(r,t,{get:e[t],enumerable:!0})},c=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of v(e))!w.call(r,a)&&a!==t&&n(r,a,{get:()=>e[a],enumerable:!(o=b(e,a))||o.enumerable});return r},K=(r,e,t)=>(t=r!=null?g(O(r)):{},c(e||!r||!r.__esModule?n(t,"default",{value:r,enumerable:!0}):t,r)),D=r=>c(n({},"__esModule",{value:!0}),r),s=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),h={};L(h,{default:()=>i});var d=D(h),u=K(f),p=_,S=m;const T="https://cdn.embed.ly/player-0.1.0.min.js",E="playerjs";class i extends u.Component{constructor(){super(...arguments),s(this,"callPlayer",p.callPlayer),s(this,"duration",null),s(this,"currentTime",null),s(this,"secondsLoaded",null),s(this,"mute",()=>{this.callPlayer("mute")}),s(this,"unmute",()=>{this.callPlayer("unmute")}),s(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(T,E).then(t=>{this.iframe&&(this.player=new t.Player(this.iframe),this.player.on("ready",()=>{setTimeout(()=>{this.player.isReady=!0,this.player.setLoop(this.props.loop),this.props.muted&&this.player.mute(),this.addListeners(this.player,this.props),this.props.onReady()},500)}))},this.props.onError)}addListeners(e,t){e.on("play",t.onPlay),e.on("pause",t.onPause),e.on("ended",t.onEnded),e.on("error",t.onError),e.on("timeupdate",({duration:o,seconds:a})=>{this.duration=o,this.currentTime=a})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e={width:"100%",height:"100%"};return u.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:e,allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}s(i,"displayName","Kaltura");s(i,"canPlay",S.canPlay.kaltura);const M=y(d),N=P({__proto__:null,default:M},[d]);export{N as K}; +import{n as y,r as f}from"./index-022521cf.js";import{u as _,p as m}from"./index-4378ec35.js";function P(r,e){for(var t=0;to[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?n(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,L=(r,e)=>{for(var t in e)n(r,t,{get:e[t],enumerable:!0})},c=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of v(e))!w.call(r,a)&&a!==t&&n(r,a,{get:()=>e[a],enumerable:!(o=b(e,a))||o.enumerable});return r},K=(r,e,t)=>(t=r!=null?g(O(r)):{},c(e||!r||!r.__esModule?n(t,"default",{value:r,enumerable:!0}):t,r)),D=r=>c(n({},"__esModule",{value:!0}),r),s=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),h={};L(h,{default:()=>i});var d=D(h),u=K(f),p=_,S=m;const T="https://cdn.embed.ly/player-0.1.0.min.js",E="playerjs";class i extends u.Component{constructor(){super(...arguments),s(this,"callPlayer",p.callPlayer),s(this,"duration",null),s(this,"currentTime",null),s(this,"secondsLoaded",null),s(this,"mute",()=>{this.callPlayer("mute")}),s(this,"unmute",()=>{this.callPlayer("unmute")}),s(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(T,E).then(t=>{this.iframe&&(this.player=new t.Player(this.iframe),this.player.on("ready",()=>{setTimeout(()=>{this.player.isReady=!0,this.player.setLoop(this.props.loop),this.props.muted&&this.player.mute(),this.addListeners(this.player,this.props),this.props.onReady()},500)}))},this.props.onError)}addListeners(e,t){e.on("play",t.onPlay),e.on("pause",t.onPause),e.on("ended",t.onEnded),e.on("error",t.onError),e.on("timeupdate",({duration:o,seconds:a})=>{this.duration=o,this.currentTime=a})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e={width:"100%",height:"100%"};return u.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:e,allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}s(i,"displayName","Kaltura");s(i,"canPlay",S.canPlay.kaltura);const M=y(d),N=P({__proto__:null,default:M},[d]);export{N as K}; diff --git a/build/assets/MergeIcon-b3a532b8.js b/build/assets/MergeIcon-b7c61b0a.js similarity index 98% rename from build/assets/MergeIcon-b3a532b8.js rename to build/assets/MergeIcon-b7c61b0a.js index 907acf33e..99359fe5c 100644 --- a/build/assets/MergeIcon-b3a532b8.js +++ b/build/assets/MergeIcon-b7c61b0a.js @@ -1 +1 @@ -import{j as C}from"./index-a0989d63.js";const o=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{id:"Type=Edit, Size=20x20",children:C.jsx("path",{id:"icon","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9243 3.3359L9.06461 9.19559C8.97523 9.28497 8.9036 9.39048 8.85353 9.50654L7.99772 11.49C7.89015 11.7394 8.14272 11.9919 8.39203 11.8843L10.3755 11.0285C10.4916 10.9785 10.5971 10.9068 10.6865 10.8175L16.5462 4.95777C16.994 4.50991 16.994 3.78377 16.5462 3.3359C16.0983 2.88804 15.3722 2.88804 14.9243 3.3359ZM14.5297 10.7363C14.5297 10.3876 14.8127 10.1047 15.1615 10.1047C15.5116 10.1047 15.7933 10.3889 15.7933 10.7363L15.7222 14.1051C15.7222 15.1499 14.8954 16 13.8506 16H5.87166C4.85054 16 4 15.1499 4 14.0814V6.0806C4 5.05918 4.85054 4.2091 5.87166 4.2091L9.68606 4.20936C10.0362 4.20936 10.3178 4.49228 10.3178 4.841C10.3178 5.18972 10.0349 5.47264 9.68606 5.47264H5.89535C5.54735 5.47264 5.26357 5.75609 5.26357 6.10428V14.1051C5.26357 14.4533 5.54735 14.7367 5.89535 14.7367H13.898C14.246 14.7367 14.5297 14.4533 14.5297 14.1051V10.7363Z",fill:"currentColor"})})}),l=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M7.37516 8.625V11.3334C7.37516 11.5104 7.43508 11.6589 7.55491 11.7786C7.67476 11.8984 7.82326 11.9583 8.00041 11.9583C8.17758 11.9583 8.32599 11.8984 8.44564 11.7786C8.5653 11.6589 8.62512 11.5104 8.62512 11.3334V8.625H11.3335C11.5106 8.625 11.659 8.56508 11.7788 8.44525C11.8986 8.3254 11.9585 8.1769 11.9585 7.99975C11.9585 7.82258 11.8986 7.67417 11.7788 7.55452C11.659 7.43487 11.5106 7.37504 11.3335 7.37504H8.62512V4.66669C8.62512 4.4896 8.56521 4.34117 8.44537 4.22137C8.32553 4.1016 8.17702 4.04171 7.99987 4.04171C7.82271 4.04171 7.6743 4.1016 7.55464 4.22137C7.43499 4.34117 7.37516 4.4896 7.37516 4.66669V7.37504H4.66681C4.48973 7.37504 4.3413 7.43496 4.22152 7.55479C4.10173 7.67464 4.04183 7.82314 4.04183 8.00029C4.04183 8.17746 4.10173 8.32587 4.22152 8.44552C4.3413 8.56517 4.48973 8.625 4.66681 8.625H7.37516ZM8.00154 15.9167C6.90659 15.9167 5.8774 15.7089 4.91395 15.2933C3.9505 14.8778 3.11243 14.3138 2.39975 13.6015C1.68705 12.8891 1.12284 12.0514 0.7071 11.0884C0.291364 10.1253 0.0834961 9.09636 0.0834961 8.00142C0.0834961 6.90647 0.291274 5.87728 0.70683 4.91383C1.12239 3.95037 1.68634 3.11231 2.3987 2.39963C3.11108 1.68693 3.94878 1.12272 4.91181 0.706979C5.87482 0.291243 6.9038 0.083374 7.99875 0.083374C9.09369 0.083374 10.1229 0.291153 11.0863 0.706708C12.0498 1.12226 12.8879 1.68622 13.6005 2.39858C14.3132 3.11096 14.8774 3.94866 15.2932 4.91169C15.7089 5.8747 15.9168 6.90368 15.9168 7.99863C15.9168 9.09357 15.709 10.1228 15.2935 11.0862C14.8779 12.0497 14.3139 12.8877 13.6016 13.6004C12.8892 14.3131 12.0515 14.8773 11.0885 15.2931C10.1255 15.7088 9.09648 15.9167 8.00154 15.9167ZM8.00014 14.6667C9.86125 14.6667 11.4376 14.0209 12.7293 12.7292C14.021 11.4375 14.6668 9.86113 14.6668 8.00002C14.6668 6.13891 14.021 4.56252 12.7293 3.27085C11.4376 1.97919 9.86125 1.33335 8.00014 1.33335C6.13903 1.33335 4.56264 1.97919 3.27098 3.27085C1.97931 4.56252 1.33348 6.13891 1.33348 8.00002C1.33348 9.86113 1.97931 11.4375 3.27098 12.7292C4.56264 14.0209 6.13903 14.6667 8.00014 14.6667Z",fill:"currentColor"})}),i=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M1.33317 15.5L0.166504 14.3333L4.18734 10.2917C4.50678 9.97222 4.74984 9.61111 4.9165 9.20833C5.08317 8.80556 5.1665 8.38194 5.1665 7.9375L5.1665 3.6875L3.83317 5L2.6665 3.83333L5.99984 0.5L9.33317 3.83333L8.1665 5L6.83317 3.6875L6.83317 7.9375C6.83317 8.38194 6.9165 8.80556 7.08317 9.20833C7.24984 9.61111 7.49289 9.97222 7.81234 10.2917L11.8332 14.3333L10.6665 15.5L5.99984 10.8333L1.33317 15.5Z",fill:"currentColor"})});export{l as A,o as E,i as M}; +import{j as C}from"./index-022521cf.js";const o=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{id:"Type=Edit, Size=20x20",children:C.jsx("path",{id:"icon","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.9243 3.3359L9.06461 9.19559C8.97523 9.28497 8.9036 9.39048 8.85353 9.50654L7.99772 11.49C7.89015 11.7394 8.14272 11.9919 8.39203 11.8843L10.3755 11.0285C10.4916 10.9785 10.5971 10.9068 10.6865 10.8175L16.5462 4.95777C16.994 4.50991 16.994 3.78377 16.5462 3.3359C16.0983 2.88804 15.3722 2.88804 14.9243 3.3359ZM14.5297 10.7363C14.5297 10.3876 14.8127 10.1047 15.1615 10.1047C15.5116 10.1047 15.7933 10.3889 15.7933 10.7363L15.7222 14.1051C15.7222 15.1499 14.8954 16 13.8506 16H5.87166C4.85054 16 4 15.1499 4 14.0814V6.0806C4 5.05918 4.85054 4.2091 5.87166 4.2091L9.68606 4.20936C10.0362 4.20936 10.3178 4.49228 10.3178 4.841C10.3178 5.18972 10.0349 5.47264 9.68606 5.47264H5.89535C5.54735 5.47264 5.26357 5.75609 5.26357 6.10428V14.1051C5.26357 14.4533 5.54735 14.7367 5.89535 14.7367H13.898C14.246 14.7367 14.5297 14.4533 14.5297 14.1051V10.7363Z",fill:"currentColor"})})}),l=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M7.37516 8.625V11.3334C7.37516 11.5104 7.43508 11.6589 7.55491 11.7786C7.67476 11.8984 7.82326 11.9583 8.00041 11.9583C8.17758 11.9583 8.32599 11.8984 8.44564 11.7786C8.5653 11.6589 8.62512 11.5104 8.62512 11.3334V8.625H11.3335C11.5106 8.625 11.659 8.56508 11.7788 8.44525C11.8986 8.3254 11.9585 8.1769 11.9585 7.99975C11.9585 7.82258 11.8986 7.67417 11.7788 7.55452C11.659 7.43487 11.5106 7.37504 11.3335 7.37504H8.62512V4.66669C8.62512 4.4896 8.56521 4.34117 8.44537 4.22137C8.32553 4.1016 8.17702 4.04171 7.99987 4.04171C7.82271 4.04171 7.6743 4.1016 7.55464 4.22137C7.43499 4.34117 7.37516 4.4896 7.37516 4.66669V7.37504H4.66681C4.48973 7.37504 4.3413 7.43496 4.22152 7.55479C4.10173 7.67464 4.04183 7.82314 4.04183 8.00029C4.04183 8.17746 4.10173 8.32587 4.22152 8.44552C4.3413 8.56517 4.48973 8.625 4.66681 8.625H7.37516ZM8.00154 15.9167C6.90659 15.9167 5.8774 15.7089 4.91395 15.2933C3.9505 14.8778 3.11243 14.3138 2.39975 13.6015C1.68705 12.8891 1.12284 12.0514 0.7071 11.0884C0.291364 10.1253 0.0834961 9.09636 0.0834961 8.00142C0.0834961 6.90647 0.291274 5.87728 0.70683 4.91383C1.12239 3.95037 1.68634 3.11231 2.3987 2.39963C3.11108 1.68693 3.94878 1.12272 4.91181 0.706979C5.87482 0.291243 6.9038 0.083374 7.99875 0.083374C9.09369 0.083374 10.1229 0.291153 11.0863 0.706708C12.0498 1.12226 12.8879 1.68622 13.6005 2.39858C14.3132 3.11096 14.8774 3.94866 15.2932 4.91169C15.7089 5.8747 15.9168 6.90368 15.9168 7.99863C15.9168 9.09357 15.709 10.1228 15.2935 11.0862C14.8779 12.0497 14.3139 12.8877 13.6016 13.6004C12.8892 14.3131 12.0515 14.8773 11.0885 15.2931C10.1255 15.7088 9.09648 15.9167 8.00154 15.9167ZM8.00014 14.6667C9.86125 14.6667 11.4376 14.0209 12.7293 12.7292C14.021 11.4375 14.6668 9.86113 14.6668 8.00002C14.6668 6.13891 14.021 4.56252 12.7293 3.27085C11.4376 1.97919 9.86125 1.33335 8.00014 1.33335C6.13903 1.33335 4.56264 1.97919 3.27098 3.27085C1.97931 4.56252 1.33348 6.13891 1.33348 8.00002C1.33348 9.86113 1.97931 11.4375 3.27098 12.7292C4.56264 14.0209 6.13903 14.6667 8.00014 14.6667Z",fill:"currentColor"})}),i=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M1.33317 15.5L0.166504 14.3333L4.18734 10.2917C4.50678 9.97222 4.74984 9.61111 4.9165 9.20833C5.08317 8.80556 5.1665 8.38194 5.1665 7.9375L5.1665 3.6875L3.83317 5L2.6665 3.83333L5.99984 0.5L9.33317 3.83333L8.1665 5L6.83317 3.6875L6.83317 7.9375C6.83317 8.38194 6.9165 8.80556 7.08317 9.20833C7.24984 9.61111 7.49289 9.97222 7.81234 10.2917L11.8332 14.3333L10.6665 15.5L5.99984 10.8333L1.33317 15.5Z",fill:"currentColor"})});export{l as A,o as E,i as M}; diff --git a/build/assets/Mixcloud-c4db35b7.js b/build/assets/Mixcloud-0967013d.js similarity index 95% rename from build/assets/Mixcloud-c4db35b7.js rename to build/assets/Mixcloud-0967013d.js index 42d5a51db..acb6ff916 100644 --- a/build/assets/Mixcloud-c4db35b7.js +++ b/build/assets/Mixcloud-0967013d.js @@ -1 +1 @@ -import{n as _,r as f}from"./index-a0989d63.js";import{u as m,p as g}from"./index-159c08bd.js";function v(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var P=Object.create,i=Object.defineProperty,O=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,M=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,x=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!w.call(t,o)&&o!==r&&i(t,o,{get:()=>e[o],enumerable:!(s=O(e,o))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?P(M(t)):{},c(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),S=t=>c(i({},"__esModule",{value:!0}),t),a=(t,e,r)=>(x(t,typeof e!="symbol"?e+"":e,r),r),d={};j(d,{default:()=>l});var h=S(d),u=D(f),p=m,y=g;const E="https://widget.mixcloud.com/media/js/widgetApi.js",L="Mixcloud";class l extends u.Component{constructor(){super(...arguments),a(this,"callPlayer",p.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"secondsLoaded",null),a(this,"mute",()=>{}),a(this,"unmute",()=>{}),a(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(E,L).then(r=>{this.player=r.PlayerWidget(this.iframe),this.player.ready.then(()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on((s,o)=>{this.currentTime=s,this.duration=o}),this.props.onReady()})},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:r}=this.props,s=e.match(y.MATCH_URL_MIXCLOUD)[1],o={width:"100%",height:"100%"},n=(0,p.queryString)({...r.options,feed:`/${s}/`});return u.default.createElement("iframe",{key:s,ref:this.ref,style:o,src:`https://www.mixcloud.com/widget/iframe/?${n}`,frameBorder:"0",allow:"autoplay"})}}a(l,"displayName","Mixcloud");a(l,"canPlay",y.canPlay.mixcloud);a(l,"loopOnEnded",!0);const T=_(h),N=v({__proto__:null,default:T},[h]);export{N as M}; +import{n as _,r as f}from"./index-022521cf.js";import{u as m,p as g}from"./index-4378ec35.js";function v(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var P=Object.create,i=Object.defineProperty,O=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,M=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,x=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!w.call(t,o)&&o!==r&&i(t,o,{get:()=>e[o],enumerable:!(s=O(e,o))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?P(M(t)):{},c(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),S=t=>c(i({},"__esModule",{value:!0}),t),a=(t,e,r)=>(x(t,typeof e!="symbol"?e+"":e,r),r),d={};j(d,{default:()=>l});var h=S(d),u=D(f),p=m,y=g;const E="https://widget.mixcloud.com/media/js/widgetApi.js",L="Mixcloud";class l extends u.Component{constructor(){super(...arguments),a(this,"callPlayer",p.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"secondsLoaded",null),a(this,"mute",()=>{}),a(this,"unmute",()=>{}),a(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(E,L).then(r=>{this.player=r.PlayerWidget(this.iframe),this.player.ready.then(()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on((s,o)=>{this.currentTime=s,this.duration=o}),this.props.onReady()})},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:r}=this.props,s=e.match(y.MATCH_URL_MIXCLOUD)[1],o={width:"100%",height:"100%"},n=(0,p.queryString)({...r.options,feed:`/${s}/`});return u.default.createElement("iframe",{key:s,ref:this.ref,style:o,src:`https://www.mixcloud.com/widget/iframe/?${n}`,frameBorder:"0",allow:"autoplay"})}}a(l,"displayName","Mixcloud");a(l,"canPlay",y.canPlay.mixcloud);a(l,"loopOnEnded",!0);const T=_(h),N=v({__proto__:null,default:T},[h]);export{N as M}; diff --git a/build/assets/NodeCircleIcon-2908ceb4.js b/build/assets/NodeCircleIcon-e840b41b.js similarity index 91% rename from build/assets/NodeCircleIcon-2908ceb4.js rename to build/assets/NodeCircleIcon-e840b41b.js index e0ec43d6d..84f7f65d8 100644 --- a/build/assets/NodeCircleIcon-2908ceb4.js +++ b/build/assets/NodeCircleIcon-e840b41b.js @@ -1,4 +1,4 @@ -import{o,a$ as e,aZ as r,aY as n,j as t}from"./index-a0989d63.js";import{I as i}from"./index-775b6bc6.js";const l={[e]:"RSS link",[r]:"Twitter Handle",[n]:"Youtube channel"},w="Sources Table",p="Queued Sources",d="Topics",h="View Content",u="date",T="edge_count",x="alphabetically",E="https://twitter.com",m="IS_ALIAS",g="https://www.twitter.com/anyuser/status/",I=o(i)` +import{o,a$ as e,aZ as r,aY as n,j as t}from"./index-022521cf.js";import{I as i}from"./index-586dfb7f.js";const l={[e]:"RSS link",[r]:"Twitter Handle",[n]:"Youtube channel"},w="Sources Table",p="Queued Sources",d="Topics",h="View Content",u="date",T="edge_count",x="alphabetically",E="https://twitter.com",m="IS_ALIAS",g="https://www.twitter.com/anyuser/status/",I=o(i)` && { vertical-align: middle; margin: 5px 0 0 4px; diff --git a/build/assets/PlusIcon-1147d96e.js b/build/assets/PlusIcon-6ec48130.js similarity index 94% rename from build/assets/PlusIcon-1147d96e.js rename to build/assets/PlusIcon-6ec48130.js index ce84bd64a..c47a38230 100644 --- a/build/assets/PlusIcon-1147d96e.js +++ b/build/assets/PlusIcon-6ec48130.js @@ -1 +1 @@ -import{j as s}from"./index-a0989d63.js";const t=e=>s.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 21 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("mask",{id:"mask0_3553_6463",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"21",height:"20",children:s.jsx("rect",{x:"0.5",width:"1em",height:"1em",fill:"currentColor"})}),s.jsx("g",{children:s.jsx("path",{d:"M9.87516 10.625H5.7085C5.53141 10.625 5.38298 10.5651 5.26318 10.4453C5.14339 10.3254 5.0835 10.1769 5.0835 9.99975C5.0835 9.82258 5.14339 9.67417 5.26318 9.55452C5.38298 9.43487 5.53141 9.37504 5.7085 9.37504H9.87516V5.20837C9.87516 5.03129 9.93508 4.88285 10.0549 4.76306C10.1748 4.64327 10.3233 4.58337 10.5004 4.58337C10.6776 4.58337 10.826 4.64327 10.9456 4.76306C11.0653 4.88285 11.1251 5.03129 11.1251 5.20837V9.37504H15.2918C15.4689 9.37504 15.6173 9.43496 15.7371 9.55479C15.8569 9.67464 15.9168 9.82314 15.9168 10.0003C15.9168 10.1775 15.8569 10.3259 15.7371 10.4455C15.6173 10.5652 15.4689 10.625 15.2918 10.625H11.1251V14.7917C11.1251 14.9688 11.0652 15.1172 10.9454 15.237C10.8255 15.3568 10.677 15.4167 10.4999 15.4167C10.3227 15.4167 10.1743 15.3568 10.0546 15.237C9.93499 15.1172 9.87516 14.9688 9.87516 14.7917V10.625Z",fill:"currentColor"})})]});export{t as P}; +import{j as s}from"./index-022521cf.js";const t=e=>s.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 21 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("mask",{id:"mask0_3553_6463",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"21",height:"20",children:s.jsx("rect",{x:"0.5",width:"1em",height:"1em",fill:"currentColor"})}),s.jsx("g",{children:s.jsx("path",{d:"M9.87516 10.625H5.7085C5.53141 10.625 5.38298 10.5651 5.26318 10.4453C5.14339 10.3254 5.0835 10.1769 5.0835 9.99975C5.0835 9.82258 5.14339 9.67417 5.26318 9.55452C5.38298 9.43487 5.53141 9.37504 5.7085 9.37504H9.87516V5.20837C9.87516 5.03129 9.93508 4.88285 10.0549 4.76306C10.1748 4.64327 10.3233 4.58337 10.5004 4.58337C10.6776 4.58337 10.826 4.64327 10.9456 4.76306C11.0653 4.88285 11.1251 5.03129 11.1251 5.20837V9.37504H15.2918C15.4689 9.37504 15.6173 9.43496 15.7371 9.55479C15.8569 9.67464 15.9168 9.82314 15.9168 10.0003C15.9168 10.1775 15.8569 10.3259 15.7371 10.4455C15.6173 10.5652 15.4689 10.625 15.2918 10.625H11.1251V14.7917C11.1251 14.9688 11.0652 15.1172 10.9454 15.237C10.8255 15.3568 10.677 15.4167 10.4999 15.4167C10.3227 15.4167 10.1743 15.3568 10.0546 15.237C9.93499 15.1172 9.87516 14.9688 9.87516 14.7917V10.625Z",fill:"currentColor"})})]});export{t as P}; diff --git a/build/assets/Popover-6e322384.js b/build/assets/Popover-cc3c7b26.js similarity index 99% rename from build/assets/Popover-6e322384.js rename to build/assets/Popover-cc3c7b26.js index 2f14fa9c6..f9a57c156 100644 --- a/build/assets/Popover-6e322384.js +++ b/build/assets/Popover-cc3c7b26.js @@ -1 +1 @@ -import{m as me,a as G,R as ve,b as xe,g as be,s as se,_ as g,f as Ae,r as c,u as Pe,j as A,c as ie,d as ye,h as Ze,ac as Xe}from"./index-a0989d63.js";import{w as et,x as Ve,e as ae,f as Le,t as _e,g as Be}from"./index-775b6bc6.js";import{o as q,a as fe,e as tt,u as Ee,d as nt,i as ot}from"./useSlotProps-374609c4.js";function je(...e){return e.reduce((t,r)=>r==null?t:function(...i){t.apply(this,i),r.apply(this,i)},()=>{})}function rt(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const it=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},He=it,Ue={disabled:!1};var st=function(t){return t.scrollTop},ue="unmounted",Y="exited",J="entering",re="entered",Ne="exiting",X=function(e){et(t,e);function t(o,i){var n;n=e.call(this,o,i)||this;var s=i,a=s&&!s.isMounting?o.enter:o.appear,l;return n.appearStatus=null,o.in?a?(l=Y,n.appearStatus=J):l=re:o.unmountOnExit||o.mountOnEnter?l=ue:l=Y,n.state={status:l},n.nextCallback=null,n}t.getDerivedStateFromProps=function(i,n){var s=i.in;return s&&n.status===ue?{status:Y}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var n=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==J&&s!==re&&(n=J):(s===J||s===re)&&(n=Ne)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,n,s,a;return n=s=a=i,i!=null&&typeof i!="number"&&(n=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:n,enter:s,appear:a}},r.updateStatus=function(i,n){if(i===void 0&&(i=!1),n!==null)if(this.cancelNextCallback(),n===J){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:me.findDOMNode(this);s&&st(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Y&&this.setState({status:ue})},r.performEnter=function(i){var n=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[me.findDOMNode(this),a],d=l[0],m=l[1],E=this.getTimeouts(),C=a?E.appear:E.enter;if(!i&&!s||Ue.disabled){this.safeSetState({status:re},function(){n.props.onEntered(d)});return}this.props.onEnter(d,m),this.safeSetState({status:J},function(){n.props.onEntering(d,m),n.onTransitionEnd(C,function(){n.safeSetState({status:re},function(){n.props.onEntered(d,m)})})})},r.performExit=function(){var i=this,n=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:me.findDOMNode(this);if(!n||Ue.disabled){this.safeSetState({status:Y},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Ne},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Y},function(){i.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,n){n=this.setNextCallback(n),this.setState(i,n)},r.setNextCallback=function(i){var n=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,n.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(i,n){this.setNextCallback(n);var s=this.props.nodeRef?this.props.nodeRef.current:me.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=l[0],m=l[1];this.props.addEndListener(d,m)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===ue)return null;var n=this.props,s=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var a=G(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ve.createElement(Ve.Provider,{value:null},typeof s=="function"?s(i,a):ve.cloneElement(ve.Children.only(s),a))},t}(ve.Component);X.contextType=Ve;X.propTypes={};function oe(){}X.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:oe,onEntering:oe,onEntered:oe,onExit:oe,onExiting:oe,onExited:oe};X.UNMOUNTED=ue;X.EXITED=Y;X.ENTERING=J;X.ENTERED=re;X.EXITING=Ne;const Ye=X,Je=e=>e.scrollTop;function ge(e,t){var r,o;const{timeout:i,easing:n,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof i=="number"?i:i[t.mode]||0,easing:(o=s.transitionTimingFunction)!=null?o:typeof n=="object"?n[t.mode]:n,delay:s.transitionDelay}}function at(e){return xe("MuiPaper",e)}be("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const lt=["className","component","elevation","square","variant"],ct=e=>{const{square:t,elevation:r,variant:o,classes:i}=e,n={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${r}`]};return ye(n,at,i)},ut=se("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return g({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&g({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Ae("#fff",He(t.elevation))}, ${Ae("#fff",He(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),dt=c.forwardRef(function(t,r){const o=Pe({props:t,name:"MuiPaper"}),{className:i,component:n="div",elevation:s=1,square:a=!1,variant:l="elevation"}=o,d=G(o,lt),m=g({},o,{component:n,elevation:s,square:a,variant:l}),E=ct(m);return A.jsx(ut,g({as:n,ownerState:m,className:ie(E.root,i),ref:r},d))}),ft=dt,pt=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function ht(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function mt(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function vt(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||mt(e))}function Et(e){const t=[],r=[];return Array.from(e.querySelectorAll(pt)).forEach((o,i)=>{const n=ht(o);n===-1||!vt(o)||(n===0?t.push(o):r.push({documentOrder:i,tabIndex:n,node:o}))}),r.sort((o,i)=>o.tabIndex===i.tabIndex?o.documentOrder-i.documentOrder:o.tabIndex-i.tabIndex).map(o=>o.node).concat(t)}function gt(){return!0}function xt(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:n=Et,isEnabled:s=gt,open:a}=e,l=c.useRef(!1),d=c.useRef(null),m=c.useRef(null),E=c.useRef(null),C=c.useRef(null),N=c.useRef(!1),h=c.useRef(null),S=ae(t.ref,h),y=c.useRef(null);c.useEffect(()=>{!a||!h.current||(N.current=!r)},[r,a]),c.useEffect(()=>{if(!a||!h.current)return;const u=q(h.current);return h.current.contains(u.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),N.current&&h.current.focus()),()=>{i||(E.current&&E.current.focus&&(l.current=!0,E.current.focus()),E.current=null)}},[a]),c.useEffect(()=>{if(!a||!h.current)return;const u=q(h.current),x=R=>{y.current=R,!(o||!s()||R.key!=="Tab")&&u.activeElement===h.current&&R.shiftKey&&(l.current=!0,m.current&&m.current.focus())},b=()=>{const R=h.current;if(R===null)return;if(!u.hasFocus()||!s()||l.current){l.current=!1;return}if(R.contains(u.activeElement)||o&&u.activeElement!==d.current&&u.activeElement!==m.current)return;if(u.activeElement!==C.current)C.current=null;else if(C.current!==null)return;if(!N.current)return;let D=[];if((u.activeElement===d.current||u.activeElement===m.current)&&(D=n(h.current)),D.length>0){var _,$;const H=!!((_=y.current)!=null&&_.shiftKey&&(($=y.current)==null?void 0:$.key)==="Tab"),O=D[0],L=D[D.length-1];typeof O!="string"&&typeof L!="string"&&(H?L.focus():O.focus())}else R.focus()};u.addEventListener("focusin",b),u.addEventListener("keydown",x,!0);const M=setInterval(()=>{u.activeElement&&u.activeElement.tagName==="BODY"&&b()},50);return()=>{clearInterval(M),u.removeEventListener("focusin",b),u.removeEventListener("keydown",x,!0)}},[r,o,i,s,a,n]);const k=u=>{E.current===null&&(E.current=u.relatedTarget),N.current=!0,C.current=u.target;const x=t.props.onFocus;x&&x(u)},I=u=>{E.current===null&&(E.current=u.relatedTarget),N.current=!0};return A.jsxs(c.Fragment,{children:[A.jsx("div",{tabIndex:a?0:-1,onFocus:I,ref:d,"data-testid":"sentinelStart"}),c.cloneElement(t,{ref:S,onFocus:k}),A.jsx("div",{tabIndex:a?0:-1,onFocus:I,ref:m,"data-testid":"sentinelEnd"})]})}function bt(e){return typeof e=="function"?e():e}const Pt=c.forwardRef(function(t,r){const{children:o,container:i,disablePortal:n=!1}=t,[s,a]=c.useState(null),l=ae(c.isValidElement(o)?o.ref:null,r);if(Le(()=>{n||a(bt(i)||document.body)},[i,n]),Le(()=>{if(s&&!n)return _e(r,s),()=>{_e(r,null)}},[r,s,n]),n){if(c.isValidElement(o)){const d={ref:l};return c.cloneElement(o,d)}return A.jsx(c.Fragment,{children:o})}return A.jsx(c.Fragment,{children:s&&Ze.createPortal(o,s)})});function yt(e){const t=q(e);return t.body===e?fe(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function de(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function We(e){return parseInt(fe(e).getComputedStyle(e).paddingRight,10)||0}function Tt(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||o}function ze(e,t,r,o,i){const n=[t,r,...o];[].forEach.call(e.children,s=>{const a=n.indexOf(s)===-1,l=!Tt(s);a&&l&&de(s,i)})}function ke(e,t){let r=-1;return e.some((o,i)=>t(o)?(r=i,!0):!1),r}function Rt(e,t){const r=[],o=e.container;if(!t.disableScrollLock){if(yt(o)){const s=rt(q(o));r.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${We(o)+s}px`;const a=q(o).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${We(l)+s}px`})}let n;if(o.parentNode instanceof DocumentFragment)n=q(o).body;else{const s=o.parentElement,a=fe(o);n=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:o}r.push({value:n.style.overflow,property:"overflow",el:n},{value:n.style.overflowX,property:"overflow-x",el:n},{value:n.style.overflowY,property:"overflow-y",el:n}),n.style.overflow="hidden"}return()=>{r.forEach(({value:n,el:s,property:a})=>{n?s.style.setProperty(a,n):s.style.removeProperty(a)})}}function kt(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class St{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&de(t.modalRef,!1);const i=kt(r);ze(r,t.mount,t.modalRef,i,!0);const n=ke(this.containers,s=>s.container===r);return n!==-1?(this.containers[n].modals.push(t),o):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:i}),o)}mount(t,r){const o=ke(this.containers,n=>n.modals.indexOf(t)!==-1),i=this.containers[o];i.restore||(i.restore=Rt(i,r))}remove(t,r=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const i=ke(this.containers,s=>s.modals.indexOf(t)!==-1),n=this.containers[i];if(n.modals.splice(n.modals.indexOf(t),1),this.modals.splice(o,1),n.modals.length===0)n.restore&&n.restore(),t.modalRef&&de(t.modalRef,r),ze(n.container,t.mount,t.modalRef,n.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=n.modals[n.modals.length-1];s.modalRef&&de(s.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Ct(e){return typeof e=="function"?e():e}function Nt(e){return e?e.props.hasOwnProperty("in"):!1}const Mt=new St;function wt(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:o=!1,manager:i=Mt,closeAfterTransition:n=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:d,open:m,rootRef:E}=e,C=c.useRef({}),N=c.useRef(null),h=c.useRef(null),S=ae(h,E),[y,k]=c.useState(!m),I=Nt(l);let u=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(u=!1);const x=()=>q(N.current),b=()=>(C.current.modalRef=h.current,C.current.mount=N.current,C.current),M=()=>{i.mount(b(),{disableScrollLock:o}),h.current&&(h.current.scrollTop=0)},R=Be(()=>{const p=Ct(t)||x().body;i.add(b(),p),h.current&&M()}),D=c.useCallback(()=>i.isTopModal(b()),[i]),_=Be(p=>{N.current=p,p&&(m&&D()?M():h.current&&de(h.current,u))}),$=c.useCallback(()=>{i.remove(b(),u)},[u,i]);c.useEffect(()=>()=>{$()},[$]),c.useEffect(()=>{m?R():(!I||!n)&&$()},[m,$,I,n,R]);const H=p=>v=>{var F;(F=p.onKeyDown)==null||F.call(p,v),!(v.key!=="Escape"||v.which===229||!D())&&(r||(v.stopPropagation(),d&&d(v,"escapeKeyDown")))},O=p=>v=>{var F;(F=p.onClick)==null||F.call(p,v),v.target===v.currentTarget&&d&&d(v,"backdropClick")};return{getRootProps:(p={})=>{const v=tt(e);delete v.onTransitionEnter,delete v.onTransitionExited;const F=g({},v,p);return g({role:"presentation"},F,{onKeyDown:H(F),ref:S})},getBackdropProps:(p={})=>{const v=p;return g({"aria-hidden":!0},v,{onClick:O(v),open:m})},getTransitionProps:()=>{const p=()=>{k(!1),s&&s()},v=()=>{k(!0),a&&a(),n&&$()};return{onEnter:je(p,l==null?void 0:l.props.onEnter),onExited:je(v,l==null?void 0:l.props.onExited)}},rootRef:S,portalRef:_,isTopModal:D,exited:y,hasTransition:I}}const Ot=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],It={entering:{opacity:1},entered:{opacity:1}},Dt=c.forwardRef(function(t,r){const o=Xe(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:n,appear:s=!0,children:a,easing:l,in:d,onEnter:m,onEntered:E,onEntering:C,onExit:N,onExited:h,onExiting:S,style:y,timeout:k=i,TransitionComponent:I=Ye}=t,u=G(t,Ot),x=c.useRef(null),b=ae(x,a.ref,r),M=T=>f=>{if(T){const p=x.current;f===void 0?T(p):T(p,f)}},R=M(C),D=M((T,f)=>{Je(T);const p=ge({style:y,timeout:k,easing:l},{mode:"enter"});T.style.webkitTransition=o.transitions.create("opacity",p),T.style.transition=o.transitions.create("opacity",p),m&&m(T,f)}),_=M(E),$=M(S),H=M(T=>{const f=ge({style:y,timeout:k,easing:l},{mode:"exit"});T.style.webkitTransition=o.transitions.create("opacity",f),T.style.transition=o.transitions.create("opacity",f),N&&N(T)}),O=M(h),L=T=>{n&&n(x.current,T)};return A.jsx(I,g({appear:s,in:d,nodeRef:x,onEnter:D,onEntered:_,onEntering:R,onExit:H,onExited:O,onExiting:$,addEndListener:L,timeout:k},u,{children:(T,f)=>c.cloneElement(a,g({style:g({opacity:0,visibility:T==="exited"&&!d?"hidden":void 0},It[T],y,a.props.style),ref:b},f))}))}),$t=Dt;function Ft(e){return xe("MuiBackdrop",e)}be("MuiBackdrop",["root","invisible"]);const At=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Lt=e=>{const{classes:t,invisible:r}=e;return ye({root:["root",r&&"invisible"]},Ft,t)},_t=se("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>g({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Bt=c.forwardRef(function(t,r){var o,i,n;const s=Pe({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:d="div",components:m={},componentsProps:E={},invisible:C=!1,open:N,slotProps:h={},slots:S={},TransitionComponent:y=$t,transitionDuration:k}=s,I=G(s,At),u=g({},s,{component:d,invisible:C}),x=Lt(u),b=(o=h.root)!=null?o:E.root;return A.jsx(y,g({in:N,timeout:k},I,{children:A.jsx(_t,g({"aria-hidden":!0},b,{as:(i=(n=S.root)!=null?n:m.Root)!=null?i:d,className:ie(x.root,l,b==null?void 0:b.className),ownerState:g({},u,b==null?void 0:b.ownerState),classes:x,ref:r,children:a}))}))}),jt=Bt;function Ht(e){return xe("MuiModal",e)}be("MuiModal",["root","hidden","backdrop"]);const Ut=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Wt=e=>{const{open:t,exited:r,classes:o}=e;return ye({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},Ht,o)},zt=se("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>g({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Kt=se(jt,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Gt=c.forwardRef(function(t,r){var o,i,n,s,a,l;const d=Pe({name:"MuiModal",props:t}),{BackdropComponent:m=Kt,BackdropProps:E,className:C,closeAfterTransition:N=!1,children:h,container:S,component:y,components:k={},componentsProps:I={},disableAutoFocus:u=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:b=!1,disablePortal:M=!1,disableRestoreFocus:R=!1,disableScrollLock:D=!1,hideBackdrop:_=!1,keepMounted:$=!1,onBackdropClick:H,open:O,slotProps:L,slots:T}=d,f=G(d,Ut),p=g({},d,{closeAfterTransition:N,disableAutoFocus:u,disableEnforceFocus:x,disableEscapeKeyDown:b,disablePortal:M,disableRestoreFocus:R,disableScrollLock:D,hideBackdrop:_,keepMounted:$}),{getRootProps:v,getBackdropProps:F,getTransitionProps:B,portalRef:z,isTopModal:pe,exited:U,hasTransition:he}=wt(g({},p,{rootRef:r})),V=g({},p,{exited:U}),K=Wt(V),Q={};if(h.props.tabIndex===void 0&&(Q.tabIndex="-1"),he){const{onEnter:P,onExited:w}=B();Q.onEnter=P,Q.onExited=w}const Z=(o=(i=T==null?void 0:T.root)!=null?i:k.Root)!=null?o:zt,le=(n=(s=T==null?void 0:T.backdrop)!=null?s:k.Backdrop)!=null?n:m,ce=(a=L==null?void 0:L.root)!=null?a:I.root,ee=(l=L==null?void 0:L.backdrop)!=null?l:I.backdrop,Te=Ee({elementType:Z,externalSlotProps:ce,externalForwardedProps:f,getSlotProps:v,additionalProps:{ref:r,as:y},ownerState:V,className:ie(C,ce==null?void 0:ce.className,K==null?void 0:K.root,!V.open&&V.exited&&(K==null?void 0:K.hidden))}),Re=Ee({elementType:le,externalSlotProps:ee,additionalProps:E,getSlotProps:P=>F(g({},P,{onClick:w=>{H&&H(w),P!=null&&P.onClick&&P.onClick(w)}})),className:ie(ee==null?void 0:ee.className,E==null?void 0:E.className,K==null?void 0:K.backdrop),ownerState:V});return!$&&!O&&(!he||U)?null:A.jsx(Pt,{ref:z,container:S,disablePortal:M,children:A.jsxs(Z,g({},Te,{children:[!_&&m?A.jsx(le,g({},Re)):null,A.jsx(xt,{disableEnforceFocus:x,disableAutoFocus:u,disableRestoreFocus:R,isEnabled:pe,open:O,children:c.cloneElement(h,Q)})]}))})}),qt=Gt,Xt=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Me(e){return`scale(${e}, ${e**2})`}const Vt={entering:{opacity:1,transform:Me(1)},entered:{opacity:1,transform:"none"}},Se=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Qe=c.forwardRef(function(t,r){const{addEndListener:o,appear:i=!0,children:n,easing:s,in:a,onEnter:l,onEntered:d,onEntering:m,onExit:E,onExited:C,onExiting:N,style:h,timeout:S="auto",TransitionComponent:y=Ye}=t,k=G(t,Xt),I=c.useRef(),u=c.useRef(),x=Xe(),b=c.useRef(null),M=ae(b,n.ref,r),R=f=>p=>{if(f){const v=b.current;p===void 0?f(v):f(v,p)}},D=R(m),_=R((f,p)=>{Je(f);const{duration:v,delay:F,easing:B}=ge({style:h,timeout:S,easing:s},{mode:"enter"});let z;S==="auto"?(z=x.transitions.getAutoHeightDuration(f.clientHeight),u.current=z):z=v,f.style.transition=[x.transitions.create("opacity",{duration:z,delay:F}),x.transitions.create("transform",{duration:Se?z:z*.666,delay:F,easing:B})].join(","),l&&l(f,p)}),$=R(d),H=R(N),O=R(f=>{const{duration:p,delay:v,easing:F}=ge({style:h,timeout:S,easing:s},{mode:"exit"});let B;S==="auto"?(B=x.transitions.getAutoHeightDuration(f.clientHeight),u.current=B):B=p,f.style.transition=[x.transitions.create("opacity",{duration:B,delay:v}),x.transitions.create("transform",{duration:Se?B:B*.666,delay:Se?v:v||B*.333,easing:F})].join(","),f.style.opacity=0,f.style.transform=Me(.75),E&&E(f)}),L=R(C),T=f=>{S==="auto"&&(I.current=setTimeout(f,u.current||0)),o&&o(b.current,f)};return c.useEffect(()=>()=>{clearTimeout(I.current)},[]),A.jsx(y,g({appear:i,in:a,nodeRef:b,onEnter:_,onEntered:$,onEntering:D,onExit:O,onExited:L,onExiting:H,addEndListener:T,timeout:S==="auto"?null:S},k,{children:(f,p)=>c.cloneElement(n,g({style:g({opacity:0,transform:Me(.75),visibility:f==="exited"&&!a?"hidden":void 0},Vt[f],h,n.props.style),ref:M},p))}))});Qe.muiSupportAuto=!0;const Yt=Qe;function Jt(e){return xe("MuiPopover",e)}be("MuiPopover",["root","paper"]);const Qt=["onEntering"],Zt=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],en=["slotProps"];function Ke(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function Ge(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function qe(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Ce(e){return typeof e=="function"?e():e}const tn=e=>{const{classes:t}=e;return ye({root:["root"],paper:["paper"]},Jt,t)},nn=se(qt,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),on=se(ft,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),rn=c.forwardRef(function(t,r){var o,i,n;const s=Pe({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:m,anchorReference:E="anchorEl",children:C,className:N,container:h,elevation:S=8,marginThreshold:y=16,open:k,PaperProps:I={},slots:u,slotProps:x,transformOrigin:b={vertical:"top",horizontal:"left"},TransitionComponent:M=Yt,transitionDuration:R="auto",TransitionProps:{onEntering:D}={},disableScrollLock:_=!1}=s,$=G(s.TransitionProps,Qt),H=G(s,Zt),O=(o=x==null?void 0:x.paper)!=null?o:I,L=c.useRef(),T=ae(L,O.ref),f=g({},s,{anchorOrigin:d,anchorReference:E,elevation:S,marginThreshold:y,externalPaperSlotProps:O,transformOrigin:b,TransitionComponent:M,transitionDuration:R,TransitionProps:$}),p=tn(f),v=c.useCallback(()=>{if(E==="anchorPosition")return m;const P=Ce(l),j=(P&&P.nodeType===1?P:q(L.current).body).getBoundingClientRect();return{top:j.top+Ke(j,d.vertical),left:j.left+Ge(j,d.horizontal)}},[l,d.horizontal,d.vertical,m,E]),F=c.useCallback(P=>({vertical:Ke(P,b.vertical),horizontal:Ge(P,b.horizontal)}),[b.horizontal,b.vertical]),B=c.useCallback(P=>{const w={width:P.offsetWidth,height:P.offsetHeight},j=F(w);if(E==="none")return{top:null,left:null,transformOrigin:qe(j)};const we=v();let te=we.top-j.vertical,ne=we.left-j.horizontal;const Oe=te+w.height,Ie=ne+w.width,De=fe(Ce(l)),$e=De.innerHeight-y,Fe=De.innerWidth-y;if(y!==null&&te$e){const W=Oe-$e;te-=W,j.vertical+=W}if(y!==null&&neFe){const W=Ie-Fe;ne-=W,j.horizontal+=W}return{top:`${Math.round(te)}px`,left:`${Math.round(ne)}px`,transformOrigin:qe(j)}},[l,E,v,F,y]),[z,pe]=c.useState(k),U=c.useCallback(()=>{const P=L.current;if(!P)return;const w=B(P);w.top!==null&&(P.style.top=w.top),w.left!==null&&(P.style.left=w.left),P.style.transformOrigin=w.transformOrigin,pe(!0)},[B]);c.useEffect(()=>(_&&window.addEventListener("scroll",U),()=>window.removeEventListener("scroll",U)),[l,_,U]);const he=(P,w)=>{D&&D(P,w),U()},V=()=>{pe(!1)};c.useEffect(()=>{k&&U()}),c.useImperativeHandle(a,()=>k?{updatePosition:()=>{U()}}:null,[k,U]),c.useEffect(()=>{if(!k)return;const P=nt(()=>{U()}),w=fe(l);return w.addEventListener("resize",P),()=>{P.clear(),w.removeEventListener("resize",P)}},[l,k,U]);let K=R;R==="auto"&&!M.muiSupportAuto&&(K=void 0);const Q=h||(l?q(Ce(l)).body:void 0),Z=(i=u==null?void 0:u.root)!=null?i:nn,le=(n=u==null?void 0:u.paper)!=null?n:on,ce=Ee({elementType:le,externalSlotProps:g({},O,{style:z?O.style:g({},O.style,{opacity:0})}),additionalProps:{elevation:S,ref:T},ownerState:f,className:ie(p.paper,O==null?void 0:O.className)}),ee=Ee({elementType:Z,externalSlotProps:(x==null?void 0:x.root)||{},externalForwardedProps:H,additionalProps:{ref:r,slotProps:{backdrop:{invisible:!0}},container:Q,open:k},ownerState:f,className:ie(p.root,N)}),{slotProps:Te}=ee,Re=G(ee,en);return A.jsx(Z,g({},Re,!ot(Z)&&{slotProps:Te,disableScrollLock:_},{children:A.jsx(M,g({appear:!0,in:k,onEntering:he,onExited:V,timeout:K},$,{children:A.jsx(le,g({},ce,{children:C}))}))}))}),cn=rn;export{cn as P,Ye as T,ft as a,rt as b,on as c,Pt as d,ge as g,Je as r}; +import{m as me,a as G,R as ve,b as xe,g as be,s as se,_ as g,f as Ae,r as c,u as Pe,j as A,c as ie,d as ye,h as Ze,ac as Xe}from"./index-022521cf.js";import{w as et,x as Ve,e as ae,f as Le,t as _e,g as Be}from"./index-586dfb7f.js";import{o as q,a as fe,e as tt,u as Ee,d as nt,i as ot}from"./useSlotProps-51fc8b9f.js";function je(...e){return e.reduce((t,r)=>r==null?t:function(...i){t.apply(this,i),r.apply(this,i)},()=>{})}function rt(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const it=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},He=it,Ue={disabled:!1};var st=function(t){return t.scrollTop},ue="unmounted",Y="exited",J="entering",re="entered",Ne="exiting",X=function(e){et(t,e);function t(o,i){var n;n=e.call(this,o,i)||this;var s=i,a=s&&!s.isMounting?o.enter:o.appear,l;return n.appearStatus=null,o.in?a?(l=Y,n.appearStatus=J):l=re:o.unmountOnExit||o.mountOnEnter?l=ue:l=Y,n.state={status:l},n.nextCallback=null,n}t.getDerivedStateFromProps=function(i,n){var s=i.in;return s&&n.status===ue?{status:Y}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var n=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==J&&s!==re&&(n=J):(s===J||s===re)&&(n=Ne)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,n,s,a;return n=s=a=i,i!=null&&typeof i!="number"&&(n=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:n,enter:s,appear:a}},r.updateStatus=function(i,n){if(i===void 0&&(i=!1),n!==null)if(this.cancelNextCallback(),n===J){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:me.findDOMNode(this);s&&st(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Y&&this.setState({status:ue})},r.performEnter=function(i){var n=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[me.findDOMNode(this),a],d=l[0],m=l[1],E=this.getTimeouts(),C=a?E.appear:E.enter;if(!i&&!s||Ue.disabled){this.safeSetState({status:re},function(){n.props.onEntered(d)});return}this.props.onEnter(d,m),this.safeSetState({status:J},function(){n.props.onEntering(d,m),n.onTransitionEnd(C,function(){n.safeSetState({status:re},function(){n.props.onEntered(d,m)})})})},r.performExit=function(){var i=this,n=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:me.findDOMNode(this);if(!n||Ue.disabled){this.safeSetState({status:Y},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Ne},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Y},function(){i.props.onExited(a)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,n){n=this.setNextCallback(n),this.setState(i,n)},r.setNextCallback=function(i){var n=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,n.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(i,n){this.setNextCallback(n);var s=this.props.nodeRef?this.props.nodeRef.current:me.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=l[0],m=l[1];this.props.addEndListener(d,m)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===ue)return null;var n=this.props,s=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var a=G(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ve.createElement(Ve.Provider,{value:null},typeof s=="function"?s(i,a):ve.cloneElement(ve.Children.only(s),a))},t}(ve.Component);X.contextType=Ve;X.propTypes={};function oe(){}X.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:oe,onEntering:oe,onEntered:oe,onExit:oe,onExiting:oe,onExited:oe};X.UNMOUNTED=ue;X.EXITED=Y;X.ENTERING=J;X.ENTERED=re;X.EXITING=Ne;const Ye=X,Je=e=>e.scrollTop;function ge(e,t){var r,o;const{timeout:i,easing:n,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof i=="number"?i:i[t.mode]||0,easing:(o=s.transitionTimingFunction)!=null?o:typeof n=="object"?n[t.mode]:n,delay:s.transitionDelay}}function at(e){return xe("MuiPaper",e)}be("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const lt=["className","component","elevation","square","variant"],ct=e=>{const{square:t,elevation:r,variant:o,classes:i}=e,n={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${r}`]};return ye(n,at,i)},ut=se("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return g({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&g({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Ae("#fff",He(t.elevation))}, ${Ae("#fff",He(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),dt=c.forwardRef(function(t,r){const o=Pe({props:t,name:"MuiPaper"}),{className:i,component:n="div",elevation:s=1,square:a=!1,variant:l="elevation"}=o,d=G(o,lt),m=g({},o,{component:n,elevation:s,square:a,variant:l}),E=ct(m);return A.jsx(ut,g({as:n,ownerState:m,className:ie(E.root,i),ref:r},d))}),ft=dt,pt=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function ht(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function mt(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function vt(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||mt(e))}function Et(e){const t=[],r=[];return Array.from(e.querySelectorAll(pt)).forEach((o,i)=>{const n=ht(o);n===-1||!vt(o)||(n===0?t.push(o):r.push({documentOrder:i,tabIndex:n,node:o}))}),r.sort((o,i)=>o.tabIndex===i.tabIndex?o.documentOrder-i.documentOrder:o.tabIndex-i.tabIndex).map(o=>o.node).concat(t)}function gt(){return!0}function xt(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:n=Et,isEnabled:s=gt,open:a}=e,l=c.useRef(!1),d=c.useRef(null),m=c.useRef(null),E=c.useRef(null),C=c.useRef(null),N=c.useRef(!1),h=c.useRef(null),S=ae(t.ref,h),y=c.useRef(null);c.useEffect(()=>{!a||!h.current||(N.current=!r)},[r,a]),c.useEffect(()=>{if(!a||!h.current)return;const u=q(h.current);return h.current.contains(u.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),N.current&&h.current.focus()),()=>{i||(E.current&&E.current.focus&&(l.current=!0,E.current.focus()),E.current=null)}},[a]),c.useEffect(()=>{if(!a||!h.current)return;const u=q(h.current),x=R=>{y.current=R,!(o||!s()||R.key!=="Tab")&&u.activeElement===h.current&&R.shiftKey&&(l.current=!0,m.current&&m.current.focus())},b=()=>{const R=h.current;if(R===null)return;if(!u.hasFocus()||!s()||l.current){l.current=!1;return}if(R.contains(u.activeElement)||o&&u.activeElement!==d.current&&u.activeElement!==m.current)return;if(u.activeElement!==C.current)C.current=null;else if(C.current!==null)return;if(!N.current)return;let D=[];if((u.activeElement===d.current||u.activeElement===m.current)&&(D=n(h.current)),D.length>0){var _,$;const H=!!((_=y.current)!=null&&_.shiftKey&&(($=y.current)==null?void 0:$.key)==="Tab"),O=D[0],L=D[D.length-1];typeof O!="string"&&typeof L!="string"&&(H?L.focus():O.focus())}else R.focus()};u.addEventListener("focusin",b),u.addEventListener("keydown",x,!0);const M=setInterval(()=>{u.activeElement&&u.activeElement.tagName==="BODY"&&b()},50);return()=>{clearInterval(M),u.removeEventListener("focusin",b),u.removeEventListener("keydown",x,!0)}},[r,o,i,s,a,n]);const k=u=>{E.current===null&&(E.current=u.relatedTarget),N.current=!0,C.current=u.target;const x=t.props.onFocus;x&&x(u)},I=u=>{E.current===null&&(E.current=u.relatedTarget),N.current=!0};return A.jsxs(c.Fragment,{children:[A.jsx("div",{tabIndex:a?0:-1,onFocus:I,ref:d,"data-testid":"sentinelStart"}),c.cloneElement(t,{ref:S,onFocus:k}),A.jsx("div",{tabIndex:a?0:-1,onFocus:I,ref:m,"data-testid":"sentinelEnd"})]})}function bt(e){return typeof e=="function"?e():e}const Pt=c.forwardRef(function(t,r){const{children:o,container:i,disablePortal:n=!1}=t,[s,a]=c.useState(null),l=ae(c.isValidElement(o)?o.ref:null,r);if(Le(()=>{n||a(bt(i)||document.body)},[i,n]),Le(()=>{if(s&&!n)return _e(r,s),()=>{_e(r,null)}},[r,s,n]),n){if(c.isValidElement(o)){const d={ref:l};return c.cloneElement(o,d)}return A.jsx(c.Fragment,{children:o})}return A.jsx(c.Fragment,{children:s&&Ze.createPortal(o,s)})});function yt(e){const t=q(e);return t.body===e?fe(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function de(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function We(e){return parseInt(fe(e).getComputedStyle(e).paddingRight,10)||0}function Tt(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||o}function ze(e,t,r,o,i){const n=[t,r,...o];[].forEach.call(e.children,s=>{const a=n.indexOf(s)===-1,l=!Tt(s);a&&l&&de(s,i)})}function ke(e,t){let r=-1;return e.some((o,i)=>t(o)?(r=i,!0):!1),r}function Rt(e,t){const r=[],o=e.container;if(!t.disableScrollLock){if(yt(o)){const s=rt(q(o));r.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${We(o)+s}px`;const a=q(o).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${We(l)+s}px`})}let n;if(o.parentNode instanceof DocumentFragment)n=q(o).body;else{const s=o.parentElement,a=fe(o);n=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:o}r.push({value:n.style.overflow,property:"overflow",el:n},{value:n.style.overflowX,property:"overflow-x",el:n},{value:n.style.overflowY,property:"overflow-y",el:n}),n.style.overflow="hidden"}return()=>{r.forEach(({value:n,el:s,property:a})=>{n?s.style.setProperty(a,n):s.style.removeProperty(a)})}}function kt(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class St{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&de(t.modalRef,!1);const i=kt(r);ze(r,t.mount,t.modalRef,i,!0);const n=ke(this.containers,s=>s.container===r);return n!==-1?(this.containers[n].modals.push(t),o):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:i}),o)}mount(t,r){const o=ke(this.containers,n=>n.modals.indexOf(t)!==-1),i=this.containers[o];i.restore||(i.restore=Rt(i,r))}remove(t,r=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const i=ke(this.containers,s=>s.modals.indexOf(t)!==-1),n=this.containers[i];if(n.modals.splice(n.modals.indexOf(t),1),this.modals.splice(o,1),n.modals.length===0)n.restore&&n.restore(),t.modalRef&&de(t.modalRef,r),ze(n.container,t.mount,t.modalRef,n.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=n.modals[n.modals.length-1];s.modalRef&&de(s.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Ct(e){return typeof e=="function"?e():e}function Nt(e){return e?e.props.hasOwnProperty("in"):!1}const Mt=new St;function wt(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:o=!1,manager:i=Mt,closeAfterTransition:n=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:d,open:m,rootRef:E}=e,C=c.useRef({}),N=c.useRef(null),h=c.useRef(null),S=ae(h,E),[y,k]=c.useState(!m),I=Nt(l);let u=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(u=!1);const x=()=>q(N.current),b=()=>(C.current.modalRef=h.current,C.current.mount=N.current,C.current),M=()=>{i.mount(b(),{disableScrollLock:o}),h.current&&(h.current.scrollTop=0)},R=Be(()=>{const p=Ct(t)||x().body;i.add(b(),p),h.current&&M()}),D=c.useCallback(()=>i.isTopModal(b()),[i]),_=Be(p=>{N.current=p,p&&(m&&D()?M():h.current&&de(h.current,u))}),$=c.useCallback(()=>{i.remove(b(),u)},[u,i]);c.useEffect(()=>()=>{$()},[$]),c.useEffect(()=>{m?R():(!I||!n)&&$()},[m,$,I,n,R]);const H=p=>v=>{var F;(F=p.onKeyDown)==null||F.call(p,v),!(v.key!=="Escape"||v.which===229||!D())&&(r||(v.stopPropagation(),d&&d(v,"escapeKeyDown")))},O=p=>v=>{var F;(F=p.onClick)==null||F.call(p,v),v.target===v.currentTarget&&d&&d(v,"backdropClick")};return{getRootProps:(p={})=>{const v=tt(e);delete v.onTransitionEnter,delete v.onTransitionExited;const F=g({},v,p);return g({role:"presentation"},F,{onKeyDown:H(F),ref:S})},getBackdropProps:(p={})=>{const v=p;return g({"aria-hidden":!0},v,{onClick:O(v),open:m})},getTransitionProps:()=>{const p=()=>{k(!1),s&&s()},v=()=>{k(!0),a&&a(),n&&$()};return{onEnter:je(p,l==null?void 0:l.props.onEnter),onExited:je(v,l==null?void 0:l.props.onExited)}},rootRef:S,portalRef:_,isTopModal:D,exited:y,hasTransition:I}}const Ot=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],It={entering:{opacity:1},entered:{opacity:1}},Dt=c.forwardRef(function(t,r){const o=Xe(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:n,appear:s=!0,children:a,easing:l,in:d,onEnter:m,onEntered:E,onEntering:C,onExit:N,onExited:h,onExiting:S,style:y,timeout:k=i,TransitionComponent:I=Ye}=t,u=G(t,Ot),x=c.useRef(null),b=ae(x,a.ref,r),M=T=>f=>{if(T){const p=x.current;f===void 0?T(p):T(p,f)}},R=M(C),D=M((T,f)=>{Je(T);const p=ge({style:y,timeout:k,easing:l},{mode:"enter"});T.style.webkitTransition=o.transitions.create("opacity",p),T.style.transition=o.transitions.create("opacity",p),m&&m(T,f)}),_=M(E),$=M(S),H=M(T=>{const f=ge({style:y,timeout:k,easing:l},{mode:"exit"});T.style.webkitTransition=o.transitions.create("opacity",f),T.style.transition=o.transitions.create("opacity",f),N&&N(T)}),O=M(h),L=T=>{n&&n(x.current,T)};return A.jsx(I,g({appear:s,in:d,nodeRef:x,onEnter:D,onEntered:_,onEntering:R,onExit:H,onExited:O,onExiting:$,addEndListener:L,timeout:k},u,{children:(T,f)=>c.cloneElement(a,g({style:g({opacity:0,visibility:T==="exited"&&!d?"hidden":void 0},It[T],y,a.props.style),ref:b},f))}))}),$t=Dt;function Ft(e){return xe("MuiBackdrop",e)}be("MuiBackdrop",["root","invisible"]);const At=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Lt=e=>{const{classes:t,invisible:r}=e;return ye({root:["root",r&&"invisible"]},Ft,t)},_t=se("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>g({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Bt=c.forwardRef(function(t,r){var o,i,n;const s=Pe({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:d="div",components:m={},componentsProps:E={},invisible:C=!1,open:N,slotProps:h={},slots:S={},TransitionComponent:y=$t,transitionDuration:k}=s,I=G(s,At),u=g({},s,{component:d,invisible:C}),x=Lt(u),b=(o=h.root)!=null?o:E.root;return A.jsx(y,g({in:N,timeout:k},I,{children:A.jsx(_t,g({"aria-hidden":!0},b,{as:(i=(n=S.root)!=null?n:m.Root)!=null?i:d,className:ie(x.root,l,b==null?void 0:b.className),ownerState:g({},u,b==null?void 0:b.ownerState),classes:x,ref:r,children:a}))}))}),jt=Bt;function Ht(e){return xe("MuiModal",e)}be("MuiModal",["root","hidden","backdrop"]);const Ut=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Wt=e=>{const{open:t,exited:r,classes:o}=e;return ye({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},Ht,o)},zt=se("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>g({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Kt=se(jt,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Gt=c.forwardRef(function(t,r){var o,i,n,s,a,l;const d=Pe({name:"MuiModal",props:t}),{BackdropComponent:m=Kt,BackdropProps:E,className:C,closeAfterTransition:N=!1,children:h,container:S,component:y,components:k={},componentsProps:I={},disableAutoFocus:u=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:b=!1,disablePortal:M=!1,disableRestoreFocus:R=!1,disableScrollLock:D=!1,hideBackdrop:_=!1,keepMounted:$=!1,onBackdropClick:H,open:O,slotProps:L,slots:T}=d,f=G(d,Ut),p=g({},d,{closeAfterTransition:N,disableAutoFocus:u,disableEnforceFocus:x,disableEscapeKeyDown:b,disablePortal:M,disableRestoreFocus:R,disableScrollLock:D,hideBackdrop:_,keepMounted:$}),{getRootProps:v,getBackdropProps:F,getTransitionProps:B,portalRef:z,isTopModal:pe,exited:U,hasTransition:he}=wt(g({},p,{rootRef:r})),V=g({},p,{exited:U}),K=Wt(V),Q={};if(h.props.tabIndex===void 0&&(Q.tabIndex="-1"),he){const{onEnter:P,onExited:w}=B();Q.onEnter=P,Q.onExited=w}const Z=(o=(i=T==null?void 0:T.root)!=null?i:k.Root)!=null?o:zt,le=(n=(s=T==null?void 0:T.backdrop)!=null?s:k.Backdrop)!=null?n:m,ce=(a=L==null?void 0:L.root)!=null?a:I.root,ee=(l=L==null?void 0:L.backdrop)!=null?l:I.backdrop,Te=Ee({elementType:Z,externalSlotProps:ce,externalForwardedProps:f,getSlotProps:v,additionalProps:{ref:r,as:y},ownerState:V,className:ie(C,ce==null?void 0:ce.className,K==null?void 0:K.root,!V.open&&V.exited&&(K==null?void 0:K.hidden))}),Re=Ee({elementType:le,externalSlotProps:ee,additionalProps:E,getSlotProps:P=>F(g({},P,{onClick:w=>{H&&H(w),P!=null&&P.onClick&&P.onClick(w)}})),className:ie(ee==null?void 0:ee.className,E==null?void 0:E.className,K==null?void 0:K.backdrop),ownerState:V});return!$&&!O&&(!he||U)?null:A.jsx(Pt,{ref:z,container:S,disablePortal:M,children:A.jsxs(Z,g({},Te,{children:[!_&&m?A.jsx(le,g({},Re)):null,A.jsx(xt,{disableEnforceFocus:x,disableAutoFocus:u,disableRestoreFocus:R,isEnabled:pe,open:O,children:c.cloneElement(h,Q)})]}))})}),qt=Gt,Xt=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Me(e){return`scale(${e}, ${e**2})`}const Vt={entering:{opacity:1,transform:Me(1)},entered:{opacity:1,transform:"none"}},Se=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Qe=c.forwardRef(function(t,r){const{addEndListener:o,appear:i=!0,children:n,easing:s,in:a,onEnter:l,onEntered:d,onEntering:m,onExit:E,onExited:C,onExiting:N,style:h,timeout:S="auto",TransitionComponent:y=Ye}=t,k=G(t,Xt),I=c.useRef(),u=c.useRef(),x=Xe(),b=c.useRef(null),M=ae(b,n.ref,r),R=f=>p=>{if(f){const v=b.current;p===void 0?f(v):f(v,p)}},D=R(m),_=R((f,p)=>{Je(f);const{duration:v,delay:F,easing:B}=ge({style:h,timeout:S,easing:s},{mode:"enter"});let z;S==="auto"?(z=x.transitions.getAutoHeightDuration(f.clientHeight),u.current=z):z=v,f.style.transition=[x.transitions.create("opacity",{duration:z,delay:F}),x.transitions.create("transform",{duration:Se?z:z*.666,delay:F,easing:B})].join(","),l&&l(f,p)}),$=R(d),H=R(N),O=R(f=>{const{duration:p,delay:v,easing:F}=ge({style:h,timeout:S,easing:s},{mode:"exit"});let B;S==="auto"?(B=x.transitions.getAutoHeightDuration(f.clientHeight),u.current=B):B=p,f.style.transition=[x.transitions.create("opacity",{duration:B,delay:v}),x.transitions.create("transform",{duration:Se?B:B*.666,delay:Se?v:v||B*.333,easing:F})].join(","),f.style.opacity=0,f.style.transform=Me(.75),E&&E(f)}),L=R(C),T=f=>{S==="auto"&&(I.current=setTimeout(f,u.current||0)),o&&o(b.current,f)};return c.useEffect(()=>()=>{clearTimeout(I.current)},[]),A.jsx(y,g({appear:i,in:a,nodeRef:b,onEnter:_,onEntered:$,onEntering:D,onExit:O,onExited:L,onExiting:H,addEndListener:T,timeout:S==="auto"?null:S},k,{children:(f,p)=>c.cloneElement(n,g({style:g({opacity:0,transform:Me(.75),visibility:f==="exited"&&!a?"hidden":void 0},Vt[f],h,n.props.style),ref:M},p))}))});Qe.muiSupportAuto=!0;const Yt=Qe;function Jt(e){return xe("MuiPopover",e)}be("MuiPopover",["root","paper"]);const Qt=["onEntering"],Zt=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],en=["slotProps"];function Ke(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function Ge(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function qe(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Ce(e){return typeof e=="function"?e():e}const tn=e=>{const{classes:t}=e;return ye({root:["root"],paper:["paper"]},Jt,t)},nn=se(qt,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),on=se(ft,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),rn=c.forwardRef(function(t,r){var o,i,n;const s=Pe({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:m,anchorReference:E="anchorEl",children:C,className:N,container:h,elevation:S=8,marginThreshold:y=16,open:k,PaperProps:I={},slots:u,slotProps:x,transformOrigin:b={vertical:"top",horizontal:"left"},TransitionComponent:M=Yt,transitionDuration:R="auto",TransitionProps:{onEntering:D}={},disableScrollLock:_=!1}=s,$=G(s.TransitionProps,Qt),H=G(s,Zt),O=(o=x==null?void 0:x.paper)!=null?o:I,L=c.useRef(),T=ae(L,O.ref),f=g({},s,{anchorOrigin:d,anchorReference:E,elevation:S,marginThreshold:y,externalPaperSlotProps:O,transformOrigin:b,TransitionComponent:M,transitionDuration:R,TransitionProps:$}),p=tn(f),v=c.useCallback(()=>{if(E==="anchorPosition")return m;const P=Ce(l),j=(P&&P.nodeType===1?P:q(L.current).body).getBoundingClientRect();return{top:j.top+Ke(j,d.vertical),left:j.left+Ge(j,d.horizontal)}},[l,d.horizontal,d.vertical,m,E]),F=c.useCallback(P=>({vertical:Ke(P,b.vertical),horizontal:Ge(P,b.horizontal)}),[b.horizontal,b.vertical]),B=c.useCallback(P=>{const w={width:P.offsetWidth,height:P.offsetHeight},j=F(w);if(E==="none")return{top:null,left:null,transformOrigin:qe(j)};const we=v();let te=we.top-j.vertical,ne=we.left-j.horizontal;const Oe=te+w.height,Ie=ne+w.width,De=fe(Ce(l)),$e=De.innerHeight-y,Fe=De.innerWidth-y;if(y!==null&&te$e){const W=Oe-$e;te-=W,j.vertical+=W}if(y!==null&&neFe){const W=Ie-Fe;ne-=W,j.horizontal+=W}return{top:`${Math.round(te)}px`,left:`${Math.round(ne)}px`,transformOrigin:qe(j)}},[l,E,v,F,y]),[z,pe]=c.useState(k),U=c.useCallback(()=>{const P=L.current;if(!P)return;const w=B(P);w.top!==null&&(P.style.top=w.top),w.left!==null&&(P.style.left=w.left),P.style.transformOrigin=w.transformOrigin,pe(!0)},[B]);c.useEffect(()=>(_&&window.addEventListener("scroll",U),()=>window.removeEventListener("scroll",U)),[l,_,U]);const he=(P,w)=>{D&&D(P,w),U()},V=()=>{pe(!1)};c.useEffect(()=>{k&&U()}),c.useImperativeHandle(a,()=>k?{updatePosition:()=>{U()}}:null,[k,U]),c.useEffect(()=>{if(!k)return;const P=nt(()=>{U()}),w=fe(l);return w.addEventListener("resize",P),()=>{P.clear(),w.removeEventListener("resize",P)}},[l,k,U]);let K=R;R==="auto"&&!M.muiSupportAuto&&(K=void 0);const Q=h||(l?q(Ce(l)).body:void 0),Z=(i=u==null?void 0:u.root)!=null?i:nn,le=(n=u==null?void 0:u.paper)!=null?n:on,ce=Ee({elementType:le,externalSlotProps:g({},O,{style:z?O.style:g({},O.style,{opacity:0})}),additionalProps:{elevation:S,ref:T},ownerState:f,className:ie(p.paper,O==null?void 0:O.className)}),ee=Ee({elementType:Z,externalSlotProps:(x==null?void 0:x.root)||{},externalForwardedProps:H,additionalProps:{ref:r,slotProps:{backdrop:{invisible:!0}},container:Q,open:k},ownerState:f,className:ie(p.root,N)}),{slotProps:Te}=ee,Re=G(ee,en);return A.jsx(Z,g({},Re,!ot(Z)&&{slotProps:Te,disableScrollLock:_},{children:A.jsx(M,g({appear:!0,in:k,onEntering:he,onExited:V,timeout:K},$,{children:A.jsx(le,g({},ce,{children:C}))}))}))}),cn=rn;export{cn as P,Ye as T,ft as a,rt as b,on as c,Pt as d,ge as g,Je as r}; diff --git a/build/assets/Preview-c7b8bcf5.js b/build/assets/Preview-54147fba.js similarity index 97% rename from build/assets/Preview-c7b8bcf5.js rename to build/assets/Preview-54147fba.js index b5f36c90a..63b658eee 100644 --- a/build/assets/Preview-c7b8bcf5.js +++ b/build/assets/Preview-54147fba.js @@ -1 +1 @@ -import{n as y,r as b}from"./index-a0989d63.js";function v(r,e){for(var t=0;tn[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var w=Object.create,i=Object.defineProperty,P=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,x=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?i(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,E=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},h=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!I.call(r,a)&&a!==t&&i(r,a,{get:()=>e[a],enumerable:!(n=P(e,a))||n.enumerable});return r},S=(r,e,t)=>(t=r!=null?w(x(r)):{},h(e||!r||!r.__esModule?i(t,"default",{value:r,enumerable:!0}):t,r)),C=r=>h(i({},"__esModule",{value:!0}),r),p=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),_={};E(_,{default:()=>N});var g=C(_),s=S(b);const u="64px",d={};class N extends s.Component{constructor(){super(...arguments),p(this,"mounted",!1),p(this,"state",{image:null}),p(this,"handleKeyPress",e=>{(e.key==="Enter"||e.key===" ")&&this.props.onClick()})}componentDidMount(){this.mounted=!0,this.fetchImage(this.props)}componentDidUpdate(e){const{url:t,light:n}=this.props;(e.url!==t||e.light!==n)&&this.fetchImage(this.props)}componentWillUnmount(){this.mounted=!1}fetchImage({url:e,light:t,oEmbedUrl:n}){if(!s.default.isValidElement(t)){if(typeof t=="string"){this.setState({image:t});return}if(d[e]){this.setState({image:d[e]});return}return this.setState({image:null}),window.fetch(n.replace("{url}",e)).then(a=>a.json()).then(a=>{if(a.thumbnail_url&&this.mounted){const o=a.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");this.setState({image:o}),d[e]=o}})}}render(){const{light:e,onClick:t,playIcon:n,previewTabIndex:a}=this.props,{image:o}=this.state,l=s.default.isValidElement(e),f={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:o&&!l?`url(${o})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...f},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:u,width:u,height:u,position:l?"absolute":void 0,...f},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},m=s.default.createElement("div",{style:c.shadow,className:"react-player__shadow"},s.default.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return s.default.createElement("div",{style:c.preview,className:"react-player__preview",onClick:t,tabIndex:a,onKeyPress:this.handleKeyPress},l?e:null,n||m)}}const k=y(g),M=v({__proto__:null,default:k},[g]);export{M as P}; +import{n as y,r as b}from"./index-022521cf.js";function v(r,e){for(var t=0;tn[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var w=Object.create,i=Object.defineProperty,P=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,x=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?i(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,E=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},h=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!I.call(r,a)&&a!==t&&i(r,a,{get:()=>e[a],enumerable:!(n=P(e,a))||n.enumerable});return r},S=(r,e,t)=>(t=r!=null?w(x(r)):{},h(e||!r||!r.__esModule?i(t,"default",{value:r,enumerable:!0}):t,r)),C=r=>h(i({},"__esModule",{value:!0}),r),p=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),_={};E(_,{default:()=>N});var g=C(_),s=S(b);const u="64px",d={};class N extends s.Component{constructor(){super(...arguments),p(this,"mounted",!1),p(this,"state",{image:null}),p(this,"handleKeyPress",e=>{(e.key==="Enter"||e.key===" ")&&this.props.onClick()})}componentDidMount(){this.mounted=!0,this.fetchImage(this.props)}componentDidUpdate(e){const{url:t,light:n}=this.props;(e.url!==t||e.light!==n)&&this.fetchImage(this.props)}componentWillUnmount(){this.mounted=!1}fetchImage({url:e,light:t,oEmbedUrl:n}){if(!s.default.isValidElement(t)){if(typeof t=="string"){this.setState({image:t});return}if(d[e]){this.setState({image:d[e]});return}return this.setState({image:null}),window.fetch(n.replace("{url}",e)).then(a=>a.json()).then(a=>{if(a.thumbnail_url&&this.mounted){const o=a.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");this.setState({image:o}),d[e]=o}})}}render(){const{light:e,onClick:t,playIcon:n,previewTabIndex:a}=this.props,{image:o}=this.state,l=s.default.isValidElement(e),f={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:o&&!l?`url(${o})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...f},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:u,width:u,height:u,position:l?"absolute":void 0,...f},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},m=s.default.createElement("div",{style:c.shadow,className:"react-player__shadow"},s.default.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return s.default.createElement("div",{style:c.preview,className:"react-player__preview",onClick:t,tabIndex:a,onKeyPress:this.handleKeyPress},l?e:null,n||m)}}const k=y(g),M=v({__proto__:null,default:k},[g]);export{M as P}; diff --git a/build/assets/SearchIcon-119ae41f.js b/build/assets/SearchIcon-fa6afb77.js similarity index 95% rename from build/assets/SearchIcon-119ae41f.js rename to build/assets/SearchIcon-fa6afb77.js index c92496f61..e5688fa12 100644 --- a/build/assets/SearchIcon-119ae41f.js +++ b/build/assets/SearchIcon-fa6afb77.js @@ -1 +1 @@ -import{j as C}from"./index-a0989d63.js";const e=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{id:"Property 1=Normal",children:C.jsx("path",{id:"search",d:"M15.5192 20.6153C13.8115 20.6153 12.3654 20.023 11.1808 18.8384C9.99618 17.6538 9.40387 16.2077 9.40387 14.5C9.40387 12.7923 9.99618 11.3462 11.1808 10.1615C12.3654 8.97694 13.8115 8.38464 15.5192 8.38464C17.2269 8.38464 18.6731 8.97694 19.8577 10.1615C21.0423 11.3462 21.6346 12.7923 21.6346 14.5C21.6346 15.2141 21.5147 15.8961 21.275 16.5461C21.0352 17.1961 20.7153 17.7615 20.3153 18.2423L23.0692 20.9961C23.2077 21.1346 23.2785 21.3087 23.2817 21.5183C23.2849 21.7279 23.2141 21.9051 23.0692 22.05C22.9243 22.1948 22.7487 22.2673 22.5423 22.2673C22.3359 22.2673 22.1603 22.1948 22.0154 22.05L19.2615 19.2961C18.7615 19.7089 18.1865 20.032 17.5365 20.2653C16.8865 20.4987 16.2141 20.6153 15.5192 20.6153ZM15.5192 19.1154C16.8077 19.1154 17.899 18.6683 18.7933 17.774C19.6875 16.8798 20.1346 15.7885 20.1346 14.5C20.1346 13.2115 19.6875 12.1202 18.7933 11.2259C17.899 10.3317 16.8077 9.88459 15.5192 9.88459C14.2308 9.88459 13.1394 10.3317 12.2452 11.2259C11.351 12.1202 10.9038 13.2115 10.9038 14.5C10.9038 15.7885 11.351 16.8798 12.2452 17.774C13.1394 18.6683 14.2308 19.1154 15.5192 19.1154Z",fill:"currentColor"})})});export{e as S}; +import{j as C}from"./index-022521cf.js";const e=r=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{id:"Property 1=Normal",children:C.jsx("path",{id:"search",d:"M15.5192 20.6153C13.8115 20.6153 12.3654 20.023 11.1808 18.8384C9.99618 17.6538 9.40387 16.2077 9.40387 14.5C9.40387 12.7923 9.99618 11.3462 11.1808 10.1615C12.3654 8.97694 13.8115 8.38464 15.5192 8.38464C17.2269 8.38464 18.6731 8.97694 19.8577 10.1615C21.0423 11.3462 21.6346 12.7923 21.6346 14.5C21.6346 15.2141 21.5147 15.8961 21.275 16.5461C21.0352 17.1961 20.7153 17.7615 20.3153 18.2423L23.0692 20.9961C23.2077 21.1346 23.2785 21.3087 23.2817 21.5183C23.2849 21.7279 23.2141 21.9051 23.0692 22.05C22.9243 22.1948 22.7487 22.2673 22.5423 22.2673C22.3359 22.2673 22.1603 22.1948 22.0154 22.05L19.2615 19.2961C18.7615 19.7089 18.1865 20.032 17.5365 20.2653C16.8865 20.4987 16.2141 20.6153 15.5192 20.6153ZM15.5192 19.1154C16.8077 19.1154 17.899 18.6683 18.7933 17.774C19.6875 16.8798 20.1346 15.7885 20.1346 14.5C20.1346 13.2115 19.6875 12.1202 18.7933 11.2259C17.899 10.3317 16.8077 9.88459 15.5192 9.88459C14.2308 9.88459 13.1394 10.3317 12.2452 11.2259C11.351 12.1202 10.9038 13.2115 10.9038 14.5C10.9038 15.7885 11.351 16.8798 12.2452 17.774C13.1394 18.6683 14.2308 19.1154 15.5192 19.1154Z",fill:"currentColor"})})});export{e as S}; diff --git a/build/assets/Skeleton-091f3105.js b/build/assets/Skeleton-5c7b36a8.js similarity index 97% rename from build/assets/Skeleton-091f3105.js rename to build/assets/Skeleton-5c7b36a8.js index 1c3e0c3cf..8ffd23108 100644 --- a/build/assets/Skeleton-091f3105.js +++ b/build/assets/Skeleton-5c7b36a8.js @@ -1,4 +1,4 @@ -import{b as x,g as y,k as b,s as R,_ as o,f as _,bm as u,r as S,u as $,a as U,j as M,c as j,d as A}from"./index-a0989d63.js";function X(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function N(t){return parseFloat(t)}function B(t){return x("MuiSkeleton",t)}y("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const E=["animation","className","component","height","style","variant","width"];let r=t=>t,p,g,m,f;const F=t=>{const{classes:a,variant:e,animation:i,hasChildren:n,width:l,height:s}=t;return A({root:["root",e,i,n&&"withChildren",n&&!l&&"fitContent",n&&!s&&"heightAuto"]},B,a)},K=b(p||(p=r` +import{b as x,g as y,k as b,s as R,_ as o,f as _,bm as u,r as S,u as $,a as U,j as M,c as j,d as A}from"./index-022521cf.js";function X(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function N(t){return parseFloat(t)}function B(t){return x("MuiSkeleton",t)}y("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const E=["animation","className","component","height","style","variant","width"];let r=t=>t,p,g,m,f;const F=t=>{const{classes:a,variant:e,animation:i,hasChildren:n,width:l,height:s}=t;return A({root:["root",e,i,n&&"withChildren",n&&!l&&"fitContent",n&&!s&&"heightAuto"]},B,a)},K=b(p||(p=r` 0% { opacity: 1; } diff --git a/build/assets/SoundCloud-ee965f44.js b/build/assets/SoundCloud-ff97527a.js similarity index 95% rename from build/assets/SoundCloud-ee965f44.js rename to build/assets/SoundCloud-ff97527a.js index 512458973..148240166 100644 --- a/build/assets/SoundCloud-ee965f44.js +++ b/build/assets/SoundCloud-ff97527a.js @@ -1 +1 @@ -import{n as P,r as g}from"./index-a0989d63.js";import{u as b,p as v}from"./index-159c08bd.js";function O(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,w=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,C=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,D=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},d=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of j(e))!E.call(t,o)&&o!==r&&l(t,o,{get:()=>e[o],enumerable:!(s=w(e,o))||s.enumerable});return t},R=(t,e,r)=>(r=t!=null?S(C(t)):{},d(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),T=t=>d(l({},"__esModule",{value:!0}),t),n=(t,e,r)=>(D(t,typeof e!="symbol"?e+"":e,r),r),h={};L(h,{default:()=>u});var f=T(h),p=R(g),c=b,M=v;const x="https://w.soundcloud.com/player/api.js",A="SC";class u extends p.Component{constructor(){super(...arguments),n(this,"callPlayer",c.callPlayer),n(this,"duration",null),n(this,"currentTime",null),n(this,"fractionLoaded",null),n(this,"mute",()=>{this.setVolume(0)}),n(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),n(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){(0,c.getSDK)(x,A).then(s=>{if(!this.iframe)return;const{PLAY:o,PLAY_PROGRESS:i,PAUSE:y,FINISH:_,ERROR:m}=s.Widget.Events;r||(this.player=s.Widget(this.iframe),this.player.bind(o,this.props.onPlay),this.player.bind(y,()=>{this.duration-this.currentTime<.05||this.props.onPause()}),this.player.bind(i,a=>{this.currentTime=a.currentPosition/1e3,this.fractionLoaded=a.loadedProgress}),this.player.bind(_,()=>this.props.onEnded()),this.player.bind(m,a=>this.props.onError(a))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration(a=>{this.duration=a/1e3,this.props.onReady()})}})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seekTo",e*1e3),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return p.default.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:r,frameBorder:0,allow:"autoplay"})}}n(u,"displayName","SoundCloud");n(u,"canPlay",M.canPlay.soundcloud);n(u,"loopOnEnded",!0);const N=P(f),I=O({__proto__:null,default:N},[f]);export{I as S}; +import{n as P,r as g}from"./index-022521cf.js";import{u as b,p as v}from"./index-4378ec35.js";function O(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,w=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,C=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,D=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},d=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of j(e))!E.call(t,o)&&o!==r&&l(t,o,{get:()=>e[o],enumerable:!(s=w(e,o))||s.enumerable});return t},R=(t,e,r)=>(r=t!=null?S(C(t)):{},d(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),T=t=>d(l({},"__esModule",{value:!0}),t),n=(t,e,r)=>(D(t,typeof e!="symbol"?e+"":e,r),r),h={};L(h,{default:()=>u});var f=T(h),p=R(g),c=b,M=v;const x="https://w.soundcloud.com/player/api.js",A="SC";class u extends p.Component{constructor(){super(...arguments),n(this,"callPlayer",c.callPlayer),n(this,"duration",null),n(this,"currentTime",null),n(this,"fractionLoaded",null),n(this,"mute",()=>{this.setVolume(0)}),n(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),n(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){(0,c.getSDK)(x,A).then(s=>{if(!this.iframe)return;const{PLAY:o,PLAY_PROGRESS:i,PAUSE:y,FINISH:_,ERROR:m}=s.Widget.Events;r||(this.player=s.Widget(this.iframe),this.player.bind(o,this.props.onPlay),this.player.bind(y,()=>{this.duration-this.currentTime<.05||this.props.onPause()}),this.player.bind(i,a=>{this.currentTime=a.currentPosition/1e3,this.fractionLoaded=a.loadedProgress}),this.player.bind(_,()=>this.props.onEnded()),this.player.bind(m,a=>this.props.onError(a))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration(a=>{this.duration=a/1e3,this.props.onReady()})}})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seekTo",e*1e3),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return p.default.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:r,frameBorder:0,allow:"autoplay"})}}n(u,"displayName","SoundCloud");n(u,"canPlay",M.canPlay.soundcloud);n(u,"loopOnEnded",!0);const N=P(f),I=O({__proto__:null,default:N},[f]);export{I as S}; diff --git a/build/assets/Stack-98b5acbc.js b/build/assets/Stack-ce2a5ec5.js similarity index 99% rename from build/assets/Stack-98b5acbc.js rename to build/assets/Stack-ce2a5ec5.js index 6d1d9a032..21f5d1354 100644 --- a/build/assets/Stack-98b5acbc.js +++ b/build/assets/Stack-ce2a5ec5.js @@ -1 +1 @@ -import{r as E,a as ae,_ as T,bF as Tt,bG as Mt,bH as Bt,bI as Ft,bJ as Wt,bp as Qe,bo as Ae,bK as Lt,bE as Vt,bL as Nt,j as Q,bM as Ze,d as De,b as Te,g as vt,s as Me,bN as Ht,u as Be,e as mt,c as Ut}from"./index-a0989d63.js";import{o as et,u as It}from"./useSlotProps-374609c4.js";import{d as qt}from"./Popover-6e322384.js";import{e as tt,f as rt}from"./index-775b6bc6.js";function Se(e,t){var r,o;return E.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(o=e.type)==null||(o=o._payload)==null||(o=o.value)==null?void 0:o.muiName)!==-1}function Vo({controlled:e,default:t,name:r,state:o="value"}){const{current:n}=E.useRef(e!==void 0),[a,c]=E.useState(t),s=n?e:a,i=E.useCallback(f=>{n||c(f)},[]);return[s,i]}const zt=["sx"],Xt=e=>{var t,r;const o={systemProps:{},otherProps:{}},n=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Tt;return Object.keys(e).forEach(a=>{n[a]?o.systemProps[a]=e[a]:o.otherProps[a]=e[a]}),o};function Yt(e){const{sx:t}=e,r=ae(e,zt),{systemProps:o,otherProps:n}=Xt(r);let a;return Array.isArray(t)?a=[o,...t]:typeof t=="function"?a=(...c)=>{const s=t(...c);return Mt(s)?T({},o,s):o}:a=T({},o,t),T({},n,{sx:a})}function ht(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tt.root});function er(e){return Wt({props:e,name:"MuiStack",defaultTheme:Qt})}function tr(e,t){const r=E.Children.toArray(e).filter(Boolean);return r.reduce((o,n,a)=>(o.push(n),a({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],or=({ownerState:e,theme:t})=>{let r=T({display:"flex",flexDirection:"column"},Qe({theme:t},Ae({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){const o=Lt(t),n=Object.keys(t.breakpoints.values).reduce((i,f)=>((typeof e.spacing=="object"&&e.spacing[f]!=null||typeof e.direction=="object"&&e.direction[f]!=null)&&(i[f]=!0),i),{}),a=Ae({values:e.direction,base:n}),c=Ae({values:e.spacing,base:n});typeof a=="object"&&Object.keys(a).forEach((i,f,l)=>{if(!a[i]){const h=f>0?a[l[f-1]]:"column";a[i]=h}}),r=Vt(r,Qe({theme:t},c,(i,f)=>e.useFlexGap?{gap:Ze(o,i)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${rr(f?a[f]:e.direction)}`]:Ze(o,i)}}))}return r=Nt(t.breakpoints,r),r};function nr(e={}){const{createStyledComponent:t=Zt,useThemeProps:r=er,componentName:o="MuiStack"}=e,n=()=>De({root:["root"]},i=>Te(o,i),{}),a=t(or);return E.forwardRef(function(i,f){const l=r(i),v=Yt(l),{component:h="div",direction:u="column",spacing:x=0,divider:d,children:m,className:w,useFlexGap:P=!1}=v,b=ae(v,Kt),p={direction:u,spacing:x,useFlexGap:P},g=n();return Q.jsx(a,T({as:h,ownerState:p,ref:f,className:Gt(g.root,w)},b,{children:d?tr(m,d):m}))})}const ar={disableDefaultClasses:!1},ir=E.createContext(ar);function sr(e){const{disableDefaultClasses:t}=E.useContext(ir);return r=>t?"":e(r)}var B="top",N="bottom",H="right",F="left",Fe="auto",de=[B,N,H,F],te="start",pe="end",lr="clippingParents",gt="viewport",le="popper",cr="reference",ot=de.reduce(function(e,t){return e.concat([t+"-"+te,t+"-"+pe])},[]),yt=[].concat(de,[Fe]).reduce(function(e,t){return e.concat([t,t+"-"+te,t+"-"+pe])},[]),fr="beforeRead",pr="read",ur="afterRead",dr="beforeMain",vr="main",mr="afterMain",hr="beforeWrite",gr="write",yr="afterWrite",br=[fr,pr,ur,dr,vr,mr,hr,gr,yr];function I(e){return e?(e.nodeName||"").toLowerCase():null}function W(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Z(e){var t=W(e).Element;return e instanceof t||e instanceof Element}function V(e){var t=W(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function We(e){if(typeof ShadowRoot>"u")return!1;var t=W(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function xr(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},a=t.elements[r];!V(a)||!I(a)||(Object.assign(a.style,o),Object.keys(n).forEach(function(c){var s=n[c];s===!1?a.removeAttribute(c):a.setAttribute(c,s===!0?"":s)}))})}function wr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],a=t.attributes[o]||{},c=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),s=c.reduce(function(i,f){return i[f]="",i},{});!V(n)||!I(n)||(Object.assign(n.style,s),Object.keys(a).forEach(function(i){n.removeAttribute(i)}))})}}const Or={name:"applyStyles",enabled:!0,phase:"write",fn:xr,effect:wr,requires:["computeStyles"]};function U(e){return e.split("-")[0]}var K=Math.max,we=Math.min,re=Math.round;function $e(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function bt(){return!/^((?!chrome|android).)*safari/i.test($e())}function oe(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,a=1;t&&V(e)&&(n=e.offsetWidth>0&&re(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&re(o.height)/e.offsetHeight||1);var c=Z(e)?W(e):window,s=c.visualViewport,i=!bt()&&r,f=(o.left+(i&&s?s.offsetLeft:0))/n,l=(o.top+(i&&s?s.offsetTop:0))/a,v=o.width/n,h=o.height/a;return{width:v,height:h,top:l,right:f+v,bottom:l+h,left:f,x:f,y:l}}function Le(e){var t=oe(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function xt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&We(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function q(e){return W(e).getComputedStyle(e)}function Pr(e){return["table","td","th"].indexOf(I(e))>=0}function Y(e){return((Z(e)?e.ownerDocument:e.document)||window.document).documentElement}function Oe(e){return I(e)==="html"?e:e.assignedSlot||e.parentNode||(We(e)?e.host:null)||Y(e)}function nt(e){return!V(e)||q(e).position==="fixed"?null:e.offsetParent}function Er(e){var t=/firefox/i.test($e()),r=/Trident/i.test($e());if(r&&V(e)){var o=q(e);if(o.position==="fixed")return null}var n=Oe(e);for(We(n)&&(n=n.host);V(n)&&["html","body"].indexOf(I(n))<0;){var a=q(n);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return n;n=n.parentNode}return null}function ve(e){for(var t=W(e),r=nt(e);r&&Pr(r)&&q(r).position==="static";)r=nt(r);return r&&(I(r)==="html"||I(r)==="body"&&q(r).position==="static")?t:r||Er(e)||t}function Ve(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ce(e,t,r){return K(e,we(t,r))}function Cr(e,t,r){var o=ce(e,t,r);return o>r?r:o}function wt(){return{top:0,right:0,bottom:0,left:0}}function Ot(e){return Object.assign({},wt(),e)}function Pt(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var Rr=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Ot(typeof t!="number"?t:Pt(t,de))};function Ar(e){var t,r=e.state,o=e.name,n=e.options,a=r.elements.arrow,c=r.modifiersData.popperOffsets,s=U(r.placement),i=Ve(s),f=[F,H].indexOf(s)>=0,l=f?"height":"width";if(!(!a||!c)){var v=Rr(n.padding,r),h=Le(a),u=i==="y"?B:F,x=i==="y"?N:H,d=r.rects.reference[l]+r.rects.reference[i]-c[i]-r.rects.popper[l],m=c[i]-r.rects.reference[i],w=ve(a),P=w?i==="y"?w.clientHeight||0:w.clientWidth||0:0,b=d/2-m/2,p=v[u],g=P-h[l]-v[x],y=P/2-h[l]/2+b,O=ce(p,y,g),A=i;r.modifiersData[o]=(t={},t[A]=O,t.centerOffset=O-y,t)}}function Sr(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||xt(t.elements.popper,n)&&(t.elements.arrow=n))}const $r={name:"arrow",enabled:!0,phase:"main",fn:Ar,effect:Sr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(e){return e.split("-")[1]}var jr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kr(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:re(r*n)/n||0,y:re(o*n)/n||0}}function at(e){var t,r=e.popper,o=e.popperRect,n=e.placement,a=e.variation,c=e.offsets,s=e.position,i=e.gpuAcceleration,f=e.adaptive,l=e.roundOffsets,v=e.isFixed,h=c.x,u=h===void 0?0:h,x=c.y,d=x===void 0?0:x,m=typeof l=="function"?l({x:u,y:d}):{x:u,y:d};u=m.x,d=m.y;var w=c.hasOwnProperty("x"),P=c.hasOwnProperty("y"),b=F,p=B,g=window;if(f){var y=ve(r),O="clientHeight",A="clientWidth";if(y===W(r)&&(y=Y(r),q(y).position!=="static"&&s==="absolute"&&(O="scrollHeight",A="scrollWidth")),y=y,n===B||(n===F||n===H)&&a===pe){p=N;var C=v&&y===g&&g.visualViewport?g.visualViewport.height:y[O];d-=C-o.height,d*=i?1:-1}if(n===F||(n===B||n===N)&&a===pe){b=H;var R=v&&y===g&&g.visualViewport?g.visualViewport.width:y[A];u-=R-o.width,u*=i?1:-1}}var $=Object.assign({position:s},f&&jr),D=l===!0?kr({x:u,y:d},W(r)):{x:u,y:d};if(u=D.x,d=D.y,i){var S;return Object.assign({},$,(S={},S[p]=P?"0":"",S[b]=w?"0":"",S.transform=(g.devicePixelRatio||1)<=1?"translate("+u+"px, "+d+"px)":"translate3d("+u+"px, "+d+"px, 0)",S))}return Object.assign({},$,(t={},t[p]=P?d+"px":"",t[b]=w?u+"px":"",t.transform="",t))}function Dr(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,a=r.adaptive,c=a===void 0?!0:a,s=r.roundOffsets,i=s===void 0?!0:s,f={placement:U(t.placement),variation:ne(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,at(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:i})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,at(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Tr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Dr,data:{}};var be={passive:!0};function Mr(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,a=n===void 0?!0:n,c=o.resize,s=c===void 0?!0:c,i=W(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(l){l.addEventListener("scroll",r.update,be)}),s&&i.addEventListener("resize",r.update,be),function(){a&&f.forEach(function(l){l.removeEventListener("scroll",r.update,be)}),s&&i.removeEventListener("resize",r.update,be)}}const Br={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Mr,data:{}};var Fr={left:"right",right:"left",bottom:"top",top:"bottom"};function xe(e){return e.replace(/left|right|bottom|top/g,function(t){return Fr[t]})}var Wr={start:"end",end:"start"};function it(e){return e.replace(/start|end/g,function(t){return Wr[t]})}function Ne(e){var t=W(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function He(e){return oe(Y(e)).left+Ne(e).scrollLeft}function Lr(e,t){var r=W(e),o=Y(e),n=r.visualViewport,a=o.clientWidth,c=o.clientHeight,s=0,i=0;if(n){a=n.width,c=n.height;var f=bt();(f||!f&&t==="fixed")&&(s=n.offsetLeft,i=n.offsetTop)}return{width:a,height:c,x:s+He(e),y:i}}function Vr(e){var t,r=Y(e),o=Ne(e),n=(t=e.ownerDocument)==null?void 0:t.body,a=K(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),c=K(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-o.scrollLeft+He(e),i=-o.scrollTop;return q(n||r).direction==="rtl"&&(s+=K(r.clientWidth,n?n.clientWidth:0)-a),{width:a,height:c,x:s,y:i}}function Ue(e){var t=q(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function Et(e){return["html","body","#document"].indexOf(I(e))>=0?e.ownerDocument.body:V(e)&&Ue(e)?e:Et(Oe(e))}function fe(e,t){var r;t===void 0&&(t=[]);var o=Et(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),a=W(o),c=n?[a].concat(a.visualViewport||[],Ue(o)?o:[]):o,s=t.concat(c);return n?s:s.concat(fe(Oe(c)))}function je(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Nr(e,t){var r=oe(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function st(e,t,r){return t===gt?je(Lr(e,r)):Z(t)?Nr(t,r):je(Vr(Y(e)))}function Hr(e){var t=fe(Oe(e)),r=["absolute","fixed"].indexOf(q(e).position)>=0,o=r&&V(e)?ve(e):e;return Z(o)?t.filter(function(n){return Z(n)&&xt(n,o)&&I(n)!=="body"}):[]}function Ur(e,t,r,o){var n=t==="clippingParents"?Hr(e):[].concat(t),a=[].concat(n,[r]),c=a[0],s=a.reduce(function(i,f){var l=st(e,f,o);return i.top=K(l.top,i.top),i.right=we(l.right,i.right),i.bottom=we(l.bottom,i.bottom),i.left=K(l.left,i.left),i},st(e,c,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ct(e){var t=e.reference,r=e.element,o=e.placement,n=o?U(o):null,a=o?ne(o):null,c=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,i;switch(n){case B:i={x:c,y:t.y-r.height};break;case N:i={x:c,y:t.y+t.height};break;case H:i={x:t.x+t.width,y:s};break;case F:i={x:t.x-r.width,y:s};break;default:i={x:t.x,y:t.y}}var f=n?Ve(n):null;if(f!=null){var l=f==="y"?"height":"width";switch(a){case te:i[f]=i[f]-(t[l]/2-r[l]/2);break;case pe:i[f]=i[f]+(t[l]/2-r[l]/2);break}}return i}function ue(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,a=r.strategy,c=a===void 0?e.strategy:a,s=r.boundary,i=s===void 0?lr:s,f=r.rootBoundary,l=f===void 0?gt:f,v=r.elementContext,h=v===void 0?le:v,u=r.altBoundary,x=u===void 0?!1:u,d=r.padding,m=d===void 0?0:d,w=Ot(typeof m!="number"?m:Pt(m,de)),P=h===le?cr:le,b=e.rects.popper,p=e.elements[x?P:h],g=Ur(Z(p)?p:p.contextElement||Y(e.elements.popper),i,l,c),y=oe(e.elements.reference),O=Ct({reference:y,element:b,strategy:"absolute",placement:n}),A=je(Object.assign({},b,O)),C=h===le?A:y,R={top:g.top-C.top+w.top,bottom:C.bottom-g.bottom+w.bottom,left:g.left-C.left+w.left,right:C.right-g.right+w.right},$=e.modifiersData.offset;if(h===le&&$){var D=$[n];Object.keys(R).forEach(function(S){var k=[H,N].indexOf(S)>=0?1:-1,L=[B,N].indexOf(S)>=0?"y":"x";R[S]+=D[L]*k})}return R}function Ir(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,a=r.rootBoundary,c=r.padding,s=r.flipVariations,i=r.allowedAutoPlacements,f=i===void 0?yt:i,l=ne(o),v=l?s?ot:ot.filter(function(x){return ne(x)===l}):de,h=v.filter(function(x){return f.indexOf(x)>=0});h.length===0&&(h=v);var u=h.reduce(function(x,d){return x[d]=ue(e,{placement:d,boundary:n,rootBoundary:a,padding:c})[U(d)],x},{});return Object.keys(u).sort(function(x,d){return u[x]-u[d]})}function qr(e){if(U(e)===Fe)return[];var t=xe(e);return[it(e),t,it(t)]}function zr(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!0:c,i=r.fallbackPlacements,f=r.padding,l=r.boundary,v=r.rootBoundary,h=r.altBoundary,u=r.flipVariations,x=u===void 0?!0:u,d=r.allowedAutoPlacements,m=t.options.placement,w=U(m),P=w===m,b=i||(P||!x?[xe(m)]:qr(m)),p=[m].concat(b).reduce(function(ee,X){return ee.concat(U(X)===Fe?Ir(t,{placement:X,boundary:l,rootBoundary:v,padding:f,flipVariations:x,allowedAutoPlacements:d}):X)},[]),g=t.rects.reference,y=t.rects.popper,O=new Map,A=!0,C=p[0],R=0;R=0,L=k?"width":"height",j=ue(t,{placement:$,boundary:l,rootBoundary:v,altBoundary:h,padding:f}),M=k?S?H:F:S?N:B;g[L]>y[L]&&(M=xe(M));var z=xe(M),G=[];if(a&&G.push(j[D]<=0),s&&G.push(j[M]<=0,j[z]<=0),G.every(function(ee){return ee})){C=$,A=!1;break}O.set($,G)}if(A)for(var me=x?3:1,Pe=function(X){var se=p.find(function(ge){var _=O.get(ge);if(_)return _.slice(0,X).every(function(Ee){return Ee})});if(se)return C=se,"break"},ie=me;ie>0;ie--){var he=Pe(ie);if(he==="break")break}t.placement!==C&&(t.modifiersData[o]._skip=!0,t.placement=C,t.reset=!0)}}const Xr={name:"flip",enabled:!0,phase:"main",fn:zr,requiresIfExists:["offset"],data:{_skip:!1}};function lt(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ct(e){return[B,H,N,F].some(function(t){return e[t]>=0})}function Yr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,a=t.modifiersData.preventOverflow,c=ue(t,{elementContext:"reference"}),s=ue(t,{altBoundary:!0}),i=lt(c,o),f=lt(s,n,a),l=ct(i),v=ct(f);t.modifiersData[r]={referenceClippingOffsets:i,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":v})}const Gr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Yr};function _r(e,t,r){var o=U(e),n=[F,B].indexOf(o)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,c=a[0],s=a[1];return c=c||0,s=(s||0)*n,[F,H].indexOf(o)>=0?{x:s,y:c}:{x:c,y:s}}function Jr(e){var t=e.state,r=e.options,o=e.name,n=r.offset,a=n===void 0?[0,0]:n,c=yt.reduce(function(l,v){return l[v]=_r(v,t.rects,a),l},{}),s=c[t.placement],i=s.x,f=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=f),t.modifiersData[o]=c}const Kr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jr};function Qr(e){var t=e.state,r=e.name;t.modifiersData[r]=Ct({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Zr={name:"popperOffsets",enabled:!0,phase:"read",fn:Qr,data:{}};function eo(e){return e==="x"?"y":"x"}function to(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!1:c,i=r.boundary,f=r.rootBoundary,l=r.altBoundary,v=r.padding,h=r.tether,u=h===void 0?!0:h,x=r.tetherOffset,d=x===void 0?0:x,m=ue(t,{boundary:i,rootBoundary:f,padding:v,altBoundary:l}),w=U(t.placement),P=ne(t.placement),b=!P,p=Ve(w),g=eo(p),y=t.modifiersData.popperOffsets,O=t.rects.reference,A=t.rects.popper,C=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,R=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(y){if(a){var S,k=p==="y"?B:F,L=p==="y"?N:H,j=p==="y"?"height":"width",M=y[p],z=M+m[k],G=M-m[L],me=u?-A[j]/2:0,Pe=P===te?O[j]:A[j],ie=P===te?-A[j]:-O[j],he=t.elements.arrow,ee=u&&he?Le(he):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:wt(),se=X[k],ge=X[L],_=ce(0,O[j],ee[j]),Ee=b?O[j]/2-me-_-se-R.mainAxis:Pe-_-se-R.mainAxis,At=b?-O[j]/2+me+_+ge+R.mainAxis:ie+_+ge+R.mainAxis,Ce=t.elements.arrow&&ve(t.elements.arrow),St=Ce?p==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ie=(S=$==null?void 0:$[p])!=null?S:0,$t=M+Ee-Ie-St,jt=M+At-Ie,qe=ce(u?we(z,$t):z,M,u?K(G,jt):G);y[p]=qe,D[p]=qe-M}if(s){var ze,kt=p==="x"?B:F,Dt=p==="x"?N:H,J=y[g],ye=g==="y"?"height":"width",Xe=J+m[kt],Ye=J-m[Dt],Re=[B,F].indexOf(w)!==-1,Ge=(ze=$==null?void 0:$[g])!=null?ze:0,_e=Re?Xe:J-O[ye]-A[ye]-Ge+R.altAxis,Je=Re?J+O[ye]+A[ye]-Ge-R.altAxis:Ye,Ke=u&&Re?Cr(_e,J,Je):ce(u?_e:Xe,J,u?Je:Ye);y[g]=Ke,D[g]=Ke-J}t.modifiersData[o]=D}}const ro={name:"preventOverflow",enabled:!0,phase:"main",fn:to,requiresIfExists:["offset"]};function oo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function no(e){return e===W(e)||!V(e)?Ne(e):oo(e)}function ao(e){var t=e.getBoundingClientRect(),r=re(t.width)/e.offsetWidth||1,o=re(t.height)/e.offsetHeight||1;return r!==1||o!==1}function io(e,t,r){r===void 0&&(r=!1);var o=V(t),n=V(t)&&ao(t),a=Y(t),c=oe(e,n,r),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(o||!o&&!r)&&((I(t)!=="body"||Ue(a))&&(s=no(t)),V(t)?(i=oe(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):a&&(i.x=He(a))),{x:c.left+s.scrollLeft-i.x,y:c.top+s.scrollTop-i.y,width:c.width,height:c.height}}function so(e){var t=new Map,r=new Set,o=[];e.forEach(function(a){t.set(a.name,a)});function n(a){r.add(a.name);var c=[].concat(a.requires||[],a.requiresIfExists||[]);c.forEach(function(s){if(!r.has(s)){var i=t.get(s);i&&n(i)}}),o.push(a)}return e.forEach(function(a){r.has(a.name)||n(a)}),o}function lo(e){var t=so(e);return br.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function co(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function fo(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var ft={placement:"bottom",modifiers:[],strategy:"absolute"};function pt(){for(var e=arguments.length,t=new Array(e),r=0;rDe({root:["root"]},sr(mo)),wo={},Oo=E.forwardRef(function(t,r){var o;const{anchorEl:n,children:a,direction:c,disablePortal:s,modifiers:i,open:f,placement:l,popperOptions:v,popperRef:h,slotProps:u={},slots:x={},TransitionProps:d}=t,m=ae(t,ho),w=E.useRef(null),P=tt(w,r),b=E.useRef(null),p=tt(b,h),g=E.useRef(p);rt(()=>{g.current=p},[p]),E.useImperativeHandle(h,()=>b.current,[]);const y=yo(l,c),[O,A]=E.useState(y),[C,R]=E.useState(ke(n));E.useEffect(()=>{b.current&&b.current.forceUpdate()}),E.useEffect(()=>{n&&R(ke(n))},[n]),rt(()=>{if(!C||!f)return;const L=z=>{A(z.placement)};let j=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:z})=>{L(z)}}];i!=null&&(j=j.concat(i)),v&&v.modifiers!=null&&(j=j.concat(v.modifiers));const M=vo(C,w.current,T({placement:y},v,{modifiers:j}));return g.current(M),()=>{M.destroy(),g.current(null)}},[C,s,i,f,v,y]);const $={placement:O};d!==null&&($.TransitionProps=d);const D=xo(),S=(o=x.root)!=null?o:"div",k=It({elementType:S,externalSlotProps:u.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:P},ownerState:t,className:D.root});return Q.jsx(S,T({},k,{children:typeof a=="function"?a($):a}))}),Po=E.forwardRef(function(t,r){const{anchorEl:o,children:n,container:a,direction:c="ltr",disablePortal:s=!1,keepMounted:i=!1,modifiers:f,open:l,placement:v="bottom",popperOptions:h=wo,popperRef:u,style:x,transition:d=!1,slotProps:m={},slots:w={}}=t,P=ae(t,go),[b,p]=E.useState(!0),g=()=>{p(!1)},y=()=>{p(!0)};if(!i&&!l&&(!d||b))return null;let O;if(a)O=a;else if(o){const R=ke(o);O=R&&bo(R)?et(R).body:et(null).body}const A=!l&&i&&(!d||b)?"none":void 0,C=d?{in:l,onEnter:g,onExited:y}:void 0;return Q.jsx(qt,{disablePortal:s,container:O,children:Q.jsx(Oo,T({anchorEl:o,direction:c,disablePortal:s,modifiers:f,ref:r,open:d?!b:l,placement:v,popperOptions:h,popperRef:u,slotProps:m,slots:w},P,{style:T({position:"fixed",top:0,left:0,display:A},x),TransitionProps:C,children:n}))})}),Eo=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Co=Me(Po,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ro=E.forwardRef(function(t,r){var o;const n=Ht(),a=Be({props:t,name:"MuiPopper"}),{anchorEl:c,component:s,components:i,componentsProps:f,container:l,disablePortal:v,keepMounted:h,modifiers:u,open:x,placement:d,popperOptions:m,popperRef:w,transition:P,slots:b,slotProps:p}=a,g=ae(a,Eo),y=(o=b==null?void 0:b.root)!=null?o:i==null?void 0:i.Root,O=T({anchorEl:c,container:l,disablePortal:v,keepMounted:h,modifiers:u,open:x,placement:d,popperOptions:m,popperRef:w,transition:P},g);return Q.jsx(Co,T({as:s,direction:n==null?void 0:n.direction,slots:{root:y},slotProps:p??f},O,{ref:r}))}),No=Ro;function Ho({props:e,states:t,muiFormControl:r}){return t.reduce((o,n)=>(o[n]=e[n],r&&typeof e[n]>"u"&&(o[n]=r[n]),o),{})}const Ao=E.createContext(void 0),Rt=Ao;function Uo(){return E.useContext(Rt)}function ut(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function dt(e,t=!1){return e&&(ut(e.value)&&e.value!==""||t&&ut(e.defaultValue)&&e.defaultValue!=="")}function So(e){return e.startAdornment}function $o(e){return Te("MuiFormControl",e)}vt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const jo=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],ko=e=>{const{classes:t,margin:r,fullWidth:o}=e,n={root:["root",r!=="none"&&`margin${mt(r)}`,o&&"fullWidth"]};return De(n,$o,t)},Do=Me("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>T({},t.root,t[`margin${mt(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>T({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),To=E.forwardRef(function(t,r){const o=Be({props:t,name:"MuiFormControl"}),{children:n,className:a,color:c="primary",component:s="div",disabled:i=!1,error:f=!1,focused:l,fullWidth:v=!1,hiddenLabel:h=!1,margin:u="none",required:x=!1,size:d="medium",variant:m="outlined"}=o,w=ae(o,jo),P=T({},o,{color:c,component:s,disabled:i,error:f,fullWidth:v,hiddenLabel:h,margin:u,required:x,size:d,variant:m}),b=ko(P),[p,g]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,k=>{if(!Se(k,["Input","Select"]))return;const L=Se(k,["Select"])?k.props.input:k;L&&So(L.props)&&(S=!0)}),S}),[y,O]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,k=>{Se(k,["Input","Select"])&&(dt(k.props,!0)||dt(k.props.inputProps,!0))&&(S=!0)}),S}),[A,C]=E.useState(!1);i&&A&&C(!1);const R=l!==void 0&&!i?l:A;let $;const D=E.useMemo(()=>({adornedStart:p,setAdornedStart:g,color:c,disabled:i,error:f,filled:y,focused:R,fullWidth:v,hiddenLabel:h,size:d,onBlur:()=>{C(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{C(!0)},registerEffect:$,required:x,variant:m}),[p,c,i,f,y,R,v,h,$,x,d,m]);return Q.jsx(Rt.Provider,{value:D,children:Q.jsx(Do,T({as:s,ownerState:P,className:Ut(b.root,a),ref:r},w,{children:n}))})}),Io=To,Mo=nr({createStyledComponent:Me("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Be({props:e,name:"MuiStack"})}),qo=Mo;export{Io as F,No as P,qo as S,Uo as a,Rt as b,Yt as e,Ho as f,dt as i,Vo as u}; +import{r as E,a as ae,_ as T,bF as Tt,bG as Mt,bH as Bt,bI as Ft,bJ as Wt,bp as Qe,bo as Ae,bK as Lt,bE as Vt,bL as Nt,j as Q,bM as Ze,d as De,b as Te,g as vt,s as Me,bN as Ht,u as Be,e as mt,c as Ut}from"./index-022521cf.js";import{o as et,u as It}from"./useSlotProps-51fc8b9f.js";import{d as qt}from"./Popover-cc3c7b26.js";import{e as tt,f as rt}from"./index-586dfb7f.js";function Se(e,t){var r,o;return E.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(o=e.type)==null||(o=o._payload)==null||(o=o.value)==null?void 0:o.muiName)!==-1}function Vo({controlled:e,default:t,name:r,state:o="value"}){const{current:n}=E.useRef(e!==void 0),[a,c]=E.useState(t),s=n?e:a,i=E.useCallback(f=>{n||c(f)},[]);return[s,i]}const zt=["sx"],Xt=e=>{var t,r;const o={systemProps:{},otherProps:{}},n=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Tt;return Object.keys(e).forEach(a=>{n[a]?o.systemProps[a]=e[a]:o.otherProps[a]=e[a]}),o};function Yt(e){const{sx:t}=e,r=ae(e,zt),{systemProps:o,otherProps:n}=Xt(r);let a;return Array.isArray(t)?a=[o,...t]:typeof t=="function"?a=(...c)=>{const s=t(...c);return Mt(s)?T({},o,s):o}:a=T({},o,t),T({},n,{sx:a})}function ht(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tt.root});function er(e){return Wt({props:e,name:"MuiStack",defaultTheme:Qt})}function tr(e,t){const r=E.Children.toArray(e).filter(Boolean);return r.reduce((o,n,a)=>(o.push(n),a({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],or=({ownerState:e,theme:t})=>{let r=T({display:"flex",flexDirection:"column"},Qe({theme:t},Ae({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){const o=Lt(t),n=Object.keys(t.breakpoints.values).reduce((i,f)=>((typeof e.spacing=="object"&&e.spacing[f]!=null||typeof e.direction=="object"&&e.direction[f]!=null)&&(i[f]=!0),i),{}),a=Ae({values:e.direction,base:n}),c=Ae({values:e.spacing,base:n});typeof a=="object"&&Object.keys(a).forEach((i,f,l)=>{if(!a[i]){const h=f>0?a[l[f-1]]:"column";a[i]=h}}),r=Vt(r,Qe({theme:t},c,(i,f)=>e.useFlexGap?{gap:Ze(o,i)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${rr(f?a[f]:e.direction)}`]:Ze(o,i)}}))}return r=Nt(t.breakpoints,r),r};function nr(e={}){const{createStyledComponent:t=Zt,useThemeProps:r=er,componentName:o="MuiStack"}=e,n=()=>De({root:["root"]},i=>Te(o,i),{}),a=t(or);return E.forwardRef(function(i,f){const l=r(i),v=Yt(l),{component:h="div",direction:u="column",spacing:x=0,divider:d,children:m,className:w,useFlexGap:P=!1}=v,b=ae(v,Kt),p={direction:u,spacing:x,useFlexGap:P},g=n();return Q.jsx(a,T({as:h,ownerState:p,ref:f,className:Gt(g.root,w)},b,{children:d?tr(m,d):m}))})}const ar={disableDefaultClasses:!1},ir=E.createContext(ar);function sr(e){const{disableDefaultClasses:t}=E.useContext(ir);return r=>t?"":e(r)}var B="top",N="bottom",H="right",F="left",Fe="auto",de=[B,N,H,F],te="start",pe="end",lr="clippingParents",gt="viewport",le="popper",cr="reference",ot=de.reduce(function(e,t){return e.concat([t+"-"+te,t+"-"+pe])},[]),yt=[].concat(de,[Fe]).reduce(function(e,t){return e.concat([t,t+"-"+te,t+"-"+pe])},[]),fr="beforeRead",pr="read",ur="afterRead",dr="beforeMain",vr="main",mr="afterMain",hr="beforeWrite",gr="write",yr="afterWrite",br=[fr,pr,ur,dr,vr,mr,hr,gr,yr];function I(e){return e?(e.nodeName||"").toLowerCase():null}function W(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Z(e){var t=W(e).Element;return e instanceof t||e instanceof Element}function V(e){var t=W(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function We(e){if(typeof ShadowRoot>"u")return!1;var t=W(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function xr(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},a=t.elements[r];!V(a)||!I(a)||(Object.assign(a.style,o),Object.keys(n).forEach(function(c){var s=n[c];s===!1?a.removeAttribute(c):a.setAttribute(c,s===!0?"":s)}))})}function wr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],a=t.attributes[o]||{},c=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),s=c.reduce(function(i,f){return i[f]="",i},{});!V(n)||!I(n)||(Object.assign(n.style,s),Object.keys(a).forEach(function(i){n.removeAttribute(i)}))})}}const Or={name:"applyStyles",enabled:!0,phase:"write",fn:xr,effect:wr,requires:["computeStyles"]};function U(e){return e.split("-")[0]}var K=Math.max,we=Math.min,re=Math.round;function $e(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function bt(){return!/^((?!chrome|android).)*safari/i.test($e())}function oe(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,a=1;t&&V(e)&&(n=e.offsetWidth>0&&re(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&re(o.height)/e.offsetHeight||1);var c=Z(e)?W(e):window,s=c.visualViewport,i=!bt()&&r,f=(o.left+(i&&s?s.offsetLeft:0))/n,l=(o.top+(i&&s?s.offsetTop:0))/a,v=o.width/n,h=o.height/a;return{width:v,height:h,top:l,right:f+v,bottom:l+h,left:f,x:f,y:l}}function Le(e){var t=oe(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function xt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&We(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function q(e){return W(e).getComputedStyle(e)}function Pr(e){return["table","td","th"].indexOf(I(e))>=0}function Y(e){return((Z(e)?e.ownerDocument:e.document)||window.document).documentElement}function Oe(e){return I(e)==="html"?e:e.assignedSlot||e.parentNode||(We(e)?e.host:null)||Y(e)}function nt(e){return!V(e)||q(e).position==="fixed"?null:e.offsetParent}function Er(e){var t=/firefox/i.test($e()),r=/Trident/i.test($e());if(r&&V(e)){var o=q(e);if(o.position==="fixed")return null}var n=Oe(e);for(We(n)&&(n=n.host);V(n)&&["html","body"].indexOf(I(n))<0;){var a=q(n);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return n;n=n.parentNode}return null}function ve(e){for(var t=W(e),r=nt(e);r&&Pr(r)&&q(r).position==="static";)r=nt(r);return r&&(I(r)==="html"||I(r)==="body"&&q(r).position==="static")?t:r||Er(e)||t}function Ve(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ce(e,t,r){return K(e,we(t,r))}function Cr(e,t,r){var o=ce(e,t,r);return o>r?r:o}function wt(){return{top:0,right:0,bottom:0,left:0}}function Ot(e){return Object.assign({},wt(),e)}function Pt(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var Rr=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Ot(typeof t!="number"?t:Pt(t,de))};function Ar(e){var t,r=e.state,o=e.name,n=e.options,a=r.elements.arrow,c=r.modifiersData.popperOffsets,s=U(r.placement),i=Ve(s),f=[F,H].indexOf(s)>=0,l=f?"height":"width";if(!(!a||!c)){var v=Rr(n.padding,r),h=Le(a),u=i==="y"?B:F,x=i==="y"?N:H,d=r.rects.reference[l]+r.rects.reference[i]-c[i]-r.rects.popper[l],m=c[i]-r.rects.reference[i],w=ve(a),P=w?i==="y"?w.clientHeight||0:w.clientWidth||0:0,b=d/2-m/2,p=v[u],g=P-h[l]-v[x],y=P/2-h[l]/2+b,O=ce(p,y,g),A=i;r.modifiersData[o]=(t={},t[A]=O,t.centerOffset=O-y,t)}}function Sr(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||xt(t.elements.popper,n)&&(t.elements.arrow=n))}const $r={name:"arrow",enabled:!0,phase:"main",fn:Ar,effect:Sr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(e){return e.split("-")[1]}var jr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kr(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:re(r*n)/n||0,y:re(o*n)/n||0}}function at(e){var t,r=e.popper,o=e.popperRect,n=e.placement,a=e.variation,c=e.offsets,s=e.position,i=e.gpuAcceleration,f=e.adaptive,l=e.roundOffsets,v=e.isFixed,h=c.x,u=h===void 0?0:h,x=c.y,d=x===void 0?0:x,m=typeof l=="function"?l({x:u,y:d}):{x:u,y:d};u=m.x,d=m.y;var w=c.hasOwnProperty("x"),P=c.hasOwnProperty("y"),b=F,p=B,g=window;if(f){var y=ve(r),O="clientHeight",A="clientWidth";if(y===W(r)&&(y=Y(r),q(y).position!=="static"&&s==="absolute"&&(O="scrollHeight",A="scrollWidth")),y=y,n===B||(n===F||n===H)&&a===pe){p=N;var C=v&&y===g&&g.visualViewport?g.visualViewport.height:y[O];d-=C-o.height,d*=i?1:-1}if(n===F||(n===B||n===N)&&a===pe){b=H;var R=v&&y===g&&g.visualViewport?g.visualViewport.width:y[A];u-=R-o.width,u*=i?1:-1}}var $=Object.assign({position:s},f&&jr),D=l===!0?kr({x:u,y:d},W(r)):{x:u,y:d};if(u=D.x,d=D.y,i){var S;return Object.assign({},$,(S={},S[p]=P?"0":"",S[b]=w?"0":"",S.transform=(g.devicePixelRatio||1)<=1?"translate("+u+"px, "+d+"px)":"translate3d("+u+"px, "+d+"px, 0)",S))}return Object.assign({},$,(t={},t[p]=P?d+"px":"",t[b]=w?u+"px":"",t.transform="",t))}function Dr(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,a=r.adaptive,c=a===void 0?!0:a,s=r.roundOffsets,i=s===void 0?!0:s,f={placement:U(t.placement),variation:ne(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,at(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:i})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,at(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Tr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Dr,data:{}};var be={passive:!0};function Mr(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,a=n===void 0?!0:n,c=o.resize,s=c===void 0?!0:c,i=W(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(l){l.addEventListener("scroll",r.update,be)}),s&&i.addEventListener("resize",r.update,be),function(){a&&f.forEach(function(l){l.removeEventListener("scroll",r.update,be)}),s&&i.removeEventListener("resize",r.update,be)}}const Br={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Mr,data:{}};var Fr={left:"right",right:"left",bottom:"top",top:"bottom"};function xe(e){return e.replace(/left|right|bottom|top/g,function(t){return Fr[t]})}var Wr={start:"end",end:"start"};function it(e){return e.replace(/start|end/g,function(t){return Wr[t]})}function Ne(e){var t=W(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function He(e){return oe(Y(e)).left+Ne(e).scrollLeft}function Lr(e,t){var r=W(e),o=Y(e),n=r.visualViewport,a=o.clientWidth,c=o.clientHeight,s=0,i=0;if(n){a=n.width,c=n.height;var f=bt();(f||!f&&t==="fixed")&&(s=n.offsetLeft,i=n.offsetTop)}return{width:a,height:c,x:s+He(e),y:i}}function Vr(e){var t,r=Y(e),o=Ne(e),n=(t=e.ownerDocument)==null?void 0:t.body,a=K(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),c=K(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-o.scrollLeft+He(e),i=-o.scrollTop;return q(n||r).direction==="rtl"&&(s+=K(r.clientWidth,n?n.clientWidth:0)-a),{width:a,height:c,x:s,y:i}}function Ue(e){var t=q(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function Et(e){return["html","body","#document"].indexOf(I(e))>=0?e.ownerDocument.body:V(e)&&Ue(e)?e:Et(Oe(e))}function fe(e,t){var r;t===void 0&&(t=[]);var o=Et(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),a=W(o),c=n?[a].concat(a.visualViewport||[],Ue(o)?o:[]):o,s=t.concat(c);return n?s:s.concat(fe(Oe(c)))}function je(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Nr(e,t){var r=oe(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function st(e,t,r){return t===gt?je(Lr(e,r)):Z(t)?Nr(t,r):je(Vr(Y(e)))}function Hr(e){var t=fe(Oe(e)),r=["absolute","fixed"].indexOf(q(e).position)>=0,o=r&&V(e)?ve(e):e;return Z(o)?t.filter(function(n){return Z(n)&&xt(n,o)&&I(n)!=="body"}):[]}function Ur(e,t,r,o){var n=t==="clippingParents"?Hr(e):[].concat(t),a=[].concat(n,[r]),c=a[0],s=a.reduce(function(i,f){var l=st(e,f,o);return i.top=K(l.top,i.top),i.right=we(l.right,i.right),i.bottom=we(l.bottom,i.bottom),i.left=K(l.left,i.left),i},st(e,c,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ct(e){var t=e.reference,r=e.element,o=e.placement,n=o?U(o):null,a=o?ne(o):null,c=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,i;switch(n){case B:i={x:c,y:t.y-r.height};break;case N:i={x:c,y:t.y+t.height};break;case H:i={x:t.x+t.width,y:s};break;case F:i={x:t.x-r.width,y:s};break;default:i={x:t.x,y:t.y}}var f=n?Ve(n):null;if(f!=null){var l=f==="y"?"height":"width";switch(a){case te:i[f]=i[f]-(t[l]/2-r[l]/2);break;case pe:i[f]=i[f]+(t[l]/2-r[l]/2);break}}return i}function ue(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,a=r.strategy,c=a===void 0?e.strategy:a,s=r.boundary,i=s===void 0?lr:s,f=r.rootBoundary,l=f===void 0?gt:f,v=r.elementContext,h=v===void 0?le:v,u=r.altBoundary,x=u===void 0?!1:u,d=r.padding,m=d===void 0?0:d,w=Ot(typeof m!="number"?m:Pt(m,de)),P=h===le?cr:le,b=e.rects.popper,p=e.elements[x?P:h],g=Ur(Z(p)?p:p.contextElement||Y(e.elements.popper),i,l,c),y=oe(e.elements.reference),O=Ct({reference:y,element:b,strategy:"absolute",placement:n}),A=je(Object.assign({},b,O)),C=h===le?A:y,R={top:g.top-C.top+w.top,bottom:C.bottom-g.bottom+w.bottom,left:g.left-C.left+w.left,right:C.right-g.right+w.right},$=e.modifiersData.offset;if(h===le&&$){var D=$[n];Object.keys(R).forEach(function(S){var k=[H,N].indexOf(S)>=0?1:-1,L=[B,N].indexOf(S)>=0?"y":"x";R[S]+=D[L]*k})}return R}function Ir(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,a=r.rootBoundary,c=r.padding,s=r.flipVariations,i=r.allowedAutoPlacements,f=i===void 0?yt:i,l=ne(o),v=l?s?ot:ot.filter(function(x){return ne(x)===l}):de,h=v.filter(function(x){return f.indexOf(x)>=0});h.length===0&&(h=v);var u=h.reduce(function(x,d){return x[d]=ue(e,{placement:d,boundary:n,rootBoundary:a,padding:c})[U(d)],x},{});return Object.keys(u).sort(function(x,d){return u[x]-u[d]})}function qr(e){if(U(e)===Fe)return[];var t=xe(e);return[it(e),t,it(t)]}function zr(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!0:c,i=r.fallbackPlacements,f=r.padding,l=r.boundary,v=r.rootBoundary,h=r.altBoundary,u=r.flipVariations,x=u===void 0?!0:u,d=r.allowedAutoPlacements,m=t.options.placement,w=U(m),P=w===m,b=i||(P||!x?[xe(m)]:qr(m)),p=[m].concat(b).reduce(function(ee,X){return ee.concat(U(X)===Fe?Ir(t,{placement:X,boundary:l,rootBoundary:v,padding:f,flipVariations:x,allowedAutoPlacements:d}):X)},[]),g=t.rects.reference,y=t.rects.popper,O=new Map,A=!0,C=p[0],R=0;R=0,L=k?"width":"height",j=ue(t,{placement:$,boundary:l,rootBoundary:v,altBoundary:h,padding:f}),M=k?S?H:F:S?N:B;g[L]>y[L]&&(M=xe(M));var z=xe(M),G=[];if(a&&G.push(j[D]<=0),s&&G.push(j[M]<=0,j[z]<=0),G.every(function(ee){return ee})){C=$,A=!1;break}O.set($,G)}if(A)for(var me=x?3:1,Pe=function(X){var se=p.find(function(ge){var _=O.get(ge);if(_)return _.slice(0,X).every(function(Ee){return Ee})});if(se)return C=se,"break"},ie=me;ie>0;ie--){var he=Pe(ie);if(he==="break")break}t.placement!==C&&(t.modifiersData[o]._skip=!0,t.placement=C,t.reset=!0)}}const Xr={name:"flip",enabled:!0,phase:"main",fn:zr,requiresIfExists:["offset"],data:{_skip:!1}};function lt(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ct(e){return[B,H,N,F].some(function(t){return e[t]>=0})}function Yr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,a=t.modifiersData.preventOverflow,c=ue(t,{elementContext:"reference"}),s=ue(t,{altBoundary:!0}),i=lt(c,o),f=lt(s,n,a),l=ct(i),v=ct(f);t.modifiersData[r]={referenceClippingOffsets:i,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":v})}const Gr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Yr};function _r(e,t,r){var o=U(e),n=[F,B].indexOf(o)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,c=a[0],s=a[1];return c=c||0,s=(s||0)*n,[F,H].indexOf(o)>=0?{x:s,y:c}:{x:c,y:s}}function Jr(e){var t=e.state,r=e.options,o=e.name,n=r.offset,a=n===void 0?[0,0]:n,c=yt.reduce(function(l,v){return l[v]=_r(v,t.rects,a),l},{}),s=c[t.placement],i=s.x,f=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=f),t.modifiersData[o]=c}const Kr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Jr};function Qr(e){var t=e.state,r=e.name;t.modifiersData[r]=Ct({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Zr={name:"popperOffsets",enabled:!0,phase:"read",fn:Qr,data:{}};function eo(e){return e==="x"?"y":"x"}function to(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!1:c,i=r.boundary,f=r.rootBoundary,l=r.altBoundary,v=r.padding,h=r.tether,u=h===void 0?!0:h,x=r.tetherOffset,d=x===void 0?0:x,m=ue(t,{boundary:i,rootBoundary:f,padding:v,altBoundary:l}),w=U(t.placement),P=ne(t.placement),b=!P,p=Ve(w),g=eo(p),y=t.modifiersData.popperOffsets,O=t.rects.reference,A=t.rects.popper,C=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,R=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(y){if(a){var S,k=p==="y"?B:F,L=p==="y"?N:H,j=p==="y"?"height":"width",M=y[p],z=M+m[k],G=M-m[L],me=u?-A[j]/2:0,Pe=P===te?O[j]:A[j],ie=P===te?-A[j]:-O[j],he=t.elements.arrow,ee=u&&he?Le(he):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:wt(),se=X[k],ge=X[L],_=ce(0,O[j],ee[j]),Ee=b?O[j]/2-me-_-se-R.mainAxis:Pe-_-se-R.mainAxis,At=b?-O[j]/2+me+_+ge+R.mainAxis:ie+_+ge+R.mainAxis,Ce=t.elements.arrow&&ve(t.elements.arrow),St=Ce?p==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ie=(S=$==null?void 0:$[p])!=null?S:0,$t=M+Ee-Ie-St,jt=M+At-Ie,qe=ce(u?we(z,$t):z,M,u?K(G,jt):G);y[p]=qe,D[p]=qe-M}if(s){var ze,kt=p==="x"?B:F,Dt=p==="x"?N:H,J=y[g],ye=g==="y"?"height":"width",Xe=J+m[kt],Ye=J-m[Dt],Re=[B,F].indexOf(w)!==-1,Ge=(ze=$==null?void 0:$[g])!=null?ze:0,_e=Re?Xe:J-O[ye]-A[ye]-Ge+R.altAxis,Je=Re?J+O[ye]+A[ye]-Ge-R.altAxis:Ye,Ke=u&&Re?Cr(_e,J,Je):ce(u?_e:Xe,J,u?Je:Ye);y[g]=Ke,D[g]=Ke-J}t.modifiersData[o]=D}}const ro={name:"preventOverflow",enabled:!0,phase:"main",fn:to,requiresIfExists:["offset"]};function oo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function no(e){return e===W(e)||!V(e)?Ne(e):oo(e)}function ao(e){var t=e.getBoundingClientRect(),r=re(t.width)/e.offsetWidth||1,o=re(t.height)/e.offsetHeight||1;return r!==1||o!==1}function io(e,t,r){r===void 0&&(r=!1);var o=V(t),n=V(t)&&ao(t),a=Y(t),c=oe(e,n,r),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(o||!o&&!r)&&((I(t)!=="body"||Ue(a))&&(s=no(t)),V(t)?(i=oe(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):a&&(i.x=He(a))),{x:c.left+s.scrollLeft-i.x,y:c.top+s.scrollTop-i.y,width:c.width,height:c.height}}function so(e){var t=new Map,r=new Set,o=[];e.forEach(function(a){t.set(a.name,a)});function n(a){r.add(a.name);var c=[].concat(a.requires||[],a.requiresIfExists||[]);c.forEach(function(s){if(!r.has(s)){var i=t.get(s);i&&n(i)}}),o.push(a)}return e.forEach(function(a){r.has(a.name)||n(a)}),o}function lo(e){var t=so(e);return br.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function co(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function fo(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var ft={placement:"bottom",modifiers:[],strategy:"absolute"};function pt(){for(var e=arguments.length,t=new Array(e),r=0;rDe({root:["root"]},sr(mo)),wo={},Oo=E.forwardRef(function(t,r){var o;const{anchorEl:n,children:a,direction:c,disablePortal:s,modifiers:i,open:f,placement:l,popperOptions:v,popperRef:h,slotProps:u={},slots:x={},TransitionProps:d}=t,m=ae(t,ho),w=E.useRef(null),P=tt(w,r),b=E.useRef(null),p=tt(b,h),g=E.useRef(p);rt(()=>{g.current=p},[p]),E.useImperativeHandle(h,()=>b.current,[]);const y=yo(l,c),[O,A]=E.useState(y),[C,R]=E.useState(ke(n));E.useEffect(()=>{b.current&&b.current.forceUpdate()}),E.useEffect(()=>{n&&R(ke(n))},[n]),rt(()=>{if(!C||!f)return;const L=z=>{A(z.placement)};let j=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:z})=>{L(z)}}];i!=null&&(j=j.concat(i)),v&&v.modifiers!=null&&(j=j.concat(v.modifiers));const M=vo(C,w.current,T({placement:y},v,{modifiers:j}));return g.current(M),()=>{M.destroy(),g.current(null)}},[C,s,i,f,v,y]);const $={placement:O};d!==null&&($.TransitionProps=d);const D=xo(),S=(o=x.root)!=null?o:"div",k=It({elementType:S,externalSlotProps:u.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:P},ownerState:t,className:D.root});return Q.jsx(S,T({},k,{children:typeof a=="function"?a($):a}))}),Po=E.forwardRef(function(t,r){const{anchorEl:o,children:n,container:a,direction:c="ltr",disablePortal:s=!1,keepMounted:i=!1,modifiers:f,open:l,placement:v="bottom",popperOptions:h=wo,popperRef:u,style:x,transition:d=!1,slotProps:m={},slots:w={}}=t,P=ae(t,go),[b,p]=E.useState(!0),g=()=>{p(!1)},y=()=>{p(!0)};if(!i&&!l&&(!d||b))return null;let O;if(a)O=a;else if(o){const R=ke(o);O=R&&bo(R)?et(R).body:et(null).body}const A=!l&&i&&(!d||b)?"none":void 0,C=d?{in:l,onEnter:g,onExited:y}:void 0;return Q.jsx(qt,{disablePortal:s,container:O,children:Q.jsx(Oo,T({anchorEl:o,direction:c,disablePortal:s,modifiers:f,ref:r,open:d?!b:l,placement:v,popperOptions:h,popperRef:u,slotProps:m,slots:w},P,{style:T({position:"fixed",top:0,left:0,display:A},x),TransitionProps:C,children:n}))})}),Eo=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Co=Me(Po,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ro=E.forwardRef(function(t,r){var o;const n=Ht(),a=Be({props:t,name:"MuiPopper"}),{anchorEl:c,component:s,components:i,componentsProps:f,container:l,disablePortal:v,keepMounted:h,modifiers:u,open:x,placement:d,popperOptions:m,popperRef:w,transition:P,slots:b,slotProps:p}=a,g=ae(a,Eo),y=(o=b==null?void 0:b.root)!=null?o:i==null?void 0:i.Root,O=T({anchorEl:c,container:l,disablePortal:v,keepMounted:h,modifiers:u,open:x,placement:d,popperOptions:m,popperRef:w,transition:P},g);return Q.jsx(Co,T({as:s,direction:n==null?void 0:n.direction,slots:{root:y},slotProps:p??f},O,{ref:r}))}),No=Ro;function Ho({props:e,states:t,muiFormControl:r}){return t.reduce((o,n)=>(o[n]=e[n],r&&typeof e[n]>"u"&&(o[n]=r[n]),o),{})}const Ao=E.createContext(void 0),Rt=Ao;function Uo(){return E.useContext(Rt)}function ut(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function dt(e,t=!1){return e&&(ut(e.value)&&e.value!==""||t&&ut(e.defaultValue)&&e.defaultValue!=="")}function So(e){return e.startAdornment}function $o(e){return Te("MuiFormControl",e)}vt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const jo=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],ko=e=>{const{classes:t,margin:r,fullWidth:o}=e,n={root:["root",r!=="none"&&`margin${mt(r)}`,o&&"fullWidth"]};return De(n,$o,t)},Do=Me("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>T({},t.root,t[`margin${mt(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>T({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),To=E.forwardRef(function(t,r){const o=Be({props:t,name:"MuiFormControl"}),{children:n,className:a,color:c="primary",component:s="div",disabled:i=!1,error:f=!1,focused:l,fullWidth:v=!1,hiddenLabel:h=!1,margin:u="none",required:x=!1,size:d="medium",variant:m="outlined"}=o,w=ae(o,jo),P=T({},o,{color:c,component:s,disabled:i,error:f,fullWidth:v,hiddenLabel:h,margin:u,required:x,size:d,variant:m}),b=ko(P),[p,g]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,k=>{if(!Se(k,["Input","Select"]))return;const L=Se(k,["Select"])?k.props.input:k;L&&So(L.props)&&(S=!0)}),S}),[y,O]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,k=>{Se(k,["Input","Select"])&&(dt(k.props,!0)||dt(k.props.inputProps,!0))&&(S=!0)}),S}),[A,C]=E.useState(!1);i&&A&&C(!1);const R=l!==void 0&&!i?l:A;let $;const D=E.useMemo(()=>({adornedStart:p,setAdornedStart:g,color:c,disabled:i,error:f,filled:y,focused:R,fullWidth:v,hiddenLabel:h,size:d,onBlur:()=>{C(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{C(!0)},registerEffect:$,required:x,variant:m}),[p,c,i,f,y,R,v,h,$,x,d,m]);return Q.jsx(Rt.Provider,{value:D,children:Q.jsx(Do,T({as:s,ownerState:P,className:Ut(b.root,a),ref:r},w,{children:n}))})}),Io=To,Mo=nr({createStyledComponent:Me("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Be({props:e,name:"MuiStack"})}),qo=Mo;export{Io as F,No as P,qo as S,Uo as a,Rt as b,Yt as e,Ho as f,dt as i,Vo as u}; diff --git a/build/assets/Streamable-7026e6ba.js b/build/assets/Streamable-32ea3232.js similarity index 95% rename from build/assets/Streamable-7026e6ba.js rename to build/assets/Streamable-32ea3232.js index 397dfc1b7..13b10fa3d 100644 --- a/build/assets/Streamable-7026e6ba.js +++ b/build/assets/Streamable-32ea3232.js @@ -1 +1 @@ -import{n as m,r as f}from"./index-a0989d63.js";import{u as _,p as b}from"./index-159c08bd.js";function P(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,l=Object.defineProperty,v=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,L=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!j.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=v(e,a))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?g(S(t)):{},c(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>c(l({},"__esModule",{value:!0}),t),o=(t,e,r)=>(L(t,typeof e!="symbol"?e+"":e,r),r),h={};w(h,{default:()=>i});var y=E(h),p=D(f),u=_,d=b;const M="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class i extends p.Component{constructor(){super(...arguments),o(this,"callPlayer",u.callPlayer),o(this,"duration",null),o(this,"currentTime",null),o(this,"secondsLoaded",null),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")}),o(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(M,T).then(r=>{this.iframe&&(this.player=new r.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({duration:s,seconds:a})=>{this.duration=s,this.currentTime=a}),this.player.on("buffered",({percent:s})=>{this.duration&&(this.secondsLoaded=this.duration*s)}),this.props.muted&&this.player.mute())},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(d.MATCH_URL_STREAMABLE)[1],r={width:"100%",height:"100%"};return p.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:r,allow:"encrypted-media; autoplay; fullscreen;"})}}o(i,"displayName","Streamable");o(i,"canPlay",d.canPlay.streamable);const x=m(y),N=P({__proto__:null,default:x},[y]);export{N as S}; +import{n as m,r as f}from"./index-022521cf.js";import{u as _,p as b}from"./index-4378ec35.js";function P(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,l=Object.defineProperty,v=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,L=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!j.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=v(e,a))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?g(S(t)):{},c(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>c(l({},"__esModule",{value:!0}),t),o=(t,e,r)=>(L(t,typeof e!="symbol"?e+"":e,r),r),h={};w(h,{default:()=>i});var y=E(h),p=D(f),u=_,d=b;const M="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class i extends p.Component{constructor(){super(...arguments),o(this,"callPlayer",u.callPlayer),o(this,"duration",null),o(this,"currentTime",null),o(this,"secondsLoaded",null),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")}),o(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(M,T).then(r=>{this.iframe&&(this.player=new r.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({duration:s,seconds:a})=>{this.duration=s,this.currentTime=a}),this.player.on("buffered",({percent:s})=>{this.duration&&(this.secondsLoaded=this.duration*s)}),this.props.muted&&this.player.mute())},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(d.MATCH_URL_STREAMABLE)[1],r={width:"100%",height:"100%"};return p.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:r,allow:"encrypted-media; autoplay; fullscreen;"})}}o(i,"displayName","Streamable");o(i,"canPlay",d.canPlay.streamable);const x=m(y),N=P({__proto__:null,default:x},[y]);export{N as S}; diff --git a/build/assets/Tabs-cb4f54fe.js b/build/assets/Tabs-2c5124a1.js similarity index 98% rename from build/assets/Tabs-cb4f54fe.js rename to build/assets/Tabs-2c5124a1.js index 5ee60f85b..75b784346 100644 --- a/build/assets/Tabs-cb4f54fe.js +++ b/build/assets/Tabs-2c5124a1.js @@ -1 +1 @@ -import{g as ft,b as pt,s as O,e as Pt,_ as b,r as c,u as ht,a as rt,c as L,j as S,d as St,ac as Lt}from"./index-a0989d63.js";import{p as Nt,f as Zt,g as ut}from"./index-775b6bc6.js";import{d as $t,a as kt,u as lt,o as te}from"./useSlotProps-374609c4.js";import{c as Ft}from"./createSvgIcon-ebe0e3e6.js";let U;function At(){if(U)return U;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),U="reverse",t.scrollLeft>0?U="default":(t.scrollLeft=1,t.scrollLeft===0&&(U="negative")),document.body.removeChild(t),U}function ee(t,e){const r=t.scrollLeft;if(e!=="rtl")return r;switch(At()){case"negative":return t.scrollWidth-t.clientWidth+r;case"reverse":return t.scrollWidth-t.clientWidth-r;default:return r}}function oe(t){return pt("MuiTab",t)}const le=ft("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),A=le,re=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ne=t=>{const{classes:e,textColor:r,fullWidth:a,wrapped:n,icon:d,label:h,selected:p,disabled:u}=t,m={root:["root",d&&h&&"labelIcon",`textColor${Pt(r)}`,a&&"fullWidth",n&&"wrapped",p&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return St(m,oe,e)},se=O(Nt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${Pt(r.textColor)}`],r.fullWidth&&e.fullWidth,r.wrapped&&e.wrapped]}})(({theme:t,ownerState:e})=>b({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${A.iconWrapper}`]:b({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${A.selected}`]:{opacity:1},[`&.${A.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),ae=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTab"}),{className:n,disabled:d=!1,disableFocusRipple:h=!1,fullWidth:p,icon:u,iconPosition:m="top",indicator:w,label:T,onChange:y,onClick:x,onFocus:j,selected:I,selectionFollowsFocus:g,textColor:H="inherit",value:C,wrapped:nt=!1}=a,D=rt(a,re),Y=b({},a,{disabled:d,disableFocusRipple:h,selected:I,icon:!!u,iconPosition:m,label:!!T,fullWidth:p,textColor:H,wrapped:nt}),X=ne(Y),N=u&&T&&c.isValidElement(u)?c.cloneElement(u,{className:L(X.iconWrapper,u.props.className)}):u,J=R=>{!I&&y&&y(R,C),x&&x(R)},_=R=>{g&&!I&&y&&y(R,C),j&&j(R)};return S.jsxs(se,b({focusRipple:!h,className:L(X.root,n),ref:r,role:"tab","aria-selected":I,disabled:d,onClick:J,onFocus:_,ownerState:Y,tabIndex:I?0:-1},D,{children:[m==="top"||m==="start"?S.jsxs(c.Fragment,{children:[N,T]}):S.jsxs(c.Fragment,{children:[T,N]}),w]}))}),Fe=ae,ie=Ft(S.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ce=Ft(S.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function de(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ue(t,e,r,a={},n=()=>{}){const{ease:d=de,duration:h=300}=a;let p=null;const u=e[t];let m=!1;const w=()=>{m=!0},T=y=>{if(m){n(new Error("Animation cancelled"));return}p===null&&(p=y);const x=Math.min(1,(y-p)/h);if(e[t]=d(x)*(r-u)+u,x>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(T)};return u===r?(n(new Error("Element already at target position")),w):(requestAnimationFrame(T),w)}const be=["onChange"],fe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function pe(t){const{onChange:e}=t,r=rt(t,be),a=c.useRef(),n=c.useRef(null),d=()=>{a.current=n.current.offsetHeight-n.current.clientHeight};return Zt(()=>{const h=$t(()=>{const u=a.current;d(),u!==a.current&&e(a.current)}),p=kt(n.current);return p.addEventListener("resize",h),()=>{h.clear(),p.removeEventListener("resize",h)}},[e]),c.useEffect(()=>{d(),e(a.current)},[e]),S.jsx("div",b({style:fe,ref:n},r))}function he(t){return pt("MuiTabScrollButton",t)}const Se=ft("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),ve=Se,me=["className","slots","slotProps","direction","orientation","disabled"],xe=t=>{const{classes:e,orientation:r,disabled:a}=t;return St({root:["root",r,a&&"disabled"]},he,e)},ge=O(Nt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.orientation&&e[r.orientation]]}})(({ownerState:t})=>b({width:40,flexShrink:0,opacity:.8,[`&.${ve.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),ye=c.forwardRef(function(e,r){var a,n;const d=ht({props:e,name:"MuiTabScrollButton"}),{className:h,slots:p={},slotProps:u={},direction:m}=d,w=rt(d,me),y=Lt().direction==="rtl",x=b({isRtl:y},d),j=xe(x),I=(a=p.StartScrollButtonIcon)!=null?a:ie,g=(n=p.EndScrollButtonIcon)!=null?n:ce,H=lt({elementType:I,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x}),C=lt({elementType:g,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x});return S.jsx(ge,b({component:"div",className:L(j.root,h),ref:r,role:null,ownerState:x,tabIndex:null},w,{children:m==="left"?S.jsx(I,b({},H)):S.jsx(g,b({},C))}))}),Ce=ye;function Be(t){return pt("MuiTabs",t)}const we=ft("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),bt=we,Te=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Rt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,zt=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,ot=(t,e,r)=>{let a=!1,n=r(t,e);for(;n;){if(n===t.firstChild){if(a)return;a=!0}const d=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||d)n=r(t,n);else{n.focus();return}}},Ie=t=>{const{vertical:e,fixed:r,hideScrollbar:a,scrollableX:n,scrollableY:d,centered:h,scrollButtonsHideMobile:p,classes:u}=t;return St({root:["root",e&&"vertical"],scroller:["scroller",r&&"fixed",a&&"hideScrollbar",n&&"scrollableX",d&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",h&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",p&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[a&&"hideScrollbar"]},Be,u)},Ee=O("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${bt.scrollButtons}`]:e.scrollButtons},{[`& .${bt.scrollButtons}`]:r.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,r.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>b({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${bt.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Me=O("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.scroller,r.fixed&&e.fixed,r.hideScrollbar&&e.hideScrollbar,r.scrollableX&&e.scrollableX,r.scrollableY&&e.scrollableY]}})(({ownerState:t})=>b({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Re=O("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.flexContainer,r.vertical&&e.flexContainerVertical,r.centered&&e.centered]}})(({ownerState:t})=>b({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),ze=O("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>b({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),We=O(pe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Wt={},Pe=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTabs"}),n=Lt(),d=n.direction==="rtl",{"aria-label":h,"aria-labelledby":p,action:u,centered:m=!1,children:w,className:T,component:y="div",allowScrollButtonsMobile:x=!1,indicatorColor:j="primary",onChange:I,orientation:g="horizontal",ScrollButtonComponent:H=Ce,scrollButtons:C="auto",selectionFollowsFocus:nt,slots:D={},slotProps:Y={},TabIndicatorProps:X={},TabScrollButtonProps:N={},textColor:J="primary",value:_,variant:R="standard",visibleScrollbar:st=!1}=a,Ot=rt(a,Te),E=R==="scrollable",B=g==="vertical",K=B?"scrollTop":"scrollLeft",Q=B?"top":"left",Z=B?"bottom":"right",at=B?"clientHeight":"clientWidth",V=B?"height":"width",$=b({},a,{component:y,allowScrollButtonsMobile:x,indicatorColor:j,orientation:g,vertical:B,scrollButtons:C,textColor:J,variant:R,visibleScrollbar:st,fixed:!E,hideScrollbar:E&&!st,scrollableX:E&&!B,scrollableY:E&&B,centered:m&&!E,scrollButtonsHideMobile:!x}),W=Ie($),jt=lt({elementType:D.StartScrollButtonIcon,externalSlotProps:Y.startScrollButtonIcon,ownerState:$}),Ht=lt({elementType:D.EndScrollButtonIcon,externalSlotProps:Y.endScrollButtonIcon,ownerState:$}),[vt,Dt]=c.useState(!1),[k,mt]=c.useState(Wt),[xt,Xt]=c.useState(!1),[gt,_t]=c.useState(!1),[yt,Ut]=c.useState(!1),[Ct,Yt]=c.useState({overflow:"hidden",scrollbarWidth:0}),Bt=new Map,z=c.useRef(null),F=c.useRef(null),wt=()=>{const o=z.current;let l;if(o){const s=o.getBoundingClientRect();l={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ee(o,n.direction),scrollWidth:o.scrollWidth,top:s.top,bottom:s.bottom,left:s.left,right:s.right}}let i;if(o&&_!==!1){const s=F.current.children;if(s.length>0){const f=s[Bt.get(_)];i=f?f.getBoundingClientRect():null}}return{tabsMeta:l,tabMeta:i}},q=ut(()=>{const{tabsMeta:o,tabMeta:l}=wt();let i=0,s;if(B)s="top",l&&o&&(i=l.top-o.top+o.scrollTop);else if(s=d?"right":"left",l&&o){const v=d?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;i=(d?-1:1)*(l[s]-o[s]+v)}const f={[s]:i,[V]:l?l[V]:0};if(isNaN(k[s])||isNaN(k[V]))mt(f);else{const v=Math.abs(k[s]-f[s]),M=Math.abs(k[V]-f[V]);(v>=1||M>=1)&&mt(f)}}),it=(o,{animation:l=!0}={})=>{l?ue(K,z.current,o,{duration:n.transitions.duration.standard}):z.current[K]=o},Tt=o=>{let l=z.current[K];B?l+=o:(l+=o*(d?-1:1),l*=d&&At()==="reverse"?-1:1),it(l)},It=()=>{const o=z.current[at];let l=0;const i=Array.from(F.current.children);for(let s=0;so){s===0&&(l=o);break}l+=f[at]}return l},Kt=()=>{Tt(-1*It())},Vt=()=>{Tt(It())},qt=c.useCallback(o=>{Yt({overflow:null,scrollbarWidth:o})},[]),Gt=()=>{const o={};o.scrollbarSizeListener=E?S.jsx(We,{onChange:qt,className:L(W.scrollableX,W.hideScrollbar)}):null;const i=E&&(C==="auto"&&(xt||gt)||C===!0);return o.scrollButtonStart=i?S.jsx(H,b({slots:{StartScrollButtonIcon:D.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:jt},orientation:g,direction:d?"right":"left",onClick:Kt,disabled:!xt},N,{className:L(W.scrollButtons,N.className)})):null,o.scrollButtonEnd=i?S.jsx(H,b({slots:{EndScrollButtonIcon:D.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ht},orientation:g,direction:d?"left":"right",onClick:Vt,disabled:!gt},N,{className:L(W.scrollButtons,N.className)})):null,o},Et=ut(o=>{const{tabsMeta:l,tabMeta:i}=wt();if(!(!i||!l)){if(i[Q]l[Z]){const s=l[K]+(i[Z]-l[Z]);it(s,{animation:o})}}}),tt=ut(()=>{E&&C!==!1&&Ut(!yt)});c.useEffect(()=>{const o=$t(()=>{z.current&&q()});let l;const i=v=>{v.forEach(M=>{M.removedNodes.forEach(G=>{var P;(P=l)==null||P.unobserve(G)}),M.addedNodes.forEach(G=>{var P;(P=l)==null||P.observe(G)})}),o(),tt()},s=kt(z.current);s.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(l=new ResizeObserver(o),Array.from(F.current.children).forEach(v=>{l.observe(v)})),typeof MutationObserver<"u"&&(f=new MutationObserver(i),f.observe(F.current,{childList:!0})),()=>{var v,M;o.clear(),s.removeEventListener("resize",o),(v=f)==null||v.disconnect(),(M=l)==null||M.disconnect()}},[q,tt]),c.useEffect(()=>{const o=Array.from(F.current.children),l=o.length;if(typeof IntersectionObserver<"u"&&l>0&&E&&C!==!1){const i=o[0],s=o[l-1],f={root:z.current,threshold:.99},v=dt=>{Xt(!dt[0].isIntersecting)},M=new IntersectionObserver(v,f);M.observe(i);const G=dt=>{_t(!dt[0].isIntersecting)},P=new IntersectionObserver(G,f);return P.observe(s),()=>{M.disconnect(),P.disconnect()}}},[E,C,yt,w==null?void 0:w.length]),c.useEffect(()=>{Dt(!0)},[]),c.useEffect(()=>{q()}),c.useEffect(()=>{Et(Wt!==k)},[Et,k]),c.useImperativeHandle(u,()=>({updateIndicator:q,updateScrollButtons:tt}),[q,tt]);const Mt=S.jsx(ze,b({},X,{className:L(W.indicator,X.className),ownerState:$,style:b({},k,X.style)}));let et=0;const Jt=c.Children.map(w,o=>{if(!c.isValidElement(o))return null;const l=o.props.value===void 0?et:o.props.value;Bt.set(l,et);const i=l===_;return et+=1,c.cloneElement(o,b({fullWidth:R==="fullWidth",indicator:i&&!vt&&Mt,selected:i,selectionFollowsFocus:nt,onChange:I,textColor:J,value:l},et===1&&_===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),Qt=o=>{const l=F.current,i=te(l).activeElement;if(i.getAttribute("role")!=="tab")return;let f=g==="horizontal"?"ArrowLeft":"ArrowUp",v=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&d&&(f="ArrowRight",v="ArrowLeft"),o.key){case f:o.preventDefault(),ot(l,i,zt);break;case v:o.preventDefault(),ot(l,i,Rt);break;case"Home":o.preventDefault(),ot(l,null,Rt);break;case"End":o.preventDefault(),ot(l,null,zt);break}},ct=Gt();return S.jsxs(Ee,b({className:L(W.root,T),ownerState:$,ref:r,as:y},Ot,{children:[ct.scrollButtonStart,ct.scrollbarSizeListener,S.jsxs(Me,{className:W.scroller,ownerState:$,style:{overflow:Ct.overflow,[B?`margin${d?"Left":"Right"}`:"marginBottom"]:st?void 0:-Ct.scrollbarWidth},ref:z,children:[S.jsx(Re,{"aria-label":h,"aria-labelledby":p,"aria-orientation":g==="vertical"?"vertical":null,className:W.flexContainer,ownerState:$,onKeyDown:Qt,ref:F,role:"tablist",children:Jt}),vt&&Mt]}),ct.scrollButtonEnd]}))}),Ae=Pe;export{Ae as T,Fe as a}; +import{g as ft,b as pt,s as O,e as Pt,_ as b,r as c,u as ht,a as rt,c as L,j as S,d as St,ac as Lt}from"./index-022521cf.js";import{p as Nt,f as Zt,g as ut}from"./index-586dfb7f.js";import{d as $t,a as kt,u as lt,o as te}from"./useSlotProps-51fc8b9f.js";import{c as Ft}from"./createSvgIcon-e1ebdfca.js";let U;function At(){if(U)return U;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),U="reverse",t.scrollLeft>0?U="default":(t.scrollLeft=1,t.scrollLeft===0&&(U="negative")),document.body.removeChild(t),U}function ee(t,e){const r=t.scrollLeft;if(e!=="rtl")return r;switch(At()){case"negative":return t.scrollWidth-t.clientWidth+r;case"reverse":return t.scrollWidth-t.clientWidth-r;default:return r}}function oe(t){return pt("MuiTab",t)}const le=ft("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),A=le,re=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ne=t=>{const{classes:e,textColor:r,fullWidth:a,wrapped:n,icon:d,label:h,selected:p,disabled:u}=t,m={root:["root",d&&h&&"labelIcon",`textColor${Pt(r)}`,a&&"fullWidth",n&&"wrapped",p&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return St(m,oe,e)},se=O(Nt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${Pt(r.textColor)}`],r.fullWidth&&e.fullWidth,r.wrapped&&e.wrapped]}})(({theme:t,ownerState:e})=>b({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${A.iconWrapper}`]:b({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${A.selected}`]:{opacity:1},[`&.${A.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),ae=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTab"}),{className:n,disabled:d=!1,disableFocusRipple:h=!1,fullWidth:p,icon:u,iconPosition:m="top",indicator:w,label:T,onChange:y,onClick:x,onFocus:j,selected:I,selectionFollowsFocus:g,textColor:H="inherit",value:C,wrapped:nt=!1}=a,D=rt(a,re),Y=b({},a,{disabled:d,disableFocusRipple:h,selected:I,icon:!!u,iconPosition:m,label:!!T,fullWidth:p,textColor:H,wrapped:nt}),X=ne(Y),N=u&&T&&c.isValidElement(u)?c.cloneElement(u,{className:L(X.iconWrapper,u.props.className)}):u,J=R=>{!I&&y&&y(R,C),x&&x(R)},_=R=>{g&&!I&&y&&y(R,C),j&&j(R)};return S.jsxs(se,b({focusRipple:!h,className:L(X.root,n),ref:r,role:"tab","aria-selected":I,disabled:d,onClick:J,onFocus:_,ownerState:Y,tabIndex:I?0:-1},D,{children:[m==="top"||m==="start"?S.jsxs(c.Fragment,{children:[N,T]}):S.jsxs(c.Fragment,{children:[T,N]}),w]}))}),Fe=ae,ie=Ft(S.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ce=Ft(S.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function de(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ue(t,e,r,a={},n=()=>{}){const{ease:d=de,duration:h=300}=a;let p=null;const u=e[t];let m=!1;const w=()=>{m=!0},T=y=>{if(m){n(new Error("Animation cancelled"));return}p===null&&(p=y);const x=Math.min(1,(y-p)/h);if(e[t]=d(x)*(r-u)+u,x>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(T)};return u===r?(n(new Error("Element already at target position")),w):(requestAnimationFrame(T),w)}const be=["onChange"],fe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function pe(t){const{onChange:e}=t,r=rt(t,be),a=c.useRef(),n=c.useRef(null),d=()=>{a.current=n.current.offsetHeight-n.current.clientHeight};return Zt(()=>{const h=$t(()=>{const u=a.current;d(),u!==a.current&&e(a.current)}),p=kt(n.current);return p.addEventListener("resize",h),()=>{h.clear(),p.removeEventListener("resize",h)}},[e]),c.useEffect(()=>{d(),e(a.current)},[e]),S.jsx("div",b({style:fe,ref:n},r))}function he(t){return pt("MuiTabScrollButton",t)}const Se=ft("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),ve=Se,me=["className","slots","slotProps","direction","orientation","disabled"],xe=t=>{const{classes:e,orientation:r,disabled:a}=t;return St({root:["root",r,a&&"disabled"]},he,e)},ge=O(Nt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.orientation&&e[r.orientation]]}})(({ownerState:t})=>b({width:40,flexShrink:0,opacity:.8,[`&.${ve.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),ye=c.forwardRef(function(e,r){var a,n;const d=ht({props:e,name:"MuiTabScrollButton"}),{className:h,slots:p={},slotProps:u={},direction:m}=d,w=rt(d,me),y=Lt().direction==="rtl",x=b({isRtl:y},d),j=xe(x),I=(a=p.StartScrollButtonIcon)!=null?a:ie,g=(n=p.EndScrollButtonIcon)!=null?n:ce,H=lt({elementType:I,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x}),C=lt({elementType:g,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x});return S.jsx(ge,b({component:"div",className:L(j.root,h),ref:r,role:null,ownerState:x,tabIndex:null},w,{children:m==="left"?S.jsx(I,b({},H)):S.jsx(g,b({},C))}))}),Ce=ye;function Be(t){return pt("MuiTabs",t)}const we=ft("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),bt=we,Te=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Rt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,zt=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,ot=(t,e,r)=>{let a=!1,n=r(t,e);for(;n;){if(n===t.firstChild){if(a)return;a=!0}const d=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||d)n=r(t,n);else{n.focus();return}}},Ie=t=>{const{vertical:e,fixed:r,hideScrollbar:a,scrollableX:n,scrollableY:d,centered:h,scrollButtonsHideMobile:p,classes:u}=t;return St({root:["root",e&&"vertical"],scroller:["scroller",r&&"fixed",a&&"hideScrollbar",n&&"scrollableX",d&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",h&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",p&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[a&&"hideScrollbar"]},Be,u)},Ee=O("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${bt.scrollButtons}`]:e.scrollButtons},{[`& .${bt.scrollButtons}`]:r.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,r.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>b({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${bt.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Me=O("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.scroller,r.fixed&&e.fixed,r.hideScrollbar&&e.hideScrollbar,r.scrollableX&&e.scrollableX,r.scrollableY&&e.scrollableY]}})(({ownerState:t})=>b({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Re=O("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.flexContainer,r.vertical&&e.flexContainerVertical,r.centered&&e.centered]}})(({ownerState:t})=>b({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),ze=O("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>b({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),We=O(pe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Wt={},Pe=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTabs"}),n=Lt(),d=n.direction==="rtl",{"aria-label":h,"aria-labelledby":p,action:u,centered:m=!1,children:w,className:T,component:y="div",allowScrollButtonsMobile:x=!1,indicatorColor:j="primary",onChange:I,orientation:g="horizontal",ScrollButtonComponent:H=Ce,scrollButtons:C="auto",selectionFollowsFocus:nt,slots:D={},slotProps:Y={},TabIndicatorProps:X={},TabScrollButtonProps:N={},textColor:J="primary",value:_,variant:R="standard",visibleScrollbar:st=!1}=a,Ot=rt(a,Te),E=R==="scrollable",B=g==="vertical",K=B?"scrollTop":"scrollLeft",Q=B?"top":"left",Z=B?"bottom":"right",at=B?"clientHeight":"clientWidth",V=B?"height":"width",$=b({},a,{component:y,allowScrollButtonsMobile:x,indicatorColor:j,orientation:g,vertical:B,scrollButtons:C,textColor:J,variant:R,visibleScrollbar:st,fixed:!E,hideScrollbar:E&&!st,scrollableX:E&&!B,scrollableY:E&&B,centered:m&&!E,scrollButtonsHideMobile:!x}),W=Ie($),jt=lt({elementType:D.StartScrollButtonIcon,externalSlotProps:Y.startScrollButtonIcon,ownerState:$}),Ht=lt({elementType:D.EndScrollButtonIcon,externalSlotProps:Y.endScrollButtonIcon,ownerState:$}),[vt,Dt]=c.useState(!1),[k,mt]=c.useState(Wt),[xt,Xt]=c.useState(!1),[gt,_t]=c.useState(!1),[yt,Ut]=c.useState(!1),[Ct,Yt]=c.useState({overflow:"hidden",scrollbarWidth:0}),Bt=new Map,z=c.useRef(null),F=c.useRef(null),wt=()=>{const o=z.current;let l;if(o){const s=o.getBoundingClientRect();l={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ee(o,n.direction),scrollWidth:o.scrollWidth,top:s.top,bottom:s.bottom,left:s.left,right:s.right}}let i;if(o&&_!==!1){const s=F.current.children;if(s.length>0){const f=s[Bt.get(_)];i=f?f.getBoundingClientRect():null}}return{tabsMeta:l,tabMeta:i}},q=ut(()=>{const{tabsMeta:o,tabMeta:l}=wt();let i=0,s;if(B)s="top",l&&o&&(i=l.top-o.top+o.scrollTop);else if(s=d?"right":"left",l&&o){const v=d?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;i=(d?-1:1)*(l[s]-o[s]+v)}const f={[s]:i,[V]:l?l[V]:0};if(isNaN(k[s])||isNaN(k[V]))mt(f);else{const v=Math.abs(k[s]-f[s]),M=Math.abs(k[V]-f[V]);(v>=1||M>=1)&&mt(f)}}),it=(o,{animation:l=!0}={})=>{l?ue(K,z.current,o,{duration:n.transitions.duration.standard}):z.current[K]=o},Tt=o=>{let l=z.current[K];B?l+=o:(l+=o*(d?-1:1),l*=d&&At()==="reverse"?-1:1),it(l)},It=()=>{const o=z.current[at];let l=0;const i=Array.from(F.current.children);for(let s=0;so){s===0&&(l=o);break}l+=f[at]}return l},Kt=()=>{Tt(-1*It())},Vt=()=>{Tt(It())},qt=c.useCallback(o=>{Yt({overflow:null,scrollbarWidth:o})},[]),Gt=()=>{const o={};o.scrollbarSizeListener=E?S.jsx(We,{onChange:qt,className:L(W.scrollableX,W.hideScrollbar)}):null;const i=E&&(C==="auto"&&(xt||gt)||C===!0);return o.scrollButtonStart=i?S.jsx(H,b({slots:{StartScrollButtonIcon:D.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:jt},orientation:g,direction:d?"right":"left",onClick:Kt,disabled:!xt},N,{className:L(W.scrollButtons,N.className)})):null,o.scrollButtonEnd=i?S.jsx(H,b({slots:{EndScrollButtonIcon:D.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ht},orientation:g,direction:d?"left":"right",onClick:Vt,disabled:!gt},N,{className:L(W.scrollButtons,N.className)})):null,o},Et=ut(o=>{const{tabsMeta:l,tabMeta:i}=wt();if(!(!i||!l)){if(i[Q]l[Z]){const s=l[K]+(i[Z]-l[Z]);it(s,{animation:o})}}}),tt=ut(()=>{E&&C!==!1&&Ut(!yt)});c.useEffect(()=>{const o=$t(()=>{z.current&&q()});let l;const i=v=>{v.forEach(M=>{M.removedNodes.forEach(G=>{var P;(P=l)==null||P.unobserve(G)}),M.addedNodes.forEach(G=>{var P;(P=l)==null||P.observe(G)})}),o(),tt()},s=kt(z.current);s.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(l=new ResizeObserver(o),Array.from(F.current.children).forEach(v=>{l.observe(v)})),typeof MutationObserver<"u"&&(f=new MutationObserver(i),f.observe(F.current,{childList:!0})),()=>{var v,M;o.clear(),s.removeEventListener("resize",o),(v=f)==null||v.disconnect(),(M=l)==null||M.disconnect()}},[q,tt]),c.useEffect(()=>{const o=Array.from(F.current.children),l=o.length;if(typeof IntersectionObserver<"u"&&l>0&&E&&C!==!1){const i=o[0],s=o[l-1],f={root:z.current,threshold:.99},v=dt=>{Xt(!dt[0].isIntersecting)},M=new IntersectionObserver(v,f);M.observe(i);const G=dt=>{_t(!dt[0].isIntersecting)},P=new IntersectionObserver(G,f);return P.observe(s),()=>{M.disconnect(),P.disconnect()}}},[E,C,yt,w==null?void 0:w.length]),c.useEffect(()=>{Dt(!0)},[]),c.useEffect(()=>{q()}),c.useEffect(()=>{Et(Wt!==k)},[Et,k]),c.useImperativeHandle(u,()=>({updateIndicator:q,updateScrollButtons:tt}),[q,tt]);const Mt=S.jsx(ze,b({},X,{className:L(W.indicator,X.className),ownerState:$,style:b({},k,X.style)}));let et=0;const Jt=c.Children.map(w,o=>{if(!c.isValidElement(o))return null;const l=o.props.value===void 0?et:o.props.value;Bt.set(l,et);const i=l===_;return et+=1,c.cloneElement(o,b({fullWidth:R==="fullWidth",indicator:i&&!vt&&Mt,selected:i,selectionFollowsFocus:nt,onChange:I,textColor:J,value:l},et===1&&_===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),Qt=o=>{const l=F.current,i=te(l).activeElement;if(i.getAttribute("role")!=="tab")return;let f=g==="horizontal"?"ArrowLeft":"ArrowUp",v=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&d&&(f="ArrowRight",v="ArrowLeft"),o.key){case f:o.preventDefault(),ot(l,i,zt);break;case v:o.preventDefault(),ot(l,i,Rt);break;case"Home":o.preventDefault(),ot(l,null,Rt);break;case"End":o.preventDefault(),ot(l,null,zt);break}},ct=Gt();return S.jsxs(Ee,b({className:L(W.root,T),ownerState:$,ref:r,as:y},Ot,{children:[ct.scrollButtonStart,ct.scrollbarSizeListener,S.jsxs(Me,{className:W.scroller,ownerState:$,style:{overflow:Ct.overflow,[B?`margin${d?"Left":"Right"}`:"marginBottom"]:st?void 0:-Ct.scrollbarWidth},ref:z,children:[S.jsx(Re,{"aria-label":h,"aria-labelledby":p,"aria-orientation":g==="vertical"?"vertical":null,className:W.flexContainer,ownerState:$,onKeyDown:Qt,ref:F,role:"tablist",children:Jt}),vt&&Mt]}),ct.scrollButtonEnd]}))}),Ae=Pe;export{Ae as T,Fe as a}; diff --git a/build/assets/TextareaAutosize-76d3e8d6.js b/build/assets/TextareaAutosize-0ace781b.js similarity index 91% rename from build/assets/TextareaAutosize-76d3e8d6.js rename to build/assets/TextareaAutosize-0ace781b.js index 10979cc96..81cc5fe85 100644 --- a/build/assets/TextareaAutosize-76d3e8d6.js +++ b/build/assets/TextareaAutosize-0ace781b.js @@ -1,2 +1,2 @@ -import{r as o,a as L,j as v,_ as b,h as I}from"./index-a0989d63.js";import{e as D,f as T}from"./index-775b6bc6.js";import{a as F,d as P}from"./useSlotProps-374609c4.js";const U=["onChange","maxRows","minRows","style","value"];function w(r){return parseInt(r,10)||0}const V={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function M(r){return r==null||Object.keys(r).length===0||r.outerHeightStyle===0&&!r.overflow}const J=o.forwardRef(function(l,O){const{onChange:R,maxRows:x,minRows:h=1,style:S,value:y}=l,k=L(l,U),{current:A}=o.useRef(y!=null),p=o.useRef(null),N=D(O,p),H=o.useRef(null),c=o.useRef(0),[z,E]=o.useState({outerHeightStyle:0}),f=o.useCallback(()=>{const e=p.current,n=F(e).getComputedStyle(e);if(n.width==="0px")return{outerHeightStyle:0};const t=H.current;t.style.width=n.width,t.value=e.value||l.placeholder||"x",t.value.slice(-1)===` +import{r as o,a as L,j as v,_ as b,h as I}from"./index-022521cf.js";import{e as D,f as T}from"./index-586dfb7f.js";import{a as F,d as P}from"./useSlotProps-51fc8b9f.js";const U=["onChange","maxRows","minRows","style","value"];function w(r){return parseInt(r,10)||0}const V={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function M(r){return r==null||Object.keys(r).length===0||r.outerHeightStyle===0&&!r.overflow}const J=o.forwardRef(function(l,O){const{onChange:R,maxRows:x,minRows:h=1,style:S,value:y}=l,k=L(l,U),{current:A}=o.useRef(y!=null),p=o.useRef(null),N=D(O,p),H=o.useRef(null),c=o.useRef(0),[z,E]=o.useState({outerHeightStyle:0}),f=o.useCallback(()=>{const e=p.current,n=F(e).getComputedStyle(e);if(n.width==="0px")return{outerHeightStyle:0};const t=H.current;t.style.width=n.width,t.value=e.value||l.placeholder||"x",t.value.slice(-1)===` `&&(t.value+=" ");const g=n.boxSizing,m=w(n.paddingBottom)+w(n.paddingTop),a=w(n.borderBottomWidth)+w(n.borderTopWidth),u=t.scrollHeight;t.value="x";const d=t.scrollHeight;let s=u;h&&(s=Math.max(Number(h)*d,s)),x&&(s=Math.min(Number(x)*d,s)),s=Math.max(s,d);const j=s+(g==="border-box"?m+a:0),B=Math.abs(s-u)<=1;return{outerHeightStyle:j,overflow:B}},[x,h,l.placeholder]),C=(e,i)=>{const{outerHeightStyle:n,overflow:t}=i;return c.current<20&&(n>0&&Math.abs((e.outerHeightStyle||0)-n)>1||e.overflow!==t)?(c.current+=1,{overflow:t,outerHeightStyle:n}):e},W=o.useCallback(()=>{const e=f();M(e)||E(i=>C(i,e))},[f]);T(()=>{const e=()=>{const u=f();M(u)||I.flushSync(()=>{E(d=>C(d,u))})},i=()=>{c.current=0,e()};let n;const t=P(i),g=p.current,m=F(g);m.addEventListener("resize",t);let a;return typeof ResizeObserver<"u"&&(a=new ResizeObserver(i),a.observe(g)),()=>{t.clear(),cancelAnimationFrame(n),m.removeEventListener("resize",t),a&&a.disconnect()}},[f]),T(()=>{W()}),o.useEffect(()=>{c.current=0},[y]);const _=e=>{c.current=0,A||W(),R&&R(e)};return v.jsxs(o.Fragment,{children:[v.jsx("textarea",b({value:y,onChange:_,ref:N,rows:h,style:b({height:z.outerHeightStyle,overflow:z.overflow?"hidden":void 0},S)},k)),v.jsx("textarea",{"aria-hidden":!0,className:l.className,readOnly:!0,ref:H,tabIndex:-1,style:b({},V.shadow,S,{paddingTop:0,paddingBottom:0})})]})});export{J as T}; diff --git a/build/assets/Twitch-3175924a.js b/build/assets/Twitch-6251f902.js similarity index 95% rename from build/assets/Twitch-3175924a.js rename to build/assets/Twitch-6251f902.js index c2f00c1b8..84c8c24ea 100644 --- a/build/assets/Twitch-3175924a.js +++ b/build/assets/Twitch-6251f902.js @@ -1 +1 @@ -import{n as w,r as D}from"./index-a0989d63.js";import{u as C,p as N}from"./index-159c08bd.js";function I(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,j=Object.getOwnPropertyDescriptor,A=Object.getOwnPropertyNames,M=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty,R=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},_=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of A(e))!H.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=j(e,a))||s.enumerable});return t},F=(t,e,r)=>(r=t!=null?S(M(t)):{},_(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),U=t=>_(l({},"__esModule",{value:!0}),t),n=(t,e,r)=>(R(t,typeof e!="symbol"?e+"":e,r),r),P={};x(P,{default:()=>h});var f=U(P),d=F(D),c=C,u=N;const K="https://player.twitch.tv/js/embed/v1.js",V="Twitch",$="twitch-player-";class h extends d.Component{constructor(){super(...arguments),n(this,"callPlayer",c.callPlayer),n(this,"playerID",this.props.config.playerId||`${$}${(0,c.randomString)()}`),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){const{playsinline:s,onError:a,config:o,controls:v}=this.props,i=u.MATCH_URL_TWITCH_CHANNEL.test(e),p=i?e.match(u.MATCH_URL_TWITCH_CHANNEL)[1]:e.match(u.MATCH_URL_TWITCH_VIDEO)[1];if(r){i?this.player.setChannel(p):this.player.setVideo("v"+p);return}(0,c.getSDK)(K,V).then(y=>{this.player=new y.Player(this.playerID,{video:i?"":p,channel:i?p:"",height:"100%",width:"100%",playsinline:s,autoplay:this.props.playing,muted:this.props.muted,controls:i?!0:v,time:(0,c.parseStartTime)(e),...o.options});const{READY:m,PLAYING:g,PAUSE:E,ENDED:O,ONLINE:L,OFFLINE:b,SEEK:T}=y.Player;this.player.addEventListener(m,this.props.onReady),this.player.addEventListener(g,this.props.onPlay),this.player.addEventListener(E,this.props.onPause),this.player.addEventListener(O,this.props.onEnded),this.player.addEventListener(T,this.props.onSeek),this.player.addEventListener(L,this.props.onLoaded),this.player.addEventListener(b,this.props.onLoaded)},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.callPlayer("pause")}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return null}render(){const e={width:"100%",height:"100%"};return d.default.createElement("div",{style:e,id:this.playerID})}}n(h,"displayName","Twitch");n(h,"canPlay",u.canPlay.twitch);n(h,"loopOnEnded",!0);const W=w(f),k=I({__proto__:null,default:W},[f]);export{k as T}; +import{n as w,r as D}from"./index-022521cf.js";import{u as C,p as N}from"./index-4378ec35.js";function I(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,j=Object.getOwnPropertyDescriptor,A=Object.getOwnPropertyNames,M=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty,R=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},_=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of A(e))!H.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=j(e,a))||s.enumerable});return t},F=(t,e,r)=>(r=t!=null?S(M(t)):{},_(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),U=t=>_(l({},"__esModule",{value:!0}),t),n=(t,e,r)=>(R(t,typeof e!="symbol"?e+"":e,r),r),P={};x(P,{default:()=>h});var f=U(P),d=F(D),c=C,u=N;const K="https://player.twitch.tv/js/embed/v1.js",V="Twitch",$="twitch-player-";class h extends d.Component{constructor(){super(...arguments),n(this,"callPlayer",c.callPlayer),n(this,"playerID",this.props.config.playerId||`${$}${(0,c.randomString)()}`),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){const{playsinline:s,onError:a,config:o,controls:v}=this.props,i=u.MATCH_URL_TWITCH_CHANNEL.test(e),p=i?e.match(u.MATCH_URL_TWITCH_CHANNEL)[1]:e.match(u.MATCH_URL_TWITCH_VIDEO)[1];if(r){i?this.player.setChannel(p):this.player.setVideo("v"+p);return}(0,c.getSDK)(K,V).then(y=>{this.player=new y.Player(this.playerID,{video:i?"":p,channel:i?p:"",height:"100%",width:"100%",playsinline:s,autoplay:this.props.playing,muted:this.props.muted,controls:i?!0:v,time:(0,c.parseStartTime)(e),...o.options});const{READY:m,PLAYING:g,PAUSE:E,ENDED:O,ONLINE:L,OFFLINE:b,SEEK:T}=y.Player;this.player.addEventListener(m,this.props.onReady),this.player.addEventListener(g,this.props.onPlay),this.player.addEventListener(E,this.props.onPause),this.player.addEventListener(O,this.props.onEnded),this.player.addEventListener(T,this.props.onSeek),this.player.addEventListener(L,this.props.onLoaded),this.player.addEventListener(b,this.props.onLoaded)},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.callPlayer("pause")}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return null}render(){const e={width:"100%",height:"100%"};return d.default.createElement("div",{style:e,id:this.playerID})}}n(h,"displayName","Twitch");n(h,"canPlay",u.canPlay.twitch);n(h,"loopOnEnded",!0);const W=w(f),k=I({__proto__:null,default:W},[f]);export{k as T}; diff --git a/build/assets/Typography-d3022217.js b/build/assets/Typography-13dc67f3.js similarity index 93% rename from build/assets/Typography-d3022217.js rename to build/assets/Typography-13dc67f3.js index 877d08e9a..bf2a37fb3 100644 --- a/build/assets/Typography-d3022217.js +++ b/build/assets/Typography-13dc67f3.js @@ -1 +1 @@ -import{b as T,g as B,s as W,e as u,_ as s,r as C,u as M,a as R,j as P,c as j,d as U}from"./index-a0989d63.js";import{e as _}from"./Stack-98b5acbc.js";function N(a){return T("MuiTypography",a)}B("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const $=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],E=a=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:e,variant:o,classes:p}=a,i={root:["root",o,a.align!=="inherit"&&`align${u(t)}`,r&&"gutterBottom",n&&"noWrap",e&&"paragraph"]};return U(i,N,p)},L=W("span",{name:"MuiTypography",slot:"Root",overridesResolver:(a,t)=>{const{ownerState:r}=a;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${u(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:a,ownerState:t})=>s({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&a.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),y={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},z={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},A=a=>z[a]||a,D=C.forwardRef(function(t,r){const n=M({props:t,name:"MuiTypography"}),e=A(n.color),o=_(s({},n,{color:e})),{align:p="inherit",className:i,component:g,gutterBottom:d=!1,noWrap:f=!1,paragraph:l=!1,variant:h="body1",variantMapping:c=y}=o,x=R(o,$),m=s({},o,{align:p,color:e,className:i,component:g,gutterBottom:d,noWrap:f,paragraph:l,variant:h,variantMapping:c}),v=g||(l?"p":c[h]||y[h])||"span",b=E(m);return P.jsx(L,s({as:v,ref:r,ownerState:m,className:j(b.root,i)},x))}),V=D;export{V as T}; +import{b as T,g as B,s as W,e as u,_ as s,r as C,u as M,a as R,j as P,c as j,d as U}from"./index-022521cf.js";import{e as _}from"./Stack-ce2a5ec5.js";function N(a){return T("MuiTypography",a)}B("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const $=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],E=a=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:e,variant:o,classes:p}=a,i={root:["root",o,a.align!=="inherit"&&`align${u(t)}`,r&&"gutterBottom",n&&"noWrap",e&&"paragraph"]};return U(i,N,p)},L=W("span",{name:"MuiTypography",slot:"Root",overridesResolver:(a,t)=>{const{ownerState:r}=a;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${u(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:a,ownerState:t})=>s({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&a.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),y={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},z={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},A=a=>z[a]||a,D=C.forwardRef(function(t,r){const n=M({props:t,name:"MuiTypography"}),e=A(n.color),o=_(s({},n,{color:e})),{align:p="inherit",className:i,component:g,gutterBottom:d=!1,noWrap:f=!1,paragraph:l=!1,variant:h="body1",variantMapping:c=y}=o,x=R(o,$),m=s({},o,{align:p,color:e,className:i,component:g,gutterBottom:d,noWrap:f,paragraph:l,variant:h,variantMapping:c}),v=g||(l?"p":c[h]||y[h])||"span",b=E(m);return P.jsx(L,s({as:v,ref:r,ownerState:m,className:j(b.root,i)},x))}),V=D;export{V as T}; diff --git a/build/assets/Vidyard-29ddb667.js b/build/assets/Vidyard-0a8b7e37.js similarity index 95% rename from build/assets/Vidyard-29ddb667.js rename to build/assets/Vidyard-0a8b7e37.js index e8c39676e..95b8e39ae 100644 --- a/build/assets/Vidyard-29ddb667.js +++ b/build/assets/Vidyard-0a8b7e37.js @@ -1 +1 @@ -import{n as g,r as v}from"./index-a0989d63.js";import{u as b,p as O}from"./index-159c08bd.js";function V(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var D=Object.create,i=Object.defineProperty,j=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,S=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,A=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,E=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of w(e))!M.call(t,a)&&a!==r&&i(t,a,{get:()=>e[a],enumerable:!(o=j(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?D(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),R=t=>h(i({},"__esModule",{value:!0}),t),s=(t,e,r)=>(A(t,typeof e!="symbol"?e+"":e,r),r),_={};E(_,{default:()=>y});var f=R(_),c=L(v),d=b,P=O;const x="https://play.vidyard.com/embed/v4.js",C="VidyardV4",N="onVidyardAPI";class y extends c.Component{constructor(){super(...arguments),s(this,"callPlayer",d.callPlayer),s(this,"mute",()=>{this.setVolume(0)}),s(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),s(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:r,config:o,onError:a,onDuration:n}=this.props,l=e&&e.match(P.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,d.getSDK)(x,C,N).then(p=>{this.container&&(p.api.addReadyListener((u,m)=>{this.player||(this.player=m,this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seek",this.props.onSeek),this.player.on("playerComplete",this.props.onEnded))},l),p.api.renderPlayer({uuid:l,container:this.container,autoplay:r?1:0,...o.options}),p.api.getPlayerMetadata(l).then(u=>{this.duration=u.length_in_seconds,n(u.length_in_seconds)}))},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){window.VidyardV4.api.destroyPlayer(this.player)}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setPlaybackRate(e){this.callPlayer("setPlaybackSpeed",e)}getDuration(){return this.duration}getCurrentTime(){return this.callPlayer("currentTime")}getSecondsLoaded(){return null}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}s(y,"displayName","Vidyard");s(y,"canPlay",P.canPlay.vidyard);const T=g(f),B=V({__proto__:null,default:T},[f]);export{B as V}; +import{n as g,r as v}from"./index-022521cf.js";import{u as b,p as O}from"./index-4378ec35.js";function V(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var D=Object.create,i=Object.defineProperty,j=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,S=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,A=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,E=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of w(e))!M.call(t,a)&&a!==r&&i(t,a,{get:()=>e[a],enumerable:!(o=j(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?D(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),R=t=>h(i({},"__esModule",{value:!0}),t),s=(t,e,r)=>(A(t,typeof e!="symbol"?e+"":e,r),r),_={};E(_,{default:()=>y});var f=R(_),c=L(v),d=b,P=O;const x="https://play.vidyard.com/embed/v4.js",C="VidyardV4",N="onVidyardAPI";class y extends c.Component{constructor(){super(...arguments),s(this,"callPlayer",d.callPlayer),s(this,"mute",()=>{this.setVolume(0)}),s(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),s(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:r,config:o,onError:a,onDuration:n}=this.props,l=e&&e.match(P.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,d.getSDK)(x,C,N).then(p=>{this.container&&(p.api.addReadyListener((u,m)=>{this.player||(this.player=m,this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seek",this.props.onSeek),this.player.on("playerComplete",this.props.onEnded))},l),p.api.renderPlayer({uuid:l,container:this.container,autoplay:r?1:0,...o.options}),p.api.getPlayerMetadata(l).then(u=>{this.duration=u.length_in_seconds,n(u.length_in_seconds)}))},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){window.VidyardV4.api.destroyPlayer(this.player)}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setPlaybackRate(e){this.callPlayer("setPlaybackSpeed",e)}getDuration(){return this.duration}getCurrentTime(){return this.callPlayer("currentTime")}getSecondsLoaded(){return null}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}s(y,"displayName","Vidyard");s(y,"canPlay",P.canPlay.vidyard);const T=g(f),B=V({__proto__:null,default:T},[f]);export{B as V}; diff --git a/build/assets/Vimeo-f042fa11.js b/build/assets/Vimeo-8dbee3d5.js similarity index 96% rename from build/assets/Vimeo-f042fa11.js rename to build/assets/Vimeo-8dbee3d5.js index 730000664..82ed41446 100644 --- a/build/assets/Vimeo-f042fa11.js +++ b/build/assets/Vimeo-8dbee3d5.js @@ -1 +1 @@ -import{n as d,r as f}from"./index-a0989d63.js";import{u as m,p as _}from"./index-159c08bd.js";function P(t,e){for(var r=0;ra[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty,w=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v(e))!D.call(t,o)&&o!==r&&n(t,o,{get:()=>e[o],enumerable:!(a=b(e,o))||a.enumerable});return t},M=(t,e,r)=>(r=t!=null?g(O(t)):{},h(e||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>h(n({},"__esModule",{value:!0}),t),i=(t,e,r)=>(w(t,typeof e!="symbol"?e+"":e,r),r),c={};j(c,{default:()=>l});var y=E(c),p=M(f),u=m,L=_;const S="https://player.vimeo.com/api/player.js",V="Vimeo",k=t=>t.replace("/manage/videos","");class l extends p.Component{constructor(){super(...arguments),i(this,"callPlayer",u.callPlayer),i(this,"duration",null),i(this,"currentTime",null),i(this,"secondsLoaded",null),i(this,"mute",()=>{this.setMuted(!0)}),i(this,"unmute",()=>{this.setMuted(!1)}),i(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){this.duration=null,(0,u.getSDK)(S,V).then(r=>{if(!this.container)return;const{playerOptions:a,title:o}=this.props.config;this.player=new r.Player(this.container,{url:k(e),autoplay:this.props.playing,muted:this.props.muted,loop:this.props.loop,playsinline:this.props.playsinline,controls:this.props.controls,...a}),this.player.ready().then(()=>{const s=this.container.querySelector("iframe");s.style.width="100%",s.style.height="100%",o&&(s.title=o)}).catch(this.props.onError),this.player.on("loaded",()=>{this.props.onReady(),this.refreshDuration()}),this.player.on("play",()=>{this.props.onPlay(),this.refreshDuration()}),this.player.on("pause",this.props.onPause),this.player.on("seeked",s=>this.props.onSeek(s.seconds)),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({seconds:s})=>{this.currentTime=s}),this.player.on("progress",({seconds:s})=>{this.secondsLoaded=s}),this.player.on("bufferstart",this.props.onBuffer),this.player.on("bufferend",this.props.onBufferEnd),this.player.on("playbackratechange",s=>this.props.onPlaybackRateChange(s.playbackRate))},this.props.onError)}refreshDuration(){this.player.getDuration().then(e=>{this.duration=e})}play(){const e=this.callPlayer("play");e&&e.catch(this.props.onError)}pause(){this.callPlayer("pause")}stop(){this.callPlayer("unload")}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setMuted(e){this.callPlayer("setMuted",e)}setLoop(e){this.callPlayer("setLoop",e)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const{display:e}=this.props,r={width:"100%",height:"100%",overflow:"hidden",display:e};return p.default.createElement("div",{key:this.props.url,ref:this.ref,style:r})}}i(l,"displayName","Vimeo");i(l,"canPlay",L.canPlay.vimeo);i(l,"forceLoad",!0);const T=d(y),R=P({__proto__:null,default:T},[y]);export{R as V}; +import{n as d,r as f}from"./index-022521cf.js";import{u as m,p as _}from"./index-4378ec35.js";function P(t,e){for(var r=0;ra[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty,w=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v(e))!D.call(t,o)&&o!==r&&n(t,o,{get:()=>e[o],enumerable:!(a=b(e,o))||a.enumerable});return t},M=(t,e,r)=>(r=t!=null?g(O(t)):{},h(e||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>h(n({},"__esModule",{value:!0}),t),i=(t,e,r)=>(w(t,typeof e!="symbol"?e+"":e,r),r),c={};j(c,{default:()=>l});var y=E(c),p=M(f),u=m,L=_;const S="https://player.vimeo.com/api/player.js",V="Vimeo",k=t=>t.replace("/manage/videos","");class l extends p.Component{constructor(){super(...arguments),i(this,"callPlayer",u.callPlayer),i(this,"duration",null),i(this,"currentTime",null),i(this,"secondsLoaded",null),i(this,"mute",()=>{this.setMuted(!0)}),i(this,"unmute",()=>{this.setMuted(!1)}),i(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){this.duration=null,(0,u.getSDK)(S,V).then(r=>{if(!this.container)return;const{playerOptions:a,title:o}=this.props.config;this.player=new r.Player(this.container,{url:k(e),autoplay:this.props.playing,muted:this.props.muted,loop:this.props.loop,playsinline:this.props.playsinline,controls:this.props.controls,...a}),this.player.ready().then(()=>{const s=this.container.querySelector("iframe");s.style.width="100%",s.style.height="100%",o&&(s.title=o)}).catch(this.props.onError),this.player.on("loaded",()=>{this.props.onReady(),this.refreshDuration()}),this.player.on("play",()=>{this.props.onPlay(),this.refreshDuration()}),this.player.on("pause",this.props.onPause),this.player.on("seeked",s=>this.props.onSeek(s.seconds)),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({seconds:s})=>{this.currentTime=s}),this.player.on("progress",({seconds:s})=>{this.secondsLoaded=s}),this.player.on("bufferstart",this.props.onBuffer),this.player.on("bufferend",this.props.onBufferEnd),this.player.on("playbackratechange",s=>this.props.onPlaybackRateChange(s.playbackRate))},this.props.onError)}refreshDuration(){this.player.getDuration().then(e=>{this.duration=e})}play(){const e=this.callPlayer("play");e&&e.catch(this.props.onError)}pause(){this.callPlayer("pause")}stop(){this.callPlayer("unload")}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setMuted(e){this.callPlayer("setMuted",e)}setLoop(e){this.callPlayer("setLoop",e)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const{display:e}=this.props,r={width:"100%",height:"100%",overflow:"hidden",display:e};return p.default.createElement("div",{key:this.props.url,ref:this.ref,style:r})}}i(l,"displayName","Vimeo");i(l,"canPlay",L.canPlay.vimeo);i(l,"forceLoad",!0);const T=d(y),R=P({__proto__:null,default:T},[y]);export{R as V}; diff --git a/build/assets/Wistia-31eba600.js b/build/assets/Wistia-f188f8bf.js similarity index 96% rename from build/assets/Wistia-31eba600.js rename to build/assets/Wistia-f188f8bf.js index 7dcc88888..062dd3050 100644 --- a/build/assets/Wistia-31eba600.js +++ b/build/assets/Wistia-f188f8bf.js @@ -1 +1 @@ -import{n as m,r as g}from"./index-a0989d63.js";import{u as v,p as w}from"./index-159c08bd.js";function O(t,e){for(var a=0;as[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var C=Object.create,i=Object.defineProperty,k=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,E=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,R=(t,e,a)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,j=(t,e)=>{for(var a in e)i(t,a,{get:e[a],enumerable:!0})},h=(t,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of D(e))!S.call(t,r)&&r!==a&&i(t,r,{get:()=>e[r],enumerable:!(s=k(e,r))||s.enumerable});return t},I=(t,e,a)=>(a=t!=null?C(E(t)):{},h(e||!t||!t.__esModule?i(a,"default",{value:t,enumerable:!0}):a,t)),W=t=>h(i({},"__esModule",{value:!0}),t),n=(t,e,a)=>(R(t,typeof e!="symbol"?e+"":e,a),a),d={};j(d,{default:()=>l});var _=W(d),y=I(g),c=v,P=w;const M="https://fast.wistia.com/assets/external/E-v1.js",x="Wistia",A="wistia-player-";class l extends y.Component{constructor(){super(...arguments),n(this,"callPlayer",c.callPlayer),n(this,"playerID",this.props.config.playerId||`${A}${(0,c.randomString)()}`),n(this,"onPlay",(...e)=>this.props.onPlay(...e)),n(this,"onPause",(...e)=>this.props.onPause(...e)),n(this,"onSeek",(...e)=>this.props.onSeek(...e)),n(this,"onEnded",(...e)=>this.props.onEnded(...e)),n(this,"onPlaybackRateChange",(...e)=>this.props.onPlaybackRateChange(...e)),n(this,"mute",()=>{this.callPlayer("mute")}),n(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:a,muted:s,controls:r,onReady:o,config:p,onError:b}=this.props;(0,c.getSDK)(M,x).then(f=>{p.customControls&&p.customControls.forEach(u=>f.defineControl(u)),window._wq=window._wq||[],window._wq.push({id:this.playerID,options:{autoPlay:a,silentAutoPlay:"allow",muted:s,controlsVisibleOnLoad:r,fullscreenButton:r,playbar:r,playbackRateControl:r,qualityControl:r,volumeControl:r,settingsControl:r,smallPlayButton:r,...p.options},onReady:u=>{this.player=u,this.unbind(),this.player.bind("play",this.onPlay),this.player.bind("pause",this.onPause),this.player.bind("seek",this.onSeek),this.player.bind("end",this.onEnded),this.player.bind("playbackratechange",this.onPlaybackRateChange),o()}})},b)}unbind(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded),this.player.unbind("playbackratechange",this.onPlaybackRateChange)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.unbind(),this.callPlayer("remove")}seekTo(e,a=!0){this.callPlayer("time",e),a||this.pause()}setVolume(e){this.callPlayer("volume",e)}setPlaybackRate(e){this.callPlayer("playbackRate",e)}getDuration(){return this.callPlayer("duration")}getCurrentTime(){return this.callPlayer("time")}getSecondsLoaded(){return null}render(){const{url:e}=this.props,a=e&&e.match(P.MATCH_URL_WISTIA)[1],s=`wistia_embed wistia_async_${a}`,r={width:"100%",height:"100%"};return y.default.createElement("div",{id:this.playerID,key:a,className:s,style:r})}}n(l,"displayName","Wistia");n(l,"canPlay",P.canPlay.wistia);n(l,"loopOnEnded",!0);const L=m(_),$=O({__proto__:null,default:L},[_]);export{$ as W}; +import{n as m,r as g}from"./index-022521cf.js";import{u as v,p as w}from"./index-4378ec35.js";function O(t,e){for(var a=0;as[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var C=Object.create,i=Object.defineProperty,k=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,E=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,R=(t,e,a)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,j=(t,e)=>{for(var a in e)i(t,a,{get:e[a],enumerable:!0})},h=(t,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of D(e))!S.call(t,r)&&r!==a&&i(t,r,{get:()=>e[r],enumerable:!(s=k(e,r))||s.enumerable});return t},I=(t,e,a)=>(a=t!=null?C(E(t)):{},h(e||!t||!t.__esModule?i(a,"default",{value:t,enumerable:!0}):a,t)),W=t=>h(i({},"__esModule",{value:!0}),t),n=(t,e,a)=>(R(t,typeof e!="symbol"?e+"":e,a),a),d={};j(d,{default:()=>l});var _=W(d),y=I(g),c=v,P=w;const M="https://fast.wistia.com/assets/external/E-v1.js",x="Wistia",A="wistia-player-";class l extends y.Component{constructor(){super(...arguments),n(this,"callPlayer",c.callPlayer),n(this,"playerID",this.props.config.playerId||`${A}${(0,c.randomString)()}`),n(this,"onPlay",(...e)=>this.props.onPlay(...e)),n(this,"onPause",(...e)=>this.props.onPause(...e)),n(this,"onSeek",(...e)=>this.props.onSeek(...e)),n(this,"onEnded",(...e)=>this.props.onEnded(...e)),n(this,"onPlaybackRateChange",(...e)=>this.props.onPlaybackRateChange(...e)),n(this,"mute",()=>{this.callPlayer("mute")}),n(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:a,muted:s,controls:r,onReady:o,config:p,onError:b}=this.props;(0,c.getSDK)(M,x).then(f=>{p.customControls&&p.customControls.forEach(u=>f.defineControl(u)),window._wq=window._wq||[],window._wq.push({id:this.playerID,options:{autoPlay:a,silentAutoPlay:"allow",muted:s,controlsVisibleOnLoad:r,fullscreenButton:r,playbar:r,playbackRateControl:r,qualityControl:r,volumeControl:r,settingsControl:r,smallPlayButton:r,...p.options},onReady:u=>{this.player=u,this.unbind(),this.player.bind("play",this.onPlay),this.player.bind("pause",this.onPause),this.player.bind("seek",this.onSeek),this.player.bind("end",this.onEnded),this.player.bind("playbackratechange",this.onPlaybackRateChange),o()}})},b)}unbind(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded),this.player.unbind("playbackratechange",this.onPlaybackRateChange)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.unbind(),this.callPlayer("remove")}seekTo(e,a=!0){this.callPlayer("time",e),a||this.pause()}setVolume(e){this.callPlayer("volume",e)}setPlaybackRate(e){this.callPlayer("playbackRate",e)}getDuration(){return this.callPlayer("duration")}getCurrentTime(){return this.callPlayer("time")}getSecondsLoaded(){return null}render(){const{url:e}=this.props,a=e&&e.match(P.MATCH_URL_WISTIA)[1],s=`wistia_embed wistia_async_${a}`,r={width:"100%",height:"100%"};return y.default.createElement("div",{id:this.playerID,key:a,className:s,style:r})}}n(l,"displayName","Wistia");n(l,"canPlay",P.canPlay.wistia);n(l,"loopOnEnded",!0);const L=m(_),$=O({__proto__:null,default:L},[_]);export{$ as W}; diff --git a/build/assets/YouTube-2c42744e.js b/build/assets/YouTube-ac97eec6.js similarity index 97% rename from build/assets/YouTube-2c42744e.js rename to build/assets/YouTube-ac97eec6.js index 365fee0ed..935cd1294 100644 --- a/build/assets/YouTube-2c42744e.js +++ b/build/assets/YouTube-ac97eec6.js @@ -1 +1 @@ -import{n as U,r as I}from"./index-a0989d63.js";import{u as L,p as Y}from"./index-159c08bd.js";function k(a,e){for(var t=0;ts[r]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,u=Object.defineProperty,j=Object.getOwnPropertyDescriptor,N=Object.getOwnPropertyNames,V=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,x=(a,e,t)=>e in a?u(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,K=(a,e)=>{for(var t in e)u(a,t,{get:e[t],enumerable:!0})},v=(a,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of N(e))!B.call(a,r)&&r!==t&&u(a,r,{get:()=>e[r],enumerable:!(s=j(e,r))||s.enumerable});return a},F=(a,e,t)=>(t=a!=null?M(V(a)):{},v(e||!a||!a.__esModule?u(t,"default",{value:a,enumerable:!0}):t,a)),H=a=>v(u({},"__esModule",{value:!0}),a),o=(a,e,t)=>(x(a,typeof e!="symbol"?e+"":e,t),t),w={};K(w,{default:()=>O});var S=H(w),m=F(I),p=L,D=Y;const G="https://www.youtube.com/iframe_api",T="YT",z="onYouTubeIframeAPIReady",f=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,b=/user\/([a-zA-Z0-9_-]+)\/?/,Q=/youtube-nocookie\.com/,Z="https://www.youtube-nocookie.com";class O extends m.Component{constructor(){super(...arguments),o(this,"callPlayer",p.callPlayer),o(this,"parsePlaylist",e=>{if(e instanceof Array)return{listType:"playlist",playlist:e.map(this.getID).join(",")};if(f.test(e)){const[,t]=e.match(f);return{listType:"playlist",list:t.replace(/^UC/,"UU")}}if(b.test(e)){const[,t]=e.match(b);return{listType:"user_uploads",list:t}}return{}}),o(this,"onStateChange",e=>{const{data:t}=e,{onPlay:s,onPause:r,onBuffer:n,onBufferEnd:P,onEnded:_,onReady:g,loop:y,config:{playerVars:l,onUnstarted:h}}=this.props,{UNSTARTED:d,PLAYING:c,PAUSED:i,BUFFERING:E,ENDED:A,CUED:C}=window[T].PlayerState;if(t===d&&h(),t===c&&(s(),P()),t===i&&r(),t===E&&n(),t===A){const R=!!this.callPlayer("getPlaylist");y&&!R&&(l.start?this.seekTo(l.start):this.play()),_()}t===C&&g()}),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unMute")}),o(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}getID(e){return!e||e instanceof Array||f.test(e)?null:e.match(D.MATCH_URL_YOUTUBE)[1]}load(e,t){const{playing:s,muted:r,playsinline:n,controls:P,loop:_,config:g,onError:y}=this.props,{playerVars:l,embedOptions:h}=g,d=this.getID(e);if(t){if(f.test(e)||b.test(e)||e instanceof Array){this.player.loadPlaylist(this.parsePlaylist(e));return}this.player.cueVideoById({videoId:d,startSeconds:(0,p.parseStartTime)(e)||l.start,endSeconds:(0,p.parseEndTime)(e)||l.end});return}(0,p.getSDK)(G,T,z,c=>c.loaded).then(c=>{this.container&&(this.player=new c.Player(this.container,{width:"100%",height:"100%",videoId:d,playerVars:{autoplay:s?1:0,mute:r?1:0,controls:P?1:0,start:(0,p.parseStartTime)(e),end:(0,p.parseEndTime)(e),origin:window.location.origin,playsinline:n?1:0,...this.parsePlaylist(e),...l},events:{onReady:()=>{_&&this.player.setLoop(!0),this.props.onReady()},onPlaybackRateChange:i=>this.props.onPlaybackRateChange(i.data),onPlaybackQualityChange:i=>this.props.onPlaybackQualityChange(i),onStateChange:this.onStateChange,onError:i=>y(i.data)},host:Q.test(e)?Z:void 0,...h}))},y),h.events&&console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause")}play(){this.callPlayer("playVideo")}pause(){this.callPlayer("pauseVideo")}stop(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}seekTo(e,t=!1){this.callPlayer("seekTo",e),!t&&!this.props.playing&&this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return m.default.createElement("div",{style:t},m.default.createElement("div",{ref:this.ref}))}}o(O,"displayName","YouTube");o(O,"canPlay",D.canPlay.youtube);const $=U(S),W=k({__proto__:null,default:$},[S]);export{W as Y}; +import{n as U,r as I}from"./index-022521cf.js";import{u as L,p as Y}from"./index-4378ec35.js";function k(a,e){for(var t=0;ts[r]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,u=Object.defineProperty,j=Object.getOwnPropertyDescriptor,N=Object.getOwnPropertyNames,V=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,x=(a,e,t)=>e in a?u(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,K=(a,e)=>{for(var t in e)u(a,t,{get:e[t],enumerable:!0})},v=(a,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of N(e))!B.call(a,r)&&r!==t&&u(a,r,{get:()=>e[r],enumerable:!(s=j(e,r))||s.enumerable});return a},F=(a,e,t)=>(t=a!=null?M(V(a)):{},v(e||!a||!a.__esModule?u(t,"default",{value:a,enumerable:!0}):t,a)),H=a=>v(u({},"__esModule",{value:!0}),a),o=(a,e,t)=>(x(a,typeof e!="symbol"?e+"":e,t),t),w={};K(w,{default:()=>O});var S=H(w),m=F(I),p=L,D=Y;const G="https://www.youtube.com/iframe_api",T="YT",z="onYouTubeIframeAPIReady",f=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,b=/user\/([a-zA-Z0-9_-]+)\/?/,Q=/youtube-nocookie\.com/,Z="https://www.youtube-nocookie.com";class O extends m.Component{constructor(){super(...arguments),o(this,"callPlayer",p.callPlayer),o(this,"parsePlaylist",e=>{if(e instanceof Array)return{listType:"playlist",playlist:e.map(this.getID).join(",")};if(f.test(e)){const[,t]=e.match(f);return{listType:"playlist",list:t.replace(/^UC/,"UU")}}if(b.test(e)){const[,t]=e.match(b);return{listType:"user_uploads",list:t}}return{}}),o(this,"onStateChange",e=>{const{data:t}=e,{onPlay:s,onPause:r,onBuffer:n,onBufferEnd:P,onEnded:_,onReady:g,loop:y,config:{playerVars:l,onUnstarted:h}}=this.props,{UNSTARTED:d,PLAYING:c,PAUSED:i,BUFFERING:E,ENDED:A,CUED:C}=window[T].PlayerState;if(t===d&&h(),t===c&&(s(),P()),t===i&&r(),t===E&&n(),t===A){const R=!!this.callPlayer("getPlaylist");y&&!R&&(l.start?this.seekTo(l.start):this.play()),_()}t===C&&g()}),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unMute")}),o(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}getID(e){return!e||e instanceof Array||f.test(e)?null:e.match(D.MATCH_URL_YOUTUBE)[1]}load(e,t){const{playing:s,muted:r,playsinline:n,controls:P,loop:_,config:g,onError:y}=this.props,{playerVars:l,embedOptions:h}=g,d=this.getID(e);if(t){if(f.test(e)||b.test(e)||e instanceof Array){this.player.loadPlaylist(this.parsePlaylist(e));return}this.player.cueVideoById({videoId:d,startSeconds:(0,p.parseStartTime)(e)||l.start,endSeconds:(0,p.parseEndTime)(e)||l.end});return}(0,p.getSDK)(G,T,z,c=>c.loaded).then(c=>{this.container&&(this.player=new c.Player(this.container,{width:"100%",height:"100%",videoId:d,playerVars:{autoplay:s?1:0,mute:r?1:0,controls:P?1:0,start:(0,p.parseStartTime)(e),end:(0,p.parseEndTime)(e),origin:window.location.origin,playsinline:n?1:0,...this.parsePlaylist(e),...l},events:{onReady:()=>{_&&this.player.setLoop(!0),this.props.onReady()},onPlaybackRateChange:i=>this.props.onPlaybackRateChange(i.data),onPlaybackQualityChange:i=>this.props.onPlaybackQualityChange(i),onStateChange:this.onStateChange,onError:i=>y(i.data)},host:Q.test(e)?Z:void 0,...h}))},y),h.events&&console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause")}play(){this.callPlayer("playVideo")}pause(){this.callPlayer("pauseVideo")}stop(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}seekTo(e,t=!1){this.callPlayer("seekTo",e),!t&&!this.props.playing&&this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return m.default.createElement("div",{style:t},m.default.createElement("div",{ref:this.ref}))}}o(O,"displayName","YouTube");o(O,"canPlay",D.canPlay.youtube);const $=U(S),W=k({__proto__:null,default:$},[S]);export{W as Y}; diff --git a/build/assets/createSvgIcon-ebe0e3e6.js b/build/assets/createSvgIcon-e1ebdfca.js similarity index 97% rename from build/assets/createSvgIcon-ebe0e3e6.js rename to build/assets/createSvgIcon-e1ebdfca.js index 03db42190..07ad25cfd 100644 --- a/build/assets/createSvgIcon-ebe0e3e6.js +++ b/build/assets/createSvgIcon-e1ebdfca.js @@ -1 +1 @@ -import{b as I,g as C,s as w,e as f,r as v,u as R,a as b,_ as g,j as S,c as j,d as N}from"./index-a0989d63.js";function A(o){return I("MuiSvgIcon",o)}C("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const B=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],M=o=>{const{color:e,fontSize:t,classes:i}=o,n={root:["root",e!=="inherit"&&`color${f(e)}`,`fontSize${f(t)}`]};return N(n,A,i)},T=w("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:t}=o;return[e.root,t.color!=="inherit"&&e[`color${f(t.color)}`],e[`fontSize${f(t.fontSize)}`]]}})(({theme:o,ownerState:e})=>{var t,i,n,u,m,a,h,p,d,r,s,c,l;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(t=o.transitions)==null||(i=t.create)==null?void 0:i.call(t,"fill",{duration:(n=o.transitions)==null||(n=n.duration)==null?void 0:n.shorter}),fontSize:{inherit:"inherit",small:((u=o.typography)==null||(m=u.pxToRem)==null?void 0:m.call(u,20))||"1.25rem",medium:((a=o.typography)==null||(h=a.pxToRem)==null?void 0:h.call(a,24))||"1.5rem",large:((p=o.typography)==null||(d=p.pxToRem)==null?void 0:d.call(p,35))||"2.1875rem"}[e.fontSize],color:(r=(s=(o.vars||o).palette)==null||(s=s[e.color])==null?void 0:s.main)!=null?r:{action:(c=(o.vars||o).palette)==null||(c=c.action)==null?void 0:c.active,disabled:(l=(o.vars||o).palette)==null||(l=l.action)==null?void 0:l.disabled,inherit:void 0}[e.color]}}),_=v.forwardRef(function(e,t){const i=R({props:e,name:"MuiSvgIcon"}),{children:n,className:u,color:m="inherit",component:a="svg",fontSize:h="medium",htmlColor:p,inheritViewBox:d=!1,titleAccess:r,viewBox:s="0 0 24 24"}=i,c=b(i,B),l=v.isValidElement(n)&&n.type==="svg",y=g({},i,{color:m,component:a,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:s,hasSvgAsChild:l}),x={};d||(x.viewBox=s);const z=M(y);return S.jsxs(T,g({as:a,className:j(z.root,u),focusable:"false",color:p,"aria-hidden":r?void 0:!0,role:r?"img":void 0,ref:t},x,c,l&&n.props,{ownerState:y,children:[l?n.props.children:n,r?S.jsx("title",{children:r}):null]}))});_.muiName="SvgIcon";const $=_;function U(o,e){function t(i,n){return S.jsx($,g({"data-testid":`${e}Icon`,ref:n},i,{children:o}))}return t.muiName=$.muiName,v.memo(v.forwardRef(t))}export{U as c}; +import{b as I,g as C,s as w,e as f,r as v,u as R,a as b,_ as g,j as S,c as j,d as N}from"./index-022521cf.js";function A(o){return I("MuiSvgIcon",o)}C("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const B=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],M=o=>{const{color:e,fontSize:t,classes:i}=o,n={root:["root",e!=="inherit"&&`color${f(e)}`,`fontSize${f(t)}`]};return N(n,A,i)},T=w("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:t}=o;return[e.root,t.color!=="inherit"&&e[`color${f(t.color)}`],e[`fontSize${f(t.fontSize)}`]]}})(({theme:o,ownerState:e})=>{var t,i,n,u,m,a,h,p,d,r,s,c,l;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(t=o.transitions)==null||(i=t.create)==null?void 0:i.call(t,"fill",{duration:(n=o.transitions)==null||(n=n.duration)==null?void 0:n.shorter}),fontSize:{inherit:"inherit",small:((u=o.typography)==null||(m=u.pxToRem)==null?void 0:m.call(u,20))||"1.25rem",medium:((a=o.typography)==null||(h=a.pxToRem)==null?void 0:h.call(a,24))||"1.5rem",large:((p=o.typography)==null||(d=p.pxToRem)==null?void 0:d.call(p,35))||"2.1875rem"}[e.fontSize],color:(r=(s=(o.vars||o).palette)==null||(s=s[e.color])==null?void 0:s.main)!=null?r:{action:(c=(o.vars||o).palette)==null||(c=c.action)==null?void 0:c.active,disabled:(l=(o.vars||o).palette)==null||(l=l.action)==null?void 0:l.disabled,inherit:void 0}[e.color]}}),_=v.forwardRef(function(e,t){const i=R({props:e,name:"MuiSvgIcon"}),{children:n,className:u,color:m="inherit",component:a="svg",fontSize:h="medium",htmlColor:p,inheritViewBox:d=!1,titleAccess:r,viewBox:s="0 0 24 24"}=i,c=b(i,B),l=v.isValidElement(n)&&n.type==="svg",y=g({},i,{color:m,component:a,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:s,hasSvgAsChild:l}),x={};d||(x.viewBox=s);const z=M(y);return S.jsxs(T,g({as:a,className:j(z.root,u),focusable:"false",color:p,"aria-hidden":r?void 0:!0,role:r?"img":void 0,ref:t},x,c,l&&n.props,{ownerState:y,children:[l?n.props.children:n,r?S.jsx("title",{children:r}):null]}))});_.muiName="SvgIcon";const $=_;function U(o,e){function t(i,n){return S.jsx($,g({"data-testid":`${e}Icon`,ref:n},i,{children:o}))}return t.muiName=$.muiName,v.memo(v.forwardRef(t))}export{U as c}; diff --git a/build/assets/index-a0989d63.js b/build/assets/index-022521cf.js similarity index 99% rename from build/assets/index-a0989d63.js rename to build/assets/index-022521cf.js index 5c09c8e5e..27b8051d7 100644 --- a/build/assets/index-a0989d63.js +++ b/build/assets/index-022521cf.js @@ -665,4 +665,4 @@ PROCEED WITH CAUTION! align-items: center; width: 100%; height: 100%; -`,LazyApp=reactExports.lazy(()=>__vitePreload(()=>import("./index-775b6bc6.js").then(o=>o.E),["assets/index-775b6bc6.js","assets/index-b60658ac.css"]).then(({App:o})=>({default:o}))),AppContainer=()=>{const o=jsxRuntimeExports.jsx(LazyApp,{}),{splashDataLoading:et}=useDataStore(tt=>tt);return jsxRuntimeExports.jsxs(AppProviders,{children:[et&&jsxRuntimeExports.jsx(Splash,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{children:"Loading..."}),children:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{element:o,path:"/"}),jsxRuntimeExports.jsx(Route,{element:o,path:"/search"}),jsxRuntimeExports.jsx(Route,{element:o,path:"*"})]})})}),jsxRuntimeExports.jsx(E2ETests,{})]})},index="",root=client$1.createRoot(document.getElementById("root"));root.render(isE2E?jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})}):jsxRuntimeExports.jsx(React.StrictMode,{children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})})}));reportWebVitals();overrideConsole();export{$2AODx$react as $,useAppStore as A,useDataStore as B,__vitePreload as C,media as D,useAiSummaryStore as E,Flex as F,useNavigate as G,Stats as H,useSearchParams as I,useUserStore as J,useFeatureFlagStore as K,LinearProgress$1 as L,isDevelopment as M,updateBudget as N,useModal as O,PropTypes as P,isSphinx as Q,React as R,SocketContext as S,Text as T,useSelectedNodeRelativeIds as U,forceSimulation as V,We as W,forceCollide as X,forceCenter as Y,forceManyBody as Z,_extends$1 as _,_objectWithoutPropertiesLoose as a,RSS as a$,forceLink as a0,NODE_RELATIVE_HIGHLIGHT_COLORS as a1,useHoveredNode as a2,useNodeTypes as a3,lottie as a4,fetchNodeEdges as a5,NodesIcon as a6,lodashExports as a7,addToGlobalForE2e as a8,api as a9,_getTag as aA,isBufferExports as aB,isTypedArray_1 as aC,isObject_1 as aD,keys_1 as aE,isArguments_1 as aF,_isIndex as aG,isLength_1 as aH,_Set as aI,_arrayPush as aJ,isArrayLike_1 as aK,_baseUnary as aL,_defineProperty$1 as aM,_root as aN,_getPrototype as aO,_baseAssignValue as aP,getFullTranscript as aQ,getAugmentedNamespace as aR,propTypesExports as aS,useHasAiChats as aT,postAboutData as aU,NODE_ADD_ERROR as aV,requiredRule as aW,LINK as aX,YOUTUBE_CHANNEL as aY,TWITTER_HANDLE as aZ,TWITTER_SOURCE as a_,distExports$1 as aa,executeIfProd as ab,useTheme as ac,lighten as ad,darken as ae,slotShouldForwardProp as af,Ce as ag,useHasAiChatsResponseLoading as ah,Ue as ai,Tooltip as aj,hooks as ak,commonjsGlobal as al,commonjsRequire as am,useFilteredNodes as an,getSchemaAll as ao,_baseGetTag as ap,isObjectLike_1 as aq,isArray_1 as ar,_MapCache as as,_Symbol as at,isObject$b as au,isFunction$3 as av,_Uint8Array as aw,eq_1 as ax,_getAllKeys as ay,_Stack as az,generateUtilityClass as b,WEB_PAGE as b0,DOCUMENT as b1,formatBudget as b2,getPriceData as b3,isE2E as b4,sphinxBridge as b5,getLSat as b6,payLsat as b7,getNodeType as b8,getNodeSchemaTypes as b9,useTheme$2 as bA,defaultTheme$1 as bB,THEME_ID as bC,formatMuiErrorMessage as bD,deepmerge as bE,defaultSxConfig$1 as bF,isPlainObject as bG,createStyled as bH,createTheme$1 as bI,useThemeProps$1 as bJ,createUnarySpacing as bK,mergeBreakpointsInOrder as bL,getValue as bM,useTheme$3 as bN,getNodeContent as ba,approveRadarData as bb,deleteRadarData as bc,getRadarData as bd,putRadarData as be,getEdgeTypes as bf,getEdges as bg,postEdgeType as bh,putNodeData as bi,postMergeTopics as bj,getTopicsData as bk,deleteNode as bl,css as bm,changeNodeType as bn,resolveBreakpointValues as bo,handleBreakpoints as bp,updateEdgeType as bq,postBluePrintType as br,deleteEdgeType as bs,editNodeSchemaUpdate as bt,createRoot as bu,react as bv,GRAPH_GROUND_COLOR as bw,GRAPH_LIGHT_INTENSITY as bx,GRAPH_FOG_COLOR as by,Global as bz,clsx$1 as c,composeClasses as d,capitalize as e,alpha as f,generateUtilityClasses as g,reactDomExports as h,rootShouldForwardProp as i,jsxRuntimeExports as j,keyframes as k,resolveProps as l,ReactDOM as m,getDefaultExportFromCjs as n,styled$3 as o,useGraphStore as p,colors as q,reactExports as r,styled$1 as s,graphStyles as t,useThemeProps as u,clsx as v,create$3 as w,devtools as x,useSelectedNode as y,useUpdateSelectedNode as z}; +`,LazyApp=reactExports.lazy(()=>__vitePreload(()=>import("./index-586dfb7f.js").then(o=>o.E),["assets/index-586dfb7f.js","assets/index-b60658ac.css"]).then(({App:o})=>({default:o}))),AppContainer=()=>{const o=jsxRuntimeExports.jsx(LazyApp,{}),{splashDataLoading:et}=useDataStore(tt=>tt);return jsxRuntimeExports.jsxs(AppProviders,{children:[et&&jsxRuntimeExports.jsx(Splash,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{children:"Loading..."}),children:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{element:o,path:"/"}),jsxRuntimeExports.jsx(Route,{element:o,path:"/search"}),jsxRuntimeExports.jsx(Route,{element:o,path:"*"})]})})}),jsxRuntimeExports.jsx(E2ETests,{})]})},index="",root=client$1.createRoot(document.getElementById("root"));root.render(isE2E?jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})}):jsxRuntimeExports.jsx(React.StrictMode,{children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})})}));reportWebVitals();overrideConsole();export{$2AODx$react as $,useAppStore as A,useDataStore as B,__vitePreload as C,media as D,useAiSummaryStore as E,Flex as F,useNavigate as G,Stats as H,useSearchParams as I,useUserStore as J,useFeatureFlagStore as K,LinearProgress$1 as L,isDevelopment as M,updateBudget as N,useModal as O,PropTypes as P,isSphinx as Q,React as R,SocketContext as S,Text as T,useSelectedNodeRelativeIds as U,forceSimulation as V,We as W,forceCollide as X,forceCenter as Y,forceManyBody as Z,_extends$1 as _,_objectWithoutPropertiesLoose as a,RSS as a$,forceLink as a0,NODE_RELATIVE_HIGHLIGHT_COLORS as a1,useHoveredNode as a2,useNodeTypes as a3,lottie as a4,fetchNodeEdges as a5,NodesIcon as a6,lodashExports as a7,addToGlobalForE2e as a8,api as a9,_getTag as aA,isBufferExports as aB,isTypedArray_1 as aC,isObject_1 as aD,keys_1 as aE,isArguments_1 as aF,_isIndex as aG,isLength_1 as aH,_Set as aI,_arrayPush as aJ,isArrayLike_1 as aK,_baseUnary as aL,_defineProperty$1 as aM,_root as aN,_getPrototype as aO,_baseAssignValue as aP,getFullTranscript as aQ,getAugmentedNamespace as aR,propTypesExports as aS,useHasAiChats as aT,postAboutData as aU,NODE_ADD_ERROR as aV,requiredRule as aW,LINK as aX,YOUTUBE_CHANNEL as aY,TWITTER_HANDLE as aZ,TWITTER_SOURCE as a_,distExports$1 as aa,executeIfProd as ab,useTheme as ac,lighten as ad,darken as ae,slotShouldForwardProp as af,Ce as ag,useHasAiChatsResponseLoading as ah,Ue as ai,Tooltip as aj,hooks as ak,commonjsGlobal as al,commonjsRequire as am,useFilteredNodes as an,getSchemaAll as ao,_baseGetTag as ap,isObjectLike_1 as aq,isArray_1 as ar,_MapCache as as,_Symbol as at,isObject$b as au,isFunction$3 as av,_Uint8Array as aw,eq_1 as ax,_getAllKeys as ay,_Stack as az,generateUtilityClass as b,WEB_PAGE as b0,DOCUMENT as b1,formatBudget as b2,getPriceData as b3,isE2E as b4,sphinxBridge as b5,getLSat as b6,payLsat as b7,getNodeType as b8,getNodeSchemaTypes as b9,useTheme$2 as bA,defaultTheme$1 as bB,THEME_ID as bC,formatMuiErrorMessage as bD,deepmerge as bE,defaultSxConfig$1 as bF,isPlainObject as bG,createStyled as bH,createTheme$1 as bI,useThemeProps$1 as bJ,createUnarySpacing as bK,mergeBreakpointsInOrder as bL,getValue as bM,useTheme$3 as bN,getNodeContent as ba,approveRadarData as bb,deleteRadarData as bc,getRadarData as bd,putRadarData as be,getEdgeTypes as bf,getEdges as bg,postEdgeType as bh,putNodeData as bi,postMergeTopics as bj,getTopicsData as bk,deleteNode as bl,css as bm,changeNodeType as bn,resolveBreakpointValues as bo,handleBreakpoints as bp,updateEdgeType as bq,postBluePrintType as br,deleteEdgeType as bs,editNodeSchemaUpdate as bt,createRoot as bu,react as bv,GRAPH_GROUND_COLOR as bw,GRAPH_LIGHT_INTENSITY as bx,GRAPH_FOG_COLOR as by,Global as bz,clsx$1 as c,composeClasses as d,capitalize as e,alpha as f,generateUtilityClasses as g,reactDomExports as h,rootShouldForwardProp as i,jsxRuntimeExports as j,keyframes as k,resolveProps as l,ReactDOM as m,getDefaultExportFromCjs as n,styled$3 as o,useGraphStore as p,colors as q,reactExports as r,styled$1 as s,graphStyles as t,useThemeProps as u,clsx as v,create$3 as w,devtools as x,useSelectedNode as y,useUpdateSelectedNode as z}; diff --git a/build/assets/index-cb8726c0.js b/build/assets/index-05e42f19.js similarity index 91% rename from build/assets/index-cb8726c0.js rename to build/assets/index-05e42f19.js index 406f65392..ec2dc5872 100644 --- a/build/assets/index-cb8726c0.js +++ b/build/assets/index-05e42f19.js @@ -1,4 +1,4 @@ -import{j as e,o as r,q as y,T as S,F as n,O as g,K as q,y as k,aW as G,r as l,bk as O,bi as P,B as K}from"./index-a0989d63.js";import{B as Y}from"./index-f06622e3.js";import{T as J,i as Q,F as X,B as F}from"./index-775b6bc6.js";import{T as B}from"./index-3d0189dc.js";import{S as Z}from"./Skeleton-091f3105.js";import{C as ee}from"./ClipLoader-f345d5d1.js";import"./index.esm-d308c31f.js";import"./InfoIcon-4aad7e99.js";const _=/^https:\/\/\S+\.(png|jpe?g|svg)$/;function te(s){return!!_.test(s)}const ae=s=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"4 3 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M10 4.7002H6.1C5.21634 4.7002 4.5 5.41654 4.5 6.3002V13.9002C4.5 14.7838 5.21634 15.5002 6.1 15.5002H13.7C14.5837 15.5002 15.3 14.7839 15.3 13.9002V10.5002",stroke:"#909BAA","stroke-linecap":"round"}),e.jsx("path",{d:"M16 4L9 11",stroke:"#909BAA","stroke-width":"1.5","stroke-linecap":"round"})]}),oe=()=>{const{open:s}=g("changeNodeType"),{close:u}=g("editNodeName"),{changeNodeTypeFeatureFlag:c}=q(x=>({changeNodeTypeFeatureFlag:x.changeNodeTypeFeatureFlag})),a=k(),h=a==null?void 0:a.node_type,d=()=>{u(),s()};return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsxs(n,{align:"center",direction:"row",children:[e.jsx(ne,{children:"Edit Node"}),e.jsxs(se,{children:[e.jsx(J,{type:h}),c&&e.jsx(re,{onClick:d,children:e.jsx(ae,{})})]})]})}),e.jsxs(n,{mb:18,children:[e.jsx(I,{style:{marginBottom:8},children:"Node Name"}),e.jsx(B,{id:"cy-topic",maxLength:50,name:"name",placeholder:"Node name",rules:{...G}})]}),e.jsxs(n,{mb:36,children:[e.jsx(I,{style:{marginBottom:8},children:"Image Url"}),e.jsx(B,{id:"cy-image_url",maxLength:500,name:"image_url",placeholder:"Image url",rules:{pattern:{message:"Please enter a valid URL",value:_}}})]})]})},ne=r(S)` +import{j as e,o as r,q as y,T as S,F as n,O as g,K as q,y as k,aW as G,r as l,bk as O,bi as P,B as K}from"./index-022521cf.js";import{B as Y}from"./index-ee20ad28.js";import{T as J,i as Q,F as X,B as F}from"./index-586dfb7f.js";import{T as B}from"./index-b5c86aa6.js";import{S as Z}from"./Skeleton-5c7b36a8.js";import{C as ee}from"./ClipLoader-d8628c6c.js";import"./index.esm-38ac4e4f.js";import"./InfoIcon-b7d3736d.js";const _=/^https:\/\/\S+\.(png|jpe?g|svg)$/;function te(s){return!!_.test(s)}const ae=s=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"4 3 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M10 4.7002H6.1C5.21634 4.7002 4.5 5.41654 4.5 6.3002V13.9002C4.5 14.7838 5.21634 15.5002 6.1 15.5002H13.7C14.5837 15.5002 15.3 14.7839 15.3 13.9002V10.5002",stroke:"#909BAA","stroke-linecap":"round"}),e.jsx("path",{d:"M16 4L9 11",stroke:"#909BAA","stroke-width":"1.5","stroke-linecap":"round"})]}),oe=()=>{const{open:s}=g("changeNodeType"),{close:u}=g("editNodeName"),{changeNodeTypeFeatureFlag:c}=q(x=>({changeNodeTypeFeatureFlag:x.changeNodeTypeFeatureFlag})),a=k(),h=a==null?void 0:a.node_type,d=()=>{u(),s()};return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsxs(n,{align:"center",direction:"row",children:[e.jsx(ne,{children:"Edit Node"}),e.jsxs(se,{children:[e.jsx(J,{type:h}),c&&e.jsx(re,{onClick:d,children:e.jsx(ae,{})})]})]})}),e.jsxs(n,{mb:18,children:[e.jsx(I,{style:{marginBottom:8},children:"Node Name"}),e.jsx(B,{id:"cy-topic",maxLength:50,name:"name",placeholder:"Node name",rules:{...G}})]}),e.jsxs(n,{mb:36,children:[e.jsx(I,{style:{marginBottom:8},children:"Image Url"}),e.jsx(B,{id:"cy-image_url",maxLength:500,name:"image_url",placeholder:"Image url",rules:{pattern:{message:"Please enter a valid URL",value:_}}})]})]})},ne=r(S)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-d69ca99f.js b/build/assets/index-0bcd712f.js similarity index 92% rename from build/assets/index-d69ca99f.js rename to build/assets/index-0bcd712f.js index 6791885df..48eb1fc30 100644 --- a/build/assets/index-d69ca99f.js +++ b/build/assets/index-0bcd712f.js @@ -1,4 +1,4 @@ -import{j as e,o as c,q as t,F as i,O as y,r as l,p as b,B as S,y as M,bk as $,bl as D}from"./index-a0989d63.js";import{B as R}from"./index-f06622e3.js";import{S as I}from"./Skeleton-091f3105.js";import{C as z}from"./ClipLoader-f345d5d1.js";import{B as j}from"./index-775b6bc6.js";const A=d=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 60 52",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M12.849 16.2461L31.5592 5.44376L50.2694 16.2461V37.8508L31.5592 48.6531L12.849 37.8508V16.2461Z",stroke:"#6B7A8D",fill:"currentColor","stroke-width":"2"}),e.jsx("path",{d:"M50.7383 16.0509L31.559 27.047M31.559 27.047L12.3798 16.0509M31.559 27.047L31.559 49.2949",stroke:"#6B7A8D","stroke-width":"2"}),e.jsx("path",{d:"M7.44052 9.03136C5.80715 8.08833 3.71857 8.64797 2.77554 10.2813C1.83251 11.9147 2.39215 14.0033 4.02552 14.9463L52.5595 42.9674C54.1929 43.9104 56.2814 43.3508 57.2245 41.7174L55.4924 40.7174L57.2245 41.7174C58.1675 40.0841 57.6079 37.9955 55.9745 37.0525L7.44052 9.03136Z",fill:"currentColor",stroke:"#23252F","stroke-width":"4","stroke-linecap":"round"})]}),E=({nodeName:d})=>e.jsx(i,{children:e.jsxs(i,{align:"center",direction:"column",justify:"space-between",children:[e.jsx(G,{children:e.jsx(A,{})}),e.jsxs(T,{children:["Are you sure you want to delete ",d||"this item","?"]})]})}),T=c(i)` +import{j as e,o as c,q as t,F as i,O as y,r as l,p as b,B as S,y as M,bk as $,bl as D}from"./index-022521cf.js";import{B as R}from"./index-ee20ad28.js";import{S as I}from"./Skeleton-5c7b36a8.js";import{C as z}from"./ClipLoader-d8628c6c.js";import{B as j}from"./index-586dfb7f.js";const A=d=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 60 52",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M12.849 16.2461L31.5592 5.44376L50.2694 16.2461V37.8508L31.5592 48.6531L12.849 37.8508V16.2461Z",stroke:"#6B7A8D",fill:"currentColor","stroke-width":"2"}),e.jsx("path",{d:"M50.7383 16.0509L31.559 27.047M31.559 27.047L12.3798 16.0509M31.559 27.047L31.559 49.2949",stroke:"#6B7A8D","stroke-width":"2"}),e.jsx("path",{d:"M7.44052 9.03136C5.80715 8.08833 3.71857 8.64797 2.77554 10.2813C1.83251 11.9147 2.39215 14.0033 4.02552 14.9463L52.5595 42.9674C54.1929 43.9104 56.2814 43.3508 57.2245 41.7174L55.4924 40.7174L57.2245 41.7174C58.1675 40.0841 57.6079 37.9955 55.9745 37.0525L7.44052 9.03136Z",fill:"currentColor",stroke:"#23252F","stroke-width":"4","stroke-linecap":"round"})]}),E=({nodeName:d})=>e.jsx(i,{children:e.jsxs(i,{align:"center",direction:"column",justify:"space-between",children:[e.jsx(G,{children:e.jsx(A,{})}),e.jsxs(T,{children:["Are you sure you want to delete ",d||"this item","?"]})]})}),T=c(i)` color: ${t.white}; font-family: 'Barlow'; font-size: 20px; diff --git a/build/assets/index-6f4f8df4.js b/build/assets/index-39c958ca.js similarity index 99% rename from build/assets/index-6f4f8df4.js rename to build/assets/index-39c958ca.js index fdae590b0..28ac85825 100644 --- a/build/assets/index-6f4f8df4.js +++ b/build/assets/index-39c958ca.js @@ -1,4 +1,4 @@ -import{r as u,$ as Ot,j as f,bz as wt,bA as Lt,_ as a,b as ye,g as Ie,s as L,e as w,u as Pe,a as ae,c as ne,d as $e,f as Re,bB as Mt,bC as Ft,bD as ct,k as dt,bm as ut,i as Xe,bE as To,ac as Tt,af as Nt,o as At,q as je,F as zt}from"./index-a0989d63.js";import{g as xo,t as Dt,e as lo,p as Uo,f as pt,I as ft,T as Et}from"./index-775b6bc6.js";import{u as fo,a as so,f as io,i as bt,b as Bt,P as No,F as jt,S as Wt}from"./Stack-98b5acbc.js";import{a as gt,b as _t,P as Ut,c as Ht}from"./Popover-6e322384.js";import{i as Ho,o as Fo,u as Vo}from"./useSlotProps-374609c4.js";import{c as Ao}from"./createSvgIcon-ebe0e3e6.js";import{T as Vt}from"./TextareaAutosize-76d3e8d6.js";let Ko=0;function Kt(e){const[o,t]=u.useState(e),r=e||o;return u.useEffect(()=>{o==null&&(Ko+=1,t(`mui-${Ko}`))},[o]),r}const qo=Ot["useId".toString()];function zo(e){if(qo!==void 0){const o=qo();return e??o}return Kt(e)}const qt=e=>{const o=u.useRef({});return u.useEffect(()=>{o.current=e}),o.current},Gt=qt;function Xt(e){return e==null||Object.keys(e).length===0}function Yt(e){const{styles:o,defaultTheme:t={}}=e,r=typeof o=="function"?s=>o(Xt(s)?t:s):o;return f.jsx(wt,{styles:r})}function Zt({styles:e,themeId:o,defaultTheme:t={}}){const r=Lt(t),s=typeof e=="function"?e(o&&r[o]||r):e;return f.jsx(Yt,{styles:s})}const Jt=Ao(f.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function Go(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Qt(e={}){const{ignoreAccents:o=!0,ignoreCase:t=!0,limit:r,matchFrom:s="any",stringify:c,trim:d=!1}=e;return(i,{inputValue:b,getOptionLabel:p})=>{let m=d?b.trim():b;t&&(m=m.toLowerCase()),o&&(m=Go(m));const h=m?i.filter(I=>{let v=(c||p)(I);return t&&(v=v.toLowerCase()),o&&(v=Go(v)),s==="start"?v.indexOf(m)===0:v.indexOf(m)>-1}):i;return typeof r=="number"?h.slice(0,r):h}}function Lo(e,o){for(let t=0;t{var o;return e.current!==null&&((o=e.current.parentElement)==null?void 0:o.contains(document.activeElement))};function tn(e){const{unstable_isActiveElementInListbox:o=on,unstable_classNamePrefix:t="Mui",autoComplete:r=!1,autoHighlight:s=!1,autoSelect:c=!1,blurOnSelect:d=!1,clearOnBlur:i=!e.freeSolo,clearOnEscape:b=!1,componentName:p="useAutocomplete",defaultValue:m=e.multiple?[]:null,disableClearable:h=!1,disableCloseOnSelect:I=!1,disabled:v,disabledItemsFocusable:R=!1,disableListWrap:M=!1,filterOptions:P=en,filterSelectedOptions:O=!1,freeSolo:k=!1,getOptionDisabled:C,getOptionKey:$,getOptionLabel:E=l=>{var n;return(n=l.label)!=null?n:l},groupBy:A,handleHomeEndKeys:F=!e.freeSolo,id:q,includeInputInList:le=!1,inputValue:de,isOptionEqualToValue:oe=(l,n)=>l===n,multiple:T=!1,onChange:J,onClose:G,onHighlightChange:se,onInputChange:Q,onOpen:re,open:U,openOnFocus:N=!1,options:ie,readOnly:Se=!1,selectOnFocus:Le=!e.freeSolo,value:ue}=e,W=zo(q);let ee=E;ee=l=>{const n=E(l);return typeof n!="string"?String(n):n};const fe=u.useRef(!1),We=u.useRef(!0),Z=u.useRef(null),be=u.useRef(null),[Me,Y]=u.useState(null),[H,ze]=u.useState(-1),_e=s?0:-1,te=u.useRef(_e),[S,to]=fo({controlled:ue,default:m,name:p}),[_,xe]=fo({controlled:de,default:"",name:p,state:"inputValue"}),[Fe,ce]=u.useState(!1),Te=u.useCallback((l,n)=>{if(!(T?S.length!(O&&(T?S:[S]).some(n=>n!==null&&oe(l,n)))),{inputValue:Ee&&Ye?"":_,getOptionLabel:ee}):[],he=Gt({filteredOptions:j,value:S,inputValue:_});u.useEffect(()=>{const l=S!==he.value;Fe&&!l||k&&!l||Te(null,S)},[S,Te,Fe,he.value,k]);const Ke=me&&j.length>0&&!Se,qe=xo(l=>{l===-1?Z.current.focus():Me.querySelector(`[data-tag-index="${l}"]`).focus()});u.useEffect(()=>{T&&H>S.length-1&&(ze(-1),qe(-1))},[S,T,H,qe]);function y(l,n){if(!be.current||l<0||l>=j.length)return-1;let g=l;for(;;){const x=be.current.querySelector(`[data-option-index="${g}"]`),K=R?!1:!x||x.disabled||x.getAttribute("aria-disabled")==="true";if(x&&x.hasAttribute("tabindex")&&!K)return g;if(n==="next"?g=(g+1)%j.length:g=(g-1+j.length)%j.length,g===l)return-1}}const B=xo(({event:l,index:n,reason:g="auto"})=>{if(te.current=n,n===-1?Z.current.removeAttribute("aria-activedescendant"):Z.current.setAttribute("aria-activedescendant",`${W}-option-${n}`),se&&se(l,n===-1?null:j[n],g),!be.current)return;const x=be.current.querySelector(`[role="option"].${t}-focused`);x&&(x.classList.remove(`${t}-focused`),x.classList.remove(`${t}-focusVisible`));let K=be.current;if(be.current.getAttribute("role")!=="listbox"&&(K=be.current.parentElement.querySelector('[role="listbox"]')),!K)return;if(n===-1){K.scrollTop=0;return}const pe=be.current.querySelector(`[data-option-index="${n}"]`);if(pe&&(pe.classList.add(`${t}-focused`),g==="keyboard"&&pe.classList.add(`${t}-focusVisible`),K.scrollHeight>K.clientHeight&&g!=="mouse"&&g!=="touch")){const ge=pe,He=K.clientHeight+K.scrollTop,_o=ge.offsetTop+ge.offsetHeight;_o>He?K.scrollTop=_o-K.clientHeight:ge.offsetTop-ge.offsetHeight*(A?1.3:0){if(!z)return;const pe=y((()=>{const ge=j.length-1;if(n==="reset")return _e;if(n==="start")return 0;if(n==="end")return ge;const He=te.current+n;return He<0?He===-1&&le?-1:M&&te.current!==-1||Math.abs(n)>1?0:ge:He>ge?He===ge+1&&le?-1:M||Math.abs(n)>1?ge:0:He})(),g);if(B({index:pe,reason:x,event:l}),r&&n!=="reset")if(pe===-1)Z.current.value=_;else{const ge=ee(j[pe]);Z.current.value=ge,ge.toLowerCase().indexOf(_.toLowerCase())===0&&_.length>0&&Z.current.setSelectionRange(_.length,ge.length)}}),ke=()=>{const l=(n,g)=>{const x=n?ee(n):"",K=g?ee(g):"";return x===K};if(te.current!==-1&&he.filteredOptions&&he.filteredOptions.length!==j.length&&he.inputValue===_&&(T?S.length===he.value.length&&he.value.every((n,g)=>ee(S[g])===ee(n)):l(he.value,S))){const n=he.filteredOptions[te.current];if(n&&j.some(x=>ee(x)===ee(n)))return!0}return!1},Ze=u.useCallback(()=>{if(!z||ke())return;const l=T?S[0]:S;if(j.length===0||l==null){X({diff:"reset"});return}if(be.current){if(l!=null){const n=j[te.current];if(T&&n&&Lo(S,x=>oe(n,x))!==-1)return;const g=Lo(j,x=>oe(x,l));g===-1?X({diff:"reset"}):B({index:g});return}if(te.current>=j.length-1){B({index:j.length-1});return}B({index:te.current})}},[j.length,T?!1:S,O,X,B,z,_,T]),Po=xo(l=>{Dt(be,l),l&&Ze()});u.useEffect(()=>{Ze()},[Ze]);const Ae=l=>{me||(Ne(!0),De(!0),re&&re(l))},Ge=(l,n)=>{me&&(Ne(!1),G&&G(l,n))},Ue=(l,n,g,x)=>{if(T){if(S.length===n.length&&S.every((K,pe)=>K===n[pe]))return}else if(S===n)return;J&&J(l,n,g,x),to(n)},no=u.useRef(!1),eo=(l,n,g="selectOption",x="options")=>{let K=g,pe=n;if(T){pe=Array.isArray(S)?S.slice():[];const ge=Lo(pe,He=>oe(n,He));ge===-1?pe.push(n):x!=="freeSolo"&&(pe.splice(ge,1),K="removeOption")}Te(l,pe),Ue(l,pe,K,{option:n}),!I&&(!l||!l.ctrlKey&&!l.metaKey)&&Ge(l,K),(d===!0||d==="touch"&&no.current||d==="mouse"&&!no.current)&&Z.current.blur()};function go(l,n){if(l===-1)return-1;let g=l;for(;;){if(n==="next"&&g===S.length||n==="previous"&&g===-1)return-1;const x=Me.querySelector(`[data-tag-index="${g}"]`);if(!x||!x.hasAttribute("tabindex")||x.disabled||x.getAttribute("aria-disabled")==="true")g+=n==="next"?1:-1;else return g}}const mo=(l,n)=>{if(!T)return;_===""&&Ge(l,"toggleInput");let g=H;H===-1?_===""&&n==="previous"&&(g=S.length-1):(g+=n==="next"?1:-1,g<0&&(g=0),g===S.length&&(g=-1)),g=go(g,n),ze(g),qe(g)},ho=l=>{fe.current=!0,xe(""),Q&&Q(l,"","clear"),Ue(l,T?[]:null,"clear")},ko=l=>n=>{if(l.onKeyDown&&l.onKeyDown(n),!n.defaultMuiPrevented&&(H!==-1&&["ArrowLeft","ArrowRight"].indexOf(n.key)===-1&&(ze(-1),qe(-1)),n.which!==229))switch(n.key){case"Home":z&&F&&(n.preventDefault(),X({diff:"start",direction:"next",reason:"keyboard",event:n}));break;case"End":z&&F&&(n.preventDefault(),X({diff:"end",direction:"previous",reason:"keyboard",event:n}));break;case"PageUp":n.preventDefault(),X({diff:-Xo,direction:"previous",reason:"keyboard",event:n}),Ae(n);break;case"PageDown":n.preventDefault(),X({diff:Xo,direction:"next",reason:"keyboard",event:n}),Ae(n);break;case"ArrowDown":n.preventDefault(),X({diff:1,direction:"next",reason:"keyboard",event:n}),Ae(n);break;case"ArrowUp":n.preventDefault(),X({diff:-1,direction:"previous",reason:"keyboard",event:n}),Ae(n);break;case"ArrowLeft":mo(n,"previous");break;case"ArrowRight":mo(n,"next");break;case"Enter":if(te.current!==-1&&z){const g=j[te.current],x=C?C(g):!1;if(n.preventDefault(),x)return;eo(n,g,"selectOption"),r&&Z.current.setSelectionRange(Z.current.value.length,Z.current.value.length)}else k&&_!==""&&Ee===!1&&(T&&n.preventDefault(),eo(n,_,"createOption","freeSolo"));break;case"Escape":z?(n.preventDefault(),n.stopPropagation(),Ge(n,"escape")):b&&(_!==""||T&&S.length>0)&&(n.preventDefault(),n.stopPropagation(),ho(n));break;case"Backspace":if(T&&!Se&&_===""&&S.length>0){const g=H===-1?S.length-1:H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break;case"Delete":if(T&&!Se&&_===""&&S.length>0&&H!==-1){const g=H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break}},jo=l=>{ce(!0),N&&!fe.current&&Ae(l)},ro=l=>{if(o(be)){Z.current.focus();return}ce(!1),We.current=!0,fe.current=!1,c&&te.current!==-1&&z?eo(l,j[te.current],"blur"):c&&k&&_!==""?eo(l,_,"blur","freeSolo"):i&&Te(l,S),Ge(l,"blur")},Ce=l=>{const n=l.target.value;_!==n&&(xe(n),De(!1),Q&&Q(l,n,"input")),n===""?!h&&!T&&Ue(l,null,"clear"):Ae(l)},ve=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));te.current!==n&&B({event:l,index:n,reason:"mouse"})},Be=l=>{B({event:l,index:Number(l.currentTarget.getAttribute("data-option-index")),reason:"touch"}),no.current=!0},Wo=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));eo(l,j[n],"selectOption"),no.current=!1},Ro=l=>n=>{const g=S.slice();g.splice(l,1),Ue(n,g,"removeOption",{option:S[l]})},Oo=l=>{me?Ge(l,"toggleInput"):Ae(l)},wo=l=>{l.currentTarget.contains(l.target)&&l.target.getAttribute("id")!==W&&l.preventDefault()},vo=l=>{l.currentTarget.contains(l.target)&&(Z.current.focus(),Le&&We.current&&Z.current.selectionEnd-Z.current.selectionStart===0&&Z.current.select(),We.current=!1)},co=l=>{!v&&(_===""||!me)&&Oo(l)};let oo=k&&_.length>0;oo=oo||(T?S.length>0:S!==null);let ao=j;return A&&(ao=j.reduce((l,n,g)=>{const x=A(n);return l.length>0&&l[l.length-1].group===x?l[l.length-1].options.push(n):l.push({key:g,index:g,group:x,options:[n]}),l},[])),v&&Fe&&ro(),{getRootProps:(l={})=>a({"aria-owns":Ke?`${W}-listbox`:null},l,{onKeyDown:ko(l),onMouseDown:wo,onClick:vo}),getInputLabelProps:()=>({id:`${W}-label`,htmlFor:W}),getInputProps:()=>({id:W,value:_,onBlur:ro,onFocus:jo,onChange:Ce,onMouseDown:co,"aria-activedescendant":z?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Ke?`${W}-listbox`:void 0,"aria-expanded":Ke,autoComplete:"off",ref:Z,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:v}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:ho}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Oo}),getTagProps:({index:l})=>a({key:l,"data-tag-index":l,tabIndex:-1},!Se&&{onDelete:Ro(l)}),getListboxProps:()=>({role:"listbox",id:`${W}-listbox`,"aria-labelledby":`${W}-label`,ref:Po,onMouseDown:l=>{l.preventDefault()}}),getOptionProps:({index:l,option:n})=>{var g;const x=(T?S:[S]).some(pe=>pe!=null&&oe(n,pe)),K=C?C(n):!1;return{key:(g=$==null?void 0:$(n))!=null?g:ee(n),tabIndex:-1,role:"option",id:`${W}-option-${l}`,onMouseMove:ve,onClick:Wo,onTouchStart:Be,"data-option-index":l,"aria-disabled":K,"aria-selected":x}},id:W,inputValue:_,value:S,dirty:oo,expanded:z&&Me,popupOpen:z,focused:Fe||H!==-1,anchorEl:Me,setAnchorEl:Y,focusedTag:H,groupedOptions:ao}}function nn(e){return ye("MuiListSubheader",e)}Ie("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const rn=["className","color","component","disableGutters","disableSticky","inset"],an=e=>{const{classes:o,color:t,disableGutters:r,inset:s,disableSticky:c}=e,d={root:["root",t!=="default"&&`color${w(t)}`,!r&&"gutters",s&&"inset",!c&&"sticky"]};return $e(d,nn,o)},ln=L("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.color!=="default"&&o[`color${w(t.color)}`],!t.disableGutters&&o.gutters,t.inset&&o.inset,!t.disableSticky&&o.sticky]}})(({theme:e,ownerState:o})=>a({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},o.color==="primary"&&{color:(e.vars||e).palette.primary.main},o.color==="inherit"&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),mt=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiListSubheader"}),{className:s,color:c="default",component:d="li",disableGutters:i=!1,disableSticky:b=!1,inset:p=!1}=r,m=ae(r,rn),h=a({},r,{color:c,component:d,disableGutters:i,disableSticky:b,inset:p}),I=an(h);return f.jsx(ln,a({as:d,className:ne(I.root,s),ref:t,ownerState:h},m))});mt.muiSkipListHighlight=!0;const sn=mt,cn=Ao(f.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function dn(e){return ye("MuiChip",e)}const un=Ie("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),V=un,pn=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],fn=e=>{const{classes:o,disabled:t,size:r,color:s,iconColor:c,onDelete:d,clickable:i,variant:b}=e,p={root:["root",b,t&&"disabled",`size${w(r)}`,`color${w(s)}`,i&&"clickable",i&&`clickableColor${w(s)}`,d&&"deletable",d&&`deletableColor${w(s)}`,`${b}${w(s)}`],label:["label",`label${w(r)}`],avatar:["avatar",`avatar${w(r)}`,`avatarColor${w(s)}`],icon:["icon",`icon${w(r)}`,`iconColor${w(c)}`],deleteIcon:["deleteIcon",`deleteIcon${w(r)}`,`deleteIconColor${w(s)}`,`deleteIcon${w(b)}Color${w(s)}`]};return $e(p,dn,o)},bn=L("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{color:r,iconColor:s,clickable:c,onDelete:d,size:i,variant:b}=t;return[{[`& .${V.avatar}`]:o.avatar},{[`& .${V.avatar}`]:o[`avatar${w(i)}`]},{[`& .${V.avatar}`]:o[`avatarColor${w(r)}`]},{[`& .${V.icon}`]:o.icon},{[`& .${V.icon}`]:o[`icon${w(i)}`]},{[`& .${V.icon}`]:o[`iconColor${w(s)}`]},{[`& .${V.deleteIcon}`]:o.deleteIcon},{[`& .${V.deleteIcon}`]:o[`deleteIcon${w(i)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIconColor${w(r)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIcon${w(b)}Color${w(r)}`]},o.root,o[`size${w(i)}`],o[`color${w(r)}`],c&&o.clickable,c&&r!=="default"&&o[`clickableColor${w(r)})`],d&&o.deletable,d&&r!=="default"&&o[`deletableColor${w(r)}`],o[b],o[`${b}${w(r)}`]]}})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return a({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${V.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${V.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${V.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${V.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${V.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${V.icon}`]:a({marginLeft:5,marginRight:-6},o.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},o.iconColor===o.color&&a({color:e.vars?e.vars.palette.Chip.defaultIconColor:t},o.color!=="default"&&{color:"inherit"})),[`& .${V.deleteIcon}`]:a({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Re(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Re(e.palette.text.primary,.4)}},o.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},o.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[o.color].contrastTextChannel} / 0.7)`:Re(e.palette[o.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].contrastText}})},o.size==="small"&&{height:24},o.color!=="default"&&{backgroundColor:(e.vars||e).palette[o.color].main,color:(e.vars||e).palette[o.color].contrastText},o.onDelete&&{[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},o.onDelete&&o.color!=="default"&&{[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}})},({theme:e,ownerState:o})=>a({},o.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},o.clickable&&o.color!=="default"&&{[`&:hover, &.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}}),({theme:e,ownerState:o})=>a({},o.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${V.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${V.avatar}`]:{marginLeft:4},[`& .${V.avatarSmall}`]:{marginLeft:2},[`& .${V.icon}`]:{marginLeft:4},[`& .${V.iconSmall}`]:{marginLeft:2},[`& .${V.deleteIcon}`]:{marginRight:5},[`& .${V.deleteIconSmall}`]:{marginRight:3}},o.variant==="outlined"&&o.color!=="default"&&{color:(e.vars||e).palette[o.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7)}`,[`&.${V.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette[o.color].main,e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Re(e.palette[o.color].main,e.palette.action.focusOpacity)},[`& .${V.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].main}}})),gn=L("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,o)=>{const{ownerState:t}=e,{size:r}=t;return[o.label,o[`label${w(r)}`]]}})(({ownerState:e})=>a({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function Yo(e){return e.key==="Backspace"||e.key==="Delete"}const mn=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiChip"}),{avatar:s,className:c,clickable:d,color:i="default",component:b,deleteIcon:p,disabled:m=!1,icon:h,label:I,onClick:v,onDelete:R,onKeyDown:M,onKeyUp:P,size:O="medium",variant:k="filled",tabIndex:C,skipFocusWhenDisabled:$=!1}=r,E=ae(r,pn),A=u.useRef(null),F=lo(A,t),q=N=>{N.stopPropagation(),R&&R(N)},le=N=>{N.currentTarget===N.target&&Yo(N)&&N.preventDefault(),M&&M(N)},de=N=>{N.currentTarget===N.target&&(R&&Yo(N)?R(N):N.key==="Escape"&&A.current&&A.current.blur()),P&&P(N)},oe=d!==!1&&v?!0:d,T=oe||R?Uo:b||"div",J=a({},r,{component:T,disabled:m,size:O,color:i,iconColor:u.isValidElement(h)&&h.props.color||i,onDelete:!!R,clickable:oe,variant:k}),G=fn(J),se=T===Uo?a({component:b||"div",focusVisibleClassName:G.focusVisible},R&&{disableRipple:!0}):{};let Q=null;R&&(Q=p&&u.isValidElement(p)?u.cloneElement(p,{className:ne(p.props.className,G.deleteIcon),onClick:q}):f.jsx(cn,{className:ne(G.deleteIcon),onClick:q}));let re=null;s&&u.isValidElement(s)&&(re=u.cloneElement(s,{className:ne(G.avatar,s.props.className)}));let U=null;return h&&u.isValidElement(h)&&(U=u.cloneElement(h,{className:ne(G.icon,h.props.className)})),f.jsxs(bn,a({as:T,className:ne(G.root,c),disabled:oe&&m?!0:void 0,onClick:v,onKeyDown:le,onKeyUp:de,ref:F,tabIndex:$&&m?-1:C,ownerState:J},se,E,{children:[re||U,f.jsx(gn,{className:ne(G.label),ownerState:J,children:I}),Q]}))}),hn=mn;function vn(e){return f.jsx(Zt,a({},e,{defaultTheme:Mt,themeId:Ft}))}function xn(e){return ye("MuiInputBase",e)}const Cn=Ie("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Oe=Cn,yn=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Co=(e,o)=>{const{ownerState:t}=e;return[o.root,t.formControl&&o.formControl,t.startAdornment&&o.adornedStart,t.endAdornment&&o.adornedEnd,t.error&&o.error,t.size==="small"&&o.sizeSmall,t.multiline&&o.multiline,t.color&&o[`color${w(t.color)}`],t.fullWidth&&o.fullWidth,t.hiddenLabel&&o.hiddenLabel]},yo=(e,o)=>{const{ownerState:t}=e;return[o.input,t.size==="small"&&o.inputSizeSmall,t.multiline&&o.inputMultiline,t.type==="search"&&o.inputTypeSearch,t.startAdornment&&o.inputAdornedStart,t.endAdornment&&o.inputAdornedEnd,t.hiddenLabel&&o.inputHiddenLabel]},In=e=>{const{classes:o,color:t,disabled:r,error:s,endAdornment:c,focused:d,formControl:i,fullWidth:b,hiddenLabel:p,multiline:m,readOnly:h,size:I,startAdornment:v,type:R}=e,M={root:["root",`color${w(t)}`,r&&"disabled",s&&"error",b&&"fullWidth",d&&"focused",i&&"formControl",I&&I!=="medium"&&`size${w(I)}`,m&&"multiline",v&&"adornedStart",c&&"adornedEnd",p&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",R==="search"&&"inputTypeSearch",m&&"inputMultiline",I==="small"&&"inputSizeSmall",p&&"inputHiddenLabel",v&&"inputAdornedStart",c&&"inputAdornedEnd",h&&"readOnly"]};return $e(M,xn,o)},Io=L("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Co})(({theme:e,ownerState:o})=>a({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Oe.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},o.multiline&&a({padding:"4px 0 5px"},o.size==="small"&&{paddingTop:1}),o.fullWidth&&{width:"100%"})),$o=L("input",{name:"MuiInputBase",slot:"Input",overridesResolver:yo})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light",r=a({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),s={opacity:"0 !important"},c=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return a({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Oe.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":c,"&:focus::-moz-placeholder":c,"&:focus:-ms-input-placeholder":c,"&:focus::-ms-input-placeholder":c},[`&.${Oe.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},o.size==="small"&&{paddingTop:1},o.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},o.type==="search"&&{MozAppearance:"textfield"})}),$n=f.jsx(vn,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Sn=u.forwardRef(function(o,t){var r;const s=Pe({props:o,name:"MuiInputBase"}),{"aria-describedby":c,autoComplete:d,autoFocus:i,className:b,components:p={},componentsProps:m={},defaultValue:h,disabled:I,disableInjectingGlobalStyles:v,endAdornment:R,fullWidth:M=!1,id:P,inputComponent:O="input",inputProps:k={},inputRef:C,maxRows:$,minRows:E,multiline:A=!1,name:F,onBlur:q,onChange:le,onClick:de,onFocus:oe,onKeyDown:T,onKeyUp:J,placeholder:G,readOnly:se,renderSuffix:Q,rows:re,slotProps:U={},slots:N={},startAdornment:ie,type:Se="text",value:Le}=s,ue=ae(s,yn),W=k.value!=null?k.value:Le,{current:ee}=u.useRef(W!=null),fe=u.useRef(),We=u.useCallback(z=>{},[]),Z=lo(fe,C,k.ref,We),[be,Me]=u.useState(!1),Y=so(),H=io({props:s,muiFormControl:Y,states:["color","disabled","error","hiddenLabel","size","required","filled"]});H.focused=Y?Y.focused:be,u.useEffect(()=>{!Y&&I&&be&&(Me(!1),q&&q())},[Y,I,be,q]);const ze=Y&&Y.onFilled,_e=Y&&Y.onEmpty,te=u.useCallback(z=>{bt(z)?ze&&ze():_e&&_e()},[ze,_e]);pt(()=>{ee&&te({value:W})},[W,te,ee]);const S=z=>{if(H.disabled){z.stopPropagation();return}oe&&oe(z),k.onFocus&&k.onFocus(z),Y&&Y.onFocus?Y.onFocus(z):Me(!0)},to=z=>{q&&q(z),k.onBlur&&k.onBlur(z),Y&&Y.onBlur?Y.onBlur(z):Me(!1)},_=(z,...j)=>{if(!ee){const he=z.target||fe.current;if(he==null)throw new Error(ct(1));te({value:he.value})}k.onChange&&k.onChange(z,...j),le&&le(z,...j)};u.useEffect(()=>{te(fe.current)},[]);const xe=z=>{fe.current&&z.currentTarget===z.target&&fe.current.focus(),de&&de(z)};let Fe=O,ce=k;A&&Fe==="input"&&(re?ce=a({type:void 0,minRows:re,maxRows:re},ce):ce=a({type:void 0,maxRows:$,minRows:E},ce),Fe=Vt);const Te=z=>{te(z.animationName==="mui-auto-fill-cancel"?fe.current:{value:"x"})};u.useEffect(()=>{Y&&Y.setAdornedStart(!!ie)},[Y,ie]);const me=a({},s,{color:H.color||"primary",disabled:H.disabled,endAdornment:R,error:H.error,focused:H.focused,formControl:Y,fullWidth:M,hiddenLabel:H.hiddenLabel,multiline:A,size:H.size,startAdornment:ie,type:Se}),Ne=In(me),Ye=N.root||p.Root||Io,De=U.root||m.root||{},Ee=N.input||p.Input||$o;return ce=a({},ce,(r=U.input)!=null?r:m.input),f.jsxs(u.Fragment,{children:[!v&&$n,f.jsxs(Ye,a({},De,!Ho(Ye)&&{ownerState:a({},me,De.ownerState)},{ref:t,onClick:xe},ue,{className:ne(Ne.root,De.className,b,se&&"MuiInputBase-readOnly"),children:[ie,f.jsx(Bt.Provider,{value:null,children:f.jsx(Ee,a({ownerState:me,"aria-invalid":H.error,"aria-describedby":c,autoComplete:d,autoFocus:i,defaultValue:h,disabled:H.disabled,id:P,onAnimationStart:Te,name:F,placeholder:G,readOnly:se,required:H.required,rows:re,value:W,onKeyDown:T,onKeyUp:J,type:Se},ce,!Ho(Ee)&&{as:Fe,ownerState:a({},me,ce.ownerState)},{ref:Z,className:ne(Ne.input,ce.className,se&&"MuiInputBase-readOnly"),onBlur:to,onChange:_,onFocus:S}))}),R,Q?Q(a({},H,{startAdornment:ie})):null]}))]})}),Do=Sn;function Pn(e){return ye("MuiInput",e)}const kn=a({},Oe,Ie("MuiInput",["root","underline","input"])),Qe=kn;function Rn(e){return ye("MuiOutlinedInput",e)}const On=a({},Oe,Ie("MuiOutlinedInput",["root","notchedOutline","input"])),Ve=On;function wn(e){return ye("MuiFilledInput",e)}const Ln=a({},Oe,Ie("MuiFilledInput",["root","underline","input"])),we=Ln,ht=Ao(f.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Mn(e){return ye("MuiAutocomplete",e)}const Fn=Ie("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]),D=Fn;var Zo,Jo;const Tn=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Nn=["ref"],An=["key"],zn=e=>{const{classes:o,disablePortal:t,expanded:r,focused:s,fullWidth:c,hasClearIcon:d,hasPopupIcon:i,inputFocused:b,popupOpen:p,size:m}=e,h={root:["root",r&&"expanded",s&&"focused",c&&"fullWidth",d&&"hasClearIcon",i&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",b&&"inputFocused"],tag:["tag",`tagSize${w(m)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",p&&"popupIndicatorOpen"],popper:["popper",t&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return $e(h,Mn,o)},Dn=L("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{fullWidth:r,hasClearIcon:s,hasPopupIcon:c,inputFocused:d,size:i}=t;return[{[`& .${D.tag}`]:o.tag},{[`& .${D.tag}`]:o[`tagSize${w(i)}`]},{[`& .${D.inputRoot}`]:o.inputRoot},{[`& .${D.input}`]:o.input},{[`& .${D.input}`]:d&&o.inputFocused},o.root,r&&o.fullWidth,c&&o.hasPopupIcon,s&&o.hasClearIcon]}})(({ownerState:e})=>a({[`&.${D.focused} .${D.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${D.clearIndicator}`]:{visibility:"visible"}}},e.fullWidth&&{width:"100%"},{[`& .${D.tag}`]:a({margin:3,maxWidth:"calc(100% - 6px)"},e.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${D.inputRoot}`]:{flexWrap:"wrap",[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4},[`& .${D.input}`]:{width:0,minWidth:30}},[`& .${Qe.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Qe.root}.${Oe.sizeSmall}`]:{[`& .${Qe.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Ve.root}`]:{padding:9,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${D.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${Ve.root}.${Oe.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${D.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${we.root}`]:{paddingTop:19,paddingLeft:8,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${we.input}`]:{padding:"7px 4px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${we.root}.${Oe.sizeSmall}`]:{paddingBottom:1,[`& .${we.input}`]:{padding:"2.5px 4px"}},[`& .${Oe.hiddenLabel}`]:{paddingTop:8},[`& .${we.root}.${Oe.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${D.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${we.root}.${Oe.hiddenLabel}.${Oe.sizeSmall}`]:{[`& .${D.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${D.input}`]:a({flexGrow:1,textOverflow:"ellipsis",opacity:0},e.inputFocused&&{opacity:1})})),En=L("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,o)=>o.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Bn=L(ft,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),jn=L(ft,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},o)=>a({},o.popupIndicator,e.popupOpen&&o.popupIndicatorOpen)})(({ownerState:e})=>a({padding:2,marginRight:-2},e.popupOpen&&{transform:"rotate(180deg)"})),Wn=L(No,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${D.option}`]:o.option},o.popper,t.disablePortal&&o.popperDisablePortal]}})(({theme:e,ownerState:o})=>a({zIndex:(e.vars||e).zIndex.modal},o.disablePortal&&{position:"absolute"})),_n=L(gt,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,o)=>o.paper})(({theme:e})=>a({},e.typography.body1,{overflow:"auto"})),Un=L("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,o)=>o.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Hn=L("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,o)=>o.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Vn=L("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,o)=>o.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${D.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${D.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${D.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Re(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${D.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${D.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),Kn=L(sn,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,o)=>o.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),qn=L("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,o)=>o.groupUl})({padding:0,[`& .${D.option}`]:{paddingLeft:24}}),Gn=u.forwardRef(function(o,t){var r,s,c,d;const i=Pe({props:o,name:"MuiAutocomplete"}),{autoComplete:b=!1,autoHighlight:p=!1,autoSelect:m=!1,blurOnSelect:h=!1,ChipProps:I,className:v,clearIcon:R=Zo||(Zo=f.jsx(Jt,{fontSize:"small"})),clearOnBlur:M=!i.freeSolo,clearOnEscape:P=!1,clearText:O="Clear",closeText:k="Close",componentsProps:C={},defaultValue:$=i.multiple?[]:null,disableClearable:E=!1,disableCloseOnSelect:A=!1,disabled:F=!1,disabledItemsFocusable:q=!1,disableListWrap:le=!1,disablePortal:de=!1,filterSelectedOptions:oe=!1,forcePopupIcon:T="auto",freeSolo:J=!1,fullWidth:G=!1,getLimitTagsText:se=n=>`+${n}`,getOptionLabel:Q,groupBy:re,handleHomeEndKeys:U=!i.freeSolo,includeInputInList:N=!1,limitTags:ie=-1,ListboxComponent:Se="ul",ListboxProps:Le,loading:ue=!1,loadingText:W="Loading…",multiple:ee=!1,noOptionsText:fe="No options",openOnFocus:We=!1,openText:Z="Open",PaperComponent:be=gt,PopperComponent:Me=No,popupIcon:Y=Jo||(Jo=f.jsx(ht,{})),readOnly:H=!1,renderGroup:ze,renderInput:_e,renderOption:te,renderTags:S,selectOnFocus:to=!i.freeSolo,size:_="medium",slotProps:xe={}}=i,Fe=ae(i,Tn),{getRootProps:ce,getInputProps:Te,getInputLabelProps:me,getPopupIndicatorProps:Ne,getClearProps:Ye,getTagProps:De,getListboxProps:Ee,getOptionProps:z,value:j,dirty:he,expanded:Ke,id:qe,popupOpen:y,focused:B,focusedTag:X,anchorEl:ke,setAnchorEl:Ze,inputValue:Po,groupedOptions:Ae}=tn(a({},i,{componentName:"Autocomplete"})),Ge=!E&&!F&&he&&!H,Ue=(!J||T===!0)&&T!==!1,{onMouseDown:no}=Te(),{ref:eo}=Le??{},go=Ee(),{ref:mo}=go,ho=ae(go,Nn),ko=lo(mo,eo),ro=Q||(n=>{var g;return(g=n.label)!=null?g:n}),Ce=a({},i,{disablePortal:de,expanded:Ke,focused:B,fullWidth:G,getOptionLabel:ro,hasClearIcon:Ge,hasPopupIcon:Ue,inputFocused:X===-1,popupOpen:y,size:_}),ve=zn(Ce);let Be;if(ee&&j.length>0){const n=g=>a({className:ve.tag,disabled:F},De(g));S?Be=S(j,n,Ce):Be=j.map((g,x)=>f.jsx(hn,a({label:ro(g),size:_},n({index:x}),I)))}if(ie>-1&&Array.isArray(Be)){const n=Be.length-ie;!B&&n>0&&(Be=Be.splice(0,ie),Be.push(f.jsx("span",{className:ve.tag,children:se(n)},Be.length)))}const Ro=ze||(n=>f.jsxs("li",{children:[f.jsx(Kn,{className:ve.groupLabel,ownerState:Ce,component:"div",children:n.group}),f.jsx(qn,{className:ve.groupUl,ownerState:Ce,children:n.children})]},n.key)),wo=te||((n,g)=>{const{key:x}=n,K=ae(n,An);return f.jsx("li",a({},K,{children:ro(g)}),x)}),vo=(n,g)=>{const x=z({option:n,index:g});return wo(a({},x,{className:ve.option}),n,{selected:x["aria-selected"],index:g,inputValue:Po},Ce)},co=(r=xe.clearIndicator)!=null?r:C.clearIndicator,oo=(s=xe.paper)!=null?s:C.paper,ao=(c=xe.popper)!=null?c:C.popper,l=(d=xe.popupIndicator)!=null?d:C.popupIndicator;return f.jsxs(u.Fragment,{children:[f.jsx(Dn,a({ref:t,className:ne(ve.root,v),ownerState:Ce},ce(Fe),{children:_e({id:qe,disabled:F,fullWidth:!0,size:_==="small"?"small":void 0,InputLabelProps:me(),InputProps:a({ref:Ze,className:ve.inputRoot,startAdornment:Be,onClick:n=>{n.target===n.currentTarget&&no(n)}},(Ge||Ue)&&{endAdornment:f.jsxs(En,{className:ve.endAdornment,ownerState:Ce,children:[Ge?f.jsx(Bn,a({},Ye(),{"aria-label":O,title:O,ownerState:Ce},co,{className:ne(ve.clearIndicator,co==null?void 0:co.className),children:R})):null,Ue?f.jsx(jn,a({},Ne(),{disabled:F,"aria-label":y?k:Z,title:y?k:Z,ownerState:Ce},l,{className:ne(ve.popupIndicator,l==null?void 0:l.className),children:Y})):null]})}),inputProps:a({className:ve.input,disabled:F,readOnly:H},Te())})})),ke?f.jsx(Wn,a({as:Me,disablePortal:de,style:{width:ke?ke.clientWidth:null},ownerState:Ce,role:"presentation",anchorEl:ke,open:y},ao,{className:ne(ve.popper,ao==null?void 0:ao.className),children:f.jsxs(_n,a({ownerState:Ce,as:be},oo,{className:ne(ve.paper,oo==null?void 0:oo.className),children:[ue&&Ae.length===0?f.jsx(Un,{className:ve.loading,ownerState:Ce,children:W}):null,Ae.length===0&&!J&&!ue?f.jsx(Hn,{className:ve.noOptions,ownerState:Ce,role:"presentation",onMouseDown:n=>{n.preventDefault()},children:fe}):null,Ae.length>0?f.jsx(Vn,a({as:Se,className:ve.listbox,ownerState:Ce},ho,Le,{ref:ko,children:Ae.map((n,g)=>re?Ro({key:n.key,group:n.group,children:n.options.map((x,K)=>vo(x,n.index+K))}):vo(n,g))})):null]}))})):null]})}),Xn=Gn;function Yn(e){return ye("MuiCircularProgress",e)}Ie("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Zn=["className","color","disableShrink","size","style","thickness","value","variant"];let So=e=>e,Qo,et,ot,tt;const Je=44,Jn=dt(Qo||(Qo=So` +import{r as u,$ as Ot,j as f,bz as wt,bA as Lt,_ as a,b as ye,g as Ie,s as L,e as w,u as Pe,a as ae,c as ne,d as $e,f as Re,bB as Mt,bC as Ft,bD as ct,k as dt,bm as ut,i as Xe,bE as To,ac as Tt,af as Nt,o as At,q as je,F as zt}from"./index-022521cf.js";import{g as xo,t as Dt,e as lo,p as Uo,f as pt,I as ft,T as Et}from"./index-586dfb7f.js";import{u as fo,a as so,f as io,i as bt,b as Bt,P as No,F as jt,S as Wt}from"./Stack-ce2a5ec5.js";import{a as gt,b as _t,P as Ut,c as Ht}from"./Popover-cc3c7b26.js";import{i as Ho,o as Fo,u as Vo}from"./useSlotProps-51fc8b9f.js";import{c as Ao}from"./createSvgIcon-e1ebdfca.js";import{T as Vt}from"./TextareaAutosize-0ace781b.js";let Ko=0;function Kt(e){const[o,t]=u.useState(e),r=e||o;return u.useEffect(()=>{o==null&&(Ko+=1,t(`mui-${Ko}`))},[o]),r}const qo=Ot["useId".toString()];function zo(e){if(qo!==void 0){const o=qo();return e??o}return Kt(e)}const qt=e=>{const o=u.useRef({});return u.useEffect(()=>{o.current=e}),o.current},Gt=qt;function Xt(e){return e==null||Object.keys(e).length===0}function Yt(e){const{styles:o,defaultTheme:t={}}=e,r=typeof o=="function"?s=>o(Xt(s)?t:s):o;return f.jsx(wt,{styles:r})}function Zt({styles:e,themeId:o,defaultTheme:t={}}){const r=Lt(t),s=typeof e=="function"?e(o&&r[o]||r):e;return f.jsx(Yt,{styles:s})}const Jt=Ao(f.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function Go(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Qt(e={}){const{ignoreAccents:o=!0,ignoreCase:t=!0,limit:r,matchFrom:s="any",stringify:c,trim:d=!1}=e;return(i,{inputValue:b,getOptionLabel:p})=>{let m=d?b.trim():b;t&&(m=m.toLowerCase()),o&&(m=Go(m));const h=m?i.filter(I=>{let v=(c||p)(I);return t&&(v=v.toLowerCase()),o&&(v=Go(v)),s==="start"?v.indexOf(m)===0:v.indexOf(m)>-1}):i;return typeof r=="number"?h.slice(0,r):h}}function Lo(e,o){for(let t=0;t{var o;return e.current!==null&&((o=e.current.parentElement)==null?void 0:o.contains(document.activeElement))};function tn(e){const{unstable_isActiveElementInListbox:o=on,unstable_classNamePrefix:t="Mui",autoComplete:r=!1,autoHighlight:s=!1,autoSelect:c=!1,blurOnSelect:d=!1,clearOnBlur:i=!e.freeSolo,clearOnEscape:b=!1,componentName:p="useAutocomplete",defaultValue:m=e.multiple?[]:null,disableClearable:h=!1,disableCloseOnSelect:I=!1,disabled:v,disabledItemsFocusable:R=!1,disableListWrap:M=!1,filterOptions:P=en,filterSelectedOptions:O=!1,freeSolo:k=!1,getOptionDisabled:C,getOptionKey:$,getOptionLabel:E=l=>{var n;return(n=l.label)!=null?n:l},groupBy:A,handleHomeEndKeys:F=!e.freeSolo,id:q,includeInputInList:le=!1,inputValue:de,isOptionEqualToValue:oe=(l,n)=>l===n,multiple:T=!1,onChange:J,onClose:G,onHighlightChange:se,onInputChange:Q,onOpen:re,open:U,openOnFocus:N=!1,options:ie,readOnly:Se=!1,selectOnFocus:Le=!e.freeSolo,value:ue}=e,W=zo(q);let ee=E;ee=l=>{const n=E(l);return typeof n!="string"?String(n):n};const fe=u.useRef(!1),We=u.useRef(!0),Z=u.useRef(null),be=u.useRef(null),[Me,Y]=u.useState(null),[H,ze]=u.useState(-1),_e=s?0:-1,te=u.useRef(_e),[S,to]=fo({controlled:ue,default:m,name:p}),[_,xe]=fo({controlled:de,default:"",name:p,state:"inputValue"}),[Fe,ce]=u.useState(!1),Te=u.useCallback((l,n)=>{if(!(T?S.length!(O&&(T?S:[S]).some(n=>n!==null&&oe(l,n)))),{inputValue:Ee&&Ye?"":_,getOptionLabel:ee}):[],he=Gt({filteredOptions:j,value:S,inputValue:_});u.useEffect(()=>{const l=S!==he.value;Fe&&!l||k&&!l||Te(null,S)},[S,Te,Fe,he.value,k]);const Ke=me&&j.length>0&&!Se,qe=xo(l=>{l===-1?Z.current.focus():Me.querySelector(`[data-tag-index="${l}"]`).focus()});u.useEffect(()=>{T&&H>S.length-1&&(ze(-1),qe(-1))},[S,T,H,qe]);function y(l,n){if(!be.current||l<0||l>=j.length)return-1;let g=l;for(;;){const x=be.current.querySelector(`[data-option-index="${g}"]`),K=R?!1:!x||x.disabled||x.getAttribute("aria-disabled")==="true";if(x&&x.hasAttribute("tabindex")&&!K)return g;if(n==="next"?g=(g+1)%j.length:g=(g-1+j.length)%j.length,g===l)return-1}}const B=xo(({event:l,index:n,reason:g="auto"})=>{if(te.current=n,n===-1?Z.current.removeAttribute("aria-activedescendant"):Z.current.setAttribute("aria-activedescendant",`${W}-option-${n}`),se&&se(l,n===-1?null:j[n],g),!be.current)return;const x=be.current.querySelector(`[role="option"].${t}-focused`);x&&(x.classList.remove(`${t}-focused`),x.classList.remove(`${t}-focusVisible`));let K=be.current;if(be.current.getAttribute("role")!=="listbox"&&(K=be.current.parentElement.querySelector('[role="listbox"]')),!K)return;if(n===-1){K.scrollTop=0;return}const pe=be.current.querySelector(`[data-option-index="${n}"]`);if(pe&&(pe.classList.add(`${t}-focused`),g==="keyboard"&&pe.classList.add(`${t}-focusVisible`),K.scrollHeight>K.clientHeight&&g!=="mouse"&&g!=="touch")){const ge=pe,He=K.clientHeight+K.scrollTop,_o=ge.offsetTop+ge.offsetHeight;_o>He?K.scrollTop=_o-K.clientHeight:ge.offsetTop-ge.offsetHeight*(A?1.3:0){if(!z)return;const pe=y((()=>{const ge=j.length-1;if(n==="reset")return _e;if(n==="start")return 0;if(n==="end")return ge;const He=te.current+n;return He<0?He===-1&&le?-1:M&&te.current!==-1||Math.abs(n)>1?0:ge:He>ge?He===ge+1&&le?-1:M||Math.abs(n)>1?ge:0:He})(),g);if(B({index:pe,reason:x,event:l}),r&&n!=="reset")if(pe===-1)Z.current.value=_;else{const ge=ee(j[pe]);Z.current.value=ge,ge.toLowerCase().indexOf(_.toLowerCase())===0&&_.length>0&&Z.current.setSelectionRange(_.length,ge.length)}}),ke=()=>{const l=(n,g)=>{const x=n?ee(n):"",K=g?ee(g):"";return x===K};if(te.current!==-1&&he.filteredOptions&&he.filteredOptions.length!==j.length&&he.inputValue===_&&(T?S.length===he.value.length&&he.value.every((n,g)=>ee(S[g])===ee(n)):l(he.value,S))){const n=he.filteredOptions[te.current];if(n&&j.some(x=>ee(x)===ee(n)))return!0}return!1},Ze=u.useCallback(()=>{if(!z||ke())return;const l=T?S[0]:S;if(j.length===0||l==null){X({diff:"reset"});return}if(be.current){if(l!=null){const n=j[te.current];if(T&&n&&Lo(S,x=>oe(n,x))!==-1)return;const g=Lo(j,x=>oe(x,l));g===-1?X({diff:"reset"}):B({index:g});return}if(te.current>=j.length-1){B({index:j.length-1});return}B({index:te.current})}},[j.length,T?!1:S,O,X,B,z,_,T]),Po=xo(l=>{Dt(be,l),l&&Ze()});u.useEffect(()=>{Ze()},[Ze]);const Ae=l=>{me||(Ne(!0),De(!0),re&&re(l))},Ge=(l,n)=>{me&&(Ne(!1),G&&G(l,n))},Ue=(l,n,g,x)=>{if(T){if(S.length===n.length&&S.every((K,pe)=>K===n[pe]))return}else if(S===n)return;J&&J(l,n,g,x),to(n)},no=u.useRef(!1),eo=(l,n,g="selectOption",x="options")=>{let K=g,pe=n;if(T){pe=Array.isArray(S)?S.slice():[];const ge=Lo(pe,He=>oe(n,He));ge===-1?pe.push(n):x!=="freeSolo"&&(pe.splice(ge,1),K="removeOption")}Te(l,pe),Ue(l,pe,K,{option:n}),!I&&(!l||!l.ctrlKey&&!l.metaKey)&&Ge(l,K),(d===!0||d==="touch"&&no.current||d==="mouse"&&!no.current)&&Z.current.blur()};function go(l,n){if(l===-1)return-1;let g=l;for(;;){if(n==="next"&&g===S.length||n==="previous"&&g===-1)return-1;const x=Me.querySelector(`[data-tag-index="${g}"]`);if(!x||!x.hasAttribute("tabindex")||x.disabled||x.getAttribute("aria-disabled")==="true")g+=n==="next"?1:-1;else return g}}const mo=(l,n)=>{if(!T)return;_===""&&Ge(l,"toggleInput");let g=H;H===-1?_===""&&n==="previous"&&(g=S.length-1):(g+=n==="next"?1:-1,g<0&&(g=0),g===S.length&&(g=-1)),g=go(g,n),ze(g),qe(g)},ho=l=>{fe.current=!0,xe(""),Q&&Q(l,"","clear"),Ue(l,T?[]:null,"clear")},ko=l=>n=>{if(l.onKeyDown&&l.onKeyDown(n),!n.defaultMuiPrevented&&(H!==-1&&["ArrowLeft","ArrowRight"].indexOf(n.key)===-1&&(ze(-1),qe(-1)),n.which!==229))switch(n.key){case"Home":z&&F&&(n.preventDefault(),X({diff:"start",direction:"next",reason:"keyboard",event:n}));break;case"End":z&&F&&(n.preventDefault(),X({diff:"end",direction:"previous",reason:"keyboard",event:n}));break;case"PageUp":n.preventDefault(),X({diff:-Xo,direction:"previous",reason:"keyboard",event:n}),Ae(n);break;case"PageDown":n.preventDefault(),X({diff:Xo,direction:"next",reason:"keyboard",event:n}),Ae(n);break;case"ArrowDown":n.preventDefault(),X({diff:1,direction:"next",reason:"keyboard",event:n}),Ae(n);break;case"ArrowUp":n.preventDefault(),X({diff:-1,direction:"previous",reason:"keyboard",event:n}),Ae(n);break;case"ArrowLeft":mo(n,"previous");break;case"ArrowRight":mo(n,"next");break;case"Enter":if(te.current!==-1&&z){const g=j[te.current],x=C?C(g):!1;if(n.preventDefault(),x)return;eo(n,g,"selectOption"),r&&Z.current.setSelectionRange(Z.current.value.length,Z.current.value.length)}else k&&_!==""&&Ee===!1&&(T&&n.preventDefault(),eo(n,_,"createOption","freeSolo"));break;case"Escape":z?(n.preventDefault(),n.stopPropagation(),Ge(n,"escape")):b&&(_!==""||T&&S.length>0)&&(n.preventDefault(),n.stopPropagation(),ho(n));break;case"Backspace":if(T&&!Se&&_===""&&S.length>0){const g=H===-1?S.length-1:H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break;case"Delete":if(T&&!Se&&_===""&&S.length>0&&H!==-1){const g=H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break}},jo=l=>{ce(!0),N&&!fe.current&&Ae(l)},ro=l=>{if(o(be)){Z.current.focus();return}ce(!1),We.current=!0,fe.current=!1,c&&te.current!==-1&&z?eo(l,j[te.current],"blur"):c&&k&&_!==""?eo(l,_,"blur","freeSolo"):i&&Te(l,S),Ge(l,"blur")},Ce=l=>{const n=l.target.value;_!==n&&(xe(n),De(!1),Q&&Q(l,n,"input")),n===""?!h&&!T&&Ue(l,null,"clear"):Ae(l)},ve=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));te.current!==n&&B({event:l,index:n,reason:"mouse"})},Be=l=>{B({event:l,index:Number(l.currentTarget.getAttribute("data-option-index")),reason:"touch"}),no.current=!0},Wo=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));eo(l,j[n],"selectOption"),no.current=!1},Ro=l=>n=>{const g=S.slice();g.splice(l,1),Ue(n,g,"removeOption",{option:S[l]})},Oo=l=>{me?Ge(l,"toggleInput"):Ae(l)},wo=l=>{l.currentTarget.contains(l.target)&&l.target.getAttribute("id")!==W&&l.preventDefault()},vo=l=>{l.currentTarget.contains(l.target)&&(Z.current.focus(),Le&&We.current&&Z.current.selectionEnd-Z.current.selectionStart===0&&Z.current.select(),We.current=!1)},co=l=>{!v&&(_===""||!me)&&Oo(l)};let oo=k&&_.length>0;oo=oo||(T?S.length>0:S!==null);let ao=j;return A&&(ao=j.reduce((l,n,g)=>{const x=A(n);return l.length>0&&l[l.length-1].group===x?l[l.length-1].options.push(n):l.push({key:g,index:g,group:x,options:[n]}),l},[])),v&&Fe&&ro(),{getRootProps:(l={})=>a({"aria-owns":Ke?`${W}-listbox`:null},l,{onKeyDown:ko(l),onMouseDown:wo,onClick:vo}),getInputLabelProps:()=>({id:`${W}-label`,htmlFor:W}),getInputProps:()=>({id:W,value:_,onBlur:ro,onFocus:jo,onChange:Ce,onMouseDown:co,"aria-activedescendant":z?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Ke?`${W}-listbox`:void 0,"aria-expanded":Ke,autoComplete:"off",ref:Z,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:v}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:ho}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Oo}),getTagProps:({index:l})=>a({key:l,"data-tag-index":l,tabIndex:-1},!Se&&{onDelete:Ro(l)}),getListboxProps:()=>({role:"listbox",id:`${W}-listbox`,"aria-labelledby":`${W}-label`,ref:Po,onMouseDown:l=>{l.preventDefault()}}),getOptionProps:({index:l,option:n})=>{var g;const x=(T?S:[S]).some(pe=>pe!=null&&oe(n,pe)),K=C?C(n):!1;return{key:(g=$==null?void 0:$(n))!=null?g:ee(n),tabIndex:-1,role:"option",id:`${W}-option-${l}`,onMouseMove:ve,onClick:Wo,onTouchStart:Be,"data-option-index":l,"aria-disabled":K,"aria-selected":x}},id:W,inputValue:_,value:S,dirty:oo,expanded:z&&Me,popupOpen:z,focused:Fe||H!==-1,anchorEl:Me,setAnchorEl:Y,focusedTag:H,groupedOptions:ao}}function nn(e){return ye("MuiListSubheader",e)}Ie("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const rn=["className","color","component","disableGutters","disableSticky","inset"],an=e=>{const{classes:o,color:t,disableGutters:r,inset:s,disableSticky:c}=e,d={root:["root",t!=="default"&&`color${w(t)}`,!r&&"gutters",s&&"inset",!c&&"sticky"]};return $e(d,nn,o)},ln=L("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.color!=="default"&&o[`color${w(t.color)}`],!t.disableGutters&&o.gutters,t.inset&&o.inset,!t.disableSticky&&o.sticky]}})(({theme:e,ownerState:o})=>a({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},o.color==="primary"&&{color:(e.vars||e).palette.primary.main},o.color==="inherit"&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),mt=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiListSubheader"}),{className:s,color:c="default",component:d="li",disableGutters:i=!1,disableSticky:b=!1,inset:p=!1}=r,m=ae(r,rn),h=a({},r,{color:c,component:d,disableGutters:i,disableSticky:b,inset:p}),I=an(h);return f.jsx(ln,a({as:d,className:ne(I.root,s),ref:t,ownerState:h},m))});mt.muiSkipListHighlight=!0;const sn=mt,cn=Ao(f.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function dn(e){return ye("MuiChip",e)}const un=Ie("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),V=un,pn=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],fn=e=>{const{classes:o,disabled:t,size:r,color:s,iconColor:c,onDelete:d,clickable:i,variant:b}=e,p={root:["root",b,t&&"disabled",`size${w(r)}`,`color${w(s)}`,i&&"clickable",i&&`clickableColor${w(s)}`,d&&"deletable",d&&`deletableColor${w(s)}`,`${b}${w(s)}`],label:["label",`label${w(r)}`],avatar:["avatar",`avatar${w(r)}`,`avatarColor${w(s)}`],icon:["icon",`icon${w(r)}`,`iconColor${w(c)}`],deleteIcon:["deleteIcon",`deleteIcon${w(r)}`,`deleteIconColor${w(s)}`,`deleteIcon${w(b)}Color${w(s)}`]};return $e(p,dn,o)},bn=L("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{color:r,iconColor:s,clickable:c,onDelete:d,size:i,variant:b}=t;return[{[`& .${V.avatar}`]:o.avatar},{[`& .${V.avatar}`]:o[`avatar${w(i)}`]},{[`& .${V.avatar}`]:o[`avatarColor${w(r)}`]},{[`& .${V.icon}`]:o.icon},{[`& .${V.icon}`]:o[`icon${w(i)}`]},{[`& .${V.icon}`]:o[`iconColor${w(s)}`]},{[`& .${V.deleteIcon}`]:o.deleteIcon},{[`& .${V.deleteIcon}`]:o[`deleteIcon${w(i)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIconColor${w(r)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIcon${w(b)}Color${w(r)}`]},o.root,o[`size${w(i)}`],o[`color${w(r)}`],c&&o.clickable,c&&r!=="default"&&o[`clickableColor${w(r)})`],d&&o.deletable,d&&r!=="default"&&o[`deletableColor${w(r)}`],o[b],o[`${b}${w(r)}`]]}})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return a({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${V.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${V.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${V.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${V.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${V.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${V.icon}`]:a({marginLeft:5,marginRight:-6},o.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},o.iconColor===o.color&&a({color:e.vars?e.vars.palette.Chip.defaultIconColor:t},o.color!=="default"&&{color:"inherit"})),[`& .${V.deleteIcon}`]:a({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Re(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Re(e.palette.text.primary,.4)}},o.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},o.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[o.color].contrastTextChannel} / 0.7)`:Re(e.palette[o.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].contrastText}})},o.size==="small"&&{height:24},o.color!=="default"&&{backgroundColor:(e.vars||e).palette[o.color].main,color:(e.vars||e).palette[o.color].contrastText},o.onDelete&&{[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},o.onDelete&&o.color!=="default"&&{[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}})},({theme:e,ownerState:o})=>a({},o.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},o.clickable&&o.color!=="default"&&{[`&:hover, &.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}}),({theme:e,ownerState:o})=>a({},o.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${V.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${V.avatar}`]:{marginLeft:4},[`& .${V.avatarSmall}`]:{marginLeft:2},[`& .${V.icon}`]:{marginLeft:4},[`& .${V.iconSmall}`]:{marginLeft:2},[`& .${V.deleteIcon}`]:{marginRight:5},[`& .${V.deleteIconSmall}`]:{marginRight:3}},o.variant==="outlined"&&o.color!=="default"&&{color:(e.vars||e).palette[o.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7)}`,[`&.${V.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette[o.color].main,e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Re(e.palette[o.color].main,e.palette.action.focusOpacity)},[`& .${V.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].main}}})),gn=L("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,o)=>{const{ownerState:t}=e,{size:r}=t;return[o.label,o[`label${w(r)}`]]}})(({ownerState:e})=>a({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function Yo(e){return e.key==="Backspace"||e.key==="Delete"}const mn=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiChip"}),{avatar:s,className:c,clickable:d,color:i="default",component:b,deleteIcon:p,disabled:m=!1,icon:h,label:I,onClick:v,onDelete:R,onKeyDown:M,onKeyUp:P,size:O="medium",variant:k="filled",tabIndex:C,skipFocusWhenDisabled:$=!1}=r,E=ae(r,pn),A=u.useRef(null),F=lo(A,t),q=N=>{N.stopPropagation(),R&&R(N)},le=N=>{N.currentTarget===N.target&&Yo(N)&&N.preventDefault(),M&&M(N)},de=N=>{N.currentTarget===N.target&&(R&&Yo(N)?R(N):N.key==="Escape"&&A.current&&A.current.blur()),P&&P(N)},oe=d!==!1&&v?!0:d,T=oe||R?Uo:b||"div",J=a({},r,{component:T,disabled:m,size:O,color:i,iconColor:u.isValidElement(h)&&h.props.color||i,onDelete:!!R,clickable:oe,variant:k}),G=fn(J),se=T===Uo?a({component:b||"div",focusVisibleClassName:G.focusVisible},R&&{disableRipple:!0}):{};let Q=null;R&&(Q=p&&u.isValidElement(p)?u.cloneElement(p,{className:ne(p.props.className,G.deleteIcon),onClick:q}):f.jsx(cn,{className:ne(G.deleteIcon),onClick:q}));let re=null;s&&u.isValidElement(s)&&(re=u.cloneElement(s,{className:ne(G.avatar,s.props.className)}));let U=null;return h&&u.isValidElement(h)&&(U=u.cloneElement(h,{className:ne(G.icon,h.props.className)})),f.jsxs(bn,a({as:T,className:ne(G.root,c),disabled:oe&&m?!0:void 0,onClick:v,onKeyDown:le,onKeyUp:de,ref:F,tabIndex:$&&m?-1:C,ownerState:J},se,E,{children:[re||U,f.jsx(gn,{className:ne(G.label),ownerState:J,children:I}),Q]}))}),hn=mn;function vn(e){return f.jsx(Zt,a({},e,{defaultTheme:Mt,themeId:Ft}))}function xn(e){return ye("MuiInputBase",e)}const Cn=Ie("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Oe=Cn,yn=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Co=(e,o)=>{const{ownerState:t}=e;return[o.root,t.formControl&&o.formControl,t.startAdornment&&o.adornedStart,t.endAdornment&&o.adornedEnd,t.error&&o.error,t.size==="small"&&o.sizeSmall,t.multiline&&o.multiline,t.color&&o[`color${w(t.color)}`],t.fullWidth&&o.fullWidth,t.hiddenLabel&&o.hiddenLabel]},yo=(e,o)=>{const{ownerState:t}=e;return[o.input,t.size==="small"&&o.inputSizeSmall,t.multiline&&o.inputMultiline,t.type==="search"&&o.inputTypeSearch,t.startAdornment&&o.inputAdornedStart,t.endAdornment&&o.inputAdornedEnd,t.hiddenLabel&&o.inputHiddenLabel]},In=e=>{const{classes:o,color:t,disabled:r,error:s,endAdornment:c,focused:d,formControl:i,fullWidth:b,hiddenLabel:p,multiline:m,readOnly:h,size:I,startAdornment:v,type:R}=e,M={root:["root",`color${w(t)}`,r&&"disabled",s&&"error",b&&"fullWidth",d&&"focused",i&&"formControl",I&&I!=="medium"&&`size${w(I)}`,m&&"multiline",v&&"adornedStart",c&&"adornedEnd",p&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",R==="search"&&"inputTypeSearch",m&&"inputMultiline",I==="small"&&"inputSizeSmall",p&&"inputHiddenLabel",v&&"inputAdornedStart",c&&"inputAdornedEnd",h&&"readOnly"]};return $e(M,xn,o)},Io=L("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Co})(({theme:e,ownerState:o})=>a({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Oe.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},o.multiline&&a({padding:"4px 0 5px"},o.size==="small"&&{paddingTop:1}),o.fullWidth&&{width:"100%"})),$o=L("input",{name:"MuiInputBase",slot:"Input",overridesResolver:yo})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light",r=a({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),s={opacity:"0 !important"},c=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return a({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Oe.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":c,"&:focus::-moz-placeholder":c,"&:focus:-ms-input-placeholder":c,"&:focus::-ms-input-placeholder":c},[`&.${Oe.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},o.size==="small"&&{paddingTop:1},o.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},o.type==="search"&&{MozAppearance:"textfield"})}),$n=f.jsx(vn,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Sn=u.forwardRef(function(o,t){var r;const s=Pe({props:o,name:"MuiInputBase"}),{"aria-describedby":c,autoComplete:d,autoFocus:i,className:b,components:p={},componentsProps:m={},defaultValue:h,disabled:I,disableInjectingGlobalStyles:v,endAdornment:R,fullWidth:M=!1,id:P,inputComponent:O="input",inputProps:k={},inputRef:C,maxRows:$,minRows:E,multiline:A=!1,name:F,onBlur:q,onChange:le,onClick:de,onFocus:oe,onKeyDown:T,onKeyUp:J,placeholder:G,readOnly:se,renderSuffix:Q,rows:re,slotProps:U={},slots:N={},startAdornment:ie,type:Se="text",value:Le}=s,ue=ae(s,yn),W=k.value!=null?k.value:Le,{current:ee}=u.useRef(W!=null),fe=u.useRef(),We=u.useCallback(z=>{},[]),Z=lo(fe,C,k.ref,We),[be,Me]=u.useState(!1),Y=so(),H=io({props:s,muiFormControl:Y,states:["color","disabled","error","hiddenLabel","size","required","filled"]});H.focused=Y?Y.focused:be,u.useEffect(()=>{!Y&&I&&be&&(Me(!1),q&&q())},[Y,I,be,q]);const ze=Y&&Y.onFilled,_e=Y&&Y.onEmpty,te=u.useCallback(z=>{bt(z)?ze&&ze():_e&&_e()},[ze,_e]);pt(()=>{ee&&te({value:W})},[W,te,ee]);const S=z=>{if(H.disabled){z.stopPropagation();return}oe&&oe(z),k.onFocus&&k.onFocus(z),Y&&Y.onFocus?Y.onFocus(z):Me(!0)},to=z=>{q&&q(z),k.onBlur&&k.onBlur(z),Y&&Y.onBlur?Y.onBlur(z):Me(!1)},_=(z,...j)=>{if(!ee){const he=z.target||fe.current;if(he==null)throw new Error(ct(1));te({value:he.value})}k.onChange&&k.onChange(z,...j),le&&le(z,...j)};u.useEffect(()=>{te(fe.current)},[]);const xe=z=>{fe.current&&z.currentTarget===z.target&&fe.current.focus(),de&&de(z)};let Fe=O,ce=k;A&&Fe==="input"&&(re?ce=a({type:void 0,minRows:re,maxRows:re},ce):ce=a({type:void 0,maxRows:$,minRows:E},ce),Fe=Vt);const Te=z=>{te(z.animationName==="mui-auto-fill-cancel"?fe.current:{value:"x"})};u.useEffect(()=>{Y&&Y.setAdornedStart(!!ie)},[Y,ie]);const me=a({},s,{color:H.color||"primary",disabled:H.disabled,endAdornment:R,error:H.error,focused:H.focused,formControl:Y,fullWidth:M,hiddenLabel:H.hiddenLabel,multiline:A,size:H.size,startAdornment:ie,type:Se}),Ne=In(me),Ye=N.root||p.Root||Io,De=U.root||m.root||{},Ee=N.input||p.Input||$o;return ce=a({},ce,(r=U.input)!=null?r:m.input),f.jsxs(u.Fragment,{children:[!v&&$n,f.jsxs(Ye,a({},De,!Ho(Ye)&&{ownerState:a({},me,De.ownerState)},{ref:t,onClick:xe},ue,{className:ne(Ne.root,De.className,b,se&&"MuiInputBase-readOnly"),children:[ie,f.jsx(Bt.Provider,{value:null,children:f.jsx(Ee,a({ownerState:me,"aria-invalid":H.error,"aria-describedby":c,autoComplete:d,autoFocus:i,defaultValue:h,disabled:H.disabled,id:P,onAnimationStart:Te,name:F,placeholder:G,readOnly:se,required:H.required,rows:re,value:W,onKeyDown:T,onKeyUp:J,type:Se},ce,!Ho(Ee)&&{as:Fe,ownerState:a({},me,ce.ownerState)},{ref:Z,className:ne(Ne.input,ce.className,se&&"MuiInputBase-readOnly"),onBlur:to,onChange:_,onFocus:S}))}),R,Q?Q(a({},H,{startAdornment:ie})):null]}))]})}),Do=Sn;function Pn(e){return ye("MuiInput",e)}const kn=a({},Oe,Ie("MuiInput",["root","underline","input"])),Qe=kn;function Rn(e){return ye("MuiOutlinedInput",e)}const On=a({},Oe,Ie("MuiOutlinedInput",["root","notchedOutline","input"])),Ve=On;function wn(e){return ye("MuiFilledInput",e)}const Ln=a({},Oe,Ie("MuiFilledInput",["root","underline","input"])),we=Ln,ht=Ao(f.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Mn(e){return ye("MuiAutocomplete",e)}const Fn=Ie("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]),D=Fn;var Zo,Jo;const Tn=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Nn=["ref"],An=["key"],zn=e=>{const{classes:o,disablePortal:t,expanded:r,focused:s,fullWidth:c,hasClearIcon:d,hasPopupIcon:i,inputFocused:b,popupOpen:p,size:m}=e,h={root:["root",r&&"expanded",s&&"focused",c&&"fullWidth",d&&"hasClearIcon",i&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",b&&"inputFocused"],tag:["tag",`tagSize${w(m)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",p&&"popupIndicatorOpen"],popper:["popper",t&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return $e(h,Mn,o)},Dn=L("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{fullWidth:r,hasClearIcon:s,hasPopupIcon:c,inputFocused:d,size:i}=t;return[{[`& .${D.tag}`]:o.tag},{[`& .${D.tag}`]:o[`tagSize${w(i)}`]},{[`& .${D.inputRoot}`]:o.inputRoot},{[`& .${D.input}`]:o.input},{[`& .${D.input}`]:d&&o.inputFocused},o.root,r&&o.fullWidth,c&&o.hasPopupIcon,s&&o.hasClearIcon]}})(({ownerState:e})=>a({[`&.${D.focused} .${D.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${D.clearIndicator}`]:{visibility:"visible"}}},e.fullWidth&&{width:"100%"},{[`& .${D.tag}`]:a({margin:3,maxWidth:"calc(100% - 6px)"},e.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${D.inputRoot}`]:{flexWrap:"wrap",[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4},[`& .${D.input}`]:{width:0,minWidth:30}},[`& .${Qe.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Qe.root}.${Oe.sizeSmall}`]:{[`& .${Qe.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Ve.root}`]:{padding:9,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${D.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${Ve.root}.${Oe.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${D.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${we.root}`]:{paddingTop:19,paddingLeft:8,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${we.input}`]:{padding:"7px 4px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${we.root}.${Oe.sizeSmall}`]:{paddingBottom:1,[`& .${we.input}`]:{padding:"2.5px 4px"}},[`& .${Oe.hiddenLabel}`]:{paddingTop:8},[`& .${we.root}.${Oe.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${D.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${we.root}.${Oe.hiddenLabel}.${Oe.sizeSmall}`]:{[`& .${D.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${D.input}`]:a({flexGrow:1,textOverflow:"ellipsis",opacity:0},e.inputFocused&&{opacity:1})})),En=L("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,o)=>o.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Bn=L(ft,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),jn=L(ft,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},o)=>a({},o.popupIndicator,e.popupOpen&&o.popupIndicatorOpen)})(({ownerState:e})=>a({padding:2,marginRight:-2},e.popupOpen&&{transform:"rotate(180deg)"})),Wn=L(No,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${D.option}`]:o.option},o.popper,t.disablePortal&&o.popperDisablePortal]}})(({theme:e,ownerState:o})=>a({zIndex:(e.vars||e).zIndex.modal},o.disablePortal&&{position:"absolute"})),_n=L(gt,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,o)=>o.paper})(({theme:e})=>a({},e.typography.body1,{overflow:"auto"})),Un=L("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,o)=>o.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Hn=L("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,o)=>o.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Vn=L("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,o)=>o.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${D.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${D.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${D.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Re(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${D.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${D.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),Kn=L(sn,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,o)=>o.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),qn=L("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,o)=>o.groupUl})({padding:0,[`& .${D.option}`]:{paddingLeft:24}}),Gn=u.forwardRef(function(o,t){var r,s,c,d;const i=Pe({props:o,name:"MuiAutocomplete"}),{autoComplete:b=!1,autoHighlight:p=!1,autoSelect:m=!1,blurOnSelect:h=!1,ChipProps:I,className:v,clearIcon:R=Zo||(Zo=f.jsx(Jt,{fontSize:"small"})),clearOnBlur:M=!i.freeSolo,clearOnEscape:P=!1,clearText:O="Clear",closeText:k="Close",componentsProps:C={},defaultValue:$=i.multiple?[]:null,disableClearable:E=!1,disableCloseOnSelect:A=!1,disabled:F=!1,disabledItemsFocusable:q=!1,disableListWrap:le=!1,disablePortal:de=!1,filterSelectedOptions:oe=!1,forcePopupIcon:T="auto",freeSolo:J=!1,fullWidth:G=!1,getLimitTagsText:se=n=>`+${n}`,getOptionLabel:Q,groupBy:re,handleHomeEndKeys:U=!i.freeSolo,includeInputInList:N=!1,limitTags:ie=-1,ListboxComponent:Se="ul",ListboxProps:Le,loading:ue=!1,loadingText:W="Loading…",multiple:ee=!1,noOptionsText:fe="No options",openOnFocus:We=!1,openText:Z="Open",PaperComponent:be=gt,PopperComponent:Me=No,popupIcon:Y=Jo||(Jo=f.jsx(ht,{})),readOnly:H=!1,renderGroup:ze,renderInput:_e,renderOption:te,renderTags:S,selectOnFocus:to=!i.freeSolo,size:_="medium",slotProps:xe={}}=i,Fe=ae(i,Tn),{getRootProps:ce,getInputProps:Te,getInputLabelProps:me,getPopupIndicatorProps:Ne,getClearProps:Ye,getTagProps:De,getListboxProps:Ee,getOptionProps:z,value:j,dirty:he,expanded:Ke,id:qe,popupOpen:y,focused:B,focusedTag:X,anchorEl:ke,setAnchorEl:Ze,inputValue:Po,groupedOptions:Ae}=tn(a({},i,{componentName:"Autocomplete"})),Ge=!E&&!F&&he&&!H,Ue=(!J||T===!0)&&T!==!1,{onMouseDown:no}=Te(),{ref:eo}=Le??{},go=Ee(),{ref:mo}=go,ho=ae(go,Nn),ko=lo(mo,eo),ro=Q||(n=>{var g;return(g=n.label)!=null?g:n}),Ce=a({},i,{disablePortal:de,expanded:Ke,focused:B,fullWidth:G,getOptionLabel:ro,hasClearIcon:Ge,hasPopupIcon:Ue,inputFocused:X===-1,popupOpen:y,size:_}),ve=zn(Ce);let Be;if(ee&&j.length>0){const n=g=>a({className:ve.tag,disabled:F},De(g));S?Be=S(j,n,Ce):Be=j.map((g,x)=>f.jsx(hn,a({label:ro(g),size:_},n({index:x}),I)))}if(ie>-1&&Array.isArray(Be)){const n=Be.length-ie;!B&&n>0&&(Be=Be.splice(0,ie),Be.push(f.jsx("span",{className:ve.tag,children:se(n)},Be.length)))}const Ro=ze||(n=>f.jsxs("li",{children:[f.jsx(Kn,{className:ve.groupLabel,ownerState:Ce,component:"div",children:n.group}),f.jsx(qn,{className:ve.groupUl,ownerState:Ce,children:n.children})]},n.key)),wo=te||((n,g)=>{const{key:x}=n,K=ae(n,An);return f.jsx("li",a({},K,{children:ro(g)}),x)}),vo=(n,g)=>{const x=z({option:n,index:g});return wo(a({},x,{className:ve.option}),n,{selected:x["aria-selected"],index:g,inputValue:Po},Ce)},co=(r=xe.clearIndicator)!=null?r:C.clearIndicator,oo=(s=xe.paper)!=null?s:C.paper,ao=(c=xe.popper)!=null?c:C.popper,l=(d=xe.popupIndicator)!=null?d:C.popupIndicator;return f.jsxs(u.Fragment,{children:[f.jsx(Dn,a({ref:t,className:ne(ve.root,v),ownerState:Ce},ce(Fe),{children:_e({id:qe,disabled:F,fullWidth:!0,size:_==="small"?"small":void 0,InputLabelProps:me(),InputProps:a({ref:Ze,className:ve.inputRoot,startAdornment:Be,onClick:n=>{n.target===n.currentTarget&&no(n)}},(Ge||Ue)&&{endAdornment:f.jsxs(En,{className:ve.endAdornment,ownerState:Ce,children:[Ge?f.jsx(Bn,a({},Ye(),{"aria-label":O,title:O,ownerState:Ce},co,{className:ne(ve.clearIndicator,co==null?void 0:co.className),children:R})):null,Ue?f.jsx(jn,a({},Ne(),{disabled:F,"aria-label":y?k:Z,title:y?k:Z,ownerState:Ce},l,{className:ne(ve.popupIndicator,l==null?void 0:l.className),children:Y})):null]})}),inputProps:a({className:ve.input,disabled:F,readOnly:H},Te())})})),ke?f.jsx(Wn,a({as:Me,disablePortal:de,style:{width:ke?ke.clientWidth:null},ownerState:Ce,role:"presentation",anchorEl:ke,open:y},ao,{className:ne(ve.popper,ao==null?void 0:ao.className),children:f.jsxs(_n,a({ownerState:Ce,as:be},oo,{className:ne(ve.paper,oo==null?void 0:oo.className),children:[ue&&Ae.length===0?f.jsx(Un,{className:ve.loading,ownerState:Ce,children:W}):null,Ae.length===0&&!J&&!ue?f.jsx(Hn,{className:ve.noOptions,ownerState:Ce,role:"presentation",onMouseDown:n=>{n.preventDefault()},children:fe}):null,Ae.length>0?f.jsx(Vn,a({as:Se,className:ve.listbox,ownerState:Ce},ho,Le,{ref:ko,children:Ae.map((n,g)=>re?Ro({key:n.key,group:n.group,children:n.options.map((x,K)=>vo(x,n.index+K))}):vo(n,g))})):null]}))})):null]})}),Xn=Gn;function Yn(e){return ye("MuiCircularProgress",e)}Ie("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Zn=["className","color","disableShrink","size","style","thickness","value","variant"];let So=e=>e,Qo,et,ot,tt;const Je=44,Jn=dt(Qo||(Qo=So` 0% { transform: rotate(0deg); } diff --git a/build/assets/index-58d3954b.js b/build/assets/index-3beb67ad.js similarity index 64% rename from build/assets/index-58d3954b.js rename to build/assets/index-3beb67ad.js index 49520f25d..7ccf4de5a 100644 --- a/build/assets/index-58d3954b.js +++ b/build/assets/index-3beb67ad.js @@ -1,4 +1,4 @@ -import{o as i,j as t,q as a}from"./index-a0989d63.js";import{f as n}from"./index.esm-d308c31f.js";import{y as e}from"./index-775b6bc6.js";const r=i.div` +import{o as i,j as t,q as a}from"./index-022521cf.js";import{f as n}from"./index.esm-38ac4e4f.js";import{y as e}from"./index-586dfb7f.js";const r=i.div` display: Flex; justify-content: center; align-items: center; diff --git a/build/assets/index-159c08bd.js b/build/assets/index-4378ec35.js similarity index 99% rename from build/assets/index-159c08bd.js rename to build/assets/index-4378ec35.js index af5229790..57481680d 100644 --- a/build/assets/index-159c08bd.js +++ b/build/assets/index-4378ec35.js @@ -1,4 +1,4 @@ -import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug,s as Tr,i as s4,e as vn,f as sf,u as Wg,a as Id,c as Xr,d as Yg,ac as Dd,ad as l4,ae as u4,af as Vg,o as H,q as L,ag as Gg,G as Ul,F,B as Sn,J as Qi,ah as qg,T as ht,ai as c4,aj as f4,v as Fn,A as At,ak as No,al as Bt,am as d4,n as st,z as Ro,E as Kg,an as Xg,O as lf,K as h4,ao as p4,ap as Bo,aq as ea,ar as _n,as as Zg,at as Ld,au as ta,av as Te,R as U,aw as m4,ax as Jg,ay as y4,az as Qg,aA as g4,aB as v4,aC as x4,aD as zo,aE as Nd,aF as ev,aG as tv,aH as b4,aI as w4,aJ as S4,aK as Wl,aL as _4,aM as O4,P as Oe,aN as k4,aO as C4,aP as P4,y as qt,aQ as Zp,a4 as A4,C as rn,aR as j4,aS as T4,p as E4,aT as M4}from"./index-a0989d63.js";import{v as ei,d as $4,e as uf,f as I4,g as cc,h as Rd,i as D4,F as L4,b as nv,A as In,T as na,j as Ti,B as Dt,k as rv,P as Yl,l as N4,m as Bd,I as iv,n as Vl}from"./index-775b6bc6.js";import{S as av}from"./SearchIcon-119ae41f.js";import{c as R4,a as fc,C as Gl}from"./ClipLoader-f345d5d1.js";import{S as ov}from"./Skeleton-091f3105.js";import{P as zd}from"./PlusIcon-1147d96e.js";import{T as B4,r as z4,g as Jp,P as F4}from"./Popover-6e322384.js";import{o as Rs,e as dc,a as sv,d as H4,i as Bs,u as xr}from"./useSlotProps-374609c4.js";import{C as lv}from"./CheckIcon-c0260530.js";import{u as U4,F as W4,P as Y4}from"./Stack-98b5acbc.js";import{S as V4,F as Qp}from"./FormControlLabel-770e209b.js";import{c as Fd}from"./createSvgIcon-ebe0e3e6.js";import{B as G4}from"./index-f06622e3.js";import{u as uv}from"./index-7ac66030.js";import{b as q4,a as K4,c as X4,d as Z4}from"./index.esm-d308c31f.js";import{I as J4}from"./InfoIcon-4aad7e99.js";const e1="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",Q4=async e=>{let t=await bi.enable(!0);if(t||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),t=await bi.keysend(e1,e),!(t!=null&&t.success)){if(t=await bi.topup(),t||(t=await bi.authorize()),!(t!=null&&t.budget)||(t==null?void 0:t.budget){const n=await Q4(t),r={amount:t,refid:e};return await Fg.post("/boost",JSON.stringify(r)),n},t8=e=>{const[t,n]=e.split("-")||["",""];return parseInt(n,10)!==0?`${t} - ${n}`:t},cv=(e,t)=>{if(!t)return null;const n=e.filter(a=>a.show_title&&a.link&&a.show_title===t.show_title&&a.episode_title===t.episode_title),r=Xp.groupBy(n,a=>a.timestamp),i=Xp.values(r).reduce((a,o)=>(o[0]&&a.push(o[0]),a),[]);return i.sort((a,o)=>{var d,h;const[s]=((d=a.timestamp)==null?void 0:d.split("-"))||[""],[l]=((h=o.timestamp)==null?void 0:h.split("-"))||[""],u=ei(s),f=ei(l);return u-f}),i},n8=async e=>{await o4(async()=>{try{await bi.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...e},type:"second_brain_consumed_content"})}catch(t){console.warn(t)}})},r8=e=>{const t=/((http|https):\/\/[^\s]+)/g,n=/@(\w+)/g;let r=e.replace(/\\/g,"");return r=r.replace(/'/g,"’"),r=r.replace(/\n/g,"
"),r=r.replace(t,'$1'),r=r.replace(n,'@$1'),r},i8={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},a8=i8;function o8(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const s8=2;function fv(e,t){return e-t}function ba(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function t1(e,t){var n;const{index:r}=(n=e.reduce((i,a,o)=>{const s=Math.abs(t-a);return i===null||s({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},d8=e=>e;let vs;function hc(){return vs===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?vs=CSS.supports("touch-action","none"):vs=!0),vs}function h8(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:a=!1,marks:o=!1,max:s=100,min:l=0,name:u,onChange:f,onChangeCommitted:d,orientation:h="horizontal",rootRef:m,scale:g=d8,step:v=1,tabIndex:b,value:O}=e,C=B.useRef(),[k,P]=B.useState(-1),[_,w]=B.useState(-1),[j,E]=B.useState(!1),I=B.useRef(0),[z,M]=U4({controlled:O,default:n??l,name:"Slider"}),D=f&&((R,q,ne)=>{const se=R.nativeEvent||R,oe=new se.constructor(se.type,se);Object.defineProperty(oe,"target",{writable:!0,value:{value:q,name:u}}),f(oe,q,ne)}),W=Array.isArray(z);let Y=W?z.slice().sort(fv):[z];Y=Y.map(R=>ba(R,l,s));const V=o===!0&&v!==null?[...Array(Math.floor((s-l)/v)+1)].map((R,q)=>({value:l+v*q})):o||[],X=V.map(R=>R.value),{isFocusVisibleRef:Z,onBlur:G,onFocus:Q,ref:T}=$4(),[pe,ue]=B.useState(-1),$=B.useRef(),_e=uf(T,$),te=uf(m,_e),ge=R=>q=>{var ne;const se=Number(q.currentTarget.getAttribute("data-index"));Q(q),Z.current===!0&&ue(se),w(se),R==null||(ne=R.onFocus)==null||ne.call(R,q)},Ye=R=>q=>{var ne;G(q),Z.current===!1&&ue(-1),w(-1),R==null||(ne=R.onBlur)==null||ne.call(R,q)};I4(()=>{if(r&&$.current.contains(document.activeElement)){var R;(R=document.activeElement)==null||R.blur()}},[r]),r&&k!==-1&&P(-1),r&&pe!==-1&&ue(-1);const Me=R=>q=>{var ne;(ne=R.onChange)==null||ne.call(R,q);const se=Number(q.currentTarget.getAttribute("data-index")),oe=Y[se],Re=X.indexOf(oe);let ke=q.target.valueAsNumber;if(V&&v==null){const $e=X[X.length-1];ke>$e?ke=$e:ke{const{current:ne}=$,{width:se,height:oe,bottom:Re,left:ke}=ne.getBoundingClientRect();let $e;de.indexOf("vertical")===0?$e=(Re-R.y)/oe:$e=(R.x-ke)/se,de.indexOf("-reverse")!==-1&&($e=1-$e);let Ge;if(Ge=l8($e,l,s),v)Ge=c8(Ge,v,l);else{const pt=t1(X,Ge);Ge=X[pt]}Ge=ba(Ge,l,s);let kt=0;if(W){q?kt=ae.current:kt=t1(Y,Ge),i&&(Ge=ba(Ge,Y[kt-1]||-1/0,Y[kt+1]||1/0));const pt=Ge;Ge=n1({values:Y,newValue:Ge,index:kt}),i&&q||(kt=Ge.indexOf(pt),ae.current=kt)}return{newValue:Ge,activeIndex:kt}},ee=cc(R=>{const q=ms(R,C);if(!q)return;if(I.current+=1,R.type==="mousemove"&&R.buttons===0){Ae(R);return}const{newValue:ne,activeIndex:se}=ve({finger:q,move:!0});ys({sliderRef:$,activeIndex:se,setActive:P}),M(ne),!j&&I.current>s8&&E(!0),D&&!gs(ne,z)&&D(R,ne,se)}),Ae=cc(R=>{const q=ms(R,C);if(E(!1),!q)return;const{newValue:ne}=ve({finger:q,move:!0});P(-1),R.type==="touchend"&&w(-1),d&&d(R,ne),C.current=void 0,xe()}),he=cc(R=>{if(r)return;hc()||R.preventDefault();const q=R.changedTouches[0];q!=null&&(C.current=q.identifier);const ne=ms(R,C);if(ne!==!1){const{newValue:oe,activeIndex:Re}=ve({finger:ne});ys({sliderRef:$,activeIndex:Re,setActive:P}),M(oe),D&&!gs(oe,z)&&D(R,oe,Re)}I.current=0;const se=Rs($.current);se.addEventListener("touchmove",ee),se.addEventListener("touchend",Ae)}),xe=B.useCallback(()=>{const R=Rs($.current);R.removeEventListener("mousemove",ee),R.removeEventListener("mouseup",Ae),R.removeEventListener("touchmove",ee),R.removeEventListener("touchend",Ae)},[Ae,ee]);B.useEffect(()=>{const{current:R}=$;return R.addEventListener("touchstart",he,{passive:hc()}),()=>{R.removeEventListener("touchstart",he,{passive:hc()}),xe()}},[xe,he]),B.useEffect(()=>{r&&xe()},[r,xe]);const He=R=>q=>{var ne;if((ne=R.onMouseDown)==null||ne.call(R,q),r||q.defaultPrevented||q.button!==0)return;q.preventDefault();const se=ms(q,C);if(se!==!1){const{newValue:Re,activeIndex:ke}=ve({finger:se});ys({sliderRef:$,activeIndex:ke,setActive:P}),M(Re),D&&!gs(Re,z)&&D(q,Re,ke)}I.current=0;const oe=Rs($.current);oe.addEventListener("mousemove",ee),oe.addEventListener("mouseup",Ae)},rt=Ys(W?Y[0]:l,l,s),ft=Ys(Y[Y.length-1],l,s)-rt,en=(R={})=>{const q=dc(R),ne={onMouseDown:He(q||{})},se=we({},q,ne);return we({},R,{ref:te},se)},Ue=R=>q=>{var ne;(ne=R.onMouseOver)==null||ne.call(R,q);const se=Number(q.currentTarget.getAttribute("data-index"));w(se)},Ne=R=>q=>{var ne;(ne=R.onMouseLeave)==null||ne.call(R,q),w(-1)};return{active:k,axis:de,axisProps:f8,dragging:j,focusedThumbIndex:pe,getHiddenInputProps:(R={})=>{var q;const ne=dc(R),se={onChange:Me(ne||{}),onFocus:ge(ne||{}),onBlur:Ye(ne||{})},oe=we({},ne,se);return we({tabIndex:b,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":g(s),"aria-valuemin":g(l),name:u,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(q=e.step)!=null?q:void 0,disabled:r},R,oe,{style:we({},a8,{direction:a?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:en,getThumbProps:(R={})=>{const q=dc(R),ne={onMouseOver:Ue(q||{}),onMouseLeave:Ne(q||{})};return we({},R,q,ne)},marks:V,open:_,range:W,rootRef:te,trackLeap:ft,trackOffset:rt,values:Y,getThumbStyle:R=>({pointerEvents:k!==-1&&k!==R?"none":void 0})}}const p8=Fd(y.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),m8=Fd(y.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),y8=Fd(y.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function g8(e){return Ug("MuiCheckbox",e)}const v8=Hg("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),pc=v8,x8=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],b8=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,a={root:["root",n&&"indeterminate",`color${vn(r)}`,`size${vn(i)}`]},o=Yg(a,g8,t);return we({},t,o)},w8=Tr(V4,{shouldForwardProp:e=>s4(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${vn(n.size)}`],n.color!=="default"&&t[`color${vn(n.color)}`]]}})(({theme:e,ownerState:t})=>we({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:sf(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${pc.checked}, &.${pc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${pc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),S8=y.jsx(m8,{}),_8=y.jsx(p8,{}),O8=y.jsx(y8,{}),k8=B.forwardRef(function(t,n){var r,i;const a=Wg({props:t,name:"MuiCheckbox"}),{checkedIcon:o=S8,color:s="primary",icon:l=_8,indeterminate:u=!1,indeterminateIcon:f=O8,inputProps:d,size:h="medium",className:m}=a,g=Id(a,x8),v=u?f:l,b=u?f:o,O=we({},a,{color:s,indeterminate:u,size:h}),C=b8(O);return y.jsx(w8,we({type:"checkbox",inputProps:we({"data-indeterminate":u},d),icon:B.cloneElement(v,{fontSize:(r=v.props.fontSize)!=null?r:h}),checkedIcon:B.cloneElement(b,{fontSize:(i=b.props.fontSize)!=null?i:h}),ownerState:O,ref:n,className:Xr(C.root,m)},g,{classes:C}))}),C8=k8,P8=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function A8(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),a=sv(t);let o;if(t.fakeTransform)o=t.fakeTransform;else{const u=a.getComputedStyle(t);o=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let s=0,l=0;if(o&&o!=="none"&&typeof o=="string"){const u=o.split("(")[1].split(")")[0].split(",");s=parseInt(u[4],10),l=parseInt(u[5],10)}return e==="left"?i?`translateX(${i.right+s-r.left}px)`:`translateX(${a.innerWidth+s-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${a.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function j8(e){return typeof e=="function"?e():e}function xs(e,t,n){const r=j8(n),i=A8(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const T8=B.forwardRef(function(t,n){const r=Dd(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,container:u,direction:f="down",easing:d=i,in:h,onEnter:m,onEntered:g,onEntering:v,onExit:b,onExited:O,onExiting:C,style:k,timeout:P=a,TransitionComponent:_=B4}=t,w=Id(t,P8),j=B.useRef(null),E=uf(l.ref,j,n),I=G=>Q=>{G&&(Q===void 0?G(j.current):G(j.current,Q))},z=I((G,Q)=>{xs(f,G,u),z4(G),m&&m(G,Q)}),M=I((G,Q)=>{const T=Jp({timeout:P,style:k,easing:d},{mode:"enter"});G.style.webkitTransition=r.transitions.create("-webkit-transform",we({},T)),G.style.transition=r.transitions.create("transform",we({},T)),G.style.webkitTransform="none",G.style.transform="none",v&&v(G,Q)}),D=I(g),W=I(C),Y=I(G=>{const Q=Jp({timeout:P,style:k,easing:d},{mode:"exit"});G.style.webkitTransition=r.transitions.create("-webkit-transform",Q),G.style.transition=r.transitions.create("transform",Q),xs(f,G,u),b&&b(G)}),V=I(G=>{G.style.webkitTransition="",G.style.transition="",O&&O(G)}),X=G=>{o&&o(j.current,G)},Z=B.useCallback(()=>{j.current&&xs(f,j.current,u)},[f,u]);return B.useEffect(()=>{if(h||f==="down"||f==="right")return;const G=H4(()=>{j.current&&xs(f,j.current,u)}),Q=sv(j.current);return Q.addEventListener("resize",G),()=>{G.clear(),Q.removeEventListener("resize",G)}},[f,h,u]),B.useEffect(()=>{h||Z()},[h,Z]),y.jsx(_,we({nodeRef:j,onEnter:z,onEntered:D,onEntering:M,onExit:Y,onExited:V,onExiting:W,addEndListener:X,appear:s,in:h,timeout:P},w,{children:(G,Q)=>B.cloneElement(l,we({ref:E,style:we({visibility:G==="exited"&&!h?"hidden":void 0},k,l.props.style)},Q))}))}),Ei=T8,E8=e=>!e||!Bs(e),M8=E8;function $8(e){return Ug("MuiSlider",e)}const I8=Hg("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),En=I8,D8=e=>{const{open:t}=e;return{offset:Xr(t&&En.valueLabelOpen),circle:En.valueLabelCircle,label:En.valueLabelLabel}};function L8(e){const{children:t,className:n,value:r}=e,i=D8(e);return t?B.cloneElement(t,{className:Xr(t.props.className)},y.jsxs(B.Fragment,{children:[t.props.children,y.jsx("span",{className:Xr(i.offset,n),"aria-hidden":!0,children:y.jsx("span",{className:i.circle,children:y.jsx("span",{className:i.label,children:r})})})]})):null}const N8=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function r1(e){return e}const R8=Tr("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${vn(n.color)}`],n.size!=="medium"&&t[`size${vn(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>we({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&we({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&we({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${En.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${En.dragging}`]:{[`& .${En.thumb}, & .${En.track}`]:{transition:"none"}}})),B8=Tr("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>we({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),z8=Tr("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?l4(e.palette[t.color].main,.62):u4(e.palette[t.color].main,.5);return we({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n})}),F8=Tr("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${vn(n.color)}`],n.size!=="medium"&&t[`thumbSize${vn(n.size)}`]]}})(({theme:e,ownerState:t})=>we({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":we({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${En.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:sf(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${En.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:sf(e.palette[t.color].main,.16)}`},[`&.${En.disabled}`]:{"&:hover":{boxShadow:"none"}}})),H8=Tr(L8,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>we({[`&.${En.valueLabelOpen}`]:{transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:t.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),U8=Tr("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Vg(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e,ownerState:t,markActive:n})=>we({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},n&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),W8=Tr("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Vg(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>we({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},n&&{color:(e.vars||e).palette.text.primary})),Y8=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:l}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",a==="inverted"&&"trackInverted",a===!1&&"trackFalse",s&&`color${vn(s)}`,l&&`size${vn(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${vn(l)}`,s&&`thumbColor${vn(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Yg(u,$8,o)},V8=({children:e})=>e,G8=B.forwardRef(function(t,n){var r,i,a,o,s,l,u,f,d,h,m,g,v,b,O,C,k,P,_,w,j,E,I,z;const M=Wg({props:t,name:"MuiSlider"}),W=Dd().direction==="rtl",{"aria-label":Y,"aria-valuetext":V,"aria-labelledby":X,component:Z="span",components:G={},componentsProps:Q={},color:T="primary",classes:pe,className:ue,disableSwap:$=!1,disabled:_e=!1,getAriaLabel:te,getAriaValueText:ge,marks:Ye=!1,max:Me=100,min:ae=0,orientation:de="horizontal",size:ve="medium",step:ee=1,scale:Ae=r1,slotProps:he,slots:xe,track:He="normal",valueLabelDisplay:rt="off",valueLabelFormat:ft=r1}=M,en=Id(M,N8),Ue=we({},M,{isRtl:W,max:Me,min:ae,classes:pe,disabled:_e,disableSwap:$,orientation:de,marks:Ye,color:T,size:ve,step:ee,scale:Ae,track:He,valueLabelDisplay:rt,valueLabelFormat:ft}),{axisProps:Ne,getRootProps:it,getHiddenInputProps:tn,getThumbProps:Cn,open:R,active:q,axis:ne,focusedThumbIndex:se,range:oe,dragging:Re,marks:ke,values:$e,trackOffset:Ge,trackLeap:kt,getThumbStyle:pt}=h8(we({},Ue,{rootRef:n}));Ue.marked=ke.length>0&&ke.some(je=>je.label),Ue.dragging=Re,Ue.focusedThumbIndex=se;const Ie=Y8(Ue),Lt=(r=(i=xe==null?void 0:xe.root)!=null?i:G.Root)!=null?r:R8,oi=(a=(o=xe==null?void 0:xe.rail)!=null?o:G.Rail)!=null?a:B8,Nr=(s=(l=xe==null?void 0:xe.track)!=null?l:G.Track)!=null?s:z8,qe=(u=(f=xe==null?void 0:xe.thumb)!=null?f:G.Thumb)!=null?u:F8,fa=(d=(h=xe==null?void 0:xe.valueLabel)!=null?h:G.ValueLabel)!=null?d:H8,si=(m=(g=xe==null?void 0:xe.mark)!=null?g:G.Mark)!=null?m:U8,fr=(v=(b=xe==null?void 0:xe.markLabel)!=null?b:G.MarkLabel)!=null?v:W8,li=(O=(C=xe==null?void 0:xe.input)!=null?C:G.Input)!=null?O:"input",dr=(k=he==null?void 0:he.root)!=null?k:Q.root,hr=(P=he==null?void 0:he.rail)!=null?P:Q.rail,pr=(_=he==null?void 0:he.track)!=null?_:Q.track,da=(w=he==null?void 0:he.thumb)!=null?w:Q.thumb,mr=(j=he==null?void 0:he.valueLabel)!=null?j:Q.valueLabel,Uu=(E=he==null?void 0:he.mark)!=null?E:Q.mark,Rr=(I=he==null?void 0:he.markLabel)!=null?I:Q.markLabel,ui=(z=he==null?void 0:he.input)!=null?z:Q.input,ce=xr({elementType:Lt,getSlotProps:it,externalSlotProps:dr,externalForwardedProps:en,additionalProps:we({},M8(Lt)&&{as:Z}),ownerState:we({},Ue,dr==null?void 0:dr.ownerState),className:[Ie.root,ue]}),Wu=xr({elementType:oi,externalSlotProps:hr,ownerState:Ue,className:Ie.rail}),Yu=xr({elementType:Nr,externalSlotProps:pr,additionalProps:{style:we({},Ne[ne].offset(Ge),Ne[ne].leap(kt))},ownerState:we({},Ue,pr==null?void 0:pr.ownerState),className:Ie.track}),Et=xr({elementType:qe,getSlotProps:Cn,externalSlotProps:da,ownerState:we({},Ue,da==null?void 0:da.ownerState),className:Ie.thumb}),ha=xr({elementType:fa,externalSlotProps:mr,ownerState:we({},Ue,mr==null?void 0:mr.ownerState),className:Ie.valueLabel}),Be=xr({elementType:si,externalSlotProps:Uu,ownerState:Ue,className:Ie.mark}),Vn=xr({elementType:fr,externalSlotProps:Rr,ownerState:Ue,className:Ie.markLabel}),Vu=xr({elementType:li,getSlotProps:tn,externalSlotProps:ui,ownerState:Ue});return y.jsxs(Lt,we({},ce,{children:[y.jsx(oi,we({},Wu)),y.jsx(Nr,we({},Yu)),ke.filter(je=>je.value>=ae&&je.value<=Me).map((je,Je)=>{const Kt=Ys(je.value,ae,Me),lt=Ne[ne].offset(Kt);let mt;return He===!1?mt=$e.indexOf(je.value)!==-1:mt=He==="normal"&&(oe?je.value>=$e[0]&&je.value<=$e[$e.length-1]:je.value<=$e[0])||He==="inverted"&&(oe?je.value<=$e[0]||je.value>=$e[$e.length-1]:je.value>=$e[0]),y.jsxs(B.Fragment,{children:[y.jsx(si,we({"data-index":Je},Be,!Bs(si)&&{markActive:mt},{style:we({},lt,Be.style),className:Xr(Be.className,mt&&Ie.markActive)})),je.label!=null?y.jsx(fr,we({"aria-hidden":!0,"data-index":Je},Vn,!Bs(fr)&&{markLabelActive:mt},{style:we({},lt,Vn.style),className:Xr(Ie.markLabel,Vn.className,mt&&Ie.markLabelActive),children:je.label})):null]},Je)}),$e.map((je,Je)=>{const Kt=Ys(je,ae,Me),lt=Ne[ne].offset(Kt),mt=rt==="off"?V8:fa;return y.jsx(mt,we({},!Bs(mt)&&{valueLabelFormat:ft,valueLabelDisplay:rt,value:typeof ft=="function"?ft(Ae(je),Je):ft,index:Je,open:R===Je||q===Je||rt==="on",disabled:_e},ha,{children:y.jsx(qe,we({"data-index":Je},Et,{className:Xr(Ie.thumb,Et.className,q===Je&&Ie.active,se===Je&&Ie.focusVisible),style:we({},lt,pt(Je),Et.style),children:y.jsx(li,we({"data-index":Je,"aria-label":te?te(Je):Y,"aria-valuenow":Ae(je),"aria-labelledby":X,"aria-valuetext":ge?ge(Ae(je),Je):V,value:$e[Je]},Vu))}))}),Je)})]}))}),ql=G8,q8=(e,t="down")=>{const n=Dd(),[r,i]=B.useState(!1),a=n.breakpoints[t](e).split("@media")[1].trim();return B.useEffect(()=>{const o=()=>{const{matches:s}=window.matchMedia(a);i(s)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[a]),r},K8=e=>e.filter(t=>t.tldr).length>=2&&e.some(t=>t.audio_EN);function X8(e){return e.tldr_topic??e.name}var Vs=globalThis&&globalThis.__assign||function(){return Vs=Object.assign||function(e){for(var t,n=1,r=arguments.length;ny.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"keyboard_arrow_left",children:[y.jsx("mask",{id:"mask0_1428_267",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"18",height:"18",children:y.jsx("path",{id:"Bounding box",d:"M0 0H18V18H0V0Z",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1428_267)",children:y.jsx("path",{id:"keyboard_arrow_left_2",d:"M8.10001 8.99998L11.025 11.925C11.1625 12.0625 11.2313 12.2375 11.2313 12.45C11.2313 12.6625 11.1625 12.8375 11.025 12.975C10.8875 13.1125 10.7125 13.1812 10.5 13.1812C10.2875 13.1812 10.1125 13.1125 9.97501 12.975L6.52501 9.52498C6.45001 9.44998 6.39688 9.36873 6.36563 9.28123C6.33438 9.19373 6.31876 9.09998 6.31876 8.99998C6.31876 8.89998 6.33438 8.80623 6.36563 8.71873C6.39688 8.63123 6.45001 8.54998 6.52501 8.47498L9.97501 5.02498C10.1125 4.88748 10.2875 4.81873 10.5 4.81873C10.7125 4.81873 10.8875 4.88748 11.025 5.02498C11.1625 5.16248 11.2313 5.33748 11.2313 5.54998C11.2313 5.76248 11.1625 5.93748 11.025 6.07498L8.10001 8.99998Z",fill:"currentColor"})})]})}),e9=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"arrow_forward",children:[y.jsx("mask",{id:"mask0_8980_24763",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:y.jsx("rect",{id:"Bounding box",x:"20",y:"20",width:"1em",height:"1em",transform:"rotate(-180 20 20)",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_8980_24763)",children:y.jsx("path",{id:"arrow_forward_2",d:"M7.52981 10.4372L16.0625 10.4372C16.2221 10.4372 16.3558 10.4911 16.4635 10.5988C16.5712 10.7065 16.625 10.8401 16.625 10.9997C16.625 11.1593 16.5712 11.293 16.4635 11.4007C16.3558 11.5084 16.2221 11.5622 16.0625 11.5622L7.52981 11.5622L11.4067 15.4391C11.5183 15.5507 11.5733 15.6812 11.5719 15.8307C11.5704 15.9802 11.5115 16.1132 11.3952 16.2295C11.2789 16.3382 11.1471 16.3944 11 16.3983C10.8529 16.4021 10.7212 16.3459 10.6048 16.2295L5.84956 11.4742C5.77938 11.404 5.72986 11.33 5.70101 11.2521C5.67216 11.1742 5.65773 11.0901 5.65773 10.9997C5.65773 10.9093 5.67216 10.8252 5.70101 10.7473C5.72986 10.6694 5.77938 10.5954 5.84956 10.5252L10.6048 5.76993C10.7087 5.66608 10.8373 5.61295 10.9906 5.61055C11.144 5.60815 11.2789 5.66128 11.3952 5.76993C11.5115 5.88626 11.5697 6.01992 11.5697 6.17088C11.5697 6.32184 11.5115 6.45549 11.3952 6.57183L7.52981 10.4372Z",fill:"currentColor"})})]})}),t9=H.input.attrs(()=>({autoCorrect:"off",autoComplete:"off"}))` +import{a9 as Fg,aa as bi,a7 as Xp,ab as o4,r as B,_ as we,j as y,g as Hg,b as Ug,s as Tr,i as s4,e as vn,f as sf,u as Wg,a as Id,c as Xr,d as Yg,ac as Dd,ad as l4,ae as u4,af as Vg,o as H,q as L,ag as Gg,G as Ul,F,B as Sn,J as Qi,ah as qg,T as ht,ai as c4,aj as f4,v as Fn,A as At,ak as No,al as Bt,am as d4,n as st,z as Ro,E as Kg,an as Xg,O as lf,K as h4,ao as p4,ap as Bo,aq as ea,ar as _n,as as Zg,at as Ld,au as ta,av as Te,R as U,aw as m4,ax as Jg,ay as y4,az as Qg,aA as g4,aB as v4,aC as x4,aD as zo,aE as Nd,aF as ev,aG as tv,aH as b4,aI as w4,aJ as S4,aK as Wl,aL as _4,aM as O4,P as Oe,aN as k4,aO as C4,aP as P4,y as qt,aQ as Zp,a4 as A4,C as rn,aR as j4,aS as T4,p as E4,aT as M4}from"./index-022521cf.js";import{v as ei,d as $4,e as uf,f as I4,g as cc,h as Rd,i as D4,F as L4,b as nv,A as In,T as na,j as Ti,B as Dt,k as rv,P as Yl,l as N4,m as Bd,I as iv,n as Vl}from"./index-586dfb7f.js";import{S as av}from"./SearchIcon-fa6afb77.js";import{c as R4,a as fc,C as Gl}from"./ClipLoader-d8628c6c.js";import{S as ov}from"./Skeleton-5c7b36a8.js";import{P as zd}from"./PlusIcon-6ec48130.js";import{T as B4,r as z4,g as Jp,P as F4}from"./Popover-cc3c7b26.js";import{o as Rs,e as dc,a as sv,d as H4,i as Bs,u as xr}from"./useSlotProps-51fc8b9f.js";import{C as lv}from"./CheckIcon-4e74d21d.js";import{u as U4,F as W4,P as Y4}from"./Stack-ce2a5ec5.js";import{S as V4,F as Qp}from"./FormControlLabel-8c91edc9.js";import{c as Fd}from"./createSvgIcon-e1ebdfca.js";import{B as G4}from"./index-ee20ad28.js";import{u as uv}from"./index-80c09a74.js";import{b as q4,a as K4,c as X4,d as Z4}from"./index.esm-38ac4e4f.js";import{I as J4}from"./InfoIcon-b7d3736d.js";const e1="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",Q4=async e=>{let t=await bi.enable(!0);if(t||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),t=await bi.keysend(e1,e),!(t!=null&&t.success)){if(t=await bi.topup(),t||(t=await bi.authorize()),!(t!=null&&t.budget)||(t==null?void 0:t.budget){const n=await Q4(t),r={amount:t,refid:e};return await Fg.post("/boost",JSON.stringify(r)),n},t8=e=>{const[t,n]=e.split("-")||["",""];return parseInt(n,10)!==0?`${t} - ${n}`:t},cv=(e,t)=>{if(!t)return null;const n=e.filter(a=>a.show_title&&a.link&&a.show_title===t.show_title&&a.episode_title===t.episode_title),r=Xp.groupBy(n,a=>a.timestamp),i=Xp.values(r).reduce((a,o)=>(o[0]&&a.push(o[0]),a),[]);return i.sort((a,o)=>{var d,h;const[s]=((d=a.timestamp)==null?void 0:d.split("-"))||[""],[l]=((h=o.timestamp)==null?void 0:h.split("-"))||[""],u=ei(s),f=ei(l);return u-f}),i},n8=async e=>{await o4(async()=>{try{await bi.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...e},type:"second_brain_consumed_content"})}catch(t){console.warn(t)}})},r8=e=>{const t=/((http|https):\/\/[^\s]+)/g,n=/@(\w+)/g;let r=e.replace(/\\/g,"");return r=r.replace(/'/g,"’"),r=r.replace(/\n/g,"
"),r=r.replace(t,'$1'),r=r.replace(n,'@$1'),r},i8={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},a8=i8;function o8(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}const s8=2;function fv(e,t){return e-t}function ba(e,t,n){return e==null?t:Math.min(Math.max(t,e),n)}function t1(e,t){var n;const{index:r}=(n=e.reduce((i,a,o)=>{const s=Math.abs(t-a);return i===null||s({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},d8=e=>e;let vs;function hc(){return vs===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?vs=CSS.supports("touch-action","none"):vs=!0),vs}function h8(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:a=!1,marks:o=!1,max:s=100,min:l=0,name:u,onChange:f,onChangeCommitted:d,orientation:h="horizontal",rootRef:m,scale:g=d8,step:v=1,tabIndex:b,value:O}=e,C=B.useRef(),[k,P]=B.useState(-1),[_,w]=B.useState(-1),[j,E]=B.useState(!1),I=B.useRef(0),[z,M]=U4({controlled:O,default:n??l,name:"Slider"}),D=f&&((R,q,ne)=>{const se=R.nativeEvent||R,oe=new se.constructor(se.type,se);Object.defineProperty(oe,"target",{writable:!0,value:{value:q,name:u}}),f(oe,q,ne)}),W=Array.isArray(z);let Y=W?z.slice().sort(fv):[z];Y=Y.map(R=>ba(R,l,s));const V=o===!0&&v!==null?[...Array(Math.floor((s-l)/v)+1)].map((R,q)=>({value:l+v*q})):o||[],X=V.map(R=>R.value),{isFocusVisibleRef:Z,onBlur:G,onFocus:Q,ref:T}=$4(),[pe,ue]=B.useState(-1),$=B.useRef(),_e=uf(T,$),te=uf(m,_e),ge=R=>q=>{var ne;const se=Number(q.currentTarget.getAttribute("data-index"));Q(q),Z.current===!0&&ue(se),w(se),R==null||(ne=R.onFocus)==null||ne.call(R,q)},Ye=R=>q=>{var ne;G(q),Z.current===!1&&ue(-1),w(-1),R==null||(ne=R.onBlur)==null||ne.call(R,q)};I4(()=>{if(r&&$.current.contains(document.activeElement)){var R;(R=document.activeElement)==null||R.blur()}},[r]),r&&k!==-1&&P(-1),r&&pe!==-1&&ue(-1);const Me=R=>q=>{var ne;(ne=R.onChange)==null||ne.call(R,q);const se=Number(q.currentTarget.getAttribute("data-index")),oe=Y[se],Re=X.indexOf(oe);let ke=q.target.valueAsNumber;if(V&&v==null){const $e=X[X.length-1];ke>$e?ke=$e:ke{const{current:ne}=$,{width:se,height:oe,bottom:Re,left:ke}=ne.getBoundingClientRect();let $e;de.indexOf("vertical")===0?$e=(Re-R.y)/oe:$e=(R.x-ke)/se,de.indexOf("-reverse")!==-1&&($e=1-$e);let Ge;if(Ge=l8($e,l,s),v)Ge=c8(Ge,v,l);else{const pt=t1(X,Ge);Ge=X[pt]}Ge=ba(Ge,l,s);let kt=0;if(W){q?kt=ae.current:kt=t1(Y,Ge),i&&(Ge=ba(Ge,Y[kt-1]||-1/0,Y[kt+1]||1/0));const pt=Ge;Ge=n1({values:Y,newValue:Ge,index:kt}),i&&q||(kt=Ge.indexOf(pt),ae.current=kt)}return{newValue:Ge,activeIndex:kt}},ee=cc(R=>{const q=ms(R,C);if(!q)return;if(I.current+=1,R.type==="mousemove"&&R.buttons===0){Ae(R);return}const{newValue:ne,activeIndex:se}=ve({finger:q,move:!0});ys({sliderRef:$,activeIndex:se,setActive:P}),M(ne),!j&&I.current>s8&&E(!0),D&&!gs(ne,z)&&D(R,ne,se)}),Ae=cc(R=>{const q=ms(R,C);if(E(!1),!q)return;const{newValue:ne}=ve({finger:q,move:!0});P(-1),R.type==="touchend"&&w(-1),d&&d(R,ne),C.current=void 0,xe()}),he=cc(R=>{if(r)return;hc()||R.preventDefault();const q=R.changedTouches[0];q!=null&&(C.current=q.identifier);const ne=ms(R,C);if(ne!==!1){const{newValue:oe,activeIndex:Re}=ve({finger:ne});ys({sliderRef:$,activeIndex:Re,setActive:P}),M(oe),D&&!gs(oe,z)&&D(R,oe,Re)}I.current=0;const se=Rs($.current);se.addEventListener("touchmove",ee),se.addEventListener("touchend",Ae)}),xe=B.useCallback(()=>{const R=Rs($.current);R.removeEventListener("mousemove",ee),R.removeEventListener("mouseup",Ae),R.removeEventListener("touchmove",ee),R.removeEventListener("touchend",Ae)},[Ae,ee]);B.useEffect(()=>{const{current:R}=$;return R.addEventListener("touchstart",he,{passive:hc()}),()=>{R.removeEventListener("touchstart",he,{passive:hc()}),xe()}},[xe,he]),B.useEffect(()=>{r&&xe()},[r,xe]);const He=R=>q=>{var ne;if((ne=R.onMouseDown)==null||ne.call(R,q),r||q.defaultPrevented||q.button!==0)return;q.preventDefault();const se=ms(q,C);if(se!==!1){const{newValue:Re,activeIndex:ke}=ve({finger:se});ys({sliderRef:$,activeIndex:ke,setActive:P}),M(Re),D&&!gs(Re,z)&&D(q,Re,ke)}I.current=0;const oe=Rs($.current);oe.addEventListener("mousemove",ee),oe.addEventListener("mouseup",Ae)},rt=Ys(W?Y[0]:l,l,s),ft=Ys(Y[Y.length-1],l,s)-rt,en=(R={})=>{const q=dc(R),ne={onMouseDown:He(q||{})},se=we({},q,ne);return we({},R,{ref:te},se)},Ue=R=>q=>{var ne;(ne=R.onMouseOver)==null||ne.call(R,q);const se=Number(q.currentTarget.getAttribute("data-index"));w(se)},Ne=R=>q=>{var ne;(ne=R.onMouseLeave)==null||ne.call(R,q),w(-1)};return{active:k,axis:de,axisProps:f8,dragging:j,focusedThumbIndex:pe,getHiddenInputProps:(R={})=>{var q;const ne=dc(R),se={onChange:Me(ne||{}),onFocus:ge(ne||{}),onBlur:Ye(ne||{})},oe=we({},ne,se);return we({tabIndex:b,"aria-labelledby":t,"aria-orientation":h,"aria-valuemax":g(s),"aria-valuemin":g(l),name:u,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(q=e.step)!=null?q:void 0,disabled:r},R,oe,{style:we({},a8,{direction:a?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:en,getThumbProps:(R={})=>{const q=dc(R),ne={onMouseOver:Ue(q||{}),onMouseLeave:Ne(q||{})};return we({},R,q,ne)},marks:V,open:_,range:W,rootRef:te,trackLeap:ft,trackOffset:rt,values:Y,getThumbStyle:R=>({pointerEvents:k!==-1&&k!==R?"none":void 0})}}const p8=Fd(y.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),m8=Fd(y.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),y8=Fd(y.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function g8(e){return Ug("MuiCheckbox",e)}const v8=Hg("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),pc=v8,x8=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],b8=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,a={root:["root",n&&"indeterminate",`color${vn(r)}`,`size${vn(i)}`]},o=Yg(a,g8,t);return we({},t,o)},w8=Tr(V4,{shouldForwardProp:e=>s4(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${vn(n.size)}`],n.color!=="default"&&t[`color${vn(n.color)}`]]}})(({theme:e,ownerState:t})=>we({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:sf(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${pc.checked}, &.${pc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${pc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),S8=y.jsx(m8,{}),_8=y.jsx(p8,{}),O8=y.jsx(y8,{}),k8=B.forwardRef(function(t,n){var r,i;const a=Wg({props:t,name:"MuiCheckbox"}),{checkedIcon:o=S8,color:s="primary",icon:l=_8,indeterminate:u=!1,indeterminateIcon:f=O8,inputProps:d,size:h="medium",className:m}=a,g=Id(a,x8),v=u?f:l,b=u?f:o,O=we({},a,{color:s,indeterminate:u,size:h}),C=b8(O);return y.jsx(w8,we({type:"checkbox",inputProps:we({"data-indeterminate":u},d),icon:B.cloneElement(v,{fontSize:(r=v.props.fontSize)!=null?r:h}),checkedIcon:B.cloneElement(b,{fontSize:(i=b.props.fontSize)!=null?i:h}),ownerState:O,ref:n,className:Xr(C.root,m)},g,{classes:C}))}),C8=k8,P8=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function A8(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),a=sv(t);let o;if(t.fakeTransform)o=t.fakeTransform;else{const u=a.getComputedStyle(t);o=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let s=0,l=0;if(o&&o!=="none"&&typeof o=="string"){const u=o.split("(")[1].split(")")[0].split(",");s=parseInt(u[4],10),l=parseInt(u[5],10)}return e==="left"?i?`translateX(${i.right+s-r.left}px)`:`translateX(${a.innerWidth+s-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${a.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function j8(e){return typeof e=="function"?e():e}function xs(e,t,n){const r=j8(n),i=A8(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const T8=B.forwardRef(function(t,n){const r=Dd(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,container:u,direction:f="down",easing:d=i,in:h,onEnter:m,onEntered:g,onEntering:v,onExit:b,onExited:O,onExiting:C,style:k,timeout:P=a,TransitionComponent:_=B4}=t,w=Id(t,P8),j=B.useRef(null),E=uf(l.ref,j,n),I=G=>Q=>{G&&(Q===void 0?G(j.current):G(j.current,Q))},z=I((G,Q)=>{xs(f,G,u),z4(G),m&&m(G,Q)}),M=I((G,Q)=>{const T=Jp({timeout:P,style:k,easing:d},{mode:"enter"});G.style.webkitTransition=r.transitions.create("-webkit-transform",we({},T)),G.style.transition=r.transitions.create("transform",we({},T)),G.style.webkitTransform="none",G.style.transform="none",v&&v(G,Q)}),D=I(g),W=I(C),Y=I(G=>{const Q=Jp({timeout:P,style:k,easing:d},{mode:"exit"});G.style.webkitTransition=r.transitions.create("-webkit-transform",Q),G.style.transition=r.transitions.create("transform",Q),xs(f,G,u),b&&b(G)}),V=I(G=>{G.style.webkitTransition="",G.style.transition="",O&&O(G)}),X=G=>{o&&o(j.current,G)},Z=B.useCallback(()=>{j.current&&xs(f,j.current,u)},[f,u]);return B.useEffect(()=>{if(h||f==="down"||f==="right")return;const G=H4(()=>{j.current&&xs(f,j.current,u)}),Q=sv(j.current);return Q.addEventListener("resize",G),()=>{G.clear(),Q.removeEventListener("resize",G)}},[f,h,u]),B.useEffect(()=>{h||Z()},[h,Z]),y.jsx(_,we({nodeRef:j,onEnter:z,onEntered:D,onEntering:M,onExit:Y,onExited:V,onExiting:W,addEndListener:X,appear:s,in:h,timeout:P},w,{children:(G,Q)=>B.cloneElement(l,we({ref:E,style:we({visibility:G==="exited"&&!h?"hidden":void 0},k,l.props.style)},Q))}))}),Ei=T8,E8=e=>!e||!Bs(e),M8=E8;function $8(e){return Ug("MuiSlider",e)}const I8=Hg("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),En=I8,D8=e=>{const{open:t}=e;return{offset:Xr(t&&En.valueLabelOpen),circle:En.valueLabelCircle,label:En.valueLabelLabel}};function L8(e){const{children:t,className:n,value:r}=e,i=D8(e);return t?B.cloneElement(t,{className:Xr(t.props.className)},y.jsxs(B.Fragment,{children:[t.props.children,y.jsx("span",{className:Xr(i.offset,n),"aria-hidden":!0,children:y.jsx("span",{className:i.circle,children:y.jsx("span",{className:i.label,children:r})})})]})):null}const N8=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function r1(e){return e}const R8=Tr("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${vn(n.color)}`],n.size!=="medium"&&t[`size${vn(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>we({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&we({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&we({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${En.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${En.dragging}`]:{[`& .${En.thumb}, & .${En.track}`]:{transition:"none"}}})),B8=Tr("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>we({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),z8=Tr("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?l4(e.palette[t.color].main,.62):u4(e.palette[t.color].main,.5);return we({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:n})}),F8=Tr("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${vn(n.color)}`],n.size!=="medium"&&t[`thumbSize${vn(n.size)}`]]}})(({theme:e,ownerState:t})=>we({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":we({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${En.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:sf(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${En.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:sf(e.palette[t.color].main,.16)}`},[`&.${En.disabled}`]:{"&:hover":{boxShadow:"none"}}})),H8=Tr(L8,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>we({[`&.${En.valueLabelOpen}`]:{transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:t.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),U8=Tr("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Vg(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e,ownerState:t,markActive:n})=>we({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},n&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),W8=Tr("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Vg(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:n})=>we({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},n&&{color:(e.vars||e).palette.text.primary})),Y8=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:a,classes:o,color:s,size:l}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",a==="inverted"&&"trackInverted",a===!1&&"trackFalse",s&&`color${vn(s)}`,l&&`size${vn(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${vn(l)}`,s&&`thumbColor${vn(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Yg(u,$8,o)},V8=({children:e})=>e,G8=B.forwardRef(function(t,n){var r,i,a,o,s,l,u,f,d,h,m,g,v,b,O,C,k,P,_,w,j,E,I,z;const M=Wg({props:t,name:"MuiSlider"}),W=Dd().direction==="rtl",{"aria-label":Y,"aria-valuetext":V,"aria-labelledby":X,component:Z="span",components:G={},componentsProps:Q={},color:T="primary",classes:pe,className:ue,disableSwap:$=!1,disabled:_e=!1,getAriaLabel:te,getAriaValueText:ge,marks:Ye=!1,max:Me=100,min:ae=0,orientation:de="horizontal",size:ve="medium",step:ee=1,scale:Ae=r1,slotProps:he,slots:xe,track:He="normal",valueLabelDisplay:rt="off",valueLabelFormat:ft=r1}=M,en=Id(M,N8),Ue=we({},M,{isRtl:W,max:Me,min:ae,classes:pe,disabled:_e,disableSwap:$,orientation:de,marks:Ye,color:T,size:ve,step:ee,scale:Ae,track:He,valueLabelDisplay:rt,valueLabelFormat:ft}),{axisProps:Ne,getRootProps:it,getHiddenInputProps:tn,getThumbProps:Cn,open:R,active:q,axis:ne,focusedThumbIndex:se,range:oe,dragging:Re,marks:ke,values:$e,trackOffset:Ge,trackLeap:kt,getThumbStyle:pt}=h8(we({},Ue,{rootRef:n}));Ue.marked=ke.length>0&&ke.some(je=>je.label),Ue.dragging=Re,Ue.focusedThumbIndex=se;const Ie=Y8(Ue),Lt=(r=(i=xe==null?void 0:xe.root)!=null?i:G.Root)!=null?r:R8,oi=(a=(o=xe==null?void 0:xe.rail)!=null?o:G.Rail)!=null?a:B8,Nr=(s=(l=xe==null?void 0:xe.track)!=null?l:G.Track)!=null?s:z8,qe=(u=(f=xe==null?void 0:xe.thumb)!=null?f:G.Thumb)!=null?u:F8,fa=(d=(h=xe==null?void 0:xe.valueLabel)!=null?h:G.ValueLabel)!=null?d:H8,si=(m=(g=xe==null?void 0:xe.mark)!=null?g:G.Mark)!=null?m:U8,fr=(v=(b=xe==null?void 0:xe.markLabel)!=null?b:G.MarkLabel)!=null?v:W8,li=(O=(C=xe==null?void 0:xe.input)!=null?C:G.Input)!=null?O:"input",dr=(k=he==null?void 0:he.root)!=null?k:Q.root,hr=(P=he==null?void 0:he.rail)!=null?P:Q.rail,pr=(_=he==null?void 0:he.track)!=null?_:Q.track,da=(w=he==null?void 0:he.thumb)!=null?w:Q.thumb,mr=(j=he==null?void 0:he.valueLabel)!=null?j:Q.valueLabel,Uu=(E=he==null?void 0:he.mark)!=null?E:Q.mark,Rr=(I=he==null?void 0:he.markLabel)!=null?I:Q.markLabel,ui=(z=he==null?void 0:he.input)!=null?z:Q.input,ce=xr({elementType:Lt,getSlotProps:it,externalSlotProps:dr,externalForwardedProps:en,additionalProps:we({},M8(Lt)&&{as:Z}),ownerState:we({},Ue,dr==null?void 0:dr.ownerState),className:[Ie.root,ue]}),Wu=xr({elementType:oi,externalSlotProps:hr,ownerState:Ue,className:Ie.rail}),Yu=xr({elementType:Nr,externalSlotProps:pr,additionalProps:{style:we({},Ne[ne].offset(Ge),Ne[ne].leap(kt))},ownerState:we({},Ue,pr==null?void 0:pr.ownerState),className:Ie.track}),Et=xr({elementType:qe,getSlotProps:Cn,externalSlotProps:da,ownerState:we({},Ue,da==null?void 0:da.ownerState),className:Ie.thumb}),ha=xr({elementType:fa,externalSlotProps:mr,ownerState:we({},Ue,mr==null?void 0:mr.ownerState),className:Ie.valueLabel}),Be=xr({elementType:si,externalSlotProps:Uu,ownerState:Ue,className:Ie.mark}),Vn=xr({elementType:fr,externalSlotProps:Rr,ownerState:Ue,className:Ie.markLabel}),Vu=xr({elementType:li,getSlotProps:tn,externalSlotProps:ui,ownerState:Ue});return y.jsxs(Lt,we({},ce,{children:[y.jsx(oi,we({},Wu)),y.jsx(Nr,we({},Yu)),ke.filter(je=>je.value>=ae&&je.value<=Me).map((je,Je)=>{const Kt=Ys(je.value,ae,Me),lt=Ne[ne].offset(Kt);let mt;return He===!1?mt=$e.indexOf(je.value)!==-1:mt=He==="normal"&&(oe?je.value>=$e[0]&&je.value<=$e[$e.length-1]:je.value<=$e[0])||He==="inverted"&&(oe?je.value<=$e[0]||je.value>=$e[$e.length-1]:je.value>=$e[0]),y.jsxs(B.Fragment,{children:[y.jsx(si,we({"data-index":Je},Be,!Bs(si)&&{markActive:mt},{style:we({},lt,Be.style),className:Xr(Be.className,mt&&Ie.markActive)})),je.label!=null?y.jsx(fr,we({"aria-hidden":!0,"data-index":Je},Vn,!Bs(fr)&&{markLabelActive:mt},{style:we({},lt,Vn.style),className:Xr(Ie.markLabel,Vn.className,mt&&Ie.markLabelActive),children:je.label})):null]},Je)}),$e.map((je,Je)=>{const Kt=Ys(je,ae,Me),lt=Ne[ne].offset(Kt),mt=rt==="off"?V8:fa;return y.jsx(mt,we({},!Bs(mt)&&{valueLabelFormat:ft,valueLabelDisplay:rt,value:typeof ft=="function"?ft(Ae(je),Je):ft,index:Je,open:R===Je||q===Je||rt==="on",disabled:_e},ha,{children:y.jsx(qe,we({"data-index":Je},Et,{className:Xr(Ie.thumb,Et.className,q===Je&&Ie.active,se===Je&&Ie.focusVisible),style:we({},lt,pt(Je),Et.style),children:y.jsx(li,we({"data-index":Je,"aria-label":te?te(Je):Y,"aria-valuenow":Ae(je),"aria-labelledby":X,"aria-valuetext":ge?ge(Ae(je),Je):V,value:$e[Je]},Vu))}))}),Je)})]}))}),ql=G8,q8=(e,t="down")=>{const n=Dd(),[r,i]=B.useState(!1),a=n.breakpoints[t](e).split("@media")[1].trim();return B.useEffect(()=>{const o=()=>{const{matches:s}=window.matchMedia(a);i(s)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[a]),r},K8=e=>e.filter(t=>t.tldr).length>=2&&e.some(t=>t.audio_EN);function X8(e){return e.tldr_topic??e.name}var Vs=globalThis&&globalThis.__assign||function(){return Vs=Object.assign||function(e){for(var t,n=1,r=arguments.length;ny.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"keyboard_arrow_left",children:[y.jsx("mask",{id:"mask0_1428_267",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"18",height:"18",children:y.jsx("path",{id:"Bounding box",d:"M0 0H18V18H0V0Z",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1428_267)",children:y.jsx("path",{id:"keyboard_arrow_left_2",d:"M8.10001 8.99998L11.025 11.925C11.1625 12.0625 11.2313 12.2375 11.2313 12.45C11.2313 12.6625 11.1625 12.8375 11.025 12.975C10.8875 13.1125 10.7125 13.1812 10.5 13.1812C10.2875 13.1812 10.1125 13.1125 9.97501 12.975L6.52501 9.52498C6.45001 9.44998 6.39688 9.36873 6.36563 9.28123C6.33438 9.19373 6.31876 9.09998 6.31876 8.99998C6.31876 8.89998 6.33438 8.80623 6.36563 8.71873C6.39688 8.63123 6.45001 8.54998 6.52501 8.47498L9.97501 5.02498C10.1125 4.88748 10.2875 4.81873 10.5 4.81873C10.7125 4.81873 10.8875 4.88748 11.025 5.02498C11.1625 5.16248 11.2313 5.33748 11.2313 5.54998C11.2313 5.76248 11.1625 5.93748 11.025 6.07498L8.10001 8.99998Z",fill:"currentColor"})})]})}),e9=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"arrow_forward",children:[y.jsx("mask",{id:"mask0_8980_24763",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:y.jsx("rect",{id:"Bounding box",x:"20",y:"20",width:"1em",height:"1em",transform:"rotate(-180 20 20)",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_8980_24763)",children:y.jsx("path",{id:"arrow_forward_2",d:"M7.52981 10.4372L16.0625 10.4372C16.2221 10.4372 16.3558 10.4911 16.4635 10.5988C16.5712 10.7065 16.625 10.8401 16.625 10.9997C16.625 11.1593 16.5712 11.293 16.4635 11.4007C16.3558 11.5084 16.2221 11.5622 16.0625 11.5622L7.52981 11.5622L11.4067 15.4391C11.5183 15.5507 11.5733 15.6812 11.5719 15.8307C11.5704 15.9802 11.5115 16.1132 11.3952 16.2295C11.2789 16.3382 11.1471 16.3944 11 16.3983C10.8529 16.4021 10.7212 16.3459 10.6048 16.2295L5.84956 11.4742C5.77938 11.404 5.72986 11.33 5.70101 11.2521C5.67216 11.1742 5.65773 11.0901 5.65773 10.9997C5.65773 10.9093 5.67216 10.8252 5.70101 10.7473C5.72986 10.6694 5.77938 10.5954 5.84956 10.5252L10.6048 5.76993C10.7087 5.66608 10.8373 5.61295 10.9906 5.61055C11.144 5.60815 11.2789 5.66128 11.3952 5.76993C11.5115 5.88626 11.5697 6.01992 11.5697 6.17088C11.5697 6.32184 11.5115 6.45549 11.3952 6.57183L7.52981 10.4372Z",fill:"currentColor"})})]})}),t9=H.input.attrs(()=>({autoCorrect:"off",autoComplete:"off"}))` pointer-events: auto; height: 48px; padding: 0 40px 0 18px; @@ -1880,7 +1880,7 @@ ${({disabled:e})=>e&&Gg` `,WK=H.audio` height: 0; width: 0; -`,YK=()=>{const e=qt(),{setPlayingNode:t}=Vl(n=>n);switch(B.useEffect(()=>{var r,i;if(!e)return;(e.media_url||e.link||((r=e.properties)==null?void 0:r.link)||((i=e.properties)==null?void 0:i.media_url))&&t(e)},[t,e]),e==null?void 0:e.node_type){case"guest":case"person":return y.jsx(fK,{});case"data_series":return y.jsx(lq,{});case"tribe_message":return y.jsx(sK,{});case"Tweet":return y.jsx(wK,{});case"topic":return y.jsx(bK,{});case"show":return y.jsx(xK,{});case"video":case"podcast":case"clip":case"twitter_space":return y.jsx(q2,{});case"document":return y.jsx(BK,{});case"episode":return y.jsx(nK,{},e.ref_id);case"image":return y.jsx(oK,{});default:return y.jsx(AK,{})}},VK=B.memo(YK);var GK=function(t,n,r){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");typeof n=="function"&&(r=n,n={}),n=n||{},r=r||function(){},a.type=n.type||"text/javascript",a.charset=n.charset||"utf8",a.async="async"in n?!!n.async:!0,a.src=t,n.attrs&&qK(a,n.attrs),n.text&&(a.text=""+n.text);var o="onload"in a?$g:KK;o(a,r),a.onload||$g(a,r),i.appendChild(a)};function qK(e,t){for(var n in t)e.setAttribute(n,t[n])}function $g(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function KK(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}var XK=function(t){return ZK(t)&&!JK(t)};function ZK(e){return!!e&&typeof e=="object"}function JK(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||tX(e)}var QK=typeof Symbol=="function"&&Symbol.for,eX=QK?Symbol.for("react.element"):60103;function tX(e){return e.$$typeof===eX}function nX(e){return Array.isArray(e)?[]:{}}function Lo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ji(nX(e),e,t):e}function rX(e,t,n){return e.concat(t).map(function(r){return Lo(r,n)})}function iX(e,t){if(!t.customMerge)return Ji;var n=t.customMerge(e);return typeof n=="function"?n:Ji}function aX(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Ig(e){return Object.keys(e).concat(aX(e))}function K2(e,t){try{return t in e}catch{return!1}}function oX(e,t){return K2(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function sX(e,t,n){var r={};return n.isMergeableObject(e)&&Ig(e).forEach(function(i){r[i]=Lo(e[i],n)}),Ig(t).forEach(function(i){oX(e,i)||(K2(e,i)&&n.isMergeableObject(t[i])?r[i]=iX(i,n)(e[i],t[i],n):r[i]=Lo(t[i],n))}),r}function Ji(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||rX,n.isMergeableObject=n.isMergeableObject||XK,n.cloneUnlessOtherwiseSpecified=Lo;var r=Array.isArray(t),i=Array.isArray(e),a=r===i;return a?r?n.arrayMerge(e,t,n):sX(e,t,n):Lo(t,n)}Ji.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ji(r,i,n)},{})};var lX=Ji,X2=lX,uX=Object.create,Ru=Object.defineProperty,cX=Object.getOwnPropertyDescriptor,fX=Object.getOwnPropertyNames,dX=Object.getPrototypeOf,hX=Object.prototype.hasOwnProperty,pX=(e,t)=>{for(var n in t)Ru(e,n,{get:t[n],enumerable:!0})},Z2=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fX(t))!hX.call(e,i)&&i!==n&&Ru(e,i,{get:()=>t[i],enumerable:!(r=cX(t,i))||r.enumerable});return e},sp=(e,t,n)=>(n=e!=null?uX(dX(e)):{},Z2(t||!e||!e.__esModule?Ru(n,"default",{value:e,enumerable:!0}):n,e)),mX=e=>Z2(Ru({},"__esModule",{value:!0}),e),J2={};pX(J2,{callPlayer:()=>EX,getConfig:()=>jX,getSDK:()=>AX,isBlobUrl:()=>$X,isMediaStream:()=>MX,lazy:()=>xX,omit:()=>TX,parseEndTime:()=>kX,parseStartTime:()=>OX,queryString:()=>PX,randomString:()=>CX,supportsWebKitPresentationMode:()=>IX});var Bu=mX(J2),yX=sp(B),gX=sp(GK),vX=sp(X2);const xX=e=>yX.default.lazy(async()=>{const t=await e();return typeof t.default=="function"?t:t.default}),bX=/[?&#](?:start|t)=([0-9hms]+)/,wX=/[?&#]end=([0-9hms]+)/,Td=/(\d+)(h|m|s)/g,SX=/^\d+$/;function Q2(e,t){if(e instanceof Array)return;const n=e.match(t);if(n){const r=n[1];if(r.match(Td))return _X(r);if(SX.test(r))return parseInt(r)}}function _X(e){let t=0,n=Td.exec(e);for(;n!==null;){const[,r,i]=n;i==="h"&&(t+=parseInt(r,10)*60*60),i==="m"&&(t+=parseInt(r,10)*60),i==="s"&&(t+=parseInt(r,10)),n=Td.exec(e)}return t}function OX(e){return Q2(e,bX)}function kX(e){return Q2(e,wX)}function CX(){return Math.random().toString(36).substr(2,5)}function PX(e){return Object.keys(e).map(t=>`${t}=${e[t]}`).join("&")}function rf(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}const vi={},AX=function(t,n,r=null,i=()=>!0,a=gX.default){const o=rf(n);return o&&i(o)?Promise.resolve(o):new Promise((s,l)=>{if(vi[t]){vi[t].push({resolve:s,reject:l});return}vi[t]=[{resolve:s,reject:l}];const u=f=>{vi[t].forEach(d=>d.resolve(f))};if(r){const f=window[r];window[r]=function(){f&&f(),u(rf(n))}}a(t,f=>{f?(vi[t].forEach(d=>d.reject(f)),vi[t]=null):r||u(rf(n))})})};function jX(e,t){return(0,vX.default)(t.config,e.config)}function TX(e,...t){const n=[].concat(...t),r={},i=Object.keys(e);for(const a of i)n.indexOf(a)===-1&&(r[a]=e[a]);return r}function EX(e,...t){if(!this.player||!this.player[e]){let n=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c – `;return this.player?this.player[e]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}return this.player[e](...t)}function MX(e){return typeof window<"u"&&typeof window.MediaStream<"u"&&e instanceof window.MediaStream}function $X(e){return/^blob:/.test(e)}function IX(e=document.createElement("video")){const t=/iPhone|iPod/.test(navigator.userAgent)===!1;return e.webkitSupportsPresentationMode&&typeof e.webkitSetPresentationMode=="function"&&t}var lp=Object.defineProperty,DX=Object.getOwnPropertyDescriptor,LX=Object.getOwnPropertyNames,NX=Object.prototype.hasOwnProperty,RX=(e,t)=>{for(var n in t)lp(e,n,{get:t[n],enumerable:!0})},BX=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of LX(t))!NX.call(e,i)&&i!==n&&lp(e,i,{get:()=>t[i],enumerable:!(r=DX(t,i))||r.enumerable});return e},zX=e=>BX(lp({},"__esModule",{value:!0}),e),ew={};RX(ew,{AUDIO_EXTENSIONS:()=>up,DASH_EXTENSIONS:()=>hw,FLV_EXTENSIONS:()=>pw,HLS_EXTENSIONS:()=>fp,MATCH_URL_DAILYMOTION:()=>uw,MATCH_URL_FACEBOOK:()=>rw,MATCH_URL_FACEBOOK_WATCH:()=>iw,MATCH_URL_KALTURA:()=>dw,MATCH_URL_MIXCLOUD:()=>cw,MATCH_URL_SOUNDCLOUD:()=>tw,MATCH_URL_STREAMABLE:()=>aw,MATCH_URL_TWITCH_CHANNEL:()=>lw,MATCH_URL_TWITCH_VIDEO:()=>sw,MATCH_URL_VIDYARD:()=>fw,MATCH_URL_VIMEO:()=>nw,MATCH_URL_WISTIA:()=>ow,MATCH_URL_YOUTUBE:()=>Ed,VIDEO_EXTENSIONS:()=>cp,canPlay:()=>HX});var FX=zX(ew),Dg=Bu;const Ed=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,tw=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,nw=/vimeo\.com\/(?!progressive_redirect).+/,rw=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,iw=/^https?:\/\/fb\.watch\/.+$/,aw=/streamable\.com\/([a-z0-9]+)$/,ow=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,sw=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,lw=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,uw=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,cw=/mixcloud\.com\/([^/]+\/[^/]+)/,fw=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,dw=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/,up=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,cp=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,fp=/\.(m3u8)($|\?)/i,hw=/\.(mpd)($|\?)/i,pw=/\.(flv)($|\?)/i,Md=e=>{if(e instanceof Array){for(const t of e)if(typeof t=="string"&&Md(t)||Md(t.src))return!0;return!1}return(0,Dg.isMediaStream)(e)||(0,Dg.isBlobUrl)(e)?!0:up.test(e)||cp.test(e)||fp.test(e)||hw.test(e)||pw.test(e)},HX={youtube:e=>e instanceof Array?e.every(t=>Ed.test(t)):Ed.test(e),soundcloud:e=>tw.test(e)&&!up.test(e),vimeo:e=>nw.test(e)&&!cp.test(e)&&!fp.test(e),facebook:e=>rw.test(e)||iw.test(e),streamable:e=>aw.test(e),wistia:e=>ow.test(e),twitch:e=>sw.test(e)||lw.test(e),dailymotion:e=>uw.test(e),mixcloud:e=>cw.test(e),vidyard:e=>fw.test(e),kaltura:e=>dw.test(e),file:Md};var dp=Object.defineProperty,UX=Object.getOwnPropertyDescriptor,WX=Object.getOwnPropertyNames,YX=Object.prototype.hasOwnProperty,VX=(e,t)=>{for(var n in t)dp(e,n,{get:t[n],enumerable:!0})},GX=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of WX(t))!YX.call(e,i)&&i!==n&&dp(e,i,{get:()=>t[i],enumerable:!(r=UX(t,i))||r.enumerable});return e},qX=e=>GX(dp({},"__esModule",{value:!0}),e),mw={};VX(mw,{default:()=>XX});var KX=qX(mw),nn=Bu,Xt=FX,XX=[{key:"youtube",name:"YouTube",canPlay:Xt.canPlay.youtube,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./YouTube-2c42744e.js").then(e=>e.Y),["assets/YouTube-2c42744e.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"soundcloud",name:"SoundCloud",canPlay:Xt.canPlay.soundcloud,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./SoundCloud-ee965f44.js").then(e=>e.S),["assets/SoundCloud-ee965f44.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"vimeo",name:"Vimeo",canPlay:Xt.canPlay.vimeo,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Vimeo-f042fa11.js").then(e=>e.V),["assets/Vimeo-f042fa11.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"facebook",name:"Facebook",canPlay:Xt.canPlay.facebook,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Facebook-bed98e7b.js").then(e=>e.F),["assets/Facebook-bed98e7b.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"streamable",name:"Streamable",canPlay:Xt.canPlay.streamable,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Streamable-7026e6ba.js").then(e=>e.S),["assets/Streamable-7026e6ba.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"wistia",name:"Wistia",canPlay:Xt.canPlay.wistia,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Wistia-31eba600.js").then(e=>e.W),["assets/Wistia-31eba600.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"twitch",name:"Twitch",canPlay:Xt.canPlay.twitch,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Twitch-3175924a.js").then(e=>e.T),["assets/Twitch-3175924a.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"dailymotion",name:"DailyMotion",canPlay:Xt.canPlay.dailymotion,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./DailyMotion-7ecfbb97.js").then(e=>e.D),["assets/DailyMotion-7ecfbb97.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"mixcloud",name:"Mixcloud",canPlay:Xt.canPlay.mixcloud,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Mixcloud-c4db35b7.js").then(e=>e.M),["assets/Mixcloud-c4db35b7.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"vidyard",name:"Vidyard",canPlay:Xt.canPlay.vidyard,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Vidyard-29ddb667.js").then(e=>e.V),["assets/Vidyard-29ddb667.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"kaltura",name:"Kaltura",canPlay:Xt.canPlay.kaltura,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Kaltura-26ce6f71.js").then(e=>e.K),["assets/Kaltura-26ce6f71.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))},{key:"file",name:"FilePlayer",canPlay:Xt.canPlay.file,canEnablePIP:e=>Xt.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,nn.supportsWebKitPresentationMode)())&&!Xt.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./FilePlayer-c12ae876.js").then(e=>e.F),["assets/FilePlayer-c12ae876.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]))}],Lg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function ZX(e,t){return!!(e===t||Lg(e)&&Lg(t))}function JX(e,t){if(e.length!==t.length)return!1;for(var n=0;n{for(var n in t)zu(e,n,{get:t[n],enumerable:!0})},gw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of lZ(t))!cZ.call(e,i)&&i!==n&&zu(e,i,{get:()=>t[i],enumerable:!(r=sZ(t,i))||r.enumerable});return e},dZ=(e,t,n)=>(n=e!=null?oZ(uZ(e)):{},gw(t||!e||!e.__esModule?zu(n,"default",{value:e,enumerable:!0}):n,e)),hZ=e=>gw(zu({},"__esModule",{value:!0}),e),vw={};fZ(vw,{defaultProps:()=>yZ,propTypes:()=>mZ});var xw=hZ(vw),pZ=dZ(T4);const{string:Ut,bool:Wt,number:xi,array:af,oneOfType:$a,shape:pn,object:Yt,func:wt,node:Ng}=pZ.default,mZ={url:$a([Ut,af,Yt]),playing:Wt,loop:Wt,controls:Wt,volume:xi,muted:Wt,playbackRate:xi,width:$a([Ut,xi]),height:$a([Ut,xi]),style:Yt,progressInterval:xi,playsinline:Wt,pip:Wt,stopOnUnmount:Wt,light:$a([Wt,Ut,Yt]),playIcon:Ng,previewTabIndex:xi,fallback:Ng,oEmbedUrl:Ut,wrapper:$a([Ut,wt,pn({render:wt.isRequired})]),config:pn({soundcloud:pn({options:Yt}),youtube:pn({playerVars:Yt,embedOptions:Yt,onUnstarted:wt}),facebook:pn({appId:Ut,version:Ut,playerId:Ut,attributes:Yt}),dailymotion:pn({params:Yt}),vimeo:pn({playerOptions:Yt,title:Ut}),file:pn({attributes:Yt,tracks:af,forceVideo:Wt,forceAudio:Wt,forceHLS:Wt,forceSafariHLS:Wt,forceDisableHls:Wt,forceDASH:Wt,forceFLV:Wt,hlsOptions:Yt,hlsVersion:Ut,dashVersion:Ut,flvVersion:Ut}),wistia:pn({options:Yt,playerId:Ut,customControls:af}),mixcloud:pn({options:Yt}),twitch:pn({options:Yt,playerId:Ut}),vidyard:pn({options:Yt})}),onReady:wt,onStart:wt,onPlay:wt,onPause:wt,onBuffer:wt,onBufferEnd:wt,onEnded:wt,onError:wt,onDuration:wt,onSeek:wt,onPlaybackRateChange:wt,onPlaybackQualityChange:wt,onProgress:wt,onClickPreview:wt,onEnablePIP:wt,onDisablePIP:wt},Mt=()=>{},yZ={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:Mt},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:Mt,onStart:Mt,onPlay:Mt,onPause:Mt,onBuffer:Mt,onBufferEnd:Mt,onEnded:Mt,onError:Mt,onDuration:Mt,onSeek:Mt,onPlaybackRateChange:Mt,onPlaybackQualityChange:Mt,onProgress:Mt,onClickPreview:Mt,onEnablePIP:Mt,onDisablePIP:Mt};var gZ=Object.create,es=Object.defineProperty,vZ=Object.getOwnPropertyDescriptor,xZ=Object.getOwnPropertyNames,bZ=Object.getPrototypeOf,wZ=Object.prototype.hasOwnProperty,SZ=(e,t,n)=>t in e?es(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_Z=(e,t)=>{for(var n in t)es(e,n,{get:t[n],enumerable:!0})},bw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of xZ(t))!wZ.call(e,i)&&i!==n&&es(e,i,{get:()=>t[i],enumerable:!(r=vZ(t,i))||r.enumerable});return e},ww=(e,t,n)=>(n=e!=null?gZ(bZ(e)):{},bw(t||!e||!e.__esModule?es(n,"default",{value:e,enumerable:!0}):n,e)),OZ=e=>bw(es({},"__esModule",{value:!0}),e),vt=(e,t,n)=>(SZ(e,typeof t!="symbol"?t+"":t,n),n),Sw={};_Z(Sw,{default:()=>Fu});var kZ=OZ(Sw),Rg=ww(B),CZ=ww(yw),_w=xw,PZ=Bu;const AZ=5e3;class Fu extends Rg.Component{constructor(){super(...arguments),vt(this,"mounted",!1),vt(this,"isReady",!1),vt(this,"isPlaying",!1),vt(this,"isLoading",!0),vt(this,"loadOnReady",null),vt(this,"startOnPlay",!0),vt(this,"seekOnPlay",null),vt(this,"onDurationCalled",!1),vt(this,"handlePlayerMount",t=>{if(this.player){this.progress();return}this.player=t,this.player.load(this.props.url),this.progress()}),vt(this,"getInternalPlayer",t=>this.player?this.player[t]:null),vt(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const t=this.getCurrentTime()||0,n=this.getSecondsLoaded(),r=this.getDuration();if(r){const i={playedSeconds:t,played:t/r};n!==null&&(i.loadedSeconds=n,i.loaded=n/r),(i.playedSeconds!==this.prevPlayed||i.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(i),this.prevPlayed=i.playedSeconds,this.prevLoaded=i.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),vt(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:t,playing:n,volume:r,muted:i}=this.props;t(),!i&&r!==null&&this.player.setVolume(r),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):n&&this.player.play(),this.handleDurationCheck()}),vt(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:t,onPlay:n,playbackRate:r}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&r!==1&&this.player.setPlaybackRate(r),t(),this.startOnPlay=!1),n(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),vt(this,"handlePause",t=>{this.isPlaying=!1,this.isLoading||this.props.onPause(t)}),vt(this,"handleEnded",()=>{const{activePlayer:t,loop:n,onEnded:r}=this.props;t.loopOnEnded&&n&&this.seekTo(0),n||(this.isPlaying=!1,r())}),vt(this,"handleError",(...t)=>{this.isLoading=!1,this.props.onError(...t)}),vt(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);const t=this.getDuration();t?this.onDurationCalled||(this.props.onDuration(t),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),vt(this,"handleLoaded",()=>{this.isLoading=!1})}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(t){if(!this.player)return;const{url:n,playing:r,volume:i,muted:a,playbackRate:o,pip:s,loop:l,activePlayer:u,disableDeferredLoading:f}=this.props;if(!(0,CZ.default)(t.url,n)){if(this.isLoading&&!u.forceLoad&&!f&&!(0,PZ.isMediaStream)(n)){console.warn(`ReactPlayer: the attempt to load ${n} is being deferred until the player has loaded`),this.loadOnReady=n;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(n,this.isReady)}!t.playing&&r&&!this.isPlaying&&this.player.play(),t.playing&&!r&&this.isPlaying&&this.player.pause(),!t.pip&&s&&this.player.enablePIP&&this.player.enablePIP(),t.pip&&!s&&this.player.disablePIP&&this.player.disablePIP(),t.volume!==i&&i!==null&&this.player.setVolume(i),t.muted!==a&&(a?this.player.mute():(this.player.unmute(),i!==null&&setTimeout(()=>this.player.setVolume(i)))),t.playbackRate!==o&&this.player.setPlaybackRate&&this.player.setPlaybackRate(o),t.loop!==l&&this.player.setLoop&&this.player.setLoop(l)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(t,n,r){if(!this.isReady){t!==0&&(this.seekOnPlay=t,setTimeout(()=>{this.seekOnPlay=null},AZ));return}if(n?n==="fraction":t>0&&t<1){const a=this.player.getDuration();if(!a){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(a*t,r);return}this.player.seekTo(t,r)}render(){const t=this.props.activePlayer;return t?Rg.default.createElement(t,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}vt(Fu,"displayName","Player");vt(Fu,"propTypes",_w.propTypes);vt(Fu,"defaultProps",_w.defaultProps);var jZ=Object.create,ts=Object.defineProperty,TZ=Object.getOwnPropertyDescriptor,EZ=Object.getOwnPropertyNames,MZ=Object.getPrototypeOf,$Z=Object.prototype.hasOwnProperty,IZ=(e,t,n)=>t in e?ts(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DZ=(e,t)=>{for(var n in t)ts(e,n,{get:t[n],enumerable:!0})},Ow=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of EZ(t))!$Z.call(e,i)&&i!==n&&ts(e,i,{get:()=>t[i],enumerable:!(r=TZ(t,i))||r.enumerable});return e},ns=(e,t,n)=>(n=e!=null?jZ(MZ(e)):{},Ow(t||!e||!e.__esModule?ts(n,"default",{value:e,enumerable:!0}):n,e)),LZ=e=>Ow(ts({},"__esModule",{value:!0}),e),gt=(e,t,n)=>(IZ(e,typeof t!="symbol"?t+"":t,n),n),kw={};DZ(kw,{createReactPlayer:()=>YZ});var NZ=LZ(kw),wi=ns(B),RZ=ns(X2),of=ns(tZ),Bg=ns(yw),Ra=xw,Cw=Bu,BZ=ns(kZ);const zZ=(0,Cw.lazy)(()=>rn(()=>import("./Preview-c7b8bcf5.js").then(e=>e.P),["assets/Preview-c7b8bcf5.js","assets/index-a0989d63.js","assets/index-a2878e02.css"])),FZ=typeof window<"u"&&window.document,HZ=typeof Bt<"u"&&Bt.window&&Bt.window.document,UZ=Object.keys(Ra.propTypes),WZ=FZ||HZ?wi.Suspense:()=>null,Ia=[],YZ=(e,t)=>{var n;return n=class extends wi.Component{constructor(){super(...arguments),gt(this,"state",{showPreview:!!this.props.light}),gt(this,"references",{wrapper:r=>{this.wrapper=r},player:r=>{this.player=r}}),gt(this,"handleClickPreview",r=>{this.setState({showPreview:!1}),this.props.onClickPreview(r)}),gt(this,"showPreview",()=>{this.setState({showPreview:!0})}),gt(this,"getDuration",()=>this.player?this.player.getDuration():null),gt(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),gt(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),gt(this,"getInternalPlayer",(r="player")=>this.player?this.player.getInternalPlayer(r):null),gt(this,"seekTo",(r,i,a)=>{if(!this.player)return null;this.player.seekTo(r,i,a)}),gt(this,"handleReady",()=>{this.props.onReady(this)}),gt(this,"getActivePlayer",(0,of.default)(r=>{for(const i of[...Ia,...e])if(i.canPlay(r))return i;return t||null})),gt(this,"getConfig",(0,of.default)((r,i)=>{const{config:a}=this.props;return RZ.default.all([Ra.defaultProps.config,Ra.defaultProps.config[i]||{},a,a[i]||{}])})),gt(this,"getAttributes",(0,of.default)(r=>(0,Cw.omit)(this.props,UZ))),gt(this,"renderActivePlayer",r=>{if(!r)return null;const i=this.getActivePlayer(r);if(!i)return null;const a=this.getConfig(r,i.key);return wi.default.createElement(BZ.default,{...this.props,key:i.key,ref:this.references.player,config:a,activePlayer:i.lazyPlayer||i,onReady:this.handleReady})})}shouldComponentUpdate(r,i){return!(0,Bg.default)(this.props,r)||!(0,Bg.default)(this.state,i)}componentDidUpdate(r){const{light:i}=this.props;!r.light&&i&&this.setState({showPreview:!0}),r.light&&!i&&this.setState({showPreview:!1})}renderPreview(r){if(!r)return null;const{light:i,playIcon:a,previewTabIndex:o,oEmbedUrl:s}=this.props;return wi.default.createElement(zZ,{url:r,light:i,playIcon:a,previewTabIndex:o,oEmbedUrl:s,onClick:this.handleClickPreview})}render(){const{url:r,style:i,width:a,height:o,fallback:s,wrapper:l}=this.props,{showPreview:u}=this.state,f=this.getAttributes(r),d=typeof l=="string"?this.references.wrapper:void 0;return wi.default.createElement(l,{ref:d,style:{...i,width:a,height:o},...f},wi.default.createElement(WZ,{fallback:s},u?this.renderPreview(r):this.renderActivePlayer(r)))}},gt(n,"displayName","ReactPlayer"),gt(n,"propTypes",Ra.propTypes),gt(n,"defaultProps",Ra.defaultProps),gt(n,"addCustomPlayer",r=>{Ia.push(r)}),gt(n,"removeCustomPlayers",()=>{Ia.length=0}),gt(n,"canPlay",r=>{for(const i of[...Ia,...e])if(i.canPlay(r))return!0;return!1}),gt(n,"canEnablePIP",r=>{for(const i of[...Ia,...e])if(i.canEnablePIP&&i.canEnablePIP(r))return!0;return!1}),n};var VZ=Object.create,Hu=Object.defineProperty,GZ=Object.getOwnPropertyDescriptor,qZ=Object.getOwnPropertyNames,KZ=Object.getPrototypeOf,XZ=Object.prototype.hasOwnProperty,ZZ=(e,t)=>{for(var n in t)Hu(e,n,{get:t[n],enumerable:!0})},Pw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qZ(t))!XZ.call(e,i)&&i!==n&&Hu(e,i,{get:()=>t[i],enumerable:!(r=GZ(t,i))||r.enumerable});return e},JZ=(e,t,n)=>(n=e!=null?VZ(KZ(e)):{},Pw(t||!e||!e.__esModule?Hu(n,"default",{value:e,enumerable:!0}):n,e)),QZ=e=>Pw(Hu({},"__esModule",{value:!0}),e),Aw={};ZZ(Aw,{default:()=>rJ});var eJ=QZ(Aw),$d=JZ(KX),tJ=NZ;const nJ=$d.default[$d.default.length-1];var rJ=(0,tJ.createReactPlayer)($d.default,nJ);const iJ=st(eJ),aJ=e=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",children:[y.jsx("mask",{id:"mask0_4160_9271",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_4160_9271)",children:y.jsx("path",{d:"M11 25V21H7V19H13V25H11ZM19 25V19H25V21H21V25H19ZM7 13V11H11V7H13V13H7ZM19 13V7H21V11H25V13H19Z",fill:"currentColor"})})]}),oJ=e=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 22 22",fill:"currentColor",children:[y.jsx("mask",{id:"mask0_3130_18463",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"22",height:"22",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_3130_18463)",children:y.jsx("path",{d:"M4.58301 17.4166V12.8333H5.95798V16.0416H9.16634V17.4166H4.58301ZM4.58301 9.16658V4.58325H9.16634V5.95823H5.95798V9.16658H4.58301ZM12.833 17.4166V16.0416H16.0414V12.8333H17.4163V17.4166H12.833ZM16.0414 9.16658V5.95823H12.833V4.58325H17.4163V9.16658H16.0414Z",fill:"currentColor"})})]}),sJ=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"volume_up",children:[y.jsx("mask",{id:"mask0_1483_75386",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1483_75386)",children:y.jsx("path",{id:"volume_up_2",d:"M14.0384 20.1095V18.5595C15.4807 18.1005 16.6425 17.2672 17.5239 16.0595C18.4053 14.8518 18.8461 13.4903 18.8461 11.9749C18.8461 10.4595 18.4053 9.09799 17.5239 7.89031C16.6425 6.68261 15.4807 5.84927 14.0384 5.39031V3.84033C15.8999 4.33905 17.4165 5.33841 18.5883 6.83841C19.7601 8.33839 20.346 10.0506 20.346 11.9749C20.346 13.8993 19.7601 15.6114 18.5883 17.1114C17.4165 18.6114 15.8999 19.6108 14.0384 20.1095ZM3.65381 14.4999V9.49993H7.36531L11.6537 5.21153V18.7883L7.36531 14.4999H3.65381ZM14.0384 15.6537V8.29608C14.7127 8.66275 15.2339 9.17909 15.6018 9.84511C15.9698 10.5111 16.1537 11.2294 16.1537 11.9999C16.1537 12.7602 15.9682 13.4675 15.597 14.122C15.2259 14.7765 14.7063 15.2871 14.0384 15.6537Z",fill:"currentColor"})})]})}),lJ=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"volume_mute",children:[y.jsx("mask",{id:"mask0_1483_75386",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsxs("g",{mask:"url(#mask0_1483_75386)",children:[y.jsx("path",{id:"volume_up_2",d:"M14.0384 20.1095V18.5595C15.4807 18.1005 16.6425 17.2672 17.5239 16.0595C18.4053 14.8518 18.8461 13.4903 18.8461 11.9749C18.8461 10.4595 18.4053 9.09799 17.5239 7.89031C16.6425 6.68261 15.4807 5.84927 14.0384 5.39031V3.84033C15.8999 4.33905 17.4165 5.33841 18.5883 6.83841C19.7601 8.33839 20.346 10.0506 20.346 11.9749C20.346 13.8993 19.7601 15.6114 18.5883 17.1114C17.4165 18.6114 15.8999 19.6108 14.0384 20.1095ZM3.65381 14.4999V9.49993H7.36531L11.6537 5.21153V18.7883L7.36531 14.4999H3.65381ZM14.0384 15.6537V8.29608C14.7127 8.66275 15.2339 9.17909 15.6018 9.84511C15.9698 10.5111 16.1537 11.2294 16.1537 11.9999C16.1537 12.7602 15.9682 13.4675 15.597 14.122C15.2259 14.7765 14.7063 15.2871 14.0384 15.6537Z",fill:"currentColor"}),y.jsx("path",{id:"mute_line",d:"M6 21L21 4",stroke:"#808080","stroke-width":"2","stroke-linecap":"round"})]})]})}),zg=e=>{const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60),i=t>0?`${t}:`:"",a=t>0?n.toString().padStart(2,"0"):n.toString(),o=r.toString().padStart(2,"0");return`${i}${a}:${o}`},uJ=({isPlaying:e,isFullScreen:t,setIsPlaying:n,playingTime:r,duration:i,handleProgressChange:a,handleVolumeChange:o,onFullScreenClick:s,showToolbar:l})=>{const[u,f]=B.useState(.5),[d,h]=B.useState(!1),[m,g]=B.useState(.5),v=(O,C)=>{const k=Array.isArray(C)?C[0]:C;f(k),o(O,k),d&&h(!1)},b=()=>{d?(f(m),o(new Event("input"),m)):(g(u),f(0),o(new Event("input"),0)),h(!d)};return y.jsxs(F,{children:[(!l||t)&&y.jsx(yJ,{"aria-label":"Small","data-testid":"progress-bar",isFullScreen:t,max:i,onChange:a,size:"small",value:r}),y.jsxs(cJ,{align:"center",direction:"row",showToolbar:l||t,children:[y.jsx(hJ,{onClick:n,size:"small",children:e?y.jsx(Yl,{}):y.jsx(Bd,{})}),y.jsxs(gJ,{direction:"row",children:[y.jsx("span",{children:zg(r)}),y.jsx("span",{className:"separator",children:"/"}),y.jsx("span",{className:"duration",children:zg(i)})]}),y.jsxs(pJ,{direction:"row",px:9,children:[y.jsx(ql,{className:"volume-slider",max:1,min:0,onChange:v,size:"small",step:.1,value:u}),y.jsx(fJ,{onClick:b,children:d?y.jsx(dJ,{children:y.jsx(lJ,{})}):y.jsx(sJ,{})})]}),y.jsx(mJ,{"data-testid":"fullscreen-button",onClick:s,children:t?y.jsx(aJ,{}):y.jsx(oJ,{})})]})]})},cJ=H(F)` +`,YK=()=>{const e=qt(),{setPlayingNode:t}=Vl(n=>n);switch(B.useEffect(()=>{var r,i;if(!e)return;(e.media_url||e.link||((r=e.properties)==null?void 0:r.link)||((i=e.properties)==null?void 0:i.media_url))&&t(e)},[t,e]),e==null?void 0:e.node_type){case"guest":case"person":return y.jsx(fK,{});case"data_series":return y.jsx(lq,{});case"tribe_message":return y.jsx(sK,{});case"Tweet":return y.jsx(wK,{});case"topic":return y.jsx(bK,{});case"show":return y.jsx(xK,{});case"video":case"podcast":case"clip":case"twitter_space":return y.jsx(q2,{});case"document":return y.jsx(BK,{});case"episode":return y.jsx(nK,{},e.ref_id);case"image":return y.jsx(oK,{});default:return y.jsx(AK,{})}},VK=B.memo(YK);var GK=function(t,n,r){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");typeof n=="function"&&(r=n,n={}),n=n||{},r=r||function(){},a.type=n.type||"text/javascript",a.charset=n.charset||"utf8",a.async="async"in n?!!n.async:!0,a.src=t,n.attrs&&qK(a,n.attrs),n.text&&(a.text=""+n.text);var o="onload"in a?$g:KK;o(a,r),a.onload||$g(a,r),i.appendChild(a)};function qK(e,t){for(var n in t)e.setAttribute(n,t[n])}function $g(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function KK(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}var XK=function(t){return ZK(t)&&!JK(t)};function ZK(e){return!!e&&typeof e=="object"}function JK(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||tX(e)}var QK=typeof Symbol=="function"&&Symbol.for,eX=QK?Symbol.for("react.element"):60103;function tX(e){return e.$$typeof===eX}function nX(e){return Array.isArray(e)?[]:{}}function Lo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ji(nX(e),e,t):e}function rX(e,t,n){return e.concat(t).map(function(r){return Lo(r,n)})}function iX(e,t){if(!t.customMerge)return Ji;var n=t.customMerge(e);return typeof n=="function"?n:Ji}function aX(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Ig(e){return Object.keys(e).concat(aX(e))}function K2(e,t){try{return t in e}catch{return!1}}function oX(e,t){return K2(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function sX(e,t,n){var r={};return n.isMergeableObject(e)&&Ig(e).forEach(function(i){r[i]=Lo(e[i],n)}),Ig(t).forEach(function(i){oX(e,i)||(K2(e,i)&&n.isMergeableObject(t[i])?r[i]=iX(i,n)(e[i],t[i],n):r[i]=Lo(t[i],n))}),r}function Ji(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||rX,n.isMergeableObject=n.isMergeableObject||XK,n.cloneUnlessOtherwiseSpecified=Lo;var r=Array.isArray(t),i=Array.isArray(e),a=r===i;return a?r?n.arrayMerge(e,t,n):sX(e,t,n):Lo(t,n)}Ji.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Ji(r,i,n)},{})};var lX=Ji,X2=lX,uX=Object.create,Ru=Object.defineProperty,cX=Object.getOwnPropertyDescriptor,fX=Object.getOwnPropertyNames,dX=Object.getPrototypeOf,hX=Object.prototype.hasOwnProperty,pX=(e,t)=>{for(var n in t)Ru(e,n,{get:t[n],enumerable:!0})},Z2=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fX(t))!hX.call(e,i)&&i!==n&&Ru(e,i,{get:()=>t[i],enumerable:!(r=cX(t,i))||r.enumerable});return e},sp=(e,t,n)=>(n=e!=null?uX(dX(e)):{},Z2(t||!e||!e.__esModule?Ru(n,"default",{value:e,enumerable:!0}):n,e)),mX=e=>Z2(Ru({},"__esModule",{value:!0}),e),J2={};pX(J2,{callPlayer:()=>EX,getConfig:()=>jX,getSDK:()=>AX,isBlobUrl:()=>$X,isMediaStream:()=>MX,lazy:()=>xX,omit:()=>TX,parseEndTime:()=>kX,parseStartTime:()=>OX,queryString:()=>PX,randomString:()=>CX,supportsWebKitPresentationMode:()=>IX});var Bu=mX(J2),yX=sp(B),gX=sp(GK),vX=sp(X2);const xX=e=>yX.default.lazy(async()=>{const t=await e();return typeof t.default=="function"?t:t.default}),bX=/[?&#](?:start|t)=([0-9hms]+)/,wX=/[?&#]end=([0-9hms]+)/,Td=/(\d+)(h|m|s)/g,SX=/^\d+$/;function Q2(e,t){if(e instanceof Array)return;const n=e.match(t);if(n){const r=n[1];if(r.match(Td))return _X(r);if(SX.test(r))return parseInt(r)}}function _X(e){let t=0,n=Td.exec(e);for(;n!==null;){const[,r,i]=n;i==="h"&&(t+=parseInt(r,10)*60*60),i==="m"&&(t+=parseInt(r,10)*60),i==="s"&&(t+=parseInt(r,10)),n=Td.exec(e)}return t}function OX(e){return Q2(e,bX)}function kX(e){return Q2(e,wX)}function CX(){return Math.random().toString(36).substr(2,5)}function PX(e){return Object.keys(e).map(t=>`${t}=${e[t]}`).join("&")}function rf(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}const vi={},AX=function(t,n,r=null,i=()=>!0,a=gX.default){const o=rf(n);return o&&i(o)?Promise.resolve(o):new Promise((s,l)=>{if(vi[t]){vi[t].push({resolve:s,reject:l});return}vi[t]=[{resolve:s,reject:l}];const u=f=>{vi[t].forEach(d=>d.resolve(f))};if(r){const f=window[r];window[r]=function(){f&&f(),u(rf(n))}}a(t,f=>{f?(vi[t].forEach(d=>d.reject(f)),vi[t]=null):r||u(rf(n))})})};function jX(e,t){return(0,vX.default)(t.config,e.config)}function TX(e,...t){const n=[].concat(...t),r={},i=Object.keys(e);for(const a of i)n.indexOf(a)===-1&&(r[a]=e[a]);return r}function EX(e,...t){if(!this.player||!this.player[e]){let n=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c – `;return this.player?this.player[e]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}return this.player[e](...t)}function MX(e){return typeof window<"u"&&typeof window.MediaStream<"u"&&e instanceof window.MediaStream}function $X(e){return/^blob:/.test(e)}function IX(e=document.createElement("video")){const t=/iPhone|iPod/.test(navigator.userAgent)===!1;return e.webkitSupportsPresentationMode&&typeof e.webkitSetPresentationMode=="function"&&t}var lp=Object.defineProperty,DX=Object.getOwnPropertyDescriptor,LX=Object.getOwnPropertyNames,NX=Object.prototype.hasOwnProperty,RX=(e,t)=>{for(var n in t)lp(e,n,{get:t[n],enumerable:!0})},BX=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of LX(t))!NX.call(e,i)&&i!==n&&lp(e,i,{get:()=>t[i],enumerable:!(r=DX(t,i))||r.enumerable});return e},zX=e=>BX(lp({},"__esModule",{value:!0}),e),ew={};RX(ew,{AUDIO_EXTENSIONS:()=>up,DASH_EXTENSIONS:()=>hw,FLV_EXTENSIONS:()=>pw,HLS_EXTENSIONS:()=>fp,MATCH_URL_DAILYMOTION:()=>uw,MATCH_URL_FACEBOOK:()=>rw,MATCH_URL_FACEBOOK_WATCH:()=>iw,MATCH_URL_KALTURA:()=>dw,MATCH_URL_MIXCLOUD:()=>cw,MATCH_URL_SOUNDCLOUD:()=>tw,MATCH_URL_STREAMABLE:()=>aw,MATCH_URL_TWITCH_CHANNEL:()=>lw,MATCH_URL_TWITCH_VIDEO:()=>sw,MATCH_URL_VIDYARD:()=>fw,MATCH_URL_VIMEO:()=>nw,MATCH_URL_WISTIA:()=>ow,MATCH_URL_YOUTUBE:()=>Ed,VIDEO_EXTENSIONS:()=>cp,canPlay:()=>HX});var FX=zX(ew),Dg=Bu;const Ed=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,tw=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,nw=/vimeo\.com\/(?!progressive_redirect).+/,rw=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,iw=/^https?:\/\/fb\.watch\/.+$/,aw=/streamable\.com\/([a-z0-9]+)$/,ow=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,sw=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,lw=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,uw=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,cw=/mixcloud\.com\/([^/]+\/[^/]+)/,fw=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,dw=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/,up=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,cp=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,fp=/\.(m3u8)($|\?)/i,hw=/\.(mpd)($|\?)/i,pw=/\.(flv)($|\?)/i,Md=e=>{if(e instanceof Array){for(const t of e)if(typeof t=="string"&&Md(t)||Md(t.src))return!0;return!1}return(0,Dg.isMediaStream)(e)||(0,Dg.isBlobUrl)(e)?!0:up.test(e)||cp.test(e)||fp.test(e)||hw.test(e)||pw.test(e)},HX={youtube:e=>e instanceof Array?e.every(t=>Ed.test(t)):Ed.test(e),soundcloud:e=>tw.test(e)&&!up.test(e),vimeo:e=>nw.test(e)&&!cp.test(e)&&!fp.test(e),facebook:e=>rw.test(e)||iw.test(e),streamable:e=>aw.test(e),wistia:e=>ow.test(e),twitch:e=>sw.test(e)||lw.test(e),dailymotion:e=>uw.test(e),mixcloud:e=>cw.test(e),vidyard:e=>fw.test(e),kaltura:e=>dw.test(e),file:Md};var dp=Object.defineProperty,UX=Object.getOwnPropertyDescriptor,WX=Object.getOwnPropertyNames,YX=Object.prototype.hasOwnProperty,VX=(e,t)=>{for(var n in t)dp(e,n,{get:t[n],enumerable:!0})},GX=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of WX(t))!YX.call(e,i)&&i!==n&&dp(e,i,{get:()=>t[i],enumerable:!(r=UX(t,i))||r.enumerable});return e},qX=e=>GX(dp({},"__esModule",{value:!0}),e),mw={};VX(mw,{default:()=>XX});var KX=qX(mw),nn=Bu,Xt=FX,XX=[{key:"youtube",name:"YouTube",canPlay:Xt.canPlay.youtube,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./YouTube-ac97eec6.js").then(e=>e.Y),["assets/YouTube-ac97eec6.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"soundcloud",name:"SoundCloud",canPlay:Xt.canPlay.soundcloud,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./SoundCloud-ff97527a.js").then(e=>e.S),["assets/SoundCloud-ff97527a.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"vimeo",name:"Vimeo",canPlay:Xt.canPlay.vimeo,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Vimeo-8dbee3d5.js").then(e=>e.V),["assets/Vimeo-8dbee3d5.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"facebook",name:"Facebook",canPlay:Xt.canPlay.facebook,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Facebook-9cbfb8fd.js").then(e=>e.F),["assets/Facebook-9cbfb8fd.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"streamable",name:"Streamable",canPlay:Xt.canPlay.streamable,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Streamable-32ea3232.js").then(e=>e.S),["assets/Streamable-32ea3232.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"wistia",name:"Wistia",canPlay:Xt.canPlay.wistia,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Wistia-f188f8bf.js").then(e=>e.W),["assets/Wistia-f188f8bf.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"twitch",name:"Twitch",canPlay:Xt.canPlay.twitch,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Twitch-6251f902.js").then(e=>e.T),["assets/Twitch-6251f902.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"dailymotion",name:"DailyMotion",canPlay:Xt.canPlay.dailymotion,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./DailyMotion-e3c418c3.js").then(e=>e.D),["assets/DailyMotion-e3c418c3.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"mixcloud",name:"Mixcloud",canPlay:Xt.canPlay.mixcloud,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Mixcloud-0967013d.js").then(e=>e.M),["assets/Mixcloud-0967013d.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"vidyard",name:"Vidyard",canPlay:Xt.canPlay.vidyard,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Vidyard-0a8b7e37.js").then(e=>e.V),["assets/Vidyard-0a8b7e37.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"kaltura",name:"Kaltura",canPlay:Xt.canPlay.kaltura,lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./Kaltura-f1b9cba8.js").then(e=>e.K),["assets/Kaltura-f1b9cba8.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))},{key:"file",name:"FilePlayer",canPlay:Xt.canPlay.file,canEnablePIP:e=>Xt.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,nn.supportsWebKitPresentationMode)())&&!Xt.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,nn.lazy)(()=>rn(()=>import("./FilePlayer-8f1b5c8c.js").then(e=>e.F),["assets/FilePlayer-8f1b5c8c.js","assets/index-022521cf.js","assets/index-a2878e02.css"]))}],Lg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function ZX(e,t){return!!(e===t||Lg(e)&&Lg(t))}function JX(e,t){if(e.length!==t.length)return!1;for(var n=0;n{for(var n in t)zu(e,n,{get:t[n],enumerable:!0})},gw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of lZ(t))!cZ.call(e,i)&&i!==n&&zu(e,i,{get:()=>t[i],enumerable:!(r=sZ(t,i))||r.enumerable});return e},dZ=(e,t,n)=>(n=e!=null?oZ(uZ(e)):{},gw(t||!e||!e.__esModule?zu(n,"default",{value:e,enumerable:!0}):n,e)),hZ=e=>gw(zu({},"__esModule",{value:!0}),e),vw={};fZ(vw,{defaultProps:()=>yZ,propTypes:()=>mZ});var xw=hZ(vw),pZ=dZ(T4);const{string:Ut,bool:Wt,number:xi,array:af,oneOfType:$a,shape:pn,object:Yt,func:wt,node:Ng}=pZ.default,mZ={url:$a([Ut,af,Yt]),playing:Wt,loop:Wt,controls:Wt,volume:xi,muted:Wt,playbackRate:xi,width:$a([Ut,xi]),height:$a([Ut,xi]),style:Yt,progressInterval:xi,playsinline:Wt,pip:Wt,stopOnUnmount:Wt,light:$a([Wt,Ut,Yt]),playIcon:Ng,previewTabIndex:xi,fallback:Ng,oEmbedUrl:Ut,wrapper:$a([Ut,wt,pn({render:wt.isRequired})]),config:pn({soundcloud:pn({options:Yt}),youtube:pn({playerVars:Yt,embedOptions:Yt,onUnstarted:wt}),facebook:pn({appId:Ut,version:Ut,playerId:Ut,attributes:Yt}),dailymotion:pn({params:Yt}),vimeo:pn({playerOptions:Yt,title:Ut}),file:pn({attributes:Yt,tracks:af,forceVideo:Wt,forceAudio:Wt,forceHLS:Wt,forceSafariHLS:Wt,forceDisableHls:Wt,forceDASH:Wt,forceFLV:Wt,hlsOptions:Yt,hlsVersion:Ut,dashVersion:Ut,flvVersion:Ut}),wistia:pn({options:Yt,playerId:Ut,customControls:af}),mixcloud:pn({options:Yt}),twitch:pn({options:Yt,playerId:Ut}),vidyard:pn({options:Yt})}),onReady:wt,onStart:wt,onPlay:wt,onPause:wt,onBuffer:wt,onBufferEnd:wt,onEnded:wt,onError:wt,onDuration:wt,onSeek:wt,onPlaybackRateChange:wt,onPlaybackQualityChange:wt,onProgress:wt,onClickPreview:wt,onEnablePIP:wt,onDisablePIP:wt},Mt=()=>{},yZ={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:Mt},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:Mt,onStart:Mt,onPlay:Mt,onPause:Mt,onBuffer:Mt,onBufferEnd:Mt,onEnded:Mt,onError:Mt,onDuration:Mt,onSeek:Mt,onPlaybackRateChange:Mt,onPlaybackQualityChange:Mt,onProgress:Mt,onClickPreview:Mt,onEnablePIP:Mt,onDisablePIP:Mt};var gZ=Object.create,es=Object.defineProperty,vZ=Object.getOwnPropertyDescriptor,xZ=Object.getOwnPropertyNames,bZ=Object.getPrototypeOf,wZ=Object.prototype.hasOwnProperty,SZ=(e,t,n)=>t in e?es(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_Z=(e,t)=>{for(var n in t)es(e,n,{get:t[n],enumerable:!0})},bw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of xZ(t))!wZ.call(e,i)&&i!==n&&es(e,i,{get:()=>t[i],enumerable:!(r=vZ(t,i))||r.enumerable});return e},ww=(e,t,n)=>(n=e!=null?gZ(bZ(e)):{},bw(t||!e||!e.__esModule?es(n,"default",{value:e,enumerable:!0}):n,e)),OZ=e=>bw(es({},"__esModule",{value:!0}),e),vt=(e,t,n)=>(SZ(e,typeof t!="symbol"?t+"":t,n),n),Sw={};_Z(Sw,{default:()=>Fu});var kZ=OZ(Sw),Rg=ww(B),CZ=ww(yw),_w=xw,PZ=Bu;const AZ=5e3;class Fu extends Rg.Component{constructor(){super(...arguments),vt(this,"mounted",!1),vt(this,"isReady",!1),vt(this,"isPlaying",!1),vt(this,"isLoading",!0),vt(this,"loadOnReady",null),vt(this,"startOnPlay",!0),vt(this,"seekOnPlay",null),vt(this,"onDurationCalled",!1),vt(this,"handlePlayerMount",t=>{if(this.player){this.progress();return}this.player=t,this.player.load(this.props.url),this.progress()}),vt(this,"getInternalPlayer",t=>this.player?this.player[t]:null),vt(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const t=this.getCurrentTime()||0,n=this.getSecondsLoaded(),r=this.getDuration();if(r){const i={playedSeconds:t,played:t/r};n!==null&&(i.loadedSeconds=n,i.loaded=n/r),(i.playedSeconds!==this.prevPlayed||i.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(i),this.prevPlayed=i.playedSeconds,this.prevLoaded=i.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),vt(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:t,playing:n,volume:r,muted:i}=this.props;t(),!i&&r!==null&&this.player.setVolume(r),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):n&&this.player.play(),this.handleDurationCheck()}),vt(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:t,onPlay:n,playbackRate:r}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&r!==1&&this.player.setPlaybackRate(r),t(),this.startOnPlay=!1),n(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),vt(this,"handlePause",t=>{this.isPlaying=!1,this.isLoading||this.props.onPause(t)}),vt(this,"handleEnded",()=>{const{activePlayer:t,loop:n,onEnded:r}=this.props;t.loopOnEnded&&n&&this.seekTo(0),n||(this.isPlaying=!1,r())}),vt(this,"handleError",(...t)=>{this.isLoading=!1,this.props.onError(...t)}),vt(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);const t=this.getDuration();t?this.onDurationCalled||(this.props.onDuration(t),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),vt(this,"handleLoaded",()=>{this.isLoading=!1})}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(t){if(!this.player)return;const{url:n,playing:r,volume:i,muted:a,playbackRate:o,pip:s,loop:l,activePlayer:u,disableDeferredLoading:f}=this.props;if(!(0,CZ.default)(t.url,n)){if(this.isLoading&&!u.forceLoad&&!f&&!(0,PZ.isMediaStream)(n)){console.warn(`ReactPlayer: the attempt to load ${n} is being deferred until the player has loaded`),this.loadOnReady=n;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(n,this.isReady)}!t.playing&&r&&!this.isPlaying&&this.player.play(),t.playing&&!r&&this.isPlaying&&this.player.pause(),!t.pip&&s&&this.player.enablePIP&&this.player.enablePIP(),t.pip&&!s&&this.player.disablePIP&&this.player.disablePIP(),t.volume!==i&&i!==null&&this.player.setVolume(i),t.muted!==a&&(a?this.player.mute():(this.player.unmute(),i!==null&&setTimeout(()=>this.player.setVolume(i)))),t.playbackRate!==o&&this.player.setPlaybackRate&&this.player.setPlaybackRate(o),t.loop!==l&&this.player.setLoop&&this.player.setLoop(l)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(t,n,r){if(!this.isReady){t!==0&&(this.seekOnPlay=t,setTimeout(()=>{this.seekOnPlay=null},AZ));return}if(n?n==="fraction":t>0&&t<1){const a=this.player.getDuration();if(!a){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(a*t,r);return}this.player.seekTo(t,r)}render(){const t=this.props.activePlayer;return t?Rg.default.createElement(t,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}vt(Fu,"displayName","Player");vt(Fu,"propTypes",_w.propTypes);vt(Fu,"defaultProps",_w.defaultProps);var jZ=Object.create,ts=Object.defineProperty,TZ=Object.getOwnPropertyDescriptor,EZ=Object.getOwnPropertyNames,MZ=Object.getPrototypeOf,$Z=Object.prototype.hasOwnProperty,IZ=(e,t,n)=>t in e?ts(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DZ=(e,t)=>{for(var n in t)ts(e,n,{get:t[n],enumerable:!0})},Ow=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of EZ(t))!$Z.call(e,i)&&i!==n&&ts(e,i,{get:()=>t[i],enumerable:!(r=TZ(t,i))||r.enumerable});return e},ns=(e,t,n)=>(n=e!=null?jZ(MZ(e)):{},Ow(t||!e||!e.__esModule?ts(n,"default",{value:e,enumerable:!0}):n,e)),LZ=e=>Ow(ts({},"__esModule",{value:!0}),e),gt=(e,t,n)=>(IZ(e,typeof t!="symbol"?t+"":t,n),n),kw={};DZ(kw,{createReactPlayer:()=>YZ});var NZ=LZ(kw),wi=ns(B),RZ=ns(X2),of=ns(tZ),Bg=ns(yw),Ra=xw,Cw=Bu,BZ=ns(kZ);const zZ=(0,Cw.lazy)(()=>rn(()=>import("./Preview-54147fba.js").then(e=>e.P),["assets/Preview-54147fba.js","assets/index-022521cf.js","assets/index-a2878e02.css"])),FZ=typeof window<"u"&&window.document,HZ=typeof Bt<"u"&&Bt.window&&Bt.window.document,UZ=Object.keys(Ra.propTypes),WZ=FZ||HZ?wi.Suspense:()=>null,Ia=[],YZ=(e,t)=>{var n;return n=class extends wi.Component{constructor(){super(...arguments),gt(this,"state",{showPreview:!!this.props.light}),gt(this,"references",{wrapper:r=>{this.wrapper=r},player:r=>{this.player=r}}),gt(this,"handleClickPreview",r=>{this.setState({showPreview:!1}),this.props.onClickPreview(r)}),gt(this,"showPreview",()=>{this.setState({showPreview:!0})}),gt(this,"getDuration",()=>this.player?this.player.getDuration():null),gt(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),gt(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),gt(this,"getInternalPlayer",(r="player")=>this.player?this.player.getInternalPlayer(r):null),gt(this,"seekTo",(r,i,a)=>{if(!this.player)return null;this.player.seekTo(r,i,a)}),gt(this,"handleReady",()=>{this.props.onReady(this)}),gt(this,"getActivePlayer",(0,of.default)(r=>{for(const i of[...Ia,...e])if(i.canPlay(r))return i;return t||null})),gt(this,"getConfig",(0,of.default)((r,i)=>{const{config:a}=this.props;return RZ.default.all([Ra.defaultProps.config,Ra.defaultProps.config[i]||{},a,a[i]||{}])})),gt(this,"getAttributes",(0,of.default)(r=>(0,Cw.omit)(this.props,UZ))),gt(this,"renderActivePlayer",r=>{if(!r)return null;const i=this.getActivePlayer(r);if(!i)return null;const a=this.getConfig(r,i.key);return wi.default.createElement(BZ.default,{...this.props,key:i.key,ref:this.references.player,config:a,activePlayer:i.lazyPlayer||i,onReady:this.handleReady})})}shouldComponentUpdate(r,i){return!(0,Bg.default)(this.props,r)||!(0,Bg.default)(this.state,i)}componentDidUpdate(r){const{light:i}=this.props;!r.light&&i&&this.setState({showPreview:!0}),r.light&&!i&&this.setState({showPreview:!1})}renderPreview(r){if(!r)return null;const{light:i,playIcon:a,previewTabIndex:o,oEmbedUrl:s}=this.props;return wi.default.createElement(zZ,{url:r,light:i,playIcon:a,previewTabIndex:o,oEmbedUrl:s,onClick:this.handleClickPreview})}render(){const{url:r,style:i,width:a,height:o,fallback:s,wrapper:l}=this.props,{showPreview:u}=this.state,f=this.getAttributes(r),d=typeof l=="string"?this.references.wrapper:void 0;return wi.default.createElement(l,{ref:d,style:{...i,width:a,height:o},...f},wi.default.createElement(WZ,{fallback:s},u?this.renderPreview(r):this.renderActivePlayer(r)))}},gt(n,"displayName","ReactPlayer"),gt(n,"propTypes",Ra.propTypes),gt(n,"defaultProps",Ra.defaultProps),gt(n,"addCustomPlayer",r=>{Ia.push(r)}),gt(n,"removeCustomPlayers",()=>{Ia.length=0}),gt(n,"canPlay",r=>{for(const i of[...Ia,...e])if(i.canPlay(r))return!0;return!1}),gt(n,"canEnablePIP",r=>{for(const i of[...Ia,...e])if(i.canEnablePIP&&i.canEnablePIP(r))return!0;return!1}),n};var VZ=Object.create,Hu=Object.defineProperty,GZ=Object.getOwnPropertyDescriptor,qZ=Object.getOwnPropertyNames,KZ=Object.getPrototypeOf,XZ=Object.prototype.hasOwnProperty,ZZ=(e,t)=>{for(var n in t)Hu(e,n,{get:t[n],enumerable:!0})},Pw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qZ(t))!XZ.call(e,i)&&i!==n&&Hu(e,i,{get:()=>t[i],enumerable:!(r=GZ(t,i))||r.enumerable});return e},JZ=(e,t,n)=>(n=e!=null?VZ(KZ(e)):{},Pw(t||!e||!e.__esModule?Hu(n,"default",{value:e,enumerable:!0}):n,e)),QZ=e=>Pw(Hu({},"__esModule",{value:!0}),e),Aw={};ZZ(Aw,{default:()=>rJ});var eJ=QZ(Aw),$d=JZ(KX),tJ=NZ;const nJ=$d.default[$d.default.length-1];var rJ=(0,tJ.createReactPlayer)($d.default,nJ);const iJ=st(eJ),aJ=e=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",children:[y.jsx("mask",{id:"mask0_4160_9271",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_4160_9271)",children:y.jsx("path",{d:"M11 25V21H7V19H13V25H11ZM19 25V19H25V21H21V25H19ZM7 13V11H11V7H13V13H7ZM19 13V7H21V11H25V13H19Z",fill:"currentColor"})})]}),oJ=e=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 22 22",fill:"currentColor",children:[y.jsx("mask",{id:"mask0_3130_18463",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"22",height:"22",children:y.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_3130_18463)",children:y.jsx("path",{d:"M4.58301 17.4166V12.8333H5.95798V16.0416H9.16634V17.4166H4.58301ZM4.58301 9.16658V4.58325H9.16634V5.95823H5.95798V9.16658H4.58301ZM12.833 17.4166V16.0416H16.0414V12.8333H17.4163V17.4166H12.833ZM16.0414 9.16658V5.95823H12.833V4.58325H17.4163V9.16658H16.0414Z",fill:"currentColor"})})]}),sJ=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"volume_up",children:[y.jsx("mask",{id:"mask0_1483_75386",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsx("g",{mask:"url(#mask0_1483_75386)",children:y.jsx("path",{id:"volume_up_2",d:"M14.0384 20.1095V18.5595C15.4807 18.1005 16.6425 17.2672 17.5239 16.0595C18.4053 14.8518 18.8461 13.4903 18.8461 11.9749C18.8461 10.4595 18.4053 9.09799 17.5239 7.89031C16.6425 6.68261 15.4807 5.84927 14.0384 5.39031V3.84033C15.8999 4.33905 17.4165 5.33841 18.5883 6.83841C19.7601 8.33839 20.346 10.0506 20.346 11.9749C20.346 13.8993 19.7601 15.6114 18.5883 17.1114C17.4165 18.6114 15.8999 19.6108 14.0384 20.1095ZM3.65381 14.4999V9.49993H7.36531L11.6537 5.21153V18.7883L7.36531 14.4999H3.65381ZM14.0384 15.6537V8.29608C14.7127 8.66275 15.2339 9.17909 15.6018 9.84511C15.9698 10.5111 16.1537 11.2294 16.1537 11.9999C16.1537 12.7602 15.9682 13.4675 15.597 14.122C15.2259 14.7765 14.7063 15.2871 14.0384 15.6537Z",fill:"currentColor"})})]})}),lJ=e=>y.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:y.jsxs("g",{id:"volume_mute",children:[y.jsx("mask",{id:"mask0_1483_75386",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:y.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),y.jsxs("g",{mask:"url(#mask0_1483_75386)",children:[y.jsx("path",{id:"volume_up_2",d:"M14.0384 20.1095V18.5595C15.4807 18.1005 16.6425 17.2672 17.5239 16.0595C18.4053 14.8518 18.8461 13.4903 18.8461 11.9749C18.8461 10.4595 18.4053 9.09799 17.5239 7.89031C16.6425 6.68261 15.4807 5.84927 14.0384 5.39031V3.84033C15.8999 4.33905 17.4165 5.33841 18.5883 6.83841C19.7601 8.33839 20.346 10.0506 20.346 11.9749C20.346 13.8993 19.7601 15.6114 18.5883 17.1114C17.4165 18.6114 15.8999 19.6108 14.0384 20.1095ZM3.65381 14.4999V9.49993H7.36531L11.6537 5.21153V18.7883L7.36531 14.4999H3.65381ZM14.0384 15.6537V8.29608C14.7127 8.66275 15.2339 9.17909 15.6018 9.84511C15.9698 10.5111 16.1537 11.2294 16.1537 11.9999C16.1537 12.7602 15.9682 13.4675 15.597 14.122C15.2259 14.7765 14.7063 15.2871 14.0384 15.6537Z",fill:"currentColor"}),y.jsx("path",{id:"mute_line",d:"M6 21L21 4",stroke:"#808080","stroke-width":"2","stroke-linecap":"round"})]})]})}),zg=e=>{const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60),i=t>0?`${t}:`:"",a=t>0?n.toString().padStart(2,"0"):n.toString(),o=r.toString().padStart(2,"0");return`${i}${a}:${o}`},uJ=({isPlaying:e,isFullScreen:t,setIsPlaying:n,playingTime:r,duration:i,handleProgressChange:a,handleVolumeChange:o,onFullScreenClick:s,showToolbar:l})=>{const[u,f]=B.useState(.5),[d,h]=B.useState(!1),[m,g]=B.useState(.5),v=(O,C)=>{const k=Array.isArray(C)?C[0]:C;f(k),o(O,k),d&&h(!1)},b=()=>{d?(f(m),o(new Event("input"),m)):(g(u),f(0),o(new Event("input"),0)),h(!d)};return y.jsxs(F,{children:[(!l||t)&&y.jsx(yJ,{"aria-label":"Small","data-testid":"progress-bar",isFullScreen:t,max:i,onChange:a,size:"small",value:r}),y.jsxs(cJ,{align:"center",direction:"row",showToolbar:l||t,children:[y.jsx(hJ,{onClick:n,size:"small",children:e?y.jsx(Yl,{}):y.jsx(Bd,{})}),y.jsxs(gJ,{direction:"row",children:[y.jsx("span",{children:zg(r)}),y.jsx("span",{className:"separator",children:"/"}),y.jsx("span",{className:"duration",children:zg(i)})]}),y.jsxs(pJ,{direction:"row",px:9,children:[y.jsx(ql,{className:"volume-slider",max:1,min:0,onChange:v,size:"small",step:.1,value:u}),y.jsx(fJ,{onClick:b,children:d?y.jsx(dJ,{children:y.jsx(lJ,{})}):y.jsx(sJ,{})})]}),y.jsx(mJ,{"data-testid":"fullscreen-button",onClick:s,children:t?y.jsx(aJ,{}):y.jsx(oJ,{})})]})]})},cJ=H(F)` height: 60px; padding: 12px 16px; ${e=>e.showToolbar&&` diff --git a/build/assets/index-ab9a7dc9.js b/build/assets/index-537391b6.js similarity index 99% rename from build/assets/index-ab9a7dc9.js rename to build/assets/index-537391b6.js index c835d9f2f..21a7911d5 100644 --- a/build/assets/index-ab9a7dc9.js +++ b/build/assets/index-537391b6.js @@ -1,4 +1,4 @@ -import{j as e,O as r,G as B,E as F,B as V,A as _,K as I,J as A,Q as $,T as s,o as l,q as C,F as a}from"./index-a0989d63.js";import{C as U}from"./index-775b6bc6.js";const O=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_25",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_25)",children:e.jsx("path",{d:"M11.25 12.75V16C11.25 16.2125 11.3219 16.3906 11.4657 16.5343C11.6095 16.6781 11.7877 16.75 12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5346 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V12.75H16C16.2125 12.75 16.3906 12.6781 16.5344 12.5343C16.6781 12.3904 16.75 12.2122 16.75 11.9997C16.75 11.7871 16.6781 11.609 16.5344 11.4654C16.3906 11.3218 16.2125 11.25 16 11.25H12.75V7.99998C12.75 7.78748 12.6781 7.60935 12.5343 7.4656C12.3905 7.32187 12.2123 7.25 11.9997 7.25C11.7871 7.25 11.609 7.32187 11.4654 7.4656C11.3218 7.60935 11.25 7.78748 11.25 7.99998V11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H11.25ZM12.0017 21.5C10.6877 21.5 9.45271 21.2506 8.29658 20.752C7.14043 20.2533 6.13475 19.5765 5.27953 18.7217C4.4243 17.8669 3.74724 16.8616 3.24836 15.706C2.74947 14.5504 2.50003 13.3156 2.50003 12.0017C2.50003 10.6877 2.74936 9.45268 3.24803 8.29655C3.7467 7.1404 4.42345 6.13472 5.27828 5.2795C6.13313 4.42427 7.13837 3.74721 8.29401 3.24833C9.44962 2.74944 10.6844 2.5 11.9983 2.5C13.3123 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.1331 20.2528 7.13834 20.7517 8.29398C21.2505 9.44959 21.5 10.6844 21.5 11.9983C21.5 13.3122 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5766 17.8652 18.7217 18.7205C17.8669 19.5757 16.8616 20.2527 15.706 20.7516C14.5504 21.2505 13.3156 21.5 12.0017 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76664 19.225 7.87498 17.675 6.32498C16.125 4.77498 14.2333 3.99998 12 3.99998C9.76667 3.99998 7.87501 4.77498 6.32501 6.32498C4.77501 7.87498 4.00001 9.76664 4.00001 12C4.00001 14.2333 4.77501 16.125 6.32501 17.675C7.87501 19.225 9.76667 20 12 20Z",fill:"currentColor"})})]}),T=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_27",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_27)",children:e.jsx("path",{d:"M5.30773 20.5C4.81061 20.5 4.38506 20.3229 4.03106 19.9689C3.67704 19.6149 3.50003 19.1894 3.50003 18.6923V5.3077C3.50003 4.81058 3.67704 4.38503 4.03106 4.03103C4.38506 3.67701 4.81061 3.5 5.30773 3.5H18.6923C19.1894 3.5 19.615 3.67701 19.969 4.03103C20.323 4.38503 20.5 4.81058 20.5 5.3077V11.6327C20.2538 11.5275 20.0074 11.4384 19.7606 11.3654C19.5138 11.2923 19.2603 11.234 19 11.1904V5.3077C19 5.23077 18.968 5.16024 18.9039 5.09613C18.8397 5.03203 18.7692 4.99998 18.6923 4.99998H5.30773C5.2308 4.99998 5.16027 5.03203 5.09616 5.09613C5.03206 5.16024 5.00001 5.23077 5.00001 5.3077V18.6923C5.00001 18.7692 5.03206 18.8397 5.09616 18.9038C5.16027 18.9679 5.2308 19 5.30773 19H11.1654C11.2026 19.2769 11.2577 19.5387 11.3308 19.7855C11.4038 20.0323 11.4929 20.2705 11.5981 20.5H5.30773ZM5.00001 19V4.99998V11.1904V11.1154V19ZM7.25003 15.8849C7.25003 16.0975 7.32191 16.2756 7.46566 16.4192C7.60939 16.5628 7.78751 16.6346 8.00001 16.6346H11.2673C11.3109 16.3743 11.3757 16.1208 11.4616 15.874C11.5475 15.6272 11.641 15.3808 11.7423 15.1346H8.00001C7.78751 15.1346 7.60939 15.2065 7.46566 15.3503C7.32191 15.4941 7.25003 15.6723 7.25003 15.8849ZM7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H13.5904C14.0212 12.3846 14.4808 12.0785 14.9692 11.8317C15.4577 11.5849 15.9807 11.4096 16.5384 11.3058C16.4259 11.281 16.3009 11.2655 16.1634 11.2593C16.0259 11.2531 15.901 11.25 15.7885 11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003ZM7.25003 8.1157C7.25003 8.3283 7.32191 8.50639 7.46566 8.64998C7.60939 8.79356 7.78751 8.86535 8.00001 8.86535H16C16.2125 8.86535 16.3906 8.79344 16.5344 8.64963C16.6781 8.50583 16.75 8.32763 16.75 8.11503C16.75 7.90244 16.6781 7.72436 16.5344 7.58078C16.3906 7.43718 16.2125 7.36538 16 7.36538H8.00001C7.78751 7.36538 7.60939 7.43728 7.46566 7.5811C7.32191 7.72492 7.25003 7.90312 7.25003 8.1157ZM18 22.5576C16.7513 22.5576 15.6891 22.1198 14.8135 21.2442C13.9378 20.3685 13.5 19.3064 13.5 18.0577C13.5 16.809 13.9378 15.7468 14.8135 14.8712C15.6891 13.9955 16.7513 13.5577 18 13.5577C19.2487 13.5577 20.3109 13.9955 21.1865 14.8712C22.0622 15.7468 22.5 16.809 22.5 18.0577C22.5 19.3064 22.0622 20.3685 21.1865 21.2442C20.3109 22.1198 19.2487 22.5576 18 22.5576ZM17.5577 18.5V20.5577C17.5577 20.6756 17.6019 20.7788 17.6904 20.8673C17.7788 20.9557 17.8821 21 18 21C18.118 21 18.2212 20.9557 18.3096 20.8673C18.3981 20.7788 18.4423 20.6756 18.4423 20.5577V18.5H20.5C20.618 18.5 20.7212 18.4557 20.8096 18.3673C20.8981 18.2788 20.9423 18.1756 20.9423 18.0577C20.9423 17.9397 20.8981 17.8365 20.8096 17.748C20.7212 17.6596 20.618 17.6154 20.5 17.6154H18.4423V15.5577C18.4423 15.4397 18.3981 15.3365 18.3096 15.2481C18.2212 15.1596 18.118 15.1154 18 15.1154C17.8821 15.1154 17.7788 15.1596 17.6904 15.2481C17.6019 15.3365 17.5577 15.4397 17.5577 15.5577V17.6154H15.5C15.3821 17.6154 15.2788 17.6596 15.1904 17.748C15.1019 17.8365 15.0577 17.9397 15.0577 18.0577C15.0577 18.1756 15.1019 18.2788 15.1904 18.3673C15.2788 18.4557 15.3821 18.5 15.5 18.5H17.5577Z",fill:"currentColor"})})]}),G=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 25 22",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8553 2.95196L15.3555 5.30477C15.2095 5.44218 15.1081 5.62031 15.0647 5.81603L14.52 8.26717H7.41204C6.80549 8.26717 6.31378 8.75888 6.31378 9.36543C6.31378 9.97198 6.80549 10.4637 7.41204 10.4637H15.0998C15.1427 10.4637 15.185 10.4612 15.2266 10.4564C15.2442 10.4574 15.2619 10.4578 15.2798 10.4578H18.6054C18.8441 10.4578 19.0749 10.3724 19.2562 10.2171L21.3582 8.41535C21.5744 9.252 21.6894 10.1293 21.6894 11.0336C21.6894 16.7958 17.0182 21.467 11.256 21.467C9.70613 21.467 8.23523 21.1291 6.91291 20.5229L1.57616 21.8571C1.20996 21.9486 0.878268 21.6169 0.969816 21.2508L2.21945 16.2522C1.33102 14.7172 0.82251 12.9347 0.82251 11.0336C0.82251 5.27132 5.49373 0.600098 11.256 0.600098C13.7596 0.600098 16.0573 1.48194 17.8553 2.95196ZM7.41204 12.6603C6.80549 12.6603 6.31378 13.152 6.31378 13.7586C6.31378 14.3651 6.80549 14.8568 7.41204 14.8568H11.8051C12.4116 14.8568 12.9033 14.3651 12.9033 13.7586C12.9033 13.152 12.4116 12.6603 11.8051 12.6603H7.41204ZM22.1006 1.12041L16.3757 6.84529C16.3348 6.88621 16.3066 6.93809 16.2945 6.99468L15.9135 8.77616C15.868 8.98885 16.0569 9.17774 16.2696 9.13226L18.0511 8.75129C18.1077 8.73919 18.1596 8.71098 18.2005 8.67006L23.9254 2.94518C24.0425 2.82803 24.0425 2.63808 23.9254 2.52092L22.5249 1.12041C22.4077 1.00325 22.2178 1.00325 22.1006 1.12041Z",fill:"currentColor"})}),z=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{id:"Menu icons",children:e.jsx("path",{id:"Union","fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.2669 9.02431C16.2669 13.346 12.7635 16.8494 8.44179 16.8494C7.27934 16.8494 6.1761 16.5959 5.18431 16.1412L1.18187 17.1418C0.90723 17.2105 0.658457 16.9617 0.727118 16.6871L1.66434 12.9382C0.998057 11.7869 0.616699 10.4502 0.616699 9.02431C0.616699 4.70263 4.12011 1.19922 8.44179 1.19922C12.7635 1.19922 16.2669 4.70263 16.2669 9.02431ZM4.73511 7.77304C4.73511 7.31812 5.10389 6.94934 5.5588 6.94934H11.3247C11.7796 6.94934 12.1484 7.31812 12.1484 7.77304C12.1484 8.22795 11.7796 8.59673 11.3247 8.59673H5.5588C5.10389 8.59673 4.73511 8.22795 4.73511 7.77304ZM4.73505 11.068C4.73505 10.613 5.10383 10.2443 5.55874 10.2443H8.85352C9.30843 10.2443 9.67721 10.613 9.67721 11.068C9.67721 11.5229 9.30843 11.8917 8.85352 11.8917H5.55874C5.10383 11.8917 4.73505 11.5229 4.73505 11.068Z",fill:"currentColor"})})}),E=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_29",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_29)",children:e.jsx("path",{d:"M13.5096 21.5H10.4808C10.2564 21.5 10.0622 21.4246 9.8981 21.274C9.734 21.1233 9.63528 20.9358 9.60195 20.7115L9.31157 18.4538C9.04362 18.3641 8.76894 18.2384 8.48752 18.0769C8.2061 17.9153 7.9545 17.7422 7.7327 17.5576L5.64425 18.4384C5.43015 18.5217 5.21765 18.5301 5.00675 18.4634C4.79585 18.3967 4.63014 18.2647 4.50962 18.0673L3.00582 15.4481C2.8853 15.2506 2.84845 15.0397 2.89525 14.8154C2.94203 14.591 3.0558 14.4102 3.23657 14.2731L5.04427 12.9058C5.02119 12.757 5.00484 12.6077 4.99522 12.4577C4.9856 12.3077 4.9808 12.1583 4.9808 12.0096C4.9808 11.8673 4.9856 11.7227 4.99522 11.5759C5.00484 11.4291 5.02119 11.2686 5.04427 11.0942L3.23657 9.72688C3.0558 9.58971 2.94203 9.40894 2.89525 9.18458C2.84845 8.96023 2.8853 8.74934 3.00582 8.5519L4.50962 5.95195C4.61989 5.74425 4.78143 5.60963 4.99425 5.5481C5.20706 5.48657 5.42052 5.49747 5.63462 5.5808L7.72307 6.45195C7.9641 6.26092 8.22148 6.08623 8.4952 5.9279C8.76893 5.76955 9.03785 5.6423 9.30195 5.54615L9.60195 3.28848C9.63528 3.06411 9.734 2.87661 9.8981 2.72598C10.0622 2.57533 10.2564 2.5 10.4808 2.5H13.5096C13.7339 2.5 13.9298 2.57533 14.0971 2.72598C14.2644 2.87661 14.3647 3.06411 14.398 3.28848L14.6884 5.55578C14.9884 5.66474 15.2599 5.79198 15.5029 5.9375C15.7458 6.08302 15.991 6.2545 16.2384 6.45195L18.3654 5.5808C18.5795 5.49747 18.7904 5.48753 18.998 5.55098C19.2057 5.61444 19.3699 5.74489 19.4904 5.94233L20.9942 8.5519C21.1147 8.74934 21.1515 8.96023 21.1047 9.18458C21.058 9.40894 20.9442 9.58971 20.7634 9.72688L18.9173 11.123C18.9532 11.2846 18.9727 11.4355 18.9759 11.5759C18.9791 11.7163 18.9807 11.8577 18.9807 12C18.9807 12.1359 18.9775 12.274 18.9711 12.4144C18.9647 12.5548 18.9416 12.7154 18.9019 12.8962L20.7288 14.2731C20.916 14.4038 21.0314 14.583 21.0749 14.8106C21.1185 15.0381 21.0801 15.2506 20.9596 15.4481L19.4557 18.0519C19.3352 18.2493 19.167 18.3823 18.9509 18.4509C18.7349 18.5195 18.5198 18.5121 18.3057 18.4288L16.2384 17.548C15.991 17.7455 15.7384 17.9201 15.4807 18.0721C15.223 18.224 14.9589 18.348 14.6884 18.4442L14.398 20.7115C14.3647 20.9358 14.2644 21.1233 14.0971 21.274C13.9298 21.4246 13.7339 21.5 13.5096 21.5ZM12.0115 15C12.8436 15 13.5516 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.1679 14.7195 10.4599 14.1355 9.87595C13.5516 9.29198 12.8436 9 12.0115 9C11.1692 9 10.4587 9.29198 9.87982 9.87595C9.30099 10.4599 9.01157 11.1679 9.01157 12C9.01157 12.832 9.30099 13.54 9.87982 14.124C10.4587 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})})]}),N=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_26",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_26)",children:e.jsx("path",{d:"M10.0577 18.7499C9.84521 18.7499 9.66708 18.678 9.52333 18.5342C9.3796 18.3904 9.30773 18.2122 9.30773 17.9996C9.30773 17.787 9.3796 17.609 9.52333 17.4654C9.66708 17.3218 9.84521 17.25 10.0577 17.25H19.75C19.9625 17.25 20.1406 17.3219 20.2844 17.4657C20.4281 17.6095 20.5 17.7877 20.5 18.0003C20.5 18.2129 20.4281 18.391 20.2844 18.5346C20.1406 18.6782 19.9625 18.7499 19.75 18.7499H10.0577ZM10.0577 12.7499C9.84521 12.7499 9.66708 12.678 9.52333 12.5342C9.3796 12.3904 9.30773 12.2122 9.30773 11.9996C9.30773 11.787 9.3796 11.609 9.52333 11.4654C9.66708 11.3218 9.84521 11.25 10.0577 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2844 11.4657C20.4281 11.6095 20.5 11.7877 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2844 12.5346C20.1406 12.6782 19.9625 12.7499 19.75 12.7499H10.0577ZM10.0577 6.74995C9.84521 6.74995 9.66708 6.67805 9.52333 6.53425C9.3796 6.39043 9.30773 6.21223 9.30773 5.99965C9.30773 5.78705 9.3796 5.60896 9.52333 5.46537C9.66708 5.32179 9.84521 5.25 10.0577 5.25H19.75C19.9625 5.25 20.1406 5.3219 20.2844 5.4657C20.4281 5.60951 20.5 5.78771 20.5 6.0003C20.5 6.2129 20.4281 6.39099 20.2844 6.53457C20.1406 6.67816 19.9625 6.74995 19.75 6.74995H10.0577ZM5.16348 19.6634C4.70603 19.6634 4.31443 19.5005 3.98868 19.1748C3.66291 18.849 3.50003 18.4574 3.50003 18C3.50003 17.5425 3.66291 17.1509 3.98868 16.8252C4.31443 16.4994 4.70603 16.3365 5.16348 16.3365C5.62093 16.3365 6.01253 16.4994 6.33828 16.8252C6.66403 17.1509 6.82691 17.5425 6.82691 18C6.82691 18.4574 6.66403 18.849 6.33828 19.1748C6.01253 19.5005 5.62093 19.6634 5.16348 19.6634ZM5.16348 13.6634C4.70603 13.6634 4.31443 13.5005 3.98868 13.1748C3.66291 12.849 3.50003 12.4574 3.50003 12C3.50003 11.5425 3.66291 11.1509 3.98868 10.8252C4.31443 10.4994 4.70603 10.3365 5.16348 10.3365C5.62093 10.3365 6.01253 10.4994 6.33828 10.8252C6.66403 11.1509 6.82691 11.5425 6.82691 12C6.82691 12.4574 6.66403 12.849 6.33828 13.1748C6.01253 13.5005 5.62093 13.6634 5.16348 13.6634ZM5.16348 7.6634C4.70603 7.6634 4.31443 7.50052 3.98868 7.17477C3.66291 6.84902 3.50003 6.45742 3.50003 5.99997C3.50003 5.54252 3.66291 5.15092 3.98868 4.82517C4.31443 4.49942 4.70603 4.33655 5.16348 4.33655C5.62093 4.33655 6.01253 4.49942 6.33828 4.82517C6.66403 5.15092 6.82691 5.54252 6.82691 5.99997C6.82691 6.45742 6.66403 6.84902 6.33828 7.17477C6.01253 7.50052 5.62093 7.6634 5.16348 7.6634Z",fill:"currentColor"})})]}),q=()=>{const{open:t}=r("sourcesTable"),{open:d}=r("addItem"),{open:h}=r("addContent"),{open:p}=r("settings"),{open:x}=r("blueprintGraph"),{open:u}=r("feedback"),m=B(),{resetAiSummaryAnswer:g,setNewLoading:w}=F(),{abortFetchData:j,resetGraph:b}=V(n=>n),{setUniverseQuestionIsOpen:k,setSidebarOpen:f,setShowCollapseButton:v}=_(n=>n),{customSchemaFeatureFlag:H,userFeedbackFeatureFlag:M,chatInterfaceFeatureFlag:L}=I(n=>n),{isAdmin:c}=A(n=>n),y=$(),S=()=>{w(null),j(),g(),b(),m("/")},Z=()=>{k(),f(!0),v(!0)};return e.jsxs(D,{children:[e.jsx(Q,{onClick:S,children:e.jsx("img",{alt:"Second brain",src:"logo.svg"})}),L?e.jsxs(i,{onClick:Z,children:[e.jsx(o,{children:e.jsx(z,{})}),e.jsx(s,{children:"New Chat"})]}):null,c?e.jsxs(i,{"data-testid":"add-item-modal",onClick:d,children:[e.jsx(o,{children:e.jsx(T,{})}),e.jsx(s,{children:"Add Item"})]}):null,e.jsxs(i,{"data-testid":"add-content-modal",onClick:h,children:[e.jsx(o,{children:e.jsx(O,{})}),e.jsx(s,{children:"Add Content"})]}),e.jsxs(i,{id:"cy-open-soure-table",onClick:t,children:[e.jsx(o,{children:e.jsx(N,{})}),e.jsx(s,{children:"Source Table"})]}),H&&c?e.jsxs(i,{"data-testid":"add-blueprint-modal",id:"cy-open-soure-table",onClick:x,children:[e.jsx(o,{children:e.jsx(U,{})}),e.jsx(s,{children:"Blueprint"})]}):null,e.jsxs(i,{"data-testid":"settings-modal",onClick:p,children:[e.jsx(o,{children:e.jsx(E,{})}),e.jsx(s,{children:"Settings"})]}),M&&y?e.jsxs(R,{"data-testid":"feedback-modal",onClick:u,children:[e.jsx(o,{children:e.jsx(G,{})}),e.jsx(s,{children:"Send Feedback"})]}):null]})},D=l(a).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` +import{j as e,O as r,G as B,E as F,B as V,A as _,K as I,J as A,Q as $,T as s,o as l,q as C,F as a}from"./index-022521cf.js";import{C as U}from"./index-586dfb7f.js";const O=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_25",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_25)",children:e.jsx("path",{d:"M11.25 12.75V16C11.25 16.2125 11.3219 16.3906 11.4657 16.5343C11.6095 16.6781 11.7877 16.75 12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5346 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V12.75H16C16.2125 12.75 16.3906 12.6781 16.5344 12.5343C16.6781 12.3904 16.75 12.2122 16.75 11.9997C16.75 11.7871 16.6781 11.609 16.5344 11.4654C16.3906 11.3218 16.2125 11.25 16 11.25H12.75V7.99998C12.75 7.78748 12.6781 7.60935 12.5343 7.4656C12.3905 7.32187 12.2123 7.25 11.9997 7.25C11.7871 7.25 11.609 7.32187 11.4654 7.4656C11.3218 7.60935 11.25 7.78748 11.25 7.99998V11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H11.25ZM12.0017 21.5C10.6877 21.5 9.45271 21.2506 8.29658 20.752C7.14043 20.2533 6.13475 19.5765 5.27953 18.7217C4.4243 17.8669 3.74724 16.8616 3.24836 15.706C2.74947 14.5504 2.50003 13.3156 2.50003 12.0017C2.50003 10.6877 2.74936 9.45268 3.24803 8.29655C3.7467 7.1404 4.42345 6.13472 5.27828 5.2795C6.13313 4.42427 7.13837 3.74721 8.29401 3.24833C9.44962 2.74944 10.6844 2.5 11.9983 2.5C13.3123 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.1331 20.2528 7.13834 20.7517 8.29398C21.2505 9.44959 21.5 10.6844 21.5 11.9983C21.5 13.3122 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5766 17.8652 18.7217 18.7205C17.8669 19.5757 16.8616 20.2527 15.706 20.7516C14.5504 21.2505 13.3156 21.5 12.0017 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76664 19.225 7.87498 17.675 6.32498C16.125 4.77498 14.2333 3.99998 12 3.99998C9.76667 3.99998 7.87501 4.77498 6.32501 6.32498C4.77501 7.87498 4.00001 9.76664 4.00001 12C4.00001 14.2333 4.77501 16.125 6.32501 17.675C7.87501 19.225 9.76667 20 12 20Z",fill:"currentColor"})})]}),T=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_27",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_27)",children:e.jsx("path",{d:"M5.30773 20.5C4.81061 20.5 4.38506 20.3229 4.03106 19.9689C3.67704 19.6149 3.50003 19.1894 3.50003 18.6923V5.3077C3.50003 4.81058 3.67704 4.38503 4.03106 4.03103C4.38506 3.67701 4.81061 3.5 5.30773 3.5H18.6923C19.1894 3.5 19.615 3.67701 19.969 4.03103C20.323 4.38503 20.5 4.81058 20.5 5.3077V11.6327C20.2538 11.5275 20.0074 11.4384 19.7606 11.3654C19.5138 11.2923 19.2603 11.234 19 11.1904V5.3077C19 5.23077 18.968 5.16024 18.9039 5.09613C18.8397 5.03203 18.7692 4.99998 18.6923 4.99998H5.30773C5.2308 4.99998 5.16027 5.03203 5.09616 5.09613C5.03206 5.16024 5.00001 5.23077 5.00001 5.3077V18.6923C5.00001 18.7692 5.03206 18.8397 5.09616 18.9038C5.16027 18.9679 5.2308 19 5.30773 19H11.1654C11.2026 19.2769 11.2577 19.5387 11.3308 19.7855C11.4038 20.0323 11.4929 20.2705 11.5981 20.5H5.30773ZM5.00001 19V4.99998V11.1904V11.1154V19ZM7.25003 15.8849C7.25003 16.0975 7.32191 16.2756 7.46566 16.4192C7.60939 16.5628 7.78751 16.6346 8.00001 16.6346H11.2673C11.3109 16.3743 11.3757 16.1208 11.4616 15.874C11.5475 15.6272 11.641 15.3808 11.7423 15.1346H8.00001C7.78751 15.1346 7.60939 15.2065 7.46566 15.3503C7.32191 15.4941 7.25003 15.6723 7.25003 15.8849ZM7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H13.5904C14.0212 12.3846 14.4808 12.0785 14.9692 11.8317C15.4577 11.5849 15.9807 11.4096 16.5384 11.3058C16.4259 11.281 16.3009 11.2655 16.1634 11.2593C16.0259 11.2531 15.901 11.25 15.7885 11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003ZM7.25003 8.1157C7.25003 8.3283 7.32191 8.50639 7.46566 8.64998C7.60939 8.79356 7.78751 8.86535 8.00001 8.86535H16C16.2125 8.86535 16.3906 8.79344 16.5344 8.64963C16.6781 8.50583 16.75 8.32763 16.75 8.11503C16.75 7.90244 16.6781 7.72436 16.5344 7.58078C16.3906 7.43718 16.2125 7.36538 16 7.36538H8.00001C7.78751 7.36538 7.60939 7.43728 7.46566 7.5811C7.32191 7.72492 7.25003 7.90312 7.25003 8.1157ZM18 22.5576C16.7513 22.5576 15.6891 22.1198 14.8135 21.2442C13.9378 20.3685 13.5 19.3064 13.5 18.0577C13.5 16.809 13.9378 15.7468 14.8135 14.8712C15.6891 13.9955 16.7513 13.5577 18 13.5577C19.2487 13.5577 20.3109 13.9955 21.1865 14.8712C22.0622 15.7468 22.5 16.809 22.5 18.0577C22.5 19.3064 22.0622 20.3685 21.1865 21.2442C20.3109 22.1198 19.2487 22.5576 18 22.5576ZM17.5577 18.5V20.5577C17.5577 20.6756 17.6019 20.7788 17.6904 20.8673C17.7788 20.9557 17.8821 21 18 21C18.118 21 18.2212 20.9557 18.3096 20.8673C18.3981 20.7788 18.4423 20.6756 18.4423 20.5577V18.5H20.5C20.618 18.5 20.7212 18.4557 20.8096 18.3673C20.8981 18.2788 20.9423 18.1756 20.9423 18.0577C20.9423 17.9397 20.8981 17.8365 20.8096 17.748C20.7212 17.6596 20.618 17.6154 20.5 17.6154H18.4423V15.5577C18.4423 15.4397 18.3981 15.3365 18.3096 15.2481C18.2212 15.1596 18.118 15.1154 18 15.1154C17.8821 15.1154 17.7788 15.1596 17.6904 15.2481C17.6019 15.3365 17.5577 15.4397 17.5577 15.5577V17.6154H15.5C15.3821 17.6154 15.2788 17.6596 15.1904 17.748C15.1019 17.8365 15.0577 17.9397 15.0577 18.0577C15.0577 18.1756 15.1019 18.2788 15.1904 18.3673C15.2788 18.4557 15.3821 18.5 15.5 18.5H17.5577Z",fill:"currentColor"})})]}),G=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 25 22",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8553 2.95196L15.3555 5.30477C15.2095 5.44218 15.1081 5.62031 15.0647 5.81603L14.52 8.26717H7.41204C6.80549 8.26717 6.31378 8.75888 6.31378 9.36543C6.31378 9.97198 6.80549 10.4637 7.41204 10.4637H15.0998C15.1427 10.4637 15.185 10.4612 15.2266 10.4564C15.2442 10.4574 15.2619 10.4578 15.2798 10.4578H18.6054C18.8441 10.4578 19.0749 10.3724 19.2562 10.2171L21.3582 8.41535C21.5744 9.252 21.6894 10.1293 21.6894 11.0336C21.6894 16.7958 17.0182 21.467 11.256 21.467C9.70613 21.467 8.23523 21.1291 6.91291 20.5229L1.57616 21.8571C1.20996 21.9486 0.878268 21.6169 0.969816 21.2508L2.21945 16.2522C1.33102 14.7172 0.82251 12.9347 0.82251 11.0336C0.82251 5.27132 5.49373 0.600098 11.256 0.600098C13.7596 0.600098 16.0573 1.48194 17.8553 2.95196ZM7.41204 12.6603C6.80549 12.6603 6.31378 13.152 6.31378 13.7586C6.31378 14.3651 6.80549 14.8568 7.41204 14.8568H11.8051C12.4116 14.8568 12.9033 14.3651 12.9033 13.7586C12.9033 13.152 12.4116 12.6603 11.8051 12.6603H7.41204ZM22.1006 1.12041L16.3757 6.84529C16.3348 6.88621 16.3066 6.93809 16.2945 6.99468L15.9135 8.77616C15.868 8.98885 16.0569 9.17774 16.2696 9.13226L18.0511 8.75129C18.1077 8.73919 18.1596 8.71098 18.2005 8.67006L23.9254 2.94518C24.0425 2.82803 24.0425 2.63808 23.9254 2.52092L22.5249 1.12041C22.4077 1.00325 22.2178 1.00325 22.1006 1.12041Z",fill:"currentColor"})}),z=t=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{id:"Menu icons",children:e.jsx("path",{id:"Union","fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.2669 9.02431C16.2669 13.346 12.7635 16.8494 8.44179 16.8494C7.27934 16.8494 6.1761 16.5959 5.18431 16.1412L1.18187 17.1418C0.90723 17.2105 0.658457 16.9617 0.727118 16.6871L1.66434 12.9382C0.998057 11.7869 0.616699 10.4502 0.616699 9.02431C0.616699 4.70263 4.12011 1.19922 8.44179 1.19922C12.7635 1.19922 16.2669 4.70263 16.2669 9.02431ZM4.73511 7.77304C4.73511 7.31812 5.10389 6.94934 5.5588 6.94934H11.3247C11.7796 6.94934 12.1484 7.31812 12.1484 7.77304C12.1484 8.22795 11.7796 8.59673 11.3247 8.59673H5.5588C5.10389 8.59673 4.73511 8.22795 4.73511 7.77304ZM4.73505 11.068C4.73505 10.613 5.10383 10.2443 5.55874 10.2443H8.85352C9.30843 10.2443 9.67721 10.613 9.67721 11.068C9.67721 11.5229 9.30843 11.8917 8.85352 11.8917H5.55874C5.10383 11.8917 4.73505 11.5229 4.73505 11.068Z",fill:"currentColor"})})}),E=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_29",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_29)",children:e.jsx("path",{d:"M13.5096 21.5H10.4808C10.2564 21.5 10.0622 21.4246 9.8981 21.274C9.734 21.1233 9.63528 20.9358 9.60195 20.7115L9.31157 18.4538C9.04362 18.3641 8.76894 18.2384 8.48752 18.0769C8.2061 17.9153 7.9545 17.7422 7.7327 17.5576L5.64425 18.4384C5.43015 18.5217 5.21765 18.5301 5.00675 18.4634C4.79585 18.3967 4.63014 18.2647 4.50962 18.0673L3.00582 15.4481C2.8853 15.2506 2.84845 15.0397 2.89525 14.8154C2.94203 14.591 3.0558 14.4102 3.23657 14.2731L5.04427 12.9058C5.02119 12.757 5.00484 12.6077 4.99522 12.4577C4.9856 12.3077 4.9808 12.1583 4.9808 12.0096C4.9808 11.8673 4.9856 11.7227 4.99522 11.5759C5.00484 11.4291 5.02119 11.2686 5.04427 11.0942L3.23657 9.72688C3.0558 9.58971 2.94203 9.40894 2.89525 9.18458C2.84845 8.96023 2.8853 8.74934 3.00582 8.5519L4.50962 5.95195C4.61989 5.74425 4.78143 5.60963 4.99425 5.5481C5.20706 5.48657 5.42052 5.49747 5.63462 5.5808L7.72307 6.45195C7.9641 6.26092 8.22148 6.08623 8.4952 5.9279C8.76893 5.76955 9.03785 5.6423 9.30195 5.54615L9.60195 3.28848C9.63528 3.06411 9.734 2.87661 9.8981 2.72598C10.0622 2.57533 10.2564 2.5 10.4808 2.5H13.5096C13.7339 2.5 13.9298 2.57533 14.0971 2.72598C14.2644 2.87661 14.3647 3.06411 14.398 3.28848L14.6884 5.55578C14.9884 5.66474 15.2599 5.79198 15.5029 5.9375C15.7458 6.08302 15.991 6.2545 16.2384 6.45195L18.3654 5.5808C18.5795 5.49747 18.7904 5.48753 18.998 5.55098C19.2057 5.61444 19.3699 5.74489 19.4904 5.94233L20.9942 8.5519C21.1147 8.74934 21.1515 8.96023 21.1047 9.18458C21.058 9.40894 20.9442 9.58971 20.7634 9.72688L18.9173 11.123C18.9532 11.2846 18.9727 11.4355 18.9759 11.5759C18.9791 11.7163 18.9807 11.8577 18.9807 12C18.9807 12.1359 18.9775 12.274 18.9711 12.4144C18.9647 12.5548 18.9416 12.7154 18.9019 12.8962L20.7288 14.2731C20.916 14.4038 21.0314 14.583 21.0749 14.8106C21.1185 15.0381 21.0801 15.2506 20.9596 15.4481L19.4557 18.0519C19.3352 18.2493 19.167 18.3823 18.9509 18.4509C18.7349 18.5195 18.5198 18.5121 18.3057 18.4288L16.2384 17.548C15.991 17.7455 15.7384 17.9201 15.4807 18.0721C15.223 18.224 14.9589 18.348 14.6884 18.4442L14.398 20.7115C14.3647 20.9358 14.2644 21.1233 14.0971 21.274C13.9298 21.4246 13.7339 21.5 13.5096 21.5ZM12.0115 15C12.8436 15 13.5516 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.1679 14.7195 10.4599 14.1355 9.87595C13.5516 9.29198 12.8436 9 12.0115 9C11.1692 9 10.4587 9.29198 9.87982 9.87595C9.30099 10.4599 9.01157 11.1679 9.01157 12C9.01157 12.832 9.30099 13.54 9.87982 14.124C10.4587 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})})]}),N=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("mask",{id:"mask0_1259_26",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:e.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),e.jsx("g",{mask:"url(#mask0_1259_26)",children:e.jsx("path",{d:"M10.0577 18.7499C9.84521 18.7499 9.66708 18.678 9.52333 18.5342C9.3796 18.3904 9.30773 18.2122 9.30773 17.9996C9.30773 17.787 9.3796 17.609 9.52333 17.4654C9.66708 17.3218 9.84521 17.25 10.0577 17.25H19.75C19.9625 17.25 20.1406 17.3219 20.2844 17.4657C20.4281 17.6095 20.5 17.7877 20.5 18.0003C20.5 18.2129 20.4281 18.391 20.2844 18.5346C20.1406 18.6782 19.9625 18.7499 19.75 18.7499H10.0577ZM10.0577 12.7499C9.84521 12.7499 9.66708 12.678 9.52333 12.5342C9.3796 12.3904 9.30773 12.2122 9.30773 11.9996C9.30773 11.787 9.3796 11.609 9.52333 11.4654C9.66708 11.3218 9.84521 11.25 10.0577 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2844 11.4657C20.4281 11.6095 20.5 11.7877 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2844 12.5346C20.1406 12.6782 19.9625 12.7499 19.75 12.7499H10.0577ZM10.0577 6.74995C9.84521 6.74995 9.66708 6.67805 9.52333 6.53425C9.3796 6.39043 9.30773 6.21223 9.30773 5.99965C9.30773 5.78705 9.3796 5.60896 9.52333 5.46537C9.66708 5.32179 9.84521 5.25 10.0577 5.25H19.75C19.9625 5.25 20.1406 5.3219 20.2844 5.4657C20.4281 5.60951 20.5 5.78771 20.5 6.0003C20.5 6.2129 20.4281 6.39099 20.2844 6.53457C20.1406 6.67816 19.9625 6.74995 19.75 6.74995H10.0577ZM5.16348 19.6634C4.70603 19.6634 4.31443 19.5005 3.98868 19.1748C3.66291 18.849 3.50003 18.4574 3.50003 18C3.50003 17.5425 3.66291 17.1509 3.98868 16.8252C4.31443 16.4994 4.70603 16.3365 5.16348 16.3365C5.62093 16.3365 6.01253 16.4994 6.33828 16.8252C6.66403 17.1509 6.82691 17.5425 6.82691 18C6.82691 18.4574 6.66403 18.849 6.33828 19.1748C6.01253 19.5005 5.62093 19.6634 5.16348 19.6634ZM5.16348 13.6634C4.70603 13.6634 4.31443 13.5005 3.98868 13.1748C3.66291 12.849 3.50003 12.4574 3.50003 12C3.50003 11.5425 3.66291 11.1509 3.98868 10.8252C4.31443 10.4994 4.70603 10.3365 5.16348 10.3365C5.62093 10.3365 6.01253 10.4994 6.33828 10.8252C6.66403 11.1509 6.82691 11.5425 6.82691 12C6.82691 12.4574 6.66403 12.849 6.33828 13.1748C6.01253 13.5005 5.62093 13.6634 5.16348 13.6634ZM5.16348 7.6634C4.70603 7.6634 4.31443 7.50052 3.98868 7.17477C3.66291 6.84902 3.50003 6.45742 3.50003 5.99997C3.50003 5.54252 3.66291 5.15092 3.98868 4.82517C4.31443 4.49942 4.70603 4.33655 5.16348 4.33655C5.62093 4.33655 6.01253 4.49942 6.33828 4.82517C6.66403 5.15092 6.82691 5.54252 6.82691 5.99997C6.82691 6.45742 6.66403 6.84902 6.33828 7.17477C6.01253 7.50052 5.62093 7.6634 5.16348 7.6634Z",fill:"currentColor"})})]}),q=()=>{const{open:t}=r("sourcesTable"),{open:d}=r("addItem"),{open:h}=r("addContent"),{open:p}=r("settings"),{open:x}=r("blueprintGraph"),{open:u}=r("feedback"),m=B(),{resetAiSummaryAnswer:g,setNewLoading:w}=F(),{abortFetchData:j,resetGraph:b}=V(n=>n),{setUniverseQuestionIsOpen:k,setSidebarOpen:f,setShowCollapseButton:v}=_(n=>n),{customSchemaFeatureFlag:H,userFeedbackFeatureFlag:M,chatInterfaceFeatureFlag:L}=I(n=>n),{isAdmin:c}=A(n=>n),y=$(),S=()=>{w(null),j(),g(),b(),m("/")},Z=()=>{k(),f(!0),v(!0)};return e.jsxs(D,{children:[e.jsx(Q,{onClick:S,children:e.jsx("img",{alt:"Second brain",src:"logo.svg"})}),L?e.jsxs(i,{onClick:Z,children:[e.jsx(o,{children:e.jsx(z,{})}),e.jsx(s,{children:"New Chat"})]}):null,c?e.jsxs(i,{"data-testid":"add-item-modal",onClick:d,children:[e.jsx(o,{children:e.jsx(T,{})}),e.jsx(s,{children:"Add Item"})]}):null,e.jsxs(i,{"data-testid":"add-content-modal",onClick:h,children:[e.jsx(o,{children:e.jsx(O,{})}),e.jsx(s,{children:"Add Content"})]}),e.jsxs(i,{id:"cy-open-soure-table",onClick:t,children:[e.jsx(o,{children:e.jsx(N,{})}),e.jsx(s,{children:"Source Table"})]}),H&&c?e.jsxs(i,{"data-testid":"add-blueprint-modal",id:"cy-open-soure-table",onClick:x,children:[e.jsx(o,{children:e.jsx(U,{})}),e.jsx(s,{children:"Blueprint"})]}):null,e.jsxs(i,{"data-testid":"settings-modal",onClick:p,children:[e.jsx(o,{children:e.jsx(E,{})}),e.jsx(s,{children:"Settings"})]}),M&&y?e.jsxs(R,{"data-testid":"feedback-modal",onClick:u,children:[e.jsx(o,{children:e.jsx(G,{})}),e.jsx(s,{children:"Send Feedback"})]}):null]})},D=l(a).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` flex: 0 0 64px; z-index: 31; transition: opacity 1s; diff --git a/build/assets/index-775b6bc6.js b/build/assets/index-586dfb7f.js similarity index 97% rename from build/assets/index-775b6bc6.js rename to build/assets/index-586dfb7f.js index ab78c252f..8e519e3ed 100644 --- a/build/assets/index-775b6bc6.js +++ b/build/assets/index-586dfb7f.js @@ -1,4 +1,4 @@ -import{r as d,R as h,_ as Z,a as Fn,c as We,j as T,g as Or,k as Xo,s as Wt,u as Pr,b as Zo,d as Qo,e as Te,f as en,h as Jo,i as jl,l as Ll,m as ga,$ as Fl,P as ce,n as zl,W as Nl,o as pe,p as ei,q as J,F as ee,t as Vl,v as Bl,w as ti,x as ma,L as Wl,y as ba,z as ya,A as Ar,B as ni,T as Ae,S as Hl,C as ze,D as Ul,E as va,G as Kl,H as Gl,I as Yl,J as ql,K as Xl,M as Zl,N as Ql}from"./index-a0989d63.js";function Jl(e){return e?String(e).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}const eu=e=>{const[t,n,r]=e.split(":"),o=parseInt(t,10),i=parseInt(n,10),s=parseInt(r,10);return o*3600+i*60+s};function tu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const nu=typeof window<"u"?d.useLayoutEffect:d.useEffect,ru=nu;function Yn(e){const t=d.useRef(e);return ru(()=>{t.current=e}),d.useRef((...n)=>(0,t.current)(...n)).current}function Pi(...e){return d.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{tu(n,t)})},e)}let Ir=!0,yo=!1,Ai;const ou={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function iu(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&ou[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function su(e){e.metaKey||e.altKey||e.ctrlKey||(Ir=!0)}function Kr(){Ir=!1}function au(){this.visibilityState==="hidden"&&yo&&(Ir=!0)}function cu(e){e.addEventListener("keydown",su,!0),e.addEventListener("mousedown",Kr,!0),e.addEventListener("pointerdown",Kr,!0),e.addEventListener("touchstart",Kr,!0),e.addEventListener("visibilitychange",au,!0)}function lu(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Ir||iu(t)}function uu(){const e=d.useCallback(o=>{o!=null&&cu(o.ownerDocument)},[]),t=d.useRef(!1);function n(){return t.current?(yo=!0,window.clearTimeout(Ai),Ai=window.setTimeout(()=>{yo=!1},100),t.current=!1,!0):!1}function r(o){return lu(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function vo(e,t){return vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},vo(e,t)}function du(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vo(e,t)}const Ii=h.createContext(null);function fu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ri(e,t){var n=function(i){return t&&d.isValidElement(i)?t(i):i},r=Object.create(null);return e&&d.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function pu(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var c in t){if(r[c])for(s=0;s{if(!a&&c!=null){const b=setTimeout(c,l);return()=>{clearTimeout(b)}}},[c,a,l]),T.jsx("span",{className:p,style:g,children:T.jsx("span",{className:m})})}const xu=Or("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),qe=xu,wu=["center","classes","className"];let Dr=e=>e,Di,Mi,ji,Li;const xo=550,Eu=80,$u=Xo(Di||(Di=Dr` +import{r as d,R as h,_ as Z,a as Fn,c as We,j as T,g as Or,k as Xo,s as Wt,u as Pr,b as Zo,d as Qo,e as Te,f as en,h as Jo,i as jl,l as Ll,m as ga,$ as Fl,P as ce,n as zl,W as Nl,o as pe,p as ei,q as J,F as ee,t as Vl,v as Bl,w as ti,x as ma,L as Wl,y as ba,z as ya,A as Ar,B as ni,T as Ae,S as Hl,C as ze,D as Ul,E as va,G as Kl,H as Gl,I as Yl,J as ql,K as Xl,M as Zl,N as Ql}from"./index-022521cf.js";function Jl(e){return e?String(e).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}const eu=e=>{const[t,n,r]=e.split(":"),o=parseInt(t,10),i=parseInt(n,10),s=parseInt(r,10);return o*3600+i*60+s};function tu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const nu=typeof window<"u"?d.useLayoutEffect:d.useEffect,ru=nu;function Yn(e){const t=d.useRef(e);return ru(()=>{t.current=e}),d.useRef((...n)=>(0,t.current)(...n)).current}function Pi(...e){return d.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{tu(n,t)})},e)}let Ir=!0,yo=!1,Ai;const ou={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function iu(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&ou[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function su(e){e.metaKey||e.altKey||e.ctrlKey||(Ir=!0)}function Kr(){Ir=!1}function au(){this.visibilityState==="hidden"&&yo&&(Ir=!0)}function cu(e){e.addEventListener("keydown",su,!0),e.addEventListener("mousedown",Kr,!0),e.addEventListener("pointerdown",Kr,!0),e.addEventListener("touchstart",Kr,!0),e.addEventListener("visibilitychange",au,!0)}function lu(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Ir||iu(t)}function uu(){const e=d.useCallback(o=>{o!=null&&cu(o.ownerDocument)},[]),t=d.useRef(!1);function n(){return t.current?(yo=!0,window.clearTimeout(Ai),Ai=window.setTimeout(()=>{yo=!1},100),t.current=!1,!0):!1}function r(o){return lu(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function vo(e,t){return vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},vo(e,t)}function du(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vo(e,t)}const Ii=h.createContext(null);function fu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ri(e,t){var n=function(i){return t&&d.isValidElement(i)?t(i):i},r=Object.create(null);return e&&d.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function pu(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var c in t){if(r[c])for(s=0;s{if(!a&&c!=null){const b=setTimeout(c,l);return()=>{clearTimeout(b)}}},[c,a,l]),T.jsx("span",{className:p,style:g,children:T.jsx("span",{className:m})})}const xu=Or("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),qe=xu,wu=["center","classes","className"];let Dr=e=>e,Di,Mi,ji,Li;const xo=550,Eu=80,$u=Xo(Di||(Di=Dr` 0% { transform: scale(0); opacity: 0.1; @@ -338,7 +338,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top: 65px; right: 55px; z-index: 100; -`,Vy=()=>{const e=d.useContext(Hl);return e==null?void 0:e.socket},By={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},Wy=ti(e=>({...By,setAskedQuestion:t=>e(n=>({askedQuestions:[...n.askedQuestions||[],t],hasQuestionInProgress:!0})),setAskedQuestionAnswer:t=>e(n=>({askedQuestionsAnswers:[...n.askedQuestionsAnswers||[],t],hasQuestionInProgress:!1})),setHasQuestionInProgress:t=>e({hasQuestionInProgress:t}),setHasTeachingInProgress:t=>e({hasTeachingInProgress:t}),setHasInstagraphInProgress:t=>e({hasInstagraphInProgress:t}),setTeachMeAnswer:t=>e({hasTeachingInProgress:!1,teachMeAnswer:t}),setInstagraphAnswer:t=>{var n,r,o,i;(n=t==null?void 0:t.instagraph)!=null&&n.edges&&((r=t==null?void 0:t.instagraph)!=null&&r.nodes)&&e({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(o=t==null?void 0:t.instagraph)==null?void 0:o.edges,nodes:(i=t==null?void 0:t.instagraph)==null?void 0:i.nodes}})}})),Hy="0.1.106",Uy=d.lazy(()=>ze(()=>import("./index-4546d106.js"),["assets/index-4546d106.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/ClipLoader-f345d5d1.js","assets/index-3d0189dc.js","assets/index.esm-d308c31f.js","assets/InfoIcon-4aad7e99.js","assets/index-58d3954b.js","assets/Tabs-cb4f54fe.js","assets/useSlotProps-374609c4.js","assets/createSvgIcon-ebe0e3e6.js"]).then(({SettingsModal:e})=>({default:e}))),Ky=d.lazy(()=>ze(()=>import("./index-f893fd9f.js"),["assets/index-f893fd9f.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/index-58d3954b.js","assets/index.esm-d308c31f.js","assets/CheckIcon-c0260530.js","assets/ClipLoader-f345d5d1.js","assets/index-3d0189dc.js","assets/InfoIcon-4aad7e99.js"]).then(({AddContentModal:e})=>({default:e}))),Gy=d.lazy(()=>ze(()=>import("./index-1a8d93d8.js"),["assets/index-1a8d93d8.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/index-58d3954b.js","assets/index.esm-d308c31f.js","assets/CheckIcon-c0260530.js","assets/ClipLoader-f345d5d1.js","assets/index-6f4f8df4.js","assets/Stack-98b5acbc.js","assets/useSlotProps-374609c4.js","assets/Popover-6e322384.js","assets/createSvgIcon-ebe0e3e6.js","assets/TextareaAutosize-76d3e8d6.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/index-3d0189dc.js","assets/InfoIcon-4aad7e99.js","assets/index-64f1c910.js"]).then(({AddItemModal:e})=>({default:e}))),Yy=d.lazy(()=>ze(()=>import("./index-25e571f5.js"),["assets/index-25e571f5.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/PlusIcon-1147d96e.js","assets/NodeCircleIcon-2908ceb4.js","assets/ClipLoader-f345d5d1.js","assets/index.esm-d308c31f.js","assets/Popover-6e322384.js","assets/useSlotProps-374609c4.js","assets/SearchIcon-119ae41f.js","assets/index-6f4f8df4.js","assets/Stack-98b5acbc.js","assets/createSvgIcon-ebe0e3e6.js","assets/TextareaAutosize-76d3e8d6.js","assets/index-3d0189dc.js","assets/InfoIcon-4aad7e99.js","assets/DeleteIcon-32576b88.js","assets/MergeIcon-b3a532b8.js","assets/index-898f9b16.js","assets/CheckIcon-c0260530.js","assets/Typography-d3022217.js","assets/Tabs-cb4f54fe.js"]).then(({SourcesTableModal:e})=>({default:e}))),qy=d.lazy(()=>ze(()=>import("./index-cb8726c0.js"),["assets/index-cb8726c0.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/index-3d0189dc.js","assets/index.esm-d308c31f.js","assets/InfoIcon-4aad7e99.js","assets/Skeleton-091f3105.js","assets/ClipLoader-f345d5d1.js"]).then(({EditNodeNameModal:e})=>({default:e}))),Xy=d.lazy(()=>ze(()=>import("./index-d69ca99f.js"),["assets/index-d69ca99f.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/Skeleton-091f3105.js","assets/ClipLoader-f345d5d1.js"]).then(({RemoveNodeModal:e})=>({default:e}))),Zy=d.lazy(()=>ze(()=>import("./index-26de62a9.js"),["assets/index-26de62a9.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/NodeCircleIcon-2908ceb4.js","assets/index-6f4f8df4.js","assets/Stack-98b5acbc.js","assets/useSlotProps-374609c4.js","assets/Popover-6e322384.js","assets/createSvgIcon-ebe0e3e6.js","assets/TextareaAutosize-76d3e8d6.js","assets/ClipLoader-f345d5d1.js"]).then(({AddNodeEdgeModal:e})=>({default:e}))),Qy=d.lazy(()=>ze(()=>import("./index-4a7ed5d9.js"),["assets/index-4a7ed5d9.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/index-898f9b16.js","assets/NodeCircleIcon-2908ceb4.js","assets/index-6f4f8df4.js","assets/Stack-98b5acbc.js","assets/useSlotProps-374609c4.js","assets/Popover-6e322384.js","assets/createSvgIcon-ebe0e3e6.js","assets/TextareaAutosize-76d3e8d6.js","assets/ClipLoader-f345d5d1.js"]).then(({MergeNodeModal:e})=>({default:e}))),Jy=d.lazy(()=>ze(()=>import("./index-19fbac0a.js"),["assets/index-19fbac0a.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/index-3d0189dc.js","assets/index.esm-d308c31f.js","assets/InfoIcon-4aad7e99.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/index-6f4f8df4.js","assets/Stack-98b5acbc.js","assets/useSlotProps-374609c4.js","assets/Popover-6e322384.js","assets/createSvgIcon-ebe0e3e6.js","assets/TextareaAutosize-76d3e8d6.js","assets/ClipLoader-f345d5d1.js","assets/index-64f1c910.js"]).then(({ChangeNodeTypeModal:e})=>({default:e}))),ev=d.lazy(()=>ze(()=>import("./index-23d72e24.js"),["assets/index-23d72e24.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/index-6f4f8df4.js","assets/Stack-98b5acbc.js","assets/useSlotProps-374609c4.js","assets/Popover-6e322384.js","assets/createSvgIcon-ebe0e3e6.js","assets/TextareaAutosize-76d3e8d6.js","assets/index-3d0189dc.js","assets/index.esm-d308c31f.js","assets/InfoIcon-4aad7e99.js","assets/ClipLoader-f345d5d1.js","assets/DeleteIcon-32576b88.js","assets/PlusIcon-1147d96e.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/FormControlLabel-770e209b.js","assets/Typography-d3022217.js","assets/index-d15dc160.js"]).then(({BlueprintModal:e})=>({default:e}))),tv=d.lazy(()=>ze(()=>import("./index-eb6f13ce.js"),["assets/index-eb6f13ce.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-f06622e3.js","assets/index-58d3954b.js","assets/index.esm-d308c31f.js","assets/index-3d0189dc.js","assets/InfoIcon-4aad7e99.js"]).then(({UserFeedBackModal:e})=>({default:e}))),nv=()=>T.jsxs(T.Fragment,{children:[T.jsx(Gy,{}),T.jsx(Ky,{}),T.jsx(Uy,{}),T.jsx(qy,{}),T.jsx(Xy,{}),T.jsx(Yy,{}),T.jsx(Zy,{}),T.jsx(Jy,{}),T.jsx(ev,{}),T.jsx(Qy,{}),T.jsx(tv,{})]}),rv=()=>{const e=Ar(s=>s.appMetaData),{resetAiSummaryAnswer:t,setNewLoading:n}=va(),{abortFetchData:r}=ni(s=>s),o=Kl();if(!e)return null;const i=()=>{n(null),r(),t(),o("/")};return T.jsxs(ov,{children:[T.jsxs(iv,{onClick:i,children:[T.jsx(T.Fragment,{children:e.title&&T.jsx(Ae,{className:"title",color:"white",children:e.title})}),T.jsx(Ae,{className:"subtitle",children:"Second Brain"})]}),T.jsx(Gl,{})]})},ov=pe(ee).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` +`,Vy=()=>{const e=d.useContext(Hl);return e==null?void 0:e.socket},By={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},Wy=ti(e=>({...By,setAskedQuestion:t=>e(n=>({askedQuestions:[...n.askedQuestions||[],t],hasQuestionInProgress:!0})),setAskedQuestionAnswer:t=>e(n=>({askedQuestionsAnswers:[...n.askedQuestionsAnswers||[],t],hasQuestionInProgress:!1})),setHasQuestionInProgress:t=>e({hasQuestionInProgress:t}),setHasTeachingInProgress:t=>e({hasTeachingInProgress:t}),setHasInstagraphInProgress:t=>e({hasInstagraphInProgress:t}),setTeachMeAnswer:t=>e({hasTeachingInProgress:!1,teachMeAnswer:t}),setInstagraphAnswer:t=>{var n,r,o,i;(n=t==null?void 0:t.instagraph)!=null&&n.edges&&((r=t==null?void 0:t.instagraph)!=null&&r.nodes)&&e({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(o=t==null?void 0:t.instagraph)==null?void 0:o.edges,nodes:(i=t==null?void 0:t.instagraph)==null?void 0:i.nodes}})}})),Hy="0.1.106",Uy=d.lazy(()=>ze(()=>import("./index-e8631a32.js"),["assets/index-e8631a32.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/ClipLoader-d8628c6c.js","assets/index-b5c86aa6.js","assets/index.esm-38ac4e4f.js","assets/InfoIcon-b7d3736d.js","assets/index-3beb67ad.js","assets/Tabs-2c5124a1.js","assets/useSlotProps-51fc8b9f.js","assets/createSvgIcon-e1ebdfca.js"]).then(({SettingsModal:e})=>({default:e}))),Ky=d.lazy(()=>ze(()=>import("./index-b9410658.js"),["assets/index-b9410658.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/index-3beb67ad.js","assets/index.esm-38ac4e4f.js","assets/CheckIcon-4e74d21d.js","assets/ClipLoader-d8628c6c.js","assets/index-b5c86aa6.js","assets/InfoIcon-b7d3736d.js"]).then(({AddContentModal:e})=>({default:e}))),Gy=d.lazy(()=>ze(()=>import("./index-82691a7b.js"),["assets/index-82691a7b.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/index-3beb67ad.js","assets/index.esm-38ac4e4f.js","assets/CheckIcon-4e74d21d.js","assets/ClipLoader-d8628c6c.js","assets/index-39c958ca.js","assets/Stack-ce2a5ec5.js","assets/useSlotProps-51fc8b9f.js","assets/Popover-cc3c7b26.js","assets/createSvgIcon-e1ebdfca.js","assets/TextareaAutosize-0ace781b.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/index-b5c86aa6.js","assets/InfoIcon-b7d3736d.js","assets/index-64f1c910.js"]).then(({AddItemModal:e})=>({default:e}))),Yy=d.lazy(()=>ze(()=>import("./index-db660713.js"),["assets/index-db660713.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/PlusIcon-6ec48130.js","assets/NodeCircleIcon-e840b41b.js","assets/ClipLoader-d8628c6c.js","assets/index.esm-38ac4e4f.js","assets/Popover-cc3c7b26.js","assets/useSlotProps-51fc8b9f.js","assets/SearchIcon-fa6afb77.js","assets/index-39c958ca.js","assets/Stack-ce2a5ec5.js","assets/createSvgIcon-e1ebdfca.js","assets/TextareaAutosize-0ace781b.js","assets/index-b5c86aa6.js","assets/InfoIcon-b7d3736d.js","assets/DeleteIcon-afd5d6e5.js","assets/MergeIcon-b7c61b0a.js","assets/index-fb250689.js","assets/CheckIcon-4e74d21d.js","assets/Typography-13dc67f3.js","assets/Tabs-2c5124a1.js"]).then(({SourcesTableModal:e})=>({default:e}))),qy=d.lazy(()=>ze(()=>import("./index-05e42f19.js"),["assets/index-05e42f19.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/index-b5c86aa6.js","assets/index.esm-38ac4e4f.js","assets/InfoIcon-b7d3736d.js","assets/Skeleton-5c7b36a8.js","assets/ClipLoader-d8628c6c.js"]).then(({EditNodeNameModal:e})=>({default:e}))),Xy=d.lazy(()=>ze(()=>import("./index-0bcd712f.js"),["assets/index-0bcd712f.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/Skeleton-5c7b36a8.js","assets/ClipLoader-d8628c6c.js"]).then(({RemoveNodeModal:e})=>({default:e}))),Zy=d.lazy(()=>ze(()=>import("./index-7be8daa0.js"),["assets/index-7be8daa0.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/NodeCircleIcon-e840b41b.js","assets/index-39c958ca.js","assets/Stack-ce2a5ec5.js","assets/useSlotProps-51fc8b9f.js","assets/Popover-cc3c7b26.js","assets/createSvgIcon-e1ebdfca.js","assets/TextareaAutosize-0ace781b.js","assets/ClipLoader-d8628c6c.js"]).then(({AddNodeEdgeModal:e})=>({default:e}))),Qy=d.lazy(()=>ze(()=>import("./index-e671d6ff.js"),["assets/index-e671d6ff.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/index-fb250689.js","assets/NodeCircleIcon-e840b41b.js","assets/index-39c958ca.js","assets/Stack-ce2a5ec5.js","assets/useSlotProps-51fc8b9f.js","assets/Popover-cc3c7b26.js","assets/createSvgIcon-e1ebdfca.js","assets/TextareaAutosize-0ace781b.js","assets/ClipLoader-d8628c6c.js"]).then(({MergeNodeModal:e})=>({default:e}))),Jy=d.lazy(()=>ze(()=>import("./index-6925fbee.js"),["assets/index-6925fbee.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/index-b5c86aa6.js","assets/index.esm-38ac4e4f.js","assets/InfoIcon-b7d3736d.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/index-39c958ca.js","assets/Stack-ce2a5ec5.js","assets/useSlotProps-51fc8b9f.js","assets/Popover-cc3c7b26.js","assets/createSvgIcon-e1ebdfca.js","assets/TextareaAutosize-0ace781b.js","assets/ClipLoader-d8628c6c.js","assets/index-64f1c910.js"]).then(({ChangeNodeTypeModal:e})=>({default:e}))),ev=d.lazy(()=>ze(()=>import("./index-7d21ce0b.js"),["assets/index-7d21ce0b.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/index-39c958ca.js","assets/Stack-ce2a5ec5.js","assets/useSlotProps-51fc8b9f.js","assets/Popover-cc3c7b26.js","assets/createSvgIcon-e1ebdfca.js","assets/TextareaAutosize-0ace781b.js","assets/index-b5c86aa6.js","assets/index.esm-38ac4e4f.js","assets/InfoIcon-b7d3736d.js","assets/ClipLoader-d8628c6c.js","assets/DeleteIcon-afd5d6e5.js","assets/PlusIcon-6ec48130.js","assets/index-44e303ef.js","assets/three.module-2ce81f73.js","assets/FormControlLabel-8c91edc9.js","assets/Typography-13dc67f3.js","assets/index-c116778d.js"]).then(({BlueprintModal:e})=>({default:e}))),tv=d.lazy(()=>ze(()=>import("./index-821dafbe.js"),["assets/index-821dafbe.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-ee20ad28.js","assets/index-3beb67ad.js","assets/index.esm-38ac4e4f.js","assets/index-b5c86aa6.js","assets/InfoIcon-b7d3736d.js"]).then(({UserFeedBackModal:e})=>({default:e}))),nv=()=>T.jsxs(T.Fragment,{children:[T.jsx(Gy,{}),T.jsx(Ky,{}),T.jsx(Uy,{}),T.jsx(qy,{}),T.jsx(Xy,{}),T.jsx(Yy,{}),T.jsx(Zy,{}),T.jsx(Jy,{}),T.jsx(ev,{}),T.jsx(Qy,{}),T.jsx(tv,{})]}),rv=()=>{const e=Ar(s=>s.appMetaData),{resetAiSummaryAnswer:t,setNewLoading:n}=va(),{abortFetchData:r}=ni(s=>s),o=Kl();if(!e)return null;const i=()=>{n(null),r(),t(),o("/")};return T.jsxs(ov,{children:[T.jsxs(iv,{onClick:i,children:[T.jsx(T.Fragment,{children:e.title&&T.jsx(Ae,{className:"title",color:"white",children:e.title})}),T.jsx(Ae,{className:"subtitle",children:"Second Brain"})]}),T.jsx(Gl,{})]})},ov=pe(ee).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` height: 64px; position: absolute; top: 0px; @@ -435,4 +435,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho color: ${J.white}; font-size: 12px; opacity: 0.5; -`,_v=d.lazy(()=>ze(()=>import("./index-ab9a7dc9.js"),["assets/index-ab9a7dc9.js","assets/index-a0989d63.js","assets/index-a2878e02.css"]).then(({MainToolbar:e})=>({default:e}))),Sv=d.lazy(()=>ze(()=>import("./index-7f6bf0c2.js"),["assets/index-7f6bf0c2.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/index-d15dc160.js","assets/three.module-2ce81f73.js","assets/TextareaAutosize-76d3e8d6.js","assets/useSlotProps-374609c4.js","assets/DeleteIcon-32576b88.js","assets/index.esm-d308c31f.js","assets/index-7ac66030.js","assets/MergeIcon-b3a532b8.js","assets/PlusIcon-1147d96e.js","assets/Popover-6e322384.js","assets/ClipLoader-f345d5d1.js"]).then(({Universe:e})=>({default:e}))),Tv=d.lazy(()=>ze(()=>import("./index-159c08bd.js").then(e=>e.i),["assets/index-159c08bd.js","assets/index-a0989d63.js","assets/index-a2878e02.css","assets/SearchIcon-119ae41f.js","assets/ClipLoader-f345d5d1.js","assets/Skeleton-091f3105.js","assets/PlusIcon-1147d96e.js","assets/Popover-6e322384.js","assets/useSlotProps-374609c4.js","assets/CheckIcon-c0260530.js","assets/Stack-98b5acbc.js","assets/FormControlLabel-770e209b.js","assets/Typography-d3022217.js","assets/createSvgIcon-ebe0e3e6.js","assets/index-f06622e3.js","assets/index-7ac66030.js","assets/index.esm-d308c31f.js","assets/InfoIcon-4aad7e99.js"]).then(({SideBar:e})=>({default:e}))),kv=()=>{const[e]=Yl(),t=e.get("q"),{setBudget:n,setNodeCount:r}=ql(F=>F),{setSidebarOpen:o,currentSearch:i,setCurrentSearch:s,setRelevanceSelected:a,setTranscriptOpen:c,universeQuestionIsOpen:l,setUniverseQuestionIsOpen:u}=Ar(F=>F),f=Wy(F=>F.setTeachMeAnswer),{fetchData:p,setCategoryFilter:g,setAbortRequests:m,addNewNode:b,splashDataLoading:w}=ni(F=>F),{setAiSummaryAnswer:v,getKeyExist:y,aiRefId:$}=va(F=>F),S=ya(),[_,E]=Xl(F=>[F.realtimeGraphFeatureFlag,F.chatInterfaceFeatureFlag]),C=Vy(),R=Jb({mode:"onChange"}),{setValue:L}=R;d.useEffect(()=>{L("search",t??""),c(!1),S(null),a(!1),s(t??""),f(""),g(null)},[t,g,s,a,S,f,c,L]),d.useEffect(()=>{(async()=>{await p(n,m),o(!0),i?await Ql(n):S(null)})()},[i,p,n,m,o,S]);const M=d.useCallback(()=>{r("INCREMENT")},[r]),z=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{answer:F.answer,answerLoading:!1})},[v]),A=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{audio_en:F.audio_EN})},[v]),N=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{questions:F.relevant_questions.map(G=>G.question),questionsLoading:!1})},[v]),j=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{sources:F.sources.map(G=>G.ref_id),sourcesLoading:!1})},[v]),V=d.useCallback(F=>{b(F)},[b]),B=d.useCallback(F=>{F.question&&y($)&&v($,{answerLoading:!1,entities:F.entities})},[v,y,$]);return d.useEffect(()=>(C&&(C.connect(),C.on("connect_error",F=>{console.error("Socket connection error:",F)}),C.on("newnode",M),E&&C.on("extractedentitieshook",B),E&&C.on("askquestionhook",z),E&&C.on("relevantquestionshook",N),E&&C.on("answersourceshook",j),_&&C.on("new_node_created",V),E&&C.on("answeraudiohook",A)),()=>{C&&C.off()}),[C,M,V,_,z,E,N,j,B,A]),d.useEffect(()=>{w||u()},[u,w]),T.jsxs(T.Fragment,{children:[T.jsx(ey,{}),T.jsx(cv,{}),T.jsx(dl,{hidden:!Zl}),T.jsx(d.Suspense,{fallback:T.jsx("div",{children:"Loading..."}),children:w?null:T.jsxs($v,{direction:"row",children:[T.jsxs(Fb,{...R,children:[T.jsx(_v,{}),!l&&T.jsx(Tv,{}),T.jsx(Sv,{}),T.jsx(Fy,{}),T.jsx(rv,{}),T.jsxs(Cv,{children:["v",Hy]}),T.jsx(Rl,{})]}),T.jsx(nv,{}),T.jsx(Ev,{})]})})]})},Vv=Object.freeze(Object.defineProperty({__proto__:null,App:kv},Symbol.toStringTag,{value:"Module"}));export{kl as A,Aa as B,cy as C,zv as D,Vv as E,Fb as F,ly as G,wa as I,Fy as O,gy as P,Py as T,mn as _,Lv as a,Oy as b,Fv as c,uu as d,Pi as e,ru as f,Yn as g,Br as h,Jb as i,Jl as j,hy as k,ay as l,my as m,yy as n,uy as o,xa as p,Nv as q,bp as r,Ov as s,tu as t,sy as u,eu as v,du as w,Ii as x,de as y,W as z}; +`,_v=d.lazy(()=>ze(()=>import("./index-537391b6.js"),["assets/index-537391b6.js","assets/index-022521cf.js","assets/index-a2878e02.css"]).then(({MainToolbar:e})=>({default:e}))),Sv=d.lazy(()=>ze(()=>import("./index-a440d1a9.js"),["assets/index-a440d1a9.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/index-c116778d.js","assets/three.module-2ce81f73.js","assets/TextareaAutosize-0ace781b.js","assets/useSlotProps-51fc8b9f.js","assets/DeleteIcon-afd5d6e5.js","assets/index.esm-38ac4e4f.js","assets/index-80c09a74.js","assets/MergeIcon-b7c61b0a.js","assets/PlusIcon-6ec48130.js","assets/Popover-cc3c7b26.js","assets/ClipLoader-d8628c6c.js"]).then(({Universe:e})=>({default:e}))),Tv=d.lazy(()=>ze(()=>import("./index-4378ec35.js").then(e=>e.i),["assets/index-4378ec35.js","assets/index-022521cf.js","assets/index-a2878e02.css","assets/SearchIcon-fa6afb77.js","assets/ClipLoader-d8628c6c.js","assets/Skeleton-5c7b36a8.js","assets/PlusIcon-6ec48130.js","assets/Popover-cc3c7b26.js","assets/useSlotProps-51fc8b9f.js","assets/CheckIcon-4e74d21d.js","assets/Stack-ce2a5ec5.js","assets/FormControlLabel-8c91edc9.js","assets/Typography-13dc67f3.js","assets/createSvgIcon-e1ebdfca.js","assets/index-ee20ad28.js","assets/index-80c09a74.js","assets/index.esm-38ac4e4f.js","assets/InfoIcon-b7d3736d.js"]).then(({SideBar:e})=>({default:e}))),kv=()=>{const[e]=Yl(),t=e.get("q"),{setBudget:n,setNodeCount:r}=ql(F=>F),{setSidebarOpen:o,currentSearch:i,setCurrentSearch:s,setRelevanceSelected:a,setTranscriptOpen:c,universeQuestionIsOpen:l,setUniverseQuestionIsOpen:u}=Ar(F=>F),f=Wy(F=>F.setTeachMeAnswer),{fetchData:p,setCategoryFilter:g,setAbortRequests:m,addNewNode:b,splashDataLoading:w}=ni(F=>F),{setAiSummaryAnswer:v,getKeyExist:y,aiRefId:$}=va(F=>F),S=ya(),[_,E]=Xl(F=>[F.realtimeGraphFeatureFlag,F.chatInterfaceFeatureFlag]),C=Vy(),R=Jb({mode:"onChange"}),{setValue:L}=R;d.useEffect(()=>{L("search",t??""),c(!1),S(null),a(!1),s(t??""),f(""),g(null)},[t,g,s,a,S,f,c,L]),d.useEffect(()=>{(async()=>{await p(n,m),o(!0),i?await Ql(n):S(null)})()},[i,p,n,m,o,S]);const M=d.useCallback(()=>{r("INCREMENT")},[r]),z=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{answer:F.answer,answerLoading:!1})},[v]),A=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{audio_en:F.audio_EN})},[v]),N=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{questions:F.relevant_questions.map(G=>G.question),questionsLoading:!1})},[v]),j=d.useCallback(F=>{F.ref_id&&v(F.ref_id,{sources:F.sources.map(G=>G.ref_id),sourcesLoading:!1})},[v]),V=d.useCallback(F=>{b(F)},[b]),B=d.useCallback(F=>{F.question&&y($)&&v($,{answerLoading:!1,entities:F.entities})},[v,y,$]);return d.useEffect(()=>(C&&(C.connect(),C.on("connect_error",F=>{console.error("Socket connection error:",F)}),C.on("newnode",M),E&&C.on("extractedentitieshook",B),E&&C.on("askquestionhook",z),E&&C.on("relevantquestionshook",N),E&&C.on("answersourceshook",j),_&&C.on("new_node_created",V),E&&C.on("answeraudiohook",A)),()=>{C&&C.off()}),[C,M,V,_,z,E,N,j,B,A]),d.useEffect(()=>{w||u()},[u,w]),T.jsxs(T.Fragment,{children:[T.jsx(ey,{}),T.jsx(cv,{}),T.jsx(dl,{hidden:!Zl}),T.jsx(d.Suspense,{fallback:T.jsx("div",{children:"Loading..."}),children:w?null:T.jsxs($v,{direction:"row",children:[T.jsxs(Fb,{...R,children:[T.jsx(_v,{}),!l&&T.jsx(Tv,{}),T.jsx(Sv,{}),T.jsx(Fy,{}),T.jsx(rv,{}),T.jsxs(Cv,{children:["v",Hy]}),T.jsx(Rl,{})]}),T.jsx(nv,{}),T.jsx(Ev,{})]})})]})},Vv=Object.freeze(Object.defineProperty({__proto__:null,App:kv},Symbol.toStringTag,{value:"Module"}));export{kl as A,Aa as B,cy as C,zv as D,Vv as E,Fb as F,ly as G,wa as I,Fy as O,gy as P,Py as T,mn as _,Lv as a,Oy as b,Fv as c,uu as d,Pi as e,ru as f,Yn as g,Br as h,Jb as i,Jl as j,hy as k,ay as l,my as m,yy as n,uy as o,xa as p,Nv as q,bp as r,Ov as s,tu as t,sy as u,eu as v,du as w,Ii as x,de as y,W as z}; diff --git a/build/assets/index-19fbac0a.js b/build/assets/index-6925fbee.js similarity index 92% rename from build/assets/index-19fbac0a.js rename to build/assets/index-6925fbee.js index 9e5b1d87d..9616489d2 100644 --- a/build/assets/index-19fbac0a.js +++ b/build/assets/index-6925fbee.js @@ -1,4 +1,4 @@ -import{o as v,q,T as F,F as n,r as x,j as e,aW as K,b8 as $,K as J,y as U,b9 as Q,O as D,aV as z,bk as X,bn as Z}from"./index-a0989d63.js";import{h as V,B as E,i as N,F as ee}from"./index-775b6bc6.js";import{B as te}from"./index-f06622e3.js";import{T as re}from"./index-3d0189dc.js";import{p as W}from"./index-44e303ef.js";import{n as ne,A as G}from"./index-6f4f8df4.js";import{C as Y}from"./ClipLoader-f345d5d1.js";import{c as oe}from"./index-64f1c910.js";import"./index.esm-d308c31f.js";import"./InfoIcon-4aad7e99.js";import"./three.module-2ce81f73.js";import"./Stack-98b5acbc.js";import"./useSlotProps-374609c4.js";import"./Popover-6e322384.js";import"./createSvgIcon-ebe0e3e6.js";import"./TextareaAutosize-76d3e8d6.js";const M=s=>s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," "),k=s=>s?[...s].sort((l,m)=>Number(m.required)-Number(l.required)):[],H=s=>s?s.filter(l=>l.key!=="node_key"):[],se=({handleSelectType:s,skipToStep:l,nodeType:m,selectedValues:r})=>{const[f,w]=x.useState(!1),[h,C]=x.useState(),{watch:j,formState:{isValid:t}}=V();x.useEffect(()=>{(async()=>{w(!0);const o=await $(m),T=W(o),A=H(T);C(A),w(!1)})()},[m,j]);const a=c=>c.charAt(0).toUpperCase()+c.slice(1).replace(/_/g," "),p=(h?[...h].sort((c,o)=>c.required&&!o.required?-1:!c.required&&o.required?1:0):[]).filter(c=>!!(c.required&&!Object.values(r).includes(c.key))),S=()=>{s(""),l("sourceType")},b=!t||f||p.some(c=>{var o;return c.required&&!((o=j(c.key))!=null&&o.trim())});return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(ae,{children:"Required Properties"})})}),e.jsx(ie,{children:f?e.jsx(n,{style:{margin:"auto"},children:e.jsx(Y,{color:q.SECONDARY_BLUE})}):e.jsx(n,{className:"input__wrapper",children:p==null?void 0:p.map(({key:c,required:o})=>e.jsx(e.Fragment,{children:e.jsxs(ce,{children:[e.jsx(F,{children:a(c)}),e.jsx(re,{id:"item-name",maxLength:50,name:c,placeholder:o?"Required":"Optional",rules:{...o?{...K,pattern:{message:"No leading whitespace allowed",value:ne}}:{}}})]})}))})}),e.jsxs(n,{direction:"row",children:[e.jsx(n,{grow:1,children:e.jsx(E,{color:"secondary",onClick:S,size:"large",variant:"contained",children:"Prev"})}),e.jsx(n,{grow:1,ml:20,children:e.jsx(E,{color:"secondary",disabled:b,onClick:()=>l("createConfirmation"),size:"large",variant:"contained",children:"Next"})})]})]})},ae=v(F)` +import{o as v,q,T as F,F as n,r as x,j as e,aW as K,b8 as $,K as J,y as U,b9 as Q,O as D,aV as z,bk as X,bn as Z}from"./index-022521cf.js";import{h as V,B as E,i as N,F as ee}from"./index-586dfb7f.js";import{B as te}from"./index-ee20ad28.js";import{T as re}from"./index-b5c86aa6.js";import{p as W}from"./index-44e303ef.js";import{n as ne,A as G}from"./index-39c958ca.js";import{C as Y}from"./ClipLoader-d8628c6c.js";import{c as oe}from"./index-64f1c910.js";import"./index.esm-38ac4e4f.js";import"./InfoIcon-b7d3736d.js";import"./three.module-2ce81f73.js";import"./Stack-ce2a5ec5.js";import"./useSlotProps-51fc8b9f.js";import"./Popover-cc3c7b26.js";import"./createSvgIcon-e1ebdfca.js";import"./TextareaAutosize-0ace781b.js";const M=s=>s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," "),k=s=>s?[...s].sort((l,m)=>Number(m.required)-Number(l.required)):[],H=s=>s?s.filter(l=>l.key!=="node_key"):[],se=({handleSelectType:s,skipToStep:l,nodeType:m,selectedValues:r})=>{const[f,w]=x.useState(!1),[h,C]=x.useState(),{watch:j,formState:{isValid:t}}=V();x.useEffect(()=>{(async()=>{w(!0);const o=await $(m),T=W(o),A=H(T);C(A),w(!1)})()},[m,j]);const a=c=>c.charAt(0).toUpperCase()+c.slice(1).replace(/_/g," "),p=(h?[...h].sort((c,o)=>c.required&&!o.required?-1:!c.required&&o.required?1:0):[]).filter(c=>!!(c.required&&!Object.values(r).includes(c.key))),S=()=>{s(""),l("sourceType")},b=!t||f||p.some(c=>{var o;return c.required&&!((o=j(c.key))!=null&&o.trim())});return e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(ae,{children:"Required Properties"})})}),e.jsx(ie,{children:f?e.jsx(n,{style:{margin:"auto"},children:e.jsx(Y,{color:q.SECONDARY_BLUE})}):e.jsx(n,{className:"input__wrapper",children:p==null?void 0:p.map(({key:c,required:o})=>e.jsx(e.Fragment,{children:e.jsxs(ce,{children:[e.jsx(F,{children:a(c)}),e.jsx(re,{id:"item-name",maxLength:50,name:c,placeholder:o?"Required":"Optional",rules:{...o?{...K,pattern:{message:"No leading whitespace allowed",value:ne}}:{}}})]})}))})}),e.jsxs(n,{direction:"row",children:[e.jsx(n,{grow:1,children:e.jsx(E,{color:"secondary",onClick:S,size:"large",variant:"contained",children:"Prev"})}),e.jsx(n,{grow:1,ml:20,children:e.jsx(E,{color:"secondary",disabled:b,onClick:()=>l("createConfirmation"),size:"large",variant:"contained",children:"Next"})})]})]})},ae=v(F)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-26de62a9.js b/build/assets/index-7be8daa0.js similarity index 91% rename from build/assets/index-26de62a9.js rename to build/assets/index-7be8daa0.js index 0bf7a92f2..d704a8b26 100644 --- a/build/assets/index-26de62a9.js +++ b/build/assets/index-7be8daa0.js @@ -1,4 +1,4 @@ -import{r,j as e,bf as F,a7 as O,F as h,bg as E,o as l,T as k,O as I,y as A,q as T,bh as N}from"./index-a0989d63.js";import{B as z}from"./index-f06622e3.js";import{k as D,i as M,F as Y,B as P}from"./index-775b6bc6.js";import{S as X,A as G,N as H,F as R,b as q}from"./NodeCircleIcon-2908ceb4.js";import{A as L,O as V,T as W}from"./index-6f4f8df4.js";import{C as _}from"./ClipLoader-f345d5d1.js";import"./Stack-98b5acbc.js";import"./useSlotProps-374609c4.js";import"./Popover-6e322384.js";import"./createSvgIcon-ebe0e3e6.js";import"./TextareaAutosize-76d3e8d6.js";const $=({selectedType:t,setSelectedType:c})=>{const[p,d]=r.useState([]);r.useEffect(()=>{(async()=>{try{const{data:x}=await F();d(x.edge_types)}catch(x){console.warn(x)}})()},[d]);const a=o=>({label:o,value:o}),f=o=>{c((o==null?void 0:o.value)||"")};return e.jsx(L,{onSelect:f,options:p.map(a),selectedValue:t?a(t):null})},J=({onSelect:t,selectedValue:c,topicId:p})=>{const[d,a]=r.useState([]),[f,o]=r.useState(!1),x=r.useMemo(()=>{const s=async u=>{const i={is_muted:"False",sort_by:G,search:u,skip:"0",limit:"1000"};o(!0);try{const w=(await E(i.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==p);a(w)}catch{a([])}finally{o(!1)}};return O.debounce(s,300)},[p]),b=s=>{const u=s.trim();if(!u){a([]);return}u.length>2&&x(s)},j=s=>{const u=s?d.find(i=>i.ref_id===s.value):null;t(u||null)},n=s=>({label:s.search_value,value:s.ref_id,type:s.node_type}),v=s=>s.map(n);return c?e.jsxs(h,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:c.search_value}),e.jsx(X,{onClick:()=>t(null),size:"medium",children:e.jsx(D,{})})]}):e.jsx(L,{handleInputChange:b,isLoading:f,onSelect:j,options:v(d)||V,selectedValue:c?n(c):null})},K=({from:t,onSelect:c,selectedType:p,setSelectedType:d,selectedToNode:a,setIsSwapped:f,isSwapped:o})=>{const x=()=>{f()},b=t&&("search_value"in t?t.search_value:t.name);return e.jsxs(h,{mb:20,children:[e.jsx(h,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(h,{align:"center",direction:"row",children:e.jsx(U,{children:"Add Edge"})})}),e.jsxs(Z,{swap:o,children:[e.jsx(h,{children:e.jsx(ee,{disabled:!0,label:o?"To":"From",swap:o,value:b})}),e.jsxs(h,{my:16,children:[e.jsx(oe,{children:"Type"}),e.jsx($,{selectedType:p,setSelectedType:d})]}),e.jsx(h,{children:e.jsxs(te,{children:[e.jsx(se,{children:o?"From":"To"}),e.jsx(J,{onSelect:c,selectedValue:a,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(Q,{children:[e.jsx(ne,{children:e.jsx(H,{})}),e.jsx(ae,{onClick:x,children:e.jsx(R,{})}),e.jsx(ie,{children:e.jsx(q,{})})]})]})]})},Q=l.div` +import{r,j as e,bf as F,a7 as O,F as h,bg as E,o as l,T as k,O as I,y as A,q as T,bh as N}from"./index-022521cf.js";import{B as z}from"./index-ee20ad28.js";import{k as D,i as M,F as Y,B as P}from"./index-586dfb7f.js";import{S as X,A as G,N as H,F as R,b as q}from"./NodeCircleIcon-e840b41b.js";import{A as L,O as V,T as W}from"./index-39c958ca.js";import{C as _}from"./ClipLoader-d8628c6c.js";import"./Stack-ce2a5ec5.js";import"./useSlotProps-51fc8b9f.js";import"./Popover-cc3c7b26.js";import"./createSvgIcon-e1ebdfca.js";import"./TextareaAutosize-0ace781b.js";const $=({selectedType:t,setSelectedType:c})=>{const[p,d]=r.useState([]);r.useEffect(()=>{(async()=>{try{const{data:x}=await F();d(x.edge_types)}catch(x){console.warn(x)}})()},[d]);const a=o=>({label:o,value:o}),f=o=>{c((o==null?void 0:o.value)||"")};return e.jsx(L,{onSelect:f,options:p.map(a),selectedValue:t?a(t):null})},J=({onSelect:t,selectedValue:c,topicId:p})=>{const[d,a]=r.useState([]),[f,o]=r.useState(!1),x=r.useMemo(()=>{const s=async u=>{const i={is_muted:"False",sort_by:G,search:u,skip:"0",limit:"1000"};o(!0);try{const w=(await E(i.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==p);a(w)}catch{a([])}finally{o(!1)}};return O.debounce(s,300)},[p]),b=s=>{const u=s.trim();if(!u){a([]);return}u.length>2&&x(s)},j=s=>{const u=s?d.find(i=>i.ref_id===s.value):null;t(u||null)},n=s=>({label:s.search_value,value:s.ref_id,type:s.node_type}),v=s=>s.map(n);return c?e.jsxs(h,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:c.search_value}),e.jsx(X,{onClick:()=>t(null),size:"medium",children:e.jsx(D,{})})]}):e.jsx(L,{handleInputChange:b,isLoading:f,onSelect:j,options:v(d)||V,selectedValue:c?n(c):null})},K=({from:t,onSelect:c,selectedType:p,setSelectedType:d,selectedToNode:a,setIsSwapped:f,isSwapped:o})=>{const x=()=>{f()},b=t&&("search_value"in t?t.search_value:t.name);return e.jsxs(h,{mb:20,children:[e.jsx(h,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(h,{align:"center",direction:"row",children:e.jsx(U,{children:"Add Edge"})})}),e.jsxs(Z,{swap:o,children:[e.jsx(h,{children:e.jsx(ee,{disabled:!0,label:o?"To":"From",swap:o,value:b})}),e.jsxs(h,{my:16,children:[e.jsx(oe,{children:"Type"}),e.jsx($,{selectedType:p,setSelectedType:d})]}),e.jsx(h,{children:e.jsxs(te,{children:[e.jsx(se,{children:o?"From":"To"}),e.jsx(J,{onSelect:c,selectedValue:a,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(Q,{children:[e.jsx(ne,{children:e.jsx(H,{})}),e.jsx(ae,{onClick:x,children:e.jsx(R,{})}),e.jsx(ie,{children:e.jsx(q,{})})]})]})]})},Q=l.div` position: absolute; top: 26px; bottom: 26px; diff --git a/build/assets/index-23d72e24.js b/build/assets/index-7d21ce0b.js similarity index 57% rename from build/assets/index-23d72e24.js rename to build/assets/index-7d21ce0b.js index c18f64132..44aa7a5d1 100644 --- a/build/assets/index-23d72e24.js +++ b/build/assets/index-7d21ce0b.js @@ -1,4 +1,4 @@ -import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c as Qt,bo as He,bp as ft,d as Jt,e as ge,f as Ct,ad as wo,ae as jo,o as k,q as T,b9 as ht,T as se,F as v,aW as Ye,bq as vo,br as Je,bs as Co,b8 as eo,O as to,bt as Eo,aV as xe,a9 as dt,a0 as Et,Z as Pt,Y as Tt,X as Mt,V as Po,M as To,ao as At}from"./index-a0989d63.js";import{B as Mo}from"./index-f06622e3.js";import{i as mt,B as Se,F as oo,k as xt,q as Ao,h as $o,I as So,r as ko,b as no}from"./index-775b6bc6.js";import{A as Me,O as Oo,n as _o,a as $t,N as so}from"./index-6f4f8df4.js";import{T as We}from"./index-3d0189dc.js";import{C as de}from"./ClipLoader-f345d5d1.js";import{D as ro}from"./DeleteIcon-32576b88.js";import{P as io}from"./PlusIcon-1147d96e.js";import{p as pt,c as Io,g as No}from"./index-44e303ef.js";import{e as zo}from"./Stack-98b5acbc.js";import{S as Ro,F as Lo}from"./FormControlLabel-770e209b.js";import{g as Bo,m as Do,u as ee,b as Ue,t as ut,T as ao,i as co,H as Vo,j as St,C as Fo,P as Go,k as Yo}from"./index-d15dc160.js";import{Z as Wo,_ as Ho,E as Uo,V as N,$ as he,a0 as me,a1 as kt,P as Ve,a2 as Fe,a3 as Ot,a as q,a4 as Zo,G as Xo,C as Ko}from"./three.module-2ce81f73.js";import"./Popover-6e322384.js";import"./useSlotProps-374609c4.js";import"./createSvgIcon-ebe0e3e6.js";import"./TextareaAutosize-76d3e8d6.js";import"./index.esm-d308c31f.js";import"./InfoIcon-4aad7e99.js";import"./Typography-d3022217.js";const qo=m.createContext(),_t=qo;function Qo(t){return Zt("MuiGrid",t)}const Jo=[0,1,2,3,4,5,6,7,8,9,10],en=["column-reverse","column","row-reverse","row"],tn=["nowrap","wrap-reverse","wrap"],Te=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],on=Xt("MuiGrid",["root","container","item","zeroMinWidth",...Jo.map(t=>`spacing-xs-${t}`),...en.map(t=>`direction-xs-${t}`),...tn.map(t=>`wrap-xs-${t}`),...Te.map(t=>`grid-xs-${t}`),...Te.map(t=>`grid-sm-${t}`),...Te.map(t=>`grid-md-${t}`),...Te.map(t=>`grid-lg-${t}`),...Te.map(t=>`grid-xl-${t}`)]),Ae=on,nn=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function be(t){const n=parseFloat(t);return`${n}${String(t).replace(String(n),"")||"px"}`}function sn({theme:t,ownerState:n}){let s;return t.breakpoints.keys.reduce((e,i)=>{let l={};if(n[i]&&(s=n[i]),!s)return e;if(s===!0)l={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(s==="auto")l={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const d=He({values:n.columns,breakpoints:t.breakpoints.values}),c=typeof d=="object"?d[i]:d;if(c==null)return e;const a=`${Math.round(s/c*1e8)/1e6}%`;let w={};if(n.container&&n.item&&n.columnSpacing!==0){const p=t.spacing(n.columnSpacing);if(p!=="0px"){const h=`calc(${a} + ${be(p)})`;w={flexBasis:h,maxWidth:h}}}l=U({flexBasis:a,flexGrow:0,maxWidth:a},w)}return t.breakpoints.values[i]===0?Object.assign(e,l):e[t.breakpoints.up(i)]=l,e},{})}function rn({theme:t,ownerState:n}){const s=He({values:n.direction,breakpoints:t.breakpoints.values});return ft({theme:t},s,e=>{const i={flexDirection:e};return e.indexOf("column")===0&&(i[`& > .${Ae.item}`]={maxWidth:"none"}),i})}function lo({breakpoints:t,values:n}){let s="";Object.keys(n).forEach(i=>{s===""&&n[i]!==0&&(s=i)});const e=Object.keys(t).sort((i,l)=>t[i]-t[l]);return e.slice(0,e.indexOf(s))}function an({theme:t,ownerState:n}){const{container:s,rowSpacing:e}=n;let i={};if(s&&e!==0){const l=He({values:e,breakpoints:t.breakpoints.values});let d;typeof l=="object"&&(d=lo({breakpoints:t.breakpoints.values,values:l})),i=ft({theme:t},l,(c,a)=>{var w;const p=t.spacing(c);return p!=="0px"?{marginTop:`-${be(p)}`,[`& > .${Ae.item}`]:{paddingTop:be(p)}}:(w=d)!=null&&w.includes(a)?{}:{marginTop:0,[`& > .${Ae.item}`]:{paddingTop:0}}})}return i}function cn({theme:t,ownerState:n}){const{container:s,columnSpacing:e}=n;let i={};if(s&&e!==0){const l=He({values:e,breakpoints:t.breakpoints.values});let d;typeof l=="object"&&(d=lo({breakpoints:t.breakpoints.values,values:l})),i=ft({theme:t},l,(c,a)=>{var w;const p=t.spacing(c);return p!=="0px"?{width:`calc(100% + ${be(p)})`,marginLeft:`-${be(p)}`,[`& > .${Ae.item}`]:{paddingLeft:be(p)}}:(w=d)!=null&&w.includes(a)?{}:{width:"100%",marginLeft:0,[`& > .${Ae.item}`]:{paddingLeft:0}}})}return i}function ln(t,n,s={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[s[`spacing-xs-${String(t)}`]];const e=[];return n.forEach(i=>{const l=t[i];Number(l)>0&&e.push(s[`spacing-${i}-${String(l)}`])}),e}const dn=$e("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t,{container:e,direction:i,item:l,spacing:d,wrap:c,zeroMinWidth:a,breakpoints:w}=s;let p=[];e&&(p=ln(d,w,n));const h=[];return w.forEach(x=>{const g=s[x];g&&h.push(n[`grid-${x}-${String(g)}`])}),[n.root,e&&n.container,l&&n.item,a&&n.zeroMinWidth,...p,i!=="row"&&n[`direction-xs-${String(i)}`],c!=="wrap"&&n[`wrap-xs-${String(c)}`],...h]}})(({ownerState:t})=>U({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),rn,an,cn,sn);function pn(t,n){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const s=[];return n.forEach(e=>{const i=t[e];if(Number(i)>0){const l=`spacing-${e}-${String(i)}`;s.push(l)}}),s}const un=t=>{const{classes:n,container:s,direction:e,item:i,spacing:l,wrap:d,zeroMinWidth:c,breakpoints:a}=t;let w=[];s&&(w=pn(l,a));const p=[];a.forEach(x=>{const g=t[x];g&&p.push(`grid-${x}-${String(g)}`)});const h={root:["root",s&&"container",i&&"item",c&&"zeroMinWidth",...w,e!=="row"&&`direction-xs-${String(e)}`,d!=="wrap"&&`wrap-xs-${String(d)}`,...p]};return Jt(h,Qo,n)},fn=m.forwardRef(function(n,s){const e=Kt({props:n,name:"MuiGrid"}),{breakpoints:i}=yo(),l=zo(e),{className:d,columns:c,columnSpacing:a,component:w="div",container:p=!1,direction:h="row",item:x=!1,rowSpacing:g,spacing:b=0,wrap:$="wrap",zeroMinWidth:y=!1}=l,C=qt(l,nn),j=g||b,z=a||b,E=m.useContext(_t),P=p?c||12:E,I={},D=U({},C);i.keys.forEach(f=>{C[f]!=null&&(I[f]=C[f],delete D[f])});const R=U({},l,{columns:P,container:p,direction:h,item:x,rowSpacing:j,columnSpacing:z,wrap:$,zeroMinWidth:y,spacing:b},I,{breakpoints:i.keys}),V=un(R);return o.jsx(_t.Provider,{value:P,children:o.jsx(dn,U({ownerState:R,className:Qt(V.root,d),as:w,ref:s},D))})}),re=fn;function hn(t){return Zt("MuiSwitch",t)}const mn=Xt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),H=mn,xn=["className","color","edge","size","sx"],gn=t=>{const{classes:n,edge:s,size:e,color:i,checked:l,disabled:d}=t,c={root:["root",s&&`edge${ge(s)}`,`size${ge(e)}`],switchBase:["switchBase",`color${ge(i)}`,l&&"checked",d&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},a=Jt(c,hn,n);return U({},n,a)},bn=$e("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.edge&&n[`edge${ge(s.edge)}`],n[`size${ge(s.size)}`]]}})(({ownerState:t})=>U({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},t.edge==="start"&&{marginLeft:-8},t.edge==="end"&&{marginRight:-8},t.size==="small"&&{width:40,height:24,padding:7,[`& .${H.thumb}`]:{width:16,height:16},[`& .${H.switchBase}`]:{padding:4,[`&.${H.checked}`]:{transform:"translateX(16px)"}}})),yn=$e(Ro,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.switchBase,{[`& .${H.input}`]:n.input},s.color!=="default"&&n[`color${ge(s.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${H.checked}`]:{transform:"translateX(20px)"},[`&.${H.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${H.checked} + .${H.track}`]:{opacity:.5},[`&.${H.disabled} + .${H.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${H.input}`]:{left:"-100%",width:"300%"}}),({theme:t,ownerState:n})=>U({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Ct(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},n.color!=="default"&&{[`&.${H.checked}`]:{color:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Ct(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${H.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${n.color}DisabledColor`]:`${t.palette.mode==="light"?wo(t.palette[n.color].main,.62):jo(t.palette[n.color].main,.55)}`}},[`&.${H.checked} + .${H.track}`]:{backgroundColor:(t.vars||t).palette[n.color].main}})),wn=$e("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,n)=>n.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),jn=$e("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,n)=>n.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),vn=m.forwardRef(function(n,s){const e=Kt({props:n,name:"MuiSwitch"}),{className:i,color:l="primary",edge:d=!1,size:c="medium",sx:a}=e,w=qt(e,xn),p=U({},e,{color:l,edge:d,size:c}),h=gn(p),x=o.jsx(jn,{className:h.thumb,ownerState:p});return o.jsxs(bn,{className:Qt(h.root,i),sx:a,ownerState:p,children:[o.jsx(yn,U({type:"checkbox",icon:x,checkedIcon:x,ref:s,ownerState:p},w,{classes:U({},h,{root:h.switchBase})})),o.jsx(wn,{className:h.track,ownerState:p})]})}),po=vn,Cn={type:"",parent:""},It=({onSelect:t,dataTestId:n,edgeLink:s,hideSelectAll:e,placeholder:i})=>{const l=mt({mode:"onChange",defaultValues:Cn}),{watch:d,setValue:c}=l,[a,w]=m.useState([]),[p,h]=m.useState(!1),x=y=>{c("parent",(y==null?void 0:y.value)||""),t(y==null?void 0:y.value)},g=y=>y.charAt(0).toUpperCase()+y.slice(1);m.useEffect(()=>{(async()=>{h(!0);try{const j=(await ht()).schemas.filter(E=>!E.is_deleted&&E.type).map(E=>(E==null?void 0:E.type)==="thing"?{label:"No Parent",value:E.type}:{label:g(E.type),value:E.type});w(e?j:[{label:"Select all",value:"all"},...j]),s&&c("parent",s)}catch(C){console.warn(C)}finally{h(!1)}})()},[s,c,e]);const b=d("parent"),$=()=>{const y=a==null?void 0:a.find(C=>C.value===b);if(y)return y;if(s)return{label:s,value:s}};return o.jsx(En,{dataTestId:n,disabled:!!s,isLoading:p,onSelect:x,options:a||Oo,placeholder:i,selectedValue:$()})},En=k(Me)` +import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c as Qt,bo as He,bp as ft,d as Jt,e as ge,f as Ct,ad as wo,ae as jo,o as O,q as T,b9 as ht,T as re,F as v,aW as Ye,bq as vo,br as Je,bs as Co,b8 as eo,O as to,bt as Eo,aV as xe,a9 as dt,a0 as Et,Z as Pt,Y as Tt,X as Mt,V as Po,M as To,ao as At}from"./index-022521cf.js";import{B as Mo}from"./index-ee20ad28.js";import{i as mt,B as ke,F as oo,k as xt,q as Ao,h as $o,I as ko,r as Oo,b as no}from"./index-586dfb7f.js";import{A as Me,O as So,n as _o,a as $t,N as so}from"./index-39c958ca.js";import{T as We}from"./index-b5c86aa6.js";import{C as de}from"./ClipLoader-d8628c6c.js";import{D as ro}from"./DeleteIcon-afd5d6e5.js";import{P as io}from"./PlusIcon-6ec48130.js";import{p as pt,c as Io,g as zo}from"./index-44e303ef.js";import{e as No}from"./Stack-ce2a5ec5.js";import{S as Ro,F as Lo}from"./FormControlLabel-8c91edc9.js";import{g as Bo,m as Do,u as te,b as Ue,t as ut,T as ao,i as co,H as Vo,j as kt,C as Fo,P as Go,k as Yo}from"./index-c116778d.js";import{Z as Wo,_ as Ho,E as Uo,V as z,$ as he,a0 as me,a1 as Ot,P as Ve,a2 as Fe,a3 as St,a as Q,a4 as Zo,G as Xo,C as Ko}from"./three.module-2ce81f73.js";import"./Popover-cc3c7b26.js";import"./useSlotProps-51fc8b9f.js";import"./createSvgIcon-e1ebdfca.js";import"./TextareaAutosize-0ace781b.js";import"./index.esm-38ac4e4f.js";import"./InfoIcon-b7d3736d.js";import"./Typography-13dc67f3.js";const qo=m.createContext(),_t=qo;function Qo(t){return Zt("MuiGrid",t)}const Jo=[0,1,2,3,4,5,6,7,8,9,10],en=["column-reverse","column","row-reverse","row"],tn=["nowrap","wrap-reverse","wrap"],Te=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],on=Xt("MuiGrid",["root","container","item","zeroMinWidth",...Jo.map(t=>`spacing-xs-${t}`),...en.map(t=>`direction-xs-${t}`),...tn.map(t=>`wrap-xs-${t}`),...Te.map(t=>`grid-xs-${t}`),...Te.map(t=>`grid-sm-${t}`),...Te.map(t=>`grid-md-${t}`),...Te.map(t=>`grid-lg-${t}`),...Te.map(t=>`grid-xl-${t}`)]),Ae=on,nn=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function be(t){const n=parseFloat(t);return`${n}${String(t).replace(String(n),"")||"px"}`}function sn({theme:t,ownerState:n}){let s;return t.breakpoints.keys.reduce((e,i)=>{let l={};if(n[i]&&(s=n[i]),!s)return e;if(s===!0)l={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(s==="auto")l={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const d=He({values:n.columns,breakpoints:t.breakpoints.values}),c=typeof d=="object"?d[i]:d;if(c==null)return e;const a=`${Math.round(s/c*1e8)/1e6}%`;let w={};if(n.container&&n.item&&n.columnSpacing!==0){const p=t.spacing(n.columnSpacing);if(p!=="0px"){const h=`calc(${a} + ${be(p)})`;w={flexBasis:h,maxWidth:h}}}l=U({flexBasis:a,flexGrow:0,maxWidth:a},w)}return t.breakpoints.values[i]===0?Object.assign(e,l):e[t.breakpoints.up(i)]=l,e},{})}function rn({theme:t,ownerState:n}){const s=He({values:n.direction,breakpoints:t.breakpoints.values});return ft({theme:t},s,e=>{const i={flexDirection:e};return e.indexOf("column")===0&&(i[`& > .${Ae.item}`]={maxWidth:"none"}),i})}function lo({breakpoints:t,values:n}){let s="";Object.keys(n).forEach(i=>{s===""&&n[i]!==0&&(s=i)});const e=Object.keys(t).sort((i,l)=>t[i]-t[l]);return e.slice(0,e.indexOf(s))}function an({theme:t,ownerState:n}){const{container:s,rowSpacing:e}=n;let i={};if(s&&e!==0){const l=He({values:e,breakpoints:t.breakpoints.values});let d;typeof l=="object"&&(d=lo({breakpoints:t.breakpoints.values,values:l})),i=ft({theme:t},l,(c,a)=>{var w;const p=t.spacing(c);return p!=="0px"?{marginTop:`-${be(p)}`,[`& > .${Ae.item}`]:{paddingTop:be(p)}}:(w=d)!=null&&w.includes(a)?{}:{marginTop:0,[`& > .${Ae.item}`]:{paddingTop:0}}})}return i}function cn({theme:t,ownerState:n}){const{container:s,columnSpacing:e}=n;let i={};if(s&&e!==0){const l=He({values:e,breakpoints:t.breakpoints.values});let d;typeof l=="object"&&(d=lo({breakpoints:t.breakpoints.values,values:l})),i=ft({theme:t},l,(c,a)=>{var w;const p=t.spacing(c);return p!=="0px"?{width:`calc(100% + ${be(p)})`,marginLeft:`-${be(p)}`,[`& > .${Ae.item}`]:{paddingLeft:be(p)}}:(w=d)!=null&&w.includes(a)?{}:{width:"100%",marginLeft:0,[`& > .${Ae.item}`]:{paddingLeft:0}}})}return i}function ln(t,n,s={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[s[`spacing-xs-${String(t)}`]];const e=[];return n.forEach(i=>{const l=t[i];Number(l)>0&&e.push(s[`spacing-${i}-${String(l)}`])}),e}const dn=$e("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t,{container:e,direction:i,item:l,spacing:d,wrap:c,zeroMinWidth:a,breakpoints:w}=s;let p=[];e&&(p=ln(d,w,n));const h=[];return w.forEach(x=>{const g=s[x];g&&h.push(n[`grid-${x}-${String(g)}`])}),[n.root,e&&n.container,l&&n.item,a&&n.zeroMinWidth,...p,i!=="row"&&n[`direction-xs-${String(i)}`],c!=="wrap"&&n[`wrap-xs-${String(c)}`],...h]}})(({ownerState:t})=>U({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),rn,an,cn,sn);function pn(t,n){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const s=[];return n.forEach(e=>{const i=t[e];if(Number(i)>0){const l=`spacing-${e}-${String(i)}`;s.push(l)}}),s}const un=t=>{const{classes:n,container:s,direction:e,item:i,spacing:l,wrap:d,zeroMinWidth:c,breakpoints:a}=t;let w=[];s&&(w=pn(l,a));const p=[];a.forEach(x=>{const g=t[x];g&&p.push(`grid-${x}-${String(g)}`)});const h={root:["root",s&&"container",i&&"item",c&&"zeroMinWidth",...w,e!=="row"&&`direction-xs-${String(e)}`,d!=="wrap"&&`wrap-xs-${String(d)}`,...p]};return Jt(h,Qo,n)},fn=m.forwardRef(function(n,s){const e=Kt({props:n,name:"MuiGrid"}),{breakpoints:i}=yo(),l=No(e),{className:d,columns:c,columnSpacing:a,component:w="div",container:p=!1,direction:h="row",item:x=!1,rowSpacing:g,spacing:b=0,wrap:k="wrap",zeroMinWidth:y=!1}=l,C=qt(l,nn),j=g||b,N=a||b,E=m.useContext(_t),P=p?c||12:E,I={},V=U({},C);i.keys.forEach(f=>{C[f]!=null&&(I[f]=C[f],delete V[f])});const L=U({},l,{columns:P,container:p,direction:h,item:x,rowSpacing:j,columnSpacing:N,wrap:k,zeroMinWidth:y,spacing:b},I,{breakpoints:i.keys}),D=un(L);return o.jsx(_t.Provider,{value:P,children:o.jsx(dn,U({ownerState:L,className:Qt(D.root,d),as:w,ref:s},V))})}),ie=fn;function hn(t){return Zt("MuiSwitch",t)}const mn=Xt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),H=mn,xn=["className","color","edge","size","sx"],gn=t=>{const{classes:n,edge:s,size:e,color:i,checked:l,disabled:d}=t,c={root:["root",s&&`edge${ge(s)}`,`size${ge(e)}`],switchBase:["switchBase",`color${ge(i)}`,l&&"checked",d&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},a=Jt(c,hn,n);return U({},n,a)},bn=$e("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.edge&&n[`edge${ge(s.edge)}`],n[`size${ge(s.size)}`]]}})(({ownerState:t})=>U({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},t.edge==="start"&&{marginLeft:-8},t.edge==="end"&&{marginRight:-8},t.size==="small"&&{width:40,height:24,padding:7,[`& .${H.thumb}`]:{width:16,height:16},[`& .${H.switchBase}`]:{padding:4,[`&.${H.checked}`]:{transform:"translateX(16px)"}}})),yn=$e(Ro,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.switchBase,{[`& .${H.input}`]:n.input},s.color!=="default"&&n[`color${ge(s.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${H.checked}`]:{transform:"translateX(20px)"},[`&.${H.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${H.checked} + .${H.track}`]:{opacity:.5},[`&.${H.disabled} + .${H.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${H.input}`]:{left:"-100%",width:"300%"}}),({theme:t,ownerState:n})=>U({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Ct(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},n.color!=="default"&&{[`&.${H.checked}`]:{color:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Ct(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${H.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${n.color}DisabledColor`]:`${t.palette.mode==="light"?wo(t.palette[n.color].main,.62):jo(t.palette[n.color].main,.55)}`}},[`&.${H.checked} + .${H.track}`]:{backgroundColor:(t.vars||t).palette[n.color].main}})),wn=$e("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,n)=>n.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),jn=$e("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,n)=>n.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),vn=m.forwardRef(function(n,s){const e=Kt({props:n,name:"MuiSwitch"}),{className:i,color:l="primary",edge:d=!1,size:c="medium",sx:a}=e,w=qt(e,xn),p=U({},e,{color:l,edge:d,size:c}),h=gn(p),x=o.jsx(jn,{className:h.thumb,ownerState:p});return o.jsxs(bn,{className:Qt(h.root,i),sx:a,ownerState:p,children:[o.jsx(yn,U({type:"checkbox",icon:x,checkedIcon:x,ref:s,ownerState:p},w,{classes:U({},h,{root:h.switchBase})})),o.jsx(wn,{className:h.track,ownerState:p})]})}),po=vn,Cn={type:"",parent:""},It=({onSelect:t,dataTestId:n,edgeLink:s,hideSelectAll:e,placeholder:i})=>{const l=mt({mode:"onChange",defaultValues:Cn}),{watch:d,setValue:c}=l,[a,w]=m.useState([]),[p,h]=m.useState(!1),x=y=>{c("parent",(y==null?void 0:y.value)||""),t(y==null?void 0:y.value)},g=y=>y.charAt(0).toUpperCase()+y.slice(1);m.useEffect(()=>{(async()=>{h(!0);try{const j=(await ht()).schemas.filter(E=>!E.is_deleted&&E.type).map(E=>(E==null?void 0:E.type)==="thing"?{label:"No Parent",value:E.type}:{label:g(E.type),value:E.type});w(e?j:[{label:"Select all",value:"all"},...j]),s&&c("parent",s)}catch(C){console.warn(C)}finally{h(!1)}})()},[s,c,e]);const b=d("parent"),k=()=>{const y=a==null?void 0:a.find(C=>C.value===b);if(y)return y;if(s)return{label:s,value:s}};return o.jsx(En,{dataTestId:n,disabled:!!s,isLoading:p,onSelect:x,options:a||So,placeholder:i,selectedValue:k()})},En=O(Me)` .MuiInputBase-input { font-family: Barlow; font-size: 14px; @@ -24,7 +24,7 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a && .MuiInput-input.MuiInputBase-input { padding-left: 0; } -`,Pn=({selectedType:t,setSelectedFromNode:n,setSelectedToNode:s,edgeLinkData:e,selectedFromNode:i,selectedToNode:l})=>{const d=l==="all",c=i==="all";return o.jsxs(v,{mt:8,children:[o.jsxs(v,{mb:25,children:[o.jsx(v,{mb:5,children:o.jsx(et,{children:"Source"})}),o.jsx(It,{dataTestId:"from_node",edgeLink:e==null?void 0:e.source,hideSelectAll:d,onSelect:n,placeholder:"Source Name"})]}),o.jsxs(v,{mb:10,children:[o.jsx(v,{mb:5,children:o.jsx(et,{children:"Edge Name"})}),o.jsx(v,{mb:12,children:o.jsx(We,{id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter Edge Name",rules:{...Ye,pattern:{message:"No leading whitespace allowed",value:_o}},value:t})})]}),o.jsxs(v,{mb:25,children:[o.jsx(v,{mb:5,children:o.jsx(et,{children:"Destination"})}),o.jsx(It,{dataTestId:"to_node",edgeLink:e==null?void 0:e.target,hideSelectAll:c,onSelect:s,placeholder:"Select Destination"})]})]})},et=k(se)` +`,Pn=({selectedType:t,setSelectedFromNode:n,setSelectedToNode:s,edgeLinkData:e,selectedFromNode:i,selectedToNode:l})=>{const d=l==="all",c=i==="all";return o.jsxs(v,{mt:8,children:[o.jsxs(v,{mb:25,children:[o.jsx(v,{mb:5,children:o.jsx(et,{children:"Source"})}),o.jsx(It,{dataTestId:"from_node",edgeLink:e==null?void 0:e.source,hideSelectAll:d,onSelect:n,placeholder:"Source Name"})]}),o.jsxs(v,{mb:10,children:[o.jsx(v,{mb:5,children:o.jsx(et,{children:"Edge Name"})}),o.jsx(v,{mb:12,children:o.jsx(We,{id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter Edge Name",rules:{...Ye,pattern:{message:"No leading whitespace allowed",value:_o}},value:t})})]}),o.jsxs(v,{mb:25,children:[o.jsx(v,{mb:5,children:o.jsx(et,{children:"Destination"})}),o.jsx(It,{dataTestId:"to_node",edgeLink:e==null?void 0:e.target,hideSelectAll:c,onSelect:s,placeholder:"Select Destination"})]})]})},et=O(re)` font-family: Barlow; font-size: 12px; font-weight: 400; @@ -33,12 +33,12 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a text-align: left; margin-left: 1px; color: ${T.mainBottomIcons}; -`,Tn=({onCancel:t,edgeLinkData:n,setGraphLoading:s})=>{var I,D,R;const e=mt({mode:"onChange"}),{setValue:i,getValues:l}=e,[d,c]=m.useState(!1),[a,w]=m.useState(!1),[p,h]=m.useState(""),[x,g]=m.useState(""),[b,$]=m.useState(""),y=e.watch("type");m.useEffect(()=>{i("type",n==null?void 0:n.edgeType)},[n==null?void 0:n.edgeType,i]),m.useEffect(()=>{h(y)},[y]);const C=e.handleSubmit(async V=>{c(!0),s(!0);const f={source:x,target:b,edge_type:V.type},O={ref_id:n==null?void 0:n.refId,edge_type:V.type};try{if(n!=null&&n.refId)await vo(O);else if(b&&x)if(x==="all"||b==="all"){const _=(await ht()).schemas.filter(G=>!G.is_deleted&&G.type).map(G=>G.type);x==="all"?await Promise.all(_.map(G=>Je({...f,source:G}))):b==="all"&&await Promise.all(_.map(G=>Je({...f,target:G})))}else await Je(f)}catch(F){console.warn("API Error:",F)}finally{c(!1),s(!1),g(""),$(""),t()}}),j=(D=(I=l())==null?void 0:I.type)==null?void 0:D.trim(),z=j&&((R=n==null?void 0:n.edgeType)==null?void 0:R.trim())!==j,E=n!=null&&n.refId?d||!z:d||!b.trim()||!x.trim()||!p.trim(),P=async()=>{w(!0),s(!0);try{n!=null&&n.refId&&await Co(n==null?void 0:n.refId)}catch(V){console.warn("API Error:",V)}finally{w(!1),s(!1),g(""),$(""),t()}};return o.jsx(oo,{...e,children:o.jsxs("form",{id:"add-type-form",onSubmit:C,children:[o.jsx(Pn,{edgeLinkData:n,selectedFromNode:x,selectedToNode:b,selectedType:p,setSelectedFromNode:g,setSelectedToNode:$}),o.jsxs(v,{direction:"row",justify:"space-between",mt:20,children:[(n==null?void 0:n.refId)&&o.jsx(v,{direction:"column",children:o.jsxs(An,{color:"secondary",disabled:a,onClick:P,size:"large",style:{marginRight:20},variant:"contained",children:["Delete",a&&o.jsxs(Nt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]})}),o.jsxs(Mn,{color:"secondary",disabled:E,onClick:C,size:"large",variant:"contained",children:["Confirm",d&&o.jsxs(Nt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]})]})]})})},Mn=k(Se)` +`,Tn=({onCancel:t,edgeLinkData:n,setGraphLoading:s})=>{var I,V,L;const e=mt({mode:"onChange"}),{setValue:i,getValues:l}=e,[d,c]=m.useState(!1),[a,w]=m.useState(!1),[p,h]=m.useState(""),[x,g]=m.useState(""),[b,k]=m.useState(""),y=e.watch("type");m.useEffect(()=>{i("type",n==null?void 0:n.edgeType)},[n==null?void 0:n.edgeType,i]),m.useEffect(()=>{h(y)},[y]);const C=e.handleSubmit(async D=>{c(!0),s(!0);const f={source:x,target:b,edge_type:D.type},S={ref_id:n==null?void 0:n.refId,edge_type:D.type};try{if(n!=null&&n.refId)await vo(S);else if(b&&x)if(x==="all"||b==="all"){const _=(await ht()).schemas.filter(G=>!G.is_deleted&&G.type).map(G=>G.type);x==="all"?await Promise.all(_.map(G=>Je({...f,source:G}))):b==="all"&&await Promise.all(_.map(G=>Je({...f,target:G})))}else await Je(f)}catch(F){console.warn("API Error:",F)}finally{c(!1),s(!1),g(""),k(""),t()}}),j=(V=(I=l())==null?void 0:I.type)==null?void 0:V.trim(),N=j&&((L=n==null?void 0:n.edgeType)==null?void 0:L.trim())!==j,E=n!=null&&n.refId?d||!N:d||!b.trim()||!x.trim()||!p.trim(),P=async()=>{w(!0),s(!0);try{n!=null&&n.refId&&await Co(n==null?void 0:n.refId)}catch(D){console.warn("API Error:",D)}finally{w(!1),s(!1),g(""),k(""),t()}};return o.jsx(oo,{...e,children:o.jsxs("form",{id:"add-type-form",onSubmit:C,children:[o.jsx(Pn,{edgeLinkData:n,selectedFromNode:x,selectedToNode:b,selectedType:p,setSelectedFromNode:g,setSelectedToNode:k}),o.jsxs(v,{direction:"row",justify:"space-between",mt:20,children:[(n==null?void 0:n.refId)&&o.jsx(v,{direction:"column",children:o.jsxs(An,{color:"secondary",disabled:a,onClick:P,size:"large",style:{marginRight:20},variant:"contained",children:["Delete",a&&o.jsxs(zt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]})}),o.jsxs(Mn,{color:"secondary",disabled:E,onClick:C,size:"large",variant:"contained",children:["Confirm",d&&o.jsxs(zt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]})]})]})})},Mn=O(ke)` width: 293px !important; margin: 0 0 10px auto !important; -`,Nt=k.span` +`,zt=O.span` margin-top: 2px; -`,An=k(Se)` +`,An=O(ke)` && { color: ${T.primaryRed}; background-color: rgba(237, 116, 116, 0.1); @@ -50,7 +50,7 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a background-color: rgba(237, 116, 116, 0.2); } } -`,$n=({setIsAddEdgeNode:t,edgeData:n,setGraphLoading:s})=>{const e=()=>{t(!1)};return o.jsxs(v,{children:[o.jsxs(kn,{align:"center",direction:"row",justify:"space-between",children:[o.jsx(_n,{"data-testid":"edge-modal-title",children:n!=null&&n.refId?"Edit Edge":"Add Edge"}),o.jsx(Sn,{"data-testid":"close-sidebar-sub-view",onClick:e,children:o.jsx(xt,{})})]}),o.jsx(On,{}),o.jsx(Tn,{edgeLinkData:n,onCancel:e,setGraphLoading:s})]})},Sn=k(v)` +`,$n=({setIsAddEdgeNode:t,edgeData:n,setGraphLoading:s})=>{const e=()=>{t(!1)};return o.jsxs(v,{children:[o.jsxs(On,{align:"center",direction:"row",justify:"space-between",children:[o.jsx(_n,{"data-testid":"edge-modal-title",children:n!=null&&n.refId?"Edit Edge":"Add Edge"}),o.jsx(kn,{"data-testid":"close-sidebar-sub-view",onClick:e,children:o.jsx(xt,{})})]}),o.jsx(Sn,{}),o.jsx(Tn,{edgeLinkData:n,onCancel:e,setGraphLoading:s})]})},kn=O(v)` font-size: 32px; color: ${T.white}; cursor: pointer; @@ -64,14 +64,14 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a color: ${T.white}; } } -`,kn=k(v)` +`,On=O(v)` margin-bottom: 16px; -`,On=k.div` +`,Sn=O.div` border-bottom: 1px solid ${T.black}; width: calc(100% + 32px); margin: 0 -16px 16px; opacity: 0.3; -`,_n=k(se)` +`,_n=O(re)` font-family: Barlow; font-size: 22px; font-weight: 600; @@ -80,21 +80,21 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a text-align: left; margin-left: 2px; color: ${T.white}; -`,In=/^[a-z0-9_]+$/,Nn=({parentParam:t,onDelete:n})=>{const[s,e]=m.useState(!1),[i,l]=m.useState([]),{fields:d,append:c,replace:a,remove:w}=Ao({name:"attributes"}),{setValue:p,watch:h}=$o();return m.useEffect(()=>{const x=async()=>{try{let g=[{required:!1,type:"string",key:""}];if(t!==so.value.toLowerCase()){e(!0);const b=await eo(t);b.attributes&&typeof b.attributes=="object"?g=pt(b.attributes):g=pt(b)}g=g.filter(b=>b.key!=="node_key"),a(g),l(g)}catch(g){console.warn(g)}finally{e(!1)}};i.length===0&&x()},[t,p,a,i.length]),o.jsxs(o.Fragment,{children:[s?o.jsx(v,{align:"center",children:o.jsx(de,{color:T.SECONDARY_BLUE,size:"30"})}):o.jsx(zn,{py:8,children:o.jsx(re,{container:!0,spacing:2,children:d.map((x,g)=>{const b=h(`attributes[${g}].type`),$=h(`attributes[${g}].required`),y=x.isNew||!1,C=["name"].includes(h(`attributes[${g}].key`));return o.jsxs(m.Fragment,{children:[o.jsx(re,{item:!0,xs:5,children:o.jsx(We,{autoComplete:"off",className:"text-input",dataTestId:`cy-item-name-${g}`,disabled:!y,id:`cy-item-name-${g}`,maxLength:50,name:`attributes.${g}.key`,placeholder:"Enter value",rules:{...Ye,pattern:{message:"Please avoid special characters, spaces and uppercase",value:In}}})}),o.jsx(re,{item:!0,xs:4,children:o.jsx(Me,{dataTestId:`cy-item-select-${g}`,disabled:C,onSelect:j=>p(`attributes[${g}].type`,j==null?void 0:j.value),options:$t,selectedValue:$t.find(j=>j.value===b)})}),o.jsxs(re,{item:!0,xs:3,children:[o.jsx(po,{checked:$,"data-testid":`cy-item-${g}`,disabled:C,name:`attributes.${g}.required`,onChange:j=>p(`attributes[${g}].required`,j.target.checked),size:"small"}),!C&&o.jsx(So,{onClick:()=>{w(g),x.key!==void 0&&n&&n(x.key)},children:o.jsx(ro,{})})]})]},x.id)})})}),o.jsx(v,{align:"flex-start",py:12,children:o.jsx(Se,{"data-testid":"add-attribute-btn",onClick:()=>c({key:"",type:"string",required:!0,isNew:!0}),size:"medium",startIcon:o.jsx(io,{}),variant:"contained",children:"Add Attribute"})})]})},zn=k(v)` +`,In=/^[a-z0-9_]+$/,zn=({parentParam:t,onDelete:n})=>{const[s,e]=m.useState(!1),[i,l]=m.useState([]),{fields:d,append:c,replace:a,remove:w}=Ao({name:"attributes"}),{setValue:p,watch:h}=$o();return m.useEffect(()=>{const x=async()=>{try{let g=[{required:!1,type:"string",key:""}];if(t!==so.value.toLowerCase()){e(!0);const b=await eo(t);b.attributes&&typeof b.attributes=="object"?g=pt(b.attributes):g=pt(b)}g=g.filter(b=>b.key!=="node_key"),a(g),l(g)}catch(g){console.warn(g)}finally{e(!1)}};i.length===0&&x()},[t,p,a,i.length]),o.jsxs(o.Fragment,{children:[s?o.jsx(v,{align:"center",children:o.jsx(de,{color:T.SECONDARY_BLUE,size:"30"})}):o.jsx(Nn,{py:8,children:o.jsx(ie,{container:!0,spacing:2,children:d.map((x,g)=>{const b=h(`attributes[${g}].type`),k=h(`attributes[${g}].required`),y=x.isNew||!1,C=["name"].includes(h(`attributes[${g}].key`));return o.jsxs(m.Fragment,{children:[o.jsx(ie,{item:!0,xs:5,children:o.jsx(We,{autoComplete:"off",className:"text-input",dataTestId:`cy-item-name-${g}`,disabled:!y,id:`cy-item-name-${g}`,maxLength:50,name:`attributes.${g}.key`,placeholder:"Enter value",rules:{...Ye,pattern:{message:"Please avoid special characters, spaces and uppercase",value:In}}})}),o.jsx(ie,{item:!0,xs:4,children:o.jsx(Me,{dataTestId:`cy-item-select-${g}`,disabled:C,onSelect:j=>p(`attributes[${g}].type`,j==null?void 0:j.value),options:$t,selectedValue:$t.find(j=>j.value===b)})}),o.jsxs(ie,{item:!0,xs:3,children:[o.jsx(po,{checked:k,"data-testid":`cy-item-${g}`,disabled:C,name:`attributes.${g}.required`,onChange:j=>p(`attributes[${g}].required`,j.target.checked),size:"small"}),!C&&o.jsx(ko,{onClick:()=>{w(g),x.key!==void 0&&n&&n(x.key)},children:o.jsx(ro,{})})]})]},x.id)})})}),o.jsx(v,{align:"flex-start",py:12,children:o.jsx(ke,{"data-testid":"add-attribute-btn",onClick:()=>c({key:"",type:"string",required:!0,isNew:!0}),size:"medium",startIcon:o.jsx(io,{}),variant:"contained",children:"Add Attribute"})})]})},Nn=O(v)` overflow-y: auto; width: calc(100% + 20px); max-height: calc(80vh - 300px); -`,Rn=({parent:t,onDelete:n})=>{const s=t;return o.jsxs(v,{children:[o.jsx(v,{direction:"row",mb:10,children:o.jsxs(re,{container:!0,spacing:2,children:[o.jsx(re,{item:!0,xs:5,children:o.jsx(tt,{style:{marginRight:180},children:"Attributes"})}),o.jsx(re,{item:!0,xs:4,children:o.jsx(tt,{style:{marginRight:130},children:"Type"})}),o.jsx(re,{item:!0,xs:3,children:o.jsx(tt,{children:"Required"})})]})}),s&&o.jsx(Nn,{onDelete:n,parentParam:s},s)]})},tt=k(se)` +`,Rn=({parent:t,onDelete:n})=>{const s=t;return o.jsxs(v,{children:[o.jsx(v,{direction:"row",mb:10,children:o.jsxs(ie,{container:!0,spacing:2,children:[o.jsx(ie,{item:!0,xs:5,children:o.jsx(tt,{style:{marginRight:180},children:"Attributes"})}),o.jsx(ie,{item:!0,xs:4,children:o.jsx(tt,{style:{marginRight:130},children:"Type"})}),o.jsx(ie,{item:!0,xs:3,children:o.jsx(tt,{children:"Required"})})]})}),s&&o.jsx(zn,{onDelete:n,parentParam:s},s)]})},tt=O(re)` font-size: 15px; color: gray; -`,Ln=({setMediaOptions:t})=>{const[n,s]=m.useState({videoAudio:!1,image:!1,sourceLink:!1}),e=i=>{s(l=>{const d={...l,[i]:!l[i]};return t(d),d})};return o.jsxs(Bn,{direction:"column",children:[o.jsx(rt,{}),o.jsx(ot,{control:o.jsx(st,{checked:n.videoAudio,onChange:()=>e("videoAudio")}),label:o.jsx(nt,{active:n.videoAudio,children:"Video / Audio"}),labelPlacement:"start"}),o.jsx(rt,{}),o.jsx(ot,{control:o.jsx(st,{checked:n.image,onChange:()=>e("image")}),label:o.jsx(nt,{active:n.image,children:"Image"}),labelPlacement:"start"}),o.jsx(rt,{}),o.jsx(ot,{control:o.jsx(st,{checked:n.sourceLink,onChange:()=>e("sourceLink")}),label:o.jsx(nt,{active:n.sourceLink,children:"Source Link"}),labelPlacement:"start"})]})},Bn=k(v)` +`,Ln=({setMediaOptions:t})=>{const[n,s]=m.useState({videoAudio:!1,image:!1,sourceLink:!1}),e=i=>{s(l=>{const d={...l,[i]:!l[i]};return t(d),d})};return o.jsxs(Bn,{direction:"column",children:[o.jsx(rt,{}),o.jsx(ot,{control:o.jsx(st,{checked:n.videoAudio,onChange:()=>e("videoAudio")}),label:o.jsx(nt,{active:n.videoAudio,children:"Video / Audio"}),labelPlacement:"start"}),o.jsx(rt,{}),o.jsx(ot,{control:o.jsx(st,{checked:n.image,onChange:()=>e("image")}),label:o.jsx(nt,{active:n.image,children:"Image"}),labelPlacement:"start"}),o.jsx(rt,{}),o.jsx(ot,{control:o.jsx(st,{checked:n.sourceLink,onChange:()=>e("sourceLink")}),label:o.jsx(nt,{active:n.sourceLink,children:"Source Link"}),labelPlacement:"start"})]})},Bn=O(v)` direction: column; -`,ot=k(Lo)` +`,ot=O(Lo)` justify-content: space-between; margin-left: 2px !important; margin-top: 8px; margin-bottom: 8px; -`,nt=k.span` +`,nt=O.span` color: ${({active:t})=>t?T.white:T.GRAY7}; font-family: Barlow; font-size: 14px; @@ -102,7 +102,7 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a line-height: 18px; letter-spacing: 0.01em; text-align: left; -`,st=k(t=>o.jsx(po,{...t}))` +`,st=O(t=>o.jsx(po,{...t}))` &.MuiSwitch-root { width: 53px; height: 38px; @@ -126,21 +126,21 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a background-color: ${T.BG2}; opacity: 1; } -`,rt=k.div` +`,rt=O.div` border: 1px solid ${T.BG2}; width: 100%; opacity: 0.5; -`,zt={type:"",parent:""},Dn=(t,n)=>t.length!==n.length?!0:t.some((s,e)=>{const i=n[e];return s.required!==i.required||s.type!==i.type||s.key!==i.key}),Vn=async(t,n=!1,s,e)=>{try{const{attributes:i,selectedIndex:l,...d}=t,c={...Io(i),...s.reduce((p,h)=>({...p,[h]:"delete"}),{})},a={...d,attributes:c,index:l};e.videoAudio&&(a.media_url=""),e.image&&(a.image_url=""),e.sourceLink&&(a.source_link="");let w;if(n?w=await dt.put(`/schema/${t.ref_id}`,JSON.stringify(a),{}):w=await dt.post("/schema",JSON.stringify({...a,node_key:"name"}),{}),w.status!=="success")throw new Error("error");return w==null?void 0:w.ref_id}catch(i){let l=xe;if(i.status===400){const d=await i.json();l=d.errorCode||(d==null?void 0:d.status)||xe}else i instanceof Error&&(l=i.message);throw new Error(l)}},Fn=t=>t.charAt(0).toUpperCase()+t.slice(1),Rt=async(t,n)=>{try{const l=((await ht()).schemas||[]).filter(d=>!d.is_deleted&&d.type&&(!n||n(d))).map(d=>d.type==="thing"?{label:"No Parent",value:d.type}:{label:Fn(d.type),value:d.type});t(l)}catch(s){console.warn(s)}},Gn=({graphLoading:t,onSchemaCreate:n,selectedSchema:s,onDelete:e,setSelectedSchemaId:i,setGraphLoading:l,setIsCreateNew:d,onSchemaUpdate:c})=>{const{close:a,visible:w}=to("addType"),p=mt({mode:"onChange",defaultValues:s?{type:s.type,parent:s.parent}:zt}),{watch:h,setValue:x,reset:g,getValues:b}=p,[$,y]=m.useState(!1),[C,j]=m.useState(!1),[z,E]=m.useState(!1),[P,I]=m.useState(null),[D,R]=m.useState(!1),[V,f]=m.useState(null),[O,F]=m.useState(""),[_,G]=m.useState(null),[Z,J]=m.useState([]),[ie,K]=m.useState([]),[ye,ke]=m.useState(!0),[Oe,pe]=m.useState({videoAudio:!1,image:!1,sourceLink:!1});m.useEffect(()=>()=>{g()},[w,g]);const _e=()=>{d(!1),i("")};m.useEffect(()=>{s||(E(!0),Rt(I).finally(()=>E(!1)))},[s]),m.useEffect(()=>{(()=>{g(zt),K([{required:!1,type:"string",key:""}]),J([]),pe({videoAudio:!1,image:!1,sourceLink:!1})})(),s&&(x("type",s.type),x("parent",s.parent),s.type!==so.value.toLowerCase()&&eo(s.type).then(B=>{const X=(B?pt(B):[{required:!1,type:"string",key:""}]).filter(le=>le.key!=="node_key");K(X)}),Rt(f,B=>B.type!==s.type))},[s,x,g]);const ae=h("parent");h("type");const Ie=S=>Array.isArray(S)&&S.every(B=>typeof B=="object"&&"key"in B),we=h("attributes"),je=m.useMemo(()=>Ie(we)?we.filter(S=>S.key.trim()!==""):[],[we]),Ze=()=>{a()},Xe=S=>{J(B=>[...B,S])},Ke=async()=>{if(s!=null&&s.type){j(!0),l(!0);try{await dt.delete(`/schema/${s.ref_id}`),e(s.type),a()}catch(S){let B=xe;if((S==null?void 0:S.status)===400){const W=await S.json();B=W.errorCode||(W==null?void 0:W.status)||xe}else S instanceof Error&&(B=S.message);G(B)}finally{j(!1),l(!1),d(!1)}}},ve=p.handleSubmit(async S=>{if(!ae){R(!0);return}y(!0);try{if(s&&S.type!==(s==null?void 0:s.type)||s&&b().parent!==(s==null?void 0:s.parent)){const W=b().parent??(s==null?void 0:s.parent),{selectedIndex:X}=b();l(!0),await Eo(s==null?void 0:s.ref_id,{type:S.type,parent:W,attributes:{index:X}}),await c()}const B=await Vn({...S,...s?{ref_id:s==null?void 0:s.ref_id}:{}},!!s,Z,Oe);n({type:S.type,parent:ae||"",ref_id:(s==null?void 0:s.ref_id)||B||"new"}),Ze()}catch(B){let W=xe;if((B==null?void 0:B.status)===400){const X=await B.json();W=X.errorCode||(X==null?void 0:X.status)||xe}else B instanceof Error&&(W=B.message);F(W)}finally{y(!1),l(!1),d(!1)}});m.useEffect(()=>{const S=p.watch(B=>{var Re,Le,Ce,ue,fe;const W=Dn(je,ie),X=((Re=B.type)==null?void 0:Re.trim())!==((Le=s==null?void 0:s.type)==null?void 0:Le.trim())||((Ce=B.parent)==null?void 0:Ce.trim())!==((ue=s==null?void 0:s.parent)==null?void 0:ue.trim())||W,le=!!((fe=B.type)!=null&&fe.trim());ke(s?$||!X||!le||D:$||D||!le)});return()=>S.unsubscribe()},[p,je,ie,s,$,D]);const Ne=()=>P==null?void 0:P.find(S=>S.value===ae),ze=m.useMemo(()=>{if(!s)return;const S=V==null?void 0:V.find(B=>B.value===s.parent);if(S)return S;if(s.parent)return{label:s.parent,value:s.parent}},[s,V]);return o.jsxs(v,{children:[o.jsxs(Zn,{children:[o.jsx(Xn,{children:s?"Edit Type":"Create Type"}),o.jsx(Un,{"data-testid":"close-sidebar-sub-view",onClick:_e,children:o.jsx(xt,{})})]}),o.jsx(Wn,{}),o.jsx(v,{children:o.jsx(oo,{...p,children:o.jsxs("form",{id:"add-type-form",onSubmit:ve,children:[o.jsx(v,{children:s?o.jsxs(o.Fragment,{children:[o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(se,{children:"Name"})}),o.jsx(v,{mb:12,children:o.jsx(We,{dataTestId:"cy-item-name",defaultValue:s==null?void 0:s.type,id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter type name",rules:{...Ye},value:ae})})]}),o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(se,{children:"Parent"})}),o.jsx(Me,{isLoading:z||t,onSelect:S=>{x("parent",(S==null?void 0:S.value)||""),R(!1)},options:V||[],selectedValue:ze}),O&&o.jsx(it,{children:O})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(se,{children:"Select Parent"})}),o.jsx(Me,{isLoading:z,onSelect:S=>{x("parent",(S==null?void 0:S.value)||""),R(!1)},options:P,selectedValue:Ne()}),D&&o.jsx(it,{children:"A parent type must be selected"})]}),o.jsxs(v,{children:[o.jsx(v,{mb:12,children:o.jsx(se,{children:"Type name"})}),o.jsx(v,{mb:12,children:o.jsx(We,{id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter type name",rules:{...Ye},value:ae})})]})]})}),o.jsx(Rn,{onDelete:Xe,parent:s?s.type:ae}),o.jsx(Ln,{setMediaOptions:pe}),o.jsxs(v,{children:[o.jsx(Bt,{}),o.jsx(v,{mb:12,mt:12,children:o.jsx(se,{children:"Indexes"})}),o.jsx(re,{item:!0,mb:2,width:"70%",children:o.jsx(Me,{onSelect:S=>x("selectedIndex",S==null?void 0:S.value),options:je.map(S=>({label:S.key,value:S.key}))})}),o.jsx(Bt,{})]}),o.jsxs(v,{direction:"row",justify:"space-between",mt:20,children:[s&&o.jsxs(v,{direction:"column",children:[o.jsxs(Hn,{color:"secondary",disabled:C,onClick:Ke,size:"large",style:{marginRight:20},variant:"contained",children:["Delete",C&&o.jsxs(Lt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]}),_&&o.jsx(it,{children:_})]}),o.jsxs(Yn,{color:"secondary",disabled:ye,onClick:ve,size:"large",variant:"contained",children:["Confirm",$&&o.jsxs(Lt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]})]})]})})})]})},Yn=k(Se)` +`,Nt={type:"",parent:""},Dn=(t,n)=>t.length!==n.length?!0:t.some((s,e)=>{const i=n[e];return s.required!==i.required||s.type!==i.type||s.key!==i.key}),Vn=async(t,n=!1,s,e)=>{try{const{attributes:i,selectedIndex:l,...d}=t,c={...Io(i),...s.reduce((p,h)=>({...p,[h]:"delete"}),{})},a={...d,attributes:c,index:l};e.videoAudio&&(a.media_url=""),e.image&&(a.image_url=""),e.sourceLink&&(a.source_link="");let w;if(n?w=await dt.put(`/schema/${t.ref_id}`,JSON.stringify(a),{}):w=await dt.post("/schema",JSON.stringify({...a,node_key:"name"}),{}),w.status!=="success")throw new Error("error");return w==null?void 0:w.ref_id}catch(i){let l=xe;if(i.status===400){const d=await i.json();l=d.errorCode||(d==null?void 0:d.status)||xe}else i instanceof Error&&(l=i.message);throw new Error(l)}},Fn=t=>t.charAt(0).toUpperCase()+t.slice(1),Rt=async(t,n)=>{try{const l=((await ht()).schemas||[]).filter(d=>!d.is_deleted&&d.type&&(!n||n(d))).map(d=>d.type==="thing"?{label:"No Parent",value:d.type}:{label:Fn(d.type),value:d.type});t(l)}catch(s){console.warn(s)}},Gn=({graphLoading:t,onSchemaCreate:n,selectedSchema:s,onDelete:e,setSelectedSchemaId:i,setGraphLoading:l,setIsCreateNew:d,onSchemaUpdate:c})=>{const{close:a,visible:w}=to("addType"),p=mt({mode:"onChange",defaultValues:s?{type:s.type,parent:s.parent}:Nt}),{watch:h,setValue:x,reset:g,getValues:b}=p,[k,y]=m.useState(!1),[C,j]=m.useState(!1),[N,E]=m.useState(!1),[P,I]=m.useState(null),[V,L]=m.useState(!1),[D,f]=m.useState(null),[S,F]=m.useState(""),[_,G]=m.useState(null),[Z,ee]=m.useState([]),[ae,q]=m.useState([]),[ye,Oe]=m.useState(!0),[Se,pe]=m.useState({videoAudio:!1,image:!1,sourceLink:!1});m.useEffect(()=>()=>{g()},[w,g]);const _e=()=>{d(!1),i("")};m.useEffect(()=>{s||(E(!0),Rt(I).finally(()=>E(!1)))},[s]),m.useEffect(()=>{(()=>{g(Nt),q([{required:!1,type:"string",key:""}]),ee([]),pe({videoAudio:!1,image:!1,sourceLink:!1})})(),s&&(x("type",s.type),x("parent",s.parent),s.type!==so.value.toLowerCase()&&eo(s.type).then(R=>{const K=(R?pt(R):[{required:!1,type:"string",key:""}]).filter(le=>le.key!=="node_key");q(K)}),Rt(f,R=>R.type!==s.type))},[s,x,g]);const X=h("parent");h("type");const Ie=A=>Array.isArray(A)&&A.every(R=>typeof R=="object"&&"key"in R),we=h("attributes"),je=m.useMemo(()=>Ie(we)?we.filter(A=>A.key.trim()!==""):[],[we]),Ze=()=>{a()},Xe=A=>{ee(R=>[...R,A])},Ke=async()=>{if(s!=null&&s.type){j(!0),l(!0);try{await dt.delete(`/schema/${s.ref_id}`),e(s.type),a()}catch(A){let R=xe;if((A==null?void 0:A.status)===400){const W=await A.json();R=W.errorCode||(W==null?void 0:W.status)||xe}else A instanceof Error&&(R=A.message);G(R)}finally{j(!1),l(!1),d(!1)}}},ve=p.handleSubmit(async A=>{if(!X){L(!0);return}y(!0);try{if(s&&A.type!==(s==null?void 0:s.type)||s&&b().parent!==(s==null?void 0:s.parent)){const W=b().parent??(s==null?void 0:s.parent),{selectedIndex:K}=b();l(!0),await Eo(s==null?void 0:s.ref_id,{type:A.type,parent:W,attributes:{index:K}}),await c()}const R=await Vn({...A,...s?{ref_id:s==null?void 0:s.ref_id}:{}},!!s,Z,Se);n({type:A.type,parent:X||"",ref_id:(s==null?void 0:s.ref_id)||R||"new"}),Ze()}catch(R){let W=xe;if((R==null?void 0:R.status)===400){const K=await R.json();W=K.errorCode||(K==null?void 0:K.status)||xe}else R instanceof Error&&(W=R.message);F(W)}finally{y(!1),l(!1),d(!1)}});m.useEffect(()=>{const A=p.watch(R=>{var Re,Le,Ce,ue,fe;const W=Dn(je,ae),K=((Re=R.type)==null?void 0:Re.trim())!==((Le=s==null?void 0:s.type)==null?void 0:Le.trim())||((Ce=R.parent)==null?void 0:Ce.trim())!==((ue=s==null?void 0:s.parent)==null?void 0:ue.trim())||W,le=!!((fe=R.type)!=null&&fe.trim());Oe(s?k||!K||!le||V:k||V||!le)});return()=>A.unsubscribe()},[p,je,ae,s,k,V]);const ze=()=>P==null?void 0:P.find(A=>A.value===X),Ne=m.useMemo(()=>{if(X){const A=D==null?void 0:D.find(R=>R.value===X);return A||{label:X,value:X}}if(s!=null&&s.parent){const A=D==null?void 0:D.find(R=>R.value===s.parent);return A||{label:s.parent,value:s.parent}}},[X,s,D]);return o.jsxs(v,{children:[o.jsxs(Zn,{children:[o.jsx(Xn,{children:s?"Edit Type":"Create Type"}),o.jsx(Un,{"data-testid":"close-sidebar-sub-view",onClick:_e,children:o.jsx(xt,{})})]}),o.jsx(Wn,{}),o.jsx(v,{children:o.jsx(oo,{...p,children:o.jsxs("form",{id:"add-type-form",onSubmit:ve,children:[o.jsx(v,{children:s?o.jsxs(o.Fragment,{children:[o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(re,{children:"Name"})}),o.jsx(v,{mb:12,children:o.jsx(We,{dataTestId:"cy-item-name",defaultValue:s==null?void 0:s.type,id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter type name",rules:{...Ye},value:X})})]}),o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(re,{children:"Parent"})}),o.jsx(Me,{isLoading:N||t,onSelect:A=>{x("parent",(A==null?void 0:A.value)||""),L(!1)},options:D||[],selectedValue:Ne}),S&&o.jsx(it,{children:S})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs(v,{mb:12,children:[o.jsx(v,{mb:12,children:o.jsx(re,{children:"Select Parent"})}),o.jsx(Me,{isLoading:N,onSelect:A=>{x("parent",(A==null?void 0:A.value)||""),L(!1)},options:P,selectedValue:ze()}),V&&o.jsx(it,{children:"A parent type must be selected"})]}),o.jsxs(v,{children:[o.jsx(v,{mb:12,children:o.jsx(re,{children:"Type name"})}),o.jsx(v,{mb:12,children:o.jsx(We,{id:"cy-item-name",maxLength:250,name:"type",placeholder:"Enter type name",rules:{...Ye},value:X})})]})]})}),o.jsx(Rn,{onDelete:Xe,parent:s?s.type:X}),o.jsx(Ln,{setMediaOptions:pe}),o.jsxs(v,{children:[o.jsx(Bt,{}),o.jsx(v,{mb:12,mt:12,children:o.jsx(re,{children:"Indexes"})}),o.jsx(ie,{item:!0,mb:2,width:"70%",children:o.jsx(Me,{onSelect:A=>x("selectedIndex",A==null?void 0:A.value),options:je.map(A=>({label:A.key,value:A.key}))})}),o.jsx(Bt,{})]}),o.jsxs(v,{direction:"row",justify:"space-between",mt:20,children:[s&&o.jsxs(v,{direction:"column",children:[o.jsxs(Hn,{color:"secondary",disabled:C,onClick:Ke,size:"large",style:{marginRight:20},variant:"contained",children:["Delete",C&&o.jsxs(Lt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]}),_&&o.jsx(it,{children:_})]}),o.jsxs(Yn,{color:"secondary",disabled:ye,onClick:ve,size:"large",variant:"contained",children:["Confirm",k&&o.jsxs(Lt,{children:[o.jsx(de,{color:T.lightGray,size:12})," "]})]})]})]})})})]})},Yn=O(ke)` width: 100% !important; margin: 0 auto !important; -`,Wn=k.div` +`,Wn=O.div` border-bottom: 1px solid ${T.black}; width: calc(100% + 32px); margin: 0 -16px 16px; opacity: 0.3; -`,Lt=k.span` +`,Lt=O.span` margin-top: 2px; -`,Hn=k(Se)` +`,Hn=O(ke)` && { color: ${T.primaryRed}; background-color: rgba(237, 116, 116, 0.1); @@ -152,7 +152,7 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a background-color: rgba(237, 116, 116, 0.2); } } -`,Un=k(v)` +`,Un=O(v)` font-size: 32px; color: ${T.white}; cursor: pointer; @@ -166,25 +166,25 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a color: ${T.white}; } } -`,it=k(v)` +`,it=O(v)` font-size: 13px; font-family: Barlow; color: #ff8f80; line-height: 0.2px; margin-top: 12px; padding-top: 20px; -`,Bt=k.div` +`,Bt=O.div` border: 1px solid ${T.BG2}; width: calc(100% + 32px); opacity: 0.5; margin-left: -16px; -`,Zn=k(v)` +`,Zn=O(v)` flex-direction: row; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 16px; -`,Xn=k(se)` +`,Xn=O(re)` font-family: Barlow; font-size: 22px; font-weight: 600; @@ -192,7 +192,7 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a letter-spacing: 0.01em; text-align: left; color: ${T.white}; -`;var Kn=Object.defineProperty,qn=(t,n,s)=>n in t?Kn(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s,M=(t,n,s)=>(qn(t,typeof n!="symbol"?n+"":n,s),s);const Ge=new Wo,Dt=new Ho,Qn=Math.cos(70*(Math.PI/180)),Vt=(t,n)=>(t%n+n)%n;let Jn=class extends Uo{constructor(n,s){super(),M(this,"object"),M(this,"domElement"),M(this,"enabled",!0),M(this,"target",new N),M(this,"minDistance",0),M(this,"maxDistance",1/0),M(this,"minZoom",0),M(this,"maxZoom",1/0),M(this,"minPolarAngle",0),M(this,"maxPolarAngle",Math.PI),M(this,"minAzimuthAngle",-1/0),M(this,"maxAzimuthAngle",1/0),M(this,"enableDamping",!1),M(this,"dampingFactor",.05),M(this,"enableZoom",!0),M(this,"zoomSpeed",1),M(this,"enableRotate",!0),M(this,"rotateSpeed",1),M(this,"enablePan",!0),M(this,"panSpeed",1),M(this,"screenSpacePanning",!0),M(this,"keyPanSpeed",7),M(this,"zoomToCursor",!1),M(this,"autoRotate",!1),M(this,"autoRotateSpeed",2),M(this,"reverseOrbit",!1),M(this,"reverseHorizontalOrbit",!1),M(this,"reverseVerticalOrbit",!1),M(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),M(this,"mouseButtons",{LEFT:he.ROTATE,MIDDLE:he.DOLLY,RIGHT:he.PAN}),M(this,"touches",{ONE:me.ROTATE,TWO:me.DOLLY_PAN}),M(this,"target0"),M(this,"position0"),M(this,"zoom0"),M(this,"_domElementKeyEvents",null),M(this,"getPolarAngle"),M(this,"getAzimuthalAngle"),M(this,"setPolarAngle"),M(this,"setAzimuthalAngle"),M(this,"getDistance"),M(this,"listenToKeyEvents"),M(this,"stopListenToKeyEvents"),M(this,"saveState"),M(this,"reset"),M(this,"update"),M(this,"connect"),M(this,"dispose"),this.object=n,this.domElement=s,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>p.phi,this.getAzimuthalAngle=()=>p.theta,this.setPolarAngle=r=>{let u=Vt(r,2*Math.PI),A=p.phi;A<0&&(A+=2*Math.PI),u<0&&(u+=2*Math.PI);let L=Math.abs(u-A);2*Math.PI-L{let u=Vt(r,2*Math.PI),A=p.theta;A<0&&(A+=2*Math.PI),u<0&&(u+=2*Math.PI);let L=Math.abs(u-A);2*Math.PI-Le.object.position.distanceTo(e.target),this.listenToKeyEvents=r=>{r.addEventListener("keydown",qe),this._domElementKeyEvents=r},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",qe),this._domElementKeyEvents=null},this.saveState=()=>{e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=()=>{e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(i),e.update(),a=c.NONE},this.update=(()=>{const r=new N,u=new N(0,1,0),A=new kt().setFromUnitVectors(n.up,u),L=A.clone().invert(),Y=new N,te=new kt,ce=2*Math.PI;return function(){const vt=e.object.position;A.setFromUnitVectors(n.up,u),L.copy(A).invert(),r.copy(vt).sub(e.target),r.applyQuaternion(A),p.setFromVector3(r),e.autoRotate&&a===c.NONE&&G(F()),e.enableDamping?(p.theta+=h.theta*e.dampingFactor,p.phi+=h.phi*e.dampingFactor):(p.theta+=h.theta,p.phi+=h.phi);let oe=e.minAzimuthAngle,ne=e.maxAzimuthAngle;isFinite(oe)&&isFinite(ne)&&(oe<-Math.PI?oe+=ce:oe>Math.PI&&(oe-=ce),ne<-Math.PI?ne+=ce:ne>Math.PI&&(ne-=ce),oe<=ne?p.theta=Math.max(oe,Math.min(ne,p.theta)):p.theta=p.theta>(oe+ne)/2?Math.max(oe,p.theta):Math.min(ne,p.theta)),p.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,p.phi)),p.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(g,e.dampingFactor):e.target.add(g),e.zoomToCursor&&V||e.object.isOrthographicCamera?p.radius=pe(p.radius):p.radius=pe(p.radius*x),r.setFromSpherical(p),r.applyQuaternion(L),vt.copy(e.target).add(r),e.object.matrixAutoUpdate||e.object.updateMatrix(),e.object.lookAt(e.target),e.enableDamping===!0?(h.theta*=1-e.dampingFactor,h.phi*=1-e.dampingFactor,g.multiplyScalar(1-e.dampingFactor)):(h.set(0,0,0),g.set(0,0,0));let Be=!1;if(e.zoomToCursor&&V){let Ee=null;if(e.object instanceof Ve&&e.object.isPerspectiveCamera){const Pe=r.length();Ee=pe(Pe*x);const De=Pe-Ee;e.object.position.addScaledVector(D,De),e.object.updateMatrixWorld()}else if(e.object.isOrthographicCamera){const Pe=new N(R.x,R.y,0);Pe.unproject(e.object),e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/x)),e.object.updateProjectionMatrix(),Be=!0;const De=new N(R.x,R.y,0);De.unproject(e.object),e.object.position.sub(De).add(Pe),e.object.updateMatrixWorld(),Ee=r.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;Ee!==null&&(e.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(Ee).add(e.object.position):(Ge.origin.copy(e.object.position),Ge.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot(Ge.direction))w||8*(1-te.dot(e.object.quaternion))>w?(e.dispatchEvent(i),Y.copy(e.object.position),te.copy(e.object.quaternion),Be=!1,!0):!1}})(),this.connect=r=>{r===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),e.domElement=r,e.domElement.style.touchAction="none",e.domElement.addEventListener("contextmenu",yt),e.domElement.addEventListener("pointerdown",Ce),e.domElement.addEventListener("pointercancel",gt),e.domElement.addEventListener("wheel",bt)},this.dispose=()=>{var r,u,A,L,Y,te;(r=e.domElement)==null||r.removeEventListener("contextmenu",yt),(u=e.domElement)==null||u.removeEventListener("pointerdown",Ce),(A=e.domElement)==null||A.removeEventListener("pointercancel",gt),(L=e.domElement)==null||L.removeEventListener("wheel",bt),(Y=e.domElement)==null||Y.ownerDocument.removeEventListener("pointermove",ue),(te=e.domElement)==null||te.ownerDocument.removeEventListener("pointerup",fe),e._domElementKeyEvents!==null&&e._domElementKeyEvents.removeEventListener("keydown",qe)};const e=this,i={type:"change"},l={type:"start"},d={type:"end"},c={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let a=c.NONE;const w=1e-6,p=new Ot,h=new Ot;let x=1;const g=new N,b=new q,$=new q,y=new q,C=new q,j=new q,z=new q,E=new q,P=new q,I=new q,D=new N,R=new q;let V=!1;const f=[],O={};function F(){return 2*Math.PI/60/60*e.autoRotateSpeed}function _(){return Math.pow(.95,e.zoomSpeed)}function G(r){e.reverseOrbit||e.reverseHorizontalOrbit?h.theta+=r:h.theta-=r}function Z(r){e.reverseOrbit||e.reverseVerticalOrbit?h.phi+=r:h.phi-=r}const J=(()=>{const r=new N;return function(A,L){r.setFromMatrixColumn(L,0),r.multiplyScalar(-A),g.add(r)}})(),ie=(()=>{const r=new N;return function(A,L){e.screenSpacePanning===!0?r.setFromMatrixColumn(L,1):(r.setFromMatrixColumn(L,0),r.crossVectors(e.object.up,r)),r.multiplyScalar(A),g.add(r)}})(),K=(()=>{const r=new N;return function(A,L){const Y=e.domElement;if(Y&&e.object instanceof Ve&&e.object.isPerspectiveCamera){const te=e.object.position;r.copy(te).sub(e.target);let ce=r.length();ce*=Math.tan(e.object.fov/2*Math.PI/180),J(2*A*ce/Y.clientHeight,e.object.matrix),ie(2*L*ce/Y.clientHeight,e.object.matrix)}else Y&&e.object instanceof Fe&&e.object.isOrthographicCamera?(J(A*(e.object.right-e.object.left)/e.object.zoom/Y.clientWidth,e.object.matrix),ie(L*(e.object.top-e.object.bottom)/e.object.zoom/Y.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}})();function ye(r){e.object instanceof Ve&&e.object.isPerspectiveCamera||e.object instanceof Fe&&e.object.isOrthographicCamera?x/=r:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function ke(r){e.object instanceof Ve&&e.object.isPerspectiveCamera||e.object instanceof Fe&&e.object.isOrthographicCamera?x*=r:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function Oe(r){if(!e.zoomToCursor||!e.domElement)return;V=!0;const u=e.domElement.getBoundingClientRect(),A=r.clientX-u.left,L=r.clientY-u.top,Y=u.width,te=u.height;R.x=A/Y*2-1,R.y=-(L/te)*2+1,D.set(R.x,R.y,1).unproject(e.object).sub(e.object.position).normalize()}function pe(r){return Math.max(e.minDistance,Math.min(e.maxDistance,r))}function _e(r){b.set(r.clientX,r.clientY)}function ae(r){Oe(r),E.set(r.clientX,r.clientY)}function Ie(r){C.set(r.clientX,r.clientY)}function we(r){$.set(r.clientX,r.clientY),y.subVectors($,b).multiplyScalar(e.rotateSpeed);const u=e.domElement;u&&(G(2*Math.PI*y.x/u.clientHeight),Z(2*Math.PI*y.y/u.clientHeight)),b.copy($),e.update()}function je(r){P.set(r.clientX,r.clientY),I.subVectors(P,E),I.y>0?ye(_()):I.y<0&&ke(_()),E.copy(P),e.update()}function Ze(r){j.set(r.clientX,r.clientY),z.subVectors(j,C).multiplyScalar(e.panSpeed),K(z.x,z.y),C.copy(j),e.update()}function Xe(r){Oe(r),r.deltaY<0?ke(_()):r.deltaY>0&&ye(_()),e.update()}function Ke(r){let u=!1;switch(r.code){case e.keys.UP:K(0,e.keyPanSpeed),u=!0;break;case e.keys.BOTTOM:K(0,-e.keyPanSpeed),u=!0;break;case e.keys.LEFT:K(e.keyPanSpeed,0),u=!0;break;case e.keys.RIGHT:K(-e.keyPanSpeed,0),u=!0;break}u&&(r.preventDefault(),e.update())}function ve(){if(f.length==1)b.set(f[0].pageX,f[0].pageY);else{const r=.5*(f[0].pageX+f[1].pageX),u=.5*(f[0].pageY+f[1].pageY);b.set(r,u)}}function Ne(){if(f.length==1)C.set(f[0].pageX,f[0].pageY);else{const r=.5*(f[0].pageX+f[1].pageX),u=.5*(f[0].pageY+f[1].pageY);C.set(r,u)}}function ze(){const r=f[0].pageX-f[1].pageX,u=f[0].pageY-f[1].pageY,A=Math.sqrt(r*r+u*u);E.set(0,A)}function S(){e.enableZoom&&ze(),e.enablePan&&Ne()}function B(){e.enableZoom&&ze(),e.enableRotate&&ve()}function W(r){if(f.length==1)$.set(r.pageX,r.pageY);else{const A=Qe(r),L=.5*(r.pageX+A.x),Y=.5*(r.pageY+A.y);$.set(L,Y)}y.subVectors($,b).multiplyScalar(e.rotateSpeed);const u=e.domElement;u&&(G(2*Math.PI*y.x/u.clientHeight),Z(2*Math.PI*y.y/u.clientHeight)),b.copy($)}function X(r){if(f.length==1)j.set(r.pageX,r.pageY);else{const u=Qe(r),A=.5*(r.pageX+u.x),L=.5*(r.pageY+u.y);j.set(A,L)}z.subVectors(j,C).multiplyScalar(e.panSpeed),K(z.x,z.y),C.copy(j)}function le(r){const u=Qe(r),A=r.pageX-u.x,L=r.pageY-u.y,Y=Math.sqrt(A*A+L*L);P.set(0,Y),I.set(0,Math.pow(P.y/E.y,e.zoomSpeed)),ye(I.y),E.copy(P)}function Re(r){e.enableZoom&&le(r),e.enablePan&&X(r)}function Le(r){e.enableZoom&&le(r),e.enableRotate&&W(r)}function Ce(r){var u,A;e.enabled!==!1&&(f.length===0&&((u=e.domElement)==null||u.ownerDocument.addEventListener("pointermove",ue),(A=e.domElement)==null||A.ownerDocument.addEventListener("pointerup",fe)),bo(r),r.pointerType==="touch"?xo(r):ho(r))}function ue(r){e.enabled!==!1&&(r.pointerType==="touch"?go(r):mo(r))}function fe(r){var u,A,L;wt(r),f.length===0&&((u=e.domElement)==null||u.releasePointerCapture(r.pointerId),(A=e.domElement)==null||A.ownerDocument.removeEventListener("pointermove",ue),(L=e.domElement)==null||L.ownerDocument.removeEventListener("pointerup",fe)),e.dispatchEvent(d),a=c.NONE}function gt(r){wt(r)}function ho(r){let u;switch(r.button){case 0:u=e.mouseButtons.LEFT;break;case 1:u=e.mouseButtons.MIDDLE;break;case 2:u=e.mouseButtons.RIGHT;break;default:u=-1}switch(u){case he.DOLLY:if(e.enableZoom===!1)return;ae(r),a=c.DOLLY;break;case he.ROTATE:if(r.ctrlKey||r.metaKey||r.shiftKey){if(e.enablePan===!1)return;Ie(r),a=c.PAN}else{if(e.enableRotate===!1)return;_e(r),a=c.ROTATE}break;case he.PAN:if(r.ctrlKey||r.metaKey||r.shiftKey){if(e.enableRotate===!1)return;_e(r),a=c.ROTATE}else{if(e.enablePan===!1)return;Ie(r),a=c.PAN}break;default:a=c.NONE}a!==c.NONE&&e.dispatchEvent(l)}function mo(r){if(e.enabled!==!1)switch(a){case c.ROTATE:if(e.enableRotate===!1)return;we(r);break;case c.DOLLY:if(e.enableZoom===!1)return;je(r);break;case c.PAN:if(e.enablePan===!1)return;Ze(r);break}}function bt(r){e.enabled===!1||e.enableZoom===!1||a!==c.NONE&&a!==c.ROTATE||(r.preventDefault(),e.dispatchEvent(l),Xe(r),e.dispatchEvent(d))}function qe(r){e.enabled===!1||e.enablePan===!1||Ke(r)}function xo(r){switch(jt(r),f.length){case 1:switch(e.touches.ONE){case me.ROTATE:if(e.enableRotate===!1)return;ve(),a=c.TOUCH_ROTATE;break;case me.PAN:if(e.enablePan===!1)return;Ne(),a=c.TOUCH_PAN;break;default:a=c.NONE}break;case 2:switch(e.touches.TWO){case me.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;S(),a=c.TOUCH_DOLLY_PAN;break;case me.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;B(),a=c.TOUCH_DOLLY_ROTATE;break;default:a=c.NONE}break;default:a=c.NONE}a!==c.NONE&&e.dispatchEvent(l)}function go(r){switch(jt(r),a){case c.TOUCH_ROTATE:if(e.enableRotate===!1)return;W(r),e.update();break;case c.TOUCH_PAN:if(e.enablePan===!1)return;X(r),e.update();break;case c.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Re(r),e.update();break;case c.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Le(r),e.update();break;default:a=c.NONE}}function yt(r){e.enabled!==!1&&r.preventDefault()}function bo(r){f.push(r)}function wt(r){delete O[r.pointerId];for(let u=0;unew Zo(void 0,void 0,void 0)),w=m.useCallback((h,x,g,b=20)=>(h instanceof N?a.v0.copy(h):a.v0.set(...h),x instanceof N?a.v2.copy(x):a.v2.set(...x),g instanceof N?a.v1.copy(g):a.v1.copy(a.v0.clone().add(a.v2.clone().sub(a.v0)).add(es.set(0,a.v0.y-a.v2.y,0))),a.getPoints(b)),[]);m.useLayoutEffect(()=>{c.current.setPoints=(h,x,g)=>{const b=w(h,x,g);c.current.geometry&&c.current.geometry.setPositions(b.map($=>$.toArray()).flat())}},[]);const p=m.useMemo(()=>w(n,s,e,i),[n,s,e,i]);return m.createElement(Bo,U({ref:Do([c,d]),points:p},l))}),ts=m.forwardRef(({makeDefault:t,camera:n,regress:s,domElement:e,enableDamping:i=!0,onChange:l,onStart:d,onEnd:c,...a},w)=>{const p=ee(P=>P.invalidate),h=ee(P=>P.camera),x=ee(P=>P.gl),g=ee(P=>P.events),b=ee(P=>P.setEvents),$=ee(P=>P.set),y=ee(P=>P.get),C=ee(P=>P.performance),j=n||h,z=e||g.connected||x.domElement,E=m.useMemo(()=>new Jn(j),[j]);return Ue(()=>{E.enabled&&E.update()},-1),m.useEffect(()=>(E.connect(z),()=>void E.dispose()),[z,s,E,p]),m.useEffect(()=>{const P=R=>{p(),s&&C.regress(),l&&l(R)},I=R=>{d&&d(R)},D=R=>{c&&c(R)};return E.addEventListener("change",P),E.addEventListener("start",I),E.addEventListener("end",D),()=>{E.removeEventListener("start",I),E.removeEventListener("end",D),E.removeEventListener("change",P)}},[l,d,c,E,p,b]),m.useEffect(()=>{if(t){const P=y().controls;return $({controls:E}),()=>$({controls:P})}},[t,E]),m.createElement("primitive",U({ref:w,object:E,enableDamping:i},a))});function os(t){const n=t+"Geometry";return m.forwardRef(({args:s,children:e,...i},l)=>m.createElement("mesh",U({ref:l},i),m.createElement(n,{attach:"geometry",args:s}),e))}const ns=os("circle"),Q=10,ss=2,rs=2,Gt=10,is=10,Yt=(t,n,s)=>{const l=new N().subVectors(n,t).normalize().multiplyScalar(s);return new N().addVectors(t,l)},as=(t,n,s,e)=>{const i=new N().lerpVectors(t,n,.5),l=new N().subVectors(n,t).normalize(),d=new N(-l.y,l.x,l.z).normalize(),c=(s-e/2)*is;return new N().addVectors(i,d.multiplyScalar(c))},uo=({links:t,nodes:n,onEdgeClick:s})=>{const e=m.useRef(null),{camera:i}=ee(),l=new N,d=new N,c=new N,a=new N,w=new N,p=new N,h=new N,x=new N;Ue(()=>{e.current&&n&&e.current.children.forEach((b,$)=>{var V,f,O,F;const y=t[$];if(!y)return;const C=n.find(_=>_.ref_id===y.target),j=n.find(_=>_.ref_id===y.source);l.set((j==null?void 0:j.x)||0,(j==null?void 0:j.y)||0,(j==null?void 0:j.z)||0),d.set((C==null?void 0:C.x)||0,(C==null?void 0:C.y)||0,(C==null?void 0:C.z)||0);const z=b.children[0],E=b.children[1],P=b.children[2],I=b.children[3],D=t.filter(_=>_.source===y.source&&_.target===y.target||_.source===y.target&&_.target===y.source).length,R=t.filter((_,G)=>G<$&&(_.source===y.source&&_.target===y.target||_.source===y.target&&_.target===y.source)).length;if((j==null?void 0:j.ref_id)===(C==null?void 0:C.ref_id)){const[_,G,Z]=No(l);(V=z.setPoints)==null||V.call(z,l,Z,_),(f=E.setPoints)==null||f.call(E,Z,d,_),P.position.set(Z.x,Z.y,G.z),P.lookAt(_),P.rotateX(-Math.PI/2),I.position.set(Z.x,Z.y,G.z),I.lookAt(i.position)}else{x.copy(Yt(l,d,Q)),h.copy(Yt(d,l,Q+.5)),c.lerpVectors(x,h,.5),D>1?c.copy(as(x,h,R,D)):c.lerpVectors(x,h,.5);const _=30;a.subVectors(h,x).normalize().multiplyScalar(_/2),w.subVectors(c,a),p.addVectors(c,a);const G=new N().addVectors(x,w).multiplyScalar(.5),Z=new N().addVectors(p,h).multiplyScalar(.5);(O=z.setPoints)==null||O.call(z,x,w,G),(F=E.setPoints)==null||F.call(E,p,h,Z),P.position.set(h.x,h.y,h.z),P.lookAt(x),P.rotateX(-Math.PI/2),I.position.set(c.x,c.y,c.z),I.lookAt(i.position);let J=Math.atan2(h.y-x.y,h.x-x.x);(J>Math.PI/2||J<-Math.PI/2)&&(J+=Math.PI),I.rotation.set(0,0,J);const ie=x.distanceTo(h),K=ie<_?2:4;ie<_?I.text=ut(y.edge_type,Gt):I.text=y.edge_type,I.fontSize=K}})});const g=(b,$,y,C)=>{if(b==="CHILD_OF"||$==="string"||y==="string")return;const j=n==null?void 0:n.find(I=>I.ref_id===$),z=n==null?void 0:n.find(I=>I.ref_id===y),E=(j==null?void 0:j.type)||"",P=(z==null?void 0:z.type)||"";s(C,b,E,P)};return o.jsx("group",{ref:e,children:t.map(b=>o.jsxs("group",{children:[o.jsx(Ft,{color:"white",end:[0,0,0],lineWidth:1,start:[0,0,0]}),o.jsx(Ft,{color:"white",end:[0,0,0],lineWidth:1,start:[0,0,0]}),o.jsxs("mesh",{position:new N(0,0,0),children:[o.jsx("coneGeometry",{args:[ss,rs,32]}),o.jsx("meshBasicMaterial",{color:"white"})]}),o.jsx(ao,{anchorX:"center",anchorY:"middle",color:"white",...co,lineHeight:1,maxWidth:20,onClick:()=>g(b.edge_type,b.source,b.target,b.ref_id),rotation:[0,0,0],textAlign:"center",children:ut(b.edge_type,Gt)})]},b.ref_id))})};uo.displayName="Lines";const cs=["#ff13c9","#5af0ff","#3233ff","#c2f0c2","#ff6666","#99ccff","#ffb3b3"],ls=k.div` +`;var Kn=Object.defineProperty,qn=(t,n,s)=>n in t?Kn(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s,M=(t,n,s)=>(qn(t,typeof n!="symbol"?n+"":n,s),s);const Ge=new Wo,Dt=new Ho,Qn=Math.cos(70*(Math.PI/180)),Vt=(t,n)=>(t%n+n)%n;let Jn=class extends Uo{constructor(n,s){super(),M(this,"object"),M(this,"domElement"),M(this,"enabled",!0),M(this,"target",new z),M(this,"minDistance",0),M(this,"maxDistance",1/0),M(this,"minZoom",0),M(this,"maxZoom",1/0),M(this,"minPolarAngle",0),M(this,"maxPolarAngle",Math.PI),M(this,"minAzimuthAngle",-1/0),M(this,"maxAzimuthAngle",1/0),M(this,"enableDamping",!1),M(this,"dampingFactor",.05),M(this,"enableZoom",!0),M(this,"zoomSpeed",1),M(this,"enableRotate",!0),M(this,"rotateSpeed",1),M(this,"enablePan",!0),M(this,"panSpeed",1),M(this,"screenSpacePanning",!0),M(this,"keyPanSpeed",7),M(this,"zoomToCursor",!1),M(this,"autoRotate",!1),M(this,"autoRotateSpeed",2),M(this,"reverseOrbit",!1),M(this,"reverseHorizontalOrbit",!1),M(this,"reverseVerticalOrbit",!1),M(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),M(this,"mouseButtons",{LEFT:he.ROTATE,MIDDLE:he.DOLLY,RIGHT:he.PAN}),M(this,"touches",{ONE:me.ROTATE,TWO:me.DOLLY_PAN}),M(this,"target0"),M(this,"position0"),M(this,"zoom0"),M(this,"_domElementKeyEvents",null),M(this,"getPolarAngle"),M(this,"getAzimuthalAngle"),M(this,"setPolarAngle"),M(this,"setAzimuthalAngle"),M(this,"getDistance"),M(this,"listenToKeyEvents"),M(this,"stopListenToKeyEvents"),M(this,"saveState"),M(this,"reset"),M(this,"update"),M(this,"connect"),M(this,"dispose"),this.object=n,this.domElement=s,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>p.phi,this.getAzimuthalAngle=()=>p.theta,this.setPolarAngle=r=>{let u=Vt(r,2*Math.PI),$=p.phi;$<0&&($+=2*Math.PI),u<0&&(u+=2*Math.PI);let B=Math.abs(u-$);2*Math.PI-B{let u=Vt(r,2*Math.PI),$=p.theta;$<0&&($+=2*Math.PI),u<0&&(u+=2*Math.PI);let B=Math.abs(u-$);2*Math.PI-Be.object.position.distanceTo(e.target),this.listenToKeyEvents=r=>{r.addEventListener("keydown",qe),this._domElementKeyEvents=r},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",qe),this._domElementKeyEvents=null},this.saveState=()=>{e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=()=>{e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(i),e.update(),a=c.NONE},this.update=(()=>{const r=new z,u=new z(0,1,0),$=new Ot().setFromUnitVectors(n.up,u),B=$.clone().invert(),Y=new z,oe=new Ot,ce=2*Math.PI;return function(){const vt=e.object.position;$.setFromUnitVectors(n.up,u),B.copy($).invert(),r.copy(vt).sub(e.target),r.applyQuaternion($),p.setFromVector3(r),e.autoRotate&&a===c.NONE&&G(F()),e.enableDamping?(p.theta+=h.theta*e.dampingFactor,p.phi+=h.phi*e.dampingFactor):(p.theta+=h.theta,p.phi+=h.phi);let ne=e.minAzimuthAngle,se=e.maxAzimuthAngle;isFinite(ne)&&isFinite(se)&&(ne<-Math.PI?ne+=ce:ne>Math.PI&&(ne-=ce),se<-Math.PI?se+=ce:se>Math.PI&&(se-=ce),ne<=se?p.theta=Math.max(ne,Math.min(se,p.theta)):p.theta=p.theta>(ne+se)/2?Math.max(ne,p.theta):Math.min(se,p.theta)),p.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,p.phi)),p.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(g,e.dampingFactor):e.target.add(g),e.zoomToCursor&&D||e.object.isOrthographicCamera?p.radius=pe(p.radius):p.radius=pe(p.radius*x),r.setFromSpherical(p),r.applyQuaternion(B),vt.copy(e.target).add(r),e.object.matrixAutoUpdate||e.object.updateMatrix(),e.object.lookAt(e.target),e.enableDamping===!0?(h.theta*=1-e.dampingFactor,h.phi*=1-e.dampingFactor,g.multiplyScalar(1-e.dampingFactor)):(h.set(0,0,0),g.set(0,0,0));let Be=!1;if(e.zoomToCursor&&D){let Ee=null;if(e.object instanceof Ve&&e.object.isPerspectiveCamera){const Pe=r.length();Ee=pe(Pe*x);const De=Pe-Ee;e.object.position.addScaledVector(V,De),e.object.updateMatrixWorld()}else if(e.object.isOrthographicCamera){const Pe=new z(L.x,L.y,0);Pe.unproject(e.object),e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/x)),e.object.updateProjectionMatrix(),Be=!0;const De=new z(L.x,L.y,0);De.unproject(e.object),e.object.position.sub(De).add(Pe),e.object.updateMatrixWorld(),Ee=r.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;Ee!==null&&(e.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(Ee).add(e.object.position):(Ge.origin.copy(e.object.position),Ge.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot(Ge.direction))w||8*(1-oe.dot(e.object.quaternion))>w?(e.dispatchEvent(i),Y.copy(e.object.position),oe.copy(e.object.quaternion),Be=!1,!0):!1}})(),this.connect=r=>{r===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),e.domElement=r,e.domElement.style.touchAction="none",e.domElement.addEventListener("contextmenu",yt),e.domElement.addEventListener("pointerdown",Ce),e.domElement.addEventListener("pointercancel",gt),e.domElement.addEventListener("wheel",bt)},this.dispose=()=>{var r,u,$,B,Y,oe;(r=e.domElement)==null||r.removeEventListener("contextmenu",yt),(u=e.domElement)==null||u.removeEventListener("pointerdown",Ce),($=e.domElement)==null||$.removeEventListener("pointercancel",gt),(B=e.domElement)==null||B.removeEventListener("wheel",bt),(Y=e.domElement)==null||Y.ownerDocument.removeEventListener("pointermove",ue),(oe=e.domElement)==null||oe.ownerDocument.removeEventListener("pointerup",fe),e._domElementKeyEvents!==null&&e._domElementKeyEvents.removeEventListener("keydown",qe)};const e=this,i={type:"change"},l={type:"start"},d={type:"end"},c={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let a=c.NONE;const w=1e-6,p=new St,h=new St;let x=1;const g=new z,b=new Q,k=new Q,y=new Q,C=new Q,j=new Q,N=new Q,E=new Q,P=new Q,I=new Q,V=new z,L=new Q;let D=!1;const f=[],S={};function F(){return 2*Math.PI/60/60*e.autoRotateSpeed}function _(){return Math.pow(.95,e.zoomSpeed)}function G(r){e.reverseOrbit||e.reverseHorizontalOrbit?h.theta+=r:h.theta-=r}function Z(r){e.reverseOrbit||e.reverseVerticalOrbit?h.phi+=r:h.phi-=r}const ee=(()=>{const r=new z;return function($,B){r.setFromMatrixColumn(B,0),r.multiplyScalar(-$),g.add(r)}})(),ae=(()=>{const r=new z;return function($,B){e.screenSpacePanning===!0?r.setFromMatrixColumn(B,1):(r.setFromMatrixColumn(B,0),r.crossVectors(e.object.up,r)),r.multiplyScalar($),g.add(r)}})(),q=(()=>{const r=new z;return function($,B){const Y=e.domElement;if(Y&&e.object instanceof Ve&&e.object.isPerspectiveCamera){const oe=e.object.position;r.copy(oe).sub(e.target);let ce=r.length();ce*=Math.tan(e.object.fov/2*Math.PI/180),ee(2*$*ce/Y.clientHeight,e.object.matrix),ae(2*B*ce/Y.clientHeight,e.object.matrix)}else Y&&e.object instanceof Fe&&e.object.isOrthographicCamera?(ee($*(e.object.right-e.object.left)/e.object.zoom/Y.clientWidth,e.object.matrix),ae(B*(e.object.top-e.object.bottom)/e.object.zoom/Y.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}})();function ye(r){e.object instanceof Ve&&e.object.isPerspectiveCamera||e.object instanceof Fe&&e.object.isOrthographicCamera?x/=r:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function Oe(r){e.object instanceof Ve&&e.object.isPerspectiveCamera||e.object instanceof Fe&&e.object.isOrthographicCamera?x*=r:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function Se(r){if(!e.zoomToCursor||!e.domElement)return;D=!0;const u=e.domElement.getBoundingClientRect(),$=r.clientX-u.left,B=r.clientY-u.top,Y=u.width,oe=u.height;L.x=$/Y*2-1,L.y=-(B/oe)*2+1,V.set(L.x,L.y,1).unproject(e.object).sub(e.object.position).normalize()}function pe(r){return Math.max(e.minDistance,Math.min(e.maxDistance,r))}function _e(r){b.set(r.clientX,r.clientY)}function X(r){Se(r),E.set(r.clientX,r.clientY)}function Ie(r){C.set(r.clientX,r.clientY)}function we(r){k.set(r.clientX,r.clientY),y.subVectors(k,b).multiplyScalar(e.rotateSpeed);const u=e.domElement;u&&(G(2*Math.PI*y.x/u.clientHeight),Z(2*Math.PI*y.y/u.clientHeight)),b.copy(k),e.update()}function je(r){P.set(r.clientX,r.clientY),I.subVectors(P,E),I.y>0?ye(_()):I.y<0&&Oe(_()),E.copy(P),e.update()}function Ze(r){j.set(r.clientX,r.clientY),N.subVectors(j,C).multiplyScalar(e.panSpeed),q(N.x,N.y),C.copy(j),e.update()}function Xe(r){Se(r),r.deltaY<0?Oe(_()):r.deltaY>0&&ye(_()),e.update()}function Ke(r){let u=!1;switch(r.code){case e.keys.UP:q(0,e.keyPanSpeed),u=!0;break;case e.keys.BOTTOM:q(0,-e.keyPanSpeed),u=!0;break;case e.keys.LEFT:q(e.keyPanSpeed,0),u=!0;break;case e.keys.RIGHT:q(-e.keyPanSpeed,0),u=!0;break}u&&(r.preventDefault(),e.update())}function ve(){if(f.length==1)b.set(f[0].pageX,f[0].pageY);else{const r=.5*(f[0].pageX+f[1].pageX),u=.5*(f[0].pageY+f[1].pageY);b.set(r,u)}}function ze(){if(f.length==1)C.set(f[0].pageX,f[0].pageY);else{const r=.5*(f[0].pageX+f[1].pageX),u=.5*(f[0].pageY+f[1].pageY);C.set(r,u)}}function Ne(){const r=f[0].pageX-f[1].pageX,u=f[0].pageY-f[1].pageY,$=Math.sqrt(r*r+u*u);E.set(0,$)}function A(){e.enableZoom&&Ne(),e.enablePan&&ze()}function R(){e.enableZoom&&Ne(),e.enableRotate&&ve()}function W(r){if(f.length==1)k.set(r.pageX,r.pageY);else{const $=Qe(r),B=.5*(r.pageX+$.x),Y=.5*(r.pageY+$.y);k.set(B,Y)}y.subVectors(k,b).multiplyScalar(e.rotateSpeed);const u=e.domElement;u&&(G(2*Math.PI*y.x/u.clientHeight),Z(2*Math.PI*y.y/u.clientHeight)),b.copy(k)}function K(r){if(f.length==1)j.set(r.pageX,r.pageY);else{const u=Qe(r),$=.5*(r.pageX+u.x),B=.5*(r.pageY+u.y);j.set($,B)}N.subVectors(j,C).multiplyScalar(e.panSpeed),q(N.x,N.y),C.copy(j)}function le(r){const u=Qe(r),$=r.pageX-u.x,B=r.pageY-u.y,Y=Math.sqrt($*$+B*B);P.set(0,Y),I.set(0,Math.pow(P.y/E.y,e.zoomSpeed)),ye(I.y),E.copy(P)}function Re(r){e.enableZoom&&le(r),e.enablePan&&K(r)}function Le(r){e.enableZoom&&le(r),e.enableRotate&&W(r)}function Ce(r){var u,$;e.enabled!==!1&&(f.length===0&&((u=e.domElement)==null||u.ownerDocument.addEventListener("pointermove",ue),($=e.domElement)==null||$.ownerDocument.addEventListener("pointerup",fe)),bo(r),r.pointerType==="touch"?xo(r):ho(r))}function ue(r){e.enabled!==!1&&(r.pointerType==="touch"?go(r):mo(r))}function fe(r){var u,$,B;wt(r),f.length===0&&((u=e.domElement)==null||u.releasePointerCapture(r.pointerId),($=e.domElement)==null||$.ownerDocument.removeEventListener("pointermove",ue),(B=e.domElement)==null||B.ownerDocument.removeEventListener("pointerup",fe)),e.dispatchEvent(d),a=c.NONE}function gt(r){wt(r)}function ho(r){let u;switch(r.button){case 0:u=e.mouseButtons.LEFT;break;case 1:u=e.mouseButtons.MIDDLE;break;case 2:u=e.mouseButtons.RIGHT;break;default:u=-1}switch(u){case he.DOLLY:if(e.enableZoom===!1)return;X(r),a=c.DOLLY;break;case he.ROTATE:if(r.ctrlKey||r.metaKey||r.shiftKey){if(e.enablePan===!1)return;Ie(r),a=c.PAN}else{if(e.enableRotate===!1)return;_e(r),a=c.ROTATE}break;case he.PAN:if(r.ctrlKey||r.metaKey||r.shiftKey){if(e.enableRotate===!1)return;_e(r),a=c.ROTATE}else{if(e.enablePan===!1)return;Ie(r),a=c.PAN}break;default:a=c.NONE}a!==c.NONE&&e.dispatchEvent(l)}function mo(r){if(e.enabled!==!1)switch(a){case c.ROTATE:if(e.enableRotate===!1)return;we(r);break;case c.DOLLY:if(e.enableZoom===!1)return;je(r);break;case c.PAN:if(e.enablePan===!1)return;Ze(r);break}}function bt(r){e.enabled===!1||e.enableZoom===!1||a!==c.NONE&&a!==c.ROTATE||(r.preventDefault(),e.dispatchEvent(l),Xe(r),e.dispatchEvent(d))}function qe(r){e.enabled===!1||e.enablePan===!1||Ke(r)}function xo(r){switch(jt(r),f.length){case 1:switch(e.touches.ONE){case me.ROTATE:if(e.enableRotate===!1)return;ve(),a=c.TOUCH_ROTATE;break;case me.PAN:if(e.enablePan===!1)return;ze(),a=c.TOUCH_PAN;break;default:a=c.NONE}break;case 2:switch(e.touches.TWO){case me.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;A(),a=c.TOUCH_DOLLY_PAN;break;case me.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;R(),a=c.TOUCH_DOLLY_ROTATE;break;default:a=c.NONE}break;default:a=c.NONE}a!==c.NONE&&e.dispatchEvent(l)}function go(r){switch(jt(r),a){case c.TOUCH_ROTATE:if(e.enableRotate===!1)return;W(r),e.update();break;case c.TOUCH_PAN:if(e.enablePan===!1)return;K(r),e.update();break;case c.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;Re(r),e.update();break;case c.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Le(r),e.update();break;default:a=c.NONE}}function yt(r){e.enabled!==!1&&r.preventDefault()}function bo(r){f.push(r)}function wt(r){delete S[r.pointerId];for(let u=0;unew Zo(void 0,void 0,void 0)),w=m.useCallback((h,x,g,b=20)=>(h instanceof z?a.v0.copy(h):a.v0.set(...h),x instanceof z?a.v2.copy(x):a.v2.set(...x),g instanceof z?a.v1.copy(g):a.v1.copy(a.v0.clone().add(a.v2.clone().sub(a.v0)).add(es.set(0,a.v0.y-a.v2.y,0))),a.getPoints(b)),[]);m.useLayoutEffect(()=>{c.current.setPoints=(h,x,g)=>{const b=w(h,x,g);c.current.geometry&&c.current.geometry.setPositions(b.map(k=>k.toArray()).flat())}},[]);const p=m.useMemo(()=>w(n,s,e,i),[n,s,e,i]);return m.createElement(Bo,U({ref:Do([c,d]),points:p},l))}),ts=m.forwardRef(({makeDefault:t,camera:n,regress:s,domElement:e,enableDamping:i=!0,onChange:l,onStart:d,onEnd:c,...a},w)=>{const p=te(P=>P.invalidate),h=te(P=>P.camera),x=te(P=>P.gl),g=te(P=>P.events),b=te(P=>P.setEvents),k=te(P=>P.set),y=te(P=>P.get),C=te(P=>P.performance),j=n||h,N=e||g.connected||x.domElement,E=m.useMemo(()=>new Jn(j),[j]);return Ue(()=>{E.enabled&&E.update()},-1),m.useEffect(()=>(E.connect(N),()=>void E.dispose()),[N,s,E,p]),m.useEffect(()=>{const P=L=>{p(),s&&C.regress(),l&&l(L)},I=L=>{d&&d(L)},V=L=>{c&&c(L)};return E.addEventListener("change",P),E.addEventListener("start",I),E.addEventListener("end",V),()=>{E.removeEventListener("start",I),E.removeEventListener("end",V),E.removeEventListener("change",P)}},[l,d,c,E,p,b]),m.useEffect(()=>{if(t){const P=y().controls;return k({controls:E}),()=>k({controls:P})}},[t,E]),m.createElement("primitive",U({ref:w,object:E,enableDamping:i},a))});function os(t){const n=t+"Geometry";return m.forwardRef(({args:s,children:e,...i},l)=>m.createElement("mesh",U({ref:l},i),m.createElement(n,{attach:"geometry",args:s}),e))}const ns=os("circle"),J=10,ss=2,rs=2,Gt=10,is=10,Yt=(t,n,s)=>{const l=new z().subVectors(n,t).normalize().multiplyScalar(s);return new z().addVectors(t,l)},as=(t,n,s,e)=>{const i=new z().lerpVectors(t,n,.5),l=new z().subVectors(n,t).normalize(),d=new z(-l.y,l.x,l.z).normalize(),c=(s-e/2)*is;return new z().addVectors(i,d.multiplyScalar(c))},uo=({links:t,nodes:n,onEdgeClick:s})=>{const e=m.useRef(null),{camera:i}=te(),l=new z,d=new z,c=new z,a=new z,w=new z,p=new z,h=new z,x=new z;Ue(()=>{e.current&&n&&e.current.children.forEach((b,k)=>{var D,f,S,F;const y=t[k];if(!y)return;const C=n.find(_=>_.ref_id===y.target),j=n.find(_=>_.ref_id===y.source);l.set((j==null?void 0:j.x)||0,(j==null?void 0:j.y)||0,(j==null?void 0:j.z)||0),d.set((C==null?void 0:C.x)||0,(C==null?void 0:C.y)||0,(C==null?void 0:C.z)||0);const N=b.children[0],E=b.children[1],P=b.children[2],I=b.children[3],V=t.filter(_=>_.source===y.source&&_.target===y.target||_.source===y.target&&_.target===y.source).length,L=t.filter((_,G)=>G1?c.copy(as(x,h,L,V)):c.lerpVectors(x,h,.5);const _=30;a.subVectors(h,x).normalize().multiplyScalar(_/2),w.subVectors(c,a),p.addVectors(c,a);const G=new z().addVectors(x,w).multiplyScalar(.5),Z=new z().addVectors(p,h).multiplyScalar(.5);(S=N.setPoints)==null||S.call(N,x,w,G),(F=E.setPoints)==null||F.call(E,p,h,Z),P.position.set(h.x,h.y,h.z),P.lookAt(x),P.rotateX(-Math.PI/2),I.position.set(c.x,c.y,c.z),I.lookAt(i.position);let ee=Math.atan2(h.y-x.y,h.x-x.x);(ee>Math.PI/2||ee<-Math.PI/2)&&(ee+=Math.PI),I.rotation.set(0,0,ee);const ae=x.distanceTo(h),q=ae<_?2:4;ae<_?I.text=ut(y.edge_type,Gt):I.text=y.edge_type,I.fontSize=q}})});const g=(b,k,y,C)=>{if(b==="CHILD_OF"||k==="string"||y==="string")return;const j=n==null?void 0:n.find(I=>I.ref_id===k),N=n==null?void 0:n.find(I=>I.ref_id===y),E=(j==null?void 0:j.type)||"",P=(N==null?void 0:N.type)||"";s(C,b,E,P)};return o.jsx("group",{ref:e,children:t.map(b=>o.jsxs("group",{children:[o.jsx(Ft,{color:"white",end:[0,0,0],lineWidth:1,start:[0,0,0]}),o.jsx(Ft,{color:"white",end:[0,0,0],lineWidth:1,start:[0,0,0]}),o.jsxs("mesh",{position:new z(0,0,0),children:[o.jsx("coneGeometry",{args:[ss,rs,32]}),o.jsx("meshBasicMaterial",{color:"white"})]}),o.jsx(ao,{anchorX:"center",anchorY:"middle",color:"white",...co,lineHeight:1,maxWidth:20,onClick:()=>g(b.edge_type,b.source,b.target,b.ref_id),rotation:[0,0,0],textAlign:"center",children:ut(b.edge_type,Gt)})]},b.ref_id))})};uo.displayName="Lines";const cs=["#ff13c9","#5af0ff","#3233ff","#c2f0c2","#ff6666","#99ccff","#ffb3b3"],ls=O.div` color: white; background: rgba(0, 0, 0, 1); padding: 2px 5px; @@ -204,9 +204,9 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a font-size: 12px; font-style: normal; font-weight: 400; -`,ds=k(Vo)` +`,ds=O(Vo)` position: absolute; -`;new Xo(2,2,2);const fo=m.memo(({node:t,setSelectedNode:n,onSimulationUpdate:s,isSelected:e})=>{var $;const i=m.useRef(null),[l,d]=m.useState(!1);console.log(e);const{size:c,camera:a}=ee(),w=ko(y=>{if(t.type==="Thing")return;const{xy:[C,j],down:z,dragging:E,first:P,elapsedTime:I}=y;if(!(!E||P||I<100)&&z&&i.current){s();const D=(C-c.left)/window.innerWidth*c.width,R=(j-c.top)/window.innerHeight*c.height,O=new N(D/c.width*2-1,-R/c.height*2+1,0).unproject(a).multiply(new N(1,1,0)).clone();t.fx=O.x,t.fy=O.y}});Ue(()=>{i.current&&i.current.position.set(t.x||0,t.y||0,0)});const p=cs[($=t==null?void 0:t.children)==null?void 0:$.length]||"red",h=y=>{y.stopPropagation(),t.type!=="Thing"&&n()},x=ut(t.type||"",Q),g=()=>{d(!0)},b=()=>{d(!1)};return o.jsxs("mesh",{ref:i,onClick:h,...w(),onPointerOut:b,onPointerOver:g,position:new N(t.x,t.y,0),children:[o.jsx(ns,{args:[Q,30,20],children:o.jsx("meshStandardMaterial",{attach:"material",color:p})}),o.jsx(ao,{...co,clipRect:[-Q,-Q,Q,Q],color:"#000",fontSize:2,maxWidth:Q*2,name:t.type,textAlign:"left",children:x}),l&&o.jsx(ds,{position:[0,5,0],zIndexRange:[100,0],children:o.jsx(ls,{children:t.type})})]})});fo.displayName="Node";const ps=({simulation:t,setSelectedSchemaId:n,selectedId:s,setIsAddEdgeNode:e})=>{const[i]=no(d=>[d.schemas]),l=()=>{t&&(t.alpha(.05),t.restart())};return o.jsx(o.Fragment,{children:i.map((d,c)=>{const a=t.nodes()[c];return a?o.jsx(fo,{isSelected:a.ref_id===s,node:a,onSimulationUpdate:l,setSelectedNode:()=>{e(!1),n(a.ref_id)}},a.ref_id):null})})},us=({schemasWithPositions:t,filteredLinks:n,setSelectedSchemaId:s,selectedSchemaId:e,setIsAddEdgeNode:i,onEdgeClick:l})=>{const[d,c]=m.useState(null),a=St(t),w=St(n);return m.useEffect(()=>{if(!t.length||!n.length)return;const p=structuredClone(t),h=structuredClone(n);if(d){a&&a.length!==t.length&&w&&w.length!==n.length&&(d.nodes(p).force("link",Et(h).id(g=>g.ref_id).distance(100)).force("charge",Pt()).force("center",Tt()).force("collide",Mt(Q+5)).alpha(.5).restart(),c({...d}));return}const x=Po(p).force("link",Et(h).id(g=>g.ref_id).distance(120)).force("charge",Pt().strength(-100)).force("center",Tt()).force("collide",Mt(Q+5));c(x)},[t,d,n,a,w]),Ue(()=>{}),d?o.jsxs(o.Fragment,{children:[o.jsx(uo,{links:n,nodes:d.nodes(),onEdgeClick:l}),o.jsx(ps,{selectedId:e,setIsAddEdgeNode:i,setSelectedSchemaId:s,simulation:d})]}):null},at=new Ko(0),fs=({selectedSchemaId:t,links:n,schemasWithPositions:s,setSelectedSchemaId:e,setIsAddEdgeNode:i,onEdgeClick:l})=>o.jsxs(Fo,{camera:{zoom:1,position:[0,0,200]},id:"schema-canvas",linear:!0,orthographic:!0,children:[o.jsx("color",{args:[at.r,at.g,at.b],attach:"background"}),To&&o.jsx(Go,{position:"right-bottom"}),o.jsx(hs,{}),o.jsx(Yo,{}),o.jsx(us,{filteredLinks:n,onEdgeClick:l,schemasWithPositions:s,selectedSchemaId:t,setIsAddEdgeNode:i,setSelectedSchemaId:e})]}),hs=()=>{m.useEffect(()=>{const s=i=>{["Meta","Alt"].includes(i.key)&&(document.body.style.cursor="grab")},e=i=>{["Meta","Alt"].includes(i.key)&&(document.body.style.cursor="default")};return window.addEventListener("keydown",s,!1),window.addEventListener("keyup",e,!1),()=>{window.removeEventListener("keydown",s,!1),window.removeEventListener("keyup",e,!1)}},[]);const t=()=>{document.body.style.cursor="grabbing"},n=()=>{document.body.style.cursor="default"};return o.jsx(ts,{dampingFactor:1,enableDamping:!0,enablePan:!0,enableRotate:!1,enableZoom:!0,maxZoom:20,minZoom:1,onEnd:n,onStart:t,zoomSpeed:1.5,zoomToCursor:!0})},ms=t=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 19",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M9.5002 0.270145C10.3742 0.270145 11.1128 0.571885 11.7161 1.17537C12.3193 1.77868 12.6209 2.51732 12.6209 3.39129C12.6209 4.17273 12.3716 4.85117 11.873 5.42662C11.3744 6.00189 10.7483 6.34792 9.99474 6.46469L9.99474 9.0052L13.8388 9.0052C14.2785 9.0052 14.6549 9.16172 14.9679 9.47476C15.2809 9.78779 15.4375 10.1642 15.4375 10.6039L15.4375 12.564L17.0171 12.564C17.2435 12.564 17.4334 12.6405 17.5866 12.7936C17.7396 12.9468 17.8162 13.1366 17.8162 13.3631L17.8162 17.5042C17.8162 17.7389 17.7396 17.9321 17.5866 18.0836C17.4334 18.2352 17.2435 18.311 17.0171 18.311L12.8759 18.311C12.6412 18.311 12.4481 18.2345 12.2965 18.0814C12.1449 17.9282 12.0692 17.7384 12.0692 17.5119L12.0692 13.3707C12.0692 13.136 12.1457 12.9429 12.2987 12.7913C12.452 12.6398 12.6418 12.564 12.8682 12.564L14.4479 12.564L14.4479 10.6039C14.4479 10.4262 14.3908 10.2803 14.2767 10.166C14.1624 10.0518 14.0164 9.99478 13.8388 9.99478L5.16112 9.99478C4.98349 9.99478 4.83753 10.0518 4.72323 10.166C4.6091 10.2803 4.55203 10.4262 4.55203 10.6039L4.55203 12.6115C5.3056 12.7283 5.93168 13.0743 6.43026 13.6496C6.92885 14.225 7.17814 14.9034 7.17814 15.6849C7.17814 16.5587 6.87648 17.2973 6.27317 17.9008C5.66969 18.5041 4.93096 18.8058 4.05699 18.8058C3.18303 18.8058 2.44439 18.5041 1.84107 17.9008C1.23792 17.2973 0.936342 16.5587 0.936343 15.6849C0.936343 14.9034 1.18564 14.225 1.68422 13.6496C2.18281 13.0743 2.80888 12.7283 3.56245 12.6115L3.56245 10.6039C3.56245 10.1642 3.71897 9.78779 4.03201 9.47476C4.34504 9.16172 4.72142 9.0052 5.16112 9.0052L9.00516 9.0052L9.00516 6.46469C8.25159 6.34792 7.62552 6.00189 7.12693 5.42662C6.62835 4.85117 6.37905 4.17273 6.37905 3.39129C6.37905 2.51732 6.68071 1.77868 7.28403 1.17537C7.88751 0.571885 8.62623 0.270145 9.5002 0.270145Z",fill:"currentColor"})}),xs=({onClose:t,activeTab:n,setActiveTab:s})=>o.jsxs(gs,{children:[o.jsxs(bs,{children:[o.jsx(ms,{}),o.jsx(ys,{children:"Blueprint"})]}),o.jsxs(ws,{children:[o.jsx(Wt,{active:n==="all",onClick:()=>s("all"),children:"Show All"}),o.jsx(Wt,{active:n==="parent",onClick:()=>s("parent"),children:"Parent Only"})]}),o.jsx(js,{onClick:t,children:o.jsx(xt,{})})]}),gs=k(v)` +`;new Xo(2,2,2);const fo=m.memo(({node:t,setSelectedNode:n,onSimulationUpdate:s,isSelected:e})=>{var k;const i=m.useRef(null),[l,d]=m.useState(!1);console.log(e);const{size:c,camera:a}=te(),w=Oo(y=>{if(t.type==="Thing")return;const{xy:[C,j],down:N,dragging:E,first:P,elapsedTime:I}=y;if(!(!E||P||I<100)&&N&&i.current){s();const V=(C-c.left)/window.innerWidth*c.width,L=(j-c.top)/window.innerHeight*c.height,S=new z(V/c.width*2-1,-L/c.height*2+1,0).unproject(a).multiply(new z(1,1,0)).clone();t.fx=S.x,t.fy=S.y}});Ue(()=>{i.current&&i.current.position.set(t.x||0,t.y||0,0)});const p=cs[(k=t==null?void 0:t.children)==null?void 0:k.length]||"red",h=y=>{y.stopPropagation(),t.type!=="Thing"&&n()},x=ut(t.type||"",J),g=()=>{d(!0)},b=()=>{d(!1)};return o.jsxs("mesh",{ref:i,onClick:h,...w(),onPointerOut:b,onPointerOver:g,position:new z(t.x,t.y,0),children:[o.jsx(ns,{args:[J,30,20],children:o.jsx("meshStandardMaterial",{attach:"material",color:p})}),o.jsx(ao,{...co,clipRect:[-J,-J,J,J],color:"#000",fontSize:2,maxWidth:J*2,name:t.type,textAlign:"left",children:x}),l&&o.jsx(ds,{position:[0,5,0],zIndexRange:[100,0],children:o.jsx(ls,{children:t.type})})]})});fo.displayName="Node";const ps=({simulation:t,setSelectedSchemaId:n,selectedId:s,setIsAddEdgeNode:e})=>{const[i]=no(d=>[d.schemas]),l=()=>{t&&(t.alpha(.05),t.restart())};return o.jsx(o.Fragment,{children:i.map((d,c)=>{const a=t.nodes()[c];return a?o.jsx(fo,{isSelected:a.ref_id===s,node:a,onSimulationUpdate:l,setSelectedNode:()=>{e(!1),n(a.ref_id)}},a.ref_id):null})})},us=({schemasWithPositions:t,filteredLinks:n,setSelectedSchemaId:s,selectedSchemaId:e,setIsAddEdgeNode:i,onEdgeClick:l})=>{const[d,c]=m.useState(null),a=kt(t),w=kt(n);return m.useEffect(()=>{if(!t.length||!n.length)return;const p=structuredClone(t),h=structuredClone(n);if(d){a&&a.length!==t.length&&w&&w.length!==n.length&&(d.nodes(p).force("link",Et(h).id(g=>g.ref_id).distance(100)).force("charge",Pt()).force("center",Tt()).force("collide",Mt(J+5)).alpha(.5).restart(),c({...d}));return}const x=Po(p).force("link",Et(h).id(g=>g.ref_id).distance(120)).force("charge",Pt().strength(-100)).force("center",Tt()).force("collide",Mt(J+5));c(x)},[t,d,n,a,w]),Ue(()=>{}),d?o.jsxs(o.Fragment,{children:[o.jsx(uo,{links:n,nodes:d.nodes(),onEdgeClick:l}),o.jsx(ps,{selectedId:e,setIsAddEdgeNode:i,setSelectedSchemaId:s,simulation:d})]}):null},at=new Ko(0),fs=({selectedSchemaId:t,links:n,schemasWithPositions:s,setSelectedSchemaId:e,setIsAddEdgeNode:i,onEdgeClick:l})=>o.jsxs(Fo,{camera:{zoom:1,position:[0,0,200]},id:"schema-canvas",linear:!0,orthographic:!0,children:[o.jsx("color",{args:[at.r,at.g,at.b],attach:"background"}),To&&o.jsx(Go,{position:"right-bottom"}),o.jsx(hs,{}),o.jsx(Yo,{}),o.jsx(us,{filteredLinks:n,onEdgeClick:l,schemasWithPositions:s,selectedSchemaId:t,setIsAddEdgeNode:i,setSelectedSchemaId:e})]}),hs=()=>{m.useEffect(()=>{const s=i=>{["Meta","Alt"].includes(i.key)&&(document.body.style.cursor="grab")},e=i=>{["Meta","Alt"].includes(i.key)&&(document.body.style.cursor="default")};return window.addEventListener("keydown",s,!1),window.addEventListener("keyup",e,!1),()=>{window.removeEventListener("keydown",s,!1),window.removeEventListener("keyup",e,!1)}},[]);const t=()=>{document.body.style.cursor="grabbing"},n=()=>{document.body.style.cursor="default"};return o.jsx(ts,{dampingFactor:1,enableDamping:!0,enablePan:!0,enableRotate:!1,enableZoom:!0,maxZoom:20,minZoom:1,onEnd:n,onStart:t,zoomSpeed:1.5,zoomToCursor:!0})},ms=t=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 18 19",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M9.5002 0.270145C10.3742 0.270145 11.1128 0.571885 11.7161 1.17537C12.3193 1.77868 12.6209 2.51732 12.6209 3.39129C12.6209 4.17273 12.3716 4.85117 11.873 5.42662C11.3744 6.00189 10.7483 6.34792 9.99474 6.46469L9.99474 9.0052L13.8388 9.0052C14.2785 9.0052 14.6549 9.16172 14.9679 9.47476C15.2809 9.78779 15.4375 10.1642 15.4375 10.6039L15.4375 12.564L17.0171 12.564C17.2435 12.564 17.4334 12.6405 17.5866 12.7936C17.7396 12.9468 17.8162 13.1366 17.8162 13.3631L17.8162 17.5042C17.8162 17.7389 17.7396 17.9321 17.5866 18.0836C17.4334 18.2352 17.2435 18.311 17.0171 18.311L12.8759 18.311C12.6412 18.311 12.4481 18.2345 12.2965 18.0814C12.1449 17.9282 12.0692 17.7384 12.0692 17.5119L12.0692 13.3707C12.0692 13.136 12.1457 12.9429 12.2987 12.7913C12.452 12.6398 12.6418 12.564 12.8682 12.564L14.4479 12.564L14.4479 10.6039C14.4479 10.4262 14.3908 10.2803 14.2767 10.166C14.1624 10.0518 14.0164 9.99478 13.8388 9.99478L5.16112 9.99478C4.98349 9.99478 4.83753 10.0518 4.72323 10.166C4.6091 10.2803 4.55203 10.4262 4.55203 10.6039L4.55203 12.6115C5.3056 12.7283 5.93168 13.0743 6.43026 13.6496C6.92885 14.225 7.17814 14.9034 7.17814 15.6849C7.17814 16.5587 6.87648 17.2973 6.27317 17.9008C5.66969 18.5041 4.93096 18.8058 4.05699 18.8058C3.18303 18.8058 2.44439 18.5041 1.84107 17.9008C1.23792 17.2973 0.936342 16.5587 0.936343 15.6849C0.936343 14.9034 1.18564 14.225 1.68422 13.6496C2.18281 13.0743 2.80888 12.7283 3.56245 12.6115L3.56245 10.6039C3.56245 10.1642 3.71897 9.78779 4.03201 9.47476C4.34504 9.16172 4.72142 9.0052 5.16112 9.0052L9.00516 9.0052L9.00516 6.46469C8.25159 6.34792 7.62552 6.00189 7.12693 5.42662C6.62835 4.85117 6.37905 4.17273 6.37905 3.39129C6.37905 2.51732 6.68071 1.77868 7.28403 1.17537C7.88751 0.571885 8.62623 0.270145 9.5002 0.270145Z",fill:"currentColor"})}),xs=({onClose:t,activeTab:n,setActiveTab:s})=>o.jsxs(gs,{children:[o.jsxs(bs,{children:[o.jsx(ms,{}),o.jsx(ys,{children:"Blueprint"})]}),o.jsxs(ws,{children:[o.jsx(Wt,{active:n==="all",onClick:()=>s("all"),children:"Show All"}),o.jsx(Wt,{active:n==="parent",onClick:()=>s("parent"),children:"Parent Only"})]}),o.jsx(js,{onClick:t,children:o.jsx(xt,{})})]}),gs=O(v)` background-color: ${T.BG1}; height: 64px; width: 100%; @@ -215,7 +215,7 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a justify-content: space-between; padding: 17px; border-bottom: 1px solid ${T.black}; -`,bs=k.div` +`,bs=O.div` display: flex; align-items: center; font-size: 22px; @@ -226,13 +226,13 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a color: ${T.GRAY6}; margin-left: 6px; } -`,ys=k.span` +`,ys=O.span` color: ${T.white}; font-weight: 400; font-family: Barlow; margin-left: 15px; font-size: 22px; -`,ws=k.div` +`,ws=O.div` display: flex; position: absolute; top: 16px; @@ -240,7 +240,7 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a background-color: ${T.divider2}; border-radius: 6px; padding: 2px; -`,Wt=k.div` +`,Wt=O.div` color: ${t=>t.active?T.white:T.GRAY6}; background-color: ${t=>t.active?T.BUTTON1:"transparent"}; padding: 6px 12px; @@ -254,7 +254,7 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a &:first-child { margin-left: 0; } -`,js=k.div` +`,js=O.div` position: absolute; top: 16px; right: 12px; @@ -267,11 +267,11 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a width: 30px; height: 32px; } -`,vs=t=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 23 22",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[o.jsx("mask",{id:"mask0_8954_27793",maskUnits:"userSpaceOnUse",x:"10",y:"-3",width:"16",height:"16",children:o.jsx("rect",{x:"10",y:"-3",width:"1em",height:"1em",fill:"currentColor"})}),o.jsx("g",{mask:"url(#mask0_8954_27793)",children:o.jsx("path",{d:"M17.5 5.50005H14.1666C14.025 5.50005 13.9062 5.45212 13.8104 5.35625C13.7145 5.26037 13.6666 5.14157 13.6666 4.99985C13.6666 4.85812 13.7145 4.73939 13.8104 4.64367C13.9062 4.54794 14.025 4.50008 14.1666 4.50008H17.5V1.16675C17.5 1.02508 17.5479 0.906331 17.6438 0.810498C17.7396 0.714665 17.8584 0.666748 18.0002 0.666748C18.1419 0.666748 18.2606 0.714665 18.3563 0.810498C18.4521 0.906331 18.4999 1.02508 18.4999 1.16675V4.50008H21.8333C21.9749 4.50008 22.0937 4.54802 22.1895 4.64388C22.2853 4.73976 22.3333 4.85856 22.3333 5.00028C22.3333 5.14202 22.2853 5.26074 22.1895 5.35647C22.0937 5.45219 21.9749 5.50005 21.8333 5.50005H18.4999V8.83338C18.4999 8.97505 18.452 9.0938 18.3561 9.18963C18.2602 9.28547 18.1414 9.33338 17.9997 9.33338C17.858 9.33338 17.7393 9.28547 17.6435 9.18963C17.5478 9.0938 17.5 8.97505 17.5 8.83338V5.50005Z",fill:"currentColor"})}),o.jsx("path",{d:"M1.33333 6C1.33333 7.47276 2.52724 8.66667 4 8.66667C5.47276 8.66667 6.66667 7.47276 6.66667 6C6.66667 4.52724 5.47276 3.33333 4 3.33333C2.52724 3.33333 1.33333 4.52724 1.33333 6ZM14.3333 19C14.3333 20.4728 15.5272 21.6667 17 21.6667C18.4728 21.6667 19.6667 20.4728 19.6667 19C19.6667 17.5272 18.4728 16.3333 17 16.3333C15.5272 16.3333 14.3333 17.5272 14.3333 19ZM3.64645 6.35355L16.6464 19.3536L17.3536 18.6464L4.35355 5.64645L3.64645 6.35355Z",fill:"currentColor"})]}),Cs=({onCreateNew:t,onAddEdgeNode:n})=>o.jsxs(Es,{children:[o.jsx(ct,{"data-testid":"add-schema-type",onClick:t,children:o.jsx(lt,{children:o.jsx(io,{})})}),o.jsx(ct,{"data-testid":"add-edge",onClick:n,children:o.jsx(lt,{children:o.jsx(vs,{})})}),o.jsx(ct,{disabled:!0,children:o.jsx(lt,{children:o.jsx(ro,{})})})]}),Es=k(v).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` +`,vs=t=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 23 22",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[o.jsx("mask",{id:"mask0_8954_27793",maskUnits:"userSpaceOnUse",x:"10",y:"-3",width:"16",height:"16",children:o.jsx("rect",{x:"10",y:"-3",width:"1em",height:"1em",fill:"currentColor"})}),o.jsx("g",{mask:"url(#mask0_8954_27793)",children:o.jsx("path",{d:"M17.5 5.50005H14.1666C14.025 5.50005 13.9062 5.45212 13.8104 5.35625C13.7145 5.26037 13.6666 5.14157 13.6666 4.99985C13.6666 4.85812 13.7145 4.73939 13.8104 4.64367C13.9062 4.54794 14.025 4.50008 14.1666 4.50008H17.5V1.16675C17.5 1.02508 17.5479 0.906331 17.6438 0.810498C17.7396 0.714665 17.8584 0.666748 18.0002 0.666748C18.1419 0.666748 18.2606 0.714665 18.3563 0.810498C18.4521 0.906331 18.4999 1.02508 18.4999 1.16675V4.50008H21.8333C21.9749 4.50008 22.0937 4.54802 22.1895 4.64388C22.2853 4.73976 22.3333 4.85856 22.3333 5.00028C22.3333 5.14202 22.2853 5.26074 22.1895 5.35647C22.0937 5.45219 21.9749 5.50005 21.8333 5.50005H18.4999V8.83338C18.4999 8.97505 18.452 9.0938 18.3561 9.18963C18.2602 9.28547 18.1414 9.33338 17.9997 9.33338C17.858 9.33338 17.7393 9.28547 17.6435 9.18963C17.5478 9.0938 17.5 8.97505 17.5 8.83338V5.50005Z",fill:"currentColor"})}),o.jsx("path",{d:"M1.33333 6C1.33333 7.47276 2.52724 8.66667 4 8.66667C5.47276 8.66667 6.66667 7.47276 6.66667 6C6.66667 4.52724 5.47276 3.33333 4 3.33333C2.52724 3.33333 1.33333 4.52724 1.33333 6ZM14.3333 19C14.3333 20.4728 15.5272 21.6667 17 21.6667C18.4728 21.6667 19.6667 20.4728 19.6667 19C19.6667 17.5272 18.4728 16.3333 17 16.3333C15.5272 16.3333 14.3333 17.5272 14.3333 19ZM3.64645 6.35355L16.6464 19.3536L17.3536 18.6464L4.35355 5.64645L3.64645 6.35355Z",fill:"currentColor"})]}),Cs=({onCreateNew:t,onAddEdgeNode:n})=>o.jsxs(Es,{children:[o.jsx(ct,{"data-testid":"add-schema-type",onClick:t,children:o.jsx(lt,{children:o.jsx(io,{})})}),o.jsx(ct,{"data-testid":"add-edge",onClick:n,children:o.jsx(lt,{children:o.jsx(vs,{})})}),o.jsx(ct,{disabled:!0,children:o.jsx(lt,{children:o.jsx(ro,{})})})]}),Es=O(v).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` flex: 1; gap: 17px; padding: 16px 0 0 16px; -`,ct=k(v).attrs({align:"center",justify:"center",p:0})` +`,ct=O(v).attrs({align:"center",justify:"center",p:0})` position: relative; width: 40px; height: 40px; @@ -298,11 +298,11 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a justify-content: center; border: none; } -`,lt=k(v)` +`,lt=O(v)` justify-content: center; align-items: center; font-size: 24px; -`,Ps=({Close:t})=>{const[n,s]=m.useState(""),[e,i]=m.useState(!1),[l,d]=m.useState(!1),[c,a]=m.useState(!1),[w,p]=m.useState({refId:"",edgeType:"",source:"",target:""}),[h,x]=m.useState(!1),[g,b]=m.useState("all"),[$,y,C,j]=no(f=>[f.schemas,f.links,f.setSchemas,f.setSchemaLinks]);m.useEffect(()=>{(async()=>{d(!0);try{const O=await At(),F=O.schemas.filter(_=>_.ref_id&&!_.is_deleted);C(F.length>0?F:O.schemas),j(O.edges.length>0?O.edges:[]),d(!1)}catch(O){console.error("Error fetching data:",O),d(!1)}})()},[C,j]);const z=f=>{if($.some(F=>F.ref_id===f.ref_id))C($.map(F=>F.ref_id===f.ref_id?{...f,children:[]}:F));else{C([...$,{...f,children:[]}]);const F=$.find(_=>f.parent===_.type);j([...y,{ref_id:`new-link-${y.length}`,edge_type:"CHILD_OF",source:f.ref_id||"new",target:(F==null?void 0:F.ref_id)||"new"}])}},E=async()=>{const f=await At();C(f.schemas.filter(O=>O.ref_id&&!O.is_deleted&&O.ref_id)),j(f.edges)},P=f=>{C($.filter(O=>O.type!==f))},I=$.map(f=>({...f,children:$.filter(O=>O.parent===f.type).map(O=>O.ref_id||"")})),D=y.filter(f=>I.some(O=>O.ref_id===f.source)&&I.some(O=>O.ref_id===f.target)),R=$.find(f=>f.ref_id===n)||null;if(l)return o.jsx(v,{align:"center",basis:"100%",grow:1,justify:"center",shrink:1,children:o.jsx(de,{color:T.white})});const V=g==="all"?D:D.filter(f=>f.edge_type==="CHILD_OF");return o.jsxs(o.Fragment,{children:[o.jsx(v,{ml:-20,mr:-20,mt:-20,children:o.jsx(xs,{activeTab:g,onClose:t,setActiveTab:b})}),o.jsxs(v,{align:"stretch",direction:"row",grow:1,children:[o.jsx(v,{mb:-20,ml:-20,children:R||e?o.jsx(Ht,{children:o.jsx(Ut,{children:o.jsx(Gn,{graphLoading:h,onDelete:P,onSchemaCreate:z,onSchemaUpdate:E,selectedSchema:R,setGraphLoading:x,setIsCreateNew:i,setSelectedSchemaId:s})})}):null}),o.jsx(v,{children:c?o.jsx(Ht,{children:o.jsx(Ut,{children:o.jsx($n,{edgeData:w,setGraphLoading:x,setIsAddEdgeNode:a})})}):null}),o.jsx(v,{children:o.jsx(Cs,{onAddEdgeNode:()=>{a(!0),i(!1),s(""),p({refId:"",edgeType:"",source:"",target:""})},onCreateNew:()=>{a(!1),i(!0),s("")}})}),o.jsx(Ts,{direction:"row",grow:1,children:o.jsx(Ms,{children:h?o.jsx(v,{align:"center",basis:"100%",grow:1,justify:"center",shrink:1,children:o.jsx(de,{color:T.white})}):o.jsx(fs,{links:V,onEdgeClick:(f,O,F,_)=>{p({refId:f,edgeType:O,source:F,target:_}),a(!0),i(!1),s("")},schemasWithPositions:I,selectedSchemaId:n,setIsAddEdgeNode:a,setSelectedSchemaId:s})})})]})]})},Ts=k(v)` +`,Ps=({Close:t})=>{const[n,s]=m.useState(""),[e,i]=m.useState(!1),[l,d]=m.useState(!1),[c,a]=m.useState(!1),[w,p]=m.useState({refId:"",edgeType:"",source:"",target:""}),[h,x]=m.useState(!1),[g,b]=m.useState("all"),[k,y,C,j]=no(f=>[f.schemas,f.links,f.setSchemas,f.setSchemaLinks]);m.useEffect(()=>{(async()=>{d(!0);try{const S=await At(),F=S.schemas.filter(_=>_.ref_id&&!_.is_deleted);C(F.length>0?F:S.schemas),j(S.edges.length>0?S.edges:[]),d(!1)}catch(S){console.error("Error fetching data:",S),d(!1)}})()},[C,j]);const N=f=>{if(k.some(F=>F.ref_id===f.ref_id))C(k.map(F=>F.ref_id===f.ref_id?{...f,children:[]}:F));else{C([...k,{...f,children:[]}]);const F=k.find(_=>f.parent===_.type);j([...y,{ref_id:`new-link-${y.length}`,edge_type:"CHILD_OF",source:f.ref_id||"new",target:(F==null?void 0:F.ref_id)||"new"}])}},E=async()=>{const f=await At();C(f.schemas.filter(S=>S.ref_id&&!S.is_deleted&&S.ref_id)),j(f.edges)},P=f=>{C(k.filter(S=>S.type!==f))},I=k.map(f=>({...f,children:k.filter(S=>S.parent===f.type).map(S=>S.ref_id||"")})),V=y.filter(f=>I.some(S=>S.ref_id===f.source)&&I.some(S=>S.ref_id===f.target)),L=k.find(f=>f.ref_id===n)||null;if(l)return o.jsx(v,{align:"center",basis:"100%",grow:1,justify:"center",shrink:1,children:o.jsx(de,{color:T.white})});const D=g==="all"?V:V.filter(f=>f.edge_type==="CHILD_OF");return o.jsxs(o.Fragment,{children:[o.jsx(v,{ml:-20,mr:-20,mt:-20,children:o.jsx(xs,{activeTab:g,onClose:t,setActiveTab:b})}),o.jsxs(v,{align:"stretch",direction:"row",grow:1,children:[o.jsx(v,{mb:-20,ml:-20,children:L||e?o.jsx(Ht,{children:o.jsx(Ut,{children:o.jsx(Gn,{graphLoading:h,onDelete:P,onSchemaCreate:N,onSchemaUpdate:E,selectedSchema:L,setGraphLoading:x,setIsCreateNew:i,setSelectedSchemaId:s})})}):null}),o.jsx(v,{children:c?o.jsx(Ht,{children:o.jsx(Ut,{children:o.jsx($n,{edgeData:w,setGraphLoading:x,setIsAddEdgeNode:a})})}):null}),o.jsx(v,{children:o.jsx(Cs,{onAddEdgeNode:()=>{a(!0),i(!1),s(""),p({refId:"",edgeType:"",source:"",target:""})},onCreateNew:()=>{a(!1),i(!0),s("")}})}),o.jsx(Ts,{direction:"row",grow:1,children:o.jsx(Ms,{children:h?o.jsx(v,{align:"center",basis:"100%",grow:1,justify:"center",shrink:1,children:o.jsx(de,{color:T.white})}):o.jsx(fs,{links:D,onEdgeClick:(f,S,F,_)=>{p({refId:f,edgeType:S,source:F,target:_}),a(!0),i(!1),s("")},schemasWithPositions:I,selectedSchemaId:n,setIsAddEdgeNode:a,setSelectedSchemaId:s})})})]})]})},Ts=O(v)` flex: 1 1 auto; justify-content: center; position: relative; @@ -320,7 +320,7 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a @media (max-width: 924px) { max-height: calc(70vh - 20px); } -`,Ht=k(v)` +`,Ht=O(v)` width: 100%; max-width: 400px; background: ${T.BG1}; @@ -342,7 +342,7 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a @media (max-width: 924px) { max-height: calc(70vh - 20px); } -`,Ut=k.div` +`,Ut=O.div` height: 100%; overflow-y: auto; padding: 16px; @@ -359,6 +359,6 @@ import{r as m,b as Zt,g as Xt,s as $e,_ as U,u as Kt,ac as yo,a as qt,j as o,c a @media (max-width: 924px) { max-height: calc(65vh - 20px); } -`,Ms=k(v)` +`,Ms=O(v)` flex: 1 1 100%; `,As=()=>{const{close:t}=to("blueprintGraph"),n=()=>{t()};return o.jsx(Mo,{background:"black",id:"blueprintGraph",kind:"full",preventOutsideClose:!0,children:o.jsx(Ps,{Close:n})})},qs=m.memo(As);export{qs as BlueprintModal}; diff --git a/build/assets/index-7ac66030.js b/build/assets/index-80c09a74.js similarity index 64% rename from build/assets/index-7ac66030.js rename to build/assets/index-80c09a74.js index 7df255547..29596ea08 100644 --- a/build/assets/index-7ac66030.js +++ b/build/assets/index-80c09a74.js @@ -1 +1 @@ -import{p as o}from"./index-a0989d63.js";const n=()=>{const{simulation:s,simulationHelpers:e}=o(r=>r);return{nodes:(s==null?void 0:s.nodes())||[],links:e.getLinks()}};export{n as u}; +import{p as o}from"./index-022521cf.js";const n=()=>{const{simulation:s,simulationHelpers:e}=o(r=>r);return{nodes:(s==null?void 0:s.nodes())||[],links:e.getLinks()}};export{n as u}; diff --git a/build/assets/index-eb6f13ce.js b/build/assets/index-821dafbe.js similarity index 91% rename from build/assets/index-eb6f13ce.js rename to build/assets/index-821dafbe.js index 2178e76ae..68c026057 100644 --- a/build/assets/index-eb6f13ce.js +++ b/build/assets/index-821dafbe.js @@ -1,4 +1,4 @@ -import{o as i,j as e,F as s,aW as b,T as a,q as n,O as w,r as m,a9 as j}from"./index-a0989d63.js";import{B as C,i as S,F as y}from"./index-775b6bc6.js";import{B as k}from"./index-f06622e3.js";import{S as v}from"./index-58d3954b.js";import{T as F}from"./index-3d0189dc.js";import"./index.esm-d308c31f.js";import"./InfoIcon-4aad7e99.js";const B=({allowNextStep:t})=>e.jsxs(s,{p:12,children:[e.jsx(s,{align:"center",direction:"row",justify:"space-between",mb:25,children:e.jsx(s,{align:"center",direction:"row",children:e.jsx(T,{children:"Feedback"})})}),e.jsx(s,{mb:30,children:e.jsx(F,{id:"feedback-message",isTextArea:!0,maxLength:500,name:"message",placeholder:"Leave your feedback here ...",rules:b})}),e.jsx(s,{children:e.jsx(C,{color:"secondary","data-testid":"submit-feedback-btn",disabled:!t,size:"large",type:"submit",variant:"contained",children:"Submit"})})]}),T=i(a)` +import{o as i,j as e,F as s,aW as b,T as a,q as n,O as w,r as m,a9 as j}from"./index-022521cf.js";import{B as C,i as S,F as y}from"./index-586dfb7f.js";import{B as k}from"./index-ee20ad28.js";import{S as v}from"./index-3beb67ad.js";import{T as F}from"./index-b5c86aa6.js";import"./index.esm-38ac4e4f.js";import"./InfoIcon-b7d3736d.js";const B=({allowNextStep:t})=>e.jsxs(s,{p:12,children:[e.jsx(s,{align:"center",direction:"row",justify:"space-between",mb:25,children:e.jsx(s,{align:"center",direction:"row",children:e.jsx(T,{children:"Feedback"})})}),e.jsx(s,{mb:30,children:e.jsx(F,{id:"feedback-message",isTextArea:!0,maxLength:500,name:"message",placeholder:"Leave your feedback here ...",rules:b})}),e.jsx(s,{children:e.jsx(C,{color:"secondary","data-testid":"submit-feedback-btn",disabled:!t,size:"large",type:"submit",variant:"contained",children:"Submit"})})]}),T=i(a)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-1a8d93d8.js b/build/assets/index-82691a7b.js similarity index 93% rename from build/assets/index-1a8d93d8.js rename to build/assets/index-82691a7b.js index 000c3a1f6..7d7663597 100644 --- a/build/assets/index-1a8d93d8.js +++ b/build/assets/index-82691a7b.js @@ -1,4 +1,4 @@ -import{a9 as Z,o as g,q as b,F as t,T,J as V,r as y,j as e,b2 as ee,b3 as te,aW as F,b8 as se,K as ne,b9 as oe,O as D,B as re,p as ie,aV as I,ab as ae,aa as ce,b6 as le}from"./index-a0989d63.js";import{B as C,h as de,i as pe,F as me}from"./index-775b6bc6.js";import{B as xe}from"./index-f06622e3.js";import{S as ue}from"./index-58d3954b.js";import{e as he}from"./index.esm-d308c31f.js";import{C as fe}from"./CheckIcon-c0260530.js";import{C as W}from"./ClipLoader-f345d5d1.js";import{n as z,A as ye,O as ge,i as je}from"./index-6f4f8df4.js";import{p as q}from"./index-44e303ef.js";import{T as L}from"./index-3d0189dc.js";import{c as we}from"./index-64f1c910.js";import"./Stack-98b5acbc.js";import"./useSlotProps-374609c4.js";import"./Popover-6e322384.js";import"./createSvgIcon-ebe0e3e6.js";import"./TextareaAutosize-76d3e8d6.js";import"./three.module-2ce81f73.js";import"./InfoIcon-4aad7e99.js";const be=async(o,a,c="")=>await Z.post(`/${o}`,JSON.stringify(a),{Authorization:c}),Se=async(o,a,c,x,d,r)=>{const m=o==="Create custom type"?"schema":"node",l={node_data:{...a,...o==="Image"&&{source_link:c}},node_type:o,name:x,pubkey:r};return be(m,l,d)},Ne=({onClick:o,loading:a,error:c})=>{const x=V(l=>l.budget),[d,r]=y.useState(10),m="node";return y.useEffect(()=>{(async()=>{try{const h=await te(m);r(h.data.price)}catch(h){console.error("cannot fetch",h)}})()},[m]),e.jsxs(t,{children:[e.jsx(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(t,{align:"center",direction:"row",children:e.jsx(ke,{children:"Approve Cost"})})}),e.jsxs(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(Te,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[d," sats"]})]}),e.jsxs(Ce,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[ee(x)," sats"]})]})]}),e.jsx(t,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:a||!!c,onClick:o,size:"large",startIcon:a?e.jsx(R,{children:e.jsx(W,{color:b.lightGray,size:12})}):e.jsxs(R,{children:[" ",e.jsx(fe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),c?e.jsx(Be,{children:e.jsxs(ve,{children:[e.jsx(he,{className:"errorIcon"}),e.jsx("span",{children:c})]})}):null]})},Te=g(t).attrs({direction:"column",align:"space-between",justify:"flex-start"})` +import{a9 as Z,o as g,q as b,F as t,T,J as V,r as y,j as e,b2 as ee,b3 as te,aW as F,b8 as se,K as ne,b9 as oe,O as D,B as re,p as ie,aV as I,ab as ae,aa as ce,b6 as le}from"./index-022521cf.js";import{B as C,h as de,i as pe,F as me}from"./index-586dfb7f.js";import{B as xe}from"./index-ee20ad28.js";import{S as ue}from"./index-3beb67ad.js";import{e as he}from"./index.esm-38ac4e4f.js";import{C as fe}from"./CheckIcon-4e74d21d.js";import{C as W}from"./ClipLoader-d8628c6c.js";import{n as z,A as ye,O as ge,i as je}from"./index-39c958ca.js";import{p as q}from"./index-44e303ef.js";import{T as L}from"./index-b5c86aa6.js";import{c as we}from"./index-64f1c910.js";import"./Stack-ce2a5ec5.js";import"./useSlotProps-51fc8b9f.js";import"./Popover-cc3c7b26.js";import"./createSvgIcon-e1ebdfca.js";import"./TextareaAutosize-0ace781b.js";import"./three.module-2ce81f73.js";import"./InfoIcon-b7d3736d.js";const be=async(o,a,c="")=>await Z.post(`/${o}`,JSON.stringify(a),{Authorization:c}),Se=async(o,a,c,x,d,r)=>{const m=o==="Create custom type"?"schema":"node",l={node_data:{...a,...o==="Image"&&{source_link:c}},node_type:o,name:x,pubkey:r};return be(m,l,d)},Ne=({onClick:o,loading:a,error:c})=>{const x=V(l=>l.budget),[d,r]=y.useState(10),m="node";return y.useEffect(()=>{(async()=>{try{const h=await te(m);r(h.data.price)}catch(h){console.error("cannot fetch",h)}})()},[m]),e.jsxs(t,{children:[e.jsx(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(t,{align:"center",direction:"row",children:e.jsx(ke,{children:"Approve Cost"})})}),e.jsxs(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(Te,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[d," sats"]})]}),e.jsxs(Ce,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[ee(x)," sats"]})]})]}),e.jsx(t,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:a||!!c,onClick:o,size:"large",startIcon:a?e.jsx(R,{children:e.jsx(W,{color:b.lightGray,size:12})}):e.jsxs(R,{children:[" ",e.jsx(fe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),c?e.jsx(Be,{children:e.jsxs(ve,{children:[e.jsx(he,{className:"errorIcon"}),e.jsx("span",{children:c})]})}):null]})},Te=g(t).attrs({direction:"column",align:"space-between",justify:"flex-start"})` width: 141px; height: 61px; border: 1px solid ${b.GRAY7}; diff --git a/build/assets/index-7f6bf0c2.js b/build/assets/index-a440d1a9.js similarity index 99% rename from build/assets/index-7f6bf0c2.js rename to build/assets/index-a440d1a9.js index ab1696f78..2a6ccc661 100644 --- a/build/assets/index-7f6bf0c2.js +++ b/build/assets/index-a440d1a9.js @@ -1,4 +1,4 @@ -import{r as b,_ as $a,j as M,R as Zr,w as uu,o as ze,q as we,F as xs,B as xn,J as hu,A as hr,E as ef,y as Jt,p as nt,U as bo,v as du,V as tf,X as sf,Y as nf,Z as rf,a0 as of,a1 as af,a2 as cf,a3 as lf,a4 as uf,O as $o,a5 as hf,a6 as df,a7 as ff,a8 as pf,M as mf}from"./index-a0989d63.js";import{u as ge,a as Xa,e as Qa,b as Rt,L as _f,c as gf,d as vf,m as yf,f as xf,g as Tf,h as fu,H as dr,t as pu,T as wf,i as kf,j as Sf,D as Cf,C as bf,P as Ef,k as Of}from"./index-d15dc160.js";import{D as Cr,F as Af,V as X,a as Fe,T as Eo,b as Mf,C as hs,W as Df,c as Rf,E as Ka,d as Tt,N as Gn,e as Pf,B as oi,U as ps,M as If,f as Nf,g as Ff,h as Uf,i as Lf,j as br,k as Mi,S as es,l as Bf,m as Q,R as zf,n as Ts,o as Ta,P as mu,p as Ja,q as Jc,r as Vf,L as $r,s as jf,t as _u,u as gu,v as vu,w as yu,x as el,y as Hf,z as qf,A as Er,H as Wf,G as Gf,I as Yf,J as Zf,K as $f,O as Xf,Q as fr,X as Qf,Y as Kf}from"./three.module-2ce81f73.js";import{B as xu,_ as Ue,a as Vt,u as ec,T as tl,A as Jf,b as ep,O as tp,c as sp}from"./index-775b6bc6.js";import{T as np}from"./TextareaAutosize-76d3e8d6.js";import{D as ip}from"./DeleteIcon-32576b88.js";import{M as rp,a as op}from"./index.esm-d308c31f.js";import{u as ap}from"./index-7ac66030.js";import{M as cp,A as lp,E as up}from"./MergeIcon-b3a532b8.js";import{P as hp}from"./PlusIcon-1147d96e.js";import{P as dp}from"./Popover-6e322384.js";import{C as fp}from"./ClipLoader-f345d5d1.js";import"./useSlotProps-374609c4.js";function pp(n){let e;const t=new Set,s=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const f=e;e=u?h:Object.assign({},e,h),t.forEach(d=>d(e,f))}},i=()=>e,r=(l,u=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let f=u(e);function d(){const m=u(e);if(!h(f,m)){const p=f;l(f=m,p)}}return t.add(d),()=>t.delete(d)},c={setState:s,getState:i,subscribe:(l,u,h)=>u||h?r(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=n(s,i,c),c}const mp=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),sl=mp?b.useEffect:b.useLayoutEffect;function _p(n){const e=typeof n=="function"?pp(n):n,t=(s=e.getState,i=Object.is)=>{const[,r]=b.useReducer(g=>g+1,0),o=e.getState(),a=b.useRef(o),c=b.useRef(s),l=b.useRef(i),u=b.useRef(!1),h=b.useRef();h.current===void 0&&(h.current=s(o));let f,d=!1;(a.current!==o||c.current!==s||l.current!==i||u.current)&&(f=s(o),d=!i(h.current,f)),sl(()=>{d&&(h.current=f),a.current=o,c.current=s,l.current=i,u.current=!1});const m=b.useRef(o);sl(()=>{const g=()=>{try{const S=e.getState(),T=c.current(S);l.current(h.current,T)||(a.current=S,h.current=T,r())}catch{u.current=!0,r()}},v=e.subscribe(g);return e.getState()!==m.current&&g(),v},[]);const p=d?f:h.current;return b.useDebugValue(p),p};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const s=[t,e];return{next(){const i=s.length<=0;return{value:s.shift(),done:i}}}},t}let fi=0;const gp=_p(n=>(Cr.onStart=(e,t,s)=>{n({active:!0,item:e,loaded:t,total:s,progress:(t-fi)/(s-fi)*100})},Cr.onLoad=()=>{n({active:!1})},Cr.onError=e=>n(t=>({errors:[...t.errors,e]})),Cr.onProgress=(e,t,s)=>{t===s&&(fi=s),n({active:!0,item:e,loaded:t,total:s,progress:(t-fi)/(s-fi)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})),vp=n=>`Loading ${n.toFixed(2)}%`;function yp({containerStyles:n,innerStyles:e,barStyles:t,dataStyles:s,dataInterpolation:i=vp,initialState:r=o=>o}){const{active:o,progress:a}=gp(),c=b.useRef(0),l=b.useRef(0),u=b.useRef(null),[h,f]=b.useState(r(o));b.useEffect(()=>{let m;return o!==h&&(m=setTimeout(()=>f(o),300)),()=>clearTimeout(m)},[h,o]);const d=b.useCallback(()=>{u.current&&(c.current+=(a-c.current)/2,(c.current>.95*a||a===100)&&(c.current=a),u.current.innerText=i(c.current),c.current(d(),()=>cancelAnimationFrame(l.current)),[d]),h?b.createElement("div",{style:{...Or.container,opacity:o?1:0,...n}},b.createElement("div",null,b.createElement("div",{style:{...Or.inner,...e}},b.createElement("div",{style:{...Or.bar,transform:`scaleX(${a/100})`,...t}}),b.createElement("span",{ref:u,style:{...Or.data,...s}})))):null}const Or={container:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#171717",display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 300ms ease",zIndex:1e3},inner:{width:100,height:3,background:"#272727",textAlign:"center"},bar:{height:3,width:"100%",background:"white",transition:"transform 200ms",transformOrigin:"left center"},data:{display:"inline-block",position:"relative",fontVariantNumeric:"tabular-nums",marginTop:"0.8em",color:"#f0f0f0",fontSize:"0.6em",fontFamily:'-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',whiteSpace:"nowrap"}};let pi;function xp(){var n;if(pi!==void 0)return pi;try{let e;const t=document.createElement("canvas");return pi=!!(window.WebGL2RenderingContext&&(e=t.getContext("webgl2"))),e&&((n=e.getExtension("WEBGL_lose_context"))==null||n.loseContext()),pi}catch{return pi=!1}}const Xo=new Af,Qo=new X,En=new X,Pt=new X,is=new X,qt=new X,rs=new X,os=new X,mi=new X,_i=new X,gi=new X,Ar=new X,vi=new X,yi=new X,xi=new X;class Tp{constructor(e,t,s){this.camera=e,this.scene=t,this.startPoint=new X,this.endPoint=new X,this.collection=[],this.deep=s||Number.MAX_VALUE}select(e,t){return this.startPoint=e||this.startPoint,this.endPoint=t||this.endPoint,this.collection=[],this.updateFrustum(this.startPoint,this.endPoint),this.searchChildInFrustum(Xo,this.scene),this.collection}updateFrustum(e,t){if(e=e||this.startPoint,t=t||this.endPoint,e.x===t.x&&(t.x+=Number.EPSILON),e.y===t.y&&(t.y+=Number.EPSILON),this.camera.updateProjectionMatrix(),this.camera.updateMatrixWorld(),this.camera.isPerspectiveCamera){En.copy(e),En.x=Math.min(e.x,t.x),En.y=Math.max(e.y,t.y),t.x=Math.max(e.x,t.x),t.y=Math.min(e.y,t.y),Pt.setFromMatrixPosition(this.camera.matrixWorld),is.copy(En),qt.set(t.x,En.y,0),rs.copy(t),os.set(En.x,t.y,0),is.unproject(this.camera),qt.unproject(this.camera),rs.unproject(this.camera),os.unproject(this.camera),vi.copy(is).sub(Pt),yi.copy(qt).sub(Pt),xi.copy(rs).sub(Pt),vi.normalize(),yi.normalize(),xi.normalize(),vi.multiplyScalar(this.deep),yi.multiplyScalar(this.deep),xi.multiplyScalar(this.deep),vi.add(Pt),yi.add(Pt),xi.add(Pt);var s=Xo.planes;s[0].setFromCoplanarPoints(Pt,is,qt),s[1].setFromCoplanarPoints(Pt,qt,rs),s[2].setFromCoplanarPoints(rs,os,Pt),s[3].setFromCoplanarPoints(os,is,Pt),s[4].setFromCoplanarPoints(qt,rs,os),s[5].setFromCoplanarPoints(xi,yi,vi),s[5].normal.multiplyScalar(-1)}else if(this.camera.isOrthographicCamera){const i=Math.min(e.x,t.x),r=Math.max(e.y,t.y),o=Math.max(e.x,t.x),a=Math.min(e.y,t.y);is.set(i,r,-1),qt.set(o,r,-1),rs.set(o,a,-1),os.set(i,a,-1),mi.set(i,r,1),_i.set(o,r,1),gi.set(o,a,1),Ar.set(i,a,1),is.unproject(this.camera),qt.unproject(this.camera),rs.unproject(this.camera),os.unproject(this.camera),mi.unproject(this.camera),_i.unproject(this.camera),gi.unproject(this.camera),Ar.unproject(this.camera);var s=Xo.planes;s[0].setFromCoplanarPoints(is,mi,_i),s[1].setFromCoplanarPoints(qt,_i,gi),s[2].setFromCoplanarPoints(gi,Ar,os),s[3].setFromCoplanarPoints(Ar,mi,is),s[4].setFromCoplanarPoints(qt,rs,os),s[5].setFromCoplanarPoints(gi,_i,mi),s[5].normal.multiplyScalar(-1)}else console.error("THREE.SelectionBox: Unsupported camera type.")}searchChildInFrustum(e,t){if((t.isMesh||t.isLine||t.isPoints)&&t.material!==void 0&&(t.geometry.boundingSphere===null&&t.geometry.computeBoundingSphere(),Qo.copy(t.geometry.boundingSphere.center),Qo.applyMatrix4(t.matrixWorld),e.containsPoint(Qo)&&this.collection.push(t)),t.children.length>0)for(let s=0;sc,...a}){const{setEvents:c,camera:l,raycaster:u,gl:h,controls:f,size:d,get:m}=ge(),[p,g]=b.useState(!1),[v,S]=b.useReducer((w,{object:k,shift:x})=>k===void 0?[]:Array.isArray(k)?k:x?w.includes(k)?w.filter(C=>C!==k):[k,...w]:w[0]===k?[]:[k],[]);b.useEffect(()=>void(s==null?void 0:s(v)),[v]);const T=b.useCallback(w=>{w.stopPropagation(),S({object:o([w.object])[0],shift:e&&w.shiftKey})},[]),y=b.useCallback(w=>!p&&S({}),[p]),_=b.useRef(null);return b.useEffect(()=>{if(!n||!e)return;const w=new Tp(l,_.current),k=document.createElement("div");k.style.pointerEvents="none",k.style.border=i,k.style.backgroundColor=r,k.style.position="fixed";const x=new Fe,C=new Fe,E=new Fe,O=m().events.enabled,A=f==null?void 0:f.enabled;let R=!1;function P(B,Te){const{offsetX:ae,offsetY:$}=B,{width:me,height:Ye}=d;Te.set(ae/me*2-1,-($/Ye)*2+1)}function F(B){var Te;f&&(f.enabled=!1),c({enabled:!1}),R=!0,(Te=h.domElement.parentElement)==null||Te.appendChild(k),k.style.left=`${B.clientX}px`,k.style.top=`${B.clientY}px`,k.style.width="0px",k.style.height="0px",x.x=B.clientX,x.y=B.clientY}function N(B){E.x=Math.max(x.x,B.clientX),E.y=Math.max(x.y,B.clientY),C.x=Math.min(x.x,B.clientX),C.y=Math.min(x.y,B.clientY),k.style.left=`${C.x}px`,k.style.top=`${C.y}px`,k.style.width=`${E.x-C.x}px`,k.style.height=`${E.y-C.y}px`}function U(){if(R){var B;f&&(f.enabled=A),c({enabled:O}),R=!1,(B=k.parentElement)==null||B.removeChild(k)}}function V(B){B.shiftKey&&(F(B),P(B,w.startPoint))}let z=[];function q(B){if(R){N(B),P(B,w.endPoint);const Te=w.select().sort(ae=>ae.uuid).filter(ae=>ae.isMesh);wp(Te,z)||(z=Te,S({object:o(Te)}))}}function j(B){R&&U()}return document.addEventListener("pointerdown",V,{passive:!0}),document.addEventListener("pointermove",q,{passive:!0,capture:!0}),document.addEventListener("pointerup",j,{passive:!0}),()=>{document.removeEventListener("pointerdown",V),document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",j)}},[d.width,d.height,u,l,f,h]),b.createElement("group",$a({ref:_,onClick:T,onPointerOver:()=>g(!0),onPointerOut:()=>g(!1),onPointerMissed:y},a),b.createElement(kp.Provider,{value:v},t))}const nl=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function on(n,e){const t=ge(i=>i.gl),s=Xa(Eo,nl(n)?Object.values(n):n);if(b.useLayoutEffect(()=>{e==null||e(s)},[e]),b.useEffect(()=>{(Array.isArray(s)?s:[s]).forEach(t.initTexture)},[t,s]),nl(n)){const i=Object.keys(n),r={};return i.forEach(o=>Object.assign(r,{[o]:s[i.indexOf(o)]})),r}else return s}on.preload=n=>Xa.preload(Eo,n);on.clear=n=>Xa.clear(Eo,n);/*! +import{r as b,_ as $a,j as M,R as Zr,w as uu,o as ze,q as we,F as xs,B as xn,J as hu,A as hr,E as ef,y as Jt,p as nt,U as bo,v as du,V as tf,X as sf,Y as nf,Z as rf,a0 as of,a1 as af,a2 as cf,a3 as lf,a4 as uf,O as $o,a5 as hf,a6 as df,a7 as ff,a8 as pf,M as mf}from"./index-022521cf.js";import{u as ge,a as Xa,e as Qa,b as Rt,L as _f,c as gf,d as vf,m as yf,f as xf,g as Tf,h as fu,H as dr,t as pu,T as wf,i as kf,j as Sf,D as Cf,C as bf,P as Ef,k as Of}from"./index-c116778d.js";import{D as Cr,F as Af,V as X,a as Fe,T as Eo,b as Mf,C as hs,W as Df,c as Rf,E as Ka,d as Tt,N as Gn,e as Pf,B as oi,U as ps,M as If,f as Nf,g as Ff,h as Uf,i as Lf,j as br,k as Mi,S as es,l as Bf,m as Q,R as zf,n as Ts,o as Ta,P as mu,p as Ja,q as Jc,r as Vf,L as $r,s as jf,t as _u,u as gu,v as vu,w as yu,x as el,y as Hf,z as qf,A as Er,H as Wf,G as Gf,I as Yf,J as Zf,K as $f,O as Xf,Q as fr,X as Qf,Y as Kf}from"./three.module-2ce81f73.js";import{B as xu,_ as Ue,a as Vt,u as ec,T as tl,A as Jf,b as ep,O as tp,c as sp}from"./index-586dfb7f.js";import{T as np}from"./TextareaAutosize-0ace781b.js";import{D as ip}from"./DeleteIcon-afd5d6e5.js";import{M as rp,a as op}from"./index.esm-38ac4e4f.js";import{u as ap}from"./index-80c09a74.js";import{M as cp,A as lp,E as up}from"./MergeIcon-b7c61b0a.js";import{P as hp}from"./PlusIcon-6ec48130.js";import{P as dp}from"./Popover-cc3c7b26.js";import{C as fp}from"./ClipLoader-d8628c6c.js";import"./useSlotProps-51fc8b9f.js";function pp(n){let e;const t=new Set,s=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const f=e;e=u?h:Object.assign({},e,h),t.forEach(d=>d(e,f))}},i=()=>e,r=(l,u=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let f=u(e);function d(){const m=u(e);if(!h(f,m)){const p=f;l(f=m,p)}}return t.add(d),()=>t.delete(d)},c={setState:s,getState:i,subscribe:(l,u,h)=>u||h?r(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=n(s,i,c),c}const mp=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),sl=mp?b.useEffect:b.useLayoutEffect;function _p(n){const e=typeof n=="function"?pp(n):n,t=(s=e.getState,i=Object.is)=>{const[,r]=b.useReducer(g=>g+1,0),o=e.getState(),a=b.useRef(o),c=b.useRef(s),l=b.useRef(i),u=b.useRef(!1),h=b.useRef();h.current===void 0&&(h.current=s(o));let f,d=!1;(a.current!==o||c.current!==s||l.current!==i||u.current)&&(f=s(o),d=!i(h.current,f)),sl(()=>{d&&(h.current=f),a.current=o,c.current=s,l.current=i,u.current=!1});const m=b.useRef(o);sl(()=>{const g=()=>{try{const S=e.getState(),T=c.current(S);l.current(h.current,T)||(a.current=S,h.current=T,r())}catch{u.current=!0,r()}},v=e.subscribe(g);return e.getState()!==m.current&&g(),v},[]);const p=d?f:h.current;return b.useDebugValue(p),p};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const s=[t,e];return{next(){const i=s.length<=0;return{value:s.shift(),done:i}}}},t}let fi=0;const gp=_p(n=>(Cr.onStart=(e,t,s)=>{n({active:!0,item:e,loaded:t,total:s,progress:(t-fi)/(s-fi)*100})},Cr.onLoad=()=>{n({active:!1})},Cr.onError=e=>n(t=>({errors:[...t.errors,e]})),Cr.onProgress=(e,t,s)=>{t===s&&(fi=s),n({active:!0,item:e,loaded:t,total:s,progress:(t-fi)/(s-fi)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})),vp=n=>`Loading ${n.toFixed(2)}%`;function yp({containerStyles:n,innerStyles:e,barStyles:t,dataStyles:s,dataInterpolation:i=vp,initialState:r=o=>o}){const{active:o,progress:a}=gp(),c=b.useRef(0),l=b.useRef(0),u=b.useRef(null),[h,f]=b.useState(r(o));b.useEffect(()=>{let m;return o!==h&&(m=setTimeout(()=>f(o),300)),()=>clearTimeout(m)},[h,o]);const d=b.useCallback(()=>{u.current&&(c.current+=(a-c.current)/2,(c.current>.95*a||a===100)&&(c.current=a),u.current.innerText=i(c.current),c.current(d(),()=>cancelAnimationFrame(l.current)),[d]),h?b.createElement("div",{style:{...Or.container,opacity:o?1:0,...n}},b.createElement("div",null,b.createElement("div",{style:{...Or.inner,...e}},b.createElement("div",{style:{...Or.bar,transform:`scaleX(${a/100})`,...t}}),b.createElement("span",{ref:u,style:{...Or.data,...s}})))):null}const Or={container:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#171717",display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 300ms ease",zIndex:1e3},inner:{width:100,height:3,background:"#272727",textAlign:"center"},bar:{height:3,width:"100%",background:"white",transition:"transform 200ms",transformOrigin:"left center"},data:{display:"inline-block",position:"relative",fontVariantNumeric:"tabular-nums",marginTop:"0.8em",color:"#f0f0f0",fontSize:"0.6em",fontFamily:'-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',whiteSpace:"nowrap"}};let pi;function xp(){var n;if(pi!==void 0)return pi;try{let e;const t=document.createElement("canvas");return pi=!!(window.WebGL2RenderingContext&&(e=t.getContext("webgl2"))),e&&((n=e.getExtension("WEBGL_lose_context"))==null||n.loseContext()),pi}catch{return pi=!1}}const Xo=new Af,Qo=new X,En=new X,Pt=new X,is=new X,qt=new X,rs=new X,os=new X,mi=new X,_i=new X,gi=new X,Ar=new X,vi=new X,yi=new X,xi=new X;class Tp{constructor(e,t,s){this.camera=e,this.scene=t,this.startPoint=new X,this.endPoint=new X,this.collection=[],this.deep=s||Number.MAX_VALUE}select(e,t){return this.startPoint=e||this.startPoint,this.endPoint=t||this.endPoint,this.collection=[],this.updateFrustum(this.startPoint,this.endPoint),this.searchChildInFrustum(Xo,this.scene),this.collection}updateFrustum(e,t){if(e=e||this.startPoint,t=t||this.endPoint,e.x===t.x&&(t.x+=Number.EPSILON),e.y===t.y&&(t.y+=Number.EPSILON),this.camera.updateProjectionMatrix(),this.camera.updateMatrixWorld(),this.camera.isPerspectiveCamera){En.copy(e),En.x=Math.min(e.x,t.x),En.y=Math.max(e.y,t.y),t.x=Math.max(e.x,t.x),t.y=Math.min(e.y,t.y),Pt.setFromMatrixPosition(this.camera.matrixWorld),is.copy(En),qt.set(t.x,En.y,0),rs.copy(t),os.set(En.x,t.y,0),is.unproject(this.camera),qt.unproject(this.camera),rs.unproject(this.camera),os.unproject(this.camera),vi.copy(is).sub(Pt),yi.copy(qt).sub(Pt),xi.copy(rs).sub(Pt),vi.normalize(),yi.normalize(),xi.normalize(),vi.multiplyScalar(this.deep),yi.multiplyScalar(this.deep),xi.multiplyScalar(this.deep),vi.add(Pt),yi.add(Pt),xi.add(Pt);var s=Xo.planes;s[0].setFromCoplanarPoints(Pt,is,qt),s[1].setFromCoplanarPoints(Pt,qt,rs),s[2].setFromCoplanarPoints(rs,os,Pt),s[3].setFromCoplanarPoints(os,is,Pt),s[4].setFromCoplanarPoints(qt,rs,os),s[5].setFromCoplanarPoints(xi,yi,vi),s[5].normal.multiplyScalar(-1)}else if(this.camera.isOrthographicCamera){const i=Math.min(e.x,t.x),r=Math.max(e.y,t.y),o=Math.max(e.x,t.x),a=Math.min(e.y,t.y);is.set(i,r,-1),qt.set(o,r,-1),rs.set(o,a,-1),os.set(i,a,-1),mi.set(i,r,1),_i.set(o,r,1),gi.set(o,a,1),Ar.set(i,a,1),is.unproject(this.camera),qt.unproject(this.camera),rs.unproject(this.camera),os.unproject(this.camera),mi.unproject(this.camera),_i.unproject(this.camera),gi.unproject(this.camera),Ar.unproject(this.camera);var s=Xo.planes;s[0].setFromCoplanarPoints(is,mi,_i),s[1].setFromCoplanarPoints(qt,_i,gi),s[2].setFromCoplanarPoints(gi,Ar,os),s[3].setFromCoplanarPoints(Ar,mi,is),s[4].setFromCoplanarPoints(qt,rs,os),s[5].setFromCoplanarPoints(gi,_i,mi),s[5].normal.multiplyScalar(-1)}else console.error("THREE.SelectionBox: Unsupported camera type.")}searchChildInFrustum(e,t){if((t.isMesh||t.isLine||t.isPoints)&&t.material!==void 0&&(t.geometry.boundingSphere===null&&t.geometry.computeBoundingSphere(),Qo.copy(t.geometry.boundingSphere.center),Qo.applyMatrix4(t.matrixWorld),e.containsPoint(Qo)&&this.collection.push(t)),t.children.length>0)for(let s=0;sc,...a}){const{setEvents:c,camera:l,raycaster:u,gl:h,controls:f,size:d,get:m}=ge(),[p,g]=b.useState(!1),[v,S]=b.useReducer((w,{object:k,shift:x})=>k===void 0?[]:Array.isArray(k)?k:x?w.includes(k)?w.filter(C=>C!==k):[k,...w]:w[0]===k?[]:[k],[]);b.useEffect(()=>void(s==null?void 0:s(v)),[v]);const T=b.useCallback(w=>{w.stopPropagation(),S({object:o([w.object])[0],shift:e&&w.shiftKey})},[]),y=b.useCallback(w=>!p&&S({}),[p]),_=b.useRef(null);return b.useEffect(()=>{if(!n||!e)return;const w=new Tp(l,_.current),k=document.createElement("div");k.style.pointerEvents="none",k.style.border=i,k.style.backgroundColor=r,k.style.position="fixed";const x=new Fe,C=new Fe,E=new Fe,O=m().events.enabled,A=f==null?void 0:f.enabled;let R=!1;function P(B,Te){const{offsetX:ae,offsetY:$}=B,{width:me,height:Ye}=d;Te.set(ae/me*2-1,-($/Ye)*2+1)}function F(B){var Te;f&&(f.enabled=!1),c({enabled:!1}),R=!0,(Te=h.domElement.parentElement)==null||Te.appendChild(k),k.style.left=`${B.clientX}px`,k.style.top=`${B.clientY}px`,k.style.width="0px",k.style.height="0px",x.x=B.clientX,x.y=B.clientY}function N(B){E.x=Math.max(x.x,B.clientX),E.y=Math.max(x.y,B.clientY),C.x=Math.min(x.x,B.clientX),C.y=Math.min(x.y,B.clientY),k.style.left=`${C.x}px`,k.style.top=`${C.y}px`,k.style.width=`${E.x-C.x}px`,k.style.height=`${E.y-C.y}px`}function U(){if(R){var B;f&&(f.enabled=A),c({enabled:O}),R=!1,(B=k.parentElement)==null||B.removeChild(k)}}function V(B){B.shiftKey&&(F(B),P(B,w.startPoint))}let z=[];function q(B){if(R){N(B),P(B,w.endPoint);const Te=w.select().sort(ae=>ae.uuid).filter(ae=>ae.isMesh);wp(Te,z)||(z=Te,S({object:o(Te)}))}}function j(B){R&&U()}return document.addEventListener("pointerdown",V,{passive:!0}),document.addEventListener("pointermove",q,{passive:!0,capture:!0}),document.addEventListener("pointerup",j,{passive:!0}),()=>{document.removeEventListener("pointerdown",V),document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",j)}},[d.width,d.height,u,l,f,h]),b.createElement("group",$a({ref:_,onClick:T,onPointerOver:()=>g(!0),onPointerOut:()=>g(!1),onPointerMissed:y},a),b.createElement(kp.Provider,{value:v},t))}const nl=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function on(n,e){const t=ge(i=>i.gl),s=Xa(Eo,nl(n)?Object.values(n):n);if(b.useLayoutEffect(()=>{e==null||e(s)},[e]),b.useEffect(()=>{(Array.isArray(s)?s:[s]).forEach(t.initTexture)},[t,s]),nl(n)){const i=Object.keys(n),r={};return i.forEach(o=>Object.assign(r,{[o]:s[i.indexOf(o)]})),r}else return s}on.preload=n=>Xa.preload(Eo,n);on.clear=n=>Xa.clear(Eo,n);/*! * camera-controls * https://github.com/yomotsu/camera-controls * (c) 2017 @yomotsu diff --git a/build/assets/index-3d0189dc.js b/build/assets/index-b5c86aa6.js similarity index 98% rename from build/assets/index-3d0189dc.js rename to build/assets/index-b5c86aa6.js index c0a838573..8a80065a3 100644 --- a/build/assets/index-3d0189dc.js +++ b/build/assets/index-b5c86aa6.js @@ -1,4 +1,4 @@ -import{r as I,h as fe,n as de,o as N,q as S,j as E,F as L,T as pe}from"./index-a0989d63.js";import{h as he,z as ge,D as ve}from"./index-775b6bc6.js";import{e as me}from"./index.esm-d308c31f.js";import{I as xe}from"./InfoIcon-4aad7e99.js";var ee={exports:{}},te={exports:{}},be=function(e,r,t,n,o,i,s,u){if(!e){var f;if(r===void 0)f=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[t,n,o,i,s,u],l=0;f=new Error(r.replace(/%s/g,function(){return p[l++]})),f.name="Invariant Violation"}throw f.framesToPop=1,f}},ke=be;function ne(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var k=I,_=ne(k),Pe=fe,K=ne(ke);function B(){return(B=Object.assign||function(e){for(var r=1;r=0||(o[t]=e[t]);return o}function oe(e){return requestAnimationFrame(e)}function Q(e){cancelAnimationFrame(e)}function R(e){var r=e.ownerDocument;return r.hasFocus()&&r.activeElement===e}function ie(e){return e==null?void 0:e.ownerDocument}function we(e){var r=function(t){var n;return(n=ie(t))==null?void 0:n.defaultView}(e);return!!r&&e instanceof r.HTMLElement}function W(e){return k.useCallback(function(){var r=e.current,t=typeof window<"u"&&we(r);if(!r||!t)return null;if(r.nodeName!=="INPUT"&&(r=r.querySelector("input")),!r)throw new Error("react-input-mask: inputComponent doesn't contain input node");return r},[e])}function ye(e,r){var t,n,o,i,s=k.useRef({start:null,end:null}),u=W(e),f=k.useCallback(function(){return function(g){var d=g.selectionStart,P=g.selectionEnd;return{start:d,end:P,length:P-d}}(u())},[u]),p=k.useCallback(function(){return s.current},[]),l=k.useCallback(function(g){var d=u();d&&R(d)&&(function(P,y,C){C===void 0&&(C=y),P.setSelectionRange(y,C)}(d,g.start,g.end),s.current=f())},[u,f]),a=k.useCallback(function(){s.current=f()},[f]),c=(t=a,n=k.useRef(null),o=k.useCallback(function(){n.current===null&&function g(){t(),n.current=oe(g)}()},[t]),i=k.useCallback(function(){Q(n.current),n.current=null},[]),k.useEffect(function(){n.current&&(i(),o())},[o,i]),k.useEffect(Q,[]),[o,i]),h=c[0],w=c[1];return k.useLayoutEffect(function(){if(r){var g=u();return g.addEventListener("focus",h),g.addEventListener("blur",w),R(g)&&h(),function(){g.removeEventListener("focus",h),g.removeEventListener("blur",w),w()}}}),{getSelection:f,getLastSelection:p,setSelection:l}}function Ce(e,r){var t=k.useRef(),n=ye(t,r),o=n.getSelection,i=n.getLastSelection,s=n.setSelection,u=function(a,c){var h=W(a),w=k.useRef(c);return{getValue:k.useCallback(function(){return h().value},[h]),getLastValue:k.useCallback(function(){return w.current},[]),setValue:k.useCallback(function(g){w.current=g;var d=h();d&&(d.value=g)},[h])}}(t,e),f=u.getValue,p=u.getLastValue,l=u.setValue;return{inputRef:t,getInputState:function(){return{value:f(),selection:o()}},getLastInputState:function(){return{value:p(),selection:i()}},setInputState:function(a){var c=a.value,h=a.selection;l(c),s(h)}}}var Se=["disabled","onBlur","onChange","onFocus","onMouseDown","readOnly","value"],J={9:/[0-9]/,a:/[A-Za-z]/,"*":/[A-Za-z0-9]/},Fe=function(e){var r=this;this.isCharacterAllowedAtPosition=function(t,n){var o=r.maskOptions.maskPlaceholder;return!!r.isCharacterFillingPosition(t,n)||!!o&&o[n]===t},this.isCharacterFillingPosition=function(t,n){var o=r.maskOptions.mask;if(!t||n>=o.length)return!1;if(!r.isPositionEditable(n))return o[n]===t;var i=o[n];return new RegExp(i).test(t)},this.isPositionEditable=function(t){var n=r.maskOptions,o=n.mask,i=n.permanents;return t=0;i--)if(o(n[i],i))return i;return-1}(t.split(""),function(n,o){return r.isPositionEditable(o)&&r.isCharacterFillingPosition(n,o)})+1},this.getStringFillingLengthAtPosition=function(t,n){return t.split("").reduce(function(o,i){return r.insertCharacterAtPosition(o,i,o.length)},function(o,i){i===void 0&&(i=1);for(var s="",u=0;u=0;n--)if(r.isPositionEditable(n))return n;return null},this.getRightEditablePosition=function(t){for(var n=r.maskOptions.mask,o=t;o=i&&!c?"":a=i?l:c?u?u[a]:"":f[a]}).join("");return r.formatValue(p)},this.insertCharacterAtPosition=function(t,n,o){var i=r.maskOptions,s=i.mask,u=i.maskPlaceholder;if(o>=s.length)return t;var f=r.isCharacterAllowedAtPosition(n,o),p=r.isPositionEditable(o),l=r.getRightEditablePosition(o),a=u&&l?n===u[l]:null,c=t.slice(0,o);return!f&&p||(t=c+(f?n:s[o])),f||p||a||(t=r.insertCharacterAtPosition(t,n,o+1)),t},this.insertStringAtPosition=function(t,n,o){var i=r.maskOptions,s=i.mask,u=i.maskPlaceholder;if(!n||o>=s.length)return t;var f=n.split(""),p=r.isValueFilled(t)||!!u,l=t.slice(o);return t=f.reduce(function(a,c){return r.insertCharacterAtPosition(a,c,a.length)},t.slice(0,o)),p?t+=l.slice(t.length-o):r.isValueFilled(t)?t+=s.slice(t.length).join(""):t=l.split("").filter(function(a,c){return r.isPositionEditable(o+c)}).reduce(function(a,c){var h=r.getRightEditablePosition(a.length);return h===null?a:(r.isPositionEditable(a.length)||(a+=s.slice(a.length,h).join("")),r.insertCharacterAtPosition(a,c,a.length))},t),t},this.processChange=function(t,n){var o=r.maskOptions,i=o.mask,s=o.prefix,u=o.lastEditablePosition,f=t.value,p=t.selection,l=n.value,a=n.selection,c=f,h="",w=0,g=0,d=Math.min(a.start,p.start);return p.end>a.start?(h=c.slice(a.start,p.end),g=(w=r.getStringFillingLengthAtPosition(h,d))?a.length:0):c.length=i.length?d=i.length:d=s.length&&d=0||(o[t]=e[t]);return o}function oe(e){return requestAnimationFrame(e)}function Q(e){cancelAnimationFrame(e)}function R(e){var r=e.ownerDocument;return r.hasFocus()&&r.activeElement===e}function ie(e){return e==null?void 0:e.ownerDocument}function we(e){var r=function(t){var n;return(n=ie(t))==null?void 0:n.defaultView}(e);return!!r&&e instanceof r.HTMLElement}function W(e){return k.useCallback(function(){var r=e.current,t=typeof window<"u"&&we(r);if(!r||!t)return null;if(r.nodeName!=="INPUT"&&(r=r.querySelector("input")),!r)throw new Error("react-input-mask: inputComponent doesn't contain input node");return r},[e])}function ye(e,r){var t,n,o,i,s=k.useRef({start:null,end:null}),u=W(e),f=k.useCallback(function(){return function(g){var d=g.selectionStart,P=g.selectionEnd;return{start:d,end:P,length:P-d}}(u())},[u]),p=k.useCallback(function(){return s.current},[]),l=k.useCallback(function(g){var d=u();d&&R(d)&&(function(P,y,C){C===void 0&&(C=y),P.setSelectionRange(y,C)}(d,g.start,g.end),s.current=f())},[u,f]),a=k.useCallback(function(){s.current=f()},[f]),c=(t=a,n=k.useRef(null),o=k.useCallback(function(){n.current===null&&function g(){t(),n.current=oe(g)}()},[t]),i=k.useCallback(function(){Q(n.current),n.current=null},[]),k.useEffect(function(){n.current&&(i(),o())},[o,i]),k.useEffect(Q,[]),[o,i]),h=c[0],w=c[1];return k.useLayoutEffect(function(){if(r){var g=u();return g.addEventListener("focus",h),g.addEventListener("blur",w),R(g)&&h(),function(){g.removeEventListener("focus",h),g.removeEventListener("blur",w),w()}}}),{getSelection:f,getLastSelection:p,setSelection:l}}function Ce(e,r){var t=k.useRef(),n=ye(t,r),o=n.getSelection,i=n.getLastSelection,s=n.setSelection,u=function(a,c){var h=W(a),w=k.useRef(c);return{getValue:k.useCallback(function(){return h().value},[h]),getLastValue:k.useCallback(function(){return w.current},[]),setValue:k.useCallback(function(g){w.current=g;var d=h();d&&(d.value=g)},[h])}}(t,e),f=u.getValue,p=u.getLastValue,l=u.setValue;return{inputRef:t,getInputState:function(){return{value:f(),selection:o()}},getLastInputState:function(){return{value:p(),selection:i()}},setInputState:function(a){var c=a.value,h=a.selection;l(c),s(h)}}}var Se=["disabled","onBlur","onChange","onFocus","onMouseDown","readOnly","value"],J={9:/[0-9]/,a:/[A-Za-z]/,"*":/[A-Za-z0-9]/},Fe=function(e){var r=this;this.isCharacterAllowedAtPosition=function(t,n){var o=r.maskOptions.maskPlaceholder;return!!r.isCharacterFillingPosition(t,n)||!!o&&o[n]===t},this.isCharacterFillingPosition=function(t,n){var o=r.maskOptions.mask;if(!t||n>=o.length)return!1;if(!r.isPositionEditable(n))return o[n]===t;var i=o[n];return new RegExp(i).test(t)},this.isPositionEditable=function(t){var n=r.maskOptions,o=n.mask,i=n.permanents;return t=0;i--)if(o(n[i],i))return i;return-1}(t.split(""),function(n,o){return r.isPositionEditable(o)&&r.isCharacterFillingPosition(n,o)})+1},this.getStringFillingLengthAtPosition=function(t,n){return t.split("").reduce(function(o,i){return r.insertCharacterAtPosition(o,i,o.length)},function(o,i){i===void 0&&(i=1);for(var s="",u=0;u=0;n--)if(r.isPositionEditable(n))return n;return null},this.getRightEditablePosition=function(t){for(var n=r.maskOptions.mask,o=t;o=i&&!c?"":a=i?l:c?u?u[a]:"":f[a]}).join("");return r.formatValue(p)},this.insertCharacterAtPosition=function(t,n,o){var i=r.maskOptions,s=i.mask,u=i.maskPlaceholder;if(o>=s.length)return t;var f=r.isCharacterAllowedAtPosition(n,o),p=r.isPositionEditable(o),l=r.getRightEditablePosition(o),a=u&&l?n===u[l]:null,c=t.slice(0,o);return!f&&p||(t=c+(f?n:s[o])),f||p||a||(t=r.insertCharacterAtPosition(t,n,o+1)),t},this.insertStringAtPosition=function(t,n,o){var i=r.maskOptions,s=i.mask,u=i.maskPlaceholder;if(!n||o>=s.length)return t;var f=n.split(""),p=r.isValueFilled(t)||!!u,l=t.slice(o);return t=f.reduce(function(a,c){return r.insertCharacterAtPosition(a,c,a.length)},t.slice(0,o)),p?t+=l.slice(t.length-o):r.isValueFilled(t)?t+=s.slice(t.length).join(""):t=l.split("").filter(function(a,c){return r.isPositionEditable(o+c)}).reduce(function(a,c){var h=r.getRightEditablePosition(a.length);return h===null?a:(r.isPositionEditable(a.length)||(a+=s.slice(a.length,h).join("")),r.insertCharacterAtPosition(a,c,a.length))},t),t},this.processChange=function(t,n){var o=r.maskOptions,i=o.mask,s=o.prefix,u=o.lastEditablePosition,f=t.value,p=t.selection,l=n.value,a=n.selection,c=f,h="",w=0,g=0,d=Math.min(a.start,p.start);return p.end>a.start?(h=c.slice(a.start,p.end),g=(w=r.getStringFillingLengthAtPosition(h,d))?a.length:0):c.length=i.length?d=i.length:d=s.length&&dS[e]}; background: transparent; diff --git a/build/assets/index-f893fd9f.js b/build/assets/index-b9410658.js similarity index 96% rename from build/assets/index-f893fd9f.js rename to build/assets/index-b9410658.js index 10ac0205d..a9df68e7e 100644 --- a/build/assets/index-f893fd9f.js +++ b/build/assets/index-b9410658.js @@ -1,4 +1,4 @@ -import{aX as B,aY as v,aZ as b,a_ as I,a$ as _,b0 as U,b1 as O,o as x,q as l,J as Z,r as g,j as e,F as n,b2 as K,T as j,b3 as X,aW as Q,O as ee,aV as f,b4 as te,aa as se,b5 as ne,b6 as oe,a9 as re,b7 as ie,N as ae}from"./index-a0989d63.js";import{B as w,i as ce,F as le}from"./index-775b6bc6.js";import{B as de}from"./index-f06622e3.js";import{S as ue}from"./index-58d3954b.js";import{e as xe}from"./index.esm-d308c31f.js";import{C as he}from"./CheckIcon-c0260530.js";import{C as ge}from"./ClipLoader-f345d5d1.js";import{T as z}from"./index-3d0189dc.js";import"./InfoIcon-4aad7e99.js";const R=/\b(?:twitter\.com|x\.com)\/(?:@)?([\w_]+)(?:$|\?[^/]*$)/,pe=/(https?:\/\/)?(www\.)?youtube\.com\/watch\?v=([A-Za-z0-9_-]+)/,fe=/(https?:\/\/)?(www\.)?youtube\.com\/live\/([A-Za-z0-9_-]+)/,we=/(https?:\/\/)?(www\.)?youtu\.be\/([A-Za-z0-9_-]+)/,me=/https:\/\/twitter\.com\/i\/spaces\/([A-Za-z0-9_-]+)/,be=/https:\/\/(twitter\.com|x\.com)\/[^/]+\/status\/(\d+)/,je=/(https?:\/\/)?([A-Za-z0-9_-]+)\.mp3/,ye=/(https?:\/\/)?(.*\.)?.+\/(feed|rss|rss.xml|.*.rss|.*\?(feed|format)=rss)$/,Se=/https?:\/\/(www\.)?youtube\.com\/(user\/)?(@)?([\w-]+)/,ve=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/,_e=/https:\/\/twitter\.com\/i\/broadcasts\/([A-Za-z0-9_-]+)/;function $e(t){return[fe,_e,pe,we,me,je].some(i=>i.test(t))?B:Se.test(t)?v:R.test(t)?b:be.test(t)?I:ye.test(t)?_:ve.test(t)?U:O}const Ee=(t,s="")=>{const o=(s===b?R:/@(\w+)/).exec(t);return o?o[1]:null},L=t=>!!t&&[b,v,_].includes(t),Ce=({onClick:t,loading:s,type:i,error:o})=>{const r=Z(u=>u.budget),[h,d]=g.useState(10),a=L(i)?"radar":"add_node";return g.useEffect(()=>{(async()=>{try{const c=await X(a);d(c.data.price)}catch(c){console.error("cannot fetch",c)}})()},[a]),e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(Be,{children:"Approve Cost"})})}),e.jsxs(n,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(ke,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[h," sats"]})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[K(r)," sats"]})]})]}),e.jsx(n,{children:e.jsx(w,{color:"secondary","data-testid":"check-icon",disabled:s||!!o,onClick:t,size:"large",startIcon:s?e.jsx(P,{children:e.jsx(ge,{color:l.lightGray,size:12})}):e.jsxs(P,{children:[" ",e.jsx(he,{})]}),type:"submit",variant:"contained",children:"Approve"})}),o?e.jsx(Le,{children:e.jsxs(Re,{children:[e.jsx(xe,{className:"errorIcon"}),e.jsx("span",{children:o})]})}):null]})},ke=x(n).attrs({direction:"column",align:"space-between",justify:"flex-start"})` +import{aX as B,aY as v,aZ as b,a_ as I,a$ as _,b0 as U,b1 as O,o as x,q as l,J as Z,r as g,j as e,F as n,b2 as K,T as j,b3 as X,aW as Q,O as ee,aV as f,b4 as te,aa as se,b5 as ne,b6 as oe,a9 as re,b7 as ie,N as ae}from"./index-022521cf.js";import{B as w,i as ce,F as le}from"./index-586dfb7f.js";import{B as de}from"./index-ee20ad28.js";import{S as ue}from"./index-3beb67ad.js";import{e as xe}from"./index.esm-38ac4e4f.js";import{C as he}from"./CheckIcon-4e74d21d.js";import{C as ge}from"./ClipLoader-d8628c6c.js";import{T as z}from"./index-b5c86aa6.js";import"./InfoIcon-b7d3736d.js";const R=/\b(?:twitter\.com|x\.com)\/(?:@)?([\w_]+)(?:$|\?[^/]*$)/,pe=/(https?:\/\/)?(www\.)?youtube\.com\/watch\?v=([A-Za-z0-9_-]+)/,fe=/(https?:\/\/)?(www\.)?youtube\.com\/live\/([A-Za-z0-9_-]+)/,we=/(https?:\/\/)?(www\.)?youtu\.be\/([A-Za-z0-9_-]+)/,me=/https:\/\/twitter\.com\/i\/spaces\/([A-Za-z0-9_-]+)/,be=/https:\/\/(twitter\.com|x\.com)\/[^/]+\/status\/(\d+)/,je=/(https?:\/\/)?([A-Za-z0-9_-]+)\.mp3/,ye=/(https?:\/\/)?(.*\.)?.+\/(feed|rss|rss.xml|.*.rss|.*\?(feed|format)=rss)$/,Se=/https?:\/\/(www\.)?youtube\.com\/(user\/)?(@)?([\w-]+)/,ve=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/,_e=/https:\/\/twitter\.com\/i\/broadcasts\/([A-Za-z0-9_-]+)/;function $e(t){return[fe,_e,pe,we,me,je].some(i=>i.test(t))?B:Se.test(t)?v:R.test(t)?b:be.test(t)?I:ye.test(t)?_:ve.test(t)?U:O}const Ee=(t,s="")=>{const o=(s===b?R:/@(\w+)/).exec(t);return o?o[1]:null},L=t=>!!t&&[b,v,_].includes(t),Ce=({onClick:t,loading:s,type:i,error:o})=>{const r=Z(u=>u.budget),[h,d]=g.useState(10),a=L(i)?"radar":"add_node";return g.useEffect(()=>{(async()=>{try{const c=await X(a);d(c.data.price)}catch(c){console.error("cannot fetch",c)}})()},[a]),e.jsxs(n,{children:[e.jsx(n,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(n,{align:"center",direction:"row",children:e.jsx(Be,{children:"Approve Cost"})})}),e.jsxs(n,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(ke,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[h," sats"]})]}),e.jsxs(ze,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[K(r)," sats"]})]})]}),e.jsx(n,{children:e.jsx(w,{color:"secondary","data-testid":"check-icon",disabled:s||!!o,onClick:t,size:"large",startIcon:s?e.jsx(P,{children:e.jsx(ge,{color:l.lightGray,size:12})}):e.jsxs(P,{children:[" ",e.jsx(he,{})]}),type:"submit",variant:"contained",children:"Approve"})}),o?e.jsx(Le,{children:e.jsxs(Re,{children:[e.jsx(xe,{className:"errorIcon"}),e.jsx("span",{children:o})]})}):null]})},ke=x(n).attrs({direction:"column",align:"space-between",justify:"flex-start"})` width: 141px; height: 61px; border: 1px solid ${l.GRAY7}; diff --git a/build/assets/index-d15dc160.js b/build/assets/index-c116778d.js similarity index 99% rename from build/assets/index-d15dc160.js rename to build/assets/index-c116778d.js index de55f61e7..aec2b0522 100644 --- a/build/assets/index-d15dc160.js +++ b/build/assets/index-c116778d.js @@ -1,4 +1,4 @@ -import{r as P,n as Cc,_ as yi,bu as _c,bv as ed,j as L,R as td,p as nd,q as Ki,bw as rd,bx as id,by as od}from"./index-a0989d63.js";import{a5 as fl,u as Vl,a6 as ad,U as ld,z as Ec,t as sd,C as io,a7 as ud,a2 as Zl,P as Ql,q as da,a8 as dl,a9 as cd,aa as fd,ab as dd,y as hd,ac as pd,ad as vd,ae as md,V as st,a as Nr,af as gd,b as yd,k as Xl,X as pa,ag as Tc,K as Ul,ah as Rl,ai as pi,aj as xd,Y as Yl,S as wd,ak as Fl,al as Fu,p as Sd,am as Cd,r as oo,x as xi,an as Mc,O as kc,s as _d,o as Ed,ao as Td,ap as Md,l as kd,L as Au,j as Pd,aq as Ld,ar as Ud,as as Rd,at as Jl,au as Du,av as Ir,aw as Fd,ax as hl}from"./three.module-2ce81f73.js";import{s as _t,c as Ad}from"./index-775b6bc6.js";var Pc={exports:{}},Gr={};/** +import{r as P,n as Cc,_ as yi,bu as _c,bv as ed,j as L,R as td,p as nd,q as Ki,bw as rd,bx as id,by as od}from"./index-022521cf.js";import{a5 as fl,u as Vl,a6 as ad,U as ld,z as Ec,t as sd,C as io,a7 as ud,a2 as Zl,P as Ql,q as da,a8 as dl,a9 as cd,aa as fd,ab as dd,y as hd,ac as pd,ad as vd,ae as md,V as st,a as Nr,af as gd,b as yd,k as Xl,X as pa,ag as Tc,K as Ul,ah as Rl,ai as pi,aj as xd,Y as Yl,S as wd,ak as Fl,al as Fu,p as Sd,am as Cd,r as oo,x as xi,an as Mc,O as kc,s as _d,o as Ed,ao as Td,ap as Md,l as kd,L as Au,j as Pd,aq as Ld,ar as Ud,as as Rd,at as Jl,au as Du,av as Ir,aw as Fd,ax as hl}from"./three.module-2ce81f73.js";import{s as _t,c as Ad}from"./index-586dfb7f.js";var Pc={exports:{}},Gr={};/** * @license React * react-reconciler-constants.production.min.js * diff --git a/build/assets/index-25e571f5.js b/build/assets/index-db660713.js similarity index 98% rename from build/assets/index-25e571f5.js rename to build/assets/index-db660713.js index d7177debf..1a4a69d35 100644 --- a/build/assets/index-25e571f5.js +++ b/build/assets/index-db660713.js @@ -1,4 +1,4 @@ -import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e as P,ad as ut,f as oe,ae as gt,o as d,q as x,T as L,F as g,O as E,ba as ft,ag as te,R as ne,B as ae,aa as mt,bb as Ct,bc as Ge,v as re,bd as Ze,a7 as je,aZ as ke,aY as _e,a$ as Le,be as bt,J as Ye,bf as jt,bg as qe,bh as yt,aW as wt,bi as le,bj as vt,A as Tt,K as St,Q as $t}from"./index-a0989d63.js";import{B as ce}from"./index-f06622e3.js";import{P as kt}from"./PlusIcon-1147d96e.js";import{B as W,I as Z,k as ee,i as ye,F as we}from"./index-775b6bc6.js";import{T as Me,s as U,a as Qe,S as Ke,A as ve,N as Xe,F as Je,b as et,E as _t,D as Lt,c as tt,Q as st,V as ot,d as Mt}from"./NodeCircleIcon-2908ceb4.js";import{C as M}from"./ClipLoader-f345d5d1.js";import{f as Nt,g as Bt,h as zt,a as It}from"./index.esm-d308c31f.js";import{P as Te,a as Rt}from"./Popover-6e322384.js";import{S as nt}from"./SearchIcon-119ae41f.js";import{I as Et,A as Se,O as rt,T as it}from"./index-6f4f8df4.js";import{B as At,T as Ot}from"./index-3d0189dc.js";import{D as Ft}from"./DeleteIcon-32576b88.js";import{E as Ht,M as Ne,A as Wt}from"./MergeIcon-b3a532b8.js";import{u as I}from"./index-898f9b16.js";import{C as at}from"./CheckIcon-c0260530.js";import{T as Be}from"./Typography-d3022217.js";import{T as Pt,a as Ut}from"./Tabs-cb4f54fe.js";import"./useSlotProps-374609c4.js";import"./Stack-98b5acbc.js";import"./createSvgIcon-ebe0e3e6.js";import"./TextareaAutosize-76d3e8d6.js";import"./InfoIcon-4aad7e99.js";const Dt=h.createContext(),lt=Dt;function Vt(t){return Y("MuiTable",t)}q("MuiTable",["root","stickyHeader"]);const Gt=["className","component","padding","size","stickyHeader"],Zt=t=>{const{classes:s,stickyHeader:n}=t;return J({root:["root",n&&"stickyHeader"]},Vt,s)},Yt=F("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>N({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":N({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},s.stickyHeader&&{borderCollapse:"separate"})),ze="table",qt=h.forwardRef(function(s,n){const r=Q({props:s,name:"MuiTable"}),{className:a,component:l=ze,padding:i="normal",size:o="medium",stickyHeader:c=!1}=r,u=K(r,Gt),m=N({},r,{component:l,padding:i,size:o,stickyHeader:c}),p=Zt(m),b=h.useMemo(()=>({padding:i,size:o,stickyHeader:c}),[i,o,c]);return e.jsx(lt.Provider,{value:b,children:e.jsx(Yt,N({as:l,role:l===ze?null:"table",ref:n,className:X(p.root,a),ownerState:m},u))})}),de=qt,Qt=h.createContext(),pe=Qt;function Kt(t){return Y("MuiTableBody",t)}q("MuiTableBody",["root"]);const Xt=["className","component"],Jt=t=>{const{classes:s}=t;return J({root:["root"]},Kt,s)},es=F("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-row-group"}),ts={variant:"body"},Ie="tbody",ss=h.forwardRef(function(s,n){const r=Q({props:s,name:"MuiTableBody"}),{className:a,component:l=Ie}=r,i=K(r,Xt),o=N({},r,{component:l}),c=Jt(o);return e.jsx(pe.Provider,{value:ts,children:e.jsx(es,N({className:X(c.root,a),as:l,ref:n,role:l===Ie?null:"rowgroup",ownerState:o},i))})}),os=ss;function ns(t){return Y("MuiTableCell",t)}const rs=q("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),is=rs,as=["align","className","component","padding","scope","size","sortDirection","variant"],ls=t=>{const{classes:s,variant:n,align:r,padding:a,size:l,stickyHeader:i}=t,o={root:["root",n,i&&"stickyHeader",r!=="inherit"&&`align${P(r)}`,a!=="normal"&&`padding${P(a)}`,`size${P(l)}`]};return J(o,ns,s)},cs=F("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,s[n.variant],s[`size${P(n.size)}`],n.padding!=="normal"&&s[`padding${P(n.padding)}`],n.align!=="inherit"&&s[`align${P(n.align)}`],n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>N({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid +import{r as h,b as Y,g as q,s as F,_ as N,u as Q,a as K,j as e,c as X,d as J,e as P,ad as ut,f as oe,ae as gt,o as d,q as x,T as L,F as g,O as E,ba as ft,ag as te,R as ne,B as ae,aa as mt,bb as Ct,bc as Ge,v as re,bd as Ze,a7 as je,aZ as ke,aY as _e,a$ as Le,be as bt,J as Ye,bf as jt,bg as qe,bh as yt,aW as wt,bi as le,bj as vt,A as Tt,K as St,Q as $t}from"./index-022521cf.js";import{B as ce}from"./index-ee20ad28.js";import{P as kt}from"./PlusIcon-6ec48130.js";import{B as W,I as Z,k as ee,i as ye,F as we}from"./index-586dfb7f.js";import{T as Me,s as U,a as Qe,S as Ke,A as ve,N as Xe,F as Je,b as et,E as _t,D as Lt,c as tt,Q as st,V as ot,d as Mt}from"./NodeCircleIcon-e840b41b.js";import{C as M}from"./ClipLoader-d8628c6c.js";import{f as Nt,g as Bt,h as zt,a as It}from"./index.esm-38ac4e4f.js";import{P as Te,a as Rt}from"./Popover-cc3c7b26.js";import{S as nt}from"./SearchIcon-fa6afb77.js";import{I as Et,A as Se,O as rt,T as it}from"./index-39c958ca.js";import{B as At,T as Ot}from"./index-b5c86aa6.js";import{D as Ft}from"./DeleteIcon-afd5d6e5.js";import{E as Ht,M as Ne,A as Wt}from"./MergeIcon-b7c61b0a.js";import{u as I}from"./index-fb250689.js";import{C as at}from"./CheckIcon-4e74d21d.js";import{T as Be}from"./Typography-13dc67f3.js";import{T as Pt,a as Ut}from"./Tabs-2c5124a1.js";import"./useSlotProps-51fc8b9f.js";import"./Stack-ce2a5ec5.js";import"./createSvgIcon-e1ebdfca.js";import"./TextareaAutosize-0ace781b.js";import"./InfoIcon-b7d3736d.js";const Dt=h.createContext(),lt=Dt;function Vt(t){return Y("MuiTable",t)}q("MuiTable",["root","stickyHeader"]);const Gt=["className","component","padding","size","stickyHeader"],Zt=t=>{const{classes:s,stickyHeader:n}=t;return J({root:["root",n&&"stickyHeader"]},Vt,s)},Yt=F("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>N({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":N({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},s.stickyHeader&&{borderCollapse:"separate"})),ze="table",qt=h.forwardRef(function(s,n){const r=Q({props:s,name:"MuiTable"}),{className:a,component:l=ze,padding:i="normal",size:o="medium",stickyHeader:c=!1}=r,u=K(r,Gt),m=N({},r,{component:l,padding:i,size:o,stickyHeader:c}),p=Zt(m),b=h.useMemo(()=>({padding:i,size:o,stickyHeader:c}),[i,o,c]);return e.jsx(lt.Provider,{value:b,children:e.jsx(Yt,N({as:l,role:l===ze?null:"table",ref:n,className:X(p.root,a),ownerState:m},u))})}),de=qt,Qt=h.createContext(),pe=Qt;function Kt(t){return Y("MuiTableBody",t)}q("MuiTableBody",["root"]);const Xt=["className","component"],Jt=t=>{const{classes:s}=t;return J({root:["root"]},Kt,s)},es=F("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-row-group"}),ts={variant:"body"},Ie="tbody",ss=h.forwardRef(function(s,n){const r=Q({props:s,name:"MuiTableBody"}),{className:a,component:l=Ie}=r,i=K(r,Xt),o=N({},r,{component:l}),c=Jt(o);return e.jsx(pe.Provider,{value:ts,children:e.jsx(es,N({className:X(c.root,a),as:l,ref:n,role:l===Ie?null:"rowgroup",ownerState:o},i))})}),os=ss;function ns(t){return Y("MuiTableCell",t)}const rs=q("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),is=rs,as=["align","className","component","padding","scope","size","sortDirection","variant"],ls=t=>{const{classes:s,variant:n,align:r,padding:a,size:l,stickyHeader:i}=t,o={root:["root",n,i&&"stickyHeader",r!=="inherit"&&`align${P(r)}`,a!=="normal"&&`padding${P(a)}`,`size${P(l)}`]};return J(o,ns,s)},cs=F("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,s[n.variant],s[`size${P(n.size)}`],n.padding!=="normal"&&s[`padding${P(n.padding)}`],n.align!=="inherit"&&s[`align${P(n.align)}`],n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>N({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid ${t.palette.mode==="light"?ut(oe(t.palette.divider,1),.88):gt(oe(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},s.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},s.variant==="body"&&{color:(t.vars||t).palette.text.primary},s.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},s.size==="small"&&{padding:"6px 16px",[`&.${is.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},s.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},s.padding==="none"&&{padding:0},s.align==="left"&&{textAlign:"left"},s.align==="center"&&{textAlign:"center"},s.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},s.align==="justify"&&{textAlign:"justify"},s.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),ds=h.forwardRef(function(s,n){const r=Q({props:s,name:"MuiTableCell"}),{align:a="inherit",className:l,component:i,padding:o,scope:c,size:u,sortDirection:m,variant:p}=r,b=K(r,as),C=h.useContext(lt),j=h.useContext(pe),w=j&&j.variant==="head";let y;i?y=i:y=w?"th":"td";let S=c;y==="td"?S=void 0:!S&&w&&(S="col");const $=p||j&&j.variant,A=N({},r,{align:a,component:y,padding:o||(C&&C.padding?C.padding:"normal"),size:u||(C&&C.size?C.size:"medium"),sortDirection:m,stickyHeader:$==="head"&&C&&C.stickyHeader,variant:$}),O=ls(A);let B=null;return m&&(B=m==="asc"?"ascending":"descending"),e.jsx(cs,N({as:y,ref:n,className:X(O.root,l),"aria-sort":B,scope:S,ownerState:A},b))}),ps=ds;function xs(t){return Y("MuiTableHead",t)}q("MuiTableHead",["root"]);const hs=["className","component"],us=t=>{const{classes:s}=t;return J({root:["root"]},xs,s)},gs=F("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-header-group"}),fs={variant:"head"},Re="thead",ms=h.forwardRef(function(s,n){const r=Q({props:s,name:"MuiTableHead"}),{className:a,component:l=Re}=r,i=K(r,hs),o=N({},r,{component:l}),c=us(o);return e.jsx(pe.Provider,{value:fs,children:e.jsx(gs,N({as:l,className:X(c.root,a),ref:n,role:l===Re?null:"rowgroup",ownerState:o},i))})}),ct=ms;function Cs(t){return Y("MuiTableRow",t)}const bs=q("MuiTableRow",["root","selected","hover","head","footer"]),Ee=bs,js=["className","component","hover","selected"],ys=t=>{const{classes:s,selected:n,hover:r,head:a,footer:l}=t;return J({root:["root",n&&"selected",r&&"hover",a&&"head",l&&"footer"]},Cs,s)},ws=F("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.head&&s.head,n.footer&&s.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${Ee.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Ee.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:oe(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:oe(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),Ae="tr",vs=h.forwardRef(function(s,n){const r=Q({props:s,name:"MuiTableRow"}),{className:a,component:l=Ae,hover:i=!1,selected:o=!1}=r,c=K(r,js),u=h.useContext(pe),m=N({},r,{component:l,hover:i,selected:o,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),p=ys(m);return e.jsx(ws,N({as:l,ref:n,className:X(p.root,a),role:l===Ae?null:"row",ownerState:m},c))}),D=vs;function Ce(t){const s=new Date(Number(t)*1e3),n=s.getFullYear(),r=(1+s.getMonth()).toString().padStart(2,"0");return`${s.getDate().toString().padStart(2,"0")}/${r}/${n}`}const Ts=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 56 56",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M4.75129 14.5773L28 1.1547L51.2487 14.5773V41.4226L28 54.8453L4.75129 41.4226V14.5773Z",stroke:"#47505E","stroke-width":"2"}),e.jsx("path",{d:"M51.5956 14.4722L28.0001 28.0003M28.0001 28.0003L4.40457 14.4722M28.0001 28.0003L28.0001 55.3711",stroke:"#47505E","stroke-width":"2"})]}),f=d(ps)` && { color: ${x.white}; diff --git a/build/assets/index-4a7ed5d9.js b/build/assets/index-e671d6ff.js similarity index 90% rename from build/assets/index-4a7ed5d9.js rename to build/assets/index-e671d6ff.js index 75d3d732e..bfae08219 100644 --- a/build/assets/index-4a7ed5d9.js +++ b/build/assets/index-e671d6ff.js @@ -1,4 +1,4 @@ -import{r as p,a7 as T,j as e,F as x,bg as I,o as n,T as v,O as _,y as L,q as A,bj as F}from"./index-a0989d63.js";import{k as B,i as E,F as N,B as k}from"./index-775b6bc6.js";import{B as M}from"./index-f06622e3.js";import{u as w}from"./index-898f9b16.js";import{S as O,A as z,N as D,F as P,b as Y,I as R}from"./NodeCircleIcon-2908ceb4.js";import{A as X,O as H,T as W}from"./index-6f4f8df4.js";import{C as q}from"./ClipLoader-f345d5d1.js";import"./Stack-98b5acbc.js";import"./useSlotProps-374609c4.js";import"./Popover-6e322384.js";import"./createSvgIcon-ebe0e3e6.js";import"./TextareaAutosize-76d3e8d6.js";const U=({topicId:s,onSelect:r,selectedValue:d,dataId:c})=>{const[u,h]=p.useState([]),[g,f]=p.useState(!1),j=p.useMemo(()=>{const o=async i=>{const m={is_muted:"False",sort_by:z,search:i,skip:"0",limit:"1000"};f(!0);try{const C=(await I(m.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==s);h(C)}catch{h([])}finally{f(!1)}};return T.debounce(o,300)},[s]),a=o=>{const i=o.trim();if(!i){h([]);return}i.length>2&&j(o)},b=o=>{const i=o?u.find(m=>m.ref_id===o.value):null;r(i||null)},t=o=>({label:o.search_value,value:o.ref_id,type:o.node_type}),S=o=>o.map(t);return d?e.jsxs(x,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:d.search_value}),e.jsx(O,{onClick:()=>r(null),size:"medium",children:e.jsx(B,{})})]}):e.jsx(X,{dataId:c,handleInputChange:a,isLoading:g,onSelect:b,options:S(u)||H,selectedValue:d?t(d):null})},$=({from:s,onSelect:r,selectedToNode:d,isSwapped:c,setIsSwapped:u})=>e.jsxs(x,{mb:20,children:[e.jsx(x,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(x,{align:"center",direction:"row",children:e.jsx(G,{children:"Merge topic"})})}),e.jsxs(Q,{swap:c,children:[e.jsx(J,{children:e.jsx(V,{disabled:!0,label:c?"To":"From",swap:c,value:s==null?void 0:s.name})}),e.jsxs(x,{my:16,children:[e.jsx(ee,{children:"Type"}),e.jsx(v,{children:"IS ALIAS"})]}),e.jsx(x,{"data-testid":"to-section-container",children:e.jsxs(Z,{children:[e.jsx(te,{children:c?"From":"To"}),e.jsx(U,{dataId:"to-node",onSelect:r,selectedValue:d,topicId:s==null?void 0:s.ref_id})]})}),e.jsxs(K,{children:[e.jsx(oe,{children:e.jsx(D,{})}),e.jsx(se,{"data-testid":"swap-icon",onClick:u,children:e.jsx(P,{})}),e.jsx(ne,{children:e.jsx(Y,{})})]})]})]}),G=n(v)` +import{r as p,a7 as T,j as e,F as x,bg as I,o as n,T as v,O as _,y as L,q as A,bj as F}from"./index-022521cf.js";import{k as B,i as E,F as N,B as k}from"./index-586dfb7f.js";import{B as M}from"./index-ee20ad28.js";import{u as w}from"./index-fb250689.js";import{S as O,A as z,N as D,F as P,b as Y,I as R}from"./NodeCircleIcon-e840b41b.js";import{A as X,O as H,T as W}from"./index-39c958ca.js";import{C as q}from"./ClipLoader-d8628c6c.js";import"./Stack-ce2a5ec5.js";import"./useSlotProps-51fc8b9f.js";import"./Popover-cc3c7b26.js";import"./createSvgIcon-e1ebdfca.js";import"./TextareaAutosize-0ace781b.js";const U=({topicId:s,onSelect:r,selectedValue:d,dataId:c})=>{const[u,h]=p.useState([]),[g,f]=p.useState(!1),j=p.useMemo(()=>{const o=async i=>{const m={is_muted:"False",sort_by:z,search:i,skip:"0",limit:"1000"};f(!0);try{const C=(await I(m.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==s);h(C)}catch{h([])}finally{f(!1)}};return T.debounce(o,300)},[s]),a=o=>{const i=o.trim();if(!i){h([]);return}i.length>2&&j(o)},b=o=>{const i=o?u.find(m=>m.ref_id===o.value):null;r(i||null)},t=o=>({label:o.search_value,value:o.ref_id,type:o.node_type}),S=o=>o.map(t);return d?e.jsxs(x,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:d.search_value}),e.jsx(O,{onClick:()=>r(null),size:"medium",children:e.jsx(B,{})})]}):e.jsx(X,{dataId:c,handleInputChange:a,isLoading:g,onSelect:b,options:S(u)||H,selectedValue:d?t(d):null})},$=({from:s,onSelect:r,selectedToNode:d,isSwapped:c,setIsSwapped:u})=>e.jsxs(x,{mb:20,children:[e.jsx(x,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(x,{align:"center",direction:"row",children:e.jsx(G,{children:"Merge topic"})})}),e.jsxs(Q,{swap:c,children:[e.jsx(J,{children:e.jsx(V,{disabled:!0,label:c?"To":"From",swap:c,value:s==null?void 0:s.name})}),e.jsxs(x,{my:16,children:[e.jsx(ee,{children:"Type"}),e.jsx(v,{children:"IS ALIAS"})]}),e.jsx(x,{"data-testid":"to-section-container",children:e.jsxs(Z,{children:[e.jsx(te,{children:c?"From":"To"}),e.jsx(U,{dataId:"to-node",onSelect:r,selectedValue:d,topicId:s==null?void 0:s.ref_id})]})}),e.jsxs(K,{children:[e.jsx(oe,{children:e.jsx(D,{})}),e.jsx(se,{"data-testid":"swap-icon",onClick:u,children:e.jsx(P,{})}),e.jsx(ne,{children:e.jsx(Y,{})})]})]})]}),G=n(v)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-4546d106.js b/build/assets/index-e8631a32.js similarity index 92% rename from build/assets/index-4546d106.js rename to build/assets/index-e8631a32.js index 2d3abcb7a..5f906047d 100644 --- a/build/assets/index-4546d106.js +++ b/build/assets/index-e8631a32.js @@ -1,4 +1,4 @@ -import{o as s,q as l,F as n,p as w,j as e,t as G,v as C,T as S,r as f,A as v,aU as A,aV as b,aW as I,J as B,O as y}from"./index-a0989d63.js";import{B as z}from"./index-f06622e3.js";import{u as M,G as k,C as D,l as E,o as R,B as T,i as W,F}from"./index-775b6bc6.js";import{C as $}from"./ClipLoader-f345d5d1.js";import{T as j}from"./index-3d0189dc.js";import{S as P}from"./index-58d3954b.js";import{e as V}from"./index.esm-d308c31f.js";import{T as L,a as N}from"./Tabs-cb4f54fe.js";import"./InfoIcon-4aad7e99.js";import"./useSlotProps-374609c4.js";import"./createSvgIcon-ebe0e3e6.js";const O={split:e.jsx(k,{}),force:e.jsx(D,{}),sphere:e.jsx(E,{}),earth:e.jsx(R,{})},Y=()=>{const[i,p]=w(M(t=>[t.graphStyle,t.setGraphStyle])),r=t=>{p(t)};return e.jsx(q,{direction:"column",children:G.map(t=>e.jsx(n,{className:C("icon",{active:i===t}),onClick:()=>r(t),children:O[t]},t))})},q=s(n).attrs({direction:"row",align:"center",justify:"space-between"})` +import{o as s,q as l,F as n,p as w,j as e,t as G,v as C,T as S,r as f,A as v,aU as A,aV as b,aW as I,J as B,O as y}from"./index-022521cf.js";import{B as z}from"./index-ee20ad28.js";import{u as M,G as k,C as D,l as E,o as R,B as T,i as W,F}from"./index-586dfb7f.js";import{C as $}from"./ClipLoader-d8628c6c.js";import{T as j}from"./index-b5c86aa6.js";import{S as P}from"./index-3beb67ad.js";import{e as V}from"./index.esm-38ac4e4f.js";import{T as L,a as N}from"./Tabs-2c5124a1.js";import"./InfoIcon-b7d3736d.js";import"./useSlotProps-51fc8b9f.js";import"./createSvgIcon-e1ebdfca.js";const O={split:e.jsx(k,{}),force:e.jsx(D,{}),sphere:e.jsx(E,{}),earth:e.jsx(R,{})},Y=()=>{const[i,p]=w(M(t=>[t.graphStyle,t.setGraphStyle])),r=t=>{p(t)};return e.jsx(q,{direction:"column",children:G.map(t=>e.jsx(n,{className:C("icon",{active:i===t}),onClick:()=>r(t),children:O[t]},t))})},q=s(n).attrs({direction:"row",align:"center",justify:"space-between"})` width: 447px; height: 48px; background: ${l.appearanceBg}; diff --git a/build/assets/index-f06622e3.js b/build/assets/index-ee20ad28.js similarity index 96% rename from build/assets/index-f06622e3.js rename to build/assets/index-ee20ad28.js index 7cedabf31..63c0dd1e5 100644 --- a/build/assets/index-f06622e3.js +++ b/build/assets/index-ee20ad28.js @@ -1,4 +1,4 @@ -import{ai as m,o as s,q as r,ag as o,F as d,O as w,r as y,j as e}from"./index-a0989d63.js";import{k as v}from"./index-775b6bc6.js";const k=m` +import{ai as m,o as s,q as r,ag as o,F as d,O as w,r as y,j as e}from"./index-022521cf.js";import{k as v}from"./index-586dfb7f.js";const k=m` 0% { transform: scale(0.8); } diff --git a/build/assets/index-898f9b16.js b/build/assets/index-fb250689.js similarity index 85% rename from build/assets/index-898f9b16.js rename to build/assets/index-fb250689.js index de9b303d0..2d3cae6e1 100644 --- a/build/assets/index-898f9b16.js +++ b/build/assets/index-fb250689.js @@ -1 +1 @@ -import{w as f,bk as m}from"./index-a0989d63.js";import{D as y}from"./NodeCircleIcon-2908ceb4.js";const c={data:null,ids:[],loading:!1,total:0,filters:{is_muted:!1,sortBy:y,page:0,pageSize:50}};let r=null;const S=f((a,n)=>({...c,setTopics:async()=>{a({loading:!0}),r&&r.abort();const t=new AbortController,{signal:p}=t;r=t;const{data:d,ids:g,filters:o}=n(),u=T(o);o.page===0&&a({data:null,ids:[],total:0});try{const e=await m(u,p),l=o.page===0?{}:{...d||{}},i=o.page===0?[]:[...g];e.data.forEach(s=>{l[s.ref_id]=s,i.push(s.ref_id)}),a({data:l,ids:i,total:e.totalCount}),a({loading:!1})}catch(e){console.log(e)}},setFilters:t=>a({filters:{...n().filters,page:0,...t}}),terminate:()=>a(c)})),T=a=>({muted:a.is_muted?"True":"False",skip:String(a.page*a.pageSize),limit:String(a.pageSize),sort_by:a.sortBy,...a.search?{search:a.search}:{node_type:"Topic"}});export{S as u}; +import{w as f,bk as m}from"./index-022521cf.js";import{D as y}from"./NodeCircleIcon-e840b41b.js";const c={data:null,ids:[],loading:!1,total:0,filters:{is_muted:!1,sortBy:y,page:0,pageSize:50}};let r=null;const S=f((a,n)=>({...c,setTopics:async()=>{a({loading:!0}),r&&r.abort();const t=new AbortController,{signal:p}=t;r=t;const{data:d,ids:g,filters:o}=n(),u=T(o);o.page===0&&a({data:null,ids:[],total:0});try{const e=await m(u,p),l=o.page===0?{}:{...d||{}},i=o.page===0?[]:[...g];e.data.forEach(s=>{l[s.ref_id]=s,i.push(s.ref_id)}),a({data:l,ids:i,total:e.totalCount}),a({loading:!1})}catch(e){console.log(e)}},setFilters:t=>a({filters:{...n().filters,page:0,...t}}),terminate:()=>a(c)})),T=a=>({muted:a.is_muted?"True":"False",skip:String(a.page*a.pageSize),limit:String(a.pageSize),sort_by:a.sortBy,...a.search?{search:a.search}:{node_type:"Topic"}});export{S as u}; diff --git a/build/assets/index.esm-d308c31f.js b/build/assets/index.esm-38ac4e4f.js similarity index 98% rename from build/assets/index.esm-d308c31f.js rename to build/assets/index.esm-38ac4e4f.js index d87bcf9f0..f4e4b928e 100644 --- a/build/assets/index.esm-d308c31f.js +++ b/build/assets/index.esm-38ac4e4f.js @@ -1 +1 @@ -import{R as c}from"./index-a0989d63.js";var u={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g=c.createContext&&c.createContext(u),i=globalThis&&globalThis.__assign||function(){return i=Object.assign||function(t){for(var a,e=1,r=arguments.length;e{e.apply(this,s)};clearTimeout(t),t=setTimeout(i,o)}return n.clear=()=>{clearTimeout(t)},n}function x(e){return e&&e.ownerDocument||document}function T(e){return x(e).defaultView||window}function N(e){return typeof e=="string"}function k(e,o,t){return e===void 0||N(e)?o:r({},o,{ownerState:r({},o.ownerState,t)})}function E(e,o=[]){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!o.includes(n)).forEach(n=>{t[n]=e[n]}),t}function H(e,o,t){return typeof e=="function"?e(o,t):e}function P(e){var o,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(o=0;o!(t.match(/^on[A-Z]/)&&typeof e[t]=="function")).forEach(t=>{o[t]=e[t]}),o}function R(e){const{getSlotProps:o,additionalProps:t,externalSlotProps:n,externalForwardedProps:s,className:i}=e;if(!o){const v=g(t==null?void 0:t.className,i,s==null?void 0:s.className,n==null?void 0:n.className),y=r({},t==null?void 0:t.style,s==null?void 0:s.style,n==null?void 0:n.style),p=r({},t,s,n);return v.length>0&&(p.className=v),Object.keys(y).length>0&&(p.style=y),{props:p,internalRef:void 0}}const c=E(r({},s,n)),a=S(n),f=S(s),l=o(c),u=g(l==null?void 0:l.className,t==null?void 0:t.className,i,s==null?void 0:s.className,n==null?void 0:n.className),d=r({},l==null?void 0:l.style,t==null?void 0:t.style,s==null?void 0:s.style,n==null?void 0:n.style),m=r({},l,t,f,a);return u.length>0&&(m.className=u),Object.keys(d).length>0&&(m.style=d),{props:m,internalRef:l.ref}}const C=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function W(e){var o;const{elementType:t,externalSlotProps:n,ownerState:s,skipResolvingSlotProps:i=!1}=e,c=h(e,C),a=i?{}:H(n,s),{props:f,internalRef:l}=R(r({},c,{externalSlotProps:a})),u=w(l,a==null?void 0:a.ref,(o=e.additionalProps)==null?void 0:o.ref);return k(t,r({},f,{ref:u}),s)}export{T as a,A as d,E as e,N as i,x as o,W as u}; +import{_ as r,a as h}from"./index-022521cf.js";import{e as w}from"./index-586dfb7f.js";function A(e,o=166){let t;function n(...s){const i=()=>{e.apply(this,s)};clearTimeout(t),t=setTimeout(i,o)}return n.clear=()=>{clearTimeout(t)},n}function x(e){return e&&e.ownerDocument||document}function T(e){return x(e).defaultView||window}function N(e){return typeof e=="string"}function k(e,o,t){return e===void 0||N(e)?o:r({},o,{ownerState:r({},o.ownerState,t)})}function E(e,o=[]){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!o.includes(n)).forEach(n=>{t[n]=e[n]}),t}function H(e,o,t){return typeof e=="function"?e(o,t):e}function P(e){var o,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(o=0;o!(t.match(/^on[A-Z]/)&&typeof e[t]=="function")).forEach(t=>{o[t]=e[t]}),o}function R(e){const{getSlotProps:o,additionalProps:t,externalSlotProps:n,externalForwardedProps:s,className:i}=e;if(!o){const v=g(t==null?void 0:t.className,i,s==null?void 0:s.className,n==null?void 0:n.className),y=r({},t==null?void 0:t.style,s==null?void 0:s.style,n==null?void 0:n.style),p=r({},t,s,n);return v.length>0&&(p.className=v),Object.keys(y).length>0&&(p.style=y),{props:p,internalRef:void 0}}const c=E(r({},s,n)),a=S(n),f=S(s),l=o(c),u=g(l==null?void 0:l.className,t==null?void 0:t.className,i,s==null?void 0:s.className,n==null?void 0:n.className),d=r({},l==null?void 0:l.style,t==null?void 0:t.style,s==null?void 0:s.style,n==null?void 0:n.style),m=r({},l,t,f,a);return u.length>0&&(m.className=u),Object.keys(d).length>0&&(m.style=d),{props:m,internalRef:l.ref}}const C=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function W(e){var o;const{elementType:t,externalSlotProps:n,ownerState:s,skipResolvingSlotProps:i=!1}=e,c=h(e,C),a=i?{}:H(n,s),{props:f,internalRef:l}=R(r({},c,{externalSlotProps:a})),u=w(l,a==null?void 0:a.ref,(o=e.additionalProps)==null?void 0:o.ref);return k(t,r({},f,{ref:u}),s)}export{T as a,A as d,E as e,N as i,x as o,W as u}; diff --git a/build/index.html b/build/index.html index 0e1fd8f82..2f0d6cd65 100644 --- a/build/index.html +++ b/build/index.html @@ -22,7 +22,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Second Brain - + diff --git a/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx b/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx index 6bd562105..0b9bc65e2 100644 --- a/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx +++ b/src/components/ModalsContainer/BlueprintModal/Body/Editor/index.tsx @@ -388,22 +388,28 @@ export const Editor = ({ const resolvedParentValue = () => parentOptions?.find((i) => i.value === parent) const resolvedSelectedParentValue = useMemo((): TAutocompleteOption | undefined => { - if (!selectedSchema) { - return undefined - } + if (parent) { + const option = selectedNodeParentOptions?.find((i) => i.value === parent) - const option = selectedNodeParentOptions?.find((i) => i.value === selectedSchema.parent) + if (option) { + return option + } - if (option) { - return option + return { label: parent, value: parent } } - if (selectedSchema.parent) { + if (selectedSchema?.parent) { + const option = selectedNodeParentOptions?.find((i) => i.value === selectedSchema.parent) + + if (option) { + return option + } + return { label: selectedSchema.parent, value: selectedSchema.parent } } return undefined - }, [selectedSchema, selectedNodeParentOptions]) + }, [parent, selectedSchema, selectedNodeParentOptions]) return (