Spaces:
Running
Running
| (()=>{var e={};e.id=974,e.ids=[974],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5699:(e,t,r)=>{Promise.resolve().then(r.bind(r,90597))},9999:(e,t,r)=>{"use strict";let n,a;r.r(t),r.d(t,{default:()=>us});var i={};r.r(i),r.d(i,{boolean:()=>o1,booleanish:()=>o2,commaOrSpaceSeparated:()=>o8,commaSeparated:()=>o6,number:()=>o4,overloadedBoolean:()=>o3,spaceSeparated:()=>o5});var o={};r.r(o),r.d(o,{attentionMarkers:()=>l2,contentInitial:()=>lJ,disable:()=>l3,document:()=>lY,flow:()=>lZ,flowInitial:()=>lX,insideSpan:()=>l1,string:()=>lQ,text:()=>l0});var s=r(60687),l=r(43210),c=r.t(l,2),u=r.n(l),d=r(16189),p=r(28602),h=r(96241),m=r(24934),f=r(68988);let g=l.forwardRef(({className:e,...t},r)=>(0,s.jsx)("textarea",{className:(0,h.cn)("flex min-h-[84px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...t}));g.displayName="Textarea";var v=r(62688);let x=(0,v.A)("file-code",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]),y=(0,v.A)("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),b=(0,v.A)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var w=r(13964),k=r(11860);let j=(0,v.A)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),N=(0,v.A)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),C=(0,v.A)("hard-drive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]),S=(0,v.A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]),E=(0,v.A)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);var D=r(13861);let M=(0,v.A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),P=(0,v.A)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),T=(0,v.A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),I=(0,v.A)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),A=Symbol.for("constructDateFrom");function R(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&A in e?e[A](t):e instanceof Date?new e.constructor(t):new Date(t)}let L={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function z(e){return (t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}let O={date:z({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:z({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:z({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},F={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function _(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{let t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function q(e){return(t,r={})=>{let n,a=r.width,i=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;let s=o[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}(l,e=>e.test(s)):function(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}(l,e=>e.test(s));return n=e.valueCallback?e.valueCallback(c):c,{value:n=r.valueCallback?r.valueCallback(n):n,rest:t.slice(s.length)}}}let B={code:"en-US",formatDistance:(e,t,r)=>{let n,a=L[e];if(n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix)if(r.comparison&&r.comparison>0)return"in "+n;else return n+" ago";return n},formatLong:O,formatRelative:(e,t,r,n)=>F[e],localize:{ordinalNumber:(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:_({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:_({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:_({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:_({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:_({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:function(e){return(t,r={})=>{let n=t.match(e.matchPattern);if(!n)return null;let a=n[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];return{value:o=r.valueCallback?r.valueCallback(o):o,rest:t.slice(a.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:q({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:q({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:q({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:q({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:q({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},$={};function U(e,t){return R(t||e,e)}function H(e){let t=U(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),e-r}function V(e,...t){let r=R.bind(null,e||t.find(e=>"object"==typeof e));return t.map(r)}function W(e,t){let r=U(e)-U(t);return r<0?-1:r>0?1:r}function G(e,t){return function(e,t,r){let n,a=r?.locale??$.locale??B,i=W(e,t);if(isNaN(i))throw RangeError("Invalid time value");let o=Object.assign({},r,{addSuffix:r?.addSuffix,comparison:i}),[s,l]=V(r?.in,...i>0?[t,e]:[e,t]),c=function(e,t,r){var n;return(n=void 0,e=>{let t=(n?Math[n]:Math.trunc)(e);return 0===t?0:t})((U(e)-U(t))/1e3)}(l,s),u=Math.round((c-(H(l)-H(s))/1e3)/60);if(u<2)if(r?.includeSeconds)if(c<5)return a.formatDistance("lessThanXSeconds",5,o);else if(c<10)return a.formatDistance("lessThanXSeconds",10,o);else if(c<20)return a.formatDistance("lessThanXSeconds",20,o);else if(c<40)return a.formatDistance("halfAMinute",0,o);else if(c<60)return a.formatDistance("lessThanXMinutes",1,o);else return a.formatDistance("xMinutes",1,o);else if(0===u)return a.formatDistance("lessThanXMinutes",1,o);else return a.formatDistance("xMinutes",u,o);if(u<45)return a.formatDistance("xMinutes",u,o);if(u<90)return a.formatDistance("aboutXHours",1,o);if(u<1440){let e=Math.round(u/60);return a.formatDistance("aboutXHours",e,o)}if(u<2520)return a.formatDistance("xDays",1,o);else if(u<43200){let e=Math.round(u/1440);return a.formatDistance("xDays",e,o)}else if(u<86400)return n=Math.round(u/43200),a.formatDistance("aboutXMonths",n,o);if((n=function(e,t,r){let[n,a,i]=V(void 0,e,e,t),o=W(a,i),s=Math.abs(function(e,t,r){let[n,a]=V(void 0,e,t);return 12*(n.getFullYear()-a.getFullYear())+(n.getMonth()-a.getMonth())}(a,i));if(s<1)return 0;1===a.getMonth()&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-o*s);let l=W(a,i)===-o;(function(e,t){let r=U(e,void 0);return+function(e,t){let r=U(e,t?.in);return r.setHours(23,59,59,999),r}(r,void 0)==+function(e,t){let r=U(e,t?.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}(r,t)})(n)&&1===s&&1===W(n,i)&&(l=!1);let c=o*(s-l);return 0===c?0:c}(l,s))<12){let e=Math.round(u/43200);return a.formatDistance("xMonths",e,o)}{let e=n%12,t=Math.trunc(n/12);return e<3?a.formatDistance("aboutXYears",t,o):e<9?a.formatDistance("overXYears",t,o):a.formatDistance("almostXYears",t+1,o)}}(e,R(e,Date.now()),t)}var K=r(70569),Y=r(98599),J=r(11273),X=r(65551),Z=r(14163),Q=r(9510),ee=r(43),et=r(31355),er=r(1359),en=r(32547),ea=r(96963),ei=r(55509),eo=r(25028),es=r(46059),el=r(13495),ec="rovingFocusGroup.onEntryFocus",eu={bubbles:!1,cancelable:!0},ed="RovingFocusGroup",[ep,eh,em]=(0,Q.N)(ed),[ef,eg]=(0,J.A)(ed,[em]),[ev,ex]=ef(ed),ey=l.forwardRef((e,t)=>(0,s.jsx)(ep.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,s.jsx)(ep.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,s.jsx)(eb,{...e,ref:t})})}));ey.displayName=ed;var eb=l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...h}=e,m=l.useRef(null),f=(0,Y.s)(t,m),g=(0,ee.jH)(i),[v,x]=(0,X.i)({prop:o,defaultProp:c??null,onChange:u,caller:ed}),[y,b]=l.useState(!1),w=(0,el.c)(d),k=eh(r),j=l.useRef(!1),[N,C]=l.useState(0);return l.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(ec,w),()=>e.removeEventListener(ec,w)},[w]),(0,s.jsx)(ev,{scope:r,orientation:n,dir:g,loop:a,currentTabStopId:v,onItemFocus:l.useCallback(e=>x(e),[x]),onItemShiftTab:l.useCallback(()=>b(!0),[]),onFocusableItemAdd:l.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:l.useCallback(()=>C(e=>e-1),[]),children:(0,s.jsx)(Z.sG.div,{tabIndex:y||0===N?-1:0,"data-orientation":n,...h,ref:f,style:{outline:"none",...e.style},onMouseDown:(0,K.mK)(e.onMouseDown,()=>{j.current=!0}),onFocus:(0,K.mK)(e.onFocus,e=>{let t=!j.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(ec,eu);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=k().filter(e=>e.focusable);eN([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),p)}}j.current=!1}),onBlur:(0,K.mK)(e.onBlur,()=>b(!1))})})}),ew="RovingFocusGroupItem",ek=l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:o,...c}=e,u=(0,ea.B)(),d=i||u,p=ex(ew,r),h=p.currentTabStopId===d,m=eh(r),{onFocusableItemAdd:f,onFocusableItemRemove:g,currentTabStopId:v}=p;return l.useEffect(()=>{if(n)return f(),()=>g()},[n,f,g]),(0,s.jsx)(ep.ItemSlot,{scope:r,id:d,focusable:n,active:a,children:(0,s.jsx)(Z.sG.span,{tabIndex:h?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:(0,K.mK)(e.onMouseDown,e=>{n?p.onItemFocus(d):e.preventDefault()}),onFocus:(0,K.mK)(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:(0,K.mK)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let a=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(a))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(a)))return ej[a]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=m().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=p.loop?function(e,t){return e.map((r,n)=>e[(t+n)%e.length])}(r,n+1):r.slice(n+1)}setTimeout(()=>eN(r))}}),children:"function"==typeof o?o({isCurrentTabStop:h,hasTabStop:null!=v}):o})})});ek.displayName=ew;var ej={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function eN(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var eC=r(8730),eS=r(63376),eE=r(42247),eD=["Enter"," "],eM=["ArrowUp","PageDown","End"],eP=["ArrowDown","PageUp","Home",...eM],eT={ltr:[...eD,"ArrowRight"],rtl:[...eD,"ArrowLeft"]},eI={ltr:["ArrowLeft"],rtl:["ArrowRight"]},eA="Menu",[eR,eL,ez]=(0,Q.N)(eA),[eO,eF]=(0,J.A)(eA,[ez,ei.Bk,eg]),e_=(0,ei.Bk)(),eq=eg(),[eB,e$]=eO(eA),[eU,eH]=eO(eA),eV=e=>{let{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:i,modal:o=!0}=e,c=e_(t),[u,d]=l.useState(null),p=l.useRef(!1),h=(0,el.c)(i),m=(0,ee.jH)(a);return l.useEffect(()=>{let e=()=>{p.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,s.jsx)(ei.bL,{...c,children:(0,s.jsx)(eB,{scope:t,open:r,onOpenChange:h,content:u,onContentChange:d,children:(0,s.jsx)(eU,{scope:t,onClose:l.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:m,modal:o,children:n})})})};eV.displayName=eA;var eW=l.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,a=e_(r);return(0,s.jsx)(ei.Mz,{...a,...n,ref:t})});eW.displayName="MenuAnchor";var eG="MenuPortal",[eK,eY]=eO(eG,{forceMount:void 0}),eJ=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:a}=e,i=e$(eG,t);return(0,s.jsx)(eK,{scope:t,forceMount:r,children:(0,s.jsx)(es.C,{present:r||i.open,children:(0,s.jsx)(eo.Z,{asChild:!0,container:a,children:n})})})};eJ.displayName=eG;var eX="MenuContent",[eZ,eQ]=eO(eX),e0=l.forwardRef((e,t)=>{let r=eY(eX,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=e$(eX,e.__scopeMenu),o=eH(eX,e.__scopeMenu);return(0,s.jsx)(eR.Provider,{scope:e.__scopeMenu,children:(0,s.jsx)(es.C,{present:n||i.open,children:(0,s.jsx)(eR.Slot,{scope:e.__scopeMenu,children:o.modal?(0,s.jsx)(e1,{...a,ref:t}):(0,s.jsx)(e2,{...a,ref:t})})})})}),e1=l.forwardRef((e,t)=>{let r=e$(eX,e.__scopeMenu),n=l.useRef(null),a=(0,Y.s)(t,n);return l.useEffect(()=>{let e=n.current;if(e)return(0,eS.Eq)(e)},[]),(0,s.jsx)(e4,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:(0,K.mK)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),e2=l.forwardRef((e,t)=>{let r=e$(eX,e.__scopeMenu);return(0,s.jsx)(e4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),e3=(0,eC.TL)("MenuContent.ScrollLock"),e4=l.forwardRef((e,t)=>{let{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:m,onDismiss:f,disableOutsideScroll:g,...v}=e,x=e$(eX,r),y=eH(eX,r),b=e_(r),w=eq(r),k=eL(r),[j,N]=l.useState(null),C=l.useRef(null),S=(0,Y.s)(t,C,x.onContentChange),E=l.useRef(0),D=l.useRef(""),M=l.useRef(0),P=l.useRef(null),T=l.useRef("right"),I=l.useRef(0),A=g?eE.A:l.Fragment,R=e=>{let t=D.current+e,r=k().filter(e=>!e.disabled),n=document.activeElement,a=r.find(e=>e.ref.current===n)?.textValue,i=function(e,t,r){var n;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=r?e.indexOf(r):-1,o=(n=Math.max(i,0),e.map((t,r)=>e[(n+r)%e.length]));1===a.length&&(o=o.filter(e=>e!==r));let s=o.find(e=>e.toLowerCase().startsWith(a.toLowerCase()));return s!==r?s:void 0}(r.map(e=>e.textValue),t,a),o=r.find(e=>e.textValue===i)?.ref.current;!function e(t){D.current=t,window.clearTimeout(E.current),""!==t&&(E.current=window.setTimeout(()=>e(""),1e3))}(t),o&&setTimeout(()=>o.focus())};l.useEffect(()=>()=>window.clearTimeout(E.current),[]),(0,er.Oh)();let L=l.useCallback(e=>T.current===P.current?.side&&function(e,t){return!!t&&function(e,t){let{x:r,y:n}=e,a=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let o=t[e],s=t[i],l=o.x,c=o.y,u=s.x,d=s.y;c>n!=d>n&&r<(u-l)*(n-c)/(d-c)+l&&(a=!a)}return a}({x:e.clientX,y:e.clientY},t)}(e,P.current?.area),[]);return(0,s.jsx)(eZ,{scope:r,searchRef:D,onItemEnter:l.useCallback(e=>{L(e)&&e.preventDefault()},[L]),onItemLeave:l.useCallback(e=>{L(e)||(C.current?.focus(),N(null))},[L]),onTriggerLeave:l.useCallback(e=>{L(e)&&e.preventDefault()},[L]),pointerGraceTimerRef:M,onPointerGraceIntentChange:l.useCallback(e=>{P.current=e},[]),children:(0,s.jsx)(A,{...g?{as:e3,allowPinchZoom:!0}:void 0,children:(0,s.jsx)(en.n,{asChild:!0,trapped:a,onMountAutoFocus:(0,K.mK)(i,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,s.jsx)(et.qW,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:m,onDismiss:f,children:(0,s.jsx)(ey,{asChild:!0,...w,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:j,onCurrentTabStopIdChange:N,onEntryFocus:(0,K.mK)(u,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,s.jsx)(ei.UC,{role:"menu","aria-orientation":"vertical","data-state":tk(x.open),"data-radix-menu-content":"",dir:y.dir,...b,...v,ref:S,style:{outline:"none",...v.style},onKeyDown:(0,K.mK)(v.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&n&&R(e.key));let a=C.current;if(e.target!==a||!eP.includes(e.key))return;e.preventDefault();let i=k().filter(e=>!e.disabled).map(e=>e.ref.current);eM.includes(e.key)&&i.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(i)}),onBlur:(0,K.mK)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current="")}),onPointerMove:(0,K.mK)(e.onPointerMove,tC(e=>{let t=e.target,r=I.current!==e.clientX;e.currentTarget.contains(t)&&r&&(T.current=e.clientX>I.current?"right":"left",I.current=e.clientX)}))})})})})})})});e0.displayName=eX;var e5=l.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,s.jsx)(Z.sG.div,{role:"group",...n,ref:t})});e5.displayName="MenuGroup";var e6=l.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,s.jsx)(Z.sG.div,{...n,ref:t})});e6.displayName="MenuLabel";var e8="MenuItem",e9="menu.itemSelect",e7=l.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:n,...a}=e,i=l.useRef(null),o=eH(e8,e.__scopeMenu),c=eQ(e8,e.__scopeMenu),u=(0,Y.s)(t,i),d=l.useRef(!1);return(0,s.jsx)(te,{...a,ref:u,disabled:r,onClick:(0,K.mK)(e.onClick,()=>{let e=i.current;if(!r&&e){let t=new CustomEvent(e9,{bubbles:!0,cancelable:!0});e.addEventListener(e9,e=>n?.(e),{once:!0}),(0,Z.hO)(e,t),t.defaultPrevented?d.current=!1:o.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:(0,K.mK)(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:(0,K.mK)(e.onKeyDown,e=>{let t=""!==c.searchRef.current;r||t&&" "===e.key||eD.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});e7.displayName=e8;var te=l.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:n=!1,textValue:a,...i}=e,o=eQ(e8,r),c=eq(r),u=l.useRef(null),d=(0,Y.s)(t,u),[p,h]=l.useState(!1),[m,f]=l.useState("");return l.useEffect(()=>{let e=u.current;e&&f((e.textContent??"").trim())},[i.children]),(0,s.jsx)(eR.ItemSlot,{scope:r,disabled:n,textValue:a??m,children:(0,s.jsx)(ek,{asChild:!0,...c,focusable:!n,children:(0,s.jsx)(Z.sG.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:d,onPointerMove:(0,K.mK)(e.onPointerMove,tC(e=>{n?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,K.mK)(e.onPointerLeave,tC(e=>o.onItemLeave(e))),onFocus:(0,K.mK)(e.onFocus,()=>h(!0)),onBlur:(0,K.mK)(e.onBlur,()=>h(!1))})})})}),tt=l.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...a}=e;return(0,s.jsx)(tc,{scope:e.__scopeMenu,checked:r,children:(0,s.jsx)(e7,{role:"menuitemcheckbox","aria-checked":tj(r)?"mixed":r,...a,ref:t,"data-state":tN(r),onSelect:(0,K.mK)(a.onSelect,()=>n?.(!!tj(r)||!r),{checkForDefaultPrevented:!1})})})});tt.displayName="MenuCheckboxItem";var tr="MenuRadioGroup",[tn,ta]=eO(tr,{value:void 0,onValueChange:()=>{}}),ti=l.forwardRef((e,t)=>{let{value:r,onValueChange:n,...a}=e,i=(0,el.c)(n);return(0,s.jsx)(tn,{scope:e.__scopeMenu,value:r,onValueChange:i,children:(0,s.jsx)(e5,{...a,ref:t})})});ti.displayName=tr;var to="MenuRadioItem",ts=l.forwardRef((e,t)=>{let{value:r,...n}=e,a=ta(to,e.__scopeMenu),i=r===a.value;return(0,s.jsx)(tc,{scope:e.__scopeMenu,checked:i,children:(0,s.jsx)(e7,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":tN(i),onSelect:(0,K.mK)(n.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});ts.displayName=to;var tl="MenuItemIndicator",[tc,tu]=eO(tl,{checked:!1}),td=l.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...a}=e,i=tu(tl,r);return(0,s.jsx)(es.C,{present:n||tj(i.checked)||!0===i.checked,children:(0,s.jsx)(Z.sG.span,{...a,ref:t,"data-state":tN(i.checked)})})});td.displayName=tl;var tp=l.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,s.jsx)(Z.sG.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});tp.displayName="MenuSeparator";var th=l.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,a=e_(r);return(0,s.jsx)(ei.i3,{...a,...n,ref:t})});th.displayName="MenuArrow";var tm="MenuSub",[tf,tg]=eO(tm),tv=e=>{let{__scopeMenu:t,children:r,open:n=!1,onOpenChange:a}=e,i=e$(tm,t),o=e_(t),[c,u]=l.useState(null),[d,p]=l.useState(null),h=(0,el.c)(a);return l.useEffect(()=>(!1===i.open&&h(!1),()=>h(!1)),[i.open,h]),(0,s.jsx)(ei.bL,{...o,children:(0,s.jsx)(eB,{scope:t,open:n,onOpenChange:h,content:d,onContentChange:p,children:(0,s.jsx)(tf,{scope:t,contentId:(0,ea.B)(),triggerId:(0,ea.B)(),trigger:c,onTriggerChange:u,children:r})})})};tv.displayName=tm;var tx="MenuSubTrigger",ty=l.forwardRef((e,t)=>{let r=e$(tx,e.__scopeMenu),n=eH(tx,e.__scopeMenu),a=tg(tx,e.__scopeMenu),i=eQ(tx,e.__scopeMenu),o=l.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=i,d={__scopeMenu:e.__scopeMenu},p=l.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return l.useEffect(()=>p,[p]),l.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),u(null)}},[c,u]),(0,s.jsx)(eW,{asChild:!0,...d,children:(0,s.jsx)(te,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":tk(r.open),...e,ref:(0,Y.t)(t,a.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:(0,K.mK)(e.onPointerMove,tC(t=>{i.onItemEnter(t),!t.defaultPrevented&&(e.disabled||r.open||o.current||(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),p()},100)))})),onPointerLeave:(0,K.mK)(e.onPointerLeave,tC(e=>{p();let t=r.content?.getBoundingClientRect();if(t){let n=r.content?.dataset.side,a="right"===n,o=t[a?"left":"right"],s=t[a?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:o,y:t.top},{x:s,y:t.top},{x:s,y:t.bottom},{x:o,y:t.bottom}],side:n}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:(0,K.mK)(e.onKeyDown,t=>{let a=""!==i.searchRef.current;e.disabled||a&&" "===t.key||eT[n.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())})})})});ty.displayName=tx;var tb="MenuSubContent",tw=l.forwardRef((e,t)=>{let r=eY(eX,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=e$(eX,e.__scopeMenu),o=eH(eX,e.__scopeMenu),c=tg(tb,e.__scopeMenu),u=l.useRef(null),d=(0,Y.s)(t,u);return(0,s.jsx)(eR.Provider,{scope:e.__scopeMenu,children:(0,s.jsx)(es.C,{present:n||i.open,children:(0,s.jsx)(eR.Slot,{scope:e.__scopeMenu,children:(0,s.jsx)(e4,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:d,align:"start",side:"rtl"===o.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,K.mK)(e.onFocusOutside,e=>{e.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:(0,K.mK)(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:(0,K.mK)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=eI[o.dir].includes(e.key);t&&r&&(i.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function tk(e){return e?"open":"closed"}function tj(e){return"indeterminate"===e}function tN(e){return tj(e)?"indeterminate":e?"checked":"unchecked"}function tC(e){return t=>"mouse"===t.pointerType?e(t):void 0}tw.displayName=tb;var tS="DropdownMenu",[tE,tD]=(0,J.A)(tS,[eF]),tM=eF(),[tP,tT]=tE(tS),tI=e=>{let{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:i,onOpenChange:o,modal:c=!0}=e,u=tM(t),d=l.useRef(null),[p,h]=(0,X.i)({prop:a,defaultProp:i??!1,onChange:o,caller:tS});return(0,s.jsx)(tP,{scope:t,triggerId:(0,ea.B)(),triggerRef:d,contentId:(0,ea.B)(),open:p,onOpenChange:h,onOpenToggle:l.useCallback(()=>h(e=>!e),[h]),modal:c,children:(0,s.jsx)(eV,{...u,open:p,onOpenChange:h,dir:n,modal:c,children:r})})};tI.displayName=tS;var tA="DropdownMenuTrigger",tR=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,i=tT(tA,r),o=tM(r);return(0,s.jsx)(eW,{asChild:!0,...o,children:(0,s.jsx)(Z.sG.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:(0,Y.t)(t,i.triggerRef),onPointerDown:(0,K.mK)(e.onPointerDown,e=>{!n&&0===e.button&&!1===e.ctrlKey&&(i.onOpenToggle(),i.open||e.preventDefault())}),onKeyDown:(0,K.mK)(e.onKeyDown,e=>{!n&&(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});tR.displayName=tA;var tL=e=>{let{__scopeDropdownMenu:t,...r}=e,n=tM(t);return(0,s.jsx)(eJ,{...n,...r})};tL.displayName="DropdownMenuPortal";var tz="DropdownMenuContent",tO=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tT(tz,r),i=tM(r),o=l.useRef(!1);return(0,s.jsx)(e0,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...n,ref:t,onCloseAutoFocus:(0,K.mK)(e.onCloseAutoFocus,e=>{o.current||a.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:(0,K.mK)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;(!a.modal||n)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});tO.displayName=tz,l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(e5,{...a,...n,ref:t})}).displayName="DropdownMenuGroup",l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(e6,{...a,...n,ref:t})}).displayName="DropdownMenuLabel";var tF=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(e7,{...a,...n,ref:t})});tF.displayName="DropdownMenuItem",l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(tt,{...a,...n,ref:t})}).displayName="DropdownMenuCheckboxItem",l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(ti,{...a,...n,ref:t})}).displayName="DropdownMenuRadioGroup",l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(ts,{...a,...n,ref:t})}).displayName="DropdownMenuRadioItem",l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(td,{...a,...n,ref:t})}).displayName="DropdownMenuItemIndicator";var t_=l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(tp,{...a,...n,ref:t})});function tq({...e}){return(0,s.jsx)(tI,{"data-slot":"dropdown-menu",...e})}function tB({...e}){return(0,s.jsx)(tR,{"data-slot":"dropdown-menu-trigger",...e})}function t$({className:e,sideOffset:t=4,...r}){return(0,s.jsx)(tL,{children:(0,s.jsx)(tO,{"data-slot":"dropdown-menu-content",sideOffset:t,className:(0,h.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-40 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-lg",e),...r})})}function tU({className:e,inset:t,variant:r="default",...n}){return(0,s.jsx)(tF,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:(0,h.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function tH({className:e,...t}){return(0,s.jsx)(t_,{"data-slot":"dropdown-menu-separator",className:(0,h.cn)("bg-border -mx-1 my-1 h-px",e),...t})}t_.displayName="DropdownMenuSeparator",l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(th,{...a,...n,ref:t})}).displayName="DropdownMenuArrow",l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(ty,{...a,...n,ref:t})}).displayName="DropdownMenuSubTrigger",l.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=tM(r);return(0,s.jsx)(tw,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}).displayName="DropdownMenuSubContent";var tV=r(52581);function tW({project:e,onSelect:t,onDelete:r,onExport:n,onExportZip:a,onDuplicate:i,onPreview:o,onUpdate:c,viewMode:u="grid",forceMenuOpen:d=!1,highlightExport:v=!1}){let[A,R]=(0,l.useState)(!1),[L,z]=(0,l.useState)(e.name),[O,F]=(0,l.useState)(e.description||""),[_,q]=(0,l.useState)(null),[B,$]=(0,l.useState)(!0),[U,H]=(0,l.useState)(!1),V=async()=>{if(!L.trim()){tV.oR.error("Project name cannot be empty"),z(e.name),R(!1);return}if(L.length>50)return void tV.oR.error("Project name must be 50 characters or less");if(O.length>200)return void tV.oR.error("Description must be 200 characters or less");try{e.name=L.trim(),e.description=O.trim()||void 0,await p.OP.updateProject(e),c(e),R(!1),tV.oR.success("Project updated")}catch(t){h.v.error("Failed to update project:",t),tV.oR.error("Failed to update project"),z(e.name),F(e.description||"")}},W=()=>{z(e.name),F(e.description||""),R(!1)},K=e=>{if(d)return void H(!0);H(e)},Y=()=>_?Object.entries(_.fileTypes).sort(([,e],[,t])=>t-e).slice(0,3):[],J=e=>{let t=e.toLowerCase();return["html","htm"].includes(t)?(0,s.jsx)(x,{className:"h-3 w-3"}):["css","scss","sass"].includes(t)?(0,s.jsx)(y,{className:"h-3 w-3"}):["js","jsx","ts","tsx"].includes(t)?(0,s.jsx)(x,{className:"h-3 w-3"}):["png","jpg","jpeg","gif","svg"].includes(t)?(0,s.jsx)(b,{className:"h-3 w-3"}):(0,s.jsx)(y,{className:"h-3 w-3"})},X=e=>e&&0!==e?`$${e.toFixed(2)}`:null;return"list"===u?(0,s.jsx)("div",{className:`border border-border rounded-lg p-4 hover:shadow-md transition-all cursor-pointer hover:border-primary/50 ${v?"ring-2 ring-primary/70 animate-ring-opacity":""}`,style:{background:"linear-gradient(var(--project-card-tint), var(--project-card-tint)), var(--card)"},onClick:()=>t(e),children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[A?(0,s.jsxs)("div",{className:"flex items-center gap-2",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(f.p,{value:L,onChange:e=>z(e.target.value),onKeyDown:e=>{"Enter"===e.key&&V(),"Escape"===e.key&&W()},className:"h-7 text-sm",autoFocus:!0,maxLength:50}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:[L.length,"/50"]}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:V,children:(0,s.jsx)(w.A,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:W,children:(0,s.jsx)(k.A,{className:"h-3 w-3"})})]}):(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("h3",{className:"font-semibold truncate",children:e.name}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5 opacity-0 group-hover:opacity-100",onClick:e=>{e.stopPropagation(),R(!0)},children:(0,s.jsx)(j,{className:"h-3 w-3"})})]}),e.description&&!A&&(0,s.jsx)("span",{className:"text-sm text-muted-foreground truncate max-w-md",children:e.description})]})}),(0,s.jsxs)("div",{className:"flex items-center gap-4 ml-4",children:[_&&(0,s.jsxs)("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(N,{className:"h-4 w-4"}),_.fileCount," files"]}),(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(C,{className:"h-4 w-4"}),_.formattedSize]}),e.costTracking?.totalCost&&(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(S,{className:"h-4 w-4"}),X(e.costTracking.totalCost)]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:G(e.updatedAt,{addSuffix:!0})}),(0,s.jsxs)(tq,{open:!!d||U,onOpenChange:K,children:[(0,s.jsx)(tB,{asChild:!0,onClick:e=>e.stopPropagation(),"data-tour-id":v?"project-actions-trigger":void 0,children:(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-8 w-8",children:(0,s.jsx)(E,{className:"h-4 w-4"})})}),(0,s.jsxs)(t$,{align:"end",children:[(0,s.jsxs)(tU,{onClick:t=>{t.stopPropagation(),o(e)},children:[(0,s.jsx)(D.A,{className:"mr-2 h-4 w-4"}),"Preview"]}),(0,s.jsxs)(tU,{onClick:t=>{t.stopPropagation(),i(e)},children:[(0,s.jsx)(M,{className:"mr-2 h-4 w-4"}),"Duplicate"]}),(0,s.jsx)(tH,{}),(0,s.jsxs)(tU,{onClick:t=>{t.stopPropagation(),a(e)},children:[(0,s.jsx)(P,{className:"mr-2 h-4 w-4"}),"Export as ZIP"]}),(0,s.jsxs)(tU,{onClick:t=>{t.stopPropagation(),n(e)},"data-tour-id":v?"project-export-json":void 0,children:[(0,s.jsx)(T,{className:"mr-2 h-4 w-4"}),"Export as JSON"]}),(0,s.jsx)(tH,{}),(0,s.jsxs)(tU,{className:"text-destructive",onClick:t=>{t.stopPropagation(),r(e)},children:[(0,s.jsx)(I,{className:"mr-2 h-4 w-4"}),"Delete"]})]})]})]})]})]})}):(0,s.jsx)("div",{className:`border border-border rounded-lg p-4 hover:shadow-lg transition-all cursor-pointer hover:border-primary/50 group ${v?"ring-2 ring-primary/70 animate-ring-opacity":""}`,style:{background:"linear-gradient(var(--project-card-tint), var(--project-card-tint)), var(--card)"},onClick:()=>t(e),"data-tour-id":"project-card",children:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex justify-between items-start",children:[A?(0,s.jsxs)("div",{className:"flex-1",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(f.p,{value:L,onChange:e=>z(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!1===e.shiftKey&&(e.preventDefault(),V()),"Escape"===e.key&&W()},className:"h-8 text-sm font-semibold",autoFocus:!0,maxLength:50}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:V,children:(0,s.jsx)(w.A,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:W,children:(0,s.jsx)(k.A,{className:"h-3 w-3"})})]}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground mt-1",children:[L.length,"/50"]})]}):(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-1",children:[(0,s.jsx)("h3",{className:"font-semibold text-lg truncate flex-1",children:e.name}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5 opacity-0 group-hover:opacity-100 transition-opacity",onClick:e=>{e.stopPropagation(),R(!0)},children:(0,s.jsx)(j,{className:"h-3 w-3"})})]}),(0,s.jsxs)(tq,{open:!!d||U,onOpenChange:K,children:[(0,s.jsx)(tB,{asChild:!0,onClick:e=>e.stopPropagation(),"data-tour-id":v?"project-actions-trigger":void 0,children:(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-8 w-8",children:(0,s.jsx)(E,{className:"h-4 w-4"})})}),(0,s.jsxs)(t$,{align:"end",children:[(0,s.jsxs)(tU,{onClick:t=>{t.stopPropagation(),o(e)},children:[(0,s.jsx)(D.A,{className:"mr-2 h-4 w-4"}),"Preview"]}),(0,s.jsxs)(tU,{onClick:t=>{t.stopPropagation(),i(e)},children:[(0,s.jsx)(M,{className:"mr-2 h-4 w-4"}),"Duplicate"]}),(0,s.jsx)(tH,{}),(0,s.jsxs)(tU,{onClick:t=>{t.stopPropagation(),a(e)},children:[(0,s.jsx)(P,{className:"mr-2 h-4 w-4"}),"Export as ZIP"]}),(0,s.jsxs)(tU,{onClick:t=>{t.stopPropagation(),n(e)},"data-tour-id":v?"project-export-json":void 0,children:[(0,s.jsx)(T,{className:"mr-2 h-4 w-4"}),"Export as JSON"]}),(0,s.jsx)(tH,{}),(0,s.jsxs)(tU,{className:"text-destructive",onClick:t=>{t.stopPropagation(),r(e)},children:[(0,s.jsx)(I,{className:"mr-2 h-4 w-4"}),"Delete"]})]})]})]}),A?(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(g,{value:O,onChange:e=>F(e.target.value),onKeyDown:e=>{"Escape"===e.key&&W()},placeholder:"Add a description...",className:"min-h-[60px] text-sm resize-none",maxLength:200}),(0,s.jsx)("div",{className:"flex items-center justify-between mt-1",children:(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:[O.length,"/200"]})})]}):(0,s.jsx)("div",{className:"min-h-[40px]",children:e.description?(0,s.jsx)("p",{className:"text-sm text-muted-foreground line-clamp-2",children:e.description}):(0,s.jsx)("p",{className:"text-sm text-muted-foreground/50 italic",children:"No description"})}),B?(0,s.jsx)("div",{className:"h-6 bg-muted animate-pulse rounded"}):_&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground pt-2 border-t",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(N,{className:"h-4 w-4"}),_.fileCount," ",1===_.fileCount?"file":"files"]}),(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(C,{className:"h-4 w-4"}),_.formattedSize]}),e.costTracking?.totalCost&&e.costTracking.totalCost>0&&(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(S,{className:"h-4 w-4"}),X(e.costTracking.totalCost)]})]}),Y().length>0&&(0,s.jsx)("div",{className:"flex items-center gap-3 text-xs",children:Y().map(([e,t])=>(0,s.jsxs)("div",{className:"flex items-center gap-1 text-muted-foreground",children:[J(e),(0,s.jsxs)("span",{children:[e," (",t,")"]})]},e))})]}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground pt-2 border-t",children:(0,s.jsxs)("p",{children:["Updated ",G(e.updatedAt,{addSuffix:!0})]})})]})})}var tG=r(22106),tK=r(78122);let tY=(0,v.A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),tJ=(0,v.A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),tX=(0,v.A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]),tZ=(0,v.A)("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]),tQ=(0,v.A)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),t0=(0,v.A)("tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]),t1=(0,v.A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var t2=r(63974);let t3={mobile:{width:"375px",height:"100%",maxHeight:"667px"},tablet:{width:"768px",height:"100%",maxHeight:"1024px"},desktop:{width:"100%",height:"100%",maxHeight:"900px",maxWidth:"1440px"},responsive:{width:"100%",height:"100%"}};function t4({projectId:e,refreshTrigger:t,onFocusSelection:r,hasFocusTarget:n=!1,onClose:a}){let[i,o]=(0,l.useState)(null),[c,u]=(0,l.useState)("/"),[d,f]=(0,l.useState)(!0),[g,v]=(0,l.useState)(null),[x,y]=(0,l.useState)("tablet"),[b,w]=(0,l.useState)(["/"]),[j,N]=(0,l.useState)(0),[C,S]=(0,l.useState)(!1),[E,M]=(0,l.useState)(!1),P=(0,l.useRef)(null),T=(0,l.useRef)(null),I=(0,l.useRef)(null),A=(0,l.useRef)("/"),R=(0,l.useRef)(null),L=(0,l.useRef)(!1),z=(0,l.useCallback)(e=>{if(P.current&&P.current.contentWindow)try{P.current.contentWindow.postMessage(e,"*")}catch(e){h.v.warn("Failed to communicate with preview iframe",e)}},[]),O=(0,l.useRef)(!1),F=(0,l.useRef)(null),_=(0,l.useRef)(null),q=(0,l.useRef)(null),B=()=>(0,s.jsxs)("div",{className:"p-3 border-b bg-muted/70 flex items-center gap-2",children:[(0,s.jsx)(D.A,{className:"h-4 w-4 md:hidden",style:{color:"var(--button-preview-active)"}}),a?(0,s.jsxs)("button",{type:"button",onClick:a,"aria-label":"Hide preview",className:"relative hidden h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-destructive md:flex group",children:[(0,s.jsx)(D.A,{className:"h-4 w-4 transition-opacity group-hover:opacity-0",style:{color:"var(--button-preview-active)"}}),(0,s.jsx)(k.A,{className:"absolute h-3 w-3 opacity-0 transition-opacity group-hover:opacity-100"})]}):(0,s.jsx)(D.A,{className:"hidden h-4 w-4 md:inline-flex",style:{color:"var(--button-preview-active)"}}),(0,s.jsx)("h3",{className:"text-sm font-medium",children:"Live Preview"})]}),$=(0,l.useCallback)(async(t=!1,r=!0)=>{r&&f(!0),v(null);try{await p.OP.init();let r=t?A.current:null;T.current&&T.current.cleanupBlobUrls();let n=new tG.B(p.OP,e);T.current=n;let a=await n.compileProject();o(a),I.current=a;let i=r;i||(i=a.blobUrls.has("/index.html")?"/":a.entryPoint||(a.routes.length>0?a.routes[0].path:"/")),H(i,a)}catch(e){v(e instanceof Error?e.message:"Failed to compile project"),h.v.error("Compilation error:",e)}finally{r&&f(!1)}},[e]),U=(0,l.useCallback)((e=!1,t=!0)=>{if(O.current){let r=F.current;F.current={preserve:(r?.preserve??!1)||e,showLoading:(r?.showLoading??!1)||t};return}(async(e,t)=>{O.current=!0;try{await $(e,t)}finally{O.current=!1;let e=F.current;F.current=null,e&&U(e.preserve,e.showLoading)}})(e,t)},[$]);(0,l.useCallback)((e=!1,t=!1)=>{let r=q.current;q.current={preserve:(r?.preserve??!1)||e,showLoading:(r?.showLoading??!1)||t},_.current&&window.clearTimeout(_.current),_.current=window.setTimeout(()=>{let e=q.current;q.current=null,_.current=null,e&&U(e.preserve,e.showLoading)},150)},[U]);let H=(e,t)=>{let r,n=t||I.current||i;if(!n)return void h.v.warn("No compiled project available");if(L.current?M(!1):z({type:"selector-toggle",active:!1}),!P.current||!C){R.current=e;return}let a=e;a.startsWith("/")||(a="/"+a);let o=n.routes.find(e=>e.path===a);r=o?o.file:"/"===a?"/index.html":a+".html";let s=n.files.find(e=>e.path===r);if(!s){v(`Page not found: ${e}`),n.files.find(e=>"/index.html"===e.path||"index.html"===e.path)&&"/"!==e&&H("/",t);return}let l="string"==typeof s.content?s.content:new TextDecoder().decode(s.content);l=(l=(l=l.replace(/href="([^"]+)"/g,(e,t)=>{if(!t.endsWith(".css")||t.startsWith("http")||t.startsWith("//"))return e;let r=t.startsWith("/")?t:"/"+t,a=n.blobUrls.get(r);return a?`href="${a}"`:e})).replace(/src="([^"]+)"/g,(e,t)=>{if(!t.endsWith(".js")||t.startsWith("http")||t.startsWith("//"))return e;let r=t.startsWith("/")?t:"/"+t,a=n.blobUrls.get(r);return a?`src="${a}"`:e})).replace(/src="([^"]+\.(png|jpg|jpeg|gif|svg|webp))"/gi,(e,t)=>{let r=t.startsWith("/")?t:"/"+t,a=n.blobUrls.get(r);return a?`src="${a}"`:e});let c=` | |
| <script> | |
| (function() { | |
| const isInIframe = window !== window.parent; | |
| function resolveInternalPath(href) { | |
| let path = href; | |
| if (!path.startsWith('/')) { | |
| const currentPath = '${a}'; | |
| const currentDir = currentPath.substring(0, currentPath.lastIndexOf('/')); | |
| path = currentDir + '/' + path; | |
| } | |
| if (path.endsWith('.html')) { | |
| path = path.slice(0, -5); | |
| } | |
| if (path === '/index') { | |
| path = '/'; | |
| } | |
| return path; | |
| } | |
| document.addEventListener('click', function(e) { | |
| const target = e.target && e.target.closest ? e.target.closest('a') : null; | |
| if (target && target.getAttribute) { | |
| const href = target.getAttribute('href'); | |
| if (!href) { | |
| return; | |
| } | |
| if (href.startsWith('#')) { | |
| e.preventDefault(); | |
| const targetId = href.substring(1); | |
| const targetElement = document.getElementById(targetId); | |
| if (targetElement) { | |
| targetElement.scrollIntoView({ behavior: 'smooth', block: 'start' }); | |
| } | |
| return; | |
| } | |
| const isExternal = href.startsWith('http://') || href.startsWith('https://') || href.startsWith('//'); | |
| if (!isExternal) { | |
| if (isInIframe) { | |
| e.preventDefault(); | |
| window.parent.postMessage({ | |
| type: 'navigate', | |
| path: resolveInternalPath(href) | |
| }, '*'); | |
| } | |
| } else { | |
| e.preventDefault(); | |
| window.open(href, '_blank'); | |
| } | |
| } | |
| }); | |
| const selectorState = { | |
| active: false, | |
| overlay: null, | |
| lastTarget: null, | |
| previousCursor: '' | |
| }; | |
| function isElement(node) { | |
| return node && node.nodeType === 1; | |
| } | |
| function ensureOverlay() { | |
| if (selectorState.overlay) { | |
| return selectorState.overlay; | |
| } | |
| const overlay = document.createElement('div'); | |
| overlay.style.position = 'absolute'; | |
| overlay.style.pointerEvents = 'none'; | |
| overlay.style.border = '2px solid rgba(99, 102, 241, 0.95)'; | |
| overlay.style.background = 'rgba(99, 102, 241, 0.08)'; | |
| overlay.style.boxShadow = '0 0 0 4px rgba(99, 102, 241, 0.32), 0 20px 40px rgba(15, 23, 42, 0.28)'; | |
| overlay.style.borderRadius = '12px'; | |
| overlay.style.zIndex = '2147483647'; | |
| overlay.style.transition = 'top 0.12s ease-out, left 0.12s ease-out, width 0.12s ease-out, height 0.12s ease-out'; | |
| overlay.style.willChange = 'top, left, width, height'; | |
| selectorState.overlay = overlay; | |
| document.body.appendChild(overlay); | |
| return overlay; | |
| } | |
| function positionOverlay(target) { | |
| if (!isElement(target)) { | |
| return; | |
| } | |
| const overlay = ensureOverlay(); | |
| const rect = target.getBoundingClientRect(); | |
| overlay.style.top = (rect.top + window.scrollY) + 'px'; | |
| overlay.style.left = (rect.left + window.scrollX) + 'px'; | |
| overlay.style.width = Math.max(rect.width, 1) + 'px'; | |
| overlay.style.height = Math.max(rect.height, 1) + 'px'; | |
| overlay.style.opacity = '1'; | |
| } | |
| function clearOverlay() { | |
| if (selectorState.overlay && selectorState.overlay.parentElement) { | |
| selectorState.overlay.parentElement.removeChild(selectorState.overlay); | |
| } | |
| selectorState.overlay = null; | |
| } | |
| function buildDomPath(element) { | |
| if (!isElement(element)) { | |
| return ''; | |
| } | |
| const segments = []; | |
| let current = element; | |
| while (current && current.nodeType === 1) { | |
| let segment = current.tagName.toLowerCase(); | |
| if (current.id) { | |
| segment += '#' + current.id; | |
| segments.unshift(segment); | |
| break; | |
| } | |
| const parent = current.parentElement; | |
| if (parent) { | |
| const siblings = parent.children; | |
| let index = 0; | |
| for (let i = 0; i < siblings.length; i++) { | |
| if (siblings[i].tagName === current.tagName) { | |
| index++; | |
| } | |
| if (siblings[i] === current) { | |
| if (index > 1) { | |
| segment += ':nth-of-type(' + index + ')'; | |
| } else { | |
| const hasSame = Array.from(siblings).some(function(child, childIndex) { | |
| return childIndex !== i && child.tagName === current.tagName; | |
| }); | |
| if (hasSame) { | |
| segment += ':nth-of-type(' + index + ')'; | |
| } | |
| } | |
| break; | |
| } | |
| } | |
| } | |
| segments.unshift(segment); | |
| current = parent; | |
| } | |
| return segments.join(' > '); | |
| } | |
| function gatherAttributes(element) { | |
| const attributes = {}; | |
| if (!isElement(element) || !element.attributes) { | |
| return attributes; | |
| } | |
| const maxAttributes = 25; | |
| for (let i = 0; i < element.attributes.length && i < maxAttributes; i++) { | |
| const attr = element.attributes[i]; | |
| if (!attr) continue; | |
| const name = attr.name; | |
| if (!name || name === 'style' || name.startsWith('on')) { | |
| continue; | |
| } | |
| attributes[name] = attr.value; | |
| } | |
| return attributes; | |
| } | |
| function handleMouseMove(event) { | |
| if (!selectorState.active) { | |
| return; | |
| } | |
| const target = isElement(event.target) ? event.target : (event.target && event.target.parentElement); | |
| if (!isElement(target) || target === selectorState.lastTarget) { | |
| return; | |
| } | |
| selectorState.lastTarget = target; | |
| positionOverlay(target); | |
| } | |
| function handleClick(event) { | |
| if (!selectorState.active) { | |
| return; | |
| } | |
| event.preventDefault(); | |
| event.stopPropagation(); | |
| if (typeof event.stopImmediatePropagation === 'function') { | |
| event.stopImmediatePropagation(); | |
| } | |
| const target = isElement(event.target) ? event.target : (event.target && event.target.parentElement); | |
| if (!isElement(target)) { | |
| disableSelector(false); | |
| return; | |
| } | |
| const payload = { | |
| domPath: buildDomPath(target), | |
| tagName: target.tagName.toLowerCase(), | |
| attributes: gatherAttributes(target), | |
| outerHTML: target.outerHTML || '' | |
| }; | |
| if (isInIframe) { | |
| window.parent.postMessage({ type: 'selector-selection', payload: payload }, '*'); | |
| } | |
| disableSelector(false); | |
| } | |
| function handleContextMenu(event) { | |
| if (!selectorState.active) { | |
| return; | |
| } | |
| event.preventDefault(); | |
| event.stopPropagation(); | |
| } | |
| function handleKeyDown(event) { | |
| if (!selectorState.active) { | |
| return; | |
| } | |
| if (event.key === 'Escape') { | |
| event.preventDefault(); | |
| disableSelector(true); | |
| } | |
| } | |
| function enableSelector() { | |
| if (selectorState.active) { | |
| return; | |
| } | |
| selectorState.active = true; | |
| selectorState.previousCursor = document.body.style.cursor; | |
| const overlay = ensureOverlay(); | |
| overlay.style.opacity = '0'; | |
| document.body.style.cursor = 'crosshair'; | |
| document.addEventListener('mousemove', handleMouseMove, true); | |
| document.addEventListener('click', handleClick, true); | |
| document.addEventListener('contextmenu', handleContextMenu, true); | |
| document.addEventListener('keydown', handleKeyDown, true); | |
| } | |
| function disableSelector(notifyCancel) { | |
| if (!selectorState.active) { | |
| return; | |
| } | |
| selectorState.active = false; | |
| selectorState.lastTarget = null; | |
| if (selectorState.overlay) { | |
| selectorState.overlay.style.opacity = '0'; | |
| window.setTimeout(clearOverlay, 120); | |
| } else { | |
| clearOverlay(); | |
| } | |
| document.body.style.cursor = selectorState.previousCursor || ''; | |
| document.removeEventListener('mousemove', handleMouseMove, true); | |
| document.removeEventListener('click', handleClick, true); | |
| document.removeEventListener('contextmenu', handleContextMenu, true); | |
| document.removeEventListener('keydown', handleKeyDown, true); | |
| if (notifyCancel && isInIframe) { | |
| window.parent.postMessage({ type: 'selector-cancelled' }, '*'); | |
| } | |
| } | |
| window.addEventListener('message', function(event) { | |
| const data = event.data; | |
| if (!data || typeof data !== 'object') { | |
| return; | |
| } | |
| if (data.type === 'selector-toggle') { | |
| if (data.active) { | |
| enableSelector(); | |
| } else { | |
| disableSelector(false); | |
| } | |
| } | |
| }); | |
| })(); | |
| </script> | |
| `;l.includes("</body>")?l=l.replace("</body>",c+"</body>"):l+=c,P.current.srcdoc=l,u(a),A.current=a,N(e=>(w(t=>[...t.slice(0,e+1),a]),e+1))},V=(0,l.useCallback)(e=>{H(e)},[i]),W=()=>{if(j>0){let e=j-1;N(e),H(b[e])}},G=()=>{if(j<b.length-1){let e=j+1;N(e),H(b[e])}},K=()=>{H("/")},Y=()=>{U(!0,!1)};return d?(0,s.jsxs)("div",{className:"h-full flex flex-col",children:[(0,s.jsx)(B,{}),(0,s.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,s.jsxs)("div",{className:"text-center space-y-2",children:[(0,s.jsx)(tK.A,{className:"w-8 h-8 animate-spin mx-auto text-primary"}),(0,s.jsx)("p",{className:"text-muted-foreground",children:"Compiling project..."})]})})]}):g?(0,s.jsxs)("div",{className:"h-full flex flex-col",children:[(0,s.jsx)(B,{}),(0,s.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,s.jsxs)("div",{className:"text-center text-destructive space-y-2",children:[(0,s.jsx)("p",{className:"font-medium",children:"Error"}),(0,s.jsx)("p",{className:"text-sm mt-2",children:g}),(0,s.jsx)(m.$,{onClick:Y,className:"mt-4",children:"Try Again"})]})})]}):(0,s.jsxs)("div",{className:"h-full flex flex-col",children:[(0,s.jsx)(B,{}),(0,s.jsxs)("div",{className:"border-b p-2 flex items-center gap-2 md:hidden",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:W,disabled:0===j,children:(0,s.jsx)(tY,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:G,disabled:j>=b.length-1,children:(0,s.jsx)(tJ,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:K,children:(0,s.jsx)(tX,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:Y,children:(0,s.jsx)(tK.A,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:()=>M(e=>!e),disabled:!C,style:E?{backgroundColor:"var(--button-preview-active)",color:"white"}:n?{backgroundColor:"rgba(99, 102, 241, 0.12)",color:"var(--button-preview-active)"}:{},title:E?"Cancel element selection":n?"Replace focused element":"Select element","data-tour-id":"focus-crosshair-button",children:(0,s.jsx)(tZ,{className:"h-3 w-3"})})]}),i&&i.routes.length>1&&(0,s.jsxs)(t2.l6,{value:c,onValueChange:V,children:[(0,s.jsx)(t2.bq,{className:"flex-1 h-8 min-w-0 max-w-full",children:(0,s.jsx)(t2.yv,{className:"truncate"})}),(0,s.jsx)(t2.gC,{children:i.routes.map(e=>(0,s.jsx)(t2.eb,{value:e.path,children:e.title||e.path},e.path))})]})]}),(0,s.jsxs)("div",{className:"border-b p-2 hidden md:flex items-center gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:W,disabled:0===j,children:(0,s.jsx)(tY,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:G,disabled:j>=b.length-1,children:(0,s.jsx)(tJ,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:K,children:(0,s.jsx)(tX,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:Y,children:(0,s.jsx)(tK.A,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:()=>M(e=>!e),disabled:!C,style:{backgroundColor:E?"var(--button-preview-active)":void 0,color:E?"white":void 0},title:E?"Cancel element focus":"Select element","data-tour-id":"focus-crosshair-button",children:(0,s.jsx)(tZ,{className:"h-3 w-3"})})]}),(0,s.jsx)("div",{className:"flex-1 px-3 py-1 bg-muted rounded text-sm",children:c}),i&&i.routes.length>1&&(0,s.jsxs)(t2.l6,{value:c,onValueChange:V,children:[(0,s.jsx)(t2.bq,{className:"w-[200px] h-8",children:(0,s.jsx)(t2.yv,{})}),(0,s.jsx)(t2.gC,{children:i.routes.map(e=>(0,s.jsx)(t2.eb,{value:e.path,children:e.title||e.path},e.path))})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 border-l pl-2",children:[(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5 rounded-sm",style:{backgroundColor:"mobile"===x?"var(--button-preview-active)":void 0,color:"mobile"===x?"white":void 0},onClick:()=>y("mobile"),children:(0,s.jsx)(tQ,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5 rounded-sm",style:{backgroundColor:"tablet"===x?"var(--button-preview-active)":void 0,color:"tablet"===x?"white":void 0},onClick:()=>y("tablet"),children:(0,s.jsx)(t0,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5 rounded-sm",style:{backgroundColor:"desktop"===x?"var(--button-preview-active)":void 0,color:"desktop"===x?"white":void 0},onClick:()=>y("desktop"),children:(0,s.jsx)(t1,{className:"h-3 w-3"})})]})]}),(0,s.jsx)("div",{className:"flex-1 bg-muted/20 dark:bg-muted/10 p-4 overflow-auto min-h-0",children:(0,s.jsx)("div",{className:(0,h.cn)("bg-white mx-auto shadow-2xl transition-all duration-300","responsive"!==x&&"rounded-lg"),style:{width:t3[x].width||"100%",height:t3[x].height||"100%",maxHeight:t3[x].maxHeight||"100%",maxWidth:t3[x].maxWidth||"100%"},children:(0,s.jsx)("iframe",{ref:e=>{P.current=e,e&&!C?setTimeout(()=>{S(!0)},0):!e&&C&&S(!1)},className:"w-full h-full rounded-lg",sandbox:"allow-scripts allow-same-origin allow-forms",title:"Preview"})})})]})}let t5={rE:"1.11.1"};var t6="Dialog",[t8,t9]=(0,J.A)(t6),[t7,re]=t8(t6),rt=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,c=l.useRef(null),u=l.useRef(null),[d,p]=(0,X.i)({prop:n,defaultProp:a??!1,onChange:i,caller:t6});return(0,s.jsx)(t7,{scope:t,triggerRef:c,contentRef:u,contentId:(0,ea.B)(),titleId:(0,ea.B)(),descriptionId:(0,ea.B)(),open:d,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(e=>!e),[p]),modal:o,children:r})};rt.displayName=t6;var rr="DialogTrigger";l.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=re(rr,r),i=(0,Y.s)(t,a.triggerRef);return(0,s.jsx)(Z.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":rk(a.open),...n,ref:i,onClick:(0,K.mK)(e.onClick,a.onOpenToggle)})}).displayName=rr;var rn="DialogPortal",[ra,ri]=t8(rn,{forceMount:void 0}),ro=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:a}=e,i=re(rn,t);return(0,s.jsx)(ra,{scope:t,forceMount:r,children:l.Children.map(n,e=>(0,s.jsx)(es.C,{present:r||i.open,children:(0,s.jsx)(eo.Z,{asChild:!0,container:a,children:e})}))})};ro.displayName=rn;var rs="DialogOverlay",rl=l.forwardRef((e,t)=>{let r=ri(rs,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=re(rs,e.__scopeDialog);return i.modal?(0,s.jsx)(es.C,{present:n||i.open,children:(0,s.jsx)(ru,{...a,ref:t})}):null});rl.displayName=rs;var rc=(0,eC.TL)("DialogOverlay.RemoveScroll"),ru=l.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=re(rs,r);return(0,s.jsx)(eE.A,{as:rc,allowPinchZoom:!0,shards:[a.contentRef],children:(0,s.jsx)(Z.sG.div,{"data-state":rk(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),rd="DialogContent",rp=l.forwardRef((e,t)=>{let r=ri(rd,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=re(rd,e.__scopeDialog);return(0,s.jsx)(es.C,{present:n||i.open,children:i.modal?(0,s.jsx)(rh,{...a,ref:t}):(0,s.jsx)(rm,{...a,ref:t})})});rp.displayName=rd;var rh=l.forwardRef((e,t)=>{let r=re(rd,e.__scopeDialog),n=l.useRef(null),a=(0,Y.s)(t,r.contentRef,n);return l.useEffect(()=>{let e=n.current;if(e)return(0,eS.Eq)(e)},[]),(0,s.jsx)(rf,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,K.mK)(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:(0,K.mK)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,K.mK)(e.onFocusOutside,e=>e.preventDefault())})}),rm=l.forwardRef((e,t)=>{let r=re(rd,e.__scopeDialog),n=l.useRef(!1),a=l.useRef(!1);return(0,s.jsx)(rf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));let i=t.target;r.triggerRef.current?.contains(i)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),rf=l.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,c=re(rd,r),u=l.useRef(null),d=(0,Y.s)(t,u);return(0,er.Oh)(),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(en.n,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:(0,s.jsx)(et.qW,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":rk(c.open),...o,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(rS,{titleId:c.titleId}),(0,s.jsx)(rE,{contentRef:u,descriptionId:c.descriptionId})]})]})}),rg="DialogTitle",rv=l.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=re(rg,r);return(0,s.jsx)(Z.sG.h2,{id:a.titleId,...n,ref:t})});rv.displayName=rg;var rx="DialogDescription",ry=l.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=re(rx,r);return(0,s.jsx)(Z.sG.p,{id:a.descriptionId,...n,ref:t})});ry.displayName=rx;var rb="DialogClose",rw=l.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=re(rb,r);return(0,s.jsx)(Z.sG.button,{type:"button",...n,ref:t,onClick:(0,K.mK)(e.onClick,()=>a.onOpenChange(!1))})});function rk(e){return e?"open":"closed"}rw.displayName=rb;var rj="DialogTitleWarning",[rN,rC]=(0,J.q)(rj,{contentName:rd,titleName:rg,docsSlug:"dialog"}),rS=({titleId:e})=>{let t=rC(rj),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. | |
| If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. | |
| For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},rE=({contentRef:e,descriptionId:t})=>{let r=rC("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return l.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null};function rD({...e}){return(0,s.jsx)(rt,{"data-slot":"dialog",...e})}function rM({...e}){return(0,s.jsx)(ro,{"data-slot":"dialog-portal",...e})}function rP({className:e,...t}){return(0,s.jsx)(rl,{"data-slot":"dialog-overlay",className:(0,h.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",e),...t})}function rT({className:e,children:t,showCloseButton:r=!0,...n}){return(0,s.jsxs)(rM,{"data-slot":"dialog-portal",children:[(0,s.jsx)(rP,{}),(0,s.jsxs)(rp,{"data-slot":"dialog-content",className:(0,h.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-2xl duration-200 sm:max-w-lg",e),...n,children:[t,r&&(0,s.jsxs)(rw,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,s.jsx)(k.A,{}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function rI({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"dialog-header",className:(0,h.cn)("flex flex-col gap-2 text-center sm:text-left",e),...t})}function rA({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"dialog-footer",className:(0,h.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function rR({className:e,...t}){return(0,s.jsx)(rv,{"data-slot":"dialog-title",className:(0,h.cn)("text-lg leading-none font-semibold",e),...t})}function rL({className:e,...t}){return(0,s.jsx)(ry,{"data-slot":"dialog-description",className:(0,h.cn)("text-muted-foreground text-sm",e),...t})}var rz=r(96271),rO=r(59821);let rF=(0,v.A)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);var r_=r(25334);function rq({open:e,onOpenChange:t}){return(0,s.jsx)(rD,{open:e,onOpenChange:t,children:(0,s.jsxs)(rT,{className:"max-w-3xl max-h-[90vh]",children:[(0,s.jsx)(rI,{children:(0,s.jsxs)("div",{className:"flex items-center gap-4 mb-2",children:[(0,s.jsx)(rz.g,{width:64,height:64}),(0,s.jsxs)("div",{children:[(0,s.jsx)(rR,{className:"text-2xl",children:"DeepStudio"}),(0,s.jsx)(rL,{className:"text-base",children:"Browser-based Website Builder"})]})]})}),(0,s.jsxs)("div",{className:"space-y-6 overflow-y-auto max-h-[60vh] pr-4",children:[(0,s.jsx)("section",{children:(0,s.jsxs)("div",{className:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed space-y-3",children:[(0,s.jsx)("p",{children:"DeepStudio is a fork from @enzostvs and @victor's DeepSite v2 that over the months of tinkering became a BYOK (Bring Your Own Key) agentic browser-based website builder where you describe what you want and an agent writes the code."}),(0,s.jsx)("p",{children:"This is a solo project and there isn't a huge corpo behind it. I'll do my best to fix issues and possibly keep the project improving, but it's just me doing this for fun so please be patient. All feedback and contributions are more than welcome."}),(0,s.jsx)("p",{children:"If you make something with the app I would be thrilled if you could share what you've made."})]})}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"font-semibold text-lg mb-3",children:"Links & Support"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("a",{href:"https://github.com/o-stahl/deepstudio",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-blue-600 dark:text-blue-400 hover:underline",children:[(0,s.jsx)(rF,{className:"h-4 w-4"}),"GitHub repo",(0,s.jsx)(r_.A,{className:"h-3 w-3"})]}),(0,s.jsxs)("a",{href:"https://huggingface.co/spaces/o-stahl/deepstudio",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-blue-600 dark:text-blue-400 hover:underline",children:[(0,s.jsxs)("svg",{fill:"currentColor",fillRule:"evenodd",height:"1em",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",children:[(0,s.jsx)("title",{children:"HuggingFace"}),(0,s.jsx)("path",{d:"M16.781 3.277c2.997 1.704 4.844 4.851 4.844 8.258 0 .995-.155 1.955-.443 2.857a1.332 1.332 0 011.125.4 1.41 1.41 0 01.2 1.723c.204.165.352.385.428.632l.017.062c.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.255.57-.893 1.018-2.128 1.5l-.202.078-.131.048c-.478.173-.89.295-1.061.345l-.086.024c-.89.243-1.808.375-2.732.394-1.32 0-2.3-.36-2.923-1.067a9.852 9.852 0 01-3.18.018C9.778 21.647 8.802 22 7.494 22a11.249 11.249 0 01-2.541-.343l-.221-.06-.273-.08a16.574 16.574 0 01-1.175-.405c-1.237-.483-1.875-.93-2.13-1.501-.186-.4-.151-.867.093-1.236a1.42 1.42 0 01-.2-1.166c.069-.273.226-.516.447-.694a1.41 1.41 0 01.2-1.722c.233-.248.557-.391.917-.407l.078-.001a9.385 9.385 0 01-.44-2.85c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0zM4.188 14.758c.125.687 2.357 2.35 2.14 2.707-.19.315-.796-.239-.948-.386l-.041-.04-.168-.147c-.561-.479-2.304-1.9-2.74-1.432-.43.46.119.859 1.055 1.42l.784.467.136.083c1.045.643 1.12.84.95 1.113-.188.295-3.07-2.1-3.34-1.083-.27 1.011 2.942 1.304 2.744 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725l.16.04.175.042c1.227.284 3.565.65 4.435-.604.673-.973.64-1.709-.248-2.61l-.057-.057c-.945-.928-1.495-2.288-1.495-2.288l-.017-.058-.025-.072c-.082-.22-.284-.639-.63-.584-.46.073-.798 1.21.12 1.933l.05.038c.977.721-.195 1.21-.573.534l-.058-.104-.143-.25c-.463-.799-1.282-2.111-1.739-2.397-.532-.332-.907-.148-.782.541zm14.842-.541c-.533.335-1.563 2.074-1.94 2.751a.613.613 0 01-.687.302.436.436 0 01-.176-.098.303.303 0 01-.049-.06l-.014-.028-.008-.02-.007-.019-.003-.013-.003-.017a.289.289 0 01-.004-.048c0-.12.071-.266.25-.427.026-.024.054-.047.084-.07l.047-.036c.022-.016.043-.032.063-.049.883-.71.573-1.81.131-1.917l-.031-.006-.056-.004a.368.368 0 00-.062.006l-.028.005-.042.014-.039.017-.028.015-.028.019-.036.027-.023.02c-.173.158-.273.428-.31.542l-.016.054s-.53 1.309-1.439 2.234l-.054.054c-.365.358-.596.69-.702 1.018-.143.437-.066.868.21 1.353.055.097.117.195.187.296.882 1.275 3.282.876 4.494.59l.286-.07.25-.074c.276-.084.736-.233 1.2-.42l.188-.077.065-.028.064-.028.124-.056.081-.038c.529-.252.964-.543.994-.827l.001-.036a.299.299 0 00-.037-.139c-.094-.176-.271-.212-.491-.168l-.045.01c-.044.01-.09.024-.136.04l-.097.035-.054.022c-.559.23-1.238.705-1.607.745h.006a.452.452 0 01-.05.003h-.024l-.024-.003-.023-.005c-.068-.016-.116-.06-.14-.142a.22.22 0 01-.005-.1c.062-.345.958-.595 1.713-.91l.066-.028c.528-.224.97-.483.985-.832v-.04a.47.47 0 00-.016-.098c-.048-.18-.175-.251-.36-.251-.785 0-2.55 1.36-2.92 1.36-.025 0-.048-.007-.058-.024a.6.6 0 01-.046-.088c-.1-.238.068-.462 1.06-1.066l.209-.126c.538-.32 1.01-.588 1.341-.831.29-.212.475-.406.503-.6l.003-.028c.008-.113-.038-.227-.147-.344a.266.266 0 00-.07-.054l-.034-.015-.013-.005a.403.403 0 00-.13-.02c-.162 0-.369.07-.595.18-.637.313-1.431.952-1.826 1.285l-.249.215-.033.033c-.08.078-.288.27-.493.386l-.071.037-.041.019a.535.535 0 01-.122.036h.005a.346.346 0 01-.031.003l.01-.001-.013.001c-.079.005-.145-.021-.19-.095a.113.113 0 01-.014-.065c.027-.465 2.034-1.991 2.152-2.642l.009-.048c.1-.65-.271-.817-.791-.493zM11.938 2.984c-4.798 0-8.688 3.829-8.688 8.55 0 .692.083 1.364.24 2.008l.008-.009c.252-.298.612-.46 1.017-.46.355.008.699.117.993.312.22.14.465.384.715.694.261-.372.69-.598 1.15-.605.852 0 1.367.728 1.562 1.383l.047.105.06.127c.192.396.595 1.139 1.143 1.68 1.06 1.04 1.324 2.115.8 3.266a8.865 8.865 0 002.024-.014c-.505-1.12-.26-2.17.74-3.186l.066-.066c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694a1.87 1.87 0 01.99-.312c.357 0 .682.126.925.36.14-.61.215-1.245.215-1.898 0-4.722-3.89-8.55-8.687-8.55zm1.857 8.926l.439-.212c.553-.264.89-.383.89.152 0 1.093-.771 3.208-3.155 3.262h-.184c-2.325-.052-3.116-2.06-3.156-3.175l-.001-.087c0-1.107 1.452.586 3.25.586.716 0 1.379-.272 1.917-.526zm4.017-3.143c.45 0 .813.358.813.8 0 .441-.364.8-.813.8a.806.806 0 01-.812-.8c0-.442.364-.8.812-.8zm-11.624 0c.448 0 .812.358.812.8 0 .441-.364.8-.812.8a.806.806 0 01-.813-.8c0-.442.364-.8.813-.8zm7.79-.841c.32-.384.846-.54 1.33-.394.483.146.83.564.878 1.06.048.495-.212.97-.659 1.203-.322.168-.447-.477-.767-.585l.002-.003c-.287-.098-.772.362-.925.079a1.215 1.215 0 01.14-1.36zm-4.323 0c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003c-.108.036-.194.134-.273.24l-.118.165c-.11.15-.22.262-.377.18a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394z"})]}),"Live Demo (HuggingFace)",(0,s.jsx)(r_.A,{className:"h-3 w-3"})]}),(0,s.jsx)("a",{href:"https://www.buymeacoffee.com/otst",target:"_blank",rel:"noopener noreferrer",children:(0,s.jsx)("img",{src:"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png",alt:"Buy Me A Coffee",style:{height:"30px",width:"109px"}})})]})]})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center pt-4 border-t",children:[(0,s.jsxs)(rO.E,{variant:"secondary",className:"text-xs",children:["v",process.env.NEXT_PUBLIC_APP_VERSION||t5.rE]}),(0,s.jsx)(m.$,{onClick:()=>t(!1),children:"Close"})]})]})})}let rB=(0,v.A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),r$=(0,v.A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]),rU=(0,v.A)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),rH=(0,v.A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),rV=(0,v.A)("test-tube",[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]]);var rW=r(99270);let rG=(0,v.A)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),rK=(0,v.A)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),rY=(0,v.A)("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);var rJ=r(51567),rX=r(39390);let rZ={name:"Example Studios",description:"Creative agency portfolio showcasing modern web development capabilities",directories:["/styles","/scripts","/portfolio","/assets","/assets/images","/templates"],files:[{path:"/index.html",content:`<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Example Studios - Creative Agency</title> | |
| <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg"> | |
| <link rel="stylesheet" href="/styles/main.css"> | |
| </head> | |
| <body> | |
| {{> navigation}} | |
| <main> | |
| <section class="hero"> | |
| <div class="hero-content"> | |
| <h1>Crafting Digital Experiences</h1> | |
| <p class="hero-subtitle">We create stunning websites and digital solutions that captivate audiences and drive results</p> | |
| <div class="hero-buttons"> | |
| <a href="#services" class="btn btn-primary">Our Services</a> | |
| <a href="#work" class="btn btn-secondary">View Work</a> | |
| </div> | |
| </div> | |
| </section> | |
| <div class="container" id="services"> | |
| <div class="section-header"> | |
| <h2>What We Do</h2> | |
| <p class="section-subtitle">From concept to launch, we deliver exceptional digital experiences</p> | |
| </div> | |
| <div class="card-grid"> | |
| <div class="card"> | |
| <div class="service-icon">Design</div> | |
| <h3>Web Design</h3> | |
| <p>Beautiful, user-centered designs that make lasting impressions</p> | |
| <a href="/portfolio.html" class="btn">See Our Work</a> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">Code</div> | |
| <h3>Development</h3> | |
| <p>Fast, responsive websites built with modern technologies</p> | |
| <a href="/portfolio.html" class="btn">View Projects</a> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">Mobile</div> | |
| <h3>Mobile Apps</h3> | |
| <p>Native and web applications that users love to use</p> | |
| <a href="/contact.html" class="btn">Get Started</a> | |
| </div> | |
| </div> | |
| </div> | |
| <section class="featured-work" id="work"> | |
| <h2>Recent Work</h2> | |
| <div class="work-grid"> | |
| <div class="work-item"> | |
| <img src="https://picsum.photos/400/300?random=1" alt="Project 1" class="work-image"> | |
| <div class="work-info"> | |
| <h3>Brand Identity</h3> | |
| <p>Complete visual identity for tech startup</p> | |
| </div> | |
| </div> | |
| <div class="work-item"> | |
| <img src="https://picsum.photos/400/300?random=2" alt="Project 2" class="work-image"> | |
| <div class="work-info"> | |
| <h3>Portfolio Website</h3> | |
| <p>Clean and modern portfolio showcase</p> | |
| </div> | |
| </div> | |
| <div class="work-item"> | |
| <img src="https://picsum.photos/400/300?random=3" alt="Project 3" class="work-image"> | |
| <div class="work-info"> | |
| <h3>Mobile Application</h3> | |
| <p>Social platform connecting local communities</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="featured-work-cta"> | |
| <a href="/portfolio.html" class="btn btn-primary">View Full Portfolio</a> | |
| </div> | |
| </section> | |
| <section class="cta-section"> | |
| <div class="cta-content"> | |
| <h2>Ready to Build Something Amazing?</h2> | |
| <p>Let's turn your ideas into reality. We'd love to hear about your project.</p> | |
| <a href="/contact.html" class="btn btn-primary">Start Your Project</a> | |
| </div> | |
| </section> | |
| </div> | |
| </main> | |
| {{> footer}} | |
| <script src="/scripts/main.js"></script> | |
| </body> | |
| </html>`},{path:"/portfolio.html",content:`<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Portfolio - Example Studios</title> | |
| <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg"> | |
| <link rel="stylesheet" href="/styles/main.css"> | |
| <link rel="stylesheet" href="/styles/portfolio.css"> | |
| </head> | |
| <body> | |
| <nav class="navbar"> | |
| <a href="/" class="nav-brand"> | |
| <img src="/assets/images/logo.svg" alt="Example Studios" class="nav-logo"> | |
| <span>Example Studios</span> | |
| </a> | |
| <button class="nav-toggle" aria-label="Toggle navigation menu" aria-expanded="false"> | |
| <span class="hamburger-line"></span> | |
| <span class="hamburger-line"></span> | |
| <span class="hamburger-line"></span> | |
| </button> | |
| <ul class="nav-menu"> | |
| <li><a href="/" class="nav-link">Home</a></li> | |
| <li><a href="/portfolio.html" class="nav-link active">Portfolio</a></li> | |
| <li><a href="/about.html" class="nav-link">About</a></li> | |
| <li><a href="/contact.html" class="nav-link">Contact</a></li> | |
| </ul> | |
| </nav> | |
| <main> | |
| <section class="hero sub-page"> | |
| <div class="hero-content"> | |
| <h1>Our Portfolio</h1> | |
| <p class="hero-subtitle">Explore our recent projects and see how we bring ideas to life</p> | |
| </div> | |
| </section> | |
| <div class="container"> | |
| <section class="content-section"> | |
| <div class="section-header"> | |
| <h2>Our Work</h2> | |
| <p class="section-subtitle">Filter by category to explore our diverse portfolio of projects</p> | |
| </div> | |
| <div class="portfolio-filters"> | |
| <button class="filter-btn active" data-filter="all">All Projects</button> | |
| <button class="filter-btn" data-filter="web">Web Design</button> | |
| <button class="filter-btn" data-filter="mobile">Mobile Apps</button> | |
| <button class="filter-btn" data-filter="branding">Branding</button> | |
| </div> | |
| <div class="portfolio-grid"> | |
| <div class="portfolio-item" data-category="web"> | |
| <a href="/portfolio/techflow-dashboard.html"> | |
| <img src="https://picsum.photos/400/300?random=10" alt="TechFlow Dashboard" class="portfolio-image"> | |
| <div class="portfolio-overlay"> | |
| <h3>TechFlow Dashboard</h3> | |
| <p>Modern analytics platform with real-time data visualization</p> | |
| <div class="portfolio-tags"> | |
| <span class="tag">React</span> | |
| <span class="tag">D3.js</span> | |
| <span class="tag">Node.js</span> | |
| </div> | |
| </div> | |
| </a> | |
| </div> | |
| <div class="portfolio-item" data-category="mobile"> | |
| <img src="https://picsum.photos/400/300?random=11" alt="Fitness Tracker App" class="portfolio-image"> | |
| <div class="portfolio-overlay"> | |
| <h3>Fitness Tracker App</h3> | |
| <p>Cross-platform mobile app for health and wellness tracking</p> | |
| <div class="portfolio-tags"> | |
| <span class="tag">React Native</span> | |
| <span class="tag">Firebase</span> | |
| <span class="tag">Redux</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="portfolio-item" data-category="branding"> | |
| <img src="https://picsum.photos/400/300?random=12" alt="Green Earth Campaign" class="portfolio-image"> | |
| <div class="portfolio-overlay"> | |
| <h3>Green Earth Campaign</h3> | |
| <p>Complete brand identity for environmental awareness initiative</p> | |
| <div class="portfolio-tags"> | |
| <span class="tag">Brand Design</span> | |
| <span class="tag">Illustration</span> | |
| <span class="tag">Print</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="portfolio-item" data-category="web"> | |
| <img src="https://picsum.photos/400/300?random=13" alt="Web Application" class="portfolio-image"> | |
| <div class="portfolio-overlay"> | |
| <h3>Web Application</h3> | |
| <p>Interactive web application with modern features</p> | |
| <div class="portfolio-tags"> | |
| <span class="tag">React</span> | |
| <span class="tag">Node.js</span> | |
| <span class="tag">PostgreSQL</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="portfolio-item" data-category="mobile"> | |
| <img src="https://picsum.photos/400/300?random=14" alt="Recipe Sharing App" class="portfolio-image"> | |
| <div class="portfolio-overlay"> | |
| <h3>Recipe Sharing App</h3> | |
| <p>Social platform for food enthusiasts to share and discover recipes</p> | |
| <div class="portfolio-tags"> | |
| <span class="tag">Flutter</span> | |
| <span class="tag">AWS</span> | |
| <span class="tag">ML Kit</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="portfolio-item" data-category="branding"> | |
| <img src="https://picsum.photos/400/300?random=15" alt="StartupLab Identity" class="portfolio-image"> | |
| <div class="portfolio-overlay"> | |
| <h3>StartupLab Identity</h3> | |
| <p>Modern brand identity for tech incubator and coworking space</p> | |
| <div class="portfolio-tags"> | |
| <span class="tag">Logo Design</span> | |
| <span class="tag">Web Design</span> | |
| <span class="tag">Marketing</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </div> | |
| <section class="cta-section"> | |
| <div class="cta-content"> | |
| <h2>Ready to Build Something Amazing?</h2> | |
| <p>Let's turn your ideas into reality. We'd love to hear about your project.</p> | |
| <a href="/contact.html" class="btn btn-primary">Start Your Project</a> | |
| </div> | |
| </section> | |
| </main> | |
| {{> footer}} | |
| <script src="/scripts/main.js"></script> | |
| <script src="/scripts/portfolio.js"></script> | |
| </body> | |
| </html>`},{path:"/about.html",content:`<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>About - Example Studios</title> | |
| <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg"> | |
| <link rel="stylesheet" href="/styles/main.css"> | |
| </head> | |
| <body> | |
| <nav class="navbar"> | |
| <a href="/" class="nav-brand"> | |
| <img src="/assets/images/logo.svg" alt="Example Studios" class="nav-logo"> | |
| <span>Example Studios</span> | |
| </a> | |
| <button class="nav-toggle" aria-label="Toggle navigation menu" aria-expanded="false"> | |
| <span class="hamburger-line"></span> | |
| <span class="hamburger-line"></span> | |
| <span class="hamburger-line"></span> | |
| </button> | |
| <ul class="nav-menu"> | |
| <li><a href="/" class="nav-link">Home</a></li> | |
| <li><a href="/portfolio.html" class="nav-link">Portfolio</a></li> | |
| <li><a href="/about.html" class="nav-link active">About</a></li> | |
| <li><a href="/contact.html" class="nav-link">Contact</a></li> | |
| </ul> | |
| </nav> | |
| <main> | |
| <section class="hero sub-page"> | |
| <div class="hero-content"> | |
| <h1>About Example Studios</h1> | |
| <p class="hero-subtitle">We're a passionate team of designers and developers crafting exceptional digital experiences that make a difference.</p> | |
| </div> | |
| </section> | |
| <div class="container"> | |
| <section class="content-section"> | |
| <div class="section-header"> | |
| <h2>Our Story</h2> | |
| <p class="section-subtitle">From humble beginnings to digital excellence</p> | |
| </div> | |
| <div class="card-grid"> | |
| <div class="card"> | |
| <div class="service-icon">🚀</div> | |
| <h3>Founded in 2020</h3> | |
| <p>Example Studios emerged from a simple belief: great design should be accessible to everyone. What started as a small team of passionate creators has grown into a full-service digital agency.</p> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">💡</div> | |
| <h3>Our Philosophy</h3> | |
| <p>We believe in the power of collaboration, the importance of user-centered design, and the magic that happens when creativity meets technology.</p> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="content-section"> | |
| <div class="section-header"> | |
| <h2>Our Mission</h2> | |
| <p class="section-subtitle">Crafting digital experiences that make a difference</p> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">🎯</div> | |
| <h3>Empowering Through Design</h3> | |
| <p>To empower businesses and individuals with stunning, functional digital solutions that not only look great but drive real results. We're not just building websites and applications; we're crafting digital experiences that connect, engage, and inspire.</p> | |
| <a href="/contact.html" class="btn">Start Your Project</a> | |
| </div> | |
| </section> | |
| <section class="content-section"> | |
| <div class="section-header"> | |
| <h2>Our Team</h2> | |
| </div> | |
| <div class="team-grid"> | |
| <div class="team-member"> | |
| <img src="https://picsum.photos/200/200?random=1" alt="Sarah Johnson"> | |
| <h3>Sarah Johnson</h3> | |
| <div class="role">Creative Director</div> | |
| <p>With over 8 years in design, Sarah leads our creative vision and ensures every project tells a compelling story.</p> | |
| </div> | |
| <div class="team-member"> | |
| <img src="https://picsum.photos/200/200?random=2" alt="Mike Chen"> | |
| <h3>Mike Chen</h3> | |
| <div class="role">Lead Developer</div> | |
| <p>Mike transforms designs into responsive, performant web experiences using the latest technologies and best practices.</p> | |
| </div> | |
| <div class="team-member"> | |
| <img src="https://picsum.photos/200/200?random=3" alt="Emily Rodriguez"> | |
| <h3>Emily Rodriguez</h3> | |
| <div class="role">UX Designer</div> | |
| <p>Emily ensures every user interaction is intuitive and delightful, backed by research and user testing.</p> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="content-section"> | |
| <div class="section-header"> | |
| <h2>Our Values</h2> | |
| </div> | |
| <div class="card-grid"> | |
| <div class="card"> | |
| <div class="service-icon">Creativity</div> | |
| <h3>Creativity First</h3> | |
| <p>We believe every project deserves a unique, creative approach that stands out in the digital landscape.</p> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">Performance</div> | |
| <h3>Performance Driven</h3> | |
| <p>Beautiful designs mean nothing without flawless performance. We optimize for speed, accessibility, and user experience.</p> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">Partnership</div> | |
| <h3>Collaboration</h3> | |
| <p>The best results come from working closely with our clients as partners, not just service providers.</p> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">Innovation</div> | |
| <h3>Innovation</h3> | |
| <p>We stay ahead of industry trends and constantly explore new technologies to deliver cutting-edge solutions.</p> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="cta-section"> | |
| <div class="cta-content"> | |
| <h2>Ready to Build Something Amazing?</h2> | |
| <p>Let's turn your ideas into reality. We'd love to hear about your project.</p> | |
| <a href="/contact.html" class="btn btn-primary">Start Your Project</a> | |
| </div> | |
| </section> | |
| </div> | |
| </main> | |
| {{> footer}} | |
| <script src="/scripts/main.js"></script> | |
| </body> | |
| </html>`},{path:"/styles/main.css",content:`/* Main Stylesheet - Shared across all pages */ | |
| :root { | |
| --primary: #ea580c; | |
| --primary-dark: #c2410c; | |
| --secondary: #0891b2; | |
| --secondary-dark: #0e7490; | |
| --accent: #f59e0b; | |
| --neutral: #64748b; | |
| --bg: linear-gradient(180deg, #ffffff 0%, #fdfdfd 100%); | |
| --bg-secondary: linear-gradient(180deg, #f4f4f4 0%, #f8fafc 100%); | |
| --text: #1e293b; | |
| --text-light: #64748b; | |
| --border: #e2e8f0; | |
| --radius: 12px; | |
| --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); | |
| /* Layout variables */ | |
| --navbar-height: 65px; | |
| --navbar-bg: rgba(255, 255, 255, 0.95); | |
| --hero-gradient-blue: rgba(26, 54, 93, 0.9); | |
| --hero-gradient-orange: rgba(255, 123, 0, 0.8); | |
| /* Responsive Typography Scale (Mobile-first) */ | |
| --text-xs: 0.75rem; | |
| --text-sm: 0.875rem; | |
| --text-base: 1rem; | |
| --text-lg: 1.125rem; | |
| --text-xl: 1.25rem; | |
| --text-2xl: 1.5rem; | |
| --text-3xl: 1.875rem; | |
| --text-4xl: 2.25rem; | |
| --text-5xl: 3rem; | |
| --text-6xl: 3.75rem; | |
| /* Semantic Typography Variables */ | |
| --heading-h1: var(--text-4xl); | |
| --heading-h2: var(--text-3xl); | |
| --heading-h3: var(--text-xl); | |
| --heading-h4: var(--text-lg); | |
| --heading-h5: var(--text-base); | |
| --text-subtitle: var(--text-lg); | |
| --text-body: var(--text-base); | |
| --text-small: var(--text-sm); | |
| /* Responsive Spacing Scale */ | |
| --space-1: 0.25rem; | |
| --space-2: 0.5rem; | |
| --space-3: 0.75rem; | |
| --space-4: 1rem; | |
| --space-5: 1.25rem; | |
| --space-6: 1.5rem; | |
| --space-8: 2rem; | |
| --space-10: 2.5rem; | |
| --space-12: 3rem; | |
| --space-16: 4rem; | |
| --space-20: 5rem; | |
| /* Container and Grid Variables */ | |
| --container-padding: var(--space-4); | |
| --grid-gap: var(--space-6); | |
| --card-padding: var(--space-6); | |
| --section-spacing: var(--space-12); | |
| } | |
| /* Tablet Breakpoint - 768px+ */ | |
| @media (min-width: 768px) { | |
| :root { | |
| /* Larger typography for tablet */ | |
| --text-3xl: 2.25rem; | |
| --text-4xl: 2.75rem; | |
| --text-5xl: 3.5rem; | |
| --text-6xl: 4.5rem; | |
| /* Updated semantic typography for tablet */ | |
| --heading-h1: var(--text-4xl); | |
| --heading-h2: var(--text-3xl); | |
| --heading-h3: var(--text-2xl); | |
| --heading-h4: var(--text-xl); | |
| --text-subtitle: var(--text-xl); | |
| /* Increased spacing for tablet */ | |
| --container-padding: var(--space-6); | |
| --grid-gap: var(--space-8); | |
| --card-padding: var(--space-8); | |
| --section-spacing: var(--space-16); | |
| } | |
| } | |
| /* Desktop Breakpoint - 1024px+ */ | |
| @media (min-width: 1024px) { | |
| :root { | |
| /* Larger typography for desktop */ | |
| --text-4xl: 2.5rem; | |
| --text-5xl: 3rem; | |
| --text-6xl: 3.5rem; | |
| /* Updated semantic typography for desktop */ | |
| --heading-h1: var(--text-4xl); | |
| --heading-h2: var(--text-3xl); | |
| --heading-h3: var(--text-2xl); | |
| --heading-h4: var(--text-xl); | |
| /* Increased spacing for desktop */ | |
| --container-padding: var(--space-8); | |
| --grid-gap: var(--space-10); | |
| --card-padding: var(--space-10); | |
| --section-spacing: var(--space-20); | |
| } | |
| } | |
| /* Large Desktop Breakpoint - 1200px+ */ | |
| @media (min-width: 1200px) { | |
| :root { | |
| /* Maximum typography scaling */ | |
| --text-6xl: 4rem; | |
| /* Maximum spacing */ | |
| --section-spacing: var(--space-24, 6rem); | |
| } | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; | |
| background: var(--bg); | |
| color: var(--text); | |
| line-height: 1.6; | |
| } | |
| /* Navigation */ | |
| .navbar { | |
| padding: var(--space-4) var(--container-padding); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| z-index: 1000; | |
| transition: transform 0.3s ease; | |
| backdrop-filter: opacity(0); | |
| background: var(--navbar-bg); | |
| height: var(--navbar-height); | |
| } | |
| .navbar.hidden { | |
| transform: translateY(-100%); | |
| } | |
| body { | |
| padding-top: var(--navbar-height); | |
| } | |
| .nav-brand { | |
| font-size: var(--text-xl); | |
| font-weight: 600; | |
| color: var(--text); | |
| text-decoration: none; | |
| display: flex; | |
| align-items: center; | |
| gap: var(--space-2); | |
| } | |
| .nav-logo { | |
| width: 28px; | |
| height: 28px; | |
| } | |
| .nav-menu { | |
| display: flex; | |
| list-style: none; | |
| gap: var(--space-6); | |
| } | |
| .nav-link { | |
| color: var(--text-light); | |
| text-decoration: none; | |
| transition: all 0.2s ease; | |
| border-radius: var(--space-1); | |
| padding: var(--space-2); | |
| } | |
| .nav-link:hover, | |
| .nav-link.active { | |
| color: var(--primary); | |
| } | |
| .nav-link:focus { | |
| outline: none; | |
| } | |
| /* Hamburger Menu Button */ | |
| .nav-toggle { | |
| display: none; | |
| flex-direction: column; | |
| justify-content: space-between; | |
| width: 24px; | |
| height: 18px; | |
| background: transparent; | |
| border: none; | |
| cursor: pointer; | |
| padding: 0; | |
| z-index: 1001; | |
| border-radius: var(--space-1); | |
| } | |
| .nav-toggle:focus { | |
| outline: none; | |
| } | |
| .hamburger-line { | |
| width: 100%; | |
| height: 2px; | |
| background: var(--text); | |
| transition: all 0.3s ease; | |
| transform-origin: center; | |
| } | |
| .nav-toggle.active .hamburger-line:nth-child(1) { | |
| transform: rotate(45deg) translate(6px, 6px); | |
| } | |
| .nav-toggle.active .hamburger-line:nth-child(2) { | |
| opacity: 0; | |
| } | |
| .nav-toggle.active .hamburger-line:nth-child(3) { | |
| transform: rotate(-45deg) translate(6px, -6px); | |
| } | |
| /* Tablet Responsive - Enhanced desktop experience */ | |
| @media (min-width: 768px) and (max-width: 1023px) { | |
| .nav-menu { | |
| gap: var(--space-4); | |
| } | |
| .nav-link { | |
| font-size: var(--text-sm); | |
| padding: var(--space-2) var(--space-3); | |
| } | |
| } | |
| /* Mobile Menu Styles - Hamburger menu only on mobile */ | |
| @media (max-width: 767px) { | |
| .nav-toggle { | |
| display: flex; | |
| } | |
| .navbar.menu-open { | |
| background: rgba(255, 255, 255, 1); | |
| backdrop-filter: opacity(0); | |
| } | |
| .nav-menu { | |
| position: fixed; | |
| top: var(--navbar-height); | |
| left: 0; | |
| right: 0; | |
| background: #fff; | |
| backdrop-filter: opacity(0); | |
| flex-direction: column; | |
| padding: var(--space-6) var(--space-4) var(--space-8); | |
| gap: 0; | |
| transform: translateY(-100%); | |
| opacity: 0; | |
| visibility: hidden; | |
| transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| } | |
| .nav-menu.active { | |
| transform: translateY(0); | |
| opacity: 1; | |
| visibility: visible; | |
| } | |
| .nav-link { | |
| font-size: var(--text-lg); | |
| font-weight: 500; | |
| padding: var(--space-2) var(--space-6); | |
| border-radius: var(--space-2); | |
| background: transparent; | |
| border: none; | |
| transition: all 0.2s ease; | |
| position: relative; | |
| width: fit-content; | |
| display: block; | |
| margin: 0 auto; | |
| } | |
| .nav-link:hover { | |
| background: var(--bg-secondary); | |
| color: var(--primary); | |
| transform: translateY(-2px); | |
| } | |
| .nav-link.active { | |
| background: var(--primary); | |
| color: white; | |
| font-weight: 600; | |
| } | |
| .nav-link.active::before { | |
| content: ''; | |
| position: absolute; | |
| left: 0; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| width: 4px; | |
| height: 20px; | |
| background: white; | |
| border-radius: 2px; | |
| } | |
| } | |
| /* Container */ | |
| .container { | |
| max-width: 1000px; | |
| margin: 0 auto; | |
| padding: var(--card-padding); | |
| } | |
| /* Universal Heading Styles */ | |
| h1 { | |
| font-size: var(--heading-h1); | |
| margin-bottom: var(--space-4); | |
| font-weight: 700; | |
| line-height: 1.2; | |
| } | |
| h2 { | |
| font-size: var(--heading-h2); | |
| margin-bottom: var(--space-4); | |
| font-weight: 600; | |
| line-height: 1.3; | |
| } | |
| h3 { | |
| font-size: var(--heading-h3); | |
| margin-bottom: var(--space-3); | |
| font-weight: 600; | |
| line-height: 1.4; | |
| } | |
| h4 { | |
| font-size: var(--heading-h4); | |
| margin-bottom: var(--space-2); | |
| font-weight: 600; | |
| line-height: 1.4; | |
| } | |
| h5 { | |
| font-size: var(--heading-h5); | |
| margin-bottom: var(--space-2); | |
| font-weight: 600; | |
| line-height: 1.5; | |
| } | |
| p { | |
| color: var(--text-light); | |
| font-size: var(--text-body); | |
| margin-bottom: var(--space-8); | |
| line-height: 1.6; | |
| } | |
| /* Cards */ | |
| .card-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: var(--space-6); | |
| margin-bottom: var(--section-spacing); | |
| } | |
| .card { | |
| background: var(--bg-secondary); | |
| padding: var(--card-padding); | |
| border-radius: var(--radius); | |
| text-align: center; | |
| } | |
| .card h2 { | |
| font-size: var(--heading-h2); | |
| margin-bottom: var(--space-4); | |
| } | |
| .card p { | |
| font-size: var(--text-body); | |
| margin-bottom: var(--space-6); | |
| } | |
| /* Buttons */ | |
| .btn { | |
| display: inline-block; | |
| background: var(--primary); | |
| color: white; | |
| padding: var(--space-3) var(--space-6); | |
| border: none; | |
| border-radius: var(--radius); | |
| cursor: pointer; | |
| text-decoration: none; | |
| font-size: var(--text-body); | |
| font-weight: 500; | |
| transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | |
| } | |
| .btn:hover { | |
| background: var(--primary-dark); | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); | |
| } | |
| .btn:active { | |
| transform: translateY(0); | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | |
| } | |
| .btn:focus { | |
| outline: none; | |
| } | |
| .btn-small { | |
| padding: var(--space-2) var(--space-4); | |
| font-size: var(--text-sm); | |
| } | |
| /* Hero Section */ | |
| .hero { | |
| height: calc(100vh - var(--navbar-height) - var(--container-padding)); | |
| background: linear-gradient(135deg, var(--hero-gradient-blue), var(--hero-gradient-orange)), | |
| url('/assets/images/example-background.jpg') center/cover; | |
| background-size: contain; | |
| color: white; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| text-align: center; | |
| padding: var(--space-8) var(--container-padding); | |
| position: relative; | |
| overflow: hidden; | |
| margin: 0rem var(--container-padding) var(--section-spacing); | |
| border-radius: var(--radius); | |
| } | |
| .hero.sub-page { | |
| height: calc(50vh + var(--navbar-height)); | |
| min-height: calc(300px + var(--navbar-height)); | |
| } | |
| .hero-content { | |
| max-width: 800px; | |
| z-index: 1; | |
| } | |
| .hero h1 { | |
| font-size: var(--text-4xl); | |
| margin-bottom: var(--space-4); | |
| font-weight: 700; | |
| text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); | |
| } | |
| .hero-subtitle { | |
| font-size: var(--text-subtitle); | |
| opacity: 0.95; | |
| margin-bottom: var(--space-8); | |
| color: white; | |
| } | |
| .hero-buttons { | |
| display: flex; | |
| gap: var(--space-4); | |
| justify-content: center; | |
| flex-wrap: wrap; | |
| } | |
| .btn-primary { | |
| background: var(--primary); | |
| color: white; | |
| } | |
| .btn-primary:hover { | |
| background: var(--primary-dark); | |
| transform: translateY(-2px) scale(1.02); | |
| box-shadow: 0 6px 16px rgba(234, 88, 12, 0.25); | |
| } | |
| .btn-primary:focus { | |
| outline: none; | |
| } | |
| .btn-secondary { | |
| background: rgba(255, 255, 255, 0.2); | |
| color: white; | |
| backdrop-filter: opacity(0); | |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | |
| } | |
| .btn-secondary:hover { | |
| background: rgba(255, 255, 255, 0.3); | |
| transform: translateY(-2px) scale(1.02); | |
| box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); | |
| } | |
| .btn-secondary:focus { | |
| outline: none; | |
| } | |
| /* Features Section */ | |
| .features-section { | |
| padding: var(--section-spacing) 0; | |
| background: var(--bg-secondary); | |
| border-radius: var(--radius); | |
| margin-top: var(--section-spacing); | |
| } | |
| .feature-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); | |
| gap: var(--space-6); | |
| margin-top: var(--space-8); | |
| } | |
| .feature { | |
| text-align: center; | |
| padding: var(--space-6); | |
| } | |
| .feature-icon { | |
| font-size: 0.9rem; | |
| font-weight: 600; | |
| color: var(--secondary); | |
| text-transform: uppercase; | |
| letter-spacing: 0.1em; | |
| display: block; | |
| margin-bottom: var(--space-4); | |
| } | |
| .feature h3 { | |
| color: var(--secondary-dark); | |
| margin-bottom: 0.5rem; | |
| } | |
| .feature p { | |
| color: var(--text-light); | |
| font-size: var(--text-body); | |
| } | |
| /* Example Section */ | |
| .example-section { | |
| background: var(--bg-secondary); | |
| padding: var(--card-padding); | |
| border-radius: var(--radius); | |
| text-align: center; | |
| } | |
| /* Aurora Studios Specific Styles */ | |
| .section-subtitle { | |
| font-size: var(--text-subtitle); | |
| color: var(--text-light); | |
| margin-bottom: var(--section-spacing); | |
| text-align: center; | |
| max-width: 600px; | |
| margin-left: auto; | |
| margin-right: auto; | |
| } | |
| /* What We Do section title */ | |
| #services h2 { | |
| text-align: center; | |
| } | |
| .service-icon { | |
| font-size: var(--text-small); | |
| font-weight: 600; | |
| color: var(--primary); | |
| text-transform: uppercase; | |
| letter-spacing: 0.1em; | |
| margin-bottom: var(--space-6); | |
| display: block; | |
| } | |
| /* Featured Work Section */ | |
| .featured-work { | |
| padding: var(--section-spacing) 0; | |
| background: var(--bg-secondary); | |
| } | |
| .featured-work h2 { | |
| font-size: var(--heading-h2); | |
| text-align: center; | |
| margin-bottom: var(--section-spacing); | |
| color: var(--text); | |
| } | |
| .work-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); | |
| gap: var(--space-6); | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 var(--space-8); | |
| } | |
| .work-item { | |
| background: white; | |
| border-radius: var(--radius); | |
| overflow: hidden; | |
| box-shadow: var(--shadow); | |
| transition: transform 0.3s ease; | |
| } | |
| .work-item:hover { | |
| transform: translateY(-5px); | |
| } | |
| .section-cta { | |
| text-align: center; | |
| margin-top: var(--space-8); | |
| padding-top: var(--space-6); | |
| border-top: 1px solid var(--border); | |
| } | |
| .featured-work-cta { | |
| text-align: center; | |
| margin-top: var(--space-8); | |
| } | |
| .work-image { | |
| width: 100%; | |
| height: 250px; | |
| object-fit: cover; | |
| } | |
| .work-info { | |
| padding: var(--space-6); | |
| } | |
| .work-info h3 { | |
| color: var(--primary); | |
| margin-bottom: var(--space-2); | |
| } | |
| .work-info p { | |
| color: var(--text-light); | |
| font-size: var(--text-body); | |
| } | |
| /* CTA Section */ | |
| .cta-section { | |
| background: linear-gradient(135deg, var(--secondary), var(--primary)); | |
| color: white; | |
| padding: var(--section-spacing) var(--space-8); | |
| text-align: center; | |
| margin: var(--section-spacing) var(--space-4); | |
| border-radius: var(--radius); | |
| } | |
| .cta-content h2 { | |
| margin-bottom: var(--space-4); | |
| font-size: var(--heading-h2); | |
| } | |
| .cta-content p { | |
| font-size: var(--text-subtitle); | |
| opacity: 0.9; | |
| margin-bottom: var(--space-8); | |
| color: white; | |
| } | |
| .cta-section .btn { | |
| background: white; | |
| color: var(--text); | |
| font-weight: 600; | |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | |
| } | |
| .cta-section .btn:hover { | |
| background: var(--bg-secondary); | |
| transform: translateY(-2px) scale(1.02); | |
| box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); | |
| } | |
| .cta-section .btn:focus { | |
| outline: none; | |
| } | |
| /* Page Header - Shared across sub-pages */ | |
| .page-header { | |
| text-align: center; | |
| margin-bottom: var(--section-spacing); | |
| } | |
| .page-header h1 { | |
| font-size: var(--heading-h1); | |
| margin-bottom: var(--space-4); | |
| color: var(--text); | |
| } | |
| .page-subtitle { | |
| font-size: var(--text-subtitle); | |
| color: var(--text-light); | |
| max-width: 600px; | |
| margin: 0 auto; | |
| } | |
| /* Section Header Component */ | |
| .section-header { | |
| text-align: center; | |
| margin-bottom: var(--section-spacing); | |
| } | |
| .section-header h2 { | |
| font-size: var(--heading-h2); | |
| color: var(--text); | |
| margin-bottom: var(--space-3); | |
| position: relative; | |
| } | |
| .section-header h2::after { | |
| content: ''; | |
| position: absolute; | |
| bottom: -0.75rem; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| width: 2rem; | |
| height: 3px; | |
| background: var(--primary); | |
| border-radius: 2px; | |
| } | |
| .section-header .section-subtitle { | |
| font-size: var(--text-subtitle); | |
| color: var(--text-light); | |
| margin-top: var(--space-6); | |
| margin-bottom: 0; | |
| max-width: 600px; | |
| margin-left: auto; | |
| margin-right: auto; | |
| line-height: 1.6; | |
| } | |
| /* Content Sections - Shared layout styles */ | |
| .content-section { | |
| margin-bottom: var(--section-spacing); | |
| } | |
| .content-section h2 { | |
| font-size: var(--heading-h2); | |
| color: var(--text); | |
| margin-bottom: var(--space-4); | |
| position: relative; | |
| } | |
| .content-section p { | |
| font-size: var(--text-subtitle); | |
| line-height: 1.8; | |
| color: var(--text-light); | |
| margin-bottom: var(--space-6); | |
| text-align: center; | |
| } | |
| /* Team Grid - Shared component */ | |
| .team-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: var(--space-6); | |
| margin-top: var(--space-8); | |
| } | |
| .team-member { | |
| text-align: center; | |
| padding: var(--card-padding); | |
| background: var(--bg-secondary); | |
| border-radius: var(--radius); | |
| transition: transform 0.3s ease, box-shadow 0.3s ease; | |
| } | |
| .team-member:hover { | |
| transform: translateY(-5px); | |
| box-shadow: var(--shadow); | |
| } | |
| .team-member img { | |
| width: 100px; | |
| height: 100px; | |
| border-radius: 50%; | |
| object-fit: cover; | |
| margin-bottom: var(--space-4); | |
| border: 3px solid var(--primary); | |
| } | |
| .team-member h3 { | |
| font-size: var(--heading-h3); | |
| color: var(--text); | |
| margin-bottom: var(--space-2); | |
| } | |
| .team-member .role { | |
| color: var(--primary); | |
| font-weight: 600; | |
| margin-bottom: var(--space-4); | |
| } | |
| .team-member p { | |
| font-size: var(--text-small); | |
| color: var(--text-light); | |
| line-height: 1.6; | |
| } | |
| /* Contact Page Components */ | |
| .contact-card .contact-detail { | |
| font-weight: 600; | |
| color: var(--primary); | |
| font-size: var(--text-base); | |
| margin: var(--space-4) 0; | |
| padding: var(--space-3); | |
| background: var(--bg-secondary); | |
| border-radius: var(--space-2); | |
| text-align: center; | |
| } | |
| .contact-form-section { | |
| max-width: 600px; | |
| margin: 0 auto; | |
| background: white; | |
| padding: var(--card-padding); | |
| border-radius: var(--radius); | |
| box-shadow: var(--shadow); | |
| } | |
| .social-proof-container { | |
| max-width: 800px; | |
| margin: 0 auto; | |
| text-align: center; | |
| } | |
| /* Tablet Responsive Styles */ | |
| @media (min-width: 768px) and (max-width: 1023px) { | |
| /* Hero adjustments for tablet */ | |
| .hero.sub-page { | |
| height: calc(50vh + var(--navbar-height)); | |
| min-height: calc(350px + var(--navbar-height)); | |
| } | |
| /* Grid layout adjustments for tablet */ | |
| .card-grid, | |
| .work-grid, | |
| .team-grid, | |
| .portfolio-grid { | |
| grid-template-columns: repeat(2, 1fr); | |
| gap: var(--space-6); | |
| } | |
| } | |
| /* Mobile Responsive Styles */ | |
| @media (max-width: 767px) { | |
| :root { | |
| /* Mobile-optimized typography */ | |
| --heading-h1: var(--text-3xl); | |
| --heading-h2: var(--text-2xl); | |
| --heading-h3: var(--text-lg); | |
| --text-subtitle: var(--text-base); | |
| /* Tighter spacing for mobile */ | |
| --section-spacing: var(--space-10); | |
| --card-padding: var(--space-4); | |
| } | |
| /* Hero section mobile adjustments */ | |
| .hero { | |
| margin: 0rem var(--space-4) var(--section-spacing); | |
| padding: var(--space-6) var(--space-4); | |
| } | |
| .hero h1 { | |
| font-size: var(--text-4xl); | |
| } | |
| .hero.sub-page { | |
| height: calc(40vh + var(--navbar-height)); | |
| min-height: calc(250px + var(--navbar-height)); | |
| } | |
| /* Grid layout adjustments - single column for mobile */ | |
| .card-grid, | |
| .work-grid, | |
| .team-grid, | |
| .portfolio-grid { | |
| grid-template-columns: 1fr; | |
| gap: var(--space-4); | |
| } | |
| /* Mobile button improvements */ | |
| .btn { | |
| width: 100%; | |
| max-width: 280px; | |
| text-align: center; | |
| } | |
| .hero-buttons { | |
| flex-direction: column; | |
| align-items: center; | |
| gap: var(--space-3); | |
| } | |
| /* Mobile typography improvements */ | |
| p { | |
| margin-bottom: var(--space-6); | |
| } | |
| /* Contact form mobile adjustments */ | |
| .form-row { | |
| grid-template-columns: 1fr; | |
| gap: var(--space-4); | |
| margin-bottom: var(--space-4); | |
| } | |
| .social-proof-stats { | |
| grid-template-columns: 1fr; | |
| gap: var(--space-6); | |
| } | |
| .social-proof-text { | |
| margin-left: 0; | |
| border-left: none; | |
| border-top: 3px solid var(--primary); | |
| padding-left: 0; | |
| padding-top: var(--space-4); | |
| } | |
| } | |
| .contact-info h2 { | |
| font-size: var(--heading-h2); | |
| color: var(--text); | |
| margin-bottom: var(--space-4); | |
| } | |
| .contact-info p { | |
| font-size: var(--text-subtitle); | |
| line-height: 1.8; | |
| color: var(--text-light); | |
| margin-bottom: var(--space-8); | |
| } | |
| /* Contact Form - Refactored */ | |
| .contact-form-container { | |
| padding: var(--card-padding); | |
| } | |
| .contact-form-container .section-header { | |
| text-align: left; | |
| margin-bottom: var(--space-8); | |
| } | |
| .contact-form-container .section-header h2 { | |
| font-size: var(--heading-h2); | |
| color: var(--text); | |
| margin-bottom: var(--space-3); | |
| } | |
| .contact-form-container .section-header p { | |
| color: var(--text-light); | |
| font-size: var(--text-base); | |
| margin: 0; | |
| } | |
| .form-row { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: var(--space-4); | |
| margin-bottom: var(--space-6); | |
| } | |
| .form-group { | |
| margin-bottom: var(--space-6); | |
| } | |
| .form-group label { | |
| display: block; | |
| font-weight: 600; | |
| color: var(--text); | |
| font-size: var(--text-body); | |
| margin-bottom: var(--space-2); | |
| } | |
| .form-group input, | |
| .form-group select, | |
| .form-group textarea { | |
| width: 100%; | |
| padding: var(--space-4); | |
| border: 2px solid var(--border); | |
| border-radius: var(--radius); | |
| font-size: var(--text-body); | |
| transition: border-color 0.3s ease, box-shadow 0.3s ease; | |
| } | |
| .form-group input:focus, | |
| .form-group select:focus, | |
| .form-group textarea:focus { | |
| outline: none; | |
| border-color: var(--primary); | |
| box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1); | |
| } | |
| .form-group textarea { | |
| resize: vertical; | |
| min-height: 120px; | |
| } | |
| .checkbox-group { | |
| display: flex; | |
| align-items: flex-start; | |
| gap: var(--space-2); | |
| } | |
| .checkbox-group input[type="checkbox"] { | |
| width: auto; | |
| margin: 0; | |
| transform: scale(1.2); | |
| } | |
| .checkbox-group label { | |
| margin-bottom: 0; | |
| font-weight: normal; | |
| font-size: var(--text-small); | |
| cursor: pointer; | |
| } | |
| .error-message { | |
| color: #ef4444; | |
| font-size: var(--text-sm); | |
| margin-top: var(--space-1); | |
| display: block; | |
| } | |
| .btn-full { | |
| width: 100%; | |
| padding: var(--space-4) var(--space-8); | |
| font-size: var(--text-subtitle); | |
| font-weight: 600; | |
| } | |
| .form-success { | |
| display: none; | |
| background: #10b981; | |
| color: white; | |
| padding: var(--space-6); | |
| border-radius: var(--radius); | |
| margin-top: var(--space-4); | |
| text-align: center; | |
| border: 1px solid #059669; | |
| } | |
| .form-success.show { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: var(--space-3); | |
| } | |
| .form-success .success-icon { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 32px; | |
| height: 32px; | |
| background: rgba(255, 255, 255, 0.2); | |
| border-radius: 50%; | |
| flex-shrink: 0; | |
| } | |
| .form-success .success-icon svg { | |
| width: 20px; | |
| height: 20px; | |
| stroke: white; | |
| stroke-width: 3; | |
| } | |
| .form-success p { | |
| margin: 0; | |
| font-weight: 500; | |
| font-size: var(--text-body); | |
| } | |
| /* Social Proof Section */ | |
| .contact-social-proof { | |
| background: var(--bg-secondary); | |
| padding: var(--card-padding); | |
| border-radius: var(--radius); | |
| border: 2px solid var(--border); | |
| } | |
| .contact-social-proof h3 { | |
| font-size: var(--heading-h3); | |
| color: var(--text); | |
| margin-bottom: var(--space-6); | |
| text-align: center; | |
| } | |
| .social-proof-stats { | |
| display: grid; | |
| grid-template-columns: repeat(3, 1fr); | |
| gap: var(--space-4); | |
| margin-bottom: var(--space-6); | |
| } | |
| .stat { | |
| text-align: center; | |
| padding: var(--space-3); | |
| } | |
| .stat-number { | |
| font-size: var(--text-2xl); | |
| font-weight: 700; | |
| color: var(--primary); | |
| margin-bottom: var(--space-1); | |
| } | |
| .stat-label { | |
| font-size: var(--text-sm); | |
| color: var(--text-light); | |
| font-weight: 500; | |
| } | |
| .social-proof-text { | |
| font-style: italic; | |
| color: var(--text); | |
| line-height: 1.6; | |
| margin-bottom: var(--space-4); | |
| text-align: center; | |
| border-left: 3px solid var(--primary); | |
| padding-left: var(--space-4); | |
| margin-left: var(--space-4); | |
| } | |
| .social-proof-attribution { | |
| text-align: center; | |
| color: var(--text-light); | |
| font-size: var(--text-sm); | |
| } | |
| .testimonial { | |
| margin-top: var(--space-8); | |
| padding: var(--space-6); | |
| background: var(--bg-secondary); | |
| border-radius: var(--radius); | |
| border-left: 4px solid var(--primary); | |
| } | |
| .testimonial-text { | |
| font-size: var(--text-lg); | |
| font-style: italic; | |
| color: var(--text); | |
| line-height: 1.6; | |
| margin-bottom: var(--space-4); | |
| } | |
| .testimonial-attribution { | |
| color: var(--text-light); | |
| font-size: var(--text-sm); | |
| } | |
| /* Loading state for form submission */ | |
| .contact-form.loading .btn-primary { | |
| background: var(--neutral); | |
| cursor: not-allowed; | |
| position: relative; | |
| } | |
| .contact-form.loading .btn-primary:after { | |
| content: ''; | |
| position: absolute; | |
| width: 20px; | |
| height: 20px; | |
| margin: auto; | |
| border: 2px solid white; | |
| border-top: 2px solid transparent; | |
| border-radius: 50%; | |
| animation: spin 1s linear infinite; | |
| } | |
| @keyframes spin { | |
| 0% { transform: rotate(0deg); } | |
| 100% { transform: rotate(360deg); } | |
| } | |
| /* Form validation styles */ | |
| .form-group.error input, | |
| .form-group.error select, | |
| .form-group.error textarea { | |
| border-color: #ef4444; | |
| background-color: #fef2f2; | |
| } | |
| .form-group.success input, | |
| .form-group.success select, | |
| .form-group.success textarea { | |
| border-color: #10b981; | |
| background-color: #f0fdf4; | |
| } | |
| /* Footer - Modern Light Design */ | |
| .site-footer { | |
| background: var(--bg-secondary); | |
| border-top: 1px solid var(--border); | |
| padding: var(--section-spacing) 0 0; | |
| margin-top: var(--section-spacing); | |
| } | |
| .footer-content { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 var(--space-8) var(--section-spacing); | |
| display: grid; | |
| grid-template-columns: 1fr 2fr; | |
| gap: var(--space-10); | |
| align-items: start; | |
| } | |
| /* Footer Brand Section */ | |
| .footer-brand { | |
| display: flex; | |
| flex-direction: column; | |
| gap: var(--space-4); | |
| } | |
| .footer-logo { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--space-3); | |
| font-size: var(--text-xl); | |
| font-weight: 600; | |
| color: var(--text); | |
| } | |
| .footer-logo img { | |
| width: 40px; | |
| height: 40px; | |
| } | |
| .footer-tagline { | |
| color: var(--text-light); | |
| font-size: var(--text-body); | |
| margin: 0; | |
| line-height: 1.5; | |
| } | |
| .footer-social { | |
| display: flex; | |
| gap: var(--space-3); | |
| margin-top: var(--space-2); | |
| } | |
| .footer-social a { | |
| width: 36px; | |
| height: 36px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| border-radius: 50%; | |
| background: white; | |
| color: var(--text); | |
| text-decoration: none; | |
| font-size: var(--text-base); | |
| transition: all 0.2s ease; | |
| border: 1px solid var(--border); | |
| } | |
| .footer-social a:hover { | |
| background: var(--primary); | |
| color: white; | |
| border-color: var(--primary); | |
| transform: translateY(-2px); | |
| } | |
| /* Footer Links Section */ | |
| .footer-links-section { | |
| display: grid; | |
| grid-template-columns: 1fr 1fr; | |
| gap: var(--space-8); | |
| } | |
| .footer-column h4 { | |
| font-size: var(--text-base); | |
| font-weight: 600; | |
| color: var(--text); | |
| margin-bottom: var(--space-4); | |
| text-transform: uppercase; | |
| letter-spacing: 0.05em; | |
| } | |
| .footer-links { | |
| list-style: none; | |
| padding: 0; | |
| margin: 0; | |
| } | |
| .footer-links li { | |
| margin-bottom: var(--space-3); | |
| } | |
| .footer-links a { | |
| color: var(--text-light); | |
| text-decoration: none; | |
| font-size: var(--text-body); | |
| transition: color 0.2s ease; | |
| position: relative; | |
| } | |
| .footer-links a:hover { | |
| color: var(--primary); | |
| transform: translateX(2px); | |
| display: inline-block; | |
| } | |
| /* Footer Bottom Bar */ | |
| .footer-bottom { | |
| border-top: 1px solid var(--border); | |
| padding: var(--space-6) var(--space-8); | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| flex-wrap: wrap; | |
| gap: var(--space-4); | |
| } | |
| .footer-hf-link { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--space-2); | |
| color: var(--text-light); | |
| text-decoration: none; | |
| font-size: var(--text-sm); | |
| font-weight: 500; | |
| transition: all 0.2s ease; | |
| padding: var(--space-1) var(--space-2); | |
| border-radius: var(--space-1); | |
| } | |
| .footer-hf-link:hover { | |
| color: var(--primary); | |
| background: rgba(234, 88, 12, 0.1); | |
| transform: translateY(-1px); | |
| } | |
| .footer-hf-link svg { | |
| width: 16px; | |
| height: 16px; | |
| flex-shrink: 0; | |
| } | |
| .footer-bottom-links { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--space-4); | |
| } | |
| .footer-bottom-links a { | |
| color: var(--text-light); | |
| text-decoration: none; | |
| font-size: var(--text-sm); | |
| transition: color 0.2s ease; | |
| } | |
| .footer-bottom-links a:hover { | |
| color: var(--primary); | |
| } | |
| .footer-bottom-links .separator { | |
| color: var(--text-light); | |
| font-size: var(--text-sm); | |
| } | |
| /* Responsive Footer Styles */ | |
| @media (max-width: 767px) { | |
| .footer-content { | |
| grid-template-columns: 1fr; | |
| gap: var(--space-8); | |
| padding: 0 var(--space-4) var(--space-8); | |
| } | |
| .footer-brand { | |
| text-align: center; | |
| align-items: center; | |
| } | |
| .footer-links-section { | |
| grid-template-columns: 1fr 1fr; | |
| gap: var(--space-6); | |
| text-align: center; | |
| } | |
| .footer-column h4 { | |
| text-align: center; | |
| } | |
| .footer-links { | |
| text-align: center; | |
| } | |
| .footer-links a { | |
| display: inline-block; | |
| } | |
| .footer-bottom { | |
| flex-direction: column; | |
| text-align: center; | |
| padding: var(--space-4); | |
| } | |
| .footer-bottom-links { | |
| flex-wrap: wrap; | |
| justify-content: center; | |
| } | |
| } | |
| `},{path:"/styles/portfolio.css",content:`/* Portfolio Page Styles */ | |
| /* Portfolio Filters */ | |
| .portfolio-filters { | |
| display: flex; | |
| justify-content: center; | |
| gap: var(--space-4); | |
| margin-bottom: var(--section-spacing); | |
| flex-wrap: wrap; | |
| } | |
| .filter-btn { | |
| padding: var(--space-3) var(--space-6); | |
| border: 2px solid var(--border); | |
| background: transparent; | |
| border-radius: 50px; | |
| cursor: pointer; | |
| transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| font-weight: 500; | |
| font-size: var(--text-body); | |
| color: var(--text-light); | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); | |
| } | |
| .filter-btn:hover, | |
| .filter-btn.active { | |
| border-color: var(--primary); | |
| background: var(--primary); | |
| color: white; | |
| transform: translateY(-1px) scale(1.01); | |
| box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2); | |
| } | |
| .filter-btn:focus { | |
| outline: none; | |
| } | |
| .filter-btn:active { | |
| transform: translateY(0) scale(0.99); | |
| } | |
| /* Portfolio Grid */ | |
| .portfolio-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); | |
| gap: var(--space-6); | |
| margin-bottom: var(--section-spacing); | |
| } | |
| .portfolio-item { | |
| position: relative; | |
| border-radius: var(--radius); | |
| overflow: hidden; | |
| box-shadow: var(--shadow); | |
| transition: transform 0.3s ease; | |
| cursor: pointer; | |
| } | |
| .portfolio-item:hover { | |
| transform: translateY(-10px); | |
| } | |
| .portfolio-item.hidden { | |
| display: none; | |
| } | |
| .portfolio-image { | |
| width: 100%; | |
| height: 300px; | |
| object-fit: cover; | |
| transition: transform 0.3s ease; | |
| } | |
| .portfolio-item:hover .portfolio-image { | |
| transform: scale(1.05); | |
| } | |
| .portfolio-overlay { | |
| position: absolute; | |
| bottom: 0; | |
| left: 0; | |
| right: 0; | |
| background: linear-gradient(transparent, rgba(0,0,0,0.8)); | |
| color: white; | |
| padding: var(--card-padding); | |
| transform: translateY(100%); | |
| transition: transform 0.3s ease; | |
| } | |
| .portfolio-item:hover .portfolio-overlay { | |
| transform: translateY(0); | |
| } | |
| .portfolio-overlay h3 { | |
| font-size: var(--heading-h3); | |
| margin-bottom: var(--space-2); | |
| } | |
| .portfolio-overlay p { | |
| margin-bottom: var(--space-4); | |
| opacity: 0.9; | |
| color: white; | |
| } | |
| .portfolio-tags { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: var(--space-2); | |
| } | |
| .tag { | |
| background: rgba(255,255,255,0.2); | |
| color: white; | |
| padding: var(--space-1) var(--space-3); | |
| border-radius: 20px; | |
| font-size: var(--text-xs); | |
| font-weight: 500; | |
| }`},{path:"/scripts/main.js",content:`// Main JavaScript - Shared functionality | |
| // Multi-file demo loaded | |
| // Set up navigation highlighting | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const currentPath = window.location.pathname; | |
| const navLinks = document.querySelectorAll('.nav-link'); | |
| navLinks.forEach(link => { | |
| if (link.getAttribute('href') === currentPath) { | |
| link.classList.add('active'); | |
| } else { | |
| link.classList.remove('active'); | |
| } | |
| }); | |
| // Scroll-reactive navbar functionality | |
| const navbar = document.querySelector('.navbar'); | |
| const hero = document.querySelector('.hero'); | |
| let lastScrollY = window.scrollY; | |
| let heroHeight = hero ? hero.offsetHeight : 0; | |
| function updateNavbarVisibility() { | |
| const currentScrollY = window.scrollY; | |
| const scrollDifference = currentScrollY - lastScrollY; | |
| // Always show navbar in hero section | |
| if (currentScrollY <= heroHeight) { | |
| navbar.classList.remove('hidden'); | |
| } | |
| // Hide when scrolling down past hero section | |
| else if (scrollDifference > 0) { | |
| navbar.classList.add('hidden'); | |
| } | |
| // Show when scrolling up by 20px or more | |
| else if (scrollDifference <= -20) { | |
| navbar.classList.remove('hidden'); | |
| } | |
| lastScrollY = currentScrollY; | |
| } | |
| // Throttle scroll events for better performance | |
| let ticking = false; | |
| function handleScroll() { | |
| if (!ticking) { | |
| requestAnimationFrame(updateNavbarVisibility); | |
| ticking = true; | |
| setTimeout(() => { ticking = false; }, 16); // ~60fps | |
| } | |
| } | |
| window.addEventListener('scroll', handleScroll); | |
| // Recalculate hero height on resize | |
| window.addEventListener('resize', function() { | |
| heroHeight = hero ? hero.offsetHeight : 0; | |
| }); | |
| // Mobile hamburger menu functionality | |
| const navToggle = document.querySelector('.nav-toggle'); | |
| const navMenu = document.querySelector('.nav-menu'); | |
| const mobileNavLinks = document.querySelectorAll('.nav-link'); | |
| function toggleMobileMenu() { | |
| navToggle.classList.toggle('active'); | |
| navMenu.classList.toggle('active'); | |
| navbar.classList.toggle('menu-open'); | |
| // Update ARIA attributes | |
| const isExpanded = navToggle.classList.contains('active'); | |
| navToggle.setAttribute('aria-expanded', isExpanded); | |
| // Prevent body scroll when menu is open | |
| document.body.style.overflow = isExpanded ? 'hidden' : ''; | |
| } | |
| function closeMobileMenu() { | |
| navToggle.classList.remove('active'); | |
| navMenu.classList.remove('active'); | |
| navbar.classList.remove('menu-open'); | |
| navToggle.setAttribute('aria-expanded', 'false'); | |
| document.body.style.overflow = ''; | |
| } | |
| // Toggle menu on button click | |
| if (navToggle) { | |
| navToggle.addEventListener('click', toggleMobileMenu); | |
| } | |
| // Close menu when clicking nav links | |
| mobileNavLinks.forEach(link => { | |
| link.addEventListener('click', closeMobileMenu); | |
| }); | |
| // Close menu on escape key | |
| document.addEventListener('keydown', function(e) { | |
| if (e.key === 'Escape' && navMenu.classList.contains('active')) { | |
| closeMobileMenu(); | |
| } | |
| }); | |
| // Close menu when clicking outside | |
| document.addEventListener('click', function(e) { | |
| if (!navToggle.contains(e.target) && !navMenu.contains(e.target) && navMenu.classList.contains('active')) { | |
| closeMobileMenu(); | |
| } | |
| }); | |
| // Close mobile menu when navbar hides (scroll reactive) | |
| const originalUpdateNavbarVisibility = updateNavbarVisibility; | |
| updateNavbarVisibility = function() { | |
| originalUpdateNavbarVisibility(); | |
| if (navbar.classList.contains('hidden') && navMenu.classList.contains('active')) { | |
| closeMobileMenu(); | |
| } | |
| }; | |
| });`},{path:"/templates/navigation.hbs",content:`<nav class="navbar"> | |
| <a href="/" class="nav-brand"> | |
| <img src="/assets/images/logo.svg" alt="{{siteName}}" class="nav-logo"> | |
| <span>{{siteName}}</span> | |
| </a> | |
| <button class="nav-toggle" aria-label="Toggle navigation menu" aria-expanded="false"> | |
| <span class="hamburger-line"></span> | |
| <span class="hamburger-line"></span> | |
| <span class="hamburger-line"></span> | |
| </button> | |
| <ul class="nav-menu"> | |
| {{#each navigation}} | |
| <li><a href="{{url}}" class="nav-link">{{title}}</a></li> | |
| {{/each}} | |
| </ul> | |
| </nav>`},{path:"/templates/footer.hbs",content:`<footer class="site-footer"> | |
| <div class="footer-content"> | |
| <div class="footer-brand"> | |
| <div class="footer-logo"> | |
| <img src="/assets/images/logo.svg" alt="{{siteName}}" width="40" height="40"> | |
| <span>{{siteName}}</span> | |
| </div> | |
| <p class="footer-tagline">{{footerTagline}}</p> | |
| <div class="footer-social"> | |
| {{#each social}} | |
| <a href="{{url}}" aria-label="{{name}}">{{icon}}</a> | |
| {{/each}} | |
| </div> | |
| </div> | |
| <div class="footer-links-section"> | |
| <div class="footer-column"> | |
| <h4>Explore</h4> | |
| <ul class="footer-links"> | |
| {{#each navigation}} | |
| <li><a href="{{url}}">{{title}}</a></li> | |
| {{/each}} | |
| </ul> | |
| </div> | |
| <div class="footer-column"> | |
| <h4>Services</h4> | |
| <ul class="footer-links"> | |
| {{#each services}} | |
| <li><a href="{{url}}">{{name}}</a></li> | |
| {{/each}} | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="footer-bottom"> | |
| <a href="{{deepstudioLink}}" target="_blank" class="footer-hf-link"> | |
| <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> | |
| <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/> | |
| </svg> | |
| <span>{{deepstudioName}}</span> | |
| </a> | |
| <div class="footer-bottom-links"> | |
| {{#each legalLinks}} | |
| <a href="{{url}}">{{name}}</a> | |
| {{#unless @last}}<span class="separator">•</span>{{/unless}} | |
| {{/each}} | |
| </div> | |
| </div> | |
| </footer>`},{path:"/scripts/portfolio.js",content:`// Portfolio Filtering Functionality | |
| (function() { | |
| let currentFilter = 'all'; | |
| function init() { | |
| const filterButtons = document.querySelectorAll('.filter-btn'); | |
| const portfolioItems = document.querySelectorAll('.portfolio-item'); | |
| if (!filterButtons.length || !portfolioItems.length) return; | |
| // Add event listeners to filter buttons | |
| filterButtons.forEach(btn => { | |
| btn.addEventListener('click', handleFilterClick); | |
| }); | |
| // Show all items initially | |
| showItems(portfolioItems, 'all'); | |
| } | |
| function handleFilterClick(e) { | |
| const button = e.target; | |
| const filter = button.dataset.filter; | |
| if (!filter) return; | |
| // Update active button | |
| document.querySelectorAll('.filter-btn').forEach(btn => { | |
| btn.classList.remove('active'); | |
| }); | |
| button.classList.add('active'); | |
| // Filter and show items | |
| const portfolioItems = document.querySelectorAll('.portfolio-item'); | |
| showItems(portfolioItems, filter); | |
| currentFilter = filter; | |
| } | |
| function showItems(items, filter) { | |
| items.forEach(item => { | |
| const itemCategory = item.dataset.category; | |
| if (filter === 'all' || itemCategory === filter) { | |
| item.style.display = 'block'; | |
| item.style.opacity = '0'; | |
| // Animate in | |
| setTimeout(() => { | |
| item.style.opacity = '1'; | |
| item.style.transform = 'translateY(0)'; | |
| }, 50); | |
| } else { | |
| item.style.opacity = '0'; | |
| item.style.transform = 'translateY(20px)'; | |
| // Hide after animation | |
| setTimeout(() => { | |
| item.style.display = 'none'; | |
| }, 300); | |
| } | |
| }); | |
| } | |
| // Add smooth transitions to portfolio items | |
| function addTransitions() { | |
| const portfolioItems = document.querySelectorAll('.portfolio-item'); | |
| portfolioItems.forEach(item => { | |
| item.style.transition = 'opacity 0.3s ease, transform 0.3s ease'; | |
| }); | |
| } | |
| document.addEventListener('DOMContentLoaded', function() { | |
| addTransitions(); | |
| init(); | |
| }); | |
| })();`},{path:"/scripts/contact.js",content:`// Contact Form Validation and Submission | |
| (function() { | |
| let form; | |
| let submitButton; | |
| let isSubmitting = false; | |
| function init() { | |
| form = document.getElementById('contactForm'); | |
| submitButton = form?.querySelector('button[type="submit"]'); | |
| if (!form || !submitButton) return; | |
| // Add event listeners | |
| form.addEventListener('submit', handleSubmit); | |
| // Real-time validation | |
| const inputs = form.querySelectorAll('input[required], textarea[required]'); | |
| inputs.forEach(input => { | |
| input.addEventListener('blur', validateField); | |
| input.addEventListener('input', clearErrors); | |
| }); | |
| // Email specific validation | |
| const emailInput = form.querySelector('#email'); | |
| if (emailInput) { | |
| emailInput.addEventListener('blur', validateEmail); | |
| } | |
| } | |
| function handleSubmit(e) { | |
| e.preventDefault(); | |
| if (isSubmitting) return; | |
| // Clear all previous errors | |
| clearAllErrors(); | |
| // Validate all fields | |
| const isValid = validateForm(); | |
| if (isValid) { | |
| submitForm(); | |
| } | |
| } | |
| function validateForm() { | |
| let isValid = true; | |
| // Required field validation | |
| const requiredFields = [ | |
| { id: 'name', name: 'Full Name' }, | |
| { id: 'email', name: 'Email Address' }, | |
| { id: 'message', name: 'Project Details' } | |
| ]; | |
| requiredFields.forEach(field => { | |
| const input = document.getElementById(field.id); | |
| const value = input.value.trim(); | |
| if (!value) { | |
| showError(field.id, \`\${field.name} is required\`); | |
| isValid = false; | |
| } | |
| }); | |
| // Email format validation | |
| const emailInput = document.getElementById('email'); | |
| const emailValue = emailInput.value.trim(); | |
| if (emailValue && !isValidEmail(emailValue)) { | |
| showError('email', 'Please enter a valid email address'); | |
| isValid = false; | |
| } | |
| // Message length validation | |
| const messageInput = document.getElementById('message'); | |
| const messageValue = messageInput.value.trim(); | |
| if (messageValue && messageValue.length < 20) { | |
| showError('message', 'Please provide more details about your project (minimum 20 characters)'); | |
| isValid = false; | |
| } | |
| return isValid; | |
| } | |
| function validateField(e) { | |
| const field = e.target; | |
| const value = field.value.trim(); | |
| clearErrors(e); | |
| if (field.hasAttribute('required') && !value) { | |
| const fieldName = field.previousElementSibling.textContent.replace(' *', ''); | |
| showError(field.id, \`\${fieldName} is required\`); | |
| } | |
| } | |
| function validateEmail(e) { | |
| const emailInput = e.target; | |
| const emailValue = emailInput.value.trim(); | |
| if (emailValue && !isValidEmail(emailValue)) { | |
| showError('email', 'Please enter a valid email address'); | |
| } | |
| } | |
| function isValidEmail(email) { | |
| const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/; | |
| return emailRegex.test(email); | |
| } | |
| function showError(fieldId, message) { | |
| const field = document.getElementById(fieldId); | |
| const formGroup = field.parentElement; | |
| const errorElement = document.getElementById(fieldId + 'Error'); | |
| // Add error class to form group | |
| formGroup.classList.add('error'); | |
| formGroup.classList.remove('success'); | |
| // Show error message | |
| if (errorElement) { | |
| errorElement.textContent = message; | |
| } | |
| } | |
| function clearErrors(e) { | |
| const field = e.target; | |
| const formGroup = field.parentElement; | |
| const errorElement = document.getElementById(field.id + 'Error'); | |
| // Remove error class | |
| formGroup.classList.remove('error'); | |
| // Clear error message | |
| if (errorElement) { | |
| errorElement.textContent = ''; | |
| } | |
| // Add success class if field has value and no errors | |
| if (field.value.trim() && !formGroup.classList.contains('error')) { | |
| formGroup.classList.add('success'); | |
| } else { | |
| formGroup.classList.remove('success'); | |
| } | |
| } | |
| function clearAllErrors() { | |
| const errorMessages = form.querySelectorAll('.error-message'); | |
| errorMessages.forEach(error => error.textContent = ''); | |
| const formGroups = form.querySelectorAll('.form-group'); | |
| formGroups.forEach(group => { | |
| group.classList.remove('error', 'success'); | |
| }); | |
| // Hide success message | |
| const successElement = document.getElementById('formSuccess'); | |
| if (successElement) { | |
| successElement.classList.remove('show'); | |
| } | |
| } | |
| function submitForm() { | |
| if (isSubmitting) return; | |
| isSubmitting = true; | |
| // Add loading state | |
| form.classList.add('loading'); | |
| submitButton.disabled = true; | |
| submitButton.textContent = 'Sending...'; | |
| // Collect form data | |
| const formData = new FormData(form); | |
| const data = { | |
| name: formData.get('name'), | |
| email: formData.get('email'), | |
| company: formData.get('company'), | |
| project: formData.get('project'), | |
| budget: formData.get('budget'), | |
| message: formData.get('message'), | |
| newsletter: formData.get('newsletter') ? true : false, | |
| timestamp: new Date().toISOString() | |
| }; | |
| // Simulate form submission (replace with actual API call) | |
| setTimeout(() => { | |
| // Show success message | |
| showSuccess(); | |
| // Reset form | |
| form.reset(); | |
| clearAllErrors(); | |
| // Remove loading state | |
| form.classList.remove('loading'); | |
| submitButton.disabled = false; | |
| submitButton.textContent = 'Send Message'; | |
| isSubmitting = false; | |
| // Auto-hide success message after 5 seconds | |
| setTimeout(() => { | |
| const successElement = document.getElementById('formSuccess'); | |
| if (successElement) { | |
| successElement.classList.remove('show'); | |
| } | |
| }, 5000); | |
| }, 2000); // Simulate network delay | |
| } | |
| function showSuccess() { | |
| const successElement = document.getElementById('formSuccess'); | |
| if (successElement) { | |
| successElement.classList.add('show'); | |
| successElement.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); | |
| } | |
| } | |
| // Initialize when DOM is ready | |
| document.addEventListener('DOMContentLoaded', init); | |
| })();`},{path:"/data.json",content:`{ | |
| "siteName": "Example Studios", | |
| "footerTagline": "Crafting digital experiences that inspire", | |
| "navigation": [ | |
| {"title": "Home", "url": "/"}, | |
| {"title": "Portfolio", "url": "/portfolio.html"}, | |
| {"title": "About", "url": "/about.html"}, | |
| {"title": "Contact", "url": "/contact.html"} | |
| ], | |
| "social": [ | |
| {"name": "Twitter", "url": "#", "icon": "𝕏"}, | |
| {"name": "LinkedIn", "url": "#", "icon": "in"}, | |
| {"name": "Instagram", "url": "#", "icon": "📷"}, | |
| {"name": "GitHub", "url": "#", "icon": "⚡"} | |
| ], | |
| "services": [ | |
| {"name": "Web Design", "url": "/portfolio.html"}, | |
| {"name": "Development", "url": "/portfolio.html"}, | |
| {"name": "Mobile Apps", "url": "/portfolio.html"}, | |
| {"name": "Consulting", "url": "/portfolio.html"} | |
| ], | |
| "deepstudioLink": "https://huggingface.co/spaces/otst/deepstudio", | |
| "deepstudioName": "DeepStudio", | |
| "legalLinks": [ | |
| {"name": "Privacy Policy", "url": "/privacy.html"}, | |
| {"name": "Terms of Service", "url": "/terms.html"} | |
| ] | |
| }`},{path:"/assets/images/logo.svg",content:`<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> | |
| <defs> | |
| <linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%"> | |
| <stop offset="0%" style="stop-color:#2563eb;stop-opacity:1" /> | |
| <stop offset="100%" style="stop-color:#ff7b00;stop-opacity:1" /> | |
| </linearGradient> | |
| </defs> | |
| <rect x="2" y="2" width="12" height="12" rx="2" fill="url(#gradient)" opacity="0.9"/> | |
| <rect x="18" y="2" width="12" height="12" rx="2" fill="#ff7b00" opacity="0.8"/> | |
| <rect x="2" y="18" width="12" height="12" rx="2" fill="#2563eb" opacity="0.8"/> | |
| <rect x="18" y="18" width="12" height="12" rx="2" fill="url(#gradient)" opacity="0.7"/> | |
| <circle cx="16" cy="16" r="6" fill="white" opacity="0.9"/> | |
| <circle cx="16" cy="16" r="3" fill="#1a365d"/> | |
| </svg>`},{path:"/assets/images/favicon.svg",content:`<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> | |
| <rect x="1" y="1" width="6" height="6" rx="1" fill="#2563eb"/> | |
| <rect x="9" y="1" width="6" height="6" rx="1" fill="#ff7b00"/> | |
| <rect x="1" y="9" width="6" height="6" rx="1" fill="#ff7b00"/> | |
| <rect x="9" y="9" width="6" height="6" rx="1" fill="#2563eb"/> | |
| </svg>`},{path:"/contact.html",content:`<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Contact - Example Studios</title> | |
| <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg"> | |
| <link rel="stylesheet" href="/styles/main.css"> | |
| </head> | |
| <body> | |
| <nav class="navbar"> | |
| <a href="/" class="nav-brand"> | |
| <img src="/assets/images/logo.svg" alt="Example Studios" class="nav-logo"> | |
| <span>Example Studios</span> | |
| </a> | |
| <button class="nav-toggle" aria-label="Toggle navigation menu" aria-expanded="false"> | |
| <span class="hamburger-line"></span> | |
| <span class="hamburger-line"></span> | |
| <span class="hamburger-line"></span> | |
| </button> | |
| <ul class="nav-menu"> | |
| <li><a href="/" class="nav-link">Home</a></li> | |
| <li><a href="/portfolio.html" class="nav-link">Portfolio</a></li> | |
| <li><a href="/about.html" class="nav-link">About</a></li> | |
| <li><a href="/contact.html" class="nav-link active">Contact</a></li> | |
| </ul> | |
| </nav> | |
| <main> | |
| <section class="hero sub-page"> | |
| <div class="hero-content"> | |
| <h1>Let's Build Something Amazing</h1> | |
| <p class="hero-subtitle">Ready to turn your ideas into reality? We'd love to hear about your project and show you how we can help.</p> | |
| </div> | |
| </section> | |
| <div class="container"> | |
| <div class="section-header"> | |
| <h2>Get In Touch</h2> | |
| <p class="section-subtitle">Ready to start your next project? Choose how you'd like to connect with us</p> | |
| </div> | |
| <div class="card-grid"> | |
| <div class="card contact-card"> | |
| <div class="service-icon">Email</div> | |
| <h3>Send Us an Email</h3> | |
| <p>Drop us a line and we'll get back to you within 24 hours</p> | |
| <div class="contact-detail">hello@examplestudios.com</div> | |
| <a href="mailto:hello@examplestudios.com" class="btn">Send Email</a> | |
| </div> | |
| <div class="card contact-card"> | |
| <div class="service-icon">Phone</div> | |
| <h3>Give Us a Call</h3> | |
| <p>Speak directly with our team about your project</p> | |
| <div class="contact-detail">(555) 123-4567</div> | |
| <a href="tel:+15551234567" class="btn">Call Now</a> | |
| </div> | |
| <div class="card contact-card"> | |
| <div class="service-icon">Office</div> | |
| <h3>Visit Our Studio</h3> | |
| <p>Meet with us in person to discuss your vision</p> | |
| <div class="contact-detail">San Francisco, CA<br><small>By appointment only</small></div> | |
| <a href="/contact.html" class="btn">Schedule Visit</a> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="container"> | |
| <div class="section-header"> | |
| <h2>Start Your Project</h2> | |
| <p class="section-subtitle">Tell us about your vision and we'll get back to you within 24 hours</p> | |
| </div> | |
| <div class="contact-form-section"> | |
| <form class="contact-form" id="contactForm"> | |
| <div class="form-row"> | |
| <div class="form-group"> | |
| <label for="name">Your Name</label> | |
| <input type="text" id="name" name="name" required> | |
| <span class="error-message" id="nameError"></span> | |
| </div> | |
| <div class="form-group"> | |
| <label for="email">Email Address</label> | |
| <input type="email" id="email" name="email" required> | |
| <span class="error-message" id="emailError"></span> | |
| </div> | |
| </div> | |
| <div class="form-group"> | |
| <label for="message">Tell us about your project</label> | |
| <textarea id="message" name="message" rows="5" required placeholder="What are you looking to build? Share your goals, timeline, or any specific requirements..."></textarea> | |
| <span class="error-message" id="messageError"></span> | |
| </div> | |
| <button type="submit" class="btn btn-primary btn-full">Send Message</button> | |
| <div class="form-success" id="formSuccess"> | |
| <div class="success-icon"> | |
| <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <path d="M16.667 5L7.5 14.167L3.333 10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | |
| </svg> | |
| </div> | |
| <p>Thank you! We'll get back to you within 24 hours.</p> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| <section class="featured-work"> | |
| <div class="section-header"> | |
| <h2>Trusted by Growing Companies</h2> | |
| <p class="section-subtitle">Join the businesses that have transformed their digital presence with us</p> | |
| </div> | |
| <div class="social-proof-container"> | |
| <div class="social-proof-stats"> | |
| <div class="stat"> | |
| <div class="stat-number">50+</div> | |
| <div class="stat-label">Projects Completed</div> | |
| </div> | |
| <div class="stat"> | |
| <div class="stat-number">24hr</div> | |
| <div class="stat-label">Response Time</div> | |
| </div> | |
| <div class="stat"> | |
| <div class="stat-number">100%</div> | |
| <div class="stat-label">Client Satisfaction</div> | |
| </div> | |
| </div> | |
| <div class="testimonial"> | |
| <p class="testimonial-text">"Example Studios delivered our project on time and exceeded our expectations. Their attention to detail is remarkable and their team was incredibly responsive throughout the entire process."</p> | |
| <div class="testimonial-attribution"> | |
| <strong>Sarah Chen</strong>, Product Manager at TechCorp | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| {{> footer}} | |
| <script src="/scripts/main.js"></script> | |
| <script src="/scripts/contact.js"></script> | |
| </body> | |
| </html>`},{path:"/privacy.html",content:`<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Privacy Policy - Example Studios</title> | |
| <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg"> | |
| <link rel="stylesheet" href="/styles/main.css"> | |
| </head> | |
| <body> | |
| {{> navigation}} | |
| <main> | |
| <section class="hero sub-page"> | |
| <div class="hero-content"> | |
| <h1>Privacy Policy</h1> | |
| <p class="hero-subtitle">How we protect and handle your information</p> | |
| </div> | |
| </section> | |
| <div class="container"> | |
| <div class="content-section"> | |
| <p><strong>Last updated:</strong> December 2024</p> | |
| <h2>Overview</h2> | |
| <p>At Example Studios, we take your privacy seriously. This Privacy Policy explains how we collect, use, and protect your personal information when you use our services.</p> | |
| <h2>Information We Collect</h2> | |
| <p>We may collect the following types of information:</p> | |
| <ul> | |
| <li><strong>Contact Information:</strong> Name, email address, phone number when you contact us</li> | |
| <li><strong>Project Information:</strong> Details about your project requirements and preferences</li> | |
| <li><strong>Usage Data:</strong> How you interact with our website for improving our services</li> | |
| </ul> | |
| <h2>How We Use Your Information</h2> | |
| <p>We use your information to:</p> | |
| <ul> | |
| <li>Provide and improve our design and development services</li> | |
| <li>Communicate with you about your projects</li> | |
| <li>Send you updates about our services (with your consent)</li> | |
| <li>Analyze and improve our website and services</li> | |
| </ul> | |
| <h2>Information Sharing</h2> | |
| <p>We do not sell, trade, or otherwise transfer your personal information to third parties without your consent, except:</p> | |
| <ul> | |
| <li>To trusted service providers who help us operate our business</li> | |
| <li>When required by law or to protect our rights</li> | |
| <li>With your explicit consent</li> | |
| </ul> | |
| <h2>Data Security</h2> | |
| <p>We implement appropriate security measures to protect your personal information against unauthorized access, alteration, disclosure, or destruction.</p> | |
| <h2>Your Rights</h2> | |
| <p>You have the right to:</p> | |
| <ul> | |
| <li>Access and review your personal information</li> | |
| <li>Request corrections to your information</li> | |
| <li>Request deletion of your information</li> | |
| <li>Opt-out of marketing communications</li> | |
| </ul> | |
| <h2>Contact Us</h2> | |
| <p>If you have questions about this Privacy Policy, please contact us at:</p> | |
| <p> | |
| <strong>Example Studios</strong><br> | |
| Email: hello@examplestudios.com<br> | |
| Phone: (555) 123-4567 | |
| </p> | |
| </div> | |
| </div> | |
| <section class="cta-section"> | |
| <div class="cta-content"> | |
| <h2>Ready to Build Something Amazing?</h2> | |
| <p>Let's turn your ideas into reality. We'd love to hear about your project.</p> | |
| <a href="/contact.html" class="btn btn-primary">Start Your Project</a> | |
| </div> | |
| </section> | |
| </main> | |
| {{> footer}} | |
| <script src="/scripts/main.js"></script> | |
| </body> | |
| </html>`},{path:"/terms.html",content:`<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Terms of Service - Example Studios</title> | |
| <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg"> | |
| <link rel="stylesheet" href="/styles/main.css"> | |
| </head> | |
| <body> | |
| {{> navigation}} | |
| <main> | |
| <section class="hero sub-page"> | |
| <div class="hero-content"> | |
| <h1>Terms of Service</h1> | |
| <p class="hero-subtitle">Our terms and conditions for working together</p> | |
| </div> | |
| </section> | |
| <div class="container"> | |
| <div class="content-section"> | |
| <p><strong>Last updated:</strong> December 2024</p> | |
| <h2>Agreement to Terms</h2> | |
| <p>By accessing and using Example Studios' services, you agree to be bound by these Terms of Service and all applicable laws and regulations.</p> | |
| <h2>Services</h2> | |
| <p>Example Studios provides web design, development, and digital consulting services. We reserve the right to modify or discontinue services with reasonable notice.</p> | |
| <h2>Client Responsibilities</h2> | |
| <p>As a client, you agree to:</p> | |
| <ul> | |
| <li>Provide accurate and complete information for your project</li> | |
| <li>Respond to requests for feedback in a timely manner</li> | |
| <li>Collaborate effectively throughout the project</li> | |
| <li>Respect intellectual property rights</li> | |
| </ul> | |
| <h2>Project Process</h2> | |
| <p>Our typical process includes:</p> | |
| <ul> | |
| <li><strong>Discovery:</strong> Understanding your requirements and goals</li> | |
| <li><strong>Proposal:</strong> Detailed scope, timeline, and pricing</li> | |
| <li><strong>Design & Development:</strong> Creating your solution</li> | |
| <li><strong>Review:</strong> Client feedback and revisions</li> | |
| <li><strong>Launch:</strong> Final delivery and launch support</li> | |
| </ul> | |
| <h2>Project Timeline</h2> | |
| <ul> | |
| <li>Project schedules will be outlined in individual agreements</li> | |
| <li>Milestone deliverables will be clearly defined</li> | |
| <li>Regular progress updates will be provided</li> | |
| </ul> | |
| <h2>Intellectual Property</h2> | |
| <p>Upon project completion, clients receive ownership of custom work created specifically for their project, excluding any pre-existing intellectual property or third-party components.</p> | |
| <h2>Limitation of Liability</h2> | |
| <p>Example Studios' liability is limited to the amount paid for services. We are not responsible for indirect, incidental, or consequential damages.</p> | |
| <h2>Termination</h2> | |
| <p>Either party may terminate services with written notice. All completed work will be delivered upon termination.</p> | |
| <h2>Changes to Terms</h2> | |
| <p>We reserve the right to update these terms with reasonable notice to existing clients.</p> | |
| <h2>Contact</h2> | |
| <p>Questions about these terms? Contact us at:</p> | |
| <p> | |
| <strong>Example Studios</strong><br> | |
| Email: hello@examplestudios.com<br> | |
| Phone: (555) 123-4567 | |
| </p> | |
| </div> | |
| </div> | |
| </main> | |
| {{> footer}} | |
| <script src="/scripts/main.js"></script> | |
| </body> | |
| </html>`},{path:"/portfolio/techflow-dashboard.html",content:`<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>TechFlow Dashboard - Example Studios</title> | |
| <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg"> | |
| <link rel="stylesheet" href="/styles/main.css"> | |
| </head> | |
| <body> | |
| <nav class="navbar"> | |
| <a href="/" class="nav-brand"> | |
| <img src="/assets/images/logo.svg" alt="Example Studios" class="nav-logo"> | |
| <span>Example Studios</span> | |
| </a> | |
| <button class="nav-toggle" aria-label="Toggle navigation menu" aria-expanded="false"> | |
| <span class="hamburger-line"></span> | |
| <span class="hamburger-line"></span> | |
| <span class="hamburger-line"></span> | |
| </button> | |
| <ul class="nav-menu"> | |
| <li><a href="/" class="nav-link">Home</a></li> | |
| <li><a href="/portfolio.html" class="nav-link active">Portfolio</a></li> | |
| <li><a href="/about.html" class="nav-link">About</a></li> | |
| <li><a href="/contact.html" class="nav-link">Contact</a></li> | |
| </ul> | |
| </nav> | |
| <main> | |
| <section class="hero sub-page"> | |
| <div class="hero-content"> | |
| <h1>TechFlow Dashboard</h1> | |
| <p class="hero-subtitle">Modern analytics platform with real-time data visualization</p> | |
| </div> | |
| </section> | |
| <div class="container"> | |
| <section class="content-section"> | |
| <div class="section-header"> | |
| <h2>Project Overview</h2> | |
| <p class="section-subtitle">A comprehensive analytics solution built for modern businesses</p> | |
| </div> | |
| <div class="card-grid"> | |
| <div class="card"> | |
| <div class="service-icon">Challenge</div> | |
| <h3>Challenge</h3> | |
| <p>TechFlow needed a modern dashboard to visualize complex data streams in real-time, replacing their outdated reporting system with something more intuitive and scalable.</p> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">Solution</div> | |
| <h3>Solution</h3> | |
| <p>We designed and built a React-based dashboard with D3.js visualizations, featuring customizable widgets and real-time data updates via WebSocket connections.</p> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="content-section"> | |
| <div class="section-header"> | |
| <h2>Technology Stack</h2> | |
| </div> | |
| <div class="card-grid"> | |
| <div class="card"> | |
| <div class="service-icon">React</div> | |
| <h3>React</h3> | |
| <p>Modern component-based architecture for maintainable UI development</p> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">Data</div> | |
| <h3>D3.js</h3> | |
| <p>Custom data visualizations with smooth animations and interactions</p> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">Backend</div> | |
| <h3>Node.js</h3> | |
| <p>Robust backend API with real-time data processing capabilities</p> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="content-section"> | |
| <div class="section-header"> | |
| <h2>Results</h2> | |
| </div> | |
| <div class="card"> | |
| <div class="service-icon">Results</div> | |
| <h3>Impact & Performance</h3> | |
| <p>The new dashboard reduced report generation time by 75% and improved user engagement by 300%. Real-time updates eliminated the need for manual refreshes, and the intuitive interface reduced training time for new users.</p> | |
| </div> | |
| </section> | |
| </div> | |
| <section class="cta-section"> | |
| <div class="cta-content"> | |
| <h2>Ready for Your Next Project?</h2> | |
| <p>Let's discuss how we can create a custom solution for your business needs.</p> | |
| <a href="/contact.html" class="btn btn-primary">Start Your Project</a> | |
| </div> | |
| </section> | |
| </main> | |
| {{> footer}} | |
| <script src="/scripts/main.js"></script> | |
| </body> | |
| </html>`},{path:"/assets/README.md",content:`# Assets Directory | |
| This directory contains all static assets for the Example project. | |
| ## Structure | |
| - \`/images/\` - Image files including: | |
| - \`example-background.jpg\` - Hero section background image | |
| - \`logo.svg\` - Site logo | |
| - \`favicon.svg\` - Browser favicon | |
| ## Background Image | |
| The \`example-background.jpg\` is automatically included when the demo project is created. It features a beautiful flowing gradient design that complements the orange (#ff7b00) and blue (#2563eb) color scheme. | |
| ## File Types Supported | |
| The VFS system supports various file types: | |
| - Images: PNG, JPG, JPEG, GIF, WebP, SVG, ICO | |
| - Documents: HTML, CSS, JS, JSON, TXT, MD, XML | |
| - Binary files up to 10MB | |
| This demonstrates the VFS capability to handle multiple file types and organize them in a structured directory system.`}],assets:[{filename:"example-background.jpg",path:"/assets/images/example-background.jpg"}]},rQ={name:"Barebones Project",description:"A minimal starting template",directories:["/styles","/scripts","/templates"],files:[{path:"/index.html",content:`<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>New Project</title> | |
| <link rel="stylesheet" href="/styles/style.css"> | |
| </head> | |
| <body> | |
| {{> welcome-card}} | |
| <script src="/scripts/main.js"></script> | |
| </body> | |
| </html>`},{path:"/styles/style.css",content:`/* | |
| * Your project styles start here. | |
| * Use this file to customize typography, layout, and colors. | |
| */ | |
| body { | |
| font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; | |
| margin: 0; | |
| padding: 2rem; | |
| background: #f9fafb; | |
| color: #0f172a; | |
| } | |
| h1 { | |
| font-size: 2.25rem; | |
| margin-bottom: 0.5rem; | |
| } | |
| p { | |
| font-size: 1rem; | |
| line-height: 1.6; | |
| } | |
| .welcome-card { | |
| /* Component styles can be added here */ | |
| } | |
| `},{path:"/scripts/main.js",content:`// Welcome to your project! | |
| // Use this file to add interactivity to your pages. | |
| document.addEventListener('DOMContentLoaded', () => { | |
| console.log('Project ready. Happy building!'); | |
| }); | |
| `},{path:"/templates/welcome-card.hbs",content:`<div class="welcome-card"> | |
| <h1>{{title}}</h1> | |
| <p>{{message}}</p> | |
| </div>`},{path:"/data.json",content:`{ | |
| "title": "Welcome", | |
| "message": "Start building your website!" | |
| }`}]};var r0=r(32623);async function r1(e,t,r,n){await r0.$.runWithSuppressedDirty(t,async()=>{for(let n of r.directories)await e.createDirectory(t,n);for(let n of r.files){let r=n.content;if(n.isBase64){let e=atob(n.content),t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);r=t.buffer}await e.createFile(t,n.path,r)}if(n&&n.length>0)for(let r of n)try{let n=await fetch(`${window.location.origin}/${r.filename}`);if(n.ok){let a=await n.arrayBuffer();await e.createFile(t,r.path,a)}}catch(e){}})}var r2=r(33135),r3=r(4950),r4=r(83721),r5=r(18853),r6="Switch",[r8,r9]=(0,J.A)(r6),[r7,ne]=r8(r6),nt=l.forwardRef((e,t)=>{let{__scopeSwitch:r,name:n,checked:a,defaultChecked:i,required:o,disabled:c,value:u="on",onCheckedChange:d,form:p,...h}=e,[m,f]=l.useState(null),g=(0,Y.s)(t,e=>f(e)),v=l.useRef(!1),x=!m||p||!!m.closest("form"),[y,b]=(0,X.i)({prop:a,defaultProp:i??!1,onChange:d,caller:r6});return(0,s.jsxs)(r7,{scope:r,checked:y,disabled:c,children:[(0,s.jsx)(Z.sG.button,{type:"button",role:"switch","aria-checked":y,"aria-required":o,"data-state":ni(y),"data-disabled":c?"":void 0,disabled:c,value:u,...h,ref:g,onClick:(0,K.mK)(e.onClick,e=>{b(e=>!e),x&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})}),x&&(0,s.jsx)(na,{control:m,bubbles:!v.current,name:n,value:u,checked:y,required:o,disabled:c,form:p,style:{transform:"translateX(-100%)"}})]})});nt.displayName=r6;var nr="SwitchThumb",nn=l.forwardRef((e,t)=>{let{__scopeSwitch:r,...n}=e,a=ne(nr,r);return(0,s.jsx)(Z.sG.span,{"data-state":ni(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})});nn.displayName=nr;var na=l.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...a},i)=>{let o=l.useRef(null),c=(0,Y.s)(o,i),u=(0,r4.Z)(r),d=(0,r5.X)(t);return l.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(u!==r&&t){let a=new Event("click",{bubbles:n});t.call(e,r),e.dispatchEvent(a)}},[u,r,n]),(0,s.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function ni(e){return e?"checked":"unchecked"}function no({className:e,...t}){return(0,s.jsx)(nt,{"data-slot":"switch",className:(0,h.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,s.jsx)(nn,{"data-slot":"switch-thumb",className:(0,h.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}na.displayName="SwitchBubbleInput";var ns=r(10218);let nl=(0,v.A)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);var nc=r(78272);let nu=(0,v.A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),nd=(0,v.A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var np=r(86884),nh=r(94084),nm=r.n(nh);class nf{static{this.BACKUP_VERSION="1.9.0"}static{this.FILE_EXTENSION=".osws"}static{this.MAX_IMPORT_SIZE=0x6400000}static async exportAllData(){try{h.v.info("Starting data export...");let e={version:this.BACKUP_VERSION,exportDate:new Date().toISOString(),databases:{vfs:await this.exportVFSData(),conversations:await this.exportConversationData(),checkpoints:await this.exportCheckpointData()},metadata:{projectCount:0,totalSize:0,exportedFrom:"deepstudio"}};e.metadata.projectCount=e.databases.vfs.projects.length,e.metadata.totalSize=this.calculateDataSize(e);let t=new(nm());t.file("backup.json",JSON.stringify(e,null,2));let r=await t.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:6}}),n=`oswstudio-backup-${new Date().toISOString().split("T")[0]}${this.FILE_EXTENSION}`;this.downloadBlob(r,n),h.v.info(`Export completed: ${e.metadata.projectCount} projects, ${this.formatBytes(e.metadata.totalSize)}`)}catch(e){throw h.v.error("Export failed:",e),Error(`Export failed: ${e instanceof Error?e.message:"Unknown error"}`)}}static async importAllData(e,t={mode:"merge"}){try{if(!e.name.endsWith(this.FILE_EXTENSION))throw Error(`Invalid file type. Expected ${this.FILE_EXTENSION} file.`);if(e.size>this.MAX_IMPORT_SIZE)throw Error(`File too large. Maximum size is ${this.formatBytes(this.MAX_IMPORT_SIZE)}.`);t.onProgress?.(10,"Reading backup file...");let r=new(nm()),n=(await r.loadAsync(e)).file("backup.json");if(!n)throw Error("Invalid backup file format.");let a=await n.async("string"),i=JSON.parse(a);this.validateBackupData(i),t.onProgress?.(30,"Validating backup data..."),"replace"===t.mode&&(t.onProgress?.(40,"Clearing existing data..."),await this.clearAllData()),t.onProgress?.(50,"Importing projects and files..."),await this.importVFSData(i.databases.vfs),t.onProgress?.(70,"Importing conversations..."),await this.importConversationData(i.databases.conversations),t.onProgress?.(90,"Importing checkpoints..."),await this.importCheckpointData(i.databases.checkpoints),t.onProgress?.(100,"Import completed successfully!"),h.v.info(`Import completed: ${i.metadata.projectCount} projects restored`)}catch(e){throw h.v.error("Import failed:",e),Error(`Import failed: ${e instanceof Error?e.message:"Unknown error"}`)}}static async validateBackupFile(e){try{if(!e.name.endsWith(this.FILE_EXTENSION))return{valid:!1,reason:"Invalid file extension"};if(e.size>this.MAX_IMPORT_SIZE)return{valid:!1,reason:"File too large"};let t=new(nm()),r=(await t.loadAsync(e)).file("backup.json");if(!r)return{valid:!1,reason:"Invalid backup file format"};let n=await r.async("string"),a=JSON.parse(n);return this.validateBackupData(a),{valid:!0,metadata:a.metadata}}catch(e){return{valid:!1,reason:e instanceof Error?e.message:"Unknown error"}}}static async exportVFSData(){let e={projects:[],files:[],fileTree:[]};return new Promise((t,r)=>{let n=indexedDB.open("deepstudio-vfs",1);n.onsuccess=async()=>{try{let r=n.result,a=r.transaction(["projects"],"readonly"),i=a.objectStore("projects").getAll();i.onsuccess=()=>{e.projects=i.result||[]};let o=r.transaction(["files"],"readonly"),s=o.objectStore("files").getAll();s.onsuccess=()=>{e.files=s.result||[]};let l=r.transaction(["fileTree"],"readonly"),c=l.objectStore("fileTree").getAll();c.onsuccess=()=>{e.fileTree=c.result||[]},await Promise.all([new Promise(e=>a.oncomplete=()=>e(void 0)),new Promise(e=>o.oncomplete=()=>e(void 0)),new Promise(e=>l.oncomplete=()=>e(void 0))]),t(e)}catch(e){r(e)}},n.onerror=()=>r(n.error)})}static async exportConversationData(){return new Promise((e,t)=>{let r=indexedDB.open("DeepStudioConversations",1);r.onsuccess=()=>{let n=r.result.transaction(["conversations"],"readonly").objectStore("conversations").getAll();n.onsuccess=()=>{e(n.result||[])},n.onerror=()=>t(n.error)},r.onerror=()=>t(r.error)})}static async exportCheckpointData(){return new Promise((e,t)=>{let r=indexedDB.open("DeepStudioCheckpoints",1);r.onsuccess=()=>{let n=r.result.transaction(["checkpoints"],"readonly").objectStore("checkpoints").getAll();n.onsuccess=()=>{e(n.result||[])},n.onerror=()=>t(n.error)},r.onerror=()=>t(r.error)})}static async importVFSData(e){return new Promise((t,r)=>{let n=indexedDB.open("deepstudio-vfs",1);n.onsuccess=async()=>{try{let r=n.result,a=r.transaction(["projects"],"readwrite").objectStore("projects");for(let t of e.projects)await new Promise((e,r)=>{let n=a.put(t);n.onsuccess=()=>e(),n.onerror=()=>r(n.error)});let i=r.transaction(["files"],"readwrite").objectStore("files");for(let t of e.files)await new Promise((e,r)=>{let n=i.put(t);n.onsuccess=()=>e(),n.onerror=()=>r(n.error)});let o=r.transaction(["fileTree"],"readwrite").objectStore("fileTree");for(let t of e.fileTree)await new Promise((e,r)=>{let n=o.put(t);n.onsuccess=()=>e(),n.onerror=()=>r(n.error)});t()}catch(e){r(e)}},n.onerror=()=>r(n.error)})}static async importConversationData(e){return new Promise((t,r)=>{let n=indexedDB.open("DeepStudioConversations",1);n.onsuccess=async()=>{try{let r=n.result.transaction(["conversations"],"readwrite").objectStore("conversations");for(let t of e)await new Promise((e,n)=>{let a=r.put(t);a.onsuccess=()=>e(),a.onerror=()=>n(a.error)});t()}catch(e){r(e)}},n.onerror=()=>r(n.error)})}static async importCheckpointData(e){return new Promise((t,r)=>{let n=indexedDB.open("DeepStudioCheckpoints",1);n.onsuccess=async()=>{try{let r=n.result.transaction(["checkpoints"],"readwrite").objectStore("checkpoints");for(let t of e)await new Promise((e,n)=>{let a=r.put(t);a.onsuccess=()=>e(),a.onerror=()=>n(a.error)});t()}catch(e){r(e)}},n.onerror=()=>r(n.error)})}static async clearAllData(){for(let e of["deepstudio-vfs","DeepStudioConversations","DeepStudioCheckpoints"])await new Promise((t,r)=>{let n=indexedDB.deleteDatabase(e);n.onsuccess=()=>t(),n.onerror=()=>r(n.error)})}static validateBackupData(e){if(!e.version||!e.exportDate||!e.databases||!e.metadata)throw Error("Invalid backup file structure");if(!e.databases.vfs||!e.databases.conversations||!e.databases.checkpoints)throw Error("Incomplete backup data");let t=e.version.split(".").map(Number),r=this.BACKUP_VERSION.split(".").map(Number);if(t[0]>r[0])throw Error(`Backup version ${e.version} is not compatible with current version ${this.BACKUP_VERSION}`)}static calculateDataSize(e){return JSON.stringify(e).length}static formatBytes(e){if(0===e)return"0 Bytes";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]}static downloadBlob(e,t){let r=URL.createObjectURL(e),n=document.createElement("a");n.href=r,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}}var ng=r(66156),nv="Collapsible",[nx,ny]=(0,J.A)(nv),[nb,nw]=nx(nv),nk=l.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:a,disabled:i,onOpenChange:o,...c}=e,[u,d]=(0,X.i)({prop:n,defaultProp:a??!1,onChange:o,caller:nv});return(0,s.jsx)(nb,{scope:r,disabled:i,contentId:(0,ea.B)(),open:u,onOpenToggle:l.useCallback(()=>d(e=>!e),[d]),children:(0,s.jsx)(Z.sG.div,{"data-state":nD(u),"data-disabled":i?"":void 0,...c,ref:t})})});nk.displayName=nv;var nj="CollapsibleTrigger",nN=l.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,a=nw(nj,r);return(0,s.jsx)(Z.sG.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":nD(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...n,ref:t,onClick:(0,K.mK)(e.onClick,a.onOpenToggle)})});nN.displayName=nj;var nC="CollapsibleContent",nS=l.forwardRef((e,t)=>{let{forceMount:r,...n}=e,a=nw(nC,e.__scopeCollapsible);return(0,s.jsx)(es.C,{present:r||a.open,children:({present:e})=>(0,s.jsx)(nE,{...n,ref:t,present:e})})});nS.displayName=nC;var nE=l.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:a,...i}=e,o=nw(nC,r),[c,u]=l.useState(n),d=l.useRef(null),p=(0,Y.s)(t,d),h=l.useRef(0),m=h.current,f=l.useRef(0),g=f.current,v=o.open||c,x=l.useRef(v),y=l.useRef(void 0);return l.useEffect(()=>{let e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,ng.N)(()=>{let e=d.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();h.current=t.height,f.current=t.width,x.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),u(n)}},[o.open,n]),(0,s.jsx)(Z.sG.div,{"data-state":nD(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!v,...i,ref:p,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:v&&a})});function nD(e){return e?"open":"closed"}function nM({...e}){return(0,s.jsx)(nk,{"data-slot":"collapsible",...e})}function nP({...e}){return(0,s.jsx)(nN,{"data-slot":"collapsible-trigger",...e})}function nT({...e}){return(0,s.jsx)(nS,{"data-slot":"collapsible-content",...e})}function nI({onClose:e}){let[t,r]=(0,l.useState)({}),[n,a]=(0,l.useState)({}),{theme:i,setTheme:o}=(0,ns.D)(),[c,u]=(0,l.useState)(!1),[d,p]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[v,x]=(0,l.useState)(!1),[y,b]=(0,l.useState)(0),[w,k]=(0,l.useState)(""),[j,N]=(0,l.useState)({application:!0,costTracking:!1,dataManagement:!1}),C=(e,t)=>{r3.s.setSetting(e,t),r(r=>({...r,[e]:t}))},E=async()=>{try{g(!0),await nf.exportAllData(),tV.oR.success("Data exported successfully!")}catch(e){tV.oR.error(e instanceof Error?e.message:"Export failed")}finally{g(!1)}},D=e=>{N(t=>({...t,[e]:!t[e]}))};return(0,s.jsxs)("div",{className:"max-h-[calc(100vh-4rem)] overflow-y-auto",children:[(0,s.jsxs)("div",{className:"space-y-3 pb-4",children:[(0,s.jsxs)(nM,{open:j.application,onOpenChange:()=>D("application"),children:[(0,s.jsxs)(nP,{className:"flex items-center justify-between w-full p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(nl,{className:"h-4 w-4"}),(0,s.jsx)("h4",{className:"font-medium text-sm",children:"Application Settings"})]}),(0,s.jsx)(nc.A,{className:`h-4 w-4 transition-transform duration-200 ${j.application?"rotate-180":""}`})]}),(0,s.jsxs)(nT,{className:"px-3 pt-2 pb-3",children:[(0,s.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Configure your preferences and display options"}),(0,s.jsx)("div",{className:"space-y-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(rX.J,{htmlFor:"theme",children:"Theme"}),(0,s.jsxs)(t2.l6,{value:c?i:"dark",onValueChange:e=>{o(e),C("theme",e)},children:[(0,s.jsx)(t2.bq,{id:"theme",className:"mt-2",children:(0,s.jsx)(t2.yv,{})}),(0,s.jsxs)(t2.gC,{children:[(0,s.jsx)(t2.eb,{value:"light",children:"Light"}),(0,s.jsx)(t2.eb,{value:"dark",children:"Dark"}),(0,s.jsx)(t2.eb,{value:"system",children:"System"})]})]})]})})]})]}),(0,s.jsxs)(nM,{open:j.costTracking,onOpenChange:()=>D("costTracking"),children:[(0,s.jsxs)(nP,{className:"flex items-center justify-between w-full p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(S,{className:"h-4 w-4"}),(0,s.jsx)("h4",{className:"font-medium text-sm",children:"Cost Tracking"})]}),(0,s.jsx)(nc.A,{className:`h-4 w-4 transition-transform duration-200 ${j.costTracking?"rotate-180":""}`})]}),(0,s.jsx)(nT,{className:"px-3 pt-2 pb-3",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(rX.J,{htmlFor:"show-costs",children:"Display Costs"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Show cost information in messages"})]}),(0,s.jsx)(no,{id:"show-costs",checked:!1!==n.showCosts,onCheckedChange:e=>{let t={...n,showCosts:e};r3.s.setCostSettings(t),a(t)}})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(rX.J,{htmlFor:"daily-limit",children:"Daily Cost Limit (USD)"}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[(0,s.jsx)(f.p,{id:"daily-limit",type:"number",min:"0",step:"0.01",placeholder:"No limit",value:n.dailyLimit||"",onChange:e=>{let t=e.target.value?parseFloat(e.target.value):void 0,r={...n,dailyLimit:t};r3.s.setCostSettings(r),a(r)}}),n.dailyLimit&&(0,s.jsxs)("span",{className:"text-sm text-muted-foreground",children:["$",n.dailyLimit.toFixed(2),"/day"]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(rX.J,{htmlFor:"project-limit",children:"Project Cost Limit (USD)"}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[(0,s.jsx)(f.p,{id:"project-limit",type:"number",min:"0",step:"0.01",placeholder:"No limit",value:n.projectLimit||"",onChange:e=>{let t=e.target.value?parseFloat(e.target.value):void 0,r={...n,projectLimit:t};r3.s.setCostSettings(r),a(r)}}),n.projectLimit&&(0,s.jsxs)("span",{className:"text-sm text-muted-foreground",children:["$",n.projectLimit.toFixed(2),"/project"]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(rX.J,{htmlFor:"warning-threshold",children:"Warning Threshold (%)"}),(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[(0,s.jsx)(f.p,{id:"warning-threshold",type:"number",min:"50",max:"100",step:"5",value:n.warningThreshold||80,onChange:e=>{let t=parseInt(e.target.value),r={...n,warningThreshold:t};r3.s.setCostSettings(r),a(r)}}),(0,s.jsxs)("span",{className:"text-sm text-muted-foreground flex items-center gap-1",children:[(0,s.jsx)(nu,{className:"h-3 w-3"}),"Warn at ",n.warningThreshold||80,"%"]})]})]}),(0,s.jsx)("div",{className:"border-t pt-3 mt-3",children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"Lifetime Total"}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:np.U.formatCost(r3.s.getLifetimeCosts().total)})]}),(0,s.jsx)(m.$,{variant:"outline",size:"sm",onClick:()=>{confirm("Reset lifetime cost tracking? This cannot be undone.")&&(r3.s.resetLifetimeCosts(),tV.oR.success("Lifetime costs reset"))},children:"Reset Stats"})]})})]})})]}),(0,s.jsxs)(nM,{open:j.dataManagement,onOpenChange:()=>D("dataManagement"),children:[(0,s.jsxs)(nP,{className:"flex items-center justify-between w-full p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(nd,{className:"h-4 w-4"}),(0,s.jsx)("h4",{className:"font-medium text-sm",children:"Data Management"})]}),(0,s.jsx)(nc.A,{className:`h-4 w-4 transition-transform duration-200 ${j.dataManagement?"rotate-180":""}`})]}),(0,s.jsxs)(nT,{className:"px-3 pt-2 pb-3",children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground mb-4",children:"Backup and restore your projects, conversations, and settings. Use this to migrate your data to OSWStudio or create backups."}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"Export All Data"}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Download a backup file containing all your projects and data"})]}),(0,s.jsxs)(m.$,{variant:"outline",size:"sm",onClick:E,disabled:h,className:"flex items-center gap-2",children:[(0,s.jsx)(T,{className:"h-4 w-4"}),h?"Exporting...":"Export"]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"Import Data"}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Restore from a .osws backup file"})]}),(0,s.jsxs)(m.$,{variant:"outline",size:"sm",onClick:()=>{let e=document.createElement("input");e.type="file",e.accept=".osws",e.onchange=async e=>{let t=e.target.files?.[0];if(t)try{x(!0),b(0),k("Validating file...");let e=await nf.validateBackupFile(t);if(!e.valid)return void tV.oR.error(`Invalid backup file: ${e.reason}`);let r=confirm(`Import ${e.metadata?.projectCount||0} projects? | |
| Choose OK to REPLACE all current data, or Cancel to MERGE with existing data.`);await nf.importAllData(t,{mode:r?"replace":"merge",onProgress:(e,t)=>{b(e),k(t)}}),tV.oR.success("Data imported successfully!"),setTimeout(()=>window.location.reload(),1e3)}catch(e){tV.oR.error(e instanceof Error?e.message:"Import failed")}finally{x(!1),b(0),k("")}},e.click()},disabled:v,className:"flex items-center gap-2",children:[(0,s.jsx)(r$,{className:"h-4 w-4"}),v?"Importing...":"Import"]})]}),v&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,s.jsx)("span",{children:w}),(0,s.jsxs)("span",{children:[y,"%"]})]}),(0,s.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,s.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${y}%`}})})]})]})]})]})]}),(0,s.jsxs)("div",{className:"flex justify-between pt-4 px-3 border-t mt-4",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(m.$,{variant:"destructive",onClick:()=>{confirm("Are you sure you want to clear all settings?")&&(r3.s.clearSettings(),r({}),tV.oR.success("Settings cleared"))},children:"Clear All Settings"}),(0,s.jsxs)(m.$,{variant:"outline",onClick:()=>p(!0),children:[(0,s.jsx)(rH,{className:"mr-2 h-4 w-4"}),"About DeepStudio"]})]}),e&&(0,s.jsx)(m.$,{onClick:e,children:"Close"})]}),(0,s.jsx)(rq,{open:d,onOpenChange:p})]})}let nA=[{id:"welcome",title:"Welcome to DeepStudio",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsx)("p",{children:"Let's take a guided tour of the workspace so you can see how projects, agents, and saves all fit together."}),(0,s.jsx)("p",{children:"The tour takes under two minutes and you can skip at any time."})]}),location:"project-manager",primaryLabel:"Start tour",secondaryLabel:"Skip"},{id:"projects-overview",title:"Projects at a Glance",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsx)("p",{children:"This is your project gallery. Recent work appears here with quick actions for opening, duplicating, or exporting."}),(0,s.jsx)("p",{children:"I've loaded a demo project so you can explore without setting anything up."})]}),location:"project-manager",target:'[data-tour-id="projects-list"]',showBack:!0,primaryLabel:"Next",secondaryLabel:"Skip"},{id:"create-project",title:"Creating a Project",body:(0,s.jsx)("div",{className:"space-y-2 text-sm text-muted-foreground",children:(0,s.jsx)("p",{children:"Use the New Project button to start fresh. The dialog lets you name the project and add an optional description."})}),location:"project-manager",target:'[data-tour-id="new-project-button"]',showBack:!0,primaryLabel:"Next",secondaryLabel:"Skip"},{id:"project-controls",title:"Exporting a Project",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsx)("p",{children:"Click the dropdown menu on any project card to access export options. You can export as a ZIP for deployment or JSON for backup."}),(0,s.jsx)("p",{children:"Projects can also be duplicated or deleted from this menu."})]}),location:"project-manager",target:'[data-tour-id="project-export-json"]',showBack:!0,primaryLabel:"Next",secondaryLabel:"Skip"},{id:"edit-project",title:"Editing a Project",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsx)("p",{children:"To get to the workspace and start editing, simply click on the project card. This will open the full development environment."}),(0,s.jsx)("p",{children:"Click Next to enter the workspace and continue the tour."})]}),location:"project-manager",target:'[data-tour-id="project-card"]',showBack:!0,primaryLabel:"Next",secondaryLabel:"Skip"},{id:"workspace-overview",title:"Workspace Layout",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsx)("p",{children:"The workspace has four main areas: the assistant conversation, the virtual file explorer, your editor tabs, and the live preview."}),(0,s.jsx)("p",{children:"The VFS works like a project file tree—add HTML, CSS, JS, or assets and the agent can edit them just like local files."})]}),location:"workspace",target:'[data-tour-id="workspace-panels"]',showBack:!0,primaryLabel:"Next",secondaryLabel:"Skip"},{id:"workspace-edit",title:"See the Agent in Action",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsx)("p",{children:'I\'ll request the agent to change the color of "Our Services" button to a green accent and the agent performs the task.'}),(0,s.jsx)("p",{children:"This mimics what you will see when asking the agent to perform tasks."})]}),location:"workspace",target:'[data-tour-id="assistant-panel"]',showBack:!0,primaryLabel:"Next",secondaryLabel:"Skip"},{id:"workspace-focus",title:"Element Focus Tool",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsx)("p",{children:"The crosshair tool in the preview panel lets you select and focus on specific elements in your design."}),(0,s.jsx)("p",{children:"Click it to activate element selection mode, then click any element in the preview to highlight it."})]}),location:"workspace",target:'[data-tour-id="focus-crosshair-button"]',showBack:!0,primaryLabel:"Next",secondaryLabel:"Skip"},{id:"workspace-checkpoint",title:"Checkpoints & Manual Saves",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsx)("p",{children:'The "Discard Changes" button restores to the original saved point, letting you revert any changes back to your last manual save.'}),(0,s.jsx)("p",{children:"If you like the result, use the Save button to lock it in as your manual checkpoint."})]}),location:"workspace",target:'[data-tour-id="discard-changes-button"]',showBack:!0,primaryLabel:"Next",secondaryLabel:"Skip"},{id:"clear-conversation",title:"Clear Conversation",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsx)("p",{children:"The agent will have the last tasks and responses in memory. You can clear it with the trashcan button to start fresh."}),(0,s.jsx)("p",{children:"This removes the conversation history but keeps your project files intact."})]}),location:"workspace",target:'[data-tour-id="clear-chat-button"]',showBack:!0,primaryLabel:"Next",secondaryLabel:"Skip"},{id:"provider-settings",title:"Connect Your Provider",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsxs)("p",{children:["Set your API key under Settings → Provider. I recommend trying OpenRouter with the ",(0,s.jsx)("code",{children:"gpt-oss-120b"})," model, but you can use any supported provider."]}),(0,s.jsx)("p",{children:"You can return here anytime from the header menu."}),(0,s.jsx)("p",{className:"text-xs text-orange-500/90",children:"Privacy note: Remote LLM providers (OpenAI, Anthropic, etc.) will receive your code when generating. For complete privacy, use local models with Ollama or LM Studio."})]}),location:"workspace",target:'[data-tour-id="provider-settings-trigger"]',showBack:!0,primaryLabel:"Next",secondaryLabel:"Skip"},{id:"wrap-up",title:"You're Ready!",body:(0,s.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,s.jsx)("p",{children:"That's the basics—prompt the agent, preview updates, and save when you're happy. You can replay this tour from the Help menu anytime."}),(0,s.jsx)("p",{children:"Have fun building! Let me know what you ship."})]}),location:"workspace",showBack:!0,primaryLabel:"Finish",secondaryLabel:"Skip"}];var nR=r(25495),nL=r(94742);let nz=(0,l.createContext)(null);function nO({children:e}){let[t,r]=(0,l.useState)("idle"),[n,a]=(0,l.useState)(0),[i,o]=(0,l.useState)(0),[c,u]=(0,l.useState)([]),[d,p]=(0,l.useState)(!1),[h,m]=(0,l.useState)([]),[f,g]=(0,l.useState)(null),[v,x]=(0,l.useState)({projectId:null,preCheckpointId:null,postCheckpointId:null,originalCss:null,updatedCss:null}),y=(0,l.useRef)(v),b=(0,l.useRef)(null),w=(0,l.useRef)(null),k=(0,l.useRef)(null),j=(0,l.useRef)(null),N=(0,l.useRef)(null),C=(0,l.useRef)(null),S=(0,l.useMemo)(()=>(function(e){if(!(e<0)&&!(e>=nA.length))return nA[e]})(n),[n]),E=(0,l.useCallback)(()=>{x({projectId:null,preCheckpointId:null,postCheckpointId:null,originalCss:null,updatedCss:null}),b.current=null,w.current=null,k.current=null,j.current=null},[]),D=(0,l.useCallback)(()=>{"running"!==t&&(r("running"),a(0),o(e=>e+1),u([]),E())},[E,t]),M=(0,l.useCallback)(e=>{C.current=e},[]),P=(0,l.useCallback)((e="finish")=>{let t=y.current;t.projectId&&t.preCheckpointId&&t.postCheckpointId&&r0.$.runWithSuppressedDirty(t.projectId,async()=>{await nL.Y.restoreCheckpoint(t.preCheckpointId)}).then(()=>{}).catch(e=>{console.error("[GuidedTour] Failed to restore baseline during cleanup",e)}),E(),u([]),a(0),o(e=>e+1),r("finish"===e?"completed":"idle"),r3.s.setHasSeenTour(!0),N.current?.abort(),C.current=null},[E]),T=(0,l.useCallback)(()=>{P("skip")},[P]),I=(0,l.useCallback)(()=>{a(e=>{let t=e+1;return t>=nA.length?(P(),e):(o(e=>e+1),t)})},[P]),A=(0,l.useCallback)(()=>{a(e=>{let t=Math.max(0,e-1);return t!==e&&o(e=>e+1),t})},[]),R=(0,l.useMemo)(()=>({state:{status:t,stepIndex:n,stepKey:i,currentStep:S,transcript:c,isBusy:d,projectList:h},start:D,skip:T,next:I,previous:A,setProjectList:e=>{m(e)},setActiveProjectId:g,setTranscript:u,setWorkspaceHandler:M}),[t,n,i,S,c,d,h,D,T,I,A,M]);return(0,s.jsx)(nz.Provider,{value:R,children:e})}function nF(){let e=(0,l.useContext)(nz);if(!e)throw Error("useGuidedTour must be used within a GuidedTourProvider");return e}var n_=r(41862);function nq({location:e}){let{state:t,next:r,previous:n,skip:a}=nF(),{status:i,currentStep:o,stepKey:c,isBusy:u,stepIndex:d}=t,[p,h]=(0,l.useState)(null),f=nA.length,g=(0,l.useMemo)(()=>!!o&&!!u&&("workspace-edit"===o.id||"workspace-focus"===o.id||"workspace-checkpoint"===o.id),[o,u]);if("running"!==i||!o||o.location!==e)return null;let v=o.primaryLabel??"Next",x=o.secondaryLabel??"Skip";return(0,s.jsxs)("div",{className:"fixed inset-0 z-[2000] pointer-events-auto",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-background/30"}),p&&(0,s.jsx)("div",{className:"pointer-events-none fixed rounded-xl border-2 border-primary ring-4 ring-primary/30 transition-all animate-ring-opacity",style:{top:p.top,left:p.left,width:p.width,height:p.height}}),(0,s.jsx)("div",{className:"absolute bottom-10 left-1/2 flex w-full max-w-xl -translate-x-1/2 flex-col gap-4 px-4",children:(0,s.jsxs)("div",{className:"pointer-events-auto rounded-2xl border bg-background/95 p-6 shadow-2xl",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-foreground",children:o.title}),(0,s.jsxs)("span",{className:"text-sm text-muted-foreground font-medium",children:[d+1,"/",f]})]}),(0,s.jsx)("div",{className:"mt-2 text-sm leading-relaxed text-muted-foreground",children:o.body})]}),u&&(0,s.jsx)(n_.A,{className:"h-5 w-5 animate-spin text-primary"})]}),(0,s.jsxs)("div",{className:"mt-6 flex items-center justify-between",children:[o.showBack?(0,s.jsx)(m.$,{variant:"ghost",onClick:n,disabled:u,children:"Back"}):(0,s.jsx)("div",{}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(m.$,{variant:"ghost",onClick:a,children:x}),(0,s.jsx)(m.$,{onClick:r,disabled:g,children:v})]})]})]})})]})}function nB({onProjectSelect:e,bannerRef:t}){(0,d.useRouter)();let[r,n]=(0,l.useState)([]),[a,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(""),[u,v]=(0,l.useState)(!1),[x,y]=(0,l.useState)(""),[b,w]=(0,l.useState)(""),[k,j]=(0,l.useState)("blank"),[C,S]=(0,l.useState)("updated"),[E,D]=(0,l.useState)("grid"),[M,P]=(0,l.useState)(null),[T,I]=(0,l.useState)(!1),{state:A,setProjectList:R,start:L}=nF(),z=A.currentStep?.id,O="running"===A.status,[F,_]=(0,l.useState)(!1),[q,B]=(0,l.useState)(null),$=(0,l.useRef)(!1);(0,l.useRef)(!1),(0,l.useCallback)(async()=>{if(!$.current){$.current=!0,i(!0);try{await p.OP.init();let e=(await p.OP.listProjects()).sort((e,t)=>t.updatedAt.getTime()-e.updatedAt.getTime());n(e),R(e)}catch(e){h.v.error("Failed to load projects:",e),tV.oR.error("Failed to load projects")}finally{i(!1),_(!0),$.current=!1}}},[R]);let U=(0,l.useCallback)(async()=>{try{await p.OP.init();let e=(await p.OP.listProjects()).sort((e,t)=>t.updatedAt.getTime()-e.updatedAt.getTime());n(e),R(e)}catch(e){h.v.error("Failed to reload projects:",e),tV.oR.error("Failed to reload projects")}},[R]),H=async()=>{if(!x.trim())return void tV.oR.error("Please enter a project name");if(x.length>50)return void tV.oR.error("Project name must be 50 characters or less");if(b.length>200)return void tV.oR.error("Description must be 200 characters or less");try{let t=await p.OP.createProject(x.trim().slice(0,50),b.trim().slice(0,200)||void 0);"demo"===k?await r1(p.OP,t.id,rZ,rZ.assets):await r1(p.OP,t.id,rQ),tV.oR.success("Project created successfully"),v(!1),y(""),w(""),j("blank"),await U(),e(t)}catch(e){h.v.error("Failed to create project:",e),tV.oR.error("Failed to create project")}},V=async e=>{if(confirm(`Are you sure you want to delete "${e.name}"? This cannot be undone.`))try{await p.OP.deleteProject(e.id),tV.oR.success("Project deleted"),await U()}catch(e){h.v.error("Failed to delete project:",e),tV.oR.error("Failed to delete project")}},W=async t=>{try{let r=await p.OP.duplicateProject(t.id);tV.oR.success("Project duplicated successfully"),await U(),e(r)}catch(e){h.v.error("Failed to duplicate project:",e),tV.oR.error("Failed to duplicate project")}},G=async e=>{try{let t=await p.OP.exportProject(e.id),r=JSON.stringify(t,null,2),n=new Blob([r],{type:"application/json"}),a=URL.createObjectURL(n),i=document.createElement("a");i.href=a,i.download=`${e.name.replace(/\s+/g,"-")}-export.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(a),tV.oR.success("Project exported")}catch(e){h.v.error("Failed to export project:",e),tV.oR.error("Failed to export project")}},K=async e=>{try{let t=await p.OP.exportProjectAsZip(e.id),r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=`${e.name.replace(/\s+/g,"-")}.zip`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r),tV.oR.success("Project exported as ZIP")}catch(e){h.v.error("Failed to export project as ZIP:",e),tV.oR.error("Failed to export project as ZIP")}},Y=((e,t)=>{let r=[...e];switch(t){case"updated":return r.sort((e,t)=>t.updatedAt.getTime()-e.updatedAt.getTime());case"created":return r.sort((e,t)=>t.createdAt.getTime()-e.createdAt.getTime());case"name":return r.sort((e,t)=>e.name.localeCompare(t.name));case"size":return r.sort((e,t)=>t.updatedAt.getTime()-e.updatedAt.getTime());default:return r}})(r.filter(e=>e.name.toLowerCase().includes(o.toLowerCase())||e.description?.toLowerCase().includes(o.toLowerCase())),C);if(a&&!F)return(0,s.jsx)("div",{className:"flex items-center justify-center h-screen",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"}),(0,s.jsx)("p",{className:"mt-4",children:"Loading projects..."})]})});let J=[{id:"new-project",label:"New Project",icon:rB,onClick:()=>t.current?.bounce(),content:(0,s.jsxs)(m.$,{variant:"outline",size:"sm",onClick:()=>t.current?.bounce(),"data-tour-id":"new-project-button",className:"justify-start",children:[(0,s.jsx)(rB,{className:"mr-2 h-4 w-4"}),"New Project"]})},{id:"import",label:"Import",icon:r$,onClick:()=>t.current?.bounce(),variant:"outline"}],X=(0,s.jsxs)(r2.AM,{children:[(0,s.jsx)(r2.Wv,{asChild:!0,children:(0,s.jsx)(m.$,{variant:"outline",size:"icon",className:"h-8 w-8",children:(0,s.jsx)(rU,{className:"h-4 w-4"})})}),(0,s.jsx)(r2.hl,{className:"w-96",align:"end",children:(0,s.jsx)(nI,{})})]}),Z=(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)(r2.AM,{children:[(0,s.jsx)(r2.Wv,{asChild:!0,children:(0,s.jsxs)(m.$,{variant:"outline",size:"sm",className:"w-full justify-start",children:[(0,s.jsx)(rU,{className:"mr-2 h-4 w-4"}),"Settings"]})}),(0,s.jsx)(r2.hl,{className:"w-[calc(100vw-2rem)]",align:"start",children:(0,s.jsx)(nI,{})})]}),(0,s.jsx)("div",{className:"border-t my-2"}),(0,s.jsxs)(m.$,{variant:"outline",size:"sm",onClick:()=>t.current?.bounce(),className:"w-full justify-start","data-tour-id":"footer-guided-tour",children:[(0,s.jsx)(rH,{className:"mr-2 h-4 w-4"}),"Guided Tour"]}),(0,s.jsxs)(m.$,{variant:"outline",size:"sm",onClick:()=>t.current?.bounce(),className:"w-full justify-start",children:[(0,s.jsx)(rV,{className:"mr-2 h-4 w-4"}),"Model Tester"]}),(0,s.jsxs)(m.$,{variant:"outline",size:"sm",onClick:()=>t.current?.bounce(),className:"w-full justify-start",children:[(0,s.jsx)(rH,{className:"mr-2 h-4 w-4"}),"About DeepStudio"]}),(0,s.jsx)(m.$,{variant:"outline",size:"sm",asChild:!0,className:"w-full justify-start",children:(0,s.jsxs)("a",{href:"https://huggingface.co/spaces/otst/osw-studio",target:"_blank",rel:"noopener noreferrer",children:[(0,s.jsx)(rF,{className:"mr-2 h-4 w-4"}),"OSW Studio"]})})]});return(0,s.jsxs)("div",{className:"flex flex-col h-[100dvh]",style:{background:"linear-gradient(var(--project-background-tint), var(--project-background-tint)), var(--background)"},children:[(0,s.jsx)(rJ.j,{onLogoClick:()=>I(!0),actions:J,mobileMenuContent:Z,desktopOnlyContent:X,leftText:"DeepStudio"}),(0,s.jsx)("main",{className:"flex-1 min-h-0 overflow-auto",children:(0,s.jsxs)("div",{className:"container mx-auto p-6 max-w-6xl",children:[(0,s.jsx)("div",{className:"mb-6 space-y-4",children:(0,s.jsxs)("div",{className:"flex flex-col md:flex-row gap-4","data-tour-id":"projects-actions",children:[(0,s.jsxs)("div",{className:"relative flex-1",children:[(0,s.jsx)(rW.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground h-4 w-4"}),(0,s.jsx)(f.p,{placeholder:"Search projects...",value:o,onChange:e=>c(e.target.value),className:"pl-10 bg-card"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)(t2.l6,{value:C,onValueChange:e=>S(e),children:[(0,s.jsxs)(t2.bq,{className:"flex-1 md:w-[180px] bg-card",children:[(0,s.jsx)(rG,{className:"h-4 w-4 mr-2"}),(0,s.jsx)(t2.yv,{placeholder:"Sort by..."})]}),(0,s.jsxs)(t2.gC,{children:[(0,s.jsx)(t2.eb,{value:"updated",children:"Last Updated"}),(0,s.jsx)(t2.eb,{value:"created",children:"Date Created"}),(0,s.jsx)(t2.eb,{value:"name",children:"Name"})]})]}),(0,s.jsxs)("div",{className:"flex gap-0.5 border rounded-sm p-1 bg-card h-9",children:[(0,s.jsx)(m.$,{size:"icon",variant:"grid"===E?"default":"ghost",className:"h-full w-8 rounded-sm",onClick:()=>D("grid"),children:(0,s.jsx)(rK,{className:"h-4 w-4"})}),(0,s.jsx)(m.$,{size:"icon",variant:"list"===E?"default":"ghost",className:"h-full w-8 rounded-sm",onClick:()=>D("list"),children:(0,s.jsx)(rY,{className:"h-4 w-4"})})]})]})]})}),0===Y.length?(0,s.jsxs)("div",{className:"text-center py-12",children:[(0,s.jsx)(N,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,s.jsx)("h2",{className:"text-xl font-semibold mb-2",children:o?"No projects found":"No projects yet"}),(0,s.jsx)("p",{className:"text-muted-foreground mb-6",children:o?"Try a different search term":"Create your first project to get started"}),!o&&(0,s.jsxs)("div",{className:"flex gap-3 justify-center",children:[(0,s.jsxs)(m.$,{onClick:()=>t.current?.bounce(),children:[(0,s.jsx)(rB,{className:"mr-2 h-4 w-4"}),"Create Project"]}),(0,s.jsxs)(m.$,{variant:"outline",onClick:()=>t.current?.bounce(),children:[(0,s.jsx)(N,{className:"mr-2 h-4 w-4"}),"Create Demo Project"]})]})]}):(0,s.jsx)("div",{className:"grid"===E?"grid gap-4 md:grid-cols-2 lg:grid-cols-3":"space-y-3","data-tour-id":"projects-list",children:Y.map(t=>"object"==typeof t&&t.id&&t.name?(0,s.jsx)(tW,{project:t,onSelect:e,onDelete:V,onExport:G,onExportZip:K,onDuplicate:W,onPreview:P,onUpdate:e=>{n(r.map(t=>t.id===e.id?e:t))},viewMode:E,forceMenuOpen:q===t.id,highlightExport:O&&"project-controls"===z&&q===t.id},t.id):(h.v.error("Invalid project object:",t),null))})]})}),(0,s.jsx)("footer",{className:"hidden md:block border-t bg-card/50 py-3 px-6",children:(0,s.jsxs)("div",{className:"flex justify-center gap-2",children:[(0,s.jsxs)(m.$,{variant:"outline",size:"sm",onClick:()=>t.current?.bounce(),"data-tour-id":"footer-guided-tour",children:[(0,s.jsx)(rH,{className:"mr-2 h-4 w-4"}),"Guided Tour"]}),(0,s.jsxs)(m.$,{variant:"outline",size:"sm",onClick:()=>t.current?.bounce(),children:[(0,s.jsx)(rV,{className:"mr-2 h-4 w-4"}),"Model Tester"]}),(0,s.jsxs)(m.$,{variant:"outline",size:"sm",onClick:()=>t.current?.bounce(),children:[(0,s.jsx)(rH,{className:"mr-2 h-4 w-4"}),"About DeepStudio"]}),(0,s.jsx)(m.$,{variant:"outline",size:"sm",asChild:!0,children:(0,s.jsxs)("a",{href:"https://huggingface.co/spaces/otst/osw-studio",target:"_blank",rel:"noopener noreferrer",children:[(0,s.jsx)(rF,{className:"mr-2 h-4 w-4"}),"OSW Studio"]})})]})}),(0,s.jsx)(rD,{open:u,onOpenChange:v,children:(0,s.jsxs)(rT,{children:[(0,s.jsxs)(rI,{children:[(0,s.jsx)(rR,{children:"Create New Project"}),(0,s.jsx)(rL,{children:"Start a new multipage website project"})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(rX.J,{htmlFor:"name",children:"Project Name"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:[x.length,"/50"]})]}),(0,s.jsx)(f.p,{id:"name",value:x,onChange:e=>y(e.target.value.slice(0,50)),placeholder:"My Awesome Website",className:"mt-2",maxLength:50})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(rX.J,{htmlFor:"template",children:"Template"}),(0,s.jsxs)(t2.l6,{value:k,onValueChange:e=>j(e),children:[(0,s.jsx)(t2.bq,{id:"template",className:"mt-2",children:(0,s.jsx)(t2.yv,{placeholder:"Select a template"})}),(0,s.jsxs)(t2.gC,{children:[(0,s.jsx)(t2.eb,{value:"blank",children:"Blank (HTML/CSS/JS starter)"}),(0,s.jsx)(t2.eb,{value:"demo",children:"Demo (multi-page example)"})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(rX.J,{htmlFor:"description",children:"Description (optional)"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:[b.length,"/200"]})]}),(0,s.jsx)(g,{id:"description",value:b,onChange:e=>w(e.target.value.slice(0,200)),placeholder:"A brief description of your project",className:"mt-2 resize-none",rows:3,maxLength:200})]})]}),(0,s.jsxs)(rA,{children:[(0,s.jsx)(m.$,{variant:"outline",onClick:()=>v(!1),children:"Cancel"}),(0,s.jsx)(m.$,{onClick:H,children:"Create Project"})]})]})}),M&&(0,s.jsx)(rD,{open:!!M,onOpenChange:()=>P(null),children:(0,s.jsxs)(rT,{className:"max-w-[90vw] sm:max-w-[85vw] lg:max-w-[80vw] 2xl:max-w-[1400px] max-h-[90vh] w-full h-full p-0 flex flex-col",children:[(0,s.jsx)(rI,{className:"p-4 border-b",children:(0,s.jsxs)(rR,{children:["Preview: ",M.name]})}),(0,s.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,s.jsx)(t4,{projectId:M.id})})]})}),(0,s.jsx)(rq,{open:T,onOpenChange:I}),(0,s.jsx)(nq,{location:"project-manager"})]})}var n$=r(24923);let nU=(0,v.A)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),nH=(0,v.A)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]),nV=(0,v.A)("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),nW=(0,v.A)("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);var nG="ContextMenu",[nK,nY]=(0,J.A)(nG,[eF]),nJ=eF(),[nX,nZ]=nK(nG),nQ=e=>{let{__scopeContextMenu:t,children:r,onOpenChange:n,dir:a,modal:i=!0}=e,[o,c]=l.useState(!1),u=nJ(t),d=(0,el.c)(n),p=l.useCallback(e=>{c(e),d(e)},[d]);return(0,s.jsx)(nX,{scope:t,open:o,onOpenChange:p,modal:i,children:(0,s.jsx)(eV,{...u,dir:a,open:o,onOpenChange:p,modal:i,children:r})})};nQ.displayName=nG;var n0="ContextMenuTrigger",n1=l.forwardRef((e,t)=>{let{__scopeContextMenu:r,disabled:n=!1,...a}=e,i=nZ(n0,r),o=nJ(r),c=l.useRef({x:0,y:0}),u=l.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),d=l.useRef(0),p=l.useCallback(()=>window.clearTimeout(d.current),[]),h=e=>{c.current={x:e.clientX,y:e.clientY},i.onOpenChange(!0)};return l.useEffect(()=>p,[p]),l.useEffect(()=>void(n&&p()),[n,p]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eW,{...o,virtualRef:u}),(0,s.jsx)(Z.sG.span,{"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,...a,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:n?e.onContextMenu:(0,K.mK)(e.onContextMenu,e=>{p(),h(e),e.preventDefault()}),onPointerDown:n?e.onPointerDown:(0,K.mK)(e.onPointerDown,aa(e=>{p(),d.current=window.setTimeout(()=>h(e),700)})),onPointerMove:n?e.onPointerMove:(0,K.mK)(e.onPointerMove,aa(p)),onPointerCancel:n?e.onPointerCancel:(0,K.mK)(e.onPointerCancel,aa(p)),onPointerUp:n?e.onPointerUp:(0,K.mK)(e.onPointerUp,aa(p))})]})});n1.displayName=n0;var n2=e=>{let{__scopeContextMenu:t,...r}=e,n=nJ(t);return(0,s.jsx)(eJ,{...n,...r})};n2.displayName="ContextMenuPortal";var n3="ContextMenuContent",n4=l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nZ(n3,r),i=nJ(r),o=l.useRef(!1);return(0,s.jsx)(e0,{...i,...n,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||a.modal||(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});n4.displayName=n3,l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(e5,{...a,...n,ref:t})}).displayName="ContextMenuGroup";var n5=l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(e6,{...a,...n,ref:t})});n5.displayName="ContextMenuLabel";var n6=l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(e7,{...a,...n,ref:t})});n6.displayName="ContextMenuItem";var n8=l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(tt,{...a,...n,ref:t})});n8.displayName="ContextMenuCheckboxItem",l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(ti,{...a,...n,ref:t})}).displayName="ContextMenuRadioGroup";var n9=l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(ts,{...a,...n,ref:t})});n9.displayName="ContextMenuRadioItem";var n7=l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(td,{...a,...n,ref:t})});n7.displayName="ContextMenuItemIndicator";var ae=l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(tp,{...a,...n,ref:t})});ae.displayName="ContextMenuSeparator",l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(th,{...a,...n,ref:t})}).displayName="ContextMenuArrow";var at="ContextMenuSub",ar=l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(ty,{...a,...n,ref:t})});ar.displayName="ContextMenuSubTrigger";var an=l.forwardRef((e,t)=>{let{__scopeContextMenu:r,...n}=e,a=nJ(r);return(0,s.jsx)(tw,{...a,...n,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});function aa(e){return t=>"mouse"!==t.pointerType?e(t):void 0}an.displayName="ContextMenuSubContent";let ai=(0,v.A)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);l.forwardRef(({className:e,inset:t,children:r,...n},a)=>(0,s.jsxs)(ar,{ref:a,className:(0,h.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...n,children:[r,(0,s.jsx)(tJ,{className:"ml-auto h-4 w-4"})]})).displayName=ar.displayName,l.forwardRef(({className:e,...t},r)=>(0,s.jsx)(an,{ref:r,className:(0,h.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})).displayName=an.displayName;let ao=l.forwardRef(({className:e,...t},r)=>(0,s.jsx)(n2,{children:(0,s.jsx)(n4,{ref:r,className:(0,h.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));ao.displayName=n4.displayName;let as=l.forwardRef(({className:e,inset:t,...r},n)=>(0,s.jsx)(n6,{ref:n,className:(0,h.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));function al({projectId:e,onFileSelect:t,selectedPath:r,onClose:n}){let[a,i]=(0,l.useState)([]),[o,c]=(0,l.useState)([]),[u,d]=(0,l.useState)(new Set(["/"])),[g,v]=(0,l.useState)(null),[x,y]=(0,l.useState)(""),[w,j]=(0,l.useState)(!1),[C,S]=(0,l.useState)(null),[E,D]=(0,l.useState)(null),M=(0,l.useRef)(null),P=(0,l.useCallback)(async()=>{try{await p.OP.init();let t=await p.OP.getAllFilesAndDirectories(e),r=t.filter(e=>"directory"!==e.type);i(r),c(T(t))}catch(e){h.v.error("Failed to load files:",e)}},[e]),T=e=>{let t=[],r=new Map;e.forEach(e=>{if("directory"===e.type){let t=e.path.split("/").filter(Boolean),n={path:e.path,name:e.name||t[t.length-1]||"unnamed",type:"directory",children:[]};r.set(e.path,n)}}),e.forEach(e=>{if("directory"!==e.type){let t=e.path.split("/").filter(Boolean),n="";for(let e=0;e<t.length-1;e++)if(n=n+"/"+t[e],!r.has(n)){let a={path:n,name:t[e],type:"directory",children:[]};r.set(n,a)}}}),r.forEach((e,n)=>{let a=n.split("/").filter(Boolean);if(1===a.length)t.push(e);else{let t="/"+a.slice(0,-1).join("/"),n=r.get(t);n&&n.children&&n.children.push(e)}}),e.forEach(e=>{if("directory"!==e.type){let n=e.path.split("/").filter(Boolean),a={path:e.path,name:e.name,type:"file"};if(1===n.length)t.push(a);else{let e="/"+n.slice(0,-1).join("/"),t=r.get(e);t&&t.children?.push(a)}}});let n=e=>{e.sort((e,t)=>e.type===t.type?e.name.localeCompare(t.name):"directory"===e.type?-1:1),e.forEach(e=>{e.children&&n(e.children)})};return n(t),t},I=e=>{d(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},A=async e=>{if("directory"===e.type)I(e.path);else{let r=a.find(t=>t.path===e.path);r&&t&&t(r)}},R=async(t="/")=>{let r=prompt("Enter file name:");if(!r)return;let n="/"===t?`/${r}`:`${t}/${r}`;try{await p.OP.createFile(e,n,""),await P()}catch(e){h.v.error("Failed to create file:",e)}},L=async(t="/")=>{let r=prompt("Enter directory name:");if(!r)return;let n="/"===t?`/${r}`:`${t}/${r}`;try{await p.OP.createDirectory(e,n),await P()}catch(e){h.v.error("Failed to create directory:",e)}},z=async(t,r)=>{if(confirm(`Delete ${r} "${t}"?`))try{"file"===r?await p.OP.deleteFile(e,t):await p.OP.deleteDirectory(e,t),await P()}catch(e){h.v.error(`Failed to delete ${r}:`,e)}},O=async(t,r)=>{if(!x)return;let n=t.split("/");n[n.length-1]=x;let a=n.join("/");try{"directory"===r?await p.OP.renameDirectory(e,t,a):await p.OP.renameFile(e,t,a),await P(),v(null),y("")}catch(e){h.v.error(`Failed to rename ${r}:`,e)}},F=async e=>{for(let t of(e.preventDefault(),e.stopPropagation(),j(!1),Array.from(e.dataTransfer.items)))if("file"===t.kind){let e=t.getAsFile();e&&await _(e,"/")}},_=async(t,r)=>{if(!(0,n$.fu)(t.name))return void tV.oR.error(`File type not supported: ${t.name}`);let n=(0,n$.Gr)(t.name),a=n$.Q6[n];if(t.size>a)return void tV.oR.error(`File too large: ${t.name}. Maximum size is ${Math.round(a/1024/1024)}MB`);let i="/"===r?`/${t.name}`:`${r}/${t.name}`;try{let r;r="image"===n||"video"===n||"binary"===n?await t.arrayBuffer():await t.text(),await p.OP.createFile(e,i,r),await P(),tV.oR.success(`Uploaded ${t.name}`)}catch(n){if(n.message?.includes("already exists")){if(confirm(`File "${t.name}" already exists. Overwrite?`))try{await p.OP.deleteFile(e,i),await _(t,r)}catch(e){h.v.error("Failed to overwrite file:",e),tV.oR.error("Failed to overwrite file")}}else h.v.error("Failed to upload file:",n),tV.oR.error(`Failed to upload ${t.name}: ${n.message}`)}},q=(e,t)=>{e.stopPropagation(),S(t),e.dataTransfer.effectAllowed="move"},B=()=>{S(null),D(null)},$=(e,t)=>{e.preventDefault(),e.stopPropagation(),C&&t!==C.path&&(e.dataTransfer.dropEffect="move",D(t))},U=async(t,r)=>{if(t.preventDefault(),t.stopPropagation(),!C||r&&C.path===r.path)return void D(null);let n=r&&"directory"===r.type?r.path:"/";if("directory"===C.type){let e=C.path.endsWith("/")?C.path:C.path+"/";if((n.endsWith("/")?n:n+"/").startsWith(e)){tV.oR.error("Cannot move a folder into itself"),D(null);return}}let a=C.name,i="/"===n?`/${a}`:`${n}/${a}`;try{"directory"===C.type?await p.OP.moveDirectory(e,C.path,i):await p.OP.moveFile(e,C.path,i),await P(),tV.oR.success(`Moved ${C.name} to ${"/"===n?"root":n}`)}catch(e){h.v.error("Failed to move item:",e),tV.oR.error(`Failed to move: ${e.message}`)}D(null)},H=(e,t=0)=>{let n=u.has(e.path),a=r===e.path,i=g===e.path,o=E===e.path;return(0,s.jsxs)("div",{draggable:!i,onDragStart:t=>q(t,e),onDragEnd:B,onDragOver:t=>"directory"===e.type&&$(t,e.path),onDrop:t=>"directory"===e.type&&U(t,e),children:[(0,s.jsxs)(nQ,{children:[(0,s.jsx)(n1,{children:(0,s.jsxs)("div",{className:(0,h.cn)("flex items-center gap-2 px-2 py-1.5 hover:bg-accent hover:text-accent-foreground cursor-pointer rounded-md transition-colors",a&&"bg-accent text-accent-foreground",o&&"directory"===e.type&&"bg-blue-500/20 border border-blue-500",C?.path===e.path&&"opacity-50","group"),style:{paddingLeft:`${16*t+8}px`},onClick:()=>A(e),children:["directory"===e.type?(0,s.jsxs)(s.Fragment,{children:[n?(0,s.jsx)(nc.A,{className:"w-4 h-4 text-muted-foreground"}):(0,s.jsx)(tJ,{className:"w-4 h-4 text-muted-foreground"}),n?(0,s.jsx)(N,{className:"w-4 h-4 text-blue-500"}):(0,s.jsx)(nU,{className:"w-4 h-4 text-blue-500"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"w-4"}),(()=>{let t=(0,n$.Gr)(e.path);return"image"===t?(0,s.jsx)(b,{className:"w-4 h-4 text-green-500"}):"video"===t?(0,s.jsx)(nH,{className:"w-4 h-4 text-purple-500"}):(0,s.jsx)(nV,{className:"w-4 h-4 text-muted-foreground"})})()]}),i?(0,s.jsx)(f.p,{value:x,onChange:e=>y(e.target.value),onBlur:()=>O(e.path,e.type),onKeyDown:t=>{"Enter"===t.key?O(e.path,e.type):"Escape"===t.key&&(v(null),y(""))},className:"h-5 text-sm",autoFocus:!0,onClick:e=>e.stopPropagation()}):(0,s.jsx)("span",{className:"text-sm flex-1",children:e.name})]})}),(0,s.jsxs)(ao,{children:["directory"===e.type&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(as,{onClick:()=>R(e.path),children:[(0,s.jsx)(nV,{className:"mr-2 h-4 w-4"}),"New File"]}),(0,s.jsxs)(as,{onClick:()=>L(e.path),children:[(0,s.jsx)(nU,{className:"mr-2 h-4 w-4"}),"New Folder"]}),(0,s.jsxs)(as,{onClick:()=>M.current?.click(),children:[(0,s.jsx)(r$,{className:"mr-2 h-4 w-4"}),"Upload Files"]})]}),(0,s.jsx)(as,{onClick:()=>{v(e.path),y(e.name)},children:"Rename"}),(0,s.jsx)(as,{onClick:()=>z(e.path,e.type),className:"text-destructive",children:"Delete"})]})]}),"directory"===e.type&&n&&e.children&&(0,s.jsx)("div",{children:e.children.map(e=>H(e,t+1))})]},e.path)};return(0,s.jsxs)("div",{className:"h-full flex flex-col",onDrop:F,onDragOver:e=>{e.preventDefault(),e.stopPropagation(),j(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation();let t=e.currentTarget.getBoundingClientRect(),r=e.clientX,n=e.clientY;(r<t.left||r>=t.right||n<t.top||n>=t.bottom)&&j(!1)},children:[(0,s.jsx)("input",{ref:M,type:"file",multiple:!0,className:"hidden",onChange:async e=>{for(let t of Array.from(e.target.files||[]))await _(t,"/");M.current&&(M.current.value="")}}),(0,s.jsxs)("div",{className:"p-3 border-b bg-muted/70 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(nW,{className:"h-4 w-4 md:hidden",style:{color:"var(--button-files-active)"}}),n?(0,s.jsxs)("button",{type:"button",onClick:n,"aria-label":"Hide file explorer",className:"relative hidden h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-destructive md:flex group",children:[(0,s.jsx)(nW,{className:"h-4 w-4 transition-opacity group-hover:opacity-0",style:{color:"var(--button-files-active)"}}),(0,s.jsx)(k.A,{className:"absolute h-3 w-3 opacity-0 transition-opacity group-hover:opacity-100"})]}):(0,s.jsx)(nW,{className:"hidden h-4 w-4 md:inline-flex",style:{color:"var(--button-files-active)"}}),(0,s.jsx)("h3",{className:"text-sm font-medium",children:"File Explorer"})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:()=>M.current?.click(),title:"Upload files",children:(0,s.jsx)(r$,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:()=>R("/"),title:"New file",children:(0,s.jsx)(nV,{className:"h-3 w-3"})}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-5 w-5",onClick:()=>L("/"),title:"New folder",children:(0,s.jsx)(nU,{className:"h-3 w-3"})})]})]}),(0,s.jsxs)(nQ,{children:[(0,s.jsx)(n1,{asChild:!0,children:(0,s.jsxs)("div",{className:(0,h.cn)("flex-1 overflow-y-auto p-3 space-y-0.5 relative",w&&"bg-blue-500/10"),onDragOver:e=>{C&&(e.preventDefault(),e.stopPropagation(),D("/"))},onDrop:e=>{C&&U(e,null)},children:[w&&(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:(0,s.jsxs)("div",{className:"bg-blue-500/20 border-2 border-dashed border-blue-500 rounded-lg p-8",children:[(0,s.jsx)(r$,{className:"h-12 w-12 text-blue-500 mx-auto mb-2"}),(0,s.jsx)("p",{className:"text-sm text-blue-600",children:"Drop files here to upload"})]})}),0===o.length?(0,s.jsx)("div",{className:"flex-1 flex items-center justify-center py-8",children:(0,s.jsxs)("div",{className:"text-center space-y-3",children:[(0,s.jsx)(nU,{className:"h-12 w-12 mx-auto opacity-50 text-muted-foreground"}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("p",{className:"text-base font-medium text-foreground",children:"No files yet"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Create your first file to get started"})]})]})}):(0,s.jsx)("div",{className:"contents",children:o.map(e=>H(e))})]})}),(0,s.jsxs)(ao,{children:[(0,s.jsxs)(as,{onClick:()=>R("/"),children:[(0,s.jsx)(nV,{className:"mr-2 h-4 w-4"}),"New File"]}),(0,s.jsxs)(as,{onClick:()=>L("/"),children:[(0,s.jsx)(nU,{className:"mr-2 h-4 w-4"}),"New Folder"]}),(0,s.jsxs)(as,{onClick:()=>M.current?.click(),children:[(0,s.jsx)(r$,{className:"mr-2 h-4 w-4"}),"Upload Files"]})]})]})]})}function ac(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}as.displayName=n6.displayName,l.forwardRef(({className:e,children:t,checked:r,...n},a)=>(0,s.jsxs)(n8,{ref:a,className:(0,h.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n7,{children:(0,s.jsx)(w.A,{className:"h-4 w-4"})})}),t]})).displayName=n8.displayName,l.forwardRef(({className:e,children:t,...r},n)=>(0,s.jsxs)(n9,{ref:n,className:(0,h.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(n7,{children:(0,s.jsx)(ai,{className:"h-2 w-2 fill-current"})})}),t]})).displayName=n9.displayName,l.forwardRef(({className:e,inset:t,...r},n)=>(0,s.jsx)(n5,{ref:n,className:(0,h.cn)("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...r})).displayName=n5.displayName,l.forwardRef(({className:e,...t},r)=>(0,s.jsx)(ae,{ref:r,className:(0,h.cn)("-mx-1 my-1 h-px bg-border",e),...t})).displayName=ae.displayName;function au(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ad(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ap(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ad(Object(r),!0).forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ad(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ah(e){return function t(){for(var r=this,n=arguments.length,a=Array(n),i=0;i<n;i++)a[i]=arguments[i];return a.length>=e.length?e.apply(this,a):function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(r,[].concat(a,n))}}}function am(e){return({}).toString.call(e).includes("Object")}function af(e){return"function"==typeof e}var ag=ah(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),av={changes:function(e,t){return am(t)||ag("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&ag("changeField"),t},selector:function(e){af(e)||ag("selectorType")},handler:function(e){af(e)||am(e)||ag("handlerType"),am(e)&&Object.values(e).some(function(e){return!af(e)})&&ag("handlersType")},initial:function(e){e||ag("initialIsRequired"),am(e)||ag("initialType"),Object.keys(e).length||ag("initialContent")}};function ax(e,t){return af(t)?t(e.current):t}function ay(e,t){return e.current=ap(ap({},e.current),t),t}function ab(e,t,r){return af(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null==(n=t[r])?void 0:n.call(t,e.current[r])}),r}var aw={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},ak=(function(e){return function t(){for(var r=this,n=arguments.length,a=Array(n),i=0;i<n;i++)a[i]=arguments[i];return a.length>=e.length?e.apply(this,a):function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(r,[].concat(a,n))}}})(function(e,t){throw Error(e[t]||e.default)})(aw);let aj=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}};var aN={type:"cancelation",msg:"operation is manually canceled"};let aC=function(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(aN):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r};var aS=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}}(e,2)||function(e,t){if(e){if("string"==typeof e)return au(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return au(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};av.initial(e),av.handler(t);var r={current:e},n=ah(ab)(r,t),a=ah(ay)(r),i=ah(av.changes)(e),o=ah(ax)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return av.selector(e),e(r.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(n,a,i,o)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),2),aE=aS[0],aD=aS[1];function aM(e){return document.body.appendChild(e)}function aP(e){var t,r,n=aE(function(e){return{config:e.config,reject:e.reject}}),a=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return a.onload=function(){return e()},a.onerror=n.reject,a}function aT(){var e=aE(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){aI(t),e.resolve(t)},function(t){e.reject(t)})}function aI(e){aE().monaco||aD({monaco:e})}var aA=new Promise(function(e,t){return aD({resolve:e,reject:t})});let aR={init:function(){var e=aE(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(aD({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),aC(aA);if(window.monaco&&window.monaco.editor)return aI(window.monaco),e.resolve(window.monaco),aC(aA);aj(aM,aP)(aT)}return aC(aA)}};var aL={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},az={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},aO=function({children:e}){return l.createElement("div",{style:az.container},e)},aF=(0,l.memo)(function({width:e,height:t,isEditorReady:r,loading:n,_ref:a,className:i,wrapperProps:o}){return l.createElement("section",{style:{...aL.wrapper,width:e,height:t},...o},!r&&l.createElement(aO,null,n),l.createElement("div",{ref:a,style:{...aL.fullWidth,...!r&&aL.hide},className:i}))}),a_=function(e){(0,l.useEffect)(e,[])},aq=function(e,t,r=!0){let n=(0,l.useRef)(!0);(0,l.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function aB(){}function a$(e,t,r,n){var a,i,o,s,l,c;return a=e,i=n,a.editor.getModel(aU(a,i))||(o=e,s=t,l=r,c=n,o.editor.createModel(s,l,c?aU(o,c):void 0))}function aU(e,t){return e.Uri.parse(t)}(0,l.memo)(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:a,originalModelPath:i,modifiedModelPath:o,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:p={},height:h="100%",width:m="100%",className:f,wrapperProps:g={},beforeMount:v=aB,onMount:x=aB}){let[y,b]=(0,l.useState)(!1),[w,k]=(0,l.useState)(!0),j=(0,l.useRef)(null),N=(0,l.useRef)(null),C=(0,l.useRef)(null),S=(0,l.useRef)(x),E=(0,l.useRef)(v),D=(0,l.useRef)(!1);a_(()=>{let e=aR.init();return e.then(e=>(N.current=e)&&k(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return j.current?(t=j.current?.getModel(),void(s||t?.original?.dispose(),c||t?.modified?.dispose(),j.current?.dispose())):e.cancel()}}),aq(()=>{if(j.current&&N.current){let t=j.current.getOriginalEditor(),a=a$(N.current,e||"",n||r||"text",i||"");a!==t.getModel()&&t.setModel(a)}},[i],y),aq(()=>{if(j.current&&N.current){let e=j.current.getModifiedEditor(),n=a$(N.current,t||"",a||r||"text",o||"");n!==e.getModel()&&e.setModel(n)}},[o],y),aq(()=>{let e=j.current.getModifiedEditor();e.getOption(N.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],y),aq(()=>{j.current?.getModel()?.original.setValue(e||"")},[e],y),aq(()=>{let{original:e,modified:t}=j.current.getModel();N.current.editor.setModelLanguage(e,n||r||"text"),N.current.editor.setModelLanguage(t,a||r||"text")},[r,n,a],y),aq(()=>{N.current?.editor.setTheme(u)},[u],y),aq(()=>{j.current?.updateOptions(p)},[p],y);let M=(0,l.useCallback)(()=>{if(!N.current)return;E.current(N.current);let s=a$(N.current,e||"",n||r||"text",i||""),l=a$(N.current,t||"",a||r||"text",o||"");j.current?.setModel({original:s,modified:l})},[r,t,a,e,n,i,o]),P=(0,l.useCallback)(()=>{!D.current&&C.current&&(j.current=N.current.editor.createDiffEditor(C.current,{automaticLayout:!0,...p}),M(),N.current?.editor.setTheme(u),b(!0),D.current=!0)},[p,u,M]);return(0,l.useEffect)(()=>{y&&S.current(j.current,N.current)},[y]),(0,l.useEffect)(()=>{w||y||P()},[w,y,P]),l.createElement(aF,{width:m,height:h,isEditorReady:y,loading:d,_ref:C,className:f,wrapperProps:g})});var aH=function(e){let t=(0,l.useRef)();return(0,l.useEffect)(()=>{t.current=e},[e]),t.current},aV=new Map,aW=(0,l.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:a,path:i,theme:o="light",line:s,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:p=!0,keepCurrentModel:h=!1,width:m="100%",height:f="100%",className:g,wrapperProps:v={},beforeMount:x=aB,onMount:y=aB,onChange:b,onValidate:w=aB}){let[k,j]=(0,l.useState)(!1),[N,C]=(0,l.useState)(!0),S=(0,l.useRef)(null),E=(0,l.useRef)(null),D=(0,l.useRef)(null),M=(0,l.useRef)(y),P=(0,l.useRef)(x),T=(0,l.useRef)(),I=(0,l.useRef)(n),A=aH(i),R=(0,l.useRef)(!1),L=(0,l.useRef)(!1);a_(()=>{let e=aR.init();return e.then(e=>(S.current=e)&&C(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>E.current?void(T.current?.dispose(),h?p&&aV.set(i,E.current.saveViewState()):E.current.getModel()?.dispose(),E.current.dispose()):e.cancel()}),aq(()=>{let o=a$(S.current,e||n||"",t||a||"",i||r||"");o!==E.current?.getModel()&&(p&&aV.set(A,E.current?.saveViewState()),E.current?.setModel(o),p&&E.current?.restoreViewState(aV.get(i)))},[i],k),aq(()=>{E.current?.updateOptions(u)},[u],k),aq(()=>{E.current&&void 0!==n&&(E.current.getOption(S.current.editor.EditorOption.readOnly)?E.current.setValue(n):n!==E.current.getValue()&&(L.current=!0,E.current.executeEdits("",[{range:E.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),E.current.pushUndoStop(),L.current=!1))},[n],k),aq(()=>{let e=E.current?.getModel();e&&a&&S.current?.editor.setModelLanguage(e,a)},[a],k),aq(()=>{void 0!==s&&E.current?.revealLine(s)},[s],k),aq(()=>{S.current?.editor.setTheme(o)},[o],k);let z=(0,l.useCallback)(()=>{if(!(!D.current||!S.current)&&!R.current){P.current(S.current);let l=i||r,c=a$(S.current,n||e||"",t||a||"",l||"");E.current=S.current?.editor.create(D.current,{model:c,automaticLayout:!0,...u},d),p&&E.current.restoreViewState(aV.get(l)),S.current.editor.setTheme(o),void 0!==s&&E.current.revealLine(s),j(!0),R.current=!0}},[e,t,r,n,a,i,u,d,p,o,s]);return(0,l.useEffect)(()=>{k&&M.current(E.current,S.current)},[k]),(0,l.useEffect)(()=>{N||k||z()},[N,k,z]),I.current=n,(0,l.useEffect)(()=>{k&&b&&(T.current?.dispose(),T.current=E.current?.onDidChangeModelContent(e=>{L.current||b(E.current.getValue(),e)}))},[k,b]),(0,l.useEffect)(()=>{if(k){let e=S.current.editor.onDidChangeMarkers(e=>{let t=E.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=S.current.editor.getModelMarkers({resource:t});w?.(e)}});return()=>{e?.dispose()}}return()=>{}},[k,w]),l.createElement(aF,{width:m,height:f,isEditorReady:k,loading:c,_ref:D,className:g,wrapperProps:v})});let aG=(0,v.A)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),aK=(0,v.A)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var aY=r(93613);function aJ({projectId:e,onFilesChange:t,onClose:r}){let[n,a]=(0,l.useState)(new Map),[i,o]=(0,l.useState)(null),{resolvedTheme:c}=(0,ns.D)(),[u,d]=(0,l.useState)(!1),f=(e,t)=>{t&&t.stopPropagation();let r=n.get(e);if((!r?.modified||confirm(`Close ${r.file.name} without saving?`))&&(a(t=>{let r=new Map(t);return r.delete(e),r}),i===e)){let t=Array.from(n.keys()).filter(t=>t!==e);o(t.length>0?t[t.length-1]:null)}},g=(0,l.useCallback)((e,t)=>{void 0!==e&&"text"===y(t).type&&a(r=>{let n=new Map(r),a=n.get(t);return a&&n.set(t,{...a,content:e,modified:a.file.content!==e}),n})},[]),v=(0,l.useCallback)(async t=>{let r=n.get(t);if(r&&r.modified)try{await p.OP.init();let n=await p.OP.updateFile(e,t,r.content);a(e=>{let a=new Map(e);return a.set(t,{file:n,content:r.content,modified:!1}),a}),window.dispatchEvent(new CustomEvent("fileContentChanged",{detail:{path:t,projectId:e}}))}catch(e){h.v.error("Failed to save file:",e)}},[n,e]);(0,l.useCallback)(e=>{(e.metaKey||e.ctrlKey)&&"s"===e.key&&(e.preventDefault(),i&&v(i))},[i,v]);let y=e=>{let t=e.split(".").pop()?.toLowerCase();if(["png","jpg","jpeg","gif","bmp","svg","webp"].includes(t||""))return{type:"image",language:"plaintext"};let r={js:"javascript",mjs:"javascript",ts:"typescript",tsx:"typescript",html:"html",htm:"html",css:"css",json:"json",md:"markdown",txt:"plaintext",xml:"xml",yaml:"yaml",yml:"yaml"};return r[t||""]?{type:"text",language:r[t||""]}:["zip","tar","gz","exe","bin","pdf","doc","docx","xls","xlsx","ppt","pptx"].includes(t||"")?{type:"unsupported",language:"plaintext"}:{type:"text",language:"plaintext"}},w=e=>y(e).language,j=i?n.get(i):null;return(0,s.jsxs)("div",{className:"h-full flex flex-col",children:[(0,s.jsxs)("div",{className:"p-3 border-b bg-muted/70 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(aG,{className:"h-4 w-4 md:hidden",style:{color:"var(--button-editor-active)"}}),r?(0,s.jsxs)("button",{type:"button",onClick:r,"aria-label":"Hide code editor",className:"relative hidden h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-destructive md:flex group",children:[(0,s.jsx)(aG,{className:"h-4 w-4 transition-opacity group-hover:opacity-0",style:{color:"var(--button-editor-active)"}}),(0,s.jsx)(k.A,{className:"absolute h-3 w-3 opacity-0 transition-opacity group-hover:opacity-100"})]}):(0,s.jsx)(aG,{className:"hidden h-4 w-4 md:inline-flex",style:{color:"var(--button-editor-active)"}}),(0,s.jsx)("h3",{className:"text-sm font-medium",children:"Code Editor"})]}),j?.modified&&"text"===y(j.file.path).type&&(0,s.jsxs)(m.$,{size:"sm",variant:"ghost",className:"h-5 px-2 gap-1.5",onClick:()=>v(i),children:[(0,s.jsx)(aK,{className:"h-3 w-3"}),(0,s.jsx)("span",{className:"text-xs",children:"Save"})]})]}),0===n.size?(0,s.jsx)("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:(0,s.jsxs)("div",{className:"text-center space-y-3",children:[(0,s.jsx)(x,{className:"h-12 w-12 mx-auto opacity-50"}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("p",{className:"text-base font-medium",children:"No files open"}),(0,s.jsx)("p",{className:"text-sm",children:"Select a file from the explorer to edit"})]})]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"border-b bg-muted/70",children:(0,s.jsx)("div",{className:"flex items-center overflow-x-auto scrollbar-thin",children:Array.from(n.entries()).map(([e,t])=>(0,s.jsxs)("div",{className:(0,h.cn)("flex items-center gap-2 px-4 py-2.5 border-r cursor-pointer transition-all relative group",i===e?"bg-background border-b-2 border-b-primary shadow-sm":"hover:bg-muted/50 border-b-2 border-b-transparent"),onClick:()=>o(e),children:[(0,s.jsxs)("span",{className:"text-sm",children:[t.file.name,t.modified&&(0,s.jsx)("span",{className:"text-orange-500 ml-1",children:"●"})]}),(0,s.jsx)(m.$,{size:"icon",variant:"ghost",className:"h-4 w-4 p-0 opacity-0 group-hover:opacity-100 transition-opacity",onClick:t=>f(e,t),children:(0,s.jsx)(k.A,{className:"h-3 w-3 hover:text-destructive"})})]},e))})}),j&&(0,s.jsx)("div",{className:"flex-1 border-t",children:(()=>{let e=y(j.file.path);return"image"===e.type?(0,s.jsx)("div",{className:"h-full flex items-center justify-center bg-background p-8",children:(0,s.jsxs)("div",{className:"text-center space-y-4 max-w-2xl",children:[(0,s.jsx)(b,{className:"h-12 w-12 mx-auto text-muted-foreground"}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h3",{className:"text-lg font-medium",children:"Image Preview"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:j.file.name})]}),(0,s.jsx)("div",{className:"border rounded-lg p-4 bg-muted/30 max-h-96 overflow-auto",children:(0,s.jsx)("img",{src:`data:image/${j.file.path.split(".").pop()};base64,${j.content}`,alt:j.file.name,className:"max-w-full h-auto rounded shadow-sm",onError:e=>{let t=e.target;if(t.style.display="none",!t.parentElement?.querySelector(".error-msg")){let e=document.createElement("div");e.className="error-msg text-sm text-muted-foreground flex items-center gap-2",e.innerHTML='<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>Unable to display image',t.parentElement?.appendChild(e)}}})}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Image files cannot be edited in the text editor"})]})}):"unsupported"===e.type?(0,s.jsx)("div",{className:"h-full flex items-center justify-center bg-background p-8",children:(0,s.jsxs)("div",{className:"text-center space-y-4",children:[(0,s.jsx)(aY.A,{className:"h-12 w-12 mx-auto text-muted-foreground"}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h3",{className:"text-lg font-medium",children:"Unsupported File Type"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:j.file.name}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground max-w-md",children:"This file type is not supported for editing in the text editor. Binary files and certain document formats cannot be displayed here."})]})]})}):(0,s.jsx)(aW,{height:"100%",language:w(j.file.path),value:j.content,onChange:e=>g(e,j.file.path),theme:u?"dark"===c?"vs-dark":"light":"vs-dark",options:{minimap:{enabled:!1},fontSize:14,lineNumbers:"on",roundedSelection:!1,scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,wordWrap:"on",wrappingIndent:"indent"}})})()})]})]})}function aX(e){window.dispatchEvent(new CustomEvent("openFile",{detail:e}))}var aZ=r(28559);let aQ=(0,v.A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),a0=(0,v.A)("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),a1=(0,v.A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var a2=r(3589),a3=r(99526);function a4(){let[e,t]=(0,l.useState)(()=>r3.s.getCostSettings()),r=!1!==e.showCosts;return{costSettings:e,shouldShowCosts:r}}var a5=r(10158);class a6{async initDB(){if(!this.isInitialized)return new Promise((e,t)=>{let r=indexedDB.open(this.dbName,1);r.onerror=()=>{h.v.error("Failed to open conversation database"),t(r.error)},r.onsuccess=()=>{this.db=r.result,this.isInitialized=!0,e()},r.onupgradeneeded=e=>{let t=e.target.result;if(!t.objectStoreNames.contains(this.storeName)){let e=t.createObjectStore(this.storeName,{keyPath:"id"});e.createIndex("projectId","projectId",{unique:!1}),e.createIndex("lastUpdated","lastUpdated",{unique:!1})}}})}getConversationId(e){return`conv_${e}`}async loadConversationFromDB(e){if(await this.initDB(),!this.db)return null;let t=this.getConversationId(e);return new Promise((r,n)=>{let a=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(t);a.onsuccess=()=>{let t=a.result;if(t){let n={id:t.id,projectId:t.projectId,messages:t.messages||[],lastUpdated:t.lastUpdated,version:t.version||1};this.conversationBreaks.set(e,t.breaks||[]),r(n)}else r(null)},a.onerror=()=>{h.v.error("Failed to load conversation from DB"),n(a.error)}})}async saveConversationToDB(e){if(await this.initDB(),!this.db)return;let t=this.conversationBreaks.get(e.projectId)||[],r={id:e.id,projectId:e.projectId,messages:e.messages,lastUpdated:e.lastUpdated,version:e.version,breaks:t};return new Promise((e,t)=>{let n=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put(r);n.onsuccess=()=>e(),n.onerror=()=>{h.v.error("Failed to save conversation to DB"),t(n.error)}})}async deleteConversationFromDB(e){if(await this.initDB(),!this.db)return;let t=this.getConversationId(e);return new Promise((e,r)=>{let n=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(t);n.onsuccess=()=>e(),n.onerror=()=>{h.v.error("Failed to delete conversation from DB"),r(n.error)}})}async getConversation(e){let t=this.conversations.get(e);if(!t){let r=await this.loadConversationFromDB(e);t=r||{id:this.getConversationId(e),projectId:e,messages:[],lastUpdated:new Date().toISOString(),version:1},this.conversations.set(e,t)}return t}async updateConversation(e,t){let r=await this.getConversation(e);r.messages=[...t],r.lastUpdated=new Date().toISOString(),r.version+=1,this.conversations.set(e,r),await this.saveConversationToDB(r),h.v.debug(`[ConversationState] Updated conversation for project ${e} with ${t.length} messages`)}async clearConversation(e){let t=await this.getConversation(e);await this.recordConversationBreak(e,{type:"clear",timestamp:new Date().toISOString(),description:"User cleared chat"}),t.messages=[],t.lastUpdated=new Date().toISOString(),t.version+=1,this.conversations.set(e,t),await this.saveConversationToDB(t),h.v.debug(`[ConversationState] Cleared conversation for project ${e}`)}async recordConversationBreak(e,t){let r=this.conversationBreaks.get(e)||[];r.push(t),r.length>20&&(r=r.slice(-20)),this.conversationBreaks.set(e,r);let n=this.conversations.get(e);n&&await this.saveConversationToDB(n),h.v.debug(`[ConversationState] Recorded conversation break for project ${e}:`,t.type)}getRecentBreaks(e,t=5){return(this.conversationBreaks.get(e)||[]).slice(-t)}async addBreakContextMessage(e,t){let r,n=await this.getConversation(e);switch(t.type){case"checkpoint_restore":r=`[Context: Project was restored to checkpoint "${t.description||"previous state"}" at ${new Date(t.timestamp).toLocaleTimeString()}]`;break;case"retry":r=`[Context: Retrying previous request after restoring to checkpoint at ${new Date(t.timestamp).toLocaleTimeString()}]`;break;case"page_refresh":r=`[Context: Session resumed after page refresh at ${new Date(t.timestamp).toLocaleTimeString()}]`;break;case"manual_save":r=`[Context: Project saved manually at ${new Date(t.timestamp).toLocaleTimeString()}${t.description?` (${t.description})`:""}]`;break;default:return}let a={role:"system",content:r};n.messages.push(a),await this.updateConversation(e,n.messages)}async getConversationMessages(e,t){let r=await this.getConversation(e);if(!t||r.messages.length<=t)return[...r.messages];let n=[...r.messages],a=n.filter(e=>"system"===e.role),i=n.filter(e=>"system"!==e.role).slice(-(t-a.length));return[...a,...i]}async deleteProject(e){this.conversations.delete(e),this.conversationBreaks.delete(e),await this.deleteConversationFromDB(e),h.v.debug(`[ConversationState] Deleted all conversation data for project ${e}`)}async getConversationStats(e){let t=await this.getConversation(e),r=this.conversationBreaks.get(e)||[];return{messageCount:t.messages.length,lastUpdated:t.lastUpdated,breaks:r.length,version:t.version}}constructor(){this.conversations=new Map,this.conversationBreaks=new Map,this.dbName="DeepStudioConversations",this.storeName="conversations",this.db=null,this.isInitialized=!1}}let a8=new a6;class a9{static convertToOrchestratorMessages(e){let t=[];for(let r of e)if(!r.isTask){if("user"===r.role)t.push({role:"user",content:r.content||""});else if("assistant"===r.role){let e={role:"assistant",content:r.content||""};if(r.toolCalls&&r.toolCalls.length>0&&(e.tool_calls=r.toolCalls),r.toolMessages&&!e.tool_calls){let t=[];for(let e of r.toolMessages)"tool"===e.type&&e.name&&t.push({id:e.id||`tool_${t.length}`,type:"function",function:{name:e.name,arguments:JSON.stringify(e.parameters||{})}});t.length>0&&(e.tool_calls=t)}if((r.checkpointId||r.cost||r.usage||r.toolMessages)&&(e.ui_metadata={},r.checkpointId&&(e.ui_metadata.checkpointId=r.checkpointId),r.cost&&(e.ui_metadata.cost=r.cost),r.usage&&(e.ui_metadata.usage=r.usage),r.toolMessages&&(e.ui_metadata.toolMessages=r.toolMessages)),r.toolMessages){let t=r.toolMessages,n=[];for(let e of t)"message"===e.type&&e.content&&n.push(e.content);if(n.length>0){let t=[e.content,...n].filter(e=>e&&e.trim()).join("\n\n");e.content=t}}if(t.push(e),r.toolMessages){let e=r.toolMessages;for(let r=0;r<e.length;r++){let n=e[r];if("tool"===n.type&&void 0!==n.result&&null!==n.result){let e=n.id||`tool_${r}`;t.push({role:"tool",tool_call_id:e,content:"string"==typeof n.result?n.result:JSON.stringify(n.result)})}}}}}return t}static convertToUIMessages(e){let t=[],r=0,n=e=>`${e}_recovered_${r++}`;for(let r=0;r<e.length;r++){let a=e[r];if("system"!==a.role&&"tool"!==a.role){if("user"===a.role)t.push({id:n("user"),role:"user",content:a.content});else if("assistant"===a.role){let i={id:n("assistant"),role:"assistant",content:a.content||""};if(a.ui_metadata&&(a.ui_metadata.checkpointId&&(i.checkpointId=a.ui_metadata.checkpointId),a.ui_metadata.cost&&(i.cost=a.ui_metadata.cost),a.ui_metadata.usage&&(i.usage=a.ui_metadata.usage),a.ui_metadata.toolMessages)){i.toolMessages=a.ui_metadata.toolMessages;let e=[];for(let t of a.ui_metadata.toolMessages)"tool"===t.type&&t.name&&e.push({id:t.id,type:"function",function:{name:t.name,arguments:JSON.stringify(t.parameters||{})}});e.length>0&&(i.toolCalls=e)}if(!i.toolMessages&&a.tool_calls&&a.tool_calls.length>0){let t=[];for(let i of(a.content&&a.content.trim()&&t.push({id:n("msg"),type:"message",content:a.content}),a.tool_calls)){let a=i.id||n("tool"),o={};if(i.function?.arguments)try{o=JSON.parse(i.function.arguments)}catch{o={arguments:i.function.arguments}}let s=null;for(let t=r+1;t<e.length;t++){let r=e[t];if("tool"===r.role&&r.tool_call_id===i.id){s=r.content;break}if("user"===r.role||"assistant"===r.role)break}t.push({id:a,type:"tool",name:i.function?.name||i.type||"unknown",parameters:o,result:s,status:"completed"})}t.length>0&&(i.toolMessages=t),i.toolCalls=a.tool_calls}t.push(i)}}}return h.v.debug(`[ConversationConverter] Converted ${e.length} orchestrator messages to ${t.length} UI messages`),t}static truncateConversation(e,t=50){if(e.length<=t)return e;let r=e.filter(e=>"system"===e.role),n=e.filter(e=>"system"!==e.role),a=t-r.length;return a<=0?r:[...r,...n.slice(-a)]}static createContextMessage(e,t){return{role:"system",content:`[Context: ${t}]`}}static prepareConversationForOrchestrator(e,t={}){let r=this.convertToOrchestratorMessages(e);return t.includeSystemPrompt&&t.systemPrompt&&(r.some(e=>"system"===e.role)||r.unshift({role:"system",content:t.systemPrompt})),t.maxMessages&&(r=this.truncateConversation(r,t.maxMessages)),h.v.debug(`[ConversationConverter] Prepared ${r.length} messages for orchestrator`),r}}var a7=r(57462);let ie=(0,v.A)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),it=(0,l.createContext)(null);it.displayName="PanelGroupContext";let ir={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},ia=c["useId".toString()],ii="function"==typeof ia?ia:()=>null,io=0;function is(e=null){let t=ii(),r=(0,l.useRef)(e||t||null);return null===r.current&&(r.current=""+io++),null!=e?e:r.current}function il({children:e,className:t="",collapsedSize:r,collapsible:n,defaultSize:a,forwardedRef:i,id:o,maxSize:s,minSize:c,onCollapse:u,onExpand:d,onResize:p,order:h,style:m,tagName:f="div",...g}){let v=(0,l.useContext)(it);if(null===v)throw Error("Panel components must be rendered within a PanelGroup container");let{collapsePanel:x,expandPanel:y,getPanelSize:b,getPanelStyle:w,groupId:k,isPanelCollapsed:j,reevaluatePanelConstraints:N,registerPanel:C,resizePanel:S,unregisterPanel:E}=v,D=is(o),M=(0,l.useRef)({callbacks:{onCollapse:u,onExpand:d,onResize:p},constraints:{collapsedSize:r,collapsible:n,defaultSize:a,maxSize:s,minSize:c},id:D,idIsFromProps:void 0!==o,order:h});(0,l.useRef)({didLogMissingDefaultSizeWarning:!1}),(0,l.useImperativeHandle)(i,()=>({collapse:()=>{x(M.current)},expand:e=>{y(M.current,e)},getId:()=>D,getSize:()=>b(M.current),isCollapsed:()=>j(M.current),isExpanded:()=>!j(M.current),resize:e=>{S(M.current,e)}}),[x,y,b,j,D,S]);let P=w(M.current,a);return(0,l.createElement)(f,{...g,children:e,className:t,id:D,style:{...P,...m},[ir.groupId]:k,[ir.panel]:"",[ir.panelCollapsible]:n||void 0,[ir.panelId]:D,[ir.panelSize]:parseFloat(""+P.flexGrow).toFixed(1)})}let ic=(0,l.forwardRef)((e,t)=>(0,l.createElement)(il,{...e,forwardedRef:t}));il.displayName="Panel",ic.displayName="forwardRef(Panel)";let iu=null,id=-1,ip=null;function ih(e,t,r){var a,i,o;0;let s=function(e,t,r){let n=(t&iN)!=0,a=(t&iC)!=0,i=(t&iS)!=0,o=(t&iE)!=0;!1;if(t){if(n)if(i)return"se-resize";else if(o)return"ne-resize";else return"e-resize";else if(a)if(i)return"sw-resize";else if(o)return"nw-resize";else return"w-resize";else if(i)return"s-resize";else if(o)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}(e,t,r);if(iu!==s){if(iu=s,null===ip){ip=document.createElement("style");n&&ip.setAttribute("nonce",n),document.head.appendChild(ip)}id>=0&&(null==(o=ip.sheet)||o.removeRule(id)),id=null!=(a=null==(i=ip.sheet)?void 0:i.insertRule(`*{cursor: ${s} !important;}`))?a:-1}}function im(e){return"keydown"===e.type}function ig(e){return e.type.startsWith("pointer")}function iv(e){return e.type.startsWith("mouse")}function ix(e){if(ig(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(iv(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}let iy=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function ib(e){let t=e.length;for(;t--;){let r=e[t];if(i$(r,"Missing node"),function(e){let t=getComputedStyle(e);return!!("fixed"===t.position||"auto"!==t.zIndex&&("static"!==t.position||function(e){var t;let r=getComputedStyle(null!=(t=ij(e))?t:e).display;return"flex"===r||"inline-flex"===r}(e))||1>+t.opacity||"transform"in t&&"none"!==t.transform||"webkitTransform"in t&&"none"!==t.webkitTransform||"mixBlendMode"in t&&"normal"!==t.mixBlendMode||"filter"in t&&"none"!==t.filter||"webkitFilter"in t&&"none"!==t.webkitFilter||"isolation"in t&&"isolate"===t.isolation||iy.test(t.willChange))||"touch"===t.webkitOverflowScrolling}(r))return r}return null}function iw(e){return e&&Number(getComputedStyle(e).zIndex)||0}function ik(e){let t=[];for(;e;)t.push(e),e=ij(e);return t}function ij(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}let iN=1,iC=2,iS=4,iE=8,iD="coarse"===function(){if("function"==typeof matchMedia)return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}(),iM=[],iP=!1,iT=new Map,iI=new Map,iA=new Set;function iR(e){let{target:t}=e,{x:r,y:n}=ix(e);iP=!0,iF({target:t,x:r,y:n}),iq(),iM.length>0&&(iB("down",e),i_(),e.preventDefault(),iO(t)||e.stopImmediatePropagation())}function iL(e){let{x:t,y:r}=ix(e);if(iP&&0===e.buttons&&(iP=!1,iB("up",e)),!iP){let{target:n}=e;iF({target:n,x:t,y:r})}iB("move",e),i_(),iM.length>0&&e.preventDefault()}function iz(e){let{target:t}=e,{x:r,y:n}=ix(e);iI.clear(),iP=!1,iM.length>0&&(e.preventDefault(),iO(t)||e.stopImmediatePropagation()),iB("up",e),iF({target:t,x:r,y:n}),i_(),iq()}function iO(e){let t=e;for(;t;){if(t.hasAttribute(ir.resizeHandle))return!0;t=t.parentElement}return!1}function iF({target:e,x:t,y:r}){iM.splice(0);let n=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(n=e),iA.forEach(e=>{let{element:a,hitAreaMargins:i}=e,o=a.getBoundingClientRect(),{bottom:s,left:l,right:c,top:u}=o,d=iD?i.coarse:i.fine;if(t>=l-d&&t<=c+d&&r>=u-d&&r<=s+d){if(null!==n&&document.contains(n)&&a!==n&&!a.contains(n)&&!n.contains(a)&&function(e,t){let r;if(e===t)throw Error("Cannot compare node with itself");let n={a:ik(e),b:ik(t)};for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;i$(r,"Stacking order can only be calculated for elements with a common ancestor");let a={a:iw(ib(n.a)),b:iw(ib(n.b))};if(a.a===a.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},a=e.length;for(;a--;){let r=e[a];if(r===t.a)return 1;if(r===t.b)return -1}}return Math.sign(a.a-a.b)}(n,a)>0){let e=n,t=!1;for(;e&&!e.contains(a);){var p,h;if(p=e.getBoundingClientRect(),h=o,p.x<h.x+h.width&&p.x+p.width>h.x&&p.y<h.y+h.height&&p.y+p.height>h.y){t=!0;break}e=e.parentElement}if(t)return}iM.push(e)}})}function i_(){let e=!1,t=!1;iM.forEach(r=>{let{direction:n}=r;"horizontal"===n?e=!0:t=!0});let r=0;iI.forEach(e=>{r|=e}),e&&t?ih("intersection",r,iP):e?ih("horizontal",r,iP):t?ih("vertical",r,iP):null!==ip&&(document.head.removeChild(ip),iu=null,ip=null,id=-1)}function iq(){var e;null==(e=a)||e.abort();let t={capture:!0,signal:(a=new AbortController).signal};iA.size&&(iP?(iM.length>0&&iT.forEach((e,r)=>{let{body:n}=r;e>0&&(n.addEventListener("contextmenu",iz,t),n.addEventListener("pointerleave",iL,t),n.addEventListener("pointermove",iL,t))}),iT.forEach((e,r)=>{let{body:n}=r;n.addEventListener("pointerup",iz,t),n.addEventListener("pointercancel",iz,t)})):iT.forEach((e,r)=>{let{body:n}=r;e>0&&(n.addEventListener("pointerdown",iR,t),n.addEventListener("pointermove",iL,t))}))}function iB(e,t){iA.forEach(r=>{let{setResizeHandlerState:n}=r;n(e,iM.includes(r),t)})}function i$(e,t){if(!e)throw console.error(t),Error(t)}function iU(e,t,r=10){return e.toFixed(r)===t.toFixed(r)?0:e>t?1:-1}function iH(e,t,r=10){return 0===iU(e,t,r)}function iV(e,t,r){return 0===iU(e,t,r)}function iW({panelConstraints:e,panelIndex:t,size:r}){let n=e[t];i$(null!=n,`Panel constraints not found for index ${t}`);let{collapsedSize:a=0,collapsible:i,maxSize:o=100,minSize:s=0}=n;return 0>iU(r,s)&&(r=i&&0>iU(r,(a+s)/2)?a:s),r=parseFloat((r=Math.min(o,r)).toFixed(10))}function iG({delta:e,initialLayout:t,panelConstraints:r,pivotIndices:n,prevLayout:a,trigger:i}){if(iV(e,0))return t;let o=[...t],[s,l]=n;i$(null!=s,"Invalid first pivot index"),i$(null!=l,"Invalid second pivot index");let c=0;if("keyboard"===i){{let n=e<0?l:s,a=r[n];i$(a,`Panel constraints not found for index ${n}`);let{collapsedSize:i=0,collapsible:o,minSize:c=0}=a;if(o){let r=t[n];if(i$(null!=r,`Previous layout not found for panel index ${n}`),iV(r,i)){let t=c-r;iU(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let n=e<0?s:l,a=r[n];i$(a,`No panel constraints found for index ${n}`);let{collapsedSize:i=0,collapsible:o,minSize:c=0}=a;if(o){let r=t[n];if(i$(null!=r,`Previous layout not found for panel index ${n}`),iV(r,c)){let t=r-i;iU(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let n=e<0?1:-1,a=e<0?l:s,i=0;for(;;){let e=t[a];if(i$(null!=e,`Previous layout not found for panel index ${a}`),i+=iW({panelConstraints:r,panelIndex:a,size:100})-e,(a+=n)<0||a>=r.length)break}let o=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-o:o}{let n=e<0?s:l;for(;n>=0&&n<r.length;){let a=Math.abs(e)-Math.abs(c),i=t[n];i$(null!=i,`Previous layout not found for panel index ${n}`);let s=iW({panelConstraints:r,panelIndex:n,size:i-a});if(!iV(i,s)&&(c+=i-s,o[n]=s,c.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?n--:n++}}if(function(e,t,r){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!iV(e[r],t[r],void 0))return!1;return!0}(a,o))return a;{let n=e<0?l:s,a=t[n];i$(null!=a,`Previous layout not found for panel index ${n}`);let i=a+c,u=iW({panelConstraints:r,panelIndex:n,size:i});if(o[n]=u,!iV(u,i)){let t=i-u,n=e<0?l:s;for(;n>=0&&n<r.length;){let a=o[n];i$(null!=a,`Previous layout not found for panel index ${n}`);let i=iW({panelConstraints:r,panelIndex:n,size:a+t});if(iV(a,i)||(t-=i-a,o[n]=i),iV(t,0))break;e>0?n--:n++}}}return iV(o.reduce((e,t)=>t+e,0),100)?o:a}function iK(e,t=document){return Array.from(t.querySelectorAll(`[${ir.resizeHandleId}][data-panel-group-id="${e}"]`))}function iY(e,t,r=document){let n=iK(e,r).findIndex(e=>e.getAttribute(ir.resizeHandleId)===t);return null!=n?n:null}function iJ(e,t,r){let n=iY(e,t,r);return null!=n?[n,n+1]:[-1,-1]}function iX(e,t=document){if((t instanceof HTMLElement||"object"==typeof t&&null!==t&&"tagName"in t&&"getAttribute"in t)&&t.dataset.panelGroupId==e)return t;let r=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function iZ(e,t=document){let r=t.querySelector(`[${ir.resizeHandleId}="${e}"]`);return r||null}function iQ(e,t){let{x:r,y:n}=ix(t);return"horizontal"===e?r:n}function i0(e,t,r){t.forEach((t,n)=>{let a=e[n];i$(a,`Panel data not found for index ${n}`);let{callbacks:i,constraints:o,id:s}=a,{collapsedSize:l=0,collapsible:c}=o,u=r[s];if(null==u||t!==u){r[s]=t;let{onCollapse:e,onExpand:n,onResize:a}=i;a&&a(t,u),c&&(e||n)&&(n&&(null==u||iH(u,l))&&!iH(t,l)&&n(),e&&(null==u||!iH(u,l))&&iH(t,l)&&e())}})}function i1(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}function i2(e){try{if("undefined"!=typeof localStorage)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function i3(e){return`react-resizable-panels:${e}`}function i4(e,t,r,n,a){var i;let o=i3(e),s=t.map(e=>{let{constraints:t,id:r,idIsFromProps:n,order:a}=e;return n?r:a?`${a}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(","),l=null!=(i=function(e,t){try{let r=i3(e),n=t.getItem(r);if(n){let e=JSON.parse(n);if("object"==typeof e&&null!=e)return e}}catch(e){}return null}(e,a))?i:{};l[s]={expandToSizes:Object.fromEntries(r.entries()),layout:n};try{a.setItem(o,JSON.stringify(l))}catch(e){console.error(e)}}let i5={getItem:e=>(i2(i5),i5.getItem(e)),setItem:(e,t)=>{i2(i5),i5.setItem(e,t)}},i6={};function i8({autoSaveId:e=null,children:t,className:r="",direction:n,forwardedRef:a,id:i=null,onLayout:o=null,keyboardResizeBy:s=null,storage:c=i5,style:u,tagName:d="div",...p}){let h=is(i),m=(0,l.useRef)(null),[f,g]=(0,l.useState)(null),[v,x]=(0,l.useState)([]),y=function(){let[e,t]=(0,l.useState)(0);return(0,l.useCallback)(()=>t(e=>e+1),[])}(),b=(0,l.useRef)({}),w=(0,l.useRef)(new Map),k=(0,l.useRef)(0),j=(0,l.useRef)({autoSaveId:e,direction:n,dragState:f,id:h,keyboardResizeBy:s,onLayout:o,storage:c}),N=(0,l.useRef)({layout:v,panelDataArray:[],panelDataArrayChanged:!1});(0,l.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,l.useImperativeHandle)(a,()=>({getId:()=>j.current.id,getLayout:()=>{let{layout:e}=N.current;return e},setLayout:e=>{let{onLayout:t}=j.current,{layout:r,panelDataArray:n}=N.current,a=function({layout:e,panelConstraints:t}){let r=[...e],n=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(", ")}`);if(!iV(n,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];i$(null!=t,`No layout data found for index ${e}`);let a=100/n*t;r[e]=a}let a=0;for(let e=0;e<t.length;e++){let n=r[e];i$(null!=n,`No layout data found for index ${e}`);let i=iW({panelConstraints:t,panelIndex:e,size:n});n!=i&&(a+=n-i,r[e]=i)}if(!iV(a,0))for(let e=0;e<t.length;e++){let n=r[e];i$(null!=n,`No layout data found for index ${e}`);let i=iW({panelConstraints:t,panelIndex:e,size:n+a});if(n!==i&&(a-=i-n,r[e]=i,iV(a,0)))break}return r}({layout:e,panelConstraints:n.map(e=>e.constraints)});!function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(r,a)&&(x(a),N.current.layout=a,t&&t(a),i0(n,a,b.current))}}),[]),function({committedValuesRef:e,eagerValuesRef:t,groupId:r,layout:n,panelDataArray:a,panelGroupElement:i,setLayout:o}){(0,l.useRef)({didWarnAboutMissingResizeHandle:!1}),(0,l.useEffect)(()=>{if(!i)return;let e=t.current;i$(e,"Eager values not found");let{panelDataArray:a}=e;i$(null!=iX(r,i),`No group found for id "${r}"`);let s=iK(r,i);i$(s,`No resize handles found for group id "${r}"`);let l=s.map(e=>{let t=e.getAttribute(ir.resizeHandleId);i$(t,"Resize handle element has no handle id attribute");let[s,l]=function(e,t,r,n=document){var a,i,o,s;let l=iZ(t,n),c=iK(e,n),u=l?c.indexOf(l):-1;return[null!=(a=null==(i=r[u])?void 0:i.id)?a:null,null!=(o=null==(s=r[u+1])?void 0:s.id)?o:null]}(r,t,a,i);if(null==s||null==l)return()=>{};let c=e=>{if(!e.defaultPrevented&&"Enter"===e.key){e.preventDefault();let l=a.findIndex(e=>e.id===s);if(l>=0){let e=a[l];i$(e,`No panel data found for index ${l}`);let s=n[l],{collapsedSize:c=0,collapsible:u,minSize:d=0}=e.constraints;if(null!=s&&u){let e=iG({delta:iV(s,c)?d-c:c-s,initialLayout:n,panelConstraints:a.map(e=>e.constraints),pivotIndices:iJ(r,t,i),prevLayout:n,trigger:"keyboard"});n!==e&&o(e)}}}};return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}});return()=>{l.forEach(e=>e())}},[i,e,t,r,n,a,o])}({committedValuesRef:j,eagerValuesRef:N,groupId:h,layout:v,panelDataArray:N.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),(0,l.useEffect)(()=>{let{panelDataArray:t}=N.current;if(e){if(0===v.length||v.length!==t.length)return;let r=i6[e];null==r&&(r=function(e,t=10){let r=null;return(...n)=>{null!==r&&clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}}(i4,100),i6[e]=r),r(e,[...t],new Map(w.current),v,c)}},[e,v,c]),(0,l.useEffect)(()=>{});let C=(0,l.useCallback)(e=>{let{onLayout:t}=j.current,{layout:r,panelDataArray:n}=N.current;if(e.constraints.collapsible){let a=n.map(e=>e.constraints),{collapsedSize:i=0,panelSize:o,pivotIndices:s}=oe(n,e,r);if(i$(null!=o,`Panel size not found for panel "${e.id}"`),!iH(o,i)){w.current.set(e.id,o);let l=iG({delta:i7(n,e)===n.length-1?o-i:i-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:"imperative-api"});i1(r,l)||(x(l),N.current.layout=l,t&&t(l),i0(n,l,b.current))}}},[]),S=(0,l.useCallback)((e,t)=>{let{onLayout:r}=j.current,{layout:n,panelDataArray:a}=N.current;if(e.constraints.collapsible){let i=a.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:l=0,pivotIndices:c}=oe(a,e,n),u=null!=t?t:l;if(iH(s,o)){let t=w.current.get(e.id),o=null!=t&&t>=u?t:u,l=iG({delta:i7(a,e)===a.length-1?s-o:o-s,initialLayout:n,panelConstraints:i,pivotIndices:c,prevLayout:n,trigger:"imperative-api"});i1(n,l)||(x(l),N.current.layout=l,r&&r(l),i0(a,l,b.current))}}},[]),E=(0,l.useCallback)(e=>{let{layout:t,panelDataArray:r}=N.current,{panelSize:n}=oe(r,e,t);return i$(null!=n,`Panel size not found for panel "${e.id}"`),n},[]),D=(0,l.useCallback)((e,t)=>{let{panelDataArray:r}=N.current,n=i7(r,e);return function({defaultSize:e,dragState:t,layout:r,panelData:n,panelIndex:a,precision:i=3}){let o,s=r[a];return{flexBasis:0,flexGrow:null==s?void 0!=e?e.toFixed(i):"1":1===n.length?"1":s.toFixed(i),flexShrink:1,overflow:"hidden",pointerEvents:null!==t?"none":void 0}}({defaultSize:t,dragState:f,layout:v,panelData:r,panelIndex:n})},[f,v]),M=(0,l.useCallback)(e=>{let{layout:t,panelDataArray:r}=N.current,{collapsedSize:n=0,collapsible:a,panelSize:i}=oe(r,e,t);return i$(null!=i,`Panel size not found for panel "${e.id}"`),!0===a&&iH(i,n)},[]),P=(0,l.useCallback)(e=>{let{layout:t,panelDataArray:r}=N.current,{collapsedSize:n=0,collapsible:a,panelSize:i}=oe(r,e,t);return i$(null!=i,`Panel size not found for panel "${e.id}"`),!a||iU(i,n)>0},[]),T=(0,l.useCallback)(e=>{let{panelDataArray:t}=N.current;t.push(e),t.sort((e,t)=>{let r=e.order,n=t.order;return null==r&&null==n?0:null==r?-1:null==n?1:r-n}),N.current.panelDataArrayChanged=!0,y()},[y]),I=(0,l.useCallback)(e=>{let t=!1,r=m.current;return r&&"rtl"===window.getComputedStyle(r,null).getPropertyValue("direction")&&(t=!0),function(r){var n,a;r.preventDefault();let i=m.current;if(!i)return()=>null;let{direction:o,dragState:s,id:l,keyboardResizeBy:c,onLayout:u}=j.current,{layout:d,panelDataArray:p}=N.current,{initialLayout:h}=null!=s?s:{},f=iJ(l,e,i),g=function(e,t,r,n,a,i){if(im(e)){let t="horizontal"===r,n=0;n=e.shiftKey?100:null!=a?a:10;let i=0;switch(e.key){case"ArrowDown":i=t?0:n;break;case"ArrowLeft":i=t?-n:0;break;case"ArrowRight":i=t?n:0;break;case"ArrowUp":i=t?0:-n;break;case"End":i=100;break;case"Home":i=-100}return i}return null==n?0:function(e,t,r,n,a){let i="horizontal"===r,o=iZ(t,a);i$(o,`No resize handle element found for id "${t}"`);let s=o.getAttribute(ir.groupId);i$(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=n,c=iQ(r,e),u=iX(s,a);i$(u,`No group element found for id "${s}"`);let d=u.getBoundingClientRect();return(c-l)/(i?d.width:d.height)*100}(e,t,r,n,i)}(r,e,o,s,c,i),v="horizontal"===o;v&&t&&(g=-g);let y=iG({delta:g,initialLayout:null!=h?h:d,panelConstraints:p.map(e=>e.constraints),pivotIndices:f,prevLayout:d,trigger:im(r)?"keyboard":"mouse-or-touch"}),w=!i1(d,y);(ig(r)||iv(r))&&k.current!=g&&((k.current=g,w||0===g)?iI.set(e,0):v?(n=g<0?iN:iC,iI.set(e,n)):(a=g<0?iS:iE,iI.set(e,a))),w&&(x(y),N.current.layout=y,u&&u(y),i0(p,y,b.current))}},[]),A=(0,l.useCallback)((e,t)=>{let{onLayout:r}=j.current,{layout:n,panelDataArray:a}=N.current,i=a.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=oe(a,e,n);i$(null!=o,`Panel size not found for panel "${e.id}"`);let l=iG({delta:i7(a,e)===a.length-1?o-t:t-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:"imperative-api"});i1(n,l)||(x(l),N.current.layout=l,r&&r(l),i0(a,l,b.current))},[]),R=(0,l.useCallback)((e,t)=>{let{layout:r,panelDataArray:n}=N.current,{collapsedSize:a=0,collapsible:i}=t,{collapsedSize:o=0,collapsible:s,maxSize:l=100,minSize:c=0}=e.constraints,{panelSize:u}=oe(n,e,r);null!=u&&(i&&s&&iH(u,a)?iH(a,o)||A(e,o):u<c?A(e,c):u>l&&A(e,l))},[A]),L=(0,l.useCallback)((e,t)=>{let{direction:r}=j.current,{layout:n}=N.current;if(!m.current)return;let a=iZ(e,m.current);i$(a,`Drag handle element not found for id "${e}"`);let i=iQ(r,t);g({dragHandleId:e,dragHandleRect:a.getBoundingClientRect(),initialCursorPosition:i,initialLayout:n})},[]),z=(0,l.useCallback)(()=>{g(null)},[]),O=(0,l.useCallback)(e=>{let{panelDataArray:t}=N.current,r=i7(t,e);r>=0&&(t.splice(r,1),delete b.current[e.id],N.current.panelDataArrayChanged=!0,y())},[y]),F=(0,l.useMemo)(()=>({collapsePanel:C,direction:n,dragState:f,expandPanel:S,getPanelSize:E,getPanelStyle:D,groupId:h,isPanelCollapsed:M,isPanelExpanded:P,reevaluatePanelConstraints:R,registerPanel:T,registerResizeHandle:I,resizePanel:A,startDragging:L,stopDragging:z,unregisterPanel:O,panelGroupElement:m.current}),[C,f,n,S,E,D,h,M,P,R,T,I,A,L,z,O]);return(0,l.createElement)(it.Provider,{value:F},(0,l.createElement)(d,{...p,children:t,className:r,id:i,ref:m,style:{display:"flex",flexDirection:"horizontal"===n?"row":"column",height:"100%",overflow:"hidden",width:"100%",...u},[ir.group]:"",[ir.groupDirection]:n,[ir.groupId]:h}))}let i9=(0,l.forwardRef)((e,t)=>(0,l.createElement)(i8,{...e,forwardedRef:t}));function i7(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function oe(e,t,r){let n=i7(e,t),a=n===e.length-1,i=r[n];return{...t.constraints,panelSize:i,pivotIndices:a?[n-1,n]:[n,n+1]}}function ot({children:e=null,className:t="",disabled:r=!1,hitAreaMargins:n,id:a,onBlur:i,onClick:o,onDragging:s,onFocus:c,onPointerDown:u,onPointerUp:d,style:p={},tabIndex:h=0,tagName:m="div",...f}){var g,v;let x=(0,l.useRef)(null),y=(0,l.useRef)({onClick:o,onDragging:s,onPointerDown:u,onPointerUp:d});(0,l.useEffect)(()=>{y.current.onClick=o,y.current.onDragging=s,y.current.onPointerDown=u,y.current.onPointerUp=d});let b=(0,l.useContext)(it);if(null===b)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");let{direction:w,groupId:k,registerResizeHandle:j,startDragging:N,stopDragging:C,panelGroupElement:S}=b,E=is(a),[D,M]=(0,l.useState)("inactive"),[P,T]=(0,l.useState)(!1),[I,A]=(0,l.useState)(null),R=(0,l.useRef)({state:D});(0,l.useEffect)(()=>{if(r)A(null);else{let e=j(E);A(()=>e)}},[r,E,j]);let L=null!=(g=null==n?void 0:n.coarse)?g:15,z=null!=(v=null==n?void 0:n.fine)?v:5;return(0,l.useEffect)(()=>{if(r||null==I)return;let e=x.current;i$(e,"Element ref not attached");let t=!1;return function(e,t,r,n,a){var i;let{ownerDocument:o}=t,s={direction:r,element:t,hitAreaMargins:n,setResizeHandlerState:a},l=null!=(i=iT.get(o))?i:0;return iT.set(o,l+1),iA.add(s),iq(),function(){var t;iI.delete(e),iA.delete(s);let r=null!=(t=iT.get(o))?t:1;if(iT.set(o,r-1),iq(),1===r&&iT.delete(o),iM.includes(s)){let e=iM.indexOf(s);e>=0&&iM.splice(e,1),i_(),a("up",!0,null)}}}(E,e,w,{coarse:L,fine:z},(e,r,n)=>{if(!r)return void M("inactive");switch(e){case"down":{M("drag"),t=!1,i$(n,'Expected event to be defined for "down" action'),N(E,n);let{onDragging:e,onPointerDown:r}=y.current;null==e||e(!0),null==r||r();break}case"move":{let{state:e}=R.current;t=!0,"drag"!==e&&M("hover"),i$(n,'Expected event to be defined for "move" action'),I(n);break}case"up":{M("hover"),C();let{onClick:e,onDragging:r,onPointerUp:n}=y.current;null==r||r(!1),null==n||n(),t||null==e||e()}}})},[L,w,r,z,j,E,I,N,C]),!function({disabled:e,handleId:t,resizeHandler:r,panelGroupElement:n}){(0,l.useEffect)(()=>{if(e||null==r||null==n)return;let a=iZ(t,n);if(null==a)return;let i=e=>{if(!e.defaultPrevented)switch(e.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":e.preventDefault(),r(e);break;case"F6":{e.preventDefault();let r=a.getAttribute(ir.groupId);i$(r,`No group element found for id "${r}"`);let i=iK(r,n),o=iY(r,t,n);i$(null!==o,`No resize element found for id "${t}"`);let s=e.shiftKey?o>0?o-1:i.length-1:o+1<i.length?o+1:0;i[s].focus()}}};return a.addEventListener("keydown",i),()=>{a.removeEventListener("keydown",i)}},[n,e,t,r])}({disabled:r,handleId:E,resizeHandler:I,panelGroupElement:S}),(0,l.createElement)(m,{...f,children:e,className:t,id:a,onBlur:()=>{T(!1),null==i||i()},onFocus:()=>{T(!0),null==c||c()},ref:x,role:"separator",style:{touchAction:"none",userSelect:"none",...p},tabIndex:h,[ir.groupDirection]:w,[ir.groupId]:k,[ir.resizeHandle]:"",[ir.resizeHandleActive]:"drag"===D?"pointer":P?"keyboard":void 0,[ir.resizeHandleEnabled]:!r,[ir.resizeHandleId]:E,[ir.resizeHandleState]:D})}i8.displayName="PanelGroup",i9.displayName="forwardRef(PanelGroup)",ot.displayName="PanelResizeHandle";let or=({className:e,...t})=>(0,s.jsx)(i9,{className:(0,h.cn)("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),on=({withHandle:e,className:t,...r})=>(0,s.jsx)(ot,{className:(0,h.cn)("group relative flex w-2 mx-1 items-center justify-center bg-transparent hover:bg-border/50 transition-colors after:absolute after:inset-y-0 after:left-1/2 after:w-4 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-2 data-[panel-group-direction=vertical]:my-1 data-[panel-group-direction=vertical]:mx-0 data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-4 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90 cursor-col-resize data-[panel-group-direction=vertical]:cursor-row-resize",t),...r,children:e&&(0,s.jsx)("div",{className:"z-10 flex h-12 w-1 items-center justify-center rounded-full bg-border/30 hover:bg-border/50 transition-colors opacity-0 group-hover:opacity-100",children:(0,s.jsx)(ie,{className:"h-3 w-3 text-muted-foreground/50"})})});var oa=r(69024),[oi,oo]=(0,J.A)("Tooltip",[ei.Bk]),os=(0,ei.Bk)(),ol="TooltipProvider",oc="tooltip.open",[ou,od]=oi(ol),op=e=>{let{__scopeTooltip:t,delayDuration:r=700,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:i}=e,o=l.useRef(!0),c=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,s.jsx)(ou,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),o.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(e=>{c.current=e},[]),disableHoverableContent:a,children:i})};op.displayName=ol;var oh="Tooltip",[om,of]=oi(oh),og=e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:a,onOpenChange:i,disableHoverableContent:o,delayDuration:c}=e,u=od(oh,e.__scopeTooltip),d=os(t),[p,h]=l.useState(null),m=(0,ea.B)(),f=l.useRef(0),g=o??u.disableHoverableContent,v=c??u.delayDuration,x=l.useRef(!1),[y,b]=(0,X.i)({prop:n,defaultProp:a??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(oc))):u.onClose(),i?.(e)},caller:oh}),w=l.useMemo(()=>y?x.current?"delayed-open":"instant-open":"closed",[y]),k=l.useCallback(()=>{window.clearTimeout(f.current),f.current=0,x.current=!1,b(!0)},[b]),j=l.useCallback(()=>{window.clearTimeout(f.current),f.current=0,b(!1)},[b]),N=l.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{x.current=!0,b(!0),f.current=0},v)},[v,b]);return l.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),(0,s.jsx)(ei.bL,{...d,children:(0,s.jsx)(om,{scope:t,contentId:m,open:y,stateAttribute:w,trigger:p,onTriggerChange:h,onTriggerEnter:l.useCallback(()=>{u.isOpenDelayedRef.current?N():k()},[u.isOpenDelayedRef,N,k]),onTriggerLeave:l.useCallback(()=>{g?j():(window.clearTimeout(f.current),f.current=0)},[j,g]),onOpen:k,onClose:j,disableHoverableContent:g,children:r})})};og.displayName=oh;var ov="TooltipTrigger",ox=l.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,a=of(ov,r),i=od(ov,r),o=os(r),c=l.useRef(null),u=(0,Y.s)(t,c,a.onTriggerChange),d=l.useRef(!1),p=l.useRef(!1),h=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),(0,s.jsx)(ei.Mz,{asChild:!0,...o,children:(0,s.jsx)(Z.sG.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:u,onPointerMove:(0,K.mK)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(p.current||i.isPointerInTransitRef.current||(a.onTriggerEnter(),p.current=!0))}),onPointerLeave:(0,K.mK)(e.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:(0,K.mK)(e.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:(0,K.mK)(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:(0,K.mK)(e.onBlur,a.onClose),onClick:(0,K.mK)(e.onClick,a.onClose)})})});ox.displayName=ov;var oy="TooltipPortal",[ob,ow]=oi(oy,{forceMount:void 0}),ok=e=>{let{__scopeTooltip:t,forceMount:r,children:n,container:a}=e,i=of(oy,t);return(0,s.jsx)(ob,{scope:t,forceMount:r,children:(0,s.jsx)(es.C,{present:r||i.open,children:(0,s.jsx)(eo.Z,{asChild:!0,container:a,children:n})})})};ok.displayName=oy;var oj="TooltipContent",oN=l.forwardRef((e,t)=>{let r=ow(oj,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...i}=e,o=of(oj,e.__scopeTooltip);return(0,s.jsx)(es.C,{present:n||o.open,children:o.disableHoverableContent?(0,s.jsx)(oM,{side:a,...i,ref:t}):(0,s.jsx)(oC,{side:a,...i,ref:t})})}),oC=l.forwardRef((e,t)=>{let r=of(oj,e.__scopeTooltip),n=od(oj,e.__scopeTooltip),a=l.useRef(null),i=(0,Y.s)(t,a),[o,c]=l.useState(null),{trigger:u,onClose:d}=r,p=a.current,{onPointerInTransitChange:h}=n,m=l.useCallback(()=>{c(null),h(!1)},[h]),f=l.useCallback((e,t)=>{let r=e.currentTarget,n={x:e.clientX,y:e.clientY},a=function(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,a,i)){case i:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw Error("unreachable")}}(n,r.getBoundingClientRect());c(function(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let n=e[r];for(;t.length>=2;){let e=t[t.length-1],r=t[t.length-2];if((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let t=e.length-1;t>=0;t--){let n=e[t];for(;r.length>=2;){let e=r[r.length-1],t=r[r.length-2];if((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x))r.pop();else break}r.push(n)}return(r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y)?t:t.concat(r)}(t)}([...function(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(n,a),...function(e){let{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}(t.getBoundingClientRect())])),h(!0)},[h]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(u&&p){let e=e=>f(e,p),t=e=>f(e,u);return u.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[u,p,f,m]),l.useEffect(()=>{if(o){let e=e=>{let t=e.target,r={x:e.clientX,y:e.clientY},n=u?.contains(t)||p?.contains(t),a=!function(e,t){let{x:r,y:n}=e,a=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let o=t[e],s=t[i],l=o.x,c=o.y,u=s.x,d=s.y;c>n!=d>n&&r<(u-l)*(n-c)/(d-c)+l&&(a=!a)}return a}(r,o);n?m():a&&(m(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,p,o,d,m]),(0,s.jsx)(oM,{...e,ref:i})}),[oS,oE]=oi(oh,{isInside:!1}),oD=(0,eC.Dc)("TooltipContent"),oM=l.forwardRef((e,t)=>{let{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...c}=e,u=of(oj,r),d=os(r),{onClose:p}=u;return l.useEffect(()=>(document.addEventListener(oc,p),()=>document.removeEventListener(oc,p)),[p]),l.useEffect(()=>{if(u.trigger){let e=e=>{let t=e.target;t?.contains(u.trigger)&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[u.trigger,p]),(0,s.jsx)(et.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:(0,s.jsxs)(ei.UC,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,s.jsx)(oD,{children:n}),(0,s.jsx)(oS,{scope:r,isInside:!0,children:(0,s.jsx)(oa.bL,{id:u.contentId,role:"tooltip",children:a||n})})]})})});oN.displayName=oj;var oP="TooltipArrow",oT=l.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,a=os(r);return oE(oP,r).isInside?null:(0,s.jsx)(ei.i3,{...a,...n,ref:t})});function oI({delayDuration:e=0,...t}){return(0,s.jsx)(op,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function oA({...e}){return(0,s.jsx)(oI,{children:(0,s.jsx)(og,{"data-slot":"tooltip",...e})})}function oR({...e}){return(0,s.jsx)(ox,{"data-slot":"tooltip-trigger",...e})}function oL({className:e,sideOffset:t=0,children:r,arrowStyle:n,...a}){return(0,s.jsx)(ok,{children:(0,s.jsxs)(oN,{"data-slot":"tooltip-content",sideOffset:t,className:(0,h.cn)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...a,children:[r,(0,s.jsx)(oT,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]",style:n})]})})}oT.displayName=oP;var oz=r(48730);let oO={pending:(0,s.jsx)(oz.A,{className:"h-4 w-4 text-muted-foreground"}),in_progress:(0,s.jsx)(n_.A,{className:"h-4 w-4 text-blue-500 animate-spin"}),success:(0,s.jsx)(w.A,{className:"h-4 w-4 text-green-500"}),failed:(0,s.jsx)(k.A,{className:"h-4 w-4 text-red-500"}),skipped:(0,s.jsx)("span",{className:"text-muted-foreground",children:"⊘"})},oF={pending:"text-muted-foreground",in_progress:"text-blue-500",success:"text-green-500",failed:"text-red-500",skipped:"text-gray-400"};function o_({title:e,steps:t,checkpointId:r,onRestore:n,isSavedCheckpoint:a,expanded:i=!0,onToggleExpand:o}){let l=t.filter(e=>"success"===e.status).length,c=t.filter(e=>"failed"===e.status).length,u=t.some(e=>"in_progress"===e.status),d=t.every(e=>"pending"!==e.status&&"in_progress"!==e.status),p=r&&d?(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(rO.E,{variant:a?"default":"outline",className:"h-6 px-2 text-xs",children:a?"Saved version":"Checkpoint"}),n&&(0,s.jsxs)(m.$,{size:"sm",variant:"ghost",onClick:()=>n(r),className:"h-6 px-2 text-xs",title:"Restore to this checkpoint",children:[(0,s.jsx)(aQ,{className:"h-3 w-3 mr-1"}),"Restore"]})]}):null;return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("div",{className:"flex items-start justify-between",children:(0,s.jsxs)("div",{className:"flex items-start gap-2 flex-1",children:[(0,s.jsx)("button",{onClick:o,className:"mt-0.5 hover:bg-muted rounded p-0.5","aria-label":i?"Collapse":"Expand",children:i?(0,s.jsx)(nc.A,{className:"h-4 w-4"}):(0,s.jsx)(tJ,{className:"h-4 w-4"})}),(0,s.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-medium",children:e}),u&&(0,s.jsx)("span",{className:"text-xs text-blue-500 animate-pulse",children:"In Progress..."}),d&&(0,s.jsx)("span",{className:(0,h.cn)("text-xs",0===c?"text-green-500":"text-orange-500"),children:0===c?"✓ Complete":`⚠ ${l}/${t.length} succeeded`})]}),!i&&t.length>0&&(0,s.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(w.A,{className:"h-3 w-3 text-green-500"}),l]}),c>0&&(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(k.A,{className:"h-3 w-3 text-red-500"}),c]}),(0,s.jsxs)("span",{children:[t.length," total"]})]})]})]})}),i&&t.length>0&&(0,s.jsx)("div",{className:"ml-6 space-y-1 text-sm",children:t.map(e=>(0,s.jsxs)("div",{className:(0,h.cn)("flex items-start gap-2 py-1",oF[e.status]),children:[(0,s.jsx)("span",{className:"mt-0.5",children:oO[e.status]}),(0,s.jsxs)("div",{className:"flex-1 space-y-0.5",children:[(0,s.jsx)("div",{children:e.description}),e.error&&(0,s.jsxs)("div",{className:"text-xs text-red-400 ml-6",children:["Error: ",e.error]})]})]},e.id))}),p&&(0,s.jsx)("div",{className:"ml-6",children:p})]})}var oq=r(5336),oB=r(35071);let o$=(0,v.A)("iteration-cw",[["path",{d:"M4 10a8 8 0 1 1 8 8H4",key:"svv66n"}],["path",{d:"m8 22-4-4 4-4",key:"6g7gki"}]]);var oU=r(45583);let oH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oV=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oW={};function oG(e,t){return((t||oW).jsx?oV:oH).test(e)}let oK=/[ \t\n\f\r]/g;function oY(e){return""===e.replace(oK,"")}class oJ{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}}function oX(e,t){let r={},n={};for(let t of e)Object.assign(r,t.property),Object.assign(n,t.normal);return new oJ(r,n,t)}function oZ(e){return e.toLowerCase()}oJ.prototype.normal={},oJ.prototype.property={},oJ.prototype.space=void 0;class oQ{constructor(e,t){this.attribute=t,this.property=e}}oQ.prototype.attribute="",oQ.prototype.booleanish=!1,oQ.prototype.boolean=!1,oQ.prototype.commaOrSpaceSeparated=!1,oQ.prototype.commaSeparated=!1,oQ.prototype.defined=!1,oQ.prototype.mustUseProperty=!1,oQ.prototype.number=!1,oQ.prototype.overloadedBoolean=!1,oQ.prototype.property="",oQ.prototype.spaceSeparated=!1,oQ.prototype.space=void 0;let o0=0,o1=o9(),o2=o9(),o3=o9(),o4=o9(),o5=o9(),o6=o9(),o8=o9();function o9(){return 2**++o0}let o7=Object.keys(i);class se extends oQ{constructor(e,t,r,n){let a=-1;if(super(e,t),function(e,t,r){r&&(e[t]=r)}(this,"space",n),"number"==typeof r)for(;++a<o7.length;){let e=o7[a];!function(e,t,r){r&&(e[t]=r)}(this,o7[a],(r&i[e])===i[e])}}}function st(e){let t={},r={};for(let[n,a]of Object.entries(e.properties)){let i=new se(n,e.transform(e.attributes||{},n),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[oZ(n)]=n,r[oZ(i.attribute)]=n}return new oJ(t,r,e.space)}se.prototype.defined=!0;let sr=st({properties:{ariaActiveDescendant:null,ariaAtomic:o2,ariaAutoComplete:null,ariaBusy:o2,ariaChecked:o2,ariaColCount:o4,ariaColIndex:o4,ariaColSpan:o4,ariaControls:o5,ariaCurrent:null,ariaDescribedBy:o5,ariaDetails:null,ariaDisabled:o2,ariaDropEffect:o5,ariaErrorMessage:null,ariaExpanded:o2,ariaFlowTo:o5,ariaGrabbed:o2,ariaHasPopup:null,ariaHidden:o2,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:o5,ariaLevel:o4,ariaLive:null,ariaModal:o2,ariaMultiLine:o2,ariaMultiSelectable:o2,ariaOrientation:null,ariaOwns:o5,ariaPlaceholder:null,ariaPosInSet:o4,ariaPressed:o2,ariaReadOnly:o2,ariaRelevant:null,ariaRequired:o2,ariaRoleDescription:o5,ariaRowCount:o4,ariaRowIndex:o4,ariaRowSpan:o4,ariaSelected:o2,ariaSetSize:o4,ariaSort:null,ariaValueMax:o4,ariaValueMin:o4,ariaValueNow:o4,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function sn(e,t){return t in e?e[t]:t}function sa(e,t){return sn(e,t.toLowerCase())}let si=st({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:o6,acceptCharset:o5,accessKey:o5,action:null,allow:null,allowFullScreen:o1,allowPaymentRequest:o1,allowUserMedia:o1,alt:null,as:null,async:o1,autoCapitalize:null,autoComplete:o5,autoFocus:o1,autoPlay:o1,blocking:o5,capture:null,charSet:null,checked:o1,cite:null,className:o5,cols:o4,colSpan:null,content:null,contentEditable:o2,controls:o1,controlsList:o5,coords:o4|o6,crossOrigin:null,data:null,dateTime:null,decoding:null,default:o1,defer:o1,dir:null,dirName:null,disabled:o1,download:o3,draggable:o2,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:o1,formTarget:null,headers:o5,height:o4,hidden:o3,high:o4,href:null,hrefLang:null,htmlFor:o5,httpEquiv:o5,id:null,imageSizes:null,imageSrcSet:null,inert:o1,inputMode:null,integrity:null,is:null,isMap:o1,itemId:null,itemProp:o5,itemRef:o5,itemScope:o1,itemType:o5,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:o1,low:o4,manifest:null,max:null,maxLength:o4,media:null,method:null,min:null,minLength:o4,multiple:o1,muted:o1,name:null,nonce:null,noModule:o1,noValidate:o1,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:o1,optimum:o4,pattern:null,ping:o5,placeholder:null,playsInline:o1,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:o1,referrerPolicy:null,rel:o5,required:o1,reversed:o1,rows:o4,rowSpan:o4,sandbox:o5,scope:null,scoped:o1,seamless:o1,selected:o1,shadowRootClonable:o1,shadowRootDelegatesFocus:o1,shadowRootMode:null,shape:null,size:o4,sizes:null,slot:null,span:o4,spellCheck:o2,src:null,srcDoc:null,srcLang:null,srcSet:null,start:o4,step:null,style:null,tabIndex:o4,target:null,title:null,translate:null,type:null,typeMustMatch:o1,useMap:null,value:o2,width:o4,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:o5,axis:null,background:null,bgColor:null,border:o4,borderColor:null,bottomMargin:o4,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:o1,declare:o1,event:null,face:null,frame:null,frameBorder:null,hSpace:o4,leftMargin:o4,link:null,longDesc:null,lowSrc:null,marginHeight:o4,marginWidth:o4,noResize:o1,noHref:o1,noShade:o1,noWrap:o1,object:null,profile:null,prompt:null,rev:null,rightMargin:o4,rules:null,scheme:null,scrolling:o2,standby:null,summary:null,text:null,topMargin:o4,valueType:null,version:null,vAlign:null,vLink:null,vSpace:o4,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:o1,disableRemotePlayback:o1,prefix:null,property:null,results:o4,security:null,unselectable:null},space:"html",transform:sa}),so=st({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:o8,accentHeight:o4,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:o4,amplitude:o4,arabicForm:null,ascent:o4,attributeName:null,attributeType:null,azimuth:o4,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:o4,by:null,calcMode:null,capHeight:o4,className:o5,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:o4,diffuseConstant:o4,direction:null,display:null,dur:null,divisor:o4,dominantBaseline:null,download:o1,dx:null,dy:null,edgeMode:null,editable:null,elevation:o4,enableBackground:null,end:null,event:null,exponent:o4,externalResourcesRequired:null,fill:null,fillOpacity:o4,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:o6,g2:o6,glyphName:o6,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:o4,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:o4,horizOriginX:o4,horizOriginY:o4,id:null,ideographic:o4,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:o4,k:o4,k1:o4,k2:o4,k3:o4,k4:o4,kernelMatrix:o8,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:o4,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:o4,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:o4,overlineThickness:o4,paintOrder:null,panose1:null,path:null,pathLength:o4,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:o5,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:o4,pointsAtY:o4,pointsAtZ:o4,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:o8,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:o8,rev:o8,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:o8,requiredFeatures:o8,requiredFonts:o8,requiredFormats:o8,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:o4,specularExponent:o4,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:o4,strikethroughThickness:o4,string:null,stroke:null,strokeDashArray:o8,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:o4,strokeOpacity:o4,strokeWidth:null,style:null,surfaceScale:o4,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:o8,tabIndex:o4,tableValues:null,target:null,targetX:o4,targetY:o4,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:o8,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:o4,underlineThickness:o4,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:o4,values:null,vAlphabetic:o4,vMathematical:o4,vectorEffect:null,vHanging:o4,vIdeographic:o4,version:null,vertAdvY:o4,vertOriginX:o4,vertOriginY:o4,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:o4,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:sn}),ss=st({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),sl=st({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:sa}),sc=st({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),su=oX([sr,si,ss,sl,sc],"html"),sd=oX([sr,so,ss,sl,sc],"svg"),sp=/[A-Z]/g,sh=/-[a-z]/g,sm=/^data[-\w.:]+$/i;function sf(e){return"-"+e.toLowerCase()}function sg(e){return e.charAt(1).toUpperCase()}let sv={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var sx=r(11120);let sy=sw("end"),sb=sw("start");function sw(e){return function(t){let r=t&&t.position&&t.position[e]||{};if("number"==typeof r.line&&r.line>0&&"number"==typeof r.column&&r.column>0)return{line:r.line,column:r.column,offset:"number"==typeof r.offset&&r.offset>-1?r.offset:void 0}}}function sk(e){return e&&"object"==typeof e?"position"in e||"type"in e?sN(e.position):"start"in e||"end"in e?sN(e):"line"in e||"column"in e?sj(e):"":""}function sj(e){return sC(e&&e.line)+":"+sC(e&&e.column)}function sN(e){return sj(e&&e.start)+"-"+sj(e&&e.end)}function sC(e){return e&&"number"==typeof e?e:1}class sS extends Error{constructor(e,t,r){super(),"string"==typeof t&&(r=t,t=void 0);let n="",a={},i=!1;if(t&&(a="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?n=e:!a.cause&&e&&(i=!0,n=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof r){let e=r.indexOf(":");-1===e?a.ruleId=r:(a.source=r.slice(0,e),a.ruleId=r.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){let e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}let o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=o?o.line:void 0,this.name=sk(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}sS.prototype.file="",sS.prototype.name="",sS.prototype.reason="",sS.prototype.message="",sS.prototype.stack="",sS.prototype.column=void 0,sS.prototype.line=void 0,sS.prototype.ancestors=void 0,sS.prototype.cause=void 0,sS.prototype.fatal=void 0,sS.prototype.place=void 0,sS.prototype.ruleId=void 0,sS.prototype.source=void 0;let sE={}.hasOwnProperty,sD=new Map,sM=/[A-Z]/g,sP=new Set(["table","tbody","thead","tfoot","tr"]),sT=new Set(["td","th"]),sI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sA(e,t,r){var n;return"element"===t.type?function(e,t,r){let n=e.schema,a=n;"svg"===t.tagName.toLowerCase()&&"html"===n.space&&(e.schema=sd),e.ancestors.push(t);let i=sO(e,t.tagName,!1),o=function(e,t){let r,n,a={};for(n in t.properties)if("children"!==n&&sE.call(t.properties,n)){let i=function(e,t,r){let n=function(e,t){let r=oZ(t),n=t,a=oQ;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&"data"===r.slice(0,4)&&sm.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(sh,sg);n="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!sh.test(e)){let r=e.replace(sp,sf);"-"!==r.charAt(0)&&(r="-"+r),t="data"+r}}a=se}return new a(n,t)}(e.schema,t);if(!(null==r||"number"==typeof r&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?function(e,t){let r={};return(""===e[e.length-1]?[...e,""]:e).join((r.padRight?" ":"")+","+(!1===r.padLeft?"":" ")).trim()}(r):r.join(" ").trim()),"style"===n.property){let t="object"==typeof r?r:function(e,t){try{return sx(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};let t=new sS("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=sI+"#cannot-parse-style-attribute",t}}(e,String(r));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,r={};for(t in e)sE.call(e,t)&&(r[function(e){let t=e.replace(sM,s_);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return r}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&n.space?sv[n.property]||n.property:n.attribute,r]}}(e,n,t.properties[n]);if(i){let[n,o]=i;e.tableCellAlignToStyle&&"align"===n&&"string"==typeof o&&sT.has(t.tagName)?r=o:a[n]=o}}return r&&((a.style||(a.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r),a}(e,t),s=sz(e,t);return sP.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&oY(e.value):oY(e))})),sR(e,o,i,t),sL(o,s),e.ancestors.pop(),e.schema=n,e.create(t,i,o,r)}(e,t,r):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}sF(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,r){let n=e.schema,a=n;"svg"===t.name&&"html"===n.space&&(e.schema=sd),e.ancestors.push(t);let i=null===t.name?e.Fragment:sO(e,t.name,!0),o=function(e,t){let r={};for(let n of t.attributes)if("mdxJsxExpressionAttribute"===n.type)if(n.data&&n.data.estree&&e.evaluater){let t=n.data.estree.body[0];t.type;let a=t.expression;a.type;let i=a.properties[0];i.type,Object.assign(r,e.evaluater.evaluateExpression(i.argument))}else sF(e,t.position);else{let a,i=n.name;if(n.value&&"object"==typeof n.value)if(n.value.data&&n.value.data.estree&&e.evaluater){let t=n.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else sF(e,t.position);else a=null===n.value||n.value;r[i]=a}return r}(e,t),s=sz(e,t);return sR(e,o,i,t),sL(o,s),e.ancestors.pop(),e.schema=n,e.create(t,i,o,r)}(e,t,r):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sF(e,t.position)}(e,t):"root"===t.type?function(e,t,r){let n={};return sL(n,sz(e,t)),e.create(t,e.Fragment,n,r)}(e,t,r):"text"===t.type?(n=0,t.value):void 0}function sR(e,t,r,n){"string"!=typeof r&&r!==e.Fragment&&e.passNode&&(t.node=n)}function sL(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function sz(e,t){let r=[],n=-1,a=e.passKeys?new Map:sD;for(;++n<t.children.length;){let i,o=t.children[n];if(e.passKeys){let e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){let t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}let s=sA(e,o,i);void 0!==s&&r.push(s)}return r}function sO(e,t,r){let n;if(r)if(t.includes(".")){let e,r=t.split("."),a=-1;for(;++a<r.length;){let t=oG(r[a])?{type:"Identifier",name:r[a]}:{type:"Literal",value:r[a]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(a&&"Literal"===t.type),optional:!1}:t}n=e}else n=oG(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else n={type:"Literal",value:t};if("Literal"===n.type){let t=n.value;return sE.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(n);sF(e)}function sF(e,t){let r=new sS("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=sI+"#cannot-handle-mdx-estrees-without-createevaluater",r}function s_(e){return"-"+e.toLowerCase()}let sq={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},sB={};function s$(e,t,r){var n;if((n=e)&&"object"==typeof n){if("value"in e)return"html"!==e.type||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return sU(e.children,t,r)}return Array.isArray(e)?sU(e,t,r):""}function sU(e,t,r){let n=[],a=-1;for(;++a<e.length;)n[a]=s$(e[a],t,r);return n.join("")}function sH(e,t,r,n){let a,i=e.length,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)(a=Array.from(n)).unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);o<n.length;)(a=n.slice(o,o+1e4)).unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function sV(e,t){return e.length>0?(sH(e,e.length,0,t),e):t}class sW{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let r=null==t?Number.POSITIVE_INFINITY:t;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){this.setCursor(Math.trunc(e));let n=this.right.splice(this.right.length-(t||0),Number.POSITIVE_INFINITY);return r&&sG(this.left,r),n.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),sG(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),sG(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,Number.POSITIVE_INFINITY);sG(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);sG(this.left,t.reverse())}}}function sG(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function sK(e){let t,r,n,a,i,o,s,l={},c=-1,u=new sW(e);for(;++c<u.length;){for(;c in l;)c=l[c];if(t=u.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&((n=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[n][1].type&&(n+=2),n<o.length&&"content"===o[n][1].type))for(;++n<o.length&&"content"!==o[n][1].type;)"chunkText"===o[n][1].type&&(o[n][1]._isInFirstContentOfListItem=!0,n++);if("enter"===t[0])t[1].contentType&&(Object.assign(l,function(e,t){let r,n,a=e.get(t)[1],i=e.get(t)[2],o=t-1,s=[],l=a._tokenizer;!l&&(l=i.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));let c=l.events,u=[],d={},p=-1,h=a,m=0,f=0,g=[0];for(;h;){for(;e.get(++o)[1]!==h;);s.push(o),!h._tokenizer&&(r=i.sliceStream(h),h.next||r.push(null),n&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(r),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),n=h,h=h.next}for(h=a;++p<c.length;)"exit"===c[p][0]&&"enter"===c[p-1][0]&&c[p][1].type===c[p-1][1].type&&c[p][1].start.line!==c[p][1].end.line&&(f=p+1,g.push(f),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),p=g.length;p--;){let t=c.slice(g[p],g[p+1]),r=s.pop();u.push([r,r+t.length-1]),e.splice(r,2,t)}for(u.reverse(),p=-1;++p<u.length;)d[m+u[p][0]]=m+u[p][1],m+=u[p][1]-u[p][0]-1;return d}(u,c)),c=l[c],s=!0);else if(t[1]._container){for(n=c,r=void 0;n--;)if("lineEnding"===(a=u.get(n))[1].type||"lineEndingBlank"===a[1].type)"enter"===a[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),a[1].type="lineEnding",r=n);else if("linePrefix"===a[1].type||"listItemIndent"===a[1].type);else break;r&&(t[1].end={...u.get(r)[1].start},(i=u.slice(r,c)).unshift(t),u.splice(r,c-r+1,i))}}return sH(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!s}let sY={}.hasOwnProperty,sJ=s9(/[A-Za-z]/),sX=s9(/[\dA-Za-z]/),sZ=s9(/[#-'*+\--9=?A-Z^-~]/);function sQ(e){return null!==e&&(e<32||127===e)}let s0=s9(/\d/),s1=s9(/[\dA-Fa-f]/),s2=s9(/[!-/:-@[-`{-~]/);function s3(e){return null!==e&&e<-2}function s4(e){return null!==e&&(e<0||32===e)}function s5(e){return -2===e||-1===e||32===e}let s6=s9(/\p{P}|\p{S}/u),s8=s9(/\s/);function s9(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function s7(e,t,r,n){let a=n?n-1:Number.POSITIVE_INFINITY,i=0;return function(n){return s5(n)?(e.enter(r),function n(o){return s5(o)&&i++<a?(e.consume(o),n):(e.exit(r),t(o))}(n)):t(n)}}let le={tokenize:function(e){let t,r=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s7(e,r,"linePrefix"))},function(r){return e.enter("paragraph"),function r(n){let a=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=a),t=a,function t(n){if(null===n){e.exit("chunkText"),e.exit("paragraph"),e.consume(n);return}return s3(n)?(e.consume(n),e.exit("chunkText"),r):(e.consume(n),t)}(n)}(r)});return r}},lt={tokenize:function(e){let t,r,n,a=this,i=[],o=0;return s;function s(t){if(o<i.length){let r=i[o];return a.containerState=r[1],e.attempt(r[0].continuation,l,c)(t)}return c(t)}function l(e){if(o++,a.containerState._closeFlow){let r;a.containerState._closeFlow=void 0,t&&v();let n=a.events.length,i=n;for(;i--;)if("exit"===a.events[i][0]&&"chunkFlow"===a.events[i][1].type){r=a.events[i][1].end;break}g(o);let s=n;for(;s<a.events.length;)a.events[s][1].end={...r},s++;return sH(a.events,i+1,0,a.events.slice(n)),a.events.length=s,c(e)}return s(e)}function c(r){if(o===i.length){if(!t)return p(r);if(t.currentConstruct&&t.currentConstruct.concrete)return m(r);a.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return a.containerState={},e.check(lr,u,d)(r)}function u(e){return t&&v(),g(o),p(e)}function d(e){return a.parser.lazy[a.now().line]=o!==i.length,n=a.now().offset,m(e)}function p(t){return a.containerState={},e.attempt(lr,h,m)(t)}function h(e){return o++,i.push([a.currentConstruct,a.containerState]),p(e)}function m(n){if(null===n){t&&v(),g(0),e.consume(n);return}return t=t||a.parser.flow(a.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:r}),function t(r){if(null===r){f(e.exit("chunkFlow"),!0),g(0),e.consume(r);return}return s3(r)?(e.consume(r),f(e.exit("chunkFlow")),o=0,a.interrupt=void 0,s):(e.consume(r),t)}(n)}function f(e,i){let s=a.sliceStream(e);if(i&&s.push(null),e.previous=r,r&&(r.next=e),r=e,t.defineSkip(e.start),t.write(s),a.parser.lazy[e.start.line]){let e,r,i=t.events.length;for(;i--;)if(t.events[i][1].start.offset<n&&(!t.events[i][1].end||t.events[i][1].end.offset>n))return;let s=a.events.length,l=s;for(;l--;)if("exit"===a.events[l][0]&&"chunkFlow"===a.events[l][1].type){if(e){r=a.events[l][1].end;break}e=!0}for(g(o),i=s;i<a.events.length;)a.events[i][1].end={...r},i++;sH(a.events,l+1,0,a.events.slice(s)),a.events.length=i}}function g(t){let r=i.length;for(;r-- >t;){let t=i[r];a.containerState=t[1],t[0].exit.call(a,e)}i.length=t}function v(){t.write([null]),r=void 0,t=void 0,a.containerState._closeFlow=void 0}}},lr={tokenize:function(e,t,r){return s7(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},ln={partial:!0,tokenize:function(e,t,r){return function(t){return s5(t)?s7(e,n,"linePrefix")(t):n(t)};function n(e){return null===e||s3(e)?t(e):r(e)}}},la={resolve:function(e){return sK(e),e},tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?a(t):s3(t)?e.check(li,i,a)(t):(e.consume(t),n)}function a(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function i(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}},li={partial:!0,tokenize:function(e,t,r){let n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s7(e,a,"linePrefix")};function a(a){if(null===a||s3(a))return r(a);let i=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}},lo={tokenize:function(e){let t=this,r=e.attempt(ln,function(n){return null===n?void e.consume(n):(e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r)},e.attempt(this.parser.constructs.flowInitial,n,s7(e,e.attempt(this.parser.constructs.flow,n,e.attempt(la,n)),"linePrefix")));return r;function n(n){return null===n?void e.consume(n):(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r)}}},ls={resolveAll:ld()},ll=lu("string"),lc=lu("text");function lu(e){return{resolveAll:ld("text"===e?lp:void 0),tokenize:function(t){let r=this,n=this.parser.constructs[e],a=t.attempt(n,i,o);return i;function i(e){return l(e)?a(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),s)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;let t=n[e],a=-1;if(t)for(;++a<t.length;){let e=t[a];if(!e.previous||e.previous.call(r,r.previous))return!0}return!1}}}}function ld(e){return function(t,r){let n,a=-1;for(;++a<=t.length;)void 0===n?t[a]&&"data"===t[a][1].type&&(n=a,a++):t[a]&&"data"===t[a][1].type||(a!==n+2&&(t[n][1].end=t[a-1][1].end,t.splice(n+2,a-n-2),a=n+2),n=void 0);return e?e(t,r):t}}function lp(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){let n,a=e[r-1][1],i=t.sliceStream(a),o=i.length,s=-1,l=0;for(;o--;){let e=i[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)n=!0,l++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(l=0),l){let i={type:r===e.length||n||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:a.start._bufferIndex+s,_index:a.start._index+o,line:a.end.line,column:a.end.column-l,offset:a.end.offset-l},end:{...a.end}};a.end={...i.start},a.start.offset===a.end.offset?Object.assign(a,i):(e.splice(r,0,["enter",i,t],["exit",i,t]),r+=2)}r++}return e}let lh={name:"thematicBreak",tokenize:function(e,t,r){let n,a=0;return function(i){var o;return e.enter("thematicBreak"),n=o=i,function i(o){return o===n?(e.enter("thematicBreakSequence"),function t(r){return r===n?(e.consume(r),a++,t):(e.exit("thematicBreakSequence"),s5(r)?s7(e,i,"whitespace")(r):i(r))}(o)):a>=3&&(null===o||s3(o))?(e.exit("thematicBreak"),t(o)):r(o)}(o)}}},lm={continuation:{tokenize:function(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(ln,function(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,s7(e,t,"listItemIndent",n.containerState.size+1)(r)},function(r){return n.containerState.furtherBlankLines||!s5(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(lg,t,a)(r))});function a(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,s7(e,e.attempt(lm,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,r){let n=this,a=n.events[n.events.length-1],i=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,o=0;return function(t){let a=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!n.containerState.marker||t===n.containerState.marker:s0(t)){if(n.containerState.type||(n.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(lh,r,s)(t):s(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(a){return s0(a)&&++o<10?(e.consume(a),t):(!n.interrupt||o<2)&&(n.containerState.marker?a===n.containerState.marker:41===a||46===a)?(e.exit("listItemValue"),s(a)):r(a)}(t)}return r(t)};function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(ln,n.interrupt?r:l,e.attempt(lf,u,c))}function l(e){return n.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return s5(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):r(t)}function u(r){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}}},lf={partial:!0,tokenize:function(e,t,r){let n=this;return s7(e,function(e){let a=n.events[n.events.length-1];return!s5(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):r(e)},"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},lg={partial:!0,tokenize:function(e,t,r){let n=this;return s7(e,function(e){let a=n.events[n.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(e):r(e)},"listItemIndent",n.containerState.size+1)}},lv={continuation:{tokenize:function(e,t,r){let n=this;return function(t){return s5(t)?s7(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):a(t)};function a(n){return e.attempt(lv,t,r)(n)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,r){let n=this;return function(t){if(62===t){let r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return r(t)};function a(r){return s5(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}}};function lx(e,t,r,n,a,i,o,s,l){let c=l||Number.POSITIVE_INFINITY,u=0;return function(t){return 60===t?(e.enter(n),e.enter(a),e.enter(i),e.consume(t),e.exit(i),d):null===t||32===t||41===t||sQ(t)?r(t):(e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(t))};function d(r){return 62===r?(e.enter(i),e.consume(r),e.exit(i),e.exit(a),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(r))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||s3(t)?r(t):(e.consume(t),92===t?h:p)}function h(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function m(a){return!u&&(null===a||41===a||s4(a))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(a)):u<c&&40===a?(e.consume(a),u++,m):41===a?(e.consume(a),u--,m):null===a||32===a||40===a||sQ(a)?r(a):(e.consume(a),92===a?f:m)}function f(t){return 40===t||41===t||92===t?(e.consume(t),m):m(t)}}function ly(e,t,r,n,a,i){let o,s=this,l=0;return function(t){return e.enter(n),e.enter(a),e.consume(t),e.exit(a),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!o||94===d&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?r(d):93===d?(e.exit(i),e.enter(a),e.consume(d),e.exit(a),e.exit(n),t):s3(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||s3(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),o||(o=!s5(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function lb(e,t,r,n,a,i){let o;return function(t){return 34===t||39===t||40===t?(e.enter(n),e.enter(a),e.consume(t),e.exit(a),o=40===t?41:t,s):r(t)};function s(r){return r===o?(e.enter(a),e.consume(r),e.exit(a),e.exit(n),t):(e.enter(i),l(r))}function l(t){return t===o?(e.exit(i),s(o)):null===t?r(t):s3(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s7(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||s3(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===o||92===t?(e.consume(t),c):c(t)}}function lw(e,t){let r;return function n(a){return s3(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r=!0,n):s5(a)?s7(e,n,r?"linePrefix":"lineSuffix")(a):t(a)}}function lk(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let lj={partial:!0,tokenize:function(e,t,r){return function(t){return s4(t)?lw(e,n)(t):r(t)};function n(t){return lb(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return s5(t)?s7(e,i,"whitespace")(t):i(t)}function i(e){return null===e||s3(e)?t(e):r(e)}}},lN={name:"codeIndented",tokenize:function(e,t,r){let n=this;return function(t){return e.enter("codeIndented"),s7(e,a,"linePrefix",5)(t)};function a(t){let a=n.events[n.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?function t(r){return null===r?i(r):s3(r)?e.attempt(lC,t,i)(r):(e.enter("codeFlowValue"),function r(n){return null===n||s3(n)?(e.exit("codeFlowValue"),t(n)):(e.consume(n),r)}(r))}(t):r(t)}function i(r){return e.exit("codeIndented"),t(r)}}},lC={partial:!0,tokenize:function(e,t,r){let n=this;return a;function a(t){return n.parser.lazy[n.now().line]?r(t):s3(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):s7(e,i,"linePrefix",5)(t)}function i(e){let i=n.events[n.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):s3(e)?a(e):r(e)}}},lS={name:"setextUnderline",resolveTo:function(e,t){let r,n,a,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){r=i;break}"paragraph"===e[i][1].type&&(n=i)}else"content"===e[i][1].type&&e.splice(i,1),a||"definition"!==e[i][1].type||(a=i);let o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[n][1].type="setextHeadingText",a?(e.splice(n,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,r){let n,a=this;return function(t){var o;let s,l=a.events.length;for(;l--;)if("lineEnding"!==a.events[l][1].type&&"linePrefix"!==a.events[l][1].type&&"content"!==a.events[l][1].type){s="paragraph"===a.events[l][1].type;break}return!a.parser.lazy[a.now().line]&&(a.interrupt||s)?(e.enter("setextHeadingLine"),n=t,o=t,e.enter("setextHeadingLineSequence"),function t(r){return r===n?(e.consume(r),t):(e.exit("setextHeadingLineSequence"),s5(r)?s7(e,i,"lineSuffix")(r):i(r))}(o)):r(t)};function i(n){return null===n||s3(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}}},lE=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],lD=["pre","script","style","textarea"],lM={partial:!0,tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(ln,t,r)}}},lP={partial:!0,tokenize:function(e,t,r){let n=this;return function(t){return s3(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):r(t)};function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}},lT={partial:!0,tokenize:function(e,t,r){let n=this;return function(t){return null===t?r(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a)};function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}},lI={concrete:!0,name:"codeFenced",tokenize:function(e,t,r){let n,a=this,i={partial:!0,tokenize:function(e,t,r){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),s5(t)?s7(e,l,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===n?(e.enter("codeFencedFenceSequence"),function t(a){return a===n?(i++,e.consume(a),t):i>=s?(e.exit("codeFencedFenceSequence"),s5(a)?s7(e,c,"whitespace")(a):c(a)):r(a)}(t)):r(t)}function c(n){return null===n||s3(n)?(e.exit("codeFencedFence"),t(n)):r(n)}}},o=0,s=0;return function(t){var i=t;let c=a.events[a.events.length-1];return o=c&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0,n=i,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(a){return a===n?(s++,e.consume(a),t):s<3?r(a):(e.exit("codeFencedFenceSequence"),s5(a)?s7(e,l,"whitespace")(a):l(a))}(i)};function l(i){return null===i||s3(i)?(e.exit("codeFencedFence"),a.interrupt?t(i):e.check(lT,u,m)(i)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(a){return null===a||s3(a)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(a)):s5(a)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s7(e,c,"whitespace")(a)):96===a&&a===n?r(a):(e.consume(a),t)}(i))}function c(t){return null===t||s3(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(a){return null===a||s3(a)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(a)):96===a&&a===n?r(a):(e.consume(a),t)}(t))}function u(t){return e.attempt(i,m,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),p}function p(t){return o>0&&s5(t)?s7(e,h,"linePrefix",o+1)(t):h(t)}function h(t){return null===t||s3(t)?e.check(lT,u,m)(t):(e.enter("codeFlowValue"),function t(r){return null===r||s3(r)?(e.exit("codeFlowValue"),h(r)):(e.consume(r),t)}(t))}function m(r){return e.exit("codeFenced"),t(r)}}},lA={AElig:"\xc6",AMP:"&",Aacute:"\xc1",Abreve:"Ă",Acirc:"\xc2",Acy:"А",Afr:"\uD835\uDD04",Agrave:"\xc0",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"\uD835\uDD38",ApplyFunction:"",Aring:"\xc5",Ascr:"\uD835\uDC9C",Assign:"≔",Atilde:"\xc3",Auml:"\xc4",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"\uD835\uDD05",Bopf:"\uD835\uDD39",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"\xa9",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"\xc7",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"\xb8",CenterDot:"\xb7",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"\uD835\uDC9E",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"\uD835\uDD07",DiacriticalAcute:"\xb4",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"\uD835\uDD3B",Dot:"\xa8",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"\xa8",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"\uD835\uDC9F",Dstrok:"Đ",ENG:"Ŋ",ETH:"\xd0",Eacute:"\xc9",Ecaron:"Ě",Ecirc:"\xca",Ecy:"Э",Edot:"Ė",Efr:"\uD835\uDD08",Egrave:"\xc8",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"\uD835\uDD3C",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"\xcb",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"\uD835\uDD09",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"\uD835\uDD3D",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"\uD835\uDD0A",Gg:"⋙",Gopf:"\uD835\uDD3E",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"\uD835\uDCA2",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"\xcd",Icirc:"\xce",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"\xcc",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"\uD835\uDD40",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"\xcf",Jcirc:"Ĵ",Jcy:"Й",Jfr:"\uD835\uDD0D",Jopf:"\uD835\uDD41",Jscr:"\uD835\uDCA5",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"\uD835\uDD0E",Kopf:"\uD835\uDD42",Kscr:"\uD835\uDCA6",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"\uD835\uDD0F",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"\uD835\uDD43",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"\uD835\uDD10",MinusPlus:"∓",Mopf:"\uD835\uDD44",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"\uD835\uDD11",NoBreak:"",NonBreakingSpace:"\xa0",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"\uD835\uDCA9",Ntilde:"\xd1",Nu:"Ν",OElig:"Œ",Oacute:"\xd3",Ocirc:"\xd4",Ocy:"О",Odblac:"Ő",Ofr:"\uD835\uDD12",Ograve:"\xd2",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"\uD835\uDD46",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"\uD835\uDCAA",Oslash:"\xd8",Otilde:"\xd5",Otimes:"⨷",Ouml:"\xd6",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"\uD835\uDD13",Phi:"Φ",Pi:"Π",PlusMinus:"\xb1",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"\uD835\uDCAB",Psi:"Ψ",QUOT:'"',Qfr:"\uD835\uDD14",Qopf:"ℚ",Qscr:"\uD835\uDCAC",RBarr:"⤐",REG:"\xae",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"\uD835\uDD16",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"\uD835\uDD4A",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"\uD835\uDCAE",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"\xde",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"\uD835\uDD17",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"\uD835\uDD4B",TripleDot:"⃛",Tscr:"\uD835\uDCAF",Tstrok:"Ŧ",Uacute:"\xda",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"\xdb",Ucy:"У",Udblac:"Ű",Ufr:"\uD835\uDD18",Ugrave:"\xd9",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"\uD835\uDD4C",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"\uD835\uDCB0",Utilde:"Ũ",Uuml:"\xdc",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"\uD835\uDD19",Vopf:"\uD835\uDD4D",Vscr:"\uD835\uDCB1",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"\uD835\uDD1A",Wopf:"\uD835\uDD4E",Wscr:"\uD835\uDCB2",Xfr:"\uD835\uDD1B",Xi:"Ξ",Xopf:"\uD835\uDD4F",Xscr:"\uD835\uDCB3",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"\xdd",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"\uD835\uDD1C",Yopf:"\uD835\uDD50",Yscr:"\uD835\uDCB4",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"\uD835\uDCB5",aacute:"\xe1",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"\xe2",acute:"\xb4",acy:"а",aelig:"\xe6",af:"",afr:"\uD835\uDD1E",agrave:"\xe0",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"\xc5",angzarr:"⍼",aogon:"ą",aopf:"\uD835\uDD52",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"\xe5",ascr:"\uD835\uDCB6",ast:"*",asymp:"≈",asympeq:"≍",atilde:"\xe3",auml:"\xe4",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"\uD835\uDD1F",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"\uD835\uDD53",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"\xa6",bscr:"\uD835\uDCB7",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"\xe7",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"\xb8",cemptyv:"⦲",cent:"\xa2",centerdot:"\xb7",cfr:"\uD835\uDD20",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"\xae",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"\uD835\uDD54",coprod:"∐",copy:"\xa9",copysr:"℗",crarr:"↵",cross:"✗",cscr:"\uD835\uDCB8",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"\xa4",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"\xb0",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"\uD835\uDD21",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"\xa8",digamma:"ϝ",disin:"⋲",div:"\xf7",divide:"\xf7",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"\uD835\uDD55",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"\uD835\uDCB9",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"\xe9",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"\xea",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"\uD835\uDD22",eg:"⪚",egrave:"\xe8",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"\uD835\uDD56",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"\xf0",euml:"\xeb",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"\uD835\uDD23",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"\uD835\uDD57",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"\xbd",frac13:"⅓",frac14:"\xbc",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"\xbe",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"\uD835\uDCBB",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"\uD835\uDD24",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"\uD835\uDD58",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"\xbd",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"\uD835\uDD25",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"\uD835\uDD59",horbar:"―",hscr:"\uD835\uDCBD",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"\xed",ic:"",icirc:"\xee",icy:"и",iecy:"е",iexcl:"\xa1",iff:"⇔",ifr:"\uD835\uDD26",igrave:"\xec",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"\uD835\uDD5A",iota:"ι",iprod:"⨼",iquest:"\xbf",iscr:"\uD835\uDCBE",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"\xef",jcirc:"ĵ",jcy:"й",jfr:"\uD835\uDD27",jmath:"ȷ",jopf:"\uD835\uDD5B",jscr:"\uD835\uDCBF",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"\uD835\uDD28",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"\uD835\uDD5C",kscr:"\uD835\uDCC0",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"\xab",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"\uD835\uDD29",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"\uD835\uDD5D",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"\uD835\uDCC1",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"\xaf",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"\uD835\uDD2A",mho:"℧",micro:"\xb5",mid:"∣",midast:"*",midcir:"⫰",middot:"\xb7",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"\uD835\uDD5E",mp:"∓",mscr:"\uD835\uDCC2",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:"\xa0",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"\uD835\uDD2B",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"\uD835\uDD5F",not:"\xac",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"\uD835\uDCC3",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"\xf1",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"\xf3",oast:"⊛",ocir:"⊚",ocirc:"\xf4",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"\uD835\uDD2C",ogon:"˛",ograve:"\xf2",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"\uD835\uDD60",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"\xaa",ordm:"\xba",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"\xf8",osol:"⊘",otilde:"\xf5",otimes:"⊗",otimesas:"⨶",ouml:"\xf6",ovbar:"⌽",par:"∥",para:"\xb6",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"\uD835\uDD2D",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"\xb1",plussim:"⨦",plustwo:"⨧",pm:"\xb1",pointint:"⨕",popf:"\uD835\uDD61",pound:"\xa3",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"\uD835\uDCC5",psi:"ψ",puncsp:" ",qfr:"\uD835\uDD2E",qint:"⨌",qopf:"\uD835\uDD62",qprime:"⁗",qscr:"\uD835\uDCC6",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"\xbb",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"\xae",rfisht:"⥽",rfloor:"⌋",rfr:"\uD835\uDD2F",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"\uD835\uDD63",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"\uD835\uDCC7",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"\xa7",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"\uD835\uDD30",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"\xad",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"\uD835\uDD64",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"\uD835\uDCC8",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"\xaf",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"\xdf",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"\uD835\uDD31",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"\xfe",tilde:"˜",times:"\xd7",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"\uD835\uDD65",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"\uD835\uDCC9",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"\xfa",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"\xfb",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"\uD835\uDD32",ugrave:"\xf9",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"\xa8",uogon:"ų",uopf:"\uD835\uDD66",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"\uD835\uDCCA",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"\xfc",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"\uD835\uDD33",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"\uD835\uDD67",vprop:"∝",vrtri:"⊳",vscr:"\uD835\uDCCB",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"\uD835\uDD34",wopf:"\uD835\uDD68",wp:"℘",wr:"≀",wreath:"≀",wscr:"\uD835\uDCCC",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"\uD835\uDD35",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"\uD835\uDD69",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"\uD835\uDCCD",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"\xfd",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"\xa5",yfr:"\uD835\uDD36",yicy:"ї",yopf:"\uD835\uDD6A",yscr:"\uD835\uDCCE",yucy:"ю",yuml:"\xff",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"\uD835\uDD37",zhcy:"ж",zigrarr:"⇝",zopf:"\uD835\uDD6B",zscr:"\uD835\uDCCF",zwj:"",zwnj:""},lR={}.hasOwnProperty;function lL(e){return!!lR.call(lA,e)&&lA[e]}let lz={name:"characterReference",tokenize:function(e,t,r){let n,a,i=this,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),n=31,a=sX,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),n=6,a=s1,c):(e.enter("characterReferenceValue"),n=7,a=s0,c(t))}function c(s){if(59===s&&o){let n=e.exit("characterReferenceValue");return a!==sX||lL(i.sliceSerialize(n))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)}return a(s)&&o++<n?(e.consume(s),c):r(s)}}},lO={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return s2(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}},lF={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),s7(e,t,"linePrefix")}}};function l_(e,t,r){let n=[],a=-1;for(;++a<e.length;){let i=e[a].resolveAll;i&&!n.includes(i)&&(t=i(t,r),n.push(i))}return t}let lq={name:"labelEnd",resolveAll:function(e){let t=-1,r=[];for(;++t<e.length;){let n=e[t][1];if(r.push(e[t]),"labelImage"===n.type||"labelLink"===n.type||"labelEnd"===n.type){let e="labelImage"===n.type?4:2;n.type="data",t+=e}}return e.length!==r.length&&sH(e,0,e.length,r),e},resolveTo:function(e,t){let r,n,a,i,o=e.length,s=0;for(;o--;)if(r=e[o][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[o][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(a){if("enter"===e[o][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=o,"labelLink"!==r.type)){s=2;break}}else"labelEnd"===r.type&&(a=o);let l={type:"labelLink"===e[n][1].type?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[n][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[n+s+2][1].end},end:{...e[a-2][1].start}};return i=sV(i=[["enter",l,t],["enter",c,t]],e.slice(n+1,n+s+3)),i=sV(i,[["enter",u,t]]),i=sV(i,l_(t.parser.constructs.insideSpan.null,e.slice(n+s+4,a-3),t)),i=sV(i,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),i=sV(i,e.slice(a+1)),i=sV(i,[["exit",l,t]]),sH(e,n,e.length,i),e},tokenize:function(e,t,r){let n,a,i=this,o=i.events.length;for(;o--;)if(("labelImage"===i.events[o][1].type||"labelLink"===i.events[o][1].type)&&!i.events[o][1]._balanced){n=i.events[o][1];break}return function(t){return n?n._inactive?u(t):(a=i.parser.defined.includes(lk(i.sliceSerialize({start:n.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):r(t)};function s(t){return 40===t?e.attempt(lB,c,a?c:u)(t):91===t?e.attempt(l$,c,a?l:u)(t):a?c(t):u(t)}function l(t){return e.attempt(lU,c,u)(t)}function c(e){return t(e)}function u(e){return n._balanced=!0,r(e)}}},lB={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),n};function n(t){return s4(t)?lw(e,a)(t):a(t)}function a(t){return 41===t?c(t):lx(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return s4(t)?lw(e,s)(t):c(t)}function o(e){return r(e)}function s(t){return 34===t||39===t||40===t?lb(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return s4(t)?lw(e,c)(t):c(t)}function c(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},l$={tokenize:function(e,t,r){let n=this;return function(t){return ly.call(n,e,a,i,"reference","referenceMarker","referenceString")(t)};function a(e){return n.parser.defined.includes(lk(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}function i(e){return r(e)}}},lU={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):r(n)}}},lH={name:"labelStartImage",resolveAll:lq.resolveAll,tokenize:function(e,t,r){let n=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):r(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}}};function lV(e){return null===e||s4(e)||s8(e)?1:s6(e)?2:void 0}let lW={name:"attention",resolveAll:function(e,t){let r,n,a,i,o,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close){for(r=u;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[r][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let d={...e[r][1].end},p={...e[u][1].start};lG(d,-s),lG(p,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[u][1].start}},n={type:s>1?"strong":"emphasis",start:{...i.start},end:{...o.end}},e[r][1].end={...i.start},e[u][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=sV(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=sV(l,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",a,t]]),l=sV(l,l_(t.parser.constructs.insideSpan.null,e.slice(r+1,u),t)),l=sV(l,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",n,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=sV(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,sH(e,r-1,u-r+3,l),u=r+l.length-c-2;break}}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){let r,n=this.parser.constructs.attentionMarkers.null,a=this.previous,i=lV(a);return function(o){return r=o,e.enter("attentionSequence"),function o(s){if(s===r)return e.consume(s),o;let l=e.exit("attentionSequence"),c=lV(s),u=!c||2===c&&i||n.includes(s),d=!i||2===i&&c||n.includes(a);return l._open=!!(42===r?u:u&&(i||!d)),l._close=!!(42===r?d:d&&(c||!u)),t(s)}(o)}}};function lG(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let lK={name:"labelStartLink",resolveAll:lq.resolveAll,tokenize:function(e,t,r){let n=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}}},lY={42:lm,43:lm,45:lm,48:lm,49:lm,50:lm,51:lm,52:lm,53:lm,54:lm,55:lm,56:lm,57:lm,62:lv},lJ={91:{name:"definition",tokenize:function(e,t,r){let n,a=this;return function(t){var n;return e.enter("definition"),n=t,ly.call(a,e,i,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(n)};function i(t){return(n=lk(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):r(t)}function o(t){return s4(t)?lw(e,s)(t):s(t)}function s(t){return lx(e,l,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(lj,c,c)(t)}function c(t){return s5(t)?s7(e,u,"whitespace")(t):u(t)}function u(i){return null===i||s3(i)?(e.exit("definition"),a.parser.defined.push(n),t(i)):r(i)}}}},lX={[-2]:lN,[-1]:lN,32:lN},lZ={35:{name:"headingAtx",resolve:function(e,t){let r,n,a=e.length-2,i=3;return"whitespace"===e[3][1].type&&(i+=2),a-2>i&&"whitespace"===e[a][1].type&&(a-=2),"atxHeadingSequence"===e[a][1].type&&(i===a-1||a-4>i&&"whitespace"===e[a-2][1].type)&&(a-=i+1===a?2:4),a>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[a][1].end},n={type:"chunkText",start:e[i][1].start,end:e[a][1].end,contentType:"text"},sH(e,i,a-i+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]])),e},tokenize:function(e,t,r){let n=0;return function(a){var i;return e.enter("atxHeading"),i=a,e.enter("atxHeadingSequence"),function a(i){return 35===i&&n++<6?(e.consume(i),a):null===i||s4(i)?(e.exit("atxHeadingSequence"),function r(n){return 35===n?(e.enter("atxHeadingSequence"),function t(n){return 35===n?(e.consume(n),t):(e.exit("atxHeadingSequence"),r(n))}(n)):null===n||s3(n)?(e.exit("atxHeading"),t(n)):s5(n)?s7(e,r,"whitespace")(n):(e.enter("atxHeadingText"),function t(n){return null===n||35===n||s4(n)?(e.exit("atxHeadingText"),r(n)):(e.consume(n),t)}(n))}(i)):r(i)}(i)}}},42:lh,45:[lS,lh],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,r){let n,a,i,o,s,l=this;return function(t){var r;return r=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(r),c};function c(o){return 33===o?(e.consume(o),u):47===o?(e.consume(o),a=!0,h):63===o?(e.consume(o),n=3,l.interrupt?t:I):sJ(o)?(e.consume(o),i=String.fromCharCode(o),m):r(o)}function u(a){return 45===a?(e.consume(a),n=2,d):91===a?(e.consume(a),n=5,o=0,p):sJ(a)?(e.consume(a),n=4,l.interrupt?t:I):r(a)}function d(n){return 45===n?(e.consume(n),l.interrupt?t:I):r(n)}function p(n){let a="CDATA[";return n===a.charCodeAt(o++)?(e.consume(n),o===a.length)?l.interrupt?t:N:p:r(n)}function h(t){return sJ(t)?(e.consume(t),i=String.fromCharCode(t),m):r(t)}function m(o){if(null===o||47===o||62===o||s4(o)){let s=47===o,c=i.toLowerCase();return!s&&!a&&lD.includes(c)?(n=1,l.interrupt?t(o):N(o)):lE.includes(i.toLowerCase())?(n=6,s)?(e.consume(o),f):l.interrupt?t(o):N(o):(n=7,l.interrupt&&!l.parser.lazy[l.now().line]?r(o):a?function t(r){return s5(r)?(e.consume(r),t):k(r)}(o):g(o))}return 45===o||sX(o)?(e.consume(o),i+=String.fromCharCode(o),m):r(o)}function f(n){return 62===n?(e.consume(n),l.interrupt?t:N):r(n)}function g(t){return 47===t?(e.consume(t),k):58===t||95===t||sJ(t)?(e.consume(t),v):s5(t)?(e.consume(t),g):k(t)}function v(t){return 45===t||46===t||58===t||95===t||sX(t)?(e.consume(t),v):x(t)}function x(t){return 61===t?(e.consume(t),y):s5(t)?(e.consume(t),x):g(t)}function y(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),s=t,b):s5(t)?(e.consume(t),y):function t(r){return null===r||34===r||39===r||47===r||60===r||61===r||62===r||96===r||s4(r)?x(r):(e.consume(r),t)}(t)}function b(t){return t===s?(e.consume(t),s=null,w):null===t||s3(t)?r(t):(e.consume(t),b)}function w(e){return 47===e||62===e||s5(e)?g(e):r(e)}function k(t){return 62===t?(e.consume(t),j):r(t)}function j(t){return null===t||s3(t)?N(t):s5(t)?(e.consume(t),j):r(t)}function N(t){return 45===t&&2===n?(e.consume(t),D):60===t&&1===n?(e.consume(t),M):62===t&&4===n?(e.consume(t),A):63===t&&3===n?(e.consume(t),I):93===t&&5===n?(e.consume(t),T):s3(t)&&(6===n||7===n)?(e.exit("htmlFlowData"),e.check(lM,R,C)(t)):null===t||s3(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),N)}function C(t){return e.check(lP,S,R)(t)}function S(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),E}function E(t){return null===t||s3(t)?C(t):(e.enter("htmlFlowData"),N(t))}function D(t){return 45===t?(e.consume(t),I):N(t)}function M(t){return 47===t?(e.consume(t),i="",P):N(t)}function P(t){if(62===t){let r=i.toLowerCase();return lD.includes(r)?(e.consume(t),A):N(t)}return sJ(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),P):N(t)}function T(t){return 93===t?(e.consume(t),I):N(t)}function I(t){return 62===t?(e.consume(t),A):45===t&&2===n?(e.consume(t),I):N(t)}function A(t){return null===t||s3(t)?(e.exit("htmlFlowData"),R(t)):(e.consume(t),A)}function R(r){return e.exit("htmlFlow"),t(r)}}},61:lS,95:lh,96:lI,126:lI},lQ={38:lz,92:lO},l0={[-5]:lF,[-4]:lF,[-3]:lF,33:lH,38:lz,42:lW,60:[{name:"autolink",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a};function a(t){return sJ(t)?(e.consume(t),i):64===t?r(t):s(t)}function i(t){return 43===t||45===t||46===t||sX(t)?(n=1,function t(r){return 58===r?(e.consume(r),n=0,o):(43===r||45===r||46===r||sX(r))&&n++<32?(e.consume(r),t):(n=0,s(r))}(t)):s(t)}function o(n){return 62===n?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):null===n||32===n||60===n||sQ(n)?r(n):(e.consume(n),o)}function s(t){return 64===t?(e.consume(t),l):sZ(t)?(e.consume(t),s):r(t)}function l(a){return sX(a)?function a(i){return 46===i?(e.consume(i),n=0,l):62===i?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(i),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(i){if((45===i||sX(i))&&n++<63){let r=45===i?t:a;return e.consume(i),r}return r(i)}(i)}(a):r(a)}}},{name:"htmlText",tokenize:function(e,t,r){let n,a,i,o=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),b):63===t?(e.consume(t),x):sJ(t)?(e.consume(t),k):r(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),a=0,h):sJ(t)?(e.consume(t),v):r(t)}function c(t){return 45===t?(e.consume(t),p):r(t)}function u(t){return null===t?r(t):45===t?(e.consume(t),d):s3(t)?(i=u,P(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?M(e):45===e?d(e):u(e)}function h(t){let n="CDATA[";return t===n.charCodeAt(a++)?(e.consume(t),a===n.length?m:h):r(t)}function m(t){return null===t?r(t):93===t?(e.consume(t),f):s3(t)?(i=m,P(t)):(e.consume(t),m)}function f(t){return 93===t?(e.consume(t),g):m(t)}function g(t){return 62===t?M(t):93===t?(e.consume(t),g):m(t)}function v(t){return null===t||62===t?M(t):s3(t)?(i=v,P(t)):(e.consume(t),v)}function x(t){return null===t?r(t):63===t?(e.consume(t),y):s3(t)?(i=x,P(t)):(e.consume(t),x)}function y(e){return 62===e?M(e):x(e)}function b(t){return sJ(t)?(e.consume(t),w):r(t)}function w(t){return 45===t||sX(t)?(e.consume(t),w):function t(r){return s3(r)?(i=t,P(r)):s5(r)?(e.consume(r),t):M(r)}(t)}function k(t){return 45===t||sX(t)?(e.consume(t),k):47===t||62===t||s4(t)?j(t):r(t)}function j(t){return 47===t?(e.consume(t),M):58===t||95===t||sJ(t)?(e.consume(t),N):s3(t)?(i=j,P(t)):s5(t)?(e.consume(t),j):M(t)}function N(t){return 45===t||46===t||58===t||95===t||sX(t)?(e.consume(t),N):function t(r){return 61===r?(e.consume(r),C):s3(r)?(i=t,P(r)):s5(r)?(e.consume(r),t):j(r)}(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),n=t,S):s3(t)?(i=C,P(t)):s5(t)?(e.consume(t),C):(e.consume(t),E)}function S(t){return t===n?(e.consume(t),n=void 0,D):null===t?r(t):s3(t)?(i=S,P(t)):(e.consume(t),S)}function E(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):47===t||62===t||s4(t)?j(t):(e.consume(t),E)}function D(e){return 47===e||62===e||s4(e)?j(e):r(e)}function M(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}function P(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T}function T(t){return s5(t)?s7(e,I,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):I(t)}function I(t){return e.enter("htmlTextData"),i(t)}}}],91:lK,92:[{name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.consume(t),n};function n(n){return s3(n)?(e.exit("hardBreakEscape"),t(n)):r(n)}}},lO],93:lq,95:lW,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,r,n=e.length-4,a=3;if(("lineEnding"===e[3][1].type||"space"===e[a][1].type)&&("lineEnding"===e[n][1].type||"space"===e[n][1].type)){for(t=a;++t<n;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[n][1].type="codeTextPadding",a+=2,n-=2;break}}for(t=a-1,n++;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):(t===n||"lineEnding"===e[t][1].type)&&(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},tokenize:function(e,t,r){let n,a,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(r){return 96===r?(e.consume(r),i++,t):(e.exit("codeTextSequence"),o(r))}(t)};function o(l){return null===l?r(l):32===l?(e.enter("space"),e.consume(l),e.exit("space"),o):96===l?(a=e.enter("codeTextSequence"),n=0,function r(o){return 96===o?(e.consume(o),n++,r):n===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(a.type="codeTextData",s(o))}(l)):s3(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):(e.enter("codeTextData"),s(l))}function s(t){return null===t||32===t||96===t||s3(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),s)}}}},l1={null:[lW,ls]},l2={null:[42,95]},l3={null:[]},l4=/[\0\t\n\r]/g;function l5(e,t){let r=Number.parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(65535&r)==65535||(65535&r)==65534||r>1114111?"�":String.fromCodePoint(r)}let l6=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function l8(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){let e=r.charCodeAt(1),t=120===e||88===e;return l5(r.slice(t?2:1),t?16:10)}return lL(r)||e}let l9={}.hasOwnProperty;function l7(e){return{line:e.line,column:e.column,offset:e.offset}}function ce(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+sk({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+sk({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+sk({start:t.start,end:t.end})+") is still open")}function ct(e){let t=this;t.parser=function(r){var n,a;let i,s,l,c;return"string"!=typeof(n={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(a=n,n=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:n(v),autolinkProtocol:c,autolinkEmail:c,atxHeading:n(m),blockQuote:n(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:n(h),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:n(h,a),codeText:n(function(){return{type:"inlineCode",value:""}},a),codeTextData:c,data:c,codeFlowValue:c,definition:n(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:n(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:n(f),hardBreakTrailing:n(f),htmlFlow:n(g,a),htmlFlowData:c,htmlText:n(g,a),htmlTextData:c,image:n(function(){return{type:"image",title:null,url:"",alt:null}}),label:a,link:n(v),listItem:n(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:n(x,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:n(x),paragraph:n(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:n(m),strong:n(function(){return{type:"strong",children:[]}}),thematicBreak:n(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),autolinkEmail:function(e){u.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){u.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:o(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){let t,r=this.sliceSerialize(e),n=this.data.characterReferenceType;n?(t=l5(r,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):t=lL(r);let a=this.stack[this.stack.length-1];a.value+=t},characterReference:function(e){this.stack.pop().position.end=l7(e.end)},codeFenced:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:u,codeIndented:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:u,data:u,definition:o(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=lk(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:o(),hardBreakEscape:o(d),hardBreakTrailing:o(d),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:u,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:u,image:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===r.type?r.children=e.children:r.alt=t},labelText:function(e){let t=this.sliceSerialize(e),r=this.stack[this.stack.length-2];r.label=t.replace(l6,l8),r.identifier=lk(t).toLowerCase()},lineEnding:function(e){let r=this.stack[this.stack.length-1];if(this.data.atHardBreak){r.children[r.children.length-1].position.end=l7(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(r.type)&&(c.call(this,e),u.call(this,e))},link:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:function(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=lk(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:o(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:o(),thematicBreak:o()}};!function e(t,r){let n=-1;for(;++n<r.length;){let a=r[n];Array.isArray(a)?e(t,a):function(e,t){let r;for(r in t)if(l9.call(t,r))switch(r){case"canContainEols":{let n=t[r];n&&e[r].push(...n);break}case"transforms":{let n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{let n=t[r];n&&Object.assign(e[r],n)}}}(t,a)}}(t,(e||{}).mdastExtensions||[]);let r={};return function(e){let n={type:"root",children:[]},o={stack:[n],tokenStack:[],config:t,enter:i,exit:s,buffer:a,resume:l,data:r},c=[],u=-1;for(;++u<e.length;)("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)&&("enter"===e[u][0]?c.push(u):u=function(e,t,r){let n,a,i,o,s=t-1,l=-1,c=!1;for(;++s<=r;){let t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!n||o||l||i||(i=s),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let o=s;for(a=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}i&&(!a||i<a)&&(n._spread=!0),n.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",n,t[2]]),s++,r++}if("listItemPrefix"===t[1].type){let a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};n=a,e.splice(s,0,["enter",a,t[2]]),s++,r++,i=void 0,o=!0}}}return e[t][1]._spread=c,r}(e,c.pop(),u));for(u=-1;++u<e.length;){let r=t[e[u][0]];l9.call(r,e[u][1].type)&&r[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},o),e[u][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||ce).call(o,void 0,e[0])}for(n.position={start:l7(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:l7(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)n=t.transforms[u](n)||n;return n};function n(e,t){return function(r){i.call(this,e(r),r),t&&t.call(this,r)}}function a(){this.stack.push({type:"fragment",children:[]})}function i(e,t,r){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r||void 0]),e.position={start:l7(t.start),end:void 0}}function o(e){return function(t){e&&e.call(this,t),s.call(this,t)}}function s(e,t){let r=this.stack.pop(),n=this.tokenStack.pop();if(n)n[0].type!==e.type&&(t?t.call(this,e,n[0]):(n[1]||ce).call(this,e,n[0]));else throw Error("Cannot close `"+e.type+"` ("+sk({start:e.start,end:e.end})+"): it’s not open");r.position.end=l7(e.end)}function l(){var e;return s$(this.stack.pop(),"boolean"!=typeof sB.includeImageAlt||sB.includeImageAlt,"boolean"!=typeof sB.includeHtml||sB.includeHtml)}function c(e){let t=this.stack[this.stack.length-1].children,r=t[t.length-1];r&&"text"===r.type||((r={type:"text",value:""}).position={start:l7(e.start),end:void 0},t.push(r)),this.stack.push(r)}function u(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=l7(e.end)}function d(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function h(){return{type:"code",lang:null,meta:null,value:""}}function m(){return{type:"heading",depth:0,children:[]}}function f(){return{type:"break"}}function g(){return{type:"html",value:""}}function v(){return{type:"link",title:null,url:"",children:[]}}function x(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(a)(function(e){for(;!sK(e););return e}((function(e){let t={constructs:function(e){let t={},r=-1;for(;++r<e.length;)!function(e,t){let r;for(r in t){let n,a=(sY.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];if(i)for(n in i){sY.call(a,n)||(a[n]=[]);let e=i[n];!function(e,t){let r=-1,n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);sH(e,0,0,n)}(a[n],Array.isArray(e)?e:e?[e]:[])}}}(t,e[r]);return t}([o,...(e||{}).extensions||[]]),content:r(le),defined:[],document:r(lt),flow:r(lo),lazy:{},string:r(ll),text:r(lc)};return t;function r(e){return function(r){return function(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0},a={},i=[],o=[],s=[],l={attempt:m(function(e,t){f(e,t.from)}),check:m(h),consume:function(e){s3(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,g()):-1!==e&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=e},enter:function(e,t){let r=t||{};return r.type=e,r.start=p(),c.events.push(["enter",r,c]),s.push(r),r},exit:function(e){let t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:m(h,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,g()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let r,n=-1,a=[];for(;++n<e.length;){let i,o=e[n];if("string"==typeof o)i=o;else switch(o){case -5:i="\r";break;case -4:i="\n";break;case -3:i="\r\n";break;case -2:i=t?" ":" ";break;case -1:if(!t&&r)continue;i=" ";break;default:i=String.fromCharCode(o)}r=-2===o,a.push(i)}return a.join("")}(d(e),t)},sliceStream:d,write:function(e){return(o=sV(o,e),function(){let e;for(;n._index<o.length;){let r=o[n._index];if("string"==typeof r)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<r.length;){var t;t=r.charCodeAt(n._bufferIndex),u=u(t)}else u=u(r)}}(),null!==o[o.length-1])?[]:(f(t,0),c.events=l_(i,c.events,c),c.events)}},u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){let r,n=t.start._index,a=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;if(n===i)r=[e[n].slice(a,o)];else{if(r=e.slice(n,i),a>-1){let e=r[0];"string"==typeof e?r[0]=e.slice(a):r.shift()}o>0&&r.push(e[i].slice(0,o))}return r}(o,e)}function p(){let{_bufferIndex:e,_index:t,line:r,column:a,offset:i}=n;return{_bufferIndex:e,_index:t,line:r,column:a,offset:i}}function h(e,t){t.restore()}function m(e,t){return function(r,a,i){var o;let u,d,h,m;return Array.isArray(r)?f(r):"tokenize"in r?f([r]):(o=r,function(e){let t=null!==e&&o[e],r=null!==e&&o.null;return f([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(r)?r:r?[r]:[]])(e)});function f(e){return(u=e,d=0,0===e.length)?i:v(e[d])}function v(e){return function(r){return(m=function(){let e=p(),t=c.previous,r=c.currentConstruct,a=c.events.length,i=Array.from(s);return{from:a,restore:function(){n=e,c.previous=t,c.currentConstruct=r,c.events.length=a,s=i,g()}}}(),h=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?y(r):e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,x,y)(r)}}function x(t){return e(h,m),a}function y(e){return(m.restore(),++d<u.length)?v(u[d]):i}}}function f(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&sH(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function g(){n.line in a&&n.column<2&&(n.column=a[n.line],n.offset+=a[n.line]-1)}}(t,e,r)}}})(a).document().write((s=1,l="",c=!0,function(e,t,r){let n,a,o,u,d,p=[];for(e=l+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),o=0,l="",c&&(65279===e.charCodeAt(0)&&o++,c=void 0);o<e.length;){if(l4.lastIndex=o,u=(n=l4.exec(e))&&void 0!==n.index?n.index:e.length,d=e.charCodeAt(u),!n){l=e.slice(o);break}if(10===d&&o===u&&i)p.push(-3),i=void 0;else switch(i&&(p.push(-5),i=void 0),o<u&&(p.push(e.slice(o,u)),s+=u-o),d){case 0:p.push(65533),s++;break;case 9:for(a=4*Math.ceil(s/4),p.push(-2);s++<a;)p.push(-1);break;case 10:p.push(-4),s=1;break;default:i=!0,s=1}o=u+1}return r&&(i&&p.push(-5),l&&p.push(l),p.push(null)),p})(r,n,!0))))}}let cr="object"==typeof self?self:globalThis,cn=(e,t)=>{let r=(t,r)=>(e.set(r,t),t),n=a=>{if(e.has(a))return e.get(a);let[i,o]=t[a];switch(i){case 0:case -1:return r(o,a);case 1:{let e=r([],a);for(let t of o)e.push(n(t));return e}case 2:{let e=r({},a);for(let[t,r]of o)e[n(t)]=n(r);return e}case 3:return r(new Date(o),a);case 4:{let{source:e,flags:t}=o;return r(new RegExp(e,t),a)}case 5:{let e=r(new Map,a);for(let[t,r]of o)e.set(n(t),n(r));return e}case 6:{let e=r(new Set,a);for(let t of o)e.add(n(t));return e}case 7:{let{name:e,message:t}=o;return r(new cr[e](t),a)}case 8:return r(BigInt(o),a);case"BigInt":return r(Object(BigInt(o)),a);case"ArrayBuffer":return r(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:e}=new Uint8Array(o);return r(new DataView(e),o)}}return r(new cr[i](o),a)};return n},ca=e=>cn(new Map,e)(0),{toString:ci}={},{keys:co}=Object,cs=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let r=ci.call(e).slice(8,-1);switch(r){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,r]}return r.includes("Array")?[1,r]:r.includes("Error")?[7,r]:[2,r]},cl=([e,t])=>0===e&&("function"===t||"symbol"===t),cc=(e,t,r,n)=>{let a=(e,t)=>{let a=n.push(e)-1;return r.set(t,a),a},i=n=>{if(r.has(n))return r.get(n);let[o,s]=cs(n);switch(o){case 0:{let t=n;switch(s){case"bigint":o=8,t=n.toString();break;case"function":case"symbol":if(e)throw TypeError("unable to serialize "+s);t=null;break;case"undefined":return a([-1],n)}return a([o,t],n)}case 1:{if(s){let e=n;return"DataView"===s?e=new Uint8Array(n.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(n)),a([s,[...e]],n)}let e=[],t=a([o,e],n);for(let t of n)e.push(i(t));return t}case 2:{if(s)switch(s){case"BigInt":return a([s,n.toString()],n);case"Boolean":case"Number":case"String":return a([s,n.valueOf()],n)}if(t&&"toJSON"in n)return i(n.toJSON());let r=[],l=a([o,r],n);for(let t of co(n))(e||!cl(cs(n[t])))&&r.push([i(t),i(n[t])]);return l}case 3:return a([o,n.toISOString()],n);case 4:{let{source:e,flags:t}=n;return a([o,{source:e,flags:t}],n)}case 5:{let t=[],r=a([o,t],n);for(let[r,a]of n)(e||!(cl(cs(r))||cl(cs(a))))&&t.push([i(r),i(a)]);return r}case 6:{let t=[],r=a([o,t],n);for(let r of n)(e||!cl(cs(r)))&&t.push(i(r));return r}}let{message:l}=n;return a([o,{name:s,message:l}],n)};return i},cu=(e,{json:t,lossy:r}={})=>{let n=[];return cc(!(t||r),!!t,new Map,n)(e),n},cd="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ca(cu(e,t)):structuredClone(e):(e,t)=>ca(cu(e,t));function cp(e){let t=[],r=-1,n=0,a=0;for(;++r<e.length;){let i=e.charCodeAt(r),o="";if(37===i&&sX(e.charCodeAt(r+1))&&sX(e.charCodeAt(r+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){let t=e.charCodeAt(r+1);i<56320&&t>56319&&t<57344?(o=String.fromCharCode(i,t),a=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(n,r),encodeURIComponent(o)),n=r+a+1,o=""),a&&(r+=a,a=0)}return t.join("")+e.slice(n)}function ch(e,t){let r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function cm(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let cf=function(e){var t,r;if(null==e)return cv;if("function"==typeof e)return cg(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],r=-1;for(;++r<e.length;)t[r]=cf(e[r]);return cg(function(...e){let r=-1;for(;++r<t.length;)if(t[r].apply(this,e))return!0;return!1})}(e):(t=e,cg(function(e){let r;for(r in t)if(e[r]!==t[r])return!1;return!0}))}if("string"==typeof e){return r=e,cg(function(e){return e&&e.type===r})}throw Error("Expected function, string, or object as test")};function cg(e){return function(t,r,n){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof r?r:void 0,n||void 0))}}function cv(){return!0}let cx=[];function cy(e,t,r,n){let a,i,o,s;"function"==typeof t&&"function"!=typeof r?(i=void 0,o=t,a=r):(i=t,o=r,a=n);var l=i,c=function(e,t){let r=t[t.length-1],n=r?r.children.indexOf(e):void 0;return o(e,n,r)},u=a;"function"==typeof l&&"function"!=typeof c?(u=c,c=l):s=l;let d=cf(s),p=u?-1:1;(function e(t,r,n){let a=t&&"object"==typeof t?t:{};if("string"==typeof a.type){let e="string"==typeof a.tagName?a.tagName:"string"==typeof a.name?a.name:void 0;Object.defineProperty(i,"name",{value:"node (\x1b[33m"+t.type+(e?"<"+e+">":"")+"\x1b[39m)"})}return i;function i(){var a;let i,o,s,h=cx;if((!l||d(t,r,n[n.length-1]||void 0))&&!1===(h=Array.isArray(a=c(t,n))?a:"number"==typeof a?[!0,a]:null==a?cx:[a])[0])return h;if("children"in t&&t.children&&t.children&&"skip"!==h[0])for(o=(u?t.children.length:-1)+p,s=n.concat(t);o>-1&&o<t.children.length;){if(!1===(i=e(t.children[o],o,s)())[0])return i;o="number"==typeof i[1]?i[1]:o+p}return h}})(e,void 0,[])()}function cb(e,t){let r=t.referenceType,n="]";if("collapsed"===r?n+="[]":"full"===r&&(n+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+n}];let a=e.all(t),i=a[0];i&&"text"===i.type?i.value="["+i.value:a.unshift({type:"text",value:"["});let o=a[a.length-1];return o&&"text"===o.type?o.value+=n:a.push({type:"text",value:n}),a}function cw(e){let t=e.spread;return null==t?e.children.length>1:t}function ck(e,t,r){let n=0,a=e.length;if(t){let t=e.codePointAt(n);for(;9===t||32===t;)n++,t=e.codePointAt(n)}if(r){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>n?e.slice(n,a):""}let cj={blockquote:function(e,t){let r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)},break:function(e,t){let r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:"\n"}]},code:function(e,t){let r=t.value?t.value+"\n":"",n={};t.lang&&(n.className=["language-"+t.lang]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a={type:"element",tagName:"pre",properties:{},children:[a=e.applyData(t,a)]},e.patch(t,a),a},delete:function(e,t){let r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},emphasis:function(e,t){let r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},footnoteReference:function(e,t){let r,n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),i=cp(a.toLowerCase()),o=e.footnoteOrder.indexOf(a),s=e.footnoteCounts.get(a);void 0===s?(s=0,e.footnoteOrder.push(a),r=e.footnoteOrder.length):r=o+1,s+=1,e.footnoteCounts.set(a,s);let l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(r)}]};e.patch(t,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){let r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},html:function(e,t){if(e.options.allowDangerousHtml){let r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}},imageReference:function(e,t){let r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return cb(e,t);let a={src:cp(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(a.title=n.title);let i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){let r={src:cp(t.url)};null!==t.alt&&void 0!==t.alt&&(r.alt=t.alt),null!==t.title&&void 0!==t.title&&(r.title=t.title);let n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)},inlineCode:function(e,t){let r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);let n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)},linkReference:function(e,t){let r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return cb(e,t);let a={href:cp(n.url||"")};null!==n.title&&void 0!==n.title&&(a.title=n.title);let i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){let r={href:cp(t.url)};null!==t.title&&void 0!==t.title&&(r.title=t.title);let n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},listItem:function(e,t,r){let n=e.all(t),a=r?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let r=e.children,n=-1;for(;!t&&++n<r.length;)t=cw(r[n])}return t}(r):cw(t),i={},o=[];if("boolean"==typeof t.checked){let e,r=n[0];r&&"element"===r.type&&"p"===r.tagName?e=r:(e={type:"element",tagName:"p",properties:{},children:[]},n.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<n.length;){let e=n[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?o.push(e):o.push(...e.children)}let l=n[n.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&o.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:i,children:o};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let r={},n=e.all(t),a=-1;for("number"==typeof t.start&&1!==t.start&&(r.start=t.start);++a<n.length;){let e=n[a];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}let i={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){let r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},root:function(e,t){let r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)},strong:function(e,t){let r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},table:function(e,t){let r=e.all(t),n=r.shift(),a=[];if(n){let r={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],r),a.push(r)}if(r.length>0){let n={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},i=sb(t.children[1]),o=sy(t.children[t.children.length-1]);i&&o&&(n.position={start:i,end:o}),a.push(n)}let i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){let r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},tableRow:function(e,t,r){let n=r?r.children:void 0,a=0===(n?n.indexOf(t):1)?"th":"td",i=r&&"table"===r.type?r.align:void 0,o=i?i.length:t.children.length,s=-1,l=[];for(;++s<o;){let r=t.children[s],n={},o=i?i[s]:void 0;o&&(n.align=o);let c={type:"element",tagName:a,properties:n,children:[]};r&&(c.children=e.all(r),e.patch(r,c),c=e.applyData(r,c)),l.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let r={type:"text",value:function(e){let t=String(e),r=/\r?\n|\r/g,n=r.exec(t),a=0,i=[];for(;n;)i.push(ck(t.slice(a,n.index),a>0,!0),n[0]),a=n.index+n[0].length,n=r.exec(t);return i.push(ck(t.slice(a),a>0,!1)),i.join("")}(String(t.value))};return e.patch(t,r),e.applyData(t,r)},thematicBreak:function(e,t){let r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)},toml:cN,yaml:cN,definition:cN,footnoteDefinition:cN};function cN(){}let cC={}.hasOwnProperty,cS={};function cE(e,t){e.position&&(t.position=function(e){let t=sb(e),r=sy(e);if(t&&r)return{start:t,end:r}}(e))}function cD(e,t){let r=t;if(e&&e.data){let t=e.data.hName,n=e.data.hChildren,a=e.data.hProperties;"string"==typeof t&&("element"===r.type?r.tagName=t:r={type:"element",tagName:t,properties:{},children:"children"in r?r.children:[r]}),"element"===r.type&&a&&Object.assign(r.properties,cd(a)),"children"in r&&r.children&&null!=n&&(r.children=n)}return r}function cM(e,t){let r=[],n=-1;for(t&&r.push({type:"text",value:"\n"});++n<e.length;)n&&r.push({type:"text",value:"\n"}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:"\n"}),r}function cP(e){let t=0,r=e.charCodeAt(t);for(;9===r||32===r;)t++,r=e.charCodeAt(t);return e.slice(t)}function cT(e,t){let r=function(e,t){let r=t||cS,n=new Map,a=new Map,i={all:function(e){let t=[];if("children"in e){let r=e.children,n=-1;for(;++n<r.length;){let a=i.one(r[n],e);if(a){if(n&&"break"===r[n-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=cP(a.value)),!Array.isArray(a)&&"element"===a.type)){let e=a.children[0];e&&"text"===e.type&&(e.value=cP(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:cD,definitionById:n,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],handlers:{...cj,...r.handlers},one:function(e,t){let r=e.type,n=i.handlers[r];if(cC.call(i.handlers,r)&&n)return n(i,e,t);if(i.options.passThrough&&i.options.passThrough.includes(r)){if("children"in e){let{children:t,...r}=e,n=cd(r);return n.children=i.all(e),n}return cd(e)}return(i.options.unknownHandler||function(e,t){let r=t.data||{},n="value"in t&&!(cC.call(r,"hProperties")||cC.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)})(i,e,t)},options:r,patch:cE,wrap:cM};return cy(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?n:a,r=String(e.identifier).toUpperCase();t.has(r)||t.set(r,e)}}),i}(e,t),n=r.one(e,void 0),a=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||ch,n=e.options.footnoteBackLabel||cm,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[],l=-1;for(;++l<e.footnoteOrder.length;){let a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;let i=e.all(a),o=String(a.identifier).toUpperCase(),c=cp(o.toLowerCase()),u=0,d=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof r?r:r(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof n?n:n(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let h=i[i.length-1];if(h&&"element"===h.type&&"p"===h.tagName){let e=h.children[h.children.length-1];e&&"text"===e.type?e.value+=" ":h.children.push({type:"text",value:" "}),h.children.push(...d)}else i.push(...d);let m={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(a,m),s.push(m)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...cd(o),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(r),i=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return a&&i.children.push({type:"text",value:"\n"},a),i}function cI(e,t){return e&&"run"in e?async function(r,n){let a=cT(r,{file:n,...t});await e.run(a,n)}:function(r,n){return cT(r,{file:n,...e||t})}}function cA(e){if(e)throw e}var cR=r(19566);function cL(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let cz=require("node:path"),cO=require("node:process");function cF(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let c_=require("node:url"),cq=["history","path","basename","stem","extname","dirname"];class cB{constructor(e){let t,r;t=e?cF(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":cO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<cq.length;){let e=cq[n];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)cq.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?cz.basename(this.path):void 0}set basename(e){cU(e,"basename"),c$(e,"basename"),this.path=cz.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?cz.dirname(this.path):void 0}set dirname(e){cH(this.basename,"dirname"),this.path=cz.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?cz.extname(this.path):void 0}set extname(e){if(c$(e,"extname"),cH(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=cz.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){cF(e)&&(e=(0,c_.fileURLToPath)(e)),cU(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?cz.basename(this.path,this.extname):void 0}set stem(e){cU(e,"stem"),c$(e,"stem"),this.path=cz.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){let n=this.message(e,t,r);throw n.fatal=!0,n}info(e,t,r){let n=this.message(e,t,r);return n.fatal=void 0,n}message(e,t,r){let n=new sS(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function c$(e,t){if(e&&e.includes(cz.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+cz.sep+"`")}function cU(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function cH(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let cV=function(e){let t=this.constructor.prototype,r=t[e],n=function(){return r.apply(n,arguments)};return Object.setPrototypeOf(n,t),n},cW={}.hasOwnProperty;class cG extends cV{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let e=[],t={run:function(...t){let r=-1,n=t.pop();if("function"!=typeof n)throw TypeError("Expected function as last argument, not "+n);!function a(i,...o){let s=e[++r],l=-1;if(i)return void n(i);for(;++l<t.length;)(null===o[l]||void 0===o[l])&&(o[l]=t[l]);t=o,s?(function(e,t){let r;return function(...t){let i,o=e.length>t.length;o&&t.push(n);try{i=e.apply(this,t)}catch(e){if(o&&r)throw e;return n(e)}o||(i&&i.then&&"function"==typeof i.then?i.then(a,n):i instanceof Error?n(i):a(i))};function n(e,...a){r||(r=!0,t(e,...a))}function a(e){n(null,e)}})(s,a)(...o):n(null,...o)}(null,...t)},use:function(r){if("function"!=typeof r)throw TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}()}copy(){let e=new cG,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];e.use(...r)}return e.data(cR(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(cX("data",this.frozen),this.namespace[e]=t,this):cW.call(this.namespace,e)&&this.namespace[e]||void 0:e?(cX("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let r=e.call(this,...t);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let t=c0(e),r=this.parser||this.Parser;return cY("parse",r),r(String(t),t)}process(e,t){let r=this;return this.freeze(),cY("process",this.parser||this.Parser),cJ("process",this.compiler||this.Compiler),t?n(void 0,t):new Promise(n);function n(n,a){let i=c0(e),o=r.parse(i);function s(e,r){e||!r?a(e):n?n(r):t(void 0,r)}r.run(o,i,function(e,t,n){var a,i;if(e||!t||!n)return s(e);let o=r.stringify(t,n);"string"==typeof(a=o)||(i=a)&&"object"==typeof i&&"byteLength"in i&&"byteOffset"in i?n.value=o:n.result=o,s(e,n)})}}processSync(e){let t,r=!1;return this.freeze(),cY("processSync",this.parser||this.Parser),cJ("processSync",this.compiler||this.Compiler),this.process(e,function(e,n){r=!0,cA(e),t=n}),cQ("processSync","process",r),t}run(e,t,r){cZ(e),this.freeze();let n=this.transformers;return r||"function"!=typeof t||(r=t,t=void 0),r?a(void 0,r):new Promise(a);function a(a,i){let o=c0(t);n.run(e,o,function(t,n,o){let s=n||e;t?i(t):a?a(s):r(void 0,s,o)})}}runSync(e,t){let r,n=!1;return this.run(e,t,function(e,t){cA(e),r=t,n=!0}),cQ("runSync","run",n),r}stringify(e,t){this.freeze();let r=c0(t),n=this.compiler||this.Compiler;return cJ("stringify",n),cZ(e),n(e,r)}use(e,...t){let r=this.attachers,n=this.namespace;if(cX("use",this.frozen),null==e);else if("function"==typeof e)o(e,t);else if("object"==typeof e)Array.isArray(e)?i(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function a(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(e.plugins),e.settings&&(n.settings=cR(!0,n.settings,e.settings))}function i(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;){var r=e[t];if("function"==typeof r)o(r,[]);else if("object"==typeof r)if(Array.isArray(r)){let[e,...t]=r;o(e,t)}else a(r);else throw TypeError("Expected usable value, not `"+r+"`")}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function o(e,t){let n=-1,a=-1;for(;++n<r.length;)if(r[n][0]===e){a=n;break}if(-1===a)r.push([e,...t]);else if(t.length>0){let[n,...i]=t,o=r[a][1];cL(o)&&cL(n)&&(n=cR(!0,o,n)),r[a]=[e,n,...i]}}}}let cK=new cG().freeze();function cY(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function cJ(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function cX(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cZ(e){if(!cL(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function cQ(e,t,r){if(!r)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function c0(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new cB(e)}let c1=[],c2={allowDangerousHtml:!0},c3=/^(https?|ircs?|mailto|xmpp)$/i,c4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function c5(e){let t=function(e){let t=e.rehypePlugins||c1,r=e.remarkPlugins||c1,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...c2}:c2;return cK().use(ct).use(r).use(cI,n).use(t)}(e),r=function(e){let t=e.children||"",r=new cB;return"string"==typeof t&&(r.value=t),r}(e);return function(e,t){let r=t.allowedElements,n=t.allowElement,a=t.components,i=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||c6;for(let e of c4)Object.hasOwn(t,e.from)&&(e.from,e.to&&e.to,e.id);return cy(e,function(e,t,a){if("raw"===e.type&&a&&"number"==typeof t)return o?a.children.splice(t,1):a.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in sq)if(Object.hasOwn(sq,t)&&Object.hasOwn(e.properties,t)){let r=e.properties[t],n=sq[t];(null===n||n.includes(e.tagName))&&(e.properties[t]=c(String(r||""),t,e))}}if("element"===e.type){let o=r?!r.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&n&&"number"==typeof t&&(o=!n(e,t,a)),o&&a&&"number"==typeof t)return l&&e.children?a.children.splice(t,1,...e.children):a.children.splice(t,1),t}}),function(e,t){var r,n,a,i,o;let s;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let l=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=l,n=t.jsxDEV,s=function(e,t,a,i){let o=Array.isArray(a.children),s=sb(e);return n(t,a,i,o,{columnNumber:s?s.column-1:void 0,fileName:r,lineNumber:s?s.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");a=0,i=t.jsx,o=t.jsxs,s=function(e,t,r,n){let a=Array.isArray(r.children)?o:i;return n?a(t,r,n):a(t,r)}}let c={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?sd:su,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},u=sA(c,e,void 0);return u&&"string"!=typeof u?u:c.create(e,c.Fragment,{children:u||void 0},void 0)}(e,{Fragment:s.Fragment,components:a,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0})}(t.runSync(t.parse(r),r),e)}function c6(e){let t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),a=e.indexOf("/");return -1===t||-1!==a&&t>a||-1!==r&&t>r||-1!==n&&t>n||c3.test(e.slice(0,t))?e:""}function c8({content:e,className:t}){return(0,s.jsx)("div",{className:(0,h.cn)("prose prose-sm dark:prose-invert max-w-none",t),children:(0,s.jsx)(c5,{components:{h1:({children:e})=>(0,s.jsx)("h1",{className:"text-xl font-bold mb-2 mt-4",children:e}),h2:({children:e})=>(0,s.jsx)("h2",{className:"text-lg font-semibold mb-2 mt-3",children:e}),h3:({children:e})=>(0,s.jsx)("h3",{className:"text-base font-semibold mb-1 mt-2",children:e}),h4:({children:e})=>(0,s.jsx)("h4",{className:"text-sm font-semibold mb-1 mt-2",children:e}),p:({children:e})=>(0,s.jsx)("p",{className:"mb-2 last:mb-0",children:e}),ul:({children:e})=>(0,s.jsx)("ul",{className:"list-disc pl-5 mb-2 space-y-0.5",children:e}),ol:({children:e})=>(0,s.jsx)("ol",{className:"list-decimal pl-5 mb-2 space-y-0.5",children:e}),li:({children:e})=>(0,s.jsx)("li",{className:"text-sm",children:e}),code:({className:e,children:t,...r})=>/language-(\w+)/.exec(e||"")?(0,s.jsx)("pre",{className:"p-3 rounded-md bg-muted overflow-x-auto mb-2",children:(0,s.jsx)("code",{className:"font-mono text-xs",children:t})}):(0,s.jsx)("code",{className:"px-1.5 py-0.5 rounded bg-muted font-mono text-xs",...r,children:t}),blockquote:({children:e})=>(0,s.jsx)("blockquote",{className:"border-l-2 border-muted-foreground/30 pl-3 py-0.5 mb-2 italic text-muted-foreground",children:e}),a:({href:e,children:t})=>(0,s.jsx)("a",{href:e,className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",children:t}),strong:({children:e})=>(0,s.jsx)("strong",{className:"font-semibold",children:e}),em:({children:e})=>(0,s.jsx)("em",{className:"italic",children:e}),hr:()=>(0,s.jsx)("hr",{className:"my-3 border-muted"}),table:({children:e})=>(0,s.jsx)("div",{className:"overflow-x-auto mb-2",children:(0,s.jsx)("table",{className:"min-w-full divide-y divide-muted",children:e})}),thead:({children:e})=>(0,s.jsx)("thead",{className:"bg-muted/30",children:e}),tbody:({children:e})=>(0,s.jsx)("tbody",{className:"divide-y divide-muted",children:e}),tr:({children:e})=>(0,s.jsx)("tr",{children:e}),th:({children:e})=>(0,s.jsx)("th",{className:"px-2 py-1 text-left text-xs font-medium",children:e}),td:({children:e})=>(0,s.jsx)("td",{className:"px-2 py-1 text-xs",children:e})},children:e})})}let c9={shell:(0,s.jsx)(tJ,{className:"h-3 w-3 text-blue-500"}),json_patch:(0,s.jsx)(x,{className:"h-3 w-3 text-orange-500"}),evaluation:(0,s.jsx)(oq.A,{className:"h-3 w-3 text-orange-500"}),complete_task:(0,s.jsx)(oq.A,{className:"h-3 w-3 text-green-500"})},c7={pending:(0,s.jsx)(n_.A,{className:"h-3 w-3 animate-spin text-gray-400"}),executing:(0,s.jsx)(n_.A,{className:"h-3 w-3 animate-spin text-blue-500"}),completed:(0,s.jsx)(oq.A,{className:"h-3 w-3 text-green-500"}),failed:(0,s.jsx)(oB.A,{className:"h-3 w-3 text-red-500"})};function ue({content:e,toolCalls:t=[],toolMessages:r,checkpointId:n,onRestore:a,onRetry:i,isSavedCheckpoint:o,isExecuting:l=!1,className:c,cost:d,usage:p}){let[f,g]=u().useState(new Set),[v,x]=u().useState(!1),{shouldShowCosts:y}=a4(),b=!!(e&&""!==e.trim()),w=e=>{let t=new Set(f);t.has(e)?t.delete(e):t.add(e),g(t)},k=n&&(a||i)&&!l?(0,s.jsxs)("div",{className:"pt-2 flex flex-wrap items-center gap-2","data-tour-id":"checkpoint-actions",children:[(0,s.jsx)(rO.E,{variant:o?"default":"outline",className:"h-6 px-2 text-xs",children:o?"Saved version":"Checkpoint"}),a&&(0,s.jsxs)(m.$,{size:"sm",variant:"ghost",onClick:()=>a(n),className:"h-7 text-xs","data-tour-id":"checkpoint-restore-button",children:[(0,s.jsx)(aQ,{className:"h-3 w-3 mr-1"}),"Restore"]}),i&&(0,s.jsxs)(m.$,{size:"sm",variant:"ghost",onClick:()=>i(n),className:"h-7 text-xs","data-tour-id":"checkpoint-retry-button",children:[(0,s.jsx)(o$,{className:"h-3 w-3 mr-1"}),"Retry"]})]}):null;return r&&r.length>0?(0,s.jsxs)("div",{className:(0,h.cn)("space-y-2",c),children:[b&&(0,s.jsx)("div",{className:"text-sm text-foreground/90",children:(0,s.jsx)(c8,{content:e??""})}),y&&(void 0!==d||p)&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[void 0!==d&&(0,s.jsxs)(rO.E,{variant:"secondary",className:"text-xs cursor-pointer",onClick:()=>x(!v),children:[(0,s.jsx)(S,{className:"h-3 w-3 mr-1"}),np.U.formatCost(d)]}),p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(rO.E,{variant:"outline",className:"text-xs",children:[(0,s.jsx)(oU.A,{className:"h-3 w-3 mr-1"}),p.totalTokens.toLocaleString()," tokens"]}),p.provider&&(0,s.jsxs)(rO.E,{variant:"outline",className:"text-xs",children:[p.provider,p.model&&` / ${p.model.split("/").pop()}`]})]}),v&&p&&(0,s.jsxs)("div",{className:"w-full mt-2 p-2 bg-muted/30 rounded text-xs space-y-1",children:[(0,s.jsxs)("div",{children:["Input: ",p.promptTokens.toLocaleString()," tokens"]}),(0,s.jsxs)("div",{children:["Output: ",p.completionTokens.toLocaleString()," tokens"]}),(0,s.jsxs)("div",{children:["Total: ",p.totalTokens.toLocaleString()," tokens"]}),void 0!==d&&(0,s.jsxs)("div",{className:"font-medium",children:["Cost: ",np.U.formatCost(d)]})]})]}),r.map(e=>"message"===e.type?(0,s.jsx)("div",{className:"text-sm text-foreground/90 bg-muted/20 px-3 py-2 rounded",children:(0,s.jsx)(c8,{content:e.content||""})},e.id):"divider"===e.type?(0,s.jsxs)("div",{className:"flex items-center gap-2 my-2",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground whitespace-nowrap",children:e.title||"Section"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-border"})]},e.id):(0,s.jsxs)("div",{className:(0,h.cn)("bg-muted/30 rounded-md transition-all",f.has(e.id)?"p-2":"p-1.5"),children:[(0,s.jsxs)("button",{onClick:()=>w(e.id),className:"flex items-center gap-2 w-full text-left hover:bg-muted/50 rounded px-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:["evaluation"===e.name?e.parameters?.goal_achieved?(0,s.jsx)(oq.A,{className:"h-3 w-3 text-green-500"}):(0,s.jsx)(oB.A,{className:"h-3 w-3 text-red-500"}):e.name&&c9[""===e.name&&e.parameters?.tool||e.name]||(0,s.jsx)(tJ,{className:"h-3 w-3"}),(0,s.jsx)("span",{className:"text-xs font-mono",children:"shell"===e.name&&e.parameters?.cmd?.[0]?e.parameters.cmd[0]:""===e.name&&e.parameters?.tool||e.name})]}),"shell"===e.name&&e.parameters?.cmd?(0,s.jsx)("code",{className:"text-xs text-muted-foreground",children:(()=>{let t=e.parameters.cmd;if(Array.isArray(t)){let e=t.slice(1).join(" ");return e.substring(0,50)+(e.length>50?"...":"")}return"string"==typeof t?t.substring(0,50)+(t.length>50?"...":""):JSON.stringify(t).substring(0,50)})()}):(e.parameters?.path||e.parameters?.file_path)&&(0,s.jsx)("code",{className:"text-xs text-muted-foreground",children:e.parameters.path||e.parameters.file_path}),(0,s.jsx)("div",{className:"ml-auto",children:c7[e.status||"completed"]})]}),"complete_task"===e.name&&e.parameters?.summary&&(0,s.jsx)("div",{className:"px-2 py-1 mt-1",children:(0,s.jsx)("span",{className:"text-xs text-green-600 dark:text-green-400",children:e.parameters.summary})}),""===e.name&&e.parameters?.description&&(0,s.jsx)("div",{className:"px-2 py-1 mt-1",children:(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:e.parameters.description})}),"evaluation"===e.name&&e.parameters&&(0,s.jsxs)("div",{className:"px-2 py-1 mt-1 space-y-2",children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:e.parameters.reasoning}),(0,s.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[e.parameters.goal_achieved?(0,s.jsx)(oq.A,{className:"h-3 w-3 text-green-500"}):(0,s.jsx)(oB.A,{className:"h-3 w-3 text-red-500"}),(0,s.jsx)("span",{className:e.parameters.goal_achieved?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400",children:e.parameters.goal_achieved?"Goal achieved":"Goal not achieved"})]}),!e.parameters.should_continue&&(0,s.jsxs)("div",{className:"flex items-center gap-1 text-muted-foreground",children:[(0,s.jsx)("span",{children:"•"}),(0,s.jsx)("span",{children:"Stopping"})]})]})]}),e.result?.error&&(0,s.jsx)("div",{className:"px-2 py-1 mt-1",children:(0,s.jsxs)("span",{className:"text-xs text-red-500",children:["Error: ",e.result.error]})}),"shell"===e.name&&e.result?.success===!1&&e.result?.stderr&&(0,s.jsx)("div",{className:"px-2 py-1 mt-1",children:(0,s.jsx)("span",{className:"text-xs text-red-500",children:e.result.stderr})}),f.has(e.id)&&(0,s.jsxs)("div",{className:"mt-2 pl-5 space-y-1 text-xs",children:[e.parameters&&Object.keys(e.parameters).length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Parameters:"}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded overflow-x-auto",children:JSON.stringify(e.parameters,null,2)})]}),e.result&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Result:"}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded overflow-x-auto max-h-32",children:"string"==typeof e.result?e.result:JSON.stringify(e.result,null,2)})]})]})]},e.id)),k]}):(0,s.jsxs)("div",{className:(0,h.cn)("space-y-2",c),children:[b&&(0,s.jsx)("div",{className:"text-sm text-foreground/90",children:(0,s.jsx)(c8,{content:e??""})}),y&&(void 0!==d||p)&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-2",children:[void 0!==d&&(0,s.jsxs)(rO.E,{variant:"secondary",className:"text-xs cursor-pointer",onClick:()=>x(!v),children:[(0,s.jsx)(S,{className:"h-3 w-3 mr-1"}),np.U.formatCost(d)]}),p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(rO.E,{variant:"outline",className:"text-xs",children:[(0,s.jsx)(oU.A,{className:"h-3 w-3 mr-1"}),p.totalTokens.toLocaleString()," tokens"]}),p.provider&&(0,s.jsxs)(rO.E,{variant:"outline",className:"text-xs",children:[p.provider,p.model&&` / ${p.model.split("/").pop()}`]})]}),v&&p&&(0,s.jsxs)("div",{className:"w-full mt-2 p-2 bg-muted/30 rounded text-xs space-y-1",children:[(0,s.jsxs)("div",{children:["Input: ",p.promptTokens.toLocaleString()," tokens"]}),(0,s.jsxs)("div",{children:["Output: ",p.completionTokens.toLocaleString()," tokens"]}),(0,s.jsxs)("div",{children:["Total: ",p.totalTokens.toLocaleString()," tokens"]}),void 0!==d&&(0,s.jsxs)("div",{className:"font-medium",children:["Cost: ",np.U.formatCost(d)]})]})]}),t.length>0&&(0,s.jsx)("div",{className:"space-y-1",children:t.map((e,t)=>(0,s.jsxs)("div",{className:(0,h.cn)("bg-muted/30 rounded-md transition-all",f.has(String(t))?"p-2":"p-1.5"),children:[(0,s.jsxs)("button",{onClick:()=>w(String(t)),className:"flex items-center gap-2 w-full text-left hover:bg-muted/50 rounded px-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:["evaluation"===e.name?e.parameters?.goal_achieved?(0,s.jsx)(oq.A,{className:"h-3 w-3 text-green-500"}):(0,s.jsx)(oB.A,{className:"h-3 w-3 text-red-500"}):e.name&&c9[""===e.name&&e.parameters?.tool||e.name]||(0,s.jsx)(tJ,{className:"h-3 w-3"}),(0,s.jsx)("span",{className:"text-xs font-mono",children:"shell"===e.name&&e.parameters?.cmd?.[0]?e.parameters.cmd[0]:""===e.name&&e.parameters?.tool||e.name})]}),"shell"===e.name&&e.parameters?.cmd?(0,s.jsx)("code",{className:"text-xs text-muted-foreground",children:(()=>{let t=e.parameters.cmd;if(Array.isArray(t)){let e=t.slice(1).join(" ");return e.substring(0,50)+(e.length>50?"...":"")}return"string"==typeof t?t.substring(0,50)+(t.length>50?"...":""):JSON.stringify(t).substring(0,50)})()}):(e.parameters?.path||e.parameters?.file_path)&&(0,s.jsx)("code",{className:"text-xs text-muted-foreground",children:e.parameters.path||e.parameters.file_path}),(0,s.jsx)("div",{className:"ml-auto",children:c7[e.status||"completed"]})]}),"complete_task"===e.name&&e.parameters?.summary&&(0,s.jsx)("div",{className:"px-2 py-1 mt-1",children:(0,s.jsx)("span",{className:"text-xs text-green-600 dark:text-green-400",children:e.parameters.summary})}),""===e.name&&e.parameters?.description&&(0,s.jsx)("div",{className:"px-2 py-1 mt-1",children:(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:e.parameters.description})}),e.result?.error&&(0,s.jsx)("div",{className:"px-2 py-1 mt-1",children:(0,s.jsxs)("span",{className:"text-xs text-red-500",children:["Error: ",e.result.error]})}),"shell"===e.name&&e.result?.success===!1&&e.result?.stderr&&(0,s.jsx)("div",{className:"px-2 py-1 mt-1",children:(0,s.jsx)("span",{className:"text-xs text-red-500",children:e.result.stderr})}),f.has(String(t))&&(0,s.jsxs)("div",{className:"mt-2 pl-5 space-y-1 text-xs",children:[e.parameters&&Object.keys(e.parameters).length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Parameters:"}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded overflow-x-auto",children:JSON.stringify(e.parameters,null,2)})]}),e.result&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Result:"}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded overflow-x-auto max-h-32",children:"string"==typeof e.result?e.result:JSON.stringify(e.result,null,2)})]})]})]},t))}),k]})}var ut=r(97815);function ur({project:e,onBack:t}){let[r,n]=(0,l.useState)(0),[a,i]=(0,l.useState)(""),[o,c]=(0,l.useState)(!1),[u,d]=(0,l.useState)(null),[f,v]=(0,l.useState)([]),[x,y]=(0,l.useState)("preview"),[b,w]=(0,l.useState)(!1),[j,N]=(0,l.useState)(!1),[C,S]=(0,l.useState)(e.lastSavedAt??null),[E,M]=(0,l.useState)(null),P=(0,l.useRef)(null),T=(0,l.useRef)(null),A=(0,l.useRef)(0),R=(0,l.useCallback)(()=>{try{let e=globalThis?.crypto;if(e&&"function"==typeof e.randomUUID)return e.randomUUID()}catch{}let e=`${Date.now()}_${A.current}`;return A.current+=1,e},[]),L=(0,l.useCallback)(e=>{if(null!=T.current&&T.current>=0&&T.current<e.length&&e[T.current]&&"assistant"===e[T.current].role&&!e[T.current].checkpointId)return{arr:e,idx:T.current};let t=e[e.length-1];if(!(!t||"assistant"!==t.role||t.checkpointId||t.isTask))return T.current=e.length-1,{arr:e,idx:T.current};{let t=[...e,{id:R(),role:"assistant",content:"",toolMessages:[]}];return T.current=t.length-1,{arr:t,idx:T.current}}},[R]),[z,O]=(0,l.useState)(null),[F,_]=(0,l.useState)(new Set),[q,B]=(0,l.useState)(r3.s.getDefaultModel()),[$,U]=(0,l.useState)(!1),[H,V]=(0,l.useState)(!1),[W,G]=(0,l.useState)(0),{state:K,start:Y,setWorkspaceHandler:J}=nF(),X=K.currentStep?.id,Z="running"===K.status&&"wrap-up"!==X,{shouldShowCosts:Q}=a4(),ee=(0,l.useRef)(null),et=(0,l.useRef)(null),er=(0,l.useRef)(!0),en=(0,l.useRef)(!1),[ea,ei]=(0,l.useState)(!0),[eo,es]=(0,l.useState)(!0),[el,ec]=(0,l.useState)(!1),[eu,ed]=(0,l.useState)(!0),ep=(()=>{let e=[ea,eo,el,eu].filter(Boolean).length;if(4===e)return{assistant:25,files:15,editor:35,preview:25};if(3===e){if(!ea)return{assistant:0,files:20,editor:40,preview:40};if(!eo)return{assistant:30,files:0,editor:40,preview:30};if(!el)return{assistant:33,files:20,editor:0,preview:47};if(!eu)return{assistant:30,files:20,editor:50,preview:0}}else if(2===e)return{assistant:50,files:50,editor:50,preview:50};return{assistant:100,files:100,editor:100,preview:100}})(),eh=e=>{if(!e)return"Select Model";let t=e.split("/");return t[t.length-1].split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},em=(0,l.useCallback)((e,t=1200)=>{if(!e)return"";if(e.length<=t)return e;let r=Math.max(0,Math.floor(.6*t)),n=Math.max(0,Math.floor(.3*t)),a=e.slice(0,r),i=n>0?e.slice(-n):"";return`${a} | |
| (...truncated...) | |
| ${i}`},[]),ef=(0,l.useCallback)(e=>{let t=Object.entries(e.attributes||{}).slice(0,6);if(0===t.length)return`<${e.tagName}>`;let r=t.map(([e,t])=>{let r=t.length>40?`${t.slice(0,37)}…`:t;return`${e}="${r}"`}).join(" ");return`<${e.tagName} ${r}>`},[]),eg=(0,l.useCallback)(e=>{let t=ef(e),r=em(e.outerHTML,1200),n=e.domPath||"(unknown path)";return["Focus context:",`- Target: ${t}`,`- DOM path: ${n}`,"- HTML snippet:","```html",r,"```"].join("\n")},[ef,em]),ev=(0,l.useCallback)(e=>{if(!e){M(null),P.current=null;return}let t=`${e.domPath||""}::${e.tagName||""}::${e.outerHTML?e.outerHTML.length:0}`,r=Date.now();if(P.current&&P.current.signature===t&&r-P.current.timestamp<400)return;let n={...e,timestamp:r};M(n),tV.oR.info("Focus context set",{description:ef(n)}),P.current={signature:t,timestamp:r}},[ef]);E&&ef(E);let ex=E?em(E.outerHTML,240):"",ey=ex?.trim()??"",eb=E?(0,s.jsxs)("div",{id:"focus-context-hint",className:"rounded-md border border-dashed border-primary/40 bg-primary/5 px-3 py-2 text-xs text-muted-foreground shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-foreground",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-medium text-xs uppercase tracking-wide text-primary",children:"context"}),(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"included in next message"})]}),(0,s.jsx)(m.$,{size:"sm",variant:"ghost",className:"h-6 px-2 text-xs",onClick:()=>M(null),title:"Clear focus context",children:"Clear"})]}),(0,s.jsxs)("div",{className:"mt-2 space-y-2",children:[E.domPath&&(0,s.jsx)("div",{className:"text-[11px] font-mono text-muted-foreground/80 break-all leading-snug",children:E.domPath}),ey&&(0,s.jsx)("pre",{className:"max-h-24 overflow-auto rounded border border-border/50 bg-background/90 px-2 py-1 text-[11px] text-foreground leading-relaxed",children:(0,s.jsx)("code",{children:ey})})]})]}):null,ew=(0,l.useCallback)(()=>{if(!ee.current)return;let{scrollTop:e,scrollHeight:t,clientHeight:r}=ee.current;t-e-r<100?(er.current=!0,en.current=!1):o||(er.current=!1,en.current=!0)},[o]),ek=(0,l.useCallback)(e=>{window.innerWidth<768?(y("editor"),setTimeout(()=>{aX(e)},0)):el?aX(e):(ec(!0),setTimeout(()=>{aX(e)},0))},[el]),ej=(0,l.useCallback)(()=>{n(e=>e+1),window.dispatchEvent(new CustomEvent("filesChanged"))},[]),eN=(0,l.useCallback)(async()=>{if(!j){N(!0);try{let t=await r0.$.save(e.id),r=await p.OP.getProject(e.id);S(r.lastSavedAt??new Date(t.timestamp)),O(t.id);let n=new Date().toISOString(),a={type:"manual_save",timestamp:n,checkpointId:t.id,description:"Manual save"};await a8.recordConversationBreak(e.id,a),await a8.addBreakContextMessage(e.id,a),tV.oR.success("Project saved")}catch(e){h.v.error("Failed to save project",e),tV.oR.error("Failed to save project")}finally{N(!1)}}},[e.id,j]),eC=(0,l.useCallback)(async(t,r)=>{try{if(!await nL.Y.checkpointExists(t)){tV.oR.error("Checkpoint no longer exists - it may have been cleaned up"),h.v.warn(`[Workspace] Checkpoint ${t} no longer exists`);return}if(await r0.$.runWithSuppressedDirty(e.id,()=>nL.Y.restoreCheckpoint(t))){tV.oR.success(`Restored to: ${r||"checkpoint"}`),ej(),await a8.recordConversationBreak(e.id,{type:"checkpoint_restore",timestamp:new Date().toISOString(),checkpointId:t,description:r||"checkpoint"}),await a8.addBreakContextMessage(e.id,{type:"checkpoint_restore",timestamp:new Date().toISOString(),checkpointId:t,description:r||"checkpoint"});let n=r0.$.getSavedCheckpointId(e.id);if(n&&n===t){r0.$.markClean(e.id);let t=await p.OP.getProject(e.id);S(t.lastSavedAt??null)}else r0.$.markDirty(e.id);v(e=>[...e,{id:R(),role:"assistant",content:`Restored to checkpoint: ${r||"previous state"}`,checkpointId:t}]);let a=a9.convertToOrchestratorMessages(f);await a8.updateConversation(e.id,a)}else tV.oR.error("Failed to restore checkpoint")}catch(e){h.v.error("Error restoring checkpoint:",e),tV.oR.error("Failed to restore checkpoint")}},[ej,f,e.id]),eS=(0,l.useCallback)(async(t,r)=>{try{if(!await nL.Y.checkpointExists(t)){tV.oR.error("Checkpoint no longer exists - cannot retry"),h.v.warn(`[Workspace] Checkpoint ${t} no longer exists`);return}let n=null;for(let e=r-1;e>=0;e--)if("user"===f[e].role){n=f[e];break}if(!n)return void tV.oR.error("Cannot find original user message to retry");if(!await r0.$.runWithSuppressedDirty(e.id,()=>nL.Y.restoreCheckpoint(t)))return void tV.oR.error("Failed to restore checkpoint");let a=r0.$.getSavedCheckpointId(e.id);if(a&&a===t){r0.$.markClean(e.id);let t=await p.OP.getProject(e.id);S(t.lastSavedAt??null)}else r0.$.markDirty(e.id);await a8.recordConversationBreak(e.id,{type:"retry",timestamp:new Date().toISOString(),checkpointId:t,description:`Retrying: "${n.content.substring(0,50)}..."`});let o=f.slice(0,r-1);v(o);let s=a9.convertToOrchestratorMessages(o);await a8.updateConversation(e.id,s),await a8.addBreakContextMessage(e.id,{type:"retry",timestamp:new Date().toISOString(),checkpointId:t,description:"Retrying after restoring to checkpoint"}),tV.oR.success("Restored checkpoint and retrying..."),ej(),i(n.content),setTimeout(()=>{let e=document.querySelector('[data-retry-trigger="true"]');e&&e.click()},100)}catch(e){h.v.error("Error during retry:",e),tV.oR.error("Failed to retry")}},[f,ej,e.id]),eE=async()=>{if(Z)return;let t=a.trim();if(!t)return void tV.oR.error("Please enter a prompt");let r=r3.s.getSelectedProvider(),n=(0,a5.sO)(r),o=r3.s.getApiKey();if(n.apiKeyRequired&&!o)return void tV.oR.error(`Please set your ${n.name} API key in settings`);if(n.isLocal&&!r3.s.getProviderModel(r))return void tV.oR.error(`No model selected for ${n.name}. Please select a model in settings.`);er.current=!0,en.current=!1,c(!0);let s=E?`${eg(E)} | |
| ${t}`:t,l={id:R(),role:"user",content:s};v(e=>[...e,l]);try{let t;T.current=null,v(e=>L([...e]).arr);let r=await a8.getConversationMessages(e.id,50),n=f.length,a=r.filter(e=>"user"===e.role||"assistant"===e.role).length;h.v.debug("[Workspace] Context validation:",{uiMessages:n,contextMessages:a,totalContextIncludingSystem:r.length,contextTypes:r.map(e=>e.role)}),0===n&&a>0&&(h.v.warn(`[Workspace] GHOST CONVERSATION DETECTED: UI has ${n} messages but context has ${a} messages!`),h.v.warn("[Workspace] This causes the LLM to continue previous conversations that the user cannot see."),h.v.warn("[Workspace] Clearing context to match UI state..."),await a8.clearConversation(e.id),r.length=0);try{let r=await p.OP.listDirectory(e.id,"/");r.length>0&&(t=r.map(e=>e.path).join("\n"))}catch{}let o=(0,a7.m)(t),l=await new Promise(e=>{v(t=>(e(t),t))}),c=a9.prepareConversationForOrchestrator(l,{maxMessages:50,includeSystemPrompt:!0,systemPrompt:o}),u=new a3.r(e.id,c,(e,t)=>{if("assistant_delta"===e&&(t?.text||t?.snapshot)){let e=t.text,r=t.snapshot;v(t=>{let{arr:n,idx:a}=L([...t]);if(a<0||a>=n.length||!n[a])return h.v.error("[assistant_delta] Invalid index or missing message:",{idx:a,arrayLength:n.length}),t;let i=n[a],o={...i,toolMessages:[...i.toolMessages||[]]},s=o.toolMessages;(0===s.length||"message"!==s[s.length-1].type)&&s.push({id:R(),type:"message",content:""});let l=s[s.length-1];return void 0!==r?l.content=r:e&&(l.content=(l.content||"")+e),n[a]=o,n})}if("toolCalls"===e&&t?.toolCalls){let e=t.toolCalls;h.v.debug(`[Workspace] Received ${e.length} tool calls`),v(t=>{let{arr:r,idx:n}=L([...t]),a=r[n],i={...a,toolMessages:[...a.toolMessages||[]]},o=i.toolMessages;for(let t=0;t<e.length;t++){let r,n=e[t],a=n.function?.name||n.name||"";try{r=n.function?JSON.parse(n.function.arguments||"{}"):n.parameters}catch{r=n.function?{arguments:n.function.arguments}:n.parameters}o.push({id:R(),type:"tool",name:a,parameters:r,status:"pending",result:null})}return r[n]=i,r})}if("usage"===e&&t?.usage&&v(e=>{if(null==T.current)return e;let r=[...e],n=r[T.current];return r[T.current]={...n,cost:t.totalCost,usage:t.usage},r}),"evaluation"===e&&t?.summary){let e=t.summary;v(t=>{let{arr:r,idx:n}=L([...t]),a=r[n],i={...a,toolMessages:[...a.toolMessages||[]]};return i.toolMessages.push({id:R(),type:"message",content:e}),r[n]=i,r})}if("divider"===e&&v(e=>{let{arr:r,idx:n}=L([...e]),a=r[n],i={...a,toolMessages:[...a.toolMessages||[]]};return i.toolMessages.push({id:R(),type:"divider",title:t?.title||"Section"}),r[n]=i,r}),"tool_result"===e&&t){let{toolIndex:e,result:r}=t;h.v.debug(`[Workspace] Received tool result for tool ${e}`,{resultPreview:"string"==typeof r?r.substring(0,100):r}),v(e=>{let{arr:t,idx:n}=L([...e]),a=t[n],i={...a,toolMessages:[...a.toolMessages||[]]},o=i.toolMessages;for(let e=o.length-1;e>=0;e--)if("tool"===o[e].type&&!o[e].result){o[e]={...o[e],result:r};break}return t[n]=i,t})}if("tool_status"===e&&t){let{toolIndex:e,status:r,result:n,error:a}=t;v(e=>{let{arr:t,idx:i}=L([...e]),o=t[i],s={...o,toolMessages:[...o.toolMessages||[]]},l=s.toolMessages;for(let e=l.length-1;e>=0;e--)if("tool"===l[e].type&&("pending"===l[e].status||"executing"===l[e].status)){l[e]={...l[e],status:r,result:n||a||l[e].result};break}return t[i]=s,t})}});d(u);let m=await u.execute(s);v(e=>{if(null==T.current)return e;let t=[...e],r=t[T.current];return t[T.current]={...r,checkpointId:m.checkpointId,cost:m.totalCost,usage:m.usageInfo},t}),m.success&&ej();let g=await new Promise(e=>{v(t=>(e(t),t))}),x=a9.convertToOrchestratorMessages(g);await a8.updateConversation(e.id,x),i("")}catch(e){h.v.error("Generation error:",e),tV.oR.error(e instanceof Error?e.message:"Failed to generate"),v(t=>[...t,{id:R(),role:"assistant",content:`Error: ${e instanceof Error?e.message:"Unknown error"}`}])}finally{c(!1),d(null),T.current=null}},eD=(0,l.useCallback)(()=>{u&&(u.stop(),tV.oR.info("Generation stopped"))},[u]),eM=[{id:"back",label:"Back to projects",icon:aZ.A,onClick:t,variant:"outline"}];eM.push({id:"save",label:j?"Saving…":b?"Save":"Saved",icon:aK,onClick:eN,variant:b?"default":"outline",disabled:!b||j}),z&&eM.push({id:"discard",label:"Discard Changes",icon:aQ,onClick:()=>eC(z,"Last saved state"),variant:"outline",disabled:j||!b,dataTourId:"discard-changes-button"});let eP=(0,s.jsxs)(r2.AM,{children:[(0,s.jsx)(r2.Wv,{asChild:!0,children:(0,s.jsxs)(m.$,{variant:"outline",size:"sm",className:"h-8 px-3 flex items-center gap-2",title:"Project cost and settings",children:[Q&&(0,s.jsxs)("span",{className:"text-sm font-medium",children:["$",W.toFixed(3)]}),(0,s.jsx)(rU,{className:"h-4 w-4"})]})}),(0,s.jsx)(r2.hl,{className:"w-96",align:"end",children:(0,s.jsx)(nI,{})})]}),eT=(0,s.jsxs)("div",{className:"space-y-2",children:[Q&&(0,s.jsx)("div",{className:"pb-2 border-b border-border/50",children:(0,s.jsxs)("span",{className:"text-sm font-medium",children:["Project cost: $",W.toFixed(W>=10?2:3)]})}),(0,s.jsxs)(r2.AM,{children:[(0,s.jsx)(r2.Wv,{asChild:!0,children:(0,s.jsxs)(m.$,{variant:"outline",size:"sm",className:"w-full justify-start",children:[(0,s.jsx)(rU,{className:"h-4 w-4 mr-2"}),"Settings"]})}),(0,s.jsx)(r2.hl,{className:"w-[calc(100vw-2rem)]",align:"start",children:(0,s.jsx)(nI,{})})]})]});return(0,s.jsxs)(oI,{children:[(0,s.jsxs)("div",{className:"h-screen flex flex-col",children:[(0,s.jsx)(rJ.j,{leftText:e.name,onLogoClick:t,actions:eM,mobileMenuContent:eT,desktopOnlyContent:eP}),(0,s.jsxs)("div",{className:"hidden md:flex flex-1 overflow-hidden bg-background",children:[(0,s.jsxs)("div",{className:"w-10 bg-muted/70 border-r border-border flex flex-col items-center py-3 gap-1.5",children:[(0,s.jsxs)(oA,{children:[(0,s.jsx)(oR,{asChild:!0,children:(0,s.jsx)("button",{className:`h-5 w-5 px-1 rounded-sm flex items-center justify-center transition-all ${ea?"shadow-sm":"bg-transparent text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,style:{backgroundColor:ea?"var(--button-assistant-active)":void 0,color:ea?"white":void 0},onClick:()=>ei(!ea),children:(0,s.jsx)(a0,{className:"h-3.5 w-3.5"})})}),(0,s.jsx)(oL,{side:"right",className:"border-0",style:{backgroundColor:"var(--button-assistant-active)",color:"white"},arrowStyle:{backgroundColor:"var(--button-assistant-active)",fill:"var(--button-assistant-active)"},children:(0,s.jsx)("p",{children:"Chat"})})]}),(0,s.jsxs)(oA,{children:[(0,s.jsx)(oR,{asChild:!0,children:(0,s.jsx)("button",{className:`h-5 w-5 px-1 rounded-sm flex items-center justify-center transition-all ${eo?"shadow-sm":"bg-transparent text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,style:{backgroundColor:eo?"var(--button-files-active)":void 0,color:eo?"white":void 0},onClick:()=>es(!eo),children:(0,s.jsx)(nW,{className:"h-3.5 w-3.5"})})}),(0,s.jsx)(oL,{side:"right",className:"border-0",style:{backgroundColor:"var(--button-files-active)",color:"white"},arrowStyle:{backgroundColor:"var(--button-files-active)",fill:"var(--button-files-active)"},children:(0,s.jsx)("p",{children:"File Explorer"})})]}),(0,s.jsxs)(oA,{children:[(0,s.jsx)(oR,{asChild:!0,children:(0,s.jsx)("button",{className:`h-5 w-5 px-1 rounded-sm flex items-center justify-center transition-all ${el?"shadow-sm":"bg-transparent text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,style:{backgroundColor:el?"var(--button-editor-active)":void 0,color:el?"white":void 0},onClick:()=>ec(!el),children:(0,s.jsx)(aG,{className:"h-3.5 w-3.5"})})}),(0,s.jsx)(oL,{side:"right",className:"border-0",style:{backgroundColor:"var(--button-editor-active)",color:"white"},arrowStyle:{backgroundColor:"var(--button-editor-active)",fill:"var(--button-editor-active)"},children:(0,s.jsx)("p",{children:"Code Editor"})})]}),(0,s.jsxs)(oA,{children:[(0,s.jsx)(oR,{asChild:!0,children:(0,s.jsx)("button",{className:`h-5 w-5 mx-1 rounded-sm flex items-center justify-center transition-all ${eu?"shadow-sm":"bg-transparent text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,style:{backgroundColor:eu?"var(--button-preview-active)":void 0,color:eu?"white":void 0},onClick:()=>ed(!eu),children:(0,s.jsx)(D.A,{className:"h-3.5 w-3.5"})})}),(0,s.jsx)(oL,{side:"right",className:"border-0",style:{backgroundColor:"var(--button-preview-active)",color:"white"},arrowStyle:{backgroundColor:"var(--button-preview-active)",fill:"var(--button-preview-active)"},children:(0,s.jsx)("p",{children:"Preview"})})]})]}),(0,s.jsx)("div",{className:"flex-1 p-2 overflow-hidden","data-tour-id":"workspace-panels",children:(0,s.jsxs)(or,{direction:"horizontal",autoSaveId:"workspace-layout",children:[ea&&(0,s.jsx)(ic,{id:"assistant",order:1,defaultSize:ep.assistant,minSize:15,children:(0,s.jsxs)("div",{className:"h-full flex flex-col border border-border rounded-lg shadow-sm overflow-hidden relative",style:{background:"linear-gradient(var(--panel-assistant-tint), var(--panel-assistant-tint)), var(--card)"},"data-tour-id":"assistant-panel",children:[(0,s.jsxs)("div",{className:"p-3 border-b bg-muted/80 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(a0,{className:"h-4 w-4 md:hidden",style:{color:"var(--button-assistant-active)"}}),(0,s.jsxs)("button",{type:"button",onClick:()=>ei(!1),"aria-label":"Hide chat",className:"relative hidden h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-destructive md:flex group",children:[(0,s.jsx)(a0,{className:"h-4 w-4 transition-opacity group-hover:opacity-0",style:{color:"var(--button-assistant-active)"}}),(0,s.jsx)(k.A,{className:"absolute h-3 w-3 opacity-0 transition-opacity group-hover:opacity-100"})]}),(0,s.jsx)("h3",{className:"text-sm font-medium",children:"Chat"})]}),(0,s.jsx)(m.$,{size:"sm",variant:"ghost",onClick:async()=>{h.v.debug(`[Workspace] Clearing chat - UI has ${f.length} messages`),v([]),await a8.clearConversation(e.id);let t=await a8.getConversationMessages(e.id);t.length>0?h.v.error(`[Workspace] Clear failed! Still has ${t.length} messages in storage`):h.v.debug(`[Workspace] Successfully cleared all conversation data for project ${e.id}`)},className:"h-5 w-5 p-0",title:"Clear chat","data-tour-id":"clear-chat-button",children:(0,s.jsx)(I,{className:"h-3 w-3"})})]}),(0,s.jsxs)("div",{ref:ee,onScroll:ew,className:"flex-1 overflow-y-auto p-4 space-y-3 flex flex-col","data-tour-id":"checkpoint-panel",children:[0===f.length?(0,s.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,s.jsxs)("div",{className:"text-center space-y-3",children:[(0,s.jsx)(a0,{className:"h-12 w-12 mx-auto opacity-50 text-muted-foreground"}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("p",{className:"text-base font-medium text-foreground",children:"Ready to build"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Describe what you want to create or change"})]})]})}):f.map((e,t)=>e.isTask&&e.taskSteps?(0,s.jsx)("div",{className:"bg-card border border-border p-3 rounded-lg text-sm",children:(0,s.jsx)(o_,{title:e.taskTitle||"Task Progress",steps:e.taskSteps,checkpointId:e.checkpointId,onRestore:e=>eC(e,"task checkpoint"),isSavedCheckpoint:e.checkpointId===z,expanded:F.has(t),onToggleExpand:()=>{let e=new Set(F);e.has(t)?e.delete(t):e.add(t),_(e)}})},e.id):"assistant"===e.role&&(e.toolMessages&&e.toolMessages.length>0||e.toolCalls&&e.toolCalls.length>0)?(0,s.jsxs)("div",{className:"bg-card border border-border p-3 rounded-lg text-sm mr-2",children:[(0,s.jsx)("div",{className:"mb-2",children:(0,s.jsx)("p",{className:"font-medium",children:"AI"})}),(0,s.jsx)(ue,{content:e.content,toolCalls:e.toolCalls,toolMessages:e.toolMessages,checkpointId:e.checkpointId,onRestore:e.checkpointId?e=>eC(e,"checkpoint"):void 0,onRetry:e.checkpointId?e=>eS(e,t):void 0,isSavedCheckpoint:e.checkpointId===z,isExecuting:o,cost:e.cost,usage:e.usage})]},e.id):(0,s.jsxs)("div",{className:`p-3 rounded-lg text-sm ${"user"===e.role?"bg-muted/50 ml-8":"bg-card border border-border mr-2"}`,children:[(0,s.jsx)("div",{className:"mb-1",children:(0,s.jsx)("p",{className:"font-medium",children:"user"===e.role?"You":"AI"})}),(0,s.jsx)(c8,{content:e.content})]},e.id)),(0,s.jsx)("div",{ref:et})]}),(0,s.jsxs)("div",{className:"p-3 space-y-2",children:[eb,(0,s.jsxs)("div",{className:"bg-card border border-border rounded-lg shadow-sm overflow-hidden",children:[(0,s.jsxs)("div",{className:"relative flex bg-card rounded-lg transition-all",children:[(0,s.jsx)(g,{value:a,onChange:e=>i(e.target.value),onKeyDown:e=>{!Z&&"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),eE())},placeholder:"Describe what you want to build...",className:"flex-1 px-3 py-2 bg-transparent border-0 resize-none focus:outline-none text-sm placeholder:text-muted-foreground text-foreground",rows:3,disabled:o||Z}),(0,s.jsxs)("div",{className:"flex flex-col p-2 gap-2",children:[(0,s.jsxs)(oA,{children:[(0,s.jsx)(oR,{asChild:!0,children:(0,s.jsx)(m.$,{onClick:o?eD:eE,disabled:Z?!o:!o&&!a.trim(),size:"sm",className:"flex items-center gap-2","data-retry-trigger":"true",children:o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n_.A,{className:"h-4 w-4 animate-spin"}),"Stop"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a1,{className:"h-4 w-4"}),"Send"]})})}),(0,s.jsx)(oL,{side:"left",children:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("p",{className:"text-xs",children:[(0,s.jsx)("kbd",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"Ctrl/Cmd+Enter"})," to send"]}),(0,s.jsxs)("p",{className:"text-xs",children:[(0,s.jsx)("kbd",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"Enter"})," for newline"]})]})})]}),a.length>0&&(0,s.jsxs)("div",{className:"px-3 py-1.5 bg-muted text-muted-foreground rounded-md text-xs text-center",children:[a.length," chars"]})]})]}),(0,s.jsx)("div",{className:"border-t border-border bg-muted/50 px-2 py-2",children:(0,s.jsx)("div",{className:"flex items-center justify-between",children:(0,s.jsxs)(r2.AM,{open:$,onOpenChange:U,children:[(0,s.jsx)(r2.Wv,{asChild:!0,children:(0,s.jsxs)(m.$,{variant:"outline",size:"sm",className:"h-7 text-xs","data-tour-id":"provider-settings-trigger",children:[(0,s.jsx)("span",{children:eh(q)}),$?(0,s.jsx)(nc.A,{className:"h-3 w-3 ml-1"}):(0,s.jsx)(a2.A,{className:"h-3 w-3 ml-1"})]})}),(0,s.jsx)(r2.hl,{className:"w-96",align:"start",children:(0,s.jsx)(ut.t,{onClose:()=>U(!1),onModelChange:e=>B(e)})})]})})})]})]})]})}),ea&&(eo||el||eu)&&(0,s.jsx)(on,{withHandle:!0}),eo&&(0,s.jsx)(ic,{id:"files",order:2,defaultSize:ep.files,minSize:14,children:(0,s.jsx)("div",{className:"h-full border border-border rounded-lg shadow-sm overflow-hidden relative",style:{background:"linear-gradient(0deg, rgba(var(--panel-files-rgb), 0.01), rgba(var(--panel-files-rgb), 0.01)), var(--card)"},children:(0,s.jsx)(al,{projectId:e.id,onFileSelect:ek,onClose:()=>es(!1)})})}),eo&&(el||eu)&&(0,s.jsx)(on,{withHandle:!0}),el&&(0,s.jsx)(ic,{id:"editor",order:3,defaultSize:ep.editor,minSize:20,children:(0,s.jsx)("div",{className:"h-full border border-border rounded-lg shadow-sm overflow-hidden relative",style:{background:"linear-gradient(0deg, rgba(var(--panel-editor-rgb), 0.01), rgba(var(--panel-editor-rgb), 0.01)), var(--card)"},children:(0,s.jsx)(aJ,{projectId:e.id,onFilesChange:ej,onClose:()=>ec(!1)})})}),el&&eu&&(0,s.jsx)(on,{withHandle:!0}),eu&&(0,s.jsx)(ic,{id:"preview",order:4,defaultSize:ep.preview,minSize:20,children:(0,s.jsx)("div",{className:"h-full border border-border rounded-lg shadow-sm overflow-hidden relative",style:{background:"linear-gradient(0deg, rgba(var(--panel-preview-rgb), 0.01), rgba(var(--panel-preview-rgb), 0.01)), var(--card)"},children:(0,s.jsx)(t4,{projectId:e.id,refreshTrigger:r,onFocusSelection:ev,hasFocusTarget:!!E,onClose:()=>ed(!1)})})})]})})]}),(0,s.jsxs)("div",{className:"flex md:hidden flex-1 overflow-hidden bg-background flex-col",children:[(0,s.jsxs)("div",{className:"flex-1 p-2 pb-16 overflow-hidden",children:["assistant"===x&&(0,s.jsxs)("div",{className:"h-full flex flex-col border border-border rounded-lg shadow-sm overflow-hidden relative",style:{background:"linear-gradient(var(--panel-assistant-tint), var(--panel-assistant-tint)), var(--card)"},children:[(0,s.jsxs)("div",{className:"p-3 border-b bg-muted/80 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(a0,{className:"h-4 w-4",style:{color:"var(--button-assistant-active)"}}),(0,s.jsx)("h3",{className:"text-sm font-medium",children:"Chat"})]}),(0,s.jsx)(m.$,{size:"sm",variant:"ghost",onClick:async()=>{h.v.debug(`[Workspace] Clearing chat - UI has ${f.length} messages`),v([]),await a8.clearConversation(e.id)},className:"h-5 w-5 p-0",title:"Clear chat",children:(0,s.jsx)(I,{className:"h-3 w-3"})})]}),(0,s.jsxs)("div",{ref:ee,onScroll:ew,className:"flex-1 overflow-auto p-2 space-y-2",children:[f.map((e,t)=>e.isTask&&e.taskSteps?(0,s.jsxs)("div",{className:"border border-border rounded-lg p-3 bg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("p",{className:"font-medium text-sm",children:"Task Progress"}),e.checkpointId&&(0,s.jsxs)(m.$,{size:"sm",variant:"ghost",onClick:()=>eC(e.checkpointId,"checkpoint"),className:"h-6 px-2 text-xs",title:"Restore to this checkpoint",children:[(0,s.jsx)(aQ,{className:"h-3 w-3 mr-1"}),"Restore"]})]}),(0,s.jsx)(ue,{content:e.content,toolCalls:e.toolCalls,toolMessages:e.toolMessages,checkpointId:e.checkpointId,onRestore:e.checkpointId?e=>eC(e,"checkpoint"):void 0,onRetry:e.checkpointId?e=>eS(e,t):void 0,isSavedCheckpoint:e.checkpointId===z,isExecuting:o,cost:e.cost,usage:e.usage})]},e.id):"assistant"===e.role&&(e.toolMessages&&e.toolMessages.length>0||e.toolCalls&&e.toolCalls.length>0)?(0,s.jsxs)("div",{className:"bg-card border border-border p-3 rounded-lg text-sm mr-2",children:[(0,s.jsx)("div",{className:"mb-2",children:(0,s.jsx)("p",{className:"font-medium",children:"AI"})}),(0,s.jsx)(ue,{content:e.content,toolCalls:e.toolCalls,toolMessages:e.toolMessages,checkpointId:e.checkpointId,onRestore:e.checkpointId?e=>eC(e,"checkpoint"):void 0,onRetry:e.checkpointId?e=>eS(e,t):void 0,isSavedCheckpoint:e.checkpointId===z,isExecuting:o,cost:e.cost,usage:e.usage})]},e.id):(0,s.jsxs)("div",{className:`p-3 rounded-lg text-sm ${"user"===e.role?"bg-muted/50 ml-8":"bg-card border border-border mr-2"}`,children:[(0,s.jsx)("div",{className:"mb-1",children:(0,s.jsx)("p",{className:"font-medium",children:"user"===e.role?"You":"AI"})}),(0,s.jsx)(c8,{content:e.content})]},e.id)),(0,s.jsx)("div",{ref:et})]}),(0,s.jsxs)("div",{className:"p-3 space-y-2",children:[eb,(0,s.jsxs)("div",{className:"bg-card border border-border rounded-lg shadow-sm overflow-hidden",children:[(0,s.jsxs)("div",{className:"relative flex bg-card rounded-lg transition-all",children:[(0,s.jsx)(g,{value:a,onChange:e=>i(e.target.value),onKeyDown:e=>{!Z&&"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),eE())},placeholder:"Describe what you want to build...",className:"flex-1 px-3 py-2 bg-transparent border-0 resize-none focus:outline-none text-sm placeholder:text-muted-foreground text-foreground",rows:3,disabled:o||Z}),(0,s.jsx)("div",{className:"flex flex-col p-2 gap-2",children:(0,s.jsx)(m.$,{onClick:o?eD:eE,disabled:Z?!o:!o&&!a.trim(),size:"sm",className:"flex items-center gap-2",children:o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n_.A,{className:"h-4 w-4 animate-spin"}),"Stop"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a1,{className:"h-4 w-4"}),"Send"]})})})]}),(0,s.jsx)("div",{className:"border-t border-border bg-muted/50 px-2 py-2",children:(0,s.jsxs)(r2.AM,{open:H,onOpenChange:V,children:[(0,s.jsx)(r2.Wv,{asChild:!0,children:(0,s.jsxs)(m.$,{variant:"outline",size:"sm",className:"h-7 text-xs","data-tour-id":"provider-settings-trigger",children:[(0,s.jsx)("span",{children:eh(q)}),H?(0,s.jsx)(nc.A,{className:"h-3 w-3 ml-1"}):(0,s.jsx)(a2.A,{className:"h-3 w-3 ml-1"})]})}),(0,s.jsx)(r2.hl,{className:"w-[calc(100vw-2rem)]",align:"start",children:(0,s.jsx)(ut.t,{onClose:()=>V(!1),onModelChange:e=>B(e)})})]})})]})]})]}),"files"===x&&(0,s.jsx)("div",{className:"h-full border border-border rounded-lg shadow-sm overflow-hidden relative",style:{background:"linear-gradient(0deg, rgba(var(--panel-files-rgb), 0.01), rgba(var(--panel-files-rgb), 0.01)), var(--card)"},children:(0,s.jsx)(al,{projectId:e.id,onFileSelect:ek,onClose:()=>es(!1)})}),"editor"===x&&(0,s.jsx)("div",{className:"h-full border border-border rounded-lg shadow-sm overflow-hidden relative",style:{background:"linear-gradient(0deg, rgba(var(--panel-editor-rgb), 0.01), rgba(var(--panel-editor-rgb), 0.01)), var(--card)"},children:(0,s.jsx)(aJ,{projectId:e.id,onFilesChange:ej,onClose:()=>ec(!1)})}),"preview"===x&&(0,s.jsx)("div",{className:"h-full border border-border rounded-lg shadow-sm overflow-hidden relative",style:{background:"linear-gradient(0deg, rgba(var(--panel-preview-rgb), 0.01), rgba(var(--panel-preview-rgb), 0.01)), var(--card)"},children:(0,s.jsx)(t4,{projectId:e.id,refreshTrigger:r,onFocusSelection:ev,hasFocusTarget:!!E,onClose:()=>ed(!1)})})]}),(0,s.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-card border-t border-border",children:(0,s.jsxs)("div",{className:"flex justify-center items-center p-2 gap-2",children:[(0,s.jsx)("button",{className:`flex items-center justify-center py-2 px-2 rounded-lg transition-all shadow-sm ${"assistant"===x?"text-white":"bg-transparent text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,style:{backgroundColor:"assistant"===x?"var(--button-assistant-active)":void 0},onClick:()=>y("assistant"),children:(0,s.jsx)(a0,{className:"h-4 w-4"})}),(0,s.jsx)("button",{className:`flex items-center justify-center py-2 px-2 rounded-lg transition-all shadow-sm ${"files"===x?"text-white":"bg-transparent text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,style:{backgroundColor:"files"===x?"var(--button-files-active)":void 0},onClick:()=>y("files"),children:(0,s.jsx)(nW,{className:"h-4 w-4"})}),(0,s.jsx)("button",{className:`flex items-center justify-center py-2 px-2 rounded-lg transition-all shadow-sm ${"editor"===x?"text-white":"bg-transparent text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,style:{backgroundColor:"editor"===x?"var(--button-editor-active)":void 0},onClick:()=>y("editor"),children:(0,s.jsx)(aG,{className:"h-4 w-4"})}),(0,s.jsx)("button",{className:`flex items-center justify-center py-2 px-2 rounded-lg transition-all shadow-sm ${"preview"===x?"text-white":"bg-transparent text-muted-foreground hover:bg-muted/80 hover:text-foreground"}`,style:{backgroundColor:"preview"===x?"var(--button-preview-active)":void 0},onClick:()=>y("preview"),children:(0,s.jsx)(D.A,{className:"h-4 w-4"})})]})})]})]}),(0,s.jsx)(nq,{location:"workspace"}),(0,s.jsx)(nq,{location:"settings"})]})}var un=r(76180),ua=r.n(un);let ui=(0,l.forwardRef)(({hidden:e=!1},t)=>{let[r,n]=(0,l.useState)(!1),[a,i]=(0,l.useState)(!1);return((0,l.useImperativeHandle)(t,()=>({bounce:()=>{r&&n(!1),i(!0),setTimeout(()=>i(!1),800)},show:()=>{n(!1)}})),r||e)?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ua(),{id:"379a48f9d6bb8275",children:"@-webkit-keyframes gentleBounceUp{0%,100%{-webkit-transform:translatey(0);transform:translatey(0)}25%{-webkit-transform:translatey(-12px);transform:translatey(-12px)}50%{-webkit-transform:translatey(-6px);transform:translatey(-6px)}75%{-webkit-transform:translatey(-8px);transform:translatey(-8px)}}@-moz-keyframes gentleBounceUp{0%,100%{-moz-transform:translatey(0);transform:translatey(0)}25%{-moz-transform:translatey(-12px);transform:translatey(-12px)}50%{-moz-transform:translatey(-6px);transform:translatey(-6px)}75%{-moz-transform:translatey(-8px);transform:translatey(-8px)}}@-o-keyframes gentleBounceUp{0%,100%{-o-transform:translatey(0);transform:translatey(0)}25%{-o-transform:translatey(-12px);transform:translatey(-12px)}50%{-o-transform:translatey(-6px);transform:translatey(-6px)}75%{-o-transform:translatey(-8px);transform:translatey(-8px)}}@keyframes gentleBounceUp{0%,100%{-webkit-transform:translatey(0);-moz-transform:translatey(0);-o-transform:translatey(0);transform:translatey(0)}25%{-webkit-transform:translatey(-12px);-moz-transform:translatey(-12px);-o-transform:translatey(-12px);transform:translatey(-12px)}50%{-webkit-transform:translatey(-6px);-moz-transform:translatey(-6px);-o-transform:translatey(-6px);transform:translatey(-6px)}75%{-webkit-transform:translatey(-8px);-moz-transform:translatey(-8px);-o-transform:translatey(-8px);transform:translatey(-8px)}}"}),(0,s.jsx)("div",{style:{animation:a?"gentleBounceUp 0.8s ease-in-out":void 0},className:"jsx-379a48f9d6bb8275 fixed bottom-0 left-0 right-0 z-50 bg-card border-t-2 border-border shadow-2xl",children:(0,s.jsx)("div",{className:"jsx-379a48f9d6bb8275 container mx-auto px-4 py-4 max-w-6xl",children:(0,s.jsxs)("div",{className:"jsx-379a48f9d6bb8275 flex items-start justify-between gap-4",children:[(0,s.jsxs)("div",{className:"jsx-379a48f9d6bb8275 flex-1 space-y-2",children:[(0,s.jsx)("div",{className:"jsx-379a48f9d6bb8275 flex items-center gap-2",children:(0,s.jsx)("h3",{className:"jsx-379a48f9d6bb8275 text-lg font-bold text-foreground",children:"\uD83C\uDF89 DeepStudio is now OSW Studio!"})}),(0,s.jsx)("p",{className:"jsx-379a48f9d6bb8275 text-sm text-muted-foreground leading-relaxed",children:'The app remains functionally the same under the same license, just with a new name, logo and a lot of new functionalities that should make the agentic development even more agentic. This "DeepStudio" space will remain up and running for a couple of months to give you time to migrate over to "osw-studio".'}),(0,s.jsxs)("div",{className:"jsx-379a48f9d6bb8275 grid sm:grid-cols-2 gap-3 pt-2",children:[(0,s.jsxs)("div",{className:"jsx-379a48f9d6bb8275 space-y-1.5",children:[(0,s.jsx)("p",{className:"jsx-379a48f9d6bb8275 text-sm font-semibold text-foreground",children:"Migration Steps:"}),(0,s.jsxs)("ol",{className:"jsx-379a48f9d6bb8275 text-xs space-y-1 text-muted-foreground",children:[(0,s.jsx)("li",{className:"jsx-379a48f9d6bb8275",children:"1. Settings → Data Management → Export All Data"}),(0,s.jsx)("li",{className:"jsx-379a48f9d6bb8275",children:"2. Open OSW Studio and import your data"}),(0,s.jsx)("li",{className:"jsx-379a48f9d6bb8275",children:"3. ❤️ Like the space to help you and others find it"})]})]}),(0,s.jsx)("div",{className:"jsx-379a48f9d6bb8275 flex flex-col gap-2 sm:items-end sm:justify-center",children:(0,s.jsx)(m.$,{asChild:!0,size:"sm",className:"font-semibold",children:(0,s.jsxs)("a",{href:"https://huggingface.co/spaces/otst/osw-studio",target:"_blank",rel:"noopener noreferrer",className:"jsx-379a48f9d6bb8275 flex items-center gap-2",children:[(0,s.jsx)(r_.A,{className:"h-4 w-4"}),"Open OSW Studio"]})})})]})]}),(0,s.jsx)(m.$,{variant:"ghost",size:"icon",onClick:()=>n(!0),className:"text-muted-foreground hover:text-foreground hover:bg-muted flex-shrink-0",title:"Dismiss (will reappear on interactions)",children:(0,s.jsx)(k.A,{className:"h-5 w-5"})})]})})})]})});function uo(){let[e,t]=(0,l.useState)(null),{state:r,setActiveProjectId:n}=nF(),a=(0,l.useRef)(null);(0,d.usePathname)(),r.currentStep?.id,r.status;let i=e=>{a.current?.bounce()},o=(0,l.useMemo)(()=>e?(0,s.jsx)(ur,{project:e,onBack:()=>t(null)}):(0,s.jsx)(nB,{onProjectSelect:i,bannerRef:a}),[e]);return(0,s.jsxs)(s.Fragment,{children:[o,(0,s.jsx)(nq,{location:"global"}),(0,s.jsx)(ui,{ref:a,hidden:!1})]})}function us(){return(0,s.jsx)(nO,{children:(0,s.jsx)(uo,{})})}ui.displayName="MigrationBanner"},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11120:function(e,t,r){"use strict";var n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(r(65840)),a=r(86908);function i(e,t){var r={};return e&&"string"==typeof e&&(0,n.default)(e,function(e,n){e&&n&&(r[(0,a.camelCase)(e,t)]=n)}),r}i.default=i,e.exports=i},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19566:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},o=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,a=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;else if(a)return a(e,r).value}return e[r]};e.exports=function e(){var t,r,n,a,c,u,d=arguments[0],p=1,h=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<h;++p)if(t=arguments[p],null!=t)for(r in t)n=l(d,r),d!==(a=l(t,r))&&(m&&a&&(o(a)||(c=i(a)))?(c?(c=!1,u=n&&i(n)?n:[]):u=n&&o(n)?n:{},s(d,{name:r,newValue:e(m,u,a)})):void 0!==a&&s(d,{name:r,newValue:a}));return d}},19771:(e,t,r)=>{Promise.resolve().then(r.bind(r,9999))},27910:e=>{"use strict";e.exports=require("stream")},28354:e=>{"use strict";e.exports=require("util")},29021:e=>{"use strict";e.exports=require("fs")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},44517:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g;function c(e){return e?e.replace(l,""):""}e.exports=function(e,l){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];l=l||{};var u=1,d=1;function p(e){var t=e.match(r);t&&(u+=t.length);var n=e.lastIndexOf("\n");d=~n?e.length-n:d+e.length}function h(){var e={line:u,column:d};return function(t){return t.position=new m(e),v(n),t}}function m(e){this.start=e,this.end={line:u,column:d},this.source=l.source}m.prototype.content=e;var f=[];function g(t){var r=Error(l.source+":"+u+":"+d+": "+t);if(r.reason=t,r.filename=l.source,r.line=u,r.column=d,r.source=e,l.silent)f.push(r);else throw r}function v(t){var r=t.exec(e);if(r){var n=r[0];return p(n),e=e.slice(n.length),r}}function x(e){var t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return g("End of comment missing");var n=e.slice(2,r-2);return d+=2,p(n),e=e.slice(r),d+=2,t({type:"comment",comment:n})}}v(n);var b,w=[];for(x(w);b=function(){var e=h(),r=v(a);if(r){if(y(),!v(i))return g("property missing ':'");var n=v(o),l=e({type:"declaration",property:c(r[0].replace(t,"")),value:n?c(n[0].replace(t,"")):""});return v(s),l}}();)!1!==b&&(w.push(b),x(w));return w}},55511:e=>{"use strict";e.exports=require("crypto")},56397:()=>{},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65840:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=null;if(!e||"string"!=typeof e)return r;var n=(0,a.default)(e),i="function"==typeof t;return n.forEach(function(e){if("declaration"===e.type){var n=e.property,a=e.value;i?t(n,a,e):a&&((r=r||{})[n]=a)}}),r};var a=n(r(44517))},71997:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>o.a,__next_app__:()=>d,pages:()=>u,routeModule:()=>p,tree:()=>c});var n=r(65239),a=r(48088),i=r(88170),o=r.n(i),s=r(30893),l={};for(let e in s)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>s[e]);r.d(t,l);let c={children:["",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,90597)),"/Users/otto/Desktop/deepstudio/deepstudio-git/app/page.tsx"],metadata:{icon:[async e=>(await Promise.resolve().then(r.bind(r,46055))).default(e)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(r.bind(r,58014)),"/Users/otto/Desktop/deepstudio/deepstudio-git/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(r.t.bind(r,57398,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(r.t.bind(r,89999,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(r.t.bind(r,65284,23)),"next/dist/client/components/unauthorized-error"],metadata:{icon:[async e=>(await Promise.resolve().then(r.bind(r,46055))).default(e)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]}.children,u=["/Users/otto/Desktop/deepstudio/deepstudio-git/app/page.tsx"],d={require:r,loadChunk:()=>Promise.resolve()},p=new n.AppPageRouteModule({definition:{kind:a.RouteKind.APP_PAGE,page:"/page",pathname:"/",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:c}})},75913:(e,t,r)=>{"use strict";r(56397);var n=r(43210),a=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(n),i="undefined"!=typeof process&&process.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},s=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,a=t.optimizeForSpeed,s=void 0===a?i:a;l(o(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",l("boolean"==typeof s,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=s,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0,this._nonce=null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){l("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),l(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;l(!this._injected,"sheet already injected"),this._injected=!0,this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){return l(o(e),"`insertRule` accepts only strings"),"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++},r.replaceRule=function(e,t){this._optimizeForSpeed;var r=this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(n){i||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}return e},r.deleteRule=function(e){this._serverSheet.deleteRule(e)},r.flush=function(){this._injected=!1,this._rulesCount=0,this._serverSheet.cssRules=[]},r.cssRules=function(){return this._serverSheet.cssRules},r.makeStyleTag=function(e,t,r){t&&l(o(t),"makeStyleTag accepts only strings as second parameter");var n=document.createElement("style");this._nonce&&n.setAttribute("nonce",this._nonce),n.type="text/css",n.setAttribute("data-"+e,""),t&&n.appendChild(document.createTextNode(t));var a=document.head||document.getElementsByTagName("head")[0];return r?a.insertBefore(n,r):a.appendChild(n),n},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();function l(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},u={};function d(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return u[n]||(u[n]="jsx-"+c(e+"-"+r)),u[n]}function p(e,t){var r=e+(t=t.replace(/\/style/gi,"\\/style"));return u[r]||(u[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[r]}var h=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,a=t.optimizeForSpeed,i=void 0!==a&&a;this._sheet=n||new s({name:"styled-jsx",optimizeForSpeed:i}),this._sheet.inject(),n&&"boolean"==typeof i&&(this._sheet.setOptimizeForSpeed(i),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed());var r=this.getIdAndRules(e),n=r.styleId,a=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var i=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=i,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return a.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var a=d(n,r);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return p(a,e)}):[p(a,t)]}}return{styleId:d(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=n.createContext(null);m.displayName="StyleSheetContext";a.default.useInsertionEffect||a.default.useLayoutEffect;var f=void 0;function g(e){var t=f||n.useContext(m);return t&&t.add(e),null}g.dynamic=function(e){return e.map(function(e){return d(e[0],e[1])}).join(" ")},t.style=g},76180:(e,t,r)=>{"use strict";e.exports=r(75913).style},79428:e=>{"use strict";e.exports=require("buffer")},79551:e=>{"use strict";e.exports=require("url")},86908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,a=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){var c;return(void 0===t&&(t={}),!(c=e)||a.test(c)||r.test(c))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(o,l):e.replace(i,l)).replace(n,s))}},90597:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});let n=(0,r(12907).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/otto/Desktop/deepstudio/deepstudio-git/app/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/otto/Desktop/deepstudio/deepstudio-git/app/page.tsx","default")},94735:e=>{"use strict";e.exports=require("events")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[447,551,212,617],()=>r(71997));module.exports=n})(); |